API Endpoints
Any node with the ingress role (api.port > 0 in Tier A) serves the Crewlet API. A node has every role by default and runs it beside the agents in one process; a node with -roles data,ingress serves only these routes and reaches the rest of the fleet over the event stream. The routes are identical either way.
A node without ingress still binds api.port, and serves the network only its two probes there, /health and /ready: see Probes on a node without ingress. An executor run in a box that does not share its node’s loopback reaches its tools through an ingress node’s tool bridge, which relays each call to the node holding the seat; a direct run on its own host dials it on loopback, where it serves the bridge to its own host alone.
Nothing to install: the API is compiled into the binary, with the dashboard and the WebSocket that is the dashboard’s data plane (see WS /ws/stream).
Which listener serves what
Section titled “Which listener serves what”Every route is served on api.port, unless the node’s Tier A sets api.public.port. Then the routes outside parties call (authenticated by a provider signature or a signed per-run token, never an operator credential) move to that listener and are served nowhere else:
| Prefix | Who calls it | Without api.public | With api.public |
|---|---|---|---|
/webhooks/* | Vendors (deliveries, the MCP sign-in’s client metadata document) and a person’s browser returning from a vendor’s app flow or sign-in (/webhooks/slack-oauth, /webhooks/github-app, /webhooks/mcp-oauth) | api.port | api.public only |
/otlp/{token}/v1/{signal} | A box exporting its executor’s telemetry | api.port | api.public only |
/mcp/{token} | A seat’s executor run, in its box, calling the seat’s tools, each of its MCP servers (/mcp/{token}/server/{server}), polling its turn’s notes (/mcp/{token}/steer/{notes,read}) and reporting each skill it loads (/mcp/{token}/skill); and its box’s browser relay posting the browser’s screen (/mcp/{token}/browser/{frame,state,checkin,poll}) | api.port | api.public only |
/box/git/* | A box’s git, with its run’s own token as git’s Basic password (Coding boxes) or its check’s (Check boxes); mounted where gitlet is among the node’s roles | api.port | api.public only |
/box/gitlet/* | A check’s box reading the commit its check measures, with its check’s token (Check boxes); mounted where gitlet is among the node’s roles | api.port | api.public only |
/git/*, /gitlet/* | A person’s git client, with their own token; the CLI | api.port | api.port only, never published: the credential is a person’s own token (Gitlet) |
/operate/* | Whatever runs the engine, with the operate grant (/operate/*) | api.port | api.port only, never published |
Everything else: /health, /ready, /, /dashboard, /favicon.ico, /static/*, /auth/*, /iam/*, /ws/stream, /ws/dictation, /query/*, every REST read, /config, /secrets, /setup, /operator/*, /backup, the /worklet/* and /fleet/* gestures | People, the dashboard, the CLI, orchestrators | api.port | api.port only |
A public route asked of api.port answers 404 no_route with a hint naming api.public (the caller is on the operator’s own network, likely a vendor with the wrong port). Every other route asked of the public listener answers exactly what an unserved path answers (the same 404 no_route, the same generic hint), so the published socket reveals nothing of the admin routes. It decides before the guard runs and asks for no credential, so a guarded route there is that 404 whatever credential is sent. The probes are deliberately not public (/health describes the node to whoever runs it): point every health check at api.port. A node without ingress serves the network only its probes on api.port, on either listener, plus the routes its own boxes dial on its host’s loopback; with api.port 0 it serves nothing. See Deployment → Exposing webhooks without the admin API.
Request timeouts
Section titled “Request timeouts”Three deadlines bound a request on every route, each covering a phase the others do not. None is configurable.
| Phase | Bound | What it stops |
|---|---|---|
| Request line and headers | 10 s | A connection opened and left silent. |
| Reading the request body | 30 s | A client that dribbles a body under every size cap a few bytes at a time (a cap alone stops only the other failure). 30 s carries the largest other body, a 25 MiB webhook delivery, at about 7 Mbit/s. A project file’s upload is the one exception: it streams up to a gibibyte, so it is held to thirty seconds for each mebibyte (see Project files). |
| Between keep-alive requests | 60 s | A client that finished a request and went quiet while holding its connection slot. |
A body that misses its deadline fails like any truncated delivery: 400 unreadable_body (logged as webhook_body_unreadable on a webhook path). There is no whole-request timeout: it would have to fit the largest body on the slowest link, bounding nothing on a small one. Long-lived responses, WS /ws/stream above all, bound themselves.
Every refusal is one envelope
Section titled “Every refusal is one envelope”A refused request, on any route and surface and whatever the status, is one JSON object with the same three parts:
{ "error": "no_external_url", "message": "No external address is set. Set `api.external_url` in this node's config file and restart.", "config_path": "api.external_url", "hint": "Set the HTTPS address third-party apps reach this deployment on; without it the pass can register no webhook."}erroris the code, and the only thing to branch on. One closed vocabulary (internal/api/httpjson) is shared by every surface, so a failure has one name everywhere: a413isbody_too_largefor a config document, a secret value or a webhook delivery, and an unserved query isunknown_queryover the WebSocket and its REST twin. Never parse the message.messageis one sentence for a person, product copy the dashboard renders verbatim. It belongs to the code, not the call site; a route with more to say puts it in the detail. A code whose refusals have different remedies picks its sentence by the facts the detail carries:unauthorizedsays the rule itsreasonnames (below); a503unavailableoridentity_unavailablewith noRetry-Aftersays waiting won’t change it, and under aRetry-Aftersays to try again in a moment (a write whoseoutcomeisunknownkeeps the code’s own sentence, since it may have landed). Never match on it: the wording can change. Every refusal carries one,/config,/secrets,/setupand every/webhooks/*route included (noinvalid signaturecode with a space, no{"status": "unavailable", "reason": …}shape; see Webhook refusals).- Everything else is the detail: machine-readable facts about this refusal as typed JSON beside the two reserved keys, not nested:
config_pathandhintabove,fieldson an integration missing values,current_revision_idon a lost update,problemson a refused configuration document. Values keep their types (a count is a number, located problems a list). The text keysdetail(what happened) andhint(what to do) are sentences: a capital first letter, unless the text opens with a field name, flag, path, address or Go package prefix (statelog: …), and a full stop. The WebSocket’s error frames writedetailthe same way. - A
503says when, or says it will not help. A503that waiting clears (a node behind its log, an unreachable coordination store, a write whose outcome is unknown, an integration another pass holds:surface_busy) carries aRetry-Afterin seconds, derived from the refusal where it knows (a node behind its log estimates from its backlog) and a few seconds otherwise. A503no wait changes carries NONE, and the detail names what to do instead. That is a state-log refusal waiting cannot clear on THIS node: a node evicted from the fleet, one holding a record it cannot decode, a log at its byte ceiling (log_full), a record larger than the broker takes in one message (record_too_large), one the broker refused for its own reason (broker_refused), a deleted object. It applies on every surface that answers one with a503(/worklet,/doclet/pages,/chatlet,/artifactswith its datastore’s/artifacts/{id}/data,/artifact-folders,/brand,/operator/act,/iam,/auth,/config,/setup,/secrets,/assistant, and every question the query registry answers,/query/{what}and its named read routes). The same request is refused however often sent: ask another node, split the change, or have an operator readmit, upgrade or resize; never poll this one. The detail says which, in a sentence for the reader (asking them to try again in a moment exactly where aRetry-Afteris sent), never in the refusal’s own text (positions, settings, the broker’s words), which goes to the node’s log./operator/act, and the human write surface’s tool-backed routes and tool-less verbs, carry no detail (ADR-0060): the code’smessagestands alone beside the header. Read consistency says what each asks of whom. - A write that may have landed is not a refusal, and says so as a field. A
503about a write this node cannot account for carries"outcome": "unknown"and theop_idto retry under, on every surface that writes through a state log (/worklet,/doclet/pages,/chatlet,/artifactswith its datastore’s/artifacts/{id}/data,/artifact-folders,/brand,/operator/act,/iam,/auth,/assistant). A503withoutoutcomeis a refusal and wrote nothing: a gesture refused partway lists what landed before it aslanded, and a/setupsubmission the credentials it sealed first (below). The two send a client opposite ways: retry the unknown under the sameop_id, never a fresh one, which would make the change twice if the first landed. Branch on the field, not the sentence. The routes that read noIdempotency-Key(a token’s mint, every/authgesture) are the exception thedetailnames: there theop_idfinds the attempt in the trail, and the retry is the gesture asked again. Where this node’s operation ledger cannot vouch for the operation it also carries"unvouched": trueand noRetry-After: the same request here answers the same way until the change reaches this node, so send it, with the sameop_id, through another node.outcome,op_idandunvouchedare the answer’s own and no route’s detail displaces them. The config surface and a/setupsubmission carry no operation, so their unknown has noop_id: it names the revision stored and thenodewhose history alone holds it, and the pointer says whether it landed; it is not sent again either (see/config’s status codes). A/setup503withoutoutcomeleft the company document as it was, but names the credentials it sealed before the refusal aswrote_secrets, and the one whose write the store did not answer (it may have landed) asunanswered_secret. Its remedy is the plain503’s: send the submission again as it stands, which rewrites every credential in it by name. - A
500 internal_errorcarries no reason. Its sentence says the reason is in this node’s log: a fault’s own words are a store’s or driver’s (a database path, a connection string), and holding a permission does not make a caller someone they are meant for. A route may say what the request carried and what already landed (/iamdoes, beside the code), never what failed underneath.
error and message are RESERVED: a route’s detail can never displace them.
Two shapes sit outside this envelope. A WebSocket query answer is a frame, {"kind": "error", "id", "what", "error"}, with no message: the client switches on the value and the dashboard holds each code’s sentence (see WS /ws/stream). A refusal on authority is the exception: its frame carries the same reason and grants as the REST envelope, under the same keys. And routes that are not JSON at all (the dashboard shell, the Slack OAuth landing) answer as what they are.
While a node is starting
Section titled “While a node is starting”crewlet run binds api.port (and api.public and api.artifacts, where served) as soon as it has read and checked its Tier A, before it opens its store, and logs api_bound. A port someone else holds fails the boot at once, naming the address. Until the node’s own surface takes the socket over (logged as api_listening, or api_probes_listening on a node without ingress), it answers its probes and tells a caller to come back for any route it will serve, and only for one it will serve:
| Request | While the node starts | Why |
|---|---|---|
GET /health, on api.port | 503 while the node recovers what it holds, then 200, status: "starting" both times | The 503 is what a startup probe sized for the node’s store (and, on a fleet’s data node, for the join it may make) bounds; nothing after the recovery holds it. See the phases below. |
GET /ready, on api.port | 503, reason: "starting" | The node takes no traffic until it serves, so no load balancer or rollout counts it. |
| A route this listener will serve | 503 starting, with Retry-After: 10 | The caller is told to come back instead of meeting a refused connection, which reads as a node that is not there. On an ingress node that is every route of Which listener serves what on its listener; a node without ingress serves the network no route but its probes, and one that runs seats tells a caller on its own host’s loopback to come back for /mcp/ and /otlp/, the routes its boxes dial (a direct run outlives its node’s restart and calls back while it starts). |
A request on the artifact origin (api.artifacts) | An empty 503 with Retry-After: 10 for a ticketed path, the runtime or the kit, and the empty 404 or 405 the origin gives anything else | The origin’s refusal under its own inert headers, never a JSON body an artifact page could read. |
| Anything else | The 404 that listener answers once the node serves | A socket says no more while starting than afterwards, and nobody waits for a route this node never serves. On api.public: the router’s 404 no_route, probes included. On api.port of an ingress node with api.public set: the 404 naming api.public for a route outside parties call. On api.port of a node without ingress: the router’s 404 for every path but the two probes and, from its host’s loopback on a node that runs seats, its boxes’ two routes (once serving, its guard answers 401 for a path that asks for a credential). |
Nothing here asks for a credential, since nothing served could be unlocked. Every answer carries the node’s security headers, and on an ingress node its CORS permission, so a dashboard on an origin api.auth.allowed_origins lists reads starting rather than a network error; a path with a dot segment is refused 400 non_canonical_path as always.
/health names how far the boot has got:
{ "status": "starting", "node": "core-1", "version": "v0.4.0", "phase": "recovering"}phase | /health | What the node is doing |
|---|---|---|
recovering | 503 | Opening and recovering what it holds: its store and that release’s schema migrations, the embedded broker’s file store and listeners, JetStream catching up with peers (or, on a node without data, its leaf link to a member), the streams and buckets it provisions, the batches of a stateless node’s events its event log left unsettled, the replicated estate and its state logs, and a joining node’s snapshot. It takes as long as the store is large, and on a fleet’s data node whose rows the logs can no longer bring level, as long as fetching a peer’s snapshot of the whole replicated estate takes (budgeted by stream.tracker_retention.rejoin_window, projected by crewlet retention status; a lone data node never fetches one). The deployment bounds it with a startup probe: see Sizing the startup probe. A join logs statelog_join_progress every ten seconds while it transfers. It ends with engine_recovered in the log. Applying the state logs is not part of it: that catches up in the background, and what waits for it is the node’s first seat, never /health. |
preparing | 200 | Bringing up what its company configures: the snapshot of the company’s secrets its ${VAR} references resolve from, the company built from its document, shared MCP servers, sandboxes, Worklet, Doclet and Chatlet, the harnesses’ credential bundles, the first apply of the revision it boots on, and the dashboard’s projection. None holds a probe. A part that waits on something else is bounded by its own setting (a tool server by its startup_timeout_seconds), but the first apply has no deadline beyond its parts’, so a part that never returns leaves the node here with /ready naming starting, and nothing restarts it: watch for a node that stays unready (see Sizing the startup probe). So does a secret store that does not answer: the node builds no company from the environment alone, and asks again, logging secret_store_unreadable, until it answers. A value its keyring cannot open ends the boot instead, naming the secret. |
Every field of that body is a field of the health envelope under the same name, so a script reads one shape whichever answered. It omits every fact about a running engine (queue, seats, posture, applied epoch, started_at), since a zero would be a fiction. The envelope carries no phase: the node answering it is serving.
/ready says the same in its own shape:
{ "ready": false, "node": "core-1", "configured": false, "draining": false, "posture": "", "reason": "starting"}configured is false because no revision is active in this process yet, whatever its store holds, and posture is empty because nothing has concluded one. A route the node will serve is refused in the engine’s envelope:
{ "error": "starting", "message": "This node is still starting and is not serving yet. Try again in a moment.", "detail": "This node is recovering what it holds (its store, its broker and its copy of the estate) and serves nothing until it has started.", "hint": "Retry after the Retry-After: once the node serves, /health stops answering status \"starting\" and /ready stops naming reason \"starting\"."}A node told to stop before it serves (a signal during the boot) answers a drain’s answers as far as it can: /health says status: "shutting_down" but keeps its phase’s status code (503 while it recovers, since a stop does not cut a recovery short and the startup probe still bounds it, 200 after), /ready answers reason: "draining" and draining: true, and every route it would have served answers 503 draining with the drain’s Retry-After of 30 seconds.
During a drain
Section titled “During a drain”A node told to stop (SIGTERM, or Ctrl+C once) keeps serving HTTP for the whole of its drain and closes its listener only once the drain completes. From the drain’s first moment it takes only some requests:
| Request | During a drain | Why |
|---|---|---|
GET /health | 200, status: "shutting_down" | Liveness. An orchestrator that could not reach the node would kill it mid-turn. |
GET /ready | 503, reason: "draining" | Takes the node out of rotation so traffic moves to a peer. |
Every other read (GET, HEAD, OPTIONS): the dashboard, the REST reads, /query/*, /ws/stream, a check’s box’s reads of its commit (/box/gitlet/*) | Served | A read starts nothing, and it is how the drain is watched. |
/mcp/{token} (its MCP servers, notes route, skill route and browser routes included) and /otlp/{token}/v1/{signal} | Served | They carry the tool calls, notes and spans of executors launched before the drain. An executor in its box outlives the turn segment that launched it, so the drain never waits on one; refusing these would shorten no drain and only break an executor mid-flight. A tool call whose executor’s seat is held by another node is relayed there, as outside a drain. |
A git fetch already begun: POST /git/{repo}/git-upload-pack | Served, and finished before the listener closes | The upload POST continues a fetch whose advertisement was answered before the drain, on this node or a peer (git keeps no state between an exchange’s requests); refusing it would break the fetch half done. It is the one request under /git/ a draining node serves. A box’s POST /box/git/{repo}/git-upload-pack (a coding box’s or a check’s) is the same request, served the same. |
A new git fetch: GET/HEAD /git/{repo}/info/refs asking for git-upload-pack (or no service) | 503, text/plain | The advertisement begins every fetch, and a fetch runs git’s upload-pack here after syncing the repository from the object store: new work the shutdown would wait out. Refused at its first request, a clone fails at once and is retried against a peer rather than cut part way. A box’s under /box/git/ (a coding box’s or a check’s) is the same. |
A download: GET /git/{repo}/-/raw, GET /git/{repo}/-/archive.zip | 503, text/plain | New work: a sync and a git process on the transfer lane. One begun before the drain finishes before the listener closes. |
A git push: GET/HEAD /git/{repo}/info/refs asking for any other service, POST /git/{repo}/git-receive-pack, and every other path under /git/ but the two downloads | 503, text/plain | Every request of a push is refused, its advertisement included, because the GET is where git prints the reason (remote: this node is draining …); on the POST it prints only RPC failed; HTTP 503. In git’s own form, not the JSON below, which git prints as nothing. A coding box’s push under /box/git/ is refused the same. |
Every /operate/* route, writes included | Served | The operate grant’s holder runs the drain itself: a backup after it is the copy to roll back to, and the stop of every box ends what the drain does not wait for (Operating an engine). |
Every /webhooks/* route, whatever its method | 503 | A delivery is new work, and one of the two GET landings acts: the GitHub App return seals a credential and writes a config revision, and an install arrival asks the reconcile loop for a pass. The Slack OAuth landing only renders a page and is refused with the rest, since a per-route carve-out is what refusing by default avoids. |
Every other write: /config, /secrets, /setup, /backup, the /worklet/* writes, POST /operator/mcp, POST /operator/act/{tool} | 503 | Each starts work or changes the company the drain is leaving. Refusing by default keeps a later write route from slipping through. POST /secrets/reveal rides with them although it changes nothing (it is a POST so the names travel in a body), and the CLI run asking it is told to try another node, as for a write. |
/operator/mcp serves only POST: it is served statelessly with no session, so there is no GET stream to open or session to end. Every JSON-RPC call it carries, reads and a new listening stream included, is refused with the writes (telling a listing from a filed task would mean reading the body, the per-route carve-out refusing by default avoids). An assistant asking a draining node is told to retry elsewhere, like the dashboard. A stream an assistant opened BEFORE the drain is kept for the whole drain and goes on hearing every other node’s rebuild of its tools (/operator/mcp), since ending it would cut off, for the drain’s whole length, a client that opens no new stream (the Go SDK’s does not). It is answered, and so ends, as the listener starts to close, so it never holds the listener’s five seconds. /mcp/{token} is not split: the whole prefix is served, since an executor’s tool calls are the one thing on this listener the node must not break.
A refusal is 503 with a Retry-After of 30 seconds, long enough for a load balancer following /ready to have moved traffic to a peer, and a body the CLI and dashboard both render, everywhere but /git/*, whose refusal is the one text/plain line this node is draining for a shutdown and begins no new fetch or push: retry in 30 s, against another node or once it has restarted (a download’s says begins no new download):
{ "error": "draining", "message": "This node is shutting down and is not taking new work. Try another node, or this one once it has restarted.", "detail": "This node is draining for a shutdown: the turns already running finish, and nothing new is started here.", "hint": "Retry against another node, or once this one has restarted; /ready answers 503 for as long as the drain lasts."}A write still needs its token first: an unauthenticated write answers 401 whether or not the node is draining. A request already running when the drain began is cut only if still running five seconds after the listener starts to close; except an assistant’s listening stream and a person’s stream of a seat’s browser (ended draining, one opened after it too), each answered the moment the listener starts to close, and a connection that has sent no request, closed then, so api_shutdown_failed keeps meaning a request was stuck.
A git request is finished, not cut. A clone or push cut part way restarts from nothing against a peer, so every rolling restart would pay twice, and five seconds is a REST read’s grace, not a transfer’s. So once the turns have finished, and before the listener starts to close, the node waits for every git request it is serving: a push, fetch or download running when the drain began, and a fetch’s upload POST served during it. Because git keeps no state between an exchange’s requests, it then goes on listening five seconds after the last of them ends (git’s own keepalive interval, many times the pause between two requests of one exchange), so a fetch between rounds does not face a closed port. The drain begins no fetch or push, but serves every upload POST that reaches it (a fetch begun on a peer, which a load balancer keeps sending here until it acts on /ready, or under Kubernetes until the pod leaves its Service’s endpoints), so the wait can grow and ends once that traffic has moved and what was running is done. The deployment guide’s preStop sleep shortens that window. The node logs git_draining with the count when there is something to wait for and git_drain_complete when done. Like the wait for the turns, it has no deadline of its own: the supervisor’s kill grace or a second interrupt bounds it (see Graceful shutdown for sizing the grace).
A node with a public listener drains both by this one table (webhooks refused on api.public, sandbox endpoints served there), and closes api.public first, then api.port, each with its own five seconds, so /health answers until the very end even while an open bridge session holds the public listener for its whole grace.
A request nothing serves, and an answer with no code
Section titled “A request nothing serves, and an answer with no code”The envelope covers a request nothing serves as well as a route’s refusal: 404 no_route for a path this build does not have or this node does not serve now (such as POST /worklet/items/{key}/purge on a company that does not run Worklet), and 405 method_not_allowed for a path this build’s routes take under other methods. Both carry a detail naming the method and path; the 405 carries an Allow header naming the methods this build’s route table holds for the path, which does not promise this node serves them now: a route it does not serve now still answers a wrong method 405, and then 404 no_route under the methods Allow named.
The CLI and dashboard rely on it. A non-2xx answer with no code was written by something in front of the node (most often a reverse proxy’s read timeout) and says nothing about what the node did, so a write that meets one is reported as unknown, with the operation id to finish it under, not as refused. A refusal from the node means nothing was done.
Every answer the node’s API writes carries X-Crewlet-Engine: 1: a route’s answer, every refusal, the router’s own 404 and 405, the canonical-path refusal and the 503 starting. A body alone cannot say whose answer it is (a proxy can answer JSON with an error field); nothing in front of the node sets this header. The dashboard and CLI read an answer as the node’s only when it carries both the header and a code, so a proxy’s 401, 403 or 413 is never read as a refused token, a grant to ask for or a smaller document. A proxy must pass the header through unchanged; one that strips it makes every answer read as one the node never gave, so a write’s outcome is reported unknown, never refused. A dashboard on another origin (api.auth.allowed_origins) reads it because the node exposes it to permitted origins (Access-Control-Expose-Headers, beside the ETag, Retry-After and X-Request-Id it reads too); a proxy that rewrites that header must keep X-Crewlet-Engine in it.
Except under /git/*, where the node answers in git’s form. A git client prints a refusal’s body only when it is text/plain (each line as remote: …) and prints the API’s JSON as nothing, so every refusal the node writes there is one text/plain line, no envelope: the guard’s 401 Basic challenge (the auth note under Routes); its 403 for a credential acting as a seat the org chart no longer holds as a human seat, or a session that may only enrol a second factor, and its 503 for a node that cannot tell who the credential is (Retry-After: 2), each the envelope’s sentence; a refusal of the route’s own authority verb, its sentence with the code in brackets after it; a node that serves none of Gitlet now, likewise (git’s smart HTTP); and the drain’s 503 (During a drain). So the inference above (no code means something in front of the node wrote it) holds on every route but /git/*, where the node’s refusal is told from a proxy’s by its own text/plain sentence (authentication required: …, this node is draining …), which git prints to the person who ran the command. /gitlet/*, Gitlet’s REST reads, answers JSON with a code like every other route.
Routes
Section titled “Routes”| Method | Path | Description |
|---|---|---|
GET | /health | Liveness + the engine-health envelope (see below). Stays 200 through a drain (see During a drain); use /ready to steer traffic. Before the node serves it answers a shorter body: 503 while recovering, 200 after (see While a node is starting) |
GET | /ready | Readiness for a load balancer: 503 with reason: "starting" before the node serves (see While a node is starting), then 503 while draining, before the first config revision applies, on a shed or stuck posture, or while this node can no longer route the estate’s reads and writes; 200 otherwise. A 503 names why in reason: draining, unconfigured, shed or stuck, then estate_behind, in that order of precedence. estate_behind also gives a node’s seats back (unserviceable): its calls need another data node (its own copy is out of service) and its view of who serves the estate has been unreadable over 60 seconds. A copy that is merely behind never takes a node out of rotation. The deciding term is logged at debug (ready_withheld_for_the_estate), never in the body. It never reads the fleet’s presence or alarm counts. A node without the ingress role answers a different question here, whether it is doing its work: see Probes on a node without ingress |
GET | /agents | List agent roles, each merged with live state from the in-memory projection (including the in-flight live_calls). Human seats are excluded; they appear only in /org with "kind": "human" |
GET | /agents/{id} | Single agent: handle, agent_id, role (its name), the live overlay (incl. live_calls), and llm_history, the seat’s finished phases newest first, capped at 50. {id} is the seat’s handle (every roster row’s id); a role name is NOT accepted (two seats may share one). A handle no agent seat answers to is 404 |
GET | /agents/{id}/memory | Durable memories (personal, episodic, counterparty, synthesized skills). {id} is the seat’s handle, resolved to the derived agent id the diary is keyed by |
GET | /agents/{id}/memory/episodes/{episode} | One episode whole, ask and account complete (the memory listing carries only their openings; see below) |
GET | /agents/{id}/sessions | The seat’s executor sessions, latest begun first, paged: each turn whose executor captured its harness’s session or read its conversation, how it ended, what it was asked, whether its session is still kept, and whether a relaunch of it (or, once ended, its conversation’s next turn) would continue it. The seat’s trail, audit.seat.read (see below) |
GET | /agents/{id}/sessions/{turn_id} | One turn’s session and a page of its transcript, read from its sealed object as its harness recorded it, redacted; an object that is gone or does not open is an answer saying so (see below) |
GET | /org | The company’s charter and its seat and unit tree, in a public shape with no contact identity, email, credential or deployment setting (see below). Human seats appear with "kind": "human" |
GET | /tools | Registered tools, each with its source (builtin or mcp:<server>; see Where a tool comes from), behavioural annotations, where it delivers, and its input_schema (see below) |
GET | /events | Recent engine events from the event store (limit caps at 400; keyset-paged, see below) |
GET | /events/{event_id} | Single event incl. payload, within the 30-day history (event_history_seconds) like every read of the log: an older event answers not_found, since every data node floors its lookup at the serving node’s horizon (see coverage) |
GET | /events/trace/{trace_id} | All events in one trace, oldest first, capped at 500 |
GET | /tokens/breakdown | Token-spend rollup by phase / model / provider entry / worker / seat: the live 24 hours, or any window of up to 90 company days from the replicated usage domain (see below) |
GET | /tokens/series | The same spend with a time axis: one bucket per company day or ISO week, split into bands (see below) |
GET | /tokens/turn-outcomes | Over the same window as /tokens (days, since and until, previous, seat), each agent’s started turns by what woke them (wake, as the turn ledger keys it: schedule:<name>, work_item:<reason>, chat_message:<reason> and the like), with turns and tokens (input, output and auxiliary calls’; the prompt cache is a share of the input, never added), and nothing and nothing_tokens for turns that committed nothing. An executor turn’s outcome and tokens settle when its run is collected, the run’s own writes and model tokens included |
GET | /agents/activity | Every seat’s turns over a window of company days: counts, first-pass rate over reviewed turns, turn-duration quantiles and a day-by-day series (see seat_activity) |
GET | /schedules | Configured role/unit schedules + next-run + the company’s recent fires and what became of each |
GET | /fleet | Every live node, its roles and labels, seat ownership, singleton duties, the fleet’s activation, each node’s config record (revision last attempted, how that went, revision it runs), and where the company’s files are kept with what the object store’s collector last found. Always needs a credential carrying admin (session or bearer): it describes the deployment, not the company, and the dashboard locks its screen (see below) |
GET | /executors | Every seat’s executor the engine still holds a record of, from the executors’ durable record in the coordination store (see below) |
GET | /budgets | Token caps, the durable shared counter they are enforced against (per calendar window), and which scopes are being refused (see below) |
POST | /backup | Copy this node’s store and stream estate into ?dir= on the engine’s host. Takes admin: it writes every credential the company holds to a path the caller names (see below) |
GET | /fleet/broker | The fleet broker’s membership: every live node’s broker kind as its presence advertises it, the JetStream metadata group as a member reports it, and every disagreement (a member gone for good first). Takes admin (see The broker’s membership) |
POST | /fleet/broker/remove/{node} | Remove a member from the metadata group through a live member’s system account. ?confirm= repeats the node id; refused while the node holds a live presence lease as a member unless ?force=true. Takes admin and a recent proof |
POST | /fleet/broker/remove-peer/{peer} | The same removal by the raft peer id GET /fleet/broker shows, for a voter whose name no member has heard. ?confirm= repeats the peer id. Takes admin and a recent proof |
GET | /feeds/dead-letters | Every wake feed’s dead letters (records no node could read in the hour each was handed back), by feed, each entry by the id a discard names and what its feed kept of the record, never its frame; a feed that could not be listed is named with its error. Takes admin (see The wake feeds’ dead letters) |
POST | /feeds/dead-letters/{id}/discard | Give one entry’s wake up for good, whichever feed’s subject holds it. ?confirm= repeats the id; an id no wake feed holds is 404 no_dead_letter. Takes admin and a recent proof |
GET | /integrations | Every inbound surface, how it is wired, whether a signing secret is present, and what has arrived through it (see below) |
GET | /link-hosts | Where the company’s own apps live in a browser: one {kind, url} per configured GitHub, GitLab, Mattermost, Jira and Confluence, and on a code host its owners. Everybody’s: no repository, project, team, credential or health, and each url is reduced to scheme, host, port and path. owners are the organizations or top-level groups the company works in (GitHub’s provisioning.org, GitLab’s provisioning.group, and the owner part of every repository or project the integration and the seats name), lower case and sorted, never the repositories. The dashboard uses it for an app’s mark beside a link, to link a bare owner/repo#14, and to read a bare owner/repo as a repository only under one of the owners. A Jira or Confluence on a cloud id with no site_url has no browser address and adds no row |
GET | /advisor/access | The change that grants an agent one access it asked for (seat= the agent’s handle, access= the grant’s key), built from the redacted company for that agent alone (ADR-0118). Takes admin. Refused in its own words for a key the catalogue does not name, a grant the agent holds, or one it has nothing to add to |
GET | /delegated-decisions | What delegates decided, under which rules (ADR-0125): enabled; rules (rule, kinds, delegates, escalate_to, sample_one_in, always_escalate_paths, required_checks, each {repo, branch, checks}); limits (the three limits every delegate is held to, as rows of the limits question’s shape: key, group delegated, unit, value, default, off, default_off, settable, range; keys delegated_decisions.deadline_seconds, allows_per_hour, server_allows_per_hour, each the document’s value or the engine’s default); sample ({default, min, max}, the spot-check rate a rule’s sample_one_in may set); and for one company day (day=, 2026-11-09 or today; default the last whole day, which Home’s digest reads; a day not begun is 400 bad_params) its since, until, complete (false for the running day, whose list grows) and decided (every request a delegate or the engine settled that day), then spot_checks (the week’s decisions chosen for a spot-check) and flagged (the week’s high-confidence denials). Each list holds up to 100 rows, *_more saying the log holds more; each row has request, kind, rule, seat, by, by_kind (agent, person or engine), through, asked, confidence, verdict, overruled, sampled, host, item, at and the opened subject, reason, findings, redacted as every view shows them (subject_unopened where they do not open on this node). Takes admin, or a person a rule names in escalate_to |
GET | /delegated-decisions/repositories | What a rule’s required checks can name on the company’s GitHub: connected (false for a company with no GitHub) and repos, every repository an agent’s own app covers under an owner the company names, each once, {repo, default_branch, archived} with repo as owner/name. Read through the agents’ apps when asked; unread says why nothing could be listed (no agent’s app installed, or GitHub not answering). Takes admin |
GET | /delegated-decisions/branches | One of those repositories’ branches, repo=owner/name: {repo, branches, more, unread?}, the first 300 in GitHub’s order, more saying GitHub holds more. A repo that is not owner/name is 400 bad_params; one under an owner the company’s GitHub does not name, or no agent’s app covers, answers no branches and unread saying so. Takes admin |
GET | /delegated-decisions/checks | The check names a rule can require of one branch, repo=owner/name&branch=: {repo, branch, checks, unread?}, each name once from the check runs on the branch’s newest commit, leaving out any an agent’s own app or no app reported, since neither passes a declared check. An app without Checks (Read-only) answers no checks and unread naming the permission; a branch that is not a branch name is 400 bad_params. Takes admin |
GET | /growth/changes | What agents changed on the company’s growth accounts (ADR-0171), newest first: every step of a call that was not a read, off the access log. product= narrows to one integration kind; cursor= and limit= (1 to 100, 25 when unset) page it; a product that is no kind, or a cursor no page answered, is 400 bad_params. Each row is {seat, turn, act, held, product, connection, account, target, tool, class, step, answered_by, answerer, operation, before, changes, money, failure, at}: act is the held call’s id where held, else the call’s; step is made (an operate call made at once), failed (with failure, a closed word), or a held call’s asked, allowed, denied, lapsed (the engine’s, a day after the ask), applied or void (allowed, but the target moved and nothing was sent); answered_by is person (with answerer, their human seat) or engine; operation and before are SHA-256 hex of the exact vendor operation and the target’s before-state; each change is {field, label, before, after, money, text}, a published text (text: true) as before_sha256, before_bytes, after_sha256 and after_bytes alone; money is null or {currency, delta_micros, daily_micros, daily_after_micros, per_change_cap_micros, daily_cap_micros} as decimal strings. Each page is {rows, next, complete}. Takes admin (audit.read) |
GET | /advisor/review | What each agent may do and where it runs, as its next turn is told: per agent (seat, name), its access, the integrations with their levels and permissions, the MCP servers with the tools at each level, and the boxes its runs use with their memory and, once a run has read the box, its browser and container runtime. The go-live check’s review. Takes admin |
GET | /advisor/findings | The Advisor’s findings as its duty keeps them: state=open (the default) every live one, the most costly first, then the most hours a week, then the longest standing; state=closed the closed ones, the newest first; both narrowed by severity=, area= and class=, a page of limit= (1 to 100, 50 by default) at cursor=. Answers {findings, next_cursor, counts, last_run}: counts the owner’s open findings neither snoozed nor applied, by severity (an engine finding is the engine’s own work and not counted), and last_run the latest run, as GET /advisor/runs/latest answers it. Each finding is {id, key, class, source, actor, area, severity, subject, title, why, item, names, path, entries, explanation, state, close_reason, ineffective, snoozed_until, opened_at, last_confirmed_at, closed_at, effect_due_at, confirmed, revision, seen_before, impact, evidence, fix, headline, stats, chart, seats, actions, premise_checked_at}, every field always sent, null where it has no value: id the episode and key its class and subject across episodes; state open, applied, resolved, retired, expired or dismissed; confirmed stale once its class has not run for three of its intervals; evidence {window, facts, records}, each fact {key, label, value, unit}; entries what an atlas_act fix acts on, for a caller holding atlas and null for any other (what the atlas shows); headline one line carrying the finding’s number (its class’s from its facts where the finding states none, its title only for a document’s own warning), close_reason among them duplicate (a rule’s finding says it with its numbers) and replaced (its premise moved while a rule’s finding is about the same work), stats the numbers behind it ({key, label, value, unit, was, better}, was the same number over the range before where the finding read it), chart a chart as GET /advisor/snapshot draws them or null, seats the seats it is about ({handle, name, value, unit}), actions {primary, secondary}, each action {kind, label, option, items, to, page, target, setting, url, question} with kind apply (re-check and send fix option option), reassign (move items to the seat to, a fix’s reassign), open (page and target, or setting), step, ask or fix, every key sent and null where its kind does not use it; premise_checked_at when the fact it rests on last held, null until re-checked. Takes admin |
GET | /advisor/findings/{id} | One finding, with its history ({at, event, by, moved}, by the engine or a person, {kind, handle, name}, name the name the company gives their seat (the handle where it no longer holds one), moved each fact or field that moved, was and now) and its key’s earlier episodes. 404 for an id the log does not hold. Takes admin |
GET | /advisor/runs/latest | The latest run: {run_id, trigger, by, started_at, ended_at, status, classes_run, unread, opened, resolved, model, deep_skipped, deep_kept_from}, status running for a Run now the duty has not taken yet, done, failed, ceiling, or interrupted for a deep run whose server stopped during it (it concluded nothing, model.reason says so, and its budget is null), unread the sources it could not read by their words, model the model pass’s {status, tokens, listed, dropped, reason} or null; kind rules or deep; progress a deep run’s steps {at, text, step, state, detail, why}, oldest first: step note, read (the snapshot’s included), verdict, question or checks (a press’s checks), a line from before steps a note; state done, failed, or running for the newest note, read or checks of a run in flight; detail the read’s call or the verdict’s item and question, why a failed step’s reason, each "" where none; a read that failed is one step, its failure folded into the read it ended; read while it runs (a deep run in flight is the latest run, status running, until a later run ends after its last line or it goes unheard for longer than any investigation lasts), and after it ends its whole trail, every read it asked and the verdict on each agenda item, from its progress record (up to 400 lines; the last three its record keeps once its lines are past their retention), [] for a rules run; budget a deep run’s {tokens, tokens_ceiling, minutes, minutes_ceiling} and stopped_by the bound it stopped at, both null for a rules run; agenda a deep run’s {items, answered}, how many questions it has to answer and has answered, in flight (from its checkpoint) or ended, null for a rules run or one that kept none; classes what the run concluded about each class, {class, status, reason} with status found, clear, silent (it read its sources and still could not judge all of the company, reason saying what and why) or unread. deep_skipped is why a run’s deep part did not run, kept (the investigation from deep_kept_from stands) or no_model, null where it ran or the run has none; model.repaired counts the findings its model proposed that were listed after a repair (fix_not_built, reworded, worded_by_engine, subject_widened), beside model.dropped. Takes admin |
GET | /advisor/notices | The platform notices that reach every administrator’s Inbox, {notices, unread}: an open finding that blocks the company and is the owner’s to fix, an alarm standing on any node past the deferral grace, a conversation the engine holds and the OAuth clients a moved engine address left behind (its redirect), each {class, subject, since, nodes, finding}, finding the finding whose fix ends it ({id, title, fix}) or null; unread what the latest run could not read, findings where this node could not read the Advisor’s own list. Takes admin |
GET | /advisor/reports | The Advisor’s weekly reports, the newest week first, a page of limit= (1 to 52, 12 by default) at cursor=: {reports, next_cursor}, each {week, period, written_at, opened, resolved, applied, dismissed, headline}, week the ISO week (2026-W47), period its {from, to}, Monday to Monday on the company’s clock, and headline the week’s turns, turns that committed nothing, tokens and hours work waited for a seat, those it measured, each as a report’s metrics are. A week the company did not exist through all of has no report. Takes admin |
GET | /advisor/reports/{week} | One week’s report, written on the Monday after it and kept as written: the summary’s fields with metrics (each {key, label, value, unit, was}, was the week before’s value or null), unread (the sources whose numbers are left out), top (the open findings that cost the most when it was written, of those the week opened and notes left out, {id, class, severity, title, subject, item}) summary (null where none was written) and days (the week day by day, Monday first, each {day, turns, turns_nothing, tokens} counted as the week’s totals are; [] for a report written before its days were kept, or whose turn ledger could not be read day by day). 404 for a week with no report. Takes admin |
GET | /advisor/snapshot | The company’s numbers over range= 7d (the default), 14d or 30d, company days ending now, today included: {as_of, run_id, range, stats, charts, unread}. stats {key, label, value, unit, was, better}, was the range before’s value or null, better up, down or null; charts {id, title, unit, kind, x, series, note}, kind columns, stacked_columns or bars, x {kind, keys, labels} (day, seat, entry, reason or state), each series {id, label, values} aligned with x; unread the sources that could not be read, whose numbers are left out. Charts today: flow_by_seat, open_work, capacity_lost, wasted_wakes, tokens_per_turn. Takes admin |
GET | /advisor/capacity | The hours each model entry was out on its usage limit over range= 7d (the default), 14d or 30d: {range, days, entries}, days the company days (YYYY-MM-DD), each entry {entry, out_hours, total_hours, hits, hits_by_day, seats}, out_hours and hits_by_day aligned with days, hits how many separate stretches it was out, seats {handle, name, hours} the seats it held, the most first. Read from the seats’ park and release records, each stretch’s first park naming the entry. Takes admin |
POST | /advisor/runs | Run the Advisor now, with no body (or {}); a body naming anything else is 400. The run is one: every check at once, its findings recorded as they are found, then the deep investigation on the Advisor’s model under the same run, unless one concluded within the last six hours or no model is assigned, which the run records (deep_skipped on GET /advisor/runs/latest). 202 {run_id}, the duty’s holder taking it within a minute; 409 conflict with the run asked for while one waits. Takes advisor.run, an administrator’s at any recency and Ask Crewlet’s only on the person’s approval: it spends tokens and changes no config |
POST | /advisor/findings/{id}/decision | A person’s decision on a finding, {"decision": "snooze", "reopen", "useful" or "dismiss", "reason"}: a snooze holds it off the list for 7 days; a dismissal names its reason, wont_fix (the key held quiet 90 days), known (30) or wrong (for good, and the model pass is told); reopen lifts a snooze, or a dismissal’s hold and asks for a run now, so a condition that still stands opens again as a new finding within a minute (the dismissed one stays as it was). Answers the finding as it now reads; 409 conflict where it moved since it was read. Takes advisor.run. A fix is never applied here: its change is sent through its own route by the person |
POST | /advisor/findings/{id}/recheck | Re-check an open finding before its fix is sent, {"option": n} (the fix’s option, 0 by default), or before the work it moves is moved, {"action": "reassign"}: its class runs again now and answers {outcome, finding, moved, previous_fix, preview, send, sends, moves, digest, checked_at, expires_at, refusal}. outcome is holds (the same verdict and change), changed (the condition stands with another change, recorded as a new revision: moved says what moved and previous_fix the fix it replaced), resolved (the condition ended: the finding closes and nothing is sent) or not_applicable (its subject left or its change no longer builds: it is retired). On holds and changed a configuration fix carries send, the one request to send from the person’s session (PUT /config/{entity}/{id} with the entity as it would become and If-Match the entity’s tag as the re-check read it, its dry_run_path first), a preview of each field it writes, before and after, and digest; an option that changes several seats (its change and its also) carries every request in sends, in the order to send them, send the first, and its preview rows name each change; a reassignment answers moves instead (send null), each {item, from, to, version, reason}: an item the seat the finding is about still holds and nobody has started, read now, written by the person’s session through update_work_item (assignee the seat, which they may change, if_match its version, and reason), its preview a row per item, and applied with its digest marks the finding applied once that seat holds none of them; send it before expires_at (10 minutes), else re-check again. refusal says who can make a change this server may not send (a configuration managed elsewhere); the finding stays open. 409 {outcome, state, detail} for a finding no longer open, in words: applied (another window applied it, with applied_at and effect_due_at, until when its effect is checked) or closed (with closed_at). 503 when what the finding is read from could not be read just now, or was read only in part without it (an integration’s findings record that may have dropped it, Integration reconcile). Takes advisor.run |
POST | /advisor/findings/{id}/applied | Report that a re-checked change was sent, {"digest"}: the finding is marked applied, its effect checked by its class’s runs until effect_due_at (an hour for the setup’s classes, a week for a pattern of the week’s), once the configuration holds the change. 409 {"outcome": "recheck"} where the finding moved since the re-check or the configuration does not hold the change, and the re-check’s 409 for a finding no longer open (applied or closed). Takes advisor.run |
GET | /diagnostics/issue-reports | The company’s engine issue reports: whether they are on, the relay, every report sent with its status, the bytes it sent and the issue the relay named, and what a report of each class would say. Takes admin. The setting itself is diagnostics.issue_reports.enabled, written under /config |
GET | /diagnostics/insights | The company’s operating insights: the consent (share, accepted, and always, the classes sent without review), this build’s catalogue schema and catalogue, the relay, and every record the fleet keeps with its status (observed, queued, scheduled, sending, sent, failed or declined), when it is due, the relay’s last status code (answer) and the record itself. A send that never settled reads as failed after an hour. Takes admin. The setting itself is diagnostics.insights, written under /config |
POST | /diagnostics/insights/decisions | An administrator’s answer to a queued insight record, {"class", "week", "choice": "send" or "decline"}: send schedules it at its own random time within a day. Takes admin and a step-up. Refused 409 when the record is not waiting for a decision (sharing is not in review mode, or it was decided) |
GET | /backups | What the fleet has backed up: each node’s newest point and the operator’s newest acknowledgement of each log, as each log’s trim reads them, and every backup a person asked a node for, failures included. Takes admin (see below) |
GET | /mcp-catalogue | What an MCP server is added from: the curated catalogue whole, and with q= the company’s community registry (mcp_registry.url) searched, each listing marked as not reviewed. Takes tools.read, everybody’s: a member reads the curated half alone (see below) |
GET | /mcp-servers | What each configured MCP server is doing on each live node (serving, failed, tools served, first failure), from every node’s status record, beside what the configuration declares (never a credential), and the engine’s built-in tools by group, each naming who may call it. Everybody’s, in two readings: a member’s names no launch line, failure sentence or wait (see below) |
GET | /mcp-servers/{name} | One MCP server whole: its /mcp-servers row, every tool the fleet’s live nodes list for it (per-agent servers included) with hints, risk and arguments, what the server said of itself in its handshake, and what removing it would take with it. Takes tools.read, everybody’s, in two readings (see below) |
POST | /mcp-servers/{name}/retry | Restart one MCP server now: every instance on every node, or with seat one agent’s instance on the node holding the seat. Takes tools.retry, an administrator’s at any recency (see below) |
POST | /mcp-servers/{name}/check | Test one MCP server where it runs, calling no tool: on every node, or with seat one agent’s instance on the node holding the seat; recorded as the server’s latest test. Takes tools.check, an administrator’s at any recency (see below) |
POST | /mcp-checks | Test a draft MCP server entry before it is saved, as a write would leave it. Takes tools.check, and config.write and secrets.write on top, decided before the body is read (see below) |
POST | /mcp-probe | Check an address before an MCP server is added at it: what answers there, and the sign-in it asks for, from its OAuth metadata. Takes tools.check, and config.write on top (see below) |
PUT | /mcp-servers/{name}/values/{key} | Store one header or variable of an MCP server, tested first by default, sealed write-only and read through a ${VAR} the key is pointed at. Takes secrets.write, and config.write on top, both at a recent step-up and decided before the body is read; never the assistant (see below) |
PUT | /mcp-servers/{name}/tools | Set the level each tool of an MCP server runs at (allow or blocked), as one revision of the company document; ?dry_run=true checks it. Takes config.write, at a recent step-up for a write (see below) |
POST | /mcp-servers/{name}/oauth | Start signing the company in to a remote MCP server with OAuth: answers the address the person’s browser is sent to, once. Takes secrets.write: an administrator, a recent proof, never Ask Crewlet (see below) |
GET | /mcp-sign-ins/{id} | Where a sign-in is: pending, completing, approved or failed, and why. Takes config.read (see below) |
DELETE | /mcp-servers/{name}/oauth | Sign the company out of an MCP server: the grant is revoked at its vendor where it offers that, forgotten here, and the server stopped on every node. Takes secrets.write, as the start does (see below) |
POST | /mcp-servers/{name}/changes | Accept, or keep blocked, tools an MCP server changed since their levels were decided, each by the digest of the definition reviewed. Takes config.write, at a recent step-up (see below) |
GET | /worklet | Worklet: a filtered listing of work items, plus the last key number minted per project. Served only where tracker.backend is worklet; a company on Jira gets 404 unknown_query, not an empty board (see below) |
GET | /worklet/retention | What the state log is holding, what the trim concluded and which term is stopping it, every data node’s position, and what this node costs to replace. Takes admin, reads included (see below) |
POST | /worklet/retention/ack | Publish an operator backup floor, for backup_floor: operator |
POST | /worklet/retention/evict/{node} | Install the eviction gate on a node on every log the trim counts nodes on (every log that claims identity: all but the vector changelog and the usage log), so the trim can pass a floor it is pinning. Refused 409 while the node holds a live presence lease; answers per log (see below) |
POST | /worklet/retention/readmit/{node} | Lift it on every one of those logs: the inverse commit, not a delete. Refused 409 while the node still lacks records a trim floor lets the log delete |
POST | /worklet/retention/capacity | Drive a log’s byte-ceiling change as far as this node’s mode allows |
GET | /worklet/retention/maintenance | Where that window stands and what is holding it |
POST | /worklet/retention/maintenance/abandon | Change what the operation is trying to reach, never the barrier it must cross |
POST | /worklet/retention/maintenance/exclude | Record that a participant’s process is stopped and holds no outstanding request |
POST | /worklet/retention/maintenance/retire | Record that no process will run under a node id again, so no capacity window counts it while the retirement stands; ?confirm= repeats ?node= |
GET | /worklet/retention/reanchor | The live stream’s own created_at, which a reanchor’s confirmation has to echo, and the case a reanchor would answer |
POST | /worklet/retention/reanchor | Adopt a recreated stream, or a broker restored from an older copy, at the next generation |
GET | /worklet/views | One container’s view strip: the six every container has, and whatever was saved beyond them. ?container= takes the query grammar’s spelling (workspace, project:ENG, unit:engineering, person:ana): a project key is upper-cased and a unit resolves by any key it answers to or by its name, so a team’s strip is one strip under every spelling. Ordered by the caller’s own personal views and pins; no parameter names whose. The caller’s own is their own record: the seat a person holds, or the login of a Tier A token or service account bound to none |
GET | /worklet/views/saved | Every saved view the caller can see, in EVERY container: shared ones and their own personal ones, pinned first, each row carrying its container. What the dashboard’s view inventory and sidebar pinned group read, since a view saved on a project board is in no workspace strip. No parameter names whose, as /worklet/views. ?counts=true counts each pinned view in its own container, and is 400 bad_params for a credential that names no record of its own, since only a record has pins |
GET | /worklet/catalogue | The company’s vocabulary: the task types a create may name and the workspace’s custom-field declarations. ?archived=true also lists what was retired. The types are the EFFECTIVE set: the six this build ships plus whatever the company declared, a declaration replacing a builtin of the same slug |
GET | /worklet/projects | Every project work is filed into, with its task_counts ({todo, active, done, closed}, one per status group; there is no open, so add todo and active for every unfinished item), its target_date (YYYY-MM-DD on the company’s clock; omitted when none), its last_change (when the project’s work last changed and who changed it; ABSENT for a project nothing has been filed into), its chart-owned unit and its lead. ?q= narrows by a word in the key, name or purpose; ?unit= to the projects one unit owns, named by the unit’s key or by its name where exactly one unit carries it, in any case. ?archived= SELECTS a set: false (default) live projects, only retired alone, true both. ?sort= orders the whole selected set before the page is taken: one of key, name, unit, todo, active, done, closed, last_change, target, each optionally with a leading - for descending, default key, the key breaking every tie; a project with no last_change or no target_date sorts last in both directions. An archived or sort value that is neither is a 400 naming the parameter and what it accepts. ?limit= caps at 200, also the default. The answer carries a census ({active, archived}, the same question under the same q and unit MINUS its archival term), so a caller that selected one set can tell an empty set from an empty company; total is the census of the mode asked for. A set read, so it carries complete and its incomplete beside the read level |
GET | /worklet/projects/{key} | One project in full: the six statuses with labels, groups and descriptions; the effective types; the custom fields grouped by the type they apply to, required first, with the workspace ids this project shadows named; its tags; its default assignee, lead and owning unit. ?for_type= narrows the fields to one type plus those that apply to every type. Unknown key answers 404 naming the nearest three; a for_type the company does not file answers 400 bad_params, not 404 |
GET | /worklet/files | One project’s files, in path order: ?project= (required), ?folder= to narrow to the paths under one folder, ?removed=true to include removed files, ?limit= (default 200, capped at 1000: a larger one is answered a page of 1000) and ?after=, the next the previous page answered. An unknown project is 404 no_project, never an empty page (see below) |
GET | /worklet/files/{project}/{path...} | One file’s bytes, streamed, with its version as the ETag. 503 content_unavailable where the file is listed and its content could not be read right now (see below) |
PUT | /worklet/files/{project}/{path...} | Write a file: the request body is its content, Content-Type its type, If-Match the version it replaces and an Idempotency-Key how an unknown answer is retried. Takes worklet; the write is attributed to whoever the request resolved to (see below) |
DELETE | /worklet/files/{project}/{path...} | Remove a file. If-Match and Idempotency-Key as the write. Its project’s lead, or admin, either with worklet, as removing a work item is |
GET | /worklet/activity | The activity feed: one durable row per applied commit, quiet ones included, at any age with no live/archive boundary. Ordered by the COMPOSED LOG POSITION, not any clock: ?since= and ?cursor= are positions written <stream>@<generation>:<sequence>, so a cursor spans a reanchor with no gap and no repeat. Filters: ?task= (key, id or a FORMER key), ?container=, ?kinds=, ?actor=, ?assignee=, ?notified=, ?from=/?to= (RFC3339, bounding the AUTHORED instants), ?limit= ≤200. ?q= is an escaped LIKE over the excerpt, REFUSED unless it names a task, or a project and a since inside 90 days. Each record carries fields, what MOVED, as {"<field>": {"from": …, "to": …}}, and for a SET (tags, watchers, muted, collaborators, each link kind, blocking, a catalogue’s or tag set’s declarations, a person’s favorites) the members that joined and left, as {"<field>": {"from": "", "to": "", "added": […], "removed": […]}}, each sorted and every member whole. That holds for every kind, not only task kinds: a project reconcile names the name, purpose, unit or epoch that changed, a view save the query parameters, a priorities write the order before and after, a dependency the item it now waits on. A task’s own row draws on twenty-nine names: title, status, assignee, priority, project, type, tags, due, due_all_day, start, wait_reason, estimate, points, reporter, watchers, muted, collaborators, parent, routing_unit, archived, removed_with, waiting_on, linked, duplicates, page, blocking, checklists, fields and body. Values are the STORED form (a status slug, a whole RFC3339 instant, an item’s id), not a rendering. Nothing is cut: an ordered list (priorities, pinned_views, checklists) is carried whole, free text past 600 bytes (a project’s purpose, say) is described as <N> bytes, and every field a change moved is on the row; only a notification card stops at 32, saying how many it left off (fields_omitted). The two largest are MARKED: body is <N> bytes on each side (empty where there was none), never the prose, and checklists is <list>: <done> of <total> done per named list. fields names each custom value by its SLUG (resolved by the node applying the change, so a NOTIFICATION carries every other delta and not this one), a choice as its option’s slug, a multi-valued field’s members joined with /, a value past 150 bytes as <N> bytes, and a count of any whose field the project no longer declares. The ANSWER also carries keys, an id-to-item-key map for the tasks those deltas point at (waiting_on, linked and duplicates but never page, which names a knowledge-base page; the blocking mirror; a person’s priorities queue; and the scalars parent and removed_with), resolved on the answering node; a delta records another task by its ID. An id this node holds no row for is absent, not empty, and a renderer falls back to the id |
GET | /worklet/my-work | Everything one person is expected to look at, in eight bounded lists: priorities in the stored order, assigned, asked_of_me (each with the literal call that answers it, whether it is open, and the decision it carries when it asks somebody to choose; see Asking for a decision), checklist_items (which live on other people’s tasks and no assignee filter reaches), collaborating, watching_recent, unblocked_recent and holding_up (the open work they hold that other open work waits on, assigned to them or held by an open question to them, most waited on first, each row with blocks, holders, held_since, agent_waiting and, for an item held by a question, asked; beside it holding_agents, the held items agent items wait on and the distinct agent items waiting; see Worklet). ?handle= is whose, defaulting to the caller’s own record (see Whose record a personal question answers for). Naming somebody else’s takes whoever leads them, or admin, and worklet either way |
GET | /worklet/inbox | One person’s inbox: the notices a change wrote to them, each naming the ONE reason of nineteen it found them under, whether it asks something or merely informs, whether it arrived only because nobody better was found, and their own read and snooze marks, plus the comment and turn the change came from, and the ask it is about, as it stands now. Same scope rule as /worklet/my-work. ?unread=, ?primary_only=, ?snoozed= (exclude, the default, since a snooze means not now; include or only; anything else refused naming the three), ?reasons= (comma-separated, refused naming the nineteen); each narrows the SCAN, so a page is full whenever the scope holds 50 notices and next_cursor is never a cursor past an empty page. Also ?limit= ≤50, ?cursor=, and ?since=, a LOG POSITION written <stream>@<generation>:<sequence> (what seen_through reports back), never a bare sequence: the comparison is on the packed `(generation << 40) |
GET | /worklet/people/{handle} | One human’s own state: their inbox (unread, read, snoozed, and which snoozes are now due), the order they mean to work in and who set it, and their pinned views. Same scope rule as /worklet/my-work, the handle always named here as it is the path: your own seat’s is yours, anybody else’s takes the owner-or-lead rule. A person nobody has written yet answers the EMPTY state with held: false, not a 404: the first write creates the record |
GET | /worklet/{id} | One item with its description, thread, history and links. {id} is the key (ENG-42) or the id: a person holds the first and every internal link the second |
GET | /worklet/comments | One page of an item’s thread, walking back from the newest: ?item= (key or id), ?cursor=, ?limit= (default 20, at most 50), ?thread= (one comment’s conversation) and ?with_root=; see work_comments |
GET | /worklet/turns | One page of the agent turns charged to an item, newest first: ?id= (key or id), ?cursor=, ?limit= (default 20, at most 50); see work_item_turns |
GET | /doclet/pages | Doclet: a filtered listing of its pages. Served only where knowledge.backend is doclet |
GET | /doclet/pages/{id} | One page with its body, comments, revision metadata, children and ancestor breadcrumb. {id} is the id, or CONTAINER/Title: the title matches as the fleet CLAIMED it, ignoring case and runs of whitespace, so ENG/deploy runbook reaches “Deploy Runbook” |
GET | /doclet/pages/{id}/revisions/{version} | One revision of a page: its own body, message and author at that version, the newest included. Decided as reading the page; see page_revision |
GET | /containers | Every knowledge container this node knows about, with how many pages each holds. The engine materialises one per space: the org chart names, plus the two reserved ones, on every config apply and boot; each carries chart_epoch, the activation its name and purpose were last written from (Unix milliseconds), so an earlier-activated configuration never overwrites them. Beside the list, skills is the key of the container tool skills are written in (knowledge.skills_container), absent on a company that turned tool skills off |
GET | /chatlet/channels | The company’s own chat: the caller’s rooms, newest activity first, each with its unread count against the caller’s own read cursor and whether they muted it, plus what waits on them place by place and their whole read state: every room (at most 256), or with ?limit= the most recently active that many, and with ?unread=true only those with something unread. Served only where chat.backend is chatlet, to a principal holding chatlet and acting as a seat (see Chatlet) |
GET | /chatlet/channels/{channel_id} | One room’s metadata and membership. On this route and the two below, {channel_id} is the room’s id or its name (launch, or %23launch for #launch), so a room the caller is not in is reached by its name. A room the caller may not read answers 404, by name as by id, exactly as one that does not exist |
GET | /chatlet/channels/{channel_id}/messages | One page of a room’s transcript, newest first: ?cursor= (the last answer’s next_cursor), ?limit= (default 50, at most 500) |
GET | /chatlet/channels/{channel_id}/threads/{root_id} | One thread from its root, oldest first, with who has spoken in it; paged as the transcript, the other way |
GET | /chatlet/activity | What waits for the caller across the rooms they may read, newest first: mentions of them (and of a whole room they are in), replies in the threads they follow, and reactions to their messages. Each row says whether it is unread against the caller’s own read state (never in a room they muted) and carries the position that marks it read; the answer counts the unread mentions and replies, room by room over each room’s newest 100 messages. ?kind= (mention, reply or reaction) narrows it, ?unread=true answers the unread rows alone, whole, ?cursor= and ?limit= page it. See what a reader keeps |
GET | /chatlet/threads | The threads the caller follows, newest reply first, each with its root (carrying the thread line) and its two newest replies: the threads they started, replied or were named in, and those they followed by hand, less those they unfollowed. ?cursor=, ?limit= (default 20, at most 50) |
GET | /chatlet/saved | The messages the caller saved for later, newest save first, each with its message, or gone where it was taken back, erased, pruned or is in a room they may no longer read. ?cursor=, ?limit= |
GET | /chatlet/sent | What the caller said, newest first, in every room they may still read; a message they took back is left out. ?cursor=, ?limit= |
GET | /chatlet/channels/{channel_id}/reach | Whom a draft would reach if sent now, by the post’s own routing, published nowhere: ?body= (the words, read for @handle and @channel as the post reads them) and ?reply_to= (a reply’s thread). Answers the room, the thread, reach.recipients (each {handle, reason}), mentions, collective, and quiet when it would reach no agent (no_agent, or addressed_to_people when it names only people). An archived room, or one the caller may not post in, is refused as the post would be |
GET | /chatlet/channels/{channel_id}/links | Every link the room’s messages carried, newest first, each with who shared it, when, and the message it came from; a taken-back message’s are left out. ?cursor=, ?limit= (messages a page reads) |
GET | /chatlet/channels/{channel_id}/messages/{message_id} | One message, read in place: with its thread’s root and the two replies just before it when it is a reply. A message not in that room answers 404, as a room the caller may not read does |
GET | /chatlet/search | The rooms the caller may read ranked against ?q=: keyword only, over the engine’s own chat index. ?channel_id= and ?author= narrow it, ?limit= (default 20, at most 40) |
GET | /chatlet/room-names | The name of every room the caller may read, joined or not, archived included: each room’s id, name, kind and archived, live rooms first, at most 1000 with truncated where rooms were left out. A direct conversation has no name and is not here |
GET | /chatlet/rooms | Every named room the caller may read, joined or not, archived included, each with its member count, whether the caller is in it and when it was last active: the chat_rooms question |
POST | /worklet/items /doclet/pages | File an item, write a page, and the rest of the write surface: the same tools a seat and your own assistant hold, as the person you signed in as. Guarded; the item routes are absent on a company that does not run Worklet, the page routes on one that does not run Doclet |
PATCH | /worklet/items/{key} | Change an item, and its /comments, /rank, /depend, /relate, /restore and /purge beside it. See below for every route and the authority each takes |
GET | /artifacts/{id}/data/{collection} /{collection}/{doc} /{collection}/query /history /schema /state | An artifact’s datastore, read: a collection’s documents, one document, a query over its field index, the store’s history, its schema and the caller’s own per-viewer state, each decided per artifact and shaped by the collection’s read rule (see below) |
POST PUT | /artifacts/{id}/data/writes /undo /state /schema | An artifact’s datastore, written: one atomic batch of ops, an undo, a per-viewer state key, a schema change. Idempotency-Key required; each answers the verdict the applier wrote |
GET | /artifacts/{id}/data/export.csv | One collection as CSV, to an editor of the artifact |
POST | /auth/login | Sign in. Login or address, password, and a second factor where one is held. Unguarded, and throttled on the login as typed from the caller’s source: a failure costs the next attempt a wait, never a lockout (see below). Every failure answers one code after the same argon2id derivation (see below). A node that cannot read the identity estate or record the session answers 503, and every 503 under /auth carries a Retry-After. A write whose outcome nobody can establish (the second factor’s spend, the session’s own start) is that 503 with the op_id, and never a session. A success answers {person, login, seat?, expires_at, position, status}; status is signed_in, or, where the company requires a second factor (its default) and the person holds none, second_factor_enrolment_required: the session may only enrol one (see A required second factor is enrolled before anything else). POST /auth/invite/{id} and a password POST /auth/step-up answer the same shape, restricted on the same rule |
GET | /auth/config | What a sign-in page needs before anybody has signed in: {min_password_length, second_factor}. min_password_length is the company’s sign_in.min_password_length held within this node’s limit, never below the engine’s twelve (the floor for every password a person sets); second_factor is required or optional from the company’s sign_in.require_second_factor held within this node’s limit (unset is required). Password sign-in is always served. Unguarded, with no user list and no count of people |
GET | /auth/invite/{id} | Renders an invitation and never spends it (mail prefetchers, scanners and preview cards follow links). Unguarded: holding the link is the credential, the secret it carries after the id, presented in the X-Crewlet-Invite-Secret header and never in the URL. The link a person follows is the dashboard’s screen, <api.external_url>/dashboard#/invite/<id>.<secret>, whose fragment no browser sends to a server; the screen calls this route with the two halves apart. Answers the address it is for; who sent it (invited_by: a person by their seat’s chart name, absent for a machine, a Tier A token or a service account, whose coloned login, token:founder, the holder would not recognise); the password floor; the seat redeeming it binds (always present: {handle, name} as the chart calls it now, or {} where the company no longer holds it as a human seat, which the redemption refuses as a link that no longer works); a login proposed from the address in the person grammar ([email protected] → jane.doe, [email protected] → jane.example) for the form to pre-fill; and signed_in_as, the login of the session the browser already holds (absent for none), because redeeming ends that session and the form says so first. Absent, redeemed, expired and a missing or wrong secret are one 410 in the same bytes, so a guessed secret against a leaked id does not say the id exists. An id nobody issued or a secret that is not the link’s is a failed attempt, counted on the audit trail’s per-minute failure row (iam_login_failures) under its source; that count climbing shows someone walking ids or secrets. It meets no curve: the secret is 256 bits nobody walks, and a curve keyed on the address would let a stranger there hold it shut for everybody else. A link that proved itself and is spent (redeemed, expired, its address enrolled) is the same 410 and is not counted. A node whose identity rows cannot vouch for a link that does not open (behind the identity log, or holding a record it could not apply) answers 503 identity_unavailable instead, for an id it does not hold and a wrong secret alike, and counts nothing: the link may have been issued through a peer |
POST | /auth/invite/{id} | Redeems it, conferring exactly the grants and seat whoever issued it decided; a link spent or aged out between the form and the post is 410 invite_spent. Unguarded. Body {secret, login, name, password}: secret is the half of the link after the id, checked as the view checks it; login is required (what they sign in with, the name a lead finds them by, and the by jane.doe in every trail reason; the view proposes one). An absent login, or one outside a person’s grammar (dotted, jane.doe), is 400 naming the rule; a login somebody already holds is 409, without saying who. The redemption is one record (the person, their address, their login, the seat the invitation binds and the spent link), so every refusal writes nothing: a seat removed or made an agent’s since the issue is 410; one a person holds since (only a retained record or a restore leaves that) is 409 saying the seat is taken, naming nobody. Only a person holding the seat refuses it, not an older open invitation on the same seat. Only a record that could not land is 503. Retry until it lands: a redeemer told their login is taken posts another. A link whose address somebody is already enrolled under is 410, like a redeemed one. A browser that already holds a session has it ended as POST /auth/logout ends it, before the new one opens, and its cookie is replaced; every sign-in that opens a fresh session does the same (POST /auth/login, POST /auth/token). The company’s first person redeems exactly this way: a Tier A token issues their invitation into a human seat the company declares (see How the first person exists) |
GET | /auth/session | Who you are: your id, login, seat, kind, stage and grants; your own name as your directory row holds it (absent for a Tier A token, which has no row, and where this node cannot read or open it, which never fails the answer); for a session cookie its expires_at and its lineage (the id a listing of your sessions names it by, so a client can tell which is this browser); reauth_at, the instant your proof of identity stops counting for a step-up gesture, with step_up_due saying whether the next one will ask you to confirm it; and status: signed_in, or second_factor_enrolment_required for a session that may only enrol a second factor, which is one of the routes such a session reaches |
POST | /auth/token | Exchanges a Tier A bearer (presented as Authorization: Bearer, never a cookie) for a one-hour session cookie. The session is the token: it names the token’s login, and every request re-composes it from the entry this node holds now (the entry’s permissions under this node’s api.auth.admin posture, the seat the identity directory binds the token to, stepped up by construction as the bearer is). Removing or renaming the entry ends it on the next request. It answers to the token’s id, not its value: a new value under the same id leaves the sessions the old value opened working until their hour ends, so to cut a leaked value’s sessions off at once, rotate by giving the token a new id (see Identity and access). POST /auth/logout from it closes it as it closes a person’s, and POST /auth/logout/all from it and crewlet iam invalidate-all end it too. A refused bearer here is answered as on every guarded route: 401, counted on the audit trail’s per-minute failure row, never slowed or refused on its address (see A bearer is its own protection) |
POST | /auth/step-up | Confirm who you are on a session that is already valid. The only route here that is both guarded and throttled (unbounded retries against a known person would be a password oracle). It answers a fresh session cookie and ends the session it replaces first (a close that does not land is 503 with a Retry-After and opens nothing; a presented session no longer live is 401). The replacement keeps the replaced session’s absolute deadline. Only a person confirms: a machine token is 403 token_refused, the answer the authority table gives a token wherever a person must be present, and a session that is no person’s (exchanged from a Tier A token, or a service account’s) is 403 forbidden saying why, as POST /auth/password answers it |
POST | /auth/totp | Enrol a second factor, replacing any you hold. Two requests: the first answers a seed and stores nothing, the second presents a code derived from it (the only evidence the authenticator app works). Needs a proof inside step_up, the second-factor reset’s window; an older one is 403 step_up_required naming it (reason, window) as every step-up refusal does. Never through a machine token: 403 token_refused, whatever its owner may do. Never by a principal that is no person (a session exchanged from a Tier A token, a service account): 403 forbidden saying why, as POST /auth/password answers it, never step_up_required. A factor nobody can confirm is stored is 503 with its op_id, never “enrolled”. The second leg answers {"status": "enrolled"} and, through a session that could only enrol a second factor, replaces that session: the restricted one is ended first, a whole one opens keeping its absolute deadline and its proof instant (the password’s: the enrolment’s code proves a seed, not who holds it, so it opens no fresh step-up window), its cookie is on the response and it is answered beside the status as session (the sign-in’s own shape, status: signed_in). Such a session enrols only while its person holds no second factor, decided in the write’s own snapshot, so one that has come to hold one since is 403 second_factor_required and nothing is stored: a password alone never replaces a factor. The seed is sealed under your own key before it is stored, and opened only to check a code |
POST | /auth/totp/recovery | Issue ten fresh single-use codes, retiring the old set. Answered once, in the clear; only their hashes are stored, so a lost set is regenerated, not recovered. Needs a proof inside step_up, refused as POST /auth/totp is, a machine token and a non-person principal included. Issued only beside an authenticator app: a person who holds none is refused 409 invalid and issued nothing; the first set comes with the first enrolment. A set nobody can confirm is stored is 503 with its op_id, and the codes are not shown |
POST | /auth/logout | End this session. The cookie is cleared whatever the write did. It ends the session behind either cookie name, the one this deployment issues and the other a browser may still hold from before api.external_url moved to https (which the guard no longer authenticates), and clears both. Only a session this node’s rows still hold is closed and announced as iam_session_ended: a cookie past its deadline, revoked, or naming a session a record already ended is cleared and nothing is written, and a node that cannot read its rows records the close without announcing it. Unguarded, so a node that cannot read its identity estate cannot answer 503 identity_unavailable before the sign-out runs and leave the cookie set. It verifies every bearer the browser holds itself, and the origin check still judges it |
POST | /auth/logout/all | End every session you hold, by bumping your own revocation epoch, the one move that is immediate on every node. A revocation nobody can confirm is 503 with its op_id, not a claim that your other sessions ended |
GET | /auth/reset/{id} | Says whose password a reset link sets, and never spends it. The same route opens a person’s first password link, which POST /iam/people hands back when an administrator creates them on their seat: the same kind of credential, opened and spent identically. Unguarded: the link is the credential, its secret presented in the X-Crewlet-Reset-Secret header and never in the URL; the link a person follows is the dashboard’s screen, <api.external_url>/dashboard#/reset/<id>.<secret>. Answers {login, expires_at, min_password_length, first}: first is true when the person holds no password yet, so the screen asks them to choose one rather than a new one and warns of no sessions ending; it is derived from what the person holds, not stored on the link, so a reset link issued to somebody whose first link lapsed unspent is a first password too. Every way a link fails to open (an id that is no link, a secret that is not its link’s, a link spent, revoked, ended by a counter or aged out, a person suspended, retired or removed since) is one 410 reset_spent in the same bytes, and only a link that did not prove itself is a failed attempt on the per-minute failure row (method reset). A node whose identity rows cannot vouch for a link that does not open is 503 identity_unavailable instead, counting nothing, as the invitation’s view is. It meets no curve |
POST | /auth/reset/{id} | Sets a new password from a reset link, once. Unguarded. Body {secret, password}, the password held to the floor (422 invalid, naming the rule). One record sets it, spends the link with every other the person held and moves their revocation epoch (every session and machine token they held ends), judged by the link again in that record’s own snapshot, so a link spent from another tab in between is the same 410 reset_spent. Answers {status: "password_set", login} and no session: the person signs in next, where a second factor they hold still applies. A first password link is spent by the same record, and for somebody who never held a password it has nothing to end. Each spend is its own operation, so a second one (another tab, or a retry of a spend whose answer was lost) finds the link spent and is 410 reset_spent, never a password_set for a password nothing set; the password the first spend set is the one that works. Issued by an administrator: POST /iam/people/{id}/password-reset, or, for a person’s first password, the create itself (POST /iam/people) |
POST | /auth/password | Change your own password. Takes {current_password, new_password, code}; the proof is a step-up’s, taken in this request, so no step-up is asked first. The current password is verified on the step-up’s terms: on the throttle’s curve for the login you are signed in as, a wrong one the 401 sign_in_refused every failed sign-in answers, with field: current_password and a detail saying so. code is asked of anybody who holds a second factor, the current code from their authenticator app or one of their recovery codes, exactly as a step-up asks it: absent, 401 second_factor_required, which changes nothing and counts as no attempt; wrong or already spent, 401 sign_in_refused, counted on the person’s own curve as well as the pair’s (a wait past five seconds is 429 with a Retry-After); right, it is spent. (Without it, somebody holding your session cookie and password but not your authenticator could end every session you held and lock you out.) Somebody who holds no second factor sends no code. The new password is held to the password floor (422 invalid, naming the rule). Needs a person present: a machine token is 403 token_refused, and a session exchanged from a Tier A token, which is no person’s, is 403 forbidden. One record sets the password and moves the person’s revocation epoch, ending every session and machine token they held and every outstanding reset link; this browser is then handed a new session, proved now and answered in the sign-in’s own shape. A change this node has not applied yet is 202 with status: password_changed and no session (sign in again with the new password); one that finds the password changed by somebody else since it was verified is 409 stale with the cookie cleared, because that change ended this session too. See Changing your own password ends everything else |
POST | /auth/logout/{lineage} | End one named session, e.g. a laptop you left somewhere, from the browser you are using. Whether you may end it is the authority table’s, the same rule as DELETE /iam/people/{id}/sessions: your own on no proof at all (a session exchanged from a Tier A token counts the token’s other sessions as its own), and anybody else’s on admin, a proof inside step_up and a person present. A refusal is the table’s own envelope: 403 unauthorized naming admin, 403 step_up_required, or 403 token_refused for a machine token. A lineage nobody holds answers ended, as a session already over does (ended by a record, past its absolute deadline, revoked or invalidated), with nothing written or announced; “nobody holds it” is proved against the identity log’s end, so a node whose rows have not applied every record the log holds (behind, or holding one it could not apply) does not say it, since a session opened through a peer is a row it may still be missing. That node, and one that cannot read its rows at all, answers 503 identity_unavailable with a Retry-After and writes nothing, because the owner the caller is checked against is one of those rows (unlike POST /auth/logout, whose lineage comes off the cookie’s own signature). A close nobody can confirm is 503 with its op_id; asking again is a fresh close, and one that finds the first had landed answers ended |
GET | /viewer | Who is asking. The caller’s login; the grants they carry on this node, the effective set (every app an admin holds spelled out, unknown names dropped, and admin only where this node’s api.auth.admin serves it); the seat the identity directory binds them to, its handle, name and kind, all empty for a credential nobody is bound through; and owner, the name the caller’s own record (inbox, pins, priorities, personal views) is kept under: the seat for a person, or for a token or service account the directory binds to one, and the login for a credential bound to none. acts names the tools /operator/act would serve this caller (the catalogue’s writes the authority table can admit them to before any object is named, a write asking a step-up the caller has yet to make among them), always an array; a node that cannot yet decide acts answers 503 rather than an empty list. project is where a create of theirs that names no project files, "" for a caller bound to no seat or a seat whose team owns no project; space is where a page of theirs that names no container lands, by the same rule. A credential bound to no seat (a Tier A token’s session, a service account bound to none) is an ordinary state, not an error: a pipeline’s token acts under its own login, and binding it to a seat is a directory row. A person always holds a human seat, so is never answered unbound. config_writer is whether the caller’s credential may change the company document: false for an anonymous caller and for every credential a managed document’s api.auth.company_writers does not list (a person’s session, a machine token and a lead’s among them); it says nothing about authority, which admin or a lead’s subtree still decides. config_managed_by is the Tier A token ids that alone may change it when another system manages it, empty when nothing does and for an anonymous caller. assistant is whether Ask Crewlet is available to the caller on this node, {available, reason?, model, notice, can_assign, reads_images}, every member but reason always sent. model: {key, label} is the model Ask Crewlet is assigned (assistant.model and the model its entry names), null where none; can_assign is whether the caller holds the company document’s write, through which it is assigned (a step-up may still be asked). reason is the first reason it is not available: no_model (none assigned, or this node does not serve Ask Crewlet), model_problem (the assigned model is one no helper can run on), not_a_person (a machine token, a service account or a Tier A token’s session), no_permission, or model_not_ready, checked last so only a person Ask Crewlet would answer learns it: the model is known unusable right now, read from what the node already holds and never by calling a model (its plan spent until a reset, its harness signed out or with nothing that signs it in, or unable to start). With that reason notice is {code, message, hint?, retry_at?} (null for any other), the turn error a question would have failed with, in the same words, and the hint an administrator or anybody else is given. reads_images is whether a question’s images are handed to the assigned model, which its harness decides (Big tasks and images); where false the dashboard takes no image. chat_vendors names the vendor chat a company talks on, to a holder of chatlet (see the viewer question) |
GET | /home/board | Your own Home board, the home_board question: the widgets you placed on the dashboard’s Home and how you arranged them, kept under your seat so they follow you to every browser. About the caller alone, so everybody’s; served where the node reaches the coordination store. Its write is save_home_board |
GET | /ask/instructions | Your Ask Crewlet instructions and the company’s, the assistant_instructions question: how Ask Crewlet writes to you, the company’s layer (assistant.instructions) beside your own, kept under your seat. About the caller alone, so everybody’s; served where the node reaches the coordination store. Its write is save_assistant_instructions |
GET | /stream/snapshot | Dashboard initial-state bundle, served from the in-memory projection (REST fallback for the WebSocket) |
WS | /ws/stream | Live dashboard stream: agents, events, LLM invocations, health |
WS | /ws/dictation | Voice dictation: microphone audio in, the engine’s own recognizer’s partials and finals out; see WS /ws/dictation |
GET | /dashboard | Dashboard shell (/ and /dashboard/ redirect here; /static/{path} serves its assets) |
POST | /webhooks/jira | Receive Jira Data Center webhooks (Cloud arrives via /webhooks/forge) |
POST | /webhooks/slack/{handle} | Receive Slack Events API deliveries for one seat’s app |
GET | /webhooks/slack-oauth | OAuth install landing: finishes an install the Agents tab began |
GET | /webhooks/mcp-oauth | Where a vendor sends the browser back after an MCP server’s or an integration’s sign-in: finishes the sign-in its signed state names (see below) |
GET | /webhooks/mcp-oauth/client-metadata.json | The engine’s OAuth client metadata document, the client id a cimd sign-in is made as (see below) |
POST | /webhooks/github | Receive GitHub webhooks, HMAC-SHA256 over the raw body |
POST | /webhooks/github/{handle} | The same route addressed to one seat, where that seat’s own GitHub App delivers |
GET | /webhooks/github-app | Landing page for the per-agent GitHub App flow: converts the one-time creation code, or reports an install (see below) |
POST | /webhooks/gitlab | Receive GitLab webhooks |
POST | /webhooks/confluence | Receive Confluence Data Center webhooks, HMAC-signed. Cloud arrives on the two routes below instead |
POST | /webhooks/confluence/{event} | Receive one Confluence Cloud event, authenticated by the shared token the registered URL carries: X-Crewlet-Token first, ?token= as the fallback (Cloud honours no registration field for a header) |
POST | /webhooks/datadog | Receive a Datadog monitor alert, authenticated by a constant-time comparison of X-Crewlet-Token. Datadog signs nothing, so the token is the whole check: an unset one answers 503, and so does one shorter than 26 characters (see Datadog) |
POST | /webhooks/forge | Receive Forge events (FIT-verified) |
POST | /otlp/{token}/v1/{signal} | Engine-fronted OTLP receiver for sandbox telemetry (per-run token in the path). Mounted where CREWLET_SANDBOX_OTEL_RECEIVER_URL is set, or, for a node’s own direct boxes, where it runs seats: it binds api.port and forwards to OTEL_EXPORTER_OTLP_ENDPOINT, on a node without ingress to its own host’s loopback alone, as the bridge is |
GET POST DELETE | /mcp/{token} | The tool bridge: one running seat’s tool surface, served over streamable-HTTP MCP to the seat’s executor (its harness’s run in a box) by the node holding the seat, to which the node the call reaches relays it over the broker. Per-run token in the path; all three verbs because the transport uses them. A call is admitted under any Host, a proxy’s or tunnel’s public name on the node’s loopback included. 401 for a token that is forged, names a run that is over (a run’s token has no expiry of its own: the run’s end ends it) or names a job a relaunch replaced, and for a request on a job’s other token once its box has said which session it started (a job whose launch continues a session is handed one token per session its box may start: see Which session the box started). 503 with a Retry-After while no node can answer for the run’s seat, after waiting up to two seat-lease lifetimes for one, and at once where the node a call was relayed to let the seat go before serving it, or where a request opening an MCP session reached the run’s session just as it ended on the node that held it. 502 when the seat’s holder took the call and stopped answering before it wrote a status. Mounted only on a node that has a bridge: one given CREWLET_MCP_BRIDGE_URL, or one that runs seats and binds api.port, for its own direct boxes. A node without ingress mounts it on api.port beside its probes and serves it to its own host’s loopback alone, answering any other caller 404 no_route (see Probes on a node without ingress); on any other node the route is absent |
GET POST DELETE | /mcp/{token}/server/{server} | One of the seat’s MCP servers, served apart from the engine’s own tools at /mcp/{token} so the run’s harness can keep its tools out of each request (the tool bridge): that server’s tools alone, under the name the company gives it, with what the company says the server is for as its MCP instructions. Every call is the run’s, decided and recorded as one at /mcp/{token} is. Same token, transport, routing and refusals as /mcp/{token}; 400 for a server the run’s session does not serve |
GET | /mcp/{token}/steer/notes?after={seq} | The run’s notes: the notes waiting for its turn past the cursor, {"notes": [{seq, id, inbox, message}]}, held up to ten seconds while none waits and answered at once when one arrives. 503 with a Retry-After once the node is stopping (draining) or the run’s session has ended here (unavailable), the held poll included: its notes wait for the session’s next opening. Same token, routing and refusals as the bridge; 404 for a run that has nothing to steer |
POST | /mcp/{token}/steer/read | Record the notes the run’s harness put in front of its model, {"ids": [...]} (one to twenty: a turn’s ten notes and up to ten more meant for the job alone; at most 64 KiB): 204, or 503 with a Retry-After when the record could not be written; when the run’s session ended here as the read reached it or before it was recorded; while the run’s tools are closed here, its seat leaving the node or a person having stopped it; once the run’s record takes no read of its job any more, its completion having claimed the run; or where it names a waiting note sealed under a key this node does not hold (a node that holds the key records it: unavailable). The notes it did not record wait |
POST | /mcp/{token}/skill | Record that the run’s harness loaded one of the skills it was handed as its own, {"skill": "<name>"} (at most 4 KiB), naming the skill as the harness listed it: recorded as a load_tool_skill call on the run’s record, which unlocks the tools a required skill covers. 204 whether or not the name is one of the run’s skills; 404 for a run handed none. The plugin of an OpenCode run posts here; a Claude Code run’s hook reports the same load as a call of the bridge’s skill_loaded tool, which is never listed. Same token, routing and refusals as the bridge |
POST | /mcp/{token}/browser/frame | One frame of the run’s browser screen, posted by its box’s relay while somebody watches: the JPEG as the body (Content-Type: image/jpeg, at most 512 KiB) and its metadata in X-Crewlet-Frame (one JSON object, at most 1 KiB). 204 whether the job’s hub took it or dropped it as no newer than its newest. 415 unsupported_media_type for another type; 413 body_too_large; 400 invalid_body with why (metadata, not_jpeg for bytes that are not a JPEG whose header lies within its first 64 KiB, dimensions for one not the size its metadata names); 429 too_fast past the job’s 20 a second (a burst of 4) or the node’s 200 a second (a burst of 40), with the refusing limit’s own wait as its Retry-After, never under a second. On every browser route: same token and routing as the bridge; 404 not_found for a run with no browser to show (none, or one not ready at or above Chromium 153); 404 no_route for a verb this build does not serve; 405 method_not_allowed for another method; 503 with a Retry-After once the run’s session has ended here (unavailable), and, for the poll or a call still waiting for the seat’s holder, once the node is stopping (draining) |
POST | /mcp/{token}/browser/state | The run’s browser as its box sees it, JSON (at most 64 KiB): its tabs, at most 32, each named once, with at most one in front, the page the model’s tab calls last made current, a tab’s address never carrying a user name or password. 204 whether taken or dropped as no newer than the hub’s newest. 413; 400 invalid_body (why: state); 429 too_fast past 10 a second (a burst of 4) or the node’s limit, as a frame. Refused otherwise as a frame is |
POST | /mcp/{token}/browser/checkin | Whether the job’s model connection holds its box’s browser, and whether the box’s supervisor answers the relay (supervisor: answering or absent), JSON (at most 1 KiB) naming the job’s launch: 204. 413; 400 invalid_body (why: checkin), one naming another job among them; 429 too_fast past 10 a second, as a state. Refused otherwise as a frame is |
GET | /mcp/{token}/browser/poll?hub={id}&level={n} | Whether anybody watches the run’s browser: {"v", "hub", "level", "watch": {"on", "fps"}}, every field sent. Answered at once where hub names another hub (a first poll names none) or level is below the hub’s, and otherwise held up to ten seconds until the answer moves. One poll a job is held: a newer one answers the held one. 400 invalid_query for a hub or level it cannot read, or any other parameter. Refused otherwise as a frame is |
POST | /operator/mcp | Worklet, Doclet and Chatlet, served over MCP to your AI assistant. Always needs a credential, which for an assistant is a machine token acting as you: it files and moves work (see below). The catalogue is built per request: 503 no_active_revision until this node has met its first company, never empty after that. Pausing, resuming and steering a seat and answering a parked run concern the fleet’s own records, so every company is served them whatever backends it runs. Stateless: no session, so any node answers any request, and a GET or DELETE is answered 405 |
POST | /operator/act/{tool} | The same catalogue’s writes, one tool per request, as the principal your request resolves to: the dashboard’s write surface. Any credential the guard resolved; every tool is decided by the authority table, and the Idempotency-Key header is required (see below). Answers 503 no_active_revision before the first company, as /operator/mcp does, and 404 unknown_tool for a tool the company’s catalogue does not serve |
GET HEAD | /git/{repo}/info/refs | A git client’s advertisement of a repository the engine hosts, on a node whose roles name gitlet. git’s protocol, a person’s credential as the Basic password; a push only with one that resolves to a person. Always needs a credential, never on api.public (see Gitlet) |
POST | /git/{repo}/git-upload-pack | A clone’s or a fetch’s request (same) |
POST | /git/{repo}/git-receive-pack | A push (same) |
GET HEAD | /box/git/{repo}/info/refs | A box’s advertisement of a repository it was given, on a node whose roles name gitlet. git’s protocol, a box’s own credential as the Basic password: a coding box’s (user name run and its run’s token, admitted by the run’s row; see Coding boxes) or a check’s box’s (user name check and its check’s token, admitted by its attempt’s row to fetch one commit over protocol v2 and shown no ref; see Check boxes); never a person’s credential, and published on api.public beside a coding box’s other two edges. A node that serves none of Gitlet says why only to a token this fleet signed: any other request (no credential, a person’s, or a token that does not verify under the user name presenting it) is answered the box’s 401 challenge, the one Gitlet’s admission answers, whatever the reason; a signed one is told the 404 or 503 a person’s /git/ request is (git’s smart HTTP) |
POST | /box/git/{repo}/git-upload-pack | A box’s clone or fetch (same) |
POST | /box/git/{repo}/git-receive-pack | A coding box’s push (same); a check’s box pushes nothing |
GET | /box/gitlet/{repo}/tree | A check’s box’s listing of a directory of the commit its check measures (path or path_b64, recursive, cursor), on a node whose roles name gitlet, with the credential its git presents: user name check and its check’s token as the Basic password, admitted by its attempt’s row. Reads that one commit and no other: no revision is a parameter, and one named is 400. Answered as the box’s git is where a node serves none of Gitlet (see Check boxes) |
GET | /box/gitlet/{repo}/blob | A check’s box’s read of one file’s lines of its commit: path (or path_b64), start_line, end_line, cursor (same) |
GET | /box/gitlet/{repo}/diff | A check’s box’s diff of its commit from the base its attempt was queued with: paths (repeated) for the stat of those, or file (or file_b64) for one file’s patch, renames, cursor (same) |
GET | /atlas | The company’s atlas, a page of its entries at a time. Needs the atlas permission (see The atlas) |
GET | /atlas/map | The atlas drawn as its lanes: every lane, its groups, the entries of the open groups and the relations drawn at rest, or every relation between them (same) |
GET | /atlas/facets | How many entries each filter value leaves (same) |
GET | /atlas/log | The atlas’s own log, newest first, paged: what changed, when and in whose voice (same) |
GET | /atlas/activity | The log counted a day at a time over its last two weeks, for the company and for each entry, with each entry’s last change (same) |
GET | /atlas/work | How many open Worklet tasks name each entry, for a caller who also holds worklet (same) |
GET | /atlas/named | The entries a list of ids names, as rows: what a task’s linked entries are drawn from (same) |
GET | /atlas/{id} | One entry in full: its facts with their sources, relations, use, the agents holding accounts at it, its open signals, and what relies on it (same) |
GET | /atlas/{id}/trace | What depends on one entry, or what it depends on, hop by hop (same) |
GET | /atlas/{id}/log | One entry’s own lines of the log, newest first (same) |
GET | /atlas/{id}/work | The open and recently finished Worklet tasks that name one entry, for a caller who also holds worklet (same) |
GET | /gitlet/repos | The repositories the engine hosts, paged, at the caller’s freshness. Always needs a credential (see The code reads) |
GET | /gitlet/repos/{name} | One repository in detail (same) |
GET | /gitlet/repos/{name}/pushes | One repository’s push history, newest first in landing order, each push naming who made it (a person by credential and seat, a seat by its handle and the turn behind its push) and how its pack was built (same) |
GET | /gitlet/repos/{name}/readers | Who read a visibility: unit repository’s contents over a range of company days: every credential and the person it acted as, and every seat, with how often and how many bytes, paged. An admin’s (see below) |
POST | /gitlet/repos/{name}/verify | Begin a check of this Gitlet node’s copy of one repository against its rows, ?repair=true to repair what it finds (in place, or by a rebuild): 200 with its report where the check ends within a quarter of a second, else 202, the check running on (see below) |
GET | /gitlet/repos/{name}/verify/{id} | A check begun above: running, done with its report, or failed with why and what it found (see below) |
POST | /assistant/proposals/{id}/approve | Approve one of your own Ask Crewlet proposals. A proposal whose turn read through an app you no longer hold is not sent: it settles failed with the refusal access_withdrawn, and the turn ends. Needs your session cookie and a matching Origin only (an assistant grant is refused before routing), Content-Type: application/json, the Idempotency-Key header, and {"protocol_version": 3, "digest": "sha256:..."} echoing the digest the card showed, with an optional page_context: the screen you decided from, as it is now, which the resumed turn runs on (the actions it accepts, the draft as the change left it). A turn you asked without a page never gains one this way, and a page_context the screen’s own rules refuse is 400 invalid_body before anything is decided. Refusals: 404 not_found (not yours, or no such proposal), 409 proposal_already_decided (with its state), 410 proposal_expired, 409 proposal_digest_mismatch (nothing sent), 409 proposal_stale (the record moved since it was shown), 403 step_up_required (nothing recorded; confirm it is you and send the same request again), 503 unavailable with "outcome": "unknown" and the op_id to retry under for a decision nobody can confirm, and 503 unavailable without outcome for a condition of the node, which recorded nothing: its detail says what happened in a sentence, with a Retry-After exactly where waiting clears it. A server write is sent in process as you, once, under the proposal’s own operation key, and 202 answers its state (applied, failed or unknown), the turn and where its continuation streams. An unknown proposal is retried by approving it again: the same write, never a second one |
POST | /assistant/proposals/{id}/decline | Decline one of your proposals: the same body, header and refusals as the approval; nothing is sent, and Ask Crewlet is told. 200 with the proposal’s state |
PUT | /assistant/actions/{id} | A page claiming ({"state": "applying"}), then reporting, a page action you approved (the report may carry page_context, the screen as the action left it, read as the approval’s is), or a view change (confirm: none: a filter, a range, a lens) the turn sent to the page at once, recorded as a proposal it approved itself; the report of a view change settles it and resumes nothing. A screen read (confirm: read, page.read) is sent the same way once the turn has parked, changes nothing, and its report’s page_context (the screen as it is now) resumes the turn. The claim succeeds once across your tabs; another tab is 409 action_already_claimed. A claim must name the revision the screen is at for that action (its action_revisions entry, else source_revision): one whose screen moved since the action was prepared is 409 proposal_stale, and nothing is applied. A browser call (ADR-0186, browser.read, browser.act, browser.handoff or browser.end, its source_revision the desktop scope) is claimed the same way within thirty seconds of being made, then reported applied or blocked with browser: {code?, url?, title?, snapshot_id?, outline?, attached?, downloads?} (an outline of at most 16 KiB; at most 4 downloaded files’ names, those put on a field and those left for the person’s Downloads folder, never their contents) within three minutes of the claim, fifteen for browser.handoff; past those thirty seconds a claim is 409 proposal_already_decided and a tab that cannot run it reports unanswered, which before then is 409 action_not_due; either settles the call failed and resumes the turn. The report (applied, stale, blocked, invalid, no_handler, with the page’s revision) is the page’s own statement, which Ask Crewlet reads as client-reported; its revision, reason and receipt are each one short line, at most 256 bytes, and a longer one is 400 invalid_body. Idempotency-Key is optional: a claim sent again under its key is the same claim |
POST | /assistant/audit/conversations/{id}/read | An administrator’s compliance read of somebody else’s Ask Crewlet conversation (assistant.conversation.audit_read: admin, a recent proof, a person present, never Ask Crewlet). Body {"protocol_version": 3, "reason": "..."}, the reason required, at most 500 characters. The read is recorded first, beside your name and reason, and the conversation’s owner is shown it; then 200 answers the transcript and an assistant_conversation_read audit record names you, the owner and the reason |
POST | /assistant/audit/conversations/{id}/files/{file}/read | The same compliance read of one file the conversation keeps, same verb and body: the read is recorded beside the conversation first, the assistant_conversation_read audit record names the file as well (file_id), and 200 answers the file with every header of the owner’s download. A file the conversation does not keep is 404 not_found, and the read stays on its record. Absent on a node with no object store |
Auth. Every route needs a credential, reads included. Three shapes reach
every route: a session cookie from signing in (__Host-crewlet_session on
https, crewlet_session on plain http; only the name the deployment issues is
read, since a sibling host can plant the bare name); Authorization: Bearer
with a Tier A token, the deployment’s machine credential from
api.auth.tokens; and Authorization: Bearer with a
machine token (cwl_pat_…),
a directory member’s (person’s or service account’s) token, acting as its
owner. The two bearers are told apart by the value’s shape, which picks how it
is checked and admits nothing by itself. All three resolve to the same
principal. When a request carries a header and a cookie, the header
decides: a browser sends its cookie unasked, so a wrong header stays
anonymous instead of being upgraded by the cookie. /ws/stream reads the same
two: a browser cannot set a header on a WebSocket, so the dashboard sends its
cookie and any other client sets the header. No route reads a credential off
its URL, the socket included: ?token=… authenticates nobody (URLs land in
proxy logs and history). Never guarded: /health, /ready, /webhooks/*,
/otlp/*, /mcp/*, /box/git/*, /box/gitlet/*, the dashboard shell (/,
/dashboard, /dashboard/, /favicon.ico, /static/*), and /auth/config,
/auth/login, /auth/logout, /auth/invite/* and /auth/reset/* (a login
cannot require a login). That is an exact list, not a /auth/ prefix: the
same surface ends sessions and enrols second factors, and a prefix would leave
those with no credential. See
Configuration § Auth.
A git client is answered in git’s terms. On /git/* only, the token may
also arrive as the password of Authorization: Basic (the user name is
ignored), because a git client answers a Basic challenge from its credential
helper or a prompt. Basic is accepted nowhere else: a browser caches it and
replays it to every route of the origin. A refused git request answers 401
with WWW-Authenticate: Basic realm="crewlet", charset="UTF-8" and a text/plain body git prints (authentication required: use a Crewlet API token as the password (crewlet gitlet credential) — the helper that answers git’s prompt with the token, see
crewlet gitlet credential),
never the JSON below, which git shows as nothing. A git request with no
credential is the protocol’s normal first step, logged at debug as
api_auth_challenge; a credential presented and refused is
api_auth_failed, a warning, as on every route.
A token that is present and wrong is refused even where reads are open:
/ws/stream answers 401 rather than serving you as anonymous (which is how
a revoked token goes on appearing to work). A browser presents only its
session cookie, so a dashboard whose session ended gets 401 and sends its
reader to sign in.
GET /ws/stream without an Upgrade header answers 401 for a refused
credential and 426 Upgrade Required for an accepted one. This pairing is a
contract: a browser learns nothing about why a WebSocket handshake failed (no
status, no close frame), so the dashboard re-asks over plain HTTP to tell
“nobody is signed in” (sends the reader to sign in) from “the engine is down”.
The same re-ask reads a 503 identity_unavailable (the node cannot read its
identity estate yet) and dials again when its Retry-After says, and a 409 reader_changed (a handshake made for a reader the browser’s cookie is no
longer) and hands the tab to whoever it is.
api.auth.admin clamps a person exactly as it clamps a token. On a node
whose posture is refuse, every principal composed there loses admin and
keeps every app. The posture is applied when the request is resolved, not
stored, so a restart that changes it takes effect on the next request,
including for somebody already signed in.
A person whose seat is gone is 403 seat_unavailable, naming the seat,
and so is a Tier A token the identity directory binds to one (both bindings
resolve against the company this node runs). Their credential is valid and
signing in again changes nothing, so 401 would loop a browser through
sign-in. /auth/* is the exception, since its subject is a person’s own
credential, not their seat: ending a session, re-proving identity and enrolling
a second factor keep working, so an offboarded person can still sign out.
The guard is always mounted, with or without Tier A. An API built without
api.auth configuration has no token, so every guarded route (all but the
exemptions above) answers 401. No process serves this surface without a
guard.
A cross-site write is refused by its Origin with 403 csrf_origin,
whatever credential it carries, or none. The match is api.external_url’s own
origin plus every api.auth.allowed_origins entry. Reads are never refused for
theirs, nor are the server-to-server edges (/webhooks/*, /otlp/*, /mcp/*,
/box/git/*, /box/gitlet/*), which carry a credential of their own. The
sign-in routes are judged like every other write although no credential guards
them (POST /auth/login, /auth/invite/{id} and /auth/reset/{id}): a
sign-in posted from another page is how an attacker leaves a victim’s browser
signed in as somebody the attacker controls. See
Identity and Access § A cross-site write is refused by its Origin.
A permitted origin may send exactly the request headers the routes read,
and read exactly the response headers a client acts on. The preflight
answers a closed set and never echoes what the browser asked for, so a page on
an api.auth.allowed_origins entry can make every request the dashboard can;
the browser refuses a request carrying a header the preflight did not allow,
and hides every response header not exposed:
| Request header a permitted origin may send | Read by |
|---|---|
Authorization | the guard: the bearer token |
Content-Type | every route that takes a body |
Idempotency-Key | /operator/act, which requires it, and /worklet, /doclet/pages, /chatlet and /iam, which make a retry the same write by it |
If-Match, If-None-Match | /config and its entities, a work item, a page, a project file, an artifact’s publish and /setup’s forced disconnect; see Conditional requests |
X-Summary | a /config write’s revision summary |
X-Crewlet-Invite-Secret, X-Crewlet-Reset-Secret | GET /auth/invite/{id} and GET /auth/reset/{id}: a link’s secret, kept out of the URL |
| Response header a permitted origin’s script may read | What a client does with it |
|---|---|
ETag | writes it back as If-Match, or revalidates with it as If-None-Match |
Retry-After | waits that many seconds before asking again |
Accept-Patch | resends a refused PATCH /config in a format it names |
Allow | uses a method an OPTIONS or a 405 lists |
Content-Disposition | saves a downloaded project file under its name |
Location | reads a started verification of a Gitlet node’s copy (POST /gitlet/repos/{name}/verify’s 202) at GET /gitlet/repos/{name}/verify/{id} |
Content-Type, Content-Length and Cache-Control are readable unlisted, as
every CORS-safelisted header is. Not offered: X-Crewlet-Reader, which stays
same-origin (only the dashboard sends it, from this process’s origin, to say
which person a tab was opened for); headers only a browser or proxy sets
(Origin, Upgrade, Accept-Encoding, X-Forwarded-For); the webhook
routes’ vendor headers (no page calls /webhooks/*); the MCP transport’s
session headers (/operator/mcp and /mcp/ are reached by programs); and
Last-Event-ID, which Ask Crewlet’s stream resumes by
(the stream answers only a person’s own browser session and no answer allows
another origin credentials, so only the dashboard on this origin opens it). A
gate in internal/api/auth fails on any header a route reads or sets that is
neither offered here nor withheld for a stated reason.
And it may use every method a route serves: GET, HEAD, POST,
PUT, PATCH, DELETE and OPTIONS, the last for OPTIONS /config,
whose Allow and Accept-Patch say what the document takes. Every method but
the first three is preflighted, and the preflight names exactly the methods the
routes are registered with (a gate holds it to them), so an omitted method is
refused by the browser. See
Configuration § Auth.
A request that says who it is for is served only to them.
X-Crewlet-Reader: <principal id> (the person GET /auth/session answers)
names the principal a request is made FOR; the dashboard sends it on every
request a tab makes. A guarded route serves it only when its credential
resolves to that principal; anybody else is 409 reader_changed, written by
the guard before any handler runs, so nothing is read, written or audited and
no Idempotency-Key is scoped. This stops a window left open beside a sign-in
as somebody else (whose cookie moved under it) from making or retrying the last
person’s change as the new one; the dashboard hands that tab to the new person.
It holds under /auth/* too, so a Sign out everywhere pressed on the last
person’s Account ends nobody’s sessions; an unguarded route never reads it. A
request naming no reader (scripts, assistants, the command line) is decided as
before, as are nobody (401) and a node that cannot tell (503): there is no
principal to hold the name against. The value is compared as an id; one that is
not an id names nobody the credential is. It is not a credential and widens
nothing.
A socket’s handshake names its reader in its URL, since a browser sets no
header on a WebSocket: /ws/stream?reader=<principal id>. The guard reads
reader on a WebSocket upgrade only, and only where the request carries no
X-Crewlet-Reader (on any other request a URL is never a second way to say who
it is for), and holds it to the credential like the header, so a handshake for
somebody else is 409 reader_changed before the stream is served. A browser
reports that as a bare 1006, so the dashboard reads the 409 off its
plain-HTTP re-ask of the path (above). The principal id is not a secret (every
GET /auth/session answer carries it) but a proxy’s or balancer’s access log
of /ws/stream records it; the engine’s own logs name the path alone.
Every /webhooks/* route fails closed. They are exempt from the bearer
token because each verifies its provider’s signature; a route whose secret is
not configured answers 503 with Retry-After rather than accepting the
delivery. The sender retries and the delivery flows once the secret is set;
nothing is discarded, and nothing unsigned is ever recorded, published, or
shown on the dashboard.
Plus the surfaces whose reads are as sensitive as their writes: /config/*, /secrets/*, /setup/*, /operator/* — /operator/mcp and /operator/act — and Gitlet’s /git/* and /gitlet/*. Which credentials a company has not configured yet is a map of what to attack, and so is the company’s shape. So is a repository, the company’s source, which even a clone needs a credential to read, and so are the code reads, which name every repository and who pushed to it.
Every failed sign-in is one refusal
Section titled “Every failed sign-in is one refusal”POST /auth/login answers 401 sign_in_refused for every way it can fail (a login nobody holds, a wrong password, a person suspended, a person removed, a second factor that does not check out), and each spends the same argon2id derivation first.
Both halves are needed. Distinct codes would make the equal work pointless, and a missing derivation would make the single code pointless: a miss is verified against a dummy verifier at the same cost as a real one, because otherwise the absence of that cost is the answer. Every derivation waits for a slot of the node’s verify cap, first come first served; a request that goes away while waiting is answered 503 and counts as no attempt. Nothing is padded: what still separates the arms is the directory read before the derivation, and a stored verifier written at another cost than this build’s; see
Identity and Access.
So this surface is not a roster: a caller cannot learn who works here, nor test a list of addresses against it.
The exceptions are specific, and each discloses nothing the caller did not already have:
| Code | Why it is safe to be specific |
|---|---|
throttled | 429 with a Retry-After: the seconds until this attempt is admitted. Keyed on the subject as typed from the caller’s source, never on the source alone nor on what it resolved to, so a name nobody holds climbs the curve like a real one and a stranger learns only that they failed recently from where they are. Keyed on the resolved person it would be an oracle (“this account exists and I can slow it down”), which is why the one curve that is, a second factor’s, is reached only past the password |
second_factor_required | Reached only past the first factor, so it discloses nothing to a stranger; without it a client cannot tell “your password is wrong” from “now type your code”, which are different screens. POST /auth/step-up answers it, a 401, to a right password with no code from a person who holds a second factor. It is also the 403 a session that may only enrol a second factor meets at POST /auth/totp once its person holds one (enrolled since, from another session): a password alone never enrols over a factor; sign in again with it |
second_factor_enrolment_required | A status on a successful sign-in, and a 403 from every guarded route but three for the session it opened; reached only past the password. The deployment requires a second factor and this person holds none: the session may read GET /auth/session, enrol one at POST /auth/totp and re-confirm the password at POST /auth/step-up, and sign out at POST /auth/logout (no guard stands before it); enrolling replaces it with a whole session. Its own code rather than step_up_required, because no fresher password changes the answer |
invite_spent | Read by somebody holding the link, which is evidence it was issued to them. One code for redeemed, withdrawn and expired, and for a secret that is not the link’s (same bytes as an id nobody issued), because the remedy is the same and distinguishing them would say “already used” to somebody whose link merely aged out, or reveal which ids exist to somebody guessing secrets |
reset_spent | A password reset link’s 410, for invite_spent’s reasons: one code for spent, revoked, expired, a person the reset no longer reaches, and a wrong secret (same bytes as an id nobody issued). Ask an administrator for a new one |
A failure costs a wait, never a lockout
Section titled “A failure costs a wait, never a lockout”The sign-in routes are throttled by a curve, not a ceiling. Each failure doubles the wait before the next attempt on the same key (1, 2, 4, 8, 16, then 30 seconds, never more), and a correct credential after the wait always succeeds. A wait of up to five seconds is served inside the request; a longer one is 429 throttled with a Retry-After naming it. There is no lockout, because an outsider could cause one: keyed on a login it would shut that person out for as long as anybody kept typing their name.
One key: the login or address as typed (an address folded the way the directory folds one), from one source: the client’s address as the trusted proxies resolve it, an IPv6 client by its /64. It has no allowance, so the first failure already costs a second, and it catches a run at one account. A success clears that pair and nothing else (clearing more was a bypass: anybody holding an account could sign in as themselves between guesses at somebody else’s and wipe every record). An attempt still being checked counts as a failure against its pair until it resolves, so concurrent guesses at one account are served one after another along the curve.
A second factor also climbs the person’s own curve. Otherwise somebody holding a password could guess the six digits from every address they have, each a fresh pair (a /48 of IPv6 is 65,000 of them, enough to find a code in about an hour). So once the password has proved itself, the code is also decided on a curve keyed on the person the login resolved to, the same 1-to-30-second doubling: every address’s wrong codes climb it together, and a wait past five seconds is 429 throttled. It is keyed on the resolved person only here, because it is reached only past the password. The code that completes the sign-in lifts it, and the wrong code that takes the curve to its ceiling is announced as iam_second_factor_throttled, once per climb, because somebody holding that person’s password is guessing at their code, and the password is what to rotate.
No address is ever refused on its own. A source-only curve is one anybody sharing the address holds shut for everybody else: one stranger’s failure every twenty-five seconds, at any name, kept every sign-in from that office or proxy at 429. So one password tried against many names from one address meets no curve; it is bounded by cost (every name tried is an argon2id derivation under the node’s verify cap), by the password floor and blocklist, and shown by the audit trail’s per-minute failure count, which names the source. A credential that names nobody (an invitation link) meets no curve, and every refusal of one is still counted.
The window is fifteen minutes, and each node keeps its own curve: nothing is written to the coordination store, so a sign-in never waits on a round trip. On a fleet of N nodes serving sign-ins, a guesser spread across all of them by a load balancer is admitted up to N times as often as on one node: still one guess per node every thirty seconds at the ceiling, each an argon2id verification, against a password of at least twelve characters not on the blocklist, with a second factor behind it for a person who holds one. A node holds a pair under a keyed digest, never what was typed. See identity and access for why the curve is not shared.
A bearer is its own protection
Section titled “A bearer is its own protection”Every guarded route compares the bearer it is handed (a Tier A token, a machine token or a session cookie), and whether it matched is the whole answer. No curve stands in front: a bearer names nobody until compared, so a curve could only be keyed on the address, and a refusal decided on an address is one anybody sharing it holds shut for everybody else, the break-glass Tier A token included. What protects a bearer is its value: 32 bytes of crypto/rand in a machine token, an HMAC under the fleet’s keyring in a session cookie, and at least 26 characters in a Tier A value, which crewlet validate refuses shorter. Every refused bearer on a guarded route still counts as a failed attempt in the audit trail’s per-minute count by source, so a spray is seen; it is never answered 429, however many requests the address has in flight. An unguarded route (/health, /ready, the dashboard’s shell and assets, the webhooks, the sign-in routes) never compares a bearer: the request is anonymous there. The operate routes compare only the operate grant, against its digest, and log each refusal as operate_refused.
Every source is the proxy’s unless you say otherwise. Behind a proxy that is not in api.trusted_proxies, every caller shares the proxy’s address and so one curve per login (a stranger guessing at somebody’s login puts that person’s own sign-in behind the same wait), and every audit row names the proxy. crewlet validate warns when api.external_url is https and no proxy is trusted, and every node start logs the same warning as config_advisory, because the engine never terminates TLS itself.
Which permission a route needs
Section titled “Which permission a route needs”Holding a credential is not the same as being allowed to use it here. Every route and socket question declares who may ask it: everybody, one of the permissions (admin, worklet, doclet, artifacts, chatlet, gitlet, atlas), or a verb of the authority table that the answer decides record by record. A principal that does not carry what it declares is refused, a Tier A token included, whose declared permissions are read through the node’s api.auth.admin posture on every request.
403, not 401: 401 means present a credential, 403 means the one you presented does not carry what this needs. A person using one app meets the second on opening a screen of the other, so it must not tell them to go and get a new credential.
A 403 says which rule refused, and what would have admitted you. Beside "error": "unauthorized" it carries two detail fields wherever the authority table made the refusal: every question, the policy every /config/* and /iam/* route is mounted with, and the snapshot mirrors. The code is the table’s own mapping on every surface, the WebSocket’s frames included: unauthorized, step_up_required for a stale proof, token_refused for a machine token where a person must be present. No route spells one of those codes itself:
{ "error": "unauthorized", "message": "…", "reason": "no_grant", "grants": ["worklet"]}reason is the authority table’s word for the deciding rule: no_grant, not_self, not_lead, not_author, stage, seat_refused, seat_only (a person or token asking for a verb only an agent seat takes), unseated (a credential the identity directory binds to no seat asking for a verb made as one; bind it to a human seat, crewlet iam bind), token_refused (a machine token on a gesture that needs a person present, answered under the code token_refused rather than unauthorized), assist_refused and assist_scope (a request Ask Crewlet made on a verb its row keeps from it, or a write through a read grant: see
Every row says what Ask Crewlet may do with it), unnamed, and step_up on the one refusal the caller clears themselves (below). grants are the least that would have admitted this caller for this object: any one of them, added to what the caller holds, would. A Worklet row names ["worklet"], a relation the caller does not hold names ["admin"], a lead missing the app names the app, and a question either app answers names both. An empty grants is an answer, not an omission: no permission would (a seat-only verb, a verb made as a seat asked by a credential bound to none, or a relation the org chart does not hold). The human write surface answers its own refusals 403 forbidden in its tools’ wording instead.
The message follows the reason and names a permission only where one is the remedy. no_grant names the permissions in grants (“You don’t have the access this needs (Worklet)”); a refused relation (not_self, not_lead, not_author or unnamed) says what the rule asked and names grants as what would admit you anyway, or says no access would. Every other reason says what clears it, whatever grants holds: role, a share of an artifact below the role the verb asks (every route answering it names role, the role to ask the owner for), that its owner can share it with you at a higher one (the admin path admits whatever the shares say, but the share is what to ask for); unseated, a credential bound to a human seat (crewlet iam bind); stage, an account an admin activates (crewlet iam activate); seat_refused and seat_only, that the verb is a person’s or an agent’s; ceiling, that the person an agent is working for could not do it either; assist_refused, that Ask Crewlet never takes the gesture, which stays with you; assist_scope, that Ask Crewlet makes the change only as one you approve. (step_up and token_refused are answered under codes of their own, whose messages say what clears them: a fresh proof of who you are, signing in as yourself. not_shared is never seen: an artifact nothing relates you to is 404 not_found.) A refusal with no reason gets the code’s own sentence, which names every permission there is.
A request the node cannot decide (it holds no company yet) is 503 unavailable with a Retry-After, never a 403: a lead told they lead nobody goes looking for an authority they already hold.
| Needs | What it reaches |
|---|---|
| everybody | The overview, for every principal the guard resolved whose stage may act: /agents, /agents/activity and the agent and live_call questions (an agent’s status, with its body to an administrator and to whoever leads the seat, below), /org, /tools, /schedules and their runs, /budgets, /executors (status; same body rule), /tokens/*, /viewer, /stream/snapshot, /ws/stream, GET /iam/seats (masked per reader), /mcp-servers, /mcp-servers/{name} and /mcp-catalogue in a member’s reading, the seat_activity and colleague questions, and the cross-app answers filtered row by row: /feed, decisions, answered_decisions and the knowledge question |
worklet | The reads under /worklet/*, the write surface’s item routes, a project’s files (GET/PUT /worklet/files/…; removing one is the project lead’s), every work_* question, the inbox’s tracker half and the socket’s inbox_changed push for it, and /operator/mcp’s Worklet half. Some verbs also ask a RELATION: re-routing, a project’s policy and taking an item out of circulation are its project lead’s; a person’s inbox, queue and person view are their own and their lead’s |
doclet | The reads under /doclet/pages/* and /containers, the page questions, and writing Doclet’s pages. A rename, the trash and a restore are also the container’s lead’s or the page’s creator’s; see the write surface |
chatlet | The reads under /chatlet/*, every chat_* question, the socket’s eight chat_* pushes, and the chat tools of /operator/mcp and /operator/act, each made as a seat, so a principal acting as itself is refused them unseated whatever else it holds; which room it reaches is the chat domain’s own rule, not a permission (see Chatlet). A room’s horizon, an erase and a prune are admin’s instead, with a recent proof; see A chat erase, prune or horizon |
gitlet | Every door to the company’s code (ADR-0110): git under /git/, the reads under /gitlet/* and every code_* question but who read a repository and the Gitlet nodes’ cache report, the inbox’s code half, code_mark_inbox, code_mark_viewed and the socket’s inbox_changed push for that half, a turn’s code_change origin, and the code tools of /operator/mcp and /operator/act. A principal without it is refused 403 unauthorized naming gitlet before any repository is read. Behind it, WHICH repository and what on it is the repository’s grant (Gitlet): a person maintains every one, a credential bound to no seat reads every one and pushes none. Who read a repository (GET /gitlet/repos/{name}/readers, code_repo_readers), a verify (/gitlet/repos/{name}/verify) and code_status are admin’s instead |
admin | Running the company and the engine, and host access, conferred like it: the configuration it writes runs commands on every engine host (an mcp_servers entry, a seat’s mcp_env, a providers.llm model (a harness the host runs) and a direct cell, an entry’s run_in or providers.sandbox.default_run_in, which runs agent seats’ executors there as fully permissioned harnesses), so a holder can run anything there and read whatever a process there can, the keyring included (see Identity and Access). Every route under /config* (the org chart’s leads may also read and write what is inside the units they lead: A lead edits their own team), /integrations, the administrator’s reading of /mcp-servers, /mcp-servers/{name} and /mcp-catalogue and a restart (POST /mcp-servers/{name}/retry), /setup, every /secrets route, every /iam/* route about anybody but the caller, the deployment’s own controls (/fleet, /fleet/broker*, every /worklet/retention* route, /feeds/dead-letters*, /backup, /backups), the company-wide trail (/events*, the socket’s event push and the snapshot’s events section, the turn, phase, trace and A2A-channel questions, /iam/audit, /artifacts/trail), a seat’s resolved model chain and tool sources on /org, the workspace catalogue’s writes, a page in the tool-skills container, the artifacts’ quota counters (GET /artifacts/usage), the three purges (/worklet/items/{key}/purge, /doclet/pages/{id}/purge, /artifacts/{id}/purge) and chat’s three destructions (/chatlet/channels/{channel_id}/erase, /prune and /retention). It includes every app, and it is the admin path of every relation rule: a holder is admitted where a lead or an owner would be |
audit.seat.read | One seat’s own trail: /agents/{id}/memory, /agents/{id}/memory/episodes/{episode}, memory_overview (filtered to the seats the caller may read), turns?seat= and phases?seat=, an executor’s tail (/executors/{turn_id}/tail), and the seat’s executor sessions with each one’s transcript (/agents/{id}/sessions, /agents/{id}/sessions/{turn_id}). Decided per seat: its lead, or admin |
executors.browser.watch | One seat’s browser: the state it is in (/executors/{turn_id}/browser, executor_browser) and its screen (/executors/{turn_id}/browser/frames). Decided per seat: its lead, or admin. A person’s alone: an agent seat is refused it (seat_refused), and Ask Crewlet never takes it (assist_refused), since a page, a title or an address can show a credential in clear |
A question asked on the socket is decided by the same declaration as the REST route (one registry, both transports), so a channel is no way round a permission.
A status reader never receives a transcript
Section titled “A status reader never receives a transcript”Everybody sees what the agents are doing; only some read what they said. An
agent’s and an executor’s answers split into a status half and a body
half — on the agent and live_call questions, the agents, snapshot and
executors pushes and their mirrors (/agents, /stream/snapshot), and
executors — and the body goes only to an administrator, to whoever leads
that seat (audit.seat.read), and, for an executor’s parked question, to the
person it is put to. The body is a call’s trigger, prompt,
prompt_messages, response, tool_executions with its calls_elided and
elided_calls, round_narration,
partial_round and the arguments of each running_calls entry, an llm_history entry’s
payload, and an executor’s task_description, question,
question_context, decision, held_call, held_arguments, reply, bridge_calls and bridge_elided_calls (held_call also
to the person the question is put to, held_arguments never). A status reader receives the rest with body_withheld: true and the body’s version counters at zero, so a client never marks the
call stale and asks for a body it will not be sent. A work item a call or a
turn names (work_item, an llm_history entry’s work_item and task_id
tags) is Worklet’s, and is left out for a reader without worklet.
Some gestures ask how recently you proved who you are
Section titled “Some gestures ask how recently you proved who you are”A session lives for days, so the gestures that change what a company is ask for a recent proof of identity: the step-up. The same authority-table row decides it as the permission, so a REST route and a socket question about one verb cannot disagree. It is asked only after the permission or relation admitted you: a caller who could never make the gesture is told what they lack.
| Window | Setting (default) | What asks for it |
|---|---|---|
step_up | sign_in.step_up_seconds (1 hour) | Every write under /config* (a dry run excepted), /setup’s writes, PUT/DELETE /secrets/{name}, POST /secrets/rekey and revealing a value (GET /secrets/{name}?reveal=true, POST /secrets/reveal), the deployment’s own controls (POST /backup, POST /objects/migrate, every POST /worklet/retention*, both POST /fleet/broker/remove* and POST /feeds/dead-letters/{id}/discard), the three purges (POST /worklet/items/{key}/purge, POST /doclet/pages/{id}/purge, POST /artifacts/{id}/purge), chat’s three destructions (POST /chatlet/channels/{channel_id}/erase and /prune, PUT /chatlet/channels/{channel_id}/retention), and every /iam write: POST /iam/people, PATCH /iam/people/{id}, DELETE /iam/people/{id}, POST /iam/invitations, DELETE /iam/invitations/{id}, POST /iam/people/{id}/mfa/reset, POST /iam/people/{id}/password-reset, POST /iam/credentials, DELETE /iam/credentials/{id}, ending somebody else’s sessions and POST /iam/invalidate-all; and your own POST /auth/totp and POST /auth/totp/recovery |
| none | Every read (including GET /worklet/retention/maintenance, GET /worklet/retention/reanchor, GET /feeds/dead-letters); ending your own sessions (DELETE /iam/people/{id}/sessions naming yourself; an administrator ending somebody else’s asks step_up); changing your own password (POST /auth/password), whose current password (and code, if you hold a second factor) is the proof; and every work, knowledge, artifact and chat verb but the three purges and chat’s three destructions: the tools, /operator/mcp, /operator/act and the rest of the human write surface |
A proof that is too old is 403 step_up_required, the code the sign-in
surface answers for the same fact, carrying the window so a client can ask the
person to confirm and resend the same request via POST /auth/step-up (password
and second factor):
{ "error": "step_up_required", "message": "…", "reason": "step_up", "window": "step_up", "grants": ["admin"]}The step-up replaces the session it was made from, ending it first and keeping its absolute deadline.
window is spelled as the setting that sizes it, and there is ONE window over
every sensitive gesture (GitHub’s sudo-mode practice, at its stricter end).
GET /auth/session answers the deadline the table judges against (reauth_at)
and whether it is already due (step_up_due), so a screen can say so before
somebody submits.
A request is judged at the instant it arrived. Every check one request
makes (its route’s, whatever the handler decides after reading the body, such
as each part of a /config write or ?reveal=true on a secret, and every tool
a route calls for it, as the human write surface’s
routes do) uses that instant, so a proof fresh on arrival never lapses
half-way through.
A credential with nobody at a keyboard is fresh by construction: a Tier A
token (and a session exchanged from one), the development principal, and a
personal access or service token. They can present nothing else, and the
break-glass credential must reach a step-up gesture on the day nobody can sign
in as a person. What keeps a machine token off gestures needing a person is
neither the clock nor a permission it cannot carry (a token may be minted with
admin) but two locks.
- Every row that needs a person says so, and a request presenting a machine
token is refused there
403 token_refusedwithreason: token_refusedand nogrants, since no permission would change it. Itsmessagesays a token cannot do this and its owner must, signed in (unauthorized’s is about a missing permission). The rows: revealing a secret; every/iam/*write that changes who may do anything; ending every session in the company; changing how somebody proves who they are (POST /auth/totp,POST /auth/totp/recovery, and revoking a password, a second factor or the recovery codes throughDELETE /iam/credentials/{id}); an artifact’s forced publish, transfer and purge; and, about anybody but the token’s own owner, minting or revoking a token and ending sessions. A token may still revoke its owner’s tokens, itself included, and end its owner’s sessions, which ends it too: what somebody who finds one leaked reaches for. - The identity domain refuses every administrative record (an enrolment, an
invitation, an edit of somebody’s row, a suspension, a removal, ending
everybody’s sessions) written through a machine token,
403 token_refused, whatever the token carries, at the record, so a CLI or a duty is held to it as a route is.
POST /auth/step-up refuses a token itself: there is nobody to confirm. No tool
a seat may take asks for a proof, since a seat has no keyboard; the one
human-only tool that does, code_purge_unreachable, never asks it of a token.
A node that cannot read identity answers 503, never 403. The principal a
node could not check and the principal that carries nothing are the same empty
value, and reporting the first as the second tells everybody with a good
credential that theirs is invalid for the whole outage. So an unreadable
identity estate is 503 identity_unavailable with a Retry-After; only a
credential this node positively checked and refused is a 401 or 403.
A path is taken as it was sent, or refused
Section titled “A path is taken as it was sent, or refused”A request path with a . or .. segment, or an empty one (//), spelled out
or percent-encoded (%2e%2e), is refused 400 non_canonical_path before
anything reads it, not cleaned and redirected: the credential exemption and the
handler are both chosen from the path, and a path reading as /webhooks/… to
one and /config to the other is what an authority gate must never face. Send
the path it resolves to.
Security headers on every response
Section titled “Security headers on every response”Every response the API writes carries four headers, set before its status line
(a 304 carries them too):
| Header | Value |
|---|---|
Content-Security-Policy | The policy for what the response is (below) |
X-Frame-Options | DENY |
X-Content-Type-Options | nosniff |
Referrer-Policy | no-referrer |
| Response | Content-Security-Policy |
|---|---|
The dashboard shell (/dashboard), /favicon.ico and every /static/* asset | default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data: blob:; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self' https:; require-trusted-types-for 'script'; trusted-types 'none' (Trusted Types enforced with no policy, since the dashboard writes no markup or script sink), then frame-src naming the artifact origin on a deployment that serves artifacts |
The landing pages /webhooks/github-app, /webhooks/slack-oauth and /webhooks/mcp-oauth | default-src 'none'; img-src data: (a page’s mark is inlined, since /static/ is not served on the public listener these pages move to), then style-src and script-src naming the sha256 hash of each page’s own inline block ('none' where a page has none), then base-uri 'none'; form-action 'none'; frame-ancestors 'none' |
Everything else: JSON, plain text, the redirect from /, a 404 or a 401 | default-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none' |
A script on this origin acts with the signed-in person’s session (the cookie is
HttpOnly, but every request carries it), and the landing pages are
unauthenticated pages on that origin rendering query-string values. So each
response carries its own policy: the dashboard runs only its built bundle, a
landing page only the style and script the engine wrote into it, and no response
may be framed by another site.
form-action on the dashboard allows https: as well as 'self' for one flow: creating a seat’s
GitHub App posts the app manifest as a form to the code host (github.com or
the configured GitHub Enterprise Server base). A reverse proxy should pass these
headers through unchanged; one adding its own Content-Security-Policy produces
two policies, and a browser enforces both.
Some answers also carry Cache-Control: no-store: every response under
/config (the whole company document); a /secrets reveal’s value; and
every response under /auth, refusals and redirects included: the request
guard’s own (401 invalid_token, 403 second_factor_enrolment_required, 503 identity_unavailable), the origin
check’s 403, the router’s 404 and 405, and every route’s. Those hold a second-factor seed and its otpauth://
URI, recovery codes shown once, who the caller is, an invitation’s address, and
every sign-in’s Set-Cookie. The guard sets it for the whole prefix before
anything beneath writes, so a newly mounted route is covered. Without it a
browser’s disk cache, or a shared proxy for everybody behind it, keeps those
past the tab, the session and the step-up. It is no-store because private
still lets the browser keep it and no-cache only revalidates what was kept.
An answer read by object id is kept under who it is for. An answer whose
bytes are a function of what its request named (a repository’s content read by
whole object ids) is sent with a strong ETag,
Cache-Control: private, max-age=31536000, immutable and
Vary: Authorization, X-Crewlet-Reader only to a request that names who it is
for: a bearer in Authorization, or the reader a dashboard tab names on every
request for its person (X-Crewlet-Reader), which the request guard holds to
the session it rides beside. The browser keys it on that bearer or reader, not
the session cookie, which the engine re-issues every five minutes of use (the
key would stop matching and every kept page would be asked for again). Signing
in, a re-issue, and the session a step-up, a second factor’s enrolment or a
password change opens leave the browser’s cache alone. So does any answer to a
request presenting a cookie the engine no longer accepts (ended, expired or
never valid): that answer deletes the cookie and nothing else, on every route,
the dashboard’s own files and /health included.
A request that names nobody is kept by no cache. A tab that opened an API
route itself presents its cookie alone, and a browser keys a kept answer on the
headers Vary names, so the answer would be kept under one key for the next
person to sign in on that browser. Not every person reads the company’s code
(one without the Gitlet permission is answered none of it,
ADR-0110),
so such a request is answered the same body with Cache-Control: no-store and
no ETag.
Signing out empties the browser’s cache. POST /auth/logout,
POST /auth/logout/all, and POST /auth/logout/{lineage} when it ends the
session the browser holds, carry Clear-Site-Data: "cache" beside the cookies
they clear, so what a named reader kept is emptied. A browser honours it only in
a secure context (https, or a loopback address) and where it implements the
directive (Firefox again from 138, after dropping it from 94); a reverse proxy
should pass it through unchanged. Chrome holds the sign-out’s answer while it
empties the cache, longer for a larger cache. Where it is not honoured, a kept
answer stays until eviction, under its reader’s key. The dashboard’s own files
are fetched again once after a sign-out.
Read-side handlers live in the internal/api package (one module per domain:
agents, events, tokens, org, fleet, mcpstatus, executors,
budgets, integrations, webhooks, dashboard, health); webhooks and
/config/* keep a stable external contract, while the read/stream surface may
evolve since the dashboard is its only consumer.
/iam/* — the company’s people, credentials and sessions (auth-gated)
Section titled “/iam/* — the company’s people, credentials and sessions (auth-gated)”Always guarded, reads included: a map of who can reach a company and how is
worth as much to an attacker as the permissions. Nothing under /iam is on the
exemption list and nothing ever will be.
| Route | Who |
|---|---|
GET /iam/people | admin |
POST /iam/people | admin |
GET /iam/people/{id} | the person themselves, or admin |
PATCH /iam/people/{id} | admin |
DELETE /iam/people/{id} | admin |
POST /iam/invitations | admin |
GET /iam/invitations[?all=true] | admin |
DELETE /iam/invitations/{id} | admin |
GET /iam/people/{id}/sessions | the person themselves, or admin |
DELETE /iam/people/{id}/sessions | the person themselves, or admin |
POST /iam/people/{id}/mfa/reset | admin |
POST /iam/people/{id}/password-reset | admin, for somebody holding no permission the caller does not |
GET /iam/credentials[?person=] | the person themselves, or admin |
POST /iam/credentials[?person=] | the person themselves, from their own session; admin for a service account only; never a request presenting a machine token |
DELETE /iam/credentials/{id}[?person=] | the person themselves, or admin; revoking a password, a second factor or the recovery codes needs a person present, so a machine token revokes machine tokens only (403 token_refused, nothing written, whether or not the node had listed the credential before). Revoking a person’s last authenticator app revokes their recovery codes in the same record, each announced, because codes alone are a second factor every sign-in would ask for with only those single-use answers |
POST /iam/invalidate-all | admin, a person present and a recent proof (the record layer refuses a machine token too). Ends every session and every machine token |
GET /iam/seats[?unheld=true] | everybody: each holder’s name and kind to every reader, their person id, login and stage to an administrator and the holder themselves, and the open invitations and ?unheld=true to an administrator alone (403 naming ["admin"] otherwise) |
GET /iam/check | admin |
GET /iam/node-tokens | admin |
GET /iam/audit | admin |
Every write here asks for a recent proof, inside step_up (an hour by
default); see
Some gestures ask how recently you proved who you are.
Ending sessions differs by arm: ending your own asks for none, because it is the
first thing to do on finding an intruder (and it ends every machine token you
hold too); an administrator ending somebody else’s asks step_up.
The object a route names is a person ID, never a login. The estate keys on an id because a person changes their login; a self check against a mutable name would open somebody else’s row the day they swapped.
Editing your own row is not a self gesture. PATCH /iam/people/{id} has no
self path at all, since changing your own permissions is the escalation this
estate closes (the credential mint and session end are the two gestures a
person legitimately makes about themselves). The record layer refuses it again:
a caller may not confer a permission they do not hold, on anybody, themselves
included, on an edit, a POST /iam/people enrolment and a
POST /iam/invitations alike, each 403 naming the permission. Judged through
iam.Expand, so an administrator may confer every app.
An administrative record is never written through a machine token. An
enrolment, an invitation, an edit of somebody’s row, a suspension, a removal, a
reset link and POST /iam/invalidate-all are refused 403 token_refused when
the request presented a pat: token, whatever it carries, by the authority
table’s row and again by the identity record itself, so the CLI and every other
path publishing a record is held to it.
A listing says what still works. A session’s live and a credential’s
revoked are the request guard’s reading: a session or machine token ended by
its person’s revocation epoch (a password change, signing out everywhere, an
administrator ending their sessions, a suspension) or by
POST /iam/invalidate-all is listed ended, and a named sign-out of a session
listed live finds it live. A session keeps the ended_reason and ended_at of
whatever ended it: a revocation writes its own on every session it ends and a
later one never rewrites them. POST /iam/invalidate-all writes nothing per
session, so it lists its sessions ended “with every session in the company” and
no ended_at; neither counter writes a revoked_at on a token. A session a
revocation had already ended when its start landed is listed ended “with every
session they held”, no ended_at, and no later revocation claims it.
Every write answers three ways
Section titled “Every write answers three ways”| Outcome | Status | Meaning |
|---|---|---|
applied | 200 (201 on the four routes that hand back what they created: POST /iam/people, POST /iam/invitations, POST /iam/credentials, POST /iam/people/{id}/password-reset) | This node has the change; the next read here sees it |
pending | 202 with the position | The record is durable and every data node will apply it; this one has not yet, so read at that position to see it |
unknown | 503 with a Retry-After, "outcome": "unknown" and the op id | The only safe retry is the same one: send the op id back as Idempotency-Key, since a fresh id would defeat the ledger that makes the retry safe |
Every body carries its outcome and op_id.
Nothing is built on, handed out or announced for an unknown. A removal, a
revocation, a second-factor reset or a withdrawn credential announces its event
only once the record is durable; an invitation with an unknown outcome hands out
no link, a person’s create no first password link and a mint no token, each
being a value that would answer 410 or 401 on first use. A write this node
refused to decide at all (behind, below the trim floor, or holding a record it
cannot decode) is 503 unavailable with the op id. It has a Retry-After only
where waiting clears it: a node behind or below the floor carries the identity
estate’s two seconds; one that is evicted or holds an undecodable record, a log
at its byte ceiling, a record larger than the broker takes and a refusal the
broker named carry none, since the same request is refused the same however
often sent, as on /worklet. /auth follows the same rule on every write. On
both, a write whose snapshot kept moving until the framework gave up is
409 stale, as on /worklet: nothing was wrong with the request or node, so it
carries no Retry-After and the same request sent again decides afresh and
lands. An edit (of a person here, or of your own account on /auth: a password
change, a second factor, recovery codes, a sign-out) is told in the words every
surface tells a lost race in, asking you to look at it again first. A gesture on
/auth that edits nothing you can look at (a sign-in, a step-up, a token
exchange, an invitation’s redemption, a reset link’s spend) is told only to try
again.
A gesture that is several records answers its weakest. An edit moving a
login and a stage, and a reset followed by its revocation, are sequences: a step
answered unknown ends the sequence there (nothing after it is published over a
guess), and a step still pending here makes the whole answer 202. A create
is one record, its seat and a person’s first password link included.
A request without an Idempotency-Key is a new operation every time, with
an op id of its own (two different edits of one person, a second “end every
session” or a second company-wide invalidation are two operations; an op id
derived from the object alone made the broker collapse the second into the
first, acknowledged and never applied). Send a key when you mean a retry, and
only then.
A create is named by its key. POST /iam/people derives the person it
creates, and POST /iam/invitations the invitation it issues, from the
operation’s key: the Idempotency-Key when sent, otherwise one minted for the
request and answered as op_id. So the retry an unknown asks for names what
its first attempt may have created: a person that attempt created is answered
from the ledger as applied, and an invitation that landed is answered with its
own link and the deadline it was issued with. The invitation’s id and its link’s
secret are derived under the company’s own key (id from the operation key,
secret from the id), so the retry hands back the very link the first attempt
issued, and an operation key is never a way to compute one. A person’s first
password link is derived the same way, from the person under the company’s
key, so the retry hands back that link with the expiry it stored, or, where it
no longer opens (spent, revoked or aged out), no url and a detail saying to
issue a password reset link
instead. A retry reaching a node that has not applied the create finds the
person or invitation absent there and answers 503 unavailable with the write’s own outcome (pending or applied, never unknown), the op_id, a person’s
id, a Retry-After and a detail saying what landed: send the same request
again under the same key to be handed the link. A new key is a new create,
refused by the address and seat the first now holds. Because the key names what
a create creates, it is a uuid7, as every op_id is; anything else is
400 op_id_invalid naming the header. The same key with a different body
(another address, login or grants) is 409 invalid_input naming
Idempotency-Key as its field and carrying the op_id, as on every surface
taking a key; so is the key of an invitation since redeemed or aged out: a retry
is the same request, and a new person or link is a new key.
An address, login or seat somebody else holds is 409 invalid naming who
holds it: field says which value, held_by is the holder’s id, and detail
names them by login. An open invitation holds its address and seat as surely
as a person, so a value one holds is the same 409 invalid naming the
invitation instead (the id DELETE /iam/invitations/{id} takes), its detail
saying to cancel the invitation first or let it lapse. A seat is named in the
detail (a handle is no secret); an address never is, since the estate holds it
only as a blind.
A person holds a human seat for as long as they are here. A person’s create
or an invitation naming no seat, or an edit that would clear a person’s seat, is
400 seat_required with field: seat, its own code because the remedy is
always that field. A seat the company this node runs does not hold, or holds as
an agent’s, is 400 invalid_body (every binding, a service account’s too, names
a human seat). A seat named on a node that runs no company yet is
409 no_active_revision with a hint, as GET /iam/seats is there: no wait
supplies a company, so it is not the 503 a retry clears.
A refusal on authority is 403, never lands however often retried, and its code
says what would change it.
- A permission would lift it (a record only
adminwrites, a permission the caller cannot confer because they do not hold it):403 unauthorizedwithreason: no_grantand thegrantsthat would lift it. - The directory’s own rule makes it whatever the caller holds (a person’s token
asked for by anybody but that person, a permission the owner does not hold, an
owner who may not act, a permission this build does not know on the person’s
row):
403 forbidden, the rule’s sentence indetail, noreasonorgrants. - A request through a machine token:
403 token_refused.
Other 400s:
- A login outside its holder’s kind: a person’s is dotted (
jane.doe), a machine’s is coloned (ci:release, ortoken:<id>to bind a Tier A token), at most 64 characters either way, checked on create and rename. Every principal holds a login (what a person signs in with, the name a lead finds them by, theby jane.doein every trail reason, and the only thing that finds a service account), so a service account’s create without one is400, and a person’s create without one takes the login proposed from their address, as an invitation’s form does ([email protected]→jane.doe). - A
kindother thanpersonormachine, since a seat belongs to the company document and the engine is the node. - A
reasonlonger than 256 bytes (it is rendered into the authentication trail beside the op, so it names which cause fired rather than narrating), and a permission this build does not know, added (by a create, an invitation,add_grantsor a whole-setgrantsnaming one the row does not already carry), refused naming the six; one already on the row is kept, andremove_grantsmay name it.
A write’s reason is optional; without one the record says what was done and by
whose login, in words (suspended by jane.doe, every session ended by jane.doe, invited by jane.doe), which is the trail’s detail and, for a
suspension or ending somebody’s sessions, what each ended session is listed as
ended by. An enrolment is one record, so a refused create leaves nothing behind
and the corrected retry lands.
POST /iam/people creates a person on their seat, or a service account
Section titled “POST /iam/people creates a person on their seat, or a service account”A person past the company’s people limit, counted with its open invitations, is refused 409 limit_reached with limit: "max_people", as an invitation past it is; a service account is never counted.
{ "id": "0192f00d-…", "kind": "person", "login": "sam.lee", "seat": "qa-lead", "credential": "0192f00e-…", "url": "https://crewlet.example.com/dashboard#/reset/<id>.<secret>", "expires_at": "2026-06-15T09:12:00Z", "detail": "This link is shown only once. Send it to them yourself (Crewlet doesn't send email). It expires at the time above.", "outcome": "applied", "op_id": "0192f00c-…", "position": "CREWLET_IAM_LOG@0:1842"}The body is {kind, email, seat, login, name, grants, reason}, and kind
defaults to person. email, seat and login are trimmed before judging.
grants is required, for a person and a service account alike (any of
admin, worklet, doclet, artifacts, chatlet and gitlet, and [] for
the overview alone). An
omitted field is 400 invalid_body naming grants, decided before any key is
read or link minted, since a body naming neither every app nor none is one whose
author did not decide. A name this build does not know is the same 400,
naming the six. The whole create is one record, which the directory decides
against every row (address, login and seat together), so a refused create has
created nobody and issued nothing.
A person is created onto their seat. seat is required: a human seat no
person and no open invitation holds, by its handle (GET /iam/seats?unheld=true
lists them). Left out, it is 400 seat_required naming field: seat, before
any key is read or anything minted. email is required too: it is what they
sign in with. login may be left out; the create takes the one proposed from
the address ([email protected] → jane.doe, [email protected] →
jane.example) and answers it as login; an address with nothing to propose
from is 400 invalid_body naming field: login. A created person is active
from the moment the create lands: an administrator creating them is their
enrolment, and what they lack is a password.
And handed their first password link. The same record issues it, and the
201 carries it once (credential, url and expires_at) with a detail
saying so. The url is the dashboard’s reset screen,
<api.external_url>/dashboard#/reset/<id>.<secret> with the credential as its
id, and its view (GET /auth/reset/{id}) answers first: true so it asks the
person to choose their password. Spent through POST /auth/reset/{id}, it sets
that password once and signs nobody in: they sign in afterwards, and enrol a
second factor there where the company requires one. It is good for a week
(an invitation’s week, being the same person’s position) and is a reset
credential like any other: listed among their credentials, replaced by a
password reset link
issued later, and ended by whatever ends one (an edit adding a permission to
them, a suspension, their sessions ended, POST /iam/invalidate-all). Send it
yourself: this engine sends no mail. Its issue is one
iam_password_reset_issued event with first: true (for whom, by whom, until
when, never the link), published by the call whose record carried it and by no
retry. So a person’s create needs api.external_url; a node with none answers
500 no_external_url with nothing created. A service account’s does not.
A service account (kind: machine) needs a login (coloned, svc:ci, or
token:<id> to bind a Tier A token) because it has no address to be found or
proposed by; email is optional. Its seat is optional: one given binds it to
act as that seat and must be a human seat no person and no open invitation
holds, as a person’s must. It gets no link (it has no password) and proves
itself with a token minted on it, POST /iam/credentials?person=<id>.
A retry hands back the same link. The person is derived from the operation’s
key and the link from the person under the company’s key, so the retry an
unknown asks for (the same body under the op_id it handed back) answers the
link the first attempt issued, with the expiry that attempt stored. One that no
longer opens is not handed back: no url, and a detail saying to issue a
password reset link. An unknown carries the person’s id and the op_id,
never a link.
| Answer | When |
|---|---|
201 | Created, a person and a service account alike: {id, kind, login, seat?, credential?, url?, expires_at?, detail?} beside the outcome, op_id and position every write carries; the link’s three fields for a person only. 202 is the same answer for a record this node has not applied yet |
400 seat_required | A person’s create that names no seat |
400 invalid_body | No grants field, or a name in it this build does not know (field: grants); a seat the company this node runs does not hold, or holds as an agent’s; a person with no address; a service account with no login; a login outside its kind’s grammar, or none to propose from the address (field: login); a kind other than person or machine; a name or a reason past its cap |
400 op_id_invalid | An Idempotency-Key that is not a uuid7 |
403 unauthorized | A permission the caller does not hold |
403 token_refused | The request presented a machine token: an enrolment is an administrative record, refused through a token whatever it carries |
409 invalid | An address, a login or a seat somebody holds (held_by), or an open invitation holds (invitation) |
409 invalid_input | The key of an earlier create sent with a different body (field: Idempotency-Key) |
409 no_active_revision | A node that runs no company yet: it holds no human seat to create anybody on, and the hint says to import or create a company that declares one |
500 no_external_url | A person’s create on a node with no api.external_url |
503 unavailable | A create nothing can confirm ("outcome": "unknown", with id and op_id), or a node that refused to decide it: send the same request again under that op_id |
POST /iam/credentials mints a machine token
Section titled “POST /iam/credentials mints a machine token”The owner is the person the route names (?person=, or the caller), never a
body field, because that is the value the authority table decided on. A
person’s token is minted by that person alone: it acts as them and its value
is shown to whoever minted it, so admin mints for service accounts and never
on a person’s account. A person mints their own with no ?person= from their
own session; crewlet iam token -login makes exactly that request, signing in
for it and out after. The body is {"label", "expires_in_days", "grants"},
every field optional:
grantsomitted: the token carries every permission its owner holds that whoever mints it may confer,adminincluded where the minting session holds it, and the owner’s apps alone on a node whoseapi.auth.adminisrefuse(no session carries admin there).grants: []: reads the overview alone.- Lifetime defaults to 90 days.
A token may carry admin; what keeps it off gestures needing a person is the
authority table’s presence rows and the identity record’s refusal of an
administrative record written through a token. The answer is 201 with
{"id", "person", "token", "grants", "expires_at", "position"}.
| Answer | When |
|---|---|
400 bad_params | No owner: a Tier A token owns no machine tokens, so it names the service account with ?person= |
400 invalid_body | An expiry in the past or more than 365 days away, a label past 128 bytes, an owner already holding 64 live credentials (a revoked or expired one gives up its place to the new token, the earliest to lapse first, so revoking an unused token makes room at once) |
400 invalid_body (field: grants) | A permission this build does not know, named beside the five |
403 token_refused | The request presented a machine token |
403 unauthorized | A service account’s token asked for without admin; a permission the caller does not hold (grants names it) |
403 forbidden | A person’s token asked for by anybody but that person; a permission the owner does not hold; an owner who may not act; the row that binds a Tier A token (token:<id>) — detail says which |
404 | Nobody by that id |
Idempotency-Key is ignored here, deliberately. A retry of a mint that
landed would hand back the first attempt’s record (whose secret was shown to
nobody) beside this attempt’s value, a token that verifies against nothing. A
mint answered unknown is retried as a new mint, and the one that may have
landed is a token nobody holds, which expires. So its 503 carries
"outcome": "unknown" and the op_id (which finds the attempt in the trail),
and its detail says to mint again, not to send the op_id back as every other
unknown here does.
Presented as Authorization: Bearer cwl_pat_…, the token acts as its owner (a
person’s seat, or a service account’s where bound to one) carrying the grants it
was minted with that the owner still holds, cut to the node’s ceiling. It
answers 401 where the node knows it is no good and 503 identity_unavailable
where the node cannot tell, including a node that has not yet applied the mint.
See Machine
tokens.
An edit moves a login and a seat in one record, and that record goes first
Section titled “An edit moves a login and a seat in one record, and that record goes first”A person’s login and seat are the directory’s, decided in one record against every other row; their stage and document (name, grants) are their own subject’s. So PATCH /iam/people/{id} is up to three records, and the login-and-seat record goes first: it is the one a value somebody else holds can refuse, and refused first, nothing has landed. A login somebody holds, or a seat somebody is bound to or an open invitation holds, is 409 naming which; a login its holder’s kind’s grammar refuses is 400. The record states the login and seat held from now on, so the old ones are free the moment it lands. login and seat are trimmed before anything judges them.
A person’s seat is moved, never cleared. seat names the human seat to move somebody to. A person always holds one, so seat: "" about a person is 400 seat_required (the identity record’s own refusal, decided on the row’s kind in its snapshot; nothing landed). To free a person’s seat, move them to another or remove them. A service account is unbound with seat: "".
Grants are the whole set or a change to it, never both. grants replaces what the person holds (what crewlet iam grant sends) among admin, worklet, doclet, artifacts, chatlet and gitlet; admin includes every app, and the dashboard and CLI store every app beside it, so taking admin away later leaves the apps. add_grants and remove_grants are applied to what the row holds when the record is decided. Sent whole, an editor working from an earlier read would bring back a grant another administrator took away meanwhile and drop one they gave, and nothing would refuse it, since only an addition needs the caller to hold the permission. The dashboard’s edit sends the change.
Everything the surface can judge alone is refused before the first record:
- a
loginof""(a login is only changed, never cleared); - a
stagethis build cannot name; - a
reasonpast 256 bytes; grantsbesideadd_grantsorremove_grants;- a name in both;
- a name this build does not know added, in
add_grantsor in a wholegrantsnaming one the row does not already carry:400naming the six.remove_grantsmay name one; one already on the row is kept and ignored; - permissions the caller may not confer:
403.
What only a later record can decide (a grant the caller’s own row stopped letting them confer a moment ago) is refused by that record, and the steps before it have landed. So a refusal after the first record carries landed (the fields changed: identity, stage) and a hint; an unknown met partway carries landed too.
A seat is named by its handle, which is immutable, and the binding records it. Naming the login and seat a person already holds is a no-op (200, no record). A seat the running company does not hold, or holds as an agent’s, is 400 invalid_body (a typed value). A node that runs no company yet answers 409 no_active_revision: it holds no human seat and no wait supplies one. A node holding an identity record it cannot decode refuses a login or seat change 503 with no Retry-After: the record may hold the value, so another node decides it.
Values that are shown once
Section titled “Values that are shown once”POST /iam/invitations answers the invitation URL, POST /iam/people a person’s first password link, POST /iam/people/{id}/password-reset a reset link and POST /iam/credentials the token. None is stored or readable back: the estate holds the invitation’s id and a SHA-256 of the secret its link carries (likewise for a first password link and a reset link), and a SHA-256 of the token. A lost invitation is cancelled and issued again; a lost first password link is handed back only by the retry of its own create under the same key, and is otherwise replaced by a reset link; a reset link is simply issued again.
The invitation URL is the dashboard’s invitation screen:
<api.external_url>/dashboard#/invite/<id>.<secret>The credential is in the fragment, which a browser never sends, so neither half reaches an access log. The screen reads GET /auth/invite/{id} with the secret in the X-Crewlet-Invite-Secret header and redeems with POST /auth/invite/{id} carrying it in the body.
POST /iam/invitations takes {email, seat, grants, reason} and answers 201 with {id, url, expires_at, seat, detail} beside the outcome, op_id and position.
grantsis required, as onPOST /iam/people: what the link confers (any ofadmin,worklet,doclet,artifacts,chatletandgitlet;[]for the overview alone). An omitted field or unknown name is400 invalid_bodynaminggrants, decided before any key is read or link minted.seatis required: the human seat the invitee will hold, by handle. One left out is400 seat_required, answered before any key is read or anything minted. It must be a human seat that no person and no open invitation holds: A seat the running company does not hold and an agent’s seat are400 invalid_body, one a person holds is409 invalidnaming them, one another open invitation holds is409 invalidnaming thatinvitation, and a node that runs no company yet answers409 no_active_revision.- The link is good for a week.
An open invitation holds its seat exactly as it holds its address, from issue until it is redeemed, cancelled or lapses: a create, a move or another invitation naming the seat is refused naming it, GET /iam/seats lists it against the seat, and a /config write that would take the seat out of the company is 409 seat_held naming it. Redeeming creates the person bound to that seat in one record. A seat the company has removed, or made an agent’s, since the issue (only an offline crewlet config import or a write racing the issue can do that, since a /config write refuses while the invitation holds it) is the link’s 410; the remedy is a new invitation.
POST /iam/invitations on a node with no api.external_url is 500 no_external_url: no address a link could point at, and only the node’s own configuration file can supply one.
GET /iam/invitations lists them, and never a link
Section titled “GET /iam/invitations lists them, and never a link”{ "invitations": [ "grants": ["worklet", "doclet"], "invited_by": "people-lead", "created_at": "2026-06-08T09:12:00Z", "expires_at": "2026-06-15T09:12:00Z", "state": "open"} ], "next": "", "position": "CREWLET_IAM_LOG@0:1840"}Lists the invitations nobody has redeemed and that are still good, paged on their id as GET /iam/people pages (?after=, ?limit=). ?all=true adds the expired and redeemed ones the estate still holds (until the sweep collects them); state says which: open, expired or redeemed, the last with redeemed_at and the person it created. Every row names the seat it binds and, while open, holds. invited_by names its author as every record does: a person by their seat’s handle, a Tier A token or service account by its login. The address is opened on this node’s keyring and a row it cannot open reads sealed, as a person’s does. A redeemed row whose person has since been removed carries no email and is not sealed, because a removal erases every value of theirs other rows hold. No row carries the link, its secret or what the estate keeps of it.
DELETE /iam/invitations/{id} withdraws one nobody redeemed
Section titled “DELETE /iam/invitations/{id} withdraws one nobody redeemed”One directory record, with ?reason= recorded on it. Its apply deletes the invitation’s row, so the link answers 410 as one nobody issued, and the address and seat it held are free at once: the address for a new invitation or a create, the seat for a create, another invitation, a move, or a /config write that removes it. It reads an Idempotency-Key like every keyed write here.
- An id the estate does not hold (never issued, already cancelled, or collected by the sweep) is
404. - A redeemed invitation is
409 stalenaming thepersonit created: the redemption overtook the reading the cancel was made from and the link is spent; removing that person undoes it.
Each cancellation is an iam_invitation_cancelled event, by the invitation’s id and never its address.
POST /iam/people/{id}/password-reset issues a one-time link
Section titled “POST /iam/people/{id}/password-reset issues a one-time link”{ "id": "018f3a9c-…", "credential": "0192f00d-…", "url": "https://crewlet.example.com/dashboard#/reset/<id>.<secret>", "expires_at": "2026-06-09T09:12:00Z", "outcome": "applied", "position": "CREWLET_IAM_LOG@0:1841"}201 with a link that sets the person a new password once: the dashboard’s reset screen, the credential’s id and a secret in the fragment, built as an invitation’s link is. A node with no api.external_url answers the same 500 no_external_url.
- The link is a
resetcredential on the person, stored as the SHA-256 of its secret and good for 24 hours; it travels out of band to somebody locked out. - It is listed among the person’s credentials (
GET /iam/credentials?person=) and revoked like any of them. Issuing another revokes the one before: a person holds at most one, the first password link their create issued included. So a reset link is also how somebody whose first link lapsed or went astray gets a new one; their reset screen then says it sets their first password. - Once spent it is listed
revokedandspent: true, since setting the password revokes every link the person held, the one used included. It also ends the person’s sessions and tokens. - It is stamped with their revocation epoch and the company’s session generation, so it is refused (and listed
revoked) once any of these moves either: a suspension, a second factor’s reset (POST /iam/people/{id}/mfa/reset), signing them out everywhere, ending their sessions, orPOST /iam/invalidate-all. A reactivation does not bring it back. A link needed beside any of those is issued after it, or it is410 reset_spentwhen opened. - A machine is
409(no password; mint it a token). So is a personsuspendedorretired, naming thestage: reactivate them first, since a link would hand back an account somebody stopped. - A person holding a permission the caller does not is
403 unauthorizednaming it, judged in the record’s own snapshot: whoever issues the link could spend it, so it is held to the rule an invitation and an edit are, that nobody hands out what they do not hold. An administrator holds every app, so what reaches that refusal today is a name this build does not know, kept on the row; no permission would make it one, so it is403 forbidden, naming the name indetail.
Shown once, and no key is read. A replay could not hand back a secret its first attempt never showed, so the route ignores Idempotency-Key. An issue whose outcome is unknown is 503 naming its op_id, with no link; issue again, which revokes the one that may have landed. Each issue is an iam_password_reset_issued event (for whom, by whom, until when; never the link). Spending it is POST /auth/reset/{id}, among the /auth routes above: it sets the password, ends every session and machine token the person held, and signs nobody in.
GET /iam/people pages on a key the applier writes
Section titled “GET /iam/people pages on a key the applier writes”A person’s id is a uuid7, so ordering by it is creation order and next is the last id of the page. Nothing sorts on a name or address: both are ciphertext in every row.
?q= narrows on the login and the seat, the only two identity values held in the clear (a name search would open every person per keystroke).
A removal deletes the person’s row, so a removed person is not listed, except on a node that has not applied the removal yet. Ciphertext this node’s keyring cannot open (a key dropped before crewlet secrets rekey moved the values off it, or a restore under a different keyring) renders as sealed: the right keyring ends it, and it is never an outage.
GET /iam/seats lists the human seats and who holds each
Section titled “GET /iam/seats lists the human seats and who holds each”{ "seats": [ {"handle": "founder", "name": "Founder", "holder": {"person": "018f3a9c-…", "name": "Jane Doe", "kind": "person", "login": "jane.doe", "stage": "active"}}, {"handle": "qa-lead", "name": "QA Lead", "unit": "quality", "invited_by": "founder", "expires_at": "2026-06-15T09:12:00Z"}}, {"handle": "designer", "name": "Designer", "unit": "product"} ]}Every human seat of the company this node runs, in the company’s declared order, with what holds each. Everybody reads it (it is the org chart’s people, named; the org chart is everybody’s overview), masked per row. The example above is an administrator’s.
holderis whoever the directory binds to the seat at any stage short of removal (a suspended or retired person still holds it), withname(opened on this node’s keyring, orsealed: true) andkind, which says which remedy frees it: apersonis moved to another human seat or removed; amachine(a service account, or a Tier A token’stoken:<id>row) is unbound.nameandkindgo to every reader;person,loginandstageonly to an administrator and the holder.invitationis the open invitation naming the seat (not redeemed, not past expiry at this node’s clock), which holds it until redeemed, cancelled or lapsed:id(whatDELETE /iam/invitations/{id}cancels), the address (opened on this node’s keyring, orsealed),invited_byandexpires_at. Never a link. Only an administrator is sent it; to anybody else an invited seat lists as vacant.- Neither, for a vacant seat: the one a person can be invited into or created on (
POST /iam/invitations,POST /iam/people), which is what the seat’s Invite and Add person in Company › Structure do.
?unheld=true keeps only vacant seats: one with a holder or an open invitation is left out, since each holds it against a create, invitation and move alike. It is an administrator’s helper; anybody else is refused 403 unauthorized naming ["admin"]. A non-boolean unheld is 400 invalid_query. Where two open invitations name one seat (a residue only a build before invitations held seats, or a restore, leaves) the newest is listed; a holder and an invitation on one seat are both listed.
A listing, not a report: what is wrong with a binding is /iam/check’s. A node that runs no company yet answers 409 no_active_revision with a hint: it holds no human seat to list, so the company declaring one comes first. A node that cannot read the directory answers 503, never a list of vacancies built from what it could not read. So does one holding two rows bound to one seat (left only by a retained record or a restore): it cannot say which holds it, and another node can.
GET /iam/check walks the whole directory
Section titled “GET /iam/check walks the whole directory”{ "findings": [ {"kind": "binding_dangling", "person": "018f3a9c-…", "login": "jane.doe", "seat": "platform-lead", "detail": "seat \"platform-lead\" isn't in the org chart anymore. Move them to another human seat, or remove them"} ], "position": "CREWLET_IAM_LOG@0:1840", "people_with_admin": 2, "bindings_unchecked": 0}kind is one of four, and the report is sorted in this order, stably (within a kind the directory’s order holds, so two nodes over the same rows print the same report):
no_admin_holder: nobody left who can administer the company except through a Tier A token, i.e. no active person holding an enrolled credential (a password, second factor or token: a way in they have used) holdsadmin. An unspent first password link does not count, since a company whose only administrator has not chosen a password cannot be administered yet. Neither does a service account holdingadmin: a machine token never writes an administrative identity record, so it can invite, grant and revoke nobody.people_with_adminis that count.person_without_credential: somebody active with no live way in at all: a person whose first password link lapsed unspent or was revoked, or whose every credential has been; a service account holding no live token. A live link is a way in, so a person created a minute ago is not reported until theirs lapses. An invitation creates nobody until redeemed, so it is never the cause.binding_dangling: somebody bound to a seat the company no longer holds as a human seat.admin_clamped_by_node: a row holdingadminon a node whoseapi.auth.adminisrefuse, which clamps it away here: that person keeps every app on this node and administers nothing through it.
Each finding’s detail says what to do, and the table in crewlet iam check says the same per kind.
binding_dangling is decided by the request path’s own seat table, so it names exactly the people a request would refuse or hold off for want of their seat: a seat the company no longer holds, or holds as an agent seat. The detail says which, and the remedy for the holder’s kind: a person is moved to another human seat or removed, a service account unbound or moved. This report is the one place a dangling binding is said; no alarm raises it, since it is a fact about the company’s content rather than a node. A Tier A token’s row is reported like anybody’s, under its token:<id> login.
bindings_unchecked counts the bound people whose seat this node could not judge because it runs no company yet. They are neither reported as dangling nor silently left out, so a report answered before the node’s first apply does not read as clean; ask a node that runs the company.
GET /iam/node-tokens joins this node’s Tier A labels to the directory
Section titled “GET /iam/node-tokens joins this node’s Tier A labels to the directory”A Tier A token acts under its own login, token:<id>, and a directory row holding that login binds it to a seat: a service account’s row, created bound to a human seat in one request (POST /iam/people with kind: machine, login: token:<id> and seat). The label (in a node’s Tier A file) and the row (through this surface) are written in two places, so a label mistyped on either names a login nobody holds, and the token keeps working as itself, unbound, while its operator believes it acts as a seat. /iam/check names a binding whose seat is gone; this names a token whose row was never there. It is a fact about one node’s configuration, so ask each node whose Tier A you want checked.
{ "tokens": [ {"id": "ci", "login": "token:ci", "row": "none", "company_writer": true}, {"id": "ops", "login": "token:ops", "row": "held", "person": "018f3a9c-…", "stage": "active", "seat": "platform-lead"} ], "company_writers": ["ci"]}Labels, never values: id is the token’s label in this node’s Tier A. row is none when nobody holds the login (the token acts as itself) and held for a row, whose person, stage and seat follow (the seat by handle, absent when the row binds the token to none). What the row holds, never a verdict on it: whether that seat is still one the company holds is /iam/check’s binding_dangling finding about the same row. A failed directory read answers 503 with a Retry-After, never a list missing a row. It backs Settings › API tokens.
company_writers is api.auth.company_writers, sorted: the token ids that alone may change the company document when another system manages it, and [] when nothing does (every credential may, as far as that rule goes). company_writer: true marks each of this node’s tokens the list names; the key is absent on every other token (and on every token when the document is not managed). An operator reading the deployment’s api.auth thus sees whether the document is managed, and by which credential.
GET /iam/audit pages by position, never by time
Section titled “GET /iam/audit pages by position, never by time”No two nodes’ clocks are compared anywhere in this engine, so since and before are log positions. A caller holding a timestamp passes at= and the route resolves it once, against the rows’ own instants. The answer carries the position this node had applied, so a reader can tell a quiet directory from a lagging node.
Each entry names its actor and actor_kind, and, where there is one, operator_id, the credential the actor acted through: pat:<id> for a machine token acting as its owner, session:<lineage> for one of their browser sessions, a Tier A token’s own login. A token acts as its owner, so actor is the owner either way, and operator_id tells their token’s gesture from their own. A gesture a person makes through the sign-in surface (signing in or out, spending a second factor, redeeming an invitation, setting a password from a reset link, enrolling their own authenticator) is theirs: the node writes it under its own authority, and the entry names the person as actor and the session it opened or closed as operator_id (their login, where it came through no session yet). An entry the engine decided for itself (a sweep, a re-seal, a password re-hashed at the current cost, a company-wide invalidation) names the node, with actor_kind engine, and no operator_id.
An entry about somebody names them by person, their id, and by login, the login their row holds when the trail is read; login is absent once they are removed, since the removal erases what identified them and the trail keeps the id.
/config/* — live config management (auth-gated)
Section titled “/config/* — live config management (auth-gated)”Every /config/* route takes admin, reads and writes alike, whatever the credential (a Tier A token, a session, or the development principal). A caller without it is refused 403 unauthorized naming admin (see Which permission a route needs). The routes that can change the org chart (PUT and PATCH /config, a revert, and the seat and unit entity routes) also admit a unit’s lead for what is inside the units they lead, read and judged change by change (see A lead edits their own team). A write also asks for a proof of identity inside step_up, and a session whose proof is older is refused 403 step_up_required (see Some gestures ask how recently you proved who you are). See the Configuration concept doc for the full auth model.
A managed document refuses every other writer. When Tier A lists api.auth.company_writers, only those token ids may change the document: PUT, PATCH, every per-entity PUT, a revert and the ?dry_run=true check of each answer any other credential 403 config_managed, before anything is read or stored, and /setup’s connect, disconnect and GitHub App routes answer the same refusal before they touch the secret store or a vendor. Reads and POST /config/reload stay open to whoever the authority table admits: admin, for a read and a reload alike. The body names who manages the document and what to do:
{ "error": "config_managed", "managed_by": ["gitops"], "detail": "The company config is managed by gitops. The credential \"founder\" can read it but not change it.", "hint": "Change it in the system that manages it (the token \"gitops\"). Edits here get overwritten. To rotate a leaked credential, write it to /secrets and POST /config/reload. To manage it here, remove `api.auth.company_writers` from every node's config file and restart."}403 rather than 401: the credential was accepted, and a different one is the managing system’s to hold, not the caller’s to retry with. See Managed configuration.
The active revision is the fleet’s, on every node. Every answer here (GET /config and its ETag, the revision list’s is_active, a diff against active, the references, the charter and the entity reads) and the base every write is built on is the revision the fleet’s activation pointer names: the active revision. Every node answers it alike, whatever that node runs; one still applying it, or one that refused it and runs the revision before, answers the fleet’s revision all the same. So the read after a write answers the write on every node, and a write sent to any node is built on what the fleet runs. What each node runs is separate, reported per node by GET /fleet as config_serving_revision_id. A node that has not reconciled since the pointer moved answers from the body the pointer carries: no read writes anything, and the node’s next reconcile keeps the copy. With no pointer at all (a new fleet, or a lost pointer) the active revision is the company this node knows (see Concurrent writes).
A coordination store that cannot be read is 503 unavailable. Every write, and every read but a diff between two revisions this node holds, both named by id, reads the pointer. While it cannot be read the request answers 503 unavailable with Retry-After: 2 and a reason saying the fleet’s activation
could not be read: never an answer from this node’s own store (whose ETag every write would refuse), and never “nothing is configured” (which would send a create-only write to replace the running company). A store electing a leader is out for a few seconds; send the request again. That holds for a 503 without an outcome field only: a write that had already stored its revision when the store stopped answering is 503 with "outcome": "unknown", which is not sent again (see Status codes).
Read-only:
| Method | Path | Description |
|---|---|---|
GET | /config | The active revision (the fleet’s), redacted (full JSON; ?format=yaml for YAML). ?section=<key> answers one top-level section’s own value (assistant, integrations, …); any other key is 400 bad_params naming the sections, and one the document leaves unset is 404 no_such_entity |
GET | /config/revisions | Paginated history of the revisions this node holds (newest first), metadata only; the fleet’s revision is marked is_active |
GET | /config/revisions/{id} | Single revision including its payload |
GET | /config/revisions/{id}/diff?against=<uuid|active> | Structural diff |
GET | /config/references | Every ${VAR} the active document names, and every variable it reads without naming it, each with the config path of the field that reads it, plus the revision they were read from |
GET | /config/charter | The company’s mission, vision and policies, with an ETag of their content. See The charter |
The dashboard reads four of those facts over the query channel instead: config, config_audit, config_diff and config_entities, each operator-gated like the prefix. The reference index has no query; the Secrets screen reads it over REST beside /secrets.
Why the reference index is a route and not a client-side scan. It answers “what breaks if I remove this credential”. The config keeps ${VAR} pointers, so a removed row leaves every pointer at it resolving to the empty string, and the surfaces holding one start refusing deliveries with nothing naming the row that went away. A client-side scan of GET /config would need a second copy of the ${VAR} grammar (a looser pattern once displayed a literal secret unmasked, and another once minted a live credential into a variable nothing reads), and would miss references the read masks: GET /config shows a credential only when it is one whole ${VAR}, so "Bearer ${TOKEN}" arrives as "__redacted__".
The index is built from the unredacted document and answers names and paths only, never a value. The path is the operator’s own spelling (integrations.github.webhook_secret), the one a validation failure reports; a name with several readers appears once per reader. It also lists every variable the document reads without naming it: a providers.llm entry whose credential field is empty signs in from a conventional variable instead: its harness’s token variable under subscription (CLAUDE_CODE_OAUTH_TOKEN, which crewlet llm login -capture-token stores), its key variable under api-key
(ANTHROPIC_API_KEY; never a variable other vendors’ keys share, such as Qwen
Code’s OPENAI_API_KEY, which such an entry names in auth.api_key), and CREWLET_LLM_CLI_<KEY>_CREDENTIALS for the bundle crewlet llm export -secret-store stores.
providers.embeddings with no api_key reads OPENAI_API_KEY. Each is reported at the empty field (providers.llm.default.auth.token), where a reference would be written instead; removing that row signs the entry out as surely as removing one it names. The index carries the document’s own ETag, because it changes exactly when the revision does.
Full-document write:
| Method | Path | Description |
|---|---|---|
PUT | /config | Replace the active revision. The body is JSON or YAML, read the same way whatever Content-Type says. Requires a revision summary: an X-Summary header, or a top-level _summary key in the body. Conditional via If-Match / If-None-Match, see below. ?dry_run=true checks it and stores nothing, see Dry runs. ?import=true writes it as an import of a restored file, see The charter |
OPTIONS | /config | 204 with Allow and Accept-Patch: application/merge-patch+json |
PATCH | /config | Merge one or more sections into the active revision, see below. ?dry_run=true checks it and stores nothing |
POST | /config/reload | Re-publish the fleet’s document unchanged, so every node re-applies and re-reads the secret store. See below |
POST | /config/revisions/{id}/revert | Create a new active revision whose payload equals revision {id} |
PUT | /config/charter | Replace the mission, vision and policies, as a new revision of the whole document. Requires If-Match. See The charter |
PATCH /config — the narrower write
Section titled “PATCH /config — the narrower write”A JSON Merge Patch (RFC 7396): send only the sections you are changing, in the shape the document already has.
The registered media type is application/merge-patch+json; plain application/json and an absent Content-Type are accepted too. Any other patch format is 415 with an Accept-Patch header naming what would work, notably not application/json-patch+json, an RFC 6902 list of operations this surface does not serve. Editing one list member is what the per-entity routes are for: a patch addresses by structure, and a seat’s position in a unit’s list is not its identity, so an index-addressed edit rewrites a different seat the moment anything above it moves.
curl -X PATCH https://engine.example.com/config \ -H "Authorization: Bearer $TOKEN" -H "X-Summary: allow one more self-iteration per turn" \ -d '{"turn_engine": {"max_iterations": 4}}'- Deep merge.
{"providers": {"llm": {"main": {"model": "claude-opus-5"}}}}changes that model and leaves the provider’s type, keys and every other provider alone. nulldeletes.{"integrations": {"gitlab": null}}removes the section.- Arrays replace. RFC 7396 cannot address a list element, so
mcp_servers: [...]in a patch replaces the whole list; so doroles:andunits:, replacing every seat or unit at that level. Edit one throughPUT /config/mcp-servers/{name},PUT /config/roles/{handle}orPUT /config/units/{id}. A replacement does not remove a field this build cannot represent: see Fields a newer build wrote survive every write. - Unknown keys are refused, not ignored, so a typo cannot silently change nothing while the caller believes otherwise. That holds whatever the key is set to,
nullincluded: deleting a key this build does not know is refused, because the write carries it back and the caller would be told a deletion landed that did not. - Validated as the whole document it produces. A section fine alone is refused when it leaves the company invalid.
- Same summary rule and same
If-MatchasPUT /config, and a 409 when nothing is active: a patch is defined against a document. - A patch that changes nothing stores nothing. One that leaves the document as it stands answers
200withchanged: falseand the active revision, needs no summary, and activates nothing: see A write that changes nothing.
A document is held to what its activation carries. Every write that stores a revision (PUT, PATCH, a per-entity PUT, a reload and a revert) hands the document to every node sealed, as the activation’s body: one value of the coordination store, which holds a key to 6,290,346 bytes (Coordination). A body is held to 4 MiB, but a patch is merged onto the active document and the seal writes it a third larger. A write whose sealed document is past that is refused 413 body_too_large before anything is stored, naming document_bytes, body_bytes and max_body_bytes; a dry run is refused the same way. Make the document smaller: about four and a half mebibytes of company document is the most a body carries. The summary is not counted in it: it rides the activation pointer, which every node reads on every probe, and is held to 4,096 bytes as the pointer encodes it (a " or \ is two bytes there, a control character six), refused 400 summary_too_long naming summary_bytes and max_summary_bytes.
If-Match matters more here than on the full write. A PUT carries the caller’s whole intended document; a PATCH is merged against whatever is active at that instant. See Concurrent writes for what the engine does and does not guarantee.
What a write answers
Section titled “What a write answers”Every write that stores a revision (PUT, PATCH, a per-entity PUT, a reload and a revert) answers 201 with the revision, its epoch, and what the engine makes of the stored document:
{ "revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "epoch": 42, "warnings": [ { "kind": "dangling_reference", "ref": "manages", "path": "roles[0].manages[1]", "segments": ["roles", 0, "manages", 1], "seat": "ceo", "unit": "", "from": "ceo", "to": "ghost", "message": "seat \"ceo\" manages \"ghost\", which is neither a seat's handle nor a unit's key, so the entry manages nobody. ...", "title": "Seats managing someone not in the chart", "person": "This seat manages a name that matches no seat or team, so that entry manages nobody. Correct it or remove it.", "item": "ghost" } ], "derived": {"seats": [...], "units": [...]}}warningsis what the engine will run but a person should know. Always a list, empty when nothing to say. Each has the locators of a problem (path,segments, and theseathandle orunitkey it is about, empty when neither), plusfromandtoas display text. Three kinds:dangling_reference: a reference that resolves to nothing.refsays what carries it:lead(a unit’s lead, a seat handle),unit(a root seat’sunit:, a unit key) ormanages(onemanagesentry, a seat handle or unit key, at its written index).admission: an admission rule the stored company breaks, withref,fromandtoempty. A write that keeps one is refused, so only a reload or a revert of a company a newer peer admitted under other rules answers with one, one beside each entity the violation names.advisory: a valid setting worth knowing before it runs. Either the company’s own (a human seat with no account on the Mattermost or Slack workspace the company talks on, which nobody can @-mention there; a token ceiling another ceiling makes unable to refuse a turn; a${VAR}nothing supplies; a repository or a seat’scode.accessthat will not do what it seems to), or what the company does together with the Tier A of the node that served the write.pathandmessagelocate and say it;ref,fromandtoare empty. Every node also logs each of the company’s own when it applies the revision, as aconfig_advisoryline. The cross-tier ones are Warnings across the two tiers: a fleet hosting code on the defaultnatsobject store (store.objects.backend), and a Gitlet node whose explicitgitlet.cache_max_bytesis belowcode.limits.repo_max_bytes. They are judged against the Tier A of the node that answered the write, so the samePUT /configcan answer them on a Gitlet node and not on an ingress node without thegitletrole. A write answers a budget only where it is set explicitly: a derived one is a share of a volume the write never sees, which each Gitlet node compares itself when it applies the revision (config_tier_warning).- Every advisory and dangling reference also carries
title(what it is about in a few words) andperson(the warning in the words of the person who owns the company: what is wrong and what it costs, then the fix, naming no document key; the dashboard draws it wheremessageis the operator’s). Both are the same for every warning one rule raises. What it is about is named apart, inseatorunitand initem, the one thing within it as a person reads it in a list (a schedule’s name and how often it runs,poll (24 a day); a repository; a server; a variable). An admission warning carriespersonwhere its rule wrote words for a person (a problem’ssaid), and notitle. An advisory the setup advisor builds a fix for also carries itsclass(grant.health_unheld,learning.auxiliary_model,schedule.frequentorsandbox.direct_box).
derivedis the full hierarchy the engine derives: every seat in the engine’s order with its effective unit, primary manager, managers, reports, automatic reports and onboarding chain, and every unit with its effective type, lead and channel (and whether each was inherited). Each seat and unit carries its authoredpath. The fields are thoseGET /orgcarries without paths; a client draws the hierarchy from this.
A write that changes nothing
Section titled “A write that changes nothing”A PATCH /config or a per-entity PUT whose document, once merged or spliced, says exactly what the active revision says (compared as JSON values, whatever the key order or spacing, numbers as written) stores nothing and activates nothing. It answers 200, not 201, with the revision that already says it:
{"changed": false, "revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "warnings": [], "derived": {"seats": [...], "units": [...]}}- No summary is needed; one sent is not stored.
- An entity’s answer carries its
ETag, the tag itsGETanswers, so the client’s next write is conditional on what it holds. - It is decided after everything that refuses the write: a stale
If-Match, a document the write would refuse, and a lead’s write of a part of the company they do not lead are refused as when the write changes something. Answering a lead’s unchanged write would tell somebody who may not read a setting whether it holds a value they guessed. - Why. Storing a no-op would add an empty-diff revision and rebuild every node’s seats. Republishing the active document is its own gesture,
POST /config/reload. - A whole document is not answered this way.
PUT /configof the document as it stands is stored and published again (201), because that is how a caller that renders the document, an operator reconciling it, activates it after writing the values it reads. A revert of the active revision is the same: it is a reload.
A dry run says which a write would be (changed).
Every seat’s handle and every unit’s key is written into the stored document. A seat that declares no handle is stored with the one its name derives, and a unit with no id with one minted from its name, so a write built from the stored document (GET then PUT, PATCH, the per-entity routes) never moves the identity when it corrects a name. A body that leaves them out is minted again from the names it carries, so a PUT of a file whose names changed and whose handles or keys are absent replaces those seats and units.
A write that takes a human seat away while something holds it is refused. Removing a human seat, or making it an agent’s, while the identity directory binds somebody to it (at any stage short of their removal) or while an open invitation holds it, is 409 seat_held. held maps each such seat’s handle to the one thing holding it, never an invitee’s address, since the writer may be a unit’s lead who holds no grant over the directory:
{ "error": "seat_held", "message": "This change removes a seat someone holds or is invited to. …", "detail": "This change removes human seats that somebody still holds: designer (held by sam.lee) and qa-lead (held by an open invitation (0192f00d-…)).", "held": { "designer": {"person": "018f3a9c-…", "kind": "person", "login": "sam.lee", "stage": "active"}, "qa-lead": {"invitation": "0192f00d-…", "expires_at": "2026-06-15T09:12:00Z"} }, "hint": "Move each person to another human seat (PATCH /iam/people/{person} with seat) or remove them, unbind a service account (PATCH /iam/people/{person} with no seat), cancel an open invitation (DELETE /iam/invitations/{id}), each an admin's gesture, then send the write again."}The holder’s kind decides the remedy, which the hint spells out: a person holds a human seat for as long as they are here, so they are moved to another human seat or removed, never unbound; a service account (kind: machine) is unbound; an invitation is cancelled, or left to be redeemed or to lapse at its expires_at. Each is an administrator’s gesture. Where a person and an invitation both claim one seat, the person is named.
The check is advisory: a bind or invitation landing between it and the activation is not seen, and an offline crewlet config import asks nothing, which leaves the residue GET /iam/check reports. A node that cannot read the directory answers 503 seat_holders_unavailable naming the seats rather than allowing it, and so does
one holding two rows bound to a seat the write removes; its detail says what
clears it, and a read no wait clears (an evicted node, a full log) carries no
Retry-After. A write that takes no human seat away never asks. A whole
document replacing an unsealed revision always asks, about every seat it does not keep as a human seat, since nothing says which seats the replaced revision had; its 503 names no seats.
A lead edits their own team
Section titled “A lead edits their own team”A person whose seat leads a unit may write the seats and units inside it (the unit and every unit beneath it) without admin, through the routes that write the org chart: PUT and PATCH /config, POST /config/revisions/{id}/revert, and PUT /config/roles/{handle} and PUT /config/units/{id}. The route admits anybody bound to a seat before the body is read, and refuses everybody else 403 unauthorized; an agent is refused seat_refused whatever it holds. The write is judged on what it changes, on both sides of it:
- Every seat and unit it adds, removes, moves, reorders or edits has to sit inside the caller’s subtree where it was and where it lands.
- A unit’s own fields are judged on the unit itself before and after (so handing it to another
lead:is refused). - A new
lead:ormanages:entry has to name something inside the subtree. - A seat or unit added under a name another object’s
lead:ormanages:already states has to be named only from inside it. - Never a lead’s: a project, space or channel, a seat’s email or contact identity, a credential, a
${VAR}in any field, a setting, and lifting or loosening an MCP limit any agent seat is held to.
The rule, change by change, is in Identity and Access.
A write any part of which is not the caller’s is refused whole, by the rule that refused it. On authority (a part outside the caller’s subtree, or one that is never a lead’s) it is 403 unauthorized with a refused list naming every such part, so a client can show each beside what it is about. The top-level reason is the parts’ own where they agree and no_grant where they do not, and grants names the permission that would admit every part, today admin; each part carries its own reason and grants too. A bar on the caller (an agent’s seat on the org chart’s routes) is 403 unauthorized with that reason, no permission named and no list. A write refused only because the caller’s proof of who they are lapsed is 403 step_up_required naming the window, as the route answers it; every check of one request is judged at the instant it arrived, so a proof the route accepted never lapses half-way through. A dry run answers the same before anything is stored.
{ "error": "unauthorized", "message": "...", "reason": "no_grant", "grants": ["admin"], "refused": [ {"kind": "unit", "id": "platform", "op": "changed", "side": "after", "place": "platform", "why": "self", "reason": "not_lead", "grants": ["admin"]}, {"kind": "unit", "id": "platform", "op": "changed", "side": "after", "place": "data", "why": "lead", "value": "data-lead", "reason": "not_lead", "grants": ["admin"]}, {"kind": "seat", "id": "staff-eng", "op": "changed", "place": "", "why": "credential", "value": "mcp_env", "reason": "no_grant", "grants": ["admin"]}, {"kind": "setting", "id": "mission", "place": "", "reason": "no_grant", "grants": ["admin"]} ]}| Field | What it says |
|---|---|
kind, id | A seat by handle, a unit by key, a setting by its top-level key, or the document (no id) for a write that changes nothing: re-publishing the company unchanged re-activates it on every node, which is POST /config/reload’s and admin’s; a dry run of a seat or unit sent back unchanged is answered to its lead instead |
op | What the write does to the seat or unit: added, removed, moved or changed (its fields, or where it sits among its siblings, since order decides which of a seat’s managers is its own) |
side | before (the revision replaced) or after (the one proposed): the document the place was read in |
place | The key of the unit the change reaches; "" is the company root, which is nobody’s subtree |
why | What reaches it: place (where the object sits), self (a unit’s own fields), lead or manages (a new reference, name in value), named (another object’s lead: or manages: entry that already states the id an added seat or unit takes, id in value), duplicate (two objects on one id, which only admin may write), credential (a credential field, compared whole so an mcp_env key with nothing under it counts, or a ${VAR} in any other field, field path in value), key (a project, space, channel, email or contact set, cleared or changed, field in value), grant (a grant the seat’s role carries, health_tools, set or cleared, field in value), widens (an MCP limit the write lifts or loosens for the seat, by editing a block or moving the seat out from under one; value is the limit as the seat is held to it: mcp_limits.<server>.enabled or mcp_limits.<server>.tools.<tool>), or unchanged (the document itself) |
reason | The authority table’s reason: not_lead for a place outside the caller’s subtree, the company root included, or no_grant for a credential, a key, a seat’s grant, a widened MCP limit, a setting or an unchanged document |
grants | The permissions any one of which would admit this part: admin for every part a lead is refused |
A lead reads what they may write the same way: GET /config/roles/{handle} and GET /config/units/{id} serve a seat or unit of their subtree, masked like every read here, and refuse one outside it 403 unauthorized. Both the read and the write of one seat or unit are decided where the id sits before it is looked up or the body is read (at the company root for an id the company does not have), so a seat in another team, a seat at the root and an id that does not exist are refused in the same bytes, whatever the body, and only admin is told a seat or unit is missing.
A refused write that reaches outside from inside the caller’s subtree is more forthcoming by design: each refused part names the place it reaches, which is where something outside the subtree sits (the unit a seat a manages: entry names sits in, or the root for a name nothing answers to). The chart’s shape (which seats exist and where) is no secret from anybody signed in, who is served the org chart whole; a seat’s or unit’s fields are. The whole document, its history and its references stay admin’s, so a lead edits through the entity routes.
Dry runs
Section titled “Dry runs”PUT /config?dry_run=true, PATCH /config?dry_run=true, PUT /config/{kind}/{id}?dry_run=true and PUT /config/charter?dry_run=true are the same request, checked in the same order, that store, activate and publish nothing. The dashboard’s organization builder sends one on every edit, and its Budgets screen one before every ceiling it saves. An entity write’s caller never sees the rest of the document, so the check is where it learns that a seat fine on its own leaves the company invalid, or that a ceiling it raised now sits above the company’s (a warning).
curl -X PATCH "https://engine.example.com/config?dry_run=true" \ -H "Authorization: Bearer $TOKEN" -H "If-Match: \"$REV\"" \ -d '{"mission": "Ship the thing"}'A valid check answers 200:
{"valid": true, "base_revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "changed": true, "warnings": [], "derived": {"seats": [...], "units": [...]}}dry_runis read before anything else, and takes exactlytrueorfalse, or nothing. Any other value (1,yes, an empty value, the parameter twice) is400 invalid_query: the two readings of a guess differ by whether the fleet’s configuration changes.- No summary is needed, because nothing is stored. A
_summarykey in the body is still lifted out, so the document checked is the one the write reads. base_revision_idis the fleet’s revision the check was built on,""when nothing is active, so a client whose draft was built on a different revision learns the configuration moved.changedsays whether the document the write would store differs from the active one;truewhen nothing is active. A patch or entityPUTwhose check saysfalseis answered unchanged when sent; a whole document’sPUTis stored and published again all the same.- Each warning says whether this write introduces it. A check’s
warningsare the write’s, judged on the whole document it would store, so they include every advisory the active revision already carries. Each also has"introduced": truewhen the active revision does not carry it (compared by its kind, seat, unit, reference and message, never by itspath, which a write moves by adding a seat ahead of it), andfalsewhen it does. Every warning of a check made with nothing active is introduced. Ask Crewlet shows a change’s introduced warnings on its proposal card and leaves the rest off. One warning is the write’s alone: a write that moves the company’s clock (timezone) is warned, attimezone, that every budget window and every schedule without a zone of its own moves with it, naming both zones; it is always introduced, and a check of the company as it stands never carries it. - Every other refusal is the write’s, in the write’s order:
409 no_active_revisionfor a patch with nothing to patch,400 conflicting_preconditionsforIf-MatchbesideIf-None-Match,412 revision_advancedfor a staleIf-Match,412 already_configuredforIf-None-Match: *on a configured company, and400with problems for a document the write would refuse. - A dry run is decided as the write, without the step-up (ADR-0055): the same permission, a lead’s included, but not the recent proof, because it changes nothing. A person whose sign-in is old checks a change and is asked to confirm it is them only to make it. Ask Crewlet’s read access sends a dry run to these routes, and to no other, to check a change before the person is shown it.
- A dry run needs the same token a write does, and a lead’s is judged as the write would be: a part that is not theirs is
403with therefusedlist. One answer differs: a seat or unit sent back unchanged to its own address is checked for its lead, though the write would be refused as a re-publish, because the check stores nothing and is how a lead reads what the engine derives of their unit. The whole document sent back unchanged stays refused, since no address decided whose check it is.
Refusals carry located problems
Section titled “Refusals carry located problems”A refused document (400 validation_error, 400 invalid_patch, 400 invalid_body) is the refusal envelope with a detail of its own: detail (one line per failure) and hint beside the error code and its message, and problems, the same failures located and classified, so a client puts each beside the field it is about without parsing anything.
{ "error": "validation_error", "detail": "workers.researcher.model: value not in the allowed set: \"nowhere\" is not a configured provider. Use one of providers.llm's: \"zulu\". ...", "hint": "The whole company is checked on every change, not only the part that changed, ...", "problems": [ { "path": "workers.researcher.model", "segments": ["workers", "researcher", "model"], "kind": "unknown_value", "message": "workers.researcher.model: value not in the allowed set: ..." } ]}| Field | Meaning |
|---|---|
path | The authored path in the whole document that was validated. For a per-entity write that is the document the entity was spliced into, and an entity body it cannot read is placed where that entity sits (mcp_servers[1].comand for a typo in the second server). "" only for a failure that belongs to no place, such as a whole document that is not YAML at all |
segments | The path taken apart: strings for keys, numbers for list indexes. A map key can hold a dot, so read these rather than splitting path. null when path is "" |
kind | missing, unknown_value, out_of_range, conflict, unknown_field, shape, or invalid for anything this build does not classify |
message | The failure’s whole line, as in detail. A duplicate handle or unit key is one line naming every entity and one problem beside each, so there can be more problems than lines |
seat | The engine-derived handle of the seat the problem is about, when it is about one |
unit | The name of the unit the problem is about, when it is about one |
line | The 1-based line in the text sent, for a failure the parser found. A patch’s failure found in the merged document names no line, because that text is the engine’s merge |
range | For a value outside the range its setting admits, that range: {min, min_exclusive, max, or_zero} in the setting’s own unit (min_exclusive, max and or_zero omitted when false or unbounded; or_zero admits 0 apart from min to max), the same declaration the limits question reports for a cap. Omitted for every other problem |
said | The problem in a person’s words, with no key or path, for a rule that writes them: today the rules holding one turn-engine cap to another (a first turn’s rounds under their ceiling, a worker’s turns under theirs, a task’s time limit under its call’s), which Settings › Limits can break. Omitted where the rule writes none, and message is then the only wording |
A validation_error also carries the derived hierarchy the engine built from the refused document, as far as it got, so a client can place each problem on the chart.
No message repeats a credential. A document read from GET /config carries masks, which a write restores from the stored revision before validating, so the values a refusal judges are ones the caller was never shown: a message says what rule a value breaks and never the value, a fragment of it, or its length.
The /setup submissions that change the document answer their validation_error with the same problems.
Conditional requests
Section titled “Conditional requests”GET /config returns an ETag: the fleet’s revision id, quoted, the same on every node while the fleet has an activation. A tag read from one node is good on any other, one that refused the fleet’s revision included. An entity’s GET and its write’s 201 carry the entity’s own tag instead, a digest of what it serves, so an edit of one entity is conditioned on that entity alone (see the entity routes below).
| Header | On | Meaning |
|---|---|---|
If-None-Match: <etag> | GET | 304 Not Modified when the fleet’s revision has not moved |
If-Match: <etag> | writes | Proceed only against that revision; 412 revision_advanced otherwise, naming the fleet’s as current_revision_id beside your_base, when the request arrives or when another write is activated before this one can be. Never beside If-None-Match: 400 conflicting_preconditions |
If-Match: * | writes | Proceed only if something is active; 412 no_active_revision when nothing is configured |
If-None-Match: * | /config writes | Proceed only if nothing is configured: the fleet has no activation, and this node knows no company either. 412 already_configured otherwise, naming the revision it lost to, on a node that joined the fleet and has not reconciled yet too |
If-None-Match: * | entity PUT | Proceed only if that entity does not exist: the create-only write that adds an MCP server or an LLM provider. 412 entity_exists when one does; 400 conflicting_preconditions beside an If-Match |
The bare revision id is accepted wherever an ETag is, unquoted. If-None-Match: * is the only create-only precondition (about the company at /config, about the entity at an entity’s own address), and every If-Match value other than * is an entity tag, matched against the fleet’s revision and nothing else.
Independently of any header, every write names the revision it derived from as the new revision’s parent, and the activation is a compare-and-set on that parent (create-only with no pointer), so a lost update is refused whether or not the caller sent a precondition. See Concurrent writes.
Nothing under /config is cacheable. Every response the surface writes carries Cache-Control: no-store: reads, 304s, writes, refusals and error bodies, and the 404 and 405 for a path or method it does not serve. A body here is the company’s settings (which integrations are wired and where, and the ${VAR} name behind every credential), and a stored copy would outlive the session and token that read it. Revalidation still works: a client that wants a 304 sends If-None-Match with the ETag it kept.
The charter: mission, vision and policies
Section titled “The charter: mission, vision and policies”The company’s charter is the part of the document every seat is handed word for word on every turn: mission, vision and policies. It has a resource of its own, which Company › Principles edits in place.
GET /config/charter
200 OKETag: "charter-5f0c…"
{"mission": "Help friends split costs fairly.", "vision": "Splitting a bill is never the awkward part again.", "policies": ["Every amount is exact to the cent.", "Work is tracked on the board."]}Every field is always sent: "" and [] when nothing is written.
PUT /config/charterIf-Match: "charter-5f0c…"X-Summary: tighten the money policy
{"mission": "…", "vision": "…", "policies": ["…", "…"]}
200 OKETag: "charter-91ab…"
{"charter": {"mission": "…", "vision": "…", "policies": ["…", "…"]}, "changed": true, "revision_id": "0192…", "epoch": 42}- The body names all three fields and nothing else, and replaces the charter whole:
policiesis the list in the order every seat reads it. A missing or unknown field is400 invalid_body. Each value is trimmed of surrounding space, and an empty mission or vision is removed from the document. If-Matchis required (428 bad_if_matchwithout it) and its tag is the charter’s content, not the revision’s, so a write elsewhere in the document is not a conflict. A charter that changed since the tag was read is412 version_moved, carrying the charter now ascurrentand its tag asetag(and inETag): show the draft beside it, then send the draft again with that tag to keep it.If-Match: *writes whatever the charter says now.- It is a revision like any other write. The same pipeline as
PATCH /config: the managed-document check, the whole document validated, a sealed revision recording its author and credential, the fleet’s compare-and-set and theconfig_revision_activatedevent.X-Summaryis optional here: one left out is derived from what changed (edited the company's mission and policies). A revision that moved for another reason between the read and the compare-and-set is merged onto, up to three attempts, after which the answer is409 revision_advanced. - A charter that changes nothing writes nothing:
200with"changed": falseand the activerevision_id, because a new revision re-activates every node and rebuilds every seat. This is asked beforeIf-Match, so a retry whose first answer was lost finds the charter already saying what it asks for and is answered rather than refused. ?dry_run=truejudges the write and stores nothing, answering{"valid": true, "charter": …, "changed": …}.- It is
admin’s, read and written on verbs of its own (config.principles.read,config.principles.write), decided asconfig.readandconfig.writedecide the whole document; the write asks a recent proof as every write here does, and is admitted only while it changes the mission, the vision or the policies and nothing else. The verbs are separate because Ask Crewlet may read the charter as the person and write it only as a change its owner approved, sent with theIf-Matchits preview read (ADR-0052).
The bounds, in characters (Unicode code points, the count an editor shows), because every character is in every seat’s prompt on every round. A charter past one is 400 validation_error with the problem located at mission, vision, policies or policies[i] (segments ["policies", 3]):
| Field | Bound |
|---|---|
mission | at most 1024 characters, on one line |
vision | at most 2048 characters; paragraphs allowed |
policies | at most 25 entries |
| each policy | at most 1024 characters, on one line, not blank, and not a repeat of another |
A line break in the mission or a policy is refused with kind shape (each is read inline); a vision’s paragraphs are quoted line by line in the prompt.
Each bound is counted on the trimmed value. Every write of the document through the API (PUT and PATCH /config, a per-entity write, /setup) holds them too, judged on what the write changes: a write that leaves a faulty part untouched is admitted, with a warning naming it in its answer, so an old fault never locks a company out of its other settings. The charter write judges the parts it changes, not the parts it leaves.
An import is never refused for the charter. PUT /config?import=true writes the document as an import of a restored or migrated file: every other rule holds as for any write, and the charter is judged warn-only, its faults named in the answer’s warnings. It is what crewlet config import sends to a running node, so a file that ran under an earlier build always imports, as it does into a stopped node and at boot. It is admin’s alone (a lead the route admits for their own units is refused 403 before the body is read), asks a recent proof as every write does, and records the revision with source file, and its activation event with revision_source: file, beside the author and the credential (operator_id). Decided by config.write on the authority table, so a Tier A token may use it (fresh by construction), and so may a machine token whose owner holds admin; on a managed document only the listed writers may. It relaxes the charter’s change rule and nothing else: every other rule, If-Match and the managed check hold as for any write. The flag is true or false, given once, or 400 invalid_query. The dashboard never sends it (a gate fails if its source does), and the operator’s MCP and act surfaces serve no /config write at all.
Per-entity read and write
Section titled “Per-entity read and write”Five collections, GET and PUT, and DELETE for a model, a fleet or an MCP server:
| Method | Path | Description |
|---|---|---|
GET | /config/{kind}/{id} | One entity, redacted, with its own ETag (a digest of what it serves, not the document’s revision). The body is the entity itself, so it goes straight back into the PUT |
PUT | /config/roles/{handle} | Replace one seat, root-level or inside a unit at any depth. Every entity PUT takes ?dry_run=true, see Dry runs |
PUT | /config/units/{id} | Replace one org unit, by its key |
PUT | /config/llm-providers/{key} | Replace one named LLM provider; with If-None-Match: *, add one under that key |
PUT | /config/mcp-servers/{name} | Replace one MCP server entry; with If-None-Match: *, add one after every declared server |
PUT | /config/llm-fleets/{key} | Replace one LLM fleet ({name, strategy, members, threshold_points}, members in its sequential order); with If-None-Match: *, add one under that key. default-fleet is served while synthesised, and a write leaving it as synthesised stores nothing |
GET | /config/llm-providers/{key}/references | Every written field that names the model (a seat’s handle and job, Ask Crewlet’s chat, the Advisor’s findings) with the field and its whole chain, and the stored values its sign-in reads: what a removal answers, read with no write ({"revision", "references", "dependants"}, dependants as a removal’s dry run answers it; 404 for an undeclared model) |
GET | /config/llm-fleets/{key}/references | Every seat job and helper set to fleet:<key>, as a fleet’s removal answers them ({"revision", "references"}; 404 for a fleet the company does not have) |
DELETE | /config/llm-providers/{key} | Remove one model and repoint everything naming it, in one revision. See below |
DELETE | /config/llm-fleets/{key} | Remove one fleet and repoint every seat job and helper on it, in one revision; 409 not_removable for default-fleet. See below |
DELETE | /config/mcp-servers/{name} | Remove one MCP server and clear everything naming it, in one revision, deleting the stored values only it read where asked. See below |
Any other method is 405 with an Allow header naming the methods the path takes. No other DELETE exists: removing a seat or a unit is a full-document edit.
Why: PUT /config makes every edit company-wide, so a founder changing one seat’s goal sends the whole document and loses to any concurrent edit. An entity write narrows what it claims to change, which makes the revision summary meaningful.
It is the same write underneath: an entity PUT opens the active revision, splices the entity in, restores the masks the read showed against that revision, validates the whole document, and stores a new revision. A change that would leave the company invalid is refused even when the entity is fine (a seat naming a provider that no longer exists). The seat-holder check applies: a unit PUT that drops a human seat somebody holds, or an open invitation holds, is 409 seat_held.
The precondition is the entity’s. An entity PUT takes If-Match with the ETag its GET answered (or *), judged against the entity in the revision active when the write lands, never the whole document. A revision that moved for another reason (another seat added, a ceiling patched, a credential sealed) is no conflict: the write is spliced into the then-active revision, up to three times while other writes keep landing, then 409 revision_advanced. An entity that itself changed since it was read is 412 version_moved, carrying the entity as it stands (current) and its etag, so the caller can show its change beside what replaced it and resend with that tag. A 201 carries the ETag of the stored entity, the tag its GET now answers, so the next edit sends it as If-Match with no read between. If-None-Match: * is the create-only write, never beside If-Match; any other If-None-Match is 400 bad_if_match.
Four rules follow:
- An unknown field is refused, not dropped. The body is read by the whole-document parser, JSON or YAML:
gaolforgoalis400 invalid_bodywith anunknown_fieldproblem placed where the seat sits in the document (roles[1].gaol), with its line in the body. Ignoring it would answer201with the goal silently gone. - A plain
PUTnever creates. An id nothing carries is404 no_such_entity(onrolesandunits, to an administrator alone; anybody else gets403as for a seat outside their team), itshintsaying how that collection is added to; a missing id is far more often a typo. Intent to add is SAID withIf-None-Match: *, the create-only write for the three flat collections (mcp-servers,llm-providers,llm-fleets): a taken id is412 entity_existsrather than a replacement, the body’s identity must match the path as on anyPUT, and the whole company is validated with the new entity. An added entity lands LAST in its collection’s order: a server after every declared server, a provider at the end ofproviders.llm_order(the order an unpinned seat resolves a provider in). A seat and a unit are400 not_creatable(each has a place in the chart the path cannot name); add them by replacing the unit they sit in, or throughPUT /config. The id is looked up before the body is read, so a mistyped one is a404whatever the body holds. - The id in the path is the identity, and a
PUTnever renames. A body whose identity disagrees with the path is400 identity_mismatch: nothing pointing at the old identity travels with the splice. A seat’s durable id is a UUIDv5 over (company name, handle); a unit’s key is referenced by everymanages:entry and root seatunit:; a provider’s key is what every seat’sllm:chain names; an MCP server’s name keys everymcp_envblock and prefixes its tools. A body that leaveshandle(or a unit’sid) out keeps the path’s, so changing a seat’s display name is an ordinary edit. A different handle or unit key is a removal and a creation, made throughPUT /config, where what must move with it is visible. - The same summary and
If-Matchrules apply, and with nothing configured the write answers409 no_active_revision: there is nothing to splice into, and building a company from one seat is not this route’s job.
DELETE /config/llm-providers/{id}: remove a model and repoint what names it
Section titled “DELETE /config/llm-providers/{id}: remove a model and repoint what names it”A model is named by every seat field and Ask Crewlet field that runs on it, so removing it alone leaves a document validation refuses. This route takes the removal and the repoint of every dependant as one write, addressed by identity (a seat’s handle and job, or Ask Crewlet’s chat), never by list index, and can delete the stored values its sign-in read. config.write (admin, a recent proof), and secrets.write as well when the body names a value to delete, asked before anything is read or written; ?dry_run=true checks and stores nothing; If-Match takes the entry’s own ETag from its GET (optional, as on the entity PUT); a summary is required unless a dry run: the X-Summary header or a _summary body key, the header winning when both are sent, as on every config write.
{ "repoint": [ {"at": {"seat": "qa", "job": "review"}, "to": "sonnet"}, {"at": {"seat": "backend-engineer", "job": "executor"}, "to": null}, {"at": {"assistant": "chat"}, "to": "aux"}, {"at": {"advisor": "findings"}, "to": null}, {"at": {"fleet": "claude-opus"}, "to": null} ], "delete_secrets": ["ANTHROPIC_API_KEY_SONNET"]}jobisexecutor,review,subagent,auxiliary,judgeortriage. A seat that writes one job twice (llm_reviewandllm.review) has both fields answered by its onerepoint. Eachatis answered once: a body naming one twice is400 invalid_body, naming both rows.to: <key>replaces the entry in that field’s chain where it stood, each key once;tonaming the entry being removed is refused at the field (kind: "invalid").to: nullremoves it; a chain left empty clears the field, so the job resolves as an unset one does.{"assistant": "chat"}withnullclearsassistant.model, turning Ask Crewlet off in the same revision;{"advisor": "findings"}withnullclearsadvisor.model, so the Advisor’s checks run with no model.{"fleet": "<key>"}answers the model’s place in that fleet’smembers:nulldrops it from the fleet, an entry key replaces it there. Anatnames one place: a seat and its job, Ask Crewlet, the Advisor or a fleet.- The entry leaves
providers.llmandproviders.llm_order. delete_secretsnames values in the credential store the model read, to delete once the removal is written, each once. A name the model never read is a problem atsegments: ["delete_secrets", i](kind: "unknown_value").- The whole document is validated with the admission rules, so an executor job moved to a harness that cannot run one, or an Ask Crewlet model on a harness no helper can run, is refused at its field.
Every reference has to be answered. One left out is 422 validation_error with one problem per reference (kind: "conflict", its segments the written field, its seat, and a message such as “qa’s reviewing work still names codex-review: repoint it or leave it unset in the same write”) and references, every written reference as {at, segments, chain}. A repoint that answers nothing is located at its own row, segments: ["repoint", i, "at"] (kind: "unknown_value"). A dry run with an empty body is how a page draws the list.
A move nobody wrote is a warning. A seat’s job naming no model runs on the company’s fallback (the entry keyed default, else the first in llm_order), so removing that entry moves the job although no field named it. Each such move is a warning of kind resolution_moved with the seat (seat), the job (ref), the model it ran on (from), the one it will (to) and a sentence (“pm’s memory and summaries will run on aux”), in the dry run and the write’s answer. A job the seat names no model for but whose executor names one runs on the executor’s chain and moves with the executor’s repoint, so it is not warned about. Removing the company’s last model leaves to empty, and the sentence says the job will have no model to run on.
The values its sign-in read can go with it. “Read” is what /secrets counts: every ${VAR} the entry names, and the variable it signs in from where it names none (its harness’s API key or token variable, and its credential bundle, CREWLET_LLM_CLI_<KEY>_CREDENTIALS, where a device sign-in or crewlet llm export stores its login). The dry run’s dependants lists those the store holds: secrets, the ones nothing reads once the model is gone, which delete_secrets may name, and kept_secrets, each {name, read_by} another model, an MCP server or an integration still reads. A kept value is never deleted, even when named. The values go after the revision is written and the answer’s secrets says what became of each, as an MCP server’s removal does. A device sign-in still running for the model ends at the apply that removes it, and stores no login.
{ "secrets": ["ANTHROPIC_API_KEY_SONNET", "CREWLET_LLM_CLI_SONNET_CREDENTIALS"], "kept_secrets": [ {"name": "ANTHROPIC_API_KEY", "read_by": ["providers.llm.haiku.auth.api_key"]} ]}Answers: a dry run 200 {valid, base_revision_id, warnings, derived, dependants}, a write 201 {revision_id, epoch, warnings, derived, secrets}. Refusals: 404 no_such_entity, 409 revision_advanced, 403 config_managed (a managed document), 403 for a value to delete without secrets.write, 412 version_moved (the entry changed since its ETag), 422 validation_error and 400 summary_required.
DELETE /config/llm-fleets/{id}: remove a fleet and repoint what runs on it
Section titled “DELETE /config/llm-fleets/{id}: remove a fleet and repoint what runs on it”Every seat job and helper set to fleet:<id> names the fleet, so it is removed with the repoint of each as one write, in the model removal’s body and rules: config.write, ?dry_run=true, If-Match with the fleet’s own ETag, a summary.
{"repoint": [ {"at": {"seat": "engineer", "job": "executor"}, "to": "fleet:default-fleet"}, {"at": {"assistant": "chat"}, "to": "claude-max"}]}toisfleet:<key>, aproviders.llmkey, ornull(unset). A fleet stands alone, sotoa fleet in a field that writes a list is refused at the field.- The fleet leaves
providers.llm_fleets; its members stay underproviders.llmand in any other fleet. default-fleetis never removed:409 not_removable,hint“The default fleet can’t be deleted.”
Answers and refusals are the model removal’s, dependants aside: a fleet reads no stored value.
DELETE /config/mcp-servers/{id}: remove an MCP server and clear what names it
Section titled “DELETE /config/mcp-servers/{id}: remove an MCP server and clear what names it”An MCP server is named from three other places: each seat’s and unit’s mcp_env block keyed on it, each seat’s and unit’s mcp_limits block keyed on it, and each seat’s sandbox.mcp.servers entry listing it. Removing the entry alone leaves those naming nothing, which validation refuses. This route takes the removal and the clearing of every field naming the server as one write, and can delete the stored values only that server read. config.write (admin, a recent proof), and secrets.write as well when the body names a value to delete, asked before anything is read or written; ?dry_run=true checks and stores nothing; If-Match takes the server’s own ETag from its GET (optional, as on the entity PUT); a summary is required unless a dry run: the X-Summary header or a _summary body key, the header winning when both are sent.
{ "clear": true, "delete_secrets": ["LINEAR_ORG", "PM_LINEAR_TOKEN"]}clear: trueclears every field naming the server: eachmcp_envandmcp_limitsblock keyed on it, a seat’s or a unit’s, and eachsandbox.mcp.serversentry listing it. A mapping left empty is dropped, and so is a seat’ssandboxholding nothing else. Anmcp_envblock the engine reads by its own name (github,gitlab,datadog,atlassian,jira,confluence) is the integration’s as well as the server’s, so it stays.delete_secretsnames values in the credential store the server or its cleared fields read, to delete once the removal is written, each once, judged as/secretsjudges what reads a value: every${VAR}the document names, and every variable it reads without naming one. One something else still reads is kept.- An empty body clears and deletes nothing. Any other field is
400 invalid_body.
Every field that names the server has to be cleared. Without clear, a server anything names is 422 validation_error, with one problem per field (kind: "conflict", its segments the written field, its seat or unit, and a message such as pm's mcp_env block for "linear" still holds credentials: send clear to clear it in the same write) and dependants. A name in delete_secrets the server and its fields never read is a problem at
segments: ["delete_secrets", i] (kind: "unknown_value"). A dry run with an empty body is how a page draws the list. The whole document the removal produces is validated, as on every write.
dependants, on the refusal and on a dry run that passes:
{ "mcp_env": [ {"kind": "seat", "key": "pm", "name": "PM", "segments": ["roles", 0, "mcp_env", "linear"]}, {"kind": "unit", "key": "eng", "name": "Eng", "segments": ["units", 0, "mcp_env", "linear"]} ], "sandbox": [ {"seat": "pm", "name": "PM", "segments": ["roles", 0, "sandbox", "mcp", "servers", 0]} ], "mcp_limits": [ {"kind": "unit", "key": "eng", "name": "Eng", "segments": ["units", 0, "mcp_limits", "linear"]} ], "secrets": ["LINEAR_ORG", "PM_LINEAR_TOKEN"], "kept_secrets": [{"name": "SHARED_TOKEN", "read_by": ["mcp_servers[1].env.SHARED_TOKEN"]}], "oauth": true}In mcp_env and mcp_limits, kind is seat (its key the handle) or unit (its key the unit’s key), and name is the display name. secrets lists the stored values nothing reads once the server is gone, which delete_secrets may name, and kept_secrets those it read that something else still reads, with the paths that read them as the document stands now; a variable a node takes from its environment is never listed. Every list is names, never a value. oauth is whether somebody holds an OAuth grant for the server, which the removal gives up.
The grant goes after the revision is written, before any value: it is revoked at its vendor where offered and forgotten here, as a sign-out does. The company’s OAuth client authenticates that revocation with the secret the server’s entry names, which delete_secrets may be about to delete. The answer’s oauth is {revocation, said} (revoked, not_offered or failed, and the vendor’s words where it refused), or null where nobody held a grant.
The values go after the revision is written, so a removal that loses its write deletes nothing. Each is asked again of the fleet’s revision just before it goes, so one that a write landing meanwhile reads is kept. The answer’s secrets says what became of each, as {name, outcome, read_by?}:
deleted: the store held it and no longer does;absent: the store held nothing under that name;kept: the fleet’s revision still reads it (something else did all along, or a write landed after the removal), andread_bynames the paths, so it stays;failed: the store, or the fleet’s revision, did not answer, so the value may still be there, andDELETE /secrets/{name}deletes it.
The status stays 201 whatever became of a value, since the server is removed either way. Each value deleted logs secret_removed with its name, the server (provider for a model) and who removed it, as DELETE /secrets/{name} does.
Answers: a dry run 200 {valid, base_revision_id, warnings, derived, dependants}, a write 201 {revision_id, epoch, warnings, derived, removed, cleared, secrets, oauth}, where removed is the server’s name and cleared is
{mcp_env, sandbox, mcp_limits} as above. Refusals: 404 no_such_entity,
409 revision_advanced, 403 config_managed (a managed document),
403 unauthorized for a caller without secrets.write (the Dashboard
Assistant never takes it, so it may remove a server and never its values),
412 version_moved (the server changed since its ETag),
422 validation_error and 400 summary_required.
/secrets/* — the company’s credentials (auth-gated)
Section titled “/secrets/* — the company’s credentials (auth-gated)”Every /secrets/* and /setup/* route takes admin, reads included: the listing alone says which credentials a company holds and when each last changed. Every node serving the API serves them, because every node opens the fleet’s coordination store that holds the rows.
| Route | Needs |
|---|---|
GET /secrets, GET /secrets/{name} | admin |
GET /secrets/{name}?reveal=true, POST /secrets/reveal | admin, a person present (a machine token is refused 403 token_refused) and a proof inside step_up, decided before the store is read, so a refused caller cannot tell a name that exists from one that does not |
PUT /secrets/{name}, PUT /secrets, DELETE /secrets/{name}, POST /secrets/rekey | admin, and a proof inside step_up. A write of a name the active revision reads also asks config.write, before anything is sealed, for the re-activation that follows (below) |
GET /setup/integrations, GET /setup/integrations/{kind}, GET /setup/integrations/{kind}/places, the two runs reads | admin |
POST /setup/integrations/{kind}/inputs, POST /setup/integrations/{kind}/verify, DELETE /setup/integrations/{kind}, POST /setup/integrations/{kind}/check | admin |
POST /setup/integrations/{kind}/provision, POST /setup/integrations/github/app | admin: a writing pass gets a sink that mints and seals, and an app’s private key is sealed on its way back |
POST /setup/integrations/{kind}/consent, DELETE /setup/integrations/{kind}/consent | admin and secrets.write: the sign-in makes a credential the engine seals |
GET /setup/integrations/{kind}/access, GET /setup/integrations/{kind}/access/seats/{handle}/{lane}, POST /setup/integrations/{kind}/access/plan, POST /setup/integrations/{kind}/draw, GET /setup/integrations/{kind}/requirements/{field}/check, GET /setup/access/requests/{id} | admin (setup.read): the plan and the draw write nothing, so they ask for no proof |
POST /setup/integrations/{kind}/settings | admin (setup.settings.write) and a proof inside step_up. Its own verb, not setup.connect, because it carries no credential: Ask Crewlet may prepare it for the person’s approval |
POST /setup/integrations/ssh/hosts/scan, PUT /setup/integrations/ssh/hosts/{id}, PUT /setup/integrations/ssh/hosts/{id}/inventory, DELETE /setup/integrations/ssh/hosts/{id} | admin (setup.connect) and a proof inside step_up: a scan dials an address the caller typed, and a server’s fields are a revision of the document |
GET /setup/integrations/ssh/hosts/{id}/setup | admin (setup.read) |
GET /setup/integrations/ssh/audit | admin (ssh.audit.read), a person’s own read, never Ask Crewlet’s: a command’s text and a verdict’s decision can carry a credential |
POST /setup/integrations/ssh/hosts/{id}/test | admin (setup.connect) and a proof inside step_up, by a person acting as their seat, which the test certificates name |
POST /setup/integrations/ssh/rotation | admin (setup.connect) and a proof inside step_up |
PUT /setup/integrations/{kind}/access | admin (setup.access.write) and a proof inside step_up. A save that raises an agent to an administration role at the vendor, or adds a grant of a permission that is not read-only, also asks setup.access.raise, which needs a person present: a machine token is refused 403 token_refused |
POST /setup/integrations/{kind}/access/seats/{handle}/{lane}/{action}, POST /setup/integrations/slack/access/seats/{handle}/{lane}/install, POST /setup/integrations/{kind}/access/seats/{handle}/{lane}/credential, POST and DELETE /setup/integrations/{kind}/access/seats/{handle}/{lane}/identity | admin (setup.connect) and a proof inside step_up; rotate, credential and identity also ask secrets.write, since each seals or clears a credential, and identity asks setup.access.raise, since it changes who the vendor sees; keep writes the document as a save does, so it also asks setup.access.write, and setup.access.raise where what it keeps is an administration role |
Connecting is admin’s and nothing more. /setup writes nothing itself (a credential goes through the store /secrets serves), so connecting asks what writing a credential there asks. Every /setup and /secrets write and every reveal asks for a proof inside step_up; reads ask for none (see Some gestures ask how recently you proved who you are).
| Method | Path | Description |
|---|---|---|
GET | /setup/integrations | What every integration this build can set up still needs, plus the address third-party apps reach this deployment on. external_url carries a single value, the config_path it was read from (api.public.external_url when the node has a public listener, api.external_url otherwise; never the person’s address where they differ, since every webhook, manifest and redirect is built on it), and loopback, true when the address names a loopback host (localhost, 127.0.0.0/8 or ::1), which no third-party app can deliver to. Both are Tier A, required on a node serving this listing and resolved before that file is decoded, so the present/resolved/reference triple of the Tier B pointer cannot occur |
GET | /setup/integrations/{kind} | One integration’s requirement list and state. SSH’s also carries ssh: the authority’s public line (ca_public_key, and next_ca_public_key during a rotation), the lines rotations retired (retired_ca_public_keys, newest last; each server drops them when its setup runs again), the setup_version this engine renders, the closed set of commands run on a server that lets the atlas read it (inventory_commands: {"command", "containers"}, containers marking the one run only where a server’s container reads are on), and each server with its key fingerprints, users, whether the atlas reads it (inventory), the agents naming it and its latest Test connection with the current authority, as the server is now (a test from before its fields changed is not shown) |
GET | /setup/integrations/{kind}/places | The integration’s pages at its vendor, built for this company: {"kind", "values", "places"}. values are the company’s own values each place takes (a Google Play developer account, a Cloudflare zone), read from its settings with a ${VAR} resolved and never a credential; each place is {"place", "label", "which"}, label the page in the vendor’s words and which the value it takes where the company holds several. The vendor’s home comes first. No address is answered: Ask Crewlet builds each one, https on the vendor’s own hosts, into a card (open_outside, ADR-0061). 404 unknown_kind for an integration with no vendor pages |
POST | /setup/integrations/{kind}/inputs | Supply or generate those values: credentials are sealed, the rest is patched into the company |
POST | /setup/integrations/{kind}/settings | Write the company’s settings that are not credentials: {"if_match", "summary", "values"}, the inputs write held to fields that are no credential, minted value, step at the vendor, printed value or sign-in client field. 400 invalid_input naming any other field. Sent under the revision it was prepared at (if_match, the ETag GET /setup/integrations/{kind} answers), a later revision refuses it 409 revision_advanced. Answers as inputs does. Ask Crewlet proposes it only as a setup plan’s step (do_setup_step), never as a generic change |
GET | /setup/integrations/{kind}/requirements/{field}/check | Check one requirement as it stands, writing nothing: {"kind", "field", "outcome", "said", "at"}, outcome done, missing or unchecked and said a sentence on what is still missing, never a value. A value is judged from the company’s settings; the company’s identity at the vendor from what it lists there now. Budgeted per person and per requirement on each node: 429 step_check_budget with a Retry-After. 404 not_found for a field the integration does not have |
POST | /setup/integrations/{kind}/verify | Check one typed credential at its vendor with a read-only call, before anything stores it. Writes nothing: no secret, config, revision or reconcile state. See Checking a credential before it is stored |
POST | /setup/integrations/{kind}/draw | Redraw a requirement’s live block (public.live) from what a form holds, writing nothing: {"field", "values"}, where values may hold only the fields the block is drawn from (public.drawn_from), each held to its own rule (400 invalid_input naming the field otherwise). {"public"}, or {"public": null, "needs"} saying what to type. 404 unknown_kind for a kind with no live block |
DELETE | /setup/integrations/{kind} | Disconnect: remove what the integration holds at the third-party app, then its block, turning off its agents in the same revision. An integration signed in with a person’s consent gives its grant up with the block, as its sign-out does. The block goes within the request only on a forced disconnect ({"force": true}), whose 200 answer then carries oauth, {"revocation", "said"}, where a grant was given up; the 202 of an ordinary disconnect gives the grant up when its teardown drops the block, and answers no oauth |
POST | /setup/integrations/{kind}/consent | Start a person’s consent sign-in for an integration that refuses service accounts (a consent requirement, ADR-0178): 201 {"id", "kind", "status", "started_at", "expires_at", "authorize_url"}; send the browser to authorize_url, and the vendor returns it to /webhooks/mcp-oauth. Signed in as the company’s own OAuth client for the scopes the product’s seats need now; signing in again replaces the grant and revokes nothing. 404 unknown_kind for a kind no consent product is, 409 no_external_url on an engine without api.external_url (the vendor offers no device sign-in), 409 vendor_refused with the reason for an integration turned off or naming no client |
GET | /setup/consent-sign-ins/{id} | Where a consent sign-in is: {"id", "kind", "status", "detail", "started_at", "expires_at"}, status pending, completing, approved or failed with detail saying why. 404 not_found once it lapsed, ten minutes after it expired |
DELETE | /setup/integrations/{kind}/consent | Give the integration’s consent grant up: Crewlet’s sealed copy, its record and any sign-in in progress are deleted, and the access is revoked at the vendor only when no other live consent grant of the company has a client in the same Cloud project. {"kind", "revocation", "said"}, revocation revoked, not_offered, failed or shared, said the sentence a person reads (for shared, how to end the access at the vendor and which other sign-in that ends). 404 not_connected when nobody is signed in |
POST | /setup/integrations/{kind}/provision | Run the third-party app’s provisioning pass: mint what it needs, register its webhook |
POST | /setup/integrations/{kind}/check | Run the same pass read-only, to see whether something fixed at the third-party app took |
GET | /setup/integrations/{kind}/runs | The passes THIS NODE remembers for one surface, newest first, ten at a time. The node holding the surface’s lease runs and remembers a pass in its own process, so the answer carries scope saying so: an empty list on a fleet where another node ran the pass is not “no passes” |
GET | /setup/integrations/{kind}/runs/{id} | One pass, as the node that executed it remembers it |
GET | /setup/integrations/{kind}/access | Every agent seat on one integration: what the document asks (desired), what the vendor showed on the last sync (observed), the last sync, the plan the next sync takes, whether the agent’s tool is live; what each lane offers now; and the integration’s notice. The revision read is revision and the ETag. See Each agent’s access to an integration |
GET | /setup/integrations/{kind}/access/seats/{handle}/{lane} | One agent’s lane as its Agents tab row reads: {kind, lane, integration, handle, name, status, status_label, grant, holds, app_holds, unused, scope, account, tool, grants, requests, grantable, catalogue_read_at, permissions, lookup, lookup_more, lookup_note, at_vendor, checked_at, applied_at, outcome, refusal, plan}. grant is the agent’s grant in Crewlet, holds what its credential holds at the vendor now (for GitHub, what its tokens carry); for GitHub, app_holds is the permissions the agent’s app is registered with and unused those the grant leaves out or holds lower, never drift, since every token is narrowed to the grant. On a lane that grants single permissions beside a level: grants is each such grant the agent holds, one sentence each (where, until when or for good, who granted it, for which request, whether its credential holds it yet); requests each open request, with the two option ids of its question that grant it (grant-r<id>-t for its hours, grant-r<id>-p for good); grantable how many permissions the catalogue (read from the vendor at catalogue_read_at) offers beside the level and how many of those the company’s own connection lacks; permissions each permission the grants and requests name, saying whether the connection can grant it and, where not, what a person adds at the vendor and where. ?permission= (at most 100 characters, else 400 invalid_query) looks a permission up by part of its name, ignoring case and punctuation: lookup is up to 12 matches, each {id, name, group, write, level, grantable, missing, action_url} judged for the agent’s level, lookup_more that more matched, lookup_note why nothing did (no match, a lane that takes no grants, or an unreadable catalogue). at_vendor, {label, add, url}, is what a person adds to the company’s connection at the vendor before a permission can be granted, and where; absent where nothing is missing. checked_at is when a pass last read the vendor for the lane (a dry run such as Check now included), applied_at when a sync last applied the grant, with outcome and, where refused, refusal. 404 no_such_seat names the agents listed; a lane the kind does not grant is 404 no_seat_access. Every agent route under /access/seats/ reads its {kind}, {handle}, {lane} and {action} trimmed, so a seat one of them finds the others find too |
POST | /setup/integrations/{kind}/access/plan | What a draft would do at the vendor, step by step, writing nothing |
GET | /setup/access/requests/{id} | One agent’s open request for a grant beside its level, as stored when the agent asked with request_access: {id, kind, lane, handle, permission, scope, hours, reason, target, item, ask, asked_at}. The Inbox builds the grant’s draft from it. A request granted, declined or unanswered for thirty days is 404 not_found |
PUT | /setup/integrations/{kind}/access | Save a draft as one revision of the company document, held to the revision the tab was read at, then start the sync. A grant the draft adds is sent without id, granted_by and granted_at, which the engine writes; one naming an agent’s request is built from the stored request. A grant is added or removed, never edited. ?dry_run=true answers the plan and warnings and writes nothing |
POST | /setup/integrations/{kind}/access/seats/{handle}/{lane}/{action} | One action on one agent’s account: rotate, remove (only once the agent is off), keep (write the vendor’s setting into the document), restore, retry, done or release (keep the account at the vendor) |
POST | /setup/integrations/slack/access/seats/{handle}/{lane}/install | A fresh, single-use link a person follows to approve one agent’s Slack app install while the app waits. {"url": "..."}, Cache-Control: no-store, never stored and never part of a read |
POST | /setup/integrations/{kind}/access/seats/{handle}/{lane}/credential | A credential a person created at the vendor and pasted for one agent (Expo’s robot token, DigitalOcean’s personal access token): checked at the vendor, then sealed by the agent’s sync. {"detail", "access"}, or 400 invalid_input beside value |
POST | /setup/integrations/{kind}/access/seats/{handle}/{lane}/identity | Check and keep an agent’s own identity at the vendor where the lane offers one (ADR-0179): {"way": "handed_in" | "invited" | "made", "value", "file_name", "id"}, value the handed-in file or token, never echoed. Writes the agent’s identity: own as a revision where the lane takes that setting and it changes, has its sync check and keep it, and answers {verdict, access}. A check the vendor refused is a verdict, not an error: failed_at names the step it stopped at (the steps after it did not run) and steps what each step that ran found (said) and the vendor’s answers (detail). A lane offering no identity is 404 no_seat_access, an agent that is off 409, a refused identity 400 beside value, a vendor’s definite refusal outside the check 409 in the vendor’s words, the vendor not answering 502 |
DELETE | /setup/integrations/{kind}/access/seats/{handle}/{lane}/identity | Put the agent back on the company’s identity: writes identity: company, gives the agent’s own up (cleared, and asked to be revoked at the vendor where Crewlet cannot) and answers {verdict, access}. A lane whose identity is always the agent’s own (App Store Connect, Expo, a Google growth identity) has no company’s to go back to: 409, and turning the agent off gives its identity up |
POST | /setup/integrations/ssh/hosts/scan | The host keys the server at {"address", "port"} presents, read without signing in, one connection per algorithm, 10 seconds each: {"host_keys": [{"line", "type", "fingerprint_sha256", "problem"}]}, problem naming why a key cannot be pinned. The address is held to the rule a registered server’s is. 409 not_connected while SSH is off, 400 invalid beside address, or beside port outside 1 to 65535, 502 server_unreachable when no key was read, its detail saying why in words (name does not resolve, port refuses, server never answers, or answered with no key to pin); the dial’s own error goes to the log, never the answer |
PUT | /setup/integrations/ssh/hosts/{id} | Add the server {id}, or replace it whole: {"address", "port", "host_keys", "users": {"read", "operate"}, "description", "containers", "inventory", "read_allowlist", "if_match"}, written as one revision the caller authors and held to the document’s rules. {"key", "revision_id", "epoch"} |
PUT | /setup/integrations/ssh/hosts/{id}/inventory | Switch whether the engine reads the server for the atlas: {"inventory", "if_match"}. It changes that one field as one revision the caller authors, so a caller holding none of the server’s key lines can switch it; 404 not_found for a server nobody registered. The server accepts the inventory once its setup is run again (let the atlas read a server). {"key", "revision_id", "epoch"} |
DELETE | /setup/integrations/ssh/hosts/{id} | Remove the server, refused 409 conflict while an agent names it, with the agents to change first |
GET | /setup/integrations/ssh/hosts/{id}/setup | The server setup trusting the current certificate authority and a staged one: {"script", "version"}. Run it as root on the server, then press Test connection |
POST | /setup/integrations/ssh/hosts/{id}/test | Test connection: reach (a failure says how, as a scan does), a pinned host key, a read certificate accepted, the gate’s version, an unlisted command refused with 126, on a server that lets the atlas read it an inventory certificate whose command runs instead of the client’s (inventory_binding), and with an operate user a certificate whose forced command runs instead of the client’s. {"ca": "next"} tests the staged authority. Every test certificate is recorded on the access log before use. {"host", "authority", "ok", "steps": [{"id", "ok", "detail"}], "at"}, kept as the server’s latest test with that authority |
GET | /setup/integrations/ssh/audit | The access log, newest first: kind=certificate (the default), kind=command, or kind=verdict for verdicts on requests delegated to agent seats. Every kind is narrowed by seat (for a verdict, the seat whose request it is; _engine for the certificates and commands of the engine’s own inventory, purpose inventory), host, since and until (RFC 3339), and paged by cursor and limit (1 to 100, 25 when unset). A verdict page is also narrowed by delegation_kind (the request’s act: ssh_operate), verdict (allow, escalate or deny, what took effect), by_kind (agent, person or engine), by (the giving seat), request (one held call or ask), final and sampled (true or false); these on another kind are 400 invalid naming the field. A command row carries its text opened for the administrator, any credential in it replaced by a marker; its output is never kept, only size and digest. A verdict row is {"seat", "request", "kind", "rule", "turn", "by", "by_kind", "through", "asked", "confidence", "verdict", "final", "overruled", "sampled", "digest", "host", "user", "stdin_bytes", "stdin_sha256", "decision", "item", "at"} with subject (what was decided), reason and findings opened and redacted as a command’s text is, or subject_unopened where this node’s keyring does not open them. by is empty for the engine; asked and confidence are an agent’s answer; overruled is the engine’s closed words for why it changed or made the verdict; final marks the verdict that decided the request (a panel member’s that waited is not); sampled one chosen for a person’s spot-check; digest the SHA-256 of the exact request decided. Each page is {"kind", "rows", "next", "complete"} |
POST | /setup/integrations/ssh/rotation | The certificate authority’s rotation, {"action": "stage" | "promote" | "cancel"}. stage seals a new authority as SSH_CERTIFICATE_AUTHORITY_NEXT, which the rendered setup trusts beside the current one, and answers its next_ca_public_key; refused while one is staged. promote is refused until every server’s latest Test connection with the staged authority passed on the server as it is now; it then seals it as the current authority, removes the staged copy and reference, and answers ca_public_key and the retired_ca_public_key (left out on a promote run again over a key already moved), which each server stops trusting once its setup runs again. cancel removes the staged authority’s key and reference. No sealed key outlives its authority, and the engine never signs with one it has not promoted. Each writes a revision |
GET | /secrets | Every stored name with its key_id, updated_at, updated_by (the author), updated_by_kind, operator_id (the credential it was stored through, empty where none) and source (the write path, in its own word: api for PUT /secrets/{name} whoever calls it, setup for an integration’s setup, provision for a provisioning pass, cli or llm-login for a crewlet command’s own write to the fleet’s store with its node’s engine stopped (crewlet secrets set, and crewlet llm’s captured token or exported bundle; a provisioner’s -secret-store run made that way records provision), models for a credential the Models page wrote, mcp for an MCP server’s header or variable stored from its page (the engine’s own OAuth grants, mcp-sign-in and integration-sign-in, are never listed); see the secret store), and write_only (no reveal answers the value: true for one stored from Settings › MCP & tools). Also engine_keys, a count of the engine’s own keys, {"total": N, "by_key": {"<key id>": n}}, naming none; and sealed values counted by key id: identity_values, {"people": {"<key id>": n}, "invitations": {"<key id>": n}} (a person’s name, address and second-factor seed, and the address of every invitation still redeemable), null on a node with no identity estate; assistant_values, Ask Crewlet’s, {"values": {"<key id>": n}} (a conversation’s file counted by the key its content is sealed under in the object store), which no rekey moves (each leaves with its conversation), null on a node with no Ask Crewlet estate; executor_values, the seats’ executor sessions, {"values": {"<key id>": n}} (each session a turn’s row names, by the key its object is sealed under in the object store), which no rekey moves either (each leaves with its row), null on a node with no executor log; access_values, the access log’s SSH commands and delegated-request verdicts, {"values": {"<key id>": n}}, which a rekey moves, null on a node with no access log. Never a value. A rekey keeps each row’s updated_* and source: it re-seals a value it did not choose, so the row still says who stored it |
GET | /secrets/{name} | The same fields for one name. 404 not_found when it is unset, or the name is past the 255 bytes no row is stored under |
GET | /secrets/{name}?reveal=true | Break-glass. The decrypted value, Cache-Control: no-store, logged by name against the authenticated operator. The longest answer is some 384 KiB (the largest value a write admits, in the characters JSON spells longest) |
POST | /secrets/reveal | Break-glass, for several names at once. Body {"names": ["GITLAB_TOKEN_SWE", …]}, at most 64 names, each an environment-variable name; answer {"values": {"<name>": "<value>"}, "missing": ["<name>"]}: every name asked that is held, with its decrypted value (an empty one included), and every name nothing holds. Nothing beside the names asked is opened. Cache-Control: no-store, logged by every name asked against the authenticated operator, and decided on the reveal’s own row before the body is read. A CLI run resolving a company document through a running node uses it: having listed the names with GET /secrets, it asks for the variables its command reads that the node lists (and, with a -secret-store sink, the planned seats’ tokens it reads back) in requests of at most 64, never one reveal per name. 400 invalid_body for no names, more than 64, a field it does not read or a body that is not JSON; 400 invalid_name for a name no ${VAR} reference can hold or one past 255 bytes; 400 invalid_query for any query parameter; 403 reserved_name for the engine’s own key. The longest answer is about 24 MiB (64 values of the largest size a write admits, each in the characters JSON spells longest) |
PUT | /secrets/{name} | Store or rotate one value. The request body is the value, raw bytes, up to 64 KiB (the size every store holds a value to, a direct write with the engine stopped included, and what every reveal is sized from); a longer body is 413 body_too_large. The author is the caller the guard resolved and source is this route’s own, api, never anything the request names; the answer carries updated_by, updated_by_kind, operator_id and source as the row records them. 400 invalid_name when the name is not an environment-variable name or is past 255 bytes, the most a record keeps (the secret store); 400 invalid_query when the request carries any query parameter but `defer_reload=true |
PUT | /secrets | Store or rotate several values as one write. Body {"values": {"NAME": "value", …}}, at most 64 names, each held to the name grammar, at most 255 bytes, and the 64 KiB value bound; any fault refuses the whole body, 400 invalid_body with invalid mapping each bad name to its reason, and nothing is stored. 403 reserved_name for the engine’s own key, 400 invalid_query for any query parameter. Every value is sealed and the active revision is re-activated once when it reads any of them. With "defer_reload": true the values are sealed and nothing is re-activated: reload is {"deferred": true}, saying the values are not active yet, and read_by says what a later re-activation will reach. A deferred batch asks secrets.write alone, never config.write, since it changes nothing the company runs: config.write is asked of the re-activation that follows (POST /config/reload). It is for a writer that seals values one at a time, each durable once it exists, and re-activates once with its last write, as a provisioning run through a node does. Nothing reads a deferred value until a re-activation: a writer that dies before it leaves its values sealed and inactive until the company is next re-activated, by anyone (POST /config/reload, or any apply). 200 {"names": [...], "bytes": {"NAME": n}, "read_by": {"NAME": [paths]}, "reload": {...}|null}. A seal that fails part way answers 500 internal_error with sealed (the names stored before it) and the reload those were given |
DELETE | /secrets/{name} | Remove one value. 200 either way, with {"removed": true|false, "read_by": [paths], "reload": {...}|null}: removing a name the active revision reads re-activates it, so whatever read it falls back or signs out now |
POST | /secrets/rekey | Re-seal every record not already under this node’s secrets.active_key_id (the engine’s own keys included) and every person’s sealed values in the identity estate, one record per person, answering the names of yours it moved, engine_keys_moved, a count of the engine’s, and identity: {"people": n, "values": n}, or null with no identity estate. It also moves every SSH command’s sealed text and every verdict’s sealed words in the access log, one record each, answering access, {"commands": n, "verdicts": n}, or null with no access log. An outstanding invitation’s address is not moved (only a re-issue could carry it again) and is counted by the listing instead. A person or command whose record nobody could confirm, or whose value would not open, is 500 rekey_incomplete carrying what did move; run it again, which moves only what is still under an old key. ?key_id= is refused with 409 when it names a different key |
A secret write re-activates the revision that reads it
Section titled “A secret write re-activates the revision that reads it”A ${VAR} is resolved when a provider or a transport is built, so a sealed value changes nothing running. PUT /secrets/{name}, PUT /secrets and DELETE /secrets/{name} therefore re-activate the active revision, once per request and synchronously, when it reads a name they wrote (ADR-0070; what reads a name is what GET /config/references answers). The answer’s reload is one of:
reload | Means |
|---|---|
null | Nothing the active revision reads names it; nothing was re-activated |
{"deferred": true} | A batch sent with defer_reload: sealed and not active yet, until the caller’s own re-activation or any later one |
{"revision_id": "…", "epoch": 42} | The revision that re-published the company, and the epoch every node converges on |
{"error": "revision_advanced", "detail": "…", "stored_revision_id": "…", "node": "…"} | Another configuration write activated first. The value is sealed; POST /config/reload re-activates the company that runs now |
{"error": "validation_error", "detail": "…"} | The active company does not pass this build’s validation, so it was not re-published |
{"error": "body_too_large", "detail": "…"} | The active company, sealed, exceeds what one key of the coordination store holds (Coordination), so it was not re-published: shrink the document, then POST /config/reload |
{"error": "summary_too_long", "detail": "…"} | The re-activation’s summary is past the 4,096 bytes the activation pointer carries, so it was not re-published: POST /config/reload with a shorter X-Summary |
{"error": "origin_too_long", "detail": "…"} | The name the write was made under leaves the activation pointer past its 8 KiB, so it was not re-published: POST /config/reload through a credential with a shorter name |
{"error": "unavailable", "detail": "…", "stored_revision_id": "…", "node": "…"} | The re-activation was stored and the coordination store did not answer: whether the fleet runs it is unknown |
{"error": "no_active_revision" | "internal_error", "detail": "…"} | Nothing to re-activate, or a failure this node’s log names |
The status is 200 whatever reload says, because the value is sealed before the re-activation is asked for: a client that reads only the status, as crewlet-operator does, is told the truth about the write.
The engine’s own keys are not addressable here. The identity directory’s blind-index key shares the bucket under a path-shaped name (iam/blind-index-key). Every route that takes a name answers 403 reserved_name first (reveal, overwrite and delete alike, whatever the caller holds), because a delete or overwrite would orphan every address in the directory. See the secret store.
The name is an environment-variable name, and a write that is not one is refused: letters, digits and underscores, starting with a letter or underscore. The store is keyed by the name a ${VAR} resolves through, so gitlab-token or my token would be sealed and read by nothing, a failure found only when a provider fails to authenticate hours later. The refusal comes before the body is read. A name outside the grammar names no secret, so reading one answers 404 and removing one answers {"removed": false}.
The body is the value, not a JSON wrapper. A credential is arbitrary bytes (a PEM key has newlines), and an encoding step between the operator and what the vendor compares is a 401 nobody can explain.
Provenance is the node’s, and a write that names its own is refused. Who stored a value is the credential the request authenticated with (updated_by, updated_by_kind, operator_id), and source is the route’s own, api, so a write cannot make a row claim another path. The route takes no query parameter at all: one sent anyway, ?source= included, is 400 invalid_query naming it, not ignored.
Reveal is opt-in on the wire. Without ?reveal=true the route answers what a listing answers for one name, so a browser, a crawl or a link preview cannot pull a credential out by accident.
A value stored write-only is never revealed. The headers and variables Settings › MCP & tools stores are sealed on a row marked write-only: the engine resolves it for the ${VAR} references that name it, and both reveals refuse it 403 write_only, naming it under names, before anything is opened (the batched read refuses its whole request). The listing and one row’s metadata carry write_only. The mark is the row’s: a later PUT /secrets/{name} keeps it, a rekey re-seals the row with it, and only DELETE /secrets/{name} clears it.
Every value is sealed under the node’s keyring. There is no plaintext mode: crewlet validate refuses a Tier A file with no secrets.keys, and the engine refuses to start without one.
Every refusal here is the engine’s envelope: error, the sentence message a screen shows, and the route’s own detail:
reserved_namewrite_only(a reveal naming a write-only value, with itsnames)invalid_nameinvalid_query(a write or multi-name reveal carrying any query parameter, with adetailnaming each and ahint)invalid_body(a reveal or multi-name write that names none, too many, or a field it does not read; a multi-name write whose names or values the store refuses, withinvalid)not_found- on a rekey,
key_id_mismatch(withkey_idandyour_key_id) andrekey_incomplete(with themovednames and theengine_keys_movedcount)
crewlet secrets is the client for all of this while its node’s engine runs, or with -api naming a node that does; see the secret store for why the CLI goes through a running node rather than reaching the KV beside it. With that node’s engine stopped it reaches the fleet’s store itself, through no route here: no node logs a secret_revealed line for what it reads, and a write records the shell’s user as its author, with no credential, under the command’s own source.
/llm/*: models (Settings › Models & Fleets)
Section titled “/llm/*: models (Settings › Models & Fleets)”What each model is doing is a question, answered on the query channel and by the named routes below; what changes something is a route of its own, one verb each. Every answer that depends on the node names it (node).
| Method | Path | Needs | Description |
|---|---|---|---|
GET | /llm/entries | anybody | Every model’s condition across the fleet (query llm_entries): an administrator’s reading, or a member’s with nothing that names a credential |
GET | /llm/fleets | anybody | Every LLM fleet’s members as its balancer reads them, and what each helper and seat runs on now (query llm_fleets) |
GET | /llm/runners | admin | Whether each executor cell (direct, container) can start a box on each node (query llm_runners) |
GET | /llm/models?harness=<built-in harness>[&provider=…] | admin | The models a model step suggests (query llm_models) |
GET | /llm/device-sign-ins/{id} | admin | One device sign-in while its record lingers (query llm_device_sign_in) |
GET | /llm/providers/{key}/check | admin | One model’s latest check, running or ended, from any node, while its record answers (query llm_check) |
PUT | /llm/providers/{key}/credential | secrets.write, and config.write with a draft entity or when it re-activates | Test candidate credential values with the model’s own harness, and store them only if they sign it in; ?dry_run=true tests and stores nothing |
POST | /llm/providers/{key}/check | models.check; with a draft entity, also config.write and secrets.write | The doctor over the API, run on this node’s own time and read back at GET on the same path |
POST | /llm/providers/{key}/retry | models.retry | Probe a sitting-out model once, or clear its sit-out on every node |
POST | /llm/providers/{key}/host-login/check | models.check | Read a harness login’s status on this node now |
POST | /llm/providers/{key}/device-sign-in | secrets.write | Start a Codex device-code sign-in |
DELETE | /llm/device-sign-ins/{id} | secrets.write | Cancel one |
models.check and models.retry are an administrator’s at any recency, and Ask Crewlet’s only on the person’s approval: they change runtime state, never config or a credential. secrets.write asks a recent proof and is never Ask Crewlet’s, since a credential’s value travels in the body.
A draft is decided as the writes it stands for. A draft entry chooses its harness, overrides and env, and resolves its ${VAR}s through the secret store as an apply would, so a check or credential test of one also asks config.write and secrets.write: an administrator’s, with a recent proof, never Ask Crewlet’s. A credential test’s dry_run=true is asked at the write’s own proof, not a check’s: it runs the harness and spends tokens.
Every call is audited, refused ones included (by the route, or by the guard before it: a member’s 403 unauthorized, a stale proof’s step_up_required), as one model_acted in the runtime audit (actor, actor_kind, operator_id, action, provider_key, the secret names a credential call touched and never a value, dry_run, outcome and refusal, and the revision_id a credential’s re-activation activated). The node is the envelope’s. action is check, retry, clear, credential, host_login_check, device_sign_in (a start) or device_sign_in_cancel. How a device sign-in ended is a row of its own, device_sign_in_ended, with status (approved, failed, expired or cancelled), published by the node that ran the session, or by the sweep that fails one whose node is gone, and attributed to whoever started it; an approved session whose login could not be stored or carried to the fleet is outcome: "failed".
GET /llm/entries
Section titled “GET /llm/entries”Built from every live node’s
status record, counted at its
presence’s epoch: each model’s sign-in route, sit-out, last answer and failure,
parked seats and host login, plus what this node resolved per entry. An
unreadable lease table or record store is 503 unavailable, so a blip is never
drawn as “no node knows”.
{ "reading": "admin", "node": "node-1", "nodes": [{"id": "node-1", "reported": true}, {"id": "node-2", "reported": false}], "entries": [{ "key": "default", "harness": "claude-code", "model": "claude-opus-5-5", "health": "expiring", "plan": "3f9a1c0e22b1", "sign_in": {"route": "token", "mode": "subscription", "variable": "CLAUDE_CODE_OAUTH_TOKEN", "source": "store", "resolves": true, "hint": "sk-ant-oat01-…Qm4x", "stored_at": "2025-11-04T18:37:00Z", "stored_by": "miles", "expires_at": "2026-11-04T18:37:00Z", "expiry_basis": "stored_at+365d", "host_logins": []}, "sitting_out": null, "last_success": "2026-10-28T21:56:00Z", "last_failure": null, "waiting": null, "usage": {"days": 7, "calls": 412, "total_tokens": 38400000}, "used_by": [{"seat": "pm", "job": "executor", "position": 0, "written": false, "source": "default-entry"}], "device_sign_in": null, "limits": [ {"window": "session", "hours": 5, "state": "ok", "used": 0.05, "resets_at": "2026-10-29T00:00:00Z", "until": null, "seen": "2026-10-28T21:56:00Z", "stale": false}, {"window": "weekly", "hours": 168, "state": "warning", "used": 0.83, "resets_at": "2026-11-02T09:00:00Z", "until": null, "seen": "2026-10-28T21:56:00Z", "stale": false} ] }], "alarms": [{"kind": "llm_credential_expiring", "title": "A model sign-in expires soon", "person": "…", "detail": "…", "remedy": "…", "entries": [...]}]}healthis the first that applies:sitting_out(a live node sits it out and the window has not ended),no_sign_in(no route on the answering node, or a credential that does not resolve),rejected(an auth failure newer than its last answer, or an expiry past),expiring(within seven days),untested(no answer, failure or call in the window),ready.sign_in.routeistoken,credentials,api-key,env,inherit-env,environment,deviceornone, as the answering node resolves it;sourceisstore,environmentornone. A stored token’sexpires_atis its row’sstored_atplus the lifetime its vendor documents (the token is opaque);expiry_basissays so. The row,stored_atandstored_byare those of the value the answering node resolves, as its snapshot holds it, which the node’s expiry alarms judge too: a value written with its reload deferred moves them at the next apply.sitting_outis the latest window across live nodes (until,resets_at,window,said,since) and thenodessitting it out;last_successandlast_failure(kind,at,said,node) are the latest across live nodes;waitingis the seats parked on a chain naming it, by handle, and since when.usageis the trailing seven days of the spend rollup’s per-entry row, in calls and tokens, never money (the dashboard shows no price; the rollup carriescost_usd).used_byis the engine’s resolution of every agent seat’s jobs (position0 runs the job, more is a fallback;writtenis whether the seat wrote the field;sourcethe level that decided it:seat,executor,fleet(default-fleet, for a seat naming nothing),default-entry,first-entry;fleetthe LLM fleet the use goes through,positionthen the entry’s place in its list),{"assistant": "chat", "position": 0}for Ask Crewlet and{"advisor": "findings", "position": 0}for the Advisor.limitsis the sign-in’s vendor limit windows, the newest report of each across live nodes:window(session,weekly,model,unknown),hours(0 where unsaid),model(a model window’s family),state(ok,warningfrom 80% used or the vendor’s word,reached),used(the fraction, null where unsaid or the window has turned over),resets_at,until(where the model sits this window out),seenandstale(older than 30 minutes). Empty where the harness reports no window.alarmsis this node’s latest evaluation of the five model alarms, each with itstitleandperson(the kind’s words for a company owner) beside itsdetailandremedy.
A member’s reading ("reading": "member") keeps each entry’s key,
harness, model, health, sign_in.route and sign_in.resolves,
sitting_out without said and nodes, last_success, waiting,
used_by and limits, and answers alarms: null: nothing in it names a credential, an
account, a vendor’s sentence or a cost.
GET /llm/fleets
Section titled “GET /llm/fleets”Every LLM fleet (providers.llm_fleets, default-fleet listed first whether or
not the document holds it), read from the same status records as
GET /llm/entries, and what every helper and agent seat runs
on now, by the rule the engine’s balancer picks with. Both readings carry the
same words; reading says which was asked.
{ "reading": "admin", "fleets": [{ "key": "claude-opus", "name": "Claude Opus", "is_default": false, "class": "Claude Opus", "harness": "claude-code", "strategy": "balanced", "threshold_points": 5, "spread": 8, "members": [ {"entry": "claude-max", "kind": "plan", "state": "available", "until": null, "why": "", "share": 30, "overflow": false, "last_served_at": "2026-11-24T08:50:00Z", "serving": ["engineer"], "unlisted_serving": 0, "unlisted_homes": 0}, {"entry": "claude-api", "kind": "api", "state": "limit", "until": "2026-11-24T09:40:00Z", "why": "Throttled by the key's rate limit", "share": 0, "overflow": true, "last_served_at": null, "serving": [], "unlisted_serving": 0, "unlisted_homes": 0} ] }], "assignments": [{ "subject": "engineer", "kind": "seat", "name": "Engineer", "target": {"fleet": "claude-opus"}, "now": "claude-max", "now_kind": "running", "waiting_until": null, "jobs": [{"job": "executor", "target": {"fleet": "claude-opus"}, "now": "claude-max", "now_kind": "running", "waiting_until": null}, {"job": "review", "target": {"pinned": "claude-sonnet"}, "now": "claude-sonnet", "now_kind": "next", "waiting_until": null}] }, { "subject": "assistant", "kind": "helper", "name": "Ask Crewlet", "target": {"fleet": "claude-opus"}, "now": "claude-max", "now_kind": "next", "waiting_until": null }]}- A member’s
stateisavailable,near(a session or weekly window from 80% used),limit(a live node sits it out, or a window reads reached;untilis when it has room, null where unknown) orsignedout(an auth failure newer than its last answer, or a sign-in the Models page reads as refused or not signed in on a node that reports it). A window heard more than 30 minutes ago says nothing.shareis a plan’s higher window use in whole points,0for a key, cloud account or gateway, null where unknown;overflowis a non-plan member of a Balanced fleet.kindisplan,api,cloudorgateway. spreadis the points between the most and least used members taking new work, null for a Sequential fleet or one with fewer than two known shares.servingis the subjects with work in flight on the member now: the calls the nodes’ status records carry as running and the executor runs launching or running on it. It is never a prediction, so it is empty while nothing runs.unlisted_servingis the work in flight on the member that the nodes’ status records counted but could not name beside the rest of their row, andunlisted_homesthe seat jobs’ homes on it likewise; both are0where the records name every one. Past them,servinglacks those subjects and a pick may miss a home.nowis the member the job’s work in flight runs on (now_kindrunning), else the one its next piece of work would go to (next), from the home the node holding the seat publishes; the next picks of every subject take their member in turn, as the engine’s picks do, so equal or unknown shares spread them.nowis null while no member can take it, withwaiting_untilthe earliest instant one has room (null for a fleet with no members), andnow_kindis then absent.now_kindunlisted, withnowandwaiting_untilnull, is a job with no work in flight named on a member it may run on that hasunlisted_serving, or a fleet’s job with no home named where a member hasunlisted_homes: its work may run there, or its home steer its pick, so neither is guessed.targetis{"fleet": key}or{"pinned": entry},""where nothing is set and the company’s fallback runs it. A seat always carriesjobs, by the engine’s job names (executor,review,subagent,auxiliary,judge,triage); its own fields are its executor’s. Helpers areassistantandadvisor.
GET /llm/runners
Section titled “GET /llm/runners”{ "default_run_in": "container", "declared": true, "cells": {"direct": {"ready_on": ["node-1"], "not_ready_on": []}, …}, "nodes": [{"id": "node-1", "reported": true, "direct": {"state": "ready", "detail": "box root /home/crewlet/.crewlet/sandboxes writable", "fix": null, "checked_at": "…"}, …}]}declared says whether the company configures providers.sandbox at all;
without it every cell reads unconfigured. A refusal carries its fix.
GET /llm/models
Section titled “GET /llm/models”{"source": "models.dev", "fetched_at": "…", "provider": "anthropic", "aliases": [{"id": "sonnet", "name": "Sonnet", "detail": "The harness's latest Sonnet", "model": "claude-sonnet-5-5", "version": "5.5"}], "models": [{"id": "claude-opus-5-5", "name": "Claude Opus 5.5", "family": "claude-opus", "released": "2026-…", "tool_call": true}], "docs_url": "https://code.claude.com/docs/en/model-config"}Read from the public models.dev catalogue, which needs no
key: no credential leaves the engine to name models, and whether a plan reaches
one is what the test call says. Claude Code reads provider anthropic, Codex
openai, Gemini CLI google and Grok xai; OpenCode and Pi name their
provider and are offered <provider>/<id>. Every other built-in harness names
its own models and is answered its aliases and page with "source": "none". An
alias’s model and version are what it resolves to on the vendor’s service,
from the harness profile, and are absent where the profile does not know. A copy
is kept for a day and revalidated; a catalogue that cannot be read keeps the
last copy and says how old it is in reason; with no copy the answer is
"source": "none" with models: [] and the reason. 400 bad_params for an
unknown harness, custom, or OpenCode or Pi without provider; 422 unknown_provider for a provider the catalogue does not list.
PUT /llm/providers/{key}/credential
Section titled “PUT /llm/providers/{key}/credential”{"values": {"ANTHROPIC_API_KEY_SONNET": "sk-ant-api03-…"}, "entity": {"harness": "claude-code", "model": "sonnet", "auth": {"mode": "api-key", "api_key": "${ANTHROPIC_API_KEY_SONNET}"}}}Tested before it is stored. In this order:
- The target is the active entry, or the draft
entity(a create, or an edit that changes how it signs in), validated by splicing it into a copy of the active document as the entity route’s dry run does (422 validation_errorwith problems underproviders.llm.<key>).404 not_foundfor an absent key with noentity;403 config_managedfor a draft on a managed document. - Every name must be a variable the entry reads (
422 validation_errorat["values", NAME]), and a value of the wrong kind by its vendor’s prefix (an API key in a token’s slot, or the reverse) is refused there too, before any call. Whitespace around each value is trimmed; a value holding a space, line break, tab or invisible formatting character inside is refused at the value with how many and where (“This token contains 2 spaces (characters 66 and 67).”): a terminal that wraps a long token turns the break into spaces when copied, and Claude Code ignores such a token outright. If-None-Match: *refuses a name already stored:412 already_existswithnames, so a create never overwrites a secret another model reads. It is decided again at the seal, in one step of the store’s: a name another write stored while this one was tested is the same412, withsealednaming what this write stored before it, and nothing is re-activated. A create is keyed by its operation key: theIdempotency-Keyheader, or one minted for it, scoped by the caller as on every keyed route. Each row it seals carries the key. A create that stopped part way (a500withsealed, or a412on a later name) answersop_id. The same request sent again under that key re-seals the names its key sealed, within a day of their seal by the engine’s own clock (never the time the key carries, which its caller writes), with the values it sends now, and creates the rest. Any other create naming them is412, whatever value it sends: the store is never read for a value, so no answer says whether a guess equals what is stored. The key is in no other answer, listing, log or audit row.- When the write will re-activate the company,
config.writeis asked before anything is tested or sealed. - The candidate values are handed to the model’s own harness, in an isolated
home, for one one-turn call, within the entry’s
timeout_secondscapped at 120 s. That call is the whole test: the check’sshellandweblines say their probes were skipped (they read what the entry lets its harness reach, which a credential does not change); the entry’s own check probes them. A refusal is422 credential_rejectedat the value, and nothing is stored. Itsdetailsays what the failure meant rather than quoting the harness: the vendor refused the credential (wrong, expired or revoked, with the command that makes a new token where the harness has one), or the harness never used it, so the vendor never saw it (the profile’sauth_markersmeaning: unread). The harness’s own words stay on the check’s lines, and a failing line carriesmeaning(refusedorunread) beside itskind. A vendor that did not answer is502 credential_untested; a harness that cannot run (no binary) is422 validation_erroratproviders.llm.<key>.harnesswith the doctor’s remedy. A429passes: it proves the credential authenticated, and the answer’slimitedsays so,{"until", "resets_at", "window", "said"}, withuntilnull (a test sits nothing out) andresets_atthe vendor’s reset when it named one. - With
dry_run=truethe answer is200 {"ok": true, "verified", "hints", "check", "limited"}and nothing is stored. - Each value is sealed (source
models), and the revision that reads any of them is re-activated once, held toIf-Matchwhen the caller sent one. From here the write finishes even when the caller disconnects. A seal that fails part way is500 internal_errorwithsealed, the names stored before it, and re-activates nothing; send the values again.
{"verified": "Answered a one-turn Claude Code run in 3.4 s with only this value.", "check": {"at": "…", "node": "node-1", "ok": true, "lines": [{"check": "binary", "ok": true, "detail": "…"}]}, "names": ["ANTHROPIC_API_KEY_SONNET"], "hints": {"ANTHROPIC_API_KEY_SONNET": "sk-ant-api03-…7d2K"}, "entries": ["sonnet"], "reload": {"revision_id": "…", "epoch": 42}, "cleared": ["sonnet"], "running_runs": 1, "limited": null}entries is every model that reads one of the names, which all sign in with it
now; cleared the ones this node had sitting out on the replaced sign-in, which
start clean; running_runs the executor runs still running on them, which keep
the old credential until their segment ends (null when it could not be
counted). A re-activation that raced another write answers 200 with
reload.error: "revision_advanced": the values are sealed and stay.
POST /llm/providers/{key}/check
Section titled “POST /llm/providers/{key}/check”{"smoke": true} checks the active entry, {"smoke": true, "entity": {...}}
a draft, which resolves its ${VAR}s through the store as an apply would. The
body carries no credential value: a typed credential is tested by the
credential route’s dry run. A check of an existing entry is a real call on its
sign-in, so its outcome is remembered as any call’s is.
The check runs on the answering node’s own time. With its smoke calls it
makes up to four harness runs within 180 s, longer than the two minutes of
silence a proxy in front of the API is asked to allow
(Deployment), so the node starts it, waits up to two
seconds, and answers 202 Accepted with the check running and Location: /llm/providers/{key}/check — or 200 where it ended within those two seconds,
as a check without smoke does. Either answer, and GET on the same path from
any node, is the check:
{"id": "…", "entry": "sonnet", "node": "node-1", "state": "running", "draft": false, "smoke": true, "started_at": "…", "deadline": "…", "ended_at": null, "by": "jane.doe", "check": {"at", "node", "ok", "failure", "lines": [{"check", "ok", "detail", "kind", "remedy"}]}, "failure": "…"}state is running, ended or lost. An ended check carries check, one
line per check (binary, version, sign-in, usage, smoke, shell, web,
executor), each line’s detail and remedy cut, longest first, where the
answer would pass 64 KiB; or failure, why it found nothing (the node running
it stopped, or the model was removed while it ran). A check still running past
its deadline is lost, its failure naming the node, which stopped before it
could record the end. GET /llm/providers/{key}/check answers the latest check
for ten minutes after it ended, or after its deadline, then 404; the apply that
removes the model removes it at once.
One check of a model at a time, across the fleet. Asked while one runs, with
the same smoke and no draft, the route answers the running check (202)
rather than starting another. Any other ask while one runs (a draft, or the
other smoke) is 409 check_in_progress with the running check. A check
asked of a node that has begun to stop is 503 unavailable with the drain’s
Retry-After. 404, 422 validation_error for a draft.
POST /llm/providers/{key}/retry
Section titled “POST /llm/providers/{key}/retry”{"mode": "probe"} makes one call within 60 s on the answering node and, if
it answers, clears the sit-out on every node. A limit met again is
{"cleared": false, "still": {"until", "resets_at", "window", "said"}} and
clears nothing. A probe that failed for any other reason (a refused sign-in, a
vendor that did not answer) clears nothing and says why in failed, present
only then, so the person tests the model rather than retrying again.
{"mode": "clear"} clears it at once, and every chain parked on the model
probes again. 200 {"cleared", "mode", "node", "still", "failed"};
404; 409 not_sitting_out for a probe of a model no live node sits out.
POST /llm/providers/{key}/host-login/check
Section titled “POST /llm/providers/{key}/host-login/check”Runs the harness’s own status command on the answering node:
{"node", "state": "signed_in" | "signed_out" | "unknown", "method", "account", "checked_at", "command": "crewlet llm login <key>", "shares_login_with": [...]}.
shares_login_with is every model on the same harness and login directory, which
one login signs in. It never signs anything in: command is what to run on that
node. 404; 422 no_host_login for a model that signs in with a token, a key
or its env.
Device sign-in
Section titled “Device sign-in”POST /llm/providers/{key}/device-sign-in (body {}) starts the harness’s
device-code sign-in on this node and answers 201 as soon as the harness printed
its code: {"id", "entry", "node", "url", "code", "status": "pending", "started_at", "expires_at"}. The person approves at the vendor’s page; nothing
is pasted back. On approval the node seals the login as the model’s credential
bundle and re-activates, so every node restores it, and the record’s reload
names the revision. GET /llm/device-sign-ins/{id} reads it (status
starting, pending, approved, failed, expired or cancelled, a
detail on failure) until ten minutes after its code expires, then 404.
DELETE /llm/device-sign-ins/{id} cancels it: 200 {"id", "status": "cancelled"}, forwarded to the node running it.
Refusals: 404; 409 sign_in_in_progress with the running session;
422 no_device_sign_in for a harness with none or a model whose sign-in reads no
login (an API key or its env); 502 device_sign_in_unavailable with the harness’s
first line when it printed no code in time.
Concurrent writes
Section titled “Concurrent writes”There is no leader: any node’s API can write the config, and the activation pointer in the coordination KV is the shared truth. Writes take no lock, but a concurrent one is detected: the activation is a compare-and-set.
- Every write reads the fleet’s revision from the pointer, derives from it, and names it as the new revision’s parent. The activation lands only while the pointer still names that parent; a write that lost is refused
revision_advanced, whether or not the caller sentIf-Match. A pointer removed since the read (deleted, or lost with a rebuilt coordination store) refuses it the same way: read/configagain and rebuild the edit. The status follows RFC 9110 §13.1.1:412whereIf-Matchnamed a revision,409where it named none or sentIf-Match: *(that a company exists is still true of the winner). A write whoseIf-Matchis another resource’s tag (a charter write’s, a per-entity write’s), and a reload or a revert, lose as409. If-Match: <revision_id>is still worth sending: it is checked before any work, so a caller editing a moved revision is told without a document being built, validated and stored first.- A losing write’s revision is kept: the
409(or412) names it asstored_revision_id, beside thenodethat served the write. It is valid, inert history on that node alone:GET /config/revisions/{id}/diffandPOST /config/revisions/{id}/revertreach it there, by that node’s own address where a load balancer or shared Service fronts several; any other node answers404. No node boots on a revision until its own engine has applied it, so the loser is never offered to the fleet at a restart. - What
/configanswers and what a node runs are two facts./configanswers the fleet’s revision on every node. A node runs the revision its engine last applied, which trails the pointer by an apply and stays behind it on a node that refused the fleet’s revision (a missing environment variable, an MCP binary its image lacks). Such a node keeps running what it served and restarts onto the revision its boot row names. Its row inGET /fleetnames the revision it refused,config_applied_epoch(the epoch it last applied),config_serving_revision_id(the revision it runs) andconfig_boot_revision_id(the one it would boot on: the same as the one it runs, except while a write to its boot row is retried; absent on a node whose database is discarded at every start,store.scratch, so every node without thedatarole, which boots on nothing and applies the fleet’s revision from scratch). Writes through such a node are built on the fleet’s revision and land, so the write that corrects a refused revision can go to any node, that one included. - With no pointer, every write is a create. When the coordination store holds no activation (a new fleet, or a lost pointer, such as a rebuilt external NATS cluster or a removed bucket),
/configanswers the company this node knows: a change an offline command made on the fleet’s revision as this node last saw it, else that revision (refused here or not), else the revision it boots on (see Control Plane);404 no_active_revisionwhen it knows none. Every write is then a create-only compare-and-set: it lands only while the fleet still has no activation, and the first to land is the fleet’s pointer again. A node that joined a running fleet and has not reconciled yet reads the same pointer as every node, soIf-None-Match: *there is412 already_configured. Replacing a running company would rename it, change every seat id derived from the name and orphan their memory. - The boot publish is a compare-and-set too. A starting node publishes at most one revision. A change an offline command made on it (
crewlet config import,activateorrekeywhile its engine was stopped) is published only while the fleet still runs the revision that change was built on, expecting the very activation the start read (or the earlier offline change it replaced, where a start published that one and could not confirm it); with no pointer, when that is the revision this node last saw the fleet run. Otherwise, over a lost pointer or a pointer another node restored naming a revision this node holds that was activated before the one it last saw, it publishes the fleet’s revision it last saw (having seen none, the one it boots on). A pointer somebody chose is the company however old its instant, and no boot replaces it. A publish that loses re-reads the pointer and decides again, so a write landing while a node starts is never replaced. An offline change the fleet has moved on from is withheld, never published over the fleet, and the node logsoffline_revision_not_publishedat warn: at every start while the change is what it boots on, and once more when it applies the fleet’s revision, which replaces the change as what it boots on and keeps it as history. The hint names the change:GET /config/revisions/{id}/diff?against=<built_on>on that node shows what the offline change did, to make again on the fleet’s document;POST /config/revisions/{id}/revertthere puts it up as it stands, undoing what the fleet changed since. See What a booting node publishes. The one unconditional activation iscrewlet run -import-company, which replaces whatever the fleet runs with its file.
On either, re-read /config and send the edit again.
Status codes
Section titled “Status codes”200 OK: a successful read, a dry run that found the write valid ({"valid", "base_revision_id", "warnings", "derived"}), or a charter write ({"charter", "changed", "revision_id", "epoch"}), which replaces a resource rather than creating one201 Created: a write produced a new revision:{"revision_id", "epoch", "warnings", "derived"}(see What a write answers). A per-entity write, a reload and a revert return it too.400 Bad Request:invalid_body,invalid_patchorvalidation_error, each withdetail(the field path and what to change) andproblems;summary_requiredwhen a write has neither anX-Summaryheader nor a_summarybody key (asked last, once the write is admitted and its document checked, so a caller who may not make the change gets the403first);summary_too_longwithsummary_bytesandmax_summary_byteswhen the summary is past the 4,096 bytes the activation pointer carries, measured as the pointer encodes it (refused, never cut);origin_too_longwithpointer_bytesandmax_pointer_byteswhen the name the write was made under leaves the pointer past its 8 KiB;invalid_querywhendry_runis nottrueorfalse;identity_mismatchwhen a per-entity body renames what the path addresses;conflicting_preconditionswhen a write sendsIf-MatchbesideIf-None-Match401 Unauthorized:invalid_tokenfor a missing or invalid bearer token, in the same refusal envelope every route answers with, written by the guard before any route runs403 Forbidden:unauthorizedwhen the credential holds neither the grant nor, on the org chart, the lead relation (reasonis the rule that refused;refusedlists a lead’s write’s);step_up_requiredfor a write whose proof of identity is older thanstep_up, whether the route or the write’s parts found it;config_managedwhenapi.auth.company_writersnames the document’s writers and this credential is not one of them (a person’s session, a machine token and a lead’s write among them), withmanaged_by,detailandhint, for a write and its dry run alike, never a read or a reload, asked before the body is read (see Managed configuration)404 Not Found: a revision that is not there;no_active_revisionon a read when nothing is configured (no activation and this node knows no company);no_such_entityon a per-entity read or write naming an id the active revision does not carry (of a seat or a unit, told only toadmin; anybody else gets403as for one outside their team);no_routefor a/configpath this surface does not serve405 Method Not Allowed:method_not_allowedfor a/configpath under a method it does not take, withAllow409 Conflict:revision_advanced(a race with a concurrent writer or the pointer’s removal, for a write that named no revision inIf-Match);no_active_revision(aPATCH, a charter write, a per-entity write or a reload when nothing is configured);seat_heldwhen a write takes away a human seat somebody holds or is invited to (see What a write answers);unreadable_revision,unsealed_revision,unreadable_fleet_revision,unsealed_fleet_revisionorunknown_seal_revisionwhen the revision a read or write needs does not open on this node (see A revision this node cannot open is refused, whichever route reads it). Arevision_advancedfrom a write that lost at its activation names the kept revision asstored_revision_idand its node asnode(see Concurrent writes)412 Precondition Failed:revision_advancedwhenIf-Matchnames a revision that is not the fleet’s or stops being so before activation (naming the kept revision and itsnodeas the409does where it lost at activation);already_configuredwhenIf-None-Match: *meets an active revision (a create-only write that lost at activation names the kept revision andnodelikewise);no_active_revisionwhenIf-Matchnames a revision and none is active;version_movedwhen a charter write’s or per-entity write’sIf-Matchnames a charter or entity that has changed, carrying it ascurrentand itsetag428 Precondition Required:bad_if_matchfor a charter write with noIf-Match415 Unsupported Media Type:unsupported_patch_media_typewhen aPATCHbody is a patch format other than a JSON Merge Patch, withAccept-Patch503 Service Unavailable:unavailablewhen the coordination store cannot be read, so the fleet’s revision cannot be either (every write and every read that needs it), withRetry-After: 2and areason.unavailablefor any other node condition (a store too busy to take a write’s revision, one closed while the node adopts a snapshot or shuts down, a state-log refusal behind a read, a request out of time), with a one-sentencedetailand aRetry-Afterexactly where waiting clears it.unavailablewith"outcome": "unknown"when a write stored its revision and the coordination store did not answer the activation, which may have landed. The body namesstored_revision_id,your_base(the revision the write was built on) andnode(that stored it), with noop_id: the pointer says whether it landed, andGET /confignames the stored revision or not once the store answers. Sending the write again makes another revision, over this one if it landed. If it did not, the stored revision is in that node’s history alone:GET /config/revisions/{id}/diffshows it andPOST /config/revisions/{id}/revertmakes it the company on that node, reached by its own address behind a load balancer or shared Service; any other node answers404. Every write here can answer it (PUT,PATCH, a per-entity or charter write, a reload, a revert), and so can a/setupsubmission.seat_holders_unavailablewhen a write that takes a human seat away cannot read the identity directory to see who holds it: nothing was written,seatsnames the seats (none for a whole document replacing an unsealed revision, which asks about every seat it does not keep), and aRetry-Aftercomes where waiting clears it.drainingwhen the node has been told to stop, with aRetry-After(see During a drain).
The config_audit query
Section titled “The config_audit query”Revision metadata for the dashboard’s Configuration and Audit screens. A query, not a REST route (there is no GET /config/audit): it answers the revision records GET /config/revisions serves, as a bare array (the one question in the set that is not an object).
query config_audit { "limit": <N> }| Parameter | Default | Range | Description |
|---|---|---|---|
limit | 50 | 1..500 | Revisions to return, newest first. An out-of-range number is CLAMPED to the range; a non-number reads as the default. |
Response (200 OK):
[ { "revision_id": "11111111-1111-1111-1111-111111111111", "parent_revision_id": "00000000-0000-0000-0000-000000000000", "created_at": "2026-05-17T10:31:02.118431Z", "created_by": "jane.doe", "created_by_kind": "operator", "operator_id": "pat:0192f00d-0000-7000-8000-00000000000a", "source": "api", "summary": "add Designer role", "is_active": true, "activated_at": "2026-05-17T10:31:02.118431Z" }]Payloads are NOT included; fetch a revision via GET /config/revisions/{id} for the full JSON.
The records are the revisions this node holds, and two fields are about the fleet rather than the revision:
is_activemarks the fleet’s revision, the one the activation pointer names: the same row on every node that holds it, whatever the answering node runs. A node that refused the fleet’s revision marks the fleet’s, not the one it still runs; what each node runs isGET /fleet’s.activated_atis the latest activation of the revision this node has met, on every row alike, the revision it boots on included: raised by each activation this node’s reconciler sees on the pointer and each it publishes, never lowered. The retention sweep dates an old revision activated again by it. It is not the activation a node applied: a node that refused a re-activation of the revision it runs (the rotation gesture, on a node that lost the credential) reports the fleet’s newer instant all the same. What each node runs isGET /fleet’s; the instant its engine applied is the store’sserved_at, not carried here (see A node’s own store keeps three facts apart). Absent on a revision nothing has activated, such as one that lost a race or an offline import not yet published.
created_by is the revision’s author, created_by_kind its kind and
operator_id the credential it was written through (see who a write is
attributed to), on this answer, on
GET /config/revisions and on GET /config/revisions/{id} alike. The kind is
one vocabulary across every trail the engine keeps (agent, human,
operator, system):
created_by_kind | Who wrote the revision | created_by |
|---|---|---|
human | A person (every person holds a seat), or a Tier A token or service account the identity directory binds to one, on /config or /setup | The seat’s handle |
operator | A credential nobody is bound through (a Tier A token or a service account bound to no seat) on /config or /setup; or whoever ran crewlet config import / crewlet config rekey on the host | The credential’s login (token:<id> for a Tier A token), or the host login ($CREWLET_OPERATOR, else $USER) |
system | The engine itself: a node seeding the store from its -company file at boot, or the reconcile loop’s own writes (removing a disconnected integration, recording a discovered site, reloading after sealing a credential) | The node’s id for a seed; reconcile loop for the loop |
operator_id is empty for every system revision and host-side CLI write.
Read the kind, not the label: the name spaces overlap. A revision reads the same
on every node, since the activation pointer carries its author, kind and
credential (see Control Plane). A kind
a newer engine adds arrives as itself.
GET /config/revisions/{id}/diff
Section titled “GET /config/revisions/{id}/diff”A structural diff of two revisions: one entry per path that moved, with
the value on each side. ?against= names the other side and defaults to the
fleet’s revision (active); the direction reads as “what against became”, so a bare
call answers “what would reverting to this change”. The dashboard gets the same
answer as the config_diff query.
{ "from": "00000000-0000-0000-0000-000000000000", "to": "11111111-1111-1111-1111-111111111111", "changes": [ { "path": "providers.llm.main.model", "kind": "changed", "from": "claude-sonnet-5", "to": "claude-opus-5" }, { "path": "mcp_servers[1].url", "kind": "added", "to": "https://mcp.example.com/sse" } ], "changes_total": 2}kind is added, removed or changed, and from/to are absent on the
side where the path does not exist. Both sides are redacted, always: a
rotated credential shows as a changed mask and never as either value.
changes_total is how many differences there are; changes is how many
this answer carries: the listing is cut at 500 entries, so render the total
and say what was left out. crewlet config diff prints every change.
changes is always a list: two identical revisions answer [] with a
changes_total of 0, never null.
POST /config/reload: after a secret changes
Section titled “POST /config/reload: after a secret changes”Takes no body and changes nothing. It stores a new revision carrying the fleet’s document and activates it over the fleet’s revision, which advances the epoch and makes every node apply again. Whichever node it is sent to, it re-publishes the fleet’s revision, on a node that refused that revision too, never the one the node still runs.
That is the gesture a rotated credential needs: a ${VAR} secret pointer is
resolved from a snapshot taken at apply time, so only a new apply refreshes it.
A write through /secrets of a name the active revision reads does this same
reload itself (above);
the route is for a value written any other way (engine stopped, a store an
external broker holds) and for a write whose own re-activation answered an
error. A new revision, never a re-pointed old one, keeps history append-only.
X-Summary names it; unset, it records reload configuration.
Answers 201 with the revision, its epoch and its warnings (see
What a write answers),
409 no_active_revision when nothing is configured, 409 revision_advanced
when another write moved the pointer between the reload’s read and its
activation, and 400 validation_error when the active document breaks a
runnable rule of this build (a reload is an apply, so it re-publishes only a
company every node can run; correct it with PUT or PATCH). A document that
breaks only an admission rule,
such as two sandbox setup steps of one name a newer peer admitted, reloads, so a
credential rotation still reaches a company carrying one; its
answer lists each violation as an admission warning.
On a stopped node the same gesture is
crewlet config activate <UUID> naming the
company’s own revision, the one crewlet config revisions
marks fleet's. It opens the node’s own store, so it cannot run beside that
node’s engine, and makes an offer: the node publishes it at its next start as a
new activation of the same revision, but only while the fleet still runs the
revision the offer was built on (or, with no pointer, while that is the
revision this node last saw the fleet run). If the fleet has moved on
meanwhile, the offer is withheld and the node says so at warn, as
offline_revision_not_published; once it applies the fleet’s revision it runs
that one, and boots on it once its boot row has moved, and the offer stays in
its history. A running fleet takes this route.
Open on a managed document. A reload changes no byte of the company, so
api.auth.company_writers
does not refuse it: it is how a credential somebody rotated in an emergency
reaches the running seats when the system that manages the document cannot
know it has to.
Stored revisions are read as they are
Section titled “Stored revisions are read as they are”A read never validates. GET /config, a revision read, a diff, the reference index, the entity reads and the prior a write restores its masks from all open a stored revision as it is, even one this build’s validator would refuse (a later build can leave one in the store). Validation happens only where a document would RUN, to the rules that question needs:
- A write (
PUT,PATCH, a per-entityPUT, a/setupsubmission that changes the document) validates the whole document it produces against every rule, admission rules included. A revision this build refuses stays readable, a correctedPUTorPATCHreplaces it, and a write that leaves it uncorrected is refused400 validation_error, even when the write touched nothing near the problem. - A reload or a revert (including a
/setupsubmission that only rotates a sealed credential, which reloads) validates what it re-activates against the runnable rules only. A revert to a revision that breaks one answers400 validation_errornaming the field; a revert to one that breaks only an admission rule is accepted, and each node logsorg_admission_warningwhen it applies it.
A revision this node cannot open is refused, whichever route reads it
Section titled “A revision this node cannot open is refused, whichever route reads it”A read does not skip the seal. Every reader, and a revert and a write whose prior it is (except the one write below), opens the revision under the node’s keyring first. One that does not open is answered 409 naming it (revision_id) under one of five codes, each with its own remedy; the first two are met in this node’s own copy or only through the fleet’s pointer:
unreadable_revision: sealed under a key the keyring no longer holds.hintsays to put that key back in the node’ssecrets.keys.unsealed_revision: stored without a seal. A node reads only sealed revisions, because the seal says a node of this fleet wrote it; a plaintext one could come from anything that reached the store, so it can’t be shown, compared, edited or reverted to.hintsays an admin sends the whole document again from their own copy withPUT /config, or imports it withcrewlet config import; either stores it sealed (see below).unreadable_fleet_revision: the fleet’s revision, met only through the pointer with no row held, is sealed under a key this node was never given.hintsays to add it to this node’ssecrets.keysand restart.unsealed_fleet_revision: the fleet’s revision arrived on the pointer without a seal, so it came from outside the fleet (every node seals what it activates).hint: an admin sends the whole document withPUT /config, or imports it withcrewlet config import; either stores it sealed and activates it.unknown_seal_revision: sealed in a form this build does not read, in this node’s own copy or the fleet’s, most likely by a newer build. It is somebody’s document, not an unsealed one, so no write replaces it,PUT /configincluded.hintnames the build that sealed it: upgrade this node to the build the rest of the fleet runs, or run that build here again where this node’s own copy came from it.
detail says what happened; the keyring’s own error goes to the node’s log. The dashboard’s config questions answer the same five codes, on the socket and on /query, with detail and hint as one sentence on the frame’s detail. A /setup write that meets one answers them too, naming what it sealed before as wrote_secrets. None is a 500 internal_error.
A whole document replaces an unsealed revision
Section titled “A whole document replaces an unsealed revision”PUT /config, with or without ?import=true and as a ?dry_run=true check, is accepted over an active revision stored without a seal, and reads nothing from it, as an offline crewlet config import does. It is still the revision the write is built on: If-Match and If-None-Match are judged against it, and the activation is conditioned on it. Reading nothing means:
- No mask is restored. A credential still holding the redaction marker has no value behind it and is refused
400 validation_error, the problem naming the field and saying to write the real value or a${VAR}reference. Every other problem is reported beside it. - Nothing a newer build wrote is carried back: that rule holds only for a revision that opens.
- It is judged as a document replacing nothing. Against nothing a write changes every setting, so only
adminreplaces one; a lead is refused403 unauthorized,refusedlisting every part outside their team, the company’s settings among them. The charter’s rules are judged as for a first write, which warns, and?import=truekeeps its own rules. - Every held seat is kept. With no revision to say which seats the write takes away, it asks the identity directory about every seat the document does not keep as a human seat. One somebody holds (a person at any stage short of removal, a service account, an open invitation) is refused
409 seat_heldas a removal is. Itsdetailnames the seats the document doesn’t keep, a seat no revision names any more included;hintoffers keeping each as a human seat first, since freeing one by moving a person to another human seat needs a company running on the node, which a node with an unsealed active revision may lack. A node that cannot read the directory refuses503 seat_holders_unavailable, naming noseats. - A body the fleet’s pointer carried is not kept. Where the unsealed revision is this node’s own copy, the new revision names it as its parent, as the offline import does. One met only through the pointer never enters this node’s history, so the new revision names no parent, and its activation is still conditioned on it.
Every other write (PATCH /config, a per-entity PUT, a revert, PUT /config/charter, a /setup submission, POST /config/reload) is built from the active document and is refused over an unsealed one with the same 409. Over a revision that is sealed but does not open here (a key the keyring lacks, or a form this build does not read), every write is refused, PUT /config included: giving the node that key or build recovers the document whole, while a replacement would discard every credential and field in it.
Fields a newer build wrote survive every write
Section titled “Fields a newer build wrote survive every write”During a rolling upgrade an older node holds, byte for byte, documents a newer node wrote, including settings the older build has no field for. GET /config there cannot show them, so a document read there and sent back never names them. Every write keeps them anyway: PUT, PATCH, a per-entity PUT, a reload and a revert store a document built from the stored bytes and carry back each key the writing build cannot represent that the write does not name.
- Only keys the writing build cannot decode are carried. A key it knows and the write left out was removed on purpose and stays removed. A caller of the older build cannot name an unknown key (the strict reader refuses it), so no write through it can mean to remove one.
- A list member is matched by identity, not position: a seat by its handle and a unit by its key anywhere in the document, so a seat moved to another unit keeps its settings; an MCP server or a sandbox setup step by its name within its own list. An identity held twice in the stored document, or empty, matches nothing. A member of a list with no identity keeps nothing the write replaced.
- A
PATCHreplaces only what it names. Everything else is stored as it was, so a list the patch leaves alone keeps every member’s settings, and a member with no identity loses a newer build’s settings only when the patch replaces its list. - A reload and a revert store the document exactly as stored, since neither changes it.
- A renamed MCP server or setup step is a new identity, so it keeps none of the old one’s unknown settings.
/artifacts/{id}/data/*: an artifact’s datastore (auth-gated)
Section titled “/artifacts/{id}/data/*: an artifact’s datastore (auth-gated)”An artifact page published with the db capability keeps its rows in the artifact’s datastore: named collections of JSON documents, each declaring its columns (checkbox, chip, select, person, status, text, long text, number, date) and its rules (who reads its rows, who writes them, which fields only a person may set, which are written once). Every route is decided per artifact: the caller’s role on it, through the owner’s standing or a share, is read from the artifact’s head on every request and stamped into the write, and the applier decides from that stamp and the store’s rows alone, so every data node reaches the same verdict. An artifact the caller has no relation to is 404 not_found, as one that does not exist.
| Method | Path | What it does |
|---|---|---|
GET | /artifacts/{id}/data/{collection} | One page of a collection’s documents (limit, 100 by default, at most 500; the cursor a page answered as after), each with its fields, who created and last changed it, and its version. since= a version answers only what changed after it, deletions included: the catch-up after a reconnect. Each page answers through, the since of the next catch-up, which a client adopts only once the read’s last page (no after) is in: a whole read’s pages answer the version its first page was read at, so a document changed under an already-read page is caught up, not skipped. A catch-up from before a read rule changed, a collection was dropped with its deletions, or a row changed hands in an own_rows or private collection answers resync (read whole). The query artifact_data |
GET | /artifacts/{id}/data/{collection}/{doc} | One document. The query artifact_data_doc |
GET | /artifacts/{id}/data/{collection}/query | q= a query as JSON: up to 16 filters (eq, ne, lt, le, gt, ge, in, contains, prefix) on declared columns, ANDed, an order_by and a limit, compiled to the field index. Every top-level field is indexed, and a nested path (a.b) once the collection lists it in indexed; a filter or order on any other path is 400 bad_params, naming it. The query artifact_data_query |
GET | /artifacts/{id}/data/history | The store’s last seven days of writes, newest first, narrowed by collection, doc, field (one cell’s history) or actor: who wrote, through which surface, the verdict, each changed field’s value before and after (over 4 KiB as its hash) and whether it can still be undone. In an own_rows or private collection each change is shown by the row’s creator when it was made, never its creator now. The query artifact_data_history |
GET | /artifacts/{id}/data/schema | The store’s collections, its footprint against its quota, its state digest and the caller’s role. A collection only editors may read is left out below editor. The query artifact_data_schema |
GET | /artifacts/{id}/data/state | The caller’s own per-viewer state keys on this artifact, nobody else’s. The query artifact_data_state |
GET | /artifacts/data/usage | The company’s datastore footprint against artifacts.limits.data_bytes (needs admin). The query artifact_data_usage |
POST | /artifacts/{id}/data/writes | One atomic batch: {"ops": [...]}, 1 to 100 ops of set, merge, delete, increment, append, add and remove, at most 1 MiB, applied all or none. An op with if_version is a conflict when its document moved since; one without is a blind write, and where two blind writes meet, each field keeps the value the log ordered last |
POST | /artifacts/{id}/data/undo | {"seq": N}: reverts one write of the last seven days, as a write of the caller’s own under the same rules, conditioned on every document it changed being where it left them, else 409 stale_version naming it. 409 not_undoable (the detail says which) for a write older than the history, one that was refused, a schema change, one holding a value the history kept only as its hash, and one whose undo would restore more than one write carries (a bulk delete of large rows, inverse over 1 MiB). The history’s undoable is false for each, so a client never offers an undo that cannot land |
POST | /artifacts/{id}/data/state | {"key", "value"} or {"key", "delete": true}: sets or removes one of the caller’s own per-viewer state keys, the backing of the page runtime’s state API |
PUT | /artifacts/{id}/data/schema | {"collections": [...]}, every collection the store keeps after the change (editor and above). Decided against every write before it; a change that would rewrite more documents than one record carries is 422 migration_too_large |
GET | /artifacts/{id}/data/export.csv | collection= one collection as CSV, streamed a page at a time (editor and above), under the collection’s read rule, written for a person: each column headed by its label (its key if none), choices as labels, a person as the seat’s name, attribution under ID, Created by, Created at, Updated by, Updated at and Version, and any cell a spreadsheet would run as a formula written as text. A trashed artifact is 409 artifact_trashed, a purged one’s store 410 data_gone |
Every read is a read of the artifact’s content: a trashed artifact answers none (409 artifact_trashed on routes and questions alike, to a reader it is disclosed to), and an administrator only the admin path admits is recorded as reading it before a row is sent, or answered 503 with nothing when that record cannot be written. Every write route takes an Idempotency-Key, refuses a field it does not declare, and refuses a write to a trashed artifact (409 artifact_trashed; 410 data_gone is a purge’s) until it is restored. A write from a browser session states its surface as via: dashboard, or bridge with the version of the page whose script made it, which must declare db (or state, for a state key) or the write is 403. A bearer credential’s write is stamped as the API’s whatever it says.
A write answers its verdict, read back from the node’s own rows once it has applied the record. verdict is the one field that says how the write ended, beside op_id, position and, once decided, the seq an undo names; a refusal carries it next to its error:
| Status | error | When |
|---|---|---|
200 | verdict: "applied", with the write’s seq, which an undo names | |
202 | verdict: "pending": the record landed and this node has not applied it yet, so its verdict is on the position answered | |
409 | stale_version | An if_version that no longer matches; conflict names the documents |
422 | invalid | A value outside its column’s type, a field the collection does not declare, a long text written whole without its guard |
403 | forbidden | The caller’s role, or the column’s rule, does not let them write it |
409 | quota_exceeded | The write would take what is kept past a limit: the store’s or the company’s footprint (a Tier A setting an operator raises), a collection’s rows or one participant’s rows (caps its schema sets), or the collections and documents one store holds. detail is the applier’s reason, naming the limit. A write that shrinks the store is never refused for it |
410 | data_gone | The store was purged |
429 | write_budget | This node’s write budget for the caller on this store, or for the store, is spent. Weighed by the rows a batch’s apply writes (each named document’s whole field index, not just the fields named), in units of sixteen rows: 20 units a second with a burst of 100 per caller and store; 40 a second with a burst of 100 per store. Retry-After, scope and retry_after_ms say when it holds the cost again. Per node, never a lockout |
Every refused write is still on the log and in the store’s history with its reason, applied identically on every data node, so GET .../history answers what was refused as well as what landed.
Setting an integration up
Section titled “Setting an integration up”Connecting an integration puts a credential into the fleet’s sealed secret store and everything else into the company document. /setup does both in the one safe order, so the dashboard never sequences it and never holds a credential across two requests.
Every route takes a grant, reads included, on the same terms as /config and /secrets: it answers with the names of the credentials a company holds, which are unset, and the pages at each third-party app an administrator would visit, a map of what to attack. Reading and connecting both take admin — see what each route takes.
On a managed document (Tier A api.auth.company_writers), a submission that would write a pointer into the document, a disconnect, and the begin of an agent’s GitHub App answer a credential the list does not name 403 config_managed — the same refusal /config answers — before a value is sealed, a teardown is queued or GitHub is asked for anything. A submission that only rotates a value the document already points at is not a change to it and is served, ending in a reload; so are the provisioning pass and its read-only check. A provisioning pass any operator starts may still record what it discovered into the document (where integrations.jira or integrations.confluence has no cloud_id, the Atlassian pass records the site’s cloud_id and site_url), and that revision is written as the node (reconcile loop), not the credential that started the pass. A GitHub App creation carries the operator who began it in its signed state, so the callback records the app (its revision and sealed key) as that credential, and asks again before it exchanges GitHub’s one-time code.
The requirement list
Section titled “The requirement list”GET /setup/integrations/{kind} answers what that third-party app needs, whether or not the company has configured it:
{ "key": "datadog", "configured": false, "enabled": false, "satisfied": false, "agents_waiting": [], "inbound_path": "/webhooks/datadog", "public_url": "https://engine.example.com/webhooks/datadog", "summary": "Crewlet registers a webhook so alerts reach your agents, and gives each agent its own Datadog account.", "prepare": [ {"text": [{"text": "Sign in to Datadog as someone who can manage users and roles."}]}, {"text": [ {"text": "Create a key on your "}, {"text": "API keys page", "url": "https://app.datadoghq.com/organization-settings/api-keys"}, {"text": " and one on your "}, {"text": "application keys page", "url": "https://app.datadoghq.com/organization-settings/application-keys"}, {"text": "."} ], "yields": "app_key"}, {"text": [{"text": "Paste both here and test them."}]} ], "requirements": [ { "field": "api_key", "label": "API key", "kind": "secret", "config_path": "integrations.datadog.provisioning.api_key", "secret_name": "DATADOG_API_KEY", "required": true, "connect": true, "hint": [ {"text": "Create one on your "}, {"text": "API keys page", "url": "https://app.datadoghq.com/organization-settings/api-keys"}, {"text": "."} ], "check_note": "It is tested together with the application key.", "present": false, "resolved": null } ]}The connection and its agents are answered apart. satisfied is the connection itself needing nothing more: no requirement of the company’s is outstanding. It is not a health claim, and it never reads an agent: one agent without its own app or token leaves it true. agents_waiting lists, by handle, the agents with a step of their own left before they can act: on Slack and GitHub (seats_required), an agent turned on that cannot act; on any app, an agent a reconcile finding names for a person. An agent nobody turned on is the company’s choice, and one whose state the loop’s record leaves unread is nobody’s step, so neither is listed.
The words a form draws each have their own job, so a form lays them out rather than running them together under one input:
| Field | What it is |
|---|---|
summary | One sentence on what connecting the tool does, which the form opens with |
prepare | The steps to take at the third-party app, in order: id (the step’s name in its guide, kept when steps are added or moved), text (imperative, one sentence, as vendor text), grants (the permissions, roles or scopes to grant, in the app’s own words), yields (the field the step produces a value for), asks (the form’s fields the step is answered with), optional (the setup works without it), per_agent (taken once for each agent, on its own row or block) and done (the company is past it: the field it yields holds a value that resolves, the integration it connects first is connected, or a later step is done; the first step not done is the one the company is on) |
caution | {"title", "body"}: the one risk the tool’s credential carries, absent where none is worth a warning |
hint | A requirement’s one line, under fifteen words, as vendor text: what the value is and where it is found |
more | What a person may want once about the field, behind a disclosure, as vendor text: where else it is shown, what a check covers |
summary, prepare and caution are a tool’s, carried by one surface of it: Atlassian’s organization speaks for Jira and Confluence, whose own answers carry none. A {field} in hint or more, in its words or a part’s url, reads what that field of the form holds, falling back to its default; a link is no link until each has a value.
Vendor text
Section titled “Vendor text”Words a person follows at a vendor (a step, a field’s hint and more, a set’s hint, an identity’s where, and an identity sheet’s steps, note and hand-in (ADR-0179)) are a list of parts, never a string with markup. Each part is {"text"} (plain words; a value to type is in backticks), or {"ui": [...]} (a name on the vendor’s screen as it prints it, a button, field, role or page; several are a menu path, outermost first), either with url: the vendor page it links. A page is linked on the first words that name it, so no separate button repeats it.
kind is one of secret, url, id, choice, text, handle, toggle. Each third-party app’s own package declares its list, so the surface serves an app it has no screen for and the dashboard renders one it has no code for. A toggle is a JSON boolean in the document; a handle must name a seat this company has.
A secret’s credential is never echoed. Its value carries the field’s ${VAR} reference when the document holds one: that is a name (which sealed-store entry the field reads), already visible through GET /config to anybody this surface answers, and without it a client could not tell “this reads SHARED_TOKEN” from “type here to replace what is behind this field”. A document holding a literal there sends no value, and a composite such as https://${HOST}/hook counts as a literal: it names a variable beside an address, so it references nothing.
present and resolved are secret_present and secret_usable asked per field: written down, and usable in this process. resolved is null for a field the document leaves empty. blocks names the reconcile finding that this input being absent produces, so a row reporting credential_missing can offer exactly the fields that clear it.
mintable means the engine can generate the value, so nobody is asked to invent it. No route here ever returns a credential. Most minted values are a random token; a field that signs takes an ES256 key, an ECDSA P-256 private key in PKCS#8 PEM, sealed whole and never shown. Where a person must hand the vendor something made from a minted value, the field carries public: {"text": ..., "language": "sh"}, text rendered from the public half alone (a key set, or a command block holding it), drawn as code to copy, with drawn_from: the fields whose saved answers the text is drawn from, so a form puts the block away while one of them holds an unsaved change. A live view is instead redrawn from what the form holds through POST /setup/integrations/{kind}/draw, so it never waits on a save; a mint_first value is generated when the form opens (an inputs call carrying only generate), so its block shows before anything is typed. A requirement whose public view would hold the value itself or any private key is never sent.
printed_by names the field whose public block, run at the vendor, prints this value (Google Cloud’s provider, AWS’s connection). Such a field is required, so the integration stays unfinished until it is pasted, and it never holds a save of the answers before it: the block is drawn from what is saved, so the Save that mints its key, or changes an answer it is drawn from, leaves the printed field as it is.
multiline marks a value that spans lines, a PEM private key, which a form draws in a box that keeps line breaks; accept names the file types it comes in (.pem,.key), for a file picker. A PEM key whose line breaks a one-line box dropped, or turned into spaces, is taken: its line breaks are written back before it is judged and sealed, and anything that is not one key of the field’s kind is still refused.
checkable means the value, a credential or a connection a block printed, can be checked at its vendor before it is stored, so a form offers a Test control: Test connection under a field that is not a secret, Test key or Test keys under one. A secret that cannot be checked ahead carries check_note instead: when the vendor proves it, which a form says after more. A webhook signing secret is the usual case: the vendor never presents it, only signs deliveries with it.
check_with, on a checkable field only, names the other fields of the same list that one check is made with, for a vendor that accepts or refuses several values together. A form offers one Test control after that field, enabled once it and every named field holds a value (a minted key once it is held), and sends them in one request. A credential named there is not checkable on its own, and its check_note says where it is tested. Datadog’s app_key carries "check_with": ["site", "api_key"], Google Cloud’s provider ["provisioner", "federation_key"]. Absent, a field is checked on its own.
Supplying them
Section titled “Supplying them”curl -X POST https://engine.example.com/setup/integrations/datadog/inputs \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{ "if_match": "<revision_id>", "values": {"enabled": "true", "route_to": "sre-lead"}, "generate": ["webhook_token"] }'generate is separate from values on purpose, so a client can’t send a weak token by accident; a field is one or the other, never both.
Any field the engine reads through the resolver may hold a ${VAR}, not only credentials: the Atlassian organization id, a site address, a cloud id and an account email all are, so a company can keep them in the sealed store and name them here. present and resolved then report separately, and a reference naming a missing entry reports resolved: false.
A field holding a reference also carries resolved_value: what that ${VAR} currently reads as. Links this surface describes are built from values (the Atlassian API keys page is per-organization, so an organization id kept in the store would otherwise put the literal ${ATLASSIAN_ORG_ID} in the path). Never present on a secret, on a literal, or on a reference naming nothing.
A secret field’s value may be a ${VAR} instead of a credential. The route writes that reference into the config path and seals nothing, so one stored credential can serve several fields and rotating it is one write. It needs no secret store in the answering process, because naming an entry is not writing one. Anything else in that position, a composite included, is a credential and is sealed under the field’s own name.
What the route does, in this order:
- Refuses a stale base.
if_matchnames the revision the requirement list was read against: the fleet’s, whichGET /setup/integrationsanswers asrevision_idon every node. An older one is refused before anything is sealed, so a stale page leaves no credential in the store that nothing points at. Withoutif_match, the submission is built on the revision this request read the fields from, in the same read: what each field holds (empty, a${VAR}, a literal) decides the write, so it lands on that revision or is refused409 revision_advanced. - Seals every credential, under the name the third-party app declared or one derived as
VENDOR_FIELD[_HANDLE]. The row recordssource: "setup". - Patches the document with the non-secret values and, for a credential whose slot was empty, a whole
${VAR}pointing at the name from step 2. A slot already holding a${VAR}is written through, so rotating a credential changes the store, not the company. A slot holding a literal is409 literal_in_config, naming the path: overwriting it would edit the company from a setup form and destroy a credential somebody put there on purpose. - Activates, through the same merge, validation and compare-and-set
PATCH /configperforms. When the pointer needed no change (a rotation) it reloads instead, because a value written to the store after the last apply is invisible to every running seat until something activates; the answer says"reloaded": true. The reload is held to the base of step 1 up to its own compare-and-set: a write landing between the read and the reload (one that put a literal in the slot, or the company from before the integration was connected) is409 revision_advanced.
Answers 201 {"revision_id", "epoch", "wrote_secrets", "reloaded", "state"}, plus forge_held on a Jira or Confluence write that leaves the Forge relay refusing that product’s events (a forge_app_id is set and the block names no cloud_id): the sentence naming the field to set. Refusals: 400 invalid_input, 400 validation_error, 404 unknown_kind, 409 revision_advanced (the body’s if_match is stale), 409 literal_in_config, 409 no_active_revision; 409 under one of the five codes for a revision this node cannot open, naming what the submission sealed before it as wrote_secrets; 503 unavailable with a Retry-After when the coordination store cannot be read, or did not answer a credential’s own write in step 2 (the body then names that credential as unanswered_secret, since its write may have landed), with a detail in a person’s words for any other node condition (a store too busy to take the revision, one closed for a snapshot, a request out of time) and a Retry-After exactly where waiting clears it, and with "outcome": "unknown", stored_revision_id and node when the document was stored and its activation went unanswered, as on the config surface. A 409 revision_advanced from a write that lost at its activation names the revision it kept, inert, as stored_revision_id, beside the node whose history alone holds it.
A refusal after the first credential is sealed names what it sealed as wrote_secrets (a lost race, an unanswered activation, an unreadable pointer, a later credential’s failed write, a rotation’s reload): the credentials are in the store whatever became of the document, nothing may point at them yet, and a resend overwrites them by name. So a 503 without outcome is sent again as it stands, whatever wrote_secrets and unanswered_secret it names: the document was not changed, and the resend writes every credential again, the unanswered one included. Only the 503 with "outcome": "unknown" is not, because its document may already be the company.
Checking a credential before it is stored
Section titled “Checking a credential before it is stored”POST /setup/integrations/{kind}/verify asks the vendor whether a typed value works, a credential or a connection a block printed, through the integration’s own probe with read-only calls, and stores nothing: not the value, not a ${VAR} pointer, not a revision, not a reconcile finding. It is what a connect form’s Test button calls, so a key is checked while the vendor’s page is still open rather than by the next reconcile pass. It is setup.connect, the verb connecting is, because it spends a credential at a vendor on a person’s hand.
curl -X POST https://engine.example.com/setup/integrations/datadog/verify \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{"field": "app_key", "value": "<the typed key>", "values": {"site": "datadoghq.eu", "api_key": "${DATADOG_API_KEY}"}}'| Field | Meaning |
|---|---|
field | The requirement to check, by its field. It must be checkable, or carry a check_note |
value | What was typed, or a whole ${NAME} naming a stored secret |
seat | The seat a per-seat credential belongs to, such as a Slack agent’s bot token |
values | The other fields typed in the same form, by field. Each may be a whole ${NAME} too |
Every field the person did not type is read as a submission would read it: what the company document holds for it (a whole ${VAR} resolved through this node’s chain), else the field’s default. So a key changed on a working integration is checked against the region, instance and other key already in force. Jira and Confluence are checked under the company’s declared integrations.atlassian.deployment, and at the site the Atlassian organization names when neither the form nor the document gives one.
Answers 200 {"outcome", "summary", "facts", "warnings"}, the shape every credential check answers in. None of it repeats the checked value.
| Field | Meaning |
|---|---|
summary | The answer in one sentence: that it works, or what failed |
facts | What the check read, each a label and a value: who the credential is, what it reaches, when it expires, what the vendor said. Absent where none |
warnings | What to act on, each a title (the risk) and an action (what to do). A failed check may omit title when summary already says what is wrong; action is always there. Absent where none |
outcome | Meaning |
|---|---|
works | The vendor accepted it, and facts say who or what it authenticates as where the vendor says: “Works. Both keys are valid.”, with the facts Organization Acme, Site datadoghq.eu and They can read Users, roles and webhooks. warnings carries any risk the credential holds, such as an expiry inside the warning window |
refused | The vendor answered and refused it: a 401 or 403, Slack’s invalid_auth, or a credential that authenticates without what the integration needs (a Mattermost account that is not a system administrator, a GitLab token without its scope, an Atlassian key created with scopes, a Slack user token where a bot token belongs). The vendor’s own reason is a fact, labelled <vendor> said, where short, and warnings says what to do where the engine knows |
unreachable | The vendor gave no answer about the credential: no connection, ten seconds without an answer, a 429 or 5xx, or an answer that is not the vendor’s API (often a wrong address). The last fact is Stored Nothing |
unchecked | The field cannot be checked ahead without acting on it, and summary is its check_note |
What each surface checks, and with what:
| Surface | Checkable | Read-only call | Proved later, by the vendor’s first delivery |
|---|---|---|---|
atlassian | api_key, against org_id | one page of the organization’s service accounts, which a scoped key is refused | |
aws | connection, with slug, home_region, the held certificate_authority and atlas_read | in parts, a refusal listing each part Passed up to the one Failed: Sign-in (IAM Roles Anywhere as the provisioner), Stack read, Stack version, Identity split, Policies and roles | |
confluence | token, with email on Cloud | GET /rest/api/user/current | webhook_token (Cloud), webhook_secret (Data Center) |
datadog | app_key, checked with api_key in site (check_with); api_key alone answers its check_note | in stages, stopping at the first refusal so the summary names the key or permission that failed: GET /api/v1/validate (the API key alone), GET /api/v1/org (both keys), then one row of /api/v2/users and /api/v2/roles and a read of the configured webhook (absent is fine). See Testing the keys | webhook_token |
github | token, at url for Enterprise Server | GET /user | webhook_secret |
gitlab | admin_token (needs api) and token (needs read_api), at url | GET /user, then the token’s own scopes and expiry where the instance describes them | signing_secret |
google_cloud | provider, with provisioner and the held federation_key | in parts, a refusal listing each part Passed up to the one Failed: Federation, Acting as the provisioner, the identity project’s APIs, the provisioner’s grants, the identity project’s accounts, prepared projects | |
jira | token, with email on Cloud | GET /myself | webhook_secret |
mattermost | admin_token, at url | GET /users/me, and the system_admin role | |
slack | a seat’s bot_token | auth.test | a seat’s signing_secret |
Refusals: 400 invalid_body for an unknown key; 400 invalid_input when field is not a requirement of that surface (or seat) or is neither checkable nor carries a check_note (one another field is checked with names that field), when value is empty, when a key in values is not a field of the surface, when a ${NAME} names no stored secret (“There is no secret NAME.”), when a typed value is one its field refuses as a save would (whitespace or an invisible character inside a credential, a space inside an address or identifier, a character outside the vendor’s alphabet where the field declares one), with field and path and before any vendor is asked, and when the check cannot be made from what was given (Datadog’s other key, a site address, an organization id), each with a sentence saying what is missing; 404 unknown_kind; 404 invalid_input for a seat that takes no per-seat setup; 409 no_active_revision; 409 under one of the five codes for a revision this node cannot open.
Running the provisioning pass
Section titled “Running the provisioning pass”Some third-party apps need something done at them, not just written down: a webhook registered, a signing secret minted and pushed. That is the app’s provisioning pass, and POST /setup/integrations/{kind}/provision runs it.
The reconcile loop does this on its own. It runs the same provisioning function every few minutes with the sink and public base supplied, because connecting an integration is the permission: a person named that app and handed over an administrator credential for exactly this. This route is the same work on demand, for an operator who wants a pass now rather than at the next tick; it holds a fleet lease under its own name so the two never overlap. Nothing in the dashboard calls it.
can_provision on a tool’s state says whether this build has a pass for it. needs_operator is present only for an app whose pass still asks for a credential per run; none in this build does. GitLab’s group Owner token and Mattermost’s system-admin token are ordinary stored requirements, sealed in the fleet secret store with a ${VAR} in the document like every other credential. They are held because the disconnect needs the authority that created a service account, and without it every account the engine created would outlive its integration; a disconnect names them in orphaned_secrets, so an operator knows exactly what to revoke.
Disconnecting
Section titled “Disconnecting”DELETE /setup/integrations/{kind} asks; it does not remove. It answers
202 and records the intent on the fleet row; the reconcile loop removes what
the integration holds at the third-party app (the webhooks it registered, and
the accounts it created when asked) before the block leaves the company
document. The block carries the credential the teardown authenticates with, so
dropping it first would strand every webhook and account. Until the teardown
succeeds the surface reports phase disconnecting, labelled Disconnecting;
a failure holds it there and retries.
The block and the agents on through it leave in one revision. The company
document refuses an agent turned on at an integration the company has not
connected (Mattermost, Jira, Confluence, SSH), so the revision that removes the
block also turns off every seat that was on there: enabled becomes false
and the rest of the seat’s block (roles, channels, projects, servers) is kept,
so connecting again and turning the agent on restores it. A seat already off,
or with no block, is left as it is. A forced disconnect answers the handles it
turned off as seats_off.
A failed teardown pass is recorded on the surface’s reconcile row with
teardown_held_by: vendor where the third-party app’s half failed, and
settings where that half finished and the company’s settings refused the
revision that removes the block (some other rule the removal breaks, which
last_error names by path). Forcing writes the same revision, so a disconnect
the settings hold is moved by changing the setting, then disconnecting again.
{ "remove_seats": false, "force": false }remove_seats is the console’s “also remove the accounts Crewlet created”.
It defaults to false and is never inferred: the engine’s own webhooks come
out either way, but an account is a colleague at that third-party app with
history attached. Mattermost bots are disabled rather than deleted,
because deleting a Mattermost user takes its posts with it.
force drops the block immediately without waiting for the third-party app,
answers 200, and is the way out of a teardown that can never succeed (a
revoked credential, an instance that is gone). The operator is saying they
will remove what the third-party app holds themselves. A forced disconnect may
carry If-Match naming the revision it was decided on; one the configuration
has moved past is 412 revision_advanced, with nothing dropped. That is the
status /config answers the same header with; a connect, whose base is the
body’s if_match, loses as 409.
Either way the removal is recorded as yours. The intent carries who asked
(the author, their kind and the credential they asked through) and the loop
carries the teardown out for them: the revision that drops the block, each
Slack seat’s cleared app credentials and the sealed values the teardown
deletes are recorded under that party, exactly as on the force path, not under the loop’s own reconcile loop of kind system.
Either way the sealed credentials are named, not deleted, in
orphaned_secrets: one an operator may share with another deployment is not
for a disconnect to decide. crewlet secrets unset is the deliberate path.
The list is computed once, before the request splits, because every name is
derived from a ${VAR} in the company document, which both paths end by
removing. It covers each seat’s own credential too (the token a pass minted
under the name the seat’s mcp_env points at, Atlassian’s address slot beside
it, Slack’s per-seat bot token and signing secret). The dashboard shows the
list rather than closing.
A credential a sibling surface still reads is not on the list. Jira and
Confluence normally share one seat credential (one Atlassian API token per
account, usually in the shared mcp_env.atlassian block), so disconnecting
one product alone does not name a token the other still resolves. A sibling
counts as a user unless it is itself disconnecting: the dashboard takes a
card’s surfaces in order, each request records its intent before the next,
and the union the dialog shows names the shared credential exactly once.
GitHub’s per-seat App credentials are on the list too. Nobody typed
them in: the engine converts a manifest and writes what GitHub returns, so
an agent’s private_key and its App’s webhook secret exist without an
operator choosing either name. They survive a disconnect by design: GitHub
has no API for deleting an App registration, so the engine uninstalls the
App and hands over a link to the page a person deletes it from. This list is
the only place either value is mentioned.
Refusals: 503 surface_busy when a reconcile tick or an operator’s own pass is
writing at this surface right now. It is the one refusal here that clears on
its own, so it carries its own code: a caller that cannot tell a race from a
fault treats both as terminal (never internal_error). The request first waits a busy surface out for
a few seconds, then names it; repeating the request is correct, because every
step of a disconnect is idempotent. A busy surface is waited out rather than
skipped because the order matters: the organization’s credential is what
removes the accounts. The Retry-After it carries (three seconds) is the
whole of how long the dashboard waits between attempts, for at most 45 seconds
in all; a surface_busy with no Retry-After is not waited out.
Refusals worth knowing: 409 requirements_outstanding names the fields still
missing (a pass writes at the third-party app and must not run against a
half-configured integration), 409 no_external_url when nothing has told
the engine what address third-party apps reach it on, and 409 pass_in_flight
when another pass for the same third-party app is already running. That last
one is a refusal rather than a queue on purpose: a retry should not paper over
minting twice.
POST /setup/integrations/{kind}/check runs the same pass with no sink,
which makes it read-only: every vendor gates its registration and minting on
having somewhere to seal a credential, so a run without one reads and reports
and writes nothing at the third-party app. It answers “did what I just fixed
at the third-party app take”.
A check does get the webhook address — api.public.external_url behind a
public listener, api.external_url otherwise, and the 409 no_external_url refusal above is the writing route’s alone; its config_path
names whichever of the two keys this node reads. Withholding the
address would make the check report ingress_blocked owed by an admin and, as
a check records findings through the same fold as everything else, flip the
card to Action required over a value that was already set. Supplying the
base is not the permission to register; having a sink is.
Both record their outcome on the same fleet integration status the reconcile
loop writes, through the same fold, so a pass run by hand and a later tick
cannot disagree, and Company › Integrations updates with no extra plumbing. A
pass that failed is recorded too, as the loop records one: phase
activating, actor engine, findings dropped, because a failed pass observed
nothing.
recreate_webhooks re-registers with a fresh secret and is destructive
across deployments: the previous secret stops working everywhere else this
company runs. On GitLab it also rotates every seat’s token, which revokes the
credential each agent is currently authenticating with. A fresh secret is
minted into the whole ${VAR} the secret’s field names, so on GitHub, Jira
and Confluence a field holding a literal, or a reference inside other text,
has nowhere to put one; the pass is refused naming the field, its shape (never
its value) and recreate_webhooks itself. Point the field at a whole ${VAR}
and send it again, or leave recreate_webhooks out to register the value the
field holds as it is. GitLab leaves a literal signing secret alone and
rotates the seats’ tokens all the same.
No pass on this surface deletes anything. Decommissioning a service account whose seat left the configuration stays a command-line gesture, because a company mid-edit looks exactly like one that removed a seat.
Per-seat setup
Section titled “Per-seat setup”Two third-party apps put an agent’s identity on the seat rather than the
company, because on both one app is one bot: Slack, whose credentials an
operator pastes in, and GitHub, whose app the engine creates. Both carry a
seats array in their tool state, one entry per agent seat. Every agent seat
is listed, configured or not, because a screen renders its form from the list;
human seats are excluded, as the engine holds no token for a person’s Slack
account.
Slack’s entries are a form: each agent has its own Slack app, so each has its
own bot token and signing secret, and every entry carries its own requirement
list, its own inbound_path and its own satisfied. A submission names the
seat:
{"seat": "sre-lead", "values": {"bot_token": "...", "signing_secret": "..."}}These write through the entity route, not a merge patch, because a merge
patch replaces an array wholesale and would delete every other seat. The
engine addresses the seat by its handle (its identity, not its position) and
everything the submission did not send stays as stored. The revision is
written as the caller, attributed like every
other write here: a person connecting their seat through their own machine
token is its author, of their own kind, with pat:<id> beside them.
Without an app configuration token it does not create the apps. Creation
goes through Slack’s app-manifest API, which authenticates with a
configuration token Slack issues only by hand and an organisation may decline
to allow. With one (the app_config_token field), the reconcile loop creates
and keeps every agent’s app. Without one, this surface makes a hand-created
app usable: it takes the two values Slack shows on the app’s own page and
seals them.
GitHub: the app the engine writes
Section titled “GitHub: the app the engine writes”A GitHub seat’s entry carries no requirement list, deliberately: nothing here is typed in. The app is created from a manifest, and GitHub returns its id, slug and private key once, to the engine, which seals the key and records the rest on the seat. The entry answers what is still outstanding for that agent:
{ "handle": "builder", "name": "Builder", "requirements": [], "step": "install_app", "action_url": "https://github.com/apps/acme-builder/installations/new", "present": true, "satisfied": false, "detail": "the app exists and nothing has installed it, so it sees no repository and mints no usable token"}step and action_url are the two clicks, described under
One agent’s own GitHub App. What the seat may do
at GitHub is its own permissions, read and changed through
GET /setup/integrations/{kind}/access (with github as the kind) and PUT
on the same path, not part of this roster.
present is whether the seat has an app at all; satisfied needs that
app installed and its sealed key readable by this node. A ${VAR} naming a
secret the store does not hold reads as configured everywhere else while the
agent mints no token, so detail names the variable to set (the reference,
never a key).
An unfinished roster does not make the connection unfinished: the company
block decides whether deliveries arrive. An agent turned on (enabled: true on
its seat’s github block) without a working app is in agents_waiting; one that
is off is not, since a company running apps for three of its ten agents chose that.
A seat is never satisfied on an integration the company does not
declare. Its detail says the seat is waiting for the integration to be
connected.
Nor is it satisfied when the reconcile loop has a finding about it. The
document and sealed store only establish that a credential exists where the app
looks for one; a key deleted at the third-party app leaves the pointer
resolving while every call is refused. The loop is the only thing that has
asked the vendor, so a seat named by a finding on that surface’s status row
comes back unsatisfied, with the loop’s own sentence as its detail. Advisory
findings are skipped (a permission wider than the role asked for is a note on a
working agent).
One window stays open: between a credential being destroyed at the vendor and
the loop next looking, nothing knows. That window is
integrations.check_interval_seconds (600 by default, floor 60), and
POST /setup/integrations/{kind}/check asks immediately.
One agent’s own GitHub App
Section titled “One agent’s own GitHub App”GitHub is the other per-seat case, and not a form. A GitHub App is created by POSTing a manifest from a page carrying the operator’s own GitHub session, so this surface hands the dashboard what to submit, and the two clicks that follow are a person’s. There is no server-to-server equivalent, so a reconcile pass cannot do this alone.
POST /setup/integrations/github/app begins it, naming the seat:
curl -X POST https://engine.example.com/setup/integrations/github/app \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{"seat": "senior-engineer"}'{ "seat": "senior-engineer", "permissions": {"contents": "read", "issues": "write", "pull_requests": "write"}, "action_url": "https://github.com/organizations/acme/settings/apps/new", "manifest": {"name": "Acme Senior Engineer", "public": false, "...": "..."}, "state": "<sealed token naming the seat and who began the creation>", "webhook_active": true}The browser POSTs the manifest as a form field to action_url, carrying
state on that URL so the redirect ties back to the seat and to whoever
started it, because the callback’s writes are theirs. The state is sealed
under the fleet keyring, not signed: it travels through GitHub, browser history
and ingress logs, where who began a creation is nobody’s business. It is
URL-safe as it stands, and any node opens it, including one that has already
made the next keyring key active. action_url is the organization’s own app
registration page whenever integrations.github.provisioning.org names one,
because an app registered under a person’s account cannot be installed on the
organization that owns the repositories.
webhook_active says whether the app will deliver events here. It is false
when the webhook address is one GitHub cannot reach (a local engine’s
http://localhost:8200): the manifest then carries no hook_attributes and no
default_events, the only form GitHub accepts from such an address. The app
still works for everything the agent does on GitHub, which is outbound; see
Running locally, with no public
address.
Refusals: 400 invalid_body, 400 seat_required, 409 no_active_revision,
404 no_such_seat, and 409 no_external_url when the webhook address is
unset (api.public.external_url behind a public listener, api.external_url
otherwise, named in config_path). The last matters because an app is
created with its redirect and setup addresses baked in, and only a person at
GitHub can change them afterwards. An address that is set but unreachable for
GitHub is not refused: the operator’s browser is all the redirect and setup
page need.
GET /webhooks/github-app is where GitHub returns the browser, twice. It
is unauthenticated because a redirect carries no engine credential; the state
stands in its place and is validated first.
- With a
code, the engine converts the manifest, seals the app’s private key and webhook secret first, then recordsapp_id,app_slugand a${VAR}pointing at the sealed key on the seat, through the entity route as per-seat setup does. All three writes are the beginner’s: the sealed rows and the revision name whoever began the creation, with the credential they began it through, neversetup.installation_idis written as0: the install is a second act. The page then links to the install. The seal comes first because GitHub returns those two values exactly once, so a failure after it costs a retry and a failure before it costs the app. - With
?installed=<handle>, it confirms the install and writes nothing. Installing is GitHub’s own act and returns no code, and an agent’s app is private, so it is installed from the organization’s own installations page, which sends back nostate; an unsigned query must never reach the company document. The reconcile loop adopts the installation on its next pass, having listed the app’s own installations, the reading that tells a real id from a typed one. - With
?error=, it says in its own words that the creation was cancelled (access_denied) or that GitHub didn’t create the app, and logs GitHub’serroranderror_descriptionasgithub_app_create_refused. The description is never printed: the route is unauthenticated, so it is whatever the address that brought the browser here says, on the dashboard’s own origin.
The page names a seat only where the value can be a seat’s handle: an install
arrival’s installed is whatever the caller typed.
A link is spent the first time it’s presented, so asking for the same address again (a refresh, or Back from GitHub’s install page) runs nothing. The page then says what the agent the link names has: its app, in which case there’s nothing left to do and the install button is still offered, or no app yet, in which case it says to give the app a minute to show before starting again.
The status is whose the stop was:
| Status | When |
|---|---|
200 | A completion, an install, or a link presented again whose agent has its app |
400 | GitHub refused or the person cancelled, GitHub sent no code, or the link or GitHub’s code is expired, forged or already used |
403 | The company’s settings are managed outside Crewlet |
404 | The agent the link names is no longer one of the company’s |
409 | No company is set up |
502 | GitHub didn’t finish converting the code |
500 | Crewlet couldn’t finish: it couldn’t check the link, read the company’s settings, save the app’s key or webhook secret, add the app to the agent, or confirm that it did |
None is a 503, because the same request can’t succeed later: the link is
spent before anything that can fail for a while, so sent again it runs nothing
and is answered as already used, by whether the agent it names has its app.
That settles an app whose record on the agent the coordination store took
without answering (the 500 that says to refresh: the change may have landed,
so the page reads the agent back once first and answers 200 when the app is
there); a new creation clears any other passing condition. Once GitHub has
handed the app over, the heading says the app was created but not finished, or,
on that unanswered record, that Crewlet is confirming it was added. The page
always uses the engine’s own wording, chosen by the step that stopped, never a
quote of an error or of GitHub’s response body, which carries the app’s
private key. Every answer carries Cache-Control: no-store.
The roster says what is outstanding. A seat entry in a tool’s seats array
carries two more fields where a per-seat app has clicks: step is what is
left, a closed set of create_app and install_app (two acts minutes or days
apart, so an operator who has done the first is told the second is left), and
action_url is where a person goes to do it. action_url is empty for
create_app, not by omission: an app is created by POSTing a manifest, not
following a link, so the dashboard asks the begin route above for one and
submits a form.
Each agent’s access to an integration
Section titled “Each agent’s access to an integration”Every integration that has an account or credential per agent (Slack, Mattermost, Atlassian for Jira and Confluence, GitHub, GitLab, Datadog, Cloudflare, Expo, DigitalOcean, Scaleway, AWS, Google Cloud and SSH) has an Agents tab; these routes are what it reads and writes. Each agent seat’s setting lives in the company document under roles[].integrations.<lane>, in the vendor’s own terms: whether the agent is on, its role or level as the identifier the vendor’s API takes, GitHub’s permissions, and the scope it is narrowed to.
- Level identifiers: a Datadog role id, a GitLab access level, a Jira project role id.
- Cloudflare:
read,operate,configureorsecure, each a fixed set of permission groups. - Expo:
viewer,runner,developerorrelease_manager, each a fixed set of Expo permissions. - DigitalOcean:
read,operateoradminister, each a fixed set of token scopes. - Scaleway:
read,operateoradminister, each a fixed set of permission sets. - AWS:
read,operateoradminister, each a set of Crewlet’s customer managed policies. - Google Cloud:
viewer,operatororadminister, each a fixed set of Google’s roles. - SSH:
readoroperate; operate needs a step-up. - Scope: Scaleway’s and Google Cloud’s are the project IDs the level is granted on, SSH’s the host ids the agent may reach; each names at least one while the agent is on.
A lane is the block’s key: atlassian has two, jira and confluence, over one account per agent; every other integration has one named after itself. Jira and Confluence asked for by their own names answer 404 no_seat_access.
The agent’s credential is never in the document or a request. The engine seals it under a name it derives for the seat (DATADOG_APP_KEY_SRE, GITLAB_TOKEN_SRE), binds it to the integration’s tool server itself, and answers the name and when it was minted, never the value.
GET /setup/integrations/{kind}/access answers the tab:
{ "kind": "datadog", "revision": "01J9...", "syncing": false, "last_sync_at": "2026-10-29T17:02:11Z", "options": [{"lane": "datadog", "live": true, "levels": [ {"id": "4f0e2b3c-...", "name": "Datadog Read Only Role"}, {"id": "7d1a9e44-...", "name": "Datadog Admin Role", "administers": true}]}], "seats": [{"handle": "sre", "name": "SRE", "lanes": {"datadog": { "desired": {"enabled": true, "level": "7d1a9e44-..."}, "observed": {"exists": true, "enabled": true, "level": "7d1a9e44-...", "credential": {"variable": "DATADOG_APP_KEY_SRE", "minted_at": "2026-10-29T17:02:10Z"}}, "observed_at": "2026-10-29T17:12:40Z", "sync": {"at": "2026-10-29T17:02:11Z", "outcome": "ok", "steps": []}, "status": "in_sync", "plan": [], "tool": "live", "administers": true}}}]}Each seat lane’s status is the lane as one word, computed by the engine so the tab and Ask Crewlet read a lane alike. It is the first of these that holds:
departed: the seat left the document.syncing: steps to take while a sync of the integration runs.refused: the last sync failed.changed_at_vendor: somebody changed the account at the vendor; the next sync restores it.needs_you: a step only a person takes, or a sync that ended waiting on one.next_sync: steps the next sync takes.in_sync,off_account_keptandoff.
status_label is it in the tab’s words (“Changed at Datadog”), which a reader that does not know the status draws instead.
A lane carries two clocks. observed_at is when a pass last read the vendor for it, every pass including the check’s dry run (POST /setup/integrations/{kind}/check). sync.at is when a writing sync last ended, which a dry run leaves alone: a refusal a dry run finds (a sealing step the sync would refuse) is reported on the integration and leaves the lane’s last sync as it was. The tab draws them as one value (“Checked 1 minute ago, last applied 10 minutes ago”); its header’s “Last check” is the integration’s own pass. On GitHub, observed.ceiling is the permissions the agent’s app is registered with, which every token is narrowed from: a permission there that desired leaves out or holds lower is one the agent does not use, never drift, and the tab says so under the row.
A level the company’s connection cannot grant yet carries unavailable, the sentence saying what it waits on (“The Configure level is unavailable until the provisioner token holds Zone Settings: Edit and Response Compression: Edit”); the tab offers it disabled with that reason.
Each seat lane’s tool says whether the agent can use its credential through a tool right now:
live.waiting: a server reads it and it is not sealed yet.builtin: Jira and Confluence, whose credential the engine’s own tools read, and SSH, whose tools are the engine’s ownssh_readandssh_operate.no_server: no server the company declares reads it.server_off: every server that reads it is turned off (enabled: false).off: the seat or its account is off.
A waiting tool also carries tool_reason, a sentence in the engine’s words, where it waits on the vendor applying a grant the last sync wrote (a new account not yet grantable, a grant not yet in effect): that sync ended ok, since nobody owes a step, and the tool reads as it otherwise would once the vendor’s stated wait ends.
A seat lane whose integration puts anything in the agent’s own box while it is on (Expo’s EAS CLI, DigitalOcean’s doctl, Scaleway’s scw, GitHub’s and GitLab’s token for git, AWS’s CLI, Google Cloud’s gcloud) also carries box, what Crewlet puts there, by reference as configured and never by value; it is absent for a seat that is off.
envlists first the credentials the lane’s tool (a CLI in the box) reads, each set to the seat’s own sealed name and marked"tool": true, then every other variable by name: a credential a CLI beside the tool reads (GitHub’sGITHUB_TOKEN) and the non-secret settings:{"env": [{"name": "EXPO_TOKEN", "value": "${EXPO_TOKEN_QA}", "tool": true}]}. Scaleway’s listsSCW_ACCESS_KEYandSCW_SECRET_KEYas its tool’s, thenSCW_DEFAULT_ORGANIZATION_ID,SCW_DEFAULT_PROJECT_IDandSCW_DISABLE_CHECK_VERSION, which a line of the seat’s own under the same name overrides; a line of the seat’s own under a credential’s name is ignored (An agent’s own integration credentials).fileslists the files the engine writes into the box itself, by path under the box’s home, each with its reference as configured and never its value, andrewrittenwhere the completion poll keeps it current:{"path": ".config/crewlet/token", "value": "${VENDOR_TOKEN_QA}", "rewritten": true}. It is absent where the engine writes none, andenvis a list, empty or not, whereverboxis sent.- A file a vendor’s CLI finds through a variable adds that variable to
env, its value the file’s path from the box’s home:{"name": "CLI_TOKEN_FILE", "value": "~/.config/crewlet/token"}. The launch sets it to the file’s absolute path in the agent’s box, joined onto that box’s own home, so it is right in every cell. - With no server, a lane whose tool is a CLI in the box reads
liveorwaitingwhile the seat is on, since Crewlet sets its credentials there itself.
Where a person makes the agent’s credential at the vendor and pastes it (Expo, DigitalOcean), the answer says exactly what to make there. Each seat lane carries hand_in, the name to give the credential at the vendor at the seat’s desired level, computed by the engine and never read back ({"name": "crewlet-sre-operate"}). The lane’s options entry carries vendor_account, the account, organization or team the company connected as the vendor shows it. Where the person grants the level’s permissions by hand (DigitalOcean’s token scopes), each level carries grants, every permission it holds in the vendor’s own names, and the entry carries refused, the permissions no level grants that a pasted credential must not hold, and unneeded, the ones no level grants that it may still hold: each permission the vendor offers is in exactly one.
revision is the company revision the answer was read at, and the ETag is the same value quoted.
Fields of an options entry:
- An entry whose vendor did not answer just now carries no levels: which of its levels administers is unknown, so a turn-on or a change of level on that lane asks the step-up a raise does, and the next read asks the vendor again.
read_at: when the entry was read from the vendor, kept for the minute that read is reused; absent on an entry drawn without one.scoped: the lane is scoped, whatever its list holds.scopeis the entries the company’s connection reaches, orscope_openwhere the company does not narrow it: any entry the vendor accepts is within reach, andscopethen holds what the vendor listed to choose from (the apps of App Store Connect’s connected teams, which an agent’s own key lists), possibly nothing.scope_namesnames an entry where the vendor names one apart from its id, andscope_detailsgives the vendor’s second identifier for one (an app’s bundle ID);scope_livesays the list is known: written in the company document (GitLab’s projects, GitHub’s repositories, Mattermost’s channels, the Jira projects and Confluence spaces the org model names, and each growth product’s accounts), or read from the vendor just now. An entry without it could not be read, so its emptyscopesays nothing about the reach. The sync judges a seat’s scope by this same reach.scope_required: the agent, once on, must name at least one scope entry.tool_server: themcp_serversentry a per-seat tool server for the lane is started from: the company’s own where it declares one reading the lane’s credential (an enabled one first), else the name the catalogue’s server is conventionally declared under. Absent where no server reads the lane’s credential (Expo, whose tool is the CLI in the agent’s box).rotatable: a person can ask for a credential on the lane to be rotated.releasable: they may keep at the vendor an account a step waits for them to delete.action_url: where they take the lane’s own steps at the vendor; each of their steps in aplancarries it."managed": "external": the engine does not provision the integration for the company, wherever it lacks the authority that creates an agent’s account: Datadog, GitLab or Mattermost without aprovisioningblock, Jira and Confluence on Data Center or without the Atlassian organization key, GitHub withoutprovisioningor on a document only the operator writes (the engine records each agent’s app in the document), and Slack withoutintegrations.slack.app_config_token, the token the engine creates agents’ apps with. On such a lane a seat’s switch still binds its tool to the credential handed in from outside Crewlet, its access is managed where that credential was issued, and itsobserved.credentialnames the variable the seat holds with"source": "external".
observed.credential’s source:
"source": "minted": Crewlet sealed it; only such a credential carriesminted_at."source": "issued": the engine issues it at use and never seals it; it names the seat’s variable while the seat is on and its account exists, with nominted_at(each node issues its own)."source": "external": see above.
observed.retired lists the credentials an account still holds besides the sealed one (label, what the vendor shows of each, and since, when it was created as near as Crewlet knows), where the vendor can tell: while it is non-empty on a lane that is on, every pass plans the retire op, a person’s step to delete them at the vendor.
Where the operator writes the company document (api.auth.company_writers), the answer carries "managed_by": "operator" and the tab is read-only: a save and keep are refused 403 config_managed, naming the Seat object as the place to change the agent’s access. A seat the document no longer has whose account the engine still records is listed with "departed": true, and only remove applies to it. notice carries a company-level warning, such as the one the migration raises when an agent’s credential was kept in a variable something else also names (a company setting, a unit’s shared credentials or another agent): the integration’s own credential_shared finding, drawn on the tab until the variable is written again.
A lane has a plan only where the sync takes steps on it: an integration the engine provisions, once its migration onto per-seat access has finished. On a lane managed outside Crewlet, and on an integration still waiting on its migration, plan is empty and a draft’s plan lists no steps.
POST /setup/integrations/{kind}/access/plan takes a draft and answers what saving it would do at the vendor, writing nothing. It is the plan the sync takes its steps from:
curl -X POST https://engine.example.com/setup/integrations/datadog/access/plan \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{"seats": {"qa": {"datadog": {"enabled": true, "level": "4f0e2b3c-..."}}}}'{"kind": "datadog", "revision": "01J9...", "step_up": false, "plans": [{"handle": "qa", "lane": "datadog", "steps": [ {"op": "create", "verb": "create", "text": "Create [email protected] with Datadog Read Only Role", "by": "crewlet"}, {"op": "create", "verb": "mint", "text": "Mint an application key, sealed as DATADOG_APP_KEY_QA", "by": "crewlet"}]}]}reviews names each agent whose access the draft changes, by the closed list a turn is told, and that has open work raised under its access now: {handle, open, at_least?, changes}, open counting its distinct open items (the questions it asked that are still
open, what its executor waits on a person for and its work items in progress or blocked, each work item once), at_least set where the tracker stopped counting at its ceiling so open is a floor, and changes the change worded about the agent. The draft is measured by the same seat edits the save writes. Each reviews that work once the draft is saved (ADR-0111). It is absent where the open work could not be counted.
A draft names each seat by handle and each lane by its key; a seat or lane it leaves out keeps its setting. Its fields are enabled, level, permissions (GitHub only, each read or write) and scope; any other field is refused 400 invalid_body, so a body cannot name a variable. Refusals:
- A person’s seat or a seat the company does not hold:
404 no_such_seat. - A lane the integration does not grant:
400 no_seat_access. - A level, permission or scope entry the vendor does not offer now:
400 access_not_offered, naming the first suchseat, itslane, thefieldit is about (level,permissionsorscope) and thedetail, with what isofferedinstead where a list says it, or the level a set isrequiredto hold. - A live-listed level (a Datadog role, a Jira project role) is judged only when the vendor answered just now; otherwise the sync reports an id it does not hold as a finding. A scope entry is judged the same way, only when
scope_livesays the list was read. - On a lane with
scope_required, a seat turned on with an emptyscopeis400 access_not_offeredwhatever was read; the sync reports a stored one as a finding, andcrewlet validaterefuses it in the document at the lane’s scope key. - A GitLab project is within reach only inside the group the company’s connection joins agents to, so where the connection lists no projects, a project outside that group is
400 access_not_offeredtoo.
PUT /setup/integrations/{kind}/access saves the same body as one revision of the company document and starts the sync for that integration. Every access sync ends in the same read-only pass POST /setup/integrations/{kind}/check runs, recorded on the integration’s status through the loop’s fold; the tab reads syncing until that pass is recorded, so the integration’s issues and notes say what the change left as soon as the sync is over.
- Send the tab’s
revisionback asIf-Match(or asrevisionin the body); a save on a revision the fleet has left is409 revision_advancedand writes nothing. - The revision records the caller as its author and a history line naming what changed (
agents' access on datadog: turn on QA Engineer on datadog), with an optionalsummaryafter it. - The answer is the tab, as
GETanswers it, withsyncingwhile the sync runs. Where the tab cannot be read again just after a save landed, the answer is the tab as read before the save, at the revision the save wrote, with the saved settings in place, not an error. - A seat removed from the document between the tab’s read and the save is
404 no_such_seat, and nothing is written. - A save made while a sync runs is not refused: it lands, and a sync follows.
?dry_run=trueanswers the plan,step_upand thewarningsthe revision would introduce, and stores nothing (see Dry runs).
A save that raises an agent to an administration role at the vendor (Datadog Admin Role, GitLab Maintainer or Owner, Jira Administrators, Confluence Admin, Mattermost System Admin, or GitHub Read and write on Contents or Workflows) asks for a person present and a fresh proof inside step_up: a machine token is refused 403 token_refused, and a stale proof 403 step_up_required. The plan’s step_up says so before the save. Keeping a role an agent already holds and lowering one never ask. Where the vendor’s levels could not be read, a turn-on or a change of level asks as a raise does. So does an integration still waiting on its migration: the saved setting is the one the sync applies once the migration finishes.
The same rule holds on every other write of the company document by a person or a token: PUT and PATCH /config, a seat’s PUT /config/roles/{id} and a revert. Each compares the revision it replaces with the one it proposes, and one that raises an agent’s access is refused for a machine token (403 token_refused) or a stale proof (403 step_up_required), naming each raise in raises (kind, handle, lane) and storing nothing. A dry run of it is answered, since it writes nothing. A document the operator writes is judged by the operator’s own authority instead.
Turning an agent off disables its account at the vendor and keeps it, so its history keeps its author and turning it back on needs no person (except Slack’s install). Nothing a document edit does removes an account.
POST /setup/integrations/{kind}/access/seats/{handle}/{lane}/{action} acts on one agent’s account, and answers the tab:
| Action | Does |
|---|---|
rotate | Mints a new credential, seals it under the agent’s name, and revokes the old one. Asks secrets.write too. A credential handed in from outside Crewlet is refused 409 credential_external: it is rotated where it was issued |
remove | Removes the account at the vendor, where the vendor allows it, and stops the engine tracking it. Only once the agent is off on this lane: 409 seat_still_on otherwise. On a lane managed outside Crewlet it is 409 access_external: the account is removed at the vendor |
keep | Writes what the vendor shows into the document as a new revision, in the vendor’s own terms: after a role or scope was changed at the vendor (“Keep the vendor’s setting”), or after the account was turned off there (“Keep off”, which keeps the role the document names for when it is turned back on). Nothing is restored. Asks setup.access.write, and setup.access.raise where the role kept is an administration role. A Datadog account holding several roles is refused 409 invalid_input, since an agent holds one |
restore | Turns back on an account somebody turned off at the vendor, which no sync does unasked, or restores a changed role now rather than on the next pass. On a lane managed outside Crewlet it is 409 access_external |
retry | Runs the sync again after a vendor refusal was settled |
done | Reads the vendor again after a person took a step there (a GitHub App’s creation or permission request, a Slack install) |
release | Keeps at the vendor an account a step waits for a person to delete (“Keep the robot at Expo”): the step closes, the engine stops tracking the account, and the audit records the person’s choice. Only on a lane whose options say releasable (never DigitalOcean’s, where a kept token would be live access nobody watches), and only while the lane waits on its remove step: 409 invalid_input otherwise |
Every action but keep is carried by a sync, and one asked while a sync of the same integration runs is 409 pass_in_flight. keep writes its revision and then starts a sync, as a save does, which finds the vendor already matching. Each of these syncs ends in the check’s own pass, as a save’s does.
POST /setup/integrations/slack/access/seats/{handle}/{lane}/install answers {"url": "https://slack.com/oauth/v2/authorize?..."}: a link signed for the agent’s own app, recorded as issued and spent by the install it completes, so it works once and only for a short while. It is minted only while the agent is on in Slack and its app waits for a person to approve the install (409 invalid_input otherwise), never stored, never logged and never part of GET. It writes nothing to the company document, so it is offered where the operator writes the document too.
POST /setup/integrations/{kind}/access/seats/{handle}/{lane}/credential takes {"value": "<token>"}: a credential a person created at the vendor for one agent, for an integration whose accounts only a person can create (Expo’s robots, DigitalOcean’s personal access tokens). It asks secrets.write beside the route’s own verb, since it seals a credential, before it reads the body; both ask a proof inside step_up.
- Route checks: before anything reaches the vendor, an empty value, a
${VAR}reference, and stray whitespace or invisible characters are each refused as400 invalid_inputwith"field": "value". - Vendor check: the engine then checks the value at the vendor with reads only. For Expo it checks that the token works, that it is a robot’s, that the robot holds a role on the company’s account, that the role is the agent’s level and not Admin or Owner, and that no other agent has the robot. For DigitalOcean it checks that the value is a personal access token and no other agent’s, that it works in the company’s team, and, with requests that cannot change anything, that it holds no refused scope and exactly its level’s scopes as far as they can be proven. A refusal is
400 invalid_inputwith the vendor’s sentence indetail, what to do inhint, and"field": "value". - Sealing: a value that passes is sealed by the agent’s own sync under the name the engine derives for it, the agent is read back with it, and the answer is
{"verdict": <the shape a check answers in>, "access": <the Agents tab>}, see Checking a credential before it is stored. The value is never echoed, logged or recorded: the audit line names the seat, the lane, the account and its id, and what the vendor shows of the credential (Expo’s token prefix, DigitalOcean’s expected token name). - Other refusals: an agent that is not on at the integration is
409 invalid_input, a kind that takes no pasted credential is404 no_seat_access, and a sync in flight is409 pass_in_flight.
Moving a company onto per-seat access
Section titled “Moving a company onto per-seat access”A document written before per-seat access named a ${VAR} to say an agent was on at a vendor, and set one role for the whole company (provisioning.role, access_level, a GitHub tier). On first start the engine migrates it, one integration at a time, in one revision attributed to seat access migration: each agent seat states enabled per integration, judged on the credentials it named itself and the ones its unit’s mcp_env shares with it, as the earlier engine read them.
- An agent whose account exists keeps the role or level the vendor shows for it; only an agent with no account yet takes the company’s role, in the vendor’s own terms (a Datadog role is looked up at Datadog by name).
- A Datadog account holding several roles is not guessed at: Datadog waits, naming the agent, until the account holds one role or a person saves the one it keeps.
- A Jira or Confluence agent with no role of its own keeps product access only (no project or space role).
- A Mattermost bot’s channels are written out, each credential the engine minted is re-sealed under the agent’s own name, every account the engine made for an agent it had on is recorded, and the retired fields are removed.
- A credential is never sealed over one the agent already holds under its own name, and GitHub’s installation tokens, which the engine issues at use, are never moved.
- A credential that named a variable something else also names (a company setting, a unit’s shared credentials or another agent) is never moved: the agent gets a new one from its next sync, and the Agents tab warns that the shared credential must be replaced until it is.
- A unit’s shared key for a tool server the engine now binds itself is removed from the unit.
The document lists the integrations it has moved in seat_access_migrated, and the access sync for an integration acts on no agent until it is listed. An integration whose vendor does not answer stays unlisted, with its seats exactly as they were, and the engine tries again every minute. Its access pass reports an identity_missing finding that names the integration, says its access migration has not finished, and gives the reason in the migration’s own words (that the vendor did not answer, or that the lookup of Datadog’s role failed); the log’s seat_access_migration_pending line carries the full cause. An integration the company does not connect is not waiting on the migration and reports nothing, and neither does one whose own setup still waits on a person (its pass reports a missing credential or a step to take): that finding is what it reports instead. Reverting to a revision written before the migration closes the gate again, and the next attempt migrates that document.
One tool, several surfaces
Section titled “One tool, several surfaces”Atlassian is reached over three keys: jira, confluence and the Forge relay. Each is its own block in the company document and its own entry here, written on its own, so a submission is atomic on what it changes; a screen presenting them as one tool asks for one section per key and submits one request per section. The Forge app id is the exception and rides with jira: one app relays both surfaces, so it is one value, not two forms writing one field.
Live Stream
Section titled “Live Stream”/ws/stream is where the dashboard READS. State comes down it and questions go up it: the handshake snapshot carries every section a screen needs on first paint, subsequent pushes carry what changed, and anything fetched on demand (an agent’s LLM history, one event’s payload, a trace, a different spend window) is a query sent on the same socket and answered on it. The socket carries no write.
REST carries the rest, which is two things:
- Writes. A change to the company’s work is
POST /operator/act/{tool}, made as the principal the dashboard’s session resolves to (see/operator/act); a person’s directory row is/iam; the company document, its org chart included, is/config; a credential is/secrets; an integration’s setup is/setup; a backup isPOST /backup. A write answers with the position it landed at, and the reads it moved are asked again on the socket at that position. - Guarded reads the query registry does not answer: the secret names (
/secrets), where each${VAR}resolves from (/config/references), an integration’s setup (/setup/integrations) and the identity directory (/iam). They are credential-scoped surfaces with their own refusals, read through the dashboard’s one REST loader rather than mirrored onto the socket.
The REST read routes below are also a public read API, and GET /stream/snapshot is the fallback for a browser that cannot upgrade to a WebSocket (corporate proxies).
Every named read route is an adapter, never a second implementation: it resolves its path values and hands them to the same answer the socket’s query channel reaches. The generic form GET /query/{what}?a=b reaches the same answers by name and is what the socket’s own frames map onto, so the two can never drift. A question whose source this node lacks (an event log, a schedule ledger, or Worklet where the company does not run it) is unknown rather than answered empty, so its route replies 404 with unknown_query, which tells it apart from the no_route a path nothing serves answers. A question refused on authority answers 403 in the refusal envelope every route answers the same decision with (unauthorized, its reason and its grants), and never step_up_required or token_refused, because no question is decided by a verb that asks either. Worklet and Doclet are asked of the engine per request, because a node that booted with no company builds them at its first revision on them: see Worklet and Doclet.
An event on the wire
Section titled “An event on the wire”One shape, whether it came from the live projection or from the event store, with the same field names either way:
{ "id": "…", "type": "external_notification", "source": "notify.mattermost", "timestamp": "2026-08-25T12:00:00Z", "category": "notification", "summary": "…", "actor": "…", "trace_id": "…", "span_id": "…", "parent_span_id": "…", "failed": false, "payload": { }}payload is present only where the event was fetched by id or by trace: a listing never selects it.
A stored event also carries node, the node that published it (where the work it describes ran), on every read, listings included. It is not the node that answered with it: a node without the data role keeps no event log, and the data node keeping its events in custody holds rows it never published. It is absent only on an event no node published (a test harness’s).
Every stored type reaches the activity feed (the snapshot’s events and each event frame) except auxiliary_spend, which is accounting rather than activity: what the auxiliary model cost, coalesced per key per flush. It is a row like any other in GET /events, a turn’s turn answer and a trace, and it reaches every spend figure through the rollups; it is never pushed as an event frame and never takes a row of the feed (see Event System). A read merged with the feed or drawn beside it asks feed_only=true on events and event_series and gets the feed’s rows alone, as the dashboard’s event log, its Live strip and a seat’s latest events do.
A seat’s LLM history
Section titled “A seat’s LLM history”llm_history is the seat’s finished phases, read from the event store of every live data node (placement moves a seat, and the phases it ran are kept by the data node it ran on, or, where it ran on a node without data, by the data node keeping that node’s events in custody): one row per agent_phase_completed and per executor_collected, newest first, capped at 50, with the answer’s coverage saying which nodes it heard from (see Reading the fleet’s history). The calls in flight are live.live_calls, from the projection. Each history row carries the same fields a live one does (turn_id, phase, iteration, model, response, tool_executions, round_narration, partial_round, total_tokens) plus the envelope’s timestamp and failed.
It is the stored record, its payloads held to their shares of one message, so a long phase’s row may list some of its calls and say the rest (calls_elided, elided_calls, rounds_elided; see what an agent record keeps). It also carries the phase’s price where its own harness reported one (cost_usd), which the dashboard never reads (rule 19).
Each launch of an executor’s run is a row of its own, an executor_collected, published when it is collected: no phase (it names none, and is the work of the execute round that launched it, iteration), with its tokens, its harness’s own turns (harness_turns), its launch_id (a round can launch twice, so the launch is part of that row’s identity), its report as response and its activity_transcript; see each launch is published as its own record.
A finished row also carries duration_ms, which a live one cannot: the engine’s own measurement of the phase, published on the record. Zero means not measured (an executor’s rounds ran inside its coding harness’s own loop, in another process), never took no time. A phase that failed before it reached a provider also truncates to zero at this resolution; failed separates the two. It measures the phase’s own segments: the executor launches its run and parks, and when the run is collected the same turn re-enters the phase (after a restart, possibly on another node), so the one record the phase publishes carries the launch segment’s time, carried across on the park, plus the collection’s, and never the run between them. The run’s own time and tokens are on each launch’s executor_collected row.
A finished row carries the phase’s timeline too, and so does every other reader of the record (phases, turn, trace and event answer the stored payload verbatim):
started_at: when this segment began (not published minusduration_ms, which on a resumed phase also counts the launch segment, asagent_phase_startedpairing would).rounds[]: one{round, started_at, duration_ms, model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, tool_calls, stop_reason}per model request the harness’s record showed, the model’s half of the round only;stop_reasonisend,tool_useorcap.invocations[]: one{started_at, duration_ms, provider_key, model, outcome, first_round, last_round, requests_observed, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, tool_calls}per harness run,outcomeone ofend,cap,stoppedandfailed.- Each
tool_executions[]row’scall_id,started_at,duration_ms,origin(builtinormcp:<server>) andserver(who answered),source(whose tool the call named, a call refused before any tool ran included) andrefusal(the class of a failure the engine classified). - The phase’s
cache_read_tokens/cache_write_tokens(a breakdown ofinput_tokens, never an addition to it),max_rounds/round_ceiling, a worker’s or a judge’shost_round, a resumed executor’slaunch_idand the turn’swork_item. steers[]:{round, note_id, boundary}for each person’s note the phase read; a read by the phase’s executor in its box is at round 1, with the kind of step that read it.
The live frame carries the same so far plus round_started_at, the run_started_at of the harness run in flight and the running_calls in flight. Each is absent where nothing measured it (a tool call nobody timed has no duration_ms, never a zero), so a reader treats absent as not recorded. The whole field list, and why each is measured where it is, is in what a turn records about its time.
An unreadable or absent event log costs the history and nothing else: the answer still carries the seat and its live state.
What the handshake snapshot carries
Section titled “What the handshake snapshot carries”One frame, kind: "snapshot", with every section a screen needs on first paint. Three are derived from configuration rather than from anything that has happened, and are present from the moment the socket opens, before a single turn has run:
| Section | What it is |
|---|---|
agents | The company’s agent seats, each merged with its live overlay. Every seat in the company, not only the ones this node runs, because the dashboard is a view of the company. Human seats are excluded (no turn, phase or spend); they appear in org with "kind": "human" |
org | The same projection GET /org answers, built for the socket’s audience: the charter, the company’s resolved timezone, its token_budget and the services it runs, root-level roles and units nesting to any depth, with only the fields that projection declares for each, a seat’s resolved llm chain and tool_sources only to an audience holding admin |
tools | The catalogue this node serves, each entry tagged with the source that registered it: builtin or the MCP server’s name. Empty on a node that runs no company yet, which has no catalogue |
events, executors, tokens, budget, health | The live projection: what has happened |
Every seat carries one seat-state vocabulary, computed by the engine and never by a client: activity is working, needs, stopped or idle, and stopped_reason is paused, unplaced, budget or provider on a stopped seat and null otherwise. Both keys are on every row, a seat no event has mentioned included. What each word means, which inputs it is read from and in what order they win is Agent States. Placement is the fleet’s lease table, read on every snapshot and on the five-second tick, so a seat a peer runs reads idle or working here, and a seat no node holds reads stopped/unplaced. A token meter report names every capped seat whether or not anything runs it, and moves a seat’s state only when one of its windows is refusing.
The three company-derived sections are re-sent on every published company, as seats, org and tools pushes (with schedules), since a seat change produces no event a projection could learn from.
A company is published by a node’s boot and by every config apply, and these four pushes follow every one of them, as the last step of the convergence. Each is a WHOLE payload that replaces its predecessor: the hub drops the oldest queued envelope without telling the client.
The tools push is also re-sent alone when the catalogue moves between publishes: the one part of a published company that does is its shared MCP servers’ tools, refiled when a server comes back from a crash listing different tools, or comes up on a retry of a start that failed. The other three have not moved, so they are not sent.
Live-state projection (api/stream + LiveState)
Section titled “Live-state projection (api/stream + LiveState)”Every node that serves the API keeps an in-memory projection of every agent’s current state (internal/api/livestate.LiveState, owned by internal/api/stream.Service). It is fed by the same event stream as the WebSocket fan-out and read in O(1), so /agents, /stream/snapshot and the WebSocket handshake never re-derive state from an event scan.
It holds what has happened: a phase, an in-flight call, a spend. Who the seats are, their organisation, tools and schedules come from the company document (the handshake snapshot).
Live state is keyed by AGENT ID, the id derived from the seat’s handle (organization model), which every event a seat publishes carries as agent_id. Never by name: names are prose and two seats may share one, which gave both every overlay either moved. An event naming no agent id moves no seat’s state. The roster row carries the same agent_id, every overlay in the agents push is matched to its row by it, and the durable seat-scoped reads (history, turns, phases, spend) are narrowed by it.
What the projection computes, it also pushes; a dashboard mirrors it rather than re-deriving it. Applying an event yields a change set, and the changed agents’ overlays, the sandbox list and the spend rollup go out as their own envelopes.
The projection holds each agent’s in-flight LLM calls, one per turn it runs, each the latest agent_turn_progress of its turn (phase, round, model, accumulated response, tool calls so far), and surfaces them as live_calls on the agent in every snapshot, so a tab that refreshes or reconnects mid-call re-renders the live row at once. agent_turn_progress is stream-only, never written to the event store. Its response is built by the function that builds the finished phase record’s, so the live row and the expanded turn are the same text (Turn Engine § What streams during a turn).
- Each phase publishes an opening
agent_turn_progress(round_num = -1) before its first provider call, carrying the prompt. round_numis ZERO-BASED, so the round a reader counts isround_num + 1.-1is neither round zero nor missing: it is the phase’s FIRST round, in flight and unanswered. The frame carriesmax_rounds, so a row can say “round 1 of 24” at once.- A surface drawing it resolves every case through
lib/seats.ts’sroundOf(at least 1 while there is a call) androundLabel, whose hint says when the first round has not come back.
State transitions are gated on the event timestamp, so out-of-order delivery (JetStream returns a NAK’d message behind never-delivered ones, and several fleet nodes publish at once) can’t clobber newer state with an older event, including a final progress round that overtakes its own phase completion and would re-open a finished phase’s row.
Every comparison first normalizes to one ordering key. The same instant arrives in several encodings (Z, +00:00, naive, a non-UTC offset) that order differently as raw strings (…05Z sorts after …05+00:00; 13:00+01:00 sorts after 12:30+00:00 though half an hour earlier), so a straggler round would resurrect a finished phase.
A failed phase is first-class: the projection stamps its in-flight call failed, keeps it on screen, and records the classified cause on the agent as last_error.
The agent detail page paints from an agent query, then stays current from pushes. agent_phase_completed / agent_turn_completed envelopes append to the phase transcript live, and each of the agent’s live_calls, pushed every round, is the in-flight row inside its turn’s card until the completed record replaces it. Progress envelopes carry turn_id / phase / iteration for this correlation.
The spend rollup HOLDS the spend records of its own 24-hour window: each phase’s and each auxiliary_spend record (what the auxiliary model cost), the newest 24 000 of them. It is the WHOLE COMPANY’s, since every projection is fed fleet-wide (about 2 600 turns a day; a company past that sees a rollup covering slightly less than a day, not a wrong total). It folds them with internal/tokens, which folds the named windows’ company days into the same breakdown, so changing the window cannot change what a phase counts as. The window ROLLS, aged on the serving node’s clock and never a record’s stamp; every read leaves out what the window has aged past, and an arriving record and the shared tick both drop it:
- a record stamped before the window is not counted, however late it arrives;
- one stamped ahead (a node whose clock runs fast) is aged from when it arrived (from the startup seed, for one read from history), so it leaves a day after it came, or the cap takes it, rather than moving the window or outliving it. It still shows its published stamp, which is how the wrong-clock node is found;
- one whose stamp does not parse is kept (nothing can age it) and is the first the 24 000 cap drops.
The rollup’s since and until are the instants the window was cut at. It ships in the snapshot and is re-pushed on the shared 5-second tick after any phase completed or any record aged out, so a client stays live without a fetch, and a quiet company sees its spend leave the window. (The bundled dashboard’s Settings › Token spend reads named windows instead.) A seat’s spend is that rollup’s per-agent row; the projection keeps no second total.
The projection is seeded from the fleet’s event stores at process start, after the broadcast subscription is attached and before the node hands its listener the API surface. Three bounded reads run side by side, so a slow one does not use up the others’ budget:
- the newest 400 persisted events, for the feed;
- the newest 24 000 spend records (phases and auxiliary) inside the 24-hour window, read in pages of 4 096 records a node, because a busy node’s day exceeds one scatter reply (8 MiB) and a cut reply would cut every node’s records;
- the newest three turns of every agent seat, for its
last_turnand any turn it left parked. Each node reads them from its newest rows, an hour and then a doubled span until it holds them, so the cost is those turns’ rows, not the seat’s week.
Each read goes to every live data node through the scatter the history queries use (Reading the fleet’s history). A data node’s store holds only what that node published (plus what a data-less node handed it, Deployment → The event store), so a one-store seed would show a restarted node only its own share, and without any seed a restart, deploy or join shows a company that apparently did nothing. The projection records which nodes answered as a coverage; a failed read makes it incomplete. An event arriving both ways (the stream before the read, or the read finding a row the publisher wrote inline) is recognised by id and listed and counted once. History is ordered behind the live rows it predates, and a seat’s turn the stream already moved is left as the stream left it.
Paused seats are seeded from the coordination record, beside the reads above and before the node serves: a pause taken before this process started is in no event it will hear, and a paused seat drawn as working is the one state a person pausing it must not see. The pause is in force whether or not the seed has landed.
Executors in flight are reconciled against their durable record, read once before the node serves and then every 30 seconds. The stream is lossy and in memory, so only the record can say which executors are out; the panel of executors in flight says which wins on disagreement. A reconcile that changed the set pushes it as executors; one that changed nothing pushes nothing.
Each of the three seeds is read until it lands. The node waits at most five seconds for them before it serves (until then every webhook is answered 503 starting, so a seed must not hold the node back). A seed not landed by then (boot_seeds_pending names it) lands when it completes. A seed that failed, or whose history a node did not answer, is logged as live_projection_not_seeded, seat_pauses_not_seeded or sandbox_panel_not_seeded (first attempt and every tenth) and retried 2 seconds after the first attempt, doubling to every 30 seconds, until it completes. live_projection_seeded, seat_pauses_seeded or sandbox_panel_seeded says when it lands after the node began to serve. A seed landing while a dashboard is connected is sent to it: the history as a fresh snapshot (applied like the first), the paused seats as an agents push.
GET /stream/snapshot
Section titled “GET /stream/snapshot”Single-shot bundle equal to the WebSocket handshake’s first envelope: every section a dashboard screen needs on first paint, assembled from the in-memory projection with no database round-trip. Fallback when the browser cannot upgrade to a WebSocket (corporate proxies).
Each section is the caller’s, decided by what its push kind needs on the socket: the bundle is for every principal the guard resolved whose stage may act. The events section is present only for an administrator, absent rather than empty (an empty feed reads as a company that did nothing). agents and executors carry each call’s and run’s body only where the caller may read it (A status reader never receives a transcript). GET /agents, GET /org and GET /tools are the same sections served alone, shaped the same way.
Response
{ "health": { /* the whole health envelope described below */ }, "agents": [ { /* /agents row: activity (working | needs | stopped | idle) + stopped_reason (paused | unplaced | budget | provider, or null) + budget meter + live_calls (the in-flight LLM calls, one per turn, [] between turns) + last_error (the phase failure that stopped this seat, or null) + turns (the turns the seat is on, or []) + last_turn (the newest turn it ended, or null) + paused ({by, at, reason, stop_running} while a person has the seat paused, or null) */ }, ... ], "events": [ { /* recent event row, newest first — payload-free, plus a `failed` boolean */ }, ... ], "executors": [ { /* an executor run in flight: turn_id, role, agent_handle, agent_id, harness, provider_key (the executor-chain member it was launched on, to an admin alone) and model, sandbox_id, task, status (the run record's own word), started_at, question, audience, work_item, owner, paused_at */ }, ... ], "tools": [ { /* one catalogue entry — see The Tool Catalogue below */ } ], "org": { /* /org payload */ }, "tokens": { /* the spend rollup — same shape as /tokens/breakdown */ }, "budget": { /* the live org-wide token meter, or null before any node has reported — see below */ }, "schedules": [ { /* configured schedule + computed next_run */ }, ... ]}Each events row is the payload-free feed shape: id, type, timestamp, source, actor, summary, category, trace_id, span_id, parent_span_id, topic, plus:
agent_id: the seat the event concerns (the store’s ownagent_id; absent for an event about no seat). It lets a client narrow LIVE rows to one seat exactly as/events?seat=narrows stored ones.refs: whatsummarynames that a person can open, each{kind, id, text}withtextthe words the summary spells it with (absent where it names nothing; see What a line names).failed:truewhen the work the event reports did not succeed: an event carrying its ownfailedfield (a phase or turn that died) or an event type that is a failure (executor_failed,llm_unavailable,budget_exhausted,turn.guard_breach). Deciding it once here spares a dashboard its own type list.
The flag survives a restart: the event-store writer stamps a failed tag on those events and the projection reads it back when seeding its feed. The store’s listing (EventLog.List) never selects the payload column, so without the tag every historical failure would read as a success.
The health envelope
Section titled “The health envelope”One builder (App.health, internal/api/health.go) answers GET /health, the snapshot’s health section and the 5-second health push. All three carry the whole envelope, so they cannot disagree about whether the engine is healthy. There is no query for it (no stream query): a screen reads the push.
The envelope is public (GET /health is an unguarded probe and the push reaches an anonymous tab), so the fleet and the alarm table appear only as counts (nodes, alarms), never rows. Which node holds what is the admin fleet answer; what each alarm measured is work_retention’s.
{ "status": "ok", "node": "core-1", "configured": true, "version": "v0.4.0", "started_at": "2026-04-01T11:58:03Z", "queue": "jetstream-embedded", "clients": 3, "event_history_seconds": 2592000, "spend_history_seconds": 15638400, "in_flight": 2, "shutting_down": false, "posture": "serve", "applied_epoch": 41, "config_attempt": {"epoch": 41, "revision_id": "01JA8Q2W5H5S1Q9P0N1C7K3M2D", "status": "ok"}, "seats": ["ceo", "cto"], "identity_duty_seconds": {"iam_sweep": 3600}, "unproven_seconds": {"eng": 312.5}, "nodes": 3, "alarms": {"count": 1, "worst": "trim_blocked", "worst_title": "Log cleanup is stuck"}, "seeded_from": { "nodes": [ {"id": "core-1", "answered": true, "error": ""}, {"id": "core-2", "answered": true, "error": ""} ], "complete": true }, "identity": "ready", "objects": {"direct_upload": "available"}}Before anybody is in the company, the body says so. The remedy is the first person, put onto a human seat the company declares under a Tier A token (invited into it, or created on it), so a company declaring no human seat declares one first (How the first person exists):
{ "status": "ok", "node": "core-1", "identity": "unclaimed"}| Field | Meaning |
|---|---|
status | In order of precedence: shutting_down, unconfigured, a diverged posture (shed, stuck or isolated), or ok. starting is the shorter body a node answers before it serves (While a node is starting) and never appears in this envelope. The ordinary postures serve and wait read as ok. A node applying its first company reads unconfigured until that apply completes; a later apply reads ok throughout. |
node | The name this node’s engine runs under: node.id, else CREWLET_NODE_ID, else node-0. It is what its presence lease carries and how a caller tells which node a load balancer sent it to. |
configured | Whether this node’s engine runs a company revision, read off the live epoch on every call. When false the node refuses every inbound webhook with 503. |
version | The crewlet version this process runs. |
started_at | When this node’s engine started (the API is served inside its process). The fleet view reports the same instant. |
queue | The event queue’s backend: jetstream-embedded (a NATS server inside this process), jetstream (an external NATS cluster this node dialled) or memory. Read off the EventQueue contract’s Backend(). Display only; nothing may branch on it. |
clients | Dashboards connected to this node. |
event_history_seconds | How far back the event log can be read: the hard bottom of paging. Once a cursor crosses it every page is empty forever, so a client that cannot name the floor draws it as “the org went quiet”. The store’s own constant, so a retention change reaches every screen without an edit; in seconds because the retention is a duration. |
spend_history_seconds | How far back a named spend window can reach: the replicated usage domain’s history (181 days, ADR-0020), not the event log’s. A spend chart states this floor, never event_history_seconds: one answers “can I still chart that month”, the other “can I still open that turn”. |
in_flight | Turns running on this node. Always present; 0 is a real zero, since every API-serving process runs the engine beside it. |
shutting_down | true from the first moment of a drain; the listener keeps serving until the drain completes. See During a drain. |
posture | The node’s config posture: serve, wait, shed, isolated or stuck. The only place to see why a node left rotation, since /ready answers a bare 503 either way. A node applying a revision reads wait until the apply ends and serve once it succeeds, so a client polling across a PUT /config sees no diverged posture from a write that applies (a corrected revision after a failed one included). shed, isolated and stuck follow only an attempt at that epoch that concluded in failure, or (shed) a lag on that epoch past 45 s while a peer has it. |
identity_duty_seconds | Each identity duty this node armed, mapped to its interval in seconds, whenever it holds that duty’s lease. {} on a node that armed none: one running no workers role (every duty is a worker singleton), or in a maintenance mode, which publishes nothing. A node with no company arms them like any other (the identity estate runs from boot on every data node). A never-armed duty looks like one quietly finding nothing to do, so this is where you read that the retention sweep runs at all. Which node holds each lease is the coordination store’s answer. |
applied_epoch | The activation epoch this node last applied; 0 until its first apply since it started (a node that booted on one revision and then refused the fleet’s answers 0). Which revision a node runs is GET /fleet’s config_serving_revision_id. |
config_attempt | {epoch, revision_id, status}: this node’s last concluded apply attempt, with status ok, error (refused, still on the previous epoch) or degraded (refused after part of the company was already rebuilt). Absent until this process concluded one. It tells a refusal from an apply still running, which applied_epoch cannot. Never the reason, which can quote the config value given: why a node refused is GET /fleet’s config_error, an admin’s. The revision rides beside the epoch because a rebuilt coordination store restarts the count, so one epoch number can name two revisions. |
seats | Handles of the seats this node holds; [] if none. |
stall_lag_seconds | Present only when the node’s watched duty is behind: its last beat is older than the beat interval it keeps (a second at the shipped lease TTL). Value is the seconds since that beat, climbing toward the seat lease TTL, at which the watchdog ends the process. Absent on a node on its beat, so its presence is what to alert on. |
identity | Whether the company has its first person: ready once a person is enrolled; unclaimed while nobody is (a service account alone signs nobody in with a password, so it does not count), a fresh install waiting for its first person to be invited into or created on a declared human seat under a Tier A token. A person an administrator creates makes it ready the moment the create lands, before they spend their first password link. unknown where this node cannot read its identity estate or has not applied all of it (a node just joined holds empty rows until its applier catches up, so “nobody” is proved against the identity log’s end); never reported as unclaimed, which would tell an operator to put a first person into a company that may have started. Every node answers it, one with no company included, since the identity estate runs from boot. /health is the one surface an unclaimed company can reach (never guarded; no credential exists before the first person), hence its place here. It does not move status. |
nodes | How many nodes hold a presence lease: the fleet this node’s fan-outs (search, fleet history) divide their work by. Absent when the presence read failed or did not finish inside the probe’s coordination budget (an eighth of the 15-second reconcile interval, under two seconds; it runs beside the posture read, so a wedged broker slows /health by that budget instead of hanging it). Never 0, since the answering node is one. A screen says “node count unavailable” for an absence. |
alarms | {count, worst, worst_title}: how many of this node’s alarms are firing (one per kind however many logs it stands on); worst, the one firing longest (the table asserts no severity; the longest-unanswered condition is the one the dashboard’s engine panel names first); and worst_title, its title in words for a company owner (both absent when count is 0). worst is a KIND, naming no log: an alarm that stands on logs (log_headroom, log_ceiling_short, backup_age, trim_blocked, deferred_old, floor_unknown and census_drift) lists them in its domains, each a measurement with its logs, on the operator-only /worklet/retention answer. From the same evaluation come the crewlet.alarm.active gauge (one series per kind) and the alarm_raised / alarm_cleared log lines (a per-log condition writes them per log, so a second log joining an up alarm, and the first leaving it, are each said); it runs every ten seconds on every node, a node without the data role judging only the alarms it measures of itself (the reference). Absent before the first evaluation: {count: 0} would read as healthy. No alarm makes /health or /ready fail. |
seeded_from | Which nodes this node’s live projection was seeded from at boot (the activity feed, each seat’s last turn, and the live spend window behind the tokens push), in the fleet coverage shape. Absent until a seed has landed. A failed or incomplete seed is retried (Live-state projection); this is the latest attempt’s coverage, and complete turns true once one attempt was answered by every node. Until then those surfaces are short, and this keeps that visible after the log line scrolled away. |
objects | {direct_upload}: whether an upload may go straight to the object store’s S3 bucket on a presigned put. available, or unavailable (<reason>): always so on the default nats backend (only the fleet reaches its bucket), and on an s3 bucket whose provider the boot probe could not prove refuses a body not matching its x-amz-checksum-sha256 and a second put under If-None-Match: * (see The boot probe). Unavailable is no fault: uploads then stream through the engine. Absent on a node running no object store. |
unproven_seconds | Each seat whose teardown this node could not prove, mapped to seconds stranded; present only when one is. Such a seat is still leased by this node, so no peer can claim it, and this node will not run it (hence absent from seats). Alert on the duration, not the field’s presence: a release that fails once and succeeds on the next heartbeat is a working system. See Seat ownership. |
Per-socket facts (envelopes this connection dropped, its queue depth) are deliberately not here: the tick encodes one JSON string for every client, and a per-client field would force one encode per client per tick. A connection that lost envelopes to backpressure is logged as stream_client_left_behind, with the count, when it disconnects.
GET /health always returns 200 once the node serves, including when status is unconfigured or a diverged posture: the code is liveness, and an engine waiting for configuration is alive. Before then it answers 503 only while the node recovers what it holds (While a node is starting). Steer traffic with GET /ready, which answers 503 and names the reason.
Probes on a node without ingress
Section titled “Probes on a node without ingress”A node whose node.roles leave out ingress (a satellite, or the seats and workers half of a split deployment) serves no API, dashboard or webhook, but an orchestrator must still probe it to restart a wedged node or wait on a rollout. So it binds api.port for exactly two routes the network can reach, and binds no public listener. An executor in a box that does not share its node’s loopback reaches its tools through an ingress node’s tool bridge, which relays each call here. The guard stands in front as on an ingress node: 401 to a request presenting no credential (everything outside the guard’s exemptions is guarded, /agents say), and 404 no_route for an exempt path this node does not serve (/dashboard) and for anything once a credential is presented. The node logs api_probes_listening, with the address its own boxes dial in box_host_url. api.port: 0 binds nothing, here as anywhere.
A node that runs seats serves its own boxes beside the probes. A direct box is a process of the node’s host and dials the node that launched it on loopback: the tool bridge under /mcp/{token} (every route beneath it included) and, where the node forwards to OTEL_EXPORTER_OTLP_ENDPOINT, the telemetry receiver under /otlp/{token}/v1/{signal}. Both are the routes an ingress node serves, but only to a caller on this host’s loopback, read from the connection’s own address. A token the fleet did not sign answers 401; a call for a seat this node has since handed on is relayed to its holder. A caller off the host meets 404 no_route under both prefixes, whatever its method. While the node starts, a loopback caller of either gets 503 starting with a Retry-After, as every starting node answers a route it will serve. The node hands its boxes this address only where loopback reaches the listener (an api.host of every interface or a loopback address); one bound to a single other address leaves its direct boxes to CREWLET_MCP_BRIDGE_URL.
GET /health is liveness: 200 while the process is alive, through a drain and a down broker link, once the node serves (before then, see While a node is starting). Its body is the node’s half of the health envelope under the same field names, plus the node’s roles, and leaves out what describes a dashboard this node does not serve (clients, event_history_seconds, spend_history_seconds, seeded_from):
{ "status": "ok", "node": "sat-eu-1", "roles": ["seats"], "configured": true, "version": "v0.4.0", "started_at": "2026-04-01T11:58:03Z", "queue": "jetstream-embedded", "in_flight": 1, "shutting_down": false, "posture": "serve", "applied_epoch": 41, "identity_duty_seconds": {}, "seats": ["eu-support"], "nodes": 4, "alarms": {"count": 0}}GET /ready answers whether the node is doing its work; it takes no traffic for the probe to steer, and what waits on it is a rollout that must not replace the next node until this one has joined. 200 once every condition below holds; otherwise 503, with the first that fails in reason, in this order:
reason | The node is not ready because |
|---|---|
starting | It has not started yet; its probes are still the boot’s (While a node is starting). |
draining | It is stopping. |
broker_unlinked | It cannot reach the fleet’s broker: a leaf whose link to every member is down, a connection to an external cluster that is reconnecting, or the fleet’s JetStream not answering across its data path or its lease link. detail names which, and the cause. Ahead of what follows, since each of those is what a lost broker looks like. |
unconfigured | Its engine runs no company revision. |
shed, stuck | Its config posture is diverged. wait and isolated stay ready, as on an ingress node. |
no_presence | It does not hold its presence lease (its last renew is older than the TTL), so no peer counts it and nothing routes to it. |
admission_withheld | It runs seats and its latest placement pass was not admitted to claim: no data node has yet answered that a copy of the estate admits a seat (a stateless node), its own copy is behind (a data node), or it cannot serve the seats it holds. Not judged on a node running no seats or started in a maintenance mode. |
{ "ready": false, "node": "sat-eu-1", "configured": true, "draining": false, "posture": "serve", "reason": "broker_unlinked", "detail": "the data path: jetstream: this leaf has no link to any member of the fleet, so every stream and bucket it uses is out of reach"}An ingress node’s /ready answers whether traffic should come to it, on draining, unconfigured, shed, stuck and estate_behind alone. Both share one judgement (judgeReadiness, internal/api/health.go) and one precedence, so a shared reason means the same on both.
What a line names
Section titled “What a line names”A line the engine writes (an event’s summary, a trigger’s summary on a phase record and a live call, a wake’s subject) says what it names that a person can open, beside the words: refs, each {kind, id, text}. kind is one of work_item (a Worklet task by its id or key), code_change (<repository>!<number>), commit (<repository>@<object id>), repository, page (a Doclet page by its id), artifact, turn, schedule (<scope type>/<scope id>/<name>), a2a_channel, seat (a handle) or chat_room; a kind a newer engine adds arrives as itself. text is the words the line spells it with, a run of the line: a reader finds each ref’s words left to right, each search starting where the last match ended, and a ref whose words a cut summary lost is not drawn. The words are unchanged, so a reader ignoring refs reads the same line. Whether the reader may open what a ref names, and what it is called now, is the references question’s.
Paging the event history
Section titled “Paging the event history”GET /events and the events query return rows ordered by (timestamp, id) descending and accept an exclusive keyset cursor:
GET /events?limit=100&before_time=2026-04-01T12:00:00Z&before_id=<event_id>Pass the oldest row you hold to get the page beneath it. The id half is not optional: burst writes share a timestamp at microsecond resolution, and a cursor over a non-unique key skips or repeats what collided.
The end of the history is exhausted: true, next: null, and only that. A page SHORTER than limit is not the end: the page is merged from every node’s store (Reading the fleet’s history) and stops at the newest point any node’s page stopped at, so a node whose reply was cut to fit the transport shortens the page without ending it. The agent filter adds another reason: it also pulls in every event sharing a trace with a direct match, from every data node, so a caller must dedupe by id.
agent is the related filter: every event involving one agent seat, named by any handle it answers to: the events that are its own and every one naming it as a party (an A2A channel it asked or was asked on, a message it sent or was sent there, a vendor delivery addressed to it), plus the trigger that caused its work, by trace. Both sides are keyed on the seat’s agent id, never a name: the handle is resolved through the org chart the answering node holds, as each event’s participants were when it was written, so a namesake is never listed as the seat, and a handle the seat has given up still finds it rather than whoever took it next. A handle no agent seat answers to (a human seat’s, or nobody’s) is refused bad_params, since no id could match and an empty page would read as an agent that did nothing; a person’s events are the ones they acted in, under actor. The index was keyed on names before node migration 0038, so a counterpart or delivery recipient named before it is not in the related view for the rest of the retention window.
The persistent store retains 30 days, and event_history_seconds is that floor on the wire: read it rather than restating the number, which is the store’s own constant. Once a cursor crosses it every page is empty, so a client must distinguish that from quiet rather than draw the gap as silence.
seat narrows the log to the events ONE agent seat published, named by its handle and resolved on the server to the derived agent id every seat-level event carries and every row names as its own agent_id (the live event push and a stored row alike, so a client merging the two filters both by the same id). It is what a seat’s “all activity” asks by, never actor (who acted, as prose: a seat’s name there matches every seat carrying it).
category filters server-side because filtering a paged list client-side silently excludes (a 100-row page holding 2 matches reads as “only 2 exist”). Its vocabulary is a closed set of eight values; which event type lands under which is in Deployment § What gets stored.
Reading the fleet’s history: coverage
Section titled “Reading the fleet’s history: coverage”A data node’s event store holds what that node published, plus the events of a node without data, kept in
custody. So the history questions (events, event, event_series,
trace, turn, turns, phases, a seat’s llm_history on agent, the
delivery and outcome counts on integrations, the live projection’s boot
seed) are answered by every live data node at query time: the
node you asked reads its own store, scatters the question to its
peers, merges the answers and says which nodes it heard from. Each answer carries:
"coverage": { "nodes": [ {"id": "node-a", "answered": true, "error": ""}, {"id": "node-b", "answered": false, "error": "no answer within the 2s fleet read budget"} ], "complete": false}nodesis every node asked or heard from, sorted by id. The node you asked is always one and always answered (serving the API takes thedatarole); a failure of its own store is an error, not a gap.completeis true only when the node roster could be read and every node on it answered. A node that did not is named with why: no answer inside the two-second fleet read budget, a build speaking another scatter protocol version, an unreadable reply, or its own read failing.- Every node answers in its own protocol version only and refuses a question in any other: a node on another build is named with that reason on every answer, and nothing it holds is merged. No node is asked to answer around a filter it would drop, a count it would never send or the instant it would ignore, so every merged part was read exactly as asked: the axis’s window is cut alike on every node, a window the history clips goes down to the bucket the horizon falls in, and the serving node drops that partial first bar after the sum (see the time axis).
- It sits at the top of each answer, beside the record’s own fields on
eventandevent_series, and isnullonagentandintegrationswhen the history could not be read at all. - A node that has left the fleet is not asked (not live): its turn-level detail left with it. Its spend and turn counts are answered by the replicated
usagedomain. - A stateless node’s row is listed and counted once, though for a moment
two data nodes can hold it: a
custody
batch the second keeper wrote before the first settled it. A listing
holds it once by its
(timestamp, id). Every count (event_series’s bars,total,failedandby_category,trace’s andturn’stotal, aturnsrow’s tokens,phasesandduration_ms, the outcome counts onintegrations) counts it once: each node counts the rows it keeps and names the ones it has not settled, and the serving node asks which node keeps each named row before adding it. eventnot found answersnot_foundnaming any node that did not answer, since a silent node differs from a dead one. An event older than the 30-day history is not found either: it is past the horizon every read of the log stops at, and a row a node’s sweep has not yet deleted is not served; every node floors its lookup by id at the serving node’s horizon.- Every question is asked at one instant, the serving node’s clock when it arrived, which travels with it. Every node floors the 30-day history at the serving node’s horizon, not its own, and one node’s part of an answer (a turn’s rows, count, ending and traces) is read at that instant throughout. A node answering late or with a fast clock therefore holds back nothing the others include. A question carrying no instant is refused.
turns merges in two passes: every data node’s page, then every data node’s share of
exactly the turns any page listed, so a turn resumed on another node after a
restart is one row folded from both halves. The window is pinned to the asker’s clock
(the instant travels with the question, so every node floors the
window and its share of each turn at the asker’s 30-day horizon), and the merged turn is held to it whole: a node’s half of a resumed
turn can start inside the window while the turn began before it elsewhere.
A turn is paged where a node lists it: at the earliest start at which any
node’s own page lists it, which each node says of its share in the second
pass. That is not always its started_at (where the turn began): a
turn resumed across nodes is selected by each node on its own half, so under
a filter the whole turn passes but the half where it began may not (the clean
half of a turn that failed later, under failed=true; the half that names no
item of a turn charged to an item only by its later records, under
work_item=). Paged at its started_at, such a turn could fall behind the cursor and
on no page of the walk.
Walking next lists every turn exactly once, even two turns starting at one
microsecond: the cursor is that position and the turn’s id, and every node resumes after exactly the turn
the last page ended on. Rows are newest first by that position, the higher
turn_id first within one microsecond, so a row whose started_at is earlier
than where it is listed can sit above rows that began after it.
next is the fleet’s cursor:
it can be present on an empty page, where a node’s page stopped before any
turn above it could be shown. With sort=-tokens the page ranks each node’s
top turns by their MERGED totals and carries no cursor (before= is refused
bad_params): a ranking has no position to resume from, and it can miss a
turn split across nodes whose every half fell below every node’s cut.
The runtime audit: source=operator
Section titled “The runtime audit: source=operator”Every change a person makes through a running node leaves one event, whether or not it went through:
| Event type | Written for |
|---|---|
operator_acted | Every operator tool call that is not a proven read and not a person’s own bookkeeping (own_record_marked, below), on all three transports: a dashboard button (/operator/act), a person’s own assistant (/operator/mcp) and a script on the human write surface (/worklet, /doclet/pages), whose verbs with no tool behind them are recorded too. A write Ask Crewlet sent after you approved it is recorded under the transport assistant, its credential assist:<grant>, with an assistant reference (conversation_id, turn_id, grant_id, session, proposal_id) and conversation_id beside it as a listing field. The operate grant’s drain, stop of every box and limits write are recorded under the transport operate, actor operate, tool drain, stop_boxes or set_limits, with the caller’s remote address and, for a stop, the count of seats stopped |
own_record_marked | Every such call to a tool that keeps only the caller’s OWN bookkeeping: mark_chat_read, mark_inbox, the code inbox’s marks and set_pins, each taking no name. Same fields as operator_acted, under a type the activity feed leaves out (stored, not in the activity feed): reading one’s rooms is not something the company did. A write to a person’s record BY NAME (PUT /worklet/people/{handle}/inbox and /pins) is operator_acted, whoever’s record it names |
backup_requested | Every POST /backup and POST /operate/v1/backup that began copying, finished or not, with the caller’s remote address |
assistant_conversation_read | Every administrator’s compliance read of a person’s Ask Crewlet conversation: the reader, conversation_id, owner_id and the reason given, and file_id for a compliance download of one file. The conversation itself is never copied here |
assistant_turn_completed | Every segment of a person’s Ask Crewlet turn: answered, stopped, failed, out of budget, or parked on a proposal. It names the conversation, the turn (assistant_turn_id, never a seat’s turn_id), how it ended and every step’s tool, route pattern, outcome, HTTP status and bytes read; never an argument, an answer or the person’s question |
executor_browser_watched | Every watch of a seat’s browser, twice: phase started, before the seat’s holder is asked, and ended. Both name the watch’s session, the seat (agent_id, agent_handle), the run as run_turn_id (never turn_id: a watch is no row of the run’s turn) and its launch_id; the end adds ended_by (closed, not_running, no_browser, refused, draining, too_slow, failed or superseded) and duration_ms, which a start sends as "" and 0. Never anything the box showed |
Each carries source: "operator" on the envelope, so
GET /events?source=operator is the runtime audit alone. Who acted is
the one attribution: actor (the seat’s handle for a person, or for a token or
service account bound to one, and the login otherwise), actor_kind (human, operator or system) and
operator_id (the credential: session:<lineage>, pat:<id>, or a Tier A
token’s login), resolved once for the call so a directory rebind landing
meanwhile never makes the record name a different person. All are filed
under lifecycle.
{"type": "operator_acted", "source": "operator", "actor": "jane-founder", "actor_kind": "human", "operator_id": "session:0192f0aa-61c2-7d1e-9b40-3c5d7e8f9a01", "transport": "act", "tool": "update_work_item", "request_id": "0192f1a4-9b2d-7c03-a4e1-5f3b9d0c7a12.k3f9a1c0d2e4b6a88", "outcome": "applied", "position": "CREWLET_TRACKER_LOG@1:4711"}outcome is one of five: applied, pending and unknown are the write’s own
answer as the call returned it (a call interrupted before answering is unknown: whether it landed is what nobody
knows); refused names the tool’s refusal class in refusal; failed is a
node fault (internal_error) or a failure the tool did not classify,
and carries no refusal. The last two also carry failed: true, so
the log’s failure filter finds the row. request_id
is the operation the call was made under: the request’s Idempotency-Key as
the caller’s own operation on the act and write surfaces, absent over MCP, so
every retry of one gesture reads as the same request. A backup’s record names the dir and the number of
streams the manifest covers; the node whose disk it was written to is the
envelope’s node (the queue stamps it on every event with the publishing node; the backup route publishes from the node that took the copy).
The arguments are never recorded. A page body or comment is the company’s content and already lives in the history of the object it changed; the audit says who called what, and what became of it.
A listing carries what a row needs without its payload. GET /events
never returns payloads, so the store promotes the audit’s dimensions
into each row’s tags: actor_kind and operator_id (beside
the row’s own actor column), tool (an operator_acted call’s tool),
dir (a backup_requested copy’s directory) and conversation_id (an
assistant_turn_completed turn’s conversation), beside node, the publishing node, which every event row carries. The dashboard’s
Audit log and backup history draw from these. A failure’s kind is a tag too,
error_kind (an executor_collected launch’s max_turns or out_of_memory, a
turn’s budget_exhausted), and a spend record’s row carries its tokens and
calls (a launch’s are its harness’s rounds).
What is not here. A request refused before any tool ran (a read sent to
the write transport, a token that is nobody, a malformed body, a backup with
no destination or one it refused (the 400s below), a chat erase or
prune missing its confirmation, reason or cutoff) changed nothing and
is not recorded, except where the write surface refused it on its own authority
decision, on a stored row it read before any tool ran (a remark
somebody else wrote, an item’s own project): that is refused like a tool’s
refusal, since “you may not” is a fact an audit is read for.
A gesture with no tool behind it (a purge, a page’s rename, trash and restore,
a comment take-down, a remark rewritten, and a chat erase, prune or
horizon under its verb: chat.erase,
chat.prune, chat.channel.retention) is recorded as a tool call is. A
chat erase’s reason is not on its row: it travels on the
erase record itself, on the chat log, and in the serving node’s chat_erased
log line; no row any data node keeps carries it. A
proven read over MCP is not recorded either, since a row per question
would bury the writes. Configuration and credentials keep their own records
(a revision names who created it, a credential who stored it), so
/config and /secrets publish nothing here. Like every event, the row
is written by the node the call reached, so a fleet’s audit is the union of
its nodes’ logs.
A record that could not be published is logged as
operator_audit_not_published at error on that node; the call is
already answered, and its tracker or page history is unaffected.
The event log’s time axis
Section titled “The event log’s time axis”GET /events/series counts the matching rows per bucket over a window. It
takes every filter GET /events takes bar the cursor and agent (see
below), plus:
| Name | Default | Description |
|---|---|---|
bucket | (required) | minute, hour or day: a closed set, since an arbitrary width is an axis nobody can label. The log has minute (the spend series does not) because “what just happened” is the commonest question asked of a log. An unknown value is refused naming what is accepted, never defaulted. |
since / until | (the 30-day history, to now) | RFC 3339 instants, half-open. Both edges snap outward to whole buckets, so the first and last bars are whole (a partial bar means something different from its neighbours’). No snap crosses the 30-day history (event_history_seconds): a window it clips, the default one included, begins at the first whole bucket inside it, and a window wholly below that bucket covers nothing (since equals until, no bars). The answer is labelled with the window it actually covers. |
The answer is {bucket, since, until, bars, total, failed, by_category}.
bars is every bucket in the window including empty ones, so a
quiet hour is a full-width gap.
The whole answer is cut against one instant, the serving node’s clock
when the question arrived, and every count in it (bars, total, failed
and by_category) keeps rows from 30 days before that instant.
Across a fleet that instant is sent with the question, so every node cuts the
same bars (a window the history clips is cut down to the bucket the horizon
falls in, its first bar counting only what lies above the horizon) and
floors counts at the serving node’s horizon. The
serving node sums every node’s bars and only then drops that partial bar, so
no bar starts below the horizon (see since above), every bar
lies wholly inside the history, and a row any node holds inside a bar, the
first included, is counted however long that node took to answer.
Each bar is {at, count, failed}. failed is how many of the bar’s rows
reported a failure, by the rule a turn’s own failed mark uses: the event
said so, or its type is one (llm_unavailable, budget_exhausted,
turn.guard_breach, executor_failed). It is a split of
count, never an addition. The answer’s own failed is the sum of the bars’. The engine counts these because a
screen holds a page of rows, never the window.
by_category is how many rows each category would give with the
category filter lifted and every other one applied (counted through its own filter, every value
but the selected one would read zero). A category with no rows is absent, so a
caller rendering the closed set reads a missing key as zero.
It is counted over the window that was asked for, not the snapped one
since and until report: a chip says how many rows choosing it would
show, and those come from GET /events with the caller’s own
edges. So the chips need not sum to total, which describes the whole-bucket bars. On a window the history clips, the chips reach down
to the horizon itself and so also count rows between it and the first
whole bucket, which no bar draws.
Two refusals, both 400 rather than a smaller answer:
related_agentis not accepted. That filter folds each page’s trace siblings into it (see above), so a count over the predicate alone is smaller than the listing shows, and a bar must not disagree with its own rows.- A window of more than 1,500 buckets is refused naming the bucket and the span. Truncating would put a month’s heading over a day of bars and coarsening would answer another question; use a coarser bucket or a shorter window. The buckets counted are the ones every node cuts, so on a window the history clips they include the one the horizon falls in, which the answer then drops.
The live token meter
Section titled “The live token meter”budget carries the fleet’s shared token counters as the budget gate
enforces them: for the company and for every seat whose token_budget caps a
window, one entry per capped calendar window (the day, the ISO week and the
month on the company’s clock) with that window’s spend, its ceiling (from the revision this node runs), the gate’s refusal stamp and the engine’s judgement of it. It
is the only figure that can honestly be divided into a configured ceiling,
since both cover the same span. The dashboard’s other token figures are spend
rollups over a reader-chosen window; dividing one into a
ceiling is wrong by whatever was spent outside it.
{ "meter_id": "node-a:7f3c…", "seq": 42, "timezone": "Europe/Berlin", "org": { "windows": [ { "period": "day", "window": "2026-09-23", "starts_at": "2026-09-22T22:00:00Z", "resets_at": "2026-09-23T22:00:00Z", "used": 2710450, "limit": 3000000, "state": "near" } ] }}A seat’s meter rides on its row of the agents push as budget: {windows: […]}
in the same shape.
periodisday,weekormonth, andwindowis its label on the company’s clock, the same on every node.starts_atandresets_atare the window’s half-open span in UTC;resets_atis when its allowance comes back without a ceiling being raised.timezonenames the clock the windows were cut on.- Only capped windows are listed, each with its
limit; a scope that caps none carrieswindows: [], and a seat that caps none carries no meter. stateis the engine’s own judgement, so no screen holds a threshold:refusingwhen the window has no room left for a single token (every window that refused a round, since the refused round is counted, and the condition a seat is parked on),nearonceusedreaches nine tenths oflimit(engine.BudgetNearFraction, served asnear_fractiononGET /budgets), andokotherwise.refused_atis when the window last turned a call away, in UTC, and absent while it has not: a round whose charge it refused, or work turned away before its first call because the window was already full (a turn’s next call, a seat’s delivery parked, a person’s question, a reflection pass), each recorded as the gate’s refusal on the scope a charge would be refused by, the company’s before the seat’s. A refused round is counted inused(the vendor billed it), so a window that refused one reads past itslimitby that round, and every later charge is refused against that figure. The stamp is kept in the shared counter, so every node reports the same one; it clears on the scope’s next admitted charge or when the window turns over. A window whose ceiling was raised after a refusal keeps itsrefused_atuntil then, under astateofokornear: it has room again, and the stamp is history.
Every node publishes a budget_meters snapshot of the counters as soon as its
seat host is running and every 15 seconds (engine.BudgetReportInterval)
after, and at once when a budget window first refuses a charge, so
a stop reaches every open screen with the
refusal (a repeat refusal in the same window
waits for the tick). The projection folds each one in as it arrives. Until
the first lands, budget is null (nobody has read the counter), a different fact from a report whose org.windows is [] (“nothing
is capped”). A company with no ceiling anywhere publishes exactly that: an empty
list and no seats, without reading the counter. A node whose read of the
counter fails publishes nothing that interval, so the meter keeps the last
reading rather than drawing zeroes.
meter_ididentifies the node incarnation whose report is held. Every node reads the same counter, so reports under different ids describe the same figures at different moments. A report is a complete snapshot, so a consumer replaces what it holds rather than merging or taking a maximum: a window turning over must be able to lower the figure, and a ceiling removed must take its window’s bar with it.seqis monotonic within ameter_id. The feed is best-effort: an ephemeral broadcast subscription that takes no acks, starts at the stream’s tail on every (re)connect, and lets a slow consumer miss frames. So a report at or below the heldseqfrom the same meter is dropped, a report from another meter read earlier than the held one is dropped, and a gap is closed by the next report, not replayed.{}means no report has arrived yet. Per-agent,budget: nullmeans the same, or that the seat has no per-agent ceiling: the engine meters a seat only when itstoken_budgetcaps a window.
It is never persisted: a report reads a counter that moves every round, so a replayed copy would show stale figures as current.
Each agent’s live_calls is a list, [] between turns, of one call per turn the
seat runs (paired with its turn by turn_id), oldest first, each
{ turn_id, phase, iteration, model, prompt, prompt_messages, response, tool_executions, calls_elided, elided_calls, round_narration, partial_round, round_num, rounds_used, rounds, rounds_elided, invocations, max_rounds, round_ceiling, round_started_at, run_started_at, running_calls, running_calls_elided, steers, cache_read_tokens, cache_write_tokens, work_item, node, in_progress, versions }
while an LLM call is under
way:
prompt_messagesis[{role, content, sections}], the conversation the phase opened with.sectionsis that message’s outline as the prompt’s builder recorded it,[{key, title, bytes, headed?}], tilingcontentexactly, withheaded: trueon a part that opens on its own heading line whose text istitle(absent on a part the builder named, which may still open on a heading of its content’s). It is absent on a message no builder outlined or whose text is not valid UTF-8; a finished phase record carries the same maps assystem_sectionsanduser_sections. See a prompt carries its outline for the keys and the rules to check before slicing by one.round_narrationis[{round, content, declined}], what the model said in each round so far;declined: truemarks a round that answered in prose where the phase had to end in a call, and is absent otherwise.rounds_usedis the round the phase is on, counted from one: rounds that have come back, plus the one in flight from the frame published as that round’s provider call is made. A finished phase record carries the same count under the same name.roundsis each round’s own timing and tokens (a round is one model request, as the harness’s record shows it):{round, started_at, duration_ms, model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, tool_calls, stop_reason}.invocationsis the phase’s harness runs that have ended, each{started_at, duration_ms, provider_key, model, outcome, first_round, last_round, requests_observed, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, tool_calls}, as on the phase record. The run in flight is not on it until it ends: its rounds are those past every entry’slast_round. Empty until the first run ends.max_roundsis the round cap currently granted, which an extension can raise mid-phase.round_ceilingis the highest value any extension may raisemax_roundsto.round_started_atis when the latest round made its provider call. It is later than every entry inroundswhile that call is out, and equal to the last entry’s start while the round’s tools run; only the first is a model call in flight.run_started_atis when the harness run in flight was launched (the run whose rounds are past every entry ininvocations). Absent between runs.running_callsis every tool call running now, in arrival order, each{id, round, name, arguments, started_at}: a list, since a harness may make a response’s calls at once.idis the call’s id, which itstool_executionsrow carries ascall_idonce answered. It is absent while no call runs and never carried forward from an earlier frame: a frame that stops listing a call means the call returned.steersis every person’s note the phase has read so far,{round, note_id, boundary}: the round whose provider call first saw it, and the kind of step that read it (round, orbrief,tool_batch,finishorstepfor a read by the phase’s executor in its box, which is round 1). What the note said and who sent it are on the turn’sagent_turn_steeredrows. See steering a running turn.nodeis the node running the call.versionsis{prompt, response, narration, executions, rounds}: the version of the copy the call holds of each heavy field.promptnumberspromptandprompt_messages,responsetheresponse,narrationtheround_narration,executionsthetool_executionswith itscalls_elidedandelided_calls, androundstherounds. A number the node’s projection never hands out twice, taken whenever the field is written: every field when the call begins, then each field a frame changes. So on the node a tab’s socket reads, a version only grows for every call under every key, and a call cleared and rebuilt under its own key (turn_id,phase,iteration) is newer in every field than the copy a tab held before. A reconnecting tab is sent a snapshot, which replaces every copy it holds. Every surface that carries a call carries it.
Beside live_calls, each seat carries live_call_seq: the node projection’s
own sequence (the one versions come from) read when any of the seat’s calls
last changed: began, took a frame, froze as failed, or was cleared.
It is on every surface that carries the calls, an empty list included, and it
orders the calls themselves where a field’s version cannot: across a clear,
which leaves no version behind, and across two calls, whose fields are never
compared (see What the projection carries, and what the wire
sends). Like a version it
is a fact about one node’s projection, and a snapshot resets what a tab holds.
Beside live_calls, each seat carries turns, last_turn and paused: the turns the seat is on, each with its stage of context, phase or parked, the newest turn it ended, and who paused the seat, when and why (null while nobody has). See Agent States. A call whose phase failed keeps in_progress: false
plus failed: true and an error object, so the dashboard renders the failure,
and no partial_round (the phase is over). The failed call stays until the
seat’s next call opens, on that turn or another; the same phase running again under the same
turn and iteration (the review of a parked turn’s resume that is held or
retried) replaces it with a call of its own rather than continuing the failed
one’s rounds.
A failure is told by its kind, and the company’s configuration only to an
admin. The error object and a seat’s last_error are
{kind, detail, phase, turn_id, at, event_id}: kind is the classifier’s
(rate_limit, auth, server, and the others), which the dashboard words for a
person, and detail is the failure in its own words, sent only to an admin. Those words name the company’s providers.llm entries (“llm chain
exhausted after 1 provider (default)”) and carry whatever a vendor or tool
wrote, and which entries a company configures is an admin’s to read. The same
goes for each invocations entry’s provider_key, and for the provider_key
of an executor on the executors push and snapshot and on the
executors board, which every other
reader, a seat’s lead included, is sent without. The full text stays in the
engine’s log and on the turn’s own record.
What the projection carries, and what the wire sends
Section titled “What the projection carries, and what the wire sends”A running phase moves its seat’s row on every progress frame (five times a second while a round streams), so frames into the projection and pushes out of it are trimmed and reassembled on the other side:
- Into the projection,
promptandprompt_messagesare sent once, on the phase’s opening frame, and carried forward (a 30 KB system prompt does not change mid-phase, and pastqueue.MaxPayloadBytesthe publish is refused outright and the live row stops); a tool result and the joinedresponseare sent tail-bounded on a live frame, since readers watch their end. The durableagent_phase_completedrecord keeps every one of them whole within its share of one message, and says what it left out past it (what an agent record keeps): a failed phase’s call is frozen with that record’s list, and carries itscalls_elidedandelided_calls. A running phase’s frame is held to live shares instead: past them it keeps the newest calls (calls_elided,elided_calls), its first and newest rounds (rounds_elided, versioned withrounds) and the calls in flight that fit (running_calls_elided, carried asrunning_callsis). - Out to a tab, an
agentspush carries a call’s HEAVY fields (promptandprompt_messages,response,round_narration,tool_executionswith itscalls_elidedandelided_calls, androunds) only when their version (versions) moved since the last push for the same call. Otherwise the key is ABSENT, never empty, and the tab keeps the copy it holds. They move once a round or once a tool call; between those, a push is the round being written (partial_round), the call in flight and the light fields. Over one long phase on the engine host (thirty rounds, 1 311 frames), each open tab is sent 5.9 MiB, against 185 MiB with every push whole. - A dropped push is noticed by the next one. The socket drops a slow tab’s
oldest envelope rather than stalling every other tab, and a delta frame, dropped, would
leave a tab wrong with nothing to say so. Every push names every version, so
the push after a dropped one names a version past the copy the tab holds,
and the tab asks for the seat’s calls whole (
live_call) rather than drawing the older copy as current. A field a push carries at a version older than the tab’s (a push overtaken by a snapshot or an answer) is not taken. The handshake snapshot,GET /agents, theagentanswer and thelive_callanswer always carry every field. - An answer is ordered against the pushes that overtake it. The
live_callanswer is computed on its own and can reach the tab after a later push, so it carries the seat’slive_call_seq, which the tab compares with the newest it has applied for the seat. An answer at or past it is merged like a push carrying everything. One BEHIND it describes each turn’s call before those pushes: where they cleared that call or began another, that call is dropped (so a stopped seat never shows the running call read just before its completion); when they are the same call, it still brings each heavy field it holds at a newer version than the tab’s, while the light fields stay the pushes’. If a push found the call behind while the answer was out, the tab asks again once that answer lands behind it, rather than waiting for a next push a frozen call never sends. Anagentspush whoselive_call_seqis behind an answer already applied leaves the calls as the answer had them, and its other fields still apply. - A version is never handed out twice, so “moved” and “newer” are one question. Counted per call, a call cleared and rebuilt under the same turn, phase and iteration would number its fields from one again, and a tab that missed the clearing push and the first after it would read every later push as older than its held copy, and keep that copy.
WS /ws/stream
Section titled “WS /ws/stream”Upgrades to a WebSocket. All frames are JSON envelopes of the form
{"kind": "...", "data": ..., "ts": "<iso8601>"}.
The socket is the dashboard’s channel for state, not for everything.
The projection arrives here as pushes, and every question the query
registry answers is asked and answered here too. REST carries
every write: through
/operator/act as the
principal the session resolves to, through /iam, or through
/config, /secrets, /setup and /backup (a write has to be
able to say whether it happened, and a frame into a dropped socket has no
answer), and the few guarded reads no query answers (GET /secrets,
GET /config/references, GET /setup/integrations and its passes), which
the dashboard reads through one loader
that re-reads when the session changes and honours a Retry-After. The
dashboard survives losing the socket by polling /stream/snapshot every
five seconds, or when a 503 it answers says, and not at all after one
with no Retry-After. Such a failure is easy
to miss: the page is simply always a few seconds
stale. internal/e2e closes that gap by replaying the frames a real server
produced through the dashboard’s own protocol module
(static/protocol/protocol.js, the same source its bundle contains), so
both halves of the protocol are checked against each other.
A kind a client does not know is ignored, never an error. A fleet part way through a rolling upgrade has a node pushing kinds an older bundle predates, so the dashboard drops such a frame and counts it (the same fall-through is what a kind this build’s engine sends and its own client forgot looks like), and the e2e replay fails on a non-zero count.
Who may open it, and what each reader receives. The handshake admits
every principal the guard resolves whose stage may act (the overview is
everybody’s) and refuses one whose stage may not 403 before the upgrade.
Every push kind is received only by a socket whose caller holds what that
kind’s question takes: event needs admin (it is an events row, carrying
every phase’s prompt and response); inbox_changed needs the watch of its
seat that was allowed (the room decides, as an artifact’s does) and the app of
the half that moved (worklet for a tracker frame, gitlet for a code
one, since each half of the inbox is listed only to a holder of its app); the eight
chat_* kinds need chatlet and a caller acting as a human seat (a socket whose
principal acts as no seat is shown no chat at all, a public room included), and
each chat frame then goes only to sockets whose seat may see its room
(chatlet.Visible); every other company kind is everybody’s. The agents, seats and executors
pushes carry a call’s and a run’s body only to a caller who may read that
seat’s (an administrator, or its lead), and to everybody else its status with
body_withheld: true (A status reader never receives a
transcript). The snapshot is
built for the same audience. When the socket’s credential is decided again and
it resolves somebody else (another login, another seat or none, other
permissions), or a published company moves which seats’ bodies the caller may
read, the socket closes 1013, and the reconnect’s handshake builds the
snapshot for the new audience while the client asks who it is again; see
Close codes.
Pushes
Section titled “Pushes”Server → client kinds:
kind | When | data |
|---|---|---|
snapshot | First envelope after the upgrade, and again on reconnect. | Same payload as GET /stream/snapshot. Agents carry their in-flight live_calls and live_call_seq, so a reconnect re-renders the live rows and restarts the calls’ ordering. |
event | Every engine event published to crewlet.events.>. | { id, type, timestamp, source, actor, summary, category, trace_id, span_id, parent_span_id, topic, agent_id?, channel_id?, payload }: a /events row plus the full payload (from which the snapshot feed’s failed flag derives). agent_id is the seat the event concerns and channel_id its agent-to-agent channel, filled by the rule that fills the store’s own column, so live rows narrow to a seat or channel as pages do. agent_phase_completed events carry the system prompt, response and tool calls, so LLM invocations stream live; agent_turn_progress events (per tool-call round, tagged turn_id / phase / iteration) stream the in-flight call before its phase record exists. |
agents | After an event moved agents, or a read did (a run record reconcile, or the seat-lease read of the five-second tick). | The changed agents’ overlays, each with agent_id, role, activity and stopped_reason: the result of the change, so a client merges rather than running its own state machine. Merge an overlay onto the roster row with the same agent_id; DROP one for a seat the roster lacks (a seat reaches the roster through the snapshot or a seats push, each already carrying its merged overlay). Each of its live_calls carries its heavy fields only when their versions moved since the last push for that call (paired by turn_id); keep the copy you hold of one left out. Every row carries the seat’s live_call_seq, an empty list included, which orders the calls against a live_call answer (see What the projection carries, and what the wire sends). |
seats | After anything changed the company (config activation, hire, move, removal). | The COMPLETE seat list, replacing what the client holds, each row with agent_id, current handle and role (name). Not folded into agents because a per-seat merge cannot express a seat’s deletion. |
executors | After an executor was launched in its box, asked a question, finished or was lost, and after a reconcile against the durable run record changed the set. | Every executor in flight. |
tokens | On the shared 5-second tick, when a spend record arrived or aged out of the live window since the last one (one aggregation per tick, not per phase). | The spend rollup, same shape as GET /tokens/breakdown. |
budget | After a node’s token meter report is applied (every node reports at start, every 15 seconds, and at once when a budget window first refuses a charge, a company that caps nothing included). | { meter_id, seq, timezone, org: { windows: [...] } }, the org-wide half: one entry per capped calendar window with span, spend, ceiling, refusal stamp and state. Per-seat figures ride on each agent’s overlay in the agents push. See the live token meter. |
org / tools / schedules | On the same edge as seats: every published company. | The new org tree / tool surface / schedule list, so open tabs stop showing vanished seats. |
health | Every 5s, from a single shared tick (one timer for all clients). | The whole health envelope, exactly what GET /health answers. There is no query for it. |
result | Reply to a client query that succeeded. | { id, what, data }; id echoes the request’s. |
error | Reply to a client query that could not be answered, a watch not installed, or an artifact_join refused or an artifact’s room withdrawn (what: "artifact_join", naming the artifact; see artifact_join below). | { id, what, error, reason?, grants?, role?, retry_after?, refusal?, detail? }; error is a code. See the rules below the table. |
pong | Reply to a client ping. | null |
inbox_changed | A committed batch of a domain that keeps a person’s notices (Worklet’s, Gitlet’s or the artifacts’) wrote the watched seat notices or took some away. Every node serving the API holds the estate (ingress requires data), so each pushes to its OWN sockets from its own applier after the commit. While a node’s own copy of a domain is out of service it stays in rotation and pushes the movements of a data node serving that domain, relayed over the broker, withholding its own applier’s for that domain alone. Every switch of a domain’s source sends each watched seat one frame naming that source with unread_delta: 0 and empty subject and reason, because what moved during the switch is not replayed: read the inbox again. A node falling behind the peer it follows does the same, keeping that domain’s movements for one round trip past its latest answer, at most 4 000. One frame per seat per batch. | { source, handle, unread_delta, subject, reason }, and the frame itself carries seat. Identifiers and a count, never content: source is the domain whose notices moved (tracker, code, artifacts); subject is the id of the object the newest notice was written on (always empty on an artifacts frame): the task for a task commit, the change for a record about a change, the PERSON for a prioritised notice (whose task Worklet’s notice names as task); reason is the reason it was routed under, in that domain’s vocabulary. Read the notices through the composed inbox question, which decides who may read each domain’s; work_inbox answers Worklet’s alone, so a client re-reading it on a code frame never sees the notice that moved. unread_delta is a hint (a redelivery the engine already collapsed may count twice), so re-ask rather than add it to a badge. Routed by seat, held to the half’s app: it reaches only clients whose watch for that seat was allowed (decided as the composed inbox question about that seat, with no app, since the halves are several apps’ news), and of those only a reader holding the app of the half that moved: worklet for a tracker frame, gitlet for a code one (ADR-0110). An artifacts frame needs no app and reaches every watcher, naming no subject: each comment notice is held to its artifact’s relation by the read, which a frame cannot decide. |
artifact_changed | A committed artifacts batch moved an artifact whose room this socket is in: a version published, its title, description, icon or a label, shares, assets, trash, restore, transfer, purge, its folder, or a comment thread. Each node pushes from its own applier; while its own copy is out of service it pushes a sound data node’s movements instead, relayed over the broker, and every switch of source pushes every room a reset, as for inbox_changed. | { artifact, what, head, position }, where what is version, meta, share, asset, trash, restore, purge, transfer, folder (filed in another folder; a folder’s removal, which re-files what it held, is not pushed per artifact), comment (a thread opened, a remark added, edited or removed, a thread resolved or reopened; it changes nothing about who may read, so the room is not decided again) or reset (this node cannot say which artifacts moved, or what moved across a switch of source: re-read; the room is decided again). A hint, never content: re-read through the questions that decide what you may see. |
artifact_data | A committed datastore batch changed documents of an artifact whose room this socket is in. Each data node pushes from its own applier after the commit, or from a sound data node’s while its own copy is out of service, as artifact_changed does. | { artifact, deltas?, keys?, reread?, schema?, resync?, gone?, through }. Shaped per reader: a document in an own_rows, editors or private collection goes only to the members its rule admits, by the role each member’s join decided; a batch a member may see none of is not pushed to them. Changed documents travel inline (deltas: collection, doc, version, deleted, body, read, created_by, updated_by, updated_at) while the frame stays within 64 KiB, otherwise as keys with reread: true. schema says collections changed; resync says this node’s pushes may have gaps, a switch of source among them (read whole); gone says the datastore was purged. through is the store’s version after the batch, the since of the next catch-up. |
artifact_presence | Who is in an artifact’s room changed: somebody joined, left, or moved what they do or look at, on this node or another. Coalesced to at most ten a second per room, each carrying at most ten new or changed members (longest-waiting first, the rest in following frames). | { artifact, upsert, leave, counts?, truncated }: the members now presented that are new or changed (session, seat, kind, activity, focus, at, and for an agent turn, the run of the turn whose tool call put it there), and the sessions no longer presented. Past 50 members a room presents the 50 most recently active with truncated: true and counts: { human, agent } of the rest, and returns to everybody below 40. Told, never stored: see Presence. |
chat_posted / chat_edited / chat_deleted / chat_reacted / chat_taken | A committed chat record put, rewrote, tombstoned or reacted to a message, or said on its receipt that a seat’s running turn took it. Sent only to sockets whose seat may read the room (see Chatlet), decided at the batch’s own position. | { channel_id, op, op_id, message_id, channel_seq, thread_root?, author, author_kind, at, position, excerpt?, mentions?, channel_name?, channel_kind? }: evidence that something landed, never the message. channel_seq is contiguous per room, so a client holding 41 and handed 43 reads 42; op_id is how a tab recognises its own gesture coming back. |
chat_room_changed / chat_membership_changed | A room was created, patched, given a horizon, erased or pruned; its membership was replaced. People a membership change took out of a private room are sent its chat_membership_changed too, though they may no longer read the room, so their rail lets it go without waiting for its next read; the frame names the room and the record and no member. A chat_room_changed naming no room (channel_id empty) is a GAP: this node switched the source of its chat batches or fell behind and dropped some, and the screen reads every room it holds again. | The same shape, the room’s own fields only. |
chat_cursor_moved | A person’s own read state moved (a flush, a mute, do-not-disturb) through any surface on any node: every node serving sockets watches the coordination record and pushes the change to that seat’s own sockets only. | { handle, cursors?, muted?, dnd_until?, updated_at?, revision }: the WHOLE state; keep the one with the highest revision, which the rail’s read carries too. |
chat_presence | Who is in the chat room this socket’s presence frame named (room: "chat") changed: somebody opened it, left, started or stopped typing, or a seat began or stopped working on an answer there, on this node or another. Also the room whole as the socket joins it, ahead of every later change. Only a socket whose seat may read the room is put in its presence, and a record that narrows the room takes out every socket whose seat no longer may. Coalesced as artifact_presence is. | { channel_id, roster?, upsert, leave, counts?, truncated }: with roster: true the room whole, replacing what was held (a roster naming nobody is the socket taken out of the room); otherwise the members now presented that are new or changed and the sessions no longer presented, in artifact_presence’s member shape. A person is viewing, or editing while they type (the engine puts it back to viewing six seconds after the last re-assert); a seat at work is an agent member, editing, with focus.thread the message its answer will land under (empty for the room), status the phrase the room shows and turn its run. Told, never stored, by the presence hub every room shares (ADR-0038). |
error frames
unauthorizedaddsreasonandgrants, as the REST envelope does: the rule that decided, and the grants any one of which would admit the caller (an EMPTY list means no grant would, because what is missing is a relation such as leading that person). On an artifact refused for a role below the verb’s need,roleis the role to ask the owner for.- A refusal on authority is worded by the authority table’s one mapping on every transport, so
code,reason,grantsandrolematch the same decision everywhere. A caller with no relation to an artifact getsnot_foundwith nothing beside it, as for an id nothing holds. - No question or watch is decided by a verb that asks a recent proof or needs a person present (a question registered that way is refused at node start, and the build checks the verbs an answer decides by inside itself). So a frame, and a query’s REST answer, is never
step_up_requiredortoken_refused: the socket cannot carry a step-up. - A watch refusal has no
idand nameswhat: "watch":unauthorized: the caller may not watch that seat (withreasonandgrants).unavailable: this node could not read the chart that decides it or the directory a login resolves through. Carriesretry_afteras a query’sunavailabledoes (same rule,0for a read no wait clears), never therefusalordetailbehind it, because what the directory says about a login names the seat it is bound to.not_found: a login names no record; onlyadminis ever told.
- Query codes:
unknown_query,unauthorized,not_found,bad_params,unavailable,artifact_trashed, the five revision codes (unreadable_revision,unsealed_revision,unreadable_fleet_revision,unsealed_fleet_revision,unknown_seal_revision, each with adetailnaming what fixes it, as/configanswers them), orquery_failedfor every other failure (the reason goes to the log, never the socket). artifact_trashedis notnot_found: it answers a question about the content of a trashed artifact (its datastore) asked by somebody it is disclosed to, the state its owner’s restore ends. REST twin: the artifacts routes’409 artifact_trashed. A reader with no relation getsnot_found.unknown_querycovers a surface this process does not have now: a question whose source is not wired here is never registered, and a Worklet or Doclet question on a node whose runtime does not run them answers the same. It is unknown rather than empty and never carries aRetry-After, because waiting cannot give the node a store it was not configured with. REST twin:404. Only a node’s FIRST revision on a native backend needs no restart: it builds Worklet and Doclet on a node that ran neither and is answered from then on (see Worklet and Doclet); a revision that switches a backend after that waits for restart, as A native backend changes at a restart says.unavailableis notquery_failed: the node understood the question and cannot answer it here (a projection still catching up after a restart or fresh join, an unreachable coordination store, no copy of the estate to answer from, or a state-log refusal). Worklet, Doclet and Chatlet are read through the estate router, so a copy out of service or a restarting data node is a holder to ask again, not a fault. The frame carriesretry_after(whole seconds before asking this node again),detail(a sentence for the reader: what happened and what to do, agreeing withretry_after, for every condition including an unanswering coordination store and no data node serving, in the words the act route and work surface use; the refusal’s own detail, which names positions and settings, goes to the answering node’s log) and, behind a state-log refusal,refusal(its code:behind,log_full,deferred,broker_refused, …). Aretry_afterof0is the answer, never an omission: waiting will not change it (a log at its byte ceiling, a record this node cannot decode, a barrier its broker refused), so ask another node or wait for an operator; see Read consistency. REST twin:503with the samedetailandrefusalin the body andRetry-Aftercarrying the hint, absent where it is zero.- A work, page, chat or search question on a node not yet handed a company is
unavailablewithrefusal: "no_active_revision", Worklet’s, Doclet’s and Chatlet’s one sentence asdetail, andretry_after: 15(the reconcile poll that brings the company). REST twin:503 no_active_revisionwith the same detail andRetry-After: 15, as every surface over those halves answers such a node. bad_paramsis notquery_failedeither, in the opposite direction: the node understood and refused the question (a parameter missing, malformed or outside the accepted set), so the fault is the caller’s and a retry repeats it. REST twin:400. It carriesdetail, the refusal’s own sentence naming the parameter to change and what it accepts (days is 91, and a spend window is 1 to 90 company days. Ask for at most 90), with no class name (not the engine’s, nor a finer one such astokens.ErrWindowLength, which a Go caller tests witherrors.Is) and no echo of the query’s name. The REST400body carries the samedetailbeside itserror.- A frame has ONE
detailkey:unavailable’s words,bad_params’s sentence or a revision refusal’s remedy. Every other code’s text stays in the node’s log, since a failure’s own text can carry a path. - The dashboard asks again after exactly a frame’s
retry_after(not at all after a0) and keeps no wait of its own, so this hint and a REST refusal’sRetry-Afterare its only retry clock.
Client frames
Section titled “Client frames”Client → server kinds:
kind | Purpose |
|---|---|
ping | Keepalive; server replies with pong. |
watch | Become a recipient for one seat’s seat-routed frames: { kind: "watch", seat }. An empty seat clears it (always allowed). One socket watches one seat at a time (a tab looks at one screen), so a second watch replaces the first. seat names a record as work_inbox’s handle does: a seat’s handle, either of your own names, or somebody’s login, resolved to the record their notices are kept under (the seat the identity directory binds them to), where the watch is installed because every inbox_changed frame for them is pushed to that name. It follows Whose record a personal question answers for to the letter, asking the directory only once the watch is decided as far as it can be without it. A login that names nobody answers not_found to admin and is refused like any other seat to everybody else. It is decided like work_inbox about the same seat, since it buys that seat’s inbox_changed frames: the seat’s own holder, whoever leads it through the chart, or admin, and worklet either way. Three answers, none closes the socket. Allowed installs the watch. Refused installs nothing, drops any watch the socket held, and replies error with unauthorized; not a 4403 close, because a client reads that as “this browser may not have the live channel at all”. Undecidable (this node could not read the chart, or the directory a login resolves through) installs nothing and replies unavailable with the retry_after that says when asking again can change the answer (0 where no wait will). Installing would hand a seat’s frames to somebody this node could not show was allowed them; refusing would tell a lead they lead nobody because the node is behind. Every time the socket’s credential is decided again by an identity record that names it, and on every published company (when a lead can move), the current watch is decided again: a refusal withdraws it and says so, and an undecidable answer keeps it, since nothing has been learned against a decision already made. A watch with nobody resolved behind it closes the socket with 4401. |
artifact_join | Enter an artifact’s room: { kind, id, artifact, since? }, where since is the through this tab last held. Decided like reading the artifact (get_artifact: the owner, a share naming you, your unit or the company, or leading the agent that owns it), three-valued, and no answer closes the socket. Allowed answers result with { artifact, session, role, roster, through, resync }: your session, your role, the room as this node’s sockets were last shown it with you in it (every later artifact_presence frame is the difference from that roster: replace the room with it, then apply each push), the datastore’s version, and resync: true when since is absent or older than the datastore can account for (read the collections whole), false when a catch-up from since suffices. Refused answers error with not_found and the artifact, in exactly the words an artifact nobody holds gets, or artifact_trashed for an artifact disclosed to you and in the trash, whose room carries nothing until its owner restores it. Undecidable answers unavailable with retry_after. A socket is in at most 8 rooms; a ninth is bad_params. The join is decided again on every decision of the socket’s credential and on every share, unshare, trash, transfer or purge of the artifact: a refusal withdraws the room with an error frame (what: "artifact_join", error: "not_found" or "artifact_trashed" for the trash, artifact, no id) on a socket that stays open, and a role that moved shapes the pushes after it. From the moment such a movement lands until its decision does, the room’s artifact_data pushes are held back, and a member the decision keeps is sent resync. An undecidable answer fails closed: the room stays joined (artifact_changed and artifact_presence keep flowing) but its artifact_data pushes stay held back, and the node asks again after a backoff (250 ms, doubling to at most 30 s, or the refusal’s own longer wait) until a decision lands, which resumes the room with resync or withdraws it. A room is never kept at its pre-withdrawal role on an answer nobody could vouch for. |
artifact_leave | Leave an artifact’s room: { kind, artifact }. No answer; leaving a room the socket is not in is not an error. A closing socket leaves every room it was in. |
presence | Say what you are doing in a room: { kind, room, … }, where room names the kind of room and so the field that names it. room: "artifact": { kind, room, artifact, activity, focus } in an artifact’s room you joined with artifact_join, where focus is { version?, region?, collection?, doc?, field? }. room: "chat": { kind, room, channel_id, activity, focus? } for the chat room this tab is looking at, and this frame IS the join: a tab looks at one chat room at a time, so naming a room takes the socket out of its previous one and into the named one once that room’s own visibility admits your seat (a room you may not read puts you in nobody’s presence and shows you nobody’s, with nothing said); an empty channel_id leaves. Send editing while your person types, re-asserted at least every six seconds, and viewing otherwise; focus.thread is the thread they type under. A tab re-sends it after every reconnect, since the new socket is in no room. activity is viewing, editing or idle. No answer. Who is doing it is never the frame’s to say: the room shows the seat your credential resolved to. At most ten a second per socket, whatever rooms they name; frames past that are dropped, as is a frame naming no kind this build keeps. |
query | Request one thing, answered with exactly one result or error frame: { kind, id, what, params, wait_ms }; id is any client-chosen value echoed back. wait_ms is how long the client waits once it sent the frame (the dashboard’s ten seconds; 90 seconds for a transcript page, executor_session, as long as a person’s read of a session can take: two transcripts at a time). Past it the node stops the question, ending any read it started and freeing what it holds, and sends nothing for it. A frame without it is answered for as long as the socket lasts; either is stopped at once by a query_cancel naming its id. There is no per-frame credential: every question is asked as the principal the handshake resolved (and each decision of the credential since), and decided by what it is registered under: the overview’s questions for everybody, an app’s for that app, admin’s for admin, a seat’s trail by audit.seat.read. Queries run concurrently with each other and with the push stream, so one database read cannot stall a tab’s live rows: at most four at a time per socket, a tab’s share of the node’s reader pool (whose floor is sized as two full dashboards at four each); a fifth waits on its own socket rather than in the pool the engine’s own reads share. |
query_cancel | Give up on a question still in flight: { kind, id }, the id its query frame named. The node stops it at once, ending any read it started (a transcript page’s included) and freeing what it holds, and sends nothing for it. No answer; naming a question already answered, or none, changes nothing. The dashboard sends it for a question a screen stops waiting for (left, or another session chosen). |
Queries
Section titled “Queries”Each query (what) is answered by the same function the matching
REST route calls, so the two surfaces cannot diverge:
what | params | Answers with |
|---|---|---|
agent | {id, history} | GET /agents/{id}: config, live state and llm_history. history=false answers the seat and its live state with an empty llm_history and no next, for a caller asking what a seat is doing rather than what it said: the finished calls’ payloads are whole transcripts |
live_call | {agent_id} | GET /query/live_call?agent_id=…. {agent_id, handle, live_calls, live_call_seq}: the seat’s calls in flight, one per turn it runs, each with every field and its versions, or live_calls: [] while it has none (a seat the projection has never seen included, at live_call_seq 0), and the seat’s live_call_seq beside it either way, which the tab orders the answer by against the pushes that may overtake it. Asked and answered by the seat’s AGENT ID, the key every overlay is merged by, and never by its name, which two seats may share; handle is a label. From the projection alone, so it costs what a push does — the REPAIR a tab makes when an agents push names a version of a heavy field newer than the copy it holds: the push that carried the field was dropped (see What the projection carries, and what the wire sends) |
agent_memory | {id, limit, skills_order} | GET /agents/{id}/memory. A seat’s trail, so it takes audit.seat.read — the seat’s lead, or admin. ANSWERED BY THE NODE HOLDING THE SEAT, which it names (held_by, or none with an empty answer for a seat no node holds; unavailable while the holder is silent or still taking the seat) — every node keeps a copy of a seat’s memory and only the holder keeps it current. Four collections, each a page (limit, at most 50; the episodes, skills and profiles also end at 1 MiB of text each, so a page can be shorter) with its counted total beside it: the diary (diary_total), the episodes (episodes_total), the synthesized skills (skills_total, newest drafted first, or in skills_order — uses, the most used first, or updated, the most recently changed — which the holder applies to the whole set BEFORE it cuts the page, so the page is the top of the set and never the newest page re-sorted; any other value is bad_params) and the COUNTERPARTY PROFILES (counterparties_total) — what this seat has learned about the colleagues it works with, both instants carried because last_updated_at moves on every interaction and last_corroborated_at only when the traits changed. traits is a bag whose keys the model invents, never a fixed schema. Plus latest_reflection (the newest live diary entry, whatever the page) and onboarded_at. An episode’s ask and plan_summary are their OPENINGS, at most 600 bytes each — the figure a seat is shown of a past turn’s words before they are condensed (learning.EpisodeAccountBytes) — with each whole text’s size in ask_bytes and plan_summary_bytes. The diary is keyed on the derived agent id and the other three on the seat’s handle; both are resolved from the one identifier a caller has, the handle. See the route |
agent_episode | {id, episode} | GET /agents/{id}/memory/episodes/{episode}. A seat’s trail, so it takes audit.seat.read, as agent_memory does. ONE EPISODE WHOLE — what the turn was asked and what it did, complete — answered by the seat’s holder as agent_memory is (held_by); episode: null for one the seat no longer holds. See the route |
memory_overview | {} | Decided per seat by audit.seat.read, as agent_memory is, and answered for exactly the seats the caller may read — every one for admin, a lead’s own agents for a lead, none for anybody else; a seat this node cannot decide makes the whole answer unavailable rather than a shorter list. Each seat’s memory totals — diary_total, episodes_total, skills_total, last_reflection_at and the latest_reflection itself — each counted by the node holding the seat, gathered in ONE scatter rather than a read per seat, with held_by per row (none for a seat no node holds, nothing counted), an unavailable reason on a row whose holder did not answer, and the fleet coverage. The seats the caller may read, handle order, no cap. See the section |
executor_sessions | {handle, cursor, limit, read_level, …} | GET /agents/{id}/sessions. The seat’s EXECUTOR SESSIONS, the latest begun first: a row per turn whose executor captured its harness’s session or that read its conversation, naming the sealed object in the fleet’s object store that holds the session its harness kept when its run ended — the whole record of what the run read, called and wrote — and how the turn ended. A seat’s trail, so it takes audit.seat.read — the seat, its lead or admin, the verb an executor’s tail is decided by — and an absent handle is the caller’s own seat. Read through the estate router, so any node answers, at the caller’s freshness (read_level; this surface’s own when absent). A page of limit rows (25 when absent, 100 at most) with next_cursor, the cursor of the page after it, absent on the last; read_level and position say how it was read, and complete: false that the answering copy holds a record of the log it could not read. Each row says which launch would continue it (continued_by: relaunch while its turn is live, next_turn once it has ended, next_fire once a fire of a schedule has), whether it would (continuable, null where that cannot be said now), where (continues_in: any_box or parked_box) and where not, why (not_continuable), the session its turn’s first launch was handed (base_turn), whether it is in progress (in_progress: its turn has not ended and its row names a kept session, with the engine’s sentence for one, in_progress_note) and the engine’s note on a session its turn went on past (kept_note: kept up to a session its turn went on past, or of a turn that was lost). See the route |
executor_session | {handle, turn_id, cursor, read_level, …} | GET /agents/{id}/sessions/{turn_id}. One turn’s session and a page of its TRANSCRIPT, its sealed object opened and read as its harness recorded it — entries of brief, note, late_call, wake, model, tool_call, tool_result, summary and unread — every entry’s text redacted at this read. Decided as executor_sessions is, and it shows more than the run’s live output did: every call’s input and each result’s text, to an entry’s bound. A page holds at most 200 entries and 1 MiB of text, each entry at most 16 KiB, and cut says why it ends where it does, next_cursor the cursor of the page after it, absent on the last; read_level, position and complete say how the session’s row was read. A node decodes at most two transcripts at once, and a question past them waits for a slot, nothing opened, for as long as its caller does. An object the store no longer holds, one that does not open, one that is no archive and one this build does not read are each an answer (state) with the engine’s sentence (why), never a failure. Its first page says of the row whether a launch would continue the session, and a later page leaves continuable null. A turn the seat keeps no row of is not_found: it recorded none, or its row went with the end of a later turn of its conversation that was handed it, past the retention, or with the seat. A session released while it is read is said as released, from its row read again: not_found, or state: none, each saying nothing more of it can be read. See the route |
event | {id} | GET /events/{id} — one event with its full payload, and node, the node that published it (every stored event carries it, not only this answer’s) |
events | {limit, type, source, category, trace_id, channel_id, seat, actor, agent, turn_id, work_key, work_item, suspended, failed, feed_only, since, until, before_id, before_time} | GET /events. feed_only=true selects the rows the activity feed carries — every stored type but the ones it keeps out (auxiliary_spend), a trace’s agent siblings included — and is what every read merged with the live feed asks; true, false or absent, any other word a 400. failed is THREE-VALUED the same way — true, false or absent, any other word a 400 — and selects by the rule every row’s own failed is stamped by: a stored failed tag, or a type that is itself a failure (llm_unavailable, budget_exhausted, turn.guard_breach, executor_failed). It is the event log’s “Failures only”, applied by the engine so the axis and every page are one set. suspended is THREE-VALUED — true, false or absent for every row, any other word a 400 — and selects by whether a completion record PARKED its turn on its executor in its box: a turn that parks and resumes writes two agent_turn_completed records, the first marked suspended, so type=agent_turn_completed&suspended=false is the turns that ENDED, one record each, and is what a turns axis counts over. trace_id selects one trace as a FILTER — paged, windowed and combinable with every other filter, where GET /events/trace/{trace_id} is the whole trace oldest first. channel_id selects one agent-to-agent conversation’s events, by the channel id every A2A event carries (an index seek, migration 0034). seat is a seat’s handle and selects the events that seat published, resolved on the server to the id every node derives for it — so a seat since removed from the chart still names its history, and a role name, which a rename changes, is never the key; anything that is not a handle, or a person’s seat’s handle, is a 400 — an empty page would read as a seat that never did anything — and before a company configuration is applied it is 503 unavailable, since the id is derived from the company’s name. agent is the broader question — the related filter: every event involving one agent seat, named by any handle it answers to and matched on its agent id, plus every event sharing a trace with one (see Paging the event history). turn_id selects ONE RUN of a turn; work_key selects every run of one unit of work — the attempts at a trigger that was redelivered; work_item selects every event on one work item — each turn’s start, its phases and completions, an executor it launched — named by the item’s identity across trackers, <backend>:<id> (native:<task id>, jira:<issue id>), never by its key, which a move rewrites. A value that is not that shape (a key such as ENG-4, or either half missing) is a 400 rather than an empty page, because an empty answer reads as “nothing happened on this item”. The filter reads the work_item COLUMN (migration 0033), filled from the same payload field as the row’s work_item tag. Every row answers with its own work_key read off the work_key COLUMN (migration 0029) rather than out of its tags — the column is what the work_key filter reads, so a row and the filter that matched it never disagree about its unit of work |
event_series | {bucket, since, until, type, source, category, trace_id, channel_id, seat, actor, agent, turn_id, work_key, work_item, suspended, failed, feed_only} | GET /events/series. Every bar carries failed beside count — how many of its rows reported a failure — and the answer a failed total beside total (see the event log’s time axis). THE SAME ROWS WITH A TIME AXIS, which a page of rows has no dimension for: a burst at four in the morning and a steady trickle across a week are the same hundred rows in the same column. A second question rather than a flag on the first, because the two answers have different shapes and one route returning either would make every caller branch on what came back — the same split tokens and token_series carry. Both halves compile their filters through ONE predicate in the store, so a bar can never claim rows the listing beside it would not show |
trace | {trace_id} | GET /events/trace/{trace_id}. Answers {trace_id, events, truncated}; truncated is true when the read stopped at the store’s per-trace cap (500) rather than at the end of the trace, which the caller must say — a trace shown short with no note reads as a complete causal chain that simply ends. It is counted, not inferred from the row count: a trace of exactly the cap holds every row it has, and len(rows) == cap would put a truncation warning on a complete one. Across a fleet the rows are every node’s oldest, merged, and they stop at the last row a node sent when that node holds more than it sent — its own read stopped at the cap, or its reply was cut to fit the transport — rather than show another node’s newer rows past the ones it did not send: such a view can hold fewer than 500 rows, and truncated says it is cut |
turns | {days, since, until, seat, model, work_key, work_item, server, tool, origin, failed, sort, before, limit} | GET /turns. Each row carries origin, WHAT STARTED THE TURN: {kind, id, reason}, where kind is chat_message (the message a person or a seat wrote, under the routing reason it reached the seat), work_item (the item’s key, under the tracker’s reason), schedule (the schedule’s name), colleague_ask (the colleague channel), code_change (the change a code notice is about, as the Gitlet screens name it, web!42, under the notice’s reason), delegated_request (the request a delegate was woken to decide, by its id, under its kind) or alarm (the alarm instance a wake is about, as the alarms page names it (its kind, and for a log’s alarm : and the log’s domain, log_headroom:code, or for a model entry’s or an MCP server’s : and its key, mcp_server_failing:github), under what it did: fired or cleared), read off the earliest record of the turn that names one and absent where none does; a work item’s origin is withheld from a reader without Worklet, a chat message’s from one without Chatlet and a change’s (code_change) from one without Gitlet, as work_item is; the turn keeps its place in the list. origin=<kind>:<id> narrows to the turns an object started or resumed, which is how “which turn did this message start” is asked (origin=chat_message:<message id>): every object a turn’s start named counts, so a turn that took in a burst of messages at once is found from each of them, while its row’s origin is the primary one, the latest message’s; it selects turns whole, as work_item= does, and an origin of an app the reader does not hold is refused naming it. The window is on the turn’s START: days back from now (default 7, at most 30), OR since (inclusive) and until (exclusive) as RFC 3339 instants (either alone is a one-sided window), which is what a bar in the past needs, since days counts back from now; naming both forms, or a since not before until, is 400. A turn is in the window when it STARTED there: one that began before since and ran on into the window is not listed, rather than listed from the window’s edge with half its tokens. seat is a seat’s handle and narrows to that seat’s turns, resolved on the server exactly as on events (and refused the same way); there is no role-name filter, because a role name is changed by a rename while the history keeps the old one. ONE ROW PER RUN of a turn (a wake, a decision, its rounds and its reply), which is the view of a working company that did not exist anywhere. A turn that broke before reaching outside the engine is redelivered, so one TRIGGER is legitimately several rows; each carries the work_key they share and work_key= narrows to every attempt at one (see a turn’s two identities). A turn is what this engine DOES and every other surface is a projection of one: the spend rollup groups them, the seat page shows one seat’s, an item’s history links to the ones that touched it, and none of them is a list of them. The dashboard faked one by paging the raw event feed sixty-one times and folding in the browser: slow, capped at whatever the caller gave up on, and wrong at the page boundary, where a turn straddling two pages appeared twice. The aggregates are over PROMOTED COLUMNS (migration 0015) rather than payloads; only the duration, the summary and the work item come from the completion records’ own payloads. summary is what the turn did, as its NEWEST completion says it (its last review’s account of what landed, or its final answer): a turn that parks completes once per segment, and an earlier segment’s account describes rounds the turn went on from. work_item is {backend, id, key, project}, the one item the turn was charged to, off the newest completion that names one (see which work a turn is on), and ABSENT for a turn on nothing, including one still running, since a sole write names its item only at the end. server= narrows to the turns that called one MCP server’s tools and tool= beside it to the turns that called that one tool (the name as it is offered, tool_prefix applied), read off the calls each turn states on the record that ends it, so a turn is listed under a tool once it has ended; tool= without server= is 400, since two servers can offer one name. work_item= narrows to the turns on one item, by the same <backend>:<id> identity /events takes (and the same 400 for anything else); it selects TURNS rather than rows, so a turn is listed whole (every phase and every segment folded) when any of its records names the item. There is no task_id on a row: the key it read was declared on the completion and never set, and task_id elsewhere means a delegated worker’s task or a schedule fire’s run, never a tracker item. A turn whose executor launched in its box PARKS: the segment that launched it publishes a completion with suspended: true, and the same turn completes again when the launch is collected, so one turn can hold several completion records and “a completion exists” is not “the turn ended”. The NEWEST completion decides: complete is true when it is not a suspension, and parked when it is, so the two are never both true; a turn with neither is running or died mid-flight. An executor_failed also counts as an end. It is an executor’s launch that was LOST, and nothing resumes the turn that was parked on it, so a list reading completions alone called that turn parked for good. The newest end still decides: a launch lost while it was still launching is followed by its turn’s own completion. A turn a PERSON stopped (a pause with stop_running reached it at a round, or ended the executor it was parked on) ends with a completion of its own, carrying stopped: such a row is complete, reads stopped: true, and is not failed for the stop (an executor_stopped is not a failure by type). duration_ms is the turn’s OWN measurement (the SUM of every segment’s, so the wait for the executor between them is not counted), which is not the span of its events either: the span covers the reflection pass that publishes afterwards. A turn’s tokens are its COST: its phases’, its executor’s launches’ (executor_collected, where its run’s tokens are) and its in-turn auxiliary_spend records’ (its turn-start context, its ledgers’ rewrites, its card), never the reflection after it, whose records carry the turn’s id, so the Turn screen can draw them, and which is the seat’s learning rather than what the work cost; sort=-tokens ranks by the same sum, and model= selects over the same rows: a turn is listed for a model one of its phases or in-turn calls ran on (exactly what its models names) and never for one only its reflection used. cache_read_tokens and cache_write_tokens are that cost’s prompt-cache counts (migrations 0032, 0040), a breakdown of input_tokens rather than an addition to total_tokens. failed is THREE-VALUED and absent means every turn, because folding it into false would hide every failing turn from an unparameterised list, and a turn counts as failed when ANY of its events carried a failure OR was a failure BY ITS TYPE (llm_unavailable, budget_exhausted, turn.guard_breach, executor_failed), which is the same rule /events applies to a row. The second half is what a turn the engine killed BETWEEN phases leaves behind (a refused charge, an exhausted chain, a breached guard), so reading the failure flag alone reported those as clean turns with no completion record, which is indistinguishable from a turn still running. A failed turn says WHY on its row: error and error_kind are the message and class of the record that ended it, the turn’s own agent_turn_completed first, then any other failed record (a failed phase, a provider chain that ran out, whose last_error is read, or a failure by its type, whose kind is that type), and both are absent for a turn that carried no failure, including one a person stopped. They are read by whoever may read the row, so a lead reads why their agent’s turn failed without the administrator’s event log. The rows are newest first by where each turn is listed, and the higher turn_id first within one microsecond, so the order is total. The cursor is on the TURN (a keyset on any one event pages a turn twice), and it is OPAQUE: next is a token, and before takes exactly the next a page answered (anything else is 400 bad_params, an RFC 3339 instant included). It is opaque because the position is not a row’s own fields: it is where the page’s last turn is LISTED, which is not always its started_at (see Reading the fleet’s history), and that turn’s id, without which two turns starting at one microsecond either side of a page’s cut were one position and the one past the cut was on no page; and it can stand on an empty page, which has no row to build one from. Where /events and phases echo before_time/before_id, the position IS the last row’s key. next is present only while more turns lie past the page: null on the last one, which is how a reader paging a seat’s record knows the walk has ended rather than offering “older” onto an empty page. sort is -started (the default, newest first) or -tokens (the most total tokens first, the spend screen’s drill-down per turn); anything else is 400 naming both. Read from EVERY data node and merged, with a coverage; see Reading the fleet’s history |
turn | {turn_id} | Every event of ONE RUN of a turn, oldest first, payloads included — each phase, the turn’s own completion, and the fallbacks and guard breaches that happened inside it. Not a slice of the trace: one trace can span several turns and one turn several traces. Answers {turn_id, origin, events, truncated}; origin is what started the turn, as the turns row names it (null where no record names one), and truncated is true when the read stopped at the store’s per-turn cap (500 rows, or 4 MiB of their text on one node) rather than at the end of the turn. A cut answer is the turn’s opening and its ending, not its opening alone: a turn is read oldest first, so a head-only read would drop agent_turn_completed and turn_completed — the two records a reader takes the outcome, the duration and the plan summary from — and a turn cut at the cap would be indistinguishable from one that never finished. The last rows are recovered beside the first (up to 32 more, within half those 4 MiB, the opening cut to the rest; merged on the store’s own identity, (event_time, event_id), so the two reads cannot overlap into duplicates — the id alone is not unique, and a narrower key would drop a row the two reads legitimately both carry and then report a gap over a page holding the whole turn), so what truncated names is a gap in the middle — and it is counted, not inferred from the row count, because a turn between the cap and the cap plus thirty-two ends up whole on the page and must not carry a truncation warning. Across a fleet the opening stops, as trace’s rows do, at the last opening row of a node holding rows it sent in neither half, so it never shows a row past a gap it does not report. It also answers work_key and attempts: the unit of work this run was an attempt at, and every run of it the store holds, OLDEST FIRST — over the SAME thirty-day horizon the events above come from, not the turns list’s own default week, and read at the same instant they were, so a turn between eight and thirty days old, or one whose rows sit at the very edge of the horizon, names its attempts rather than reporting none while displaying one — so the screen a deep link lands on can say “attempt 2 of 2” and link the other, rather than leaving a reader to conclude the company did the work twice. One element is the ordinary case; an empty work_key means the trigger had none to collapse on, and attempts is then empty too. And nodes: where it RAN — the nodes that PUBLISHED any of this turn’s events, read off the rows (every event carries the node that published it as node), sorted, and an empty list rather than an absent key where no node this read could reach holds any. Not the nodes in coverage: a turn run on a node without the data role is held by the data node keeping its events in custody, which never ran it |
phases | {seat, limit, before_time, before_id} | The company’s agent_phase_completed records and its executor_collected ones — each launch of an executor’s run, which is no phase but the work of the execute round that launched it — newest first, payloads included, keyset-paged; each node reads a page of each type and merges them, so a page holds both, within 4 MiB of its records’ text: a type whose read stopped there ends the node’s page at its last row, so the merge skips no record. seat is a seat’s handle and narrows to that one seat’s phases, resolved on the server exactly as on events (and refused the same way) — never a role name, which two unit seats stamped from one template share, so a role filter answered one seat’s phases with every such seat’s. events?type=agent_phase_completed is not a substitute: the event listing deliberately never selects the payload, and a phase record without one has no prompts, no response, no tool calls and no decision. next is present only while more records lie past the page — each node’s read asks one row past it rather than guessing from a page that filled, so a history exactly a page long ends without offering “older” onto nothing |
tokens | {days, since, until, previous, seat} | GET /tokens/breakdown. With no parameters, the live 24-hour window from the projection; with any, whole company days from the replicated usage domain — every data node’s, up to 90 days, within the 181-day horizon (see Token Spend Breakdown) |
token_series | {days, since, until, previous, seat, group, bucket, groups} | GET /tokens/series. THE SAME SPEND WITH A TIME AXIS, which the breakdown has no dimension for: every one of its rows is a sum over the whole window, so a runaway loop, a spike and a quiet weekend are the same number. A second question rather than a flag on the first, because the two answers have different shapes and one route returning either would make every caller branch on what came back. Bucketed by the ENGINE, by company day or ISO week from the usage domain. An unknown group or bucket is refused naming what is accepted, never defaulted: a chart legended by one dimension over another’s bands is worse than an error. By unit, each band of by_group carries parts: the seats that spent in that unit over the window, biggest first, each {group, handle, ...bucket} keyed as group=seat keys a band, and summing to the band, so a team’s bar can be split by seat from the same answer. Every other grouping, and the residual row that folds several units, carries none |
turn_outcomes | {days, since, until, previous, seat} | GET /tokens/turn-outcomes. Spend › Overview’s turns that changed nothing: per agent and wake reason, started turns and their tokens, and those that committed nothing (no work moved and no words written) apart. Read from the turn ledger’s replicated rows; a held wake is never counted as a turn. Everybody’s, as the spend is |
seat_activity | {seat?, days?, previous?} | GET /agents/activity. Every seat’s TURNS over the days (1 to 90, default 7) company days ending today, summed across every data node from the replicated usage domain — so the answer is the same on whichever node is asked and still counts a node that has left. {since, until, days, previous_since?, previous_until?, seats, quantile_resolution}; each seat is {handle, role, agent_id, in_chart, turns, failed, reviewed, first_pass, first_pass_pct?, sent_back, p50_ms?, p90_ms?, tokens, changes_opened, reviews_given, findings_received, checks_failed, ejections, per_day, last_turn_at?, previous?}. changes_opened and reviews_given are the changes the seat opened and the reviews it gave on Gitlet, findings_received the findings reviews raised on the changes it owns, whoever reviewed them, checks_failed the checks that failed its changes’ heads and ejections its changes’ ejections from a merge queue (Budgets and spend § A seat’s changes and reviews). first_pass_pct is first_pass over REVIEWED turns (0–100) and is ABSENT when none was reviewed — a 0% for a seat nobody reviewed would be a verdict nobody gave. sent_back counts reviews that sent work back. p50_ms and p90_ms are read from the merged turn-duration histogram and are within quantile_resolution (0.06) of the true value; absent when no turn ended. per_day is every day of the window, oldest first, a quiet day included as zeros. previous (with previous=true) is the seat’s {turns, failed, reviewed, first_pass, sent_back, tokens, changes_opened, reviews_given, findings_received, checks_failed, ejections, per_day} over the same number of days before, per_day being every one of those days, oldest first — so a profile draws the fortnight its week-on-week figure is made over from this one answer. Every AGENT seat of the current chart has a row, a quiet one with zeros (“took no turns” is a measurement); a seat that has left the chart appears with in_chart: false while its days are in the window; a human seat has none. seat= narrows to one handle, and a handle with no rows answers one row of zeros rather than none; a human seat’s handle is refused (bad_params, naming the person), because the engine runs no turns for a person and a zero row would say one took none. Ordered by handle |
schedule_runs | {scope_type, scope_id, name, limit} | GET /schedules/{scope_type}/{scope_id}/{name}/runs. ONE schedule’s fires and what became of each, newest first, fifty to a page, read from the replicated usage history (every data node’s fires, kept 181 days; see GET /schedules for each run’s fields and outcomes). Registered on every node that reads the usage domain. scope_id is the scope’s IDENTITY (a seat’s agent id, a unit’s key), which is what a schedules row carries and what the dispatch ledger keys a fire on: hand back what that row gave you rather than the handle beside it. schedules.recent_runs is the COMPANY’s fifty most recent fires across every schedule, so twenty hourly ones fill it in two and a half hours, so “did the standup fire this week” was unanswerable while every row of the answer sat in the table. The identity is all THREE parts and each is required: two units may each declare a standup, and a role and a unit may both, so a name alone merges two teams’ histories. truncated says older fires are past this page (the read takes one row more than the page to know), so a schedule that has fired exactly fifty times is not called cut |
schedules | {} | GET /schedules |
fleet_broker | {} | GET /fleet/broker: what every live node advertises about its broker, the metadata group as a member reports it, and where the two disagree. Takes admin. See below |
delegated_decisions | {day} | GET /delegated-decisions: the rules, the limits, a day’s digest, the week’s spot-checks and flagged denials. Takes admin, or a person a rule names in escalate_to |
delegated_repositories | {} | GET /delegated-decisions/repositories: the company’s GitHub repositories a rule’s required checks can name. Takes admin |
delegated_branches | {repo} | GET /delegated-decisions/branches: one repository’s branches. Takes admin |
delegated_checks | {repo, branch} | GET /delegated-decisions/checks: the check names on a branch’s newest commit. Takes admin |
growth_changes | {product, cursor, limit} | GET /growth/changes: what agents changed on the company’s growth accounts. Takes admin |
advisor_access | {seat, access} | GET /advisor/access: the grant change an access request would make. Takes admin |
go_live_review | {} | GET /advisor/review: Settings › Advisor’s go-live review, each agent’s access as its next turn is told it. Takes admin |
advisor_findings | {state, severity, area, class, cursor, limit} | GET /advisor/findings: a page of the Advisor’s findings. Takes admin |
advisor_finding | {id} | GET /advisor/findings/{id}: one finding with its history and earlier episodes. Takes admin |
advisor_run | {} | GET /advisor/runs/latest: the latest run. Takes admin |
advisor_notices | {} | GET /advisor/notices: the platform notices in the Inbox’s Needs you. Takes admin. An alarm is said whether or not the Advisor’s list could be read |
advisor_reports | {cursor, limit} | GET /advisor/reports: a page of the Advisor’s weekly reports. Takes admin |
advisor_report | {week} | GET /advisor/reports/{week}: one week’s report. Takes admin |
advisor_snapshot | {range} | GET /advisor/snapshot: the company’s stats and charts over the range. Takes admin |
advisor_capacity | {range} | GET /advisor/capacity: the hours each model entry was out on its usage limit, per company day, with the seats it held. Takes admin |
issue_reports | {} | GET /diagnostics/issue-reports: Settings › Diagnostics. Takes admin. A store that cannot be read raises rather than answering an empty list |
diagnostics_insights | {} | GET /diagnostics/insights: Settings › Diagnostics. Takes admin. A store that cannot be read raises rather than answering an empty list |
backups | {} | GET /backups: each node’s newest backup, each log’s newest acknowledgement and the backup history, the Settings › Backups & retention screen. Takes admin. See below |
mcp_servers_status | {} | GET /mcp-servers: each MCP server’s condition and its per-node counts, the Servers tab of Settings › MCP & tools, the built-in tools by group, and (to an administrator) the MCP alarms standing on the answering node with the gesture that fixes each, and each agent’s MCP tools against the tool budget. Everybody’s, in two readings. See below |
limits | {} | The caps the engine holds the company’s work to, as it ENFORCES them: {limits: [{key, group, unit, value, default, off, default_off, settable, range}]}, in drawing order. key is the setting’s path in the company document (turn_engine.max_iterations, turn_engine.onboarding_max_tool_rounds, turn_engine.extension_round_step, turn_engine.delegation_depth_limit, turn_engine.executor_min_budget_tokens, the eight turn_engine.delegation.* caps (max_turns_ceiling, the most a worker template may ask for, and min_tokens_per_task among them), notification_rate_limit, notification_coalesce_max_batch, and schedules.timeout_seconds, the timeout every schedule takes unless it sets its own), then the settings other screens change in place: inbox.retention_days, atlas.refresh_interval_seconds, code.scratch.idle_days, code.scratch.max_per_seat and chat.chatlet.message_retention_days; group is turn, delegation, notifications or schedules for the caps Settings › Limits draws, and inbox, atlas, code or chat for the screen that draws the rest (delegated is the group of the rows delegated_decisions answers, never this question’s); unit is count, seconds, fraction, per_second or days. value is what the applied company holds, which is the default wherever the document says nothing, and default is the engine’s own, so a screen draws both and never keeps a copy of a default. There is no “was it written” flag, because the applied company does not remember. off marks a value that switches its limit off: a notification_rate_limit of 0 (no limit), an onboarding_max_tool_rounds of 0 (no onboarding pass), an executor_min_budget_tokens or min_tokens_per_task of 0 (no floor), and a message_retention_days of 0 (messages kept for ever). default_off asks the same of default, so a screen saying which default a set value replaced says Off where the default is no limit. settable says whether key is a setting of the company document, which a PATCH /config of that path changes: true for every row but schedules.timeout_seconds, a constant of the engine’s that each schedule overrides for itself. range is what the engine’s validator admits for key, {min, min_exclusive, max, or_zero} in the row’s own unit (or_zero admits 0 apart from min to max, as the message horizon’s 0, or 30 to 3650 days) (a fraction as a share of one, seconds in seconds), read from the same declaration the validator holds the document to, so a screen says a value outside it before it sends anything; on every settable row, omitted on the constant. Empty on a node running no company. Takes admin, as the config question it is read beside does |
settings | {} | The company’s settings that are not numbers, as the engine APPLIES them: {settings: [{key, group, kind, value, default, set, off, has_off}]}, in drawing order, each answered only where the company runs what it configures. key is the setting’s path in the company document: timezone (group company, kind zone), code.identity_domain (group code, kind text, where Gitlet hosts code), and knowledge.root_space and knowledge.skills_container (kind container), knowledge.scope (kind containers) and knowledge.vectors (kind switch), group knowledge, where a knowledge base runs. value is what the engine applies, its default applied: a string, a list of strings or a boolean, by kind. default is what it applies where the document writes nothing, as derived for this company (search by meaning follows whether providers.embeddings is set). set says whether the document writes key, which these settings remember. off marks a value that switches the setting off (an empty skills container is no tool skills), and has_off says the setting has such an Off of its own, distinct from its default. No rule is carried: a change is checked by PATCH /config?dry_run=true, whose refusal says each problem in a person’s words (said). Empty on a node running no company. Takes admin, as limits does |
sign_in_policy | {} | How the company’s people sign in, as THIS node enforces it (ADR-0152): {node, policy, limits, settings, second_factor_setting}. settings are the company document’s numeric sign_in values as limits rows (sign_in.min_password_length, session_lifetime_seconds, idle_timeout_seconds, step_up_seconds), each range narrowed to this node’s limits and marked operator_min or operator_max where the limit is what bounds it, and second_factor_setting is sign_in.require_second_factor as a settings switch row; limits is this node’s api.auth.limits with its defaults (second_factor, min_password_length, max_session_lifetime_seconds, max_idle_timeout_seconds, max_step_up_seconds); policy is what this node enforces (second_factor, min_password_length, session_absolute_seconds, session_idle_seconds, step_up_seconds), the company’s values held within its limits. node names the node, since limits are each node’s own. Takes admin. The two values a sign-in form needs before anybody has signed in are also on the unguarded /auth/config |
fleet | {} | GET /fleet: leases move with no event to push, so Settings › Nodes polls this rather than waiting for one. Takes admin. A lease table that could not be read answers unavailable, which is a blip to ask again about rather than a fault (the REST twin answers 503 with a Retry-After) |
executors | {audience?} | GET /executors: unknown_query on a company with no sandbox configured, and unavailable when the fleet’s run record could not be read. Each run carries work_item ({backend, id, key, project}, or null), the item the launching turn was charged to, and launch_id, the job the row holds now — what executor_tail is asked by |
executor_tail | {turn_id, launch_id, epoch?, after?, digest?} | GET /executors/{turn_id}/tail?launch_id=…[&epoch=…&after=…&digest=…]. What ONE running launch of an executor has said so far, read from its box by the node that launched it (launch_node), the one node that can reach it, whoever holds the seat now (see Watching a run live). Both ids are required (bad_params otherwise): a turn can launch its executor more than once, and the launch id is the one executor_launched and the launch’s own record carry. Answers {outcome, turn_id, launch_id, node?, status?, output?}: outcome is tail with output; launching for a launch whose box is still being made (not stopped — ask again); not_running with the record’s status (awaiting_clarification, resumed, reseed, replaced for a launch a later one replaced, or absent where no record is left); host_silent naming the node that did not answer inside the 2 s fleet read budget — the box’s launching node, held or not, a draining node or one whose heartbeat lapsed included; box_paused for a running record whose box is paused where its backend cannot read it without waking it (a peek never wakes a box); or box_gone for a running record whose box its backend says is gone for good (its root did not outlive its node), which nothing more is read from: its waiter records the launch lost and its round is carried on in a fresh launch (see Durability), so the record moves on (not stopped yet: ask again). The asker says what it holds — epoch, after (the byte offset it holds through: a whole number of zero or more, bad_params otherwise — a fraction is refused rather than rounded) and digest, all three absent for one holding nothing yet — and output is {text, source: transcript|stderr|none, cut, as_of, finished, epoch, start, end, digest, reset, front, held}, redacted — epoch, start, end and digest on every answer, 0 included (a launch that has settled nothing yet is answered at end: 0 and followed from start: 0): text is what follows after (start = after), or on reset: true the last 256 KiB in whole lines, which replaces what the asker held (start says where it begins; cut that earlier output exists). Send end and digest back as the next after and digest. front says that node’s reading began after the launch’s own start; held counts bytes written but not shown until their redaction is settled. What a harness prints is its seat’s trail, so the tail is read by an admin and by the lead of the seat the executor’s record names (audit.seat.read) and refused to anybody else naming admin — and a caller who leads nobody is refused before the record is read, so a record that could not be read, or a box that node could not read, is an error only to somebody it could have admitted. A box its host couldn’t read is answered by what clears it, never in the runtime’s words: unavailable with a Retry-After where a wait does (a runtime that didn’t answer, a host that couldn’t answer just now), unavailable with none for a sandbox setup, and query_failed for a fault of the node that hosts the box, whose log has the detail (sandbox_tail_failed; this surface’s own line about the answer is a debug trace). There is no event and no row: the dashboard asks it every 3 s for each running launch it is showing — an open launch span on a turn’s timeline, a parked turn’s Executor card, and the executor’s own page — and nothing outside the dashboard asks |
executor_browser | {turn_id, launch_id} | GET /executors/{turn_id}/browser?launch_id=…. What state ONE launch’s browser is in, judged from the run’s record and, only where the record says the launch runs with a browser whose screen leaves its box, asked of the node holding the seat, which takes no lease and sends no frame; one node’s reads of a launch share one ask, and its answer, for 10 s. Both ids are required, launch_id a UUID (bad_params otherwise). Answers {v, turn_id, launch_id, outcome, status, node, floor, browser, running, checkin, relay_seen, watchers, watchers_more}, every flag and number sent: outcome is ready while the hub on the seat’s holder has heard the box’s relay in the last 30 s or, never having heard it, for 30 s from its start; launching for a launch still starting; not_running with the record’s status (replaced for a launch a later one replaced, ended for a run whose ending is decided, whatever status its record still holds, empty where no record is left); no_browser for a job whose record names none; withheld, with the record’s browser.reason and browser.cause; live_view_unavailable for a ready browser below Chromium floor; box_paused while the record keeps the box: paused, held by a park on a question, or claimed by the run’s collection, which reads it and then pauses it (the claim of a job lost with a box nothing reads again keeps none, and is not_running, resumed); owner_silent naming the node holding the seat that did not answer inside the 2 s fleet read budget, answered busy or runs another build (empty where nothing holds the seat or its lease could not be read, so no node was asked); or helper_silent past ready’s 30 s, or where the holder serves no screen for the job. browser is the record’s {state, reason, cause, chromium, chromium_major, build, sandbox, outdated}, null where it names none; running (running, restarting, crashed_out, or empty), checkin ({connected, supervisor, since}, null before the relay checked in) and relay_seen (null before the relay is heard) are the holder’s, each instant by its clock, and watchers names who watches, each {name, you}, at most 64 and watchers_more past them. No word of the page: no tab, title or address, which only a watch’s stream carries. Decided as a watch is, by executors.browser.watch on the run’s seat: its lead or admin, a person’s alone, and a caller who leads nobody is refused before the record is read. The dashboard asks it on a run’s page for a job with a browser, unless the run’s body is withheld from its reader: every 20 s while the job starts or runs, and once otherwise |
budgets | {} | GET /budgets |
a2a_channels | {} | The fleet’s agent-to-agent authorization record: who asked whom, how many messages crossed, and when. available: false when this node could not reach the coordination store — which is not the same as no channels having been opened |
knowledge | {q, mode?} | The company’s own knowledge search, run live through the same knowledge.Searcher seam a seat’s own search_knowledge tool uses. Searched as the ORG with no seat, so it applies the engine’s own account and nothing more: searching as a named seat would let a dashboard reader read, through that seat’s credential, material their own account may not have. Registered whenever a company is active, NOT only when a searcher exists: “this company has no knowledge backend” is a fact the company establishes on its own, and it is a far more useful answer than an unknown query. Everybody may ask it, and what it searches is the caller’s apps’: it searches pages only for a caller holding doclet, so a caller holding worklet alone is answered with no hits, available: false and reason: no_access (and the searcher is never asked), while a caller holding neither app is refused unauthorized naming both. available: false covers all five of no access, no company, no backend, a backend wired with no org-wide read scope, and a node whose index is still building. reason (no_access / no_company / no_backend / no_scope / building, empty when the search ran) is the value to branch on and note is the prose for a person: a screen picking which remedy to offer must not string-match the note, nor infer the state from an empty backend, which means “no backend” and “no company” alike. The no_scope note names knowledge.scope, because an operator whose integration is correct must not be sent to re-check it. A search that RAN and fell short says so in its outcome rather than its note (which is empty whenever available is true): served_mode empty with coverage.complete false is a backend that did not answer, and a partial coverage is part of the corpus unsearched. An EMPTY q is the seam’s PROBE: nothing runs and nothing is read, no hits are returned, but modes and (for the mode asked) the degraded its CONFIGURATION decides are answered, so a screen offers the modes honestly before anybody types (the dashboard asks the probe for semantic, the mode whose reason names what is missing). A transient reason (embedding_failed) is a property of a search and is never predicted. mode is hybrid (the default), keyword or semantic; the screen’s label for the last is “Meaning”, and any other value is refused rather than run as the default. A q past 400 bytes (trimmed) is refused bad_params, naming its size and the limit, rather than cut: the bound every search surface shares (Search). Every answer carries what the search actually did: mode (resolved), served_mode (the ranking the hits came from; "" when nothing ran), modes (what this backend can serve as asked: [keyword] with no embeddings provider and on Confluence), degraded (no_embeddings / embedding_failed / semantic_partial / unsupported, empty when it served what was asked) and coverage{nodes:[{id,answered,error}], complete, buckets_missing}, the fleet the scan was divided across, which is how a partial answer is told from a short corpus. A hybrid search with nothing to rank by meaning serves its keyword half; a semantic one serves nothing and says why. See Search |
colleague | {q} | A NAME TO A SEAT, through the same four tiers an agent’s lookup_colleague and a2a_ask resolve through (internal/agent/colleague): exact handle, chat id and role name, then case and separators folded, then part of a name, then a close spelling — each tier answering only when every tier above it found nothing, so a name that is exactly somebody’s handle is never diluted by near misses. Answers {match, candidates[{handle, why}]}: match is the one seat the text names when EXACTLY ONE does and null otherwise — including when several do, which is a list for a person to choose from and never a pick — and candidates is every seat it could name, best tier first (the match included; empty when nothing matched, which reads differently from ambiguity). why is the tier in a person’s words (“handle matches exactly”, “part of the name matches”). The chat-id tier needs a credential: a seat’s contact identities are operator-gated configuration, so an anonymous caller resolves over handles and names alone. q is at most 200 bytes — a name, not the sentence around it. The command palette’s assign and ask pickers read it. Registered whenever a company is active |
integrations | {} | GET /integrations |
link_hosts | {} | GET /link-hosts. {hosts: [{kind, url, owners?}]}, kind one of github, gitlab, mattermost, jira, confluence; owners only on github and gitlab; an empty list when no company is active |
work_items | {container, status, status_group, assignee, reporter, watcher, collaborator, tag, type, priority, parent, root, q, key, references, linked_page, removed, blocked, blocking, has_dependencies, has_open_asks, flag, asked_of, asked_by, subtasks, show_closed, closed_since, f.<slug>, view, preset, group_by, group_by2, group, subgroup, group_limit, totals, sort, fields, around, cursor, limit, …} | GET /worklet. container is the scope: workspace, or project:ENG (a bare ENG works too, and the key is upper-cased because the column is); any other <kind>: (unit:eng, person:ana) is REFUSED, because a task lives in the workspace or a project and a team’s or a person’s work is unit= or assignee= (read as a project key, unit:eng answered an empty board), and an ABSENT container is neither: the engine refuses to default it, because an omitted key would otherwise be the most expensive query in the system. Every list key is comma-separated, because a socket frame’s JSON object cannot carry a repeated key and a filter only one transport can express is exactly the divergence this channel exists to prevent; status and assignee also take ! negation (assignee=!ana is the work ana does not hold, assignee=!none the work somebody does). There is no open flag: open and closed are STATUS GROUPS (not_started, active, done, closed), which is the level every rule in Worklet is written at. f.<slug>=<value> filters on a custom field, resolved against the company’s catalogue by slug, id or label, and compared on the column its DECLARED TYPE says, so f.effort=gt:9 is a numeric comparison and not a lexical one; the seventeen operators are eq, ne, lt, lte, gt, gte, contains, startswith, in, range, any, all, not_any, not_all, me, null and not_null; and which of them a field admits is a property of its TYPE, so eq on a labels field is REFUSED naming any, all, not_any and not_all rather than compiling to a clause that matches nothing and reads as “no task has this label”. null and not_null are on every type, because “is this set” is a question about the ROW. A bare value is the type’s NATURAL comparison: any on a set, because naming a value is not claiming the set IS it, and eq everywhere else. A set operator takes a comma-separated list (any:api,ui, at most 16) and range takes both ends (range:3..8), because a range with one end is gte or lte. A value whose text begins <scheme>:// is a VALUE rather than an operator call, so a url field can be filtered by what it holds; anything else before a colon is carried through as an operator, so a typo is refused naming the set rather than silently answered. f.<slug>=me is resolved to the reader by the SURFACE before the query is parsed, which is what makes one saved view mean whoever opens it. A ref nothing resolves is REFUSED naming it. unit= and routing_unit= name a team by its key or by its NAME where exactly one unit carries it, in any case, and each resolves through the chart and matches the work filed under the team’s key or its name, whichever the reference was spelled as. A team the chart does not have matches nothing rather than refusing, because a task’s filed unit is a record of what was true and may name a team since dissolved. q= is a FIND rather than a search: a substring of a key (from the front) or a title (anywhere), which is what finds the item somebody half remembers; there is no mode, because this grammar has no ranker and ranked search over what the work says is work_search’s. A q longer than the longest title (256 bytes) is refused naming the bound, because it can match nothing and an empty board reads as “there is no such item”. key=ENG-1,ENG-7 narrows to keys a caller already holds (upper-cased, like container= and references=, because a key is what somebody pasted and the column it is compared against is minted upper-case), and removed=true is the TRASH: the only way to list what a removal hid, which is what a restore is a gesture about. references=ENG-12 lists the tasks whose DESCRIPTION mentions that key (a task’s former key resolves like its current one; a comment’s mentions are not references), and linked_page=<page id> the tasks that name that knowledge-base page through linked_pages. A parameter this grammar does not read is REFUSED naming it, never ignored: a filter nobody parsed is a board showing more than the person asked for, silently. An unknown status or group is refused naming the closed set rather than matching nothing. A custom field VALUE is checked against its own declaration at the write and refused naming the rule, never rounded or coerced to fit; see the coercion table in the Worklet guide. flag= is the ATTENTION queue and its values OR: cycle, too_deep, inconsistent_project and key_collision are facts about a task’s own row, and one_sided and one_sided_final are about a DEPENDENCY of it: an authored waiting_on whose blocker does not list it, and one whose mirror was refused permanently (the blocker is gone, was removed, or is full). The first is what the tracker duty repairs 30 seconds on; the second is what a person resolves. asked_of= is whose answer an open ask is waiting on and asked_by= whose question it is (the work a person is WAITING on), each a record owner’s name: a person’s seat, and the login of a credential bound to none, which is the name every ask they put is authored under whichever surface they put it from. inconsistent_project marks a subtask filed in another project from its root, which the writer refuses and the applier flags rather than stall on if a record carries it anyway. key_collision marks a task holding a key another task claimed first (which is what a key counter restored beside newer work mints), and the key goes on opening the claimant on every node, so the flagged task is reached by its id; purging the claimant hands the key to the remaining holder with the lowest id. Every row this API lists an item in SAYS SO, because a row is what a link, a peek or a composed call is built from and one carrying the key alone opens the claimant: a row here and a work_my_work row carry key_collision, as do a work_search hit, a work_item answer (beside blocked) and each of its links; a work_activity record and a work_inbox notice carry subject_key_collision beside subject_key (a notice’s id to open by is its task, since a prioritised notice’s subject is a person); a work_my_work checklist item carries task_key_collision beside task_key. The rule a reader applies is one sentence: open a row by its key unless the flag is set, and then by its id; and an ask’s answer_with already follows it. A notice’s flag is asked of the key the notice STORED rather than read off the task, because a duplicate moved since answers to a new key while the one its notice carries still opens the claimant. They OR because an attention queue asks “is anything wrong with this”, and a conjunction over six flags answers nothing on every company. totals=<column>:<op> adds aggregates over the WHOLE matched set rather than the page: a number that changed as somebody scrolled would be the one thing a header must not do. The seven ops are sum, avg, min, max, count, median and p90. median and p90 are ORDER STATISTICS by nearest rank (the value at position ⌈p·n⌉ of the set’s values in ascending order), so each answers a value some task actually holds: the median of four values is the second, never an average of two. The columns are the summable ones (points, estimate_min, the spend_* family (spend_workers and spend_sent_back included), reassignments, reopens, depth), the date columns for the four order statistics min/max/median/p90 only (a sum of dates is a number of microseconds nobody meant), tasks:count, and f.<slug> for a declared number or date field. A total with nothing to add up is ABSENT rather than zero: “nothing is estimated” and “everything is estimated at nothing” are different facts. subtasks= is how a tree is filtered: collapsed (the default) and expanded filter ROOT tasks and let their subtrees ride along unfiltered (so a todo root brings its done subtask), while separate filters every task on its own. With removed=true the unit is the REMOVAL rather than the tree: each removal is filtered on the task it was made on and what it took rides along, which is what a restore of that task brings back, so a subtask removed on its own is listed as a removal of its own. And a task whose root (in the trash, whose removal) is on the other side of the trash (a subtask left live under a parent removed alone, or one still in the trash after its removal’s root came back) is filtered on its own, as the root of what is left. The first two answer the same SET and differ only in how a caller renders it. Asking for a subtree with parent= or root= turns the mode off, because those are questions about subtasks and filtering their roots would answer the parent’s siblings. any=[{…},{…}] is one level of disjunction, ANDed with the top-level keys: a branch is a PREDICATE, so it may not carry the keys that decide the answer’s own shape (removed, archived, show_closed, closed_since, subtasks, fields, around) or how fresh it must be (read_level, max_lag_seconds, max_lag_seq, min_position): those are the same decision at every branch or they are incoherent, and a branch that carried one would narrow what was asked for at the top level rather than widening it. An empty branch is refused, because it matches every task and makes the others decoration. view=<id> and preset=<name> are loaded FIRST and every explicit key overrides them: a saved view is a set of defaults rather than a lock, so somebody who opens a board and picks another assignee gets the view with that one key changed. A view beats a preset (somebody saved it) and what was typed beats both. The five presets are my_queue, priorities, triage, blocked and overdue. my_queue is what can I pick up: a DISJUNCTION of the work the viewer holds and the work in their OWN project nobody holds, open and unblocked, most important first: both arms matter, because written as “assigned to me” alone a seat with an empty queue reads the company as having nothing for it while its project’s unclaimed backlog sits there, and the second arm is scoped to their project because unscoped it offers every unassigned task in the company, so a viewer with no project of their own, a seat whose unit files none or a caller the directory binds to no seat, has no second arm and picks up what they hold. priorities is the viewer’s own ordered list, open tasks only, IN THE ORDER somebody arranged it: that order is the answer, so nothing sorts over it, and a finished task drops out of the answer without the list being rewritten. triage is the unassigned open work, which with one fixed status set is the honest definition of “needs somebody to decide”. my_queue and priorities are the CALLER’s own (there is no parameter naming whose, because a question about somebody’s queue asked on their behalf is the owner-or-lead rule’s, not a filter’s), read under their own record, which for a caller bound to no seat is their login; a caller the engine can name nothing for is refused both, because a list with nobody’s name on it is everybody’s. A view= nothing resolves is REFUSED, never answered as the whole board. group_by= turns the answer into a BOARD: groups replaces rows (returning both would be the same rows twice), and each column carries its own count over the whole set beside a bounded slice of its rows (group_limit, default 20, max 100). The axes are status, status_group, assignee, priority, type, tag, project, unit, routing_unit, parent, due:day, due:week, start:week, due:bucket and f.<slug> for a custom field; anything else is REFUSED naming the key rather than answered ungrouped. unit and routing_unit group on the TEAM rather than on the stored string, for the reason unit= matches both the team’s key and its name: grouping on the column drew a team whose rows hold both as two columns (both headed with its name), with its counts split between them. The expression folds every spelling onto the unit’s key, and group= is folded the same way, so group=eng and group=Engineering load the one column. A stored unit the chart no longer has keeps its own column under the literal its rows hold, since folding it into anything would invent a home for work whose team is gone. A grouped answer mints no cursor, because across a set of columns there is no single order to be after; group=<value> is how a board loads one column further, and it narrows the WHOLE query, so the hint and the totals describe that column too. group_by2= adds swimlanes inside each column and subgroup= names one: a swimlane board is bounded by its CELLS rather than by either axis alone, because the work it costs is the PRODUCT of the two, so asking for lanes lowers the column cap and subgroups_dropped says how many lanes a column has beyond it. A group_by= over the WHOLE COMPANY is refused when the query’s own narrowed predicate still matches more than 20 000 tasks: a board is drawn by sorting every one of them, and the refusal names the ceiling and what narrows it. It is a bounded COUNT rather than a check for the presence of a filter key, deliberately: status_group=not_started,active is a filter and narrows nothing, so a gate spelled “needs a narrowing filter” is one a caller clears in a single attempt without making the query any cheaper. Scoping to one project with container=project:<key> lifts it, because there the input is an index range whose width is one project’s own size. An absent value is its own labelled column (“nobody is assigned” is a question a board answers rather than a row it hides), and group= with no value is how that column is loaded one further, because a key named and left empty asks for the rows with no value where an absent key asks for all of them. group_by=due:bucket is the one axis that is not a stored value: it is WHEN the work is due, read against the query’s own day: overdue (still open and past it), earlier (finished, and past it; work delivered late is not overdue and calling it so would be a false claim, so it is its own band and is empty unless show_closed brings finished work into the answer), today, this_week (through the end of the current Monday-anchored week, which is the week due=range:sow..eow means), later, and the empty key for a task with no due date. Its six headings read Overdue, Earlier, Today, This week, Later and No due date. The day it cuts on is the COMPANY’s midnight in the company’s own zone (the same instant the row’s overdue flag is derived from and the same one every due= filter compiles against), so the bands, the flag and the filters cannot disagree about a task. A band cut in the reader’s own browser could and did: for anybody whose local day differs from the company’s, a task landed under Earlier on a row the same answer flagged as due today and not overdue. A CLOSED axis (status, status_group, priority and the due:bucket bands) carries every column the query itself admits, the empty ones at count: 0 with rows: [], in the declared order: a board is the shape of the process rather than of this week’s rows, so an open-work board draws To do, In progress and In review whether or not anything is in them, and never Done, which the query excluded, because “nothing is done” said about a set that was never asked is a claim rather than an absence. The admission is the predicate’s own (status, status!, status_group, show_closed, the overdue alias, due= for the bands, and group= down to one column, where a key NAMED AND LEFT EMPTY admits the undated band on due:bucket and nothing at all on the three whose values are never empty). An OPEN axis (assignee, tag, type, a field) carries only the values present, since every seat as an empty column is a roster rather than a board, and the second axis is never filled. group_by=tag is the one axis where a task is on several columns at once; the answer sets groups_overlap so a reader knows the counts do not sum to total_hint, and groups_dropped says how many columns did not fit. sort= takes rank, updated, due, start, priority, created, title, estimate, points, spend_tokens, reopens, status_entered, removed, key, status, assignee and type, each reversible with a leading -; spend_tokens is the column’s own name, as a total’s is, since spend on a row is an object of five. The last four order by what a value means rather than how it is spelled: key by the key’s project and then its number as a number (ENG-9 before ENG-10); status in the order a board draws the six (To do, In progress, In review, Done, Cancelled, Closed); type in the company’s catalogue order (the builtins, then the declared types in the order they were declared), with a type the catalogue no longer declares last in both directions; and assignee by the seat’s name in the org chart, in the Unicode Collation Algorithm’s root collation (CLDR root, so “Émile” sorts beside “Emma” and a letter’s case or accent orders only names otherwise equal), then a handle the chart no longer holds, by handle, then the unassigned, the last two last in both directions. The seats’ order is kept on the data nodes by every configuration apply, as the projects the chart names are, so assignee reads each row’s place with one indexed lookup and a page costs what a page of sort=title does however large the chart is; the type order is bounded by the catalogue’s 64 declared types. An order built from the catalogue or the chart changes when either is edited, so a cursor minted before the edit is refused as bad_params, as is one this listing did not mint or one minted for another sort=, and the caller starts again from the first page: the dashboard’s list does so on that refusal and says why. The numeric filters estimate=, points= and spend_tokens= take lt:, lte:, gt:, gte:, range:a..b, null or not_null. closed_since=<date token> is the open work PLUS what finished (done or cancelled) at or after that date, resolved on the COMPANY’s clock through the same calendar as due=: closed_since=sow begins at the company’s Monday midnight, so a Done lane on it is this week’s work and empties itself when the week ends; it is the Board’s Recent scope, and naming it beside show_closed is refused because both say which finished work is in the answer. fields=tags,dependents_count,open_asks,spend puts a board card’s facts on each row, and only when asked: tags (sorted, [] when none), dependents_count (live tasks waiting on it through the authored waiting_on edges blocking= reads), open_asks (unanswered questions, by the same test has_open_asks= makes) and spend: {tokens, turns, workers, sent_back, reopens}, each present, 0 included, when asked, and absent otherwise, because the same row is what a seat reads through list_work_items, which never asks for them even through a saved view that does; an unknown name is refused. around=<task> (a key, a former key or an id) adds around: {position, prev, next, total_hint, total_capped?}: where that task sits in this answer’s DRAWING order over the whole answer rather than the page: a flat answer’s own sort, or a board read column by column (and lane by lane within a column) in the answer’s column order with each column’s rows in the row order, so the card after the last one in a column is the first in the next. prev/next are keys, null at the ends; on a label board the order counts cards and a task is placed at its first column; position is null past the 10 000 a count stops at. A task the answer does not hold answers around: null (never a refusal), and a saved view cannot carry around. A priorities= answer is paged in the list’s own order: the whole list (at most 32) is read each page and its cursor is a place in the list. An absent value sorts LAST in both directions: “soonest first” and “latest first” are both questions about values, and a task with no due date is the answer to neither, so sort=due puts the undated at the end rather than ahead of the one due tomorrow, and a cursor resumes in the same place the order put it. sort=f.<slug> orders by a custom field, LEFT-joined so a task that set no value still appears: a sort that also filtered would be two things the caller asked for once, and such a task sorts last by the same rule. The answer carries total_hint (capped: an exact total over an unbounded set turns a poll into a scan), next_cursor, totals, groups, and an echo of the view/preset it was expanded from (these answers travel detached from their requests, so a board restored from a URL can still say which saved view it is showing), plus the coverage half below. Every row carries flow, why an item in progress is or is not moving ({state, cause, since, until, reason}, null on any other item; see the Worklet guide), read inside the page’s own statement, and the answer carries flow_live, false on a node whose live projection is not seeded, where no row reads a turn on it or a seat’s stop |
work_item | {id} | GET /worklet/{id}: key or id, and the id is how a task flagged key_collision is reached, since its key opens the task that claimed it first. Answers {task, comments, comments_cursor?, history, flow_history, links, parent?, fields, units, blocked, key_collision?, due_standing?, keys, reassignment_budget, flow, flow_live} plus the same coverage half. key_collision is on the ANSWER for blocked’s reason (it is the applier’s derived column rather than a field of the record), and each link carries its other end’s. due_standing is where the due date stands on the COMPANY’s calendar, {days, overdue?}: whole calendar days from the company’s today to the due day (negative once it has passed, counted on the day labels so a DST day is still one day), and overdue for open work whose due instant is before the company’s midnight, the same predicate as a board row’s overdue, and is absent for a task with no due date, so a task page never re-derives either from the reader’s own clock. task.spend is the item’s running totals as its turns added them, read from the counters the turns wrote, never from the create’s copy in the document. parent names the item this one is filed under ({id, key, title, status, key_collision?}, read in the same transaction), and is absent for a top-level item and for a parent this node holds no row for. comments is the newest page of the thread and comments_cursor the page before it, which work_comments reads. reassignment_budget is how many times agents may hand the item on before the engine refuses the next hand-off (the limit task.reassignments counts against, served so no screen carries a figure of its own), and each history row carries reassignments, the item’s hand-off count AS THAT CHANGE LEFT IT (absent on a row the answering node holds no count for); an assignment made with a reason shows the reason as that row’s excerpt. units is the task’s two unit references RESOLVED against the org chart ({filed: {key, name, resolved}, routing: {…}}, the same shape a project row’s unit carries), because what the document holds is the unit’s KEY, the id the org chart gives it: a word chosen so that a rename moves nothing, and therefore a word nobody reads. The document’s own filed_unit / routing_unit are untouched beside it: they are the record, and key repeats exactly what they hold, so a filter link built from it reaches the same rows. resolved: false is the finding “this names a team the chart no longer has”, and it is ABSENT for a task filed into no team at all, because that is what its two empty strings already say. blocked is on the ANSWER rather than on task because it is DERIVED: an open dependency edge, computed in the same transaction as the task, so the badge here and the badge on the board row cannot disagree; links say what the relations are, not whether any blocker is still open. fields are the task’s CUSTOM fields resolved against the company’s catalogue (each carrying its declared name, type and whether its declaration was archived), because a stored choice is an option’s UUID and a panel rendering the raw value would print it under a heading. keys names the tasks this answer’s history POINTS AT, id to item key: the same map work_activity carries, resolved by the same walk, and present only when history was asked for. A delta names the other end of a relation by its ID because a key is a fact about another task’s row, so without this map the item’s own History tab rendered a re-parent as Parent: 1d573f85-… → 50a01576-… while the company-wide log rendered the same commit as Parent: — → ENG-1. An id this node holds no row for is simply ABSENT, so a renderer falls back to the id. An atlas_entry link’s other end is the id of an atlas entry the task touches, with no key, title or status: its name is the atlas’s to give (atlas_named). A reader without the atlas permission is handed none of them, on links and on the task’s own relations alike, and entries_withheld says how many there are, 0 where it left none out; a history row’s atlas_entry delta is the count before and after, never an id. flow_history is the item’s recorded flow, newest first by at and capped as history is: each change of its flow state and each notice of one, {id, task, state, cause, since, until, seat, notice, told, backfilled, past?, at, log_seq}, where notice is the role a notice told told in (assignee or lead) and empty on a change of state, and at dates it: the instant the flow duty recorded it, or, on a change the backfill derived from the item’s past (backfilled: true), the instant that past gives, which past: {at, seats} repeats beside whether the seats’ retained events were read there (seats: false: only the item’s own history and turns were). A backfilled change is published long after the past it records, so log_seq orders only the changes the duty recorded among history, and at orders every row; working time is not there (it is the turns’, work_item_turns). flow is the item’s flow at the read’s instant, the board row’s expression over the one row, and null for an item not in progress; flow_live is the board’s |
work_catalogue | {archived} | GET /worklet/catalogue. Answers {types, declared_types, fields, policy_version, types_version, fields_version} plus the coverage half. declared_types is the company’s own declarations, archived ones included whatever archived asked: what a write of types replaces, so a writer sends back exactly these with its change. policy_version moves on every fields edit and is what a task’s policy stamp records having validated against; a types edit does not move it, because the two are separate objects on separate subjects so an unrelated edit never invalidates every task’s stamp |
work_projects | {q, unit, archived, sort, limit} | GET /worklet/projects. task_counts ({todo, active, done, closed}) is read from tracker_projects.open_count/active_count/done_count/closed_count (todo being the unfinished work less the started part), MAINTAINED by the task apply whenever a status group changes or a task enters, leaves or is removed, never aggregated per poll, which over every task in every project is what a sixty-second refresh used to cost. last_change ({at, actor, actor_kind}) is maintained on the same row and by the same apply, from the commit that writes the project’s own history row: it is the HEAD OF THAT PROJECT’S ACTIVITY FEED, so the two never disagree: a turn’s spend, a board re-order and an edit to the project’s own settings write no such row and do not move it. It is OMITTED for a project no work has ever been filed into, because “nothing yet” is a different answer from any instant. unit.resolved is a FIELD rather than an absence: “this project names a unit the chart no longer has” is a finding, and an absent unit would be indistinguishable from a project that names none. archived and sort are both CLOSED SETS the engine owns, and both act on the whole company rather than on the page: the answer is capped at 200 rows, so a caller that widened and then narrowed found no archived row at all once the live projects filled the page, and a caller that re-sorted the page ranked the first two hundred keys rather than the company. total counts the SELECTED set, which is what makes “N of M” readable on every one of them, and it IS census[archived], computed from the one aggregate rather than a second COUNT(*), so the number printed beside the rows cannot disagree with the counts printed on the control that chose them. The census is what a SEGMENTED screen needs and cannot derive: on the live segment the archived count has no row on screen to be derived from, so without it an empty answer could not tell a company with no projects from one that has archived every one of them |
work_project | {key, for_type} | GET /worklet/projects/{key}. A SET read, not a point read: its shape is dominated by aggregates over task rows (the counts), so it carries complete/incomplete under the same contract every set answer takes, and its closure is the project’s container plus both catalogues. It carries the listing’s task_counts, target_date and last_change too, read from the same row so the directory and the project’s own page cannot disagree. shadowed names the workspace field ids this project redeclares, which is what a field in the middle of a move between scopes looks like. own_fields is the project’s own declarations exactly as stored, archived ones included (the whole set write_project{fields} replaces), where fields is the effective set a task files against; archived_tags lists the labels that take no new work, which tags leaves out; stuck_after_hours is how long an item in progress here may go unchanged before its flow reads stuck, the lead’s setting or the default of 8, and stuck_after_hours_set says the lead set it |
work_workload | {unit, read_level, …} | GET /worklet/workload. Who is carrying how much, for everybody at once. It counts OPEN work (every task assigned to somebody, whatever its dates), because “who is carrying the most” is a question about a whole queue. Both measures a company may size in are carried rather than one chosen, since which is used differs by team and an answer that picked one would be wrong for everybody sizing in the other. Beside them it carries blocked, overdue and unscheduled, because a person whose whole queue is blocked has a different problem from one who is simply busy; overdue is cut on the company’s own midnight, the day work_items and work_my_work cut on. Each row also counts its items in progress by flow state, flow: {working, blocked, waiting, held, due, stuck, moving}, and load, the ones that want the seat now (working + moving + due + stuck): an item parked until a later start, blocked or held is open work and no load. Both are read by the expression every row’s flow is, inside the one grouped statement, and flow_live says whether it read the seats’ live facts. Ordered heaviest first and capped, with truncated when the cap was reached. unit= narrows to the people whose open work sits in projects that unit owns, named by the unit’s key or by its name, in any case |
work_flow | {bucket, points, project, read_level, …} | GET /worklet/flow. The company’s work as a SERIES: points windows (1–90, default 14) of a bucket (day, the default, or week) on the company’s clock, oldest first, the last the window now falls in. Each point is {window, start, end, not_started, active, done, closed, completed}: the census at the window’s END (at now for the current one) and how many changes in it took a task from not delivered to delivered (a cancellation is not one; done → closed is not a second). Replayed BACKWARD from today’s census over tracker_history (status, create, remove, restore, purge and project moves, through the partial index replicated migration 0029 adds), so the cost is the window’s changes, not the company’s history. now is {not_started, active, blocked, overdue} (overdue cut on the company’s midnight), and blocked_history is always false: nothing records when a task became blocked, so no blocked series is drawn from a guess. project= narrows to one project, following a task to where it was at each instant |
work_item_turns | {id, cursor?, limit?, read_level, …} | GET /worklet/turns. One page of the agent TURNS charged to an item, newest first: {item, key, turns, next_cursor?} plus the coverage half. Each turn is {turn_id, ordinal, seat, trigger?, segments, tokens, cache_read, rounds, wall_ms, workers?, sent_back?, outcome, phases, failed_in?, summary?, review?, tools?, at}: a turn’s SEGMENTS folded into one (a turn that parked on its executor is charged once per segment): tokens, rounds and wall time summed, phases in the order each first ran, and outcome, summary (what it did, in the agent’s words) and review (what the newest review that sent the work back asked for) off its newest segment; tools is each tool its executor called with its calls. failed_in names the phase that failed when outcome is failed because one did (phases lists every phase that ran, the failed one included), and is absent for a failure outside every phase and on a turn that did not fail. ordinal is “Turn n”: the position of the turn’s counted segment among every counted segment on the item, so the newest turn’s ordinal is the item’s spend.turns; a turn with no counted segment on this item (more of a turn charged to another) has 0. at is when the newest segment landed. Read from Worklet’s own turn rows (the account spend sums), so it answers on any node and outlives the thirty days a node keeps its event history, where turns?work_item= reads the event history. next_cursor is the position of the oldest turn’s first segment; the next page is the turns whose first segment is below it, so a turn that gains a segment while you page never moves between pages. limit defaults to 20 and is held to 50; a cursor this endpoint did not hand out is bad_params |
work_comments | {item, cursor?, limit?, thread?, with_root?, read_level, …} | GET /worklet/comments. One page of an item’s THREAD, newest page first and each page in the order it was written: {item, key, title, comments, next_cursor?, key_collision?} plus the coverage half. next_cursor reads the page before and is absent when this page reaches the first comment; it continues from work_item’s own comments_cursor exactly, since both are the same read, and a cursor that is not one of the two is refused as bad_params rather than read as the end of the thread. limit defaults to the detail’s 20 and is held to 50. thread names a comment and narrows every page to its conversation: the comments replying to it and the answers to it when it is an ask, with the comment itself only when with_root is true. Narrowed in the read rather than by the caller, so next_cursor is present only when that conversation goes back further: a page of the whole thread kept to one question’s replies carried the task’s cursor, and a question nobody had replied to offered earlier replies. Each comment’s author is who wrote it (a person as their seat, beside author_kind), so a pane draws a name with no second lookup. key_collision says the item’s key opens another task, as on work_item. Its own question beside work_item because nothing followed that cursor, so every comment older than the twentieth was unreachable, and because a pane that draws a conversation wants the thread without the history, links and fields a detail assembles |
decisions | {handle?, limit?, read_level, …} | GET /worklet/decisions. What waits on ONE PERSON’s decision: the open asks put to them (to their own record, a person’s seat) and the executors parked on a question put to them (awaiting_clarification or reseed), newest first, at most 50, or at most limit (1 to 50). {handle, items: [{kind: "ask"|"run", at, ask?, run?, access_changed?, put_to_you, may_answer, needs_you}], more, total, answerable, capped, oldest_at?}: more says something lies past this page (an item limit left out, or an open ask past the 50 the tracker reads), so a caller reading a smaller page knows it is one; on the caller’s own record the items also include the parked runs the caller may answer that are put to somebody else (a delegate, a colleague), each saying where it stands for the caller as the run’s row does; total counts, not the page, what waits on the person (the asks and runs put to them, and on their own record the runs they may answer that their delegates escalated or left past the deadline), and answerable the rest of what they may answer; access_changed ({lines}) is set on a question an agent raised before a change to its access that it has not finished reviewing, and is absent once the turn told the change ends, or for a change undone before it was told; lines is the change worded about the agent for a caller who holds setup.read, and empty for everybody else (ADR-0111); capped says the ask count stopped at the engine’s ceiling, so total is a floor; oldest_at is when the longest-waiting began. An ask is work_my_work’s asked_of_me row and a run is executors’ row. The same scope rule as work_my_work: absent is the caller’s own record, and a named one is resolved first (a login to the record its holder’s work is kept under) and then takes whoever leads them, or admin. Your own asks need no app at all, so a person without worklet still sees what they were asked. On a company that does not run Worklet (Jira, or none), the asks are left out and the parked runs are still answered, with no read_level or complete beside them, since no tracker was read |
references | {refs} | The socket only. Which of the references a page draws the caller may open: refs is at most 100 <kind>:<id> (work_item:ENG-287, code_change:web!42), and {references, unresolved} answers each one the caller may open as {kind, id, title} and each this node could not settle (an outage, not a refusal) by its <kind>:<id>. Each is asked of the question its object’s own page asks (work_item, code_change, code_commit, code_repo, page, artifact, turn, schedules, a2a_channels, colleague, chat_channel), as the caller, so a reference grants nothing; one the caller may not open and one that is gone are both absent and never told apart. An unknown kind or a list past 100 is 400 bad_params (What a line names) |
research_page | {url, from?} | GET /research/page. One part of a public web page, fetched by the engine: https on port 443 only, GET with no cookie or credential, at most five redirects, each to a public https address, the address checked as every outbound call’s is (never a private, loopback or link-local one), at most 2 MiB in 15 seconds, and kept ten minutes on the node that read it. {url, host, title, text, from, next?, length, read_at, links}: text is at most 12 KiB of the page’s readable text from byte from, ending at a line, next is where the next part starts, absent at the end, and links are up to 40 of the page’s own links as absolute https addresses. An address that is not public https, or a page that is not text, is 400 bad_params; a site that does not answer is 503 unavailable. Ask Crewlet reads a page only at an address its turn saw from the person, a search, a page’s links or an API answer, never one its model wrote |
research_search | {q} | GET /research/search. A web search through Ask Crewlet’s search run of its own model: the harness’s web search and no other tool, handed the query alone. {query, results: [{title, url}], tokens}: at most eight results, taken from the search tool’s own results and never from the model’s prose, and the tokens the run spent, which the turn that asked is charged. Answered only through Ask Crewlet’s grant (403 at the keyboard). A query of 1 to 200 characters; a model whose harness has no search-only run, or a query out of bounds, is 400 bad_params; a run that fails is 503 unavailable |
answered_decisions | {handle?, read_level, …} | GET /worklet/decisions/answered. What ONE PERSON decided lately: the asks put to them and closed in the last seven days (worklet.AnsweredWindow), by them or by somebody else, or resolved without an answer, newest closing first, at most 50. {handle, items: [{at, ask, answer, followed_up?}], since, truncated, read_level, complete}: ask is the row decisions listed while it was open, with open: false and no answer_with; answer is {by, by_kind?, at, comment?, choice?, body, resolved?, withdrawn?}, where by is whoever closed it (not always the person asked), choice the option chosen by id and body the answer’s words, and a question its asker withdrew reads resolved with withdrawn {reason, reason_comment, replaced_by?: {item?, url?}}, the asker’s reason and what now covers it; followed_up is the asker’s first record on the task after the commit that closed the ask ({at, kind, excerpt?, fields?, comment_id?}, work_activity’s fields), absent while there is none, and left out for a reader the tracker shows no task to, since it is the task’s record rather than the question’s. An executor’s question is listed only for the person who answered it (ADR-0068), never for the rest of the people it was put to: it is listed beside them as {at, run, answer}, with no ask and no followed_up: run is {turn_id, launch_id, agent_handle, question, question_context?, decision?, asked_at, work_item?} and answer is the same shape, read from the executor_answered record the fleet’s event log keeps, found by who answered it (answers the run took, given by that person, shown to whoever reads the run’s seat trail and to the person who answered). since is the start of the window and truncated says it held more than the page. The same scope rule as decisions, and the same answer without the app: your own are listed whether or not you hold worklet. A company that does not run Worklet is answered its run questions alone, with no read_level. Served from the index replicated migration 0052 adds, one person’s closed asks |
company_feed | {kinds, actor, limit, cursor, read_level, …} | GET /feed. What the company DID, newest first: completed, created and handoff from Worklet, page (created or saved) from Doclet, and schedule fires from the usage domain, never a chat message, which is conversation rather than something the company did and is readable only where its room is. kinds is a comma list, empty for every kind this node keeps; asking for one it keeps no source for is bad_params. A kind is kept only where the company runs its half: a company on Jira keeps no Worklet kinds and a company on Confluence no page kind, and the feed answers the kinds it does keep (the schedule runs on every company), never refusing whole for the half it leaves out. Which halves a company runs is the org answer’s services. limit is 1–50 (default 20). {rows: [{kind, at, work?, page?, schedule?}], next_cursor?, complete, read_level}. A Worklet row carries its task’s key and title, and, by kind, the task’s running spend ({tokens, turns}, tokens only) and first_pass (no reviewer sent it back), the create’s origin ({surface, conversation}: the chat surface the filing turn was woken on), or the hand-off’s from, to, reassignments and reassignment_budget. A schedule row is a RUN, a fire the scheduler dispatched and its seat ran, never a tick it skipped or a fire a later one ran in place of (those stay in schedule_runs), and consecutive runs of one schedule for one runner that no other row falls between are ONE row: schedule.runs counts them (at least 1) and schedule.since is the oldest one’s instant (set when runs is above 1). A page that folds many runs reads its source again from where it stopped, at most four reads per source; past that the page is answered short, never out of order. MERGED BY INSTANT, CURSORED PER SOURCE: next_cursor resumes each source exactly where this page stopped consuming it, so a scroll never repeats or skips a row however the three interleave, and is absent once every source is read to its end. TWO LOGS, A FLOOR IN EACH: the work half and the pages half are each read at the caller’s level and staleness bound (max_lag_seconds, max_lag_seq: either half past it refuses the feed too_stale) and at the floor on their own log — min_position once per log, Worklet’s for the work and Doclet’s for the pages; a floor on any other log is bad_params — and a half whose log a session ask named no floor on is read stale; read_level is the weakest level a half was read at (One floor per log) |
work_activity | {task, container, kinds, actor, actor_kinds, assignee, q, notified, since, from, to, limit, cursor} | GET /worklet/activity. Every commit writes a history row, so this is an account of what HAPPENED rather than of what was announced, with one exception: a person’s own bookkeeping (a pin, an inbox mark, a snooze, recorded as person_updated on their record) is left out of a feed that names no kinds and no task, since it is not the company’s work, and is read by naming its kind: notified is how a reader tells the two apart, and kinds is what the change WAS whether or not anybody heard about it. The two used to be one: a record’s kind was read off its notification, so the same change filed under one word with an audience and another without, and a quiet removal reached the feed as tombstone while the filter spells it removed. kinds accepts the twenty-seven change kinds and nothing else: one this build does not have is refused bad_params naming the set, by this route and by a seat’s task_activity alike, because a filter matching nothing answers an empty feed that reads exactly like a quiet company. Each record carries BOTH instants: at is the authored one a card renders, and effective_at is the fleet-agreed one every duration is measured on. task answers that task’s WHOLE history, the changes it had before it moved projects included, and a container named beside it is a check rather than a filter: it must be the project the task is filed in, and any other is refused bad_params naming the one it is — a tracker holder reads the whole tracker, so a container would keep out nothing the reader is not owed, and as a filter it hid every change written while the task sat elsewhere. actor is who made the change; assignee is whose work it is, and the two are routinely different people. actor_kinds is a CSV of agent, human, operator and system and narrows to WHO WAS WRITING rather than to which handle, which is not the same question and cannot be asked as a set of handles, since an operator commit carries a token’s own label where an agent one carries a seat handle, and the set of people is the roster, which changes. It is REFUSED when it names a kind this build does not have, as kinds is: a filter silently ignored answers a wider question than the caller asked, and on an audit feed that reads as a company where everybody is an operator. Each kind named is read as its own newest-first range and the ranges are merged into one page, so an audit of several kinds costs a page of each rather than every commit those kinds ever wrote, at any age of the company. The q gate is on what the query would SCAN, never on which keys were named: container=workspace&q= and a five-year since both name a key and narrow nothing. fields is what MOVED, in the same {from, to} shape for every kind, the full list of names a task’s own row draws on is there too, and keys names the tasks those deltas point at; ask is the question a commit asked or answered, in work_inbox’s shape and read the same way; see GET /worklet/activity. subject_key_collision says the record’s subject_key opens ANOTHER task (one that claimed the key first), so a link to the subject goes by subject_id. A cursor or a position since must be on Worklet’s own log, and one from another domain’s log (or a cursor that is not a position) is refused bad_params rather than picking a page by a number from elsewhere |
work_my_work | {handle} | GET /worklet/my-work. Eight lists, each bounded at 20 so no block crowds out another: the whole answer is read as one page. priorities is NOT re-sorted: the order is what somebody decided. A finished or removed task is filtered out of it rather than rewritten out, because a read must not write to somebody’s own object. totals counts each list IN FULL ({priorities, assigned, asked_of_me, checklist_items, collaborating, watching_recent, unblocked_recent, holding_up}, each {total, capped}), by the predicate that drew its page and in the same read, so a count is drawn from there and never from a list’s length; capped means the count stopped at 10,000. Every row’s overdue mark is cut on the company’s own midnight (the timezone a board’s due bands are cut on), so a task due today is not overdue here while a board says today. handle DEFAULTS to the caller’s own record, and naming anybody else’s takes the owner-or-lead rule: whoever leads them, or admin, with worklet; see below. Every task row carries key_collision and every checklist item task_key_collision, and an ask’s answer_with names the task by its key or, where that key opens another task, by its id |
work_inbox | {handle, unread, primary_only, snoozed, reasons, limit, cursor, since} | GET /worklet/inbox. One person’s notices, newest first, 50 to a page. Each names the ONE reason of nineteen it reached them under, addressed (it asks something of them rather than informing them), fallback (nobody better was found), and their own read and snooze marks. actor is who made the change and actor_kind its kind: a person as their seat, a credential nobody is bound through under its login. comment_id and turn_id are the comment the change wrote and the turn that made it; ask is the question the notice is about (the ask itself for asked, the ask it answered for answered), as {comment, asked_of, open, overtaken, answered_by, answered_at, resolved, choice, decision}, read NOW, so an ask somebody has since answered reads open: false, and an open ask the facts overtook says overtaken: superseded (its asker asked the same person again on the item) or moot (the item is finished). snoozed is exclude (the default), include (snoozed notices kept and marked) or only (just what was put off); a snooze whose time has come is back under every scope and is not only. snoozed, unread, primary_only and reasons all narrow the SCAN rather than the page, by the same rules the marks are computed with, so a page holds limit notices whenever the scope does: they used to be applied to the page after it was read while the cursor was taken before, so a person with their newest fifty notices snoozed or read opened an empty page with a cursor behind it. subject_key is the key the notice’s task held when it was written, and task is that task’s id: the subject for a task commit, and the task a lead put first for a prioritised notice, whose subject_id is the PERSON whose list it is; a notice naming no task carries none. subject_key_collision says the stored key now opens a task OTHER than task (asked of the stored key itself, so a notice about a duplicate moved since is still flagged), and the notice is then reached by task; it is never set on a notice that names no task, whose key is the only address it has. primary_reasons is the split that was APPLIED, defaulted, so a caller renders you are seeing these because without repeating the rule; unread and primary are counts over the PAGE and say so, because a total over the table is a second scan of rows this answer did not return. reasons FILTERS rather than classifies (the primary split classifies the same rows), and an unknown one is refused naming the nineteen. since is a log POSITION (<stream>@<generation>:<sequence>, what seen_through renders), never a bare sequence, and a position on THIS log: a since or a cursor from another domain’s log, or a cursor that is not a position, is bad_params, because both are compared against Worklet’s own sequence numbers and one from another log would pick a page by a number that means nothing here. Same scope rule as work_my_work |
inbox | {handle, unread, primary_only, snoozed, limit, cursor, cards, record} | GET /inbox. One person’s COMPOSED inbox: every native domain’s notices in one list, 50 to a page (more only where one code record told you about several changes: those notices share one position on the code log, and a page never ends inside one), interleaved by the instant each happened (then by domain and record), each naming its source (tracker, code, artifacts) — Worklet’s that work_inbox answers, Gitlet’s: what every record about a change routed to them, and the artifacts’: every comment on an artifact that told them (a new thread on an artifact they own, a reply, resolve or reopen in a thread they are in, a mention). Open to every signed-in person: whose inbox is decided by its own verb, inbox.read — your own, a report’s you lead, or anybody’s to an admin — with NO app, and each source is then read under its own permission: Worklet’s notices where the company runs Worklet and the caller holds worklet on that record, Gitlet’s where it hosts code and the caller holds gitlet (ADR-0110), each held to the caller’s grant on its change’s repository — so a caller without Gitlet is listed and counted no code notice — and the artifacts’ wherever the company keeps artifacts, under no app (commenting is a relation, never an app), each comment notice held to the caller’s access to its artifact as it stands, so a notice on an artifact they can no longer open, or one in the trash, is left out, title, excerpt and all. A source the caller may not read is not asked, and sources lists the ones that were, each with its own seen_through (a position on that domain’s log), the primary_reasons applied and newest, the newest of its notices on the page — what “mark all read” reads that domain through. A notice carries the fields every card reads — record_id, position ({stream, generation, seq} on its domain’s log), at, reason, primary, addressed, fallback, kind, subject {id, key, title}, excerpt, actor, actor_kind, read, snoozed, snoozed_until — and its domain’s own notice whole in extra: a Worklet notice as work_inbox answers it, a code notice as {repo, change_id, change_ref, excerpt, change: {title, state, work_item}}, a comment notice (kind: "comment", subject the artifact and its title) as {op, artifact, thread, remark, excerpt, actor, actor_kind, title, artifact_kind}, where op is comment_open, comment_reply, comment_resolve or comment_reopen, excerpt the remark’s first 600 bytes (none for a resolve or reopen, and none once the remark is removed), and the artifact’s comments panel opens on thread. cards=true asks for what a notice’s card draws, for a list a person opens a notice from: each code notice’s change then also carries body (the description’s first KiB) and body_cut, agent_findings (the findings seats raised that stand open, counted by severity) and readiness ({met, total, first}), where a live change’s merge stands: how many of its preconditions are met of how many and its first sentence, judged for the caller as code_changes judges it, and absent for a merged or closed change; and each comment notice carries thread_state, the thread as it stands: {status, version, quote, remarks, resolved_by, resolved_version}. The cards are read once the page is composed, for the notices it keeps — never for one a newer notice of another domain pushed off the page — and no older than the page; a change the card read no longer answers (gone, or on a repository the caller may no longer read) keeps what its notice carried. Leave it out for a count or a badge, which draws no card: the readiness alone is a judgment of each live change’s merge gate. unread, primary_only and snoozed narrow each domain’s SCAN as work_inbox’s do; record narrows it to the one notice of that record_id, sought by its key in whichever domain holds it, so {record, snoozed: "include"} answers that notice read, unread or snoozed, with its marks, or none where it is not yours or no longer kept; it takes no cursor, which is bad_params beside it. reasons is not taken, since each domain names its own — ask work_inbox for Worklet’s. next_cursor carries ONE POSITION PER DOMAIN, where that domain’s notices on the page ended, so the next page resumes each exactly where it stopped; a cursor naming a domain this inbox does not read is bad_params. Read back at session with a min_position on EACH log the caller wrote — a “mark all read” is a record on each — and a floor on any other log is bad_params |
work_search | {q, limit, mode?} | GET /worklet/search. The company’s work RANKED against a phrase: hybrid by default (BM25 over the engine’s own inverted list fused with the semantic scan over the replicated vectors), or keyword / semantic alone, which is the same fan-out a seat’s search_work_items runs. Not a filter: work_activity’s q is an escaped LIKE over an excerpt, gated to a span of days, and answers a different question. Answered only where the company runs Worklet (a company whose tracker is a vendor’s, or none, gets unknown_query, as it does for every other work question, and a node with no company yet unavailable with refusal: "no_active_revision"), and holding the board is not holding an index: a node that joined recently has every row and no index, and answers available: false with reason: "building" rather than an error or an empty result: nothing is wrong, and a reader told nothing matched files the duplicate. A hit carries rank, its 1-based PLACE in the answer, and never a score: the fan-out finishes the ordering on the nodes that scanned each slice of the corpus and hands the coordinator ids best first, so a score on the wire could only ever read zero. It carries the item’s id, key, title, project, type, status, assignee and priority, the index’s own snippet, and key_collision exactly as a board row does. The answer carries the same outcome fields as knowledge (mode, served_mode, modes, degraded and coverage{nodes, complete, buckets_missing}), and a mode it does not know is refused, as a q past 400 bytes is: bad_params naming its size and the limit, asked before the mode, rather than cutting it. With no q it is the same probe knowledge answers: nothing runs and hits is empty, and the outcome says which modes this company serves as asked and how the asked one would degrade, so a screen can offer the modes before anybody has typed |
work_routing | {record_id} | GET /worklet/routing/{record_id}. Who ONE change woke, and under which reason: the fact no other tracker records. tracker_notifications has always been readable by RECIPIENT (work_inbox); this is the same rows by RECORD, which is a primary-key prefix scan and needs no index of its own. Each recipient names the ONE reason of nineteen that found them, addressed (it asks something of them), and fallback/fallback_rank (nobody better was found). notified is the history row’s own flag and means the commit CARRIED a notification, never that somebody was woken, since the applier deliberately does not hold the roster that would need. So an empty recipient list is THREE facts and delivery tells them apart: nobody (announced, inside the retention window, and every candidate was the actor or has left), swept (older than the company’s inbox.retention_days, so their absence is not evidence), unknown (no horizon stated) and quiet (the commit announced nothing, which is most of them). retained_from is the instant that decision was made against |
viewer | {} | GET /viewer. {login, grants, handle, name, kind, owner, acts, project, config_writer, config_managed_by, assistant, chat_vendors, artifact_pages, dictation}; artifact_pages is whether this deployment names an artifact origin (api.artifacts.external_url), so a framed kind’s page can be opened at all; dictation is whether this node can serve voice dictation now, {available, reason?}; assistant is Ask Crewlet’s availability to this caller, {available, reason?, reads_images?}; acts is what /operator/act would serve this caller, the catalogue’s writes the authority table can admit them to before any object is named, and project is where their create_work_item lands when it names none: the engine’s own default for their seat (the seat’s project, else its unit’s, else the nearest ancestor’s), so a screen offering “Create task” says where rather than working out a second answer; "" when there is none, and a create must name one. Registered on EVERY build with no seam of its own: who is asking is a property of the request rather than of anything this node stores. A bound caller, every person, and a token bound to a seat, carries a handle; an unbound one, a Tier A token or a service account bound to none, carries a login and no seat, which is an ordinary state rather than a refusal (a person is never unbound: every person holds a seat). owner is the name the caller’s OWN record is kept under, the seat when bound, the login when not, and it is what a screen asks the personal questions by, never handle. config_writer is whether the caller’s credential may change the company document, false for an anonymous caller and for every credential a managed document’s api.auth.company_writers does not list, and config_managed_by is that list, [] when the document is not managed and for an anonymous caller, so a screen draws every editing control disabled with who manages it rather than offering a save the engine refuses. chat_vendors is the vendor chat surfaces (mattermost, slack) a company whose chat is a vendor’s declares, the one further fact a screen naming where the company talks needs beside the org answer’s services, answered to a principal holding chatlet and [] to anybody else, on a company on its own chat or on none, and on a node with no company yet |
home_board | {} | GET /home/board. {seat, board, revision}: seat is the human seat the board is kept under, "" for a credential bound to no seat or a seat that is no person’s, which has no stored Home (no error); board is the document exactly as last saved, a JSON object whose widgets is a list the engine never reads inside, or null when none is stored; revision is the stored board’s revision, 0 when none, which the next save_home_board names as if_match. Registered only where the node reaches the coordination store. |
assistant_instructions | {} | GET /ask/instructions. {seat, company, mine, revision}: company is the company’s assistant.instructions and mine the caller’s own, each {length, format, text} with every member optional; seat is the human seat mine is kept under, "" for a credential bound to no seat (whose mine is empty); revision is mine’s stored revision, 0 when none, which the next save_assistant_instructions names as if_match. A stored layer this build cannot read answers as empty. Registered only where the node reaches the coordination store. |
work_person | {handle} | GET /worklet/people/{handle}. Scoped like work_my_work: absent is the caller’s own record, and somebody else’s takes their lead or admin, with worklet either way. due is the snoozes whose time has come, REPORTED rather than promoted: putting one back in the unread list is a write, and a read that performed one would change fleet state from a path with no operation id and no record. priorities_set_by is who last set the queue when it was not this person (the name their writes are recorded under, a person’s seat), which is how a lead’s authority is made visible beside the prioritised wake the write sends them: a wake that names the task now at the top of the list, because a notification here is task-shaped and “your list changed” names nothing to act on. max_snooze_ahead is how far ahead a snooze may be set, in SECONDS: the engine’s bound, so a screen offers only the presets mark_inbox will accept |
work_views | {container, counts} | GET /worklet/views. container is the strip’s own (workspace, project:ENG, unit:engineering, person:ana), and it is REQUIRED, because a strip belongs to exactly one. Whose personal views appear and whose pins come first is the CALLER’s, never a parameter: their own record, which is the login of a Tier A token or service account bound to no seat; a caller the engine can name nothing for gets the shared strip: no pins and no personal views but the shared ones. Every row carries builtin, which is what tells the six nobody saved from the ones somebody did: a builtin row has no id, so there is nothing to rename, protect, rank or pin. params is the saved query in work_items’ own parameter names (this channel’s, not the list_work_items TOOL’s, which renames four of them for a model), so a caller either hands them straight back or, simpler, passes the view’s id as view= and lets the engine expand it. counts=true adds count to every row PINNED for the caller (the total_hint work_items{view, container} answers for it, run as the caller on the company’s clock, with count_capped when it stopped at 10,000), or count_refused naming why a view that no longer compiles could not be counted. At most 32 counts, in the strip’s one read; only a record has pins, so it is refused bad_params to a credential that names no record of its own |
work_saved_views | {counts} | GET /worklet/views/saved. Every SAVED view (never a builtin) that the caller can see across every container: the shared ones, and the caller’s own personal ones, pinned-for-them first and then by container (the workspace, projects, units, people) and the strip’s own rank. Each row is work_views’ row shape, so container says where it lives and params is its saved query. A sibling of work_views rather than a container= it takes, because a strip is ONE container’s tabs and this is one PERSON’s views (the inventory of what somebody saved and the pins a sidebar draws), which the workspace strip could not answer: a view saved on a project board appeared in neither. Whose is the caller’s own record, never a parameter, and counts=true takes the same rule as work_views: every pinned row’s count is its view run IN ITS OWN CONTAINER, which is what opening it runs |
work_files | {project, folder, removed, limit, after} | GET /worklet/files. Answers {project, files, next} plus the coverage half. Each file carries its path, content_type, size, hash (the SHA-256 of its whole content), version, who created and last wrote it and when, and (only with removed) who removed it and when. next is absent on the last page. The listing is rows only: the bytes are read through the byte route, never through the socket |
pages | {container, parent, roots, status, label, watcher, title, skills, onboarding, order, limit, after} | GET /doclet/pages. skills is three-stated: only the tool-skill pages, everything but them, or everything. order is title (the default: by space, title and id, the order every tree is drawn in) or newest (by when each page last changed, newest first, then by id), and newest is served beside skills=true alone — anything else is bad_params — because only the tool skills have an index in that order (replicated migration 0067). A cursor is a place in ONE order, so a cursor minted in the other is bad_params too. roots=true is the TOP of a container (the pages with no parent), and is refused beside parent, because an empty parent already means “under any parent” and the two ask opposite questions. The answer carries total (every page the filter matches, counted in the same transaction as the rows) and, while there is more, after: pass it back as after for the next window; a cursor this listing did not mint is bad_params. Each page carries children: how many pages sit directly under it that the SAME listing would show (its status and skills narrowing applied to them), absent when none: what a tree draws its expander off. With skills=true on a node that reads the replicated usage domain the answer also carries skill_loaded_by: page id → the page answer’s skill_loaded_by list for that page, answered for the whole window in ONE read rather than one per row. Each page also says whether it is a folder (its body is empty: a page that only groups the pages under it), and its last save: saved_at and saved_by, the last create, save or rename, which a label, a watch or a move does not move. saved_by is the writer under the one name every row of theirs carries, as every author field on this surface is: a seat’s handle, which is how a person appears since they write as the seat they hold, or the whole login of a credential bound to no seat |
page | {id} | GET /doclet/pages/{id}: id or CONTAINER/Title. children is the first 50 by title and children_total all of them. skill says the page is a TOOL SKILL (admitted to the skills registry) and onboarding that it is an onboarding page. On a tool-skill page, skill_loaded_by is every seat it reached as a skill over the last 30 company days, most recent first: {handle, last_at, count, loaded, offered}, where loaded counts the seat asking for the body (load_tool_skill) and offered a phase’s catalogue putting its summary in front of the seat; absent on a node that does not read the usage domain, and [] when nobody was. linked_from is who LINKS here, from the index of a data node whose copies of both Doclet and Worklet serve (this node’s, where its own do): pages ({id, container, title}, published pages whose body carries this page’s address) and tasks ({id, key, key_collision?, title, status, via}, where via is linked_page for a page relation and description for an address in the description, and key_collision marks a task whose key another task claimed first, so a link to it goes by its id: the key opens the claimant), each capped at 50 with pages_total / tasks_total beside it. A link is a page id in either address the engine reads (/doclet/pages/<id> or the dashboard’s #/doclet/pages/<id>), outside code; a title is not an address, since a rename moves it. Absent on a node with no index. A node that HAS an index and cannot answer sends linked_from_status instead of an empty list: building while its index is on its first lap over pages and tasks (a fresh or joined node’s first minutes: an empty list then would claim nothing links here before every body was read), unavailable when the read failed or no data node’s copies of both serve; the page itself is served either way. folder is the listing’s |
page_reads | {page, days} | Who READ a page: one row per (seat, way of reading) over days company days (1–30, default 30, anything else bad_params) from the replicated usage domain, so every data node’s reads are counted (a departed node’s included), and every node answers alike. via is get_page, search, prefetch or skill_loaded; a skill’s catalogue OFFER is deliberately not a read (it would make every skill “read by every agent today”) and is what page’s skill_loaded_by counts. Each row carries count, last_at, and the newest read’s last_turn_id, last_work_key, last_query and, where the run was charged to a task in Worklet, last_work_item{id, key, title, ordinal}, as in “turn 2 on ENG-412”. At most 100 rows, newest first, with readers_total; distinct_seats_today is the seats that read it since the company’s midnight, and elided how many (page, way) entries the per-seat-day cap dropped across the window, COMPANY-WIDE rather than for this page: some may have been this page’s and none may have been, so a non-zero value says the list MAY be short (0: it is certainly complete). since, until and days name the window. Registered only where this node reads the usage domain |
containers | {} | GET /containers. A separate question from pages rather than a facet of it: a browser draws the container list once and the page list on every navigation |
page_activity | {page, container, kinds, actor_kinds, since, cursor, limit} | What happened to a page, or to everything in a container: Doclet’s own change log, mirroring work_activity. kinds is a CSV of the ten change kinds and actor_kinds of the three author kinds (agent, human, operator), the latter refused when it names one this build does not have and read one kind at a time, merged into one page; work_activity’s note says why. since bounds the window and cursor pages it: the same unit, two parameters, because the cursor moves with every page and the bound does not. Each change carries its page’s CURRENT title, container and status (published, draft or trashed), so a page in the trash, which keeps its title, is told from a live one. The answer carries log_seq and applied_through as a Worklet answer does (this node’s checkpoint on Doclet’s log and the prefix of it whose records it applied, read in the transaction that read the changes), so a node holding a record it cannot decode says it is behind |
page_revision | {page, version} | One revision’s own body, message and author. Revision N is the body AT version N — including the newest — so a reader comparing two versions asks for both rather than for one and the head |
artifact_data | {id, collection, since, cursor, limit} | GET /artifacts/{id}/data/{collection}. One page of a collection’s documents under its read rule, or with since the documents changed after that version, deletions included |
artifact_data_doc | {id, collection, doc} | GET /artifacts/{id}/data/{collection}/{doc} |
artifact_data_query | {id, collection, q} | GET /artifacts/{id}/data/{collection}/query. q is the query as JSON: where, order_by, limit, after |
artifact_data_history | {id, collection, doc, field, actor, cursor, limit} | GET /artifacts/{id}/data/history. Seven days of writes, refusals included, with each changed field’s values before and after |
artifact_data_schema | {id} | GET /artifacts/{id}/data/schema. The collections the caller may read, the store’s footprint and state digest, and the caller’s role |
artifact_data_state | {id} | GET /artifacts/{id}/data/state. The caller’s own per-viewer state keys |
artifact_data_usage | {} | GET /artifacts/data/usage (needs admin). The company’s datastore footprint against its quota |
code_repos | {status, protected, prefix, kind, sort, repo_facts, day_bounds, limit, cursor, read_level, …} | GET /gitlet/repos. The repositories the caller may read, a page at a time — see The code reads, which say what the repository questions answer, at which level and with which refusals |
code_repo | {name, path_owners, gates, repo_facts, day_bounds, read_level, …} | GET /gitlet/repos/{name}. One repository in detail and the address its git is cloned from, its path owners and its rules’ merge gates only where path_owners=true and gates=true ask for them, its changes by state and its card where repo_facts=true asks, and with day_bounds beside it its pushes by day and who pushed |
code_pushes | {name, limit, cursor, brief, push, day_bounds, pusher_kind, pusher, since, until, read_level, …} | GET /gitlet/repos/{name}/pushes. One repository’s push history, newest first in log order — in brief with brief, or one push of it, whole, with push, or narrowed to one pusher and a window with pusher_kind, pusher, since and until |
code_repo_readers | {name, from, to, cursor} | GET /gitlet/repos/{name}/readers. Who read a visibility: unit repository’s contents over a range of company days, a page at a time. An admin’s, decided before anything is read; it takes none of the freshness keys |
code_changes | {repo, state, owner, work, reviewer, needs, readiness, window, text, cards, sort, limit, cursor, read_level, …} | GET /gitlet/changes. A listing of changes: see A change’s questions, which say what the four change questions answer |
code_change | {name, change, part, revision, since_revision, file, file_b64, patches, context, limit, cursor, read_level, …} | GET /gitlet/repos/{name}/changes/{n}. One change, a part at a time: its detail and revisions, a part of its conversation, the moves of its lifecycle, the asker’s own standing findings, a revision’s files, one file’s patch or every file’s, its findings placed in a revision |
code_change_routing | {name, change, limit, cursor, read_level, …} | GET /gitlet/repos/{name}/changes/{n}/routing. Whom the change’s records reached, a whole record a page, its delivery telling nobody from swept |
code_reviews | {reviewer, limit, cursor, read_level, …} | GET /gitlet/reviews. The reviews one reviewer gave, newest first, each naming its change |
code_refs | {name, prefix, order, moved_since, moved_before, contains, detail, active_since, limit, cursor, read_level, …} | GET /gitlet/repos/{name}/refs. A repository’s live refs under a prefix — see A repository’s content, which says what the eleven content questions answer and which answers never change |
code_tree | {name, ref, path, path_b64, recursive, cursor, read_level, …} | GET /gitlet/repos/{name}/tree. A directory at a revision, or every file below it |
code_find | {name, ref, q, limit, read_level, …} | GET /gitlet/repos/{name}/find. The files of a revision’s tree whose path holds a query’s characters in order, best first |
code_blob | {name, ref, path, path_b64, start_line, end_line, cursor, read_level, …} | GET /gitlet/repos/{name}/blob. A file’s lines at a revision, or a blob by its id |
code_log | {name, ref, path, path_b64, grep, since, until, pushed_by, limit, cursor, read_level, …} | GET /gitlet/repos/{name}/log. The commits that changed a path, newest first |
code_blame | {name, ref, path, path_b64, start_line, end_line, cursor, read_level, …} | GET /gitlet/repos/{name}/blame. Which commit last changed each line of a file |
code_tree_commits | {name, ref, path, path_b64, cursor, read_level, …} | GET /gitlet/repos/{name}/tree-commits. The commit that last changed each entry of a directory, a page of its listing at a time |
code_diff | {name, base, head, paths, file, file_b64, renames, patches, cursor, read_level, …} | GET /gitlet/repos/{name}/diff. What changed between two revisions: the stat, one file’s patch, or every file’s patch a page at a time |
code_tips | {name, oids, base, cursor, read_level, …} | GET /gitlet/repos/{name}/tips. Many branch heads and tags at once, each with its commit, an annotated tag’s tagger and date, and how far each is from a base |
code_tags | {name, limit, cursor, read_level, …} | GET /gitlet/repos/{name}/tags. A repository’s tags, newest first by their own date, each with the commit it names |
code_compare | {name, base, head, read_level, …} | GET /gitlet/repos/{name}/compare. How two revisions relate, and what merging head into base would do |
code_commit | {name, sha, read_level, …} | GET /gitlet/repos/{name}/commits/{sha}. One commit, the push that introduced it and the changes it belongs to |
code_queue | {repo, target, trains, limit, cursor, read_level, …} | GET /gitlet/queue. The live entries of merge queues and the trains testing them: see Merge queues and checks, which say what the five queue and check questions answer |
code_checks | {repo, change, oid, target, latest, since, until, name, state, standing, limit, cursor, read_level, …} | GET /gitlet/checks. Attempts of checks: a repository’s, a change’s, a commit’s (for one branch beside target), each check’s latest attempt of a change or a commit (latest), or every repository’s in a window, or where each check stands (standing) |
code_check | {name, oid, check, attempt, target, read_level, …} | GET /gitlet/repos/{name}/checks/{oid}/{check}/{attempt}. One attempt whole |
code_check_log | {name, oid, check, attempt, target, object, offset, limit, read_level, …} | GET /gitlet/repos/{name}/checks/{oid}/{check}/{attempt}/log. A page of the log a failed run kept |
code_commit_marks | {name, commits, read_level, …} | GET /gitlet/repos/{name}/commit-marks. What a history page draws beside up to 100 commits: where each one’s checks stand, and the changes it merged and heads, with how each landed |
code_counts | {repo, parts, read_level, …} | GET /gitlet/counts. A scope’s changes counted by state, the company’s or one repository’s, the company’s repositories by kind and status, and the live entries of merge queues: see Counting changes |
code_search | {q, mode, ignore_case, repo, path, ref, limit, context, per_file, read_level} | GET /gitlet/search. The lines that match a search across the repositories the caller may read, the commit each repository was searched at, and what was not searched. Read at no session floor: it answers at the tip it names |
chat_channels | {include_archived, unread, limit, with, read_level, …} | GET /chatlet/channels. {channels, waiting, waiting_capped, read_state, read, default_private, truncated, unreadable} plus the read’s read_level, complete and position. Each room carries the reader’s own summary (the room, its revision, the last message, its participants), with unread counted above the caller’s cursor over the room’s posts (a reply in a thread is read there and does not count; room events, the caller’s own messages and tombstones are never counted) and stopped at 100 (unread_capped says it stopped), and muted. waiting is what waits on the caller, each {channel_id, root_id, count, capped} (root_id empty for a room’s own posts): a direct conversation’s unread posts, a message naming them or the whole room, and a reply in a thread they follow, each once, in every room they may read and none they muted; the rows chat_activity marks unread. Each room is counted over its newest 100 messages, and capped says every one of them was unread, so its count is a floor; waiting_capped says some count is (see what waits on a reader). with (a seat’s handle) keeps only the caller’s rooms that seat is also in, which is how a profile lists the rooms two people share, and answers an empty waiting. read is the caller’s WHOLE read state, named by their seat and carrying its revision, the order a screen keeps it against the chat_cursor_moved pushes by; read_state: false says the coordination record could not be read, and then every badge is zero, every mute absent and read absent with them: an unknown cursor is never a cursor at zero, which would badge every room with its whole history. default_private is what a room created without a stated visibility will be (chat.chatlet.default_channel_private), so the create form opens on the company’s own default. An archived room is left out unless include_archived=true. limit (1 to 256, every room by default) answers the most recently active that many, cut from the one list sorted by activity and never paged; unread=true keeps only the rooms with something unread, and is refused 503 unavailable while the read state cannot be read, since zeroed counts would say nothing is unread. truncated says rooms were left out: the caller is in more than 256, or more matched than limit. See Chatlet |
chat_channel | {channel_id, read_level, …} | GET /chatlet/channels/{channel_id}. The room, its revision, its message count, its members and whether the caller is one. Here and in chat_messages and chat_thread, channel_id is the room’s id or its name, with or without the # people write before it, so a room the caller is not in is reached by the name everybody calls it |
chat_messages | {channel_id, cursor, limit, read_level, …} | GET /chatlet/channels/{channel_id}/messages. {channel_id, messages, next_cursor, unreadable} plus the read’s level and position. The page holds the room’s own posts and room events, never a reply: a reply is read in its thread (chat_thread). The cursor is the room’s own message number, sent back as it was answered, so it steps over the replies between two posts; a cursor the room refuses is 400 bad_params in the domain’s own words. A room post somebody replied to carries thread: replies (a tombstone included), last_reply_at, last_reply_position, repliers (the first three, in the order they first replied) and replier_count. A row with event is a room event, the room’s own change rather than anything said (see Chatlet). A person’s message carries message.reach (recipients, each {handle, reason}, empty when it reached no agent), answered (each {handle, message_id, at}: the seat spoke in its thread, or anywhere after it in a direct conversation), taken (each {handle, as, at}: a seat whose running turn took the message instead of a turn of its own and has not answered it, as joined when it took it into its work or absorbed when it read it there and found it asks nothing) and delivery (no_agent, waiting, partly_answered or answered, an absorbed take counting as answered, and unknown for a person’s message stored before messages recorded their reach, which is not no_agent; absent on an agent’s message and a room event) |
chat_thread | {channel_id, root_id, cursor, limit, read_level, …} | GET /chatlet/channels/{channel_id}/threads/{root_id}. {channel_id, root, replies, participants, next_cursor, unreadable}. A thread is one level deep, so this is a range in one room |
chat_activity | {kind, unread, cursor, limit, read_level, …} | GET /chatlet/activity. {items, next_cursor, unread, read_state}: what waits for the caller, newest first (mentions by others, replies in threads they follow, reactions to their messages; a reply naming them or the whole room is listed once, as the mention), each row with unread (above their places for it, in a room they have not muted) and the read_through position that marks it read, as the thread’s place for a row in a thread; unread counts the unread mentions and replies as chat_channels’ waiting does, room by room over each room’s newest 100 messages. unread: true answers the unread rows alone, whole, and takes no cursor; it is refused unavailable while the read state cannot be read |
chat_threads | {cursor, limit, read_level, …} | GET /chatlet/threads. {threads, next_cursor, read_state}: the threads the caller follows, newest reply first, each {channel_id, channel_name, channel_kind, reason, root, latest} |
chat_saved | {cursor, limit, read_level, …} | GET /chatlet/saved. {saved, next_cursor, read_state}: the caller’s saved messages, the newest save first, each {mark, channel_name, channel_kind, view} or gone |
chat_sent | {cursor, limit, read_level, …} | GET /chatlet/sent. {messages, next_cursor}: what the caller said, newest first, each {channel_name, channel_kind, view} |
chat_reach | {channel_id, body, reply_to, read_level, …} | GET /chatlet/channels/{channel_id}/reach. {channel_id, thread_root, reach, mentions, collective, quiet}: whom the caller’s draft would reach, by the post’s own routing run dry |
chat_links | {channel_id, cursor, limit, read_level, …} | GET /chatlet/channels/{channel_id}/links. {channel_id, links, next_cursor}: every link the room’s messages carried, newest first, each {url, message_id, thread_root, author, author_kind, at, channel_seq} |
chat_message | {channel_id, message_id, read_level, …} | GET /chatlet/channels/{channel_id}/messages/{message_id}. {channel_name, channel_kind, view, root, before}: one message, with its thread’s root and the two replies before it when it is a reply |
chat_unfurls | {urls} | The socket only. {unfurls}: the previews of one message’s links (at most 8), each {url, kind, href, code, title, status, tone, owner, meta}. A link is previewed only when it is one of this dashboard’s own addresses (the origin of api.external_url and a task’s, a page’s or an artifact’s route) and the caller may open its record: each record is asked of its own screen’s question (work_item, page, artifact) as the caller, and href is built from the record, never taken from the message. A github.com pull request under an owner the GitHub configuration names is previewed with its repository and number (code), title, state and size (meta), read through the company’s GitHub wiring (pull request previews). Every other link is absent and drawn by the link rules |
chat_search | {q, channel_id, author, limit, read_level, …} | GET /chatlet/search. {hits, searched, building, note, read_level, position}: each hit its message_id, channel_id, the room’s channel_name (none for a direct conversation) and channel_kind, as a mention carries them, thread_root (empty for a room post), author and author_kind (system for the engine’s own line, which no seat said whatever name it is stored under), snippet — the message around the words that matched, cut by the index and marked where it was — at and score. searched is how many rooms the search ran over, which tells “nothing matched” from “nothing was looked at”; building (with a note saying it in words) says the answering node’s index had not caught up with its transcript — a message, an edit or an erasure past what it has indexed, a rebuild under way, or an index built from a copy of the estate that has since been replaced, measured on both sides of the search and true too when the node could not tell — so the hits may be drawn from part of it. The visible set is resolved by the data node that answers, from the caller’s seat: every public and unit room, joined or not, and the private rooms and conversations the caller is in; a channel_id the caller may not read narrows to nothing rather than being refused. q takes at most 400 bytes and is refused past that, never cut. limit is 20 when absent and 40 at most — a larger one is answered with 40, the most one answer holds — and there is no next page, so a full page may have more matches behind it. Unregistered on a node with no chat index |
chat_room_names | {read_level, …} | GET /chatlet/room-names. {rooms, truncated} plus the read’s read_level, complete and position: every named room the caller may read, each its id, name, kind and archived: every public and unit room, joined or not, and the private rooms the caller is in. The live rooms come in name order, then the archived ones, the most recently archived first, at most 1000 (chatlet.MaxRoomNames, the most live rooms a company holds), and truncated says rooms were left out. What a reader draws a room named in prose by: a room’s name may be spelled as a colour (#e2e) or an issue’s number (#2026) |
chat_rooms | {read_level, …} | GET /chatlet/rooms. {rooms, truncated, unreadable} plus the read’s read_level, complete and position: every named room the caller may read, joined or not, the archived ones included, in chat_room_names’ set and order and at its bound. Each is the whole channel, its members (how many seats are in it), member (the caller is one) and last_at (when somebody last said something there, absent for a room nobody has spoken in; a room event is not activity). What a person browses to find a room to join |
config | {} | GET /config (needs admin) |
config_audit | {limit} | The revision history — no REST twin; GET /config/revisions serves the same records (needs admin) |
config_diff | {revision_id} | GET /config/revisions/{id}/diff — the listing is cut at 500 and changes_total is how many there are (needs admin) |
config_entities | {kind, id} | One addressable collection of the active revision: its ids, or one entity out of it. The read half of Settings › Configuration, whose write half is PUT /config/{kind}/{id} (needs admin) |
Every Worklet answer carries how far this node had got, and both halves
matter. read_level is the level the read was ACTUALLY served at, never the
one asked for — a level never silently downgrades, so the two can differ only
by a refusal you can see. log_seq is this node’s committed position and
applied_through the prefix whose consequences it actually holds; they are two
numbers because a node applying nothing while its position advances looks
identical to a caught-up one from either alone. log_lag is absent rather
than zero when the broker could not be reached, because a read asks how far
behind an answer may be and an unreachable broker answering “not at all” is the
confident wrong answer. A caller that will not accept an answer of any age says
so with max_lag_seconds and/or max_lag_seq beside read_level=stale, and
the read refuses too_stale past whichever is reached first — the two are
readings of ONE distance rather than two, the record count being what the
broker actually answers and the duration being derived from it through this
node’s own drain rate. Both are refused at every other level, because they are
a staleness bound and nothing else is. min_position is the read-your-writes
half: a log position — <stream>@<generation>:<sequence>, the form every
write’s answer carries as position and every wake carries — and the answer
is served from no earlier than it, at whatever level. At stale it turns
“whatever this node holds” into “whatever this node holds, from here on”, still
labelled with its lag; a node that has not reached it within the read budget
refuses behind rather than serving rows from before the write, and a position
on a log the answer is not read from is refused 400 bad_params rather than
waited for — the caller’s mistake, which every node answers the same, so it is
never an unavailable telling a client to ask another node. It repeats, once
per log: min_position=<tracker position>&min_position=<pages position>, or
an array of the tokens in a socket frame’s params, at most one per log and
four in all (two on one log, or a fifth, are 400 bad_params). A question read
from one log waits on its log’s floor and refuses one on any other; a question
read from several — company_feed reads the tracker’s log and the knowledge
base’s — holds each half to its own log’s floor, reads a half whose log a
session ask named no floor on at stale, and reports the weakest level any
half was read at (One floor per log). It is
also what makes read_level=session an honest ask here: a session read waits
for the caller’s own last write, so it is accepted only beside a
min_position and refused without one, the refusal naming the key and the
two other asks a caller who typed session might have meant — linearizable,
or stale with max_lag_seq. Absent, the level resolves to this surface’s
default, which is stale; a seat’s own tools resolve theirs to linearizable
and cannot be asked for anything else. See Read consistency.
read_level, max_lag_seconds, max_lag_seq and min_position work on
every question that carries a read level, not only on /worklet/items:
/worklet/items/{id}, /worklet/views, /worklet/catalogue,
/worklet/people/{handle}, /worklet/projects, /worklet/projects/{key},
/worklet/activity, /worklet/my-work, /doclet/pages, /doclet/pages/{id},
/containers and every /chatlet/ read all resolve them the same way. They did not until recently:
each of those wrote a hardcoded stale into its read and never looked at the
keys, so a caller asking for a stronger answer was served this node’s rows and
told, in the answer’s own read_level, that it came back at the level asked
for, and the two single-object reads, /worklet/{id} and /doclet/pages/{id},
then took the level and dropped the bounds beside it, on the claim that a bound
is enforced against a set’s coverage and one row has no set. It is not: a bound
is about this node’s lag, checked before any row is read, and one row is
exactly as far behind as a board on the same node. And complete: false — with incomplete naming the
count, the lowest position among the records (from, as {stream, generation, seq} — the object form every position in an answer takes, seen_through and a
listing’s position included; a position in a parameter is the token
<stream>@<generation>:<sequence>) and the record version — says rows may be missing,
rows that should have gone may still be present, and the totals were computed
over the incomplete set. That is a different fact from staleness, and a client
that renders read_level and swallows complete looks confidently right.
A read no data node could answer is unavailable, never a list. Worklet,
Doclet, Chatlet and the usage history behind the spend, activity and readers
screens are answered by a data node whose copy of that domain serves (this
node’s own where it holds one, another data node’s otherwise), and a
read nobody answered is refused unavailable (REST: 503 with a
Retry-After) rather than answered as an empty list, which would say the
company has nothing in it. knowledge is the one exception, because a search is
best effort: a search no data node ran answers no hits with served_mode
empty and coverage.complete false, which a screen renders as “could not be
searched” rather than “nothing matched”.
Whose record a personal question answers for
Section titled “Whose record a personal question answers for”Five questions answer about one person or seat rather than the company: work_my_work, work_inbox, work_person, executor_sessions and executor_session. Each takes a handle, and the rule for whose is:
- No handle answers for the caller’s own record (for the two sessions questions, the caller’s own seat).
- Your own handle says the same explicitly; on the three person questions either of your names is your own, since a person’s login names the same record their seat does.
- Somebody else’s login names their record, looked up in the identity directory: the seat it binds them to (every person holds one), or the login itself for a service account bound to none.
ana.diaz, bound to the seatana, readsana’s inbox, where everything addressed to her is kept. A login is never matched against the chart’s seats. Atoken:<id>login is held by the Tier A entry of that id in the answering node’sapi.auth.tokens, not by a directory row: it names that token’s record (the seat an active directory row binds it to, or the login itself), and atoken:login no entry declares is held by nobody, whatever the directory says, so a mistypedtoken:oppsnames no record. The directory is asked only after the question has decided what it can without it:adminis admitted whatever the login is, and a caller who leads somebody may be, so for those two the login is looked up and the question decided again on the record it names. Everybody else (somebody who leads nobody) is refused as on any seat they do not lead, before anything is looked up, so the refusal never says whether the login exists or whose seat it holds. A login nobody holds, or one whose holder is bound to a seat the chart no longer has, names no record (404) foradminand is refused as below for a lead. A node that cannot read the directory answers503, to those two only, without the directory’s own words (they name the seat a login is bound to). - Anybody else’s handle is decided by the authority table on the record it resolved to, each question asking its own verb. The first three are somebody’s QUEUE and take the owner-or-lead rule: whoever leads that person (so a lead may name their report by seat or by login) or a caller holding
admin, each withworklet. A node that cannot read the chart to tell answers503, never a refusal, so a lead is not told they lead nobody.executor_sessionsandexecutor_sessionare a seat’s TRAIL (what its harness wrote on each turn, and how each ended) and takeaudit.seat.read, the rule/agents/{id}/memoryand an executor’s tail take: the seat’s lead, oradmin, with no app.
A refusal on authority is 403 unauthorized naming the deciding rule in reason and, in grants, the permissions any one of which would have admitted the caller: admin for a colleague’s queue or a seat’s sessions, worklet for a lead who does not use it. An empty grants means no permission would.
A caller’s own record is kept under ONE name, the name every write they make is attributed to: the seat’s handle for a person (every person holds a seat) and for a token or service account the directory binds to one; the login (svc:ci, token:ops) for one it binds to none. The tools write a caller’s inbox marks, pins, priorities and personal views under that name, and every question here reads them back under it. Binding changes where the record is kept, not whether there is one.
A seat’s trail belongs to the seat: a caller bound to no seat who names none on a sessions question is refused bad_params, not unauthorized. Nobody was denied anything; the remedy is a binding in the directory, not a different credential.
No parameter names a viewer anywhere on this surface. Whose board, queue and view strip is the CALLER’s; a question about somebody else takes the handle above and its rule.
One frame per posture, and how a frame is routed
Section titled “One frame per posture, and how a frame is routed”Both facts are properties of the client, not the push.
Its posture decides the bytes. A socket is served live or degraded, and two sockets in the same posture receive the byte-identical frame from a single encode: the engine marshals one push once per posture present, never once per connection.
Its route decides the audience. Every kind in the table above is one of three:
| Route | Kinds | Reaches |
|---|---|---|
| broadcast | event, agents, seats, executors, tokens, budget, schedules, org, tools, health | Every connected client whose posture takes the kind. |
| room | inbox_changed, artifact_changed, artifact_data, artifact_presence | Only the clients in the frame’s room: a seat’s room (clients whose watch for that seat was allowed; the frame names the seat in its seat field) or an artifact’s room (clients whose artifact_join was allowed; the payload names the artifact). |
| direct | snapshot, result, error, pong | The one client it answers. |
One keyed index holds both kinds of room. A room-routed frame that lost its room is dropped, never fanned out: a result carries one client’s correlation id and a targeted frame one room’s audience, so “everybody” is the unsafe default.
Presence in an artifact’s room
Section titled “Presence in an artifact’s room”Presence is told, never stored: who is in a room and what they look at lives in the memory of the node holding each socket and crosses between nodes on an ephemeral broadcast, with no row, log record or coordination key. Every inter-node frame is sealed under the fleet keyring (secrets.keys) with a 60-second validity inside the seal, by the sending node’s clock, which a receiving node judges with two hours’ allowance for the two clocks (Every machine’s clock); a frame the fleet did not seal shows nobody. Each node rebroadcasts its members every 15 seconds, a member not heard for 45 seconds is dropped, and a node gaining a room’s first socket asks its peers once. Everybody who can open the artifact and has it open is in the roster; there is no invisible mode. An agent reading or writing the artifact appears as an agent for 45 seconds after its last call.
A degraded node keeps the socket open
Section titled “A degraded node keeps the socket open”When a node’s own posture leaves rotation because its copy of the company is wrong rather than behind (shed or stuck, the set /ready refuses on), its sockets move to the degraded posture instead of closing. A closed socket reconnects on a backoff, learns nothing, and shows “retrying”; one that stays open is told.
In that posture:
- Keepalives continue.
pingis answered withpong, and the 5-secondhealthframe still arrives; itsstatusnames the posture. - Pushes stop. Every other broadcast kind is withheld, being derived from the copy the fleet abandoned.
- Queries are refused with
unavailable, and the query surface is never reached.unavailablemust never be flattened into an empty result. The frame carriesretry_after(one health tick, the soonest the posture can change) and names norefusal, since none of the state log’s is behind it; thehealthframe says why. snapshotstill arrives on connect: a direct frame carrying the node’s own health, so it says why the rest stopped.
wait and isolated stay live, as /ready stays ready on them: wait is ordinary propagation during a rollout, and isolated means no node applied the revision, so blinding every operator would turn one bad revision into an outage.
Close codes
Section titled “Close codes”A refused handshake cannot carry a close code (the connection never opened); it is answered 401 before the upgrade (GET /ws/stream above). These codes are for an open socket.
An open socket is authenticated at its handshake and ended by what ends its credential. There is no periodic re-check; each of these events is handled:
- an identity record names it: its session was signed out, ended by an administrator or replaced by a step-up; the person it acts for was suspended, removed, signed out everywhere, given other grants, bound to another seat or had a machine token revoked; or the directory row a Tier A token is bound through (
token:<id>) moved. Every node serving the API holds the estate and applies the identity log, so each hears this from its own applier; the sockets the record names, and only those, are decided again by the guard over the request they were opened with. A revocation reaches an open tab within the time it takes to apply. - an identity move names nobody: the company’s session generation moved (every session ended at once), this node retained a record instead of applying it (one a newer build wrote during a rolling upgrade, or one signed under a keyring key it was not restarted with), a join replaced its identity estate, or its identity applier stopped keeping up (halted on a record it cannot read, or frozen behind a broker) and its lag has just passed the stall grace, the instant every identity read on the node starts answering
503. Every open socket closes1013at once and nothing is read on its behalf; each tab reconnects on its backoff and its handshake decides:401sends it to sign in,503says this node cannot tell yet, and an untouched credential is back on a fresh snapshot. - a company was published: every configuration apply, a hire or any other edit of the org chart. Each socket is decided against the new company, in memory, with no identity read: one whose person’s seat the company no longer holds as a human seat closes
4403, one whose seat now answers to another handle, or whose seat this node cannot read, closes1013so its handshake resolves the binding afresh, and everywatchis decided again. - its credential ends on its own: a session’s absolute deadline, a machine token’s expiry. No record is written then, so each socket keeps a timer for it, and the guard decides it.
- and once as it starts listening, so a record landing between handshake and that moment is not missed.
A session’s idle deadline does not end an open socket: an open live view is activity, and a socket can never be re-issued a cookie. The browser’s cookie is moved only by a REST response, so a client that talks to the node over the socket alone makes an ordinary REST request now and then to keep its session past the idle deadline.
Each answer does one thing:
| Answer | Code | What a client does |
|---|---|---|
| The session ended, expired or was revoked; the token is no longer accepted | 4401 | Re-dial with the credential the browser holds now; if the handshake answers 401, sign in. |
| The person resolves but their seat is gone from the chart | 4403 | Stop reconnecting and show why: the credential is fine, what it may do is not. |
| This node will not vouch for the credential now: it could not read what decides it, an identity move named nobody, or the seat answers to another handle | 1013 | The standard’s try again later: reconnect on a backoff. The handshake decides, answering 503 identity_unavailable with a Retry-After for as long as the node cannot say, before any snapshot is built. |
| Resolved as somebody else: renamed, bound to another seat or to none, given or refused a grant | 1013 | Reconnect, and ask who you are again (viewer): the handshake builds the snapshot for the new grants, and a screen naming the old login or seat is redrawn as the new one. |
| Resolved as the same login, seat and grants | (no close) | Nothing; later questions are asked as the principal just resolved. |
A node behind its identity log hears no record it has not applied, so inside the stall grace its open sockets are served on their last decision, as its REST routes are served on the rows it has. Past the grace it can vouch for nobody and every open socket closes 1013 at that instant, including on a node whose applier halted on the very record meant to end them.
4401 and 4403 sit in the 4000–4999 range the standard reserves for applications and echo the HTTP status they mean; 1013 is the standard’s own. Nothing else closes this socket for a fault.
WS /ws/dictation
Section titled “WS /ws/dictation”Voice dictation: a signed-in person’s microphone audio in, the engine’s own recognizer’s words out. See Voice Dictation for the recognizer, its limits and what it costs.
Admitted and kept as /ws/stream is: the session cookie or a bearer, a principal whose stage may act, a handshake Origin this deployment is reached at, and the credential decided again for as long as the socket is open (4401, 4403 and 1013 as above). It acts only as that person and writes nothing: the words land in their composer. Before the upgrade, a node that cannot serve dictation answers 503 dictation_unavailable with a reason (disabled, unsupported_platform, model_unavailable or failed), the reason the viewer answer’s dictation carries too.
The client sends, in order:
| Message | Shape |
|---|---|
| start | {"type": "start", "lang": "en", "rate": 16000, "encoding": "pcm16"}, first and once; anything else is refused bad_params |
| audio | binary frames of 16-bit little-endian mono PCM at 16 kHz, 20 to 100 ms each, at most 8 KiB (a larger frame closes the socket 1009) |
| finish | {"type": "finish"}: the recognizer decodes what it holds, sends its last finals, then done |
| cancel | {"type": "cancel"}: done at once, with no final |
The engine answers:
| Message | Meaning |
|---|---|
{"type": "preparing", "progress": 0.42} | The recognizer is being readied (a first download, or a load after an idle unload), with its progress from 0 to 1. Audio sent meanwhile is held, up to 10 s of it |
{"type": "ready"} | Recognizing |
{"type": "partial", "seq": 0, "text": "..."} | Provisional words, lowercase: they replace segment seq’s provisional text |
{"type": "final", "seq": 0, "text": "..."} | Segment seq, punctuated and cased: it is appended, and the next partial is segment seq + 1 |
{"type": "done", "reason": "..."} | The end: finish, cancel, length (the session’s time or audio cap), idle (no audio for idle_seconds) or preparing (more audio arrived than is held while the recognizer was readied). Closes 1000 |
{"type": "busy", "reason": "..."} | Refused: session (this person already dictates on this node) or capacity (the node’s live dictations are at dictation.max_concurrent). Closes 1013 |
{"type": "error", "code": "..."} | bad_params (a start or message it cannot take; closes 1008) or dictation_unavailable (the recognizer would not start or stopped mid-dictation; closes 1011) |
Nothing a person says is stored or logged: each dictation writes one dictation_session_ended line with the person’s id, duration, audio size, how it ended and an error code.
Wiring
Section titled “Wiring”Every node that serves the API feeds its projection through one entry point, stream.Service.Ingest, from an ephemeral broadcast subscription to the event stream (observe.Projector). It receives every event from every node, because a dashboard served by one node must show turns that ran on another; a publish listener would see only its own node’s. The event store takes the other route, a publish listener inline on the publishing node (or, for a node without data, the one data node that keeps the event in custody), so no two nodes keep one row. Each event updates the live-state projection and fans out to connected dashboards. Backpressure is per-WebSocket: a stalled tab drops the oldest queued envelope so it cannot stall the publish path or other tabs.
The dashboard is a React + TypeScript application, built by Vite from crewlet/dashboard/ into crewlet/static/dashboard/, which the binary embeds. Its wire half is src/protocol/: a store that mirrors the projection and derives nothing (protocol/store.ts), a reconnecting WebSocket client with heartbeat, query channel and REST-snapshot fallback (protocol/socket.ts), the one REST transport (protocol/rest.ts) and the one write client (protocol/act.ts). Every list the engine owns and the dashboard must repeat (event categories, push kinds, act refusals, tools a button may call) is declared once in src/contract/, and a Go gate holds each against the engine’s own value. A hash router keeps every screen, section and filter in the URL, with one file per screen. /dashboard serves the shell; /static/{path} serves its assets. The build output is COMMITTED, so go build ./... needs no Node.
Two caching classes, decided by where the build put the file:
| Files | Cache-Control | Why |
|---|---|---|
Everything under /static/dashboard/assets/ — the entry module, every chunk, the stylesheet | public, max-age=31536000, immutable | Each name carries a content hash, so different bytes are a different URL; a browser that has the file never asks again, reload included |
Everything else — the shell (/dashboard), /favicon.ico, /static/dashboard/crewlet-icon.svg, the fonts and the notices | no-cache | The name does not change with the bytes, so the browser revalidates on every load and a redeploy is picked up on the next; the shell names the new hashed files |
Every file answers with a strong ETag, and If-None-Match is read as a list under weak comparison, so "a", "b", W/"a" and * each earn a 304. HEAD and Range are answered too.
Text is gzipped for a client that asks for it: HTML, JavaScript, CSS, SVG, JSON, plain text and the .ico favicon are compressed once per file per process, at gzip’s best level, and served with Content-Encoding: gzip when the request’s Accept-Encoding admits gzip (or x-gzip, or *) with a weight above zero and the result is smaller than the file. A member that names gzip outranks the wildcard, so *, gzip;q=0 gets the file as it is, as does a request with no Accept-Encoding (scripts and probes, which would print the compressed bytes). Fonts and images are never recompressed (woff2 and PNG already are). The gzip representation has its own ETag (the identity tag with -gz before the closing quote), and every response for a file that has one carries Vary: Accept-Encoding, its 304 included. On the committed build the four files a first load fetches go from 1.47 MB to 401 KB. A reverse proxy needs no compression or caching rule for the dashboard; one that compresses leaves an already-encoded response as it is.
/static/dashboard/THIRD_PARTY_NOTICES.txt (served as text/plain) holds the license text of every npm package the bundle contains (the design system’s four among them), written by Vite’s build.license, then the NOTICE file any of them ships (the design system’s Apache-2.0 packages do), the SIL Open Font License of the embedded Geist and Geist Mono faces, and the ISC License of the Lucide drawings every glyph is one of (with Feather’s MIT text for the glyphs Lucide derives from it). The release archives and container image carry the same file, beside the notices for the Go modules the binary links.
The product’s mark is /static/dashboard/crewlet-icon.svg, emitted by the build from @crewlethq/icons beside the raster favicon.ico; the tab icon, the dashboard’s lockup and the GitHub App landing page all draw that one file.
A second build target, static/protocol/protocol.js, is the wire protocol alone as plain ESM (src/protocol/, the store included, nothing of React): internal/e2e replays a real company’s captured frames through it under node, checking the client’s understanding of this contract against a real server. It is committed beside the dashboard’s tree and never embedded or served.
Its visual system (token layer, measured palette, rules a change has to keep) is in Dashboard Design System.
Organization
Section titled “Organization”GET /org
Section titled “GET /org”The company’s charter and organization tree, as a reader holding no permission at all may see it. The same object is the org section of the handshake snapshot and the body of every org push.
Every reference in it is an identity, not a display name: a seat’s manages entry carries another seat’s handle or a unit’s id, and a unit’s lead carries a seat’s handle. A unit carries its id (its id field, or its name where it declares none), so a client can resolve a reference against something else in the same response.
{ "name": "Nimbus", "mission": "...", "vision": "...", "policies": ["..."], "timezone": "Europe/Berlin", "token_budget": {"month": 40000000}, "services": {"tracker": "worklet", "knowledge": "confluence", "code": "native"}, "roles": [ {"name": "Founder", "kind": "human", "manages": ["cto"], "availability": "CET business hours"} ], "units": [ { "id": "engineering", "name": "Engineering", "type": "department", "purpose": "...", "lead": "cto", "goals": ["..."], "channel": "engineering", "knowledge": ["..."], "roles": [ { "name": "CTO", "handle": "cto", "goal": "...", "backstory": "...", "responsibilities": ["..."], "behavioral_guidelines": ["..."], "manages": ["platform"], "token_budget": {"day": 2000000}, "avatar": {"character": "hexlet", "color": "cyan"}, "llm": { "execute": ["fast", "backup"], "review": ["big", "fast"], "subagent": ["fast", "backup"], "auxiliary": ["cheap"], "judge": ["cheap"], "onboarding": ["fast", "backup"] }, "tool_sources": ["builtin", "mcp:search", "mcp:github"] } ], "children": [ { "id": "platform", "name": "Platform", "purpose": "...", "roles": [ { "name": "Platform Engineer", "goal": "...", "avatar": {"character": "crewlet", "color": "purple"} } ] } ] } ], "derived": { "seats": [ { "handle": "cto", "name": "CTO", "kind": "agent", "manager": "founder", "managers": ["founder"], "reports": ["platform-engineer"], "auto_reports": ["platform-engineer"], "onboarding_chain": ["Engineering"] } ], "units": [ { "name": "Platform", "type": "team", "lead": "cto", "lead_inherited": true, "channel": "engineering", "channel_inherited": true, "seats": ["platform-engineer"] } ] }}In that document manages: ["cto"] is a seat handle and manages: ["platform"] is a unit key; a seat is always named by its handle and a unit by its key, never by a display name.
derived is the hierarchy the engine derives from the company it is RUNNING, so a client draws a chart rather than deriving one. Its rules: a handle is a slug with Go’s own case mapping; a lead and a channel cascade to child units that set none; a manages entry keying a unit stands for the seats in its subtree; a unit’s lead manages the members nobody else manages; the primary manager is the first seat in the engine’s own order that manages a seat. It is on every answer for a company, derived in the same call as the tree, and absent only from {}.
From the company this node runs. The whole answer (roles: and units: as well as derived) is cut from the organization of the epoch this node applied, so it changes exactly when a revision is applied.
The fields outside derived stay as WRITTEN, so a reader can tell a declared lead from an inherited one. Every list may arrive as null; treat it as empty. The authored path, unit_path and placed_by_ref of each entry are omitted (they say where a seat was WRITTEN). Membership is each unit’s seats.
What it carries, and nothing else. The company’s name, mission, vision, policies, timezone, token_budget, services and derived; for each seat its name, kind, handle, goal, backstory, responsibilities, behavioral_guidelines, manages, availability, token_budget, avatar, llm and tool_sources; for each unit its name, type, purpose, lead, goals, channel, knowledge, roles and children. Every value is the one the company document holds, as written: a seat with no declared handle has none here (the engine derives it from the name), and a unit that inherits its lead has no lead of its own. An empty field is omitted, and a node with no active company answers {}.
timezone is the one value the engine resolves: the company’s one clock. An unwritten clock IS UTC, so a running company always carries a zone name here (UTC where the document writes none), never an empty string a client would default to its browser’s zone. Every day the engine cuts (“today”, a due band, an overdue mark, a person’s own day) is cut on it, so a screen deciding which day something falls on cuts on this.
services is which tracker, knowledge base and chat the company runs, and whether the engine hosts its code, as the engine resolves them, on every answer for a company and to every reader. All four are closed sets:
tracker:worklet,jiraornone.knowledge:doclet,confluenceornone.chat:chatlet(Crewlet’s own chat),vendorornone. It names a posture, not a product; which vendors avendorcompany talks on is told to a holder ofchatletas thevieweranswer’schat_vendors.code:nativewhere the document setscode.backend: gitlet, elsenone, whatever vendor the company connects beside it (a GitHub or GitLab repository is an integration its seats call, not a host the dashboard draws).
A backend the document leaves empty resolves as the engine resolves it: the vendor whose integrations block is connected, else worklet, doclet and chatlet respectively. services decides which dashboard surfaces exist: a company not running Worklet has no Worklet section and no My work, one not running Chatlet has no Chatlet, and every question about such a service is refused there; one hosting no code has no Gitlet workspace. It names the backend and nothing else of the tracker:, knowledge:, chat: and code: blocks, which stay guarded: no project or space key, site, URL, room policy, credential, repository or limit. Absent only from {}, so “no company yet” is never mistaken for none.
services.restart is which of the four THE ANSWERING NODE serves only once it restarts, each by its key (tracker, knowledge, chat, code): one of Crewlet’s own services the company turned on while this node’s runtime was already running without it (A native backend changes at a restart). Until the restart, every question about it is refused there unavailable under native_backend_needs_restart with no Retry-After, so a client treats it as a service it cannot reach on this node, not one the company does not run. Absent where the node serves everything the company runs.
token_budget is the ceilings as written, on the company and on each seat that names its own: one number per calendar window it caps (day, week, month, on the company clock), nothing for a window left open, so an absent key is “no ceiling”, never zero. How much is spent, and when each window resets, is GET /budgets.
A seat’s avatar, llm and tool_sources are RESOLVED, since a client would get the rule wrong. All three are absent on a human seat, which runs neither. avatar is published to everybody; llm and tool_sources only to a reader holding admin, being computed from seat configuration no other reader is shown.
avataris how the agent seat is drawn: itscharacterandcolor, each as the seat’savatarblock writes it, else the default (crewletandpurple), so every agent seat carries both. A value a newer engine admitted that this dashboard does not draw arrives as written; the dashboard draws that part as the default.llmis every phase’s provider chain exactly as a turn resolves it, keyed by phase (execute,review,subagent,auxiliary,judge,onboarding): the first key is the model that phase runs on, every later one a fallback in the order tried. A flatllm_<phase>field wins over the same phase inside thellmmapping, a phase naming nothing takes the seat’sllm, and a seat naming nothing lands on the company’sdefaultprovider or, without one, the first provider declared. Values are provider KEYS, the labelsproviders.llmgives its entries; the model, endpoint and credentials stay guarded. Absent when the company configures no provider.tool_sourcesis where the seat’s tools come from, in the tool registry’s origin grammar:builtinfirst, thenmcp:<server>for each granted server in the ordermcp_serversdeclares them. A server is granted by its entry’saccess(every agent seat where it has none), or, for one reading each agent’s own vendor credential, by the integration lane the seat is on (Tools and MCP › Choosing which agents get a server); never by a seat’smcp_envblock, which holds values. It is the GRANT, not what is running: a server that failed to start is still listed; the node status record’s MCP report says it failed.
What it never carries. A seat’s contact identities, email, unit reference, workers, learning_enabled, mcp_env, sandbox, placement, integrations and schedules, and its authored llm / llm_* fields (their effect is the resolved llm); a unit’s mcp_env, integrations and schedules; and every company block outside the charter and its budget (providers, MCP servers, integrations, the knowledge and tracker blocks beyond the resolved services, notification and learning settings, worker templates). Those are read through the admin-gated config query or GET /config, which masks credentials. Schedules have their own read surface under the same posture as /org: GET /schedules answers every configured schedule with its task and next run.
Why an explicit shape. /org is readable by every caller. Serialising the config’s own seat and unit types would make every field added to a seat public the day it landed, whatever it held. The shape is declared field by field in internal/api, and a test fails when the config gains a company, seat or unit field nobody has classified as public, resolved or guarded.
Founder prose is served as written. Nothing in the public fields is resolved as a ${VAR}, so a reference typed into a goal is shown as text; keep credentials in the fields built for them.
/operator/mcp — your own assistant
Section titled “/operator/mcp — your own assistant”The premise of running Crewlet is that an AI manages your company, and the person doing that management often works through an AI of their own (a coding agent, an assistant). This endpoint lets it read the board, file what you just decided, and read what the company has written down, instead of having the dashboard described to it.
Point any MCP client at it:
{ "mcpServers": { "crewlet": { "type": "http", "url": "https://crewlet.example.com/operator/mcp", "headers": { "Authorization": "Bearer ${CREWLET_API_TOKEN}" } } }}What it serves
Section titled “What it serves”The same tools a seat holds, not a parallel implementation: list_work_items,
get_work_item, create_work_item, update_work_item, comment_on_work_item,
merge_work_item, move_work_item, watch_work_item, search_work_items, get_work_catalogue, list_projects, describe_project, write_project,
list_project_files, read_project_file, write_project_file, remove_project_file,
task_activity, my_work,
list_pages, get_page, write_page, save_page, comment_on_page,
search_knowledge; wherever the node takes artifact uploads,
list_artifacts, get_artifact, list_dashboard_sources,
get_artifact_format, get_company_brand, list_artifact_comments,
create_artifact, publish_artifact, update_artifact,
share_artifact, unshare_artifact, upload_artifact_asset,
create_artifact_folder, move_artifact, comment_on_artifact,
resolve_artifact_comment, edit_artifact_comment,
remove_artifact_comment, read_artifact_data, query_artifact_data,
write_artifact_data and set_artifact_schema (see
Artifacts), each artifact and datastore
write answering its op_id here, and taking it back, by Worklet’s own rule
(below); and, where the company runs
Chatlet, list_channels, read_channel, search_messages,
post_message, reply_in_thread, send_dm, react_to_message,
join_channel and leave_channel — where list_channels also counts each
room’s unread messages against the caller’s own read state, which no seat’s
turn has: each row carries unread (and unread_capped past the cap), a room
the caller muted carries muted: true, and a caller in do-not-disturb gets a
top-level dnd_until, as the rail shows them. When that read state cannot be
read it says so in a top-level read_state: "unknown: …" and puts no count on
any row, rather than counting from zero.
Wherever the company hosts its repositories in the engine
(code.backend: gitlet), it serves the code reads too — code_list_repos,
code_get_repo, code_resolve, code_read, code_diff, code_compare,
code_landed_in, code_log, code_blame, and a repository’s changes,
code_list_changes and code_get_change, a commit’s checks, code_get_check_failures,
and a search across every repository, code_search, the
code_search question as a tool (see The company’s code) —
read as you, so every repository while you hold gitlet and none without it,
and none recorded as operator_acted — and,
where Gitlet’s writes are served, the code writes: code_commit_files,
code_revert, code_cherry_pick, code_create_branch, code_delete_branch,
code_create_tag, code_delete_tag, code_create_repo, code_update_repo, code_delete_repo,
code_restore_repo, code_protect_branch, a change’s code_open_change,
code_update_change and code_close_change, and its conversation’s
code_request_review, code_review_change, code_comment_on_change,
code_delete_comment and code_resolve_finding, code_apply_suggestions,
code_rebase_change,
code_merge_change, code_dequeue_change and code_revert_change, and a commit’s checks’
code_rerun_checks and code_report_check — the last your own CI’s report of a check, which no seat
is given (External CI) — and a repository’s code_purge_unreachable,
a purge of its unreachable objects that no seat is given either and that asks a fresh proof of who
you are, and code_import_repo, a repository created from one at another host, which no seat is given
either — each made as the human seat you
hold through the credential you came with (a token bound to nobody writes
nothing), each answering its op_id here and taking it back by Worklet’s
own rule, and each one operator_acted. Every code tool, read or write, takes
the Gitlet permission, refused unauthorized naming gitlet to a caller or a
token without it
(ADR-0110). And
it serves the deployment’s health — fleet_health, and code_status where the
code reads are — an administrator’s reads, refused to anybody else, which an
agent seat holds only by its role’s grant (see
The health tools). And it serves the
company’s atlas to a holder of atlas, with the three
tools every agent seat holds: atlas_search, a query (part of a name or key,
or an id), a kind and a limit (default 50, at most 500), answered with
entries and the total that matched; atlas_get, one entry in full by its
id or its exact name or key, with used_by, what relies on it; and
atlas_trace, from one entry up to what depends on it (the default) or
down to what it depends on, at most six hops (depth) and fifty entries,
every relation with all. Each answers each source’s coverage and how many
values were withheld for being shaped like a credential, and lists
repositories only for a caller who holds gitlet too
(ADR-0127).
A schema, a default, a trimmed field
and the wording of a refusal are each written once — two copies of “file an
item” drift on exactly the parts nobody looks at, and only one of the two is
ever tested.
An argument a tool does not take is refused, naming it and the arguments
the tool does read, rather than dropped. A tool reads what its schema declares
and nothing else, so an assistant still sending an argument a tool has retired
— save_work_view’s old owner is the one that saved a personal view as a
shared tab on the project, under an answer saying it had worked — or one it
misspelt was answered as though it had asked for less, and never told which.
Every write’s answer carries its three-valued outcome, the object’s new
version, and position — where the record landed, as
<stream>@<generation>:<sequence>, or null on an unknown outcome, where
the broker never said. That is the value a client hands back as min_position
on any read above, so an assistant that files an item here and redraws the
board over GET /worklet is served an answer that includes it rather than
whatever this node happened to hold. The tools’ own reads need none of it —
they read linearizable — but the answer travels to a client that does not.
A write’s answer here also carries op_id: the operation that call was.
A seat’s writes derive their operation ids from its turn, so a seat repeating a
call is the same operation; a call here has no turn, so each one is minted an
operation of its own and told it. To finish a write that came back unknown,
or a gesture that stopped part of the way through, send the call again with
exactly the same arguments and that op_id — every write it makes is then the
same operation again, a created item or a new comment or saved view included,
answered from the ledger where it landed and finished where it did not. A call
without one is a new operation: repeated, a create files a second item. The
argument is offered by the tracker’s writes — create_work_item,
update_work_item, comment_on_work_item, merge_work_item,
move_work_item, watch_work_item, place_work_item, remove_work_item,
restore_work_item, set_priorities, set_pins, mark_inbox, save_work_view,
delete_work_view, write_project_file and remove_project_file — and by the artifacts’ and the
datastore’s — create_artifact, publish_artifact, update_artifact,
share_artifact, unshare_artifact, upload_artifact_asset,
create_artifact_folder, move_artifact, write_artifact_data and
set_artifact_schema — under one rule and in one set of words, and held to the
rule every route that takes an Idempotency-Key holds that key
to: an id this engine minted, at most 128 bytes of visible ASCII — anything
else is refused naming op_id. An op_id belongs to the one call it was
answered for: the id names that call’s tool and carries a digest of its
arguments, so brought back with the same tool and exactly the same arguments it
is that operation again, and with any other argument — another item, another
project, another title, another blocker — or with another tool, it is refused
naming op_id before anything is written. Nothing is ever made twice under
one, and nothing is half-made: a looser rule would answer the steps the two
calls share from the first call and write the ones they do not. To make a
different write, leave op_id out. One case is refused later, by the ledger,
and says so: an operation whose step now meets another object — a move whose
item somebody else moved in between, so the key it aliases is another — is
refused op_reused, and the answer says to leave op_id out.
The one field that differs is who the call acts as. There is no turn and no
seat here, so this surface supplies its own identity, and every tool resolves
the caller through that rather than through the turn — a read that asked the
turn first refused every call on this endpoint while the writes beside it
worked. A comment’s @handle is resolved here too, against the company chart
current when the comment is written, so mentioning somebody from your own
assistant wakes them exactly as it does from a seat.
That identity is the request’s principal, and nothing the caller sends
can change it — there is deliberately no way to ask this surface to act as a
seat. A person — every person holds a human seat — acts as their seat,
and so does a token the identity directory binds to one: their writes are recorded under its handle with author kind human, and every
tool that asks who the caller is rather than who wrote it keys on it —
mark_inbox, set_pins and set_priorities write the seat’s record;
my_work, get_person and work_inbox answer for it, and so does the viewer
list_work_items expands preset=my_queue and preset=priorities against; a
watch: true, a comment and a create record it as the watcher; a create with
no project files into its team’s; and the lead relation routing_unit and
write_project are gated on is resolved for it. A credential nobody is bound
through — a Tier A token or a service account bound to no seat — writes under
its own login with author kind operator, and keeps its own record under that login,
which is ordinary. Being the seat is also what keeps a wake from coming back to
you: the change you just made is not announced to whoever made it, so filing
work through your own assistant does not wake you about it. See
who a write is attributed to and
Humans in the org.
The three person writes take moves, not lists, and each is resolved against the person’s record as the write finds it — so two screens writing at once both land, and nothing a call does not name changes:
| Tool | Arguments |
|---|---|
mark_inbox | read, unread, unsnooze — lists of the record_ids work_inbox returns; snooze — [{record_id, until}], until RFC3339, in the future and at most a year away; read_through — a log position, <stream>@<generation>:<sequence>, that only ever moves forward; primary_reasons — omitted leaves the choice, [] takes the default back; seen (optional) — how far you read the tracker’s log, CREWLET_TRACKER_LOG@<generation>:<sequence>, the position of the newest work notice you were shown, or the tracker source’s newest: a mark is decided by whichever data node it is asked of, which may not yet have applied a notice the page was read with elsewhere, so the decide waits for seen first, and a node that cannot reach it within the write budget answers unavailable (behind) and appends nothing — the same call lands once it has — rather than refusing a notice you were shown as no change the company recorded. Without it the mark waits for nothing, and a notice the deciding node has not reached is refused invalid; a seen on another log is refused invalid. The dashboard sends each notice’s own position, the furthest of the notices an answered question marks, and “Mark all read” the position it reads through; PUT /worklet/people/{handle}/inbox takes it in its body likewise. A notice named twice in one call is refused invalid; a list the call would leave past 256 entries is refused inbox_full. |
code_mark_inbox | The same arguments as mark_inbox, over your own CODE notices — the record_ids inbox answers under source: "code", and a read_through on the code log (CREWLET_CODE_LOG@<generation>:<sequence>); primary_reasons names Gitlet’s reasons (mention, review_requested, changes_requested, checks_failed, target_broken, conflicted, dequeued, finding_replied, ready_to_merge, merged, review_submitted, re_review, thread, watcher, lead_fallback). Each domain keeps the marks over its own notices on its own log, so a position on one says nothing of the other’s. seen (optional) is how far you read the code log, CREWLET_CODE_LOG@<generation>:<sequence> — the position of the newest code notice you were shown, or the code source’s newest: a mark is decided by whichever data node it is asked of, which may not yet have applied a notice the page was read with elsewhere, so the decide waits for seen first, and a node that cannot reach it within the write budget hands the mark to the next one rather than refusing a notice you were shown as none of yours. Without it the mark waits for nothing, and a notice the deciding node has not reached is refused invalid; a seen on another log is refused. The dashboard sends each notice’s own position, and “Mark all read” the position it reads through. Your own record alone, as the human seat you hold: a mark of anybody else’s — whatever authority the caller holds — and a record that reached somebody else are refused. It takes gitlet, as Worklet’s marks take worklet: without it no code notice is yours to list, count or mark. Offered where the company hosts code. |
code_mark_viewed | repo and change, the change; viewed, the files to mark, each {path, blob_oid, mode}: the path as code_get_change part=files names it and that file’s new_oid and new_mode from the same answer, neither for a file the change deletes; unviewed, the paths whose mark to take back; seen (optional), the position the change was read at. At most 32 files a call. A mark stays while later revisions give the file the same object id and mode, and reads unviewed once either changes; only a draft or open change keeps marks (a closed or merged one is refused conflict), and a person holds at most 2 000, the oldest going first. The caller’s own record alone; a seat is never offered it. |
artifact_mark_inbox | The same arguments as mark_inbox, over your own COMMENT notices: the record_ids inbox answers under source: "artifacts", a read_through and a seen on the artifacts log (CREWLET_ARTIFACTS_LOG@<generation>:<sequence>), and primary_reasons naming the comment reasons (owner, assignee, mention, participant; the default primary half is owner, mention and assignee). Your own record alone, as the human seat you hold, and no app: a comment is a relation to an artifact, never an app. Served beside the artifacts tools, and no seat is given it. |
set_pins | views and favorites, each {add, remove} or {set} — never both, and a bare list is refused naming the shape. The caps are held against the list the change would leave. |
set_priorities | handle, items — the whole order, most important first — and if_match, the version get_person answered: given, a reorder against an older record is refused stale_version. |
Plus thirty-two no seat is given: list_work_views, save_work_view,
delete_work_view, write_work_catalogue, get_person, work_inbox,
mark_inbox, set_pins, set_priorities,
remove_work_item, restore_work_item,
place_work_item,
answer_executor,
pause_seat and resume_seat,
run_schedule,
steer_turn,
answer_knowledge,
atlas_refresh,
save_home_board,
save_assistant_instructions, and
the eight chat gestures only a person makes,
and, beside the code reads and on their terms,
code_repo_readers, who read a visibility: unit
repository, and beside the code writes code_mark_inbox, a person’s marks
over their own code notices: a seat is woken, never shown an inbox, so it has
none to mark; and code_mark_viewed, the files of a change a person marked
viewed: a seat reviews a change whole and keeps none. A view is furniture (a name, a shape
and a filter, arranged so a person finds the same question tomorrow), and a
seat’s job is the work rather than the furniture around it. And the
catalogue is the company’s own vocabulary: a seat adding a type so its own
create succeeds is a seat editing the rules it is judged by, and the refusal it
was working around is the signal a person needs to see — which is why reading
the catalogue is a seat’s and writing it is not. And a person’s record is a
HUMAN’s: a seat has a mailbox — the durable subscription the engine attaches
when it acquires the seat — and nothing on a person’s record describes one.
The trash is another: a removal takes an item off every board in the
company, and a seat that could hide work it did not want to do would be marking
its own homework in the one way that leaves no trace. Neither destroys
anything: a removal is reversible at any age, and a purge (crewlet worklet purge, or POST /worklet/items/{key}/purge) is the
one that is not. A board’s manual order is furniture too — where a card sits
says what a person wants looked at first — so dragging one is a person’s; a
seat moves work between lanes with update_work_item. And an executor’s question is a person’s to answer: a seat
that could answer its own executor would be guessing on its own behalf. Whether a
seat works at all is a person’s decision about it too: a seat that could pause
a colleague, or resume itself, would be overruling the people who run the
company. And when a seat’s scheduled work runs is a person’s decision too: a
seat that could run a schedule would be starting its colleagues’ turns, or its
own, outside the times the people who run the company set. And a note to a
running turn is a person redirecting the work: a seat that could steer a
colleague’s turn would be directing it past the person who asked for the work. And who read a unit’s code is an audit of the people who
read it — an admin’s, which no other person is answered either: a seat that
could ask would be a model watching the people it works for.
Asking for a read of an atlas source
Section titled “Asking for a read of an atlas source”atlas_refresh asks that one integration be read for the atlas now, not on its next scheduled read (Sources). It takes atlas and is a person’s: an agent is refused it whatever it holds.
| Tool | Arguments |
|---|---|
atlas_refresh | integration, one the company connects that the atlas reads, as atlas_sources lists them |
It answers source, requested_at, requested_by and changed (false where an ask already waited on the source: that ask is returned). The ask is a record in the coordination store, which the node holding the collect duty honours within a minute. A source read less than five minutes ago is refused conflict, naming the instant it can be asked from; a name that is no connected source is refused not_found, naming the ones that are. It writes no state log, so its answer carries no position.
Saving your Home board
Section titled “Saving your Home board”save_home_board saves your own Home board on the dashboard, the widgets you placed and how you arranged them, under the human seat you hold, so the same board follows you to every browser and passes with the seat to its next holder. It takes no app (Home is everybody’s) and is a seated person’s: an agent is refused it, and so is a credential bound to no seat (unseated), whose board the dashboard keeps in that browser alone.
| Tool | Arguments |
|---|---|
save_home_board | board, the whole board: a JSON object whose widgets is a list, stored as given (the dashboard validates it on every read; the engine reads nothing inside it); and if_match, the revision home_board answered, 0 when none is stored |
It answers seat and the new revision, the if_match of the next save, beside the outcome (applied) and position (null) every write carries. A board saved since you read it is refused stale_version and nothing changes: read home_board again. A board that is no object, has no widgets list or encodes to more than 512 KiB is refused invalid. The board is a record in the coordination store, on no log, landed when it answers; one whose answer was lost is unknown, and home_board’s revision says whether it landed. A seat removed from the company keeps its board for the mailbox’s grace and loses it after, as its chat read state.
Saving your Ask Crewlet instructions
Section titled “Saving your Ask Crewlet instructions”save_assistant_instructions saves your own instructions on how Ask Crewlet writes to you, applied on top of the company’s (assistant.instructions) from your next question (Instructions). It is a seated person’s, as save_home_board is, and Ask Crewlet may propose it for you to approve when you ask it to answer differently from now on.
| Tool | Arguments |
|---|---|
save_assistant_instructions | instructions, the whole of your layer: length (brief, balanced or detailed), format (lead, lists or tldr) and text (at most 1000 characters), each optional, {} clearing them; and if_match, the revision assistant_instructions answered, 0 when none is stored |
It answers as save_home_board does. Instructions held to the company layer’s rules are refused invalid naming the field: an unknown length or format, a text past 1000 characters, or a text holding what looks like a credential, which is never stored or echoed. Saved since you read them is stale_version.
Changing the atlas
Section titled “Changing the atlas”And the atlas’s eleven writes, each a claim in the person’s own name on the atlas’s log (Changing the atlas): every one takes atlas but the purge, which is admin’s with a proof inside step_up. Every one is a person’s, made as the seat they hold: refused to an agent whatever it holds, and to a credential bound to no seat (unseated).
An entry is named by atlas_entry (and to or other where a write names a second one): its id, or kind:key (host:ssh/web-1). Every write takes an optional if_match, the entry’s version it was decided from, and is refused stale_version when the entry moved since. It answers entry (the id), the new version, what it recorded (change, and the fact, relation, value or owner) and the outcome and position every write carries, or unchanged where what it asked for already held. Over MCP each also takes back the op_id its answer carried, as the tracker’s writes do.
A write is refused unavailable (503, with a Retry-After) only while a source that could state a fact of an entry it touches did not answer in full; the detail names that source. A source that describes none of its entries, or only reports health and use, never holds it (how a write is decided).
| Tool | Arguments |
|---|---|
atlas_add_entry | kind, key in its kind’s grammar, and optionally name, a one-line purpose, the vendor account it belongs to (belongs_to, an entry), its owner (seat or unit) and the Doclet page documenting it (doclet_page, the page’s id). Each is a record after the entry’s; the same call again finishes one that stopped part way. An existing entry is refused exists (a retired one comes back with atlas_restore); a tool server, a model, a server keyed ssh/ and a Gitlet repository, which the settings or Gitlet name, are refused conflict |
atlas_correct | atlas_entry, fact (one its kind carries), and value in the fact’s grammar, which a fact holding many values gains as one more; or wrong: true, saying the value shown (the one value of a fact of one) is wrong. A fact the settings, Gitlet or the engine’s own records declare is refused conflict |
atlas_confirm | atlas_entry, and either fact (with value for a fact holding many, or to confirm another value a source reports) or relation and to; neither confirms the entry itself |
atlas_relate | atlas_entry, relation (any but owned_by), and to; with documented_in, doclet_page (a Doclet page’s id) in place of to. The page is not read: Doclet decides on every read whether it exists and who may read it |
atlas_unrelate | atlas_entry, relation, and to or, with documented_in, doclet_page: a relation the settings declare is refused conflict |
atlas_set_owner | atlas_entry, and one of seat (a handle of the chart), unit (a unit’s key) or clear: true. The owner a person named before is withdrawn; an owner Gitlet declares is refused conflict |
atlas_retire, atlas_restore | atlas_entry. An entry the settings declare is refused conflict |
atlas_merge, atlas_split | atlas_entry and other, of one kind. A merge first withdraws a “not the same” between them |
atlas_purge | atlas_entry, or value exactly as the atlas holds it, never both. Nothing undoes it; the answer never repeats the value, and only its digest leaves the node it was asked of |
The chat gestures only a person makes
Section titled “The chat gestures only a person makes”Where the company runs Chatlet, the dashboard’s chat screen makes every change it makes through this catalogue (a person’s own assistant reaches the same tools), and eight of them are given to no seat:
| Tool | Arguments | What it does |
|---|---|---|
create_channel | channel — the new room’s name — and optionally kind (public or private; omitted takes chat.chatlet.default_channel_private), topic, purpose, members | Makes a named room, with the caller in it. The name is its address: of two people asking for one, one is refused exists. A unit’s own room is the org chart’s (the engine opens one for each unit that declares a channel); a create of kind unit is refused forbidden. A horizon of its own for a room is an administrator’s to set. |
open_dm | to — the other handles | Opens the conversation between the caller and them, or reaches the one already open, saying nothing; created says which. Its id is its participants, so opening it twice is one room. |
update_channel | channel, and any of topic, purpose, archived, auto_join, and template beside a topic or purpose | Changes only what it names: an empty topic clears it, an absent one leaves it. A topic and a purpose are any member’s, each at most 250 characters, each change a line in the room’s transcript; template names the template they were set from (at most 64 characters), and the transcript records that one line instead. auto_join puts every seat the company takes on from then in the room; administrator’s, public room only (chat.channel.autojoin). archived closes the room to new messages (false reopens it) and is not any member’s: it is decided on the stored room (chat.channel.archive), for its creator, the lead of the unit a unit’s room belongs to or of a unit above it, or an administrator. An archived room is still read and searched. |
set_channel_members | channel, members, optionally expected_members | States the room’s WHOLE membership: whoever is left out is taken out, and an empty list empties it. Each member is a handle or {handle, follow_all}; follow_all makes every message in the room reach them. expected_members is the membership the change was built from: if the room holds anybody else, or anybody follows it differently, when the write lands, it is refused as a conflict and the caller reads the room again. Refused for a unit’s room (membership is the org chart’s) and a direct conversation (id is its participants). |
add_channel_members | channel, members (handles) | Puts those named in the room and takes nobody out, decided against the room as it stands when the write lands, so two people adding at once both land. added answers who it put there; anybody already in the room is left as they are. Refused as set_channel_members is for a unit’s room and a direct conversation, and for a handle that is no seat of the company. |
edit_message | channel, message_id, body, and optionally links | Rewrites a message; only its author may. Whoever the new words name for the first time is told; nobody else is woken again. links changes only when sent: omitted, the message keeps its links; a list replaces them, an empty list removes them. Each link is an absolute http, https or mailto address, stored as sent; any other is refused invalid, naming every entry that is not one (links[1]). |
delete_message | channel, message_id | Takes a message back: its words go and its row stays, so a thread hung off it keeps its root. Its author may, and so may an administrator — moderation, decided before the message is read, so it reaches a message in any room (a private room or direct conversation the administrator is not in included) without showing it to them. |
mark_chat_read | any of cursors (room id → the position read through), thread_cursors (thread root id → the position read through in it), rewind (room id → the position to set its place back to), notify (room id → all, mentions or muted), mute, unmute, star and unstar (room ids), save and unsave ({channel_id, message_id}), follow and unfollow ({channel_id, root_id}), dnd_until (RFC 3339; empty ends it) | Records how far the caller has read, which rooms they mute or unmute and whether they are in do-not-disturb, under their seat, and the marks of what a reader keeps. Every id it names is the one the engine gave the room, message or thread root (a UUID); any other is refused invalid naming the argument, and nothing is recorded. A cursor only moves forward, and past 256 rooms the one read least recently is forgotten. A mute is a ROOM AT A TIME, not a list: each named room is muted or unmuted and every other keeps its state, so two screens toggling two rooms at once both land. A mute that would take the set past 256 rooms is refused invalid rather than cut, and so is one room both muted and unmuted in one call. The answer’s read is the caller’s whole read state as the write left it, named by its handle; read.revision orders it against any other state of the same record. Not a record on the log: it is written to the coordination store and answers applied at no position. A flush whose write went out and whose answer was lost answers unknown (on /operator/act, the 503 with outcome: unknown): sending the same call again is safe, because a cursor only moves forward and a mute, an unmute or a do-not-disturb sent twice is stated twice. |
members is a list of handles, or of {handle, follow_all} where the member should hear everything said in the room. Each is a person’s because a seat corrects what it said by replying, not rewriting; rooms, settings and membership are the company’s furniture and a private room’s readership; and a read cursor is a person’s attention, which a seat, woken rather than reading, has none of.
Every chat verb is made as a seat, the reads included: a person writes and reads as the human seat they hold. A credential acting as itself — a Tier A token, a service account bound to no seat — is refused every one 403 unauthorized with reason unseated before anything is read; binding it to a human seat (crewlet iam bind) admits it.
Every one answers outcome and position like every other write, and is made once however often it is asked: through /operator/act a retry is the same request under the same Idempotency-Key, from which every operation is derived. The ones that state something (settings, members, words, tombstone, conversation) answer an unknown by offering the same call as harmless; create_channel says to look first, since a second create of a name that landed is refused as taken.
Moving a card on a board
Section titled “Moving a card on a board”place_work_item is a board drag: one item dropped beside another of the same project, in its own lane or into the next one, in one call. It is never a move to another project — that re-keys the item and everything under it, and is move_work_item, which a seat holds too.
| Argument | |
|---|---|
item | The item being moved, by key or id. |
before / after | The item it now sits directly above, or directly below — one of them, never both. It names a neighbour, never a position: the engine mints the new place inside its own write, as the board stands when the move lands, so two people dragging in one project at once both land where they dropped. |
status | The lane it was dropped into — send it even when it is the item’s own lane, which writes nothing on the item. Omitted keeps its own. With neither neighbour, it is a drop into an empty lane: the status changes and its place in the order does not. |
if_match | Required: the item’s version as the board read it. A move of an item somebody changed since is refused stale_version, and nothing lands. A move never changes the version itself, so dragging the same card twice needs no re-read. |
It answers {key, status, placed, rank, version, outcome, position}. A move across lanes is two records — the status change on the item, which is history and wakes the people on it exactly as update_work_item does, then the place in the project’s order, which wakes nobody. If the item changes between the two, the lane change stands and the answer says placed: false with a lane_changed_not_placed caveat. Dropping a card where it already sits writes nothing and answers applied.
A retry is the same call. The two records are steps of the call’s one operation — its op_id over MCP, the request’s Idempotency-Key over /operator/act — so a retry is answered from the ledger step by step. That is why the call sends the lane the card was dropped into, never the lane it reads now: left out after the first attempt’s lane change landed, the placement would be conditioned on the pre-change version and refused as stale by the retry itself.
Answering a parked executor
Section titled “Answering a parked executor”A seat’s executor that stops to ask a person something parks until it is answered. A reply on the conversation it was asked in answers it — but an executor launched by a task assignment or a colleague’s ask has no conversation, and one a schedule launched has its schedule’s, which nobody can reply into, so answer_executor answers any parked executor by naming its turn:
| Argument | |
|---|---|
turn_id | The parked executor’s turn_id, as GET /executors lists it. |
launch_id | Required: the executor’s launch_id as GET /executors listed it beside the question you read. An executor asks each question under a new launch, so one that has moved on to another question is refused stale_version and nothing is answered: read it again. |
choice | The id of the option chosen, where the question offers options (its decision in GET /executors). It must be one of them, and is refused invalid, naming the options, otherwise and on an open question. The executor reads it as the option’s label and id: Chosen option: <label> ()., followed by answer when both are given. |
answer | The whole answer to an open question, or what to add to a choice. One of choice and answer is required. The harness is launched again in the box it kept, continuing its own session with the answer as its next message, where the relaunch reuses that box (the box was kept, the member picked runs the same harness in the same cell, and the box is the resuming node’s to drive); otherwise afresh in a new box from the branch it pushed, told the question and the answer. The answer stays in the executor’s prompt, resent with every request, so it is at most 16 KiB; put anything longer on a page the executor can read and answer with where it is; a longer answer is refused invalid. |
It answers {"turn_id", "agent_handle", "question", "launch_id", "answer_id", "choice", "outcome": "pending"} (choice only where one was given). A model reading it (a seat’s, or an assistant’s over /operator/mcp) is handed the question fenced as
executor under the seat whose executor asked it, at external, and the
provenance envelope beside it (an executor’s ask is a harness’s own words, read at external wherever a model reads it); the act route answers a person the question as the executor asked it.
The answer goes on the control topic of the seat holding the executor, not its inbox, which is held while the executor holds it and worked oldest first, so an answer riding it could wait out the executor’s pause TTL. That node records it on the executor’s row as soon as it takes it off (its status reads answered), then launches the executor again with it as soon as the seat is free: its executor holding it for no other turn, no other of its turns running, no person’s pause. The resume is the first thing the seat does, ahead of its mail.
The answer is to the question the executor was waiting on when you gave it (launch_id), and resumes it only while it still waits on that one: if somebody else’s answer resumed it and it has asked something new, yours is announced not_awaiting, and so is one a reply too large for the executor to take reached first, which closed the question with no answer (answer_refused, below). What it became is read off the executor’s row in GET /executors: answered or resumed on that launch_id once taken; answer_id among its declined_answers if every attempt to resume the executor with it failed and it was let go of (the executor waits on its question again; answer it again); or a new launch_id if the executor moved past the question first. It is also announced on the event stream as executor_answered (resumed, not_awaiting, gone, declined, unoffered, or too_large for a chat reply too large to be recorded as the answer, whose refusal closes the question and is to resume the executor told so — followed by declined on the chat route if that refusal is let go of before any turn told the executor, the question then waiting again — or an answer by turn past 16 KiB, measured trimmed and before any secret in it is redacted), naming who answered: their name, its kind and the credential. A node that stops on the way to the resume leaves the recorded answer for the seat’s next holder. An unknown outcome is a delivery the broker never confirmed; answering again is harmless, since whichever copy arrives second finds that question no longer waiting.
Who may answer: whoever asked for the work — the seat its requester holds — or whoever leads the executor’s seat, or admin. Everybody else is refused forbidden.
It refuses stale_version for a launch_id that is not the launch the executor waits on now, already_answered for a question another answer was recorded against first (the first wins), naming who gave it and when (answered_by, answered_at on the executor’s row in GET /executors), and not_running for an executor that is not waiting for an answer or has no record (one that ended has none). A reply in the conversation too large for the executor to take closes the question the same way: the refusal says that reply was not taken and the executor asks again if it still needs an answer (answer_refused on its row). It is served on every company, whether it runs Worklet, Doclet and Chatlet or not: the executors’ record is the fleet’s, and a company on Jira runs executors too.
Pausing and resuming a seat
Section titled “Pausing and resuming a seat”pause_seat stops an agent seat taking work until somebody resumes it: it starts no new turn, its incoming mail waits on its inbox in order, and its scheduled runs are recorded skipped_paused rather than sent. The turn it is on finishes first, unless the pause asks to stop it — which also ends its executor in its box, at once. resume_seat lifts the pause, and what waited is delivered first. See Agent Runtime § Pausing a seat.
| Tool | Arguments |
|---|---|
pause_seat | handle — the agent seat; reason — one line, at most 500 characters, optional; stop_running — also end the seat’s running work: the turn it is on at its next round, and its executor in its box at once, the box reclaimed (executor_stopped). What was stopped is not run again; an executor parked on a question stays parked. With stop_running, the seat’s executor also changes nothing until the seat is resumed: a push from its box is refused, and its tool bridge session closes, refusing the call in hand and every call after it. |
resume_seat | handle |
Who may: the seat’s holder, whoever leads it, or admin.
Both answer {"handle", "outcome", "paused", "changed", …} — a pause adds paused_by, paused_by_kind, operator_id, paused_at, reason and stop_running. applied means the pause is the fleet’s record; the node holding the seat carries it out from its own copy, typically within a second. changed is false for a pause of a paused seat and a resume of a free one: nothing is announced. The exception is a pause that adds stop_running to a pause without it: the record is amended, names whoever asked for the stop, and is announced again. Each real change is announced once, as seat_paused or seat_resumed, by the caller whose compare-and-set won. unknown is a write the store may or may not have taken; a retry is safe.
They refuse not_found for a handle that names no agent seat (a person’s seat takes no work a pause could hold), invalid for a reason past its bound, and conflict after losing four compare-and-sets in a row to other changes to the same pause.
Running a schedule now
Section titled “Running a schedule now”run_schedule runs one schedule now, off its cron: its task goes to every seat the schedule wakes, as one more fire of the schedule’s own conversation, and its next scheduled fire is unchanged. See Scheduling § Running a schedule now.
| Tool | Arguments |
|---|---|
run_schedule | scope_type: role or unit; scope: the seat’s handle for a role schedule, the unit’s key for a unit one (a scope_id from GET /schedules is taken too); name: the schedule’s name |
Who may: whoever may pause every seat the schedule wakes (each seat’s holder, whoever leads it, or admin), asked about each, so a team’s standup is its lead’s to run, not any one member’s. Never an agent. A caller who may not is refused forbidden whether or not the schedule exists; only one who may is told not_found.
It answers {"name", "scope_type", "scope_id", "outcome", "changed", "runs"}, runs holding {"handle", "status", "trace_id"} for each seat: fired (sent now), already_fired (the same request again: the run it already made), paused (a person paused the seat, so it was not woken), not_ready (the seat’s inbox could not be readied, nothing was claimed, and asking again is safe) or unknown (the claim could not be read, or the publish after it failed: the schedule’s runs say whether it arrived). applied means at least one seat was sent the run; changed is false when this request sent nothing new. The operation is the request’s Idempotency-Key, so the same request sent again sends nothing twice. Each run is recorded in the schedule’s history as fired_manually.
It refuses conflict for a schedule switched off (enabled: false), a company with scheduling.enabled: false or with no model, a schedule nothing can run (a lead schedule on a unit no agent leads, an each one on a unit with no agent member) and a run every one of whose seats is paused, each in a sentence that says so; and unavailable on a node that publishes nothing (a maintenance mode) or where every seat’s inbox could not be readied. It writes no state log, so its answer carries no position.
Steering a running turn
Section titled “Steering a running turn”steer_turn sends a short note to a turn while it runs. The turn reads it at its next step — the next round of the engine’s own loop, after the tool call in flight returns, or, while the turn’s executor is in its box, its next launch’s brief, a step where its harness takes notes, or the review that judges its work — as a correction or addition to the work in hand, and keeps to it for the rest of the turn: the reviewer and every later executor iteration open with it too. See Turn Engine § Steering a running turn.
| Argument | |
|---|---|
turn_id | The running turn’s turn_id, as the agents push names it on each of a seat’s live_calls. |
note | What the turn should take into account, at most 2,000 characters. Longer is a brief, and belongs on the work item. |
It answers {"turn_id", "note_id", "agent_handle", "outcome": "pending", "reads"}: the turn took the note, and reads says when it reads it — next_step, or after_answer for a turn whose executor is parked on a question, which reads it once the question is answered. What became of it is recorded as agent_turn_steered:
delivered: names the phase and round that read it, the kind of step (boundary) and, for a read by the executor in its box, its launch (launch_id), withretoldwhere a later launch’s brief told it again after a step that took it never handed it over.expired: the turn ended first.missed: at the step that took it, that step’s reader never had it (a take whose answer was lost, or a note whose every serve to a Claude Code hook was lost) and no later launch whose job started told it.unconfirmed: at the job, the executor’s harness was handed it and never confirmed reading it; or at the last of a Claude Code hook’s serves, its harness gave up every lost serve of the note.
A Claude Code run’s note is recorded delivered at its hook’s step only once the job’s session shows the hook took it, when the job’s box is read at its collection, a stop or a loss. note_id is the request’s own id, so a retry of one request is one note.
Where it goes: a turn whose executor has launched in its box keeps its notes on the executor’s record in the coordination store, which every node reads, so this node files the note there itself — sealed under the fleet keyring — and asks nobody. A turn that has not launched one holds its notes on the node running it, and the note is scattered to that node.
Who may: the turn’s seat’s holder, whoever leads that seat, or admin. Once the turn’s run is out, the seat is the one the run’s record names under a sealed anchor; a record whose anchor does not open decides nothing, and the note is refused unavailable with no Retry-After, the tool’s sentence saying why. Before that this node cannot know the seat (the turn runs wherever its seat is held), so admin is admitted at once, a caller who leads nobody is refused at once, and anybody else is decided after a PROBE asks the fleet whose turn it is, without offering the note. A probe nobody answers inside two seconds is unavailable.
unknown means no node answered the OFFER inside two seconds. A reply lost on its way back is indistinguishable from none, so the note may have been taken; sending it again is safe.
It refuses not_running for a turn that has ended, notes_full for one already holding five notes it has not read yet (send again once it reads them), notes_spent for one that has taken the ten notes a turn takes (sending again changes nothing: put the rest on the work item), and invalid for an empty or oversized note. Where the run’s record could not be read or written, the answer is what stopped it: unavailable for a condition of the node or the fleet, such as a coordination store that did not answer, with a Retry-After where waiting clears it, and internal_error for a fault of this node’s own, such as a record it cannot decode, which no wait clears. A filing the store did not answer may have landed: sent again under the same Idempotency-Key it is the same note, so the turn never takes it twice.
The note is signed: a scattered request and the running node’s answer are signed under the fleet keyring and bound to that one request, and a note on a run’s record is sealed under the same keyring, bound to its turn and its id — so nothing else reaches a turn
(ADR-0031,
ADR-0067).
An answer the asking node cannot believe reads as unknown. A running node that does not hold the key the note is signed under takes nothing and says so, and a run’s record whose seat is sealed under a key the asking node does not hold decides nothing: the tool refuses either unavailable with no Retry-After. Its sentence, which your assistant reads over /operator/mcp, says that an administrator needs to give the nodes the same keys; over /operator/act the refusal carries no detail (ADR-0060), so the person steering is answered in the code’s own message. The keys the running node holds are in its log (steer_request_refused, held_keys) and the asking node’s (steer_turn_unverified, which names the node running the turn as running_node beside its held_keys), and the keys an asking node holds that do not open a record’s seat in its own (steer_seat_key_unknown): bring secrets.keys into agreement across the fleet, and send the note again.
Answering a question from the company’s knowledge
Section titled “Answering a question from the company’s knowledge”answer_knowledge answers a person’s question — the dashboard’s ⌘K answer — from what the company has written down: it searches the knowledge base (hybrid, auto-drafts hidden) for five pages and Worklet for three items, reads each WHOLE where this node holds it (a Doclet page’s body, an item’s description; an external wiki’s search snippet, said to be one), condenses any source past 4 KiB for the question with the same auxiliary model — never cut — and asks one model to answer from those sources alone, citing each claim as [n]. A source that cannot be condensed is dropped from the answer and from its sources alike. See Knowledge System § Answering a question.
| Argument | |
|---|---|
q | The question, in plain words; at most 400 bytes — a longer one is refused, never cut. |
It answers:
{ "answer_md": "Run `make deploy` from `main` [1]; it is being automated [3].", "sources": [ {"kind": "page", "ref": "0f7c…", "title": "Deploy runbook"}, {"kind": "page", "ref": "5a1d…", "title": "Rollback"}, {"kind": "task", "ref": "ENG-7", "title": "Automate the deploy"} ], "tokens": {"input": 7120, "output": 184}, "model": "claude-haiku-…", "cached": false}Source [n] is the n-th entry of sources: a page by its id (and its url, for a page on an external wiki), a work item by its key. tokens is what this call spent, and nothing converts it to money. A question nothing matches is answered in one sentence with no sources, no model and no tokens.
Only a caller who holds a seat may ask. It takes either app — it searches the pages only for a doclet holder and the board only for a worklet holder, and keeps the two answers apart in its cache — and runs on the auxiliary model of the seat the identity directory binds the caller to (every person’s, and a token’s bound to one). A principal no seat binds, a pipeline’s token or a service account bound to none, is refused 403 unauthorized with the reason unseated and no permission named, on every transport, rather than answered on the company’s default model, because spend must be attributable;
viewer.acts does not offer it such a caller either. No seat is given it: a seat has
search_knowledge and a model of its own.
It is charged to the company’s windows. The model is the asker’s seat’s auxiliary one (llm_auxiliary, falling back as every auxiliary pass does). A person has no seat budget, so before any model call it reads the company’s day, week and month and refuses budget_exhausted — naming the window that ends last and when it resets — if one has no room; after the call it records exactly what the reply spent on the company’s counter alone, past a ceiling included. It is a write rather than a read because every answer that misses the cache is a model call, and the dashboard’s reads are refetched on focus and on reconnect.
A repeated question spends nothing. Answers are cached on each node, 256 of them, keyed on the question (case and spacing folded) and the node’s corpus position — where its tracker, pages and vector rows last changed — so any write that could change the answer retires every older one, and no read does. A cache hit answers "cached": true and "tokens": {"input": 0, "output": 0}, and is served even while the budget is spent. A company that does not run Doclet has no position to key on, so its answers are never cached.
It refuses invalid for an empty question, forbidden for a caller no seat binds or a seat the chart no longer has, budget_exhausted as above (with detail in a person’s words and remedy: {"setting": "company_token_budget"}), and unavailable for a counter the coordination store did not answer for (nothing is spent; a counter this node cannot read for a fault of its own is internal_error, which no wait clears), a knowledge base and tracker that could not be searched at all, no model configured, or a model that failed or wrote nothing — a reply that spent tokens and wrote nothing is still charged. Over /operator/act an unavailable other than a usage limit’s (below) carries no detail (ADR-0060), so the person reads its code’s own sentence; the tool’s words are a model’s, over /operator/mcp. One that no wait clears carries no Retry-After: no model set up, a login the model’s harness reports refused or missing, or a call this node can’t make at all (a harness it can’t start, a prompt it can’t render). A model at a usage limit its harness reported is a wait rather than a failure: nothing is launched, and the refusal carries the seconds until the model is tried again as its Retry-After, a person’s words for the limit as detail, and remedy: {"setting": "model_providers"}, the company’s models, where an administrator gives it a fallback
(ADR-0064).
A slow or failing model, and the rest, carry one.
One catalogue, and how a retry is the same call
Section titled “One catalogue, and how a retry is the same call”Every operator transport reaches a tool through one dispatch over one catalogue, built per request from this node’s Worklet, Doclet and Chatlet halves. A verb, its schema, its hints and its refusal wording therefore never differ between transports, and a node handed its first company serves its tools on the next request. Each tool’s hints (read-only, destructive, idempotent, open-world) are the catalogue’s own; a verb this company is not served is not listed.
An MCP call names no request of its own, so each one is a new operation, and a
write (Worklet’s, an artifact’s or a datastore’s) answers the op_id it was:
sent back with exactly the same arguments, it finishes that write rather than
making another (see What it serves). An assistant that files
the same item twice without one gets two items.
/operator/act takes the
operation from the request’s Idempotency-Key, scoped by the principal, and
derives every operation it writes from it, so a retry of that one request (sent
again after an unknown) is the first attempt’s operations, not new ones. This
covers a create, a comment, an update, a page write, a project or catalogue
change, a saved view and a person’s own marks, pins and queue.
Each tool appears only where the company runs its half: a company on
tracker.backend: jira gets the page tools and not the work tools, one off
Chatlet gets no chat tool, and one native in none of the three gets only the
verbs about the fleet’s own records (answer_executor, pause_seat,
resume_seat and steer_turn), which every node serves, so the catalogue is
never empty. A node not yet handed a company answers 503 no_active_revision
with a 15-second Retry-After, and serves the tools its first revision brings
up with no restart. search_knowledge and answer_knowledge are offered
against any knowledge backend, Confluence included.
A half’s reads and writes are offered apart. A node that serves a half’s
reads and hands out no writer for it (any node started in a
maintenance mode) offers its read
tools (list_work_items, get_page, read_project_file and the rest the act
transport does not serve) and none of its write tools. What appends to no log
stays: the four fleet-records tools, search_knowledge and answer_knowledge.
The catalogue follows what the node runs, without a restart, because each request builds it from what the node serves then. It follows:
- the revision that hands a node that booted with no company its first one (the live bootstrap);
- a revision that adds or removes a vendor’s knowledge backend, rebuilt live;
- a rename of the company, which titles the MCP server.
A revision that reconfigures the knowledge backend it has (another Confluence
site or space, a rotated credential) changes no tool: search_knowledge and
answer_knowledge reach the backend the node holds at each call. A revision
that turns a native half on or off on a node that has run a company (its first
native half included), or switches one to a vendor or back, changes nothing
until the node restarts, as
A native backend changes at a restart
says for every surface. Nothing is held for a client between requests, so a
change ends nobody’s connection; a listing is answered by whichever node it
reaches, which in a fleet may not have applied the revision yet.
A listening assistant is told when its tools change, by the whole fleet.
The server advertises tools.listChanged. A client on the 2026-07-28 MCP
protocol that listens (a subscriptions/listen stream, which the Go SDK’s
client opens at connect whenever it is handed a tool-list handler) is sent
notifications/tools/list_changed on that stream, and lists again. The stream
is one POST held open until the client ends it, its connection drops, or the
node’s listener shuts down, which answers every stream it holds as it begins,
so a listening assistant never holds a node’s shutdown. It is told:
- once as its stream opens. A client usually lists before its stream exists, and that listing can predate a change; told once more, it lists again.
- whenever what any ingress node’s catalogue is built from changes: each
node announces the change to the fleet (
operator_tools_changed), and every node tells every stream it holds. Nodes apply a revision on their own clock (a company’s first apply takes seconds) and a listing reaches whichever node a load balancer picks, so one made after the first node’s announcement can be answered by a node that has not applied yet. The last notification a client receives follows the last node’s change, so the listing it makes then is the new catalogue wherever it lands.
This holds while the stream is open and the broker carries the announcement,
which like every announcement between nodes is best effort: an unreachable node
does not relay it. A stream ends when its node shuts down (answered, not cut);
whether the client opens another is the client’s, and the Go SDK’s does not, so
an assistant listening on a node that has since stopped is told nothing more
until it reconnects. A client on an earlier protocol has no stream (its GET
is answered 405) and sees new tools the next time it lists or reconnects:
after a revision that brings or retires a backend, have it list again or
restart it.
A request body is at most 4 MiB. Every tool’s arguments fit far below it
except write_project_file’s content, which carries the whole file in one
string; a larger file goes up through
PUT /worklet/files/{project}/{path...}, which streams
it.
The turn-only tools are deliberately absent: the memory tools (a diary belongs
to a seat), the skill tools (a skill is loaded into a phase) and a2a_ask (a
colleague’s answer wakes a seat, and nobody here is reachable that way).
Answering a run a seat started is answer_executor.
Seeding a knowledge base with it
Section titled “Seeding a knowledge base with it”On Doclet this endpoint is also how a directory of version- controlled markdown gets published; there is no import CLI:
Publish everything under examples/nimbus-docs/ — one container per
directory, the page title from each file’s first # H1.
The assistant calls write_page per file, which handles the parent chain, a
title that already exists (save_page with the version it read), and a file
that is a tool skill rather than prose. The
reserved containers
are refused to a seat and not to it. A tool skill takes admin rather than
doclet (it is injected into every seat’s turn, so writing one is a
configuration change); a token without it is refused pages.skill.write.
Who a write is attributed to
Section titled “Who a write is attributed to”The person or credential the request resolved to, converted once for every surface that has a request rather than a turn: this one and the write surface below.
| Who is calling | Recorded as | Author kind | operator_id |
|---|---|---|---|
| A person signed in at a browser — every person holds a seat | the seat’s handle | human | session:<lineage> |
| A person’s own machine token | the owner, as above — their seat | human | pat:<credential id> |
| A service account’s machine token | the account’s login (svc:ci), or its seat when bound | human when bound, operator otherwise | pat:<credential id> |
| A Tier A token | its whole login (token:ops), or its seat when the directory binds it | human when bound, operator otherwise | its login (token:ops) |
A Tier A token’s exchanged session (POST /auth/token) | as the token, above | as the token | session:<lineage> |
The seat half lets Worklet leave you out of the wake your own change sends: it
recognises the author by the name the record carries. The login half keeps the
colon: token:ops can never be a seat’s handle, where bare ops could be, so
an own-record rule comparing names never admits a credential into the record of
the seat that shares its spelling.
Chat has no login arm. A room renders a speaker by seat and a private
room’s contents are decided by its membership, so a credential acting as itself
is refused every chat tool, reads included, 403 unauthorized with reason
unseated, admin included. The exception is the three
destructions, which are said in nobody’s
voice and recorded by this table like any other write.
The credential is recorded again beside the author, as operator_id on
every work, page and chat record and every configuration revision, so an audit
can ask what one credential did. A machine token acts as its owner (their
authority, so they are the author), and operator_id (pat:<id>) tells a write their
assistant made through it from one they made themselves. A browser session
records its session:<lineage>, which of their sign-ins made the write, so two
browsers or a tab left open on a shared machine are distinct in every trail.
The lineage leads from a row to the sign-in behind it:
GET /iam/people/{id}/sessions lists it, and iam_session_started announced it. A
configuration revision and a stored secret record all three the same way:
created_by / updated_by is the author, created_by_kind / updated_by_kind
its kind, and operator_id the credential (the token’s own row is swept a week
after it lapses while a revision is kept for ever, so the credential cannot
stand in for the author). A Tier A token is recorded as token:<id> in both;
the engine’s own writes (the reconcile loop, a boot import, a key the engine
minted) record their own name, of kind system, and no credential, except the
writes a disconnect makes, which the loop carries out for
whoever asked and records as theirs. The identity estate’s own audit events
(iam_credential_revoked, iam_session_ended,
iam_session_generation_bumped, …) carry it as operator_id beside by, and
the trail GET /iam/audit reads carries it beside actor, except on a removal
and a company-wide invalidation, whose records are gates pinned at their first
version for ever, so the event announcing each carries it instead (see
GET /iam/audit).
There is deliberately no way for the caller to name a seat to act as: anybody holding the token could write as anybody, and an author field chosen by the writer is not an audit trail.
Every call is decided by the request that carries it
Section titled “Every call is decided by the request that carries it”The endpoint is served statelessly: it issues no Mcp-Session-Id, opens no
server-to-client stream (GET and DELETE answer 405 with Allow: POST),
and decides each JSON-RPC call as the credential the POST carrying it
presented. So:
- A permission withdrawn is withdrawn from the next call. Restarting a
node with
api.auth.admin: refuse, editing a person’s permissions, revoking their session or removing a token takes effect on the assistant’s very next call, however long it has been connected. - A session id is not a credential. A request presenting a different credential is decided as that credential, whatever headers it copies.
Nothing this surface serves needs a stateful session: its tool list is read per
request, the one thing it pushes (that the list changed) goes down a listen
stream that is itself one POST
(above), and no tool asks the
client anything back. A fleet’s ingress nodes behind a load balancer need no
session affinity, and a crashed client leaves nothing behind on the node.
Every call that is not a proven read also leaves one operator_acted event
(the record a dashboard press leaves, with transport: "mcp") in the node’s
event store: see the runtime audit.
Why it is not under /mcp/
Section titled “Why it is not under /mcp/”/mcp/ is exempt from authentication wholesale, because the sandbox
tool bridge
lives there and a box running generated code holds no API token (a signed
per-run token in its own path authenticates it). A writable company surface
there would sit behind no credential. /operator is its own always-guarded
prefix, alongside /config and /secrets.
/operator/act — the dashboard’s write surface
Section titled “/operator/act — the dashboard’s write surface”The dashboard changes the company as you: every button that writes posts
one tool of the operator catalogue here,
made by the principal your request resolves to. It is the same catalogue,
tools, authority and attribution as /operator/mcp; this transport adds only
how a call names its operation, so a press whose answer never arrived can be
sent again safely.
POST /operator/act/update_work_itemContent-Type: application/jsonIdempotency-Key: 0192f1a4-9b2d-7e51-8c3a-6d7e8f9a0b1c
{"args": {"item": "ENG-8", "status": "in_progress"}}The dashboard’s request carries its session cookie; a script sets
Authorization: Bearer as on every other route.
Every principal the guard resolved may call it
(ADR-0024),
and every tool is decided by the authority table
as on every other surface: a person signed in writes as the seat they hold, and
a credential bound to no seat (a Tier A token or an unbound service account)
writes under its own login. Nobody is refused for being unbound. GET /viewer’s
acts names what this route would serve the caller, so a screen disables a
control with the reason rather than offering a press the engine refuses. A
write whose rule asks a recent proof of identity (code_purge_unreachable)
answers a caller whose proof has aged 403 step_up_required, which the
dashboard’s step-up ceremony turns into a fresh proof and the same press again.
Who the write is attributed to is the one rule every surface with a request applies, so a dashboard write and the same person’s assistant’s read identically in the audit and every thread. The principal is resolved once per call, at admission, and the write and its audit record both name that answer: a directory rebind or a revision applied while the call runs applies from the next call.
The body is JSON and nothing else: {"args": {…}}, declared
Content-Type: application/json (UTF-8). A form post, text/plain or no
content type is 415 before anything is read (a cross-site form can send those
without a preflight), and a key the envelope does not take is
400 invalid_body. args is the tool’s own arguments, named as its schema names
them, and its numbers reach the tool exactly as written: an integer past 2^53
is never rounded, as from a seat or over /operator/mcp. The body is capped at
1 114 112 bytes: twice the largest legal page (a page escapes to up to twice its
length as a JSON string), plus 64 KiB.
The Idempotency-Key header names a retry, and it is required. It is an
operation id the client mints once per gesture, a UUIDv7, and sends again,
unchanged, if it never heard the answer. An absent or malformed one is
400 op_id_invalid naming the header (an engine-minted key would come back in the
very answer a retry exists because it never received). It must carry its own
instant, the gesture’s start: every retry reproduces it, and a node reads it to
decide whether its operation ledger can still vouch for the operation. The key
is scoped by the principal’s id, so one key from two people is two requests
and nobody can make their write the first attempt of somebody else’s. Every id
the write derives (each record’s operation, a created item’s, page’s or view’s
own id, a comment’s, a chat message’s) comes from the key and what the call
sent, so a retry is the first attempt’s operations, and two different calls
under one key are still two; one whose operation now meets another object is
409 invalid_input, to be sent under a new key. The arguments may not carry an
op_id: the header names the operation, and a second answer is
400 invalid_body before anything is written. A retry then behaves as follows:
- one whose append reaches the log while the first attempt’s is in flight is
collapsed into that record by the log’s two-minute duplicate window, and
answered at its position. One arriving after the first attempt’s record waits
until this node has applied it (or answers
unavailableif it does not catch up), and is then decided as below; - a create retried after the first attempt landed files under the same id and
address, so it is refused
exists, and a page save retried after it landed is refusedstale_version; each signals the first attempt went through: re-read rather than retry again; - any other retry is decided again against what the first attempt produced. A
comment edit to the text it already holds, or a rename to the title the page
already has, is
appliedwith no record; anything else is written again under the same operation (a comment under the same comment id).
What it answers
Section titled “What it answers”A write that went through answers 200:
{"tool": "update_work_item", "outcome": "applied", "position": "CREWLET_TRACKER_LOG@1:4711", "op_id": "0192f1a4-9b2d-7c03-a4e1-5f3b9d0c7a12.k3f9a1c0d2e4b6a88", "receipt": {"key": "ENG-8", "labels_created": null, "outcome": "applied", "version": 4711, "position": "CREWLET_TRACKER_LOG@1:4711"}, "caveats": [{"code": "date_truncated", "action": "none", "message": "Launch holds a date without a time, so it was saved as 2026-03-04, the day 2026-03-05T04:00:00Z falls on in America/Los_Angeles."}]}outcome is the write’s three-valued answer and position where its record
landed, the value a read hands back as min_position so the answer after the
write includes it. pending is durable and not yet applied here; unknown
means the broker never said, and the only safe retry is the same request under
the same key. A write that appended nothing answers applied at a null
position: the state asked for already holds. op_id is the operation the
request was made under (the key as this principal’s operation, named by a
tag of their id, so sending it back as the header is the same operation as
sending the original key). receipt is the tool’s own answer, verbatim except
for its warnings, with what somebody else wrote in it as stored: a room’s
topic and purpose, a page’s title, a parked run’s question, which the same tool
answers a model fenced and labelled (see
Text somebody else wrote).
caveats is what the write tells you beside its outcome and was not refused
for: an item filed to triage because the project’s default assignee has left
the org chart, a timestamp stored as the day it falls on, a description naming
more items than are linked. It is always a list, empty when there is nothing to
add, and each entry is written for a person:
code: the kind of caveat, stable to branch on (unaddressed_comment,default_assignee_gone,body_links_capped,date_truncated,tag_near_duplicate,filed_earlier_unread,filed_earlier_removed,lane_changed_not_placed,dependencies_not_recorded,move_unfinished,move_waiting,subtree_unfinished,datastore_pending,file_finding). A write that landed part of what it was asked (an item filed whose dependencies were not recorded, a move or a removal whose walk stopped) says so here, never in a field of the receipt: an agent reads the same in its own words under that field, which this route takes off.message: one or two sentences in the words of the screen, naming no tool, argument or internal id.action:requiredwhen something stays as it is until somebody acts (a setting that no longer works),nonewhen it is only something to know. The dashboard keeps arequiredcaveat on screen until dismissed and lets anoneone go by itself.
The same tool called by an agent answers the same caveats under warnings, in
words for a model that name the tool and argument to use next. This route
answers people, so it answers caveats and takes warnings off the receipt
with every other key written for a model: a partial outcome’s sentence, and the
provenance envelope a fenced answer carries beside the words it labels
(ADR-0060).
A tool that appends more than one record (an item filed or edited together with
a dependency, a page saved and renamed in one call, a project’s tags and
settings, the catalogue’s types and fields) answers for all of them: the
least certain outcome (unknown over pending over applied) at the
latest position, and for a work item the version it is at after the last
record. So min_position never floors a read below a record the call made, and
a write with one unconfirmed record is never reported applied. A later record
refused after an earlier one landed answers the later record’s refusal, and its
detail says what did land, with that record’s outcome and position, because
the earlier change is on every data node and “not made” would send a person to
redo it.
A refusal is the engine’s envelope, {error, message} with tool and the
object the arguments named (item, page, container for a page not written
yet, project, handle) beside them. Every sentence on it is written for a
person (ADR-0060). message is the code’s own sentence. detail, where
present, is the refusal in a person’s words, naming what to change or whom to
ask; a refusal nobody has worded for a person yet carries no detail, and
its message stands alone. The sentence the same tool answers a model with is
never on this answer. The authority table’s refusal adds the rule’s reason
and the grants that would have admitted the caller; an argument the tool does
not read is named in fields; the route’s own refusals below carry the code
and tool alone. The status is read from the refusal’s CLASS, never from its
sentence, through the one mapping the human write
surface answers with too. The transport’s own codes:
error | Status | When |
|---|---|---|
invalid_token | 401 | Nobody presented a credential (the guard’s own refusal) |
identity_unavailable | 503 | This node cannot read its identity estate, with a Retry-After |
seat_unavailable, second_factor_enrolment_required | 403 | The guard’s refusals of somebody it resolved — see Auth |
reader_changed | 409 | The request names, in X-Crewlet-Reader, a principal the credential is not — see Auth; nothing ran, so a retry under the same key is no write of the new principal’s |
csrf_origin | 403 | A cross-site write |
unauthorized | 403 | The authority table refused: reason and grants say why and what would admit the caller |
step_up_required | 403 | The verb needs a fresher proof of who you are; names the window |
unknown_tool | 404 | The company’s catalogue serves no such tool |
read_only_tool | 400 | The tool is a read; ask it over the socket or its REST route |
unsupported_media_type | 415 | The body is not declared application/json |
op_id_invalid | 400 | The Idempotency-Key header is absent or outside the operation grammar |
invalid_input | 409 | The key already names a write to another object |
invalid_body / body_too_large / unreadable_body | 400 / 413 / 400 | The envelope is not one JSON object of {args}, carries an op_id, names an argument the tool does not declare, is over the cap, or did not arrive |
no_active_revision | 503 | This node has not been handed a company yet; Retry-After: 15 |
draining | 503 | This node is draining |
starting | 503 | This node is still starting: its listener is bound and the surface that serves this route is not up yet; Retry-After: 10 |
And the tool’s own refusal, carrying its person’s words as detail where it
has them, never the tool’s model-facing sentence. A conflict or an exists a
native domain decided (a room archived, an item in the trash, a label another
tag carries, a write that lost its race), a write about something deleted, and
an unavailable about a condition of the node or the fleet (a node behind its
log, a full log, a store that didn’t answer, a note the node running a turn
couldn’t verify, or an executor’s record whose seat this node couldn’t open
because the fleet’s nodes don’t hold the same keys) have none yet, so each
answers its code’s own message alone, the condition’s in step with the
answer’s Retry-After.
The dashboard shows a refusal’s detail in place of its own sentence for the
code. Its class decides its status:
error | Status |
|---|---|
invalid | 422 |
not_found | 404 |
forbidden | 403 |
stale_version, conflict, not_ready, exists, already_answered, reassignment_budget, inbox_full, quota_exceeded, notes_full, notes_spent, not_running, budget_exhausted | 409 |
store_full | 507 — the object store has no room for what the tool would store: nothing was stored or recorded, and no Retry-After, since the same call is refused the same until an operator makes room |
unavailable | 503 |
internal_error | 500 — a fault of the node’s own store or code: a fixed sentence, the error itself only in the node’s log, and no Retry-After, since no wait clears it. It is also the answer for a failure that carried no class |
Which class a refusal is
Section titled “Which class a refusal is”One rule for every domain (the tracker, the knowledge base, chat, the artifacts and their datastores) and every surface that answers one: a seat’s tool, your assistant and this route. A refusal is classed by what it is about and what would make the same request land:
- The request itself is
invalid(422): an argument outside its grammar, a value past a limit of its own (a message’s bytes, the members one call names, the views one gesture pins), or an argument naming another object that cannot take part (a parent in the trash, a blocker at its dependents’ cap, an archived task type, an archived destination project). Nothing anybody does makes the same request land; another one does. - A collision is
exists(409): a name, title, label, address or id the call gives an object is another object’s already (a page title in its container, a room’s name, a tag label another tag carries, a label another version of an artifact holds, a source address another of the owner’s artifacts holds), and so is a create of an object already there. The request is well formed: another value lands now, the same one once its holder gives it up, and thedetailnames the holder, because using it is often what you meant. - The object the call is about (or the container it writes into: a room, a
project, an artifact) not being there is
not_found(404); gone for good is the same. - That object in a state that refuses the gesture until somebody changes it
is
conflict(409): a room or project archived, an item frozen in the trash, an artifact in the trash or being purged, a restore with nothing in the trash, and the object’s own contents at their cap (a message carrying all 32 distinct emoji it may, a project keeping all its tags, a task’s watchers or checklists, a person’s pins, every label an artifact keeps in use). Read the object again: the same request lands once whoever thedetailnames reopens, restores or makes room, not before. A write that lost its race isconflictfor the same reason. - A change that does not meet its target’s merge gate yet is
not_ready(409): the same request lands once every precondition is met. A tool’s sentence names each unmet one and who clears it, and this route’sdetailsays the same in a person’s words. The change’s readiness (code_get_change, or the change’s page) names every precondition with where it stands. - A limit with a class of its own is that class, because what lifts it is
not a change of the object and a surface names the remedy:
quota_exceeded(the company’s plan),inbox_full(a person’s marks),reassignment_budget(an item’s hand-offs, which must not invite another attempt),notes_full(the notes a running turn holds unread),notes_spent(the notes a turn takes, which must not invite one either) andbudget_exhausted(a token window).
A refusal of one of Gitlet’s writes also names
Gitlet’s own word for it in refusal (head_moved, target_moving,
queue_full, gate_unmet, the write’s conflict and the rest of each family:
gitlet.MergeRefusals, the write and change refusals) beside the class in
error. Several share one class (a change whose head moved and a train whose
base moved are both stale_version; a target still moving and a full queue
both conflict), so a client that answers each in its own words reads
refusal rather than parsing detail. The change page’s merge controls do,
and draw the detail the engine writes for the merge refusals only it can word
for a person: gate_unmet, source_refused, repo_size and not_permitted.
A refusal that is not Gitlet’s carries no refusal.
A 422 invalid refusal that one field decided also names that field in
fields, as the request spells it: a Gitlet write’s (close.reason,
review.findings[2], owner) or a code tool’s argument. Its sentence never
travels; a client says which value was refused in its own words, and the
dashboard names a field a person fills in by what its form calls it and any
other as the value the page sent. A refusal no one field decided carries no
fields.
Every 503 carries a Retry-After where waiting can clear it and none
where it cannot (an evicted node, a full log, a record this node cannot
decode): ask another node, or an operator. A call interrupted before the tool
answered is 503 unavailable, never a refusal: whether it landed is unknown,
so the answer carries outcome: "unknown" and the op_id, and says to send
it again with the same key. A tool that made its write and could not confirm it
(the broker’s acknowledgement was lost) is answered the same way, naming the
object to read; one this node’s operation ledger cannot vouch for adds
unvouched: true and no Retry-After, because the same request asked here
answers the same way until the write reaches this node: ask another node, or
read whether it landed. That key tells either from a tool’s own unavailable
refusal (a node in maintenance, a sealed log), which wrote nothing and carries
no outcome. No transport code is also a refusal class, so a client otherwise
branches on error alone. The dashboard reads any other 5xx (a gateway that
gave up waiting, a success whose body was cut short) as unknown too, since an
engine may have written.
Every act is logged as operator_act at info with the tool, the operation and
the outcome or refusal, never the arguments, and every act that reached its
tool leaves an operator_acted event with the same facts in this node’s event
store, whatever became of it: see
the runtime audit.
The human write surface
Section titled “The human write surface”Everything a person does to the company’s own work and pages (filing an item,
moving it, commenting, arranging a board, writing a page, taking one out of
circulation) and the three things an administrator does to its chat that no
tool does, as HTTP routes, under the name of whoever the request resolved to.
They are the same tools a seat holds in its turn and your assistant holds
over /operator/mcp: a route’s body is the
tool’s own arguments, by the tool’s own names, and its answer is the tool’s own
receipt, so “file an item” has one implementation and its trimming, defaults
and refusals cannot drift.
A body is exactly one JSON object (a second value after it is
400 invalid_body), and its numbers reach the tool exactly as written: an integer
past 2^53 (a vendor’s 19-digit id, a whole-number custom-field value) is never
rounded. Where a route takes a version, an If-Match header supplies it as the
number you read, and one that names no version ("three", a negative, or a
number of 2^63 or more) is 400 invalid_body; a body that names the same
argument must name the same version as the tool reads it (3, 3.0 and "3"
are one version), and anything else (another version, a fraction, a negative,
text that spells no whole number) is 400 invalid_body.
Every route is guarded, reads and writes alike, and the half the company
does not run is absent rather than refusing: a company on
tracker.backend: jira gets 404 no_route from the work routes, and one on a
vendor’s chat from the chat routes. The routes are mounted on every node and
read the halves each request finds, so a node not yet handed a company answers
them 503 no_active_revision with a 15-second Retry-After; Worklet, Doclet
and Chatlet come up with its first revision, and the same request is served
from then on with no restart.
The routes, and the authority each takes
Section titled “The routes, and the authority each takes”The authority is the authority table’s, decided ONCE. Where the object is in the path (a project) the route decides the verb itself. Where it needs a stored row (which project an item is filed under, which space a page is in, who wrote a comment, whose record a person’s name is: a login is its holder’s, which only the identity directory can say) the route admits on the weakest honest precondition and the verb is decided once the row is read, by the tool’s own ask or, for a verb with no tool, by the route.
| Method | Path | Does | Decided by |
|---|---|---|---|
POST | /worklet/items | create_work_item | worklet |
PATCH | /worklet/items/{key} | update_work_item. If-Match is its if_match; an item changed since is 412 version_moved | worklet; re-routing asks the project’s lead |
POST | /worklet/items/{key}/comments | comment_on_work_item | the route admits everybody (work.thread); the tool decides once the item is read: worklet, or (for the answer to an open ask that names the caller, and nothing else) the person asked, with no app (You may answer what you were asked). A choice of an agent’s grant request’s option (grant-r<id>-t for the request’s hours, grant-r<id>-p for good) is also the approval (ADR-0118): decided as setup.access.write and, where the grant raises, setup.access.raise (step_up_required on a proof past the window, token_refused for a machine token raising, 403 for a seat); the grant the stored request asks for is saved as one revision, then the answer is posted. A lapsed request, or a grant the catalogue no longer gives, posts nothing |
PATCH | /worklet/items/{key}/comments/{cid} | Rewrite a remark’s words: {"body": …}. Only the words change; what the remark asked, the answer that closed it and whom it woke are kept, so an answered question is not reopened | its author, with worklet: the table admits admin too, and Worklet refuses anybody but the author, since a remark somebody else can rewrite is attributed to a person who did not make it |
DELETE | /worklet/items/{key}/comments/{cid} | Take a remark down: its row stays with its words blanked, so replies still read in order, and its post’s history row and inbox notices stop quoting it. A remark that asks somebody something, or answers a question, is refused invalid_body: a question is withdrawn by its asker or answered, an answer is edited | its author, or admin as a moderator, with worklet (work.comment.remove) |
POST | /worklet/items/{key}/rank | place_work_item, a board drag: {"after": ref} or {"before": ref} (one neighbour, never both) and the status lane dropped into. If-Match is its required if_match; a move of an item changed since is 412 version_moved | worklet, and never a seat |
POST | /worklet/items/{key}/depend | update_work_item’s waiting_on, blocking and dependency_note, and nothing else; If-Match is its if_match | worklet |
POST | /worklet/items/{key}/relate | update_work_item’s linked, linked_pages and linked_entries, and nothing else; If-Match is its if_match | worklet |
DELETE | /worklet/items/{key} | remove_work_item ({"subtree": true} takes its children) | the item’s reporter, the lead of the item’s own project, or admin, with worklet; subtree is the lead’s or admin’s alone |
POST | /worklet/items/{key}/restore | restore_work_item | the same |
POST | /worklet/items/{key}/move | move_work_item: {"project": "OPS"} moves the item and everything under it. A move whose walk stopped after the item itself moved answers 200 with the item’s receipt, subtree_followed of subtree_total, and a move_stopped instruction: the same Idempotency-Key finishes it (the answer’s op_id, sent back as that header, is the key even when the request sent none); a new one is refused as somebody else’s move | the lead of the item’s own project, or admin, with worklet |
POST | /worklet/items/{key}/purge | Destroy it and every row it produced; see below | admin, a recent proof (step_up), and never a seat |
PUT | /worklet/projects/{key} | write_project’s policy: fields, default_assignee, archived | the project’s lead or admin, with worklet; archiving never a seat |
POST | /worklet/projects/{key}/tags | write_project’s tags_add, tags_rename, tags_archive | declaring: worklet; renaming and archiving: the project’s lead, with worklet |
POST | /worklet/views | save_work_view | {"personal": true} makes it the CALLER’s own view (its owner is always the caller’s own record; nobody else’s can be named; a shared one is its container’s lead’s). A save naming a stored view’s id also needs that authority over the view it replaces. An id must name a stored view (else 404 not_found); a new view is saved with none, its id minted and answered. With worklet. Only a shared view can be default |
DELETE | /worklet/views/{id} | delete_work_view: the view leaves every strip, the views list and every pin, and running it is refused; the row stays, stamped with who deleted it. An id no live view holds is 404 not_found | whoever may replace the view, decided on the stored view’s owner and container as a save’s replacement is; a protected view only its owner. With worklet |
PUT | /worklet/catalogue | write_work_catalogue | admin |
PUT | /worklet/people/{handle}/inbox | mark_inbox; see below | the person, or admin, with worklet |
PUT | /worklet/people/{handle}/pins | set_pins | the person, or admin, with worklet |
PUT | /worklet/people/{handle}/priorities | set_priorities ({"items": [...]}) | the person, whoever leads them, or admin, with worklet; never a seat reordering a colleague |
POST | /doclet/pages | write_page | doclet, and only in a space the company declares (Who may write where) |
PUT | /doclet/pages/{id} | save_page. If-Match is its required base_version; a page saved since is 412 version_moved. A status of published publishes a draft and draft takes a published page back to one; a page in the trash is refused (422), since a restore brings it back | doclet; a title in the body is a rename and asks what a rename asks; a status other than the page’s own is a publish (pages.publish): the page’s creator, the lead of its container, or admin |
POST | /doclet/pages/{id}/rename | Move the page to a new title (its address): {"title": …, "quiet": false} | the page’s creator, the lead of the page’s container, or admin, with doclet |
POST | /doclet/pages/{id}/comments | comment_on_page | doclet |
PATCH | /doclet/pages/{id}/comments/{cid} | Rewrite a remark: {"body": …} | its author, with doclet, for the work comment’s reason |
DELETE | /doclet/pages/{id}/comments/{cid} | Take a remark down | its author, or admin as a moderator, with doclet |
DELETE | /doclet/pages/{id} | Put the page in the trash | the page’s creator, the lead of the page’s container, or admin, with doclet |
POST | /doclet/pages/{id}/restore | Take it back | the same |
POST | /doclet/pages/{id}/purge | Destroy it: ?confirm= repeats its title, ?reason= is required | admin, a recent proof (step_up), and never a seat |
POST | /chatlet/channels/{channel_id}/erase | Destroy named messages of a room: {"message_ids": […], "reason": "…"}, with ?confirm= repeating how many; see below | admin, a recent proof (step_up), and never a seat, a credential acting as itself included |
POST | /chatlet/channels/{channel_id}/prune | Destroy everything a room said before ?cutoff= (RFC 3339), with ?confirm= repeating it | the same |
PUT | /chatlet/channels/{channel_id}/retention | Set a room’s own horizon: {"retention_days": n}, 0 keeping it for ever, or null for the company’s, with ?confirm= repeating it (the days, or company) | the same |
A page in the tool-skills container asks one question more. Creating, saving, renaming, trashing, restoring or purging one is decided as pages.skill.write on top of the table’s rule: admin, and never a seat, because a tool skill is injected into every seat’s turn and writing one rewrites the prompt the company runs under. A remark on one is an ordinary comment. See who may write where.
{key} is an item’s key (ENG-42) or its id, and its id for an item flagged key_collision, whose key opens the task that claimed it first. A receipt names the item it is about in item, by that same rule, with key beside it and key_collision: true where the two differ: item is what to put back in the path. {id} is a page’s id. A body naming a different object than the path is refused 400 rather than overwritten, and a route that is a narrower door onto a wider tool (/depend, /relate, /tags, a project’s policy) refuses an argument that belongs to another. Every route refuses, 400 naming it, an argument its tool does not take: the tool reads what its schema declares, so an undeclared argument would be DROPPED, and a request answered as though it had asked for less is not a no-op. The refusal is the tools’ own, made where every call of every tool passes, so a seat’s turn and your assistant over /operator/mcp are told exactly what a route answers here. A body over 1 MiB is refused 413 before it is read.
Not here, and deliberately: sprints and goals.
What a request answers
Section titled “What a request answers”Through the one mapping the act route answers with, read from the refusal’s class and cause, never from its sentence, so a status and a code mean the same on every write surface. A refusal’s detail is written for a person and present only where the refusal has been worded for one; otherwise its message, the code’s own sentence, stands alone (ADR-0060):
| Status | error | When | Carries |
|---|---|---|---|
200 | The write was applied on this node, so the next read here sees it | the tool’s own receipt without its warnings (written for a model), its outcome, position and op_id, and its caveats in a person’s words, always a list | |
202 | The write is pending: durable, not yet applied on this node | the same, and the position to read at | |
400 | invalid_body | The body is malformed, names a different object than the path, or carries an argument the tool does not declare | the undeclared arguments in fields |
401 | invalid_token | Nobody presented a credential | |
403 | unauthorized / step_up_required | The authority table refused, or the verb needs a fresher proof | reason and grants (or the window), and the verb in action where the route decided it itself |
403 | forbidden | The domain forbids this caller the gesture, such as rewriting somebody else’s remark | detail in a person’s words, where the refusal has them |
404 | not_found | The item, page or comment does not exist, or was purged | |
409 | stale_version, conflict, exists, reassignment_budget, inbox_full, notes_full, notes_spent, … | Somebody changed it after you read it (a stale if_match or base_version in the body, a race lost), or a name it gives is another object’s already (a title, a room’s name, a tag’s label: exists), or the object is in a state that refuses it: archived, frozen in the trash, its contents at their cap (which class a refusal is) | message: read it again, or change what is in the way; and detail in a person’s words, where the refusal has them (a conflict or an exists a native domain decided has none yet) |
412 | version_moved | The version the request’s If-Match header named is not the one it holds: the same refusal as a stale if_match in the body, answered as HTTP answers a failed precondition (RFC 9110 §13.1.1), as a project file’s and an artifact’s are | message: read it again and decide again |
409 | invalid_input | The Idempotency-Key already names a write to another object | send it under a new key |
409 | reader_changed | The request names, in X-Crewlet-Reader, a principal its credential is not, and the guard refused it before it ran | nothing; ask GET /auth/session who the credential is, see Auth |
422 | invalid | The domain refused the write on its own rules, such as a purge whose ?confirm= names another item, an erase whose count or a prune whose cutoff it does not repeat | detail in a person’s words, where the refusal has them |
500 | internal_error | The engine failed at something of its own, or a tool answered something that is not a receipt | nothing a retry changes; the reason, and anything the tool said instead, is in the node’s log |
503 | unavailable, no_active_revision, identity_unavailable | This node could not decide (it cannot tell who you are, or cannot read the chart yet), cannot establish whether the write landed, or its log refused the request | a Retry-After, and for an unknown outcome "outcome": "unknown" and the op_id to retry with, on every route, a tool-backed one included. A refusal waiting cannot clear on this node (evicted, holds a record it cannot decode, log at its ceiling) carries no Retry-After: ask another node, or an operator. A gate’s refusal of another node’s copy of the write (evicted, abandoned or overtaken, which the refusing node finishes itself once the log’s duplicate window lets go of the operation) carries that window as its Retry-After |
507 | store_full | The object store has no room for the content the write would store (the fleet’s NATS bucket holds as many bytes as it reserves, or an S3-compatible bucket’s provider refuses the write for room), so nothing was stored or recorded | detail: what was not written; no Retry-After, since the same request is refused until an operator makes room |
The unauthorized row is one decision on all three surfaces serving these verbs; this one answers the rule’s reason and grants.
A retry is the same operation
Section titled “A retry is the same operation”Send an Idempotency-Key header and every record the request writes derives its operation id from it; send none and a fresh key is minted and handed back as op_id. An unknown outcome is the one to retry, with the same key, sent back as Idempotency-Key: a fresh one would defeat the ledger that makes a retry safe, and a retried create would file the item twice.
Every operation is bound to what its write SAYS as well as to the key: the same key sent with another request (a page saved with another body, renamed to another title, the same words posted in another comment thread, a remark rewritten again) is another operation and lands as asked, rather than being answered from the ledger as the first one. The same request again is the same operation; what the engine reads off the words for you, such as who a comment mentions, is not part of it.
A purge
Section titled “A purge”POST /worklet/items/{key}/purge?confirm=<KEY>&reason=<why> destroys an item and every row it produced, on every data node, and nothing undoes it.
?confirm=is checked against the item the path resolves to: the key a person sees on the board, not the id a script carries. A mismatch is422 invalidand destroys nothing.- The project is the stored row’s. There is no
?project=: the path may name the item by its id, which names no project, and a purge filed under the wrong project blocks writes to a project it is not about. - A retry reuses the operation through
Idempotency-Key, like every write here; there is no?op_id=.
?reason= is required: the deletion marker’s reason is the whole account of what used to be at that key. It is carried whole on the one line the project’s lead is told, so a reason that would not fit that 600-byte line is refused before anything is destroyed, rather than cut. An offline or evicted node keeps its copy until it replays, adopts a snapshot, is replaced or is destroyed. crewlet worklet purge is the same route from a shell.
A chat erase, prune or horizon
Section titled “A chat erase, prune or horizon”The engine’s own chat has three gestures no seat is given and no tool makes, because each destroys what people said, now or on a delay, and nothing undoes it. They are decided as the purges are: admin, a recent proof, and never a seat. None is said in the room, so none needs a seat to act as: an administrator’s own token may make them, and each is recorded under whoever made it (the seat of a person, the login of a credential acting as itself).
POST /chatlet/channels/{channel_id}/erase?confirm=<count> destroys the messages the body names, {"message_ids": ["…"], "reason": "…"}, at most 250 a request, on every data node, with the reactions, mentions and thread rows that hang off them. ?confirm= repeats how many messages the request names, once a repeated id is folded; a count that does not match is 422 invalid and destroys nothing. The reason is required, in the body, at most 600 bytes, and never on the URL, which carries it into every proxy’s access log.
POST /chatlet/channels/{channel_id}/prune?cutoff=<instant>&confirm=<instant> destroys everything the room said before the instant, on every data node: the blunt tool, and the one the retention duty runs on its own. ?confirm= repeats the cutoff (the same instant, in any zone); a cutoff in the future is refused, since that would empty the room rather than enforce a horizon.
PUT /chatlet/channels/{channel_id}/retention?confirm=<days|company> sets how long one room keeps what it says: {"retention_days": 90}, {"retention_days": 0} to keep it for ever, {"retention_days": null} to return it to the company’s chat.chatlet.message_retention_days. The field is required: an absent one would read as the company’s horizon, and a request that said nothing would destroy the past of a room somebody had set to keep for ever. A shorter horizon is a prune on a delay (the retention duty takes what it no longer covers on its next pass), so it is decided and confirmed as one: ?confirm= repeats the horizon, the number of days in decimal (0 included) or company for null; a missing one is 400 invalid_query and one naming another horizon 422 invalid, both before anything is written. Every horizon is confirmed, a longer one too: the route does not read what the room had.
None of the three reads the room first (an administrator would otherwise be shown rooms they are not in). The confirmation is what the request itself destroys, repeated (a count, an instant, a horizon), and a room the store does not hold is the store’s own answer.
A retry is the same destruction. Each is bound to the request’s Idempotency-Key and to what it destroys, in one canonical form (an erase’s ids sorted and deduplicated with its reason, a prune’s cutoff as an instant, the horizon as days or null): the same erase named in another order is the same operation; the same key with other messages, a later cutoff or another horizon is another operation that lands as asked. An unknown answer is 503 with outcome: "unknown" and the op_id to send back.
Somebody else’s inbox
Section titled “Somebody else’s inbox”mark_inbox and set_pins write the caller’s own record and take no handle: a model that could name whose inbox to mark could mark anybody’s. So PUT /worklet/people/{handle}/inbox goes through the same parsing and writer as the tool, and {handle} resolves exactly as a personal question’s does: either of your own names is your own record; somebody else’s login is their record, looked up in the identity directory (the seat it binds them to, or the login for a credential bound to none); any other name must be a seat the chart has exactly, never matched by resemblance, so a name no record could be kept under (Jane Doe, a seat the chart lacks) is refused. The verb is decided on the record the name resolved to (yours, or the admin grant, to unstick a departed person’s queue), not on the spelling, which would admit an administrator to a record under a person’s login where the write then landed unread. A login nobody holds is 404 to a caller who may write anybody’s record and 403 to everybody else; a node that cannot read the directory is 503.
set_priorities (PUT /worklet/people/{handle}/priorities) is the one person verb that DOES take words for somebody else, because a lead sets a report’s queue. Your own queue, named by omission or by either of your names, is never looked up; somebody else’s login is the identity directory’s to resolve, exactly as above, and is never a seat (jane.doe once replaced the queue of the seat jane); only a name that is neither (a handle, a role, a display name, an address) is resolved against the chart. The lead relation is then asked about the seat it all resolved to, so a lead may name their report either way. A name nothing answers to is refused, and the refusal lists the seats: the roster is everybody’s overview.
The atlas
Section titled “The atlas”The company’s atlas, the map and catalogue of everything it runs on, is read through twelve questions, each on the socket and as a REST route. Every one needs the atlas permission (ADR-0127); a person without it is refused, as an agent’s turn is when the person who woke it does not hold it.
| Question | Route | Parameters | Answer |
|---|---|---|---|
atlas_entries | GET /atlas | the filters below; sort (key, the map’s order, by default; name; last_seen; health, the most urgent first and the map’s order inside each); cursor; limit (50 by default, at most 500) | rows, one summary per entry; next_cursor, absent on the last page; total |
atlas_map | GET /atlas/map | the filters below; closed, the group keys the reader closed, comma separated; relations (structural, the relations drawn at rest, by default, or all) | lanes (every lane, an empty one included), groups, nodes, edges (each relation between two drawn entries, with its family), collapsed |
atlas_entry | GET /atlas/{id} | id | entry, in full; its health, what the signals its reader may read add up to; its vendor; used_by, every entry with a relation to it |
atlas_trace | GET /atlas/{id}/trace | id; direction (up, what depends on it, by default; down, what it depends on); depth (1 to 6, 6 by default); relations (structural, by default, or all) | from, direction, hops by distance, edges, truncated |
atlas_facets | GET /atlas/facets | the filters below | how many entries each kinds, lanes, vendors, words and health value leaves, each counted over every other filter, and total |
atlas_log | GET /atlas/log, GET /atlas/{id}/log | id, for one entry’s lines rather than the company’s; cursor; limit (50 by default, at most 200); unconfirmed | lines, newest first; next_cursor, absent on the last page |
atlas_review | GET /atlas/review | kind (disagreement, unconfirmed or likely; every kind by default); mine (true for only what contradicts the asker’s own word: a fact or relation they set or confirmed that a newer report differs from, which is what their Inbox is told of; a credential acting as no seat is answered none, and total and counts are then of the asker’s alone); cursor; limit (50 by default, at most 500) | items, what waits for a person, computed on the read and stored nowhere: first the facts and relations the sources disagree on (each with its fact or relation, every other value beside the one shown, and the target a relation points at), then the entries only an agent reported, those with nothing the engine could check before those backed by a call or a file, each with its reports: every agent’s newest word on it, newest first, at most five, as its source (the seat in name, the turn, the evidence class and the cited call’s tool by name, absent on a record made before the name was kept) and observed_at; each item’s entry summary and since, its newest claim; next_cursor, absent on the last page; total of the asked kind and counts of each kind |
atlas_sources | GET /atlas/sources | none | sources, one per integration the atlas reads that the company connects, in the order of their names: its kind; its state (never, read, partial where the read finished and was refused some part, or failed); last_attempt_at and last_complete_at; the last whole read’s entries, calls and withheld (values left out for their shape, counted and never sent); what the last attempt wrote (recorded, retired, purged); missing, the entries complete reads have stopped seeing and not retired yet; unread, each part it was refused with its detail and, for a server’s part, its scope, and unread_overflow, how many more there were; scopes, for the servers each server’s id, its last_read_at (its last whole read) and unread; next_read_at, absent where it is due now; refresh_requested_at and refresh_requested_by while an ask waits on it; refreshable_at, the first instant an ask is honoured, absent where that is now; and last_error, the fault of a failed read, sent to an administrator alone. Beside them refresh_interval_seconds and refresh_floor_seconds. It carries none of the read members below: it reads the coordination store, never the atlas |
atlas_activity | GET /atlas/activity | unconfirmed | from, the first instant of the window; days, the company’s lines on each of its 14 UTC days, oldest first and today last; entries, one per entry the log holds a line of: its id, its own days (absent where it took none in the window) and last, its newest line however old |
atlas_work | GET /atlas/work | none | open, how many open tasks name each entry, by the entry’s id; capped, where more than 2,000 entries have open work; unread, why no work was read, and then open is empty |
atlas_entry_work | GET /atlas/{id}/work | id | open, the open tasks that name the entry, most recently changed first, and recent, the ones finished in the last 30 days, each at most 50 rows of the shape work_items answers; open_total and recent_total, each {total, capped?}; unread, why no work was read |
atlas_named | GET /atlas/named | ids, 1 to 128 entry ids separated by commas | named, one {id, entry} per asked id that names an entry, in the order asked: the id as asked and the summary of the entry it merged into, so two ids of one entry carry the same summary; missing, the asked ids that name no entry the reader’s atlas holds |
The filters are q (part of a name or a key, or an entry’s id), kind, lane, vendor, confidence (confirmed, likely or unconfirmed), health (alerting, needs_look or quiet), show (current, every entry but the retired, by default; retired; all) and unconfirmed (true to take in the entries only an agent reported with nothing the engine could check; they are left out by default until a person confirms them, and confidence=unconfirmed takes them in too). The words facet counts the unconfirmed entries either way. A value outside its set is refused with bad_params, naming the parameter and the values it takes; an id no entry answers to is not_found. An entry merged into another by an exact key is found by its own id too.
Every answer also carries revision, the settings revision it was read from (empty where the serving node cannot tell), coverage, each source the read reads and whether it was read in full, with the reason where it was not, and withheld, how many values were left out for being shaped like a credential, counted and never shown. A source that fails leaves the rest answering.
A summary (a row of rows, a node of nodes, an entry of a trace or of used_by) is what a list row or a map card shows: the entry’s id, kind, lane, name, key and vendor; its state, its word and its health; signals, how many open signals its reader may read; review, not_used_recently and last_seen; and four members a row needs without opening the entry:
| Member | What it is |
|---|---|
owner | {kind, name}: the seat (by handle) or the unit (by key) a person or the engine’s records name. Absent where nobody has, and never an owner an integration or an agent only suggested |
purpose | the one line a person gave the entry. Somebody’s words: draw it as plain text |
relations | {depends_on, used_by}: how many entries it relies on and how many rely on it, through the relations the map draws at rest, counted between current entries the read shows (never a retired entry or an unconfirmed one the read leaves out) |
reason | why the entry is not quiet, in one sentence: its most urgent open signal and how many more are open, or that its sources disagree. Absent for a quiet entry. It counts only the signals its reader may read |
Every sentence the engine writes is its own. A reason, and a log line’s text, is built from the closed words of the vocabulary and a count, never from a name, a label, a value or an alarm’s text. What a vendor, an agent or a person wrote reaches a reader only in the typed members beside the sentence (name, purpose, value, target), each to be drawn as plain text.
Relations and their families. Each edge of a map or a trace carries the family its relation is drawn in: calls, a relation a request travels along (depends_on, exposes, served_by, fronted_by); runs_on, a relation to what an entry stands on (runs_on, resolves_to); and around, every other one (in_zone, built_from, deployed_by, monitored_by, secured_by, belongs_to). A map asked for relations=all draws every relation between two entries it draws; a relation to a seat, a unit or a page is on the entry’s own answer, since it joins no two entries.
The log. A line is one claim recorded on the atlas’s own log (The atlas’s own log): by a person, by an integration’s read, or by an agent. What the engine computes at every read is not recorded, so it leaves no line.
| Member | What it is |
|---|---|
id | the line’s own id, stable across reads |
at | when the record that wrote it was stored |
entry, name, kind | the entry the line is about, as the reader’s atlas names it |
change | recorded (an entry a source said is there), retired, fact_set, fact_denied (a value a person said is wrong), related, unrelated, joined and kept_apart (two entries a person said are, or are not, the same thing), and withdrawn (a claim its source stopped making: what an integration’s read no longer holds, or a “the same” a person took back) |
text | the change in one sentence of the engine’s own words |
fact, value | the fact a line is about and the value recorded, where it is about one |
relation, target | the relation a line is about and what it names: another entry by id and name, or a seat, a unit or a page by external and name |
source | whose voice the claim is in |
A line is shown only to a reader who is shown its entry and the entry it names: a line on, or naming, a repository or a check of Gitlet’s is read only by a reader Gitlet lists that repository to, and a line on an entry only an agent reported is left out unless the read asks for unconfirmed, or asks for that entry’s own log by its id. atlas_activity counts exactly the lines atlas_log would show its reader, and an entry whose newest record the reader is not shown carries no last. A page may hold fewer lines than its limit where many of the log’s lines are not the reader’s to see; next_cursor says whether there is more. Lines are kept as long as the atlas keeps its history.
The atlas is never a way round another permission. A reader without the gitlet permission is read no repository, and Gitlet is not asked; one with it is read the repositories Gitlet lists to them. The work on an entry is Worklet’s: atlas_work and atlas_entry_work read the tracker only for a reader who also holds worklet, and answer anybody else unread with the reason and no task (ADR-0140). An integration’s standing and a server’s connection test are signals only an administrator reads, as the screens they come from are. A standing alarm on a tool server or a model entry is every holder’s.
The work that touches an entry. A Worklet task names the entries it touches (update_work_item’s linked_entries), each by its id, on the task’s own record; the atlas is never written. A link is read through whichever entry its id merged into, so open is keyed by the entry the map draws and an entry’s work is the tasks naming any id it answers to. A task that names an entry the reader’s atlas does not hold marks nothing. A company whose work is kept outside Worklet has none to read, and both questions say so in unread.
The bounds. A page is 50 entries and at most 500. The map draws at most 2,000 entries open: past that it closes groups, the largest first, and names them in collapsed, so an answer never draws a partial map as if it were whole. A trace walks at most 6 hops and stops at 200 entries, saying so in truncated. A page of the log is 50 lines and at most 200. The activity window is 14 days, today included (two weeks show a weekly rhythm twice); a day is a UTC day.
What the widest answers cost. At the map’s bound (2,000 entries with owner and purpose; internal/atlas.BenchmarkMapAtItsBound) the map takes 15 ms to draw and encode: at rest 1,218 KiB of JSON (136 KiB compressed) for 3,100 edges, with every relation 1,771 KiB (191 KiB compressed) for 7,300. On a 20,860-line log (internal/atlasdomain’s benchmarks) a page of 200 lines takes 7 ms and the activity read 147 ms, beside 220 ms for every live claim.
Worklet and Doclet
Section titled “Worklet and Doclet”GET /worklet, GET /doclet/pages and their neighbours read Worklet and
Doclet through this node’s estate router: from this node’s copy while it
serves, else a data node’s. A seat’s tools read through the same facade, so an
operator and an agent see one item.
They are answered only where the company runs that backend. A company on
tracker.backend: jira has no work_items question to answer: asking gets
unknown_query / 404, because an empty board would claim a Worklet record
exists that no node holds.
Whether the backend runs is asked at every request: a node that booted with
no company builds Worklet and Doclet at the first revision it applies, so a
company bootstrapped live is served from then on with no restart. After that,
the halves a node serves are those its runtime was built with until it
restarts: a revision that moves the company onto Jira or Confluence (or turns
on a half the node was built without) activates, logs
native_backend_needs_restart, and changes these answers only at the next
restart (see
A native backend changes at a restart).
Until then a question about a half the revision turned ON is refused
unavailable (503) under native_backend_needs_restart, with no
Retry-After and a detail naming the half (“this node was already running when
the company turned Chatlet on, and it starts Chatlet when it restarts: restart
this node, or ask another one”), never unknown_query; the org answer names it
in services.restart.
A copy that has not caught up refuses. Where the answering copy is behind
what the read needs, the answer is unavailable (503, with a Retry-After),
never an empty list: “this company has no work” is an answer people act on. A
copy that has not applied this node’s own writes is passed over for another
data node’s; a read no data node’s copy could take is refused the same way.
Every state-log refusal is unavailable (503 over REST, the
unavailable frame on the socket), carrying the refusal’s code as refusal
and a sentence for the reader as detail (what happened and what to do; the
refusal’s own detail goes to the node’s log): the node understood the question
and cannot answer it here. A Retry-After is sent only where waiting clears
the refusal, and it is that refusal’s own hint:
behind: derived, from how far behind the copy is over how fast it drains.no_quorumandbroker_unreachable: the broker’s election timeout.broker_stalled: one barrier budget (a log one member stores, whose own write did not complete, holds no election).below_floorandfloor_unknown: one position heartbeat.
A refusal waiting cannot clear carries none: a record this node cannot
decode (deferred), a log at its byte ceiling (log_full), a barrier its
broker refused (broker_refused), an evicted node. The client asks another
node or waits for an operator; see
the fifteen refusals. A
min_position on a log the answer is not read from is the request’s mistake:
400 bad_params.
The reads are here and the writes are tools. Every write is attributed to
somebody, never to “the dashboard”: a seat through its own tools, a person at
the dashboard through
/operator/act, a script through
the write surface, an assistant through the
MCP surface, all with the same tools. The
routes under /worklet/retention/ are not about items: they are operator
gestures against the log’s own history, attributed to the credential that made
them.
Paging and filters
Section titled “Paging and filters”Both listings take limit (default 50, max 500) and page by an opaque CURSOR,
never an offset, since seats write while they are read and an offset skips or
repeats rows. The work listing takes cursor and answers next_cursor; the
pages listing takes after and answers after, beside its total.
Multi-valued filters are comma-separated (?status=todo,in_progress),
because the socket’s query channel carries a JSON object, which cannot repeat a
key.
Openness is not a boolean (open=false) on the work listing. Rules in Worklet are
written at the four status groups, so open work is
?status_group=not_started,active. show_closed is the separate three-stated
question of whether finished work is in the answer: absent or false leaves it
out, true puts it in, and recent:<dur> puts in only what finished inside
that window.
The pages listing’s skills is three-stated:
| Filter | Absent | true | false |
|---|---|---|---|
skills (pages) | every page | only tool-skill pages | everything but them |
An unknown enum value is refused naming the closed set (?status=finished
answers 400 saying which statuses exist), never matched to nothing.
Project files
Section titled “Project files”A project holds files beside its work: a row in Worklet (a path, a type, a size and SHA-256, a version and who wrote it), whose content is one object in the object store, shared by the whole fleet. See A project’s files for what a seat does with them.
The listing is an ordinary read (GET /worklet/files, the work_files query).
The three byte routes add streaming: a download streams the content back and an
upload streams it in, neither holding the file in memory.
# upload, replacing version 3 and nothing newercurl -X PUT -H "Authorization: Bearer $CREWLET_API_TOKEN" \ -H "Content-Type: text/csv" -H 'If-Match: "3"' \ --data-binary @q3.csv "http://localhost:8000/worklet/files/ENG/reports/q3.csv"
# downloadcurl -OJ -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "http://localhost:8000/worklet/files/ENG/reports/q3.csv"{ "project": "ENG", "path": "reports/q3.csv", "size": 48213, "hash": "9f2c…", "content_type": "text/csv", "outcome": "applied", "op_id": "…", "position": "…", "version": 4}The content goes first. An upload streams the whole body into one new
object before it records the file, so a listed file is one whose content the
fleet holds. A write cut off halfway, or refused once its object is stored,
leaves an unnamed object the collector removes a day later, never a row
pointing at missing content. A body whose Content-Length is over 1 GiB, and
an upload into a project that does not exist (404 no_project) or is archived
(409 conflict), are refused before any of it is read.
A write names the version it replaces. If-Match carries the ETag the
download answered. Absent, the write creates the path or overwrites what is
there; present, a file that moved since is 412 version_moved and nothing is
written. A file has no per-field merge (unlike a work item), since two people
editing one spreadsheet would lose one.
A write is decided and attributed like every other write on this surface.
Reading a file or the listing and uploading one take worklet; removing one is
its project’s lead’s, or admin’s, with worklet. The write is recorded under
whoever the request resolved to (a person as their seat, a credential nobody is
bound through under its own login), with the credential it came through beside
it (Who a write is attributed to), so a file’s
history names the person, never the relaying process. Every write leaves an
operator_acted record as a write-surface verb
does.
The answer is three-valued. outcome is applied, pending or
unknown, as every Worklet write’s is (see
Read Consistency); position and version are
present only where the write is known to have landed. Retry an unknown by
sending the same request with the op_id it answered as its Idempotency-Key
(the key sent, or the one minted), as on the
write surface: a fresh key makes a second
write.
Each mebibyte has 30 seconds to cross, in either direction: an upload’s
mebibyte has 30 seconds of the time the server waits for the client to send it
(not the time spent storing what arrived), and a download’s has 30 seconds of
the time the server waits for the client to take it (not the time spent
fetching from the store). That is a floor of about 35 KB/s, far under any real
link and the same floor the object store holds its own transfers to. A
whole-body deadline would cap real uploads of up to a gibibyte, and none would
let a client trickle bytes or never read a download. An upload that stops
arriving (a closed connection included) answers 400 unreadable_body and
records nothing; a download the client stops taking, or whose content stops
being readable part way, is cut, which the client sees as a body shorter than
its Content-Length.
A download is served as an attachment, with the file’s own type and the
default-src 'none' policy every non-dashboard response carries, so an
uploaded HTML file downloads rather than running on the dashboard’s origin.
| Status | error | When |
|---|---|---|
400 | bad_path | The path is empty, longer than 1024 bytes, not UTF-8, ends in /, has an empty folder or a . or .. in it, or carries a control character or a backslash. A leading / is dropped rather than refused |
400 | bad_if_match | If-Match is not a version |
409 | conflict | The project is archived (its state, met until somebody unarchives it); the one refusal rule |
422 | invalid | The write can never land as sent: the content type is over 255 bytes or spans lines |
400 | unreadable_body | The body stopped arriving: connection closed, or a mebibyte took over 30 seconds |
403 | unauthorized | The authority table refused: reason and grants say why and what would admit |
404 | no_project / no_file | No such project, or no file at that path |
412 | version_moved | If-Match names a version the file has moved past |
409 | upload_expired | The upload outlasted the twelve hours a write may name its object after (from its key’s minting); send it again |
413 | body_too_large | The content is over 1 GiB: refused before reading where Content-Length says so, else once the body passes it |
500 | content_corrupt | The store’s content is not what the file records; retrying reads the same bytes, so restore from a backup or upload again |
507 | store_full | The object store has no room for the upload (the fleet’s NATS bucket holds as many bytes as it reserves, or an S3-compatible bucket’s provider refuses the write for room); nothing was stored or recorded. No Retry-After: the upload is refused until an operator makes room, which the hint names; the node logs api_file_store_full with the store’s own answer |
500 | internal_error | An upload failed in this node, classed by the store as neither of the two below (it stopped reading the content before its end); retrying doesn’t clear it; the reason is in the node’s log |
503 | unavailable / content_unavailable | Worklet or the object store could not be reached, or the file’s content could not be read right now. An upload the store did not take is unavailable under an election’s Retry-After; one it refused because it is full is unavailable with no Retry-After, and an administrator makes room (see its byte reservation). An artifact’s upload, an image attached to an Ask Crewlet question, write_project_file and the artifact tools answer both the same way, including the bucket failing every attempt of a request for forty seconds to a minute (which ends an upload or download then, not at its deadline) and the store taking no more of an upload and not answering it for a minute (which ends the upload then); an upload in parts is answered up to thirty seconds later, once its unfinished upload has been abandoned |
A download is served wherever the company runs Worklet and the node runs
the object store. The upload and the removal also need the node to hand out
Worklet’s writer, which a node in a
maintenance mode does not: there they
answer 404 no_route, like any path the node does not serve, while a download
is a read and is served as usual. A company on Jira has no project files to
serve. Whether the node serves them is asked at every request, so a node that
booted with no company serves them from its first revision on Worklet, with no
restart.
GET /worklet/retention: what the log is holding
Section titled “GET /worklet/retention: what the log is holding”Takes admin, reads included, as /config and /secrets do: the answer
names every node, its position, disk and snapshot repository, a map of which
machine to take out to lose the company’s history, so it needs its own grant on
top of authentication.
The node you ask assembles the document: half its fields are facts only that
node can state (its own applier’s lag, snapshot, disk), half are fleet-wide,
read from coordination. node_id is on the document, so a pasted report is not
three per-node facts attributed to a fleet.
{ "node_id": "node-1", "at": "2031-04-02T03:14:00Z", "backup_owner": "platform-oncall", "register_readable": true, "domains": [ { "domain": "tracker", "stream": "CREWLET_TRACKER_LOG", "generation": 0, "first_seq": 918100000, "last_seq": 918280001, "bytes": 67108864, "max_bytes": 4294967296, "reserve_bytes": 268435456, "headroom_fraction": 0.983, "bytes_per_day": 23068672, "trim_floor": 918100000, "trim_to": 0, "blocked_by": "backup_floor", "blocked_since": "2031-03-30T02:00:00Z", "backup_at": "2031-03-29T02:00:00Z", "prose": "Nothing is being trimmed on tracker: ...", "terms": [{"name": "applied", "state": "ok", "seq": 918279004, "detail": "..."}] } ], "nodes": [...], "snapshots": [...], "replica": {"store_bytes": 10415140864, "projected_join_seconds": 308, "rejoin_window_seconds": 1800}, "alarms": [{"kind": "backup_age", "title": "No recent backup", "person": "...", "detail": "...", "remedy": "...", "domains": [{"domains": ["tracker"], "detail": "the newest verified backup is 97h 14m old, and the policy asks for 24h; the trim has not advanced for 73h 14m, and the log is keeping up to 1840 record(s) older than its 24h replay window", "term": "backup_floor", "since": "2031-03-30T02:00:00Z"}]}]}domains, nodes, snapshots, alarms and each domain’s terms are always
lists: [] when empty, never null ("alarms": []).
alarms holds each standing alarm once: kind, title and
person (what is wrong, what it affects and what to do, in the kind’s own
words for a company owner), detail (the measurement, in the thing’s units)
and remedy (the operator’s steps). A condition that is a property of a log
names every log it stands on in domains: each entry is one measurement,
its detail, and its own domains list of the logs it was taken on. That
is one log for a held trim, with the term holding it and since, when it
stopped advancing; otherwise every log measured in the same words, so a fleet
with no backup yet is one entry naming every log. The alarm’s own detail is
then the most pressing log’s.
A log that would raise trim_blocked (held longer than its replay window plus
a trim tick, while keeping records older than the window) is listed under
backup_age instead while the backup term holds it and that log’s own
backup_age fires, because the backup is its remedy: its entry carries the
term and since, and its detail is its backup’s measurement followed by
what the hold is keeping. A younger backup hold raises no trim_blocked to
fold, and a backup hold on a log whose own backup is inside the policy stays
under trim_blocked. So alarms has one entry per kind, and its length is the
health envelope’s alarms.count. The alarm_raised and alarm_cleared log
lines are the one place a log stands alone: a per-log condition writes a pair
per log, carrying it as domain, so a log joining an alarm already up, and a
log leaving one that stays up, are each said with their own start.
trim_floor and trim_to differ, and a blocked domain is where they part.
trim_floor is the floor the fleet has published: everything below it may
already be deleted, it is written before the delete it licenses and never moves
down within a generation, so a blocked domain keeps the floor its last advance
reached. trim_to is what the last tick concluded: zero while blocked, and
below the floor whenever the lowest counted node is. The first is what a node
must hold to replay; the second says whether the trim is moving. Both, with
terms, blocked_by and blocked_since, come from the row the trim published
at the domain’s OWN generation only (just after a reanchor, the row is about
the stream the domain left). trim_floor_state says which it is:
published: the floor, the conclusion, the terms and the blocking term are that tick’s.none_at_generation: the trim has concluded nothing about this generation yet (a fresh fleet before its first tick, or any fleet after a reanchor until the first tick on the adopted stream).unreadable: the floor register could not be read.
Only published makes trim_floor and trim_to worth reading; terms is
then an empty list where nothing is concluded. See
Retention.
not_ready is present when the answering node refuses every read of the
domain right now (the refusal its readiness probe reads), with code
(wrong_stream, stalled, below_floor, behind, floor_unknown,
evicted, or broker_unreachable where its health could not be read),
causes naming each identity finding behind a wrong_stream (recreated,
ahead_of_log, log_diverged, generation_passed) and detail, the
refusal’s sentence. writes_refused is present while the node serves the
domain’s reads and refuses its writes: code log_truncated, with detail
naming the peer whose rows hold records the log lost. Both are the answering
node’s own facts, like the replica block.
Each node’s per-domain row carries generation_state: current, left
(a generation the log has since left), ahead (one above the answering node’s)
or unknown (a domain the answering node does not run). lag is present only
where it is current, since a sequence from another generation is in another
space. The row also carries the node’s own log_diverged, and
stream_created_at and checkpoint_stored_at (the stream its rows are
keyed to and the record its checkpoint stands on) where the node published
them.
A term’s state is one of four, and seq is an answer in exactly one: ok
carries the sequence the term permits, unknown is a term that could not be
evaluated (which blocks), n/a is one this domain does not have, and
unbounded is one that was read and binds nothing (no hold pins the log, or a
solo fleet takes no snapshots). seq is 0 in the other three rather than
absent, so a term permitting nothing yet (what holds a young fleet’s trim) is
distinguishable from one with no sequence to give.
register_readable keeps an empty nodes block honest: “this fleet has no
nodes” cannot happen, while “coordination could not be listed” happens during
exactly the outage somebody is running this in.
maintenance_unread lists every log whose capacity window the answering node
couldn’t read, and is absent when it read every one. maintenance lists
only the windows found open, so a log missing from both has no window, and a
log named in maintenance_unread may have one. The maintenance_open alarm
judges such a log on the window the node last read there, as old as that read,
and its detail says so
(the retention guide).
Each open window’s participants_missing and admissions_blocking are read
beside it, and one the node couldn’t read is acks_unread: true or
admissions_unread: true with its list absent, never empty.
A node row’s evicted is its tombstone once every log holds one, dated
from the latest and naming in by whoever made the eviction that reached the
last of them.
evictions_unreadable is true on an identity-claiming log’s row when the
answering node could not read that log’s evictions while assembling the report
(a failed store read, or its replicated estate closed for a snapshot adoption’s
rename or a shutdown), and absent otherwise. An unread log contributes no
tombstone, so every node reads as not evicted there and stays counted (the
trim’s conservative side), and “not evicted” is then not an answer. Read it
before concluding a node was readmitted; both crewlet retention status and
Settings › Backups & retention say so above the node block, and that screen
keeps an eviction it just made on the row until a report whose evictions were
read.
backup_at is when the backup this log’s trim counts was taken: the newest
verified point the backup_floor policy takes the word of that covers this
log’s stream (a node’s copy under engine, the operator’s acknowledgement of
this log under operator). It is absent where no counted backup covers the
log, the state the backup_floor term blocks on. The backup_age alarm is
evaluated per log from it and lists each log in its domains with its own age
(under operator every log is acknowledged on its own); logs whose
measurement reads the same, such as none backed up yet, share one entry.
headroom_fraction is a pointer, absent when the broker could not be
asked: a fraction of an unknown ceiling is not zero headroom, and zero is what
the one alarm an operator cannot ignore fires on. It is a fraction of the
ceiling ordinary writes are held to: max_bytes less reserve_bytes. On
every identity-claiming log reserve_bytes is the top of the ceiling kept for
the records that install or lift a gate (the larger of a sixteenth of it and
seven of the log’s largest records with a mebibyte beside them), so an eviction
still lands on a log full for everything else
(the gate reserve). It is absent on
a log that keeps none (the vector changelog and the usage log), where the
headroom is of the whole ceiling.
bytes_per_day is what the log took in over the trailing day, as this node’s
last trim tick measured it from the log’s own records: the rate the
log_ceiling_short alarm holds max_bytes against min_age of. It is a
pointer too, because 0 means the log took in nothing, the most benign
reading, and the field is absent where nothing was measured: a compacted
log (whose size follows its subjects, not its age), a log in its first two days
(whose trailing day would contain its import day), and every log on a node
whose trim has not ticked yet. See
Retention.
crewlet retention status renders exactly these bytes.
The three retention gestures that write
Section titled “The three retention gestures that write”All three are POSTs and, like every /worklet/retention* route, take admin: moving the floor the trim deletes against, and stopping and re-allowing a machine’s writes, are the deployment’s own controls. A caller without it gets 403 naming it.
| Route | What it does |
|---|---|
POST /worklet/retention/ack?stream=NAME&position=N&taken_at=TIME | Publishes an operator backup floor. 400 position_required naming both when either is missing; 404 when the stream is not one this node runs (on a node running no state log, every stream). The point is stamped with that stream’s own generation, read from the running log (a bare sequence at another generation names a number space the copy does not cover), and filed under that stream: acknowledging another log leaves this one standing, and each log’s trim reads its own (under backup_floor: operator, one acknowledgement per log). taken_at is the RFC 3339 instant the copy was taken; backup_age and the backup check age the copy from it. 400 taken_at_required when missing, zero or not RFC 3339 (send an offset’s + as %2B; unescaped it arrives as a space); 400 taken_at_in_future when later than this node’s clock, the detail saying what the clock reads. The answer echoes stream, position, generation and taken_at. |
POST /worklet/retention/evict/{node}?confirm={node} | Installs the eviction gate on every identity-claiming log: Worklet’s, Doclet’s, the identity estate’s, the artifacts log’s, the artifact datastore’s, Ask Crewlet’s, Chatlet’s, the executor log’s and the code log’s; the vector and usage logs count no node and get none. 409 eviction_refused, nothing written, while the node still holds a live presence lease (it still reaches the fleet, and eviction would drop everything it writes); the body carries detail, hint, op_id and actions ["wait", "force"]: stop the node and let its lease lapse, or force it. force=true overrides that for a node wedged so that it still renews its lease. A node that cannot read the presence leases answers 503 eviction_unjudged (with hint and actions ["retry_same_op", "force"]); force=true overrides that too, since the leases are the judgement’s only input, and the node logs retention_eviction_forced_unjudged. A node in a capacity window answers 409 not_publishing before anything is judged, with detail, hint and actions ["wait"]: a gate record is an append, and the window’s mode appends nothing. Readmission answers the same. |
POST /worklet/retention/readmit/{node}?confirm={node} | The inverse commit, on every one of those logs. 409 readmission_refused, nothing written, when on any log the node has not applied every record up to the one just before the higher of that log’s published floor (at its current generation) and its first surviving sequence (its last published position is more than one below that bound), or its last published position is from a generation the log has since left. The body carries detail, hint, actions ["wait"] and the numbers domain, position, generation, floor, first_seq, floor_generation and published (false for a node that never published a position, judged as holding nothing). A judgement that could not be made refuses too, nothing written, as 503 readmission_unjudged: the register or a floor unreadable, a log’s first surviving sequence unreadable, or this node behind a reanchor the fleet has made. The body carries detail, hint, actions ["retry_same_op", "other_node"] and, where one log could not be judged, that log. force has no effect and nothing overrides this refusal: the floor is a fact about what the node holds, not a lease. |
confirm echoes the node id; a mismatch is 400. A node id no node could run under (the node.id rule; the id becomes a subject token on every log) is 400 invalid_gate, nothing judged or written.
A refusal’s detail is its own sentence, the one the operator acts on: no package name before it and no broker or store words after it (those go to this node’s log). A judgement that stopped on a fault nothing told is 500 gate_failed, saying nothing was written and carrying node and op_id, so the same request can be sent again under it.
The gate is written as the caller: the eviction’s by (crewlet retention status prints it as “evicted by”) is their name as a write is attributed, and the record carries the credential they used beside it. A capacity operation names its opener the same way, by beside operator_id, on the operation and on its entry in the report’s maintenance list, which names every open window, oldest first.
The gesture is judged once, before any log is written; its record then goes to every identity-claiming log at once, each written by the node the request reached through its own write authority (every data node holds the whole estate, the retention guide). The trim counts nodes per log, so a record on one log lifts that log’s pin and no other. A 200 answers per log:
{ "node": "node-4", "evicted": true, "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4", "complete": false, "domains": [ {"domain": "tracker", "stream": "CREWLET_TRACKER_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.tracker:node-4", "outcome": "applied", "position": {"stream": "CREWLET_TRACKER_LOG", "generation": 1, "seq": 918280002}}, {"domain": "pages", "stream": "CREWLET_PAGES_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.pages:node-4", "outcome": "unknown", "actions": ["retry_same_op"], "hint": "its outcome is unknown: the same gesture under the same operation id answers from this log's own ledger if the record landed, and writes it if it did not"}, {"domain": "iam", "stream": "CREWLET_IAM_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.iam:node-4", "outcome": "applied", "position": {"stream": "CREWLET_IAM_LOG", "generation": 0, "seq": 58311}}, {"domain": "artifacts", "stream": "CREWLET_ARTIFACTS_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.artifacts:node-4", "outcome": "applied", "position": {"stream": "CREWLET_ARTIFACTS_LOG", "generation": 0, "seq": 30552}}, {"domain": "artifactdata", "stream": "CREWLET_ARTIFACT_DATA_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.artifactdata:node-4", "outcome": "applied", "position": {"stream": "CREWLET_ARTIFACT_DATA_LOG", "generation": 0, "seq": 112940}}, {"domain": "assistant", "stream": "CREWLET_ASSISTANT_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.assistant:node-4", "outcome": "applied", "position": {"stream": "CREWLET_ASSISTANT_LOG", "generation": 0, "seq": 15734}}, {"domain": "chat", "stream": "CREWLET_CHAT_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.chat:node-4", "outcome": "applied", "position": {"stream": "CREWLET_CHAT_LOG", "generation": 0, "seq": 207714}}, {"domain": "executor", "stream": "CREWLET_EXECUTOR_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.executor:node-4", "outcome": "applied", "position": {"stream": "CREWLET_EXECUTOR_LOG", "generation": 0, "seq": 30870}}, {"domain": "code", "stream": "CREWLET_CODE_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.code:node-4", "outcome": "applied", "position": {"stream": "CREWLET_CODE_LOG", "generation": 1, "seq": 2207}}, {"domain": "access", "stream": "CREWLET_ACCESS_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.access:node-4", "outcome": "applied", "position": {"stream": "CREWLET_ACCESS_LOG", "generation": 0, "seq": 4120}}, {"domain": "atlas", "stream": "CREWLET_ATLAS_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.atlas:node-4", "outcome": "applied", "position": {"stream": "CREWLET_ATLAS_LOG", "generation": 0, "seq": 310}}, {"domain": "advisor", "stream": "CREWLET_ADVISOR_LOG", "op_id": "01a0cd85-735a-7294-9d3e-38998abd698c.evict-node-4.evict.advisor:node-4", "outcome": "applied", "position": {"stream": "CREWLET_ADVISOR_LOG", "generation": 0, "seq": 5140}} ]}Each entry is one log’s own answer. outcome is the write’s three-valued outcome, applied, pending or unknown, with the position the record holds (absent for unknown). A pending gate is a node about to stop writing, not one that has. An entry with error in place of outcome was not written; reason names why in the vocabulary every write refusal uses (log_full, evicted, …). A log that answered holds its record whatever the others did.
An unknown entry may carry "unvouched": true: this node’s operation ledger may have lost the row the operation needs (minted before the ledger’s sweep reached it), so the node published nothing, cannot tell whether the record landed, and the same request here answers the same every time. It offers other_node rather than retry_same_op: send the same request with the same op_id through a node whose ledger reaches back that far.
A log the gesture did not finish also carries actions (what to do, in order) and hint (why); both are absent on a log that holds its record. The actions are a closed set a client switches on, and hint names no client’s controls: crewlet retention evict renders an action as its own flags and the dashboard’s evict dialog as its own buttons (never -force beside a screen with no such flag). Every refusal answer above carries actions beside its hint and the op_id the request was sent under, so retry_same_op on 503 eviction_unjudged is the same request with that op_id. Nothing was written under it, so a fresh one is equally safe.
| Action | What the operator does | Where the gate answers it |
|---|---|---|
retry_same_op | Send the same request again with the answer’s op_id | An unknown outcome (unless unvouched), a lost race, a failure before the write answered, and a refusal that clears on its own (behind, deferred, floor_unknown, below_floor, eviction_unknown); a gate refusal (evicted, overtaken, abandoned) of another node’s copy of the operation, which this node’s append was collapsed onto (hint names that node): the reason is that node’s standing, so this node finishes it once the log’s duplicate window (two minutes from when the copy landed) has passed; 503 eviction_unjudged; and 503 readmission_unjudged (beside other_node) |
new_gesture | Start a new gesture, without op_id | superseded (the operation’s record landed and a later gate record on the same node undid it, e.g. an eviction retried after a readmission) and op_reused (an operation id that already names a record on another object) |
force | Send the eviction again with force=true | 409 eviction_refused, 503 eviction_unjudged |
other_node | Send it, with the same op_id, through another node the fleet still counts | This node’s own standing or record: evicted (this node is evicted), overtaken and abandoned (this node wrote the record from rows a reanchor left behind; use a node on the log’s current generation), an unvouched unknown, and beside retry_same_op on deferred, below_floor and 503 readmission_unjudged. An overtaken or abandoned refusal, and an evicted one whose hint says the gesture’s own record on that log applies nowhere, is a record that landed and applies nowhere: it holds the op_id on that log for the duplicate window (two minutes) from when it landed, and the same op_id sent sooner, through any node, is answered the same way, so hint says to wait that out first. An evicted refusal held at another operation’s record (the newest on the log’s subject when the gesture’s answer was lost, possibly a healthy peer’s) is this node’s own eviction: send it through another node at once; if this node’s own record did land, that node’s answer says so and when |
reanchor | Re-anchor the log first, then send the same request with the same op_id | wrong_stream |
set_capacity | Raise the log’s ceiling, then send the same request with the same op_id | log_full: a gate record is admitted into the log’s gate reserve, so this is a log full to its broker ceiling past even that |
wait | Wait for what hint names to clear, then run it again; a client reads the answer’s error beside the action | 409 eviction_refused (the lease to lapse), 409 readmission_refused (the node to catch up), 409 not_publishing (the fleet to leave its capacity window) |
restore | Restore the store and the stream from one backup | skew |
A log with a hint and no actions is one no gesture clears: a record larger than its log’s declared largest or the broker’s max_payload, a refusal the broker named, or a refusal reason this build has no word for. The hint carries the refusal’s own detail, which says what does clear it (the limit and what moves it, or the broker’s words). Only retry_same_op makes the same request, sent again now, the remedy. Four actions (retry_same_op, other_node, reanchor, set_capacity) keep the gesture’s own op_id as how it is finished after the operator has acted: a gesture sent afresh after raising a ceiling is a second one, which rewrites every log that already holds the first one’s record, re-dates the eviction, restarts its fence window and turns the first op_id into superseded. Only new_gesture ends the operation for good.
complete is true only when every log answered applied or pending. When it is false and a log offers retry_same_op, send the same request again with op_id set to the operation id the answer carried. Each log’s record is published under an id derived from it (the entry’s own op_id, carrying the gesture’s sign, the log and the node), and each log’s snapshot reads that id’s ledger row first: a log whose record is already the gate in force answers at its position and is not written twice, and only a missing log is written, however long after the first request, since the broker’s two-minute duplicate window plays no part. Without op_id the route mints a fresh one, which is a second gesture; an id carried from an eviction to the readmission after it is a different operation on every log, and one carried to another node is that node’s own operation.
Anything but a valid op_id is 400 op_id_invalid, nothing judged or written. Valid is in the engine’s grammar (a UUIDv7 whose leading 48 bits are the Unix millisecond it was minted at, optionally followed by . and a name) and at most 128 bytes of visible ASCII with no space. A client may mint its own before the first request, as both engine clients do (crewlet retention evict on the workstation’s clock, the dashboard’s evict dialog on the browser’s). The state log reads the mint instant to decide whether its ledger can vouch for a retry, so a client clock far ahead of the fleet’s is the one case this trusts a caller with. An id with no instant gives nothing to read. The rest is the broker’s: only the leading uuid is minted, and the whole id travels as the broker’s message-id header, which trims its ends and turns a line break into a space, so such an id would be deduplicated as a different id from the one every ledger answers for. It is refused rather than cleaned because a retry must send back the id it holds byte for byte; every id an answer carries already fits.
The gesture does not stop when its caller does. The judgement runs under the request within twenty seconds, so a request abandoned before it wrote nothing; once the first record is about to be written the node finishes under its own budget, thirty seconds for the logs, all written at once, so a dropped connection or client timeout never leaves a node evicted on one log and counted on another. A node answers within fifty seconds at most, so a client waiting a minute (as both engine clients do) or a reverse proxy at its usual sixty-second read timeout always reads the node’s own answer. A caller that sent its own op_id can ask again with it and read every log’s answer; one that let the route mint it lost the id with the answer that never arrived.
Every node running the state log serves both routes, whichever backends the company uses (a company on an external tracker still runs every log). A node with no log to write a gate to answers 503, not 404: the routes exist on this build. The node is asked at every request: one that booted with no company serves both routes, with no restart, from the first revision that runs a log.
The capacity window
Section titled “The capacity window”A log’s Tier A ceiling is only the value its stream is created with; these routes are the window in which a running log’s ceiling changes. The procedure is documented once; this is the wire surface. Every route here, the status read included, takes admin.
| Route | What it does |
|---|---|
POST /worklet/retention/capacity?stream=NAME&bytes=N&confirm=N | Opens or resumes the operation and drives it as far as this node’s mode allows. confirm repeats bytes; a mismatch is 400 (the target is chosen once for the life of an operation). assert_excluded=true is required only on an external broker. A window names at most 16 participants: on a fleet that counts more (every live member and data node, and every node with a position row that isn’t retired), no window opens and the answer is 409 capacity_refused naming each node counted only for its row and how to retire it. An admission from a still-running process (it holds its node’s presence) closes the window again as it opens: 409 capacity_refused naming the node, with no operation. An admission from a process that isn’t running answers 409 capacity_refused naming the node and the commands past it, with the window open at opened in operation: nothing is sent until that node restarts into a maintenance mode or is excluded, and the window refuses every node that starts in service until then. An admission whose node another process now holds is withdrawn by the window. A 200 also answers open_windows (every window open on any log, this one included, each with stream, operation_id, phase and target_max_bytes) and unread_windows (every log whose window this node couldn’t read); a node won’t start in service while either is non-empty. |
GET /worklet/retention/maintenance?stream=NAME | The operation, every acknowledgement of this log’s window (each naming its stream; one a node made as it booted with no window open names no operation: empty operation_id, attempt 0, which a baseline reads and a seal never takes), every admission, and what the window’s next step waits on, computed here. At opened that is the baseline: restarts_missing (participants with no restart into a maintenance mode recorded) and admissions_blocking (every admission but an excluded node’s). From baseline to seal it is the seal: sealed and blocking, which no longer reads an admission. Once sealed and confirmed it is sealed: true and no blocking. The operation’s retired names each participant whose retirement stands as this node judged it. |
POST /worklet/retention/maintenance/abandon?stream=NAME&confirm=OPERATION-ID | From opened clears the operation outright and answers no operation; from anywhere else enters the seal, and the operation records who abandoned it as abandoned_by. Either answers open_windows and unread_windows as capacity does. confirm repeats the open operation’s id and is checked first: missing is 400 confirm_required; another operation’s id is 400 confirm_required naming the open one in detail, with it in operation. |
POST /worklet/retention/maintenance/exclude?stream=NAME&node=ID&confirm=ID | Waives one node’s acknowledgement and withdraws its admission; the operation records who asserted it under excluded_by, keyed by the node, and the node leaves participants for excluded. An excluded node’s admission no longer stops the window, whether or not it could be withdrawn. A running node (one holding a live presence lease, one whose broker the fleet’s metadata group hears, or this node), a window’s last participant once it has sent a request, an exclusion past the 16 a window keeps, a window that moved while the node was being judged, and an id no node could run under are 409 capacity_refused in the engine’s words; presence or membership that couldn’t be read is too, and nothing is written. An exclusion lapses if the node is running, judged the same way, when the window’s next request leaves, which records it again. Answers open_windows and unread_windows as capacity does. |
POST /worklet/retention/maintenance/retire?node=ID&confirm=ID | Records that no process will run under the node id again, for the whole fleet and every capacity window to come (Who has to acknowledge), and answers retired (node_id, by, by_kind, operator_id, at). No window counts the id while it runs nothing (no presence, no broker the metadata group hears) and writes no position row; an open window’s operation names each participant so waived, judged as it was read, under retired. confirm repeats node; missing or different is 400 confirm_required. A running node (as exclude judges it), this node, or an id no node could run under is 409 capacity_refused in the engine’s words; presence or membership that couldn’t be read is too, and nothing is written. |
A blocked operation says why twice: blocked is a code for scripts (abandoned_by_operator, capacity_operation_unsealed, capacity_fleet_too_large, with outgrown the count of nodes the next request would have counted, capacity_window_records_too_many, with outgrown the count it would have recorded, recounted after each exclusion or retirement since, or capacity_journal_full) and blocked_detail is the sentence a person reads: what blocked the window and what clears it, with every command as the CLI takes it. An abandoned window’s sentence is decided by its seal, so an answer carrying one reads the window’s acknowledgements. Every answer carrying an operation carries both, as does each entry in the retention report’s maintenance list. A code this build doesn’t know still gets a sentence, saying so.
Every gesture on the window names who made it: by and operator_id for its opener, and the same pair under abandoned_by and, per node, excluded_by: the author and the credential they acted through. An abandonment from opened clears the record it would have been written on, so only that log names who made it.
A node in normal mode refuses the write routes, naming the restart: the usage a resize is decided against must be a quantity nothing can move.
Every refusal is 409 capacity_refused in its own words: what was refused, what to do, the numbers it turns on, never the error underneath (that goes to this node’s log). A gesture that stopped on a fault nothing told is 500 capacity_failed, pointing at the status read. A status read that couldn’t read the window is 503 maintenance_unreadable with a Retry-After (ask again once coordination answers); one that read the window but not its acknowledgements or the admissions answers 200 with the window and acks_unread: true or admissions_unread: true, leaving out that register and every list formed from it (restarts_missing, admissions_blocking, sealed, blocking). One that couldn’t judge which participants are retired answers retired_unread: true, no retired, and none of those lists, each of which waives the retired. An operation in any answer that couldn’t judge them carries retired_unread: true too, and its blocked_detail says so rather than naming a node to restart. A stream this node doesn’t keep is 404 unknown_stream, naming the ones it does. Each answer to a write carries operation where there is one. The three-mode boot is crewlet run -mode; see the CLI reference.
restarts_missing / admissions_blocking and sealed / blocking are computed server-side from the predicates the coordinator itself runs; a client re-deriving them would be a second opinion that drifts.
Re-anchoring
Section titled “Re-anchoring”| Route | What it does |
|---|---|
GET /worklet/retention/reanchor?stream=NAME | The LIVE stream’s own created_at, read from the broker on the call (the instant a wrong_stream refusal names), the generation that stream’s domain stands at, and what a reanchor run now would do: case: recreated (another stream than the rows are keyed to, followed from its first surviving record), restored (the same stream brought back from an older copy, ending below the checkpoint or holding another record at it since, followed from its end, one below the node’s own generation record where an earlier attempt already appended it) or abandoned (the same stream, continuing in a generation only an evicted peer held, followed from this node’s own checkpoint with that generation’s records void), with cursor, the sequence the new checkpoint would sit at. With nothing to re-anchor there is no case, and nothing_to_reanchor says why. A restored log holding records this node’s rows do not hold, written after the restore, also answers discards (the newest of them: seq, kind, subject, writer, op_id, stored_at, and ledger_lost_before when its operation is older than the instant this node’s operation ledger may have lost rows from: the rows may hold it after all) and discarding (why a reanchor refuses without discard=true). 404 unknown_stream for a stream this node does not run; 503 stream_unreadable when the broker did not answer the read (worth retrying). |
POST /worklet/retention/reanchor?stream=NAME&confirm=<created_at>[&force=true][&discard=true] | Runs that ONE domain’s generation transition, answering with the new generation, the case it answered, the cursor its checkpoint went to (for a restored log, one below the generation record the transition appended; once that record is appended the transition finishes on its own, so a disconnecting client does not stop it halfway) and, when it discarded records written after a restore, the newest as discarded. No other domain’s checkpoint moves, and the domain’s applier resumes with no restart. |
confirm is the GET’s value, supplied by the caller: it means I looked at the thing I am re-anchoring, so the two are separate round trips. It is compared as an instant at microsecond precision, so the RFC 3339 value the GET answers is accepted as it came. force=true overrides the rule that only the most caught-up node may re-anchor, for a fleet whose register cannot say; it never overrides a peer that has already re-anchored the stream, whose rows are the fleet’s history in the new generation and which the refusal names. discard=true accepts that a restored log’s records this node’s rows do not hold (written after the restore, named by the GET as discards) are applied on no node; without it that reanchor is 409 reanchor_refused, and with it the answer carries the newest as discarded. The flags are separate because neither answers the other’s question. A node in a capacity window refuses every reanchor 409 reanchor_refused, naming its mode: the reanchor appends a generation record, and the window’s mode appends nothing.
Every refusal, and every transition that stopped where it can say what was committed and what to do, is 409 reanchor_refused in those words, as nothing_to_reanchor and discarding are (no package name, no broker words; those go to this node’s log). A transition that stopped on a fault nothing told is 500 reanchor_failed, pointing at the status read; a status read the broker didn’t answer is 503 stream_unreadable; a stream this node doesn’t keep is 404 unknown_stream, naming the ones it does.
Artifacts
Section titled “Artifacts”An artifact is a page, a doc or a native sheet a person or a seat publishes for others to open: immutable numbered versions of its files, shared with seats, units or the whole company at a role (viewer, commenter, contributor, editor; the owner holds every role). Its records are the artifacts state log’s, every data node holds them, and its bytes are objects in the object store. These routes are served on api.port; the pages themselves are served only on the separate artifact origin (api.artifacts), inside a sandboxed frame, never here.
Who may do what
Section titled “Who may do what”Every route decides one verb of the authority table on the artifact’s own owner and shares, before a version, file or byte is read:
- A caller with no relation to an artifact is answered
404 not_found, byte for byte as an id nothing holds, on every route, so nothing says a private artifact exists. - A relation below the verb’s role is
403 unauthorizedwithreason: roleandrolenaming what it needs, which the owner can share. - Authoring asks the artifacts app beside the role: creating, publishing, renaming, labelling, adding an asset. Reading and sharing ask the relation alone, so a person invited with no app reads what was shared with them.
- An agent is kept to
contributoron an artifact it does not own unless the company setsartifacts.agents_manage_others. The lead of an agent holds owner on that agent’s artifacts, and nothing on a person’s. - Trash, restore and transfer are a person’s; a transfer and a forced publish need a person present, which a machine token never is (
403 token_refused). A purge is an administrator’s, with a proof of identity inside the step-up window (403 step_up_requiredotherwise) and a person present. - An administrator may open any artifact. Every read only the admin path admits writes an elevated-read record first (one per day, administrator, artifact and version), which the artifact’s history shows its owner and editors and the company trail (
GET /artifacts/trail) shows every administrator; a read whose record cannot be written is503and not served. That covers every read of content: a version’s files, source and frame, every datastore question and the CSV export, a room’s join, and the live entry a412 version_movedhands back. An administrator who holds a share is admitted as that share, at its role; the admin path (owner, recorded) opens only for a verb their relations do not reach. A listing never shows an artifact on the admin path. - The trash stops serving content at once. A trashed artifact’s head, its
versions and its history stay readable to its audience for the trash view;
its files, source, frames, export and datastore questions are
409 artifact_trashed(artifact_trashedon the socket), and a room’s join is refusedartifact_trashed, before anything is read or recorded — to a reader it is disclosed to: one with no relation is toldnot_found, as for an id nothing holds. The trash is a state its owner’s restore ends, whichnot_foundwould deny; a purge is for good, whichnot_found— and a purged store’s410 data_gone— say truly. - A purge is committed before anything it removes is gone. Its first step stamps the artifact on its own record (
purge_begun_aton the head, and into the trash if it was live), and only then does the datastore go, which no restore can bring back. From then on a restore is409 artifact_purgingand the artifact is never served or written again; a purge that stopped part way finishes on its retry under the same key, an administrator’s purge, or the trash reaper’s next pass, which takes every begun purge whatever its trash term.
What the decision concluded is stamped into the record every write forms: the caller’s role on the artifact, whether only the admin path admitted them, the Tier A quotas in force, the surface the request came through (dashboard for a browser session, api for a bearer token) and the work item it was made for. The domain’s applier decides from the record alone.
Writes
Section titled “Writes”| Method and path | Verb | What it does |
|---|---|---|
POST /artifacts/uploads | create_artifact | Upload intent for a new artifact |
POST /artifacts/{id}/uploads | publish_artifact, or upload_artifact_asset with asset: true | Upload intent for the next version, or into the asset store |
PUT /artifacts/uploads/{upload}/files/{path} | the intent’s own verb, decided again | One file’s bytes, streamed through the engine |
POST /artifacts | create_artifact | A new artifact and its first version, owned by the caller. "starter": true begins from its kind’s starter content, which the engine holds and publishes inline, naming no upload, files or entry; a kind with no starter is 422 invalid. A slides starter takes an optional "deck": {"theme": "<id>", "slides": [{"layout": "<id>", "title": "..."}]} (at most 60 slides, each title at most 200 bytes); absent, it opens with a cover, an agenda, two columns and a closing slide in the ink theme. An unknown theme or layout is 422 invalid. A doc’s starter may carry "doc": {"body": "<markdown>"}: the title becomes the tab’s heading, the body goes under it, held to the doc format, at most 1 MiB in all. A design’s starter is the layout sent with it: its boards (each a title, x, y, w, h and optional brief, the first the cover) and notes (as canvas.json holds them), published as canvas.json and one placeholder page per board under boards/, every typed word escaped as text; a design starter with no layout, or a layout outside the canvas format’s bounds, is 422 invalid, each problem named at its place (boards[2].w). deck, doc or layout without starter, or on any other kind, is 422 invalid. "folder": "<id>" creates it in that folder, which asks artifacts.folder.file on it beside the create: a folder the caller cannot see, or a removed one, is 404 folder_not_found |
POST /artifacts/checks | create_artifact | A page’s text files judged as a publish of its kind would judge them, writing nothing: {"kind": "html", "entry": "index.html", "files": [{"path": "index.html", "text": "..."}]}, answered 200 with every refusals and warnings finding (path, line, code, message). Framed kinds only, 1 to 64 text files, at most 2 MiB of text. An allowlisted CDN file is named where its copy would be served and never fetched, so a CDN that refuses it is found only at publish. Budget per node: two checks a second per person, burst of ten; past it 429 check_budget with a Retry-After |
POST /artifacts/{id}/versions | publish_artifact; artifacts.publish.force beside it when forced | The next version, based on If-Match: "<n>" |
POST /artifacts/{id}/versions/{n}/restore | publish_artifact | Version n again as a new version, every file carried, based on If-Match |
PATCH /artifacts/{id} | update_artifact | The title, the description or the icon |
PATCH /artifacts/{id}/versions/{n} | update_artifact | Version n’s label ({"label": ""} clears it); a labelled version is kept past the hundred unlabelled ones |
PUT /artifacts/{id}/shares | share_artifact | {"audience": {"kind": "seat", "id": "bob"}, "role": "editor"}; never above the sharer’s own role, never the company from an agent. A NEW audience is held to the grant rule: a seat audience is a seat handle, never a login (token:maya or jane.doe is refused 422, invalid), and a seat or unit the company’s roster does not hold is refused the same way, with the sentence that says which; a create’s shares follow the same rule. An audience the artifact already shares with may change its role whatever it names |
DELETE /artifacts/{id}/shares/{audience} | unshare_artifact | The audience as seat:<handle>, unit:<key> or company. Any audience a share can be stored under is withdrawn, never held to the grant rule or roster, so an owner can remove a share to a login or to a seat the chart has since removed |
POST /artifacts/{id}/transfer | artifacts.transfer | {"to": "<seat>"} |
POST /artifacts/{id}/work-items | get_artifact on the artifact and update_work_item on the item | {"work_item": "ENG-12", "after"?: "CREWLET_TRACKER_LOG@1:9"}: links the artifact to a work item Worklet holds, so the item’s Artifacts panel lists it. after is the position the item’s create answered with; the item is read from no earlier than it. See Linking to a work item |
DELETE /artifacts/{id} | artifacts.trash | Into the trash: every frame stops loading at once; purged after thirty days |
POST /artifacts/{id}/restore | artifacts.restore | Out of the trash; 409 artifact_purging once a purge has begun |
POST /artifacts/{id}/purge | artifacts.purge | Gone for good, in three steps: the artifact is committed to its purge (into the trash, never restored), its datastore goes, then its own rows |
POST /artifacts/{id}/assets | upload_artifact_asset | {"upload": "<upload>", "name": "<name>"}: finalize an asset |
DELETE /artifacts/{id}/assets/{asset} | upload_artifact_asset | Remove one |
PUT, DELETE /artifacts/{id}/pin | artifacts.pin | The caller’s own pin |
POST /artifacts/{id}/comments | comment_on_artifact | Open a thread with its first remark: {"body": "<markdown>", "version"?, "anchor"?, "quote"?, "crop"?, "crop_type"?}. version is the version it is about (absent, the head), anchor where on it, as Artifacts says each kind takes (absent, the whole version), quote the page’s words (at most 1 KiB), crop a picture of the part as standard base64, crop_type image/png, image/jpeg or image/webp (at most 64 KiB, 800 pixels on the longer side). Answers the thread and remark ids. A remark is at most 16 KiB; one carrying a credential is 422 credential_refused; a trashed artifact is 409 artifact_trashed; one at 2000 threads is 409 conflict |
POST /artifacts/{id}/comments/{thread}/replies | comment_on_artifact | {"body", "reply_to"?}: a remark in the thread, answering the thread or one remark. A thread at 500 remarks is 409 conflict |
PATCH /artifacts/{id}/comments/{thread}/remarks/{remark} | edit_artifact_comment | {"body"}: what one of the caller’s own remarks says now; somebody else’s is 403 forbidden |
DELETE /artifacts/{id}/comments/{thread}/remarks/{remark} | remove_artifact_comment | Take one remark’s words down; it keeps its place, marked removed. The author’s, or an administrator’s moderating |
POST /artifacts/{id}/comments/{thread}/resolve | resolve_artifact_comment | {"version"?}: resolve the thread citing the version that addressed it, from the version it was made on to the head (absent, the head) |
POST /artifacts/{id}/comments/{thread}/reopen | resolve_artifact_comment | Reopen a resolved thread |
PUT /artifacts/{id}/folder | move_artifact on the artifact and artifacts.folder.file on the folder | {"folder": "<id>"} files it in a folder, {"folder": ""} at the top level. See Folders |
POST /artifacts/folder-moves | as PUT /artifacts/{id}/folder, for each item alone | {"items": [{"artifact", "folder"}]}, at most 25, answered 200 with {"results": [{"artifact", "outcome", "message"?}]}. See Folders |
A share that reaches nobody is surfaced, not dropped. An earlier grant rule let a share name a login as a seat (seat:token:maya), which no seat matches, so it grants nothing. The engine neither deletes nor sweeps such a share: it is authorisation data its owner wrote, and removing it silently would rewrite who was meant to have access. Instead artifact_access marks it invalid: true, the share dialog lists it with why (“token:maya is a sign-in, not a seat. Remove it and share with their seat.”) and offers Remove as its one action, and the listing never counts it toward the login’s Shared section.
Every write but the transfer carries an Idempotency-Key, from which every record id is derived, so a retry under the same key is the same operation (400 op_id_invalid without one). A write answers 200 with its outcome, 202 for one durable and not yet applied on this node, and 503 with outcome: unknown and the op_id for one nobody could account for: send it again under the same key, never a fresh one. The transfer needs no key: the upload claims each file before a byte is read, and a second put of it is refused 409 upload_consumed. A node that runs no upload pipeline (no object store, or no coordination store to reserve the bytes in) answers every route that checks or publishes (create, check, publish, assets and transfer) 503 unavailable with no Retry-After: the pipeline is built once per process, so no wait changes the answer; why is in the node’s log.
Linking to a work item
Section titled “Linking to a work item”POST /artifacts/{id}/work-items puts an existing artifact on a Worklet item’s Artifacts panel, as a create or publish carrying work_item does for what it makes. It records one link_work_item row in the artifact’s history, filed under the item, and changes nothing else.
curl -X POST -H "Authorization: Bearer $TOKEN" \ -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \ -d '{"work_item": "ENG-12"}' \ "http://localhost:8000/artifacts/$ID/work-items"- The artifact is decided as a read (
get_artifact): any role, viewer and above. A caller with no relation is404 not_foundlike any artifact route; an administrator with none is admitted on the admin path, recorded as an elevated read first. - The item is decided as a write (
update_work_item), by the rulePATCH /worklet/items/{key}takes: a caller who does not use Worklet is403 unauthorized. - The item must be live.
work_itemis a key or an item id, at most 64 bytes of visible ASCII; one Worklet does not hold or holds removed is422 invalid, as is a company whose work items another tracker keeps. A node not yet handed a company answers503 no_active_revision. A trashed artifact is409 artifact_trashed. - A link sent right after the item was filed names its create. On a fleet the link can reach a node that has not applied the create yet. So
aftercarries thepositionthe create answered with (<stream>@<generation>:<sequence>), and the item is read through Worklet’s read-your-writes floor, the onemin_positionsets on every Worklet read: the read waits up to the read budget for this node to apply the create. A node that does not is refused as every floored Worklet read is,503 unavailablewithrefusal: "behind", itsdetailand aRetry-After, and nothing is linked; send it again under the same key. Anafterthat is not a position, or is on another log than Worklet’s (an artifact’s ownposition, say), is422 invalidand never waited for. Withoutafterthe item is read at this surface’s own level.
curl -X POST -H "Authorization: Bearer $TOKEN" \ -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \ -d '{"work_item": "ENG-12", "after": "CREWLET_TRACKER_LOG@1:9"}' \ "http://localhost:8000/artifacts/$ID/work-items"The answer is {"artifact", "work_item", "op_id", "outcome", "position"}, where work_item is the item’s current key: an id or a former key is linked under it. A link the artifact’s history already makes (an earlier link, or a write made for the item) answers 200 and writes nothing.
Publishing a version
Section titled “Publishing a version”Bytes are reserved before they move. An intent declares every file’s path, SHA-256 and size; the node answers which the artifact already holds (carried, no byte moves) and how each of the rest is sent (transfers): a presigned PUT straight to the bucket where the S3 backend proved it can take one, a PUT to this API otherwise. Then the publish names the upload and every file of the version.
# 1. declare the filescurl -X POST -H "Authorization: Bearer $CREWLET_API_TOKEN" \ -H "Idempotency-Key: $KEY" -H "Content-Type: application/json" \ -d '{"entries":[{"path":"index.html","sha256":"<hex>","size":5120}]}' \ "http://localhost:8000/artifacts/$ID/uploads"
# 2. send each file the answer lists under transferscurl -X PUT -H "Authorization: Bearer $CREWLET_API_TOKEN" \ --data-binary @index.html \ "http://localhost:8000/artifacts/uploads/$UPLOAD/files/index.html"
# 3. publish, based on the head you readcurl -X POST -H "Authorization: Bearer $CREWLET_API_TOKEN" \ -H "Idempotency-Key: $KEY2" -H 'If-Match: "3"' -H "Content-Type: application/json" \ -d '{"upload":"'$UPLOAD'","files":[{"path":"index.html","upload":true}, {"path":"style.css","carry":"<hex>"}],"capabilities":["db"]}' \ "http://localhost:8000/artifacts/$ID/versions"A file is named by upload: true (its bytes came through the upload), carry: "<sha256>" (bytes the artifact holds), or from: <n> (version n’s file at that path). In mode: patch a file left out is carried from the base, remove: true drops one, and edits (old_str/new_str, each matching exactly once) change the base version’s text. The answer is the new version’s number, the policy linter’s warnings (at most 50, each message at most 512 bytes, then one of code more_warnings counting the rest, on the file of the first it leaves out; a retry of the publish is answered the same) and files ({"stored", "carried"}: how many files this publish stored new and how many the artifact already held, counted from the manifest that landed, so an unchanged page the upload sent counts as held). work_item names the Worklet item the version is made for, which lists the artifact there (GET /artifacts?work_item=CRW-412).
A publish based on a head that has moved is 412 version_moved, carrying the live head, the live version (live, manifest included) and, where the entry is text, up to 1 MiB of it (entry.text, entry.truncated past that): merge onto it and publish again with If-Match naming the live number. "force": true publishes over the moved head, a person’s gesture with a person present, and the version is marked forced.
| Path | Question | Answers |
|---|---|---|
GET /artifacts | artifacts | One page of what the caller can see, in S3 ListObjectsV2 terms: prefix (a folder path, Marketing/Q4/, empty for the top level) or folder (the folder’s id), delimiter=/ (one level, child folders as common_prefixes; absent, everything beneath), max-keys (50 by default, at most 200) and continuation-token; also scope (mine, shared, company, agents, all), kind, q, status (live, trashed), pinned, work_item, sort (updated, created, title, opened). Answers {prefix, delimiter?, contents, common_prefixes?, key_count, is_truncated, next_continuation_token?, total, read_level, position, complete}. Filtered for the caller’s relations and decided row by row, never refused. See Folders |
GET /artifact-folders | artifact_folders | The folder tree the caller sees: every folder, parents before children and siblings A to Z, each with its role for the caller and the artifacts and folders directly in it they can see, and top_level, the artifacts they can see filed in no folder they see. See Folders |
GET /artifacts/{id} | artifact | The head, the caller’s role, whether they may publish (writer), and the shares to the owner and editors (share_count below) |
GET /artifacts/{id}/versions | artifact_versions | The retained versions, newest first |
GET /artifacts/{id}/versions/{n} | artifact_version | One version and its manifest |
GET /artifacts/{id}/history | artifact_history | Every publish, share, trash, link to a work item and elevated read, newest first; below editor, without the elevated reads or who a share named |
GET /artifacts/{id}/assets | artifact_assets | The asset store |
GET /artifacts/{id}/seen-by | artifact_seen_by | Who has opened it, to the owner and editors while the company’s artifacts.seen_by is editors (shown: false otherwise) |
GET /artifacts/{id}/access | artifact_access | The share dialog’s list: the owner, each share with the seats a unit share reaches today (and invalid: true on a share that reaches nobody, see above), and an agent owner’s leads; to a viewer, the owner and a count |
GET /artifacts/{id}/comments | artifact_comments | Every thread placed on version (absent, the head): {artifact, version, head, counts: {open, resolved, outdated}, can_comment, role, threads}, each thread {id, version, anchor, label, placement, place?, quote?, crop?, status, resolved_by?, resolved_by_kind?, resolved_at?, resolved_version?, created_by, created_by_kind, created_at, updated_at, remarks} and each remark {id, author, author_kind, body, mentions?, reply_to?, created_at, edited_at?, removed?}. placement is here, moved (found again by its content, place where), outdated (gone from that version, place absent) or later (made on a later version); crop is a data URL. open counts open threads still placed, outdated the open ones whose part is gone. Read as the artifact’s content: a trashed artifact is 409 artifact_trashed |
GET /artifacts/usage | artifact_usage | The company’s counters against the Tier A quotas; artifacts.usage, an administrator’s |
GET /artifacts/trail | artifact_trail | The company trail of every artifact: every artifact’s history rows across the company, private ones included, newest first in the log’s order, each naming its artifact, current title and owner, the op, the actor and whether only the admin path admitted them. op= narrows it to one op (read_elevated lists every administrator’s override, including ones absent from an artifact’s own history), with cursor and limit; an op no history row is filed under (a pin, an opened mark, a purge, which takes the history with it) is 400 bad_params. audit.read, an administrator’s, decided by no relation to any artifact |
A head and every version carry capabilities, always present (the set declared, [] for none); contract is absent for a kind that runs no page runtime (a Markdown document, a sheet).
The same questions are asked over the socket by name. Every question about one artifact is decided by get_artifact and records the admin path’s override as every read route does.
Folders
Section titled “Folders”An artifact is filed in at most one folder, and a folder grants nothing: who may open an artifact is still its owner and its own shares, so filing, moving and removing its folder never widen or narrow its access (ADR-0047). A folder’s own visibility is its top-level folder’s: that folder’s owner and shares, a preset chosen when it is made (company, everyone in the company as contributor, or private, its owner alone). So a tree is seen whole or not at all, and a folder the caller cannot see is answered as one that does not exist.
| Method and path | Verb | What it does |
|---|---|---|
POST /artifact-folders | create_artifact_folder, and artifacts.folder.file on the parent | {"name", "parent"?, "visibility"?}, or {"path": "Q3/Week 1", "parents": true, "parent"?, "visibility"?} to create a path with its missing parents in one record (mkdir -p). A top-level folder states visibility (company or private) and is a person’s to make; an agent creates folders only inside one. Answers 201 with {folders, created, op_id, outcome, position}, the chain parents first, and 200 with created: 0 when every name was already there |
PATCH /artifact-folders/{id} | artifacts.folder.rename, artifacts.folder.move, and artifacts.folder.file on a new parent | {"name"?, "parent"?, "confirm_widen"?}: a rename or a move ("parent": "" to the top level), one per request, since a move refused after a rename would leave the rename behind; a body naming both is 422 invalid. A move into a tree whose audience reaches somebody the folder’s present one does not (a private folder under a company one) is 409 folder_widens until confirm_widen is sent. Answers {folder, op_id, outcome, position} |
DELETE /artifact-folders/{id} | artifacts.folder.remove | Removes the folder: its child folders and every artifact in it, live and trashed, move up to its parent in one record. Nothing is trashed and nobody loses access. A child whose name its new place already holds is 409 folder_name_taken; the answer carries no counts, which would include artifacts the caller cannot see |
PUT /artifacts/{id}/folder | move_artifact (editor) on the artifact and artifacts.folder.file (contributor) on the folder | Files one artifact; to the top level from a folder it is move_artifact, or the folder’s manager’s artifacts.folder.unfile for an artifact they can read. A move is not an edit: the artifact’s updated_at stays, and its history row names the folders by id only |
POST /artifacts/folder-moves | as above, per item | Up to 25 artifacts, each decided and written alone: one item’s refusal is named in its result (outcome is moved or the refusal’s code, with a message) and stops nothing else |
Who manages a folder. Seeing a folder and filing into it are decided on its top-level folder; renaming, moving, removing it and taking an artifact out of it are decided on the folder’s own owner, and are a person’s: its owner, the owner’s lead where the owner is an agent, or an administrator, recorded as the admin path. The tree answers each folder’s role for the caller (owner, contributor or viewer), and a folder’s shares only to its managers. An administrator is never shown a private folder: the admin path lists no folder, as it lists no artifact.
Names. A name is 1 to 80 bytes, trimmed and NFC, with no /, no control, bidi or zero-width character, and not . or ... Siblings are unique without regard to case. At the top level the company’s folders are unique among themselves and each owner’s own among their own, so a name is never refused because of a folder its creator cannot see; a path naming both a private and a company folder is 422 folder_ambiguous on a write (candidates lists each by id) and 400 bad_params on the listing: list it by folder id. Folders nest at most four deep; a company holds at most 2000 live folders and one folder at most 1000 children.
Listing by folder. The listing places every row in the tree as its reader sees it: an artifact filed in a folder the reader cannot see is at their top level, and its folder and folder_path are answered only where they see that folder. One artifact’s head and its history’s moves (from_folder, to_folder) name a folder on the same rule. A prefix or folder that names nothing the caller sees is 404 not_found, never an empty page. The continuation token carries the folder’s id rather than its path, so a rename between pages does not move the next one; a token is held to the delimiter it was minted under, and a query naming another folder beside a token (by folder, or by a prefix that names a folder now) is refused. Each common prefix is {prefix, folder, name, visibility, items, folders}, counting only what the reader may open, by the same filter the page and its total use.
Viewing a version
Section titled “Viewing a version”The API origin never renders an artifact:
-
POST /artifacts/{id}/tickets({"version": n, "document": "path"}, the head by default) mints the frame the dashboard embeds a page in, or one artboard of a design:frame_urlon the artifact origin under a one-hour view ticket bound to the caller’s own sign-in or token, theoriginits bridge must hear from, thesandboxandallowattributes the dashboard sets verbatim, andcapabilities, what the ticket grants in canonical order ([]for none): the origin writes that on the page’s runtime element, and the dashboard’s host tells the page the same list at the handshake. The page is re-authorized on every document request there, so a withdrawn share, a sign-out or the trash closes it at once.documentnames the page the frame opens: left out for a page’s entry, and always one artboard’s path for a design, whose ticket opens that page and no other. Adocumentthat is not an HTML page of the version (a design’scanvas.json, a stylesheet, a path the version does not hold, or none for a design) is422 invalid. A doc, a deck or a sheet is409 artifact_not_framed, and a deployment with noapi.artifacts.external_urlis409 artifact_origin_unset. Minting a frame records that the caller opened the artifact, at most once in fifteen minutes.?purpose=previewmints a gallery card’s live preview: the same read under the same authorization as an open (a reader who may not open the artifact may not preview it, and an administrator’s preview of an artifact only the admin path admits is still recorded as an elevated read), and nothing more than a read. A preview records no open and changes no Seen by list; its ticket carries the purpose, is granted onlyassets,dbandstateof what the version declares (neveridentityorpresence, so the runtime offers no viewer and no room), and lives at most five minutes. The dashboard answers a preview’sdbread-only (a document, a page, a query, the schema, and a subscription answered once with the collection as it stands, each read as the reader), refusing every write and undo, pushing nothing after a subscription’s answer and naming no viewer. A preview’sstateis a newcomer’s: empty at first, what the page sets kept by the host for the frame’s life (at most 64 keys of 16 KiB each), never the reader’s own and never sent to the engine. Its frame files no ready report (POST /artifacts/readyrefuses one as422 invalid). An unknown purpose is422 invalid, never read as an open. -
GET /artifacts/{id}/versions/{n}/sourceanswers a version’s entry as JSON (text,content_type,size), read back and checked against its digest: how the dashboard reads a design’scanvas.json, which it draws natively. Reading a design’s source records that the caller opened it. -
GET /artifacts/{id}/versions/{n}/deckanswers a deck’s version (aslidesartifact) as its canonical tree: the title, theme, cover, the outline’s sections, the typefaces and every slide in order, each its id, title, notes, transition, hidden flag and the<section>as elements, attributes and canonical style declarations, read through the same slide format parser the publish was held to. Reading it records that the caller opened the deck, as a frame’s ticket does. Any other kind is409 content_refused. -
GET /artifacts/starters/slides(list_artifacts, everybody’s) answers what a deck can begin from:themes, each itsid,name,tagandsample(a deck of every layout once in that theme, as the same canonical tree a version’s deck is answered as),layouts, each itsid,name,descriptionandheading(the title a slide of it opens with), anddefault, the plan a starter opens with when it names none. Whenever the company has adopted a brand, its theme (brand, named for the brand, colours and typefaces resolved from the adoption) comes first, its sample’s cover drawing the logo at the path the starter copies it to, withlogo({path, slot}) naming that path and the adopted brand’s file slot it is drawn from, since a sample holds no bytes; the answer is composed per request, so an adoption or a clear shows at once. The create page draws its theme picker from it, and the deck editor adds a slide from the sample of the theme its deck’s index names (see Slide Format). -
GET /artifacts/{id}/versions/{n}/docanswers a doc’s version (adocartifact) tab by tab:indexed(whether it opens on adoc.jsonindex rather than one Markdown file) and every tab in the index’s order, each itspath,titleand Markdowntext, read through the same doc format the publish was held to. Reading it records that the caller opened the doc. Any other kind is409 content_refused, and so is a deck, doc or design whose version no longer reads in its format: the answer says it can’t be shown and that publishing it again fixes that, with the format’s findings in the node’s log. -
GET /artifacts/{id}/versions/{n}/outlineanswers a version’s structure without every file: for a deck, its title, slide count, cover, sections and each slide’s id, title and hidden flag, plus the cover slide’s tree; for a doc, each tab’spath,titleand size inbytes, plus thecover: the first tab’s opening as Markdown, cut at a line boundary within 1 KiB; for a dashboard, its title, every widget’s id, type, title, width and dataset, and its first three stats’ labels with their datasets’ titles (never a value, which is each viewer’s); for a design (design), its title, board count, cover board, theboundsevery board and note fits in, each board’spath,title,x,y,wandhin the canvas’s order and the number ofnotes, read fromcanvas.jsonalone; for a brand kit (brand), its wholebrand.jsonasbrand.document, read under the brand format again. Any other kind answers its kind alone. A cover is not an open: none is recorded. A node keeps the decks, docs and canvases it has read by version (16 MiB of their files at most for each), and the boards (64 MiB of their spec and file datasets), since a version never changes. -
GET /artifacts/{id}/versions/{n}/dashboardanswers a dashboard’s version (adashboardartifact) as its board: the spec held to the dashboard spec format again on read, and every dataset’s shape (columns and key), how it is kept current (live,signal,interval,manual,fixedorderived, with the collection, push or interval it follows) and, for an engine dataset, the catalogue’s words for what it reads and who may read it. It carries no row: every reader is answered the same board. Reading it records that the caller opened the dashboard, unless the request carries?purpose=preview(same board, same authorization, no open recorded). Any other kind is409 content_refused. -
GET /artifacts/{id}/versions/{n}/sources/{dataset}answers one dataset of a dashboard as its viewer (ADR-0043): the query string is the board’s filters, each refused unless the board offers it and the value is one of its choices (400 bad_params). Anenginedataset is answered by the same question the dashboard’s own screens ask, on the caller’s own request, so a viewer withoutworkletis never handed a task; astoredataset is read under the collection’s read rule; acalcdataset is computed from its inputs read the same way. The answer is{artifact, version, dataset, status}and: forready,table(columns,key,rows,truncated) andas_of, when the rows were true; forrefused,refusal(thedatasetwhose source refused, which for a calculation may be an input, the rule’sreasonand thegrantsthat would admit the caller) and adetailsentence; forunanswered, adetailsaying why this node cannot answer it for this caller (a domain it does not run, a personal scope for a credential that names no person). An engine answer is kept 30 seconds per principal and arguments; a node answers at most two live reads a second per viewer on one artifact (burst 64) and twenty a second for everybody on it (burst 320), past which it is429 read_budgetwith aRetry-After. A read this node could not make for a condition of its own is503 unavailable, itsdetailthe condition’s words and itsRetry-Afterthe condition’s (none where no wait clears it); a failure that is no condition is500 internal_error, its reason in the node’s log. -
GET /artifacts/sourcesanswers the engine source catalogue a dashboard’senginedatasets may read: each source’s name, domain, purpose, who may read it, typed parameters, columns and key, the push that announces a change and the most rows it answers. Any resolved caller. -
GET /artifacts/sources/preview/{name}answers one catalogue source’s rows as the caller, before any board exists: what the dashboard’s New dashboard builder draws its suggested figures from. Decided byartifacts.source.read(theartifactsapp, as making a board asks), then answered by the very read a board’senginedataset over the source is: the same question on the caller’s own request, the same 30 second per-principal cache, at most the source’s most rows. The query string is the source’s parameters, each held to the catalogue’s type and bounds and every one left out at its default; a parameter the source does not take, a value outside its type or a key sent twice is400 bad_params, and a name the catalogue does not list is404 not_found. The answer is{source, status}withtableandas_of, orrefusalanddetail, exactly as a dataset’s. It reads no artifact and records nothing. One caller’s previews are budgeted as their reads of one board are (two a second, burst 64), past which it is429 read_budgetwith aRetry-After. -
GET /artifacts/{id}/versions/{n}/files/{path}streams one file as an attachment, any text and anything a browser could run (HTML, SVG, a script) astext/plain, under the API’s owndefault-src 'none'policy andCache-Control: private, no-store, with its SHA-256 as a strongETag. -
POST /artifacts/ready(artifacts.ready, everybody’s) is the dashboard’s ready report for the artifact-ready objective:{"frame_url", "outcome": "ready" | "failed", "elapsed_ms"}: the frame exactly as the ticket route answered it, how it ended (the page’s bridge hello, or a frame that failed or never said hello), and the milliseconds since the frame was handed over, by the browser’s clock. Answered204once counted. The frame must be a live one this deployment minted for the caller’s own sign-in or token (422 invalidotherwise, as for a URL that is no frame); each frame reports once (409 conflict), never a time longer than the frame has existed (422 invalid), and one credential sends at most a sustained report a second after a burst of thirty (429 throttled, withRetry-After). A deployment with noapi.artifacts.external_urlis409 artifact_origin_unset.
The company’s brand
Section titled “The company’s brand”A brand kit is an artifact of kind brand (its brand.json and the logos and faces it names, held to the brand format at publish; a draft needs only its name). The company’s brand is the one version of one kit an administrator adopted: the adoption snapshots that version’s index, the stylesheet generated from it and a copy of every file it serves, so publishing to, trashing or purging the kit changes nothing until somebody adopts again. What is adopted is the company’s public face: everybody reads it.
| Method and path | Verb | What it does |
|---|---|---|
GET /brand | get_company_brand (everybody’s) | The adopted brand, or {"brand": null}: the kit and its kit_version, the document (the adopted brand.json), the generated stylesheet’s css_sha, every served file in files (slot, content_type and object as {hash, size}, the stylesheet first), adopted_by and adopted_at. newer_version and newer_by name the kit’s newest version and its publisher where newer than the adopted one, answered only to a reader who may open the kit (by a share, or as an administrator, which reads no content and leaves no elevated-read record). Also the brand question on the socket |
GET /brand/files/{hash} | get_company_brand | One file an adoption serves, by its SHA-256: an attachment, an SVG as text/plain, under the API’s own policy, as every artifact file is. A hash no current or retained adoption serves is 404 |
POST /brand/adoptions | artifacts.brand.adopt (an administrator, a person present, a recent proof) | {"kit": "<id>", "version": <n>}: adopt that version. Reading the kit is decided as any content read, so an administrator with no share on it is admitted on the admin path and the read recorded. The kit is read back and held to the brand format (422 policy_refused with its findings, code brand_format). A brand that leaves out logos.primary or colors.primary is 422 policy_refused with one brand_format finding per missing field (its message field: <name>: is required to adopt the brand: ...) and missing, the bare field names in that order; only a brand holding both is measured for contrast: its text colour on its light ground must reach 4.5:1 (422 brand_contrast, with contrast: the pair, its two colours, the unrounded ratio and the min), and a version the kit no longer keeps is 404 not_found. The adoption also labels the version Adopted <date> where that label is free. Carries an Idempotency-Key |
DELETE /brand/adoptions/current | artifacts.brand.clear (an administrator, a person present, a recent proof) | Withdraw the adopted brand. A framed page pinned to its stylesheet keeps it while its version is retained. Clearing when nothing is adopted answers success and writes nothing. Carries an Idempotency-Key |
A framed version (html, design) pins the stylesheet adopted when it is published: its versions answer carries it as brand, and the artifact origin places <link rel="stylesheet" href="/_crewlet/brand/<sha256>.css"> at the top of every document of that version it serves, leaving the author’s bytes as they are. A page whose <html> element carries data-crewlet-brand="off" is served without it, and an html version whose entry page says so pins none. A deck copies the brand into its own files when it is created, and a doc and a dashboard follow the adopted brand live, drawn by the dashboard.
Refusals
Section titled “Refusals”| Status | error | When |
|---|---|---|
400 | bad_if_match | If-Match is not "<n>" |
400 | op_id_invalid | No Idempotency-Key, or one outside the operation-id grammar |
403 | unauthorized | The authority table refused; reason: role names the role needed |
403 | token_refused / step_up_required | A machine token on a verb needing a person present, or a proof of identity older than the verb’s window |
403 | forbidden | A share above the sharer’s own role, or the company from an agent |
404 | not_found | No such artifact for this caller, or no such version, asset or file |
404 | upload_not_found | No such upload of this caller’s |
409 | artifact_trashed | The artifact is in the trash |
409 | artifact_purging | A restore of an artifact whose purge has begun; the purge finishes on its own |
409 | carried_object_gone / upload_missing | A carried file’s bytes are gone, or a declared file has not arrived; paths names them |
409 | upload_consumed / upload_expired | The upload is used, or an uploaded object is too old to name; upload again |
409 | label_taken / source_taken | Another version holds the label, or another of the owner’s artifacts the source address; another label or address avoids it (the tools’ class is exists) |
409 | exists | A create of an artifact or asset already there, most often the same create resent after its operation was forgotten: read it instead |
409 | labels_full | Every label the artifact keeps is in use: remove one from a version that no longer needs it (the tools’ class is conflict) |
404 | folder_not_found | A folder a body names (parent, destination, the folder a create files into) that does not exist, was removed, or the caller cannot see; one answer for all three |
409 | folder_name_taken / folder_limit | A name its place already holds (the tools’ class is exists), or past the company’s or one folder’s bound (class conflict) |
409 | folder_widens | A move that would show a folder to more people, unconfirmed |
422 | folder_cycle / folder_depth / folder_ambiguous | A folder moved into or beneath itself, deeper than four, or a path naming several folders the caller sees (candidates): the argument to change (class invalid) |
409 | artifact_not_framed / artifact_origin_unset | See Viewing a version |
409 | conflict | A frame whose ready time was already reported; see Viewing a version |
410 | upload_expired | The upload’s window closed before it was finished |
412 | version_moved | The head moved past the base; see Publishing a version |
409 | quota_exceeded | The company’s quota; key names the Tier A setting an operator raises. A 409 because it is the state of what the company holds: no smaller request changes it (the tools’ class is quota_exceeded too) |
415 | media_type_refused | A file type an artifact may not publish |
422 | upload_mismatch / content_refused | Bytes that are not the declared ones, or not what their type promises |
422 | edit_refused / policy_refused | An edit that matched zero or several times (index, matches), or a page the publish policy refuses (findings) |
422 | policy_refused | An adoption of a brand that leaves out a field an adopted brand holds (findings, missing) |
422 | brand_contrast | An adoption whose text colour does not reach 4.5:1 on its light ground; contrast names the pair |
422 | capability_unknown / contract_unknown / credential_refused / invalid | A capability or runtime this build does not serve, a credential in what an agent published, or a value the domain refuses |
429 | uploads_outstanding | The pending-upload budget is spent; Retry-After is when the earliest hold lapses |
429 | throttled | Ready reports past one credential’s rate; Retry-After is when the next is admitted |
503 | unavailable | This node could not decide or reach the estate, or the log refused the write; Retry-After only where waiting clears it |
507 | store_full | The object store has no room for a file’s bytes, on a transfer or a publish storing a file of its own: the fleet’s NATS bucket holds as many bytes as it reserves, or an S3-compatible bucket’s provider refuses the write for room. path names it; nothing of it was stored. A refused publish gives back what it staged and its reservation; a transfer’s file may be sent again. No Retry-After: the same request is refused until an operator makes room, which the detail names |
Ask Crewlet
Section titled “Ask Crewlet”Ask Crewlet’s routes, all under /assistant/, are guarded and mounted on the authority table with two verbs: assistant.converse (starting, asking, stopping, clearing) and assistant.conversation.read (listing, reading, streaming, exporting). Both are human-only: a machine token, a service account and a request riding an assistant grant are refused before a handler runs, and a Tier A token’s session is answered 403 assistant_not_available with reason: not_a_person. Ask Crewlet acts as the person and nobody else: every tool call a turn makes is an ordinary request through this API’s own handler, carrying a read grant derived from the asking request, which ends with the turn, with the session, or after twenty minutes (the longest a turn may run), whichever is first.
Any route of this reference, as the person. Beside its dedicated tools, Ask Crewlet reaches every route this page documents that the person may use: it lists them, reads one route’s entry from this page (which the engine embeds), sends a GET or HEAD on its read grant, and proposes a POST, PUT, PATCH or DELETE, sent only on the person’s approval of a card the engine renders from the resource as the route serves it now. A call names a route by method and pattern, never a URL; each path value is one escaped segment. A proposal prepared against a resource whose ETag the route answers is sent under that tag as its If-Match, so a change made meanwhile is refused, not overwritten. Never through Ask Crewlet, whoever approves: the sign-in, session and token ceremonies, a credential or secret in clear (a secret’s value, an integration’s inputs, a frame’s view ticket), and the routes on this section’s own surface.
Somebody else’s conversation does not exist. Every read and write is keyed on the caller; another person’s conversation, turn or card is 404 not_found, as one that never existed. No route takes an owner.
Every POST takes application/json and names the protocol_version it was written against; a version this engine does not speak is 409 assistant_protocol_mismatch with the hint to reload the dashboard.
| Method | Path | Body | Answer |
|---|---|---|---|
GET | /assistant/conversations?cursor=&limit=&q= | 200 {conversations, next_cursor}, most recently used first, limit 1 to 50; next_cursor is null on the last page. q (at most 100 characters) keeps conversations whose title holds it, case aside. Each is {id, title, title_set_by, created_at, updated_at, last_activity_at, last_turn_state, open_turn_id}, every field always sent: title is null until the first question names it, title_set_by is model or person (null with no title), last_turn_state is null before the first turn, open_turn_id is the turn running or waiting on an approval, else null. Order is last_activity_at (last turn, message, step, card or proposal), shown as last used; updated_at also moves on a new title | |
PATCH | /assistant/conversations/{id} | {protocol_version, title} | 200 the conversation’s summary. Title: one line, 1 to 60 characters trimmed; the engine never overwrites a title a person set. An Idempotency-Key, when sent, makes a retry the same rename |
POST | /assistant/conversations | {protocol_version} | 201 {conversation}. An Idempotency-Key, when sent, names the conversation, so a retried create is one conversation |
GET | /assistant/conversations/{id} | 200 the transcript: {conversation, messages, steps, cards, open_turn, audit_reads}. A card built from an app the caller no longer holds is replaced by a notice, and so is a message written after its turn read through one (each message records the apps its turn read through); every step names its turn_id | |
DELETE | /assistant/conversations/{id} | 200 {outcome, position}: purged at once, a turn of it running here is stopped and every grant of its open turn ended | |
POST | /assistant/conversations/{id}/turns | {protocol_version, input: {text}, page_context, mode?, attachments?, browser?} | 202 {turn_id, stream_url, after_seq}. Idempotency-Key is required; the same key is the same turn. attachments names at most 4 files uploaded to this conversation, each once (400 invalid_body otherwise). mode is ask (default) or brief (see Briefs), which needs a page_context and takes no attachments (400 invalid_body otherwise). browser: {card_id, step, scope_id} works one outside step of a plan card in the desktop app’s browser under the scope the person’s click started there (ADR-0186): input.text is then empty and the engine words the question; a step that is not an outside step of that card, or is done, is 409 invalid_input |
GET | /assistant/conversations/{id}/stream?turn=<id> | 200 text/event-stream, or 204 when the segment has ended and nothing follows Last-Event-ID, below | |
POST | /assistant/turns/{id}/stop | {protocol_version} | 202 {state}: a running turn is stopped on whichever node runs it; a turn waiting on an approval is closed stopped and every proposal it waits on declined (under the request’s Idempotency-Key, when sent); a finished turn answers the state it ended in. state is what the turn truly reached: stopped, or what it came to first (completed, waiting_for_approval), or running while its runner has not yet recorded its end, which then arrives on the turn’s stream |
GET | /assistant/cards/{id}/export.csv | 200 the table card as CSV, from the snapshot the conversation stored, never a fresh read | |
GET | /assistant/cards/{id}/export.xlsx | 200 the same table as XLSX | |
GET | /assistant/cards/{id}/plan | 200 the latest revision of the card’s plan where it stands now, as the caller: a setup plan rebuilt from the setup (GET /setup/integrations/{kind} and its vendor pages), a goal plan’s steps with each change’s proposal, each setup step’s setup and each step the caller said done read again; and where the caller took it: stopped, skipped steps, each step’s last check. 404 for a card that is no plan of the caller’s | |
POST | /assistant/cards/{id}/plan/{move} | {protocol_version, step} | 200 the plan after the move. move is check (the step’s requirement checked as the caller through GET /setup/integrations/{kind}/requirements/{field}/check, or a step with nothing to check said done), skip (an optional step) or stop. Idempotency-Key is required. 409 invalid_input for a step the plan does not have, a needed step skipped, a step read from the setup or a change said done, or any move on a stopped plan; 429 step_check_budget with a Retry-After; a refusal of the setup surface is passed on as it answered |
POST | /assistant/conversations/{id}/files?name= | the image’s bytes | 201 {file: {file_id, name, media_type, size, download}}: one image the person attaches to a later question, the raw file as body (declared image/png, image/jpeg, image/webp, image/gif or application/octet-stream), its name in name. Idempotency-Key is required; the same key is the same file. The type is read from the bytes, never the name or declared type, and only PNG, JPEG, WebP and GIF are kept (415 assistant_file_refused otherwise, HTML called .png included); a body over 5 MiB is 413 body_too_large, refused by its declared length before it is read; a conversation keeps at most 40 attachments (409 assistant_file_limit). The file is sealed under the fleet keyring into the object store and goes with its conversation. An upload the store did not take, or refused because the company’s file storage is full, is answered as a project file’s is. Absent on a node with no object store |
GET | /assistant/conversations/{id}/files/{file} | 200 one file the conversation keeps, always as a download: Content-Type is the type its bytes were read as, Content-Disposition: attachment; filename="..." (RFC 5987 filename* for a non-ASCII name), X-Content-Type-Options: nosniff, Content-Security-Policy: sandbox and Cache-Control: private, no-store. Another person’s file, or another conversation’s, is 404 not_found |
input.text is at most 4000 characters. page_context is the open screen as the dashboard describes it (at most 16 KiB, 50 resources and 32 page actions), or null when the person removed the page chip. The model reads it fenced as somebody else’s words: a hint, never an authority.
Beside accepts, the page context carries action_args: what each accepted page action takes on that screen now, by action id, as a closed subset of JSON Schema (type, description, enum, const, minLength, maxLength, pattern, minItems, maxItems, items, properties, required, patternProperties, additionalProperties, oneOf, and top-level examples). A pattern is RE2 matched as written, so one anchored with ^ and $ holds the whole value. Every accepted action declares it (draft.set may go without, since the draft’s editable fields declare what it takes). The engine reads it strictly: an unknown keyword, a pattern RE2 cannot compile, a schema past 6 KiB, 8 levels or 160 parts, an object of more than 32 members (by name and by pattern), more than 64 values, 16 shapes or 4 examples, a pattern past 128 bytes, a description past 300 characters, or an example its own schema refuses is 400 invalid_body, and so
is the whole page context declaring it. Each size is the bytes of the engine’s own JSON encoding, which escapes <, > and & (six bytes each). So the dashboard holds every action’s arguments to these bounds before sending: draft.set past them is offered with no arguments, any other action past them is left out of accepts and said once to the browser’s console, and a page context over its 16 KiB drops draft.set’s arguments first. A screen whose list outgrows an enum declares a pattern instead: past 64 seats, the Budgets ceiling’s seat is a handle by its grammar. Before a propose_page_change call is previewed or recorded, its args are held to that schema; one that does not match is the model’s refused step, naming the members the screen takes, never a card. An action the screen declares no arguments for is never proposed.
selection is the one record the person has open, or null: {kind, id, noun?}, the row a screen has open beside its list, else the peeked row, else the record a record’s own screen is of (a task’s page is that task, a seat’s
that agent). noun is what the person calls it where its kind does not say: decision, update, task, project, agent, artifact, page, turn or run (an ask open in the Inbox is a decision on its task); any other value is
400 invalid_body. A brief is limited to the selection.
action_revisions gives each accepted action its own revision: the screen and its path, and only the parts of the page the action depends on (address, selection, data). A page action’s proposal is bound to its action’s revision, so a change goes stale only when what it depends on moved, never because the person opened a row’s peek or another editor. An action without one is bound to source_revision.
A screen with a draft or a form open adds draft: {kind, id?, revision?, step?, help?, fields, more}, where kind is client (the values live in the
page until saved) or server (saved, at id and revision), and each field is
{path, label, kind, value, hint?, editable?, redacted?, truncated?}, kind being text, list (items one per line) or file (the value is the file’s name). At most
40 fields, each value at most 1000 characters (a longer one is cut and marked truncated), and help at most 600; fields past the count or byte budget are counted in more. A field whose path names a credential (a password, secret, token or credential segment, or an API, private, signing or access key) must arrive redacted with an empty value, and is refused 400 otherwise; every other value passes the engine’s secret redaction before a model reads it. The page action draft.set ({"values": {"<path>": "<value>"}}) changes the editable fields through the screen’s own setters, in the order the screen lists its fields, after the person approves. The engine holds it to the turn’s draft before any card is drawn: a path the draft does not list as editable, or a value not of its field’s kind, is refused. A file field takes a file, never markup: the model names it by its file_id alone (an image the person attached in this conversation), and the engine writes the whole reference into the proposal, {"kind": "file", "file_id", "conversation_id", "name", "media_type"}. A file of another conversation or person is refused before any card. The screen fetches it through
GET /assistant/conversations/{conversation}/files/{file} once approved and keeps it through its own save.
Before anything is spent. A question is refused, recording nothing, when:
- the company’s token budget, or the person’s own
assistant.token_budget, has no room in a window:429 budget_exhaustedwith thescopespent (orgorperson), the window, itsresets_at, aRetry-Afteruntil it resets, and theremedynaming the ceiling:{"setting": "company_token_budget"}or{"setting": "assistant_token_budget"}; see ADR-0060; - the person already has two turns running on the node, or has asked twenty in a minute across the fleet:
429 assistant_busywith aRetry-After(while the fleet’s counter cannot be read, the node’s own rate of twenty a minute, five at once, holds); - the conversation already has a turn running:
409 assistant_turn_running; - no model in the chain can be resolved:
503 assistant_unavailable; - every model in it is known unusable now, the state
/viewerreports asmodel_not_ready:503 assistant_model_not_ready, withreason(the turn error code),detailandhintin a failed turn’s words, andretry_atwith aRetry-Afteronly for a spent plan whose reset is known (a signed-out model needs a sign-in, not a wait).
A question asked while the conversation’s turn waits on an approval is taken: that turn ends as superseded, and its proposals stay approvable until they expire. One approved later is applied and its card updated on that turn’s stream, without the superseded turn’s answer resuming.
Briefs
Section titled “Briefs”A turn asked with "mode": "brief" answers with one brief card rather than prose: a brief of the page, or of the page context’s selection where it names one. It is a turn like any other (admitted, metered, recorded and streamed the same way), with these differences:
- It only reads: the model is offered
read_api,describe_apiand its answer tool, no write, page action or link. Its reads draw no card and its prose is never drawn; its steps are shown as any turn’s. - The card is
{"type": "brief", "brief": {scope, summary, needs, recommended?, follow_ups, as_of}}.scopeis{screen, title, record?},recordthe selection the brief was limited to.needsholds at most three rows,{ref: {kind, id}, text, detail?, tone, action?}, and[]is “Nothing needs you”.toneiswarning,neutralordanger. Anactionis{kind, label, link?, question?}:opencarries alinkthe engine built from its link table (hrefa dashboard address),askaquestionto ask in the same conversation.follow_upsholds at most three questions. Lines are plain text: a summary at most 200 characters, a row’s text and detail at most 120 each. - A row’s
refis atask,project,seat,pageorartifactthat this turn’s own reads returned and whose own read, sent again as the person, answers it; any other row is left out.dangeris drawn only where that read says a seat is stopped or its last turn failed, or a task is urgent; the model’s other dangers are drawnwarning. - A brief the model could not write within one retry ends the turn with the error code
brief_invalid; so does one that read more than its own token cap (with a sentence saying so). Neither draws a card.
The turn’s stream
Section titled “The turn’s stream”A server-sent event stream read over fetch. Every frame is one event: id is <turn_id>.<seq>, event is the frame’s kind (conversation, page_context, status, delta, step, card, action, done, error, snapshot), and data is the frame as one JSON line with its payload nested under a member named for its kind. seq counts from 1 and only grows within a turn, across the segments an approval resumes. A : keepalive comment is written every fifteen seconds.
Send Last-Event-ID to resume: every frame after it is replayed. A client 512 frames behind is disconnected rather than dropped from, and resumes the same way. A resume after the last frame of an ended segment (a turn waiting on an approval, reopened at the transcript’s open_turn.after_seq) answers 204 No Content: the client holds the whole segment, its done included, and does not dial again until a decision hands it the next segment’s stream_url. Frames the running node no longer keeps (it keeps them two minutes after a segment ends) are answered with a snapshot of the turn as its transcript holds it, then how it ended. A snapshot is one frame of at most 4 MiB, like every frame: a turn whose records pass that leaves out its oldest steps first, then its oldest cards that propose no change, then its oldest answers, then its proposals, never the question, and says so with "cut": true; the conversation’s transcript still holds everything.
A person holds at most four streams open on a node, and opens at most sixty a minute (ten at once) on a node and across the fleet; past either a stream is refused 429 assistant_busy with a Retry-After, before anything is read.
Any node answers the stream. A stream reaching a node not running its turn follows it there: missed frames are asked of the running node, the rest heard as it tells the fleet, numbered as it numbered them, so a reconnect on another node resumes exactly where it left off. Numbering continues across nodes: a turn an approval resumes, or whose page action it emits, on a node that never ran it is numbered after every frame any node told of it, so after_seq and Last-Event-ID stay meaningful wherever the next request lands. Frames cross the broker encrypted under the fleet keyring, bound to their turn, and a node shows only a frame the fleet sealed. A turn whose runner is gone (node restarted or left the fleet) is closed interrupted once, by whichever node notices first, and answered with error {code: turn_interrupted}; a runner only slow to answer leaves the turn open, and the stream answers the snapshot it can.
A delta appends prose to one assistant message while the model writes it, a settled line at a time, so a credential is never on screen before the end that would redact it arrives. A delta with restart: true replaces everything the message drew with its own text; it is sent when the chain fails over to another model, or when the engine withdraws a view of a round the finished round does not bear out, so the message always ends as exactly the answer recorded. A model whose harness cannot stream draws each round once, whole, when the round ends.
Each round that writes prose is its own assistant message, in order, and a card names the message it follows: the round that asked for it, or the last one that wrote prose before it. So a round’s prose sits above the cards its calls showed and the final round’s below them, and a reload’s transcript matches the stream. A card shown before any prose hangs on an empty message opened for it (a delta with no text).
A turn never streams a raw tool argument, a raw answer, a prompt, a token count or a grant: a step carries a label the engine renders and the route pattern it asked, and a card is built by the engine from the route’s own answer.
A record a proposal card names (in a change’s from, to and items, its summary, note and audience, and its receipt’s summary) is never its name inside the words: each of those values is a phrase, a list of runs, each run {text} or {ref: {kind, id, name, artifact_kind?, open?}}. kind is the record’s kind (seat, task, artifact, room, …), name is how it is shown (a seat’s name on the chart, never its handle), artifact_kind is an artifact’s kind, and open is the record’s page, built from the engine’s route table. A reader that draws no records reads each run’s text or name in order.
A step or a card a request was refused on carries the refusal as a person reads it, {code, message, hint?, reason?, grants?}. message is the engine’s sentence for that kind of refusal, never a detail the route wrote for a model, which names tools and fields and goes to the model alone: where the authority table refused, the sentence the envelope says for the rule its reason names; where the route answered in a person’s words (its detail, ADR-0060), those words; otherwise one chosen by the code, and by the status for a code with none of its own. A 409 is a race only where its code is one (stale_version, version_moved, revision_advanced, proposal_stale, stale); the state of what a write is about, such as artifact_trashed or quota_exceeded, says what it is. hint is the engine’s own next step where it has one. reason and grants (the rule that refused, and the permissions any one of which would have admitted you) are there where the authority table refused; the grants alone never say whether access is the way past: a step_up_required refusal names the grants that admitted you.
| Status | Code | Meaning |
|---|---|---|
400 | invalid_body / invalid_query / op_id_invalid | A body, query or Idempotency-Key refused as written, naming what to change |
403 | assistant_not_available | Ask Crewlet is not available to the caller; reason is the viewer’s |
404 | not_found | No such conversation, turn or card, or another person’s |
409 | assistant_protocol_mismatch | The request speaks another protocol version; reload the dashboard |
415 | unsupported_media_type | A body not declared Content-Type: application/json |
409 | assistant_turn_running | The conversation’s turn is still running |
409 | assistant_file_limit | The conversation already keeps 40 attachments; limit names the bound |
413 | body_too_large | An upload past 5 MiB |
415 | assistant_file_refused | An upload whose bytes are not a PNG, JPEG, WebP or GIF image, or declared as something no image is |
429 | assistant_busy / budget_exhausted | Too many turns at once, or a window of the company’s or the person’s budget is spent (scope); Retry-After says when |
500 | internal_error | A fault of this node, which trying again doesn’t clear; the reason is in its log |
503 | unavailable | A node condition (a copy behind its log, a log at its byte ceiling, a store or broker that did not answer), told in detail for the person, with a Retry-After exactly where waiting clears it. With "outcome": "unknown" and the op_id, a write whose outcome nobody can establish: send it again with the same Idempotency-Key |
503 | assistant_unavailable | Ask Crewlet can’t run here for its own reason: no buildable model chain, the node shutting down, or a turn whose runner it can’t reach. No Retry-After |
503 | assistant_model_not_ready | Every model in the chain is known unusable now; reason is the turn error code, with detail and hint, and a Retry-After only for a spent plan whose reset is known |
How a turn fails on the model
Section titled “How a turn fails on the model”When the model chain fails a round, the turn ends failed with an error frame whose code says which failure it was, read from the harness’s own classification, never its prose. Each carries a message a person reads and a hint: an administrator (the caller holds admin) is told where to fix it, anybody else whom to ask. retryable is true only where asking again can help without anybody acting.
code | When | retryable |
|---|---|---|
model_signed_out | The harness’s login expired or is missing, or its token is invalid. An administrator is told to run crewlet llm login <key>, anybody else to ask one | No |
model_busy | The plan is spent or rate limited; retry_after_seconds is the wait until the harness’s named reset | Yes, after the reset |
model_timeout | The harness ran out of its own time (providers.llm.<key>.timeout_seconds) before it answered | Yes |
model_unavailable | The harness could not be started on the node, or failed for a reason none of the codes above names (retry_after_seconds: 10) | Only for the second |
The first three, and a harness that cannot start, are known before a question when every model in the chain is in that state: /viewer reports it as model_not_ready, and a question asked anyway is refused 503 assistant_model_not_ready before any round.
Every segment of a turn leaves an assistant_turn_completed row in the runtime audit, naming every step’s tool and route, never its arguments or answers.
Chatlet
Section titled “Chatlet”Every GET under /chatlet/ reads the company’s own chat (the default where it declares no vendor chat surface, chat.backend: chatlet) through this node’s estate router, as the tracker and the knowledge base are read, and refuses a copy that has not caught up as they do. A company on Slack or Mattermost, or with chat.backend: none, has no chat question and asking gets unknown_query / 404; /viewer says which chat it runs, so a screen asks there first.
A room is read as the seat the caller acts as, and the caller never names one. Other personal questions here take a handle and fall back to the caller’s own record; chat has no such arm, because a transcript is the most sensitive thing a deployment holds. The viewer is the seat the request’s principal acts as, the same seat a chat write of theirs is authored by, so whoever may post in a room is exactly whoever is shown it; a handle= on these requests is ignored. Two refusals follow, both in the one envelope:
| Who is asking | Answer |
|---|---|
A principal without chatlet | 403 unauthorized, grants: ["chatlet"] |
| A credential acting as itself — a Tier A token, a service account bound to no seat — whatever it holds | 403 unauthorized, reason: unseated, grants: []. No permission seats a credential; bind it in the identity directory (crewlet iam bind) |
A room the caller may not read is not found. A private room’s existence is itself information, so chat_channel, chat_messages and chat_thread answer a room the caller is not in as a room that does not exist, and a search narrowed to one answers nothing. A public room and a unit’s room are readable by every seat, joined or not; a private room and a direct conversation are their members’, and chat_room_names names a private room only to a member.
The badges are the one thing not on the log. Where each person has read to, which rooms they muted and their do-not-disturb window are one reader’s attention, kept in the coordination store rather than replayed on every data node. They reach the rail as the caller’s own read state; a store that could not be read leaves them unknown (read_state: false, every badge zero) rather than counted from zero, which would tell everybody they are a hundred behind in every room. The write half is the mark_chat_read tool.
The live half rides /ws/stream. A committed message, edit, reaction or room change is pushed to each socket whose seat may read the room (decided per recipient, never by broadcast), a person’s read state to their own sockets on every node, and a room’s presence to the sockets looking at it (the push kinds). A socket’s chat seat is fixed for its life: a person moved to another seat, or whose chatlet is taken away, has their sockets closed to reconnect as who they are now. A node whose copy of the estate is out of service still pushes, from a sound peer’s batches, and a gap in what it hears is a chat_room_changed naming no room, which asks every screen to read its rooms again.
The reads are here and the writes are tools. Posting, editing, a room’s membership, opening a conversation and marking what you read are the operator catalogue’s tools, through /operator/act for the dashboard and /operator/mcp for an assistant. The three gestures that destroy or set a room’s horizon are administrator routes on the write surface.
A message gesture is refused where it is applied, too. A post, an edit, a delete and a reaction are decided again by every data node at the record’s place in the log (ADR-0046), against what landed just ahead of it: a room archived, an author taken out of a private room or a direct conversation, a message taken back or erased, a message already carrying 32 distinct emoji. Where the answering node has applied the record, the gesture is refused as if that change had reached it first: conflict for the archive and the emoji, each the state of the room or the message (which class a refusal is), forbidden for the membership, not_found for a message gone or taken back. A retry under the same Idempotency-Key is refused the same way rather than reported as said. An answer of pending names a record this node has not applied yet, which may still be refused there.
Gitlet: /git and /gitlet
Section titled “Gitlet: /git and /gitlet”A company that sets code.backend: gitlet hosts its git repositories in the engine. A person reaches them with git’s own smart HTTP under /git/, and downloads a file or a commit’s files as a ZIP beside it (below), on any node whose node.roles name gitlet (by default a node has every role). Anybody the guard resolves who holds the Gitlet permission (gitlet) reads the rows under /gitlet/ on every node, each answer holding to the repositories they may read, except who read a visibility: unit repository and a verify, which are an admin’s (below). A caller without the permission is refused 403 unauthorized, naming gitlet, on every other route of both prefixes and every code_* question before any repository is read (ADR-0110). Both prefixes are guarded, reads included, and neither is ever on the public listener: a person’s own credential (for git, a machine token acting as them) reaches them, and that socket serves only outside parties, who hold none. On /git/, and no other route, the token may arrive as the password of a Basic credential, the only way a git client sends one (the auth note under Routes); /git/ also takes the dashboard’s session cookie, as every guarded route does. Who may push is the person the credential resolves to: see Persons and their tokens.
Every surface is asked of the engine on each request. Gitlet is built with the node’s native runtime, at boot or at the first apply whose company sets code.backend: gitlet (on a node that booted with no company, after the API started), so the routes serve the moment it exists, with no restart.
git’s smart HTTP
Section titled “git’s smart HTTP”| Method | Path | What it is |
|---|---|---|
GET HEAD | /git/{repo}/info/refs?service=git-upload-pack | A clone’s or fetch’s advertisement. {repo} is the repository’s name, with or without .git |
GET HEAD | /git/{repo}/info/refs?service=git-receive-pack | A push’s advertisement |
POST | /git/{repo}/git-upload-pack | A fetch’s request: protocol v2’s ls-refs and fetch, or v0’s negotiation |
POST | /git/{repo}/git-receive-pack | A push |
These speak git’s protocol, not JSON; a refusal is one text/plain line, listed
with what to do in What git prints, and what it means.
What a route answers before git is reached:
- A node without the
gitletrole mounts none of them:404 no_route. - A company without
code.backend: gitlet(or no company yet):404,this company does not host code (code.backend is not gitlet). - A company that sets it, on a node that serves none of it now (or has not
yet read whether it does):
503, the line ending with its code in brackets. It is judged from the configuration the fleet activated, never from what this node last applied, so a company that just turned Gitlet on is never told it hosts no code, and a node that has not read the configuration never states what it says. Four cases:- applying the activated configuration (
applying; Gitlet still being built): answers once the apply ends;Retry-After: 5; - its apply of a configuration that hosts code failed
(
config_apply_failed: Gitlet could not be built, or the node refused a revision;GET /fleetand its log say why): noRetry-After, since waiting clears nothing and another node serves it; - its apply failed before it could read the configuration (revision not
fetched, opened with the node’s key or parsed), so it cannot say whether the
company hosts code (
code_unknown): noRetry-After; the line names what it could not read; - its native runtime was already running when Gitlet was turned on and serves
it once restarted (
native_backend_needs_restart): noRetry-After.
- applying the activated configuration (
- No credential, or a refused one:
401withWWW-Authenticate: Basic realm="crewlet", charset="UTF-8", which makes git ask its credential helper. - A caller without the Gitlet permission:
403, before any repository is read, with the lineYou don't have the access this needs (Gitlet). Ask an admin for it (unauthorized), which git prints afterremote:: a person not given Gitlet, or a token whose grants lackgitlet(a Tier A entry without it ingrants:, or a machine token minted without it). - Every holder of it reaches git (
code.git): what a fetch or push may do is the caller’s grant on the repository, decided once it is read. A push from a caller who may push nothing is refused at its advertisement; every command it carries is judged by the grant. - A renamed repository’s old name, while it still redirects (a month after
the rename; see Repositories made by
tools): a fetch’s
advertisement (
GET/HEADofinfo/refs?service=git-upload-pack) is302 FoundwithLocation:the same path and query under the new name (/git/<new>.git/info/refs?service=…), and a fetch’sPOSTis served as the repository’s. Git moves to the new name only when the redirect answered its first request, so a client whose credential helper answered a challenge first reads the advertisement under the new name and sends its fetch to the old one. A push is refused at both steps,404"<old>" was renamed to "<new>" on <instant>; set your remote to /git/<new>.git at the same address (the old name serves clones and fetches until <instant>), and is recorded nowhere, like a name no repository holds. - A draining node finishes a fetch already begun and refuses a new fetch and
every request of a push:
503,Retry-After: 30(During a drain).
A file’s bytes and a commit’s ZIP
Section titled “A file’s bytes and a commit’s ZIP”| Method | Path | What it is |
|---|---|---|
GET | /git/{repo}/-/raw?rev=<commit>&path=<path>[&download=1] | One file’s bytes exactly, as git cat-file blob writes them |
GET | /git/{repo}/-/archive.zip?rev=<commit> | Every file of the commit as a ZIP, as git archive --worktree-attributes --format=zip --prefix=<repo>-<short>/ <commit> writes it in a bare clone with no global, system or info/attributes file |
{repo} is the name, with or without .git. Decided as a fetch is: the Gitlet
permission (code.git), then the caller’s grant on the repository. The
credential may be the session cookie, a bearer token, or a token as the Basic
password; a download is never challenged.
Parameters, each at most once, no other key (400 naming the key and the
route’s set):
rev: a commit’s whole id (40 lowercase hex digits) or a tag of one. No abbreviation, ref, tree or blob.path(raw only): the file’s path, percent-encoded (+as%2B, a non-UTF-8 byte encoded byte by byte), clean and relative, at most 4 KiB.download(raw only):1sends any file as an attachment.
Answers. Every refusal is one text/plain line, a path in it quoted.
| Status | When |
|---|---|
200 | The bytes, with the headers below |
304 | Raw: If-None-Match names the file’s ETag (or *). Answered without reading the file, though the lookup still runs; a visibility: unit repository records it as a read of 0 bytes |
400 | An unreadable query, an unknown or repeated key, a rev that is no whole commit id, a bad path, download other than 1; a ZIP of a commit past 1 000 000 entries, 4 GiB of files or 64 MiB of entry names, or holding a path whose ZIP name passes 65 535 bytes, each naming the bound and git clone --depth 1 |
401 | No credential, or a refused one; no WWW-Authenticate |
403 | No Gitlet permission, or a grant that reads nothing |
404 | No such repository, a deleted one, no such commit after one sync at the log’s head, no file at the path, a directory, or a submodule. A node without the role answers the router’s 404 no_route |
405 | HEAD, with Allow: GET, before any repository is read |
429 | A ZIP asked by a principal already making one on this node; Retry-After: 10 |
503 | A draining or stopping node, the code log or object store unavailable, every transfer slot busy, a lookup or measure ended by its deadline, a damaged copy no repair ended, or every archive place busy for 10 s; each with its Retry-After |
Headers of a 200. Never a type read from a file’s name
(ADR-0153):
| Header | Raw file | ZIP |
|---|---|---|
Content-Type | text/plain; charset=utf-8 for a text file (no NUL in its first 8 000 bytes) not asked to download, else application/octet-stream | application/zip |
Content-Disposition | inline for the text answer, else attachment, with the file’s name | attachment; filename=<repo>-<short>.zip |
Content-Length | the file’s size | none (chunked) |
ETag | "<blob id>" | none |
Cache-Control | private, no-store | the same |
Content-Security-Policy | default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; sandbox | the same |
X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Cross-Origin-Resource-Policy | nosniff, DENY, no-referrer, same-origin | the same |
<short> is the commit’s first seven digits. A ZIP holds a folder
<repo>-<short>/ with every directory, every file and symbolic link as its
blob’s bytes (a link as a link), every submodule as an empty folder, each dated
by the commit, and the commit’s id as its comment. No .gitattributes rule is
applied: export-ignore, export-subst, ident and line-ending conversion are
not. A large ZIP waits for one of the node’s archive places; one whose output is
at most 64 MiB takes none (what a download
costs). A download that
fails after its first byte is cut, never ended cleanly.
curl -fsS -H "Authorization: Bearer $CREWLET_TOKEN" -o web.zip \ "https://crewlet.example.com/git/web/-/archive.zip?rev=<commit>"The code reads
Section titled “The code reads”Gitlet’s rows are three questions of the query registry, code_repos,
code_repo and code_pushes, answered on the routes below and, like every
question, by GET /query/{what} and the socket’s query channel
(Queries), by one implementation whichever way they are asked. Who
read a unit’s repository is a fourth, an admin’s (below),
and code_counts, the section counts, a fifth. Every caller holding the Gitlet
permission reaches these (code.read); anybody else is refused 403 unauthorized with "grants": ["gitlet"] before anything is read. What each
answers a holder is the caller’s grant on each repository, decided once it is
read (Who may read and push): a
repository the caller may not read is left out of a listing and answered 403 not_permitted alone. The same permission gates every other code question below
(a change’s, a repository’s content, a search, a commit’s checks), on REST and
the socket alike.
| Route | What it answers |
|---|---|
GET /gitlet/repos | The repositories the caller may read, by name, a page at a time. ?status=: a comma list of importing, active, archived, deleted and purging (unset is importing,active,archived: the repositories in use, one being filled from another host among them). ?protected=true: only repositories at least one protection rule protects, read by an index of those alone so a page costs what it costs however many unprotected repositories exist (Settings › Gitlet lists them so); unset or false is every repository, anything else 400 bad_params. ?prefix=: only names beginning with it (api lists api, api-gateway and apiary, not apps), read as one range of the index by name so cost is independent of repositories sorting before; the Gitlet workspace’s repository pickers ask with what was typed. A prefix no name could begin with (a capital letter, a second dot) is 400 bad_params, and so is a cursor that is not a name the prefix begins. ?limit=: 1–500, unset or 0 is 100. ?cursor=: the next of the page before. Each repository carries its id, name, status, managed_by (config, declared in code.repos, or tools, made by a tool), kind (project, or scratch: a seat’s own, named <handle>.<slug>), owner, visibility, search (indexed or grep: how code search reads it), mirrored (true for a pull mirror, which takes no push and no change of its own; absent otherwise), default branch, protection rules as a push is held to them (pattern, allow_force, allow_delete, direct_push; a rule’s merge gate is the detail’s), last_activity_at (last push, rename, settings change or restore: the clock a scratch repository expires by), ref and pack counts and bytes, the default branch’s head, how many pushes it has ever had, and access, what the caller may do to it (maintain for a person, read for a credential bound to nobody). ?kind= lists one kind, project or scratch, read as one range of an index of that kind. ?sort=: name (or unset) by name, or pushed by last push, newest first (pushes at one instant by name, highest first), then the never-pushed by name; only repositories in use are listed by last push, so a status naming deleted or purging beside it is 400 bad_params, and a page by last push answers a cursor of its own. Neither kind nor sort=pushed is taken beside ?prefix= or ?protected=true (400 bad_params), and an unknown value of either is refused the same way. ?repo_facts=true answers each repository’s change_counts (live, draft, open, closed, merged) and its card: push_mirrored (true for a push mirror), last_push (its newest push that was no expiry: push_id, at, actor, actor_kind, actor_seat, via and outcome, its commands counted by what became of each as omitted counts them; absent once the history no longer holds it, or past about a hundred expiries after it) and tip_checks (where the default branch’s head’s checks stand for that branch, a check rollup; absent for an empty repository or a head no attempt is kept of). On a first page narrowed by nothing but kind and status, it also answers repos_total: repos, every repository the listing holds across its pages, and live_bytes, their live size, absent where the company holds more than 10 000 repositories of the listing’s kinds and statuses, whatever the caller may read. Unset or false leaves them out; anything else is 400 bad_params. ?day_bounds= beside repo_facts=true answers each repository’s spark, its pushes on each day between two bounds, oldest first, zeros included (Counting pushes). The bounds are 2 to 32 RFC 3339 instants, comma-separated, ascending, each on a UTC quarter-hour (every zone’s midnight in use is one), at most 32 days from first to last and 15 on a listing, none older than the push history keeps whole (181 days, less two hours for the clocks it is kept by); each refusal is 400 bad_params with its sentence, and so is day_bounds without repo_facts. A listing that asks them reads at most 100 repositories a page (limit past it is refused), since each row’s days are folded from its counts by quarter-hour. A data node of a build that does not count pushes refuses day_bounds unread and another node answers; an answer without spark, pushers or push_days to a question that asked for them was not answered. A page counts the repositories it scanned, so it may hold fewer than its limit, even none, and still carry a next: page until no next comes back |
GET /gitlet/repos/{name} | One repository in detail: the listing’s fields, its branch, tag and ref-tombstone counts, when it was created, the position of the record that last moved it (version), the code.limits of the node that served the read with its code.merge_by_floor beside them (limits.merge_by_floor). Two parts are answered only when asked for, each true or false (unset is false; other spellings 400 bad_params), because at their bound they are a quarter and half a mebibyte of JSON: ?path_owners=true adds path_owners, each an owner (kind unit with its key, or seat with its handle) and the paths it owns, by kind then reference, each one’s globs sorted, absent for a repository that names none (Path owners); ?gates=true adds gates, each a branch rule’s pattern and its merge gate, every field resolved, in pattern order, absent where no rule carries one (Merge gates), with rule_sources, who last changed each rule and when, every rule’s in pattern order: its pattern, set_by (a seat’s handle, a person’s seat or a credential’s login; absent for a declared rule), set_by_kind (agent, operator or config) and set_at (Protection rules). A renamed repository’s OLD name, while it still redirects, answers the repository under its current name with redirect, that name, and redirect_until, when the old name is released. A third part, ?repo_facts=true, answers change_counts (live, draft, open, closed, merged) and card as the listing’s, and with ?day_bounds= (as the listing takes them) spark and pushers: from and until, the whole UTC days that begin within the bounds; top, at most 100 pushers most first, each a kind (agent, person or gitlet), its handle (none for Gitlet) and its pushes; and omitted and omitted_pushes, the rest. Beside repo, clone_url is the address a person’s git clones it from: the deployment’s api.external_url and /git/{name}.git under its current name, absent where the deployment names none |
GET /gitlet/repos/{name}/pushes | Its push history, newest first in the order the pushes landed on the code log (never by the instant each record carries, which steps back when the log’s leader changes). ?limit=: 1–200, unset or 0 is 50. ?cursor=. ?brief=true reads it in brief, as a screen draws it: each push’s introduced commits counted (introduced_count) and not listed, and a push of more than five commands cut to five (its refused ones first, each with its reason, then the first it sent), the commands left out counted by what became of each in omitted (created, moved, forced, deleted, unchanged and refused, each absent at zero; omitted itself absent where nothing is left out), so an import’s push of a thousand tags is five lines and a count rather than about 140 kilobytes. A page in brief holds no more pushes; it sends less. ?push=<id> narrows the history to that one push, read whole, and is 400 bad_params beside limit, cursor or brief; a push the history does not hold (another repository’s, or past the 181 days it keeps) is an answer with no row. ?pusher_kind= (agent, person or gitlet) and ?pusher= (a seat’s handle, or the human seat a person holds; none for gitlet) narrow it to one pusher’s pushes as Gitlet § Counting pushes counts them; ?since= and ?until= (RFC 3339, to the microsecond) to those whose record landed in [since, until) (Gitlet § Narrowing a push history). A narrowed page reads at most 5 000 pushes and 4 MiB of their rows and limit is then the pushes it keeps, so it can hold fewer or none beside a next, and it answers push_scan, whose to, beside a next, is the instant of the push it ended at. Each is 400 bad_params with its sentence (an unknown kind, a pusher without its kind, a handle not shaped as a seat’s or beside gitlet, an instant before 1970 or finer than a microsecond, an until not after since, beside push), as day_bounds is beside a pusher or outside the window. Each push names its id and who pushed it: a person’s push (actor_kind operator) the credential it came through (actor: pat:<credential id> for a machine token, token:<id> for a Tier A token, session:<lineage> for a signed-in session, as every record a write leaves names it) and the human seat its principal holds (actor_seat: a person’s own, or the seat the identity directory binds a token to); a seat’s push (actor_kind agent) the seat’s handle as both actor and actor_seat, and the run behind it (run: turn_id the turn that made it, work_backend and work_key the work item that turn was charged to and the key its tracker shows, model the model it ran on, and for a push the seat’s coding box made, run_id the launch that pushed (the launch_id its executor_launched event carries) and harness the harness the box ran, such as claude-code; each stamped by the engine from the call or run that made the push, never read from a commit, each at most 256 bytes, a longer value cut to its opening beside its length and a digest of the whole; absent from a person’s push); the ref lifecycle’s push (actor_kind system) no actor, actor_seat or run: the engine on its own account, each command a deletion whose old is the commit to restore the branch at. via names how the pack was built: git, sent by a client’s git (a person’s, or a seat’s coding box’s); engine, built by the engine for a code tool’s write (Gitlet § Engine-built commits); merge, the move of a branch a change’s merge record made, its actor who merged it (Gitlet § A merge, end to end); expiry, the ref lifecycle’s deletion of seats’ idle branches (Gitlet § The ref lifecycle); queue, a merge queue’s landing; import and mirror, an import’s and a pull mirror’s sync. A push also names the node that received it, every ref it moved or was refused with the reason, its pack, and the position its record landed at; and change, the change its own record merged on a branch it set (repo, ref, title, state), a merge’s or merge queue landing’s before any a push merged beside it, else the lowest-numbered, with changes_more counting the others. A push every ref of which a rule refused (an attempt: a protection, the grant, the default branch, a moved tag or a reserved ref) is a row too, with no pack and nothing introduced, and offered, how many commits it offered that the repository lacked, where they were counted; a row recorded before the engine kept it carries none. A ref the engine refused for being longer than 255 bytes or not UTF-8 is named in a bounded form: as much as fits in 255 bytes, then its length and a digest of the whole. ?day_bounds= (as the listing takes them) answers push_days, the repository’s pushes on each day between two bounds, oldest first, zeros included, whatever the page holds; it is refused beside push |
GET /gitlet/counts | A scope’s counts, the parts ?parts= names (comma-separated, at least one: changes, repos or queue). changes is {live, draft, open, closed, merged}, live the draft and open together. repos is {project, scratch}, each {live, importing, active, archived, deleted, purging}, live the first three together, every repository the caller may read whatever any filter says, so repos beside ?repo= is 400 bad_params. queue is {live, more}, the live entries of the scope’s merge queues, counted when read, at most 10 000, more where it stopped there. The scope is ?repo=, one repository whatever its state, or, where it names none, every repository in use the caller may read; a count is never narrowed by a listing’s filters. changes and repos are read from counts the applier keeps, every part at the caller’s freshness, so session after a write includes it. A data node of a build that does not count a part refuses it unread and another node answers. Refused 404 not_found (not_declared) for a repo nothing declares, 400 bad_params for no part, an unknown part, a cursor or a nonzero limit, and 403 not_permitted for a repository the caller may not read, which a person never meets (Counting changes) |
Every answer carries the position and level it was read at. They read at the
REST read path’s level (stale by default) through the same freshness keys as
every other question: read_level (linearizable, stale,
consistent_prefix, or session beside a min_position on the code log),
max_lag_seconds, max_lag_seq and min_position
(Read Consistency).
session reads a write back: a write that lands on the code log answers
with the position its record landed at, and a read naming that position as its
min_position at read_level=session is answered only once the serving node
holds it, else 503 unavailable (behind) within the read’s budget, never
served from before the write. This is how a screen draws the list it just
changed (the dashboard’s SESSION_QUERIES lists them, a change’s
questions, a repository’s
content and the section counts, under the code log). A
bare session, naming no position, is 400 bad_params: it would wait for
nothing. A min_position on another log is 400 bad_params too. A client that
must not conclude a repository is undeclared from an old copy (a script about to
create one) asks read_level=linearizable: at stale, a repository declared a
moment ago may not have reached this node’s copy and is answered 404.
A refusal is the read surface’s:
404 not_foundfor a repository that is not declared, with"reason": "not_declared", and for a company that hosts no code, with"reason": "not_hosted"— told apart by thereason, since they are remedied differently: a repository is declared incode.repos, and declaring one changes nothing until the company setscode.backend: gitlet;403 not_permittedfor a repository the caller’s grant does not cover, thedetailnaming who asked, the repository and why; for a seat avisibility: unitrepository shuts out, that visibility and who among the seats does read it (Visibility). A person holding the Gitlet permission reads every repository, so is never answered it;403 unauthorized,"reason": "no_grant"and"grants": ["gitlet"], for a caller without the Gitlet permission, before any repository is read;- the guard’s own answers for a caller it could not resolve, given before any
question is asked:
401 invalid_tokenfor no credential the node accepts, and503 identity_unavailablewithRetry-After: 2where this node could not tell who it is (it cannot read its identity estate); 400 bad_paramsnaming the parameter or level refused;503 unavailablewithRetry-Afterfor what clears by waiting: this node behind the code log or asessionread’s floor, no quorum, no data node serving the read;500 query_failedfor anything else.
A company that hosts code on a node that serves none of it now (or that has not
read whether it does) is answered 503 under the code the git routes name
above, as the envelope’s error, with its message and a detail saying what
this node found: applying (Retry-After: 5), config_apply_failed,
code_unknown (the detail naming what it could not read) or
native_backend_needs_restart, the last three with no Retry-After, since
waiting clears none of them and another node serves the read. Over the socket
the same answer is an unavailable frame whose refusal is that code, with the
same detail and retry_after. Every one of them is served through a drain.
A change’s questions
Section titled “A change’s questions”A change is read through four more
questions, decided per repository as the rows above are, read at the same freshness keys and refused in the same vocabulary. A change of a repository the caller may not read is left out of a listing, and answered 403 not_permitted alone.
| Route | Question | What it answers |
|---|---|---|
GET /gitlet/changes | code_changes | Changes, newest first, a page at a time (?limit= 1–200, unset or 0 is 50, and ?cursor=). It names at least one of: ?repo= (a repository by name); ?state= (draft, open, closed or merged); ?work= (a work item, <backend>:<id>); ?reviewer= (changes asking a seat’s review, or a person’s by the human seat they hold); ?needs= (review, fix, me or person: what its changes wait on; me is the changes asking the caller’s review, then the caller’s own awaiting a fix, a page filling across both, each row naming its half in waits_for, review or fix); ?readiness= (ready, approval, checks or blockers: where the merge stands); ?window= (24h, 7d or 30d: changes that moved within that time, newest move first where nothing else leads; a live ?state=, draft or open, leads instead, newest opening first, the window tested on each change); or ?text= (words in the title or description, see the ?text= paragraph below). ?owner= narrows further. ?sort=updated lists a live ?state= (draft or open) newest last move first, by updated_at; a window nothing else leads is already so. ?sort=opened is newest opened first, refused on such a window. sort=updated beside ?reviewer= or ?needs=, or with no live state and no such window, is 400 bad_params. ?readiness= lists the open changes whose merge stands in that bucket (Changes by where their merge stands), beside any other filter, sort or window; with a ?state= other than open it is 400 bad_params; every page it narrows carries narrowed_to, the bucket, so a page without it came from a node that does not read ?readiness=. A live state by its last moves steps over merged and closed changes’ conversations, at most 1 000 a page, and may answer few rows with a next. Each change carries its row, its repository by name, its reference (web!42), the caller’s access to its repository, open_findings (findings none of its authors has answered), updated_at (the later of its lifecycle’s last record and the last thing written about it, never its home’s facts) and, while live, its readiness judged in the read. A page counts the changes it scanned, so it may hold fewer than its limit and still carry a next, except a page the index of changes’ words leads, which is served full |
GET /gitlet/repos/{name}/changes/{n} | code_change | One change by number, ?part= at a time. With no part, or revisions: its detail (row; for a closed change closed_by and closed_by_kind, absent where a push nobody made deleted its source; description; authors; conversation counters with spoken_at, when somebody last wrote on it, absent until then and never the home’s facts; recorded mergeability; target_tip, its target’s tip as the read found it, absent where the branch is gone; readiness) on the first page beside its revisions, newest first, each with the facts its home recorded and how its push moved the branch (via, and forced where it rewrote it: a force-push, or the engine’s rebase onto the target). reviewers, comments, reviews and findings page that part of the conversation. queue pages its queue entries in queue order (each {entry_id, target_ref, head_oid, method, enqueued_by, state, reason, checks, paths, commit_oid, enqueued_position, enqueued_at, ended_position, ended_at}: who queued it and how it landed, was ejected or dequeued; kept as long as the queue’s history, 30 days after it ended), 50 a page by default, at most 200. moves pages the lifecycle’s moves, oldest first (each {kind, by, by_kind, reason, was, became, position, at}: who closed, reopened, drafted, readied, edited or retargeted it, a close’s reason, a retarget’s branches from and to, the work item an edit set), 100 a page by default, at most 500. standing is the asker’s own standing findings (open, or answered by an author) by id: every finding a review of theirs carries or, of a later revision, supersedes, at most 1 024 (MaxStandingFindings) a page, none for a credential bound to no seat. files is a revision’s files and diff one file’s patch (?file=, or ?file_b64= for a path’s exact bytes), or with ?patches=true every file’s patch a page at a time, read from the base its facts record, never the target’s tip now; or with ?since_revision=, what changed between that earlier revision and this one, kept to the paths either touches (kind interdiff). ?revision= reads at a revision other than the head. findings places each finding in that revision: placed, by finding id, is where its lines are now (start, end), outdated where its own lines changed, gone where the revision holds no file at its path |
GET /gitlet/repos/{name}/changes/{n}/routing | code_change_routing | Whom the change’s records reached: records that reached anybody, newest first, a whole record a page (?limit= 1–200, unset or 0 is 50), each with record_id, position, instant, excerpt and every recipients entry: a seat’s handle or the human seat a person holds, kind (agent or person), the one reason it heard under, addressed where it asks something of them, and fallback and fallback_rank for a substitute reached because nobody better was. delivery says what the answer can say: reached where it lists a record; nobody for a change opened since retained_from, whose notices would all still be kept; swept for one opened before it, whose notices a sweep was entitled to take. retained_from is thirty days back, how long a seat’s notice is kept (a person’s is kept the company’s inbox.retention_days, never less), so a record older than it lists only the persons it reached |
GET /gitlet/reviews | code_reviews | The reviews one reviewer gave, newest first across the repositories the caller may read (?reviewer=, required: a seat’s handle or the human seat a person holds; ?limit= 1–200, unset or 0 is 50; ?cursor=), each naming the change it judged: repository, reference, title and state. A page counts the reviews it read, so it may hold fewer than its limit and still carry a next |
?cards=true on GET /gitlet/changes answers each listed change’s card:
comments, reviews and changes_requested; reviewers (at most 8, each
handle, kind, verdict, verdict_revision, asked, reason,
owned_paths and owned_paths_omitted) and
reviewers_omitted; checks, a check rollup of its head for its target
(state, counts, required, required_passed, last_ended,
running_since, failing, failing_more, more), absent where no attempt is
kept; and ejected (reason, at, checks, checks_more, and tested_in
where its checks failed on a train) where a live change’s newest queue entry
was put out in the last day. An older data node refuses cards and another
answers; a card never reads as zeros where it was not answered. cards= other
than true or false is 400 bad_params, and cards=true on any other
question is refused naming it.
?text= on GET /gitlet/changes narrows the listing to the changes in whose
title or description every word of it appears (a word is two or more letters
or digits, case folded, no stemming; at most 8 words and 400 bytes,
400 bad_params past either or with no word), in the order the listing reads
without it, never ranked. Words alone name a listing, newest opened first.
With no ?reviewer=, ?needs=, ?work= or ?readiness=, the answering data
node’s index of changes’ words leads: it reads the newest 5 000 changes of
the narrowest of the listing’s repository, owner, state and rarest word, keeps
the newest 1 000 holding every word, and judges each in the read beside every
change moved since the index last caught up, so pages are full; newest is when
each change’s open was asked (the instant its id carries, the same on every node). Beside a
reviewer, a need, a work item or a readiness bucket, that walk leads and the
words are judged on each change it read. Every page it narrows carries
changes_text, {} where the search was whole: truncated, more changes may
hold the words than one search reads; indexed_back_to, an instant, the index
is still being built newest first and has reached back to the changes opened
then, so one opened at or before it may be missing; building, the index was
behind its rows, so a change holding them may be missing. None says that no
change does. A page without changes_text came from a node that does not read
?text=, and is the listing unnarrowed. Across repositories a deleted
repository’s changes count toward both bounds until its purge
(Searching changes by their words).
Each reviewer row of ?part=reviewers carries owned_paths where a
revision’s facts asked the reviewer as a path owner: the globs of every owner
resolving to them that the revision touched, sorted, at most 32 and 1 KiB, and
owned_paths_omitted, how many more. An ask by name carries none, and asking a
path owner again by name drops them. A card’s face carries the same where that
ask waits, was answered by their review or ended with the change. Each
revision’s facts carry measured_at, when its home read them by its own
clock, to the microsecond. Facts and asks recorded before this build carry
none of these, nor does an older data node’s answer.
?part=finding_paths on GET /gitlet/repos/{name}/changes/{n} answers
finding_paths: the change’s findings counted by path, state and
revision (findings), in that order (?limit= 1 to 1 000, unset or 0 is
500, and ?cursor=); revision and file beside it are 400 bad_params. An
older data node refuses it and another answers. The detail carries
participants (rows of handle, kind, verdict and verdict_revision,
at most 32, and omitted), each reviewer row at, when the record that last
moved it landed (absent past the notices’ horizon), and each finding
raised_at, when the review that raised it landed. A merged change’s detail
carries reverted_by (repo, ref, title and state), the latest change
code_revert_change opened to revert it, absent where none was.
?part=viewed on GET /gitlet/repos/{name}/changes/{n} answers viewed: the
files the asker marked viewed with code_mark_viewed, in path_digest order,
each with path_digest, file_digest and at, and beside a page that holds
one, viewed_key, the repository’s key in lowercase hex (?limit= 1 to
1 000, unset or 0 is 500, and ?cursor=, a digest). path_digest is the
HMAC-SHA256 under the key of the path’s UTF-8 bytes, and file_digest that of
the path, a NUL byte, the object id, a NUL byte and the mode the mark was made
at (both empty for a file the change deletes), each in lowercase hex. A mark is
current while the revision shown gives the file a file_digest equal to the
mark’s. A person’s own alone: a seat or a credential bound to no seat is
answered none, and so is a change that is closed or merged; a read Ask Crewlet
makes for a person is answered the marks without the key. revision, file
or context beside it is 400 bad_params. An older data node refuses it and
another answers.
A part read by object id (files, diff, and findings’ placing) reads the
change’s rows at the caller’s freshness, every other row at session floored
at that first read’s position, and asks the home Gitlet node at the floor of
the records that moved the revisions it reads, so no answer is from an older
copy than the first read saw. A change’s question adds these refusals to the code reads’:
404 not_foundwith"reason": "no_change"for a number the repository holds no change of, and"reason": "no_revision"for a revision the change does not have;404 not_foundwith"reason": "unrecorded"for a revision of a change that was merged or closed before its home recorded its facts, so it has no base to read its files from, and"reason": "unrelated"for one whose head shares no history with its target (its change is every file of its head);404 not_foundwith"reason": "no_object"for afilethe revision does not hold, or an object its repository’s home Gitlet node holds no object of, in the Gitlet node’s own sentence;503 unavailablefor a revision of a live change whose facts its home has not recorded yet (within a minute of the push), and for a read by object id no Gitlet node holding the repository could answer in time;400 bad_paramsfor a parameter its part does not take: arevisionto the revisions, afiletofiles, asince_revisionthat is not earlier, adiffnaming neither a file norpatches, or both,patcheson another part.
?part=excerpts pages the change’s findings as findings does and answers
excerpts, each finding’s excerpt by its
id, read at the finding’s own revision: status (A, D, M or R as the
revision changes the file, absent for one it leaves as it was), binary,
lines (each mark, " ", "+" or "-", its old and new numbers, and
text, or text_bytes where the line is longer than an excerpt shows) and
more where the window held more than 40 lines. It also answers context,
the lines shown either side of each range (?context= 0 to 10, 3 when unset),
and the findings page’s next. A finding whose revision’s facts its home has
not recorded has no excerpt. context on another part is 400 bad_params. An
older Gitlet node refuses the read and another answers.
curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/changes?repo=web&state=open"curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/repos/web/changes/42?part=diff&since_revision=2&file=upload/retry.go"These questions only read. A change is opened, edited, closed, reviewed,
discussed and answered through the code tools: a seat’s, or a person’s on
/operator/act and /operator/mcp, each
made as the human seat they hold. Every record those writes leave tells the
seats and people it concerns: a seat is woken, and a person’s notice is
read through the composed inbox question and marked with
code_mark_inbox (Who a change wakes).
A change’s files are marked viewed with code_mark_viewed
(Viewed files).
The steps a person takes are Review a
change.
A repository’s content
Section titled “A repository’s content”A repository’s refs, files, history and diffs are eleven more questions,
decided per repository as the rows above are and refused in the same
vocabulary. All but code_refs and code_tags read the repository’s
content, which its home Gitlet node answers by object id; code_tags lists
the tags its copy holds at the repository’s own last record. They are the reads a seat’s
code tools make, one
implementation:
| Route | Question | What it answers |
|---|---|---|
GET /gitlet/repos/{name}/refs | code_refs | Live refs under ?prefix= (refs/heads/, the default, refs/tags/, or a directory of either ending in /), by name, a page at a time (?limit= 1–1000, unset or 0 is 200, and ?cursor=); the first page carries the repository in detail too. ?order=moved lists branches by last move, newest first (refs/heads/ only), ?moved_since= and ?moved_before= (RFC 3339) keeping those whose last move is in that window. ?contains= keeps the refs whose name below the prefix holds it in any case; a page reads at most 10 000 refs and answers next however few it kept. ?detail=true answers refs_detail in place of refs: each ref’s moved_at, moved_by (the push that set it: push_id, actor, actor_kind, actor_seat, via; absent past the push history’s 181 days, or where one record moved it there twice), protection (the matching rules’ patterns and what they allow together), a branch’s change (number, title, state: its live change, else its newest) and may_delete, or delete_refusal with delete_detail. ?active_since= on a first page answers active_branches (count, and more past 1 000): the branches other than the default that moved since |
GET /gitlet/repos/{name}/tree | code_tree | A directory’s entries at ?ref=: its root, or ?path= (?path_b64= for a path’s exact bytes); or, with ?recursive=true, every file below it, a page at a time (?cursor=) |
GET /gitlet/repos/{name}/find | code_find | The files of ?ref=’s tree whose path holds ?q=’s characters in order, in any case (each character one of the path’s, a space too; at most 256 bytes): matches, best first, each its path (path_b64 beside it where it is not UTF-8), oid, mode and spans, the runs of matched characters as [start, end) code points. A file whose name holds the query ranks before one whose directories do, then the closer the characters, the earlier and the shorter the name. ?limit= (1–100, unset or 0 is 50) bounds them, and fewer are answered where their paths fill one answer; total is how many files match and files how many the tree holds. One answer, no next page: type on to narrow it. A link is a file; a submodule is not, nor is a path past 4 KiB |
GET /gitlet/repos/{name}/blob | code_blob | A file’s lines at ?ref= and ?path=, ?start_line= to ?end_line=, a page at a time; ?ref= a blob’s own id with no path reads that blob, and a path naming a directory answers its listing |
GET /gitlet/repos/{name}/log | code_log | The commits that changed ?path= (or every commit) newest first from ?ref=, each with parents, author, committer, engine_committed where that is the engine’s convention, its two dates and its subject. ?limit= a page (1–100, unset or 0 is 25); ?grep= a literal the message must hold; ?since= (RFC 3339) the oldest commit date kept; ?until= (RFC 3339) the instant every commit kept is before (an until not after since is bad_params); ?pushed_by= a seat’s handle, keeping the commits a push by it brought, with unjudged the commits the node’s index of pushes could not judge. A history narrowed by pushed_by is never immutable |
GET /gitlet/repos/{name}/blame | code_blame | Which commit last changed each line of the file ?path= at ?ref=, ?start_line= to ?end_line= (at most 500 lines a read), a page at a time |
GET /gitlet/repos/{name}/tree-commits | code_tree_commits | The commit that last changed each entry of the directory ?path= (?path_b64=; the root where it names none) at ?ref=, as git log -1 -- <entry> names it: entries, each its path (path_b64 beside it where it is not UTF-8) and commit; commits, each commit they name once as code_log lists it; and total, the directory’s entries. A page begins at ?cursor=, code_tree’s own (e:<n>, the listing’s n-th entry), so the column fills beside the listing; it holds up to a hundred entries, fewer where their commits fill one answer, and its next goes on. An entry with no commit is a directory that holds no file and never did along its history, which git names no commit for, or, marked out_of_time, the first entry of a page whose read ran out of time before finding it: the page ends after it. A page whose read ran out of time is marked out_of_time itself, ends where its next says, and is answered bare |
GET /gitlet/repos/{name}/diff | code_diff | What changed from ?base= to ?head= (both required): the per-file stat, narrowed to ?paths= (repeated, at most 64); or one ?file=’s patch (?file_b64=); or, with ?patches=true, every file’s patch in the stat’s order (patches: file, path, status, patch, continues, and rest_omitted where the patch stops before a line longer than one answer holds), narrowed by ?paths=, with the stat’s totals and an empty files. Renames are detected unless ?renames=false; a page at a time |
GET /gitlet/repos/{name}/tips | code_tips | Up to 100 objects named by their whole ids in ?oids= (comma-separated), a page of them in that order: each one’s type, what it peels to (peeled, peeled_type), for an annotated tag its tag (tagger, tagger_email, tagged_at, subject, each described by its size past its bound as a history’s fields are), and for one that is or names a commit that commit as code_log lists it. With ?base= (any revision: a branch, HEAD for the default branch, or an id), each commit’s behind and ahead: the commits the base has that it lacks and the reverse. A page whose read ran out of time counting ends early with a next; its first tip, where that is the one it ran out on, is answered with counts_out_of_time and no counts. Immutable where base is a whole id or absent |
GET /gitlet/repos/{name}/tags | code_tags | The repository’s tags as its home Gitlet node’s copy holds them at the repository’s own last record or later, so every tag its row counts, newest first by their own date (an annotated tag’s tagger date, a lightweight tag’s commit’s committer date: git’s creatordate), by name where two share a date; a tag with no date (a lightweight tag of a tree or a blob, an annotated tag naming no tagger) is dated at the epoch, after every later tag. ?limit= a page (1–100, unset or 0 is 25) and ?cursor=. Each is its whole ref, its oid and that object’s type (tag for an annotated tag), what it peels to (peeled, peeled_type) and its date, or date_unix, its seconds, for a date past the year 9999; total counts every tag. The first row of the first page is the newest. Never immutable: it carries the answering copy’s position |
GET /gitlet/repos/{name}/compare | code_compare | How ?base= and ?head= relate: their merge base, which contains which, how many commits each has that the other lacks, the first page of what head changed since the merge base; and preview, what merging head into base would do as the repository’s home merges it: state clean, conflict (conflicts the paths, conflicts_omitted how many more) or unknown, a merge its home could not decide in a read’s time. It is the same merge a change’s mergeability is recorded by. Where one commit contains the other (a fast-forward, or a head base already holds) the merge is clean, answered from the comparison with no merge asked of the home |
GET /gitlet/repos/{name}/commits/{sha} | code_commit | One commit by its whole id as code_log lists it, with pushed_by, the push that introduced it where the Gitlet node’s index names one; push, that push’s row whole (who pushed it, the run behind a seat’s push, every ref it moved) where the push history still holds it; tagged, the tags naming it, read at the repository’s own last record or later; and the changes it belongs to: merged, each change whose merge it is, and revisions, each revision it heads (revision 2 of web!42), at most 50 of each, more set where either holds more. Each change carries how it landed once merged (merge_oid, merged_at, merged_via, merged_by with merged_by_kind, and override_reason, a person’s reason for merging past its gate) and, for one merged through its gate (direct or queue), gate: approvals of the revision it merged at (each {handle, kind, revision}, at most 8, approvals_more past them), checks_on, the commit its gate’s checks ran on (a direct merge’s head, or the tip a queue’s landing left the branch at, which an entry inside a train shares with the train’s last), checks, their rollup as code_commit_marks answers one, and gone where none of those rows is kept and the merged revision was pushed over 30 days ago, past which they are swept |
A revision (?ref=, ?base=, ?head=) is a commit’s id, whole or its
first 7 or more hex digits, or a branch, a tag, a whole ref, or HEAD for the
default branch (the default where ref is not given); a branch whose name is
all hex digits is named by its whole ref. Every ref a request names is
resolved in one read at the caller’s freshness (HEAD too, the default
branch read from the repository in that same read, so a question at the
default branch costs no more than one naming a branch), and the home Gitlet node is asked
at the position of the record that last moved each, so its copy holds what
the ref named.
A question every revision of which is a whole id never changes, and says
so to a request that names who it is for (a bearer, or the dashboard’s
X-Crewlet-Reader): it is answered with a strong ETag and Cache-Control: private, max-age=31536000, immutable, and 304 Not Modified to a request naming that
tag in If-None-Match. A request that names nobody, a tab’s cookie
alone, is answered the same page with Cache-Control: no-store, since a kept
answer would be shared by everybody who signs in on that browser and not every
person reads code (Security headers on every
response). Such an answer is the page alone (the
repository by the name asked, the kind, the rev read, the next cursor and
the kind’s own part), cut the same on every Gitlet node. A question naming a
ref or an abbreviation is answered bare, without the tag, since what it names
can move, and carries beside the page: resolved, each ref by the parameter
that named it (whole name, commit, where it last moved); the answering copy’s
position; pushed_by, the push that introduced each commit the page names,
with coverage, what the node’s index of pushes holds; and on a history’s
page tagged, the tags naming each commit (at most 8 a commit, newest first,
more past them), absent where the node keeps no readable tag index, which
says nothing of any commit’s tags. Also answered bare: a comparison whose
merge preview is unknown, a page of code_tree_commits marked out_of_time,
a history narrowed by pushed_by (it reads the node’s index of pushes), and
every code_commit (its changes and push move).
A content question adds these refusals to the code reads’:
404 not_foundwith"reason": "no_ref"for a ref the repository holds no live ref of, every one named, and"reason": "no_object"for an object id the repository holds no object of, or a path the revision holds no such directory or file at;400 bad_paramsfor a revision that names nothing, acode_commitshathat is not a whole commit id (an abbreviation is expanded bycode_logwith it asrefandlimit=1), a read too large to answer whole — narrow it — acode_findwith noq, one past 256 bytes, not UTF-8 or holding a NUL, or alimitpast 100, and a parameter the read does not take;503 unavailablewhere no Gitlet node holding the repository could answer in time, which is never an answer about the repository.
curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/repos/web/tree?ref=main&path=upload"curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/repos/web/compare?base=main&head=feature/retry"Merge queues and checks
Section titled “Merge queues and checks”What a repository’s merge queues hold and what its checks measured are five
more questions, decided per repository as the rows above are and refused in
the same vocabulary: a listing across repositories keeps the rows of those the
caller reads, and a read naming one repository the caller’s grant shuts out is
403 not_permitted, however narrowly it asks. Each reads at the caller’s
freshness, so a screen reads its own merge, enqueue or re-run back at the code
log’s floor (read_level=session&min_position=…):
| Route | Question | What it answers |
|---|---|---|
GET /gitlet/queue | code_queue | The live entries of merge queues (waiting or testing) in queue order: ?repo=’s, one of its branches’ with ?target= (a whole ref, refs/heads/main), or every repository’s the caller reads where it names none. Beside them trains, the candidates of the trains testing the targets the page reaches, and, on a named repository’s first page, ejected: the entries its queues (its ?target=’s alone, where it names one) put out in the last day, newest first, at most 50, each the change by its number, who enqueued it, why (reason: check_failed, checks_undefined, its branch’s checks file defining a required check in no form that runs, conflict, gate_unmet, head_moved, not_fast_forward or repo_mirrored, its repository a pull mirror), the required checks that failed on what it was tested in or that no checks file defines, or the paths its merge conflicted on, tested_in for a failed check’s culprit (candidate_id, base_oid, the commit the candidate was merged onto, the branch’s tip for a train’s first, and commit_oid, where the checks failed: its run is code_check at that commit for target_ref), and ejected_at. Every entry and every ejection names its change’s title and source_ref, and every ejection how it was to land, method, delete_source and close_task, which is what a re-queue sends. ?trains=true answers, naming no repository, the trains of the targets the page reaches and the ejections of every repository the caller reads, and on any first page ejected_total, {total, more}: every ejection of the last day the read covers, counted up to 10 000, more where it stopped there, and then the rows are of the ejections counted; unset or false leaves them out, anything else is 400 bad_params, and so is trains on any other question. A page at a time (?limit= 1–200, unset or 0 is 50, and ?cursor=) |
GET /gitlet/checks | code_checks | Attempts of checks, in one of these shapes. A repository’s (?repo=): newest ended first, every attempt not yet ended after them. A change’s (?change= its number: its head’s attempts, checked for its target) or a commit’s (?oid=, a whole id: checked for every branch, for the change’s target beside ?change=, or for one branch beside ?target=, in full: refs/heads/main). ?latest=true beside a change or a commit answers each check’s latest attempt alone, one row a check and a branch (what each check stands at, which a merge gate reads), at up to 64 a page where ?limit= is unset, every check one checks file declares, so a change’s head’s checks are one read; a repository’s listing and the window refuse it, bad_params, since they walk endings in time. The window, naming no repository: every repository’s the caller reads whose attempts ended at or after ?since= (RFC 3339; unset, the thirty days an attempt’s rows are kept) and before ?until= (RFC 3339, after ?since=; unset, up to the newest ending), newest ended first; a window over a past interval is read from its end down, so its first page is that interval’s newest attempts however many ended after it; a repository’s listing refuses both bounds. Every shape narrows by ?name=, a check’s name, and ?state= (queued, running, passed, failed, errored, cancelled, skipped; the window, which lists the attempts that ended, takes the last five alone unless it lists where checks stand). ?standing=recent or ?standing=failing lists where each check stands instead: each check’s latest attempt for a branch, of a live change’s head, a live change’s newest queue entry or a protected branch’s tip, attempts not yet ended included, beside ?repo= or across every repository, within ?since= (refused with ?until=, ?change=, ?oid=, ?target= or ?latest=), narrowed by ?name= and by ?state=, any of the seven, queued and running in the window too. recent lists what runs and waits first, then the endings newest first; failing the failures, errors, running, queued, cancelled, passed and skipped, each newest ended first. Each row names the change it judges (change, source_ref, change_head), and a first page counts the attempts by state (standing_counts, a state in at_least counted to its bound of 128), narrowed by ?name= and never by ?state=. Every row names its repository twice, repo_id and repo, its name, which every link to it takes; the window’s too. A page at a time (?limit= 1–200, unset or 0 is 50, 64 beside ?latest=true, and ?cursor=) |
GET /gitlet/repos/{name}/checks/{oid}/{check}/{attempt} | code_check | One attempt whole: its row, the definition it ran under, its tail, the failures its ending named (path, line, test_id, message) and log, the object a failed run’s log is kept as, with its size; tests (total, failed, skipped) where its JUnit report was read; and where its output’s lines were counted log_lines, its whole output’s lines, tail_first_line, the number of the tail’s first line in it, and tail_cut where that line began before the tail, each absent where not counted. ?target=, the branch it was checked for, is required: one commit is checked for every branch a change heading it merges into, and a ref’s slashes are no path segment’s |
GET /gitlet/repos/{name}/checks/{oid}/{check}/{attempt}/log | code_check_log | A page of that log: ?offset= (bytes from its start, 0 unset) and ?limit= (1–262144 bytes, unset the most), answering object, size, offset, text and next, where the next page starts, absent on the page that reaches the end. A page never ends inside a character: it ends before it, and next starts on it. Its tail, where a failure is printed, is one read from size back. ?target= is required, as above |
GET /gitlet/repos/{name}/commit-marks | code_commit_marks | What a history page draws beside each of up to 100 commits named by their whole ids in ?commits= (comma-separated), in that order: checks, for each branch the commit was checked for (at most 4, checks_more past them), each check’s latest attempt rolled up: state (failing, running, pending, cancelled or passed, the first that holds), counts by state, required and required_passed, last_ended, running_since and the failing checks by name, required first (at most 8, failing_more past them); merged, each change whose merge commit it is, and heads, each revision it heads ({change, n}), at most 4 of each (more past them), every change with merge_oid, merged_at, merged_via and merged_by (merged_by_kind beside it) once merged. Read from the rows alone, at the caller’s freshness: a check’s rows are kept 30 days after it ended, so an older commit carries no checks, which says nothing about whether it was checked |
A narrowing is sought, never filtered out of a page. A repository’s
listing and the window seek an index that leads with the state, or with the
check’s name and then the state, so a narrowed page holds as many of the
attempts the narrowing names as follow its place, whatever ended around them: ?repo=web&state=running answers what runs now on its first page,
however many attempts ended in the thirty days kept. A change’s and a commit’s
listings test it while walking that commit’s attempts, which their shape
bounds. What still makes a page short is the caller’s grant: the window keeps
only the repositories the caller reads, so its page may be short, or empty with
a next: follow it until it is absent.
A log page is immutable by its object, never by its attempt. Asked with
?object= (the key code_check answers as log.object) the page is
answered with a strong ETag and cached for good, to a request that names its
reader, as a read by whole object ids is: an object’s key is
minted for one upload and never reused. Asked without it, the page is answered
bare: an attempt’s ending can be replaced by a later one (a runner declared
lost that was only slow), and the ending it keeps keeps its own log.
The check questions add these refusals to the code reads’:
404 not_foundwith"reason": "no_check"for an attempt the repository holds no row of (never queued, or past the thirty days an ended attempt’s rows are kept) and"reason": "no_log"for an attempt that kept no log (only a failed run keeps one), or no longer the?object=asked for, the sentence naming the one it keeps;400 bad_paramsfor an attempt that names notarget, anattemptthat is not a whole number from 1, astatethat is no check’s (or, on the window, that is not an ending:queuedorrunning), asincethat is no instant, a loglimitpast one page or anoffsetpast the log’s end, anobjectthat is no object’s key, and a narrowing the shape does not take (asincebeside a repository, achangeor anoidwith none);400 bad_paramsforcode_commit_marksnaming no commit, more than 100, one twice, or one that is not a whole id, or alimitorcursor.
curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/checks?since=2026-10-01T00:00:00Z&state=failed"curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/repos/web/checks/4b825dc642cb6eb9a060e54bf8d69288fbee4904/unit/1/log?target=refs/heads/main"GET /gitlet/search
Section titled “GET /gitlet/search”The question code_search: matching lines across every search: indexed
repository the caller may read, or the repositories its repo: filters name,
answered by the one scatter over the Gitlet nodes (Code
search). A repository the caller may not
read is left out of an unfiltered search; a repo: naming one is 403 not_permitted.
| Parameter | What it is |
|---|---|
q | Required. The search as a person writes it (Finding code): repo:<name>, path:<pattern> and ref:<ref> filters first, then the text, at most 400 bytes |
mode | literal (unset), regex (RE2, one line at a time) or word (not inside a longer word) |
ignore_case | true folds case; false or unset does not |
repo, path, ref | One more filter each beside those in q: a repository or path widens the search; a ref beside a different ref: is refused, as two ref: filters are |
limit | Most lines, 1–500; unset or 0 is 500 |
context | Lines of the file each side of a line, 0 to 3; unset or 0 is none. With it, limit is at most 100, and unset is 100 |
per_file | Most lines per file, 1 to 500; unset or 0 is every line. With it, each line names file_matches, how many lines of its file matched |
read_level | Level the caller’s repositories are listed at: stale (unset), linearizable or consistent_prefix, with max_lag_seconds and max_lag_seq beside stale |
The answer is hits in repository, path, line order. Each has repo, path
(path_b64 beside it for non-UTF-8 bytes), line, text (at most 256 bytes),
blob (the file’s object id) and matches (byte offsets [start, end) in
text, at most 32). With context: before and after, the surrounding
lines, a line another answered line carries not repeated. With per_file:
file_matches. Beside hits:
tips: the commit each repository with a hit was searched at, by name.coverage:searched,building,stale,not_answering,not_permitted,no_ref,past_limit,grep_not_named,not_indexed,skipped_filesandtruncated, as Code search tells each.
An empty hits says only that nothing matched in the repositories counted under
searched: every set beside it but not_indexed names repositories not read,
and skipped_files counts files passed over.
It answers at the tip it names, so it takes no floor. Each repository is
searched at the commit its answering Gitlet node holds for the ref (tips), and
a hit’s file is read at that commit by id (code_blob).
So read_level=session and min_position are refused 400 bad_params. A
repository declared a moment ago is listed for an unfiltered search at
read_level=linearizable.
Refusals are the code reads’ (above), plus 400 bad_params
for: a q that is missing, past 400 bytes, without a run of three characters to
look up, or whose expression does not compile; a mode that is none of the
three; a limit past 500; a context past 3; a per_file past 500; a limit
past 100 beside context; more than eight search: grep repositories. A repo:
naming a repository that nobody declared is 404 not_found with "reason": "not_declared", naming it.
curl -s -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "https://crewlet.example.com/gitlet/search?q=repo:billing%20path:src/**/*.go%20retryBudget&ignore_case=true"GET /gitlet/repos/{name}/readers
Section titled “GET /gitlet/repos/{name}/readers”Who read a visibility: unit repository’s contents over a range of company
days: every clone and fetch whose answer carried a pack, and every server-side
read that answered (a seat’s code tools or a person’s assistant), summed over
every node and day, one row per reader (a credential and the human seat it acted
as, or a seat, and how it read). What counts and how it is kept: Who read
it. It is the query code_repo_readers,
also GET /query/code_repo_readers?name=… and the socket’s query channel
(Queries), one implementation; the operator tool code_repo_readers
answers the same pages.
| Parameter | |
|---|---|
from, to | Company days on the company’s clock, YYYY-MM-DD, inclusive: the thirty ending today where neither is named, the thirty ending at to where only to is, at most 181 days apart (the days the records keep) |
cursor | The next of the page before; left out for the first page |
Admin only (code_repo_readers, the operator tool’s own verb): any other
caller is refused 403 unauthorized naming admin before anything is read. The
answer names people and credentials, so no repository’s grant gives it.
A unit’s repository answers 200:
| Field | |
|---|---|
repo | The repository’s name |
recorded | true |
from, to | The range read |
readers | The page’s readers, ordered by principal_kind, principal, via and seat: principal_kind (operator for a credential, agent for a seat), principal (the credential’s login pat:<credential id>, session:<lineage> or token:<id>, or the seat’s handle), seat (the human seat a credential acted as, or the seat’s own handle; absent for a credential bound to nobody), via (git or tool), reads, bytes (sent to the reader) and last_at (newest read). Present, and empty, where nobody read it in the range |
readers_elided | First page only: readers the per-day cap left out (one node’s day names at most 1 024); 0 where complete |
next | Cursor of the next page, absent on the last |
A page holds at most 32 KiB of readers. A visibility: company repository’s
readers are not recorded: it answers 200 with "recorded": false and a
detail saying so and how to have them recorded.
The repository is read by name as the caller at linearizable, so one declared
a moment ago is never answered undeclared. The readers come from the usage log,
which takes none of the freshness keys above, so the answer carries no
position. Refusals are the code reads’: 404 not_found for a repository nobody
declared and for a company that hosts no code, 503 for a node that serves none
of Gitlet now and for a usage log no data node serves, and 400 bad_params
naming what to change for a range or cursor the read cannot take.
POST /gitlet/repos/{name}/verify
Section titled “POST /gitlet/repos/{name}/verify”Begins a check of this node’s copy of one repository against its rows: every
pack against the bytes its row names, the refs against what was written, and
git’s connectivity check. With ?repair=true it also repairs what it finds, then
checks the copy again. The repair is in place where everything found is the
copy’s own directory out of place (a file the engine does not write there, a
fixed file edited or replaced by a link, a pack no row names, a shape the node
refuses to run git in), keeping every pack and index and downloading nothing;
otherwise, or for what that leaves, a rebuild (every pack found whole is
linked, not downloaded again). repair is true or false; anything else is
400 bad_params.
Before checking, the node brings its copy to the log’s head, which appends a
barrier to the code log; with min_position it brings it to that position on
the code log (a code read’s position) with no barrier, and a copy already
there is checked as it is. A sweep of many repositories reads its listing at
read_level=linearizable once and names that position on every verify, costing
the code log one barrier, not one a repository. A position that does not parse,
or one on another log (alone or repeated beside the code log’s own: a verify
reads the code log alone) is 400 bad_params.
It is the one /gitlet/ route whose work grows with the repository: it reads
every byte of the copy, about nine seconds a gigabyte (git’s connectivity check
nearly all of it), about twice that with a repair, which outlives any proxy’s
read timeout. So the check runs on the node’s own time (the request ending, or a
proxy closing it, ends nothing) and the request waits a quarter of a second at
most. A check that ends within it (a copy up to some 25 MiB) is answered
200 with the report; one still running is 202 Accepted, with its
address in Location. Read the outcome there (below).
{ "id": "0190d2f2-…", "repo": "web", "repair": false, "state": "running", "started": "2026-10-14T21:30:00Z" }Refused at once, having read nothing, so a retry costs nothing:
404 not_foundfor a repository that is not declared ("reason": "not_declared", itsdetailnamingcode.repos), for a company that hosts no code ("reason": "not_hosted", as on the reads), and for one this node holds no copy of, which carries"reason": "not_held". A Gitlet node keeps a copy only of repositories it has served and not evicted; building one to check would download the whole repository and evict a warm one. Verify the Gitlet nodes that serve it (with requests routed by repository, one or two). Thereasonseparates the cases because a sweep of every repository on one node treats them oppositely: a repository the node does not keep is passed over, while a name nobody declared is a mistake.503 unavailablewithRetry-After: 10when the node’s maintenance lane has no free slot or background work leaves the check no memory. A check holds one slot of that lane, and its connectivity check’s memory, from admission to end (background indexing keeps one slot free for it), so the lane bounds how many checks run at once.409 verify_runningwhen a check of the repository with the otherrepairsetting is running on the node, naming it asrunning. One with the same setting is answered as that one: two asking share one check.503 unavailablewithRetry-After: 30on a node where Gitlet is stopping, and500 query_failedwith its sentence when the node’s memory cannot hold the check at all (the sentence says to run it on a node with more).
A repair writes into the node’s copy, so a draining node refuses the route. Mounted only where git is served.
Admin only, as the deployment’s other controls are (fleet.operate, which
asks a signed-in person for a recent proof; the read below is fleet.read): a
caller without admin is refused 403 unauthorized naming it, before the node
is asked anything. The check holds a maintenance slot and a repair rewrites what
every fetch on the node is served from: an operation on the node, which no
repository’s grant decides.
GET /gitlet/repos/{name}/verify/{id}
Section titled “GET /gitlet/repos/{name}/verify/{id}”A verification begun by the POST above. state is:
running.done, withreport, the node’s check:packsandrefschecked.repaired_by_sync: what the node’s sync before the check found damaged and repaired in place (a file the copy no longer holds: no problem of the copy, nothing a repair rebuilds).problems: each sentence names the file and both values (none means a copy exactly its rows).- After a repair, how:
repaired_in_place(the copy’s own directory put right in place),rebuilt, or both (a rebuild followed for what the in-place read left);problemsis then what the check after it found andfoundwhat the first check found.
failed, witherror(unavailablefor what a retry or restart clears, a stop among them;query_failedotherwise),detail(its sentence: a pack the object store does not hold, the stop that cut it short) andreport, what the check found before it failed.
ended is set once it is not running.
While running and checking the copy, deadline is when the node ends that
check by. Each pass is bounded by the copy’s size (about 1.1 seconds a
mebibyte: connectivity check a second of it, hashing a tenth, against a measured
9 ms); a pass still running then is ended, failed saying it ran past its bound,
rather than holding its slot. A client waits by it. It is absent while the node
first brings its copy to the rows it checks against, and while a repair reads it
whole in place or rebuilds it: each object store read those make is bounded on
its own, as every sync’s is.
The node keeps a verification an hour after it ends, until the repository’s
next verify begins, and never across a restart; one it does not keep is 404 not_found. A read, so a draining node still answers it. A client polls by the
stated deadline, at doubling waits from the quarter of a second the request
already waited; a poll costs a lookup.
Agent Memory
Section titled “Agent Memory”GET /agents/{id}/memory
Section titled “GET /agents/{id}/memory”What one seat has learned, in one round trip, answered by the node holding the
seat. Also the agent_memory query, which takes {id, limit, skills_order}; the route takes ?limit= and ?skills_order= (uses or
updated; the newest drafted first when absent), the order the holder reads the seat’s whole set of
skills in before it cuts their page.
{id} is the seat’s handle, the canonical identifier everywhere, or a
person’s login, which names the seat the identity directory binds them to and
is never read as a handle. It is a seat’s TRAIL, so it takes audit.seat.read
(the seat’s lead, or admin); an absent name is the caller’s own seat. The
answer resolves the store’s two keys (diary and onboarding marker by derived
agent id; episodes, skills and counterparty profiles by handle) itself.
{ "id": "<handle>", "diary": [ { "id", "content", "retention", "source", "turn_id", "created_at", "ttl_until", "retrievals" } ], "diary_total": 142, "episodes": [ { "id", "turn_id", "agent_handle", "task_summary", "ask", "ask_bytes", "plan_summary", "plan_summary_bytes", "review_outcome", "tool_sequence", "skills_used", "conversation_key", "work_key", "created_at", "ended_at", "duration_ms", "compacted", "count", "compaction": { "common_task_pattern", "done", "notable_patterns" } } ], "episodes_total": 38, "skills": [ { "id", "key", "title", "summary", "version", "updated_at", "uses" } ], "skills_total": 4, "counterparties": [ { "subject": { "handle" | "external_id" + "platform", "name" }, "resolved", "traits", "interactions", "first_seen_at", "last_updated_at", "last_corroborated_at" } ], "counterparties_total": 11, "latest_reflection": { "id", "content", "…": "a diary row" }, "onboarded_at": "2026-09-01T08:02:11Z", "held_by": "node-2"}Who answers. A seat’s memory is written to the store of the node running it and carried to every node on a compacted changelog, so every node that ever held a seat keeps a copy and only the holder keeps it CURRENT. The serving node reads the seat’s lease and:
| The lease names | The answer |
|---|---|
| nobody | empty, with held_by: "none": copies on disk are of unknown age, none is shown as the seat’s memory |
| this node’s own incarnation | read here, once the seat is attached; while it is arriving (hydrating before its mailbox attaches) the read is unavailable, not short |
| a peer | asked of that incarnation on an ephemeral scatter (crewlet.held.read), 2 s budget; silence (a draining holder or lapsed heartbeat included) is unavailable naming the node, never an empty memory |
held_by is the node that answered. A node with no broker is the whole fleet and
answers from its own store. unavailable is a 503 with a Retry-After on REST
and the socket’s unavailable code with retry_after: a moment’s wait, not a
fault.
Every collection is a page with its total beside it. limit (1–50, default
50) pages all four; diary_total, episodes_total, skills_total and
counterparties_total are COUNTED in the store over the seat’s whole set. The
answer is one reply on the broker, so the episodes, the skills and the
counterparties each also end at 1 MiB of text (a quarter of half the reply),
before the row that would pass it and never before the first: a page can hold
fewer than limit rows while its total counts them all. A diary note is bounded
where it is written, so the diary takes no such bound. A skill row never carries
the skill’s body.
latest_reflection is the newest live diary entry whatever the page (a profile’s
summary asks for limit=1 and reads the totals and this), null when the diary
holds none.
Every key is present on every answer, as an empty list or a zero, so “learned nothing” is distinct from “this answer lacks that half”.
An episode: task_summary is the label of the event that woke the turn,
ask what it was asked ("" if told nothing), plan_summary what it did. A
compacted row stands for count turns and carries compaction (what they had in
common, how many ended done, counted from the members, and what varied);
compaction is null on a raw row.
A listed episode carries only the openings of its two long texts, so one
long turn does not fill the page. ask and plan_summary are each at most
their first 600 bytes, cut between characters and never inside a redaction
marker (the figure a seat is shown of a past turn’s words,
learning.EpisodeAccountBytes); ask_bytes and
plan_summary_bytes are the whole texts’ sizes: a text is whole exactly when its
size is its length. The whole row is
GET /agents/{id}/memory/episodes/{episode}.
GET /agents/{id}/memory/episodes/{episode}
Section titled “GET /agents/{id}/memory/episodes/{episode}”One episode whole: the listing’s row with ask and plan_summary complete.
Also the agent_episode query, which takes {id, episode}. Answered by the node
holding the seat under the rules of GET /agents/{id}/memory above, its rule
included: audit.seat.read, the seat’s lead or admin.
{ "handle": "<handle>", "episode": { "id", "task_summary", "ask", "ask_bytes", "plan_summary", "plan_summary_bytes", "…": "an episode row" }, "held_by": "node-2"}episode is null for one the seat does not hold (dropped or folded into a
compacted row since it was listed, or another seat’s), an ordinary absence. An
episode’s ask and account came in one turn’s event, which the transport held to
8 MiB, so a whole read fits; should one ever not, it is unavailable, with the
holder saying how large the answer was, rather than cut.
memory_overview
Section titled “memory_overview”Every agent seat’s memory at a glance: the list Doclet › Agent diaries draws.
A socket query with no parameters (no REST route; GET /agents/{id}/memory is the
one seat’s record).
{ "seats": [ { "handle": "swe", "diary_total": 142, "episodes_total": 38, "skills_total": 4, "last_reflection_at": "2026-09-28T16:02:11Z", "latest_reflection": { "id", "content", "…": "a diary row" }, "held_by": "node-2", "unavailable": "" } ], "coverage": { "nodes": [{ "id": "node-1", "answered": true, "error": "" }], "complete": true }}Every agent seat in the chart, in handle order, no cap; a person keeps no
engine-written memory and is not listed. Each row is counted by the node HOLDING
the seat under the rules of agent_memory above, gathered in ONE round: the
serving node lists every seat lease once, groups seats by holding incarnation,
reads its own from its store and puts ONE request on crewlet.held.read naming
each holder’s seats; each holder answers for its own in one reply, inside the
same 2 s budget. A row is one of:
| Row | Meaning |
|---|---|
held_by a node, unavailable empty | counted by that node; the totals are the ones agent_memory carries |
held_by: "none" | no node holds the seat; nothing counted, because no copy is current |
held_by a node, unavailable set | that node did not answer (or its answer could not be read), or is still taking the seat; the reason is here and the zeros beside it are not a count |
coverage is the shape every fleet answer carries: this node and every holder
asked, each answered or with its error, and complete only when all
answered. An unreadable lease table fails the whole answer as unavailable.
The rows are projected by internal/learning/memread, not the learning
package’s structs marshalled directly, which have no json tags and carry every
row’s raw embedding vector.
Sources:
diary: the seat’s private observation log, written byreflect_and_persistand the reflection pass, live entries only, newest first.retentionisdiary_longordiary_short; a short entry carries thettl_untilit lapses at.retrievalsis how often it has been recalled.episodes: one row per completed turn (or compacted cluster), newest first.duration_msis milliseconds (a Gotime.Durationmarshals as nanoseconds).skills: the seat’s own synthesized skills, drafted from repeated work and loadable mid-turn viause_skill. Archived rows are hidden and stale ones shown, because a stale skill still works and revives on use.counterparties: what the seat learned about the people it works with, most recently updated first.last_updated_atmoves on every interaction,last_corroborated_atonly when the traits changed.traitsis a bag whose keys the model invents.subjectcarries ahandlefor a seat of this company and anexternal_idwith itsplatformfor anybody else.onboarded_at: when the seat first finished onboarding, or""; a pass claimed and never finished is not an onboarding.
A store that cannot be read fails the read rather than answering an empty section: “remembers nothing” and “the store did not answer” are opposite facts. The table is strictly per-agent; cross-agent procedural artefacts are promoted as draft pages in the shared knowledge backend, reachable by all members via query-time search.
Executor Sessions
Section titled “Executor Sessions”Every turn whose executor captured its harness’s
session keeps it, sealed in the fleet’s
object store, named by the turn’s row of the
executor log
(ADR-0073).
That session is the whole record of what the run read, called and wrote. Two
reads show it: a seat’s sessions, and one session’s transcript.
Both are the seat’s trail, decided per seat by audit.seat.read (the seat
itself, whoever leads it, or admin), as it decides
executor_tail and a seat’s phases with their prompts and responses:
a session reaches nobody the run’s live output did not. It shows more than the
live output. The live output names each tool call’s subject (whole only within
8 KiB) and a failed result’s first line, never a result’s body; a transcript
holds every call’s whole input, each result’s text to an entry’s bound (file
contents the run read, what its commands printed) and every subagent’s thread.
Redaction at the read matches the credential shapes the engine knows, not values:
a secret of no recognisable shape that a run read is in its transcript as read.
{id} is the seat’s handle, or a person’s login, which names the seat the
identity directory binds them to; an absent handle on the socket is the
caller’s own seat. A refusal names admin, which would have admitted the caller.
Any node answers. Rows are read through the estate router (a node without
data asks a data node) at the caller’s freshness (read_level,
max_lag_seconds, max_lag_seq, min_position; this surface’s own level when
absent, and a bare session is refused), and a session’s bytes through the
fleet’s one object store, opened under the node’s own keyring. Each answer says
how its rows were read (read_level, position and complete), as every answer
of a state-log domain does.
GET /agents/{id}/sessions
Section titled “GET /agents/{id}/sessions”The seat’s executor sessions, the latest begun first, paged: ?limit= rows
(25 when absent, 100 at most) after ?cursor=, the next_cursor an earlier
page handed out. Also served as the executor_sessions query.
{ "handle": "swe", "sessions": [ { "turn_id": "0193f0c2-6a1e-7c55-9d1a-3b6f0e2a4c11", "conversation_key": "slack:C0ENG:1700000000.000100", "work_key": "", "harness": "claude-code", "harness_version": "2.1.310", "captured_at": "2026-10-30T12:04:00Z", "ended_at": "2026-10-30T12:05:00Z", "ending": { "outcome": "completed", "decision": "done", "delivered": true, "delivered_to": "chatlet", "completed_work": "…" }, "ask_excerpt": "…", "kept": true, "object_bytes": 41234, "media_bytes": 0, "summary_kept": true, "summary_bytes": 6144, "in_progress": false, "base_turn": "0193f0b8-2d4c-7e1a-9b3f-5c8d7e6f1a20", "continued_by": "next_turn", "continuable": true, "continues_in": "any_box" } ], "next_cursor": "48121", "read_level": "stale", "position": { "stream": "CREWLET_EXECUTOR_LOG", "generation": 1, "seq": 48207 }, "complete": true}-
A row begins at its turn’s first launch where the turn read its conversation (its
begin), else at its first capture. A row goes with the turn that was handed it: once a later turn of its conversation that was handed its session and kept one of its own ends, its end absorbs the turns its read handed out and their rows leave the list, as do rows pastturn_engine.conversation_session.retention_daysand a removed seat’s. -
endingis the engine’s account of how the turn ended;nullwhile the turn runs, or when its end was lost and the engine has yet to record itlost(a day after its last record).outcomeiscompleted,failed,stoppedorlost. The rest is sent only where the ending establishes it:decision: the reviewer’s.completed_work: the reviewer’s.blocked_on: the executor’s.answer: the engine’s answer to a colleague’s ask.delivered: whether the reply reached the party waiting;delivered_to: the surface it was owed on (sent whether or not it went).delivery_unknown: whether it went is not known (the turn’s call record was cut to stay bounded and the kept calls show no delivery); never besidedelivered.stopped_byandstop_reason;failure: the engine’s.unkept: the turn’s newest capture where it was not kept:launch_seq,capture_seqandreason(quotes what refused it). Sent only where newer than the last capture the row named; one at the row’s own place, whose record the log took before the turn’s end after all, is the row’s and kept.went_on: true: the turn went on past the session its row names (its record did not hold its last word, the final capture of its last launch that ran a job, kept). The named session was kept while the turn still worked, so it holds what the turn did up to there and nothing after. Sent beside everyunkeptthis engine records, and on a row naming no session. The row keeps what it names; the conversation’s next turn continues it, told so.last_word: the final capture’slaunch_seqandcapture_seq, where the end said the turn went on and that capture was its newest. A row at that place holds it after all (the log took its record although the run’s own record held it refused) and is sent withoutwent_on.spent_sessions: the sessions a launch spent, each itssessionid and itsloss(context_exhaustedorrequest_refused); no launch continues them.
The prose among them, and
ask_excerpt(the first kibibyte of what the turn was asked), are a model’s or a person’s words, redacted at this read,unkept.reasonincluded. -
summary_keptsays the row keeps its session’s newest compaction summary apart from it,summary_bytesthe bytes kept of it (Code Sandbox): a row naming no object then reads as that summary (state: summary). -
keptsays the row still names a session’s object, ofobject_bytessealed. A row naming none is an ending alone, for one of four reasons its transcript’swhyand itsnot_continuablesay: its turn captured nothing (yet, while it runs); its newest capture was not kept and none before it was (or an end an earlier engine version recorded took the older one off the row); a run ran out of context in its session, which retired it; or the seat’s session budget (turn_engine.conversation_session.max_bytes_per_seat) released its object for newer ones, keeping how the turn ended. Only the budget releases a session its turn went on past, said with the newer captureunkeptnames. -
media_bytes: the sealed size of the large payloads (an image, a whole PDF the run read) a kept session stores apart from itsobject_bytesand splices back on every read, 0 where it keeps none. A payload several of the seat’s sessions hold is stored and counted against the seat’s budget once, and stated on each row that holds it. -
in_progress: the row names the session of a turn that has not ended, the newest its runs have kept (a job’s final capture while the turn goes on to its review or waits on a person’s answer, or one a loss left its box to take). Its run may have gone on past it, and its last call may have no result yet. A relaunch continues it only wherecontinuablesays so, since a relaunch continues the newest kept capture of the job it follows, and a live turn’s row often names an earlier job’s.falseon any other row, a live one naming no session yet included. -
in_progress_noteis the engine’s own sentence, the one a seat’s ownlist_sessionsandread_sessioncarry (A seat reads its own): “This turn has not ended: this is the newest session its runs have kept, captured at<captured_at>; its run may have gone on past it, and its last call may have no result yet.” Absent wherein_progressisfalse. -
kept_noteis the engine’s own sentence told every reader of an ended row whose session its turn went on past: forwent_on, that the session was taken while the turn still worked and what it did after is not in it; for alostturn, that the session may not hold the last of what it did. It carries the newer captureunkeptnames and why, redacted (that reason quotes what refused the capture, so a seat reads the note fenced). Absent on any other row; a row at its turn’slast_wordholds all the turn did, unless the turn was lost. -
trimmed_noteis the engine’s own sentence, the one a seat’s ownlist_sessionsandread_sessioncarry, told every reader of a row whose session was trimmed past the bound to what its harness’s resume loads: “The history before this session’s newest compaction was trimmed to keep it within the bound a kept session is held to: its transcript begins there.” Absent on any other row, and on one whose session is no longer kept. -
base_turnis the ended turn whose session this turn’s first launch was handed to continue: its conversation’s head as the dispatch read it (of the conversation’s ended turns whose rows still name a session, the one that read the conversation last), held on the log by the turn’sbegin. Absent where the read named none, that session had gone before thebeginlanded, or nobeginlanded. Whether a launch took it up is theexecutor_collectedrecords’brief(continued_conversation). -
continued_byis the launch the rest is about:relaunchwhile the turn is live and its run is neither over nor ending;next_turnonce it has ended, or its run is over or ending and its end is not on the log yet. For a turn of a schedule’s conversation (conversation_keyschedule/…) it isnext_fire, decided the same way and said in the schedule’s words. Absent for a turn that served no conversation, and on a transcript’s later page. -
continuablesays whether that launch would continue this session, decided by the one decision that launch takes, of the member of the seat’s executor chain it would be launched on now (the first not sitting out its plan).-
A relaunch: the turn live and not ending, the newest kept capture of the job a relaunch would follow (stating its save point, named by the row), and a runner that restores its harness, format and release (A relaunch continues the turn’s session).
-
The next turn: only the conversation’s head (of its ended turns whose rows still name a session, the one that read the conversation last, named by the same read’s snapshot) is continued, where that runner restores it (A conversation’s next turn continues its last turn’s session).
-
The member is the one the node holding the seat would pick, sitting its own spent plans out, off the chain of the revision the launch runs on: for a turn whose resumed segment is running, the revision it was admitted under; for a next turn, the revision live when it comes. The node answering asks it, once a page (a live turn’s session by its turn, a head by none), itself where it holds the seat.
-
continues_in:any_box, in whichever box the launch gets (a relaunch from the kept capture, in the box its job parked in where that capture was taken while the job still worked, from the copy that box holds; the next turn from the head, in a box of its own); orparked_box, a relaunch’s alone, where the kept capture is not continued but a person’s answer would carry the turn’s parked run on in the box it parked in (still held, ran the row’s own session there, runs that member’s harness in its cell, on the node host for a box on the engine host), nowhere else, while the box is held. A company withturn_engine.conversation_session.enabled: falsecontinues no kept capture: onlyparked_boxis said, and no next turn continues anything. -
not_continuable, in the engine’s own words, redacted, is why the launch would not continue it, why that cannot be said now, or, forparked_box, why no other box would. A row that is not its conversation’s head names the turn whose session the next turn is handed instead; one naming no session says which of the four reasons it is; a live turn with no session of its own says, where its row still holds the session its first launch was handed, that a relaunch in a box of its own continues that one. -
Decided as far as the engine can know before a box is chosen: whether the box can take the session up, is a box of its own, and whether the seat’s budget can carry it are the launch’s to find out.
-
false, with nocontinued_by, for a turn that served no conversation once it has ended or is ending. -
nullwhere it cannot be said now:- the turn’s run record, or its row read as a relaunch reads it, could not be read;
- the job a relaunch would follow is still working, or a claim on it has neither taken its final capture nor begun its turn; its capture is still being kept, or its record was sent and never answered. A relaunch asks the executor log again before deciding, continuing the capture where it landed, else the newest capture that job kept before it, until fourteen hours have passed since the capture’s object was minted on the reading node’s clock (the twelve a record may name it in, past which the executor log refuses the record on its own clock, and two for any two machines’ clock skew);
- a capture of an earlier job is still being kept while the turn has kept none of its own (once one lands a relaunch no longer continues the session the first launch was handed; beside a kept capture of the turn, an earlier job’s keep changes nothing and the row is decided);
- what the launch is launched on cannot be said (every member of the seat’s chain sitting out its plan, no node holding the seat, the node holding it not answering);
- only the resume of a collected job decides the relaunch, and its turn has not begun (a round lost a second time, or carried on in its box only where its sign-in was replaced);
- the turn’s run is over or ending and its end is not on the log yet, which
not_continuablethen says.
A resumed turn says, as it begins, whether it collects its job or carries the round on; from then on, its review included, the row is decided on that.
-
Reads per page: the coordination store once for its runs (a live turn’s record alone where the listing does not hold it, none where every row has ended); once more for the seat’s lease where a row asks the node holding the seat (a live row whose run is neither over nor ending, or a conversation’s head). Answered whether or not either answers. A live row is read again at
linearizableonly where the page was read below that and the row names another capture than its run’s record keeps, or the record keeps none. An ended row is decided on the page’s own snapshot, each head read in the same transaction as the rows.
-
-
Paged by where each row began, which nothing moves, so a page never skips or repeats a row captured again or ended between two reads.
next_cursoris absent on the last page.complete: falsesays the answering copy holds a record of the log it could not read, which may hold rows missing from the page.
A cursor that is not a page’s position (a positive whole number) is
400 bad_params; any other answers the rows begun before the position it names.
GET /agents/{id}/sessions/{turn_id}
Section titled “GET /agents/{id}/sessions/{turn_id}”One turn’s session and a page of its transcript, ?cursor= the
next_cursor an earlier page of it handed out. Also served as the
executor_session query, which takes {handle, turn_id, cursor}. The
first page (no cursor) says of its row which launch would continue the
session and whether, as a page of GET /agents/{id}/sessions says it, on the
head of its conversation the row’s own read names; a later page leaves
continuable null, saying it is the first page’s to say.
{ "handle": "swe", "session": { "turn_id": "…", "…": "the row as GET /agents/{id}/sessions sends it" }, "state": "read", "entries": [ { "kind": "brief", "at": "2026-10-30T12:00:00Z", "text": "Fix the flaky test in ENG-7.", "bytes": 28 }, { "kind": "tool_call", "at": "…", "tool": "Bash", "text": "{\"command\":\"go test ./cache/...\"}", "bytes": 33 }, { "kind": "tool_result", "at": "…", "tool": "Bash", "failed": true, "text": "FAIL cache_test.go:40 …", "bytes": 2201431, "cut": true }, { "kind": "note", "at": "…", "text": "## A note from ada, sent while this turn was running\n…", "bytes": 214 }, { "kind": "brief", "thread": "agent-a1", "text": "Look for the race.", "bytes": 18 } ], "from": 0, "cut": "entries", "next_cursor": "0193f0c3-0d5e-7a14-8b2f-61c9e2d0a7f3.2.200", "bounds": { "entries": 200, "bytes": 1048576, "entry_bytes": 16384, "read_lines": 1048576, "read_bytes": 268435456 }, "read_level": "stale", "position": { "stream": "CREWLET_EXECUTOR_LOG", "generation": 1, "seq": 48207 }, "complete": true}The archive is read as its harness recorded it, through the runner’s own
knowledge of the format it packs: Claude Code’s transcript and each subagent’s
own (its sidecar, every entry of which names the subagent in thread, after
the run’s own), and OpenCode’s session export, each message by the kind
OpenCode 2 gives it (its type). Each entry is one of:
kind | What it is |
|---|---|
brief | What the run was handed: the engine’s brief, a later launch’s on the same session, or — in a subagent’s thread — the brief the run’s own model wrote it |
note | A note a person sent the run while it worked, as its harness handed it to the model: the engine’s heading naming who sent it, then their words. Read wherever the harness filed it — OpenCode as a person’s message, Claude Code as a hook’s context in a record of its own — by the heading every note opens with, which starts its line or follows only the harness’s framing, so a tool’s words quoted on a line never head one; and the line the run’s own hook printed as it handed notes over, late calls beside them or not (the live output’s [steer] line), saying whose reached the run |
late_call | A call of this work that finished after the run that made it had stopped waiting for it (its harness gave up on it, or the run was cut off or replaced), as the engine handed it to the run while it worked: the engine’s heading, its words, the call’s outcome and the call. Read as a note is, by the heading the engine opens it with; and the line the run’s own hook printed as it handed over such calls and no note |
wake | A message somebody wrote about this work while the run worked, as the engine handed it to the run: the engine’s heading naming its writer, a line saying where it was written and whether it asks for an answer, then the writer’s words inside their fence, where a heading counts for nothing. Read as a note is, by the heading the engine opens it with; and the line the run’s own hook printed as it handed over such messages and no note |
model | What the model wrote |
tool_call | A tool the model called, its input as JSON, the tool in tool |
tool_result | What the tool answered, failed where the harness recorded an error |
summary | A compaction summary: the harness’s own account of the conversation before it, which the model read in its place |
unread | A part of the record the read could not read, said where it was so a gap never reads as continuity: a line that is no record, a line longer than the read reads of a harness (a Codex or Hermes line’s images aside), a record or a message of no shape the read knows, a Hermes message’s stored content of no shape the read knows, an OpenCode message of a kind the read does not know, a transcript that is no plain file in the archive (a link), a text whose redaction could not be read, a call’s result or a text joined from parts with a part written out of order past the value bound, a Qwen Code compaction’s summary past the value bound, a Qwen Code or Gemini CLI tool result past it whose error is no text or that names its output or error twice, a Codex tool result past it of no shape the read knows, a record past the lines and elements one read reads (bounds.read_lines) |
The harness’s bookkeeping (a session’s title, a snapshot of the files it
edited, its system notices), the model’s thinking and a tool result Claude Code
spilled to a file are no entry. Nor are the messages OpenCode writes for itself:
its notices in the person’s turn (a background job’s ending, a reminder, an
instruction file it loaded), an update of the run’s instructions, a skill or a
shell command a person ran in the session, the end of an execution, a switch of
the session’s agent, model or directory, and a compaction that handed the model
no summary. at is when the harness recorded the entry,
absent where its record says no time, or one outside the years 0 to 9999 —
all RFC 3339 can spell, and a box’s own agent can write any instant into what
its run packs.
Redacted at this read, whatever the capture did. Every entry’s text is
passed through the engine’s one redaction pass (redact.Secrets) before it is
cut, and is always an opening of what its whole text redacts to.
Everything that can reach the entry’s bound, and the longest a credential the
redaction knows can run past it (a private key’s block), is redacted inside as
much again, so a credential that begins inside the bound is recognised whole —
a key cut in half by a bound is one the redaction no longer recognises — and
nothing the read could not settle is handed out, however much the redaction
shrinks what comes before it (a key’s block becomes one short marker): a
credential that runs across the end of what can reach the bound is not handed
out at all, and the entry is cut where it begins. The rest of a long text is not
scanned only to be dropped.
Bounded, and the cut said. A page holds at most bounds.entries (200)
entries and bounds.bytes (1 MiB) of their text; an entry’s text is at most
bounds.entry_bytes (16 KiB), cut on a character and marked, with
cut: true. A row’s newest summary, read where its session is not kept
(state: summary), is cut from its end instead, where every summary
puts what to do next: its entry says tail: true, and its text is the
summary’s last part, marked at its start. Every entry’s text is redacted whole before it is cut, and its
bytes is always the size of what its whole text redacts to, the text it would
show whole. Never the size as recorded, which beside a text shown whole
says how long each value its redaction took out was. A line of the
record is read however long it runs: a value in it (a text, a name, a call’s
input) is held to 2 MiB and past it streamed through the redaction into its
entry, never held. One read frames at most bounds.read_lines (2^20) lines of
the record and the blocks and parts in them, and takes at most
bounds.read_bytes (256 MiB) of the archive as it inflates — and, apart, at
most as many bytes as a tar’s members hand out, which a sparse member can make
up without the archive holding them. cut is why the page ends before the
transcript does:
cut | Meaning |
|---|---|
| absent | The transcript ends on this page; next_cursor is absent |
entries, bytes | The page holds all it may; next_cursor is the cursor the rest is read from |
read | The read stopped where no later page can go further — the archive’s bytes run past bounds.read_bytes, or the record more lines and elements than bounds.read_lines. The entries shown are all that can be |
Every page is read again from the archive’s start, so a page costs what the
archive does rather than what is behind it. The cursor names the object it
was read from, and how this build counts a transcript’s entries: a live
turn’s session moves to a newer object with every capture, and a rolling
upgrade can answer one page on a build that counts entries otherwise, so a
cursor of an object the row has since replaced with a newer capture, or of
another count, is 400 bad_params — read the transcript again from its start —
rather than a page continued in another archive, or at an ordinal that names
another entry. The refusal says why in the row’s words: of a turn that has not
ended (in_progress), that its runs have kept its session again since the
cursor was handed out, which is true whichever capture moved it; of an ended
turn, that its session was captured again. A cursor of a row that names no
object any more is answered as
its first page would be, state: none with the engine’s sentence: the seat’s
session budget released the object, or the turn’s end did, its newest capture
not kept — each only of a turn that ended — and an ended turn is never captured
again.
Two transcripts at a time on each node. One read holds at most 32 MiB
measured, and of what
harnesses and ordinary tools write takes up to about 49 seconds for a person (58
for a seat’s words): one value of password: lines streamed through its
redaction to bounds.read_bytes, beside a second read. So a node decodes at
most two transcripts at once, 64 MiB live at their worst (96 MiB with the heap’s
room under the engine’s memory limit), whichever socket
question or REST request asks for them. A request past them waits for a slot,
its session’s object not yet opened, for as long as its caller waits, and a
slot frees within one such read, so an answer comes within 110 seconds (that
read with a tenth to spare, and one slot’s wait), which the dashboard waits;
nothing in the answer says it waited, and a caller that gives up first is
answered nothing. A value none writes at that density, a password’s value every
few bytes the whole budget long, takes 98 seconds or more and fails closed once
it runs past that wait: a socket question’s wait_ms ends its read, answered
nothing, and the
dashboard says the transcript could not be read in time. A seat reading its own
sessions waits two minutes, so its read of such a session, or one queued behind
other reads at their bounds, is answered unavailable.
An object that cannot be read is an answer, never a 500. The row is still
the turn’s account of how it ended, so state says why no entries are shown
and why says it in the engine’s own words — never in anything the archive
held:
state | Meaning |
|---|---|
read | The entries are the transcript’s |
none | The row names no object: its turn captured nothing (yet, while it runs), its newest capture was not kept, a run ran out of context in its session, which retired it, or the seat’s budget released it |
missing | The object store no longer holds the object, which the turn’s row, read again, still names |
unreadable | The object does not open: it is sealed under a keyring key this fleet no longer holds, or its bytes are not the ones sealed for this turn |
malformed | It opened, and is not an archive of its harness’s format, and why says which of six ways: it is not gzip-compressed, its compressed bytes are corrupt, it ends part way through, it holds no tar of its harness’s files, it holds no export document of its harness’s, or its bytes are not laid out as its format describes (a box’s own agent can rewrite what its run packs before a collection takes it) |
unsupported | It is of a harness or an archive format this build does not read |
summary | The row names no object, for a reason none lists, and keeps its session’s newest compaction summary apart (Code Sandbox): the entries are that summary alone, one summary entry, and why says why the session is not kept. A summary gone or not opening is none, its why saying so |
A store that did not answer is 503 unavailable with a Retry-After, and a
turn the seat keeps no row of is 404 not_found, saying how a row goes: its
turn recorded none, or its row went with the end of a later turn of its
conversation that was handed it, past the retention, or with the seat. Absent
on a node with no object store, where the rows are still listed.
A session released while it is read is said as released. Reading a
session holds nothing, so between the read of its row and the end of its
object’s stream a later turn’s end can absorb it, the seat’s budget release it,
the end of a turn that ran out of context in it retire it, the retention delete
it or its turn capture it again — and the collector take the object once no row
names it. Read alone, a collected object is missing,
and one taken while it streams one whose bytes do not open, so a read whose
object fails, as it opens or as it streams, reads the turn’s row once more, at
linearizable whatever the request asked, and answers what the row says now:
no row is 404 not_found, saying its row went while it was read and that
nothing more of it can be read; a row naming no object is state: none with
its reason and the same; and a row naming a newer capture is read from that
capture on a first page, and refuses a later page’s cursor as one captured
again (400 bad_params). read_level, position and session are then that
read’s. Only where the row still names the object is the failure the store’s or
the archive’s own — missing, unreadable, or 503 unavailable — and the row
is read again once, a newer capture that fails too said as it fails. A row that
cannot be read again leaves the failure unknown, a release as much as a loss,
and is 503 unavailable. A later page whose row went, or names no object,
before it is read is answered the same way; the pages already read stand as
they were.
Fleet, Executors & Schedules
Section titled “Fleet, Executors & Schedules”GET /mcp-servers
Section titled “GET /mcp-servers”Backs the Servers tab of Settings › MCP & tools: every MCP server, what the configuration declares for it, what each live node did with it, and the engine’s built-in tools.
It is everybody’s, in two readings, as GET /llm/entries is: a server’s condition and tools tell a member why an agent lacks one. A caller config.read admits (an administrator) reads the answer below whole, reading: "admin", as GET /config shows them the launch commands. Anybody else reads a member’s reading, reading: "member", which names no launch line, failure sentence or wait.
Off the status records, not a fan-out. Each node re-publishes its MCP servers on its status record within a renew period of a change. A child that died after it started counts as failed until the engine has brought it back; a shared server whose start failed counts as started once a retry brings it up. One row per server, instances counted (a per-seat template has one instance per seat that node holds). One read of the records, counted against the lease table’s presence, is every node’s answer. A live node with no record counted at its presence’s epoch (just started, or back at a new epoch and not yet written) is reported: false and its cells are UNKNOWN, never zeros, which would read as “started nothing”. A node that reports and started nothing is reported: true with no rows.
servers lists every server this node’s configuration declares, then any a node reports that the configuration does not carry (configured: false: a node on an older revision mid-rollout).
- The launch is the non-credential parts:
transport,command,args,url;envandheadersare never here. enabledis whether the configuration runs the server at all (mcp_servers[].enabled, true on a server it does not carry).descriptionis what the configuration says the server is for, the line each agent’s prompt lists beside its name (""when it says nothing).title,catalogueandvendorare what the curated catalogue recognises the server as, by address or command: the entry’s title, its key and the vendor mark the dashboard draws. An unknown server is titled by its name, withcatalogueandvendorempty.started,failedandwaitingare summed over the nodes,toolsis the most one started instance serves, andstateis decided here so no screen re-derives it.
waiting counts a seat’s instances held back, unstarted, for a credential a provisioning pass mints for that seat and has not sealed yet, where nothing that pass last reported says it cannot. They are neither started nor failed, since nothing is wrong; each starts once the seal reaches its node. So does an instance whose token the engine issues at use while its integration is still settling it (a grant the vendor is still applying): nothing is sealed, so its node asks again on the restart schedule (15 seconds, doubling to 5 minutes) and starts it once issued. One whose pass reports that a person must act first (its own credential missing or refused, an approval outstanding, the seat’s account failed or switched off, or the integration disconnected) counts as failed, judged again at every pass of the node’s status record, since a wait with no end is a failure somebody must act on.
state | Means |
|---|---|
disabled | The configuration turns the server off (enabled: false): nothing is started and no seat is granted it. Decided before anything a node reports, so a node on an earlier revision that runs it shows only in its own cell until it applies this one |
needs_sign_in | The server is signed in to with OAuth and nobody holds a grant for it, its vendor refused to renew the grant or let it run out, or nothing serves it and the nodes hold it back for a sign-in (its grant was made for an address the server is no longer configured at). Nothing is started until somebody signs in. Decided next, before the other counts |
running | Every instance any node launched is serving: started, listed its tools and was up when its node last wrote its record |
partial | Some are serving and some are not: a node’s environment, one seat’s credentials, or one child that died and is being restarted, rather than the server |
failing | Something failed and nothing is serving: instances were launched and none serves (the server, its command or address, or credentials every seat shares), every instance went down and is being restarted, or the server was held back, unlaunched, for a value that resolves to nothing (a shared server’s own, or one every seat’s instance lacks) |
waiting | Nothing was launched and nothing failed, and some seat’s instance waits for its provisioned credential. Only where nothing else decides: a server serving one seat while another waits is running, and a failure beside a wait is partial or failing |
not_started | Every reporting node started nothing for it: a per-seat template granted to no seat a live node holds |
unreported | No live node has a status record counted |
error is one failed instance’s reason, cut to 512 bytes on the status record, and error_seat the seat it was launched for (none for a shared server). It is the instance down longest on that node, so error, error_seat, error_class and down_since are one instance’s facts (ties go to the lower seat id). The whole text is in the node’s log: mcp_server_failed for a start that failed; mcp_server_credential_missing for an instance held back, unlaunched, because a value it is started with resolves to nothing and nothing mints it, or the minting integration cannot mint until a person acts (from the node’s last pass over the seat; the status record re-judges it against the integration’s latest report); mcp_server_credential_unsure for one held because what that integration last reported cannot say whether it holds the seat up (Tools and MCP); server_exited or server_restart_failed for an instance that went down after it started. wait is one waiting instance’s sentence (the variables it waits for and the integration minting them), bounded the same way, and wait_seat its seat: the instance waiting longest on that node; the node’s mcp_server_awaiting_credential line carries it.
error_class is why that instance failed, in the classes a person tells apart by what fixes them (Tools and MCP › Why a server failed), or "" where none fits. down_since is when the longest-failed instance on the node stopped serving, or first failed to start, the same instant across the retries of one outage (null when none has failed). restarts is how many times the node brought the server’s instances back since each was started from its spec, summed: a count that climbs while the server stays up is a server that flaps.
The url is answered with credentials withheld. These read redacted: the value of any query parameter whose name marks a credential (key, token, secret, sig, pass, auth, session, credential and the like, any case) or whose value has a known credential’s shape; a path segment of a known credential’s shape; a fragment’s credential (#access_token=...); a user name in the address. Scheme, host and port stay readable, and an address with nothing to withhold is answered as written.
unlisted_annotations are the entry’s tool_annotations keys that no instance started on a reporting node lists a tool for (by the server’s own name or with the entry’s tool_prefix), sorted: each overrides nothing anywhere it runs, a misspelling or a tool the server no longer serves. A key only SOME instances lack is not here, because a per-seat child serves what its seat’s credentials reach (an mcp-atlassian child for a seat holding only a Jira credential lists no Confluence tool). Each node publishes the keys none of its own started instances lists, whole and as many as its 16 KiB status row holds (the first by sort), counting the rest, and the answer keeps those every such node names: past a node’s cut it can miss a key but never names one an instance lists. unlisted_annotations_count is the list’s length where every node’s list was whole, and where one was cut the most keys the list may stand for (the fewest a started node counts), so a count above the list’s length says a node’s list was cut and the list may miss keys; with no instance started the list is empty and the count 0. Each instance’s own keys are on its tools_discovered log line (annotation_keys_unlisted).
refused_tools are the server’s tools not offered for their name, and shadowed_tools the ones another server’s tool of the same name is offered in place of (Naming a server and its tools). Each is {tool, reason, message} or {tool, by, message}:
toolis the name it would be filed under (the server’stool_prefixand its own name).reasonischaracters,too_longorbuiltin.byis the configured name of the server whose tool is offered instead.messageis the engine’s sentence saying why and what would offer it (a shortertool_prefix, one where two servers share a name), which a screen shows as written.
Each tool is listed once across the fleet, sorted, every one any node named. A node names at most 8 of each on its status record, so refused_count and shadowed_count say how many there are, as the node counting the most counts them, never fewer than listed. Both lists are always present, empty where every tool is offered. The node’s log names each too (mcp_tool_refused, tool_name_collision).
{ "reading": "admin", "nodes": [{"id": "node-1", "reported": true}, {"id": "node-2", "reported": true}], "servers": [ {"name": "github", "title": "GitHub", "catalogue": "github", "vendor": "github", "configured": true, "shared": false, "transport": "http", "command": "", "args": [], "url": "https://api.githubcopilot.com/mcp/", "state": "partial", "started": 3, "failed": 1, "waiting": 0, "tools": 26, "unlisted_annotations": [], "unlisted_annotations_count": 0, "refused_tools": [ {"tool": "gh_add_pull_request_review_comment_to_pending_review", "reason": "too_long", "message": "\"gh_add_pull_request_review_comment_to_pending_review\" is not offered: it is 52 characters, and 50 fit beside the longest prefix a harness gives the engine's tools. Shorten the tool_prefix \"gh_\" by 2 to offer it"} ], "refused_count": 1, "shadowed_tools": [], "shadowed_count": 0, "nodes": [ {"node": "node-1", "reported": true, "started": 2, "failed": 0, "waiting": 0, "tools": 26, "error": "", "error_seat": "", "wait": "", "wait_seat": "", "error_class": "", "down_since": null, "restarts": 0}, {"node": "node-2", "reported": true, "started": 1, "failed": 1, "waiting": 0, "tools": 26, "error": "401 Bad credentials", "error_seat": "backend-dev", "wait": "", "wait_seat": "", "error_class": "credential_rejected", "down_since": "2026-11-01T08:52:10Z", "restarts": 4} ]} ], "alarms": [ {"kind": "mcp_server_partial", "title": "A tool server is down for some agents", "person": "…", "detail": "1 of 4 instances of github is not serving, and one has been down for 7m 50s (backend-dev's, on node-2, credential_rejected): 401 Bad credentials", "remedy": "The agents and nodes whose instance serves are not affected. …", "entries": [ {"key": "github", "detail": "1 of 4 instances of github is not serving, and one has been down for 7m 50s (backend-dev's, on node-2, credential_rejected): 401 Bad credentials", "since": "2026-11-01T08:52:10Z", "seat": "backend-dev", "fix": {"kind": "restart", "server": "github", "seat": "backend-dev"}} ]} ], "approvals": [ {"id": "0190f3a8-6b1c-7d2e-9f00-1a2b3c4d5e6f", "at": "2026-11-01T09:02:11Z", "server": "github", "tool": "gh_merge_pull_request", "raw": "merge_pull_request", "digest": "sha256:9c1f…", "seat": "backend-dev", "turn_id": "…", "launch_id": "…", "item": "ENG-42", "args": {"owner": "acme", "repo": "web", "pullNumber": 71}, "status": "waiting", "answer": "", "answered_by": "", "answered_at": null} ], "builtin": [ {"key": "work", "label": "Work items", "description": "Worklet, the company's tracker: read, file, discuss and move work.", "tools": [ {"name": "list_work_items", "description": "…", "source": "builtin", "annotations": {"read_only": "yes", "destructive": "unknown", "idempotent": "yes", "open_world": "unknown"}, "risk": "read_only", "risk_declared": true, "external": true, "delivers": "", "input_schema": {"type": "object", "properties": {"…": {}}}, "group": "work", "gate": "worklet"} ]} ], "agents": [ {"seat": "backend-dev", "name": "Backend Dev", "unit": "Engineering", "unit_key": "eng", "servers": [ {"server": "github", "reason": "integration", "tools": 26, "state": "partial"}, {"server": "linear", "reason": "unit", "tools": 31, "state": "running"} ], "mcp_tools": 57, "builtin_tools": 34, "over_budget": false} ], "tool_budget": 100}builtin is the engine’s own tools as the company’s agents are offered them (each agent all but those its builtin_tools below leaves out), group by group in the catalogue’s order, each tool a catalogue row whose gate says who may call it (Groups, and who may call each one). It is the built-ins of the registry this node applied, which every node applies alike, plus list_mcp_server_tools and activate_tool, which the engine hands the onboarding pass and a worker and no registry holds. A group the company offers nothing of is left out (a company on Jira gets no work group, one on Slack no chat group). A node with no active revision sends an empty list.
alarms, in an administrator’s reading only, are the MCP alarms standing on the answering node’s latest evaluation, in the table’s order: the evaluation its health count, crewlet.alarm.active gauge and alarm log lines were told, so they never disagree. Each is the table’s kind, its title and person for a company owner, the longest-standing server’s detail, the remedy, and entries, one per server it stands on in name order: key (the server), that server’s own detail, since (when the instance down longest went down, or the wait held longest began; null for a refused name, which carries no instant), seat (the agent whose instance the detail names, "" for a shared server’s), and fix, the one gesture that fixes it, decided by the engine:
fix.kind | For | Acts on |
|---|---|---|
restart | mcp_server_failing and mcp_server_partial | POST /mcp-servers/{name}/retry on fix.server, with fix.seat where it names one agent’s instance. A server nothing serves is restarted whole; a partial one only for the agent whose instance is down, so the agents it serves keep their sessions (a shared server’s instance restarts on every node) |
integration | mcp_server_waiting_long | The integration that mints fix.seat’s credential for fix.server, which the server’s detail names in resolved.binding |
edit | mcp_tools_refused | The server’s configuration: a shorter tool_prefix, or one, as each name’s message in refused_tools says |
sign_in | mcp_oauth_needs_sign_in and mcp_oauth_expiring | Signing the company in to fix.server again: POST /mcp-servers/{name}/oauth |
approve | mcp_approval_waiting | The calls fix.seat’s run holds for approval on fix.server, each answered with POST /mcp-approvals/{id} by its id in approvals |
review | mcp_tools_changed | The changes in fix.server’s detail changes, each accepted or kept blocked with POST /mcp-servers/{name}/changes |
The list is always present, and empty on a node that runs no state log, whose own table judges no MCP alarm: ask a data node.
oauth, on each server row of an administrator’s reading, is the server’s OAuth sign-in, null for a server not signed in to with OAuth. It is the grant’s public half, never a token or the client’s secret:
{"grant": "authorization_code", "status": "connected", "client": "dcr", "client_id": "registered-client-id", "issuer": "https://auth.example.com", "resource": "https://mcp.example.com/mcp", "scopes": ["read", "offline_access"], "connected_by": "jane.doe", "connected_at": "2026-11-01T09:00:00Z", "expires_at": "2027-01-30T09:00:00Z", "failure": null}grant is authorization_code (a person signs the company in) or client_credentials (the engine signs in as the company’s service identity). A service identity is always connected, with client "" (it registers nothing), the configured client_id and scopes, and issuer, resource, connected_by, connected_at, expires_at and failure empty: nobody signs in to it, and a credential its vendor refuses fails the server’s instances (the row’s state), never asks for a sign-in.
status is connected (the engine renews it as the server is used), needs_sign_in (nobody has signed in: client_id is then the company’s own client’s, or "", and the scopes are the ones the configuration asks for), expired (past the end its vendor stated) or refresh_failed (its vendor refused to renew it, failure carrying {said, at} in the vendor’s words, bounded and redacted). expires_at is null where the vendor stated no end. resource is the server address the grant was issued for (RFC 8707), the only one its tokens are sent to.
callback_url and client_metadata_url, on the answer itself, are the two addresses a vendor that allowlists them is given: where it sends a person back after a sign-in, and the engine’s client metadata document (the client id a cimd sign-in is made as). Each is "" on an engine with no public address. A member’s reading carries neither, and no oauth; it carries the state.
approvals, in an administrator’s reading only, are the calls agents’ runs hold for a person’s approval (Asking a person before a tool runs), the longest waiting first: each while its run is parked on it (status: "waiting"), and once an answer is recorded until the run carries on to its next job ("answered", with the answer (once, always or deny), answered_by and answered_at, as the answer’s seal opens on this node). id is what the call is answered by; tool is the tool as the run called it and raw the server’s own name for it, which Always allow sets the level of; digest names the definition the run was offered; item is the key of the work item the run was on, or null. args are what the call would send, opened from their seal under this node’s fleet keyring, null where they do not open here: as sent while the call waits on an answer the reader may give, redacted otherwise (Asking a person before a tool runs). A member’s reading carries no approvals. Always present.
agents, in an administrator’s reading only, is every agent seat in the chart’s order with the MCP tools its grants hand it, and tool_budget the count past which an agent is flagged: 100, the engine’s own, which no setting moves (Each agent’s tools, and the budget).
unitandunit_keyare the name and key of the seat’s unit, bothnullfor a seat at the root of the chart.serversis every server the configuration declares whose grant reaches the seat, on or off, in name order.reasonis why, as the server’sreachessays it (every_agent,unit,seatorintegration).toolsis how many tools it offers the agent: every tool the live nodes’ listings name at a level other thanblocked(a tool refused its name is never listed), except a tool the agent’s own limits block; the whole listing for each agent a per-agent server reaches;0for a server turned off (granted to nobody) or one a limit turns off for the agent.stateis the server’s own, its row’s.mcp_toolscounts each tool name once, even when two of the agent’s servers list it.builtin_toolsis how many tools inbuiltinthe agent is offered; the budget does not count them. It is every one but those the engine leaves off: a tool whosegateis a grant the agent does not hold (health_tools,ssh_read,ssh_operate,delegated_decisions, orgrowth_read,growth_operateorgrowth_administerat the tool’s growth product), and belowfull_accessthe code writes itsrole.code.accesscould never use (Groups, and who may call each one). So it differs per agent.over_budgetismcp_toolsabovetool_budget. A server’s tools count while it is down, since they come back with it.agentsisnullwhile the answering node has not read the fleet’s listings yet, a moment after it starts; that is not an agent holding no tools.
To add a server, PUT /config/mcp-servers/{name} with If-None-Match: *, see Per-entity read and write. A service identity (oauth.grant: client_credentials) written with no oauth.client_secret is written reading ${MCP_<SERVER>_OAUTH_CLIENT_SECRET}, where storing its secret puts it, on an add and on a replacement alike.
GET /mcp-catalogue
Section titled “GET /mcp-catalogue”What a server is added from, for the add flow of Settings › MCP & tools. It is decided by tools.read, so it is everybody’s, in two readings. A caller config.read admits reads the answer below, reading: "admin": the registry the company’s configuration names, searched for q. Anybody else reads {"reading": "member", "curated": [...]}, the curated half alone whatever q says: the registry is an address an administrator chose (possibly on the company’s own network), a search is a request the engine makes to it, and searching is part of adding a server. A plain read, not a question: nothing in it is live, so the
socket does not carry it. It sits outside /mcp-servers/, whose next segment is always a server’s name, so a server may be called catalogue and still have its own detail.
curated is the curated catalogue whole, in its order, whatever q says: a table compiled into the engine and reviewed in pull requests, so it answers the same on a node with no egress. Each entry is a vendor’s server as its own page described it on read_at; a local server launched through a package runner names the package it fetches at the exact release its facts were read against. The engine also recognises a configured server by it.
community is empty unless q is given and the company names a registry (mcp_registry.url), and then holds what that registry answered for q: the newest version of each server whose name holds q, at most 20, in the registry’s order. The registry speaks the MCP Registry v0.1 API. Every listing is community: true and a draft for the same add flow an address typed by hand goes through: no read_at, integration, prerequisite or fixed value, and its vendor is set only when its remote address is a host the curated catalogue recognises. A listing is offered with a Streamable HTTP remote at a fixed https address, or else an npm or PyPI package from the public registry at an exact release, launched as npx -y <package>@<release> or uvx <package>==<release>. A listing the engine cannot read whole (a field past its bound, a direction override in its text, a templated address, a runner argument, a package from another registry, a deprecated or deleted listing) is left out and counted in left_out. The engine dials the registry alone, never anything a listing names, and follows no redirect.
registry is the address the company names, or "". reason says why a search found nothing to offer: the company names no registry, or the registry could not be reached, refused, or answered something that is not the v0.1 server list. A failed search is that reason beside the curated half, never an error in its place; only q itself (empty after trimming, over 200 characters, or holding a control character) is refused, as bad_params.
{ "reading": "admin", "curated": [ {"id": "linear", "name": "linear", "title": "Linear", "vendor": "linear", "description": "Issues, projects, cycles and documents.", "transport": "http", "url": "https://mcp.linear.app/mcp", "command": "", "args": [], "headers": [{"name": "Authorization", "description": "A Linear API key.", "required": true, "secret": true, "value": "", "format": "Bearer <API key>", "from_integration": false}], "env": [], "tool_prefix": "", "tool_annotations": {}, "auth": ["oauth", "headers"], "oauth_client": "cimd", "integration": "", "prerequisite": "", "docs": "https://linear.app/docs/mcp", "read_at": "2026-11-01", "package": "", "release": "", "community": false, "publisher": "", "version": "", "updated_at": null} ], "community": [ {"id": "com.example/weather", "name": "weather", "title": "Weather", "vendor": "", "description": "Forecasts and alerts for a place.", "transport": "http", "url": "https://mcp.weather.example.com/mcp", "command": "", "args": [], "headers": [{"name": "X-API-Key", "description": "Your API key.", "required": true, "secret": true, "value": "", "format": "", "from_integration": false}], "env": [], "tool_prefix": "", "tool_annotations": {}, "auth": ["headers"], "oauth_client": "", "integration": "", "prerequisite": "", "docs": "https://weather.example.com/docs/mcp", "read_at": "", "package": "", "release": "", "community": true, "publisher": "com.example", "version": "2.1.0", "updated_at": "2026-10-27T08:00:00Z"} ], "registry": "https://registry.modelcontextprotocol.io", "reason": "", "left_out": 1}GET /mcp-servers/{name}
Section titled “GET /mcp-servers/{name}”One MCP server, whole, for its page under Settings › MCP & tools. Decided by tools.read, so it is everybody’s, in the two readings GET /mcp-servers answers: a caller config.read admits reads the answer below, reading: "admin"; anybody else gets a member’s reading.
What the fleet lists, not what this node runs. A per-agent server runs only on the nodes holding its seats, so the answer is the union of the live nodes’ listings (Tools and MCP › What every server lists). A node’s listing counts only while it holds its presence at the epoch it wrote it under, so a drained, dead or restarted node stops counting at once.
-
serveris the server’s row exactly asGET /mcp-serversanswers it;nodesthe live nodes its cells are drawn against. -
listedis each live node’s listing: when it last changed (at), how many instances it is the union of, and how many tools it counts. -
toolsis every tool a live node lists, by name, each once:nameas offered (tool_prefixapplied),rawas the server names it,title,description(the server’s words, cut to 1,024 bytes).annotationswith the company’s overrides applied, as words (yes,no,unknown), and the engine’s one reading of them:risk(read_only,additiveordestructive; a tool declaring nothing isdestructivewithrisk_declared: false) andexternal(whether a call may reach past the company; true unless the tool says not).digestnames the definition shown (the one most instances list);definitionscounts the different definitions the fleet lists under the name (more than one mid-upgrade).instancesandnodesare summed across the fleet.input_schemaandoutput_schemaare the definition’s schemas, ornullwhere none is kept: no output schema published, schemas past 64 KiB, or a tool past its listing’s 1 MiB of schemas (kept in name order).levelis the level the tool runs at, decided by the server’s entry byraw(tools.levels, elsetools.default, else the level its hints start it at):allow,approve(offered, each call held for a person’s answer) orblocked(listed here, offered to no agent; Tools and MCP › Setting each tool’s level). For a server the configuration does not declare,levelsays what the nodes did.customis whethertools.levelsnames it.heldis a tool its level would run unasked whose definition changed since that level was decided, or that the server added after its first listing: itslevelanswersapprove, and each call asks a person until somebody accepts the change (changes).removedis a tool the server no longer lists, kept, named by the definition accepted for it, with no instances or nodes, until somebody accepts that it went.
-
baselineis the level of every tooltools.levelsdoes not name: the entry’stools.default, ornullwhere it sets none, leaving each at the level its hints start it at (allowwhereriskisread_only, elseapprove).auto_accept_changesis the entry’stools.auto_accept_changes: each change is accepted as it is listed rather than held for review (Tools and MCP › Accepting a server’s changes automatically);falsefor a server the configuration does not declare.unlisted_levelsare the toolstools.levelsnames that no live node lists, sorted: a level that decides nothing, most often a name written with thetool_prefixor spelled otherwise than the server spells it. Empty where the listings cannot say (no live node lists the server). -
changesis every change the server made to its tools since their levels were decided (Tools and MCP › When a server changes a tool), bytool(the server’s own name), then by definition: one per tool listed under a definition nobody accepted (two nodes listing two such definitions make two changes), and one per accepted tool no live node lists, judged only where every live listing is whole. Empty for a server whose first listing is not accepted yet. The administrator’s reading only.kindsisaddedorremovedalone, or the parts that moved:title,description,schema,annotations.beforeis the definition accepted (nullfor an added tool),afterthe one listed now (nullfor a removed tool), each{digest, whole, title, hints_title, description, annotations, risk, risk_declared, external, input_schema, output_schema}read off the declared hints;beforeaddsaccepted_by(nullfor the server’s first listing),accepted_at,first_listingandauto_accepted(accepted as listed undertools.auto_accept_changes,accepted_bynaming the node);afteraddsinstances.wholeis a definition read from the record the fleet keeps under its digest, words and schemas whole:titleis the tool’s own title,hints_titlethe one its hints carry. Wherewholeisfalsethe fleet keeps no record,titleanddescriptionare the words a listing keeps (a description’s first KiB) andhints_titleis"".unshownnames each part inkindsthe answer cannot show: a part either side has no record for, or whose two sides read alike (say it changed and is not shown, never that nothing changed). Always a list.loosenedis a change whose hints claim less risk than the accepted ones;heldwhether it holds the tool at Needs approval now;seen_atwhen the fleet first stored the definition listed now (nullfor a removal, or a definition with no record).
-
server_info(name,title,version,protocol) andinstructionsare what the server said of itself in its handshake, from the listing that changed last;nulland""where no live node’s listing carries them. Both are the server’s own words, bounded. -
dependantsis what removing the server takes with it, exactly as a dry run ofDELETE /config/mcp-servers/{name}answers: themcp_envblocks and box entries it clears, and the stored values nothing reads once it is gone. Empty lists for a server the configuration does not declare. -
instancesis every instance of the server, read from the nodes holding them when you ask (Tools and MCP › A server’s health): each node whose status record reports one, and each live node with no record counted, is asked over the broker within two seconds. A node answers at most 200 instances of a server. Each instance has:seat(""for a shared server’s one instance),node,state(running,failedorwaiting),since(when that state began: its session’s start, when it stopped serving or first failed, or when first held back),restarts,tools.failure(why a failed instance is not serving:{class, said, at, node, seat},nullotherwise),wait(what a waiting one waits for),last_failure(its latest failure, kept after it came back),last_answer(when it last answered: a start that listed its tools, or a tool call that came back).- Every
saidis the engine’s sentence carrying what a server or its process said: redacted, cut to 512 bytes, somebody else’s text.
-
instance_nodesnames each node asked: whether itanswered, thereasonit is named for where it did not, andcount, how many instances it holds, never fewer than it listed. A node that did not answer is never read as one holding nothing. -
last_successandlast_failureare the latest answer and failure across the instances read,nullwhere none. -
last_checkis the server’s latest test (below), whoever asked through whichever node:at,by, theseatit was made for (""for a shared server),ok, andnodes, each as a test answers it but without its tools.nullwhere never tested. An administrator’s reading only. -
valuesis every header (remote server) or variable (local one) the server is sent, and the secret of the OAuth client it signs in with, by name and never by value. An administrator’s reading only. WhatPUT /mcp-servers/{name}/values/{key}stores. Each has:keyas the document spells it (oauth.client_secretfor the client’s secret);as(header,env, oroauthfor the client’s secret, which goes to the authorization server alone).variable, the one variable it reads (""for a value written in the document, one reading several, or a key an integration binds per agent).set: whether the secret store holds every variable it reads (a literal is set; a key bound per agent is never set at the server’s level).stored_atandstored_byfrom the variable’s row (nullwhere the store holds none);optional(optional_keysnames it);bound_by, the integration that hands each agent its own value under the key,nullfor one the document sets.
-
reachesis every agent seat the server’s grant reaches, in the chart’s order, each{seat, reason, via}; the grant itself, whether or not the server is on (a server turned off reaches these seats again once turned back on). Empty for a server the configuration does not declare (Tools and MCP › Choosing which agents get a server).reasonis:every_agent: the entry has noaccess.unit: a unitaccess.unitsnames holds it;viais that unit’s key, the nearest one named.seat:access.seatsnames it.integration: the server reads each agent’s own vendor credential and the seat is on at its lane;viais the lane.
viaisnullfor the other two. Each also carrieslimited, what the seat’s ownmcp_limitsand every enclosing unit’s hold the server to,nullwhere none does:{off, off_by, tools}.offis whether a limit turns the server off for the seat (its grant stands);off_bythe key of the unit whose limit does (nullfor the seat’s own, or where none does);toolsevery tool a limit holds back, sorted, as{tool, level, by}: the server’s own name,approveorblocked, and the unit whose limit holds it (nullfor the seat’s own). The tool runs at the stricter of that level and its own (Tools and MCP › Narrowing a server for a team). An administrator’s reading only. -
resolvedis what the engine decides from the configuration, so a screen never re-derives it;nullfor a server the configuration does not declare:auth:integration(a per-agent server reading each agent’s own credential from one of the company’s integrations),headers(the engine sends values the configuration sets, HTTP headers or a local server’s environment) ornone.runs_on:engine_hostfor a local server,""for a remote one.timeouts:startup_secondsandrequest_secondsin force (the engine’s 120 and 300 where the configuration sets none) and whether each is the default.binding: the integration a per-agent server reads: itsvendor,by(declaredinseat_credentialsorrecognisedfrom its address or command), and thekeysit is started with,{field, key}by name;nullfor none.box_seats: the seats whose executor box is given the server throughsandbox.mcp.servers, each with thecellits box runs in. A seat the server is not granted to is not one, nor is any seat while the server holds a tool back at a level other thanallow.warnings: placements expected to fail,{seat, message}: a local server given to acontainerbox, whose image or a setup step must provide its command.
-
usageis the server’s calls per tool over the last seven company days, today included (since,until,days), every data node’s, from the replicatedusagedomain (Tools and MCP › How a server is used). A call counts on the day its turn ended.toolshas one row per tool called in the range:toolas offered (atools[].name);calls; each call in exactly one outcome,failed(the server answered with a failure),unavailable(the server was not running) orrefused(the engine refused it before it ran), the rest answered;total_ms, how long the calls that ran took between them;last_at, the newest call that ran (nullwhen none did);seats, the handles of the seats that made them.elidedcounts the entries the per-seat-day cap of 512 tools dropped in the range, on any server: zero says every count is whole.
-
callsis the server’s newest calls in the same days, at most 50, newest first, read out of the phase records on every data node:calls[]each{at, seat, turn_id, tool, outcome, refusal, duration_ms}.outcomeisanswered,failed,unavailableorrefused;refusalthe class of a failure the engine classified (""otherwise);duration_msnullfor a call nothing timed.coveragesays which data nodes answered (coverage).
Never a credential: no env, no headers, no seat’s mcp_env value, and no call’s arguments or result, which stay on the turn for whoever may read the seat’s trail. A server no node configures, reports or lists is 404 not_found. A node that has not yet read the fleet’s listings, or could not read its store, answers 503 unavailable with Retry-After: 15, never a server that lists nothing.
{ "reading": "admin", "server": {"name": "github", "title": "GitHub", "catalogue": "github", "vendor": "github", "configured": true, "shared": false, "enabled": true, "description": "", "transport": "stdio", "command": "github-mcp-server", "args": ["stdio"], "url": "", "state": "running", "started": 3, "failed": 0, "waiting": 0, "tools": 42, "unlisted_annotations": [], "unlisted_annotations_count": 0, "refused_tools": [], "refused_count": 0, "shadowed_tools": [], "shadowed_count": 0, "nodes": [{"node": "node-a", "reported": true, "started": 2, "failed": 0, "waiting": 0, "tools": 42, "error": "", "error_seat": "", "wait": "", "wait_seat": ""}]}, "nodes": [{"id": "node-a", "reported": true}], "listed": [{"node": "node-a", "at": "2026-11-01T09:00:00Z", "instances": 2, "tools": 42}], "tools": [ {"name": "get_issue", "raw": "get_issue", "title": "Get issue", "description": "Get details of a specific issue in a GitHub repository.", "annotations": {"read_only": "yes", "destructive": "no", "idempotent": "unknown", "open_world": "yes"}, "risk": "read_only", "risk_declared": true, "external": true, "digest": "5f0c9e3b2a8d4f7c1e6b9a2d3c4f5e6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e", "definitions": 1, "instances": 2, "nodes": ["node-a"], "input_schema": {"type": "object", "properties": {"owner": {"type": "string"}, "repo": {"type": "string"}, "issue_number": {"type": "number"}}, "required": ["owner", "repo", "issue_number"]}, "output_schema": null} ], "server_info": {"name": "github-mcp-server", "version": "0.31.0", "protocol": "2025-06-18"}, "instructions": "", "dependants": {"mcp_env": [], "sandbox": [], "mcp_limits": [], "secrets": []}, "instances": [ {"seat": "backend-dev", "node": "node-a", "state": "running", "since": "2026-11-01T08:40:00Z", "restarts": 1, "tools": 42, "failure": null, "wait": "", "last_failure": {"class": "exited", "said": "its process exited (exit status 1)", "at": "2026-11-01T08:39:58Z", "node": "node-a", "seat": "backend-dev"}, "last_answer": "2026-11-01T09:02:11Z"} ], "instance_nodes": [{"node": "node-a", "answered": true, "reason": "", "count": 1}], "last_success": "2026-11-01T09:02:11Z", "last_failure": {"class": "exited", "said": "its process exited (exit status 1)", "at": "2026-11-01T08:39:58Z", "node": "node-a", "seat": "backend-dev"}, "resolved": {"auth": "integration", "runs_on": "engine_host", "timeouts": {"startup_seconds": 120, "request_seconds": 300, "startup_default": true, "request_default": true}, "binding": {"vendor": "github", "by": "recognised", "keys": [{"field": "TOKEN", "key": "GITHUB_PERSONAL_ACCESS_TOKEN"}]}, "box_seats": [{"seat": "backend-dev", "cell": "container"}], "warnings": [{"seat": "backend-dev", "message": "seat backend-dev's executor runs in a container box, which starts this server's command from its own image: the image, or a setup step, must provide github-mcp-server"}]}, "usage": {"since": "2026-10-26", "until": "2026-11-01", "days": 7, "elided": 0, "tools": [{"tool": "get_issue", "calls": 41, "failed": 2, "unavailable": 1, "refused": 0, "total_ms": 23800, "last_at": "2026-11-01T08:58:12Z", "seats": ["backend-dev", "pm"]}]}, "calls": {"calls": [{"at": "2026-11-01T08:58:12Z", "seat": "backend-dev", "turn_id": "6c1f0e2a-5b7d-4e8f-9a1b-2c3d4e5f6a7b", "tool": "get_issue", "outcome": "answered", "refusal": "", "duration_ms": 412}], "coverage": {"nodes": [{"id": "node-a", "answered": true}], "complete": true}}, "reaches": [{"seat": "backend-dev", "reason": "integration", "via": "github", "limited": {"off": false, "off_by": null, "tools": [{"tool": "delete_issue", "level": "blocked", "by": "eng"}]}}, {"seat": "pm", "reason": "integration", "via": "github", "limited": null}]}A member’s reading of MCP & tools
Section titled “A member’s reading of MCP & tools”GET /mcp-servers, GET /mcp-servers/{name} and GET /mcp-catalogue answer anybody config.read does not admit in a member’s reading, reading: "member": each server’s condition and its tools, and nothing that names a launch line, a header, a variable, an account or a call. It is built from types of its own, copied field by field, so a field added to the administrator’s answer reaches no member until added here too.
A server’s row carries name, title, catalogue, vendor, configured, shared, enabled, description, transport, state, started, failed, waiting, tools, refused_tools, refused_count, shadowed_tools, shadowed_count and nodes, each node’s cell its counts, error_class, down_since and restarts. It leaves out command, args and url, each cell’s error and wait sentences and the seats they name, and unlisted_annotations with its count (about a configuration only an administrator reads). The list’s nodes and builtin are as an administrator reads them. It has no alarms (their detail quotes failure or wait sentences) and no agents or tool_budget (which servers an agent holds is read off the configuration’s grants, as a seat’s tool_sources on the org chart is, which no other reader gets either).
A server’s detail carries server (the row above), nodes, listed, tools (every field, held and removed included), server_info, last_success and:
instances, each without itswait(the variables a waiting instance waits for), and eachfailureandlast_failureas{class, at, node, seat}, withoutsaid: what a server or its process said can name an address or an account;instance_nodesas{node, answered, count}, without thereasona node did not answer;last_failureas{class, at, node, seat};resolvedas{auth, runs_on, timeouts, binding},bindingas{vendor, by}, without thekeys, thebox_seatsor the placementwarnings;usageas{since, until, days, tools, elided}, each tool’s row{tool, calls, failed, unavailable, refused, total_ms, last_at}, without theseatsthat called it: how often a tool is used tells a member whether it is, and who called it is the trail of that seat’s work.
It leaves out instructions, dependants, calls, reaches and changes: a change is reviewed by who may decide it.
{ "reading": "member", "server": {"name": "github", "title": "GitHub", "catalogue": "github", "vendor": "github", "configured": true, "shared": false, "enabled": true, "description": "", "transport": "stdio", "state": "running", "started": 3, "failed": 0, "waiting": 0, "tools": 42, "refused_tools": [], "refused_count": 0, "shadowed_tools": [], "shadowed_count": 0, "nodes": [{"node": "node-a", "reported": true, "started": 2, "failed": 0, "waiting": 0, "tools": 42, "error_class": "", "down_since": null, "restarts": 1}]}, "nodes": [{"id": "node-a", "reported": true}], "listed": [{"node": "node-a", "at": "2026-11-01T09:00:00Z", "instances": 2, "tools": 42}], "tools": [{"name": "get_issue", "raw": "get_issue", "title": "Get issue", "…": "…"}], "server_info": {"name": "github-mcp-server", "version": "0.31.0", "protocol": "2025-06-18"}, "instances": [ {"seat": "backend-dev", "node": "node-a", "state": "running", "since": "2026-11-01T08:40:00Z", "restarts": 1, "tools": 42, "failure": null, "last_failure": {"class": "exited", "at": "2026-11-01T08:39:58Z", "node": "node-a", "seat": "backend-dev"}, "last_answer": "2026-11-01T09:02:11Z"} ], "instance_nodes": [{"node": "node-a", "answered": true, "count": 1}], "last_success": "2026-11-01T09:02:11Z", "last_failure": {"class": "exited", "at": "2026-11-01T08:39:58Z", "node": "node-a", "seat": "backend-dev"}, "resolved": {"auth": "integration", "runs_on": "engine_host", "timeouts": {"startup_seconds": 120, "request_seconds": 300, "startup_default": true, "request_default": true}, "binding": {"vendor": "github", "by": "recognised"}}, "usage": {"since": "2026-10-26", "until": "2026-11-01", "days": 7, "elided": 0, "tools": [{"tool": "get_issue", "calls": 18, "failed": 1, "unavailable": 0, "refused": 0, "total_ms": 7380, "last_at": "2026-11-01T09:02:11Z"}]}}POST /mcp-servers/{name}/retry
Section titled “POST /mcp-servers/{name}/retry”Restarts one MCP server now, for the Restart action on its page under Settings › MCP & tools: every instance on every node, or, with a seat, that agent’s instance on the node holding the seat. Decided by tools.retry, an administrator’s at any recency and Ask Crewlet’s only on the person’s approval. It changes runtime state only: each instance starts again from the spec it already runs.
The body is empty to restart every instance, or {"seat": "<handle>"} for one agent’s. The answer is 202 Accepted with the request as recorded:
{"server": "tracker", "seat": "", "at": "2026-11-01T09:05:00Z", "node": "node-a"}A stamp, not a command. The request is one record in the coordination store, which every node watches; each node restarts every instance it runs whose state began before at: a serving instance’s session ends and a fresh one starts at once, a down instance is tried now with its restart schedule started again, and an agent’s instance whose first start failed gets a pass now. Only the node holding a named seat acts. The restart has happened on a node once its instances read a since after at in the server’s detail; the same request heard twice, late, or after a node restarts restarts nothing more. The record goes when the configuration stops declaring the server or the seat.
| Status | error | When |
|---|---|---|
404 | not_found | The configuration declares no such server |
409 | conflict | The server is turned off (enabled: false), so nothing runs it |
409 | seat_not_granted | The seat is not granted the server |
400 | invalid_body | A seat named for a shared server (one instance for the company); or a body with a field the route does not read |
404 | no_such_seat | The organization has no agent seat by that handle |
503 | unavailable | The node could not record the request; ask again |
Every call, the guard’s refusals included, is one mcp_server_acted in the runtime audit: who asked, which server, the seat if one, and how it ended, never anything the server is started with.
POST /mcp-servers/{name}/check
Section titled “POST /mcp-servers/{name}/check”Tests one MCP server where it runs, for the Test action on its page under Settings › MCP & tools. Each node asked opens its own connection exactly as it starts the server (same transport, launch, scrubbed environment and startup timeout), walks its stages, lists its tools and closes it. A test never calls a tool, and the running server keeps serving beside it. Decided by tools.check, an administrator’s at any recency and Ask Crewlet’s only on the person’s approval: it changes no configuration and no credential.
A shared server is tested on every node holding a presence lease; the body is empty. A per-agent server runs as one agent with its credentials, so it is tested for one seat on the node holding it: the body is {"seat": "<handle>"}, and no other node tests it.
The answer is 200 with what each node found:
{ "server": "tracker", "seat": "", "draft": false, "at": "2026-11-01T09:05:00Z", "by": "jane.doe", "node": "node-a", "ok": true, "nodes": [ {"node": "node-a", "answered": true, "reason": "", "ok": true, "steps": [{"stage": "launch", "state": "passed", "took_ms": 41, "detail": "the process started"}, {"stage": "discover", "state": "passed", "took_ms": 182, "detail": "tracker-mcp 1.2.0, protocol 2026-07-28"}, {"stage": "list", "state": "passed", "took_ms": 33, "detail": "2 tools"}], "failure": null, "server_info": {"name": "tracker-mcp", "version": "1.2.0", "protocol": "2026-07-28"}, "tools": 2, "refused": 0, "took_ms": 270}, {"node": "node-b", "answered": false, "reason": "did not answer within 4m15s", "ok": false, "steps": [], "failure": null, "server_info": null, "tools": 0, "refused": 0, "took_ms": 0} ], "server_info": {"name": "tracker-mcp", "version": "1.2.0", "protocol": "2026-07-28"}, "tools": [{"name": "tracker_search", "raw": "search", "title": "", "description": "Searches issues.", "annotations": {"read_only": "yes", "destructive": "unknown", "idempotent": "unknown", "open_world": "unknown"}, "risk": "read_only", "risk_declared": true, "external": true, "starting_level": "allow", "refused": ""}], "warnings": []}stepsare the stages a node walked, in order. A remote server walksaddress,resolve,connect,tls,discoverandlist; a local onelaunch,discoverandlist. Eachstateispassed,failed,skipped(no name to look up for an address written as one, no TLS for plain http) ornot_reached(after the stage that failed).detailis what the stage found, or the failure’s sentence for the stage that failed.failureis why the test stopped on a node: itsclass, one of the fourteen failure classes/mcp-serversreports, decided at the stage whose facts produced it (a lookup atresolve, a dial atconnect, a certificate attls, what the server answered atdiscover, a command that could not start or a process that exited before it answered atlaunch), andsaid. A server that answers and lists no tool it can be offered under isok, with the classempty_tools.toolsandserver_infocome from the first node that found the server serving: each tool as the engine would offer it (prefixed name, hints with the configuration’s overrides,riskas/mcp-servers/{name}reads it),starting_level(the level it starts at when the server is added:allowfor a tool asserted read-only, elseapprove), andrefused, why it would not be offered under its name (characters,too_longorbuiltin).warningssay each refusal in a sentence.
Never in an answer: a header or variable value the server is started with (a server or process that repeats one has it withheld), an address with a credential in it, the server’s instructions. Every sentence is redacted and bounded to 512 bytes on the node that wrote it.
The latest test is kept. It is recorded in the coordination store, one record per server, and the server’s detail answers it as last_check to every administrator on any node. A later test replaces it; the record goes when the configuration stops declaring the server.
| Status | error | When |
|---|---|---|
404 | not_found | The configuration declares no such server |
409 | conflict | The server is turned off, so nothing runs it to test (test its entry as a draft instead) |
409 | seat_not_granted | The seat is not granted the server |
400 | invalid_body | A seat named for a shared server, none named for a per-agent one, or a body with a field the route does not read |
404 | no_such_seat | The organization has no agent seat by that handle |
503 | unavailable | The node could not ask the fleet; ask again |
A node that does not answer within the test’s budget (twice the server’s startup timeout, plus fifteen seconds to close what it started) is named in nodes with why, never read as one that found nothing. One test of a server (and seat) runs at a time on a node: a test asked while one runs there is answered at once, on that node, that one is running, and starts nothing beside it. Every call, the guard’s refusals included, is one mcp_server_acted with the action check.
POST /mcp-checks
Section titled “POST /mcp-checks”Tests a draft MCP server entry before it is saved, for the test step of the add and edit flows. The body is the entry as PUT /config/mcp-servers/{name} would take it, the seat for a per-agent one, and the values typed for its keys that are not stored yet:
{"entity": {"name": "wiki", "transport": "http", "url": "https://wiki.example.com/mcp"}, "seat": "", "values": {"Authorization": "Bearer <token>"}}values holds what the server would be sent under each key, as PUT /mcp-servers/{name}/values/{key} stores it once the entry is written. For the test each key reads the variable that route would store its value under in the company the draft makes (the key’s own ${VAR} where only it reads one, else MCP_<SERVER>_<KEY>), ahead of anything the store holds under that name. A key that route would refuse (one an integration fills for each agent, a name no header or variable can have, a derived name another field already reads, a variable past the 255 bytes a secret’s name may be) is refused here with the same answer. Each value is trimmed and must be one line; together they hold at most 64 KiB (one stored value’s bound), past which the answer is 413. A value is never written, recorded, logged or answered. The entry and every value cross the broker sealed under the fleet’s keyring, each bound to the one test. A key whose value is already stored needs no entry: the draft’s ${VAR} resolves it.
A draft runs what a write would (a command on the engine host, or an address dialled with the entry’s values), so it is decided as that write, config.write and secrets.write on top of tools.check, before the body is read: a person who may not write the company and its secrets is refused 403 (step_up_required for a proof older than the step-up window) and nothing is tested. Ask Crewlet never runs one, since secrets.write is never its.
The entry is held to the configuration’s own dry run, in the company it would join (a create for a new name, an edit for an existing one); an entry the dry run refuses is answered 422 validation_error with the problems a write would get. An admitted draft is tested as the dry run left it, turned on whatever its enabled says, on the nodes the saved entry would run on, and answered as POST /mcp-servers/{name}/check answers, with "draft": true. Tested for an agent (seat), it is started with what the saved entry would start that agent’s instance with: the agent’s own values, its unit’s, and its own credential at every integration the entry reads, bound as the save will bind it. A draft’s test is never recorded: the server’s latest test is of the entry the company runs.
POST /mcp-probe
Section titled “POST /mcp-probe”Checks an address before an MCP server is added at it, for the address step of the add flow: what answers there, and how it is signed in to. The body is {"url": "https://..."}. The address is dialled as the server would be once added, a private one included, so it is decided as that write: config.write on top of tools.check, before the body is read. It resolves no secret and sends no credential.
{ "address": "https://mcp.example.com/mcp", "reachable": true, "check": {"node": "", "answered": true, "reason": "", "ok": false, "steps": [{"stage": "address", "state": "passed", "took_ms": 0, "detail": "https://mcp.example.com/mcp"}, {"stage": "discover", "state": "failed", "took_ms": 210, "detail": "..."}], "failure": {"class": "needs_sign_in", "said": "..."}, "server_info": {"name": "", "title": "", "version": "", "protocol": ""}, "tools": 0, "refused": 0, "took_ms": 380}, "auth": "oauth", "oauth": {"resource_metadata": "https://mcp.example.com/.well-known/oauth-protected-resource/mcp", "resource": "https://mcp.example.com/mcp", "authorization_servers": ["https://auth.example.com"], "issuer": "https://auth.example.com", "scopes": ["read", "write"], "client": "dcr", "pkce": true, "failure": null}, "tools": null, "catalogue": "", "title": "", "vendor": ""}checkis the address’s walk with nothing configured, as a node’s test is answered.authis the sign-in the server asks for:nonewhere it lists its tools to no credential (toolscounts them),oauthwhere it answers401with a Bearer challenge and publishes protected-resource metadata,headerswhere it refuses another way or publishes none,""where the check reached no answer to tell by.reachableis whether an MCP server answered at all: its handshake, or a refusal asking for a credential.oauthis what the server’s sign-in metadata says: the protected-resource metadata (RFC 9728) at the address its challenge names, or at the well-known address on its own origin, and the metadata of the first authorization server it names (RFC 8414, or OpenID Connect discovery): itsissuer, thescopes, how the engine would register as a client (cimdwhere it reads a client metadata document,dcrwhere it offers dynamic registration,ownfor a client an administrator registers), and whether it offers PKCES256.failureis why the discovery stopped short.catalogue,titleandvendorname the curated entry the address is,""where the curated catalogue does not know it.
Whose address each request goes to. The typed address is the operator’s. Every other address the check reaches is one the server named, in its challenge or metadata, and is fetched only through the engine’s public-address guard (ADR-0072) unless it is on the typed address’s own origin, over https alone, following no redirect, reading at most 64 KiB, within ten seconds. An address the guard refuses ends the discovery with the class blocked_address: the server’s sign-in points somewhere the engine does not follow. Metadata naming another issuer than the one asked for is not used. An address the configuration’s own rule refuses (plain http to a public host, a user name or password in it) stops at the address stage, dialling nothing. Every call is one mcp_server_acted with the action probe, naming the address with its credentials withheld.
PUT /mcp-servers/{name}/values/{key}
Section titled “PUT /mcp-servers/{name}/values/{key}”Stores one header of a remote server, or one variable of a local one, from the
server’s page: what the server is sent under key, whole ("Bearer <API key>", as the curated catalogue’s format says), as {"value": "..."}. The
value is sealed write-only in the fleet’s secret store and the key reads it
through a ${VAR}: no credential enters the company document and no route
answers the value again.
| Query | Meaning |
|---|---|
seat=<handle> | One seat’s value of a per-agent server (shared: false), written into that seat’s mcp_env block, which the engine lays over the server’s own keys. Only a seat already granted the server takes one; storing never grants. Refused 400 invalid_query for a shared server |
test=true|false | Test the value before storing it (the default). A per-agent server’s value can only be tested as one of its seats, so without seat it is stored with test=false or refused 400 invalid_query |
Who may. secrets.write on the route and config.write in it, both an
administrator’s at a recent step-up, decided before the body is read. The
assistant never takes secrets.write. A managed document
(api.auth.company_writers) refuses it 403 config_managed, before the body
too.
The OAuth client’s secret. key oauth.client_secret stores the secret of
the company’s own OAuth client the server signs in with (a
service identity’s,
or client: own’s), pointing oauth.client_secret at its variable; it is
listed in the detail’s values with as: "oauth". A service identity’s is
tested by signing in with it. A person’s sign-in sends the secret only when the
grant renews, which a test does not do, so test=true is refused
400 invalid_query there: store it with test=false. A server whose sign-in
has no secret (no oauth block, client: cimd or dcr) is refused 409 conflict, and so is a seat: a sign-in is the company’s. A service
identity added through PUT /config/mcp-servers/{name} with no client_secret
is written reading the variable this route stores it under (refused, as here,
where another field reads that variable), so storing it next points nothing.
Which variable. The key’s own variable where it already reads exactly one
that nothing else reads, so rotating it changes nobody else’s credential;
otherwise MCP_<SERVER>_<KEY>, and _<SEAT> for a seat’s value, upper-snaked.
A derived name another field already reads is refused 409 conflict naming the fields (readers): a value sealed there would reach them
too. A key an integration hands each agent its own value under
(seat_credentials, or a server the engine recognises) is refused 409 conflict: nobody stores it. A variable, the key’s own or the derived one,
longer than the 255 bytes a secret’s name may be (the secret
store) is refused 400 bad_params
before anything is tested or sealed: shorten the key, or point its field at a
shorter ${VAR}.
In this order, each step only when the one before it passed:
- The pointer the write would make is held to every rule a write of the
document is (
422 validation_errorwithproblems). - The test (unless
test=false): the entry as the fleet’s active revision states it, turned on whatever itsenabledsays, with the key reading the value, run where the server runs (every node for a shared server, the seat’s holder for a seat’s value), asPOST /mcp-servers/{name}/checktests it, calling no tool. The entry is sent with the test, as a draft’s is, so a value stored straight after its entry’s write is tested, not refused; both travel to the other nodes sealed under the fleet’s keyring. It is never recorded as the server’s latest test. A failed test stores nothing and answers422 value_test_failedwith thestageandclassit stopped at, thenode, the wholecheckand a problem atvalues.<key>; one no node answered is503. - The seal: write-only, its
sourcemcp. Past the test, the write finishes whatever the caller does. - The pointer as one revision on the document as it stands then (a write that
landed meanwhile is kept), or, where the key already read the variable, a
re-activation of the revision that reads it
(ADR-0070); the
running server restarts with the new value either way. A pointer refused
here (the document changed the key meanwhile, say) answers with
stored: trueand thevariable: the value is stored, nothing reads it yet, and sending the same request again finishes it.
{ "server": "linear", "key": "Authorization", "seat": "", "variable": "MCP_LINEAR_AUTHORIZATION", "tested": true, "check": {"server": "linear", "seat": "", "draft": false, "ok": true, "...": "as POST /mcp-servers/{name}/check answers"}, "pointed": true, "reload": {"revision_id": "rev-0192", "epoch": 14}, "values": [ {"key": "Authorization", "as": "header", "variable": "MCP_LINEAR_AUTHORIZATION", "set": true, "stored_at": "2026-11-02T09:00:00Z", "stored_by": "jane-founder", "optional": false, "bound_by": null} ]}pointedis whether the document was written to read the variable, andreloadthe revision that resolves the new value (the write’s, or the re-activation’s, witherroranddetailwhere a re-activation did not land; the value is sealed either way).valuesare the server’s values, or withseatthat seat’s, asGET /mcp-servers/{name}answers them.
The body is read strictly (400 invalid_body for a field it does not read, no
value, an empty one, or one holding a line break or a NUL), and any other query parameter is 400 invalid_query. A {key} that is not a header or variable name is 400 bad_params: name the header or variable the server reads. 404 not_found for a server the configuration does not
declare, 404 no_such_seat for a seat that is not an agent’s, and
409 seat_not_granted for a seat the server is not granted to. No answer,
log line or audit record carries the value, a refusal included: every call is one mcp_server_acted
with the action store_value, naming the key and the variable, and a
test’s sentences withhold the values the server was started with.
PUT /mcp-servers/{name}/tools
Section titled “PUT /mcp-servers/{name}/tools”Sets the level each tool of a server runs at, from the Tools tab, as one
revision of the company document (mcp_servers[].tools): allow offers a tool
to every agent the server reaches, blocked never offers it
(Tools and MCP › Setting each tool’s level).
{"default": "blocked", "levels": {"search_issues": "allow", "get_issue": "allow", "merge_pull_request": "approve", "delete_repository": null}, "auto_accept_changes": false, "_summary": "github: block every tool but the two reads"}auto_accept_changessetstools.auto_accept_changes:trueaccepts each change the server makes to its tools as it is listed, audited as accepted automatically, rather than holding it for review (Tools and MCP › Accepting a server’s changes automatically). Left out, it stays as it is. A body may set it alone.levelsnames each tool by the server’s own name (rawonGET /mcp-servers/{name}), never with thetool_prefix. A tool left out keeps its level;nullremoves a tool’s own level, so it runs at the default.defaultsets the level of every toollevelsdoes not name;nullremoves it, leaving each such tool at the level its hints start it at (allowfor a tool the server marks read-only,approveotherwise). Left out, it stays.- A body that names neither is
400 invalid_body, and so is any other field or a level that is not a string.
A change, not a replacement: no If-Match; it is made on the document as it
stands, so two people setting two tools’ levels both land. _summary (or
X-Summary) is the revision’s audit summary, required of a write and asked
last.
Who may. config.write, an administrator’s: a write at a recent step-up, a
check (?dry_run=true) at the read’s proof, as every configuration write. The
assistant proposes one for a person to approve. A managed document
(api.auth.company_writers) refuses it 403 config_managed.
The whole document is validated: a level other than allow, approve or
blocked, or a key that names no tool (empty, or holding a space), is
422 validation_error with the problem at mcp_servers.<i>.tools.levels.<tool>.
A level leaving a server some role’s sandbox.mcp.servers lists with a tool
not certain to run at allow (any level but allow, or no default: allow)
is refused at that box entry (roles.<i>.sandbox.mcp.servers.<j>): a box
reaches a server whole. 404 no_such_entity for a server the configuration
does not declare.
{ "server": "github", "dry_run": false, "default": "blocked", "levels": {"get_issue": "allow", "search_issues": "allow"}, "auto_accept_changes": false, "unlisted": ["get_issue"], "listing": "read", "revision_id": "rev-0193", "epoch": 15, "warnings": [], "derived": {}}defaultistools.defaultas written,nullwhere unset;levelsevery tool’s own level now;auto_accept_changesthe setting as written.unlistedare the toolslevelsnames that no live node’s listing of the server names, asunlisted_levelson the detail: kept, since a server may list the tool later, and said, since a level that decides nothing is most often misspelled.listingisunavailablewhere this node could not read the fleet’s listings, which leavesunlistedempty.- The rest is the configuration’s own answer: a write’s
revision_id,epoch,warningsandderived, or a check’svalid,base_revision_id,warningsandderived, withdry_run: true.
Each node restarts its instances of the server and files every tool not left
blocked, a tool at approve with each call held for a person. Every call is
one mcp_server_acted with the action set_tools, a check marked dry_run;
the revision names the levels.
POST /mcp-servers/{name}/changes
Section titled “POST /mcp-servers/{name}/changes”Decides changes an MCP server made to its tools since their levels were decided, from the Drift review (Tools and MCP › When a server changes a tool):
{"accept": {"search_issues": "9f2c…", "close_issue": null}, "block": {"delete_repository": "41aa…"}}Each key is the server’s own name for a tool, each value the digest of the
definition reviewed (the change’s after.digest in the
detail’s changes), or null for a removal. One body
decides as many tools as it names. Accept records the definition as the one
the tool’s level holds for, so an allowed tool runs unasked again; an accepted
removal keeps a record, and the tool listed again after is one the server
added. Block sets the tool’s level to blocked on the server’s entry, as
one revision under the request’s _summary (one naming the tools is written
where none is sent), and records the definition decided on. Decided as
config.write at a recent step-up, since accepting can let a tool run unasked
again; a block on an operator-managed document is refused 403 config_managed.
Refused 409 stale_version, with tools naming them, when a named definition
is not one the fleet lists for the tool now and nobody has accepted (the server
swapped it since the review, somebody decided it, or a removal is named for a
tool still listed): nothing is decided, the rest of the body included; read the
changes again. 400 invalid_body for a body that decides nothing or one tool
twice, 404 not_found for a server the company does not declare,
503 unavailable where this node cannot read the fleet’s listing of the
server. A body may name a decision for each of the most tools one server lists
(1,024), up to 256 KiB.
{"server": "github", "accepted": ["close_issue", "search_issues"], "blocked": ["delete_repository"], "moved": [], "revision": {"revision_id": "…", "epoch": 7, "warnings": []}}accepted and blocked are the tools decided, sorted; moved the ones
somebody else decided between this node’s read and its write, for which
nothing was written; revision the configuration’s answer to the block, null
where nothing was blocked. Every call is one mcp_server_acted with the action
review_changes, naming the tools accepted and kept blocked. Accepting every
change at once is one body naming each by its digest: each is recorded as it
would be alone, and the one audit record names them all.
A server whose entry sets tools.auto_accept_changes has its changes accepted
by the node that lists them, each record marked auto_accepted; the node
audits them as its own mcp_server_acted (actor kind system), action
auto_accept_changes, naming the tools in accepted and, in changes, what
each moved: {tool, kind, parts, loosened, before, after}, each definition
{digest, title, description, read_only, destructive, idempotent, open_world}
as a listing keeps it.
Decisions are written one by one, so where the store fails one the answer is
503 unavailable naming what was and was not decided, beside the detail:
accepted and blocked the tools decided before it, moved the ones somebody
else decided first, undecided the one that failed and every one not tried
after it. Asking again with the same body is refused 409 stale_version, since
the decided ones are decided; read the changes again and decide the
undecided ones.
{"error": "unavailable", "detail": "the decision about \"export\" could not be written, and nothing was tried for \"purge\". Decided already: \"close_issue\". Read the server's changes again and decide the ones left.", "accepted": ["close_issue"], "blocked": [], "moved": [], "undecided": ["export", "purge"]}GET /mcp-approvals/{id}
Section titled “GET /mcp-approvals/{id}”The held call {id} whole, for whoever may answer it: {"id", "server", "tool", "seat", "turn_id", "launch_id", "question", "context", "arguments", "arguments_sha256"}, arguments opened from their seal and
arguments_sha256 the SHA-256, in hex, of them as JSON with sorted keys.
Once the call is answered or its run has moved on, arguments are redacted
and arguments_sha256 is empty: nothing is answered from them.
Decided as the answer is (tools.approve, ssh.operate.approve for an SSH
operate command, or growth.spend.approve, growth.public.approve and
growth.admin.approve for a growth integration’s act), so a person
integrations.ssh.approvers names reads every byte of an operate command’s
standard input here, whether or not they read the seat’s runs. Never Ask
Crewlet’s.
POST /mcp-approvals/{id}
Section titled “POST /mcp-approvals/{id}”Answers a call an agent’s run made to an MCP tool at Needs approval
(Asking a person before a tool runs,
ADR-0077),
which waits parked on the run’s record. {id} is the held call’s, as
approvals in GET /mcp-servers and held_call.id on
the run’s executors board row name it.
{"answer": "once"}answer is once (make the call), always (make it, and set the tool to
allow on its server’s entry from now on) or deny (do not make it; the run
is told the call was refused as forbidden). An optional note, at most
2,000 characters, is what the person says to the agent with it, which the
resumed run reads beside the verdict. once on an SSH operate command
or a growth act also names the arguments_sha256 that GET /mcp-approvals/{id}
answered beside the arguments it showed, so it is given only from a surface
that read all of it; without it, or naming another, it is 409 conflict and
nothing is answered. always takes an optional _summary for the revision it
writes (default: the tool allowed in answer to the held call).
Decided as tools.approve: an administrator, or a lead of the seat whose run
made the call; a person, never an agent seat or Ask Crewlet. A growth
integration’s spend, public or admin act (approvers admin, ADR-0171) is
decided as growth.spend.approve, growth.public.approve or
growth.admin.approve: an administrator alone, present (never a machine
token or a credential acting as itself), at a recent step-up. It offers
once and deny alone, and one unanswered a day after it was held
(held_call.lapses_at) is denied by the engine. The route admits
on the caller’s own record and decides again on the run’s seat once the call is
read. always is also a configuration write, decided as config.write at a
recent step-up (403 step_up_required otherwise), written as
PUT /mcp-servers/{name}/tools writes a level,
before the answer is sent, so a refused write answers nothing. Where the server
changed the tool since its level was decided and a live listing names the
definition the call was made under, always also accepts that definition, as
POST /mcp-servers/{name}/changes would, so a
tool held only for its change runs unasked from then on
(Tools and MCP › When a server changes a tool).
202 Accepted with:
{ "id": "0190f3a8-6b1c-7d2e-9f00-1a2b3c4d5e6f", "server": "github", "tool": "gh_merge_pull_request", "seat": "backend-dev", "turn_id": "…", "launch_id": "…", "answer": "once", "outcome": "pending", "answer_id": "0190f3a9-…", "revision": null}outcome is pending: the answer is on the control topic of the node holding
the seat, which records it, makes or refuses the call at most once, and carries
the run on. unknown is an answer whose delivery may or may not have landed;
answering again is safe, since the seat records one answer. revision is the
configuration’s answer to the level always wrote (revision_id, epoch,
warnings, derived), null for once and deny.
| Status | error | When |
|---|---|---|
400 | invalid_body | An answer other than once, always or deny, or a field the route does not read |
403 | unauthorized | The caller neither administers nor leads the seat, or is an agent seat or Ask Crewlet (reason and grants say which) |
403 | step_up_required | always without a recent step-up |
404 | not_found | No active run holds a call under {id}: its run ended, or the id names none |
409 | stale_version | The call is not waiting any more (answered, or its run moved on to another question). Nothing was answered |
503 | unavailable | The node holds no run record, or could not read the runs |
Every call, refused ones included, is one mcp_server_acted with
action: "approve", the server, the seat, the tool, the approval id and the
answer, never the arguments.
POST /mcp-servers/{name}/oauth
Section titled “POST /mcp-servers/{name}/oauth”Starts signing the company in to a remote MCP server whose entry carries
oauth. The engine reads
the server’s sign-in metadata (as POST /mcp-probe does),
refuses an authorization server that does not offer PKCE S256 or the
registration the entry names, registers now where the client is dcr, keeps a
PKCE verifier it mints, and answers 201 with the address the person’s browser
is sent to:
{"id": "018f3a9c-0000-7000-8000-0000000000aa", "server": "linear", "status": "pending", "detail": "", "started_at": "2026-11-02T09:00:00Z", "expires_at": "2026-11-02T09:15:00Z", "authorize_url": "https://auth.example.com/authorize?response_type=code&client_id=...&code_challenge_method=S256&state=..."}The address names the client, the callback (/webhooks/mcp-oauth), the
challenge, the scopes, the server as the resource (RFC 8707), and a state
that is the sign-in’s id signed under the fleet keyring. It is answered here
and nowhere else; the verifier never leaves the engine. A second start for one
server replaces the first. The sign-in is good for 15 minutes.
Takes secrets.write: an administrator with a recent
proof, never Ask
Crewlet. Refusals: 404 not_found for a server the configuration does not
declare; 409 conflict for one with no oauth block, one that signs in as a
service identity (grant: client_credentials, which nobody signs in to), an
engine with no public address (api.external_url, or api.public.external_url
where the public listener is on), or a server whose metadata or vendor rules
the sign-in out (no S256, registration not offered, the company’s own
client’s secret not set), each saying what to change; 502 vendor_refused
where the server or its authorization server could not be read or refused to
register the engine. Every call is one mcp_server_acted with the action
sign_in.
GET /mcp-sign-ins/{id}
Section titled “GET /mcp-sign-ins/{id}”Where a sign-in is, for the page that polls it: pending until the vendor
sends the browser back, completing while the code is exchanged, approved
once the grant is kept, failed with detail saying why (the vendor’s own
words where it refused). The record answers for ten minutes after the sign-in
expires; an unknown or lapsed id is 404 not_found. authorize_url is always
"" here. Takes config.read.
DELETE /mcp-servers/{name}/oauth
Section titled “DELETE /mcp-servers/{name}/oauth”Signs the company out of a server: the refresh token is revoked at the authorization server where it publishes a revocation endpoint (RFC 7009), the grant is deleted here (its sealed row and public record), and the revision is re-activated so every node stops the server, which then needs a sign-in.
{"server": "linear", "revocation": "revoked", "said": ""}revocation is revoked, not_offered where the vendor publishes no
revocation endpoint (the grant is forgotten here and lapses there), or
failed where the vendor could not be asked or refused, said carrying its
words; the grant is forgotten here whatever it answered. A server nobody is
signed in to is 404 not_found. Takes secrets.write, as the start does,
and is one mcp_server_acted with the action sign_out. Removing the server
(DELETE /config/mcp-servers/{name}) gives its grant up the same way.
GET /fleet
Section titled “GET /fleet”Backs the dashboard’s Settings › Nodes screen: the questions /health
cannot answer, since it answers about the node that served it and a load
balancer sends the next refresh elsewhere.
Read from the lease table, so every node gives the same answer: node presence
carries each node’s node.roles and node.labels, seat and worker leases name
their holder, and each node’s config record comes from the control plane’s
apply status.
It needs a credential carrying admin, reads included (a signed-in session
or a bearer): it describes the deployment (node ids, seat holders, lease
epochs, rollout progress), so Authentication alone does not open it, as with
/integrations.
Presence also carries what each node is doing: in_flight, draining,
posture, started_at, how far its own copy of the company’s records has come
up (appliers_ready of appliers_total) and whether it serves admin
(admin). They ride on the heartbeat that already re-sends roles and labels,
not a request/reply to the owning node, which would make every answer partial.
Absent is not zero. A node whose status read did not answer within its
share of the heartbeat (seat.StatusBudgetRatio), cut short or failed,
publishes no status on that beat and omits those fields; the dashboard draws an
em dash, since a 0 would render an idle row for a process not saying. The
read itself decides whether it answered, not the clock after it returned.
posture alone can be absent beside the rest: a node that could not read the
control plane (refused at once, or out of budget) still publishes in-flight
count, drain state, start time and admin, and no posture, never the serve
its readiness probe falls back to.
appliers_ready of appliers_total counts the node’s state-log appliers (one
per domain, run by every data node from boot) and how many are current. It
differs from config_epoch: a node can hold the current revision and still be
applying the records its copy derives from, and a node that is behind keeps its
seats but claims no new ones until level (a copy that is
behind).
It is not on /ready because a catching-up node is healthy: it serves its
dashboard, answers probes and runs the duties it holds. Both fields are absent
on a node without data, never 0 of 0.
admin is the node’s own api.auth.admin:
serve or refuse, decided per node and per request, so a fleet mid-rollout
legally disagrees; this column says so. Absent on a node that declares none,
which only a node serving no API may do: not saying, never refusing.
The configuration columns come from the control plane’s apply status; the
table below lists them. A node with no report (aged past the freshness bound,
the same record the fleet’s posture decision reads) has config_epoch 0, no
boot revision or applied epoch, and the other columns empty.
Two fields report failures whose only symptom is an absence: unmanned_roles
lists the roles the company needs that no live node performs (gitlet only
where it sets code.backend: gitlet, by the rule each node’s
fleet_role_unmanned warning reads) and unplaceable lists seats whose
role.placement matches no live node. A lease table that could not be read
answers 503 with a Retry-After rather than an empty fleet: a store blip is
not evidence that “no node is live”.
Each seat row carries acquired_at: since when its node has held it, an RFC
3339 UTC time on the coordination store’s clock. It is stamped when the lease’s
epoch was minted and kept through renewals, so it moves exactly when epoch
does: on a takeover, and on the same node re-claiming after its lease lapsed.
Every node, seat and duty row carries expires_in: how long its lease has
left, in whole seconds, on the coordination store’s clock, never the serving
node’s (Coordination).
Absent, never 0, where that clock could not be read just now: a 0 reads as
a holder that stopped renewing.
Each node row carries alarms: what is firing on that node, off the same
heartbeat. It holds every alarm its own table has up, one entry
per kind, each {"kind", "since", "title", "person"}: since is when the node
raised it (RFC 3339 UTC on that node’s clock, to the second; the oldest for a
kind standing on several logs), title and person the answering node’s words
for the kind, for a company owner, absent for a kind its build does not raise.
The longest-standing comes first, the alarm that node’s own /health names as
worst; /health counts only its own node’s. An empty list is a node that
evaluated its table and found nothing firing. A node with no evaluated table
(any node without data, or whose first evaluation has not run) has no
alarms field: “not saying”, never “nothing is firing”. The measurement and
remedy are on the node’s own alarm_raised log line.
{ "nodes": [ { "id": "core-1", "roles": ["data", "ingress", "seats", "workers"], "broker": "member", "labels": {}, "owner": "core-1:8f2a", "protocol": 1, "seats": 4, "expires_in": 41, "config_epoch": 7, "config_revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "config_status": "ok", "config_error": "", "config_applied_epoch": 7, "config_serving_revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "config_boot_revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "config_reported_at": "2026-09-23T08:14:02.118Z", "in_flight": 1, "draining": false, "started_at": "2026-09-23T08:01:57Z", "posture": "serve", "appliers_ready": 14, "appliers_total": 14, "admin": "serve", "alarms": [{"kind": "backup_age", "since": "2026-09-23T08:10:02Z", "title": "No recent backup", "person": "…"}] } ], "seats": [ {"handle": "ceo", "node": "core-1", "owner": "core-1:8f2a", "epoch": 4, "expires_in": 41, "acquired_at": "2026-09-23T08:02:11.482Z"} ], "duties": [{"duty": "maintenance", "node": "core-1", "expires_in": 41}], "unplaceable": [{"handle": "gpu-eng", "placement": "labels=gpu=true"}], "unmanned_roles": [], "this_node": "core-1", "target_epoch": 7, "activation": {"epoch": 7, "revision_id": "3f1c0f0e-8a52-4d3b-9d7e-2b6f3f0c9a41", "at": "2026-09-23T08:13:40.552Z", "summary": "raise the executor round cap"}, "objects": { "state": "reported", "backend": "s3:https://s3.example.com/files/acme/", "node": "data-a", "collect": { "at": "2026-09-01T12:00:00Z", "completed": true, "listed": 1840, "aged": 1702, "deleted": 12, "referenced": 1690, "abandoned": 1 }, "audit": { "at": "2026-09-01T09:00:00Z", "completed": true, "referenced": 1828, "missing": 0, "damaged": 0, "unanswered": 0, "found": { "at": "2026-09-01T09:00:00Z", "completed": true, "referenced": 1828, "missing": 0, "damaged": 0, "unanswered": 0 } } }}objects is where the company’s files are kept, and what the
object store’s collector last found, read from
the coordination store so every node reports the same record. It is absent on a
node that reads no record.
state is unavailable (the coordination store did not answer), not_yet (no
collector has finished a pass on the store the files are in: a new fleet, no
data node running the duty, or a fleet whose files
moved since the last report,
which describes the old store and is never shown as the new one’s) or
reported. Only a report carries the other fields.
| Field | What it is |
|---|---|
backend | The store every node agreed on at boot: nats (the data nodes’ replicated bucket) or s3:<endpoint>/<bucket>/<prefix> |
node | The data node holding the collector’s duty when it ran the passes below |
collect | The last collection: when it ended (at), whether it listed the whole store and judged every object past the day’s grace (completed), and counts: listed (objects under the engine’s namespace), aged (past the grace by both the store’s clock and the key’s, so judged), deleted (no row named them), referenced (a row, live, retired or derived, still did), abandoned (uploads begun over a day ago and never finished, which no listing shows). skipped says why it stopped judging (an estate this node could not fully read; the counts are what it did before); sweep_error what kept it from abandoning unfinished uploads, which does not fail the collection (on S3, an identity without s3:ListBucketMultipartUploads or s3:AbortMultipartUpload); error what stopped it. Absent before the first one ends |
audit | The last audit attempt, which asks the store about every object a live row names, never one a retired or derived row keeps: at, referenced, missing (answered twice as not held), damaged (held at another size, or under another digest where it keeps one, or as no readable object), unanswered (failed to answer about twice while it answered for the rest), completed (false over an incomplete estate, when the counts are floors) and error (an estate it could not read, or a store failing rather than refusing particular objects). Absent before the first one ends |
audit.found | What the last audit to run to its end found (the attempt above, or the one before when that failed, so a failed attempt never hides it): at, completed, referenced, missing, damaged, unanswered and missing_files, the first hundred files by named_by that cannot be read, or as many of them as the fleet’s record of the pass holds (the counts stay whole), each {"object", "named_by", "finding"}: the object’s key, the file as PROJECT/path (cut past 512 bytes), and missing, damaged or unanswered (absent when none). A non-zero missing, damaged or unanswered here raises objects_missing. Absent before any audit has run to its end |
A collection runs hourly and an audit daily, on one data node at a time; a pass that fails is tried again ten minutes later.
Each node row carries broker: member (embedded, a voter in the JetStream
cluster), leaf (embedded, joining the members through stream.leaf.urls,
holding nothing), client (stream.type: nats), or unknown for a kind this
build does not know. It is derived from the node’s own stream block, not its
roles; GET /fleet/broker holds it against what the
broker itself counts.
Each node row carries its config record, which the node’s reconciler writes to the control plane’s apply status and renews every tick; the answer carries the activation every row is compared against:
| Field | What it is |
|---|---|
target_epoch, activation | The fleet’s activation pointer, read once for both: its epoch, the revision_id it names, when it was activated (at) and the summary its writer gave. 0 and null when nothing is activated or the pointer could not be read |
config_epoch, config_revision_id | The activation this node last attempted: its epoch and the revision it named. 0 and "" on a node that has reported nothing |
config_status, config_error | How that attempt went: ok, error (refused and rolled back, so the node runs what it ran before) or degraded (failed after a part that cannot be rolled back, such as a restarted MCP server, had changed, so never counted as converged); and the error, cut at 2 000 bytes |
config_applied_epoch | The activation epoch this node last applied, the applied_epoch its own health envelope carries. It differs from config_epoch exactly when that attempt failed: a node that applied 5 and refused 6 reports config_epoch 6 and this 5, so a writer judging whether a save reached a node compares the saved epoch with this. Absent, never 0, on a node that has applied nothing since it started and from a build older than the field |
config_serving_revision_id | The revision this node’s engine runs: the one its last successful apply installed, or the one it booted on. Not the attempt’s revision where that failed. Empty while it runs none, and from a build older than the field |
config_boot_revision_id | The revision this node would come back on if it restarted now: what its boot row names (a failed read of the row leaves the last answer standing, not none). It equals config_serving_revision_id except while a write to that row is being retried, and moves only once an apply has succeeded. Absent on a node that boots on nothing: one whose own database is discarded at every start (store.scratch, so a node without the data role), one that has never applied a revision and holds no offline change, and a build older than the field. What a node needs in order to start (a revision’s credentials among them) is kept against this one, never the revision it happens to be running |
config_reported_at | When the node last wrote its record. A record nobody renews ages out after four reconcile intervals, about a minute, and the row then carries none |
A node runs the fleet’s company only when it reports the activation’s epoch
and revision with ok and serves that revision. A node that refused the
fleet’s revision reports the activation’s epoch and revision with error, its
config_serving_revision_id names the revision before (which it keeps running
until it can apply the fleet’s), and config_boot_revision_id the one it would
come back on; comparing config_epoch with target_epoch alone reads it as
current. Every dashboard figure counting nodes behind on config uses this rule,
and Settings › Nodes names the revision each runs. See Reading
a stuck node.
The broker’s membership
Section titled “The broker’s membership”GET /fleet/brokerPOST /fleet/broker/remove/{node}?confirm={node}[&force=true]POST /fleet/broker/remove-peer/{peer}?confirm={peer}[&force=true]Two records say who the fleet broker’s members are, and can disagree. Every node advertises its broker kind on its presence lease; the broker’s metadata group (the raft group that places every stream and consumer) counts its voters itself. A member gone for good lapses from presence, but the group keeps counting it in every election and create until it is removed, so a three-member fleet that loses two for good can create nothing.
GET /fleet/broker answers both and where they disagree. Any node answers: a node that is not a member asks every live member at once, and group_from names the member whose view group is. A fleet on an external cluster answers external: true and lists no group (that membership is its operator’s). A group no member could report within five seconds is absent with group_error saying why, never empty. client is the ANSWERING node’s own loopback client listener, host:port, as node and kind are its own: where the nats tool reaches that member’s broker from its host with the operator key (crewlet fleet broker credential). It is absent where the node opens none (a solo member, a member with only a leaf listener, a leaf, a client of an external cluster).
The group counts each voter by its raft peer id, derived from the server’s name (the node id). A member learns another’s name only from that server, so a voter whose survivors restarted since it died is listed with no name, by its peer alone. Each node row carries its peer, and the two records are matched by peer id, so such a voter is still recognised as the live node where one is.
{ "node": "node-a", "kind": "member", "client": "127.0.0.1:41234", "external": false, "nodes": [ {"node": "node-a", "peer": "ePFsSWs4", "kind": "member", "roles": ["data", "ingress", "seats", "workers"]}, {"node": "old-1", "peer": "mTNLbbt3", "kind": "unknown", "roles": ["data", "ingress", "seats", "workers"]}, {"node": "sat-eu-1", "peer": "zYqdsRpE", "kind": "leaf", "roles": ["seats"]} ], "group": {"cluster": "acme", "leader": "node-a", "peers": [ {"name": "", "peer": "X57jblDH", "current": false, "offline": true, "active": 7200000000000}, {"name": "node-a", "peer": "ePFsSWs4", "self": true, "leader": true, "current": true, "active": 0}, {"name": "node-c", "peer": "9iReXzcw", "current": false, "offline": true, "active": 5400000000000} ]}, "group_from": "node-a", "findings": [ {"kind": "dead_member", "node": "", "peer": "X57jblDH", "detail": "the metadata group counts it as a voter, no live node is it, and the member that answered has not heard its name since it started"}, {"kind": "dead_member", "node": "node-c", "peer": "9iReXzcw", "detail": "the metadata group counts it as a voter and no live node is it"}, {"kind": "unknown_kind", "node": "old-1", "detail": "its presence does not say what its broker is"} ]}active is nanoseconds since the answering member last heard from the peer. The finding kinds:
kind | Means |
|---|---|
dead_member | A voter no live node is: its process is gone, or its node came back as a leaf or a client. Counted in every election until it returns or is removed |
not_in_group | A live node advertising a member the group does not count: still joining, or removed while it ran (it rejoins as a voter at its next restart) |
unknown_kind | A live node whose presence advertises no broker kind this build knows (a newer build’s). Counted as a member wherever that is the safe reading, a capacity seal included |
It is the fleet_broker question, so the socket’s query channel answers it too. An unreachable lease table answers 503 unavailable with a Retry-After, not a fleet with no nodes.
POST /fleet/broker/remove/{node} removes a member from the metadata group by the peer id its node id hashes to, so it reaches a member whose name no survivor remembers. nats-server answers that request only on the broker’s system account, reachable only inside a member’s own process, so the receiving node asks a live member (never the one being removed) to carry it. The answer comes once the group has committed, and names the voter, the carrying member and the group as it reads afterwards:
{"node": "node-c", "peer": "9iReXzcw", "by": "node-a", "group": {"cluster": "acme", "leader": "node-a", "peers": [...]}}What the node asks a member is signed, removal and group read alike, under the fleet keyring every state-log record is signed under, in a key domain of its own: the broker’s admission vouches for a connection, never a request, so unsigned requests could otherwise change the quorum past every check this route makes. Each request is bound to an id and a deadline inside its signature, and a member refuses an id it has taken while that deadline could still admit it. A member restarted inside that window has forgotten its ids, so a request captured off the wire and replayed there asks again for the removal it named (of a voter already removed unless it rejoined meanwhile). The answer is believed only where the fleet signed it for that request. A member that does not hold the signing key runs nothing and says so, and the next member is asked; a request the fleet did not sign is refused and logged at error on the member (fleet_broker_request_refused). The carrying member’s fleet_broker_member_removed line names who asked (author, kind and credential), read off the signed request (ADR-0031).
POST /fleet/broker/remove-peer/{peer} is the same removal naming the voter by the peer the listing shows: the form for a voter listed with no name. Its answer’s node is empty unless a live node is that voter.
A removal is refused while the voter’s node holds a live presence lease as a member, or without saying what its broker is: a running member removed from the group rejoins as a voter at its next restart. force=true removes it anyway, for a member wedged in a way that still renews its lease. A node alive as a leaf or a client under the voter’s name is removed without force: the member it was is gone and its broker never rejoins. The whole gesture is bounded by one wait (the carrying member’s commit budget and one round trip); a member that does not answer within it ends the gesture as outcome_unknown rather than another member proposing it again. crewlet fleet broker remove is a client of both routes. Both take admin and a recent proof, and both are refused during a drain. Every refusal carries detail and hint:
| Status | error | When |
|---|---|---|
400 | confirm_required | ?confirm= does not repeat the node id or the peer id |
400 | voter_invalid | The name is not a node id (or, on remove-peer, not a peer id) |
404 | not_a_member | The group counts no voter by that peer id: a typo, or a removal already made |
409 | member_live | The voter’s node holds a live presence lease as a member (or does not say); stop it first, or force=true |
409 | membership_changing | Another membership change is still committing; ask again once it has |
409 | external_broker | The fleet’s broker is an external cluster, whose membership is its operator’s |
503 | no_leader | Nobody answered as leader for the whole wait. The request is retried every second, so an election alone does not end here: the group has lost quorum and can change nothing about itself. A removal whose answer was lost may still have committed, so read the group first |
503 | no_member | No live member could carry the removal: including when the only live member is the one being removed (it never carries its own), and when every member asked holds no key the request is signed under (bring secrets.keys into agreement across the fleet) |
504 | outcome_unknown | The carrying member did not answer, answered with nothing this node can believe (not signed by the fleet, or not the answer to this request), or proposed the removal and then couldn’t read its own view of the group to confirm it (its JetStream went off); it may have committed first, so read the group before asking again, and no other member proposes it meanwhile |
500 | broker_remove_failed | Anything else; read the group before asking again |
The wake feeds’ dead letters
Section titled “The wake feeds’ dead letters”GET /feeds/dead-lettersPOST /feeds/dead-letters/{id}/discard?confirm={id}Every domain whose records wake somebody (Worklet’s, Doclet’s, chat’s and Gitlet’s) has a wake feed: one durable consumer the fleet’s data nodes share. A record no node could read in the hour it was handed back is kept as a dead letter in CREWLET_DLQ, its sealed frame inside, until the first node whose feed starts able to read it replays it or the stream’s age bound lets it go (Dead letters). These routes are an operator’s view of those entries and the one decision about them a person makes. A wake the notification service’s inbound group passed and no node took is that subscription’s dead letter, not a feed’s, so neither route lists or discards it. Every node able to read it replays it: one already running within a few seconds of its keep, otherwise the next such node to start; inbound_dead_lettered is raised while it waits.
GET /feeds/dead-letters answers every wake feed this build declares, in one order, whatever logs the answering node runs: the entries are the broker’s, so every node answers alike. at is the answering node’s clock, which each entry’s age and time left are read against. An entry is listed by its id (the broker’s sequence for it, unique across every dead-letter subject and never reused, which is what a discard names) and by what its feed kept of the record:
- the
stream,positionandgenerationit was delivered from, thekeyit arrived on and itsop_id(generationandop_idare absent where the node that gave up never read the envelope); - the
reasonno node read it (newer_record,newer_envelope,unknown_keyoruntranslatable) and thedetailthat node met; - the record’s
stored_at, how many times it wasdelivered, when it wasdead_lettered_at, and when the brokerkept_atthe entry andexpires_atlets it go.
All of it is the header the feed kept the entry under, read without the entry’s frame, so no listing moves one. A feed’s entries are read from one copy of the dead-letter stream, which can be a moment behind the leader, so an entry kept a moment ago can be missing from one answer and present in the next. An entry a newer build kept is still listed, by its id and the broker’s instants, with decode_error saying why this build cannot read it, and it can still be discarded. A feed whose subject could not be listed carries list_error and entries: null, never an empty list.
{ "at": "2026-11-09T12:00:00Z", "feeds": [ {"source": "work", "group": "crewlet-tracker-feed", "subject": "dlq.changefeed.work.crewlet-tracker-feed.…", "entries": [ {"id": 41, "source": "work", "stream": "CREWLET_TRACKER_LOG", "position": 1234, "generation": 1, "key": "crewlet.tracker.task.T-1", "op_id": "0192f4c7-…", "reason": "unknown_key", "detail": "the frame is sealed under a key this node does not hold (it holds [k1])", "stored_at": "2026-11-09T09:00:00Z", "delivered": 312, "dead_lettered_at": "2026-11-09T10:00:00Z", "kept_at": "2026-11-09T10:00:00Z", "expires_at": "2026-12-09T10:00:00Z"}, {"id": 57, "source": "work", "kept_at": "2026-11-09T11:00:00Z", "expires_at": "2026-12-09T11:00:00Z", "decode_error": "changefeed: the dead letter is version 2, and this build reads up to 1: a newer build kept it"} ]}, {"source": "page", "group": "crewlet-pages-feed", "subject": "dlq.changefeed.page.crewlet-pages-feed.…", "entries": null, "list_error": "nats: no responders available for request"}, {"source": "chat", "group": "crewlet-chat-feed", "subject": "dlq.changefeed.chat.crewlet-chat-feed.…", "entries": []}, {"source": "code", "group": "crewlet-code-feed", "subject": "dlq.changefeed.code.crewlet-code-feed.…", "entries": []} ]}POST /feeds/dead-letters/{id}/discard gives one entry’s wake up for good, for an entry no build will ever read (a record sealed under a key retired from every node, or one no build translates), which would otherwise keep feed_dead_lettered raised for the whole retention. confirm repeats the id. The node lists the wake feeds’ subjects until one holds the id and drops it there, through the same ledger a replay’s drop passes, so it takes the claim on the entry’s going that the alarm reading’s expiry count takes, and no node counts it as a wake the retention lost. It reaches only the wake feeds’ own subjects: a subscription’s poison under another dlq. subject is never discarded here. The answer is the dropped entry, in the listing’s shape. The node logs changefeed_dead_letter_discarded at warn, naming who pressed it (the author, their kind and the credential), and counts crewlet.tracker.feed.dead_letter_discarded. An entry a replay, its expiry or another discard took between the listing and the drop was not removed by this request: it is answered no_dead_letter and counted nowhere, since a replayed wake was published. crewlet feeds discard is a client of it.
Both routes take admin, and the discard a recent proof. The discard is refused during a drain; the listing is served through one. Every refusal of a discard carries detail and hint:
| Status | error | When |
|---|---|---|
400 | confirm_required | ?confirm= does not repeat the id |
400 | dead_letter_invalid | The id is not a whole number above zero |
404 | no_dead_letter | No wake feed’s subject holds the id: never an entry, one a replay, its expiry or another discard took first, an entry on another dlq. subject, or one kept so recently the listing’s copy has not caught up (a repeated discard finds it) |
503 | unavailable | A feed’s subject could not be listed and no other holds the id, so nothing was discarded; or the broker did not answer the drop, which may have landed. A Retry-After where waiting may clear it; list the dead letters before asking again |
500 | dead_letter_discard_failed | Anything else; list the dead letters before asking again |
GET /executors
Section titled “GET /executors”Every seat’s executor run the engine still
holds, oldest first — launching, running, awaiting_clarification,
reseed, answered and resumed run records. An answered run has a
person’s reply recorded as the answer to its question — or, where
answer_refused is set, a reply too large to take recorded as the question’s
refusal, with none of its words — and is owed the resume that record drives; it is no longer waiting on anybody, so audience= — what
is waiting on one person — lists only runs still waiting (awaiting_clarification
or reseed).
A run that has settled, whether its turn finished, it was lost or a person
stopped it, is not listed because it has no record: its record is deleted once
its box is reclaimed. How it ended is on the event stream, in the resumed
turn’s own events, an executor_failed event naming the reason, or a
executor_stopped event naming who stopped it.
A launching executor is one whose launch has started while the turn that
started it is still unwinding, so the parked turn state its collection reads
is not on the row yet; it is listed but never polled, because a row nobody
lists is a box nobody reclaims.
This query reads the durable row directly. The live projection’s panel is
reconciled against the same record every 30 seconds, but it carries only what
a running-runs panel draws. This board needs the row’s own facts: the branch,
the placement, the pause TTL, whether a box still exists, and the bridge’s
call log. It also lists resumed runs, which the panel drops because their
turn has already taken back the result. A reseed run (pause expired, box
reclaimed, work preserved on a pushed branch) is listed on both.
{ "runs": [ { "turn_id": "<uuid>", "launch_id": "<uuid>", "agent_handle": "eng", "role": "Engineer", "status": "awaiting_clarification", "harness": "claude-code", "provider_key": "default", "model": "sonnet", "browser": "ready", "task_description": "Add retry to the webhook client", "question": "Which backoff ceiling should I use?", "question_context": "The webhook provider retries for **24 hours**; see the [retry spec](https://example.com/retry).", "decision": { "question": "Which backoff ceiling should I use?", "options": [ {"id": "five-min", "label": "Five minutes", "detail": "Inside the provider's own retries."}, {"id": "one-hour", "label": "One hour"} ], "recommended": "five-min", "rationale": "The provider retries anyway.", "role": "approver" }, "audience": "manager", "audience_handles": ["founder"], "audience_fallback": false, "branch": "crewlet/eng/retry", "trace_id": "<hex>", "owner": "core-1:8f2a", "box_exists": true, "paused_at": "2026-06-08T07:30:02+00:00", "pause_ttl_seconds": 3600, "started_at": "2026-06-08T07:12:44+00:00", "updated_at": "2026-06-08T07:30:02+00:00", "answerable_in_chat": true, "declined_answers": [], "ending": null } ]}question is what a parked run asked, in one sentence; question_context is
its context in Markdown, empty when it gave none; and decision is the choice
it asks for, in the shape a work item’s decision
has (never with inform), or null for an open question answered in words.
All three are the run’s body, sent to the people its question is put to as the
question always was, and answered with answer_executor
(choice names one of decision.options).
A run whose question is a call held for approval (Asking a person before a tool runs)
also carries held_call, {id, server, tool, raw, digest, held_at, fixed, approvers, act, delegation, lapses_at} (lapses_at set for a growth act
alone, a day after held_at), sent with
the question to the people it is put to, and held_arguments, what the call
would send, opened from its seal under this node’s fleet keyring (null where
it does not open here), sent only to whom the run’s body goes (an
administrator and the seat’s lead): as sent to a reader who may answer the
call while it waits, redacted to every other. Both are
absent on any other run. Its decision offers once, always and deny,
and it is answered only with POST /mcp-approvals/{id}:
answer_executor refuses it.
declined_answers names the answers the run’s question let go of, by the id
of the delivery each arrived in, which answer_executor answers as answer_id. An
answer named there was not used: the run could not be resumed with it and
waits on its question again, so the person who gave it is asked to answer
again rather than left looking at a question that never moves.
answer_ids, answered_by and answered_at name the answer recorded on the
run, by the deliveries it arrived in, who gave it (as its seal opens on this
node) and when — never what it said. answer_refused is set where that record
is a refusal (ADR-0114):
a reply in the conversation too large for the run to take as its answer, which
closed the question with none of it reaching the run: the run is owed a resume
that tells it the reply did not reach it, so it asks again or carries on. A
refusal let go of before any turn told the run (every attempt at that resume
failed, or its seal does not open) leaves the run waiting on its question
again, with answer_refused null and the reply’s id among
declined_answers. It carries {messages, bytes, max_bytes} — how many
messages the reply was, what it came to as the run’s record would hold it, and
what an answer may — and never the reply’s words, which no record of the run
keeps; it is null on every other row.
launch_id names the job the row holds now. A turn can launch more than
one — a reviewer that sends the work back, or a person’s answer carrying a
parked run on, relaunches the executor under the same row — and
executor_tail is asked by it, so a run’s page polls the live
output of the job it shows rather than of whichever replaced it.
browser is ready or withheld, the job’s browser
as its launch readied it, sent to every reader as the run’s status is, and
absent for a job whose seat has no browser; why one was withheld, and the
state it is in, are executor_browser’s, read by the seat’s lead
and an administrator.
provider_key and model name the member of the seat’s executor chain the
job was launched on, which a fallback at launch makes other than the chain’s
head. provider_key is the company’s configuration and is sent to an admin
alone; every other reader, a seat’s lead included, is told the model the job
runs under and not the entry. bridge_calls is always an array on a row the
store answered — every run’s tools reach it over the bridge, so an empty one is
a run that has called nothing yet — and absent only where the run’s body is
withheld from the reader. A call a person approved once the run asked for it
(Asking a person before a tool runs)
is among them, marked approved: true, with no args and no output: the
run’s resume made it with the arguments the run held sealed, and handed its
result to the job that carries the work on sealed too. The call the run held
for that approval comes before it, marked held: true, with no args, which
ride the run’s row sealed beside its question, and with failed: true, since
nothing it asked for happened: it is the run’s question, not a failure, and
the executors board draws it so.
A call’s args and output are what the run’s log keeps of them, which is
held to the call’s share of the log (what a run’s record and its log
keep): past it, the
arguments keep their shape with their largest values left out, each replaced
by a string marker such as (1.0 MiB not kept on the run's record, digest 1a2b3c4d), and the output keeps its opening followed by … and how much more
was not kept. args_bytes and output_bytes are set only on such a call, to
the size in bytes of the whole arguments and the whole output, and absent where
the log keeps the call whole: decide “partly kept” by them, never by
reading a marker. args and output are served redacted, the log itself kept
as the run’s harness was handed it: args value by value, still one JSON
object, args_bytes still the logged arguments’ whole size, and an output the
log cut as the redaction of its opening’s complete lines, its output_bytes
the size that redaction is the opening of. digest is the call’s identity, the
SHA-256 of its whole arguments as the run counts its calls, absent on a call no
tool admitted (one refused after the run’s tools closed, or whose arguments did
not parse) and on a held or approved call, whose arguments ride the record
sealed and are never digested in the clear. args_unparsed: true marks a
call whose arguments did not parse: the bridge answered it unrun, with failed: true,
holding no object of what the model wrote, so it has no args, as a call made
with none has none. It is a call made with arguments that are not known, and
the executors board says so rather than drawing it as one made with none;
absent on every other call and on a call an older engine recorded. call_id is the id the run’s harness gave the
call, as its box sent it: Claude Code’s tool_use id, the id its own session
names the call by: a relaunch that continues a cut-off Claude Code session asks
a reading of its archive which calls it holds by this id, and tells the session
only the rest. It is absent where the harness sent none (OpenCode), on an
approved call, on a skill load a harness’s hook reported, on a call an older
engine recorded, and where the id was longer than 64 bytes or held anything but
letters, digits, - and _, which is never cut. It is the box’s word, not the
call’s identity: two calls may carry one, and neither is then asked about. appended is the call’s place, from
1, in the order the round’s log took its calls, which is not the order the run
made them in when it made several at once: a continued session is told every call
appended after its save, but, of a session cut off, those a reading of its
archive finds it holding (A relaunch continues the turn’s
session).
It is absent on a call an older engine appended. late: true marks a call the
round’s log took only after the job that made it was replaced by a relaunch
that carried the round on — one still running as the relaunch was readied,
which no brief of the round told: the job working on the round is handed it as
an item, and a continued session is told it whatever its save point but where
its session took it as that item; it is never the round’s submission, and what
it cost is charged to no job. The call a person approved is never marked. abandoned: true marks a
call nobody waited for by the time it returned — its harness had given up on
it and cancelled the request, or the job’s session on the bridge ended while it
ran and answered it as still running: it ran and its effect happened, while the
session that made it holds it with no outcome, as timed out or as still
running, so its job is handed it as an item while it works, and a continued
session is told it whatever its save point but where its session took it as
that item. Both are absent on every other call.
bridge_calls_elided counts the calls of the round the log does not list —
dropped from the middle of a long run’s log; a call whose own append reached
the log only with a later one is listed, once, as the call it is — and
bridge_elided_calls says what
they were: one entry per tool and argument digest, {name, digest, calls, failed}, sent to whom the run’s body is sent and always an array beside
bridge_calls. An entry with no digest counts calls to its tool whose
arguments’ identity was not kept, and one with no name calls whose tool was
not kept either — which is also how calls an older engine dropped, keeping a
count and no entries, are served. bridge_calls_told names the late and
abandoned calls of the log that the job working as each landed took into its
own session, one {appended, launch} each: the call’s appended place and the
job whose session took it, never a word of the call. A continuation of that
session is not told such a call again; the executors board tags it “told to its
run while it worked”. It lists only calls of the log’s own round, is sent to
every reader beside launch_id, and is always an array, empty for a reader the
run’s body is withheld from, who is sent no calls to name.
box_exists and paused_at stand in for the sandbox id: a board wants to
know that a box exists and that it is currently paused (and holding its
host’s memory and disk), not which box it is. paused_at is the answer the
pause reaper
acts on rather than the raw stamp, so a run parked on a question whose pause
instant never reached its row still reads as held: that box still holds its host’s memory and disk,
and a board drawing the stamp alone showed it as a live one. Both read as no
box, and paused_at empty, once the run’s ending is decided to reclaim it.
ending is null on a run nobody has ended, and {at, reason, stopped_by}
on one whose ending is decided and not yet finished: when it was decided, the
reason it announces (empty for a run whose turn came back, which announces
nothing; executor_failed carries why a lost run was lost) and who stopped
it, for a person’s stop. Such a run is over, and its status is the one it
was ended in: its record waits only for the ending’s last steps, which on an
engine that records every turn’s end include recording that
end once the
turn’s captures have settled, and can take minutes, and up to about five
hours and seventeen and a half minutes from the moment the end first sees a read standing
by for one of them, where a store answers each change and read of a run’s record at
the slowest pace a link is allowed. The seat’s next work
waits behind it. answerable_in_chat is false
for a run whose turn was triggered by something other than an inbound
message — a schedule’s fire, a task assignment, an A2A wake — because the
resume path matches an inbound message’s conversation identity against
the one the run was parked with. A task assignment’s and an A2A wake’s runs
stored no conversation at all: their trigger names neither key, so neither
is stamped and neither reaches the row. A fire’s run stored its schedule’s
conversation (schedule/…), which every fire of the schedule carries and no
inbound message does, so no delivery on it is offered to a parked run: the
schedule’s next fire is never taken for the answer to its last fire’s
question. Telling somebody to “reply in the thread” would send them to a
thread that does not exist. Such a run is still answerable:
answer_executor names it by its turn_id instead.
audience is the harness’s own label for who should answer —
requester, manager, team, or a name it typed. audience_handles is
that label resolved against the org chart when the run parked: the seat
whose message or ask woke the turn, the seat’s manager, its unit’s lead and the
people in that unit, or the one colleague an exact match names.
audience_fallback is true when the label named nobody the chart has and the
question was put to the seat’s lead chain instead (its managers, or the leads
of the units above it). Both are empty on a run that is not parked. See
who is asked.
Every row also says where the run stands for the caller, so no screen
decides it for itself: put_to is who it waits on now, by handle (its
delegates while a delegated call waits on them, else audience_handles);
put_to_you is whether it is put to the caller’s own record; may_answer is
whether the caller may answer it, decided by the authority the answer itself
is (release.approve, ssh.operate.approve or tools.approve for a held
call, answer_executor for a question), at the read’s proof, so a lapsed
step-up still shows what the caller may answer; and needs_you is whether it
waits on them: put to them, or theirs to answer and escalated by its delegates
or past their 15-minute deadline. All four are empty or false on a run that
waits on nobody.
?audience=<name> narrows the board to the runs whose question is put to
one person and still waits for them (a run parked on it, its ending not
decided), the name resolved as a personal
question’s is: absent or either
of your own names is your own record, somebody’s login is the seat the
identity directory binds them to — never read as a seat’s handle, and asked of
the directory only once the caller may look — and any other name is the seat
it addresses, matched on its handle. A login that holds no seat
is put nothing, and answers an empty board. It is a filter over the board and
not a personal read, so it has no scope rule beyond that: the unfiltered board
already names every run’s audience. A run whose question resolved to nobody —
the label named no one the chart has and the seat has no lead chain, or the
node held no company when it parked — matches no one.
The parked turn’s frozen state — the context the run’s turn re-enters with,
kept on the run’s record — is deliberately not returned: it is the largest
thing the record holds, and every prompt in it is already reachable through
the event store. bridge_calls is not on the record at all: it comes from the
run’s bridged tool log, kept beside the record under a key of its own, and is
read only for a reader shown the run’s body — one read of the log from the
coordination store’s leader for each run that reader is shown, a run with no
calls included, and none for a run whose body is withheld.
The run record lives in the fleet’s coordination store, which every node
opens, so every node answers with the fleet’s runs. A company with no sandbox
configured does not register the question at all, so the route answers 404
with unknown_query rather than an empty board; a record, or a run’s
bridge_calls, that could not be read answers 503 with a Retry-After,
because “no run is parked” is a claim — and a run drawn with no calls one
that it did nothing — and a store blip is not evidence for either.
GET /executors/{turn_id}/browser/frames
Section titled “GET /executors/{turn_id}/browser/frames”One job’s browser as its box
shows it, streamed to a person: its screen, a JPEG at a time, and its state,
every tab’s title and address included. It is how the dashboard shows an
agent’s browser. A script reads the state alone, with no word of the page,
through executor_browser (GET /executors/{turn_id}/browser, the
questions).
Who may open one. executors.browser.watch on the run’s seat: its lead or
admin, a person’s alone. An agent seat is refused 403 seat_refused and Ask
Crewlet 403 assist_refused before anything is read; anybody else is decided
on the seat the run’s record names, as executor_browser is. A stream is
opened only by a request that names its reader in X-Crewlet-Reader, as the
dashboard’s requests do: one carrying the session cookie and naming none is
refused 403 csrf_origin before anything is decided or recorded. A script
sending an access token is not asked to name one.
Parameters. launch_id, the job, exactly once and a UUID. Any other
parameter is refused 400 bad_params, so a dashboard newer than the node is
never streamed short.
Before the stream, each refusal is made at its step, in this order, so a refusal says every step before it passed:
401 invalid_tokenfor a request with no valid credential, or another of the guard’s refusals (the auth note under Routes);403 seat_refusedfor an agent seat, or403 assist_refusedfor Ask Crewlet;403 csrf_origin;400 bad_params;- the decision on the run’s seat: its own
403, with itsreasonand thegrantsthat would admit, or503 unavailablewith aRetry-Afterwhere this node cannot decide yet or cannot read the run’s record (a caller who leads nobody is refused before the record is read); 409 not_runningwith the record’sstatus(replacedfor a launch a later one replaced,endedfor a run whose ending is decided, whatever status its record still holds, the status of a run that no longer runs and keeps no box,resumedfor the claim of a job lost with a box nothing reads again among them, empty where no record is left), or409 no_browser, “This run has no browser to show”, withoutcome(no_browser,withheldorlive_view_unavailable), the record’sreasonandcause, thefloorand the browser’schromium_major;503 unavailablewith aRetry-Afterfor a watch whose start could not be recorded;503 unavailablewith aRetry-Afterwhere this node’s followers closed as it shuts down: the watch’s start was recorded, and its end is recorded asdraining.
A launch still starting, a running job and a box the record keeps
(box_paused: a run its collection claimed, or one parked on a question) start
the stream, unless the run’s ending is decided.
The response is 200 with Content-Type: application/vnd.crewlet.browser-stream, the headers a repository’s download
carries (a Content-Security-Policy with sandbox, X-Content-Type-Options: nosniff, Cross-Origin-Resource-Policy: same-origin), Cache-Control: no-store and X-Accel-Buffering: no: no browser renders it as a page, and a
proxy passes each record on as it is written. Each record is a four-byte
big-endian length, that many bytes of JSON head (at most 256 KiB, its < and
& written as themselves), then the head’s bytes of payload:
kind | Head | Payload |
|---|---|---|
hello | bytes: 0, v (1), session (the watch, which its two audit records name), turn_id, launch_id, max_frame_bytes (524,288) | none |
frame | bytes, the JPEG’s, and frame: {v, boot, seq, tab, capture, at_ms, width, height, device_width, device_height, offset_top, page_scale, bytes} | the JPEG |
view | bytes: 0, and view: executor_browser’s answer, with watchers[].you set for the reader, plus tabs (each {id, title, title_cut, url, url_cut, front, loading, crashed}), boot and rev | none |
keepalive | bytes: 0, after 15 s with no other record | none |
end | bytes: 0, reason; and where a request before the stream would have been refused for the same cause, refusal, that refusal’s envelope, and refusal_status, its status | none: the response ends |
The newest view always comes before the newest frame, and a reader slower than
the screen is handed the newest of each, never a backlog. A box the record
keeps ends nothing: the stream shows box_paused through the run’s collection
and a park, until the record names the run’s next launch, releases the box or
claims a job lost with a box nothing reads again, or the run’s ending is
decided.
How it ends. end’s reason is not_running (the record no longer runs
this job or keeps its box: the next launch replaced it, the box was released,
the job was lost with a box nothing reads again and claimed, or the run ended,
which a person’s stop or a loss does once it is decided, not once its box is
reclaimed; refusal is the 409 not_running), no_browser (the job no longer
has a browser to show; refusal is the 409 no_browser with its detail),
refused (the person’s sign-in ended, 401 invalid_token; the company no
longer holds their own seat as a human seat, 403 seat_unavailable naming it;
or they no longer lead the seat, 403; refusal is that answer), draining
(this node is shutting down; opening the stream again reaches another),
failed (this node could not go on: a sign-in change it could not decide, or a
follower that could not listen) or superseded (the person opened a fifth
stream of this job on this node, which ends their oldest). A reader that stops
reading is cut at the pace every streamed response is held to, thirty seconds a
mebibyte (Project files), and one that left is told nothing
more.
One watch, two records. Each stream is one watch session, audited as
executor_browser_watched (the runtime audit):
started before the seat’s holder is asked, so before anything is captured or
shown for the watch, and ended, saying how it ended and how long it lasted. A
start that cannot be recorded refuses the stream 503 unavailable with the
holder never asked, so nobody watches unrecorded.
GET /budgets
Section titled “GET /budgets”Backs the dashboard’s Budgets screen and crewlet budgets show. Every scope (the company, and each agent seat) states all three calendar windows, the day, the ISO week and the month on the company’s clock, cut at the moment of the answer:
usedis the fleet’s shared counter for that window, in the coordination store, written by every node running the company and surviving restarts. The engine enforces against it, and it is the counter the live token meter pushes. A window no ceiling caps is still counted.limitis configuration (the company’s and a seat’s, from the active revision) and absent where no ceiling caps the window, never0, which would state a range of nothing that is already full.refused_atis when a capped window last turned a call away (a refused charge, or work turned away unsent because the window was already full: a turn’s next call, a parked delivery, a person’s question, a reflection pass). Kept in the same counter, cleared by the scope’s next admitted charge or the window turning over, and absent while it has not happened.stateis the engine’s judgement,refusing,nearorok, exactly as on the live meter;near_fractionbeside it is the one threshold behindnear(0.9), for a screen that draws it as a mark.
Where the counter is already on a later window than the moment of the answer (a peer’s clock a few seconds ahead across a boundary, or the company’s timezone moved west), the row states the later window’s spend, because that is what the gate refuses against. Each window’s allowance comes back when it turns over; no route resets a counter, and room before then is made by raising the ceiling.
assistant is the ceiling every person’s Ask Crewlet questions are held to (assistant.token_budget): its three windows, each with the limit every person is held to where one is set. used, refused_at and state in it are the CALLER’s own spend against that ceiling, and counted says whether they are real: a person’s Ask Crewlet spend is counted on a scope of their own only while the company caps it, and a caller who is not a person spends nothing through Ask Crewlet. Where counted is false every used is a zero nobody measured and a client draws no figure. It is here because it is what refuses a person’s question, and the Budgets screen is where that refusal’s remedy sends whoever may raise it.
What a seat spent over a window you choose is not here: that is the per-agent row of the spend breakdown, a different span that must not be divided into a ceiling. The ceiling and the durable counter are the pair that can be.
{ "timezone": "Europe/Berlin", "durable": true, "near_fraction": 0.9, "org": { "windows": [ {"period": "day", "window": "2026-06-08", "starts_at": "2026-06-07T22:00:00Z", "resets_at": "2026-06-08T22:00:00Z", "used": 1284410, "limit": 5000000, "state": "ok"}, {"period": "week", "window": "2026-W24", "starts_at": "2026-06-07T22:00:00Z", "resets_at": "2026-06-14T22:00:00Z", "used": 4015220, "state": "ok"}, {"period": "month", "window": "2026-06", "starts_at": "2026-05-31T22:00:00Z", "resets_at": "2026-06-30T22:00:00Z", "used": 9120045, "state": "ok"} ] }, "seats": [ { "agent_id": "<uuid>", "role": "Engineer", "handle": "eng", "windows": [ {"period": "day", "window": "2026-06-08", "starts_at": "2026-06-07T22:00:00Z", "resets_at": "2026-06-08T22:00:00Z", "used": 102120, "limit": 100000, "refused_at": "2026-06-08T07:29:51Z", "state": "refusing"}, {"period": "week", "window": "2026-W24", "starts_at": "2026-06-07T22:00:00Z", "resets_at": "2026-06-14T22:00:00Z", "used": 301877, "state": "ok"}, {"period": "month", "window": "2026-06", "starts_at": "2026-05-31T22:00:00Z", "resets_at": "2026-06-30T22:00:00Z", "used": 702311, "state": "ok"} ] } ], "assistant": { "counted": true, "windows": [ {"period": "day", "window": "2026-06-08", "starts_at": "2026-06-07T22:00:00Z", "resets_at": "2026-06-08T22:00:00Z", "used": 41200, "limit": 200000, "state": "ok"}, {"period": "week", "window": "2026-W24", "starts_at": "2026-06-07T22:00:00Z", "resets_at": "2026-06-14T22:00:00Z", "used": 120400, "state": "ok"}, {"period": "month", "window": "2026-06", "starts_at": "2026-05-31T22:00:00Z", "resets_at": "2026-06-30T22:00:00Z", "used": 380900, "state": "ok"} ] }}durable is false when the shared counter could not be read, and every window list is then empty: an unreadable counter is not one that reads zero, and without the flag a coordination blip would render every seat at the bottom of its ceiling. Human seats have no row, because they spend nothing.
Exhaustion is the engine’s refusing, never a ratio a client computes, so every surface and the budget park agree on which windows can take another round. A refused round is counted like any other (the vendor billed it), so a window that refused one reads past its ceiling by that round: the Engineer above had 99 120 of 100 000 when a 3 000-token round was refused, and reads 102 120.
/operate/*: the operate grant
Section titled “/operate/*: the operate grant”The routes whatever runs the engine calls with the operate grant, Tier A’s operate block, and with no other credential: GET /operate/capabilities, and under /operate/v1/ the reads health, revision, fleet, integrations, usage, members, schedule and limits and the writes POST backup, POST drain, POST stop-boxes and PUT limits. Exempt from the guard, which never resolves the grant, so the grant is 401 on every other route and every other credential is 401 here, a refused one counted as a failed attempt by source. A caller outside operate.allowed_sources is answered 404 no_route, grant or not. Every answer is no-store. The guide, Operating an Engine Through Its Operate Grant, has each answer, the versions and the refusals.
POST /backup
Section titled “POST /backup”Copies this node’s durable state into ?dir=, a directory on the engine’s host: both store files, every JetStream stream and coordination bucket, and every object holding a company file that a live row of the store copy names or that a record a restore replays from the copy names.
curl -X POST -H "Authorization: Bearer $CREWLET_API_TOKEN" \ "http://localhost:8000/backup?dir=/var/backups/crewlet/2026-08-30T18-00"{ "taken_at": "2026-08-30T18:00:00Z", "finished_at": "2026-08-30T18:00:01.412Z", "node_id": "node-0", "engine_version": "v0.1.0", "stores": [ {"estate": "node", "file": "store.db", "source": "/data/company.db", "bytes": 258048, "sha256": "…", "migrations": ["0001_events.sql", "…"]}, {"estate": "replicated", "file": "store-replicated.db", "source": "/data/crewlet-replicated.db", "bytes": 131072, "sha256": "…", "migrations": ["0001_tracker.sql", "…"]} ], "objects": {"dir": "objects", "objects": 40, "bytes": 41943040, "replayed": 2, "reused": 36, "reused_from": "/var/backups/crewlet/2026-08-29T18-00/objects"}, "streams": [ {"name": "CREWLET_AGENT", "file": "streams/CREWLET_AGENT.snapshot", "bytes": 1087, "messages": 5, "config": {…}, "state": {…}} ]}The answer is the manifest, also written into the directory as manifest.json; its presence marks the backup complete. A failure anywhere leaves the directory without one, because a backup missing an estate is unrestorable rather than partial.
The route exists because the state is reachable only from inside the engine: the store is locked to the engine’s process (the driver refuses a second process on a database file) and the embedded broker binds no socket. crewlet backup is a client of this route.
It is synchronous and can take a while; the duration is a property of the data. A job outliving its request would need somewhere durable to record itself, and the only place is the store being copied. Cutting it off is safe: the store copy is renamed into place only after it verifies and the manifest is written last, so a client that gives up leaves an unfinished directory, not a false one.
Eight refusals:
- 401 without a credential, and 403 without
admin. It writes every credential the company holds to a path the caller chooses, so only the deployment’s own control reaches it. - 409
backup_running: a backup is already running on this node. One runs at a time: the trim hold is keyed on the node, so two would share one pin and the first to finish would release the other’s. Nothing is written, not even the directory; ask again once it finishes. - 400 for a destination this node cannot use: relative, longer than 1,024 bytes (the fleet’s backup register names the directory,
coord.MaxBackupDirBytes), already occupied, one this host cannot create, read or make private (a path through a regular file, a missing or unwritable parent, a read-only mount), or a path the database engine mishandles. The reason is returned indetail, unlike every other route here, because it is the caller’s own command to fix. A disk that fails or fills while the directory is prepared is the node’s failure and answers500; so does a database volume with no room for the write-ahead log a copy would hold back there, refused before anything is copied, with the reason in the node’s log (see Backup). - 503
objects_unreachable: the store copy names objects holding the company’s files that the object store did not answer for. Check that the node reaches the store and take the backup again.Retry-After: 4is the broker’s own election timeout: the default store is the data nodes’ NATS bucket, which answers no sooner than its group elects a leader. The backup is refused rather than written without those objects, which may be intact there; the first object still unanswered after four asks stops the copy. An object the store answered it does not hold, or holds as bytes other than the file records, is lost whatever the backup does. It is listed in the manifest’sobjects.lost(each as{"object", "named_by"},named_bybeing the file that named it) rather than refused, so one lost file never stops every later backup and, with them, the trim (see Backup). It is listed only where the restored rows name it: a file the copy names that a later record replaced or removed is owed by nothing a restore brings back. On an S3 bucket each object is copied intoobjects/under the bucket’s own layout and checked against its row as written. On the defaultnatsbackend the objects are in a stream the backup snapshots after every other (objects.streamnames it; no object is copied on its own); afterwards the store is asked about each owed object, so the same refusal andlostlist apply. Either way the backup owes, besides the copy’s own, every object a record the restore replays from the copy names (a file written while the backup ran);objects.replayedcounts those. An object only a retired or derived row names is neither copied, asked after nor listed. - 409
record_unreadable: a log the backup reads past its store copy holds a record this build cannot read that may write a file, such as a newer build’s during a rolling upgrade. Refused rather than guessed: take the backup from a node running the build that wrote the record, or from this one once upgraded. Thehintsays so. - 409
record_unverified: a record past the store copy is signed under a key this node’ssecrets.keysdoes not hold, so the node cannot vouch for what it names. Add the key and restart the node, or back up from a node that holds it. Thehintsays so. A record no key of the fleet opens is bytes no node signed and refuses the backup as500 backup_failed, the reason in the node’s log. - 409
log_recreated: this node’s store copy is keyed to an earlier instance of a log since recreated, so its position names records on a log that no longer exists. Back up once this node has re-keyed to the live log, or from a node that has. - 503
log_gap: a log a restore replays no longer holds every record between the copy’s position and its snapshot (the trim ran past the copy, or the log has a hole). Take the backup again;Retry-After: 1because the next take makes a fresh copy past the gap and nothing has to happen in between (a second is the smallest wait the header carries, and zero would say not to come back). If refused the same way, the trim read past the backup’s hold: look forstatelog_hold_not_renewed(a missed renewal) in the node’s log. - A copy without the stream estate. A node that dialled an external NATS cluster cannot snapshot the streams, so its manifest carries the store copies alone and
crewlet backupsays where the rest lives. Back that half up at the cluster, from the same moment.
Every backup that began copying leaves a backup_requested event naming the caller, the node, the directory and whether it finished (a failed one too, since it may have left files). A destination refused with 400 and a 409 backup_running are answered before a byte is copied and leave no event. Every other refusal (record_unreadable, record_unverified, log_recreated, log_gap, objects_unreachable among them) arrives with part of the copy in the directory and is recorded as a failed backup: see the runtime audit.
The engine sets no deadline; a client should give a long one. crewlet backup and the dashboard both wait up to 12 hours, because the copy is bounded by the store, the stream estate and, on s3, the company’s files, whose first copy is hours over a modest link; giving up early would report a failure while the engine finishes a good backup. In the dashboard: Settings › Backups & retention › Take a backup.
POST /objects/migrate
Section titled “POST /objects/migrate”Copies every object the company’s files name from the fleet’s object store into an S3-compatible bucket, plus every object a derived row names (which the engine could rebuild, but would on every node), and on the final pass moves the fleet’s record of where its files are. crewlet objects migrate --to s3 is a client of this route; the procedure is in Moving the files to a
bucket.
| Parameter | Meaning |
|---|---|
target | Required. Absolute path on the engine’s host to a Tier A file whose store.objects block names the bucket (backend: s3): the file every node runs with after the move. Its ${VAR} references resolve from the engine’s environment, so the bucket’s credential never crosses this API. |
final | true runs the final pass, which seals the nats bucket and moves the fleet’s record. Without it the pass only copies. |
{ "from": "nats", "to": "s3:https://s3.example.com/crewlet-files/acme/", "final": true, "sealed": true, "moved": true, "direct_upload": "available", "pass": {"referenced": 18211, "present": 18190, "copied": 21, "copied_bytes": 4194304, "unreadable": 0, "complete": true, "derived": {"referenced": 64, "present": 61, "copied": 3, "copied_bytes": 12582912, "unreadable": 0}}, "next": "The fleet's files are in …"}pass.present counts objects the bucket already held at their size (and digest, where the provider keeps one), so a stopped pass resumes by running again. pass.unreadable counts objects the fleet’s store could not give back whole (missing or damaged), named in pass.unreadable_files; no copy can bring them back, and objects_missing already counts them. pass.derived holds the same counts for the objects derived rows name (live, retired and derived
references), copied like a file’s. An unreadable derived object is counted in pass.derived.unreadable, named nowhere, and never holds the final pass up: nothing is lost, the engine builds it again.
It is synchronous and runs to its end even if the client gives up, for the backup’s reason. It needs admin and a recent proof of identity, like every deployment control. Refusals:
- 409
objects_migration_refused, reason indetail: a target that is not an absolute path, does not load, names no bucket, names the store the fleet already uses, or fails the bucket’s probe; a node holding no copy of the company’s records (run it against a data node); and for the final pass, a node not inmaintenancemode, any node still admitted to publish, an estate this node has not applied to the end or holds incomplete, or rows it cannot read that may name a file (a data node the fleet counts running a state log this build does not, or this node’s copy of the estate migrated by a newer build; What a build cannot see). A final pass copies only what this build’s tables name, and the store it leaves behind is deleted after it. - 503
objects_migration_failed, with aRetry-After: the fleet’s store or the bucket stopped answering. The body’sreportcounts what was copied; the stores’ own words are in this node’s log. Run it again.
GET /backups
Section titled “GET /backups”Backs Settings › Backups & retention: what the fleet has backed up. It takes admin: every row names a directory on a named host that holds the company’s sealed credentials.
Two records:
points: each node’s NEWEST backup from the fleet’s backup register (what each node announced when its manifest was written), plus the operator’s newest acknowledgement of each log (crewlet retention ack,kind: "operator"), one point per log acknowledged, each covering that log alone.countedsays the trim may count it: thebackup_floorpolicy (policy) takes this owner’s word and the copy was verified. A point isnewestwhere some log’s backup term reads it: for at least one log it covers, the newest counted point covering that log. Several can be, and underoperatorone per log acknowledged.bytesis the whole artefact (every database copy and stream snapshot), absent on an acknowledgement, which asserts a copy the engine never saw.coversis how far the copy reaches in each state-log stream. A node the fleet has evicted from every log has no point: the trim’s duty forgets it once the eviction takes effect.history: everyPOST /backupa person made and everyPOST /operate/v1/backup, newest first, from the runtime audit every data node keeps for the event log’s 30 days: when it finished, thenodewhose disk holds it, who asked (actor,actor_kindand the credential,operator_id), thedir, andoutcome,applied(manifest written) orfailed(not written: the directory holds debris, not a backup). At most 100 rows;moresays the page filled.coveragenames the nodes the history was read from, since a node that did not answer takes its backups’ rows with it.
{ "policy": "engine", "points": [ {"owner": "node-a", "kind": "node", "taken_at": "2026-09-30T02:00:00Z", "dir": "/var/backups/crewlet-20260930-0200", "verified": true, "bytes": 83886080, "covers": [{"stream": "CREWLET_TRACKER_LOG", "generation": 2, "seq": 9001}], "counted": true, "newest": true} ], "history": [ {"id": "6ac15845-97c8-4ac2-9ac8-bfa7729a3572", "at": "2026-09-30T02:00:21Z", "node": "node-a", "actor": "jane-founder", "actor_kind": "human", "operator_id": "session:0192f0aa-61c2-7d1e-9b40-3c5d7e8f9a01", "dir": "/var/backups/crewlet-20260930-0200", "outcome": "applied", "summary": "jane-founder backed up to /var/backups/crewlet-20260930-0200 (25 streams)"} ], "more": false, "coverage": {"nodes": [{"id": "node-a", "answered": true, "error": ""}], "complete": true}}GET /integrations
Section titled “GET /integrations”Backs the dashboard’s Integrations screen: how each external surface is wired, and what has come through it.
Every count is over one window, from traffic_since (inclusive) to the instant the answer was read (exclusive); traffic_since is what makes a count a measurement (“42 since Tuesday”, not “42”). The window is the widest one whose every delivery the answer holds. Deliveries are page-capped, not time-bounded: the most recent page of the delivery log, at most 400 across the fleet. Which window that is depends on whether any delivery may lie past the page:
- Nothing lies past the page when no node holds 400 or more deliveries in the 30-day history, no node’s reply was cut to fit the transport, and the fleet holds no more than 400 between them (exactly 400 is fine, two nodes holding 200 each). The window is the whole history:
traffic_sinceis 30 days before the instant the answer was read. An empty page is this case: a count of0over 30 days, beside the drops and merges of the same 30 days. - Deliveries may lie past the page otherwise: the fleet holds more than 400, or one node holds 400 or more (its page filled, which it reads as more behind it even at exactly 400), or a node’s reply was cut to fit the transport (a page that can then be shorter than 400). The window reaches no further back than the page:
traffic_sinceis one microsecond after the oldest delivery the page reached. A delivery sharing that instant may not be on the page, so deliveries at that instant are left out of the window rather than counted short.
traffic_since is null only when no event log could be read, which traffic_known: false says. It is written to the store’s resolution (RFC 3339, fractional seconds, at most microseconds), because an edge cut to the second would name a window up to a second wider than the one counted; last_at is written the same way.
{ "traffic_known": true, "traffic_since": "2026-06-07T09:12:00.418207Z", "integrations": [ { "key": "gitlab", "configured": true, "enabled": true, "url": "https://gitlab.example.com", "inbound_kind": "webhook", "inbound_path": "/webhooks/gitlab", "routes": true, "secret_present": true, "secret_usable": true, "seats": ["eng", "pm"], "inbound": 128, "skipped": 30, "coalesced": 2, "last_at": "2026-06-08T07:31:10.052914Z" } ], "tools": [ { "key": "gitlab", "surfaces": ["gitlab"], "state": "attention", "label": "Credential expiring", "reason": "the group Owner token this integration runs on expires on 2026-06-20, …", "surface": "gitlab" } ]}tools is one roll-up per tool this build serves (slack, mattermost, atlassian for the organization, Confluence, Jira and the Forge relay, github, gitlab, datadog, cloudflare, expo, digitalocean, scaleway, aws, google_cloud, ssh), configured or not. state is attention (a person has to act), not_connected (configured and not working yet with nobody owing anything, or this node could not read the status), connected or not_in_use (no block, or every block switched off; label says which). label is the state in a reader’s words, reason one sentence on why, surface the surface it was taken from. The rules are One state per tool.
Every reconcile finding carries label, the finding in a few words: its title where it has one, else its kind’s own words about its subject (“An agent identity could not be created for sre”). A finding of kind credential_expiring carries expires_at, the instant the credential stops working, and one whose subjects list its record cut carries subjects_omitted, how many more it is about. Each reconcile carries findings_omitted (findings its record dropped from the end of findings to fit), seat_findings_omitted (an agent’s own it kept without their words, which the agent’s row draws), words_omitted (any other it kept without its title, detail, remedy and link), each finding counted once, and findings_unread (true where the findings could not be read beside the status, findings then empty until the next read); see What a surface’s records keep.
inbound, skipped and coalesced are misleading apart (“128 arrived” cannot tell a working integration from one whose every delivery reaches nobody; “128 arrived, 30 dropped, 2 merges” can). inbound counts deliveries, one delivery presented to one seat counted once across the fleet, that arrived at this row’s own ingress (inbound_path, or the websocket for Mattermost). A message two agents’ Slack apps both receive is two; a Mattermost post two bots’ sockets both read is two; the same post read by every node holding the bot’s socket is one, because the fleet claims it before it is published. Counted by ingress, not integration: the Forge relay hands Jira and Confluence events on under its own token, so a relayed event counts once under forge (and once in the Atlassian card, which sums its surfaces), while what became of it (skipped, coalesced) counts under the product it was parsed as. skipped counts deliveries the routing gate dropped without waking anybody; coalesced counts merges, where N same-conversation notifications became one turn. All three cover the window above, and so does last_at, the newest delivery in it (null when none), never earlier than traffic_since.
The two outcome counts are three-valued like the secret fields: null means this node could not read its event log (reporting 0 would claim every delivery woke a seat). They come from the engine’s notification_skipped and notifications_coalesced events, not the inbound rows. Every node counts its own outcome events from traffic_since up to the instant the inbound rows were read, and the node you asked sums them, counting once a row two data nodes hold while a stateless node’s custody batch is still being settled (Reading the fleet’s history). They are counted, not paged, so every outcome in the window counts however many there are; one before traffic_since or written after the answer was read does not. A row counts under the third-party app its notification_source tag names; one naming no app is not counted. The window is one for the whole answer, so a surface whose drops and merges outnumber its deliveries has its outcomes counted over the window every surface’s deliveries leave: the whole 30 days when nothing lies past the page (a company receiving nothing included), and only as far back as the page reaches when the busiest surfaces fill it.
secret_present and secret_usable are two different facts, and the gap between them is a silent outage.
secret_present is a claim about the document: an operator wrote a secret down. Three-valued: null means the surface uses none (Mattermost authenticates its websocket with the bot’s own token; Atlassian receives no delivery to verify); false means it does and none is configured, so the webhook route answers 503 to every delivery.
secret_usable is a claim about what this process resolved. A secret lives in the config as a ${VAR}, so secret_present: true, secret_usable: false is a route refusing every delivery while the config shows a secret and the third-party app shows a healthy hook, with nothing naming the variable. For GitLab the bar is higher than non-empty: the value must be whsec_ over standard base64 of a 32-byte key, the only shape the third-party app signs with. For Slack, with one signing secret per seat, it is lower: one seat whose secret resolved makes the surface usable (a delivery to that seat’s path would be accepted), and a seat whose secret is unresolved is reported by that seat’s identity finding. null means this node cannot say (nothing has resolved yet) or the surface has no secret to resolve.
Only the booleans are returned; no secret value leaves the process.
held is why a route refuses every delivery to a surface although its material resolved, in the route’s own words, or null. Today only the forge row carries one, while forge_app_id is set: for a product whose url-named site’s cloud id the Jira or Confluence pass’s last lookup could not read, taken from that pass’s finding in the shared status store so every node shows it, whatever its own lookups found (“Forge relay events for Jira are refused: the site’s cloud id could not be read from https://acme.atlassian.net/_edge/tenant_info (HTTP 502); check the site is reachable, or set integrations.jira.cloud_id with site_url in place of url”), and for one whose block names no address yet (”… until integrations.jira.cloud_id (with site_url) is set”). A site never looked up is not held; the Jira and Confluence passes look it up as the integration starts. A Data Center block is never held, since no Forge event is its own. A held surface’s tool rolls up to attention with that sentence as its reason, whatever its reconcile report says.
A row exists for a surface the company’s document turns on, and for no other. Slack and GitHub are the two where a seat carries its own app (its own credential and inbound path), but the parser that turns a verified delivery into work is registered only where the company block is present and enabled: drop integrations.slack and the transport is retired (slack_retired); drop or disable integrations.github and the same happens (github_retired). A seat app without it delivers to a route that verifies the signature and has nowhere to send it. So such a company is a surface that is off, and has no row from per-seat values alone.
enabled: false is the one field on this row that claims somebody’s intent: it means a block that says enabled: false, on every surface, drawn by the dashboard as Paused. A company whose block is gone gets no row and a Connect button. What each seat still holds is on the setup screen’s seat roster, where a seat is acted on.
seats lists the agents carrying their own identity on that surface: a Slack app, a Mattermost bot, a per-seat project or space, at any depth of the org chart, not from the top-level roles: alone (which holds only the seats belonging to no unit).
routes is whether a verified delivery would wake a seat. It, secret_present and secret_usable fail independently, so an operator with a silent integration can tell which half broke.
It is null for a surface nothing ever arrives from, which differs from false. Atlassian is that surface: an organization is where an agent’s account is created, and the products that account works in (Jira, Confluence) are separate surfaces with their own webhooks and parsers. routes: false or secret_usable: false there would be a false fault report; secret_usable, inbound_kind and inbound_path are null there too; the engine serves no /webhooks/atlassian.
Mattermost is false rather than null when it does not route: it has no inbound address because the engine dials out, but everything said in its team arrives, so a missing parser there is the outage the field is for.
A surface is asked about the source its deliveries are published as, which is not always its own name. The Forge relay republishes a Cloud event as the product it belongs to (jira or confluence), parsed by that product’s parser, so nothing is registered under forge. Its routes is true when either product’s parser is registered; the finer answer is on those two rows.
Health failures such as a Mattermost SiteURL that blinds every browser, a revoked bot token or a mis-pasted webhook secret are invisible here: rejected deliveries are never written to the event store (verification runs before the row is logged), so a signature mismatch leaves no trace except the provider’s own delivery UI.
Health is deliberately not inferred. An idle Slack and a 401-ing Slack are indistinguishable in the event store, so silence is reported as “no traffic seen”, never healthy, never down. traffic_known is false when this node could not read the event log at all, so the zeros are absence of measurement rather than measurement of absence.
GET /schedules
Section titled “GET /schedules”Backs the dashboard’s Schedules view. Returns every configured role/unit schedule with its cron, effective timezone, target → resolved runner handles, and a per-request next_run (computed from the cron), plus the company’s 50 most recent fires across every schedule (recent_runs), read from the replicated usage history: every data node’s fires, each with what became of it, kept 181 days. One schedule’s own fires are schedule_runs.
A row’s timeout_seconds is the cap a run is held to: the schedule’s own timeout_seconds, or the engine’s default where it sets none, which timeout_default: true says. default_timeout_seconds is that default (half an hour), so a client need not keep a copy.
{ "schedules": [ { "scope_type": "unit", "scope_id": "backend", "scope_name": "backend", "name": "daily-standup", "cron": "30 9 * * 1-5", "timezone": "Europe/Amsterdam", "task": "Post your standup…", "target": "each", "enabled": true, "timeout_seconds": 1800, "timeout_default": true, "catchup": true, "runners": ["backend-lead", "backend-dev"], "next_run": "2026-06-09T07:30:00+00:00" } ], "default_timeout_seconds": 1800, "recent_runs": [ { "scope_type": "unit", "scope_id": "backend", "scope_name": "backend", "schedule_name": "daily-standup", "fire_label": "20260608T0930", "target_handle": "backend-dev", "scheduled_at": "2026-06-08T07:30:00Z", "fired_at": "2026-06-08T07:30:02Z", "outcome": "fired", "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736" } ]}A run’s outcome is fired, fired_manually (a person ran it now, off its cron; its fire_label is the ask’s own, never a minute), skipped_catchup (a missed tick outside the catchup window), skipped_paused (the runner seat was paused when the fire came due), or skipped_superseded (the fire, by the cron or by hand, waited in its seat’s inbox while the seat could not work, and a later fire of the same schedule ran in its place). The first four are recorded by the scheduler; the last by the seat’s node, usually a different node and often a later day, and joined to the fire by trace_id, so a fire reads the same on every node. scheduled_at and fire_label are the tick the fire stands for (the label is the schedule’s local wall-clock minute, the dispatch ledger’s at-most-once key), which on a catch-up is earlier than fired_at. A fire reaches the history within the usage publisher’s 15-second tick. recent_runs is empty when the usage history cannot be read here (the configured list and next_run still render). A schedule with no next fire (disabled, an unparseable cron or timezone which problem names, or a date the calendar never reaches) carries no next_run key, never a zero instant.
scope_id is the scope’s identity, a seat’s agent id for a role schedule or a unit’s key for a unit one; the at-most-once ledger keys a fire on it and schedule_runs takes it as its parameter. scope_name is the same scope as a person reads it (the handle, or the unit’s key), resolved through the company this node is running.
Token Spend Breakdown
Section titled “Token Spend Breakdown”Two sources, one aggregation; the parameters decide which answers:
- The live window, a request naming no
days, no dates, noseatand noprevious, is the projection’s: the spend records of the last 24 hours (livestate.LiveSpendWindow, rolling), held in memory and pushed as thetokenspush. No bundled dashboard screen draws it (Settings › Token spend reads named windows only). It is the only answer with a per-turn tail (by_turn) and a watermark (aggregated_through). - Every named window is whole company days read from the replicated
usagedomain (ADR-0020): every data node’s day, applied on every data node. The answer is the same whichever node is asked, reaches back 181 days (the domain’s history, not the event log’s 30), and still counts a node that has left the fleet.
Both are folded by internal/tokens, so the two compare like with like. The guide Budgets and spend explains the windows, the counter a budget enforces and how it differs from this rollup.
The window parameters, shared by both routes:
| Name | Default | Description |
|---|---|---|
days | 1 on a named window | The company days ending today, on the company’s clock: 7 is today and the six before it. 1 to 90 (tokens.MaxSpendRangeDays); anything else is 400 (tokens.ErrWindowLength) naming days. |
since / until | — | Instead of days: two company dates, 2026-06-01, both inclusive (since=2026-06-01&until=2026-06-08 is eight days). A pair or neither; at most 90 days, a longer pair is 400 (tokens.ErrWindowLength: 2026-05-01 to 2026-09-29 is 152 days, and a spend window is at most 90. Bring since and until closer together) wherever in the history it lies; never together with days. |
previous | false | The same number of company days ending the day before the window begins, cut on the company’s calendar rather than a browser’s, so the two windows are never different weeks. |
seat | (every seat) | One seat, by its handle, resolved to the agent id every node derives from it, so a seat since removed from the company still answers for the days it left behind. A person’s seat is refused bad_params: it spends nothing. |
A window whose first day, or whose previous window’s first day, is older than the history’s floor is 400 (tokens.ErrOutOfRange, a different class from a window that is merely too long) naming the parameter to change, never answered short: the rows before the floor are gone on every data node. At 90 days the previous window begins 179 days back, inside the 181.
GET /tokens/breakdown
Section titled “GET /tokens/breakdown”The rollup: the window’s spend by phase, model, provider entry, worker and seat.
Response (a named window)
{ "since": "2026-06-08T15:00:00Z", "until": "2026-06-15T15:00:00Z", "from": "2026-06-09", "to": "2026-06-15", "days": 7, "horizon": { "days": 181, "floor": "2025-12-16" }, "totals": { "input_tokens": 17700, "output_tokens": 2750, "total_tokens": 20450, "calls": 6, "cache_read_tokens": 12100, "cache_write_tokens": 900 }, "by_phase": [ { "phase": "execute", "input_tokens": 14000, "output_tokens": 2000, "total_tokens": 16000, "calls": 2 }, ... ], "by_model": [ { "model": "claude-sonnet-5", "total_tokens": 19300, "calls": 4, ... }, ... ], "by_provider": [ { "provider_key": "claude", "models": ["claude-sonnet-5"], "seats": ["pm", "coder", "reviewer"], "seats_total": 5, "total_tokens": 20100, "calls": 5, ... } ], "by_worker": [ { "worker": "persist_decider", "total_tokens": 900, "calls": 1, ... } ], "by_agent": [ { "role": "PM", "handle": "pm", "agent_id": "<seat's agent id>", "turns": 4, "failed": 1, "total_tokens": 20200, "calls": 5, ..., "by_phase": { "execute": { "total_tokens": 16000, "calls": 2, ... }, "review": { "total_tokens": 1400, "calls": 1, ... }, "auxiliary": { "total_tokens": 900, "calls": 1, ... } } }, ... ]}Notes:
since/untilare the window as instants (first instant of its first company day; first instant after its last,untilexclusive).from/to/daysname the same window by days. The live window carries only the instants.horizonstates how far back a named window reaches: the history in days andfloor, the oldest company day still answerable. Notcoverage: nothing was asked of a node; rows are replicated whole and only time bounds them.by_phasecovers every phase the Turn Engine emits (onboarding,execute,review,subagent,judge) as recorded (executeincludes every launch of the executor’s run; itsexecutor_collectedrecord names no phase and is filed there), plusauxiliary: what the seats’ auxiliary model spent, fromauxiliary_spendrecords (turn-start context, every compaction, reflection workers, background learning passes, a person’s answered question). The series folds these into four bands; the rollup does not.by_workerbreaksauxiliarydown by purpose:memory_filter,knowledge_query,episode_summary,persist_decider,counterparty_profiler,skill_synthesizer,skill_refiner,episode_compaction,skill_clustering,skill_promotion,provider_probe,answer_knowledge,wake_triage, andcondense_<kind>for each kind of text a compaction rewrites. Rows sum to that phase.callsis PROVIDER CALLS in every bucket: a phase’s model rounds, a launch’s harness turns as its harness reported them (harness_turns; one for a launch whose harness reports none, as OpenCode), an auxiliary record’s coalesced calls. The executor’s own record counts none: its run’s calls are its launches’.by_provideranswers “which configured entry (providers.llm.<key>) do we pay for”, whichby_modelcannot (a fallback chain serves several models under one key).modelsis every model the entry answered with, biggest first;seatsthe three handles that spent most through it,seats_totalhow many spent at all. A call recorded before the key was promoted (node migration 0032) is underunknown. An admin’s alone: every other reader, of this answer and of the socket’stokenspush, getsby_providerempty andentries_withheld: true, other figures unchanged. A model a call did not name isunknowninby_model, never its entry’s key.by_agent[].turnsandfailedare how many of the seat’s turns ENDED in the window and how many failed; a named window only (the live window holds phase records, not endings). A seat that ended a turn without spending is still listed.by_turn(one row per RUN, newest first, capped at 50, each the turn’s COST: its phases and in-turn auxiliary records, not the reflection after it) andaggregated_through(the newest record counted) are the live window’s only; a company day holds no turn and no per-call instant. Per-turn spend over any window isGET /turns?sort=-tokens. Both carry each record’s stamp as published, so a record from a node with a fast clock lands pastuntilfor the day holding it, which is how that node is found.- A seat is one row per derived agent id, on both windows, named from the company (handle and name) or, for a seat the company no longer holds, by the newest day that named it; a seat renamed mid-window is one row under its current name.
agent_idandseaton the answer echo aseat=narrowing, absent when nothing narrowed it. - A person is a row of their own with
person: true, on both windows: what the auxiliary model spent for a human seat (a question answered withanswer_knowledge, a background pass on a unit a person leads), keyed and named by that seat’shandle(never an identity-directory id), with noagent_idand, on a named window, noturnsorfailed. A caller bound to no seat charges the company alone and has no row.seat=<handle>narrows to one person as to one seat. A person’s spend reaches named windows as its own usage record, published with the rest of the day of the data node whose event log holds it. - All lists sort by
total_tokensdescending, ties on the name. - Every bucket carries
cache_read_tokensandcache_write_tokens: the share ofinput_tokensthe providers’ prompt caches served and stored. A breakdown of the input, never an addition:input_tokensalready counts the cached prefix on every backend, so the cache share iscache_read_tokens / input_tokensandtotal_tokensstays input plus output. Both sources carry them, so a window reads the same share whichever answered. A phase recorded by a build that did not count the cache reads 0. - Every live-window bucket carries
cost_usdandpriced_calls. Two numbers, because zero dollars is two facts: only a subscription harness reports a price, socost_usd0 overpriced_calls: 0means nobody said what this cost, while 0 over 3 means three runs were billed nothing. A named window’s are zero over zero (the usage domain carries no price). The dashboard reads neither: it measures spend in tokens, never money (rule 19).
GET /tokens/series
Section titled “GET /tokens/series”The same spend with a time axis: one bucket per company day or ISO week over a named window, each split into bands on one dimension. No live path: company days are held only by the usage domain.
Query parameters — the window parameters above, plus:
| Name | Default | Description |
|---|---|---|
group | phase | The bands’ dimension: phase, model, provider, seat, unit or worker. Anything else (turn included) is 400 naming the set. provider is an admin’s alone (bands are the company’s providers.llm entries), refused to everybody else on authority. phase is the four bands below. seat is keyed by agent id (never a name, which two seats may share), with its name as label beside its handle. unit resolves through the org chart’s DIRECT unit for each seat, keyed by unit key and labelled with its name, not the chain (a band per nesting level would count the same spend for the team and the department above). A usage row carries no project or work item; that attribution is Worklet’s own per-item counters. |
bucket | day | day (a company day) or week (the company’s ISO week, from Monday midnight on its clock). Nothing finer: a day is the smallest unit every data node’s usage agrees on; hour is 400. |
groups | 4 | Bands before the rest fold into the residual. Capped at 20. Four is the design system’s data hues and the phase breakdown’s band count, so a phase grouping never folds. |
The four phase bands, folded once in tokens.PhaseBand:
| Band | Phases |
|---|---|
execute | execute, each launch of the executor’s run included (recorded from the box it ran in, executor_collected) |
review | review |
workers | subagent, the workers an executor delegated to |
auxiliary | auxiliary, judge, onboarding, and any phase this build does not know |
Response
{ "group": "phase", "bucket": "week", "since": "2026-06-09T15:00:00Z", "until": "2026-06-23T15:00:00Z", "from": "2026-06-10", "to": "2026-06-23", "days": 14, "horizon": { "days": 181, "floor": "2025-12-24" }, "series": [ { "at": "2026-06-07T15:00:00Z", "window": "2026-W24", "days": 5, "total_tokens": 80, "calls": 1, ..., "groups": { "execute": { "total_tokens": 80, "calls": 1, ... } }, "other": { "total_tokens": 0, "calls": 0, ... } }, { "at": "2026-06-14T15:00:00Z", "window": "2026-W25", "days": 7, ... }, ... ], "by_group": [ { "group": "execute", "other": false, "folded": 0, "total_tokens": 16000, "calls": 2, ... }, { "group": "review", "other": false, "folded": 0, "total_tokens": 300, "calls": 9, ... } ], "totals": { "total_tokens": 20450, "calls": 6, ... }, "grouped": { "total_tokens": 20450, "calls": 6, ... }}Notes:
- Every bucket in the window is present, empty ones included: a quiet day is a full-height gap, so the client repairs no holes.
atis the bucket’s start;windowits label on the company calendar (2026-06-14,2026-W25). A week’satcan precede the window’ssince(first and last weeks can be partial);dayssays how many of the window’s days each bucket holds.by_groupis the legend and the grid: each band’s total over the whole window, residual last. ByphaseALL FOUR bands are listed in the stacking order above, at zero if nothing spent, so the legend is always the same four; every other grouping is biggest first and lists only what spent. Which bands survive the cap is decided over the WHOLE window, never per bucket.- By
seatandunita band’sgroupis an identity (agent id, unit key) andlabelis its name, since two may share a name. Aseatband also carrieshandle, absent for a seat the chart no longer holds; aunitband carriesseats, how many seats spent in it. A seat at the chart’s root sits in theno unitband, which no unit key can collide with. - The residual carries an empty
groupandother: true, not a reserved name, so a model or seat genuinely calledotheris not mistaken for the fold.foldedis how many distinct groups it stands for; it sums every field of those bands, cache counts included. totalsis every cell in the window, including those this grouping places in no band (grouping byworkeromits every non-worker phase).groupedis what the bands cover, so the gap is a number, not a subtraction.
Webhook Deliveries
Section titled “Webhook Deliveries”Every delivery (presented to one seat, counted once across the fleet) writes one row to the event log under category: "webhook", so the listing answers “what has been arriving” without reading a payload. Both inbound edges write it the same way: a webhook route for each delivery it verified, and the Mattermost socket for each post it claimed. Each publishes an inbound_delivery event, which the node’s own event log files (on a node without data, a data node’s, through custody), so a delivery read on any node is a row:
| Field | What it carries |
|---|---|
type | The delivery’s own label: webhook:<event> from a webhook route, forge:<event> for an Atlassian Cloud relay, socket:posted for a Mattermost post |
source | The integration the payload belongs to — the route for six of the seven webhook routes, the relayed product for Forge, and mattermost for a post |
summary | The delivery in one sentence |
tags.recipient | The seat a per-seat delivery was addressed to — a Slack or GitHub app’s seat, or the bot whose socket read a post — absent for a company-wide one. The log resolves it to that seat’s agent id and indexes the delivery under it as a party, so GET /events?agent=<handle> also returns what reached an agent seat from outside |
tags.delivery_key | The provider’s own delivery id — a delivery header, or a Mattermost post id — absent for the providers that send none (the Forge relay, Datadog, and an Atlassian build without the identifier header, which this edge deduplicates on a hash of the body instead): what an operator has in front of them in the provider’s console |
tags.route | The ingress that authenticated it, which is not always its source: a Forge-relayed Jira event is source: jira, route: forge. The integrations answer counts inbound by it |
payload | The raw body the provider sent (a Mattermost post as its socket carried it), on GET /events/{event_id} only. A listing never carries a payload, so a deliveries screen is one request rather than one per row |
A row exists only for a delivery that was verified, claimed and queued. A refusal (bad signature, unset secret, body too large) is answered at the edge and appears in the engine’s log, not here; a post a peer node already claimed is that node’s row; a post whose publish failed is read again, not recorded.
The Tool Catalogue
Section titled “The Tool Catalogue”Carried by GET /tools, the tools push and the socket snapshot. One row per registered tool, shaped like each tool in GET /mcp-servers’s built-in groups:
{ "name": "post_message", "description": "Post a message to a channel", "source": "mcp:slack", "title": "Post message", "annotations": { "read_only": "no", "destructive": "no", "idempotent": "unknown", "open_world": "yes" }, "risk": "additive", "risk_declared": true, "external": true, "delivers": "slack", "input_schema": { "type": "object", "properties": { "…": {} }, "required": ["…"] }, "group": "", "gate": ""}- Every hint is a WORD, never a bool:
unknownmeans the server did not advertise the hint, which differs fromno(a bool would read an absent hint asfalse, a denial, making unannotated MCP tools look like proven reads). The delivery fence reads them this way (seeRegistry.KnownReads): an unannotated tool is not a known read. risk,risk_declaredandexternalare the engine’s one reading of those hints, as an MCP server’s detail answers per tool:read_onlyfor a tool asserted read-only,additivefor one that may write and is asserted not destructive,destructivefor every other. A tool asserting nothing isdestructivewithrisk_declared: false;externalis true unless the tool asserts it reaches nothing outside the company. A screen shows this reading rather than re-reading the hints.deliversnames where calling the tool puts something in front of somebody outside the turn; empty for a tool that reaches nobody. It is the registry’s own predicate, not “served by MCP”: a proven read-only MCP tool delivers nowhere, and Worklet’s comment tool delivers though a builtin.titleis the human-readable name a server advertised, omitted when none.input_schemais the JSON Schema the model is offered, verbatim; absent when the tool takes no arguments, which is not{}(only absence means this build sent none).groupandgateare, on one of the engine’s own tools, the group it is filed in and who may call it (what its authority-table row asks of the caller; holding a tool is not being allowed to call it). The words are in Groups, and who may call each one. Both are present and empty on an MCP server’s tool, whose calls no authority row decides.
Webhook Endpoints
Section titled “Webhook Endpoints”Webhook refusals
Section titled “Webhook refusals”A refusal on every /webhooks/* route is the engine’s one refusal envelope: error, the code a client branches on, and message. Every 503 says when to come back in Retry-After. A sender reads only the status and Retry-After: a 401 is a delivery that will never verify, a 503 one to hold and retry. The body is for the operator reading a vendor’s delivery log, a proxy’s access log or the engine’s own.
| Status | error | When | Retry-After |
|---|---|---|---|
401 | invalid_signature | The credential did not verify (an HMAC signature, shared token or Forge invocation token, missing or wrong), or a per-seat Slack delivery names a seat with no Slack app here while other seats have one. The log says which check failed; the body never does, since that is what a prober would read (and a code for the seat with no app would list which handles have one) | none |
503 | no_active_revision | This node runs no company yet, so has no secrets and nothing to route by. Answered before the signature check, otherwise every delivery would get the no-secret 503 and its five-minute wait | 15 — the reconcile poll that brings a node a missed activation |
503 | no_webhook_secret | The route has no secret configured to verify against | 300 — a person editing the configuration |
503 | unusable_webhook_secret | The configured secret cannot do its check: a shared token shorter than 26 characters on a route whose provider signs nothing, or a GitLab signing_secret that is not a whsec_ key | 300 |
503 | unavailable | The delivery verified and the broker would not take it; its claim is released so the retry is not refused as a duplicate | 4 — the broker’s minimum election timeout, the hint every surface gives for an unreachable broker (a refused publish waits on a reconnection or election) |
413 | body_too_large | Over 25 MiB, or a verified delivery too large to publish; refused for good, so the provider stops retrying | none |
400 | unreadable_body, invalid_body | The body did not arrive whole, or is not one JSON object | none |
/webhooks/jira
Section titled “/webhooks/jira”Receives Data Center Jira webhook payloads (issue created, updated, commented, assigned). Verifies HMAC-SHA256 over the raw body against X-Hub-Signature, keyed on integrations.jira.webhook_secret; a wrong or missing signature is 401 invalid_signature, and a route with no resolved secret answers 503 no_webhook_secret. Deduped on X-Atlassian-Webhook-Identifier, stable across Jira’s retries. Jira Cloud does not use this route: a Cloud webhook belongs to an app, so its events arrive through /webhooks/forge with their own JWT, and webhook_secret is unused there. Publishes to crewlet.notifications.inbound. See Jira Integration — Webhooks.
/webhooks/slack/{handle}
Section titled “/webhooks/slack/{handle}”Receives Slack Events API payloads for one agent (by handle). Verifies the signing secret of that agent’s own app (Slack gives each seat its own; the path handle selects the key). A wrong signature is 401 invalid_signature, and so is a handle with no app while other seats have one: the same body, after the same check against a key that verifies nothing, so an unsigned request cannot tell which handles have an app; the engine’s log says which (slack_webhook_unknown_handle). No Slack secret for any seat is 503 no_webhook_secret. Publishes to crewlet.notifications.inbound. Slack’s url_verification challenge is answered without a signature check, so a freshly provisioned app’s Request URL verifies before its signing secret is in config (during provisioning the secret does not exist yet). A node with no active company revision does not answer it, but 503 no_active_revision like every delivery: verifying a URL that then discards every event is worse than making Slack retry. See Slack Integration.
GET /webhooks/slack-oauth
Section titled “GET /webhooks/slack-oauth”The OAuth install landing every agent’s Slack app redirects to. An install begun with Install on the Slack integration’s Agents tab carries a state the engine signed (seat, app, single-use nonce, 15-minute expiry): the page verifies and spends it, exchanges the code for the bot token, refuses a token belonging to another agent’s app, and seals it under the seat’s own name. A link used twice, edited or expired is refused with what to do instead; neither code nor token is ever shown. An install made from the app’s own settings page carries no state, and the page says where to copy the bot token. A link from the retired crewlet slack provision is answered 410 with where installs are made now. A refusal Slack sends back is said in the page’s own words (install cancelled, or not approved) and its code is logged as slack_oauth_refused, never shown. No answer is cached (Cache-Control: no-store). Unauthenticated by design (a browser redirect carries no engine credential). Every value on the page comes from the query string, so it is served under a policy allowing its one inline style by hash and no script (see Security headers on every response).
GET /webhooks/mcp-oauth
Section titled “GET /webhooks/mcp-oauth”Where a vendor sends the person’s browser back after consent to an MCP server sign-in begun with POST /mcp-servers/{name}/oauth, or an integration’s consent sign-in begun with POST /setup/integrations/{kind}/consent; the signed state says which. Unauthenticated by design (a redirect carries no engine credential): what it does is decided by the state alone, which the engine signed under the fleet keyring and spends once on any node (a second arrival, an edited state or one past 15 minutes is refused with where to start again, and no code is exchanged). Where the authorization server names itself in its answers (RFC 9207), the iss must be the one the sign-in started at. The code is exchanged with the verifier the engine kept, a grant with no refresh token is refused, and the grant is sealed for the company and the revision re-activated so every node starts the server under it. Every query value is bounded before anything reads it, and the page shows none: it names the server signed in to, or why sign-in did not finish. Served with Cache-Control: no-store, Referrer-Policy: no-referrer and a policy allowing its one inline style by hash and no script (see Security headers on every response).
GET /webhooks/mcp-oauth/client-metadata.json
Section titled “GET /webhooks/mcp-oauth/client-metadata.json”The engine’s OAuth client metadata document: a public client named Crewlet (no secret, token_endpoint_auth_method: none, PKCE its proof) whose one redirect is /webhooks/mcp-oauth, at the engine’s public address. Its own address is the client_id a cimd sign-in is made as, which an authorization server that reads such documents fetches. 404 not_found on an engine with no public address. Cached for an hour.
/webhooks/github
Section titled “/webhooks/github”Receives GitHub webhook payloads. Verifies HMAC-SHA256 over the raw body against the x-hub-signature-256 header, keyed on the required webhook_secret from the github config block; invalid or missing signatures are 401 invalid_signature, and a route with no resolved secret answers 503 no_webhook_secret with a Retry-After, so the delivery is held for retry rather than blamed on the sender. Deduped on X-GitHub-Delivery, stable across GitHub’s retries and manual redelivery. The event name is in the X-GitHub-Event header, not the body (which carries only the action); the header is carried onto the envelope and read by the parser. Publishes to crewlet.notifications.inbound. The same handler serves POST /webhooks/github/{handle}, the address a seat’s own GitHub App is created with: the handle travels onto the published event so five agents’ apps reporting one comment are five wakes, not four duplicates. Both forms verify against the same company webhook_secret, so a seat in the path is no way past the signature check. See GitHub Integration — Webhooks.
GET /webhooks/github-app
Section titled “GET /webhooks/github-app”Where GitHub returns an operator’s browser during the per-agent GitHub App flow, and one of the two /webhooks/* routes that render a page rather than accept a delivery (the other is /webhooks/slack-oauth). Two arrivals, one route: after the app is created, with a one-time code to convert, and after it is installed, with only ?installed=<handle>.
Unauthenticated (a GitHub redirect carries no engine credential); the state minted by POST /setup/integrations/github/app stands in its place: a token sealed under the fleet keyring naming the seat and who began the creation, opened before the code is converted and spent there, so a state leaked to browser history or an ingress log cannot be presented again within its fifteen valid minutes. The spend goes through the fleet’s claim registry, so it holds when the two halves land on different nodes, and fails CLOSED: a registry that cannot answer has not said the link is unused.
The install arrival carries no such proof and changes nothing: it renders a page, and the reconcile loop records the installation from GitHub’s own list, not the query. On a conversion the app’s private key and webhook secret are sealed before anything else can fail, because GitHub returns both exactly once and reissues neither. A record of the app on the seat that the coordination store took without answering is read back once before the page answers, and is a completion when the seat has the app. A link presented again (a refresh, or Back from GitHub’s install page) runs nothing and is answered by whether the agent it names has its app.
Answers:
200: a completion, an install, or a link presented again whose agent has its app.400: a refusal from GitHub, a missing code, or a link or code that is expired, forged or already used.403,404,409: as the begin route does for a managed document, an agent the company no longer has, and no company.502: GitHub didn’t finish the conversion.500: Crewlet couldn’t (the link couldn’t be checked, the company couldn’t be read, the key or webhook secret couldn’t be sealed, or the app couldn’t be recorded or its record confirmed).
See the table for why none is a 503. The page’s wording is always the engine’s own, chosen by the step that stopped so it says what to do (see GitHub Integration), never an error’s text or GitHub’s: GitHub’s response body here carries the private key, and the error is the log’s (github_app_create_failed, which names the app GitHub handed over, never its key). Every answer carries Cache-Control: no-store. The page runs only its own inline style and install countdown script, allowed by hash (see Security headers on every response).
/webhooks/gitlab
Section titled “/webhooks/gitlab”Receives GitLab webhook payloads. The signature is the only credential: webhook-signature is verified as a Standard-Webhooks HMAC-SHA256 over {webhook-id}.{webhook-timestamp}.{body}, keyed on the signing_secret’s base64 payload, constant-time against any of the header’s space-separated v1,… entries, with a ±5-minute timestamp tolerance. A missing or wrong signature is 401 invalid_signature; the plaintext X-Gitlab-Token is not accepted, so omitting the signature header is no downgrade path. Answers 503 with a Retry-After when no signing_secret is configured (no_webhook_secret) or its value is not a usable whsec_ key (unusable_webhook_secret), so the delivery is held for retry. GitLab signs whenever the hook has a signing_token (GitLab 19.1+); see GitLab § Verification. Publishes to crewlet.notifications.inbound. See GitLab Integration — Webhooks.
/webhooks/confluence
Section titled “/webhooks/confluence”Receives Data Center Confluence webhook payloads (page created/updated, comments). Verifies HMAC-SHA256 over the raw body against X-Hub-Signature, keyed on integrations.confluence.webhook_secret; a wrong or missing signature is 401 invalid_signature, and a route with no resolved secret answers 503 no_webhook_secret. Confluence Cloud does not use this route: its events arrive on /webhooks/confluence/{event} or through /webhooks/forge, so webhook_secret is required on Data Center and unused on Cloud. Publishes to crewlet.notifications.inbound. See Confluence Integration.
/webhooks/confluence/{event}
Section titled “/webhooks/confluence/{event}”Receives one Confluence Cloud event, named by the path because a Cloud payload does not say which event fired. Cloud signs nothing and honours no registration field for a header, so authentication is a shared token, compared constant-time: X-Crewlet-Token first, ?token= in the query as fallback (where crewlet confluence provision puts it). An unset integrations.confluence.webhook_token answers 503 no_webhook_secret; a token shorter than 26 characters 503 unusable_webhook_secret (the token is the entire check, so its length is the entire strength). A wrong or missing token is 401 invalid_signature. The engine never logs the query string on this route. Deduped on a hash of the raw body, since Cloud sends no delivery identifier. See Confluence Integration — Webhooks.
/webhooks/datadog
Section titled “/webhooks/datadog”Receives a Datadog monitor alert. Datadog’s Webhooks integration attaches custom headers with fixed values only, so nothing varies with the payload to sign; authentication is a shared token, compared constant-time against X-Crewlet-Token and keyed on integrations.datadog.webhook_token. Unset is 503 no_webhook_secret, shorter than 26 characters 503 unusable_webhook_secret, a mismatch 401 invalid_signature. Deduped on the payload’s own id, which Datadog repeats across retries. The alert routes by the monitor’s TAGS (crewlet:<handle> by default), falling back to integrations.datadog.route_to, since a monitor is addressed to nobody. Publishes to crewlet.notifications.inbound. See Datadog Integration.
/webhooks/forge
Section titled “/webhooks/forge”Receives events from the Atlassian Forge app. Every request must carry a Forge Invocation Token (FIT) as an Authorization: Bearer JWT, verified against Atlassian’s JWKS endpoint, its aud claim matching the configured forge_app_id. One app id serves every site that installs the app, so the token must also name the company’s own site for the event’s product: integrations.jira for an avi:jira:* event, integrations.confluence for an avi:confluence:* one, either for any other. The token names a site by cloud id only, never by host: the cloud ids in app.installation.contexts[] and in the /ex/{product}/{cloudId} paths of app.apiBaseUrl and each context’s apiBaseUrl, which must all agree. That id is compared with the block’s cloud_id (or the id in a gateway url’s path), or, for a block naming its Cloud site by url, with the id read from that site’s public /_edge/tenant_info: once a token has verified, at most every 30 seconds while it fails, and kept for the process’s life once read (over https only and from the site itself: a redirect, an answer over 4 KiB, one that is not a JSON object, or one whose cloudId is not a UUID yields no id; the read is bounded by Jira’s 10-second read budget). The body’s context is never read for it. A token that fails any check is 401 invalid_signature, its reason logged under forge_fit_invalid. With no app id, the route answers 503 no_webhook_secret with a Retry-After: there is nothing to verify against. So it does for a product held for want of a cloud id (a url-named site whose id could not be read, or a block whose site the Atlassian organization has not supplied yet), logged under forge_no_cloud_site with the sentence the integrations answer shows. A product with no Cloud site that is not held (a Data Center block, or no block) is 401 invalid_signature, logged under forge_fit_invalid as no Cloud site configured for <product>: no Forge event for it can come from the company’s own site. An event of neither product is held only by the products that are. A refused event is not held anywhere: Forge retries a non-2xx answer up to four times, 60 seconds apart (Forge Remote), then drops it, so an event refused with 503 or 401 is lost after about four minutes and nothing replays it. The integrations answer says which product is refused and the field that clears it (held on the forge row, and the Atlassian roll-up’s reason), as does a setup write (forge_held). The body is drained before FIT verification: verification can block on a JWKS fetch, and the body must be off the socket before the sender’s delivery deadline aborts the request. Maps avi:jira:* / avi:confluence:* events onto the native Jira/Confluence pipeline and publishes to crewlet.notifications.inbound. Self-generated events (an agent’s own actions echoed back by Forge) are acknowledged and dropped. Jira Cloud and Confluence Cloud both ride this route and are served end to end; see the integration pages.
Aborted deliveries (client disconnects)
Section titled “Aborted deliveries (client disconnects)”Senders enforce delivery deadlines and abort slow requests. When a sender hangs up before the body is fully read, there is nothing to verify and nobody to tell: the receiver logs webhook_body_unreadable (component=api.webhooks, keyed by path and error) and still writes a 400 (a handler that writes nothing answers 200, telling the sender its abandoned delivery was accepted). The delivery is dropped; redelivery is up to the sender’s retry policy, so recurring webhook_body_unreadable warnings on a webhook path mean events are lost because the API answers too slowly.
The body is read whole even when the request will be refused, bounded at 25 MiB (body_too_large, then 413; every JSON surface answers a 413 with that one code) and at 30 s (see Request timeouts). Answering without draining leaves unread bytes in the socket and the sender sees a connection reset instead of the status, which for a 401 reads as “retry forever” rather than “your signature is wrong”.
Running
Section titled “Running”crewlet run -config crewlet.yaml -roles data,ingress -api-host 0.0.0.0 -api-port 8000The API is served inside the engine’s own process, over its store, broker and coordination plane. Reads answer from that node’s store and projection, and /config’s from the fleet’s activation pointer, which every node answers alike. Its writes are few and each is named above: the operator surface (/operator/mcp, /operator/act) writes to Worklet, Doclet and Chatlet through the tools a seat holds, /config, /secrets and /setup write the company’s configuration and credentials, /backup and the /worklet/retention gestures act on the node and the log, and the webhook edge publishes inbound deliveries onto crewlet.notifications.inbound. It runs no agent itself: a seat’s turn is the engine’s.
See Deployment for how the API and engine run together, and the integration docs (Slack, Jira) for webhook setup.
Part of Crewlet. Generated from crewlet/crewlet main at 3f5565e.