Files
mesh-sdk/test/fixtures/stdio-finding-calls.mjs
T
jschoubben 5fa64be894 Revert the revert of G's mesh-sdk merge (#191): G's sdk stands again over reader release 3
Main reverted G's half merge (#189, reverted by 8afc3eb in #191) and then took the reader release's S1-S5, which
copied G's code. G's form holds where they differ (process_bus.go, seats.go, state.go and their tests); the
release's kept names stay so main's callers keep building: SeatViewPrefix beside SeatReadPrefix, and QueueInvoke's
empty strings on not-ok (with its test TestQueueInvoke). The tree differs from G's head f30dee54 only by those and
the release's two tests (objects cap option, seat states and stream kinds).

Builds: design 47 G (the milestone's sdk part, as at f30dee54)

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-13 12:49:56 +01:00

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