@culture.dev/agents 0.0.0-stage → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +59 -2
- package/dist/contract-schemas/agent.json +128 -0
- package/dist/contract-schemas/allowlist.json +25 -0
- package/dist/contract-schemas/api.json +501 -0
- package/dist/contract-schemas/capabilities.json +208 -0
- package/dist/contract-schemas/common.json +123 -0
- package/dist/contract-schemas/control-action.json +279 -0
- package/dist/contract-schemas/error.json +269 -0
- package/dist/contract-schemas/event.json +316 -0
- package/dist/contract-schemas/run.json +336 -0
- package/dist/contract-schemas/session.json +77 -0
- package/dist/contract-schemas/version.json +22 -0
- package/dist/src/contract/api.d.ts +41 -0
- package/dist/src/contract/api.js +35 -0
- package/dist/src/contract/api.js.map +1 -0
- package/dist/src/contract/errors.d.ts +21 -0
- package/dist/src/contract/errors.js +25 -0
- package/dist/src/contract/errors.js.map +1 -0
- package/dist/src/contract/generated/agent.d.ts +31 -0
- package/dist/src/contract/generated/agent.js +3 -0
- package/dist/src/contract/generated/agent.js.map +1 -0
- package/dist/src/contract/generated/allowlist.d.ts +10 -0
- package/dist/src/contract/generated/allowlist.js +3 -0
- package/dist/src/contract/generated/allowlist.js.map +1 -0
- package/dist/src/contract/generated/capabilities.d.ts +46 -0
- package/dist/src/contract/generated/capabilities.js +3 -0
- package/dist/src/contract/generated/capabilities.js.map +1 -0
- package/dist/src/contract/generated/common.d.ts +40 -0
- package/dist/src/contract/generated/common.js +3 -0
- package/dist/src/contract/generated/common.js.map +1 -0
- package/dist/src/contract/generated/control-action.d.ts +73 -0
- package/dist/src/contract/generated/control-action.js +3 -0
- package/dist/src/contract/generated/control-action.js.map +1 -0
- package/dist/src/contract/generated/error.d.ts +25 -0
- package/dist/src/contract/generated/error.js +3 -0
- package/dist/src/contract/generated/error.js.map +1 -0
- package/dist/src/contract/generated/event.d.ts +80 -0
- package/dist/src/contract/generated/event.js +3 -0
- package/dist/src/contract/generated/event.js.map +1 -0
- package/dist/src/contract/generated/index.d.ts +81 -0
- package/dist/src/contract/generated/index.js +3 -0
- package/dist/src/contract/generated/index.js.map +1 -0
- package/dist/src/contract/generated/run.d.ts +63 -0
- package/dist/src/contract/generated/run.js +3 -0
- package/dist/src/contract/generated/run.js.map +1 -0
- package/dist/src/contract/generated/session.d.ts +12 -0
- package/dist/src/contract/generated/session.js +3 -0
- package/dist/src/contract/generated/session.js.map +1 -0
- package/dist/src/contract/generated/version.d.ts +9 -0
- package/dist/src/contract/generated/version.js +3 -0
- package/dist/src/contract/generated/version.js.map +1 -0
- package/dist/src/contract/ids.d.ts +36 -0
- package/dist/src/contract/ids.js +85 -0
- package/dist/src/contract/ids.js.map +1 -0
- package/dist/src/contract/index.d.ts +17 -0
- package/dist/src/contract/index.js +13 -0
- package/dist/src/contract/index.js.map +1 -0
- package/dist/src/contract/run-state.d.ts +13 -0
- package/dist/src/contract/run-state.js +24 -0
- package/dist/src/contract/run-state.js.map +1 -0
- package/dist/src/contract/schemas.d.ts +18 -0
- package/dist/src/contract/schemas.js +37 -0
- package/dist/src/contract/schemas.js.map +1 -0
- package/dist/src/contract/validate.d.ts +17 -0
- package/dist/src/contract/validate.js +68 -0
- package/dist/src/contract/validate.js.map +1 -0
- package/dist/src/daemon/allowlist.d.ts +23 -0
- package/dist/src/daemon/allowlist.js +57 -0
- package/dist/src/daemon/allowlist.js.map +1 -0
- package/dist/src/daemon/daemon.d.ts +31 -0
- package/dist/src/daemon/daemon.js +141 -0
- package/dist/src/daemon/daemon.js.map +1 -0
- package/dist/src/daemon/errors.d.ts +14 -0
- package/dist/src/daemon/errors.js +26 -0
- package/dist/src/daemon/errors.js.map +1 -0
- package/dist/src/daemon/harness-catalog.d.ts +11 -0
- package/dist/src/daemon/harness-catalog.js +21 -0
- package/dist/src/daemon/harness-catalog.js.map +1 -0
- package/dist/src/daemon/http.d.ts +15 -0
- package/dist/src/daemon/http.js +76 -0
- package/dist/src/daemon/http.js.map +1 -0
- package/dist/src/daemon/lock.d.ts +47 -0
- package/dist/src/daemon/lock.js +167 -0
- package/dist/src/daemon/lock.js.map +1 -0
- package/dist/src/daemon/main.d.ts +32 -0
- package/dist/src/daemon/main.js +204 -0
- package/dist/src/daemon/main.js.map +1 -0
- package/dist/src/daemon/paths.d.ts +29 -0
- package/dist/src/daemon/paths.js +26 -0
- package/dist/src/daemon/paths.js.map +1 -0
- package/dist/src/daemon/ports.d.ts +58 -0
- package/dist/src/daemon/ports.js +2 -0
- package/dist/src/daemon/ports.js.map +1 -0
- package/dist/src/daemon/routes.d.ts +15 -0
- package/dist/src/daemon/routes.js +259 -0
- package/dist/src/daemon/routes.js.map +1 -0
- package/dist/src/daemon/sse.d.ts +8 -0
- package/dist/src/daemon/sse.js +56 -0
- package/dist/src/daemon/sse.js.map +1 -0
- package/dist/src/harness/availability.d.ts +9 -0
- package/dist/src/harness/availability.js +52 -0
- package/dist/src/harness/availability.js.map +1 -0
- package/dist/src/harness/claude-code/agent.d.ts +4 -0
- package/dist/src/harness/claude-code/agent.js +33 -0
- package/dist/src/harness/claude-code/agent.js.map +1 -0
- package/dist/src/harness/claude-code/backend.d.ts +48 -0
- package/dist/src/harness/claude-code/backend.js +83 -0
- package/dist/src/harness/claude-code/backend.js.map +1 -0
- package/dist/src/harness/claude-code/capabilities.d.ts +7 -0
- package/dist/src/harness/claude-code/capabilities.js +11 -0
- package/dist/src/harness/claude-code/capabilities.js.map +1 -0
- package/dist/src/harness/claude-code/index.d.ts +15 -0
- package/dist/src/harness/claude-code/index.js +20 -0
- package/dist/src/harness/claude-code/index.js.map +1 -0
- package/dist/src/harness/claude-code/map.d.ts +30 -0
- package/dist/src/harness/claude-code/map.js +108 -0
- package/dist/src/harness/claude-code/map.js.map +1 -0
- package/dist/src/harness/common/capabilities.d.ts +34 -0
- package/dist/src/harness/common/capabilities.js +60 -0
- package/dist/src/harness/common/capabilities.js.map +1 -0
- package/dist/src/harness/common/guard.d.ts +18 -0
- package/dist/src/harness/common/guard.js +31 -0
- package/dist/src/harness/common/guard.js.map +1 -0
- package/dist/src/harness/common/processes.d.ts +21 -0
- package/dist/src/harness/common/processes.js +46 -0
- package/dist/src/harness/common/processes.js.map +1 -0
- package/dist/src/harness/common/queue.d.ts +20 -0
- package/dist/src/harness/common/queue.js +76 -0
- package/dist/src/harness/common/queue.js.map +1 -0
- package/dist/src/harness/common/run-driver.d.ts +88 -0
- package/dist/src/harness/common/run-driver.js +317 -0
- package/dist/src/harness/common/run-driver.js.map +1 -0
- package/dist/src/harness/common/sandbox-workspace.d.ts +72 -0
- package/dist/src/harness/common/sandbox-workspace.js +155 -0
- package/dist/src/harness/common/sandbox-workspace.js.map +1 -0
- package/dist/src/harness/common/text.d.ts +9 -0
- package/dist/src/harness/common/text.js +49 -0
- package/dist/src/harness/common/text.js.map +1 -0
- package/dist/src/harness/common/types.d.ts +111 -0
- package/dist/src/harness/common/types.js +2 -0
- package/dist/src/harness/common/types.js.map +1 -0
- package/dist/src/harness/config.d.ts +43 -0
- package/dist/src/harness/config.js +200 -0
- package/dist/src/harness/config.js.map +1 -0
- package/dist/src/harness/index.d.ts +21 -0
- package/dist/src/harness/index.js +89 -0
- package/dist/src/harness/index.js.map +1 -0
- package/dist/src/harness/opencode/backend.d.ts +37 -0
- package/dist/src/harness/opencode/backend.js +114 -0
- package/dist/src/harness/opencode/backend.js.map +1 -0
- package/dist/src/harness/opencode/capabilities.d.ts +8 -0
- package/dist/src/harness/opencode/capabilities.js +11 -0
- package/dist/src/harness/opencode/capabilities.js.map +1 -0
- package/dist/src/harness/opencode/client.d.ts +70 -0
- package/dist/src/harness/opencode/client.js +189 -0
- package/dist/src/harness/opencode/client.js.map +1 -0
- package/dist/src/harness/opencode/index.d.ts +13 -0
- package/dist/src/harness/opencode/index.js +19 -0
- package/dist/src/harness/opencode/index.js.map +1 -0
- package/dist/src/harness/opencode/lines.d.ts +14 -0
- package/dist/src/harness/opencode/lines.js +99 -0
- package/dist/src/harness/opencode/lines.js.map +1 -0
- package/dist/src/harness/opencode/map.d.ts +13 -0
- package/dist/src/harness/opencode/map.js +84 -0
- package/dist/src/harness/opencode/map.js.map +1 -0
- package/dist/src/harness/opencode/turn.d.ts +23 -0
- package/dist/src/harness/opencode/turn.js +143 -0
- package/dist/src/harness/opencode/turn.js.map +1 -0
- package/dist/src/harness/reclaim.d.ts +13 -0
- package/dist/src/harness/reclaim.js +18 -0
- package/dist/src/harness/reclaim.js.map +1 -0
- package/dist/src/harness/stub/backend.d.ts +11 -0
- package/dist/src/harness/stub/backend.js +125 -0
- package/dist/src/harness/stub/backend.js.map +1 -0
- package/dist/src/harness/stub/index.d.ts +18 -0
- package/dist/src/harness/stub/index.js +21 -0
- package/dist/src/harness/stub/index.js.map +1 -0
- package/dist/src/harness/stub/workspace.d.ts +29 -0
- package/dist/src/harness/stub/workspace.js +92 -0
- package/dist/src/harness/stub/workspace.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/runs/agents.d.ts +10 -0
- package/dist/src/runs/agents.js +49 -0
- package/dist/src/runs/agents.js.map +1 -0
- package/dist/src/runs/control.d.ts +31 -0
- package/dist/src/runs/control.js +105 -0
- package/dist/src/runs/control.js.map +1 -0
- package/dist/src/runs/index.d.ts +8 -0
- package/dist/src/runs/index.js +7 -0
- package/dist/src/runs/index.js.map +1 -0
- package/dist/src/runs/ports.d.ts +31 -0
- package/dist/src/runs/ports.js +5 -0
- package/dist/src/runs/ports.js.map +1 -0
- package/dist/src/runs/scan.d.ts +38 -0
- package/dist/src/runs/scan.js +149 -0
- package/dist/src/runs/scan.js.map +1 -0
- package/dist/src/runs/service.d.ts +70 -0
- package/dist/src/runs/service.js +239 -0
- package/dist/src/runs/service.js.map +1 -0
- package/dist/src/sandbox/harness-session.d.ts +11 -0
- package/dist/src/sandbox/harness-session.js +170 -0
- package/dist/src/sandbox/harness-session.js.map +1 -0
- package/dist/src/sandbox/host-command.d.ts +19 -0
- package/dist/src/sandbox/host-command.js +41 -0
- package/dist/src/sandbox/host-command.js.map +1 -0
- package/dist/src/sandbox/index.d.ts +11 -0
- package/dist/src/sandbox/index.js +15 -0
- package/dist/src/sandbox/index.js.map +1 -0
- package/dist/src/sandbox/naming.d.ts +49 -0
- package/dist/src/sandbox/naming.js +106 -0
- package/dist/src/sandbox/naming.js.map +1 -0
- package/dist/src/sandbox/openshell-client.d.ts +81 -0
- package/dist/src/sandbox/openshell-client.js +49 -0
- package/dist/src/sandbox/openshell-client.js.map +1 -0
- package/dist/src/sandbox/policy.d.ts +26 -0
- package/dist/src/sandbox/policy.js +100 -0
- package/dist/src/sandbox/policy.js.map +1 -0
- package/dist/src/sandbox/run-sandbox.d.ts +38 -0
- package/dist/src/sandbox/run-sandbox.js +247 -0
- package/dist/src/sandbox/run-sandbox.js.map +1 -0
- package/dist/src/sandbox/run-sandboxes.d.ts +18 -0
- package/dist/src/sandbox/run-sandboxes.js +225 -0
- package/dist/src/sandbox/run-sandboxes.js.map +1 -0
- package/dist/src/sandbox/timeout.d.ts +12 -0
- package/dist/src/sandbox/timeout.js +39 -0
- package/dist/src/sandbox/timeout.js.map +1 -0
- package/dist/src/sandbox/types.d.ts +125 -0
- package/dist/src/sandbox/types.js +15 -0
- package/dist/src/sandbox/types.js.map +1 -0
- package/dist/src/sandbox/worktree.d.ts +72 -0
- package/dist/src/sandbox/worktree.js +157 -0
- package/dist/src/sandbox/worktree.js.map +1 -0
- package/dist/src/store/derive.d.ts +39 -0
- package/dist/src/store/derive.js +68 -0
- package/dist/src/store/derive.js.map +1 -0
- package/dist/src/store/event-log.d.ts +79 -0
- package/dist/src/store/event-log.js +202 -0
- package/dist/src/store/event-log.js.map +1 -0
- package/dist/src/store/files.d.ts +51 -0
- package/dist/src/store/files.js +103 -0
- package/dist/src/store/files.js.map +1 -0
- package/dist/src/store/index.d.ts +15 -0
- package/dist/src/store/index.js +11 -0
- package/dist/src/store/index.js.map +1 -0
- package/dist/src/store/liveness.d.ts +61 -0
- package/dist/src/store/liveness.js +150 -0
- package/dist/src/store/liveness.js.map +1 -0
- package/dist/src/store/run-store.d.ts +67 -0
- package/dist/src/store/run-store.js +211 -0
- package/dist/src/store/run-store.js.map +1 -0
- package/dist/src/util/sequence.d.ts +58 -0
- package/dist/src/util/sequence.js +119 -0
- package/dist/src/util/sequence.js.map +1 -0
- package/dist/src/worker/control.d.ts +60 -0
- package/dist/src/worker/control.js +205 -0
- package/dist/src/worker/control.js.map +1 -0
- package/dist/src/worker/delivery.d.ts +17 -0
- package/dist/src/worker/delivery.js +43 -0
- package/dist/src/worker/delivery.js.map +1 -0
- package/dist/src/worker/driver.d.ts +88 -0
- package/dist/src/worker/driver.js +6 -0
- package/dist/src/worker/driver.js.map +1 -0
- package/dist/src/worker/fake-driver.d.ts +65 -0
- package/dist/src/worker/fake-driver.js +123 -0
- package/dist/src/worker/fake-driver.js.map +1 -0
- package/dist/src/worker/index.d.ts +15 -0
- package/dist/src/worker/index.js +11 -0
- package/dist/src/worker/index.js.map +1 -0
- package/dist/src/worker/main.d.ts +1 -0
- package/dist/src/worker/main.js +57 -0
- package/dist/src/worker/main.js.map +1 -0
- package/dist/src/worker/retained.d.ts +13 -0
- package/dist/src/worker/retained.js +40 -0
- package/dist/src/worker/retained.js.map +1 -0
- package/dist/src/worker/run-loop.d.ts +63 -0
- package/dist/src/worker/run-loop.js +325 -0
- package/dist/src/worker/run-loop.js.map +1 -0
- package/dist/src/worker/spawn.d.ts +68 -0
- package/dist/src/worker/spawn.js +201 -0
- package/dist/src/worker/spawn.js.map +1 -0
- package/image/Dockerfile +81 -0
- package/image/build.sh +62 -0
- package/image/pnpm-shim.sh +25 -0
- package/package.json +54 -4
- package/policy/profiles/culture-agents-claude-subscription.yaml +59 -0
- package/policy/profiles/culture-agents-local-gateway.yaml +49 -0
- package/policy/run-sandbox.policy.json +10 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api_version": "2.0",
|
|
3
|
+
"schema_base": "https://culture.dev/contract/agents/",
|
|
4
|
+
"description": "Index of the culture-agents control-plane API. Semantics live in contract/README.md; payload shapes in the schema files named here, resolved against schema_base.",
|
|
5
|
+
"transport": {
|
|
6
|
+
"kind": "http/1.1 over a Unix domain socket",
|
|
7
|
+
"socket": "${XDG_RUNTIME_DIR}/culture-agents/core.sock",
|
|
8
|
+
"socket_fallback": "${XDG_STATE_HOME:-$HOME/.local/state}/culture-agents/core.sock",
|
|
9
|
+
"socket_override_env": "CULTURE_AGENTS_SOCKET",
|
|
10
|
+
"socket_mode": "0600",
|
|
11
|
+
"version_header": "Agents-Api-Version"
|
|
12
|
+
},
|
|
13
|
+
"compatibility": "Client and core are compatible when their MAJOR numbers are equal and the core's MINOR is greater than or equal to the client's MINOR.",
|
|
14
|
+
"state_machine": {
|
|
15
|
+
"initial": "queued",
|
|
16
|
+
"active": [
|
|
17
|
+
"queued",
|
|
18
|
+
"running",
|
|
19
|
+
"cancelling"
|
|
20
|
+
],
|
|
21
|
+
"terminal": [
|
|
22
|
+
"succeeded",
|
|
23
|
+
"failed",
|
|
24
|
+
"cancelled",
|
|
25
|
+
"timed_out",
|
|
26
|
+
"unknown"
|
|
27
|
+
],
|
|
28
|
+
"transitions": {
|
|
29
|
+
"queued": [
|
|
30
|
+
"running",
|
|
31
|
+
"cancelling",
|
|
32
|
+
"failed",
|
|
33
|
+
"unknown"
|
|
34
|
+
],
|
|
35
|
+
"running": [
|
|
36
|
+
"cancelling",
|
|
37
|
+
"succeeded",
|
|
38
|
+
"failed",
|
|
39
|
+
"unknown"
|
|
40
|
+
],
|
|
41
|
+
"cancelling": [
|
|
42
|
+
"cancelled",
|
|
43
|
+
"timed_out",
|
|
44
|
+
"succeeded",
|
|
45
|
+
"failed",
|
|
46
|
+
"unknown"
|
|
47
|
+
],
|
|
48
|
+
"succeeded": [],
|
|
49
|
+
"failed": [],
|
|
50
|
+
"cancelled": [],
|
|
51
|
+
"timed_out": [],
|
|
52
|
+
"unknown": []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"errors": {
|
|
56
|
+
"invalid": {
|
|
57
|
+
"http_status": 400,
|
|
58
|
+
"exit_code": 1,
|
|
59
|
+
"retryable": false
|
|
60
|
+
},
|
|
61
|
+
"denied": {
|
|
62
|
+
"http_status": 403,
|
|
63
|
+
"exit_code": 1,
|
|
64
|
+
"retryable": false
|
|
65
|
+
},
|
|
66
|
+
"not_found": {
|
|
67
|
+
"http_status": 404,
|
|
68
|
+
"exit_code": 1,
|
|
69
|
+
"retryable": false
|
|
70
|
+
},
|
|
71
|
+
"busy": {
|
|
72
|
+
"http_status": 409,
|
|
73
|
+
"exit_code": 1,
|
|
74
|
+
"retryable": true
|
|
75
|
+
},
|
|
76
|
+
"conflict": {
|
|
77
|
+
"http_status": 409,
|
|
78
|
+
"exit_code": 1,
|
|
79
|
+
"retryable": null
|
|
80
|
+
},
|
|
81
|
+
"unsupported": {
|
|
82
|
+
"http_status": 422,
|
|
83
|
+
"exit_code": 1,
|
|
84
|
+
"retryable": false
|
|
85
|
+
},
|
|
86
|
+
"incompatible_version": {
|
|
87
|
+
"http_status": 412,
|
|
88
|
+
"exit_code": 2,
|
|
89
|
+
"retryable": false
|
|
90
|
+
},
|
|
91
|
+
"unavailable": {
|
|
92
|
+
"http_status": 503,
|
|
93
|
+
"exit_code": 2,
|
|
94
|
+
"retryable": true
|
|
95
|
+
},
|
|
96
|
+
"internal": {
|
|
97
|
+
"http_status": 500,
|
|
98
|
+
"exit_code": 2,
|
|
99
|
+
"retryable": false
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"routes": [
|
|
103
|
+
{
|
|
104
|
+
"id": "version",
|
|
105
|
+
"method": "GET",
|
|
106
|
+
"path": "/v1/version",
|
|
107
|
+
"summary": "API version, core version and node. Never refused for version mismatch.",
|
|
108
|
+
"cli": "(every verb, on connect)",
|
|
109
|
+
"d1": "supported",
|
|
110
|
+
"request": null,
|
|
111
|
+
"response": "version.json",
|
|
112
|
+
"status": 200,
|
|
113
|
+
"stream": false,
|
|
114
|
+
"content_type": "application/json",
|
|
115
|
+
"params": {},
|
|
116
|
+
"query": {},
|
|
117
|
+
"errors": [
|
|
118
|
+
"internal"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "agents.list",
|
|
123
|
+
"method": "GET",
|
|
124
|
+
"path": "/v1/agents",
|
|
125
|
+
"summary": "Every known agent plus every harness capability document.",
|
|
126
|
+
"cli": "agents agents list",
|
|
127
|
+
"d1": "supported",
|
|
128
|
+
"request": null,
|
|
129
|
+
"response": "agent.json#/$defs/agent_list",
|
|
130
|
+
"status": 200,
|
|
131
|
+
"stream": false,
|
|
132
|
+
"content_type": "application/json",
|
|
133
|
+
"params": {},
|
|
134
|
+
"query": {},
|
|
135
|
+
"errors": [
|
|
136
|
+
"invalid",
|
|
137
|
+
"incompatible_version",
|
|
138
|
+
"internal"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "agents.status",
|
|
143
|
+
"method": "GET",
|
|
144
|
+
"path": "/v1/agents/{agent_id}",
|
|
145
|
+
"summary": "One agent.",
|
|
146
|
+
"cli": "agents agents status",
|
|
147
|
+
"d1": "supported",
|
|
148
|
+
"request": null,
|
|
149
|
+
"response": "agent.json",
|
|
150
|
+
"status": 200,
|
|
151
|
+
"stream": false,
|
|
152
|
+
"content_type": "application/json",
|
|
153
|
+
"params": {
|
|
154
|
+
"agent_id": "common.json#/$defs/mesh_id"
|
|
155
|
+
},
|
|
156
|
+
"query": {},
|
|
157
|
+
"errors": [
|
|
158
|
+
"invalid",
|
|
159
|
+
"incompatible_version",
|
|
160
|
+
"internal",
|
|
161
|
+
"not_found"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "harnesses.list",
|
|
166
|
+
"method": "GET",
|
|
167
|
+
"path": "/v1/harnesses",
|
|
168
|
+
"summary": "Every harness capability document.",
|
|
169
|
+
"cli": "agents agents list",
|
|
170
|
+
"d1": "supported",
|
|
171
|
+
"request": null,
|
|
172
|
+
"response": "capabilities.json#/$defs/capabilities_list",
|
|
173
|
+
"status": 200,
|
|
174
|
+
"stream": false,
|
|
175
|
+
"content_type": "application/json",
|
|
176
|
+
"params": {},
|
|
177
|
+
"query": {},
|
|
178
|
+
"errors": [
|
|
179
|
+
"invalid",
|
|
180
|
+
"incompatible_version",
|
|
181
|
+
"internal"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "harnesses.show",
|
|
186
|
+
"method": "GET",
|
|
187
|
+
"path": "/v1/harnesses/{harness}",
|
|
188
|
+
"summary": "One harness capability document.",
|
|
189
|
+
"cli": "agents agents status",
|
|
190
|
+
"d1": "supported",
|
|
191
|
+
"request": null,
|
|
192
|
+
"response": "capabilities.json",
|
|
193
|
+
"status": 200,
|
|
194
|
+
"stream": false,
|
|
195
|
+
"content_type": "application/json",
|
|
196
|
+
"params": {
|
|
197
|
+
"harness": "common.json#/$defs/harness_id"
|
|
198
|
+
},
|
|
199
|
+
"query": {},
|
|
200
|
+
"errors": [
|
|
201
|
+
"invalid",
|
|
202
|
+
"incompatible_version",
|
|
203
|
+
"internal",
|
|
204
|
+
"not_found"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "runs.submit",
|
|
209
|
+
"method": "POST",
|
|
210
|
+
"path": "/v1/runs",
|
|
211
|
+
"summary": "Create a run; returns once the worker's PID, event log and cursor are on disk.",
|
|
212
|
+
"cli": "agents runs submit",
|
|
213
|
+
"d1": "supported",
|
|
214
|
+
"request": "control-action.json#/$defs/submit_request",
|
|
215
|
+
"response": "control-action.json#/$defs/submit_response",
|
|
216
|
+
"status": 201,
|
|
217
|
+
"stream": false,
|
|
218
|
+
"content_type": "application/json",
|
|
219
|
+
"params": {},
|
|
220
|
+
"query": {},
|
|
221
|
+
"errors": [
|
|
222
|
+
"invalid",
|
|
223
|
+
"incompatible_version",
|
|
224
|
+
"internal",
|
|
225
|
+
"denied",
|
|
226
|
+
"not_found",
|
|
227
|
+
"unsupported",
|
|
228
|
+
"busy",
|
|
229
|
+
"unavailable"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"id": "runs.list",
|
|
234
|
+
"method": "GET",
|
|
235
|
+
"path": "/v1/runs",
|
|
236
|
+
"summary": "Runs, newest first, optionally filtered.",
|
|
237
|
+
"cli": "agents runs list",
|
|
238
|
+
"d1": "supported",
|
|
239
|
+
"request": null,
|
|
240
|
+
"response": "run.json#/$defs/run_list",
|
|
241
|
+
"status": 200,
|
|
242
|
+
"stream": false,
|
|
243
|
+
"content_type": "application/json",
|
|
244
|
+
"params": {},
|
|
245
|
+
"query": {
|
|
246
|
+
"state": {
|
|
247
|
+
"$ref": "run.json#/$defs/state"
|
|
248
|
+
},
|
|
249
|
+
"agent_id": {
|
|
250
|
+
"$ref": "common.json#/$defs/mesh_id"
|
|
251
|
+
},
|
|
252
|
+
"limit": {
|
|
253
|
+
"type": "integer",
|
|
254
|
+
"minimum": 1,
|
|
255
|
+
"maximum": 500,
|
|
256
|
+
"default": 50
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"errors": [
|
|
260
|
+
"invalid",
|
|
261
|
+
"incompatible_version",
|
|
262
|
+
"internal"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"id": "runs.show",
|
|
267
|
+
"method": "GET",
|
|
268
|
+
"path": "/v1/runs/{run_id}",
|
|
269
|
+
"summary": "One run.",
|
|
270
|
+
"cli": "agents runs show",
|
|
271
|
+
"d1": "supported",
|
|
272
|
+
"request": null,
|
|
273
|
+
"response": "run.json",
|
|
274
|
+
"status": 200,
|
|
275
|
+
"stream": false,
|
|
276
|
+
"content_type": "application/json",
|
|
277
|
+
"params": {
|
|
278
|
+
"run_id": "common.json#/$defs/run_id"
|
|
279
|
+
},
|
|
280
|
+
"query": {},
|
|
281
|
+
"errors": [
|
|
282
|
+
"invalid",
|
|
283
|
+
"incompatible_version",
|
|
284
|
+
"internal",
|
|
285
|
+
"not_found"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "runs.attach",
|
|
290
|
+
"method": "GET",
|
|
291
|
+
"path": "/v1/runs/{run_id}/attach",
|
|
292
|
+
"summary": "SSE: replay events with cursor > after, then follow live; closes after the terminal run.state event.",
|
|
293
|
+
"cli": "agents runs attach",
|
|
294
|
+
"d1": "supported",
|
|
295
|
+
"request": null,
|
|
296
|
+
"response": "event.json",
|
|
297
|
+
"status": 200,
|
|
298
|
+
"stream": true,
|
|
299
|
+
"content_type": "text/event-stream",
|
|
300
|
+
"params": {
|
|
301
|
+
"run_id": "common.json#/$defs/run_id"
|
|
302
|
+
},
|
|
303
|
+
"query": {
|
|
304
|
+
"after": {
|
|
305
|
+
"type": "integer",
|
|
306
|
+
"minimum": 0,
|
|
307
|
+
"default": 0
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"errors": [
|
|
311
|
+
"invalid",
|
|
312
|
+
"incompatible_version",
|
|
313
|
+
"internal",
|
|
314
|
+
"not_found"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"id": "runs.logs",
|
|
319
|
+
"method": "GET",
|
|
320
|
+
"path": "/v1/runs/{run_id}/events",
|
|
321
|
+
"summary": "A page of stored events with cursor > after, oldest first.",
|
|
322
|
+
"cli": "agents runs logs",
|
|
323
|
+
"d1": "supported",
|
|
324
|
+
"request": null,
|
|
325
|
+
"response": "event.json#/$defs/event_page",
|
|
326
|
+
"status": 200,
|
|
327
|
+
"stream": false,
|
|
328
|
+
"content_type": "application/json",
|
|
329
|
+
"params": {
|
|
330
|
+
"run_id": "common.json#/$defs/run_id"
|
|
331
|
+
},
|
|
332
|
+
"query": {
|
|
333
|
+
"after": {
|
|
334
|
+
"type": "integer",
|
|
335
|
+
"minimum": 0,
|
|
336
|
+
"default": 0
|
|
337
|
+
},
|
|
338
|
+
"limit": {
|
|
339
|
+
"type": "integer",
|
|
340
|
+
"minimum": 1,
|
|
341
|
+
"maximum": 5000,
|
|
342
|
+
"default": 500
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"errors": [
|
|
346
|
+
"invalid",
|
|
347
|
+
"incompatible_version",
|
|
348
|
+
"internal",
|
|
349
|
+
"not_found"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"id": "runs.result",
|
|
354
|
+
"method": "GET",
|
|
355
|
+
"path": "/v1/runs/{run_id}/result",
|
|
356
|
+
"summary": "Outcome of a terminal run; conflict while the run is active.",
|
|
357
|
+
"cli": "agents runs result",
|
|
358
|
+
"d1": "supported",
|
|
359
|
+
"request": null,
|
|
360
|
+
"response": "run.json#/$defs/run_result",
|
|
361
|
+
"status": 200,
|
|
362
|
+
"stream": false,
|
|
363
|
+
"content_type": "application/json",
|
|
364
|
+
"params": {
|
|
365
|
+
"run_id": "common.json#/$defs/run_id"
|
|
366
|
+
},
|
|
367
|
+
"query": {},
|
|
368
|
+
"errors": [
|
|
369
|
+
"invalid",
|
|
370
|
+
"incompatible_version",
|
|
371
|
+
"internal",
|
|
372
|
+
"not_found",
|
|
373
|
+
"conflict"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"id": "runs.steer",
|
|
378
|
+
"method": "POST",
|
|
379
|
+
"path": "/v1/runs/{run_id}/steer",
|
|
380
|
+
"summary": "Deliver a mid-run instruction to a running run.",
|
|
381
|
+
"cli": "agents runs steer",
|
|
382
|
+
"d1": "supported",
|
|
383
|
+
"request": "control-action.json#/$defs/steer_request",
|
|
384
|
+
"response": "control-action.json#/$defs/accepted_response",
|
|
385
|
+
"status": 202,
|
|
386
|
+
"stream": false,
|
|
387
|
+
"content_type": "application/json",
|
|
388
|
+
"params": {
|
|
389
|
+
"run_id": "common.json#/$defs/run_id"
|
|
390
|
+
},
|
|
391
|
+
"query": {},
|
|
392
|
+
"errors": [
|
|
393
|
+
"invalid",
|
|
394
|
+
"incompatible_version",
|
|
395
|
+
"internal",
|
|
396
|
+
"not_found",
|
|
397
|
+
"conflict",
|
|
398
|
+
"unsupported",
|
|
399
|
+
"unavailable"
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"id": "runs.cancel",
|
|
404
|
+
"method": "POST",
|
|
405
|
+
"path": "/v1/runs/{run_id}/cancel",
|
|
406
|
+
"summary": "Start cancellation; the run moves to cancelling, then a terminal state.",
|
|
407
|
+
"cli": "agents runs cancel",
|
|
408
|
+
"d1": "supported",
|
|
409
|
+
"request": "control-action.json#/$defs/cancel_request",
|
|
410
|
+
"response": "control-action.json#/$defs/accepted_response",
|
|
411
|
+
"status": 202,
|
|
412
|
+
"stream": false,
|
|
413
|
+
"content_type": "application/json",
|
|
414
|
+
"params": {
|
|
415
|
+
"run_id": "common.json#/$defs/run_id"
|
|
416
|
+
},
|
|
417
|
+
"query": {},
|
|
418
|
+
"errors": [
|
|
419
|
+
"invalid",
|
|
420
|
+
"incompatible_version",
|
|
421
|
+
"internal",
|
|
422
|
+
"not_found",
|
|
423
|
+
"conflict",
|
|
424
|
+
"unsupported",
|
|
425
|
+
"unavailable"
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"id": "runs.pause",
|
|
430
|
+
"method": "POST",
|
|
431
|
+
"path": "/v1/runs/{run_id}/pause",
|
|
432
|
+
"summary": "Deferred: always refused with unsupported, capability pause, after validation and not_found checks.",
|
|
433
|
+
"cli": "(none in D1)",
|
|
434
|
+
"d1": "unsupported",
|
|
435
|
+
"request": "control-action.json#/$defs/pause_request",
|
|
436
|
+
"response": "control-action.json#/$defs/accepted_response",
|
|
437
|
+
"status": 202,
|
|
438
|
+
"stream": false,
|
|
439
|
+
"content_type": "application/json",
|
|
440
|
+
"params": {
|
|
441
|
+
"run_id": "common.json#/$defs/run_id"
|
|
442
|
+
},
|
|
443
|
+
"query": {},
|
|
444
|
+
"errors": [
|
|
445
|
+
"invalid",
|
|
446
|
+
"incompatible_version",
|
|
447
|
+
"internal",
|
|
448
|
+
"not_found",
|
|
449
|
+
"unsupported"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"id": "runs.resume",
|
|
454
|
+
"method": "POST",
|
|
455
|
+
"path": "/v1/runs/{run_id}/resume",
|
|
456
|
+
"summary": "Deferred: always refused with unsupported, capability resume, after validation and not_found checks.",
|
|
457
|
+
"cli": "(none in D1)",
|
|
458
|
+
"d1": "unsupported",
|
|
459
|
+
"request": "control-action.json#/$defs/resume_request",
|
|
460
|
+
"response": "control-action.json#/$defs/accepted_response",
|
|
461
|
+
"status": 202,
|
|
462
|
+
"stream": false,
|
|
463
|
+
"content_type": "application/json",
|
|
464
|
+
"params": {
|
|
465
|
+
"run_id": "common.json#/$defs/run_id"
|
|
466
|
+
},
|
|
467
|
+
"query": {},
|
|
468
|
+
"errors": [
|
|
469
|
+
"invalid",
|
|
470
|
+
"incompatible_version",
|
|
471
|
+
"internal",
|
|
472
|
+
"not_found",
|
|
473
|
+
"unsupported"
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"id": "runs.answer",
|
|
478
|
+
"method": "POST",
|
|
479
|
+
"path": "/v1/runs/{run_id}/answer",
|
|
480
|
+
"summary": "Deferred: always refused with unsupported, capability answer, after validation and not_found checks.",
|
|
481
|
+
"cli": "(none in D1)",
|
|
482
|
+
"d1": "unsupported",
|
|
483
|
+
"request": "control-action.json#/$defs/answer_request",
|
|
484
|
+
"response": "control-action.json#/$defs/accepted_response",
|
|
485
|
+
"status": 202,
|
|
486
|
+
"stream": false,
|
|
487
|
+
"content_type": "application/json",
|
|
488
|
+
"params": {
|
|
489
|
+
"run_id": "common.json#/$defs/run_id"
|
|
490
|
+
},
|
|
491
|
+
"query": {},
|
|
492
|
+
"errors": [
|
|
493
|
+
"invalid",
|
|
494
|
+
"incompatible_version",
|
|
495
|
+
"internal",
|
|
496
|
+
"not_found",
|
|
497
|
+
"unsupported"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://culture.dev/contract/agents/capabilities.json",
|
|
4
|
+
"title": "Harness capability document",
|
|
5
|
+
"description": "What one harness can do through this core, stated honestly. Every capability name is always present. A control action whose capability is not supported is refused with an `unsupported` error naming it, never dropped or simulated.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"harness",
|
|
10
|
+
"available",
|
|
11
|
+
"version",
|
|
12
|
+
"transport",
|
|
13
|
+
"capabilities"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"harness": {
|
|
17
|
+
"$ref": "common.json#/$defs/harness_id"
|
|
18
|
+
},
|
|
19
|
+
"available": {
|
|
20
|
+
"description": "Whether the core can start this harness right now (binary, credentials and sandbox present).",
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
"version": {
|
|
24
|
+
"description": "The harness's own version string as detected, or null if unknown.",
|
|
25
|
+
"type": [
|
|
26
|
+
"string",
|
|
27
|
+
"null"
|
|
28
|
+
],
|
|
29
|
+
"maxLength": 128
|
|
30
|
+
},
|
|
31
|
+
"transport": {
|
|
32
|
+
"description": "Neutral one-line description of how the core drives the harness (for example `interactive session over a local bridge`). Informational only.",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"maxLength": 200
|
|
36
|
+
},
|
|
37
|
+
"capabilities": {
|
|
38
|
+
"$ref": "#/$defs/capability_set"
|
|
39
|
+
},
|
|
40
|
+
"extension": {
|
|
41
|
+
"$ref": "common.json#/$defs/extension"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"$defs": {
|
|
45
|
+
"capability_name": {
|
|
46
|
+
"description": "Every capability the contract can name in a capability document or an `unsupported` error.",
|
|
47
|
+
"enum": [
|
|
48
|
+
"submit",
|
|
49
|
+
"stream",
|
|
50
|
+
"steer",
|
|
51
|
+
"cancel",
|
|
52
|
+
"pause",
|
|
53
|
+
"resume",
|
|
54
|
+
"answer",
|
|
55
|
+
"continue_session",
|
|
56
|
+
"delegate",
|
|
57
|
+
"placement",
|
|
58
|
+
"reconnect",
|
|
59
|
+
"worktree_isolation"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"capability": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": [
|
|
66
|
+
"supported",
|
|
67
|
+
"reason",
|
|
68
|
+
"caveats"
|
|
69
|
+
],
|
|
70
|
+
"properties": {
|
|
71
|
+
"supported": {
|
|
72
|
+
"type": "boolean"
|
|
73
|
+
},
|
|
74
|
+
"reason": {
|
|
75
|
+
"description": "Why it is unsupported (required then), or null when supported.",
|
|
76
|
+
"type": [
|
|
77
|
+
"string",
|
|
78
|
+
"null"
|
|
79
|
+
],
|
|
80
|
+
"maxLength": 500
|
|
81
|
+
},
|
|
82
|
+
"caveats": {
|
|
83
|
+
"description": "Known limits of a supported capability, for example that cancel can leave a harness child process running until the sandbox is deleted.",
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"maxLength": 500
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"if": {
|
|
93
|
+
"required": [
|
|
94
|
+
"supported"
|
|
95
|
+
],
|
|
96
|
+
"properties": {
|
|
97
|
+
"supported": {
|
|
98
|
+
"const": false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"then": {
|
|
103
|
+
"properties": {
|
|
104
|
+
"reason": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 1
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"deferred": {
|
|
112
|
+
"description": "A capability no harness supports in this API version. Changing it to supportable is a schema change (README: versioning).",
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": [
|
|
116
|
+
"supported",
|
|
117
|
+
"reason",
|
|
118
|
+
"caveats"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"supported": {
|
|
122
|
+
"const": false
|
|
123
|
+
},
|
|
124
|
+
"reason": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 500
|
|
128
|
+
},
|
|
129
|
+
"caveats": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"maxItems": 0
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"capability_set": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"submit",
|
|
140
|
+
"stream",
|
|
141
|
+
"steer",
|
|
142
|
+
"cancel",
|
|
143
|
+
"pause",
|
|
144
|
+
"resume",
|
|
145
|
+
"answer",
|
|
146
|
+
"continue_session",
|
|
147
|
+
"delegate",
|
|
148
|
+
"placement",
|
|
149
|
+
"reconnect",
|
|
150
|
+
"worktree_isolation"
|
|
151
|
+
],
|
|
152
|
+
"properties": {
|
|
153
|
+
"submit": {
|
|
154
|
+
"$ref": "#/$defs/capability"
|
|
155
|
+
},
|
|
156
|
+
"stream": {
|
|
157
|
+
"$ref": "#/$defs/capability"
|
|
158
|
+
},
|
|
159
|
+
"steer": {
|
|
160
|
+
"$ref": "#/$defs/capability"
|
|
161
|
+
},
|
|
162
|
+
"cancel": {
|
|
163
|
+
"$ref": "#/$defs/capability"
|
|
164
|
+
},
|
|
165
|
+
"pause": {
|
|
166
|
+
"$ref": "#/$defs/deferred"
|
|
167
|
+
},
|
|
168
|
+
"resume": {
|
|
169
|
+
"$ref": "#/$defs/deferred"
|
|
170
|
+
},
|
|
171
|
+
"answer": {
|
|
172
|
+
"$ref": "#/$defs/deferred"
|
|
173
|
+
},
|
|
174
|
+
"continue_session": {
|
|
175
|
+
"$ref": "#/$defs/deferred"
|
|
176
|
+
},
|
|
177
|
+
"delegate": {
|
|
178
|
+
"$ref": "#/$defs/deferred"
|
|
179
|
+
},
|
|
180
|
+
"placement": {
|
|
181
|
+
"$ref": "#/$defs/deferred"
|
|
182
|
+
},
|
|
183
|
+
"reconnect": {
|
|
184
|
+
"$ref": "#/$defs/deferred"
|
|
185
|
+
},
|
|
186
|
+
"worktree_isolation": {
|
|
187
|
+
"$ref": "#/$defs/deferred"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"capabilities_list": {
|
|
192
|
+
"description": "Response of GET /v1/harnesses.",
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": [
|
|
196
|
+
"harnesses"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"harnesses": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": {
|
|
202
|
+
"$ref": "#"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|