/** * Workspace review surface — the approve/revert half of the allow-all gate. * * Two routes, one concern: exposing what a settled ask run changed in the * workspace and letting the user REJECT it. * * - `GET /api/p/:slug/runs/:runId/changes` — the run's settle-time diff * against the spawn-time snapshot: `{ runId, settled, changes }`. Unknown * runs answer 404 RUN_NOT_FOUND (the ask route's code); live runs answer * `settled: false` with no changes; settled runs read the changes manifest * the write-back wrote beside the run's event log. An absent manifest (a * failed/absent snapshot, a run that changed nothing) reads as an empty * list — the panel shows no card. * * A client should POLL this route rather than read it once on the end * frame: the settle stamps `settled: true` first and the diff sidecar * lands a beat later (the write-back diffs AFTER the settle, best-effort), * so the first settled read may still be `changes: []` — empty is also * what a no-change run settles to, which is why polling until the list is * non-empty is the readiness signal, and an empty list that stays empty is * the "nothing changed" answer. * - `POST /api/p/:slug/runs/:runId/revert` — restores the workspace to the * snapshot for THIS run's changes and marks the run record reverted so a * second revert is refused (409 RUN_ALREADY_REVERTED). Refuses while the * run is still live (400 RUN_NOT_SETTLED — a claim in flight may still be * writing) and for unknown runs (404 RUN_NOT_FOUND). * * Revert is strictly scoped: only the paths in this run's own changes * manifest, resolved through the snapshot's root — never a bare `git clean`, * never a walk, and never a path the snapshot predates. The diff/revert * machinery itself lives in run-diff.ts; this module only frames it as HTTP. */ import { Hono } from "hono"; export declare const changesRoute: Hono; //# sourceMappingURL=changes.d.ts.map