WAI for coding agents: wai mcp, the room service's API in OpenAPI 3.1 held to the code, wai setup-agent #500

Closed
dcharlot wants to merge 3 commits from wai/dx-agent-mcp into main

2026-10-26

Transaction Science
CI and docs: the commands for coding agents
Some checks failed
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
wai cross-architecture byte-equality / does this change touch it (pull_request) Has been cancelled
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Has been cancelled
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Has been cancelled
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Has been cancelled
wai-audit collector and player integration / does this change touch it (pull_request) Has been cancelled
wai-audit collector and player integration / collector · linux (pull_request) Has been cancelled
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Has been cancelled
standards workspaces build + test / which workspaces this change touches (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Has been cancelled
joule-moq-room room service / joule-moq-room, every target (pull_request) Has been cancelled
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Has been cancelled
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Has been cancelled
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Has been cancelled
joule-code conformance gate / joule-moq-relay, every target (pull_request) Has been cancelled
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Has been cancelled
energy meters on real hardware / sink decode table · RAPL on jetson-hub (NVML surveyed) (pull_request) Has been cancelled
energy meters on real hardware / sink decode table · per-task energy and the GPU rail on macOS (pull_request) Has been cancelled
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (pull_request) Has been cancelled
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Has been cancelled
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Has been cancelled
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]>
2026-10-26 18:18:23 -04:00
Transaction Science
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]>
2026-10-26 18:18:16 -04:00
Transaction Science
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]>
2026-10-26 18:18:07 -04:00