Cite ADR 0188, not 0187: the record was renumbered before it merged #30
@@ -16,7 +16,7 @@ this runtime is what loads them and puts them on the mesh. It:
|
|||||||
4. serves every module's tools on that module's subjects and every held seat's verbs on the seat's.
|
4. serves every module's tools on that module's subjects and every held seat's verbs on the seat's.
|
||||||
|
|
||||||
A bundle that is not plain JavaScript — a Go or Rust binary, a Python script, or a JavaScript file
|
A bundle that is not plain JavaScript — a Go or Rust binary, a Python script, or a JavaScript file
|
||||||
marked executable — is **launched** rather than imported (novox/hq ADR 0187): the runtime starts it
|
marked executable — is **launched** rather than imported (novox/hq ADR 0188): the runtime starts it
|
||||||
as a child with its own environment and speaks MCP over stdio to it, `tools/list` once and
|
as a child with its own environment and speaks MCP over stdio to it, `tools/list` once and
|
||||||
`tools/call` per call. A tool it lists as `<seat>.<verb>` is the seat's implementation. A child that
|
`tools/call` per call. A tool it lists as `<seat>.<verb>` is the seat's implementation. A child that
|
||||||
exits is named in the log and started again on its next call. So a tools bundle may be written in
|
exits is named in the log and started again on its next call. So a tools bundle may be written in
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// A tools bundle as a process the runtime launches (novox/hq ADR 0187).
|
// A tools bundle as a process the runtime launches (novox/hq ADR 0188).
|
||||||
//
|
//
|
||||||
// The runtime does not run a tool's code itself when the bundle is not JavaScript: it starts the
|
// The runtime does not run a tool's code itself when the bundle is not JavaScript: it starts the
|
||||||
// bundle's executable as a child with the runtime's environment and speaks MCP over stdio to it —
|
// bundle's executable as a child with the runtime's environment and speaks MCP over stdio to it —
|
||||||
|
|||||||
+1
-1
@@ -108,7 +108,7 @@ export async function runTools(opts: RuntimeOptions): Promise<() => void> {
|
|||||||
// the registrations it adds are the ones that appear after it, which is how each is attributed
|
// the registrations it adds are the ones that appear after it, which is how each is attributed
|
||||||
// to the module whose bundle made it.
|
// to the module whose bundle made it.
|
||||||
// A bundle that is not plain JavaScript — or is marked executable — is launched as a process
|
// A bundle that is not plain JavaScript — or is marked executable — is launched as a process
|
||||||
// and spoken to over MCP on stdio instead (ADR 0187); what it lists is registered the same way.
|
// and spoken to over MCP on stdio instead (ADR 0188); what it lists is registered the same way.
|
||||||
const failed = new Map<string, string>();
|
const failed = new Map<string, string>();
|
||||||
const owner: string[] = []; // registration index → the module whose bundle registered it
|
const owner: string[] = []; // registration index → the module whose bundle registered it
|
||||||
const launched: { module: string; owner: string; tools: ToolDefinition[] }[] = [];
|
const launched: { module: string; owner: string; tools: ToolDefinition[] }[] = [];
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# A tools bundle in a second language (novox/hq ADR 0187): MCP over stdio, no SDK, no dependencies.
|
# A tools bundle in a second language (novox/hq ADR 0188): MCP over stdio, no SDK, no dependencies.
|
||||||
# One tool of its own, one seat verb, and one that exits the process mid-call.
|
# One tool of its own, one seat verb, and one that exits the process mid-call.
|
||||||
import json, sys
|
import json, sys
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
// A TypeScript bundle written against the protocol and marked executable: served through the
|
// A TypeScript bundle written against the protocol and marked executable: served through the
|
||||||
// launcher like any other language, with the in-process shortcut off (novox/hq ADR 0187).
|
// launcher like any other language, with the in-process shortcut off (novox/hq ADR 0188).
|
||||||
import { serveStdio } from "@novox/mesh-sdk/stdio";
|
import { serveStdio } from "@novox/mesh-sdk/stdio";
|
||||||
|
|
||||||
await serveStdio("epsilon", [
|
await serveStdio("epsilon", [
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ test("the node's runtime serves five modules' bundles on one credential — two
|
|||||||
await mesh.issue(membershipOf("alpha", "anchor", { plain: true }));
|
await mesh.issue(membershipOf("alpha", "anchor", { plain: true }));
|
||||||
await mesh.issue(membershipOf("beta", "anchor", { seats: { "node-shelf": ["list", "clear"] } }));
|
await mesh.issue(membershipOf("beta", "anchor", { seats: { "node-shelf": ["list", "clear"] } }));
|
||||||
await mesh.issue(membershipOf("gamma", "anchor"));
|
await mesh.issue(membershipOf("gamma", "anchor"));
|
||||||
// Two more, launched rather than loaded (ADR 0187): delta is Python and holds the node-lamp seat;
|
// Two more, launched rather than loaded (ADR 0188): delta is Python and holds the node-lamp seat;
|
||||||
// epsilon is TypeScript written against the protocol and marked executable.
|
// epsilon is TypeScript written against the protocol and marked executable.
|
||||||
await mesh.issue(membershipOf("delta", "anchor", { seats: { "node-lamp": ["on"] } }));
|
await mesh.issue(membershipOf("delta", "anchor", { seats: { "node-lamp": ["on"] } }));
|
||||||
await mesh.issue(membershipOf("epsilon", "anchor"));
|
await mesh.issue(membershipOf("epsilon", "anchor"));
|
||||||
|
|||||||
Reference in New Issue
Block a user