@timurproko/a1 0.1.8-dev.0b6d8cc → 0.1.8-dev.121

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 (387) hide show
  1. package/README.md +29 -23
  2. package/bin/cli.js +7 -7
  3. package/bin/guardian.js +1 -1
  4. package/bin/supervisor.js +1 -1
  5. package/bin/ui.js +3 -3
  6. package/dist/{src/cli → cli}/dispatch.js +14 -12
  7. package/dist/{src/cli → cli}/packages.d.ts +10 -2
  8. package/dist/{src/cli → cli}/packages.js +24 -20
  9. package/dist/{src/cli → cli}/version-stats.js +4 -4
  10. package/dist/composition/agent-engine-bridge.d.ts +3 -0
  11. package/dist/composition/agent-engine-bridge.js +108 -0
  12. package/dist/composition/index.d.ts +3 -0
  13. package/dist/composition/index.js +3 -0
  14. package/dist/composition/owned-ui.d.ts +25 -0
  15. package/dist/composition/owned-ui.js +40 -0
  16. package/dist/composition/process.d.ts +16 -0
  17. package/dist/composition/process.js +45 -0
  18. package/dist/composition/settings-route-host.d.ts +8 -0
  19. package/dist/composition/settings-route-host.js +73 -0
  20. package/dist/{src/features → features}/owned-ui/customization.d.ts +1 -1
  21. package/dist/{src/features → features}/owned-ui/customization.js +1 -1
  22. package/dist/{src/features → features}/owned-ui/diagnostics.d.ts +1 -1
  23. package/dist/{src/features → features}/owned-ui/run.d.ts +2 -2
  24. package/dist/{src/features → features}/owned-ui/settings-app.d.ts +3 -3
  25. package/dist/{src/features → features}/owned-ui/settings-app.js +1 -1
  26. package/dist/{src/features → features}/workspace/capabilities.d.ts +1 -1
  27. package/dist/{src/features → features}/workspace/reducer.d.ts +1 -1
  28. package/dist/{src/features → features}/workspace/reducer.js +1 -1
  29. package/dist/{src/features → features}/workspace/router.d.ts +1 -1
  30. package/dist/{src/features → features}/workspace/store.d.ts +1 -1
  31. package/dist/{src/foundation → foundation}/launch-guardian/main.js +8 -2
  32. package/dist/foundation/lifecycle/paths.d.ts +28 -0
  33. package/dist/{src/foundation → foundation}/lifecycle/paths.js +21 -0
  34. package/dist/{src/foundation → foundation}/native-host-protocol/messages.d.ts +1 -1
  35. package/dist/{src/foundation → foundation}/native-host-protocol/messages.js +1 -1
  36. package/dist/{src/foundation → foundation}/release/bootstrap.js +42 -10
  37. package/dist/foundation/release/endpoints.d.ts +20 -0
  38. package/dist/foundation/release/endpoints.js +50 -0
  39. package/dist/{src/foundation → foundation}/release/index.d.ts +1 -0
  40. package/dist/{src/foundation → foundation}/release/index.js +1 -0
  41. package/dist/{src/foundation → foundation}/release/release-gc.d.ts +4 -1
  42. package/dist/{src/foundation → foundation}/release/release-gc.js +9 -1
  43. package/dist/{src/foundation → foundation}/release/update.d.ts +9 -1
  44. package/dist/{src/foundation → foundation}/release/update.js +69 -35
  45. package/dist/{src/foundation → foundation}/storage/control-store.d.ts +1 -1
  46. package/dist/{src/foundation → foundation}/storage/control-store.js +1 -1
  47. package/dist/{src/foundation → foundation}/structured-agent-runtime/backpressure.d.ts +1 -1
  48. package/dist/{src/foundation → foundation}/structured-agent-runtime/backpressure.js +1 -1
  49. package/dist/{src/foundation → foundation}/structured-agent-runtime/commands.d.ts +1 -1
  50. package/dist/{src/foundation → foundation}/structured-agent-runtime/commands.js +1 -1
  51. package/dist/{src/foundation → foundation}/structured-agent-runtime/handshake.d.ts +1 -1
  52. package/dist/{src/foundation → foundation}/structured-agent-runtime/handshake.js +1 -1
  53. package/dist/{src/foundation → foundation}/structured-agent-runtime/reconnection.d.ts +1 -1
  54. package/dist/{src/foundation → foundation}/structured-agent-runtime/reconnection.js +1 -1
  55. package/dist/{src/foundation → foundation}/structured-agent-runtime/state.d.ts +1 -1
  56. package/dist/{src/foundation → foundation}/structured-agent-runtime/state.js +1 -1
  57. package/dist/foundation/supervision/index.d.ts +3 -0
  58. package/dist/foundation/supervision/index.js +3 -0
  59. package/dist/{src/foundation → foundation}/supervision/main.js +11 -5
  60. package/dist/foundation/supervision/paths.d.ts +1 -0
  61. package/dist/foundation/supervision/paths.js +1 -0
  62. package/dist/{src/foundation → foundation}/supervision/server.d.ts +18 -1
  63. package/dist/{src/foundation → foundation}/supervision/server.js +52 -1
  64. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/components.d.ts +1 -1
  65. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/conformance.js +2 -2
  66. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-extension-ui.d.ts +1 -1
  67. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-footer-status.d.ts +1 -1
  68. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-presenters-transcript.d.ts +1 -1
  69. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-presenters-transcript.js +1 -1
  70. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-selectors-dialogs.d.ts +1 -1
  71. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-shared-facade.d.ts +1 -1
  72. package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-footer.d.ts +1 -1
  73. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/adapter.d.ts +2 -2
  74. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/adapter.js +113 -16
  75. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/conformance.js +2 -2
  76. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/model-auth-integration.d.ts +1 -1
  77. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/package-integration.d.ts +1 -1
  78. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/package-integration.js +1 -1
  79. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/resource-extension-integration.d.ts +1 -1
  80. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/session-integration.d.ts +1 -1
  81. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/session-integration.js +1 -1
  82. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/settings-integration.d.ts +1 -1
  83. package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflow-controllers.d.ts +1 -1
  84. package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/route-host.d.ts +1 -1
  85. package/dist/{src/foundation/pi-owned-ui-integration/session-shell.d.ts → integrations/pi/owned-ui/session-shell-root.d.ts} +13 -46
  86. package/dist/integrations/pi/owned-ui/session-shell-root.js +722 -0
  87. package/dist/integrations/pi/owned-ui/session-shell.d.ts +46 -0
  88. package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/session-shell.js +24 -704
  89. package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/presentation-adapter.d.ts +1 -1
  90. package/dist/native/darwin-arm64/manifest.json +1 -1
  91. package/dist/native/linux-x64/manifest.json +1 -1
  92. package/dist/native/win32-x64/manifest.json +2 -2
  93. package/dist/native/win32-x64/process-guardian.exe +0 -0
  94. package/dist/{src/foundation/ui-apps → ui/apps}/contracts.d.ts +1 -1
  95. package/dist/{src/foundation/ui-apps → ui/apps}/host.d.ts +1 -1
  96. package/dist/{src/foundation/ui-apps → ui/apps}/host.js +1 -1
  97. package/dist/{src/foundation/owned-ui-settings → ui/settings}/session.d.ts +1 -1
  98. package/docs/architecture/boundaries.md +8 -8
  99. package/docs/architecture/project-structure.md +52 -29
  100. package/docs/architecture/toolchain.md +5 -5
  101. package/docs/ci-release-runbook.md +76 -79
  102. package/docs/features/launch-profiles.md +7 -9
  103. package/docs/manual-owned-ui-checkpoint.md +52 -0
  104. package/docs/manual-terminal-colour-check.md +1 -1
  105. package/package.json +24 -22
  106. package/dist/src/composition/index.d.ts +0 -48
  107. package/dist/src/composition/index.js +0 -258
  108. package/dist/src/foundation/lifecycle/paths.d.ts +0 -10
  109. package/dist/src/foundation/supervision/index.d.ts +0 -3
  110. package/dist/src/foundation/supervision/index.js +0 -3
  111. package/dist/src/foundation/supervision/paths.d.ts +0 -1
  112. package/dist/src/foundation/supervision/paths.js +0 -1
  113. package/docs/manual-transparent-checkpoint.md +0 -53
  114. /package/dist/{src/cli → cli}/capabilities.d.ts +0 -0
  115. /package/dist/{src/cli → cli}/capabilities.js +0 -0
  116. /package/dist/{src/cli → cli}/dispatch.d.ts +0 -0
  117. /package/dist/{src/cli → cli}/index.d.ts +0 -0
  118. /package/dist/{src/cli → cli}/index.js +0 -0
  119. /package/dist/{src/cli → cli}/version-stats.d.ts +0 -0
  120. /package/dist/{src/cli → cli}/version.d.ts +0 -0
  121. /package/dist/{src/cli → cli}/version.js +0 -0
  122. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/capability-ports.d.ts +0 -0
  123. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/capability-ports.js +0 -0
  124. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain-validation.d.ts +0 -0
  125. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain-validation.js +0 -0
  126. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain.d.ts +0 -0
  127. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/domain.js +0 -0
  128. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/index.d.ts +0 -0
  129. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/index.js +0 -0
  130. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/model.d.ts +0 -0
  131. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/model.js +0 -0
  132. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/package-ports.d.ts +0 -0
  133. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/package-ports.js +0 -0
  134. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/ports.d.ts +0 -0
  135. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/ports.js +0 -0
  136. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/serialization.d.ts +0 -0
  137. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/serialization.js +0 -0
  138. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/validation.d.ts +0 -0
  139. /package/dist/{src/foundation/agent-engine-contracts → contracts/agent-engine}/validation.js +0 -0
  140. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/extension-ui.d.ts +0 -0
  141. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/extension-ui.js +0 -0
  142. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/index.d.ts +0 -0
  143. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/index.js +0 -0
  144. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/model.d.ts +0 -0
  145. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/model.js +0 -0
  146. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/validation.d.ts +0 -0
  147. /package/dist/{src/foundation/owned-ui-contracts → contracts/owned-ui}/validation.js +0 -0
  148. /package/dist/{src/foundation/presentation-contracts → contracts/presentation}/index.d.ts +0 -0
  149. /package/dist/{src/foundation/presentation-contracts → contracts/presentation}/index.js +0 -0
  150. /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/index.d.ts +0 -0
  151. /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/index.js +0 -0
  152. /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/model.d.ts +0 -0
  153. /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/model.js +0 -0
  154. /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/validation.d.ts +0 -0
  155. /package/dist/{src/foundation/workspace-contracts → contracts/workspace}/validation.js +0 -0
  156. /package/dist/{src/features → features}/launch/development-launch.d.ts +0 -0
  157. /package/dist/{src/features → features}/launch/development-launch.js +0 -0
  158. /package/dist/{src/features → features}/launch/index.d.ts +0 -0
  159. /package/dist/{src/features → features}/launch/index.js +0 -0
  160. /package/dist/{src/features → features}/launch/initialize-profile.d.ts +0 -0
  161. /package/dist/{src/features → features}/launch/initialize-profile.js +0 -0
  162. /package/dist/{src/features → features}/launch/intent.d.ts +0 -0
  163. /package/dist/{src/features → features}/launch/intent.js +0 -0
  164. /package/dist/{src/features → features}/launch/prepare-launch.d.ts +0 -0
  165. /package/dist/{src/features → features}/launch/prepare-launch.js +0 -0
  166. /package/dist/{src/features → features}/launch/profile-paths.d.ts +0 -0
  167. /package/dist/{src/features → features}/launch/profile-paths.js +0 -0
  168. /package/dist/{src/features → features}/launch/profiles.d.ts +0 -0
  169. /package/dist/{src/features → features}/launch/profiles.js +0 -0
  170. /package/dist/{src/features → features}/launch/runtime-selection.d.ts +0 -0
  171. /package/dist/{src/features → features}/launch/runtime-selection.js +0 -0
  172. /package/dist/{src/features → features}/owned-ui/diagnostics.js +0 -0
  173. /package/dist/{src/features → features}/owned-ui/index.d.ts +0 -0
  174. /package/dist/{src/features → features}/owned-ui/index.js +0 -0
  175. /package/dist/{src/features → features}/owned-ui/run.js +0 -0
  176. /package/dist/{src/features → features}/workspace/capabilities.js +0 -0
  177. /package/dist/{src/features → features}/workspace/index.d.ts +0 -0
  178. /package/dist/{src/features → features}/workspace/index.js +0 -0
  179. /package/dist/{src/features → features}/workspace/presentation.d.ts +0 -0
  180. /package/dist/{src/features → features}/workspace/presentation.js +0 -0
  181. /package/dist/{src/features → features}/workspace/reconciliation.d.ts +0 -0
  182. /package/dist/{src/features → features}/workspace/reconciliation.js +0 -0
  183. /package/dist/{src/features → features}/workspace/router.js +0 -0
  184. /package/dist/{src/features → features}/workspace/store.js +0 -0
  185. /package/dist/{src/foundation → foundation}/launch-guardian/index.d.ts +0 -0
  186. /package/dist/{src/foundation → foundation}/launch-guardian/index.js +0 -0
  187. /package/dist/{src/foundation → foundation}/launch-guardian/main.d.ts +0 -0
  188. /package/dist/{src/foundation → foundation}/lifecycle/commands.d.ts +0 -0
  189. /package/dist/{src/foundation → foundation}/lifecycle/commands.js +0 -0
  190. /package/dist/{src/foundation → foundation}/lifecycle/index.d.ts +0 -0
  191. /package/dist/{src/foundation → foundation}/lifecycle/index.js +0 -0
  192. /package/dist/{src/foundation → foundation}/lifecycle/launch-instance.d.ts +0 -0
  193. /package/dist/{src/foundation → foundation}/lifecycle/launch-instance.js +0 -0
  194. /package/dist/{src/foundation → foundation}/lifecycle/model.d.ts +0 -0
  195. /package/dist/{src/foundation → foundation}/lifecycle/model.js +0 -0
  196. /package/dist/{src/foundation → foundation}/native-host-protocol/codec.d.ts +0 -0
  197. /package/dist/{src/foundation → foundation}/native-host-protocol/codec.js +0 -0
  198. /package/dist/{src/foundation → foundation}/native-host-protocol/evidence.d.ts +0 -0
  199. /package/dist/{src/foundation → foundation}/native-host-protocol/evidence.js +0 -0
  200. /package/dist/{src/foundation → foundation}/native-host-protocol/index.d.ts +0 -0
  201. /package/dist/{src/foundation → foundation}/native-host-protocol/index.js +0 -0
  202. /package/dist/{src/foundation → foundation}/native-host-protocol/proof-gate.d.ts +0 -0
  203. /package/dist/{src/foundation → foundation}/native-host-protocol/proof-gate.js +0 -0
  204. /package/dist/{src/foundation → foundation}/process-containment/artifact.d.ts +0 -0
  205. /package/dist/{src/foundation → foundation}/process-containment/artifact.js +0 -0
  206. /package/dist/{src/foundation → foundation}/process-containment/contracts.d.ts +0 -0
  207. /package/dist/{src/foundation → foundation}/process-containment/contracts.js +0 -0
  208. /package/dist/{src/foundation → foundation}/process-containment/index.d.ts +0 -0
  209. /package/dist/{src/foundation → foundation}/process-containment/index.js +0 -0
  210. /package/dist/{src/foundation → foundation}/process-containment/linux-process-inspector.d.ts +0 -0
  211. /package/dist/{src/foundation → foundation}/process-containment/linux-process-inspector.js +0 -0
  212. /package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.d.ts +0 -0
  213. /package/dist/{src/foundation → foundation}/process-containment/native-guardian-containment.js +0 -0
  214. /package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.d.ts +0 -0
  215. /package/dist/{src/foundation → foundation}/process-containment/windows-process-inspector.js +0 -0
  216. /package/dist/{src/foundation → foundation}/protocol/client.d.ts +0 -0
  217. /package/dist/{src/foundation → foundation}/protocol/client.js +0 -0
  218. /package/dist/{src/foundation → foundation}/protocol/index.d.ts +0 -0
  219. /package/dist/{src/foundation → foundation}/protocol/index.js +0 -0
  220. /package/dist/{src/foundation → foundation}/protocol/messages.d.ts +0 -0
  221. /package/dist/{src/foundation → foundation}/protocol/messages.js +0 -0
  222. /package/dist/{src/foundation → foundation}/release/bootstrap.d.ts +0 -0
  223. /package/dist/{src/foundation → foundation}/release/cohort-selection.d.ts +0 -0
  224. /package/dist/{src/foundation → foundation}/release/cohort-selection.js +0 -0
  225. /package/dist/{src/foundation → foundation}/release/cohort-state.d.ts +0 -0
  226. /package/dist/{src/foundation → foundation}/release/cohort-state.js +0 -0
  227. /package/dist/{src/foundation → foundation}/release/concurrency.d.ts +0 -0
  228. /package/dist/{src/foundation → foundation}/release/concurrency.js +0 -0
  229. /package/dist/{src/foundation → foundation}/release/process-cleanup.d.ts +0 -0
  230. /package/dist/{src/foundation → foundation}/release/process-cleanup.js +0 -0
  231. /package/dist/{src/foundation → foundation}/release/release-store.d.ts +0 -0
  232. /package/dist/{src/foundation → foundation}/release/release-store.js +0 -0
  233. /package/dist/{src/foundation → foundation}/release/release.d.ts +0 -0
  234. /package/dist/{src/foundation → foundation}/release/release.js +0 -0
  235. /package/dist/{src/foundation → foundation}/release/stable-release.d.ts +0 -0
  236. /package/dist/{src/foundation → foundation}/release/stable-release.js +0 -0
  237. /package/dist/{src/foundation → foundation}/release/update-transaction.d.ts +0 -0
  238. /package/dist/{src/foundation → foundation}/release/update-transaction.js +0 -0
  239. /package/dist/{src/foundation → foundation}/storage/index.d.ts +0 -0
  240. /package/dist/{src/foundation → foundation}/storage/index.js +0 -0
  241. /package/dist/{src/foundation → foundation}/structured-agent-runtime/index.d.ts +0 -0
  242. /package/dist/{src/foundation → foundation}/structured-agent-runtime/index.js +0 -0
  243. /package/dist/{src/foundation → foundation}/supervision/main.d.ts +0 -0
  244. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/components.js +0 -0
  245. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/conformance.d.ts +0 -0
  246. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/index.d.ts +0 -0
  247. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/index.js +0 -0
  248. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/resources/builtin-themes.d.ts +0 -0
  249. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/resources/builtin-themes.js +0 -0
  250. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-components.d.ts +0 -0
  251. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-components.js +0 -0
  252. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-editor-autocomplete.d.ts +0 -0
  253. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-editor-autocomplete.js +0 -0
  254. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-extension-ui.js +0 -0
  255. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-footer-status.js +0 -0
  256. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-selectors-dialogs.js +0 -0
  257. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/shell-shared-facade.js +0 -0
  258. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/theme.d.ts +0 -0
  259. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/theme.js +0 -0
  260. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/adjacent/core/keybindings.d.ts +0 -0
  261. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/adjacent/core/keybindings.js +0 -0
  262. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/countdown-timer.d.ts +0 -0
  263. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/countdown-timer.js +0 -0
  264. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/custom-entry.d.ts +0 -0
  265. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/custom-entry.js +0 -0
  266. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/daxnuts.d.ts +0 -0
  267. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/daxnuts.js +0 -0
  268. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/earendil-announcement.d.ts +0 -0
  269. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/earendil-announcement.js +0 -0
  270. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/extension-editor.d.ts +0 -0
  271. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/extension-editor.js +0 -0
  272. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/first-time-setup.d.ts +0 -0
  273. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/first-time-setup.js +0 -0
  274. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/markdown-transform.d.ts +0 -0
  275. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/markdown-transform.js +0 -0
  276. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/mermaid.d.ts +0 -0
  277. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/mermaid.js +0 -0
  278. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/owned-editor.d.ts +0 -0
  279. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/owned-editor.js +0 -0
  280. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/scoped-models-selector.d.ts +0 -0
  281. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/scoped-models-selector.js +0 -0
  282. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-footer.js +0 -0
  283. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector-search.d.ts +0 -0
  284. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector-search.js +0 -0
  285. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector.d.ts +0 -0
  286. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/session-selector.js +0 -0
  287. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/skill-invocation-message.d.ts +0 -0
  288. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/skill-invocation-message.js +0 -0
  289. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/status-indicator.d.ts +0 -0
  290. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/status-indicator.js +0 -0
  291. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/tree-selector.d.ts +0 -0
  292. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/tree-selector.js +0 -0
  293. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/trust-selector.d.ts +0 -0
  294. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/components/trust-selector.js +0 -0
  295. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/external-editor.d.ts +0 -0
  296. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/external-editor.js +0 -0
  297. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/model-search.d.ts +0 -0
  298. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/model-search.js +0 -0
  299. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme-controller.d.ts +0 -0
  300. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme-controller.js +0 -0
  301. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme.d.ts +0 -0
  302. /package/dist/{src/foundation/pi-component-adapter → integrations/pi/components}/upstream/theme/theme.js +0 -0
  303. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/conformance.d.ts +0 -0
  304. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/index.d.ts +0 -0
  305. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/index.js +0 -0
  306. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/model-auth-integration.js +0 -0
  307. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/pi-settings-metadata.json +0 -0
  308. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/public-main-entry.d.ts +0 -0
  309. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/public-main-entry.js +0 -0
  310. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/resource-extension-integration.js +0 -0
  311. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/runtime-integration.d.ts +0 -0
  312. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/runtime-integration.js +0 -0
  313. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/settings-integration.js +0 -0
  314. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflow-controllers.js +0 -0
  315. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflows.d.ts +0 -0
  316. /package/dist/{src/foundation/pi-engine-adapter → integrations/pi/engine}/workflows.js +0 -0
  317. /package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/index.d.ts +0 -0
  318. /package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/index.js +0 -0
  319. /package/dist/{src/foundation/pi-owned-ui-integration → integrations/pi/owned-ui}/route-host.js +0 -0
  320. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/adapter.d.ts +0 -0
  321. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/adapter.js +0 -0
  322. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/conformance.d.ts +0 -0
  323. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/conformance.js +0 -0
  324. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/contracts.d.ts +0 -0
  325. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/contracts.js +0 -0
  326. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/index.d.ts +0 -0
  327. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/index.js +0 -0
  328. /package/dist/{src/foundation/pi-tui-runtime-adapter → integrations/pi/tui-runtime}/presentation-adapter.js +0 -0
  329. /package/dist/{src/product-identity.d.ts → product-identity.d.ts} +0 -0
  330. /package/dist/{src/product-identity.js → product-identity.js} +0 -0
  331. /package/dist/{src/product-identity.json → product-identity.json} +0 -0
  332. /package/dist/{src/foundation/ui-apps → ui/apps}/contracts.js +0 -0
  333. /package/dist/{src/foundation/ui-apps → ui/apps}/index.d.ts +0 -0
  334. /package/dist/{src/foundation/ui-apps → ui/apps}/index.js +0 -0
  335. /package/dist/{src/foundation/ui-apps → ui/apps}/registry.d.ts +0 -0
  336. /package/dist/{src/foundation/ui-apps → ui/apps}/registry.js +0 -0
  337. /package/dist/{src/foundation/ui-components → ui/components}/dialog-panel.d.ts +0 -0
  338. /package/dist/{src/foundation/ui-components → ui/components}/dialog-panel.js +0 -0
  339. /package/dist/{src/foundation/ui-components → ui/components}/frame.d.ts +0 -0
  340. /package/dist/{src/foundation/ui-components → ui/components}/frame.js +0 -0
  341. /package/dist/{src/foundation/ui-components → ui/components}/index.d.ts +0 -0
  342. /package/dist/{src/foundation/ui-components → ui/components}/index.js +0 -0
  343. /package/dist/{src/foundation/ui-components → ui/components}/label.d.ts +0 -0
  344. /package/dist/{src/foundation/ui-components → ui/components}/label.js +0 -0
  345. /package/dist/{src/foundation/ui-components → ui/components}/line-input.d.ts +0 -0
  346. /package/dist/{src/foundation/ui-components → ui/components}/line-input.js +0 -0
  347. /package/dist/{src/foundation/ui-components → ui/components}/list-block.d.ts +0 -0
  348. /package/dist/{src/foundation/ui-components → ui/components}/list-block.js +0 -0
  349. /package/dist/{src/foundation/ui-components → ui/components}/list-view.d.ts +0 -0
  350. /package/dist/{src/foundation/ui-components → ui/components}/list-view.js +0 -0
  351. /package/dist/{src/foundation/ui-components → ui/components}/mouse.d.ts +0 -0
  352. /package/dist/{src/foundation/ui-components → ui/components}/mouse.js +0 -0
  353. /package/dist/{src/foundation/ui-components → ui/components}/pane.d.ts +0 -0
  354. /package/dist/{src/foundation/ui-components → ui/components}/pane.js +0 -0
  355. /package/dist/{src/foundation/ui-components → ui/components}/revision.d.ts +0 -0
  356. /package/dist/{src/foundation/ui-components → ui/components}/revision.js +0 -0
  357. /package/dist/{src/foundation/ui-components → ui/components}/scrollbar.d.ts +0 -0
  358. /package/dist/{src/foundation/ui-components → ui/components}/scrollbar.js +0 -0
  359. /package/dist/{src/foundation/ui-components → ui/components}/shortcuts.d.ts +0 -0
  360. /package/dist/{src/foundation/ui-components → ui/components}/shortcuts.js +0 -0
  361. /package/dist/{src/foundation/ui-components → ui/components}/spans.d.ts +0 -0
  362. /package/dist/{src/foundation/ui-components → ui/components}/spans.js +0 -0
  363. /package/dist/{src/foundation/ui-components → ui/components}/status-line.d.ts +0 -0
  364. /package/dist/{src/foundation/ui-components → ui/components}/status-line.js +0 -0
  365. /package/dist/{src/foundation/ui-components → ui/components}/stepper.d.ts +0 -0
  366. /package/dist/{src/foundation/ui-components → ui/components}/stepper.js +0 -0
  367. /package/dist/{src/foundation/ui-components → ui/components}/surface.d.ts +0 -0
  368. /package/dist/{src/foundation/ui-components → ui/components}/surface.js +0 -0
  369. /package/dist/{src/foundation/ui-components → ui/components}/text.d.ts +0 -0
  370. /package/dist/{src/foundation/ui-components → ui/components}/text.js +0 -0
  371. /package/dist/{src/foundation/ui-components → ui/components}/theme.d.ts +0 -0
  372. /package/dist/{src/foundation/ui-components → ui/components}/theme.js +0 -0
  373. /package/dist/{src/foundation/ui-components → ui/components}/value-menu.d.ts +0 -0
  374. /package/dist/{src/foundation/ui-components → ui/components}/value-menu.js +0 -0
  375. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/declarations.d.ts +0 -0
  376. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/declarations.js +0 -0
  377. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/index.d.ts +0 -0
  378. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/index.js +0 -0
  379. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/migrations.d.ts +0 -0
  380. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/migrations.js +0 -0
  381. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/resolution.d.ts +0 -0
  382. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/resolution.js +0 -0
  383. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/sections.d.ts +0 -0
  384. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/sections.js +0 -0
  385. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/session.js +0 -0
  386. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/store.d.ts +0 -0
  387. /package/dist/{src/foundation/owned-ui-settings → ui/settings}/store.js +0 -0
