@sema-agent/server 7.145.0 → 7.147.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 (526) hide show
  1. package/MIGRATION.md +876 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/USAGE.md +374 -99
  5. package/deploy/facts/CHANGES.json +25 -0
  6. package/deploy/facts/README.md +57 -0
  7. package/deploy/facts/lanes.json +61 -0
  8. package/deploy/facts/lanes.schema.json +57 -0
  9. package/deploy/facts/sandbox-rbac.json +113 -0
  10. package/deploy/facts/sandbox-rbac.schema.json +74 -0
  11. package/deploy/facts/sealed-key.json +9 -0
  12. package/deploy/facts/sealed-key.schema.json +52 -0
  13. package/deploy/sema-up/README.md +2 -2
  14. package/deploy/sema-up/chart/templates/_helpers.tpl +41 -0
  15. package/deploy/sema-up/chart/templates/sandbox-rbac.yaml +47 -7
  16. package/deploy/sema-up/chart/templates/server-v4pro.yaml +9 -4
  17. package/deploy/sema-up/chart/templates/server.yaml +9 -4
  18. package/deploy/sema-up/chart/values.yaml +8 -1
  19. package/deploy/sema-up/cluster-up.sh +2 -1
  20. package/deploy/sema-up/lib/flagshape.sh +4 -0
  21. package/deploy/sema-up/lib/lanes.json +2 -5
  22. package/deploy/sema-up/sema-up.sh +12 -9
  23. package/deploy/sema-up/stack/compose.yaml +5 -4
  24. package/deploy/sema-up/stack/sema-stack-cluster.yaml +34 -17
  25. package/dist/adoption/import-limits.d.ts +6 -0
  26. package/dist/adoption/import-limits.js +7 -0
  27. package/dist/adoption/import.d.ts +62 -0
  28. package/dist/adoption/import.js +107 -0
  29. package/dist/adoption/wire.d.ts +52 -0
  30. package/dist/adoption/wire.js +9 -0
  31. package/dist/approval-ask-machine.d.ts +2 -2
  32. package/dist/approval-card.d.ts +7 -16
  33. package/dist/approval-card.js +0 -4
  34. package/dist/approval-gate-currency.d.ts +1 -1
  35. package/dist/approval-gate-currency.js +1 -1
  36. package/dist/approval-reconciler.d.ts +1 -1
  37. package/dist/approval.d.ts +3 -3
  38. package/dist/audit.js +2 -2
  39. package/dist/bench/s1/live-deps.js +3 -1
  40. package/dist/boot/crash-last.js +2 -1
  41. package/dist/boot/deployment-mods.d.ts +11 -1
  42. package/dist/boot/deployment-mods.js +15 -2
  43. package/dist/boot/device-lane.js +7 -5
  44. package/dist/boot/engine-lease.d.ts +195 -22
  45. package/dist/boot/engine-lease.js +146 -20
  46. package/dist/boot/execution-env.d.ts +5 -0
  47. package/dist/boot/execution-env.js +57 -33
  48. package/dist/boot/execution-lane.d.ts +37 -9
  49. package/dist/boot/execution-lane.js +74 -20
  50. package/dist/boot/exit-boundary.d.ts +50 -0
  51. package/dist/boot/exit-boundary.js +32 -0
  52. package/dist/boot/exit-last.d.ts +20 -4
  53. package/dist/boot/exit-last.js +23 -5
  54. package/dist/boot/governance-seams.d.ts +2 -2
  55. package/dist/boot/governance-seams.js +1 -0
  56. package/dist/boot/leader.js +1 -1
  57. package/dist/boot/memory-boundary.d.ts +11 -11
  58. package/dist/boot/memory-boundary.js +3 -3
  59. package/dist/boot/memory-consolidation.d.ts +42 -41
  60. package/dist/boot/memory-consolidation.js +26 -28
  61. package/dist/boot/org-memory.js +3 -2
  62. package/dist/boot/parked-revive-gate.d.ts +1 -1
  63. package/dist/boot/parked-revive-gate.js +1 -1
  64. package/dist/boot/reapers.d.ts +12 -4
  65. package/dist/boot/reapers.js +40 -16
  66. package/dist/boot/resolve-spec.d.ts +2 -0
  67. package/dist/boot/resolve-spec.js +126 -123
  68. package/dist/boot/retention-lane.d.ts +4 -42
  69. package/dist/boot/runner-deps.js +1 -1
  70. package/dist/boot/session-faces.d.ts +1 -0
  71. package/dist/boot/session-faces.js +11 -3
  72. package/dist/boot/shutdown.js +27 -9
  73. package/dist/boot/stage-01-config.d.ts +1 -1
  74. package/dist/boot/stage-01-config.js +7 -3
  75. package/dist/boot/stage-02-web-admin-pull.d.ts +1 -1
  76. package/dist/boot/stage-02-web-admin-pull.js +10 -8
  77. package/dist/boot/stage-03-store-backend.d.ts +2 -1
  78. package/dist/boot/stage-03-store-backend.js +2 -2
  79. package/dist/boot/stage-04-stores.d.ts +2 -1
  80. package/dist/boot/stage-05-execution-env.d.ts +4 -1
  81. package/dist/boot/stage-05-execution-env.js +6 -6
  82. package/dist/boot/stage-06-runners.d.ts +5 -2
  83. package/dist/boot/stage-06-runners.js +12 -13
  84. package/dist/boot/stage-07-capability-layer.d.ts +5 -2
  85. package/dist/boot/stage-07-capability-layer.js +7 -7
  86. package/dist/boot/stage-08-reapers.d.ts +5 -2
  87. package/dist/boot/stage-08-reapers.js +3 -3
  88. package/dist/boot/stage-09-leader.d.ts +6 -2
  89. package/dist/boot/stage-10-http-server.d.ts +6 -2
  90. package/dist/boot/stage-10-http-server.js +5 -3
  91. package/dist/boot/stores.d.ts +10 -0
  92. package/dist/boot/stores.js +53 -26
  93. package/dist/boot/web-admin.js +3 -3
  94. package/dist/boot/workflow-orchestration.d.ts +1 -1
  95. package/dist/boot/workflow-orchestration.js +2 -1
  96. package/dist/capabilities/center-plugins.d.ts +2 -0
  97. package/dist/capabilities/center-plugins.js +6 -2
  98. package/dist/capabilities/composite-members.d.ts +4 -1
  99. package/dist/capabilities/composite-members.js +4 -1
  100. package/dist/capabilities/execution-lane.d.ts +7 -7
  101. package/dist/capabilities/execution-lane.js +2 -2
  102. package/dist/capabilities/hands-lane.d.ts +1 -1
  103. package/dist/capabilities/scenarios.d.ts +34 -20
  104. package/dist/capabilities/scenarios.js +13 -9
  105. package/dist/capabilities/settings-contract.d.ts +29 -0
  106. package/dist/capabilities/settings-contract.js +14 -0
  107. package/dist/capabilities/skills.d.ts +5 -5
  108. package/dist/capability-facts.d.ts +56 -1
  109. package/dist/capability-facts.js +59 -8
  110. package/dist/center-credential-renewer.js +3 -2
  111. package/dist/checkpoint-ctx-seal-m28.d.ts +1 -1
  112. package/dist/config-catalog.js +19 -9
  113. package/dist/config-invariants.d.ts +18 -3
  114. package/dist/config-invariants.js +36 -19
  115. package/dist/config-lkg.d.ts +1 -1
  116. package/dist/config-lkg.js +5 -6
  117. package/dist/config-provider.d.ts +2 -2
  118. package/dist/config-provider.js +2 -0
  119. package/dist/config-types.d.ts +228 -185
  120. package/dist/config.d.ts +74 -6
  121. package/dist/config.js +146 -64
  122. package/dist/degenerate-instrument.js +1 -1
  123. package/dist/deleted-session-ids.d.ts +19 -0
  124. package/dist/deleted-session-ids.js +26 -0
  125. package/dist/deploy-facts.d.ts +155 -0
  126. package/dist/deploy-facts.js +95 -0
  127. package/dist/deployment-shape.d.ts +21 -12
  128. package/dist/deployment-shape.js +24 -6
  129. package/dist/device-ws-hub.d.ts +48 -3
  130. package/dist/device-ws-hub.js +48 -2
  131. package/dist/env-facts.d.ts +7 -5
  132. package/dist/env-facts.js +10 -6
  133. package/dist/error-code-family.d.ts +35 -0
  134. package/dist/error-code-family.js +26 -0
  135. package/dist/execution-config-root.d.ts +5 -5
  136. package/dist/execution-config-root.js +5 -5
  137. package/dist/execution-env-purpose.d.ts +14 -0
  138. package/dist/execution-env-purpose.js +29 -0
  139. package/dist/execution-lane-caps.d.ts +49 -86
  140. package/dist/execution-lane-caps.js +52 -62
  141. package/dist/execution-placement.d.ts +18 -2
  142. package/dist/execution-placement.js +19 -0
  143. package/dist/file-history-disclosure.d.ts +2 -2
  144. package/dist/fleet/drain-entry.d.ts +46 -3
  145. package/dist/fleet/drain-entry.js +6 -0
  146. package/dist/fleet/fleet-bus.d.ts +2 -1
  147. package/dist/fleet/serving-lease.js +3 -4
  148. package/dist/history-anchor.d.ts +22 -0
  149. package/dist/history-anchor.js +14 -0
  150. package/dist/hooks/branch-transcript.d.ts +1 -1
  151. package/dist/hooks/branch-transcript.js +1 -0
  152. package/dist/hooks/classic-stations.d.ts +25 -8
  153. package/dist/hooks/classic-stations.js +29 -3
  154. package/dist/hooks/command-spawn.d.ts +1 -4
  155. package/dist/hooks/command-spawn.js +0 -11
  156. package/dist/hooks/hook-runner.d.ts +85 -24
  157. package/dist/hooks/hook-runner.js +326 -109
  158. package/dist/hooks/hook-source.d.ts +14 -2
  159. package/dist/hooks/hook-source.js +8 -0
  160. package/dist/http/active-run-conflict.d.ts +1 -1
  161. package/dist/http/active-run-conflict.js +1 -1
  162. package/dist/http/admission.js +11 -1
  163. package/dist/http/approval-sweeps.d.ts +2 -5
  164. package/dist/http/approval-sweeps.js +3 -2
  165. package/dist/http/checkpoint-ctx.d.ts +76 -71
  166. package/dist/http/checkpoint-ctx.js +40 -40
  167. package/dist/http/claim-latency.d.ts +10 -0
  168. package/dist/http/claim-latency.js +12 -0
  169. package/dist/http/dispatch.js +19 -3
  170. package/dist/http/durable-run-leg.d.ts +5 -0
  171. package/dist/http/durable-run-leg.js +3 -1
  172. package/dist/http/execution-context.d.ts +7 -1
  173. package/dist/http/execution-context.js +13 -0
  174. package/dist/http/health-self-report.d.ts +6 -2
  175. package/dist/http/health-self-report.js +3 -2
  176. package/dist/http/memory-compliance-failure-reply.d.ts +2 -2
  177. package/dist/http/memory-compliance-failure-reply.js +5 -15
  178. package/dist/http/memory-control-plane-corrupt-reply.d.ts +25 -0
  179. package/dist/http/memory-control-plane-corrupt-reply.js +19 -0
  180. package/dist/http/memory-store-refusal-reply.d.ts +3 -3
  181. package/dist/http/memory-store-refusal-reply.js +3 -0
  182. package/dist/http/owner-access.d.ts +11 -0
  183. package/dist/http/owner-access.js +7 -4
  184. package/dist/http/principal-gate.d.ts +28 -16
  185. package/dist/http/principal-gate.js +10 -19
  186. package/dist/http/request-guards.d.ts +2 -2
  187. package/dist/http/request-guards.js +5 -5
  188. package/dist/http/resume-legs.d.ts +29 -10
  189. package/dist/http/resume-legs.js +94 -56
  190. package/dist/http/rewind-files-reply.d.ts +34 -0
  191. package/dist/http/rewind-files-reply.js +36 -0
  192. package/dist/http/route-ctx.d.ts +43 -26
  193. package/dist/http/route-table.js +4 -0
  194. package/dist/http/routes/adoption.d.ts +11 -0
  195. package/dist/http/routes/adoption.js +80 -6
  196. package/dist/http/routes/agents-roster.js +1 -0
  197. package/dist/http/routes/approvals-assistant.js +7 -26
  198. package/dist/http/routes/background.js +1 -0
  199. package/dist/http/routes/capabilities.js +12 -3
  200. package/dist/http/routes/devices.js +1 -1
  201. package/dist/http/routes/diagnostics.d.ts +9 -14
  202. package/dist/http/routes/diagnostics.js +10 -20
  203. package/dist/http/routes/engine.d.ts +31 -0
  204. package/dist/http/routes/engine.js +81 -0
  205. package/dist/http/routes/memory-bundle.js +3 -0
  206. package/dist/http/routes/memory-consolidation.js +3 -5
  207. package/dist/http/routes/memory-origin.d.ts +2 -2
  208. package/dist/http/routes/memory-origin.js +2 -4
  209. package/dist/http/routes/memory-policy.js +5 -1
  210. package/dist/http/routes/notify-wake.js +2 -1
  211. package/dist/http/routes/observability.js +3 -6
  212. package/dist/http/routes/projects.d.ts +70 -0
  213. package/dist/http/routes/projects.js +86 -0
  214. package/dist/http/routes/rules.js +30 -2
  215. package/dist/http/routes/runs.js +15 -11
  216. package/dist/http/routes/session-sync.js +39 -35
  217. package/dist/http/routes/sessions-list.d.ts +1 -1
  218. package/dist/http/routes/sessions.d.ts +7 -1
  219. package/dist/http/routes/sessions.js +108 -2
  220. package/dist/http/routes/tasks.js +32 -8
  221. package/dist/http/routes/trace-usage.js +1 -1
  222. package/dist/http/run-concurrency-cap.d.ts +86 -0
  223. package/dist/http/run-concurrency-cap.js +54 -0
  224. package/dist/http/server.d.ts +31 -14
  225. package/dist/http/server.js +29 -3
  226. package/dist/http/stored-body-replay.d.ts +12 -7
  227. package/dist/http/stored-body-replay.js +28 -5
  228. package/dist/http/wire-types.d.ts +27 -13
  229. package/dist/index.d.ts +2 -2
  230. package/dist/index.js +1 -1
  231. package/dist/instruction-source-notice.d.ts +1 -1
  232. package/dist/json-body-limit.d.ts +8 -0
  233. package/dist/json-body-limit.js +2 -0
  234. package/dist/leader/diffout.d.ts +1 -1
  235. package/dist/local-data-root.d.ts +2 -2
  236. package/dist/memory-embedder-reembed.d.ts +38 -0
  237. package/dist/memory-embedder-reembed.js +20 -0
  238. package/dist/memory-incident-sink.d.ts +0 -28
  239. package/dist/memory-incident-sink.js +5 -0
  240. package/dist/memory-operator-faces.d.ts +9 -4
  241. package/dist/memory-scope-stores.d.ts +9 -7
  242. package/dist/memory-scope-stores.js +3 -14
  243. package/dist/memory-scope.d.ts +38 -2
  244. package/dist/memory-scope.js +33 -2
  245. package/dist/memory-store-refusal.d.ts +17 -4
  246. package/dist/memory-store-refusal.js +1 -1
  247. package/dist/memory-sync-client.d.ts +2 -0
  248. package/dist/memory-sync-client.js +13 -11
  249. package/dist/memory-sync.js +1 -1
  250. package/dist/model-compat.d.ts +35 -21
  251. package/dist/model-compat.js +49 -21
  252. package/dist/model-entry-refusal.d.ts +11 -1
  253. package/dist/model-entry-refusal.js +7 -0
  254. package/dist/namespaced-rule-name.d.ts +18 -1
  255. package/dist/namespaced-rule-name.js +12 -0
  256. package/dist/net-address.d.ts +53 -0
  257. package/dist/net-address.js +111 -0
  258. package/dist/observability/fail-open.d.ts +29 -17
  259. package/dist/observability/fail-open.js +29 -17
  260. package/dist/observability/metrics.d.ts +2 -0
  261. package/dist/observability/metrics.js +2 -0
  262. package/dist/observability/secret-env-scrub.d.ts +30 -4
  263. package/dist/observability/secret-env-scrub.js +15 -3
  264. package/dist/orchestration/workflow-agent-session-index.d.ts +7 -12
  265. package/dist/orchestration/workflow-agent-session-index.js +1 -6
  266. package/dist/orchestration/workflow-completion-inbox.d.ts +26 -6
  267. package/dist/orchestration/workflow-completion-inbox.js +63 -45
  268. package/dist/orchestration/workflow-notify-journal.js +2 -3
  269. package/dist/org-delivery-gate.js +1 -1
  270. package/dist/org-memory-admission.d.ts +5 -2
  271. package/dist/org-memory-admission.js +25 -10
  272. package/dist/parked-decide.d.ts +33 -26
  273. package/dist/parked-decide.js +36 -44
  274. package/dist/peer-directory.d.ts +6 -12
  275. package/dist/peer-directory.js +5 -1
  276. package/dist/plugins/approval-ask-store-file.d.ts +10 -2
  277. package/dist/plugins/approval-ask-store-file.js +37 -4
  278. package/dist/plugins/approval-ask-store-memory.d.ts +5 -3
  279. package/dist/plugins/approval-ask-store-memory.js +11 -2
  280. package/dist/plugins/approval-ask-store-sql.d.ts +3 -0
  281. package/dist/plugins/approval-ask-store-sql.js +3 -1
  282. package/dist/plugins/blob-backend.d.ts +38 -195
  283. package/dist/plugins/blob-backend.js +33 -229
  284. package/dist/plugins/caching-session-store.d.ts +12 -5
  285. package/dist/plugins/caching-session-store.js +3 -0
  286. package/dist/plugins/checkpoint-index-columns.d.ts +1 -1
  287. package/dist/plugins/checkpoint-index-columns.js +3 -2
  288. package/dist/plugins/checkpoint-store-face.d.ts +426 -0
  289. package/dist/plugins/checkpoint-store-face.js +152 -0
  290. package/dist/plugins/device-store-sql.d.ts +2 -2
  291. package/dist/plugins/device-store-sql.js +5 -10
  292. package/dist/plugins/execution-lane-rename-m40.d.ts +20 -0
  293. package/dist/plugins/execution-lane-rename-m40.js +10 -0
  294. package/dist/plugins/execution-placement-sql.d.ts +63 -88
  295. package/dist/plugins/execution-placement-sql.js +94 -54
  296. package/dist/plugins/file-run-store.d.ts +26 -18
  297. package/dist/plugins/file-run-store.js +64 -75
  298. package/dist/plugins/fork-routing-session-store.d.ts +6 -2
  299. package/dist/plugins/fork-routing-session-store.js +2 -2
  300. package/dist/plugins/imported-layer-root-retirement.d.ts +22 -11
  301. package/dist/plugins/imported-layer-root-retirement.js +4 -8
  302. package/dist/plugins/inbox-payload-column.d.ts +14 -0
  303. package/dist/plugins/inbox-payload-column.js +13 -0
  304. package/dist/plugins/local-checkpoint-store.d.ts +7 -2
  305. package/dist/plugins/local-checkpoint-store.js +13 -8
  306. package/dist/plugins/local-data-dir-modes-m39.d.ts +48 -0
  307. package/dist/plugins/local-data-dir-modes-m39.js +182 -0
  308. package/dist/plugins/local-engine-high-water.d.ts +11 -0
  309. package/dist/plugins/local-engine-high-water.js +59 -0
  310. package/dist/plugins/local-session-store.d.ts +119 -30
  311. package/dist/plugins/local-session-store.js +156 -53
  312. package/dist/plugins/local-task-attachment-store.d.ts +2 -0
  313. package/dist/plugins/local-task-attachment-store.js +10 -11
  314. package/dist/plugins/memory-embedder-fingerprint.d.ts +33 -10
  315. package/dist/plugins/memory-embedder-fingerprint.js +52 -12
  316. package/dist/plugins/memory-embedder.d.ts +1 -1
  317. package/dist/plugins/memory-embedder.js +2 -2
  318. package/dist/plugins/memory-engine-pg.d.ts +30 -6
  319. package/dist/plugins/memory-engine-pg.js +96 -214
  320. package/dist/plugins/memory-engine-sql-apply.d.ts +130 -0
  321. package/dist/plugins/memory-engine-sql-apply.js +358 -0
  322. package/dist/plugins/memory-engine-tidb.d.ts +38 -9
  323. package/dist/plugins/memory-engine-tidb.js +99 -230
  324. package/dist/plugins/memory-key-guards.d.ts +1 -1
  325. package/dist/plugins/memory-origin-law.d.ts +3 -3
  326. package/dist/plugins/one-time-migrations.d.ts +169 -83
  327. package/dist/plugins/one-time-migrations.js +295 -235
  328. package/dist/plugins/owner-only-file-mode.d.ts +29 -0
  329. package/dist/plugins/owner-only-file-mode.js +141 -0
  330. package/dist/plugins/permission-rule-store-file.d.ts +17 -3
  331. package/dist/plugins/permission-rule-store-file.js +20 -1
  332. package/dist/plugins/pg-pool.d.ts +2 -1
  333. package/dist/plugins/pg-pool.js +12 -5
  334. package/dist/plugins/release-version.d.ts +20 -0
  335. package/dist/plugins/release-version.js +28 -0
  336. package/dist/plugins/remote-env-adb.d.ts +20 -4
  337. package/dist/plugins/remote-env-adb.js +39 -11
  338. package/dist/plugins/remote-env-e2b.d.ts +12 -3
  339. package/dist/plugins/remote-env-e2b.js +6 -4
  340. package/dist/plugins/remote-env-host.d.ts +9 -1
  341. package/dist/plugins/remote-env-host.js +6 -5
  342. package/dist/plugins/remote-env-k8s.d.ts +5 -2
  343. package/dist/plugins/remote-env-k8s.js +15 -4
  344. package/dist/plugins/remote-env-local-docker.d.ts +4 -1
  345. package/dist/plugins/remote-env-local-docker.js +3 -3
  346. package/dist/plugins/remote-env-ssh.d.ts +8 -2
  347. package/dist/plugins/remote-env-ssh.js +26 -24
  348. package/dist/plugins/remote-shell.d.ts +59 -30
  349. package/dist/plugins/remote-shell.js +175 -62
  350. package/dist/plugins/retention-declaration.d.ts +37 -0
  351. package/dist/plugins/retention-declaration.js +9 -0
  352. package/dist/plugins/retention-deployment.d.ts +126 -0
  353. package/dist/plugins/retention-deployment.js +88 -0
  354. package/dist/plugins/retention-lane-store-sql.d.ts +74 -4
  355. package/dist/plugins/retention-lane-store-sql.js +103 -1
  356. package/dist/plugins/retention-sql.d.ts +29 -0
  357. package/dist/plugins/retention-sql.js +8 -0
  358. package/dist/plugins/run-store-sql.js +2 -2
  359. package/dist/plugins/schema-consistency.d.ts +0 -6
  360. package/dist/plugins/schema-consistency.js +1 -2
  361. package/dist/plugins/schema-ensure-legs.d.ts +1 -1
  362. package/dist/plugins/schema-ensure-legs.js +13 -3
  363. package/dist/plugins/session-ext-table.d.ts +74 -0
  364. package/dist/plugins/session-ext-table.js +121 -0
  365. package/dist/plugins/session-fork.d.ts +31 -9
  366. package/dist/plugins/session-fork.js +3 -2
  367. package/dist/plugins/session-placement.d.ts +4 -2
  368. package/dist/plugins/session-row-sql.d.ts +8 -7
  369. package/dist/plugins/session-row-sql.js +15 -7
  370. package/dist/plugins/session-store-sql.d.ts +131 -0
  371. package/dist/plugins/session-store-sql.js +298 -0
  372. package/dist/plugins/session-workspace-cell.d.ts +2 -2
  373. package/dist/plugins/session-workspace-cell.js +2 -2
  374. package/dist/plugins/shared-memory-store-sql.d.ts +10 -0
  375. package/dist/plugins/shared-memory-store-sql.js +13 -13
  376. package/dist/plugins/snapshot-bucket-presence.js +1 -1
  377. package/dist/plugins/sql-driver.d.ts +23 -7
  378. package/dist/plugins/sql-driver.js +41 -8
  379. package/dist/plugins/sql-errors.d.ts +5 -2
  380. package/dist/plugins/sql-errors.js +4 -0
  381. package/dist/plugins/sql-json-column.d.ts +5 -1
  382. package/dist/plugins/store-backend.d.ts +46 -16
  383. package/dist/plugins/store-backend.js +192 -69
  384. package/dist/plugins/store-contracts.d.ts +10 -13
  385. package/dist/plugins/store-contracts.js +1 -9
  386. package/dist/plugins/store-sweep.d.ts +63 -0
  387. package/dist/plugins/store-sweep.js +48 -0
  388. package/dist/plugins/task-attachment-store.d.ts +6 -8
  389. package/dist/plugins/task-attachment-store.js +15 -10
  390. package/dist/plugins/task-list-store-sql.d.ts +1 -1
  391. package/dist/plugins/text-column-capacity.d.ts +21 -0
  392. package/dist/plugins/text-column-capacity.js +5 -0
  393. package/dist/plugins/tidb-pool.d.ts +3 -2
  394. package/dist/plugins/tidb-pool.js +20 -32
  395. package/dist/plugins/user-input-ledger-sql.d.ts +1 -1
  396. package/dist/prompt-screen.d.ts +6 -9
  397. package/dist/prompt-screen.js +2 -5
  398. package/dist/read-face-posture.d.ts +6 -6
  399. package/dist/read-face-posture.js +2 -2
  400. package/dist/request-value-closure.d.ts +5 -5
  401. package/dist/request-value-closure.js +1 -1
  402. package/dist/rules-consent.d.ts +48 -27
  403. package/dist/rules-consent.js +147 -23
  404. package/dist/run-cancel-context.d.ts +4 -1
  405. package/dist/run-cancel-context.js +2 -1
  406. package/dist/run-local.js +17 -13
  407. package/dist/runs.d.ts +48 -30
  408. package/dist/runs.js +27 -17
  409. package/dist/runtime-caps-resolver.d.ts +15 -8
  410. package/dist/runtime-caps-resolver.js +14 -10
  411. package/dist/sandbox-egress-policy.js +6 -11
  412. package/dist/sandbox-rbac-rules.d.ts +88 -0
  413. package/dist/sandbox-rbac-rules.js +80 -0
  414. package/dist/sealed-key-layout.d.ts +16 -0
  415. package/dist/sealed-key-layout.js +3 -0
  416. package/dist/sealed-key.js +8 -6
  417. package/dist/security.d.ts +43 -9
  418. package/dist/security.js +9 -2
  419. package/dist/sema-config-dir.js +2 -2
  420. package/dist/server-secret-env.d.ts +2 -0
  421. package/dist/service-version.d.ts +2 -1
  422. package/dist/service-version.js +2 -2
  423. package/dist/session-error-wire.d.ts +1 -1
  424. package/dist/session-incarnation.d.ts +8 -5
  425. package/dist/session-notify-door.d.ts +5 -3
  426. package/dist/session-resident-background.d.ts +110 -0
  427. package/dist/session-resident-background.js +88 -0
  428. package/dist/session-row.d.ts +1 -1
  429. package/dist/session-sync-kernel.d.ts +53 -14
  430. package/dist/session-sync-kernel.js +70 -1
  431. package/dist/session-sync.d.ts +5 -3
  432. package/dist/session-workspace.d.ts +12 -2
  433. package/dist/session-workspace.js +6 -0
  434. package/dist/sighup-idle.d.ts +9 -7
  435. package/dist/sighup-idle.js +4 -5
  436. package/dist/spec-fields.d.ts +16 -0
  437. package/dist/spec-fields.js +7 -0
  438. package/dist/store-posture.d.ts +2 -1
  439. package/dist/stored-request-env-credentials-m38.d.ts +3 -0
  440. package/dist/stored-request-env-credentials-m38.js +8 -0
  441. package/dist/stored-request-hooks-m20.d.ts +3 -2
  442. package/dist/stored-request-hooks-m20.js +19 -14
  443. package/dist/stored-request-prompt-profile-m30.d.ts +1 -1
  444. package/dist/stores-sql/blob-index-sql.d.ts +148 -0
  445. package/dist/stores-sql/blob-index-sql.js +154 -0
  446. package/dist/{plugins → stores-sql}/checkpoint-store-sql.d.ts +14 -428
  447. package/dist/{plugins → stores-sql}/checkpoint-store-sql.js +43 -220
  448. package/dist/{plugins → stores-sql}/file-history-store-sql.d.ts +23 -11
  449. package/dist/{plugins → stores-sql}/file-history-store-sql.js +23 -18
  450. package/dist/{plugins → stores-sql}/mailbox-store-sql.d.ts +2 -2
  451. package/dist/{plugins → stores-sql}/mailbox-store-sql.js +4 -4
  452. package/dist/{plugins → stores-sql}/pg-session-storage.d.ts +27 -67
  453. package/dist/{plugins → stores-sql}/pg-session-storage.js +82 -207
  454. package/dist/{plugins → stores-sql}/retention-store-sql.d.ts +123 -217
  455. package/dist/{plugins → stores-sql}/retention-store-sql.js +66 -190
  456. package/dist/{plugins → stores-sql}/roster-store-sql.d.ts +2 -2
  457. package/dist/{plugins → stores-sql}/roster-store-sql.js +1 -1
  458. package/dist/{plugins → stores-sql}/session-event-payload.d.ts +1 -1
  459. package/dist/{plugins → stores-sql}/session-event-payload.js +1 -1
  460. package/dist/stores-sql/session-policy-store-sql.d.ts +1 -1
  461. package/dist/stores-sql/session-write-hooks.d.ts +59 -0
  462. package/dist/stores-sql/session-write-hooks.js +2 -0
  463. package/dist/{plugins → stores-sql}/tidb-session-storage.d.ts +10 -11
  464. package/dist/{plugins → stores-sql}/tidb-session-storage.js +10 -21
  465. package/dist/{plugins → stores-sql}/tidb-session-store.d.ts +35 -112
  466. package/dist/{plugins → stores-sql}/tidb-session-store.js +73 -169
  467. package/dist/{plugins → stores-sql}/tool-result-store-sql.d.ts +3 -3
  468. package/dist/{plugins → stores-sql}/tool-result-store-sql.js +6 -6
  469. package/dist/stores-sql/windowed-session-storage.d.ts +56 -0
  470. package/dist/stores-sql/windowed-session-storage.js +61 -0
  471. package/dist/{plugins → stores-sql}/workflow-journal-store-sql.d.ts +7 -12
  472. package/dist/{plugins → stores-sql}/workflow-journal-store-sql.js +3 -8
  473. package/dist/task-a2a.d.ts +7 -1
  474. package/dist/task-a2a.js +15 -14
  475. package/dist/task-cwd.d.ts +11 -3
  476. package/dist/task-cwd.js +17 -1
  477. package/dist/task-mcp.d.ts +10 -2
  478. package/dist/task-mcp.js +13 -16
  479. package/dist/task-settings.d.ts +68 -8
  480. package/dist/task-settings.js +63 -6
  481. package/dist/tool-approval.d.ts +23 -10
  482. package/dist/tool-approval.js +10 -6
  483. package/dist/trace/core-keyset-guard.d.ts +17 -10
  484. package/dist/trace/engine-notice-wire.d.ts +1 -1
  485. package/dist/trace/engine-notice-wire.js +4 -0
  486. package/dist/trace/exit-seat.d.ts +29 -1
  487. package/dist/trace/exit-seat.js +4 -0
  488. package/dist/trace/project.d.ts +33 -16
  489. package/dist/trace/project.js +21 -9
  490. package/dist/trace/redact.d.ts +13 -2
  491. package/dist/trace/redact.js +347 -78
  492. package/dist/trace/self-minted-wire.d.ts +587 -16
  493. package/dist/trace/self-minted-wire.js +215 -9
  494. package/dist/trace/sema-provenance.d.ts +45 -41
  495. package/dist/trace/sema-provenance.js +81 -10
  496. package/dist/trace/task-notification-facets.d.ts +70 -2
  497. package/dist/trace/task-notification-facets.js +71 -1
  498. package/dist/trace/wire-projection-faces.d.ts +39 -3
  499. package/dist/trace/wire-projection-faces.js +27 -2
  500. package/dist/unread-request-members.d.ts +66 -0
  501. package/dist/unread-request-members.js +41 -0
  502. package/dist/usage-analytics.d.ts +4 -0
  503. package/dist/user-input-ledger.d.ts +2 -2
  504. package/dist/web-admin-client/apply-effective.js +22 -26
  505. package/dist/web-admin-client/candidate-gate.d.ts +35 -3
  506. package/dist/web-admin-client/candidate-gate.js +53 -5
  507. package/dist/web-admin-client/center-request.d.ts +4 -1
  508. package/dist/web-admin-client/center-request.js +2 -1
  509. package/dist/web-admin-client/effective-keys.js +0 -1
  510. package/dist/web-admin-client/facade.d.ts +1 -1
  511. package/dist/web-admin-client/http-client.d.ts +1 -0
  512. package/dist/web-admin-client/http-client.js +17 -9
  513. package/dist/web-admin-client/restart-signal.js +5 -2
  514. package/dist/web-admin-client/skills-mcp.d.ts +20 -6
  515. package/dist/web-admin-client/skills-mcp.js +26 -21
  516. package/dist/web-admin-client/types.d.ts +34 -49
  517. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +2 -2
  518. package/package.json +22 -13
  519. package/scripts/drain-check-local.mjs +8 -55
  520. package/scripts/drain-check.mysql.sql +3 -40
  521. package/scripts/drain-check.pg.sql +3 -40
  522. package/skills/update-config.md +1 -1
  523. package/wire-changes/server@7.146.0.json +3221 -0
  524. package/wire-changes/server@7.147.0.json +813 -0
  525. package/dist/approval-batch-census.d.ts +0 -27
  526. package/dist/approval-batch-census.js +0 -27
