@sema-agent/server 7.148.0 → 7.150.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 (360) hide show
  1. package/MIGRATION.md +551 -9
  2. package/README.md +17 -2
  3. package/README.zh-CN.md +5 -1
  4. package/USAGE.md +126 -68
  5. package/dist/adoption/wire.d.ts +3 -3
  6. package/dist/approval-card.d.ts +33 -33
  7. package/dist/approval-gate-currency.d.ts +1 -1
  8. package/dist/approval-leg-origin.d.ts +33 -0
  9. package/dist/approval-leg-origin.js +4 -0
  10. package/dist/audit.d.ts +1 -1
  11. package/dist/audit.js +2 -2
  12. package/dist/auth-bridge.d.ts +9 -1
  13. package/dist/auth-bridge.js +4 -4
  14. package/dist/auth-keys.d.ts +10 -1
  15. package/dist/auth-keys.js +8 -0
  16. package/dist/background-session-reap.d.ts +1 -1
  17. package/dist/boot/deferred-sandbox-path-env.d.ts +5 -3
  18. package/dist/boot/deferred-sandbox-path-env.js +1 -2
  19. package/dist/boot/execution-env.js +10 -11
  20. package/dist/boot/execution-lane.d.ts +6 -4
  21. package/dist/boot/execution-lane.js +3 -1
  22. package/dist/boot/org-delivery.d.ts +3 -2
  23. package/dist/boot/parked-revive-gate.d.ts +5 -5
  24. package/dist/boot/parked-revive-gate.js +2 -3
  25. package/dist/boot/resolve-spec.d.ts +4 -5
  26. package/dist/boot/resolve-spec.js +66 -28
  27. package/dist/boot/retention-lane.d.ts +1 -1
  28. package/dist/boot/runner-deps.js +3 -1
  29. package/dist/boot/session-faces.js +21 -21
  30. package/dist/boot/stage-01-config.d.ts +1 -0
  31. package/dist/boot/stage-01-config.js +4 -3
  32. package/dist/boot/stage-02-web-admin-pull.d.ts +1 -0
  33. package/dist/boot/stage-02-web-admin-pull.js +10 -2
  34. package/dist/boot/stage-03-store-backend.d.ts +1 -0
  35. package/dist/boot/stage-03-store-backend.js +4 -4
  36. package/dist/boot/stage-04-stores.d.ts +1 -0
  37. package/dist/boot/stage-05-execution-env.d.ts +1 -0
  38. package/dist/boot/stage-06-runners.d.ts +2 -1
  39. package/dist/boot/stage-06-runners.js +1 -2
  40. package/dist/boot/stage-07-capability-layer.d.ts +2 -1
  41. package/dist/boot/stage-07-capability-layer.js +1 -1
  42. package/dist/boot/stage-08-reapers.d.ts +2 -1
  43. package/dist/boot/stage-09-leader.d.ts +2 -1
  44. package/dist/boot/stage-10-http-server.d.ts +35 -2
  45. package/dist/boot/stage-10-http-server.js +9 -4
  46. package/dist/boot/stores.d.ts +3 -0
  47. package/dist/boot/stores.js +22 -19
  48. package/dist/boot/web-admin.d.ts +1 -1
  49. package/dist/capabilities/tool-defer.d.ts +1 -1
  50. package/dist/capability-facts.d.ts +70 -60
  51. package/dist/capability-facts.js +45 -49
  52. package/dist/card-settle-stored-scope.d.ts +56 -0
  53. package/dist/card-settle-stored-scope.js +27 -0
  54. package/dist/card-void.d.ts +7 -12
  55. package/dist/card-void.js +2 -7
  56. package/dist/config-catalog.d.ts +12 -0
  57. package/dist/config-catalog.js +37 -33
  58. package/dist/config-invariants.d.ts +5 -4
  59. package/dist/config-invariants.js +4 -4
  60. package/dist/config-types.d.ts +49 -16
  61. package/dist/config.d.ts +6 -5
  62. package/dist/config.js +35 -24
  63. package/dist/context-window-notice.d.ts +31 -0
  64. package/dist/context-window-notice.js +28 -0
  65. package/dist/deployment-governance.d.ts +7 -28
  66. package/dist/deployment-governance.js +1 -14
  67. package/dist/deployment-shape.d.ts +20 -11
  68. package/dist/deployment-shape.js +1 -0
  69. package/dist/device-ws-hub.d.ts +1 -0
  70. package/dist/device-ws-hub.js +64 -28
  71. package/dist/device-ws-protocol.d.ts +20 -6
  72. package/dist/device-ws-protocol.js +9 -2
  73. package/dist/engine-identity.d.ts +7 -1
  74. package/dist/engine-identity.js +5 -0
  75. package/dist/env-name-allowlist-knobs.d.ts +6 -5
  76. package/dist/env-name-allowlist-knobs.js +5 -0
  77. package/dist/execution-lane-caps.d.ts +20 -5
  78. package/dist/execution-lane-caps.js +18 -4
  79. package/dist/field-conflict.d.ts +2 -2
  80. package/dist/fleet/engine-signal.d.ts +14 -1
  81. package/dist/fleet/engine-signal.js +5 -1
  82. package/dist/fleet/fleet-reconciler.d.ts +1 -1
  83. package/dist/fleet/serving-lease.d.ts +18 -3
  84. package/dist/fleet/serving-lease.js +81 -35
  85. package/dist/fleet-client.d.ts +13 -11
  86. package/dist/fleet-client.js +53 -33
  87. package/dist/history-anchor.js +1 -1
  88. package/dist/hitl-delivery.d.ts +1 -3
  89. package/dist/hitl-delivery.js +1 -1
  90. package/dist/hooks/command-spawn.d.ts +7 -2
  91. package/dist/hooks/command-spawn.js +13 -6
  92. package/dist/hooks/hook-runner.d.ts +5 -0
  93. package/dist/hooks/hook-runner.js +11 -7
  94. package/dist/http/active-run-conflict.d.ts +3 -7
  95. package/dist/http/active-run-conflict.js +2 -2
  96. package/dist/http/admission.js +5 -5
  97. package/dist/http/approval-sweeps.js +5 -3
  98. package/dist/http/caller-trust.d.ts +2 -2
  99. package/dist/http/caller-trust.js +3 -3
  100. package/dist/http/checkpoint-ctx.d.ts +18 -63
  101. package/dist/http/checkpoint-ctx.js +1 -24
  102. package/dist/http/claim-heartbeat.d.ts +6 -6
  103. package/dist/http/claim-heartbeat.js +6 -6
  104. package/dist/http/claimed-run.d.ts +16 -9
  105. package/dist/http/claimed-run.js +8 -0
  106. package/dist/http/dispatch.js +7 -5
  107. package/dist/http/durable-run-leg.d.ts +8 -1
  108. package/dist/http/durable-run-leg.js +34 -15
  109. package/dist/http/execution-context.d.ts +115 -14
  110. package/dist/http/execution-context.js +130 -40
  111. package/dist/http/owner-access.d.ts +246 -21
  112. package/dist/http/owner-access.js +186 -8
  113. package/dist/http/principal-gate.d.ts +18 -11
  114. package/dist/http/principal-gate.js +3 -1
  115. package/dist/http/readiness.d.ts +4 -2
  116. package/dist/http/resume-ctx-read.d.ts +14 -3
  117. package/dist/http/resume-ctx-read.js +24 -3
  118. package/dist/http/resume-legs.d.ts +35 -3
  119. package/dist/http/resume-legs.js +262 -106
  120. package/dist/http/route-ctx.d.ts +29 -11
  121. package/dist/http/routes/a2a-serve.js +17 -14
  122. package/dist/http/routes/approvals-assistant.d.ts +3 -2
  123. package/dist/http/routes/approvals-assistant.js +11 -11
  124. package/dist/http/routes/capabilities.js +5 -4
  125. package/dist/http/routes/config-catalog.d.ts +1 -1
  126. package/dist/http/routes/diagnostics.d.ts +3 -1
  127. package/dist/http/routes/diagnostics.js +30 -5
  128. package/dist/http/routes/mcp-reconnect.js +2 -2
  129. package/dist/http/routes/memory-origin.d.ts +1 -1
  130. package/dist/http/routes/notify-wake.js +2 -3
  131. package/dist/http/routes/principal-inbox.d.ts +3 -1
  132. package/dist/http/routes/principal-inbox.js +3 -2
  133. package/dist/http/routes/projects.d.ts +1 -0
  134. package/dist/http/routes/projects.js +5 -3
  135. package/dist/http/routes/retention-ops.d.ts +1 -1
  136. package/dist/http/routes/run-permission-mode.d.ts +1 -1
  137. package/dist/http/routes/run-permission-mode.js +2 -2
  138. package/dist/http/routes/runs.d.ts +1 -1
  139. package/dist/http/routes/runs.js +33 -37
  140. package/dist/http/routes/session-memory-sync.js +4 -5
  141. package/dist/http/routes/session-sync.d.ts +24 -5
  142. package/dist/http/routes/session-sync.js +45 -37
  143. package/dist/http/routes/sessions-list.d.ts +1 -1
  144. package/dist/http/routes/sessions.d.ts +1 -1
  145. package/dist/http/routes/sessions.js +18 -44
  146. package/dist/http/routes/tasks.js +136 -101
  147. package/dist/http/routes/trace-usage.js +14 -14
  148. package/dist/http/routes/workflows.d.ts +1 -0
  149. package/dist/http/routes/workflows.js +20 -38
  150. package/dist/http/server.d.ts +12 -9
  151. package/dist/http/server.js +35 -6
  152. package/dist/http/stored-body-replay.d.ts +3 -24
  153. package/dist/http/stored-body-replay.js +2 -12
  154. package/dist/http/submit-ctx.d.ts +2 -2
  155. package/dist/http/submit-ctx.js +5 -5
  156. package/dist/http/submit-replay.d.ts +15 -2
  157. package/dist/http/submit-replay.js +10 -4
  158. package/dist/http/wire-types.d.ts +6 -3
  159. package/dist/index.d.ts +3 -1
  160. package/dist/index.js +1 -0
  161. package/dist/leader/endpoint.js +9 -8
  162. package/dist/leg-facts.d.ts +13 -2
  163. package/dist/leg-facts.js +2 -0
  164. package/dist/local-store-declaration.d.ts +54 -0
  165. package/dist/local-store-declaration.js +59 -0
  166. package/dist/mcp-assertion-header.d.ts +1 -1
  167. package/dist/mcp-assertion-header.js +1 -1
  168. package/dist/mcp-authorization-face.d.ts +18 -14
  169. package/dist/mcp-authorization-face.js +3 -2
  170. package/dist/memory-project-layer.js +1 -1
  171. package/dist/memory-scope.d.ts +4 -4
  172. package/dist/memory-scope.js +4 -4
  173. package/dist/memory-store-refusal.d.ts +1 -1
  174. package/dist/memory-sync-client.js +2 -2
  175. package/dist/model-context-window.d.ts +50 -11
  176. package/dist/model-context-window.js +20 -1
  177. package/dist/model-entry-refusal.d.ts +5 -4
  178. package/dist/model-entry-refusal.js +17 -3
  179. package/dist/model-reach-scope.d.ts +2 -1
  180. package/dist/observability/corrupt-read-seat.d.ts +1 -1
  181. package/dist/observability/fail-open.d.ts +19 -7
  182. package/dist/observability/fail-open.js +19 -7
  183. package/dist/observability/logger.d.ts +7 -0
  184. package/dist/observability/logger.js +3 -1
  185. package/dist/observability/metrics.js +1 -1
  186. package/dist/observability/run-terminal.d.ts +1 -1
  187. package/dist/observability/run-terminal.js +1 -0
  188. package/dist/observability/secret-env-scrub.d.ts +1 -1
  189. package/dist/observability/secret-env-scrub.js +1 -1
  190. package/dist/org-delivery-gate.d.ts +31 -6
  191. package/dist/org-delivery-gate.js +7 -4
  192. package/dist/owner-faces.d.ts +30 -5
  193. package/dist/owner-faces.js +2 -0
  194. package/dist/park-row-commit.d.ts +67 -0
  195. package/dist/park-row-commit.js +76 -0
  196. package/dist/parked-decide.d.ts +9 -7
  197. package/dist/parked-decide.js +25 -6
  198. package/dist/peer-directory.d.ts +1 -1
  199. package/dist/peer-seat.d.ts +1 -1
  200. package/dist/peer-seat.js +52 -59
  201. package/dist/plugins/adoption-log-sql.d.ts +3 -3
  202. package/dist/plugins/adoption-log-sql.js +19 -19
  203. package/dist/plugins/approval-ask-store-sql.d.ts +1 -1
  204. package/dist/plugins/approval-ask-store-sql.js +3 -5
  205. package/dist/plugins/approval-exemption-skill-cutoff.d.ts +64 -0
  206. package/dist/plugins/approval-exemption-skill-cutoff.js +122 -0
  207. package/dist/plugins/approval-exemption-skill-m46.d.ts +0 -6
  208. package/dist/plugins/approval-exemption-skill-m46.js +6 -10
  209. package/dist/plugins/approval-exemption-store.d.ts +26 -1
  210. package/dist/plugins/approval-exemption-store.js +28 -19
  211. package/dist/plugins/ensure-schema-lock-policy.d.ts +36 -3
  212. package/dist/plugins/ensure-schema-lock-policy.js +75 -9
  213. package/dist/plugins/exec-path-law.d.ts +34 -0
  214. package/dist/plugins/exec-path-law.js +13 -0
  215. package/dist/plugins/file-run-store.d.ts +22 -9
  216. package/dist/plugins/file-run-store.js +51 -23
  217. package/dist/plugins/local-checkpoint-store.d.ts +8 -1
  218. package/dist/plugins/local-checkpoint-store.js +5 -1
  219. package/dist/plugins/local-data-root-admission.d.ts +52 -0
  220. package/dist/plugins/local-data-root-admission.js +100 -0
  221. package/dist/plugins/local-engine-high-water.d.ts +28 -7
  222. package/dist/plugins/local-engine-high-water.js +27 -22
  223. package/dist/plugins/local-session-store.d.ts +134 -49
  224. package/dist/plugins/local-session-store.js +149 -108
  225. package/dist/plugins/memory-run-store.d.ts +14 -9
  226. package/dist/plugins/memory-run-store.js +48 -22
  227. package/dist/plugins/one-time-migration-marker.d.ts +19 -3
  228. package/dist/plugins/one-time-migration-marker.js +7 -1
  229. package/dist/plugins/one-time-migrations.d.ts +110 -59
  230. package/dist/plugins/one-time-migrations.js +224 -136
  231. package/dist/plugins/org-delivery-quota-store.d.ts +34 -11
  232. package/dist/plugins/org-delivery-quota-store.js +29 -14
  233. package/dist/plugins/permission-rule-store-sql.d.ts +1 -1
  234. package/dist/plugins/permission-rule-store-sql.js +5 -9
  235. package/dist/plugins/pg-pool.d.ts +1 -1
  236. package/dist/plugins/pg-pool.js +14 -12
  237. package/dist/plugins/posix-shell-fs.js +4 -2
  238. package/dist/plugins/remote-env-adb.js +3 -2
  239. package/dist/plugins/remote-env-device.d.ts +3 -2
  240. package/dist/plugins/remote-env-device.js +8 -6
  241. package/dist/plugins/remote-env-e2b.d.ts +4 -8
  242. package/dist/plugins/remote-env-e2b.js +21 -15
  243. package/dist/plugins/remote-env-host.d.ts +51 -10
  244. package/dist/plugins/remote-env-host.js +97 -31
  245. package/dist/plugins/remote-env-k8s.js +7 -4
  246. package/dist/plugins/remote-env-local-docker.d.ts +6 -3
  247. package/dist/plugins/remote-env-local-docker.js +11 -25
  248. package/dist/plugins/remote-env-ssh.js +4 -3
  249. package/dist/plugins/remote-shell.d.ts +3 -1
  250. package/dist/plugins/remote-shell.js +3 -3
  251. package/dist/plugins/replica-registration.d.ts +35 -0
  252. package/dist/plugins/replica-registration.js +48 -0
  253. package/dist/plugins/retention-lane-store-sql.d.ts +1 -1
  254. package/dist/plugins/run-store-sql.d.ts +27 -8
  255. package/dist/plugins/run-store-sql.js +46 -18
  256. package/dist/plugins/scenario-prefix-switch-m42.d.ts +8 -12
  257. package/dist/plugins/scenario-prefix-switch-m42.js +9 -6
  258. package/dist/plugins/schema-consistency.d.ts +91 -5
  259. package/dist/plugins/schema-consistency.js +189 -7
  260. package/dist/plugins/schema-drift-sentence.d.ts +6 -5
  261. package/dist/plugins/schema-drift-sentence.js +13 -5
  262. package/dist/plugins/serving-requirement.d.ts +49 -0
  263. package/dist/plugins/serving-requirement.js +53 -0
  264. package/dist/plugins/session-placement.d.ts +5 -4
  265. package/dist/plugins/shell-sentinel-owner-m48.d.ts +22 -0
  266. package/dist/plugins/shell-sentinel-owner-m48.js +6 -0
  267. package/dist/plugins/stop-then-start-sentence.d.ts +55 -0
  268. package/dist/plugins/stop-then-start-sentence.js +51 -0
  269. package/dist/plugins/store-backend.d.ts +23 -9
  270. package/dist/plugins/store-backend.js +58 -24
  271. package/dist/plugins/store-contracts.d.ts +45 -5
  272. package/dist/plugins/store-contracts.js +19 -0
  273. package/dist/plugins/tidb-pool.d.ts +11 -6
  274. package/dist/plugins/tidb-pool.js +22 -12
  275. package/dist/plugins/workspace-custody.d.ts +44 -0
  276. package/dist/plugins/workspace-custody.js +47 -0
  277. package/dist/process-instance.d.ts +3 -0
  278. package/dist/process-instance.js +7 -0
  279. package/dist/project-context.d.ts +66 -0
  280. package/dist/project-context.js +70 -0
  281. package/dist/project-identity.d.ts +8 -7
  282. package/dist/project-identity.js +40 -17
  283. package/dist/project-layer-key.d.ts +13 -2
  284. package/dist/project-layer-key.js +9 -1
  285. package/dist/question.d.ts +9 -21
  286. package/dist/question.js +28 -19
  287. package/dist/read-deny-floor-notice.d.ts +36 -0
  288. package/dist/read-deny-floor-notice.js +40 -0
  289. package/dist/{plain-string-record.d.ts → request-declaration-disposition.d.ts} +9 -23
  290. package/dist/request-declaration-disposition.js +39 -0
  291. package/dist/run-cancel-card.d.ts +28 -0
  292. package/dist/run-cancel-card.js +20 -0
  293. package/dist/run-cancel-context.d.ts +10 -0
  294. package/dist/run-cancel-context.js +1 -0
  295. package/dist/run-local.js +28 -13
  296. package/dist/runs.d.ts +31 -7
  297. package/dist/runs.js +34 -16
  298. package/dist/security.d.ts +3 -3
  299. package/dist/server-secret-env.d.ts +34 -20
  300. package/dist/server-secret-env.js +61 -18
  301. package/dist/session-agent.d.ts +4 -12
  302. package/dist/session-agent.js +0 -6
  303. package/dist/session-children-retire.d.ts +6 -3
  304. package/dist/session-children-retire.js +2 -5
  305. package/dist/session-incarnation.d.ts +18 -4
  306. package/dist/session-incarnation.js +4 -1
  307. package/dist/session-notify-door.d.ts +4 -4
  308. package/dist/session-notify-door.js +5 -6
  309. package/dist/session-rules-seat.d.ts +4 -3
  310. package/dist/session-rules-seat.js +3 -11
  311. package/dist/session-sync.js +3 -3
  312. package/dist/session-workspace.d.ts +3 -3
  313. package/dist/store-admission.d.ts +33 -0
  314. package/dist/store-admission.js +49 -0
  315. package/dist/store-posture.d.ts +5 -0
  316. package/dist/store-posture.js +18 -1
  317. package/dist/stores-sql/checkpoint-store-sql.d.ts +22 -3
  318. package/dist/stores-sql/checkpoint-store-sql.js +109 -23
  319. package/dist/stores-sql/file-history-store-sql.d.ts +1 -1
  320. package/dist/stores-sql/file-history-store-sql.js +3 -5
  321. package/dist/stores-sql/retention-store-sql.d.ts +1 -1
  322. package/dist/stores-sql/tool-result-store-sql.d.ts +1 -1
  323. package/dist/stores-sql/tool-result-store-sql.js +4 -6
  324. package/dist/task-a2a.d.ts +3 -8
  325. package/dist/task-a2a.js +25 -27
  326. package/dist/task-cwd.d.ts +27 -10
  327. package/dist/task-cwd.js +3 -0
  328. package/dist/task-mcp.d.ts +3 -3
  329. package/dist/task-mcp.js +1 -1
  330. package/dist/task-settings.d.ts +13 -0
  331. package/dist/task-settings.js +14 -7
  332. package/dist/terminal.d.ts +2 -0
  333. package/dist/terminal.js +21 -6
  334. package/dist/tool-approval.d.ts +50 -41
  335. package/dist/tool-approval.js +96 -73
  336. package/dist/trace/engine-notice-wire.d.ts +38 -21
  337. package/dist/trace/engine-notice-wire.js +25 -4
  338. package/dist/trace/ledger-sink.d.ts +3 -1
  339. package/dist/trace/project.d.ts +8 -5
  340. package/dist/trace/project.js +11 -9
  341. package/dist/trace/projection-table.d.ts +33 -2
  342. package/dist/trace/redact.d.ts +12 -0
  343. package/dist/trace/redact.js +5 -1
  344. package/dist/trace/self-minted-wire.d.ts +268 -56
  345. package/dist/trace/self-minted-wire.js +110 -40
  346. package/dist/trace/tool-card.d.ts +3 -0
  347. package/dist/trace/tool-card.js +24 -0
  348. package/dist/trace/tool-output-media.d.ts +2 -1
  349. package/dist/unattended-permission-mode.d.ts +1 -1
  350. package/dist/web-admin-client/apply-effective.d.ts +1 -1
  351. package/dist/web-admin-client/apply-effective.js +22 -9
  352. package/dist/web-admin-client/effective-keys.d.ts +1 -1
  353. package/dist/web-admin-client/skills-mcp.d.ts +1 -1
  354. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +57 -29
  355. package/docs/error-text-lexicon.json +317 -0
  356. package/package.json +4 -2
  357. package/scripts/embed-minimal.mjs +183 -0
  358. package/wire-changes/server@7.149.0.json +372 -0
  359. package/wire-changes/server@7.150.0.json +335 -0
  360. package/dist/plain-string-record.js +0 -70
