The mesh composes every served module's words into MESH_TOOL_ENV; the runtime takes it at start and removes it from its own environment, then gives each registration's contributor and each launched child the runtime's words plus its own module's, never another's. Against an SDK without collectToolsEach it says so and serves with the runtime's words only. The test serves two imported bundles and one launched, each answering with its own words and none of the others'.
6 lines
446 B
JavaScript
6 lines
446 B
JavaScript
// A bundle that reads what it was given (novox/hq ADR 0192): its contributor's environment.
|
|
import { registerModuleTools } from "@novox/mesh-sdk/tools";
|
|
registerModuleTools("gamma", (env) => [
|
|
{ name: "given", description: "what gamma was given", input: {}, run: async () => ({ mine: env.GAMMA_CONFIG_FILE ?? null, theirs: env.DELTA_TOKEN_FILE ?? null, runtime: env.MESH_OPERATOR_ACCOUNT ?? null, composed: env.MESH_TOOL_ENV ?? null }) },
|
|
]);
|