# Curbi v32 — agents can export regressions over MCP

New read-only MCP tool **`export_regression`**. It takes exactly `policy_check`'s input, runs the same check on the server, and returns:
- `curbi.regression` JSON;
- a dependency-free `node:test` file;
- the command to run it.

The output is byte-identical to the site's "Download runnable test". Expectations always come from the checker, never from the caller. Other properties:
- Inputs are validated exactly like `policy_check`.
- Duplicate case ids and other API versions are refused, so a replay can never pair the wrong result.
- Nothing is stored.

The Worker is rebuilt from the current `v27/mcp-handler.mjs` by `v32/build.mjs` (pinned esbuild). The rebuild is a byte-for-byte fixed point.

The tool appears in the /mcp/ tool reference and live console, and in the agent start block on / and /mcp/ ("Four read-only tools").

## Evidence
- **`v32/site.test.mjs`:** 6 tests.
  - The export is byte-identical to the site download.
  - An exported test runs against the rebuilt Worker: it passes as generated (4/4) and fails on drift.
  - Caller-supplied expectations are rejected, and the input rules match `policy_check`.
  - Read-only annotations; repeated calls give identical output.
  - The official MCP SDK can call the tool.
  - The tool is documented on the site.
- **Mutation check:** 5/6 tool defences killed. The 6th is equivalent: the checker rejects caller expectations upstream.
- **All layer, v27 MCP and review review suites:** 81/81. The review three exact tool-list assertions were updated only to add the authorized tool.
- **Full site suite:** no new failures. The full build is a fixed point.
- **Browser:** the /mcp/ live console calls `export_regression` and receives the test file.
- **Known local limit:** #149 is source-only. Its new /check/ and /api/ hand-off, `res.curbiCheck` and `data-checked-reply`, needs the canonical build. Without it, /check/ actions and /api/ marks don't render in a local v28-chain build, with or without v32 (verified on #149's head).
