Module state is hq ADR 0201 after all: the derived-value record moved to 0202 on hq main
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
//
|
||||
// At start it renders the agent's managed directory, asks the licence manager for this node's token,
|
||||
// begins watching the credentials file for a login, takes the manager's licence events, and watches the
|
||||
// module's `servers` state — every node's MCP server registrations (novox/hq ADR 0202). node.ts holds the
|
||||
// module's `servers` state — every node's MCP server registrations (novox/hq ADR 0201). node.ts holds the
|
||||
// logic.
|
||||
|
||||
import { readFileSync, watchFile } from "node:fs";
|
||||
@@ -92,7 +92,7 @@ function status(p: Paths): Record<string, unknown> {
|
||||
};
|
||||
}
|
||||
|
||||
/** The module's MCP servers on the bus (ADR 0202): its own state, which every node of it watches. */
|
||||
/** The module's MCP servers on the bus (ADR 0201): its own state, which every node of it watches. */
|
||||
const servers = () => state<Record<string, unknown>>("servers") as unknown as ServerState;
|
||||
|
||||
/** What this node takes from that state, kept from the watch. One per process. */
|
||||
@@ -180,7 +180,7 @@ if (p) {
|
||||
say(JSON.stringify(await pull(p, ask, writeManaged).catch((e) => ({ failed: String(e) }))));
|
||||
}).catch(loud("the licence events"));
|
||||
|
||||
// Every node's MCP servers: the whole current set first, then each change (ADR 0202). Awaited, so the
|
||||
// Every node's MCP servers: the whole current set first, then each change (ADR 0201). Awaited, so the
|
||||
// managed directory holds every server that applies here before the bundle says what it serves.
|
||||
try {
|
||||
await state<Record<string, unknown>>("servers").watch((c) => {
|
||||
|
||||
Reference in New Issue
Block a user