@sema-agent/server 7.149.0 → 7.151.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 (441) hide show
  1. package/MIGRATION.md +307 -9
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/USAGE.md +92 -40
  5. package/deploy/sema-up/README.md +7 -1
  6. package/deploy/sema-up/chart/Chart.yaml +1 -1
  7. package/deploy/sema-up/chart/templates/NOTES.txt +5 -0
  8. package/deploy/sema-up/chart/templates/_helpers.tpl +15 -16
  9. package/deploy/sema-up/chart/templates/server-v4pro.yaml +5 -3
  10. package/deploy/sema-up/chart/templates/server.yaml +5 -3
  11. package/deploy/sema-up/chart/values-full-single.yaml +3 -1
  12. package/deploy/sema-up/chart/values.yaml +8 -1
  13. package/deploy/sema-up/cluster-up.sh +1 -0
  14. package/deploy/sema-up/kube-up.sh +1 -1
  15. package/deploy/sema-up/lib/flagshape.sh +1 -1
  16. package/deploy/sema-up/lib/helm-values-cluster.py +2 -0
  17. package/deploy/sema-up/lib/helm-values-kube.py +2 -0
  18. package/dist/adoption/import.js +3 -3
  19. package/dist/approval-ask-machine.d.ts +1 -1
  20. package/dist/approval-card.d.ts +3 -3
  21. package/dist/approval-gate-currency.d.ts +2 -2
  22. package/dist/audit.d.ts +1 -1
  23. package/dist/audit.js +2 -2
  24. package/dist/auth-bridge.d.ts +20 -0
  25. package/dist/auth-bridge.js +9 -0
  26. package/dist/background-session-reap.d.ts +2 -2
  27. package/dist/bake-runner/main.d.ts +4 -2
  28. package/dist/bind-host.d.ts +2 -3
  29. package/dist/bind-host.js +2 -4
  30. package/dist/boot/budget-tracing.js +1 -1
  31. package/dist/boot/deferred-sandbox-path-env.d.ts +5 -3
  32. package/dist/boot/deferred-sandbox-path-env.js +1 -2
  33. package/dist/boot/engine-lease.d.ts +5 -0
  34. package/dist/boot/engine-lease.js +1 -0
  35. package/dist/boot/execution-env.d.ts +8 -14
  36. package/dist/boot/execution-env.js +54 -17
  37. package/dist/boot/execution-lane.js +32 -5
  38. package/dist/boot/late-binds.d.ts +8 -4
  39. package/dist/boot/late-binds.js +7 -1
  40. package/dist/boot/memory-consolidation.d.ts +3 -2
  41. package/dist/boot/memory-consolidation.js +6 -6
  42. package/dist/boot/parked-revive-gate.d.ts +5 -5
  43. package/dist/boot/parked-revive-gate.js +2 -3
  44. package/dist/boot/reapers.d.ts +5 -0
  45. package/dist/boot/reapers.js +12 -1
  46. package/dist/boot/resolve-spec.d.ts +7 -8
  47. package/dist/boot/resolve-spec.js +80 -35
  48. package/dist/boot/retention-lane.d.ts +1 -1
  49. package/dist/boot/runner-deps.d.ts +9 -2
  50. package/dist/boot/runner-deps.js +3 -3
  51. package/dist/boot/session-age-out.d.ts +36 -0
  52. package/dist/boot/session-age-out.js +101 -0
  53. package/dist/boot/session-faces.d.ts +5 -14
  54. package/dist/boot/session-faces.js +28 -24
  55. package/dist/boot/stage-01-config.js +2 -0
  56. package/dist/boot/stage-03-store-backend.js +2 -2
  57. package/dist/boot/stage-05-execution-env.d.ts +5 -3
  58. package/dist/boot/stage-05-execution-env.js +2 -2
  59. package/dist/boot/stage-06-runners.d.ts +7 -4
  60. package/dist/boot/stage-06-runners.js +16 -8
  61. package/dist/boot/stage-07-capability-layer.d.ts +7 -4
  62. package/dist/boot/stage-07-capability-layer.js +3 -2
  63. package/dist/boot/stage-08-reapers.d.ts +7 -4
  64. package/dist/boot/stage-08-reapers.js +4 -2
  65. package/dist/boot/stage-09-leader.d.ts +11 -5
  66. package/dist/boot/stage-09-leader.js +12 -3
  67. package/dist/boot/stage-10-http-server.d.ts +44 -6
  68. package/dist/boot/stage-10-http-server.js +12 -10
  69. package/dist/boot/web-admin.d.ts +1 -1
  70. package/dist/boot/web-admin.js +3 -1
  71. package/dist/boot/workflow-orchestration.d.ts +7 -2
  72. package/dist/boot/workflow-orchestration.js +24 -7
  73. package/dist/bounded-rotation.d.ts +29 -0
  74. package/dist/bounded-rotation.js +24 -0
  75. package/dist/capability-facts.d.ts +84 -66
  76. package/dist/capability-facts.js +58 -41
  77. package/dist/center-credential.d.ts +25 -6
  78. package/dist/center-credential.js +25 -5
  79. package/dist/config-catalog.d.ts +26 -7
  80. package/dist/config-catalog.js +15 -12
  81. package/dist/config-invariants.d.ts +2 -1
  82. package/dist/config-invariants.js +4 -4
  83. package/dist/config-types.d.ts +22 -15
  84. package/dist/config.d.ts +51 -2
  85. package/dist/config.js +35 -24
  86. package/dist/deployment-governance.d.ts +7 -28
  87. package/dist/deployment-governance.js +1 -14
  88. package/dist/deployment-shape.d.ts +9 -1
  89. package/dist/deployment-shape.js +2 -1
  90. package/dist/device-protocol.d.ts +5 -4
  91. package/dist/device-protocol.js +1 -1
  92. package/dist/device-ws-hub.d.ts +1 -0
  93. package/dist/device-ws-hub.js +66 -29
  94. package/dist/device-ws-protocol.d.ts +79 -12
  95. package/dist/device-ws-protocol.js +64 -26
  96. package/dist/engine-identity.d.ts +23 -5
  97. package/dist/engine-identity.js +13 -0
  98. package/dist/entry-mode-clamp-notice.d.ts +2 -1
  99. package/dist/execution-env-refusal.d.ts +23 -0
  100. package/dist/execution-env-refusal.js +5 -0
  101. package/dist/execution-lane-caps.d.ts +3 -1
  102. package/dist/field-conflict.d.ts +3 -3
  103. package/dist/file-history-capture.d.ts +11 -4
  104. package/dist/file-history-capture.js +9 -6
  105. package/dist/file-history-disclosure.d.ts +7 -5
  106. package/dist/file-history-disclosure.js +7 -5
  107. package/dist/fleet/drain-entry.d.ts +4 -0
  108. package/dist/fleet/engine-signal.d.ts +14 -1
  109. package/dist/fleet/engine-signal.js +5 -1
  110. package/dist/fleet/fleet-reconciler.d.ts +1 -1
  111. package/dist/fleet/serving-lease.d.ts +18 -3
  112. package/dist/fleet/serving-lease.js +81 -35
  113. package/dist/fleet-client.d.ts +13 -11
  114. package/dist/fleet-client.js +53 -33
  115. package/dist/history-anchor.js +1 -1
  116. package/dist/hitl-delivery.d.ts +1 -3
  117. package/dist/hitl-delivery.js +1 -1
  118. package/dist/hooks/hook-runner.js +2 -2
  119. package/dist/host-lsp-manager.d.ts +2 -2
  120. package/dist/http/active-run-conflict.d.ts +3 -7
  121. package/dist/http/active-run-conflict.js +2 -2
  122. package/dist/http/admission.js +19 -4
  123. package/dist/http/approval-sweeps.js +7 -6
  124. package/dist/http/caller-trust.d.ts +2 -2
  125. package/dist/http/caller-trust.js +3 -3
  126. package/dist/http/checkpoint-ctx.d.ts +20 -63
  127. package/dist/http/checkpoint-ctx.js +2 -24
  128. package/dist/http/claim-heartbeat.d.ts +4 -4
  129. package/dist/http/claim-heartbeat.js +3 -3
  130. package/dist/http/dispatch.d.ts +2 -1
  131. package/dist/http/dispatch.js +36 -29
  132. package/dist/http/durable-run-leg.js +17 -17
  133. package/dist/http/health-self-report.d.ts +9 -1
  134. package/dist/http/health-self-report.js +2 -0
  135. package/dist/http/owner-access.d.ts +264 -20
  136. package/dist/http/owner-access.js +215 -5
  137. package/dist/http/readiness.d.ts +4 -2
  138. package/dist/http/resume-ctx-read.js +38 -1
  139. package/dist/http/resume-legs.d.ts +2 -1
  140. package/dist/http/resume-legs.js +273 -89
  141. package/dist/http/route-ctx.d.ts +41 -19
  142. package/dist/http/route-table.d.ts +1 -1
  143. package/dist/http/routes/a2a-serve.js +15 -14
  144. package/dist/http/routes/admin-memory-optout.d.ts +1 -1
  145. package/dist/http/routes/agents-roster.js +2 -3
  146. package/dist/http/routes/approvals-assistant.d.ts +3 -2
  147. package/dist/http/routes/approvals-assistant.js +12 -12
  148. package/dist/http/routes/background.d.ts +3 -3
  149. package/dist/http/routes/capabilities.js +10 -6
  150. package/dist/http/routes/config-catalog.d.ts +1 -1
  151. package/dist/http/routes/fleet.js +10 -8
  152. package/dist/http/routes/mcp-reconnect.js +2 -2
  153. package/dist/http/routes/memory-origin.d.ts +1 -1
  154. package/dist/http/routes/notify-wake.js +2 -3
  155. package/dist/http/routes/projects.d.ts +4 -2
  156. package/dist/http/routes/projects.js +7 -6
  157. package/dist/http/routes/retention-ops.d.ts +1 -1
  158. package/dist/http/routes/run-permission-mode.d.ts +1 -1
  159. package/dist/http/routes/run-permission-mode.js +2 -2
  160. package/dist/http/routes/runs.d.ts +1 -1
  161. package/dist/http/routes/runs.js +125 -66
  162. package/dist/http/routes/session-memory-sync.js +4 -5
  163. package/dist/http/routes/session-sync.d.ts +4 -3
  164. package/dist/http/routes/session-sync.js +174 -83
  165. package/dist/http/routes/sessions-list.js +13 -7
  166. package/dist/http/routes/sessions.d.ts +1 -1
  167. package/dist/http/routes/sessions.js +26 -48
  168. package/dist/http/routes/tasks.js +38 -23
  169. package/dist/http/routes/trace-usage.js +14 -14
  170. package/dist/http/routes/workflows.d.ts +1 -0
  171. package/dist/http/routes/workflows.js +20 -38
  172. package/dist/http/server.d.ts +28 -30
  173. package/dist/http/server.js +7 -3
  174. package/dist/http/stored-body-replay.d.ts +3 -24
  175. package/dist/http/stored-body-replay.js +2 -12
  176. package/dist/http/submit-ctx.d.ts +1 -2
  177. package/dist/http/submit-ctx.js +8 -6
  178. package/dist/http/submit-replay.d.ts +15 -2
  179. package/dist/http/submit-replay.js +10 -4
  180. package/dist/http/wire-types.d.ts +19 -6
  181. package/dist/identity-source.d.ts +20 -3
  182. package/dist/identity-source.js +14 -0
  183. package/dist/index.d.ts +4 -0
  184. package/dist/lane-home-probe.d.ts +3 -7
  185. package/dist/lane-home-probe.js +0 -1
  186. package/dist/leader/endpoint.js +9 -8
  187. package/dist/leader/leader.d.ts +2 -1
  188. package/dist/leg-facts.d.ts +19 -5
  189. package/dist/leg-facts.js +3 -1
  190. package/dist/mcp-authorization-face.d.ts +18 -14
  191. package/dist/mcp-authorization-face.js +3 -2
  192. package/dist/memory-scope.d.ts +5 -4
  193. package/dist/memory-scope.js +4 -4
  194. package/dist/memory-store-refusal.d.ts +1 -1
  195. package/dist/memory-sync-client.d.ts +30 -2
  196. package/dist/memory-sync-client.js +16 -9
  197. package/dist/observability/corrupt-read-seat.d.ts +1 -1
  198. package/dist/observability/err-text.d.ts +7 -0
  199. package/dist/observability/err-text.js +5 -0
  200. package/dist/observability/fail-open.d.ts +12 -8
  201. package/dist/observability/fail-open.js +12 -8
  202. package/dist/observability/logger.d.ts +7 -0
  203. package/dist/observability/logger.js +3 -1
  204. package/dist/observability/metrics.js +1 -0
  205. package/dist/observability/run-terminal.d.ts +1 -1
  206. package/dist/orchestration/workflow-notify-journal.d.ts +18 -1
  207. package/dist/orchestration/workflow-notify-journal.js +12 -1
  208. package/dist/orchestration/workflow-park-decision.d.ts +70 -18
  209. package/dist/orchestration/workflow-park-decision.js +49 -10
  210. package/dist/orchestration/workflow-park-holder.d.ts +65 -0
  211. package/dist/orchestration/workflow-park-holder.js +98 -0
  212. package/dist/orchestration/workflow-record-fence.d.ts +36 -0
  213. package/dist/orchestration/workflow-record-fence.js +42 -0
  214. package/dist/owner-faces.d.ts +28 -4
  215. package/dist/owner-faces.js +2 -0
  216. package/dist/parked-decide.d.ts +104 -53
  217. package/dist/parked-decide.js +153 -117
  218. package/dist/peer-directory.d.ts +2 -2
  219. package/dist/peer-inbound-face.d.ts +2 -6
  220. package/dist/peer-inbound-face.js +0 -3
  221. package/dist/peer-seat.d.ts +1 -1
  222. package/dist/peer-seat.js +52 -59
  223. package/dist/permission-mode-admission.d.ts +41 -5
  224. package/dist/permission-mode-admission.js +29 -3
  225. package/dist/plugins/adoption-log-sql.d.ts +3 -1
  226. package/dist/plugins/adoption-log-sql.js +7 -1
  227. package/dist/plugins/approval-ask-store-file.d.ts +10 -2
  228. package/dist/plugins/approval-ask-store-file.js +8 -0
  229. package/dist/plugins/approval-ask-store-memory.d.ts +6 -1
  230. package/dist/plugins/approval-ask-store-memory.js +28 -9
  231. package/dist/plugins/approval-ask-store-sql.d.ts +43 -2
  232. package/dist/plugins/approval-ask-store-sql.js +34 -5
  233. package/dist/plugins/approval-exemption-store.js +3 -0
  234. package/dist/plugins/approval-nonce-store.js +2 -0
  235. package/dist/plugins/breaker-state-sql.js +2 -0
  236. package/dist/plugins/caching-session-store.d.ts +9 -15
  237. package/dist/plugins/caching-session-store.js +6 -0
  238. package/dist/plugins/device-store-sql.js +6 -0
  239. package/dist/plugins/error-origin.d.ts +18 -0
  240. package/dist/plugins/error-origin.js +10 -0
  241. package/dist/plugins/exec-path-law.d.ts +34 -0
  242. package/dist/plugins/exec-path-law.js +13 -0
  243. package/dist/plugins/execution-placement-sql.js +6 -6
  244. package/dist/plugins/file-run-store.js +1 -1
  245. package/dist/plugins/image-bake-store-sql.js +6 -0
  246. package/dist/plugins/image-index-sql.js +4 -0
  247. package/dist/plugins/landed-attendants.d.ts +212 -0
  248. package/dist/plugins/landed-attendants.js +161 -0
  249. package/dist/plugins/leader-run-store-sql.js +4 -0
  250. package/dist/plugins/local-checkpoint-store.d.ts +4 -1
  251. package/dist/plugins/local-checkpoint-store.js +3 -0
  252. package/dist/plugins/local-session-live-reference.d.ts +40 -0
  253. package/dist/plugins/local-session-live-reference.js +39 -0
  254. package/dist/plugins/local-session-store.d.ts +71 -33
  255. package/dist/plugins/local-session-store.js +129 -27
  256. package/dist/plugins/memory-engine-pg.js +4 -0
  257. package/dist/plugins/memory-engine-sql-apply.js +5 -2
  258. package/dist/plugins/memory-engine-tidb.js +4 -0
  259. package/dist/plugins/memory-optout-grant-store-sql.js +4 -0
  260. package/dist/plugins/memory-run-store.js +1 -1
  261. package/dist/plugins/memory-sync-store-pg.js +5 -0
  262. package/dist/plugins/memory-sync-store-tidb.js +5 -0
  263. package/dist/plugins/one-time-migrations.d.ts +80 -61
  264. package/dist/plugins/one-time-migrations.js +241 -104
  265. package/dist/plugins/org-delivery-quota-store.js +4 -1
  266. package/dist/plugins/outcome-ledger-sql.js +2 -0
  267. package/dist/plugins/permission-rule-store-sql.js +11 -4
  268. package/dist/plugins/pg-cost-quota.js +4 -0
  269. package/dist/plugins/pg-pool.js +28 -1
  270. package/dist/plugins/pg-rate-limiter.js +2 -0
  271. package/dist/plugins/posix-shell-fs.d.ts +6 -1
  272. package/dist/plugins/posix-shell-fs.js +8 -3
  273. package/dist/plugins/remote-env-adb.d.ts +19 -15
  274. package/dist/plugins/remote-env-adb.js +44 -17
  275. package/dist/plugins/remote-env-connect-seat.d.ts +105 -0
  276. package/dist/plugins/remote-env-connect-seat.js +72 -0
  277. package/dist/plugins/remote-env-device.d.ts +22 -5
  278. package/dist/plugins/remote-env-device.js +114 -14
  279. package/dist/plugins/remote-env-e2b.d.ts +18 -7
  280. package/dist/plugins/remote-env-e2b.js +53 -40
  281. package/dist/plugins/remote-env-file-error.js +6 -2
  282. package/dist/plugins/remote-env-host.d.ts +18 -1
  283. package/dist/plugins/remote-env-host.js +48 -47
  284. package/dist/plugins/remote-env-k8s.d.ts +41 -39
  285. package/dist/plugins/remote-env-k8s.js +56 -32
  286. package/dist/plugins/remote-env-local-docker.d.ts +13 -8
  287. package/dist/plugins/remote-env-local-docker.js +37 -43
  288. package/dist/plugins/remote-env-ssh.d.ts +18 -12
  289. package/dist/plugins/remote-env-ssh.js +64 -62
  290. package/dist/plugins/remote-shell.d.ts +101 -2
  291. package/dist/plugins/remote-shell.js +221 -3
  292. package/dist/plugins/replica-registration.d.ts +35 -0
  293. package/dist/plugins/replica-registration.js +48 -0
  294. package/dist/plugins/resume-anchor-store-sql.d.ts +11 -2
  295. package/dist/plugins/resume-anchor-store-sql.js +12 -5
  296. package/dist/plugins/retention-lane-store-sql.d.ts +1 -1
  297. package/dist/plugins/retention-lane-store-sql.js +4 -0
  298. package/dist/plugins/retention-sql.d.ts +20 -2
  299. package/dist/plugins/retention-sql.js +11 -0
  300. package/dist/plugins/run-store-sql.d.ts +22 -3
  301. package/dist/plugins/run-store-sql.js +33 -9
  302. package/dist/plugins/scenario-prefix-switch-m42.d.ts +6 -12
  303. package/dist/plugins/scenario-prefix-switch-m42.js +7 -5
  304. package/dist/plugins/schema-consistency.d.ts +9 -5
  305. package/dist/plugins/schema-consistency.js +48 -18
  306. package/dist/plugins/schema-drift-sentence.js +1 -1
  307. package/dist/plugins/send-file-ledger.js +3 -0
  308. package/dist/plugins/serving-requirement.d.ts +68 -0
  309. package/dist/plugins/serving-requirement.js +60 -0
  310. package/dist/plugins/session-birth.d.ts +6 -2
  311. package/dist/plugins/session-capture-record-store-sql.js +2 -0
  312. package/dist/plugins/session-ext-table.d.ts +14 -1
  313. package/dist/plugins/session-ext-table.js +5 -1
  314. package/dist/plugins/session-row-sql.d.ts +49 -2
  315. package/dist/plugins/session-row-sql.js +56 -13
  316. package/dist/plugins/session-store-sql.d.ts +34 -18
  317. package/dist/plugins/session-store-sql.js +98 -17
  318. package/dist/plugins/shared-memory-store-sql.d.ts +1 -0
  319. package/dist/plugins/shared-memory-store-sql.js +6 -2
  320. package/dist/plugins/sql-driver.d.ts +2 -1
  321. package/dist/plugins/sql-driver.js +18 -3
  322. package/dist/plugins/sql-errors.d.ts +11 -6
  323. package/dist/plugins/sql-errors.js +5 -6
  324. package/dist/plugins/stop-then-start-sentence.d.ts +48 -3
  325. package/dist/plugins/stop-then-start-sentence.js +48 -0
  326. package/dist/plugins/stop-then-start.d.ts +109 -0
  327. package/dist/plugins/stop-then-start.js +104 -0
  328. package/dist/plugins/store-backend.d.ts +40 -13
  329. package/dist/plugins/store-backend.js +169 -27
  330. package/dist/plugins/store-boundary.d.ts +57 -0
  331. package/dist/plugins/store-boundary.js +139 -0
  332. package/dist/plugins/store-contracts.d.ts +29 -2
  333. package/dist/plugins/store-contracts.js +3 -0
  334. package/dist/plugins/store-fault-sentence-m53.d.ts +7 -0
  335. package/dist/plugins/store-fault-sentence-m53.js +25 -0
  336. package/dist/plugins/store-fault.d.ts +26 -7
  337. package/dist/plugins/store-fault.js +18 -2
  338. package/dist/plugins/task-attachment-store.js +9 -0
  339. package/dist/plugins/task-list-store-sql.d.ts +2 -2
  340. package/dist/plugins/task-list-store-sql.js +10 -8
  341. package/dist/plugins/tidb-cost-quota.js +4 -0
  342. package/dist/plugins/tidb-pool.js +6 -1
  343. package/dist/plugins/tidb-rate-limiter.js +4 -0
  344. package/dist/plugins/user-input-ledger-sql.js +4 -0
  345. package/dist/plugins/workflow-run-store-sql.d.ts +28 -10
  346. package/dist/plugins/workflow-run-store-sql.js +64 -4
  347. package/dist/plugins/workspace-fill.d.ts +4 -7
  348. package/dist/plugins/workspace-fill.js +2 -1
  349. package/dist/plugins/write-behind-counter.js +5 -0
  350. package/dist/process-instance.d.ts +3 -0
  351. package/dist/process-instance.js +7 -0
  352. package/dist/project-context.d.ts +64 -0
  353. package/dist/project-context.js +66 -0
  354. package/dist/project-registry.d.ts +46 -0
  355. package/dist/project-registry.js +44 -0
  356. package/dist/question.d.ts +9 -21
  357. package/dist/question.js +28 -19
  358. package/dist/request-key-closure.js +1 -1
  359. package/dist/request-value-closure.d.ts +4 -0
  360. package/dist/request-value-closure.js +10 -0
  361. package/dist/run-acceptance.d.ts +3 -2
  362. package/dist/run-acceptance.js +4 -6
  363. package/dist/run-cancel-card.d.ts +1 -1
  364. package/dist/run-cancel-card.js +2 -1
  365. package/dist/run-local.js +1 -0
  366. package/dist/runs.d.ts +37 -8
  367. package/dist/runs.js +53 -12
  368. package/dist/runtime-governance.d.ts +5 -4
  369. package/dist/security.d.ts +31 -33
  370. package/dist/security.js +41 -7
  371. package/dist/server-secret-env.d.ts +12 -10
  372. package/dist/server-secret-env.js +24 -15
  373. package/dist/session-agent.d.ts +1 -10
  374. package/dist/session-agent.js +0 -6
  375. package/dist/session-bindings.d.ts +82 -0
  376. package/dist/session-bindings.js +18 -0
  377. package/dist/session-children-retire.d.ts +2 -2
  378. package/dist/session-children-retire.js +2 -6
  379. package/dist/session-deletion.d.ts +16 -1
  380. package/dist/session-error-wire.d.ts +3 -3
  381. package/dist/session-error-wire.js +3 -3
  382. package/dist/session-incarnation.d.ts +28 -4
  383. package/dist/session-incarnation.js +14 -2
  384. package/dist/session-kind.d.ts +57 -0
  385. package/dist/session-kind.js +22 -0
  386. package/dist/session-notify-door.d.ts +4 -4
  387. package/dist/session-notify-door.js +5 -6
  388. package/dist/session-row.d.ts +21 -1
  389. package/dist/session-row.js +7 -1
  390. package/dist/session-rules-seat.d.ts +4 -3
  391. package/dist/session-rules-seat.js +3 -11
  392. package/dist/session-sync-kernel.d.ts +24 -14
  393. package/dist/session-sync-kernel.js +3 -6
  394. package/dist/session-sync.d.ts +4 -98
  395. package/dist/session-sync.js +4 -74
  396. package/dist/session-titler.d.ts +10 -3
  397. package/dist/session-titler.js +19 -6
  398. package/dist/ssh-host-key.d.ts +5 -0
  399. package/dist/ssh-host-key.js +3 -0
  400. package/dist/stores-sql/checkpoint-store-sql.d.ts +21 -2
  401. package/dist/stores-sql/checkpoint-store-sql.js +106 -18
  402. package/dist/stores-sql/file-history-store-sql.d.ts +52 -2
  403. package/dist/stores-sql/file-history-store-sql.js +108 -70
  404. package/dist/stores-sql/pg-session-storage.d.ts +34 -7
  405. package/dist/stores-sql/pg-session-storage.js +37 -13
  406. package/dist/stores-sql/retention-store-sql.d.ts +2 -10
  407. package/dist/stores-sql/retention-store-sql.js +2 -10
  408. package/dist/stores-sql/session-policy-store-sql.d.ts +30 -7
  409. package/dist/stores-sql/session-policy-store-sql.js +61 -44
  410. package/dist/stores-sql/session-write-hooks.d.ts +11 -0
  411. package/dist/stores-sql/tidb-session-store.d.ts +58 -7
  412. package/dist/stores-sql/tidb-session-store.js +37 -13
  413. package/dist/submission-exit.d.ts +3 -2
  414. package/dist/submission-exit.js +9 -1
  415. package/dist/task-cwd.d.ts +6 -5
  416. package/dist/task-settings.d.ts +19 -5
  417. package/dist/task-settings.js +13 -7
  418. package/dist/terminal.d.ts +33 -2
  419. package/dist/terminal.js +139 -9
  420. package/dist/tool-approval.d.ts +147 -12
  421. package/dist/tool-approval.js +206 -109
  422. package/dist/trace/engine-notice-wire.d.ts +14 -0
  423. package/dist/trace/engine-notice-wire.js +18 -1
  424. package/dist/trace/project.d.ts +4 -3
  425. package/dist/trace/project.js +3 -2
  426. package/dist/trace/projection-table.d.ts +33 -2
  427. package/dist/trace/self-minted-wire.d.ts +422 -26
  428. package/dist/trace/self-minted-wire.js +149 -23
  429. package/dist/trace/tool-card.d.ts +3 -0
  430. package/dist/trace/tool-card.js +24 -0
  431. package/dist/trace/tool-output-media.d.ts +2 -1
  432. package/dist/unattended-permission-mode.d.ts +1 -1
  433. package/dist/web-admin-client/apply-effective.d.ts +1 -1
  434. package/dist/web-admin-client/effective-keys.d.ts +1 -1
  435. package/dist/web-admin-client/skills-mcp.d.ts +1 -1
  436. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +120 -41
  437. package/package.json +3 -3
  438. package/wire-changes/server@7.150.0.json +335 -0
  439. package/wire-changes/server@7.151.0.json +762 -0
  440. package/dist/http/session-inherit-env.d.ts +0 -36
  441. package/dist/http/session-inherit-env.js +0 -6
