Repository navigation
module-kit v0.4.0
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/toolsdefineToolandcreateToolRegistry, withhandleMcp(a stateless MCP server at/mcp: Streamable HTTP, JSON answers, POST only, no batches, bounded body, exact ownOrigin),handlePage(GET /api/agent-tools,POST /api/agent-tools/<name>from the exact own origin as JSON only),listandeffectOf.- Identity comes only through
appAccess, and the list follows the role and the writer mode (dataWriter). get_app_contextis built in, and refusals share common codes (record_changedwithcurrent_revision,data_read_only,forbidden…).- Effects are
read,prepareandwritewithpublishesData. A publishing write is offered in production only withpublicationConsent, 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:registerAgentToolsregisters 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, plusmcpCall,mcpToolNames,mcpToolandpageToolfor 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.