Builds: design 47 G §559 (the finding-calls word check waits on a design question) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
23 lines
957 B
JavaScript
23 lines
957 B
JavaScript
// A launched bundle whose finding writer's transport is the bundle's (design 47 G §559): the writer's publish asks the
|
|
// runtime for an acknowledged publish, its consumer of the asks a subscription that delivers only new messages.
|
|
import { bundleTransport } from "../../dist/views/index.js";
|
|
import { registerModuleTools } from "../../dist/tools/index.js";
|
|
import { serveRegisteredOverStdio } from "../../dist/stdio/index.js";
|
|
|
|
const t = bundleTransport("keeper", "anchor");
|
|
await t.listen("mesh-conditions.findings-asked", (b) => process.stderr.write(`asked ${JSON.stringify(b)}\n`));
|
|
registerModuleTools("keeper", () => [
|
|
{
|
|
name: "say", description: "says a finding", input: {},
|
|
run: async () => {
|
|
try {
|
|
await t.publish("finding-written", { kind: "k" }, "id-1");
|
|
return { said: true };
|
|
} catch (e) {
|
|
return { said: false, why: String(e.message) };
|
|
}
|
|
},
|
|
},
|
|
]);
|
|
await serveRegisteredOverStdio();
|