// 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();