@sema-agent/server 7.131.0 → 7.133.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 (509) hide show
  1. package/MIGRATION.md +575 -0
  2. package/README.md +12 -9
  3. package/README.zh-CN.md +9 -6
  4. package/USAGE.md +326 -98
  5. package/deploy/sema-up/README.md +19 -1
  6. package/deploy/sema-up/chart/templates/server-v4pro.yaml +5 -2
  7. package/deploy/sema-up/chart/templates/server.yaml +5 -2
  8. package/deploy/sema-up/stack/compose.yaml +3 -0
  9. package/deploy/sema-up/stack/sema-stack-cluster.yaml +4 -2
  10. package/dist/adoption/plan.d.ts +3 -2
  11. package/dist/adoption/plan.js +7 -5
  12. package/dist/adoption/runner.js +3 -10
  13. package/dist/adoption/sql.d.ts +3 -2
  14. package/dist/adoption/sql.js +3 -5
  15. package/dist/adoption/wire.d.ts +4 -1
  16. package/dist/adoption/wire.js +1 -0
  17. package/dist/approval-ask-audit-store.d.ts +31 -13
  18. package/dist/approval-ask-audit-store.js +272 -74
  19. package/dist/approval-ask-machine.d.ts +15 -0
  20. package/dist/approval-ask-machine.js +6 -0
  21. package/dist/approval-ask-retention.d.ts +136 -0
  22. package/dist/approval-ask-retention.js +102 -0
  23. package/dist/approval-card.d.ts +82 -20
  24. package/dist/approval-card.js +46 -16
  25. package/dist/approval-deny-reasons.d.ts +1 -1
  26. package/dist/approval.d.ts +9 -0
  27. package/dist/approval.js +24 -3
  28. package/dist/audit.d.ts +33 -19
  29. package/dist/audit.js +12 -16
  30. package/dist/auth-bridge.d.ts +4 -0
  31. package/dist/auth-bridge.js +10 -11
  32. package/dist/bake-runner/main.js +3 -2
  33. package/dist/boot/deferred-sandbox-path-env.js +1 -1
  34. package/dist/boot/deployment-mods.d.ts +31 -0
  35. package/dist/boot/deployment-mods.js +26 -0
  36. package/dist/boot/execution-env.d.ts +1 -1
  37. package/dist/boot/execution-env.js +27 -12
  38. package/dist/boot/execution-lane.js +11 -0
  39. package/dist/boot/leader.js +2 -0
  40. package/dist/boot/memory-boundary.d.ts +2 -2
  41. package/dist/boot/memory-boundary.js +2 -2
  42. package/dist/boot/memory-consolidation.d.ts +5 -4
  43. package/dist/boot/memory-consolidation.js +7 -6
  44. package/dist/boot/org-delivery.d.ts +28 -0
  45. package/dist/boot/org-delivery.js +20 -0
  46. package/dist/boot/read-deny-anchor-audit.d.ts +17 -0
  47. package/dist/boot/read-deny-anchor-audit.js +36 -0
  48. package/dist/boot/reapers.d.ts +3 -0
  49. package/dist/boot/reapers.js +21 -1
  50. package/dist/boot/resolve-spec.d.ts +4 -5
  51. package/dist/boot/resolve-spec.js +74 -123
  52. package/dist/boot/runner-deps.d.ts +19 -8
  53. package/dist/boot/runner-deps.js +15 -2
  54. package/dist/boot/session-faces.d.ts +2 -7
  55. package/dist/boot/session-faces.js +4 -2
  56. package/dist/boot/stage-02-web-admin-pull.js +4 -1
  57. package/dist/boot/stage-03-store-backend.d.ts +1 -1
  58. package/dist/boot/stage-03-store-backend.js +2 -2
  59. package/dist/boot/stage-04-stores.d.ts +1 -1
  60. package/dist/boot/stage-05-execution-env.d.ts +4 -4
  61. package/dist/boot/stage-05-execution-env.js +7 -10
  62. package/dist/boot/stage-06-runners.d.ts +4 -2
  63. package/dist/boot/stage-06-runners.js +11 -7
  64. package/dist/boot/stage-07-capability-layer.d.ts +4 -2
  65. package/dist/boot/stage-07-capability-layer.js +27 -6
  66. package/dist/boot/stage-08-reapers.d.ts +4 -2
  67. package/dist/boot/stage-08-reapers.js +2 -2
  68. package/dist/boot/stage-09-leader.d.ts +6 -9
  69. package/dist/boot/stage-10-http-server.d.ts +6 -9
  70. package/dist/boot/stage-10-http-server.js +7 -9
  71. package/dist/boot/stores.d.ts +1 -1
  72. package/dist/boot/stores.js +7 -8
  73. package/dist/boot/web-admin.d.ts +4 -3
  74. package/dist/boot/web-admin.js +186 -98
  75. package/dist/boot/workflow-orchestration.d.ts +2 -0
  76. package/dist/boot/workflow-orchestration.js +2 -1
  77. package/dist/brain.js +25 -25
  78. package/dist/breaker-key.d.ts +6 -0
  79. package/dist/breaker-key.js +29 -0
  80. package/dist/budget.js +5 -4
  81. package/dist/caller-text-echo.d.ts +23 -0
  82. package/dist/caller-text-echo.js +21 -0
  83. package/dist/capabilities/brand-identity.d.ts +26 -0
  84. package/dist/capabilities/brand-identity.js +27 -0
  85. package/dist/capabilities/center-plugins.d.ts +7 -0
  86. package/dist/capabilities/center-plugins.js +1 -1
  87. package/dist/capabilities/center-prompts.d.ts +32 -59
  88. package/dist/capabilities/center-prompts.js +18 -32
  89. package/dist/capabilities/composite-members.d.ts +1 -1
  90. package/dist/capabilities/composite-members.js +1 -1
  91. package/dist/capabilities/engine-capabilities.js +2 -1
  92. package/dist/capabilities/execution-lane.js +2 -2
  93. package/dist/capabilities/hands-lane.d.ts +30 -6
  94. package/dist/capabilities/hands-lane.js +11 -1
  95. package/dist/capabilities/mcp-probe.d.ts +48 -3
  96. package/dist/capabilities/mcp-probe.js +47 -135
  97. package/dist/capabilities/scenarios.d.ts +95 -45
  98. package/dist/capabilities/scenarios.js +53 -38
  99. package/dist/capabilities/skills.d.ts +19 -4
  100. package/dist/capabilities/skills.js +30 -10
  101. package/dist/capability-facts.d.ts +34 -4
  102. package/dist/capability-facts.js +28 -2
  103. package/dist/center-config-tier.d.ts +69 -0
  104. package/dist/center-config-tier.js +42 -0
  105. package/dist/checkpoint-identity.d.ts +16 -0
  106. package/dist/checkpoint-identity.js +19 -0
  107. package/dist/config-catalog.d.ts +17 -10
  108. package/dist/config-catalog.js +47 -32
  109. package/dist/config-d-migration.d.ts +3 -1
  110. package/dist/config-d-migration.js +2 -2
  111. package/dist/config-dir-trust.d.ts +114 -0
  112. package/dist/config-dir-trust.js +388 -0
  113. package/dist/config-invariants.d.ts +18 -5
  114. package/dist/config-invariants.js +35 -3
  115. package/dist/config-lkg.d.ts +9 -9
  116. package/dist/config-lkg.js +20 -4
  117. package/dist/config-provider.d.ts +9 -2
  118. package/dist/config-provider.js +18 -6
  119. package/dist/config-types.d.ts +75 -20
  120. package/dist/config-types.js +8 -0
  121. package/dist/config.d.ts +13 -0
  122. package/dist/config.js +137 -62
  123. package/dist/delegated-session-owner.d.ts +185 -0
  124. package/dist/delegated-session-owner.js +119 -0
  125. package/dist/device-protocol.d.ts +5 -3
  126. package/dist/device-protocol.js +1 -1
  127. package/dist/device-ws-hub.js +21 -2
  128. package/dist/device-ws-protocol.d.ts +70 -6
  129. package/dist/device-ws-protocol.js +50 -22
  130. package/dist/elicitation.js +3 -2
  131. package/dist/entry-problems.d.ts +34 -0
  132. package/dist/entry-problems.js +14 -0
  133. package/dist/env-name-allowlist-knobs.d.ts +12 -2
  134. package/dist/env-name-allowlist-knobs.js +5 -4
  135. package/dist/exec-bounds.d.ts +15 -3
  136. package/dist/exec-bounds.js +4 -0
  137. package/dist/execution-lane-caps.d.ts +56 -10
  138. package/dist/execution-lane-caps.js +50 -0
  139. package/dist/field-conflict.d.ts +43 -0
  140. package/dist/field-conflict.js +20 -0
  141. package/dist/fleet/fleet-bus.d.ts +80 -6
  142. package/dist/fleet/fleet-bus.js +41 -9
  143. package/dist/hooks/classic-stations.d.ts +91 -0
  144. package/dist/hooks/classic-stations.js +27 -0
  145. package/dist/hooks/command-spawn.d.ts +57 -0
  146. package/dist/hooks/command-spawn.js +139 -0
  147. package/dist/hooks/hook-llm.d.ts +8 -5
  148. package/dist/hooks/hook-llm.js +79 -36
  149. package/dist/hooks/hook-runner.d.ts +349 -95
  150. package/dist/hooks/hook-runner.js +855 -568
  151. package/dist/hooks/hook-source.d.ts +44 -0
  152. package/dist/hooks/hook-source.js +40 -0
  153. package/dist/http/active-run-conflict.d.ts +5 -13
  154. package/dist/http/active-run-conflict.js +17 -27
  155. package/dist/http/admission.d.ts +8 -2
  156. package/dist/http/admission.js +188 -101
  157. package/dist/http/approval-sweeps.js +99 -21
  158. package/dist/http/caller-trust.d.ts +77 -0
  159. package/dist/http/caller-trust.js +143 -0
  160. package/dist/http/checkpoint-ctx.d.ts +41 -24
  161. package/dist/http/checkpoint-ctx.js +23 -16
  162. package/dist/http/claimed-run.d.ts +14 -0
  163. package/dist/http/claimed-run.js +15 -0
  164. package/dist/http/device-placement.d.ts +2 -4
  165. package/dist/http/device-placement.js +7 -11
  166. package/dist/http/dispatch.d.ts +0 -4
  167. package/dist/http/dispatch.js +15 -13
  168. package/dist/http/durable-run-leg.d.ts +6 -33
  169. package/dist/http/durable-run-leg.js +36 -10
  170. package/dist/http/health-self-report.d.ts +7 -5
  171. package/dist/http/health-self-report.js +4 -18
  172. package/dist/http/owner-access.d.ts +56 -0
  173. package/dist/http/owner-access.js +42 -0
  174. package/dist/http/principal-gate.d.ts +70 -28
  175. package/dist/http/principal-gate.js +61 -15
  176. package/dist/http/readiness.d.ts +11 -5
  177. package/dist/http/readiness.js +10 -3
  178. package/dist/http/refusal-body.d.ts +21 -0
  179. package/dist/http/refusal-body.js +4 -0
  180. package/dist/http/request-guards.d.ts +43 -23
  181. package/dist/http/request-guards.js +53 -17
  182. package/dist/http/resume-ctx-read.d.ts +2 -5
  183. package/dist/http/resume-ctx-read.js +7 -4
  184. package/dist/http/resume-legs.d.ts +28 -4
  185. package/dist/http/resume-legs.js +169 -91
  186. package/dist/http/retired-service-deps.d.ts +43 -0
  187. package/dist/http/retired-service-deps.js +18 -0
  188. package/dist/http/route-ctx.d.ts +44 -28
  189. package/dist/http/route-ctx.js +4 -0
  190. package/dist/http/route-table.js +2 -0
  191. package/dist/http/routes/a2a-serve.js +3 -4
  192. package/dist/http/routes/admin-config-refresh.js +1 -1
  193. package/dist/http/routes/admin-drain.js +1 -1
  194. package/dist/http/routes/admin-memory-optout.js +5 -1
  195. package/dist/http/routes/adoption.js +2 -9
  196. package/dist/http/routes/approvals-assistant.js +49 -48
  197. package/dist/http/routes/background.js +3 -2
  198. package/dist/http/routes/capabilities.js +21 -5
  199. package/dist/http/routes/config-catalog.d.ts +3 -3
  200. package/dist/http/routes/config-catalog.js +1 -1
  201. package/dist/http/routes/devices.js +3 -17
  202. package/dist/http/routes/diagnostics.js +6 -2
  203. package/dist/http/routes/images.js +6 -7
  204. package/dist/http/routes/leader.js +1 -8
  205. package/dist/http/routes/mcp-reconnect.d.ts +1 -1
  206. package/dist/http/routes/mcp-reconnect.js +3 -2
  207. package/dist/http/routes/memory-bundle.js +1 -1
  208. package/dist/http/routes/memory-compliance.js +1 -1
  209. package/dist/http/routes/memory-consolidation.js +1 -1
  210. package/dist/http/routes/memory-origin.js +1 -1
  211. package/dist/http/routes/memory-policy.d.ts +1 -1
  212. package/dist/http/routes/memory-policy.js +3 -2
  213. package/dist/http/routes/notify-wake.js +8 -21
  214. package/dist/http/routes/observability.js +2 -2
  215. package/dist/http/routes/principal-inbox.d.ts +39 -0
  216. package/dist/http/routes/principal-inbox.js +76 -0
  217. package/dist/http/routes/retention-ops.js +2 -9
  218. package/dist/http/routes/rules.js +5 -18
  219. package/dist/http/routes/runs.d.ts +5 -0
  220. package/dist/http/routes/runs.js +34 -107
  221. package/dist/http/routes/session-sync.js +15 -26
  222. package/dist/http/routes/sessions.js +30 -40
  223. package/dist/http/routes/shared-memory.js +2 -13
  224. package/dist/http/routes/side-query.js +8 -7
  225. package/dist/http/routes/tasks.js +67 -21
  226. package/dist/http/routes/workflows.d.ts +351 -0
  227. package/dist/http/routes/workflows.js +153 -119
  228. package/dist/http/send.d.ts +33 -10
  229. package/dist/http/send.js +21 -4
  230. package/dist/http/server.d.ts +27 -18
  231. package/dist/http/server.js +34 -6
  232. package/dist/http/stored-body-replay.js +17 -4
  233. package/dist/http/submit-ctx.d.ts +25 -0
  234. package/dist/http/submit-ctx.js +40 -0
  235. package/dist/http/submit-replay.d.ts +4 -3
  236. package/dist/http/submit-replay.js +5 -4
  237. package/dist/http/wire-types.d.ts +11 -8
  238. package/dist/index.d.ts +2 -2
  239. package/dist/index.js +1 -2
  240. package/dist/lane-home-probe.d.ts +112 -0
  241. package/dist/lane-home-probe.js +101 -0
  242. package/dist/leader/endpoint.d.ts +4 -1
  243. package/dist/leader/endpoint.js +11 -10
  244. package/dist/limit-refusal.d.ts +59 -0
  245. package/dist/limit-refusal.js +15 -0
  246. package/dist/main.js +1 -1
  247. package/dist/mcp-assertion-header.d.ts +32 -19
  248. package/dist/mcp-assertion-header.js +10 -9
  249. package/dist/mcp-tool-faces.d.ts +5 -0
  250. package/dist/mcp-tool-faces.js +6 -4
  251. package/dist/memory-project-layer.d.ts +37 -0
  252. package/dist/memory-project-layer.js +46 -0
  253. package/dist/memory-scope.d.ts +24 -17
  254. package/dist/memory-scope.js +24 -8
  255. package/dist/memory-sync-client.d.ts +27 -13
  256. package/dist/memory-sync-client.js +107 -18
  257. package/dist/model-entry-refusal.d.ts +9 -1
  258. package/dist/model-entry-refusal.js +6 -1
  259. package/dist/model-plane-face.d.ts +51 -0
  260. package/dist/model-plane-face.js +24 -0
  261. package/dist/model-provider.d.ts +44 -12
  262. package/dist/model-provider.js +21 -2
  263. package/dist/model-route-endpoint.d.ts +9 -12
  264. package/dist/model-route-endpoint.js +8 -11
  265. package/dist/model-route-env.d.ts +22 -0
  266. package/dist/model-route-env.js +2 -0
  267. package/dist/model-route-gap.d.ts +60 -30
  268. package/dist/model-route-gap.js +21 -15
  269. package/dist/observability/corrupt-read-seat.d.ts +7 -0
  270. package/dist/observability/corrupt-read-seat.js +9 -0
  271. package/dist/observability/cost-taxonomy.d.ts +7 -7
  272. package/dist/observability/err-text.d.ts +6 -0
  273. package/dist/observability/err-text.js +18 -4
  274. package/dist/observability/fail-open.d.ts +76 -14
  275. package/dist/observability/fail-open.js +76 -14
  276. package/dist/observability/metrics.js +4 -1
  277. package/dist/observability/prompt-manifest.d.ts +33 -82
  278. package/dist/observability/prompt-manifest.js +122 -17
  279. package/dist/observability/run-terminal.js +14 -6
  280. package/dist/observability/secret-env-scrub.d.ts +13 -1
  281. package/dist/observability/secret-env-scrub.js +13 -1
  282. package/dist/observability/tool-trace.d.ts +16 -21
  283. package/dist/observability/tool-trace.js +58 -49
  284. package/dist/operator-ask.d.ts +10 -0
  285. package/dist/operator-ask.js +3 -0
  286. package/dist/orchestration/workflow-agent-session-index.d.ts +12 -12
  287. package/dist/orchestration/workflow-agent-session-index.js +9 -13
  288. package/dist/orchestration/workflow-completion-inbox.d.ts +42 -15
  289. package/dist/orchestration/workflow-completion-inbox.js +13 -0
  290. package/dist/orchestration/workflow-notify-journal.d.ts +13 -32
  291. package/dist/orchestration/workflow-notify-journal.js +27 -34
  292. package/dist/orchestration/workflow-park-decision.d.ts +89 -0
  293. package/dist/orchestration/workflow-park-decision.js +118 -0
  294. package/dist/org-delivery-gate.d.ts +81 -0
  295. package/dist/org-delivery-gate.js +59 -0
  296. package/dist/panel-tool-names.d.ts +23 -0
  297. package/dist/panel-tool-names.js +8 -0
  298. package/dist/parked-decide.d.ts +39 -6
  299. package/dist/parked-decide.js +98 -51
  300. package/dist/parked-revive-surface.d.ts +9 -2
  301. package/dist/parked-revive-surface.js +11 -8
  302. package/dist/per-task-image.d.ts +7 -1
  303. package/dist/per-task-image.js +3 -3
  304. package/dist/permission-rule-list.d.ts +1 -1
  305. package/dist/permission-rule-list.js +2 -2
  306. package/dist/plain-string-record.d.ts +25 -0
  307. package/dist/plain-string-record.js +32 -0
  308. package/dist/plugins/approval-ask-store-file.d.ts +16 -1
  309. package/dist/plugins/approval-ask-store-file.js +21 -0
  310. package/dist/plugins/approval-ask-store-memory.d.ts +18 -1
  311. package/dist/plugins/approval-ask-store-memory.js +34 -2
  312. package/dist/plugins/approval-ask-store-sql.d.ts +25 -0
  313. package/dist/plugins/approval-ask-store-sql.js +37 -1
  314. package/dist/plugins/blob-backend.d.ts +83 -15
  315. package/dist/plugins/blob-backend.js +68 -15
  316. package/dist/plugins/breaker-state-sql.d.ts +2 -2
  317. package/dist/plugins/breaker-state-sql.js +4 -4
  318. package/dist/plugins/caching-session-store.d.ts +3 -0
  319. package/dist/plugins/caching-session-store.js +3 -0
  320. package/dist/plugins/checkpoint-store-sql.d.ts +28 -4
  321. package/dist/plugins/checkpoint-store-sql.js +59 -28
  322. package/dist/plugins/file-history-store-sql.d.ts +5 -2
  323. package/dist/plugins/file-history-store-sql.js +3 -1
  324. package/dist/plugins/file-run-store.d.ts +5 -13
  325. package/dist/plugins/file-run-store.js +9 -0
  326. package/dist/plugins/fork-routing-session-store.d.ts +9 -1
  327. package/dist/plugins/fork-routing-session-store.js +12 -1
  328. package/dist/plugins/host-platform.d.ts +2 -0
  329. package/dist/plugins/host-platform.js +2 -1
  330. package/dist/plugins/k8s-bg-scripts.d.ts +11 -0
  331. package/dist/plugins/k8s-bg-scripts.js +22 -0
  332. package/dist/plugins/local-checkpoint-store.d.ts +2 -0
  333. package/dist/plugins/local-checkpoint-store.js +11 -3
  334. package/dist/plugins/local-session-store.d.ts +1 -1
  335. package/dist/plugins/local-session-store.js +1 -1
  336. package/dist/plugins/local-session-window.d.ts +39 -0
  337. package/dist/plugins/local-session-window.js +54 -0
  338. package/dist/plugins/mailbox-recipient-lifecycle.d.ts +3 -2
  339. package/dist/plugins/mailbox-store-sql.d.ts +30 -48
  340. package/dist/plugins/mailbox-store-sql.js +77 -52
  341. package/dist/plugins/memory-embedder-fingerprint.js +2 -1
  342. package/dist/plugins/memory-run-store.d.ts +5 -13
  343. package/dist/plugins/memory-run-store.js +8 -0
  344. package/dist/plugins/one-time-migrations.d.ts +245 -93
  345. package/dist/plugins/one-time-migrations.js +668 -207
  346. package/dist/plugins/org-delivery-quota-store.d.ts +123 -0
  347. package/dist/plugins/org-delivery-quota-store.js +228 -0
  348. package/dist/plugins/permission-rule-store-sql.d.ts +13 -7
  349. package/dist/plugins/permission-rule-store-sql.js +4 -18
  350. package/dist/plugins/pg-pool.js +39 -7
  351. package/dist/plugins/pg-session-storage.d.ts +20 -8
  352. package/dist/plugins/pg-session-storage.js +34 -21
  353. package/dist/plugins/remote-env-adb.d.ts +12 -12
  354. package/dist/plugins/remote-env-adb.js +21 -6
  355. package/dist/plugins/remote-env-device.js +3 -0
  356. package/dist/plugins/remote-env-e2b.d.ts +1 -1
  357. package/dist/plugins/remote-env-e2b.js +21 -9
  358. package/dist/plugins/remote-env-host.d.ts +9 -9
  359. package/dist/plugins/remote-env-host.js +10 -32
  360. package/dist/plugins/remote-env-k8s.d.ts +103 -38
  361. package/dist/plugins/remote-env-k8s.js +288 -95
  362. package/dist/plugins/remote-env-local-docker.d.ts +27 -13
  363. package/dist/plugins/remote-env-local-docker.js +82 -11
  364. package/dist/plugins/remote-env-ssh.d.ts +21 -12
  365. package/dist/plugins/remote-env-ssh.js +117 -5
  366. package/dist/plugins/remote-shell.d.ts +0 -1
  367. package/dist/plugins/remote-shell.js +1 -2
  368. package/dist/plugins/retention-store-sql.js +6 -2
  369. package/dist/plugins/run-store-sql.d.ts +16 -14
  370. package/dist/plugins/run-store-sql.js +22 -2
  371. package/dist/plugins/schema-consistency.d.ts +54 -0
  372. package/dist/plugins/schema-consistency.js +52 -0
  373. package/dist/plugins/schema-indexes.js +2 -0
  374. package/dist/plugins/send-user-file.js +2 -2
  375. package/dist/plugins/session-epoch-anchor.d.ts +39 -0
  376. package/dist/plugins/session-epoch-anchor.js +22 -0
  377. package/dist/plugins/session-store.d.ts +18 -8
  378. package/dist/plugins/session-store.js +15 -4
  379. package/dist/plugins/shared-memory-store-sql.d.ts +9 -3
  380. package/dist/plugins/shared-memory-store-sql.js +5 -16
  381. package/dist/plugins/sql-driver.d.ts +205 -1
  382. package/dist/plugins/sql-driver.js +325 -13
  383. package/dist/plugins/sql-errors.d.ts +64 -0
  384. package/dist/plugins/sql-errors.js +57 -0
  385. package/dist/plugins/store-backend.d.ts +36 -1
  386. package/dist/plugins/store-backend.js +42 -15
  387. package/dist/plugins/store-contracts.d.ts +42 -0
  388. package/dist/plugins/store-contracts.js +1 -0
  389. package/dist/plugins/tidb-pool.d.ts +6 -1
  390. package/dist/plugins/tidb-pool.js +44 -10
  391. package/dist/plugins/tidb-session-storage.d.ts +8 -11
  392. package/dist/plugins/tidb-session-storage.js +6 -16
  393. package/dist/plugins/tidb-session-store.d.ts +24 -4
  394. package/dist/plugins/tidb-session-store.js +29 -5
  395. package/dist/plugins/workflow-journal-store-sql.d.ts +73 -19
  396. package/dist/plugins/workflow-journal-store-sql.js +19 -6
  397. package/dist/plugins/workflow-run-store-sql.d.ts +30 -8
  398. package/dist/plugins/workflow-run-store-sql.js +50 -9
  399. package/dist/posture-source.d.ts +18 -10
  400. package/dist/posture-source.js +4 -1
  401. package/dist/project-identity.d.ts +45 -6
  402. package/dist/project-identity.js +162 -8
  403. package/dist/project-layer-key.d.ts +28 -0
  404. package/dist/project-layer-key.js +29 -0
  405. package/dist/prompts-domain-validate.d.ts +17 -61
  406. package/dist/prompts-domain-validate.js +9 -119
  407. package/dist/question.js +3 -2
  408. package/dist/read-deny-entry.d.ts +25 -0
  409. package/dist/read-deny-entry.js +12 -0
  410. package/dist/read-face-posture.d.ts +37 -11
  411. package/dist/read-face-posture.js +32 -3
  412. package/dist/request-key-closure.d.ts +9 -2
  413. package/dist/request-key-closure.js +11 -5
  414. package/dist/request-value-closure.d.ts +5 -0
  415. package/dist/request-value-closure.js +11 -3
  416. package/dist/rule-entry-list.d.ts +38 -11
  417. package/dist/rule-entry-list.js +106 -30
  418. package/dist/rules-consent.js +3 -4
  419. package/dist/run-acceptance.d.ts +19 -3
  420. package/dist/run-acceptance.js +13 -1
  421. package/dist/run-local.js +54 -24
  422. package/dist/runs.d.ts +15 -8
  423. package/dist/runs.js +35 -1
  424. package/dist/runtime-caps-resolver.d.ts +16 -6
  425. package/dist/runtime-caps-resolver.js +18 -5
  426. package/dist/sandbox-pkg-source.d.ts +19 -1
  427. package/dist/sandbox-pkg-source.js +29 -7
  428. package/dist/security.d.ts +87 -9
  429. package/dist/security.js +52 -9
  430. package/dist/server-secret-env.d.ts +44 -18
  431. package/dist/server-secret-env.js +49 -8
  432. package/dist/session-error-wire.d.ts +19 -2
  433. package/dist/session-error-wire.js +5 -1
  434. package/dist/session-incarnation.d.ts +15 -5
  435. package/dist/session-incarnation.js +16 -9
  436. package/dist/session-titled-frame.d.ts +33 -0
  437. package/dist/session-titled-frame.js +4 -0
  438. package/dist/session-titler.d.ts +9 -1
  439. package/dist/session-titler.js +27 -6
  440. package/dist/spec-fields.d.ts +28 -16
  441. package/dist/spec-fields.js +66 -54
  442. package/dist/sql-engine-posture.d.ts +31 -4
  443. package/dist/sql-engine-posture.js +36 -1
  444. package/dist/stored-request-tool-axes-m19.d.ts +19 -4
  445. package/dist/stored-request-tool-axes-m19.js +30 -2
  446. package/dist/task-a2a.d.ts +9 -1
  447. package/dist/task-a2a.js +73 -47
  448. package/dist/task-cwd.d.ts +1 -1
  449. package/dist/task-mcp.d.ts +46 -58
  450. package/dist/task-mcp.js +82 -107
  451. package/dist/task-settings.d.ts +95 -108
  452. package/dist/task-settings.js +77 -98
  453. package/dist/text-bidi.d.ts +1 -48
  454. package/dist/text-bidi.js +3 -5
  455. package/dist/tighten-only-seats.d.ts +150 -0
  456. package/dist/tighten-only-seats.js +196 -0
  457. package/dist/tool-approval.d.ts +304 -88
  458. package/dist/tool-approval.js +623 -239
  459. package/dist/trace/core-keyset-guard.d.ts +122 -20
  460. package/dist/trace/engine-notice-wire.d.ts +11 -3
  461. package/dist/trace/engine-notice-wire.js +8 -1
  462. package/dist/trace/exit-seat.d.ts +28 -0
  463. package/dist/trace/exit-seat.js +76 -0
  464. package/dist/trace/ledger-events.d.ts +6 -3
  465. package/dist/trace/ledger-sink.js +4 -1
  466. package/dist/trace/model-segment.js +1 -1
  467. package/dist/trace/project.d.ts +98 -17
  468. package/dist/trace/project.js +98 -50
  469. package/dist/trace/projection-table.d.ts +100 -0
  470. package/dist/trace/projection-table.js +130 -0
  471. package/dist/trace/redact.d.ts +54 -0
  472. package/dist/trace/redact.js +778 -152
  473. package/dist/trace/self-minted-wire.d.ts +345 -1
  474. package/dist/trace/self-minted-wire.js +117 -1
  475. package/dist/trace/wire-projection-faces.d.ts +377 -3
  476. package/dist/trace/wire-projection-faces.js +164 -1
  477. package/dist/url-refusal.js +2 -0
  478. package/dist/web-admin-client/apply-effective.d.ts +12 -0
  479. package/dist/web-admin-client/apply-effective.js +56 -5
  480. package/dist/web-admin-client/candidate-gate.d.ts +6 -6
  481. package/dist/web-admin-client/candidate-gate.js +3 -3
  482. package/dist/web-admin-client/facade.d.ts +1 -1
  483. package/dist/web-admin-client/facade.js +1 -1
  484. package/dist/web-admin-client/http-client.js +0 -6
  485. package/dist/web-admin-client/read-face.js +5 -9
  486. package/dist/web-admin-client/read-warnings.d.ts +13 -0
  487. package/dist/web-admin-client/read-warnings.js +10 -0
  488. package/dist/web-admin-client/skills-mcp.d.ts +3 -0
  489. package/dist/web-admin-client/skills-mcp.js +11 -9
  490. package/dist/web-admin-client/types.d.ts +2 -3
  491. package/dist/workspace-cache.d.ts +35 -0
  492. package/dist/workspace-cache.js +36 -0
  493. package/dist/workspace-space.d.ts +3 -2
  494. package/dist/workspace-space.js +2 -0
  495. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +65 -10
  496. package/package.json +8 -4
  497. package/scripts/drain-check-local.mjs +34 -1
  498. package/scripts/drain-check.mysql.sql +30 -2
  499. package/scripts/drain-check.pg.sql +29 -2
  500. package/dist/capabilities/memory-notice.d.ts +0 -138
  501. package/dist/capabilities/memory-notice.js +0 -64
  502. package/dist/capabilities/prompt.d.ts +0 -17
  503. package/dist/capabilities/prompt.js +0 -6
  504. package/dist/mcp-content-origin.d.ts +0 -34
  505. package/dist/mcp-content-origin.js +0 -10
  506. package/dist/tool-axis-words.d.ts +0 -27
  507. package/dist/tool-axis-words.js +0 -9
  508. package/dist/wire-name-bound.d.ts +0 -14
  509. package/dist/wire-name-bound.js +0 -13
