Files
mesh-sdk/go/README.md
T
jochen 81ca305ddd The Go SDK subscribes and asks through the runtime (hq ADR 0198)
Subscribe(pattern, handler) asks the runtime for the module's events and answers each mesh/event
only after the matching handlers returned nil, so the runtime acknowledges it on the bus then and
not before; Ask(key, body) calls a tool as the module. Topic matching is the TypeScript SDK's.
2026-10-03 23:19:54 +02:00

19 lines
1.0 KiB
Markdown

# mesh-sdk for Go
`stdio.Serve("", tools)` speaks MCP over stdio to the node's tool runtime, as the module the runtime
names (novox/hq ADR 0188, ADR 0193). A `Tool` is a name, a description, an argument schema and a
function; calls run concurrently. A tool named `<seat>.<verb>` is the seat's implementation.
`stdio.Emit(type, body)` publishes an event as the module, `stdio.Subscribe(pattern, handler)` receives the module's events (acknowledged only after the handler returns nil) and `stdio.Ask(key, body)` calls a tool — all through the runtime (novox/hq ADR 0193, 0198). Standard library only.
## Installing
```
GOPRIVATE=git.novox.be go get git.novox.be/novox/mesh-sdk/go@latest
```
Releases are tagged `go/vX.Y.Z` in this repository, the subdirectory form Go's module system expects,
at the same version as the TypeScript package.
What it holds, under ADR 0039's test: the stdio loop and the tool type. Nothing else — no bus, no
client, nothing of any module's. `go build ./example` and pipe a `tools/list` request into it.