
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
@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 11 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.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.