@orion-agents/orion-code 0.3.0 → 0.3.2

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.
Files changed (172) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +45 -18
  3. package/README.zh-CN.md +39 -18
  4. package/dist/commands/model-command-handlers.d.ts.map +1 -1
  5. package/dist/commands/model-command-handlers.js +59 -14
  6. package/dist/commands/model-command-handlers.js.map +1 -1
  7. package/dist/commands/types.d.ts +6 -0
  8. package/dist/commands/types.d.ts.map +1 -1
  9. package/dist/commands/types.js.map +1 -1
  10. package/dist/commands/workflow-command-handlers.d.ts +1 -1
  11. package/dist/commands/workflow-command-handlers.d.ts.map +1 -1
  12. package/dist/commands/workflow-command-handlers.js +42 -3
  13. package/dist/commands/workflow-command-handlers.js.map +1 -1
  14. package/dist/commands/workflow-commands.d.ts.map +1 -1
  15. package/dist/commands/workflow-commands.js +2 -2
  16. package/dist/commands/workflow-commands.js.map +1 -1
  17. package/dist/core/tool-artifacts.d.ts +2 -0
  18. package/dist/core/tool-artifacts.d.ts.map +1 -1
  19. package/dist/core/tool-artifacts.js +27 -1
  20. package/dist/core/tool-artifacts.js.map +1 -1
  21. package/dist/runtime/agent-runtime-controller.d.ts +16 -2
  22. package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
  23. package/dist/runtime/agent-runtime-controller.js +116 -8
  24. package/dist/runtime/agent-runtime-controller.js.map +1 -1
  25. package/dist/runtime/agent-runtime-protocol.d.ts +7 -0
  26. package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
  27. package/dist/runtime/agent-runtime-protocol.js.map +1 -1
  28. package/dist/runtime/agent-runtime-runner.d.ts +8 -0
  29. package/dist/runtime/agent-runtime-runner.d.ts.map +1 -1
  30. package/dist/runtime/durable-tool-receipt-reader.d.ts +32 -0
  31. package/dist/runtime/durable-tool-receipt-reader.d.ts.map +1 -0
  32. package/dist/runtime/durable-tool-receipt-reader.js +130 -0
  33. package/dist/runtime/durable-tool-receipt-reader.js.map +1 -0
  34. package/dist/runtime/legacy-thread-materializer.d.ts +14 -1
  35. package/dist/runtime/legacy-thread-materializer.d.ts.map +1 -1
  36. package/dist/runtime/legacy-thread-materializer.js +44 -5
  37. package/dist/runtime/legacy-thread-materializer.js.map +1 -1
  38. package/dist/runtime/orion-session-runner.d.ts +4 -0
  39. package/dist/runtime/orion-session-runner.d.ts.map +1 -1
  40. package/dist/runtime/orion-session-runner.js +15 -0
  41. package/dist/runtime/orion-session-runner.js.map +1 -1
  42. package/dist/runtime/plan-review.d.ts +38 -0
  43. package/dist/runtime/plan-review.d.ts.map +1 -0
  44. package/dist/runtime/plan-review.js +173 -0
  45. package/dist/runtime/plan-review.js.map +1 -0
  46. package/dist/runtime/product-bootstrap.d.ts.map +1 -1
  47. package/dist/runtime/product-bootstrap.js +28 -6
  48. package/dist/runtime/product-bootstrap.js.map +1 -1
  49. package/dist/runtime/product-orion-runtime.d.ts.map +1 -1
  50. package/dist/runtime/product-orion-runtime.js +14 -35
  51. package/dist/runtime/product-orion-runtime.js.map +1 -1
  52. package/dist/runtime/protocol/runtime-protocol-v1.d.ts +73 -0
  53. package/dist/runtime/protocol/runtime-protocol-v1.d.ts.map +1 -1
  54. package/dist/runtime/protocol/runtime-protocol-v1.js +37 -0
  55. package/dist/runtime/protocol/runtime-protocol-v1.js.map +1 -1
  56. package/dist/runtime/release-receipts.d.ts +8 -3
  57. package/dist/runtime/release-receipts.d.ts.map +1 -1
  58. package/dist/runtime/release-receipts.js +88 -4
  59. package/dist/runtime/release-receipts.js.map +1 -1
  60. package/dist/runtime/session-composer-control.d.ts +136 -0
  61. package/dist/runtime/session-composer-control.d.ts.map +1 -0
  62. package/dist/runtime/session-composer-control.js +532 -0
  63. package/dist/runtime/session-composer-control.js.map +1 -0
  64. package/dist/runtime/thread-event-store.d.ts +62 -9
  65. package/dist/runtime/thread-event-store.d.ts.map +1 -1
  66. package/dist/runtime/thread-event-store.js +363 -31
  67. package/dist/runtime/thread-event-store.js.map +1 -1
  68. package/dist/runtime/thread-projection.d.ts +17 -0
  69. package/dist/runtime/thread-projection.d.ts.map +1 -1
  70. package/dist/runtime/thread-projection.js +87 -0
  71. package/dist/runtime/thread-projection.js.map +1 -1
  72. package/dist/runtime/thread-session-index.d.ts +84 -0
  73. package/dist/runtime/thread-session-index.d.ts.map +1 -0
  74. package/dist/runtime/thread-session-index.js +503 -0
  75. package/dist/runtime/thread-session-index.js.map +1 -0
  76. package/dist/runtime/thread-session-view.d.ts +31 -13
  77. package/dist/runtime/thread-session-view.d.ts.map +1 -1
  78. package/dist/runtime/thread-session-view.js +116 -61
  79. package/dist/runtime/thread-session-view.js.map +1 -1
  80. package/dist/runtime/thread-ui-adapter.d.ts.map +1 -1
  81. package/dist/runtime/thread-ui-adapter.js +18 -58
  82. package/dist/runtime/thread-ui-adapter.js.map +1 -1
  83. package/dist/runtime/tool-detail-repository.d.ts.map +1 -1
  84. package/dist/runtime/tool-detail-repository.js +23 -19
  85. package/dist/runtime/tool-detail-repository.js.map +1 -1
  86. package/dist/runtime/tool-receipt-validator.d.ts +21 -0
  87. package/dist/runtime/tool-receipt-validator.d.ts.map +1 -0
  88. package/dist/runtime/tool-receipt-validator.js +157 -0
  89. package/dist/runtime/tool-receipt-validator.js.map +1 -0
  90. package/dist/runtime/ui-events.d.ts +6 -1
  91. package/dist/runtime/ui-events.d.ts.map +1 -1
  92. package/dist/runtime/ui-events.js.map +1 -1
  93. package/dist/services/redaction.d.ts +4 -0
  94. package/dist/services/redaction.d.ts.map +1 -1
  95. package/dist/services/redaction.js +63 -0
  96. package/dist/services/redaction.js.map +1 -1
  97. package/dist/services/session-index.d.ts +16 -0
  98. package/dist/services/session-index.d.ts.map +1 -1
  99. package/dist/services/session-index.js +45 -36
  100. package/dist/services/session-index.js.map +1 -1
  101. package/dist/services/session-storage.d.ts +36 -0
  102. package/dist/services/session-storage.d.ts.map +1 -1
  103. package/dist/services/session-storage.js +80 -7
  104. package/dist/services/session-storage.js.map +1 -1
  105. package/dist/services/workspace-registry.d.ts +42 -0
  106. package/dist/services/workspace-registry.d.ts.map +1 -0
  107. package/dist/services/workspace-registry.js +222 -0
  108. package/dist/services/workspace-registry.js.map +1 -0
  109. package/dist/web/errors.d.ts +6 -0
  110. package/dist/web/errors.d.ts.map +1 -0
  111. package/dist/web/errors.js +13 -0
  112. package/dist/web/errors.js.map +1 -0
  113. package/dist/web/event-hub.d.ts +4 -0
  114. package/dist/web/event-hub.d.ts.map +1 -1
  115. package/dist/web/event-hub.js +81 -11
  116. package/dist/web/event-hub.js.map +1 -1
  117. package/dist/web/file-read-service.d.ts +64 -0
  118. package/dist/web/file-read-service.d.ts.map +1 -0
  119. package/dist/web/file-read-service.js +409 -0
  120. package/dist/web/file-read-service.js.map +1 -0
  121. package/dist/web/git-read-model-service.d.ts +85 -0
  122. package/dist/web/git-read-model-service.d.ts.map +1 -0
  123. package/dist/web/git-read-model-service.js +657 -0
  124. package/dist/web/git-read-model-service.js.map +1 -0
  125. package/dist/web/protocol.d.ts +205 -1
  126. package/dist/web/protocol.d.ts.map +1 -1
  127. package/dist/web/protocol.js +229 -1
  128. package/dist/web/protocol.js.map +1 -1
  129. package/dist/web/review-service.d.ts +38 -0
  130. package/dist/web/review-service.d.ts.map +1 -0
  131. package/dist/web/review-service.js +74 -0
  132. package/dist/web/review-service.js.map +1 -0
  133. package/dist/web/server.d.ts.map +1 -1
  134. package/dist/web/server.js +312 -29
  135. package/dist/web/server.js.map +1 -1
  136. package/dist/web/terminal-manager.d.ts +156 -0
  137. package/dist/web/terminal-manager.d.ts.map +1 -0
  138. package/dist/web/terminal-manager.js +760 -0
  139. package/dist/web/terminal-manager.js.map +1 -0
  140. package/dist/web/terminal-server.d.ts +8 -0
  141. package/dist/web/terminal-server.d.ts.map +1 -0
  142. package/dist/web/terminal-server.js +275 -0
  143. package/dist/web/terminal-server.js.map +1 -0
  144. package/dist/web/workbench-controller.d.ts +71 -18
  145. package/dist/web/workbench-controller.d.ts.map +1 -1
  146. package/dist/web/workbench-controller.js +1187 -178
  147. package/dist/web/workbench-controller.js.map +1 -1
  148. package/dist/web-client/assets/DiffViewer-eaQNsnCh.js +5 -0
  149. package/dist/web-client/assets/FilesPanel-DYs1MhoM.js +2 -0
  150. package/dist/web-client/assets/GitPanel-CnU4XVr7.js +1 -0
  151. package/dist/web-client/assets/ReviewPanel-BDxG670T.js +1 -0
  152. package/dist/web-client/assets/TerminalPanel-DLuoa74B.css +1 -0
  153. package/dist/web-client/assets/TerminalPanel-Q5mSSsoK.js +23 -0
  154. package/dist/web-client/assets/index-BWV5sIvw.css +1 -0
  155. package/dist/web-client/assets/index-VVUKj6FE.js +17 -0
  156. package/dist/web-client/index.html +2 -2
  157. package/docs/architecture/agent-mode-permission-contract.md +87 -0
  158. package/docs/architecture/v0.3.0-web-api.yaml +44 -13
  159. package/docs/architecture/v0.3.1-web-api.yaml +2338 -0
  160. package/docs/architecture/v0.3.2-web-api.yaml +3029 -0
  161. package/docs/migration/v0.3.0-to-v0.3.1.md +88 -0
  162. package/docs/migration/v0.3.1-to-v0.3.2.md +94 -0
  163. package/docs/plan/v0.3.0-web-workbench-plan.md +58 -7
  164. package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +848 -0
  165. package/docs/plan/v0.3.2-web-workbench-layout-and-composer-plan.md +869 -0
  166. package/docs/readme.md +20 -0
  167. package/docs/test/v0.3.1-web-workbench-e2e-plan.md +140 -0
  168. package/docs/test/v0.3.2-web-workbench-e2e-plan.md +100 -0
  169. package/npm-shrinkwrap.json +185 -354
  170. package/package.json +21 -4
  171. package/dist/web-client/assets/index-BAEO71Gp.css +0 -1
  172. package/dist/web-client/assets/index-DSkFy7gM.js +0 -13
