@sema-agent/server 7.140.0 → 7.142.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 (296) hide show
  1. package/MIGRATION.md +505 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/USAGE.md +142 -25
  5. package/dist/approval-ask-audit-store.d.ts +54 -38
  6. package/dist/approval-ask-audit-store.js +58 -39
  7. package/dist/approval-batch-census.d.ts +27 -0
  8. package/dist/approval-batch-census.js +27 -0
  9. package/dist/approval-card.d.ts +39 -24
  10. package/dist/approval-card.js +6 -3
  11. package/dist/approval-crash-convergence.d.ts +17 -7
  12. package/dist/approval-crash-convergence.js +94 -22
  13. package/dist/approval-deny-reasons.d.ts +34 -30
  14. package/dist/approval-deny-reasons.js +21 -6
  15. package/dist/approval-policy-settlement.d.ts +1 -1
  16. package/dist/approval-reconciler.d.ts +33 -1
  17. package/dist/approval-reconciler.js +43 -40
  18. package/dist/approval.d.ts +15 -0
  19. package/dist/approval.js +10 -0
  20. package/dist/audit.d.ts +4 -2
  21. package/dist/audit.js +2 -2
  22. package/dist/auth-bridge.d.ts +9 -6
  23. package/dist/auth-bridge.js +9 -3
  24. package/dist/boot/adoption.js +2 -1
  25. package/dist/boot/budget-tracing.d.ts +16 -0
  26. package/dist/boot/budget-tracing.js +10 -6
  27. package/dist/boot/device-lane.d.ts +11 -0
  28. package/dist/boot/device-lane.js +16 -0
  29. package/dist/boot/engine-lease.d.ts +24 -3
  30. package/dist/boot/engine-lease.js +9 -2
  31. package/dist/boot/execution-env.d.ts +24 -4
  32. package/dist/boot/execution-env.js +34 -27
  33. package/dist/boot/execution-lane.js +2 -1
  34. package/dist/boot/exit-boundary.js +5 -4
  35. package/dist/boot/memory-boundary.d.ts +2 -2
  36. package/dist/boot/memory-consolidation.d.ts +1 -1
  37. package/dist/boot/memory-consolidation.js +3 -2
  38. package/dist/boot/parked-revive-gate.js +2 -1
  39. package/dist/boot/permission-rules-audit.d.ts +0 -28
  40. package/dist/boot/permission-rules-audit.js +2 -1
  41. package/dist/boot/read-deny-anchor-audit.js +2 -1
  42. package/dist/boot/reapers.d.ts +2 -2
  43. package/dist/boot/reapers.js +4 -3
  44. package/dist/boot/resolve-spec.js +18 -6
  45. package/dist/boot/retention-lane.js +5 -3
  46. package/dist/boot/runner-deps.js +16 -13
  47. package/dist/boot/runtime-caps.js +3 -2
  48. package/dist/boot/session-faces.d.ts +1 -1
  49. package/dist/boot/session-faces.js +8 -6
  50. package/dist/boot/shutdown.js +8 -2
  51. package/dist/boot/stage-04-stores.js +3 -2
  52. package/dist/boot/stage-05-execution-env.d.ts +1 -1
  53. package/dist/boot/stage-05-execution-env.js +11 -7
  54. package/dist/boot/stage-06-runners.d.ts +1 -3
  55. package/dist/boot/stage-06-runners.js +3 -2
  56. package/dist/boot/stage-07-capability-layer.d.ts +1 -2
  57. package/dist/boot/stage-07-capability-layer.js +10 -11
  58. package/dist/boot/stage-08-reapers.d.ts +1 -2
  59. package/dist/boot/stage-08-reapers.js +3 -2
  60. package/dist/boot/stage-09-leader.d.ts +1 -2
  61. package/dist/boot/stage-10-http-server.d.ts +1 -2
  62. package/dist/boot/stage-10-http-server.js +6 -4
  63. package/dist/boot/stores.js +13 -6
  64. package/dist/boot/web-admin.js +18 -17
  65. package/dist/boot/webfetch-summarize-lane.js +2 -1
  66. package/dist/boot/workflow-orchestration.js +3 -2
  67. package/dist/capabilities/builtin-tools.d.ts +2 -1
  68. package/dist/capabilities/builtin-tools.js +2 -4
  69. package/dist/capabilities/composite-members.d.ts +2 -1
  70. package/dist/capabilities/composite-members.js +2 -1
  71. package/dist/capabilities/scenarios.d.ts +1 -1
  72. package/dist/capability-facts.d.ts +33 -0
  73. package/dist/capability-facts.js +32 -0
  74. package/dist/card-void.d.ts +38 -0
  75. package/dist/card-void.js +23 -0
  76. package/dist/config-catalog.js +12 -8
  77. package/dist/config-provider.d.ts +13 -13
  78. package/dist/config-provider.js +19 -33
  79. package/dist/config-types.d.ts +39 -10
  80. package/dist/config.d.ts +6 -0
  81. package/dist/config.js +72 -49
  82. package/dist/delegated-session-owner.d.ts +21 -19
  83. package/dist/delegated-session-owner.js +1 -1
  84. package/dist/device-store.d.ts +7 -0
  85. package/dist/device-store.js +3 -0
  86. package/dist/execution-config-root.d.ts +22 -0
  87. package/dist/execution-config-root.js +35 -0
  88. package/dist/execution-lane-caps.d.ts +50 -2
  89. package/dist/execution-lane-caps.js +90 -13
  90. package/dist/execution-placement.d.ts +3 -0
  91. package/dist/execution-placement.js +7 -0
  92. package/dist/fleet/drain-entry.d.ts +3 -0
  93. package/dist/fleet/fleet-bus.d.ts +6 -3
  94. package/dist/hooks/hook-runner.d.ts +6 -0
  95. package/dist/hooks/hook-runner.js +30 -1
  96. package/dist/hosted-posture.d.ts +8 -0
  97. package/dist/hosted-posture.js +4 -0
  98. package/dist/http/admission.js +3 -3
  99. package/dist/http/caller-trust.d.ts +3 -2
  100. package/dist/http/caller-trust.js +2 -1
  101. package/dist/http/dispatch.js +8 -2
  102. package/dist/http/execution-context.d.ts +2 -2
  103. package/dist/http/idempotency.d.ts +1 -1
  104. package/dist/http/live-frame.d.ts +24 -0
  105. package/dist/http/live-frame.js +16 -0
  106. package/dist/http/principal-gate.d.ts +3 -1
  107. package/dist/http/principal-gate.js +17 -8
  108. package/dist/http/resume-legs.js +42 -29
  109. package/dist/http/route-table.js +4 -0
  110. package/dist/http/routes/approvals-assistant.js +1 -0
  111. package/dist/http/routes/attachments.js +18 -0
  112. package/dist/http/routes/capabilities.js +10 -6
  113. package/dist/http/routes/diagnostics.d.ts +0 -19
  114. package/dist/http/routes/diagnostics.js +16 -2
  115. package/dist/http/routes/memory-bundle.d.ts +2 -2
  116. package/dist/http/routes/memory-bundle.js +1 -1
  117. package/dist/http/routes/memory-compliance.js +1 -1
  118. package/dist/http/routes/memory-policy.js +27 -7
  119. package/dist/http/routes/run-permission-mode.d.ts +75 -0
  120. package/dist/http/routes/run-permission-mode.js +170 -0
  121. package/dist/http/routes/runs.js +3 -3
  122. package/dist/http/routes/session-memory-sync.d.ts +63 -0
  123. package/dist/http/routes/session-memory-sync.js +157 -0
  124. package/dist/http/routes/session-sync.d.ts +3 -6
  125. package/dist/http/routes/session-sync.js +7 -2
  126. package/dist/http/routes/sessions-list.d.ts +2 -1
  127. package/dist/http/routes/sessions.js +5 -4
  128. package/dist/http/routes/tasks.js +70 -71
  129. package/dist/http/run-read-face.d.ts +7 -0
  130. package/dist/http/run-read-face.js +10 -4
  131. package/dist/http/send.d.ts +6 -1
  132. package/dist/http/send.js +10 -3
  133. package/dist/http/server.d.ts +20 -7
  134. package/dist/http/server.js +2 -4
  135. package/dist/http/sse-log.d.ts +3 -8
  136. package/dist/http/stored-body-replay.d.ts +3 -3
  137. package/dist/http/stored-body-replay.js +3 -1
  138. package/dist/http/submit-replay.d.ts +4 -3
  139. package/dist/http/submit-replay.js +2 -2
  140. package/dist/http/sync-submit-body.d.ts +21 -4
  141. package/dist/http/sync-submit-body.js +13 -0
  142. package/dist/identity-source.d.ts +21 -2
  143. package/dist/identity-source.js +6 -0
  144. package/dist/instruction-source-notice.d.ts +7 -0
  145. package/dist/instruction-source-notice.js +6 -6
  146. package/dist/mcp-assertion-header.d.ts +4 -0
  147. package/dist/mcp-assertion-header.js +5 -0
  148. package/dist/memory-incident-sink.d.ts +19 -6
  149. package/dist/memory-incident-sink.js +8 -4
  150. package/dist/memory-posture.d.ts +1 -1
  151. package/dist/memory-scope.d.ts +4 -4
  152. package/dist/memory-scope.js +1 -1
  153. package/dist/memory-sync-client.d.ts +35 -23
  154. package/dist/memory-sync-client.js +122 -52
  155. package/dist/memory-sync-identity.d.ts +24 -0
  156. package/dist/memory-sync-identity.js +57 -0
  157. package/dist/memory-sync.d.ts +7 -1
  158. package/dist/memory-sync.js +6 -3
  159. package/dist/observability/fail-open.d.ts +57 -12
  160. package/dist/observability/fail-open.js +50 -9
  161. package/dist/observability/metrics.js +0 -1
  162. package/dist/observability/run-terminal.d.ts +93 -31
  163. package/dist/observability/run-terminal.js +175 -171
  164. package/dist/observability/secret-env-scrub.d.ts +20 -1
  165. package/dist/observability/secret-env-scrub.js +14 -0
  166. package/dist/orchestration/workflow-completion-inbox.d.ts +5 -2
  167. package/dist/orchestration/workflow-completion-inbox.js +13 -5
  168. package/dist/orchestration/workflow-notify-journal.d.ts +5 -3
  169. package/dist/orchestration/workflow-notify-journal.js +2 -1
  170. package/dist/permission-mode-admission.d.ts +68 -0
  171. package/dist/permission-mode-admission.js +23 -0
  172. package/dist/permission-rule-list.d.ts +55 -6
  173. package/dist/permission-rule-list.js +52 -5
  174. package/dist/plugins/approval-ask-store-file.d.ts +14 -4
  175. package/dist/plugins/approval-ask-store-file.js +48 -7
  176. package/dist/plugins/approval-ask-store-memory.d.ts +2 -1
  177. package/dist/plugins/approval-ask-store-memory.js +9 -8
  178. package/dist/plugins/approval-ask-store-sql.d.ts +42 -10
  179. package/dist/plugins/approval-ask-store-sql.js +49 -19
  180. package/dist/plugins/caching-session-store.d.ts +6 -0
  181. package/dist/plugins/caching-session-store.js +3 -0
  182. package/dist/plugins/checkpoint-store-sql.d.ts +65 -17
  183. package/dist/plugins/checkpoint-store-sql.js +74 -3
  184. package/dist/plugins/device-store-sql.d.ts +5 -2
  185. package/dist/plugins/device-store-sql.js +4 -1
  186. package/dist/plugins/execution-placement-sql.d.ts +11 -1
  187. package/dist/plugins/execution-placement-sql.js +12 -1
  188. package/dist/plugins/file-run-store.d.ts +7 -2
  189. package/dist/plugins/file-run-store.js +12 -2
  190. package/dist/plugins/fork-routing-session-store.d.ts +10 -32
  191. package/dist/plugins/fork-routing-session-store.js +2 -61
  192. package/dist/plugins/k8s-exec-protocol.d.ts +4 -1
  193. package/dist/plugins/k8s-exec-protocol.js +6 -1
  194. package/dist/plugins/local-checkpoint-store.d.ts +10 -1
  195. package/dist/plugins/local-checkpoint-store.js +22 -0
  196. package/dist/plugins/local-session-store.d.ts +260 -39
  197. package/dist/plugins/local-session-store.js +582 -57
  198. package/dist/plugins/local-session-window.d.ts +17 -3
  199. package/dist/plugins/local-session-window.js +7 -13
  200. package/dist/plugins/local-task-attachment-store.d.ts +12 -2
  201. package/dist/plugins/local-task-attachment-store.js +67 -43
  202. package/dist/plugins/memory-key-guards.d.ts +3 -3
  203. package/dist/plugins/memory-run-store.d.ts +7 -2
  204. package/dist/plugins/memory-run-store.js +12 -2
  205. package/dist/plugins/one-time-migrations.d.ts +68 -2
  206. package/dist/plugins/one-time-migrations.js +120 -4
  207. package/dist/plugins/pg-pool.js +3 -2
  208. package/dist/plugins/pg-session-storage.d.ts +2 -0
  209. package/dist/plugins/pg-session-storage.js +3 -2
  210. package/dist/plugins/remote-env-e2b.d.ts +47 -7
  211. package/dist/plugins/remote-env-e2b.js +242 -46
  212. package/dist/plugins/remote-env-k8s.d.ts +51 -6
  213. package/dist/plugins/remote-env-k8s.js +234 -44
  214. package/dist/plugins/remote-env-local-docker.d.ts +40 -14
  215. package/dist/plugins/remote-env-local-docker.js +127 -33
  216. package/dist/plugins/run-store-sql.d.ts +11 -3
  217. package/dist/plugins/run-store-sql.js +13 -4
  218. package/dist/plugins/sandbox-read-floor.d.ts +273 -0
  219. package/dist/plugins/sandbox-read-floor.js +608 -0
  220. package/dist/plugins/session-ownership.d.ts +2 -1
  221. package/dist/plugins/session-placement.d.ts +17 -4
  222. package/dist/plugins/session-placement.js +2 -1
  223. package/dist/plugins/session-store.d.ts +18 -20
  224. package/dist/plugins/session-store.js +4 -12
  225. package/dist/plugins/store-backend.d.ts +41 -7
  226. package/dist/plugins/store-backend.js +22 -4
  227. package/dist/plugins/store-contracts.d.ts +35 -3
  228. package/dist/plugins/store-contracts.js +3 -0
  229. package/dist/plugins/task-attachment-store.d.ts +112 -14
  230. package/dist/plugins/task-attachment-store.js +221 -28
  231. package/dist/plugins/tidb-pool.js +2 -1
  232. package/dist/plugins/tidb-session-store.d.ts +4 -1
  233. package/dist/plugins/tidb-session-store.js +3 -2
  234. package/dist/plugins/workspace-fill.d.ts +60 -0
  235. package/dist/plugins/workspace-fill.js +106 -0
  236. package/dist/project-bundle.d.ts +38 -0
  237. package/dist/project-bundle.js +609 -0
  238. package/dist/run-cancel-context.d.ts +34 -0
  239. package/dist/run-cancel-context.js +7 -0
  240. package/dist/run-local.js +2 -8
  241. package/dist/runs.d.ts +39 -12
  242. package/dist/runs.js +69 -55
  243. package/dist/sandbox-egress-policy.d.ts +4 -1
  244. package/dist/sandbox-egress-policy.js +3 -1
  245. package/dist/sandbox-git-plane.d.ts +31 -12
  246. package/dist/sandbox-git-plane.js +24 -4
  247. package/dist/security.d.ts +11 -2
  248. package/dist/security.js +8 -0
  249. package/dist/server-secret-env.d.ts +2 -1
  250. package/dist/server-secret-env.js +2 -4
  251. package/dist/session-error-wire.d.ts +46 -4
  252. package/dist/session-error-wire.js +23 -0
  253. package/dist/session-incarnation.d.ts +9 -3
  254. package/dist/session-sync-kernel.d.ts +42 -1
  255. package/dist/session-sync-kernel.js +17 -0
  256. package/dist/session-sync.js +16 -4
  257. package/dist/sql-engine-coordinates.d.ts +49 -0
  258. package/dist/sql-engine-coordinates.js +27 -0
  259. package/dist/standing-answer-grant.d.ts +31 -2
  260. package/dist/standing-answer-grant.js +14 -2
  261. package/dist/store-posture.d.ts +1 -1
  262. package/dist/task-a2a.d.ts +1 -1
  263. package/dist/task-mcp.d.ts +1 -1
  264. package/dist/task-settings.d.ts +62 -27
  265. package/dist/task-settings.js +105 -29
  266. package/dist/terminal.d.ts +97 -20
  267. package/dist/terminal.js +107 -18
  268. package/dist/tool-approval.d.ts +4 -3
  269. package/dist/tool-approval.js +12 -14
  270. package/dist/trace/core-keyset-guard.d.ts +196 -2
  271. package/dist/trace/engine-notice-wire.d.ts +8 -2
  272. package/dist/trace/engine-notice-wire.js +4 -2
  273. package/dist/trace/exit-seat.d.ts +9 -1
  274. package/dist/trace/exit-seat.js +1 -0
  275. package/dist/trace/ledger-sink.d.ts +8 -4
  276. package/dist/trace/ledger-sink.js +2 -2
  277. package/dist/trace/model-segment.d.ts +2 -2
  278. package/dist/trace/project.d.ts +18 -1
  279. package/dist/trace/project.js +16 -0
  280. package/dist/trace/redact.js +323 -90
  281. package/dist/trace/self-minted-wire.d.ts +419 -4
  282. package/dist/trace/self-minted-wire.js +145 -0
  283. package/dist/trace/wire-projection-faces.d.ts +1 -1
  284. package/dist/trace/wire-projection-faces.js +1 -1
  285. package/dist/verifier-pause-card.d.ts +8 -0
  286. package/dist/verifier-pause-card.js +19 -0
  287. package/dist/web-admin-client/apply-effective.d.ts +5 -7
  288. package/dist/web-admin-client/apply-effective.js +22 -2
  289. package/dist/web-admin-client/candidate-gate.d.ts +1 -1
  290. package/dist/web-admin-client/effective-keys.js +2 -0
  291. package/dist/web-admin-client/read-warnings.d.ts +2 -2
  292. package/dist/web-admin-client/types.d.ts +4 -0
  293. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +3 -2
  294. package/package.json +2 -2
  295. package/wire-changes/server@7.141.0.json +367 -0
  296. package/wire-changes/server@7.142.0.json +639 -0
