@orion-agents/orion-code 0.2.2 → 0.3.1
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/CHANGELOG.md +82 -0
- package/README.md +89 -14
- package/README.zh-CN.md +77 -14
- package/bin/orion +15 -4
- package/dist/cli.js +51 -172
- package/dist/cli.js.map +1 -1
- package/dist/commands/model-command-handlers.d.ts +2 -2
- package/dist/commands/model-command-handlers.d.ts.map +1 -1
- package/dist/commands/model-command-handlers.js +113 -32
- package/dist/commands/model-command-handlers.js.map +1 -1
- package/dist/commands/session-command-handlers.d.ts.map +1 -1
- package/dist/commands/session-command-handlers.js +106 -15
- package/dist/commands/session-command-handlers.js.map +1 -1
- package/dist/commands/types.d.ts +13 -3
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js +1 -1
- package/dist/commands/types.js.map +1 -1
- package/dist/core/tool-artifacts.d.ts +2 -0
- package/dist/core/tool-artifacts.d.ts.map +1 -1
- package/dist/core/tool-artifacts.js +27 -1
- package/dist/core/tool-artifacts.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime/agent-loop.d.ts.map +1 -1
- package/dist/runtime/agent-loop.js +3 -3
- package/dist/runtime/agent-loop.js.map +1 -1
- package/dist/runtime/agent-runtime-controller.d.ts +32 -1
- package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-controller.js +241 -27
- package/dist/runtime/agent-runtime-controller.js.map +1 -1
- package/dist/runtime/agent-runtime-protocol.d.ts +4 -0
- package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-protocol.js.map +1 -1
- package/dist/runtime/agent-runtime-runner.d.ts +2 -1
- package/dist/runtime/agent-runtime-runner.d.ts.map +1 -1
- package/dist/runtime/durable-tool-receipt-reader.d.ts +32 -0
- package/dist/runtime/durable-tool-receipt-reader.d.ts.map +1 -0
- package/dist/runtime/durable-tool-receipt-reader.js +130 -0
- package/dist/runtime/durable-tool-receipt-reader.js.map +1 -0
- package/dist/runtime/legacy-thread-materializer.d.ts +31 -0
- package/dist/runtime/legacy-thread-materializer.d.ts.map +1 -1
- package/dist/runtime/legacy-thread-materializer.js +71 -17
- package/dist/runtime/legacy-thread-materializer.js.map +1 -1
- package/dist/runtime/orion-runtime-v1.d.ts +2 -0
- package/dist/runtime/orion-runtime-v1.d.ts.map +1 -1
- package/dist/runtime/orion-runtime-v1.js +7 -1
- package/dist/runtime/orion-runtime-v1.js.map +1 -1
- package/dist/runtime/orion-session-runner.d.ts +7 -2
- package/dist/runtime/orion-session-runner.d.ts.map +1 -1
- package/dist/runtime/orion-session-runner.js +16 -6
- package/dist/runtime/orion-session-runner.js.map +1 -1
- package/dist/runtime/product-bootstrap.d.ts +22 -0
- package/dist/runtime/product-bootstrap.d.ts.map +1 -0
- package/dist/runtime/product-bootstrap.js +374 -0
- package/dist/runtime/product-bootstrap.js.map +1 -0
- package/dist/runtime/product-orion-runtime.d.ts +2 -1
- package/dist/runtime/product-orion-runtime.d.ts.map +1 -1
- package/dist/runtime/product-orion-runtime.js +83 -13
- package/dist/runtime/product-orion-runtime.js.map +1 -1
- package/dist/runtime/protocol/runtime-protocol-v1.d.ts +1 -1
- package/dist/runtime/protocol/runtime-protocol-v1.js +1 -1
- package/dist/runtime/protocol/runtime-protocol-v1.js.map +1 -1
- package/dist/runtime/release-receipts.d.ts +66 -3
- package/dist/runtime/release-receipts.d.ts.map +1 -1
- package/dist/runtime/release-receipts.js +340 -7
- package/dist/runtime/release-receipts.js.map +1 -1
- package/dist/runtime/step-snapshot.d.ts.map +1 -1
- package/dist/runtime/step-snapshot.js +22 -2
- package/dist/runtime/step-snapshot.js.map +1 -1
- package/dist/runtime/subagents/runtime-integration.d.ts +1 -1
- package/dist/runtime/subagents/runtime-integration.d.ts.map +1 -1
- package/dist/runtime/subagents/runtime-integration.js +5 -2
- package/dist/runtime/subagents/runtime-integration.js.map +1 -1
- package/dist/runtime/thread-event-store.d.ts +80 -0
- package/dist/runtime/thread-event-store.d.ts.map +1 -1
- package/dist/runtime/thread-event-store.js +456 -22
- package/dist/runtime/thread-event-store.js.map +1 -1
- package/dist/runtime/thread-projection.d.ts +10 -0
- package/dist/runtime/thread-projection.d.ts.map +1 -1
- package/dist/runtime/thread-projection.js +40 -0
- package/dist/runtime/thread-projection.js.map +1 -1
- package/dist/runtime/thread-runtime.d.ts +3 -1
- package/dist/runtime/thread-runtime.d.ts.map +1 -1
- package/dist/runtime/thread-runtime.js +6 -0
- package/dist/runtime/thread-runtime.js.map +1 -1
- package/dist/runtime/thread-session-index.d.ts +84 -0
- package/dist/runtime/thread-session-index.d.ts.map +1 -0
- package/dist/runtime/thread-session-index.js +503 -0
- package/dist/runtime/thread-session-index.js.map +1 -0
- package/dist/runtime/thread-session-view.d.ts +70 -9
- package/dist/runtime/thread-session-view.d.ts.map +1 -1
- package/dist/runtime/thread-session-view.js +200 -82
- package/dist/runtime/thread-session-view.js.map +1 -1
- package/dist/runtime/thread-ui-adapter.d.ts +2 -0
- package/dist/runtime/thread-ui-adapter.d.ts.map +1 -1
- package/dist/runtime/thread-ui-adapter.js +86 -4
- package/dist/runtime/thread-ui-adapter.js.map +1 -1
- package/dist/runtime/tool-detail-repository.d.ts.map +1 -1
- package/dist/runtime/tool-detail-repository.js +23 -19
- package/dist/runtime/tool-detail-repository.js.map +1 -1
- package/dist/runtime/tool-receipt-validator.d.ts +21 -0
- package/dist/runtime/tool-receipt-validator.d.ts.map +1 -0
- package/dist/runtime/tool-receipt-validator.js +157 -0
- package/dist/runtime/tool-receipt-validator.js.map +1 -0
- package/dist/runtime/ui-events.d.ts +35 -0
- package/dist/runtime/ui-events.d.ts.map +1 -1
- package/dist/runtime/ui-events.js +1 -0
- package/dist/runtime/ui-events.js.map +1 -1
- package/dist/runtime/ui-view-model.d.ts +2 -0
- package/dist/runtime/ui-view-model.d.ts.map +1 -1
- package/dist/runtime/ui-view-model.js +7 -3
- package/dist/runtime/ui-view-model.js.map +1 -1
- package/dist/services/global-config.d.ts +25 -0
- package/dist/services/global-config.d.ts.map +1 -1
- package/dist/services/global-config.js +373 -5
- package/dist/services/global-config.js.map +1 -1
- package/dist/services/redaction.d.ts +4 -0
- package/dist/services/redaction.d.ts.map +1 -1
- package/dist/services/redaction.js +63 -0
- package/dist/services/redaction.js.map +1 -1
- package/dist/services/session-index.d.ts +16 -0
- package/dist/services/session-index.d.ts.map +1 -1
- package/dist/services/session-index.js +45 -36
- package/dist/services/session-index.js.map +1 -1
- package/dist/services/session-storage.d.ts +59 -0
- package/dist/services/session-storage.d.ts.map +1 -1
- package/dist/services/session-storage.js +306 -107
- package/dist/services/session-storage.js.map +1 -1
- package/dist/services/settings-coordinator.d.ts +174 -0
- package/dist/services/settings-coordinator.d.ts.map +1 -0
- package/dist/services/settings-coordinator.js +605 -0
- package/dist/services/settings-coordinator.js.map +1 -0
- package/dist/services/settings-document-repository.d.ts +138 -0
- package/dist/services/settings-document-repository.d.ts.map +1 -0
- package/dist/services/settings-document-repository.js +551 -0
- package/dist/services/settings-document-repository.js.map +1 -0
- package/dist/services/workspace-registry.d.ts +42 -0
- package/dist/services/workspace-registry.d.ts.map +1 -0
- package/dist/services/workspace-registry.js +222 -0
- package/dist/services/workspace-registry.js.map +1 -0
- package/dist/terminal-ui/launch.d.ts.map +1 -1
- package/dist/terminal-ui/launch.js +5 -0
- package/dist/terminal-ui/launch.js.map +1 -1
- package/dist/tui-ui/state.d.ts.map +1 -1
- package/dist/tui-ui/state.js +5 -0
- package/dist/tui-ui/state.js.map +1 -1
- package/dist/web/errors.d.ts +6 -0
- package/dist/web/errors.d.ts.map +1 -0
- package/dist/web/errors.js +13 -0
- package/dist/web/errors.js.map +1 -0
- package/dist/web/event-hub.d.ts +43 -0
- package/dist/web/event-hub.d.ts.map +1 -0
- package/dist/web/event-hub.js +323 -0
- package/dist/web/event-hub.js.map +1 -0
- package/dist/web/file-read-service.d.ts +55 -0
- package/dist/web/file-read-service.d.ts.map +1 -0
- package/dist/web/file-read-service.js +399 -0
- package/dist/web/file-read-service.js.map +1 -0
- package/dist/web/git-read-model-service.d.ts +77 -0
- package/dist/web/git-read-model-service.d.ts.map +1 -0
- package/dist/web/git-read-model-service.js +631 -0
- package/dist/web/git-read-model-service.js.map +1 -0
- package/dist/web/index.d.ts +6 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +28 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/launch.d.ts +9 -0
- package/dist/web/launch.d.ts.map +1 -0
- package/dist/web/launch.js +64 -0
- package/dist/web/launch.js.map +1 -0
- package/dist/web/protocol.d.ts +408 -0
- package/dist/web/protocol.d.ts.map +1 -0
- package/dist/web/protocol.js +369 -0
- package/dist/web/protocol.js.map +1 -0
- package/dist/web/review-service.d.ts +38 -0
- package/dist/web/review-service.d.ts.map +1 -0
- package/dist/web/review-service.js +74 -0
- package/dist/web/review-service.js.map +1 -0
- package/dist/web/server.d.ts +20 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +744 -0
- package/dist/web/server.js.map +1 -0
- package/dist/web/terminal-manager.d.ts +155 -0
- package/dist/web/terminal-manager.d.ts.map +1 -0
- package/dist/web/terminal-manager.js +728 -0
- package/dist/web/terminal-manager.js.map +1 -0
- package/dist/web/terminal-server.d.ts +8 -0
- package/dist/web/terminal-server.d.ts.map +1 -0
- package/dist/web/terminal-server.js +275 -0
- package/dist/web/terminal-server.js.map +1 -0
- package/dist/web/workbench-controller.d.ts +99 -0
- package/dist/web/workbench-controller.d.ts.map +1 -0
- package/dist/web/workbench-controller.js +1267 -0
- package/dist/web/workbench-controller.js.map +1 -0
- package/dist/web-client/assets/DiffViewer-DpKoD07C.js +5 -0
- package/dist/web-client/assets/FilesPanel-BkoLmgjR.js +2 -0
- package/dist/web-client/assets/GitPanel-D20StcdG.js +1 -0
- package/dist/web-client/assets/ReviewPanel-3MVWbMQV.js +1 -0
- package/dist/web-client/assets/TerminalPanel-BLQ592Fb.js +21 -0
- package/dist/web-client/assets/TerminalPanel-DLuoa74B.css +1 -0
- package/dist/web-client/assets/index-BkIDl_xk.js +16 -0
- package/dist/web-client/assets/index-DXMpnWE8.css +1 -0
- package/dist/web-client/index.html +16 -0
- package/docs/architecture/v0.3.0-web-api.yaml +1340 -0
- package/docs/architecture/v0.3.1-web-api.yaml +2290 -0
- package/docs/migration/v0.2.2-to-v0.3.0-settings.md +114 -0
- package/docs/migration/v0.2.2-to-v0.3.0.md +55 -0
- package/docs/migration/v0.3.0-to-v0.3.1.md +88 -0
- package/docs/orion.example.json +9 -2
- package/docs/plan/v0.3.0-node-runtime-compatibility-plan.md +57 -0
- package/docs/plan/v0.3.0-settings-integration-plan.md +740 -0
- package/docs/plan/v0.3.0-web-workbench-plan.md +376 -0
- package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +848 -0
- package/docs/readme.md +22 -1
- package/docs/test/v0.3.1-web-workbench-e2e-plan.md +140 -0
- package/npm-shrinkwrap.json +1229 -45
- package/package.json +47 -11
|
@@ -0,0 +1,2290 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Orion Code Local Web API
|
|
4
|
+
version: 0.3.1
|
|
5
|
+
description: >-
|
|
6
|
+
Same-origin loopback API for the Orion Code v0.3.1 Web Workbench. Unary resources use bounded
|
|
7
|
+
JSON HTTP; commands use POST; runtime invalidations use one replayable Server-Sent Events
|
|
8
|
+
downlink. Terminal bytes are intentionally isolated on a ticket-authenticated, same-origin
|
|
9
|
+
WebSocket and never enter SSE, snapshots, diagnostics, evidence logs, or durable transcripts.
|
|
10
|
+
servers:
|
|
11
|
+
- url: /api/v1
|
|
12
|
+
paths:
|
|
13
|
+
/health:
|
|
14
|
+
get:
|
|
15
|
+
operationId: getHealth
|
|
16
|
+
responses:
|
|
17
|
+
'200':
|
|
18
|
+
description: Process health without secret or workspace data.
|
|
19
|
+
content:
|
|
20
|
+
application/json:
|
|
21
|
+
schema:
|
|
22
|
+
$ref: '#/components/schemas/HealthResponse'
|
|
23
|
+
/bootstrap:
|
|
24
|
+
get:
|
|
25
|
+
operationId: getBootstrap
|
|
26
|
+
responses:
|
|
27
|
+
'200':
|
|
28
|
+
description: Secret-free workbench bootstrap state.
|
|
29
|
+
content:
|
|
30
|
+
application/json:
|
|
31
|
+
schema:
|
|
32
|
+
$ref: '#/components/schemas/BootstrapResponse'
|
|
33
|
+
/workspaces:
|
|
34
|
+
get:
|
|
35
|
+
operationId: listWorkspaces
|
|
36
|
+
description: Cursor-paged canonical workspaces known to the local Orion installation.
|
|
37
|
+
parameters:
|
|
38
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
39
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
40
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
41
|
+
- $ref: '#/components/parameters/PageSize'
|
|
42
|
+
responses:
|
|
43
|
+
'200':
|
|
44
|
+
description: One bounded workspace page.
|
|
45
|
+
content:
|
|
46
|
+
application/json:
|
|
47
|
+
schema:
|
|
48
|
+
$ref: '#/components/schemas/WorkspacePage'
|
|
49
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
50
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
51
|
+
/workspaces/{workspaceId}/sessions:
|
|
52
|
+
get:
|
|
53
|
+
operationId: listWorkspaceSessions
|
|
54
|
+
description: >-
|
|
55
|
+
Read one revision-bound Session page for a registered project, including an inactive
|
|
56
|
+
project, without activating or constructing its Runtime.
|
|
57
|
+
parameters:
|
|
58
|
+
- $ref: '#/components/parameters/WorkspaceId'
|
|
59
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
60
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
61
|
+
- $ref: '#/components/parameters/PageSize'
|
|
62
|
+
responses:
|
|
63
|
+
'200':
|
|
64
|
+
description: One bounded Session page for the named workspace.
|
|
65
|
+
content:
|
|
66
|
+
application/json:
|
|
67
|
+
schema: { $ref: '#/components/schemas/SessionPage' }
|
|
68
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
69
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
70
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
71
|
+
/workspaces/{workspaceId}/summary:
|
|
72
|
+
get:
|
|
73
|
+
operationId: getWorkspaceSummary
|
|
74
|
+
description: Return a bounded Git/project summary without activating the workspace Runtime.
|
|
75
|
+
parameters:
|
|
76
|
+
- $ref: '#/components/parameters/WorkspaceId'
|
|
77
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
78
|
+
responses:
|
|
79
|
+
'200':
|
|
80
|
+
description: Repository facts for one registered workspace.
|
|
81
|
+
content:
|
|
82
|
+
application/json:
|
|
83
|
+
schema: { $ref: '#/components/schemas/WorkspaceProjectSummary' }
|
|
84
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
85
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
86
|
+
'409': { $ref: '#/components/responses/ContextConflict' }
|
|
87
|
+
/workspaces/{workspaceId}/pin:
|
|
88
|
+
post:
|
|
89
|
+
operationId: setWorkspacePinned
|
|
90
|
+
description: Pin or unpin a registered workspace through the process idempotency ledger.
|
|
91
|
+
security: [{ webNonce: [] }]
|
|
92
|
+
parameters:
|
|
93
|
+
- $ref: '#/components/parameters/WorkspaceId'
|
|
94
|
+
requestBody:
|
|
95
|
+
required: true
|
|
96
|
+
content:
|
|
97
|
+
application/json:
|
|
98
|
+
schema: { $ref: '#/components/schemas/WorkspacePinRequest' }
|
|
99
|
+
responses:
|
|
100
|
+
'200':
|
|
101
|
+
description: Updated workspace summary, or an exact requestId replay.
|
|
102
|
+
content:
|
|
103
|
+
application/json:
|
|
104
|
+
schema: { $ref: '#/components/schemas/WorkspacePinResult' }
|
|
105
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
106
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
107
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
108
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
109
|
+
/workspaces/{workspaceId}:
|
|
110
|
+
delete:
|
|
111
|
+
operationId: removeWorkspace
|
|
112
|
+
description: >-
|
|
113
|
+
Remove an inactive registry entry. Session/Thread data and files are not deleted; the
|
|
114
|
+
active workspace cannot be removed.
|
|
115
|
+
security: [{ webNonce: [] }]
|
|
116
|
+
parameters:
|
|
117
|
+
- $ref: '#/components/parameters/WorkspaceId'
|
|
118
|
+
requestBody:
|
|
119
|
+
required: true
|
|
120
|
+
content:
|
|
121
|
+
application/json:
|
|
122
|
+
schema: { $ref: '#/components/schemas/WorkspaceRemoveRequest' }
|
|
123
|
+
responses:
|
|
124
|
+
'200':
|
|
125
|
+
description: Registry entry removed, or an exact requestId replay.
|
|
126
|
+
content:
|
|
127
|
+
application/json:
|
|
128
|
+
schema: { $ref: '#/components/schemas/WorkspaceRemoveResult' }
|
|
129
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
130
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
131
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
132
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
133
|
+
/context/activate:
|
|
134
|
+
post:
|
|
135
|
+
operationId: activateContext
|
|
136
|
+
description: >-
|
|
137
|
+
Atomically switch workspace and optional Session under expectedContextRevision. Failure
|
|
138
|
+
leaves the previous context authoritative; success returns a complete bootstrap.
|
|
139
|
+
security: [{ webNonce: [] }]
|
|
140
|
+
requestBody:
|
|
141
|
+
required: true
|
|
142
|
+
content:
|
|
143
|
+
application/json:
|
|
144
|
+
schema: { $ref: '#/components/schemas/ContextActivateRequest' }
|
|
145
|
+
responses:
|
|
146
|
+
'200':
|
|
147
|
+
description: New atomic context, or an exact requestId replay.
|
|
148
|
+
content:
|
|
149
|
+
application/json:
|
|
150
|
+
schema: { $ref: '#/components/schemas/ContextMutationResult' }
|
|
151
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
152
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
153
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
154
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
155
|
+
/workspaces/activate:
|
|
156
|
+
post:
|
|
157
|
+
operationId: activateWorkspace
|
|
158
|
+
description: Select a canonical workspace after draining the previous runtime owner.
|
|
159
|
+
security: [{ webNonce: [] }]
|
|
160
|
+
requestBody:
|
|
161
|
+
required: true
|
|
162
|
+
content:
|
|
163
|
+
application/json:
|
|
164
|
+
schema:
|
|
165
|
+
$ref: '#/components/schemas/ActivateWorkspaceRequest'
|
|
166
|
+
responses:
|
|
167
|
+
'200':
|
|
168
|
+
description: Workspace selected, or an exact requestId retry replayed.
|
|
169
|
+
content:
|
|
170
|
+
application/json:
|
|
171
|
+
schema:
|
|
172
|
+
$ref: '#/components/schemas/WorkspaceMutationResult'
|
|
173
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
174
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
175
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
176
|
+
/sessions:
|
|
177
|
+
get:
|
|
178
|
+
operationId: listSessions
|
|
179
|
+
description: Cursor-paged sessions whose canonical project is the active workspace.
|
|
180
|
+
parameters:
|
|
181
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
182
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
183
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
184
|
+
- $ref: '#/components/parameters/PageSize'
|
|
185
|
+
responses:
|
|
186
|
+
'200':
|
|
187
|
+
description: One bounded session page.
|
|
188
|
+
content:
|
|
189
|
+
application/json:
|
|
190
|
+
schema:
|
|
191
|
+
$ref: '#/components/schemas/SessionPage'
|
|
192
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
193
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
194
|
+
post:
|
|
195
|
+
operationId: createSession
|
|
196
|
+
security: [{ webNonce: [] }]
|
|
197
|
+
requestBody:
|
|
198
|
+
required: true
|
|
199
|
+
content:
|
|
200
|
+
application/json:
|
|
201
|
+
schema:
|
|
202
|
+
$ref: '#/components/schemas/CreateSessionRequest'
|
|
203
|
+
responses:
|
|
204
|
+
'201':
|
|
205
|
+
description: New active session, or an exact requestId retry replayed.
|
|
206
|
+
content:
|
|
207
|
+
application/json:
|
|
208
|
+
schema:
|
|
209
|
+
$ref: '#/components/schemas/SessionMutationResult'
|
|
210
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
211
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
212
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
213
|
+
/sessions/{sessionId}:
|
|
214
|
+
patch:
|
|
215
|
+
operationId: renameSession
|
|
216
|
+
security: [{ webNonce: [] }]
|
|
217
|
+
parameters:
|
|
218
|
+
- $ref: '#/components/parameters/SessionId'
|
|
219
|
+
requestBody:
|
|
220
|
+
required: true
|
|
221
|
+
content:
|
|
222
|
+
application/json:
|
|
223
|
+
schema:
|
|
224
|
+
$ref: '#/components/schemas/RenameSessionRequest'
|
|
225
|
+
responses:
|
|
226
|
+
'200':
|
|
227
|
+
description: Updated session, or an exact requestId retry replayed.
|
|
228
|
+
content:
|
|
229
|
+
application/json:
|
|
230
|
+
schema:
|
|
231
|
+
$ref: '#/components/schemas/SessionMutationResult'
|
|
232
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
233
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
234
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
235
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
236
|
+
/sessions/{sessionId}/activate:
|
|
237
|
+
post:
|
|
238
|
+
operationId: activateSession
|
|
239
|
+
description: Select and restore a session after draining the previous runtime owner.
|
|
240
|
+
security: [{ webNonce: [] }]
|
|
241
|
+
parameters:
|
|
242
|
+
- $ref: '#/components/parameters/SessionId'
|
|
243
|
+
requestBody:
|
|
244
|
+
required: true
|
|
245
|
+
content:
|
|
246
|
+
application/json:
|
|
247
|
+
schema:
|
|
248
|
+
$ref: '#/components/schemas/ContextGuardRequest'
|
|
249
|
+
responses:
|
|
250
|
+
'200':
|
|
251
|
+
description: Session selected, or an exact requestId retry replayed.
|
|
252
|
+
content:
|
|
253
|
+
application/json:
|
|
254
|
+
schema:
|
|
255
|
+
$ref: '#/components/schemas/CommandResult'
|
|
256
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
257
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
258
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
259
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
260
|
+
/sessions/{sessionId}/snapshot:
|
|
261
|
+
get:
|
|
262
|
+
operationId: getSessionSnapshot
|
|
263
|
+
description: >-
|
|
264
|
+
Recovery snapshot for one session. Transcript items are cursor-paged; `threadCursor`
|
|
265
|
+
identifies the durable Thread projection edge and the independent `eventCursor` resumes
|
|
266
|
+
`/events`. Pending approvals are projected here and remain pending across refresh, network
|
|
267
|
+
loss and tab closure.
|
|
268
|
+
parameters:
|
|
269
|
+
- $ref: '#/components/parameters/SessionId'
|
|
270
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
271
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
272
|
+
- $ref: '#/components/parameters/TranscriptCursor'
|
|
273
|
+
- $ref: '#/components/parameters/PageSize'
|
|
274
|
+
responses:
|
|
275
|
+
'200':
|
|
276
|
+
description: Sanitized recovery state from durable runtime sources.
|
|
277
|
+
content:
|
|
278
|
+
application/json:
|
|
279
|
+
schema:
|
|
280
|
+
$ref: '#/components/schemas/SessionSnapshot'
|
|
281
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
282
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
283
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
284
|
+
/files:
|
|
285
|
+
get:
|
|
286
|
+
operationId: listFiles
|
|
287
|
+
description: >-
|
|
288
|
+
Lazily list one active-workspace directory by opaque node id. The cursor binds the parent
|
|
289
|
+
id and file revision; paths outside the canonical workspace and symlink escapes fail closed.
|
|
290
|
+
parameters:
|
|
291
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
292
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
293
|
+
- $ref: '#/components/parameters/ParentFileId'
|
|
294
|
+
- $ref: '#/components/parameters/ResourceCursor'
|
|
295
|
+
- $ref: '#/components/parameters/PageSize'
|
|
296
|
+
responses:
|
|
297
|
+
'200':
|
|
298
|
+
description: One bounded directory page with no absolute filesystem paths.
|
|
299
|
+
content:
|
|
300
|
+
application/json:
|
|
301
|
+
schema: { $ref: '#/components/schemas/FileTreePage' }
|
|
302
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
303
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
304
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
305
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
306
|
+
/files/{fileId}/content:
|
|
307
|
+
get:
|
|
308
|
+
operationId: getFileContent
|
|
309
|
+
description: >-
|
|
310
|
+
Read one bounded UTF-8 page from a non-sensitive regular file. Binary files return metadata
|
|
311
|
+
only. The continuation is bound to the file revision and byte boundary.
|
|
312
|
+
parameters:
|
|
313
|
+
- $ref: '#/components/parameters/FileId'
|
|
314
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
315
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
316
|
+
- $ref: '#/components/parameters/ResourceCursor'
|
|
317
|
+
- $ref: '#/components/parameters/FileLimitBytes'
|
|
318
|
+
responses:
|
|
319
|
+
'200':
|
|
320
|
+
description: One redacted text page or binary metadata.
|
|
321
|
+
content:
|
|
322
|
+
application/json:
|
|
323
|
+
schema: { $ref: '#/components/schemas/FileContentPage' }
|
|
324
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
325
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
326
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
327
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
328
|
+
'415': { $ref: '#/components/responses/Problem' }
|
|
329
|
+
/git/status:
|
|
330
|
+
get:
|
|
331
|
+
operationId: getGitStatus
|
|
332
|
+
description: >-
|
|
333
|
+
Return bounded, argv-only Git facts for the active workspace. The opaque cursor binds the
|
|
334
|
+
repository revision and record offset; it never carries credentials or raw .git content.
|
|
335
|
+
parameters:
|
|
336
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
337
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
338
|
+
- $ref: '#/components/parameters/ResourceCursor'
|
|
339
|
+
- $ref: '#/components/parameters/GitStatusPageSize'
|
|
340
|
+
responses:
|
|
341
|
+
'200':
|
|
342
|
+
description: Grouped clean/staged/unstaged/untracked/conflicted repository state.
|
|
343
|
+
content:
|
|
344
|
+
application/json:
|
|
345
|
+
schema: { $ref: '#/components/schemas/GitStatus' }
|
|
346
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
347
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
348
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
349
|
+
/git/log:
|
|
350
|
+
get:
|
|
351
|
+
operationId: getGitLog
|
|
352
|
+
description: Return one sanitized commit page bound to the current repository revision.
|
|
353
|
+
parameters:
|
|
354
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
355
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
356
|
+
- $ref: '#/components/parameters/ResourceCursor'
|
|
357
|
+
- $ref: '#/components/parameters/GitLogPageSize'
|
|
358
|
+
responses:
|
|
359
|
+
'200':
|
|
360
|
+
description: One bounded Git history page.
|
|
361
|
+
content:
|
|
362
|
+
application/json:
|
|
363
|
+
schema: { $ref: '#/components/schemas/GitLogPage' }
|
|
364
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
365
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
366
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
367
|
+
/git/diff/{fileId}:
|
|
368
|
+
get:
|
|
369
|
+
operationId: getGitDiff
|
|
370
|
+
description: >-
|
|
371
|
+
Return bounded redacted diff lines for an opaque file id. Continuations bind file identity,
|
|
372
|
+
repository revision and page boundary; binary data is never emitted.
|
|
373
|
+
parameters:
|
|
374
|
+
- $ref: '#/components/parameters/FileId'
|
|
375
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
376
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
377
|
+
- $ref: '#/components/parameters/ResourceCursor'
|
|
378
|
+
- $ref: '#/components/parameters/DiffLineLimit'
|
|
379
|
+
- $ref: '#/components/parameters/DiffByteLimit'
|
|
380
|
+
responses:
|
|
381
|
+
'200':
|
|
382
|
+
description: One revision-bound diff page.
|
|
383
|
+
content:
|
|
384
|
+
application/json:
|
|
385
|
+
schema: { $ref: '#/components/schemas/GitDiffPage' }
|
|
386
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
387
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
388
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
389
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
390
|
+
/review:
|
|
391
|
+
get:
|
|
392
|
+
operationId: getReview
|
|
393
|
+
description: >-
|
|
394
|
+
Compose a read-only review summary from Git facts and durable tool-detail metadata. Sending
|
|
395
|
+
selected diff text to Composer is a client action; this endpoint never edits files.
|
|
396
|
+
parameters:
|
|
397
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
398
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
399
|
+
responses:
|
|
400
|
+
'200':
|
|
401
|
+
description: Revisioned change-set and verification metadata.
|
|
402
|
+
content:
|
|
403
|
+
application/json:
|
|
404
|
+
schema: { $ref: '#/components/schemas/ReviewSnapshot' }
|
|
405
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
406
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
407
|
+
/terminals:
|
|
408
|
+
get:
|
|
409
|
+
operationId: listTerminals
|
|
410
|
+
description: List only ephemeral terminals owned by the active workspace.
|
|
411
|
+
parameters:
|
|
412
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
413
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
414
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
415
|
+
- $ref: '#/components/parameters/PageSize'
|
|
416
|
+
responses:
|
|
417
|
+
'200':
|
|
418
|
+
description: One bounded terminal metadata page; no terminal output is included.
|
|
419
|
+
content:
|
|
420
|
+
application/json:
|
|
421
|
+
schema: { $ref: '#/components/schemas/TerminalPage' }
|
|
422
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
423
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
424
|
+
post:
|
|
425
|
+
operationId: createTerminal
|
|
426
|
+
description: >-
|
|
427
|
+
Create a real PTY only after an explicit user gesture. The single-use attach ticket is
|
|
428
|
+
short-lived and must never be logged, persisted, placed in a URL, or sent on SSE.
|
|
429
|
+
security: [{ webNonce: [], terminalUserGesture: [] }]
|
|
430
|
+
requestBody:
|
|
431
|
+
required: true
|
|
432
|
+
content:
|
|
433
|
+
application/json:
|
|
434
|
+
schema: { $ref: '#/components/schemas/TerminalCreateRequest' }
|
|
435
|
+
responses:
|
|
436
|
+
'201':
|
|
437
|
+
description: Terminal metadata plus one short-lived single-use ticket.
|
|
438
|
+
content:
|
|
439
|
+
application/json:
|
|
440
|
+
schema: { $ref: '#/components/schemas/TerminalCreateMutationResult' }
|
|
441
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
442
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
443
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
444
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
445
|
+
/terminals/{terminalId}/attach-ticket:
|
|
446
|
+
post:
|
|
447
|
+
operationId: issueTerminalAttachTicket
|
|
448
|
+
description: Replace any unused ticket with a new single-use, short-lived attach ticket.
|
|
449
|
+
security: [{ webNonce: [] }]
|
|
450
|
+
parameters:
|
|
451
|
+
- $ref: '#/components/parameters/TerminalId'
|
|
452
|
+
requestBody:
|
|
453
|
+
required: true
|
|
454
|
+
content:
|
|
455
|
+
application/json:
|
|
456
|
+
schema: { $ref: '#/components/schemas/ContextGuardRequest' }
|
|
457
|
+
responses:
|
|
458
|
+
'200':
|
|
459
|
+
description: Fresh attach ticket, or an exact requestId replay.
|
|
460
|
+
content:
|
|
461
|
+
application/json:
|
|
462
|
+
schema: { $ref: '#/components/schemas/TerminalTicketMutationResult' }
|
|
463
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
464
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
465
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
466
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
467
|
+
/terminals/{terminalId}:
|
|
468
|
+
delete:
|
|
469
|
+
operationId: closeTerminal
|
|
470
|
+
description: Terminate the PTY process tree and invalidate outstanding attach tickets.
|
|
471
|
+
security: [{ webNonce: [] }]
|
|
472
|
+
parameters:
|
|
473
|
+
- $ref: '#/components/parameters/TerminalId'
|
|
474
|
+
requestBody:
|
|
475
|
+
required: true
|
|
476
|
+
content:
|
|
477
|
+
application/json:
|
|
478
|
+
schema: { $ref: '#/components/schemas/ContextGuardRequest' }
|
|
479
|
+
responses:
|
|
480
|
+
'200':
|
|
481
|
+
description: Closed terminal metadata, or an exact requestId replay.
|
|
482
|
+
content:
|
|
483
|
+
application/json:
|
|
484
|
+
schema: { $ref: '#/components/schemas/TerminalCloseMutationResult' }
|
|
485
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
486
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
487
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
488
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
489
|
+
/terminals/{terminalId}/stream:
|
|
490
|
+
get:
|
|
491
|
+
operationId: streamTerminal
|
|
492
|
+
description: >-
|
|
493
|
+
WebSocket upgrade only; HTTP success bodies are not used. The client offers subprotocol
|
|
494
|
+
`orion-terminal-v1`, then sends Authenticate as its first JSON message within five seconds.
|
|
495
|
+
The ticket stays in the message body, never in the URL. Terminal output is non-durable and
|
|
496
|
+
isolated from the Workbench SSE cursor.
|
|
497
|
+
parameters:
|
|
498
|
+
- $ref: '#/components/parameters/TerminalId'
|
|
499
|
+
x-orion-websocket:
|
|
500
|
+
subprotocol: orion-terminal-v1
|
|
501
|
+
firstClientMessage: '#/components/schemas/TerminalAuthenticateMessage'
|
|
502
|
+
clientMessages: '#/components/schemas/TerminalClientMessage'
|
|
503
|
+
serverMessages: '#/components/schemas/TerminalServerMessage'
|
|
504
|
+
closeCodes: [1000, 1001, 4400, 4401, 4403, 4409, 4413]
|
|
505
|
+
responses:
|
|
506
|
+
'101':
|
|
507
|
+
description: Switching Protocols to the terminal WebSocket.
|
|
508
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
509
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
510
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
511
|
+
/tool-details:
|
|
512
|
+
get:
|
|
513
|
+
operationId: listToolDetails
|
|
514
|
+
description: >-
|
|
515
|
+
Cursor-paged safe summaries from the active workspace's project artifact repository.
|
|
516
|
+
Current artifact metadata has no session identity, so this route is deliberately
|
|
517
|
+
workspace/project-scoped and must not be presented as proof that an artifact belongs to a
|
|
518
|
+
particular session.
|
|
519
|
+
parameters:
|
|
520
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
521
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
522
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
523
|
+
- $ref: '#/components/parameters/PageSize'
|
|
524
|
+
responses:
|
|
525
|
+
'200':
|
|
526
|
+
description: One bounded tool-detail summary page.
|
|
527
|
+
content:
|
|
528
|
+
application/json:
|
|
529
|
+
schema:
|
|
530
|
+
$ref: '#/components/schemas/ToolDetailSummaryPage'
|
|
531
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
532
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
533
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
534
|
+
/tool-details/{callId}:
|
|
535
|
+
get:
|
|
536
|
+
operationId: getToolDetail
|
|
537
|
+
description: >-
|
|
538
|
+
Byte-paged output from a pre-sanitized derivative resolved only from the active workspace's
|
|
539
|
+
artifact list. `offsetBytes` addresses derivative bytes, never raw tool-output bytes, so a
|
|
540
|
+
caller cannot bypass redaction by choosing a sensitive-field boundary. The current artifact
|
|
541
|
+
metadata cannot prove session ownership; the host returns no artifact filesystem path and
|
|
542
|
+
makes no session-attribution claim.
|
|
543
|
+
parameters:
|
|
544
|
+
- $ref: '#/components/parameters/CallId'
|
|
545
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
546
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
547
|
+
- $ref: '#/components/parameters/OffsetBytes'
|
|
548
|
+
- $ref: '#/components/parameters/LimitBytes'
|
|
549
|
+
responses:
|
|
550
|
+
'200':
|
|
551
|
+
description: One UTF-8-safe redacted output page.
|
|
552
|
+
content:
|
|
553
|
+
application/json:
|
|
554
|
+
schema:
|
|
555
|
+
$ref: '#/components/schemas/ToolDetailPage'
|
|
556
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
557
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
558
|
+
'409': { $ref: '#/components/responses/ContextConflict' }
|
|
559
|
+
/skills:
|
|
560
|
+
get:
|
|
561
|
+
operationId: listSkills
|
|
562
|
+
description: >-
|
|
563
|
+
Cursor-paged safe Skill descriptors. Bodies, resource paths and trigger implementations are
|
|
564
|
+
excluded.
|
|
565
|
+
parameters:
|
|
566
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
567
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
568
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
569
|
+
- $ref: '#/components/parameters/PageSize'
|
|
570
|
+
responses:
|
|
571
|
+
'200':
|
|
572
|
+
description: One bounded Skill descriptor page.
|
|
573
|
+
content:
|
|
574
|
+
application/json:
|
|
575
|
+
schema:
|
|
576
|
+
$ref: '#/components/schemas/SkillPage'
|
|
577
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
578
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
579
|
+
/mcp:
|
|
580
|
+
get:
|
|
581
|
+
operationId: listMcpServers
|
|
582
|
+
description: >-
|
|
583
|
+
Cursor-paged safe MCP catalog/runtime summaries. Commands, endpoints, headers and
|
|
584
|
+
credentials are excluded and this read never activates a dormant server.
|
|
585
|
+
parameters:
|
|
586
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
587
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
588
|
+
- $ref: '#/components/parameters/CollectionCursor'
|
|
589
|
+
- $ref: '#/components/parameters/PageSize'
|
|
590
|
+
responses:
|
|
591
|
+
'200':
|
|
592
|
+
description: One bounded MCP summary page.
|
|
593
|
+
content:
|
|
594
|
+
application/json:
|
|
595
|
+
schema:
|
|
596
|
+
$ref: '#/components/schemas/McpPage'
|
|
597
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
598
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
599
|
+
/commands:
|
|
600
|
+
post:
|
|
601
|
+
operationId: dispatchCommand
|
|
602
|
+
description: >-
|
|
603
|
+
Dispatch a renderer-neutral runtime mutation. Approval decisions allow only once, project
|
|
604
|
+
or global scope. Interrupt and shutdown paths deny affected unresolved approvals and fail
|
|
605
|
+
their waiting tool calls closed.
|
|
606
|
+
security: [{ webNonce: [] }]
|
|
607
|
+
requestBody:
|
|
608
|
+
required: true
|
|
609
|
+
content:
|
|
610
|
+
application/json:
|
|
611
|
+
schema:
|
|
612
|
+
$ref: '#/components/schemas/WebCommand'
|
|
613
|
+
responses:
|
|
614
|
+
'202':
|
|
615
|
+
description: Accepted command, or an exact requestId retry replayed.
|
|
616
|
+
content:
|
|
617
|
+
application/json:
|
|
618
|
+
schema:
|
|
619
|
+
$ref: '#/components/schemas/CommandResult'
|
|
620
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
621
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
622
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
623
|
+
/events:
|
|
624
|
+
get:
|
|
625
|
+
operationId: streamEvents
|
|
626
|
+
description: >-
|
|
627
|
+
One Server-Sent Events downlink. `cursor` or `Last-Event-ID` is the last delivered durable
|
|
628
|
+
sequence; the query value wins when both are present. Each SSE `id` is the decimal cursor,
|
|
629
|
+
while the JSON envelope also carries a UUID `eventId`. Disconnecting this stream does not
|
|
630
|
+
resolve or deny pending approvals.
|
|
631
|
+
parameters:
|
|
632
|
+
- $ref: '#/components/parameters/EventCursor'
|
|
633
|
+
- $ref: '#/components/parameters/LastEventId'
|
|
634
|
+
responses:
|
|
635
|
+
'200':
|
|
636
|
+
description: text/event-stream of discriminated WebEventEnvelope values.
|
|
637
|
+
content:
|
|
638
|
+
text/event-stream:
|
|
639
|
+
schema:
|
|
640
|
+
$ref: '#/components/schemas/WebEventEnvelope'
|
|
641
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
642
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
643
|
+
/diagnostics:
|
|
644
|
+
get:
|
|
645
|
+
operationId: getDiagnostics
|
|
646
|
+
parameters:
|
|
647
|
+
- $ref: '#/components/parameters/ContextWorkspaceId'
|
|
648
|
+
- $ref: '#/components/parameters/ExpectedContextRevision'
|
|
649
|
+
responses:
|
|
650
|
+
'200':
|
|
651
|
+
description: Sanitized runtime and harness diagnostics.
|
|
652
|
+
content:
|
|
653
|
+
application/json:
|
|
654
|
+
schema:
|
|
655
|
+
type: object
|
|
656
|
+
additionalProperties: true
|
|
657
|
+
'409': { $ref: '#/components/responses/ContextConflict' }
|
|
658
|
+
/settings:
|
|
659
|
+
get:
|
|
660
|
+
operationId: getSettings
|
|
661
|
+
responses:
|
|
662
|
+
'200':
|
|
663
|
+
description: Current secret-free, source-aware Settings document and durable revision.
|
|
664
|
+
content:
|
|
665
|
+
application/json:
|
|
666
|
+
schema:
|
|
667
|
+
$ref: '#/components/schemas/SettingsDocument'
|
|
668
|
+
patch:
|
|
669
|
+
operationId: updateSettings
|
|
670
|
+
description: >-
|
|
671
|
+
Atomically apply one bounded batch only when `expectedRevision` equals the keyed revision of
|
|
672
|
+
the exact current orion.json bytes. Duplicate keys and partial commits are rejected.
|
|
673
|
+
security: [{ webNonce: [] }]
|
|
674
|
+
requestBody:
|
|
675
|
+
required: true
|
|
676
|
+
content:
|
|
677
|
+
application/json:
|
|
678
|
+
schema:
|
|
679
|
+
$ref: '#/components/schemas/UpdateSettingsRequest'
|
|
680
|
+
responses:
|
|
681
|
+
'200':
|
|
682
|
+
description: Updated settings, or an exact requestId retry replayed.
|
|
683
|
+
content:
|
|
684
|
+
application/json:
|
|
685
|
+
schema:
|
|
686
|
+
$ref: '#/components/schemas/SettingsMutationResult'
|
|
687
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
688
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
689
|
+
'409':
|
|
690
|
+
description: requestId/body conflict, stale expectedRevision, or busy Runtime; no field was applied.
|
|
691
|
+
content:
|
|
692
|
+
application/problem+json:
|
|
693
|
+
schema:
|
|
694
|
+
$ref: '#/components/schemas/Problem'
|
|
695
|
+
'422': { $ref: '#/components/responses/Problem' }
|
|
696
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
697
|
+
/settings/open-document:
|
|
698
|
+
post:
|
|
699
|
+
operationId: openSettingsDocument
|
|
700
|
+
description: >-
|
|
701
|
+
Open the Host-resolved orion.json in the native text editor. This loopback-only action accepts
|
|
702
|
+
no path and never returns the resolved filesystem path.
|
|
703
|
+
security: [{ webNonce: [] }]
|
|
704
|
+
requestBody:
|
|
705
|
+
required: true
|
|
706
|
+
content:
|
|
707
|
+
application/json:
|
|
708
|
+
schema:
|
|
709
|
+
type: object
|
|
710
|
+
additionalProperties: false
|
|
711
|
+
required: [requestId]
|
|
712
|
+
properties:
|
|
713
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
714
|
+
responses:
|
|
715
|
+
'200':
|
|
716
|
+
description: The pathless open request was accepted or replayed idempotently.
|
|
717
|
+
content:
|
|
718
|
+
application/json:
|
|
719
|
+
schema:
|
|
720
|
+
type: object
|
|
721
|
+
additionalProperties: false
|
|
722
|
+
required: [requestId, opened]
|
|
723
|
+
properties:
|
|
724
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
725
|
+
opened: { type: boolean, const: true }
|
|
726
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
727
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
728
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
729
|
+
'503': { $ref: '#/components/responses/Problem' }
|
|
730
|
+
components:
|
|
731
|
+
securitySchemes:
|
|
732
|
+
webNonce:
|
|
733
|
+
type: apiKey
|
|
734
|
+
in: header
|
|
735
|
+
name: X-Orion-Web-Nonce
|
|
736
|
+
description: Per-process secret returned only by same-origin bootstrap and required on mutations.
|
|
737
|
+
terminalUserGesture:
|
|
738
|
+
type: apiKey
|
|
739
|
+
in: header
|
|
740
|
+
name: X-Orion-User-Gesture
|
|
741
|
+
description: Terminal creation requires the exact value terminal-create-v1 from a user gesture.
|
|
742
|
+
parameters:
|
|
743
|
+
ContextWorkspaceId:
|
|
744
|
+
in: query
|
|
745
|
+
name: workspaceId
|
|
746
|
+
required: true
|
|
747
|
+
description: >-
|
|
748
|
+
UUID of the active workspace observed with expectedContextRevision. A mismatch returns 409
|
|
749
|
+
context_revision_conflict and the Host performs no activation, read, spawn, or mutation.
|
|
750
|
+
schema: { type: string, format: uuid }
|
|
751
|
+
ExpectedContextRevision:
|
|
752
|
+
in: query
|
|
753
|
+
name: expectedContextRevision
|
|
754
|
+
required: true
|
|
755
|
+
description: >-
|
|
756
|
+
ContextRevision from bootstrap or the last successful atomic activation. A stale value
|
|
757
|
+
returns 409 context_revision_conflict with zero side effects.
|
|
758
|
+
schema: { $ref: '#/components/schemas/ContextRevision' }
|
|
759
|
+
WorkspaceId:
|
|
760
|
+
in: path
|
|
761
|
+
name: workspaceId
|
|
762
|
+
required: true
|
|
763
|
+
schema: { type: string, format: uuid }
|
|
764
|
+
SessionId:
|
|
765
|
+
in: path
|
|
766
|
+
name: sessionId
|
|
767
|
+
required: true
|
|
768
|
+
schema: { type: string, minLength: 1, maxLength: 256 }
|
|
769
|
+
FileId:
|
|
770
|
+
in: path
|
|
771
|
+
name: fileId
|
|
772
|
+
required: true
|
|
773
|
+
description: Opaque active-workspace file identity; never a client-supplied path.
|
|
774
|
+
schema: { type: string, minLength: 1, maxLength: 256 }
|
|
775
|
+
ParentFileId:
|
|
776
|
+
in: query
|
|
777
|
+
name: parentId
|
|
778
|
+
required: false
|
|
779
|
+
description: Opaque directory identity; omission selects the active-workspace root.
|
|
780
|
+
schema: { type: string, minLength: 1, maxLength: 256 }
|
|
781
|
+
TerminalId:
|
|
782
|
+
in: path
|
|
783
|
+
name: terminalId
|
|
784
|
+
required: true
|
|
785
|
+
schema: { type: string, format: uuid }
|
|
786
|
+
CallId:
|
|
787
|
+
in: path
|
|
788
|
+
name: callId
|
|
789
|
+
required: true
|
|
790
|
+
description: >-
|
|
791
|
+
Opaque identifier returned by the active workspace's tool-detail summary. The current file
|
|
792
|
+
repository aliases callId to its project artifact identifier.
|
|
793
|
+
schema: { type: string, minLength: 1, maxLength: 256 }
|
|
794
|
+
CollectionCursor:
|
|
795
|
+
in: query
|
|
796
|
+
name: cursor
|
|
797
|
+
required: false
|
|
798
|
+
description: >-
|
|
799
|
+
Opaque continuation returned by the preceding page. It binds the route scope, the complete
|
|
800
|
+
ordered collection revision and the last stable item key. Any insertion, deletion or
|
|
801
|
+
reorder makes it stale; the Host returns 409 collection_cursor_stale and the client restarts
|
|
802
|
+
from the first page.
|
|
803
|
+
schema: { type: string, minLength: 1, maxLength: 512 }
|
|
804
|
+
TranscriptCursor:
|
|
805
|
+
in: query
|
|
806
|
+
name: cursor
|
|
807
|
+
required: false
|
|
808
|
+
description: >-
|
|
809
|
+
Opaque backward-page continuation bound to the Session's Thread identity, immutable
|
|
810
|
+
transcript-manifest revision and page boundary. A newer Thread revision returns 409
|
|
811
|
+
transcript_cursor_stale; the client must recover a fresh tail snapshot before paging again.
|
|
812
|
+
schema: { type: string, minLength: 1, maxLength: 512 }
|
|
813
|
+
ResourceCursor:
|
|
814
|
+
in: query
|
|
815
|
+
name: cursor
|
|
816
|
+
required: false
|
|
817
|
+
description: >-
|
|
818
|
+
Opaque continuation bound to the active workspace, resource identity, resource revision and
|
|
819
|
+
page boundary. A stale or cross-resource value returns 409 and must be restarted from the
|
|
820
|
+
first page; the value is not an encoded filesystem path.
|
|
821
|
+
schema: { type: string, minLength: 1, maxLength: 4096 }
|
|
822
|
+
PageSize:
|
|
823
|
+
in: query
|
|
824
|
+
name: pageSize
|
|
825
|
+
required: false
|
|
826
|
+
schema: { type: integer, minimum: 1, maximum: 100, default: 50 }
|
|
827
|
+
OffsetBytes:
|
|
828
|
+
in: query
|
|
829
|
+
name: offsetBytes
|
|
830
|
+
required: false
|
|
831
|
+
schema: { type: integer, minimum: 0, default: 0 }
|
|
832
|
+
LimitBytes:
|
|
833
|
+
in: query
|
|
834
|
+
name: limitBytes
|
|
835
|
+
required: false
|
|
836
|
+
schema: { type: integer, minimum: 1, maximum: 1048576, default: 65536 }
|
|
837
|
+
FileLimitBytes:
|
|
838
|
+
in: query
|
|
839
|
+
name: limitBytes
|
|
840
|
+
required: false
|
|
841
|
+
schema: { type: integer, minimum: 1, maximum: 262144, default: 65536 }
|
|
842
|
+
GitStatusPageSize:
|
|
843
|
+
in: query
|
|
844
|
+
name: pageSize
|
|
845
|
+
required: false
|
|
846
|
+
schema: { type: integer, minimum: 1, maximum: 2000, default: 200 }
|
|
847
|
+
GitLogPageSize:
|
|
848
|
+
in: query
|
|
849
|
+
name: pageSize
|
|
850
|
+
required: false
|
|
851
|
+
schema: { type: integer, minimum: 1, maximum: 100, default: 30 }
|
|
852
|
+
DiffLineLimit:
|
|
853
|
+
in: query
|
|
854
|
+
name: lineLimit
|
|
855
|
+
required: false
|
|
856
|
+
schema: { type: integer, minimum: 1, maximum: 500, default: 240 }
|
|
857
|
+
DiffByteLimit:
|
|
858
|
+
in: query
|
|
859
|
+
name: byteLimit
|
|
860
|
+
required: false
|
|
861
|
+
schema: { type: integer, minimum: 1024, maximum: 1048576, default: 262144 }
|
|
862
|
+
EventCursor:
|
|
863
|
+
in: query
|
|
864
|
+
name: cursor
|
|
865
|
+
required: false
|
|
866
|
+
description: Last durable Web event cursor accepted by the client.
|
|
867
|
+
schema: { type: integer, minimum: 0, default: 0 }
|
|
868
|
+
LastEventId:
|
|
869
|
+
in: header
|
|
870
|
+
name: Last-Event-ID
|
|
871
|
+
required: false
|
|
872
|
+
description: Browser-provided fallback for the last durable Web event cursor.
|
|
873
|
+
schema: { type: string, pattern: '^[0-9]+$' }
|
|
874
|
+
responses:
|
|
875
|
+
Problem:
|
|
876
|
+
description: Safe structured error with no secret-bearing data.
|
|
877
|
+
content:
|
|
878
|
+
application/problem+json:
|
|
879
|
+
schema:
|
|
880
|
+
$ref: '#/components/schemas/Problem'
|
|
881
|
+
ContextConflict:
|
|
882
|
+
description: >-
|
|
883
|
+
workspaceId or expectedContextRevision is stale. The Host returns
|
|
884
|
+
context_revision_conflict and performs zero reads from another workspace and zero side
|
|
885
|
+
effects.
|
|
886
|
+
content:
|
|
887
|
+
application/problem+json:
|
|
888
|
+
schema: { $ref: '#/components/schemas/Problem' }
|
|
889
|
+
example:
|
|
890
|
+
type: https://orioncode.dev/problems/context_revision_conflict
|
|
891
|
+
title: State conflict
|
|
892
|
+
status: 409
|
|
893
|
+
code: context_revision_conflict
|
|
894
|
+
detail: The active Context changed before the request was admitted.
|
|
895
|
+
schemas:
|
|
896
|
+
HealthResponse:
|
|
897
|
+
type: object
|
|
898
|
+
additionalProperties: false
|
|
899
|
+
required: [ok, version]
|
|
900
|
+
properties:
|
|
901
|
+
ok: { type: boolean, const: true }
|
|
902
|
+
version: { type: string }
|
|
903
|
+
BootstrapResponse:
|
|
904
|
+
type: object
|
|
905
|
+
additionalProperties: false
|
|
906
|
+
required:
|
|
907
|
+
- apiVersion
|
|
908
|
+
- productVersion
|
|
909
|
+
- nonce
|
|
910
|
+
- contextRevision
|
|
911
|
+
- workspaceId
|
|
912
|
+
- workspace
|
|
913
|
+
- configured
|
|
914
|
+
- activeSessionId
|
|
915
|
+
- settings
|
|
916
|
+
- capabilities
|
|
917
|
+
properties:
|
|
918
|
+
apiVersion: { type: integer, const: 1 }
|
|
919
|
+
productVersion: { type: string }
|
|
920
|
+
nonce: { type: string, minLength: 32 }
|
|
921
|
+
contextRevision: { type: string, format: uuid }
|
|
922
|
+
workspaceId: { type: string, format: uuid }
|
|
923
|
+
workspace: { type: string }
|
|
924
|
+
configured: { type: boolean }
|
|
925
|
+
activeSessionId: { type: [string, 'null'] }
|
|
926
|
+
settings: { $ref: '#/components/schemas/SettingsDocument' }
|
|
927
|
+
capabilities:
|
|
928
|
+
type: object
|
|
929
|
+
additionalProperties: false
|
|
930
|
+
required: [goal, plan, skills, mcp, diagnostics, review, files, git, terminal]
|
|
931
|
+
properties:
|
|
932
|
+
goal: { type: boolean }
|
|
933
|
+
plan: { type: boolean }
|
|
934
|
+
skills: { type: boolean }
|
|
935
|
+
mcp: { type: boolean }
|
|
936
|
+
diagnostics: { type: boolean }
|
|
937
|
+
review: { type: boolean, const: true }
|
|
938
|
+
files: { type: boolean, const: true }
|
|
939
|
+
git: { type: boolean, const: true }
|
|
940
|
+
terminal: { type: boolean }
|
|
941
|
+
MutationRequest:
|
|
942
|
+
type: object
|
|
943
|
+
additionalProperties: false
|
|
944
|
+
required: [requestId]
|
|
945
|
+
properties:
|
|
946
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
947
|
+
RequestId:
|
|
948
|
+
type: string
|
|
949
|
+
format: uuid
|
|
950
|
+
description: >-
|
|
951
|
+
Client-generated idempotency key. Reuse is valid only for a byte-equivalent normalized
|
|
952
|
+
mutation body.
|
|
953
|
+
ContextRevision:
|
|
954
|
+
type: string
|
|
955
|
+
format: uuid
|
|
956
|
+
description: Compare-and-swap identity for the single active Workspace/Session context.
|
|
957
|
+
ContextActivateRequest:
|
|
958
|
+
type: object
|
|
959
|
+
additionalProperties: false
|
|
960
|
+
required: [requestId, expectedContextRevision, workspaceId, sessionId]
|
|
961
|
+
properties:
|
|
962
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
963
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
964
|
+
workspaceId: { type: string, format: uuid }
|
|
965
|
+
sessionId: { type: [string, 'null'] }
|
|
966
|
+
ContextMutationResult:
|
|
967
|
+
type: object
|
|
968
|
+
additionalProperties: false
|
|
969
|
+
required: [requestId, contextRevision, bootstrap]
|
|
970
|
+
properties:
|
|
971
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
972
|
+
contextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
973
|
+
bootstrap: { $ref: '#/components/schemas/BootstrapResponse' }
|
|
974
|
+
ActivateWorkspaceRequest:
|
|
975
|
+
type: object
|
|
976
|
+
additionalProperties: false
|
|
977
|
+
required: [requestId, expectedContextRevision, path]
|
|
978
|
+
properties:
|
|
979
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
980
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
981
|
+
path: { type: string, minLength: 1, maxLength: 4096 }
|
|
982
|
+
CreateSessionRequest:
|
|
983
|
+
type: object
|
|
984
|
+
additionalProperties: false
|
|
985
|
+
required: [requestId, expectedContextRevision, workspaceId]
|
|
986
|
+
properties:
|
|
987
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
988
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
989
|
+
workspaceId: { type: string, format: uuid }
|
|
990
|
+
name: { type: string, minLength: 1, maxLength: 120 }
|
|
991
|
+
RenameSessionRequest:
|
|
992
|
+
type: object
|
|
993
|
+
additionalProperties: false
|
|
994
|
+
required: [requestId, expectedContextRevision, workspaceId, name]
|
|
995
|
+
properties:
|
|
996
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
997
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
998
|
+
workspaceId: { type: string, format: uuid }
|
|
999
|
+
name: { type: string, minLength: 1, maxLength: 120 }
|
|
1000
|
+
WorkspaceSummary:
|
|
1001
|
+
type: object
|
|
1002
|
+
additionalProperties: false
|
|
1003
|
+
required: [id, path, label, active, available, sessionCount, lastActivatedAt]
|
|
1004
|
+
properties:
|
|
1005
|
+
id: { type: string, format: uuid }
|
|
1006
|
+
path: { type: string }
|
|
1007
|
+
label: { type: string }
|
|
1008
|
+
active: { type: boolean }
|
|
1009
|
+
available: { type: boolean }
|
|
1010
|
+
sessionCount: { type: integer, minimum: 0 }
|
|
1011
|
+
lastActivatedAt: { type: string, format: date-time }
|
|
1012
|
+
pinnedOrder: { type: integer, minimum: 0 }
|
|
1013
|
+
WorkspacePage:
|
|
1014
|
+
type: object
|
|
1015
|
+
additionalProperties: false
|
|
1016
|
+
required: [items, nextCursor]
|
|
1017
|
+
properties:
|
|
1018
|
+
items:
|
|
1019
|
+
type: array
|
|
1020
|
+
maxItems: 100
|
|
1021
|
+
items: { $ref: '#/components/schemas/WorkspaceSummary' }
|
|
1022
|
+
nextCursor: { type: [string, 'null'] }
|
|
1023
|
+
WorkspaceMutationResult:
|
|
1024
|
+
type: object
|
|
1025
|
+
additionalProperties: false
|
|
1026
|
+
required: [requestId, active, page]
|
|
1027
|
+
properties:
|
|
1028
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1029
|
+
active: { type: string }
|
|
1030
|
+
page: { $ref: '#/components/schemas/WorkspacePage' }
|
|
1031
|
+
WorkspaceProjectSummary:
|
|
1032
|
+
type: object
|
|
1033
|
+
additionalProperties: false
|
|
1034
|
+
required:
|
|
1035
|
+
- workspaceId
|
|
1036
|
+
- repositoryRevision
|
|
1037
|
+
- isRepository
|
|
1038
|
+
- branch
|
|
1039
|
+
- detached
|
|
1040
|
+
- head
|
|
1041
|
+
- dirtyCount
|
|
1042
|
+
- conflictCount
|
|
1043
|
+
properties:
|
|
1044
|
+
workspaceId: { type: string, format: uuid }
|
|
1045
|
+
repositoryRevision: { type: string, minLength: 1 }
|
|
1046
|
+
isRepository: { type: boolean }
|
|
1047
|
+
branch: { type: [string, 'null'] }
|
|
1048
|
+
detached: { type: boolean }
|
|
1049
|
+
head: { type: [string, 'null'] }
|
|
1050
|
+
dirtyCount: { type: integer, minimum: 0 }
|
|
1051
|
+
conflictCount: { type: integer, minimum: 0 }
|
|
1052
|
+
WorkspacePinRequest:
|
|
1053
|
+
type: object
|
|
1054
|
+
additionalProperties: false
|
|
1055
|
+
required: [requestId, expectedContextRevision, pinned]
|
|
1056
|
+
properties:
|
|
1057
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1058
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
1059
|
+
pinned: { type: boolean }
|
|
1060
|
+
WorkspacePinResult:
|
|
1061
|
+
type: object
|
|
1062
|
+
additionalProperties: false
|
|
1063
|
+
required: [requestId, workspace]
|
|
1064
|
+
properties:
|
|
1065
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1066
|
+
workspace: { $ref: '#/components/schemas/WorkspaceSummary' }
|
|
1067
|
+
WorkspaceRemoveRequest:
|
|
1068
|
+
type: object
|
|
1069
|
+
additionalProperties: false
|
|
1070
|
+
required: [requestId, expectedContextRevision]
|
|
1071
|
+
properties:
|
|
1072
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1073
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
1074
|
+
WorkspaceRemoveResult:
|
|
1075
|
+
type: object
|
|
1076
|
+
additionalProperties: false
|
|
1077
|
+
required: [requestId, removed]
|
|
1078
|
+
properties:
|
|
1079
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1080
|
+
removed: { type: boolean, const: true }
|
|
1081
|
+
SessionSummary:
|
|
1082
|
+
type: object
|
|
1083
|
+
additionalProperties: false
|
|
1084
|
+
required: [id, projectPath, model, createdAt, updatedAt, messageCount]
|
|
1085
|
+
properties:
|
|
1086
|
+
id: { type: string }
|
|
1087
|
+
projectPath: { type: string }
|
|
1088
|
+
name: { type: string }
|
|
1089
|
+
model: { type: string }
|
|
1090
|
+
createdAt: { type: string, format: date-time }
|
|
1091
|
+
updatedAt: { type: string, format: date-time }
|
|
1092
|
+
messageCount: { type: integer, minimum: 0 }
|
|
1093
|
+
taskSummary: { type: string }
|
|
1094
|
+
activeGoalId: { type: string }
|
|
1095
|
+
activeGoalObjective: { type: string }
|
|
1096
|
+
SessionPage:
|
|
1097
|
+
type: object
|
|
1098
|
+
additionalProperties: false
|
|
1099
|
+
required: [items, nextCursor]
|
|
1100
|
+
properties:
|
|
1101
|
+
items:
|
|
1102
|
+
type: array
|
|
1103
|
+
maxItems: 100
|
|
1104
|
+
items: { $ref: '#/components/schemas/SessionSummary' }
|
|
1105
|
+
nextCursor: { type: [string, 'null'] }
|
|
1106
|
+
SessionMutationResult:
|
|
1107
|
+
type: object
|
|
1108
|
+
additionalProperties: false
|
|
1109
|
+
required: [requestId, session]
|
|
1110
|
+
properties:
|
|
1111
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1112
|
+
session: { $ref: '#/components/schemas/SessionSummary' }
|
|
1113
|
+
FileNode:
|
|
1114
|
+
type: object
|
|
1115
|
+
additionalProperties: false
|
|
1116
|
+
required: [id, name, kind, modifiedAt, sensitive, readable]
|
|
1117
|
+
properties:
|
|
1118
|
+
id: { type: string, minLength: 1 }
|
|
1119
|
+
name: { type: string, minLength: 1 }
|
|
1120
|
+
kind: { type: string, enum: [file, directory, symlink] }
|
|
1121
|
+
sizeBytes: { type: integer, minimum: 0 }
|
|
1122
|
+
modifiedAt: { type: string, format: date-time }
|
|
1123
|
+
sensitive: { type: boolean }
|
|
1124
|
+
readable: { type: boolean }
|
|
1125
|
+
FileTreePage:
|
|
1126
|
+
type: object
|
|
1127
|
+
additionalProperties: false
|
|
1128
|
+
required: [parentId, revision, items, nextCursor]
|
|
1129
|
+
properties:
|
|
1130
|
+
parentId: { type: string, minLength: 1 }
|
|
1131
|
+
revision: { type: string, minLength: 1 }
|
|
1132
|
+
items:
|
|
1133
|
+
type: array
|
|
1134
|
+
maxItems: 100
|
|
1135
|
+
items: { $ref: '#/components/schemas/FileNode' }
|
|
1136
|
+
nextCursor: { type: [string, 'null'] }
|
|
1137
|
+
FileContentPage:
|
|
1138
|
+
type: object
|
|
1139
|
+
additionalProperties: false
|
|
1140
|
+
required:
|
|
1141
|
+
- fileId
|
|
1142
|
+
- name
|
|
1143
|
+
- revision
|
|
1144
|
+
- sizeBytes
|
|
1145
|
+
- binary
|
|
1146
|
+
- sensitive
|
|
1147
|
+
- mediaType
|
|
1148
|
+
- offsetBytes
|
|
1149
|
+
- nextCursor
|
|
1150
|
+
properties:
|
|
1151
|
+
fileId: { type: string, minLength: 1 }
|
|
1152
|
+
name: { type: string, minLength: 1 }
|
|
1153
|
+
revision: { type: string, minLength: 1 }
|
|
1154
|
+
sizeBytes: { type: integer, minimum: 0 }
|
|
1155
|
+
binary: { type: boolean }
|
|
1156
|
+
sensitive: { type: boolean, const: false }
|
|
1157
|
+
mediaType: { type: string, enum: [text/plain, application/octet-stream] }
|
|
1158
|
+
offsetBytes: { type: integer, minimum: 0 }
|
|
1159
|
+
content:
|
|
1160
|
+
type: string
|
|
1161
|
+
description: Present only for redacted UTF-8 text; omitted for binary metadata.
|
|
1162
|
+
nextCursor: { type: [string, 'null'] }
|
|
1163
|
+
GitFile:
|
|
1164
|
+
type: object
|
|
1165
|
+
additionalProperties: false
|
|
1166
|
+
required: [fileId, path, indexStatus, worktreeStatus]
|
|
1167
|
+
properties:
|
|
1168
|
+
fileId: { type: string, minLength: 1 }
|
|
1169
|
+
path:
|
|
1170
|
+
type: string
|
|
1171
|
+
description: Sanitized workspace-relative display path; requests still use fileId.
|
|
1172
|
+
indexStatus: { type: string, minLength: 1, maxLength: 1 }
|
|
1173
|
+
worktreeStatus: { type: string, minLength: 1, maxLength: 1 }
|
|
1174
|
+
renamedFrom: { type: string }
|
|
1175
|
+
GitFileList:
|
|
1176
|
+
type: array
|
|
1177
|
+
maxItems: 2000
|
|
1178
|
+
items: { $ref: '#/components/schemas/GitFile' }
|
|
1179
|
+
GitStatus:
|
|
1180
|
+
type: object
|
|
1181
|
+
additionalProperties: false
|
|
1182
|
+
required:
|
|
1183
|
+
- isRepository
|
|
1184
|
+
- repositoryRevision
|
|
1185
|
+
- branch
|
|
1186
|
+
- detached
|
|
1187
|
+
- head
|
|
1188
|
+
- upstream
|
|
1189
|
+
- ahead
|
|
1190
|
+
- behind
|
|
1191
|
+
- clean
|
|
1192
|
+
- staged
|
|
1193
|
+
- unstaged
|
|
1194
|
+
- untracked
|
|
1195
|
+
- conflicted
|
|
1196
|
+
- totalFiles
|
|
1197
|
+
- truncated
|
|
1198
|
+
- nextCursor
|
|
1199
|
+
properties:
|
|
1200
|
+
isRepository: { type: boolean }
|
|
1201
|
+
repositoryRevision: { type: string, minLength: 1 }
|
|
1202
|
+
rootLabel: { type: string }
|
|
1203
|
+
branch: { type: [string, 'null'] }
|
|
1204
|
+
detached: { type: boolean }
|
|
1205
|
+
head: { type: [string, 'null'] }
|
|
1206
|
+
upstream: { type: [string, 'null'] }
|
|
1207
|
+
ahead: { type: integer, minimum: 0 }
|
|
1208
|
+
behind: { type: integer, minimum: 0 }
|
|
1209
|
+
clean: { type: boolean }
|
|
1210
|
+
staged: { $ref: '#/components/schemas/GitFileList' }
|
|
1211
|
+
unstaged: { $ref: '#/components/schemas/GitFileList' }
|
|
1212
|
+
untracked: { $ref: '#/components/schemas/GitFileList' }
|
|
1213
|
+
conflicted: { $ref: '#/components/schemas/GitFileList' }
|
|
1214
|
+
totalFiles: { type: integer, minimum: 0 }
|
|
1215
|
+
truncated: { type: boolean }
|
|
1216
|
+
nextCursor: { type: [string, 'null'] }
|
|
1217
|
+
GitCommit:
|
|
1218
|
+
type: object
|
|
1219
|
+
additionalProperties: false
|
|
1220
|
+
required: [id, shortId, authoredAt, authorName, subject]
|
|
1221
|
+
properties:
|
|
1222
|
+
id: { type: string, pattern: '^[a-f0-9]{40,64}$' }
|
|
1223
|
+
shortId: { type: string, pattern: '^[a-f0-9]{7,16}$' }
|
|
1224
|
+
authoredAt: { type: string, format: date-time }
|
|
1225
|
+
authorName: { type: string }
|
|
1226
|
+
subject: { type: string }
|
|
1227
|
+
GitLogPage:
|
|
1228
|
+
type: object
|
|
1229
|
+
additionalProperties: false
|
|
1230
|
+
required: [repositoryRevision, items, nextCursor]
|
|
1231
|
+
properties:
|
|
1232
|
+
repositoryRevision: { type: string, minLength: 1 }
|
|
1233
|
+
items:
|
|
1234
|
+
type: array
|
|
1235
|
+
maxItems: 100
|
|
1236
|
+
items: { $ref: '#/components/schemas/GitCommit' }
|
|
1237
|
+
nextCursor: { type: [string, 'null'] }
|
|
1238
|
+
GitDiffPage:
|
|
1239
|
+
type: object
|
|
1240
|
+
additionalProperties: false
|
|
1241
|
+
required:
|
|
1242
|
+
- fileId
|
|
1243
|
+
- path
|
|
1244
|
+
- repositoryRevision
|
|
1245
|
+
- binary
|
|
1246
|
+
- lines
|
|
1247
|
+
- nextCursor
|
|
1248
|
+
- truncated
|
|
1249
|
+
properties:
|
|
1250
|
+
fileId: { type: string, minLength: 1 }
|
|
1251
|
+
path: { type: string }
|
|
1252
|
+
repositoryRevision: { type: string, minLength: 1 }
|
|
1253
|
+
binary: { type: boolean }
|
|
1254
|
+
lines:
|
|
1255
|
+
type: array
|
|
1256
|
+
maxItems: 500
|
|
1257
|
+
items: { type: string }
|
|
1258
|
+
nextCursor: { type: [string, 'null'] }
|
|
1259
|
+
truncated: { type: boolean }
|
|
1260
|
+
ReviewVerification:
|
|
1261
|
+
type: object
|
|
1262
|
+
additionalProperties: false
|
|
1263
|
+
required: [callId, toolName, state, outputBytes, hasArtifact]
|
|
1264
|
+
properties:
|
|
1265
|
+
callId: { type: string }
|
|
1266
|
+
toolName: { type: string }
|
|
1267
|
+
state: { type: string, enum: [success, error, skipped] }
|
|
1268
|
+
outputBytes: { type: integer, minimum: 0 }
|
|
1269
|
+
hasArtifact: { type: boolean }
|
|
1270
|
+
ReviewSnapshot:
|
|
1271
|
+
type: object
|
|
1272
|
+
additionalProperties: false
|
|
1273
|
+
required:
|
|
1274
|
+
- revision
|
|
1275
|
+
- repositoryRevision
|
|
1276
|
+
- isRepository
|
|
1277
|
+
- clean
|
|
1278
|
+
- changedFiles
|
|
1279
|
+
- stagedCount
|
|
1280
|
+
- unstagedCount
|
|
1281
|
+
- untrackedCount
|
|
1282
|
+
- conflictCount
|
|
1283
|
+
- truncated
|
|
1284
|
+
- verification
|
|
1285
|
+
properties:
|
|
1286
|
+
revision: { type: string, minLength: 1 }
|
|
1287
|
+
repositoryRevision: { type: string, minLength: 1 }
|
|
1288
|
+
isRepository: { type: boolean }
|
|
1289
|
+
clean: { type: boolean }
|
|
1290
|
+
changedFiles: { $ref: '#/components/schemas/GitFileList' }
|
|
1291
|
+
stagedCount: { type: integer, minimum: 0 }
|
|
1292
|
+
unstagedCount: { type: integer, minimum: 0 }
|
|
1293
|
+
untrackedCount: { type: integer, minimum: 0 }
|
|
1294
|
+
conflictCount: { type: integer, minimum: 0 }
|
|
1295
|
+
truncated: { type: boolean }
|
|
1296
|
+
verification:
|
|
1297
|
+
type: array
|
|
1298
|
+
maxItems: 100
|
|
1299
|
+
items: { $ref: '#/components/schemas/ReviewVerification' }
|
|
1300
|
+
ContextGuardRequest:
|
|
1301
|
+
type: object
|
|
1302
|
+
additionalProperties: false
|
|
1303
|
+
required: [requestId, expectedContextRevision, workspaceId]
|
|
1304
|
+
properties:
|
|
1305
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1306
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
1307
|
+
workspaceId: { type: string, format: uuid }
|
|
1308
|
+
TerminalCreateRequest:
|
|
1309
|
+
type: object
|
|
1310
|
+
additionalProperties: false
|
|
1311
|
+
required: [requestId, expectedContextRevision, workspaceId]
|
|
1312
|
+
properties:
|
|
1313
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1314
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
1315
|
+
workspaceId: { type: string, format: uuid }
|
|
1316
|
+
cols: { type: integer, minimum: 2, maximum: 400, default: 100 }
|
|
1317
|
+
rows: { type: integer, minimum: 1, maximum: 200, default: 30 }
|
|
1318
|
+
TerminalMetadata:
|
|
1319
|
+
type: object
|
|
1320
|
+
additionalProperties: false
|
|
1321
|
+
required:
|
|
1322
|
+
- id
|
|
1323
|
+
- workspaceId
|
|
1324
|
+
- title
|
|
1325
|
+
- shell
|
|
1326
|
+
- state
|
|
1327
|
+
- cols
|
|
1328
|
+
- rows
|
|
1329
|
+
- connected
|
|
1330
|
+
- createdAt
|
|
1331
|
+
- lastActiveAt
|
|
1332
|
+
- earliestSequence
|
|
1333
|
+
- lastSequence
|
|
1334
|
+
properties:
|
|
1335
|
+
id: { type: string, format: uuid }
|
|
1336
|
+
workspaceId: { type: string, format: uuid }
|
|
1337
|
+
title: { type: string }
|
|
1338
|
+
shell: { type: string, description: Display basename only; no shell argv or environment. }
|
|
1339
|
+
state: { type: string, enum: [running, exited, closing] }
|
|
1340
|
+
cols: { type: integer, minimum: 2, maximum: 400 }
|
|
1341
|
+
rows: { type: integer, minimum: 1, maximum: 200 }
|
|
1342
|
+
connected: { type: boolean }
|
|
1343
|
+
createdAt: { type: string, format: date-time }
|
|
1344
|
+
lastActiveAt: { type: string, format: date-time }
|
|
1345
|
+
earliestSequence: { type: integer, minimum: 1 }
|
|
1346
|
+
lastSequence: { type: integer, minimum: 0 }
|
|
1347
|
+
exitCode: { type: integer }
|
|
1348
|
+
signal: { type: integer }
|
|
1349
|
+
TerminalPage:
|
|
1350
|
+
type: object
|
|
1351
|
+
additionalProperties: false
|
|
1352
|
+
required: [items, nextCursor]
|
|
1353
|
+
properties:
|
|
1354
|
+
items:
|
|
1355
|
+
type: array
|
|
1356
|
+
maxItems: 100
|
|
1357
|
+
items: { $ref: '#/components/schemas/TerminalMetadata' }
|
|
1358
|
+
nextCursor: { type: [string, 'null'] }
|
|
1359
|
+
TerminalTicket:
|
|
1360
|
+
type: object
|
|
1361
|
+
additionalProperties: false
|
|
1362
|
+
required: [ticket, ticketExpiresAt]
|
|
1363
|
+
properties:
|
|
1364
|
+
ticket:
|
|
1365
|
+
type: string
|
|
1366
|
+
minLength: 32
|
|
1367
|
+
maxLength: 128
|
|
1368
|
+
writeOnly: true
|
|
1369
|
+
description: Single-use bearer delivered only in this JSON body and first WS message.
|
|
1370
|
+
ticketExpiresAt: { type: string, format: date-time }
|
|
1371
|
+
TerminalCreateMutationResult:
|
|
1372
|
+
type: object
|
|
1373
|
+
additionalProperties: false
|
|
1374
|
+
required: [requestId, terminal, ticket, ticketExpiresAt]
|
|
1375
|
+
properties:
|
|
1376
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1377
|
+
terminal: { $ref: '#/components/schemas/TerminalMetadata' }
|
|
1378
|
+
ticket: { type: string, minLength: 32, maxLength: 128, writeOnly: true }
|
|
1379
|
+
ticketExpiresAt: { type: string, format: date-time }
|
|
1380
|
+
TerminalTicketMutationResult:
|
|
1381
|
+
type: object
|
|
1382
|
+
additionalProperties: false
|
|
1383
|
+
required: [requestId, ticket, ticketExpiresAt]
|
|
1384
|
+
properties:
|
|
1385
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1386
|
+
ticket: { type: string, minLength: 32, maxLength: 128, writeOnly: true }
|
|
1387
|
+
ticketExpiresAt: { type: string, format: date-time }
|
|
1388
|
+
TerminalCloseMutationResult:
|
|
1389
|
+
type: object
|
|
1390
|
+
additionalProperties: false
|
|
1391
|
+
required: [requestId, terminal]
|
|
1392
|
+
properties:
|
|
1393
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1394
|
+
terminal: { $ref: '#/components/schemas/TerminalMetadata' }
|
|
1395
|
+
TerminalAuthenticateMessage:
|
|
1396
|
+
type: object
|
|
1397
|
+
additionalProperties: false
|
|
1398
|
+
required: [type, ticket, afterSequence]
|
|
1399
|
+
properties:
|
|
1400
|
+
type: { type: string, const: authenticate }
|
|
1401
|
+
ticket: { type: string, minLength: 32, maxLength: 128, writeOnly: true }
|
|
1402
|
+
afterSequence: { type: integer, minimum: 0 }
|
|
1403
|
+
TerminalInputMessage:
|
|
1404
|
+
type: object
|
|
1405
|
+
additionalProperties: false
|
|
1406
|
+
required: [type, data]
|
|
1407
|
+
properties:
|
|
1408
|
+
type: { type: string, const: input }
|
|
1409
|
+
data: { type: string, maxLength: 65536 }
|
|
1410
|
+
TerminalResizeMessage:
|
|
1411
|
+
type: object
|
|
1412
|
+
additionalProperties: false
|
|
1413
|
+
required: [type, cols, rows]
|
|
1414
|
+
properties:
|
|
1415
|
+
type: { type: string, const: resize }
|
|
1416
|
+
cols: { type: integer, minimum: 2, maximum: 400 }
|
|
1417
|
+
rows: { type: integer, minimum: 1, maximum: 200 }
|
|
1418
|
+
TerminalPingMessage:
|
|
1419
|
+
type: object
|
|
1420
|
+
additionalProperties: false
|
|
1421
|
+
required: [type, timestamp]
|
|
1422
|
+
properties:
|
|
1423
|
+
type: { type: string, const: ping }
|
|
1424
|
+
timestamp: { type: number }
|
|
1425
|
+
TerminalClientMessage:
|
|
1426
|
+
oneOf:
|
|
1427
|
+
- $ref: '#/components/schemas/TerminalInputMessage'
|
|
1428
|
+
- $ref: '#/components/schemas/TerminalResizeMessage'
|
|
1429
|
+
- $ref: '#/components/schemas/TerminalPingMessage'
|
|
1430
|
+
discriminator: { propertyName: type }
|
|
1431
|
+
TerminalReadyMessage:
|
|
1432
|
+
type: object
|
|
1433
|
+
additionalProperties: false
|
|
1434
|
+
required: [type, terminal]
|
|
1435
|
+
properties:
|
|
1436
|
+
type: { type: string, const: ready }
|
|
1437
|
+
terminal: { $ref: '#/components/schemas/TerminalMetadata' }
|
|
1438
|
+
TerminalOutputMessage:
|
|
1439
|
+
type: object
|
|
1440
|
+
additionalProperties: false
|
|
1441
|
+
required: [type, sequence, data]
|
|
1442
|
+
properties:
|
|
1443
|
+
type: { type: string, const: output }
|
|
1444
|
+
sequence: { type: integer, minimum: 1 }
|
|
1445
|
+
data: { type: string, maxLength: 8000 }
|
|
1446
|
+
TerminalGapMessage:
|
|
1447
|
+
type: object
|
|
1448
|
+
additionalProperties: false
|
|
1449
|
+
required: [type, earliestSequence, latestSequence]
|
|
1450
|
+
properties:
|
|
1451
|
+
type: { type: string, const: gap }
|
|
1452
|
+
earliestSequence: { type: integer, minimum: 1 }
|
|
1453
|
+
latestSequence: { type: integer, minimum: 0 }
|
|
1454
|
+
TerminalExitMessage:
|
|
1455
|
+
type: object
|
|
1456
|
+
additionalProperties: false
|
|
1457
|
+
required: [type, exitCode]
|
|
1458
|
+
properties:
|
|
1459
|
+
type: { type: string, const: exit }
|
|
1460
|
+
exitCode: { type: integer }
|
|
1461
|
+
signal: { type: integer }
|
|
1462
|
+
TerminalPongMessage:
|
|
1463
|
+
type: object
|
|
1464
|
+
additionalProperties: false
|
|
1465
|
+
required: [type, timestamp]
|
|
1466
|
+
properties:
|
|
1467
|
+
type: { type: string, const: pong }
|
|
1468
|
+
timestamp: { type: number }
|
|
1469
|
+
TerminalErrorMessage:
|
|
1470
|
+
type: object
|
|
1471
|
+
additionalProperties: false
|
|
1472
|
+
required: [type, code]
|
|
1473
|
+
properties:
|
|
1474
|
+
type: { type: string, const: error }
|
|
1475
|
+
code: { type: string, minLength: 1 }
|
|
1476
|
+
TerminalServerMessage:
|
|
1477
|
+
oneOf:
|
|
1478
|
+
- $ref: '#/components/schemas/TerminalReadyMessage'
|
|
1479
|
+
- $ref: '#/components/schemas/TerminalOutputMessage'
|
|
1480
|
+
- $ref: '#/components/schemas/TerminalGapMessage'
|
|
1481
|
+
- $ref: '#/components/schemas/TerminalExitMessage'
|
|
1482
|
+
- $ref: '#/components/schemas/TerminalPongMessage'
|
|
1483
|
+
- $ref: '#/components/schemas/TerminalErrorMessage'
|
|
1484
|
+
discriminator: { propertyName: type }
|
|
1485
|
+
TranscriptMessage:
|
|
1486
|
+
type: object
|
|
1487
|
+
additionalProperties: false
|
|
1488
|
+
required: [id, role, content, timestamp]
|
|
1489
|
+
properties:
|
|
1490
|
+
id: { type: string }
|
|
1491
|
+
role:
|
|
1492
|
+
type: string
|
|
1493
|
+
enum: [system, user, assistant, tool]
|
|
1494
|
+
content: { type: string }
|
|
1495
|
+
timestamp: { type: number, minimum: 0 }
|
|
1496
|
+
modelVisibleContent: { type: string }
|
|
1497
|
+
toolCallId: { type: string }
|
|
1498
|
+
tool_calls:
|
|
1499
|
+
type: array
|
|
1500
|
+
items: {}
|
|
1501
|
+
appliedSkills:
|
|
1502
|
+
type: array
|
|
1503
|
+
items: { type: string }
|
|
1504
|
+
TranscriptPage:
|
|
1505
|
+
type: object
|
|
1506
|
+
additionalProperties: false
|
|
1507
|
+
required: [items, nextCursor]
|
|
1508
|
+
properties:
|
|
1509
|
+
items:
|
|
1510
|
+
type: array
|
|
1511
|
+
maxItems: 100
|
|
1512
|
+
items: { $ref: '#/components/schemas/TranscriptMessage' }
|
|
1513
|
+
nextCursor: { type: [string, 'null'] }
|
|
1514
|
+
GoalView:
|
|
1515
|
+
type: object
|
|
1516
|
+
additionalProperties: false
|
|
1517
|
+
description: >-
|
|
1518
|
+
Goal projection from the latest valid TurnCommitV1. A legacy Goal sidecar is eligible only
|
|
1519
|
+
as a one-time migration seed and is never a competing read authority.
|
|
1520
|
+
required: [authority, digest, state]
|
|
1521
|
+
properties:
|
|
1522
|
+
authority: { type: string, const: turn_commit }
|
|
1523
|
+
digest: { type: string, minLength: 1 }
|
|
1524
|
+
state:
|
|
1525
|
+
description: >-
|
|
1526
|
+
Opaque JSON value parsed from TurnCommitV1.goalState. The v0.3.0 wire type is unknown;
|
|
1527
|
+
this contract does not invent required Goal fields or status/revision enums.
|
|
1528
|
+
PlanView:
|
|
1529
|
+
type: object
|
|
1530
|
+
additionalProperties: false
|
|
1531
|
+
description: >-
|
|
1532
|
+
Exact safe projection of the PlanReceipt bound into TurnCommitV1. There is no Web review,
|
|
1533
|
+
approval, status or step model. After the planning turn commits, Orion restores returnMode
|
|
1534
|
+
and automatically schedules a separate execution request.
|
|
1535
|
+
required: [body, returnMode, digest]
|
|
1536
|
+
properties:
|
|
1537
|
+
body: { type: string, minLength: 1 }
|
|
1538
|
+
returnMode: { type: string, enum: [build, auto] }
|
|
1539
|
+
digest: { type: string, minLength: 1 }
|
|
1540
|
+
PendingApproval:
|
|
1541
|
+
type: object
|
|
1542
|
+
additionalProperties: false
|
|
1543
|
+
description: Runtime-owned approval that survives browser disconnect and tab closure.
|
|
1544
|
+
required: [id, toolName, sanitizedArguments, allowedScopes]
|
|
1545
|
+
properties:
|
|
1546
|
+
id: { type: string }
|
|
1547
|
+
toolName: { type: string }
|
|
1548
|
+
reason: { type: string }
|
|
1549
|
+
sanitizedArguments: { type: object, additionalProperties: true }
|
|
1550
|
+
allowedScopes:
|
|
1551
|
+
type: array
|
|
1552
|
+
const: [once, project, global]
|
|
1553
|
+
items: { type: string, enum: [once, project, global] }
|
|
1554
|
+
FollowupItem:
|
|
1555
|
+
type: object
|
|
1556
|
+
additionalProperties: false
|
|
1557
|
+
required: [id, text, queuedAt]
|
|
1558
|
+
properties:
|
|
1559
|
+
id: { type: string }
|
|
1560
|
+
text: { type: string }
|
|
1561
|
+
queuedAt: { type: number, minimum: 0 }
|
|
1562
|
+
SessionRuntimeSnapshot:
|
|
1563
|
+
type: object
|
|
1564
|
+
additionalProperties: false
|
|
1565
|
+
required:
|
|
1566
|
+
- active
|
|
1567
|
+
- processing
|
|
1568
|
+
- agentMode
|
|
1569
|
+
- permissionMode
|
|
1570
|
+
- status
|
|
1571
|
+
- followups
|
|
1572
|
+
- followupLimit
|
|
1573
|
+
- contextUsage
|
|
1574
|
+
- tokenUsage
|
|
1575
|
+
properties:
|
|
1576
|
+
active: { type: boolean }
|
|
1577
|
+
processing: { type: boolean }
|
|
1578
|
+
agentMode: { type: string }
|
|
1579
|
+
permissionMode: { type: string }
|
|
1580
|
+
status: { type: string }
|
|
1581
|
+
followups:
|
|
1582
|
+
type: array
|
|
1583
|
+
items: { $ref: '#/components/schemas/FollowupItem' }
|
|
1584
|
+
followupLimit: { type: integer, minimum: 0 }
|
|
1585
|
+
contextUsage:
|
|
1586
|
+
description: Runtime context-usage projection or null; the wire type is currently unknown.
|
|
1587
|
+
tokenUsage:
|
|
1588
|
+
description: Runtime token-usage projection or null; the wire type is currently unknown.
|
|
1589
|
+
SessionSnapshot:
|
|
1590
|
+
type: object
|
|
1591
|
+
additionalProperties: false
|
|
1592
|
+
required:
|
|
1593
|
+
- apiVersion
|
|
1594
|
+
- session
|
|
1595
|
+
- threadId
|
|
1596
|
+
- threadCursor
|
|
1597
|
+
- eventCursor
|
|
1598
|
+
- threadStatus
|
|
1599
|
+
- transcript
|
|
1600
|
+
- runtime
|
|
1601
|
+
- pendingApprovals
|
|
1602
|
+
- goal
|
|
1603
|
+
- plan
|
|
1604
|
+
- recoveryDiagnostics
|
|
1605
|
+
properties:
|
|
1606
|
+
apiVersion: { type: integer, const: 1 }
|
|
1607
|
+
session: { $ref: '#/components/schemas/SessionSummary' }
|
|
1608
|
+
threadId:
|
|
1609
|
+
type: [string, 'null']
|
|
1610
|
+
description: Null for a legacy session that has no materialized Thread identity.
|
|
1611
|
+
threadCursor:
|
|
1612
|
+
type: integer
|
|
1613
|
+
minimum: 0
|
|
1614
|
+
description: Latest projected durable Thread sequence; independent of eventCursor.
|
|
1615
|
+
eventCursor: { type: integer, minimum: 0 }
|
|
1616
|
+
projectionDigest: { type: string }
|
|
1617
|
+
threadStatus: { type: string, enum: [new, active, idle, legacy] }
|
|
1618
|
+
activeTurnId: { type: string }
|
|
1619
|
+
transcript: { $ref: '#/components/schemas/TranscriptPage' }
|
|
1620
|
+
runtime: { $ref: '#/components/schemas/SessionRuntimeSnapshot' }
|
|
1621
|
+
pendingApprovals:
|
|
1622
|
+
type: array
|
|
1623
|
+
items: { $ref: '#/components/schemas/PendingApproval' }
|
|
1624
|
+
goal:
|
|
1625
|
+
oneOf:
|
|
1626
|
+
- $ref: '#/components/schemas/GoalView'
|
|
1627
|
+
- type: 'null'
|
|
1628
|
+
plan:
|
|
1629
|
+
oneOf:
|
|
1630
|
+
- $ref: '#/components/schemas/PlanView'
|
|
1631
|
+
- type: 'null'
|
|
1632
|
+
recoveryDiagnostics:
|
|
1633
|
+
type: array
|
|
1634
|
+
items: {}
|
|
1635
|
+
SkillSummary:
|
|
1636
|
+
type: object
|
|
1637
|
+
additionalProperties: false
|
|
1638
|
+
required:
|
|
1639
|
+
- id
|
|
1640
|
+
- name
|
|
1641
|
+
- description
|
|
1642
|
+
- providerId
|
|
1643
|
+
- sourceScope
|
|
1644
|
+
- modelInvocable
|
|
1645
|
+
- userInvocable
|
|
1646
|
+
- requestedCapabilities
|
|
1647
|
+
- digest
|
|
1648
|
+
properties:
|
|
1649
|
+
id: { type: string }
|
|
1650
|
+
name: { type: string }
|
|
1651
|
+
description: { type: string }
|
|
1652
|
+
providerId: { type: string }
|
|
1653
|
+
sourceScope: { type: string, enum: [builtin, user, configured, project, remote] }
|
|
1654
|
+
modelInvocable: { type: boolean }
|
|
1655
|
+
userInvocable: { type: boolean }
|
|
1656
|
+
requestedCapabilities:
|
|
1657
|
+
type: array
|
|
1658
|
+
items: { type: string }
|
|
1659
|
+
digest: { type: string }
|
|
1660
|
+
SkillPage:
|
|
1661
|
+
type: object
|
|
1662
|
+
additionalProperties: false
|
|
1663
|
+
required: [items, nextCursor]
|
|
1664
|
+
properties:
|
|
1665
|
+
items:
|
|
1666
|
+
type: array
|
|
1667
|
+
maxItems: 100
|
|
1668
|
+
items: { $ref: '#/components/schemas/SkillSummary' }
|
|
1669
|
+
nextCursor: { type: [string, 'null'] }
|
|
1670
|
+
McpServerSummary:
|
|
1671
|
+
type: object
|
|
1672
|
+
additionalProperties: false
|
|
1673
|
+
required:
|
|
1674
|
+
- id
|
|
1675
|
+
- name
|
|
1676
|
+
- transport
|
|
1677
|
+
- tags
|
|
1678
|
+
- disabled
|
|
1679
|
+
- state
|
|
1680
|
+
- generation
|
|
1681
|
+
- toolCount
|
|
1682
|
+
- activeCallCount
|
|
1683
|
+
properties:
|
|
1684
|
+
id: { type: string }
|
|
1685
|
+
name: { type: string }
|
|
1686
|
+
description: { type: string }
|
|
1687
|
+
transport:
|
|
1688
|
+
type: string
|
|
1689
|
+
enum: [stdio, sse, http, streamable-http, websocket]
|
|
1690
|
+
tags:
|
|
1691
|
+
type: array
|
|
1692
|
+
items: { type: string }
|
|
1693
|
+
disabled: { type: boolean }
|
|
1694
|
+
state:
|
|
1695
|
+
type: string
|
|
1696
|
+
enum: [dormant, activating, connected, idle, draining, failed]
|
|
1697
|
+
generation: { type: integer, minimum: 0 }
|
|
1698
|
+
toolCount: { type: integer, minimum: 0 }
|
|
1699
|
+
activeCallCount: { type: integer, minimum: 0 }
|
|
1700
|
+
failure: { type: string }
|
|
1701
|
+
McpPage:
|
|
1702
|
+
type: object
|
|
1703
|
+
additionalProperties: false
|
|
1704
|
+
required: [items, nextCursor]
|
|
1705
|
+
properties:
|
|
1706
|
+
items:
|
|
1707
|
+
type: array
|
|
1708
|
+
maxItems: 100
|
|
1709
|
+
items: { $ref: '#/components/schemas/McpServerSummary' }
|
|
1710
|
+
nextCursor: { type: [string, 'null'] }
|
|
1711
|
+
ToolDetailSummary:
|
|
1712
|
+
type: object
|
|
1713
|
+
additionalProperties: false
|
|
1714
|
+
required: [callId, sequence, toolName, state, outputBytes, hasArtifact]
|
|
1715
|
+
properties:
|
|
1716
|
+
callId: { type: string }
|
|
1717
|
+
sequence: { type: integer, minimum: 0 }
|
|
1718
|
+
turnId: { type: string }
|
|
1719
|
+
toolName: { type: string }
|
|
1720
|
+
state: { type: string, enum: [success, error, skipped] }
|
|
1721
|
+
outputBytes: { type: integer, minimum: 0 }
|
|
1722
|
+
artifactId:
|
|
1723
|
+
type: string
|
|
1724
|
+
description: Opaque project artifact identifier; it is not a filesystem path.
|
|
1725
|
+
hasArtifact: { type: boolean }
|
|
1726
|
+
ToolDetailSummaryPage:
|
|
1727
|
+
type: object
|
|
1728
|
+
additionalProperties: false
|
|
1729
|
+
required: [items, nextCursor]
|
|
1730
|
+
properties:
|
|
1731
|
+
items:
|
|
1732
|
+
type: array
|
|
1733
|
+
maxItems: 100
|
|
1734
|
+
items: { $ref: '#/components/schemas/ToolDetailSummary' }
|
|
1735
|
+
nextCursor: { type: [string, 'null'] }
|
|
1736
|
+
ToolDetailPage:
|
|
1737
|
+
type: object
|
|
1738
|
+
additionalProperties: false
|
|
1739
|
+
required: [content, offsetBytes, totalBytes, redacted]
|
|
1740
|
+
properties:
|
|
1741
|
+
content: { type: string }
|
|
1742
|
+
offsetBytes: { type: integer, minimum: 0 }
|
|
1743
|
+
nextOffsetBytes:
|
|
1744
|
+
type: [integer, 'null']
|
|
1745
|
+
minimum: 0
|
|
1746
|
+
description: Omitted or null when the page reaches the end of the artifact.
|
|
1747
|
+
totalBytes: { type: integer, minimum: 0 }
|
|
1748
|
+
redacted:
|
|
1749
|
+
type: boolean
|
|
1750
|
+
description: >-
|
|
1751
|
+
True when content is served from the browser-safe, pre-sanitized derivative. It does
|
|
1752
|
+
not imply that this particular page contained a secret replacement.
|
|
1753
|
+
SettingsRevision:
|
|
1754
|
+
type: string
|
|
1755
|
+
pattern: '^hmac-sha256:[a-f0-9]{64}$'
|
|
1756
|
+
description: >-
|
|
1757
|
+
Opaque HMAC over the exact current config bytes. The local HMAC key is never exposed.
|
|
1758
|
+
SettingsFieldCommon:
|
|
1759
|
+
type: object
|
|
1760
|
+
required: [source, scope, applies, overridden, writable]
|
|
1761
|
+
properties:
|
|
1762
|
+
source: { type: string, enum: [internal, model, global, project, session] }
|
|
1763
|
+
scope: { type: string, enum: [global, project, session] }
|
|
1764
|
+
applies:
|
|
1765
|
+
type: string
|
|
1766
|
+
enum: [live, next-logical-request, new-session, restart]
|
|
1767
|
+
overridden: { type: boolean }
|
|
1768
|
+
writable: { type: boolean }
|
|
1769
|
+
blockedReason:
|
|
1770
|
+
type: string
|
|
1771
|
+
enum: [runtime_busy, read_only, invalid_document]
|
|
1772
|
+
ThemeSettingsField:
|
|
1773
|
+
allOf:
|
|
1774
|
+
- $ref: '#/components/schemas/SettingsFieldCommon'
|
|
1775
|
+
- type: object
|
|
1776
|
+
required: [effectiveValue]
|
|
1777
|
+
properties:
|
|
1778
|
+
effectiveValue: { type: string, enum: [system, light, dark] }
|
|
1779
|
+
explicitValue: { type: string, enum: [system, light, dark] }
|
|
1780
|
+
inheritedValue: { type: string, enum: [system, light, dark] }
|
|
1781
|
+
MotionSettingsField:
|
|
1782
|
+
allOf:
|
|
1783
|
+
- $ref: '#/components/schemas/SettingsFieldCommon'
|
|
1784
|
+
- type: object
|
|
1785
|
+
required: [effectiveValue]
|
|
1786
|
+
properties:
|
|
1787
|
+
effectiveValue: { type: string, enum: [system, reduced] }
|
|
1788
|
+
explicitValue: { type: string, enum: [system, reduced] }
|
|
1789
|
+
inheritedValue: { type: string, enum: [system, reduced] }
|
|
1790
|
+
ModelSettingsField:
|
|
1791
|
+
allOf:
|
|
1792
|
+
- $ref: '#/components/schemas/SettingsFieldCommon'
|
|
1793
|
+
- type: object
|
|
1794
|
+
required: [effectiveValue]
|
|
1795
|
+
properties:
|
|
1796
|
+
effectiveValue: { type: string, minLength: 1 }
|
|
1797
|
+
explicitValue: { type: string, minLength: 1 }
|
|
1798
|
+
inheritedValue: { type: string, minLength: 1 }
|
|
1799
|
+
EffortSettingsField:
|
|
1800
|
+
allOf:
|
|
1801
|
+
- $ref: '#/components/schemas/SettingsFieldCommon'
|
|
1802
|
+
- type: object
|
|
1803
|
+
required: [effectiveValue]
|
|
1804
|
+
properties:
|
|
1805
|
+
effectiveValue: { $ref: '#/components/schemas/EffortPreference' }
|
|
1806
|
+
explicitValue: { $ref: '#/components/schemas/EffortPreference' }
|
|
1807
|
+
inheritedValue: { $ref: '#/components/schemas/EffortPreference' }
|
|
1808
|
+
ToolConfirmationSettingsField:
|
|
1809
|
+
allOf:
|
|
1810
|
+
- $ref: '#/components/schemas/SettingsFieldCommon'
|
|
1811
|
+
- type: object
|
|
1812
|
+
required: [effectiveValue]
|
|
1813
|
+
properties:
|
|
1814
|
+
effectiveValue: { type: string, enum: [allow, ask, deny] }
|
|
1815
|
+
explicitValue: { type: string, enum: [allow, ask, deny] }
|
|
1816
|
+
inheritedValue: { type: string, enum: [allow, ask, deny] }
|
|
1817
|
+
EffortPreference:
|
|
1818
|
+
type: string
|
|
1819
|
+
enum: [auto, none, minimal, low, medium, high, xhigh, max]
|
|
1820
|
+
ModelSummary:
|
|
1821
|
+
type: object
|
|
1822
|
+
additionalProperties: false
|
|
1823
|
+
required: [id, label]
|
|
1824
|
+
properties:
|
|
1825
|
+
id: { type: string, minLength: 1 }
|
|
1826
|
+
label: { type: string, minLength: 1 }
|
|
1827
|
+
provider: { type: string }
|
|
1828
|
+
CredentialSlot:
|
|
1829
|
+
type: object
|
|
1830
|
+
additionalProperties: false
|
|
1831
|
+
required: [providerId, state, source, writable]
|
|
1832
|
+
properties:
|
|
1833
|
+
providerId: { type: string, minLength: 1 }
|
|
1834
|
+
state: { type: string, enum: [ready, missing, unavailable] }
|
|
1835
|
+
source: { type: string, enum: [environment, legacy, none] }
|
|
1836
|
+
writable: { type: boolean, const: false }
|
|
1837
|
+
SettingsDocument:
|
|
1838
|
+
type: object
|
|
1839
|
+
additionalProperties: false
|
|
1840
|
+
required:
|
|
1841
|
+
- schemaVersion
|
|
1842
|
+
- revision
|
|
1843
|
+
- state
|
|
1844
|
+
- writable
|
|
1845
|
+
- hasDocument
|
|
1846
|
+
- workspace
|
|
1847
|
+
- sections
|
|
1848
|
+
- models
|
|
1849
|
+
- credentials
|
|
1850
|
+
properties:
|
|
1851
|
+
schemaVersion: { type: integer, const: 1 }
|
|
1852
|
+
revision: { $ref: '#/components/schemas/SettingsRevision' }
|
|
1853
|
+
state: { type: string, enum: [ready, invalid, read-only, unavailable] }
|
|
1854
|
+
writable: { type: boolean }
|
|
1855
|
+
hasDocument: { type: boolean }
|
|
1856
|
+
workspace: { type: string }
|
|
1857
|
+
sections:
|
|
1858
|
+
type: object
|
|
1859
|
+
additionalProperties: false
|
|
1860
|
+
required: [appearance, defaults, permissions]
|
|
1861
|
+
properties:
|
|
1862
|
+
appearance:
|
|
1863
|
+
type: object
|
|
1864
|
+
additionalProperties: false
|
|
1865
|
+
required: [theme, motion]
|
|
1866
|
+
properties:
|
|
1867
|
+
theme: { $ref: '#/components/schemas/ThemeSettingsField' }
|
|
1868
|
+
motion: { $ref: '#/components/schemas/MotionSettingsField' }
|
|
1869
|
+
defaults:
|
|
1870
|
+
type: object
|
|
1871
|
+
additionalProperties: false
|
|
1872
|
+
required: [model, effort]
|
|
1873
|
+
properties:
|
|
1874
|
+
model: { $ref: '#/components/schemas/ModelSettingsField' }
|
|
1875
|
+
effort: { $ref: '#/components/schemas/EffortSettingsField' }
|
|
1876
|
+
permissions:
|
|
1877
|
+
type: object
|
|
1878
|
+
additionalProperties: false
|
|
1879
|
+
required: [toolConfirmation]
|
|
1880
|
+
properties:
|
|
1881
|
+
toolConfirmation:
|
|
1882
|
+
$ref: '#/components/schemas/ToolConfirmationSettingsField'
|
|
1883
|
+
models:
|
|
1884
|
+
type: array
|
|
1885
|
+
items: { $ref: '#/components/schemas/ModelSummary' }
|
|
1886
|
+
credentials:
|
|
1887
|
+
type: array
|
|
1888
|
+
items: { $ref: '#/components/schemas/CredentialSlot' }
|
|
1889
|
+
currentSession:
|
|
1890
|
+
type: object
|
|
1891
|
+
additionalProperties: false
|
|
1892
|
+
required: [model, effort, overridesProjectEffort]
|
|
1893
|
+
properties:
|
|
1894
|
+
model: { type: string }
|
|
1895
|
+
effort: { $ref: '#/components/schemas/EffortPreference' }
|
|
1896
|
+
overridesProjectEffort: { type: boolean }
|
|
1897
|
+
diagnostic:
|
|
1898
|
+
type: object
|
|
1899
|
+
additionalProperties: false
|
|
1900
|
+
required: [code, message]
|
|
1901
|
+
properties:
|
|
1902
|
+
code: { type: string }
|
|
1903
|
+
message: { type: string }
|
|
1904
|
+
SettingsOperation:
|
|
1905
|
+
oneOf:
|
|
1906
|
+
- $ref: '#/components/schemas/SetThemeSetting'
|
|
1907
|
+
- $ref: '#/components/schemas/UnsetThemeSetting'
|
|
1908
|
+
- $ref: '#/components/schemas/SetMotionSetting'
|
|
1909
|
+
- $ref: '#/components/schemas/UnsetMotionSetting'
|
|
1910
|
+
- $ref: '#/components/schemas/SetModelSetting'
|
|
1911
|
+
- $ref: '#/components/schemas/UnsetModelSetting'
|
|
1912
|
+
- $ref: '#/components/schemas/SetEffortSetting'
|
|
1913
|
+
- $ref: '#/components/schemas/UnsetEffortSetting'
|
|
1914
|
+
- $ref: '#/components/schemas/SetToolConfirmationSetting'
|
|
1915
|
+
- $ref: '#/components/schemas/UnsetToolConfirmationSetting'
|
|
1916
|
+
SetThemeSetting:
|
|
1917
|
+
type: object
|
|
1918
|
+
additionalProperties: false
|
|
1919
|
+
required: [op, key, value]
|
|
1920
|
+
properties:
|
|
1921
|
+
op: { type: string, const: set }
|
|
1922
|
+
key: { type: string, const: appearance.theme }
|
|
1923
|
+
value: { type: string, enum: [system, light, dark] }
|
|
1924
|
+
UnsetThemeSetting:
|
|
1925
|
+
type: object
|
|
1926
|
+
additionalProperties: false
|
|
1927
|
+
required: [op, key]
|
|
1928
|
+
properties:
|
|
1929
|
+
op: { type: string, const: unset }
|
|
1930
|
+
key: { type: string, const: appearance.theme }
|
|
1931
|
+
SetMotionSetting:
|
|
1932
|
+
type: object
|
|
1933
|
+
additionalProperties: false
|
|
1934
|
+
required: [op, key, value]
|
|
1935
|
+
properties:
|
|
1936
|
+
op: { type: string, const: set }
|
|
1937
|
+
key: { type: string, const: appearance.motion }
|
|
1938
|
+
value: { type: string, enum: [system, reduced] }
|
|
1939
|
+
UnsetMotionSetting:
|
|
1940
|
+
type: object
|
|
1941
|
+
additionalProperties: false
|
|
1942
|
+
required: [op, key]
|
|
1943
|
+
properties:
|
|
1944
|
+
op: { type: string, const: unset }
|
|
1945
|
+
key: { type: string, const: appearance.motion }
|
|
1946
|
+
SetModelSetting:
|
|
1947
|
+
type: object
|
|
1948
|
+
additionalProperties: false
|
|
1949
|
+
required: [op, key, value]
|
|
1950
|
+
properties:
|
|
1951
|
+
op: { type: string, const: set }
|
|
1952
|
+
key: { type: string, const: defaults.model }
|
|
1953
|
+
value: { type: string, minLength: 1, maxLength: 200 }
|
|
1954
|
+
UnsetModelSetting:
|
|
1955
|
+
type: object
|
|
1956
|
+
additionalProperties: false
|
|
1957
|
+
required: [op, key]
|
|
1958
|
+
properties:
|
|
1959
|
+
op: { type: string, const: unset }
|
|
1960
|
+
key: { type: string, const: defaults.model }
|
|
1961
|
+
SetEffortSetting:
|
|
1962
|
+
type: object
|
|
1963
|
+
additionalProperties: false
|
|
1964
|
+
required: [op, key, value]
|
|
1965
|
+
properties:
|
|
1966
|
+
op: { type: string, const: set }
|
|
1967
|
+
key: { type: string, const: defaults.effort }
|
|
1968
|
+
value: { $ref: '#/components/schemas/EffortPreference' }
|
|
1969
|
+
UnsetEffortSetting:
|
|
1970
|
+
type: object
|
|
1971
|
+
additionalProperties: false
|
|
1972
|
+
required: [op, key]
|
|
1973
|
+
properties:
|
|
1974
|
+
op: { type: string, const: unset }
|
|
1975
|
+
key: { type: string, const: defaults.effort }
|
|
1976
|
+
SetToolConfirmationSetting:
|
|
1977
|
+
type: object
|
|
1978
|
+
additionalProperties: false
|
|
1979
|
+
required: [op, key, value]
|
|
1980
|
+
properties:
|
|
1981
|
+
op: { type: string, const: set }
|
|
1982
|
+
key: { type: string, const: permissions.toolConfirmation }
|
|
1983
|
+
value: { type: string, enum: [allow, ask, deny] }
|
|
1984
|
+
UnsetToolConfirmationSetting:
|
|
1985
|
+
type: object
|
|
1986
|
+
additionalProperties: false
|
|
1987
|
+
required: [op, key]
|
|
1988
|
+
properties:
|
|
1989
|
+
op: { type: string, const: unset }
|
|
1990
|
+
key: { type: string, const: permissions.toolConfirmation }
|
|
1991
|
+
UpdateSettingsRequest:
|
|
1992
|
+
type: object
|
|
1993
|
+
additionalProperties: false
|
|
1994
|
+
required: [requestId, expectedRevision, operations]
|
|
1995
|
+
properties:
|
|
1996
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
1997
|
+
expectedRevision: { $ref: '#/components/schemas/SettingsRevision' }
|
|
1998
|
+
operations:
|
|
1999
|
+
type: array
|
|
2000
|
+
minItems: 1
|
|
2001
|
+
maxItems: 20
|
|
2002
|
+
items: { $ref: '#/components/schemas/SettingsOperation' }
|
|
2003
|
+
SettingsMutationResult:
|
|
2004
|
+
type: object
|
|
2005
|
+
additionalProperties: false
|
|
2006
|
+
required: [requestId, revision, appliedKeys, settings]
|
|
2007
|
+
properties:
|
|
2008
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
2009
|
+
revision: { $ref: '#/components/schemas/SettingsRevision' }
|
|
2010
|
+
appliedKeys:
|
|
2011
|
+
type: array
|
|
2012
|
+
minItems: 1
|
|
2013
|
+
maxItems: 20
|
|
2014
|
+
items:
|
|
2015
|
+
type: string
|
|
2016
|
+
enum:
|
|
2017
|
+
- appearance.theme
|
|
2018
|
+
- appearance.motion
|
|
2019
|
+
- defaults.model
|
|
2020
|
+
- defaults.effort
|
|
2021
|
+
- permissions.toolConfirmation
|
|
2022
|
+
settings: { $ref: '#/components/schemas/SettingsDocument' }
|
|
2023
|
+
WebCommand:
|
|
2024
|
+
type: object
|
|
2025
|
+
additionalProperties: false
|
|
2026
|
+
required: [requestId, expectedContextRevision, workspaceId, expectedSessionId, type]
|
|
2027
|
+
allOf:
|
|
2028
|
+
- if:
|
|
2029
|
+
properties:
|
|
2030
|
+
type: { const: set_agent_mode }
|
|
2031
|
+
required: [type]
|
|
2032
|
+
then:
|
|
2033
|
+
required: [agentMode]
|
|
2034
|
+
properties:
|
|
2035
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
2036
|
+
expectedContextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
2037
|
+
workspaceId: { type: string, format: uuid }
|
|
2038
|
+
expectedSessionId:
|
|
2039
|
+
type: string
|
|
2040
|
+
minLength: 1
|
|
2041
|
+
maxLength: 256
|
|
2042
|
+
description: >-
|
|
2043
|
+
Compare-and-swap guard for the active Session. The Host returns 409
|
|
2044
|
+
active_session_changed without dispatching when the selection no longer matches.
|
|
2045
|
+
type:
|
|
2046
|
+
type: string
|
|
2047
|
+
enum:
|
|
2048
|
+
- submit
|
|
2049
|
+
- queue_followup
|
|
2050
|
+
- remove_followup
|
|
2051
|
+
- clear_followups
|
|
2052
|
+
- interrupt
|
|
2053
|
+
- permission_decision
|
|
2054
|
+
- goal_control
|
|
2055
|
+
- permission_mode_change
|
|
2056
|
+
- cycle_agent_mode
|
|
2057
|
+
- set_agent_mode
|
|
2058
|
+
text: { type: string, maxLength: 1048576 }
|
|
2059
|
+
itemId: { type: string }
|
|
2060
|
+
requestPermissionId: { type: string }
|
|
2061
|
+
approved: { type: boolean }
|
|
2062
|
+
scope: { type: string, enum: [once, project, global] }
|
|
2063
|
+
goalAction: { type: string, enum: [create, status, pause, resume, clear] }
|
|
2064
|
+
objective: { type: string }
|
|
2065
|
+
toolConfirmation: { type: string, enum: [allow, ask, deny] }
|
|
2066
|
+
agentMode: { type: string, enum: [interactive, plan, auto] }
|
|
2067
|
+
CommandResult:
|
|
2068
|
+
type: object
|
|
2069
|
+
additionalProperties: false
|
|
2070
|
+
required: [requestId, result]
|
|
2071
|
+
properties:
|
|
2072
|
+
requestId: { $ref: '#/components/schemas/RequestId' }
|
|
2073
|
+
result: { type: string }
|
|
2074
|
+
detail: { type: string }
|
|
2075
|
+
WebEventEnvelope:
|
|
2076
|
+
description: >-
|
|
2077
|
+
Versioned, cursor-ordered event union. `type` is the discriminator; every branch carries
|
|
2078
|
+
explicit `sessionId` and `threadId` keys. Runtime events allow null identities before a
|
|
2079
|
+
session or Thread exists; committed Thread events require both values to be non-null.
|
|
2080
|
+
oneOf:
|
|
2081
|
+
- $ref: '#/components/schemas/RuntimeEventEnvelope'
|
|
2082
|
+
- $ref: '#/components/schemas/ThreadEventEnvelope'
|
|
2083
|
+
- $ref: '#/components/schemas/WorkbenchStateEnvelope'
|
|
2084
|
+
- $ref: '#/components/schemas/SettingsInvalidatedEnvelope'
|
|
2085
|
+
- $ref: '#/components/schemas/WorkspaceResourceInvalidatedEnvelope'
|
|
2086
|
+
- $ref: '#/components/schemas/ReplayResetEnvelope'
|
|
2087
|
+
discriminator:
|
|
2088
|
+
propertyName: type
|
|
2089
|
+
mapping:
|
|
2090
|
+
runtime_event: '#/components/schemas/RuntimeEventEnvelope'
|
|
2091
|
+
thread_event: '#/components/schemas/ThreadEventEnvelope'
|
|
2092
|
+
workbench_state: '#/components/schemas/WorkbenchStateEnvelope'
|
|
2093
|
+
settings_invalidated: '#/components/schemas/SettingsInvalidatedEnvelope'
|
|
2094
|
+
workspace_resource_invalidated: '#/components/schemas/WorkspaceResourceInvalidatedEnvelope'
|
|
2095
|
+
replay_reset: '#/components/schemas/ReplayResetEnvelope'
|
|
2096
|
+
RuntimeEventEnvelope:
|
|
2097
|
+
type: object
|
|
2098
|
+
additionalProperties: false
|
|
2099
|
+
required:
|
|
2100
|
+
- apiVersion
|
|
2101
|
+
- eventId
|
|
2102
|
+
- cursor
|
|
2103
|
+
- sessionId
|
|
2104
|
+
- threadId
|
|
2105
|
+
- type
|
|
2106
|
+
- durable
|
|
2107
|
+
- timestamp
|
|
2108
|
+
- payload
|
|
2109
|
+
properties:
|
|
2110
|
+
apiVersion: { type: integer, const: 1 }
|
|
2111
|
+
eventId: { type: string, format: uuid }
|
|
2112
|
+
cursor: { type: integer, minimum: 1 }
|
|
2113
|
+
sessionId: { type: [string, 'null'] }
|
|
2114
|
+
threadId: { type: [string, 'null'] }
|
|
2115
|
+
type: { type: string, const: runtime_event }
|
|
2116
|
+
durable: { type: boolean }
|
|
2117
|
+
timestamp: { type: string, format: date-time }
|
|
2118
|
+
payload:
|
|
2119
|
+
type: object
|
|
2120
|
+
additionalProperties: false
|
|
2121
|
+
required: [eventType, value]
|
|
2122
|
+
properties:
|
|
2123
|
+
eventType: { type: string, minLength: 1 }
|
|
2124
|
+
value: { type: object, additionalProperties: true }
|
|
2125
|
+
ThreadEventEnvelope:
|
|
2126
|
+
type: object
|
|
2127
|
+
additionalProperties: false
|
|
2128
|
+
required:
|
|
2129
|
+
- apiVersion
|
|
2130
|
+
- eventId
|
|
2131
|
+
- cursor
|
|
2132
|
+
- sessionId
|
|
2133
|
+
- threadId
|
|
2134
|
+
- type
|
|
2135
|
+
- durable
|
|
2136
|
+
- timestamp
|
|
2137
|
+
- payload
|
|
2138
|
+
properties:
|
|
2139
|
+
apiVersion: { type: integer, const: 1 }
|
|
2140
|
+
eventId: { type: string, format: uuid }
|
|
2141
|
+
cursor: { type: integer, minimum: 1 }
|
|
2142
|
+
sessionId: { type: string, minLength: 1 }
|
|
2143
|
+
threadId: { type: string, minLength: 1 }
|
|
2144
|
+
type: { type: string, const: thread_event }
|
|
2145
|
+
durable: { type: boolean, const: true }
|
|
2146
|
+
timestamp: { type: string, format: date-time }
|
|
2147
|
+
payload:
|
|
2148
|
+
type: object
|
|
2149
|
+
additionalProperties: false
|
|
2150
|
+
required: [sequence, eventType, value]
|
|
2151
|
+
properties:
|
|
2152
|
+
sequence: { type: integer, minimum: 1 }
|
|
2153
|
+
eventType: { type: string, minLength: 1 }
|
|
2154
|
+
value: { type: object, additionalProperties: true }
|
|
2155
|
+
WorkbenchStateEnvelope:
|
|
2156
|
+
type: object
|
|
2157
|
+
additionalProperties: false
|
|
2158
|
+
required:
|
|
2159
|
+
- apiVersion
|
|
2160
|
+
- eventId
|
|
2161
|
+
- cursor
|
|
2162
|
+
- sessionId
|
|
2163
|
+
- threadId
|
|
2164
|
+
- type
|
|
2165
|
+
- durable
|
|
2166
|
+
- timestamp
|
|
2167
|
+
- payload
|
|
2168
|
+
properties:
|
|
2169
|
+
apiVersion: { type: integer, const: 1 }
|
|
2170
|
+
eventId: { type: string, format: uuid }
|
|
2171
|
+
cursor: { type: integer, minimum: 1 }
|
|
2172
|
+
sessionId: { type: [string, 'null'] }
|
|
2173
|
+
threadId: { type: [string, 'null'] }
|
|
2174
|
+
type: { type: string, const: workbench_state }
|
|
2175
|
+
durable: { type: boolean }
|
|
2176
|
+
timestamp: { type: string, format: date-time }
|
|
2177
|
+
payload:
|
|
2178
|
+
type: object
|
|
2179
|
+
additionalProperties: false
|
|
2180
|
+
required: [contextRevision, workspaceId, workspace, activeSessionId]
|
|
2181
|
+
properties:
|
|
2182
|
+
contextRevision: { $ref: '#/components/schemas/ContextRevision' }
|
|
2183
|
+
workspaceId: { type: string, format: uuid }
|
|
2184
|
+
workspace: { type: string }
|
|
2185
|
+
activeSessionId: { type: [string, 'null'] }
|
|
2186
|
+
SettingsInvalidatedEnvelope:
|
|
2187
|
+
type: object
|
|
2188
|
+
additionalProperties: false
|
|
2189
|
+
required:
|
|
2190
|
+
- apiVersion
|
|
2191
|
+
- eventId
|
|
2192
|
+
- cursor
|
|
2193
|
+
- sessionId
|
|
2194
|
+
- threadId
|
|
2195
|
+
- type
|
|
2196
|
+
- durable
|
|
2197
|
+
- timestamp
|
|
2198
|
+
- payload
|
|
2199
|
+
properties:
|
|
2200
|
+
apiVersion: { type: integer, const: 1 }
|
|
2201
|
+
eventId: { type: string, format: uuid }
|
|
2202
|
+
cursor: { type: integer, minimum: 1 }
|
|
2203
|
+
sessionId: { type: [string, 'null'] }
|
|
2204
|
+
threadId: { type: [string, 'null'] }
|
|
2205
|
+
type: { type: string, const: settings_invalidated }
|
|
2206
|
+
durable: { type: boolean, const: false }
|
|
2207
|
+
timestamp: { type: string, format: date-time }
|
|
2208
|
+
payload:
|
|
2209
|
+
type: object
|
|
2210
|
+
additionalProperties: false
|
|
2211
|
+
required: [revision, reason, state]
|
|
2212
|
+
properties:
|
|
2213
|
+
revision: { $ref: '#/components/schemas/SettingsRevision' }
|
|
2214
|
+
reason: { type: string, enum: [local-write, external-edit, workspace-change] }
|
|
2215
|
+
state: { type: string, enum: [ready, invalid] }
|
|
2216
|
+
WorkspaceResourceInvalidatedEnvelope:
|
|
2217
|
+
type: object
|
|
2218
|
+
additionalProperties: false
|
|
2219
|
+
required:
|
|
2220
|
+
- apiVersion
|
|
2221
|
+
- eventId
|
|
2222
|
+
- cursor
|
|
2223
|
+
- sessionId
|
|
2224
|
+
- threadId
|
|
2225
|
+
- type
|
|
2226
|
+
- durable
|
|
2227
|
+
- timestamp
|
|
2228
|
+
- payload
|
|
2229
|
+
properties:
|
|
2230
|
+
apiVersion: { type: integer, const: 1 }
|
|
2231
|
+
eventId: { type: string, format: uuid }
|
|
2232
|
+
cursor: { type: integer, minimum: 1 }
|
|
2233
|
+
sessionId: { type: [string, 'null'] }
|
|
2234
|
+
threadId: { type: [string, 'null'] }
|
|
2235
|
+
type: { type: string, const: workspace_resource_invalidated }
|
|
2236
|
+
durable: { type: boolean, const: false }
|
|
2237
|
+
timestamp: { type: string, format: date-time }
|
|
2238
|
+
payload:
|
|
2239
|
+
type: object
|
|
2240
|
+
additionalProperties: false
|
|
2241
|
+
required: [workspaceId, resources, reason]
|
|
2242
|
+
properties:
|
|
2243
|
+
workspaceId: { type: string, format: uuid }
|
|
2244
|
+
resources:
|
|
2245
|
+
type: array
|
|
2246
|
+
minItems: 1
|
|
2247
|
+
uniqueItems: true
|
|
2248
|
+
items: { type: string, enum: [files, git, review] }
|
|
2249
|
+
reason:
|
|
2250
|
+
type: string
|
|
2251
|
+
enum: [context-change, filesystem-change, terminal-command, tool-finished]
|
|
2252
|
+
ReplayResetEnvelope:
|
|
2253
|
+
type: object
|
|
2254
|
+
additionalProperties: false
|
|
2255
|
+
required:
|
|
2256
|
+
- apiVersion
|
|
2257
|
+
- eventId
|
|
2258
|
+
- cursor
|
|
2259
|
+
- sessionId
|
|
2260
|
+
- threadId
|
|
2261
|
+
- type
|
|
2262
|
+
- durable
|
|
2263
|
+
- timestamp
|
|
2264
|
+
- payload
|
|
2265
|
+
properties:
|
|
2266
|
+
apiVersion: { type: integer, const: 1 }
|
|
2267
|
+
eventId: { type: string, format: uuid }
|
|
2268
|
+
cursor: { type: integer, minimum: 1 }
|
|
2269
|
+
sessionId: { type: [string, 'null'] }
|
|
2270
|
+
threadId: { type: [string, 'null'] }
|
|
2271
|
+
type: { type: string, const: replay_reset }
|
|
2272
|
+
durable: { type: boolean, const: true }
|
|
2273
|
+
timestamp: { type: string, format: date-time }
|
|
2274
|
+
payload:
|
|
2275
|
+
type: object
|
|
2276
|
+
additionalProperties: false
|
|
2277
|
+
required: [reason, snapshotRequired]
|
|
2278
|
+
properties:
|
|
2279
|
+
reason: { type: string }
|
|
2280
|
+
snapshotRequired: { type: boolean, const: true }
|
|
2281
|
+
Problem:
|
|
2282
|
+
type: object
|
|
2283
|
+
additionalProperties: false
|
|
2284
|
+
required: [type, title, status, code]
|
|
2285
|
+
properties:
|
|
2286
|
+
type: { type: string }
|
|
2287
|
+
title: { type: string }
|
|
2288
|
+
status: { type: integer }
|
|
2289
|
+
code: { type: string, minLength: 1 }
|
|
2290
|
+
detail: { type: string }
|