@@ -7,8 +7,8 @@
7
7
  <meta name="theme-color" content="#0b0d12" />
8
8
  <meta name="description" content="Orion Code local Web Workbench" />
9
9
  <title>Orion Code</title>
10
- <script type="module" crossorigin src="/assets/index-DSkFy7gM.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-BAEO71Gp.css">
10
+ <script type="module" crossorigin src="/assets/index-VVUKj6FE.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-BWV5sIvw.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -0,0 +1,87 @@
1
+ # Agent Mode、Permission 与 Composer Control 合同
2
+
3
+ 本文冻结 Orion Code v0.3.2 的 Agent mode、Session permission、model/effort、Context 与
4
+ Plan review 边界。它是产品语义说明;wire contract 以
5
+ [`v0.3.2 OpenAPI`](v0.3.2-web-api.yaml)和 TypeScript discriminated union 为准。
6
+
7
+ ## 独立状态轴
8
+
9
+ | 状态轴 | 值 | 权威源 | 生效边界 |
10
+ | ---------- | ------------------------------------------ | ------------------------------ | --------------------------------- |
11
+ | Agent mode | `build` / `plan` / `auto` | active Session runtime | idle 时立即;active turn 后继请求 |
12
+ | Permission | project default / `ask` / `allow` / `deny` | Session composer preferences | 下一个 ToolGateway admission |
13
+ | Model | registry model id | Session metadata + coordinator | idle 时原子切换;busy 时延迟 |
14
+ | Effort | `auto` 或模型支持的 level | Session metadata | 与模型相同 |
15
+ | Context | usage/capacity/source/revision | Runtime projection | event/snapshot revision |
16
+
17
+ Mode 不授予 Authority。`auto` 只在已有 Authority 内减少交互确认;显式 deny、capability、policy、
18
+ sandbox 和 containment 优先。`allow` 需要用户风险确认,也不会跳过这些边界。
19
+
20
+ BUILD、PLAN、AUTO 使用同一个完整 Tool registry。Goal 是叠加在 base mode 上的目标生命周期,
21
+ 不会改变此授权合同。
22
+
23
+ ## 授权优先级
24
+
25
+ Tool authorization 按以下顺序解析:
26
+
27
+ 1. tool-owned hard denial 始终优先;
28
+ 2. 显式 project/machine/session `deny` 始终优先;
29
+ 3. AUTO 或 Session Allow 只批准剩余且已满足 Authority 的 invocation;
30
+ 4. 其余情况再应用 durable grant、工具专用 edit 规则和 interactive confirmation。
31
+
32
+ Workspace containment、OS sandbox、command safety、input validation 与 runtime capability guard
33
+ 在所有模式中都保持启用。AUTO 是 prompt-free,不是 policy-free。WebSearch/WebFetch、MCP 和
34
+ `subtask` research 也遵循相同规则;需要禁止网络时必须配置显式 capability/tool deny,不能依赖
35
+ PLAN 或 BUILD 名称暗示限制。
36
+
37
+ ## Source 与作用域
38
+
39
+ 权限必须同时展示 effective value、Session override、project default 和 source。清除 override
40
+ 恢复 project default,不写 global setting。模型与 Effort 属于当前 Session;Settings 中的
41
+ default model 只影响新 Session。页面不能把“当前 Session”与“全局默认”混为一谈。
42
+
43
+ ## 并发与失败
44
+
45
+ 所有 mutation 使用 UUID requestId,并绑定 active workspace/session/context 与 control revision。
46
+
47
+ - 同 requestId + 同 body 只执行一次;同 requestId + 不同 body 返回冲突;
48
+ - stale context/session/control/queue/plan revision 返回 409,且零 Runtime/provider/tool/file 副作用;
49
+ - active turn 中允许接受 deferred model/mode,但 UI 必须显示 pending;
50
+ - compact、metadata persist 或 runtime rebind 任一步失败时回滚到 last-good;
51
+ - 客户端不能在网络恢复、replay reset 或 409 后自动重放高风险 mutation。
52
+
53
+ ## Plan review
54
+
55
+ PLAN turn 只提交 durable PlanReceipt 并进入 `awaiting_review`。只有 exact plan digest 的:
56
+
57
+ - `approve`:durably resolve,然后创建独立 BUILD request;
58
+ - `continue`:携带非空 feedback,durably resolve,然后创建独立 PLAN request;
59
+ - `cancel`:durably cancel,不创建执行 request。
60
+
61
+ 刷新、SSE 重连和 Host restart 通过 Thread projection 恢复 review。corrupt/missing receipt、stale
62
+ digest 或 active turn 均 fail-closed。UI 不重算 Plan digest,也不把按钮点击本身当作 durable receipt。
63
+
64
+ ## Context 与结构化引用
65
+
66
+ Context usage 必须带 source (`provider` / `estimated`)、capacity、used、revision 与模型身份。
67
+ estimated 值显示 `~`;没有 Runtime breakdown 时浏览器不从 transcript 反推 system/tools/messages。
68
+
69
+ 结构化引用仅携带 opaque identity、revision 与 digest。Host 在 prompt assembly 时重新解析并验证:
70
+
71
+ - workspace containment 与 symlink/non-regular 边界;
72
+ - sensitive file deny 与 browser-safe derivative;
73
+ - stale revision/digest;
74
+ - 单引用 64KiB、总引用 256KiB;
75
+ - prompt manifest 与最终 request digest。
76
+
77
+ 任何失败都会阻止发送;原始敏感内容不得进入 DOM、SSE、截图或 release evidence。
78
+
79
+ ## 可观测性与兼容性
80
+
81
+ 每个已调度 Tool invocation 都投影 typed permission decision。durable receipt、trace 和 renderer-neutral
82
+ tool activity 必须携带 authorization source,例如 `mode_auto`、`allowlist_allow`、`config_allow` 或
83
+ `user`。TUI、terminal、print 与 Web 只显示 Runtime 已验证的 provenance,不从模式文案反推授权。
84
+
85
+ 本合同延续 v0.3.0 的兼容性决策:AUTO 允许 Authority 内的无人值守执行,但仍受 hard denial 与
86
+ 显式边界约束。未来如增加独立 network-policy 轴,必须作为新的 typed policy 出现,不能静默重载
87
+ workflow mode 或 Session permission。
@@ -36,7 +36,7 @@ paths:
36
36
  operationId: listWorkspaces