@@ -1,11 +1,40 @@
1
+ import { join } from "node:path";
2
+ import { localConfigDirOf } from "../config-dir-trust.js";
1
3
  import { judgePromptsWire } from "../prompts-domain-validate.js";
4
+ export const CANDIDATE_REJECTION_KINDS = ["schema_invalid", "empty", "parse_error", "not_object", "too_deep", "retired_domain", "dangling_symlink", "unreadable"];
5
+ const DANGLING_LINK_MARK = " is a dangling symbolic link (";
6
+ function rejectionKindOf(reason, error) {
7
+ switch (reason) {
8
+ case "domain_invalid":
9
+ return "schema_invalid";
10
+ case "empty":
11
+ return "empty";
12
+ case "invalid_json":
13
+ return "parse_error";
14
+ case "not_object":
15
+ return "not_object";
16
+ case "too_deep":
17
+ return "too_deep";
18
+ case "retired_domain":
19
+ return "retired_domain";
20
+ case "io":
21
+ return error.includes(DANGLING_LINK_MARK) ? "dangling_symlink" : "unreadable";
22
+ default: {
23
+ const unhandled = reason;
24
+ throw new Error(`unhandled candidate reject reason: ${JSON.stringify(unhandled)}`);
25
+ }
26
+ }
27
+ }
28
+ function rejectionOf(domain, error, reason) {
29
+ return { domain, error, reason, kind: rejectionKindOf(reason, error) };
30
+ }
2
31
  export function judgeConfigCandidate(r) {
3
32
  const prompts = r.effective.prompts;
4
33
  const promptsGate = prompts === undefined ? undefined : judgePromptsWire(prompts);
5
34
  const errors = [
6
- ...(r.domainErrors ?? []).map((de) => ({ domain: de.domain, error: de.error, reason: "domain_invalid" })),
7
- ...(promptsGate !== undefined && !promptsGate.ok ? [{ domain: "prompts", error: promptsGate.error, reason: "domain_invalid" }] : []),
8
- ...(r.refusedDocuments ?? []).map((d) => ({ domain: d.document, error: d.error, reason: d.reason })),
35
+ ...(r.domainErrors ?? []).map((de) => rejectionOf(de.domain, de.error, "domain_invalid")),
36
+ ...(promptsGate !== undefined && !promptsGate.ok ? [rejectionOf("prompts", promptsGate.error, "domain_invalid")] : []),
37
+ ...(r.refusedDocuments ?? []).map((d) => rejectionOf(d.document, d.error, d.reason)),
9
38
  ];
10
39
  if (errors.length === 0)
11
40
  return { verdict: "clean", prompts: promptsGate?.ok ? promptsGate.artifact : undefined };
@@ -24,8 +53,27 @@ export function buildCandidateRejectedFields(r, verdict, leg, ctx) {
24
53
  note: "candidate rejected whole (§9.5-5) — live config keeps the last-known-good; fix the named files to unblock",
25
54
  };
26
55
  }