@@ -156,6 +156,10 @@ not above `challenge.protocolVersion` into `hello.protocolVersion` — the same
156
156
  only the `errorCode` words of that revision (the revision table in §2.1). Nothing is renegotiated after `hello`:
157
157
  the revision you declared is the contract for the whole connection. If the highest revision you implement is below
158
158
  `DEVICE_MIN_PROTOCOL_VERSION`, the server answers `helloReject: protocol_version_unsupported` (§1.4).
159
+ Revisions are cumulative on the executor's side: an executor that implements revision *N* implements every revision
160
+ below it, so against an older server it declares that server's revision (a revision-5 executor serves a revision-4
161
+ server, whose paths arrive folded — a subset of what revision 5 sends). `DEVICE_MIN_PROTOCOL_VERSION` is the lowest
162
+ revision **this server** accepts, not a floor for your own negotiation.
159
163
 
160
164
  ### 1.3 The `hello` signature (byte-exact — do not improvise)
161
165
 
@@ -247,7 +251,7 @@ sign exactly these bytes with the device's Ed25519 private key.
247
251
  |---|---|---|
248
252
  | `auth_failed` | deliberately ambiguous: unknown device id, malformed id, malformed epoch, bad signature, or the server's device registry was unreachable | do **not** hammer: back off exponentially. If it never clears, the enrollment is gone — re-enroll. The server will not tell you which of these it was (anti-enumeration) |