37
37
  description: Cursor-paged canonical workspaces known to the local Orion installation.
38
38
  parameters:
39
- - $ref: '#/components/parameters/PageCursor'
39
+ - $ref: '#/components/parameters/CollectionCursor'
40
40
  - $ref: '#/components/parameters/PageSize'
41
41
  responses:
42
42
  '200':
@@ -46,6 +46,7 @@ paths:
46
46
  schema:
47
47
  $ref: '#/components/schemas/WorkspacePage'
48
48
  '400': { $ref: '#/components/responses/Problem' }
49
+ '409': { $ref: '#/components/responses/Problem' }
49
50
  /workspaces/activate:
50
51
  post:
51
52
  operationId: activateWorkspace
@@ -72,7 +73,7 @@ paths:
72
73
  operationId: listSessions
73
74
  description: Cursor-paged sessions whose canonical project is the active workspace.
74
75
  parameters:
75
- - $ref: '#/components/parameters/PageCursor'
76
+ - $ref: '#/components/parameters/CollectionCursor'
76
77
  - $ref: '#/components/parameters/PageSize'
77
78
  responses:
78
79
  '200':
@@ -82,6 +83,7 @@ paths:
82
83
  schema:
83
84
  $ref: '#/components/schemas/SessionPage'
84
85
  '400': { $ref: '#/components/responses/Problem' }
