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:
Vendored
+6
@@ -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();
|
||||
Reference in New Issue
Block a user