249
253
  | `revoked` | this device has been revoked. Terminal | stop reconnecting, delete the private key, ask the user to re-enroll (it yields a new `deviceId`) |
250
- | `protocol_version_unsupported` | your `protocolVersion` is outside the range this server accepts; the frame carries `minProtocolVersion` | upgrade the executor. Never retry-with-a-different-version in a loop |
254
+ | `protocol_version_unsupported` | your `protocolVersion` is outside the range this server accepts; the frame carries `minProtocolVersion` and a one-line `message` that names your revision, the range and — below the floor — the change at the floor revision (§2.1) | upgrade the executor (`message` is fit to show as is). Never retry-with-a-different-version in a loop |
251
255
  | `draining` | this replica is shutting down or upgrading and takes no new connections | reconnect with backoff; a replacement replica will accept you |
252
256
  | `already_connected` | **the connection lease for this `deviceId` is not available right now**: a previous connection is still considered fresh, the stored lease has not expired yet, or the deployment forbids takeover | retry with bounded backoff — the lease expires on its own (deployment default 45 s, and a previous socket is judged stale after ~3 missed heartbeats). This code does **not** prove another process is alive: a half-open network drop can make your *own* previous connection look fresh. Do not exit permanently on it; do hold a machine-local single-instance lock so you are never racing yourself |
