@sema-agent/server 7.147.0 → 7.149.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 (790) hide show
  1. package/MIGRATION.md +1468 -24
  2. package/README.md +35 -7
  3. package/README.zh-CN.md +18 -8
  4. package/USAGE.md +444 -193
  5. package/deploy/sema-up/README.md +16 -5
  6. package/deploy/sema-up/chart/templates/NOTES.txt +1 -1
  7. package/deploy/sema-up/chart/templates/_helpers.tpl +20 -4
  8. package/deploy/sema-up/chart/values.yaml +3 -2
  9. package/deploy/sema-up/cluster-up.sh +74 -176
  10. package/deploy/sema-up/kube-up.sh +29 -49
  11. package/deploy/sema-up/lib/chart-run.sh +23 -0
  12. package/deploy/sema-up/lib/dataroot.sh +3 -3
  13. package/deploy/sema-up/lib/health.sh +62 -13
  14. package/deploy/sema-up/lib/helm-values-cluster.py +18 -0
  15. package/deploy/sema-up/lib/helm-values-kube.py +35 -0
  16. package/deploy/sema-up/lib/regcred.py +8 -0
  17. package/deploy/sema-up/lib/remote/helm-install.sh +3 -0
  18. package/deploy/sema-up/lib/remote/image-import.sh +6 -0
  19. package/deploy/sema-up/lib/remote/machine-precheck.sh +11 -0
  20. package/deploy/sema-up/lib/remote/region-probe.sh +3 -0
  21. package/deploy/sema-up/lib/remote/stack-ready.sh +26 -0
  22. package/deploy/sema-up/lib/remote/vxlan-guard.sh +8 -0
  23. package/deploy/sema-up/lib/render-stack.py +17 -0
  24. package/deploy/sema-up/lib/shell-text.sh +87 -0
  25. package/deploy/sema-up/lib/usage-flags.txt +10 -0
  26. package/deploy/sema-up/lib/usage-head.txt +1 -0
  27. package/deploy/sema-up/lib/usage-tail.txt +13 -0
  28. package/deploy/sema-up/preflight.sh +10 -8
  29. package/deploy/sema-up/sema-up.sh +14 -39
  30. package/deploy/sema-up/smoke.sh +7 -6
  31. package/deploy/sema-up/stack/compose.dataroot.yaml +3 -0
  32. package/deploy/sema-up/stack/compose.yaml +13 -1
  33. package/deploy/sema-up/stack/sema-stack-cluster.yaml +21 -0
  34. package/dist/adoption/plan.d.ts +24 -0
  35. package/dist/adoption/plan.js +53 -1
  36. package/dist/adoption/runner.d.ts +10 -1
  37. package/dist/adoption/runner.js +36 -16
  38. package/dist/approval-card.d.ts +36 -38
  39. package/dist/approval-gate-currency.js +3 -2
  40. package/dist/approval-leg-origin.d.ts +33 -0
  41. package/dist/approval-leg-origin.js +4 -0
  42. package/dist/approval-reconciler.d.ts +4 -13
  43. package/dist/approval-reconciler.js +2 -2
  44. package/dist/approval.d.ts +13 -11
  45. package/dist/approval.js +3 -3
  46. package/dist/audit.d.ts +10 -3
  47. package/dist/audit.js +15 -7
  48. package/dist/auth-bridge.d.ts +9 -15
  49. package/dist/auth-bridge.js +4 -11
  50. package/dist/auth-keys.d.ts +10 -1
  51. package/dist/auth-keys.js +8 -0
  52. package/dist/auto-mode-face.d.ts +10 -7
  53. package/dist/auto-mode-face.js +7 -4
  54. package/dist/background-agent-name.d.ts +19 -1
  55. package/dist/background-agent-name.js +12 -2
  56. package/dist/background-session-reap.d.ts +1 -1
  57. package/dist/bake-runner/main.js +9 -6
  58. package/dist/bench/s1/arms.js +6 -5
  59. package/dist/bench/s1/live-deps.js +5 -2
  60. package/dist/bench/s1/run-firm.js +6 -5
  61. package/dist/bind-host.d.ts +25 -0
  62. package/dist/bind-host.js +25 -0
  63. package/dist/boot/adoption.d.ts +3 -0
  64. package/dist/boot/adoption.js +1 -0
  65. package/dist/boot/deployment-mods.d.ts +1 -1
  66. package/dist/boot/execution-env.d.ts +17 -7
  67. package/dist/boot/execution-env.js +47 -42
  68. package/dist/boot/execution-lane.d.ts +6 -4
  69. package/dist/boot/execution-lane.js +3 -1
  70. package/dist/boot/exit-boundary.d.ts +2 -2
  71. package/dist/boot/exit-boundary.js +6 -5
  72. package/dist/boot/fatal-exit.d.ts +3 -5
  73. package/dist/boot/fatal-exit.js +2 -2
  74. package/dist/boot/leader.d.ts +15 -0
  75. package/dist/boot/leader.js +17 -15
  76. package/dist/boot/memory-consolidation.d.ts +37 -29
  77. package/dist/boot/memory-consolidation.js +11 -5
  78. package/dist/boot/org-delivery.d.ts +3 -2
  79. package/dist/boot/org-memory.js +1 -1
  80. package/dist/boot/parked-revive-gate.js +2 -2
  81. package/dist/boot/reapers.d.ts +4 -3
  82. package/dist/boot/reapers.js +19 -16
  83. package/dist/boot/resolve-spec.d.ts +5 -3
  84. package/dist/boot/resolve-spec.js +60 -70
  85. package/dist/boot/retention-lane.d.ts +4 -4
  86. package/dist/boot/retention-lane.js +2 -2
  87. package/dist/boot/runner-deps.d.ts +28 -7
  88. package/dist/boot/runner-deps.js +14 -5
  89. package/dist/boot/runtime-caps.d.ts +2 -2
  90. package/dist/boot/runtime-caps.js +16 -2
  91. package/dist/boot/session-faces.d.ts +16 -7
  92. package/dist/boot/session-faces.js +114 -94
  93. package/dist/boot/shutdown.d.ts +5 -4
  94. package/dist/boot/shutdown.js +6 -4
  95. package/dist/boot/stage-01-config.d.ts +1 -0
  96. package/dist/boot/stage-01-config.js +13 -4
  97. package/dist/boot/stage-02-web-admin-pull.d.ts +2 -0
  98. package/dist/boot/stage-02-web-admin-pull.js +16 -3
  99. package/dist/boot/stage-03-store-backend.d.ts +4 -0
  100. package/dist/boot/stage-03-store-backend.js +4 -3
  101. package/dist/boot/stage-04-stores.d.ts +3 -0
  102. package/dist/boot/stage-04-stores.js +2 -2
  103. package/dist/boot/stage-05-execution-env.d.ts +8 -3
  104. package/dist/boot/stage-05-execution-env.js +2 -2
  105. package/dist/boot/stage-06-runners.d.ts +12 -13
  106. package/dist/boot/stage-06-runners.js +23 -15
  107. package/dist/boot/stage-07-capability-layer.d.ts +13 -9
  108. package/dist/boot/stage-07-capability-layer.js +5 -3
  109. package/dist/boot/stage-08-reapers.d.ts +13 -9
  110. package/dist/boot/stage-08-reapers.js +3 -3
  111. package/dist/boot/stage-09-leader.d.ts +14 -16
  112. package/dist/boot/stage-09-leader.js +12 -4
  113. package/dist/boot/stage-10-http-server.d.ts +14 -16
  114. package/dist/boot/stage-10-http-server.js +7 -4
  115. package/dist/boot/store-evidence.d.ts +20 -0
  116. package/dist/boot/store-evidence.js +13 -0
  117. package/dist/boot/stores.d.ts +6 -0
  118. package/dist/boot/stores.js +41 -27
  119. package/dist/boot/task-list-lane.d.ts +4 -4
  120. package/dist/boot/web-admin.d.ts +4 -2
  121. package/dist/boot/web-admin.js +55 -35
  122. package/dist/boot/webfetch-summarize-lane.d.ts +1 -1
  123. package/dist/boot-reclaim.d.ts +3 -1
  124. package/dist/boot-reclaim.js +1 -1
  125. package/dist/brain.d.ts +7 -18
  126. package/dist/brain.js +5 -17
  127. package/dist/budget.js +6 -6
  128. package/dist/capabilities/center-plugins.d.ts +7 -1
  129. package/dist/capabilities/center-plugins.js +32 -10
  130. package/dist/capabilities/center-wiring.js +1 -1
  131. package/dist/capabilities/composite-members.d.ts +2 -2
  132. package/dist/capabilities/composite-members.js +2 -2
  133. package/dist/capabilities/repo-tools.d.ts +2 -0
  134. package/dist/capabilities/repo-tools.js +14 -12
  135. package/dist/capabilities/scenarios.d.ts +6 -15
  136. package/dist/capabilities/scenarios.js +11 -16
  137. package/dist/capabilities/skills.d.ts +1 -1
  138. package/dist/capabilities/tool-defer.d.ts +1 -1
  139. package/dist/capability-facts.d.ts +39 -11
  140. package/dist/capability-facts.js +35 -7
  141. package/dist/card-settle-stored-scope.d.ts +56 -0
  142. package/dist/card-settle-stored-scope.js +27 -0
  143. package/dist/card-void.d.ts +8 -13
  144. package/dist/card-void.js +2 -7
  145. package/dist/center-credential-renewer.d.ts +6 -2
  146. package/dist/center-credential-renewer.js +7 -3
  147. package/dist/config-catalog.d.ts +28 -1
  148. package/dist/config-catalog.js +95 -85
  149. package/dist/config-dir-trust.d.ts +37 -4
  150. package/dist/config-dir-trust.js +88 -44
  151. package/dist/config-invariants.d.ts +43 -3
  152. package/dist/config-invariants.js +69 -5
  153. package/dist/config-lkg.d.ts +23 -1
  154. package/dist/config-lkg.js +17 -3
  155. package/dist/config-provider.d.ts +9 -9
  156. package/dist/config-provider.js +25 -110
  157. package/dist/config-pull-failure.d.ts +50 -0
  158. package/dist/config-pull-failure.js +48 -0
  159. package/dist/config-types.d.ts +62 -21
  160. package/dist/config.d.ts +14 -21
  161. package/dist/config.js +141 -64
  162. package/dist/context-window-notice.d.ts +31 -0
  163. package/dist/context-window-notice.js +28 -0
  164. package/dist/delegated-session-owner.d.ts +1 -1
  165. package/dist/deleted-session-ids.d.ts +3 -2
  166. package/dist/deployment-governance.d.ts +3 -3
  167. package/dist/deployment-shape.d.ts +46 -11
  168. package/dist/deployment-shape.js +8 -0
  169. package/dist/egress-redirect.d.ts +25 -7
  170. package/dist/egress-redirect.js +20 -2
  171. package/dist/elicitation.d.ts +6 -5
  172. package/dist/elicitation.js +23 -22
  173. package/dist/engine-identity.d.ts +28 -0
  174. package/dist/engine-identity.js +10 -0
  175. package/dist/entry-problems.d.ts +5 -7
  176. package/dist/entry-problems.js +1 -1
  177. package/dist/env-facts.js +2 -1
  178. package/dist/env-name-allowlist-knobs.d.ts +6 -5
  179. package/dist/env-name-allowlist-knobs.js +5 -0
  180. package/dist/env-witness.d.ts +7 -0
  181. package/dist/env-witness.js +16 -0
  182. package/dist/execution-lane-caps.d.ts +25 -23
  183. package/dist/execution-lane-caps.js +18 -26
  184. package/dist/execution-placement.d.ts +58 -18
  185. package/dist/execution-placement.js +41 -2
  186. package/dist/field-conflict.d.ts +7 -11
  187. package/dist/field-conflict.js +3 -3
  188. package/dist/file-history-capture.d.ts +3 -3
  189. package/dist/file-history-disclosure.js +1 -0
  190. package/dist/fleet/fleet-bus.d.ts +21 -3
  191. package/dist/fleet/fleet-bus.js +35 -25
  192. package/dist/fleet/fleet-reconciler.js +2 -2
  193. package/dist/fleet/serving-lease.js +3 -3
  194. package/dist/fleet-client.js +3 -3
  195. package/dist/fleet-lease.d.ts +0 -1
  196. package/dist/fleet-lease.js +4 -5
  197. package/dist/history-anchor.d.ts +23 -3
  198. package/dist/history-anchor.js +24 -4
  199. package/dist/hitl-delivery.d.ts +90 -0
  200. package/dist/hitl-delivery.js +98 -0
  201. package/dist/hooks/classic-stations.d.ts +8 -11
  202. package/dist/hooks/classic-stations.js +0 -7
  203. package/dist/hooks/command-spawn.d.ts +7 -2
  204. package/dist/hooks/command-spawn.js +13 -6
  205. package/dist/hooks/hook-llm.d.ts +5 -1
  206. package/dist/hooks/hook-llm.js +24 -15
  207. package/dist/hooks/hook-runner.d.ts +72 -57
  208. package/dist/hooks/hook-runner.js +271 -193
  209. package/dist/host-lsp-manager.d.ts +22 -8
  210. package/dist/host-lsp-manager.js +4 -1
  211. package/dist/http/active-run-conflict.d.ts +2 -43
  212. package/dist/http/active-run-conflict.js +3 -7
  213. package/dist/http/admission.d.ts +4 -18
  214. package/dist/http/admission.js +76 -79
  215. package/dist/http/approval-sweeps.d.ts +3 -3
  216. package/dist/http/approval-sweeps.js +56 -31
  217. package/dist/http/caller-trust.d.ts +8 -10
  218. package/dist/http/caller-trust.js +1 -2
  219. package/dist/http/claim-heartbeat.d.ts +49 -0
  220. package/dist/http/claim-heartbeat.js +46 -0
  221. package/dist/http/claimed-run.d.ts +16 -8
  222. package/dist/http/claimed-run.js +8 -0
  223. package/dist/http/dispatch.d.ts +8 -1
  224. package/dist/http/dispatch.js +78 -30
  225. package/dist/http/durable-run-leg.d.ts +11 -4
  226. package/dist/http/durable-run-leg.js +45 -21
  227. package/dist/http/execution-context.d.ts +122 -47
  228. package/dist/http/execution-context.js +135 -43
  229. package/dist/http/health-reader.d.ts +36 -0
  230. package/dist/http/health-reader.js +21 -0
  231. package/dist/http/health-self-report.d.ts +9 -9
  232. package/dist/http/health-self-report.js +4 -4
  233. package/dist/http/idempotency.d.ts +9 -5
  234. package/dist/http/idempotency.js +4 -4
  235. package/dist/http/memory-compliance-failure-reply.d.ts +15 -16
  236. package/dist/http/memory-compliance-failure-reply.js +4 -2
  237. package/dist/http/memory-face-fault-reply.d.ts +67 -0
  238. package/dist/http/memory-face-fault-reply.js +71 -0
  239. package/dist/http/memory-store-refusal-reply.d.ts +1 -1
  240. package/dist/http/memory-store-refusal-reply.js +3 -0
  241. package/dist/http/owner-access.d.ts +392 -67
  242. package/dist/http/owner-access.js +370 -35
  243. package/dist/http/principal-gate.d.ts +39 -89
  244. package/dist/http/principal-gate.js +26 -68
  245. package/dist/http/refusal-body.d.ts +35 -2
  246. package/dist/http/refusal-body.js +34 -0
  247. package/dist/http/request-guards.d.ts +9 -13
  248. package/dist/http/request-guards.js +34 -68
  249. package/dist/http/resume-composition.d.ts +37 -0
  250. package/dist/http/resume-composition.js +18 -0
  251. package/dist/http/resume-ctx-read.d.ts +46 -12
  252. package/dist/http/resume-ctx-read.js +31 -6
  253. package/dist/http/resume-legs.d.ts +54 -19
  254. package/dist/http/resume-legs.js +408 -196
  255. package/dist/http/retired-skill-manifest.d.ts +1 -1
  256. package/dist/http/route-ctx.d.ts +31 -32
  257. package/dist/http/routes/a2a-serve.d.ts +43 -5
  258. package/dist/http/routes/a2a-serve.js +60 -37
  259. package/dist/http/routes/admin-config-refresh.js +2 -2
  260. package/dist/http/routes/admin-drain.js +2 -2
  261. package/dist/http/routes/admin-memory-optout.js +4 -3
  262. package/dist/http/routes/adoption.d.ts +3 -0
  263. package/dist/http/routes/adoption.js +17 -10
  264. package/dist/http/routes/agents-roster.js +13 -7
  265. package/dist/http/routes/approvals-assistant.js +73 -67
  266. package/dist/http/routes/attachments.js +2 -2
  267. package/dist/http/routes/background.d.ts +3 -3
  268. package/dist/http/routes/background.js +9 -17
  269. package/dist/http/routes/capabilities.js +16 -19
  270. package/dist/http/routes/config-catalog.js +2 -2
  271. package/dist/http/routes/devices.d.ts +3 -3
  272. package/dist/http/routes/devices.js +4 -4
  273. package/dist/http/routes/diagnostics.d.ts +29 -3
  274. package/dist/http/routes/diagnostics.js +49 -18
  275. package/dist/http/routes/engine.js +2 -2
  276. package/dist/http/routes/fleet.js +5 -3
  277. package/dist/http/routes/images.js +10 -6
  278. package/dist/http/routes/leader.d.ts +7 -2
  279. package/dist/http/routes/leader.js +12 -3
  280. package/dist/http/routes/mcp-reconnect.d.ts +1 -1
  281. package/dist/http/routes/mcp-reconnect.js +7 -15
  282. package/dist/http/routes/memory-bundle.js +4 -7
  283. package/dist/http/routes/memory-compliance.js +4 -4
  284. package/dist/http/routes/memory-consolidation.js +6 -9
  285. package/dist/http/routes/memory-origin.d.ts +2 -0
  286. package/dist/http/routes/memory-origin.js +7 -8
  287. package/dist/http/routes/memory-policy.js +17 -12
  288. package/dist/http/routes/notify-wake.js +10 -19
  289. package/dist/http/routes/observability.js +3 -3
  290. package/dist/http/routes/principal-inbox.d.ts +4 -2
  291. package/dist/http/routes/principal-inbox.js +5 -4
  292. package/dist/http/routes/projects.d.ts +1 -1
  293. package/dist/http/routes/projects.js +3 -2
  294. package/dist/http/routes/retention-ops.js +6 -9
  295. package/dist/http/routes/rules.js +20 -5
  296. package/dist/http/routes/run-memory-capture.d.ts +2 -2
  297. package/dist/http/routes/run-memory-capture.js +6 -12
  298. package/dist/http/routes/run-permission-mode.d.ts +2 -2
  299. package/dist/http/routes/run-permission-mode.js +10 -17
  300. package/dist/http/routes/runs.js +155 -237
  301. package/dist/http/routes/session-memory-sync.d.ts +2 -2
  302. package/dist/http/routes/session-memory-sync.js +7 -13
  303. package/dist/http/routes/session-sync.d.ts +28 -7
  304. package/dist/http/routes/session-sync.js +63 -50
  305. package/dist/http/routes/sessions-list.d.ts +3 -3
  306. package/dist/http/routes/sessions-list.js +9 -9
  307. package/dist/http/routes/sessions.js +87 -124
  308. package/dist/http/routes/shared-memory.js +6 -6
  309. package/dist/http/routes/side-query.js +2 -2
  310. package/dist/http/routes/tasks.js +237 -187
  311. package/dist/http/routes/trace-usage.d.ts +0 -12
  312. package/dist/http/routes/trace-usage.js +40 -46
  313. package/dist/http/routes/workflows.d.ts +39 -4
  314. package/dist/http/routes/workflows.js +42 -14
  315. package/dist/http/run-concurrency-cap.d.ts +20 -12
  316. package/dist/http/run-concurrency-cap.js +39 -26
  317. package/dist/http/run-read-face.d.ts +3 -5
  318. package/dist/http/run-read-face.js +8 -13
  319. package/dist/http/send.d.ts +12 -3
  320. package/dist/http/send.js +42 -6
  321. package/dist/http/server.d.ts +43 -45
  322. package/dist/http/server.js +61 -11
  323. package/dist/http/sse-log.d.ts +17 -10
  324. package/dist/http/sse-log.js +7 -7
  325. package/dist/http/stored-body-replay.d.ts +12 -0
  326. package/dist/http/stored-body-replay.js +2 -2
  327. package/dist/http/submit-ctx.d.ts +17 -8
  328. package/dist/http/submit-ctx.js +8 -5
  329. package/dist/http/submit-replay.d.ts +19 -6
  330. package/dist/http/submit-replay.js +18 -6
  331. package/dist/http/sync-submit-body.d.ts +3 -4
  332. package/dist/http/sync-submit-body.js +4 -5
  333. package/dist/http/wire-types.d.ts +4 -3
  334. package/dist/identity-source.d.ts +36 -5
  335. package/dist/identity-source.js +27 -0
  336. package/dist/index.d.ts +4 -1
  337. package/dist/index.js +2 -0
  338. package/dist/key-resolver.d.ts +32 -0
  339. package/dist/key-resolver.js +23 -9
  340. package/dist/leader/diffup.js +2 -1
  341. package/dist/leader/endpoint.d.ts +26 -5
  342. package/dist/leader/endpoint.js +154 -14
  343. package/dist/leader/fanout.d.ts +3 -0
  344. package/dist/leader/fanout.js +78 -63
  345. package/dist/leader/leader.d.ts +16 -0
  346. package/dist/leader/leader.js +43 -3
  347. package/dist/leader/merge.d.ts +9 -1
  348. package/dist/leader/merge.js +16 -1
  349. package/dist/leader/repair-wire.js +1 -1
  350. package/dist/leader/wire.d.ts +36 -3
  351. package/dist/leader/wire.js +59 -18
  352. package/dist/leg-facts.d.ts +7 -2
  353. package/dist/leg-facts.js +1 -0
  354. package/dist/local-store-declaration.d.ts +54 -0
  355. package/dist/local-store-declaration.js +59 -0
  356. package/dist/lsp-evict.d.ts +6 -4
  357. package/dist/lsp-evict.js +2 -3
  358. package/dist/mcp-assertion-header.d.ts +1 -1
  359. package/dist/mcp-assertion-header.js +1 -1
  360. package/dist/memory-operator-faces.d.ts +5 -4
  361. package/dist/memory-operator-faces.js +1 -1
  362. package/dist/memory-project-layer.js +1 -1
  363. package/dist/memory-scope.d.ts +33 -6
  364. package/dist/memory-scope.js +68 -19
  365. package/dist/memory-store-refusal.d.ts +5 -2
  366. package/dist/memory-sync-client.d.ts +3 -2
  367. package/dist/memory-sync-client.js +8 -5
  368. package/dist/model-compat.d.ts +17 -8
  369. package/dist/model-compat.js +6 -2
  370. package/dist/model-context-window.d.ts +57 -0
  371. package/dist/model-context-window.js +21 -0
  372. package/dist/model-entry-headers.d.ts +46 -4
  373. package/dist/model-entry-headers.js +2 -2
  374. package/dist/model-entry-refusal.d.ts +40 -20
  375. package/dist/model-entry-refusal.js +57 -30
  376. package/dist/model-plane-face.d.ts +19 -11
  377. package/dist/model-plane-face.js +9 -1
  378. package/dist/model-plane-probe.d.ts +2 -0
  379. package/dist/model-plane-probe.js +17 -0
  380. package/dist/model-provider.d.ts +3 -3
  381. package/dist/model-reach-scope.d.ts +2 -1
  382. package/dist/model-route-endpoint.d.ts +9 -5
  383. package/dist/model-route-endpoint.js +29 -7
  384. package/dist/model-select.d.ts +16 -0
  385. package/dist/model-select.js +4 -0
  386. package/dist/mountinfo.d.ts +37 -0
  387. package/dist/mountinfo.js +47 -0
  388. package/dist/namespaced-rule-name.d.ts +23 -14
  389. package/dist/namespaced-rule-name.js +8 -11
  390. package/dist/net-address.d.ts +1 -1
  391. package/dist/observability/corrupt-read-seat.d.ts +4 -4
  392. package/dist/observability/corrupt-read-seat.js +5 -3
  393. package/dist/observability/fail-open.d.ts +72 -40
  394. package/dist/observability/fail-open.js +74 -40
  395. package/dist/observability/logger.d.ts +22 -1
  396. package/dist/observability/logger.js +89 -12
  397. package/dist/observability/metrics.js +4 -5
  398. package/dist/observability/otel-exporter.js +2 -1
  399. package/dist/observability/principal-context.d.ts +14 -7
  400. package/dist/observability/principal-context.js +8 -3
  401. package/dist/observability/run-terminal.d.ts +7 -1
  402. package/dist/observability/run-terminal.js +6 -2
  403. package/dist/observability/secret-env-scrub.d.ts +1 -1
  404. package/dist/observability/secret-env-scrub.js +1 -1
  405. package/dist/orchestration/hardened-vm-runner.d.ts +1 -0
  406. package/dist/orchestration/hardened-vm-runner.js +11 -5
  407. package/dist/orchestration/hardened-vm-worker-runner.d.ts +0 -14
  408. package/dist/orchestration/hardened-vm-worker-runner.js +5 -0
  409. package/dist/orchestration/hardened-vm-worker.js +2 -1
  410. package/dist/orchestration/workflow-completion-inbox.d.ts +3 -3
  411. package/dist/orchestration/workflow-completion-inbox.js +3 -2
  412. package/dist/org-delivery-gate.d.ts +36 -10
  413. package/dist/org-delivery-gate.js +12 -8
  414. package/dist/outbound-dispatcher.d.ts +1 -1
  415. package/dist/outbound-dispatcher.js +6 -12
  416. package/dist/owner-brands.d.ts +81 -0
  417. package/dist/owner-brands.js +42 -0
  418. package/dist/owner-faces.d.ts +532 -0
  419. package/dist/owner-faces.js +126 -0
  420. package/dist/park-row-commit.d.ts +67 -0
  421. package/dist/park-row-commit.js +76 -0
  422. package/dist/parked-decide.d.ts +76 -12
  423. package/dist/parked-decide.js +152 -11
  424. package/dist/parked-revive-surface.d.ts +14 -4
  425. package/dist/parked-revive-surface.js +5 -4
  426. package/dist/peer-directory.d.ts +7 -9
  427. package/dist/peer-directory.js +3 -2
  428. package/dist/permission-rule-vocab.d.ts +53 -8
  429. package/dist/permission-rule-vocab.js +30 -2
  430. package/dist/plugins/adoption-log-sql.d.ts +3 -25
  431. package/dist/plugins/adoption-log-sql.js +23 -21
  432. package/dist/plugins/approval-ask-retired-delete-by-task-m50.d.ts +7 -0
  433. package/dist/plugins/approval-ask-retired-delete-by-task-m50.js +17 -0
  434. package/dist/plugins/approval-ask-store-file.d.ts +18 -7
  435. package/dist/plugins/approval-ask-store-file.js +37 -14
  436. package/dist/plugins/approval-ask-store-memory.d.ts +12 -4
  437. package/dist/plugins/approval-ask-store-memory.js +24 -10
  438. package/dist/plugins/approval-ask-store-sql.d.ts +40 -21
  439. package/dist/plugins/approval-ask-store-sql.js +44 -15
  440. package/dist/plugins/approval-exemption-skill-cutoff.d.ts +64 -0
  441. package/dist/plugins/approval-exemption-skill-cutoff.js +122 -0
  442. package/dist/plugins/approval-exemption-skill-m46.d.ts +14 -0
  443. package/dist/plugins/approval-exemption-skill-m46.js +21 -0
  444. package/dist/plugins/approval-exemption-store.d.ts +32 -2
  445. package/dist/plugins/approval-exemption-store.js +42 -19
  446. package/dist/plugins/approval-nonce-store.d.ts +39 -12
  447. package/dist/plugins/approval-nonce-store.js +72 -23
  448. package/dist/plugins/blob-backend.d.ts +2 -0
  449. package/dist/plugins/blob-backend.js +9 -6
  450. package/dist/plugins/caching-session-store.d.ts +13 -1
  451. package/dist/plugins/caching-session-store.js +43 -4
  452. package/dist/plugins/checkpoint-index-columns.d.ts +32 -5
  453. package/dist/plugins/checkpoint-index-columns.js +36 -1
  454. package/dist/plugins/checkpoint-store-face.d.ts +83 -10
  455. package/dist/plugins/checkpoint-store-face.js +18 -1
  456. package/dist/plugins/device-store-sql.js +1 -0
  457. package/dist/plugins/ensure-index.d.ts +13 -1
  458. package/dist/plugins/ensure-index.js +154 -21
  459. package/dist/plugins/ensure-schema-lock-policy.d.ts +36 -18
  460. package/dist/plugins/ensure-schema-lock-policy.js +76 -9
  461. package/dist/plugins/file-run-store.d.ts +85 -32
  462. package/dist/plugins/file-run-store.js +177 -94
  463. package/dist/plugins/host-platform.d.ts +24 -3
  464. package/dist/plugins/host-platform.js +15 -1
  465. package/dist/plugins/image-bake-store-sql.js +2 -0
  466. package/dist/plugins/imported-layer-root-retirement.d.ts +2 -2
  467. package/dist/plugins/k8s-pod-reaper.d.ts +1 -3
  468. package/dist/plugins/k8s-pod-reaper.js +0 -1
  469. package/dist/plugins/leader-run-store-sql.d.ts +22 -0
  470. package/dist/plugins/leader-run-store-sql.js +34 -4
  471. package/dist/plugins/local-checkpoint-store.d.ts +62 -23
  472. package/dist/plugins/local-checkpoint-store.js +197 -77
  473. package/dist/plugins/local-data-dir-modes-m39.js +2 -1
  474. package/dist/plugins/local-data-root-admission.d.ts +52 -0
  475. package/dist/plugins/local-data-root-admission.js +100 -0
  476. package/dist/plugins/local-docker-capacity.d.ts +93 -0
  477. package/dist/plugins/local-docker-capacity.js +194 -0
  478. package/dist/plugins/local-docker-reaper.d.ts +92 -0
  479. package/dist/plugins/local-docker-reaper.js +102 -0
  480. package/dist/plugins/local-engine-high-water.d.ts +29 -6
  481. package/dist/plugins/local-engine-high-water.js +27 -19
  482. package/dist/plugins/local-session-store.d.ts +458 -140
  483. package/dist/plugins/local-session-store.js +906 -292
  484. package/dist/plugins/local-session-window.d.ts +3 -2
  485. package/dist/plugins/local-session-window.js +3 -2
  486. package/dist/plugins/local-sidecar-quarantine.js +3 -2
  487. package/dist/plugins/local-task-attachment-store.d.ts +18 -1
  488. package/dist/plugins/local-task-attachment-store.js +22 -1
  489. package/dist/plugins/memory-embedder.js +9 -7
  490. package/dist/plugins/memory-engine-pg.d.ts +3 -2
  491. package/dist/plugins/memory-engine-pg.js +14 -5
  492. package/dist/plugins/memory-engine-sql-apply.d.ts +8 -4
  493. package/dist/plugins/memory-engine-sql-apply.js +6 -8
  494. package/dist/plugins/memory-engine-tidb.d.ts +4 -2
  495. package/dist/plugins/memory-engine-tidb.js +11 -2
  496. package/dist/plugins/memory-optout-grant-store-sql.d.ts +1 -1
  497. package/dist/plugins/memory-optout-grant-store-sql.js +3 -3
  498. package/dist/plugins/memory-run-store.d.ts +53 -36
  499. package/dist/plugins/memory-run-store.js +116 -88
  500. package/dist/plugins/one-time-migration-marker.d.ts +26 -0
  501. package/dist/plugins/one-time-migration-marker.js +13 -0
  502. package/dist/plugins/one-time-migrations.d.ts +214 -47
  503. package/dist/plugins/one-time-migrations.js +481 -135
  504. package/dist/plugins/org-delivery-quota-store.d.ts +34 -11
  505. package/dist/plugins/org-delivery-quota-store.js +31 -15
  506. package/dist/plugins/permission-rule-store-file.d.ts +3 -3
  507. package/dist/plugins/permission-rule-store-sql.d.ts +5 -64
  508. package/dist/plugins/permission-rule-store-sql.js +11 -95
  509. package/dist/plugins/pg-pool.d.ts +2 -32
  510. package/dist/plugins/pg-pool.js +24 -17
  511. package/dist/plugins/remote-env-device.d.ts +3 -2
  512. package/dist/plugins/remote-env-e2b.d.ts +8 -32
  513. package/dist/plugins/remote-env-e2b.js +44 -32
  514. package/dist/plugins/remote-env-host.d.ts +51 -17
  515. package/dist/plugins/remote-env-host.js +111 -42
  516. package/dist/plugins/remote-env-k8s.d.ts +40 -45
  517. package/dist/plugins/remote-env-k8s.js +111 -60
  518. package/dist/plugins/remote-env-local-docker.d.ts +152 -15
  519. package/dist/plugins/remote-env-local-docker.js +352 -72
  520. package/dist/plugins/remote-scratchpad.js +4 -0
  521. package/dist/plugins/retention-deployment.d.ts +49 -17
  522. package/dist/plugins/retention-deployment.js +39 -8
  523. package/dist/plugins/run-preview-m45.d.ts +11 -0
  524. package/dist/plugins/run-preview-m45.js +19 -0
  525. package/dist/plugins/run-store-sql.d.ts +82 -75
  526. package/dist/plugins/run-store-sql.js +164 -125
  527. package/dist/plugins/s3-answer.d.ts +2 -1
  528. package/dist/plugins/sandbox-reaper.d.ts +26 -0
  529. package/dist/plugins/sandbox-reaper.js +2 -0
  530. package/dist/plugins/scenario-prefix-switch-m42.d.ts +56 -0
  531. package/dist/plugins/scenario-prefix-switch-m42.js +56 -0
  532. package/dist/plugins/scheduler-support.d.ts +16 -1
  533. package/dist/plugins/scheduler-support.js +22 -2
  534. package/dist/plugins/schema-consistency.d.ts +131 -14
  535. package/dist/plugins/schema-consistency.js +388 -18
  536. package/dist/plugins/schema-drift-sentence.d.ts +10 -6
  537. package/dist/plugins/schema-drift-sentence.js +15 -7
  538. package/dist/plugins/schema-ensure-legs.d.ts +9 -0
  539. package/dist/plugins/schema-ensure-legs.js +1 -1
  540. package/dist/plugins/schema-indexes.js +3 -0
  541. package/dist/plugins/schema-live-columns.d.ts +14 -5
  542. package/dist/plugins/schema-live-columns.js +10 -10
  543. package/dist/plugins/send-user-file.js +2 -1
  544. package/dist/plugins/session-birth.d.ts +37 -0
  545. package/dist/plugins/session-birth.js +38 -0
  546. package/dist/plugins/session-epoch-anchor.d.ts +40 -12
  547. package/dist/plugins/session-epoch-anchor.js +33 -11
  548. package/dist/plugins/session-ext-table.d.ts +27 -3
  549. package/dist/plugins/session-ext-table.js +19 -6
  550. package/dist/plugins/session-fork.d.ts +15 -1
  551. package/dist/plugins/session-fork.js +3 -0
  552. package/dist/plugins/session-ownership.d.ts +1 -1
  553. package/dist/plugins/session-placement.d.ts +27 -20
  554. package/dist/plugins/session-placement.js +15 -12
  555. package/dist/plugins/session-row-sql.d.ts +12 -0
  556. package/dist/plugins/session-row-sql.js +3 -3
  557. package/dist/plugins/session-run-rollup.d.ts +29 -0
  558. package/dist/plugins/session-run-rollup.js +40 -0
  559. package/dist/plugins/session-store-sql.d.ts +38 -12
  560. package/dist/plugins/session-store-sql.js +130 -30
  561. package/dist/plugins/session-withdraw-sql.d.ts +36 -0
  562. package/dist/plugins/session-withdraw-sql.js +42 -0
  563. package/dist/plugins/shared-memory-store-sql.d.ts +0 -69
  564. package/dist/plugins/shared-memory-store-sql.js +2 -1
  565. package/dist/plugins/shell-sentinel-owner-m48.d.ts +42 -0
  566. package/dist/plugins/shell-sentinel-owner-m48.js +9 -0
  567. package/dist/plugins/snapshot-bucket-presence.d.ts +2 -1
  568. package/dist/plugins/sql-driver.d.ts +1 -1
  569. package/dist/plugins/sql-driver.js +2 -1
  570. package/dist/plugins/sql-errors.d.ts +32 -5
  571. package/dist/plugins/sql-errors.js +55 -7
  572. package/dist/plugins/sql-json-column.d.ts +8 -7
  573. package/dist/plugins/sql-json-column.js +10 -6
  574. package/dist/plugins/stop-then-start-sentence.d.ts +16 -0
  575. package/dist/plugins/stop-then-start-sentence.js +7 -0
  576. package/dist/plugins/store-backend.d.ts +99 -16
  577. package/dist/plugins/store-backend.js +230 -65
  578. package/dist/plugins/store-contracts.d.ts +123 -33
  579. package/dist/plugins/store-contracts.js +38 -1
  580. package/dist/plugins/store-fault.d.ts +28 -2
  581. package/dist/plugins/store-fault.js +20 -2
  582. package/dist/plugins/task-attachment-store.d.ts +15 -3
  583. package/dist/plugins/task-attachment-store.js +22 -9
  584. package/dist/plugins/tidb-pool.d.ts +11 -6
  585. package/dist/plugins/tidb-pool.js +39 -18
  586. package/dist/plugins/web-search.js +5 -3
  587. package/dist/plugins/workflow-run-store-sql.d.ts +6 -1
  588. package/dist/plugins/workflow-run-store-sql.js +11 -5
  589. package/dist/plugins/workspace-custody.d.ts +44 -0
  590. package/dist/plugins/workspace-custody.js +47 -0
  591. package/dist/principal-jwt.d.ts +4 -4
  592. package/dist/principal-jwt.js +20 -5
  593. package/dist/principal-shape.d.ts +41 -0
  594. package/dist/principal-shape.js +19 -0
  595. package/dist/project-identity.d.ts +8 -7
  596. package/dist/project-identity.js +40 -17
  597. package/dist/project-layer-key.d.ts +13 -2
  598. package/dist/project-layer-key.js +9 -1
  599. package/dist/question.d.ts +13 -23
  600. package/dist/question.js +21 -39
  601. package/dist/read-deny-floor-notice.d.ts +36 -0
  602. package/dist/read-deny-floor-notice.js +40 -0
  603. package/dist/{plain-string-record.d.ts → request-declaration-disposition.d.ts} +9 -23
  604. package/dist/request-declaration-disposition.js +39 -0
  605. package/dist/request-declaration-refusal.d.ts +35 -12
  606. package/dist/request-declaration-refusal.js +21 -9
  607. package/dist/request-form.d.ts +58 -0
  608. package/dist/request-form.js +72 -0
  609. package/dist/request-image-urls.d.ts +8 -2
  610. package/dist/request-image-urls.js +2 -1
  611. package/dist/request-images.d.ts +20 -0
  612. package/dist/request-images.js +59 -0
  613. package/dist/request-key-closure.d.ts +6 -7
  614. package/dist/request-key-closure.js +15 -2
  615. package/dist/resource-suspend.d.ts +7 -16
  616. package/dist/resource-suspend.js +1 -1
  617. package/dist/retired-name-host-notice.d.ts +21 -0
  618. package/dist/retired-name-host-notice.js +12 -0
  619. package/dist/rule-entry-list.d.ts +2 -2
  620. package/dist/rule-entry-list.js +3 -4
  621. package/dist/rule-issue-reading.d.ts +58 -0
  622. package/dist/rule-issue-reading.js +14 -0
  623. package/dist/rules-consent.d.ts +5 -3
  624. package/dist/rules-consent.js +1 -0
  625. package/dist/run-acceptance.d.ts +3 -1
  626. package/dist/run-acceptance.js +3 -0
  627. package/dist/run-cancel-card.d.ts +28 -0
  628. package/dist/run-cancel-card.js +19 -0
  629. package/dist/run-cancel-context.d.ts +10 -0
  630. package/dist/run-cancel-context.js +1 -0
  631. package/dist/run-local.d.ts +14 -6
  632. package/dist/run-local.js +117 -90
  633. package/dist/run-stale-default.d.ts +7 -0
  634. package/dist/run-stale-default.js +2 -0
  635. package/dist/runs.d.ts +56 -21
  636. package/dist/runs.js +73 -43
  637. package/dist/runtime-caps-resolver.d.ts +21 -6
  638. package/dist/runtime-caps-resolver.js +17 -4
  639. package/dist/runtime-governance.d.ts +2 -2
  640. package/dist/runtime-governance.js +5 -3
  641. package/dist/sealed-key-layout.d.ts +12 -5
  642. package/dist/sealed-key-layout.js +5 -0
  643. package/dist/sealed-key.d.ts +12 -2
  644. package/dist/sealed-key.js +115 -27
  645. package/dist/security.d.ts +128 -158
  646. package/dist/security.js +163 -59
  647. package/dist/sema-config-dir.d.ts +20 -0
  648. package/dist/sema-config-dir.js +25 -0
  649. package/dist/server-secret-env.d.ts +55 -25
  650. package/dist/server-secret-env.js +75 -22
  651. package/dist/session-agent.d.ts +3 -2
  652. package/dist/session-children-retire.d.ts +13 -8
  653. package/dist/session-children-retire.js +9 -7
  654. package/dist/session-deletion.d.ts +88 -0
  655. package/dist/session-deletion.js +8 -0
  656. package/dist/session-erase.d.ts +145 -0
  657. package/dist/session-erase.js +115 -0
  658. package/dist/session-error-wire.d.ts +5 -5
  659. package/dist/session-error-wire.js +1 -1
  660. package/dist/session-incarnation.d.ts +52 -5
  661. package/dist/session-incarnation.js +19 -2
  662. package/dist/session-policy-wire.d.ts +6 -3
  663. package/dist/session-policy-wire.js +11 -1
  664. package/dist/session-resident-background.d.ts +0 -71
  665. package/dist/session-resident-background.js +4 -3
  666. package/dist/session-row.d.ts +2 -1
  667. package/dist/session-rules-seat.d.ts +12 -0
  668. package/dist/session-rules-seat.js +19 -0
  669. package/dist/session-titler.d.ts +7 -15
  670. package/dist/session-titler.js +1 -1
  671. package/dist/session-workspace.d.ts +3 -3
  672. package/dist/spec-fields.d.ts +57 -3
  673. package/dist/spec-fields.js +72 -51
  674. package/dist/store-admission.d.ts +33 -0
  675. package/dist/store-admission.js +49 -0
  676. package/dist/store-posture.d.ts +141 -20
  677. package/dist/store-posture.js +205 -3
  678. package/dist/stored-request-hooks-m20.js +2 -2
  679. package/dist/stores-sql/background-agent-store-sql.d.ts +11 -2
  680. package/dist/stores-sql/background-agent-store-sql.js +73 -20
  681. package/dist/stores-sql/checkpoint-store-sql.d.ts +34 -29
  682. package/dist/stores-sql/checkpoint-store-sql.js +78 -49
  683. package/dist/stores-sql/file-history-store-sql.d.ts +1 -1
  684. package/dist/stores-sql/file-history-store-sql.js +3 -5
  685. package/dist/stores-sql/mailbox-store-sql.d.ts +7 -4
  686. package/dist/stores-sql/mailbox-store-sql.js +31 -32
  687. package/dist/stores-sql/pg-session-storage.d.ts +7 -5
  688. package/dist/stores-sql/pg-session-storage.js +54 -46
  689. package/dist/stores-sql/retention-store-sql.d.ts +87 -19
  690. package/dist/stores-sql/retention-store-sql.js +92 -27
  691. package/dist/stores-sql/session-policy-store-sql.d.ts +32 -10
  692. package/dist/stores-sql/session-policy-store-sql.js +44 -36
  693. package/dist/stores-sql/session-write-hooks.d.ts +12 -6
  694. package/dist/stores-sql/tidb-session-storage.d.ts +4 -4
  695. package/dist/stores-sql/tidb-session-storage.js +13 -8
  696. package/dist/stores-sql/tidb-session-store.d.ts +36 -17
  697. package/dist/stores-sql/tidb-session-store.js +69 -39
  698. package/dist/stores-sql/tool-result-store-sql.d.ts +1 -1
  699. package/dist/stores-sql/tool-result-store-sql.js +4 -6
  700. package/dist/stores-sql/windowed-session-storage.d.ts +5 -0
  701. package/dist/stores-sql/windowed-session-storage.js +9 -0
  702. package/dist/submission-exit.d.ts +50 -0
  703. package/dist/submission-exit.js +108 -0
  704. package/dist/task-a2a.d.ts +3 -8
  705. package/dist/task-a2a.js +28 -30
  706. package/dist/task-cwd.d.ts +43 -7
  707. package/dist/task-cwd.js +11 -0
  708. package/dist/task-mcp.d.ts +3 -3
  709. package/dist/task-mcp.js +4 -4
  710. package/dist/task-settings.d.ts +14 -10
  711. package/dist/task-settings.js +19 -7
  712. package/dist/terminal.d.ts +27 -43
  713. package/dist/terminal.js +49 -14
  714. package/dist/tool-approval.d.ts +173 -163
  715. package/dist/tool-approval.js +247 -232
  716. package/dist/trace/core-keyset-guard.d.ts +13 -6
  717. package/dist/trace/core-vocab-wire.d.ts +95 -0
  718. package/dist/trace/core-vocab-wire.js +15 -0
  719. package/dist/trace/engine-notice-wire.d.ts +24 -21
  720. package/dist/trace/engine-notice-wire.js +7 -3
  721. package/dist/trace/exit-seat.d.ts +30 -4
  722. package/dist/trace/exit-seat.js +40 -36
  723. package/dist/trace/extension-call-face.d.ts +3 -2
  724. package/dist/trace/extension-call-face.js +3 -1
  725. package/dist/trace/ledger-events.d.ts +4 -7
  726. package/dist/trace/ledger-sink.d.ts +4 -31
  727. package/dist/trace/ledger-sink.js +0 -11
  728. package/dist/trace/model-segment.d.ts +5 -5
  729. package/dist/trace/model-segment.js +5 -5
  730. package/dist/trace/project.d.ts +59 -44
  731. package/dist/trace/project.js +60 -26
  732. package/dist/trace/redact.d.ts +135 -27
  733. package/dist/trace/redact.js +884 -260
  734. package/dist/trace/self-minted-wire.d.ts +567 -20
  735. package/dist/trace/self-minted-wire.js +205 -24
  736. package/dist/trace/wire-projection-faces.d.ts +5 -6
  737. package/dist/trace/wire-projection-faces.js +2 -2
  738. package/dist/upstream-body.d.ts +23 -0
  739. package/dist/upstream-body.js +16 -0
  740. package/dist/url-refusal.d.ts +3 -3
  741. package/dist/url-refusal.js +11 -4
  742. package/dist/user-authored-text.d.ts +1 -1
  743. package/dist/user-input-ledger.d.ts +7 -8
  744. package/dist/user-input-ledger.js +1 -1
  745. package/dist/web-admin-client/apply-effective.d.ts +6 -3
  746. package/dist/web-admin-client/apply-effective.js +33 -23
  747. package/dist/web-admin-client/apply-ledger.d.ts +16 -7
  748. package/dist/web-admin-client/apply-ledger.js +5 -2
  749. package/dist/web-admin-client/center-request.d.ts +2 -2
  750. package/dist/web-admin-client/center-request.js +15 -15
  751. package/dist/web-admin-client/effective-keys.d.ts +1 -1
  752. package/dist/web-admin-client/effective-keys.js +1 -1
  753. package/dist/web-admin-client/entry-metadata.d.ts +8 -0
  754. package/dist/web-admin-client/entry-metadata.js +13 -0
  755. package/dist/web-admin-client/http-client.d.ts +1 -1
  756. package/dist/web-admin-client/http-client.js +23 -4
  757. package/dist/web-admin-client/mcp-revocation.d.ts +1 -1
  758. package/dist/web-admin-client/mcp-revocation.js +2 -1
  759. package/dist/web-admin-client/read-warnings.d.ts +1 -0
  760. package/dist/web-admin-client/read-warnings.js +1 -0
  761. package/dist/web-admin-client/restart-signal.js +8 -4
  762. package/dist/web-admin-client/skills-mcp.d.ts +2 -2
  763. package/dist/web-admin-client/types.d.ts +1 -2
  764. package/dist/workspace-space.d.ts +3 -2
  765. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +4 -4
  766. package/docs/error-text-lexicon.json +317 -0
  767. package/package.json +8 -3
  768. package/scripts/drain-check-local.mjs +118 -147
  769. package/scripts/drain-check.mysql.sql +22 -2
  770. package/scripts/drain-check.pg.sql +22 -2
  771. package/scripts/embed-minimal.mjs +183 -0
  772. package/wire-changes/server@7.148.0.json +1517 -0
  773. package/wire-changes/server@7.149.0.json +372 -0
  774. package/dist/http/memory-control-plane-corrupt-reply.d.ts +0 -25
  775. package/dist/http/memory-control-plane-corrupt-reply.js +0 -19
  776. package/dist/http/memory-layer-reply.d.ts +0 -30
  777. package/dist/http/memory-layer-reply.js +0 -24
  778. package/dist/lsp/e2b-bridge.d.ts +0 -57
  779. package/dist/lsp/e2b-bridge.js +0 -139
  780. package/dist/lsp/e2b-manager.d.ts +0 -93
  781. package/dist/lsp/e2b-manager.js +0 -178
  782. package/dist/lsp/lsp-frames.d.ts +0 -14
  783. package/dist/lsp/lsp-frames.js +0 -25
  784. package/dist/lsp/manager.d.ts +0 -129
  785. package/dist/lsp/manager.js +0 -127
  786. package/dist/lsp/types.d.ts +0 -12
  787. package/dist/lsp/types.js +0 -2
  788. package/dist/lsp/ws-transport.d.ts +0 -40
  789. package/dist/lsp/ws-transport.js +0 -210
  790. package/dist/plain-string-record.js +0 -70