package/dist/brain.js CHANGED
@@ -4,11 +4,12 @@ import { buildDefaultResilience } from "./config-types.js";
4
4
  import { resolveModelApiKey } from "./key-resolver.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { isModelKeyPoison, modelKeyPoisonIdentity } from "./key-resolver.js";
7
- import { dispatchBrainLane } from "./model-provider.js";
7
+ import { anthropicRouteRoot, brainLaneFor, mountRoutes, routeTableOf } from "./model-provider.js";
8
8
  import { openaiRouteBaseUrl } from "./model-route-endpoint.js";
9
9
  import { catalogEntryFingerprint } from "./web-admin-client/restart-signal.js";
10
10
  import { buildDisplaySafeRefusal, buildDisplaySafeUrl } from "./trace/redact.js";
11
11
  import { createModelReachBrain } from "./model-unreachable-notice.js";
12
+ import { breakerKeyOf, routeDigestOf } from "./breaker-key.js";
12
13
  function isOffDeploymentRoot(baseUrl, config) {
13
14
  if (!baseUrl)
14
15
  return false;
@@ -20,6 +21,9 @@ function isOffDeploymentRoot(baseUrl, config) {
20
21
  function deploymentGatewayRoots(config) {
21
22
  return config.gatewayBaseUrl !== undefined ? [config.gatewayBaseUrl, ...config.gatewayFallbackUrls] : [];
22
23
  }
24
+ function breakerRoutesOf(config, r) {
25
+ return r.circuitBreaker ? deploymentGatewayRoots(config).slice(0, -1) : [];
26
+ }
23
27
  function deploymentGatewayKey(config) {
24
28
  return config.gatewayBaseUrl !== undefined ? config.gatewayApiKey : undefined;
25
29
  }
@@ -53,6 +57,7 @@ export function createBrainAssembly(config, deps = {}) {
53
57
  ? { maxRetries: FAST_FAIL_MAX_RETRIES }
54
58
  : {};
55
59
  const routes = deploymentGatewayRoots(config);
60
+ const breakerRoutes = breakerRoutesOf(config, r);
56
61
  const openaiBrains = routes.map((baseUrl, i) => {
57
62
  const gatewayKey = deploymentGatewayKey(config);
58
63
  const brain = constructRouteBrain(i === 0 ? "gateway route" : `gateway fallback route[${i - 1}]`, [baseUrl], () => createOpenAIBrain({
@@ -62,13 +67,12 @@ export function createBrainAssembly(config, deps = {}) {
62
67
  fetchImpl,
63
68
  ...timeouts,
64
69
  }));
65
- const isLast = i === routes.length - 1;
66
- return r.circuitBreaker && !isLast
70
+ return i < breakerRoutes.length
67
71
  ? createCircuitBreakerBrain(brain, {
68
72
  failureThreshold: r.failureThreshold,
69
73
  cooldownMs: r.cooldownMs,
70
74
  state: breakerState,
71
- key: (m) => `${m.provider ?? "openai"}:${m.id}@${baseUrl}`,
75
+ key: (m) => breakerKeyOf(m, baseUrl),
72
76
  })
73
77
  : brain;
74
78
  });
@@ -77,23 +81,18 @@ export function createBrainAssembly(config, deps = {}) {
77
81
  : openaiBrains.length > 1
78
82
  ? createFailoverBrain(openaiBrains)
79
83
  : openaiBrains[0];
80
- const anthropicCfg = config.anthropic;
81
- const anthropicBrain = anthropicCfg
82
- ? constructRouteBrain("anthropic route", [anthropicCfg.baseUrl], () => createAnthropicBrain({
83
- ...(anthropicCfg.authToken
84
- ? { headers: { Authorization: `Bearer ${anthropicCfg.authToken}` } }
85
- : { apiKey: anthropicCfg.apiKey }),
86
- baseUrl: anthropicCfg.baseUrl ?? "https://api.anthropic.com",
87
- version: anthropicCfg.version,
88
- cacheBreakpoints: anthropicCfg.cacheBreakpoints,
89
- ...(anthropicCfg.maxRetries !== undefined ? { maxRetries: anthropicCfg.maxRetries } : {}),
90
- fetchImpl,
91
- ...timeouts,
92
- }))
93
- : undefined;
94
- let brain = anthropicBrain
95
- ? createRoutingBrain({ anthropic: anthropicBrain }, { fallback: gatewayBrain })
96
- : gatewayBrain;
84
+ const brainRoutes = mountRoutes(config, (anthropicCfg) => constructRouteBrain("anthropic route", [anthropicCfg.baseUrl], () => createAnthropicBrain({
85
+ ...(anthropicCfg.authToken
86
+ ? { headers: { Authorization: `Bearer ${anthropicCfg.authToken}` } }
87
+ : { apiKey: anthropicCfg.apiKey }),
88
+ baseUrl: anthropicRouteRoot(anthropicCfg),
89
+ version: anthropicCfg.version,
90
+ cacheBreakpoints: anthropicCfg.cacheBreakpoints,
91
+ ...(anthropicCfg.maxRetries !== undefined ? { maxRetries: anthropicCfg.maxRetries } : {}),
92
+ fetchImpl,
93
+ ...timeouts,
94
+ })));
95
+ let brain = Object.keys(brainRoutes).length > 0 ? createRoutingBrain(brainRoutes, { fallback: gatewayBrain }) : gatewayBrain;
97
96
  let degradeBaked = null;
98
97
  if (config.degrade?.reactive) {
99
98
  const degradeTo = config.degrade.to;
@@ -104,12 +103,12 @@ export function createBrainAssembly(config, deps = {}) {
104
103
  const ownEnvRef = credential.apiKeyEnv !== undefined ? { [fallbackModel.name]: credential.apiKeyEnv } : {};
105
104
  const ownSealed = credential.sealed !== undefined ? { [fallbackModel.name]: credential.sealed } : {};
106
105
  const fbOwnApiKey = () => resolveModelApiKey(fallbackModel.name, ownEnvRef, process.env, ownSealed);
107
- const anthropicLaneHop = dispatchBrainLane(fallbackModel.provider, anthropicBrain !== undefined) === "anthropic";
106
+ const anthropicLaneHop = brainLaneFor(fallbackModel.provider, brainRoutes) === "anthropic";
108
107
  const fbDeclaredRoot = degradeDeclaredRoot(fallbackModel.baseUrl, config);
109
108
  const fbDeploymentKey = deploymentGatewayKey(config);
110
- const fallback = anthropicLaneHop && anthropicBrain
109
+ const fallback = anthropicLaneHop
111
110
  ?
112
- anthropicBrain
111
+ brainRoutes.anthropic
113
112
  : constructRouteBrain(`degrade target "${degradeTo}"`, [fallbackModel.baseUrl, config.gatewayBaseUrl], () => createOpenAIBrain({
114
113
  ...(fbDeclaredRoot !== undefined ? { baseUrl: fbDeclaredRoot } : {}),
115
114
  ...(fbDeploymentKey ? { apiKey: fbDeploymentKey } : {}),
@@ -211,6 +210,7 @@ export function brainSummary(config) {
211
210
  idleTimeoutMs: r.idleTimeoutMs,
212
211
  circuitBreaker: breakerActive,
213
212
  circuitBreakerRequested: r.circuitBreaker,
213
+ circuitBreakerRoutes: breakerRoutesOf(config, r).map((u) => ({ route: buildDisplaySafeUrl(u), digest: routeDigestOf(u) })),
214
214
  gatewayRetryCap: config.gatewayMaxRetries !== undefined
215
215
  ? `env:${config.gatewayMaxRetries}`
216
216
  : hasFailover || r.circuitBreaker || config.degrade?.reactive
@@ -223,7 +223,7 @@ export function brainSummary(config) {
223
223
  const target = degradeTarget;
224
224
  if (!target)
225
225
  return { reactiveDegradeRoutePairing: null, reactiveDegradeRouteRefusal: null };
226
- if (dispatchBrainLane(target.provider, config.anthropic !== undefined) === "anthropic") {
226
+ if (brainLaneFor(target.provider, routeTableOf(config)) === "anthropic") {
227
227
  return { reactiveDegradeRoutePairing: "anthropic-lane", reactiveDegradeRouteRefusal: null };
228
228
  }
229
229
  const credential = degradeCredentialIdentityOf(config, target);
@@ -0,0 +1,6 @@
1
+ import { type Model } from "@sema-agent/core";
2
+ /** 一条路由的身份摘要(键的路由段;启动日志把它与该路由的展示串并排印出,运维据此把错误文本 / 表行对回路由)。 */
3
+ export declare function routeDigestOf(baseUrl: string): string;
4
+ /** 断路器键:`<头段>@<路由摘要>`,头段 = `<provider>:<model id>`(放不下列宽预算时见 {@link boundedHead})。provider 缺席按 `openai`(与 core 默认键同一个前半)。恒 ≤ 190 字节。 */
5
+ export declare function breakerKeyOf(model: Pick<Model, "provider" | "id">, baseUrl: string): string;
6
+ //# sourceMappingURL=breaker-key.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { createHash } from "node:crypto";
2
+ import { routeKeyOf } from "@sema-agent/core";
3
+ const ROUTE_DIGEST_HEX = 24;
4
+ const BREAKER_KEY_MAX_BYTES = 190;
5
+ const HEAD_MAX_BYTES = BREAKER_KEY_MAX_BYTES - 1 - ROUTE_DIGEST_HEX;
6
+ const HEAD_DIGEST_HEX = 16;
7
+ const sha256Hex = (text) => createHash("sha256").update(text, "utf8").digest("hex");
8
+ export function routeDigestOf(baseUrl) {
9
+ return sha256Hex(routeKeyOf(baseUrl)).slice(0, ROUTE_DIGEST_HEX);
10
+ }
11
+ export function breakerKeyOf(model, baseUrl) {
12
+ return `${boundedHead(`${model.provider ?? "openai"}:${model.id}`)}@${routeDigestOf(baseUrl)}`;
13
+ }
14
+ function boundedHead(head) {
15
+ if (Buffer.byteLength(head, "utf8") <= HEAD_MAX_BYTES)
16
+ return head;
17
+ const tail = `~${sha256Hex(head).slice(0, HEAD_DIGEST_HEX)}`;
18
+ let prefix = "";
19
+ let used = 0;
20
+ for (const ch of head) {
21
+ const n = Buffer.byteLength(ch, "utf8");
22
+ if (used + n > HEAD_MAX_BYTES - tail.length)
23
+ break;
24
+ prefix += ch;
25
+ used += n;
26
+ }
27
+ return `${prefix}${tail}`;
28
+ }
29
+ //# sourceMappingURL=breaker-key.js.map
package/dist/budget.js CHANGED
@@ -93,9 +93,11 @@ export function createTracer(metrics, costQuota, modelUsage, fleetUsage, fleetLe
93
93
  const weightedTokens = Math.round((e.totalInputTokens + e.completionTokens) * qw);
94
94
  fleetUsage?.record(currentPrincipal(), e.model, e.taskId, { inputTokens: e.totalInputTokens, outputTokens: e.completionTokens, ...(e.costMicroUsd !== undefined ? { costMicroUsd: e.costMicroUsd } : {}), weightedTokens, quotaWeightAtUse: qw });
95
95
  fleetLease?.recordSpend(currentPrincipal(), { weightedTokens, ...(e.costMicroUsd !== undefined ? { costMicroUsd: e.costMicroUsd } : {}) });
96
- if (e.firstTokenMs !== undefined)
97
- metrics.observe("brain_first_token_ms", e.firstTokenMs);
98
- metrics.observe("brain_call_latency_ms", e.latencyMs);
96
+ if (e.turn !== undefined) {
97
+ if (e.firstTokenMs !== undefined)
98
+ metrics.observe("brain_first_token_ms", e.firstTokenMs);
99
+ metrics.observe("brain_call_latency_ms", e.latencyMs);
100
+ }
99
101
  }
100
102
  else if (e.kind === "tool.call") {
101
103
  metrics.inc("tool_calls_total", { name: toolName(e.name), ok: String(e.ok) });
@@ -107,7 +109,6 @@ export function createTracer(metrics, costQuota, modelUsage, fleetUsage, fleetLe
107
109
  metrics.inc("degraded_total", { reason: e.reason });
108
110
  }
109
111
  else if (e.kind === "prompt.assembled") {
110
- metrics.inc("prompt_constitution_total", { mode: e.constitution });
111
112
  promptManifests?.record(e.taskId, promptManifestRecordOf(e));
112
113
  }
113
114
  else if (e.kind === "config.assembled") {
@@ -0,0 +1,23 @@
1
+ /** 回显的字符上限(剥完控制与双向字符之后数)。 */
2
+ export declare const CALLER_TEXT_ECHO_MAX_CHARS = 64;
3
+ /** 站点给的回显选项。 */
4
+ export interface EchoCallerTextOptions {
5
+ /** 回显的字符上限(剥完控制与双向字符之后数);不给 = {@link CALLER_TEXT_ECHO_MAX_CHARS}。必须是正整数,否则抛 `RangeError`(编程错误,不静默落成某个长度)。 */
6
+ readonly maxChars?: number;
7
+ }
8
+ /** 调用方写的串的回显形(不带引号):剥控制与双向字符 → 截到 `maxChars`(缺省 {@link CALLER_TEXT_ECHO_MAX_CHARS})字 + 「…」。 */
9
+ export declare function echoCallerText(text: string, opts?: EchoCallerTextOptions): string;
10
+ /** 句子里点名一个值的写法:{@link echoCallerText} 外加一对双引号。 */
11
+ export declare function quotedCallerText(text: string): string;
12
+ /**
13
+ * 数据截断(**不是**回显):前 `max` 字 + `…(总长)`;不超则原样。给喂回模型 / 交给 hook 的**数据**用 —— 读的一方(模型、hook 作者)看得出被截、截掉多少。
14
+ * 不剥控制与双向字符:数据要原样(exit 2 的多行 stderr 保行)。写进日志字段 / 回到人面前的串**不用**它,用 {@link echoCallerText}。
15
+ */
16
+ export declare function clipDataText(s: string, max: number): string;
17
+ /**
18
+ * 硬帽:前 `max` 字,什么也不加;不超则原样,缺席(`undefined`)透传。给带 schema `.max()` 的 wire 字段用(审批卡:整只 ask 不能因为一个 200 KB 的字段落不了库)——
19
+ * 截断记号会让串超过 schema 的上限,所以这里没有记号;也不剥控制与双向字符(卡上的串是要被人审的那一串,清洗会让「看到的」与「将执行的」不是同一个东西)。
20
+ */
21
+ export declare function capText(s: string, max: number): string;
22
+ export declare function capText(s: string | undefined, max: number): string | undefined;
23
+ //# sourceMappingURL=caller-text-echo.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { stripControlAndBidi } from "@sema-agent/settings-schema";
2
+ export const CALLER_TEXT_ECHO_MAX_CHARS = 64;
3
+ export function echoCallerText(text, opts) {
4
+ const max = opts?.maxChars ?? CALLER_TEXT_ECHO_MAX_CHARS;
5
+ if (!Number.isInteger(max) || max < 1)
6
+ throw new RangeError(`echoCallerText: maxChars must be a positive integer, got ${String(max)}`);
7
+ const clean = stripControlAndBidi(text);
8
+ return clean.length > max ? `${clean.slice(0, max)}…` : clean;
9
+ }
10
+ export function quotedCallerText(text) {
11
+ return `"${echoCallerText(text)}"`;
12
+ }
13
+ export function clipDataText(s, max) {
14
+ return s.length > max ? `${s.slice(0, max)}…(${s.length})` : s;
15
+ }
16
+ export function capText(s, max) {
17
+ if (s === undefined)
18
+ return undefined;
19
+ return s.length > max ? s.slice(0, max) : s;
20
+ }
21
+ //# sourceMappingURL=caller-text-echo.js.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 品牌行(`SEMA_IDENTITY`)—— 品牌部署(local / TOC:`CONFIG_PROVIDER=local`、`run-local`)的 `default` / `code` 两场景,模型的 role 层以它开头。
3
+ *
4
+ * 律:品牌行是**部署类的一条 overlay**,不是每请求的分叉。部署座(`RunnerDeps.mods`)上一张 `prompt.compose` 注册,恒答同一条 overlay ——
5
+ * `add` 到 `role` 档(部署类的 add rank 99,排在目录的角色基底 `core/role.base` rank 100 之前),带 `when`:
6
+ * · `binding.anyOf: ["default", "code"]` —— 场景名由 `buildPromptSeats` 写进 `TaskSpec.promptBinding`(恒写);`code-review` / `scan` 与中心声明的场景
7
+ * 不在表里 ⇒ 不挂(它们与 `default` 同为 `general` 角色,`host.role` 分不开,只有 binding 分得开);
8
+ * · `facts.isSubagent: false` —— 委派子代(Agent 工具 / workflow 腿)经父 spec 座继承 binding,但它拿的是子代角色(引擎 sub-agent persona 或定义的
9
+ * systemPrompt),品牌行只属于与用户对话的那一腿(与 7.131.0 同:场景的提示从来不进子代)。
10
+ * 判它挂不挂的只有引擎一处(`whenHolds`,每一类 overlay 同一只);本服务不读 `e.selectors`,不写任何每请求的分支。
11
+ * 文本只在 `prompts/identity.ts` 一处(本模块不复述);「这台部署是不是品牌部署」只有一只判官 {@link isBrandedDeployment} —— HTTP 服务的三个读者
12
+ * (部署座的品牌行 `createDeploymentMods`、commit 尾注署名、场景详情读面的 `promptSummary`)同调它;本地 CLI(`run-local`)恒是品牌形,直接表态 `true`。
13
+ */
14
+ import type { EngineDollar, ModRegistration, PromptOverlay } from "@sema-agent/core";
15
+ import type { ServiceConfig } from "../config-types.js";
16
+ /** 🔴 **品牌部署的唯一判官**:local 配置源(`CONFIG_PROVIDER=local`,TOC / Sema 产品线)⇒ 品牌部署。读者见本模块头注;再多一个读者也调它,不各写一遍。 */
17
+ export declare function isBrandedDeployment(config: Pick<ServiceConfig, "configProvider">): boolean;
18
+ /** 注册名(admission / 清单 / `superseded` 归因里的那个名字)。 */
19
+ export declare const BRAND_IDENTITY_REGISTRATION = "server.brand-identity";
20
+ /** 品牌行挂的场景(binding 表)。 */
21
+ export declare const BRAND_IDENTITY_SCENARIOS: readonly ["default", "code"];
22
+ /** 那一条 overlay(数据;注册恒答它)。 */
23
+ export declare const BRAND_IDENTITY_OVERLAY: PromptOverlay;
24
+ /** 品牌行的部署注册:`prompt.compose` 是收集型站点 —— 先 `await next(e)`,原样保留它交回的 overlays,再接上自己的一条。 */
25
+ export declare function createBrandIdentityRegistration(): ModRegistration<EngineDollar>;
26
+ //# sourceMappingURL=brand-identity.d.ts.map
@@ -0,0 +1,27 @@
1
+ import { SEMA_IDENTITY } from "./prompts/identity.js";
2
+ export function isBrandedDeployment(config) {
3
+ return config.configProvider === "local";
4
+ }
5
+ export const BRAND_IDENTITY_REGISTRATION = "server.brand-identity";
6
+ export const BRAND_IDENTITY_SCENARIOS = ["default", "code"];
7
+ export const BRAND_IDENTITY_OVERLAY = {
8
+ id: "sema/identity",
9
+ op: "add",
10
+ target: "role",
11
+ text: SEMA_IDENTITY,
12
+ when: { binding: { anyOf: [...BRAND_IDENTITY_SCENARIOS] }, facts: { isSubagent: false } },
13
+ };
14
+ export function createBrandIdentityRegistration() {
15
+ return {
16
+ name: BRAND_IDENTITY_REGISTRATION,
17
+ tier: "prepend",
18
+ uses: { events: ["prompt.compose"], calls: [] },
19
+ register(on) {
20
+ on("prompt.compose", async (_$, e, next) => {
21
+ const lower = (await next(e))?.overlays;
22
+ return { overlays: [...(Array.isArray(lower) ? lower : []), BRAND_IDENTITY_OVERLAY] };
23
+ });
24
+ },
25
+ };
26
+ }
27
+ //# sourceMappingURL=brand-identity.js.map
@@ -104,6 +104,13 @@ export declare function applyCenterPlugins(baseline: LoadedSkill[], eff: {
104
104
  }, opts: {
105
105
  cacheRoot: string;
106
106
  allowHosts: readonly string[];
107
+ /**
108
+ * S-379 —— 「**工具跑的那台机器**的盘就是本进程这台盘吗」,由**组合根**算好传入(`boot/web-admin.ts` 传 `toolsRunOnThisHost(config)`,与出厂自扫
109
+ * `loadDeploymentSkills` 读的是同一只函数 —— 判据属主在 `task-cwd.ts`,这里不第二次判车道、不 import 车道词)。真 ⇒ 目录形 plugin 技能带上自己的
110
+ * 目录(`SkillSpec.baseDir`:`Skill` 结果首行 + `${SKILL_ROOT}` 替换);假 ⇒ 不带(fail-closed:沙箱 / 远端车道上这条路径在工具那边不存在)。
111
+ * 🔴 **必填,不给缺省**:修前这个调用点手上根本没有这一事实,fail-closed 默认把 host 车道也一并挡成「永不带」而没有任何红 —— 必填让「漏传」是编译错。
112
+ */
113
+ toolsShareThisFilesystem: boolean;
107
114
  logger?: Logger;
108
115
  /** 测试口:跳过 validate(materialize 只接受已验声明;真 git 腿用本地 bare repo,validate 层的
109
116
  * https-only 单独测——两层分开,谁也不掩护谁)。生产恒 false/缺席。 */
@@ -196,7 +196,7 @@ export async function applyCenterPlugins(baseline, eff, opts) {
196
196
  }
197
197
  if (!rootCheck.dir)
198
198
  continue;
199
- const loaded = loadSkills(rootCheck.dir, { confineTo: liveDir });
199
+ const loaded = loadSkills(rootCheck.dir, { confineTo: liveDir, toolsShareThisFilesystem: opts.toolsShareThisFilesystem, ...(opts.logger !== undefined ? { logger: opts.logger } : {}) });
200
200
  for (const skill of loaded) {
201
201
  if (taken.has(skill.spec.name)) {
202
202
  out.letGo.push({ plugin: v.name, skill: skill.spec.name });
@@ -1,48 +1,24 @@
1
1
  /**
2
- * center prompts 消费投影腿([ref]④/[ref]③ 分工:web 承存储+covering 解析+下发,server 承本模块;
3
- * [ref] 下发形定稿 / [ref] registry-core 0.10.16 schema / [ref]⑤「server 零新义务=逐字透传」)。
2
+ * 中心提示层的采纳腿:判官(`prompts-domain-validate.ts` 的 `judgePromptsWire`,经候选判官)收下的那份 artifact → 引擎的中心源
3
+ * (`CenterPromptSource`,经 `RunnerDeps.promptSource` 由引擎采用)。
4
4
  *
5
- * 链路:center(sema-web-admin,2026-08-26 由 sema-web 改名)把 covering 走完的**基线终形**经 `GET /api/config/effective` 的 additive
6
- * `prompts` key 下发 → 本模块按任务 scenario 选包(`scenarioOverrides[s] ?? sections`,整包替换非增量,
7
- * [ref]①c)→ 声明数组**逐字**(含 opt-in `contentHash`,core 1.315 校验+manifest 透传)喂 core 既有
8
- * typed `stableBlocks` 钩子。守卫全在 core(id 规范/slot 闭集/core/ 命名空间拒绝/identity 三锚
9
- * pass-through/锁定槽不可写)——server 不做语义复检([ref]①f:identity 完整角色层由 center 编辑面把关)。
10
- *
11
- * 仅有的一层「形校验」不是语义复检,是**防炸底线**(详见其现居所 `src/prompts-domain-validate.ts`——
12
- * 判形半场已下沉到该中立叶子,本文件 re-export 保兼容;[ref] S6,lens2 §G):core 对坏形声明的
13
- * 守卫是 THROW(assemble 期),server 在采用前做结构判形,坏形=拒绝采用该候选的 prompts 面。
14
- *
15
- * 生效语义(两段史):1.222 时 core 1.315 的 epoch 是 bundled-only(声明不进 descriptor),热换=resume
16
- * 三失真,故临时 restart-to-apply;core 1.316([ref] 裁 a/[ref]d)把声明以 (id,slot,chars,contentHash?)
17
- * 纳入 artifactDigest——声明变=digest 变=**下任务边界自动重 pin**(既有 legacy_migration 机制接手),
18
- * 进行中会话 epoch pin 保稳。自此恢复**热采用**(main.ts boot+refresh 双点 adopt),与 center
19
- * 「发布=新任务生效」产品语义对齐([ref]②b)。字节级检测只认 opt-in contentHash(文本不进 digest,
20
- * 防会话可导出面字典预映)——center 链路恒逐 section 铸([ref]),本投影逐字透传即全强度。
5
+ * 律:中心层只有一种形(引擎当期 schema 的发布形 artifact),只有一个座(`RunnerDeps.promptSource`)。本服务不展开、不选包、不按场景挑段:
6
+ * 「哪个场景用哪段」在 artifact 的 `when.binding` 里,由引擎按每个请求的 `TaskSpec.promptBinding`(场景名,`buildPromptSeats` 一处写)判。
7
+ * 本模块只管三件事:① 把判官交出的值推进中心源的两态过渡({@link applyCenterArtifact});② 按 digest 补拉一份本副本没有的 artifact
8
+ * ({@link withPromptArtifactBackfill},钉着它的会话续跑时用);③ 中心源自己的运维句(启动恢复读到一份引擎拒的 / 读不出的副本)
9
+ * 落进本服务的日志({@link centerSourceOnError})。
21
10
  */
22
- import { type PromptProvider, type PublishedPromptArtifactEnvelope } from "@sema-agent/core";
23
- import { type EffectiveCenterPrompts, type PromptsDomainFaces } from "../prompts-domain-validate.js";
24
- /** 判形半场(validateCenterPrompts/validatePromptsDomain/CORE_ENGINE_VERSION 及两 interface)已下沉到
25
- * 中立叶子 `src/prompts-domain-validate.ts`([ref] S6);消费者直引真源([ref] 兼容面全清,
26
- * 此处兼容 re-export 已删)。 */
27
- /** [ref]b / [ref] — §9.4 by-digest 补拉组合店:local miss ⇒ fetchRaw(digest) 从 center 拉 envelope ⇒
28
- * core verifyPromptArtifact 全管线 + **回验「拿到的=要的」digest 逐位**(center 答非所问=丢弃)⇒
29
- * best-effort 回写 inner(下次直命中)。任何失败=undefined(诚实缺席,fail-loud 归 core 的
30
- * prompt_snapshot_unavailable——绝不拼杂交)。 */
31
- export declare function withPromptArtifactBackfill(inner: {
32
- get(d: string, o: {
33
- engineVersion: string;
34
- }): Promise<PublishedPromptArtifactEnvelope | undefined>;
35
- put(e: PublishedPromptArtifactEnvelope): Promise<void>;
36
- }, fetchRaw: (artifactDigest: string) => Promise<unknown>, log: {
11
+ import { type PromptArtifactStore, type PublishedPromptArtifact, type RunnerDeps } from "@sema-agent/core";
12
+ type Log = {
37
13
  info: (msg: string, meta?: Record<string, unknown>) => void;
38
14
  warn: (msg: string, meta?: Record<string, unknown>) => void;
39
- }): typeof inner;
40
- /** e/b 接线([ref]① seam/[ref]e):catalog 轴的两态过渡推进 core 的 CenterPromptSource——
41
- * present(且身份变)⇒ applySnapshot(core 重验+落盘+原子换 candidate;validate 已过 core verify,
42
- * 此处失败=磁盘/状态写问题,warn 不挡 declaration 轴);absent-after-present / prompts 键整体消失
43
- * ⇒ applyDisabled(闸关=显式撤下语义的 catalog 轴半场,离线重启不复活)。幂等安全:同 envelope
44
- * 重放=同 digest 覆盖写。 */
45
- export declare function applyCatalogToSource(source: {
15
+ };
16
+ /** §9.4 按 digest 补拉的组合店:本地 miss ⇒ `fetchRaw(digest)` 从中心拉 ⇒ 引擎 `verifyPromptArtifact` 全管线 + **回验「拿到的 = 要的」digest 逐位**
17
+ * (中心答非所问 = 丢弃)⇒ best-effort 回写本地店(下次直命中)。任何失败 = undefined(诚实缺席;响亮归引擎的 `prompt.snapshot_unavailable` —— 绝不拼杂交)。
18
+ * 本地店的 `onRefused`(一份副本在、却用不了:引擎拒 / 读不出)原样交给本地店报,不吞:那是「为什么缺」的那一句。 */
19
+ export declare function withPromptArtifactBackfill(inner: PromptArtifactStore, fetchRaw: (artifactDigest: string) => Promise<unknown>, log: Log): PromptArtifactStore;
20
+ /** 中心源的推进面(引擎 `CenterPromptSource` 的两只写口 + 两只「欠不欠撤下」的读口)。 */
21
+ export interface CenterSourceTransitions {
46
22
  applySnapshot(raw: unknown): Promise<{
47
23
  ok: true;
48
24
  artifactDigest: string;
@@ -52,27 +28,24 @@ export declare function applyCatalogToSource(source: {
52
28
  reason: string;
53
29
  }>;
54
30
  applyDisabled(sourceRevision: string): Promise<void>;
55
- /** codex-2 F2(restart-owed disable):撤下写盘失败后重启,内存 prev 丢了但持久态还 active——
56
- * 以 source 自身的 live candidate 为准判「欠 disable」,不是只看内存 prev。 */
31
+ /** codex-2 F2(restart-owed disable):撤下写盘失败后重启,内存 prev 丢了但持久态还 active —— 以中心源自身的活候选为准判「欠撤下」,不是只看内存 prev。 */
57
32
  current?(): unknown;
58
- /** S-651(codex 修复验证轮 V1):本箱**持久记录**是 active —— 即使那份 artifact 此刻加载不出(活候选为空)。
59
- * 「欠撤下」的真源是持久记录;活候选只是它能加载时的影子。缺席 = 调用方不掌握持久记录(沿用前两条判据)。 */
33
+ /** S-651(codex 修复验证轮 V1):本箱**持久记录**是 active —— 即使那份 artifact 此刻加载不出(活候选为空)。「欠撤下」的真源是持久记录;
34
+ * 活候选只是它能加载时的影子。缺席 = 调用方不掌握持久记录(沿用前两条判据)。 */
60
35
  persistedActive?(): boolean;
61
- }, next: PromptsDomainFaces | undefined, prev: PromptsDomainFaces | undefined, log: {
62
- info: (msg: string, meta?: Record<string, unknown>) => void;
63
- warn: (msg: string, meta?: Record<string, unknown>) => void;
64
- }, phase: string): Promise<boolean>;
36
+ }
37
+ /**
38
+ * 判官交出的值推进中心源的两态过渡:`next` 在场(且 digest 变)⇒ `applySnapshot`(引擎重验 + 落盘 + 原子换候选);`next` 缺席
39
+ * (候选不带 prompts 键 = 闸关 / 没发布)而中心层此前在(内存 prev / 活候选 / 持久 active 任一)⇒ `applyDisabled`(显式撤下,离线重启不复活)。
40
+ * 去重键是 artifact 的内容身份(digest;发布出处 `sourceRevision` 不进身份)。返回过渡是否落地 —— false ⇒ 调用方**不推进**已采纳的值,
41
+ * 下一拍同一过渡自动重试(codex-2 F2:吞错推进曾让失败的采纳 / 撤下永久静默)。
42
+ */
43
+ export declare function applyCenterArtifact(source: CenterSourceTransitions, next: PublishedPromptArtifact | undefined, prev: PublishedPromptArtifact | undefined, log: Log, phase: string): Promise<boolean>;
65
44
  /**
66
- * 选包+投影:该 scenario 的终形声明数组(`scenarioOverrides[s] ?? sections`)→ typed `stableBlocks`
67
- * 钩子(声明**逐字**透传,含 contentHash——core 1.315 校验后进 manifest)。空数组在 validate 已拒
68
- * (F4:空替换集非 v1 语义),所以这里恒有非空声明——恒返回 provider(center-wins 无死分支)。
45
+ * 中心源自己的运维句(`CenterPromptSource` 的 `onError` 选项,引擎的 `RunnerDeps.onError` 形)落进本服务的日志:启动恢复读到持久记录指着的那份 artifact
46
+ * 被引擎拒(退役 schema 的拒句点名重发写法)/ 读不出 / 根本没有副本 —— 中心源无状态起服并说一句。行名与 Runner 的 `prompt-constitution` 阶段同一个
47
+ * (`prompt_composition_warning`):那一阶段的句子都在说「交给组装的东西没有照写的那样生效」。不传 = 这几句静默(引擎的缺省),所以每个起中心源的入口都传它。
69
48
  */
70
- export declare function centerPromptProvider(prompts: EffectiveCenterPrompts, scenarioName: string): PromptProvider;
71
- /** codex R3(appendSystemPrompt 案):该 scenario 的终形 center 声明里是否有「已组装 identity」——core 的
72
- * M9 迁移卫在 provider.stableBlocks 的 identity 声明上探同三锚,命中即走 pass-through 臂(其保留集无
73
- * `core/role.append`,任何 append rider/outputStyle 会被静默丢)。选包与 {@link centerPromptProvider}
74
- * 同式(`overrides[s] ?? sections`);锚谓词由调用方注入(task-settings `hasConstitutionAnchors` 单真源)。
75
- * [ref]①f 的「server 不做语义复检」不动:这不是复检语义,是为 capabilities.appendSystemPrompt 的诚实面
76
- * 探 core 会走哪条臂。 */
77
- export declare function centerIdentityAssembled(prompts: EffectiveCenterPrompts, scenarioName: string, isAssembled: (text: unknown) => boolean): boolean;
49
+ export declare function centerSourceOnError(log: Pick<Log, "warn">): NonNullable<RunnerDeps["onError"]>;
50
+ export {};
78
51
  //# sourceMappingURL=center-prompts.d.ts.map
@@ -1,17 +1,16 @@
1
1
  import { verifyPromptArtifact } from "@sema-agent/core";
2
- import { CORE_ENGINE_VERSION } from "../prompts-domain-validate.js";
3
2
  import { SHA256_HEX_RE } from "../digest-form.js";
4
3
  import { recordFailOpen } from "../observability/fail-open.js";
5
4
  export function withPromptArtifactBackfill(inner, fetchRaw, log) {
6
5
  const inFlight = new Map();
7
6
  return {
8
- put: (e) => inner.put(e),
9
- get: async (digest, opts) => {
7
+ put: (artifact) => inner.put(artifact),
8
+ get: async (digest, onRefused) => {
10
9
  const hex = digest.replace(/^sha256:/i, "").toLowerCase();
11
10
  if (!SHA256_HEX_RE.test(hex))
12
11
  return undefined;
13
12
  const canonical = `sha256:${hex}`;
14
- const local = await inner.get(canonical, opts);
13
+ const local = await inner.get(canonical, onRefused);
15
14
  if (local)
16
15
  return local;
17
16
  const pending = inFlight.get(canonical);
@@ -20,14 +19,14 @@ export function withPromptArtifactBackfill(inner, fetchRaw, log) {
20
19
  const run = (async () => {
21
20
  try {
22
21
  const raw = await fetchRaw(canonical);
23
- const v = verifyPromptArtifact(raw, { engineVersion: CORE_ENGINE_VERSION });
22
+ const v = verifyPromptArtifact(raw);
24
23
  if (!v.ok || v.artifact.artifactDigest.replace(/^sha256:/, "").toLowerCase() !== hex) {
25
24
  log.warn("center_prompts_backfill_rejected", { digest: canonical, ...(v.ok ? { got: v.artifact.artifactDigest, code: "digest_mismatch" } : { code: v.code, reason: v.reason }) });
26
25
  return undefined;
27
26
  }
28
- await inner.put(raw).catch(() => recordFailOpen("server.prompts.artifact-cache-write-failed", `digest=${canonical}`));
27
+ await inner.put(v.artifact).catch(() => recordFailOpen("server.prompts.artifact-cache-write-failed", `digest=${canonical}`));
29
28
  log.info("center_prompts_backfilled", { digest: canonical });
30
- return raw;
29
+ return v.artifact;
31
30
  }
32
31
  catch (e) {
33
32
  log.warn("center_prompts_backfill_failed", { digest: canonical, err: String(e) });
@@ -42,22 +41,22 @@ export function withPromptArtifactBackfill(inner, fetchRaw, log) {
42
41
  },
43
42
  };
44
43
  }
45
- export async function applyCatalogToSource(source, next, prev, log, phase) {
44
+ export async function applyCenterArtifact(source, next, prev, log, phase) {
46
45
  try {
47
- if (next?.catalog) {
48
- if (prev?.identity === next.identity)
46
+ if (next !== undefined) {
47
+ if (prev?.artifactDigest === next.artifactDigest)
49
48
  return true;
50
- const r = await source.applySnapshot(next.catalog);
49
+ const r = await source.applySnapshot(next);
51
50
  if (r.ok) {
52
51
  log.info("center_prompts_catalog_applied", { phase, artifactDigest: r.artifactDigest });
53
52
  return true;
54
53
  }
55
- log.warn("center_prompts_catalog_apply_failed", { phase, code: r.code, reason: r.reason, note: "validate passed but the source apply failed (disk/state) — declaration axis and built-ins unaffected; candidate unchanged; the transition retries on the next refresh tick" });
54
+ log.warn("center_prompts_catalog_apply_failed", { phase, code: r.code, reason: r.reason, note: "the candidate passed the judge but the source apply failed (disk/state) — built-ins unaffected; candidate unchanged; the transition retries on the next refresh tick" });
56
55
  return false;
57
56
  }
58
- if (prev?.catalog || source.current?.() !== undefined || source.persistedActive?.() === true) {
59
- await source.applyDisabled(`${phase}:catalog-absent`);
60
- log.info("center_prompts_catalog_disabled", { phase, note: "catalog axis withdrawn — core candidate cleared (does not revive offline)" });
57
+ if (prev !== undefined || source.current?.() !== undefined || source.persistedActive?.() === true) {
58
+ await source.applyDisabled(`${phase}:prompts-absent`);
59
+ log.info("center_prompts_catalog_disabled", { phase, note: "center layer withdrawn — the engine's candidate is cleared (does not revive offline)" });
61
60
  }
62
61
  return true;
63
62
  }
@@ -66,22 +65,9 @@ export async function applyCatalogToSource(source, next, prev, log, phase) {
66
65
  return false;
67
66
  }
68
67
  }
69
- export function centerPromptProvider(prompts, scenarioName) {
70
- const decls = scenarioDecls(prompts, scenarioName);
71
- return { stableBlocks: () => decls };
72
- }
73
- export function centerIdentityAssembled(prompts, scenarioName, isAssembled) {
74
- return scenarioDecls(prompts, scenarioName).some((d) => d.slot === "identity" && isAssembled(d.text));
75
- }
76
- function scenarioDecls(prompts, scenarioName) {
77
- const overrides = prompts.scenarioOverrides;
78
- if (overrides) {
79
- if (Object.hasOwn(overrides, scenarioName)) {
80
- const hit = overrides[scenarioName];
81
- if (hit)
82
- return hit;
83
- }
84
- }
85
- return prompts.sections;
68
+ export function centerSourceOnError(log) {
69
+ return (err, ctx) => {
70
+ log.warn("prompt_composition_warning", { sessionId: ctx.sessionId, ...(ctx.classification !== undefined ? { classification: ctx.classification } : {}), info: err instanceof Error ? err.message : String(err) });
71
+ };
86
72
  }
87
73
  //# sourceMappingURL=center-prompts.js.map
@@ -45,7 +45,7 @@ export declare const COMPOSITE_CAPABILITY_MEMBERS: {
45
45
  readonly centerWiring: readonly ["effectivePull", "effectiveRevision", "lease", "leaseHealth", "failMode", "usageReport", "issuer", "worker", "caller"];
46
46
  readonly webSearch: readonly ["backend"];
47
47
  readonly background: readonly ["listFace", "exitFaces"];
48
- readonly taskSettings: readonly ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks"];
48
+ readonly taskSettings: readonly ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "tightenOnlySeats"];
49
49
  readonly settings: readonly ["permissions"];
50
50
  readonly permissionModeAuto: readonly ["accepted", "classifierSeat", "entitlementSource", "armed", "reason", "model"];
51
51
  readonly writeProtection: readonly ["armed", "rows", "replaced"];
@@ -6,7 +6,7 @@ export const COMPOSITE_CAPABILITY_MEMBERS = {
6
6
  centerWiring: ["effectivePull", "effectiveRevision", "lease", "leaseHealth", "failMode", "usageReport", "issuer", "worker", "caller"],
7
7
  webSearch: ["backend"],
8
8
  background: ["listFace", "exitFaces"],
9
- taskSettings: ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks"],
9
+ taskSettings: ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "tightenOnlySeats"],
10
10
  settings: ["permissions"],
11
11
  permissionModeAuto: ["accepted", "classifierSeat", "entitlementSource", "armed", "reason", "model"],
12
12
  writeProtection: ["armed", "rows", "replaced"],
@@ -1,7 +1,8 @@
1
1
  import { ENGINE_CAPABILITIES } from "@sema-agent/core";
2
- import { ownCredentialsWithheld } from "../server-secret-env.js";
2
+ import { ownCredentialsWithheld, ownCredentialValuesWithheld } from "../server-secret-env.js";
3
3
  const ENGINE_CAPABILITY_FACTS = {
4
4
  "inherit_env.own_credentials_withheld": ownCredentialsWithheld,
5
+ "inherit_env.own_credential_values_withheld": ownCredentialValuesWithheld,
5
6
  };
6
7
  export function engineCapabilityBits() {
7
8
  const out = {};
@@ -1,8 +1,8 @@
1
1
  import { toolsRunOnThisHost } from "../task-cwd.js";
2
- import { executionLaneCaps, executionLaneOf, laneIsolated } from "../execution-lane-caps.js";
2
+ import { executionLaneOf, laneIsolated, laneWiresExecutionEnv } from "../execution-lane-caps.js";
3
3
  export function projectExecutionLaneCapability(config) {
4
4
  const lane = executionLaneOf(config.remoteExec?.provider);
5
- const handsWired = executionLaneCaps(lane).coreRemoteExecutionEnv === "supported";
5
+ const handsWired = laneWiresExecutionEnv(lane);
6
6
  return {
7
7
  provider: lane,
8
8
  toolsOnThisHost: toolsRunOnThisHost(config),