253
257
 
@@ -341,8 +345,8 @@ base64 inside JSON fields.
341
345
  | Constant | Value | Meaning |
342
346
  |---|---|---|
343
347
  | `DEVICE_WS_PATH` | `/v1/device/ws` | the upgrade path (prefer the `wsPath` from `/v1/capabilities`) |
344
- | `DEVICE_PROTOCOL_VERSION` | `4` | the protocol revision this server speaks (the highest it accepts) |
345
- | `DEVICE_MIN_PROTOCOL_VERSION` | `1` | the lowest revision it accepts; below it (or above the highest), a loud `helloReject` — never a silent downgrade |
348
+ | `DEVICE_PROTOCOL_VERSION` | `5` | the protocol revision this server speaks (the highest it accepts) |
349
+ | `DEVICE_MIN_PROTOCOL_VERSION` | `5` | the lowest revision it accepts (the revision table says why); below it (or above the highest), a loud `helloReject` — never a silent downgrade |
346
350
  | `DEVICE_HELLO_DOMAIN_TAG` | `sema.device.hello.v1` | the handshake signature domain tag (§1.3) |
347
351
 
348
352
  <!-- closed-set: DEVICE_WS_LIMITS -->
@@ -357,25 +361,36 @@ base64 inside JSON fields.
357
361
  Note the asymmetry: the transport cap is 1 MiB, and the 4096-byte pre-auth cap is applied **after** the