@@ -33,8 +33,22 @@ export const SELF_MINTED_WIRE = {
33
33
  client_disconnected: { attr: "-", since: "7.112.0" },
34
34
  ask_park_grace_exhausted: { attr: "-", since: "7.112.0" },
35
35
  cancel_verb: { attr: "-", since: "7.112.0" },
36
+ stall_verdict: { attr: "-", since: "7.148.0" },
36
37
  },
37
38
  },
39
+ runResultSideKey: {
40
+ at: "run 结果顶层侧记键(GET /v1/runs/:id → result · done.result · POST /v1/tasks 200 体顶层 · 账本 done 行 result;<键> → 在场律)",
41
+ members: {
42
+ readDenyFloor: { attr: "present-iff the run went ahead while its read-deny rules are not byte-enforced (rows, an execution environment that does not keep the floor, READ_DENY_FLOOR_REQUIRED unset); { code, message } equals that run's engine_notice frame", since: "7.149.0" },
43
+ },
44
+ },
45
+ runStallVerdictFace: {
46
+ at: "run 流死亡终帧键 · 会话占用冲突体键",
47
+ members: {
48
+ "GET /v1/runs/:id/events#failed.errorCode(死亡判决的终帧从行合成时恒在场 = 行上的码 run.stalled / run.orphaned;本连接已投账本终帧则不合成)": { attr: "verdict", since: "7.148.0" },
49
+ },
50
+ retired: {},
51
+ },
38
52
  sessionMemoryEraseStatus: {
39
53
  at: "POST /v1/sessions/:id/memory/erase(已分类拒 errorCode → HTTP 状态)",
40
54
  members: {
@@ -46,6 +60,7 @@ export const SELF_MINTED_WIRE = {
46
60
  "memory.erasure_selector_mismatch": { attr: 409, since: "7.108.0" },
47
61
  "memory.erasure_census_incomplete": { attr: 409, since: "7.108.0" },
48
62
  "internal.memory_control_plane_corrupt": { attr: 500, since: "7.108.0" },
63
+ "request.memory_layer": { attr: 400, since: "7.148.0" },
49
64
  },
50
65
  },
51
66
  askTerminalReason: {
@@ -262,6 +277,38 @@ export const SELF_MINTED_WIRE = {
262
277
  sessionResident: { attr: "always within inflightBreakdown", since: "7.146.0" },
263
278
  },
264
279
  },
280
+ healthSandboxCapacityKey: {
281
+ at: "GET /health sandboxCapacity",
282
+ members: {
283
+ lane: { attr: "always within sandboxCapacity", since: "7.148.0" },
284
+ limit: { attr: "always within sandboxCapacity", since: "7.148.0" },
285
+ inUse: { attr: "always within sandboxCapacity (null until a successful daemon reading)", since: "7.148.0" },
286
+ readAt: { attr: "always within sandboxCapacity (null until the first daemon reading)", since: "7.148.0" },
287
+ waiting: { attr: "always within sandboxCapacity", since: "7.148.0" },
288
+ },
289
+ },
290
+ healthStoreKey: {
291
+ at: "GET /health store",
292
+ members: {
293
+ durability: { attr: "always", since: "7.148.0" },
294
+ },
295
+ },
296
+ storeDurability: {
297
+ at: "GET /health store.durability · GET /v1/capabilities store.durability",
298
+ members: {
299
+ durable: { attr: "-", since: "7.148.0" },
300
+ ephemeral: { attr: "-", since: "7.148.0" },
301
+ unknown: { attr: "-", since: "7.148.0" },
302
+ },
303
+ },
304
+ healthAutoBackgroundOnTimeout: {
305
+ at: "GET /health autoBackgroundOnTimeout",
306
+ members: {
307
+ armed: { attr: "-", since: "7.148.0" },
308
+ off: { attr: "-", since: "7.148.0" },
309
+ unsupported: { attr: "-", since: "7.148.0" },
310
+ },
311
+ },
265
312
  healthEngineLeaseKey: {
266
313
  at: "GET /health engineLease",
267
314
  members: {
@@ -325,6 +372,15 @@ export const SELF_MINTED_WIRE = {
325
372
  members: {
326
373
  supportsThinkingOff: { attr: "always", since: "7.138.0" },
327
374
  thinkingLevelMap: { attr: "present-iff declared", since: "7.147.0" },
375
+ defaultThinking: { attr: "present-iff declared", since: "7.148.0" },
376
+ contextWindowSource: { attr: "present-iff contextWindow is present", since: "7.149.0" },
377
+ },
378
+ },
379
+ modelsContextWindowSource: {
380
+ at: "GET /v1/models models[].contextWindowSource(present-iff contextWindow)",
381
+ members: {
382
+ declared: { attr: "-", since: "7.149.0" },
383
+ assumed: { attr: "-", since: "7.149.0" },
328
384
  },
329
385
  },
330
386
  modelsRowAnthropicCompatKey: {
@@ -443,25 +499,37 @@ export const SELF_MINTED_WIRE = {
443
499
  "approval_request#requestedBy": { attr: "present-iff extension-initiated call", since: "7.138.0" },
444
500
  },
445
501
  },
446
- fieldConflictKind: {
447
- at: "400 request.field_conflict detail.kind",
502
+ fieldConflictReason: {
503
+ at: "400 / 409 / 422 request.field_conflict reason",
504
+ members: {
505
+ cascade_verify: { attr: "-", since: "7.148.0" },
506
+ image_profile: { attr: "-", since: "7.148.0" },
507
+ resume_anchor: { attr: "-", since: "7.148.0" },
508
+ system_prompt_fold: { attr: "-", since: "7.148.0" },
509
+ file_history_restore: { attr: "-", since: "7.148.0" },
510
+ skills_disabled: { attr: "-", since: "7.148.0" },
511
+ existing_session: { attr: "-", since: "7.148.0" },
512
+ fork_target: { attr: "-", since: "7.148.0" },
513
+ scratchpad_root: { attr: "-", since: "7.148.0" },
514
+ ask_answer: { attr: "-", since: "7.148.0" },
515
+ policy_person_ask: { attr: "-", since: "7.148.0" },
516
+ plan_edit: { attr: "-", since: "7.148.0" },
517
+ plan_mode_after: { attr: "-", since: "7.148.0" },
518
+ bound_call_door: { attr: "-", since: "7.148.0" },
519
+ remember_decision: { attr: "-", since: "7.148.0" },
520
+ approval_feedback: { attr: "-", since: "7.148.0" },
521
+ },
522
+ },
523
+ hooksRefusalReason: {
524
+ at: "400 request.field_invalid reason(settings.hooks 面)",
448
525
  members: {
449
- cascade_verify: { attr: "-", since: "7.133.0" },
450
- image_profile: { attr: "-", since: "7.133.0" },
451
- resume_anchor: { attr: "-", since: "7.133.0" },
452
- system_prompt_fold: { attr: "-", since: "7.133.0" },
453
- file_history_restore: { attr: "-", since: "7.133.0" },
454
- skills_disabled: { attr: "-", since: "7.133.0" },
455
- existing_session: { attr: "-", since: "7.133.0" },
456
- fork_target: { attr: "-", since: "7.139.0" },
457
- scratchpad_root: { attr: "-", since: "7.133.0" },
458
- ask_answer: { attr: "-", since: "7.133.0" },
459
- policy_person_ask: { attr: "-", since: "7.133.0" },
460
- plan_edit: { attr: "-", since: "7.133.0" },
461
- plan_mode_after: { attr: "-", since: "7.133.0" },
462
- bound_call_door: { attr: "-", since: "7.133.0" },
463
- remember_decision: { attr: "-", since: "7.133.0" },
464
- approval_feedback: { attr: "-", since: "7.134.0" },
526
+ dead_alias: { attr: "-", since: "7.148.0" },
527
+ over_budget: { attr: "-", since: "7.148.0" },
528
+ budget_exceeded: { attr: "-", since: "7.148.0" },
529
+ invalid_regex: { attr: "-", since: "7.148.0" },
530
+ unsupported_entry_type: { attr: "-", since: "7.148.0" },
531
+ unnamed_refusal: { attr: "-", since: "7.148.0" },
532
+ wire_key_invalid: { attr: "-", since: "7.148.0" },
465
533
  },
466
534
  },
467
535
  limitRefusalReason: {
@@ -473,7 +541,7 @@ export const SELF_MINTED_WIRE = {
473
541
  },
474
542
  },
475
543
  entryProblemServerReason: {
476
- at: "400/409/422 detail.problems[].reason · 受理应答 warnings[].reason(本仓自铸的词)",
544
+ at: "400/409/422 problems[].reason · 受理应答 warnings[].reason(本仓自铸的词)",
477
545
  members: {
478
546
  not_in_roster: { attr: "-", since: "7.133.0" },
479
547
  home_unresolvable: { attr: "-", since: "7.133.0" },
@@ -487,9 +555,30 @@ export const SELF_MINTED_WIRE = {
487
555
  },
488
556
  },
489
557
  rateExceededReason: {
490
- at: "429 limit.rate_exceeded reason(在飞 run 并发帽;其余产地不带 reason)",
558
+ at: "429 limit.rate_exceeded reason(在飞 run 并发帽 / 沙箱容量;其余产地不带 reason)",
491
559
  members: {
492
560
  run_concurrency_cap: { attr: "-", since: "7.146.0" },
561
+ sandbox_capacity: { attr: "-", since: "7.148.0" },
562
+ },
563
+ },
564
+ parkedRollbackWord: {
565
+ at: "409 decide.revive_rejected / 500 decide.revive_failed / 422 parked_resume.startup_failed / 409 decide.agent_definition_unavailable rollback(本次 decide 那一次补滚时认领的去向)",
566
+ members: {
567
+ rolled_back: { attr: "-", since: "1.267.0" },
568
+ failed: { attr: "-", since: "1.267.0" },
569
+ retry: { attr: "-", since: "1.267.0" },
570
+ lost: { attr: "-", since: "1.267.0" },
571
+ },
572
+ },
573
+ workflowParkDeliveryResult: {
574
+ at: "POST /v1/approvals/:id/decide · 应答口(workflow 子代停驻卡,持有它的 run 在本进程里跑):引擎答词 → 应答",
575
+ members: {
576
+ 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" },
578
+ 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" },
493
582
  },
494
583
  },
495
584
  settingsEnvCredentialMatch: {
@@ -528,6 +617,19 @@ export const SELF_MINTED_WIRE = {
528
617
  "POST /v1/runs|/v1/tasks Idempotency-Key#conflict.run_exists": { attr: 409, since: "7.125.0" },
529
618
  "POST /v1/runs|/v1/tasks Idempotency-Key#conflict.idempotency_payload_mismatch": { attr: 409, since: "7.126.0" },
530
619
  "POST /v1/tasks|/v1/tasks/stream#replay_first_answer_envelope(同键重放的体 = 首答的信封 + replay: true:终局 = 引擎结果(result 是串),停驻 = 结果 + 回执三键,行还在跑 = 回执三键;流式腿放进 done.result)": { attr: 200, since: "7.142.0" },
620
+ "POST /v1/tasks|/v1/tasks/stream#replay_bit_one_rule(replay: true ⇔ 200 结局不是本次请求产出的:读行重放 + 在飞合流的跟随方,两腿同读;拒绝永不带位;流式终帧 done.replay = done.result.replay)": { attr: 200, since: "7.148.0" },
621
+ },
622
+ },
623
+ leaderStopFace: {
624
+ at: "leader 停止面(<端点>#<形> → 应答状态 / 键在场律)",
625
+ members: {
626
+ "POST /v1/leader/:id/cancel#running(翻耐久取消旗;驱动副本当场或下一个存活心跳拍中止;体 leaderRunId + status:cancelling + cancelRequested:true)": { attr: 202, since: "7.148.0" },
627
+ "POST /v1/leader/:id/cancel#terminal(幂等;过期这条 run 留下的待决 worker 停驻;体 leaderRunId + 终局 status + cancelRequested + note)": { attr: 202, since: "7.148.0" },
628
+ "POST /v1/leader/:id/cancel#not_visible(不存在 / 不是你的;与 GET 同一 not_found.leader_run)": { attr: 404, since: "7.148.0" },
629
+ "POST /v1/leader/:id/cancel#terminal_parks_settled_concurrently(终局臂过期 worker 停驻时 CAS 输给并发的决断 / 过期;conflict.approval_settled)": { attr: 409, since: "7.148.0" },
630
+ "GET /v1/leader/:id|?idempotencyKey#cancelRequested": { attr: "always (the durable cancel flag; flips only while running)", since: "7.148.0" },
631
+ "GET /v1/leader/:id|?idempotencyKey#errorCode": { attr: "present-iff the run stopped at an abort checkpoint by the cancel verb (value cancelled)", since: "7.148.0" },
632
+ "GET /v1/leader/:id|?idempotencyKey#result.stopped": { attr: "present-iff (true) the run stopped at an abort checkpoint", since: "7.148.0" },
531
633
  },
532
634
  },
533
635
  builtinScenario: {
@@ -568,6 +670,21 @@ export const SELF_MINTED_WIRE = {
568
670
  effectiveValueWithheld: { attr: "present-iff", since: "7.133.0" },
569
671
  },
570
672
  },
673
+ autoModeRefusedBy: {
674
+ at: "GET /v1/capabilities permissionModeAuto.refusedBy(仅 reason:org_denied 且中心亲口拒时在场)",
675
+ members: {
676
+ "center.autoMode": { attr: "-", since: "7.148.0" },
677
+ "center.allowAutoMode": { attr: "-", since: "7.148.0" },
678
+ both: { attr: "-", since: "7.148.0" },
679
+ },
680
+ },
681
+ configCatalogCredentialPolicy: {
682
+ at: "GET /v1/config/catalog rows[].credentialPolicy(url 型行恒在场)",
683
+ members: {
684
+ refuse: { attr: "-", since: "7.148.0" },
685
+ mask: { attr: "-", since: "7.148.0" },
686
+ },
687
+ },
571
688
  modelsResponseKey: {
572
689
  at: "GET /v1/models 应答体顶层键(<键> → 在场律)",
573
690
  members: {
@@ -700,6 +817,13 @@ export const SELF_MINTED_WIRE = {
700
817
  thrownName: { attr: "present-iff the engine named what its row judge saw thrown (non-empty string)", since: "7.144.0" },
701
818
  },
702
819
  },
820
+ rowRefusalWayOut: {
821
+ at: "409 决断类续跑拒体(/decide · /plan_review · /resume;判官判那张卡续不了)wayOut",
822
+ members: {
823
+ cancel_run: { attr: "-", since: "7.149.0" },
824
+ newer_worker: { attr: "-", since: "7.149.0" },
825
+ },
826
+ },
703
827
  permissionModeVerbBodyKey: {
704
828
  at: "POST /v1/runs/:id/permission-mode 200 体(<键> → 在场律)",
705
829
  members: {
@@ -822,7 +946,26 @@ export const SELF_MINTED_WIRE = {
822
946
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#settings.env 有成员不是帽内的串(新提交;只在采纳 env 的车道上:单用户 host / device,或采纳请求体 hooks 且请求带着 hooks;零 run;体 request.field_invalid + field settings.env,句子点名坐标、不回显值)": { attr: 400, since: "7.147.0" },
823
947
  "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" },
824
948
  "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" },
825
- },
949
+ "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" },
953
+ "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" },
960
+ "POST /v1/tasks#park_commit_ended(同步腿停在要批的门上,而停驻提交答出这条 run 没有停住、已收场 —— 停驻写之前已按下取消 / 被失联收割 / 别处终结;卡已作废;体 = 收场那一行的信封,与同键重放同一只:终局行的结果,取消那一形 terminal.code cancelled;行上无结果 ⇒ 回执三键)": { attr: 200, since: "7.149.0" },
961
+ "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
+ "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" },
966
+ "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" },
967
+ },
968
+ retired: {},
826
969
  },
