@leitwerk-dev/server 0.2.0 → 0.2.1

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 (392) hide show
  1. package/dist/app-7PKX73TU.js +8 -0
  2. package/dist/{app-D4XHIbwA.d.ts → app-WfwKzrVk.d.ts} +2029 -410
  3. package/dist/app.d.ts +55 -12
  4. package/dist/app.d.ts.map +1 -1
  5. package/dist/{chunk-XTXH6623.js → chunk-CNITOV76.js} +1359 -991
  6. package/dist/chunk-CNITOV76.js.map +1 -0
  7. package/dist/{chunk-AGC2ND53.js → chunk-ZSKM25SD.js} +588 -667
  8. package/dist/chunk-ZSKM25SD.js.map +1 -0
  9. package/dist/config/config-loader.d.ts +11 -0
  10. package/dist/config/config-loader.d.ts.map +1 -1
  11. package/dist/config/config-types.d.ts +152 -51
  12. package/dist/config/config-types.d.ts.map +1 -1
  13. package/dist/db/api-token-repo.d.ts +24 -0
  14. package/dist/db/api-token-repo.d.ts.map +1 -1
  15. package/dist/db/auth-repo.d.ts +30 -0
  16. package/dist/db/auth-repo.d.ts.map +1 -1
  17. package/dist/db/credential-cipher.d.ts +8 -3
  18. package/dist/db/credential-cipher.d.ts.map +1 -1
  19. package/dist/db/database.d.ts +19 -1
  20. package/dist/db/database.d.ts.map +1 -1
  21. package/dist/db/external-write-log-repo.d.ts +6 -1
  22. package/dist/db/external-write-log-repo.d.ts.map +1 -1
  23. package/dist/db/future-execution-repo.d.ts +47 -0
  24. package/dist/db/future-execution-repo.d.ts.map +1 -1
  25. package/dist/db/launch-run-repo.d.ts +17 -0
  26. package/dist/db/launch-run-repo.d.ts.map +1 -1
  27. package/dist/db/launcher-recent-value-repo.d.ts +15 -0
  28. package/dist/db/launcher-recent-value-repo.d.ts.map +1 -1
  29. package/dist/db/pending-external-source-fire-repo.d.ts +33 -0
  30. package/dist/db/pending-external-source-fire-repo.d.ts.map +1 -1
  31. package/dist/db/process-event-repo.d.ts +17 -0
  32. package/dist/db/process-event-repo.d.ts.map +1 -1
  33. package/dist/db/process-handoff-dedup-key-repo.d.ts +8 -0
  34. package/dist/db/process-handoff-dedup-key-repo.d.ts.map +1 -1
  35. package/dist/db/process-input-repo.d.ts +15 -0
  36. package/dist/db/process-input-repo.d.ts.map +1 -1
  37. package/dist/db/process-instance-repo.d.ts +49 -0
  38. package/dist/db/process-instance-repo.d.ts.map +1 -1
  39. package/dist/db/process-leaf-outcome-snapshot-repo.d.ts +18 -0
  40. package/dist/db/process-leaf-outcome-snapshot-repo.d.ts.map +1 -1
  41. package/dist/db/process-project-repo.d.ts +20 -0
  42. package/dist/db/process-project-repo.d.ts.map +1 -1
  43. package/dist/db/process-question-request-repo.d.ts +19 -0
  44. package/dist/db/process-question-request-repo.d.ts.map +1 -1
  45. package/dist/db/process-relation-repo.d.ts +5 -0
  46. package/dist/db/process-relation-repo.d.ts.map +1 -1
  47. package/dist/db/process-skill-repo.d.ts +4 -0
  48. package/dist/db/process-skill-repo.d.ts.map +1 -1
  49. package/dist/db/process-title-job-repo.d.ts +22 -0
  50. package/dist/db/process-title-job-repo.d.ts.map +1 -1
  51. package/dist/db/process-tool-approval-request-repo.d.ts +20 -0
  52. package/dist/db/process-tool-approval-request-repo.d.ts.map +1 -1
  53. package/dist/db/process-turn-annotation-repo.d.ts +22 -2
  54. package/dist/db/process-turn-annotation-repo.d.ts.map +1 -1
  55. package/dist/db/process-turn-record-repo.d.ts +27 -0
  56. package/dist/db/process-turn-record-repo.d.ts.map +1 -1
  57. package/dist/db/provider-credential-repo.d.ts +16 -0
  58. package/dist/db/provider-credential-repo.d.ts.map +1 -1
  59. package/dist/db/repositories.d.ts +33 -0
  60. package/dist/db/repositories.d.ts.map +1 -1
  61. package/dist/db/session-transfer-repo.d.ts +49 -1
  62. package/dist/db/session-transfer-repo.d.ts.map +1 -1
  63. package/dist/db/skill-repo.d.ts +20 -0
  64. package/dist/db/skill-repo.d.ts.map +1 -1
  65. package/dist/db/startup-observation-repo.d.ts +3 -0
  66. package/dist/db/startup-observation-repo.d.ts.map +1 -1
  67. package/dist/db/ticket-destination-recent-repo.d.ts +14 -0
  68. package/dist/db/ticket-destination-recent-repo.d.ts.map +1 -1
  69. package/dist/db/turn-start-record-repo.d.ts +9 -0
  70. package/dist/db/turn-start-record-repo.d.ts.map +1 -1
  71. package/dist/db/turn-summary-repo.d.ts +18 -0
  72. package/dist/db/turn-summary-repo.d.ts.map +1 -1
  73. package/dist/db/worker-lease-repo.d.ts +31 -1
  74. package/dist/db/worker-lease-repo.d.ts.map +1 -1
  75. package/dist/effects/post-commit-effect.d.ts +29 -0
  76. package/dist/effects/post-commit-effect.d.ts.map +1 -1
  77. package/dist/effects/post-commit-runner.d.ts +1 -0
  78. package/dist/effects/post-commit-runner.d.ts.map +1 -1
  79. package/dist/entry-ref-patch.d.ts +3 -0
  80. package/dist/entry-ref-patch.d.ts.map +1 -1
  81. package/dist/extension-ui/catalog.d.ts +15 -0
  82. package/dist/extension-ui/catalog.d.ts.map +1 -1
  83. package/dist/extensions/extension-host.d.ts +6 -0
  84. package/dist/extensions/extension-host.d.ts.map +1 -1
  85. package/dist/external-source-service.d.ts +8 -0
  86. package/dist/external-source-service.d.ts.map +1 -1
  87. package/dist/future-execution/execution.d.ts +23 -1
  88. package/dist/future-execution/execution.d.ts.map +1 -1
  89. package/dist/future-execution/launch-lifecycle.d.ts +76 -0
  90. package/dist/future-execution/launch-lifecycle.d.ts.map +1 -1
  91. package/dist/future-execution/lifecycle.d.ts +99 -0
  92. package/dist/future-execution/lifecycle.d.ts.map +1 -1
  93. package/dist/future-execution/model-projection.d.ts +6 -0
  94. package/dist/future-execution/model-projection.d.ts.map +1 -1
  95. package/dist/future-execution/transition-planner.d.ts +25 -0
  96. package/dist/future-execution/transition-planner.d.ts.map +1 -1
  97. package/dist/future-execution-scheduler.d.ts +1 -1
  98. package/dist/future-execution-scheduler.d.ts.map +1 -1
  99. package/dist/index.d.ts +3 -30
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +5 -239
  102. package/dist/index.js.map +1 -1
  103. package/dist/instance-tree.d.ts +3 -0
  104. package/dist/instance-tree.d.ts.map +1 -1
  105. package/dist/integration-tool-registry.d.ts +4 -1
  106. package/dist/integration-tool-registry.d.ts.map +1 -1
  107. package/dist/launch-coordinator.d.ts +33 -0
  108. package/dist/launch-coordinator.d.ts.map +1 -1
  109. package/dist/launch-pipeline.d.ts +60 -0
  110. package/dist/launch-pipeline.d.ts.map +1 -1
  111. package/dist/launcher-recent-values-service.d.ts +3 -0
  112. package/dist/launcher-recent-values-service.d.ts.map +1 -1
  113. package/dist/main.js +7 -14
  114. package/dist/main.js.map +1 -1
  115. package/dist/model-providers/builtin-server-adapter.d.ts +1 -0
  116. package/dist/model-providers/builtin-server-adapter.d.ts.map +1 -1
  117. package/dist/model-providers/credentials.d.ts +17 -0
  118. package/dist/model-providers/credentials.d.ts.map +1 -1
  119. package/dist/model-providers/model-status-cache.d.ts +30 -1
  120. package/dist/model-providers/model-status-cache.d.ts.map +1 -1
  121. package/dist/model-providers/provider-options.d.ts +21 -1
  122. package/dist/model-providers/provider-options.d.ts.map +1 -1
  123. package/dist/model-providers/registry.d.ts +22 -2
  124. package/dist/model-providers/registry.d.ts.map +1 -1
  125. package/dist/model-providers/server-adapters.d.ts +19 -0
  126. package/dist/model-providers/server-adapters.d.ts.map +1 -1
  127. package/dist/pi-resources/assemble.d.ts +24 -4
  128. package/dist/pi-resources/assemble.d.ts.map +1 -1
  129. package/dist/pi-resources/bundle-cache.d.ts +20 -1
  130. package/dist/pi-resources/bundle-cache.d.ts.map +1 -1
  131. package/dist/pi-resources/bundle-pin-lifecycle.d.ts +5 -1
  132. package/dist/pi-resources/bundle-pin-lifecycle.d.ts.map +1 -1
  133. package/dist/pi-resources/resource-collector.d.ts +11 -0
  134. package/dist/pi-resources/resource-collector.d.ts.map +1 -1
  135. package/dist/pi-session-tree.d.ts +13 -1
  136. package/dist/pi-session-tree.d.ts.map +1 -1
  137. package/dist/process-action-registry.d.ts +47 -0
  138. package/dist/process-action-registry.d.ts.map +1 -1
  139. package/dist/process-deletion-service.d.ts +12 -0
  140. package/dist/process-deletion-service.d.ts.map +1 -1
  141. package/dist/process-engine/decision.d.ts +12 -0
  142. package/dist/process-engine/decision.d.ts.map +1 -1
  143. package/dist/process-engine/engine.d.ts +1 -0
  144. package/dist/process-engine/engine.d.ts.map +1 -1
  145. package/dist/process-engine/operation.d.ts +23 -2
  146. package/dist/process-engine/operation.d.ts.map +1 -1
  147. package/dist/process-engine/startup-reconciliation.d.ts +14 -0
  148. package/dist/process-engine/startup-reconciliation.d.ts.map +1 -1
  149. package/dist/process-engine/types.d.ts +112 -1
  150. package/dist/process-engine/types.d.ts.map +1 -1
  151. package/dist/process-engine/writes/build-process-park-writes.d.ts +3 -0
  152. package/dist/process-engine/writes/build-process-park-writes.d.ts.map +1 -1
  153. package/dist/process-engine/writes/build-recovery-start-writes.d.ts +4 -0
  154. package/dist/process-engine/writes/build-recovery-start-writes.d.ts.map +1 -1
  155. package/dist/process-engine/writes/build-retry-writes.d.ts +3 -0
  156. package/dist/process-engine/writes/build-retry-writes.d.ts.map +1 -1
  157. package/dist/process-engine/writes/build-turn-failed-writes.d.ts +6 -0
  158. package/dist/process-engine/writes/build-turn-failed-writes.d.ts.map +1 -1
  159. package/dist/process-engine/writes/build-turn-outcome-writes.d.ts +8 -0
  160. package/dist/process-engine/writes/build-turn-outcome-writes.d.ts.map +1 -1
  161. package/dist/process-engine/writes/build-turn-selection-writes.d.ts +8 -0
  162. package/dist/process-engine/writes/build-turn-selection-writes.d.ts.map +1 -1
  163. package/dist/process-engine/writes/commit-writes.d.ts +14 -0
  164. package/dist/process-engine/writes/commit-writes.d.ts.map +1 -1
  165. package/dist/process-engine/writes/deferred-extension-events.d.ts +4 -0
  166. package/dist/process-engine/writes/deferred-extension-events.d.ts.map +1 -1
  167. package/dist/process-engine/writes/writes.d.ts +67 -0
  168. package/dist/process-engine/writes/writes.d.ts.map +1 -1
  169. package/dist/process-graph.d.ts +1 -1
  170. package/dist/process-graph.d.ts.map +1 -1
  171. package/dist/process-input-dispatch.d.ts +1 -0
  172. package/dist/process-input-dispatch.d.ts.map +1 -1
  173. package/dist/process-launch-executor.d.ts +1 -0
  174. package/dist/process-launch-executor.d.ts.map +1 -1
  175. package/dist/process-model-policy/types.d.ts +157 -1
  176. package/dist/process-model-policy/types.d.ts.map +1 -1
  177. package/dist/process-operation-coordinator.d.ts +3 -0
  178. package/dist/process-operation-coordinator.d.ts.map +1 -1
  179. package/dist/process-question-service.d.ts +36 -20
  180. package/dist/process-question-service.d.ts.map +1 -1
  181. package/dist/process-runtime-availability.d.ts +2 -1
  182. package/dist/process-runtime-availability.d.ts.map +1 -1
  183. package/dist/process-session-store.d.ts +15 -4
  184. package/dist/process-session-store.d.ts.map +1 -1
  185. package/dist/process-title-generator.d.ts +53 -0
  186. package/dist/process-title-generator.d.ts.map +1 -1
  187. package/dist/process-turn-navigation.d.ts +1 -30
  188. package/dist/process-turn-navigation.d.ts.map +1 -1
  189. package/dist/process-turn-trace.d.ts +7 -0
  190. package/dist/process-turn-trace.d.ts.map +1 -1
  191. package/dist/process-ui-registry.d.ts +2 -0
  192. package/dist/process-ui-registry.d.ts.map +1 -1
  193. package/dist/process-ui-snapshot-presenter.d.ts +68 -1
  194. package/dist/process-ui-snapshot-presenter.d.ts.map +1 -1
  195. package/dist/process-watcher-registry.d.ts +5 -0
  196. package/dist/process-watcher-registry.d.ts.map +1 -1
  197. package/dist/product-ref-state.d.ts +1 -0
  198. package/dist/product-ref-state.d.ts.map +1 -1
  199. package/dist/project-mutation-service.d.ts +19 -0
  200. package/dist/project-mutation-service.d.ts.map +1 -1
  201. package/dist/result-image-store.d.ts +20 -0
  202. package/dist/result-image-store.d.ts.map +1 -1
  203. package/dist/routes/process-route-helpers.d.ts +30 -0
  204. package/dist/routes/process-route-helpers.d.ts.map +1 -1
  205. package/dist/routes/ui-renderers.d.ts +4 -0
  206. package/dist/routes/ui-renderers.d.ts.map +1 -1
  207. package/dist/routes/watchers.d.ts +3 -0
  208. package/dist/routes/watchers.d.ts.map +1 -1
  209. package/dist/semantic-entry-ref-state.d.ts +1 -0
  210. package/dist/semantic-entry-ref-state.d.ts.map +1 -1
  211. package/dist/server-bootstrap/app-lifecycle.d.ts +24 -0
  212. package/dist/server-bootstrap/app-lifecycle.d.ts.map +1 -0
  213. package/dist/server-bootstrap/build-host-capabilities.d.ts +5 -1
  214. package/dist/server-bootstrap/build-host-capabilities.d.ts.map +1 -1
  215. package/dist/server-topology.d.ts +8 -1
  216. package/dist/server-topology.d.ts.map +1 -1
  217. package/dist/session-transfer-helper-relays.d.ts +24 -0
  218. package/dist/session-transfer-helper-relays.d.ts.map +1 -1
  219. package/dist/session-transfer-service.d.ts +63 -1
  220. package/dist/session-transfer-service.d.ts.map +1 -1
  221. package/dist/skills/catalog-service.d.ts +7 -0
  222. package/dist/skills/catalog-service.d.ts.map +1 -1
  223. package/dist/skills/source-importer.d.ts +8 -0
  224. package/dist/skills/source-importer.d.ts.map +1 -1
  225. package/dist/startup-evidence.d.ts.map +1 -1
  226. package/dist/supervisor/ipc-handler.d.ts +28 -0
  227. package/dist/supervisor/ipc-handler.d.ts.map +1 -1
  228. package/dist/supervisor/worker-event-ingestor.d.ts +10 -0
  229. package/dist/supervisor/worker-event-ingestor.d.ts.map +1 -1
  230. package/dist/supervisor/worker-start-payload-builder.d.ts +13 -0
  231. package/dist/supervisor/worker-start-payload-builder.d.ts.map +1 -1
  232. package/dist/supervisor/worker-storage-layout.d.ts +12 -0
  233. package/dist/supervisor/worker-storage-layout.d.ts.map +1 -1
  234. package/dist/supervisor/worker-supervisor.d.ts +47 -3
  235. package/dist/supervisor/worker-supervisor.d.ts.map +1 -1
  236. package/dist/supervisor/worker-turn-ipc-recorder.d.ts +19 -0
  237. package/dist/supervisor/worker-turn-ipc-recorder.d.ts.map +1 -1
  238. package/dist/supervisor/worker-unit-reclaimer.d.ts +3 -0
  239. package/dist/supervisor/worker-unit-reclaimer.d.ts.map +1 -1
  240. package/dist/supervisor/worker-websocket-ipc.d.ts +37 -0
  241. package/dist/supervisor/worker-websocket-ipc.d.ts.map +1 -1
  242. package/dist/test-helpers/accepted-turn-start.d.ts +17 -0
  243. package/dist/test-helpers/accepted-turn-start.d.ts.map +1 -1
  244. package/dist/test-helpers/session-snapshot-fixtures.d.ts +1 -1
  245. package/dist/test-helpers/session-snapshot-fixtures.d.ts.map +1 -1
  246. package/dist/test-helpers/turn-start-preflight-fixtures.d.ts +8 -1
  247. package/dist/test-helpers/turn-start-preflight-fixtures.d.ts.map +1 -1
  248. package/dist/test-helpers/unit-deps.d.ts +8 -0
  249. package/dist/test-helpers/unit-deps.d.ts.map +1 -1
  250. package/dist/testing.d.ts +4 -7
  251. package/dist/testing.d.ts.map +1 -1
  252. package/dist/testing.js +2 -53
  253. package/dist/testing.js.map +1 -1
  254. package/dist/tool-approval-gate.d.ts +21 -0
  255. package/dist/tool-approval-gate.d.ts.map +1 -1
  256. package/dist/turn-result-markdown.d.ts +2 -0
  257. package/dist/turn-result-markdown.d.ts.map +1 -1
  258. package/dist/worker-runtime-profile-selection.d.ts +20 -4
  259. package/dist/worker-runtime-profile-selection.d.ts.map +1 -1
  260. package/dist/ws/broadcast.d.ts +10 -0
  261. package/dist/ws/broadcast.d.ts.map +1 -1
  262. package/package.json +11 -11
  263. package/src/app.ts +916 -892
  264. package/src/config/config-loader.ts +12 -0
  265. package/src/config/config-types.ts +166 -66
  266. package/src/db/api-token-repo.ts +35 -2
  267. package/src/db/auth-repo.ts +35 -1
  268. package/src/db/credential-cipher.ts +8 -3
  269. package/src/db/database.ts +14 -0
  270. package/src/db/external-write-log-repo.ts +6 -1
  271. package/src/db/future-execution-repo.ts +51 -1
  272. package/src/db/launch-run-repo.ts +17 -0
  273. package/src/db/launcher-recent-value-repo.ts +15 -0
  274. package/src/db/pending-external-source-fire-repo.ts +33 -0
  275. package/src/db/process-event-repo.ts +21 -1
  276. package/src/db/process-handoff-dedup-key-repo.ts +8 -0
  277. package/src/db/process-input-repo.ts +15 -0
  278. package/src/db/process-instance-repo.ts +57 -2
  279. package/src/db/process-leaf-outcome-snapshot-repo.ts +18 -0
  280. package/src/db/process-project-repo.ts +20 -0
  281. package/src/db/process-question-request-repo.ts +19 -0
  282. package/src/db/process-relation-repo.ts +8 -1
  283. package/src/db/process-skill-repo.ts +4 -0
  284. package/src/db/process-title-job-repo.ts +30 -2
  285. package/src/db/process-tool-approval-request-repo.ts +24 -1
  286. package/src/db/process-turn-annotation-repo.ts +22 -2
  287. package/src/db/process-turn-record-repo.ts +27 -0
  288. package/src/db/provider-credential-repo.ts +20 -1
  289. package/src/db/repositories.ts +36 -1
  290. package/src/db/session-transfer-repo.ts +71 -9
  291. package/src/db/skill-repo.ts +24 -1
  292. package/src/db/startup-observation-repo.ts +3 -0
  293. package/src/db/ticket-destination-recent-repo.ts +14 -0
  294. package/src/db/turn-start-record-repo.ts +12 -1
  295. package/src/db/turn-summary-repo.ts +29 -2
  296. package/src/db/worker-lease-repo.ts +31 -1
  297. package/src/deployment-preflight.ts +1 -1
  298. package/src/effects/post-commit-effect.ts +42 -3
  299. package/src/effects/post-commit-runner.ts +1 -0
  300. package/src/entry-ref-patch.ts +9 -1
  301. package/src/extension-ui/catalog.ts +15 -0
  302. package/src/extensions/extension-host.ts +6 -0
  303. package/src/external-source-service.ts +12 -1
  304. package/src/future-execution/execution.ts +45 -8
  305. package/src/future-execution/launch-lifecycle.ts +145 -17
  306. package/src/future-execution/lifecycle.ts +124 -13
  307. package/src/future-execution/model-projection.ts +6 -0
  308. package/src/future-execution/transition-planner.ts +25 -0
  309. package/src/future-execution-scheduler.ts +7 -6
  310. package/src/index.ts +5 -153
  311. package/src/instance-tree.ts +3 -0
  312. package/src/integration-tool-registry.ts +17 -8
  313. package/src/launch-coordinator.ts +55 -5
  314. package/src/launch-pipeline.ts +103 -12
  315. package/src/launcher-recent-values-service.ts +3 -0
  316. package/src/main.ts +3 -10
  317. package/src/model-providers/builtin-server-adapter.ts +1 -0
  318. package/src/model-providers/credentials.ts +17 -0
  319. package/src/model-providers/model-status-cache.ts +30 -1
  320. package/src/model-providers/provider-options.ts +25 -2
  321. package/src/model-providers/registry.ts +22 -2
  322. package/src/model-providers/server-adapters.ts +19 -0
  323. package/src/pi-resources/assemble.ts +24 -4
  324. package/src/pi-resources/bundle-cache.ts +20 -1
  325. package/src/pi-resources/bundle-pin-lifecycle.ts +8 -2
  326. package/src/pi-resources/resource-collector.ts +11 -0
  327. package/src/pi-session-tree.ts +13 -1
  328. package/src/process-action-registry.ts +53 -1
  329. package/src/process-deletion-service.ts +29 -4
  330. package/src/process-engine/decision.ts +12 -0
  331. package/src/process-engine/engine.ts +1 -0
  332. package/src/process-engine/operation.ts +23 -2
  333. package/src/process-engine/startup-reconciliation.ts +14 -0
  334. package/src/process-engine/types.ts +176 -14
  335. package/src/process-engine/writes/build-process-park-writes.ts +3 -0
  336. package/src/process-engine/writes/build-recovery-start-writes.ts +4 -0
  337. package/src/process-engine/writes/build-retry-writes.ts +3 -0
  338. package/src/process-engine/writes/build-turn-failed-writes.ts +6 -0
  339. package/src/process-engine/writes/build-turn-outcome-writes.ts +8 -0
  340. package/src/process-engine/writes/build-turn-selection-writes.ts +8 -0
  341. package/src/process-engine/writes/commit-writes.ts +14 -0
  342. package/src/process-engine/writes/deferred-extension-events.ts +4 -0
  343. package/src/process-engine/writes/writes.ts +104 -10
  344. package/src/process-graph.ts +0 -3
  345. package/src/process-input-dispatch.ts +1 -0
  346. package/src/process-launch-executor.ts +1 -0
  347. package/src/process-model-policy/types.ts +195 -11
  348. package/src/process-operation-coordinator.ts +3 -0
  349. package/src/process-question-service.ts +53 -11
  350. package/src/process-runtime-availability.ts +4 -3
  351. package/src/process-session-store.ts +15 -4
  352. package/src/process-title-generator.ts +71 -5
  353. package/src/process-turn-navigation.ts +4 -1
  354. package/src/process-turn-trace.ts +7 -0
  355. package/src/process-ui-registry.ts +2 -0
  356. package/src/process-ui-snapshot-presenter.ts +75 -3
  357. package/src/process-watcher-registry.ts +5 -0
  358. package/src/product-ref-state.ts +1 -0
  359. package/src/project-mutation-service.ts +22 -1
  360. package/src/result-image-store.ts +27 -2
  361. package/src/routes/process-route-helpers.ts +30 -0
  362. package/src/routes/ui-renderers.ts +4 -0
  363. package/src/routes/watchers.ts +3 -0
  364. package/src/semantic-entry-ref-state.ts +1 -0
  365. package/src/server-bootstrap/app-lifecycle.ts +150 -0
  366. package/src/server-topology.ts +8 -1
  367. package/src/session-transfer-helper-relays.ts +33 -2
  368. package/src/session-transfer-service.ts +75 -7
  369. package/src/skills/catalog-service.ts +7 -0
  370. package/src/skills/source-importer.ts +8 -0
  371. package/src/startup-evidence.ts +23 -41
  372. package/src/supervisor/ipc-handler.ts +33 -1
  373. package/src/supervisor/worker-event-ingestor.ts +10 -0
  374. package/src/supervisor/worker-start-payload-builder.ts +16 -1
  375. package/src/supervisor/worker-storage-layout.ts +12 -0
  376. package/src/supervisor/worker-supervisor.ts +119 -133
  377. package/src/supervisor/worker-turn-ipc-recorder.ts +19 -0
  378. package/src/supervisor/worker-unit-reclaimer.ts +3 -0
  379. package/src/supervisor/worker-websocket-ipc.ts +57 -3
  380. package/src/test-helpers/accepted-turn-start.ts +28 -2
  381. package/src/test-helpers/session-snapshot-fixtures.ts +1 -1
  382. package/src/test-helpers/turn-start-preflight-fixtures.ts +8 -1
  383. package/src/test-helpers/unit-deps.ts +13 -1
  384. package/src/testing.ts +4 -23
  385. package/src/tool-approval-gate.ts +32 -3
  386. package/src/turn-result-markdown.ts +2 -0
  387. package/src/worker-runtime-profile-selection.ts +24 -5
  388. package/src/ws/broadcast.ts +20 -1
  389. package/dist/app-I4QQUL5B.js +0 -10
  390. package/dist/chunk-AGC2ND53.js.map +0 -1
  391. package/dist/chunk-XTXH6623.js.map +0 -1
  392. /package/dist/{app-I4QQUL5B.js.map → app-7PKX73TU.js.map} +0 -0