358
362
  frame has been reassembled. Keep `hello` small; it is not a place for long `supports` prose.
359
363
 
364
+ `maxFrameBytes` binds the server too: every frame it sends is measured after serialization and is never over the
365
+ cap. An instruction whose frame would be over it is refused before dispatch (you never receive it), and `payload`
366
+ chunks are sliced so that a chunk frame, base64 and envelope included, fits. You can therefore cap the frames you
367
+ accept at `maxFrameBytes`.
368
+
360
369
  #### Protocol revisions and the `errorCode` set
361
370
 
362
371
  The protocol revision is the only thing an executor can read *before* it sends `hello` (the `challenge` frame
363
- carries it), so the set of `errorCode` words the server accepts from you is a function of the revision, not a
364
- separate list. The table gives, per revision, the words **added** at that revision; the set at revision *N* is
365
- the union of the rows up to *N*, and the full set at the current revision is the §3.3 table.
372
+ carries it), so everything you must know to be correct on this server is a function of the revision, not a
373
+ separate list: the set of `errorCode` words the server accepts from you, and what the frames it sends you mean.
374
+ The table gives, per revision, the words **added** at that revision and any other change made at it; the word set
375
+ at revision *N* is the union of the rows up to *N*, and the full set at the current revision is the §3.3 table.
366
376
 
367
377
  <!-- closed-set: DEVICE_OUTCOME_ERROR_CODES_BY_REVISION -->
368
378
 
369
- | Revision | `errorCode` words added at this revision |
370
- |---|---|
371
- | `1` | `aborted`, `already_exists`, `auth_failed`, `callback_error`, `invalid`, `is_directory`, `not_directory`, `not_found`, `not_supported`, `outcome_unknown`, `permission_denied`, `precondition_failed`, `shell_unavailable`, `spawn_error`, `suspended`, `target_unavailable`, `timeout`, `transport_lost`, `unknown` |
372
- | `2` | `liveness_no_output` |
373
- | `3` | `name_too_long` |
374
- | `4` | `symlink_loop` |
375
-
376
- Rules: adding a frame or a field is additive and does not raise the revision; adding a word to a closed set the
377
- server *accepts from you* (today: the `errorCode` set) raises `DEVICE_PROTOCOL_VERSION` and adds a row here; a
378
- released row never changes. Declare a revision as §1.2 says and send only the words of that revision: an executor
379
+ | Revision | `errorCode` words added at this revision | Other change at this revision |
380
+ |---|---|---|
381
+ | `1` | `aborted`, `already_exists`, `auth_failed`, `callback_error`, `invalid`, `is_directory`, `not_directory`, `not_found`, `not_supported`, `outcome_unknown`, `permission_denied`, `precondition_failed`, `shell_unavailable`, `spawn_error`, `suspended`, `target_unavailable`, `timeout`, `transport_lost`, `unknown` | — |
382
+ | `2` | `liveness_no_output` | — |
383
+ | `3` | `name_too_long` | — |
384
+ | `4` | `symlink_loop` | — |
385
+ | `5` | — | every path an instruction carries (`args.path`, `args.paths`, `cwd`) arrives **unfolded** (since server 7.150.0): absolute as written, or anchored at the session's working directory, with `.` / `..` / empty segments kept — the server anchors and never folds. Resolve it as your filesystem does and judge containment on where it resolves (§3.1, §6 item 6). An executor written for revision 4 or below expects folded paths, so this is also the lowest revision the server accepts |
386
+
387
+ Rules: adding a frame or a field is additive and does not raise the revision. Every other change
388
+ raises `DEVICE_PROTOCOL_VERSION` and adds a row here — a word added to a closed set the server *accepts from you*
389
+ (today: the `errorCode` set; second column), or a **semantic change**, a change in what a frame the server sends you
390
+ means (third column): a semantic change raises the revision. A released row never changes. When an executor written for
391
+ an older revision cannot honor the change, the same release raises `DEVICE_MIN_PROTOCOL_VERSION` to the new
392
+ revision, so such an executor is refused once at `hello` (§1.4) instead of failing call by call.
393
+ Declare a revision as §1.2 says and send only the words of that revision: an executor
379
394
  that declared revision 1 never sends `liveness_no_output` (the server does not police this per connection — it
380
395
  decodes every connection against the current revision's full set — but a word above your declared revision is outside
381
396
  your contract). The same sets are importable:
@@ -407,7 +422,7 @@ zeros, a plus sign, whitespace or a float form are rejected as malformed.
407
422
  |---|---|---|
408
423
  | `challenge` | `nonce` string, `protocolVersion` int | first frame the server sends, immediately on open |
409
424
  | `helloAck` | `ok`, `heartbeatIntervalMs`, `maxInflight`, `gen`, `pendingInstructions`, `chunkWatermarks`, `reconnectGraceMs`, `cancelGraceMs`, `chunkGapTimeoutMs`, `executionCeilingGraceMs` | §1.5 |
410
- | `helloReject` | `code`, `minProtocolVersion?` | §1.4; the socket closes right after |
425
+ | `helloReject` | `code`, `minProtocolVersion?`, `message?` | §1.4; `minProtocolVersion` and `message` appear on `protocol_version_unsupported` only; the socket closes right after |
411
426
  | `instruction` | `gen`, `instructionId`, `rootSessionId`, `issuedSeq` int, `kind`, `args`, `cwd?`, `shellEnv?`, `timeoutMs` int | one unit of work (§3). `cwd` appears on `exec` / `execStream` only, and always there (§3.1) |
412
427
  | `payload` | `gen`, `instructionId`, `part` (`begin` \| `chunk` \| `commit`), `offset?`, `dataB64?`, `totalLen?`, `sha256?` | the bytes for a write-family instruction (§3.4) |
413
428
  | `cancel` | `gen`, `instructionId` | idempotent; answer with a terminal `result` (§5 R11) |
@@ -480,11 +495,19 @@ silently forgiven: it becomes a gap or a missing terminal, and the instruction e
480
495
 
481
496
  ### 3.1 The closed set, its arguments, and the success outcome each one owes
482
497
 
