@sema-agent/server 7.150.0 → 7.152.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 (514) hide show
  1. package/MIGRATION.md +451 -0
  2. package/README.md +15 -3
  3. package/README.zh-CN.md +10 -2
  4. package/USAGE.md +144 -87
  5. package/deploy/sema-up/README.md +11 -4
  6. package/deploy/sema-up/chart/Chart.yaml +1 -1
  7. package/deploy/sema-up/chart/templates/NOTES.txt +5 -0
  8. package/deploy/sema-up/chart/templates/_helpers.tpl +15 -16
  9. package/deploy/sema-up/chart/templates/server-v4pro.yaml +5 -3
  10. package/deploy/sema-up/chart/templates/server.yaml +5 -3
  11. package/deploy/sema-up/chart/values-full-single.yaml +3 -1
  12. package/deploy/sema-up/chart/values.yaml +8 -1
  13. package/deploy/sema-up/cluster-up.sh +7 -6
  14. package/deploy/sema-up/kube-up.sh +6 -6
  15. package/deploy/sema-up/lib/flagshape.sh +36 -8
  16. package/deploy/sema-up/lib/helm-values-cluster.py +2 -0
  17. package/deploy/sema-up/lib/helm-values-kube.py +2 -0
  18. package/deploy/sema-up/machines.example.yaml +3 -1
  19. package/deploy/sema-up/sema-up.sh +22 -16
  20. package/dist/adoption/import.js +3 -3
  21. package/dist/approval-ask-audit-store.d.ts +1 -1
  22. package/dist/approval-ask-machine.d.ts +4 -10
  23. package/dist/approval-ask-retention.d.ts +1 -1
  24. package/dist/approval-card.d.ts +12 -14
  25. package/dist/approval-gate-currency.d.ts +9 -9
  26. package/dist/approval-gate-currency.js +3 -4
  27. package/dist/approval-hmac.d.ts +17 -1
  28. package/dist/approval-hmac.js +7 -1
  29. package/dist/approval-queue-kind.d.ts +1 -1
  30. package/dist/approval.d.ts +2 -2
  31. package/dist/approval.js +2 -2
  32. package/dist/auth-bridge.d.ts +20 -0
  33. package/dist/auth-bridge.js +9 -0
  34. package/dist/background-session-reap.d.ts +1 -1
  35. package/dist/bake-runner/main.d.ts +4 -2
  36. package/dist/bind-host.d.ts +3 -6
  37. package/dist/bind-host.js +4 -7
  38. package/dist/boot/budget-tracing.js +1 -1
  39. package/dist/boot/coordinators.d.ts +1 -1
  40. package/dist/boot/coordinators.js +9 -10
  41. package/dist/boot/device-lane.js +2 -0
  42. package/dist/boot/engine-lease.d.ts +5 -0
  43. package/dist/boot/engine-lease.js +1 -0
  44. package/dist/boot/execution-env.d.ts +9 -14
  45. package/dist/boot/execution-env.js +85 -22
  46. package/dist/boot/execution-lane.js +32 -5
  47. package/dist/boot/late-binds.d.ts +8 -4
  48. package/dist/boot/late-binds.js +7 -1
  49. package/dist/boot/leader.d.ts +31 -30
  50. package/dist/boot/leader.js +38 -28
  51. package/dist/boot/leg-path-adjudication.d.ts +40 -0
  52. package/dist/boot/leg-path-adjudication.js +18 -0
  53. package/dist/boot/memory-consolidation.d.ts +3 -2
  54. package/dist/boot/memory-consolidation.js +6 -6
  55. package/dist/boot/parked-revive-gate.js +3 -15
  56. package/dist/boot/reapers.d.ts +6 -1
  57. package/dist/boot/reapers.js +13 -2
  58. package/dist/boot/resolve-spec.d.ts +3 -3
  59. package/dist/boot/resolve-spec.js +43 -48
  60. package/dist/boot/runner-deps.d.ts +46 -35
  61. package/dist/boot/runner-deps.js +94 -91
  62. package/dist/boot/session-age-out.d.ts +36 -0
  63. package/dist/boot/session-age-out.js +101 -0
  64. package/dist/boot/session-faces.d.ts +5 -14
  65. package/dist/boot/session-faces.js +9 -5
  66. package/dist/boot/shutdown.d.ts +6 -0
  67. package/dist/boot/shutdown.js +10 -4
  68. package/dist/boot/stage-01-config.js +2 -0
  69. package/dist/boot/stage-02-web-admin-pull.js +4 -5
  70. package/dist/boot/stage-05-execution-env.d.ts +5 -3
  71. package/dist/boot/stage-05-execution-env.js +3 -2
  72. package/dist/boot/stage-06-runners.d.ts +9 -4
  73. package/dist/boot/stage-06-runners.js +24 -9
  74. package/dist/boot/stage-07-capability-layer.d.ts +8 -4
  75. package/dist/boot/stage-07-capability-layer.js +3 -2
  76. package/dist/boot/stage-08-reapers.d.ts +8 -4
  77. package/dist/boot/stage-08-reapers.js +4 -2
  78. package/dist/boot/stage-09-leader.d.ts +12 -5
  79. package/dist/boot/stage-09-leader.js +14 -5
  80. package/dist/boot/stage-10-http-server.d.ts +19 -5
  81. package/dist/boot/stage-10-http-server.js +14 -21
  82. package/dist/boot/stores.js +7 -4
  83. package/dist/boot/web-admin.js +5 -8
  84. package/dist/boot/workflow-orchestration.d.ts +7 -2
  85. package/dist/boot/workflow-orchestration.js +24 -7
  86. package/dist/bounded-rotation.d.ts +29 -0
  87. package/dist/bounded-rotation.js +24 -0
  88. package/dist/capabilities/approvals-push.d.ts +3 -3
  89. package/dist/capabilities/scenarios.d.ts +28 -13
  90. package/dist/capabilities/scenarios.js +2 -2
  91. package/dist/capability-facts.d.ts +43 -32
  92. package/dist/capability-facts.js +45 -51
  93. package/dist/card-rule-offers.d.ts +32 -0
  94. package/dist/card-rule-offers.js +130 -0
  95. package/dist/center-credential.d.ts +25 -6
  96. package/dist/center-credential.js +25 -5
  97. package/dist/config-catalog.d.ts +26 -7
  98. package/dist/config-catalog.js +26 -22
  99. package/dist/config-dir-trust.js +4 -2
  100. package/dist/config-invariants.d.ts +20 -8
  101. package/dist/config-invariants.js +55 -12
  102. package/dist/config-lkg.d.ts +5 -19
  103. package/dist/config-lkg.js +8 -62
  104. package/dist/config-provider.d.ts +1 -1
  105. package/dist/config-root-migration.d.ts +2 -2
  106. package/dist/config-types.d.ts +38 -42
  107. package/dist/config.d.ts +58 -7
  108. package/dist/config.js +90 -40
  109. package/dist/control-socket.d.ts +51 -0
  110. package/dist/control-socket.js +115 -0
  111. package/dist/deployment-governance.d.ts +2 -1
  112. package/dist/deployment-shape.d.ts +9 -1
  113. package/dist/deployment-shape.js +2 -1
  114. package/dist/device-protocol.d.ts +5 -4
  115. package/dist/device-protocol.js +1 -1
  116. package/dist/device-ws-hub.d.ts +7 -0
  117. package/dist/device-ws-hub.js +10 -3
  118. package/dist/device-ws-protocol.d.ts +63 -10
  119. package/dist/device-ws-protocol.js +56 -25
  120. package/dist/elicitation.js +2 -2
  121. package/dist/engine-identity.d.ts +19 -7
  122. package/dist/engine-identity.js +10 -2
  123. package/dist/entry-mode-clamp-notice.d.ts +2 -1
  124. package/dist/entry-problems.d.ts +40 -3
  125. package/dist/entry-problems.js +3 -1
  126. package/dist/execution-env-refusal.d.ts +29 -0
  127. package/dist/execution-env-refusal.js +8 -0
  128. package/dist/execution-lane-caps.d.ts +3 -1
  129. package/dist/field-conflict.d.ts +1 -1
  130. package/dist/file-history-capture.d.ts +11 -4
  131. package/dist/file-history-capture.js +9 -6
  132. package/dist/file-history-disclosure.d.ts +7 -5
  133. package/dist/file-history-disclosure.js +7 -5
  134. package/dist/fleet/drain-entry.d.ts +4 -0
  135. package/dist/fleet/engine-signal.d.ts +12 -29
  136. package/dist/fleet/engine-signal.js +1 -7
  137. package/dist/fleet-client.js +2 -5
  138. package/dist/gate-settlement.d.ts +1 -8
  139. package/dist/gate-settlement.js +0 -4
  140. package/dist/history-anchor.js +1 -1
  141. package/dist/hitl-delivery.d.ts +2 -3
  142. package/dist/hitl-delivery.js +0 -2
  143. package/dist/hooks/hook-llm.js +4 -2
  144. package/dist/hooks/hook-runner.d.ts +3 -2
  145. package/dist/hooks/hook-runner.js +18 -3
  146. package/dist/host-decision.d.ts +11 -11
  147. package/dist/host-lsp-manager.d.ts +2 -2
  148. package/dist/http/active-run-conflict.d.ts +35 -2
  149. package/dist/http/active-run-conflict.js +48 -19
  150. package/dist/http/admission.js +17 -2
  151. package/dist/http/approval-sweeps.d.ts +1 -1
  152. package/dist/http/approval-sweeps.js +10 -7
  153. package/dist/http/checkpoint-ctx.d.ts +4 -0
  154. package/dist/http/checkpoint-ctx.js +2 -0
  155. package/dist/http/dispatch.d.ts +8 -3
  156. package/dist/http/dispatch.js +59 -32
  157. package/dist/http/durable-run-leg.js +16 -17
  158. package/dist/http/health-reader.d.ts +16 -9
  159. package/dist/http/health-reader.js +2 -1
  160. package/dist/http/health-self-report.d.ts +9 -1
  161. package/dist/http/health-self-report.js +3 -1
  162. package/dist/http/owner-access.d.ts +33 -14
  163. package/dist/http/owner-access.js +40 -10
  164. package/dist/http/principal-gate.d.ts +49 -21
  165. package/dist/http/principal-gate.js +61 -11
  166. package/dist/http/request-channel.d.ts +23 -0
  167. package/dist/http/request-channel.js +9 -0
  168. package/dist/http/request-guards.js +17 -2
  169. package/dist/http/resume-ctx-read.js +42 -3
  170. package/dist/http/resume-legs.d.ts +4 -3
  171. package/dist/http/resume-legs.js +367 -117
  172. package/dist/http/route-ctx.d.ts +91 -15
  173. package/dist/http/route-ctx.js +17 -0
  174. package/dist/http/route-table.d.ts +5 -1
  175. package/dist/http/route-table.js +4 -0
  176. package/dist/http/routes/admin-config-refresh.js +3 -3
  177. package/dist/http/routes/admin-drain.d.ts +3 -0
  178. package/dist/http/routes/admin-drain.js +7 -7
  179. package/dist/http/routes/admin-memory-optout.d.ts +1 -1
  180. package/dist/http/routes/admin-memory-optout.js +3 -3
  181. package/dist/http/routes/adoption.js +3 -5
  182. package/dist/http/routes/agents-roster.js +2 -3
  183. package/dist/http/routes/approvals-assistant.d.ts +2 -1
  184. package/dist/http/routes/approvals-assistant.js +99 -51
  185. package/dist/http/routes/background.d.ts +3 -3
  186. package/dist/http/routes/capabilities.d.ts +4 -0
  187. package/dist/http/routes/capabilities.js +38 -10
  188. package/dist/http/routes/config-catalog.js +2 -2
  189. package/dist/http/routes/devices.js +1 -1
  190. package/dist/http/routes/diagnostics.d.ts +3 -3
  191. package/dist/http/routes/diagnostics.js +19 -7
  192. package/dist/http/routes/fleet.js +10 -8
  193. package/dist/http/routes/images.js +10 -10
  194. package/dist/http/routes/memory-bundle.js +3 -3
  195. package/dist/http/routes/memory-compliance.js +3 -3
  196. package/dist/http/routes/memory-consolidation.js +2 -2
  197. package/dist/http/routes/memory-origin.js +3 -3
  198. package/dist/http/routes/memory-policy.js +2 -2
  199. package/dist/http/routes/observability.js +3 -3
  200. package/dist/http/routes/projects.d.ts +3 -2
  201. package/dist/http/routes/projects.js +4 -5
  202. package/dist/http/routes/retention-ops.js +3 -3
  203. package/dist/http/routes/rules.js +5 -5
  204. package/dist/http/routes/run-permission-mode.d.ts +2 -1
  205. package/dist/http/routes/run-permission-mode.js +2 -2
  206. package/dist/http/routes/runs.d.ts +4 -9
  207. package/dist/http/routes/runs.js +171 -65
  208. package/dist/http/routes/session-sync.d.ts +22 -9
  209. package/dist/http/routes/session-sync.js +204 -107
  210. package/dist/http/routes/sessions-list.js +13 -7
  211. package/dist/http/routes/sessions.js +30 -15
  212. package/dist/http/routes/tasks.js +46 -41
  213. package/dist/http/routes/trace-usage.js +2 -2
  214. package/dist/http/routes/workflows.js +1 -1
  215. package/dist/http/server.d.ts +30 -30
  216. package/dist/http/server.js +16 -4
  217. package/dist/http/submit-ctx.d.ts +1 -1
  218. package/dist/http/submit-ctx.js +7 -4
  219. package/dist/http/wire-types.d.ts +14 -4
  220. package/dist/human-facing-args.d.ts +33 -0
  221. package/dist/human-facing-args.js +33 -0
  222. package/dist/identity-source.d.ts +20 -3
  223. package/dist/identity-source.js +14 -0
  224. package/dist/index.d.ts +5 -1
  225. package/dist/k8s-api-credentials.d.ts +29 -0
  226. package/dist/k8s-api-credentials.js +25 -0
  227. package/dist/lane-home-probe.d.ts +3 -7
  228. package/dist/lane-home-probe.js +2 -2
  229. package/dist/leader/diffup.d.ts +19 -0
  230. package/dist/leader/diffup.js +7 -0
  231. package/dist/leader/leader.d.ts +116 -11
  232. package/dist/leader/leader.js +69 -5
  233. package/dist/leader/repair-wire.js +2 -2
  234. package/dist/leader/run-entry.d.ts +2 -1
  235. package/dist/leader/run-entry.js +1 -1
  236. package/dist/leader/wire.d.ts +42 -132
  237. package/dist/leader/wire.js +81 -67
  238. package/dist/leg-facts.d.ts +13 -5
  239. package/dist/leg-facts.js +2 -1
  240. package/dist/memory-scope.d.ts +23 -11
  241. package/dist/memory-scope.js +18 -6
  242. package/dist/memory-sync-client.d.ts +30 -2
  243. package/dist/memory-sync-client.js +16 -9
  244. package/dist/model-entry-headers.d.ts +9 -10
  245. package/dist/model-entry-headers.js +0 -4
  246. package/dist/model-entry-refusal.d.ts +7 -4
  247. package/dist/model-entry-refusal.js +11 -5
  248. package/dist/model-plane-face.d.ts +1 -1
  249. package/dist/model-plane-face.js +3 -1
  250. package/dist/model-route-endpoint.d.ts +13 -7
  251. package/dist/model-route-endpoint.js +14 -11
  252. package/dist/model-select.d.ts +22 -0
  253. package/dist/model-select.js +9 -0
  254. package/dist/model-unreachable-notice.d.ts +11 -0
  255. package/dist/model-unreachable-notice.js +4 -4
  256. package/dist/object-store-buckets.d.ts +640 -6
  257. package/dist/object-store-buckets.js +166 -0
  258. package/dist/observability/err-text.d.ts +7 -0
  259. package/dist/observability/err-text.js +5 -0
  260. package/dist/observability/fail-open.d.ts +25 -17
  261. package/dist/observability/fail-open.js +25 -17
  262. package/dist/observability/logger.js +3 -1
  263. package/dist/observability/metrics.js +1 -0
  264. package/dist/operator-roster.d.ts +68 -0
  265. package/dist/operator-roster.js +32 -0
  266. package/dist/orchestration/workflow-notify-journal.d.ts +18 -1
  267. package/dist/orchestration/workflow-notify-journal.js +12 -1
  268. package/dist/orchestration/workflow-park-decision.d.ts +70 -18
  269. package/dist/orchestration/workflow-park-decision.js +49 -10
  270. package/dist/orchestration/workflow-park-holder.d.ts +65 -0
  271. package/dist/orchestration/workflow-park-holder.js +98 -0
  272. package/dist/orchestration/workflow-record-fence.d.ts +36 -0
  273. package/dist/orchestration/workflow-record-fence.js +42 -0
  274. package/dist/outbound-dispatcher.d.ts +71 -8
  275. package/dist/outbound-dispatcher.js +48 -7
  276. package/dist/owner-faces.d.ts +2 -2
  277. package/dist/parked-decide.d.ts +106 -55
  278. package/dist/parked-decide.js +153 -117
  279. package/dist/peer-directory.d.ts +2 -2
  280. package/dist/peer-inbound-face.d.ts +2 -6
  281. package/dist/peer-inbound-face.js +0 -3
  282. package/dist/permission-mode-admission.d.ts +74 -5
  283. package/dist/permission-mode-admission.js +56 -3
  284. package/dist/plugins/adoption-log-sql.d.ts +3 -1
  285. package/dist/plugins/adoption-log-sql.js +7 -1
  286. package/dist/plugins/approval-ask-store-file.d.ts +14 -2
  287. package/dist/plugins/approval-ask-store-file.js +11 -0
  288. package/dist/plugins/approval-ask-store-memory.d.ts +10 -1
  289. package/dist/plugins/approval-ask-store-memory.js +35 -10
  290. package/dist/plugins/approval-ask-store-sql.d.ts +69 -4
  291. package/dist/plugins/approval-ask-store-sql.js +45 -5
  292. package/dist/plugins/approval-exemption-store.js +3 -0
  293. package/dist/plugins/approval-nonce-store.js +2 -0
  294. package/dist/plugins/blob-backend.d.ts +83 -7
  295. package/dist/plugins/blob-backend.js +57 -6
  296. package/dist/plugins/breaker-state-sql.js +2 -0
  297. package/dist/plugins/caching-session-store.d.ts +9 -15
  298. package/dist/plugins/caching-session-store.js +6 -0
  299. package/dist/plugins/checkpoint-index-columns.d.ts +20 -16
  300. package/dist/plugins/checkpoint-index-columns.js +3 -6
  301. package/dist/plugins/checkpoint-store-face.d.ts +119 -61
  302. package/dist/plugins/checkpoint-store-face.js +134 -55
  303. package/dist/plugins/device-store-sql.js +6 -0
  304. package/dist/plugins/error-origin.d.ts +18 -0
  305. package/dist/plugins/error-origin.js +10 -0
  306. package/dist/plugins/execution-placement-sql.js +6 -6
  307. package/dist/plugins/image-bake-store-sql.js +6 -0
  308. package/dist/plugins/image-index-sql.js +4 -0
  309. package/dist/plugins/landed-attendants.d.ts +212 -0
  310. package/dist/plugins/landed-attendants.js +161 -0
  311. package/dist/plugins/leader-run-store-sql.js +4 -0
  312. package/dist/plugins/local-checkpoint-store.d.ts +13 -3
  313. package/dist/plugins/local-checkpoint-store.js +38 -49
  314. package/dist/plugins/local-session-live-reference.d.ts +40 -0
  315. package/dist/plugins/local-session-live-reference.js +39 -0
  316. package/dist/plugins/local-session-store.d.ts +71 -33
  317. package/dist/plugins/local-session-store.js +129 -27
  318. package/dist/plugins/memory-engine-pg.js +4 -0
  319. package/dist/plugins/memory-engine-sql-apply.js +5 -2
  320. package/dist/plugins/memory-engine-tidb.js +4 -0
  321. package/dist/plugins/memory-optout-grant-store-sql.js +4 -0
  322. package/dist/plugins/memory-sync-store-pg.js +5 -0
  323. package/dist/plugins/memory-sync-store-tidb.js +5 -0
  324. package/dist/plugins/one-time-migrations.d.ts +104 -80
  325. package/dist/plugins/one-time-migrations.js +226 -132
  326. package/dist/plugins/org-delivery-quota-store.js +4 -1
  327. package/dist/plugins/outcome-ledger-sql.js +2 -0
  328. package/dist/plugins/permission-rule-store-sql.js +11 -4
  329. package/dist/plugins/pg-cost-quota.js +4 -0
  330. package/dist/plugins/pg-pool.js +35 -10
  331. package/dist/plugins/pg-rate-limiter.js +2 -0
  332. package/dist/plugins/posix-shell-fs.d.ts +6 -1
  333. package/dist/plugins/posix-shell-fs.js +4 -1
  334. package/dist/plugins/remote-env-adb.d.ts +19 -15
  335. package/dist/plugins/remote-env-adb.js +41 -15
  336. package/dist/plugins/remote-env-connect-seat.d.ts +105 -0
  337. package/dist/plugins/remote-env-connect-seat.js +72 -0
  338. package/dist/plugins/remote-env-device.d.ts +22 -5
  339. package/dist/plugins/remote-env-device.js +106 -8
  340. package/dist/plugins/remote-env-e2b.d.ts +15 -6
  341. package/dist/plugins/remote-env-e2b.js +42 -32
  342. package/dist/plugins/remote-env-file-error.js +6 -2
  343. package/dist/plugins/remote-env-host.d.ts +46 -10
  344. package/dist/plugins/remote-env-host.js +124 -52
  345. package/dist/plugins/remote-env-k8s.d.ts +109 -41
  346. package/dist/plugins/remote-env-k8s.js +160 -54
  347. package/dist/plugins/remote-env-local-docker.d.ts +13 -8
  348. package/dist/plugins/remote-env-local-docker.js +34 -41
  349. package/dist/plugins/remote-env-ssh.d.ts +18 -12
  350. package/dist/plugins/remote-env-ssh.js +60 -59
  351. package/dist/plugins/remote-shell.d.ts +98 -1
  352. package/dist/plugins/remote-shell.js +218 -0
  353. package/dist/plugins/replica-registration.d.ts +1 -1
  354. package/dist/plugins/replica-registration.js +1 -1
  355. package/dist/plugins/resume-anchor-store-sql.d.ts +11 -2
  356. package/dist/plugins/resume-anchor-store-sql.js +12 -5
  357. package/dist/plugins/retention-lane-store-sql.js +4 -0
  358. package/dist/plugins/retention-sql.d.ts +20 -2
  359. package/dist/plugins/retention-sql.js +11 -0
  360. package/dist/plugins/run-store-sql.d.ts +21 -2
  361. package/dist/plugins/run-store-sql.js +31 -7
  362. package/dist/plugins/s3-presign.d.ts +23 -0
  363. package/dist/plugins/s3-presign.js +37 -3
  364. package/dist/plugins/scenario-prefix-switch-m42.d.ts +1 -1
  365. package/dist/plugins/scenario-prefix-switch-m42.js +2 -2
  366. package/dist/plugins/scheduler-support.d.ts +2 -2
  367. package/dist/plugins/scheduler-support.js +0 -3
  368. package/dist/plugins/schema-consistency.d.ts +4 -2
  369. package/dist/plugins/schema-consistency.js +19 -2
  370. package/dist/plugins/schema-indexes.js +2 -0
  371. package/dist/plugins/send-file-ledger.d.ts +2 -2
  372. package/dist/plugins/send-file-ledger.js +5 -2
  373. package/dist/plugins/send-user-file.d.ts +3 -4
  374. package/dist/plugins/send-user-file.js +56 -52
  375. package/dist/plugins/serving-requirement.d.ts +26 -7
  376. package/dist/plugins/serving-requirement.js +11 -4
  377. package/dist/plugins/session-birth.d.ts +6 -2
  378. package/dist/plugins/session-blob-claim-token.d.ts +15 -0
  379. package/dist/plugins/session-blob-claim-token.js +20 -0
  380. package/dist/plugins/session-blob-namespace.d.ts +46 -0
  381. package/dist/plugins/session-blob-namespace.js +116 -0
  382. package/dist/plugins/session-capture-record-store-sql.js +2 -0
  383. package/dist/plugins/session-ext-table.d.ts +14 -1
  384. package/dist/plugins/session-ext-table.js +5 -1
  385. package/dist/plugins/session-row-sql.d.ts +49 -2
  386. package/dist/plugins/session-row-sql.js +56 -13
  387. package/dist/plugins/session-store-sql.d.ts +34 -18
  388. package/dist/plugins/session-store-sql.js +98 -17
  389. package/dist/plugins/shared-memory-store-sql.d.ts +1 -0
  390. package/dist/plugins/shared-memory-store-sql.js +6 -2
  391. package/dist/plugins/snapshot-bucket-presence.d.ts +25 -2
  392. package/dist/plugins/snapshot-bucket-presence.js +8 -2
  393. package/dist/plugins/sql-driver.d.ts +2 -1
  394. package/dist/plugins/sql-driver.js +18 -3
  395. package/dist/plugins/sql-errors.d.ts +11 -6
  396. package/dist/plugins/sql-errors.js +5 -6
  397. package/dist/plugins/sql-json-column.d.ts +1 -1
  398. package/dist/plugins/stop-then-start-sentence.d.ts +10 -4
  399. package/dist/plugins/stop-then-start-sentence.js +14 -10
  400. package/dist/plugins/stop-then-start.d.ts +109 -0
  401. package/dist/plugins/stop-then-start.js +104 -0
  402. package/dist/plugins/store-backend.d.ts +84 -15
  403. package/dist/plugins/store-backend.js +236 -72
  404. package/dist/plugins/store-boundary.d.ts +57 -0
  405. package/dist/plugins/store-boundary.js +139 -0
  406. package/dist/plugins/store-contracts.d.ts +17 -0
  407. package/dist/plugins/store-fault-sentence-m53.d.ts +7 -0
  408. package/dist/plugins/store-fault-sentence-m53.js +25 -0
  409. package/dist/plugins/store-fault.d.ts +26 -7
  410. package/dist/plugins/store-fault.js +18 -2
  411. package/dist/plugins/task-attachment-store.d.ts +2 -1
  412. package/dist/plugins/task-attachment-store.js +14 -1
  413. package/dist/plugins/task-list-store-sql.d.ts +2 -2
  414. package/dist/plugins/task-list-store-sql.js +10 -8
  415. package/dist/plugins/tidb-cost-quota.js +4 -0
  416. package/dist/plugins/tidb-pool.js +21 -25
  417. package/dist/plugins/tidb-rate-limiter.js +4 -0
  418. package/dist/plugins/user-input-ledger-sql.js +4 -0
  419. package/dist/plugins/workflow-run-store-sql.d.ts +28 -10
  420. package/dist/plugins/workflow-run-store-sql.js +64 -4
  421. package/dist/plugins/workspace-custody.d.ts +4 -3
  422. package/dist/plugins/workspace-fill.d.ts +4 -7
  423. package/dist/plugins/workspace-fill.js +2 -1
  424. package/dist/plugins/write-behind-counter.js +5 -0
  425. package/dist/project-context.d.ts +0 -2
  426. package/dist/project-context.js +4 -8
  427. package/dist/project-registry.d.ts +46 -0
  428. package/dist/project-registry.js +44 -0
  429. package/dist/question.d.ts +2 -1
  430. package/dist/question.js +5 -13
  431. package/dist/request-form.d.ts +6 -1
  432. package/dist/request-form.js +4 -1
  433. package/dist/request-key-closure.js +1 -1
  434. package/dist/request-value-closure.d.ts +4 -0
  435. package/dist/request-value-closure.js +10 -0
  436. package/dist/rule-issue-reading.d.ts +1 -1
  437. package/dist/rules-consent.d.ts +1 -1
  438. package/dist/run-acceptance.d.ts +3 -2
  439. package/dist/run-acceptance.js +4 -6
  440. package/dist/run-local.js +9 -9
  441. package/dist/runs.d.ts +54 -16
  442. package/dist/runs.js +67 -13
  443. package/dist/runtime-governance.d.ts +5 -4
  444. package/dist/security.d.ts +30 -32
  445. package/dist/security.js +41 -7
  446. package/dist/sema-config-dir.d.ts +2 -1
  447. package/dist/server-secret-env.d.ts +12 -10
  448. package/dist/server-secret-env.js +24 -15
  449. package/dist/session-bindings.d.ts +82 -0
  450. package/dist/session-bindings.js +18 -0
  451. package/dist/session-children-retire.d.ts +2 -2
  452. package/dist/session-children-retire.js +2 -6
  453. package/dist/session-deletion.d.ts +16 -1
  454. package/dist/session-error-wire.d.ts +3 -3
  455. package/dist/session-error-wire.js +3 -3
  456. package/dist/session-incarnation.d.ts +10 -0
  457. package/dist/session-incarnation.js +10 -1
  458. package/dist/session-kind.d.ts +57 -0
  459. package/dist/session-kind.js +22 -0
  460. package/dist/session-row.d.ts +21 -1
  461. package/dist/session-row.js +7 -1
  462. package/dist/session-sync-kernel.d.ts +24 -14
  463. package/dist/session-sync-kernel.js +3 -6
  464. package/dist/session-sync.d.ts +25 -103
  465. package/dist/session-sync.js +14 -76
  466. package/dist/session-titler.d.ts +10 -3
  467. package/dist/session-titler.js +19 -6
  468. package/dist/ssh-host-key.d.ts +5 -0
  469. package/dist/ssh-host-key.js +3 -0
  470. package/dist/stores-sql/blob-index-sql.d.ts +30 -9
  471. package/dist/stores-sql/blob-index-sql.js +40 -21
  472. package/dist/stores-sql/checkpoint-store-sql.d.ts +54 -27
  473. package/dist/stores-sql/checkpoint-store-sql.js +70 -146
  474. package/dist/stores-sql/file-history-store-sql.d.ts +113 -15
  475. package/dist/stores-sql/file-history-store-sql.js +205 -95
  476. package/dist/stores-sql/pg-session-storage.d.ts +34 -7
  477. package/dist/stores-sql/pg-session-storage.js +37 -13
  478. package/dist/stores-sql/retention-store-sql.d.ts +1 -9
  479. package/dist/stores-sql/retention-store-sql.js +5 -19
  480. package/dist/stores-sql/session-policy-store-sql.d.ts +30 -7
  481. package/dist/stores-sql/session-policy-store-sql.js +61 -44
  482. package/dist/stores-sql/session-write-hooks.d.ts +11 -0
  483. package/dist/stores-sql/tidb-session-store.d.ts +58 -7
  484. package/dist/stores-sql/tidb-session-store.js +37 -13
  485. package/dist/submission-exit.d.ts +3 -2
  486. package/dist/submission-exit.js +9 -1
  487. package/dist/task-cwd.d.ts +2 -2
  488. package/dist/task-settings.d.ts +7 -5
  489. package/dist/task-settings.js +3 -3
  490. package/dist/terminal.d.ts +33 -2
  491. package/dist/terminal.js +139 -9
  492. package/dist/tool-approval.d.ts +465 -507
  493. package/dist/tool-approval.js +606 -1222
  494. package/dist/trace/core-keyset-guard.d.ts +1 -1
  495. package/dist/trace/ledger-events.d.ts +3 -3
  496. package/dist/trace/project.d.ts +2 -3
  497. package/dist/trace/redact.js +3 -2
  498. package/dist/trace/self-minted-wire.d.ts +571 -178
  499. package/dist/trace/self-minted-wire.js +189 -56
  500. package/dist/web-admin-client/apply-effective.js +2 -2
  501. package/dist/web-admin-client/read-warnings.d.ts +2 -2
  502. package/dist/web-admin-client/read-warnings.js +1 -1
  503. package/dist/web-admin-client/types.d.ts +1 -1
  504. package/dist/workspace-space.d.ts +10 -4
  505. package/dist/workspace-space.js +4 -1
  506. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +79 -28
  507. package/package.json +7 -3
  508. package/scripts/embed-minimal.mjs +3 -3
  509. package/wire-changes/server@7.151.0.json +762 -0
  510. package/wire-changes/server@7.152.0.json +900 -0
  511. package/dist/config-d-migration.d.ts +0 -37
  512. package/dist/config-d-migration.js +0 -60
  513. package/dist/http/session-inherit-env.d.ts +0 -36
  514. package/dist/http/session-inherit-env.js +0 -6