@@ -41,6 +41,7 @@ import {
41
41
 
42
42
  const ONE_TIME_FAILURE_RETRY_DELAY_MS = 60_000;
43
43
 
44
+ /** @internal */
44
45
  export interface FutureExecutionExecutorDeps
45
46
  extends Pick<
46
47
  RepositoryBundle,
@@ -53,19 +54,31 @@ export interface FutureExecutionExecutorDeps
53
54
  | "handoffDedupKeys"
54
55
  | "transaction"
55
56
  > {
57
+ /** @internal */
56
58
  turnRecords?: RepositoryBundle["turnRecords"];
59
+ /** @internal */
57
60
  broadcaster: Broadcaster;
61
+ /** @internal */
58
62
  commands: ProcessEngine;
63
+ /** @internal */
59
64
  processOperations: ProcessOperationCoordinator;
65
+ /** @internal */
60
66
  processTitles?: ProcessTitleGenerator;
67
+ /** @internal */
61
68
  extensionHost?: ExtensionHost;
69
+ /** @internal */
62
70
  processGraphs?: ProcessGraphRegistry;
71
+ /** @internal */
63
72
  processActionRegistry?: ProcessActionRegistry;
64
- /** Required for every server-owned scheduled execution. */
73
+ /** Required for every server-owned scheduled execution. @internal */
65
74
  processModelPolicy: ServerProcessModelPolicy;
75
+ /** @internal */
66
76
  launchPlans: ProcessLaunchPlanServiceLike;
77
+ /** @internal */
67
78
  modelStatusCache: Pick<ModelStatusCache, "snapshot">;
79
+ /** @internal */
68
80
  launchPipeline: LaunchPipeline;
81
+ /** @internal */
69
82
  logger?: ProcessEngineLogger;
70
83
  }
71
84
 
@@ -78,14 +91,38 @@ export type FutureExecutionDisposition =
78
91
  | { kind: "retry_later"; error: Error }
79
92
  | { kind: "remove"; error?: Error };
80
93
 
94
+ /** @internal */
81
95
  export type FutureExecutionItemOutcome =
82
- | { kind: "no_work" }
83
- | { kind: "blocked" }
84
- | { kind: "retry_scheduled" }
85
- | { kind: "occurrence_advanced" }
86
- | { kind: "terminal_invalid_removed" }
87
- | { kind: "durable_work_committed" }
88
- | { kind: "durable_work_committed_with_reaction_error"; error: string };
96
+ | {
97
+ /** @internal */
98
+ kind: "no_work";
99
+ }
100
+ | {
101
+ /** @internal */
102
+ kind: "blocked";
103
+ }
104
+ | {
105
+ /** @internal */
106
+ kind: "retry_scheduled";
107
+ }
108
+ | {
109
+ /** @internal */
110
+ kind: "occurrence_advanced";
111
+ }
112
+ | {
113
+ /** @internal */
114
+ kind: "terminal_invalid_removed";
115
+ }
116
+ | {
117
+ /** @internal */
118
+ kind: "durable_work_committed";
119
+ }
120
+ | {
121
+ /** @internal */
122
+ kind: "durable_work_committed_with_reaction_error";
123
+ /** @internal */
124
+ error: string;
125
+ };
89
126
 
90
127
  function toError(error: unknown, fallbackMessage: string): Error {
91
128
  return error instanceof Error ? error : new Error(fallbackMessage);
@@ -61,61 +61,154 @@ import {
61
61
  } from "./support.js";
62
62
  import { planConsumeFutureExecution } from "./transition-planner.js";
63
63
 
64
+ /** @internal */
64
65
  export interface FutureExecutionIssue extends LauncherValidationError {}
65
66
 
67
+ /** @internal */
66
68
  type LaunchFailure =
67
- | { kind: "invalid"; issues: readonly FutureExecutionIssue[] }
68
- | { kind: "not_found"; target: "future_execution" | "launch" | "action" | "process" }
69
- | { kind: "conflict"; issue: FutureExecutionIssue }
70
- | { kind: "unavailable"; reason: string }
71
- | { kind: "failed"; issue: FutureExecutionIssue };
69
+ | {
70
+ /** @internal */
71
+ kind: "invalid";
72
+ /** @internal */
73
+ issues: readonly FutureExecutionIssue[];
74
+ }
75
+ | {
76
+ /** @internal */
77
+ kind: "not_found";
78
+ /** @internal */
79
+ target: "future_execution" | "launch" | "action" | "process";
80
+ }
81
+ | {
82
+ /** @internal */
83
+ kind: "conflict";
84
+ /** @internal */
85
+ issue: FutureExecutionIssue;
86
+ }
87
+ | {
88
+ /** @internal */
89
+ kind: "unavailable";
90
+ /** @internal */
91
+ reason: string;
92
+ }
93
+ | {
94
+ /** @internal */
95
+ kind: "failed";
96
+ /** @internal */
97
+ issue: FutureExecutionIssue;
98
+ };
72
99
 
100
+ /** @internal */
73
101
  export type LaunchMutationOutcome =
74
- | { kind: "scheduled"; execution: FutureExecution; operation: "created" | "updated" }
75
102
  | {
103
+ /** @internal */
104
+ kind: "scheduled";
105
+ /** @internal */
106
+ execution: FutureExecution;
107
+ /** @internal */
108
+ operation: "created" | "updated";
109
+ }
110
+ | {
111
+ /** @internal */
76
112
  kind: "launched";
113
+ /** @internal */
77
114
  process: ProcessInstance;
115
+ /** @internal */
78
116
  projects: ProcessProject[];
117
+ /** @internal */
79
118
  operation: "created" | "updated";
80
119
  }
81
120
  | {
121
+ /** @internal */
82
122
  kind: "committed_with_reaction_error";
123
+ /** @internal */
83
124
  process: ProcessInstance;
125
+ /** @internal */
84
126
  projects: ProcessProject[];
127
+ /** @internal */
85
128
  error: string;
129
+ /** @internal */
86
130
  code?: string;
87
131
  }
88
132
  | {
133
+ /** @internal */
89
134
  kind: "committed_with_reaction_error";
135
+ /** @internal */
90
136
  execution: FutureExecution;
137
+ /** @internal */
91
138
  operation: "created" | "updated";
139
+ /** @internal */
92
140
  error: string;
141
+ /** @internal */
93
142
  code: string;
94
143
  }
95
144
  | LaunchFailure;
96
145
 
146
+ /** @internal */
97
147
  export interface NormalizedScheduledLaunchInput extends ParsedLauncherRequestBody {}
98
148
 
149
+ /** @internal */
99
150
  export type ValidatedLaunchSchedule =
100
- | { mode: "now"; nextRunAt: null; cronExpression: null }
101
- | { mode: "once"; nextRunAt: string; cronExpression: null }
102
- | { mode: "cron"; nextRunAt: string; cronExpression: string };
151
+ | {
152
+ /** @internal */
153
+ mode: "now";
154
+ /** @internal */
155
+ nextRunAt: null;
156
+ /** @internal */
157
+ cronExpression: null;
158
+ }
159
+ | {
160
+ /** @internal */
161
+ mode: "once";
162
+ /** @internal */
163
+ nextRunAt: string;
164
+ /** @internal */
165
+ cronExpression: null;
166
+ }
167
+ | {
168
+ /** @internal */
169
+ mode: "cron";
170
+ /** @internal */
171
+ nextRunAt: string;
172
+ /** @internal */
173
+ cronExpression: string;
174
+ };
103
175
 
176
+ /** @internal */
104
177
  export interface PreparedLaunch {
178
+ /** @internal */
105
179
  processId: string;
180
+ /** @internal */
106
181
  launcherId: string;
182
+ /** @internal */
107
183
  launcherInput: Record<string, unknown>;
184
+ /** @internal */
108
185
  modelConfig: LauncherModelConfigDefaults;
186
+ /** @internal */
109
187
  launchPlan: ProcessLaunchPlan;
188
+ /** @internal */
110
189
  selectedSkillIds: readonly string[];
190
+ /** @internal */
111
191
  resourceSelections: readonly SkillSelection[];
192
+ /** @internal */
112
193
  modelState: ReturnType<typeof projectLaunchPlanModelState>;
194
+ /** @internal */
113
195
  schedule: ValidatedLaunchSchedule;
114
196
  }
115
197
 
198
+ /** @internal */
116
199
  export type PreparedLaunchResult =
117
- | { ok: true; prepared: PreparedLaunch }
118
- | { ok: false; outcome: LaunchMutationOutcome };
200
+ | {
201
+ /** @internal */
202
+ ok: true;
203
+ /** @internal */
204
+ prepared: PreparedLaunch;
205
+ }
206
+ | {
207
+ /** @internal */
208
+ ok: false;
209
+ /** @internal */
210
+ outcome: LaunchMutationOutcome;
211
+ };
119
212
 
120
213
  export interface FutureLaunchLifecycleDeps
121
214
  extends Pick<
@@ -538,10 +631,14 @@ export function createFutureLaunchLifecycle(
538
631
  }
539
632
 
540
633
  return {
634
+ /** @internal */
541
635
  async prepareLaunch(
542
636
  launcherId: string,
543
637
  request: NormalizedScheduledLaunchInput,
544
- opts?: { resolvedLauncher?: ResolvedProcessLauncher },
638
+ opts?: {
639
+ /** @internal */
640
+ resolvedLauncher?: ResolvedProcessLauncher;
641
+ },
545
642
  ): Promise<PreparedLaunchResult> {
546
643
  return prepareLaunchInternal({
547
644
  launcherId,
@@ -549,9 +646,15 @@ export function createFutureLaunchLifecycle(
549
646
  ...(opts?.resolvedLauncher ? { resolvedLauncher: opts.resolvedLauncher } : {}),
550
647
  });
551
648
  },
649
+ /** @internal */
552
650
  async commitPreparedLaunch(
553
651
  prepared: PreparedLaunch,
554
- opts?: { actor?: Actor; launchRunId?: string },
652
+ opts?: {
653
+ /** @internal */
654
+ actor?: Actor;
655
+ /** @internal */
656
+ launchRunId?: string;
657
+ },
555
658
  ): Promise<LaunchMutationOutcome> {
556
659
  if (prepared.schedule.mode !== "now")
557
660
  return persistPreparedLaunch({ ...prepared, actor: opts?.actor ?? SYSTEM_ACTOR });
@@ -569,20 +672,41 @@ export function createFutureLaunchLifecycle(
569
672
  operation: "created",
570
673
  };
571
674
  },
675
+ /** @internal */
572
676
  async applyGeneratedFutureLaunchTitleIfUnchanged(input: {
677
+ /** @internal */
573
678
  futureExecutionId: string;
679
+ /** @internal */
574
680
  expectedPayloadJson: string;
681
+ /** @internal */
575
682
  title: string;
576
683
  }): Promise<
577
- | { kind: "applied"; execution: FutureExecution }
578
684
  | {
685
+ /** @internal */
686
+ kind: "applied";
687
+ /** @internal */
688
+ execution: FutureExecution;
689
+ }
690
+ | {
691
+ /** @internal */
579
692
  kind: "applied_with_reaction_error";
693
+ /** @internal */
580
694
  execution: FutureExecution;
695
+ /** @internal */
581
696
  error: string;
697
+ /** @internal */
582
698
  code: string;
583
699
  }
584
- | { kind: "superseded" }
585
- | { kind: "failed"; error: string }
700
+ | {
701
+ /** @internal */
702
+ kind: "superseded";
703
+ }
704
+ | {
705
+ /** @internal */
706
+ kind: "failed";
707
+ /** @internal */
708
+ error: string;
709
+ }
586
710
  > {
587
711
  return runFutureExecutionExclusive(
588
712
  deps.processOperations,
@@ -630,10 +754,14 @@ export function createFutureLaunchLifecycle(
630
754
  },
631
755
  );
632
756
  },
757
+ /** @internal */
633
758
  async reviseScheduledLaunch(
634
759
  futureExecutionId: string,
635
760
  request: NormalizedScheduledLaunchInput,
636
- opts?: { actor?: Actor },
761
+ opts?: {
762
+ /** @internal */
763
+ actor?: Actor;
764
+ },
637
765
  ): Promise<LaunchMutationOutcome> {
638
766
  const operationTime = now();
639
767
  return runFutureExecutionExclusive(deps.processOperations, futureExecutionId, async () => {
@@ -43,74 +43,149 @@ export type {
43
43
  PreparedLaunchResult,
44
44
  } from "./launch-lifecycle.js";
45
45
 
46
+ /** @internal */
46
47
  export interface FutureExecutionLifecycleDeps extends FutureExecutionExecutorDeps {
48
+ /** @internal */
47
49
  turnRecords: RepositoryBundle["turnRecords"];
50
+ /** @internal */
48
51
  launcherService?: ProcessLauncherService;
52
+ /** @internal */
49
53
  launcherRecentValues?: LauncherRecentValuesService;
54
+ /** @internal */
50
55
  assertRuntimeAvailable?: (processId: string) => Promise<void>;
51
56
  }
52
57
 
58
+ /** @internal */
53
59
  export interface FutureExecutionLifecycleOptions {
60
+ /** @internal */
54
61
  now?: () => Date;
55
62
  }
56
63
 
64
+ /** @internal */
57
65
  type LifecycleFailure =
58
- | { kind: "invalid"; issues: readonly FutureExecutionIssue[] }
59
- | { kind: "not_found"; target: "future_execution" | "launch" | "action" | "process" }
60
- | { kind: "conflict"; issue: FutureExecutionIssue }
61
- | { kind: "unavailable"; reason: string }
62
- | { kind: "failed"; issue: FutureExecutionIssue };
66
+ | {
67
+ /** @internal */
68
+ kind: "invalid";
69
+ /** @internal */
70
+ issues: readonly FutureExecutionIssue[];
71
+ }
72
+ | {
73
+ /** @internal */
74
+ kind: "not_found";
75
+ /** @internal */
76
+ target: "future_execution" | "launch" | "action" | "process";
77
+ }
78
+ | {
79
+ /** @internal */
80
+ kind: "conflict";
81
+ /** @internal */
82
+ issue: FutureExecutionIssue;
83
+ }
84
+ | {
85
+ /** @internal */
86
+ kind: "unavailable";
87
+ /** @internal */
88
+ reason: string;
89
+ }
90
+ | {
91
+ /** @internal */
92
+ kind: "failed";
93
+ /** @internal */
94
+ issue: FutureExecutionIssue;
95
+ };
63
96
 
97
+ /** @internal */
64
98
  export type ActionMutationOutcome =
65
99
  | {
100
+ /** @internal */
66
101
  kind: "scheduled";
102
+ /** @internal */
67
103
  execution: FutureExecution;
104
+ /** @internal */
68
105
  instanceId: string;
106
+ /** @internal */
69
107
  operation: "created" | "updated";
70
108
  }
71
109
  | {
110
+ /** @internal */
72
111
  kind: "executed";
112
+ /** @internal */
73
113
  process: ProcessInstance;
114
+ /** @internal */
74
115
  data?: Record<string, unknown>;
75
116
  }
76
117
  | {
118
+ /** @internal */
77
119
  kind: "committed_with_reaction_error";
120
+ /** @internal */
78
121
  process: ProcessInstance;
122
+ /** @internal */
79
123
  error: string;
124
+ /** @internal */
80
125
  code?: string;
81
126
  }
82
127
  | {
128
+ /** @internal */
83
129
  kind: "committed_with_reaction_error";
130
+ /** @internal */
84
131
  execution: FutureExecution;
132
+ /** @internal */
85
133
  instanceId: string;
134
+ /** @internal */
86
135
  operation: "created" | "updated";
136
+ /** @internal */
87
137
  error: string;
138
+ /** @internal */
88
139
  code: string;
89
140
  }
90
141
  | LifecycleFailure;
91
142
 
143
+ /** @internal */
92
144
  export type CancelFutureExecutionOutcome =
93
- | { kind: "canceled"; execution: FutureExecution }
94
145
  | {
146
+ /** @internal */
147
+ kind: "canceled";
148
+ /** @internal */
149
+ execution: FutureExecution;
150
+ }
151
+ | {
152
+ /** @internal */
95
153
  kind: "committed_with_reaction_error";
154
+ /** @internal */
96
155
  execution: FutureExecution;
156
+ /** @internal */
97
157
  error: string;
158
+ /** @internal */
98
159
  code: string;
99
160
  }
100
- | { kind: "not_found"; target: "future_execution" };
161
+ | {
162
+ /** @internal */
163
+ kind: "not_found";
164
+ /** @internal */
165
+ target: "future_execution";
166
+ };
101
167
 
168
+ /** @internal */
102
169
  export interface FutureExecutionDueItemOutcome {
170
+ /** @internal */
103
171
  futureExecutionId: string;
172
+ /** @internal */
104
173
  kind: FutureExecutionItemOutcome["kind"] | "unexpected_error";
174
+ /** @internal */
105
175
  error?: string;
106
176
  }
107
177
 
178
+ /** @internal */
108
179
  export interface FutureExecutionDueBatchOutcome {
180
+ /** @internal */
109
181
  kind: "batch_completed";
182
+ /** @internal */
110
183
  asOf: string;
184
+ /** @internal */
111
185
  items: FutureExecutionDueItemOutcome[];
112
186
  }
113
187
 
188
+ /** @internal */
114
189
  export interface NormalizedScheduledActionInput extends ParsedActionRequestBody {}
115
190
 
116
191
  type Resolved<T> = { ok: true; value: T } | { ok: false; issue: FutureExecutionIssue };
@@ -295,6 +370,7 @@ async function executeActionMutation(
295
370
  : actionFailureOutcome(result);
296
371
  }
297
372
 
373
+ /** @internal */
298
374
  export function createFutureExecutionLifecycle(
299
375
  deps: FutureExecutionLifecycleDeps,
300
376
  _options: FutureExecutionLifecycleOptions = {},
@@ -400,17 +476,24 @@ export function createFutureExecutionLifecycle(
400
476
  }
401
477
 
402
478
  return {
479
+ /** @internal */
403
480
  prepareLaunch: launchLifecycle.prepareLaunch,
404
481
 
482
+ /** @internal */
405
483
  commitPreparedLaunch: launchLifecycle.commitPreparedLaunch,
406
484
 
485
+ /** @internal */
407
486
  reviseScheduledLaunch: launchLifecycle.reviseScheduledLaunch,
408
487
 
488
+ /** @internal */
409
489
  async scheduleAction(
410
490
  process: ProcessInstance,
411
491
  actionId: string,
412
492
  request: NormalizedScheduledActionInput,
413
- opts?: { actor?: Actor },
493
+ opts?: {
494
+ /** @internal */
495
+ actor?: Actor;
496
+ },
414
497
  ): Promise<ActionMutationOutcome> {
415
498
  const operationTime = nowFn();
416
499
  const scheduleValidation = validateScheduleRequestInput(request.schedule, ["now", "once"]);
@@ -459,10 +542,14 @@ export function createFutureExecutionLifecycle(
459
542
  });
460
543
  },
461
544
 
545
+ /** @internal */
462
546
  async reviseScheduledAction(
463
547
  futureExecutionId: string,
464
548
  request: NormalizedScheduledActionInput,
465
- opts?: { actor?: Actor },
549
+ opts?: {
550
+ /** @internal */
551
+ actor?: Actor;
552
+ },
466
553
  ): Promise<ActionMutationOutcome> {
467
554
  const operationTime = nowFn();
468
555
  return runFutureExecutionExclusive(
@@ -550,6 +637,7 @@ export function createFutureExecutionLifecycle(
550
637
  );
551
638
  },
552
639
 
640
+ /** @internal */
553
641
  async cancel(futureExecutionId: string): Promise<CancelFutureExecutionOutcome> {
554
642
  return runFutureExecutionExclusive(deps.processOperations, futureExecutionId, async () => {
555
643
  const execution = deps.futureExecutions.getById(futureExecutionId);
@@ -568,12 +656,17 @@ export function createFutureExecutionLifecycle(
568
656
  });
569
657
  },
570
658
 
659
+ /** @internal */
571
660
  applyGeneratedFutureLaunchTitleIfUnchanged:
572
661
  launchLifecycle.applyGeneratedFutureLaunchTitleIfUnchanged,
573
662
 
663
+ /** @internal */
574
664
  async reconcileModelAvailability(input: {
665
+ /** @internal */
575
666
  availability: ModelStatusCacheSnapshot;
667
+ /** @internal */
576
668
  profileIds?: ReadonlySet<string>;
669
+ /** @internal */
577
670
  asOf?: string;
578
671
  }) {
579
672
  const asOf = input.asOf ?? nowFn().toISOString();
@@ -597,23 +690,40 @@ export function createFutureExecutionLifecycle(
597
690
  asOf,
598
691
  });
599
692
  return result.reaction.ok
600
- ? { kind: "reconciled", changed: result.changed, asOf }
693
+ ? {
694
+ /** @internal */
695
+ kind: "reconciled",
696
+ /** @internal */
697
+ changed: result.changed,
698
+ /** @internal */
699
+ asOf,
700
+ }
601
701
  : {
702
+ /** @internal */
602
703
  kind: "committed_with_reaction_error",
704
+ /** @internal */
603
705
  changed: result.changed,
706
+ /** @internal */
604
707
  asOf,
708
+ /** @internal */
605
709
  error: result.reaction.message,
710
+ /** @internal */
606
711
  code: result.reaction.code,
607
712
  };
608
713
  },
609
714
 
610
- async reconcileMissedScheduleOccurrences(
611
- asOf: string,
612
- ): Promise<{ kind: "occurrences_advanced"; asOf: string }> {
715
+ /** @internal */
716
+ async reconcileMissedScheduleOccurrences(asOf: string): Promise<{
717
+ /** @internal */
718
+ kind: "occurrences_advanced";
719
+ /** @internal */
720
+ asOf: string;
721
+ }> {
613
722
  await executor.reconcileMissedCronRowsOnStartup(asOf);
614
723
  return { kind: "occurrences_advanced", asOf };
615
724
  },
616
725
 
726
+ /** @internal */
617
727
  async runDueWork(asOf: string): Promise<FutureExecutionDueBatchOutcome> {
618
728
  const blockedItems = await executeDueRows(
619
729
  deps.futureExecutions.listBlockedCronDue(asOf),
@@ -633,4 +743,5 @@ export function createFutureExecutionLifecycle(
633
743
  };
634
744
  }
635
745
 
746
+ /** @internal */
636
747
  export type FutureExecutionLifecycle = ReturnType<typeof createFutureExecutionLifecycle>;
@@ -27,6 +27,7 @@ export interface FutureModelProjectionDeps {
27
27
  now?: () => Date;
28
28
  }
29
29
 
30
+ /** @internal */
30
31
  export type FutureModelSelectionState = Pick<FutureExecution, "modelSelection" | "blockedReason">;
31
32
 
32
33
  type ModelEvaluationResult = ProcessModelPolicyEvaluation;
@@ -89,12 +90,17 @@ export function evaluateFutureModelSelection(input: {
89
90
  );
90
91
  }
91
92
 
93
+ /** @internal */
92
94
  export function projectLaunchPlanModelState(
93
95
  plan: ProcessLaunchPlan,
94
96
  input: {
97
+ /** @internal */
95
98
  policy: ServerProcessModelPolicy;
99
+ /** @internal */
96
100
  availability: ModelStatusCacheSnapshot;
101
+ /** @internal */
97
102
  detectedAt?: string;
103
+ /** @internal */
98
104
  existingBlockedReason?: FutureExecutionBlockReason | null;
99
105
  },
100
106
  ): FutureModelSelectionState {