@@ -6,7 +6,7 @@ import crossSpawn from "cross-spawn";
6
6
  import { valid as validSemver } from "semver";
7
7
  import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
8
8
  import { certifyMaterializedRelease, probeOwnership, readEndpointMetadata, removeEndpointArtifacts, startSupervisor, waitForProcessExit, waitForVerifiedEndpoint, } from "./bootstrap.js";
9
- import { resolveProductPaths } from "../lifecycle/index.js";
9
+ import { resolveCohortEndpoint, resolveProductPaths } from "../lifecycle/index.js";
10
10
  import { encodeFrame, LineFrameDecoder } from "../protocol/index.js";
11
11
  import { CohortStateStore } from "./cohort-state.js";
12
12
  import { cleanupVerifiedOwner, processIsAlive } from "./process-cleanup.js";
@@ -20,7 +20,7 @@ const UPDATE_DIST_TAGS = { stable: "latest", next: "next" };
20
20
  * a release, and that is the word the repository, its tags, and its GitHub
21
21
  * releases all use.
22
22
  */
23
- const UPDATE_CHANNEL_LABELS = { stable: "release", next: "next" };
23
+ const UPDATE_CHANNEL_LABELS = { stable: "release", next: "develop" };
24
24
  const defaultFileSystem = {
25
25
  async readFile(path) { return await readFile(path, "utf8"); },
26
26
  realpath,
@@ -47,6 +47,33 @@ export function createNpmProcessRunner(platform = process.platform) {
47
47
  } });