86
+ '409': { $ref: '#/components/responses/Problem' }
85
87
  post:
86
88
  operationId: createSession
87
89
  security: [{ webNonce: [] }]
@@ -158,7 +160,7 @@ paths:
158
160
  loss and tab closure.
159
161
  parameters:
160
162
  - $ref: '#/components/parameters/SessionId'
161
- - $ref: '#/components/parameters/PageCursor'
163
+ - $ref: '#/components/parameters/TranscriptCursor'
162
164
  - $ref: '#/components/parameters/PageSize'
163
165
  responses:
164
166
  '200':
@@ -179,7 +181,7 @@ paths:
179
181
  workspace/project-scoped and must not be presented as proof that an artifact belongs to a
180
182
  particular session.
181
183
  parameters:
182
- - $ref: '#/components/parameters/PageCursor'
184
+ - $ref: '#/components/parameters/CollectionCursor'
183
185
  - $ref: '#/components/parameters/PageSize'
184
186
  responses:
185
187
  '200':
@@ -190,13 +192,16 @@ paths:
190
192
  $ref: '#/components/schemas/ToolDetailSummaryPage'
191
193
  '400': { $ref: '#/components/responses/Problem' }
192
194
  '404': { $ref: '#/components/responses/Problem' }
195
+ '409': { $ref: '#/components/responses/Problem' }
193
196
  /tool-details/{callId}:
194
197
  get:
195
198
  operationId: getToolDetail
196
199
  description: >-
197
- Byte-paged redacted tool output resolved only from the active workspace's artifact list.
198
- The current artifact metadata cannot prove session ownership; the host returns no artifact
199
- filesystem path and makes no session-attribution claim.
200
+ Byte-paged output from a pre-sanitized derivative resolved only from the active workspace's
201
+ artifact list. `offsetBytes` addresses derivative bytes, never raw tool-output bytes, so a
202
+ caller cannot bypass redaction by choosing a sensitive-field boundary. The current artifact
203
+ metadata cannot prove session ownership; the host returns no artifact filesystem path and
204
+ makes no session-attribution claim.
200
205
  parameters:
201
206
  - $ref: '#/components/parameters/CallId'
202
207
  - $ref: '#/components/parameters/OffsetBytes'
@@ -217,7 +222,7 @@ paths:
217
222
  Cursor-paged safe Skill descriptors. Bodies, resource paths and trigger implementations are
218
223
  excluded.
219
224
  parameters:
220
- - $ref: '#/components/parameters/PageCursor'
225
+ - $ref: '#/components/parameters/CollectionCursor'
221
226
  - $ref: '#/components/parameters/PageSize'
222
227
  responses:
223
228
  '200':