@@ -1,3 +1,4 @@
1
+ import { assembleFileHistory } from "./file-history-capture.js";
1
2
  import { buildOperatorRosterWayOut, operatorRosterPresent } from "./http/principal-gate.js";
2
3
  import { mcpInjectionHonored } from "./task-mcp.js";
3
4
  import { DEPLOYMENT_SHAPE_PREDICATES } from "./deployment-shape.js";
@@ -5,8 +6,11 @@ import { presentedApprovalFrameFamily, resolveStreamApprovalGate } from "./tool-
5
6
  import { selfOrchestrationDenial } from "./task-workflow.js";
6
7
  import { centerEntitlementSourceWired } from "./runtime-caps-resolver.js";
7
8
  import { WEB_ADMIN_ENV } from "@sema-agent/settings-schema";
8
- import { blobExchangeOf, overwriteWipeIncapable } from "./session-sync.js";
9
+ import { landingBlobFacesOf } from "./session-sync.js";
10
+ import { overwriteWipeIncapable } from "./plugins/landed-attendants.js";
9
11
  import { WORKSPACE_PERSIST_DEFAULT, WORKSPACE_SNAPSHOT_KEEP_DEFAULT, workspaceSnapshotTimeoutOf } from "./workspace-space.js";
12
+ import { sessionKindFaceOf } from "./session-kind.js";
13
+ import { birthFaceOf } from "./plugins/session-birth.js";
10
14
  import { headReadPresent } from "./session-incarnation.js";
