SDK overview
An SDK is the part of Tesseron that lives in your process. It serialises outgoing JSON-RPC, dispatches incoming method calls into your handlers, and wraps the per-invocation protocol glue (progress, cancel, sample, elicit) in a shape that feels natural in the host language.
The SDKs live in four repositories: TypeScript, Rust, Python, and C++. TypeScript packages are on npm, Rust is on crates.io, Python is on PyPI, and C++ is consumed through CMake FetchContent. The surface they expose, the SDK contract, is the portable part. Docs, protocol fixtures, and issue tracking stay in this hub.
The shipped TypeScript SDK
Section titled “The shipped TypeScript SDK”flowchart LR core["@tesseron/core<br/>action & resource builders<br/>JSON-RPC dispatcher<br/>protocol types"] web["@tesseron/web<br/>browser client<br/>WebSocket transport"] server["@tesseron/server<br/>Node client<br/>ws transport"] react["@tesseron/react<br/>useTesseronAction<br/>useTesseronResource<br/>useTesseronConnection"] mcp["@tesseron/mcp<br/>MCP gateway<br/>MCP stdio bridge"] web -- "re-exports" --> core server -- "re-exports" --> core react -- "wraps" --> web mcp -. "shared types" .-> core
Quickstart Install one package, declare one action, connect.
@tesseron/core Action & resource builders, JSON-RPC dispatcher, protocol types. Zero runtime deps beyond Standard Schema.
@tesseron/web Browser WebSocket transport + singleton client.
@tesseron/server Node `ws`-backed transport + singleton client.
@tesseron/react `useTesseronAction`, `useTesseronResource`, `useTesseronConnection`.
@tesseron/mcp The hub-owned MCP gateway CLI, launched by the plugin.
The portable SDK contract
Section titled “The portable SDK contract”Whatever language you implement Tesseron in, the SDK has to expose these primitives. They correspond 1:1 with the protocol.
| Primitive | In TypeScript | Covers |
|---|---|---|
| Client lifecycle | tesseron.app({ id, name, … }) + tesseron.connect() | Handshake, session ID, claim code. |
| Action builder | .action(name).describe(…).input(…).output(…).handler(fn) | Declaring a named, typed, handler-backed action. |
| Resource builder | .resource(name).read(fn).subscribe(emitter) | Declaring readable + optionally subscribable state. |
| Standard Schema bridge | Accepts any StandardSchemaV1<T> validator (Zod, Valibot, ArkType, …) | Input / output / sampling / elicitation validation. |
| Invocation context | (input, ctx) passed to every handler | ctx.signal, ctx.progress, ctx.sample, ctx.confirm, ctx.elicit, ctx.log, ctx.agent, ctx.agentCapabilities, ctx.client. |
| Transport abstraction | Transport { send, onMessage, onClose, close } | WebSocket in practice, but the protocol is transport-agnostic. |
| JSON-RPC dispatcher | JsonRpcDispatcher | Request/notification handling, ID correlation, timeout, error mapping. |
| Structured error model | TesseronError(code, message, data?) | Mapping to / from JSON-RPC error objects with the error codes in the catalog. |
Other SDKs
Section titled “Other SDKs” Python SDK asyncio and Pydantic v2, the full host surface, passing conformance. Published on PyPI.
Rust SDK Tokio and WebSocket host with typed actions, resources, and the full context API. Published on crates.io.
C++ SDK C++20 and Boost.Asio host with actions, resources, and the full context API. Consumed through CMake FetchContent.
Port Tesseron to your language Step-by-step guide, protocol conformance checklist, test strategy.