Skip to content

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.

Today we ship five TypeScript packages. The surface they expose - the SDK contract - is the portable part. A Python or Go implementation reuses the same concepts.

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
Five packages. core owns the protocol types and builder; the others wrap transport and framework integration.

Whatever language you implement Tesseron in, the SDK has to expose these primitives. They correspond 1:1 with the protocol.

PrimitiveIn TypeScriptCovers
Client lifecycletesseron.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 bridgeAccepts any StandardSchemaV1<T> validator (Zod, Valibot, ArkType, …)Input / output / sampling / elicitation validation.
Invocation context(input, ctx) passed to every handlerctx.signal, ctx.progress, ctx.sample, ctx.confirm, ctx.elicit, ctx.log, ctx.agent, ctx.agentCapabilities, ctx.client.
Transport abstractionTransport { send, onMessage, onClose, close }WebSocket in practice, but the protocol is transport-agnostic.
JSON-RPC dispatcherJsonRpcDispatcherRequest/notification handling, ID correlation, timeout, error mapping.
Structured error modelTesseronError(code, message, data?)Mapping to / from JSON-RPC error objects with the error codes in the catalog.