11
15
  import { laneWiresExecutionEnv } from "./execution-lane-caps.js";
12
16
  export const CAPABILITY_FACT_WHY = {
@@ -23,7 +27,7 @@ export const CAPABILITY_FACT_WHY = {
23
27
  session_fork_face_absent: "the session store has no fork face",
24
28
  session_row_faces_absent: "the session store has no session-row faces (headOf / sessionSummaryOf / writeSessionRowCells)",
25
29
  session_purge_absent: "no session purge coordinator is wired",
26
- session_policy_store_absent: "no session policy store is wired",
30
+ session_kind_faces_absent: "the session store cannot record a session kind (it needs the birth receipt face that takes a kind, sessionKindOf, listSessions and listIdleOfKind) or no session purge coordinator is wired to age such sessions out",
27
31
  store_backend_absent: "no store backend is wired (DB_BACKEND=memory, multi-tenant bare boot, or half-configured SQL)",
28
32
  file_history_store_absent: "no file-history store is wired",
29
33
  resume_anchor_store_absent: "no rewind anchor map is wired (the handle → session-entry map a rewind target is read through, with the run store an unknown handle is checked against — both come from the store backend)",
@@ -34,7 +38,7 @@ export const CAPABILITY_FACT_WHY = {
34
38
  session_export_absent: "the session store has no entry export faces (exportEntries / exportEntriesStream)",
35
39
  session_import_staging_absent: "the session store has no staged-import face (beginImportStaging)",
36
40
  policy_purge_absent: "the session policy store has no deleteBySession purge verb",
37
- blob_exchange_absent: "the file-history store carries no blob exchange (FileHistoryStore.blobExchange — SQL backends only)",
41
+ blob_exchange_absent: "the file-history store carries no complete blob face (the blob exchange FileHistoryStore.blobExchange together with the per-landing provenance face blobLanding — SQL backends only)",
38
42
  device_hub_absent: "the device lane hub is not wired",
39
43
  device_store_absent: "the device store is not wired",
40
44
  device_enrollment_absent: "device enrollment is not wired",
@@ -45,7 +49,7 @@ export const CAPABILITY_FACT_WHY = {
45
49
  shared_memory_store_absent: "no shared memory store provider is wired",
46
50
  org_memory_directory_absent: "no org memory directory (membership fold) is wired",
47
51
  org_delivery_gate_absent: "no organization delivery gate is mounted (PRINCIPAL_INBOX_ASSISTANT is unset: the deployment declares no principal-inbox consumer)",
48
- operator_principals_empty: `no operator roster (OPERATOR_PRINCIPALS is empty and OPERATOR_SINGLE_USER is not declared), so no caller can ever be an operator; ${buildOperatorRosterWayOut()}`,
52
+ operator_principals_empty: `no operator roster (OPERATOR_PRINCIPALS is empty and OPERATOR_SINGLE_USER is not declared), so no caller can ever be an operator; ${buildOperatorRosterWayOut("operate")}`,
49
53
  adoption_store_absent: "no adoption log store is wired (SQL backends only)",
50
54
  memory_bundle_faces_absent: "the memory engine's governance bundle faces are not wired",
51
55
  memory_compliance_faces_absent: "the memory engine's provenance/erasure faces are not wired",
@@ -63,8 +67,7 @@ export const CAPABILITY_FACT_WHY = {
63
67
  a2a_serve_off: "A2A_SERVE_ENABLED is off",
64
68
  elicitation_disabled: "inbound MCP elicitation is off (MCP_ELICITATION_ENABLED)",
65
69
  ask_question_disabled: "AskUserQuestion live HITL is off (ASK_QUESTION_ENABLED)",
66
- tool_approval_disabled: "live tool approval is off (TOOL_APPROVAL_ENABLED)",
67
- stream_approval_disabled: "the stream approval protocol is off (STREAM_APPROVAL_ENABLED)",
70
+ tool_approval_disabled: "this worker presents no approval cards (needs TOOL_APPROVAL_ENABLED, a store backend (DB_BACKEND) and DURABLE_APPROVAL)",
68
71
  read_root_grant_posture_refused: "this is not a single-user host-lane deployment (REMOTE_EXEC=host without REQUIRE_PRINCIPAL), the only posture that honors a read-directory grant",
69
72
  background_agent_store_absent: "no background-agent store is wired",
70
73
  sendfile_ledger_absent: "no SendUserFile ledger is wired",
@@ -156,6 +159,12 @@ export function sessionList(d) {
156
159
  const lister = d.sessionStorage?.listSessions?.bind(d.sessionStorage);
157
160
  return lister !== undefined ? yes({ lister }) : no("session_lister_absent");
158
161
  }
162
+ export function sessionKinds(d) {
163
+ const s = d.sessionStorage;
164
+ return birthFaceOf(s) !== undefined && sessionKindFaceOf(s) !== undefined && typeof s?.listSessions === "function" && typeof s.listIdleOfKind === "function" && d.purgeSession !== undefined
165
+ ? YES
166
+ : no("session_kind_faces_absent");
167
+ }
159
168
  export function sessionFork(d) {
160
169
  const s = d.sessionStorage;
161
170
  if (s?.fork === undefined)
@@ -180,21 +189,18 @@ export function sessionDelete(d) {
180
189
  return yes({ purge, sessionStorage: owned.sessionStorage });
181
190
  }
182
191
  export function sessionPolicy(d) {
183
- const policyStore = d.sessionPolicyStore;
184
- if (policyStore === undefined)
185
- return no("session_policy_store_absent");
192
+ const backend = d.backend;
193
+ if (backend === undefined)
194
+ return no("store_backend_absent");
186
195
  const owned = sessionOwnership(d);
187
196
  if (!owned.available)
188
197
  return owned;
189
- return yes({ policyStore, sessionStorage: owned.sessionStorage });
198
+ return yes({ sessionStorage: owned.sessionStorage, backend });
190
199
  }
191
200
  export function sessionSync(d) {
192
- const { fileHistoryStore: historyStore, sessionPolicyStore } = d;
193
201
  const backend = d.backend;
194
202
  if (backend === undefined)
195
203
  return no("store_backend_absent");
196
- if (historyStore === undefined)
197
- return no("file_history_store_absent");
198
204
  const s = d.sessionStorage;
199
205
  if (s?.exportEntries === undefined || s.exportEntriesStream === undefined)
200
206
  return no("session_export_absent");
@@ -202,34 +208,34 @@ export function sessionSync(d) {
202
208
  return no("session_import_staging_absent");
203
209
  if (!headReadPresent(s) || s.sessionSummaryOf === undefined || s.writeSessionRowCells === undefined)
204
210
  return no("session_row_faces_absent");
205
- if (overwriteWipeIncapable(sessionPolicyStore))
211
+ if (overwriteWipeIncapable(backend.sessionPolicy()))
206
212
  return no("policy_purge_absent");
207
- return yes({ backend, sessionStorage: s, historyStore });
213
+ return yes({ backend, sessionStorage: s, historyStore: assembleFileHistory(backend).store });
208
214
  }
209
215
  export function sessionSyncFileHistory(d) {
210
216
  const sync = sessionSync(d);
211
217
  if (!sync.available)
212
218
  return sync;
213
- const blobExchange = blobExchangeOf(sync.historyStore);
214
- return blobExchange !== undefined ? yes({ historyStore: sync.historyStore, blobExchange }) : no("blob_exchange_absent");
219
+ const blobs = landingBlobFacesOf(sync.historyStore);
220
+ return blobs !== undefined ? yes({ historyStore: sync.historyStore, blobs }) : no("blob_exchange_absent");
215
221
  }
216
222
  export function sessionRewindFiles(d) {
217
- const { fileHistoryStore: historyStore, resumeAnchorStore: anchors, config, backend } = d;
218
- if (historyStore === undefined)
223
+ const { config, backend } = d;
224
+ if (backend === undefined)
219
225
  return no("file_history_store_absent");
220
226
  const owned = sessionOwnership(d);
221
227
  if (!owned.available)
222
228
  return owned;
223
229
  const runs = durableRuns(d);
224
- if (anchors === undefined || !runs.available)
230
+ if (!runs.available)
225
231
  return no("resume_anchor_store_absent");
226
232
  if (!laneWiresExecutionEnv(config.remoteExec.provider))
227
233
  return no("execution_lane_handless");
228
234
  if (!DEPLOYMENT_SHAPE_PREDICATES.rewindableWorkspace.holds(config))
229
235
  return no("workspace_rebuilt_per_task");
230
- if (backend?.kind !== "local")
236
+ if (backend.kind !== "local")
231
237
  return no("session_store_shared");
232
- return yes({ historyStore, anchors: { anchors, runs: runs.runStore }, sessionStorage: owned.sessionStorage });
238
+ return yes({ historyStore: assembleFileHistory(backend).store, anchors: { anchors: backend.resumeAnchor(), runs: runs.runStore }, sessionStorage: owned.sessionStorage });
233
239
  }
234
240
  export function sessionRewindFilesPreview(d) {
235
241
  const rewind = sessionRewindFiles(d);
@@ -250,19 +256,19 @@ export function toolApproval(d) {
250
256
  return d.toolApproval !== undefined ? yes({ coordinator: d.toolApproval }) : no("tool_approval_disabled");
251
257
  }
252
258
  export function streamApproval(d) {
259
+ if (d.toolApproval === undefined)
260
+ return no("tool_approval_disabled");
261
+ const coordinator = d.toolApproval;
253
262
  const gate = resolveStreamApprovalGate({
254
- toolApprovalEnabled: d.toolApproval !== undefined,
255
- streamApprovalEnabled: d.config.streamApproval?.enabled === true,
263
+ toolApprovalEnabled: true,
256
264
  backend: d.backend,
257
265
  checkpointStore: d.checkpointStore,
258
266
  });
259
267
  if (gate.active)
260
- return yes({ askStore: gate.askStore });
268
+ return yes({ askStore: gate.askStore, coordinator });
261
269
  switch (gate.reason) {
262
270
  case "no_tool_approval":
263
271
  return no("tool_approval_disabled");
264
- case "protocol_disabled":
265
- return no("stream_approval_disabled");
266
272
  case "no_backend":
267
273
  return no("store_backend_absent");
268
274
  case "no_park_facility":
@@ -277,20 +283,8 @@ export function readRootGrant(d) {
277
283
  return DEPLOYMENT_SHAPE_PREDICATES.callerOwnsWorkerDisk.holds(d.config) ? YES : no("read_root_grant_posture_refused");
278
284
  }
279
285
  export function approvalFrameFamilies(stream) {
280
- if (stream.available)
281
- return [presentedApprovalFrameFamily(true)];
282
- switch (stream.why) {
283
- case "tool_approval_disabled":
284
- return [];
285
- case "stream_approval_disabled":
286
- case "store_backend_absent":
287
- case "checkpoint_store_absent":
288
- return [presentedApprovalFrameFamily(false)];
289
- default: {
290
- const unhandled = stream.why;
291
- throw new Error(`unhandled stream-approval why: ${JSON.stringify(unhandled)}`);
292
- }
293
- }
286
+ const family = presentedApprovalFrameFamily(stream.available);
287
+ return family === undefined ? [] : [family];
294
288
  }
295
289
  export function deviceLane(d) {
296
290
  return d.deviceHub !== undefined ? yes({ hub: d.deviceHub }) : no("device_hub_absent");
@@ -367,15 +361,15 @@ export function engineHandover(d) {
367
361
  return no("engine_handover_lane_absent");
368
362
  return door.observing ? yes({ door }) : no("engine_lease_stopped");
369
363
  }
370
- export function operatorLane(d) {
371
- return operatorRosterPresent(d.config) ? YES : no("operator_principals_empty");
364
+ export function operatorLane(d, power) {
365
+ return operatorRosterPresent(d.config, power) ? YES : no("operator_principals_empty");
372
366
  }
373
367
  function adoptionLogStore(d) {
374
368
  const b = d.backend;
375
369
  return b !== undefined && typeof b.adoptionLog === "function" ? yes({ backend: b }) : no("adoption_store_absent");
376
370
  }
377
371
  export function adoption(d) {
378
- const lane = operatorLane(d);
372
+ const lane = operatorLane(d, "operate");
379
373
  if (!lane.available)
380
374
  return lane;
381
375
  return adoptionLogStore(d);
@@ -390,7 +384,7 @@ export function adoptionSessionImport(d) {
390
384
  return yes({ backend: log.backend, sessionStorage: s });
391
385
  }
392
386
  export function memoryBundle(d) {
393
- const lane = operatorLane(d);
387
+ const lane = operatorLane(d, "operate");
394
388
  if (!lane.available)
395
389
  return lane;
396
390
  return d.memoryBundleExport !== undefined && d.memoryBundleImport !== undefined
@@ -398,13 +392,13 @@ export function memoryBundle(d) {
398
392
  : no("memory_bundle_faces_absent");
399
393
  }
400
394
  export function memoryCompliance(d) {
401
- const lane = operatorLane(d);
395
+ const lane = operatorLane(d, "operate");
402
396
  if (!lane.available)
403
397
  return lane;
404
398
  return d.memoryCompliance !== undefined ? yes({ faces: d.memoryCompliance }) : no("memory_compliance_faces_absent");
405
399
  }
406
400
  export function memoryOrigin(d) {
407
- const lane = operatorLane(d);
401
+ const lane = operatorLane(d, "operate");
408
402
  if (!lane.available)
409
403
  return lane;
410
404
  return d.memoryOriginFace !== undefined ? yes({ faces: d.memoryOriginFace }) : no("memory_origin_faces_absent");
@@ -412,17 +406,17 @@ export function memoryOrigin(d) {
412
406
  export function memoryConsolidation(d) {
413
407
  if (d.memoryConsolidation === undefined)
414
408
  return no("consolidation_valve_closed");
415
- const lane = operatorLane(d);
409
+ const lane = operatorLane(d, "operate");
416
410
  return lane.available ? yes({ valve: d.memoryConsolidation }) : lane;
417
411
  }
418
412
  export function memoryOptOutGrant(d) {
419
- const lane = operatorLane(d);
413
+ const lane = operatorLane(d, "operate");
420
414
  if (!lane.available)
421
415
  return lane;
422
416
  return d.memoryOptOutGrant !== undefined ? yes({ store: d.memoryOptOutGrant }) : no("memory_optout_grant_absent");
423
417
  }
424
418
  export function outcomeLedger(d) {
425
- const lane = operatorLane(d);
419
+ const lane = operatorLane(d, "operate");
426
420
  if (!lane.available)
427
421
  return lane;
428
422
  const sink = d.outcomeSink;
@@ -431,7 +425,7 @@ export function outcomeLedger(d) {
431
425
  export function configCatalog(d) {
432
426
  if (d.config.configCatalogEnabled !== true)
433
427
  return no("config_catalog_disabled");
434
- return operatorLane(d);
428
+ return operatorLane(d, "operate");
435
429
  }
436
430
  export function ruleLane(d) {
437
431
  return d.ruleConsent !== undefined ? yes({ lane: d.ruleConsent }) : no("rule_store_absent");
@@ -0,0 +1,32 @@
1
+ /**
2
+ * **一张审批卡的规则候选:唯一读者**(活卡铸点、两只 checkpoint 店的铸行与回读投影、停驻行的规则记录读者同调这一只)。
3
+ *
4
+ * 规则一句:每一张面上投出的候选,都是同一份记录过**这一只**读者得到的投影 —— 同一个下标空间。读法 = core `readRuleOffers` 的闭集词
5
+ * (经 `approval-card.ts` 的 `readRuleOfferList`)→ 基数前缀帽 {@link MAX_RULE_OFFERS}(扣在读之前:exact single 恒 0、batch 恒末,前缀截不动选择键)→
6
+ * 兑付座超尺整条撤回 → 派生事实一致性(自称的 kind / match / command / directory 座与共享校验器从 `rule` 文本派生的三元组逐字一致,且是这张卡的工具与卡形)。
7
+ * 此前店侧另有一只读者(超尺截长、不判派生事实):一只展示成目录授权、规则文本却是 Bash 放行的 offer 能在队列行上出现,同一张停驻卡的重放帧与队列行
8
+ * 下标对不上。展示变换(逐条脱敏 + 截长,1:1 保位、只改字)归各展示腿,不是读法(`checkpoint-store-face.ts` 的 `displayRuleOffers`)。
9
+ */
10
+ import { type RuleOffer } from "@sema-agent/core";
11
+ /**
12
+ * 读一张卡的候选(唯一读者;头注)。`undefined` = 没有素材可投 / 可兑:原值不是非空列表(引擎没铸),或有兑付座超了不可截的尺(整条车道撤回)。
13
+ * `[]` = 原值有、全被丢光(闭集词不认 / 派生事实不一致):活卡铸点据它把绑定值回落到调用自己的命令(编辑臂兑的就是它),展示腿读作无供给。
14
+ */
15
+ export declare function readCardRuleOffers(raw: unknown, cardTool: string): readonly RuleOffer[] | undefined;
16
+ /**
17
+ * **已落盘投影的解码**(SQL 腿的 `checkpoint.rule_suggestions` 列:铸行那一刻 {@link readCardRuleOffers} 读出、经展示变换落下的那一份)。读者在铸行时已经跑过;
18
+ * 这里只认闭集词形 + 同一组界(扫描窗 / 成员前缀 / 基数),**不再判**派生事实与兑付座尺 —— 展示形是脱敏、截长过的字(截长之后的规则文本不再是一条可解析的规则),
19
+ * 再过一遍读者会把铸行时留下的候选丢掉,同一份素材两个后端两种卡面。手改过的列由这只解码落成丢弃(响亮,同一只 offer-dropped 计数)。
20
+ */
21
+ export declare function decodeRuleOfferProjection(raw: unknown): readonly RuleOffer[];
22
+ /**
23
+ * 这张卡的**绑定值**(`prepareCardApproval` 的 `command`,也是耐久行的 `rule_command`)= **卡形的绑定值**(core `prepareCardApproval` 对 `command` 入参的逐形定义):
24
+ * · 值形(整工具 / 名字 / 主机:core 对这三形只铸**一只** single,它的 `command` 座就是那个值 —— 整工具 `""`、名字工具是调用带的名字、主机工具是调用到达的主机)
25
+ * ⇒ 那一只候选自己的 `command`;
26
+ * · 其余(命令形候选 / 批,或读者把候选丢光了)⇒ 被裁决的命令原字节 `args.command`(非空串;读不出 ⇒ 没有素材)。空候选表不说任何值形:
27
+ * 绑定值回到调用自己的命令(编辑面兑的就是它)。
28
+ * 候选走到这里之前已过 {@link singleOfferBelongsOnCard}:每只 single 都是这张卡的工具、这只工具的卡形 ⇒ 值形与命令形不会同卡。值形候选不止一只 = 不是 core 铸得出的卡
29
+ * ⇒ 没有素材(整条车道撤回,与本文件其余撤回臂同形)。`req.args` 窄读,禁裸 as-cast。
30
+ */
31
+ export declare function cardBindingOf(args: unknown, offers: readonly RuleOffer[]): string | undefined;
32
+ //# sourceMappingURL=card-rule-offers.d.ts.map
@@ -0,0 +1,130 @@
1
+ import { MAX_RULE_TEXT_CHARS, parseRuleText } from "@sema-agent/core";
2
+ import { MAX_RULE_OFFERS, MAX_RULE_OFFER_BATCH_MEMBERS, readRuleOfferList } from "./approval-card.js";
3
+ import { CARD_RULE_FORM_OF_MATCH, cardRuleFormOf } from "./permission-rule-vocab.js";
4
+ import { createLogger } from "./observability/logger.js";
5
+ const defaultLogger = createLogger();
6
+ export function readCardRuleOffers(raw, cardTool) {
7
+ if (raw === undefined)
8
+ return undefined;
9
+ if (!Array.isArray(raw)) {
10
+ readRuleOfferList(raw);
11
+ return undefined;
12
+ }
13
+ if (raw.length === 0)
14
+ return undefined;
15
+ return boundRuleOfferTexts(raw.slice(0, MAX_RULE_OFFER_SCAN).map(preboundBatchMembers), cardTool);
16
+ }
17
+ export function decodeRuleOfferProjection(raw) {
18
+ return readRuleOfferList(Array.isArray(raw) ? raw.slice(0, MAX_RULE_OFFER_SCAN).map(preboundBatchMembers) : raw)
19
+ .map(({ offer }) => offer)
20
+ .slice(0, MAX_RULE_OFFERS);
21
+ }
22
+ const MAX_RULE_OFFER_SCAN = 32;
23
+ function preboundBatchMembers(item) {
24
+ if (typeof item !== "object" || item === null)
25
+ return item;
26
+ const candidate = item;
27
+ if (candidate.kind !== "batch" || !Array.isArray(candidate.rules) || candidate.rules.length <= MAX_RULE_OFFER_BATCH_MEMBERS)
28
+ return item;
29
+ return { ...candidate, rules: candidate.rules.slice(0, MAX_RULE_OFFER_BATCH_MEMBERS) };
30
+ }
31
+ function ruleOfferTextsOverSize(offer) {
32
+ const over = (s) => s.length > MAX_RULE_TEXT_CHARS;
33
+ if (offer.kind === "single")
34
+ return over(offer.rule) || over(offer.command);
35
+ return offer.rules.some((r) => {
36
+ switch (r.kind) {
37
+ case "command":
38
+ return over(r.rule) || over(r.command);
39
+ case "directoryRead":
40
+ return over(r.rule) || over(r.directory);
41
+ default:
42
+ throw new Error(`unknown rule-offer batch member kind: ${JSON.stringify(r)}`);
43
+ }
44
+ });
45
+ }
46
+ function ruleOfferDerivedFactsAgree(offer, cardTool) {
47
+ const derive = (rule) => {
48
+ const p = parseRuleText(rule, "allow");
49
+ return "rule" in p ? p.rule : undefined;
50
+ };
51
+ if (offer.kind === "single") {
52
+ const d = derive(offer.rule);
53
+ return d !== undefined && d.rule === offer.rule && d.match === offer.match && d.command === offer.command && singleOfferBelongsOnCard(d.match, d.tool, cardTool);
54
+ }
55
+ return offer.rules.every((m) => {
56
+ const d = derive(m.rule);
57
+ if (d === undefined || d.rule !== m.rule)
58
+ return false;
59
+ switch (m.kind) {
60
+ case "command":
61
+ return d.tool === "Bash" && d.match === m.match && d.command === m.command;
62
+ case "directoryRead":
63
+ return d.tool === "Read" && d.match === "subpath" && d.command === m.directory;
64
+ default:
65
+ throw new Error(`unknown rule-offer batch member kind: ${JSON.stringify(m)}`);
66
+ }
67
+ });
68
+ }
69
+ function singleOfferBelongsOnCard(match, ruleTool, cardTool) {
70
+ const form = CARD_RULE_FORM_OF_MATCH[match];
71
+ return ruleTool === cardTool && form !== undefined && form === cardRuleFormOf(cardTool);
72
+ }
73
+ function boundRuleOfferTexts(offers, cardTool) {
74
+ const over = (s) => s.length > MAX_RULE_TEXT_CHARS;
75
+ const clipSegment = (s) => (over(s) ? s.slice(0, MAX_RULE_TEXT_CHARS) : s);
76
+ const out = [];
77
+ for (const { offer } of readRuleOfferList(offers)) {
78
+ if (out.length >= MAX_RULE_OFFERS)
79
+ break;
80
+ if (ruleOfferTextsOverSize(offer))
81
+ return undefined;
82
+ if (!ruleOfferDerivedFactsAgree(offer, cardTool)) {
83
+ defaultLogger.warn("rule_offer_dropped_derived_facts_disagree", {
84
+ kind: offer.kind,
85
+ note: "an offer's kind/match/command/directory seats do not agree with what the shared validator derives from its rule text, or it is not this card's tool / card form — dropped whole so the card never shows one grant while redeeming another (core/dist skew or forged material?)",
86
+ });
87
+ continue;
88
+ }
89
+ switch (offer.kind) {
90
+ case "single":
91
+ out.push({ kind: "single", rule: offer.rule, match: offer.match, command: offer.command });
92
+ break;
93
+ case "batch": {
94
+ const rules = [];
95
+ for (const r of offer.rules) {
96
+ switch (r.kind) {
97
+ case "command":
98
+ rules.push({ kind: "command", rule: r.rule, match: r.match, command: r.command, segment: clipSegment(r.segment) });
99
+ break;
100
+ case "directoryRead":
101
+ rules.push({ kind: "directoryRead", rule: r.rule, directory: r.directory, segment: clipSegment(r.segment) });
102
+ break;
103
+ default:
104
+ throw new Error(`unknown rule-offer batch member kind: ${JSON.stringify(r)}`);
105
+ }
106
+ }
107
+ out.push({
108
+ kind: "batch",
109
+ rules,
110
+ uncoveredSegments: offer.uncoveredSegments,
111
+ ...(offer.uncoveredDetail !== undefined ? { uncoveredDetail: offer.uncoveredDetail.map((d) => ({ segment: clipSegment(d.segment), reason: d.reason })) } : {}),
112
+ });
113
+ break;
114
+ }
115
+ default:
116
+ throw new Error(`unknown rule-offer kind: ${JSON.stringify(offer)}`);
117
+ }
118
+ }
119
+ return out;
120
+ }
121
+ export function cardBindingOf(args, offers) {
122
+ const valueOffers = offers.filter((o) => o.kind === "single" && CARD_RULE_FORM_OF_MATCH[o.match] !== "command");
123
+ if (valueOffers.length > 0)
124
+ return valueOffers.length === 1 && offers.length === 1 ? valueOffers[0].command : undefined;
125
+ if (args === null || typeof args !== "object" || Array.isArray(args))
126
+ return undefined;
127
+ const command = args.command;
128
+ return typeof command === "string" && command !== "" ? command : undefined;
129
+ }
130
+ //# sourceMappingURL=card-rule-offers.js.map
@@ -1,9 +1,9 @@
1
- import { type WebAdminCredentialDeclaration } from "@sema-agent/settings-schema";
1
+ import { type WebAdminCredential, type WebAdminCredentialDeclaration } from "@sema-agent/settings-schema";
2
2
  /** 凭证种类闭集。新增一个种类 = 本文件与 `web-admin-client/center-request.ts` 的穷举 switch 当场编译红。 */
3
3
  export type CenterCredentialKind = "pull-token" | "user-jwt" | "user-session" | "none";
4
4
  /** 一次取值失败的成因闭集(见模块头注「四个成因」;boot 判决 {@link judgeCenterCredentialAtBoot} 对它穷举)。 */
5
5
  export type CenterCredentialFailure = "missing" | "malformed" | "multi_tenant_session" | "expired";
6
- /** 声明形的**非秘密**投影(进日志 / 拒因 / 未来的 caps 读面):env 形不带值。 */
6
+ /** 声明形的**非秘密**投影(进日志 / 拒因 / 自报位):env 形不带值。唯一铸点 {@link credentialOriginOf}。 */
7
7
  export type CenterCredentialOrigin = {
8
8
  readonly from: "env";
9
9
  } | {
@@ -12,6 +12,10 @@ export type CenterCredentialOrigin = {
12
12
  } | {
13
13
  readonly from: "absent";
14
14
  };
15
+ /** 声明**在**的那两形(配置里 `webAdmin.assertionToken` 的型:没声明 ⇒ 那一格缺席,缺席只有一种读法)。 */
16
+ export type DeclaredCredentialOrigin = Exclude<CenterCredentialOrigin, {
17
+ readonly from: "absent";
18
+ }>;
15
19
  /**
16
20
  * 一次取值的结果。`ok:false` 只有文件形会出现(env / absent 形的取值恒成功)。
17
21
  * `identity` 是「此刻的凭证是谁」—— 成功恒在;失败时只有 `expired` 知道(信封还读得出 `sub`,只是令牌不许再出站),
@@ -92,11 +96,26 @@ export type CenterCredentialSourceSpec = Exclude<WebAdminCredentialDeclaration,
92
96
  readonly multiTenant: boolean;
93
97
  };
94
98
  /**
95
- * 读两个声明键 —— 判定全交 settings-schema 的判官 `judgeWebAdminCredentialDeclaration`([ref]:二选一规则的**唯一**实现;空串 = 未设、
96
- * 不 trim;两个都设 ⇒ throw,boot 拒启,拒句点名两个键、不回显值)。本仓只多读方自己的那一步:文件路径按本进程 cwd 解析成绝对
97
- * 路径(之后 cwd 变了也读同一个文件 —— 纯契约不碰 `node:path`,这一步归读方)。
99
+ * 读一份 web-admin 凭证(`credential` ∈ 契约闭集 `WEB_ADMIN_CREDENTIALS`)的那一对声明键 —— 两份凭证的**唯一**读口。判定全交 settings-schema 的判官
100
+ * `judgeWebAdminCredentialDeclaration`([ref]:二选一规则的**唯一**实现;空串 = 未设、不 trim;两个都设 ⇒ throw,boot 拒启,拒句点名那一对键、不回显值;
101
+ * 判哪一份由调用方说,判官没有缺省)。本仓只多读方自己的那一步:文件路径按本进程 cwd 解析成绝对路径(之后 cwd 变了也读同一个文件 —— 纯契约不碰
102
+ * `node:path`,这一步归读方)。
103
+ */
104
+ export declare function readWebAdminCredentialDeclaration(credential: WebAdminCredential, env?: Readonly<Record<string, string | undefined>>): WebAdminCredentialDeclaration;
105
+ /** 声明 → 非秘密投影的**唯一**铸点(env 形丢掉值)。凭证来源的 `origin` 与断言令牌的配置读数都经它。 */
106
+ export declare function credentialOriginOf(declared: Readonly<{
107
+ from: "env";
108
+ } | {
109
+ from: "file";
110
+ path: string;
111
+ } | {
112
+ from: "absent";
113
+ }>): CenterCredentialOrigin;
114
+ /**
115
+ * [ref] —— 起服日志 `center_assertion_token` 的字段(`build*`:纯数据;`boot/web-admin.ts` 接了中心时打一次,info 级)。声明在 ⇒ 来源形(文件形另带
116
+ * 绝对路径;值形不带值);没声明 ⇒ 只有 `declared:false`。`effect` 如实说这一份凭证此刻的用途:只被读出声明,没有任何请求出示它。
98
117
  */
99
- export declare function readCenterCredentialDeclaration(env?: Readonly<Record<string, string | undefined>>): WebAdminCredentialDeclaration;
118
+ export declare function buildAssertionTokenBootFields(declared: DeclaredCredentialOrigin | undefined): Readonly<Record<string, string | boolean>>;
100
119
  /**
101
120
  * 凭证来源工厂(活对象:文件形每次取值读盘并记健康态)。`worker` = `SEMA_WEB_ADMIN_WORKER`(拉取令牌形的身份)。
102
121
  * `readFile` / `now` 只为测试注入。
@@ -12,10 +12,30 @@ export class CenterCredentialUnavailableError extends Error {
12
12
  this.name = "CenterCredentialUnavailableError";
13
13
  }
14
14
  }
15
- export function readCenterCredentialDeclaration(env = process.env) {
16
- const declared = judgeWebAdminCredentialDeclaration(env, "access");
15
+ export function readWebAdminCredentialDeclaration(credential, env = process.env) {
16
+ const declared = judgeWebAdminCredentialDeclaration(env, credential);
17
17
  return declared.from === "file" ? { from: "file", path: resolvePath(declared.path) } : declared;
18
18
  }
19
+ export function credentialOriginOf(declared) {
20
+ switch (declared.from) {
21
+ case "env":
22
+ return { from: "env" };
23
+ case "file":
24
+ return { from: "file", path: declared.path };
25
+ case "absent":
26
+ return { from: "absent" };
27
+ }
28
+ }
29
+ export function buildAssertionTokenBootFields(declared) {
30
+ if (declared === undefined)
31
+ return { declared: false };
32
+ return {
33
+ declared: true,
34
+ from: declared.from,
35
+ ...(declared.from === "file" ? { path: declared.path } : {}),
36
+ effect: "the declaration is read and reported only (GET /health center.assertionToken); no request from this engine presents the assertion token to the center",
37
+ };
38
+ }
19
39
  const digest16 = (s) => createHash("sha256").update(s, "utf8").digest("hex").slice(0, 16);
20
40
  function jwtSubject(bearer) {
21
41
  let parsed;
@@ -90,10 +110,10 @@ export function createCenterCredentialSource(spec, worker, deps = {}) {
90
110
  };
91
111
  switch (spec.from) {
92
112
  case "absent":
93
- return { origin: spec, declared: false, read: () => observed(NONE), health: () => ({ state: "ok" }), onRead };
113
+ return { origin: credentialOriginOf(spec), declared: false, read: () => observed(NONE), health: () => ({ state: "ok" }), onRead };
94
114
  case "env": {
95
115
  const fixed = classify(spec.token, worker);
96
- return { origin: { from: "env" }, declared: true, read: () => observed(fixed), health: () => ({ state: "ok" }), onRead };
116
+ return { origin: credentialOriginOf(spec), declared: true, read: () => observed(fixed), health: () => ({ state: "ok" }), onRead };
97
117
  }
98
118
  case "file": {
99
119
  const readFile = deps.readFile ?? ((p) => readFileSync(p, "utf8"));
@@ -111,7 +131,7 @@ export function createCenterCredentialSource(spec, worker, deps = {}) {
111
131
  return readCredentialText(text, spec, worker, now());
112
132
  };
113
133
  return {
114
- origin: { from: "file", path: spec.path },
134
+ origin: credentialOriginOf(spec),
115
135
  declared: true,
116
136
  read() {
117
137
  const r = readOnce();
@@ -2,6 +2,7 @@ import { type RetiredEnvWire } from "@sema-agent/settings-schema";
2
2
  import type { ServiceConfig, ServiceConfigGroups } from "./config-types.js";
3
3
  import type { ConfigKnobRecord } from "./config.js";
4
4
  import type { RestartSlice } from "./web-admin-client/restart-signal.js";
5
+ import { type EnvNameAllowlistKnob } from "./env-name-allowlist-knobs.js";
5
6
  export declare const CATALOG_VALUE_TYPES: readonly ["boolean", "number", "string", "enum", "csv", "json", "path", "url", "secret", "opaque"];
6
7
  export type CatalogValueType = (typeof CATALOG_VALUE_TYPES)[number];
7
8
  export declare const CATALOG_TIMINGS: readonly ["hot", "restart", "deploy", "inert"];
@@ -19,15 +20,33 @@ export type CatalogDangerAxis = (typeof CATALOG_DANGER_AXES)[number];
19
20
  export declare const URL_CREDENTIAL_POLICIES: readonly ["refuse", "mask"];
20
21
  export type UrlCredentialPolicy = (typeof URL_CREDENTIAL_POLICIES)[number];
21
22
  /**
22
- * secret 行的值**装着几枚凭据、按什么读出来**(闭集;只在 `type: "secret"` 的行上,其余行恒缺席)—— 本服务凭据的颗粒按本服务读这只变量的那一只解析器定:
23
- * · `whole` —— 整值是一枚(令牌 / 口令 / 私钥 / 一只模型密钥;名单型旋钮的原文也按凭据类整值对待);
23
+ * secret 行的值**装着几枚本服务凭据、按什么读出来**(闭集;只在 `type: "secret"` 的行上,其余行恒缺席)—— 本服务凭据的颗粒按本服务读这只变量的那一只解析器定:
24
+ * · `whole` —— 整值是一枚(令牌 / 口令 / 私钥 / 一只模型密钥);
24
25
  * · `token-table` —— `tok=system` 逗号表,每个 `tok` 是一枚(`SERVICE_AUTH_TOKENS`;读法 = `auth-keys.ts` `parseServiceAuthTokens`,`loadConfig` 同读);
25
- * · `key-set` —— `{kid,key,status}` JSON 数组,每个 `key` 是一枚(`APPROVAL_HMAC_KEYS`;读法 = `auth-keys.ts` `parseApprovalHmacKeys`,`loadConfig` 同读)。
26
- * 读者只有一个:自有凭据声明的值臂(`server-secret-env.ts`)—— 整值总在内,列表形另把每一枚交给引擎 ⇒ 一枚令牌换了个变量名放着,与原变量同扣。
27
- * 词加一个而读者不补 ⇒ 编译红(读者是穷举 switch);secret 行不写 ⇒ 编译红(`r()` 的 secret 重载要它)。不上 wire。
26
+ * · `key-set` —— `{kid,key,status}` JSON 数组,每个 `key` 是一枚(`APPROVAL_HMAC_KEYS`;读法 = `auth-keys.ts` `parseApprovalHmacKeys`,`loadConfig` 同读);
27
+ * · `name-list` —— 零枚:原文是一张环境变量名单(名单型旋钮;读法 = `config.ts` `parseEnvNameAllowlist`)。名单不是凭据,原文不交引擎比值;
28
+ * 旋钮变量本身照按名扣(它的原文可能夹着被错展开进来的令牌,所以是 secret 行:目录只回在场位、名进自有凭据声明、不进任何子进程)。
29
+ * 读者只有一个:自有凭据声明的值臂(`server-secret-env.ts`)—— 交给引擎的恰是颗粒读出来的那几枚(列表形另把每一枚交出去 ⇒ 一枚令牌换了个变量名放着,与原变量同扣)。
30
+ * 词加一个而读者不补 ⇒ 编译红(读者是穷举 switch);secret 行不写 ⇒ 编译红(`r()` 的 secret 重载要它);哪只行取 `name-list` 由行名定类({@link SecretRowForm}),写反 ⇒ 编译红。不上 wire。
28
31
  */
29
- export declare const SECRET_CREDENTIAL_FORMS: readonly ["whole", "token-table", "key-set"];
32
+ export declare const SECRET_CREDENTIAL_FORMS: readonly ["whole", "token-table", "key-set", "name-list"];
30
33
  export type SecretCredentialForm = (typeof SECRET_CREDENTIAL_FORMS)[number];
34
+ /** 装着本服务凭据值的颗粒(`name-list` 以外的词):名单型旋钮以外的每条 secret 行、bake-runner 的凭据行都取其一。 */
35
+ export type CredentialValueForm = Exclude<SecretCredentialForm, "name-list">;
36
+ /**
37
+ * secret 行的颗粒**按行名定类**:名单型旋钮(闭集 `EnvNameAllowlistKnob`,叶表 `env-name-allowlist-knobs.ts` —— 「哪只变量是名单」只在那里写一次)恒 `name-list`,
38
+ * 其余恒是装着凭据值的颗粒。目录行写反(旋钮写 `whole`、凭据写 `name-list`)⇒ `r()` 的 secret 重载当场编译红 —— 列与旋钮闭集不会说两样。
39
+ */
40
+ export type SecretRowForm<N extends string> = N extends EnvNameAllowlistKnob ? "name-list" : CredentialValueForm;
41
+ /**
42
+ * 配置目录**之外**的本包凭据变量:bake-runner 进程(构建宿主守护进程)自己读的凭据 —— 目录只装服务进程读的 env(D1 对账门把 `bake-runner/` 整只排除),
43
+ * runner 的键不是目录行,却是本包的自有凭据。自有凭据声明(`server-secret-env.ts`)把目录 secret 行与本表并成**一张**「名 → 颗粒」,三个进程入口
44
+ * (stage-01 / run-local / bake-runner)同读这一份(不按「归谁消费」切):名全声明,值按颗粒逐枚交引擎 ⇒ 名单型旋钮点到它(名是或值是)拒启、任何宿主腿都不交它与它的副本。
45
+ * 读点 `bake-runner/main.ts` `loadEnv` 按本表的键读(键改名而读点不跟 ⇒ 编译红)。不上 wire,不进 `GET /v1/config/catalog`。
46
+ */
47
+ export declare const BAKE_RUNNER_CREDENTIAL_ENV: {
48
+ readonly BAKE_RUNNER_TOKEN: "whole";
49
+ };
31
50
  /** 域 = 配置九组(类型锁步:组集变了这里跟着红)。 */
32
51
  export type CatalogDomain = keyof ServiceConfigGroups;
33
52
  export declare const CATALOG_RESTART_SLICES: readonly RestartSlice[];
@@ -103,7 +122,7 @@ export interface ConfigCatalogSpec {
103
122
  readonly scope?: "bootstrap-only";
104
123
  /** url 行的凭据处置披露({@link UrlCredentialPolicy});url 行必填(`r()` 的 url 重载要它,缺 ⇒ 编译红),其余行写不进来。 */
105
124
  readonly credentialPolicy?: UrlCredentialPolicy;
106
- /** secret 行的凭据颗粒({@link SecretCredentialForm});secret 行必填(`r()` 的 secret 重载要它,缺 ⇒ 编译红),其余行写不进来。 */
125
+ /** secret 行的凭据颗粒({@link SecretCredentialForm});secret 行必填(`r()` 的 secret 重载要它,缺 ⇒ 编译红;取哪一类按行名定 —— {@link SecretRowForm}),其余行写不进来。 */
107
126
  readonly credentialForm?: SecretCredentialForm;
108
127
  }
109
128
  export interface ConfigCatalogRowCenter {