@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
@@ -3,7 +3,7 @@ import { readEffectiveWire, PrincipalCapsWire } from "@sema-agent/settings-schem
3
3
  import { separateRetiredDomains, splitFoldedReadWarnings, withDroppedCatalogEntries } from "./read-warnings.js";
4
4
  import { CENTER_PULL_TIMEOUT_MS, centerFetch } from "./center-request.js";
5
5
  import { answerStillCurrent } from "../center-credential.js";
6
- export async function fetchEffective(center, etag, fetchImpl = fetch, worker) {
6
+ export async function fetchEffective(center, etag, fetchImpl, worker) {
7
7
  const { res, identity } = await centerFetch(center, { kind: "effective", worker }, { etag, timeoutMs: CENTER_PULL_TIMEOUT_MS, fetchImpl });
8
8
  if (res.status === 304)
9
9
  return null;
@@ -25,7 +25,7 @@ export async function fetchEffective(center, etag, fetchImpl = fetch, worker) {
25
25
  ...(retiredDomains.length > 0 ? { retiredDomains: [...retiredDomains] } : {}),
26
26
  };
27
27
  }
28
- export async function fetchPrincipalCaps(center, principal, etag, fetchImpl = fetch, worker) {
28
+ export async function fetchPrincipalCaps(center, principal, etag, fetchImpl, worker) {
29
29
  const raw = await requestPrincipalView(center, principal, etag, fetchImpl, worker);
30
30
  if (raw === null)
31
31
  return null;
@@ -99,7 +99,7 @@ async function requestPrincipalView(center, principal, etag, fetchImpl, worker)
99
99
  return { json, ...(responseEtag !== null ? { etag: responseEtag } : {}) };
100
100
  }
101
101
  const PrincipalOrgMemoryEnvelope = PrincipalCapsWire.pick({ principal: true, orgMemory: true });
102
- export async function fetchPrincipalOrgMemory(center, principal, fetchImpl = fetch, worker) {
102
+ export async function fetchPrincipalOrgMemory(center, principal, fetchImpl, worker) {
103
103
  const raw = await requestPrincipalView(center, principal, undefined, fetchImpl, worker);
104
104
  if (raw === null)
105
105
  throw new Error("web-admin returned 304 to a non-conditional org-directory fetch");
@@ -118,7 +118,7 @@ export class WebAdminHttpError extends Error {
118
118
  this.name = "WebAdminHttpError";
119
119
  }
120
120
  }
121
- export async function fetchSkillContent(center, contentHash, fetchImpl = fetch) {
121
+ export async function fetchSkillContent(center, contentHash, fetchImpl) {
122
122
  const { res } = await centerFetch(center, { kind: "skill-content", contentHash }, { timeoutMs: CENTER_PULL_TIMEOUT_MS, fetchImpl });
123
123
  if (!res.ok)
124
124
  throw new WebAdminHttpError(`skill content HTTP ${res.status} for ${contentHash}`, res.status);
@@ -129,13 +129,13 @@ export async function fetchSkillContent(center, contentHash, fetchImpl = fetch)
129
129
  throw new Error(`skill content hash mismatch for ${contentHash}: computed sha256:${got}`);
130
130
  return content;
131
131
  }
132
- export async function fetchPromptArtifact(center, artifactDigest, fetchImpl = fetch) {
132
+ export async function fetchPromptArtifact(center, artifactDigest, fetchImpl) {
133
133
  const { res } = await centerFetch(center, { kind: "prompt-artifact", digest: artifactDigest }, { timeoutMs: CENTER_PULL_TIMEOUT_MS, fetchImpl });
134
134
  if (!res.ok)
135
135
  throw new WebAdminHttpError(`prompt artifact HTTP ${res.status} for ${artifactDigest}`, res.status);
136
136
  return await res.json();
137
137
  }
138
- export async function fetchPromptBlob(center, contentDigest, fetchImpl = fetch) {
138
+ export async function fetchPromptBlob(center, contentDigest, fetchImpl) {
139
139
  const { res } = await centerFetch(center, { kind: "prompt-blob", digest: contentDigest }, { timeoutMs: CENTER_PULL_TIMEOUT_MS, fetchImpl });
140
140
  if (!res.ok)
141
141
  throw new WebAdminHttpError(`prompt blob HTTP ${res.status} for ${contentDigest}`, res.status);
@@ -75,11 +75,11 @@ export interface CenterModel {
75
75
  * the ONLY way to keep per-model tuning that lived in env (`MODEL_FREQUENCY_PENALTY` etc.) — see the
76
76
  * review-gw heterogeneous-roster migration. MUST be static per published version (prompt-cache prefix). */
77
77
  extraBody?: Record<string, unknown>;
78
- /** registry-core 0.10.13 ([ref]/[ref]⑤c): per-model behavior-slot mitigation sentences, mirrors core
79
- * `Model.promptGuidance` (core 1.303+ assembles them into the volatile tail's per-model position).
80
- * Same category as `extraBody`: logical model metadata, carried verbatim — without this projection the
81
- * configured sentences parse fine in registry-core but never reach the assembly face ([ref]① 排雷:
82
- * the missing leg made every promptGuidance pilot a false control). */
78
+ /** registry-core 0.10.13 ([ref]/[ref]⑤c): per-model behavior-slot sentences. core 7.56.0 ([ref]) retired the engine seat
79
+ * (`Model.promptGuidance`; per-model guidance is now a prompt overlay keyed on the model's declared traits), while the
80
+ * settings-schema `ModelEntry` still accepts the key. It is carried here ONLY so the [ref] judge (`judgeCatalogEntry`)
81
+ * can see it: a non-empty list refuses the entry (`config.model_entry_invalid`, field `promptGuidance`) instead of the
82
+ * sentences being silently dropped; `toModel` never mints it onto a core `Model`. */
83
83
  promptGuidance?: string[];
84
84
  /**
85
85
  * [ref](7.108.0)—— 这条条目发给供应商的**附加请求头**(部署 ↔ 供应商的契约;今天只有 `anthropic-beta`),上 core 的 per-model
@@ -63,6 +63,33 @@ export interface WorkspaceSpacePolicy {
63
63
  export interface WorkspaceSyncCapability extends WorkspaceSpacePolicy {
64
64
  timeoutMs: number;
65
65
  }
66
+ /** `WORKSPACE_SNAPSHOT_PREFIX` unset ⇒ this prefix (the first segment of every snapshot object key of both lanes). */
67
+ export declare const WORKSPACE_SNAPSHOT_PREFIX_DEFAULT = "kata";
68
+ /**
69
+ * The ONE form of a snapshot-key segment — the partition (incarnation / session id), the snapshot id, the object name and each segment of
70
+ * the key prefix all pass it before a key is signed: it starts with a letter or digit, then letters, digits, `.`, `_`, `-`. No `/`, no `..`,
71
+ * no empty segment, no character a key could be rewritten or traversed by.
72
+ */
73
+ export declare const SNAPSHOT_KEY_SEGMENT: RegExp;
74
+ /** The refusal code of a `WORKSPACE_SNAPSHOT_PREFIX` outside the closed form (the `config.*` family; fatal-exit prints it). */
75
+ export declare const WORKSPACE_SNAPSHOT_PREFIX_INVALID = "config.workspace_snapshot_prefix_invalid";
76
+ /**
77
+ * Why a snapshot key prefix is outside the closed form (`undefined` = inside): a prefix is a `/`-separated path of {@link SNAPSHOT_KEY_SEGMENT}s —
78
+ * one segment (`kata`, the form every release has accepted) or several (`libA/ws`, so one bucket can be partitioned by owner). Answers the
79
+ * first bad segment (1-based) and why. The ONE judge: the config loader refuses boot with it, the adapter refuses to sign a key with it.
80
+ */
81
+ export declare function snapshotKeyPrefixProblem(prefix: string): {
82
+ readonly segment: number;
83
+ readonly of: number;
84
+ readonly value: string;
85
+ readonly why: string;
86
+ } | undefined;
87
+ /**
88
+ * `WORKSPACE_SNAPSHOT_PREFIX` — the key prefix of both lanes' snapshot objects (`<prefix>/<incarnation>/space/…`, `<prefix>/<sessionId>/…`): a
89
+ * `/`-separated path of plain segments, one or more (`kata`, `libA/ws`). Unset / empty ⇒ `undefined` (the adapter's default
90
+ * {@link WORKSPACE_SNAPSHOT_PREFIX_DEFAULT} holds). A bad value refuses boot naming the first bad segment — the value is a path, never a secret, so it is echoed.
91
+ */
92
+ export declare function parseWorkspaceSnapshotPrefix(raw: string | undefined): string | undefined;
66
93
  /** The refusal code of a `WORKSPACE_SNAPSHOT_EXCLUDE` item outside the closed form (the `config.*` family; fatal-exit prints it). */
67
94
  export declare const WORKSPACE_SNAPSHOT_EXCLUDE_INVALID = "config.workspace_snapshot_exclude_invalid";
68
95
  /**
@@ -9,6 +9,32 @@ export const WORKSPACE_SNAPSHOT_TIMEOUT_MS_RANGE = { min: 30_000, max: 3_600_000
9
9
  export function workspaceSnapshotTimeoutOf(lane) {
10
10
  return lane.workspaceSnapshotTimeoutMs ?? WORKSPACE_SNAPSHOT_TIMEOUT_MS_DEFAULT;
11
11
  }
12
+ export const WORKSPACE_SNAPSHOT_PREFIX_DEFAULT = "kata";
13
+ export const SNAPSHOT_KEY_SEGMENT = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
14
+ export const WORKSPACE_SNAPSHOT_PREFIX_INVALID = "config.workspace_snapshot_prefix_invalid";
15
+ export function snapshotKeyPrefixProblem(prefix) {
16
+ const segments = prefix.split("/");
17
+ for (const [i, value] of segments.entries()) {
18
+ if (SNAPSHOT_KEY_SEGMENT.test(value))
19
+ continue;
20
+ const why = value === ""
21
+ ? "empty (a leading, trailing or doubled /)"
22
+ : value === "." || value === ".."
23
+ ? "a . / .. segment (it would walk out of its own prefix)"
24
+ : "not a plain key segment (it must start with a letter or digit and hold only letters, digits, . _ -)";
25
+ return { segment: i + 1, of: segments.length, value, why };
26
+ }
27
+ return undefined;
28
+ }
29
+ export function parseWorkspaceSnapshotPrefix(raw) {
30
+ if (raw === undefined || raw === "")
31
+ return undefined;
32
+ const bad = snapshotKeyPrefixProblem(raw);
33
+ if (bad === undefined)
34
+ return raw;
35
+ throw Object.assign(new Error(`env WORKSPACE_SNAPSHOT_PREFIX: segment #${bad.segment} of ${bad.of} (${JSON.stringify(bad.value)}) is ${bad.why} — the prefix is a "/"-separated path of plain key segments ` +
36
+ "(each starts with a letter or digit, then letters, digits, . _ -; e.g. WORKSPACE_SNAPSHOT_PREFIX=kata or libA/ws); refusing to start rather than sign snapshot keys under a prefix that does not say what it means"), { code: WORKSPACE_SNAPSHOT_PREFIX_INVALID });
37
+ }
12
38
  export const WORKSPACE_SNAPSHOT_EXCLUDE_INVALID = "config.workspace_snapshot_exclude_invalid";
13
39
  export function parseWorkspaceSnapshotExclude(raw) {
14
40
  if (raw === undefined || raw.trim() === "")
@@ -18,8 +18,11 @@ dials the device, so the device needs no inbound port, no public address and no
18
18
 
19
19
  **Discovery before you connect**: `GET /v1/capabilities` carries a `deviceExecutor` key — either `false`
20
20
  (this deployment has no device lane) or an object `{ enabled: true, protocolVersion, maxInflightPerDevice,
21
- wsPath, management }`. Read `wsPath` from there rather than hardcoding it: the path is part of the wire
22
- contract and reading it means a future path change is not a cross-repo break. `protocolVersion` tells you
21
+ wsPath, management, relayUrl? }`. Read `wsPath` from there rather than hardcoding it: the path is part of the wire
22
+ contract and reading it means a future path change is not a cross-repo break. `relayUrl` (server 7.137.0+) is present
23
+ only when the operator declared one (`DEVICE_RELAY_URL`): the engine sits behind a relay or gateway and the device
24
+ must dial that absolute `ws://` / `wss://` URL verbatim instead of the engine's own address — do not rebuild it from
25
+ the engine address and `wsPath`. Absent ⇒ dial the engine's own address at `wsPath`, as before. `protocolVersion` tells you
23
26
  which protocol **revision** the server speaks before you spend a handshake finding out (§2.1: the revision decides
24
27
  which `errorCode` words the server accepts from you).
25
28
 
@@ -136,7 +139,8 @@ Ask for a new enrollment token and try again."* Do not retry the same token afte
136
139
 
137
140
  ### 1.2 Connecting
138
141
 
139
- Open a WebSocket to `wsPath` (`GET`, standard upgrade). The server refuses the upgrade with `404` for any
142
+ Open a WebSocket to `relayUrl` when the capability carries one, otherwise to `wsPath` on the engine's own
143
+ address (`GET`, standard upgrade). The server refuses the upgrade with `404` for any
140
144
  other path, and with `503` while the replica is draining or when its pre-auth connection caps are full.
141
145
  There is no authentication in the upgrade headers — the handshake happens **inside** the protocol.
142
146
 
@@ -336,7 +340,7 @@ base64 inside JSON fields.
336
340
  | Constant | Value | Meaning |
337
341
  |---|---|---|
338
342
  | `DEVICE_WS_PATH` | `/v1/device/ws` | the upgrade path (prefer the `wsPath` from `/v1/capabilities`) |
339
- | `DEVICE_PROTOCOL_VERSION` | `2` | the protocol revision this server speaks (the highest it accepts) |
343
+ | `DEVICE_PROTOCOL_VERSION` | `3` | the protocol revision this server speaks (the highest it accepts) |
340
344
  | `DEVICE_MIN_PROTOCOL_VERSION` | `1` | the lowest revision it accepts; below it (or above the highest), a loud `helloReject` — never a silent downgrade |
341
345
  | `DEVICE_HELLO_DOMAIN_TAG` | `sema.device.hello.v1` | the handshake signature domain tag (§1.3) |
342
346
 
@@ -365,6 +369,7 @@ the union of the rows up to *N*, and the full set at the current revision is the
365
369
  |---|---|
366
370
  | `1` | `aborted`, `already_exists`, `auth_failed`, `callback_error`, `invalid`, `is_directory`, `not_directory`, `not_found`, `not_supported`, `outcome_unknown`, `permission_denied`, `precondition_failed`, `shell_unavailable`, `spawn_error`, `suspended`, `target_unavailable`, `timeout`, `transport_lost`, `unknown` |
367
371
  | `2` | `liveness_no_output` |
372
+ | `3` | `name_too_long` |
368
373
 
369
374
  Rules: adding a frame or a field is additive and does not raise the revision; adding a word to a closed set the
370
375
  server *accepts from you* (today: the `errorCode` set) raises `DEVICE_PROTOCOL_VERSION` and adds a row here; a
@@ -560,7 +565,7 @@ a moment ago. If you omit `created`, the consumer reports the weaker of the two
560
565
 
561
566
  `message` is required on the failure arm and is shown to the model — make it specific.
562
567
 
563
- This is the full set at the current revision (`2`); the revision table in §2.1 says which revision each word arrived
568
+ This is the full set at the current revision (`3`); the revision table in §2.1 says which revision each word arrived
564
569
  with, and an executor sends only the words of the revision it declared (§1.2).
565
570
 
566
571
  <!-- closed-set: DEVICE_OUTCOME_ERROR_CODES -->
@@ -574,6 +579,7 @@ with, and an executor sends only the words of the revision it declared (§1.2).
574
579
  | `invalid` | the arguments do not make sense for this target (e.g. `readLink` on a non-symlink) |
575
580
  | `is_directory` | a file operation hit a directory |
576
581
  | `liveness_no_output` | **you** killed the command because it produced no output for your own silence window (a hung command); the wall-clock budget `timeoutMs` running out stays `timeout`. The frame has no field for the window length — do not invent one |
582
+ | `name_too_long` | a component of the path is longer than the filesystem's name limit (`NAME_MAX`, 255 bytes; POSIX `ENAMETOOLONG` for such a component) — no directory can hold that name, so it is read upstream as an absence, like `not_found`. A path that is only too long as a whole while every component is short stays `unknown` (such a file may exist, reached from a directory below it). On an exec instruction it is a protocol violation (use `spawn_error` when the process could not be started) and the server reads it as `unknown` |
577
583
  | `not_directory` | a directory operation hit a non-directory |
578
584
  | `not_found` | the path does not exist |
579
585
  | `not_supported` | you do not implement this face (prefer simply not declaring it) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/server",
3
- "version": "7.135.0",
3
+ "version": "7.137.0",
4
4
  "description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -37,6 +37,7 @@
37
37
  "scripts/drain-check.pg.sql",
38
38
  "deploy/sema-up",
39
39
  "docs/DEVICE-EXECUTOR-PROTOCOL.md",
40
+ "wire-changes/",
40
41
  "USAGE.md",
41
42
  "MIGRATION.md"
42
43
  ],
@@ -68,8 +69,8 @@
68
69
  "build:binary:run-local:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/run-local.ts --outfile dist/run-local-darwin-arm64"
69
70
  },
70
71
  "dependencies": {
71
- "@sema-agent/core": "7.55.0",
72
- "@sema-agent/settings-schema": "14.4.0",
72
+ "@sema-agent/core": "7.56.0",
73
+ "@sema-agent/settings-schema": "14.5.0",
73
74
  "e2b": "^2.28.0",
74
75
  "libsodium-wrappers": "^0.8.4",
75
76
  "mysql2": "^3.22.4",
@@ -31,7 +31,7 @@
31
31
  * `dist/orchestration/workflow-agent-session-index.js` 取 —— 本脚本只按 runId 折叠;读不出的行计入 `corrupt`(rc 2:读不出的那一行可能正是点名某张待批卡的那一份);
32
32
  * 窗与删码:本判据是一次性迁移 M9 的读侧半场 —— 窗口与删码清单见引擎启动期一次性迁移登记表(one-time-migrations)M9 一行,随 M9 一起删;这里不写第二份窗。
33
33
  * · `parked-tool-lists`(升级到 7.132.0 前)/ `own-tool-lists-rollback`(从 7.132.0 回滚前):停驻行记下的工具名清单 / 7.52 写下的 `ownToolLists`(判据与出路见判据表那两条的注);
34
- * · `sealed-credentials-rollback`(从 7.134.0 回滚前):续跑上下文的凭据位上带封签的 pending 行(7.133.x 读不懂封签,续跑时把这些位当没有;判据与出路见判据表那一条的注);
34
+ * · `sealed-credentials-rollback`(从 7.134.0 回滚前;从 7.135.0 / 7.136.0 回滚到上一版前同用):续跑上下文的凭据位上带封签的 pending 行(7.133.x 读不懂封签,续跑时把这些位当没有;判据与出路见判据表那一条的注);
35
35
  * · `retired-mode-seed`(换钉 7.113.0 前,core 7.39.0 删掉退役 mode-seed 的一次性迁移):pending 行的 `state.inheritedGate` 仍带退役成员;
36
36
  * · `permissions-allow-list`(换钉 7.117.0 前,本服务把 `settings.permissions.allow` 整份交给引擎的 allow 层):pending 行所在会话的续跑上下文
37
37
  * (`checkpoint-ctx/*.json` 的信封 `{ sessionId, updatedAt, ctx }`)里,`ctx.body.settings.permissions.allow` 是非空数组,且 `ctx.permissionsAllowReading` 不是 `"allow_layer"`
@@ -466,6 +466,7 @@ export const DRAIN_CRITERIA = [
466
466
  {
467
467
  // 从 7.134.0 回滚到 7.133.x 之前:pending 行所在会话的续跑上下文里,提交体的凭据位(MCP / A2A 请求头与 env、settings.env、settings.webSearch.apiKey、http hook 请求头;7.135.0 起另有 command hook 的插件选项)
468
468
  // (从 7.135.0 回滚到 7.134.x 之前同用本判据:7.134.x 不认插件选项上的封签,续跑时那份 hooks 整只不采纳;本判据数任何凭据位上的封签,这一类在候选里)
469
+ // (从 7.136.0 回滚到 7.135.x 之前同用本判据:7.136.0 起子进程的命令行 —— MCP stdio 传输与 command hook 条目的 command / args —— 也封成封签,带它们的行盖第 3 代,7.135.x 整行拒续跑;这一类在候选里)
469
470
  // 上带封签 —— 7.134.0 封好才落盘,7.133.x 读不懂封签、续跑时把这些位当作没有(无凭据照跑、不报错)。出路:回滚前把它们决掉或取消(随包 `MIGRATION.md` 7.134.0 节)。
470
471
  // 判据函数是服务里那一只(`sealedCredentialFieldOf`,经编译产物 `dist/http/checkpoint-ctx.js` 取;走法与封口 / 开口 / 一次性迁移同一只),本脚本不写第二份;
471
472
  // 命中行点名第一处凭据位(`field=`,键名;值从不出来);读不懂的 ctx 档 / 索引账本行计入 `corrupt`(rc 2)。
@@ -17,7 +17,7 @@
17
17
  -- workflow-park-holder 换钉 7.118.0 之前 / 从 7.118.0 回滚到 7.117.x 之前:此刻待批、且子会话被 workflow park 索引点名的卡(workflow 子代卡;见该段注)。
18
18
  -- parked-tool-lists 升级到 7.132.0 之前:停驻行记着子代工具天花板 / 冻结的父约束链 / Skill 卡的清单绑定(7.52 在认领前按规范拼写读它们)的**候选**(见该段注)。
19
19
  -- own-tool-lists-rollback 从 7.132.0 回滚到 7.131.x 之前:7.132.0 停驻、带 state.ownToolLists 的行(7.131.x 读不了)。
20
- -- sealed-credentials-rollback 从 7.134.0 回滚到 7.133.x(或从 7.135.0 回滚到 7.134.x)之前:停驻、续跑上下文里提交体的凭据位上带封签的行(7.133.x 读不懂封签,续跑时把这些位当没有)的**候选**(见该段注)。
20
+ -- sealed-credentials-rollback 从 7.134.0 回滚到 7.133.x(或从 7.135.0 回滚到 7.134.x、从 7.136.0 回滚到 7.135.x)之前:停驻、续跑上下文里提交体的凭据位上带封签的行(7.133.x 读不懂封签,续跑时把这些位当没有)的**候选**(见该段注)。
21
21
  -- permissions-allow-list 换钉 7.117.0 之前:停驻、提交体 settings.permissions.allow 是非空数组且读法记号不是当前的 "allow_layer"(无记号 = 名单时代;"statement" = 表态时代)。
22
22
  -- retired-mode-seed 换钉 7.113.0 之前:检查点的 inheritedGate 里仍带退役 mode-seed 成员。
23
23
 
@@ -123,6 +123,8 @@ WHERE k.status = 'pending'
123
123
  -- JSON 串值恰为这个格式词即数(封签只落在凭据位上;体里别处恰好写着这个词的串值也会被数到 —— 多数,不漏)。本地脚本同名判据走服务里那一只凭据位走法(精确)。
124
124
  -- 从 7.135.0 回滚到 7.134.x 之前同用本判据:7.135.0 起 command hook 条目的插件选项(settings.hooks.<事件>[].hooks[].plugin.options)也封成封签,7.134.x 不认这一位,
125
125
  -- 续跑时那份 hooks 整只不采纳(其中的守卫不再拦)。本判据数任何凭据位上带封签的行,所以这一类也在候选里(超集)。
126
+ -- 从 7.136.0 回滚到 7.135.x 之前同用本判据:7.136.0 起子进程的命令行(MCP stdio 传输与 command hook 条目的 command / args)也封成封签,带它们的行
127
+ -- 盖第 3 代读法记号,7.135.x 对这样的行整行拒续跑(409 conflict.checkpoint_ctx_unsealable)。这一类同样在候选里(超集)。
126
128
  SELECT 'sealed-credentials-rollback' AS criterion, COUNT(*) AS hit_rows,
127
129
  COALESCE(GROUP_CONCAT(k.session_id ORDER BY k.created_at_ms DESC SEPARATOR ','), '') AS sessions
128
130
  FROM checkpoint k
@@ -16,7 +16,7 @@
16
16
  -- workflow-park-holder 换钉 7.118.0 之前 / 从 7.118.0 回滚到 7.117.x 之前:此刻待批、且子会话被 workflow park 索引点名的卡(workflow 子代卡;见该段注)。
17
17
  -- parked-tool-lists 升级到 7.132.0 之前:停驻行记着子代工具天花板 / 冻结的父约束链 / Skill 卡的清单绑定(7.52 在认领前按规范拼写读它们)的**候选**(见该段注)。
18
18
  -- own-tool-lists-rollback 从 7.132.0 回滚到 7.131.x 之前:7.132.0 停驻、带 state.ownToolLists 的行(7.131.x 读不了)。
19
- -- sealed-credentials-rollback 从 7.134.0 回滚到 7.133.x(或从 7.135.0 回滚到 7.134.x)之前:停驻、续跑上下文里提交体的凭据位上带封签的行(7.133.x 读不懂封签,续跑时把这些位当没有)的**候选**(见该段注)。
19
+ -- sealed-credentials-rollback 从 7.134.0 回滚到 7.133.x(或从 7.135.0 回滚到 7.134.x、从 7.136.0 回滚到 7.135.x)之前:停驻、续跑上下文里提交体的凭据位上带封签的行(7.133.x 读不懂封签,续跑时把这些位当没有)的**候选**(见该段注)。
20
20
  -- permissions-allow-list 换钉 7.117.0 之前:停驻、提交体 settings.permissions.allow 是非空数组且读法记号不是当前的 "allow_layer"(无记号 = 名单时代;"statement" = 表态时代)。
21
21
  -- retired-mode-seed 换钉 7.113.0 之前:检查点的 inheritedGate 里仍带退役 mode-seed 成员。
22
22
 
@@ -131,6 +131,8 @@ WHERE k.status = 'pending'
131
131
  -- JSON 串值恰为这个格式词即数(封签只落在凭据位上;体里别处恰好写着这个词的串值也会被数到 —— 多数,不漏)。本地脚本同名判据走服务里那一只凭据位走法(精确)。
132
132
  -- 从 7.135.0 回滚到 7.134.x 之前同用本判据:7.135.0 起 command hook 条目的插件选项(settings.hooks.<事件>[].hooks[].plugin.options)也封成封签,7.134.x 不认这一位,
133
133
  -- 续跑时那份 hooks 整只不采纳(其中的守卫不再拦)。本判据数任何凭据位上带封签的行,所以这一类也在候选里(超集)。
134
+ -- 从 7.136.0 回滚到 7.135.x 之前同用本判据:7.136.0 起子进程的命令行(MCP stdio 传输与 command hook 条目的 command / args)也封成封签,带它们的行
135
+ -- 盖第 3 代读法记号,7.135.x 对这样的行整行拒续跑(409 conflict.checkpoint_ctx_unsealable)。这一类同样在候选里(超集)。
134
136
  SELECT 'sealed-credentials-rollback' AS criterion, count(*) AS hit_rows,
135
137
  coalesce(string_agg(k.session_id, ',' ORDER BY k.created_at_ms DESC), '') AS sessions
136
138
  FROM checkpoint k
@@ -13,7 +13,7 @@ Parameters:
13
13
 
14
14
  - `prompt` (string, required): fully self-contained instructions for the future task. It runs unattended — inline every path, id, and acceptance criterion it needs; never reference "the file we discussed".
15
15
  - `schedule` (union, required) — pick the kind by intent:
16
- - Recurring: `{ "kind": "cron", "expr": "M H DoM Mon DoW" }` — standard 5-field cron in the user's LOCAL timezone (a 6-field form with leading seconds is also accepted). `"0 9 * * *"` means 9am local; no timezone conversion needed.
16
+ - Recurring: `{ "kind": "cron", "expr": "M H DoM Mon DoW" }` — standard 5-field cron in the user's LOCAL timezone. There is no seconds field: a 6-field expression is rejected ("its leading seconds field is not supported — the resident scheduler fires on 5-field cron, so one minute is the finest granularity available."), so drop the leading field and retry. `"0 9 * * *"` means 9am local; no timezone conversion needed.
17
17
  - One-shot at a wall-clock time: `{ "kind": "at", "atMs": <epoch ms> }`.
18
18
  - One-shot after a delay: `{ "kind": "delay", "delaySec": <seconds> }`.
19
19
  - `label` (string, optional): short name. Also the dedup key — creating again with the same schedule+label upserts (idempotent), so use a stable label when updating a task instead of piling up duplicates.
@@ -0,0 +1,134 @@
1
+ {
2
+ "repo": "server",
3
+ "version": "7.104.0",
4
+ "from": "v7.103.2",
5
+ "fromCommit": "ed4de0dbd34447a9f40b3ea8933982e222e845b8",
6
+ "to": "v7.104.0",
7
+ "generator": "scripts/wire-changes-server.mjs",
8
+ "sources": [
9
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1",
10
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1b",
11
+ "docs/ASSISTANT-WIRE-CONTRACT.md#B.1",
12
+ "docs/ASSISTANT-WIRE-CONTRACT.md#B.2",
13
+ "docs/ASSISTANT-WIRE-CONTRACT.md#D.3",
14
+ "src/trace/wire-projection-faces.ts"
15
+ ],
16
+ "added": [
17
+ {
18
+ "id": "A1",
19
+ "source": "capability",
20
+ "member": "sealedKey",
21
+ "text": "附录 B.1 能力位新增 `sealedKey`(谓词类 设施依赖)"
22
+ },
23
+ {
24
+ "id": "A2",
25
+ "source": "engineNotice",
26
+ "member": "session.records_skipped",
27
+ "text": "附录 D.3 engine_notice 码新增 `session.records_skipped`(detail `{ dropped, entriesKept, sessionId }` —— `dropped` = 这次回放 core 报的跳过条数;`entriesKept` = 打开成功后数出的幸存条目数(core 的**全部**条目型都算,会话头不算)。两个都是直接观察到的数,**不做算术**(不存在「总数」这个键);`entriesKept === 0` = 会话头在、条目一条没剩(上下文为空,这一轮照跑)。不带路径、行号、坏体形词(那些只进运维日志)。⚠️ **无 `runId`**(铸在会话店的打开函数里;归属看它落在哪条 run 的流 / 账本上))"
28
+ },
29
+ {
30
+ "id": "A3",
31
+ "source": "errorCode",
32
+ "member": "config.tool_contract_too_long",
33
+ "text": "附录 A.1 / A.1b 错误码新增 `config.tool_contract_too_long`(状态码 503)"
34
+ },
35
+ {
36
+ "id": "A4",
37
+ "source": "errorCode",
38
+ "member": "config.tool_name_too_long",
39
+ "text": "附录 A.1 / A.1b 错误码新增 `config.tool_name_too_long`(状态码 503)"
40
+ },
41
+ {
42
+ "id": "A5",
43
+ "source": "errorCode",
44
+ "member": "config.tool_roster_bound",
45
+ "text": "附录 A.1 / A.1b 错误码新增 `config.tool_roster_bound`(状态码 503)"
46
+ },
47
+ {
48
+ "id": "A6",
49
+ "source": "errorCode",
50
+ "member": "conflict.session_children_alive",
51
+ "text": "附录 A.1 / A.1b 错误码新增 `conflict.session_children_alive`(状态码 409)"
52
+ },
53
+ {
54
+ "id": "A7",
55
+ "source": "errorCode",
56
+ "member": "corrupt_session",
57
+ "text": "附录 A.1 / A.1b 错误码新增 `corrupt_session`(状态码 500)"
58
+ },
59
+ {
60
+ "id": "A8",
61
+ "source": "errorCode",
62
+ "member": "rewind.capture_disabled",
63
+ "text": "附录 A.1 / A.1b 错误码新增 `rewind.capture_disabled`(状态码 422)"
64
+ },
65
+ {
66
+ "id": "A9",
67
+ "source": "errorCode",
68
+ "member": "rewind.store_unconfigured",
69
+ "text": "附录 A.1 / A.1b 错误码新增 `rewind.store_unconfigured`(状态码 409)"
70
+ },
71
+ {
72
+ "id": "A10",
73
+ "source": "wireFace.excluded",
74
+ "member": "wiring_manifest_operator.fileHistory",
75
+ "text": "投影面 wiring_manifest_operator 起投 core 键 fileHistory(从 excluded 撤出)"
76
+ },
77
+ {
78
+ "id": "A11",
79
+ "source": "wireFace.excluded",
80
+ "member": "wiring_manifest_tenant.fileHistory",
81
+ "text": "投影面 wiring_manifest_tenant 起投 core 键 fileHistory(从 excluded 撤出)"
82
+ }
83
+ ],
84
+ "registered": [],
85
+ "removed": [],
86
+ "changed": [],
87
+ "narrowed": [],
88
+ "closedSetMembers": [
89
+ {
90
+ "set": "errorCode",
91
+ "at": [
92
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1",
93
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1b"
94
+ ],
95
+ "added": [
96
+ "config.tool_contract_too_long",
97
+ "config.tool_name_too_long",
98
+ "config.tool_roster_bound",
99
+ "conflict.session_children_alive",
100
+ "corrupt_session",
101
+ "rewind.capture_disabled",
102
+ "rewind.store_unconfigured"
103
+ ],
104
+ "registered": [],
105
+ "removed": [],
106
+ "breaking": false
107
+ },
108
+ {
109
+ "set": "capability",
110
+ "at": [
111
+ "docs/ASSISTANT-WIRE-CONTRACT.md#B.1"
112
+ ],
113
+ "added": [
114
+ "sealedKey"
115
+ ],
116
+ "registered": [],
117
+ "removed": [],
118
+ "breaking": false
119
+ },
120
+ {
121
+ "set": "engineNotice",
122
+ "at": [
123
+ "docs/ASSISTANT-WIRE-CONTRACT.md#D.3"
124
+ ],
125
+ "added": [
126
+ "session.records_skipped"
127
+ ],
128
+ "registered": [],
129
+ "removed": [],
130
+ "breaking": false
131
+ }
132
+ ],
133
+ "breaking": 0
134
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "repo": "server",
3
+ "version": "7.105.0",
4
+ "from": "v7.104.0",
5
+ "fromCommit": "a99e8fb3006b80f447e1c8bf4874d66b609fb1bb",
6
+ "to": "v7.105.0",
7
+ "generator": "scripts/wire-changes-server.mjs",
8
+ "sources": [
9
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1",
10
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1b",
11
+ "docs/ASSISTANT-WIRE-CONTRACT.md#B.1",
12
+ "docs/ASSISTANT-WIRE-CONTRACT.md#B.2",
13
+ "docs/ASSISTANT-WIRE-CONTRACT.md#D.3",
14
+ "src/trace/wire-projection-faces.ts"
15
+ ],
16
+ "added": [
17
+ {
18
+ "id": "A1",
19
+ "source": "errorCode",
20
+ "member": "rules.legacy_tool_name",
21
+ "text": "附录 A.1 / A.1b 错误码新增 `rules.legacy_tool_name`(状态码 400)"
22
+ }
23
+ ],
24
+ "registered": [],
25
+ "removed": [
26
+ {
27
+ "id": "R1",
28
+ "source": "errorCode",
29
+ "member": "limit.retention_evicted",
30
+ "text": "附录 A.1 / A.1b 错误码删除 `limit.retention_evicted`(原状态码 416)"
31
+ }
32
+ ],
33
+ "changed": [],
34
+ "narrowed": [],
35
+ "closedSetMembers": [
36
+ {
37
+ "set": "errorCode",
38
+ "at": [
39
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1",
40
+ "docs/ASSISTANT-WIRE-CONTRACT.md#A.1b"
41
+ ],
42
+ "added": [
43
+ "rules.legacy_tool_name"
44
+ ],
45
+ "registered": [],
46
+ "removed": [
47
+ "limit.retention_evicted"
48
+ ],
49
+ "breaking": true
50
+ }
51
+ ],
52
+ "breaking": 1
53
+ }