Submit work.
Keep the record.
Submit a versioned task against an opaque local workspace. Stream applies typed operations, runs the declared checks, and returns a result that can be replayed.
Routes
Discovery is the contract surface. The API is task-oriented; source and raw model output are not public resources.
/healthzservice health/v1/stream/discoveryversioned index/v1/stream/workflowsworkflow registry/v1/stream/workflows/{workflow_id}workflow package/v1/stream/skillsSkill registry/v1/stream/gatesacceptance Gates/v1/stream/modelsmodel catalog/v1/stream/nodesnode registry/v1/stream/taskssubmit work/v1/stream/tasks/{task_id}task summary/v1/stream/tasks/{task_id}/cancelcancel work/v1/stream/tasks/{task_id}/eventsevent stream/v1/stream/tasks/{task_id}/evidenceretained evidence/v1/stream/tasks/{task_id}/provenanceretained provenance/v1/stream/dashboardoperational summary/v1/stream/policypolicy contract/v1/stream/ledger/ingestnode ingest/metricsPrometheus surfaceTask contract
The request chooses the workflow and states the boundaries. workspace.path_ref is resolved only by an approved local Workerd; it is represented as opaque metadata after execution.
{
"task_version": "1.0",
"task_id": "missing-import",
"workflow": "stream.workflow.repo.bugfix.v1",
"workspace": {
"workerd": "local",
"path_ref": "/approved/example-repo"
},
"goal": "Repair the missing include",
"acceptance": {
"tests": ["compile"],
"write_scope": ["main.c"]
},
"policy": {
"retention": "metadata_only"
}
}{
"id": "missing-import",
"status": "queued",
"events_url": "/v1/stream/tasks/.../events",
"evidence_url": "/v1/stream/tasks/.../evidence",
"provenance_url": "/v1/stream/tasks/.../provenance"
}Lifecycle
Submission is durable before execution begins. Queue admission is finite and FIFO within a service instance; a full queue returns 429.
created → queuedpersist requestqueued → runningreserve execution slotrunning → completedGates and Judge agreerunning → failed / cancelledfail closednone keeps only a source-free terminal boundary and exposes no event sequence or evidence bundle.Evidence and provenance
Accepted work leaves an objective record: workflow resolution, capsule and snapshot digests, Gates, Breakers, Judge decision, resource meters, and replay metadata. Retained reports contain metadata rather than source, task goals, event payloads, or patch text.
Compile, test, write-scope, benchmark, and workflow-specific Gates run inside the bounded transaction. A rejected or ambiguous proposal does not mutate the canonical workspace.
Usage and metrics expose wall, accelerator, CPU, and model timing. Model inference requires an explicit GPU hardware profile and runtime identity; CPU remains available for compilation and verification.
For the full schemas and workflow operation vocabulary, see the repository references for the protocol, workflows, and threat model.