48
48
  });
49
49
  }
50
+ /**
51
+ * What an update does about the owner it found. A cohort running from retained immutable
52
+ * content keeps its work: the installation replaces files it does not read, and it listens on
53
+ * its own endpoint. A cohort running from the mutable installation is the one exception,
54
+ * because that installation is exactly what is about to be replaced under it.
55
+ */
56
+ export function planUpdateOwnership(ownership, runsFromRetainedRelease) {
57
+ if (ownership === "dead")
58
+ return "clean-dead-record";
59
+ return runsFromRetainedRelease ? "leave-running" : "end-session";
60
+ }
61
+ /**
62
+ * The endpoint of the active cohort, together with where it is recorded, so a caller that
63
+ * finds it can also clean it up. A release that predates cohort-scoped endpoints published
64
+ * one endpoint for the runtime directory, and that one is recognized too.
65
+ */
66
+ async function readActiveEndpoint(paths, activeReleaseId, environment) {
67
+ if (activeReleaseId !== null) {
68
+ const cohort = resolveCohortEndpoint(paths, activeReleaseId, environment);
69
+ const metadata = await readEndpointMetadata(cohort.endpointMetadataPath);
70
+ if (metadata)
71
+ return { metadata, paths: cohort };
72
+ }
73
+ const legacyPaths = { endpoint: paths.endpoint, endpointMetadataPath: paths.endpointMetadataPath };
74
+ const legacy = await readEndpointMetadata(legacyPaths.endpointMetadataPath);
75
+ return legacy ? { metadata: legacy, paths: legacyPaths } : null;
76
+ }
50
77
  export function createUpdateLifecycleCoordinator(environment = process.env, fileSystem = defaultFileSystem, output = defaultOutput) {
51
78
  const paths = resolveProductPaths(environment);
52
79
  const stateStore = new CohortStateStore(paths.dataDir);
@@ -56,45 +83,54 @@ export function createUpdateLifecycleCoordinator(environment = process.env, file
56
83
  const activeId = state.references.active;
57
84
  if (!activeId || state.releases[activeId]?.packageVersion !== targetVersion)
58
85
  return false;
59
- const endpoint = await readEndpointMetadata(paths.endpointMetadataPath);
60
- return endpoint?.releaseId === activeId && await probeOwnership(endpoint) === "live-verified";
86
+ const endpoint = await readActiveEndpoint(paths, activeId, environment);
87
+ return endpoint?.metadata.releaseId === activeId && await probeOwnership(endpoint.metadata) === "live-verified";
61
88
  },
62
89
  async shutdownVerifiedOwners(targetVersion) {
63
90
  const state = await stateStore.read();
64
- const priorActiveVersion = state.references.active ? state.releases[state.references.active]?.packageVersion ?? null : null;
65
- const endpoint = await readEndpointMetadata(paths.endpointMetadataPath);
66
- if (!endpoint)
91
+ const activeId = state.references.active;
92
+ const priorActiveVersion = activeId ? state.releases[activeId]?.packageVersion ?? null : null;
93
+ const owner = await readActiveEndpoint(paths, activeId, environment);
94
+ if (!owner)
67
95
  return { priorActiveVersion };
96
+ const endpoint = owner.metadata;
68
97
  const ownership = await probeOwnership(endpoint);
69
98
  if (ownership !== "live-verified" && ownership !== "dead") {
70
99
  throw new Error(PRODUCT_TEXT.diagnostic(`refused update shutdown because supervisor ownership is ${ownership}`));
71
100
  }
72
- const immutableRoot = await canonicalImmutableRoot(paths.dataDir, endpoint.releaseRoot);
73
- const legacyMutableInstall = ownership === "live-verified" && !immutableRoot;
74
- const identity = ownership === "dead"
75
- ? { accepted: false, reason: "recorded owner is dead" }
76
- : await requestUpdateShutdown(endpoint, targetVersion, 2_000);
101
+ const plan = planUpdateOwnership(ownership, await canonicalImmutableRoot(paths.dataDir, endpoint.releaseRoot));
102
+ if (plan === "clean-dead-record") {
103
+ await removeEndpointArtifacts(owner.paths.endpointMetadataPath, owner.paths.endpoint);
104
+ return { priorActiveVersion };
105
+ }
106
+ if (plan === "leave-running") {
107
+ const running = endpoint.ownership.liveInstanceIds.length;
108
+ if (running > 0) {
109
+ output.stdout(`${PRODUCT_TEXT.commandName} update: leaving ${running === 1 ? "one session" : `${running} sessions`} running on ${endpoint.releaseId}\n`);
110
+ }
111
+ return { priorActiveVersion };
112
+ }
113
+ // Say whose work is ending before it ends.
114
+ const live = endpoint.ownership.liveInstanceIds.length;
115
+ if (live > 0) {
116
+ output.stderr(`${PRODUCT_TEXT.diagnostic(`ending ${live === 1 ? "one session" : `${live} sessions`} that run from the installation being replaced; a session started by an installed release would have been left alone.`)}\n`);
117
+ }
118
+ const identity = await requestUpdateShutdown(endpoint, targetVersion, 2_000);
77
119
  if (!identity.accepted && processIsAlive(endpoint.pid)) {
78
120
  // Explicit update consent permits bounded cleanup of an authenticated
79
121
  // older owner that predates the update-shutdown message.
80
- const cleanup = await cleanupVerifiedOwner(endpoint, {
81
- allowLiveInstances: true,
82
- reason: legacyMutableInstall ? "legacy-mutable-install" : "explicit-update",
83
- });
122
+ const cleanup = await cleanupVerifiedOwner(endpoint, { allowLiveInstances: true, reason: "legacy-mutable-install" });
84
123
  if (!cleanup.terminated)
85
124
  throw new Error(`verified ${PRODUCT_TEXT.displayName} owner ${endpoint.pid} rejected shutdown and could not be terminated: ${identity.reason}`);
86
125
  }
87
126
  else if (identity.accepted) {
88
127
  await waitForProcessExit(endpoint.pid, 3_000).catch(async () => {
89
- const cleanup = await cleanupVerifiedOwner(endpoint, {
90
- allowLiveInstances: true,
91
- reason: legacyMutableInstall ? "legacy-mutable-install" : "explicit-update",
92
- });
128
+ const cleanup = await cleanupVerifiedOwner(endpoint, { allowLiveInstances: true, reason: "legacy-mutable-install" });
93
129
  if (!cleanup.terminated)
94
130
  throw new Error(`verified ${PRODUCT_TEXT.displayName} owner ${endpoint.pid} did not terminate`);
95
131
  });
96
132
  }
97
- await removeEndpointArtifacts(paths.endpointMetadataPath, paths.endpoint);
133
+ await removeEndpointArtifacts(owner.paths.endpointMetadataPath, owner.paths.endpoint);
98
134
  return { priorActiveVersion };
99
135
  },
100
136
  async verifyPackageUnlocked(packageRoot) {
@@ -137,7 +173,7 @@ export function createUpdateLifecycleCoordinator(environment = process.env, file
137
173
  await stateStore.activate(candidate.releaseId);
138
174
  await phase("active-reference-committed");
139
175
  await startSupervisor(candidate, environment);
140
- await waitForVerifiedEndpoint(paths.endpointMetadataPath, candidate, 8_000);
176
+ await waitForVerifiedEndpoint(resolveCohortEndpoint(paths, candidate.releaseId, environment).endpointMetadataPath, candidate, 8_000);
141
177
  },
142
178
  };
143
179
  }
