
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
@synap-core/client
Advanced tools
Type-safe Client SDK for Synap Core OS
A hybrid 3-layer SDK that provides both high-level convenience methods and low-level RPC access.
The SDK is built on 3 layers:
client.rpc.*client.notes.*, client.chat.*, etc.getToken()npm install @synap/client
# or
pnpm add @synap/client
# or
yarn add @synap/client
import SynapClient from '@synap/client';
const synap = new SynapClient({
url: 'http://localhost:3000',
getToken: async () => {
// Get your auth token (Better Auth, custom auth, etc.)
return await getSessionToken();
},
});
// High-level API (recommended)
await synap.notes.create({
content: '# My Note\n\nContent here',
title: 'My Note',
});
// Low-level API (for power users)
await synap.rpc.notes.create.mutate({
content: '# My Note',
});
const synap = new SynapClient({
url: 'http://localhost:3000',
token: 'your-static-token',
});
// Create a note
await synap.notes.create({
content: '# My Note',
title: 'My Note',
tags: ['important'],
});
// List notes
const notes = await synap.notes.list({
limit: 20,
offset: 0,
});
// Get a note
const note = await synap.notes.get('note-id');
// Send a message
const result = await synap.chat.sendMessage({
content: 'Create a note about AI',
threadId: 'thread-123',
});
// Get thread
const thread = await synap.chat.getThread('thread-123');
// List threads
const threads = await synap.chat.listThreads();
// Complete a task
await synap.tasks.complete('task-id');
// Capture a thought
await synap.capture.thought('I need to remember to buy milk');
// Health check
const health = await synap.system.health();
// System info
const info = await synap.system.info();
For full control, use the RPC client directly:
// Direct tRPC access
await synap.rpc.notes.create.mutate({ content: '...' });
await synap.rpc.notes.list.query({ limit: 20 });
await synap.rpc.chat.sendMessage.mutate({ content: '...' });
import { SynapRealtimeClient } from '@synap/client/realtime';
const realtime = new SynapRealtimeClient({
url: synap.getRealtimeUrl('user-123'),
userId: 'user-123',
onMessage: (message) => {
console.log('Received:', message);
if (message.type === 'note.creation.completed') {
// Refresh notes list
}
},
});
realtime.connect();
import { trpc, createSynapReactClient } from '@synap/client/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
const queryClient = new QueryClient();
const trpcClient = createSynapReactClient({
url: 'http://localhost:3000',
getToken: async () => await getSessionToken(),
});
function App() {
return (
<trpc.Provider client={trpcClient} queryClient={queryClient}>
<MyComponent />
</trpc.Provider>
);
}
function MyComponent() {
const { data: notes } = trpc.notes.list.useQuery();
const createNote = trpc.notes.create.useMutation();
return (
<div>
{notes?.map(note => (
<div key={note.id}>{note.title}</div>
))}
</div>
);
}
The SDK supports multiple authentication methods:
const synap = new SynapClient({
url: 'http://localhost:3000',
getToken: async () => {
const session = await getSession();
return session?.token || null;
},
});
const synap = new SynapClient({
url: 'http://localhost:3000',
// Authentication handled via Ory Kratos session cookies
});
const synap = new SynapClient({
url: 'http://localhost:3000',
getToken: async () => {
// Your custom auth logic
return await myAuthService.getToken();
},
});
MIT
FAQs
Type-safe client SDK for Synap Core OS
The npm package @synap-core/client receives a total of 7 weekly downloads. As such, @synap-core/client popularity was classified as not popular.
We found that @synap-core/client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.