A launched bundle is told the module it serves (hq ADR 0193)

node-tools sets MESH_SERVED_MODULE for each child it launches, so the SDK's stdio loop lists that
module's tools by their names and a seat's verbs as the seat's, whichever was registered first.
This commit is contained in:
jochen
2026-10-03 21:07:52 +02:00
parent 8e30ea9ff5
commit 302645dd01
3 changed files with 37 additions and 1 deletions
+2 -1
View File
@@ -161,7 +161,8 @@ export async function runTools(opts: RuntimeOptions): Promise<() => void> {
const path = resolve(entry);
try {
if (launches(path)) {
const child = await launch(module, path, envFor(module));
// Told the module it serves it as, so a seat's verbs are the seat's (ADR 0193).
const child = await launch(module, path, { ...envFor(module), MESH_SERVED_MODULE: module });
children.push(child.stop);
for (const r of child.registrations) launched.push({ ...r, owner: module });
continue;