WAI for coding agents on the toolchain's names: wai mcp (toolsets core and dev, tools named by their operations), the room service's API with catalogue operationIds, wai setup-agent #505
Merged
dcharlot
merged 7 commits from 2026-10-27 10:14:04 -04:00
wai/dx-agent-mcp-2 into main 2026-10-27
wai mcp: the tools table's test module after every item (clippy items_after_test_module)
All checks were successful
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 8m42s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 27s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 38s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 1m52s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 11m5s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 10m13s
WAI HTTP delivery / HTTP corpus · every patch and mutation in exactly one shard (pull_request) Successful in 7s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 23m46s
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Successful in 2m55s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 7m0s
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Successful in 1m16s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 24s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m35s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m21s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m24s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 6m54s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 1m41s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 11m37s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 36s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m11s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 9m20s
wai-ledger service / service · macos (pull_request) Successful in 1m28s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 27m49s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h9m8s
wai-ops-gpu integer operators on GPUs / Metal GPU and browser WebGPU (macos) (pull_request) Successful in 15m28s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 18m18s
wai-pack / wai-pack · macos (pull_request) Successful in 4m44s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 4m52s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 10m38s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 20m17s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI and docs: the agent door under the catalogue's names
wai-conformance runs `--lib ops::` beside the mcp and setup-agent tests, and its comment says what they now hold (the tool list as operations, toolsets, the dev tools' target, setup-agent's envelope and exit statuses). The room service's workflow comment says the contract test checks every operationId. wai/README.md gives the toolsets and their tools, and setup-agent's CLAUDE.md and --toolset; the room service's README the operationIds; the CHANGELOG entry is rewritten for the names. Co-Authored-By: Claude Opus 5.5 <[email protected]>
joule-moq-room: each operationId is the operation's name in the catalogue
openapi.json names its 40 operations as the toolchain's catalogue does, noun.verb: room.show (GET /room) and room.grant (POST /grant) as the catalogue gives them, and the rest by its rule (service.show and service.check, the health; admission.show; mls.tail, mls.import, mls.update; performance.list and .show, schedule.create, handover.create, window.create, fidelity.create; time.show, source.fetch, watchchallenge.create, watch.tail, watch.show, watch.join, watch.update; control.grant, remote.show, remote.verify; conversation.show, .join, .tail, .import, .update, .leave, conversationchallenge.create, message.create, acknowledgement.create, member.delete; callchallenge.create, call.create, call.invite, inbox.show, answer.create, call.show). The paths stay as the service serves them. The description lists the service behind wai dev's front (/room-api) as a server. tests/openapi_contract.rs gives each operation its name beside its handlers and checks that the description names it so, that each name keeps wai::ops's rule and names one operation, and that room.show and room.grant are the routes the catalogue gives them. tests/mcp_dev_room.rs drives `wai mcp --toolset core,dev` under the new tool names and checks that the tool room_grant and POST /grant are the one operation room.grant, and that no other tool shares an API operation's name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai mcp and wai setup-agent on the toolchain's names
The two verbs join the one table, dx::VERBS, beside hello, create, dev and
verify; wai.rs keeps no second command table. A verb ends either as a check
(0 held, 1 did not, 2 usage) or with an exit status of the toolchain's table,
which setup-agent uses.
wai mcp (agent.mcp): each tool is an operation of the catalogue, named by it
with `_` for the dot, and nothing else names it. The tools come in toolsets,
chosen with --toolset (core when none is named):
- core: envelope_inspect, registry_list, registry_show, receipt_verify,
package_build, conformance_list, conformance_run, docs_search;
- dev: dev_start, dev_stop, room_grant, room_join, room_leave, room_session,
on the target local alone (a target named must be it).
receipt_verify takes the four kinds the verify tools took one each (delivery,
claim, room_session, audit_bundle), by `kind` or read from the arguments, and
answers with the kind beside the verifier's verdict. tools/list gives each
tool's operation and toolset in its _meta. The development room's program is
found as wai dev finds it: beside wai, then on PATH. envelope_inspect counts
what this build decodes as wai inspect does, the floor included.
wai setup-agent (agent.setup): AGENTS.md always; a CLAUDE.md only where the
project has one, which gains an import of AGENTS.md. --toolset registers the
server with those toolsets. Off a terminal it answers in the toolchain's JSON
envelope (envelope/1: op, ok, error {code, message, hint, retryable}, result,
and on exit 4 the proposed changes and the confirming command), with the
table's exit statuses: 2 usage, 3 permission, 4 confirmation required, 5 not
found, 7 another I/O error.
wai::ops holds the rule operation names keep: noun.verb, lowercase letters,
the verb from a closed list, and the few names the catalogue gives as they are
(room.session among them). The quickstart's wai holds `mcp`, so the server
setup-agent registers is in the archive's binary.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI and docs: the commands for coding agents
wai-conformance runs tests/cli_mcp.rs and tests/cli_setup_agent.rs, with the binary's unit tests, under the feature `mcp` on each leg. The room service's workflow runs every target, and now says what tests/openapi_contract.rs and tests/mcp_dev_room.rs hold. wai/README.md says how a project is set up for a coding agent and what `wai mcp` offers; CHANGELOG records both commands and the API description. Co-Authored-By: Claude Opus 5.5 <[email protected]>
joule-moq-room: a development room, the API described in OpenAPI 3.1, held to the code
`joule-moq-room dev` (src/dev.rs) runs the relay and the room service in one process on loopback, with keys made at start and kept only in memory, media held to no receipts and rate limits open, and says on standard error that it is for development only. It answers JSON control lines: join (a test principal enters with its grant and a proof, publishes audio and video, and the answer waits for the clock's join and publishes), leave, session (the room as live-rooms §9 gives it to a verifier) and stop. Its log goes to standard error. tokio's io-std feature, for its standard input and output. openapi.json describes every route of the service in each of its modes: requests, answers and statuses. tests/openapi_contract.rs holds it to the code: the routes the routers match are exactly its operations; each status it lists for an operation is one the operation's handlers return, and each status they return is listed; and the service, run beside a relay in each mode (a plain room, end-to-end encryption, admission by age, co-performance, a watch room, a remote desktop room, a conversation, calls, and without its relay), answers every operation with a status it lists. tests/mcp_dev_room.rs builds `wai` with the feature `mcp` in a target directory of its own and drives `wai mcp` with an MCP client: a development room started, two test principals granted, joined and publishing, the session verified, a changed record refused, a leave verified, and a grant from a service off the machine refused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai mcp and wai setup-agent: WAI's abilities as tools for a coding agent
`wai mcp` (the feature `mcp`) is a Model Context Protocol server (2025-06-18) on standard input and output. Its tools, in one table (src/bin/wai_cli/mcp/tools.rs): inspect an envelope or a package; list and describe registered capabilities; verify a delivery receipt, a claim with the context the tool takes, a live-room session and a stream audit bundle, each answering with the verifier's verdict and reason code; package a media file under `wai wrap`'s rules, inside the project directory only; list and run a conformance corpus's independent verifier; search the specification; and, marked development only, drive a development room on loopback (`joule-moq-room dev`): start it, mint grants for test principals (any service whose address is not a loopback address is refused before a connection is made), join and publish as them, read the session, stop it. Each tool carries safety hints; `--read-only` offers only those that read or run a verifier. `wai setup-agent` writes AGENTS.md and CLAUDE.md (which imports it) and registers the server in the project's MCP configuration files by their documented formats. A file that exists is changed only after its diff is shown and confirmed (asked on a terminal, or --confirm; otherwise exit 4 with every diff and the confirming command), --dry-run writes nothing, nothing outside the project directory is written, and its output is JSON off a terminal. Both are reached through one table of verbs in wai.rs, so a name is one line. `wrap` returns its printed lines and its facts, which the packaging tool reads. tests/cli_mcp.rs drives the binary with an MCP client: every tool, and the verifiers agreeing vector by vector with jwp-conformance, claim-conformance, live-conformance/rooms and live-conformance/audit. tests/cli_setup_agent.rs runs the command in scratch projects, fresh and with files that exist. Co-Authored-By: Claude Opus 5.5 <[email protected]>