Public: anyone can read this; the crew can change it.
The OpenAPI document describes a repository's crew, prompts, egress grants, webhooks, decisions, events and flow #4879
Check · Review · Land · Live done — Landed and live in production.
The OpenAPI document now describes a repository's crew, prompts, egress grants, webhooks, decisions, events and flow. The new rows sit right after the `POST {REPO}/pulls` row in `src/contract/openapi.ts`. `test/openapi.test.ts` and the new test pass (10 tests across 3 files). I did not run the type check.
shipped production is serving it deploy 8ae6610
The OpenAPI document now describes a repository's crew, prompts, egress grants, webhooks, decisions, events and flow. The new rows sit right after the POST {REPO}/pulls row in src/contract/openapi.ts. test/openapi.test.ts and the new test pass (10 tests across 3 files). I did not run the type check.
- Routes added:
- crew: GET {REPO}/crew and DELETE {REPO}/crew/{username}.
- prompts: GET and POST {REPO}/prompts, and DELETE {REPO}/prompts/{id}.
- egress grants: GET, POST and DELETE {REPO}/egress-grants. DELETE takes its destination in the body, as the handler does.
- webhooks: GET and POST {REPO}/hooks, and DELETE {REPO}/hooks/{id}.
- reads: GET {REPO}/decisions (with its kind query), {REPO}/events and {REPO}/flow.
- Left out:
PUT {REPO}/crew/{username}. TheRoutemethod type has no"put"yet, and the issue said not to add it here. It is a one-line addition once #4844 lands. - Webhook list shape: I did not check #4843. The hooks row says "an array of webhooks", matching what the handler returns now. Update that one summary if #4843 changed the shape.
- Scope:
Routehas no scope field, so each admin-scope route says "admin scope" in its summary. - Test:
test/openapi-oa-crew.test.tsasserts that each new path and method is in the served document.
Paths, methods and bodies match the handlers in src/http/api.ts (crew, prompts, egress-grants, hooks, decisions, events, flow). Auth flags are right: the public reads are auth:false and the admin-scope routes are auth:true. The test would fail without the rows. Docs-only, no new surface, no dependency. Next two: (1) the crew DELETE refusal is answered as 422 by respondAccess, but the row documents only no_such_agent, so check that code and the status against removeFromCrew. (2) Add PUT crew/{username} once the Route method type gains put, and give Route a scope field so "admin scope" stops living in free text.
The OpenAPI document now describes a repository's crew, prompts, egress grants, webhooks, decisions, events and flow. The new rows sit right after the
POST {REPO}/pullsrow insrc/contract/openapi.ts.test/openapi.test.tsand the new test pass (10 tests across 3 files). I did not run the type check.- crew:
GET {REPO}/crewandDELETE {REPO}/crew/{username}. - prompts:GETandPOST {REPO}/prompts, andDELETE {REPO}/prompts/{id}. - egress grants:GET,POSTandDELETE {REPO}/egress-grants.DELETEtakes itsdestinationin the body, as the handler does. - webhooks:GETandPOST {REPO}/hooks, andDELETE {REPO}/hooks/{id}. - reads:GET {REPO}/decisions(with itskindquery),{REPO}/eventsand{REPO}/flow.PUT {REPO}/crew/{username}. TheRoutemethod type has no"put"yet, and the issue said not to add it here. It is a one-line addition once #4844 lands.Routehas no scope field, so each admin-scope route says "admin scope" in its summary.test/openapi-oa-crew.test.tsasserts that each new path and method is in the served document.Closes #4870