@@ -150,6 +150,13 @@ export const SELF_MINTED_WIRE = {
150
150
  title: { attr: "-", since: "7.133.0" },
151
151
  },
152
152
  },
153
+ mcpTransportKind: {
154
+ at: "GET /v1/capabilities mcpTransportKinds[]",
155
+ members: {
156
+ stdio: { attr: "-", since: "7.141.0" },
157
+ http: { attr: "-", since: "7.141.0" },
158
+ },
159
+ },
153
160
  credentialPlaneSandboxGitState: {
154
161
  at: "GET /v1/capabilities credentialPlane.sandboxGit.state",
155
162
  members: {
@@ -228,6 +235,13 @@ export const SELF_MINTED_WIRE = {
228
235
  deploymentPackages: { attr: "present-iff deployment mod packages loaded at boot", since: "7.138.0" },
229
236
  },
230
237
  },
238
+ healthEngineLeaseKey: {
239
+ at: "GET /health engineLease",
240
+ members: {
241
+ lingerMs: { attr: "present-iff engine lease leg armed and observing", since: "7.141.0" },
242
+ tickMs: { attr: "present-iff engine lease leg armed and observing", since: "7.141.0" },
243
+ },
244
+ },
231
245
  modelsRowKey: {
232
246
  at: "GET /v1/models models[] 行键(<键> → 在场律)",
233
247
  members: {
@@ -244,6 +258,13 @@ export const SELF_MINTED_WIRE = {
244
258
  at: "GET /v1/sessions sessions[] 行键 = PATCH /v1/sessions/:id 200 体 = 409 conflict.session_row_changed currentRow(<键> → 在场律)",
245
259
  members: {
246
260
  rowTag: { attr: "present-iff the row can be written conditionally (the store has the row write primitive and the row carries an incarnation)", since: "7.139.0" },
261
+ unreadable: { attr: "present-iff the session head's leaf cannot be read (the file backend: the archive header is corrupt / truncated, or the archive cannot be read); the SQL backends never carry it; PATCH answers 500 for such a session before writing, so its 200 / 409 rows never carry it", since: "7.142.0" },
262
+ },
263
+ },
264
+ sessionsListRowUnreadableKey: {
265
+ at: "GET /v1/sessions sessions[].unreadable 键(<键> → 在场律)",
266
+ members: {
267
+ errorCode: { attr: "always; the errorCode GET /v1/sessions/:id answers for the same session (corrupt_session | internal.error today)", since: "7.142.0" },
247
268
  },
248
269
  },
249
270
  toolEndGateDispositionKey: {
@@ -338,6 +359,18 @@ export const SELF_MINTED_WIRE = {
338
359
  no_authorizer_session: { attr: "-", since: "7.137.0" },
339
360
  },
340
361
  },
362
+ projectBundleInvalidReason: {
363
+ at: "400 attachment.bundle_invalid reason(上传项目包 mime 的体过不了项目包的读者;另带 path?)",
364
+ members: {
365
+ not_archive: { attr: "-", since: "7.142.0" },
366
+ unsafe_path: { attr: "-", since: "7.142.0" },
367
+ entry_type: { attr: "-", since: "7.142.0" },
368
+ reserved_path: { attr: "-", since: "7.142.0" },
369
+ duplicate_path: { attr: "-", since: "7.142.0" },
370
+ expanded_too_large: { attr: "-", since: "7.142.0" },
371
+ too_many_entries: { attr: "-", since: "7.142.0" },
372
+ },
373
+ },
341
374
  submitIdempotency: {
342
375
  at: "提交幂等(<端点>#<面> → 应答状态)",
343
376
  members: {
@@ -346,6 +379,10 @@ export const SELF_MINTED_WIRE = {
346
379
  "GET /v1/leader?idempotencyKey": { attr: 200, since: "7.125.0" },
347
380
  "POST /v1/runs|/v1/tasks Idempotency-Key#conflict.run_exists": { attr: 409, since: "7.125.0" },
348
381
  "POST /v1/runs|/v1/tasks Idempotency-Key#conflict.idempotency_payload_mismatch": { attr: 409, since: "7.126.0" },
382
+ "POST /v1/tasks|/v1/tasks/stream#replay_first_answer_envelope(同键重放的体 = 首答的信封 + replay: true:终局 = 引擎结果(result 是串),停驻 = 结果 + 回执三键,行还在跑 = 回执三键;流式腿放进 done.result)": { attr: 200, since: "7.142.0" },
383
+ },
384
+ retired: {
385
+ "POST /v1/tasks|/v1/tasks/stream#replay_run_read_face(同键重放的体 = GET /v1/runs/:id 的读面 + replay: true:result 是对象,外加 status / errorCode / heldBy 等读面键)": { attr: 200, since: "7.125.0", until: "7.142.0" },
349
386
  },
350
387
  },
351
388
  builtinScenario: {
@@ -418,6 +455,33 @@ export const SELF_MINTED_WIRE = {
418
455
  acceptableForm: { attr: "present-iff", since: "7.137.0" },
419
456
  },
420
457
  },
458
+ permissionModeVerbBodyKey: {
459
+ at: "POST /v1/runs/:id/permission-mode 200 体(<键> → 在场律)",
460
+ members: {
461
+ taskId: { attr: "always", since: "7.141.0" },
462
+ sessionId: { attr: "always", since: "7.141.0" },
463
+ status: { attr: "always;running", since: "7.141.0" },
464
+ permissionMode: { attr: "always;engine receipt verbatim { requested?, effective, foldedBy? }", since: "7.141.0" },
465
+ admission: { attr: "present-iff the admission judge changed the word;{ requested, admitted, foldedBy }", since: "7.141.0" },
466
+ persisted: { attr: "always", since: "7.141.0" },
467
+ persistMiss: { attr: "present-iff persisted:false", since: "7.141.0" },
468
+ },
469
+ },
470
+ permissionModeAdmissionFold: {
471
+ at: "POST /v1/runs/:id/permission-mode 200 体 admission.foldedBy",
472
+ members: {
473
+ entry_floor: { attr: "-", since: "7.141.0" },
474
+ disable_auto_mode: { attr: "-", since: "7.141.0" },
475
+ },
476
+ },
477
+ permissionModePersistMiss: {
478
+ at: "POST /v1/runs/:id/permission-mode 200 体 persistMiss(persisted:false 时)",
479
+ members: {
480
+ claim_released: { attr: "-", since: "7.141.0" },
481
+ context_absent: { attr: "-", since: "7.141.0" },
482
+ store_failed: { attr: "-", since: "7.141.0" },
483
+ },
484
+ },
421
485
  endpointFaceStatus: {
422
486
  at: "逐端点应答面 → 状态(<端点>#<面> → 状态;只登记本版改了状态的面)",
423
487
  members: {
@@ -437,6 +501,9 @@ export const SELF_MINTED_WIRE = {
437
501
  "POST /v1/sessions/:id/sync/import#identical_repush_blob_missing(体 missing_blob)": { attr: 422, since: "7.136.0" },
438
502
  "PATCH /v1/sessions/:id#title_no_visible_character(体 request.field_invalid)": { attr: 400, since: "7.136.0" },
439
503
  "POST /v1/sessions/:id/sync/import#title_no_visible_character(Phase A 体的 title;体 request.field_invalid)": { attr: 400, since: "7.136.0" },
504
+ "POST /v1/sessions/:id/sync/import#anchor_outside_declared_entries(Phase A 体的 anchors[i]:entryId 不在 entryIds 里 / 元素不是带串型 eventId 与 entryId 的对象;体 request.field_invalid)": { attr: 400, since: "7.141.0" },
505
+ "POST /v1/sessions/:id/fork#stamped_archive(DB_BACKEND=local;源存档仍带更早版本写下的属主戳;零写;体 conflict + 带戳存档的固定句)": { attr: 409, since: "7.141.0" },
506
+ "POST /v1/sessions/:id/sync/import/:stagingId/entries#stamped_archive(DB_BACKEND=local;提交落在仍带属主戳的存档上;行净零写;体 conflict + 带戳存档的固定句)": { attr: 409, since: "7.141.0" },
440
507
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#images_url_credential(新提交;体 request.field_invalid + field images[i].url + reason url_userinfo|url_credential_param)": { attr: 400, since: "7.136.0" },
441
508
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_malformed(新提交;列表不是数组 / 条目不是对象 / 键值判不出形;体 request.field_invalid)": { attr: 400, since: "7.136.0" },
442
509
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_unknown_key(新提交;词表外的键;体 request.body_shape + unknownKeys)": { attr: 400, since: "7.136.0" },
@@ -450,6 +517,8 @@ export const SELF_MINTED_WIRE = {
450
517
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#skills[i].mods|agents[i].skills[j].mods(新提交;体 request.field_invalid)": { attr: 400, since: "7.137.0" },
451
518
  "PUT /v1/sessions/:id/policy|POST /v1/sessions/:id/sync/import#toolDeny 名内带 *(`*` / `mcp__git*` / `Bas*`)": { attr: 200, since: "7.137.0" },
452
519
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(settings.permissions.deny|ask)": { attr: 200, since: "7.137.0" },
520
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#settings.permissions.deny|ask 带层条目 { rule, layer }(新提交;layer = 设置来源词)": { attr: 200, since: "7.141.0" },
521
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#user 层 / 形路径规则而执行环境的配置根读不出(沙箱车道没转 SEMA_CONFIG_DIR 且 home 未知;体 request.unprocessable + problems[].reason home_unresolvable;续跑 409 同句)": { attr: 422, since: "7.141.0" },
453
522
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(excludeTools)": { attr: 200, since: "7.137.0" },
454
523
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(skills[i].disallowedTools|agents[i].skills[j].disallowedTools)": { attr: 200, since: "7.137.0" },
455
524
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(agents[i].denyTools)": { attr: 200, since: "7.137.0" },
@@ -457,6 +526,7 @@ export const SELF_MINTED_WIRE = {
457
526
  "POST /v1/assistant/tasks/:id/plan_review#checkpointId_current(体带当前门的身份;受理形与不带键同)": { attr: 200, since: "7.137.0" },
458
527
  "POST /v1/tasks|/v1/tasks/stream|/v1/runs#rewindFiles(新提交;体 request.body_shape + unknownKeys [rewindFiles])": { attr: 400, since: "7.139.0" },
459
528
  "POST /v1/side-query#uncoded_error_with_preflight_prefix(没有引擎码、英文开头与前缀表同形的错误;体 internal.error)": { attr: 500, since: "7.139.0" },
529
+ "POST /v1/approvals/:sessionId/decide#parked_principal_lane_not_permitted(停驻赎回;卡的主体此刻不被许可本部署的执行车道;approve 与 deny 同答;认领之前,停驻行不动、卡仍待决;体 resume_blocked_by_policy + blockedBy execution_lane_not_allowed + allowedLanes + lane + retriable)": { attr: 409, since: "7.139.0" },
460
530
  "PATCH /v1/sessions/:id#mirror_row(只读镜像行上的写,带不带 expectedRowTag;体 conflict.session_mirror + forkPath)": { attr: 409, since: "7.139.0" },
461
531
  "PATCH /v1/sessions/:id#owner_changed_after_gate(门那一读之后同一会话的属主被改;体 not_found.session)": { attr: 404, since: "7.139.0" },
462
532
  "PATCH /v1/sessions/:id#expectedRowTag_stale(行已不在那只标签上;体 conflict.session_row_changed + currentRow)": { attr: 409, since: "7.139.0" },
@@ -465,6 +535,9 @@ export const SELF_MINTED_WIRE = {
465
535
  "POST /v1/memory/erase|POST /v1/sessions/:id/memory/erase#erasure_store_unjudged(抹除落到部署的店之外的那只店:点名的层住在个人挂载上,或按会话抹除而这只会话在另一只店有贡献 / 那只店的账读不出;体 memory.erasure_store_unjudged,什么都没删)": { attr: 409, since: "7.140.0" },
466
536
  "POST /v1/memory/export|POST /v1/memory/import|GET /v1/memory/origin/external|POST /v1/memory/erase#layers_span_two_stores(请求点名的层分住两只店;体 request.memory_layer)": { attr: 400, since: "7.140.0" },
467
537
  "记忆诸口 + POST /v1/admin/memory/consolidation/run|GET /v1/admin/memory/consolidation|GET /v1/memory/export|POST /v1/memory/sync/:scope#layer_unreadable(请求点名的层引擎读不出;体 request.memory_layer)": { attr: 400, since: "7.140.0" },
538
+ "POST /v1/memory/sync/:scope#identity_undeclared(DB 记忆平面没声明 MEMORY_SYNC_SERVE_IDENTITY;鉴权之后;体 feature.memory_sync_serve_disabled)": { attr: 501, since: "7.142.0" },
539
+ "POST /v1/memory/sync/:scope#peer_not_declared_identity(peer 不是同步身份的规范形 / 带凭据 / 非 http(s) / 超宽 / 空串;体 request.field_invalid + field peer + reason)": { attr: 400, since: "7.142.0" },
540
+ "POST /v1/memory/sync/:scope#peer_not_this_center(peer 是规范形但不等于本中心声明的身份;零读零写;体 config.memory_sync_target_mismatch)": { attr: 409, since: "7.142.0" },
468
541
  },
469
542
  },
470
543
  memoryLayerSeatKey: {
@@ -477,6 +550,42 @@ export const SELF_MINTED_WIRE = {
477
550
  "POST /v1/sessions/:id/memory/erase#body.scope": { attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;absent ⇒ the deployment's store;selector still minted from the path", since: "7.140.0" },
478
551
  },
479
552
  },
553
+ sessionMemoryStatusKey: {
554
+ at: "GET /v1/sessions/:id/memory-status 200 体顶层键(<键> → 在场律)",
555
+ members: {
556
+ memorySync: { attr: "present-iff this deployment runs a memory sync leg;{parked:[{scope,wayOut}]} in sync order;parked:[] ⇔ no layer parked;deployment fact (same for every session, ?scope= not applied)", since: "7.141.0" },
557
+ },
558
+ },
559
+ memorySyncWayOut: {
560
+ at: "GET /v1/sessions/:id/memory-status memorySync.parked[].wayOut",
561
+ members: {
562
+ delete_cursor: { attr: "-", since: "7.141.0" },
563
+ },
564
+ },
565
+ memorySyncIdentityFlaw: {
566
+ at: "400 request.field_invalid reason(POST /v1/sessions/:id/memory/sync 的 target · POST /v1/memory/sync/:scope 的 peer;另带 field)",
567
+ members: {
568
+ "not-http-url": { attr: "-", since: "7.142.0" },
569
+ userinfo: { attr: "-", since: "7.142.0" },
570
+ query: { attr: "-", since: "7.142.0" },
571
+ fragment: { attr: "-", since: "7.142.0" },
572
+ credential: { attr: "-", since: "7.142.0" },
573
+ "too-long": { attr: "-", since: "7.142.0" },
574
+ "not-canonical": { attr: "-", since: "7.142.0" },
575
+ },
576
+ },
577
+ sessionMemorySyncWire: {
578
+ at: "POST /v1/sessions/:id/memory/sync(<面>#<键> → 读法 / 在场律)",
579
+ members: {
580
+ "body#target": { attr: "required;the only key;the target engine's GET /v1/capabilities memorySyncServe.identity verbatim;not a declared sync identity ⇒ 400 request.field_invalid", since: "7.142.0" },
581
+ "200#target": { attr: "always;engine report verbatim", since: "7.142.0" },
582
+ "200#sourceRevision": { attr: "always;the session leafId read in the same head read as the owner gate", since: "7.142.0" },
583
+ "200#scopes": { attr: "always;the read set: latest settled run's effectiveMemoryScopes (mounted ⇒ scope keys in serving order; memoryless / none ⇒ [])", since: "7.142.0" },
584
+ "200#layers": { attr: "present-iff no whole-round refusal;one entry per read-set layer the round ran (engine outcome synced | incomplete | refused | failed)", since: "7.142.0" },
585
+ "200#refused": { attr: "present-iff whole-round refusal;{code: config.memory_sync_target_mismatch | session_active, message}", since: "7.142.0" },
586
+ "409 conflict.session_memory_unobserved#activeTaskId": { attr: "present-iff the session has a run in flight", since: "7.142.0" },
587
+ },
588
+ },
480
589
  refusalSentenceForm: {
481
590
  at: "拒体 message 的句型(<码>#<座> → 句型骨架;码 / 状态 / 机读位不变)",
482
591
  members: {
@@ -489,6 +598,8 @@ export const SELF_MINTED_WIRE = {
489
598
  "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" },
490
599
  "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" },
491
600
  "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" },
601
+ "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" },
602
+ "400 request.field_invalid#settings.permissions.allow.bad_entry": { attr: "<field>[<index>] is not a string — every entry must be a permission-rule string (a settings layer's { \"rule\", \"layer\" } entry is read in deny / ask only). …", since: "7.141.0" },
492
603
  "400 request.field_invalid#a2aPeers.not_array": { attr: "head: a2aPeers is <shape>, not an array of A2A peer declarations", since: "7.136.0" },
493
604
  "400 request.field_invalid#a2aPeers[i].not_object": { attr: "head: a2aPeers[i] is <shape>, not an A2A peer declaration (an object)", since: "7.136.0" },
494
605
  "400 request.field_invalid#a2aPeers[i].<key>.unusable(url / cardUrl 凭据拒之外的键值坏形)": { attr: "<field> (peer <name>) is not a usable declaration — <rule> …", since: "7.136.0" },
@@ -566,6 +677,7 @@ export const SELF_MINTED_WIRE = {
566
677
  at: "GET /v1/config/catalog rows[](<行名> → 域;只登本版新增的行)",
567
678
  members: {
568
679
  SEALED_KEY_DIR: { attr: "store", since: "7.136.0" },
680
+ MEMORY_SYNC_SERVE_IDENTITY: { attr: "memory", since: "7.142.0" },
569
681
  },
570
682
  },
571
683
  deviceProtocolRevision: {
@@ -576,6 +688,36 @@ export const SELF_MINTED_WIRE = {
576
688
  3: { attr: "+name_too_long", since: "7.137.0" },
577
689
  },
578
690
  },
691
+ hookNonBlockingFailureReason: {
692
+ at: "fleet stream hook_notice kind:hook_non_blocking_failure reason",
693
+ members: {
694
+ exit_nonzero: { attr: "-", since: "7.48.0" },
695
+ timeout: { attr: "-", since: "7.48.0" },
696
+ spawn_failed: { attr: "-", since: "7.48.0" },
697
+ bad_json: { attr: "-", since: "7.48.0" },
698
+ matcher_over_budget: { attr: "-", since: "7.133.0" },
699
+ url_not_allowed: { attr: "-", since: "7.142.0" },
700
+ },
701
+ },
702
+ hookManagedUnrunReason: {
703
+ at: "fleet stream hook_notice kind:hook_managed_unrun reason",
704
+ members: {
705
+ matcher_invalid: { attr: "-", since: "7.133.0" },
706
+ llm_carrier_unavailable: { attr: "-", since: "7.133.0" },
707
+ llm_cap: { attr: "-", since: "7.133.0" },
708
+ powershell_unsupported: { attr: "-", since: "7.133.0" },
709
+ if_unevaluable: { attr: "-", since: "7.133.0" },
710
+ budget_exhausted: { attr: "-", since: "7.133.0" },
711
+ spawn_failed: { attr: "-", since: "7.133.0" },
712
+ timeout: { attr: "-", since: "7.133.0" },
713
+ exit_nonzero: { attr: "-", since: "7.133.0" },
714
+ bad_json: { attr: "-", since: "7.133.0" },
715
+ decision_out_of_set: { attr: "-", since: "7.133.0" },
716
+ evidence_unavailable: { attr: "-", since: "7.133.0" },
717
+ rewrite_unsettled: { attr: "-", since: "7.133.0" },
718
+ url_not_allowed: { attr: "-", since: "7.142.0" },
719
+ },
720
+ },
579
721
  wireValueRule: {
580
722
  at: "出口值变换(<端点>#<键> → 变换)",
581
723
  members: {
@@ -605,6 +747,9 @@ export const SELF_MINTED_WIRE = {
605
747
  "GET /v1/config/catalog#rows[CONFIG_PROVIDER].semantics": { attr: "remote-without-center-url-refuses-boot", since: "7.139.0" },
606
748
  "GET /v1/config/catalog#rows[RETENTION_MODE].semantics": { attr: "enforce-without-horizon-or-cadence-refuses-boot", since: "7.139.0" },
607
749
  "GET /v1/config/catalog#rows[RETENTION_SWEEP_INTERVAL_SEC].semantics": { attr: "cadence-without-horizon-refuses-boot", since: "7.139.0" },
750
+ "GET /v1/config/catalog#rows[DEVICE_RELAY_URL].semantics": { attr: "required-on-device-lane;ws-url-or-literal-none;none-with-bindings-warns", since: "7.141.0" },
751
+ "GET /v1/config/catalog#rows[DEVICE_RELAY_URL].derivedDefaultNote": { attr: "no-default;absent-refuses-boot", since: "7.141.0" },
752
+ "GET /v1/config/catalog#rows[DEVICE_RELAY_URL].enumValues": { attr: "none(echoed-verbatim)", since: "7.141.0" },
608
753
  "GET /v1/sessions/:id/mcp#servers[].error": { attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200", since: "7.138.0" },
609
754
  "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" },
610
755
  "GET /v1/config/catalog#rows[MODEL_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
@@ -243,7 +243,7 @@ export declare const WIRE_PROJECTION_FACES: {
243
243
  readonly projector: "engineNoticeEventData";
244
244
  readonly coreType: "EngineNotice";
245
245
  readonly excluded: readonly [];
246
- readonly minted: readonly ["ts"];
246
+ readonly minted: readonly ["ts", "eventId"];
247
247
  };
248
248
  readonly memory_import_report: {
249
249
  readonly projector: "buildImportReportWire";
@@ -71,7 +71,7 @@ export const WIRE_PROJECTION_FACES = {
71
71
  return WIRE_PROJECTION_FACES.wiring_manifest_tenant.mintedConditional;
72
72
  },
73
73
  },
74
- engine_notice: { projector: "engineNoticeEventData", coreType: "EngineNotice", excluded: [], minted: ["ts"] },
74
+ engine_notice: { projector: "engineNoticeEventData", coreType: "EngineNotice", excluded: [], minted: ["ts", "eventId"] },
75
75
  memory_import_report: { projector: "buildImportReportWire", coreType: "MemoryImportReport", excluded: [], minted: [] },
76
76
  origin_clearance_row: {
77
77
  projector: "buildClearanceRowWire",
@@ -0,0 +1,8 @@
1
+ import { type CardVoidPort } from "./card-void.js";
2
+ /**
3
+ * 结果上若有验证器自己的停驻(带凭据)⇒ 作废它那张 pending 卡;否则零 I/O。**必须在出口封口之前调**(封口摘掉的正是这里要用的凭据)。
4
+ * 不抛:作废失败只让卡回到修前的形(由兜底收割),响亮留痕({@link VOID_FAILED});结算照常往下走。
5
+ * 卡已不 pending / 已不在 ⇒ 什么都不做(CAS 输给了收割,结局相同)。卡的会话与停驻报的验证器会话不一致 ⇒ 不动它(只作废**这一张**)。
6
+ */
7
+ export declare function voidVerifierPauseCard(result: unknown, cards: CardVoidPort | undefined): Promise<void>;
8
+ //# sourceMappingURL=verifier-pause-card.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { voidPendingCard } from "./card-void.js";
2
+ const VOID_FAILED = "server.verifier-pause.card-void-failed";
3
+ export async function voidVerifierPauseCard(result, cards) {
4
+ const pause = verifierPauseCardOf(result);
5
+ if (pause !== undefined)
6
+ await voidPendingCard(pause, cards, VOID_FAILED);
7
+ }
8
+ function verifierPauseCardOf(result) {
9
+ if (result === null || typeof result !== "object")
10
+ return undefined;
11
+ const pause = result.verification?.verifierPause;
12
+ if (pause === null || typeof pause !== "object")
13
+ return undefined;
14
+ const { checkpointToken, sessionId } = pause;
15
+ return typeof checkpointToken === "string" && checkpointToken !== "" && typeof sessionId === "string"
16
+ ? { token: checkpointToken, sessionId }
17
+ : undefined;
18
+ }
19
+ //# sourceMappingURL=verifier-pause-card.js.map
@@ -107,17 +107,15 @@ export declare const PLANE_REFUSAL_INVARIANT_OF: {
107
107
  readonly "config.gateway_fallback_without_primary": "model-route-endpoint";
108
108
  };
109
109
  /**
110
- * 契约包出码、执法者是本仓但今天**未执法**的两只组拒码:本地配置腿上「管模型面的目录会顶替已声明的 env 表、决定不是 `replaced`」那道闸,与「每个任务都要解的 summarize 落不到可服务条目」的不变量。
110
+ * 契约包出码、执法者是本仓但今天**未执法**的组拒码:本地配置腿上「管模型面的目录会顶替已声明的 env 表、决定不是 `replaced`」那道闸。
111
111
  *
112
- * 词义:settings-schema 发布说明里的「engine / 引擎一侧」指**本仓(worker)**,不是 `@sema-agent/core` —— 这两码要的全部输入(本地配置腿、env 表、模型面 stage 与组拒口)只在本仓,core 里没有读
113
- * `MODEL_ID` / `config.d` 的地方、也没有组拒码。(契约包自己有几处把同一个词写成 core 7.58.0,那是它的叫法错。)所以本仓 stage 现在没有对应的不变量、不铸这两个码,不是因为「归引擎」,而是**还没做**,两码各自候什么:
112
+ * 词义:settings-schema 发布说明里的「engine / 引擎一侧」指**本仓(worker)**,不是 `@sema-agent/core` —— 这个码要的全部输入(本地配置腿、env 表、模型面 stage 与组拒口)只在本仓,core 里没有读
113
+ * `MODEL_ID` / `config.d` 的地方、也没有组拒码。所以本仓 stage 现在没有对应的不变量、不铸这个码,不是因为「归引擎」,而是**还没做**:
114
114
  * · `CATALOG_REPLACES_ENV_MODELS_CODE`:执法是一整组跨仓件 —— 开机迁移 SS-M11(铸决定文档)· 本地腿每拍读决定(读数身份进候选的 etag)· 目录信任判官走根级文档 · 命令行 / 桌面 / 客户端核心三个写者先接契约包的计划助手;
115
115
  * 候设计票。在那之前,候选目录管着模型面而 env 表也声明了时,仍照旧由目录服务(与升级前逐位同)。
116
- * · `SUMMARIZE_MODEL_MISSING_CODE`:码的前提是「summarize 落不到可服务条目 ⇒ 采纳后每个任务都被拒」,而本仓所钉 core 7.59.0 起非严格座位(summarize 在内)点名目录里没有的词时读作未设、沿自己的回落链走
117
- * (summarize 的链是 → default,即回落缺省模型)并通告 `model.role_defaulted`;链上没有可解的模型才拒 —— 前提与所钉 core 相抵,候上游(settings-schema / core)重定义或退役这个码;在那之前 summarize 角色绑到不可用条目时仍是角色绑定那一行 warn(`ROLE_BINDING_UNAVAILABLE_HINT`),不是组拒。
118
- * 两码开始被铸之后,它们进 `/health.modelRefusals.plane` 的座位是**另案设计**(现在没有座:见 `model-plane-face.ts` 对「装配期被引擎整份拒收」的披露),不在这张表里偷铸一个不变量替它占位。
116
+ * 这个码开始被铸之后,它进 `/health.modelRefusals.plane` 的座位是**另案设计**(现在没有座:见 `model-plane-face.ts` 对「装配期被引擎整份拒收」的披露),不在这张表里偷铸一个不变量替它占位。
119
117
  */
120
- export declare const ENGINE_MINTED_PLANE_REFUSAL_CODES: readonly ["config.catalog_replaces_env_models", "config.summarize_model_missing"];
118
+ export declare const ENGINE_MINTED_PLANE_REFUSAL_CODES: readonly ["config.catalog_replaces_env_models"];
121
119
  /**
122
120
  * [ref] —— **「无中心配置」档的候选**:中心凭证换人时,server 把在用的中心配置降到这一档({@link applyEffective} 吃它,和吃任何候选走同一条 stage → swap → commit)。
123
121
  * 它的意思是「**撤回**中心配置」—— 中心下发的每个热面回 env 底:
@@ -1,5 +1,5 @@
1
1
  import { expandTiers, modelOriginOf, resolveTaskModel as coreResolveTaskModel } from "@sema-agent/core";
2
- import { CATALOG_REPLACES_ENV_MODELS_CODE, SUMMARIZE_MODEL_MISSING_CODE, WEB_ADMIN_ENV, narrowAtMention, resolveActiveTiers, resolveCatalogDefaultModel } from "@sema-agent/settings-schema";
2
+ import { CATALOG_REPLACES_ENV_MODELS_CODE, SandboxGitConfig, WEB_ADMIN_ENV, formatConfigPath, narrowAtMention, resolveActiveTiers, resolveCatalogDefaultModel, sanitizeZodError } from "@sema-agent/settings-schema";
3
3
  import { modelKeyPoison } from "../key-resolver.js";
4
4
  import { buildEnvModelIdNotServedNotice, mintCapabilityKeys, readAtMention, servedModelTableLeg } from "../model-select.js";
5
5
  import { applyAutoCompactWindow, buildModelCostKey, ownCredentialHitsInForce, parseAutonomy, unmatchableToolNamesRefusal } from "../config.js";
@@ -135,6 +135,7 @@ export function applyEffective(config, eff, logger, opts) {
135
135
  }
136
136
  }
137
137
  const servedBefore = servedModelTableLeg(config);
138
+ const sandboxGitBefore = config.sandboxGit;
138
139
  commitStaged(config, staged);
139
140
  if (ordered)
140
141
  appliedGeneration.set(config, gen);
@@ -169,6 +170,8 @@ export function applyEffective(config, eff, logger, opts) {
169
170
  logger?.info("web_admin_runtime_hot", staged.hot.infoLine);
170
171
  if (Object.keys(staged.projects).length > 0)
171
172
  logger?.info("web_admin_projects", { projects: Object.keys(staged.projects) });
173
+ if (JSON.stringify(sandboxGitBefore) !== JSON.stringify(staged.sandboxGit))
174
+ logger?.info("web_admin_sandbox_git", { version: staged.version, origins: staged.sandboxGit?.origins.map((e) => e.origin) ?? null });
172
175
  return true;
173
176
  }
174
177
  function declareCandidateWithheldEnv(seats, modelApiKeyEnv, version) {
@@ -216,6 +219,10 @@ function commitStaged(config, staged) {
216
219
  if (staged.hot.setCommandPolicy)
217
220
  config.commandPolicy = staged.hot.commandPolicyNext;
218
221
  mutateInPlace(config.projects, staged.projects);
222
+ if (staged.sandboxGit !== undefined)
223
+ config.sandboxGit = staged.sandboxGit;
224
+ else
225
+ delete config.sandboxGit;
219
226
  }
220
227
  export const MODEL_PLANE_DOMAINS = ["models"];
221
228
  const MODEL_PLANE_SURFACES = {
@@ -248,7 +255,7 @@ export const PLANE_REFUSAL_INVARIANT_OF = {
248
255
  "config.model_route_endpoint_missing": "model-route-endpoint",
249
256
  "config.gateway_fallback_without_primary": "model-route-endpoint",
250
257
  };
251
- export const ENGINE_MINTED_PLANE_REFUSAL_CODES = [CATALOG_REPLACES_ENV_MODELS_CODE, SUMMARIZE_MODEL_MISSING_CODE];
258
+ export const ENGINE_MINTED_PLANE_REFUSAL_CODES = [CATALOG_REPLACES_ENV_MODELS_CODE];
252
259
  function modelPlaneGroupReport(group) {
253
260
  return {
254
261
  applied: MODEL_PLANE_DOMAINS.flatMap((d) => (group.stages[d] !== undefined ? MODEL_PLANE_SURFACES[d] : [])),
@@ -472,6 +479,7 @@ function stageEffective(config, eff, logger, opts) {
472
479
  ...(Array.isArray(r.defaultScopes) ? { defaultScopes: r.defaultScopes.filter((x) => typeof x === "string") } : {}),
473
480
  };
474
481
  }
482
+ const sandboxGit = stageSandboxGit(eff, logger);
475
483
  return {
476
484
  version: typeof eff.version === "number" && Number.isFinite(eff.version) ? eff.version : 0,
477
485
  modelPlaneGroup,
@@ -479,8 +487,20 @@ function stageEffective(config, eff, logger, opts) {
479
487
  limits,
480
488
  hot,
481
489
  projects,
490
+ sandboxGit,
482
491
  };
483
492
  }
493
+ const SANDBOX_GIT_REFUSED_EFFECT = "the block is read as routing no git origins (the sandbox git plane reads no_origins; no new sandbox pod carries the credential broker) — the rest of this candidate applies; fix the block at the console (it is judged by the contract's SandboxGitConfig)";
494
+ function stageSandboxGit(eff, logger) {
495
+ if (eff.sandboxGit === undefined)
496
+ return undefined;
497
+ const judged = SandboxGitConfig.safeParse(eff.sandboxGit);
498
+ if (judged.success)
499
+ return judged.data;
500
+ const issues = sanitizeZodError(judged.error).issues.map((i) => `${i.path.length === 0 ? "sandboxGit" : `sandboxGit.${formatConfigPath(i.path.map((seg) => (typeof seg === "number" ? seg : String(seg))))}`}: ${i.message}`);
501
+ logger?.warn("web_admin_sandbox_git_refused", { version: typeof eff.version === "number" ? eff.version : 0, issues, effect: SANDBOX_GIT_REFUSED_EFFECT });
502
+ return undefined;
503
+ }
484
504
  export function centerManagedConfigKeys(eff) {
485
505
  const out = new Set();
486
506
  if (!eff)
@@ -37,7 +37,7 @@ export interface CandidateDomainError {
37
37
  readonly error: string;
38
38
  }
39
39
  /** 判官拒一份候选的成因(闭集):某个域判形失败(含 prompts 面)`domain_invalid` ∪ 被拒文档自带的词(契约闭集 `CONFIG_DOCUMENT_REFUSAL_REASONS`:
40
- * `empty` / `invalid_json` / `not_object` / `io` 文件层,`retired_domain` 墓碑)—— 被拒文档的词表只在契约一处定义,这里派生(契约加词 ⇒ 按词穷举的读者编译红)。 */
40
+ * `empty` / `invalid_json` / `not_object` / `io` / `too_deep` 文件层,`retired_domain` 墓碑)—— 被拒文档的词表只在契约一处定义,这里派生(契约加词 ⇒ 按词穷举的读者编译红)。 */
41
41
  export type CandidateRejectReason = "domain_invalid" | ConfigDocumentRefusalReason;
42
42
  /** 拒判里的一条:哪一域、为什么(读腿 / 契约包的原句)、成因词。`config_candidate_rejected` 行的 `errors` 就是这一列。 */
43
43
  export interface CandidateDomainRejection extends CandidateDomainError {
@@ -13,6 +13,7 @@ const EFFECTIVE_CONFIG_KEY_TABLE = {
13
13
  plugins: true,
14
14
  readFace: true,
15
15
  prompts: true,
16
+ sandboxGit: true,
16
17
  };
17
18
  export const EFFECTIVE_CONFIG_KEYS = Object.keys(EFFECTIVE_CONFIG_KEY_TABLE);
18
19
  export const EFFECTIVE_ENVELOPE_KEYS = ["version", "updatedAt"];
@@ -25,6 +26,7 @@ export const GOVERNANCE_DOMAIN_KEYS = Object.keys(GOVERNANCE_DOMAIN_KEY_TABLE);
25
26
  export const NON_DOMAIN_EFFECTIVE_KEYS = {
26
27
  a2a: "R-15 裁开域([4384]),但 settings-schema 至 1.3.0 未开(DOMAINS 无 a2a)——S-31 件2 BLOCKED on schema:远端腿靠 readEffectiveWire 的 open-world verbatim 透传(DESIGN-269),本地腿不可达(FileConfigStore 只读 PORTABLE_DOMAINS)。schema 开域之日按墓碑流程收线。",
27
28
  readFace: "R-15 裁**暂不开域**([4384]:env 逐键恒赢语义下收益薄,⚪ 呈现制过渡)——#A4 的远端腿同靠 open-world 透传;本地腿四键由 env / 引擎默认独占。若来日改裁开域,同上墓碑机制。",
29
+ sandboxGit: "契约的 wire-only 键(settings-schema 14.7.0 `EffectiveWire.sandboxGit`):web-admin 按部署登记册投影,不是存储域 —— `buildEffective` 从不产它、`readEffectiveWire` 逐字承运;判它的唯一座位 `SandboxGitConfig` 在 stageEffective 调一次。本地腿不可达(`config.d` 只读便携域)⇒ 本地配置源恒缺席(沙箱 git 平面读 `no_origins`)。",
28
30
  };
29
31
  export const DOMAINS_NOT_CONSUMED_BY_SERVER = {
30
32
  rosters: "center 写面域:center 端 resolveEffectiveForWorker 把 roster 解析进 per-worker /effective 的 models 视图——server 消费的是解析产物,不读原始域。",
@@ -31,8 +31,8 @@ import { type ConfigDocumentRefusal, type DroppedEntryIdentity, type DroppedEntr
31
31
  * 带事实 ⇒ 一份被拒文档(契约的类型 `ConfigDocumentRefusal` 的墓碑臂:`document` = 退役域名,`reason: "retired_domain"`,`error` / `migration` 取
32
32
  * `RetiredDomainError` 的同名字段)、这一键从体上拿掉(其余域照读、版本照读,判官整拒这份候选);缺席 / `{}` ⇒ 不理会(契约读腿自己丢 `{}`)。
33
33
  * 体不是对象 ⇒ 原样交回、不判(载荷形错,契约读腿抛)。墓碑判据只在契约包,这里只分键。
34
- * 被拒文档是两条读腿同形的发现(判决只在候选判官 `candidate-gate.ts` 的 `judgeConfigCandidate`,成因词 = 发现自带的 `reason`):本地腿的被拒文档是契约整目录拒单
35
- * `inspectBundle` 的原样(`config-provider.ts`),wire 上没有文件层,只有这一种墓碑。`error` 本模块不脱敏(与折叠产物同律):各腿在自己的产出边界上过
34
+ * 被拒文档是两条读腿同形的发现(判决只在候选判官 `candidate-gate.ts` 的 `judgeConfigCandidate`,成因词 = 发现自带的 `reason`):本地腿的被拒文档是契约单读口
35
+ * `FileConfigStore.read()` 那一读的拒单原样(`config-provider.ts`),wire 上没有文件层,只有这一种墓碑。`error` 本模块不脱敏(与折叠产物同律):各腿在自己的产出边界上过
36
36
  * `redactSecrets` 兜底、不过 `redactConfigError`(句子不含配置值;引号段读法会把句中点名的域名换成指纹)。
37
37
  */
38
38
  export declare function separateRetiredDomains(body: unknown): {
@@ -392,6 +392,10 @@ export interface EffectiveConfig {
392
392
  /** prompts 域(中心层;wire 形只有一种 = 契约包 `EffectivePromptsWire` `{ schemaVersion: 2, artifact }`)—— 判法只在候选判官一处
393
393
  * (`prompts-domain-validate.ts` 的 `judgePromptsWire`,经 `judgeConfigCandidate`),本 interface 只声明键位存在(unknown:判官是唯一解释者,这里不复刻形)。 */
394
394
  prompts?: unknown;
395
+ /** 沙箱 git 平面的有效配置块(契约 `EffectiveWire.sandboxGit`:wire-only 的非域顶层键,web-admin 按部署登记册投影,读腿逐字承运、不判)——
396
+ * 可选、无默认:缺席 = 这个部署没有投影这一块。本 interface 只声明键位(unknown:与 `prompts` 同形);判它的唯一座位是契约 `SandboxGitConfig`,
397
+ * 在 `stageEffective` 里调一次(判过 ⇒ `config.sandboxGit`;判不过 ⇒ 当作没有任何 origin + 一行 `web_admin_sandbox_git_refused`,契约 §12.8)。 */
398
+ sandboxGit?: unknown;
395
399
  }
396
400
  /** (stage7 P5,registry-core 0.8 `execution` 域): the center-resolved per-principal execution
397
401
  * ruling riding the caps view. `required=false` / ruling absent = no enforcement (legacy). `allowedLanes` is
@@ -20,9 +20,10 @@ dials the device, so the device needs no inbound port, no public address and no
20
20
  (this deployment has no device lane) or an object `{ enabled: true, protocolVersion, maxInflightPerDevice,
21
21
  wsPath, management, relayUrl? }`. Read `wsPath` from there rather than hardcoding it: the path is part of the wire
22
22
  contract and reading it means a future path change is not a cross-repo break. `relayUrl` (server 7.137.0+) is present
23
- only when the operator declared one (`DEVICE_RELAY_URL`): the engine sits behind a relay or gateway and the device
23
+ only when the operator declared a relay URL (`DEVICE_RELAY_URL`): the engine sits behind a relay or gateway and the device
24
24
  must dial that absolute `ws://` / `wss://` URL verbatim instead of the engine's own address — do not rebuild it from
25
- the engine address and `wsPath`. Absent ⇒ dial the engine's own address at `wsPath`, as before. `protocolVersion` tells you
25
+ the engine address and `wsPath`. Absent ⇒ dial the engine's own address at `wsPath`, as before (the operator declared
26
+ `DEVICE_RELAY_URL=none`; a device-lane server does not start without one of the two declarations). `protocolVersion` tells you
26
27
  which protocol **revision** the server speaks before you spend a handshake finding out (§2.1: the revision decides
27
28
  which `errorCode` words the server accepts from you).
28
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/server",
3
- "version": "7.140.0",
3
+ "version": "7.142.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",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@sema-agent/core": "7.60.0",
73
- "@sema-agent/settings-schema": "15.2.0",
73
+ "@sema-agent/settings-schema": "16.0.0",
74
74
  "e2b": "^2.28.0",
75
75
  "libsodium-wrappers": "^0.8.4",
76
76
  "mysql2": "^3.22.4",