@@ -223,12 +259,13 @@ function createUpdateProgress(output, enabled) {
223
259
  }
224
260
  /** The newest version the channel points at, which is what an unqualified update takes. */
225
261
  async function resolveChannelHead(runner, distTag, output) {
226
- const lookup = await runNpm(runner, ["view", `${PRODUCT_PACKAGE}@${distTag}`, "version"], true, output, `query the npm ${distTag} channel`);
262
+ const publicChannel = distTag === "next" ? "development" : "release";
263
+ const lookup = await runNpm(runner, ["view", `${PRODUCT_PACKAGE}@${distTag}`, "version"], true, output, `query the npm ${publicChannel} channel`);
227
264
  if (lookup.result === null)
228
265
  return { version: null, exitCode: lookup.exitCode };
229
266
  const version = validSemver(lookup.result.stdout.trim());
230
267
  if (version === null) {
231
- output.stderr(`${PRODUCT_TEXT.diagnostic(`received a malformed ${distTag} version from npm: ${JSON.stringify(lookup.result.stdout.trim())}.`)}\n`);
268
+ output.stderr(`${PRODUCT_TEXT.diagnostic(`received a malformed ${publicChannel} channel version from npm: ${JSON.stringify(lookup.result.stdout.trim())}.`)}\n`);
232
269
  return { version: null, exitCode: 1 };
233
270
  }
234
271
  return { version, exitCode: 0 };
@@ -236,14 +273,10 @@ async function resolveChannelHead(runner, distTag, output) {
236
273
  /**
237
274
  * Resolve a preview the caller named.
238
275
  *
239
- * A preview is published as `<version>-dev.<commit>`, so its commit is enough to
240
- * say which one is wanted the version in front of it is not something anyone
241
- * should have to remember. A full version is accepted too, for anyone reading one
242
- * back from `a1 version` or a changelog.
243
- *
244
- * The published list is the authority: naming a commit that was never published,
245
- * or one published more than once under different versions, is an error rather
246
- * than a guess.
276
+ * A preview is published as `<version>-dev.<pull-request-number>`, so its decimal
277
+ * development number is enough to identify it. A full version is accepted too.
278
+ * The published list remains authoritative: nothing is constructed from the
279
+ * installed package's base version.
247
280
  */
248
281
  async function resolveRequestedPreview(runner, requested, output) {
249
282
  const lookup = await runNpm(runner, ["view", PRODUCT_PACKAGE, "versions", "--json"], true, output, "list the published versions");
@@ -261,8 +294,7 @@ async function resolveRequestedPreview(runner, requested, output) {
261
294
  const exact = versions.find(version => version === requested);
262
295
  if (exact !== undefined) {
263
296
  // Naming a release here would install it through the preview path, which is a
264
- // different command with a different meaning. The commit form cannot express
265
- // one, so only the fuller spelling of a preview reaches this.
297
+ // different command with a different meaning.
266
298
  if (!exact.includes("-dev.")) {
267
299
  output.stderr(`${PRODUCT_TEXT.diagnostic(`${exact} is a release, not a preview; run ${PRODUCT_TEXT.commandName} update to move to the current release.`)}\n`);
268
300
  return { version: null, exitCode: 1 };
@@ -495,8 +527,10 @@ async function rollbackPriorCohort(dataDir, environment, priorReleaseId) {
495
527
  }
496
528
  const release = await readMaterializedRelease(prior.releaseRoot);
497
529
  const paths = resolveProductPaths(environment);
530
+ // Rollback re-points the active reference and starts the prior cohort on its own endpoint;
531
+ // a cohort that survived the update keeps serving the work it already had.
498
532
  await startSupervisor(release, environment);
499
- await waitForVerifiedEndpoint(paths.endpointMetadataPath, release, 8_000);
533
+ await waitForVerifiedEndpoint(resolveCohortEndpoint(paths, release.releaseId, environment).endpointMetadataPath, release, 8_000);
500
534
  return "rolled back";
501
535
  }
502
536
  function phaseBefore(current, target) {
@@ -1,5 +1,5 @@
1
1
  import { DatabaseSync } from "node:sqlite";
2
- import type { ManagedAgentDescriptor, PaneId, AgentRecoveryAuthority, RecoveryReferenceId, TerminalSessionLaunch, TerminalTopologySnapshot } from "../workspace-contracts/index.js";
2
+ import type { ManagedAgentDescriptor, PaneId, AgentRecoveryAuthority, RecoveryReferenceId, TerminalSessionLaunch, TerminalTopologySnapshot } from "../../contracts/workspace/index.js";
3
3
  import type { LaunchInstance, LaunchInstanceId, LaunchInstanceOutcome, NativeProcessIdentity, ProcessContainmentIdentity } from "../lifecycle/index.js";
4
4
  export declare const DEFAULT_WORKSPACE_ID = "workspace-default";
5
5
  export interface WorkspaceAgentPresentation {
@@ -2,7 +2,7 @@ import { DatabaseSync } from "node:sqlite";
2
2
  import { mkdirSync } from "node:fs";
3
3
  import { dirname } from "node:path";
4
4
  import { PRODUCT_IDENTITY } from "../../product-identity.js";
5
- import { assertManagedAgentDescriptor, assertRecoveryAuthority, assertTerminalSessionLaunch, assertTerminalTopologySnapshot, } from "../workspace-contracts/index.js";
5
+ import { assertManagedAgentDescriptor, assertRecoveryAuthority, assertTerminalSessionLaunch, assertTerminalTopologySnapshot, } from "../../contracts/workspace/index.js";
6
6
  import { assertLaunchInstance, assertLaunchInstanceOutcome, assertNativeProcessIdentity, assertProcessContainmentIdentity, } from "../lifecycle/index.js";
7
7
  export const DEFAULT_WORKSPACE_ID = "workspace-default";
8
8
  const INITIAL_WORKSPACE_ID = DEFAULT_WORKSPACE_ID;
@@ -1,4 +1,4 @@
1
- import { type StructuredCapabilityContract } from "../workspace-contracts/index.js";
1
+ import { type StructuredCapabilityContract } from "../../contracts/workspace/index.js";
2
2
  export type StructuredBackpressureResource = "events" | "commands" | "snapshots" | "attachments" | "reconnect-replay";
3
3
  export type StructuredBackpressureAction = "none" | "reject-payload" | "pause-adapter" | "reject-request" | "disconnect-adapter";
4
4
  export interface StructuredResourceLease {
@@ -1,4 +1,4 @@
1
- import { assertStructuredCapability, } from "../workspace-contracts/index.js";
1
+ import { assertStructuredCapability, } from "../../contracts/workspace/index.js";
2
2
  export class StructuredBackpressureController {
3
3
  adapterId;
4
4
  #budgets;
@@ -1,4 +1,4 @@
1
- import { type StructuredCapabilityContract, type WorkspaceCommand } from "../workspace-contracts/index.js";
1
+ import { type StructuredCapabilityContract, type WorkspaceCommand } from "../../contracts/workspace/index.js";
2
2
  export type StructuredCommandRequest = Extract<WorkspaceCommand, {
3
3
  readonly type: "structured-command";
4
4
  }>;
@@ -1,4 +1,4 @@
1
- import { assertStructuredCapability, assertWorkspaceCommand, } from "../workspace-contracts/index.js";
1
+ import { assertStructuredCapability, assertWorkspaceCommand, } from "../../contracts/workspace/index.js";
2
2
  export class StructuredCommandTracker {
3
3
  agentId;
4
4
  #capability;
@@ -1,4 +1,4 @@
1
- import { type AdapterId, type StructuredCapabilityContract, type StructuredFlowLimits } from "../workspace-contracts/index.js";
1
+ import { type AdapterId, type StructuredCapabilityContract, type StructuredFlowLimits } from "../../contracts/workspace/index.js";
2
2
  export declare const STRUCTURED_ADAPTER_ENVELOPE: string;
3
3
  export declare const STRUCTURED_ADAPTER_ENVELOPE_REVISION: 1;
4
4
  export declare const REQUIRED_STRUCTURED_FEATURES: readonly ["identity.adapter.v1", "commands.correlated.v1", "events.typed.v1", "flow-control.limits.v1"];
@@ -1,4 +1,4 @@
1
- import { WORKSPACE_CONTRACT_VERSION, assertStructuredCapability, } from "../workspace-contracts/index.js";
1
+ import { WORKSPACE_CONTRACT_VERSION, assertStructuredCapability, } from "../../contracts/workspace/index.js";
2
2
  import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
3
3
  export const STRUCTURED_ADAPTER_ENVELOPE = PRODUCT_IDENTITY.protocol.structuredAgentSchema;
4
4
  export const STRUCTURED_ADAPTER_ENVELOPE_REVISION = 1;
@@ -1,4 +1,4 @@
1
- import { type AgentRecoveryAuthority, type StructuredAgentSnapshot, type StructuredCapabilityContract, type StructuredRecoveryAuthority } from "../workspace-contracts/index.js";
1
+ import { type AgentRecoveryAuthority, type StructuredAgentSnapshot, type StructuredCapabilityContract, type StructuredRecoveryAuthority } from "../../contracts/workspace/index.js";
2
2
  import { StructuredEventReducer, type StructuredRuntimeView } from "./state.js";
3
3
  export interface StructuredResumeProof {
4
4
  readonly protocolVersion: number;
@@ -1,4 +1,4 @@
1
- import { WORKSPACE_CONTRACT_VERSION, assertRecoveryAuthority, assertStructuredAgentSnapshot, assertStructuredCapability, } from "../workspace-contracts/index.js";
1
+ import { WORKSPACE_CONTRACT_VERSION, assertRecoveryAuthority, assertStructuredAgentSnapshot, assertStructuredCapability, } from "../../contracts/workspace/index.js";
2
2
  import { StructuredEventReducer } from "./state.js";
3
3
  export class StructuredReconnectionManager {
4
4
  #capability;
@@ -1,4 +1,4 @@
1
- import { type StructuredAgentSnapshot, type StructuredCapabilityContract, type WorkspaceEvent } from "../workspace-contracts/index.js";
1
+ import { type StructuredAgentSnapshot, type StructuredCapabilityContract, type WorkspaceEvent } from "../../contracts/workspace/index.js";
2
2
  export type StructuredAgentEvent = Extract<WorkspaceEvent, {
3
3
  readonly type: "structured-event";
4
4
  }>;
@@ -1,4 +1,4 @@
1
- import { assertStructuredAgentSnapshot, assertStructuredCapability, assertWorkspaceEvent, } from "../workspace-contracts/index.js";
1
+ import { assertStructuredAgentSnapshot, assertStructuredCapability, assertWorkspaceEvent, } from "../../contracts/workspace/index.js";
2
2
  export class StructuredEventReducer {
3
3
  agentId;
4
4
  #capability;
@@ -0,0 +1,3 @@
1
+ export * from "./main.js";
2
+ export * from "./server.js";
3
+ export { resolveCohortEndpoint, resolveProductPaths, type CohortEndpointPaths, type ProductPaths } from "../lifecycle/index.js";
@@ -0,0 +1,3 @@
1
+ export * from "./main.js";
2
+ export * from "./server.js";
3
+ export { resolveCohortEndpoint, resolveProductPaths } from "../lifecycle/index.js";
@@ -1,14 +1,16 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import { appendFileSync, mkdirSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
- import { assertImmutableExecutionRoot, readCertifiedReleaseManifest } from "../release/index.js";
4
+ import { assertImmutableExecutionRoot, CohortStateStore, readCertifiedReleaseManifest } from "../release/index.js";
5
5
  import { ControlStore } from "../storage/index.js";
6
- import { resolveProductPaths } from "./paths.js";
6
+ import { resolveCohortEndpoint, resolveProductPaths } from "./paths.js";
7
7
  import { SupervisorServer } from "./server.js";
8
8
  import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../../product-identity.js";
9
9
  export async function runSupervisor() {
10
- const paths = resolveProductPaths();
11
- mkdirSync(paths.runtimeDir, { recursive: true, mode: 0o700 });
10
+ const productPaths = resolveProductPaths();
11
+ mkdirSync(productPaths.runtimeDir, { recursive: true, mode: 0o700 });
12
+ mkdirSync(productPaths.endpointsDir, { recursive: true, mode: 0o700 });
13
+ let paths = productPaths;
12
14
  const log = (message) => appendFileSync(paths.supervisorLogPath, `${new Date().toISOString()} ${message}\n`);
13
15
  const releaseRoot = process.env[PRODUCT_IDENTITY.environment.releaseRoot];
14
16
  const releaseId = process.env[PRODUCT_IDENTITY.environment.releaseId];
@@ -17,9 +19,13 @@ export async function runSupervisor() {
17
19
  throw new Error(PRODUCT_TEXT.diagnostic("supervisor must be launched from a verified immutable release"));
18
20
  const release = await readCertifiedReleaseManifest({ releaseRoot, releaseId, contentDigest }, resolve(paths.dataDir, "releases"));
19
21
  await assertImmutableExecutionRoot(release, paths.dataDir);
22
+ // One endpoint per cohort: a superseded cohort keeps serving what it already has while the
23
+ // installed release listens on its own address.
24
+ paths = { ...productPaths, ...resolveCohortEndpoint(productPaths, release.releaseId) };
20
25
  const bootNonce = randomUUID();
21
26
  const store = new ControlStore(paths.databasePath, bootNonce);
22
- const server = new SupervisorServer(store, paths, release, bootNonce);
27
+ const cohortState = new CohortStateStore(paths.dataDir);
28
+ const server = new SupervisorServer(store, paths, release, bootNonce, undefined, undefined, undefined, async () => (await cohortState.read()).references.active);
23
29
  await server.listen();
24
30
  log(`supervisor ${server.id} listening at ${paths.endpoint} (pid ${process.pid})`);
25
31
  let closing = false;
@@ -0,0 +1 @@
1
+ export { resolveCohortEndpoint, resolveProductPaths, type CohortEndpointPaths, type ProductPaths, } from "../lifecycle/index.js";
@@ -0,0 +1 @@
1
+ export { resolveCohortEndpoint, resolveProductPaths, } from "../lifecycle/index.js";
@@ -9,14 +9,31 @@ export declare class SupervisorServer {
9
9
  readonly terminateProcess: (code: number) => void;
10
10
  readonly reconciliationDeadlineMs: number;
11
11
  readonly shutdownDeadlineMs: number;
12
+ /**
13
+ * Which release new sessions start on. A cohort that is no longer that release keeps
14
+ * serving the instances it already has, takes no new ones, and exits when its last one
15
+ * leaves. Absent, this supervisor never considers itself superseded.
16
+ */
17
+ readonly readActiveReleaseId: (() => Promise<string | null>) | null;
18
+ readonly supersededPollMs: number;
12
19
  readonly id: `${string}-${string}-${string}-${string}-${string}`;
13
20
  readonly bootNonce: string;
14
21
  readonly pidStartIdentity: string;
15
22
  readonly startedAt: string;
16
23
  readonly paths: ProductPaths;
17
- constructor(store: ControlStore, paths: ProductPaths | undefined, release: MaterializedRelease, bootNonce?: string, terminateProcess?: (code: number) => void, reconciliationDeadlineMs?: number, shutdownDeadlineMs?: number);
24
+ constructor(store: ControlStore, paths: ProductPaths | undefined, release: MaterializedRelease, bootNonce?: string, terminateProcess?: (code: number) => void, reconciliationDeadlineMs?: number, shutdownDeadlineMs?: number,
25
+ /**
26
+ * Which release new sessions start on. A cohort that is no longer that release keeps
27
+ * serving the instances it already has, takes no new ones, and exits when its last one
28
+ * leaves. Absent, this supervisor never considers itself superseded.
29
+ */
30
+ readActiveReleaseId?: (() => Promise<string | null>) | null, supersededPollMs?: number);
18
31
  snapshot(): SupervisorSnapshot;
19
32
  listen(): Promise<void>;
33
+ /** Whether new sessions start on some other release. */
34
+ get superseded(): boolean;
35
+ /** Leaves, taking this cohort's own endpoint artifacts with it. */
36
+ retire(): Promise<void>;
20
37
  close(stopAgents?: boolean): Promise<void>;
21
38
  closeForReleaseReplacement(stopAgents: boolean): Promise<void>;
22
39
  }
@@ -14,6 +14,8 @@ export class SupervisorServer {
14
14
  terminateProcess;
15
15
  reconciliationDeadlineMs;
16
16
  shutdownDeadlineMs;
17
+ readActiveReleaseId;
18
+ supersededPollMs;
17
19
  id = randomUUID();
18
20
  bootNonce;
19
21
  pidStartIdentity = `${process.pid}:${Math.floor(Date.now() - process.uptime() * 1_000)}`;
@@ -31,12 +33,22 @@ export class SupervisorServer {
31
33
  #results = new Map();
32
34
  #metadataWrites = Promise.resolve();
33
35
  #closing = false;
34
- constructor(store, paths = resolveProductPaths(), release, bootNonce = randomUUID(), terminateProcess = code => process.exit(code), reconciliationDeadlineMs = 3_000, shutdownDeadlineMs = 1_500) {
36
+ #superseded = false;
37
+ #supersededPoll = null;
38
+ constructor(store, paths = resolveProductPaths(), release, bootNonce = randomUUID(), terminateProcess = code => process.exit(code), reconciliationDeadlineMs = 3_000, shutdownDeadlineMs = 1_500,
39
+ /**
40
+ * Which release new sessions start on. A cohort that is no longer that release keeps
41
+ * serving the instances it already has, takes no new ones, and exits when its last one
42
+ * leaves. Absent, this supervisor never considers itself superseded.
43
+ */
44
+ readActiveReleaseId = null, supersededPollMs = 1_000) {
35
45
  this.store = store;
36
46
  this.release = release;
37
47
  this.terminateProcess = terminateProcess;
38
48
  this.reconciliationDeadlineMs = reconciliationDeadlineMs;
39
49
  this.shutdownDeadlineMs = shutdownDeadlineMs;
50
+ this.readActiveReleaseId = readActiveReleaseId;
51
+ this.supersededPollMs = supersededPollMs;
40
52
  this.bootNonce = bootNonce;
41
53
  this.paths = paths;
42
54
  for (const instance of store.loadActiveLaunchInstances())
@@ -56,6 +68,7 @@ export class SupervisorServer {
56
68
  if (this.#server)
57
69
  throw new Error("supervisor is already listening");
58
70
  await mkdir(this.paths.runtimeDir, { recursive: true, mode: 0o700 });
71
+ await mkdir(this.paths.endpointsDir, { recursive: true, mode: 0o700 });
59
72
  if (platform() !== "win32") {
60
73
  if (await endpointIsLive(this.paths.endpoint))
61
74
  throw new Error(PRODUCT_TEXT.diagnostic(`supervisor already owns ${this.paths.endpoint}`));
@@ -71,12 +84,44 @@ export class SupervisorServer {
71
84
  });
72
85
  });
73
86
  await this.#writeEndpointMetadata();
87
+ if (this.readActiveReleaseId) {
88
+ const poll = setInterval(() => void this.#refreshCohortRole(), this.supersededPollMs);
89
+ poll.unref();
90
+ this.#supersededPoll = poll;
91
+ }
92
+ }
93
+ /**
94
+ * Notices that another release has become the one new sessions start on. Nothing is
95
+ * interrupted by that: this cohort finishes what it is holding and then leaves.
96
+ */
97
+ async #refreshCohortRole() {
98
+ if (this.#closing || !this.readActiveReleaseId)
99
+ return;
100
+ const active = await this.readActiveReleaseId().catch(() => null);
101
+ if (active === null)
102
+ return;
103
+ this.#superseded = active !== this.release.releaseId;
104
+ if (this.#superseded && this.#instances.size === 0)
105
+ await this.retire();
106
+ }
107
+ /** Whether new sessions start on some other release. */
108
+ get superseded() {
109
+ return this.#superseded;
110
+ }
111
+ /** Leaves, taking this cohort's own endpoint artifacts with it. */
112
+ async retire() {
113
+ if (this.#closing)
114
+ return;
115
+ await this.close(false);
74
116
  }
75
117
  async close(stopAgents = false) {
76
118
  if (stopAgents && !await this.#drainInstances("update", this.shutdownDeadlineMs)) {
77
119
  throw new Error("active launch instances did not release ownership within the shutdown deadline");
78
120
  }
79
121
  this.#closing = true;
122
+ if (this.#supersededPoll)
123
+ clearInterval(this.#supersededPoll);
124
+ this.#supersededPoll = null;
80
125
  for (const client of this.#clients)
81
126
  client.destroy();
82
127
  if (this.#server)
@@ -197,6 +242,9 @@ export class SupervisorServer {
197
242
  #createLaunchInstance(command, socket, clientId) {
198
243
  assertNativeProcessIdentity(command.guardianIdentity);
199
244
  const existing = this.store.loadLaunchInstance(command.instanceId);
245
+ if (this.#superseded && !existing) {
246
+ throw new Error(PRODUCT_TEXT.diagnostic(`release ${this.release.releaseId} is no longer the release new sessions start on`));
247
+ }
200
248
  if (existing) {
201
249
  if (existing.ownerClientId !== clientId
202
250
  || existing.profileId !== command.profileId
@@ -279,6 +327,9 @@ export class SupervisorServer {
279
327
  this.#uncertainInstances.delete(stored.id);
280
328
  this.#unbindOwner(stored.id, socket);
281
329
  this.#mutated();
330
+ // The last session on a superseded cohort has left; there is nothing here to keep.
331
+ if (this.#superseded && this.#instances.size === 0)
332
+ void this.retire();
282
333
  }
283
334
  #ownedInstance(instanceId, socket, clientId) {
284
335
  const instance = this.#instances.get(instanceId) ?? this.store.loadLaunchInstance(instanceId);
@@ -1,4 +1,4 @@
1
- import type { OwnedUiTranscriptBlock } from "../owned-ui-contracts/index.js";
1
+ import type { OwnedUiTranscriptBlock } from "../../../contracts/owned-ui/index.js";
2
2
  export declare function adaptPiUserMessage(block: OwnedUiTranscriptBlock, width: number): readonly string[];
3
3
  export declare function adaptPiAssistantMessage(block: OwnedUiTranscriptBlock, width: number): readonly string[];
4
4
  export declare function adaptPiToolExecution(block: OwnedUiTranscriptBlock, width: number, cwd: string): readonly string[];
@@ -2,9 +2,9 @@ import { mkdtemp, rm } from "node:fs/promises";
2
2
  import { tmpdir } from "node:os";
3
3
  import { join } from "node:path";
4
4
  import { AssistantMessageComponent, ExtensionSelectorComponent, initTheme, LoginDialogComponent, ModelSelectorComponent, SettingsSelectorComponent, ThemeSelectorComponent, ThinkingSelectorComponent, ToolExecutionComponent, UserMessageComponent, UserMessageSelectorComponent, VERSION, } from "@earendil-works/pi-coding-agent";
5
- import { OWNED_UI_CONTRACT_VERSION } from "../owned-ui-contracts/index.js";
5
+ import { OWNED_UI_CONTRACT_VERSION } from "../../../contracts/owned-ui/index.js";
6
6
  import { createTuiFacade, validatedAssistantMessage } from "./shell-components.js";
7
- import { PRODUCT_IDENTITY } from "../../product-identity.js";
7
+ import { PRODUCT_IDENTITY } from "../../../product-identity.js";
8
8
  export class PiComponentConformanceError extends Error {
9
9
  stage;
10
10
  constructor(stage, cause) {
@@ -1,5 +1,5 @@
1
1
  import { type ExtensionUIContext } from "@earendil-works/pi-coding-agent";
2
- import type { OwnedUiExtensionOverlayHandle, OwnedUiExtensionOverlayOptions } from "../owned-ui-contracts/index.js";
2
+ import type { OwnedUiExtensionOverlayHandle, OwnedUiExtensionOverlayOptions } from "../../../contracts/owned-ui/index.js";
3
3
  import { type PiShellComponentPort, type PiShellEditorOptions } from "./shell-shared-facade.js";
4
4
  export interface PiExtensionUiBridgeHost {
5
5
  readonly runtime: Pick<PiShellEditorOptions, "getColumns" | "getRows" | "requestRender">;
@@ -1,4 +1,4 @@
1
- import type { OwnedUiSessionViewModel } from "../owned-ui-contracts/index.js";
1
+ import type { OwnedUiSessionViewModel } from "../../../contracts/owned-ui/index.js";
2
2
  import { type PiShellViewComponentPort, type PiShellStatusPort, type PiShellQueuedInputPort, type PiShellHeaderPort, type PiShellResourceEntry, type PiShellLoadedResourcesPort, type PiShellHeaderOptions, type PiShellEditorOptions } from "./shell-shared-facade.js";
3
3
  export declare function createPiShellHeader(options?: PiShellHeaderOptions): PiShellHeaderPort;
4
4
  export declare function createPiShellLoadedResources(resources: readonly PiShellResourceEntry[], initialExpanded?: boolean): PiShellLoadedResourcesPort;
@@ -1,5 +1,5 @@
1
1
  import { AssistantMessageComponent } from "@earendil-works/pi-coding-agent";
2
- import type { OwnedUiTranscriptBlock } from "../owned-ui-contracts/index.js";
2
+ import type { OwnedUiTranscriptBlock } from "../../../contracts/owned-ui/index.js";
3
3
  import { type PiShellComponentPort, type PiShellExtensionRendererResolver, type PiShellTranscriptComponentPort } from "./shell-shared-facade.js";
4
4
  export interface PiShellSessionInfoPresentation {
5
5
  readonly sessionName?: string;
@@ -1,7 +1,7 @@
1
1
  import { AssistantMessageComponent, BashExecutionComponent, CompactionSummaryMessageComponent, CustomMessageComponent, DynamicBorder, getMarkdownTheme, parseSkillBlock, ToolExecutionComponent, UserMessageComponent, } from "@earendil-works/pi-coding-agent";
2
2
  import { SkillInvocationMessageComponent, } from "./upstream/components/skill-invocation-message.js";
3
3
  import { Container, Markdown, Spacer, Text, } from "#pi-tui";
4
- import { PRODUCT_TEXT } from "../../product-identity.js";
4
+ import { PRODUCT_TEXT } from "../../../product-identity.js";
5
5
  import { KeybindingsManager, } from "./upstream/adjacent/core/keybindings.js";
6
6
  import { PINNED_PI_LAYOUT, piTheme, } from "./theme.js";
7
7
  import { componentPort, createTuiFacade, ensureTheme, formatSessionTokens, isRecord, } from "./shell-shared-facade.js";
@@ -1,5 +1,5 @@
1
1
  import { ModelSelectorComponent, type SessionInfo, type SettingsCallbacks, type SettingsConfig } from "@earendil-works/pi-coding-agent";
2
- import type { OwnedUiDialog } from "../owned-ui-contracts/index.js";
2
+ import type { OwnedUiDialog } from "../../../contracts/owned-ui/index.js";
3
3
  import { type TrustDecision, type TrustOption, type TrustUpdate } from "./upstream/components/trust-selector.js";
4
4
  import { type PiShellComponentPort, type PiShellEditorOptions, type PiShellSelectorOption, type PiShellSelectorOptions } from "./shell-shared-facade.js";
5
5
  export declare function createPiShellSelector(options: PiShellSelectorOptions): PiShellComponentPort;
@@ -1,5 +1,5 @@
1
1
  import { type AutocompleteProvider, type Component, type TUI } from "#pi-tui";
2
- import type { OwnedUiSessionViewModel, OwnedUiThinkingLevel, OwnedUiTranscriptBlock } from "../owned-ui-contracts/index.js";
2
+ import type { OwnedUiSessionViewModel, OwnedUiThinkingLevel, OwnedUiTranscriptBlock } from "../../../contracts/owned-ui/index.js";
3
3
  export interface PiShellComponentPort {
4
4
  render(width: number): readonly string[];
5
5
  handleInput?(data: string): void;
@@ -1,5 +1,5 @@
1
1
  import { type Component } from "#pi-tui";
2
- import type { OwnedUiSessionViewModel } from "../../../owned-ui-contracts/index.js";
2
+ import type { OwnedUiSessionViewModel } from "../../../../../contracts/owned-ui/index.js";
3
3
  export declare class SessionFooter implements Component {
4
4
  private readonly getView;
5
5
  private readonly cwd;
@@ -1,7 +1,7 @@
1
1
  import { type AgentSessionRuntime, type AgentSessionServices, type SessionInfo } from "@earendil-works/pi-coding-agent";
2
- import { OWNED_UI_EXTENSION_CONTRACT_VERSION, OWNED_UI_EXTENSION_RENDER_CALLBACKS, OWNED_UI_EXTENSION_UI_CALLBACKS, OWNED_UI_EXTENSION_UI_PROPERTIES, type OwnedUiCommand, type OwnedUiCommandOutcome, type OwnedUiEvent, type OwnedUiSessionViewModel, type OwnedUiSnapshot } from "../owned-ui-contracts/index.js";
2
+ import { OWNED_UI_EXTENSION_CONTRACT_VERSION, OWNED_UI_EXTENSION_RENDER_CALLBACKS, OWNED_UI_EXTENSION_UI_CALLBACKS, OWNED_UI_EXTENSION_UI_PROPERTIES, type OwnedUiCommand, type OwnedUiCommandOutcome, type OwnedUiEvent, type OwnedUiSessionViewModel, type OwnedUiSnapshot } from "../../../contracts/owned-ui/index.js";
3
3
  import { type PiAuthenticationProviderOption, type PiBashWorkflowResult, type PiPinnedSettingsCallback, type PiPinnedSettingsSnapshot, type PiWorkflowAutocompleteCommand, type PiWorkflowHost, type PiWorkflowInteractionHost, type PiWorkflowOption, type PiWorkflowRequest, type PiWorkflowResult } from "./workflows.js";
4
- import type { AgentSettingsPort } from "../agent-engine-contracts/index.js";
4
+ import type { AgentSettingsPort } from "../../../contracts/agent-engine/index.js";
5
5
  export interface PiEngineRuntimeFactoryInput {
6
6
  readonly cwd: string;
7
7
  readonly agentDir: string;