Skip to content

module-kit v0.4.0

Choose a tag to compare

@immakermatty immakermatty released this 17 Nov 21:31
7cc0c4c

Adds the one tool contract for agents (Lazurio Module Standard, Tools for agents (MCP and WebMCP)). An App defines its tools once on its server and offers them through two transports over the same handler.

  • @lazurio/module-kit/tools
    • defineTool and createToolRegistry, with handleMcp (a stateless MCP server at /mcp: Streamable HTTP, JSON answers, POST only, no batches, bounded body, exact own Origin), handlePage (GET /api/agent-tools, POST /api/agent-tools/<name> from the exact own origin as JSON only), list and effectOf.
    • Identity comes only through appAccess, and the list follows the role and the writer mode (dataWriter).
    • get_app_context is built in, and refusals share common codes (record_changed with current_revision, data_read_only, forbidden…).
    • Effects are read, prepare and write with publishesData. A publishing write is offered in production only with publicationConsent, the Owner's recorded prior consent for that kind of record. No tool completes an approval, signature, sending, deletion or a person's confirmation.
    • Every call writes one audit line without its input or answer.
  • @lazurio/module-kit/webmcp: registerAgentTools registers the server's tools for the current person as WebMCP tools and accepts the page's own view tools.
  • @lazurio/module-kit/tools/testing: gateway requests and environments, plus mcpCall, mcpToolNames, mcpTool and pageTool for a Module's tests.

There are no runtime dependencies, and the server was checked against the official MCP SDK client. Nothing in . changed. Install: bun add github:Lazurio/module-kit#v0.4.0. The Python package is unchanged.