483
- Every `path` in `args` arrives **already absolute and POSIX-normalized** — the server resolved it against
484
- the session's working directory before sending. `exec` and `execStream` additionally carry `cwd`, which is
485
- **always present and always absolute**: run the command in exactly that directory. There is no implicit
486
- base to fall back to, so an executor needs no branch for a missing or relative `cwd`. Every other kind
487
- carries no `cwd` — its paths are already absolute.
498
+ Every `path` in `args` arrives **already absolute** — the server anchored a relative one at the session's
499
+ working directory before sending — and **as written: a `..` or `.` segment, or an empty one, is never folded**
500
+ (revision 5, §2.1). Hand it to your
501
+ filesystem as it is. The kernel resolves `..` component by component, so a `..` that follows a symbolic link
502
+ goes where the link leads (`<root>/bridge/../next` with `bridge -> elsewhere/sub` is `<root>/elsewhere/next`,
503
+ not `<root>/next`) — and that is the file the engine's gates judged: they asked you about this same spelling
504
+ (`exists` / `canonicalPath` / `fileInfo` / `readLink`). `exec` and `execStream` additionally carry `cwd`, which is
505
+ **always present and always absolute** (unfolded the same way): run the command in exactly that directory.
506
+ There is no implicit base to fall back to, so an executor needs no branch for a missing or relative `cwd`.
507
+ Every other kind carries no `cwd` — its paths are already absolute. The paths the server reports back are its
508
+ own spellings, not the ones you return: `fileInfo` reports the path it asked; `listDir` reads only the leaf name
509
+ (last segment) of each entry's `WireFileInfo.path` and reports the entry as `<asked path>/<leaf>`, so a listed
510
+ entry can be asked again as written.
488
511
 
489
512
  <!-- closed-set: DEVICE_INSTRUCTION_KINDS -->
490
513
 
@@ -567,8 +590,8 @@ a moment ago. If you omit `created`, the consumer reports the weaker of the two
567
590
 
568
591
  `message` is required on the failure arm and is shown to the model — make it specific.
569
592
 
570
- This is the full set at the current revision (`3`); the revision table in §2.1 says which revision each word arrived
571
- with, and an executor sends only the words of the revision it declared (§1.2).
593
+ This is the full set at the current revision (`DEVICE_PROTOCOL_VERSION`, §2.1); the revision table in §2.1 says which revision
594
+ each word arrived with, and an executor sends only the words of the revision it declared (§1.2).
572
595
 
573
596
  <!-- closed-set: DEVICE_OUTCOME_ERROR_CODES -->
574
597
 
@@ -972,11 +995,16 @@ These two are a real distinction to the caller: `not_started` is safely retryabl
972
995
  *Honest boundary*: this is a decision-and-audit property, not enforcement against a compromised
973
996
  machine. The protocol assumes an honest executor; it protects against races and mistakes, not against
974
997
  an executor that lies.
975
- 6. **Respect `workspaceRoot` and resolve nothing yourself.** Paths arrive absolute and normalized; the
976
- server has already resolved them against the session's working directory, falling back to the
977
- `workspaceRoot` you registered. Do not re-interpret them, do not expand `~`, do not follow a different
978
- base. You **may** enforce your own containment policy on top (refusing paths outside a root you are
979
- willing to serve) — if you do, refuse with `permission_denied`. What you must never do is silently
998
+ 6. **Respect `workspaceRoot` and resolve nothing yourself.** Paths arrive absolute and unfolded; the
999
+ server has already anchored them at the session's working directory, falling back to the
1000
+ `workspaceRoot` you registered. Do not re-interpret them: never fold a `..` lexically (with a link before
1001
+ it, the folded spelling names a different file than the one the gates judged), do not expand `~`, do not
1002
+ follow a different base. You **may** enforce your own containment policy on top (refusing paths outside a
1003
+ root you are willing to serve) — judge it on where the path resolves (the real path of its existing part),
1004
+ never on a string prefix of the spelling (`<root>/../etc` starts with `<root>/`); if you refuse, refuse
1005
+ with `permission_denied`. Negative control: with `bridge` a link to `/opt/x/sub` (outside the root),
1006
+ `<root>/bridge/../next` resolves to `/opt/x/next` — the link carried the `..` out of the root, so the
1007
+ answer is `permission_denied` (not `not_found`, not success). What you must never do is silently
980
1008
  redirect a path to somewhere else: a write that lands in a different place than the caller adjudicated
981
1009
  is the exact failure this lane is built to prevent.
982
1010
  7. **Do not cache and replay results.** No answer may be served from a cache keyed by command text, path
