WardrikHTTP. Worker
(wardrik_http v0.1.0-rc.1)
Copy Markdown
The tool workers' WebSocket at GET /v1/workers. Wardrik is the MCP client over it.
A worker is an MCP server that connects in. Its token's scope needs agent.serve on the agents
it serves.
Messages are JSON-RPC 2.0, one per text frame, as MCP 2025-06-18 specifies:
- Wardrik sends
initialize. Once the worker answers, it sendsnotifications/initialized. - Wardrik sends
tools/listand offers the listed tools through the server'sWardrik.Server.offer/2. The worker sendsnotifications/tools/list_changedto be listed again. - Wardrik sends
tools/call, with the call's_meta, for each call an agent makes. The worker answers with aCallToolResult, and the call's cost as_meta.costUsd. - Wardrik sends
notifications/cancelledwhen it stops waiting on a call, or the call is stopped.
It answers the worker's ping. It also pings the worker every :keepalive milliseconds and
checks that the token still works. It closes with 1008 once the token stops working.