@@ -254,6 +254,22 @@ export const SELF_MINTED_WIRE = {
254
254
  absent: { attr: "-", since: "7.121.0" },
255
255
  },
256
256
  },
257
+ healthCenterKey: {
258
+ at: "GET /health center",
259
+ members: {
260
+ issuer: { attr: "present-iff auth bridge configured", since: "7.121.0" },
261
+ webBaseUrl: { attr: "present-iff the center web console base is configured", since: "7.121.0" },
262
+ sessionsVisible: { attr: "always", since: "7.121.0" },
263
+ assertionToken: { attr: "present-iff center configured", since: "7.151.0" },
264
+ },
265
+ },
266
+ healthAssertionToken: {
267
+ at: "GET /health center.assertionToken",
268
+ members: {
269
+ declared: { attr: "-", since: "7.151.0" },
270
+ absent: { attr: "-", since: "7.151.0" },
271
+ },
272
+ },
257
273
  healthSessionsVisible: {
258
274
  at: "GET /health center.sessionsVisible",
259
275
  members: {
@@ -287,6 +303,31 @@ export const SELF_MINTED_WIRE = {
287
303
  waiting: { attr: "always within sandboxCapacity", since: "7.148.0" },
288
304
  },
289
305
  },
306
+ listeningLineKey: {
307
+ at: "stdout 启动协议行 listening(<键> → 在场律)",
308
+ members: {
309
+ port: { attr: "always", since: "1.214.2" },
310
+ bindHost: { attr: "always", since: "1.306.0" },
311
+ bindHostNote: { attr: "present-iff BIND_HOST unset and the bind was narrowed to loopback (unauthenticated write face)", since: "3.15.0" },
312
+ boundAddress: { attr: "always", since: "7.150.0" },
313
+ model: { attr: "always", since: "1.214.2" },
314
+ brain: { attr: "always", since: "1.214.2" },
315
+ breakerState: { attr: "always", since: "1.214.2" },
316
+ session: { attr: "always", since: "1.214.2" },
317
+ memory: { attr: "always", since: "1.214.2" },
318
+ instanceId: { attr: "always", since: "1.214.2" },
319
+ rateLimitPerMin: { attr: "always", since: "1.214.2" },
320
+ rateLimit: { attr: "always", since: "1.214.2" },
321
+ maxPrincipalCostUsd: { attr: "always", since: "1.214.2" },
322
+ costQuota: { attr: "always", since: "1.214.2" },
323
+ toolResultStore: { attr: "always", since: "1.214.2" },
324
+ otel: { attr: "always", since: "1.214.2" },
325
+ perModelKeys: { attr: "always", since: "1.214.2" },
326
+ sealedModelKeys: { attr: "always", since: "1.214.2" },
327
+ sealedPoisonedModels: { attr: "always", since: "1.214.2" },
328
+ workflowRunStore: { attr: "always", since: "1.214.2" },
329
+ },
330
+ },
290
331
  healthStoreKey: {
291
332
  at: "GET /health store",
292
333
  members: {
@@ -316,6 +357,7 @@ export const SELF_MINTED_WIRE = {
316
357
  tickMs: { attr: "present-iff engine lease leg armed and observing", since: "7.141.0" },
317
358
  firstAttach: { attr: "present-iff engineLease present and the owned window is finite", since: "7.146.0" },
318
359
  lane: { attr: "always within engineLease", since: "7.146.0" },
360
+ attached: { attr: "always within engineLease (open SSE attach stream count on this replica; 0 is legal for a polling-only shell)", since: "7.151.0" },
319
361
  handover: { attr: "present-iff lane is handover", since: "7.146.0" },
320
362
  },
321
363
  },
@@ -404,6 +446,13 @@ export const SELF_MINTED_WIRE = {
404
446
  members: {
405
447
  rowTag: { attr: "present-iff the row can be written conditionally (the store has the row write primitive and the row carries an incarnation)", since: "7.139.0" },
406
448
  unreadable: { attr: "present-iff the session head's leaf cannot be read (the file backend: the archive header is corrupt / truncated, or the archive cannot be read); the SQL backends never carry it; PATCH answers 500 for such a session before writing, so its 200 / 409 rows never carry it", since: "7.142.0" },
449
+ sessionKind: { attr: "present-iff the session was created by a submission that declared sessionKind (the default view lists only sessions without one)", since: "7.151.0" },
450
+ },
451
+ },
452
+ sessionKind: {
453
+ at: "POST /v1/tasks · /v1/tasks/stream · /v1/runs 体 sessionKind = GET /v1/sessions?sessionKind= = sessions[].sessionKind = GET /v1/sessions/:id sessionKind = GET /v1/capabilities sessionKinds[](<词> → -)",
454
+ members: {
455
+ sidechain: { attr: "-", since: "7.151.0" },
407
456
  },
408
457
  },
409
458
  projectRowKey: {
@@ -421,6 +470,7 @@ export const SELF_MINTED_WIRE = {
421
470
  registeredBy: { attr: "always", since: "7.147.0" },
422
471
  registeredAt: { attr: "always", since: "7.147.0" },
423
472
  archivedAt: { attr: "present-iff archived", since: "7.147.0" },
473
+ contentAttestedAt: { attr: "present-iff the registration carries the configuration center's content attestation (settings-schema 25.1.0; the time the center's write path last admitted the project's goal / notes / contextItems under the publisher role)", since: "7.150.0" },
424
474
  },
425
475
  },
426
476
  projectsListBodyKey: {
@@ -433,6 +483,7 @@ export const SELF_MINTED_WIRE = {
433
483
  at: "GET /v1/sessions/:id 体顶层键(本版新出现;<键> → 在场律)",
434
484
  members: {
435
485
  projectId: { attr: "present-iff the session row's last own workspace_changed frame carried a project", since: "7.147.0" },
486
+ sessionKind: { attr: "present-iff the session was created by a submission that declared sessionKind", since: "7.151.0" },
436
487
  },
437
488
  },
438
489
  sessionsListRowUnreadableKey: {
@@ -481,8 +532,14 @@ export const SELF_MINTED_WIRE = {
481
532
  at: "MCP 授权记录 authorization 的出现面(<面>#<键> → 在场律)",
482
533
  members: {
483
534
  "wiring_manifest.mcp[]#authorization": { attr: "present-iff errorCode unauthorized", since: "7.138.0" },
535
+ "GET /v1/sessions/:id/mcp#lastLegMcp.mcp[].authorization": { attr: "present-iff errorCode unauthorized", since: "7.138.0" },
536
+ "GET /v1/capabilities/mcp#servers[].authorization": { attr: "present-iff errorCode unauthorized", since: "7.138.0" },
537
+ "POST /v1/capabilities/mcp/probe#servers[].authorization": { attr: "present-iff errorCode unauthorized", since: "7.138.0" },
484
538
  "POST /v1/sessions/:id/mcp/reconnect#status.authorization": { attr: "present-iff errorCode unauthorized", since: "7.138.0" },
485
539
  "GET /v1/sessions/:id/mcp#servers[].authorization": { attr: "present-iff server unauthorized (this face carries no errorCode)", since: "7.138.0" },
540
+ "GET /v1/sessions/:id#messages[].details.authorization": { attr: "present-iff details.code unauthorized", since: "7.138.0" },
541
+ "SSE tool_end#structured.authorization": { attr: "present-iff structured.code unauthorized and reason in the closed set; members = reason", since: "7.138.0" },
542
+ "GET /v1/runs/:id/events#tool_end.structured.authorization": { attr: "present-iff structured.code unauthorized and reason in the closed set; members = reason", since: "7.138.0" },
486
543
  },
487
544
  },
488
545
  wiringModProvenance: {
@@ -505,12 +562,12 @@ export const SELF_MINTED_WIRE = {
505
562
  cascade_verify: { attr: "-", since: "7.148.0" },
506
563
  image_profile: { attr: "-", since: "7.148.0" },
507
564
  resume_anchor: { attr: "-", since: "7.148.0" },
508
- system_prompt_fold: { attr: "-", since: "7.148.0" },
565
+ system_prompt_fold: { attr: "fields in fold order from appendSystemPrompt / projectId (the inherited project brief) / settings.outputStyle; count / cap", since: "7.150.0" },
509
566
  file_history_restore: { attr: "-", since: "7.148.0" },
510
567
  skills_disabled: { attr: "-", since: "7.148.0" },
511
568
  existing_session: { attr: "-", since: "7.148.0" },
512
569
  fork_target: { attr: "-", since: "7.148.0" },
513
- scratchpad_root: { attr: "-", since: "7.148.0" },
570
+ scratchpad_root: { attr: "fields = cwd (sent) or projectId (inherited from the project), then scratchpadDir when the request's own covers it", since: "7.150.0" },
514
571
  ask_answer: { attr: "-", since: "7.148.0" },
515
572
  policy_person_ask: { attr: "-", since: "7.148.0" },
516
573
  plan_edit: { attr: "-", since: "7.148.0" },
@@ -571,14 +628,23 @@ export const SELF_MINTED_WIRE = {
571
628
  },
572
629
  },
573
630
  workflowParkDeliveryResult: {
574
- at: "POST /v1/approvals/:id/decide · 应答口(workflow 子代停驻卡,持有它的 run 在本进程里跑):引擎答词 → 应答",
631
+ at: "POST /v1/approvals/:id/decide · 应答口(workflow 子代停驻卡,持有它的 run 读作 running、决定行已在记录栅栏里立住):引擎答词 → 应答",
575
632
  members: {
576
633
  driving: { attr: "200 {taskId: <workflow runId>, status: resuming, decision}(无结清证据)", since: "7.148.0" },
577
- already_taken: { attr: "同一决定 ⇒ 首张回执原样回放;另一个决定 ⇒ 409 decide.claim_lost", since: "7.148.0" },
634
+ already_taken: { attr: "200 同一张回执(单一仲裁之下 run 收下过的只可能是这同一个决定)", since: "7.151.0" },
578
635
  settled: { attr: "409 decide.gate_moved", since: "7.148.0" },
579
- not_parked_here: { attr: "409 decide.gate_moved", since: "7.148.0" },
580
- unreadable: { attr: "503 decide.store_unreachable", since: "7.148.0" },
581
- kept_parked: { attr: "400 decide.parked_restatement_unsupported(只在决断带续跑重述键时可达)", since: "7.148.0" },
636
+ not_parked_here: { attr: "200 同一张回执(决定已立住;run 收场后由收场送达交给宿主会话的下一跑)", since: "7.151.0" },
637
+ unreadable: { attr: "200 同一张回执(决定已立住;持有进程在下一个维护拍再交)", since: "7.151.0" },
638
+ kept_parked: { attr: "不可达(恒送决定;重述键在记录栅栏里判 ⇒ 400 decide.parked_restatement_unsupported)", since: "7.151.0" },
639
+ },
640
+ },
641
+ workflowParkDeliveryKind: {
642
+ at: "POST /v1/approvals/:id/decide · 应答口(workflow 子代停驻卡,持有它的 run 读作 running、决定行已在记录栅栏里立住):引擎答形 → 应答",
643
+ members: {
644
+ live: { attr: "按 results[0] 答(集 workflowParkDeliveryResult)", since: "7.148.0" },
645
+ suspending: { attr: "200 {taskId: <workflow runId>, status: resuming, decision}(决定已立住;run 收场后由收场送达交给宿主会话的下一跑)", since: "7.151.0" },
646
+ not_active: { attr: "200 {taskId: <workflow runId>, status: resuming, decision}(决定已立住;持有进程在下一个维护拍交,或 run 收场后由收场送达交)", since: "7.151.0" },
647
+ not_armed: { attr: "500(引擎不变量破:没有 checkpoint 座的 run 停驻不出这张卡)", since: "7.148.0" },
582
648
  },
583
649
  },
584
650
  settingsEnvCredentialMatch: {
@@ -885,6 +951,8 @@ export const SELF_MINTED_WIRE = {
885
951
  "POST /v1/tool-approvals/:id/respond#edited_rule_text_refused_after_adoption(匿名活卡收编给具名主体后新属主交坏规则文本;体 request.body_shape;契约成文的判据,今天经 /v1/adoption 到不了)": { attr: 400, since: "7.136.0" },
886
952
  "POST /v1/tasks|/v1/runs#command_line_slots_without_sealed_key_store(stdio MCP 的 command / args 与 command hook 的 command / args;体 conflict.checkpoint_ctx_unsealable + field + reason no_key_store;POST /v1/tasks/stream 在终局帧上带本码;本服务自己的装配下不可达(装配期已对「店在而封签器缺席」拒启,见 submit-ctx.ts 自述))": { attr: 409, since: "7.136.0" },
887
953
  "ALL authenticated routes#bearer_token_without_scope_claim(鉴权桥验证腿;配了 service 凭据或多租 REQUIRE_PRINCIPAL 的部署;体通用 auth.unauthorized)": { attr: 401, since: "7.136.0" },
954
+ "ALL routes after the auth-bridge pre-authentication (not GET /health)#sso_token_foreign_scope(fleet 成员 FLEET_GENERATION 在场;验过签的登记中心登录令牌 scope ≠ FLEET_SCOPE〔缺席 = 缺省 scope〕;同一枚 Bearer 是本部署 service 凭据的不在此列;体 auth.scope_mismatch)": { attr: 403, since: "7.151.0" },
955
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs|其余 fail-closed 写口(计费提交 · bake · 改写门 · 破坏性会话写)与 POST /v1/tool-approvals/:id/respond 的停驻赎回臂#verified_sign_in_token_without_service_credential(部署只接了鉴权桥 —— AUTH_BRIDGE_ISSUER 或接了中心的回退 issuer —— 没配 SERVICE_AUTH_TOKEN(S)、没开 ALLOW_UNAUTHED_WRITES;请求出示鉴权桥验过的登记中心登录令牌;没带过门凭据的请求仍 503)": { attr: "该口自己的受理(POST /v1/runs 202 · POST /v1/tasks 同步 200 …)", revises: ["errorCode:auth.service_token_required"], since: "7.151.0" },
888
956
  "ALL principal-reading routes#principal_not_a_name(主体头 / SSO 令牌的 sub / 直连门 JWT 的 sub 不是一位主体的名字:空 / 空白 / 带控制、行段分隔或不可见格式字符;体 principal_not_a_name)": { attr: 400, since: "7.137.0" },
889
957
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#promptProfile(新提交;体 request.body_shape + unknownKeys [promptProfile])": { attr: 400, since: "7.137.0" },
890
958
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#skills[i].mods|agents[i].skills[j].mods(新提交;体 request.field_invalid)": { attr: 400, since: "7.137.0" },
@@ -947,23 +1015,39 @@ export const SELF_MINTED_WIRE = {
947
1015
  "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#stored_unread_members(续跑将要跑的那一份体 —— 存量体,重述键在场时盖过重述之后 —— 里有本版读者读不出、而本部署本会采纳的成员:settings.hooks / settings.env / 其余 settings 延后键 / mcpServers[i].transport / a2aPeers[i].headers;认领之前,卡仍待决;体 resume_blocked_by_policy + blockedBy request.field_invalid + field + retriable)": { attr: 409, since: "7.147.0" },
948
1016
  "POST /v1/runs/:id/steer#stored_unread_members(run 已终态、铸唤醒卡之前;同一只判;不铸卡;体 resume_blocked_by_policy + blockedBy request.field_invalid + field,不带 retriable)": { attr: 409, since: "7.147.0" },
949
1017
  "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review|/v1/runs/:id/steer|/v1/runs/:id/permission-mode#resume_context_read_failed(读这条会话的续跑上下文失败:库断连 / 拒连 / 超时、缺表 / 权限拒、认不出的库错;拒在任何状态改动之前,卡仍待决、终态 steer 不铸卡;体 state.resume_context_unreadable)": { attr: 503, since: "7.148.0" },
950
- "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#resume_claim_store_fault(认领之前那一次执行席读、认领那一笔 —— markResuming / wake 现建行的 createRun —— 或认领之后提交执行放置那一次店往返失败:库断连 / 拒连 / 超时、缺表 / 权限拒、认不出的库错;认领之后那一形续跑认领的停驻行回到认领之前的停驻词、认领留着,wake 现建的行删掉;卡仍待决;体 state.resume_context_unreadable)": { attr: 503, revises: ["errorCode:internal.error"], since: "7.149.0" },
951
- "POST /v1/runs/:id/cancel#parked_card_body_scope_differs(停驻 run 上的取消:这张卡行体里自带的属主格与店的属主格不一致 —— 取消只读店的属主格,结算这张卡、驱 run 终局;体 { taskId, status: failed, errorCode: cancelled, cancelRequested: false, note })": { attr: 202, revises: ["errorCode:conflict.approval_settled"], since: "7.149.0" },
952
- "POST /v1/runs/:id/cancel#parked_card_body_unreadable(停驻 run 上的取消:这张卡的行体读不成检查点 —— 取消只读店的列,结算这张卡、驱 run 终局;体同上)": { attr: 202, revises: ["errorCode:internal.error"], since: "7.149.0" },
1018
+ "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#resume_claim_store_fault(认领之前那一次执行席读、认领那一笔 —— markResuming / wake 现建行的 createRun —— 或认领之后提交执行放置那一次店往返失败:库断连 / 拒连 / 超时、缺表 / 权限拒、认不出的库错;认领之后那一形续跑认领的停驻行回到认领之前的停驻词、认领留着,wake 现建的行删掉;卡仍待决;体 state.resume_context_unreadable)": { attr: 503, since: "7.149.0" },
1019
+ "POST /v1/runs/:id/cancel#parked_card_body_scope_differs(停驻 run 上的取消:这张卡行体里自带的属主格与店的属主格不一致 —— 取消只读店的属主格,结算这张卡、驱 run 终局;体 { taskId, status: failed, errorCode: cancelled, cancelRequested: false, note })": { attr: 202, since: "7.149.0" },
1020
+ "POST /v1/runs/:id/cancel#parked_card_body_unreadable(停驻 run 上的取消:这张卡的行体读不成检查点 —— 取消只读店的列,结算这张卡、驱 run 终局;体同上)": { attr: 202, since: "7.149.0" },
953
1021
  "POST /v1/approvals/:sessionId/decide#parked_agent_definition_unavailable(停驻赎回;行上的代理类型不在赎回面委派工具的名册里:逐请求 `agents` 定义 / 停驻后被撤的部署定义 / 名叫 fork 的定义;approve 与 deny 同答;认领回滚、委派工具零调用、卡仍待决;体 decide.agent_definition_unavailable + taskId + rollback)": { attr: 409, since: "7.148.0" },
954
- "POST /v1/tasks|/v1/tasks/stream|/v1/runs#run_claim_store_fault(新提交:认领之前那一次执行席读,或认领这一段 —— 建行认领 createRun、执行放置、续跑输入的写、起跑之前的认领复核 —— 有一次店往返没答出来:库断连 / 拒连 / 超时、缺表 / 权限拒、认不出的库错;本请求铸的行已删掉 —— 认领与幂等键随行去,同一个自带 taskId 重发即新提交 —— 什么都没起跑;认领之后的流式腿 = 流的终帧;已绑设备的会话上认领之后那一次执行席读同答;体 state.run_store_unavailable)": { attr: 503, revises: ["errorCode:internal.error", "errorCode:device.not_bound"], since: "7.149.0" },
955
- "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#resume_pre_engine_store_fault(续跑腿提交放行之后、交给引擎之前那一段 —— 排空 workflow 完成的序号基址现读与落账、通告口落账 —— 店往返没答出来;续跑认领的停驻行回到停驻、认领留着,wake 现建的行删掉;卡仍待决;体 state.resume_context_unreadable)": { attr: 503, revises: ["errorCode:internal.error"], since: "7.149.0" },
956
- "POST /v1/approvals/:sessionId/decide#workflow_host_turn_claim_store_fault(workflow 决定在宿主会话上起的新一跑:建行认领 / 执行放置 / 续跑输入 / 决定落行 / 起跑之前的认领复核有一次店往返没答出来;决定落行那一笔在 wake 腿上同答;现建的行已删掉,子代的卡仍待决;体 state.resume_context_unreadable)": { attr: 503, revises: ["errorCode:internal.error"], since: "7.149.0" },
957
- "POST /v1/approvals/:sessionId/decide#workflow_decision_not_recorded(workflow 决定的投递那一跑在决定落行那一拍已不持宿主会话的认领 —— 心跳停满一窗被收割;决定没落、那一跑没起;与起跑之前认领复核答「没持有」同一只答复:认领在别的 run 上 ⇒ 409 conflict.session_active_run,宿主会话已删 ⇒ 404 resume.session_not_found,否则 409 conflict.claim_lost)": { attr: 409, revises: ["errorCode:internal.error"], since: "7.149.0" },
958
- "POST /v1/approvals/:sessionId/decide#parked_redeem_placement_store_fault(停驻子代赎回:认领之前那一次执行席读,或认领之后那一次执行放置的店往返没答出来;认领没有或已回滚,子代仍停着、卡仍待决;体 decide.store_unreachable + taskId)": { attr: 503, revises: ["errorCode:internal.error"], since: "7.149.0" },
959
- "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#placement_refused_after_claim(续跑家族、workflow 决定在宿主会话上起的新一跑、停驻子代赎回认领之后提交执行放置读出这条会话此刻不能在本处执行:已放在别的车道 / 写者在别处 / 设备拒;续跑认领的停驻行回到停驻、停驻赎回回滚,卡仍待决,wake 与宿主新一跑现建的行删掉;与认领之前同一只折法、同一只体;体 resume_blocked_by_policy + blockedBy 原码 + 原事实 forkPath / boundLane + retriable)": { attr: 409, revises: ["errorCode:execution_lane.tree_bound", "errorCode:conflict.session_mirror"], since: "7.149.0" },
1022
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#run_claim_store_fault(新提交:认领之前那一次执行席读,或认领这一段 —— 建行认领 createRun、执行放置、续跑输入的写、起跑之前的认领复核 —— 有一次店往返没答出来:库断连 / 拒连 / 超时、缺表 / 权限拒、认不出的库错;本请求铸的行已删掉 —— 认领与幂等键随行去,同一个自带 taskId 重发即新提交 —— 什么都没起跑;认领之后的流式腿 = 流的终帧;已绑设备的会话上认领之后那一次执行席读同答;体 state.run_store_unavailable)": { attr: 503, since: "7.149.0" },
1023
+ "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#resume_pre_engine_store_fault(续跑腿提交放行之后、交给引擎之前那一段 —— 排空 workflow 完成的序号基址现读与落账、通告口落账 —— 店往返没答出来;续跑认领的停驻行回到停驻、认领留着,wake 现建的行删掉;卡仍待决;体 state.resume_context_unreadable)": { attr: 503, since: "7.149.0" },
1024
+ "POST /v1/approvals/:sessionId/decide#workflow_host_turn_claim_store_fault(workflow 决定在宿主会话上起的新一跑:建行认领 / 执行放置 / 续跑输入 / 决定落行 / 起跑之前的认领复核有一次店往返没答出来;决定落行那一笔在 wake 腿上同答;现建的行已删掉,子代的卡仍待决;体 state.resume_context_unreadable)": { attr: 503, since: "7.149.0" },
1025
+ "POST /v1/approvals/:sessionId/decide#workflow_decision_not_recorded(workflow 决定的投递那一跑在决定落行那一拍已不持宿主会话的认领 —— 心跳停满一窗被收割;决定没落、那一跑没起;与起跑之前认领复核答「没持有」同一只答复:认领在别的 run 上 ⇒ 409 conflict.session_active_run,宿主会话已删 ⇒ 404 resume.session_not_found,否则 409 conflict.claim_lost)": { attr: 409, since: "7.149.0" },
1026
+ "POST /v1/approvals/:sessionId/decide#parked_redeem_placement_store_fault(停驻子代赎回:认领之前那一次执行席读,或认领之后那一次执行放置的店往返没答出来;认领没有或已回滚,子代仍停着、卡仍待决;体 decide.store_unreachable + taskId)": { attr: 503, since: "7.149.0" },
1027
+ "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#placement_refused_after_claim(续跑家族、workflow 决定在宿主会话上起的新一跑、停驻子代赎回认领之后提交执行放置读出这条会话此刻不能在本处执行:已放在别的车道 / 写者在别处 / 设备拒;续跑认领的停驻行回到停驻、停驻赎回回滚,卡仍待决,wake 与宿主新一跑现建的行删掉;与认领之前同一只折法、同一只体;体 resume_blocked_by_policy + blockedBy 原码 + 原事实 forkPath / boundLane + retriable)": { attr: 409, since: "7.149.0" },
960
1028
  "POST /v1/tasks#park_commit_ended(同步腿停在要批的门上,而停驻提交答出这条 run 没有停住、已收场 —— 停驻写之前已按下取消 / 被失联收割 / 别处终结;卡已作废;体 = 收场那一行的信封,与同键重放同一只:终局行的结果,取消那一形 terminal.code cancelled;行上无结果 ⇒ 回执三键)": { attr: 200, since: "7.149.0" },
961
1029
  "POST /v1/approvals/:sessionId/decide|/v1/sessions/:id/wake|/v1/assistant/tasks/:id/resume|/v1/assistant/tasks/:id/plan_review#resume_park_ended(续跑腿再停 / 重开时停驻提交答出这条 run 已收场;卡已作废;体 status / errorCode = 收场那一行的,不带 retriable)": { attr: 200, since: "7.149.0" },
962
1030
  "POST /v1/runs/:id/interrupt#body_with_fields(体带任何顶层键 —— 含早先版本受理的 text;非对象体同答;判在查 run 之前:任何 run 状态、属主、存在与否同一只体;体 request.body_shape + unknownKeys(键全在此)+ unsupportedKeys(恒空))": { attr: 400, since: "7.148.0" },
963
- "GET /v1/tool-approvals/:id#row_unreadable(有行的问,按 id 读行那一拍店抛 / 超时;本副本自己铸的活卡与起服接管的登记同答;体 not_found.ask,与查无 / 不是你的逐字节同)": { attr: 404, revises: ["selfMinted.toolApprovalReadState:pending"], since: "7.149.0" },
964
- "POST /v1/sessions/:id/sync/plan|POST /v1/sessions/:id/sync/import|PUT /v1/sessions/:id/sync/blobs/:hash#foreign_session_deleting(推送三口的门:id 上是别的主体正在删除的会话 —— 删除围栏已立、尚未删净;「被占着」读活行 ∪ 在删行,与对别人的活行同答;本人 / fleet 对自己在删的会话不变,拉取口仍只认活行;体 not_found.session,与对不存在 id 的拉取答复逐字节同)": { attr: 404, revises: ["errorCode:conflict"], since: "7.149.0" },
965
- "POST /v1/sessions/:id/sync/import#idle_id_other_principal_in_flight(第一阶段:id 上还没有会话行,而另一个主体在这只 id 上的第一阶段正在飞;导入租约键 = 落点属主格 + 会话 id,空闲 id 上各占各的;体 = 第一阶段的暂存回执 stagingId;先提交者得,输的那一份在提交前复判答 404 not_found.session,与赢家的提交撞在同一刻时由店的属主 CAS 拒 409 conflict)": { attr: 200, revises: ["errorCodeFamily:import_in_flight"], since: "7.149.0" },
1031
+ "GET /v1/tool-approvals/:id#row_unreadable(有行的问,按 id 读行那一拍店抛 / 超时;本副本自己铸的活卡与起服接管的登记同答;体 not_found.ask,与查无 / 不是你的逐字节同)": { attr: 404, since: "7.149.0" },
1032
+ "POST /v1/sessions/:id/sync/plan|POST /v1/sessions/:id/sync/import|PUT /v1/sessions/:id/sync/blobs/:hash#foreign_session_deleting(推送三口的门:id 上是别的主体正在删除的会话 —— 删除围栏已立、尚未删净;「被占着」读活行 ∪ 在删行,与对别人的活行同答;本人 / fleet 对自己在删的会话不变,拉取口仍只认活行;体 not_found.session,与对不存在 id 的拉取答复逐字节同)": { attr: 404, since: "7.149.0" },
1033
+ "POST /v1/sessions/:id/sync/import#idle_id_other_principal_in_flight(第一阶段:id 上还没有会话行,而另一个主体在这只 id 上的第一阶段正在飞;导入租约键 = 落点属主格 + 会话 id,空闲 id 上各占各的;体 = 第一阶段的暂存回执 stagingId;先提交者得,输的那一份在提交前复判答 404 not_found.session,与赢家的提交撞在同一刻时由店的属主 CAS 拒 409 conflict)": { attr: 200, since: "7.149.0" },
966
1034
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_headers_reserved_member(新提交;a2aPeers[i].headers 的成员名是 constructor / prototype —— 与 mcpServers[i].transport.headers / .env 同一张保留成员名表、同一只读法,大小写敏感;体 request.field_invalid + field 成员级路径 a2aPeers[i].headers.<名>;存盘续跑体里同形 ⇒ 续跑家族既有一面 #stored_unread_members 409)": { attr: 400, since: "7.149.0" },
1035
+ "POST /v1/tasks|/v1/runs#rewindFilesTo_with_cascade(新提交;提交体同带非空串 `rewindFilesTo` 与 `cascade: true` —— 梯级每一级在引擎现铸的会话里跑、不取根,文件回退无处落地;拒在任何副作用之前、梯子一级都不起;体 request.field_conflict + reason cascade_verify + fields [rewindFilesTo, cascade];`/v1/tasks/stream` 上带 `cascade` 的提交本来就 400(同码),不入此面)": { attr: 400, since: "7.151.0" },
1036
+ "POST /v1/tasks/:taskId/asks/:askId/decision#parked_redeemed(问已转停驻、门仍开着,部署接了停驻赎回 —— 非直连门;交与 live 应答口停驻臂同一只赎回;体 = 本口基本键 + accepted parked_redeemed + 赎回受理体;受理之后决定记在问行上)": { attr: 200, revises: ["errorCode:gone.ask_parked"], since: "7.151.0" },
1037
+ "POST /v1/tasks/:taskId/asks/:askId/decision#parked_standing_same_key(问已转停驻、门上已站着一次决定,本次请求的 idempotencyKey 就是问行上记录的那一把;体 = 首决回放,与 DECIDED 行的回放同一只渲染)": { attr: 200, revises: ["errorCode:gone.ask_parked"], since: "7.151.0" },
1038
+ "POST /v1/tasks/:taskId/asks/:askId/decision#parked_standing_conflict(问已转停驻、门上已站着一次决定,本次请求不是记录上那一把键 / 没带键;体 conflict.ask_decided 回显首决;首决取问行上答的就是门上这一次的那份记录,否则取停驻门)": { attr: 409, revises: ["errorCode:gone.ask_parked"], since: "7.151.0" },
1039
+ "POST /v1/tasks/:taskId/asks/:askId/decision#parked_redemption_refused(问已转停驻、门仍开着,停驻赎回没生效且门此刻仍没决;体 = 赎回的拒原样:429 成本配额 + Retry-After / 503 服务凭据或就绪 / 409 approval_stale 或 conflict.not_resumable / 400 decide_requires_binding / 500;赎回的 404 改答本口的 not_found.ask)": { attr: "as the shared parked redemption answers (429 / 503 / 409 / 400 / 500; its 404 ⇒ 404 not_found.ask)", revises: ["errorCode:gone.ask_parked"], since: "7.151.0" },
1040
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#userAttachments 的 path 条目在 e2b / k8s / local-docker / adb 车道上(目标给得出那一次观测:Linux、挂着 /proc、有 timeout / readlink / stat / head / base64)与 device 车道上(执行器声明修订号 ≥ 6 且在 hello.supports 声明了 openBound)—— human_input.attachments[].outcome": { attr: "attached", since: "7.151.0" },
1041
+ "GET /v1/device/ws#instruction kind openBound(server → executor;协议修订号 6 的 kind,只派发给声明修订号 ≥ 6 且 hello.supports 声明了它的执行器;args { path, op: open|size|readBytes|list, identity?, kind?, max? })": { attr: "dispatched-iff-declared", since: "7.151.0" },
1042
+ "GET /v1/device/ws#result outcome stat.identity(openBound 开答的 <device>:<inode>;可选串,不是串 ⇒ bad_shape)": { attr: "accepted", since: "7.151.0" },
1043
+ "POST /v1/sessions/:id/sync/import/:stagingId/entries|POST /v1/sessions/:id/sync/import#landed_occupant_gone(条目已提交 / identical 短路之后,写文件历史 · 会话规则 · 回退锚 · 行两位的落定段段首锁会话根行,读出落定的那一位住客已不在:会话被删、或同 id 被重建 —— 含同一属主;段体零字节写;体 conflict + sync conflict,不带 relation;运维 warn session_sync_landed_occupant_gone)": { attr: 409, since: "7.151.0" },
1044
+ "POST /v1/sessions/:id/sync/import/:stagingId/entries#staged_commit_occupant_changed(暂存提交时这只 id 上的会话已不是第一阶段门判过的那一位住客:属主或化身不同 —— 含同一属主删建;提交事务回滚;体 conflict + 暂存导入住客已变的固定句)": { attr: 409, since: "7.151.0" },
1045
+ "GET /v1/sessions/:id/sync/manifest|/v1/sessions/:id/sync/entries|/v1/sessions/:id/sync/history/blobs/:hash#occupant_changed_after_gate(门读到住客之后、答复发出之前复判:这只 id 上已不是门承认的那一位 —— 删了 / 同 id 重建;含否定答复 404 not_found.blob;entries 在应答头发出之前;体 not_found.session,与门后被删同体)": { attr: 404, since: "7.151.0" },
1046
+ "GET /v1/sessions/:id/sync/entries#occupant_changed_mid_stream(应答头已发;每页交出之前复判不中 ⇒ 流结束、不写尾行 = 截断;运维 info session_sync_pull_occupant_changed)": { attr: 200, since: "7.151.0" },
1047
+ "POST /v1/sessions/:id/sync/plan|POST /v1/sessions/:id/sync/import#occupant_changed_after_gate(门读到住客之后、非故障出口发出之前复判占位头:已不是那一位;含关系体、422 缺块、409 写者 / 活跃拒;体 conflict + sync conflict,不带 relation)": { attr: 409, since: "7.151.0" },
1048
+ "POST /v1/sessions/:id/sync/import/:stagingId/entries#pre_commit_activity_occupant_changed(提交前的活性复查:门读到住客、读到一份活 run / 活子代之后,复判这只 id 上已不是那一位 —— 那份活性是别一代的;暂存放掉;体 conflict + sync conflict,不带 activeTaskId / children)": { attr: 409, since: "7.151.0" },
1049
+ "PATCH /v1/sessions/:id#session_deleting(门那一读之后会话进了在删:删除围栏已立、尚未删净;行格判官把在删读作行不在;零写;体 not_found.session)": { attr: 404, since: "7.151.0" },
1050
+ "PUT /v1/sessions/:id/policy#occupant_changed_after_gate(门读到的那一位住客在写规则的落定段段首已不在:删了 / 同 id 重建;零写;体 not_found.session,与门同体)": { attr: 404, since: "7.151.0" },
967
1051
  },
968
1052
  retired: {},
969
1053
  },
@@ -995,11 +1079,44 @@ export const SELF_MINTED_WIRE = {
995
1079
  sessionMemoryStatusKey: {
996
1080
  at: "GET /v1/sessions/:id/memory-status 200 体顶层键(<键> → 在场律)",
997
1081
  members: {
998
- memorySync: { attr: "present-iff this deployment runs a memory sync leg;{parked:[{scope,wayOut}]} in sync order;parked:[] ⇔ no layer parked;deployment fact (same for every session, ?scope= not applied)", since: "7.141.0" },
1082
+ memorySync: { attr: "present-iff this deployment runs a memory sync leg;{parked:[entry]} in sync order (entry keys: memorySyncParkedKey);parked:[] ⇔ no layer parked;deployment fact (same for every session, ?scope= not applied)", since: "7.151.0" },
999
1083
  writeHome: { attr: "present-iff the engine answered it ∧ the single-user host lane (the capability bit projectContext's range predicate: hosted / sandbox / device / no-hands lanes ⇒ absent);the engine's absolute directory, byte for byte;with ?scope= that store's engine answer;without ?scope= the session-level home the engine chose across the stores (the newest store's own home;absent while any store's reading is unreadable, on a same-instant tie, or when no store names one)", since: "7.146.0" },
1000
1084
  planes: { attr: "present-iff no ?scope= ∧ the single-user host lane (same predicate as writeHome);[{plane:\"project\"|\"personal\", writeHome?}] one row per store in the engine's store order, each row the engine's own answer for that store (writeHome verbatim, absent when that store names none);the rows' other keys are not on the wire", since: "7.146.0" },
1001
1085
  },
1002
1086
  },
1087
+ memorySyncParkedKey: {
1088
+ at: "GET /v1/sessions/:id/memory-status memorySync.parked[] 条目键(<键> → 在场律)",
1089
+ members: {
1090
+ scope: { attr: "always;the layer's key (the sync layer first, then the owner's project layers by key)", since: "7.141.0" },
1091
+ wayOut: { attr: "always;closed set memorySyncWayOut", since: "7.141.0" },
1092
+ cause: { attr: "always;closed set memorySyncParkCause;why the layer is parked (not the trigger of the round that hit it)", since: "7.151.0" },
1093
+ axis: { attr: "present-iff cause is cursor_refused ∧ the engine's reading is inside both closed sets (axis in memorySyncCursorAxis ∧ found in memorySyncCursorFound;an unknown word in either ⇒ both keys absent);the axis the engine refused the cursor on", since: "7.151.0" },
1094
+ found: { attr: "present-iff axis is present (the two keys come as a pair);closed set memorySyncCursorFound;whether the cursor has no binding on that axis (absent) or is bound to another value (other)", since: "7.151.0" },
1095
+ },
1096
+ },
1097
+ memorySyncParkCause: {
1098
+ at: "GET /v1/sessions/:id/memory-status memorySync.parked[].cause",
1099
+ members: {
1100
+ cursor_refused: { attr: "-", since: "7.151.0" },
1101
+ cursor_unusable: { attr: "-", since: "7.151.0" },
1102
+ },
1103
+ },
1104
+ memorySyncCursorAxis: {
1105
+ at: "GET /v1/sessions/:id/memory-status memorySync.parked[].axis",
1106
+ members: {
1107
+ scope: { attr: "-", since: "7.151.0" },
1108
+ peer: { attr: "-", since: "7.151.0" },
1109
+ store: { attr: "-", since: "7.151.0" },
1110
+ incarnation: { attr: "-", since: "7.151.0" },
1111
+ },
1112
+ },
1113
+ memorySyncCursorFound: {
1114
+ at: "GET /v1/sessions/:id/memory-status memorySync.parked[].found",
1115
+ members: {
1116
+ absent: { attr: "-", since: "7.151.0" },
1117
+ other: { attr: "-", since: "7.151.0" },
1118
+ },
1119
+ },
1003
1120
  memorySyncWayOut: {
1004
1121
  at: "GET /v1/sessions/:id/memory-status memorySync.parked[].wayOut",
1005
1122
  members: {
@@ -1040,7 +1157,7 @@ export const SELF_MINTED_WIRE = {
1040
1157
  "GET|PUT /v1/sessions/:id/policy#ownerless-placed-session-non-fleet-non-operator": { attr: "404 not_found.session (session not found), same body as a missing session; was 409 conflict.session_ownerless", since: "7.148.0" },
1041
1158
  "run / session read faces#deployment-service-credential-no-principal-users-rows": { attr: "200 on GET /v1/runs/:id · /v1/runs/:id/events · /v1/sessions/:id · /head · /events · /memory-status · /execution-placement (unless SERVICE_TOKEN_ACTS_FOR_DEPLOYMENT=false); was 404, or 401 auth.principal_required where a principal is required", since: "7.148.0" },
1042
1159
  "GET /v1/runs/:id · /v1/runs/:id/events#dev-open-principal-header-not-owner": { attr: "404 not_found.run, same body as a missing run (a caller that names a principal is that principal on a deployment without an identity boundary too); was 200", since: "7.149.0" },
1043
- "session faces · list faces · /metrics family#dev-open-principal-header-not-owner": { attr: "each face's missing-row answer, same body as a missing row (404 not_found.session on GET /v1/sessions/:id · /head · /events · /memory-status · /execution-placement · PATCH /v1/sessions/:id · fork · sync reads (manifest · entries · history blob) · memory/erase · background · background/stop · mcp/reconnect · policy · notify; approval exemptions 404 not_found.session (not found); DELETE /v1/sessions/:id 200 {deleted:false}; sync push family (plan · import · blob put) 404 on another owner's session, its existing create answer on a missing id); GET /v1/sessions · /v1/fleet/stream · /v1/agents/roster · /v1/tasks (trace list) · /v1/usage/* · /v1/sendfile-links pinned to the named caller; /metrics* and GET /v1/tasks/source-summary 401 auth.unauthorized (operator sentence; METRICS_TOKEN, when configured, still opens /metrics* and is judged first); a Bearer this deployment cannot verify does not count as naming no principal (no fleet); a caller naming no principal and presenting no unverifiable credential unchanged (fleet); was 200 / fleet-wide (the principal header read as a label)", revises: ["selfMinted.ownerFaceAnswer:GET /v1/runs/:id · /v1/runs/:id/events#dev-open-principal-header-not-owner"], since: "7.149.0" },
1160
+ "session faces · list faces · /metrics family#dev-open-principal-header-not-owner": { attr: "each face's missing-row answer, same body as a missing row (404 not_found.session on GET /v1/sessions/:id · /head · /events · /memory-status · /execution-placement · PATCH /v1/sessions/:id · fork · sync reads (manifest · entries · history blob) · memory/erase · background · background/stop · mcp/reconnect · policy · notify; approval exemptions 404 not_found.session (not found); DELETE /v1/sessions/:id 200 {deleted:false}; sync push family (plan · import · blob put) 404 on another owner's session, its existing create answer on a missing id); GET /v1/sessions · /v1/fleet/stream · /v1/agents/roster · /v1/tasks (trace list) · /v1/usage/* · /v1/sendfile-links pinned to the named caller; /metrics* and GET /v1/tasks/source-summary 401 auth.unauthorized (operator sentence; METRICS_TOKEN, when configured, still opens /metrics* and is judged first); a Bearer this deployment cannot verify does not count as naming no principal (no fleet); a caller naming no principal and presenting no unverifiable credential unchanged (fleet); was 200 / fleet-wide (the principal header read as a label)", since: "7.149.0" },
1044
1161
  "owner-only session ports#unreadable-archive-ownerless-session-fleet-or-operator": { attr: "answered as on a readable archive: background · background/stop · notify · mcp/reconnect · execution-placement · approval exemptions list / revoke (the gate skips the placement read only when both hypotheses admit the caller); was 500 corrupt_session", since: "7.148.0" },
1045
1162
  "run faces#row-without-owner-cell-no-fleet-no-operator": { attr: "the face's missing-row answer for every caller without a fleet or operator qualification on that face; was: a caller without a principal passed on some faces (absent equals absent)", since: "7.148.0" },
1046
1163
  "POST /v1/tool-approvals/:id/respond#ask-not-visible-to-caller(查无 / 不是调用方的 / 行读不出 / 本 worker 没有问账)": { attr: "404 not_found.ask (no such approval ask (never existed, no longer kept, or not yours)), one body for every form, no state facts — the durable decision door's word; was 404 tool_approval.not_pending with cause unknown_or_other_replica (no cause on a worker without an ask ledger)", since: "7.148.0" },
@@ -1132,6 +1249,7 @@ export const SELF_MINTED_WIRE = {
1132
1249
  refusalSentenceForm: {
1133
1250
  at: "拒体 message 的句型(<码>#<座> → 句型骨架;码 / 状态 / 机读位不变)",
1134
1251
  members: {
1252
+ "409 conflict#staged_import_commit(会话同步推送第二阶段的提交:暂存提交的住客 CAS 没过)": { attr: "session changed hands while the import streamed (deleted, re-created or re-owned); nothing was imported — start the sync again", since: "7.151.0" },
1135
1253
  "401 auth.unauthorized#operator(/metrics* · GET /v1/tasks/source-summary)": { attr: "… send the deployment's service token … without a principal header where this deployment lets its service token act for the deployment itself (GET /health reports it as auth.serviceTokenActsForDeployment; …), or a read-only token this endpoint accepts (…)", since: "7.146.0" },
1136
1254
  "422 invalid_entries#row_contract(会话同步推送第二阶段;收编批量导入同句进逐元素 detail)": { attr: "malformed entry (id and parentId must be strings of 1-64 characters, type a string of 1-32 characters)", since: "7.146.0" },
1137
1255
  "404 not_found.run#a*/wa* id(compact · detach · 子代动词口;各 run 口的非属主臂)": { attr: "run not found — \"<id>\" looks like an agent handle (a*/wa* domain) … (the handle hint, same sentence as the missing-row arm)", since: "7.148.0" },
@@ -1142,7 +1260,7 @@ export const SELF_MINTED_WIRE = {
1142
1260
  "400 request.field_invalid#title.no_visible_character(PATCH /v1/sessions/:id · 会话同步 2c 导入的 title)": { attr: "title must contain at least one visible character", since: "7.136.0" },
1143
1261
  "503 state.file_history_unreadable#store_connection_fault(会话同步三条拉取读腿)": { attr: "this session's stored state could not be read right now (the store connection failed), so nothing was exported — retry later", since: "7.136.0" },
1144
1262
  "503 state.file_history_unreadable#store_deployment_fault(会话同步三条拉取口)": { attr: "this session's stored state cannot be read: the store does not match what this deployment requires (a table is missing or the database account lacks a privilege), so nothing was exported — retrying will not help until an operator repairs the store", since: "7.137.0" },
1145
- "connect_failed(run 失败终局)#snapshot_bucket_missing(k8s 车道读 latest 得 404 NoSuchBucket;连沙箱失败,一只 pod 都不建)": { attr: "workspace space pointer read failed (snapshot_bucket_missing): the workspace snapshot bucket <name> (WORKSPACE_SNAPSHOT_BUCKET; default workspaces) does not exist in the object store — refusing to start this run … Ways out: create the bucket, or set WORKSPACE_SNAPSHOT_BUCKET to one that exists, or set WORKSPACE_PERSIST=off …", since: "7.136.0" },
1263
+ "env.snapshot_bucket_missing#snapshot_bucket_missing(k8s 车道读 latest / 取快照归档得 404 NoSuchBucket;建连的立定拒 —— 不留 pod〔读 latest 不建,取归档建的那只释放〕,执行环境记住它直到销毁)": { attr: "workspace space pointer read failed (snapshot_bucket_missing): the workspace snapshot bucket <name> (WORKSPACE_SNAPSHOT_BUCKET; default workspaces) does not exist in the object store — refusing to start this run … Ways out: create the bucket, or set WORKSPACE_SNAPSHOT_BUCKET to one that exists, or set WORKSPACE_PERSIST=off …", since: "7.151.0" },
1146
1264
  "400 request.field_invalid#images[i].url.credential": { attr: "<field> <规则句> — the URL is kept as written (a parked task's resume context, logs), while images[i] can carry the image bytes inline: send { data, mimeType } instead of a URL that holds the credential", since: "7.136.0" },
1147
1265
  "400 request.field_invalid#images.not_array": { attr: "head: images is <shape>, not an array of image entries", since: "7.148.0" },
1148
1266
  "400 request.field_invalid#images[i].not_object": { attr: "head: images[i] is <shape>, not an image entry (an object)", since: "7.148.0" },
@@ -1178,6 +1296,11 @@ export const SELF_MINTED_WIRE = {
1178
1296
  "409 conflict.session_memory_unobserved#no_leaf": { attr: "this session has no transcript yet, so there is no revision to sync from — run a task in it (…), then sync", since: "7.143.0" },
1179
1297
  "400 request.field_invalid#unread_request_members(新提交:settings.env 有成员不是帽内的串;嵌入方直调装配时四座同句)": { attr: "this request carries a member|members this server version's readers cannot take as written, on a deployment that would apply it|them: <坐标,至多 8 处>[ (and <n> more)] — running it would silently leave that member|those members out (a hook that guards a tool, an MCP server's credentials); submit it again with this member|these members in the current form", since: "7.147.0" },
1180
1298
  "409 resume_blocked_by_policy#unread_members(续跑四门 · steer 铸唤醒卡之前)": { attr: "resume blocked by an admission policy change: <同上一句>", since: "7.147.0" },
1299
+ "503 auth.service_token_required#task_submissions(计费提交 · bake · 改写门;停驻赎回席同句)": { attr: "this worker requires a service auth token (set SERVICE_AUTH_TOKEN) or a verified registry sign-in token before accepting task submissions", since: "7.151.0" },
1300
+ "503 auth.service_token_required#destructive_session_writes": { attr: "this worker requires a service auth token (set SERVICE_AUTH_TOKEN) or a verified registry sign-in token before accepting destructive session writes (policy / sync-import / fork / delete)", since: "7.151.0" },
1301
+ "413 request.payload_too_large#store_row_too_large(POST /v1/tasks|/v1/tasks/stream|/v1/runs;续跑输入一行装不下,row / statement / value 三墙)": { attr: "the database refused to store this task: it is larger than the database keeps in one row|accepts in one statement|PostgreSQL holds in one value — nothing was run; <出路>", since: "7.151.0" },
1302
+ "adopt_failed|track_failed|snapshot_failed|restore_failed#store_fault(文件历史店的失败句:会话同步推送与 blob 交换的拒体 · rewind / restore 的逐文件失败句)": { attr: "<动作> failed: <类别句> [original code: <原码>]", since: "7.151.0" },
1303
+ "子代失败句#store_fault(tool_end 子代卡 structured.errorMessage · 后台子代通告的 summary · GET /v1/runs/:id/subagents/:handle/output 的 content / output · 父模型读到的子代报告行)": { attr: "<类别句> [original code: <原码>](与 run 终局 terminal.failed.message 同一句)", since: "7.151.0" },
1181
1304
  },
1182
1305
  },
1183
1306
  decisionBodyKey: {
@@ -1252,12 +1375,14 @@ export const SELF_MINTED_WIRE = {
1252
1375
  },
1253
1376
  },
1254
1377
  deviceProtocolRevision: {
1255
- at: "GET /v1/capabilities deviceExecutor.protocolVersion 与 device WS challenge 帧的修订号(<修订号> → 它加进结局码闭集的词)",
1378
+ at: "GET /v1/capabilities deviceExecutor.protocolVersion 与 device WS challenge 帧的修订号(<修订号> → 它加的词:结局码 `+词`、下发指令 kind `+kind:词`;两张表都零加词的语义修订 → 变更名)",
1256
1379
  members: {
1257
1380
  1: { attr: "base", since: "7.51.0" },
1258
1381
  2: { attr: "+liveness_no_output", since: "7.133.0" },
1259
1382
  3: { attr: "+name_too_long", since: "7.137.0" },
1260
1383
  4: { attr: "+symlink_loop", since: "7.143.0" },
1384
+ 5: { attr: "paths-unfolded", since: "7.150.0" },
1385
+ 6: { attr: "+kind:openBound", since: "7.151.0" },
1261
1386
  },
1262
1387
  },
1263
1388
  hookNonBlockingFailureReason: {
@@ -1325,6 +1450,7 @@ export const SELF_MINTED_WIRE = {
1325
1450
  "GET /v1/config/catalog#rows[MODEL_ROUTER_ID].derivedDefaultNote": { attr: "absent=>classifier-role-in-served-table", since: "7.143.0" },
1326
1451
  "GET /v1/config/catalog#rows[MINIO_BUCKET].semantics": { attr: "leader-diff-out-bucket;independent-of-WORKSPACE_SNAPSHOT_BUCKET", since: "7.148.0" },
1327
1452
  "GET /v1/config/catalog#rows[MINIO_BUCKET].derivedDefaultNote": { attr: "absent=>WORKSPACE_SNAPSHOT_BUCKET_DEFAULT(not-the-explicit-value)", since: "7.148.0" },
1453
+ "GET /v1/config/catalog#rows[ALLOW_UNAUTHED_WRITES].semantics": { attr: "write-gate-admits-requests-without-a-gate-credential(service-token|verified-sign-in-token);submissions+rewrites+destructive-session-writes", since: "7.151.0" },
1328
1454
  "GET /v1/sessions/:id/mcp#servers[].error": { attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200", since: "7.138.0" },
1329
1455
  "POST /v1/sessions/:id/mcp/reconnect#reason|status.error|listingIncomplete.error": { attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200", since: "7.138.0" },
1330
1456
  "GET /v1/config/catalog#rows[MODEL_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
@@ -0,0 +1,3 @@
1
+ /** 一张工具结构化卡出门(`redact` = 调用面的整值脱敏器,环 / 深度守卫在它里面)。 */
2
+ export declare function projectToolCard(card: unknown, redact: (value: unknown) => unknown): unknown;
3
+ //# sourceMappingURL=tool-card.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { projectMcpAuthorization } from "../mcp-authorization-face.js";
2
+ import { projectToolStructured } from "./tool-output-media.js";
3
+ const TOOL_CARD_RECORDS = {
4
+ unauthorized: { member: "authorization", project: projectMcpAuthorization },
5
+ };
6
+ const isPlainRecord = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
7
+ function recordOf(card) {
8
+ const code = card.code;
9
+ if (typeof code !== "string")
10
+ return undefined;
11
+ const records = TOOL_CARD_RECORDS;
12
+ const record = Object.hasOwn(records, code) ? records[code] : undefined;
13
+ return record !== undefined && Object.hasOwn(card, record.member) ? record : undefined;
14
+ }
15
+ export function projectToolCard(card, redact) {
16
+ const record = isPlainRecord(card) ? recordOf(card) : undefined;
17
+ if (!isPlainRecord(card) || record === undefined)
18
+ return projectToolStructured(card, redact);
19
+ const face = record.project(card[record.member]);
20
+ const rest = projectToolStructured(Object.fromEntries(Object.entries(card).filter(([k]) => k !== record.member)), redact);
21
+ const kept = isPlainRecord(rest) ? rest : {};
22
+ return Object.fromEntries(Object.keys(card).flatMap((k) => (k === record.member ? (face === undefined ? [] : [[k, face]]) : Object.hasOwn(kept, k) ? [[k, kept[k]]] : [])));
23
+ }
24
+ //# sourceMappingURL=tool-card.js.map
@@ -7,7 +7,8 @@ export declare function projectToolOutput(output: unknown): unknown;
7
7
  * 媒体卡座位的**唯一一只遍历**(与 {@link projectToolOutput} 同律):媒体卡逐成员过 `redact`,`file` 里 `base64` 逐字、其余成员照脱;
8
8
  * 其它一切整只过 `redact`。保键序(逐键映射),不改入参。
9
9
  *
10
- * 形判与遍历只此一只,**脱敏器由调用面给**(「什么算该脱」是各面自己的事,「字节座位不过它」是这里的事):
10
+ * 形判与遍历只此一只,**脱敏器由调用面给**(「什么算该脱」是各面自己的事,「字节座位不过它」是这里的事)。调用它的只有工具卡的唯一读者
11
+ * `trace/tool-card.ts` 的 `projectToolCard`(卡上挂着的有处置表的记录先经记录的投影,其余部分交给本遍历),两面经它到这里:
11
12
  * · `tool_end` 活面 / 持久面(`toolEndEventData` 经 `trace/project.ts`):凭据脱敏 `redactDeep`;
12
13
  * · 会话存档读面(`audit.ts` 的 `toolResult.details` 叶):模型文本段脱敏的深扫(`redactDeepWith(v, redactModelText)`)。
13
14
  * `redact` 必须是整值→整值的纯函数(环 / 深度守卫在它里面,遍历不重做);非媒体卡原样交给它,所以非媒体卡的读数就是调用面自己的深扫。
@@ -17,7 +17,7 @@
17
17
  * ## 为什么是这一形(core §4.6e 推荐形逐条)
18
18
  * · **读整体,不读 `askClass`**:一问可以同属几类(探针问与写保护并存、组织裁决与 hook 并存),`askClass` 只是表序第一个;集里任一类
19
19
  * 不答 ⇒ 整问不答。
20
- * · **缺席 = 不答的类**:没盖 `origin` 的站(共享制品读确认,KL-1214-a)、部署自铸的请求、7.37.0 之前 park 的行续跑(KL-1214-b,续跑不补)
20
+ * · **缺席 = 不答的类**:没盖 `origin` 的站(共享制品读确认,[ref])、部署自铸的请求、7.37.0 之前 park 的行续跑([ref],续跑不补)
21
21
  * 都不带类 ⇒ 不答。
22
22
  * · **答集只 `ordinary`**:引擎可放行的类(core `releasableAskClassesFor(face)`,按问的面读 —— 哪些类、哪一面放得行以引擎的表为准,本注不抄名单)里除 `ordinary`
23
23
  * 之外的保护类与 `mode`(plan 的写问)留给人;可放行类之外的类(权威为人提的问)恒不答。function approver 的 yes 是「这一次调用的答」—— 它连 `requiresRealApproval`
@@ -134,7 +134,7 @@ export declare const isNoCenterEffective: (eff: EffectiveConfig) => boolean;
134
134
  */
135
135
  export declare function collabTemplatesNotExecuted(eff: Pick<EffectiveConfig, "collab">): string[];
136
136
  /**
137
- * DESIGN-278 §5 S2([ref])—— center 这份 effective **当前在管**哪些 `ServiceConfig` 键(配置目录端点
137
+ * [ref] §5 S2([ref])—— center 这份 effective **当前在管**哪些 `ServiceConfig` 键(配置目录端点
138
138
  * `GET /v1/config/catalog` 判 `effectiveLane` 的 center 半场)。
139
139
  *
140
140
  * 判据与各消费腿**同源**,不自铸第二份:
@@ -8,7 +8,7 @@
8
8
  * 2. 三张登记表(非域白名单 / 不消费表 / 远端专属表)每行**必须带理由**;行的成立性由对账门**双向**钉——登记了
9
9
  * 却不成立(死账)与成立了却没登记(半接线)都红,理由失效之日格子自己翻红(墓碑),禁裸豁免。
10
10
  * 3. schema 侧的数据(`DOMAINS` / `PORTABLE_DOMAINS` / zod shape)一律由对账门**读 dist**,绝不抄进这里
11
- * (平行副本病是 DESIGN-282 §0 的病理定性,本文件只登记 server 自己那一侧)。
11
+ * (平行副本病是 [ref] §0 的病理定性,本文件只登记 server 自己那一侧)。
12
12
  */
13
13
  import type { EffectiveConfig } from "./types.js";
14
14
  /** EffectiveConfig 的全部顶层键(信封 + 域 + 非域白名单键),类型级绑定见上。 */
@@ -69,7 +69,7 @@ export declare function resolveMcpServers(mcp: {
69
69
  * [ref]:alias 窗撤销,单键命中(同 `skillsForScenario`)。 */
70
70
  export declare function mcpForScenario(center: CenterMcp | undefined, scenario: string): McpServerSpec[] | undefined;
71
71
  /**
72
- * DESIGN-269 §2.1 —— resolve the deployment's A2A peers (the `a2a` domain: `config.d/a2a.json` on the local leg, `/effective.a2a` on the
72
+ * [ref] §2.1 —— resolve the deployment's A2A peers (the `a2a` domain: `config.d/a2a.json` on the local leg, `/effective.a2a` on the
73
73
  * center leg — one declaration seat, both legs read through the contract) into core `A2aServerSpec`s + the scenarios each applies to. Exact sibling of {@link resolveMcpServers}, same three rules:
74
74
  * · header-NAME refs → real values from THIS service's env (the secret boundary is unchanged — the center
75
75
  * never holds the bearer), registered on `desk` under `rosterLease` (`mintDeclaration`, only for a peer that mounts); the spec carries the minted