@@ -227,6 +232,7 @@ paths:
227
232
  schema:
228
233
  $ref: '#/components/schemas/SkillPage'
229
234
  '400': { $ref: '#/components/responses/Problem' }
235
+ '409': { $ref: '#/components/responses/Problem' }
230
236
  /mcp:
231
237
  get:
232
238
  operationId: listMcpServers
@@ -234,7 +240,7 @@ paths:
234
240
  Cursor-paged safe MCP catalog/runtime summaries. Commands, endpoints, headers and
235
241
  credentials are excluded and this read never activates a dormant server.
236
242
  parameters:
237
- - $ref: '#/components/parameters/PageCursor'
243
+ - $ref: '#/components/parameters/CollectionCursor'
238
244
  - $ref: '#/components/parameters/PageSize'
239
245
  responses:
240
246
  '200':
@@ -244,6 +250,7 @@ paths:
244
250
  schema:
245
251
  $ref: '#/components/schemas/McpPage'
246
252
  '400': { $ref: '#/components/responses/Problem' }
253
+ '409': { $ref: '#/components/responses/Problem' }
247
254
  /commands:
248
255
  post:
249
256
  operationId: dispatchCommand
@@ -391,11 +398,24 @@ components:
391
398
  Opaque identifier returned by the active workspace's tool-detail summary. The current file
392
399
  repository aliases callId to its project artifact identifier.
393
400
  schema: { type: string, minLength: 1, maxLength: 256 }
394
- PageCursor:
401
+ CollectionCursor:
402
+ in: query
403
+ name: cursor
404
+ required: false
405
+ description: >-
406
+ Opaque continuation returned by the preceding page. It binds the route scope, the complete
407
+ ordered collection revision and the last stable item key. Any insertion, deletion or
408
+ reorder makes it stale; the Host returns 409 collection_cursor_stale and the client restarts
409
+ from the first page.
410
+ schema: { type: string, minLength: 1, maxLength: 512 }
411
+ TranscriptCursor:
395
412
  in: query
396
413
  name: cursor
397
414
  required: false
398
- description: Opaque collection cursor returned by the preceding page.
415
+ description: >-
416
+ Opaque backward-page continuation bound to the Session's Thread identity, immutable
417
+ transcript-manifest revision and page boundary. A newer Thread revision returns 409
418
+ transcript_cursor_stale; the client must recover a fresh tail snapshot before paging again.
399
419
  schema: { type: string, minLength: 1, maxLength: 512 }
400
420
  PageSize:
401
421
  in: query
@@ -817,7 +837,11 @@ components:
817
837
  minimum: 0
818
838
  description: Omitted or null when the page reaches the end of the artifact.
819
839
  totalBytes: { type: integer, minimum: 0 }
820
- redacted: { type: boolean }
840
+ redacted:
841
+ type: boolean
842
+ description: >-
843
+ True when content is served from the browser-safe, pre-sanitized derivative. It does
844
+ not imply that this particular page contained a secret replacement.
821
845
  SettingsRevision:
822
846
  type: string
823
847
  pattern: '^hmac-sha256:[a-f0-9]{64}$'
@@ -1091,7 +1115,7 @@ components:
1091
1115
  WebCommand:
1092
1116
  type: object
1093
1117
  additionalProperties: false
1094
- required: [requestId, type]
1118
+ required: [requestId, expectedSessionId, type]
1095
1119
  allOf:
1096
1120
  - if:
1097
1121
  properties:
@@ -1101,6 +1125,13 @@ components:
1101
1125
  required: [agentMode]
1102
1126
  properties:
1103
1127
  requestId: { $ref: '#/components/schemas/RequestId' }
1128
+ expectedSessionId:
1129
+ type: string
1130
+ minLength: 1
1131
+ maxLength: 256
1132
+ description: >-
1133
+ Compare-and-swap guard for the active Session. The Host returns 409
1134
+ active_session_changed without dispatching when the selection no longer matches.
1104
1135
  type:
1105
1136
  type: string
1106
1137
  enum: