@sema-agent/server 7.135.0 → 7.137.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 (342) hide show
  1. package/MIGRATION.md +237 -2
  2. package/USAGE.md +146 -41
  3. package/deploy/sema-up/README.md +15 -1
  4. package/deploy/sema-up/chart/templates/NOTES.txt +1 -1
  5. package/deploy/sema-up/chart/templates/sandbox-rbac.yaml +7 -1
  6. package/deploy/sema-up/chart/values.yaml +1 -1
  7. package/deploy/sema-up/stack/sema-stack-cluster.yaml +7 -1
  8. package/dist/approval-card.d.ts +60 -4
  9. package/dist/approval-card.js +18 -1
  10. package/dist/approval-content-kind.d.ts +7 -0
  11. package/dist/approval-content-kind.js +8 -1
  12. package/dist/approval-gate-currency.d.ts +48 -6
  13. package/dist/approval-gate-currency.js +16 -9
  14. package/dist/approval-hmac.d.ts +13 -1
  15. package/dist/approval-hmac.js +1 -1
  16. package/dist/approval.js +3 -3
  17. package/dist/auth-bridge.d.ts +34 -5
  18. package/dist/auth-bridge.js +22 -5
  19. package/dist/boot/budget-tracing.d.ts +1 -2
  20. package/dist/boot/budget-tracing.js +2 -2
  21. package/dist/boot/execution-env.d.ts +24 -1
  22. package/dist/boot/execution-env.js +69 -6
  23. package/dist/boot/org-memory.js +1 -1
  24. package/dist/boot/reapers.d.ts +3 -0
  25. package/dist/boot/reapers.js +15 -1
  26. package/dist/boot/resolve-spec.d.ts +4 -0
  27. package/dist/boot/resolve-spec.js +24 -22
  28. package/dist/boot/runner-deps.js +4 -2
  29. package/dist/boot/stage-03-store-backend.d.ts +1 -1
  30. package/dist/boot/stage-04-stores.d.ts +2 -2
  31. package/dist/boot/stage-05-execution-env.d.ts +4 -2
  32. package/dist/boot/stage-05-execution-env.js +11 -2
  33. package/dist/boot/stage-06-runners.d.ts +4 -2
  34. package/dist/boot/stage-06-runners.js +5 -1
  35. package/dist/boot/stage-07-capability-layer.d.ts +5 -2
  36. package/dist/boot/stage-07-capability-layer.js +1 -1
  37. package/dist/boot/stage-08-reapers.d.ts +5 -2
  38. package/dist/boot/stage-08-reapers.js +2 -1
  39. package/dist/boot/stage-09-leader.d.ts +5 -2
  40. package/dist/boot/stage-10-http-server.d.ts +5 -2
  41. package/dist/boot/stage-10-http-server.js +3 -2
  42. package/dist/boot/stores.d.ts +1 -1
  43. package/dist/boot/stores.js +2 -3
  44. package/dist/boot/web-admin.js +10 -17
  45. package/dist/brain.js +12 -3
  46. package/dist/broker/broker.d.ts +89 -0
  47. package/dist/broker/broker.js +287 -0
  48. package/dist/broker/constants.d.ts +39 -0
  49. package/dist/broker/constants.js +15 -0
  50. package/dist/broker/http1.d.ts +111 -0
  51. package/dist/broker/http1.js +256 -0
  52. package/dist/broker/lease-book.d.ts +87 -0
  53. package/dist/broker/lease-book.js +142 -0
  54. package/dist/broker/lease-file.d.ts +60 -0
  55. package/dist/broker/lease-file.js +127 -0
  56. package/dist/broker/main.d.ts +2 -0
  57. package/dist/broker/main.js +20 -0
  58. package/dist/budget.d.ts +3 -3
  59. package/dist/budget.js +4 -0
  60. package/dist/capabilities/composite-members.d.ts +2 -1
  61. package/dist/capabilities/composite-members.js +2 -1
  62. package/dist/capabilities/engine-capabilities.js +1 -0
  63. package/dist/capabilities/mcp-probe.d.ts +5 -4
  64. package/dist/capabilities/scenarios.d.ts +23 -8
  65. package/dist/capabilities/scenarios.js +13 -8
  66. package/dist/capabilities/skills.d.ts +28 -5
  67. package/dist/capabilities/skills.js +8 -0
  68. package/dist/capability-facts.d.ts +3 -7
  69. package/dist/capability-facts.js +3 -5
  70. package/dist/center-credential-renewer.js +5 -1
  71. package/dist/center-credential.d.ts +18 -4
  72. package/dist/center-credential.js +18 -3
  73. package/dist/checkpoint-ctx-seal-m28.d.ts +3 -10
  74. package/dist/checkpoint-ctx-seal-m28.js +1 -1
  75. package/dist/checkpoint-identity.d.ts +3 -3
  76. package/dist/config-catalog.js +21 -16
  77. package/dist/config-d-migration.js +1 -1
  78. package/dist/config-invariants.d.ts +1 -1
  79. package/dist/config-invariants.js +8 -0
  80. package/dist/config-lkg.d.ts +0 -38
  81. package/dist/config-lkg.js +1 -83
  82. package/dist/config-types.d.ts +21 -4
  83. package/dist/config.d.ts +1 -1
  84. package/dist/config.js +60 -16
  85. package/dist/deployment-governance.d.ts +2 -2
  86. package/dist/deployment-governance.js +7 -9
  87. package/dist/deployment-shape.d.ts +1 -1
  88. package/dist/device-ws-protocol.d.ts +1 -0
  89. package/dist/device-ws-protocol.js +2 -1
  90. package/dist/elicitation.d.ts +8 -7
  91. package/dist/elicitation.js +9 -8
  92. package/dist/file-history-disclosure.d.ts +8 -4
  93. package/dist/file-history-disclosure.js +24 -6
  94. package/dist/fleet-client.d.ts +32 -1
  95. package/dist/fleet-client.js +24 -4
  96. package/dist/fleet-lease.d.ts +7 -3
  97. package/dist/fleet-lease.js +31 -23
  98. package/dist/hooks/classic-stations.d.ts +11 -54
  99. package/dist/hooks/hook-llm.js +14 -8
  100. package/dist/hooks/hook-runner.d.ts +4 -4
  101. package/dist/hooks/hook-runner.js +2 -2
  102. package/dist/http/admission.js +10 -7
  103. package/dist/http/approval-sweeps.js +4 -3
  104. package/dist/http/caller-trust.d.ts +2 -1
  105. package/dist/http/caller-trust.js +1 -3
  106. package/dist/http/checkpoint-ctx.d.ts +76 -16
  107. package/dist/http/checkpoint-ctx.js +45 -1
  108. package/dist/http/dispatch.js +24 -19
  109. package/dist/http/durable-run-leg.d.ts +5 -1
  110. package/dist/http/durable-run-leg.js +1 -1
  111. package/dist/http/health-self-report.d.ts +2 -2
  112. package/dist/http/mcp-remote-text.d.ts +5 -0
  113. package/dist/http/mcp-remote-text.js +7 -0
  114. package/dist/http/principal-gate.d.ts +15 -10
  115. package/dist/http/principal-gate.js +48 -9
  116. package/dist/http/resume-ctx-read.d.ts +2 -16
  117. package/dist/http/resume-ctx-read.js +2 -3
  118. package/dist/http/resume-legs.d.ts +2 -20
  119. package/dist/http/resume-legs.js +52 -38
  120. package/dist/http/route-ctx.d.ts +8 -2
  121. package/dist/http/routes/approvals-assistant.d.ts +0 -2
  122. package/dist/http/routes/approvals-assistant.js +65 -16
  123. package/dist/http/routes/capabilities.js +11 -1
  124. package/dist/http/routes/mcp-reconnect.d.ts +1 -1
  125. package/dist/http/routes/mcp-reconnect.js +5 -7
  126. package/dist/http/routes/runs.js +4 -3
  127. package/dist/http/routes/session-sync.js +70 -12
  128. package/dist/http/routes/sessions.js +20 -15
  129. package/dist/http/routes/tasks.js +8 -6
  130. package/dist/http/server.d.ts +4 -0
  131. package/dist/http/stored-body-replay.d.ts +3 -3
  132. package/dist/http/stored-body-replay.js +6 -1
  133. package/dist/http/submit-ctx.js +1 -1
  134. package/dist/http/wire-types.d.ts +57 -30
  135. package/dist/identity-source.d.ts +65 -0
  136. package/dist/identity-source.js +45 -0
  137. package/dist/index.d.ts +1 -0
  138. package/dist/index.js +1 -0
  139. package/dist/memory-store-refusal.d.ts +3 -3
  140. package/dist/model-entry-refusal.d.ts +2 -0
  141. package/dist/model-entry-refusal.js +11 -0
  142. package/dist/model-route-gap.d.ts +49 -4
  143. package/dist/model-route-gap.js +34 -1
  144. package/dist/model-select.d.ts +6 -17
  145. package/dist/model-select.js +0 -3
  146. package/dist/namespaced-rule-name.d.ts +1 -1
  147. package/dist/object-store-buckets.d.ts +13 -0
  148. package/dist/object-store-buckets.js +3 -0
  149. package/dist/observability/fail-open.d.ts +19 -7
  150. package/dist/observability/fail-open.js +19 -7
  151. package/dist/observability/metrics.js +2 -2
  152. package/dist/observability/principal-context.d.ts +4 -1
  153. package/dist/observability/principal-context.js +6 -1
  154. package/dist/observability/run-terminal.js +1 -0
  155. package/dist/operator-ask.d.ts +2 -2
  156. package/dist/org-delivery-gate.js +1 -1
  157. package/dist/org-memory-admission.d.ts +2 -2
  158. package/dist/org-memory-admission.js +39 -2
  159. package/dist/parked-decide.d.ts +4 -3
  160. package/dist/parked-decide.js +29 -9
  161. package/dist/peer-directory.d.ts +2 -1
  162. package/dist/peer-directory.js +7 -5
  163. package/dist/permission-rule-list.d.ts +2 -2
  164. package/dist/plugins/approval-ask-store-sql.d.ts +8 -0
  165. package/dist/plugins/approval-ask-store-sql.js +3 -0
  166. package/dist/plugins/blob-backend.js +2 -1
  167. package/dist/plugins/checkpoint-index-columns.d.ts +50 -1
  168. package/dist/plugins/checkpoint-index-columns.js +28 -0
  169. package/dist/plugins/checkpoint-store-sql.d.ts +46 -12
  170. package/dist/plugins/checkpoint-store-sql.js +64 -35
  171. package/dist/plugins/file-history-store-sql.d.ts +6 -0
  172. package/dist/plugins/file-history-store-sql.js +37 -37
  173. package/dist/plugins/file-run-store.js +8 -2
  174. package/dist/plugins/k8s-exec-protocol.d.ts +69 -13
  175. package/dist/plugins/k8s-exec-protocol.js +116 -28
  176. package/dist/plugins/k8s-pod-delete-failure.d.ts +25 -0
  177. package/dist/plugins/k8s-pod-delete-failure.js +17 -0
  178. package/dist/plugins/k8s-pod-reaper.d.ts +112 -0
  179. package/dist/plugins/k8s-pod-reaper.js +122 -0
  180. package/dist/plugins/local-checkpoint-store.d.ts +3 -6
  181. package/dist/plugins/local-checkpoint-store.js +7 -6
  182. package/dist/plugins/memory-run-store.js +2 -0
  183. package/dist/plugins/one-time-migrations.d.ts +49 -37
  184. package/dist/plugins/one-time-migrations.js +87 -128
  185. package/dist/plugins/permission-rule-store-file.js +2 -2
  186. package/dist/plugins/permission-rule-store-sql.d.ts +17 -17
  187. package/dist/plugins/permission-rule-store-sql.js +16 -17
  188. package/dist/plugins/pg-pool.js +4 -0
  189. package/dist/plugins/pg-session-storage.js +2 -2
  190. package/dist/plugins/remote-env-adb.d.ts +3 -0
  191. package/dist/plugins/remote-env-adb.js +1 -0
  192. package/dist/plugins/remote-env-device.d.ts +3 -0
  193. package/dist/plugins/remote-env-device.js +4 -0
  194. package/dist/plugins/remote-env-e2b.d.ts +3 -0
  195. package/dist/plugins/remote-env-e2b.js +1 -0
  196. package/dist/plugins/remote-env-file-error.d.ts +8 -1
  197. package/dist/plugins/remote-env-file-error.js +7 -1
  198. package/dist/plugins/remote-env-host.d.ts +7 -1
  199. package/dist/plugins/remote-env-host.js +7 -1
  200. package/dist/plugins/remote-env-k8s.d.ts +154 -14
  201. package/dist/plugins/remote-env-k8s.js +300 -21
  202. package/dist/plugins/remote-env-local-docker.d.ts +3 -0
  203. package/dist/plugins/remote-env-local-docker.js +1 -0
  204. package/dist/plugins/remote-env-ssh.d.ts +3 -0
  205. package/dist/plugins/remote-env-ssh.js +1 -0
  206. package/dist/plugins/run-store-sql.js +10 -4
  207. package/dist/plugins/s3-answer.d.ts +15 -0
  208. package/dist/plugins/s3-answer.js +5 -0
  209. package/dist/plugins/session-ownership.d.ts +17 -3
  210. package/dist/plugins/session-ownership.js +19 -5
  211. package/dist/plugins/snapshot-bucket-presence.d.ts +39 -4
  212. package/dist/plugins/snapshot-bucket-presence.js +35 -7
  213. package/dist/plugins/sql-errors.d.ts +60 -0
  214. package/dist/plugins/sql-errors.js +64 -1
  215. package/dist/plugins/store-contracts.d.ts +10 -1
  216. package/dist/plugins/store-fault.d.ts +4 -0
  217. package/dist/plugins/store-fault.js +10 -0
  218. package/dist/plugins/tidb-pool.js +8 -1
  219. package/dist/plugins/tidb-session-store.js +2 -2
  220. package/dist/plugins/web-search.d.ts +1 -1
  221. package/dist/plugins/web-search.js +2 -2
  222. package/dist/request-declaration-refusal.d.ts +94 -0
  223. package/dist/request-declaration-refusal.js +78 -0
  224. package/dist/request-image-urls.d.ts +6 -0
  225. package/dist/request-image-urls.js +27 -0
  226. package/dist/request-key-closure.d.ts +5 -0
  227. package/dist/request-key-closure.js +5 -2
  228. package/dist/request-value-closure.d.ts +31 -2
  229. package/dist/request-value-closure.js +7 -1
  230. package/dist/rule-entry-list.d.ts +3 -2
  231. package/dist/rule-entry-list.js +2 -2
  232. package/dist/rules-consent.js +7 -4
  233. package/dist/run-local.d.ts +2 -2
  234. package/dist/runs.js +2 -1
  235. package/dist/runtime-caps-resolver.js +1 -1
  236. package/dist/runtime-governance.d.ts +5 -5
  237. package/dist/sandbox-git-lease.d.ts +49 -0
  238. package/dist/sandbox-git-lease.js +60 -0
  239. package/dist/sandbox-git-plane.d.ts +84 -0
  240. package/dist/sandbox-git-plane.js +105 -0
  241. package/dist/sandbox-pkg-source.d.ts +28 -1
  242. package/dist/sandbox-pkg-source.js +1 -2
  243. package/dist/sealed-key.d.ts +19 -0
  244. package/dist/sealed-key.js +47 -4
  245. package/dist/security.d.ts +16 -4
  246. package/dist/security.js +8 -3
  247. package/dist/server-secret-env.d.ts +6 -0
  248. package/dist/server-secret-env.js +14 -0
  249. package/dist/session-error-wire.d.ts +14 -6
  250. package/dist/session-error-wire.js +2 -1
  251. package/dist/session-incarnation.d.ts +16 -5
  252. package/dist/session-incarnation.js +7 -4
  253. package/dist/session-policy-wire.d.ts +1 -1
  254. package/dist/session-policy-wire.js +2 -2
  255. package/dist/session-row.d.ts +3 -17
  256. package/dist/session-row.js +4 -0
  257. package/dist/session-sync.d.ts +15 -3
  258. package/dist/session-sync.js +5 -2
  259. package/dist/spec-fields.d.ts +43 -13
  260. package/dist/spec-fields.js +33 -12
  261. package/dist/stored-request-prompt-profile-m30.d.ts +49 -0
  262. package/dist/stored-request-prompt-profile-m30.js +25 -0
  263. package/dist/task-a2a.d.ts +52 -81
  264. package/dist/task-a2a.js +219 -89
  265. package/dist/task-mcp.d.ts +7 -15
  266. package/dist/task-mcp.js +16 -51
  267. package/dist/task-settings.d.ts +2 -2
  268. package/dist/tool-approval.d.ts +35 -12
  269. package/dist/tool-approval.js +59 -39
  270. package/dist/tool-rule-names.d.ts +5 -0
  271. package/dist/trace/core-keyset-guard.d.ts +5 -5
  272. package/dist/trace/engine-notice-wire.d.ts +1 -1
  273. package/dist/trace/engine-notice-wire.js +2 -0
  274. package/dist/trace/exit-seat.js +37 -13
  275. package/dist/trace/ledger-sink.d.ts +4 -5
  276. package/dist/trace/ledger-sink.js +3 -7
  277. package/dist/trace/project.d.ts +37 -3
  278. package/dist/trace/project.js +20 -6
  279. package/dist/trace/redact.d.ts +40 -12
  280. package/dist/trace/redact.js +332 -128
  281. package/dist/trace/self-minted-wire.d.ts +641 -0
  282. package/dist/trace/self-minted-wire.js +201 -0
  283. package/dist/trace/wire-projection-faces.d.ts +5 -3
  284. package/dist/trace/wire-projection-faces.js +7 -3
  285. package/dist/url-credential-refusal.d.ts +52 -0
  286. package/dist/url-credential-refusal.js +14 -0
  287. package/dist/url-refusal.d.ts +13 -4
  288. package/dist/url-refusal.js +8 -2
  289. package/dist/web-admin-client/apply-effective.js +0 -1
  290. package/dist/web-admin-client/center-request.d.ts +20 -2
  291. package/dist/web-admin-client/center-request.js +40 -5
  292. package/dist/web-admin-client/http-client.js +6 -6
  293. package/dist/web-admin-client/types.d.ts +5 -5
  294. package/dist/workspace-space.d.ts +27 -0
  295. package/dist/workspace-space.js +26 -0
  296. package/docs/DEVICE-EXECUTOR-PROTOCOL.md +11 -5
  297. package/package.json +4 -3
  298. package/scripts/drain-check-local.mjs +2 -1
  299. package/scripts/drain-check.mysql.sql +3 -1
  300. package/scripts/drain-check.pg.sql +3 -1
  301. package/skills/schedule.md +1 -1
  302. package/wire-changes/server@7.104.0.json +134 -0
  303. package/wire-changes/server@7.105.0.json +53 -0
  304. package/wire-changes/server@7.106.0.json +475 -0
  305. package/wire-changes/server@7.107.0.json +64 -0
  306. package/wire-changes/server@7.108.0.json +153 -0
  307. package/wire-changes/server@7.109.0.json +46 -0
  308. package/wire-changes/server@7.110.0.json +90 -0
  309. package/wire-changes/server@7.111.0.json +86 -0
  310. package/wire-changes/server@7.112.0.json +60 -0
  311. package/wire-changes/server@7.113.0.json +26 -0
  312. package/wire-changes/server@7.114.0.json +26 -0
  313. package/wire-changes/server@7.115.0.json +97 -0
  314. package/wire-changes/server@7.116.0.json +218 -0
  315. package/wire-changes/server@7.116.1.json +26 -0
  316. package/wire-changes/server@7.117.0.json +65 -0
  317. package/wire-changes/server@7.118.0.json +129 -0
  318. package/wire-changes/server@7.119.0.json +65 -0
  319. package/wire-changes/server@7.120.0.json +89 -0
  320. package/wire-changes/server@7.121.0.json +219 -0
  321. package/wire-changes/server@7.122.0.json +54 -0
  322. package/wire-changes/server@7.123.0.json +26 -0
  323. package/wire-changes/server@7.124.0.json +336 -0
  324. package/wire-changes/server@7.124.1.json +26 -0
  325. package/wire-changes/server@7.125.0.json +111 -0
  326. package/wire-changes/server@7.126.0.json +285 -0
  327. package/wire-changes/server@7.127.0.json +77 -0
  328. package/wire-changes/server@7.127.1.json +26 -0
  329. package/wire-changes/server@7.127.2.json +53 -0
  330. package/wire-changes/server@7.128.0.json +26 -0
  331. package/wire-changes/server@7.129.0.json +106 -0
  332. package/wire-changes/server@7.129.1.json +26 -0
  333. package/wire-changes/server@7.130.0.json +26 -0
  334. package/wire-changes/server@7.131.0.json +118 -0
  335. package/wire-changes/server@7.132.0.json +226 -0
  336. package/wire-changes/server@7.133.0.json +1155 -0
  337. package/wire-changes/server@7.134.0.json +107 -0
  338. package/wire-changes/server@7.135.0.json +174 -0
  339. package/wire-changes/server@7.136.0.json +448 -0
  340. package/wire-changes/server@7.137.0.json +825 -0
  341. package/dist/url-credential.d.ts +0 -52
  342. package/dist/url-credential.js +0 -49
@@ -148,6 +148,33 @@ export const SELF_MINTED_WIRE = {
148
148
  title: { attr: "-", since: "7.133.0" },
149
149
  },
150
150
  },
151
+ credentialPlaneSandboxGitState: {
152
+ at: "GET /v1/capabilities credentialPlane.sandboxGit.state",
153
+ members: {
154
+ on: { attr: "-", since: "7.137.0" },
155
+ off: { attr: "-", since: "7.137.0" },
156
+ },
157
+ },
158
+ credentialPlaneSandboxGitOffReason: {
159
+ at: "GET /v1/capabilities credentialPlane.sandboxGit.reason",
160
+ members: {
161
+ single_user: { attr: "-", since: "7.137.0" },
162
+ lane_without_boundary: { attr: "-", since: "7.137.0" },
163
+ no_caller_credential: { attr: "-", since: "7.137.0" },
164
+ center_not_https: { attr: "-", since: "7.137.0" },
165
+ secret_seat_unverified: { attr: "-", since: "7.137.0" },
166
+ secret_seat_denied: { attr: "-", since: "7.137.0" },
167
+ pod_patch_reaches_broker: { attr: "-", since: "7.137.0" },
168
+ broker_image_unset: { attr: "-", since: "7.137.0" },
169
+ no_origins: { attr: "-", since: "7.137.0" },
170
+ },
171
+ },
172
+ credentialPlaneSandboxGitOriginReason: {
173
+ at: "GET /v1/capabilities credentialPlane.sandboxGit.origins[].reason",
174
+ members: {
175
+ insecure_transport: { attr: "-", since: "7.137.0" },
176
+ },
177
+ },
151
178
  healthAuthKind: {
152
179
  at: "GET /health auth.kinds[]",
153
180
  members: {
@@ -235,6 +262,15 @@ export const SELF_MINTED_WIRE = {
235
262
  not_object: { attr: "-", since: "7.133.0" },
236
263
  },
237
264
  },
265
+ inheritEnvRefusalReason: {
266
+ at: "400 request.field_invalid reason(inheritEnv 的值形 / 车道 / 无会话三只拒;另带 field: \"inheritEnv\")",
267
+ members: {
268
+ unknown_word: { attr: "-", since: "7.137.0" },
269
+ not_a_string: { attr: "-", since: "7.137.0" },
270
+ lane_not_host: { attr: "-", since: "7.137.0" },
271
+ no_authorizer_session: { attr: "-", since: "7.137.0" },
272
+ },
273
+ },
238
274
  submitIdempotency: {
239
275
  at: "提交幂等(<端点>#<面> → 应答状态)",
240
276
  members: {
@@ -268,6 +304,14 @@ export const SELF_MINTED_WIRE = {
268
304
  center: { attr: "-", since: "7.135.0" },
269
305
  },
270
306
  },
307
+ wiringSkillSource: {
308
+ at: "wiring_manifest skills[].source(run 级技能名册的来处;段只投根腿 / 续跑腿帧,零技能 = [])",
309
+ members: {
310
+ factory: { attr: "-", since: "7.137.0" },
311
+ center: { attr: "-", since: "7.137.0" },
312
+ request: { attr: "-", since: "7.137.0" },
313
+ },
314
+ },
271
315
  configCatalogValueVerdict: {
272
316
  at: "GET /v1/config/catalog rows[] 的判词位(<键> → 在场律)",
273
317
  members: {
@@ -287,6 +331,146 @@ export const SELF_MINTED_WIRE = {
287
331
  aliases: { attr: "always", since: "7.135.0" },
288
332
  },
289
333
  },
334
+ approvalRequestCardKey: {
335
+ at: "approval_request 帧 card.<键>(活铸帧的 card · 落库的卡信封 card_json · 断连重放帧的 card)",
336
+ members: {
337
+ approvalCard: { attr: "present-iff", since: "7.136.0" },
338
+ },
339
+ },
340
+ approvalQueuePendingKey: {
341
+ at: "GET /v1/approvals pending[] 行 · GET /v1/approvals/stream pending 帧(停驻技能卡的批准绑定三位;与助手收件箱行同一只投影)",
342
+ members: {
343
+ boundGrantDigest: { attr: "present-iff", since: "7.136.0" },
344
+ boundGrants: { attr: "present-iff", since: "7.136.0" },
345
+ classifierNoRuling: { attr: "present-iff", since: "7.136.0" },
346
+ },
347
+ },
348
+ constraintRejectedBodyKey: {
349
+ at: "409 resume.constraint_rejected 拒体(<键> → 在场律)",
350
+ members: {
351
+ acceptableForm: { attr: "present-iff", since: "7.137.0" },
352
+ },
353
+ },
354
+ endpointFaceStatus: {
355
+ at: "逐端点应答面 → 状态(<端点>#<面> → 状态;只登记本版改了状态的面)",
356
+ members: {
357
+ "POST /v1/approvals/:sessionId/decide#deny(复活不了的停驻行:无 agent 名 / 无根会话锚;体 { taskId, status: failed, decision: deny })": { attr: 200, since: "7.136.0" },
358
+ "GET /v1/sessions/:id/sync/manifest#store_connection_fault(体 state.file_history_unreadable + permanence: transient)": { attr: 503, since: "7.136.0" },
359
+ "GET /v1/sessions/:id/sync/entries#store_connection_fault(应答头发出之前;体同上)": { attr: 503, since: "7.136.0" },
360
+ "GET /v1/sessions/:id/sync/history/blobs/:hash#store_connection_fault(体同上)": { attr: 503, since: "7.136.0" },
361
+ "GET /v1/sessions/:id/sync/manifest#store_connection_fault_session_gate(会话门那一读;体同上)": { attr: 503, since: "7.137.0" },
362
+ "GET /v1/sessions/:id/sync/entries#store_connection_fault_session_gate(会话门那一读,应答头发出之前;体同上)": { attr: 503, since: "7.137.0" },
363
+ "GET /v1/sessions/:id/sync/history/blobs/:hash#store_connection_fault_session_gate(会话门那一读;体同上)": { attr: 503, since: "7.137.0" },
364
+ "GET /v1/sessions/:id/sync/manifest#store_deployment_fault(缺表 / 权限拒;门读与读腿同一形;体 state.file_history_unreadable + permanence: terminal)": { attr: 503, since: "7.137.0" },
365
+ "GET /v1/sessions/:id/sync/entries#store_deployment_fault(应答头发出之前;体同上)": { attr: 503, since: "7.137.0" },
366
+ "GET /v1/sessions/:id/sync/history/blobs/:hash#store_deployment_fault(体同上)": { attr: 503, since: "7.137.0" },
367
+ "GET /v1/sessions/:id/events#corrupt_archive(DB_BACKEND=local;开流之前;体 corrupt_session)": { attr: 500, since: "7.136.0" },
368
+ "PATCH /v1/sessions/:id#corrupt_archive(DB_BACKEND=local;体 corrupt_session)": { attr: 500, since: "7.136.0" },
369
+ "POST /v1/tasks#stored_log_invalid(同步腿;打开已存日志撞上结构坏:悬空父 / 自指 / 成环 / 叶子缺席;零工作的拒;体 invalid_session)": { attr: 500, since: "7.137.0" },
370
+ "POST /v1/sessions/:id/sync/import#identical_repush_blob_missing(体 missing_blob)": { attr: 422, since: "7.136.0" },
371
+ "PATCH /v1/sessions/:id#title_no_visible_character(体 request.field_invalid)": { attr: 400, since: "7.136.0" },
372
+ "POST /v1/sessions/:id/sync/import#title_no_visible_character(Phase A 体的 title;体 request.field_invalid)": { attr: 400, since: "7.136.0" },
373
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#images_url_credential(新提交;体 request.field_invalid + field images[i].url + reason url_userinfo|url_credential_param)": { attr: 400, since: "7.136.0" },
374
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_malformed(新提交;列表不是数组 / 条目不是对象 / 键值判不出形;体 request.field_invalid)": { attr: 400, since: "7.136.0" },
375
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_unknown_key(新提交;词表外的键;体 request.body_shape + unknownKeys)": { attr: 400, since: "7.136.0" },
376
+ "POST /v1/tool-approvals/:id/respond#new_owner_after_adoption(收编之后的新属主;本副本上仍有引擎腿在等的活卡,决议交给那条腿)": { attr: 200, since: "7.136.0" },
377
+ "GET /v1/tool-approvals/:id#previous_owner_after_adoption(收编之后的前属主;按问读口)": { attr: 404, since: "7.136.0" },
378
+ "POST /v1/tool-approvals/:id/respond#edited_rule_text_refused_after_adoption(匿名活卡收编给具名主体后新属主交坏规则文本;体 request.body_shape;契约成文的判据,今天经 /v1/adoption 到不了)": { attr: 400, since: "7.136.0" },
379
+ "POST /v1/tasks|/v1/runs#command_line_slots_without_sealed_key_store(stdio MCP 的 command / args 与 command hook 的 command / args;体 conflict.checkpoint_ctx_unsealable + field + reason no_key_store;POST /v1/tasks/stream 在终局帧上带本码;本服务自己的装配下不可达(装配期已对「店在而封签器缺席」拒启,见 submit-ctx.ts 自述))": { attr: 409, since: "7.136.0" },
380
+ "ALL authenticated routes#bearer_token_without_scope_claim(鉴权桥验证腿;配了 service 凭据或多租 REQUIRE_PRINCIPAL 的部署;体通用 auth.unauthorized)": { attr: 401, since: "7.136.0" },
381
+ "ALL principal-reading routes#principal_not_a_name(主体头 / SSO 令牌的 sub / 直连门 JWT 的 sub 不是一位主体的名字:空 / 空白 / 带控制、行段分隔或不可见格式字符;体 principal_not_a_name)": { attr: 400, since: "7.137.0" },
382
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#promptProfile(新提交;体 request.body_shape + unknownKeys [promptProfile])": { attr: 400, since: "7.137.0" },
383
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#skills[i].mods|agents[i].skills[j].mods(新提交;体 request.field_invalid)": { attr: 400, since: "7.137.0" },
384
+ "PUT /v1/sessions/:id/policy|POST /v1/sessions/:id/sync/import#toolDeny 名内带 *(`*` / `mcp__git*` / `Bas*`)": { attr: 200, since: "7.137.0" },
385
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(settings.permissions.deny|ask)": { attr: 200, since: "7.137.0" },
386
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(excludeTools)": { attr: 200, since: "7.137.0" },
387
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(skills[i].disallowedTools|agents[i].skills[j].disallowedTools)": { attr: 200, since: "7.137.0" },
388
+ "POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(agents[i].denyTools)": { attr: 200, since: "7.137.0" },
389
+ "POST /v1/assistant/tasks/:id/plan_review#checkpointId_not_current(体带的门身份不是该会话此刻待决的 plan 门;体 approval_stale + currentPending { checkpointId }?;不落决断、零状态改动)": { attr: 409, since: "7.137.0" },
390
+ "POST /v1/assistant/tasks/:id/plan_review#checkpointId_current(体带当前门的身份;受理形与不带键同)": { attr: 200, since: "7.137.0" },
391
+ },
392
+ },
393
+ refusalSentenceForm: {
394
+ at: "拒体 message 的句型(<码>#<座> → 句型骨架;码 / 状态 / 机读位不变)",
395
+ members: {
396
+ "409 decide.row_unrevivable#no_agent_name": { attr: "ends: deny it to close the card (the agent then ends as failed)", since: "7.136.0" },
397
+ "409 decide.row_unrevivable#no_root_anchor": { attr: "ends: deny it to close the card (the agent then ends as failed)", since: "7.136.0" },
398
+ "400 request.field_invalid#mcpServers.over_cap(受理口 · POST /v1/capabilities/mcp/probe 同句)": { attr: "head: <field> has <count> entries — at most <cap> are accepted", since: "7.136.0" },
399
+ "400 request.field_invalid#a2aPeers.over_cap": { attr: "tail: 声明列表拒绝骨架的句尾(与 mcpServers 共用 request-declaration-refusal)", since: "7.136.0" },
400
+ "400 request.field_invalid#a2aPeers[i].url|cardUrl.credential": { attr: "<field> (peer <name>) is not a usable declaration — <rule> …", since: "7.136.0" },
401
+ "400 request.field_invalid#title.no_visible_character(PATCH /v1/sessions/:id · 会话同步 2c 导入的 title)": { attr: "title must contain at least one visible character", since: "7.136.0" },
402
+ "503 state.file_history_unreadable#store_connection_fault(会话同步三条拉取读腿)": { attr: "this session's stored state could not be read right now (the store connection failed), so nothing was exported — retry later", since: "7.136.0" },
403
+ "503 state.file_history_unreadable#store_deployment_fault(会话同步三条拉取口)": { attr: "this session's stored state cannot be read: the store does not match what this deployment requires (a table is missing or the database account lacks a privilege), so nothing was exported — retrying will not help until an operator repairs the store", since: "7.137.0" },
404
+ "connect_failed(run 失败终局)#snapshot_bucket_missing(k8s 车道读 latest 得 404 NoSuchBucket;连沙箱失败,一只 pod 都不建)": { attr: "workspace space pointer read failed (snapshot_bucket_missing): the workspace snapshot bucket <name> (WORKSPACE_SNAPSHOT_BUCKET; default workspaces) does not exist in the object store — refusing to start this run … Ways out: create the bucket, or set WORKSPACE_SNAPSHOT_BUCKET to one that exists, or set WORKSPACE_PERSIST=off …", since: "7.136.0" },
405
+ "400 request.field_invalid#images[i].url.credential": { attr: "<field> <规则句> — the URL is kept as written (a parked task's resume context, logs), while images[i] can carry the image bytes inline: send { data, mimeType } instead of a URL that holds the credential", since: "7.136.0" },
406
+ "400 request.field_invalid#a2aPeers.not_array": { attr: "head: a2aPeers is <shape>, not an array of A2A peer declarations", since: "7.136.0" },
407
+ "400 request.field_invalid#a2aPeers[i].not_object": { attr: "head: a2aPeers[i] is <shape>, not an A2A peer declaration (an object)", since: "7.136.0" },
408
+ "400 request.field_invalid#a2aPeers[i].<key>.unusable(url / cardUrl 凭据拒之外的键值坏形)": { attr: "<field> (peer <name>) is not a usable declaration — <rule> …", since: "7.136.0" },
409
+ "400 request.body_shape#a2aPeers[i].unknown_key": { attr: "body: unrecognized key(s) on an A2A peer declaration — refused rather than dropped …; Accepted per entry: <keys>", since: "7.136.0" },
410
+ "409 conflict.checkpoint_ctx_unsealable#submit(提交面:本服务没有保管店)": { attr: "slots: static request headers, the command lines and environment values given to MCP stdio servers and command hooks, settings.env, or settings.webSearch.apiKey", since: "7.136.0" },
411
+ "409 conflict.checkpoint_ctx_unsealable#resume(续跑上下文读口)": { attr: "slots: static request headers, the command lines and environment values given to MCP stdio servers and command hooks, settings.env, or settings.webSearch.apiKey", since: "7.136.0" },
412
+ "400 request.field_invalid#promptLean.not_boolean": { attr: "promptLean must be a boolean", since: "7.137.0" },
413
+ "409 checkpoint.unsupported_version#retired_request_key(续跑问点:存体仍带退役请求键 promptProfile)": { attr: "this task was suspended by an earlier server version and its stored request still carries promptProfile, a request key this version no longer reads (…) … submit the work again as a new task with promptLean in place of promptProfile, …", since: "7.137.0" },
414
+ "400 request.field_invalid#skills[i].mods(顶层技能项)": { attr: "skill.mods is not a request key — skill registrations are code the deployment mounts, not request data (…)", since: "7.137.0" },
415
+ "400 request.field_invalid#attachments.not_object": { attr: "attachments must be an object { …, mcpInstructions?, mcpUnavailable? }", since: "7.137.0" },
416
+ "400 request.field_invalid#attachments.mcpUnavailable.not_boolean": { attr: "attachments.mcpUnavailable must be a boolean", since: "7.137.0" },
417
+ "读成空的规则条目拒句#wildcard_all(授予侧)": { attr: "`*` grants nothing on an allow list (the entries beside it still apply) — …; on a deny or ask list `*` is every tool", since: "7.137.0" },
418
+ "读成空的规则条目拒句#namespace_wildcard(授予侧)": { attr: "an allow list reads a `*` only in a protocol name's tool segment — …; on a deny or ask list a `*` in a name is a glob over the whole name (…)", since: "7.137.0" },
419
+ "400 request.field_invalid#plan_review.checkpointId.not_non_empty_string": { attr: "checkpointId must be a non-empty string (the identity of the plan gate you decided on: …)", since: "7.137.0" },
420
+ "400 request.field_invalid#plan_review.checkpointId.too_large": { attr: "checkpointId too large (max <n> chars)", since: "7.137.0" },
421
+ "400 request.body_shape#/decide.checkpointId(落 unsupportedKeys)": { attr: "unsupported (a body field of POST /v1/assistant/tasks/:id/plan_review — send it there, this door never reads it): checkpointId", since: "7.137.0" },
422
+ },
423
+ },
424
+ decisionBodyKey: {
425
+ at: "回决门族决断体的受理键(<端点>#<键> → 读法;只登本版新增的键)",
426
+ members: {
427
+ "POST /v1/assistant/tasks/:id/plan_review#checkpointId": { attr: "optional;non-empty-string≤128;not-current⇒409 approval_stale;direct-door:signed-envelope-ext", since: "7.137.0" },
428
+ },
429
+ },
430
+ approvalStaleBodyKey: {
431
+ at: "409 approval_stale 拒体(<端点>#<键> → 在场律)",
432
+ members: {
433
+ "POST /v1/assistant/tasks/:id/plan_review#currentPending.checkpointId": { attr: "present-iff", since: "7.137.0" },
434
+ },
435
+ },
436
+ parkLedgerRowKey: {
437
+ at: "GET /v1/runs/:id/events 的 suspended / needs_review 账本行 data(<键> → 在场律)",
438
+ members: {
439
+ checkpointId: { attr: "present-iff", since: "7.137.0" },
440
+ gate: { attr: "always", since: "1.214.2" },
441
+ reopened: { attr: "present-iff", since: "1.231.0" },
442
+ toolCallId: { attr: "present-iff", since: "7.41.0" },
443
+ },
444
+ },
445
+ approvalEnvelopeExtKey: {
446
+ at: "直连门证明 HMAC 信封第 6 位扩展对象的键(<键> → 用它的门)",
447
+ members: {
448
+ answer: { attr: "POST /v1/approvals/:sessionId/decide", since: "7.87.0" },
449
+ checkpointId: { attr: "POST /v1/assistant/tasks/:id/plan_review", since: "7.137.0" },
450
+ permissionModeAfter: { attr: "POST /v1/assistant/tasks/:id/plan_review", since: "7.87.0" },
451
+ },
452
+ },
453
+ storeFaultPermanence: {
454
+ at: "文件历史店故障答的体键 permanence(422 adopt_failed · restore_failed 等 · 503 state.file_history_unreadable)",
455
+ members: {
456
+ transient: { attr: "present-iff", since: "7.136.0" },
457
+ "terminal#deployment": { attr: "present-iff", since: "7.137.0" },
458
+ },
459
+ },
460
+ configCatalogRow: {
461
+ at: "GET /v1/config/catalog rows[](<行名> → 域;只登本版新增的行)",
462
+ members: {
463
+ SEALED_KEY_DIR: { attr: "store", since: "7.136.0" },
464
+ },
465
+ },
466
+ deviceProtocolRevision: {
467
+ at: "GET /v1/capabilities deviceExecutor.protocolVersion 与 device WS challenge 帧的修订号(<修订号> → 它加进结局码闭集的词)",
468
+ members: {
469
+ 1: { attr: "base", since: "7.51.0" },
470
+ 2: { attr: "+liveness_no_output", since: "7.133.0" },
471
+ 3: { attr: "+name_too_long", since: "7.137.0" },
472
+ },
473
+ },
290
474
  wireValueRule: {
291
475
  at: "出口值变换(<端点>#<键> → 变换)",
292
476
  members: {
@@ -298,6 +482,23 @@ export const SELF_MINTED_WIRE = {
298
482
  "GET /v1/runs/:id/events#tool_end.output[](媒体块)": { attr: "durableMediaDescriptor+totalChars", since: "7.127.0" },
299
483
  "SSE tool_end#structured.file.base64(媒体卡)": { attr: "verbatim-bytes;backlog>64MiB⇒key-dropped", since: "7.127.2" },
300
484
  "GET /v1/runs/:id/events#tool_end.structured.file.base64(媒体卡)": { attr: "durableMediaCardKeyDropped", since: "7.127.2" },
485
+ "GET /v1/assistant/inbox#objective": { attr: "runRowObjectivePreview", since: "7.136.0" },
486
+ "SSE elicitation_complete#action(没人应答的释放)": { attr: "cancel-not-decline", since: "7.136.0" },
487
+ "GET /v1/config/catalog#rows[MCP_ELICITATION_MAX_CONCURRENT].derivedDefaultNote": { attr: "default-window-source:server", since: "7.136.0" },
488
+ "GET /v1/config/catalog#rows[MCP_ELICITATION_MAX_TOTAL].derivedDefaultNote": { attr: "default-window-source:server", since: "7.136.0" },
489
+ "GET /v1/config/catalog#rows[MCP_ELICITATION_MIN_INTERVAL_MS].derivedDefaultNote": { attr: "default-window-source:server", since: "7.136.0" },
490
+ "GET /v1/config/catalog#rows[MCP_ELICITATION_TTL_MS].derivedDefaultNote": { attr: "default-window-source:server", since: "7.136.0" },
491
+ "GET /v1/config/catalog#rows[ANTHROPIC_API_KEY].semantics": { attr: "x-api-key-only;mutually-exclusive;both-set-refuses-boot", since: "7.136.0" },
492
+ "GET /v1/config/catalog#rows[ANTHROPIC_AUTH_TOKEN].semantics": { attr: "bearer-only;mutually-exclusive;both-set-refuses-boot", since: "7.136.0" },
493
+ "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_BUCKET].semantics": { attr: "boot-checks-bucket;runtime-latest-no-such-bucket-fails-run", since: "7.136.0" },
494
+ "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_PREFIX].semantics": { attr: "multi-segment-prefix;bad-segment-refuses-boot", since: "7.136.0" },
495
+ "GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_PREFIX].derivedDefaultNote": { attr: "absent=>kata", since: "7.136.0" },
496
+ "GET /v1/config/catalog#rows[K8S_SANDBOX_ENV].semantics": { attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot", since: "7.137.0" },
497
+ "GET /v1/sessions/:id/mcp#servers[].error": { attr: "redactSecrets-outside-engine-marks+truncate:200", since: "7.137.0" },
498
+ "POST /v1/sessions/:id/mcp/reconnect#reason|status.error|listingIncomplete.error": { attr: "redactSecrets-outside-engine-marks+truncate:200", since: "7.137.0" },
499
+ "GET /v1/config/catalog#rows[MODEL_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
500
+ "GET /v1/config/catalog#rows[MODEL_VISION].derivedDefaultNote": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
501
+ "GET /v1/config/catalog#rows[MODEL_CHEAP_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
301
502
  },
302
503
  },
303
504
  };
@@ -129,13 +129,13 @@ export declare const WIRE_PROJECTION_FACES: {
129
129
  readonly tool_start: {
130
130
  readonly projector: "toolStartEventData";
131
131
  readonly coreType: string;
132
- readonly excluded: readonly [];
132
+ readonly excluded: readonly ["requestedBy"];
133
133
  readonly minted: readonly [];
134
134
  };
135
135
  readonly tool_end: {
136
136
  readonly projector: "toolEndEventData";
137
137
  readonly coreType: string;
138
- readonly excluded: readonly [];
138
+ readonly excluded: readonly ["requestedBy", "answeredBy"];
139
139
  readonly minted: readonly [];
140
140
  };
141
141
  readonly tool_progress: {
@@ -226,9 +226,10 @@ export declare const WIRE_PROJECTION_FACES: {
226
226
  readonly wiring_manifest_tenant: {
227
227
  readonly projector: "wiringManifestEventData";
228
228
  readonly coreType: `WiringManifest & ${string}`;
229
- readonly excluded: readonly ["governance", "configFingerprint", "autoConsolidation", "readDeny", "peerPresence", "advisor"];
229
+ readonly excluded: readonly ["governance", "configFingerprint", "autoConsolidation", "readDeny", "peerPresence", "advisor", "hostFloor"];
230
230
  readonly unwrapped: readonly ["manifest"];
231
231
  readonly minted: readonly ["instructions"];
232
+ readonly mintedConditional: readonly ["skills"];
232
233
  };
233
234
  readonly wiring_manifest_operator: {
234
235
  readonly projector: "wiringManifestOperatorEventData";
@@ -236,6 +237,7 @@ export declare const WIRE_PROJECTION_FACES: {
236
237
  readonly excluded: readonly string[];
237
238
  readonly unwrapped: readonly ["manifest"];
238
239
  readonly minted: readonly string[];
240
+ readonly mintedConditional: readonly string[];
239
241
  };
240
242
  readonly engine_notice: {
241
243
  readonly projector: "engineNoticeEventData";
@@ -26,8 +26,8 @@ function withoutSections(all, drop) {
26
26
  export const WIRE_PROJECTION_FACES = {
27
27
  task_progress: { projector: "taskProgressEventData", coreType: arm("task_progress"), excluded: [], minted: [] },
28
28
  task_started: { projector: "taskStartedEventData", coreType: arm("task_started"), excluded: [], minted: [] },
29
- tool_start: { projector: "toolStartEventData", coreType: arm("tool_start"), excluded: [], minted: [] },
30
- tool_end: { projector: "toolEndEventData", coreType: arm("tool_end"), excluded: [], minted: [] },
29
+ tool_start: { projector: "toolStartEventData", coreType: arm("tool_start"), excluded: ["requestedBy"], minted: [] },
30
+ tool_end: { projector: "toolEndEventData", coreType: arm("tool_end"), excluded: ["requestedBy", "answeredBy"], minted: [] },
31
31
  tool_progress: { projector: "toolProgressEventData", coreType: arm("tool_progress"), excluded: [], minted: [] },
32
32
  tool_disclosure: { projector: "toolDisclosureEventData", coreType: arm("tool_disclosure"), excluded: [], minted: [] },
33
33
  tool_roster_delta: { projector: "toolRosterDeltaEventData", coreType: arm("tool_roster_delta"), excluded: [], minted: [] },
@@ -51,9 +51,10 @@ export const WIRE_PROJECTION_FACES = {
51
51
  wiring_manifest_tenant: {
52
52
  projector: "wiringManifestEventData",
53
53
  coreType: `WiringManifest & ${arm("wiring_manifest")}`,
54
- excluded: ["governance", "configFingerprint", "autoConsolidation", "readDeny", "peerPresence", "advisor"],
54
+ excluded: ["governance", "configFingerprint", "autoConsolidation", "readDeny", "peerPresence", "advisor", "hostFloor"],
55
55
  unwrapped: ["manifest"],
56
56
  minted: ["instructions"],
57
+ mintedConditional: ["skills"],
57
58
  },
58
59
  wiring_manifest_operator: {
59
60
  projector: "wiringManifestOperatorEventData",
@@ -65,6 +66,9 @@ export const WIRE_PROJECTION_FACES = {
65
66
  get minted() {
66
67
  return WIRE_PROJECTION_FACES.wiring_manifest_tenant.minted;
67
68
  },
69
+ get mintedConditional() {
70
+ return WIRE_PROJECTION_FACES.wiring_manifest_tenant.mintedConditional;
71
+ },
68
72
  },
69
73
  engine_notice: { projector: "engineNoticeEventData", coreType: "EngineNotice", excluded: [], minted: ["ts"] },
70
74
  memory_import_report: { projector: "buildImportReportWire", coreType: "MemoryImportReport", excluded: [], minted: [] },
@@ -0,0 +1,52 @@
1
+ /**
2
+ * **请求面「URL 里带凭据」座位的拒体铸点**([ref] / [ref];判官本身在契约包)。
3
+ *
4
+ * ## 谁判、谁铸
5
+ * 「这个 URL 里带着凭据吗」的**判官**(`findUrlCredential` / `findUrlUserinfo` / 规则句 `urlCredentialRule` / 拒因词 `URL_CREDENTIAL_REASONS` / 凭据名表 `CREDENTIAL_PARAM_NAMES`)
6
+ * 住 `@sema-agent/settings-schema` 包根(14.5.0 起;规则、拒因词与规则句由本仓上移时逐字搬走,本仓零副本)。规则一条:URL 里的凭据 = 日志脱敏器已经在用的那个定义 ——
7
+ * userinfo(只有用户名也算),或 query / fragment 里名字整名在凭据名表上的参数(名字按收方的读法读:`URLSearchParams` 解一次码,ASCII 大小写不敏感);答首个命中,值从不进答案。
8
+ * 契约包只判「有没有」:**拒体的形**(HTTP 码、字段坐标、出路句)是座位自己的铸点 —— 本模块就是这一处,下面的导出之外没有第二处。
9
+ *
10
+ * ## 座位(同读包根的判官;座位只决定读哪个值、坐标怎么写、凭据改走哪个已封签的位)
11
+ * · 请求面 MCP `transport.url`(`task-mcp.ts` 条目判官表):读器只判 `http(s)://` 前缀,解析不了的 url 由拨号期失败答(fetch 对带 userinfo 的 URL 本就构造即抛);
12
+ * · 请求面 A2A 对端 `url` / `cardUrl`(`task-a2a.ts` 的条目判官表 `assertRequestA2aEntries`,fresh 腿):`url` / `cardUrl` 先判是 http(s) 串、再问判官;超过 32 条的列表整份 400(判官看过每一条,或这份体不收);
13
+ * · 请求面图片 `images[i].url`(`request-image-urls.ts` 的 `assertRequestImageUrls`,fresh 腿):`{ url }` 臂的串值;没有封签的头位,出路是图片字节走内联 `{ data, mimeType }`;
14
+ * · 请求面 http 钩子 `url`(`hooks/hook-runner.ts` 的 `hooksUrlCredentialIssue`,`admission.ts` 的 settings 子树门):按配置序扫读者交回的配置;
15
+ * · 请求面搜索后端 `endpoint`(`plugins/web-search.ts` 的 `judgeFreshRequestWebSearch`,fresh 提交门):载体之间有差 —— 部署 env 与续跑重放读法只因 userinfo 拒(`findUrlUserinfo`),凭据名参数只在 fresh 门拒;
16
+ * · `SANDBOX_PKG_SOURCE=custom` 的六只地址(`sandbox-pkg-source.ts` 唯一读口):不是层级式 http(s) / 含反斜杠 ⇒ 起服拒(读者是包管理器,不是 WHATWG);拒句走 `url-refusal.ts` 的另一只铸点(值只回显 origin)。
17
+ * 请求面五类座位的拒是同一个形:`400 request.field_invalid` + 体顶层 `field`(体内全坐标)/ `reason`(判官的拒因闭集两词),机读位、原因句骨架与整句只在本模块的铸点
18
+ * ({@link urlCredentialFacts} / {@link urlCredentialRefusalReason} / {@link buildRequestUrlCredentialRefusal})。
19
+ *
20
+ * ## 为什么拒、而不是封或剥
21
+ * 条目有凭据座位的地方(MCP 的 `transport.headers` 是停驻封签位之一),凭据只走那个座:URL 照原样进停驻上下文、日志与读面,封签闭集刻意不收 URL 一类自由文本。
22
+ * 剥掉 / 改写 = 交引擎的不是申报的那一份;半封一只 URL = 封签规则多一种半值封法。受理口拒,拒句点名座位。
23
+ */
24
+ import { type UrlCredential, type UrlCredentialReason } from "@sema-agent/settings-schema";
25
+ /** 拒体上的机读位(加性键:直接当 `request.field_invalid` 的附加键用)。 */
26
+ export type UrlCredentialFacts = {
27
+ readonly field: string;
28
+ readonly reason: UrlCredentialReason;
29
+ };
30
+ /** 机读位的唯一铸点:`field` 是座位给的体内全坐标,`reason` 是判官的拒因词(不另造)。 */
31
+ export declare function urlCredentialFacts(field: string, credential: UrlCredential): UrlCredentialFacts;
32
+ /**
33
+ * 出路句(停驻封签的位是请求头):凭据改写进这一条的 `headers`(停驻任务的续跑上下文里只以封签存在)。MCP `transport.headers` · A2A 对端 `headers` ·
34
+ * http 钩子条目 `headers` 三座同一句骨架,`place` 是那一条的 `headers` 在请求体里的坐标。
35
+ */
36
+ export declare function urlCredentialHeaderExit(place: string): string;
37
+ /**
38
+ * 原因句骨架(各座同一句,值不回显):规则句 + 「URL 原样存」的事实 + 出路。`exit` 是座位给的出路句(`urlCredentialHeaderExit` 或座位自己的)。
39
+ * 为什么说「原样存」:封签闭集刻意不收 URL 一类自由文本,所以 URL 照原样进停驻上下文、日志与读面 —— 凭据只许走为它设的座。
40
+ */
41
+ export declare function urlCredentialRefusalReason(credential: UrlCredential, exit: string): string;
42
+ /** 一处请求面拒的整句 + 机读位({@link buildRequestUrlCredentialRefusal} 的产物)。 */
43
+ export interface UrlCredentialRefusal {
44
+ readonly message: string;
45
+ readonly facts: UrlCredentialFacts;
46
+ }
47
+ /**
48
+ * 请求面 URL 座位的拒(整句 + 机读位),`<field>[ (<subject>)] <原因句>`。`subject` 是座位给的条目指认(MCP 的 server 名 / A2A 的 peer 名;坐标本身唯一的座位不带)。
49
+ * MCP 与 A2A 两座的整句要接条目判官表的统一句尾(`request-declaration-refusal.ts`),所以它们取 {@link urlCredentialRefusalReason} + {@link urlCredentialFacts},另几座(http 钩子 / 搜索后端 / 图片)走这一只。
50
+ */
51
+ export declare function buildRequestUrlCredentialRefusal(field: string, credential: UrlCredential, exit: string, subject?: string): UrlCredentialRefusal;
52
+ //# sourceMappingURL=url-credential-refusal.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { urlCredentialRule } from "@sema-agent/settings-schema";
2
+ export function urlCredentialFacts(field, credential) {
3
+ return { field, reason: credential.reason };
4
+ }
5
+ export function urlCredentialHeaderExit(place) {
6
+ return `${place} is stored sealed: send the credential as a header in ${place} (for example "Authorization": "Bearer …")`;
7
+ }
8
+ export function urlCredentialRefusalReason(credential, exit) {
9
+ return `${urlCredentialRule(credential)} — the URL is kept as written (a parked task's resume context, logs), while ${exit}`;
10
+ }
11
+ export function buildRequestUrlCredentialRefusal(field, credential, exit, subject) {
12
+ return { message: `${field}${subject === undefined ? "" : ` (${subject})`} ${urlCredentialRefusalReason(credential, exit)}`, facts: urlCredentialFacts(field, credential) };
13
+ }
14
+ //# sourceMappingURL=url-credential-refusal.js.map
@@ -14,11 +14,10 @@
14
14
  * ## 读者
15
15
  * 中心基址三席 + 公告地址 + 请求期 `centerFetch`(`web-admin-client/center-request.ts` `pathBaseUrlRefusal`:禁 userinfo / query / fragment)·
16
16
  * 续签 issuer(只问形)· 模型路由三键(`model-route-url.ts`:禁 userinfo / fragment,query 照收)· `MEMORY_EMBEDDER_ENDPOINT` 与
17
- * `A2A_SERVE_URL`(禁 userinfo)· `SANDBOX_PKG_SOURCE=custom` 六只地址(形 + 带凭据,后者的判官是 `url-credential.ts`,拒句经 {@link buildUrlCredentialRefusal})。
17
+ * `A2A_SERVE_URL`(禁 userinfo)· `SANDBOX_PKG_SOURCE=custom` 六只地址(形 + 带凭据,后者的判官是契约包根的 `findUrlCredential`,拒句经 {@link buildUrlCredentialRefusal})。
18
18
  * 「scheme 只有判官与展示铸点读」由 `test/config-url-display-safe.test.ts` 的读者普查门钉住。
19
19
  */
20
- import { type HttpUrlFlaw } from "@sema-agent/settings-schema";
21
- import { type UrlCredential } from "./url-credential.js";
20
+ import { type HttpUrlFlaw, type UrlCredential } from "@sema-agent/settings-schema";
22
21
  /**
23
22
  * 拒句里值的样子(纯函数):合格的 http(s) 形 ⇒ 只到 origin(`scheme://host[:port]`,过展示铸点),origin 之后还有东西(userinfo /
24
23
  * 路径 / query / fragment)⇒ 接一枚 `/…`;其余(不透明 / 不可解析 / 层级式非 http(s))⇒ 展示铸点的占位 `«redacted:url»` ——
@@ -29,11 +28,21 @@ import { type UrlCredential } from "./url-credential.js";
29
28
  * 这几处不赌形状律的覆盖面:座位名 + 规则词已经说清了哪一席错在哪,值只需要认得出是哪一台主机。
30
29
  */
31
30
  export declare function buildRefusalShownUrl(raw: string): string;
31
+ /**
32
+ * **自由文本里每一条嵌着的 http(s) URL 换成它的展示形**({@link buildRefusalShownUrl}:`scheme://host[:port]`,origin 之后还有东西接 `/…`;读法不唯一 / 读不出的串给展示铸点的占位),
33
+ * 句子其余部分逐字不动。用在宿主不控制句子的日志面 —— 引擎把「拨不通的 A2A 对端 / MCP 服务器」连同被拨的 URL 拼成一句交来(`onError`),宿主手里没有那条 URL 的结构化值,
34
+ * 只能在文本上换。展示形的铸点仍只有 {@link buildRefusalShownUrl} 一只(userinfo / 路径 / query / fragment 一个字节不进,不赌形状律认得出的令牌形);本函数只负责「找到文本里的 URL」。
35
+ * 非 http(s) 的 scheme 不在射程(这两座的 URL 读器只收 http(s))。纯函数。
36
+ *
37
+ * 已知的界(不是兜底):URL 串里含**裸空白**的(userinfo 里写了空格)在第一个空白处被截 —— 余下的尾巴留在句里。那一形是调用方在受理口就被拒的(userinfo 一律 400),
38
+ * 到不了这里的只有存量停驻体 / 部署基线;引擎的警告句对该形也是把 URL 原样拼进去,没有结构化值可救。
39
+ */
40
+ export declare function buildShownUrlsInText(text: string): string;
32
41
  /**
33
42
  * 拒句的**唯一**铸点:`<subject> <规则句>[; <规则句>…]; got "<值的样子>"`(`build*` = 纯数据)。
34
43
  * 值只经 {@link buildRefusalShownUrl} 出现;`flaws` 来自 settings-schema 的 `httpUrlFlaws`(调用方按首个拒因选自己的码与出路句)。
35
44
  */
36
45
  export declare function buildHttpUrlRefusal(subject: string, raw: string, flaws: readonly HttpUrlFlaw[]): string;
37
- /** 「带凭据」那一形的拒句([ref];判官 `url-credential.ts` 的 `findUrlCredential`):同一只铸点形,规则句换成凭据判官的那一句。 */
46
+ /** 「带凭据」那一形的拒句([ref];判官 = 契约包根的 `findUrlCredential`):同一只铸点形,规则句换成凭据判官的那一句。 */
38
47
  export declare function buildUrlCredentialRefusal(subject: string, raw: string, credential: UrlCredential): string;
39
48
  //# sourceMappingURL=url-refusal.d.ts.map
@@ -1,6 +1,5 @@
1
- import { httpUrlRule, isHierarchicalUrl } from "@sema-agent/settings-schema";
1
+ import { httpUrlRule, isHierarchicalUrl, urlCredentialRule } from "@sema-agent/settings-schema";
2
2
  import { DISPLAY_SAFE_URL_TOKEN, buildDisplaySafeUrl } from "./trace/redact.js";
3
- import { urlCredentialRule } from "./url-credential.js";
4
3
  export function buildRefusalShownUrl(raw) {
5
4
  if (!isHierarchicalUrl(raw))
6
5
  return DISPLAY_SAFE_URL_TOKEN;
@@ -12,6 +11,13 @@ export function buildRefusalShownUrl(raw) {
12
11
  const origin = `${u.protocol}//${u.host}`;
13
12
  return `${buildDisplaySafeUrl(origin)}${u.href === `${origin}/` ? "" : "/…"}`;
14
13
  }
14
+ const EMBEDDED_HTTP_URL = /https?:\/\/[^\s"'`<>()[\]{}]+/gi;
15
+ export function buildShownUrlsInText(text) {
16
+ return text.replace(EMBEDDED_HTTP_URL, (token) => {
17
+ const trail = /[.,;:!?]+$/.exec(token)?.[0] ?? "";
18
+ return buildRefusalShownUrl(trail === "" ? token : token.slice(0, -trail.length)) + trail;
19
+ });
20
+ }
15
21
  export function buildHttpUrlRefusal(subject, raw, flaws) {
16
22
  return composeUrlRefusal(subject, raw, flaws.map(httpUrlRule));
17
23
  }
@@ -52,7 +52,6 @@ function toModel(m, envDefaults = {}, logger) {
52
52
  ...(thinkingDefault ? { defaultThinking: thinkingDefault } : {}),
53
53
  ...(compat ? { compat } : {}),
54
54
  ...(m.extraBody ? { extraBody: m.extraBody } : {}),
55
- ...(Array.isArray(m.promptGuidance) && m.promptGuidance.length > 0 ? { promptGuidance: m.promptGuidance.map(String) } : {}),
56
55
  ...buildModelHeadersKey(m.name, m.headers, m.api),
57
56
  };
58
57
  const explicitAct = m.autoCompactTokens;
@@ -63,6 +63,14 @@ export declare function pullViewQuery(view: {
63
63
  readonly worker?: string | undefined;
64
64
  readonly principal?: string | undefined;
65
65
  }): string;
66
+ /**
67
+ * 中心回了重定向(`egress-redirect.ts` 的判据:`opaqueredirect` 或任何 3xx;304 除外,见 {@link NOT_MODIFIED}):不跟、不重试,类型化拒。拒句是 `egress-redirect.ts` 既有 helper 的那一句(与 hook 直连腿 /
68
+ * 记忆 embedder 同一条律),前面冠上这条请求打的那一席;不回显 `Location`。`status` 是中心回的码(续签器据此落「被拒」终态)。
69
+ */
70
+ export declare class CenterRedirectRefusedError extends Error {
71
+ readonly status: number;
72
+ constructor(status: number, message: string);
73
+ }
66
74
  export interface CenterRequestInit {
67
75
  readonly method?: "GET" | "POST" | "DELETE";
68
76
  /** JSON 请求体(在场 ⇒ `content-type: application/json`)。 */
@@ -84,13 +92,23 @@ export declare function pathBaseUrlRefusal(subject: string, raw: string): string
84
92
  * [ref] —— 凭证续签:`POST {issuer}/api/v1/auth/token/refresh`,form `refresh_token=…`(settings-schema `AUTH_V1_PATHS.tokenRefresh`)。
85
93
  * · 以 `issuer` 为根(可带路径前缀;同源与否由续签器先判,本函数只装配);query / fragment 不带过去。
86
94
  * · **不带 Authorization**:这条端点凭 refresh token 认人,手里的 access token 可能已经过期。
87
- * · `redirect: "manual"`:3xx 不跟 —— POST 307/308 会把体(= refresh token)原样带去 `Location`,同源判据在重定向面前失效。
88
- * 3xx 原样交回,续签器按「被拒」处置。
95
+ * · 经 {@link sendToCenter}(`redirect: "manual"`):POST 307/308 会把体(= refresh token)原样带去 `Location`,同源判据在重定向面前失效 ⇒
96
+ * 中心回重定向 ⇒ 抛 {@link CenterRedirectRefusedError}(不跟),续签器把它落成「被拒」终态(配置事故,重试无益)。
89
97
  */
90
98
  export declare function centerTokenRefresh(issuer: string, refreshToken: string, init: {
91
99
  readonly timeoutMs: number;
92
100
  readonly fetchImpl?: typeof fetch;
93
101
  }): Promise<Response>;
102
+ /**
103
+ * 鉴权桥的 JWKS 拉取:`GET <jwksUrl>`,不带凭证(公钥集是公开的)。地址缺省 = 签发方(`SEMA_WEB_ADMIN_URL` / `AUTH_BRIDGE_ISSUER`)+ 契约包的
104
+ * `WEB_ADMIN_JWKS_PATH`,运维可用 `AUTH_BRIDGE_JWKS_URL` 改写 —— 打的是中心的公钥面,所以同经 {@link sendToCenter}:回重定向 ⇒ 同一只类型化拒、不跟
105
+ * (此前它自带 `redirect: "error"`,是中心面上的第二种重定向读法,拒句是传输层的 `fetch failed`、不点名出路)。体量帽 / 解析 / 缓存仍是调用方
106
+ * (`auth-bridge.ts`)的事;本函数只发这一次请求。
107
+ */
108
+ export declare function centerJwksFetch(jwksUrl: string, init: {
109
+ readonly timeoutMs: number;
110
+ readonly fetchImpl?: typeof fetch | undefined;
111
+ }): Promise<Response>;
94
112
  /**
95
113
  * 对中心发一条请求。返回响应与**这次请求所用凭证的身份**(调用方据此给拿回来的候选打分箱标记,
96
114
  * 见 `boot/web-admin.ts` 的 LKG / prompt 状态分箱)。
@@ -4,6 +4,7 @@ import { FLEET_LIVE_PATHS, FLEET_PATHS } from "@sema-agent/settings-schema/fleet
4
4
  import { CenterCredentialUnavailableError } from "../center-credential.js";
5
5
  import { WEB_ADMIN_ENV, httpUrlFlaws } from "@sema-agent/settings-schema";
6
6
  import { buildHttpUrlRefusal } from "../url-refusal.js";
7
+ import { egressRedirectRefusal } from "../egress-redirect.js";
7
8
  export const SCHEMA_MAJOR_HEADER = "x-sema-schema-major";
8
9
  export const CENTER_PULL_TIMEOUT_MS = 8000;
9
10
  export const SETTINGS_SCHEMA_MAJOR = (() => {
@@ -57,6 +58,30 @@ function routePath(route, kind) {
57
58
  return "/api/config/execution-keys";
58
59
  }
59
60
  }
61
+ export class CenterRedirectRefusedError extends Error {
62
+ status;
63
+ constructor(status, message) {
64
+ super(message);
65
+ this.status = status;
66
+ this.name = "CenterRedirectRefusedError";
67
+ }
68
+ }
69
+ const NOT_MODIFIED = 304;
70
+ async function sendToCenter(fix, url, wire) {
71
+ const res = await (wire.fetchImpl ?? fetch)(url, {
72
+ method: wire.method,
73
+ headers: wire.headers,
74
+ ...(wire.body !== undefined ? { body: wire.body } : {}),
75
+ redirect: "manual",
76
+ signal: AbortSignal.timeout(wire.timeoutMs),
77
+ });
78
+ if (res.status === NOT_MODIFIED)
79
+ return res;
80
+ const refusal = egressRedirectRefusal(res, fix);
81
+ if (refusal !== undefined)
82
+ throw new CenterRedirectRefusedError(res.status, `web-admin center request: ${refusal}`);
83
+ return res;
84
+ }
60
85
  const PATH_BASE_FORBIDS = ["userinfo", "query", "fragment"];
61
86
  export function pathBaseUrlRefusal(subject, raw) {
62
87
  const flaws = httpUrlFlaws(raw, PATH_BASE_FORBIDS);
@@ -75,12 +100,20 @@ export async function centerTokenRefresh(issuer, refreshToken, init) {
75
100
  url.pathname = `${url.pathname.replace(/\/+$/, "")}${AUTH_V1_PATHS.tokenRefresh}`;
76
101
  url.search = "";
77
102
  url.hash = "";
78
- return (init.fetchImpl ?? fetch)(url, {
103
+ return sendToCenter(`the credential issuer must be the final center address — set ${WEB_ADMIN_ENV.url} to it and sign in again`, url, {
79
104
  method: "POST",
80
105
  headers: { [SCHEMA_MAJOR_HEADER]: SETTINGS_SCHEMA_MAJOR, "content-type": "application/x-www-form-urlencoded" },
81
106
  body: new URLSearchParams({ refresh_token: refreshToken }).toString(),
82
- redirect: "manual",
83
- signal: AbortSignal.timeout(init.timeoutMs),
107
+ timeoutMs: init.timeoutMs,
108
+ fetchImpl: init.fetchImpl,
109
+ });
110
+ }
111
+ export async function centerJwksFetch(jwksUrl, init) {
112
+ return sendToCenter(`declare the final JWKS address — AUTH_BRIDGE_JWKS_URL, or the issuer it derives from (${WEB_ADMIN_ENV.url} / AUTH_BRIDGE_ISSUER)`, jwksUrl, {
113
+ method: "GET",
114
+ headers: { [SCHEMA_MAJOR_HEADER]: SETTINGS_SCHEMA_MAJOR },
115
+ timeoutMs: init.timeoutMs,
116
+ fetchImpl: init.fetchImpl,
84
117
  });
85
118
  }
86
119
  export async function centerFetch(center, route, init) {
@@ -99,12 +132,14 @@ export async function centerFetch(center, route, init) {
99
132
  const liveBase = FLEET_LIVE_PATHS.includes(path) ? center.liveBaseUrl : undefined;
100
133
  if (liveBase !== undefined)
101
134
  assertPathBaseUrl(liveBase, WEB_ADMIN_ENV.liveUrl);
135
+ const seat = liveBase !== undefined ? WEB_ADMIN_ENV.liveUrl : WEB_ADMIN_ENV.url;
102
136
  const url = `${(liveBase ?? center.baseUrl).replace(/\/+$/, "")}${path}`;
103
- const res = await (init.fetchImpl ?? fetch)(url, {
137
+ const res = await sendToCenter(`declare the final address in ${seat}`, url, {
104
138
  method: init.method ?? "GET",
105
139
  headers,
106
140
  ...(init.json !== undefined ? { body: JSON.stringify(init.json) } : {}),
107
- signal: AbortSignal.timeout(init.timeoutMs),
141
+ timeoutMs: init.timeoutMs,
142
+ fetchImpl: init.fetchImpl,
108
143
  });
109
144
  return { res, identity: cred.identity };
110
145
  }