27
- export function candidateRejectionOf(r, verdict, source, at) {
28
- return { version: r.effective.version, domains: verdict.domains, source, at };
56
+ export function candidateRejectionOf(r, verdict, source, at, dir) {
57
+ return { version: r.effective.version, domains: verdict.domains, source, at, errors: verdict.errors, ...(dir !== undefined ? { dir } : {}) };
58
+ }
59
+ const KIND_CAUSE = {
60
+ schema_invalid: "the domain failed its schema",
61
+ empty: "empty file",
62
+ parse_error: "parse error",
63
+ not_object: "not a JSON object",
64
+ too_deep: "nested too deep",
65
+ retired_domain: "retired domain file",
66
+ dangling_symlink: "dangling symbolic link",
67
+ unreadable: "unreadable",
68
+ };
69
+ export function buildCandidateRejectionNotes(rejection) {
70
+ const configDir = rejection.dir === undefined ? undefined : localConfigDirOf(rejection.dir);
71
+ return rejection.errors.map((e) => ({
72
+ document: e.domain,
73
+ code: e.reason,
74
+ cause: KIND_CAUSE[e.kind],
75
+ ...(configDir !== undefined ? { path: join(configDir, `${e.domain}.json`) } : {}),
76
+ }));
29
77
  }
30
78
  export function buildCandidateRejectedWire(rejection) {
31
79
  return { domains: [...rejection.domains], at: new Date(rejection.at).toISOString(), source: rejection.source };
@@ -2,7 +2,10 @@ import { type CenterCredentialSource } from "../center-credential.js";
2
2
  export declare const SCHEMA_MAJOR_HEADER = "x-sema-schema-major";
3
3
  /** 8s:对中心请求 / 响应式调用的传输上界(拉配置 / 两条 principal 视图 / 内容拉取 / 凭证续签同一值)。 */
4
4
  export declare const CENTER_PULL_TIMEOUT_MS = 8000;
5
- /** 已装 settings-schema 的 major(机器派生)。版本号不成形 ⇒ 模块装载即抛(装坏了的包不该带着一个猜出来的
5
+ /** 已装 settings-schema 的版本号 —— 本仓**唯一**的读口(包自己的 `./package.json` 出口,JSON 模块导入见上):对中心协商用的 major(下)与能力位
6
+ * `settingsContract.version`(`capabilities/settings-contract.ts`)同读这一只。 */
7
+ export declare const SETTINGS_SCHEMA_VERSION: string;
8
+ /** 已装 settings-schema 的 major(由 {@link SETTINGS_SCHEMA_VERSION} 机器派生)。版本号不成形 ⇒ 模块装载即抛(装坏了的包不该带着一个猜出来的
6
9
  * major 去跟中心协商 wire 形)。 */
7
10
  export declare const SETTINGS_SCHEMA_MAJOR: string;
8
11
  /** 一个中心端点 = 基址 + 凭证来源(`ServiceConfig.webAdmin` 结构上满足)。 */
@@ -7,8 +7,9 @@ import { buildHttpUrlRefusal } from "../url-refusal.js";
7
7
  import { egressRedirectRefusal } from "../egress-redirect.js";
8
8
  export const SCHEMA_MAJOR_HEADER = "x-sema-schema-major";
9
9
  export const CENTER_PULL_TIMEOUT_MS = 8000;
10
+ export const SETTINGS_SCHEMA_VERSION = settingsSchemaPackage.version;
10
11
  export const SETTINGS_SCHEMA_MAJOR = (() => {
11
- const version = settingsSchemaPackage.version;
12
+ const version = SETTINGS_SCHEMA_VERSION;
12
13
  const m = /^(\d+)\.\d+\.\d+/.exec(version);
13
14
  if (m === null)
14
15
  throw new Error(`cannot derive ${SCHEMA_MAJOR_HEADER}: @sema-agent/settings-schema package.json has version ${JSON.stringify(version)}`);
@@ -24,7 +24,6 @@ const GOVERNANCE_DOMAIN_KEY_TABLE = {
24
24
  };
25
25
  export const GOVERNANCE_DOMAIN_KEYS = Object.keys(GOVERNANCE_DOMAIN_KEY_TABLE);
26
26
  export const NON_DOMAIN_EFFECTIVE_KEYS = {
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 开域之日按墓碑流程收线。",
28
27
  readFace: "R-15 裁**暂不开域**([4384]:env 逐键恒赢语义下收益薄,⚪ 呈现制过渡)——#A4 的远端腿同靠 open-world 透传;本地腿四键由 env / 引擎默认独占。若来日改裁开域,同上墓碑机制。",
29
28
  sandboxGit: "契约的 wire-only 键(settings-schema 14.7.0 `EffectiveWire.sandboxGit`):web-admin 按部署登记册投影,不是存储域 —— `buildEffective` 从不产它、`readEffectiveWire` 逐字承运;判它的唯一座位 `SandboxGitConfig` 在 stageEffective 调一次。本地腿不可达(`config.d` 只读便携域)⇒ 本地配置源恒缺席(沙箱 git 平面读 `no_origins`)。",
30
29
  };
@@ -52,5 +52,5 @@ export { mutateInPlace, applyEffective, NO_CENTER_EFFECTIVE, isNoCenterEffective
52
52
  export { restartReasons, modelPlaneChanged, type RestartSlice, type RestartSliceCtx, type EngineRestartSignal, } from "./restart-signal.js";
53
53
  export { applySkillsManifest, installedSkillMatchesManifest, skillManifestEntriesNotInstalled, skillToolListsOf, resolveMcpServers, mcpForScenario, resolveA2aPeers, a2aForScenario } from "./skills-mcp.js";
54
54
  export { applyCenterReadFace, buildReadFaceBaseline, buildReadFaceSwapCandidate, restoreReadFaceBaseline, CENTER_READ_FACE_LIVE_KEYS, type CenterReadFaceApply, type CenterReadFaceReport, type ReadFaceBaseline, type ReadFaceSeat } from "./read-face.js";
55
- export type { CenterSkillManifest, CenterMcpServer, CenterA2aPeer, CenterModel, CenterReadFace, EffectiveConfig, ExecutionRuling, SessionMirrorRuling, } from "./types.js";
55
+ export type { CenterSkillManifest, CenterMcpServer, CenterModel, CenterReadFace, EffectiveConfig, ExecutionRuling, SessionMirrorRuling, } from "./types.js";
56
56
  //# sourceMappingURL=facade.d.ts.map
@@ -53,6 +53,7 @@ export declare function fetchPrincipalCaps(center: CenterEndpoint, principal: st
53
53
  runtimeCaps: EntitlementRuntimeCaps | null;
54
54
  configured: boolean;
55
55
  scenario?: ScenarioRuling;
56
+ scenarioDrift?: string;
56
57
  execution?: ExecutionRuling;
57
58
  executionDrift?: string;
58
59
  orgMemory?: unknown;
@@ -1,5 +1,5 @@
1
1
  import { createHash } from "node:crypto";
2
- import { readEffectiveWire, PrincipalCapsWire } from "@sema-agent/settings-schema";
2
+ import { isStringArray, readEffectiveWire, PrincipalCapsWire } from "@sema-agent/settings-schema";
3
3
  import { separateRetiredDomains, splitFoldedReadWarnings, withDroppedCatalogEntries } from "./read-warnings.js";
4
4
  import { CENTER_PULL_TIMEOUT_MS, centerFetch } from "./center-request.js";
5
5
  import { answerStillCurrent } from "../center-credential.js";
@@ -38,14 +38,7 @@ export async function fetchPrincipalCaps(center, principal, etag, fetchImpl, wor
38
38
  return {
39
39
  runtimeCaps: body.runtimeCaps ?? null,
40
40
  configured: Boolean(body.configured),
41
- ...("scenario" in body || "allowlist" in body
42
- ? {
43
- scenario: {
44
- scenario: typeof body.scenario === "string" ? body.scenario : null,
45
- allowlist: Array.isArray(body.allowlist) ? body.allowlist.filter((s) => typeof s === "string") : [],
46
- },
47
- }
48
- : {}),
41
+ ...scenarioRulingOf(body),
49
42
  ...((() => {
50
43
  const isRecord = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
51
44
  const exRaw = body.execution;
@@ -73,6 +66,21 @@ export async function fetchPrincipalCaps(center, principal, etag, fetchImpl, wor
73
66
  etag: raw.etag,
74
67
  };
75
68
  }
69
+ function scenarioRulingOf(body) {
70
+ const hasScenario = "scenario" in body;
71
+ const hasAllowlist = "allowlist" in body;
72
+ if (!hasScenario && !hasAllowlist)
73
+ return {};
74
+ if (!hasScenario || !hasAllowlist)
75
+ return { scenarioDrift: `${hasScenario ? "allowlist" : "scenario"} is missing while ${hasScenario ? "scenario" : "allowlist"} is present` };
76
+ const { scenario, allowlist } = body;
77
+ if (scenario !== null && typeof scenario !== "string")
78
+ return { scenarioDrift: `scenario is ${Array.isArray(scenario) ? "array" : typeof scenario}, expected string or null` };
79
+ if (!isStringArray(allowlist)) {
80
+ return { scenarioDrift: Array.isArray(allowlist) ? "allowlist has a non-string element, expected string[]" : `allowlist is ${allowlist === null ? "null" : typeof allowlist}, expected string[]` };
81
+ }
82
+ return { scenario: { scenario: typeof scenario === "string" ? scenario : null, allowlist: [...allowlist] } };
83
+ }
76
84
  function assertPrincipalEcho(echoed, principal) {
77
85
  if (echoed !== undefined && echoed !== principal) {
78
86
  throw new Error(`web-admin principal-caps response echoes principal ${JSON.stringify(echoed)} but ${JSON.stringify(principal)} was requested — discarding the whole response`);
@@ -2,6 +2,7 @@ import { resolveActiveTiers, resolveCatalogDefaultModel } from "@sema-agent/sett
2
2
  import { stableStringify } from "@sema-agent/settings-schema/hash";
3
3
  import { DEFAULT_PLUGIN_ALLOW_HOSTS, materializablePlugins } from "../capabilities/center-plugins.js";
4
4
  import { CENTER_READ_FACE_LIVE_KEYS } from "./read-face.js";
5
+ import { enabledA2aPeerView } from "./skills-mcp.js";
5
6
  const RESTART_SLICES = ["skills", "mcp", "a2a", "scenarios", "degrade-route", "read-face", "memory-consolidation"];
6
7
  function enabledOnly(rows) {
7
8
  if (!rows)
@@ -41,8 +42,10 @@ function restartSliceValue(eff, slice, ctx) {
41
42
  }
42
43
  case "mcp":
43
44
  return enabledOnly(eff.mcp?.servers);
44
- case "a2a":
45
- return enabledOnly(eff.a2a?.peers);
45
+ case "a2a": {
46
+ const views = (eff.a2a?.peers ?? []).flatMap((peer) => enabledA2aPeerView(peer) ?? []);
47
+ return views.length > 0 ? views : null;
48
+ }
46
49
  case "scenarios":
47
50
  return enabledOnly(eff.scenarios?.scenarios);
48
51
  case "read-face": {
@@ -4,7 +4,8 @@ import type { Logger } from "../observability/logger.js";
4
4
  import { type PeerDesk, type PeerLease } from "../peer-seat.js";
5
5
  import type { LoadedSkill } from "../capabilities/skills.js";
6
6
  import type { ConfigProvider } from "../config-provider.js";
7
- import type { CenterA2aPeer, CenterMcpServer, CenterSkillManifest } from "./types.js";
7
+ import type { CenterMcpServer, CenterSkillManifest } from "./types.js";
8
+ import type { A2aConfig, A2aPeerSpec } from "@sema-agent/settings-schema";
8
9
  /**
9
10
  * 技能正文的来源 = **拉到这份清单的配置源自己**([ref]):`fetchSkillContent(contentHash)` 按 hash 答正文 —— 远程 = 中心内容端点
10
11
  * (传输自验 hash;未知 hash ⇒ `undefined`),本地 = config.d 里内联的正文(与清单同一种容错读);`skillBodyCacheDir` = 这只配置源
@@ -68,8 +69,8 @@ export declare function resolveMcpServers(mcp: {
68
69
  * [ref]:alias 窗撤销,单键命中(同 `skillsForScenario`)。 */
69
70
  export declare function mcpForScenario(center: CenterMcp | undefined, scenario: string): McpServerSpec[] | undefined;
70
71
  /**
71
- * DESIGN-269 §2.1 —— resolve center A2A peers (`/effective.a2a`) into core `A2aServerSpec`s + the scenarios
72
- * each applies to. Exact sibling of {@link resolveMcpServers}, same three rules:
72
+ * DESIGN-269 §2.1 —— resolve the deployment's A2A peers (the `a2a` domain: `config.d/a2a.json` on the local leg, `/effective.a2a` on the
73
+ * center leg — one declaration seat, both legs read through the contract) into core `A2aServerSpec`s + the scenarios each applies to. Exact sibling of {@link resolveMcpServers}, same three rules:
73
74
  * · header-NAME refs → real values from THIS service's env (the secret boundary is unchanged — the center
74
75
  * never holds the bearer), registered on `desk` under `rosterLease` (`mintDeclaration`, only for a peer that mounts); the spec carries the minted
75
76
  * reference, never the values. A peer with ANY missing ref is SKIPPED wholesale (`resolveRefs` → null):
@@ -85,9 +86,22 @@ export declare function mcpForScenario(center: CenterMcp | undefined, scenario:
85
86
  * the caller. Absent face > a face that quietly launders trust. (`allowSkills` is the operator's real
86
87
  * knob here: narrow WHAT mounts, never re-label what it does.)
87
88
  */
88
- export declare function resolveA2aPeers(a2a: {
89
- peers: CenterA2aPeer[];
90
- }, desk: Pick<PeerDesk, "declare">, rosterLease: PeerLease, logger?: Logger): ScopedA2aPeer[];
89
+ export declare function resolveA2aPeers(a2a: A2aConfig, desk: Pick<PeerDesk, "declare">, rosterLease: PeerLease, logger?: Logger): ScopedA2aPeer[];
90
+ /** 解析器从一条 a2a 对端上真读的七键,读成同一件事的写法归一成一形:`cardUrl` / `principalHeader` 空串 ≡ 缺席、`allowSkills` 空表 ≡ 缺席
91
+ * (不收窄)、`headerRefs` 空记录 ≡ 缺席(没有件)、`scenarios` 缺席 ≡ `[]`(全场景)。禁用的对端 ⇒ undefined(解析器跳过,零运行期效果)。
92
+ * 两个读者:{@link resolveA2aPeers}(拨号的输入就是它)与 restart 片 `a2a`(指纹的就是它 —— 只指纹真重启的字段,与模型条目同律)。
93
+ * 七键名单只在这里成文:解析器多读一个键而这里没投 ⇒ 解析器读不到(编译红);片不会漏签。
94
+ * `enabled` / `scenarios` 按可缺席读:型上它们恒在(契约读口补缺省),但 LKG 回放不经读口(删除条件同解析器的名字臂)。 */
95
+ export interface A2aPeerView {
96
+ name: string;
97
+ url: string;
98
+ cardUrl?: string;
99
+ headerRefs?: Record<string, string>;
100
+ principalHeader?: string;
101
+ allowSkills?: string[];
102
+ scenarios: string[];
103
+ }
104
+ export declare function enabledA2aPeerView(peer: A2aPeerSpec): A2aPeerView | undefined;
91
105
  /** The A2A peers applicable to a scenario: tagged with it, or untagged (global). undefined when none.
92
106
  * Twin of {@link mcpForScenario} — `undefined` (not `[]`) is load-bearing: an empty array would put an
93
107
  * `a2a: []` key on the spec, i.e. "this deployment declares an empty peer set", where absence means
@@ -1,10 +1,11 @@
1
1
  import { readMcpSourceLabel } from "../mcp-source-label.js";
2
2
  import { skillContentHash } from "@sema-agent/settings-schema";
3
- import { judgeSessionMetaKey, readMcpToolAxes, readToolFaces } from "@sema-agent/core";
3
+ import { ensureDir, judgeSessionMetaKey, readMcpToolAxes, readToolFaces } from "@sema-agent/core";
4
4
  import { MCP_CONTENT_ORIGINS, describeBadContentOrigin, describeBadWireName, isContentOriginWord, isUsableWireName } from "@sema-agent/settings-schema";
5
5
  import { noteMcpAssertionHeaderNotSent, withholdsMcpAssertionHeader } from "../mcp-assertion-header.js";
6
6
  import { mintDeclaration, peerSentence } from "../peer-seat.js";
7
7
  import { SHA256_HEX_RE } from "../digest-form.js";
8
+ import { atomicWriteFileAsync } from "../plugins/owner-only-file-mode.js";
8
9
  export function skillToolListsOf(source) {
9
10
  return {
10
11
  ...(source.allowedTools !== undefined ? { allowedTools: [...source.allowedTools] } : {}),
@@ -62,10 +63,8 @@ export async function applySkillsManifest(baseline, manifest, bodies, logger) {
62
63
  return;
63
64
  const hex = hash.replace(/^sha256:/, "");
64
65
  pendingWrites.push((async () => {
65
- await fsp.mkdir(diskCacheDir, { recursive: true });
66
- const tmp = joinPath(diskCacheDir, `${hex}.${Math.random().toString(36).slice(2, 8)}.tmp`);
67
- await fsp.writeFile(tmp, content, { mode: 0o600 });
68
- await fsp.rename(tmp, joinPath(diskCacheDir, hex));
66
+ ensureDir(diskCacheDir);
67
+ await atomicWriteFileAsync(joinPath(diskCacheDir, hex), content, { durability: "best-effort" });
69
68
  })().catch((err) => logger?.warn("web_admin_skill_cache_write_failed", { hash, err: String(err) })));
70
69
  };
71
70
  const byName = new Map(baseline.map((s) => [s.spec.name, s]));
@@ -211,35 +210,41 @@ export function mcpForScenario(center, scenario) {
211
210
  }
212
211
  export function resolveA2aPeers(a2a, desk, rosterLease, logger) {
213
212
  const out = [];
214
- for (const p of a2a.peers ?? []) {
215
- if (p.enabled === false)
213
+ for (const declared of a2a.peers ?? []) {
214
+ const view = enabledA2aPeerView(declared);
215
+ if (view === undefined)
216
216
  continue;
217
- if (!isUsableWireName(p.name)) {
217
+ if (!isUsableWireName(view.name)) {
218
218
  logger?.warn("web_admin_a2a_name_unusable", {
219
- peer: describeBadWireName(p.name),
219
+ peer: describeBadWireName(view.name),
220
220
  note: "peer SKIPPED — an A2A peer name is its identity (it lands as the roster's `origin.peer`) and core REFUSES an out-of-bound name at prepare, which would fail every task in this scenario. Shorten the name and republish; sibling peers are unaffected.",
221
221
  });
222
222
  continue;
223
223
  }
224
- const headers = resolveRefs(p.headerRefs, p.name, "header", logger, "web_admin_a2a_env_missing", "skipping this A2A peer — referenced env var is unset in this service");
224
+ const { headerRefs, scenarios, ...spec } = view;
225
+ const headers = resolveRefs(headerRefs, spec.name, "header", logger, "web_admin_a2a_env_missing", "skipping this A2A peer — referenced env var is unset in this service");
225
226
  if (headers === null)
226
227
  continue;
227
- const draft = {
228
- spec: {
229
- name: p.name,
230
- url: p.url,
231
- ...(p.cardUrl ? { cardUrl: p.cardUrl } : {}),
232
- ...(p.principalHeader ? { principalHeader: p.principalHeader } : {}),
233
- ...(p.allowSkills && p.allowSkills.length > 0 ? { allowSkills: p.allowSkills } : {}),
234
- },
235
- pieces: headers,
236
- };
237
- out.push({ scenarios: p.scenarios ?? [], spec: mintDeclaration(desk, draft, rosterLease) });
228
+ const draft = { spec, pieces: headers };
229
+ out.push({ scenarios, spec: mintDeclaration(desk, draft, rosterLease) });
238
230
  }
239
231
  if (out.length > 0)
240
232
  logger?.info("web_admin_a2a", { peers: out.map((p) => p.spec.name) });
241
233
  return out;
242
234
  }
235
+ export function enabledA2aPeerView(peer) {
236
+ if (peer.enabled === false)
237
+ return undefined;
238
+ return {
239
+ name: peer.name,
240
+ url: peer.url,
241
+ ...(peer.cardUrl ? { cardUrl: peer.cardUrl } : {}),
242
+ ...(peer.headerRefs && Object.keys(peer.headerRefs).length > 0 ? { headerRefs: peer.headerRefs } : {}),
243
+ ...(peer.principalHeader ? { principalHeader: peer.principalHeader } : {}),
244
+ ...(peer.allowSkills && peer.allowSkills.length > 0 ? { allowSkills: peer.allowSkills } : {}),
245
+ scenarios: peer.scenarios ?? [],
246
+ };
247
+ }
243
248
  export function a2aForScenario(peers, scenario) {
244
249
  if (!peers || peers.length === 0)
245
250
  return undefined;
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * web-admin wire types — the web-admin `/api/config/effective` payload shapes (`CenterModel`,
3
- * `CenterSkillManifest`, `CenterMcpServer`, `CenterA2aPeer`, `EffectiveConfig`) plus the per-principal
3
+ * `CenterSkillManifest`, `CenterMcpServer`, `EffectiveConfig`; the `a2a` domain is the contract's own `A2aConfig`) plus the per-principal
4
4
  * execution/session-mirror ruling shapes riding the caps view (`ExecutionRuling`/`SessionMirrorRuling`).
5
5
  * Pure type/interface declarations — no runtime logic. Split out of `facade.ts` ([ref] A13,
6
6
  * internal-lossless: the facade re-exports every symbol below unchanged).
7
7
  */
8
8
  import type { ToolContentOrigin } from "@sema-agent/core";
9
+ import type { A2aConfig, ModelThinkingLevelMap } from "@sema-agent/settings-schema";
9
10
  import type { Autonomy, CommandRule } from "../runtime-governance.js";
10
11
  import type { DroppedCatalogEntry } from "./read-warnings.js";
11
12
  export interface CenterModel {
@@ -28,6 +29,13 @@ export interface CenterModel {
28
29
  tier?: string;
29
30
  reasoning?: boolean;
30
31
  vision?: boolean;
32
+ /**
33
+ * [ref](settings-schema 20.0.0 `ModelEntry.thinkingLevelMap`)—— 这条条目的逐档思考拼写,上引擎 `Model.thinkingLevelMap`(键 off / minimal / low / medium / high / xhigh / max;
34
+ * 串 = 供应商对这一档的值,`null` = 这一档不支持,没写的档 = 供应商缺省)。类型就是契约型(不是 `unknown`):与 {@link CenterModel.compat} 不同,这一席的**形归契约包判**
35
+ * (闭集键,坏形整条被读腿丢 —— 中心腿 `readEffectiveWire`、本地腿契约文件店同一只 zod),到得了这里的都是判过的;本服务不二判,`toModel` 原样交引擎。
36
+ * 缺席 = 未声明(不补 `{}`);`{}` = 声明了、无覆盖。env 腿没有这一席(声明座只有目录条目)。
37
+ */
38
+ thinkingLevelMap?: ModelThinkingLevelMap;
31
39
  contextWindow?: number;
32
40
  maxTokens?: number;
33
41
  /** [ref]① 1M dual-window (core 1.289 `Model.autoCompactTokens`): an EXPLICIT roster value wins the
@@ -48,10 +56,10 @@ export interface CenterModel {
48
56
  * 此后记账,不回算窗口内历史(registry types.d.ts 同句契约)。 */
49
57
  quotaWeight?: number;
50
58
  /**
51
- * [ref](settings-schema 1.10.0 `ModelEntry.compat`)—— 这条目录条目对 **openai-completions 线路**的
52
- * 兼容声明,上 core `Model.compat`(`OpenAICompletionsCompat` 五键)。真需求 = vLLM / Qwen 类**缺省开
53
- * 思考**的网关:关思考只能靠 `thinkingFormat: "qwen-chat-template"`(`chat_template_kwargs.
54
- * enable_thinking=false`),而 `extraBody` 穿不过引擎的 OpenAI 保留键表。
59
+ * [ref](settings-schema 1.10.0 `ModelEntry.compat`)—— 这条目录条目对**它那条线路**的兼容声明,上 core `Model.compat`:
60
+ * openai-completions 条目 = `OpenAICompletionsCompat` 五键,anthropic-messages 条目 = `AnthropicMessagesCompat`([ref] (b) 起按线路读;此前 anthropic 条目一律整只丢)。
61
+ * 真需求 = vLLM / Qwen 类**缺省开思考**的网关:关思考只能靠 `thinkingFormat: "qwen-chat-template"`(`chat_template_kwargs.
62
+ * enable_thinking=false`),而 `extraBody` 穿不过引擎的 OpenAI 保留键表;adaptive 族 anthropic 端点(无 budget、关不掉)靠 `thinkingMode: "adaptive"`。
55
63
  *
56
64
  * 🔴 类型是 `unknown` 而不是那个结构,**刻意的**(与 {@link CenterMcpServer.toolFaces} 逐字同姿):本类型
57
65
  * 是两条腿的**承载形**(本地 config.d 经 settings-schema 的 `z.unknown()` 解析透明地过来、远端 /effective
@@ -160,8 +168,9 @@ export interface CenterMcpServer {
160
168
  toolFaces?: unknown;
161
169
  /**
162
170
  * [ref](settings-schema 12.2.x `McpServerSpec.toolAxes`,解析透明 `z.unknown()`)—— 部署侧为这台 server 的**每只工具**声明的
163
- * 风险轴(`effect` / `egress` / `irreversibility`),键 = server 的**原始(未加命名空间)**工具名,上 core
164
- * `McpServerSpec.toolAxes`。
171
+ * 风险轴(引擎的成员集:`effect` / `egress` / `irreversibility` / `boundaryFlow`),键 = server 的**原始(未加命名空间)**工具名,上 core
172
+ * `McpServerSpec.toolAxes`。其中 `boundaryFlow: "engine"`(须同条 `egress: false`)声明一只引擎专用工具(设备车道的发射闸对它的调用不欠任何东西),
173
+ * 只有部署声明(本地 config.d / 中心)能写,请求侧写它被拒;两条部署腿都原样交给引擎判。
165
174
  *
166
175
  * 🔴 类型是 `unknown` 而不是那个结构,**刻意的**(与 {@link CenterMcpServer.toolFaces} 逐字同姿):本类型是两条部署腿的**承载形**
167
176
  * (本地 config.d 经 `z.unknown()` 解析透明地过来、远端 /effective 是直读 JSON),形判与投影的单一属主是**引擎**根导出的
@@ -204,31 +213,8 @@ export interface CenterMcpServer {
204
213
  };
205
214
  }
206
215
  /**
207
- * DESIGN-269 §2.1 —— A2A peer registry entry (the `CenterMcpServer` sibling). `headerRefs` are env-NAME
208
- * refs (header-name → ENV_NAME), **never** literal secrets: the bearer for a peer lives in THIS service's
209
- * env, the center only ever stores the NAME. (A2A has a single transport — every peer is an https(s)
210
- * endpoint — so unlike MCP there is no transport discriminant; the two ref-carrying shapes collapse to one.)
211
- */
212
- export interface CenterA2aPeer {
213
- name: string;
214
- scenarios: string[];
215
- enabled?: boolean;
216
- /** The peer's service URL (also the origin the well-known agent-card path resolves against). */
217
- url: string;
218
- /** Explicit agent-card location when the peer does not publish at a well-known path. Set ⇒ used ALONE. */
219
- cardUrl?: string;
220
- /** env-NAME refs (header-name → ENV_NAME) resolved from THIS service's env at boot. A peer with ANY
221
- * unset ref is SKIPPED wholesale (fail-safe — never dial a peer half-credentialed). */
222
- headerRefs?: Record<string, string>;
223
- /** [ref], same contract as the MCP side: the header name the runner injects the task's authenticated
224
- * end-user principal into. Not a ref — a literal header NAME (the runner fills the value, never the model). */
225
- principalHeader?: string;
226
- /** Optional allowlist of the peer's skill ids to mount (others are not mounted). */
227
- allowSkills?: string[];
228
- }
229
- /**
230
- * #A4([ref] 窗三件批 件1;[ref]/[ref] 承诺件)—— READ 容纳面的 center 下发形(`CenterA2aPeer` 的
231
- * 同族:一个 additive 顶层域,server 声明它才不会被静默丢弃)。四个成员逐一对应部署 env 的四键
216
+ * #A4([ref] 窗三件批 件1;[ref]/[ref] 承诺件)—— READ 容纳面的 center 下发形(一个 additive 顶层键,
217
+ * 不是契约域:server 声明它才不会被静默丢弃)。四个成员逐一对应部署 env 的四键
232
218
  * (`READ_FACE` / `READ_DENY_PATTERNS` / `READ_DENY_BUILTIN_TIERS` / `READ_DENY_BUILTIN_EXCLUDE`),
233
219
  * 消费半场 = `web-admin-client/read-face.ts` `applyCenterReadFace`。
234
220
  *
@@ -334,11 +320,14 @@ export interface EffectiveConfig {
334
320
  mcp?: {
335
321
  servers: CenterMcpServer[];
336
322
  };
337
- /** DESIGN-269 §2.1: center-declared A2A peers. Absent (the shape every center ships today) ⇒ the leg
338
- * does not exist for this deployment — `config.a2aPeers` stays undefined, no peer is ever dialed. */
339
- a2a?: {
340
- peers: CenterA2aPeer[];
341
- };
323
+ /** The deployment's resident outbound A2A peers — the contract's `a2a` domain (settings-schema 18.0.0, portable): `config.d/a2a.json`
324
+ * on the local leg, `/effective.a2a` on the center leg, both read through the contract. The local leg materializes the domain (no file ⇒
325
+ * `{ peers: [] }` — the reader is the contract itself, it always knows the domain); the center leg does NOT invent a domain the producer did not
326
+ * send (settings-schema 20.0.0 `WIRE_CARRIED_DOMAINS`: an `/effective` body without `a2a` — an older center that does not know the domain —
327
+ * reads ABSENT; `{ peers: [] }` = the center says "empty roster"). Absent and an empty `peers` ⇒ no peer is dialed (one state: `resolveA2aPeers`
328
+ * yields nothing / is not called, `a2aForScenario` yields undefined, the restart slice reads null). Optional because of that center leg and because
329
+ * the LKG replay (raw file, not read through the contract) may predate the domain. */
330
+ a2a?: A2aConfig;
342
331
  /** Center-declared scenarios (composition-as-config; capability stays code-pinned): each entry names a
343
332
  * deploy-registered TOOLSET (`none` / `repo-readonly`) + an optional static prompt (≤4KB, audited at
344
333
  * publish). Restart-to-apply like skills/mcp (baked into the scenario table at boot). Center entries
@@ -360,14 +349,10 @@ export interface EffectiveConfig {
360
349
  * `limits` 在 PORTABLE_DOMAINS 里)。
361
350
  */
362
351
  limits?: EffectiveLimits;
363
- /** 142-S4(registry-core 0.10.0 第 15 域):center 项目登记簿。wire 面 verbatim JSON —
364
- * registry-core `ProjectsConfig` 的形状是 `{projects: Record<projectId, ProjectRegistration>}`(skills/mcp
365
- * 同款域包裹)。[ref]B-8:裸 Record 联合臂随 apply-effective 的宽读一起删(0.13.0 只有包裹形,
366
- * 裸形无 producer)。消费=applyEffective → config.projects(displayName/gitRemotes/defaultScopes
367
- * 三个 runtime 字段;审计字段不进 ServiceConfig)。 */
368
- projects?: {
369
- projects?: Record<string, unknown>;
370
- };
352
+ /** 项目登记簿(settings-schema `projects` 域)。wire 面 verbatim JSON —— settings-schema `ProjectsConfig` 的形状是
353
+ * `{projects: Record<projectId, ProjectRegistration>}`(skills / mcp 同款域包裹)。这里不声明更窄的型:判官是 settings-schema 的视图面读函数,
354
+ * 唯一调用点 applyEffective(→ config.projects,`ProjectRegistration` 原样)。 */
355
+ projects?: unknown;
371
356
  /** settings-schema 0.6 起治理三件(autonomy/commandPolicy/approvalRequire)的**唯一**承运域(0.7.1 撤
372
357
  * runtime 位双写镜像;顺序契约当年已走完:消费端先切、center 再撤)。键集与 schema `GovernanceConfig.shape`
373
358
  * 逐字相等([ref] 件3 对账门钉)。消费:autonomy/commandPolicy 逐请求热(`stageRuntimeHot`,boot+refresh);
@@ -400,10 +385,10 @@ export interface EffectiveConfig {
400
385
  /** (stage7 P5,registry-core 0.8 `execution` 域): the center-resolved per-principal execution
401
386
  * ruling riding the caps view. `required=false` / ruling absent = no enforcement (legacy). `allowedLanes` is
402
387
  * an OPEN value domain (adding one is never BREAKING; consumers tolerate unknown names). Known lane names:
403
- * `host`/`e2b`/`k8s`/`ssh`/`adb`/`local-docker`/`device` (the REMOTE_EXEC providers) **plus `in-process`**
404
- * — the REMOTE_EXEC-unset fleet posture ([ref]: previously "OA/review-style workers", a scenario family retired in 5.0.0; named distinctly from the explicit
405
- * `host` lane on purpose). ⚠️ Admins writing `required=true` policies must include `in-process` when such
406
- * workers should stay admittable — center UI/doc 词表待补齐。
388
+ * `host`/`e2b`/`k8s`/`ssh`/`adb`/`local-docker`/`device`/`none` (the REMOTE_EXEC lanes; `none` = a declared
389
+ * no-execution-environment lane). Since 7.147.0 every deployment declares its lane; the name earlier versions gave an
390
+ * unset lane (`in-process`) is retired and renamed `none` ⇒ admins writing `required=true` policies list `none` for workers
391
+ * without an execution environment (during the switch, list both names, then drop the old one — data, not a code double-read).
407
392
  *
408
393
  * 🔴 **`device` 是 per-principal 执行面上最需要写清的一条**(device-executor-lane-v2 §4.1 的 web-admin
409
394
  * 行,车A-4 补):它是「在**员工自己的机器**上执行」的那条车道 —— 允许它 ≠ 允许一台云沙箱,而是允许
@@ -13,7 +13,7 @@ dials the device, so the device needs no inbound port, no public address and no
13
13
 
14
14
  | Plane | Transport | Who calls whom | Where it is specified |
15
15
  |---|---|---|---|
16
- | Management / enrollment / binding | HTTPS, JSON | the user's client calls the server | `docs/ASSISTANT-WIRE-CONTRACT.md` §14 |
16
+ | Management / enrollment / binding | HTTPS, JSON | the user's client calls the server | the repository's `docs/ASSISTANT-WIRE-CONTRACT.md` §14 (not shipped in the npm package) |
17
17
  | Executor | WebSocket (upgrade on the WS path below), text frames, JSON | the device connects out to the server | **this document** |
18
18
 
19
19
  **Discovery before you connect**: `GET /v1/capabilities` carries a `deviceExecutor` key — either `false`
@@ -1104,5 +1104,5 @@ The short version for an executor implementer:
1104
1104
  - a non-device deployment refuses the key outright rather than ignoring it.
1105
1105
 
1106
1106
  The full contract — request shapes, every refusal code, the rebind verb, and the disclosed races — is in
1107
- `docs/ASSISTANT-WIRE-CONTRACT.md` §14.6 (and §14.1–14.5 for the management verbs). It is not repeated
1107
+ the repository's `docs/ASSISTANT-WIRE-CONTRACT.md` §14.6 and, for the management verbs, §14.1–14.5 (not shipped in the npm package). It is not repeated
1108
1108
  here.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/server",
3
- "version": "7.145.0",
3
+ "version": "7.147.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",
@@ -23,7 +23,14 @@
23
23
  "default": "./dist/model-route-env.js"
24
24
  },
25
25
  "./package.json": "./package.json",
26
- "./deploy/sema-up/lanes.json": "./deploy/sema-up/lib/lanes.json"
26
+ "./deploy/sema-up/lanes.json": "./deploy/sema-up/lib/lanes.json",
27
+ "./deploy/facts/CHANGES.json": "./deploy/facts/CHANGES.json",
28
+ "./deploy/facts/lanes.json": "./deploy/facts/lanes.json",
29
+ "./deploy/facts/lanes.schema.json": "./deploy/facts/lanes.schema.json",
30
+ "./deploy/facts/sandbox-rbac.json": "./deploy/facts/sandbox-rbac.json",
31
+ "./deploy/facts/sandbox-rbac.schema.json": "./deploy/facts/sandbox-rbac.schema.json",
32
+ "./deploy/facts/sealed-key.json": "./deploy/facts/sealed-key.json",
33
+ "./deploy/facts/sealed-key.schema.json": "./deploy/facts/sealed-key.schema.json"
27
34
  },
28
35
  "files": [
29
36
  "dist",
@@ -36,6 +43,7 @@
36
43
  "scripts/drain-check.mysql.sql",
37
44
  "scripts/drain-check.pg.sql",
38
45
  "deploy/sema-up",
46
+ "deploy/facts",
39
47
  "docs/DEVICE-EXECUTOR-PROTOCOL.md",
40
48
  "wire-changes/",
41
49
  "USAGE.md",
@@ -70,23 +78,23 @@
70
78
  },
71
79
  "dependencies": {
72
80
  "@modelcontextprotocol/server": "2.4.0",
73
- "@sema-agent/core": "7.62.0",
74
- "@sema-agent/settings-schema": "17.0.0",
75
- "e2b": "^2.28.0",
76
- "libsodium-wrappers": "^0.8.4",
77
- "mysql2": "^3.22.4",
78
- "pg": "^8.22.0",
79
- "ssh2": "^1.17.0",
81
+ "@sema-agent/core": "7.65.0",
82
+ "@sema-agent/settings-schema": "20.0.0",
83
+ "e2b": "2.36.0",
84
+ "libsodium-wrappers": "0.8.4",
85
+ "mysql2": "3.22.6",
86
+ "pg": "8.22.0",
87
+ "ssh2": "1.17.0",
80
88
  "typebox": "1.1.39",
81
89
  "undici": "7.30.0",
82
- "ws": "^8.21.0",
83
- "zod": "^4.4.3"
90
+ "ws": "8.21.0",
91
+ "zod": "4.4.3"
84
92
  },
85
93
  "optionalDependencies": {
86
- "sharp": "^0.35.3"
94
+ "sharp": "0.35.3"
87
95
  },
88
96
  "devDependencies": {
89
- "@sema-agent/sdk": "24.0.0",
97
+ "@sema-agent/sdk": "36.0.0",
90
98
  "@types/libsodium-wrappers": "^0.7.14",
91
99
  "@types/node": "22.10.2",
92
100
  "@types/pg": "^8.20.0",
@@ -95,6 +103,7 @@
95
103
  "ajv": "^8.20.0",
96
104
  "ajv-formats": "^3.0.1",
97
105
  "core-mixed-version-reader": "npm:@sema-agent/core@7.54.1",
106
+ "semver": "7.8.5",
98
107
  "tsx": "4.19.2",
99
108
  "typescript": "5.7.2",
100
109
  "vitest": "^4.1.8",