Generated from
workers/api/src/api-route-contract.ts. Do not edit this file by hand. Runnpm run docs:generateafter changing the route contract;npm run docs:checkrejects stale output.
Path parameters are shown with a leading colon. Query parameters do not change route authorization. The two latest evidence routes accept ?optional=true and return 204 when no current artifact exists.
Access labels distinguish public health, operator-session verification, capability-scoped operator routes, signed target ingestion/workspaces, and execution-scoped signed repository callbacks.
| Method | Route | Access | Purpose |
|---|---|---|---|
| GET | /api/health |
public | Report service, build, and live-reasoning availability. |
| GET | /api/auth/session |
operator session | Validate an operator credential and return its capabilities. |
| GET | /api/genome |
operator: inspect_evidence | Return the evolution cycle and repository execution history. |
| GET | /api/genome/:executionId |
operator: inspect_evidence | Return one complete repository execution record. |
| GET | /api/observations/archives |
operator: inspect_evidence | Return retained evidence and analysis summaries. |
| GET | /api/observations/archives/:archiveId |
operator: inspect_evidence | Return one complete evidence and analysis archive. |
| GET | /api/operations/metrics |
operator: inspect_evidence | Return aggregate telemetry and security counters. |
| GET | /api/diagnostics |
operator: inspect_evidence | Return bounded operational audit events and provider metrics. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| POST | /api/retention/sweep |
operator: delete_data | Run the bounded retention and compaction sweep. |
| DELETE | /api/studies/:studyId/participants/:participantId |
operator: delete_data | Delete one participant and invalidate derived evidence. |
| DELETE | /api/studies/:studyId |
operator: delete_data | Delete one study and its derived artifacts. |
| DELETE | /api/repository-executions/:executionId/artifacts |
operator: delete_data | Delete one execution artifact bundle and callback material. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| GET | /api/target-connection |
operator: observe | Return the verified ProjectFlow connection or 204. |
| POST | /api/target-connection |
operator: connect | Verify and persist the configured target boundary. |
| POST | /api/target-connection/disconnect |
operator: connect | Remove the active target connection. |
| GET | /api/demo/reset |
operator: observe | Return the latest verified reset lifecycle or 204. |
| POST | /api/demo/reset |
operator: delete_data | Clear Darwin demo state and dispatch target restoration. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| POST | /api/study-sessions |
signed target | Issue a short-lived study session bound to signed ProjectFlow context. |
| POST | /api/telemetry/events |
signed target | Ingest a signed batch of semantic telemetry events. |
| GET | /api/studies/:studyId/events |
operator: observe | Return aggregate measured study counts. |
| GET | /api/studies/:studyId/events/raw |
operator: inspect_evidence | Return recent pseudonymous event records. |
| GET | /api/studies/:studyId/sessions/:sessionId |
operator: inspect_evidence | Return one ordered measured session trace. |
| GET | /api/studies/:studyId/participants/:participantId/workspace |
signed target | Return an anonymous participant workspace. |
| PUT | /api/studies/:studyId/participants/:participantId/workspace |
signed target | Replace a validated anonymous participant workspace. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| POST | /api/studies/:studyId/evidence |
operator: reason | Build and persist deterministic measured evidence. |
| GET | /api/studies/:studyId/evidence/latest |
operator: inspect_evidence | Return the latest current-cycle evidence pack. |
| POST | /api/studies/:studyId/analyse-evidence |
operator: reason | Invoke and cache live evidence-citing GPT reasoning. |
| GET | /api/studies/:studyId/evidence-analysis/latest |
operator: inspect_evidence | Return the latest current-cycle analysis. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| GET | /api/evidence-analyses/:analysisId/codex-manifest |
operator: inspect_evidence | Return the immutable implementation manifest. |
| POST | /api/evidence-analyses/:analysisId/codex-manifest |
operator: execute | Build a manifest for the human-selected mutation bundle. |
| GET | /api/evidence-analyses/:analysisId/codex-manifest/execution |
operator: inspect_evidence | Return the manifest execution or 204. |
| POST | /api/evidence-analyses/:analysisId/codex-manifest/execution |
operator: execute | Dispatch the bounded ProjectFlow mutation workflow. |
| GET | /api/repository-executions/:executionId |
operator: inspect_evidence | Poll the real repository execution state. |
| POST | /api/repository-executions/:executionId/recovery/force-fail |
operator: execute | Force-fail a stranded execution after its recovery window. |
| GET | /api/repository-executions/:executionId/fitness |
operator: inspect_evidence | Return the persisted measured fitness outcome or 204. |
| POST | /api/repository-executions/:executionId/fitness |
operator: reason | Calculate and persist fitness from compatible measured cohorts. |
| POST | /api/repository-executions/:executionId/release |
operator: release | Merge the reviewed mutation pull request. |
| POST | /api/repository-executions/:executionId/rollback |
operator: execute | Dispatch the controlled rollback workflow. |
| POST | /api/repository-executions/:executionId/rollback/release |
operator: release | Merge the reviewed rollback pull request. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| GET | /api/repository-executions/:executionId/manifest |
signed callback | Let the signed workflow retrieve its execution manifest. |
| POST | /api/demo/reset/:resetId/callback |
signed callback | Apply a signed baseline-reset workflow transition. |
| POST | /api/repository-executions/:executionId/callback |
signed callback | Apply a signed mutation execution transition. |
| POST | /api/repository-executions/:executionId/rollback/callback |
signed callback | Apply a signed rollback execution transition. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| GET | /api/behavioural-evals |
operator: inspect_evidence | List retained outcome-based behavioural acceptance tests. |
| POST | /api/lab/experiments/:experimentId/promote-eval |
operator: execute | Promote an automated Lab failure into a retained behavioural eval. |
| POST | /api/lab/experiments/:experimentId/rerun-eval |
operator: simulate | Rerun a retained behavioural eval through the bounded browser runner. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| GET | /api/lab/experiments |
operator: inspect_evidence | List bounded automated task populations against ProjectFlow. |
| POST | /api/lab/experiments |
operator: simulate | Create a configurable real-target Darwin Lab task. |
| GET | /api/lab/experiments/:experimentId |
operator: inspect_evidence | Inspect one automated population, evidence pack, and analysis. |
| PUT | /api/lab/experiments/:experimentId |
operator: simulate | Edit a draft task before any target interaction begins. |
| POST | /api/lab/experiments/:experimentId/duplicate |
operator: simulate | Duplicate a task into a new immutable draft identity. |
| POST | /api/lab/experiments/:experimentId/cancel |
operator: simulate | Cancel a draft, queued, or running population. |
| POST | /api/lab/experiments/:experimentId/retry |
operator: simulate | Retry failed work under a new experiment identity. |
| POST | /api/lab/experiments/:experimentId/force-fail |
operator: simulate | Force-fail a stranded population while preserving its runs. |
| POST | /api/lab/experiments/:experimentId/archive |
operator: simulate | Archive terminal Lab work without deleting its provenance. |
| POST | /api/lab/experiments/:experimentId/rebuild-evidence |
operator: execute | Retry deterministic evidence after a recorded derivation error. |
| POST | /api/lab/experiments/:experimentId/start |
operator: simulate | Queue a draft experiment for the browser runner. |
| POST | /api/lab/experiments/:experimentId/claim |
operator: simulate | Claim queued real-target work for one runner. |
| POST | /api/lab/experiments/:experimentId/runs |
operator: simulate | Start one isolated automated browser run. |
| POST | /api/lab/experiments/:experimentId/runs/:runId/actions |
operator: simulate | Append one bounded semantic agent action. |
| POST | /api/lab/experiments/:experimentId/runs/:runId/finish |
operator: simulate | Finish a run and finalize population evidence when complete. |
| POST | /api/lab/agent-decision |
operator: reason | Ask the configured low-cost model for one bounded UI action. |
| POST | /api/lab/experiments/:experimentId/analyse |
operator: reason | Run one GPT population analysis over Darwin Lab evidence. |
| POST | /api/lab/experiments/:experimentId/mutations/select |
operator: execute | Record the human-approved Darwin Lab implementation brief. |
| POST | /api/lab/experiments/:experimentId/codex-manifest |
operator: execute | Prepare an immutable ProjectFlow manifest carrying Darwin Lab provenance. |
| Method | Route | Access | Purpose |
|---|---|---|---|
| POST | /api/simulations |
operator: simulate | Run the deterministic 10,000-event synthetic replay. |
| GET | /api/simulations/:runId |
operator: inspect_evidence | Return synthetic replay metadata. |
| GET | /api/simulations/:runId/summary |
operator: inspect_evidence | Return deterministic synthetic aggregates. |
Contract total: 68 method/path entries.