A TypeScript holder, the forge module first, must judge a verb's caller by the runtime's proof, say its seat's events and answer its first views' read and ask-again tools (design 47, The forge module's tools come from mesh-sdk's TypeScript side; G-F1 option A). The stdio session now hands each tool the caller and call id the runtime wrote in _meta (callers.callerOf, the Go rules for Callers and VerbCallers), binds the runtime for seatPublish over mesh/seat.publish and config, and views gains the Follower and its two status tools over the state first-views. @novox/mesh-sdk 0.1.19. Builds: design 47 G §196, §200, §336 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
12 lines
817 B
JavaScript
12 lines
817 B
JavaScript
// A launched bundle whose tool emits (novox/hq ADR 0193): the emit travels to the runtime over stdio, and so does an
|
|
// event it says on a seat (ADR 0259 §3).
|
|
import { registerModuleTools } from "../../dist/tools/index.js";
|
|
import { emit } from "../../dist/events/index.js";
|
|
import { seatPublish } from "../../dist/runtime/index.js";
|
|
import { serveRegisteredOverStdio } from "../../dist/stdio/index.js";
|
|
registerModuleTools("chime", () => [
|
|
{ name: "ring", description: "rings and says so", input: {}, run: async () => { await emit("rang", { times: 1 }); return { rang: true }; } },
|
|
{ name: "peal", description: "says it on its seat", input: {}, run: async () => { await seatPublish("mesh.seat.bell.event.pealed.anchor", { times: 2 }, "p-1"); return { pealed: true }; } },
|
|
]);
|
|
await serveRegisteredOverStdio();
|