Files
mesh-sdk/test/fixtures/stdio-seat-first.mjs
T
jochen dc59ec0e1c 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.
2026-10-03 21:05:38 +02:00

7 lines
541 B
JavaScript

// 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();