@sema-agent/sdk 41.1.1 → 43.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +155 -2
  2. package/dist/bitless-surfaces.d.ts +18 -2
  3. package/dist/bitless-surfaces.d.ts.map +1 -1
  4. package/dist/bitless-surfaces.js +27 -5
  5. package/dist/bitless-surfaces.js.map +1 -1
  6. package/dist/client.d.ts +14 -11
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +5 -5
  9. package/dist/client.js.map +1 -1
  10. package/dist/errors.d.ts +61 -10
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +68 -19
  13. package/dist/errors.js.map +1 -1
  14. package/dist/events.d.ts +230 -18
  15. package/dist/events.d.ts.map +1 -1
  16. package/dist/events.js +6 -0
  17. package/dist/events.js.map +1 -1
  18. package/dist/health.d.ts +9 -2
  19. package/dist/health.d.ts.map +1 -1
  20. package/dist/health.js +15 -3
  21. package/dist/health.js.map +1 -1
  22. package/dist/index.d.ts +11 -5
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +4 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/model-route-env/index.d.ts +2 -2
  27. package/dist/model-route-env/index.js +1 -1
  28. package/dist/model-route-env/index.js.map +1 -1
  29. package/dist/registry-conflict.d.ts +23 -2
  30. package/dist/registry-conflict.d.ts.map +1 -1
  31. package/dist/registry-conflict.js +37 -6
  32. package/dist/registry-conflict.js.map +1 -1
  33. package/dist/resources/adoption.d.ts +2 -4
  34. package/dist/resources/adoption.d.ts.map +1 -1
  35. package/dist/resources/adoption.js +30 -1
  36. package/dist/resources/adoption.js.map +1 -1
  37. package/dist/resources/approvals.d.ts +24 -11
  38. package/dist/resources/approvals.d.ts.map +1 -1
  39. package/dist/resources/approvals.js +19 -4
  40. package/dist/resources/approvals.js.map +1 -1
  41. package/dist/resources/assistant.d.ts +3 -5
  42. package/dist/resources/assistant.d.ts.map +1 -1
  43. package/dist/resources/assistant.js +23 -2
  44. package/dist/resources/assistant.js.map +1 -1
  45. package/dist/resources/attachments.d.ts +2 -4
  46. package/dist/resources/attachments.d.ts.map +1 -1
  47. package/dist/resources/attachments.js +27 -1
  48. package/dist/resources/attachments.js.map +1 -1
  49. package/dist/resources/control/auth-providers.d.ts +2 -4
  50. package/dist/resources/control/auth-providers.d.ts.map +1 -1
  51. package/dist/resources/control/auth-providers.js +13 -1
  52. package/dist/resources/control/auth-providers.js.map +1 -1
  53. package/dist/resources/control/config.d.ts +5 -12
  54. package/dist/resources/control/config.d.ts.map +1 -1
  55. package/dist/resources/control/config.js +13 -4
  56. package/dist/resources/control/config.js.map +1 -1
  57. package/dist/resources/control/fleet.d.ts +6 -16
  58. package/dist/resources/control/fleet.d.ts.map +1 -1
  59. package/dist/resources/control/fleet.js +13 -5
  60. package/dist/resources/control/fleet.js.map +1 -1
  61. package/dist/resources/control/images.d.ts +4 -10
  62. package/dist/resources/control/images.d.ts.map +1 -1
  63. package/dist/resources/control/images.js +14 -3
  64. package/dist/resources/control/images.js.map +1 -1
  65. package/dist/resources/control/publish.d.ts +2 -4
  66. package/dist/resources/control/publish.d.ts.map +1 -1
  67. package/dist/resources/control/publish.js +8 -1
  68. package/dist/resources/control/publish.js.map +1 -1
  69. package/dist/resources/control/secrets.d.ts +3 -6
  70. package/dist/resources/control/secrets.d.ts.map +1 -1
  71. package/dist/resources/control/secrets.js +16 -2
  72. package/dist/resources/control/secrets.js.map +1 -1
  73. package/dist/resources/control/users.d.ts +2 -4
  74. package/dist/resources/control/users.d.ts.map +1 -1
  75. package/dist/resources/control/users.js +12 -1
  76. package/dist/resources/control/users.js.map +1 -1
  77. package/dist/resources/control/versioning.d.ts +3 -6
  78. package/dist/resources/control/versioning.d.ts.map +1 -1
  79. package/dist/resources/control/versioning.js +10 -2
  80. package/dist/resources/control/versioning.js.map +1 -1
  81. package/dist/resources/control/workers.d.ts +2 -4
  82. package/dist/resources/control/workers.d.ts.map +1 -1
  83. package/dist/resources/control/workers.js +9 -1
  84. package/dist/resources/control/workers.js.map +1 -1
  85. package/dist/resources/devices.d.ts +2 -4
  86. package/dist/resources/devices.d.ts.map +1 -1
  87. package/dist/resources/devices.js +59 -1
  88. package/dist/resources/devices.js.map +1 -1
  89. package/dist/resources/fleet.d.ts +5 -4
  90. package/dist/resources/fleet.d.ts.map +1 -1
  91. package/dist/resources/fleet.js +2 -1
  92. package/dist/resources/fleet.js.map +1 -1
  93. package/dist/resources/images.d.ts +5 -12
  94. package/dist/resources/images.d.ts.map +1 -1
  95. package/dist/resources/images.js +13 -4
  96. package/dist/resources/images.js.map +1 -1
  97. package/dist/resources/leader.d.ts +3 -7
  98. package/dist/resources/leader.d.ts.map +1 -1
  99. package/dist/resources/leader.js +9 -2
  100. package/dist/resources/leader.js.map +1 -1
  101. package/dist/resources/memory.d.ts +3 -7
  102. package/dist/resources/memory.d.ts.map +1 -1
  103. package/dist/resources/memory.js +32 -4
  104. package/dist/resources/memory.js.map +1 -1
  105. package/dist/resources/models.d.ts +4 -5
  106. package/dist/resources/models.d.ts.map +1 -1
  107. package/dist/resources/models.js +13 -2
  108. package/dist/resources/models.js.map +1 -1
  109. package/dist/resources/ops.d.ts +8 -20
  110. package/dist/resources/ops.d.ts.map +1 -1
  111. package/dist/resources/ops.js +16 -7
  112. package/dist/resources/ops.js.map +1 -1
  113. package/dist/resources/policy.d.ts +2 -4
  114. package/dist/resources/policy.d.ts.map +1 -1
  115. package/dist/resources/policy.js +9 -1
  116. package/dist/resources/policy.js.map +1 -1
  117. package/dist/resources/projects.d.ts +3 -6
  118. package/dist/resources/projects.d.ts.map +1 -1
  119. package/dist/resources/projects.js +8 -2
  120. package/dist/resources/projects.js.map +1 -1
  121. package/dist/resources/rules.d.ts +2 -4
  122. package/dist/resources/rules.d.ts.map +1 -1
  123. package/dist/resources/rules.js +67 -1
  124. package/dist/resources/rules.js.map +1 -1
  125. package/dist/resources/runs.d.ts +9 -12
  126. package/dist/resources/runs.d.ts.map +1 -1
  127. package/dist/resources/runs.js +12 -7
  128. package/dist/resources/runs.js.map +1 -1
  129. package/dist/resources/session-sync.d.ts +6 -11
  130. package/dist/resources/session-sync.d.ts.map +1 -1
  131. package/dist/resources/session-sync.js +45 -4
  132. package/dist/resources/session-sync.js.map +1 -1
  133. package/dist/resources/sessions.d.ts +42 -39
  134. package/dist/resources/sessions.d.ts.map +1 -1
  135. package/dist/resources/sessions.js +47 -15
  136. package/dist/resources/sessions.js.map +1 -1
  137. package/dist/resources/tasks.d.ts +5 -2
  138. package/dist/resources/tasks.d.ts.map +1 -1
  139. package/dist/resources/tasks.js +5 -2
  140. package/dist/resources/tasks.js.map +1 -1
  141. package/dist/resources/tool-approvals.d.ts +25 -17
  142. package/dist/resources/tool-approvals.d.ts.map +1 -1
  143. package/dist/resources/tool-approvals.js +22 -1
  144. package/dist/resources/tool-approvals.js.map +1 -1
  145. package/dist/resources/trace.d.ts +6 -12
  146. package/dist/resources/trace.d.ts.map +1 -1
  147. package/dist/resources/trace.js +9 -5
  148. package/dist/resources/trace.js.map +1 -1
  149. package/dist/resources/usage.d.ts +9 -12
  150. package/dist/resources/usage.d.ts.map +1 -1
  151. package/dist/resources/usage.js +13 -4
  152. package/dist/resources/usage.js.map +1 -1
  153. package/dist/resources/workflows.d.ts +7 -10
  154. package/dist/resources/workflows.d.ts.map +1 -1
  155. package/dist/resources/workflows.js +13 -3
  156. package/dist/resources/workflows.js.map +1 -1
  157. package/dist/settings.d.ts +8 -0
  158. package/dist/settings.d.ts.map +1 -1
  159. package/dist/sse.d.ts +2 -0
  160. package/dist/sse.d.ts.map +1 -1
  161. package/dist/sse.js +2 -1
  162. package/dist/sse.js.map +1 -1
  163. package/dist/sync.d.ts +16 -27
  164. package/dist/sync.d.ts.map +1 -1
  165. package/dist/sync.js +40 -44
  166. package/dist/sync.js.map +1 -1
  167. package/dist/transport.d.ts +34 -2
  168. package/dist/transport.d.ts.map +1 -1
  169. package/dist/transport.js +26 -9
  170. package/dist/transport.js.map +1 -1
  171. package/dist/types.d.ts +415 -37
  172. package/dist/types.d.ts.map +1 -1
  173. package/dist/types.js +37 -1
  174. package/dist/types.js.map +1 -1
  175. package/openapi.yaml +770 -69
  176. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -1362,6 +1362,9 @@ paths:
1362
1362
  application/json:
1363
1363
  schema:
1364
1364
  type: object
1365
+ # server >= 7.153.0 (BREAKING): the body is CLOSED `{ instructions? }` — a non-object body (array / scalar) => 400 `request.invalid_json` + `reason: "not_object"`;
1366
+ # a key outside the set => 400 `request.body_shape` + `unknownKeys` (<= 7.152.x: an array body was taken as empty and unknown keys were silently ignored).
1367
+ additionalProperties: false
1365
1368
  properties:
1366
1369
  instructions: { type: string, minLength: 1, description: 'Targeted compaction directive; ≤2048 code points (engine cap, enforced fail-loud).' }
1367
1370
  responses:
@@ -1376,10 +1379,20 @@ paths:
1376
1379
  '401': { $ref: '#/components/responses/Unauthorized' }
1377
1380
  '404': { $ref: '#/components/responses/NotFound' }
1378
1381
  '409':
1379
- description: 'errorCode "compact.not_running" — run is terminal, or active on another replica (manual compact is replica-local).'
1382
+ description: >-
1383
+ errorCode `compact.not_running` — this replica has no live manual-compact face for the run (manual compact is replica-local). server >= 7.153.0 the body root carries a machine key `cause`, a CLOSED four-word set,
1384
+ always present: `run_terminal` (the run has ended, or the engine said so on its first beat) · `run_parked` (the run waits on an approval / review / resource gate) · `run_on_other_replica` (the row PROVES it lives on another
1385
+ replica) · `run_not_steerable` (read as running, no steerable face on this replica, and it cannot be proven elsewhere — e.g. this replica's own verify / cascade leg). The two first-beat shapes (the engine's
1386
+ synchronous `steering.not_running`, or a `mooted` settling in the same beat) used to answer `202`; they now answer this 409. `run_terminal` sentences end with a pointer to `POST /v1/sessions/{id}/compact`.
1387
+ <= 7.152.x: no `cause`; every `running` row not on this replica read as "active on another replica".
1380
1388
  content:
1381
1389
  application/json:
1382
- schema: { $ref: '#/components/schemas/ErrorResponse' }
1390
+ schema:
1391
+ allOf:
1392
+ - $ref: '#/components/schemas/ErrorResponse'
1393
+ - type: object
1394
+ properties:
1395
+ cause: { type: string, enum: [run_terminal, run_parked, run_on_other_replica, run_not_steerable] }
1383
1396
  '429': { $ref: '#/components/responses/RateLimited' } # (declared 2026-07-31) rateLimited||quotaExceeded||leaseDenied all gate this verb (routes/runs.ts)
1384
1397
  '501': { $ref: '#/components/responses/NotImplemented' }
1385
1398
 
@@ -1867,6 +1880,12 @@ paths:
1867
1880
  name: owner
1868
1881
  schema: { type: string }
1869
1882
  description: Fleet-wide credential only — scope the page to a tenant. Ignored for a principal caller.
1883
+ - in: query
1884
+ name: sessionKind
1885
+ required: false
1886
+ schema: { type: string, enum: [sidechain] }
1887
+ description: >-
1888
+ Server >= 7.151.0 (read `capabilities.sessionKinds`): `sidechain` selects the VIEW of client-placed sub-conversations; absent = the default view (top-level sessions only). A word outside the set => 400 `request.query_invalid`.
1870
1889
  - in: query
1871
1890
  name: q
1872
1891
  required: false
@@ -2717,22 +2736,7 @@ paths:
2717
2736
  # 🔴 请求体里的 `rules` 收闭(server >= 7.129.0:写口的判官拒一切不是桶的键,含退役命令桶 ⇒ 400 `rules.invalid_shape`)。
2718
2737
  # `SessionPermissionRules` 本体保持开放(响应 / 同步面的 `StoredSessionRules` 经 allOf 引它并再加 `rev` / `gen`,本体收闭会把合法的 `rev` 判成违约);
2719
2738
  # 所以收闭落在**这一个引用点**:allOf + 本地镜像三桶 + `additionalProperties:false`(spec.test 的通用「封闭 allOf 必须镜像分支键」门看守镜像完整)。
2720
- rules:
2721
- allOf: [{ $ref: '#/components/schemas/SessionPermissionRules' }]
2722
- additionalProperties: false
2723
- properties:
2724
- toolAllow: { type: array, items: { type: string } }
2725
- toolDeny: { type: array, items: { type: string } }
2726
- allowDirs: { type: array, items: { type: string } }
2727
- # server >= 7.129.0 (engine 7.51.2): a stored body echoed back (GET → edit → PUT) may carry its `rev` and `grammar`;
2728
- # the engine reads the entries in THAT grammar (`rev` without `grammar` = grammar 0 ⇒ a rule-spelled allow entry
2729
- # answers `400 rules.inert_entry` reason `earlier_grammar`; the way out is to send the three buckets alone — the
2730
- # write judge stamps the current grammar). `grammar` newer than the engine's ⇒ `400 rules.invalid_shape`.
2731
- rev: { type: integer, minimum: 0 }
2732
- grammar: { type: integer, minimum: 0 }
2733
- # server >= 7.135.0 (engine 7.55.0): a stored body echoed back (GET → edit → PUT) may also carry its `operatorRules`; on THIS door the echoed part is ALWAYS ignored — the route reads the value through the write reader
2734
- # (its product carries no `rev`) and the store judges it again: over an existing row the STORED row's operator part is kept, over no row an empty stamped part is minted. Do not rely on an echo to move the operator line — send the new value without `operatorRules`.
2735
- operatorRules: { $ref: '#/components/schemas/SessionRulesOperatorPart' }
2739
+ rules: { $ref: '#/components/schemas/SessionRulesWrite' }
2736
2740
  expectedRev: { type: integer, minimum: 0, description: CAS — reject if the stored rev differs. }
2737
2741
  responses:
2738
2742
  '200':
@@ -3357,7 +3361,7 @@ paths:
3357
3361
  (`application/octet-stream`). 🔴 SCOPE BOUNDARY (the security boundary — a content-addressed blob is
3358
3362
  shared across sessions): the cloud serves a hash ONLY if THIS session's HISTORY GRAPH references it
