@sema-agent/sdk 45.0.0 → 47.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 (105) hide show
  1. package/README.md +244 -0
  2. package/dist/bitless-surfaces.d.ts +5 -0
  3. package/dist/bitless-surfaces.d.ts.map +1 -1
  4. package/dist/bitless-surfaces.js +7 -0
  5. package/dist/bitless-surfaces.js.map +1 -1
  6. package/dist/client.d.ts +7 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +9 -0
  9. package/dist/client.js.map +1 -1
  10. package/dist/errors.d.ts +126 -34
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +52 -19
  13. package/dist/errors.js.map +1 -1
  14. package/dist/events.d.ts +307 -33
  15. package/dist/events.d.ts.map +1 -1
  16. package/dist/events.js +2 -2
  17. package/dist/events.js.map +1 -1
  18. package/dist/health.d.ts +17 -1
  19. package/dist/health.d.ts.map +1 -1
  20. package/dist/health.js.map +1 -1
  21. package/dist/index.d.ts +53 -8
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +22 -3
  24. package/dist/index.js.map +1 -1
  25. package/dist/registry/admin.d.ts +11 -1
  26. package/dist/registry/admin.d.ts.map +1 -1
  27. package/dist/registry/admin.js +9 -1
  28. package/dist/registry/admin.js.map +1 -1
  29. package/dist/resources/admin.d.ts +95 -5
  30. package/dist/resources/admin.d.ts.map +1 -1
  31. package/dist/resources/admin.js +58 -4
  32. package/dist/resources/admin.js.map +1 -1
  33. package/dist/resources/adoption.d.ts +23 -4
  34. package/dist/resources/adoption.d.ts.map +1 -1
  35. package/dist/resources/adoption.js +4 -0
  36. package/dist/resources/adoption.js.map +1 -1
  37. package/dist/resources/approvals.d.ts +109 -14
  38. package/dist/resources/approvals.d.ts.map +1 -1
  39. package/dist/resources/approvals.js +110 -9
  40. package/dist/resources/approvals.js.map +1 -1
  41. package/dist/resources/assistant.d.ts +6 -4
  42. package/dist/resources/assistant.d.ts.map +1 -1
  43. package/dist/resources/assistant.js +6 -4
  44. package/dist/resources/assistant.js.map +1 -1
  45. package/dist/resources/attachments.d.ts +5 -1
  46. package/dist/resources/attachments.d.ts.map +1 -1
  47. package/dist/resources/attachments.js +6 -2
  48. package/dist/resources/attachments.js.map +1 -1
  49. package/dist/resources/fleet.d.ts +38 -2
  50. package/dist/resources/fleet.d.ts.map +1 -1
  51. package/dist/resources/fleet.js +4 -0
  52. package/dist/resources/fleet.js.map +1 -1
  53. package/dist/resources/leader.d.ts +30 -8
  54. package/dist/resources/leader.d.ts.map +1 -1
  55. package/dist/resources/leader.js.map +1 -1
  56. package/dist/resources/memory.d.ts +2 -0
  57. package/dist/resources/memory.d.ts.map +1 -1
  58. package/dist/resources/memory.js +2 -0
  59. package/dist/resources/memory.js.map +1 -1
  60. package/dist/resources/questions.d.ts +9 -0
  61. package/dist/resources/questions.d.ts.map +1 -1
  62. package/dist/resources/questions.js.map +1 -1
  63. package/dist/resources/scheduled.d.ts +60 -0
  64. package/dist/resources/scheduled.d.ts.map +1 -0
  65. package/dist/resources/scheduled.js +36 -0
  66. package/dist/resources/scheduled.js.map +1 -0
  67. package/dist/resources/session-sync.d.ts +5 -0
  68. package/dist/resources/session-sync.d.ts.map +1 -1
  69. package/dist/resources/session-sync.js.map +1 -1
  70. package/dist/resources/sessions.d.ts +57 -9
  71. package/dist/resources/sessions.d.ts.map +1 -1
  72. package/dist/resources/sessions.js +47 -5
  73. package/dist/resources/sessions.js.map +1 -1
  74. package/dist/resources/tool-approvals.d.ts +80 -10
  75. package/dist/resources/tool-approvals.d.ts.map +1 -1
  76. package/dist/resources/tool-approvals.js +42 -1
  77. package/dist/resources/tool-approvals.js.map +1 -1
  78. package/dist/resources/worktree.d.ts +38 -0
  79. package/dist/resources/worktree.d.ts.map +1 -0
  80. package/dist/resources/worktree.js +38 -0
  81. package/dist/resources/worktree.js.map +1 -0
  82. package/dist/retired-capability-bits.d.ts +63 -0
  83. package/dist/retired-capability-bits.d.ts.map +1 -0
  84. package/dist/retired-capability-bits.js +68 -0
  85. package/dist/retired-capability-bits.js.map +1 -0
  86. package/dist/settings.d.ts +20 -0
  87. package/dist/settings.d.ts.map +1 -1
  88. package/dist/sse.d.ts +2 -1
  89. package/dist/sse.d.ts.map +1 -1
  90. package/dist/sse.js +2 -1
  91. package/dist/sse.js.map +1 -1
  92. package/dist/sync.d.ts +2 -0
  93. package/dist/sync.d.ts.map +1 -1
  94. package/dist/sync.js +17 -9
  95. package/dist/sync.js.map +1 -1
  96. package/dist/transport.d.ts +6 -0
  97. package/dist/transport.d.ts.map +1 -1
  98. package/dist/transport.js +8 -0
  99. package/dist/transport.js.map +1 -1
  100. package/dist/types.d.ts +982 -144
  101. package/dist/types.d.ts.map +1 -1
  102. package/dist/types.js +61 -12
  103. package/dist/types.js.map +1 -1
  104. package/openapi.yaml +1987 -239
  105. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -578,6 +578,11 @@ paths:
578
578
  a missing leaf) when the replay dropped no record — switch to a new session or fork from an entry above the break. Servers 7.137.0–7.143.x answered that form
579
579
  `invalid_session` (retired at 7.144.0; this SDK no longer exempts the retired code, so against those servers it is retried by status). A log whose replay DID drop
580
580
  records and whose branch broke at the missing parent is no longer refused: the run continues from the break (200).
581
+ Servers 7.144.0 – 7.155.x answer those two forms as just described. server >= 7.156.0 has one judge for "is this session's transcript readable": a transcript
582
+ that reads but is broken (structurally broken, or records the replay would drop — the file backend's former "continue from the break" form included) answers
583
+ 409 conflict.session_transcript_unreadable before anything runs or is written, body `wayOut: "delete_session"` (deterministic; deleting the session always works),
584
+ on both backends; `corrupt_session` (500) is left only for a session row that cannot be read. The `session.lineage_rerooted` notice no longer appears on runs of
585
+ such a server.
581
586
  content:
582
587
  application/json:
583
588
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -1886,6 +1891,22 @@ paths:
1886
1891
  schema: { type: string, enum: [sidechain] }
1887
1892
  description: >-
1888
1893
  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`.
1894
+ - in: query
1895
+ name: archived
1896
+ required: false
1897
+ schema: { type: string, enum: ['true', 'false'] }
1898
+ description: >-
1899
+ Server >= 7.155.0 (read `capabilities.sessionRowCells` for "archived"): ABSENT = `false` - only unarchived sessions; `true` only archived ones. Any other
1900
+ value => 400 `request.query_invalid`. No "all" side (read both). Intersects with the other filters. A cursor minted under one value used under another
1901
+ => 400 `request.cursor_filter_mismatch`.
1902
+ - in: query
1903
+ name: projectId
1904
+ required: false
1905
+ schema: { type: string }
1906
+ description: >-
1907
+ Server >= 7.155.0 (read `capabilities.sessionRowCells` for "projectId"): only sessions filed under this project (case-insensitive; a bad value => 400
1908
+ `request.query_invalid`); absent = no project filter. No multi-value, no "unfiled" side. Cursors do not cross between with / without it
1909
+ (400 `request.cursor_filter_mismatch`).
1889
1910
  - in: query
1890
1911
  name: q
1891
1912
  required: false
@@ -2079,10 +2100,18 @@ paths:
2079
2100
  # 封闭(census 批2 第二段):三个 200 铸造点都是单键字面量 —— `{deleted:false}` 两处
2080
2101
  # (未知会话 / 外租户,`routes/sessions.ts`)+ purgeSession 的 `{deleted}` 返回
2081
2102
  # (`http/server.ts` 的签名就是这一个键;它的另一臂 `{active}` 走 409)。
2103
+ # server >= 7.156.0:删成(`deleted: true`)且部署释放会话工作树(能力位 `sessionWorktree`)时多第二个键 `checkout`;封闭对象不声明它,真 200 体就会被严格校验器拒。
2082
2104
  additionalProperties: false
2083
2105
  required: [deleted]
2084
2106
  properties:
2085
2107
  deleted: { type: boolean }
2108
+ checkout:
2109
+ allOf: [{ $ref: '#/components/schemas/SessionCheckoutReceipt' }]
2110
+ description: >-
2111
+ server >= 7.156.0 — present iff `deleted` is true AND the deployment releases session worktrees (capability bit `sessionWorktree`): what became of the session's own worktrees. EVERY completed delete
2112
+ there carries it, a session without a tree included (`{ outcome: released, trees: [] }`), so "`checkout` present" does not mean the session had a tree. The release only reports, it never
2113
+ blocks the delete. Absent on `{ deleted: false }`, on deployments without the bit, and on older servers; a session deleted by the age-out leg or finished by start-up recovery has no response
2114
+ object — its outcome goes to the operator log.
2086
2115
  '400':
2087
2116
  # (declared 2026-07-31) errorCode "request.id_invalid" — the path sessionId must decode to a
2088
2117
  # canonical uuid of ANY version (`routes/sessions.ts`; server >= 7.125.0 — the ONE shape gate shared with sync / fork / policy;
@@ -2573,16 +2602,22 @@ paths:
2573
2602
  get:
2574
2603
  tags: [workspace]
2575
2604
  operationId: workspaceList
2576
- x-status: retired # server 7.52.0: whole-tree snapshot epoch retired; sdk 26.0.0 deleted the verb (support floor 7.52.0).
2577
- summary: 'RETIRED (server 7.52.0, S-15) — snapshot listing; every supported server (>= 7.52.0) answers 501 capability.workspace_retired.'
2578
- description: >
2579
- 🔴 RETIRED as of `@sema-agent/server` 7.52.0 (S-15/design/381): the E19 whole-tree snapshot store this face projected was replaced by per-edited-file
2580
- rewind HISTORY (only files the agent edited — there is no "whole workspace" manifest to browse). The route SHAPE is kept server-side as a tombstone:
2581
- every supported server answers 501 `capability.workspace_retired` (a named refusal, not a 404 that reads like a typo), and `capabilities.workspace` is
2582
- always `false` (same predicate). No 1:1 replacement: rewind restore rides `TaskRequest.restoreFiles` (probe `capabilities.restoreFiles`); per-file
2583
- history blobs ride `GET /v1/sessions/{sessionId}/sync/history/blobs/{hash}`. sdk 26.0.0 deleted `client.workspace` (its 200 shapes only existed on 1.299–7.51).
2605
+ x-status: retired # server 7.155.0 deleted the route (global 404 `not_found.route`); 7.52.0 – 7.154.x answered 501; sdk 26.0.0 deleted the verb.
2606
+ summary: 'RETIRED — snapshot listing. Server >= 7.155.0 deleted the route (404 not_found.route); servers 7.52.0 – 7.154.x answer 501.'
2607
+ description: >
2608
+ RETIRED. The whole-tree snapshot store this face projected was replaced in `@sema-agent/server` 7.52.0 by per-edited-file rewind HISTORY (only files the
2609
+ agent edited — there is no "whole workspace" manifest to browse). Servers 7.52.0 – 7.154.x kept the route shape as a tombstone and answered 501
2610
+ `capability.workspace_retired` (with `capabilities.workspace` always `false`); server >= 7.155.0 deleted the route — it answers the global
2611
+ `404 not_found.route`, like any unknown path — and no longer mints `capabilities.workspace`. This spec keeps the entry as a tombstone (the SDK support
2612
+ floor is below 7.155.0); the SDK has no verb for it (sdk 26.0.0 deleted `client.workspace`). No 1:1 replacement: rewind restore rides
2613
+ `TaskRequest.restoreFiles` (probe `capabilities.restoreFiles`); per-file history blobs ride `GET /v1/sessions/{sessionId}/sync/history/blobs/{hash}`.
2584
2614
  responses:
2585
2615
  '401': { $ref: '#/components/responses/Unauthorized' }
2616
+ '404':
2617
+ description: 'Server >= 7.155.0: the global `not_found.route` — the route is gone.'
2618
+ content:
2619
+ application/json:
2620
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
2586
2621
  '501': { $ref: '#/components/responses/NotImplemented' }
2587
2622
 
2588
2623
  /v1/sessions/{sessionId}/workspace/{key}/tree:
@@ -2599,16 +2634,18 @@ paths:
2599
2634
  get:
2600
2635
  tags: [workspace]
2601
2636
  operationId: workspaceTree
2602
- x-status: retired # server 7.52.0: whole-tree snapshot epoch retired; sdk 26.0.0 deleted the verb (support floor 7.52.0).
2603
- summary: 'RETIRED (server 7.52.0, S-15) — snapshot file tree; every supported server (>= 7.52.0) answers 501 capability.workspace_retired.'
2604
- description: >
2605
- 🔴 RETIRED as of `@sema-agent/server` 7.52.0 (S-15/design/381): the E19 whole-tree snapshot store this face projected was replaced by per-edited-file
2606
- rewind HISTORY (only files the agent edited — there is no "whole workspace" manifest to browse). The route SHAPE is kept server-side as a tombstone:
2607
- every supported server answers 501 `capability.workspace_retired` (a named refusal, not a 404 that reads like a typo), and `capabilities.workspace` is
2608
- always `false` (same predicate). No 1:1 replacement: rewind restore rides `TaskRequest.restoreFiles` (probe `capabilities.restoreFiles`); per-file
2609
- history blobs ride `GET /v1/sessions/{sessionId}/sync/history/blobs/{hash}`. sdk 26.0.0 deleted `client.workspace` (its 200 shapes only existed on 1.299–7.51).
2637
+ x-status: retired # server 7.155.0 deleted the route (global 404 `not_found.route`); 7.52.0 – 7.154.x answered 501; sdk 26.0.0 deleted the verb.
2638
+ summary: 'RETIRED — snapshot file tree. Server >= 7.155.0 deleted the route (404 not_found.route); servers 7.52.0 – 7.154.x answer 501.'
2639
+ description: >
2640
+ RETIRED, same as `GET /v1/sessions/{sessionId}/workspace`: servers 7.52.0 – 7.154.x answered 501 `capability.workspace_retired`; server >= 7.155.0
2641
+ deleted the route and answers the global `404 not_found.route`. The SDK has no verb for it (sdk 26.0.0 deleted `client.workspace`).
2610
2642
  responses:
2611
2643
  '401': { $ref: '#/components/responses/Unauthorized' }
2644
+ '404':
2645
+ description: 'Server >= 7.155.0: the global `not_found.route` — the route is gone.'
2646
+ content:
2647
+ application/json:
2648
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
2612
2649
  '501': { $ref: '#/components/responses/NotImplemented' }
2613
2650
 
2614
2651
  /v1/sessions/{sessionId}/workspace/{key}/file:
@@ -2625,16 +2662,18 @@ paths:
2625
2662
  get:
2626
2663
  tags: [workspace]
2627
2664
  operationId: workspaceFile
2628
- x-status: retired # server 7.52.0: whole-tree snapshot epoch retired; sdk 26.0.0 deleted the verb (support floor 7.52.0).
2629
- summary: 'RETIRED (server 7.52.0, S-15) — snapshot single file; every supported server (>= 7.52.0) answers 501 capability.workspace_retired.'
2630
- description: >
2631
- 🔴 RETIRED as of `@sema-agent/server` 7.52.0 (S-15/design/381): the E19 whole-tree snapshot store this face projected was replaced by per-edited-file
2632
- rewind HISTORY (only files the agent edited — there is no "whole workspace" manifest to browse). The route SHAPE is kept server-side as a tombstone:
2633
- every supported server answers 501 `capability.workspace_retired` (a named refusal, not a 404 that reads like a typo), and `capabilities.workspace` is
2634
- always `false` (same predicate). No 1:1 replacement: rewind restore rides `TaskRequest.restoreFiles` (probe `capabilities.restoreFiles`); per-file
2635
- history blobs ride `GET /v1/sessions/{sessionId}/sync/history/blobs/{hash}`. sdk 26.0.0 deleted `client.workspace` (its 200 shapes only existed on 1.299–7.51).
2665
+ x-status: retired # server 7.155.0 deleted the route (global 404 `not_found.route`); 7.52.0 – 7.154.x answered 501; sdk 26.0.0 deleted the verb.
2666
+ summary: 'RETIRED — snapshot single file. Server >= 7.155.0 deleted the route (404 not_found.route); servers 7.52.0 – 7.154.x answer 501.'
2667
+ description: >
2668
+ RETIRED, same as `GET /v1/sessions/{sessionId}/workspace`: servers 7.52.0 – 7.154.x answered 501 `capability.workspace_retired`; server >= 7.155.0
2669
+ deleted the route and answers the global `404 not_found.route`. The SDK has no verb for it (sdk 26.0.0 deleted `client.workspace`).
2636
2670
  responses:
2637
2671
  '401': { $ref: '#/components/responses/Unauthorized' }
2672
+ '404':
2673
+ description: 'Server >= 7.155.0: the global `not_found.route` — the route is gone.'
2674
+ content:
2675
+ application/json:
2676
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
2638
2677
  '501': { $ref: '#/components/responses/NotImplemented' }
2639
2678
 
2640
2679
  /v1/sessions/{sessionId}/workspace/{key}/archive:
@@ -2651,16 +2690,18 @@ paths:
2651
2690
  get:
2652
2691
  tags: [workspace]
2653
2692
  operationId: workspaceArchive
2654
- x-status: retired # server 7.52.0: whole-tree snapshot epoch retired; sdk 26.0.0 deleted the verb (support floor 7.52.0).
2655
- summary: 'RETIRED (server 7.52.0, S-15) — snapshot tar archive; every supported server (>= 7.52.0) answers 501 capability.workspace_retired.'
2656
- description: >
2657
- 🔴 RETIRED as of `@sema-agent/server` 7.52.0 (S-15/design/381): the E19 whole-tree snapshot store this face projected was replaced by per-edited-file
2658
- rewind HISTORY (only files the agent edited — there is no "whole workspace" manifest to browse). The route SHAPE is kept server-side as a tombstone:
2659
- every supported server answers 501 `capability.workspace_retired` (a named refusal, not a 404 that reads like a typo), and `capabilities.workspace` is
2660
- always `false` (same predicate). No 1:1 replacement: rewind restore rides `TaskRequest.restoreFiles` (probe `capabilities.restoreFiles`); per-file
2661
- history blobs ride `GET /v1/sessions/{sessionId}/sync/history/blobs/{hash}`. sdk 26.0.0 deleted `client.workspace` (its 200 shapes only existed on 1.299–7.51).
2693
+ x-status: retired # server 7.155.0 deleted the route (global 404 `not_found.route`); 7.52.0 – 7.154.x answered 501; sdk 26.0.0 deleted the verb.
2694
+ summary: 'RETIRED — snapshot tar archive. Server >= 7.155.0 deleted the route (404 not_found.route); servers 7.52.0 – 7.154.x answer 501.'
2695
+ description: >
2696
+ RETIRED, same as `GET /v1/sessions/{sessionId}/workspace`: servers 7.52.0 – 7.154.x answered 501 `capability.workspace_retired`; server >= 7.155.0
2697
+ deleted the route and answers the global `404 not_found.route`. The SDK has no verb for it (sdk 26.0.0 deleted `client.workspace`).
2662
2698
  responses:
2663
2699
  '401': { $ref: '#/components/responses/Unauthorized' }
2700
+ '404':
2701
+ description: 'Server >= 7.155.0: the global `not_found.route` — the route is gone.'
2702
+ content:
2703
+ application/json:
2704
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
2664
2705
  '501': { $ref: '#/components/responses/NotImplemented' }
2665
2706
 
2666
2707
  /v1/sessions/{sessionId}/policy:
@@ -2767,6 +2808,11 @@ paths:
2767
2808
  name — the old bucket denied both; to deny those too deny the whole shell, `toolDeny: ["Bash"]`); `commandAllow` has no counterpart.
2768
2809
  🔴 BREAKING (server 7.129.0): server 7.105.0–7.128.x answered this family with `rules.legacy_tool_name` (entry in `name`, no `reason`) — that code is retired with no alias; a caller that branched on it branches on the two codes
2769
2810
  above (the `rules.` prefix test still holds). On server <= 7.128.x the shape problems answered `400 request.field_invalid` (`rules` not an object: `request.body_shape`) and a body with a command bucket was accepted.
2811
+ Server >= 7.155.0 (engine 7.69.0) adds two codes, zero writes on both: `rules.grammar_older_than_rules` = a non-operator write declares a grammar OLDER than the
2812
+ row's operator part (any bucket present there, an empty list counts) — rewrite the body in the row's grammar (the `grammar` a `GET` reads back) and `PUT` again, a
2813
+ plain retry is refused the same; `rules.reread_not_accepted` = a write that changes the row's grammar carries entries the two grammars read differently (same
2814
+ bucket, same literal) without saying what to do with them — the one way out on this door is to declare the row's own grammar (send the read-back `grammar`).
2815
+ `error` is the engine's sentence; the engine's structured detail does not cross on either.
2770
2816
  Also `request.id_invalid` (malformed session id).
2771
2817
  content:
2772
2818
  application/json:
@@ -3005,6 +3051,189 @@ paths:
3005
3051
  '501': { $ref: '#/components/responses/NotImplemented' }
3006
3052
  '503': { $ref: '#/components/responses/Unauthorized' } # `auth.service_token_required` — the credential-gated write door (no service credential and no ALLOW_UNAUTHED_WRITES), before routing.
3007
3053
 
3054
+ # ── server >= 7.156.0:定时任务四口(调用方的两口 + 会话的两口;事实只有调度后端那一份)与工作树能力探针 ──
3055
+ /v1/scheduled:
3056
+ parameters:
3057
+ - $ref: '#/components/parameters/PrincipalHeader'
3058
+ get:
3059
+ tags: [sessions]
3060
+ operationId: scheduledList
3061
+ x-status: gated # server 7.156.0; capability bit `scheduledTasks` (no scheduler ⇒ 501). SDK scheduled.list.
3062
+ summary: The caller's scheduled tasks (durable entries filed under the caller's verified principal).
3063
+ description: >
3064
+ server >= 7.156.0 (mint `src/http/routes/scheduled-tasks.ts`). The SAME engine function the model's `CronList` calls, on the lanes derived from the
3065
+ caller's VERIFIED principal (no session ⇒ the engine's two lanes are one key = this principal's durable entries; an operator reads the operator's
3066
+ own). 200 `{ rows, reach }`: each row is the engine's `ScheduledTaskSummary` key by key (absent stays absent; the server mints no row key); `reach`
3067
+ is the one-word closed set `replica_store` — one list reads the scheduled-task store THIS replica opened (other replicas reading another file are
3068
+ not seen here). Session-level entries (session-shaped cron, pending wake-ups) are only in their own session's list
3069
+ (`GET /v1/sessions/{sessionId}/scheduled`). Known limits: a row carries no task content (the engine's row type has no prompt); no pause / edit /
3070
+ create; on a deployment without the principal gate, list and stop are not per person.
3071
+ Refusals: 501 `capability.scheduler_required` (this deployment has no scheduler — NOT an empty list; probe `capabilities.scheduledTasks`) ·
3072
+ 401 (a `REQUIRE_PRINCIPAL` deployment and no verified principal) · 500 `internal.scheduler_store_unreadable` (the store could not be read; no
3073
+ partial list). An older server answers 404 (no such route).
3074
+ responses:
3075
+ '200':
3076
+ description: The caller's durable scheduled entries and which store was read.
3077
+ content:
3078
+ application/json:
3079
+ schema: { $ref: '#/components/schemas/ScheduledTaskList' }
3080
+ '401': { $ref: '#/components/responses/Unauthorized' }
3081
+ '404': { $ref: '#/components/responses/NotFound' }
3082
+ '500':
3083
+ description: '`internal.scheduler_store_unreadable` — the scheduled-task store could not be read (untrusted / not a JSON array / concurrent writers exhausted); no partial list. Code family `deterministic`: resending does not change it (the SDK does not retry it).'
3084
+ content:
3085
+ application/json:
3086
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
3087
+ '501': { $ref: '#/components/responses/NotImplemented' }
3088
+
3089
+ /v1/scheduled/{id}:
3090
+ parameters:
3091
+ - $ref: '#/components/parameters/PrincipalHeader'
3092
+ - in: path
3093
+ name: id
3094
+ required: true
3095
+ schema: { type: string }
3096
+ delete:
3097
+ tags: [sessions]
3098
+ operationId: scheduledCancel
3099
+ x-status: gated # server 7.156.0; capability bit `scheduledTasks`. SDK scheduled.cancel.
3100
+ summary: Stop one of the caller's scheduled entries (irreversible).
3101
+ description: >
3102
+ server >= 7.156.0. The SAME engine function the model's `CronDelete` calls, on the caller's lanes (see `GET /v1/scheduled`); once stopped the
3103
+ model's `CronList` no longer lists it. 200 `{ id }` (the id the path named). An id outside the lanes (mistyped, already stopped, someone else's, a
3104
+ session-level entry only its own session reaches, filed in a store this replica does not read) ⇒ 404 `not_found.scheduled_task`, same code and
3105
+ sentence for all of them. Inside the credential-gated write door (effect class `durable-write`): no service credential and no
3106
+ `ALLOW_UNAUTHED_WRITES` ⇒ 503 `auth.service_token_required` before routing; rate-limited. 501 `capability.scheduler_required` as for the list.
3107
+ responses:
3108
+ '200':
3109
+ description: The stopped entry's id.
3110
+ content:
3111
+ application/json:
3112
+ schema: { $ref: '#/components/schemas/ScheduledTaskCancelResult' }
3113
+ '400': { $ref: '#/components/responses/BadRequest' }
3114
+ '401': { $ref: '#/components/responses/Unauthorized' }
3115
+ '404': { $ref: '#/components/responses/NotFound' }
3116
+ '429': { $ref: '#/components/responses/RateLimited' }
3117
+ '500':
3118
+ description: '`internal.scheduler_store_unreadable` — as for the list.'
3119
+ content:
3120
+ application/json:
3121
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
3122
+ '501': { $ref: '#/components/responses/NotImplemented' }
3123
+ '503': { $ref: '#/components/responses/Unauthorized' } # `auth.service_token_required` — the credential-gated write door, before routing.
3124
+
3125
+ /v1/sessions/{sessionId}/scheduled:
3126
+ parameters:
3127
+ - $ref: '#/components/parameters/PrincipalHeader'
3128
+ - in: path
3129
+ name: sessionId
3130
+ required: true
3131
+ schema: { type: string }
3132
+ get:
3133
+ tags: [sessions]
3134
+ operationId: sessionsScheduledList
3135
+ x-status: gated # server 7.156.0; capability bit `sessionScheduledTasks`. SDK sessions.scheduled.
3136
+ summary: The session's scheduled tasks — its own entries first, then the session owner's durable entries.
3137
+ description: >
3138
+ server >= 7.156.0. Same rows and `reach` as `GET /v1/scheduled`; the lanes come from the SESSION ROW (its id and its owner), so an operator reading
3139
+ on someone's behalf reads the owner's entries. Gate order: identity front door → path → capability (501 `capability.scheduler_required`, or 501
3140
+ `capability.session_ownership_required` when the session store has no head read — `sessionScheduledTasks: false` while `scheduledTasks: true`
3141
+ means only the session doors are missing) → owner gate (404 `not_found.session`: unknown and someone else's answer the same). The capability is
3142
+ judged BEFORE the session, so a deployment without a scheduler answers 501 for an unknown session too. 500 `internal.scheduler_store_unreadable`.
3143
+ responses:
3144
+ '200':
3145
+ description: The session's entries, then the owner's durable entries.
3146
+ content:
3147
+ application/json:
3148
+ schema: { $ref: '#/components/schemas/ScheduledTaskList' }
3149
+ '400': { $ref: '#/components/responses/BadRequest' }
3150
+ '401': { $ref: '#/components/responses/Unauthorized' }
3151
+ '404': { $ref: '#/components/responses/NotFound' }
3152
+ '500':
3153
+ description: '`internal.scheduler_store_unreadable` — as for `GET /v1/scheduled`.'
3154
+ content:
3155
+ application/json:
3156
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
3157
+ '501': { $ref: '#/components/responses/NotImplemented' }
3158
+
3159
+ /v1/sessions/{sessionId}/scheduled/{entryId}:
3160
+ parameters:
3161
+ - $ref: '#/components/parameters/PrincipalHeader'
3162
+ - in: path
3163
+ name: sessionId
3164
+ required: true
3165
+ schema: { type: string }
3166
+ - in: path
3167
+ name: entryId
3168
+ required: true
3169
+ schema: { type: string }
3170
+ delete:
3171
+ tags: [sessions]
3172
+ operationId: sessionsScheduledCancel
3173
+ x-status: gated # server 7.156.0; capability bit `sessionScheduledTasks`. SDK sessions.scheduledCancel.
3174
+ summary: Stop one entry on the session's lanes (irreversible).
3175
+ description: >
3176
+ server >= 7.156.0. Same gates as `GET /v1/sessions/{sessionId}/scheduled`; an id outside the session's lanes ⇒ 404 `not_found.scheduled_task`
3177
+ (same code and sentence). Credential-gated write door (503 `auth.service_token_required` before routing) and rate-limited, as `DELETE /v1/scheduled/{id}`.
3178
+ responses:
3179
+ '200':
3180
+ description: The stopped entry's id.
3181
+ content:
3182
+ application/json:
3183
+ schema: { $ref: '#/components/schemas/ScheduledTaskCancelResult' }
3184
+ '400': { $ref: '#/components/responses/BadRequest' }
3185
+ '401': { $ref: '#/components/responses/Unauthorized' }
3186
+ '404': { $ref: '#/components/responses/NotFound' }
3187
+ '429': { $ref: '#/components/responses/RateLimited' }
3188
+ '500':
3189
+ description: '`internal.scheduler_store_unreadable` — as for `GET /v1/scheduled`.'
3190
+ content:
3191
+ application/json:
3192
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
3193
+ '501': { $ref: '#/components/responses/NotImplemented' }
3194
+ '503': { $ref: '#/components/responses/Unauthorized' } # `auth.service_token_required` — the credential-gated write door, before routing.
3195
+
3196
+ /v1/worktree-capability:
3197
+ parameters:
3198
+ - $ref: '#/components/parameters/PrincipalHeader'
3199
+ - in: query
3200
+ name: cwd
3201
+ required: true
3202
+ schema: { type: string }
3203
+ description: The folder to ask about — exactly once, an absolute HOST path.
3204
+ - in: query
3205
+ name: name
3206
+ required: false
3207
+ schema: { type: string }
3208
+ description: The managed tree name to ask about (at most once; the name grammar belongs to the engine's judge). Absent ⇒ ask about the folder alone.
3209
+ get:
3210
+ tags: [sessions]
3211
+ operationId: worktreeCapability
3212
+ x-status: gated # server 7.156.0; capability bit `sessionWorktree` (501 otherwise). SDK worktree.capability.
3213
+ summary: Can this folder hold a session's own worktree? The engine judge's answer, verbatim.
3214
+ description: >
3215
+ server >= 7.156.0 (mint `src/http/routes/capabilities.ts`). Projects the engine's `probeWorktreeCapability` — the same judge a session's first leg
3216
+ uses, so ask here instead of running `git rev-parse` on the host. 200 = the engine's four keys verbatim (`detail` through the exit seat, bounded at
3217
+ 500 code units; `gitRoot` through the path-identity seat, withheld when it cannot leave as one). Gate order (dispatcher, before the handler):
3218
+ credential-gated door (effect class `host-action`: no credential the gate accepts and no `ALLOW_UNAUTHED_WRITES` ⇒ 503
3219
+ `auth.service_token_required`) → rate limiter; (handler) principal gate (401) → capability fact `sessionWorktree` (501 `capability.unavailable`,
3220
+ answered BEFORE `cwd` is read: only a single-user host-lane deployment with the local session store answers) → query (400
3221
+ `request.field_invalid`: `cwd` not exactly once / not an absolute host path, `name` more than once; the judge is not called) → judge. A 501 and an
3222
+ older server's 404 both read "not known". Known limits (engine readings projected verbatim): a path that does not exist ⇒ `git_unavailable`; a
3223
+ subfolder of a plain linked worktree ⇒ `gitRoot` is that subfolder.
3224
+ responses:
3225
+ '200':
3226
+ description: The engine's answer (capable, or not capable with a `reason` from the closed set and a one-sentence `detail`).
3227
+ content:
3228
+ application/json:
3229
+ schema: { $ref: '#/components/schemas/WorktreeCapability' }
3230
+ '400': { $ref: '#/components/responses/BadRequest' }
3231
+ '401': { $ref: '#/components/responses/Unauthorized' }
3232
+ '404': { $ref: '#/components/responses/NotFound' }
3233
+ '429': { $ref: '#/components/responses/RateLimited' }
3234
+ '501': { $ref: '#/components/responses/NotImplemented' }
3235
+ '503': { $ref: '#/components/responses/Unauthorized' } # `auth.service_token_required` — the credential-gated door (effect class host-action), before routing.
3236
+
3008
3237
  /v1/sessions/{sessionId}/memory-status:
3009
3238
  parameters:
3010
3239
  - $ref: '#/components/parameters/PrincipalHeader'
@@ -3163,7 +3392,10 @@ paths:
3163
3392
  the operator to remove the link, then resend with the SAME `requestId`. Since server 7.108.0 the other classified refusals of the
3164
3393
  operator face arrive here too, each with its own code and a FIXED sentence: "memory.erasure_selector_mismatch" /
3165
3394
  "memory.erasure_evidence_unavailable" / "memory.erasure_census_incomplete"; "memory.scope_home_not_directory" (server >= 7.118.0, same
3166
- reading as the link code). The 7.140.0–7.142.x store guard code is retired at server 7.143.0 (erasure answers the whole deployment).
3395
+ reading as the link code). The rest of the store-form refusal family answers here the same way (409, the code verbatim, a FIXED sentence, no host path and no engine sentence in the body):
3396
+ "memory.control_plane_links_unsupported" / "memory.control_plane_strays" / "memory.store_root_sensitive" and, since server 7.154.0, "memory.control_plane_split" (the memory control plane stands in more than one place since the engine root moved; the store was not opened).
3397
+ Since server 7.155.0 "memory.target_outside_store" also carries ONE body key `outsideReason` (closed words `act_outside` / `root_moved` / `root_gone` / `root_reanchored`; absent when the engine did not say); every other code's body here is only `error` / `errorCode`.
3398
+ The 7.140.0–7.142.x store guard code is retired at server 7.143.0 (erasure answers the whole deployment).
3167
3399
  content:
3168
3400
  application/json:
3169
3401
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -3520,6 +3752,8 @@ paths:
3520
3752
  `400 request.field_invalid`) BEFORE any staging is opened, so a refused push leaves nothing behind. `null` CLEARS the destination back to the automatic title. After the
3521
3753
  commit (and on the `identical` short-circuit arm) the keys that were sent are replayed through the store's one write door. KEY NOT SENT = the destination's two bits stay (older callers).
3522
3754
  pinned: { type: boolean, description: 'server >= 7.125.0 (contract section 20): the session row''s pin from the manifest; judged by the PATCH reader (non-boolean is `400 request.field_invalid`); not sent = the destination''s pin stays.' }
3755
+ archived: { type: boolean, description: 'server >= 7.155.0: the session row''s archive bit from the manifest; judged by the PATCH reader; not sent = the destination''s bit stays. An older destination ignores it.' }
3756
+ projectId: { type: [string, 'null'], description: 'server >= 7.155.0: the session row''s project attribution from the manifest (`null` = unfile); judged by the PATCH reader; a destination whose project is marker-decided KEEPS its cell while the other cells apply. Not sent = unchanged; an older destination ignores it.' }
3523
3757
  resolution: { type: string, enum: [overwrite-dst], description: Override a fork/stale loss-of-history conflict. }
3524
3758
  logDigest:
3525
3759
  type: string
@@ -3767,6 +4001,14 @@ paths:
3767
4001
  a DENY (server >= 7.136.0) is answered `{ taskId, status: "failed", decision: "deny" }` instead — the card is voided and nothing resumes
3768
4002
  (see `ParkedDecideAccepted`, `ApprovalDecisionResult`). On a parked workflow-member card (server >= 7.155.0) the receipt is
3769
4003
  `recorded` or `delivered` (`WorkflowParkDecisionReceipt`): the decision is recorded; neither word means the gate is resolved.
4004
+ server >= 7.155.0 — three answers flip on a workflow member card whose row already holds a decision (codes and body shapes unchanged; "is that decision
4005
+ still in play" now reads the engine's recorded fate, not "the holder changed, so it was tried"): (1) deciding ANOTHER decision while the row's one was sent
4006
+ to an earlier holder and is still in play: `200` becomes `409 decide.claim_lost` (the pull leg hands that one to the current holder); conversely, while the
4007
+ row's one was sent to the current holder and the engine reads it as never usable: `409 decide.claim_lost` becomes `200` (superseded). (2) Deciding the SAME
4008
+ content while the row's one is in play at an earlier holder: `200`, the row is re-addressed to the current holder and the receipt's `decisionId` is the row's
4009
+ ORIGINAL one (it used to be newly minted). (3) On the resume lane, the same content while the carrier run is running, the holder unchanged and the engine
4010
+ reading it as out: a new run starts with a NEW `decisionId` (it used to replay the old receipt). An auto-approver that assumes "the holder changed, so
4011
+ deciding again succeeds" gets `409` in the first form of (1): read the queue row / workflow detail `decision.state` first (`open` / `carried` = in play).
3770
4012
  content:
3771
4013
  application/json:
3772
4014
  schema:
@@ -3951,6 +4193,11 @@ paths:
3951
4193
  `not_found.approval` (it used to 409 — a single-bit cross-tenant "who is parked on an approval"
3952
4194
  oracle); a legitimately-owned old token (a shell retrying its own already-decided row) keeps the
3953
4195
  attributable 409 + `terminal:"resolved"` verbatim.
4196
+ server >= 7.156.0 — `terminal` is a closed set of two words, `resolved` | `expired` (that row's status now; never beside
4197
+ `currentPending`): a decide retried by `boundCallId` with no gate pending answers 409 + `terminal` where it answered 404 before —
4198
+ a changed verdict / payload / digest, a checkpoint id naming another gate, someone deciding first, or the window's auto-deny ⇒
4199
+ `resolved`; a voided / reaped card, or an unrevivable parked child voided by a deny ⇒ `expired` (a timeout or void, not a verdict).
4200
+ An echoed old token whose row is still pending (superseded) carries no `terminal`. SDK `ApprovalStaleError.terminal`.
3954
4201
  PARKED-CHILD lane, K-24 (server >= 7.104.0 / S-790) — two codes gain a trigger, same code, same body keys:
3955
4202
  `decide.not_parked` (DecideParkMovedError) now also answers when the child's ROOT SESSION was deleted, or deleted
3956
4203
  and the same id re-registered as a new session (the decide leg reads the root session's occupant before and after
@@ -4021,6 +4268,68 @@ paths:
4021
4268
  application/json:
4022
4269
  schema: { $ref: '#/components/schemas/ErrorResponse' }
4023
4270
 
4271
+ /v1/approvals/{sessionId}/void:
4272
+ parameters:
4273
+ - $ref: '#/components/parameters/PrincipalHeader'
4274
+ - in: path
4275
+ name: sessionId
4276
+ required: true
4277
+ description: 'The card''s own session (the same id as `/decide`: the queue / inbox row''s `sessionId`).'
4278
+ schema: { type: string }
4279
+ post:
4280
+ tags: [approvals]
4281
+ operationId: approvalsVoid
4282
+ x-status: live
4283
+ summary: Void one pending approval card (server >= 7.155.0).
4284
+ description: >-
4285
+ server >= 7.155.0 (present iff `Capabilities.doors["POST /v1/approvals/:id/void"]`; usable iff `Capabilities.approvals`). Expires THIS card (a store CAS)
4286
+ - no decision is delivered, no model turn runs, no workflow record is rewritten. The way out for a card judged bad that no run waits on (row
4287
+ `wayOut: void_card`). Finds the card like `/decide` (the session's current gate) under the same owner face. A card that belongs to a run holding a
4288
+ claim (parked on it, or parking) is NOT voided (409 `conflict.session_active_run`; cancel that run instead). Voiding does not move a workflow past that
4289
+ step: resuming it may ask again; on this engine a resume with `resumeFromRunId` fails the whole resume - restart the workflow. Not behind the cost
4290
+ quota gate (a revoking action cannot spend). A resend after success answers 404 (the card left the pending set); the SDK does not retry it.
4291
+ requestBody:
4292
+ required: false
4293
+ content:
4294
+ application/json:
4295
+ schema: { $ref: '#/components/schemas/ApprovalVoidBody' }
4296
+ responses:
4297
+ '200':
4298
+ description: 'Voided. Exactly one of `checkpointId` / `checkpointIdMissing` (the gate identity read before voiding). The card leaves the pending surfaces (the stream emits `resolved`).'
4299
+ content:
4300
+ application/json:
4301
+ schema: { $ref: '#/components/schemas/ApprovalVoidResult' }
4302
+ '400':
4303
+ description: '`request.body_shape` (extra keys) · `request.field_invalid` (`checkpointId` not a non-empty string of at most 128 chars) · `decide_requires_binding` (no `checkpointId` and the session cannot be addressed alone; `missingKeys: ["checkpointId"]`).'
4304
+ content:
4305
+ application/json:
4306
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4307
+ '401': { $ref: '#/components/responses/Unauthorized' }
4308
+ '404':
4309
+ description: '`not_found.approval` - no such card, not yours (identical shape), or it left the pending set between read and commit. Nothing written.'
4310
+ content:
4311
+ application/json:
4312
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4313
+ '409':
4314
+ description: '`approval_stale` (the echoed `checkpointId` is not the current gate: body `currentPending: { checkpointId }` - $ref ApprovalStaleGate, the gate-id form shared with the plan_review door; SDK `ApprovalStaleError.currentGate` - or root `checkpointIdMissing`; server >= 7.156.0: a void retried with a `checkpointId` that names a card of this session already out of pending answers this 409 with root `terminal` - `resolved` | `expired`, never beside `currentPending` - where it answered 404 before, and never `200`: `expired` means the card left pending with no decision in force, which is what the void asked for) ·`conflict.session_active_run` (the card belongs to a run holding a claim; `activeTaskId`) · `decide.gate_moved` (lost the CAS to a concurrent settlement). Nothing written.'
4315
+ content:
4316
+ application/json:
4317
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4318
+ '429':
4319
+ description: '`limit.rate_exceeded`.'
4320
+ content:
4321
+ application/json:
4322
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4323
+ '501':
4324
+ description: '`capability.checkpoint_store_required` - no durable approval store.'
4325
+ content:
4326
+ application/json:
4327
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4328
+ '503':
4329
+ description: '`auth.service_token_required` (no-credential write gate) · `model_roster_pending`.'
4330
+ content:
4331
+ application/json:
4332
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
4024
4333
  /v1/approvals/{sessionId}/exemptions:
4025
4334
  parameters:
4026
4335
  - $ref: '#/components/parameters/PrincipalHeader'
@@ -4290,12 +4599,25 @@ paths:
4290
4599
  responses:
4291
4600
  '200':
4292
4601
  # 2026-07-25:同 resume —— 两条共用 `driveResumeIntoRunLog`,响应体逐字相同。
4602
+ # server 7.156.0 起多一支:计划门已结束而这份 `reject` 记着且相等 ⇒ 幂等重放体(铸点 `idempotentReplayBody`,与 /decide 的回放同一只)。
4293
4603
  description: >
4294
4604
  Resolved. 🔴 A 200 does NOT mean success — see `status`/`errorCode`/`retriable` (same body as §4b
4295
- resume; the two share one handler).
4605
+ resume; the two share one handler). TWO ARMS, discriminated by `idempotent`: the acceptance / synchronous-terminal
4606
+ body (`AssistantTaskStatus`) or, server >= 7.156.0, the idempotent replay (`DecisionReplayReceipt`, `decision: reject`) — only when this is
4607
+ a `reject` that carries `checkpointId` naming the plan gate and carries no resume restatement (`mcpServers` / `a2aPeers`), that gate has already
4608
+ ended, and the decision recorded on it is the same `reject` (equal reason); nothing resumes: no `taskId`, no `status`. A resend without the
4609
+ gate id, with a restatement, or of `approve` / `edit` never reaches the replay.
4296
4610
  content:
4297
4611
  application/json:
4298
- schema: { $ref: '#/components/schemas/AssistantTaskStatus' }
4612
+ schema:
4613
+ oneOf:
4614
+ - { $ref: '#/components/schemas/AssistantTaskStatus' }
4615
+ # 重放支 = 共用的闭形重放体 ∧ 这扇口只重放 `reject`(服务端 `idempotentReplayBody(run.sessionId, "reject")`)。
4616
+ - allOf:
4617
+ - { $ref: '#/components/schemas/DecisionReplayReceipt' }
4618
+ - type: object
4619
+ properties:
4620
+ decision: { type: string, enum: [reject] }
4299
4621
  '400':
4300
4622
  description: >
4301
4623
  `ErrorResponse`-shaped. Codes: "request.body_shape" (bad/missing `decision`, OR an unrecognised
@@ -4322,7 +4644,10 @@ paths:
4322
4644
  tool approval / resource_limit suspend (the checkpoint is never consumed). SEMANTIC (wrong-gate),
4323
4645
  NOT a session-CAS conflict. SDK → GateNotPlanReviewError.
4324
4646
  server >= 7.137.0: `errorCode:"approval_stale"` — the body carried `checkpointId` and it is not the session's pending plan gate; body `currentPending: { checkpointId }`
4325
- ($ref ApprovalStalePlanGate; SDK `ApprovalStaleError.currentPlanGate`). A narrow window after the stale check answers `conflict.not_resumable` (the claim-loser code; the decision is not recorded either).
4647
+ ($ref ApprovalStaleGate, the gate-id form of `currentPending` that the void door shares; SDK `ApprovalStaleError.currentGate`). A narrow window after the stale check answers `conflict.not_resumable` (the claim-loser code; the decision is not recorded either).
4648
+ server >= 7.156.0: with no plan gate pending, a `checkpointId` naming a plan gate of this run's session that has already ended answers this 409 with `terminal`
4649
+ (`resolved` | `expired`, never beside `currentPending`; SDK `ApprovalStaleError.terminal`) where it answered 404 before; a `reject` recorded and equal to this body
4650
+ answers `200` instead, the idempotent replay (`DecisionReplayReceipt`: `{ sessionId, idempotent: true, decision: "reject", bindingEnforced: true, decisionCommitted: true }`) with no `taskId` / `status`.
4326
4651
  content:
4327
4652
  application/json:
4328
4653
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -4783,7 +5108,10 @@ paths:
4783
5108
  Told apart by `errorCode` (all `ConflictError`): `conflict.session_active_run` (body `activeTaskId` — the run holding the session's durable claim, including one parked on an approval; wait or cancel it, then resend);
4784
5109
  `rewind.session_busy` (TRANSIENT — this engine process has work running / queued on the session or a write it issued has not settled; nothing was touched; resend after it ends);
4785
5110
  `conflict.session_workspace_unknown` (host lane — this process does not know the session's restorable working directory: the submit body's `cwd` is registered inside the server process and is gone after a server restart until the
4786
- next submit that carries `cwd`, or the registered directory is no longer on disk; real restore and `dryRun` judge the same, nothing written, the sentence never echoes a path — send a submit with `cwd` first, then resend);
5111
+ next submit that carries `cwd`, or the registered directory is no longer on disk; real restore and `dryRun` judge the same, nothing written, the sentence never echoes a path — send a submit with `cwd` first, then resend;
5112
+ server >= 7.155.0 adds body `reason`: `no_cwd` = no usable root (the body states no `cwd` and this process registered none) or `cwd_not_directory` = the directory to use is
5113
+ not on disk or is not a directory, then also `cwdSource`: `stated` (the body's own `cwd`; a stated one wins over the registered one) or `registered`; `no_cwd` carries no
5114
+ `cwdSource`, neither echoes a path, and both are absent on older servers);
4787
5115
  `rewind.files_env_unsupported` / `rewind.store_unconfigured` (no filesystem-mounting execution environment / no file-history store — the capability bit is false and the door answers 501 first; these rows are completeness: change the deployment);
4788
5116
  plus the shared execution-start refusals (`conflict.session_mirror` + `forkPath`, `conflict.fork_in_progress`, `conflict.session_id_retired`, `execution_lane.not_served` + `boundLane`).
4789
5117
  content:
@@ -4818,8 +5146,9 @@ paths:
4818
5146
  description: >
4819
5147
  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
4820
5148
  `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
4821
- 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`),
4822
- `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) ->
5149
+ points — the same judge as the run-level door), `model` (the submit body's fresh model judge: 400 `request.unknown_reference` + `available` / `request.model_unavailable` / `request.model_not_allowed`);
5150
+ any other key => 400 `request.body_shape` + `unknownKeys`. Server >= 7.155.0 (engine 7.69.1): summaries always run on the main model, so the summary-model keys `compactionModel` / `compaction` that
5151
+ 7.153.x / 7.154.x accepted here are retired — sent with any value they are 400 `request.body_shape`, `unknownKeys` naming them. Gate order: billing gates (503) -> rate / quota / lease (429) ->
4823
5152
  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 ->
4824
5153
  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
4825
5154
  `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
@@ -5421,14 +5750,7 @@ paths:
5421
5750
  required: true
5422
5751
  content:
5423
5752
  application/json:
5424
- schema:
5425
- type: object
5426
- required: [objective]
5427
- additionalProperties: true
5428
- properties:
5429
- objective: { type: string }
5430
- sessionId: { type: string }
5431
- jobId: { type: string, minLength: 1, maxLength: 64 }
5753
+ schema: { $ref: '#/components/schemas/LeaderRequest' }
5432
5754
  responses:
5433
5755
  '202':
5434
5756
  description: Leader run accepted.
@@ -5440,6 +5762,10 @@ paths:
5440
5762
  errorCode "request.body_shape" — a missing/blank `objective` or required field, OR a malformed
5441
5763
  `Idempotency-Key` (must be 1-255 chars with no leading/trailing whitespace). The key is validated
5442
5764
  LOUDLY rather than ignored: silently dropping a dedupe key permits a second real git push.
5765
+ Since server 7.156.0 a top-level key outside the nine is also `request.body_shape`, with
5766
+ `unknownKeys` / `unsupportedKeys` at the body root naming it (checked after `objective`, before the
5767
+ required fields); and a `durableRemote` the push step would certainly refuse is
5768
+ `request.field_invalid` at submit time (the message does not echo the address).
5443
5769
  content:
5444
5770
  application/json:
5445
5771
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -6532,11 +6858,18 @@ paths:
6532
6858
  RETIRED (zero alias): the 7.35.0–7.120.x `{reason}` "shutdown reason declaration" body (it only recorded a sentence and never
6533
6859
  drained) now answers 400 `request.field_invalid`; `/health.drainReason` and the `reason` key on 503 `draining` bodies are gone too.
6534
6860
  Gate order (same as every operator face): identity -> authorization -> body shape -> drain entry -> four-part identity.
6861
+ SERVER >= 7.156.0 — TWO BODY FORMS, exactly one: the identity form `DrainRequest` above, or the CREDENTIAL-NAMED form `CredentialDrainRequest`
6862
+ (gate on `capabilities.engine.credentialDrain`): the caller presents this process's `launch`-class service credential and the strict body names
6863
+ only `instanceId?` / `turns?` / `attachedAtMost?` (`{}` is the whole default form). An identity body that also carries `turns` / `attachedAtMost`
6864
+ ⇒ 400 `request.field_invalid` + `reason: not_a_drain_form` (it used to be accepted with the two keys stripped); `{}` on a deployment without
6865
+ `launch` ⇒ 409 `conflict.fleet_identity` (it used to be 400). Refusal bodies carry a machine `reason` on 403 `auth.operator_only`
6866
+ (`principal_not_on_roster` / `principal_absent` / `halt_needs_operate`) and on 400 `request.field_invalid` (`not_a_drain_form` /
6867
+ `deadline_beyond_bound`); an unmet `attachedAtMost` ⇒ 409 `conflict.drain_condition_unmet` with root `attached` / `attachedAtMost`.
6535
6868
  requestBody:
6536
6869
  required: true
6537
6870
  content:
6538
6871
  application/json:
6539
- schema: { $ref: '#/components/schemas/DrainRequest' }
6872
+ schema: { $ref: '#/components/schemas/DrainBody' }
6540
6873
  responses:
6541
6874
  '200':
6542
6875
  description: Draining (this call entered it) or already draining (the first drain's facts, unchanged).
@@ -7159,6 +7492,14 @@ paths:
7159
7492
  `adoption.table_missing` (server >= 7.148.0: a wired optional face — memory-engine DB backend / attachment store —
7160
7493
  whose table is missing on the database; body `{ adoptionId, tables[] }`; the arc is not settled — create the missing
7161
7494
  tables (restart a replica) and resend the same request). Since 7.148.0 the receipt's `legs[]` lists only the legs that ran.
7495
+ server >= 7.155.0, three more, none settling the arc (nothing moved; resend the same request once the condition is gone):
7496
+ `adoption.source_unmovable` (body `{ adoptionId, reason, conflicts[] }`: `uncarriable_rows` = a parked-card / stored-tool-result seat holds source rows
7497
+ this engine version cannot move — resend on a replica running the newest engine, or settle those rows; `scenario_subjects` = the source person has
7498
+ scenario-partitioned sessions / runs, which this version does not move);
7499
+ `adoption.pool_too_small` (body `{ adoptionId, poolLimit }`: the pool limit `MYSQL_POOL_SIZE` / `PG_POOL_SIZE` is below 2 — the arc needs two connections);
7500
+ `adoption.seat_unreadable` (body `{ adoptionId, leg, where? }`: a row an identity seat must read cannot be read — repair or delete it).
7501
+ Server >= 7.155.0 renames the engine-seat legs: `background_agent#record_json` / `background_agent#owner` / `checkpoint#checkpoint_blob` /
7502
+ `checkpoint#scope` are gone, `checkpoint#identity` / `tool_result#identity` are new, `session_policy#principal` / `background_agent#scope` keep their names.
7162
7503
  Either way both sides are byte-unchanged.
7163
7504
  content:
7164
7505
  application/json:
@@ -7643,6 +7984,10 @@ components:
7643
7984
  rather than reading it as anonymous-allowed); refused
7644
7985
  before any model call, nothing billed, and a retry cannot change the verdict (change the scope or have
7645
7986
  an operator grant it). Mapped to MemoryAdmissionError, NOT AuthError.
7987
+ (d) `auth.peer_system_ungoverned` (server >= 7.155.0) — the request comes from a `peer`-class service credential (one handed to an A2A peer) and the
7988
+ deployment's config center answers "not configured" for that peer system's governance identity `_peer:<system>` (or answers without the `configured`
7989
+ bit — an older center); refused at the execution start, zero runs. Body carries `party` (`_peer:<system>`) and `centerAnswer` (`unconfigured` |
7990
+ `unstated`). The way out is on the deployment side (give the peer system a row in the center; upgrade an old center), not a retry. Mapped to AuthError.
7646
7991
  Treat the list as OPEN: an unrecognized 403 code means "authenticated and refused", nothing finer.
7647
7992
  content:
7648
7993
  application/json:
@@ -7768,7 +8113,7 @@ components:
7768
8113
  # server 7.7.0([C132]/[3235]):+available/unavailableReason 两键——运行面可用性投影,与请求该
7769
8114
  # 场景时的 501 拒绝臂同一谓词(server `scenarioAvailability()` 单一属主);`enabled`=声明面、
7770
8115
  # `available`=运行面,两轴独立。封闭集从 8 键升 9 必填+1 条件键。
7771
- # server 7.155.0:200 体 = server `ScenarioCard`(详情行 + `scenarioCardOf` 多铸的两只条件键 `allowTools` / `handsReadOnly`;自铸登记表 `scenarioCardKey`)。
8116
+ # server 7.155.0:200 体 = server `ScenarioCard`(详情行 + `scenarioCardOf` 多铸的一只条件键 `allowTools`;自铸登记表 `scenarioCardKey`)。
7772
8117
  required: [name, source, builtin, summary, toolset, tools, promptSummary, enabled, available]
7773
8118
  additionalProperties: false
7774
8119
  properties:
@@ -7801,14 +8146,8 @@ components:
7801
8146
  `a2a__<name>__*`); nothing request-supplied, and the caller's `excludeTools` is not subtracted. Three states: absent = the face is not fixed (or an older server — check
7802
8147
  `capabilities.scenarios`); `[]` = this deployment gives the scenario no tools; non-empty = a subset. `tools` answers a different question (the host tools the definition brings).
7803
8148
  What a run actually mounted is its `wiring_manifest`. While present, a submit body that also carries `allowTools` is 400 `request.field_conflict` (`reason: "scenario_tool_face"`).
7804
- handsReadOnly:
7805
- type: boolean
7806
- enum: [true]
7807
- description: >-
7808
- server >= 7.155.0: the scenario's runs get the engine's read-only file hand (no write tools, no hand tools whose effect is not a file read, a read outside the run's read
7809
- roots refused without asking under every permission mode). The read roots are not only the attached folders: the request's read-only additional directories, the caller's `cwd`
7810
- (else the leg's temporary working directory), and read directories the same person allowed long-term before. Always `true` when present, present ONLY when the scenario
7811
- declares it (built-in `chat-folders` today); absent = it does not.
8149
+ The card has no separate "may it write / run commands" key: whether the scenario declares edits and a shell is whether this list holds `Write` / `Bash` (built-in
8150
+ `chat-folders` carries `code`'s hands, so it does); it is a declaration, not a governance reading — a deployment on `AUTONOMY=read-only` still mounts no write tools.
7812
8151
 
7813
8152
  ScenarioSkill:
7814
8153
  type: object
@@ -7856,6 +8195,9 @@ components:
7856
8195
  totalInputTokens:
7857
8196
  type: integer
7858
8197
  description: Normalized total input (prompt + cache reads) — the denominator most cost views want.
8198
+ fastSpeedCalls:
8199
+ type: integer
8200
+ description: 'server >= 7.155.0 (engine 7.69.0): how many of this run''s main-loop model calls the provider served at fast speed (their usage said `speed: fast`, the same judgment that prices them at the fast tier). A composition''s stats sum its legs; ABSENT when none. This server never opens fast mode (capability `task.fast_mode` is false), so it is structurally absent here.'
7859
8201
  costMicroUsd:
7860
8202
  type: integer
7861
8203
  description: >
@@ -8240,14 +8582,17 @@ components:
8240
8582
  service-owned governance.
8241
8583
  attachmentIds:
8242
8584
  type: array
8243
- maxItems: 16
8585
+ maxItems: 20
8244
8586
  items: { type: string }
8245
8587
  description: >-
8246
8588
  D-1 (server >=1.289): handles of pre-uploaded attachments (POST /v1/attachments). Bound to the
8247
- session at submit and materialized into the execution environment's `attachments/` directory; the
8248
- objective gets an appended notice (names/mime/sizes only — content never enters the durable
8249
- stream). Unknown/foreign id -> 400 on a fresh submit. Named `attachmentIds` because `attachments`
8589
+ session at submit and materialized into the execution environment's `attachments/` directory.
8590
+ Unknown/foreign id -> 400 on a fresh submit. Named `attachmentIds` because `attachments`
8250
8591
  is taken by the system-reminder attachment config key.
8592
+ server >= 7.155.0: the files reach the model ONLY through the attachment seat - one `{ path: "attachments/<name>" }` entry per attachment
8593
+ after the request's own `userAttachments` entries (the objective no longer gets an appended list); per-file outcomes in
8594
+ `human_input{carrier:"objective"}.attachments`; the cap is the seat's (today 20; <= 7.154.x: 16); a file handle on a run with no workspace =>
8595
+ 400 `config.user_attachment_invalid` (`reason: no_workspace`); resume / delivery legs no longer rebind.
8251
8596
  server >= 7.142.0, three 409s on a fresh submit (body carries `id`, plus `lane` on the second): `attachment.bound_elsewhere` (an attachment, once bound,
8252
8597
  stays with that session — upload it again for this one), `attachment.bundle_lane_not_isolated` (a project bundle binds only into an isolated lane:
8253
8598
  e2b / k8s / local-docker), `attachment.bundle_seed_fixed` (a session takes one project bundle). One refused id => none of the body's attachments bind.
@@ -8272,6 +8617,21 @@ components:
8272
8617
  type: array
8273
8618
  items: { type: string }
8274
8619
  description: 'core 5.11.0: extra READ-ONLY absolute host paths — read fence only (classify read-boundary auto-allow + read_file/grep containment); writes to the same dirs are still refused. Same shape/400 rules as additionalDirectories; servers <6.6.0 silently ignore (harmless additive).'
8620
+ classifyAllShell:
8621
+ type: boolean
8622
+ description: >-
8623
+ server >= 7.155.0 (gate on `Capabilities.classifyAllShell`) - TIGHTEN-ONLY, passed verbatim to the engine: `true` => in AUTO mode no shell allow rule
8624
+ (stored rules, the request's `settings.permissions.allow`, the deployment allow table, skill grants' shell rows) approves a command by itself - the calls
8625
+ they name go to the classifier; the read-only command lane and hook approvals are unchanged, deny / ask rows unchanged. Acts only under auto (judged per
8626
+ call); `false` = absent. Non-boolean => 400 `request.field_invalid`. Re-read by resume / delivery legs from the stored body; inherited by engine-built
8627
+ children and workflow members. Not accepted from `settings`. A server without the bit answers 400 `request.body_shape` for this key.
8628
+ fastMode:
8629
+ type: boolean
8630
+ description: >-
8631
+ server >= 7.156.0 (engine word `task.fast_mode`, constant true from 7.156.0) — FAST MODE (the same model's faster output tier, not another model),
8632
+ passed verbatim to the engine seat; all three submit doors; resume / delivery legs re-read the stored body; delegated children follow the parent leg.
8633
+ Non-boolean ⇒ 400 `request.field_invalid` (with `field`). An unsupporting model is NOT refused: the engine sends at standard speed and emits
8634
+ `model.capability_downgraded` (`capability: fast_mode`); read `GET /v1/models` rows' `fastMode` first. Servers <= 7.155.x answer 400 `request.body_shape`.
8275
8635
  userAttachments:
8276
8636
  type: array
8277
8637
  maxItems: 20
@@ -8281,7 +8641,10 @@ components:
8281
8641
  outcome is reported ONCE on the stream's `human_input{carrier:"objective"}` frame (`attachments[]`: ordinal / kind / outcome / label).
8282
8642
  The ENGINE owns the shape judgement: a malformed entry, more than 20 entries, a `text` entry whose line-numbered rendering exceeds the
8283
8643
  Read cap, an image failing admission, or a `path` entry on a lane without a workspace is refused BEFORE the first model call with
8284
- 400 `config.user_attachment_invalid` (sync leg; `config.` is not a prefix family ⇒ coded APIError). Objective-only: `/respond` refuses the
8644
+ 400 `config.user_attachment_invalid` (sync leg; `config.` is not a prefix family ⇒ coded APIError). Body: `field` (the field the engine's sentence names),
8645
+ `index?` (present when it names one attachment) and, server >= 7.155.0, `reason?` — `invalid_value` (the entry itself is malformed) / `no_workspace` (a `path`
8646
+ entry or a file handle on a run with no workspace) / `resume_leg` / `over_window` (the engine's other two arms — read its sentence), present iff the engine's word
8647
+ is in that closed set; absent on older servers. Objective-only: `/respond` refuses the
8285
8648
  key (400 `request.body_shape`, listed in `unsupportedKeys`); resume / delivery legs do not carry it. Probe `Capabilities.userAttachments`
8286
8649
  first — absent = older server (<= 7.130.x answers 400 `request.body_shape`), fold the attachment into the objective text instead.
8287
8650
  items:
@@ -8366,11 +8729,6 @@ components:
8366
8729
  properties:
8367
8730
  count: { type: integer }
8368
8731
  role: { type: string, description: A model role name. }
8369
- compactionModel:
8370
- type: string
8371
- description: >
8372
- Pin a SEPARATE (usually cheaper) model for compaction. Validated against the catalog on submit — an
8373
- unknown ref is a 400, not a silent fallback to the main model's price.
8374
8732
  appendSystemPrompt: { type: string, description: Text appended to the assembled system prompt for this task. }
8375
8733
  outputStyle:
8376
8734
  type: object
@@ -8393,7 +8751,7 @@ components:
8393
8751
  wake:
8394
8752
  type: string
8395
8753
  description: >-
8396
- 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
8754
+ Server >= 7.153.0 (send only when the engine capability word `task.wake` is true — `capabilities["task.wake"]`, by the whole dotted string; server 7.153.x has only the former top-level bit `wake`, which server 7.155.0 no longer mints; an older server answers 400 `request.body_shape`): the WAKE leg — a leg that carries no input of its own and
8397
8755
  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
8398
8756
  (`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
8399
8757
  (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
@@ -8518,6 +8876,14 @@ components:
8518
8876
  `complianceAdditionalDenies` (`mcp_servers` | `workflows` | `web_fetch` | `org_memory_mount`) and `permissions.neverAuto` (tool names that ALWAYS ask a human). Each seat = the deployment table UNION the request list, ONLY EVER GROWING
8519
8877
  (the request face has no loosening arm); an empty array is the same as not sent. Bad value => 400 `request.field_invalid` with `field` + `reason` (`over_cap` + `count` + `cap` / `bad_entry` + the first bad `index`).
8520
8878
  Caps: 1000 entries per seat, EXCEPT `readDenyPatterns`: at most 32 entries, at most 2 `*` per path segment and 16 `*` in the whole table (every star counts, nothing is folded). A `neverAuto` name that can never match any tool => 422.
8879
+ server >= 7.155.0 adds TWO more tighten-only seats, accepted only where the tools run on this host — gate on the capability words
8880
+ `task.agent_config_dirs` / `task.agent_home_dirs` being strictly `true`: `agentConfigDirs` (the caller's configuration roots — the engine places the
8881
+ configuration-directory read-deny and write-protection rows below each, as below its own) and `agentHomeDirs` (the caller's homes — the home-anchored
8882
+ read-deny rows are placed below each). Each: at most 32 non-empty strings (`over_cap` / `bad_entry` + `index`); `[]` / `null` = not sent; a non-empty list
8883
+ on a cloud sandbox / device / ssh / adb / handless lane => 400 `request.field_invalid` with `reason: lane_not_host`; not an absolute existing directory =>
8884
+ 400 `config.agent_config_dir_invalid` / `config.agent_home_dir_invalid` on all three submit doors before any row is created (a resume whose directory was
8885
+ removed meanwhile => 409 `checkpoint.config_refused`). Arrival: `wiring_manifest.declaredPlaces` (leg start) and `TaskResult.effectiveAgentConfigDirs` /
8886
+ `effectiveAgentHomeDirs` (terminal). The same names at the body's TOP level are refused (400 `request.body_shape`, the sentence points here).
8521
8887
  A resume replay of a stored body whose seat went bad => 409 `resume_blocked_by_policy`. A compliance deny is a REFUSAL, not a narrowing: a request denying `web_fetch` is refused whole where the default tool surface still mounts `WebFetch` (the single-user default does).
8522
8888
  🔴 `settings.approvalFrameFamilies` (server >= 7.134.0; send it on sight of `capabilities.taskSettings.approvalFrameFamilies === true` — NOT of the top-level
8523
8889
  `capabilities.approvalFrameFamilies`, which <= 7.133.x already has while answering 400 `request.body_shape` for this key): the approval opening-frame FAMILIES this
@@ -8587,7 +8953,7 @@ components:
8587
8953
  type: string
8588
8954
  enum: [sidechain]
8589
8955
  description: >-
8590
- 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.
8956
+ 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 400 `request.precondition_unmet` (the session would otherwise be created as a top-level conversation), and a kind outside the closed set answers 400 `request.field_invalid` — both before anything is written.
8591
8957
  cwd:
8592
8958
  type: string
8593
8959
  description: >-
@@ -8904,13 +9270,6 @@ components:
8904
9270
  allowDegrade: { type: boolean }
8905
9271
  allowFailover: { type: boolean }
8906
9272
  bypassBreaker: { type: boolean, description: 'Operator-only; silently dropped for non-operator callers.' }
8907
- compaction:
8908
- type: object
8909
- description: >-
8910
- 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
8911
- (the same judge as `POST /v1/sessions/{id}/compact`); before it was accepted and the key silently dropped at assembly.
8912
- properties:
8913
- clampTolerance: { type: number }
8914
9273
 
8915
9274
  TerminalCause:
8916
9275
  description: >
@@ -9025,16 +9384,24 @@ components:
9025
9384
  the run completed on that turn; every other completion leaves it absent.
9026
9385
 
9027
9386
  TerminalCompletedDetail:
9028
- type: object
9029
- additionalProperties: false
9030
9387
  description: >
9031
- The account a `completed` cause may carry (server >= 7.126.0; core 7.49.0 `dist/core/terminal-cause.d.ts`, key-for-key). `kind` is CLOSED with one
9032
- member: `finish_reason_unknown` — the final turn's provider ended it with a stream-end word the engine does not read; the turn was kept as
9033
- the model left it and the run announced it (`route.finish_reason_unknown`). Read it as "completed, but the last answer may be cut", never as a failure.
9034
- required: [kind, finishReasonUnknown]
9035
- properties:
9036
- kind: { const: finish_reason_unknown }
9037
- finishReasonUnknown: { type: string, description: 'The provider''s stream-end word in the provider echo shape (bytes outside it become `?`); not an engine word.' }
9388
+ The account a `completed` cause may carry (server >= 7.126.0; core `dist/core/terminal-cause.d.ts`, key-for-key), discriminated by `kind` (CLOSED; an engine
9389
+ minor may add a member, so branch with a default arm): `finish_reason_unknown` — the final turn's provider ended it with a stream-end word the engine does
9390
+ not read; the turn was kept as the model left it and the run announced it (`route.finish_reason_unknown`). `response_cut` (server >= 7.155.0, engine 7.69.0)
9391
+ — the final turn's answer stopped arriving before the provider ended it (the stream went silent past its idle window, or the connection closed under it) and
9392
+ what had arrived was kept as the answer: `result` holds it, and it may be incomplete. Read either as "completed, but the last answer may be cut", never as a failure.
9393
+ oneOf:
9394
+ - type: object
9395
+ additionalProperties: false
9396
+ required: [kind, finishReasonUnknown]
9397
+ properties:
9398
+ kind: { const: finish_reason_unknown }
9399
+ finishReasonUnknown: { type: string, description: 'The provider''s stream-end word in the provider echo shape (bytes outside it become `?`); not an engine word.' }
9400
+ - type: object
9401
+ additionalProperties: false
9402
+ required: [kind]
9403
+ properties:
9404
+ kind: { const: response_cut }
9038
9405
 
9039
9406
  TerminalCause_failed:
9040
9407
  type: object
@@ -9288,6 +9655,27 @@ components:
9288
9655
  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.
9289
9656
  `toolName` / `remedy` pass the egress seat. present-iff at least one was refused — never empty.
9290
9657
  items: { $ref: '#/components/schemas/RefusedAsk' }
9658
+ continuesFrom:
9659
+ oneOf:
9660
+ - type: object
9661
+ required: [sessionId, entryId]
9662
+ additionalProperties: true
9663
+ properties: { sessionId: { type: string }, entryId: { type: string } }
9664
+ - type: object
9665
+ required: [none]
9666
+ additionalProperties: true
9667
+ properties: { none: { type: string, enum: [run_open, nothing_taken_in, unsettled] } }
9668
+ description: >-
9669
+ server >= 7.155.0 (engine 7.69.0; passed through verbatim, the value shape is the engine's): where the session continues from after this call.
9670
+ `{ sessionId, entryId }` = the leaf after the last write this call's own leg landed (a branch made of this call's own writes; with no other writer it is the session's leaf, another writer may append after it);
9671
+ `{ none: "run_open" }` = the run has not ended (the leg parked durably on a gate, or its resume put the approval back to pending); `{ none: "nothing_taken_in" }` = the leg landed no write (usually its input never got in) or no leg ran (a leg that ended in a throw with nothing written and nothing in flight reads the same);
9672
+ `{ none: "unsettled" }` = where the leg left the session is not settled (a write not yet settled at the close, a write landed on a leaf another writer had moved, an open tool call a reconcile would close by appending, an unreadable branch, or the leg ended in a throw after writing or with a write in flight). Closed three words, final.
9673
+ A composition (verify gate / cascade / repair loop) hands its own fold. Do NOT take it for a redo point yet: the engine says `resumeAt`'s `at` mode is not accepted for every value. ABSENT = the engine that produced the result does not have this member (an older engine's record).
9674
+ verdictRefused:
9675
+ allOf: [{ $ref: '#/components/schemas/VerdictRefusal' }]
9676
+ description: >-
9677
+ server >= 7.155.0 (engine 7.69.0): PRESENT-IFF a verdict call of this run's leg was refused at the gate and none was delivered (the run also announced one `task.verdict_refused` notice, the same record); a paused result never carries it.
9678
+ The verify gate's verifier leg says the same fact under `verification.verdictRefused`.
9291
9679
  effectiveReasoning:
9292
9680
  allOf: [{ $ref: '#/components/schemas/ResolvedReasoning' }]
9293
9681
  description: >-
@@ -9387,7 +9775,10 @@ components:
9387
9775
  type: object
9388
9776
  required: [model]
9389
9777
  additionalProperties: true
9390
- properties: { model: { type: string }, code: { type: string } }
9778
+ properties:
9779
+ model: { type: string }
9780
+ code: { type: string }
9781
+ fixHint: { type: string, description: 'server >= 7.155.0 (engine 7.69.0): the fix sentence the route judgment stated for that hop (ABSENT when it stated none; a credential refusal names the root the credential belongs to). A sentence for people, NOT a match key (triage reads `code`); passes the egress seat (credential-shaped fragments replaced).' }
9391
9782
  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.' }
9392
9783
  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.' }
9393
9784
  atTurn: { type: integer }
@@ -9410,13 +9801,16 @@ components:
9410
9801
  verification:
9411
9802
  type: object
9412
9803
  description: >-
9413
- Present when run behind the verify gate. Only `verdict` / `rounds` / `findings` are declared here; the engine outcome can
9804
+ Present when run behind the verify gate. Only `verdict` / `rounds` / `findings` (and `allowanceExhausted`, `verdictRefused`) are declared here; the engine outcome can
9414
9805
  carry more (`unverifiedReason`, `verifierPause`), not declared yet. From server 7.141.0 on `verifierPause` never carries the
9415
9806
  verifier session's resume credential `checkpointToken` outward (the exit seal strips it); a <= 7.140.x server could.
9416
9807
  properties:
9417
9808
  verdict: { type: string, enum: [PASS, FAIL, PARTIAL, unverified] }
9418
9809
  rounds: { type: integer }
9419
9810
  findings: { type: array, items: { type: string } }
9811
+ verdictRefused:
9812
+ allOf: [{ $ref: '#/components/schemas/VerdictRefusal' }]
9813
+ description: 'server >= 7.155.0 (engine 7.69.0): PRESENT-IFF the verifier submitted its verdict and the gate refused it (the engine says `unverifiedReason: no_verdict` alongside) - the gate stopped the verdict, the verifier is not broken. Same record as the top-level `verdictRefused`, about the verifier leg.'
9420
9814
  allowanceExhausted:
9421
9815
  type: object
9422
9816
  additionalProperties: false
@@ -9442,9 +9836,24 @@ components:
9442
9836
  server >= 7.149.0, PRESENT-IFF the run WENT AHEAD while its read-deny rules are not byte-enforced: the read-deny table has rows, the execution
9443
9837
  environment (lane) does not keep the byte floor, and the deployment did not set `READ_DENY_FLOOR_REQUIRED=true` (when it did, the synchronous
9444
9838
  `POST /v1/tasks` answers 409 `config.read_deny_floor_unkept` and the asynchronous legs land the same code on the terminal row - the run does not go).
9445
- ABSENT = no such disclosure: the run did not start (entry budget gate / refused submit), the table is empty, the lane keeps the byte floor, or an older
9446
- server - absence does NOT prove the read-deny rules were kept. Landings, one value: `GET /v1/runs/{taskId}` -> `result.readDenyFloor` ·
9839
+ server >= 7.155.0 reads the ENGINE RESULT's own member (the leg's lifetime latch; a composed entry — verify gate / cascade / repair loop — folds its
9840
+ legs, any leg not keeping it carries it): a second and later run in the same session that went ahead carries it too (the notice frame is once per
9841
+ session, this cell is per run), and read-deny rows added mid-run count. ABSENT = no such disclosure: the run did not start (entry budget gate / refused
9842
+ submit), the lane keeps the byte floor, or an older server; a verifier leg or a delegated child that stops keeping it mid-run is not on the parent's cell
9843
+ (engine limit) - absence does NOT prove the read-deny rules were kept. Landings, one value: `GET /v1/runs/{taskId}` -> `result.readDenyFloor` ·
9447
9844
  `POST /v1/tasks/stream` -> `done.result.readDenyFloor` · the `POST /v1/tasks` 200 body at its top level · the ledger `done` row's `result`. Shape: `ReadDenyFloorSummary`.
9845
+ effectiveAgentConfigDirs:
9846
+ type: array
9847
+ items: { type: string }
9848
+ description: >
9849
+ server >= 7.155.0: the run's EFFECTIVE caller configuration roots (the engine's set = this request's `settings.agentConfigDirs` UNION a resumed row's,
9850
+ de-duplicated by the engine; the caller's own paths, relayed verbatim). PRESENT iff a non-empty list was sent, this deployment accepts it (tools run on this
9851
+ host: `capabilities["task.agent_config_dirs"] === true`) and the run reached an engine terminal. ABSENT: not sent / `[]` / `null` / an older server / a
9852
+ terminal this server minted itself (cancelled while parked, a folded store error). Arrival at leg start: `wiring_manifest.declaredPlaces`.
9853
+ effectiveAgentHomeDirs:
9854
+ type: array
9855
+ items: { type: string }
9856
+ description: 'server >= 7.155.0: the run''s EFFECTIVE caller homes (`settings.agentHomeDirs`); presence / absence exactly as `effectiveAgentConfigDirs` (capability word `task.agent_home_dirs`).'
9448
9857
 
9449
9858
  abortCause:
9450
9859
  allOf: [{ $ref: '#/components/schemas/AbortCause' }]
@@ -9732,6 +10141,13 @@ components:
9732
10141
  weakest of three roots (data root · sealed-key directory · the wired file-memory root); a SQL backend delegates the data root to
9733
10142
  the database (always `durable`); a local store reads the mount its data root sits on, undecidable ⇒ `unknown` (never folded to
9734
10143
  `durable`). A server <= 7.147.x does not send it (it sent the boolean).
10144
+ weakest:
10145
+ type: array
10146
+ items: { $ref: '#/components/schemas/StoreWeakestRoot' }
10147
+ description: >-
10148
+ server >= 7.155.0 (always present on such servers) - WHICH roots pulled the summary `durability` down: the roots whose own verdict equals the summary word,
10149
+ each exactly `{root, rule}`, in root order (data -> sealed key directory -> memory root); with a `durable` summary it lists the durable roots; no root
10150
+ at all => `[]` with `unknown`. Byte-identical to `/health.store.weakest` (one projection, one beat). Never carries paths. Absent = an older server.
9735
10151
  degradedReason:
9736
10152
  type: string
9737
10153
  enum: [db_unreachable, local_unwritable]
@@ -10504,9 +10920,8 @@ components:
10504
10920
  allOf: [{ $ref: '#/components/schemas/LeaderRunResult' }]
10505
10921
  description: >
10506
10922
  The leader run's terminal payload. sdk 9.7.0 declares the two segments a consumer actually renders
10507
- (`conflict` / `salvaged`) and leaves the rest open — see `LeaderRunResult`. (The SDK's TS side keeps
10508
- `LeaderRecord.result: unknown` for one more version: pointing it at the named type is a NARROWING,
10509
- which RELEASE.md reserves for a major. Cast it: `record.result as LeaderRunResult`.)
10923
+ (`conflict` / `salvaged`) and leaves the rest open — see `LeaderRunResult`. sdk 47.0.0: the SDK's TS side
10924
+ types `LeaderRecord.result` as `LeaderRunResult` too (it was `unknown` before, read through a cast; the cast still compiles).
10510
10925
  error: { type: string }
10511
10926
  cancelRequested:
10512
10927
  type: boolean
@@ -10627,7 +11042,7 @@ components:
10627
11042
  additionalProperties: true
10628
11043
  description: 'Replan-lite: which trigger won arbitration and what was done. 🔴 The closed set LOST `merge-conflict` in 7.83.0 (S-113, hard breaking, zero aliases): a merge that does not apply is no longer replanned, it is handed to the user.'
10629
11044
  properties:
10630
- trigger: { type: string, description: 'suspended | budget | verify-fail | worker-failed.' }
11045
+ trigger: { type: string, description: 'suspended | budget | verify-fail | worker-failed | plan-rejected (since server 7.156.0: the plan was refused twice at planning time and the run proceeded on the single route; filled only when none of the three post-dispatch triggers fired).' }
10631
11046
  redispatched: { type: array, items: { type: string } }
10632
11047
  collapsed: { type: string }
10633
11048
 
@@ -10683,6 +11098,7 @@ components:
10683
11098
  # /v1/approvals row, so a compliant client has no way to obtain a correct value for it.
10684
11099
  boundCallId: { type: string, minLength: 1, description: '= PendingCheckpoint.boundCallId (the bound pendingAction.toolCallId). An empty string reads as missing (400 decide_requires_binding).' }
10685
11100
  boundInputHash: { type: string, minLength: 1, description: 'Echo PendingCheckpoint.boundInputHash byte-for-byte; server-minted opaque, NEVER recompute. An empty string reads as missing (400 decide_requires_binding).' }
11101
+ checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.155.0 (gate on `Capabilities.doors["POST /v1/approvals/:id/decide"]` containing it): the gate you saw (echo the row''s `checkpointId`). Not the session''s current pending gate => 409 `approval_stale`, nothing written; a resend of the same body after the first decision landed => 200 `idempotent: true`. An older server answers 400 `request.body_shape` for this key.' }
10686
11102
  updatedInput:
10687
11103
  description: >
10688
11104
  Approve-with-edit (design/37 last-wins): operator's rewritten tool args, applied AFTER the binding
@@ -10724,9 +11140,11 @@ components:
10724
11140
  (`decision: "approve"`, `decidedBy` absent or `person`): on a deny or a `decidedBy: "policy"` decision ⇒ 400 `request.field_conflict` with
10725
11141
  `reason: "approval_feedback"` and `fields` `["feedback", "decision"]` (root keys since server 7.148.0; `detail.kind` / `detail.fields` before) / `["feedback", "decidedBy"]` (a denial's words go in `reason`);
10726
11142
  a non-string ⇒ 400 `request.field_invalid`; any value on a direct-door worker ⇒ 400 `feedback_not_in_proof` (not inside the signed proof); words
10727
- carrying `<system-reminder>` ⇒ server >= 7.135.0 (engine 7.55.0): 409 `resume_outcome_invalid` + `field: "feedback"` + `retriable: true` (the engine's sentence naming `feedback`; refused before the CAS, the card stays pending — ask the person to change
10728
- or drop the words, do not auto-refetch and re-decide on the code); server 7.134.x: 409 `approval_binding_mismatch` (no `field`). The same door serves parked background-agent cards and workflow child cards; the live
10729
- `POST /v1/tasks/{taskId}/asks/{askId}/decision` does NOT take it. Servers <= 7.133.x refuse the key (400 `request.body_shape`, `unknownKeys: ["feedback"]`).
11143
+ carrying `<system-reminder>` ⇒ server >= 7.156.0: 400 `request.field_invalid` + `field: "feedback"` at the door (after reading the decider, before existence; the card is untouched — the
11144
+ same door functions as `POST /v1/tasks/{taskId}/asks/{askId}/decision`); servers 7.135.0 – 7.155.x (engine 7.55.0): 409 `resume_outcome_invalid` + `field: "feedback"` + `retriable: true` (refused by the
11145
+ engine before the CAS, the card stays pending); server 7.134.x: 409 `approval_binding_mismatch` (no `field`). In every generation ask the person to change or drop the words — do not auto-refetch and re-decide on the code.
11146
+ The same door serves parked background-agent cards and workflow child cards; the decision door `POST /v1/tasks/{taskId}/asks/{askId}/decision` takes the key from server 7.156.0
11147
+ (capability `approvalFeedback`), not before. Servers <= 7.133.x refuse the key (400 `request.body_shape`, `unknownKeys: ["feedback"]`).
10730
11148
  decidedVia:
10731
11149
  allOf: [{ $ref: '#/components/schemas/ApprovalDecidedVia' }]
10732
11150
  description: 'server >= 7.143.0 (capability `approvalDecidedVia`): which seat answered a `decidedBy: "policy"` decision. Only beside `decidedBy: "policy"`; `null` is not absence (400); any value on a direct-door worker ⇒ 400.'
@@ -10792,18 +11210,6 @@ components:
10792
11210
  (`skills[]` / `agents[].skills[]`) carrying `mods` is refused 400 `request.field_invalid` (registrations are code the deployment mounts, not request data). Do not project a skill
10793
11211
  frontmatter's hooks into the request until this reads `true`. ABSENT = a server <= 7.136.x (does not compile them either).
10794
11212
  modsDeploymentPackages: { type: boolean, enum: [true], description: 'server >= 7.138.0 - this process loaded operator-declared mod packages at boot (`MODS_ROOT` / `MODS_PACKAGES`, at least one): the literal `true`; otherwise the key is ABSENT (never `false`, so absence means none declared or an older server). Same fact as `/health` `mods.deploymentPackages`.' }
10795
- planReviewCheckpointId:
10796
- type: boolean
10797
- description: >-
10798
- 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
10799
- 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
10800
- key: ABSENT = an older server (7.86.0-7.136.x answer the key with 400 `request.body_shape`; older ones drop it silently).
10801
- wake:
10802
- type: boolean
10803
- description: >-
10804
- 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,
10805
- carries no input of its own). Read it BEFORE sending the key: ABSENT = an older server (answers `400 request.body_shape`).
10806
- 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).
10807
11213
  language:
10808
11214
  type: boolean
10809
11215
  description: >-
@@ -10840,7 +11246,7 @@ components:
10840
11246
  items: { type: string, enum: [sidechain] }
10841
11247
  description: >-
10842
11248
  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,
10843
- where `sessionKind` on a submit answers 501). ABSENT = an older server.
11249
+ where `sessionKind` on a submit answers 400 `request.precondition_unmet`). ABSENT = an older server.
10844
11250
  sessionRewindFilesCwd:
10845
11251
  type: boolean
10846
11252
  description: >-
@@ -10852,22 +11258,39 @@ components:
10852
11258
  description: >-
10853
11259
  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
10854
11260
  attachments (`TaskRequest.userAttachments`). ABSENT = an older server / engine: read it as "not promised", not as "absent capability".
10855
- checkpointIdMissing:
10856
- type: boolean
10857
- description: >-
10858
- 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.
10859
- ABSENT = an older server (the key never appears; a missing `checkpointId` there only means an old row).
10860
11261
  task.wake:
10861
11262
  type: boolean
10862
11263
  description: >-
10863
11264
  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`
10864
- (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).
11265
+ (a version fact, today always `true`). It reads the SAME fact as the older top-level bit `wake` (both were projected in 7.154.x; the older bit is no longer minted from server 7.155.0 on and this schema no longer declares it). ABSENT = server <= 7.153.x (only the older bit exists: read it by its whole key `caps["wake"]`).
10865
11266
  file_history.recorded_place:
10866
11267
  type: boolean
10867
11268
  description: >-
10868
11269
  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
10869
- (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`)
11270
+ (the engine's `unplacedHistoryRecordedUnder`)? ALWAYS `false` on 7.154.x; server >= 7.155.0 reads whether the out-of-run rewind door `POST /v1/sessions/{sessionId}/rewind-files` accepts its
11271
+ vouching member `unplacedHistoryRecordedInCwd` (the door resolves AND the caller's `cwd` is honoured). A false bit only tells a shell not to send it — the per-file refusals (`recorded_elsewhere` / `place_unrecorded`)
10870
11272
  do not read this bit and happen regardless, and it is not the "is rewind usable" bit (that is `sessionRewindFiles`). ABSENT = an older server.
11273
+ ask.workflow_member:
11274
+ type: boolean
11275
+ description: 'ENGINE CAPABILITY WORD (seventh; server >= 7.155.0 projects it, always `false`): the engine''s workflow-member asks and pending rows carry `workflowRunId` / `workflowAgentLabel`. A false word = this service does not promise it. ABSENT = an older server.'
11276
+ task.fast_mode:
11277
+ type: boolean
11278
+ description: 'ENGINE CAPABILITY WORD (eighth; server >= 7.155.0 projects it, always `false`): the engine reads `TaskSpec.fastMode`. A false word = this service does not promise it. ABSENT = an older server.'
11279
+ user_attachments.instruction_access:
11280
+ type: boolean
11281
+ description: 'ENGINE CAPABILITY WORD (ninth; server >= 7.155.0 projects it, always `true`): a `path` attachment counts as an access, and the instruction files of its directory load with it. ABSENT = an older server.'
11282
+ task_notification.note_key:
11283
+ type: boolean
11284
+ description: 'ENGINE CAPABILITY WORD (tenth; server >= 7.155.0 projects it, always `false`): every `task_notification` the engine pushes states `noteKey`. A false word = this service does not promise it. ABSENT = an older server.'
11285
+ task.agent_config_dirs:
11286
+ type: boolean
11287
+ description: >-
11288
+ ENGINE CAPABILITY WORD (eleventh; server >= 7.155.0): this deployment ACCEPTS the request seat `settings.agentConfigDirs` (the caller's configuration roots; see
11289
+ `TaskRequest.settings`) — `true` only where the tools run on this host; `false` on cloud sandbox / device / ssh / adb / handless lanes (a non-empty list there is
11290
+ 400 `request.field_invalid` with `reason: lane_not_host`). Send the key only when this is strictly `true`. ABSENT = an older server (the key is 400 `request.body_shape`).
11291
+ task.agent_home_dirs:
11292
+ type: boolean
11293
+ description: 'ENGINE CAPABILITY WORD (twelfth; server >= 7.155.0): this deployment accepts `settings.agentHomeDirs` (the caller''s homes) — same deployment column and the same reading as `task.agent_config_dirs`.'
10871
11294
  credentialPlane:
10872
11295
  allOf: [{ $ref: '#/components/schemas/CredentialPlaneCapability' }]
10873
11296
  description: >-
@@ -10895,7 +11318,7 @@ components:
10895
11318
  type: boolean
10896
11319
  description: >-
10897
11320
  server >= 7.147.0 (facility + config): `POST /v1/sessions/{id}/rewind-files` resolves on this deployment = file-history store ∧ session head read ∧ anchor store ∧ an execution lane with hands ∧ a workspace that survives one
10898
- execution (multi-tenant host / local-docker / e2b / k8s are false) ∧ the session store is owned by this process (`DB_BACKEND=local`; mysql / pg are false). False => the door answers 501. `FILE_HISTORY_CAPTURE=false` does not affect it.
11321
+ execution (multi-tenant host / local-docker / e2b / k8s are false); <= 7.154.x also required the session store to be owned by this process (`DB_BACKEND=local`; mysql / pg false) - server >= 7.155.0 drops that cell (rewind and preview hold a run claim; the three backends follow one rule). False => the door answers 501. `FILE_HISTORY_CAPTURE=false` does not affect it.
10899
11322
  Distinct from `rewindFilesTo` (rewind as part of a submit, running a run). ABSENT = an older server (the door 404s).
10900
11323
  sessionRewindFilesPreview:
10901
11324
  type: boolean
@@ -11166,13 +11589,6 @@ components:
11166
11589
  hookFailureNotice: { type: boolean, description: 'server >= 7.48.0 (#281): this binary emits a SECOND `hook_notice` kind, `hook_non_blocking_failure` (the user''s own hook broke: exit != 0 and != 2 / timeout / spawn failure / bad JSON). Absent = an older worker that only emits `hook_decision_unavailable` — branch by `kind`, never crash on an unknown one.' }
11167
11590
  leaseClient: { type: boolean, description: 'server >= 7.121.0, a version bit (always true, rides with the `fleet` object): this binary carries the serving-lease CLIENT — when the engine is a fleet member (`FLEET_GENERATION`) and the center declares in its heartbeat reply that it answers renewals (`servingLease`), the engine renews and is governed by the lease. Deliberately NOT named `servingLease` (that is the center''s bit): this says the client exists, not that a lease is in force — read `/health.leaseState` for that. Absent = an older worker.' }
11168
11591
  generationEcho: { type: boolean, description: 'server >= 7.121.0, a version bit (always true, rides with the `fleet` object): this binary echoes env `FLEET_GENERATION` as `generation` on the heartbeat and on `/health` (with `leaseState` / `leaseUntil`), and the drain endpoint `POST /v1/admin/drain` compares the four-part identity including `expectedGeneration`. Absent = an older worker.' }
11169
- workspace:
11170
- type: boolean
11171
- enum: [false]
11172
- description: >
11173
- The workspace-browse bit — ALWAYS `false` on every supported server (>= 7.52.0: the whole-tree snapshot epoch was replaced by
11174
- per-edited-file rewind history; the four /v1/sessions/{sessionId}/workspace* routes answer 501 `capability.workspace_retired`, route shape kept as a
11175
- tombstone). sdk 26.0.0 deleted the object arm `{ browse, archive, maxFileBytes }` (servers 1.299–7.51, below the support floor).
11176
11592
  sessionEvents:
11177
11593
  type: boolean
11178
11594
  description: >
@@ -11188,7 +11604,6 @@ components:
11188
11604
  permissionModeWrite: { type: boolean, description: "server >= 7.141.0: whether `POST /v1/runs/{taskId}/permission-mode` (the SDK's `runs.setPermissionMode`) is wired on this deployment — a FACILITY bit: a durable run store AND the checkpoint store (`DURABLE_APPROVAL`) => `true`; either missing => `false`, and the route answers 501 `capability.run_store_required` / `capability.checkpoint_store_required`. On <= 7.140.x it was not tied to a facility (always `false`: no such route)." }
11189
11605
  modelSelection: { type: boolean, description: "`model` accepted per request." }
11190
11606
  effortSelection: { type: boolean, description: "`reasoningEffort` accepted per request." }
11191
- compactionModel: { type: boolean, description: "A separate model may be pinned for compaction." }
11192
11607
  appendSystemPrompt: { type: boolean, description: "Per-request system-prompt append is honoured." }
11193
11608
  outputStyle:
11194
11609
  type: boolean
@@ -11228,12 +11643,6 @@ components:
11228
11643
  Filter `mcpServers` entries with it before submitting (the submit face is unchanged: a kind outside it is still a whole-request
11229
11644
  400). Read OPEN — no enum here: an unknown word means "this client does not support that kind", never a failed parse (the
11230
11645
  bit grows words with new kinds). ABSENT = an older server (7.135.0–7.140.x: read it as `["stdio", "http"]`).
11231
- mcpAssertionHeaderSent:
11232
- type: boolean
11233
- description: >-
11234
- server >= 7.133.0 — the SEND seat self-report (a boolean, today ALWAYS `false`): whether `mcpServers[].transport.assertionHeader` (accepted since server 7.128.0, mutually exclusive with `principalHeader`)
11235
- is actually SENT to the MCP peer. `false` = the declaration is carried but NOT sent (the same switch drives the key stripping, the operator info line and the probe-door refusal; the disclosure sentences leave when it turns true).
11236
- ABSENT = an older server, which does not send either — treat it as `false`; never rely on the header for peer authentication.
11237
11646
  mcpProbe:
11238
11647
  type: boolean
11239
11648
  description: >
@@ -11481,6 +11890,7 @@ components:
11481
11890
  env: { type: boolean, description: 'TRUE on the single-user host lane (server emits `cwdHonored(config)`). It is NOT hard-coded false any more — the old always-false value predated the per-task shellEnv seam and hid a live capability.' }
11482
11891
  hooks: { type: boolean, description: 'Single-user deployments only (`requirePrincipal !== true`).' }
11483
11892
  autoCompactEnabled: { type: boolean, description: 'server >= 7.146.0, constant true — the request key `settings.autoCompactEnabled` (boolean; handed verbatim to the engine''s auto-compaction seat `compaction.autoCompact`; absent = the deployment seat''s default, i.e. on) is accepted. ABSENT = an older server (the key answers 400 `request.body_shape`).' }
11893
+ pluginOptionSubstitution: { type: boolean, description: 'server >= 7.156.0 (same predicate as `hooks`) — this deployment''s executor is the ONLY replacer of `${user_config.<key>}` placeholders in plugin command-hook command lines (one pass at spawn, into the spawn copy only); a shell-form placeholder / an exec form naming an unset key ⇒ that hook does not run; a vault-reference option value ⇒ accepted, that hook does not run (word `no_option_channel`). Send placeholder text verbatim only when true; absent = an older server (the executor does not replace — pre-substitute as before); false = a multi-tenant lane (hooks do not run).' }
11484
11894
  pluginHooks: { type: boolean, description: 'server >= 7.133.0 — the request `settings.hooks[]` PLUGIN-CONTEXT keys (command entry `plugin { name, root, dataDir?, options? }` / exec-form `args`) are accepted; same predicate as `hooks` (single-user true, multi-tenant false). ABSENT or false = the keys are stripped silently — send only on sight of the bit.' }
11485
11895
  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).' }
11486
11896
  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.' }
@@ -11764,11 +12174,13 @@ components:
11764
12174
  model: { type: string }
11765
12175
  refusedBy:
11766
12176
  type: string
11767
- enum: [center.autoMode, center.allowAutoMode, both]
12177
+ enum: [center.autoMode]
11768
12178
  description: >-
11769
12179
  server >= 7.148.0 — present ONLY with `armed: false` + `reason: org_denied` when the CENTER itself refused auto: which
11770
- center entitlement key refused it (`both` = both keys). Absent when the center could not answer (the server's
12180
+ center entitlement key refused it. Absent when the center could not answer (the server's
11771
12181
  fail-closed refusal), when the local `PERMISSIONS_DISABLE_AUTO_MODE` wins (`local_denied`), and on servers <= 7.147.x.
12182
+ server >= 7.156.0 has one word left, `center.autoMode` (the contract package folds the center's auto refusal into one source);
12183
+ servers 7.148.0 – 7.155.x may still answer `center.allowAutoMode` / `both`, which mean the same action: change the center's auto key.
11772
12184
  readFace:
11773
12185
  type: ["string", "null"]
11774
12186
  enum: [open, roots, null]
@@ -11933,7 +12345,8 @@ components:
11933
12345
  properties:
11934
12346
  provider: { type: string, enum: [none, host, e2b, k8s, ssh, adb, local-docker, device], description: 'Eight words, the server''s `ExecutionLane`. `none` = the deployment declared no execution environment (no hands; server >= 7.147.0, `REMOTE_EXEC=none`); servers 7.97.0–7.146.x answered `in-process` at this position, which this contract no longer accepts.' }
11935
12347
  toolsOnThisHost: { type: boolean, description: 'The tools run on the process that answered this request (server-absolute paths mean something to the model''s tools).' }
11936
- isolated: { type: boolean, description: 'server >= 7.106.0 (S-281): the hands run inside an OS-level isolation boundary (value = the lane table''s `isolation` bit via the single boolean door `laneIsolated`). PRESENT-IFF this lane has hands — `none` ⇒ absent, not false.' }
12348
+ isolated: { type: boolean, description: 'server >= 7.106.0 (S-281): the hands run inside an OS-level isolation boundary (value = the lane table''s `isolation` bit via the single boolean door `laneIsolated`). PRESENT-IFF this lane has hands — `none` ⇒ absent, not false. FROZEN since server 7.155.0 (value = `capabilities.isolation`, present iff `capabilities.io`); removed by the server no later than 7.157.0 — read `capabilities`.' }
12349
+ capabilities: { allOf: [{ $ref: '#/components/schemas/ExecutionLaneCapabilities' }], description: 'server >= 7.155.0 (always present on such servers) - this lane''s execution-environment capability block, the engine''s nine booleans verbatim (also for `none`: the engine stub''s block, `io: false` - read `io` first). A deployment-level reading, not a per-run one. Absent = an older server.' }
11937
12350
  taskWriteFaceOpen:
11938
12351
  type: boolean
11939
12352
  description: >
@@ -12053,19 +12466,382 @@ components:
12053
12466
  lists are accepted but the engine does not read them — they are silently inert and there is NO 400 to probe, so do not
12054
12467
  expect them to stop a tool (fence with deny rules instead); on a delegated agent's skill they are an unknown key that
12055
12468
  rejects the whole skill.
12056
- WriteProtectionCapability:
12057
- type: object
12058
- additionalProperties: false
12059
- description: >
12060
- server >= 7.63.0 (S-138) — the WRITE-PROTECTION TABLE's posture on this deployment. The engine's
12061
- literal name table downgrades a locatable write (Write / Edit / NotebookEdit) that lands on a table
12062
- row from `allow` to `ask`, so a shell can tell in advance that those paths will raise a card.
12063
- 🔴 THE THREE ARE DELIBERATELY NOT FOLDED INTO ONE BOOLEAN: folded, "the engine's default table is
12064
- in place" and "an operator swapped in a table of their own" both read `true`, and those two say
12065
- different things to an operator.
12066
- 🔴 MINIMUM DISCLOSURE: the per-row names/kinds are NOT here — a deployment-authored row can carry
12067
- an internal path name, and listing them tells anyone who wants around them which names are NOT
12068
- protected. Rows live on the operator face `GET /v1/diagnostics/wiring` -> `writeProtection.rows`.
12469
+ sessionRowCells:
12470
+ type: array
12471
+ items: { type: string }
12472
+ description: >-
12473
+ server >= 7.155.0 - the session row's WRITABLE cells on this deployment: the words that may appear in a `PATCH /v1/sessions/{sessionId}` body
12474
+ (today `["title","pinned","archived","projectId"]`; no durable session store => `[]` and PATCH answers 501). `"archived"` present => the session list
12475
+ honours `?archived=true|false` (absent = only unarchived rows); `"projectId"` present => it honours `?projectId=`. Conditional writes have no bit of their own
12476
+ (a row carrying `rowTag` supports them). A future cell is one more word (read open), never a new bit. ABSENT = an older server: only `title` / `pinned`
12477
+ are writable (the two new keys answer 400 `request.body_shape`, nothing written).
12478
+ classifyAllShell:
12479
+ type: boolean
12480
+ enum: [true]
12481
+ description: >-
12482
+ server >= 7.155.0 (constant true) - the submit body accepts the top-level `classifyAllShell` (see `TaskRequest.classifyAllShell`). ABSENT = this server does
12483
+ NOT know the key (it answers 400 `request.body_shape` naming it in `unknownKeys`), not "off": a client must not silently drop the key (that discards a
12484
+ tightening the user wrote) - tell the person this server cannot honour it.
12485
+ hookEnv:
12486
+ allOf: [{ $ref: '#/components/schemas/HookEnvCapability' }]
12487
+ description: >-
12488
+ server >= 7.155.0 - the environment variable NAMES a command hook inherits from the server process (names only, never values). PRESENT-IFF this
12489
+ deployment accepts request hooks (the same predicate as `taskSettings.hooks`). Absent with `taskSettings.hooks: true` = an older server or the
12490
+ composition was refused this moment => unknown, do not narrow. The list describes the replica that answered this request.
12491
+ doors:
12492
+ type: object
12493
+ additionalProperties:
12494
+ oneOf:
12495
+ - { type: array, items: { type: string } }
12496
+ - { type: 'null' }
12497
+ description: >-
12498
+ server >= 7.155.0 (always present) - the DOOR -> accepted-keys table. Key = a door name `<METHOD> <path template>` (several methods joined with `|`;
12499
+ a door's first path parameter that is an id is written `:id`, the others by segment name, e.g. `POST /v1/tasks/:id/asks/:askId/decision`; an optional
12500
+ segment is `{/:name}`). Value `string[]` = the door body's accepted set (lexicographic; flattened closed layers as dotted paths, e.g.
12501
+ `settings.permissions.defaultMode`) - a top-level key or flattened path outside it is a 400 `request.body_shape` naming it; `[]` = the door takes no body
12502
+ key (GET-only doors do not read a body; the halt door needs an empty body); `null` = the door exists but its key set is not registered here (read
12503
+ that surface's own bit, never "accepts nothing"). Members of list / discriminated / open / sub-object layers are not listed and their refusal is not
12504
+ promised. It describes what this BUILD accepts, not what this deployment honours. The decision verbs that take `checkpointId` as gate-identity echo
12505
+ are the rows whose value contains it (today decide / void / plan_review). ABSENT = an older server: read that generation's per-key bits.
12506
+ attachmentIdsInSeat:
12507
+ type: boolean
12508
+ description: >-
12509
+ server >= 7.156.0, constant true — uploaded handles `attachmentIds` go through the attachment seat: their count cap = `userAttachments.limits.maxEntries`
12510
+ (the same number), and handle-derived entries share the one seat with inline `userAttachments` entries (over the seat ⇒ 400
12511
+ `config.user_attachment_invalid`, whole seat, no `index`; over the handle table itself ⇒ 400 `request.rejected`). ABSENT on servers <= 7.154.x
12512
+ (old form: an independent cap of 16, handles do not take seats) AND on the shipped 7.155.0 (already the new form, without the bit — read the server
12513
+ version to tell those two apart). It answers only "do handles take seats", not the cap (read `userAttachments`) nor "is `attachmentIds` accepted".
12514
+ hookProgress: { type: boolean, description: 'server >= 7.156.0, constant true — the live stream (`POST /v1/tasks/stream`) carries every engine-minted `hook_progress` frame (live only; never in the ledger or a replay). True ⇒ the frame MAY come; its absence proves nothing. Absent = an older server.' }
12515
+ instructionFamily:
12516
+ oneOf:
12517
+ - $ref: '#/components/schemas/InstructionFamilyCapability'
12518
+ - type: 'null'
12519
+ description: >-
12520
+ server >= 7.156.0 (config-dependent) — the project instruction-file family the deployment declares to the engine (sub-keys verbatim the engine's
12521
+ `TaskSpec.instructionFamily` declaration form, the same value every leg's spec carries). `null` = the deployment declares none
12522
+ (`PROJECT_MEMORY_ENABLED=false`). It says what the deployment declares, not what a run read (that is the leg's `wiring_manifest.instructions`).
12523
+ Absent = an older server.
12524
+ appendSystemPromptMaxChars: { type: integer, minimum: 1, description: 'server >= 7.156.0, always present (a build fact, a positive integer) — the cap on the top-level `appendSystemPrompt` (JS string length; today 16384); over it ⇒ 400 `request.field_invalid` with `cap` of the same number.' }
12525
+ settingsOutputStyleMaxChars: { type: integer, minimum: 1, description: 'server >= 7.156.0, always present — the cap on `settings.outputStyle` (the style BODY), the same constant and the same refusal as `appendSystemPromptMaxChars`.' }
12526
+ mcpHostReads: { type: boolean, description: 'server >= 7.156.0, constant true — the session MCP panel''s engine host reads: each `GET /v1/sessions/{id}/mcp` `servers[]` entry MAY carry `prompts` / `resources` / `resourceTemplates`, and `POST /v1/sessions/{id}/mcp/prompts/get` exists. It says the server supports them, not that a given answer carries all three. Absent = an older server.' }
12527
+ a2aPeers: { type: boolean, description: 'server >= 7.156.0 (facility-dependent) — `GET /v1/a2a/peers` is available (this replica''s per-peer state `published` / `pending` / `effective` / `revoked` + the publish switch). Absent = an older server (the door answers 404 `not_found.route`).' }
12528
+ approvalFeedback: { type: boolean, description: 'server >= 7.156.0 (facility + config) — whether the decision door `POST /v1/tasks/{taskId}/asks/{askId}/decision` ACCEPTS the person''s words to the agent `feedback` = that door is up (same fact as `streamApproval`) ∧ not a direct-door deployment. It says accepted, not delivered (read the first-decision receipt''s `feedbackForwarded`). Absent = an older server (that door answers 400 `request.body_shape` for `feedback`).' }
12529
+ permissionModeArbitration:
12530
+ type: array
12531
+ items: { $ref: '#/components/schemas/PermissionModeArbitrationRow' }
12532
+ description: >-
12533
+ server >= 7.156.0 (per caller) — what this deployment turns each submitted permission-mode word into: one row per word, in `permissionModes` order,
12534
+ each the answer of the ONE admission judge the submit doors and the in-flight mode-switch door share. Unavailable ⇔ `deny` present or
12535
+ `admitted ≠ mode`; unknown ⇔ `admitted = mode`, no `deny` and `engine: "unknown"` (no row reads as "certainly runs as the word" today). Absent = an older server.
12536
+ permissionModeWhenUnset:
12537
+ oneOf:
12538
+ - $ref: '#/components/schemas/PermissionMode'
12539
+ - type: 'null'
12540
+ description: >-
12541
+ server >= 7.156.0 (per caller) — the mode a submit that names no mode word starts in (the word the submit door writes into the stored body):
12542
+ `plan` ⇔ operator `AUTONOMY=plan`; `auto` ⇔ an isolating sandbox lane ∧ `SANDBOX_DEFAULT_PERMISSION_MODE=auto` ∧ auto arms for this caller now;
12543
+ otherwise `null` (the submit door stamps no word). ABSENT = an older server, NOT `null`.
12544
+ scheduledTasks: { type: boolean, description: 'server >= 7.156.0 (facility-dependent) — the caller''s scheduled-task doors `GET /v1/scheduled` · `DELETE /v1/scheduled/{id}` exist (the scheduler backend is wired). false ⇒ both answer 501 `capability.scheduler_required` (NOT an empty table). Absent = an older server (404).' }
12545
+ sessionScheduledTasks: { type: boolean, description: 'server >= 7.156.0 (facility-dependent) — the session''s scheduled-task doors `GET /v1/sessions/{id}/scheduled` · `DELETE /v1/sessions/{id}/scheduled/{entryId}` exist (scheduler wired ∧ the session head read is up). false ⇒ both answer 501 (NOT an empty table). Absent = an older server.' }
12546
+ sessionWorktree: { type: boolean, description: 'server >= 7.156.0 (facility + config) — whether a session may declare its own worktree at open (submit body `workspace`): single-principal with hands on this worker''s disk ∧ a local session store ∧ the worktree probe present. false ⇒ a body carrying `workspace` answers 409 `workspace.isolation_unavailable`; `GET /v1/worktree-capability` answers 501. Absent = an older server (`workspace` is an unknown key, 400).' }
12547
+ InstructionFamilyCapability:
12548
+ type: object
12549
+ description: 'server >= 7.156.0 — `Capabilities.instructionFamily`: the four members are always present; sub-keys verbatim the engine''s declaration form.'
12550
+ additionalProperties: false
12551
+ required: [files, rulesDirs, alternate, includes]
12552
+ properties:
12553
+ files: { type: array, items: { type: string }, description: 'The file names each layer reads (relative, `/`-separated; declaration order = read order).' }
12554
+ rulesDirs: { type: array, items: { type: string }, description: 'The rules directories each layer lists (recursive `.md`; attached to the main family, read when the alternate family takes effect too).' }
12555
+ alternate:
12556
+ type: object
12557
+ additionalProperties: false
12558
+ required: [files, when]
12559
+ properties:
12560
+ files: { type: array, items: { type: string } }
12561
+ when: { type: string, enum: [absent, also], description: '`absent` = read only when no main-family name member exists under the task root; `also` = read both.' }
12562
+ includes: { type: boolean, description: 'Whether `@path` includes inside instruction files are followed (only targets inside the root).' }
12563
+ PermissionModeArbitrationRow:
12564
+ type: object
12565
+ description: 'server >= 7.156.0 — one row of `Capabilities.permissionModeArbitration` (the admission judge''s answer for one mode word, projected verbatim).'
12566
+ additionalProperties: false
12567
+ required: [mode, admitted, engine]
12568
+ properties:
12569
+ mode: { $ref: '#/components/schemas/PermissionMode' }
12570
+ admitted: { $ref: '#/components/schemas/PermissionMode' }
12571
+ foldedBy:
12572
+ allOf: [{ $ref: '#/components/schemas/PermissionModeAdmissionFold' }]
12573
+ description: 'Present ⇔ `admitted` differs from `mode`: the station where the judge changed the word (the same closed set as the permission-mode switch receipt''s `admission.foldedBy`; in this table only `entry_floor` occurs today).'
12574
+ engine: { type: string, enum: [unknown], description: 'The engine-side fold reading; today always `unknown` (the service cannot read the engine''s fold).' }
12575
+ deny: { $ref: '#/components/schemas/PermissionModeDeny' }
12576
+ PermissionModeDeny:
12577
+ type: object
12578
+ description: 'server >= 7.156.0 — present on a `permissionModeArbitration` row ⟺ this caller''s synthesized caps set an engine deny bit for the admitted word (the engine folds it back to `default` at launch).'
12579
+ additionalProperties: false
12580
+ required: [bit]
12581
+ properties:
12582
+ bit: { type: string, enum: [bypassPermissions, autoMode] }
12583
+ source: { type: string, enum: [org, local, settings], description: 'The auto deny bit''s source (engine `AUTO_MODE_DENY_SOURCES`); absent on bypass rows.' }
12584
+ refusedBy: { type: string, enum: [center.autoMode], description: 'When the center itself refused auto: which entitlement key (same word set as `permissionModeAuto.refusedBy`).' }
12585
+ fault: { type: boolean, enum: [true], description: 'The caps read threw this time; read as denied (then `source` / `refusedBy` are absent).' }
12586
+ GateEchoedLiteral:
12587
+ type: object
12588
+ additionalProperties: false
12589
+ description: 'One entry of the denied gate disposition''s `echoed` (server >= 7.146.0): a literal the refusal sentence quotes. `value` / `canonical` pass the server''s egress seat (display text).'
12590
+ required: [kind, value]
12591
+ properties:
12592
+ kind: { type: string, description: 'Engine closed set, read open: `path` (the refused path) | `command` (the spelling the row matched) | `pattern` (the row pattern).' }
12593
+ value: { type: string }
12594
+ canonical: { type: string, description: 'The canonical target the sentence also names; present only when it differs from `value`.' }
12595
+ HookEnvCapability:
12596
+ type: object
12597
+ additionalProperties: false
12598
+ description: '`Capabilities.hookEnv` (server >= 7.155.0).'
12599
+ required: [inheritedNames]
12600
+ properties:
12601
+ inheritedNames:
12602
+ type: array
12603
+ items: { type: string }
12604
+ description: >-
12605
+ Lexicographic, NAMES ONLY: the twelve base names (PATH, HOME, SHELL, USER, LOGNAME, TERM, TZ, LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, TMPDIR) present in the
12606
+ server process environment, plus the names the deployer put back with `HOOK_ENV_ALLOW` that are present and whose value is not one of this server's
12607
+ credentials. Per-request additions (`settings.env` keys, `CLAUDE_PROJECT_DIR`, the entry's own plugin context names) are not in the list.
12608
+ ExecutionLaneCapabilities:
12609
+ type: object
12610
+ additionalProperties: false
12611
+ description: >-
12612
+ `Capabilities.executionLane.capabilities` (server >= 7.155.0) - the engine's `ExecutionEnvCapabilities` verbatim, nine booleans, every key required (key
12613
+ meanings owned by the engine; the engine adding a key adds one here).
12614
+ required: [isolation, suspendable, sharesProcessTable, canonicalPathAuthoritative, hostLocalPaths, externalContentTarget, io, keepsReadFloor, commandSandbox]
12615
+ properties:
12616
+ isolation: { type: boolean, description: 'Commands run inside a sandbox that IS the security boundary (container, microVM, pod); = `executionLane.isolated`.' }
12617
+ suspendable: { type: boolean, description: 'The environment can be snapshot and restored.' }
12618
+ sharesProcessTable: { type: boolean, description: 'Its commands are processes on the same process table as the engine process.' }
12619
+ canonicalPathAuthoritative: { type: boolean, description: 'Its canonical path is the authority on where a path lands.' }
12620
+ hostLocalPaths: { type: boolean, description: 'A path it names is the same file on the engine host''s filesystem (with `io`: `toolsOnThisHost`).' }
12621
+ externalContentTarget: { type: boolean, description: 'Content it produces originates from a target outside the deployment''s trust boundary (a personal device, an unmanaged host).' }
12622
+ io: { type: boolean, description: 'Its filesystem and shell faces reach a target; `false` only for a placeholder that refuses everything (`provider: none`) - read it first.' }
12623
+ keepsReadFloor: { type: boolean, description: 'It keeps the read-deny byte floor a command start carries (or refuses the start).' }
12624
+ commandSandbox: { type: boolean, description: 'It keeps a command start inside the OS sandbox the start carries (or refuses the start).' }
12625
+ StoreWeakestRoot:
12626
+ type: object
12627
+ additionalProperties: false
12628
+ description: 'One cell of `StoreCapability.weakest` / `/health.store.weakest` (server >= 7.155.0): which root, by which rule. Exactly two keys; no paths.'
12629
+ required: [root, rule]
12630
+ properties:
12631
+ root: { type: string, description: '`data` (data root) | `sealed_key` (sealed key directory) | `memory` (file memory root, only when the file memory engine is wired). Read open.' }
12632
+ rule: { type: string, description: 'The rule word (same closed set as the operator diagnostics `storeDurability.roots[].rule`): backend_memory, backend_sql, fs_volatile, k8s_empty_dir, k8s_persistent_volume, network_fs, block_device, unrecognized_mount, mount_unresolved, mountinfo_unreadable, mountinfo_malformed, path_unresolvable, not_linux. Read open.' }
12633
+ FastModeReading:
12634
+ type: object
12635
+ description: 'server >= 7.156.0 — the engine''s `FastModeReading` verbatim: `reason` present iff something stands in fast mode''s way; `cooldown` present iff `state` is `cooldown`.'
12636
+ additionalProperties: false
12637
+ required: [state]
12638
+ properties:
12639
+ state: { type: string, enum: ['off', cooldown, 'on'] }
12640
+ reason: { type: string, enum: [not_first_party, model_not_allowed, unknown, preference, extra_usage_disabled] }
12641
+ cooldown:
12642
+ type: object
12643
+ additionalProperties: false
12644
+ required: [until, reason]
12645
+ properties:
12646
+ until: { type: number, description: 'epoch ms' }
12647
+ reason: { type: string, enum: [rate_limit, overloaded] }
12648
+ ApprovalCardRedactedKey:
12649
+ type: string
12650
+ enum: [args]
12651
+ description: 'server >= 7.156.0 — the closed set of `ApprovalCard.redactedKeys` members (server `APPROVAL_CARD_REDACTED_KEYS`): card members whose bytes the exit redaction rewrote.'
12652
+ ParkedRowRedactedKey:
12653
+ type: string
12654
+ enum: [input]
12655
+ description: 'server >= 7.156.0 — the closed set of `PendingCheckpoint.redactedKeys` members (server `PARKED_ROW_REDACTED_KEYS`): row members whose bytes the exit redaction rewrote.'
12656
+ StuckCardWord:
12657
+ type: string
12658
+ enum: [row, resume_input_absent, gate_unlisted]
12659
+ description: >-
12660
+ server >= 7.156.0 — why a card cannot be decided here (one reader, one projection, on every face: the operator queue row and its stream frame,
12661
+ the inbox row, the per-ask read's parked arm, the decision-family refusal bodies): `row` = the engine row judge reads it not ok;
12662
+ `resume_input_absent` = judged ok, but the task-level decision leg's resume context is missing and no parked background / workflow lane owns it;
12663
+ `gate_unlisted` = judged ok, but its gate kind is not one this release registers. Present ⟺ no decision lands here; `wayOut` beside it says the way out.
12664
+
12665
+ ApprovalWayOut:
12666
+ type: string
12667
+ enum: [cancel_run, void_card, newer_worker]
12668
+ description: >-
12669
+ The way-out word (closed; server `RowWayOut`, self-minted `rowRefusalWayOut` in order): what a person does with a card the engine judged not resumable here.
12670
+ One minting and one set for the decision-door 409 body (`ResumeLegConflictError.wayOut`) and the three pending rows (queue row, `/v1/approvals/stream`
12671
+ `pending` frame, inbox row). `cancel_run` (>= 7.149.0) cancel the run; `void_card` (>= 7.155.0) a bad card no run waits on - void it
12672
+ (`POST /v1/approvals/{sessionId}/void`); `newer_worker` (>= 7.149.0) a newer worker can resume it.
12673
+ WorkspaceChangedDirectory:
12674
+ type: object
12675
+ additionalProperties: false
12676
+ description: >-
12677
+ One entry of `workspace_changed.directories` (server >= 7.155.0): an additional root this leg ACTUALLY mounted. The path members are path identity -
12678
+ not redacted, not truncated, not rewritten; compare `declared` byte-for-byte with what you sent. Only landed entries are listed.
12679
+ required: [declared, access, at]
12680
+ properties:
12681
+ declared: { type: string, description: 'The caller''s own string (`additionalDirectories` / `additionalReadDirectories` entry), byte-identical to the request.' }
12682
+ access: { type: string, description: '`read` (from `additionalReadDirectories`) | `write` (from `additionalDirectories`); engine closed set, passed through - keep a default arm.' }
12683
+ at: { type: string, description: 'Where it landed after the engine canonicalized it.' }
12684
+ tree: { type: string, description: 'Present iff this additional root lands inside the SESSION''s own tree (the tree''s directory, `SessionCheckoutEntry.dir`). Server >= 7.156.0 accepts the submit body''s `workspace` declaration, which is what makes a session tree exist; before that it was always absent.' }
12685
+ SessionCheckoutRoot:
12686
+ description: 'server >= 7.156.0 — which declared root of the session''s workspace a checkout entry or a declaration member stands for: the word `taskRoot` (the leg''s task root) or `{ directory }` (an additional directory the declaration named).'
12687
+ oneOf:
12688
+ - { type: string, enum: [taskRoot] }
12689
+ - type: object
12690
+ additionalProperties: false
12691
+ required: [directory]
12692
+ properties:
12693
+ directory: { type: string, minLength: 1 }
12694
+ SessionCheckoutSource:
12695
+ type: object
12696
+ additionalProperties: false
12697
+ description: 'server >= 7.156.0 — the declared code source of one repository on a `workspace_changed.session[]` entry: the remote, the commit it is pinned to and, when declared, the ref.'
12698
+ required: [remote, sha]
12699
+ properties:
12700
+ remote: { type: string, minLength: 1 }
12701
+ sha: { type: string, minLength: 1 }
12702
+ ref: { type: string }
12703
+ SessionCheckoutEntry:
12704
+ type: object
12705
+ additionalProperties: false
12706
+ description: >-
12707
+ server >= 7.156.0 (engine 7.69.0) — one entry of `workspace_changed.session`: the session's checkout of ONE repository. `repository` = the repository's root; `root` = the declared root
12708
+ this entry was made for; `baseSha` = the commit the session's code starts from. `dir` / `name` / `branch` / `baseRef` (present together) = the session's own tree of that repository, where
12709
+ every declared root in it works; `source` = the declared code source for that repository. Path members (`repository`, `dir`, `root.directory`) are path identity: not redacted, not truncated.
12710
+ required: [repository, root, baseSha]
12711
+ properties:
12712
+ repository: { type: string, minLength: 1 }
12713
+ root: { $ref: '#/components/schemas/SessionCheckoutRoot' }
12714
+ baseSha: { type: string, minLength: 1 }
12715
+ dir: { type: string, minLength: 1, description: 'The session''s own tree of this repository (with `name` / `branch` / `baseRef`).' }
12716
+ name: { type: string, minLength: 1 }
12717
+ branch: { type: string, minLength: 1 }
12718
+ baseRef: { type: string, enum: [fresh, head, source], description: 'The base the session''s tree was made from (the engine''s closed set; present together with `dir` / `name` / `branch`).' }
12719
+ source: { $ref: '#/components/schemas/SessionCheckoutSource' }
12720
+ SessionCheckoutDeclarationSource:
12721
+ type: object
12722
+ additionalProperties: false
12723
+ description: 'server >= 7.156.0 — one declared code source on a `workspace_changed.declaration`: which root it is for, the remote, the pinned commit and, when declared, the ref.'
12724
+ required: [root, remote, sha]
12725
+ properties:
12726
+ root: { $ref: '#/components/schemas/SessionCheckoutRoot' }
12727
+ remote: { type: string, minLength: 1 }
12728
+ sha: { type: string, minLength: 1 }
12729
+ ref: { type: string }
12730
+ SessionCheckoutDeclaration:
12731
+ type: object
12732
+ additionalProperties: false
12733
+ description: >-
12734
+ server >= 7.156.0 (engine 7.69.0) — the normalized workspace declaration of a session's checkout (`workspace_changed.declaration`): the value to send back, unchanged, as the submit body's
12735
+ `workspace` on every later leg. Every member is optional.
12736
+ properties:
12737
+ isolation: { type: string, enum: [worktree] }
12738
+ baseRef: { type: string, enum: [fresh, head] }
12739
+ name: { type: string, minLength: 1 }
12740
+ roots:
12741
+ type: array
12742
+ items: { $ref: '#/components/schemas/SessionCheckoutRoot' }
12743
+ sources:
12744
+ type: array
12745
+ items: { $ref: '#/components/schemas/SessionCheckoutDeclarationSource' }
12746
+ SessionCheckoutTree:
12747
+ type: object
12748
+ additionalProperties: true
12749
+ description: >-
12750
+ server >= 7.156.0 — one row of `SessionCheckoutReceipt.trees`: one worktree the engine's release door judged, its members passed through the server's exit seats (`path` through the path-identity seat, shown
12751
+ through the display seat instead when that seat cannot carry it; `branch` / `detail` display text). The row is open on purpose (the server may add keys without a version word).
12752
+ required: [path, removed]
12753
+ properties:
12754
+ path: { type: string, description: 'The tree''s directory as the engine named it.' }
12755
+ removed: { type: boolean, description: 'true = the tree was removed; false = it stays on disk (then `kept` says why).' }
12756
+ kept:
12757
+ type: string
12758
+ enum: [dirty, ignored, commits, unverifiable, requested, not_owned]
12759
+ description: >-
12760
+ Present iff `removed` is false — why it stays (the engine's closed set, passed through): `dirty` / `ignored` / `commits` = the tree this session was given stays only because it holds something (the receipt's `wayOut` then
12761
+ says what to do); `unverifiable` = its state could not be read; `not_owned` = its mark is not the one this allocation made (no clean-up way out is given: check first); `requested` = the caller asked to keep it
12762
+ (this service never asks; the word is in the set and does not occur today).
12763
+ branch: { type: string, description: 'Present iff the tree''s branch still exists after the release (display text: credential-shaped text redacted, capped at 500 characters — to show a person, not a promise to be byte-identical for a git command).' }
12764
+ detail: { type: string, description: 'Present iff the engine gave a sentence for this tree (human text, not a branch point).' }
12765
+ SessionCheckoutReceipt:
12766
+ description: >-
12767
+ server >= 7.156.0 — `DELETE /v1/sessions/{sessionId}` 200 `checkout`: what became of the session's own worktrees. THREE ARMS discriminated by `outcome` (always present; the same
12768
+ three-arm union as the server's own type): `released` (the engine's release door judged each tree: `trees`, and `wayOut` when a tree of this session's own stays),
12769
+ `not_attempted` (no tree was touched: `reason`), `failed` (the release door threw: `code` and `message`) — each arm's members are required on that arm. The release only
12770
+ reports, it never blocks the delete. Every arm is open on purpose (the server may add keys without a version word).
12771
+ oneOf:
12772
+ - type: object
12773
+ additionalProperties: true
12774
+ required: [outcome, trees]
12775
+ properties:
12776
+ outcome: { type: string, enum: [released] }
12777
+ trees:
12778
+ type: array
12779
+ items: { $ref: '#/components/schemas/SessionCheckoutTree' }
12780
+ description: 'One row per tree the engine''s release door judged, `[]` when the session had none.'
12781
+ wayOut: { type: string, description: 'Present iff a tree of this session''s own (kept as `dirty`, `ignored` or `commits`) stays on disk: one fixed sentence — the tree and its branch stay, this service will not clean them up again, remove them yourself (`git worktree remove`, `git branch -D`). Display text.' }
12782
+ - type: object
12783
+ additionalProperties: true
12784
+ required: [outcome, reason]
12785
+ properties:
12786
+ outcome: { type: string, enum: [not_attempted] }
12787
+ reason:
12788
+ type: string
12789
+ enum: [retained_process, background_reap_failed, session_unopenable]
12790
+ description: 'Why the engine''s release was not tried: `retained_process` = a live service is kept or one was not confirmed stopped; `background_reap_failed` = the hard stop of the background work threw; `session_unopenable` = this delete could not open the session.'
12791
+ - type: object
12792
+ additionalProperties: true
12793
+ required: [outcome, code, message]
12794
+ properties:
12795
+ outcome: { type: string, enum: [failed] }
12796
+ code: { type: [string, 'null'], description: 'The engine''s code verbatim, `null` when it gave none.' }
12797
+ message: { type: string, description: 'Human text through the exit seat (credential-shaped text redacted, capped at 500 characters). It always opens with a fixed note that some trees may already have been removed and the ones left stay on disk, then the thrown error''s own text — the part the cap cuts.' }
12798
+ WiringManifestAsk:
12799
+ type: object
12800
+ additionalProperties: false
12801
+ description: >-
12802
+ `wiring_manifest.ask` - the approval seam: how it is wired (`form`), which seat it came from (`provenance`), what it adjudicates to (`effective`, effective
12803
+ half only). The SAME schema for the frame arm and the static manifest. `form` / `effective` are engine words, read open: since server 7.155.0 a leg with
12804
+ no live approval channel and a seatless unattended leg report `form: policy_callback` / `effective: policy_reachable` (the seat is a policy, not a person).
12805
+ properties:
12806
+ form: { type: string, description: 'Engine word, read open: callback, allow, deny, absent, declared_none (server >= 7.118.0 / core 7.43.0: the run declared nobody on it can be asked, `approvalReach: "none"`, so a callback beside the declaration is not this run''s approver), policy_callback (server >= 7.155.0). Before 7.155.0 the static manifest schema listed these as a closed enum; the set grew, so it is read open.' }
12807
+ provenance: { type: string, description: 'spec | deps. Open on read.' }
12808
+ effective: { type: string, description: 'Engine word, read open: human_reachable, auto_allow, auto_deny, park_only, unresolved, policy_reachable (server >= 7.155.0).' }
12809
+ answeredClasses:
12810
+ type: array
12811
+ items: { $ref: '#/components/schemas/AskClass' }
12812
+ description: 'server >= 7.155.0 - an unattended leg''s per-class answer table: which ask classes this leg''s seat answers instead of a person (today `["ordinary"]`). Present iff the seat carries a class-answer table; unreadable => the server drops this member.'
12813
+ ApprovalVoidBody:
12814
+ type: object
12815
+ additionalProperties: false
12816
+ description: '`POST /v1/approvals/{sessionId}/void` body (server >= 7.155.0; `{}` allowed). Extra keys => 400 `request.body_shape`.'
12817
+ properties:
12818
+ checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'The card you saw (echo the row''s `checkpointId`). Not the current gate => 409 `approval_stale`. Omitted => addressed by session only when the current gate has no readable id and is the only candidate, else 400 `decide_requires_binding`.' }
12819
+ ApprovalVoidResult:
12820
+ type: object
12821
+ additionalProperties: false
12822
+ description: '200 of `POST /v1/approvals/{sessionId}/void` (server >= 7.155.0): the settlement evidence; the gate identity is the read captured before voiding - `checkpointId` and `checkpointIdMissing` exactly one present.'
12823
+ required: [sessionId, decisionCommitted]
12824
+ properties:
12825
+ sessionId: { type: string }
12826
+ decisionCommitted: { type: boolean, const: true }
12827
+ checkpointId: { type: string }
12828
+ checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
12829
+ oneOf:
12830
+ - { required: [checkpointId] }
12831
+ - { required: [checkpointIdMissing] }
12832
+ WriteProtectionCapability:
12833
+ type: object
12834
+ additionalProperties: false
12835
+ description: >
12836
+ server >= 7.63.0 (S-138) — the WRITE-PROTECTION TABLE's posture on this deployment. The engine's
12837
+ literal name table downgrades a locatable write (Write / Edit / NotebookEdit) that lands on a table
12838
+ row from `allow` to `ask`, so a shell can tell in advance that those paths will raise a card.
12839
+ 🔴 THE THREE ARE DELIBERATELY NOT FOLDED INTO ONE BOOLEAN: folded, "the engine's default table is
12840
+ in place" and "an operator swapped in a table of their own" both read `true`, and those two say
12841
+ different things to an operator.
12842
+ 🔴 MINIMUM DISCLOSURE: the per-row names/kinds are NOT here — a deployment-authored row can carry
12843
+ an internal path name, and listing them tells anyone who wants around them which names are NOT
12844
+ protected. Rows live on the operator face `GET /v1/diagnostics/wiring` -> `writeProtection.rows`.
12069
12845
  🔴 A PARALLEL MECHANISM, NOT THE SAME ONE: `SENSITIVE_WRITE_PATTERNS` (pattern-shaped write deny)
12070
12846
  is reported separately and must never be folded into this bit — the two have different fixes.
12071
12847
  The three-state reading of the SEAT itself lives at the reference point (`Capabilities.writeProtection`):
@@ -12261,14 +13037,7 @@ components:
12261
13037
  kind: { type: string, enum: [http] }
12262
13038
  url: { type: string }
12263
13039
  headers: { type: object, additionalProperties: { type: string } }
12264
- principalHeader: { type: string }
12265
- assertionHeader:
12266
- type: string
12267
- description: >
12268
- server 7.128.0+: header NAME the hosted-connector assertion travels in. Mutually exclusive with
12269
- `principalHeader` (both set => 400 request.body_shape); a non-string value => 400 request.field_invalid.
12270
- 7.128.x accepts and carries the declaration but does NOT send an assertion yet (engine seat pending;
12271
- operator line `mcp_assertion_header_not_sent`).
13040
+ principalHeader: { type: string, description: 'server >= 7.155.0 (settings contract 29.0.0): the former sibling key `assertionHeader` is RETIRED — an entry carrying it is not mounted and the notice / operator line name the `field`; 7.128.0 – 7.154.x accepted it inertly.' }
12272
13041
  allowTools:
12273
13042
  type: array
12274
13043
  items: { type: string }
@@ -13425,6 +14194,9 @@ components:
13425
14194
  items: { type: string }
13426
14195
  description: 'E7 (SHIPPED) — the /effort picker default set (minimal/low/medium/high); present ONLY for a reasoning model.'
13427
14196
  atMentionable: { type: boolean, description: '#233/A-002.8 (SHIPPED) — @model mention allowlist verdict; present ONLY when the deployment configured an at-mention allowlist. Absent = no allowlist verdict, NOT "not mentionable" — do not narrow absence to false.' }
14197
+ fastMode:
14198
+ $ref: '#/components/schemas/FastModeReading'
14199
+ description: 'server >= 7.156.0 (always present; absent = an older server) — this model''s fast-mode reading, the engine''s `fastModeReadingOf({ model, requested: false })` verbatim: `{ state: off }` with no `reason` = can be switched on; a `reason` = cannot now (on the catalog face only `not_first_party` / `model_not_allowed` / `unknown`).'
13428
14200
  routePairing:
13429
14201
  $ref: '#/components/schemas/RoutePairingStatus'
13430
14202
  description: >-
@@ -13469,6 +14241,7 @@ components:
13469
14241
  required: [handover]
13470
14242
  properties:
13471
14243
  handover: { type: boolean }
14244
+ credentialDrain: { type: boolean, description: 'server >= 7.156.0 (always present there; absent on older servers) — whether this engine accepts the drain door''s CREDENTIAL-NAMED form (`CredentialDrainRequest`): true iff the start-up class table `SERVICE_AUTH_CLASSES` declares a `launch` system.' }
13472
14245
 
13473
14246
  ProjectContextItem:
13474
14247
  type: object
@@ -13527,22 +14300,24 @@ components:
13527
14300
  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
13528
14301
  (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
13529
14302
  `conflict.session_workspace_unknown`, no mkdir, `dryRun` judges the same). Absent => the registered cwd, as before.
14303
+ unplacedHistoryRecordedInCwd:
14304
+ type: boolean
14305
+ description: >-
14306
+ server >= 7.155.0 (gate on the engine capability word `file_history.recorded_place` being true): the session owner's GUARANTEE that the file history
14307
+ with no recorded place (recorded before the upgrade / synced in) was recorded in THIS request's `cwd` - restored by root in this one rewind; `false` =
14308
+ absent. Non-boolean => 400 `request.field_invalid`. Refusals (before `to` is resolved, before any file is touched): a caller let in only by operator
14309
+ override => 403 `auth.forbidden`; no honoured `cwd` in the same request => 400 `request.field_conflict` (`reason: unplaced_history_cwd`,
14310
+ `fields: [unplacedHistoryRecordedInCwd, cwd]`). Only this door accepts it (a submit body carrying it => 400 `request.body_shape`). Preview first.
13530
14311
 
13531
14312
  SessionCompactRequest:
13532
14313
  type: object
13533
14314
  description: >-
13534
14315
  `POST /v1/sessions/{sessionId}/compact` body (server >= 7.153.0), CLOSED — every key optional, `{}` is valid. Any other key => 400 `request.body_shape` + `unknownKeys`.
14316
+ Server >= 7.155.0: the summary-model keys `compactionModel` / `compaction` (7.153.x / 7.154.x) are retired — summaries run on the main model; sending them is 400 `request.body_shape`.
13535
14317
  additionalProperties: false
13536
14318
  properties:
13537
14319
  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`).' }
13538
14320
  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.' }
13539
- compactionModel: { type: string, description: 'The summary model (same judge and codes as `model`); absent => the deployment''s summarize role.' }
13540
- compaction:
13541
- type: object
13542
- additionalProperties: false
13543
- description: 'The submit body''s `compaction` object: only `clampTolerance` (a finite number in [0,1], else 400 `request.field_invalid`).'
13544
- properties:
13545
- clampTolerance: { type: number, minimum: 0, maximum: 1 }
13546
14321
 
13547
14322
  SessionCompactUsage:
13548
14323
  type: object
@@ -13596,6 +14371,32 @@ components:
13596
14371
  description: >-
13597
14372
  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`,
13598
14373
  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".
14374
+ server >= 7.155.0 (engine 7.69.0): the preview ALSO carries the plan's `refused` / `failed` / `leftAsIs` (below).
14375
+ refused:
14376
+ allOf: [{ $ref: '#/components/schemas/SessionRewindLedger/properties/refused' }]
14377
+ description: 'server >= 7.155.0 (engine 7.69.0): the plan''s refused rows, row for row the ledger''s `refused`. Both `refused` and `failed` empty = a complete plan. ABSENT = an engine that does not answer them (<= 7.154.x) — never "none".'
14378
+ failed:
14379
+ allOf: [{ $ref: '#/components/schemas/SessionRewindLedger/properties/failed' }]
14380
+ description: 'server >= 7.155.0 (engine 7.69.0): what the restore could not judge or reach before any write (an unreadable version record or blob, an aborted attempt), row for row the ledger''s `failed`.'
14381
+ leftAsIs:
14382
+ type: array
14383
+ items: { $ref: '#/components/schemas/SessionRewindLeftAsIsRow' }
14384
+ description: 'server >= 7.155.0 (engine 7.69.0): the files the restore would leave as they are (the plan''s own `leftAsIs`). ABSENT = none.'
14385
+
14386
+ SessionRewindLeftAsIsRow:
14387
+ type: object
14388
+ description: >-
14389
+ server >= 7.155.0 (engine 7.69.0 `FileHistoryLeftAsIsFile`) — one tracked file a rewind LEFT as it is: neither refused nor failed, not in `files` / `filesChanged`, never counted in
14390
+ `outcome` (a restore whose every other file converged is `complete`); the same kind of rewind leaves it again. `path` = its key; `place` = the directory its history records that this
14391
+ rewind does not land on (an absolute real path on the recording machine, for the host, never for a sentence); `class` = why; `reason` = the sentence for a person (names no path).
14392
+ additionalProperties: true
14393
+ required: [path, place, class, reason]
14394
+ properties:
14395
+ path: { type: string }
14396
+ place: { type: string }
14397
+ class: { type: string, enum: [frozen_history, recorded_outside_root], description: 'engine `FILE_HISTORY_LEFT_AS_IS_CLASSES` (closed): `frozen_history` = the entry''s history is frozen (a version was recorded through a link on its key''s path); `recorded_outside_root` = the version was recorded under a directory outside this rewind''s root and the file there no longer holds it. Branch on the class, never the reason text.' }
14398
+ reason: { type: string }
14399
+ outsideRoot: { type: boolean, description: 'Same reading as `SessionRewindFileRow.outsideRoot`, read off `place` (always true for `recorded_outside_root`).' }
13599
14400
 
13600
14401
  SessionRewindFileRow:
13601
14402
  type: object
@@ -13622,6 +14423,7 @@ components:
13622
14423
  required: [reason]
13623
14424
  properties:
13624
14425
  reason: { type: string }
14426
+ outsideRoot: { type: boolean, description: 'server >= 7.155.0 (engine 7.69.0): whether `targetPath` lies outside the root this rewind is handed, whatever the row''s action, refusal or failure. On every row the engine answers; ABSENT = an engine before 7.69.0 — never "inside".' }
13625
14427
 
13626
14428
  SessionRewindLedger:
13627
14429
  type: object
@@ -13661,6 +14463,10 @@ components:
13661
14463
  items: { $ref: '#/components/schemas/SessionRewindFileRow' }
13662
14464
  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.'
13663
14465
  error: { $ref: '#/components/schemas/SessionRewindLedgerError' }
14466
+ leftAsIs:
14467
+ type: array
14468
+ items: { $ref: '#/components/schemas/SessionRewindLeftAsIsRow' }
14469
+ description: 'server >= 7.155.0 (engine 7.69.0): the tracked files this restore LEFT as they are, one row each with its class; never counted in `outcome`. ABSENT = none.'
13664
14470
 
13665
14471
  SessionRewindLedgerError:
13666
14472
  type: object
@@ -13674,7 +14480,7 @@ components:
13674
14480
 
13675
14481
  SessionRewindFilesPreviewResult:
13676
14482
  type: object
13677
- description: 'The `dryRun: true` 200 body: `preview` is the stats, or null = this deployment gives no stats (NOT "nothing would change").'
14483
+ description: 'The `dryRun: true` 200 body: `preview` is the plan''s stats, or null. server >= 7.155.0 (engine 7.69.0): `preview` is ALWAYS an object — nothing to change = an empty preview (`filesChanged: []`, zero counts); a plan that cannot be made answers 503 `rewind.restore_failed`. `null` comes ONLY from servers 7.147.0 – 7.154.x (this deployment gives no stats — NOT "nothing would change"); those servers are inside the support floor, so the schema keeps admitting it.'
13678
14484
  additionalProperties: true
13679
14485
  required: [dryRun, preview]
13680
14486
  properties:
@@ -14121,7 +14927,7 @@ components:
14121
14927
  Present ONLY when the run actually spent MORE than its ceiling; absent on every run that stayed within one and on every run that set no budget. The overshoot is
14122
14928
  `spentTokens + unsettledTokens - budgetTokens`; a run whose overshoot rests ENTIRELY on `unsettledTokens` is a best-effort disclosure, not a measurement ("this run appears to
14123
14929
  have overrun, and here is what was seen") — `spentTokens` carries no such caveat (it is the gate's own settled figure). Lets a list row be flagged "completed, and over budget" without an N+1 `get`.
14124
- The detail face (`GET /v1/workflows/:id`) does not carry it.
14930
+ Since server >= 7.148.0 the detail face (`GET /v1/workflows/:id`) answers the same key (`WorkflowRun.budgetOvershoot`) in the same shape.
14125
14931
  required: [budgetTokens, spentTokens]
14126
14932
  additionalProperties: false
14127
14933
  properties:
@@ -14137,7 +14943,7 @@ components:
14137
14943
  reason first, and one that armed no deadline. Lets a row separate "this run was CUT SHORT, and here is what it had achieved" from "this run failed" (both read `status: failed`).
14138
14944
  The counts are a POINT-IN-TIME SNAPSHOT taken BEFORE the terminal fold that marks abandoned agents failed: `agentsFailed` here is NOT `WorkflowRunSummary.agentFailures`
14139
14945
  (the record's tally, which counts the abandoned ones) — swapping one for the other reports abandoned work as failed work. `agentsInFlight` includes calls still queued for a concurrency slot.
14140
- The detail face (`GET /v1/workflows/:id`) does not carry it.
14946
+ Since server >= 7.148.0 the detail face (`GET /v1/workflows/:id`) answers the same key (`WorkflowRun.timeoutInterruption`) in the same shape.
14141
14947
  required: [timeoutMs, agentsCompleted, agentsFailed, agentsInFlight]
14142
14948
  additionalProperties: false
14143
14949
  properties:
@@ -14316,8 +15122,21 @@ components:
14316
15122
  description: { type: string, description: "The workflow script's declared `meta.description` (redacted, one-liner)." }
14317
15123
  status: { $ref: '#/components/schemas/WorkflowRunStatus' }
14318
15124
  agentFailures: { type: integer, description: 'run-level count of agents whose status ended failed — stamped at run end, only when > 0.' }
15125
+ budgetOvershoot:
15126
+ allOf: [{ $ref: '#/components/schemas/WorkflowBudgetOvershoot' }]
15127
+ description: 'server >= 7.148.0 — the same terminal key, same shape and same presence rule as on the list row (`WorkflowRunSummary.budgetOvershoot`): present ONLY when the run spent more than its own token ceiling; absent otherwise. (This schema did not declare it before 47.0.0 although the detail face has carried it since 7.148.0.)'
15128
+ timeoutInterruption:
15129
+ allOf: [{ $ref: '#/components/schemas/WorkflowTimeoutInterruption' }]
15130
+ description: 'server >= 7.148.0 — the same terminal key, same shape and same presence rule as on the list row (`WorkflowRunSummary.timeoutInterruption`): present ONLY when the total-timeout deadline had fired before the run reached its terminal; absent otherwise. (Not declared here before 47.0.0 although the detail face has carried it since 7.148.0.)'
14319
15131
  parked: { type: boolean, enum: [true], description: 'server >= 7.135.0 (core 7.55.0 `runParkedOf`) — present, always the literal `true`, ONLY while the run is `running` AND at least one of its agents is parked at an approval gate; otherwise the key is ABSENT (never `false`). Read it as "the run is waiting on a person", not "failed". Older servers never send it.' }
14320
15132
  errorCode: { type: string, description: 'The run row''s machine code (open set; the same words as the same-named slot on the fleet row, e.g. `workflow.agent_parked` for a drained parked terminal) — present only when the row has one. (Declared here in 26.1.0: the detail projection has forwarded it since before 7.134.0.)' }
15133
+ recordArtifact:
15134
+ allOf: [{ $ref: '#/components/schemas/WorkflowRecordArtifact' }]
15135
+ description: >-
15136
+ server >= 7.154.0 (engine 7.68.0) — where this run's WHOLE record (the result and every leg's row) can be read back from. DETAIL FACE ONLY: the list row never carries it. The engine writes it once, in the run's
15137
+ terminal write, and never rewrites it; the server passes both cells through as they are (it does not decode them or word a sentence — decoding belongs to the engine's exported `workflowRecordPickupOf`, and a shape
15138
+ outside the three reads as absent). ABSENT IS NOT `no_store`: a running run, a record an older engine wrote, a row the deployment closed itself (an orphan sweep flipping a `running` row) and a terminal write
15139
+ that did not land all leave it absent.
14321
15140
  stats: { $ref: '#/components/schemas/WorkflowRunStats' }
14322
15141
  startedAt: { type: integer }
14323
15142
  endedAt: { type: integer }
@@ -14389,14 +15208,36 @@ components:
14389
15208
  word-for-word the same rank as `parks`). It does NOT fold into the absence of `parks`, which has
14390
15209
  its own two meanings (above).
14391
15210
 
15211
+ WorkflowRecordArtifact:
15212
+ description: >-
15213
+ server >= 7.154.0 (engine 7.68.0) — `WorkflowRun.recordArtifact`, three shapes (the engine's closed set; a value outside them reads as absent):
15214
+ `{ kind: stored, ref }` = the whole record was written to the run's result store and the write settled inside the terminal bound; `ref` is the key the engine's `ReadToolResult` reads it back with (minted by the result store,
15215
+ judged by the engine against the store's key shape before it is written — passed through verbatim, NEVER rewritten or redacted: a changed `ref` reads nothing back). It promises the write landed at the terminal, not that the
15216
+ record is still readable: a result store whose retention is shorter than the run record's answers a later read as expired.
15217
+ `{ kind: unconfirmed }` = the run had a result store but this write did not settle as written (it threw, outlived the bound, or the record could not be rendered): no `ref`, and a late landing is never written back.
15218
+ `{ kind: no_store }` = the run started with no result store: no `ref`.
15219
+ oneOf:
15220
+ - type: object
15221
+ additionalProperties: false
15222
+ required: [kind, ref]
15223
+ properties:
15224
+ kind: { type: string, enum: [stored] }
15225
+ ref: { type: string, description: 'The key `ReadToolResult` reads the whole record back with.' }
15226
+ - type: object
15227
+ additionalProperties: false
15228
+ required: [kind]
15229
+ properties:
15230
+ kind: { type: string, enum: [unconfirmed, no_store] }
15231
+
14392
15232
  WorkflowRunPark:
14393
15233
  # sdk 9.5.0:具名行形(同 `WiringManifestMcpEntry` 的裁定),并且**封闭** —— 服务端逐键挑出这四位,
14394
15234
  # 多出来的键意味着有人在别处手拼了第二份形(凭据位就是这样漏出去的)。
14395
15235
  type: object
14396
15236
  additionalProperties: false
14397
15237
  description: >
14398
- One row of `WorkflowRun.parks` — the engine's park responsibility table, EXACTLY four keys because the
14399
- server picks them key by key rather than spreading core's row.
15238
+ One row of `WorkflowRun.parks` — the engine's park responsibility table. The key set IS the server read face's key-by-key disposition table
15239
+ (it never spreads core's row): the engine's `callKey` / `sessionId` / `originRunId` / `originUnconfirmed` / `parkedBy` / `generation` / `passedTo`
15240
+ verbatim, `token` and `settledDecisions` withheld, plus the server-minted decision cell `decision` (server >= 7.155.0).
14400
15241
  🔴 THE REDEMPTION TOKEN IS STRUCTURALLY ABSENT from this shape: core's row carries one (its own note
14401
15242
  says never log / never URL), and the read face leaves it in the store. So "I can read the park row"
14402
15243
  never means "I can decide it".
@@ -14420,6 +15261,53 @@ components:
14420
15261
  bit renders an unconfirmed coordinate as a confirmed one.
14421
15262
  🔴 NEVER-FALSE: upstream DELETES the key at confirmation and never writes `false`, so absence =
14422
15263
  confirmed, and rows written before 7.78.0 read identically (a true additive).
15264
+ parkedBy:
15265
+ type: string
15266
+ description: 'server >= 7.118.0 (core 7.44.0): the run STANDING on the park — this record''s run holds it iff `parkedBy` equals this record''s run id (never `originRunId`). Present together with `generation`; an older entry has neither (no holder). Projected, not judged.'
15267
+ generation:
15268
+ type: integer
15269
+ description: 'server >= 7.118.0 (core 7.44.0): the park generation — the inherited entry''s (else 0) plus one per admission; the highest on a session is the chain''s tail, a tie is a fork. Present together with `parkedBy`.'
15270
+ passedTo:
15271
+ type: string
15272
+ description: 'server >= 7.155.0 (engine 7.69.0): written once, on the entry of the run that HOLDS the park, by a continuation that ended suspended without reaching it — the run id it was passed to. Present => do not read this entry''s `parkedBy` as "this run still holds it". ABSENT = never passed (or an older engine / server). Projected, not judged.'
15273
+ decision:
15274
+ allOf: [{ $ref: '#/components/schemas/WorkflowParkDecisionCell' }]
15275
+ description: 'server >= 7.155.0: the DECISION CELL — what came of the decision this deployment holds for this row''s card; the same projection as the approval queue row''s `decision`. After the card is driven and leaves the queue it is read only here (`state.kind: driven`). Absent only, never null.'
15276
+ WorkflowParkDecisionCell:
15277
+ type: object
15278
+ additionalProperties: false
15279
+ description: >
15280
+ server >= 7.155.0 — the DECISION CELL (wire key `decision`) of a workflow-member park card: what came of the decision this deployment holds for the card. One
15281
+ projection, two faces, same value at the same moment: the operator approval queue's park rows (`GET /v1/approvals` `pending[]`, the `/v1/approvals/stream`
15282
+ `pending` frame — a changed cell re-sends that row's frame) and the workflow detail's `parks[]` rows (`GET /v1/workflows/{id}`). `decisionId` / `decision` are the
15283
+ `/decide` receipt's (join on `decisionId`); `state` is the engine's reading spread member by member. ABSENT ONLY, NEVER NULL, and absence is NOT "no decision in
15284
+ play": not a workflow-member card · no decision held (never decided, or reaped with its retention anchor run) · the reader cannot see the session it was sent to
15285
+ · unreadable (the cards still list) · the deployment does not wire this lane. The assistant inbox and task views do not carry it. The cell is not fenced: it can lag
15286
+ the engine by a beat (deciding again then goes through the existing record fence / receipt idempotency — never a double use).
15287
+ required: [decisionId, decision, state]
15288
+ properties:
15289
+ decisionId: { type: string }
15290
+ decision: { type: string, enum: [approve, deny] }
15291
+ state:
15292
+ description: >
15293
+ the engine's reading, four states (in play = `open` / `carried`; out = `driven` / `spent`): `open` — no record speaks of it; `carried` — a continuation
15294
+ (`runId`) carried it and ended before reaching the parked step (not spent; the server holds it back on its own only while that continuation is the current holder
15295
+ — then it rides along with another decision for the same holder run, and the pull leg still hands it over — otherwise it is delivered like `open`); `driven` — a
15296
+ continuation (`runId`) drove the parked step with it; `spent` — no later hand-over continues the run (`reason`: the engine's settling word, today
15297
+ `decision_spent` / `card_unresumable` / `launch_unreadable` / `denied`, read open; `code` optional).
15298
+ oneOf:
15299
+ - type: object
15300
+ additionalProperties: false
15301
+ required: [kind]
15302
+ properties: { kind: { const: open } }
15303
+ - type: object
15304
+ additionalProperties: false
15305
+ required: [kind, runId]
15306
+ properties: { kind: { type: string, enum: [carried, driven] }, runId: { type: string } }
15307
+ - type: object
15308
+ additionalProperties: false
15309
+ required: [kind, runId, reason]
15310
+ properties: { kind: { const: spent }, runId: { type: string }, reason: { type: string }, code: { type: string } }
14423
15311
 
14424
15312
  # ── B4 命名化(2026-07-31):以下 10 个 component 与 SDK resources/* 的同名导出类型 1:1;内容为
14425
15313
  # 原端点内联 schema 的字节级搬运(零语义变更),使用点换 $ref。census 封闭注随迁。
@@ -14659,6 +15547,7 @@ components:
14659
15547
  additionalProperties: true
14660
15548
  properties:
14661
15549
  id: { type: string, description: 'Stable identity (durable runId/taskId; subagent child = "<runId> <taskId>"). Update/remove by this.' }
15550
+ unattributed: { const: true, description: 'server >= 7.156.0 — the machine-readable bit of a DEMOTED row (only `true`, present only then): this row reached a `?session=` subscriber through the demoted projection (no session on the row; content scrubbed; `name` rewritten to the literal "(unattributed)"). The bit is the source of truth, the name only the display (a real row may carry that name). Absent = not demoted, or an older server.' }
14662
15551
  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.' }
14663
15552
  name: { type: string }
14664
15553
  description: { type: string }
@@ -14704,6 +15593,7 @@ components:
14704
15593
  turns: { type: integer }
14705
15594
  costMicroUsd: { type: integer }
14706
15595
  resumable: { type: boolean }
15596
+ resumableUntil: { type: number, description: 'server >= 7.156.0 (engine 7.69.0): the continuation deadline that came with `resumable: true` (epoch ms, an UPPER BOUND, the engine''s value) — background-child terminal rows only; kept on demoted unattributed rows (an instant, zero session content). Same reader and value as `bg_notification` and the run stream''s `task_notification`. Absent = no deadline set / not resumable / an older server.' }
14707
15597
  editedFiles:
14708
15598
  type: array
14709
15599
  items:
@@ -14773,6 +15663,7 @@ components:
14773
15663
  # 按它 codegen 的第三方会得到一个永远 undefined 的 `workflowRow.sourceLane`,并照 FleetTaskRow 那条
14774
15664
  # 「run-leg composite rows only」的描述写出一个**永不触发**的 workflow 行去重分支。
14775
15665
  id: { type: string }
15666
+ unattributed: { const: true, description: 'server >= 7.156.0 — same as `FleetTaskRow.unattributed` (only `true`): this row was projected through the `?session=` demotion.' }
14776
15667
  name: { type: string }
14777
15668
  description: { type: string }
14778
15669
  status: { type: string, description: 'Neutral workflow run status (running|completed|failed; open).' }
@@ -14939,6 +15830,7 @@ components:
14939
15830
  parentTaskId: { type: string }
14940
15831
  stoppedBy: { type: string, description: 'Verbatim open enum (who/what stopped a killed child).' }
14941
15832
  resumable: { type: boolean }
15833
+ resumableUntil: { type: number, description: 'server >= 7.156.0: the continuation deadline (epoch ms, an UPPER BOUND) — same reader and value as the terminal `task` row and the run stream''s `task_notification`.' }
14942
15834
  recentSteps:
14943
15835
  type: array
14944
15836
  items:
@@ -15181,6 +16073,7 @@ components:
15181
16073
  ts: { type: number, description: 'Registration time (ms epoch).' }
15182
16074
  expiresAtMs: { type: number, description: 'Absolute window deadline — the SAME number minted once for the tool_approval frame (never recomputed).' }
15183
16075
  sessionId: { type: string }
16076
+ scope: { type: string, description: 'server >= 7.156.0 — the ask''s owner written as a checkpoint scope (the owner key verbatim, `_` = no owner; same name and value as `PendingCheckpoint.scope`). Present when the ask row has a readable owner cell; absent = the stored row lacks its owner key, or an older server.' }
15184
16077
  requiresRealApproval: { type: boolean, enum: [true] }
15185
16078
  deploymentListQuestion:
15186
16079
  type: boolean
@@ -15241,6 +16134,7 @@ components:
15241
16134
  toolName: { type: string, description: 'The current pending''s gated tool (same source/value as the pending row''s toolName).' }
15242
16135
  boundCallId: { type: string, description: 'The current pending''s pendingAction.toolCallId — the D-1 anchor to echo back on the relocated decide.' }
15243
16136
  boundInputHash: { type: string, description: 'Server-minted; present only when the row has one. Echo verbatim, never recompute.' }
16137
+ checkpointId: { type: string, description: 'server >= 7.155.0 (gate-identity echo law): the current gate''s identity when it can be told; when it cannot, the body ROOT carries `checkpointIdMissing` instead and this key is never here. The three coordinates and the root word may be present together.' }
15244
16138
 
15245
16139
  SettingsContractCapability:
15246
16140
  type: object
@@ -15317,15 +16211,16 @@ components:
15317
16211
  description: { type: string }
15318
16212
  source: { type: string, enum: [factory, center, request], description: '`factory` = the deployment''s own; `center` = from the deployment''s config source; `request` = this request body''s `skills` (a same-name scenario skill shadows it and is not listed).' }
15319
16213
 
15320
- ApprovalStalePlanGate:
16214
+ ApprovalStaleGate:
15321
16215
  type: object
15322
16216
  description: >-
15323
- server >= 7.137.0 — the `currentPending` key of the plan_review door's 409 `approval_stale`: the plan gate this session has pending NOW. Whole-or-absent (absent when the current gate has no trustworthy identity
15324
- or was consumed concurrently). Never carries a token. The decide door's `currentPending` is the other shape (`ApprovalStaleCurrentPending`).
16217
+ The gate-id form of the `currentPending` key of a 409 `approval_stale`: the gate this session has pending NOW, by identity only. Shared by two doors: plan_review (server >= 7.137.0; the plan gate) and the void door `POST /v1/approvals/{sessionId}/void`
16218
+ (server >= 7.155.0). Whole-or-absent (absent when the current gate has no trustworthy identity - the word is then the root `checkpointIdMissing` - or was consumed concurrently). Never carries a token.
16219
+ The decide door's `currentPending` is the other shape (`ApprovalStaleCurrentPending`).
15325
16220
  required: [checkpointId]
15326
16221
  additionalProperties: false
15327
16222
  properties:
15328
- checkpointId: { type: string, description: 'The identity of the current pending plan gate (the same value as the park result''s `terminal.checkpointId` and the queue / inbox row''s `checkpointId`).' }
16223
+ checkpointId: { type: string, description: 'The identity of the current pending gate (the same value as the park result''s `terminal.checkpointId` and the queue / inbox row''s `checkpointId`).' }
15329
16224
 
15330
16225
  ExemptionList:
15331
16226
  type: object
@@ -15368,7 +16263,8 @@ components:
15368
16263
  Both say only what held when the answer was given; neither means the gate is resolved.
15369
16264
  A FOURTH shape, the #368 IDEMPOTENT REPLAY (server >= 7.4x; declared 2026-09-08 — it shipped without
15370
16265
  ever reaching this schema): `{sessionId, idempotent:true, decision, bindingEnforced:true,
15371
- executionOutcome?}` — it carries NO `status` and NO `taskId` (nothing was accepted this time). So no key
16266
+ executionOutcome?}` — it carries NO `status` and NO `taskId` (nothing was accepted this time). Its named schema is
16267
+ `DecisionReplayReceipt` (the plan-review door's replay is the same mint). So no key
15372
16268
  is guaranteed by all four shapes; discriminate: `idempotent` -> replay; otherwise `decision` present ->
15373
16269
  parked receipt (`ParkedDecideAccepted`, four arms, read `status`: `resuming` / `failed` / `recorded` / `delivered`);
15374
16270
  no `decision` -> task-level acceptance / terminal. (The older reading "`decision` without `sessionId`" fails on
@@ -15477,6 +16373,13 @@ components:
15477
16373
  persistedRule: { type: string, description: 'server >= 7.152.0: free-text arm only — the canonical spelling written.' }
15478
16374
  persistedRules: { type: array, items: { type: string }, description: 'server >= 7.152.0: batch arm only — the canonical texts of every member written.' }
15479
16375
  persistedRuleAnchors: { type: array, items: { $ref: '#/components/schemas/PersistedRuleAnchor' }, description: 'server >= 7.152.0: index-aligned with `persistedRules`.' }
16376
+ turnRefused:
16377
+ type: object
16378
+ additionalProperties: true
16379
+ description: 'server >= 7.156.0 — only on the workflow-member `recorded` receipt (and on the decision door''s `parked_redeemed` body that spreads it): present iff the turn that was to carry this decision was refused for a reason a re-sent decide meets again; the value is that refusal''s body (`{ error, errorCode, … }`; read open) — re-sending is useless, its code and sentence say the way out. Absent = re-sending the same decision re-delivers, or an older server. Not a discriminator.'
16380
+ properties:
16381
+ errorCode: { type: string }
16382
+ error: { type: string }
15480
16383
 
15481
16384
  ApprovalExemption:
15482
16385
  type: object
@@ -15571,6 +16474,11 @@ components:
15571
16474
  blockedBy: { type: string }
15572
16475
  requires: { type: array, items: { type: string } }
15573
16476
  sentence: { type: string }
16477
+ terminal:
16478
+ type: boolean
16479
+ description: >-
16480
+ server >= 7.155.0 (engine 7.69.0; always present on a non-`ok` verdict there, absent on older servers): `true` = no engine release resumes this row (the host's to expire);
16481
+ `false` = another release can (the `sentence` says which). Either way the verdict is final on THIS engine (`kind`); `terminal` only answers whether another engine release would help.
15574
16482
 
15575
16483
  PendingCheckpoint:
15576
16484
  type: object
@@ -15598,6 +16506,26 @@ components:
15598
16506
  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.' }
15599
16507
  checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
15600
16508
  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).' }
16509
+ decision:
16510
+ allOf: [{ $ref: '#/components/schemas/WorkflowParkDecisionCell' }]
16511
+ description: 'server >= 7.155.0, workflow-member park cards only: the DECISION CELL — what came of the decision this deployment holds for the card (the same projection as `GET /v1/workflows/{id}` `parks[].decision`; absent only, never null — see the schema for the five absences). The `/v1/approvals/stream` `pending` frame carries it too.'
16512
+ wayOut:
16513
+ $ref: '#/components/schemas/ApprovalWayOut'
16514
+ stuck:
16515
+ allOf: [{ $ref: '#/components/schemas/StuckCardWord' }]
16516
+ description: 'server >= 7.156.0 — why no decision on this card lands here (rowVerdict not ok / the gate kind is not one this release registers — the row then has no `gateKind` / the task-level resume context is missing); recomputed on every read; read `wayOut` for the way out. Absent = a decision lands, or an older server.'
16517
+ redactedKeys:
16518
+ type: array
16519
+ items: { $ref: '#/components/schemas/ParkedRowRedactedKey' }
16520
+ description: 'server >= 7.156.0 — the row members whose bytes the server''s exit redaction rewrote (closed set `input`): `[]` = untouched (a fold marker / `null` input carries `[]`), `["input"]` = the human-facing input was rewritten. On EVERY row from 7.156.0 (read-time projection); absent = an older server, unknown.'
16521
+ workflowRunId: { type: string, description: 'server >= 7.156.0 — present iff the engine stamped this parked leg as a workflow member (the engine summary''s run id, verbatim, capped at 200 code units; same key and value as the live card''s).' }
16522
+ workflowAgentLabel: { type: string, description: 'server >= 7.156.0 — the workflow member''s display text (UNTRUSTED: exit-redacted, capped at 200 code units). Only beside `workflowRunId`, when non-empty.' }
16523
+ workflowStepAskedAgain: { type: boolean, enum: [true], description: 'server >= 7.156.0 — the call re-runs a step whose earlier card stopped waiting. Literal true only. Only beside `workflowRunId`.' }
16524
+ fromSubagent: { type: boolean, const: true, description: 'server >= 7.155.0: present (true) only when the engine recorded that this ask came from a delegated sub-agent (the same presence law as the live card row). Main-leg rows never carry it.' }
16525
+ sourceSessionId: { type: string, description: 'server >= 7.155.0: the session that raised the ask - only when `fromSubagent` is present (and the engine recorded it). On a background sub-agent''s parked row it equals `sessionId`.' }
16526
+ agentId: { type: string, description: 'server >= 7.155.0: which agent''s leg - present when the engine recorded the delegated leg''s task id (redacted, then cut to 200 chars). Independent of `fromSubagent` (a directly started workflow agent has it without `fromSubagent`).' }
16527
+ planContentHash: { type: string, description: 'server >= 7.155.0, plan-review rows only: the `sha256:` digest computed over the plan string (same name and reading as the terminal cause''s). Engine recorded => present; absent = not recorded (never `null` / empty). Not a gate identity.' }
16528
+ requestedByCallId: { type: string, description: 'server >= 7.155.0, plan-review rows only: the call id that requested the review (engine recorded => present).' }
15601
16529
  rowVerdict:
15602
16530
  allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
15603
16531
  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).'
@@ -15625,11 +16553,12 @@ components:
15625
16553
  🔴 OPEN SET — deliberately NOT an enum: observed values include `human`, `irreversible_ask`,
15626
16554
  `plan_review`, `needs_review`, `resource_limit`, and core keeps adding. Pinning an enum would make a
15627
16555
  new gate kind "not exist" for generated clients.
15628
- 🔴 ALWAYS PRESENT on server >= 7.132.0 (a wire narrowing): every park stamps it, the one-time migration M21 filled the stored rows that lacked it
15629
- (a row whose gate names no registered kind is expired), and a SQL row that still carries none is NOT LISTED (counted under
15630
- `server.approvals.queue-row-gate-kind-missing`; no decide route can bind it) rather than served without the key. On a <= 7.131.x server it is
15631
- absent on a pre-`gate_kind` legacy SQL row (column NULL). Either way the reading of an absent key is "unreadable — fail closed": never assume
15632
- `human`, never route it. Deliberately still not in `required` while the supported floor (3.0.0) is below 7.132.0.
16556
+ 🔴 PRESENT IFF THIS RELEASE KNOWS THE ROW'S GATE KIND (server >= 7.156.0): the row's gate kind has one reading — the stored summary when it
16557
+ projects, else the store's own cell — and a row whose kind is not one this release registers is LISTED without this key, carrying
16558
+ `stuck: "gate_unlisted"` (SQL rows whose `gate_kind` column is NULL but whose stored body is good reappear on the queue with the kind read from
16559
+ the body). Server 7.132.0 – 7.155.x instead did not list a SQL row lacking it (counted under `server.approvals.queue-row-gate-kind-missing`,
16560
+ a counter retired in 7.156.0); on a <= 7.131.x server it is absent on a pre-`gate_kind` legacy SQL row (column NULL). Every way, the reading of
16561
+ an absent key is "unreadable — fail closed": never assume `human`, never route it. Not in `required`.
15633
16562
  input:
15634
16563
  description: >
15635
16564
  The pending tool call's args (post-hook), REDACTED + size-bounded — for a tool gate the write
@@ -15852,6 +16781,15 @@ components:
15852
16781
  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).
15853
16782
  ABSENT = a row parked before the engine's ask-reason record / no reasons.
15854
16783
  items: { $ref: '#/components/schemas/AskReason' }
16784
+ wayOut:
16785
+ allOf: [{ $ref: '#/components/schemas/ApprovalWayOut' }]
16786
+ description: 'server >= 7.155.0: a non-`ok` row''s way-out word, the same minting and set as `PendingCheckpoint.wayOut`; absent on `ok` rows.'
16787
+ stuck:
16788
+ allOf: [{ $ref: '#/components/schemas/StuckCardWord' }]
16789
+ description: 'server >= 7.156.0 — the same reader and projection as `PendingCheckpoint.stuck`.'
16790
+ workflowRunId: { type: string, description: 'server >= 7.156.0 — the same reader and value as `PendingCheckpoint.workflowRunId`.' }
16791
+ workflowAgentLabel: { type: string, description: 'server >= 7.156.0 — as `PendingCheckpoint.workflowAgentLabel` (UNTRUSTED display text).' }
16792
+ workflowStepAskedAgain: { type: boolean, enum: [true], description: 'server >= 7.156.0 — as `PendingCheckpoint.workflowStepAskedAgain`.' }
15855
16793
  rowVerdict:
15856
16794
  allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
15857
16795
  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`.'
@@ -15993,7 +16931,6 @@ components:
15993
16931
  key at its resource boundary (`resources/assistant.ts` `RawAssistantGate` + `normalizeGate()`), so a
15994
16932
  TS consumer never observes the null. Both are correct for their layer — do NOT "fix" either to match
15995
16933
  the other. A non-TS client generated from this file MUST tolerate the nulls itself.
15996
- required: [kind]
15997
16934
  additionalProperties: true
15998
16935
  properties:
15999
16936
  kind:
@@ -16002,6 +16939,11 @@ components:
16002
16939
  Same open set as `CheckpointSummary.gateKind` — the FLATTENED projection of core's
16003
16940
  `CheckpointGate`. (Nested-as-`gate` ⇒ the discriminator is named `kind`; flattened onto a row ⇒
16004
16941
  `gateKind`. Same value domain, different position — a naming CONVENTION, not an inconsistency.)
16942
+ 🔴 server >= 7.156.0 it can be ABSENT: a degraded row whose gate kind cannot be read (on SQL the stored summary does not project and the
16943
+ `gate_kind` column is empty or not a kind this release registers) is LISTED — `gate` present, `kind` absent, `needsAttention: true`, no
16944
+ `stuck` here (read the inbox row or the operator queue row for why it is stuck). Same reading as an absent `PendingCheckpoint.gateKind`:
16945
+ the kind is unknown — fail closed, never assume `human`, never route a decision on it. Server 7.132.0 – 7.155.x did not list such a row
16946
+ (that run read `gate: null`).
16005
16947
  enum: [human, irreversible_ask, resource_limit, needs_review, plan_review, task_done]
16006
16948
  x-open-enum: true # a future core kind must render generically, never crash — do not close this union
16007
16949
  severity:
@@ -16131,6 +17073,30 @@ components:
16131
17073
  meaningful. Emitted only when the store CONFIRMED the reopen — never inferred.
16132
17074
  note: { type: string, description: 'preempt ONLY — human-readable explanation (incl. the honest "preempt is a no-op" cases). Absent from the resume/plan_review body.' }
16133
17075
 
17076
+ DecisionReplayReceipt:
17077
+ type: object
17078
+ description: >
17079
+ The IDEMPOTENT REPLAY body of the decision doors — the same decision re-sent and matched to the one already settled on the row. One server
17080
+ mint serves two doors: the `POST /v1/approvals/{sessionId}/decide` replay (`decision` approve | deny; this key set is also the fourth shape
17081
+ `ApprovalDecisionResult` describes) and, server >= 7.156.0, the `POST /v1/assistant/tasks/{taskId}/plan_review` replay of a recorded `reject`
17082
+ (`decision` is always `reject`; the second arm of that door's 200, which narrows `decision` to that word). Nothing was accepted this time, so it carries
17083
+ NO `taskId` and NO `status`, and the body echoes no gate identity (whether the REQUEST must name the gate to reach the replay is each door's own
17084
+ condition — see the doors). `idempotent: true` is the discriminator.
17085
+ required: [sessionId, idempotent, decision, bindingEnforced]
17086
+ additionalProperties: false
17087
+ properties:
17088
+ sessionId: { type: string }
17089
+ idempotent: { type: boolean, enum: [true], description: 'The discriminator — always the literal true.' }
17090
+ decision:
17091
+ type: string
17092
+ enum: [approve, deny, reject]
17093
+ description: 'The decision settled on the row (equal to the one re-sent — otherwise it is not a replay). `/decide` replays approve | deny; the plan-review door replays reject only.'
17094
+ bindingEnforced: { type: boolean, enum: [true] }
17095
+ decisionCommitted: { type: boolean, enum: [true], description: 'server >= 7.138.0 always present (the replay boundary''s settlement evidence: the same decision already landed on the row); older replays lack it. Read as on `ApprovalDecisionResult`.' }
17096
+ executionOutcome:
17097
+ $ref: '#/components/schemas/GateOutcome'
17098
+ description: 'server >= 7.66.0, `/decide` replays only: how the decided action was finally disposed (as on `ApprovalDecisionResult`); ABSENT = UNKNOWN, never allowed. The plan-review replay never carries it.'
17099
+
16134
17100
  PlanReviewRequest:
16135
17101
  type: object
16136
17102
  description: >
@@ -16164,7 +17130,7 @@ components:
16164
17130
  minLength: 1
16165
17131
  maxLength: 128
16166
17132
  description: >-
16167
- 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
17133
+ server >= 7.137.0 (read the capability face first: server >= 7.155.0 — `capabilities.doors["POST /v1/assistant/tasks/:id/plan_review"]` contains `checkpointId`; 7.137.0 – 7.154.x — that server's own top-level bit `planReviewCheckpointId`) — 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
16168
17134
  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 }`
16169
17135
  (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
16170
17136
  `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).
@@ -16279,7 +17245,10 @@ components:
16279
17245
  server >= 7.147.0, top-level additive key, PRESENT-IFF: the `project.id` of the last `workspace_changed` frame this session row recorded — the project the engine judged for the session's last OWN leg (from the `.sema/project` marker
16280
17246
  in the checkout, or, with no marker, the submit body's `projectId` declaration; which one is not on the wire). The same value domain as `ProjectRow.id`. This service neither judges projects nor reads markers. No capability bit.
16281
17247
  ABSENT reads "this server did not say", NEVER "belongs to no project": no leg has recorded a frame yet / that frame had no project / the deployment's session store keeps no such cell (memory store) / an older server.
16282
- A forked session starts with no record. The session LIST row does not carry it and `GET /v1/sessions` has no `?projectId=` filter.
17248
+ A forked session starts with no record. server >= 7.155.0: ONE attribution, one reading - this key, the list row's `projectId`, the list filter
17249
+ `?projectId=` and the next submit's declared project read the same fact; clients write it through `PATCH` `projectId` (or a 2c replay), the session's
17250
+ own legs write the engine's verdict (a checkout carrying a `.sema/project` marker decides it, and such a session is read-only to clients:
17251
+ 409 `conflict.session_project_marked`).
16283
17252
  userInputUndrained:
16284
17253
  type: array
16285
17254
  description: >-
@@ -16394,6 +17363,17 @@ components:
16394
17363
  server ≥7.91.0 (additive, absent on older servers): the session's activity word, derived from its most
16395
17364
  recent run's status by the ONE mapping table the peer directory also reads (running → active;
16396
17365
  suspended / needs_review → blocked; no non-terminal run → idle).
17366
+ archived:
17367
+ type: boolean
17368
+ description: >-
17369
+ server >= 7.155.0: the archive bit, stored and read like `pinned` - ALWAYS present on such servers, default `false`; the PATCH 200 row and the
17370
+ 409 `currentRow` carry it too. It only decides whether the row is LISTED (the default list shows unarchived rows; `?archived=true` only archived);
17371
+ by-id doors ignore it. Absent = an older server (read as not archived).
17372
+ projectId:
17373
+ type: string
17374
+ description: >-
17375
+ server >= 7.155.0: the session's project attribution (lowercase uuid), PRESENT-IFF the session is filed under a project (never `null`; marker-decided
17376
+ and client-declared read alike). The same attribution as the session view's `projectId`; the PATCH 200 row and `currentRow` carry it too.
16397
17377
  pinned:
16398
17378
  type: boolean
16399
17379
  description: >
@@ -16445,9 +17425,12 @@ components:
16445
17425
  usable-name normalization) is `400 request.field_invalid` too (`title must contain at least one visible character`; the session-sync 2c import's `title` reads the same rule). Such titles written before
16446
17426
  7.136.0 are not migrated.
16447
17427
  additionalProperties: false
17428
+ # 至少一只可写位 —— server ≥7.155.0 四格(`archived` / `projectId` 新增;server 判官按同一张格表判「至少一格」)。
16448
17429
  anyOf:
16449
17430
  - required: [title]
16450
17431
  - required: [pinned]
17432
+ - required: [archived]
17433
+ - required: [projectId]
16451
17434
  properties:
16452
17435
  title:
16453
17436
  type: [string, 'null']
@@ -16456,6 +17439,13 @@ components:
16456
17439
  pattern: '^\S([\s\S]*\S)?$'
16457
17440
  description: 'A string = rename (1..120 characters, no leading / trailing whitespace); `null` = clear back to the automatic title; `""` is a 400 (the only spelling of "clear" is `null`).'
16458
17441
  pinned: { type: boolean, description: 'The pin (default `false` on a row that never set it).' }
17442
+ archived: { type: boolean, description: 'server >= 7.155.0 (gate on `Capabilities.sessionRowCells` containing "archived"): `true` archive / `false` unarchive; non-boolean => 400 `request.field_invalid`. An older server answers 400 `request.body_shape` for this key.' }
17443
+ projectId:
17444
+ type: [string, 'null']
17445
+ description: >-
17446
+ server >= 7.155.0 (gate on `Capabilities.sessionRowCells` containing "projectId"): a uuid files / re-files the session (upper case folded; shape only -
17447
+ the project registry is not consulted); `null` unfiles. Non-uuid string / empty / non-string => 400 `request.field_invalid`. A session whose project is
17448
+ decided by the `.sema/project` marker in its checkout => 409 `conflict.session_project_marked`, nothing written (no other cell of the body either).
16459
17449
  expectedRowTag:
16460
17450
  type: string
16461
17451
  pattern: '^[A-Za-z0-9_-]{43}$'
@@ -16766,6 +17756,28 @@ components:
16766
17756
  authorization:
16767
17757
  allOf: [{ $ref: '#/components/schemas/McpAuthorization' }]
16768
17758
  description: 'server >= 7.138.0 (core 7.59.0) — PRESENT-IFF this server is unauthorized (this face carries no `errorCode`, so presence reads "the principal must authorize this server first"): only the closed word `reason`. Absent = not an authorization door, or an older server.'
17759
+ prompts:
17760
+ allOf: [{ $ref: '#/components/schemas/McpHostReadAnswer' }]
17761
+ description: 'server >= 7.156.0 (capability bit `mcpHostReads`) — the engine''s `listPrompts` answer for this server, projected as is (the list is under `prompts`). Not pre-filtered by `status`: a server that did not connect answers `refused`. ABSENT = this read did not answer inside the materialization window this time (the panel is not `degraded` for it), or an older server.'
17762
+ resources:
17763
+ allOf: [{ $ref: '#/components/schemas/McpHostReadAnswer' }]
17764
+ description: 'server >= 7.156.0 (capability bit `mcpHostReads`) — the engine''s `listResources` answer for this server (the list is under `resources`); same reading and same absence as `prompts`.'
17765
+ resourceTemplates:
17766
+ allOf: [{ $ref: '#/components/schemas/McpHostReadAnswer' }]
17767
+ description: 'server >= 7.156.0 (capability bit `mcpHostReads`) — the engine''s `listResourceTemplates` answer for this server (the list is under `resourceTemplates`); same reading and same absence as `prompts`.'
17768
+
17769
+ McpHostReadAnswer:
17770
+ type: object
17771
+ additionalProperties: true
17772
+ description: >-
17773
+ server >= 7.156.0 — the engine's MCP host-read answer for ONE list door of ONE server (`servers[].prompts` / `.resources` / `.resourceTemplates` on `GET /v1/sessions/{sessionId}/mcp`), projected as is: the server
17774
+ judges nothing (not whether the server has that face, not whether it is allowed, not whether it connected). `outcome` is the one discriminator, three words: `read` (the list under the door's own key — `prompts` /
17775
+ `resources` / `resourceTemplates` — plus the engine's `dropped` count and, when the walk did not finish, `listingIncomplete`), `refused` (`reason` — remote-controllable text, redacted — plus the failure
17776
+ record's flat `errorCode` / `delivered` / `httpStatus`, and `authorization` when the refusal is `unauthorized`), `not_declared` (`reason`). This schema names only the discriminator; the members of each arm
17777
+ are read open.
17778
+ required: [outcome]
17779
+ properties:
17780
+ outcome: { type: string, description: '`read` | `refused` | `not_declared` (the engine''s closed set, one word per arm; read open).' }
16769
17781
 
16770
17782
  McpStatusPanel:
16771
17783
  type: object
@@ -17087,6 +18099,62 @@ components:
17087
18099
  description: >-
17088
18100
  server >= 7.139.0 (MIGRATION 7.139.0 item 7): present-iff the background agent row is bound to a CHILD session — jump to that session with it (it still passes the session face's owner gate). ABSENT = none yet,
17089
18101
  or an older server. Only ever on a `background_agent` row.
18102
+ ScheduledTaskSummary:
18103
+ type: object
18104
+ description: >
18105
+ server >= 7.156.0 — one row of a scheduled-task list: the engine's `ScheduledTaskSummary`, key by key (absent stays absent; the server mints no
18106
+ row key and forwards no key outside these seven).
18107
+ required: [id, when]
18108
+ additionalProperties: false
18109
+ properties:
18110
+ id: { type: string, description: 'The entry id (opaque to the caller); hand it back verbatim in the stop path.' }
18111
+ when: { type: string, description: 'Human-readable summary of the schedule (cron expression / at instant / delay seconds).' }
18112
+ label: { type: string }
18113
+ nextRunMs: { type: number, description: 'Next fire time, epoch ms (cron / at, when computable).' }
18114
+ mode: { type: string, enum: [task, session-wakeup], description: '`task` = starts a task; `session-wakeup` = wakes a session (an entry `ScheduleWakeup` filed). Absent = the backend did not say.' }
18115
+ lifetime: { type: string, enum: [durable, session], description: '`durable` = filed under the principal; `session` = a session-level entry. Absent = the backend did not say.' }
18116
+ recurring: { type: boolean, description: 'One-shot vs recurring (cron intents only); absent = not said or not a cron intent.' }
18117
+
18118
+ ScheduledTaskList:
18119
+ type: object
18120
+ description: 'server >= 7.156.0 — the 200 body of both scheduled-task list doors.'
18121
+ required: [rows, reach]
18122
+ additionalProperties: false
18123
+ properties:
18124
+ rows:
18125
+ type: array
18126
+ items: { $ref: '#/components/schemas/ScheduledTaskSummary' }
18127
+ reach: { allOf: [{ $ref: '#/components/schemas/ScheduledListReach' }], description: 'Which store this list read.' }
18128
+
18129
+ ScheduledListReach:
18130
+ type: string
18131
+ enum: [replica_store]
18132
+ description: 'server >= 7.156.0 — the server-minted closed set of a scheduled-task list''s `reach`: `replica_store` = the scheduled-task store THIS replica opened (a file on the host); other replicas reading another file are not seen.'
18133
+
18134
+ ScheduledTaskCancelResult:
18135
+ type: object
18136
+ description: 'server >= 7.156.0 — the 200 body of both scheduled-task stop doors: the stopped entry''s id as the path named it.'
18137
+ required: [id]
18138
+ additionalProperties: false
18139
+ properties:
18140
+ id: { type: string }
18141
+
18142
+ WorktreeCapability:
18143
+ type: object
18144
+ description: 'server >= 7.156.0 — `GET /v1/worktree-capability` 200: the engine''s `WorktreeCapability`, four keys verbatim.'
18145
+ required: [worktreeCapable]
18146
+ additionalProperties: false
18147
+ properties:
18148
+ worktreeCapable: { type: boolean }
18149
+ gitRoot: { type: string, description: 'The repository root the managed parent hangs at (present once the location is known to be a repository).' }
18150
+ reason: { allOf: [{ $ref: '#/components/schemas/WorktreeIncapableReason' }], description: 'Why not (only when `worktreeCapable: false`).' }
18151
+ detail: { type: string, description: 'One human sentence for the refusal; absent when capable.' }
18152
+
18153
+ WorktreeIncapableReason:
18154
+ type: string
18155
+ enum: [name_invalid, git_unavailable, not_a_repository, bare_repository, no_commit, managed_parent_symlinked, parent_not_writable, name_in_use]
18156
+ description: 'server >= 7.156.0 — why a folder cannot hold a managed worktree: the engine''s `WORKTREE_INCAPABLE_REASONS`, verbatim and in order (projected through an exhaustive switch on the server).'
18157
+
17090
18158
  SessionBackgroundList:
17091
18159
  type: object
17092
18160
  description: '`GET /v1/sessions/{sessionId}/background` 200 body (contract §16). An idle session answers `{ rows: [] }`.'
@@ -17203,6 +18271,8 @@ components:
17203
18271
  session has no writable row bits, so BOTH keys are absent there). ABSENT also = an older server (<= 7.124.x). Not part of the `basis` / `payloadVerified` judgement
17204
18272
  (those two speak only for the conversation log).
17205
18273
  pinned: { type: boolean, description: 'server >= 7.125.0 (contract section 20): the session row''s pin (same value as `SessionSummary.pinned`; present-iff exactly as `title` above).' }
18274
+ archived: { type: boolean, description: 'server >= 7.155.0: the session row''s archive bit (same value as `SessionSummary.archived`; present-iff exactly as `title` above). Phase A accepts the same key.' }
18275
+ projectId: { type: [string, 'null'], description: 'server >= 7.155.0: the session row''s project attribution (present-iff exactly as `title` above; `null` = not filed, the same law as `title: null` - a push replays it as unfiling). Phase A accepts the same key; a destination whose project is marker-decided KEEPS its cell, the other cells still apply.' }
17206
18276
 
17207
18277
  FileHistoryExport:
17208
18278
  type: object
@@ -17250,6 +18320,20 @@ components:
17250
18320
  properties:
17251
18321
  relOrAbsPath: { type: string }
17252
18322
  version: { type: integer }
18323
+ absoluteEntriesOmitted:
18324
+ type: integer
18325
+ minimum: 0
18326
+ description: >-
18327
+ engine 7.68.2 (carried by server >= 7.154.0; contract registered in 7.155.0): how many entries booked by ABSOLUTE path were omitted from this export.
18328
+ Both backends emit it. ABSENT = none omitted (do not read it as anything else). The import door accepts the same key (non-negative integer, else 400
18329
+ `request.field_invalid`) - move the envelope verbatim.
18330
+ frozenEntryKeys:
18331
+ type: array
18332
+ items: { type: string }
18333
+ description: >-
18334
+ engine 7.69.0 (server >= 7.155.0): FROZEN entries (a version once recorded through a link, outside the key's own directory) no longer leave with the
18335
+ export - the entries and their bytes stay at the source; this names their keys (root-relative, sorted). PRESENT-IFF non-empty. The importing side does
18336
+ not get those entries.
17253
18337
 
17254
18338
  SessionBundle:
17255
18339
  type: object
@@ -17403,6 +18487,23 @@ components:
17403
18487
  sends `code` yields `errorCode: undefined` and no typed subclass.
17404
18488
  additionalProperties: true
17405
18489
  properties:
18490
+ started:
18491
+ type: boolean
18492
+ enum: [false]
18493
+ description: >-
18494
+ server >= 7.156.0 — ONLY on the JSON refusal bodies of the three submit doors (`POST /v1/tasks`, `POST /v1/tasks/stream` before the
18495
+ stream opens, `POST /v1/runs`): `false` when the service can assert this attempt never started the engine. The ONLY value is `false`
18496
+ (`true` is never minted); ABSENT = UNKNOWN (after launch, on a same-key replay / in-flight follower, on any other route, on an older
18497
+ server). Never on an in-stream terminal frame. NOT a promise that a same-key resend executes — always send an `Idempotency-Key`.
18498
+ stuck:
18499
+ allOf: [{ $ref: '#/components/schemas/StuckCardWord' }]
18500
+ description: >-
18501
+ server >= 7.156.0 — why the card a refusal names cannot take a decision here (the same reader and projection as the pending rows' `stuck`).
18502
+ On the decision-family resume refusals (`/decide` · `plan_review` · `assistant.resume` · `sessions.wake`) that are the row's own refusal it is
18503
+ always `row`; on `409 conflict.resume_context_unavailable`, the four wrong-door guards, `409 approval_stale` and `410 gone.ask_parked` it is one
18504
+ of the three words when the named card cannot take a decision — those refusals then also carry `wayOut` (the closed set `ApprovalWayOut`, see
18505
+ `ResumeLegConflictError.wayOut`) when the server can say a way out, and no longer point back at any decision door. Absent = an older server, or
18506
+ the card can take a decision. SDK `ResumeRefusalExtra.stuck`.
17406
18507
  errorCode:
17407
18508
  type: string
17408
18509
  description: >
@@ -17467,6 +18568,14 @@ components:
17467
18568
  the same request sent again gets the same sentence, only the request (send the credential) or the deployment (configure one) changes it) and `state.no_sandbox_base` (`POST /v1/images/bakes` has no usable
17468
18569
  `sandbox-base` to build FROM; only an operator pinning `SANDBOX_BASE_REF` or publishing one changes it; a non-submit POST, so the SDK's own retry arm never resends it either way — what changes is
17469
18570
  the answer of the exported `resendIsMeaningless`).
18571
+ One more 500, server code family `deterministic`: `internal.session_erase_incomplete` (server >= 7.156.0, `DELETE /v1/sessions/{sessionId}` on the local
18572
+ backend — some data of the session was not deleted, typically a parked-context file or anchor log that permission or a lock kept from being removed; the root
18573
+ `legs` names the legs whose data may still be there, the other legs are deleted and the session row reads as gone). A verbatim resend does not change the
18574
+ verdict: clear the cause first (file permission / the holder; the service log has one line per failed leg), then send the same `DELETE` again and it converges
18575
+ (idempotent). A `DELETE` is never auto-retried by the SDK either way — what changes is the answer of the exported `resendIsMeaningless`.
18576
+ And one more 500 of the same family: `internal.scheduler_store_unreadable` (server >= 7.156.0, the scheduled-task doors could not read or write the
18577
+ scheduled-task store — untrusted, not a JSON array, concurrent writers exhausted; no partial list is given). A verbatim resend does not change it: repair the
18578
+ store first. The two list doors are `GET`s, so the SDK's retry arm now sends them once instead of three times; the stop doors are `DELETE`s and never resent.
17470
18579
  `invalid_session` (500 on servers 7.137.0–7.143.x for the structurally broken form) is RETIRED at server 7.144.0 and no longer exempt: against those older servers the SDK retries it by status.
17471
18580
  Every other 5xx code keeps the status-based retry.
17472
18581
  🔴 server >= 7.135.0 read-failure and store-fault codes (all additive; branch on the code, never the sentence): `503 approvals.read_unavailable` on `GET /v1/approvals`, `/v1/assistant/inbox` and
@@ -17701,17 +18810,19 @@ components:
17701
18810
  - type: object
17702
18811
  properties:
17703
18812
  wayOut:
17704
- type: string
17705
- enum: [cancel_run, newer_worker]
18813
+ allOf: [{ $ref: '#/components/schemas/ApprovalWayOut' }]
17706
18814
  description: >-
17707
18815
  server >= 7.149.0, PRESENT-IFF the server can say the client's way out of a refused card (the engine judged the card not resumable on this engine;
17708
- the three decision doors `POST /v1/approvals/{sessionId}/decide` · `.../plan_review` · `.../resume` refuse alike). CLOSED two words, decided by the verdict and the card alone
18816
+ the three decision doors `POST /v1/approvals/{sessionId}/decide` · `.../plan_review` · `.../resume` refuse alike). The same closed set as the pending rows' `wayOut`
18817
+ (`ApprovalWayOut`; server >= 7.155.0 three words, adding `void_card` - a card judged bad that no run waits on: the way out is `POST /v1/approvals/{sessionId}/void`). Decided by the verdict and the card alone
17709
18818
  (not by which door, not by the decision word): `cancel_run` - the card takes NO decision on this engine (approve / deny / reject / edit all refused), the way out is
17710
18819
  `POST /v1/runs/{taskId}/cancel`, which expires the card, drives the run to the cancelled terminal and frees the session (then start a new task) - render no approve / deny;
17711
18820
  `newer_worker` - a row parked by a newer engine: a worker at or above the version that parked it can resume it and the same decision lands there; the card stays pending
17712
18821
  (cancel is giving it up). ABSENT = the server cannot say a client way out (the card sits on a plain park of an already-terminal run, the run is running, the row's owner is
17713
18822
  unreadable, or no durable run store) - ask the operator; do NOT render "decide again" from `retriable`. Not carried: a refusal of the decision body's own cell (fix that
17714
18823
  cell and decide again), a deployment-fact refusal, `POST /v1/sessions/{sessionId}/wake`. SDK: `err.extra.wayOut` (`ResumeRefusalExtra.wayOut`).
18824
+ server >= 7.156.0: the same word also rides `409 conflict.resume_context_unavailable`, the four wrong-door guards, `409 approval_stale` and
18825
+ `410 gone.ask_parked` when the card they name cannot take a decision, beside the reason word `stuck` (see `ErrorResponse.stuck`).
17715
18826
  retriable:
17716
18827
  type: boolean
17717
18828
  enum: [true]
@@ -17829,6 +18940,12 @@ components:
17829
18940
  # liveness tick, LIVE ONLY — never on the durable replay).
17830
18941
  - $ref: '#/components/schemas/Event_tool_disclosure'
17831
18942
  - $ref: '#/components/schemas/Event_tool_progress'
18943
+ # server >= 7.155.0 (engine 7.69.1): the prefix ledger's frame `prefix_changed` (all three legs — live + both durable ledgers; not the trace SSE) and the
18944
+ # DURABLE-only per-call request reading `model_call_request` (the `GET /v1/runs/{taskId}/events` ledger replay only).
18945
+ - $ref: '#/components/schemas/Event_prefix_changed'
18946
+ - $ref: '#/components/schemas/Event_model_call_request'
18947
+ # server >= 7.156.0 (engine 7.69.0): the LIVE-ONLY hook review start / end frame `hook_progress` (capability bit `hookProgress`).
18948
+ - $ref: '#/components/schemas/Event_hook_progress'
17832
18949
  discriminator:
17833
18950
  propertyName: type
17834
18951
  mapping:
@@ -17881,6 +18998,9 @@ components:
17881
18998
  reasoning_end: '#/components/schemas/Event_reasoning_end'
17882
18999
  tool_disclosure: '#/components/schemas/Event_tool_disclosure'
17883
19000
  tool_progress: '#/components/schemas/Event_tool_progress'
19001
+ prefix_changed: '#/components/schemas/Event_prefix_changed'
19002
+ model_call_request: '#/components/schemas/Event_model_call_request'
19003
+ hook_progress: '#/components/schemas/Event_hook_progress'
17884
19004
 
17885
19005
  # design/99 §E2 (SHIPPED, core TaskEventIdentity) — additive per-event identity on every CONTENT event (NOT on
17886
19006
  # the lifecycle arms turn_end/compacted/suspended/done/failed). eventId = uuidv7 dedup/resume handle (the durable
@@ -17905,13 +19025,23 @@ components:
17905
19025
  condition: durable-ledger leg only (no ledger => neither header nor frame). sessionId rides along
17906
19026
  (needed to bind subsequent turns when the server minted a fresh session). Always precedes any content
17907
19027
  frame. NOT an engine event — server-minted, no EventIdentity.
17908
- # 封闭:铸造点 routes/tasks.ts 是逐字写死的三键字面量(sessionId 条件在场);server >= 7.133.0 起第四个条件键 `warnings`(有才发)。
19028
+ # 封闭:铸造点 routes/tasks.ts 是逐字写死的三键字面量(sessionId 条件在场);server >= 7.133.0 起第四个条件键 `warnings`(有才发);server >= 7.156.0 起第五个条件键 `detachAccepted`(有才发)。
17909
19029
  additionalProperties: false
17910
19030
  required: [type, taskId]
17911
19031
  properties:
17912
19032
  type: { const: meta }
17913
19033
  taskId: { type: string }
17914
19034
  sessionId: { type: string }
19035
+ detachAccepted:
19036
+ const: true
19037
+ description: >-
19038
+ server >= 7.156.0 — the RECEIPT of `x-detach-on-disconnect` (only `true`, present only then): the request carried the header as the exact string
19039
+ `true`, passed the entry replay checks, the server armed the disconnect arm and row creation did not answer "this submission does not run" — from
19040
+ here on a disconnect does not abort the run this submission starts. A receipt for the header, NOT a promise that this submission runs: forms still
19041
+ undecided when `meta` is written (joined an in-flight same-key submission inside the leg, refused after open) carry it, their terminal frame says so
19042
+ and the stream has no content frame of this submission — hand off on "this bit AND the first content frame". Absent = not said (no header / not the
19043
+ exact `true` / an entry same-key replay / row creation already knew it does not run / an older server) ⇒ stay in the foreground. Only on the submit
19044
+ stream's `meta`; the resume faces (`GET /v1/runs/{taskId}/events`) do not carry it.
17915
19045
  warnings:
17916
19046
  type: array
17917
19047
  items: { $ref: '#/components/schemas/EntryProblem' }
@@ -18103,10 +19233,10 @@ components:
18103
19233
  # 每只闭集 = 引擎今天的词 ∪ 引擎退役词表里那一集。这五张 enum 与引擎 `RETIRED_MEMBERS` 逐集逐词同(由 `server-7129-wire` 对拍);卡面 / 队列行 / 请求面的同名闭集只取今天的词。
18104
19234
  GateRecordAskClass:
18105
19235
  type: string
18106
- enum: [content_question, hook, ancestor, dangerous_delete, unverifiable_delete, unverifiable_shell_text, transcript_write, org_rule, rule_unreadable, ask_rule, denial_limit_fallback, classifier_no_ruling, requires_user_interaction, cross_boundary, operator_forced, shell_floor, target_unresolved, probe, write_protection_on_disk, write_protection, tool_marks_mcp, tool_marks_a2a, policy_rra, artifact_shared_read, mode, unstated, ordinary, write_protection_unresolved, governance_unavailable]
19236
+ enum: [content_question, hook, ancestor, dangerous_delete, transcript_write, org_rule, org_unreadable, rule_unreadable, call_unreadable, ask_rule, denial_limit_fallback, classifier_no_ruling, requires_user_interaction, cross_boundary, operator_forced, shell_floor, target_unresolved, probe, write_protection_on_disk, write_protection, tool_marks_mcp, tool_marks_a2a, policy_rra, artifact_shared_read, mode, unverifiable_delete, unverifiable_shell_text, sandbox_override, sandbox_network, unstated, ordinary, write_protection_unresolved, governance_unavailable]
18107
19237
  description: >-
18108
19238
  The class word on a GATE RECORD (`tool_end.gate.disposition.askClass` / `.classes` on the mode-refusal arm, `ModeRelease.askClass` / `.classes`) — server >= 7.129.0 reads the record as an ARCHIVE:
18109
- today's `AskClass` set (twenty-seven words; `write_protection_on_disk` from server >= 7.138.0, `cross_boundary` from server >= 7.134.0) PLUS the words the engine retired (`write_protection_unresolved`, retired in core 7.49.0 — renamed `target_unresolved`; `governance_unavailable`,
19239
+ today's `AskClass` set (thirty-one words; `org_unreadable` / `call_unreadable` / `sandbox_override` / `sandbox_network` from server >= 7.155.0, `write_protection_on_disk` from server >= 7.138.0, `cross_boundary` from server >= 7.134.0) PLUS the words the engine retired (`write_protection_unresolved`, retired in core 7.49.0 — renamed `target_unresolved`; `governance_unavailable`,
18110
19240
  retired in core 7.51.0 — merged into `rule_unreadable`). A record the previous engine generation legally wrote is replayed byte for byte (a 7.50.x mode refusal can carry `governance_unavailable`);
18111
19241
  a word NO engine generation ever minted (a case variant, the empty string, a future word) withholds the whole `gate` and counts `server.trace.gate-outcome-defective`.
18112
19242
  Render a known archive word normally and an unknown one generically; never drop the record because the word is not in today's set.
@@ -18137,7 +19267,7 @@ components:
18137
19267
  Settlement:
18138
19268
  description: >
18139
19269
  HOW the wait an ask was in ENDED — a DISCRIMINATED union on `kind` (core `SETTLEMENT_KINDS`: 12 words at 7.6.0,
18140
- 14 as of core 7.39.0 — `policy_refused` joined at 7.26.2 and `policy_allowed` with the policy party at 7.39.0 / server 7.113.0; CLOSED). It is deliberately NOT a free product of `kind` x `who`: a free product can express
19270
+ 14 as of core 7.39.0 — `policy_refused` joined at 7.26.2 and `policy_allowed` with the policy party at 7.39.0 / server 7.113.0; 15 from core 7.69.1 / server 7.155.0 with `approval_withdrawn`; CLOSED). It is deliberately NOT a free product of `kind` x `who`: a free product can express
18141
19271
  "human_allowed, ended by the engine's window" — a structurally complete record that contradicts itself.
18142
19272
  `who` says WHICH PARTY ended it and its shape is fixed BY the word; `when` is epoch ms written at the
18143
19273
  settlement site; a person's refusal carries the decider's own `note` when one was attached.
@@ -18153,6 +19283,7 @@ components:
18153
19283
  - $ref: '#/components/schemas/Settlement_denial_limit_window_expired'
18154
19284
  - $ref: '#/components/schemas/Settlement_park_sla_expired'
18155
19285
  - $ref: '#/components/schemas/Settlement_fail_closed'
19286
+ - $ref: '#/components/schemas/Settlement_approval_withdrawn'
18156
19287
 
18157
19288
  Settlement_human:
18158
19289
  type: object
@@ -18286,6 +19417,27 @@ components:
18286
19417
  party: { const: none }
18287
19418
  when: { type: integer, format: int64 }
18288
19419
 
19420
+ Settlement_approval_withdrawn:
19421
+ type: object
19422
+ additionalProperties: false
19423
+ description: >
19424
+ server >= 7.155.0 (core 7.69.1) — the HOST's approval system closed the question before anyone answered it: nobody refused, the call did not run, asking again
19425
+ is legitimate. Every system ending this server gives an ask lands here — a sibling withdrawn when another ask of its batch went to wait for a person · the record
19426
+ reaped by a cancel or a reconcile elsewhere · its delivery connection gone · the run cancelled (an idempotent re-entry that meets the voided record replays the
19427
+ same). The party is ALWAYS `host` — not `none` (the engine's own fail-closed ends) and not `policy` (a deployment policy refusal is still `policy_refused`). The
19428
+ cause is the `(cause: <word>)` tail of the sentence the model reads and the card-close frame's `approval_complete.cause`. On servers <= 7.154.x these endings
19429
+ were settled `human_refused` with `who.party: person`.
19430
+ required: [kind, who, when]
19431
+ properties:
19432
+ kind: { const: approval_withdrawn }
19433
+ who:
19434
+ type: object
19435
+ additionalProperties: false
19436
+ required: [party]
19437
+ properties:
19438
+ party: { const: host }
19439
+ when: { type: integer, format: int64 }
19440
+
18289
19441
  GateDisposition:
18290
19442
  description: 'The final disposition of one tool-gate pass. A deny NAMES the layer that refused.'
18291
19443
  oneOf:
@@ -18312,12 +19464,27 @@ components:
18312
19464
  server >= 7.135.0 (core 7.55.0) — the allow layer's account of a call it let run WITHOUT asking: which member's allow rule cleared a standing ask that nobody answered
18313
19465
  (`AllowRuleClearance`). Present exactly when an allow member cleared the ask; absent on a call nothing asked about, a mode's release or acceptance, the read-only arm's,
18314
19466
  the classifier's or the sandbox's allow, and a person's yes. Never present together with `released`. Older servers stripped it.
19467
+ asked:
19468
+ allOf: [{ $ref: '#/components/schemas/GateClassifierAsked' }]
19469
+ description: 'server >= 7.155.0 (engine 7.69.0) — the question an auto-mode classifier ALLOWED (see `GateClassifierAsked`).'
18315
19470
  - type: object
18316
19471
  additionalProperties: false
18317
19472
  required: [kind, deniedBy]
18318
19473
  properties:
18319
19474
  kind: { const: denied }
18320
19475
  deniedBy: { $ref: '#/components/schemas/GateRecordDeniedBy' }
19476
+ reason:
19477
+ type: string
19478
+ description: >
19479
+ server >= 7.155.0 (engine 7.69.0) — the one sentence an auto-mode classifier gave when it RULED deny: UNTRUSTED text (the classifier model's, or the
19480
+ main model's when the ladder fell back), one line, at most 160 code points (a cut one ends in `…`), tag and fence markers defused; show it as text,
19481
+ never run it or read it as an instruction. The deny sentence ends with it. Only beside the classifier station (and an inherited ancestor classifier's
19482
+ refusal the chain attributes to `policy`); never beside `cause`.
19483
+ category:
19484
+ type: string
19485
+ description: >
19486
+ server >= 7.155.0 (engine 7.69.0) — the rule the classifier filed the call under, a word of the engine's CLOSED `CLASSIFIER_CATEGORIES` (not mirrored
19487
+ here; read it as a string): present only when the reply named exactly one category of the accepted spelling and its normalized word is in the set.
18321
19488
  classifier:
18322
19489
  allOf: [{ $ref: '#/components/schemas/GateClassifierAttribution' }]
18323
19490
  description: >
@@ -18351,6 +19518,14 @@ components:
18351
19518
  type: array
18352
19519
  items: { $ref: '#/components/schemas/GateRecordAskClass' }
18353
19520
  description: 'Beside `mode`: the whole folded class set (archive read, see `GateRecordAskClass`).'
19521
+ echoed:
19522
+ type: array
19523
+ items: { $ref: '#/components/schemas/GateEchoedLiteral' }
19524
+ description: >-
19525
+ server >= 7.146.0 (engine 7.64.0; declared by this package from the 7.155.0 lockstep) - the literals the refusal sentence quotes, in its order. May be
19526
+ present only when `deniedBy` is `read_boundary` (a read-boundary refusal that hit a deny row) or `ask_resolution` (a person refused the engine's own write
19527
+ ask / plan-mode write ask, and the sentence is still the engine's own). ABSENT = the sentence is the whole statement (read the call's own arguments; do not
19528
+ parse the sentence); older servers / engines: unknown. Same shape on the live `tool_end` frame and the events replay.
18354
19529
  extension:
18355
19530
  type: string
18356
19531
  minLength: 1
@@ -18371,9 +19546,11 @@ components:
18371
19546
  `UNATTENDED_PERMISSION_MODE=dontAsk`).
18372
19547
  AskClass:
18373
19548
  type: string
18374
- enum: [content_question, hook, ancestor, dangerous_delete, unverifiable_delete, unverifiable_shell_text, transcript_write, org_rule, rule_unreadable, ask_rule, denial_limit_fallback, classifier_no_ruling, requires_user_interaction, cross_boundary, operator_forced, shell_floor, target_unresolved, probe, write_protection_on_disk, write_protection, tool_marks_mcp, tool_marks_a2a, policy_rra, artifact_shared_read, mode, unstated, ordinary]
19549
+ enum: [content_question, hook, ancestor, dangerous_delete, transcript_write, org_rule, org_unreadable, rule_unreadable, call_unreadable, ask_rule, denial_limit_fallback, classifier_no_ruling, requires_user_interaction, cross_boundary, operator_forced, shell_floor, target_unresolved, probe, write_protection_on_disk, write_protection, tool_marks_mcp, tool_marks_a2a, policy_rra, artifact_shared_read, mode, unverifiable_delete, unverifiable_shell_text, sandbox_override, sandbox_network, unstated, ordinary]
18375
19550
  description: >
18376
- core `ASK_CLASSES` (TWENTY-SEVEN words as of core 7.58.0 / server >= 7.138.0: `write_protection_on_disk` joined after `probe`, before `write_protection` — see below;
19551
+ core `ASK_CLASSES` (THIRTY-ONE words as of engine 7.69.0 / server >= 7.155.0: `org_unreadable` / `call_unreadable` joined beside `rule_unreadable`, `sandbox_override` /
19552
+ `sandbox_network` joined after `mode`, and `unverifiable_delete` / `unverifiable_shell_text` moved to just after `mode` — see below;
19553
+ TWENTY-SEVEN as of core 7.58.0 / server >= 7.138.0: `write_protection_on_disk` joined after `probe`, before `write_protection` — see below;
18377
19554
  TWENTY-SIX as of core 7.54.0 / server >= 7.134.0: `cross_boundary` joined after `requires_user_interaction` — the device lane's
18378
19555
  cross-boundary confirmation, see below; TWENTY-FIVE as of core 7.51.0 / server >= 7.129.0: `governance_unavailable` was merged into `rule_unreadable`, no alias — sdk 23.0.0; a stored card / parked row written by server <= 7.128.x is rewritten once by the server at boot. The gate record reads the ARCHIVE form, see `GateRecordAskClass`. History: twenty-two words as of core 7.40.0, twenty-three as of core 7.41.0, twenty-four as of core 7.43.0, twenty-five as of core 7.45.0, twenty-six as of core 7.49.0 — 7.34.0 minted twenty; `unverifiable_shell_text` joined in 7.49.0 #1505 and rides server >= 7.126.0, where the
18379
19556
  unresolved-write-target class was also RENAMED to `target_unresolved` (#955; zero alias — the previous spelling is in the SDK README's 22.0.0 migration table); `shell_floor` joined in 7.39.0 #1260 and rides
@@ -18387,12 +19564,18 @@ components:
18387
19564
  it: no mode (`bypassPermissions` included), no allow (request `settings.permissions.allow`, operator `APPROVAL_GRANT`, a stored allow row, a
18388
19565
  skill's tool list, a hook's allow) and no `auto` classifier does; the frame carries `requiresRealApproval: true`, nobody answering means the
18389
19566
  call does not run (the unattended leg refuses), and it is bypass-IMMUNE (not a releasable class).
18390
- `rule_unreadable` (core 7.51.0 / server >= 7.129.0 also covers the organization snapshot that could not be read — the former `governance_unavailable`) = a rule that may govern this call could not be READ (the organization's snapshot, a partition of the person's own rule store, or the rule this call was read against); bypass-immune.
19567
+ `rule_unreadable` (core 7.51.0 / server >= 7.129.0 also covers the organization snapshot that could not be read — the former `governance_unavailable`) = a rule that may govern this call could not be READ (the organization's snapshot, a partition of the person's own rule store, or the rule this call was read against); bypass-immune through server 7.154.x.
19568
+ On server >= 7.155.0 (engine 7.69.0) `rule_unreadable` covers only the person's own rules (a partition of the rule store, or the row a read stood on): the person's
19569
+ relaxed modes answer it (`auto`'s classifier judges, `bypassPermissions` releases), asking modes still ask; the organization snapshot is `org_unreadable` and a rule
19570
+ the call could not be read against is `call_unreadable`.
18391
19571
  `unverifiable_shell_text` (core 7.49.0 #1505, server >= 7.126.0) = the engine CANNOT READ the text this shell will execute — the shell is fed
18392
19572
  text the command does not spell (a program's output, a substitution, a file's content, an argv a stream fills in: `bash -c "$CMD"`,
18393
19573
  `eval "$(…)"`, `xargs sh -c …`; shell text that does not parse or is nested too deep lands here too). Its arbitration row is
18394
19574
  `unverifiable_delete`'s save the classifier column: bypass-IMMUNE, no allow rule clears it, the `auto` classifier is not asked, `dontAsk`
18395
19575
  refuses; only a person's answer clears it. The card carries no `mandate` word.
19576
+ On server >= 7.154.5 both `unverifiable_delete` and `unverifiable_shell_text` are ORDINARY asks: `bypassPermissions` releases them (releasable),
19577
+ `auto` hands them to the classifier, allow rules and "don't ask again" clear them, `dontAsk` refuses, and the ask no longer carries
19578
+ `requiresRealApproval`; the bypass-immune reading above holds only on server 7.126.0 – 7.154.4. A recognised delete of a protected place stays `dangerous_delete`.
18396
19579
  `target_unresolved` (core 7.49.0 #955, server >= 7.126.0; the previous spelling was used on 7.122.0–7.125.x) = WHERE A WRITE LANDS COULD NOT BE
18397
19580
  DETERMINED (a link on the way could not be examined, or the environment could not resolve the target), so whether it lands on a guarded path
18398
19581
  (the write-protection table, the sensitive-path list) is unknown. Refused on the file tools; on the SHELL face `bypassPermissions` releases it and
@@ -18416,12 +19599,17 @@ components:
18416
19599
  written names no row, its real target or a link on the way does (an innocent spelling the disk carries onto a guarded path). It and `write_protection` (the path as written
18417
19600
  names a row) are the two readings of one table hit, judged per written target and never both for one target; a command writing several targets may carry both. Its
18418
19601
  arbitration row is `write_protection`'s save the classifier column: the auto-mode classifier does NOT answer it (a person does); `bypassPermissions` releases it (a
18419
- RELEASABLE class), `dontAsk` refuses it, and no standing allow rule clears it — confirming this call does.
18420
- `shell_floor` = the operator's `shellGate: "always"` floor on a shell-running seat (the question the `operator_always` mandate
19602
+ RELEASABLE class), `dontAsk` refuses it, and no standing allow rule clears it — confirming this call does. Server >= 7.155.0 (engine 7.69.0): the classifier
19603
+ column matches `write_protection` too (under `auto` the classifier judges it); the other columns are unchanged.
19604
+ `shell_floor` =the operator's `shellGate: "always"` floor on a shell-running seat (the question the `operator_always` mandate
18421
19605
  word discloses), a class of its own so a set that holds another forced question still holds it; like `operator_forced` it is
18422
19606
  bypass-IMMUNE (not releasable).
18423
- CLOSED: the card / queue-row / request faces carry exactly today's twenty-seven words; the GATE RECORD (`tool_end.gate` and the replay faces) carries today's words PLUS the engine's retired words (`GateRecordAskClass`). `bypassPermissions` releases only the RELEASABLE classes (core
18424
- `releasableAskClassesFor(face)`). Server >= 7.138.0 (core 7.58.0): ten on every face (`transcript_write` / `probe` / `write_protection_on_disk` / `write_protection` /
19607
+ CLOSED: the card / queue-row / request faces carry exactly today's thirty-one words; the GATE RECORD (`tool_end.gate` and the replay faces) carries today's words PLUS the engine's retired words (`GateRecordAskClass`). `bypassPermissions` releases only the RELEASABLE classes (core
19608
+ `releasableAskClassesFor(face)`). Server >= 7.155.0 (engine 7.69.0): shell 16, other faces 15 — the ten below plus, on every face, `rule_unreadable` (now only the person's
19609
+ own rules being unreadable: a release mode releases it, `auto` asks the classifier), `unverifiable_delete` / `unverifiable_shell_text` (an ordinary ask since server 7.154.5:
19610
+ an allow rule clears it, `auto` asks the classifier, `dontAsk` refuses) and the two new classes `sandbox_override` / `sandbox_network`; the shell face still adds
19611
+ `target_unresolved`. The same generation's classifier also answers `rule_unreadable` / `write_protection_on_disk` / `artifact_shared_read` (a person did before).
19612
+ `org_unreadable` / `call_unreadable` are bypass-IMMUNE. Server >= 7.138.0 (core 7.58.0) through 7.154.4: ten on every face (`transcript_write` / `probe` / `write_protection_on_disk` / `write_protection` /
18425
19613
  `tool_marks_mcp` / `tool_marks_a2a` / `artifact_shared_read` / `mode` / `unstated` / `ordinary` — one more than the generation before, `write_protection_on_disk`) plus an
18426
19614
  eleventh on the SHELL face only, `target_unresolved` (shell 11, other faces 10 again, with a different tenth class than 7.122.0–7.126.x).
18427
19615
  Server 7.127.0–7.137.x (core 7.50.0–7.56.x): nine on every face (`transcript_write` / `probe` / `write_protection` /
@@ -18430,7 +19618,18 @@ components:
18430
19618
  by any mode (bypass asks too, and the run gets one `permission.rule_store_unavailable` notice). Server 7.122.0–7.126.x (core 7.47.0–7.49.x) also
18431
19619
  released `rule_unreadable` on every face: ten RELEASABLE classes plus an eleventh on the SHELL face (shell 11, other faces 10). Up to 7.121.x the
18432
19620
  `RELEASABLE_ASK_CLASSES` constant (deleted in core 7.47.0) held ten, face-blind. Every other class (deployment-authored `operator_forced`, ask / org
18433
- rules, hook, ancestor, content question, `unverifiable_shell_text`, …) asks under every mode.
19621
+ rules, hook, ancestor, content question, `unverifiable_shell_text` up to server 7.154.4, `org_unreadable` / `call_unreadable` from server 7.155.0, …) asks under every mode.
19622
+ GateClassifierAsked:
19623
+ type: object
19624
+ additionalProperties: false
19625
+ required: [askClass, classes]
19626
+ description: >
19627
+ server >= 7.155.0 (engine 7.69.0 `ClassifierAsked`) — the question an auto-mode classifier ALLOWED, read like a release: the disclosed class word
19628
+ (`askClass`, the first member of `classes` in engine `ASK_CLASSES` order) and the whole set. Present exactly when a classifier's allow is the pass's
19629
+ answer, beside `classifier`; never beside a settlement, a release or a clearance. Absent = no classifier answered, or an engine that did not keep it.
19630
+ properties:
19631
+ askClass: { $ref: '#/components/schemas/GateRecordAskClass' }
19632
+ classes: { type: array, items: { $ref: '#/components/schemas/GateRecordAskClass' } }
18434
19633
  ModeRelease:
18435
19634
  type: object
18436
19635
  additionalProperties: false
@@ -18439,8 +19638,23 @@ components:
18439
19638
  K-32 (server >= 7.106.0 / core 7.34.0 `ModeRelease`, key-for-key) — a permission MODE released an ask nobody answered: the
18440
19639
  allowed arm's account of the question it did not put to anyone. Core invariant I7: present ⇒ `kind: allowed`, no settlement,
18441
19640
  `mode` is `bypassPermissions`, `askClass` a releasable class. Each (mode, class) pair also mints ONE `engine_notice`
18442
- `permission.ask_released_by_mode` per run.
19641
+ `permission.ask_released_by_mode` per run on servers <= 7.154.x; server >= 7.155.0 (engine 7.69.0) no longer puts that notice
19642
+ (nor `permission.read_deny_unapplied`) on the session stream — this record is the release's one account.
18443
19643
  properties:
19644
+ readUnestablished:
19645
+ type: object
19646
+ additionalProperties: false
19647
+ required: [tiers, rows, rowCount]
19648
+ description: >
19649
+ server >= 7.155.0 (engine 7.69.0) — the read station could not establish what this call reads, so no row of the leg's read-deny table was applied to
19650
+ those reads; it names that table, read once at the release: `tiers` (active built-in tiers), `rows` (the first rows beside them) and `rowCount` (every
19651
+ such row). The three empty WITHOUT `tableUnread` = no read-deny table stood; WITH `tableUnread: true` (the three then empty) the release read no table —
19652
+ not "there was none". Absent = the reads were established (on a record this engine wrote; an older engine's record never carries it).
19653
+ properties:
19654
+ tiers: { type: array, items: { type: string } }
19655
+ rows: { type: array, items: { type: string } }
19656
+ rowCount: { type: integer, minimum: 0 }
19657
+ tableUnread: { const: true }
18444
19658
  mode: { $ref: '#/components/schemas/PermissionMode' }
18445
19659
  askClass: { $ref: '#/components/schemas/GateRecordAskClass' }
18446
19660
  classes: { type: array, items: { $ref: '#/components/schemas/GateRecordAskClass' } }
@@ -18602,6 +19816,31 @@ components:
18602
19816
  type: array
18603
19817
  items: { $ref: '#/components/schemas/McpProbeFaceRow' }
18604
19818
  description: 'One row per declaration, the wiring-manifest row shape plus (server >= 7.133.0) this face''s two optional keys, index-aligned (see this schema''s description).'
19819
+ droppedEntries:
19820
+ type: array
19821
+ items: { $ref: '#/components/schemas/McpDroppedEntry' }
19822
+ description: >-
19823
+ server >= 7.156.0, PRESENT-IFF a deployment-declared MCP entry that is visible in the scenario this read names is NOT served by this replica (dropped at the read leg, or skipped at mount time);
19824
+ ABSENT = nothing was dropped, or an older server. `GET /v1/capabilities/mcp` ONLY — `POST /v1/capabilities/mcp/probe` never carries it (it dials the caller's own declarations). Each row names
19825
+ the entry (when its name is a disclosable identifier) and says why in a closed word; rows may gain keys, read unknown ones as absent.
19826
+
19827
+ McpDroppedReasonCode:
19828
+ type: string
19829
+ enum: [entry-schema-invalid, entry-key-invalid, entry-unreadable, entry-unknown-key, name-unusable, tool-faces-invalid, tool-axes-invalid, session-meta-key-invalid, env-missing, credentials-unverified]
19830
+ description: >-
19831
+ server >= 7.156.0 — why a deployment-declared MCP entry is not served (`GET /v1/capabilities/mcp` `droppedEntries[].reasonCode`; ten words, a closed set the server projects exhaustively). The first four are the
19832
+ contract package's read-leg words, passed through (the same words, same meaning, as `GET /v1/models` `droppedEntries[].reasonCode`); the other six are the mount-time reasons this server mints (the entry
19833
+ was read, the mount skipped it): `name-unusable` (the name is empty, over the bound, or carries leading / trailing white space), `tool-faces-invalid` (the entry's `toolFaces` overlay was refused by the engine's judge),
19834
+ `tool-axes-invalid` (its `toolAxes` effect-axis declaration was refused), `session-meta-key-invalid` (its `sessionMetaKey` was refused), `env-missing` (an environment variable the entry refers to — a stdio
19835
+ `envRefs` or an http `headerRefs` — is not set in this service's environment), `credentials-unverified` (an http entry carries `transport.credentials` that this deployment can neither verify nor mint an assertion for).
19836
+ McpDroppedEntry:
19837
+ type: object
19838
+ additionalProperties: true
19839
+ description: 'server >= 7.156.0 — one row of `GET /v1/capabilities/mcp` `droppedEntries`: the entry that is not served and the closed reason word. `name` is present iff the entry''s name is a disclosable identifier and the row is not a `name-unusable` one (a name outside that set leaves the key absent; the row stays). The row is open on purpose: the server may add keys without a version word.'
19840
+ required: [reasonCode]
19841
+ properties:
19842
+ name: { type: string }
19843
+ reasonCode: { $ref: '#/components/schemas/McpDroppedReasonCode' }
18605
19844
 
18606
19845
  McpLivenessState:
18607
19846
  type: string
@@ -18705,6 +19944,18 @@ components:
18705
19944
  description: >-
18706
19945
  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 `[]`).
18707
19946
  Replay reads the ledger's copy. Read this instead of comparing redaction marker literals.
19947
+ cardRedactedKeys:
19948
+ type: array
19949
+ uniqueItems: true
19950
+ items: { type: string }
19951
+ description: >-
19952
+ server >= 7.156.0 (MINTED BY THIS SERVER): the members of the CARD (`structured`; `structuredSkeleton` when the card did not ride) whose bytes the
19953
+ server's exit redaction rewrote (a leaf replaced by a marker, a cycle / over-deep subtree replaced by a visible marker, an authorization record narrowed).
19954
+ OPEN set of member names (they depend on the tool card: `originalFile`, `edits`, `content` ...), names only, no values, no duplicates. Absence law: a
19955
+ plain-object card ⇒ ALWAYS present, `[]` = the card crossed verbatim; a card without this key = minted by a server older than 7.156.0 (not known);
19956
+ no card / a card that is not a plain object ⇒ absent. Treat a named member as rewritten (do not rebuild a patch from it); do not compare marker
19957
+ literals. Live stream · ledger row (minted before the write, replayed verbatim) · turns / trace replay blocks carry the same value; the session
19958
+ view's `toolResult` rows carry the same-named key describing that row's `details`.
18708
19959
  toolCallId: { type: string }
18709
19960
  toolName: { type: string }
18710
19961
  requestedBy:
@@ -18898,6 +20149,7 @@ components:
18898
20149
  # `usageMissing` 缺了,「没有 usage」会被读成「用量是 0」而不是「未知」。
18899
20150
  usageMissing: { const: true, description: '本轮用量不可信/缺失的诚实标记。缺席 ⇒ usage 可信。' }
18900
20151
  stopReason: { type: string, description: '这一轮为什么停(max_tokens / stop_sequence / …),core 原词。' }
20152
+ responseModel: { type: string, description: 'The model name the provider itself reported for this turn — present ONLY when it differs from the model id the request carried (and it passes the server''s provider-echo shape check). UNTRUSTED display text (the provider''s own statement). ABSENT = reported the same name / reported none / the check failed / an older server — one reading: the requested model is `TaskResult.model`; absence does not mean the provider echoed nothing.' }
18901
20153
  eventId: { type: string }
18902
20154
  parentToolCallId: { type: string }
18903
20155
  sourceTaskId: { type: string }
@@ -18945,10 +20197,6 @@ components:
18945
20197
  path: { type: string }
18946
20198
  chars: { type: integer }
18947
20199
  truncated: { type: boolean }
18948
- modelFallback: { const: true, description: 'core 1.286:压缩摘要器回退到更大窗模型。' }
18949
- fallbackReason: { type: string, description: "回退原因(今天只有 'window')。" }
18950
- clampedRatio: { type: number, description: 'core 1.286:keep 比例被夹紧后的值。' }
18951
- clampReason: { type: string, description: 'budget | walltime | tolerance。' }
18952
20200
  tokensAfter: { type: integer }
18953
20201
  triggerTokensBefore: { type: integer }
18954
20202
  durationMs: { type: integer }
@@ -19011,7 +20259,7 @@ components:
19011
20259
  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`.
19012
20260
  # 🔴 A-057.27:6 员(此前只列 4,漏 recovered/gave_up 两个**终局**值 —— 一段重试序列恒恰一终局帧,
19013
20261
  # 两者对渲染方是同一句话「把重试行撤下来」)。闭集声明、开集读。
19014
- 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)" }
20262
+ phase: { type: string, description: "rate_limited | retrying | reconnecting | circuit_open | recovered | gave_up | waiting | continuing (eight words, server >= 7.155.0 / engine 7.69.0 — `waiting` observes a wait for output before any failure and carries `elapsedMs` / `timeoutMs` / `waitSegment` / `atTimeout`, never a retry countdown; `continuing` = the run asks the model to continue an answer whose stream was cut after output arrived, carries `attempt` / `maxRetries`, closed by `recovered` / `gave_up`). Servers <= 7.154.x send the old word for the wait (seven words); there is no alias. Closed in the engine, read as an open set." }
19015
20263
  detail: { type: string, description: "neutral human hint (NO provider/HTTP detail)" }
19016
20264
  retryInSec: { type: number }
19017
20265
  # 🔴 A-057.26:以下四键 server 真在发(builder brainStatusEventData,三腿共享),而本 schema 是
@@ -19020,15 +20268,16 @@ components:
19020
20268
  attempt: { type: number, description: "1-based index of the attempt that just FAILED (this wait precedes attempt+1)" }
19021
20269
  maxRetries: { type: number, description: "retry budget of the lane in force (refused-connect short lane = 2)" }
19022
20270
  retryInMs: { type: number, description: "same number as retryInSec at ms precision (countdown rendering)" }
19023
- errClass: { type: string, description: "connect_refused | transport | stall | rate_limit | server | http | output_cap (core's seven words since core 7.14.0 — `stall` = this process's own stall watchdog cancelled the request) — retry-wait frames ONLY; never inferred from phase" }
20271
+ errClass: { type: string, description: "connect_refused | transport | stall | rate_limit | server | http | output_cap | capability (eight words since server 7.155.0 / engine 7.69.0 — `stall` = this process's own stall watchdog cancelled the request; `capability` = the request tried a capability the model's entry does not declare and is resent without it, no backoff) — retry-wait frames ONLY; never inferred from phase" }
19024
20272
  seat: { type: string, description: "server >= 7.139.0 (core 7.60.0 `BrainStatus.seat`, minted only when a non-empty string, passed through verbatim): WHOSE model call this frame is about, on EVERY phase — `classifier` = a call made for the auto-mode classifier lane (the classifier seat's model, or the main model standing in behind it): a side call beside the person's turn. ABSENT = the run's own turn (read as the main loop, never as unknown) and every older server. Open on read (a newer engine may name another seat)." }
19025
20273
  providerCondition: { type: string, description: "server >= 7.126.0 (core 7.49.0 #1454, passed through verbatim): what the provider said about the account / capacity — core's closed `PROVIDER_CONDITIONS`; a retry frame carries only the three retryable words `throttled | overloaded | unknown` (`quota_exhausted` / `stop_other` do not retry and ride the terminal `detail.providerCondition`). Presence law as `errorStatus`; read as an OPEN set (keep a default arm). ABSENT = not judged, read the same as `unknown` (back off, do not assert quota). Moves with `providerConditionSource`." }
19026
20274
  providerConditionSource: { type: string, description: "server >= 7.126.0 (core 7.49.0 #1454): the evidence the `providerCondition` verdict rests on — `unified_header | provider_code | status`; present exactly when `providerCondition` is; read as an OPEN set." }
19027
20275
  retryAtMs: { type: number, description: "server >= 7.52.0 (core 7.0.0): the WALL-CLOCK end of the wait = `Date.now() + retryInMs` at emit, on the emitting process's clock (not monotonic — never compare it with a local monotonic timer). `retryInMs` stays the authoritative RELATIVE amount; this is the producer's absolute note (a reader several hops away recomputing it would reset the countdown on every replay). Moves with `retryInMs`; absent ⇒ not minted." }
19028
20276
  errorStatus: { type: integer, description: "server >= 7.54.0 (core 7.1.0): the HTTP status of the attempt that just failed, present ONLY when that status names the failure (absent on a transport non-answer, a mid-stream tear, a local circuit-open verdict and the `recovered` / `gave_up` frames). Absent = no status named the failure — not 0; a 2xx never appears." }
19029
- elapsedMs: { type: number, description: "server >= 7.58.0 (core 7.3.1): ONLY on the `waiting_first_token` phase — how long the current segment has waited so far (at emit, emitting process's clock). Absent = unknown, not 0. A waiting frame never carries `retryInMs` / `retryAtMs` (it OBSERVES a wait, it does not ANNOUNCE one) — do not merge the two families into one countdown." }
20277
+ elapsedMs: { type: number, description: "server >= 7.58.0 (core 7.3.1): ONLY on the wait phase (`waiting` since server 7.155.0) — how long the current segment has waited so far (at emit, emitting process's clock). Absent = unknown, not 0. A waiting frame never carries `retryInMs` / `retryAtMs` (it OBSERVES a wait, it does not ANNOUNCE one) — do not merge the two families into one countdown." }
19030
20278
  timeoutMs: { type: number, description: "server >= 7.58.0 (core 7.3.1): present with `elapsedMs` on the same phase — the bound of the segment being waited on (core 7.33.0+: the first-byte window before the response head, the first-token watchdog after it; each segment counts from 0)." }
19031
- waitSegment: { type: string, description: "server >= 7.138.0 (core 7.59.0 `BrainStatus.waitSegment`, passed through verbatim, minted only when a non-empty string): on EVERY `waiting_first_token` frame — WHICH segment is being waited on: `response_headers` (from the `fetch()` call to the response headers: connecting, sending the request body, whatever the gateway does before it starts answering — the engine cannot tell these apart) or `first_token` (response headers to the first content delta; a thinking delta counts). ABSENT on every other phase, and on servers <= 7.137.x (read as 'unknown which segment', never as 'response headers'). Closed in core (two words), read as an OPEN set (keep a default arm). Render it with `elapsedMs` / `timeoutMs`." }
20279
+ waitSegment: { type: string, description: "server >= 7.138.0 (core 7.59.0 `BrainStatus.waitSegment`, passed through verbatim, minted only when a non-empty string): on EVERY wait frame (`waiting` since server 7.155.0) — WHICH segment is being waited on: `response_headers` (from the `fetch()` call to the response headers: connecting, sending the request body, whatever the gateway does before it starts answering — the engine cannot tell these apart), `first_token` (response headers to the first content delta; a thinking delta counts) or, server >= 7.155.0, `next_token` (the silence after a content delta, until the next one). ABSENT on every other phase, and on servers <= 7.137.x (read as 'unknown which segment', never as 'response headers'). Closed in the engine (three words), read as an OPEN set (keep a default arm). Render it with `elapsedMs` / `timeoutMs`." }
20280
+ atTimeout: { type: string, description: "server >= 7.155.0 (engine 7.69.0 `BrainStatus.atTimeout`): on EVERY `waiting` frame — what the engine does if this wait reaches `timeoutMs`: `retry` (the attempt is cut and sent again) · `keep` (output already arrived: the call ends with it, marked cut; `continuing` says when the run continues it) · `fail` (no retry is left). ABSENT on every other phase and on older servers. Closed in the engine, read as an OPEN set." }
19032
20281
  sleptMs: { type: number, description: "server >= 7.138.0 (core 7.59.0 `BrainStatus.sleptMs`): ONLY on a retry-wait frame (`phase: reconnecting`, `errClass: stall`) for an attempt the engine ended because the HOST WAS SUSPENDED across the wait (the machine slept / the process was stopped) — how long, in MILLISECONDS: the sum of the gaps longer than five seconds between the engine's once-a-second wall-clock readings, from the start of that wait (response headers, first token, or the silence between deltas); the attempt ends at the first reading where it exceeds half of the wait's window and is re-sent on a fresh connection. ABSENT on every other frame (a stall a deadline cut carries none); absent = no suspension evidence, not 0." }
19033
20282
  eventId: { type: string }
19034
20283
  parentToolCallId: { type: string }
@@ -19120,6 +20369,7 @@ components:
19120
20369
  durationMs: { type: integer }
19121
20370
  status: { type: string, description: 'running 为主;core [1414]#3 的 settle 终态 tick 亦可为 completed/failed(开集,按未知值兜底渲染)。' }
19122
20371
  name: { type: string, description: '子代的人类展示名(UNTRUSTED,已 redactSecrets)。缺席 ⇒ 无名,别回退到 objective。' }
20372
+ spawnName: { type: string, description: 'core 7.25.0 — the TEAMMATE key: the explicit birth name of `Agent({ name })`, a separate domain from the display label `name`. The engine validated its character set at birth and the server passes it VERBATIM (not redacted): it is an identity key — bind a progress tick to a fleet / roster row by string equality. ABSENT = an anonymous delegation. Same reading as `Event_task_started.spawnName`.' }
19123
20373
  model:
19124
20374
  type: string
19125
20375
  description: >-
@@ -19250,6 +20500,12 @@ components:
19250
20500
  required: [type]
19251
20501
  properties:
19252
20502
  type: { const: wiring_manifest }
20503
+ fastMode:
20504
+ allOf: [{ $ref: '#/components/schemas/FastModeReading' }]
20505
+ description: 'server >= 7.156.0 (engine 7.69.0; tenant and operator frames alike; effective half only): this leg''s fast-mode reading at its start — the engine''s `FastModeReading`, `{ state, reason?, cooldown? }`, forwarded as is (the server judges the shape, not the words). PRESENT-IFF the leg asks for fast mode (`TaskRequest.fastMode`) or its session has sent fast speed; ABSENT = the leg neither asked nor sent (or an older server), which is not a statement that fast mode is off. The reading BEFORE any submit is on `GET /v1/models` rows (`fastMode`).'
20506
+ declaredPlaces:
20507
+ allOf: [{ $ref: '#/components/schemas/WiringManifestDeclaredPlaces' }]
20508
+ description: 'server >= 7.155.0 (engine 7.69.1; tenant and operator frames alike; effective half only): how many declared places guard this leg''s configuration directory and home, and where each came from. ABSENT = no declared place (the engine''s own homes only) or an older server.'
19253
20509
  suspendLane:
19254
20510
  allOf: [{ $ref: '#/components/schemas/WiringManifestSuspendLane' }]
19255
20511
  description: >-
@@ -19270,7 +20526,20 @@ components:
19270
20526
  leg:
19271
20527
  type: object
19272
20528
  additionalProperties: false
19273
- properties: { kind: { type: string, description: 'root | child | resume. Open on read.' } }
20529
+ properties:
20530
+ kind: { type: string, description: 'root | child | resume. Open on read.' }
20531
+ runOrigin: { type: string, description: 'server >= 7.148.0 — the leg''s scheduler origin (the engine''s `RunOrigin`; open on read). ABSENT = the engine recorded none.' }
20532
+ teamRole:
20533
+ type: string
20534
+ description: >-
20535
+ core 7.30.0 — TENANT-visible (same nature as `leg.kind`: an engine-derived self-statement of the assembly): this leg's role in agent teams — `lead` for the
20536
+ top-level leg, `teammate` for a named delegation, `none` for an anonymous one. The server judges it against the engine's exported word list and drops a word
20537
+ outside it, so a new engine word arrives with a server pickup: read it as an OPEN set. Effective half only; ABSENT = an older engine.
20538
+ hands:
20539
+ allOf: [{ $ref: '#/components/schemas/WiringManifestHands' }]
20540
+ description: >-
20541
+ core 7.33.1 — TENANT and OPERATOR frames alike: does this leg have hands. Always present on an engine-minted effective half; ABSENT = an older engine or an
20542
+ external derivation, not "no hands". `mounted: true` is not "a shell is reachable" (a stub environment or an excluded Bash also reads true).
19274
20543
  sessionRules:
19275
20544
  type: object
19276
20545
  additionalProperties: false
@@ -19293,13 +20562,7 @@ components:
19293
20562
  It lists what was HANDED to the engine, not what the engine installed (a single skill over the engine's load gate is listed but not installed). A resume leg reports the roster of that resume's assembly.
19294
20563
  items: { $ref: '#/components/schemas/WiringManifestSkill' }
19295
20564
  ask:
19296
- type: object
19297
- additionalProperties: false
19298
- description: 'Approval seam: how it is wired, where it came from, and what it effectively resolves to.'
19299
- properties:
19300
- form: { type: string }
19301
- provenance: { type: string, description: 'spec | deps. Open on read.' }
19302
- effective: { type: string }
20565
+ $ref: '#/components/schemas/WiringManifestAsk'
19303
20566
  question:
19304
20567
  type: object
19305
20568
  additionalProperties: false
@@ -19427,6 +20690,7 @@ components:
19427
20690
  properties:
19428
20691
  armed: { type: boolean }
19429
20692
  reason: { type: string, description: 'core''s word (`armed` / `no_intent` / `no_face` / `denied` / `resolver_fault` / `latch_open` today). Open on read — branch known, keep a default arm.' }
20693
+ deniedSource: { type: string, description: 'core 7.14.0 — which plane''s ratchet turned AUTO off (`org` / `local` / `settings` today): "your organization turned auto off" and "your own settings did" ask a person for different things, while `reason: denied` is one word for both. Passed through verbatim, open on read; ABSENT = the resolver does not track sources (never part of the whole-section rule).' }
19430
20694
  mcp:
19431
20695
  type: array
19432
20696
  description: >
@@ -19662,7 +20926,8 @@ components:
19662
20926
  gate:
19663
20927
  type: string
19664
20928
  description: >-
19665
- 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
20929
+ 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), `hook` (server >= 7.155.0 / engine 7.69.0:
20930
+ this call's `PreToolUse` hook review is in flight — a hook the leg registered or an inherited installation; a hook reviewing, not a person waited on) or `approval` (a question about it is
19666
20931
  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
19667
20932
  call is working (while EVERY call waits on the person nothing is beaten).
19668
20933
  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." }
@@ -19685,6 +20950,48 @@ components:
19685
20950
  totalBytes: { type: integer, description: 'Bytes observed BEFORE the tail cap, so it keeps growing after `output` stops being able to. Rides iff `output` does.' }
19686
20951
  eventId: { type: string }
19687
20952
  parentToolCallId: { type: string }
20953
+ Event_hook_progress:
20954
+ description: >
20955
+ A HOOK REVIEW's start / end (server >= 7.156.0 / engine 7.69.0; capability bit `hookProgress`). LIVE ONLY: never on
20956
+ `GET /v1/runs/{id}/events`, never replayed on reconnect, and not on the sync leg's child-forwarding channel or the per-child tail.
20957
+ A review that holds its subject past one interval (one second) ⇒ one `phase: start`; the review ending (answered / refused /
20958
+ handler failure or budget spent / cancelled / leg over) ⇒ one `phase: end`. One review = one pair, paired by `screen` only.
20959
+ 🔴 THE FRAME'S ABSENCE IS NEVER EVIDENCE: a review that finishes inside one interval emits none. No hook name, budget, duration
20960
+ or verdict rides (a call's verdict is its `tool_end.gate`). Two arms by `event`: a call review (`classic.PreToolUse`,
20961
+ `toolCallId` joins the call's own frames) and an input review (`classic.UserPromptSubmit`, `source` = the entry word, read open;
20962
+ `inputId` only when the entry has one). The server drops the whole frame when `phase` / `screen` / the subject's join key cannot be read.
20963
+ oneOf:
20964
+ - type: object
20965
+ additionalProperties: false
20966
+ required: [type, phase, screen, event, toolCallId]
20967
+ properties:
20968
+ type: { const: hook_progress }
20969
+ phase: { type: string, enum: [start, end] }
20970
+ screen: { type: string, description: 'The review''s identity (an engine-minted opaque string); both frames of one review carry the same one.' }
20971
+ event: { const: classic.PreToolUse }
20972
+ toolCallId: { type: string, description: 'The reviewed call''s id — the same id as its `tool_start` / `tool_progress` / `tool_end`.' }
20973
+ eventId: { type: string }
20974
+ parentToolCallId: { type: string }
20975
+ sourceTaskId: { type: string }
20976
+ bgAgentId: { type: string }
20977
+ - type: object
20978
+ additionalProperties: false
20979
+ required: [type, phase, screen, event, source]
20980
+ properties:
20981
+ type: { const: hook_progress }
20982
+ phase: { type: string, enum: [start, end] }
20983
+ screen: { type: string }
20984
+ event: { const: classic.UserPromptSubmit }
20985
+ source:
20986
+ type: string
20987
+ description: >-
20988
+ The entry the reviewed input came through — engine words `objective` / `steer` / `resume_message` / `followUp` /
20989
+ `parked_redelivery` / `system`, read as an OPEN set.
20990
+ inputId: { type: string, description: 'Present only when the entry has an input id (the objective entry has none); equals `human_input.inputId` / `message_committed.inputId` on the same stream.' }
20991
+ eventId: { type: string }
20992
+ parentToolCallId: { type: string }
20993
+ sourceTaskId: { type: string }
20994
+ bgAgentId: { type: string }
19688
20995
  ToolRosterDelta:
19689
20996
  type: object
19690
20997
  description: >
@@ -19808,7 +21115,7 @@ components:
19808
21115
  activity: { type: string }
19809
21116
  summaryParams: { type: array, items: { type: string } }
19810
21117
  resultCards: { type: array, items: { type: string } }
19811
- approvalCard: { type: string, enum: [file-edit, file-write, notebook-edit, shell, fetch, skill, workflow, plan, question, generic, computer-access, computer-control] }
21118
+ approvalCard: { type: string, enum: [file-edit, file-write, notebook-edit, shell, fetch, skill, workflow, plan, question, generic, computer-access, computer-control, network] }
19812
21119
  McpToolRuleFace:
19813
21120
  type: object
19814
21121
  additionalProperties: false
@@ -19882,6 +21189,9 @@ components:
19882
21189
  `{sessionId, toolName, toolCallId, cause, parkLaneExisted, remedy?, remedies?}`; `toolCallId` joins to the
19883
21190
  `tool_approval` card frame, `cause` (`approver_unavailable` / `no_approver_wired` / `mandate_unreconstructible`; the older name `settlementKind` was retired in server 7.74.0) is passed through verbatim (the vocabulary's owner is core).
19884
21191
  Server >= 7.137.0: `remedies` = the ways out as data (a non-empty list over `approver` / `permission_mode`), riding with the headless remedy sentence `remedy` — a binding's own refusal sentence carries `remedy` but no `remedies`.
21192
+ Server >= 7.155.0 (engine 7.69.0): on a delegated leg `sessionId` = the delegation tree's ROOT session, the child session whose call was refused rides in
21193
+ `sourceSessionId?` and the agent id in `agentId?` (both only on delegated legs; a top-level leg is unchanged) — so a child's refusal now reaches the root
21194
+ session's stream; read "whose call was refused" as `sourceSessionId ?? sessionId`.
19885
21195
  Deduplicated ONCE PER TOOL CALL. 🔴 `parkLaneExisted` is a DISCRIMINANT, not a count: `true` = a park lane
19886
21196
  was armed but declined/failed (check the store, check authorisation), `false` = there was no lane at all
19887
21197
  (wire one up). The two recovery verbs differ, so a consumer MUST render them apart — NEVER fold them into
@@ -19973,14 +21283,19 @@ components:
19973
21283
  `cause` = core `AUTO_MODE_UNAVAILABLE_CAUSES` (`timeout` / `error`), `disposition` closed two words `asked` (handed to this leg's
19974
21284
  approval seat; that ask carries `requiresRealApproval`) / `denied` (no seat ⇒ refused on the classifier's sentence, did not run);
19975
21285
  `toolCallId` joins the `tool_approval` card / `tool_end`; `sessionId` is conditional. Not a block; not counted by
19976
- `classifier.denial_limit`. · `config.permission_mode_unavailable` — the requested mode is NOT the mode this leg runs,
21286
+ `classifier.denial_limit`. Server >= 7.155.0 (engine 7.69.0) adds `site` — which judgment it was: `call` (the two per-call stations) / `spawn` /
21287
+ `handback` (the delegation's send-off and hand-back reviews) — and a third `disposition` word `proceeded` (one of those two delegation reviews could not
21288
+ judge and the work went on unreviewed; the result records `unreviewed`); read both OPEN. On a delegated leg it is addressed like
21289
+ `delegation.ask_unresolvable`: `sessionId` = the delegation tree's root, `sourceSessionId` / `agentId` name the leg. · `config.permission_mode_unavailable` — the requested mode is NOT the mode this leg runs,
19977
21290
  `{ requested, effective, by, sessionId, runId, childSessionId? }`, `requested` / `effective` = core's six mode words, `by` = core
19978
21291
  `PERMISSION_MODE_FOLD_REASONS` (`operator_deny` / `face_absent` / `inherited_ceiling`); from core 7.51.0 / server >= 7.129.0 a child leg's fold on ANY of the three arms is ALSO minted onto the PARENT
19979
21292
  session's stream (`detail.sessionId` = the parent, `childSessionId` = the child; dedupe by `childSessionId`) and `requested` reads as "the word that was folded" (a child that requested nothing: the word it inherited);
19980
21293
  the first two arms always have `effective: default`; the server-side
19981
21294
  `settings.permissions.disableAutoMode` fold happens before the engine and mints no frame. · `permission.ask_released_by_mode`
19982
21295
  — `bypassPermissions` released an ask nobody answered, `{ mode, askClass, origin?, mandate?, count, firstToolCallId, sessionId, runId }`,
19983
- first time per (mode, askClass) per run (`count` is 1); the per-call record is `tool_end.gate.disposition.released`. ·
21296
+ first time per (mode, askClass) per run (`count` is 1); the per-call record is `tool_end.gate.disposition.released`. (This code and
21297
+ `permission.read_deny_unapplied` below are on the session stream only on servers <= 7.154.x; server >= 7.155.0 / engine 7.69.0 no longer
21298
+ puts either there — read `tool_end.gate.disposition.released` and its `readUnestablished`.) ·
19984
21299
  `permission.read_deny_unapplied` — a mode released a shell call whose reads the read station could not establish while a read-deny
19985
21300
  table is in force (none of its rows applied to what it reads), `{ mode, toolCallId, tiers, rows, rowCount, sessionId, runId }`,
19986
21301
  `tiers` = the built-in tiers in use, `rows` = the first eight non-built-in rule texts (`rowCount` = total); every such call. ·
@@ -19988,9 +21303,14 @@ components:
19988
21303
  that did not answer in time), so the verdict that read served SKIPPED them (no allow / ask / deny row took part); replaces the approval frame's
19989
21304
  retired `ruleStoreUnreadable` seat, `{ at, sessionId, runId }`, `at` closed two words `prepare` (the path rows taken at run start: the run's file and
19990
21305
  shell checks lack them until the run ends, the next run reads again) / `call` (one call's own rule check; every later call reads again); once per run.
19991
- FAIL-CLOSED from server >= 7.127.0 (core 7.50.0): at `call` the call asks a person (a deny row among the unreadable rows may forbid it; ask class
21306
+ FAIL-CLOSED from server >= 7.127.0 (core 7.50.0) through server 7.154.x: at `call` the call asks a person (a deny row among the unreadable rows may forbid it; ask class
19992
21307
  `rule_unreadable`, which `bypassPermissions` asks too and a headless run refuses); at `prepare` only the run's path tables lack the rows.
19993
21308
  Server [7.106.0, 7.127.0): the same notice, but the unreadable read raised no card (a skipped deny row protected nothing; a mode released `rule_unreadable`).
21309
+ Server >= 7.155.0 (engine 7.69.0): while the rule store cannot be read, the person's deny / ask rows no longer stop a call — under `bypassPermissions` a call
21310
+ that used to go to a person now runs (its `tool_end.gate.disposition.released` class set holds `rule_unreadable`, origin `rule_store_unavailable`), under `auto`
21311
+ the classifier judges it; `default` / `acceptEdits` / `plan` still ask and `dontAsk` still refuses. In those two modes this code is no longer sent (the fact goes
21312
+ to an operator-audience notice, ops log only, never on this stream); in the others it is told once per session per fault set.
21313
+ `detail` also carries `faults` (one `{ sources, reason }` per partition the read could not read; `reason` is an engine word — read OPEN).
19994
21314
  Starter whitelist (server 7.36): `memory.session_polluted` `{reason, sessionId?}` ·
19995
21315
  `memory.harvest_quarantined` `{count, moved, escalated, reason?}` — `moved` and `escalated` MUST NOT be
19996
21316
  subtracted from each other (an in-place tombstone counts as both) · `memory.delegation_static_mark_waived`
@@ -20037,6 +21357,7 @@ components:
20037
21357
  description: 'Machine-readable facts (per code). Redacted + bounded server-side; open set of keys.'
20038
21358
  sessionId: { type: string, description: 'Owning session — this frame only ever appears on that session stream.' }
20039
21359
  ts: { type: integer, format: int64, description: 'SERVER observation time (ms epoch), NOT the engine mint time.' }
21360
+ attention: { type: string, description: 'server >= 7.155.0 (engine 7.69.0 `NoticeAttention`, projected only when in set): how much the code asks of its audience — `act` / `inform` / `audit`. ABSENT = the engine did not say, NOT "ignorable". Closed in the engine, read as an OPEN set.' }
20040
21361
  eventId:
20041
21362
  type: string
20042
21363
  description: >-
@@ -20055,7 +21376,18 @@ components:
20055
21376
  required: [type, cwd]
20056
21377
  properties:
20057
21378
  type: { const: workspace_changed }
20058
- cwd: { type: string }
21379
+ cwd: { type: string, description: 'The leg''s working directory now. A DISPLAY member (server >= 7.155.0 says so: bounded at 300 code units, credential shapes redacted) - do not compare it byte-for-byte with a path you sent.' }
21380
+ directories:
21381
+ type: array
21382
+ items: { $ref: '#/components/schemas/WorkspaceChangedDirectory' }
21383
+ description: 'server >= 7.155.0: the additional roots this leg ACTUALLY mounted (same constructor on the live stream and both ledger legs). ABSENT = none mounted (not sent / not honoured / none landed), not "an empty list".'
21384
+ session:
21385
+ type: array
21386
+ items: { $ref: '#/components/schemas/SessionCheckoutEntry' }
21387
+ description: 'server >= 7.156.0 (engine 7.69.0): the session''s checkout — one entry per repository, fixed by the session''s first leg (the submit body''s `workspace`). Present together with `declaration` or not at all: ABSENT = the session declared no workspace, or this leg sent `workspace: null`. The path members are path identity (not redacted, not truncated: compare them byte for byte). The session row does not store it — this frame is where it surfaces.'
21388
+ declaration:
21389
+ allOf: [{ $ref: '#/components/schemas/SessionCheckoutDeclaration' }]
21390
+ description: 'server >= 7.156.0 (engine 7.69.0): the NORMALIZED declaration the session''s checkout was opened under — the value every later leg sends back as the submit body''s `workspace` (it screens to itself). Present together with `session`. It is what to send, not a verdict (the record judges each leg). When the server cannot read either of the two it drops BOTH — never half a declaration, because half of one sent back is a different declaration.'
20059
21391
  eventId: { type: string }
20060
21392
  parentToolCallId: { type: string }
20061
21393
  sourceTaskId: { type: string }
@@ -20217,7 +21549,7 @@ components:
20217
21549
  `slot` / `carrier` / `cadence` / `cacheClass`, `hash` became `contentHash` (`sha256:` unsalted for published text, `salted:` for text carrying the task's
20218
21550
  or the run's own inputs) and gained `band` (always) / `variant?` / `renderer?` / `locale` / `chain`; the row gained `identity` / `selectors` / `superseded?`.
20219
21551
  ⚠️ Rows written by <= 7.131.x keep the v2 shape (the server neither re-reads nor rewrites them) — see PromptManifestRow: a row carrying `constitution`
20220
- is such an old row. ⚠️ Block `hash` is a PROCESS-SALTED short digest — not comparable across worker restarts.
21552
+ is such an old row. ⚠️ Block `hash` is a SALTED short digest — how far it compares is the row's `hashScope` (server >= 7.155.0; absent on an older row = one salt per process, not comparable across worker restarts).
20221
21553
  # 不封闭(`additionalProperties: true`):本 schema 是 `Event_prompt_assembled` 的 allOf 目标(帧上多一个 `type`),封闭会把合法帧判成违约(见 Event_reasoning 处的长注)。
20222
21554
  # 与旧行的互斥由 `not: { required: [constitution] }` 一句写死(v3 行永不带它),`PromptManifestRow` 的 oneOf 因此恰中一臂。
20223
21555
  additionalProperties: true
@@ -20292,6 +21624,14 @@ components:
20292
21624
  strategy: { type: string, description: '`swap` / `static`; read open.' }
20293
21625
  source: { type: string, description: '`spec` / `env` / `default` / `degraded_no_direct_lane`; read open.' }
20294
21626
  totalChars: { type: integer }
21627
+ hashScope:
21628
+ type: string
21629
+ description: >-
21630
+ server >= 7.155.0 (engine 7.69.1): how far this row's SALTED digests (block `hash`, the `salted:` sections' `contentHash`) compare — `session` = across the
21631
+ session's runs and engine processes (the salt lives in the session; a rewind to a point before the salt mints a fresh one, before / after do not compare,
21632
+ and this still says `session`; a forked session carries its source's salt); `leg` = the session store could not read or keep the salt, comparable within
21633
+ this leg only. ABSENT = a row an older engine wrote (one salt per process, not comparable across processes). Two sessions with their own salts never compare;
21634
+ a forked session keeps its source's salt and compares with the source. Read open.
20295
21635
  PromptManifestIdentity:
20296
21636
  type: object
20297
21637
  description: 'the run''s prompt identity as the manifest reports it (core `PromptManifestIdentity`): `artifact` = the identity digest, `layers` = its inputs, `epoch` / `activatedBy` = the session epoch record that names it.'
@@ -20425,6 +21765,7 @@ components:
20425
21765
  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`);
20426
21766
  `toolName` / `remedy` pass the egress seat. present-iff at least one was refused.
20427
21767
  items: { $ref: '#/components/schemas/RefusedAsk' }
21768
+ noteKey: { type: string, description: 'server >= 7.156.0 (engine word `task_notification.note_key` true) — the key this notification was handed to the model with: the same value as the `noteKey` of the committed row (`message_committed`, `origin: queued_note`); join frame and row by value. Absent = an older server / an older ledger row.' }
20428
21769
  summary: { type: string, description: 'UNTRUSTED display text.' }
20429
21770
  sessionId: { type: string }
20430
21771
  toolUseId: { type: string }
@@ -20473,6 +21814,22 @@ components:
20473
21814
  allOf: [{ $ref: '#/components/schemas/PayloadTruncated' }]
20474
21815
  description: 'server >= 7.147.0 — present iff this PARKED REDELIVERY frame exceeded the inbox byte budget and is the minimal form (every other key absent). Live frames and durable ledger rows never carry it.'
20475
21816
  resumable: { type: boolean }
21817
+ resumableUntil:
21818
+ type: number
21819
+ description: >-
21820
+ server >= 7.156.0 (engine 7.69.0): the continuation DEADLINE that came with `resumable: true` (epoch ms) — the engine's value, never rewritten or
21821
+ recomputed. An UPPER BOUND, not a remaining time (the retention ledger's capacity, session reclaim or the parent run ending can release the slot
21822
+ earlier); on a parked re-delivery it is the reading at park time. Absent = the engine set no deadline / not resumable / an older server. Same reader
21823
+ and value as the fleet terminal `task` row and `bg_notification`.
21824
+ unreviewed:
21825
+ type: object
21826
+ required: [handback]
21827
+ properties:
21828
+ handback: { allOf: [{ $ref: '#/components/schemas/AutoModeFallbackCause' }], description: 'The engine''s cause word (`AUTO_MODE_FALLBACK_CAUSES`).' }
21829
+ description: >-
21830
+ server >= 7.156.0 (engine 7.69.0): this hand-back was NOT reviewed by auto mode (the classifier gave no verdict; the child's report was handed to
21831
+ the parent anyway) — do not render it as "reviewed". This frame and the parked re-delivery only (the fleet frames have no such bit). Unreadable ⇒ the
21832
+ whole key is absent; absent = reviewed / not auto mode / an older server.
20476
21833
  result: { type: string, description: 'UNTRUSTED display text.' }
20477
21834
  output_file: { type: string }
20478
21835
  usage: { description: 'open shape — usage rollup of the background task.' }
@@ -20747,6 +22104,10 @@ components:
20747
22104
  liveFactsUnknown:
20748
22105
  const: true
20749
22106
  description: 'server >= 7.143.0 — ONLY on a disconnect-replay frame: the row was minted before this version (its card envelope has no live-facts seat) or that seat cannot be read, so the top-level live facts are all absent and this key says "unknown" (not "none"). Absent = the live facts on this frame are verbatim (a live frame, or a replay frame whose envelope carries the seat).'
22107
+ consumerState:
22108
+ type: string
22109
+ enum: [absent]
22110
+ description: 'server >= 7.156.0 — ONLY on a stream-open replay (preamble) frame of `GET /v1/runs/{id}/events` / `POST /v1/tasks/stream`: this replica''s registration of the ask is an adopted one (no engine leg waits on it) ⇒ `"absent"`, the same name and value as the livePending row; absent otherwise (truth only). Live frames and the frame embedded in a list row never carry it.'
20750
22111
 
20751
22112
  ApprovalRuleEvidence:
20752
22113
  type: object
@@ -20936,6 +22297,17 @@ components:
20936
22297
  items: { $ref: '#/components/schemas/AskReason' }
20937
22298
  description: 'server >= 7.143.0 (core 7.61.0): WHO asked and WHY — one entry per asker with its own words. Structured approval UIs render reason lines from this, not from `message`. Words are credential-redacted and length-capped; any malformed entry ⇒ the whole seat is withheld. Absent = an older engine / the engine''s generic question.'
20938
22299
  sourceAgentName: { type: string, description: 'The child agent''s display name, redacted. UNTRUSTED.' }
22300
+ workflowRunId: { type: string, minLength: 1, maxLength: 200, description: 'server >= 7.156.0 (engine word `ask.workflow_member`) — the workflow this ask comes from: the engine''s opaque run id, verbatim, capped at 200 code units. Present iff the ask is a workflow member''s; when absent the two keys below are absent too. Display / grouping only, never decision routing. Same key and value on the operator queue row, the inbox row and the live question frame.' }
22301
+ workflowAgentLabel: { type: string, minLength: 1, maxLength: 200, description: 'server >= 7.156.0 — the workflow member''s display text (script-authored, UNTRUSTED: exit-redacted and capped at 200 code units; not unique, never a key). Present only beside `workflowRunId` and when non-empty.' }
22302
+ workflowStepAskedAgain: { type: boolean, enum: [true], description: 'server >= 7.156.0 — this ask re-runs a step whose earlier card stopped waiting without a decision. Literal true only, never false; names no cause. Only beside `workflowRunId`.' }
22303
+ redactedKeys:
22304
+ type: array
22305
+ items: { $ref: '#/components/schemas/ApprovalCardRedactedKey' }
22306
+ description: >-
22307
+ server >= 7.156.0 — the card members whose bytes the server's exit redaction rewrote (closed set `args`, in table order, no repeats):
22308
+ `[]` = nothing rewritten (a card whose args fold into `argsOmitted` carries `[]` too), `["args"]` = the human-facing args were rewritten.
22309
+ ALWAYS on cards minted from 7.156.0; ABSENT has one reading only: the card was minted by an older server (unknown). Live frame, `card_json`,
22310
+ replay frames and the per-ask read carry the same value.
20939
22311
  # A-057.④(#314):三键 server 早已随卡投出(与 tool_approval 帧同一窄读函数 ⇒ 帧与 card 同值),
20940
22312
  # 但本 schema 只在帧上公示过 —— 按 spec 生成的卡消费方拿不到。定义与帧上同构段逐字同源,
20941
22313
  # 长 description 不复制(单一真源在 ApprovalRequestLiveFacts / ApprovalCard 的同名键)。
@@ -21954,6 +23326,20 @@ components:
21954
23326
  server >= 7.152.0 — "Yes, and add directory": the card's `readRootCandidate.dir` echoed back verbatim. ONLY with `decision: "approve"` and no `remember`; accepted only where capability
21955
23327
  `approvalReadRootGrant` is true (a single-user host-lane deployment); a PARKED card does not take it. Violations => 400 `request.body_shape` (before the decision). The server judges the SHAPE only —
21956
23328
  the ENGINE judges the value; the outcome is announced (`approval.read_root_granted` / `approval.read_root_grant_rejected`), never in the 200.
23329
+ feedback:
23330
+ type: string
23331
+ description: >-
23332
+ server >= 7.156.0 (capability `approvalFeedback`) — the person's words to the agent ("approved, next do this"), handed to the engine verbatim: the
23333
+ live form gives them to the engine leg waiting on this replica after this request wins the CAS; the parked form puts them into the redemption's
23334
+ resume outcome. Read exactly as on `/decide`: non-string ⇒ 400 `request.field_invalid`; direct-door deployment ⇒ 400 `feedback_not_in_proof`;
23335
+ only a person's approve — on `deny` or `decidedBy: policy` ⇒ 400 `request.field_conflict` (`reason: approval_feedback`); an engine reminder tag in
23336
+ the words ⇒ 400 `request.field_invalid` + `field: feedback`. Delivered or not: the receipt's `feedbackForwarded`. Servers <= 7.155.x: 400 `request.body_shape`.
23337
+ mcpServers:
23338
+ allOf: [{ $ref: '#/components/schemas/ResumeRestatement/properties/mcpServers' }]
23339
+ description: 'server >= 7.156.0 — the resume restatement, read like `/decide` and ONLY when this answer is accepted as a parked redemption (the live form reads past the value-shape gate and ignores it). A parked background child''s card / a still-running workflow child''s card ⇒ 400 `decide.parked_restatement_unsupported`; a direct-door deployment ⇒ 400 `restatement_not_in_proof` when present (null included). Servers <= 7.155.x: 400 `request.body_shape`.'
23340
+ a2aPeers:
23341
+ allOf: [{ $ref: '#/components/schemas/ResumeRestatement/properties/a2aPeers' }]
23342
+ description: 'server >= 7.156.0 — the other resume restatement key; read exactly like `mcpServers` here.'
21957
23343
 
21958
23344
  ApprovalDecideGateKind:
21959
23345
  type: string
@@ -22015,8 +23401,10 @@ components:
22015
23401
 
22016
23402
  ToolApprovalCardWord:
22017
23403
  type: string
22018
- enum: [file-edit, file-write, notebook-edit, shell, fetch, skill, workflow, plan, question, generic, computer-access, computer-control]
23404
+ enum: [file-edit, file-write, notebook-edit, shell, fetch, skill, workflow, plan, question, generic, computer-access, computer-control, network]
22019
23405
  description: >
23406
+ sdk 46.0.0: thirteen words = engine 7.69.x / server 7.155.0 `TOOL_APPROVAL_CARDS` — the thirteenth, `network`, is the card of the engine's question about a sandboxed command's
23407
+ connection to a host its sandbox does not list (the call carries `host`; an engine-reserved card no tool can declare): render "allow this connection", not a tool approval.
22020
23408
  sdk 34.0.0: twelve words = core 7.62.0 / server 7.144.0 `TOOL_APPROVAL_CARDS` (`skill` / `workflow` were already in the engine's register at core 7.59.0 and were missing here;
22021
23409
  `computer-access` — the consent card of a tool that hands the model the user's screen, the call carries `apps`, the list asked for — and `computer-control` — that tool's
22022
23410
  other consent card, the call carries nothing the card needs — are new in core 7.62.0; what each grants is per connection).
@@ -22111,6 +23499,9 @@ components:
22111
23499
  TRUE-ONLY disclosure (present as `absent`): no engine leg on THIS replica is waiting for this ask — the decision is on the row (an idempotent replay will read it, the audit surface keeps it)
22112
23500
  but nothing running here resumes because of it (the holder of the suspended promise may be another replica, or this replica restarted and its local window is empty). Read the RUN surface to
22113
23501
  learn whether anything continued; NEVER take a 200 without this key as proof the run continued (older servers never send it). Not a 409 / 410: the decision DID take effect.
23502
+ pickupDueAtMs: { type: number, description: 'server >= 7.156.0 — only beside `consumerState`: the latest moment the replica holding this ask STARTS reading this decision (epoch ms = the moment the decision write finished + the maintenance beat length). Present iff `consumerState` is present ∧ this replica held no registration of the ask at the decision ∧ a maintenance beat was declared; holds only for a live holder that reads every beat (a dead holder waits for the run''s liveness verdict); both numbers carry the two machines'' clock skew.' }
23503
+ pickupDueInMs: { type: number, description: 'server >= 7.156.0 — present iff `pickupDueAtMs` is: ms from the answering moment to it (the answering replica''s clock), clamped to 0.' }
23504
+ feedbackForwarded: { type: boolean, enum: [true], description: 'server >= 7.156.0 — first decisions only, truth only: the request''s `feedback` was handed to the engine with the decision that took effect. Absent on a first decision = not delivered (the decision still took effect); never on an idempotent replay (unknown).' }
22114
23505
  rememberApplied:
22115
23506
  type: boolean
22116
23507
  description: 'server >= 7.152.0: only on a FIRST decision whose request carried `remember`: did it land. `false` on a card that carries grants and when the decision landed on a replica that does not hold the engine leg. Absent on a replay.'
@@ -22152,6 +23543,7 @@ components:
22152
23543
  decidedAtMs: { type: integer }
22153
23544
  actor: { $ref: '#/components/schemas/ActorAssertion' }
22154
23545
  accepted: { type: string, enum: [parked_redeemed] }
23546
+ feedbackForwarded: { type: boolean, enum: [true], description: 'server >= 7.156.0 — truth only: the request''s `feedback` went into the resume outcome landed with the decision.' }
22155
23547
  decisionNote: { type: string }
22156
23548
  noteRecorded: { type: boolean }
22157
23549
  rememberApplied: { type: boolean, description: 'server >= 7.152.0: only when the request carried `remember` and this was the FIRST redemption. Always `false` on a workflow-member card (the `recorded` / `delivered` receipts of server >= 7.155.0): that lane cannot record the grant, so this door takes the decision and allows this once; no exemption is stored. (The same request on POST /v1/approvals/{sessionId}/decide is answered 400 `decide.workflow_remember_unsupported` on a workflow-member card, so the /decide workflow-member arms never carry this key.)' }
@@ -22163,6 +23555,7 @@ components:
22163
23555
  status: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/status' }
22164
23556
  sessionId: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/sessionId' }
22165
23557
  bindingEnforced: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/bindingEnforced' }
23558
+ turnRefused: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/turnRefused' }
22166
23559
  decisionCommitted: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/decisionCommitted' }
22167
23560
  checkpointId: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/checkpointId' }
22168
23561
  checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
@@ -22205,6 +23598,9 @@ components:
22205
23598
  serverNowMs:
22206
23599
  type: integer
22207
23600
  description: 'server >= 7.3.0, ADDITIVE: the server-signed emit timestamp. A server-minted side-frame has no core-stream eventId to carry, so this is its own time coordinate. Absent on older servers.'
23601
+ workflowRunId: { type: string, minLength: 1, maxLength: 200, description: '"question" only (server >= 7.156.0, engine word `ask.workflow_member`): the workflow this question comes from — the engine''s opaque run id, verbatim, capped at 200 code units. Present iff the question is a workflow member''s; the same reader and value as the approval card''s, the queue row''s and the inbox row''s.' }
23602
+ workflowAgentLabel: { type: string, minLength: 1, maxLength: 200, description: '"question" only (server >= 7.156.0): the workflow member''s display text (script-authored, UNTRUSTED: exit-redacted, capped at 200 code units; not unique, never a key). Present only beside `workflowRunId` and when non-empty.' }
23603
+ workflowStepAskedAgain: { type: boolean, enum: [true], description: '"question" only (server >= 7.156.0): this question re-runs a step whose earlier card stopped waiting without a decision. Literal true only, never false. Only beside `workflowRunId`.' }
22208
23604
 
22209
23605
  AskQuestion:
22210
23606
  type: object
@@ -22330,7 +23726,8 @@ components:
22330
23726
  type: string
22331
23727
  description: >
22332
23728
  Human-readable exit route, VARIES by the occupying run's state (running => steer/cancel; parked =>
22333
- decide at `pendingGate.decidePath` / cancel). Display only — branch on `activeTaskStatus`/`pendingGate`.
23729
+ decide at `pendingGate.decidePath` / cancel; server >= 7.156.0 parked on a card no decision lands on => no `pendingGate`, the sentence
23730
+ follows `stuck` / `wayOut`). Display only — branch on `activeTaskStatus` / `pendingGate` / `stuck`.
22334
23731
  activeTaskId:
22335
23732
  type: [string, 'null']
22336
23733
  description: 'The run occupying the session; `null` when the claim holder could not be identified.'
@@ -22350,6 +23747,14 @@ components:
22350
23747
  description: >
22351
23748
  Present when the occupying run is parked on a pending durable gate: `decidePath` is THE ONE correct
22352
23749
  resume entry for its `kind` (gate-kind routed; sessionId-addressed).
23750
+ stuck:
23751
+ allOf: [{ $ref: '#/components/schemas/StuckCardWord' }]
23752
+ description: >-
23753
+ server >= 7.156.0 — present iff the card the parked holder waits on cannot take a decision on this engine (the same reader and the same projection as the pending rows' `stuck`, the
23754
+ 409 body root's `stuck`); then `pendingGate` is absent (the frame does not point at a decision door that would refuse). Same key and meaning as the 409 body.
23755
+ wayOut:
23756
+ allOf: [{ $ref: '#/components/schemas/ApprovalWayOut' }]
23757
+ description: 'server >= 7.156.0 — the way out for that card, beside `stuck` when the server can say one (the closed set `ApprovalWayOut`, the same minting as the decision-door refusals and the pending rows). Same key and meaning as the 409 body root''s `wayOut`.'
22353
23758
  Event_failed:
22354
23759
  type: object
22355
23760
  # 封闭 + 回填 `activeTaskId`(census 轴一,2026-07-30):[1833] G10 —— session 已有活跃 run 的冲突
@@ -22490,6 +23895,44 @@ components:
22490
23895
  startedAt: { type: integer, description: 'engine clock, epoch ms, at the moment the pass committed.' }
22491
23896
  eventId: { type: string }
22492
23897
  parentToolCallId: { type: string }
23898
+ Event_prefix_changed:
23899
+ type: object
23900
+ description: >
23901
+ server >= 7.155.0 (engine 7.69.1 prefix ledger) — a main-line request that does NOT extend the session's previous main request of the same serving model
23902
+ is about to go out (the provider re-reads everything after `at`: on a long session, minutes before the first token). Minted BEFORE the request is handed to
23903
+ the model seat, judged from the request bytes (never from a cache-read count), exactly one frame. Not sent for a side request, an append-only next turn, or a
23904
+ model this process holds no earlier main request of (unless a leg start found its anchor moved). Projected by ONE whitelist builder (server
23905
+ `prefixChangedEventData`) on the live stream and both durable ledgers (`GET /v1/runs/{taskId}/events` replays the same bytes); the trace SSE does not carry it.
23906
+ A segment boundary. `declared: false` is the engine's word, relayed — not an alert. Servers <= 7.154.x never send it.
23907
+ `region`, `causes` and `declared` are each omitted when the engine's value does not have the expected shape (the builder never invents one);
23908
+ the engine normally sends all three, but a reader treats each as optional.
23909
+ additionalProperties: false # 封闭:铸造点只投这七键 + 身份四键
23910
+ # `region` / `causes` / `declared` 不进 required:server 的构造器逐键「形不合即缺席」(正常情况下引擎恒铸;读者按可缺写)。
23911
+ required: [type]
23912
+ # `at` / `of` 同进同退(构造器两只都读得出才铸);JSON Schema 2020-12 关键字(OpenAPI 3.1 原生),与 `WorkspaceSyncCapability` 同写法。
23913
+ dependentRequired:
23914
+ at: [of]
23915
+ of: [at]
23916
+ properties:
23917
+ type: { const: prefix_changed }
23918
+ region: { type: string, description: 'where the first difference falls — engine words `params` (thinking controls) / `system` / `tools` / `messages`; read open.' }
23919
+ at: { type: integer, description: 'the first differing position (characters of the engine''s canonical rendering). Present together with `of`, or both absent — absent = this process holds no earlier main request of this model for the session; `segments` found it.' }
23920
+ of: { type: integer, description: 'the previous main request''s length in the same rendering (present together with `at`).' }
23921
+ message: { type: integer, description: 'with `region: messages` only: the index of the first message that differs or is gone.' }
23922
+ segments:
23923
+ type: array
23924
+ items: { type: string }
23925
+ description: 'the head segments a leg start found moved against the session''s anchor (prompt block ids, `tools`); only in that form. Each id passes the exit redactor (a credential-shaped id becomes a redaction mark; count and order unchanged).'
23926
+ causes:
23927
+ type: array
23928
+ items: { type: string }
23929
+ description: 'every word DECLARED since the previous main request, in declaration order; empty = none was declared. The engine owns the vocabulary (engine 7.69.1: `leg_start_inputs` / `tool_table` / `compaction` / `request_policy` / `model_namespace` / `history_rewrite` / `tool_result_clear` — the last one = older tool results were replaced by a "cleared" marker ahead of the request); read open.'
23930
+ declared: { type: boolean, description: 'a declared word covers the region that changed; `false` = no seat declared the move.' }
23931
+ # 身份四键:构造器经 `identityFields` 投,四键各自读得出才在(与 `EventIdentity` 同四键)。
23932
+ eventId: { type: string }
23933
+ parentToolCallId: { type: string }
23934
+ sourceTaskId: { type: string }
23935
+ bgAgentId: { type: string }
22493
23936
  Event_config_assembled:
22494
23937
  type: object
22495
23938
  description: >
@@ -22537,6 +23980,53 @@ components:
22537
23980
  required: [type]
22538
23981
  properties:
22539
23982
  type: { const: cross_boundary_taint }
23983
+ Event_model_call_request:
23984
+ type: object
23985
+ description: >
23986
+ DURABLE only (server >= 7.155.0 / engine 7.69.1 `brain.call.request`) — ONE ROW PER MODEL CALL that carries a request reading, on the `GET /v1/runs/{taskId}/events`
23987
+ ledger replay only (a companion record like `config_assembled` / `cross_boundary_taint`); never on the live stream, never on the trace SSE. Every call through
23988
+ the model seat (each main-loop turn; a compaction summary / classifier / advisor / suggestion side call each) gets one, before the terminal row (the suggestion
23989
+ pass's row lands after `done`, before `suggestions`). Use: compare the engine's byte-judged "did this request extend the previous main request of the same model"
23990
+ (`request.prefix`) with the provider's `cacheRead` for this one call. 🔴 Per-call readings here, totals ONLY in `model_usage`: no cost / token-count / latency member
23991
+ (summing cost over these rows is wrong). A call with no reading (detection off, a hop a fallback walk left behind, an older engine) has no row.
23992
+ additionalProperties: false # 封闭:铸造点 `modelCallRequestEventData` 只挑这几键(登记表 `excluded` 逐条写了不带花费的理由)
23993
+ required: [type, model, request]
23994
+ properties:
23995
+ type: { const: model_call_request }
23996
+ model: { type: string, description: 'the serving model of this call.' }
23997
+ provider: { type: string }
23998
+ turn: { type: integer, description: 'the main-loop turn (main-loop rows only; side calls carry `lane` instead).' }
23999
+ lane: { type: string, description: 'which lane a call outside the main loop rode (e.g. `suggestions`; engine word, read open).' }
24000
+ cacheRead: { type: integer, description: 'the provider''s cache-read token count for THIS call. ABSENT = the provider did not report it — never read it as 0.' }
24001
+ request: { $ref: '#/components/schemas/ModelCallRequestReading' }
24002
+ ModelCallRequestReading:
24003
+ type: object
24004
+ additionalProperties: false
24005
+ required: [head, messages, chars, prefix]
24006
+ description: >
24007
+ `model_call_request.request` (server >= 7.155.0 / engine 7.69.1) — the request as the session's prefix ledger read it before it went out. `head` = the request
24008
+ head (thinking controls + system text + tool block) under the SESSION's hash salt (16 hex): equal within a session iff the head is the same; not reversible,
24009
+ not a prompt hash — how far it compares is the same run's manifest row `hashScope` (`leg` = two legs' heads do not compare; two sessions with their own salts
24010
+ never compare, a forked session compares with its source).
24011
+ properties:
24012
+ head: { type: string }
24013
+ messages: { type: integer }
24014
+ chars: { type: integer, description: 'length in the ledger''s canonical rendering.' }
24015
+ prefix:
24016
+ description: '`extends` = extends the previous main request of the same model; `no-baseline` = none known to this process (strings read open); the object = where it stops repeating it.'
24017
+ oneOf:
24018
+ - type: string
24019
+ - $ref: '#/components/schemas/ModelCallPrefixDivergence'
24020
+ ModelCallPrefixDivergence:
24021
+ type: object
24022
+ additionalProperties: false
24023
+ required: [at, of, region]
24024
+ description: 'the divergence form of `ModelCallRequestReading.prefix`: where this request stops repeating the previous main request of the same model (`at` / `of` = canonical-rendering position and the previous length; `message` with `region: messages` only).'
24025
+ properties:
24026
+ at: { type: integer }
24027
+ of: { type: integer }
24028
+ region: { type: string, description: 'the same vocabulary as `prefix_changed.region`; read open.' }
24029
+ message: { type: integer }
22540
24030
  Event_needs_review:
22541
24031
  type: object
22542
24032
  description: >
@@ -22576,6 +24066,25 @@ components:
22576
24066
  cause: { type: string, description: 'approver_unavailable / no_approver_wired / mandate_unreconstructible (open set).' }
22577
24067
  remedy: { type: string, description: 'The way out the refusal named; ABSENT when it named none.' }
22578
24068
 
24069
+ VerdictRefusal:
24070
+ type: object
24071
+ required: [toolName, toolCallId, deniedBy, attempts]
24072
+ additionalProperties: true
24073
+ description: >-
24074
+ server >= 7.155.0 (engine 7.69.0; passed through verbatim): the record that a leg's VERDICT call (`StructuredOutput` / a goal iteration's `DeclareDone` / a delegated leg's `ReportBlocked` / an observer's `ObserverReport`) was refused at the gate at least once
24075
+ on this run and NO call of it was delivered on this run (a call let through that ran its body means the leg has its outcome and carries no record). Tells "the model did not submit" (the member is absent) from "it submitted and the gate refused it" (present).
24076
+ The same record rides one `task.verdict_refused` notice per run (the notice detail is this record plus the attribution keys `sessionId` / `runId` / `taskId`). A refusal on a turn that was being cut (a host cancel, the walltime, a person's halt, an extension's `$.turn.abort`) does not count;
24077
+ a paused result never carries it. Per run: a resumed leg carries the refusals of its own run.
24078
+ properties:
24079
+ toolName: { type: string, description: "The verdict tool's wire name (the roster's)." }
24080
+ toolCallId: { type: string, description: 'The LAST refused call of it (the same key as the `tool_start` / `tool_end` frames).' }
24081
+ deniedBy: { $ref: '#/components/schemas/DeniedBy' }
24082
+ settlement:
24083
+ type: string
24084
+ enum: [human_allowed, human_refused, approval_window_expired, denial_limit_window_expired, park_sla_expired, no_approver, approver_unavailable, approver_error, approver_contract, presentation_failed, blanket_allow_refused, policy_allowed, policy_refused, task_aborted, approval_withdrawn]
24085
+ description: "The SETTLEMENT KIND word of that gate record (the `kind` of `Settlement`, NOT the whole settlement object); present exactly when the refused call's gate record carries a settlement (an ask settled, or a person's yes a later layer vetoed)."
24086
+ attempts: { type: integer, minimum: 1, description: 'How many calls of the leg''s verdict tool the gate refused on this run (>= 1).' }
24087
+
22579
24088
  ResolvedReasoning:
22580
24089
  type: object
22581
24090
  required: [requested, effective, graded, clamped, format, endpoint]
@@ -22642,13 +24151,17 @@ components:
22642
24151
  replaced — each of the eight read-only subscription streams gets this frame at the moment drain begins and at the hard-stop start, and is
22643
24152
  then closed by the server; same code and sentence as the billable-submit 503 `draining`) ENDS the reader's leg: the frame is delivered,
22644
24153
  then the reader stops without reconnecting — re-opening (with the last `id:`) is the caller's call, on its own schedule and backoff, and
22645
- lands on the replacement instance; it is a connection signal that says nothing about the run's state. Any other code ENDS the leg too
22646
- (open set — branch on the code, read an unknown code as "this leg ended, reason unknown").
24154
+ lands on the replacement instance; it is a connection signal that says nothing about the run's state. `stream.source_gone` (server >= 7.155.0;
24155
+ `GET /v1/runs/{taskId}/events`, `GET /v1/tasks/{taskId}/stream`, `GET /v1/images/bakes/{bakeId}/events`) = the row this stream follows was gone before it
24156
+ reached a terminal (a claimed submit row withdrawn before the engine got it, a run-less rewind's hold withdrawn when the rewind ended, the whole
24157
+ session tree deleted): the server closes the stream after this frame, a reconnect only answers 404 — do NOT reconnect; it is not an outcome (no `done` /
24158
+ `failed`), and a connection that already carried the ledger's terminal frame never gets it. Servers <= 7.154.x closed that form without a frame.
24159
+ Any other code ENDS the leg too (open set — branch on the code, read an unknown code as "this leg ended, reason unknown").
22647
24160
  additionalProperties: false
22648
24161
  required: [type, errorCode]
22649
24162
  properties:
22650
24163
  type: { const: error }
22651
- errorCode: { type: string, description: 'STREAM_MAX_DURATION (reader resumes) | draining (server >= 7.122.0; reader leg ends) (open set; any other code ends the leg).' }
24164
+ errorCode: { type: string, description: 'STREAM_MAX_DURATION (reader resumes) | draining (server >= 7.122.0; reader leg ends) | stream.source_gone (server >= 7.155.0; reader leg ends, do not reconnect) (open set; any other code ends the leg).' }
22652
24165
  message: { type: string }
22653
24166
  Event_question:
22654
24167
  type: object
@@ -22687,6 +24200,9 @@ components:
22687
24200
  expiresAtMs:
22688
24201
  type: integer
22689
24202
  description: 'server >= 7.39.0, OPEN frame only: `serverNowMs + expiresInMs` — the absolute deadline on the server''s clock.'
24203
+ workflowRunId: { type: string, minLength: 1, maxLength: 200, description: 'server >= 7.156.0 (engine word `ask.workflow_member`), OPEN frame only (never on `question_complete`) — the workflow this question comes from: the engine''s opaque run id, verbatim, capped at 200 code units. Present iff the question is a workflow member''s; the same reader and value as the approval card''s, the pending queue row''s and the inbox row''s.' }
24204
+ workflowAgentLabel: { type: string, minLength: 1, maxLength: 200, description: 'server >= 7.156.0 — the workflow member''s display text (script-authored, UNTRUSTED: exit-redacted and capped at 200 code units; not unique, never a key). Present only beside `workflowRunId` and when non-empty.' }
24205
+ workflowStepAskedAgain: { type: boolean, enum: [true], description: 'server >= 7.156.0 — this question re-runs a step whose earlier card stopped waiting without a decision. Literal true only, never false; names no cause. Only beside `workflowRunId`.' }
22690
24206
  Event_question_complete:
22691
24207
  type: object
22692
24208
  description: >
@@ -22913,12 +24429,33 @@ components:
22913
24429
  rowVerdict:
22914
24430
  allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
22915
24431
  description: '`pending` frames only (server >= 7.144.0): the spread PendingCheckpoint row''s `rowVerdict` (ABSENT IS NOT `ok`).'
24432
+ wayOut:
24433
+ allOf: [{ $ref: '#/components/schemas/ApprovalWayOut' }]
24434
+ description: '`pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s `wayOut` (a changed value re-sends that row''s `pending` frame).'
24435
+ stuck:
24436
+ allOf: [{ $ref: '#/components/schemas/StuckCardWord' }]
24437
+ description: 'Parked-door `pending` frames only (server >= 7.156.0): the spread PendingCheckpoint row''s `stuck`.'
24438
+ redactedKeys:
24439
+ type: array
24440
+ items: { $ref: '#/components/schemas/ParkedRowRedactedKey' }
24441
+ description: 'Parked-door `pending` frames only (server >= 7.156.0): the spread PendingCheckpoint row''s `redactedKeys`.'
24442
+ workflowRunId: { type: string, description: 'Parked-door `pending` frames only (server >= 7.156.0): the spread PendingCheckpoint row''s `workflowRunId`.' }
24443
+ workflowAgentLabel: { type: string, description: 'Parked-door `pending` frames only (server >= 7.156.0): the spread PendingCheckpoint row''s `workflowAgentLabel`.' }
24444
+ workflowStepAskedAgain: { type: boolean, enum: [true], description: 'Parked-door `pending` frames only (server >= 7.156.0): the spread PendingCheckpoint row''s `workflowStepAskedAgain`.' }
24445
+ fromSubagent: { type: boolean, const: true, description: 'Parked-door `pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s `fromSubagent`.' }
24446
+ sourceSessionId: { type: string, description: 'Parked-door `pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s `sourceSessionId`.' }
24447
+ agentId: { type: string, description: 'Parked-door `pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s `agentId`.' }
24448
+ planContentHash: { type: string, description: 'Parked-door `pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s `planContentHash` (plan-review rows).' }
24449
+ requestedByCallId: { type: string, description: 'Parked-door `pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s `requestedByCallId` (plan-review rows).' }
22916
24450
  agent:
22917
24451
  allOf: [{ $ref: '#/components/schemas/SessionAgent' }]
22918
24452
  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").'
22919
24453
  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").' }
22920
24454
  checkpointIdMissing: { $ref: '#/components/schemas/CheckpointIdMissingWord' }
22921
24455
  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).' }
24456
+ decision:
24457
+ allOf: [{ $ref: '#/components/schemas/WorkflowParkDecisionCell' }]
24458
+ description: '`pending` frames only (server >= 7.155.0): the spread PendingCheckpoint row''s decision cell (same projection; a changed cell re-sends the row''s frame).'
22922
24459
  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).' }
22923
24460
  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).' }
22924
24461
  message: { type: string, description: '`error` frames: the human sentence (redacted); never match on it.' }
@@ -23036,7 +24573,7 @@ components:
23036
24573
 
23037
24574
  WorkflowParkDecisionRecorded:
23038
24575
  type: object
23039
- description: 'server >= 7.155.0 — the `recorded` arm of `WorkflowParkDecisionReceipt`: exactly five receipt keys, all required; NO `taskId` / `sessionId` (not "unreadable": this word''s key set has none). The only optional keys are the request-conditioned rule slot (`rulePersisted` / `ruleRefusal`, present only when the request carried `persistRule`).'
24576
+ description: 'server >= 7.155.0 — the `recorded` arm of `WorkflowParkDecisionReceipt`: exactly five receipt keys, all required; NO `taskId` / `sessionId` (not "unreadable": this word''s key set has none). The optional keys are the request-conditioned rule slot (`rulePersisted` / `ruleRefusal`, present only when the request carried `persistRule`) and the later-added `turnRefused` (its first server version is stated on that property).'
23040
24577
  required: [status, runId, decisionId, decision, bindingEnforced]
23041
24578
  additionalProperties: false
23042
24579
  properties:
@@ -23047,6 +24584,7 @@ components:
23047
24584
  bindingEnforced: { type: boolean, enum: [true] }
23048
24585
  rulePersisted: { type: boolean, enum: [false], description: 'Request-conditioned rule slot: present only when the request carried `persistRule`; always `false` on this lane (the server cannot prove the engine committed the decision when it answers, so the rule is not stored). The verdict itself stands. Not a discriminant.' }
23049
24586
  ruleRefusal: { type: string, enum: [rule_lane_unavailable], description: 'Present with `rulePersisted` (and only then): always `rule_lane_unavailable` on this lane.' }
24587
+ turnRefused: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/turnRefused' }
23050
24588
 
23051
24589
  WorkflowParkDecisionDelivered:
23052
24590
  type: object
@@ -23098,6 +24636,7 @@ components:
23098
24636
  parentTaskId: { type: string }
23099
24637
  stoppedBy: { type: string, description: 'Verbatim open enum (who/what stopped a killed child).' }
23100
24638
  resumable: { type: boolean }
24639
+ resumableUntil: { type: number, description: 'server >= 7.156.0: the continuation deadline (epoch ms, an UPPER BOUND) — same reader and value as the terminal `task` row and the run stream''s `task_notification`.' }
23101
24640
  recentSteps:
23102
24641
  type: array
23103
24642
  items:
@@ -23159,6 +24698,7 @@ components:
23159
24698
  additionalProperties: true
23160
24699
  properties:
23161
24700
  kind: { type: string, enum: [hook_decision_unavailable] }
24701
+ groupKey: { type: string, pattern: '^[0-9a-f]{24}$', description: 'server >= 7.156.0 — the four kinds'' MERGE KEY: a fixed-length digest (24 lowercase hex, same across replicas and restarts) of the identity members present on the frame (`kind` · `event` · `reason` · `hookName` · `entryType` · `source` · `lane` · `optionCause`, plus the entry''s plugin identity name + root); equal ⇔ the same hook failing the same way. Per-occurrence members (`exitCode` · `toolName` · `stderr` · `detail`) are not in it. Fold repeated hook failures into one row by this key and count on your side (the server still emits one frame per occurrence); do not fold by `hookName` + `reason`. Fleet stream and run event stream carry the same key for the same frame. Absent = an older server, or a run-ledger row written before 7.156.0.' }
23162
24702
  event: { type: string, description: 'Which hook event (Stop / PreToolUse / …) — defined by "a hook adjudication did not complete", not any single feature.' }
23163
24703
  reason:
23164
24704
  # 🔴 NO `enum` — same ruling as `FleetTaskRow.retiredBy` (codex R1-F3, family case): the description
@@ -23179,6 +24719,7 @@ components:
23179
24719
  additionalProperties: true
23180
24720
  properties:
23181
24721
  kind: { type: string, enum: [hook_non_blocking_failure] }
24722
+ groupKey: { type: string, pattern: '^[0-9a-f]{24}$', description: 'server >= 7.156.0 — merge key (same reading as `FleetHookDecisionUnavailable.groupKey`).' }
23182
24723
  event: { type: string, description: 'Which hook event (PreToolUse / Stop / …).' }
23183
24724
  reason:
23184
24725
  # 🔴 NO `enum` — same open-on-read ruling as kind 1 (SDK type is `... | (string & {})`).
@@ -23202,6 +24743,7 @@ components:
23202
24743
  additionalProperties: true
23203
24744
  properties:
23204
24745
  kind: { type: string, enum: [hook_managed_unrun] }
24746
+ groupKey: { type: string, pattern: '^[0-9a-f]{24}$', description: 'server >= 7.156.0 — merge key (same reading as `FleetHookDecisionUnavailable.groupKey`).' }
23205
24747
  event: { type: string, description: 'Which hook event. On PreToolUse this entry sets the managed lane: with no veto the call folds to `ask`.' }
23206
24748
  reason:
23207
24749
  # NO `enum` — same open-on-read ruling as kinds 1 and 2.
@@ -23228,6 +24770,7 @@ components:
23228
24770
  additionalProperties: true
23229
24771
  properties:
23230
24772
  kind: { type: string, enum: [hook_verdict_untrusted] }
24773
+ groupKey: { type: string, pattern: '^[0-9a-f]{24}$', description: 'server >= 7.156.0 — merge key (same reading as `FleetHookDecisionUnavailable.groupKey`).' }
23231
24774
  event: { type: string, description: 'Which hook event (today always PreToolUse).' }
23232
24775
  reason:
23233
24776
  # NO `enum` — same open-on-read ruling as kinds 1–3.
@@ -23558,13 +25101,34 @@ components:
23558
25101
  passRate: { type: number }
23559
25102
  meanCostMicroUsd: { type: number }
23560
25103
 
25104
+ WiringManifestDeclaredPlaces:
25105
+ type: object
25106
+ additionalProperties: false
25107
+ description: >
25108
+ `wiring_manifest.declaredPlaces` (server >= 7.155.0 / engine 7.69.1; tenant and operator frames alike; outside `configFingerprint`): how many DECLARED places
25109
+ this leg placed rows at, and where each came from — `agentConfigDirs` (the configuration-directory rows: the deployment's root, the request's
25110
+ `settings.agentConfigDirs`, a resumed row's) and `agentHomeDirs` (the home-anchored read-deny rows: the request's `settings.agentHomeDirs`, a resumed row's;
25111
+ the engine's own homes are not listed). One row per place, `from` only — NO PATHS (they are host texts). Either list may be absent; the whole section absent =
25112
+ no declared place, or an older server. A caller that sent the two seats checks arrival by a row whose `from` holds `task`. The server only judges the shape
25113
+ (an object, arrays, rows with a non-empty `from`); a malformed section is dropped whole.
25114
+ properties:
25115
+ agentConfigDirs: { type: array, items: { $ref: '#/components/schemas/WiringManifestDeclaredPlace' } }
25116
+ agentHomeDirs: { type: array, items: { $ref: '#/components/schemas/WiringManifestDeclaredPlace' } }
25117
+ WiringManifestDeclaredPlace:
25118
+ type: object
25119
+ additionalProperties: false
25120
+ description: 'one declared place: `from` = every layer that declared it — `deployment` / `task` / `checkpoint` (engine words; the server only checks a non-empty word list, a new word passes verbatim — read open).'
25121
+ required: [from]
25122
+ properties:
25123
+ from: { type: array, minItems: 1, items: { type: string } }
25124
+
23561
25125
  WiringManifest:
23562
25126
  type: object
23563
25127
  description: >
23564
25128
  🔴 ONE RULE FOR EVERY "EFFECTIVE HALF ONLY" KEY (sdk 9.7.0, after a codex adversarial-review [high]):
23565
25129
  this schema's only consumer today is `GET /v1/diagnostics/wiring`'s `static` half, and every key marked
23566
25130
  "effective half only" (`leg`, `ask.effective`, `configFingerprint`, `tools`, `mods`, `lsp`,
23567
- `modelGate`, `autoMode`, `writeProtection`, `readDeny`, `autoConsolidation`, `fileHistory`, `instructions`, `sessionRules`, `projectMemory`) is ALWAYS ABSENT on that
25131
+ `modelGate`, `autoMode`, `writeProtection`, `readDeny`, `autoConsolidation`, `fileHistory`, `instructions`, `sessionRules`, `projectMemory`, `declaredPlaces`, `fastMode`) is ALWAYS ABSENT on that
23568
25132
  wire ⇒ THEIR ABSENCE HERE CARRIES NO INFORMATION. The per-key absence readings ("absent = not armed",
23569
25133
  "absent = a third state", …) hold for the LIVE FRAME (`Event_wiring_manifest`) and must not be carried
23570
25134
  over to this response. For the facts behind those keys: a tenant reads
@@ -23593,6 +25157,12 @@ components:
23593
25157
  additionalProperties: true
23594
25158
  properties:
23595
25159
  schemaVersion: { type: integer }
25160
+ fastMode:
25161
+ allOf: [{ $ref: '#/components/schemas/FastModeReading' }]
25162
+ description: 'server >= 7.156.0 (engine 7.69.0; effective half only — this half never carries it, see the rule at the top): the leg''s fast-mode reading at its start. The reading before any submit is on `GET /v1/models` rows.'
25163
+ declaredPlaces:
25164
+ allOf: [{ $ref: '#/components/schemas/WiringManifestDeclaredPlaces' }]
25165
+ description: 'server >= 7.155.0 (engine 7.69.1; effective half only — this half never carries it, see the rule at the top): the declared places guarding the leg.'
23596
25166
  leg:
23597
25167
  type: object
23598
25168
  description: 'Which leg emitted it (effective half only; the static half has no leg identity).'
@@ -23618,12 +25188,7 @@ components:
23618
25188
  It lists what was HANDED to the engine, not what the engine installed (a single skill over the engine's load gate is listed but not installed). A resume leg reports the roster of that resume's assembly.
23619
25189
  items: { $ref: '#/components/schemas/WiringManifestSkill' }
23620
25190
  ask:
23621
- type: object
23622
- description: 'Approval seam: wired form, which seat it came from, and (effective half) what it adjudicates to.'
23623
- properties:
23624
- form: { type: string, enum: [callback, allow, deny, absent, declared_none], description: '`declared_none` (server >= 7.118.0 / core 7.43.0): the run declared nobody on it can be asked (`approvalReach: "none"`), so a callback beside the declaration is not this run''s approver.' }
23625
- provenance: { type: string, enum: [spec, deps] }
23626
- effective: { type: string, enum: [human_reachable, auto_allow, auto_deny, park_only, unresolved] }
25191
+ $ref: '#/components/schemas/WiringManifestAsk'
23627
25192
  question:
23628
25193
  type: object
23629
25194
  description: 'Question channel; `interactiveToolsWithoutDeliveryFace` is the composition-lie flag (interactive tools mounted with no delivery face).'
@@ -23722,12 +25287,19 @@ components:
23722
25287
  core >= 7.3.1 (#529), server >= 7.59 — did AUTO mode arm on THIS leg, and if not which arm it stopped
23723
25288
  at. EFFECTIVE half only. 🔴 `reason` is core's closed word list passed through VERBATIM (branch known
23724
25289
  words, keep a default arm); ABSENCE IS NOT "not applicable" — never fold it to `armed: false`. The
23725
- server projects exactly these two keys (core's `breaker` sub-fact is NOT projected onto the wire).
23726
- Full contract: see Event_wiring_manifest.autoMode.
25290
+ server projects these keys only (core's `breaker` sub-fact is NOT projected onto the wire): `armed`, `reason`, and `deniedSource` when
25291
+ the resolver tracks it. Full contract: see Event_wiring_manifest.autoMode.
23727
25292
  required: [armed, reason]
23728
25293
  properties:
23729
25294
  armed: { type: boolean }
23730
25295
  reason: { type: string }
25296
+ deniedSource: { type: string, description: 'core 7.14.0 — which plane''s ratchet turned AUTO off (`org` / `local` / `settings` today; passed through verbatim, open on read). ABSENT = the resolver does not track sources.' }
25297
+ hands:
25298
+ allOf: [{ $ref: '#/components/schemas/WiringManifestHands' }]
25299
+ description: 'core 7.33.1 — does this leg have hands (effective half only — this half never carries it, see the rule at the top). Full contract: see Event_wiring_manifest.hands.'
25300
+ teamRole:
25301
+ type: string
25302
+ description: 'core 7.30.0 — the leg''s role in agent teams (`lead` / `teammate` / `none`; effective half only — this half never carries it). Full contract: see Event_wiring_manifest.teamRole.'
23731
25303
  mods:
23732
25304
  type: array
23733
25305
  description: >
@@ -23998,6 +25570,16 @@ components:
23998
25570
  provenance: { type: string, description: "server >= 7.138.0 - where the registration came from: `server` (minted by this service; every deployment has at least the permission-denial meter row) or `operator` (installed from `MODS_PACKAGES`). Does not share words with `seat`. Engine/service words, read open; absent = an older server." }
23999
25571
  refusedBy: { type: string, description: 'the registration whose judge refused it (registrant text).' }
24000
25572
  reason: { type: string, description: 'the refusing judge''s own words (registrant text, UNTRUSTED-for-display).' }
25573
+ WiringManifestHands:
25574
+ type: object
25575
+ additionalProperties: false
25576
+ required: [mounted]
25577
+ description: >-
25578
+ `wiring_manifest.hands` (core 7.33.1) — does this leg have hands. `mounted` is required: when the server cannot read it the WHOLE section is absent (it never mints a
25579
+ false). `reason` is passed through verbatim (today only beside `mounted: false`, one word `no_execution_env`; the server does not copy the word list — read it open).
25580
+ properties:
25581
+ mounted: { type: boolean }
25582
+ reason: { type: string, description: 'Why there are no hands (`no_execution_env` today; open on read).' }
24001
25583
  WiringManifestLspSeam:
24002
25584
  # sdk 9.5.0:同上 —— live 帧与静态面共用一份段形。
24003
25585
  type: object
@@ -24042,6 +25624,22 @@ components:
24042
25624
  spawnedAt: { type: number, description: 'epoch ms' }
24043
25625
  updatedAt: { type: number, description: 'epoch ms' }
24044
25626
  settledAt: { type: number, description: 'epoch ms; absent until the agent settles.' }
25627
+ AgentRosterUnreadableRow:
25628
+ type: object
25629
+ additionalProperties: false
25630
+ required: [handle, unreadable]
25631
+ description: >-
25632
+ server >= 7.156.0 — a FIRST-PAGE row of `GET /v1/agents/roster` whose stored record the engine's row verdict could not read, listed instead of silently dropped.
25633
+ EXACTLY two keys (no `name` / `status` / timestamps). The marker is the same one a session-list row and a workflow-list row carry. The same agent reads as
25634
+ "unreadable" in the session delete / retire child pre-checks (it cannot be proven not alive).
25635
+ properties:
25636
+ handle: { type: string, description: 'The background agent''s id (the same string as on a readable row).' }
25637
+ unreadable:
25638
+ type: object
25639
+ additionalProperties: false
25640
+ required: [errorCode]
25641
+ properties:
25642
+ errorCode: { type: string, description: 'The engine''s row-verdict code; `agent_record.row_malformed` today (open set).' }
24045
25643
  AgentRosterPage:
24046
25644
  type: object
24047
25645
  additionalProperties: false
@@ -24049,8 +25647,16 @@ components:
24049
25647
  description: >
24050
25648
  The 200 body of `GET /v1/agents/roster`. `total` is the OWNER-scoped row count of the roster window (a row of another tenant is in neither the page nor this number — a count that differed would be an existence oracle);
24051
25649
  `truncated: true` says the tenant has more rows than the 500-row window, so `total` is the window, not the whole. `nextBefore` (present = another page exists) is the opaque cursor to send back as `before`.
25650
+ 🔴 Each `agents[]` item is a UNION (server >= 7.156.0): a readable row (`AgentRosterRow`) OR a row the engine's row verdict could not read (`AgentRosterUnreadableRow`,
25651
+ exactly `{ handle, unreadable: { errorCode } }`) — those are listed on the FIRST page only (no `before`), after that page's readable rows, never counting toward
25652
+ `limit` or the cursor, and they count in `total`. Test `unreadable` before reading `name` / `status`.
24052
25653
  properties:
24053
- agents: { type: array, items: { $ref: '#/components/schemas/AgentRosterRow' } }
25654
+ agents:
25655
+ type: array
25656
+ items:
25657
+ oneOf:
25658
+ - { $ref: '#/components/schemas/AgentRosterRow' }
25659
+ - { $ref: '#/components/schemas/AgentRosterUnreadableRow' }
24054
25660
  total: { type: integer, minimum: 0 }
24055
25661
  nextBefore: { type: string }
24056
25662
  truncated: { type: boolean, enum: [true] }
@@ -24071,7 +25677,7 @@ components:
24071
25677
  properties:
24072
25678
  reason:
24073
25679
  type: string
24074
- description: '`rejected` (the endpoint answered 401 and the authorization seat''s re-ask gave no credential that passes) | `scope` (403 with an `insufficient_scope` challenge) | `none` (the authorization seat answered "not authorized"). Core''s closed `MCP_AUTHORIZATION_REASONS`, read as an OPEN set (keep a default arm).'
25680
+ description: '`rejected` (the endpoint answered 401 and the authorization seat''s re-ask answered, with no credential that passes) | `scope` (403 with an `insufficient_scope` challenge) | `none` (the authorization seat answered "not authorized") | `seat_unavailable` (server >= 7.155.0 / engine 7.69.0: the endpoint answered 401 and the deployment''s credential seat could not answer the re-ask — it threw, timed out, answered a shape the engine cannot carry, was aborted, or gave no credential when the request was resent after a resume; NOT a missing user authorization, so do not prompt the user to authorize — the dial failure is told as `mcp.server_unavailable`, and `mcp.authorization_required` only ever carries the first three words). Core''s closed `MCP_AUTHORIZATION_REASONS`, read as an OPEN set (keep a default arm).'
24075
25681
  WiringManifestMcpEntry:
24076
25682
  # 8.9.0:从 `Event_wiring_manifest.mcp.items` 的内联形**提取**为具名 schema —— 同一份行形现在被
24077
25683
  # 两处引用(live 帧与 `WiringManifest` 的静态/两半形),内联会立刻变成两份会各自漂的镜像。
@@ -24253,6 +25859,40 @@ components:
24253
25859
  description: >
24254
25860
  server >= 7.5x (#324, design/338) — the mid-turn MCP revocation list. `null` = this process has no
24255
25861
  config pipeline (it cannot say). NOT YET MIRRORED KEY-BY-KEY in this SDK generation — read as opaque.
25862
+ outbound:
25863
+ oneOf:
25864
+ - $ref: '#/components/schemas/WiringOutbound'
25865
+ - type: 'null'
25866
+ description: >-
25867
+ The OUTBOUND segment (the server has sent it since 7.108.0; declared here from this version): which variable supplies the effective proxy
25868
+ (the NAME, never the value), whether `NO_PROXY` is set, whether the loopback-direct rule is in effect in this runtime, when the proxy variables
25869
+ were read, and this process's last connect failure — the same facts as the ops log line `outbound_connect_failed`. `null` = this process cannot say.
25870
+ WiringOutbound:
25871
+ type: object
25872
+ additionalProperties: false
25873
+ required: [proxy, noProxy, loopbackDirect, proxyReadAtMs, lastConnectFailure]
25874
+ properties:
25875
+ proxy:
25876
+ type: object
25877
+ additionalProperties: false
25878
+ required: [http, https]
25879
+ properties:
25880
+ http: { type: ['string', 'null'], enum: [HTTP_PROXY, null] }
25881
+ https: { type: ['string', 'null'], enum: [HTTPS_PROXY, HTTP_PROXY, null] }
25882
+ noProxy: { type: boolean }
25883
+ loopbackDirect: { type: boolean }
25884
+ proxyReadAtMs: { type: number, description: 'When the proxy variables were read (epoch ms; read once at start-up — a later VPN / proxy change is unknown to this process, so this moment is the "restart?" criterion).' }
25885
+ lastConnectFailure:
25886
+ oneOf:
25887
+ - type: object
25888
+ additionalProperties: false
25889
+ required: [targetHost, code, proxyInUse, atMs]
25890
+ properties:
25891
+ targetHost: { type: string }
25892
+ code: { type: string, enum: [UND_ERR_CONNECT_TIMEOUT, ECONNREFUSED, ENOTFOUND, EAI_AGAIN, EHOSTUNREACH, ENETUNREACH] }
25893
+ proxyInUse: { type: ['string', 'null'], description: 'The proxy VARIABLE NAME this hop used; `null` = direct.' }
25894
+ atMs: { type: number }
25895
+ - type: 'null'
24256
25896
 
24257
25897
  SendfileLinkRow:
24258
25898
  type: object
@@ -24655,6 +26295,8 @@ components:
24655
26295
  field: { type: string }
24656
26296
  entry: { type: string }
24657
26297
  reason: { type: string }
26298
+ currentName: { type: string, minLength: 1, description: 'server >= 7.156.0 — present iff the name judge gave the current spelling of this entry''s tool name (the name segment only: `BASH(*)` → `Bash`); never an empty string; redacted like `entry`.' }
26299
+ guidance: { type: string, minLength: 1, description: 'server >= 7.156.0 — present iff the name judge gave its own one-line sentence for this entry (retired names, unmintable protocol segments), verbatim; never an empty string; redacted like `entry`.' }
24658
26300
  PrincipalInboxMessage:
24659
26301
  type: object
24660
26302
  description: 'The request body of POST /v1/principal-inbox/messages: a CLOSED three-key shape (`from` is minted by the server from the verified identity and cannot be sent).'
@@ -24749,13 +26391,35 @@ components:
24749
26391
  decision: { $ref: '#/components/schemas/ApprovalAskDecision' }
24750
26392
  decidedAtMs: { type: integer }
24751
26393
  decisionNote: { type: string }
26394
+ ToolApprovalReadParkedProjection:
26395
+ type: object
26396
+ description: >
26397
+ server >= 7.155.0 — the `parked` arm's row projection: `ToolApprovalReadProjection` WITHOUT the live-card window `expiresAtMs` (a parked card is not waiting
26398
+ on that window; it waits on its own clock `deadline`); `frame` carries only the candidates the parked form can honour (no `readRootCandidate`). Servers
26399
+ <= 7.154.x put `expiresAtMs` on this arm and no `deadline` — tell the two generations apart by whether `expiresAtMs` is present.
26400
+ required: [approvalId, ts]
26401
+ additionalProperties: true
26402
+ properties:
26403
+ approvalId: { type: string }
26404
+ ts: { type: number, description: 'Registration time (ms epoch).' }
26405
+ sessionId: { type: string }
26406
+ toolName: { type: string }
26407
+ frame: { $ref: '#/components/schemas/ApprovalRequestFrame' }
26408
+ ToolApprovalParkTrigger:
26409
+ type: string
26410
+ enum: [ttl_expired, broadcast_lost, stream_disconnected, undeliverable, shutdown_before_park]
26411
+ description: 'server >= 7.155.0 — why the ask was moved into the parked state (the ask row''s `park_trigger`; the server answers only these five words, otherwise the key is omitted). Read open on the consumer side.'
24752
26412
  ToolApprovalReadParked:
24753
26413
  allOf:
24754
- - $ref: '#/components/schemas/ToolApprovalReadProjection'
26414
+ - $ref: '#/components/schemas/ToolApprovalReadParkedProjection'
24755
26415
  - type: object
24756
26416
  required: [state]
24757
26417
  properties:
24758
26418
  state: { type: string, enum: [parked] }
26419
+ deadline:
26420
+ type: [number, 'null']
26421
+ description: 'server >= 7.155.0 — the parked card''s own deadline (same name and meaning as the operator queue row / inbox row `deadline`): a number = the deadline; null = no limit set (only the deployment''s terminal backstop remains); ABSENT = cannot be told this instant (still parking / gate not read / store fault) — do not start a countdown.'
26422
+ parkTrigger: { $ref: '#/components/schemas/ToolApprovalParkTrigger' }
24759
26423
  decidePath: { type: string, description: 'The durable decision path for this ask when it can be built.' }
24760
26424
  reopened:
24761
26425
  allOf: [{ $ref: '#/components/schemas/ToolApprovalReopened' }]
@@ -24973,6 +26637,77 @@ components:
24973
26637
  expectedGeneration: { type: string, pattern: '^(0|[1-9][0-9]*)$', description: 'The fleet generation as a canonical decimal string (`/health.generation`); absent against absent — omit it only for a non-member.' }
24974
26638
  instanceId: { type: string, minLength: 1, description: The engine's per-process identity (`/health.instanceId`); compared only when present. }
24975
26639
  term: { type: string, minLength: 1, description: The claim term the sending executor holds for this action (center-issued, opaque); absent on a direct or hand-issued call. }
26640
+ CredentialDrainRequest:
26641
+ type: object
26642
+ additionalProperties: false
26643
+ description: >-
26644
+ server >= 7.156.0 — the drain endpoint's CREDENTIAL-NAMED form (contract `CredentialDrainRequest`, `@sema-agent/settings-schema` 33.1.0): the sender
26645
+ names the engine by the `launch`-class credential it presents, so the body carries no action id, worker or deadline. STRICT: one key more, a word
26646
+ off, a negative / fractional count ⇒ not this form. Every key optional; `{}` is the whole default form.
26647
+ properties:
26648
+ instanceId: { type: string, minLength: 1, description: 'The engine''s per-process identity (`/health.instanceId`); compared when present, refused on a mismatch.' }
26649
+ turns: { allOf: [{ $ref: '#/components/schemas/DrainTurns' }], description: 'How the turns running at acceptance give way: `yield` (absent = this) parks them at the next clean boundary; `halt` also asks every running turn to stop now (operator halt authority only, else 403 `auth.operator_only` + `reason: halt_needs_operate`).' }
26650
+ attachedAtMost: { type: integer, minimum: 0, maximum: 9007199254740991, description: 'Accept only if at most this many streams are attached when the engine judges the request; more ⇒ 409 `conflict.drain_condition_unmet` (root `attached` / `attachedAtMost`), nothing changed.' }
26651
+ LeaderRequest:
26652
+ type: object
26653
+ description: >-
26654
+ The body of `POST /v1/leader`. Closed (since server 7.156.0): these nine keys are every key the door reads; any other top-level key is
26655
+ 400 `request.body_shape` naming it (<= 7.155.x dropped unknown keys silently). A production deployment requires `objective`, `durableRemote`,
26656
+ `testCmd`, `seedCmd` and `baseSha` as non-blank strings. Only the top level is closed: extra keys inside `subtasks[]` / `oracleFiles[]` entries
26657
+ are not judged at admission.
26658
+ required: [objective, durableRemote, testCmd, seedCmd, baseSha]
26659
+ additionalProperties: false
26660
+ properties:
26661
+ objective: { type: string }
26662
+ durableRemote: { type: string }
26663
+ testCmd: { type: string }
26664
+ seedCmd: { type: string }
26665
+ baseSha: { type: string }
26666
+ subtasks:
26667
+ type: array
26668
+ items:
26669
+ type: object
26670
+ required: [workerId, branch, files, objective]
26671
+ properties:
26672
+ workerId: { type: string }
26673
+ branch: { type: string }
26674
+ files: { type: array, items: { type: string } }
26675
+ objective: { type: string }
26676
+ planContext: { type: string }
26677
+ targetRef: { type: string }
26678
+ oracleFiles:
26679
+ type: array
26680
+ items:
26681
+ type: object
26682
+ required: [path, content]
26683
+ properties:
26684
+ path: { type: string }
26685
+ content: { type: string }
26686
+ DrainTurns:
26687
+ type: string
26688
+ enum: ['yield', halt]
26689
+ description: 'server >= 7.156.0 — the two words of `CredentialDrainRequest.turns` (contract `DRAIN_TURNS`, same order). Closed.'
26690
+ DrainBody:
26691
+ description: >-
26692
+ server >= 7.156.0 — the drain endpoint's body: EXACTLY ONE of the identity form `DrainRequest` or the credential-named form `CredentialDrainRequest`.
26693
+ The identity form must not carry the credential form's own keys `turns` / `attachedAtMost` (the server answers that body 400 `request.field_invalid`
26694
+ + `reason: not_a_drain_form`); the credential form is strict, so any identity key makes it not that form. Servers <= 7.155.x accept only `DrainRequest`.
26695
+ oneOf:
26696
+ - allOf:
26697
+ - $ref: '#/components/schemas/DrainRequest'
26698
+ - not:
26699
+ anyOf:
26700
+ - required: [turns]
26701
+ - required: [attachedAtMost]
26702
+ - $ref: '#/components/schemas/CredentialDrainRequest'
26703
+ DrainOperatorOnlyReason:
26704
+ type: string
26705
+ enum: [principal_not_on_roster, principal_absent, halt_needs_operate]
26706
+ description: 'server >= 7.156.0 — the root `reason` of the drain endpoint''s 403 `auth.operator_only`: not on the operator roster · no principal presented · `turns: halt` without the stop-any-run authority. Closed.'
26707
+ DrainFieldInvalidReason:
26708
+ type: string
26709
+ enum: [not_a_drain_form, deadline_beyond_bound]
26710
+ description: 'server >= 7.156.0 — the root `reason` of the drain endpoint''s 400 `request.field_invalid`: the body is neither form · the deadline is beyond the bound. Closed.'
24976
26711
  DrainReceipt:
24977
26712
  type: object
24978
26713
  required: [actionId, since, deadlineAt, state]
@@ -25740,6 +27475,14 @@ components:
25740
27475
  type: array
25741
27476
  items: { type: string }
25742
27477
  description: 'Config entries whose `witnessedAtMs` is null, as `<deployment>:<key>`. Empty = the account is settled.'
27478
+ pendingLegs:
27479
+ type: array
27480
+ items: { type: string }
27481
+ description: >
27482
+ server >= 7.155.0 (always present from that version; absent on older servers): the engine identity-seat legs this adoption has NOT finished (names as in
27483
+ `legs[].store`, e.g. `checkpoint#identity`), read off the arc log's per-seat marks. Empty on `stalled` (not committed); on `completing` the seats still owed
27484
+ after the commit (their rows are still under the old identity until completion); on `adopted` the seats a post-terminal late sweep (POST) stopped midway
27485
+ on — the next POST sweeps again. Never read `adopted` as "this list is empty".
25743
27486
  quarantined: { type: integer, minimum: 0, description: 'Always 0 for form b (zero carriage ⇒ no rejected rows). The field is present so the envelope does not change shape when form a arrives.' }
25744
27487
  residualSourceRows:
25745
27488
  type: integer
@@ -25777,7 +27520,7 @@ components:
25777
27520
 
25778
27521
  🔴 `adoptionId` is at the TOP LEVEL (the server sends `{adoptionId, ...receipt}`), carrying the same
25779
27522
  value as `immutableReport.adoptionId`.
25780
- 🔴 `status` is a TWO-WORD closed set. `rejected` is deliberately NOT a member: a refused adoption never
27523
+ 🔴 `status` is a THREE-WORD closed set (server >= 7.155.0 adds `completing`; older servers answer two). `rejected` is deliberately NOT a member: a refused adoption never
25781
27524
  produces a receipt, it answers a typed 409 — otherwise "refused" and "succeeded" would share one 200
25782
27525
  envelope and a consumer could only guess by reading fields.
25783
27526
  🔴 `status` is ALSO the precondition for reading `immutableReport`: it is frozen only once `adopted`;
@@ -25786,7 +27529,7 @@ components:
25786
27529
  required: [adoptionId, status, immutableReport, current]
25787
27530
  properties:
25788
27531
  adoptionId: { type: string, minLength: 1 }
25789
- status: { type: string, enum: [adopted, stalled], description: '`adopted` = the terminal state is in place (and only then is `immutableReport` frozen); `stalled` = in flight (the lock is held by another replica, or a crashed run has not been resumed yet). Not a failure.' }
27532
+ status: { type: string, enum: [adopted, completing, stalled], description: '`adopted` = the terminal state is in place (and only then is `immutableReport` frozen); `stalled` = in flight and NOT committed (the lock is held by another replica, or a crashed run has not been resumed yet); `completing` (server >= 7.155.0) = committed, with engine identity seats still to finish (`current.pendingLegs` names them; completion resumes on the next boot scan / POST / GET). Not a failure. "Committed or not" reads off this word only.' }
25790
27533
  immutableReport:
25791
27534
  allOf: [{ $ref: '#/components/schemas/AdoptionReport' }]
25792
27535
  description: 'Frozen ONLY when `status` is `adopted`; on `stalled` it is a provisional projection of the current row — do not persist it as audit evidence.'
@@ -25814,6 +27557,11 @@ components:
25814
27557
  deployment shape). This is the SAME bit the submit-time admission chain judges: `offline` ⇒ a submit
25815
27558
  carrying that `deviceId` answers 409 `device.offline`.
25816
27559
  lastSeenAt: { type: string, format: date-time, description: 'ISO-8601. ABSENT if the device has never connected (not `null`, not epoch 0).' }
27560
+ ownedByCaller:
27561
+ type: boolean
27562
+ description: >-
27563
+ server >= 7.156.0 — is this row the caller's own: `true` iff the row's owner (tenant, subject) is exactly the caller's own pair; `false` when it differs
27564
+ or the caller cannot form its own pair. Present on EVERY row from 7.156.0; absent only on an older server = UNKNOWN, never `false`. No capability bit.
25817
27565
 
25818
27566
  DeviceListResult:
25819
27567
  type: object