// showcase's tools — its operator-facing surface, served over the broker. // // Two of them, because one tool proves a tool can exist and two prove a module can have a surface. import { tool } from "@novox/mesh-sdk/tools"; tool({ name: "showcase_greet", description: "Greet somebody, and say which machine did it.", input: { type: "object", properties: { who: { type: "string" } } }, async run({ who }: { who?: string }) { return { greeting: `hello ${who ?? "world"}`, from: process.env.MESH_NODE ?? "somewhere" }; }, }); tool({ name: "showcase_state", description: "What this module was configured with, so a test can read it back.", input: { type: "object", properties: {} }, async run() { return { greeting: process.env.SHOWCASE_GREETING ?? "", database: process.env.SHOWCASE_DATABASE ?? "", }; }, });