Every tool's schema in one $SRV.INFO reply outgrew max_payload on machines serving 137-206 tools, and the refused reply was dropped silently, so search and a machine's view went empty. Module tools now announce without schema; describe and tools/list ask the module for it. An answer still too large has its descriptions cut to a line, and a failed reply is logged.
15 lines
871 B
JavaScript
15 lines
871 B
JavaScript
// One of several bundles the node's runtime loads (novox/hq ADR 0175): a module with three tools of
|
|
// its own and the implementation of a node seat's two verbs under the seat's name (ADR 0159).
|
|
import { registerModuleTools } from "@novox/mesh-sdk/tools";
|
|
|
|
registerModuleTools("beta", () => [
|
|
{ name: "three", description: "beta's", input: { verbose: { type: "boolean", description: "say more" } }, run: async () => ({ beta: 3 }) },
|
|
{ name: "four", description: "beta's", input: {}, run: async () => ({ beta: 4 }) },
|
|
{ name: "five", description: "beta's", input: {}, run: async () => ({ beta: 5 }) },
|
|
]);
|
|
|
|
registerModuleTools("node-shelf", () => [
|
|
{ name: "list", description: "what is on the shelf", input: {}, run: async () => ({ shelf: ["a", "b"] }) },
|
|
{ name: "clear", description: "take it all off", input: {}, run: async () => ({ cleared: true }) },
|
|
]);
|