3359
3363
  (some tracked file version's `blobHash` in its exportHistory envelope). A foreign / unreferenced hash
3360
- → 404 `not_found.blob`, never a blind read; a server whose file-history store has no blob faces
3364
+ → 404 `not_found.blob` (the sentence is the frozen text `blob not found`), never a blind read; a server whose file-history store has no blob faces
3361
3365
  (e.g. the local file backend) answers the SAME 404 shape (no oracle — "nothing servable" and "not
3362
3366
  referenced" are deliberately indistinguishable). 400 `request.id_invalid` on a non-64-hex hash.
3363
3367
  Owner-scoped (404). Replaces the retired snapshot-scoped PULL arm of servers <= 7.51 (below the support floor; sdk 26.0.0 deleted `getBlob` and its path).
@@ -4758,7 +4762,7 @@ paths:
4758
4762
  Gate order: 429 `limit.rate_exceeded` -> capability facts (501) -> id shape (400) -> session head (404) -> owner or explicit operator (a stranger and "no such session" answer byte-identical 404) -> corrupt archive (500) -> body (400)
4759
4763
  -> the one execution-start resolver (read-only mirror 409 `conflict.session_mirror` + `forkPath`; `conflict.fork_in_progress`; `conflict.session_id_retired`; `execution_lane.not_served` + `boundLane`) -> workspace root (host lane: 409
4760
4764
  `conflict.session_workspace_unknown`) -> `to` resolution (404 `rewind_files_to.unknown_event`) -> the durable claim (409 `conflict.session_active_run` with `activeTaskId`) -> the engine. Not billed.
4761
- Probe with the capability bits `sessionRewindFiles` / `sessionRewindFilesPreview`; an ABSENT bit = an older server (404 `not_found.route`). The SDK does not auto-retry (a POST with no idempotency key).
4765
+ Probe with the capability bits `sessionRewindFiles` / `sessionRewindFilesPreview` (and, for the body key `cwd`, `sessionRewindFilesCwd`); an ABSENT bit = an older server (404 `not_found.route`). The SDK does not auto-retry (a POST with no idempotency key).
4762
4766
  requestBody:
4763
4767
  required: true
4764
4768
  content:
@@ -4790,6 +4794,64 @@ paths:
4790
4794
  application/json:
4791
4795
  schema: { $ref: '#/components/schemas/ErrorResponse' }
4792
4796
  '501': { $ref: '#/components/responses/NotImplemented' }
4797
+ '503':
4798
+ description: >-
4799
+ server >= 7.153.0 — `rewind.restore_failed` (BREAKING; <= 7.152.x: a generic 500 `internal.error`): the file-history store answered `failed` during the restore, or the restore went half-way and this door has no
4800
+ partial-restore policy. The body root is `{ error, errorCode, permanence? }` (`permanence` = the store's retry judgement, `transient` / `terminal`, present only when the store judged; the body has no `detail`; the store's own
4801
+ code is in the engine's sentence). Files may already be partly rewritten (the ledger summary is in the sentence); re-sending the same request keeps converging (per-file idempotent). `terminal` => repair the store first.
4802
+ content:
4803
+ application/json:
4804
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4805
+ /v1/sessions/{sessionId}/compact:
4806
+ parameters:
4807
+ - $ref: '#/components/parameters/PrincipalHeader'
4808
+ - in: path
4809
+ name: sessionId
4810
+ required: true
4811
+ schema: { type: string }
4812
+ post:
4813
+ tags: [sessions]
4814
+ operationId: sessionsCompact
4815
+ x-status: live # server >= 7.153.0 (contract section 30). SDK sessions.compact().
4816
+ summary: Compact an IDLE session synchronously (no run holds it) — the `/compact` of a session that is not running.
4817
+ description: >
4818
+ server >= 7.153.0 (contract section 30; read `capabilities.sessionCompact` first — an ABSENT bit = an older server, 404 `not_found.route`) — synchronously summarises a session that NO run holds (the run-level door
4819
+ `POST /v1/runs/{taskId}/compact` stays the door for a run that is running: it compacts at the next turn boundary). The body is CLOSED (every key optional, `{}` is valid): `instructions` (non-empty, at most 2048 code
4820
+ points — the same judge as the run-level door), `model` / `compactionModel` (the submit body's fresh model judge: 400 `request.unknown_reference` + `available` / `request.model_unavailable` / `request.model_not_allowed`),
4821
+ `compaction: { clampTolerance? }` (a finite number in [0,1] else 400 `request.field_invalid`); any other key => 400 `request.body_shape` + `unknownKeys`. Gate order: billing gates (503) -> rate / quota / lease (429) ->
4822
+ capability fact (501) -> id shape (400) -> owner gate (surface `session.supervise`; an operator may override; a stranger and "no such session" answer byte-identical 404) -> store unreadable (500) -> body -> model ->
4823
+ the one execution-start resolver -> the durable claim (a run running or parked on a decision on ANY replica => 409 `conflict.session_active_run` with `activeTaskId` / `activeTaskStatus?`; the sentence points at
4824
+ `POST /v1/runs/<id>/compact` when running, or says answer the card first when parked) -> the engine's out-of-run compaction. 200 `{ outcome, events, usage? }`: the engine's `CompactOutcome` verbatim
4825
+ (`compacted` / `failed` / `mooted` / `noop` / `blocked` / `disabled`), the pass's frames in order (`compaction_started` then `compacted` or `compaction_outcome`, `trigger: "manual"`, the same `pass`), and the summary call's
4826
+ usage (present only when the pass made a model call). The summary commits ONLY onto the leaf it summarised: another writer moving the leaf during the summary call => `200 outcome: "failed"`, zero writes, the
4827
+ `compaction_outcome` frame carries `cause: "leaf_moved"` (the spend already happened). This door neither holds the claim nor creates a run row. The engine's refusals pass through the synchronous submit leg's code table:
4828
+ 409 `compact.session_busy` (transient: another leg of this replica's engine process holds the session lock) / 409 `compact.session_parked` (the session has a pending card; the sentence names its `checkpointId`) /
4829
+ 400 `compact.invalid_request` / 409 `config.unknown_role` / 404 `resume.session_not_found` (the occupant changed while the engine fetched the session); codes outside the table => 500. A connection closed before the
4830
+ response is written WITHDRAWS the call (`mooted`, zero writes; the summary spend may have happened): a front proxy's idle timeout for this door must not be shorter than one summary call. Not a submit; it reads no
4831
+ `Idempotency-Key`; the SDK does not auto-retry (resending is safe: just compacted with no new turn => `noop`).
4832
+ requestBody:
4833
+ required: false
4834
+ content:
4835
+ application/json:
4836
+ schema: { $ref: '#/components/schemas/SessionCompactRequest' }
4837
+ responses:
4838
+ '200':
4839
+ description: The pass settled (synchronous). `outcome` is the engine's verbatim word.
4840
+ content:
4841
+ application/json:
4842
+ schema: { $ref: '#/components/schemas/SessionCompactResult' }
4843
+ '400': { $ref: '#/components/responses/BadRequest' }
4844
+ '401': { $ref: '#/components/responses/Unauthorized' }
4845
+ '404': { $ref: '#/components/responses/NotFound' }
4846
+ '409':
4847
+ description: >-
4848
+ Told apart by `errorCode`: `conflict.session_active_run` (body `activeTaskId` + `activeTaskStatus?` — a run holds the session or is parked on a decision), `compact.session_busy` (transient), `compact.session_parked`,
4849
+ `config.unknown_role`, plus the shared execution-start refusals (`conflict.session_mirror` + `forkPath`, `conflict.fork_in_progress`, `conflict.session_id_retired`, `execution_lane.not_served` + `boundLane`).
4850
+ content:
4851
+ application/json:
4852
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4853
+ '429': { $ref: '#/components/responses/RateLimited' }
4854
+ '501': { $ref: '#/components/responses/NotImplemented' }
4793
4855
  /v1/models:
4794
4856
  parameters:
4795
4857
  - $ref: '#/components/parameters/PrincipalHeader'
@@ -5092,7 +5154,14 @@ paths:
5092
5154
  properties:
5093
5155
  workflows:
5094
5156
  type: array
5095
- items: { $ref: '#/components/schemas/WorkflowRunSummary' }
5157
+ # 🔴 server >= 7.153.0 (BREAKING): each element is a UNION of two arms — the engine's readable summary, OR a row the engine could not read as stored (written by an older engine, or altered in storage):
5158
+ # exactly `{ id, unreadable: { errorCode } }` (`errorCode` = the engine's row-verdict code, today `workflow_run.row_malformed`; scope / member names / sentences never go on the wire).
5159
+ # The `?status=` filter reads the row's stored `status` as written (same => listed; different or unreadable => not listed). `GET /v1/workflows/{id}` on the same id answers the byte-identical 404
5160
+ # `not_found.workflow` as for a missing run. <= 7.152.x dropped such rows from the list (only an operator counter was kept).
5161
+ items:
5162
+ oneOf:
5163
+ - { $ref: '#/components/schemas/WorkflowRunSummary' }
5164
+ - { $ref: '#/components/schemas/WorkflowListUnreadableRow' }
5096
5165
  '401': { $ref: '#/components/responses/Unauthorized' }
5097
5166
  '501': { $ref: '#/components/responses/NotImplemented' }
5098
5167
 
@@ -7661,14 +7730,14 @@ components:
7661
7730
  type: string
7662
7731
  description: >
7663
7732
  Primary routing axis (one image serves many). Selects model/tools/skills/prompt. OPEN: a stock server's builtin
7664
- table is `code` (factory default) / `default` / `code-review` / `scan` (SDK `KNOWN_SCENARIOS`, checked against the
7733
+ table is `code` (factory default) / `default` / `code-review` / `scan` / `cowork` (SDK `KNOWN_SCENARIOS`, checked against the
7665
7734
  published server's `buildScenarios()` table; servers <= 7.125.x also listed `discuss`, retired with the whole team-orchestration surface at
7666
7735
  7.126.0, no alias) — and a deployment may register more through the registry. A name
7667
7736
  the caller SENDS that the deployment does not serve is a loud 400 `scenario_unknown` (server >= 5.1.0, the body
7668
7737
  carries the live vocabulary) — the silent fold to `default` exists only on the server-side ASSIGNMENT chain.
7669
7738
  Retired, no alias: `oa` (5.0.0), `autonomous` ([2400] CAPS-OPS-11), `team` (renamed `discuss`, server #273 / C-R14;
7670
7739
  alias withdrawn at #342).
7671
- examples: ['code', 'default', 'code-review', 'scan']
7740
+ examples: ['code', 'default', 'code-review', 'scan', 'cowork']
7672
7741
 
7673
7742
  ScenarioSource:
7674
7743
  type: string
@@ -8293,11 +8362,30 @@ components:
8293
8362
  `turnReminder` is absent), echoed on the stream as `steering_injected` with `source: "output_style"`. One fact, one seat: the
8294
8363
  style's BODY (the guide text) still goes in `settings.outputStyle`; this key carries only the name and the per-turn line.
8295
8364
  The value's owner is the engine (exactly these two keys, `name` non-empty and at most 256 characters, `turnReminder` a non-empty
8296
- string when present); the server does not judge it — a bad value is accepted and refused at prepare, the run ends `failed` with
8297
- code `config.output_style_invalid` (never silently ignored).
8365
+ string when present); the server does not judge it — a bad value is refused at prepare (never silently ignored). Server >= 7.153.0
8366
+ (BREAKING): the synchronous `POST /v1/tasks` leg refuses BEFORE the run starts — `400` + `{ error, errorCode: "config.output_style_invalid" }`
8367
+ (no run envelope, the submit idempotency key is not spent, zero model calls); <= 7.152.x it was `200` + a `failed` terminal with the same code.
8368
+ The streaming leg (`200` stream, terminal `done` frame) and the async leg (`202` + a terminal run row) keep their status and code.
8298
8369
  properties:
8299
8370
  name: { type: string, minLength: 1, maxLength: 256 }
8300
8371
  turnReminder: { type: string, minLength: 1 }
8372
+ wake:
8373
+ type: string
8374
+ description: >-
8375
+ Server >= 7.153.0 (send only when `capabilities.wake` is true; an older server answers 400 `request.body_shape`): the WAKE leg — a leg that carries no input of its own and
8376
+ opens on the task notifications parked for this session's occupant while it was idle (a background sub-agent / command / workflow finished). Handed verbatim to the engine
8377
+ (`TaskSpec.wake`); the closed word set is owned by the engine and not judged here — today the only word is `parked_notifications`. `objective` must be empty alongside it
8378
+ (the empty-objective gate only applies to bodies without `wake`); a word outside the engine's set, or `wake` with a non-empty `objective` / `images` / `userAttachments`, is refused
8379
+ before the run as `config.invalid_argument` (synchronous leg 400, the sentence names `TaskSpec.wake`); nothing parked when the leg opens ⇒ `config.nothing_to_wake` (synchronous leg 409,
8380
+ the idempotency key is not spent).
8381
+ language:
8382
+ type: string
8383
+ description: >-
8384
+ Server >= 7.153.0 (send only when `capabilities.language` is true; an older server answers 400 `request.body_shape`): the reply language the user set in the shell (free name or
8385
+ code, e.g. `Japanese` / `ja`), handed verbatim to the engine (`TaskSpec.language`), which states it to the model in its own `# Language` reminder (never in the system prompt). The ENGINE is
8386
+ the only judge of the value shape: not a string / blank / more than 256 characters (a JSON `null` is a non-string) ⇒ refused before the run as `config.language_invalid` (synchronous leg 400,
8387
+ streaming leg 200 + terminal `done`, async leg 202 + terminal run row, same code). Send it on EVERY submit: absent after having been stated makes the engine tell the model the
8388
+ preference was cleared.
8301
8389
  promptLean:
8302
8390
  type: boolean
8303
8391
  description: >
@@ -8474,7 +8562,16 @@ components:
8474
8562
  EXPLICIT `permissionDecision: "allow"` states it (and binds only the arguments the hook saw); a hook that only adds
8475
8563
  `additionalContext` / only rewrites `updatedInput` states nothing.
8476
8564
  additionalProperties: true
8477
- cwd: { type: string, description: Working directory for the execution env. }
8565
+ sessionKind:
8566
+ type: string
8567
+ enum: [sidechain]
8568
+ description: >-
8569
+ Server >= 7.151.0 (read `capabilities.sessionKinds` first): the KIND of the session this submission CREATES — `sidechain` = a client-placed sub-conversation: it is not listed by `GET /v1/sessions` unless asked for with `?sessionKind=sidechain`, and is deleted after the deployment's background-agent retention window of inactivity. Absent = a top-level conversation. Written ONCE when the session is created and never changes (a different kind on an existing session => 409 `conflict.session_kind_mismatch`, body `sessionKind` = the row's kind); a deployment whose session store cannot record the kind answers 501.
8570
+ cwd:
8571
+ type: string
8572
+ description: >-
8573
+ Working directory for the execution env. ABSENT IS LEGAL — never an error: the run still has a working directory (a run with zero tools is not a run without one). Where an absent `cwd` lands depends on
8574
+ the lane; on the local host lane it is a PER-TASK temporary directory. A present `cwd` is honoured only on the single-owner host and device lanes (a host path; cloud / multi-tenant lanes ignore it).
8478
8575
  deviceId:
8479
8576
  type: string
8480
8577
  description: >
@@ -8605,7 +8702,10 @@ components:
8605
8702
  hands, the engine's own tools, MCP / A2A, scenario and leg tools) ∩ `allowTools` − `excludeTools` (deny wins), computed by the engine once before the run starts.
8606
8703
  `["*"]` = no list at this layer (same as absent); `[]` = give nothing; an entry is a wire name or alias, `Tool(content)` (the whole tool), `mcp__srv` / `mcp__srv__*` /
8607
8704
  a tool-segment wildcard (`mcp__*` is rejected on this list). A leg's protocol tools (a delegated child's `ReportBlocked`, …) need no mention. A name that NO tool answers to
8608
- => `config.tool_face_control` (sync leg 400, no token burned; streamed / background legs: a `failed` terminal with the same code). Wrong shape (not a string array) =>
8705
+ => on server 7.126.0–7.128.x `config.tool_face_control` (sync leg 400, no token burned; streamed / background legs: a `failed` terminal with the same code); on server >= 7.129.0 the run goes as
8706
+ written (the entry is kept; an operator row `runner_config_advisory` announces it once); on server >= 7.132.0 a near-miss / retired-with-successor name is refused before the run (`config.tool_face_control`,
8707
+ sync leg 400). NOT body keys: `allowedTools` / `disallowedTools` are SKILL members (`skills[]`), never top-level submit keys — sending them top-level is `400 request.body_shape`; the three top-level keys that
8708
+ decide tool availability are `excludeTools`, `allowTools` and `excludeAllTools`. Wrong shape (not a string array) =>
8609
8709
  400 `request.field_invalid`, the same gate as `excludeTools` / `deferTools`. An engine older than 7.49.0 rejects loudly (400 `request.field_invalid` naming `allowTools`) —
8610
8710
  never silently dropped (dropping a narrowing key widens). No capability bit: probe by key closure (<= 7.125.x answers `400 request.body_shape` with the name in
8611
8711
  `unknownKeys`). The A2A inbound face (`message/send`) does not carry this key.
@@ -8783,7 +8883,9 @@ components:
8783
8883
  bypassBreaker: { type: boolean, description: 'Operator-only; silently dropped for non-operator callers.' }
8784
8884
  compaction:
8785
8885
  type: object
8786
- description: Compaction tuning for this task.
8886
+ description: >-
8887
+ Compaction tuning for this task. Server >= 7.153.0: `clampTolerance` outside the finite range [0, 1] is `400 request.field_invalid` on all three submit doors
8888
+ (the same judge as `POST /v1/sessions/{id}/compact`); before it was accepted and the key silently dropped at assembly.
8787
8889
  properties:
8788
8890
  clampTolerance: { type: number }
8789
8891
 
@@ -9010,7 +9112,7 @@ components:
9010
9112
  kind: { const: coded }
9011
9113
  detail:
9012
9114
  type: object
9013
- description: 'The thrown error''s `detail`: a JSON-plain snapshot (strings, finite numbers, booleans, null, arrays / plain objects of those; bounded). A member under a credential name stands as `"[redacted]"`; every string leaf passes the error-sentence redaction (credential shapes masked, paths kept).'
9115
+ description: 'The thrown error''s `detail`: a JSON-plain snapshot (strings, finite numbers, booleans, null, arrays / plain objects of those; bounded). A member under a credential name stands as `"[redacted]"` (from server 7.154.0: `"«redacted»"`, the one mark table of the engine); every string leaf passes the error-sentence redaction (credential shapes masked, paths kept).'
9014
9116
  additionalProperties: true
9015
9117
 
9016
9118
  TerminalModelOutputInvalidDetail:
@@ -9092,6 +9194,8 @@ components:
9092
9194
  description: >
9093
9195
  The pause's NON-SECRET stable identity — the display/correlation key to log or render where the
9094
9196
  token must not travel. Absent on pre-identity checkpoints.
9197
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
9198
+ planContentHash: { type: string, description: 'server >= 7.154.0 (engine 7.68.x; plan-review gate): the digest of the plan text SHOWN to the person at this pause (`textContentHashOf` of the `plan` string on the exit-plan-mode card the requesting call tool_end carried) — says what was shown, is NOT the gate identity, never read by a resume. ABSENT = nothing to compare (no plan card on that frame, a deployment-minted row, an earlier engine) — never "an empty plan".' }
9095
9199
  restoreMode:
9096
9200
  type: string
9097
9201
  enum: [snapshot, park_only]
@@ -9116,6 +9220,56 @@ components:
9116
9220
  cause (`terminal`), not the eight parallel plane keys — see `TerminalCause`.
9117
9221
  required: [taskId, sessionId, terminal, stats]
9118
9222
  properties:
9223
+ intake:
9224
+ oneOf:
9225
+ - type: object
9226
+ required: [committed, sessionId, entryId]
9227
+ additionalProperties: true
9228
+ properties: { committed: { const: true }, sessionId: { type: string }, entryId: { type: string } }
9229
+ - type: object
9230
+ required: [committed]
9231
+ additionalProperties: true
9232
+ properties: { committed: { const: false } }
9233
+ description: >-
9234
+ server >= 7.153.0 (engine 7.67.0): whether this run took its input (the prompt message) in. `{ committed: true, sessionId, entryId }` = the prompt message was committed (`entryId` is its session-entry id, the same batch as `message_committed.entryId`);
9235
+ `{ committed: false }` = it ended before the prompt message was committed (refused at the entrance / screened out / cancelled / a prepare failure; the terminal says why); ABSENT = not known (an older engine, a result rebuilt from a row alone, a
9236
+ host-assembled result) — NOT `committed: false`. NOT `stats.turns`: a first model call that fails still counts a turn.
9237
+ resultDisplayedBy:
9238
+ type: array
9239
+ items: { type: string }
9240
+ description: >-
9241
+ server >= 7.153.0 (engine 7.67.0): the registered names of the extensions whose `classic.MessageDisplay` answers changed what the stream showed of the answer (first-change order) — present means `result` is what the stream SHOWED, not the stored text.
9242
+ Names are the registrant strings (UNTRUSTED for display). ABSENT = no handler changed the display / a display did not reach its end / a leg that raises no display.
9243
+ turnAbortedBy:
9244
+ type: string
9245
+ description: >-
9246
+ server >= 7.153.0 (engine 7.67.0): the registered name of the extension whose `$.turn.abort` ended the run LAST model turn (present iff that cut was consumed as the final turn settlement; a queued follow-up or a `classic.Stop` block clears it).
9247
+ The run then reads `completed`, `result` = what the cut turn produced (possibly empty). UNTRUSTED for display.
9248
+ placementRoot:
9249
+ type: string
9250
+ description: 'server >= 7.153.0 (engine 7.67.x): the leg placement fixed point — the one placement root its prepare resolved (on a resume: the parked row recorded root). Present iff the prepare resolved it; absent on host stubs / synthetic composition terminals.'
9251
+ limitCrossed:
9252
+ type: object
9253
+ required: [axis, limit, observed]
9254
+ additionalProperties: true
9255
+ description: >-
9256
+ server >= 7.154.0 (engine 7.68.0): present exactly when the run COMPLETED strictly past a ceiling the caller declared (`limits`): nothing was cut, the verdict is `completed`, and this says the ceiling was crossed on the way.
9257
+ `limit` / `observed` share the axis unit (tokens / micro-USD / milliseconds). Branch on this member, never on the `task.completed_past_limit` notice sentence.
9258
+ properties:
9259
+ axis: { type: string, enum: [budget_tokens, budget_cost, walltime] }
9260
+ limit: { type: number }
9261
+ observed: { type: number }
9262
+ refusedAsks:
9263
+ type: array
9264
+ description: >-
9265
+ server >= 7.154.0 (engine 7.68.0): the asks of this run that nobody could answer and that were refused, one per refused call, in refusal order (the same facts as the `delegation.ask_unresolvable` notice); the terminal is unchanged.
9266
+ `toolName` / `remedy` pass the egress seat. present-iff at least one was refused — never empty.
9267
+ items: { $ref: '#/components/schemas/RefusedAsk' }
9268
+ effectiveReasoning:
9269
+ allOf: [{ $ref: '#/components/schemas/ResolvedReasoning' }]
9270
+ description: >-
9271
+ The run's reasoning-tier record (engine `ResolvedReasoning`, passed through verbatim on the sync `POST /v1/tasks` terminal body and the run row's `result`; `endpoint` passes the result text leaf table verbatim): what the request's thinking keys SAID on the wire.
9272
+ ABSENT = the engine did not say (distinct from "said, nothing degraded"). server >= 7.154.0: `effective` can also be `on` / `provider_default`, and `off` only says the wire carried a disable key.
9119
9273
  resultEntryIds:
9120
9274
  type: array
9121
9275
  items: { type: string }
@@ -9203,6 +9357,16 @@ components:
9203
9357
  type: array
9204
9358
  items: { type: string }
9205
9359
  description: The full fallback chain walked, when more than one hop occurred.
9360
+ skipped:
9361
+ type: array
9362
+ description: 'server >= 7.153.0 (engine 7.67.0): the chain hops the deployment Brain route judgment refused BEFORE sending, in chain order (`model`, and the refusal `code` when the judgment stated one); absent when none / on the budget path.'
9363
+ items:
9364
+ type: object
9365
+ required: [model]
9366
+ additionalProperties: true
9367
+ properties: { model: { type: string }, code: { type: string } }
9368
+ outcome: { type: string, enum: [served, exhausted], description: 'server >= 7.153.0: how the walk ended — a fallback hop answered (`to`) or the chain was exhausted (`to` is the last hop tried, not the model that answered). Absent on the budget path.' }
9369
+ answeredBy: { type: string, description: 'server >= 7.153.0: whose message the walked turn answer is — `to` when a hop served, `from` when the chain was exhausted. Absent on the budget path.' }
9206
9370
  atTurn: { type: integer }
9207
9371
  structuredOutput:
9208
9372
  description: >
@@ -10611,6 +10775,76 @@ components:
10611
10775
  server >= 7.137.0 (always true — a version fact, hangs on no facility): `POST /v1/assistant/tasks/{taskId}/plan_review` accepts the gate-identity key `checkpointId` (the gate you decided on
10612
10776
  changed => 409 `approval_stale`, nothing recorded). It answers "does this binary's gate accept the key", not "is plan_review usable on this deployment". Read the bit BEFORE sending the
10613
10777
  key: ABSENT = an older server (7.86.0-7.136.x answer the key with 400 `request.body_shape`; older ones drop it silently).
10778
+ wake:
10779
+ type: boolean
10780
+ description: >-
10781
+ server >= 7.153.0 (always true — a version fact): this build accepts the top-level submit key `wake` (the WAKE leg: opens on the task notifications parked for the session's idle occupant,
10782
+ carries no input of its own). Read it BEFORE sending the key: ABSENT = an older server (answers `400 request.body_shape`).
10783
+ From server 7.154.0 this bit reads the SAME fact as the engine capability word `task.wake` (both projected, same value) and is retired from the next server version on: read `task.wake`, fall back to this bit only when `task.wake` is absent (<= 7.153.x).
10784
+ language:
10785
+ type: boolean
10786
+ description: >-
10787
+ server >= 7.153.0 (always true — a version fact; single-user and multi-tenant answer alike, it is the requester's own preference and widens no gate): this build accepts the top-level
10788
+ submit key `language` (the reply language, handed verbatim to the engine). Read it BEFORE sending the key: ABSENT = an older server.
10789
+ resumeCursorNotice:
10790
+ type: boolean
10791
+ description: >-
10792
+ server >= 7.153.0 (always true — a version fact): the ledger read doors (`GET /v1/runs/{id}/events`, `GET /v1/tasks/{id}/stream`, `GET /v1/images/bakes/{id}/events`) tell the caller when a
10793
+ present `Last-Event-ID` / `?from=` cursor is not a finite number: the replay still starts at the ledger head, and the response carries the header `x-resume-cursor: unrecognized` plus one
10794
+ leading SSE comment line. ABSENT = an older server (silent replay from the head).
10795
+ lastWireBreakingVersion:
10796
+ type: string
10797
+ pattern: '^\d+\.\d+\.\d+$'
10798
+ description: >-
10799
+ server >= 7.153.0 (always present, no deployment or caller dependence): the MOST RECENT server version whose wire change list carried a hard-breaking row (full `x.y.z`). Compare by semver
10800
+ numeric order, never by string order: a value newer than the contract the client was checked against means this server has had an incompatible wire change since — tell the user, do not
10801
+ block. Wire face only (deployment-face breaks — stop-migrate-start, refuse-to-boot knobs — are not in it). ABSENT = a server <= 7.152.x: unknown.
10802
+ sessionRulesGrammar:
10803
+ type: integer
10804
+ minimum: 0
10805
+ description: >-
10806
+ server >= 7.153.0 (always present; a build fact — does not vary by session or caller): the session-rules grammar number of the engine this server links (7 on the 7.153.0 bytes).
10807
+ `PUT /v1/sessions/{id}/policy` must carry `rules.grammar` (absent => 400 `rules.grammar_required`): for the FIRST write (the session has no rules row yet) stamp this value; with a row,
10808
+ send the row's own `grammar` back. ABSENT = an older server: use the grammar number the caller itself chose (7.152.x and older accept a stamped body and read by the stamp).
10809
+ sessionCompact:
10810
+ type: boolean
10811
+ description: >-
10812
+ server >= 7.153.0: `POST /v1/sessions/{id}/compact` (the idle-session manual compaction door) is open = a session store with head reads AND a durable run store AND the engine's compaction
10813
+ commit compares-and-swaps on the summarised leaf (`DB_BACKEND=mysql|pg|local` always true, `memory` false). Reads the same fact as the door's 501 (`capability.session_store_required` /
10814
+ `capability.run_store_required` / `capability.unavailable`). ABSENT = an older server (the door is 404 `not_found.route`).
10815
+ sessionKinds:
10816
+ type: array
10817
+ items: { type: string, enum: [sidechain] }
10818
+ description: >-
10819
+ Server >= 7.151.0: the session kinds this deployment can RECORD (`["sidechain"]` where the session store records a session's kind and ages such sessions out — `DB_BACKEND=mysql|pg|local`; `[]` elsewhere,
10820
+ where `sessionKind` on a submit answers 501). ABSENT = an older server.
10821
+ sessionRewindFilesCwd:
10822
+ type: boolean
10823
+ description: >-
10824
+ server >= 7.153.0: the immediate rewind door `POST /v1/sessions/{id}/rewind-files` accepts the optional body key `cwd`. Reads the same fact as `sessionRewindFiles` (bit true => `sessionRewindFiles` true;
10825
+ false <=> the door is 501). It says "this server knows the key", not "this session's lane will use it" (single-owner host / device lanes honour it; ssh / adb take it and ignore it with one warn line).
10826
+ ABSENT (incl. <= 7.152.x) => do not send `cwd` (an older server answers 400 `request.body_shape`).
10827
+ user_attachments.read_state:
10828
+ type: boolean
10829
+ description: >-
10830
+ ENGINE CAPABILITY WORD (core `ENGINE_CAPABILITIES`' fourth word, core 7.67.0; server >= 7.153.0 projects it, always `true`; the key IS the word, dotted): this engine reads the read-state of request-layer
10831
+ attachments (`TaskRequest.userAttachments`). ABSENT = an older server / engine: read it as "not promised", not as "absent capability".
10832
+ checkpointIdMissing:
10833
+ type: boolean
10834
+ description: >-
10835
+ server >= 7.154.0 (always true — a version fact): the gate-identity faces answer `checkpointId` XOR `checkpointIdMissing` (`absent` / `untrusted`) — when a gate identity cannot be read the id key is absent and the same position carries the word.
10836
+ ABSENT = an older server (the key never appears; a missing `checkpointId` there only means an old row).
10837
+ task.wake:
10838
+ type: boolean
10839
+ description: >-
10840
+ ENGINE CAPABILITY WORD (core `ENGINE_CAPABILITIES`' fifth word; server >= 7.154.0 projects it; the key IS the word, dotted — read the whole string `caps["task.wake"]`): this build accepts the top-level submit key `wake`
10841
+ (a version fact, today always `true`). It reads the SAME fact as the older top-level bit `wake` (both projected in 7.154.0; the older one retires from the next server version on). ABSENT = server <= 7.153.x (only the older bit exists).
10842
+ file_history.recorded_place:
10843
+ type: boolean
10844
+ description: >-
10845
+ ENGINE CAPABILITY WORD (core `ENGINE_CAPABILITIES`' sixth word; server >= 7.154.0 projects it; the key IS the word, dotted): does this service accept the rewind input that says where versions with no recorded place were recorded
10846
+ (the engine's `unplacedHistoryRecordedUnder`)? ALWAYS `false` on 7.154.0 (the request face does not accept that input yet); a false bit only tells a shell not to send it — the per-file refusals (`recorded_elsewhere` / `place_unrecorded`)
10847
+ do not read this bit and happen regardless, and it is not the "is rewind usable" bit (that is `sessionRewindFiles`). ABSENT = an older server.
10614
10848
  credentialPlane:
10615
10849
  allOf: [{ $ref: '#/components/schemas/CredentialPlaneCapability' }]
10616
10850
  description: >-
@@ -10643,7 +10877,7 @@ components:
10643
10877
  sessionRewindFilesPreview:
10644
10878
  type: boolean
10645
10879
  description: >-
10646
- server >= 7.147.0: the previous bit ∧ the store implements `diffStats` (local files: true; the SQL twins: false today). False is NOT "dryRun refused": dryRun is accepted and answers `preview: null`. ABSENT = an older server.
10880
+ server >= 7.147.0: whether the preview carries stats. From server 7.154.0 this reads the SAME fact as `sessionRewindFiles` and `sessionRewindFilesCwd` (the preview is the engine's plan of the real restore on a view that performs no write); up to 7.153.x it was the previous bit ∧ the store implements `diffStats` (local files: true; the SQL twins: false). False is NOT "dryRun refused": dryRun is accepted and answers `preview: null`. ABSENT = an older server.
10647
10881
  adoptionImport:
10648
10882
  allOf: [{ $ref: '#/components/schemas/AdoptionImportCapability' }]
10649
10883
  description: >-
@@ -11228,6 +11462,7 @@ components:
11228
11462
  managedHookGroups: { type: boolean, description: 'server >= 7.133.0 — the request `settings.hooks[]` GROUP `source` key (managed lanes `managedPolicy` / `managedPlugin:<name>`) is accepted; same predicate as `hooks`. ABSENT or false = stripped silently (the managed-lane semantics do not apply, it is not a refusal).' }
11229
11463
  httpHookAllowlists: { type: boolean, description: 'server >= 7.142.0 — the request keys `settings.allowedHttpHookUrls` / `settings.httpHookAllowedEnvVars` (the settings-schema package''s two http-hook allowlists) are read and enforced at the dial-out point. The SAME predicate as `hooks` (true on the single-user lane; false where `settings.hooks` is ignored). ABSENT = server <= 7.141.x, which answers 400 `request.body_shape` for those keys — send only on sight of the bit.' }
11230
11464
  tightenOnlySeats: { type: boolean, description: 'server >= 7.133.0, constant true — the four tighten-only request seats `settings.readDenyPatterns` / `settings.writeProtectedExtra` / `settings.complianceAdditionalDenies` / `settings.permissions.neverAuto` are accepted (each seat = deployment table UNION request list, only ever growing; an empty array is the same as not sent). ABSENT = server <= 7.132.x, which answers 400 `request.body_shape` for those keys — send only on sight of the bit.' }
11465
+ runStreamHookFrames: { type: boolean, description: 'server >= 7.154.0 (config-dependent: the same predicate as `hooks`): the request key `settings.runStreamHookFrames` (`"failures"`, one word today) is honoured — a run that declares it sees the four `hook_notice` kinds on ITS OWN event stream (live stream + the run ledger replay); without the key a run stream carries none (the fleet stream is unchanged). ABSENT = an older server (answers 400 `request.body_shape`).' }
11231
11466
  approvalFrameFamilies: { type: boolean, description: 'server >= 7.134.0, constant true — the request key `settings.approvalFrameFamilies` (which approval opening-frame families this run''s client renders) is accepted. THIS is the trigger bit for that key, NOT the top-level `approvalFrameFamilies`: servers <= 7.133.x already carry the top-level bit yet answer 400 `request.body_shape` (`unknownKeys: ["settings.approvalFrameFamilies"]`) for the key. ABSENT = do not send it.' }
11232
11467
  settings:
11233
11468
  type: object
@@ -12055,7 +12290,7 @@ components:
12055
12290
  sends it (stdio and Streamable HTTP alike) — so a connector can keep state per (principal, session). Absent = nothing is sent. A delegated child is another session (its calls carry its own id; the engine does not guess a root);
12056
12291
  a dial with no leg (the library entrance, the no-run probe) sends nothing. The deployment legs (central config / local `config.d`) carry the key from server >= 7.139.0 on (before that the config reader stripped it with an unknown-key warning); a bad one keeps that whole server from mounting. The one judge is the engine's `judgeSessionMetaKey`: a non-empty string of at most 128 characters in the MCP `_meta` key-name format that names no `_meta` member
12057
12292
  of anyone else's — not the SDK's own `progressToken`, not a key under the engine's `sema/` namespace, not under a prefix MCP reserves. A bad key is `400 request.field_invalid` naming `mcpServers[i].sessionMetaKey` (new submit and
12058
- the probe door); server >= 7.139.0 the sentence does NOT echo the key you wrote (where it must refer to it, it reads `[redacted] (N characters)`; an over-long / empty / non-string key is refused by length or type without mentioning the key) — branch on the code and the named path. A server < 7.138.0 does not list the key among the accepted ones: by the entry-key law it answers
12293
+ the probe door); server >= 7.139.0 the sentence does NOT echo the key you wrote (where it must refer to it, it reads a redaction mark plus the code-point count — `[redacted] (N characters)` up to 7.153.x, `«redacted» (N characters)` from 7.154.0 (the engine's one mark table); an over-long / empty / non-string key is refused by length or type without mentioning the key) — branch on the code and the named path. A server < 7.138.0 does not list the key among the accepted ones: by the entry-key law it answers
12059
12294
  `400 request.body_shape` naming it in `unknownKeys` (derived from that law, not measured on the old bytes).
12060
12295
 
12061
12296
  A2aServerSpec:
@@ -13261,6 +13496,67 @@ components:
13261
13496
  properties:
13262
13497
  to: { type: string, minLength: 1, maxLength: 255, description: 'A rewind handle this server minted (a prompt''s taskId, or a message''s eventId) — the same handle space and the same reader as the submit body''s `rewindFilesTo`. Unknown => 404 `rewind_files_to.unknown_event`.' }
13263
13498
  dryRun: { type: boolean, description: 'true => preview only; no file is written. Absent = false.' }
13499
+ cwd:
13500
+ type: string
13501
+ minLength: 1
13502
+ description: >-
13503
+ server >= 7.153.0 (send only when `capabilities.sessionRewindFilesCwd` is true; an older server answers 400 `request.body_shape`): the caller's statement of the working directory THIS rewind lands in —
13504
+ the same judge as the submit body's `cwd` (bad shape => 400 `request.field_invalid`, sentence `cwd must be a non-empty absolute host path`); honoured on the single-owner host and device lanes, ignored
13505
+ (with one server warn line) elsewhere; it wins over the process-local registered cwd for this call and NEVER writes that registry; on the host lane the directory must exist (else 409
13506
+ `conflict.session_workspace_unknown`, no mkdir, `dryRun` judges the same). Absent => the registered cwd, as before.
13507
+
13508
+ SessionCompactRequest:
13509
+ type: object
13510
+ description: >-
13511
+ `POST /v1/sessions/{sessionId}/compact` body (server >= 7.153.0), CLOSED — every key optional, `{}` is valid. Any other key => 400 `request.body_shape` + `unknownKeys`.
13512
+ additionalProperties: false
13513
+ properties:
13514
+ instructions: { type: string, minLength: 1, description: 'Replaces the deployment''s compaction instructions for this pass; at most 2048 code points (the same judge as `POST /v1/runs/{taskId}/compact`).' }
13515
+ model: { type: string, description: 'A catalog name, tier word or id the caller may pick (the submit body''s model judge); absent => the deployment default.' }
13516
+ compactionModel: { type: string, description: 'The summary model (same judge and codes as `model`); absent => the deployment''s summarize role.' }
13517
+ compaction:
13518
+ type: object
13519
+ additionalProperties: false
13520
+ description: 'The submit body''s `compaction` object: only `clampTolerance` (a finite number in [0,1], else 400 `request.field_invalid`).'
13521
+ properties:
13522
+ clampTolerance: { type: number, minimum: 0, maximum: 1 }
13523
+
13524
+ SessionCompactUsage:
13525
+ type: object
13526
+ description: >-
13527
+ The summary call's usage, the engine's keys verbatim, EACH PRESENT ONLY WHEN SET. `unpriced` present => `costMicroUsd` is not an amount.
13528
+ additionalProperties: false
13529
+ properties:
13530
+ tokens: { type: integer, minimum: 0 }
13531
+ totalInputTokens: { type: integer, minimum: 0 }
13532
+ promptTokens: { type: integer, minimum: 0 }
13533
+ cachedTokens: { type: integer, minimum: 0 }
13534
+ cacheWriteTokens: { type: integer, minimum: 0 }
13535
+ outputTokens: { type: integer, minimum: 0 }
13536
+ costMicroUsd: { type: number }
13537
+ usageMissing: { type: boolean, enum: [true], description: 'A reply reported no usage (a lower bound); always the literal `true`, never `false`.' }
13538
+ unpriced: { type: boolean, enum: [true], description: 'A call ran on a model with no price entry, so `costMicroUsd` is not an amount; always the literal `true`, never `false`.' }
13539
+
13540
+ SessionCompactResult:
13541
+ type: object
13542
+ description: >-
13543
+ `POST /v1/sessions/{sessionId}/compact` 200 body (server >= 7.153.0). Synchronous: the engine's out-of-run compaction has fully settled. A pass whose commit loses the compare-and-swap on the summarised leaf is
13544
+ `outcome: "failed"` with zero writes (the `compaction_outcome` frame carries `cause: "leaf_moved"`).
13545
+ additionalProperties: false
13546
+ required: [outcome, events]
13547
+ properties:
13548
+ outcome: { type: string, enum: [compacted, failed, mooted, noop, blocked, disabled], description: 'The engine''s `CompactOutcome`, verbatim.' }
13549
+ events:
13550
+ type: array
13551
+ description: >-
13552
+ The pass's frames in order, each the run stream's projection of the same frame (`compaction_started` then `compacted` or `compaction_outcome`, `trigger: "manual"`, the same `pass`); `[]` when the call was withdrawn
13553
+ before the pass ran.
13554
+ items:
13555
+ oneOf:
13556
+ - $ref: '#/components/schemas/Event_compaction_started'
13557
+ - $ref: '#/components/schemas/Event_compacted'
13558
+ - $ref: '#/components/schemas/Event_compaction_outcome'
13559
+ usage: { $ref: '#/components/schemas/SessionCompactUsage' }
13264
13560
 
13265
13561
  SessionRewindFilesDiffStats:
13266
13562
  type: object
@@ -13271,6 +13567,38 @@ components:
13271
13567
  filesChanged: { type: array, items: { type: string } }
13272
13568
  insertions: { type: integer, minimum: 0 }
13273
13569
  deletions: { type: integer, minimum: 0 }
13570
+ files:
13571
+ type: array
13572
+ items: { $ref: '#/components/schemas/SessionRewindFileRow' }
13573
+ description: >-
13574
+ server >= 7.154.0: one row per file the rewind would change or refuse. A preview carries only these four keys (no `refused` / `failed` column): a refused file appears only as a refused row of `files`; an all-refused preview has an empty `filesChanged`,
13575
+ zero counts and `files` full of refused rows. The preview is the projection of the real restore's plan. ABSENT = an older server (or an engine that does not answer per-file facts) — not "nothing was refused".
13576
+
13577
+ SessionRewindFileRow:
13578
+ type: object
13579
+ description: >-
13580
+ server >= 7.154.0 — one file of a rewind (engine `FileHistoryRewindFile`; path and reason leaves pass the egress seat). `path` is the key the history records the file under; `targetPath` is the absolute path THIS rewind writes or deletes for it
13581
+ (on a refused row, where it would have landed). Files judged identical (`identicalSkipped`) are not rows; a failure before any write lands only in the ledger's `failed[]`; a write / delete that landed and then failed is a row carrying `failed`.
13582
+ additionalProperties: true
13583
+ required: [path, targetPath]
13584
+ properties:
13585
+ path: { type: string }
13586
+ targetPath: { type: string }
13587
+ action: { type: string, enum: [write, delete], description: 'What the rewind does at `targetPath`; on a refused row, what it would have done. ABSENT = the store did not say.' }
13588
+ refused:
13589
+ type: object
13590
+ additionalProperties: true
13591
+ required: [class, reason]
13592
+ properties:
13593
+ class: { type: string, description: 'The same word as the ledger''s `refused[].class` (open set).' }
13594
+ reason: { type: string }
13595
+ recordedUnder: { type: string, description: 'On a `recorded_elsewhere` row: the directory the version was recorded under (go there to rewind it).' }
13596
+ failed:
13597
+ type: object
13598
+ additionalProperties: true
13599
+ required: [reason]
13600
+ properties:
13601
+ reason: { type: string }
13274
13602
 
13275
13603
  SessionRewindLedger:
13276
13604
  type: object
@@ -13292,7 +13620,9 @@ components:
13292
13620
  properties:
13293
13621
  path: { type: string }
13294
13622
  reason: { type: string }
13295
- class: { type: string, description: 'The engine''s closed word (`link_safety` / `base_unavailable` / `key_unresolvable`); read as an open set.' }
13623
+ class: { type: string, description: 'The engine''s word (`link_safety` / `base_unavailable` / `key_unresolvable` / server >= 7.154.0 `recorded_elsewhere` / `place_unrecorded`); read as an open set.' }
13624
+ recordedUnder: { type: string, description: 'server >= 7.154.0, on a `recorded_elsewhere` row: the directory the version was recorded under (its absolute real path).' }
13625
+ action: { type: string, enum: [write, delete], description: 'server >= 7.154.0: what the rewind would have done at that file.' }
13296
13626
  failed:
13297
13627
  type: array
13298
13628
  items:
@@ -13303,6 +13633,10 @@ components:
13303
13633
  path: { type: string }
13304
13634
  reason: { type: string }
13305
13635
  modeNotPreserved: { type: integer, minimum: 0, description: 'Files whose recorded POSIX mode could not be re-applied (an environment without the optional mode face).' }
13636
+ files:
13637
+ type: array
13638
+ items: { $ref: '#/components/schemas/SessionRewindFileRow' }
13639
+ description: 'server >= 7.154.0: one row per changed or refused file (and per failed file whose write / delete landed); the per-file failure reason still reads from `failed[]`. ABSENT = an older server.'
13306
13640
  error: { $ref: '#/components/schemas/SessionRewindLedgerError' }
13307
13641
 
13308
13642
  SessionRewindLedgerError:
@@ -13711,6 +14045,22 @@ components:
13711
14045
  exhaustive — render an unknown future state generically).
13712
14046
  examples: [running, completed, failed]
13713
14047
 
14048
+ WorkflowListUnreadableRow:
14049
+ type: object
14050
+ description: >-
14051
+ server >= 7.153.0 — a row of `GET /v1/workflows` that the engine could not read as stored, listed instead of silently dropped. EXACTLY two keys. The marker is the same one a session-list row carries.
14052
+ Test `unreadable` BEFORE reading any summary key (`status` / `phaseCount` / `scope` ... are absent on this arm).
14053
+ additionalProperties: false
14054
+ required: [id, unreadable]
14055
+ properties:
14056
+ id: { type: string, description: 'The run id the row is filed under (the id `GET /v1/workflows/{id}` answers 404 `not_found.workflow` for).' }
14057
+ unreadable:
14058
+ type: object
14059
+ additionalProperties: false
14060
+ required: [errorCode]
14061
+ properties:
14062
+ errorCode: { type: string, description: 'The engine''s row-verdict code; `workflow_run.row_malformed` today (open set).' }
14063
+
13714
14064
  WorkflowRunSummary:
13715
14065
  type: object
13716
14066
  description: >
@@ -14286,6 +14636,7 @@ components:
14286
14636
  additionalProperties: true
14287
14637
  properties:
14288
14638
  id: { type: string, description: 'Stable identity (durable runId/taskId; subagent child = "<runId> <taskId>"). Update/remove by this.' }
14639
+ model: { type: string, description: 'server >= 7.148.0 (contract appendix H.3c): the model this row runs on (display-scrubbed free text; ABSENT = unknown, not "the default model"). The wire carried it before the SDK declared it.' }
14289
14640
  name: { type: string }
14290
14641
  description: { type: string }
14291
14642
  agentType: { type: string }
@@ -14808,6 +15159,14 @@ components:
14808
15159
  expiresAtMs: { type: number, description: 'Absolute window deadline — the SAME number minted once for the tool_approval frame (never recomputed).' }
14809
15160
  sessionId: { type: string }
14810
15161
  requiresRealApproval: { type: boolean, enum: [true] }
15162
+ deploymentListQuestion:
15163
+ type: boolean
15164
+ enum: [true]
15165
+ description: >-
15166
+ server >= 7.153.0: this card carries the DEPLOYMENT LIST's question (`APPROVAL_REQUIRE` / the centre-issued list) — told apart from a card the user's own ask rule asked (the two were same-shaped: source `ask_rule`, class `ask_rule`,
15167
+ `ruleOffersAbsence: "ask_rule_matched"`). True-only, never `false`. A list question => this bit `true` and `rememberRefused` absent ("this session" is remembered in the server's session exemption store); the user's own ask rule =>
15168
+ this bit absent and `rememberRefused: true`; both naming the same tool => one forced card with this bit `true`, `rememberRefused: true` and frame-level `mandated: true`. Live faces judge it when the question was ASKED (a later
15169
+ hot swap of the list changes nothing on a live card); parked faces judge it when READ (the list is read now). ABSENT = not a list question / a card minted before 7.153.0 / an older server. The inbox row does not carry it.
14811
15170
  rememberRefused:
14812
15171
  type: boolean
14813
15172
  enum: [true]
@@ -15035,6 +15394,7 @@ components:
15035
15394
  sessionId: { type: string, description: 'Resumed leg only — absent from the parked-agent receipt.' }
15036
15395
  decisionCommitted: { type: boolean, enum: [true], description: 'server >= 7.138.0 - SETTLEMENT EVIDENCE: `true` = the gate this request named was durably settled with THIS request''s decision (historical evidence, not the card''s current state). Always the literal `true`, never `false`. Absent = unprovable or deliberately omitted => read as "not committed" (fail-closed); do not infer it from the absence of `errorCode`. It coexists with `errorCode: cancelled` / `retriable: true`; `retriable: true` only says the run re-parked.' }
15037
15396
  checkpointId: { type: string, description: 'server >= 7.138.0 - only alongside `decisionCommitted`: the gate identity of the row selected before execution (same name and value as the operator queue / inbox row / park ledger row). Absent when the identity is unreadable or not applicable (an idempotent replay carries none); absence infers nothing.' }
15397
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
15038
15398
  status:
15039
15399
  type: string
15040
15400
  description: >
@@ -15116,6 +15476,8 @@ components:
15116
15476
  entry for that gate kind — sessionId-addressed; checkpoint tokens never appear on the wire).
15117
15477
  `governanceForced` = the ORIGIN.
15118
15478
  properties:
15479
+ checkpointId: { type: string, description: 'server >= 7.137.0 (same judge as the other gate-identity faces): the NON-SECRET stable identity of the gate that blocks the submit; ABSENT when no trusted value can be read — then `checkpointIdMissing` carries the word at the same position.' }
15480
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
15119
15481
  kind: { type: string }
15120
15482
  decidePath: { type: string }
15121
15483
  governanceForced:
@@ -15190,6 +15552,8 @@ components:
15190
15552
  kind: { const: checkpoint, description: 'server >= 7.143.0: the row family (always `checkpoint` on this schema); absent on servers <= 7.142.x, which list this family only.' }
15191
15553
  askId: { type: string, description: 'server >= 7.152.0: the ASK identity of this row when it is a parked card with an ask-ledger row — decide it via `POST /v1/tasks/{taskId}/asks/{askId}/decision`, read it via `GET /v1/tasks/{taskId}/asks/{askId}`. ABSENT = the row has no ask-ledger row (a durable `/decide`-only card / an older server): decide it via `POST /v1/approvals/{sessionId}/decide`.' }
15192
15554
  checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.133.0: the NON-SECRET stable identity of the pause this row parks on — the join key where the token cannot go; the SAME value as `PausedCause.checkpointId`. Carried on three durable read surfaces (GET /v1/approvals `pending[]` rows, the /v1/approvals/stream `pending` frame, GET /v1/assistant/inbox rows). A row whose value is unreadable or untrusted (non-string / empty / over 128 / contains the token / an old row / an older server) is STILL LISTED with the key ABSENT — read absence as "this row has no joinable identity", never as a required key.' }
15555
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
15556
+ hostSessionId: { type: string, description: 'server >= 7.154.0: the HOST session of a card parked in another session — a ladder (`cascade:true`) rung card points back at the submitting session, a workflow leg card at the session that started that workflow; = whose run is continued when this card is decided. Present only when it is not `sessionId`, readable as exactly one value, and the reader can see that session; ABSENT otherwise. Background delegated sub-agent cards never carry it (a `resolved` frame carries the last `pending` frame value).' }
15193
15557
  rowVerdict:
15194
15558
  allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
15195
15559
  description: 'server >= 7.144.0: the engine row judge''s verdict on this row (ABSENT IS NOT `ok`). A non-`ok` row is refused for the same reason when decided (409). SQL backends read each pending row''s stored body once on the first listing after boot (then memoized by body digest); server >= 7.145.0 a row whose body cannot be read as a checkpoint carries it too (always `damaged`; 7.144.x listed that row without it).'
@@ -15277,6 +15641,22 @@ components:
15277
15641
  🔴 DISPLAY / TRIAGE ONLY, and ABSENT MEANS THERE REALLY IS NO SUPPLY (rule lane unarmed, the
15278
15642
  command yields no rule, no rule could silence this ask, or an old row) — never "the projection
15279
15643
  dropped it", which is precisely the bug this key exists to close. Never `null`, never `[]`.
15644
+ deploymentListQuestion:
15645
+ type: boolean
15646
+ enum: [true]
15647
+ description: >-
15648
+ server >= 7.153.0: this card carries the DEPLOYMENT LIST's question (`APPROVAL_REQUIRE` / the centre-issued list) — told apart from a card the user's own ask rule asked (the two were same-shaped: source `ask_rule`, class `ask_rule`,
15649
+ `ruleOffersAbsence: "ask_rule_matched"`). True-only, never `false`. A list question => this bit `true` and `rememberRefused` absent ("this session" is remembered in the server's session exemption store); the user's own ask rule =>
15650
+ this bit absent and `rememberRefused: true`; both naming the same tool => one forced card with this bit `true`, `rememberRefused: true` and frame-level `mandated: true`. Live faces judge it when the question was ASKED (a later
15651
+ hot swap of the list changes nothing on a live card); parked faces judge it when READ (the list is read now). ABSENT = not a list question / a card minted before 7.153.0 / an older server. The inbox row does not carry it.
15652
+ cardMessage:
15653
+ type: string
15654
+ minLength: 1
15655
+ description: >-
15656
+ server >= 7.153.0 (engine 7.67.0 records the card's question on the parked row): the question of this parked tool-approval card — byte-equal to the live card's `card.message` for the same question; every door out of
15657
+ this server runs the same treatment (credential shapes masked through the output seat, then cut to 8192 characters). Present only when readable: a row parked before 7.153.0's engine, an empty / non-string cell, or a
15658
+ question the engine rewrote control characters in (U+2400) => ABSENT (never `""` / `null`; fall back to the generic gate reason). A question over 16384 UTF-16 units reads as the engine's own account sentence
15659
+ `approval message exceeded 16KiB (<N> chars serialized)`.
15280
15660
  rememberRefused:
15281
15661
  type: boolean
15282
15662
  enum: [true]
@@ -15413,6 +15793,21 @@ components:
15413
15793
  properties:
15414
15794
  sessionId: { type: string, description: 'The suspended task/session id.' }
15415
15795
  checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.133.0: the NON-SECRET stable identity of the pause this row parks on — the join key where the token cannot go; the SAME value as `PausedCause.checkpointId`. Carried on three durable read surfaces (GET /v1/approvals `pending[]` rows, the /v1/approvals/stream `pending` frame, GET /v1/assistant/inbox rows). A row whose value is unreadable or untrusted (non-string / empty / over 128 / contains the token / an old row / an older server) is STILL LISTED with the key ABSENT — read absence as "this row has no joinable identity", never as a required key.' }
15796
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
15797
+ cardMessage:
15798
+ type: string
15799
+ minLength: 1
15800
+ description: >-
15801
+ server >= 7.153.0 (engine 7.67.0 records the card's question on the parked row): the question of this parked tool-approval card — byte-equal to the live card's `card.message` for the same question; every door out of
15802
+ this server runs the same treatment (credential shapes masked through the output seat, then cut to 8192 characters). Present only when readable: a row parked before 7.153.0's engine, an empty / non-string cell, or a
15803
+ question the engine rewrote control characters in (U+2400) => ABSENT (never `""` / `null`; fall back to the generic gate reason). A question over 16384 UTF-16 units reads as the engine's own account sentence
15804
+ `approval message exceeded 16KiB (<N> chars serialized)`.
15805
+ askReasons:
15806
+ type: array
15807
+ description: >-
15808
+ server >= 7.153.0: WHO asked and WHY (the engine's summary echo) — the same projection on four faces (the live card, the operator queue row, the subscription frame and this inbox row; before, the inbox row did not carry it).
15809
+ ABSENT = a row parked before the engine's ask-reason record / no reasons.
15810
+ items: { $ref: '#/components/schemas/AskReason' }
15416
15811
  rowVerdict:
15417
15812
  allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
15418
15813
  description: 'server >= 7.144.0: the same verdict as `PendingCheckpoint.rowVerdict` (ABSENT IS NOT `ok`; both backends). server >= 7.145.0 on SQL backends: a row whose stored body cannot be read for its summary is LISTED (previously the whole inbox answered 500 / 503) with its column facts (`sessionId` / `scope` / `createdAt` / `gateKind` / `deadline` / `checkpointId`) plus this key; summary-derived keys are absent and `input` is `null`, while `objective` is still filled from the run row preview independently of the summary. A row whose gate kind column cannot be read is not listed. The verdict is usually non-`ok` (`damaged` …); exception: a row missing only `pendingAction` is judged `ok` and its decide still fails (a known engine gap). On `DB_BACKEND=local` that shape still answers the whole listing with 503 `approvals.read_unavailable`.'
@@ -15676,6 +16071,7 @@ components:
15676
16071
  nothing ran; do not backfill it from the path id. It tightens back to required once the server settles this form.
15677
16072
  decisionCommitted: { type: boolean, enum: [true], description: 'server >= 7.138.0 - SETTLEMENT EVIDENCE: `true` = the gate this request named was durably settled with THIS request''s decision (historical evidence, not the card''s current state). Always the literal `true`, never `false`. Absent = unprovable or deliberately omitted => read as "not committed" (fail-closed); do not infer it from the absence of `errorCode`. It coexists with `errorCode: cancelled` / `retriable: true`; `retriable: true` only says the run re-parked.' }
15678
16073
  checkpointId: { type: string, description: 'server >= 7.138.0 - only alongside `decisionCommitted`: the gate identity of the row selected before execution (same name and value as the operator queue / inbox row / park ledger row). Absent when the identity is unreadable or not applicable (an idempotent replay carries none); absence infers nothing.' }
16074
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
15679
16075
  status:
15680
16076
  type: string
15681
16077
  description: >
@@ -15701,8 +16097,20 @@ components:
15701
16097
  than dropped, because a misspelled `permissionModeAfter` would otherwise silently fold to `default`
15702
16098
  (the task keeps asking before each write after its plan was approved) while the caller believes the
15703
16099
  mode was settled.
16100
+ NOTE for spec-driven generators: `approve` / `edit` REQUIRE `checkpointId` (server >= 7.153.0), which this schema states as a
16101
+ conditional `if` / `then`. A tool that does not support conditional required drops it and generates `checkpointId` as optional -
16102
+ rely on the TypeScript types of @sema-agent/sdk instead (a two-arm union); the server still refuses the call.
15704
16103
  required: [decision]
15705
16104
  additionalProperties: false
16105
+ # 🔴 server >= 7.153.0 (BREAKING): `approve` / `edit` are RELEASE words and must carry `checkpointId` (the identity of the plan gate the caller saw); `reject` is a RECALL word and need not.
16106
+ # Missing => 400 `decide_requires_binding` + `bindingEnforced: true` + `missingKeys: ["checkpointId"]`, judged before the claim (the plan stays unapproved, the card pending, nothing written).
16107
+ # A server 7.137.0 - 7.152.x accepted the body without it (no stale protection).
16108
+ if:
16109
+ properties:
16110
+ decision: { enum: [approve, edit] }
16111
+ required: [decision]
16112
+ then:
16113
+ required: [checkpointId]
15706
16114
  properties:
15707
16115
  decision: { type: string, enum: [approve, edit, reject] }
15708
16116
  editedPlan: { type: string, description: 'the operator''s revised plan — required iff decision==="edit".' }
@@ -15714,8 +16122,8 @@ components:
15714
16122
  description: >-
15715
16123
  server >= 7.137.0 (read `capabilities.planReviewCheckpointId` first) — the identity of the plan gate you decided on. If it is not the plan gate this session has pending NOW (another end answered, the run
15716
16124
  re-planned and parked on a NEW plan gate) => 409 `approval_stale` (the same code and sentence as `/decide`), nothing recorded (plan not approved, card still pending), body `currentPending: { checkpointId }`
15717
- (the current gate; absent when it has no trustworthy identity or was consumed concurrently). Absent key => accepted as before (no stale protection). Value: non-empty string, at most 128 chars, else 400
15718
- `request.field_invalid` (existence-independent). Sources: the park result's `terminal.checkpointId`, the queue / inbox row `checkpointId`, the `needs_review` ledger row `data.checkpointId` (same value).
16125
+ (the current gate; absent when it has no trustworthy identity or was consumed concurrently). Absent key => accepted (no stale protection) on server 7.137.0 - 7.152.x ONLY; server >= 7.153.0 refuses it with `approve` / `edit` (see the `if` / `then` above). Value: non-empty string, at most 128 chars, else 400
16126
+ `request.field_invalid` (existence-independent). REQUIRED with `approve` / `edit` since server >= 7.153.0 (BREAKING; absent => 400 `decide_requires_binding`, `missingKeys: ["checkpointId"]`); `reject` need not carry it. Sources: the park result's `terminal.checkpointId`, the queue / inbox row `checkpointId`, the `needs_review` ledger row `data.checkpointId` (same value).
15719
16127
  On a direct-door (D-G) deployment the key must be signed into the 6th (extension-object) position of the proof envelope; sent unsigned => 401 `approval_mac_invalid`.
15720
16128
  A server 7.86.0-7.136.x answers this key with 400 `request.body_shape` (`unknownKeys`). Do NOT blindly resend after a 409: re-fetch THAT gate's plan, show it to the human, then decide with the new identity.
15721
16129
  decidedBy:
@@ -15916,6 +16324,7 @@ components:
15916
16324
  runCount: { type: integer }
15917
16325
  objectivePreview: { type: ['string', 'null'] }
15918
16326
  lastStatus: { type: string }
16327
+ sessionKind: { type: string, enum: [sidechain], description: 'Server >= 7.151.0: the session''s kind (`sidechain` rows are listed only under `?sessionKind=sidechain`). ABSENT = a top-level conversation.' }
15919
16328
  lastRunId:
15920
16329
  type: ['string', 'null']
15921
16330
  description: The most recent run's id (null when the session has no run yet) — lets a picker deep-link.
@@ -16185,6 +16594,30 @@ components:
16185
16594
  items: { $ref: '#/components/schemas/SessionSummary' }
16186
16595
  nextCursor: { type: string, description: "Opaque keyset cursor (echo verbatim as ?cursor=)." }
16187
16596
 
16597
+ SessionRulesWrite:
16598
+ description: >-
16599
+ The `rules` of a `PUT /v1/sessions/{sessionId}/policy` body (server >= 7.153.0, engine 7.67.0, BREAKING: `grammar` is REQUIRED — the writer declares the grammar). See the PUT description.
16600
+ allOf: [{ $ref: '#/components/schemas/SessionPermissionRules' }]
16601
+ additionalProperties: false
16602
+ # 🔴 server >= 7.153.0 (engine 7.67.0, BREAKING): the writer DECLARES the grammar, the engine never fills it in and neither does this server.
16603
+ # `grammar` absent => 400 `rules.grammar_required` (before any entry is read; nothing written); a number newer than the engine's `SESSION_RULES_GRAMMAR` (7 on the
16604
+ # 7.153.0 bytes; read `capabilities.sessionRulesGrammar` for the FIRST write, send the stored row's own `grammar` back otherwise) => 400 `rules.invalid_shape`.
16605
+ # Servers <= 7.152.x also accept a stamped body, so a client sends it always.
16606
+ required: [grammar]
16607
+ properties:
16608
+ toolAllow: { type: array, items: { type: string } }
16609
+ toolDeny: { type: array, items: { type: string } }
16610
+ allowDirs: { type: array, items: { type: string } }
16611
+ # server >= 7.129.0 (engine 7.51.2): a stored body echoed back (GET → edit → PUT) may carry its `rev` and `grammar`;
16612
+ # the engine reads the entries in THAT grammar (`rev` without `grammar` = grammar 0 ⇒ a rule-spelled allow entry
16613
+ # answers `400 rules.inert_entry` reason `earlier_grammar`; <= 7.152.x: the way out was to send the three buckets alone — the
16614
+ # write judge stamped the current grammar; server >= 7.153.0 the writer must STATE `grammar`, nothing stamps it). `grammar` newer than the engine's ⇒ `400 rules.invalid_shape`.
16615
+ rev: { type: integer, minimum: 0 }
16616
+ grammar: { type: integer, minimum: 0 }
16617
+ # server >= 7.135.0 (engine 7.55.0): a stored body echoed back (GET → edit → PUT) may also carry its `operatorRules`; on THIS door the echoed part is ALWAYS ignored — the route reads the value through the write reader
16618
+ # (its product carries no `rev`) and the store judges it again: over an existing row the STORED row's operator part is kept, over no row an empty stamped part is minted. Do not rely on an echo to move the operator line — send the new value without `operatorRules`.
16619
+ operatorRules: { $ref: '#/components/schemas/SessionRulesOperatorPart' }
16620
+
16188
16621
  SessionPermissionRules:
16189
16622
  type: object
16190
16623
  description: >
@@ -17151,7 +17584,7 @@ components:
17151
17584
  the body coordinates in conflict, subject first. <= 7.147.x nested `{ kind, fields, … }` under `detail` (`kind` renamed `reason`, same words). SDK `FieldConflictRefusalExtra`.
17152
17585
  differs:
17153
17586
  type: array
17154
- items: { type: string, enum: [text, trusted, priority, actor, runOrigin] }
17587
+ items: { type: string, enum: [text, trusted, priority, actor, runOrigin, source] }
17155
17588
  description: 'server >= 7.148.0 root key on 409 `steering.duplicate_input_id` (<= 7.147.x: `detail.differs`): the facets in which this replay differs from the accepted one. SDK `SteeringDuplicateInputIdError.differs`.'
17156
17589
  placement_kind: { type: string, description: 'server >= 7.148.0 root key on 409 `conflict.session_placed` (<= 7.147.x: `detail.placement_kind`): the stored placement kind of the target session.' }
17157
17590
  scenario: { type: string, description: 'server >= 7.148.0 root key on 503 `state.scenario_assignment_unknown` (and inside the `scenarioRefusal` of `GET /v1/sessions/{id}/mcp`): the dangling scenario name (<= 7.147.x: `detail.scenario`).' }
@@ -17277,6 +17710,7 @@ components:
17277
17710
  - $ref: '#/components/schemas/Event_task_progress'
17278
17711
  - $ref: '#/components/schemas/Event_workspace_changed'
17279
17712
  - $ref: '#/components/schemas/Event_engine_notice'
17713
+ - $ref: '#/components/schemas/Event_hook_notice'
17280
17714
  - $ref: '#/components/schemas/Event_suspended'
17281
17715
  # 🔴 以下 6 臂是 2026-07-25 补的:`events.ts` 的 `AgentEvent` 联合有 21 个 `type` 字面量,本文件此前只声明
17282
17716
  # 15 个 —— 照本文件生成客户端的消费方会把 6 种合法帧当成非法值(事件面是最吃重的 wire 面,这个缺口比
@@ -17361,6 +17795,7 @@ components:
17361
17795
  task_progress: '#/components/schemas/Event_task_progress'
17362
17796
  workspace_changed: '#/components/schemas/Event_workspace_changed'
17363
17797
  engine_notice: '#/components/schemas/Event_engine_notice'
17798
+ hook_notice: '#/components/schemas/Event_hook_notice'
17364
17799
  suspended: '#/components/schemas/Event_suspended'
17365
17800
  file_link: '#/components/schemas/Event_file_link'
17366
17801
  prompt_assembled: '#/components/schemas/Event_prompt_assembled'
@@ -17552,6 +17987,15 @@ components:
17552
17987
  required: [type, toolCallId, toolName]
17553
17988
  properties:
17554
17989
  type: { const: tool_start }
17990
+ resumesCheckpoint:
17991
+ type: string
17992
+ minLength: 1
17993
+ maxLength: 128
17994
+ description: >-
17995
+ server >= 7.153.0 (engine 7.67.0): this call is the REPLAY of a call held on a resumed leg — which parked row it picks up: the identity of that row's gate (the same value, through the same trust boundary,
17996
+ as `terminal.checkpointId` and the operator queue row's `checkpointId`; a value failing the shape check — non-empty, at most 128 characters — is dropped). ABSENT = not a resumed-leg replay. Same value as the paired
17997
+ `tool_end.resumesCheckpoint`. Shape-checked only on the frame: that the value is a row this server itself knows cannot be judged there.
17998
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
17555
17999
  toolCallId: { type: string }
17556
18000
  toolName: { type: string }
17557
18001
  requestedBy:
@@ -18191,6 +18635,24 @@ components:
18191
18635
  required: [type, toolCallId, toolName, isError]
18192
18636
  properties:
18193
18637
  type: { const: tool_end }
18638
+ resumesCheckpoint:
18639
+ type: string
18640
+ minLength: 1
18641
+ maxLength: 128
18642
+ description: 'server >= 7.153.0 (engine 7.67.0): same as `Event_tool_start.resumesCheckpoint` — the gate identity of the parked row this resumed-leg replay picks up. ABSENT = not a replay.'
18643
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
18644
+ refusedInput:
18645
+ description: >-
18646
+ server >= 7.153.0 (engine 7.67.0): the FINAL input of a refused call — the input the gate judged the refusal on (a rewritten input => the rewritten one; `tool_start.args` stays the model's own). Redacted with the same
18647
+ deep scan as `tool_start.args` / `rewrite.input`, at the one mint shared by the live frame and the ledger row (the ledger keeps the redacted bytes; replay passes the same idempotent scan again). This server does not
18648
+ judge "is this a refusal frame": it projects what the engine gave. ABSENT = not refused / an older server / the read or the redaction threw (the whole key is dropped).
18649
+ redactedKeys:
18650
+ type: array
18651
+ minItems: 1
18652
+ items: { type: string, enum: [output, structured, structuredSkeleton, rewrite, refusedInput] }
18653
+ description: >-
18654
+ server >= 7.153.0 (MINTED BY THIS SERVER, not an engine key): the top-level members of this record whose bytes the redaction rewrote — a CLOSED five-word set in record order (`structuredSkeleton` since 7.154.0); zero hits => ABSENT (never `[]`).
18655
+ Replay reads the ledger's copy. Read this instead of comparing redaction marker literals.
18194
18656
  toolCallId: { type: string }
18195
18657
  toolName: { type: string }
18196
18658
  requestedBy:
@@ -18227,6 +18689,13 @@ components:
18227
18689
  server >= 7.126.0 (core 7.49.0, contract table B `wireName` row, passed through verbatim) — the tool name this call resolved to on the LIVE roster (the name the gate judged). `toolName` stays the model's spelling (an alias /
18228
18690
  a retired name the roster still answers to). Present ONLY on a refused call (`gate.disposition.kind === "denied"`), and absent when the station that refused it did not know the roster name; per-tool refusal accounting reads this, not `toolName`.
18229
18691
  structured: {} # core 1.203 CC 卡片明细;与 output 同一 UNTRUSTED RAW 待遇(已 redactDeep),形状开放
18692
+ structuredSkeleton:
18693
+ type: object
18694
+ required: [type]
18695
+ additionalProperties: true
18696
+ description: 'server >= 7.154.0 (engine 7.68.0; UNTRUSTED RAW like `structured`): the SKELETON of a card left off `structured` by the size measure — never beside it (which one is present says whether the card is whole): `type` plus the members the kind declares fixed-length (a file card keeps its path and `contentSha256`, a caller-declared card `type` alone). Facts, not a card to render. Absent when not even that fits.'
18697
+ properties:
18698
+ type: { type: string }
18230
18699
  isError: { type: boolean }
18231
18700
  output: { $ref: '#/components/schemas/ToolOutput' } # 22.0.0: two shapes, one block schema shared with the trace faces
18232
18701
  truncated: { type: boolean, description: 'true exactly when `output` is not the content the tool returned (text cut, a media block replaced by its descriptor or folded into the `omitted` summary — by core, or by the server on the ledger / replay faces and on a backlogged live connection).' }
@@ -18337,6 +18806,17 @@ components:
18337
18806
  required: [type]
18338
18807
  properties:
18339
18808
  type: { const: turn_end }
18809
+ answeredBy:
18810
+ type: string
18811
+ description: 'server >= 7.153.0 (engine 7.67.0): this turn was answered by an extension registration (a `turn`-site answer instead of the model) — the registration''s name (the registrant''s string, UNTRUSTED-for-display). ABSENT = the model answered.'
18812
+ cacheReadUnreported:
18813
+ type: boolean
18814
+ enum: [true]
18815
+ description: 'server >= 7.153.0 (engine 7.67.0): the provider did NOT report the cache read for this turn — always the literal `true`, never `false`; `usage.cacheReadTokens` is then "not reported", NOT 0. ABSENT = reported (including a real 0).'
18816
+ cacheWriteUnreported:
18817
+ type: boolean
18818
+ enum: [true]
18819
+ description: 'server >= 7.153.0 (engine 7.67.0): same as `cacheReadUnreported` for the cache WRITE (`usage.cacheWriteTokens` is "not reported", not 0).'
18340
18820
  usage:
18341
18821
  type: object
18342
18822
  description: >
@@ -18376,6 +18856,22 @@ components:
18376
18856
  required: [type]
18377
18857
  properties:
18378
18858
  type: { const: compacted }
18859
+ restoreOutcomes:
18860
+ type: array
18861
+ minItems: 1
18862
+ description: >-
18863
+ server >= 7.153.0 (engine 7.67.0): which files the compaction's RESTORE step did NOT send back and why — one entry per record, the SAME record and projection as `human_input.attachments[]` (including `reason`).
18864
+ Present iff at least one entry (ABSENT = none, never `[]`).
18865
+ items:
18866
+ type: object
18867
+ additionalProperties: false
18868
+ properties:
18869
+ ordinal: { type: number }
18870
+ kind: { type: string }
18871
+ outcome: { type: string }
18872
+ label: { type: string }
18873
+ reason: { type: string }
18874
+ declinedBy: { $ref: '#/components/schemas/ExtensionRequester' }
18379
18875
  tokensBefore: { type: integer }
18380
18876
  summarizedCrossSessionMessages: { type: integer, minimum: 1, description: 'server >= 7.147.0: how many already-delivered cross-session messages (session-inbox `crossSessionMessage` carriers) this summary swallowed; present iff >= 1 (absent = none swallowed or an older server, not 0).' }
18381
18877
  trigger: { type: string, description: '开集(engine-shaped,别当闭合枚举):`auto`(逼近窗口上限)/ `manual`(`POST /v1/runs/:id/compact`,发在该 run 自己的流上)/ `forced`(core ≥5.16.0 的 prompt-too-long 恢复腿)。缺席按 auto 渲染;未知值也按 auto 渲染,别崩。' }
@@ -18447,6 +18943,17 @@ components:
18447
18943
  required: [type, phase]
18448
18944
  properties:
18449
18945
  type: { const: status }
18946
+ toolCallId:
18947
+ type: string
18948
+ minLength: 1
18949
+ description: 'server >= 7.153.0 (engine 7.67.0 `BrainStatus.toolCallId`): which CALL this frame''s model-call liveness is about (the auto-mode classifier judging a held call names it). ABSENT = the turn''s own call. Pairs with `tool_progress.gate: "classifier"`.'
18950
+ providerMessage:
18951
+ type: string
18952
+ minLength: 1
18953
+ description: >-
18954
+ server >= 7.153.0 (engine 7.67.0): what the provider itself said about this failure (the engine passes remote text through its own screen: declared values and credential shapes masked, URLs withheld, one line, bounded).
18955
+ 🔴 UNTRUSTED-for-display: display only, never feed it to a model and never branch on it (branch on `errClass` / `providerCondition` / `errorStatus`). Rides the same output seat as `detail` and is never masked
18956
+ LESS than the terminal `message` on the same response; on some shapes it is masked MORE than literally (see the server release notes' disclosure). The same member rides `result.terminal.detail.providerMessage`.
18450
18957
  # 🔴 A-057.27:6 员(此前只列 4,漏 recovered/gave_up 两个**终局**值 —— 一段重试序列恒恰一终局帧,
18451
18958
  # 两者对渲染方是同一句话「把重试行撤下来」)。闭集声明、开集读。
18452
18959
  phase: { type: string, description: "rate_limited | retrying | reconnecting | circuit_open | recovered | gave_up | waiting_first_token (core's seven words since core 7.3.1 — `waiting_first_token` observes a first-token wait before any failure and carries `elapsedMs` / `timeoutMs`, never a retry countdown; closed in core, read as open set)" }
@@ -18639,6 +19146,7 @@ components:
18639
19146
  kind: { type: string }
18640
19147
  outcome: { type: string }
18641
19148
  label: { type: string }
19149
+ reason: { type: string, description: 'server >= 7.153.0 (engine 7.67.0): why the attachment has this outcome (the engine''s word, verbatim; non-empty only). The same record and projection as `compacted.restoreOutcomes[]`.' }
18642
19150
  declinedBy:
18643
19151
  allOf: [{ $ref: '#/components/schemas/ExtensionRequester' }]
18644
19152
  description: 'server >= 7.148.0 (core 7.66.0): the extension that refused this attachment at its `prompt.mention` station (registration name). Present only on a `not_attached` attachment whose refusal an extension made; a display / audit fact.'
@@ -18687,6 +19195,22 @@ components:
18687
19195
  required: [type]
18688
19196
  properties:
18689
19197
  type: { const: wiring_manifest }
19198
+ suspendLane:
19199
+ allOf: [{ $ref: '#/components/schemas/WiringManifestSuspendLane' }]
19200
+ description: >-
19201
+ server >= 7.153.0 (engine 7.67.0; OPERATOR face only, stripped on a tenant stream): can this leg suspend durably, and which pieces are missing. `ready` = a scheduler's yield parks the leg at its next clean boundary;
19202
+ `reasons` = the missing pieces (empty <=> ready; `no_checkpoint_store` / `leg_not_resumable` (server >= 7.154.0) / `volatile_tool_results` / `env_not_remote` / `env_suspend_undeclared` / `env_restore_incomplete`, closed words read open);
19203
+ `recoverableAcrossProcesses` = ready AND both the checkpoint store and the session store DECLARE durability (a park minted here can be continued by another process). Readiness, never one request's outcome.
19204
+ commandSandbox:
19205
+ allOf: [{ $ref: '#/components/schemas/WiringManifestCommandSandbox' }]
19206
+ description: >-
19207
+ server >= 7.153.0 (engine 7.67.0; OPERATOR face only): what the leg's command-sandbox requirement turned into — `{ state: "armed" }` or `{ state: "unavailable", reason }`. This server does not hand the engine a sandbox
19208
+ requirement today, so the section is ALWAYS ABSENT (absent = no requirement, not "sandbox off").
19209
+ toolPlan:
19210
+ allOf: [{ $ref: '#/components/schemas/WiringManifestToolPlan' }]
19211
+ description: >-
19212
+ server >= 7.153.0 (engine 7.67.0 `ToolMountPlan`; OPERATOR face only): the leg's mount table read over the leg's facts (to explain why a tool is not mounted). `members` = mounted / conditional tools (`when` names the facts
19213
+ that decide a conditional one), `families` = MCP / A2A listings known by peer only, `absent` = definitions that do not mount and the facts that keep them off (`because`). `half: "effective"` = the leg's real roster.
18690
19214
  schemaVersion: { type: integer }
18691
19215
  leg:
18692
19216
  type: object
@@ -18958,9 +19482,9 @@ components:
18958
19482
  instructions:
18959
19483
  allOf: [{ $ref: '#/components/schemas/WiringManifestInstructions' }]
18960
19484
  description: >
18961
- server >= 7.111.0 (S-961; cli L-910; contract appendix G.21b) — SELF-MINTED by the server (core's
18962
- `WiringManifest` has no such section; the server adds it beside core's own, and a core section of the
18963
- same name would be a compile error server-side). TENANT and OPERATOR faces alike; rides the live frame, the
19485
+ server >= 7.111.0 (S-961; cli L-910; contract appendix G.21b) — SELF-MINTED by the server up to 7.152.x (core's
19486
+ `WiringManifest` had no such section; the server added it beside core's own). 🔴 server >= 7.153.0 (BREAKING): minted by the ENGINE instead
19487
+ (the project instruction files are read by the engine): `selected` = every member the leg holds as it starts (open `string[]`, relative to the task root). TENANT and OPERATOR faces alike; rides the live frame, the
18964
19488
  durable ledger row and the sync receipt's `wiringManifest`. Which PROJECT-INSTRUCTION FILE the project-memory
18965
19489
  loader selected on THIS leg's own prepare: the chain `CLAUDE.md` > `.claude/CLAUDE.md` > `AGENTS.md` >
18966
19490
  `.claude/AGENTS.md` (first hit wins; a present-but-EMPTY `CLAUDE.md` is still the selected one and shadows
@@ -19080,6 +19604,12 @@ components:
19080
19604
  required: [type, toolCallId, toolName]
19081
19605
  properties:
19082
19606
  type: { const: tool_progress }
19607
+ gate:
19608
+ type: string
19609
+ description: >-
19610
+ server >= 7.153.0 (engine 7.67.0 `ToolGatePhase`): WHO holds this call at its gate when the frame is minted — `classifier` (an auto-mode classification of the call is in flight) or `approval` (a question about it is
19611
+ put to a person). ABSENT = nothing holds it at the gate (before the gate / between two gate rounds / after release to the executor). Closed words, read open. `approval` only rides a frame minted while some other
19612
+ call is working (while EVERY call waits on the person nothing is beaten).
19083
19613
  toolCallId: { type: string, description: "The still-running call's id — joins its own `tool_start`/`tool_end`. The server drops the whole frame without it." }
19084
19614
  toolName: { type: string, description: 'The running tool name (the `tool_start` value verbatim).' }
19085
19615
  elapsedTimeSeconds:
@@ -19243,6 +19773,20 @@ components:
19243
19773
  pathTarget: { $ref: '#/components/schemas/McpToolPathTarget' }
19244
19774
  renderHints: { $ref: '#/components/schemas/McpToolRenderHints' }
19245
19775
  ruleFace: { $ref: '#/components/schemas/McpToolRuleFace' }
19776
+ Event_hook_notice:
19777
+ type: object
19778
+ description: >-
19779
+ server >= 7.154.0 — the hook observation frame on a RUN's own event stream (live stream + ledger replay), present only on a run whose submit body declared `settings.runStreamHookFrames: "failures"`
19780
+ (probe `capabilities.taskSettings.runStreamHookFrames`). Payload keys and `ts` are the same values as the fleet-stream frame `FleetFrame_hook_notice` (four `kind` families, OPEN ON READ: dispatch on `kind`, degrade an unknown kind
19781
+ to a generic observability row; never infer a call outcome from a hook frame), plus the delivery identity `eventId`. A run without the declaration carries none (byte-identical to <= 7.153.x).
19782
+ required: [type, kind]
19783
+ additionalProperties: true
19784
+ properties:
19785
+ type: { const: hook_notice }
19786
+ kind: { type: string, description: 'hook_decision_unavailable / hook_non_blocking_failure / hook_managed_unrun / hook_verdict_untrusted (open set).' }
19787
+ ts: { type: number }
19788
+ eventId: { type: string }
19789
+
19246
19790
  Event_engine_notice:
19247
19791
  type: object
19248
19792
  description: >
@@ -19560,6 +20104,7 @@ components:
19560
20104
  checkpointId:
19561
20105
  type: string
19562
20106
  description: 'server >= 7.137.0, PRESENT-IFF: the stable non-secret identity of this park — the same value as the run row''s `result.terminal.checkpointId` and the queue / inbox row''s `checkpointId` (absent when it did not cross the identity trust boundary). Feed it to `plan_review` `checkpointId` for a plan gate.'
20107
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
19563
20108
  ModelUsageDelta:
19564
20109
  # 新增(2026-07-25 回填批)。SDK 的 facade 审计把这个形状命名了一次(此前是在两个使用点各写一遍的匿名内联形:
19565
20110
  # `AgentEvent` 的 `model_usage` 臂 与 `done.result.stats.modelUsage` 的值类型,同源同形)。
@@ -19631,6 +20176,7 @@ components:
19631
20176
  properties:
19632
20177
  binding: { type: string }
19633
20178
  traits: { type: array, items: { type: string } }
20179
+ locale: { type: string, description: 'server >= 7.153.0 (engine 7.67.0 `PROMPT_LOCALES`, today `canonical` / `zh-Hans`; an absent `TaskSpec.promptLocale` => `canonical`): the language word the catalog text of THIS run was rendered in — engine-minted, always present on a 7.153.0 row, verbatim; closed words read open. ABSENT on rows written by an older server.' }
19634
20180
  host:
19635
20181
  type: object
19636
20182
  additionalProperties: false
@@ -19803,9 +20349,8 @@ components:
19803
20349
  A BACKGROUND task (bg agent / bash / monitor / workflow / external) settled or emitted a batch. This frame
19804
20350
  is the LEDGER/display projection of the OBSERVED terminal state. ⚠️ It does NOT attest that the
19805
20351
  `<task-notification>` has entered the model context: the engine's injection targets the NEXT TURN BOUNDARY
19806
- and can trail this frame by minutes (server >=1.286 sends `injected: false` to say so explicitly; an
19807
- earlier revision of this description claimed "already injected in-process" — the wrong assumption that
19808
- broke frame-as-echo dedup, [1818]). Key any dedup on the field's value, never on frame arrival.
20352
+ and can trail this frame by minutes (server >= 7.154.0 no longer mints the `injected` key at all — it was always present and always false and carried no information; ledger rows written BEFORE 7.154.0
20353
+ still replay with the retired `injected: false`; no replacement key: "did the model receive it" is told by the committed row, `message_committed` `origin: queued_note` + `noteKey`). Key any dedup on the field's value, never on frame arrival.
19809
20354
  `partial:true` = a KILLED child's salvaged remnant (render as
19810
20355
  incomplete). `seq` = stop-cycle/batch counter (dedup key together with task_id + status).
19811
20356
  🔴 summary/result/lines/diagnostics are UNTRUSTED redacted free text — render, never re-feed to a model.
@@ -19818,11 +20363,12 @@ components:
19818
20363
  task_id: { type: string }
19819
20364
  task_type: { type: string }
19820
20365
  status: { type: string }
19821
- injected:
19822
- type: boolean
20366
+ refusedAsks:
20367
+ type: array
19823
20368
  description: >-
19824
- false = ledger observation only, model-context injection NOT attested (always false today; true is
19825
- reserved for a future engine injection-echo seam). Absent on servers <1.286 — same semantics as false.
20369
+ server >= 7.154.0 (engine 7.68.0): the asks of this background task that nobody could answer and that were refused, one entry per refused call (the same facts as the result`s `refusedAsks`);
20370
+ `toolName` / `remedy` pass the egress seat. present-iff at least one was refused.
20371
+ items: { $ref: '#/components/schemas/RefusedAsk' }
19826
20372
  summary: { type: string, description: 'UNTRUSTED display text.' }
19827
20373
  sessionId: { type: string }
19828
20374
  toolUseId: { type: string }
@@ -20236,6 +20782,14 @@ components:
20236
20782
  approvalCard:
20237
20783
  allOf: [{ $ref: '#/components/schemas/ToolApprovalCardWord' }]
20238
20784
  description: 'server >= 7.136.0, ADDITIVE: the engine-minted card word — the SAME word, read once, as the live frame''s top-level `ApprovalRequestLiveFacts.approvalCard`; it now rides the live-minted `approval_request` frame''s `card`, the stored `card_json` envelope and the reconnect-replay frame''s `card` (before 7.136.0 the card did not carry it, so a replayed frame had none). ABSENT = the engine minted none / an out-of-set word (the server narrows it again when it mints the card) / a card stored before 7.136.0 — never `generic` by default. Display / triage only; it NEVER takes part in resume / gate / CAS. The stored envelope is strict: a 7.135.x replica cannot read a row carrying this key (replay skips it, the idempotent re-entry goes to the durable park) — roll the fleet in one pass.'
20785
+ deploymentListQuestion:
20786
+ type: boolean
20787
+ enum: [true]
20788
+ description: >-
20789
+ server >= 7.153.0: this card carries the DEPLOYMENT LIST's question (`APPROVAL_REQUIRE` / the centre-issued list) — told apart from a card the user's own ask rule asked (the two were same-shaped: source `ask_rule`, class `ask_rule`,
20790
+ `ruleOffersAbsence: "ask_rule_matched"`). True-only, never `false`. A list question => this bit `true` and `rememberRefused` absent ("this session" is remembered in the server's session exemption store); the user's own ask rule =>
20791
+ this bit absent and `rememberRefused: true`; both naming the same tool => one forced card with this bit `true`, `rememberRefused: true` and frame-level `mandated: true`. Live faces judge it when the question was ASKED (a later
20792
+ hot swap of the list changes nothing on a live card); parked faces judge it when READ (the list is read now). ABSENT = not a list question / a card minted before 7.153.0 / an older server. The inbox row does not carry it.
20239
20793
  rememberRefused:
20240
20794
  type: boolean
20241
20795
  enum: [true]
@@ -20905,10 +21459,18 @@ components:
20905
21459
  `unknown-candidate` — the echoed text does not locate in the record's candidate table.
20906
21460
  `confirm-refused` / `redeem-refused` — the consent protocol's confirm/redeem step was refused
20907
21461
  (record state, a lost CAS, or the store refusing the write).
20908
- `rule_lane_unavailable` — FOUR causes share this one value (the server's three conjuncts): no rule store
20909
- wired, OR the engine minted no candidate for this command, OR the command bytes were unreadable, OR this
20910
- ask has no verified owner. 🔴 Two of those are per-CARD limits, so this reason is NOT evidence about the
20911
- deployment — never disable the rule feature globally on the strength of it.
21462
+ `rule_lane_unavailable` — THREE causes share this one value (server 7.153.0 bytes: the redeem function's lane test, the two
21463
+ record readers' owner test, the resume leg's settle test): no rule store wired, OR this ask has no verified owner (the
21464
+ decider's owner reads as empty), OR the decision was not proven committed / the resume leg returned no rule slot (the
21465
+ receipt then fills in "the request carried it, the outcome did not answer"). A card with NO CANDIDATE / unreadable command
21466
+ bytes / an unknowable authorization place is NOT one of the three: no material is stored at mint time and the decision answers
21467
+ `rule_material_absent` (below). NOTE: server 7.148.0's LIVE-card leg still folded "material absent" into this word; 7.153.0 reads
21468
+ both card kinds through one reader. The last two causes are per-ASK / per-attempt limits, so this reason is NOT evidence about
21469
+ the deployment — never disable the rule feature globally on the strength of it.
21470
+ A frame WITHOUT `ruleOffers` means nothing to redeem; sending `persistRule` anyway answers by condition: rule store wired =>
21471
+ `rule_material_absent`; no rule store wired => `rule_lane_unavailable` (the lane test runs before the record reader); decider's
21472
+ owner unreadable => `rule_lane_unavailable`; operator-governed card => `rule_governance_forced`; a hand-built `persistRule` on a
21473
+ parked card that has no ask row and an empty mint snapshot => `scope-unresolved`.
20912
21474
  `rule_input_edited` — the respond ALSO carried `updatedInput` (ctrl+g edit): the call that takes effect
20913
21475
  is the edited one while the candidates were minted from the ORIGINAL command, so persisting would arm a
20914
21476
  standing allow for the original (a real privilege widening). v1 refuses the persistence; the decision
@@ -20918,22 +21480,24 @@ components:
20918
21480
  `rule_store_error` — the rule store wobbled. The adjudication is unaffected.
20919
21481
  `rule_governance_forced` (server >=7.12.0, #204) — the gate on THIS ask came from the deployment's
20920
21482
  operator governance layer, so the ask never entered the rule lane at all.
20921
- 🔴 SPLIT FROM `rule_lane_unavailable` ON PURPOSE: that one is "one of four conjuncts failed" (no rule
20922
- store, no candidate, unreadable command bytes, no verified owner — two of which are per-CARD limits),
21483
+ 🔴 SPLIT FROM `rule_lane_unavailable` ON PURPOSE: that one is "one of three failed" (no rule
21484
+ store, no verified owner, no outcome from the resume leg),
20923
21485
  this one is "the lane is perfectly healthy, only THIS ask is operator-governed". Folding them would
20924
21486
  erase a real distinction on the card.
20925
21487
  ⚠️ NEITHER IS A DEPLOYMENT-LEVEL VERDICT. Every member of this enum describes ONE ask's outcome; the
20926
21488
  note on `rule_lane_unavailable` above already says never to disable the feature globally on it, and
20927
21489
  the same holds here. The one correct source for "does this worker serve rules at all" is
20928
21490
  `capabilities.permissionRules`. Keep offering "don't ask again" on the next ask; just not on this one.
20929
- `rule_material_absent` (server >=7.48.0, #363) — DURABLE (PARKED) LATE-DECISION LEG ONLY: THIS ROW
20930
- carries no material to mint a rule from. Three causes, one handling: the ask never entered the rule
20931
- lane (governance-forced / no owner / the engine minted no candidate / the command bytes are not
20932
- readable out of the args), the row predates those columns, or the card on the row will not parse.
20933
- 🔴 ALSO SPLIT FROM `rule_lane_unavailable` ON PURPOSE, for the same reason as the previous member:
20934
- that word says "this deployment serves no rules at all" and a shell may stop rendering the affordance
20935
- on it, whereas the truth here is "the lane is fine, only THIS ROW has no material". Folding them lets
20936
- one late park answer condemn a healthy deployment's whole lane. Silently ignoring it is worse still
21491
+ `rule_material_absent` (server >=7.48.0) — THIS ROW carries no material to mint a rule from. BOTH legs say it: the parked
21492
+ late-decision leg (since 7.48.0) and the live-card leg (7.153.0 bytes; the 7.148.0 live leg folded it into
21493
+ `rule_lane_unavailable`). Causes (the two record readers, 7.153.0): the card envelope on the row will not parse; the row's
21494
+ owner is not the decider's owner; the material column is empty — nothing to store at mint time (the engine minted no
21495
+ candidate, so the card carries NO `ruleOffers`; or the command bytes are not readable out of the args; or the authorization
21496
+ place is unknowable), or the row predates those columns; the command carries a credential shape (material withheld whole);
21497
+ a parked checkpoint is missing a gate part, or its row has no candidate / no readable command.
21498
+ 🔴 ALSO SPLIT FROM `rule_lane_unavailable` ON PURPOSE: that word's causes are "no rule store / no verified owner / no
21499
+ outcome from the resume leg", whereas the truth here is "the lane is fine, only THIS ROW has no material". Folding them lets
21500
+ one late answer condemn a healthy deployment's whole lane. Silently ignoring it is worse still
20937
21501
  (no silent fail-open on the approval axis): a person who ticked "don't ask again" and saw nothing
20938
21502
  happen will not tick it twice.
20939
21503
  enum:
@@ -21428,9 +21992,9 @@ components:
21428
21992
 
21429
21993
  SteerReplayFacet:
21430
21994
  type: string
21431
- enum: [text, trusted, priority, actor, runOrigin]
21995
+ enum: [text, trusted, priority, actor, runOrigin, source]
21432
21996
  description: >
21433
- core 7.44.0 #1374 `STEER_REPLAY_FACETS` (`runOrigin` joined in core 7.58.0 — the run origin the caller declared for the input; server 7.138.0 hands the engine
21997
+ core 7.67.0 added the sixth facet `source` (the input's declared source; server >= 7.153.0 ships it). core 7.44.0 #1374 `STEER_REPLAY_FACETS` (`runOrigin` joined in core 7.58.0 — the run origin the caller declared for the input; server 7.138.0 hands the engine
21434
21998
  no run origin, so that facet does not arrive from it), verbatim and in order — the facets on which a replayed steering input id differs from the
21435
21999
  accepted one. Carried as the root key `differs` on server >= 7.148.0 (`detail.differs` on 7.118.0–7.147.x) (a non-empty subset, the engine's order) on 409 `steering.duplicate_input_id` (server >= 7.118.0):
21436
22000
  contains `text` ⇒ a different instruction, reissue with a fresh key; no `text` ⇒ the SAME instruction — do NOT change the key (it
@@ -21532,6 +22096,7 @@ components:
21532
22096
  bindingEnforced: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/bindingEnforced' }
21533
22097
  decisionCommitted: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/decisionCommitted' }
21534
22098
  checkpointId: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/checkpointId' }
22099
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
21535
22100
  errorCode: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/errorCode' }
21536
22101
  errorMessage: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/errorMessage' }
21537
22102
  retriable: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/retriable' }
@@ -21818,6 +22383,11 @@ components:
21818
22383
  required: [type, outcome, trigger]
21819
22384
  properties:
21820
22385
  type: { const: compaction_outcome }
22386
+ cause:
22387
+ type: string
22388
+ description: >-
22389
+ server >= 7.153.0 (engine 7.67.0 `COMPACTION_FAILURE_CAUSES`, today one word `leaf_moved`): the cause of a `failed` outcome — a compaction commits ONLY onto the leaf it summarised; another writer moved the leaf during
22390
+ the summary call => zero writes (the spend already happened). A word outside the engine's closed set drops only this key. Same on the run stream and on `POST /v1/sessions/{id}/compact`'s `events`. ABSENT = no cause.
21821
22391
  outcome: { type: string }
21822
22392
  trigger: { type: string, description: 'engine-shaped; current emitters send auto | manual | forced' }
21823
22393
  reason: { type: string }
@@ -21925,12 +22495,51 @@ components:
21925
22495
  checkpointId:
21926
22496
  type: string
21927
22497
  description: 'Same as `suspended.checkpointId` (server >= 7.137.0, PRESENT-IFF): the plan gate''s identity — send it as `plan_review` `checkpointId`.'
22498
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
22499
+ RefusedAsk:
22500
+ type: object
22501
+ required: [toolName, toolCallId, cause]
22502
+ additionalProperties: true
22503
+ description: 'server >= 7.154.0 (engine 7.68.0): one ask that nobody could answer and that was refused (`toolName` / `remedy` pass the egress seat).'
22504
+ properties:
22505
+ toolName: { type: string }
22506
+ toolCallId: { type: string, description: 'The refused call id (the same key as the `tool_start` / `tool_end` frames).' }
22507
+ cause: { type: string, description: 'approver_unavailable / no_approver_wired / mandate_unreconstructible (open set).' }
22508
+ remedy: { type: string, description: 'The way out the refusal named; ABSENT when it named none.' }
22509
+
22510
+ ResolvedReasoning:
22511
+ type: object
22512
+ required: [requested, effective, graded, clamped, format, endpoint]
22513
+ additionalProperties: true
22514
+ description: >-
22515
+ How a requested reasoning tier resolved on one request (engine `ResolvedReasoning`; `TaskResult.effectiveReasoning`). `effective` is what the request's thinking keys SAY, read where they are written, not an echo of the request.
22516
+ properties:
22517
+ requested: { type: string, enum: ['off', minimal, low, medium, high, xhigh, max], description: 'The level the caller asked for (seven tiers).' }
22518
+ effective:
22519
+ type: string
22520
+ enum: ['off', minimal, low, medium, high, xhigh, max, 'on', provider_default]
22521
+ description: >-
22522
+ A tier (the keys name it: `off` = a disable key or a deployment-declared off value; an enabled tier is the lane's tier key after the clamp) | `on` (the keys turn thinking on and name no tier: a binary enable key, adaptive thinking, a knob-fixed budget, a `null` levelmap entry behind an enable key; server >= 7.154.0, before it the request's tier was copied) |
22523
+ `provider_default` (the request put NO thinking key on the wire — together with `dropped: true`; the provider's own default applies; server >= 7.154.0, before it `off` or the request's tier was copied). Do not read `effective: off` as "thinking is certainly off": that needs `requested: off` AND `effective: off`.
22524
+ graded: { type: boolean, description: 'True exactly when `effective` is one of the six enabled tiers; false for `off` / `on` / `provider_default`.' }
22525
+ clamped: { type: boolean, description: 'True exactly when `effective` differs from `requested`.' }
22526
+ format: { type: string, enum: [openai, openrouter, deepseek, together, zai, qwen, qwen-chat-template, budget, effort, responses], description: 'The dialect or lane the keys are spelled in (engine `ReasoningFormat`).' }
22527
+ endpoint: { type: string, description: 'A coarse endpoint label (`model.api`, e.g. `openai-completions`, `anthropic-messages`).' }
22528
+ dropped: { const: true, description: 'Present (true) exactly when `effective` is `provider_default`.' }
22529
+
22530
+ CheckpointIdMissingWord:
22531
+ type: string
22532
+ enum: [absent, untrusted]
22533
+ description: >-
22534
+ server >= 7.154.0 - why a gate identity (`checkpointId`) is not on this row: `absent` = the row has no readable identity, `untrusted` = it has one that did not pass the identity judge (wrong shape / carries a capability key).
22535
+ The two keys are mutually exclusive on every face (`checkpointId` present XOR `checkpointIdMissing` present); a good row is byte-identical to <= 7.153.x. On the TOOL frames (`tool_start` / `tool_end`, and the turns / trace tool-call blocks) the partner key is `resumesCheckpoint`: the engine relayed one that the server cannot vouch for => `resumesCheckpoint` absent and `checkpointIdMissing: untrusted`; nothing relayed => both keys absent. Branch on this key, never on the bare absence of `checkpointId`.
22536
+
21928
22537
  Event_message_committed:
21929
22538
  type: object
21930
22539
  description: >
21931
- LIVE only (server routes/tasks.ts, whitelisted in the same catch-all as text_delta/turn_end/
21932
- context_usage) — a session-history entry was committed. `entryId` is the durable entry handle the
21933
- R8 rewind anchor is keyed on ("rewind to the prompt" targets a `role:"user"` entry).
22540
+ A session-history entry was committed. `entryId` is the durable entry handle the R8 rewind anchor is keyed on ("rewind to the prompt" targets a `role:"user"` entry).
22541
+ server >= 7.154.0: this frame is also WRITTEN TO THE DURABLE LEDGER — `GET /v1/runs/{id}/events` replays the same projection, same values, same order (<= 7.153.x: live stream only). A ledger written before 7.154.0 has no such frame
22542
+ (replayed as written, never back-filled); per message, a reply message whose text rows reached the turn's `turn_end` without its commit row has no commit frame. On the live stream `reasoning_end` now precedes the commit frame.
21934
22543
  additionalProperties: false
21935
22544
  required: [type, entryId, role]
21936
22545
  properties:
@@ -21938,6 +22547,9 @@ components:
21938
22547
  entryId: { type: string }
21939
22548
  role: { type: string, description: 'user | assistant | … (open on read).' }
21940
22549
  toolCallId: { type: string }
22550
+ origin: { type: string, description: 'server >= 7.154.0 (engine 7.67.0): what a `role: "user"` row is — `human_input` / `attachment` / `interruption_marker` / `queued_note`; present on every user row, absent on other roles. Open on read.' }
22551
+ inputId: { type: string, description: 'server >= 7.154.0: only with `origin` `human_input` / `attachment` — the `human_input.inputId` of the input this row IS (or an attachment frame belongs to).' }
22552
+ noteKey: { type: string, description: 'server >= 7.154.0: only with `origin: queued_note` on a task notification row — the notification frame''s durable key (the one `taskNotificationDedupKey` reads off the `task_notification` payload).' }
21941
22553
  eventId: { type: string }
21942
22554
  parentToolCallId: { type: string }
21943
22555
  sourceTaskId: { type: string }
@@ -22236,6 +22848,8 @@ components:
22236
22848
  allOf: [{ $ref: '#/components/schemas/SessionAgent' }]
22237
22849
  description: '`pending` frames of the checkpoint family only (server >= 7.145.0): the spread PendingCheckpoint row''s `agent` (same read port; `resolved` frames do not carry it; absent = this server did not say, not "not a child").'
22238
22850
  checkpointId: { type: string, description: '`pending` frames only (server >= 7.133.0): the spread PendingCheckpoint row''s `checkpointId` (key absent when the row has no trusted value — read as "no joinable identity").' }
22851
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
22852
+ hostSessionId: { type: string, description: 'server >= 7.154.0: the HOST session of a card parked in another session — a ladder (`cascade:true`) rung card points back at the submitting session, a workflow leg card at the session that started that workflow; = whose run is continued when this card is decided. Present only when it is not `sessionId`, readable as exactly one value, and the reader can see that session; ABSENT otherwise. Background delegated sub-agent cards never carry it (a `resolved` frame carries the last `pending` frame value).' }
22239
22853
  consumerState: { type: string, enum: [absent], description: '`live_pending` frames only (server >= 7.133.0): the spread LivePendingRow''s true-only `consumerState` (no engine leg on this replica is waiting for the ask).' }
22240
22854
  errorCode: { type: string, description: '`error` frames: the machine code (`STREAM_MAX_DURATION` / `draining` / server >= 7.133.0 `approvals.read_unavailable` — the stream STAYS open, do NOT reconnect on it — / `approvals.read_corrupt` — a corrupt row was read, the server closes the stream after the frame).' }
22241
22855
  message: { type: string, description: '`error` frames: the human sentence (redacted); never match on it.' }
@@ -22308,6 +22922,7 @@ components:
22308
22922
  decision: { type: string, enum: [approve, deny] }
22309
22923
  decisionCommitted: { type: boolean, enum: [true], description: 'server >= 7.138.0 - SETTLEMENT EVIDENCE: `true` = the gate this request named was durably settled with THIS request''s decision (historical evidence, not the card''s current state). Always the literal `true`, never `false`. Absent = unprovable or deliberately omitted => read as "not committed" (fail-closed); do not infer it from the absence of `errorCode`. It coexists with `errorCode: cancelled` / `retriable: true`; `retriable: true` only says the run re-parked.' }
22310
22924
  checkpointId: { type: string, description: 'server >= 7.138.0 - only alongside `decisionCommitted`: the gate identity of the row selected before execution (same name and value as the operator queue / inbox row / park ledger row). Absent when the identity is unreadable or not applicable (an idempotent replay carries none); absence infers nothing.' }
22925
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
22311
22926
  - type: object
22312
22927
  required: [taskId, status, decision]
22313
22928
  additionalProperties: true
@@ -22317,6 +22932,7 @@ components:
22317
22932
  decision: { type: string, enum: [deny] }
22318
22933
  decisionCommitted: { type: boolean, enum: [true], description: 'server >= 7.138.0 - SETTLEMENT EVIDENCE: `true` = the gate this request named was durably settled with THIS request''s decision (historical evidence, not the card''s current state). Always the literal `true`, never `false`. Absent = unprovable or deliberately omitted => read as "not committed" (fail-closed); do not infer it from the absence of `errorCode`. It coexists with `errorCode: cancelled` / `retriable: true`; `retriable: true` only says the run re-parked.' }
22319
22934
  checkpointId: { type: string, description: 'server >= 7.138.0 - only alongside `decisionCommitted`: the gate identity of the row selected before execution (same name and value as the operator queue / inbox row / park ledger row). Absent when the identity is unreadable or not applicable (an idempotent replay carries none); absence infers nothing.' }
22935
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
22320
22936
 
22321
22937
  FleetMeta:
22322
22938
  type: object
@@ -23030,6 +23646,15 @@ components:
23030
23646
  description: >-
23031
23647
  core 7.53.0, server >= 7.133.0 — the leg's permission-mode receipt (section shape WiringManifestPermissionMode). EFFECTIVE HALF ONLY ⇒ this (static) face NEVER carries it, and absence here carries no
23032
23648
  information; the reading holds only on a live `wiring_manifest` frame.
23649
+ suspendLane:
23650
+ allOf: [{ $ref: '#/components/schemas/WiringManifestSuspendLane' }]
23651
+ description: 'server >= 7.153.0 (engine 7.67.0; OPERATOR face; EFFECTIVE HALF ONLY ⇒ ALWAYS ABSENT ON THIS ENDPOINT): can this leg suspend durably. Reading: Event_wiring_manifest.suspendLane.'
23652
+ commandSandbox:
23653
+ allOf: [{ $ref: '#/components/schemas/WiringManifestCommandSandbox' }]
23654
+ description: 'server >= 7.153.0 (engine 7.67.0; OPERATOR face; EFFECTIVE HALF ONLY ⇒ ALWAYS ABSENT ON THIS ENDPOINT, and absent on the live frame too today). Reading: Event_wiring_manifest.commandSandbox.'
23655
+ toolPlan:
23656
+ allOf: [{ $ref: '#/components/schemas/WiringManifestToolPlan' }]
23657
+ description: 'server >= 7.153.0 (engine 7.67.0; OPERATOR face; BOTH HALVES carry it): on THIS endpoint the deployment''s STATIC plan (`half: "static"` — the mount table read over the deployment''s facts before any task, explaining why a tool does not mount); the live frame carries the leg''s `half: "effective"` plan. Reading: Event_wiring_manifest.toolPlan.'
23033
23658
  instructions:
23034
23659
  allOf: [{ $ref: '#/components/schemas/WiringManifestInstructions' }]
23035
23660
  description: >
@@ -23084,6 +23709,82 @@ components:
23084
23709
  enum: [true]
23085
23710
  description: "core's ONLY present shape — the construct gate refuses an armed-but-unrunnable state, so this is a SHAPE, not a value."
23086
23711
 
23712
+ WiringManifestCommandSandbox:
23713
+ type: object
23714
+ required: [state]
23715
+ additionalProperties: false
23716
+ description: >-
23717
+ The `wiring_manifest.commandSandbox` section (server >= 7.153.0, engine 7.67.0; OPERATOR face only): `{ state: "armed" }` or `{ state: "unavailable", reason }` (`reason` is REQUIRED with `unavailable` and absent with `armed`).
23718
+ if:
23719
+ properties:
23720
+ state: { const: unavailable }
23721
+ required: [state]
23722
+ then:
23723
+ required: [reason]
23724
+ else:
23725
+ not: { required: [reason] }
23726
+ properties:
23727
+ state: { type: string, enum: [armed, unavailable] }
23728
+ reason: { type: string, description: 'The engine''s word for why the requirement could not be armed (only with `unavailable`).' }
23729
+
23730
+ WiringManifestSuspendLane:
23731
+ type: object
23732
+ additionalProperties: false
23733
+ required: [ready, reasons, recoverableAcrossProcesses]
23734
+ description: >-
23735
+ The `wiring_manifest.suspendLane` section (server >= 7.153.0, engine 7.67.0; OPERATOR face only): can this leg suspend durably, and which pieces are missing. Readiness, never one request's outcome.
23736
+ properties:
23737
+ ready: { type: boolean, description: 'A scheduler yield parks the leg at its next clean boundary.' }
23738
+ reasons:
23739
+ type: array
23740
+ description: 'The missing pieces (empty <=> ready): `no_checkpoint_store` / `leg_not_resumable` (server >= 7.154.0) / `volatile_tool_results` / `env_not_remote` / `env_suspend_undeclared` / `env_restore_incomplete` — closed words, read open.'
23741
+ items: { type: string }
23742
+ recoverableAcrossProcesses: { type: boolean, description: 'Ready AND both the checkpoint store and the session store DECLARE durability: a park minted here can be continued by another process (a drain hand-off).' }
23743
+
23744
+ WiringManifestToolPlan:
23745
+ type: object
23746
+ additionalProperties: false
23747
+ required: [half, members, families, absent]
23748
+ description: >-
23749
+ The `wiring_manifest.toolPlan` section (server >= 7.153.0, engine 7.67.0 `ToolMountPlan`; OPERATOR face only): the mount table read over the leg's facts. `members` = mounted / conditional tools (`when` names the facts that
23750
+ decide a conditional one), `families` = MCP / A2A listings known by peer only, `absent` = definitions that do not mount and the facts that keep them off (`because`). `half: "effective"` = the leg's real roster.
23751
+ properties:
23752
+ half: { type: string }
23753
+ members:
23754
+ type: array
23755
+ items:
23756
+ type: object
23757
+ additionalProperties: true
23758
+ required: [name, source, mountedBy, state]
23759
+ properties:
23760
+ name: { type: string }
23761
+ id: { type: string }
23762
+ source: { type: string }
23763
+ mountedBy: { type: string }
23764
+ state: { type: string }
23765
+ when: { type: array, items: { type: string } }
23766
+ families:
23767
+ type: array
23768
+ items:
23769
+ type: object
23770
+ additionalProperties: true
23771
+ required: [source, peer, state, when]
23772
+ properties:
23773
+ source: { type: string }
23774
+ peer: { type: string }
23775
+ state: { type: string }
23776
+ when: { type: array, items: { type: string } }
23777
+ absent:
23778
+ type: array
23779
+ items:
23780
+ type: object
23781
+ additionalProperties: true
23782
+ required: [name, because]
23783
+ properties:
23784
+ id: { type: string }
23785
+ name: { type: string }
23786
+ because: { type: array, items: { type: string } }
23787
+
23087
23788
  WiringManifestInstructions:
23088
23789
  # S-961(server 7.111.0):与 `WiringManifestReadDeny` / `WiringManifestAutoConsolidation` 同一条裁定 —— 同一段形被 live 帧与静态诊断面两处引用,
23089
23790
  # 内联就是两份会各自漂的镜像,所以具名单源(`spec-field-drift-gate` 也按「导出的 interface 必有同名 schema」逼出它)。
@@ -23092,15 +23793,15 @@ components:
23092
23793
  description: >
23093
23794
  The `wiring_manifest.instructions` section (server >= 7.111.0 / S-961) — SELF-MINTED by the server, not a core
23094
23795
  section: which project-instruction file the project-memory loader selected on this leg's own prepare.
23095
- `selected` members are a CLOSED four-word set — the server's instruction-file chain (`INSTRUCTION_FILE_CHAIN`,
23096
- registered in its self-minted wire table `wiringInstructionsSelected`); a fifth chain member would be a new SDK minor,
23097
- in this enum in the same batch. The present-iff / two-meanings reading is on `Event_wiring_manifest.instructions`.
23796
+ server >= 7.153.0 (BREAKING): the section is minted by the ENGINE (the project instruction files are read by the engine under the deployment's declared instruction family): `selected` = every member this leg
23797
+ holds as it starts — relative to the task root, `/`-separated, declared names first in declaration order then the rules by path; a member the model may not read, or that holds nothing, is not in it. The members are
23798
+ an OPEN `string[]` now (<= 7.152.x: a CLOSED four-word set — the server's instruction-file chain, first hit selected). The present-iff / two-meanings reading is on `Event_wiring_manifest.instructions`.
23098
23799
  required: [selected]
23099
23800
  properties:
23100
23801
  selected:
23101
23802
  type: array
23102
- description: 'The selected chain member(s), spelled as the chain spells them (relative to the cwd); `[]` = the chain was walked, nothing was selected.'
23103
- items: { type: string, enum: ['CLAUDE.md', '.claude/CLAUDE.md', 'AGENTS.md', '.claude/AGENTS.md'] }
23803
+ description: 'The instruction-file members the leg holds (server >= 7.153.0: all of them, engine-minted, relative to the task root); `[]` = the layer is held and has no member.'
23804
+ items: { type: string }
23104
23805
  WiringManifestPermissionMode:
23105
23806
  # server 7.133.0 / core 7.53.0:同一段形被 live 帧(两张脸)、静态诊断面、`POST /v1/tasks` 的 `wiringManifest` 回执与账本行引用 ⇒ 具名单源(`spec-field-drift-gate` 也按「导出的 interface 必有同名 schema」逼出它)。
23106
23807
  type: object