@timurproko/a1 0.2.7-dev.1249 → 0.2.7-dev.1255

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 (524) hide show
  1. package/README.md +11 -36
  2. package/bin/cli.js +2 -17
  3. package/bin/ui.js +10 -51
  4. package/dist/app/session-shell/clipboard-diagnostics.d.ts +2 -2
  5. package/dist/app/session-shell/clipboard-image.d.ts +0 -1
  6. package/dist/app/session-shell/clipboard-image.js +1 -1
  7. package/dist/app/session-shell/dialog-coordinator.d.ts +6 -5
  8. package/dist/app/session-shell/dialog-coordinator.js +3 -4
  9. package/dist/app/session-shell/dock-chrome.d.ts +11 -6
  10. package/dist/app/session-shell/dock-chrome.js +5 -8
  11. package/dist/app/session-shell/editor-hyperlink-budget.d.ts +0 -2
  12. package/dist/app/session-shell/editor-hyperlink-budget.js +1 -1
  13. package/dist/app/session-shell/exit-notice.d.ts +3 -3
  14. package/dist/app/session-shell/exit-notice.js +10 -10
  15. package/dist/app/session-shell/extension-surface.d.ts +8 -7
  16. package/dist/app/session-shell/helper-pool.d.ts +3 -4
  17. package/dist/app/session-shell/helper-pool.js +1 -1
  18. package/dist/app/session-shell/image-preparation-client.d.ts +4 -3
  19. package/dist/app/session-shell/image-preparation.d.ts +0 -2
  20. package/dist/app/session-shell/image-preparation.js +2 -2
  21. package/dist/app/session-shell/image-source.d.ts +2 -3
  22. package/dist/app/session-shell/image-source.js +2 -2
  23. package/dist/app/session-shell/input-surface-switch.d.ts +9 -7
  24. package/dist/app/session-shell/input-surface-switch.js +1 -2
  25. package/dist/app/session-shell/login-interaction.d.ts +5 -4
  26. package/dist/app/session-shell/login-interaction.js +2 -3
  27. package/dist/app/session-shell/paste-executor.d.ts +4 -8
  28. package/dist/app/session-shell/paste-executor.js +2 -2
  29. package/dist/app/session-shell/paste-protocol.d.ts +2 -2
  30. package/dist/app/session-shell/path-chip-presentation.d.ts +0 -5
  31. package/dist/app/session-shell/path-chip-presentation.js +3 -3
  32. package/dist/app/session-shell/prompt-chips.d.ts +8 -7
  33. package/dist/app/session-shell/prompt-history-controller.d.ts +3 -3
  34. package/dist/app/session-shell/prompt-submission.d.ts +7 -6
  35. package/dist/app/session-shell/prompt-submission.js +7 -28
  36. package/dist/app/session-shell/quit-outro-effects.d.ts +3 -3
  37. package/dist/app/session-shell/quit-outro-effects.js +1 -4
  38. package/dist/app/session-shell/quit-outro.d.ts +9 -12
  39. package/dist/app/session-shell/quit-outro.js +11 -11
  40. package/dist/app/session-shell/response-copy-protocol.d.ts +3 -2
  41. package/dist/app/session-shell/response-copy-transport.d.ts +2 -14
  42. package/dist/app/session-shell/response-copy-transport.js +2 -3
  43. package/dist/app/session-shell/session-lifecycle.d.ts +3 -3
  44. package/dist/app/session-shell/session-lifecycle.js +2 -4
  45. package/dist/app/session-shell/session-shell-root.d.ts +74 -120
  46. package/dist/app/session-shell/session-shell-root.js +82 -115
  47. package/dist/app/session-shell/session-shell.d.ts +13 -16
  48. package/dist/app/session-shell/session-shell.js +149 -314
  49. package/dist/app/session-shell/session-viewport-controller.d.ts +7 -6
  50. package/dist/app/session-shell/session-viewport-controller.js +5 -8
  51. package/dist/app/session-shell/settings-bindings.d.ts +24 -2
  52. package/dist/app/session-shell/settings-bindings.js +24 -0
  53. package/dist/app/session-shell/share-operation.d.ts +3 -3
  54. package/dist/app/session-shell/share-operation.js +4 -6
  55. package/dist/app/session-shell/shell-clipboard.d.ts +59 -0
  56. package/dist/app/session-shell/shell-clipboard.js +119 -0
  57. package/dist/app/session-shell/shell-editor-factory.d.ts +8 -4
  58. package/dist/app/session-shell/shell-editor-factory.js +13 -15
  59. package/dist/app/session-shell/shell-host.d.ts +16 -17
  60. package/dist/app/session-shell/shell-host.js +20 -37
  61. package/dist/app/session-shell/shell-layout.d.ts +2 -2
  62. package/dist/app/session-shell/shell-prompt-suggestions.d.ts +26 -0
  63. package/dist/app/session-shell/shell-prompt-suggestions.js +48 -0
  64. package/dist/app/session-shell/suggestion-surface.d.ts +1 -6
  65. package/dist/app/session-shell/suggestion-surface.js +1 -1
  66. package/dist/app/session-shell/system-clipboard.d.ts +2 -14
  67. package/dist/app/session-shell/system-clipboard.js +2 -7
  68. package/dist/app/session-shell/transcript-document.d.ts +12 -10
  69. package/dist/app/session-shell/transcript-document.js +15 -41
  70. package/dist/app/session-shell/viewport-layout.d.ts +2 -2
  71. package/dist/app/session-shell/workflow-output.d.ts +5 -3
  72. package/dist/app/session-shell/workflow-output.js +13 -15
  73. package/dist/app/session-shell/workflow-router.d.ts +1 -3
  74. package/dist/app/session-shell/workflow-router.js +1 -4
  75. package/dist/cli/dispatch.d.ts +1 -11
  76. package/dist/cli/dispatch.js +5 -92
  77. package/dist/cli/package-messages.d.ts +0 -1
  78. package/dist/cli/package-messages.js +1 -1
  79. package/dist/cli/session-context.d.ts +1 -1
  80. package/dist/cli/session-context.js +5 -7
  81. package/dist/cli/uninstall.d.ts +4 -7
  82. package/dist/cli/uninstall.js +6 -35
  83. package/dist/cli/version-stats.js +4 -7
  84. package/dist/composition/owned-settings.d.ts +2 -2
  85. package/dist/composition/owned-settings.js +0 -4
  86. package/dist/composition/owned-ui.d.ts +3 -25
  87. package/dist/composition/owned-ui.js +37 -113
  88. package/dist/composition/reference-selection-options.d.ts +1 -1
  89. package/dist/composition/reference-selection-options.js +1 -1
  90. package/dist/composition/release-update-observation.d.ts +4 -4
  91. package/dist/composition/release-update-observation.js +17 -47
  92. package/dist/composition/session-backend.d.ts +0 -1
  93. package/dist/composition/session-runtime-registry.d.ts +5 -4
  94. package/dist/composition/settings-route-host.d.ts +0 -7
  95. package/dist/composition/settings-route-host.js +7 -20
  96. package/dist/composition/settings-search-input.d.ts +2 -1
  97. package/dist/composition/startup-route.d.ts +2 -3
  98. package/dist/composition/startup-route.js +2 -3
  99. package/dist/contracts/owned-ui/extension-ui.d.ts +2 -1
  100. package/dist/contracts/owned-ui/index.d.ts +2 -1
  101. package/dist/contracts/owned-ui/model.d.ts +0 -3
  102. package/dist/contracts/owned-ui/session-presenters.d.ts +3 -0
  103. package/dist/contracts/owned-ui/session-workflows.d.ts +1 -4
  104. package/dist/contracts/owned-ui/shell-components.d.ts +543 -0
  105. package/dist/contracts/presentation/component.d.ts +17 -0
  106. package/dist/contracts/presentation/component.js +8 -0
  107. package/dist/contracts/presentation/index.d.ts +6 -15
  108. package/dist/contracts/presentation/index.js +2 -0
  109. package/dist/contracts/presentation/terminal.d.ts +290 -0
  110. package/dist/contracts/presentation/theme.d.ts +46 -0
  111. package/dist/features/launch/development-launch.js +1 -2
  112. package/dist/features/launch/index.d.ts +1 -1
  113. package/dist/features/launch/intent.d.ts +1 -3
  114. package/dist/features/launch/intent.js +2 -4
  115. package/dist/features/launch/runtime-selection.d.ts +2 -2
  116. package/dist/features/launch/runtime-selection.js +2 -2
  117. package/dist/features/launch/session-context.d.ts +2 -2
  118. package/dist/features/owned-ui/project-trust-prompt.d.ts +2 -2
  119. package/dist/features/owned-ui/project-trust-prompt.js +1 -1
  120. package/dist/features/owned-ui/reference-screen-app.d.ts +0 -2
  121. package/dist/features/owned-ui/reference-screen-app.js +2 -9
  122. package/dist/features/owned-ui/release-note-state.d.ts +2 -1
  123. package/dist/features/owned-ui/settings-app.d.ts +0 -6
  124. package/dist/features/owned-ui/settings-app.js +42 -254
  125. package/dist/features/owned-ui/settings-edits.d.ts +31 -0
  126. package/dist/features/owned-ui/settings-edits.js +139 -0
  127. package/dist/features/owned-ui/settings-scroll-rail.d.ts +29 -0
  128. package/dist/features/owned-ui/settings-scroll-rail.js +79 -0
  129. package/dist/features/owned-ui/settings-search-input.d.ts +2 -1
  130. package/dist/features/prompt-history/service.d.ts +3 -2
  131. package/dist/foundation/launch-context/index.d.ts +0 -12
  132. package/dist/foundation/launch-context/index.js +0 -26
  133. package/dist/foundation/lifecycle/claim-gate.d.ts +9 -0
  134. package/dist/foundation/lifecycle/claim-gate.js +37 -0
  135. package/dist/foundation/lifecycle/index.d.ts +5 -9
  136. package/dist/foundation/lifecycle/index.js +3 -4
  137. package/dist/foundation/lifecycle/model.d.ts +2 -59
  138. package/dist/foundation/lifecycle/model.js +0 -35
  139. package/dist/foundation/lifecycle/paths.d.ts +0 -24
  140. package/dist/foundation/lifecycle/paths.js +0 -40
  141. package/dist/foundation/lifecycle/process-liveness.d.ts +8 -0
  142. package/dist/foundation/lifecycle/process-liveness.js +18 -0
  143. package/dist/foundation/lifecycle/session-claim-lock.d.ts +1 -1
  144. package/dist/foundation/lifecycle/session-claim-lock.js +2 -2
  145. package/dist/foundation/lifecycle/session-repository-context.d.ts +6 -6
  146. package/dist/foundation/lifecycle/session-repository-context.js +2 -3
  147. package/dist/foundation/release/automatic-update.d.ts +6 -17
  148. package/dist/foundation/release/automatic-update.js +23 -44
  149. package/dist/foundation/release/bootstrap.d.ts +2 -25
  150. package/dist/foundation/release/bootstrap.js +37 -348
  151. package/dist/foundation/release/dependency-certification.d.ts +1 -2
  152. package/dist/foundation/release/dependency-certification.js +1 -1
  153. package/dist/foundation/release/early-accent.d.ts +2 -2
  154. package/dist/foundation/release/early-accent.js +1 -1
  155. package/dist/foundation/release/index.d.ts +10 -17
  156. package/dist/foundation/release/index.js +7 -11
  157. package/dist/foundation/release/latest-release.d.ts +3 -19
  158. package/dist/foundation/release/latest-release.js +11 -12
  159. package/dist/foundation/release/ordinary-launch-selection.d.ts +1 -1
  160. package/dist/foundation/release/ordinary-launch-selection.js +1 -1
  161. package/dist/foundation/release/process-liveness.d.ts +2 -0
  162. package/dist/foundation/release/process-liveness.js +12 -0
  163. package/dist/foundation/release/release-gc.d.ts +13 -10
  164. package/dist/foundation/release/release-gc.js +37 -101
  165. package/dist/foundation/release/{cohort-state.d.ts → release-state.d.ts} +44 -69
  166. package/dist/foundation/release/{cohort-state.js → release-state.js} +38 -70
  167. package/dist/foundation/release/release-store.d.ts +2 -2
  168. package/dist/foundation/release/release-store.js +2 -2
  169. package/dist/foundation/release/restart-certification.js +1 -1
  170. package/dist/foundation/release/update-activation.d.ts +2 -9
  171. package/dist/foundation/release/update-activation.js +30 -45
  172. package/dist/foundation/release/update-execution-lease.d.ts +2 -3
  173. package/dist/foundation/release/update-execution-lease.js +2 -2
  174. package/dist/foundation/release/update-launch.d.ts +2 -4
  175. package/dist/foundation/release/update-launch.js +0 -7
  176. package/dist/foundation/release/update-recovery.js +1 -1
  177. package/dist/foundation/release/update-transaction.d.ts +1 -1
  178. package/dist/foundation/release/update-transaction.js +5 -2
  179. package/dist/foundation/release/update.d.ts +2 -12
  180. package/dist/foundation/release/update.js +37 -214
  181. package/dist/foundation/session-writer-lock/index.d.ts +14 -6
  182. package/dist/foundation/session-writer-lock/index.js +48 -103
  183. package/dist/foundation/startup/startup-budget.d.ts +5 -5
  184. package/dist/foundation/startup/startup-budget.js +2 -2
  185. package/dist/foundation/startup/startup-runtime.d.ts +1 -1
  186. package/dist/foundation/terminal-cleanup/exit-notice.d.ts +6 -0
  187. package/dist/foundation/terminal-cleanup/exit-notice.js +36 -0
  188. package/dist/foundation/terminal-cleanup/index.d.ts +2 -1
  189. package/dist/foundation/terminal-cleanup/index.js +2 -1
  190. package/dist/foundation/terminal-cleanup/terminal-reset.d.ts +0 -5
  191. package/dist/foundation/terminal-cleanup/terminal-reset.js +0 -5
  192. package/dist/integrations/pi/components/editor-interaction.d.ts +4 -12
  193. package/dist/integrations/pi/components/index.d.ts +15 -9
  194. package/dist/integrations/pi/components/index.js +9 -5
  195. package/dist/integrations/pi/components/lazy-selectors.d.ts +2 -10
  196. package/dist/integrations/pi/components/lazy-selectors.js +1 -1
  197. package/dist/integrations/pi/components/modal-frame.d.ts +5 -22
  198. package/dist/integrations/pi/components/modal-frame.js +3 -23
  199. package/dist/integrations/pi/components/owned-editor-ux.d.ts +4 -3
  200. package/dist/integrations/pi/components/prompt-input-port.d.ts +2 -19
  201. package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -1
  202. package/dist/integrations/pi/components/shell-editor-autocomplete.d.ts +3 -2
  203. package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -4
  204. package/dist/integrations/pi/components/shell-footer-status.d.ts +3 -3
  205. package/dist/integrations/pi/components/shell-footer-status.js +5 -4
  206. package/dist/integrations/pi/components/shell-hotkey-sections.js +1 -1
  207. package/dist/integrations/pi/components/shell-presenters-info.d.ts +6 -8
  208. package/dist/integrations/pi/components/shell-presenters-info.js +6 -19
  209. package/dist/integrations/pi/components/shell-presenters-transcript.d.ts +1 -1
  210. package/dist/integrations/pi/components/shell-presenters-transcript.js +1 -1
  211. package/dist/integrations/pi/components/shell-session-info-reference.d.ts +2 -1
  212. package/dist/integrations/pi/components/shell-shared-facade.d.ts +33 -229
  213. package/dist/integrations/pi/components/shell-shared-facade.js +8 -1
  214. package/dist/integrations/pi/components/skills-command.d.ts +1 -9
  215. package/dist/integrations/pi/components/skills-command.js +5 -5
  216. package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +2 -5
  217. package/dist/integrations/pi/components/submitted-prompt-adapter.js +2 -16
  218. package/dist/integrations/pi/components/theme.d.ts +9 -2
  219. package/dist/integrations/pi/components/theme.js +17 -2
  220. package/dist/integrations/pi/components/thinking-selector-dialog.d.ts +2 -1
  221. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
  222. package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +1 -2
  223. package/dist/integrations/pi/components/upstream/components/session-footer.js +6 -8
  224. package/dist/integrations/pi/engine/adapter.d.ts +3 -6
  225. package/dist/integrations/pi/engine/adapter.js +4 -28
  226. package/dist/integrations/pi/engine/changelog.d.ts +2 -2
  227. package/dist/integrations/pi/engine/changelog.js +3 -3
  228. package/dist/integrations/pi/engine/compaction-progress.d.ts +2 -3
  229. package/dist/integrations/pi/engine/compaction-progress.js +1 -1
  230. package/dist/integrations/pi/engine/conformance.d.ts +2 -1
  231. package/dist/integrations/pi/engine/default-model-setting.d.ts +0 -2
  232. package/dist/integrations/pi/engine/default-model-setting.js +1 -2
  233. package/dist/integrations/pi/engine/diagnostics-state.d.ts +0 -1
  234. package/dist/integrations/pi/engine/diagnostics-state.js +0 -14
  235. package/dist/integrations/pi/engine/event-delivery.d.ts +2 -1
  236. package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -1
  237. package/dist/integrations/pi/engine/host.js +2 -2
  238. package/dist/integrations/pi/engine/message-values.d.ts +0 -1
  239. package/dist/integrations/pi/engine/message-values.js +1 -1
  240. package/dist/integrations/pi/engine/pending-delivery.d.ts +0 -4
  241. package/dist/integrations/pi/engine/pending-delivery.js +3 -3
  242. package/dist/integrations/pi/engine/ports.d.ts +7 -1
  243. package/dist/integrations/pi/engine/ports.js +4 -0
  244. package/dist/integrations/pi/engine/project-trust-preflight.d.ts +2 -1
  245. package/dist/integrations/pi/engine/prompt-suggestions.d.ts +3 -3
  246. package/dist/integrations/pi/engine/prompt-suggestions.js +0 -40
  247. package/dist/integrations/pi/engine/provider-authentication.d.ts +1 -1
  248. package/dist/integrations/pi/engine/public-main-entry.d.ts +1 -5
  249. package/dist/integrations/pi/engine/public-main-entry.js +1 -1
  250. package/dist/integrations/pi/engine/repository-pr-rest.d.ts +1 -9
  251. package/dist/integrations/pi/engine/repository-pr-rest.js +2 -2
  252. package/dist/integrations/pi/engine/repository-pr.d.ts +1 -3
  253. package/dist/integrations/pi/engine/repository-pr.js +1 -1
  254. package/dist/integrations/pi/engine/resource-catalog.d.ts +2 -1
  255. package/dist/integrations/pi/engine/session-integration.d.ts +1 -1
  256. package/dist/integrations/pi/engine/session-runtime.d.ts +4 -3
  257. package/dist/integrations/pi/engine/session-runtime.js +0 -2
  258. package/dist/integrations/pi/engine/settings-bridge.d.ts +0 -2
  259. package/dist/integrations/pi/engine/settings-bridge.js +1 -1
  260. package/dist/integrations/pi/engine/settings-port.d.ts +3 -2
  261. package/dist/integrations/pi/engine/transcript-projection.d.ts +2 -1
  262. package/dist/integrations/pi/engine/workflow-contexts.d.ts +1 -1
  263. package/dist/integrations/pi/engine/workflow-runner.d.ts +1 -1
  264. package/dist/integrations/pi/engine/workflow-runner.js +1 -1
  265. package/dist/integrations/pi/engine/workflow-support.d.ts +0 -6
  266. package/dist/integrations/pi/engine/workflow-support.js +4 -18
  267. package/dist/integrations/pi/engine/workflows.d.ts +5 -5
  268. package/dist/integrations/pi/session-presenters/components.d.ts +3 -0
  269. package/dist/integrations/pi/session-presenters/components.js +75 -0
  270. package/dist/integrations/pi/session-presenters/index.d.ts +1 -0
  271. package/dist/integrations/pi/session-presenters/index.js +1 -0
  272. package/dist/integrations/pi/session-presenters/presentation.d.ts +3 -0
  273. package/dist/integrations/pi/session-presenters/presentation.js +10 -0
  274. package/dist/integrations/pi/session-presenters/presenters.d.ts +2 -1
  275. package/dist/integrations/pi/session-presenters/presenters.js +3 -1
  276. package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -2
  277. package/dist/integrations/pi/tui-runtime/adapter.js +23 -32
  278. package/dist/integrations/pi/tui-runtime/contracts.d.ts +22 -166
  279. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +5 -40
  280. package/dist/integrations/pi/tui-runtime/index.d.ts +1 -0
  281. package/dist/integrations/pi/tui-runtime/index.js +1 -0
  282. package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +4 -6
  283. package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +2 -8
  284. package/dist/integrations/pi/tui-runtime/overlay-geometry.js +3 -9
  285. package/dist/integrations/pi/tui-runtime/runtime-factory.d.ts +3 -0
  286. package/dist/integrations/pi/tui-runtime/runtime-factory.js +11 -0
  287. package/dist/product-identity.d.ts +4 -6
  288. package/dist/product-identity.js +6 -11
  289. package/dist/product-identity.json +1 -40
  290. package/dist/runtime-payload-inventory.json +0 -3
  291. package/dist/ui/components/index.d.ts +4 -4
  292. package/dist/ui/components/index.js +2 -2
  293. package/dist/ui/components/selection-copy.d.ts +0 -1
  294. package/dist/ui/components/selection-copy.js +0 -12
  295. package/dist/ui/components/submitted-prompt.d.ts +3 -13
  296. package/dist/ui/components/submitted-prompt.js +8 -41
  297. package/dist/ui/components/theme.d.ts +4 -19
  298. package/dist/ui/components/theme.js +6 -0
  299. package/dist/ui/components/transcript-viewport.d.ts +1 -3
  300. package/dist/ui/components/transcript-viewport.js +1 -4
  301. package/dist/ui/settings/declarations.d.ts +2 -97
  302. package/dist/ui/settings/declarations.js +2 -78
  303. package/dist/ui/settings/early-accent.js +1 -1
  304. package/dist/ui/settings/index.d.ts +3 -5
  305. package/dist/ui/settings/index.js +2 -3
  306. package/dist/ui/settings/manager.d.ts +0 -4
  307. package/dist/ui/settings/manager.js +6 -62
  308. package/dist/ui/settings/resolution.d.ts +6 -18
  309. package/dist/ui/settings/resolution.js +4 -103
  310. package/dist/ui/settings/sections.d.ts +0 -4
  311. package/dist/ui/settings/sections.js +1 -1
  312. package/docs/architecture/boundaries.md +23 -40
  313. package/docs/architecture/code-documentation.md +2 -2
  314. package/docs/architecture/internal-naming.md +11 -17
  315. package/docs/architecture/project-structure.md +13 -16
  316. package/docs/architecture/resource-and-data-policy.md +16 -31
  317. package/docs/architecture/toolchain.md +14 -19
  318. package/docs/architecture/ui-reference-provenance.md +2 -2
  319. package/docs/ci-release-runbook.md +5 -5
  320. package/docs/features/launch-profiles.md +11 -17
  321. package/docs/features/prompt-history.md +10 -11
  322. package/docs/local-worktree-cleanup.md +28 -1
  323. package/docs/manual-owned-ui-checkpoint.md +0 -1
  324. package/docs/validation.md +5 -11
  325. package/docs/worktree-link-recovery.md +6 -6
  326. package/package.json +7 -20
  327. package/bin/guardian.js +0 -42
  328. package/bin/supervisor.js +0 -7
  329. package/bin/tab-launch-context.d.ts +0 -27
  330. package/bin/tab-launch-context.js +0 -94
  331. package/dist/app/session-shell/resident-tab-coordinator.d.ts +0 -38
  332. package/dist/app/session-shell/resident-tab-coordinator.js +0 -77
  333. package/dist/cli/tabs-request.d.ts +0 -7
  334. package/dist/cli/tabs.d.ts +0 -14
  335. package/dist/cli/tabs.js +0 -151
  336. package/dist/composition/resident-tab-bridge.d.ts +0 -41
  337. package/dist/composition/resident-tab-bridge.js +0 -209
  338. package/dist/composition/utility-tab.d.ts +0 -28
  339. package/dist/composition/utility-tab.js +0 -244
  340. package/dist/features/owned-ui/plus-menu-dialog.d.ts +0 -28
  341. package/dist/features/owned-ui/plus-menu-dialog.js +0 -89
  342. package/dist/features/resident-tab/auto-name.d.ts +0 -11
  343. package/dist/features/resident-tab/auto-name.js +0 -44
  344. package/dist/features/resident-tab/index.d.ts +0 -5
  345. package/dist/features/resident-tab/index.js +0 -7
  346. package/dist/features/resident-tab/shortcut-bindings-file.d.ts +0 -8
  347. package/dist/features/resident-tab/shortcut-bindings-file.js +0 -40
  348. package/dist/features/resident-tab/shortcut-declarations.d.ts +0 -13
  349. package/dist/features/resident-tab/shortcut-declarations.js +0 -26
  350. package/dist/features/resident-tab/shortcut-projection.d.ts +0 -29
  351. package/dist/features/resident-tab/shortcut-projection.js +0 -64
  352. package/dist/features/resident-tab/status-deriver.d.ts +0 -10
  353. package/dist/features/resident-tab/status-deriver.js +0 -12
  354. package/dist/foundation/launch-guardian/exit-watcher.d.ts +0 -14
  355. package/dist/foundation/launch-guardian/exit-watcher.js +0 -103
  356. package/dist/foundation/launch-guardian/index.d.ts +0 -2
  357. package/dist/foundation/launch-guardian/index.js +0 -1
  358. package/dist/foundation/launch-guardian/main.d.ts +0 -39
  359. package/dist/foundation/launch-guardian/main.js +0 -232
  360. package/dist/foundation/lifecycle/commands.d.ts +0 -40
  361. package/dist/foundation/lifecycle/launch-instance.d.ts +0 -46
  362. package/dist/foundation/lifecycle/launch-instance.js +0 -134
  363. package/dist/foundation/lifecycle/native-claim-gate.d.ts +0 -5
  364. package/dist/foundation/lifecycle/native-claim-gate.js +0 -41
  365. package/dist/foundation/lifecycle/supervisor-startup.d.ts +0 -30
  366. package/dist/foundation/lifecycle/supervisor-startup.js +0 -106
  367. package/dist/foundation/process-containment/addon-containment.d.ts +0 -20
  368. package/dist/foundation/process-containment/addon-containment.js +0 -139
  369. package/dist/foundation/process-containment/addon-process-inspector.d.ts +0 -11
  370. package/dist/foundation/process-containment/addon-process-inspector.js +0 -36
  371. package/dist/foundation/process-containment/addon.d.ts +0 -47
  372. package/dist/foundation/process-containment/addon.js +0 -57
  373. package/dist/foundation/process-containment/artifact.d.ts +0 -1
  374. package/dist/foundation/process-containment/artifact.js +0 -35
  375. package/dist/foundation/process-containment/contracts.d.ts +0 -33
  376. package/dist/foundation/process-containment/contracts.js +0 -35
  377. package/dist/foundation/process-containment/index.d.ts +0 -9
  378. package/dist/foundation/process-containment/index.js +0 -7
  379. package/dist/foundation/process-containment/linux-process-inspector.d.ts +0 -7
  380. package/dist/foundation/process-containment/linux-process-inspector.js +0 -27
  381. package/dist/foundation/process-containment/native-process-inspector.d.ts +0 -4
  382. package/dist/foundation/process-containment/native-process-inspector.js +0 -21
  383. package/dist/foundation/protocol/client.d.ts +0 -18
  384. package/dist/foundation/protocol/client.js +0 -130
  385. package/dist/foundation/protocol/index.d.ts +0 -3
  386. package/dist/foundation/protocol/index.js +0 -2
  387. package/dist/foundation/protocol/messages.d.ts +0 -90
  388. package/dist/foundation/protocol/messages.js +0 -100
  389. package/dist/foundation/release/cohort-selection.d.ts +0 -33
  390. package/dist/foundation/release/cohort-selection.js +0 -67
  391. package/dist/foundation/release/endpoint-lock.d.ts +0 -2
  392. package/dist/foundation/release/endpoint-lock.js +0 -37
  393. package/dist/foundation/release/endpoint-recovery.d.ts +0 -10
  394. package/dist/foundation/release/endpoint-recovery.js +0 -45
  395. package/dist/foundation/release/endpoints.d.ts +0 -32
  396. package/dist/foundation/release/endpoints.js +0 -152
  397. package/dist/foundation/release/prepared-update-activation.d.ts +0 -3
  398. package/dist/foundation/release/prepared-update-activation.js +0 -27
  399. package/dist/foundation/release/process-cleanup.d.ts +0 -14
  400. package/dist/foundation/release/process-cleanup.js +0 -76
  401. package/dist/foundation/release/supervisor-identity.d.ts +0 -15
  402. package/dist/foundation/release/supervisor-identity.js +0 -63
  403. package/dist/foundation/resident-tabs/boot-identity.d.ts +0 -6
  404. package/dist/foundation/resident-tabs/boot-identity.js +0 -16
  405. package/dist/foundation/resident-tabs/bounded-host-command.d.ts +0 -20
  406. package/dist/foundation/resident-tabs/bounded-host-command.js +0 -62
  407. package/dist/foundation/resident-tabs/bridge-client.d.ts +0 -73
  408. package/dist/foundation/resident-tabs/bridge-client.js +0 -327
  409. package/dist/foundation/resident-tabs/continuity.d.ts +0 -12
  410. package/dist/foundation/resident-tabs/continuity.js +0 -63
  411. package/dist/foundation/resident-tabs/doctor.d.ts +0 -28
  412. package/dist/foundation/resident-tabs/doctor.js +0 -166
  413. package/dist/foundation/resident-tabs/draft-checkpoint.d.ts +0 -27
  414. package/dist/foundation/resident-tabs/draft-checkpoint.js +0 -145
  415. package/dist/foundation/resident-tabs/ensure-terminal-host.d.ts +0 -36
  416. package/dist/foundation/resident-tabs/ensure-terminal-host.js +0 -151
  417. package/dist/foundation/resident-tabs/fault-injection.d.ts +0 -8
  418. package/dist/foundation/resident-tabs/fault-injection.js +0 -26
  419. package/dist/foundation/resident-tabs/fixture-control.d.ts +0 -7
  420. package/dist/foundation/resident-tabs/fixture-control.js +0 -35
  421. package/dist/foundation/resident-tabs/host-entry.js +0 -17
  422. package/dist/foundation/resident-tabs/index.d.ts +0 -15
  423. package/dist/foundation/resident-tabs/index.js +0 -10
  424. package/dist/foundation/resident-tabs/maintenance.d.ts +0 -39
  425. package/dist/foundation/resident-tabs/maintenance.js +0 -75
  426. package/dist/foundation/resident-tabs/progress-observation-schema.d.ts +0 -34
  427. package/dist/foundation/resident-tabs/progress-observation-schema.js +0 -1
  428. package/dist/foundation/resident-tabs/progress-observation.d.ts +0 -4
  429. package/dist/foundation/resident-tabs/progress-observation.js +0 -150
  430. package/dist/foundation/resident-tabs/prompt-journal.d.ts +0 -63
  431. package/dist/foundation/resident-tabs/prompt-journal.js +0 -213
  432. package/dist/foundation/resident-tabs/protocol.d.ts +0 -12
  433. package/dist/foundation/resident-tabs/protocol.js +0 -195
  434. package/dist/foundation/resident-tabs/recovery.d.ts +0 -26
  435. package/dist/foundation/resident-tabs/recovery.js +0 -205
  436. package/dist/foundation/resident-tabs/release-holds.d.ts +0 -28
  437. package/dist/foundation/resident-tabs/release-holds.js +0 -78
  438. package/dist/foundation/resident-tabs/routes.d.ts +0 -5
  439. package/dist/foundation/resident-tabs/routes.js +0 -5
  440. package/dist/foundation/resident-tabs/routing.d.ts +0 -11
  441. package/dist/foundation/resident-tabs/routing.js +0 -10
  442. package/dist/foundation/resident-tabs/runtime-control.d.ts +0 -38
  443. package/dist/foundation/resident-tabs/runtime-control.js +0 -74
  444. package/dist/foundation/resident-tabs/session-sync.d.ts +0 -14
  445. package/dist/foundation/resident-tabs/session-sync.js +0 -37
  446. package/dist/foundation/resident-tabs/settings.d.ts +0 -16
  447. package/dist/foundation/resident-tabs/settings.js +0 -60
  448. package/dist/foundation/resident-tabs/terminal-host-artifact.d.ts +0 -14
  449. package/dist/foundation/resident-tabs/terminal-host-artifact.js +0 -78
  450. package/dist/foundation/resident-tabs/zip-archive.d.ts +0 -9
  451. package/dist/foundation/resident-tabs/zip-archive.js +0 -56
  452. package/dist/foundation/storage/control-store.d.ts +0 -20
  453. package/dist/foundation/storage/control-store.js +0 -331
  454. package/dist/foundation/storage/index.d.ts +0 -1
  455. package/dist/foundation/storage/index.js +0 -1
  456. package/dist/foundation/supervision/index.d.ts +0 -3
  457. package/dist/foundation/supervision/index.js +0 -3
  458. package/dist/foundation/supervision/main.d.ts +0 -1
  459. package/dist/foundation/supervision/main.js +0 -86
  460. package/dist/foundation/supervision/paths.d.ts +0 -1
  461. package/dist/foundation/supervision/paths.js +0 -1
  462. package/dist/foundation/supervision/server.d.ts +0 -46
  463. package/dist/foundation/supervision/server.js +0 -611
  464. package/dist/integrations/pi/components/components.d.ts +0 -4
  465. package/dist/integrations/pi/components/components.js +0 -48
  466. package/dist/integrations/pi/components/conformance.d.ts +0 -18
  467. package/dist/integrations/pi/components/conformance.js +0 -70
  468. package/dist/integrations/pi/components/shell-components.d.ts +0 -7
  469. package/dist/integrations/pi/components/shell-components.js +0 -7
  470. package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +0 -33
  471. package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -114
  472. package/dist/integrations/pi/engine/offline-settings-port.d.ts +0 -23
  473. package/dist/integrations/pi/engine/offline-settings-port.js +0 -54
  474. package/dist/native/darwin-arm64/manifest.json +0 -23
  475. package/dist/native/darwin-arm64/process-guardian.node +0 -0
  476. package/dist/native/darwin-arm64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10500
  477. package/dist/native/darwin-arm64/terminal-host.manifest.json +0 -46
  478. package/dist/native/darwin-arm64/terminal-host.node +0 -0
  479. package/dist/native/darwin-x64/manifest.json +0 -23
  480. package/dist/native/darwin-x64/process-guardian.node +0 -0
  481. package/dist/native/darwin-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10737
  482. package/dist/native/darwin-x64/terminal-host.manifest.json +0 -46
  483. package/dist/native/darwin-x64/terminal-host.node +0 -0
  484. package/dist/native/linux-x64/manifest.json +0 -23
  485. package/dist/native/linux-x64/process-guardian.node +0 -0
  486. package/dist/native/linux-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -11226
  487. package/dist/native/linux-x64/terminal-host.manifest.json +0 -46
  488. package/dist/native/linux-x64/terminal-host.node +0 -0
  489. package/dist/native/win32-x64/manifest.json +0 -23
  490. package/dist/native/win32-x64/process-guardian.node +0 -0
  491. package/dist/native/win32-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10757
  492. package/dist/native/win32-x64/terminal-host.manifest.json +0 -46
  493. package/dist/native/win32-x64/terminal-host.node +0 -0
  494. package/dist/ui/settings/migrations.d.ts +0 -19
  495. package/dist/ui/settings/migrations.js +0 -209
  496. package/dist/ui/settings/progress-palette.generated.d.ts +0 -139
  497. package/dist/ui/settings/progress-palette.generated.js +0 -139
  498. package/docs/architecture/evidence/resident-tabs/linux-x64.md +0 -37
  499. package/docs/architecture/evidence/resident-tabs/macos-arm64.md +0 -36
  500. package/docs/architecture/evidence/resident-tabs/macos-x64.md +0 -35
  501. package/docs/architecture/evidence/resident-tabs/windows-x64.md +0 -36
  502. package/docs/architecture/evidence/terminal-host-spike/manual-one-pane-terminal-host.md +0 -70
  503. package/docs/architecture/evidence/terminal-host-spike/manual-two-by-two-basic-terminal-host.md +0 -32
  504. package/docs/architecture/evidence/terminal-host-spike/milestone-baseline.json +0 -115
  505. package/docs/architecture/evidence/terminal-host-spike/owned-ui-foundation-prerequisite.json +0 -48
  506. package/docs/architecture/evidence/terminal-host-spike/terminal-host-provenance.json +0 -125
  507. package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-1.json +0 -56
  508. package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-3.json +0 -174
  509. package/docs/architecture/evidence/terminal-host-spike/terminal-spike-acceptance-record.json +0 -18
  510. package/docs/architecture/native-fixture-isolation.md +0 -23
  511. package/docs/architecture/process-guardian-provenance.md +0 -36
  512. package/docs/architecture/resident-tabs-requirements.md +0 -18
  513. package/docs/architecture/resident-tabs.md +0 -668
  514. package/docs/architecture/terminal-host-proof-gate.md +0 -34
  515. package/docs/architecture/terminal-host-provenance.md +0 -81
  516. package/docs/architecture/terminal-host-spike-evidence.md +0 -39
  517. package/docs/launch-recovery.md +0 -23
  518. package/docs/manual-launch-instance-acceptance.md +0 -43
  519. package/docs/manual-resident-tabs-acceptance.md +0 -51
  520. /package/dist/{cli/tabs-request.js → contracts/owned-ui/shell-components.js} +0 -0
  521. /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.d.ts +0 -0
  522. /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.js +0 -0
  523. /package/dist/{foundation/lifecycle/commands.js → contracts/presentation/terminal.js} +0 -0
  524. /package/dist/{foundation/resident-tabs/host-entry.d.ts → contracts/presentation/theme.js} +0 -0
@@ -1,5 +1,7 @@
1
1
  import type { MaterializedRelease } from "./release-store.js";
2
- export declare const RELEASE_COHORT_SCHEMA: string;
2
+ export declare const RELEASE_STATE_SCHEMA: string;
3
+ /** How long a release stays on disk after its approval, so processes started from it keep their files. */
4
+ export declare const RELEASE_RETENTION_MS: number;
3
5
  export type ReleaseApproval = "candidate" | "approved" | "rejected";
4
6
  export interface ReleaseRecord {
5
7
  readonly releaseId: string;
@@ -9,6 +11,7 @@ export interface ReleaseRecord {
9
11
  readonly launchContract?: string;
10
12
  readonly approval: ReleaseApproval;
11
13
  readonly materializedAt: string;
14
+ /** When the release was approved; retention measures its age from this instant. */
12
15
  readonly certifiedAt: string | null;
13
16
  readonly diagnosticsPath: string | null;
14
17
  }
@@ -19,12 +22,6 @@ export interface ReleaseReferences {
19
22
  readonly rollback: string | null;
20
23
  readonly retention: readonly string[];
21
24
  }
22
- export type ExternalReleaseHoldAuthority = "agent" | "migration" | "resident";
23
- /** A current hold supplied by an authority that must participate in every reconciliation. */
24
- export interface ExternalReleaseHold {
25
- readonly authority: ExternalReleaseHoldAuthority;
26
- readonly releaseId: string;
27
- }
28
25
  export interface ActiveReleaseTransactionReference {
29
26
  readonly status: "active" | "completed" | "rolled-back" | "failed";
30
27
  readonly priorActiveReleaseId: string | null;
@@ -69,49 +66,21 @@ export interface ReleaseCleanupState {
69
66
  readonly diagnostics: readonly ReleaseCleanupDiagnostic[];
70
67
  readonly workerRuns: readonly ReleaseCleanupWorkerRun[];
71
68
  }
72
- export interface CohortState {
73
- readonly schema: typeof RELEASE_COHORT_SCHEMA;
69
+ export interface ReleaseState {
70
+ readonly schema: typeof RELEASE_STATE_SCHEMA;
74
71
  readonly revision: number;
75
72
  readonly releases: Readonly<Record<string, ReleaseRecord>>;
76
73
  readonly references: ReleaseReferences;
77
74
  readonly cleanup: ReleaseCleanupState;
78
- readonly activation: {
79
- readonly state: "idle" | "pending" | "draining" | "blocked" | "failed";
80
- readonly reason: string | null;
81
- readonly blockerGenerationIds: readonly string[];
82
- readonly updatedAt: string;
83
- };
84
- }
85
- export interface EndpointOwnership {
86
- readonly state: "idle" | "busy" | "draining" | "released" | "blocked";
87
- readonly liveInstanceIds: readonly string[];
88
- readonly nonResumableInstanceIds: readonly string[];
89
- readonly uncertainInstanceIds: readonly string[];
90
- }
91
- export interface SupervisorEndpointMetadata {
92
- readonly schema: string;
93
- readonly supervisorId: string;
94
- readonly endpoint: string;
95
- readonly pid: number;
96
- readonly pidStartIdentity: string;
97
- /** Exact OS creation token; absent on historical supervisor metadata. */
98
- readonly nativeStartIdentity?: string;
99
- readonly bootNonce: string;
100
- readonly startedAt: string;
101
- readonly releaseId: string;
102
- readonly releaseRoot: string;
103
- readonly contentDigest: string;
104
- readonly ownership: EndpointOwnership;
105
- readonly envelope: string;
106
- readonly envelopeRevision: number;
107
- readonly requiredFeatures: readonly string[];
108
- readonly optionalFeatures: readonly string[];
109
- readonly contractDigest: string;
110
75
  }
111
76
  export interface ProtectedReleaseInputs {
112
- readonly liveReleaseIds?: readonly string[];
113
- readonly externalHolds?: readonly ExternalReleaseHold[];
77
+ /** Releases the reconciling command itself runs from; they are never collected under it. */
78
+ readonly ownReleaseIds?: readonly string[];
114
79
  readonly transaction?: ActiveReleaseTransactionReference | null;
80
+ /** Clock for the age window; defaults to the wall clock. */
81
+ readonly now?: number;
82
+ /** Age window measured from approval; defaults to seven days. */
83
+ readonly retentionMs?: number;
115
84
  }
116
85
  export interface ProtectedReleasePlan {
117
86
  readonly protectedReleaseIds: readonly string[];
@@ -124,38 +93,44 @@ export interface OrphanReleaseDisposition {
124
93
  readonly trashPath?: string | null;
125
94
  }
126
95
  export interface ReleaseRetentionReconciliation {
127
- readonly state: CohortState;
96
+ readonly state: ReleaseState;
128
97
  readonly plan: ProtectedReleasePlan;
129
98
  readonly detachedReleaseIds: readonly string[];
130
99
  }
131
100
  /**
132
- * Derive protection exclusively from current selectors and ownership authorities.
133
- * The historical retention snapshot is deliberately not an input to this plan.
101
+ * Age-based retention. A release stays while a selector names it (active, its rollback, or a
102
+ * candidate still being certified), while an unfinished update may return to it, while the
103
+ * reconciling command runs from it, or while its approval is younger than the retention window.
104
+ * Nothing asks which processes are running: a session that outlives the window and two updates
105
+ * can lose its release files, which is the documented trade-off.
134
106
  */
135
- export declare function planProtectedReleases(state: CohortState, inputs?: ProtectedReleaseInputs): ProtectedReleasePlan;
136
- /** Serializes validated cohort-state revisions under a lock and commits each update atomically. */
137
- export declare class CohortStateStore {
107
+ export declare function planProtectedReleases(state: ReleaseState, inputs?: ProtectedReleaseInputs): ProtectedReleasePlan;
108
+ /**
109
+ * Whether a release is young enough to keep. An approved release counts from its approval; a
110
+ * candidate still awaiting certification counts from its materialization so concurrent work is
111
+ * not collected under it. A record without a readable timestamp is treated as old.
112
+ */
113
+ export declare function withinRetention(release: ReleaseRecord, now: number, retentionMs?: number): boolean;
114
+ /** Serializes validated release-state revisions under a lock and commits each update atomically. */
115
+ export declare class ReleaseStateStore {
138
116
  readonly path: string;
139
117
  constructor(dataDir: string);
140
- read(): Promise<CohortState>;
141
- update(operation: (current: CohortState) => CohortState | Promise<CohortState>): Promise<CohortState>;
142
- recordCandidate(release: MaterializedRelease): Promise<CohortState>;
143
- approve(releaseId: string, diagnosticsPath: string): Promise<CohortState>;
144
- activate(releaseId: string): Promise<CohortState>;
118
+ read(): Promise<ReleaseState>;
119
+ update(operation: (current: ReleaseState) => ReleaseState | Promise<ReleaseState>): Promise<ReleaseState>;
120
+ recordCandidate(release: MaterializedRelease): Promise<ReleaseState>;
121
+ approve(releaseId: string, diagnosticsPath: string): Promise<ReleaseState>;
122
+ activate(releaseId: string): Promise<ReleaseState>;
145
123
  /** Atomically advances ordinary launch without allowing an older installation to roll active state back. */
146
- activateForLaunch(releaseId: string, replaceUnlaunchableActiveId?: string): Promise<CohortState>;
147
- blockPending(reason: string, blockerGenerationIds: readonly string[]): Promise<CohortState>;
148
- rollback(ownershipReleased: boolean): Promise<CohortState>;
149
- setRetention(releaseIds: readonly string[]): Promise<CohortState>;
124
+ activateForLaunch(releaseId: string, replaceUnlaunchableActiveId?: string): Promise<ReleaseState>;
125
+ rollback(): Promise<ReleaseState>;
150
126
  /** Atomically replace legacy retention history and detach every currently collectible record. */
151
- reconcileRetention(resolveInputs: (current: CohortState) => ProtectedReleaseInputs | Promise<ProtectedReleaseInputs>, orphans?: readonly OrphanReleaseDisposition[]): Promise<ReleaseRetentionReconciliation>;
152
- markCleanupTrash(releaseId: string, trashPath: string): Promise<CohortState>;
153
- recordCleanupFailure(releaseId: string, stage: string, error: unknown): Promise<CohortState>;
154
- completeCleanup(releaseId: string): Promise<CohortState>;
155
- recordCleanupWorkerScheduled(runId: string): Promise<CohortState>;
156
- recordCleanupWorkerStarted(runId: string, pid: number): Promise<CohortState>;
157
- recordCleanupWorkerProgress(runId: string, summary: ReleaseCleanupWorkerSummary): Promise<CohortState>;
158
- recordCleanupWorkerFinished(runId: string, status: Exclude<ReleaseCleanupWorkerStatus, "scheduled" | "running">, summary: ReleaseCleanupWorkerSummary, error?: unknown): Promise<CohortState>;
159
- removeUnreferencedRelease(releaseId: string, externalReferences: readonly string[]): Promise<CohortState>;
160
- }
161
- export declare function emptyState(): CohortState;
127
+ reconcileRetention(resolveInputs: (current: ReleaseState) => ProtectedReleaseInputs | Promise<ProtectedReleaseInputs>, orphans?: readonly OrphanReleaseDisposition[]): Promise<ReleaseRetentionReconciliation>;
128
+ markCleanupTrash(releaseId: string, trashPath: string): Promise<ReleaseState>;
129
+ recordCleanupFailure(releaseId: string, stage: string, error: unknown): Promise<ReleaseState>;
130
+ completeCleanup(releaseId: string): Promise<ReleaseState>;
131
+ recordCleanupWorkerScheduled(runId: string): Promise<ReleaseState>;
132
+ recordCleanupWorkerStarted(runId: string, pid: number): Promise<ReleaseState>;
133
+ recordCleanupWorkerProgress(runId: string, summary: ReleaseCleanupWorkerSummary): Promise<ReleaseState>;
134
+ recordCleanupWorkerFinished(runId: string, status: Exclude<ReleaseCleanupWorkerStatus, "scheduled" | "running">, summary: ReleaseCleanupWorkerSummary, error?: unknown): Promise<ReleaseState>;
135
+ }
136
+ export declare function emptyState(): ReleaseState;
@@ -3,33 +3,34 @@ import { mkdir, open, readFile, rename, rm, stat } from "node:fs/promises";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { selectOrdinaryLaunchReleaseId } from "./ordinary-launch-selection.js";
5
5
  import { PRODUCT_IDENTITY } from "../../product-identity.js";
6
- export const RELEASE_COHORT_SCHEMA = PRODUCT_IDENTITY.protocol.releaseCohortSchema;
6
+ export const RELEASE_STATE_SCHEMA = PRODUCT_IDENTITY.protocol.releaseCohortSchema;
7
7
  const RELEASE_ID_PATTERN = /^[0-9A-Za-z.+_-]+-[a-f0-9]{20}$/;
8
+ /** How long a release stays on disk after its approval, so processes started from it keep their files. */
9
+ export const RELEASE_RETENTION_MS = 7 * 24 * 60 * 60 * 1_000;
8
10
  /**
9
- * Derive protection exclusively from current selectors and ownership authorities.
10
- * The historical retention snapshot is deliberately not an input to this plan.
11
+ * Age-based retention. A release stays while a selector names it (active, its rollback, or a
12
+ * candidate still being certified), while an unfinished update may return to it, while the
13
+ * reconciling command runs from it, or while its approval is younger than the retention window.
14
+ * Nothing asks which processes are running: a session that outlives the window and two updates
15
+ * can lose its release files, which is the documented trade-off.
11
16
  */
12
17
  export function planProtectedReleases(state, inputs = {}) {
13
- const holds = inputs.externalHolds ?? [];
14
- for (const hold of holds) {
15
- if (hold.authority !== "agent" && hold.authority !== "migration" && hold.authority !== "resident")
16
- throw new Error(`unknown release hold authority: ${String(hold.authority)}`);
17
- if (!state.releases[hold.releaseId] && !state.cleanup.pending[hold.releaseId]) {
18
- throw new Error(`external ${hold.authority} hold names unknown release ${hold.releaseId}`);
19
- }
20
- }
21
18
  const protectedIds = new Set();
22
19
  for (const id of [state.references.active, state.references.pending, state.references.approved, state.references.rollback]) {
23
20
  if (id !== null)
24
21
  protectedIds.add(id);
25
22
  }
26
- for (const id of inputs.liveReleaseIds ?? [])
23
+ for (const id of inputs.ownReleaseIds ?? [])
27
24
  protectedIds.add(id);
28
- for (const hold of holds)
29
- protectedIds.add(hold.releaseId);
30
25
  if (inputs.transaction?.status === "active" && inputs.transaction.priorActiveReleaseId !== null) {
31
26
  protectedIds.add(inputs.transaction.priorActiveReleaseId);
32
27
  }
28
+ const now = inputs.now ?? Date.now();
29
+ const window = inputs.retentionMs ?? RELEASE_RETENTION_MS;
30
+ for (const release of Object.values(state.releases)) {
31
+ if (withinRetention(release, now, window))
32
+ protectedIds.add(release.releaseId);
33
+ }
33
34
  const protectedReleaseIds = [...protectedIds].sort();
34
35
  const known = Object.keys(state.releases).sort();
35
36
  return {
@@ -38,8 +39,20 @@ export function planProtectedReleases(state, inputs = {}) {
38
39
  collectibleReleaseIds: known.filter(id => !protectedIds.has(id)),
39
40
  };
40
41
  }
41
- /** Serializes validated cohort-state revisions under a lock and commits each update atomically. */
42
- export class CohortStateStore {
42
+ /**
43
+ * Whether a release is young enough to keep. An approved release counts from its approval; a
44
+ * candidate still awaiting certification counts from its materialization so concurrent work is
45
+ * not collected under it. A record without a readable timestamp is treated as old.
46
+ */
47
+ export function withinRetention(release, now, retentionMs = RELEASE_RETENTION_MS) {
48
+ if (release.approval === "rejected")
49
+ return false;
50
+ const stamp = release.approval === "approved" ? release.certifiedAt : release.materializedAt;
51
+ const at = stamp === null ? Number.NaN : Date.parse(stamp);
52
+ return Number.isFinite(at) && now - at < retentionMs;
53
+ }
54
+ /** Serializes validated release-state revisions under a lock and commits each update atomically. */
55
+ export class ReleaseStateStore {
43
56
  path;
44
57
  constructor(dataDir) {
45
58
  this.path = resolve(dataDir, "release-state.json");
@@ -103,7 +116,6 @@ export class CohortStateStore {
103
116
  ...current.references,
104
117
  pending: current.references.active === release.releaseId ? current.references.pending : release.releaseId,
105
118
  },
106
- activation: activation("pending", "candidate awaits certification and safe activation"),
107
119
  };
108
120
  });
109
121
  }
@@ -132,7 +144,6 @@ export class CohortStateStore {
132
144
  approved: releaseId,
133
145
  rollback: prior && prior !== releaseId ? prior : current.references.rollback,
134
146
  },
135
- activation: activation("idle", null),
136
147
  };
137
148
  });
138
149
  }
@@ -153,7 +164,6 @@ export class CohortStateStore {
153
164
  pending: current.references.pending === releaseId ? null : current.references.pending,
154
165
  approved: selectedId,
155
166
  },
156
- activation: activation("idle", null),
157
167
  };
158
168
  }
159
169
  const prior = current.references.active;
@@ -166,16 +176,10 @@ export class CohortStateStore {
166
176
  approved: releaseId,
167
177
  rollback: prior && prior !== releaseId ? prior : current.references.rollback,
168
178
  },
169
- activation: activation("idle", null),
170
179
  };
171
180
  });
172
181
  }
173
- async blockPending(reason, blockerGenerationIds) {
174
- return await this.update(current => ({ ...current, activation: { ...activation("blocked", reason), blockerGenerationIds: [...blockerGenerationIds] } }));
175
- }
176
- async rollback(ownershipReleased) {
177
- if (!ownershipReleased)
178
- throw new Error("cannot roll back before current cohort ownership is released");
182
+ async rollback() {
179
183
  return await this.update(current => {
180
184
  const rollbackId = current.references.rollback;
181
185
  if (!rollbackId)
@@ -192,17 +196,9 @@ export class CohortStateStore {
192
196
  approved: rollbackId,
193
197
  rollback: current.references.active,
194
198
  },
195
- activation: activation("idle", null),
196
199
  };
197
200
  });
198
201
  }
199
- async setRetention(releaseIds) {
200
- return await this.update(current => {
201
- for (const releaseId of releaseIds)
202
- requiredRelease(current, releaseId);
203
- return { ...current, references: { ...current.references, retention: unique(releaseIds) } };
204
- });
205
- }
206
202
  /** Atomically replace legacy retention history and detach every currently collectible record. */
207
203
  async reconcileRetention(resolveInputs, orphans = []) {
208
204
  let plan = null;
@@ -318,40 +314,14 @@ export class CohortStateStore {
318
314
  error: error === null ? null : boundedError(error),
319
315
  })));
320
316
  }
321
- async removeUnreferencedRelease(releaseId, externalReferences) {
322
- return await this.update(current => {
323
- const release = requiredRelease(current, releaseId);
324
- const protectedIds = new Set([
325
- current.references.active,
326
- current.references.pending,
327
- current.references.approved,
328
- current.references.rollback,
329
- ...current.references.retention,
330
- ...externalReferences,
331
- ].filter((value) => value !== null));
332
- if (protectedIds.has(releaseId))
333
- throw new Error(`release ${releaseId} is still referenced and cannot be collected`);
334
- const releases = { ...current.releases };
335
- delete releases[releaseId];
336
- return {
337
- ...current,
338
- releases,
339
- cleanup: {
340
- ...current.cleanup,
341
- pending: { ...current.cleanup.pending, [releaseId]: cleanupDisposition(release, "detached", null) },
342
- },
343
- };
344
- });
345
- }
346
317
  }
347
318
  export function emptyState() {
348
319
  return {
349
- schema: RELEASE_COHORT_SCHEMA,
320
+ schema: RELEASE_STATE_SCHEMA,
350
321
  revision: 0,
351
322
  releases: {},
352
323
  references: { active: null, pending: null, approved: null, rollback: null, retention: [] },
353
324
  cleanup: { pending: {}, diagnostics: [], workerRuns: [] },
354
- activation: activation("idle", null),
355
325
  };
356
326
  }
357
327
  function cleanupDisposition(release, stage, trashPath) {
@@ -382,16 +352,12 @@ function replaceCleanupWorkerRun(current, runId, operation) {
382
352
  : [...current.cleanup.workerRuns, operation(undefined)];
383
353
  return { ...current, cleanup: { ...current.cleanup, workerRuns: workerRuns.slice(-16) } };
384
354
  }
385
- function activation(state, reason) {
386
- return { state, reason, blockerGenerationIds: [], updatedAt: new Date().toISOString() };
387
- }
388
355
  function requiredRelease(state, releaseId) {
389
356
  const release = state.releases[releaseId];
390
357
  if (!release)
391
358
  throw new Error(`unknown release ${releaseId}`);
392
359
  return release;
393
360
  }
394
- function unique(values) { return [...new Set(values)]; }
395
361
  async function acquireLock(path) {
396
362
  const deadline = Date.now() + 5_000;
397
363
  while (true) {
@@ -452,7 +418,9 @@ async function reclaimAbandonedLock(path) {
452
418
  function normalizeState(value) {
453
419
  if (!value || typeof value !== "object")
454
420
  return value;
455
- const state = value;
421
+ // Compatibility: state written while supervisors coordinated activation carries an
422
+ // `activation` record that nothing reads any more; it is dropped on the next write.
423
+ const { activation: _activation, ...state } = value;
456
424
  const cleanup = state.cleanup;
457
425
  return {
458
426
  ...state,
@@ -462,11 +430,11 @@ function normalizeState(value) {
462
430
  };
463
431
  }
464
432
  function validateState(state) {
465
- if (!state || state.schema !== RELEASE_COHORT_SCHEMA || !Number.isSafeInteger(state.revision) || state.revision < 0
433
+ if (!state || state.schema !== RELEASE_STATE_SCHEMA || !Number.isSafeInteger(state.revision) || state.revision < 0
466
434
  || !state.releases || typeof state.releases !== "object" || !state.references || !Array.isArray(state.references.retention)
467
435
  || !state.cleanup || typeof state.cleanup.pending !== "object" || !Array.isArray(state.cleanup.diagnostics)
468
436
  || !Array.isArray(state.cleanup.workerRuns)) {
469
- throw new Error("invalid release cohort state");
437
+ throw new Error("invalid release state");
470
438
  }
471
439
  for (const run of state.cleanup.workerRuns) {
472
440
  if (!run || typeof run.runId !== "string" || run.runId.length === 0
@@ -501,9 +469,9 @@ function validateReleaseRecord(releaseId, release) {
501
469
  function validateTransition(current, next) {
502
470
  validateState(next);
503
471
  if (next.schema !== current.schema)
504
- throw new Error("release cohort schema cannot change during a state update");
472
+ throw new Error("release schema cannot change during a state update");
505
473
  if (next.revision !== current.revision)
506
- throw new Error("release cohort revision is controlled by the state store");
474
+ throw new Error("release revision is controlled by the state store");
507
475
  }
508
476
  function boundedError(error) {
509
477
  return (error instanceof Error ? error.message : String(error)).replace(/[\r\n]+/g, " ").slice(0, 1_000);
@@ -51,8 +51,8 @@ export declare function assertCertifiedFilesPresent(releaseRoot: string): Promis
51
51
  export declare function repairMaterializedRelease(packageRoot: string, releaseRoot: string): Promise<MaterializedRelease>;
52
52
  /**
53
53
  * Load metadata for a release whose bytes were already certified by the
54
- * current parent process or an authenticated live supervisor. Callers must
55
- * establish one of those preconditions; untrusted releases require full
54
+ * current parent process or recorded by an authenticated certification. Callers must
55
+ * establish that precondition; untrusted releases require full
56
56
  * verification.
57
57
  */
58
58
  export declare function readCertifiedReleaseManifest(record: CertifiedReleaseRecord, selectedStoreRoot: string, options?: ReadCertifiedReleaseManifestOptions): Promise<MaterializedRelease>;
@@ -167,8 +167,8 @@ export async function repairMaterializedRelease(packageRoot, releaseRoot) {
167
167
  }
168
168
  /**
169
169
  * Load metadata for a release whose bytes were already certified by the
170
- * current parent process or an authenticated live supervisor. Callers must
171
- * establish one of those preconditions; untrusted releases require full
170
+ * current parent process or recorded by an authenticated certification. Callers must
171
+ * establish that precondition; untrusted releases require full
172
172
  * verification.
173
173
  */
174
174
  export async function readCertifiedReleaseManifest(record, selectedStoreRoot, options = {}) {
@@ -10,7 +10,7 @@ import { PRODUCT_PACKAGE_NAME } from "./release.js";
10
10
  import { RELEASE_MANIFEST_FILENAME } from "./release-store.js";
11
11
  import { UpdateTransactionStore } from "./update-transaction.js";
12
12
  const RESTART_SEAL_VERSION = 1;
13
- const REQUIRED_LAUNCH_ENTRIES = ["bin/supervisor.js", "bin/guardian.js"];
13
+ const REQUIRED_LAUNCH_ENTRIES = ["bin/ui.js"];
14
14
  /** Build compact restart authority after complete content verification established read-only payload files. */
15
15
  export async function createRestartSeal(release, dataDir) {
16
16
  const policy = immutablePlatformPolicy();
@@ -1,4 +1,3 @@
1
- import type { ContinuityOptions } from "../resident-tabs/index.js";
2
1
  /**
3
2
  * The one activation contract an installed tree can offer the updater that installed it.
4
3
  * The updater knows nothing else about the tree: the manifest names the contracts the tree
@@ -9,10 +8,6 @@ export declare const UPDATE_ACTIVATION_ENTRY = "bin/activate.js";
9
8
  /** Manifest field listing the activation contracts an installed tree serves. */
10
9
  export declare const UPDATE_ACTIVATION_MANIFEST_FIELD = "updateActivationContracts";
11
10
  export type UpdateActivationPhase = "materialized" | "certified" | "active-reference-committed";
12
- /** A certified candidate is safe to retain, but resident control continuity blocks selection. */
13
- export declare class UpdateActivationBlockedError extends Error {
14
- readonly code: "resident-continuity-blocked";
15
- }
16
11
  /**
17
12
  * Copying the release is the longest step with nothing to say for itself, so it
18
13
  * reports the files it has written against the files it must write. A caller that
@@ -49,12 +44,11 @@ export type UpdateActivationEvent = {
49
44
  } | {
50
45
  readonly event: "failed";
51
46
  readonly message: string;
52
- readonly code?: UpdateActivationBlockedError["code"];
53
47
  };
54
48
  /**
55
49
  * Activate the installed tree at `packageRoot` with this process's own release code:
56
- * materialize it into the immutable store, certify, warm, verify supervision, and only
57
- * then move the active reference. This is what the installed tree runs for itself through
50
+ * materialize it into the immutable store, certify, warm, and only then move the active
51
+ * reference. This is what the installed tree runs for itself through
58
52
  * its activation entry, and what an updater runs in-process for a tree older than the contract.
59
53
  */
60
54
  export declare function activateInstalledRelease(request: UpdateActivationRequest, callbacks: UpdateActivationCallbacks): Promise<void>;
@@ -76,4 +70,3 @@ export declare function delegateActivation(request: UpdateActivationRequest, cal
76
70
  export declare function runActivationEntry(argv: readonly string[], entryUrl: string, io?: {
77
71
  write(line: string): void;
78
72
  }, environment?: NodeJS.ProcessEnv): Promise<number>;
79
- export declare function assertContinuityOrBlock(context: ContinuityOptions): Promise<void>;
@@ -2,10 +2,9 @@ import { spawn } from "node:child_process";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
6
- import { certifyMaterializedRelease, ensureSupervisor } from "./bootstrap.js";
7
- import { CohortStateStore } from "./cohort-state.js";
8
- import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
5
+ import { PRODUCT_TEXT } from "../../product-identity.js";
6
+ import { certifyMaterializedRelease } from "./bootstrap.js";
7
+ import { ReleaseStateStore } from "./release-state.js";
9
8
  import { resolveProductPaths } from "../lifecycle/index.js";
10
9
  import { materializeRelease } from "./release-store.js";
11
10
  import { warmMaterializedRelease } from "./warmup.js";
@@ -19,18 +18,16 @@ export const UPDATE_ACTIVATION_ENTRY = "bin/activate.js";
19
18
  /** Manifest field listing the activation contracts an installed tree serves. */
20
19
  export const UPDATE_ACTIVATION_MANIFEST_FIELD = "updateActivationContracts";
21
20
  const ACTIVATION_DIAGNOSTIC_LIMIT = 2_000;
22
- /** A certified candidate is safe to retain, but resident control continuity blocks selection. */
23
- export class UpdateActivationBlockedError extends Error {
24
- code = "resident-continuity-blocked";
25
- }
21
+ /** Bound on one progress line; the activator's events are all far shorter. */
22
+ const ACTIVATION_LINE_LIMIT = 64 * 1_024;
26
23
  /**
27
24
  * Activate the installed tree at `packageRoot` with this process's own release code:
28
- * materialize it into the immutable store, certify, warm, verify supervision, and only
29
- * then move the active reference. This is what the installed tree runs for itself through
25
+ * materialize it into the immutable store, certify, warm, and only then move the active
26
+ * reference. This is what the installed tree runs for itself through
30
27
  * its activation entry, and what an updater runs in-process for a tree older than the contract.
31
28
  */
32
29
  export async function activateInstalledRelease(request, callbacks) {
33
- const stateStore = new CohortStateStore(request.dataDir);
30
+ const stateStore = new ReleaseStateStore(request.dataDir);
34
31
  let total = 0;
35
32
  let completed = 0;
36
33
  const candidate = await materializeRelease(request.packageRoot, request.dataDir, {
@@ -55,16 +52,6 @@ export async function activateInstalledRelease(request, callbacks) {
55
52
  callbacks.onWarmup?.("started");
56
53
  await warmMaterializedRelease(candidate, request.environment);
57
54
  callbacks.onWarmup?.("completed");
58
- await completeActivation(candidate, request, callbacks, stateStore);
59
- }
60
- async function completeActivation(candidate, request, callbacks, stateStore) {
61
- const paths = resolveProductPaths(request.environment);
62
- const continuity = { releaseRoot: candidate.releaseRoot, dataDir: request.dataDir, environment: request.environment,
63
- profileRoot: request.environment[PRODUCT_IDENTITY.environment.profileHome] ?? paths.configDir, runtimeDir: paths.runtimeDir };
64
- await assertContinuityOrBlock(continuity);
65
- await ensureSupervisor(candidate, request.environment);
66
- // Invariant: revalidate after supervision, before committing client activation or restart readiness.
67
- await assertContinuityOrBlock(continuity);
68
55
  await stateStore.activate(candidate.releaseId);
69
56
  await callbacks.phase("active-reference-committed");
70
57
  }
@@ -94,7 +81,7 @@ export async function delegateActivation(request, callbacks) {
94
81
  stdio: ["ignore", "pipe", "pipe"],
95
82
  windowsHide: true,
96
83
  });
97
- const decoder = new LineFrameDecoder();
84
+ let pending = "";
98
85
  let diagnostics = "";
99
86
  let failure = null;
100
87
  let completed = false;
@@ -102,14 +89,25 @@ export async function delegateActivation(request, callbacks) {
102
89
  let relay = Promise.resolve();
103
90
  child.stderr?.setEncoding("utf8");
104
91
  child.stderr?.on("data", chunk => { diagnostics = `${diagnostics}${chunk}`.slice(-ACTIVATION_DIAGNOSTIC_LIMIT); });
92
+ child.stdout?.setEncoding("utf8");
105
93
  child.stdout?.on("data", chunk => {
106
- let events;
107
- try {
108
- events = decoder.push(chunk);
94
+ const lines = `${pending}${String(chunk)}`.split("\n");
95
+ pending = lines.pop() ?? "";
96
+ if (pending.length > ACTIVATION_LINE_LIMIT) {
97
+ failure ??= new Error("activation event exceeds the line limit");
98
+ pending = "";
109
99
  }
110
- catch (error) {
111
- failure ??= new Error(errorMessage(error));
112
- return;
100
+ const events = [];
101
+ for (const line of lines) {
102
+ if (line.trim().length === 0)
103
+ continue;
104
+ try {
105
+ events.push(JSON.parse(line));
106
+ }
107
+ catch (error) {
108
+ failure ??= new Error(errorMessage(error));
109
+ return;
110
+ }
113
111
  }
114
112
  for (const event of events) {
115
113
  relay = relay.then(async () => {
@@ -127,9 +125,7 @@ export async function delegateActivation(request, callbacks) {
127
125
  else if (parsed.event === "completed")
128
126
  completed = true;
129
127
  else
130
- failure ??= parsed.code === "resident-continuity-blocked"
131
- ? new UpdateActivationBlockedError(parsed.message)
132
- : new Error(parsed.message);
128
+ failure ??= new Error(parsed.message);
133
129
  }).catch(error => { failure ??= new Error(errorMessage(error)); });
134
130
  }
135
131
  });
@@ -150,7 +146,7 @@ export async function delegateActivation(request, callbacks) {
150
146
  * writing one progress event per line so the updater that started it can follow along.
151
147
  */
152
148
  export async function runActivationEntry(argv, entryUrl, io = { write: line => process.stdout.write(line) }, environment = process.env) {
153
- const emit = (event) => io.write(encodeFrame(event));
149
+ const emit = (event) => io.write(`${JSON.stringify(event)}\n`);
154
150
  try {
155
151
  const arguments_ = parseEntryArguments(argv);
156
152
  const packageRoot = resolve(fileURLToPath(new URL("..", entryUrl)));
@@ -168,7 +164,7 @@ export async function runActivationEntry(argv, entryUrl, io = { write: line => p
168
164
  return 0;
169
165
  }
170
166
  catch (error) {
171
- emit({ event: "failed", message: errorMessage(error), ...(error instanceof UpdateActivationBlockedError ? { code: error.code } : {}) });
167
+ emit({ event: "failed", message: errorMessage(error) });
172
168
  return 1;
173
169
  }
174
170
  }
@@ -206,22 +202,11 @@ function parseActivationEvent(value) {
206
202
  case "completed":
207
203
  return { event: "completed" };
208
204
  case "failed":
209
- return typeof record.message === "string" && (record.code === undefined || record.code === "resident-continuity-blocked")
210
- ? { event: "failed", message: record.message, ...(record.code === undefined ? {} : { code: record.code }) }
211
- : null;
205
+ return typeof record.message === "string" ? { event: "failed", message: record.message } : null;
212
206
  default:
213
207
  return null;
214
208
  }
215
209
  }
216
- export async function assertContinuityOrBlock(context) {
217
- const { assertResidentContinuity } = await import("../resident-tabs/index.js");
218
- try {
219
- await assertResidentContinuity(context);
220
- }
221
- catch (error) {
222
- throw new UpdateActivationBlockedError(errorMessage(error), { cause: error });
223
- }
224
- }
225
210
  function summarize(text) {
226
211
  const lines = text.split(/\r?\n/).map(line => line.trim()).filter(line => line.length > 0);
227
212
  return lines.length === 0 ? "" : `: ${lines.slice(0, 4).join(" | ")}`;
@@ -1,8 +1,7 @@
1
1
  import type { UpdateChannel } from "./types.js";
2
2
  import { type UpdateTransaction } from "./update-transaction.js";
3
- export declare const UPDATE_EXECUTION_LEASE_FILENAME = "update-execution.json";
4
3
  declare const LEASE_SCHEMA = 1;
5
- export type UpdateExecutionMode = "manual" | "automatic";
4
+ type UpdateExecutionMode = "manual" | "automatic";
6
5
  export interface UpdateExecutionOwner {
7
6
  readonly schema: typeof LEASE_SCHEMA;
8
7
  readonly ownerId: string;
@@ -14,7 +13,7 @@ export interface UpdateExecutionOwner {
14
13
  readonly mode: UpdateExecutionMode;
15
14
  readonly acquiredAt: string;
16
15
  }
17
- export type UpdateExecutionLeaseResult = {
16
+ type UpdateExecutionLeaseResult = {
18
17
  readonly status: "acquired";
19
18
  readonly owner: UpdateExecutionOwner;
20
19
  release(): Promise<void>;
@@ -2,9 +2,9 @@ import { randomUUID } from "node:crypto";
2
2
  import { mkdir, open, readFile, rename, rm } from "node:fs/promises";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import lockfile from "proper-lockfile";
5
- import { processIsAlive } from "./process-cleanup.js";
5
+ import { processIsAlive } from "./process-liveness.js";
6
6
  import { UpdateTransactionStore } from "./update-transaction.js";
7
- export const UPDATE_EXECUTION_LEASE_FILENAME = "update-execution.json";
7
+ const UPDATE_EXECUTION_LEASE_FILENAME = "update-execution.json";
8
8
  const LEASE_SCHEMA = 1;
9
9
  const MAX_LEASE_BYTES = 8_192;
10
10
  /**
@@ -1,6 +1,4 @@
1
- import type { CohortState, ReleaseRecord } from "./cohort-state.js";
1
+ import type { ReleaseState, ReleaseRecord } from "./release-state.js";
2
2
  import type { UpdateTransaction } from "./update-transaction.js";
3
3
  /** Keep interactive launches on the last successful release until the update commits success. */
4
- export declare function selectUpdateLaunchRelease(state: CohortState, transaction: UpdateTransaction | null): ReleaseRecord | null;
5
- /** Pause cohort retirement during preparation; afterward only the successful launch release admits new sessions. */
6
- export declare function selectSupervisorLaunchReleaseId(state: CohortState, transaction: UpdateTransaction | null): string | null;
4
+ export declare function selectUpdateLaunchRelease(state: ReleaseState, transaction: UpdateTransaction | null): ReleaseRecord | null;