A launched bundle serves under the module the runtime names (hq ADR 0193)

serveRegisteredOverStdio lists the registrations of the module named by MESH_SERVED_MODULE by
their own names and every other registration as <seat>.<verb>. Before, the first registration
was taken for the module's own, so a bundle registering its seat first listed the seat's verbs as
its own tools. Contributors are given the process's environment, the bundle's own. 0.1.4.
This commit is contained in:
jochen
2026-10-03 21:05:38 +02:00
parent 66a3e223f1
commit dc59ec0e1c
4 changed files with 48 additions and 6 deletions
+6
View File
@@ -0,0 +1,6 @@
// A bundle that registers its seat's verbs before its own tools, as the packet filter does.
import { registerModuleTools } from "../../dist/tools/index.js";
import { serveRegisteredOverStdio } from "../../dist/stdio/index.js";
registerModuleTools("node-packet-filter", () => [{ name: "rules", description: "the ruleset", input: {}, run: async () => "r" }]);
registerModuleTools("nftables", (env) => [{ name: "firewall_rules", description: "the table", input: {}, run: async () => env.NFT_WORD ?? null }]);
await serveRegisteredOverStdio();