TypeScript SDK
The TypeScript SDK (@net-mesh/sdk) wraps the same Rust core as every other
binding, so this spine walks the same agentic loop as the
Rust SDK — the concepts map one-to-one.
▸ code
npm install @net-mesh/sdk @net-mesh/coreTwo node classes, same split as Rust:
NetNode— the event bus.emit/subscribeTyped. Transport is a runtime choice.MeshNode— the mesh node with capabilities, tools, and nRPC. The agentic surface: announce, discover, invoke.
The spine
- Quickstart — install, a node, a first loop.
- Announce — publish a capability.
- Discover — find capabilities by what they do.
- Invoke — call a capability, get a typed result.
- Watch — consume the event stream.
- Artifacts — move blobs and directories.
- Errors — classify failures and recover.
One note on lifecycle that Rust handles for you: always await node.shutdown()
(and handle.close() on RPC handles) — Node finalizers are non-deterministic, so
the drain has to be explicit.