From 020003ea3fb95f3a063cf07b71f13019cd4ba15f Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 2 Oct 2026 14:52:28 +0200 Subject: [PATCH] Cite hq ADR 0170, not 0169: the firewall seat's record was renumbered after a collision on hq main --- src/client.ts | 2 +- src/mcp.ts | 2 +- test/client.test.ts | 2 +- test/mcp.test.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client.ts b/src/client.ts index e45071d..2f20b86 100644 --- a/src/client.ts +++ b/src/client.ts @@ -182,7 +182,7 @@ export async function toolsOn(bus: Broker): Promise { for (const s of roles.seats ?? []) { // A node-scoped seat's tool is asked of one machine (design 33 §4): listed with its scope, so // a caller names the machine and the call carries it — `seat:.@`. Left out - // of the listing, the verb never resolved as a seat's and nothing served it (ADR 0169). + // of the listing, the verb never resolved as a seat's and nothing served it (ADR 0170). for (const t of s.tools ?? []) { tools.push({ module: s.seat, name: t.name, description: t.description, input: t.input, seat: true, scope: s.scope }); } diff --git a/src/mcp.ts b/src/mcp.ts index 14d9573..0ba4497 100644 --- a/src/mcp.ts +++ b/src/mcp.ts @@ -143,7 +143,7 @@ export function mcpSurface(bus: Broker, who: string): Surface { const roles = have && seatsIn(have); const bare = given.split("@", 1)[0]; const isSeatVerb = roles ? toolKey(bare, roles).startsWith("seat:") : false; - // A node-scoped seat's verb is asked of one machine (design 33 §4, ADR 0169): `node` + // A node-scoped seat's verb is asked of one machine (design 33 §4, ADR 0170): `node` // names it and travels in the subject, as for a module's tool. const nodeScoped = isSeatVerb && (have?.tools.some((t) => t.seat && t.scope === "node" && `${t.module}.${t.name}` === bare) ?? false); diff --git a/test/client.test.ts b/test/client.test.ts index d438524..9c82ba2 100644 --- a/test/client.test.ts +++ b/test/client.test.ts @@ -68,7 +68,7 @@ test("a person sees what the running modules answer, sorted, and who did not ans "the list is what the modules answered plus every role's tools, in a stable order", ); // A role's tool is marked as one; a node-scoped seat's carries its scope, so a caller names - // the machine and the verb resolves as the seat's (design 33 §4, ADR 0169). + // the machine and the verb resolves as the seat's (design 33 §4, ADR 0170). assert.ok(have.tools.find((x) => x.module === "mesh-controller")!.seat); const lookup = have.tools.find((x) => x.module === "node-dns-resolver")!; assert.ok(lookup.seat && lookup.scope === "node"); diff --git a/test/mcp.test.ts b/test/mcp.test.ts index 687bd86..dfec071 100644 --- a/test/mcp.test.ts +++ b/test/mcp.test.ts @@ -35,7 +35,7 @@ async function aMeshAndACredential(t: { after: (fn: () => Promise | void) { name: "status", description: "what is wrong", input: {} }, { name: "push", description: "tell a machine", input: { node: { type: "string" } } }, ] }, - // A seat held once per machine (design 33 §4, ADR 0169): its verb is asked of one. + // A seat held once per machine (design 33 §4, ADR 0170): its verb is asked of one. { seat: "node-dns-resolver", scope: "node", tools: [{ name: "lookup", description: "one machine's", input: {} }] }, ], })); @@ -107,7 +107,7 @@ test("a host initialises, lists the mesh's tools and calls one", async (t) => { assert.deepEqual(listed.map((x: { name: string }) => x.name), ["mesh-controller.push", "mesh-controller.status", "node-dns-resolver.lookup", "shop.price"], "the modules' tools and the roles', named the way a person names them"); - // A node-scoped seat's verb takes the machine, and requires it (ADR 0169). + // A node-scoped seat's verb takes the machine, and requires it (ADR 0170). const lookup = listed[2]; assert.equal(lookup.inputSchema.properties.node.type, "string"); assert.deepEqual(lookup.inputSchema.required, ["node"]);