MESH ONLINECODENAME: Final Countdown

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/core

Two 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

  1. Quickstart — install, a node, a first loop.
  2. Announce — publish a capability.
  3. Discover — find capabilities by what they do.
  4. Invoke — call a capability, get a typed result.
  5. Watch — consume the event stream.
  6. Artifacts — move blobs and directories.
  7. 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.