@@ -0,0 +1,317 @@
1
+ {
2
+ "description": [
3
+ "错误响应体 `{ error, errorCode, … }` 里 `error` 文案的用词约束。`error` 是给人读的一句话,`errorCode` 才是机器面(程序按码分支,不按文案);这份词表约束的是文案怎么写,不是协议。本服务自己的错误文案词域检查读的就是这一份文件,没有第二份。",
4
+ "射程:约束的是本服务自己写的那部分句子。句中插进来的值 —— 调用方送来的名字 / 路径 / id、上游或引擎的原话 —— 原样带出,不在这份词表的约束里;按词表判一句 `error` 时先把这些插入值剔掉(例:请求点名了一个叫 `council` 的模型而目录里没有,拒句里引着的这个名字不算命中)。",
5
+ "`words`:内部词闭集 —— 引擎 / 本服务内部机件的名字,判据是「调用方在 wire 上拿不到这个名字」。`error` 文案里不出现其中任何一个词:把 `words.match.pattern` 里的 `{word}` 换成词、按 `words.match.flags` 编译成正则来匹配。式子两头的 `\\b` 是承重的:wire 字段名的拼法(如 `checkpointToken`)不是整词,不命中;连字符是词边界(`workflow-agent` 里的 `workflow` 命中)。屈折形逐个列成成员,不做词干化(`park` 与 `parked` 是两件事)。",
6
+ "`idShapes`:内部编号形。`error` 文案里不出现任何一形:`shapes[].pattern` 按 `idShapes.flags` 编译成正则来匹配。",
7
+ "`pardons`:逐族放行 —— 唯一的例外来源。一条放行按族 `family` 生效(`<HTTP 状态码>:<errorCode>`);带 `where` 时只放行该族里含这个子串的那一句,不带时该族只有一句文案;`words` 是那一句上放行的词(都是 `words` 闭集的成员);`why` 说这个词在这一族上是调用方自己看得见、拿得到、写得出的哪一样东西(路径段 / wire 字段 / 错误码的拼写 / 旋钮名 / 状态词)。不在放行里的命中都不该出现在 `error` 文案里。"
8
+ ],
9
+ "words": {
10
+ "match": {
11
+ "pattern": "\\b{word}\\b",
12
+ "flags": "i"
13
+ },
14
+ "groups": [
15
+ {
16
+ "forms": [
17
+ "workflow",
18
+ "workflows"
19
+ ],
20
+ "why": "引擎内部的 workflow 执行通道;产品义(`/v1/workflows` 资源、`Workflow` 工具)按族放行,见 `pardons`。"
21
+ },
22
+ {
23
+ "forms": [
24
+ "child",
25
+ "children"
26
+ ],
27
+ "why": "引擎的父子代角色名;产品义(调用方自己在一条 run 下起的后台 agent)按族放行,见 `pardons`。"
28
+ },
29
+ {
30
+ "forms": [
31
+ "host",
32
+ "hosts"
33
+ ],
34
+ "why": "引擎的宿主会话角色(「宿主会话 / 宿主的下一跑」);产品义(worker 所在机器的文件系统路径)按族放行,见 `pardons`。"
35
+ },
36
+ {
37
+ "forms": [
38
+ "park",
39
+ "parks",
40
+ "parking"
41
+ ],
42
+ "why": "挂起对象的名词 / 动词形 —— wire 上只有形容词 `parked`,没有这三个形;错误码自己拼着它的族按族放行,见 `pardons`。"
43
+ },
44
+ {
45
+ "forms": [
46
+ "parked"
47
+ ],
48
+ "why": "wire 状态词(`GET /v1/agents/roster` 的 `?status=` 闭集成员);在待决 / decide 面上是产品词,但仍逐族放行、不整词豁免,见 `pardons`。"
49
+ },
50
+ {
51
+ "forms": [
52
+ "lane",
53
+ "lanes"
54
+ ],
55
+ "why": "本服务对「执行通道 / 部署形」的内部自称;错误码自己拼着它的族按族放行,见 `pardons`。"
56
+ },
57
+ {
58
+ "forms": [
59
+ "leader",
60
+ "leaders"
61
+ ],
62
+ "why": "编排席的内部名;产品义(`POST /v1/leader` 端点)按族放行,见 `pardons`。"
63
+ },
64
+ {
65
+ "forms": [
66
+ "subagent",
67
+ "subagents"
68
+ ],
69
+ "why": "引擎内部的角色名;产品义(`/v1/runs/:id/subagents` 路径段)按族放行,见 `pardons`。"
70
+ },
71
+ {
72
+ "forms": [
73
+ "council",
74
+ "councils"
75
+ ],
76
+ "why": "复审席的内部名 —— wire 上没有这个拼写。"
77
+ },
78
+ {
79
+ "forms": [
80
+ "checkpoint",
81
+ "checkpoints"
82
+ ],
83
+ "why": "挂起点对象的内部名;产品义(错误码目录里在册的部署件名)按族放行,见 `pardons`。"
84
+ },
85
+ {
86
+ "forms": [
87
+ "leg",
88
+ "legs"
89
+ ],
90
+ "why": "本服务对「一段执行」的内部自称 —— wire 上没有这个拼写。"
91
+ },
92
+ {
93
+ "forms": [
94
+ "seam",
95
+ "seams"
96
+ ],
97
+ "why": "本服务对「可替换接缝」的内部自称 —— wire 上没有这个拼写。"
98
+ },
99
+ {
100
+ "forms": [
101
+ "twin",
102
+ "twins"
103
+ ],
104
+ "why": "本服务对「另一后端的孪生实现」的内部自称 —— wire 上没有这个拼写。"
105
+ }
106
+ ]
107
+ },
108
+ "idShapes": {
109
+ "flags": "",
110
+ "shapes": [
111
+ {
112
+ "pattern": "\\bS-\\d+",
113
+ "label": "内部工单号(S-nnn)"
114
+ },
115
+ {
116
+ "pattern": "\\bA-\\d+(?:\\.\\d+)*",
117
+ "label": "内部审计号(A-nnn.n)"
118
+ },
119
+ {
120
+ "pattern": "\\bB-\\d+",
121
+ "label": "内部缺陷号(B-nnn)"
122
+ },
123
+ {
124
+ "pattern": "\\bC-R\\d+",
125
+ "label": "内部裁定号(C-Rnn)"
126
+ },
127
+ {
128
+ "pattern": "\\bdesign/\\d+",
129
+ "label": "内部设计稿号(design/nnn)"
130
+ },
131
+ {
132
+ "pattern": "\\[\\d{3,4}\\]",
133
+ "label": "内部讨论帖号([nnnn])"
134
+ },
135
+ {
136
+ "pattern": "车[A-Z]{1,2}\\b",
137
+ "label": "内部作业名(车XX)"
138
+ },
139
+ {
140
+ "pattern": "\\bwf_[0-9a-f]{6,}",
141
+ "label": "内部扫描号(wf_xxxxxxxx)"
142
+ }
143
+ ]
144
+ },
145
+ "pardons": [
146
+ {
147
+ "family": "400:request.field_invalid",
148
+ "where": "host path",
149
+ "words": [
150
+ "host"
151
+ ],
152
+ "why": "「absolute host path」限定的是调用方自己在 `cwd` / `additionalDirectories` / `additionalReadDirectories` 里送的那些路径 —— `host` 在这里是「worker 跑在哪台机器上」的产品义,不是引擎里的 HOST 会话角色。"
153
+ },
154
+ {
155
+ "family": "404:not_found.workflow",
156
+ "words": [
157
+ "workflow"
158
+ ],
159
+ "why": "`/v1/workflows/:id` 面自己的 404 —— 调用方 URL 里写的就是这个资源名,错误码 `not_found.workflow` 也逐字拼着它。"
160
+ },
161
+ {
162
+ "family": "400:request.path_malformed",
163
+ "where": "malformed workflow path",
164
+ "words": [
165
+ "workflow"
166
+ ],
167
+ "why": "路径段名(`/v1/workflows/…`),调用方自己写进 URL 的那一段。"
168
+ },
169
+ {
170
+ "family": "501:capability.workflow_store_required",
171
+ "where": "workflow",
172
+ "words": [
173
+ "workflow"
174
+ ],
175
+ "why": "两句都点名调用方够得着的东西:`GET /v1/workflows/:id/journal` 这张脸,以及部署旋钮 `WORKFLOW_RUN_STORE`(它自己的拼写里就有 WORKFLOW)。"
176
+ },
177
+ {
178
+ "family": "501:capability.self_orchestration_required",
179
+ "where": "workflow",
180
+ "words": [
181
+ "workflow",
182
+ "workflows"
183
+ ],
184
+ "why": "`/v1/workflows` 提交面与 `GET /v1/capabilities` 的 `workflows` 能力位 —— 长的那句自己就把那个 JSON 键(`workflows:false`)拼了出来。"
185
+ },
186
+ {
187
+ "family": "404:not_found.task_handle",
188
+ "words": [
189
+ "workflow",
190
+ "workflows"
191
+ ],
192
+ "why": "这句自己点名 `GET /v1/workflows/:id/journal` —— 指的是调用方接下来该去读的那张脸,不是引擎车道。"
193
+ },
194
+ {
195
+ "family": "404:not_found.subagent",
196
+ "words": [
197
+ "workflow",
198
+ "child",
199
+ "children"
200
+ ],
201
+ "why": "`workflow` = 同上那张 journal 读面;`child`/`children` = 调用方自己在这条 run 下起的后台 agent —— 它们在 `/v1/runs/:id/subagents` 与 `GET /v1/agents/roster` 上都有行,亲缘关系是调用方自己造的。"
202
+ },
203
+ {
204
+ "family": "400:request.path_malformed",
205
+ "where": "malformed subagent path",
206
+ "words": [
207
+ "subagent"
208
+ ],
209
+ "why": "路径段名(`/v1/runs/:id/subagents/…`),调用方自己写进 URL 的那一段。"
210
+ },
211
+ {
212
+ "family": "501:capability.run_store_required",
213
+ "where": "subagent",
214
+ "words": [
215
+ "subagent"
216
+ ],
217
+ "why": "同一段路径名的两条能力拒(`/v1/runs/:id/subagents/…` 的读面与流面)—— 主语就是调用方刚才请求的那条路径。"
218
+ },
219
+ {
220
+ "family": "404:not_found.checkpoint",
221
+ "words": [
222
+ "checkpoint"
223
+ ],
224
+ "why": "错误码自身即 `not_found.checkpoint` —— 码与文案同词,调用方读码、读文案得到同一件事;不依赖任何它发不出去的字段。"
225
+ },
226
+ {
227
+ "family": "404:not_found.parked_checkpoint",
228
+ "words": [
229
+ "parked",
230
+ "checkpoint"
231
+ ],
232
+ "why": "两个词都在错误码自己的拼写里(`not_found.parked_checkpoint`);`parked` 另是 `GET /v1/agents/roster` 的 `?status=` 闭集成员。"
233
+ },
234
+ {
235
+ "family": "501:capability.checkpoint_store_required",
236
+ "where": "checkpoint store",
237
+ "words": [
238
+ "checkpoint"
239
+ ],
240
+ "why": "运维面 501,码自身就是 `capability.checkpoint_store_required` —— `checkpoint store` 是错误码目录里在册的那只部署件的名字。"
241
+ },
242
+ {
243
+ "family": "501:feature.preemption_disabled",
244
+ "where": "checkpoint store",
245
+ "words": [
246
+ "checkpoint"
247
+ ],
248
+ "why": "同一只部署件,名字来自同一份错误码目录(`capability.checkpoint_store_required`)—— 运维读这句时要装的就是目录里那一件;与同句的 `RESOURCE_SUSPEND` 是两样东西,理由不靠那个旋钮。"
249
+ },
250
+ {
251
+ "family": "400:decide.parked_remember_unsupported",
252
+ "words": [
253
+ "parked"
254
+ ],
255
+ "why": "错误码自身即 `decide.parked_remember_unsupported`;主语是调用方在 `GET /v1/agents/roster` 上看得到的那一行,`parked` 是那张脸 `?status=` 闭集里的词。"
256
+ },
257
+ {
258
+ "family": "409:decide.claim_lost",
259
+ "where": "parked agent is already claimed",
260
+ "words": [
261
+ "parked"
262
+ ],
263
+ "why": "同 decide 族:主语是 `GET /v1/agents/roster` 上状态值逐字为 `parked` 的那一行 —— 这句说的是「你挑的那一行被别人先认领了」。"
264
+ },
265
+ {
266
+ "family": "409:decide.gate_moved",
267
+ "words": [
268
+ "parked"
269
+ ],
270
+ "why": "同 decide 族:`re-parked` 说的是那一行又回到了 roster `?status=` 闭集里的同一个值 —— 调用方的动作(重读待决列表)正是由这个词决定的。"
271
+ },
272
+ {
273
+ "family": "409:decide.not_parked",
274
+ "where": "moved under this decide",
275
+ "words": [
276
+ "parked"
277
+ ],
278
+ "why": "错误码自身即 `decide.not_parked` —— 码与文案说的是同一个 roster 状态值离开了,两边同词。"
279
+ },
280
+ {
281
+ "family": "410:gone.ask_parked",
282
+ "words": [
283
+ "parked"
284
+ ],
285
+ "why": "错误码自身即 `gone.ask_parked`,且 `tool_approval` 帧上有一个同名 additive 键 `parked`(契约 §7b)—— 这个词调用方在两处都见得到。"
286
+ },
287
+ {
288
+ "family": "425:parking.ask_retry",
289
+ "words": [
290
+ "park"
291
+ ],
292
+ "why": "错误码自身即 `parking.ask_retry` —— 「mid-park」是这个码的自然语言拼法,重试就会告诉调用方它最终落在哪。"
293
+ },
294
+ {
295
+ "family": "500:internal.error",
296
+ "where": "the parked approval",
297
+ "words": [
298
+ "parked"
299
+ ],
300
+ "why": "这句说的是赎回一张后台审批卡失败:主语是那张卡,`parked` 是 `GET /v1/agents/roster` 的 `?status=` 闭集与 `tool_approval` 帧同名键上的同一个词。"
301
+ },
302
+ {
303
+ "family": "501:capability.device_lane_required",
304
+ "words": [
305
+ "lane"
306
+ ],
307
+ "why": "错误码自身即 `capability.device_lane_required` —— `device execution lane` 是这个码在错误码目录里的全称,旋钮 `REMOTE_EXEC=device` 在同句里给出兑现路径。"
308
+ },
309
+ {
310
+ "family": "404:not_found.leader_run",
311
+ "words": [
312
+ "leader"
313
+ ],
314
+ "why": "`POST /v1/leader` / `GET /v1/leader/:id` 端点名,也是错误码自身的拼写(`not_found.leader_run`)、能力位名(`capabilities.leader`)与旋钮名(`LEADER_ENABLED`)。"
315
+ }
316
+ ]
317
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/server",
3
- "version": "7.148.0",
3
+ "version": "7.150.0",
4
4
  "description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -45,9 +45,11 @@
45
45
  "scripts/drain-check-local.mjs",
46
46
  "scripts/drain-check.mysql.sql",
47
47
  "scripts/drain-check.pg.sql",
48
+ "scripts/embed-minimal.mjs",
48
49
  "deploy/sema-up",
49
50
  "deploy/facts",
50
51
  "docs/DEVICE-EXECUTOR-PROTOCOL.md",
52
+ "docs/error-text-lexicon.json",
51
53
  "wire-changes/",
52
54
  "USAGE.md",
53
55
  "MIGRATION.md"
@@ -82,7 +84,7 @@
82
84
  "dependencies": {
83
85
  "@modelcontextprotocol/server": "2.4.0",
84
86
  "@sema-agent/core": "7.66.0",
85
- "@sema-agent/settings-schema": "24.0.0",
87
+ "@sema-agent/settings-schema": "25.1.0",
86
88
  "e2b": "2.36.0",
87
89
  "libsodium-wrappers": "0.8.4",
88
90
  "mysql2": "3.22.6",