827
970
  ruleImportReceiptKey: {
828
971
  at: "POST /v1/rules/cc-import/redeem 200 回执顶层键(<键> → 在场律;与 POST /v1/rules/local-import/redeem 同形)",
@@ -888,6 +1031,23 @@ export const SELF_MINTED_WIRE = {
888
1031
  "409 conflict.session_memory_unobserved#reason": { attr: "always;closed set sessionMemoryUnobservedReason, judged in read order (no settled run → the latest settled run's observation gives no read set: empty observation or memory not mounted → no leaf);the message is a function of reason", since: "7.143.0" },
889
1032
  },
890
1033
  },
1034
+ ownerFaceAnswer: {
1035
+ at: "属主门的逐口答复(<口>#<调用方 × 行> → 状态 errorCode;其余各口的码与句逐字不变)",
1036
+ members: {
1037
+ "POST /v1/tasks · /v1/tasks/stream · /v1/runs (sessionId)#others-owned-session": { attr: "404 resume.session_not_found (requireExistingSession: session does not exist (resume.session_not_found)), same body as a missing session; was 403 auth.forbidden (named caller) / 401 auth.unauthorized (no principal)", since: "7.148.0" },
1038
+ "POST /v1/tasks · /v1/tasks/stream · /v1/runs (sessionId)#ownerless-placed-session": { attr: "404 resume.session_not_found at the owner gate, same body as a missing session (assemblies without an execution seat too); not judged when the session's archive cannot be read", since: "7.148.0" },
1039
+ "POST /v1/assistant/tasks/:id/plan_review#direct-door-valid-proof-others-task": { attr: "401 principal_unverified (principal proof required), same body as a missing row; was 404 not_found.run (task not found)", since: "7.148.0" },
1040
+ "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
+ "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
+ "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" },
1044
+ "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
+ "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
+ "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" },
1047
+ "GET /v1/tool-approvals/:id#ask-not-visible-to-caller(查无 / 不是调用方的 / 行读不出 / 本 worker 没有问账)": { attr: "404 not_found.ask, the same body as the respond door; 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" },
1048
+ "GET /v1/workflows/:id · /journal · /stream · POST /v1/workflows/:id/agents/:label/steer#session-assertion-mismatch": { attr: "404 not_found.workflow (workflow not found), same body as a missing workflow; was 404 not_found.run (workflow not found)", since: "7.148.0" },
1049
+ },
1050
+ },
891
1051
  sessionRewindFilesWire: {
892
1052
  at: "POST /v1/sessions/:id/rewind-files(<面>#<键> → 读法 / 在场律)",
893
1053
  members: {
@@ -950,6 +1110,19 @@ export const SELF_MINTED_WIRE = {
950
1110
  no_leaf: { attr: "-", since: "7.143.0" },
951
1111
  },
952
1112
  },
1113
+ declarationRefusalBodyKey: {
1114
+ at: "400 request.field_invalid 的声明列表拒体(<键> → 在场律;mcpServers · a2aPeers · images)",
1115
+ members: {
1116
+ field: { attr: "always on a list-level, entry-level, key-value or URL-credential refusal; the body coordinate the sentence names (mcpServers[i].<path> · a2aPeers[i] · images)", since: "7.148.0" },
1117
+ index: { attr: "present-iff the refusal is entry-level (entry not an object · a key value · URL credential): the entry's position in the list; absent on list-level and over_cap refusals", since: "7.148.0" },
1118
+ },
1119
+ },
1120
+ notBooleanRefusalBodyKey: {
1121
+ at: "400 request.field_invalid 的「必须是布尔」一族拒体(<键> → 在场律)",
1122
+ members: {
1123
+ field: { attr: "always; the body coordinate the sentence names (e.g. promptLean · attachments.mcpUnavailable · settings.ultracode · resilience.allowDegrade)", since: "7.148.0" },
1124
+ },
1125
+ },
953
1126
  decideRequiresBindingBodyKey: {
954
1127
  at: "400 decide_requires_binding 拒体(<键> → 在场律)",
955
1128
  members: {
@@ -961,6 +1134,7 @@ export const SELF_MINTED_WIRE = {
961
1134
  members: {
962
1135
  "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" },
963
1136
  "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
+ "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" },
964
1138
  "409 decide.row_unrevivable#no_root_anchor": { attr: "ends: deny it to close the card (the agent then ends as failed)", since: "7.136.0" },
965
1139
  "400 request.field_invalid#mcpServers.over_cap(受理口 · POST /v1/capabilities/mcp/probe 同句)": { attr: "head: <field> has <count> entries — at most <cap> are accepted", since: "7.136.0" },
966
1140
  "400 request.field_invalid#a2aPeers.over_cap": { attr: "tail: 声明列表拒绝骨架的句尾(与 mcpServers 共用 request-declaration-refusal)", since: "7.136.0" },
@@ -970,6 +1144,11 @@ export const SELF_MINTED_WIRE = {
970
1144
  "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" },
971
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" },
972
1146
  "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
+ "400 request.field_invalid#images.not_array": { attr: "head: images is <shape>, not an array of image entries", since: "7.148.0" },
1148
+ "400 request.field_invalid#images[i].not_object": { attr: "head: images[i] is <shape>, not an image entry (an object)", since: "7.148.0" },
1149
+ "400 request.field_invalid#images[i].<key>.unusable": { attr: "<field> is not a usable declaration — must be a string (…) — got <shape>. The request is refused rather than handing the engine an image it cannot read: … Fix the entry (an image is either { data, mimeType } or { url }).", since: "7.148.0" },
1150
+ "400 request.body_shape#images[i].unknown_key": { attr: "body: unrecognized key(s) on an image entry — refused rather than dropped …; Accepted: <keys of the form>", since: "7.148.0" },
1151
+ "400 request.field_invalid#settings.env.compose": { attr: "settings.env cannot be composed into a child process environment — <the engine's verdict, sanitized>. The request is refused rather than accepted into a task whose hooks and shell would fail to start: fix or remove the variable concerned", since: "7.148.0" },
973
1152
  "400 request.field_invalid#settings.permissions.deny|ask.bad_entry": { attr: "<field>[<index>] is neither a non-empty rule string nor a { \"rule\", \"layer\" } entry (…) — every entry must be one. …", since: "7.141.0" },
974
1153
  "400 request.field_invalid#settings.permissions.allow.bad_entry": { attr: "<field>[<index>] is neither a rule string nor a { \"rule\", \"layer\" } entry (…) — every entry must be one. …", since: "7.143.0" },
975
1154
  "400 request.field_invalid#a2aPeers.not_array": { attr: "head: a2aPeers is <shape>, not an array of A2A peer declarations", since: "7.136.0" },
@@ -1130,7 +1309,7 @@ export const SELF_MINTED_WIRE = {
1130
1309
  "GET /v1/config/catalog#rows[MCP_ELICITATION_TTL_MS].derivedDefaultNote": { attr: "default-window-source:server", since: "7.136.0" },
1131
1310
  "GET /v1/config/catalog#rows[ANTHROPIC_API_KEY].semantics": { attr: "x-api-key-only;mutually-exclusive;both-set-refuses-boot", since: "7.136.0" },
1132
1311
  "GET /v1/config/catalog#rows[ANTHROPIC_AUTH_TOKEN].semantics": { attr: "bearer-only;mutually-exclusive;both-set-refuses-boot", since: "7.136.0" },
1133
- "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_BUCKET].semantics": { attr: "boot-checks-bucket;runtime-latest-no-such-bucket-fails-run", since: "7.136.0" },
1312
+ "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_BUCKET].semantics": { attr: "boot-checks-bucket;runtime-latest-no-such-bucket-fails-run;default-name-shared-with-MINIO_BUCKET", since: "7.148.0" },
1134
1313
  "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_PREFIX].semantics": { attr: "multi-segment-prefix;bad-segment-refuses-boot", since: "7.136.0" },
1135
1314
  "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_PREFIX].derivedDefaultNote": { attr: "absent=>kata", since: "7.136.0" },
1136
1315
  "GET /v1/config/catalog#rows[K8S_SANDBOX_ENV].semantics": { attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot;own-credential-name-refuses-boot", since: "7.139.0" },
@@ -1144,6 +1323,8 @@ export const SELF_MINTED_WIRE = {
1144
1323
  "GET /v1/config/catalog#rows[DEVICE_RELAY_URL].derivedDefaultNote": { attr: "no-default;absent-refuses-boot", since: "7.141.0" },
1145
1324
  "GET /v1/config/catalog#rows[DEVICE_RELAY_URL].enumValues": { attr: "none(echoed-verbatim)", since: "7.141.0" },
1146
1325
  "GET /v1/config/catalog#rows[MODEL_ROUTER_ID].derivedDefaultNote": { attr: "absent=>classifier-role-in-served-table", since: "7.143.0" },
1326
+ "GET /v1/config/catalog#rows[MINIO_BUCKET].semantics": { attr: "leader-diff-out-bucket;independent-of-WORKSPACE_SNAPSHOT_BUCKET", since: "7.148.0" },
1327
+ "GET /v1/config/catalog#rows[MINIO_BUCKET].derivedDefaultNote": { attr: "absent=>WORKSPACE_SNAPSHOT_BUCKET_DEFAULT(not-the-explicit-value)", since: "7.148.0" },
1147
1328
  "GET /v1/sessions/:id/mcp#servers[].error": { attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200", since: "7.138.0" },
1148
1329
  "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" },
1149
1330
  "GET /v1/config/catalog#rows[MODEL_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
@@ -1151,8 +1332,8 @@ export const SELF_MINTED_WIRE = {
1151
1332
  "GET /v1/config/catalog#rows[MODEL_CHEAP_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
1152
1333
  "GET /v1/sessions/:id/memory-status#committedCount|foldedCount|lastCaptureAt|captureOptedOut|optOutSource(不带层座)": { attr: "engine-deployment-fold(memory.deployment_status.fold:sum|latest|any-record⇒true+record|all-false⇒false|else optOutSource:fault);store set = stores on disk;one-store⇒identity", since: "7.140.0" },
1153
1334
  "GET /v1/models#modelPlane.catalog(refused 的模型面那一半)": { attr: "latest-arrival", since: "7.143.0" },
1154
- "SSE text_delta#delta": { attr: "live-hold:same-redactor-stream(pending-tail-from-arm-table);concat=segment-end-content;remainder-frame-without-eventId", since: "7.143.0" },
1155
- "SSE reasoning_delta#delta": { attr: "live-hold:same-redactor-stream(pending-tail-from-arm-table);concat=segment-end-content;remainder-frame-without-eventId", since: "7.143.0" },
1335
+ "SSE text_delta#delta": { attr: "live-hold:same-redactor-stream(open-judgment-frontier);concat=segment-end-content;remainder-frame-without-eventId", since: "7.143.0" },
1336
+ "SSE reasoning_delta#delta": { attr: "live-hold:same-redactor-stream(open-judgment-frontier);concat=segment-end-content;remainder-frame-without-eventId", since: "7.143.0" },
1156
1337
  "GET /v1/runs/:id/subagents/:handle/stream#reasoning_end.content": { attr: "whole-segment-for-late-subscriber", since: "7.143.0" },
1157
1338
  "SSE text_delta#delta(文字段的状态跨文字块)": { attr: "segment-scoped-redactor-state;text_end=block-delivery-not-segment-close;block-end-as-ended-vs-whole-differs=live-as-ended+ledger-whole+hold-diverged+1", since: "7.144.0" },
1158
1339
  "SSE text_end#content(接在同段前缀之后判)": { attr: "engine-block-content;judged-after-segment-prefix", since: "7.144.0" },
@@ -92,13 +92,12 @@ export type DeclaredKey = ManifestShape & {
92
92
  readonly optional?: true;
93
93
  };
94
94
  /**
95
- * `TaskEvent` **信封**上的键 —— 这一族构造器一个都不管,所以在每一只 TaskEvent 面上统一扣除。
96
- * · `type`:臂名由调用点自己拼在投影体外(`{ type: "tool_end", ...toolEndEventData(ev) }`),不是载荷键;
97
- * · `sourceTaskId` / `bgAgentId`:live 腿的**四键身份**由 `liveIdentityFields` 单独挑(durable 两腿只挑两键),
98
- * 属主是那只函数而不是各面构造器 —— 所以对本族构造器它们恒不在投影体里。
95
+ * `TaskEvent` **信封**上的键 —— 这一族构造器一个都不管,所以在每一只 TaskEvent 面上统一扣除:只有 `type`(臂名由调用点自己拼在投影体外,
96
+ * `{ type: "tool_end", ...toolEndEventData(ev) }`,不是载荷键)。身份四键(`eventId` / `parentToolCallId` / `sourceTaskId` / `bgAgentId`)
97
+ * 是载荷键,每只构造器经同一只 `identityFields` 投 —— 不在这里扣。
99
98
  * 这是**一条统一规则**,不是十六个面各自的豁免名单:新臂进来自动适用。
100
99
  */
101
- export declare const FRAME_ENVELOPE_KEYS: readonly ["type", "sourceTaskId", "bgAgentId"];
100
+ export declare const FRAME_ENVELOPE_KEYS: readonly ["type"];
102
101
  /** 探针文件要从 `@sema-agent/core` 具名导入的类型(`coreType` 表达式里用到的全部名字)。 */
103
102
  export declare const WIRE_PROJECTION_CORE_IMPORTS: readonly ["TaskEvent", "BrainStatus", "TaskNotificationPayload", "WiringManifest", "EngineNotice", "MemoryImportReport", "OriginClearanceRow", "OriginClearanceEvent", "MemoryEntryOrigin", "TraceEvent", "PromptManifestIdentity", "PromptIdentityLayers", "PromptManifestSelectors", "PromptManifestSection", "PromptChainLink", "SupersededOverlay", "ToolDisclosureManifest", "SemaProvenance", "MailboxPeerMeta", "MailboxPeerNoticeMeta", "CrossSessionEnvelopeFields"];
104
103
  /**
@@ -213,7 +212,7 @@ export declare const WIRE_PROJECTION_FACES: {
213
212
  readonly human_input: {
214
213
  readonly projector: "humanInputEventData";
215
214
  readonly coreType: string;
216
- readonly excluded: readonly ["principal", "runOrigin"];
215
+ readonly excluded: readonly ["principal"];
217
216
  readonly minted: readonly [];
218
217
  };
219
218
  readonly task_notification: {
@@ -1,4 +1,4 @@
1
- export const FRAME_ENVELOPE_KEYS = ["type", "sourceTaskId", "bgAgentId"];
1
+ export const FRAME_ENVELOPE_KEYS = ["type"];
2
2
  export const WIRE_PROJECTION_CORE_IMPORTS = [
3
3
  "TaskEvent",
4
4
  "BrainStatus",
@@ -45,7 +45,7 @@ export const WIRE_PROJECTION_FACES = {
45
45
  turn_end: { projector: "turnEndEventData", coreType: arm("turn_end"), excluded: [], minted: [] },
46
46
  compaction_outcome: { projector: "compactionOutcomeEventData", coreType: arm("compaction_outcome"), excluded: [], minted: [] },
47
47
  compaction_started: { projector: "compactionStartedEventData", coreType: arm("compaction_started"), excluded: [], minted: [] },
48
- human_input: { projector: "humanInputEventData", coreType: arm("human_input"), excluded: ["principal", "runOrigin"], minted: [] },
48
+ human_input: { projector: "humanInputEventData", coreType: arm("human_input"), excluded: ["principal"], minted: [] },
49
49
  task_notification: {
50
50
  projector: "taskNotificationEventData",
51
51
  coreType: `TaskNotificationPayload & ${arm("task_notification")}`,
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 🔴 **上游应答体的 JSON 读口(唯一)** —— 本服务对任何上游(配置中心 / 记忆同步对端 / fleet 协调器 / 搜索后端 / bake 队列 / hook 的模型端点 / 凭据签发方 …)
3
+ * 的应答体解 JSON,只经这里。
4
+ *
5
+ * 一条律:**上游应答体的字节不进本服务铸的报错句**(只说体长,{@link buildBodyWithheldNote})。V8 的 `JSON.parse` 报错句内嵌入参的片段
6
+ * (`Unexpected token 's', "sk-proj-ab"... is not valid JSON`)—— 那是在出口座**之前**就切好的半截:脱敏器认得整枚令牌,认不得它的前 10 个字,
7
+ * 于是之后任何经出口座的出口(运维日志接缝、trace 帧)都挡不住它(env 旋钮的坏 JSON 早就不转述 V8 句,同一条理由)。
8
+ * 这里解析失败只说形:`the response body is not JSON (<n> characters; the body is not echoed)`;类名照旧是 `SyntaxError` ——
9
+ * 调用方按类定成因的读法不变(中心拉取:`SyntaxError` ⇒ 候选被拒 `rejected`;hook 模型端点:按名判 `bad_response`)。
10
+ * 读体途中的传输错(连接被重置的 `TypeError`、超时的 `AbortError`)原样抛:那不是「答错了」,是没拿到完整应答。
11
+ *
12
+ * 门:`test/upstream-json-single-reader.test.ts` —— `src/` 里 `.json()` 调用在本模块之外恒为 0(语法树)。
13
+ * 纯叶(零 import)。
14
+ */
15
+ /** 报错句的固定头(钉与读者按它认这一形;句子其余部分只有体长)。 */
16
+ export declare const UPSTREAM_BODY_NOT_JSON = "the response body is not JSON";
17
+ /** 一段应答体进报错句时的那一格(只有体长;本服务对上游应答体在报错句里只说这一句 —— 体不是 JSON 的句子与记忆同步对端的非 2xx 句同读)。 */
18
+ export declare function buildBodyWithheldNote(text: string): string;
19
+ /** 已读出的应答体文本 → JSON 值;不是 JSON ⇒ 抛 `SyntaxError`(句子只有体长,不带体的任何字节)。 */
20
+ export declare function parseUpstreamJson(text: string): unknown;
21
+ /** 读完应答体再解 JSON(`Response.json()` 的替身:同一份 UTF-8 解码);读体途中的传输错原样抛。 */
22
+ export declare function readUpstreamJson(res: Response): Promise<unknown>;
23
+ //# sourceMappingURL=upstream-body.d.ts.map
@@ -0,0 +1,16 @@
1
+ export const UPSTREAM_BODY_NOT_JSON = "the response body is not JSON";
2
+ export function buildBodyWithheldNote(text) {
3
+ return `(${text.length} characters; the body is not echoed)`;
4
+ }
5
+ export function parseUpstreamJson(text) {
6
+ try {
7
+ return JSON.parse(text);
8
+ }
9
+ catch {
10
+ throw new SyntaxError(`${UPSTREAM_BODY_NOT_JSON} ${buildBodyWithheldNote(text)}`);
11
+ }
12
+ }
13
+ export async function readUpstreamJson(res) {
14
+ return parseUpstreamJson(await res.text());
15
+ }
16
+ //# sourceMappingURL=upstream-body.js.map
@@ -31,10 +31,10 @@ export declare function buildRefusalShownUrl(raw: string): string;
31
31
  /**
32
32
  * **自由文本里每一条嵌着的 http(s) URL 换成它的展示形**({@link buildRefusalShownUrl}:`scheme://host[:port]`,origin 之后还有东西接 `/…`;读法不唯一 / 读不出的串给展示铸点的占位),
33
33
  * 句子其余部分逐字不动。用在宿主不控制句子的日志面 —— 引擎把「拨不通的 A2A 对端 / MCP 服务器」连同被拨的 URL 拼成一句交来(`onError`),宿主手里没有那条 URL 的结构化值,
34
- * 只能在文本上换。展示形的铸点仍只有 {@link buildRefusalShownUrl} 一只(userinfo / 路径 / query / fragment 一个字节不进,不赌形状律认得出的令牌形);本函数只负责「找到文本里的 URL」。
35
- * 非 http(s) 的 scheme 不在射程(这两座的 URL 读器只收 http(s))。纯函数。
34
+ * 只能在文本上换。展示形的铸点仍只有 {@link buildRefusalShownUrl} 一只(userinfo / 路径 / query / fragment 一个字节不进,不赌形状律认得出的令牌形);本函数只负责「找到文本里的 URL」,
35
+ * 找的界见 {@link EMBEDDED_HTTP_URL}(authority 文法)。非 http(s) 的 scheme 不在射程(这两座的 URL 读器只收 http(s))。纯函数。
36
36
  *
37
- * 已知的界(不是兜底):URL 串里含**裸空白**的(userinfo 里写了空格)在第一个空白处被截 —— 余下的尾巴留在句里。那一形是调用方在受理口就被拒的(userinfo 一律 400),
37
+ * 已知的界(文法之外,不是兜底):userinfo 里的**裸空白**不是 URL 文法的一部分 —— 串在第一个空白处结束,余下的尾巴留在句里。那一形是调用方在受理口就被拒的(userinfo 一律 400),
38
38
  * 到不了这里的只有存量停驻体 / 部署基线;引擎的警告句对该形也是把 URL 原样拼进去,没有结构化值可救。
39
39
  */
40
40
  export declare function buildShownUrlsInText(text: string): string;
@@ -11,11 +11,18 @@ export function buildRefusalShownUrl(raw) {
11
11
  const origin = `${u.protocol}//${u.host}`;
12
12
  return `${buildDisplaySafeUrl(origin)}${u.href === `${origin}/` ? "" : "/…"}`;
13
13
  }
14
- const EMBEDDED_HTTP_URL = /https?:\/\/[^\s"'`<>()[\]{}]+/gi;
14
+ const EMBEDDED_HTTP_URL = /(https?:\/\/)(?=\S)((?:[^\s/?#\\]*@)?(?:\[[^\s\]/?#\\]*\]|[^\s"'`<>()[\]{}/?#\\@:]*)(?::\d+)?)(\S*)/gi;
15
+ const SENTENCE_TAIL_CHARS = ".,;:!?)]}>'\"`";
16
+ function sentenceTailStart(rest) {
17
+ let at = rest.length;
18
+ while (at > 0 && SENTENCE_TAIL_CHARS.includes(rest.charAt(at - 1)))
19
+ at -= 1;
20
+ return at;
21
+ }
15
22
  export function buildShownUrlsInText(text) {
16
- return text.replace(EMBEDDED_HTTP_URL, (token) => {
17
- const trail = /[.,;:!?]+$/.exec(token)?.[0] ?? "";
18
- return buildRefusalShownUrl(trail === "" ? token : token.slice(0, -trail.length)) + trail;
23
+ return text.replace(EMBEDDED_HTTP_URL, (_token, scheme, authority, rest) => {
24
+ const at = sentenceTailStart(rest);
25
+ return buildRefusalShownUrl(`${scheme}${authority}${rest.slice(0, at)}`) + rest.slice(at);
19
26
  });
20
27
  }
21
28
  export function buildHttpUrlRefusal(subject, raw, flaws) {
@@ -32,7 +32,7 @@ export declare function buildRunObjectivePreview(objective: string): string;
32
32
  * 这条消息是不是**附件帧**(core 7.50.0 请求层附件:目标声明的每只文件由引擎铸成一条自己的 user 消息,紧跟目标提交)。
33
33
  * 判据 = 引擎写在消息上的送达记录 `attachment` **在场**(core:那只记录是「这条消息是附件帧」的唯一来源,文本从不判)。坏形记录同样算在场 ——
34
34
  * 两个读者都往「不是人写的话」那一侧落(预览走下一条;会话视图按文件字节脱敏),那是安全的一侧。
35
- * 一个事实一个读法:会话视图的处置表(`audit.ts`)与本地会话列表的预览(`plugins/local-session-store.ts`)同调这一只。
35
+ * 一个事实一个读法:会话视图的处置表(`audit.ts`)调这一只(会话列表的预览读 run 行预览列,不读会话条目 —— 附件帧本不在其中)。
36
36
  */
37
37
  export declare function isAttachmentFrame(message: unknown): boolean;
38
38
  //# sourceMappingURL=user-authored-text.d.ts.map
@@ -13,9 +13,8 @@
13
13
  * 「本服务以回执向调用方承诺已交给引擎、而消费只发生在进程内存里的用户输入」,**且承载它的那只 `TaskStream` 活在本服务的一条 run 腿里**([ref])——
14
14
  * 后半句是收敛判词成立的前提:证据面是那条 run 行(下文「收敛判据」)。行的 `taskId` = 回执上的 run、`sessionId` = 那条 run 的会话(人看的那一只),
15
15
  * run 里是哪一只流(run 自己的 / 同步子代的)**不是**账本的事实:告知按 run 并帧(`steer` = 条数),读面行同形。今天只有 steer 一族(`kind:"steer"` =
16
- * 受理它的引擎动词 `TaskStream.steer`,三档 `now` / `next` / `later` 同一个动词同一族),三个入口同一个引擎动词:
17
- * · `POST /v1/runs/:id/steer` 的 live 腿(200 applied);
18
- * · `POST /v1/runs/:id/interrupt` 的带 text 形(202 queued-immediate,档位 now;设计稿把它划在病面外,车 SW 亲核它进的是同一只进程内队列 ⇒ 同类同修);
16
+ * 受理它的引擎动词 `TaskStream.steer`,三档 `now` / `next` / `later` 同一个动词同一族),两个入口同一个引擎动词:
17
+ * · `POST /v1/runs/:id/steer` 的 live 腿(200 applied;档位只来自它的体 —— 「切断并说话」= `priority:"now"`,同一扇门);
19
18
  * · `POST /v1/runs/:id/subagents/:target/steer`(200 applied,[ref])—— 投进**同步子代**自己的流(core `createSteerHandle` → `stream.steer`)。子代由父腿
20
19
  * await,父腿收场时 core 撤掉在飞的复活(`subagentRetain.disposeAll`),所以它活在父 run 的腿里;腿 = 子代句柄,`handle.settled` 兑现 ⇒ 结清。
21
20
  * 规则的反面(不是例外表):workflow agent steer(`POST /v1/workflows/:id/agents/:label/steer`,200 applied)不在本账 —— workflow 是会话锚定的后台件
@@ -45,8 +44,8 @@
45
44
  * —— run 事件账与本账是两只店、没有共同事务,两害取「多说一遍」,不取「声称说过」。
46
45
  * 转移只有四条(open → settled | converged;converged → announced),两只孪生都按 CAS 守它们(File 单进程 = 内存判;SQL = `WHERE state=…`)。
47
46
  * · `erased` —— ([ref])**会话树删除**:该会话此前的每一次受理(不论状态)离开账本。行随会话走 —— 账本行的唯一归属键就是 `sessionId`,
48
- * 所以两条删会话树的级联(在线删除协调器 `boot/session-faces.ts` 的 `purgeSession`、托管留存的事务化孪生
49
- * `plugins/retention-deployment.ts` 的 `deleteDeploymentSessionRows`)各有一臂删它,谓词同一只(`session_id` 单键,店动词 `deleteBySession`)。
47
+ * 所以删净一只会话的唯一执行体(`session-erase.ts`)删它,谓词同一只(`session_id` 单键):local 执行体调店动词 `deleteBySession`,
48
+ * SQL 上在线删除与托管留存同一段会话树事务经 `plugins/retention-deployment.ts` 的 `deleteDeploymentSessionRows` 发同一只谓词。
50
49
  * File 孪生的盘上形 = 一行会话级墓碑 `{ kind:"erased", sessionId, at }`(与 workflow 完成信箱 `drain{sessionId}` 同形),
51
50
  * 只擦它**之前**的同会话行 —— 会话 id 删后可被重新登记,之后的受理属于下一位住客;SQL 孪生 = 真删行。被删受理上迟到的转移全输
52
51
  * (行不在了,与「未知 acceptId」同一条守卫)。
@@ -105,7 +104,7 @@ export type UserInputKind = (typeof LEDGER_KIND_OF_LANE)[UserInputLane];
105
104
  /** 读盘词表(判定走 `Object.hasOwn`;派生自 {@link LEDGER_KIND_OF_LANE})。≤7.117.x 的读腿不认 `follow_up`(回滚须知在 MIGRATION)。 */
106
105
  export declare const USER_INPUT_KIND_WORDS: Readonly<Record<UserInputKind, true>>;
107
106
  /**
108
- * 一次受理的族词 —— 三个受理口(run steer 的 live 腿 / interrupt 带 text 形 / 子代 steer)同调这一只。车道是引擎的那一只读法
107
+ * 一次受理的族词 —— 两个受理口(run steer 的 live 腿 / 子代 steer)同调这一只。车道是引擎的那一只读法
109
108
  * `injectionLaneOf(steerPriorityOf(…))`(core 7.45.0 [ref]:缺席档 = `next`;`later` 走 follow-up 车道,`now` / `next` 走 steer 车道;
110
109
  * 档外值抛 `steering.invalid_content` —— 受理口在这之前已按 `isSystemInjectionPriority` 400 掉档外值,这一抛在本仓不可达)。
111
110
  */
@@ -263,8 +262,8 @@ export interface UserInputLedgerStore {
263
262
  listUnannounced(sessionId: string, limit: number): Promise<UserInputAcceptance[]>;
264
263
  /** [ref] —— **会话树删除**:删掉该会话**每一种状态**的受理,回删除条数(没有可删的 ⇒ 0、零写;幂等)。按 `session_id` 单键:行上没有属主列,
265
264
  * 会话所有权由调用方证过(在线删除 = 路由的 DELETE 门;留存 = 候选集本身出自本域加锁读的 `session_meta`),与 anchors / exemptions /
266
- * attachments 同律。调用方 = 在线删除协调器(`boot/session-faces.ts` `purgeSession` 的一腿);托管留存的事务化孪生不调店、在自己的事务里
267
- * 发**同一只谓词**(`retention-deployment.ts` `deleteDeploymentSessionRows` ④)。写不进 ⇒ 抛(协调器据此不删会话本体,幂等重试收敛)。 */
265
+ * attachments 同律。调用方 = local 删净执行体(`session-erase.ts` `createLocalSessionEraser` 的一腿);SQL 上的删净(在线与留存同一段事务体)不调店、
266
+ * 在自己的事务里发**同一只谓词**(`retention-deployment.ts` `deleteDeploymentSessionRows` ④)。写不进 ⇒ 抛(执行体据此不删会话本体,幂等重试收敛)。 */
268
267
  deleteBySession(sessionId: string): Promise<number>;
269
268
  }
270
269
  /** 收敛判词读的 run 店面(只读一只动词)。 */
@@ -138,7 +138,7 @@ export function buildCrashedUndrainedNotice(input) {
138
138
  const face = USER_INPUT_UNDRAINED_FAMILIES[lane];
139
139
  return {
140
140
  code: face.code,
141
- message: `Check the earlier run's transcript and results before re-sending any of these steers to a live run. The server accepted ${input.count} ${UNDRAINED_WHAT_OF_LANE[lane]} for run ${input.taskId} (each answered 200 applied or 202 queued-immediate), but the process running that run ended before the engine confirmed consuming them. They are NOT redelivered.`,
141
+ message: `Check the earlier run's transcript and results before re-sending any of these steers to a live run. The server accepted ${input.count} ${UNDRAINED_WHAT_OF_LANE[lane]} for run ${input.taskId}, but the process running that run ended before the engine confirmed consuming them. They are NOT redelivered.`,
142
142
  detail: { [face.countKey]: input.count, cause: CRASHED_CAUSE, taskId: input.taskId, sessionId: input.sessionId },
143
143
  sessionId: input.sessionId,
144
144
  };
@@ -16,9 +16,12 @@ import { type ConfigCandidateRead } from "./candidate-gate.js";
16
16
  import type { CatalogSource } from "../env-model-table-gate.js";
17
17
  /** Apply center config OVER the env-derived config (mutates `config`). Empty domains keep env defaults. */
18
18
  /** Replace a record's contents IN PLACE (clear keys, copy source) so holders of the SAME reference see the
19
- * change. This is what makes models/roles/pricing HOT-apply: core's Runner reads
20
- * `this.deps.models/roles/pricing` LIVE per-task and `/v1/models` reads `config.models` — both share the
21
- * reference captured at boot, so mutating it (vs reassigning) updates both with no split, no Runner rebuild. */
19
+ * change. Who holds it: this service's own readers (`/v1/models`, resolveSpec, the quota / key maps) read
20
+ * `config.models` / `config.roles` / `pricing` per request off the reference captured at boot; the engine reads
21
+ * `deps.roles` (the role map stays the caller's object between operations) and `deps.pricing` live off the same
22
+ * reference. NOT `models` / `tiers`: since core 7.60.0 the catalog door receives a whole generation at
23
+ * `new Runner` / `swapDeps` and keeps a frozen snapshot, so a model-plane change reaches the Runner only through
24
+ * `swapPlane` (applyEffective, before this commit) — the in-place write here is for this service's readers. */
22
25
  export declare function mutateInPlace<V>(target: Record<string, V>, source: Record<string, V>): void;
23
26
  /** 返回值=是否 COMMIT(false 两臂:[ref]③ 世代序 CAS 拒绝 / 7.10.0 swapPlane 换装拒绝——两臂都在
24
27
  * commit 之前,活配置零触碰)。caller 收到 false 必须把**同一世代的旁路消费**(prompts 采用/pricing/