@timurproko/a1 0.2.7-dev.1245 → 0.2.7-dev.1252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +11 -36
  2. package/bin/cli.js +2 -17
  3. package/bin/ui.js +7 -48
  4. package/dist/app/session-shell/exit-notice.d.ts +2 -2
  5. package/dist/app/session-shell/exit-notice.js +10 -10
  6. package/dist/app/session-shell/prompt-submission.d.ts +2 -4
  7. package/dist/app/session-shell/prompt-submission.js +3 -23
  8. package/dist/app/session-shell/response-copy-transport.js +1 -2
  9. package/dist/app/session-shell/session-lifecycle.d.ts +1 -2
  10. package/dist/app/session-shell/session-lifecycle.js +2 -4
  11. package/dist/app/session-shell/session-shell-root.d.ts +0 -31
  12. package/dist/app/session-shell/session-shell-root.js +3 -4
  13. package/dist/app/session-shell/session-shell.js +6 -47
  14. package/dist/app/session-shell/session-viewport-controller.js +3 -6
  15. package/dist/app/session-shell/shell-host.js +2 -18
  16. package/dist/app/session-shell/transcript-document.d.ts +1 -2
  17. package/dist/app/session-shell/transcript-document.js +3 -28
  18. package/dist/app/session-shell/workflow-output.js +1 -1
  19. package/dist/app/session-shell/workflow-router.d.ts +1 -3
  20. package/dist/app/session-shell/workflow-router.js +1 -4
  21. package/dist/cli/dispatch.d.ts +1 -11
  22. package/dist/cli/dispatch.js +5 -92
  23. package/dist/cli/session-context.js +5 -7
  24. package/dist/cli/uninstall.d.ts +1 -5
  25. package/dist/cli/uninstall.js +6 -35
  26. package/dist/cli/version-stats.js +4 -7
  27. package/dist/composition/owned-settings.d.ts +0 -1
  28. package/dist/composition/owned-settings.js +0 -1
  29. package/dist/composition/owned-ui.d.ts +2 -24
  30. package/dist/composition/owned-ui.js +11 -87
  31. package/dist/composition/release-update-observation.d.ts +4 -4
  32. package/dist/composition/release-update-observation.js +17 -47
  33. package/dist/composition/session-backend.d.ts +0 -1
  34. package/dist/composition/session-runtime-registry.d.ts +3 -3
  35. package/dist/composition/settings-route-host.d.ts +0 -7
  36. package/dist/composition/settings-route-host.js +4 -10
  37. package/dist/composition/startup-route.d.ts +0 -1
  38. package/dist/composition/startup-route.js +0 -1
  39. package/dist/contracts/owned-ui/index.d.ts +1 -1
  40. package/dist/contracts/owned-ui/model.d.ts +0 -3
  41. package/dist/contracts/owned-ui/session-workflows.d.ts +1 -4
  42. package/dist/features/launch/development-launch.js +0 -1
  43. package/dist/features/launch/index.d.ts +1 -1
  44. package/dist/features/launch/intent.d.ts +1 -3
  45. package/dist/features/launch/intent.js +2 -4
  46. package/dist/features/launch/session-context.d.ts +2 -2
  47. package/dist/features/owned-ui/reference-screen-app.d.ts +0 -2
  48. package/dist/features/owned-ui/reference-screen-app.js +2 -9
  49. package/dist/features/owned-ui/settings-app.d.ts +0 -6
  50. package/dist/features/owned-ui/settings-app.js +5 -36
  51. package/dist/foundation/launch-context/index.d.ts +0 -12
  52. package/dist/foundation/launch-context/index.js +0 -26
  53. package/dist/foundation/lifecycle/claim-gate.d.ts +8 -0
  54. package/dist/foundation/lifecycle/claim-gate.js +37 -0
  55. package/dist/foundation/lifecycle/index.d.ts +5 -9
  56. package/dist/foundation/lifecycle/index.js +3 -4
  57. package/dist/foundation/lifecycle/model.d.ts +2 -59
  58. package/dist/foundation/lifecycle/model.js +0 -35
  59. package/dist/foundation/lifecycle/paths.d.ts +0 -24
  60. package/dist/foundation/lifecycle/paths.js +0 -40
  61. package/dist/foundation/lifecycle/process-liveness.d.ts +8 -0
  62. package/dist/foundation/lifecycle/process-liveness.js +18 -0
  63. package/dist/foundation/lifecycle/session-claim-lock.d.ts +1 -1
  64. package/dist/foundation/lifecycle/session-claim-lock.js +2 -2
  65. package/dist/foundation/lifecycle/session-repository-context.d.ts +6 -6
  66. package/dist/foundation/lifecycle/session-repository-context.js +2 -3
  67. package/dist/foundation/release/automatic-update.d.ts +1 -3
  68. package/dist/foundation/release/automatic-update.js +9 -30
  69. package/dist/foundation/release/bootstrap.d.ts +2 -25
  70. package/dist/foundation/release/bootstrap.js +33 -344
  71. package/dist/foundation/release/cohort-state.d.ts +21 -46
  72. package/dist/foundation/release/cohort-state.js +30 -62
  73. package/dist/foundation/release/dependency-certification.d.ts +1 -1
  74. package/dist/foundation/release/index.d.ts +10 -17
  75. package/dist/foundation/release/index.js +7 -11
  76. package/dist/foundation/release/latest-release.d.ts +1 -2
  77. package/dist/foundation/release/latest-release.js +1 -2
  78. package/dist/foundation/release/process-liveness.d.ts +2 -0
  79. package/dist/foundation/release/process-liveness.js +12 -0
  80. package/dist/foundation/release/release-gc.d.ts +12 -9
  81. package/dist/foundation/release/release-gc.js +34 -98
  82. package/dist/foundation/release/release-store.d.ts +2 -2
  83. package/dist/foundation/release/release-store.js +2 -2
  84. package/dist/foundation/release/restart-certification.js +1 -1
  85. package/dist/foundation/release/update-activation.d.ts +2 -9
  86. package/dist/foundation/release/update-activation.js +28 -43
  87. package/dist/foundation/release/update-execution-lease.js +1 -1
  88. package/dist/foundation/release/update-launch.d.ts +0 -2
  89. package/dist/foundation/release/update-launch.js +0 -7
  90. package/dist/foundation/release/update-recovery.js +1 -1
  91. package/dist/foundation/release/update-transaction.d.ts +1 -1
  92. package/dist/foundation/release/update-transaction.js +5 -2
  93. package/dist/foundation/release/update.d.ts +2 -10
  94. package/dist/foundation/release/update.js +23 -200
  95. package/dist/foundation/session-writer-lock/index.d.ts +14 -6
  96. package/dist/foundation/session-writer-lock/index.js +48 -103
  97. package/dist/foundation/startup/startup-runtime.d.ts +1 -1
  98. package/dist/foundation/terminal-cleanup/exit-notice.d.ts +6 -0
  99. package/dist/foundation/terminal-cleanup/exit-notice.js +36 -0
  100. package/dist/foundation/terminal-cleanup/index.d.ts +2 -1
  101. package/dist/foundation/terminal-cleanup/index.js +2 -1
  102. package/dist/foundation/terminal-cleanup/terminal-reset.d.ts +0 -5
  103. package/dist/foundation/terminal-cleanup/terminal-reset.js +0 -5
  104. package/dist/integrations/pi/components/index.d.ts +1 -1
  105. package/dist/integrations/pi/components/index.js +1 -1
  106. package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -4
  107. package/dist/integrations/pi/components/shell-footer-status.d.ts +1 -1
  108. package/dist/integrations/pi/components/shell-footer-status.js +2 -2
  109. package/dist/integrations/pi/components/shell-hotkey-sections.js +1 -1
  110. package/dist/integrations/pi/components/shell-presenters-info.d.ts +2 -5
  111. package/dist/integrations/pi/components/shell-presenters-info.js +4 -18
  112. package/dist/integrations/pi/components/shell-presenters-transcript.d.ts +1 -1
  113. package/dist/integrations/pi/components/shell-presenters-transcript.js +1 -1
  114. package/dist/integrations/pi/components/shell-shared-facade.d.ts +0 -2
  115. package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +2 -5
  116. package/dist/integrations/pi/components/submitted-prompt-adapter.js +2 -16
  117. package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +1 -2
  118. package/dist/integrations/pi/components/upstream/components/session-footer.js +6 -8
  119. package/dist/integrations/pi/engine/adapter.d.ts +0 -1
  120. package/dist/integrations/pi/engine/adapter.js +1 -16
  121. package/dist/integrations/pi/engine/compaction-progress.js +13 -5
  122. package/dist/integrations/pi/engine/diagnostics-state.d.ts +0 -1
  123. package/dist/integrations/pi/engine/diagnostics-state.js +0 -14
  124. package/dist/integrations/pi/engine/prompt-suggestions.d.ts +0 -1
  125. package/dist/integrations/pi/engine/prompt-suggestions.js +0 -40
  126. package/dist/integrations/pi/engine/session-runtime.js +0 -2
  127. package/dist/integrations/pi/engine/workflow-runner.js +1 -1
  128. package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -2
  129. package/dist/integrations/pi/tui-runtime/adapter.js +2 -2
  130. package/dist/product-identity.d.ts +4 -6
  131. package/dist/product-identity.js +6 -11
  132. package/dist/product-identity.json +1 -40
  133. package/dist/runtime-payload-inventory.json +0 -3
  134. package/dist/ui/components/index.d.ts +2 -2
  135. package/dist/ui/components/index.js +1 -1
  136. package/dist/ui/components/submitted-prompt.d.ts +3 -13
  137. package/dist/ui/components/submitted-prompt.js +8 -41
  138. package/dist/ui/components/transcript-viewport.d.ts +1 -3
  139. package/dist/ui/components/transcript-viewport.js +1 -4
  140. package/dist/ui/settings/declarations.d.ts +3 -97
  141. package/dist/ui/settings/declarations.js +3 -78
  142. package/dist/ui/settings/migrations.js +18 -2
  143. package/docs/architecture/boundaries.md +22 -39
  144. package/docs/architecture/code-documentation.md +2 -2
  145. package/docs/architecture/internal-naming.md +9 -17
  146. package/docs/architecture/project-structure.md +30 -29
  147. package/docs/architecture/resource-and-data-policy.md +16 -31
  148. package/docs/architecture/toolchain.md +14 -19
  149. package/docs/architecture/ui-reference-provenance.md +2 -2
  150. package/docs/ci-release-runbook.md +6 -4
  151. package/docs/features/launch-profiles.md +11 -17
  152. package/docs/features/prompt-history.md +10 -11
  153. package/docs/local-worktree-cleanup.md +32 -1
  154. package/docs/manual-owned-ui-checkpoint.md +0 -1
  155. package/docs/openspec-archive-automation.md +11 -3
  156. package/docs/validation.md +5 -9
  157. package/docs/worktree-link-recovery.md +6 -6
  158. package/package.json +7 -19
  159. package/bin/guardian.js +0 -42
  160. package/bin/supervisor.js +0 -7
  161. package/bin/tab-launch-context.d.ts +0 -27
  162. package/bin/tab-launch-context.js +0 -94
  163. package/dist/app/session-shell/resident-tab-coordinator.d.ts +0 -38
  164. package/dist/app/session-shell/resident-tab-coordinator.js +0 -77
  165. package/dist/cli/tabs-request.d.ts +0 -7
  166. package/dist/cli/tabs-request.js +0 -1
  167. package/dist/cli/tabs.d.ts +0 -14
  168. package/dist/cli/tabs.js +0 -151
  169. package/dist/composition/resident-tab-bridge.d.ts +0 -41
  170. package/dist/composition/resident-tab-bridge.js +0 -209
  171. package/dist/composition/utility-tab.d.ts +0 -28
  172. package/dist/composition/utility-tab.js +0 -244
  173. package/dist/features/owned-ui/plus-menu-dialog.d.ts +0 -28
  174. package/dist/features/owned-ui/plus-menu-dialog.js +0 -89
  175. package/dist/features/resident-tab/auto-name.d.ts +0 -11
  176. package/dist/features/resident-tab/auto-name.js +0 -44
  177. package/dist/features/resident-tab/index.d.ts +0 -5
  178. package/dist/features/resident-tab/index.js +0 -7
  179. package/dist/features/resident-tab/shortcut-bindings-file.d.ts +0 -8
  180. package/dist/features/resident-tab/shortcut-bindings-file.js +0 -40
  181. package/dist/features/resident-tab/shortcut-declarations.d.ts +0 -13
  182. package/dist/features/resident-tab/shortcut-declarations.js +0 -26
  183. package/dist/features/resident-tab/shortcut-projection.d.ts +0 -29
  184. package/dist/features/resident-tab/shortcut-projection.js +0 -64
  185. package/dist/features/resident-tab/status-deriver.d.ts +0 -10
  186. package/dist/features/resident-tab/status-deriver.js +0 -12
  187. package/dist/foundation/launch-guardian/exit-watcher.d.ts +0 -14
  188. package/dist/foundation/launch-guardian/exit-watcher.js +0 -103
  189. package/dist/foundation/launch-guardian/index.d.ts +0 -2
  190. package/dist/foundation/launch-guardian/index.js +0 -1
  191. package/dist/foundation/launch-guardian/main.d.ts +0 -39
  192. package/dist/foundation/launch-guardian/main.js +0 -232
  193. package/dist/foundation/lifecycle/commands.d.ts +0 -40
  194. package/dist/foundation/lifecycle/commands.js +0 -1
  195. package/dist/foundation/lifecycle/launch-instance.d.ts +0 -46
  196. package/dist/foundation/lifecycle/launch-instance.js +0 -134
  197. package/dist/foundation/lifecycle/native-claim-gate.d.ts +0 -5
  198. package/dist/foundation/lifecycle/native-claim-gate.js +0 -41
  199. package/dist/foundation/lifecycle/supervisor-startup.d.ts +0 -30
  200. package/dist/foundation/lifecycle/supervisor-startup.js +0 -106
  201. package/dist/foundation/process-containment/addon-containment.d.ts +0 -20
  202. package/dist/foundation/process-containment/addon-containment.js +0 -139
  203. package/dist/foundation/process-containment/addon-process-inspector.d.ts +0 -11
  204. package/dist/foundation/process-containment/addon-process-inspector.js +0 -36
  205. package/dist/foundation/process-containment/addon.d.ts +0 -47
  206. package/dist/foundation/process-containment/addon.js +0 -57
  207. package/dist/foundation/process-containment/artifact.d.ts +0 -1
  208. package/dist/foundation/process-containment/artifact.js +0 -35
  209. package/dist/foundation/process-containment/contracts.d.ts +0 -33
  210. package/dist/foundation/process-containment/contracts.js +0 -35
  211. package/dist/foundation/process-containment/index.d.ts +0 -9
  212. package/dist/foundation/process-containment/index.js +0 -7
  213. package/dist/foundation/process-containment/linux-process-inspector.d.ts +0 -7
  214. package/dist/foundation/process-containment/linux-process-inspector.js +0 -27
  215. package/dist/foundation/process-containment/native-process-inspector.d.ts +0 -4
  216. package/dist/foundation/process-containment/native-process-inspector.js +0 -21
  217. package/dist/foundation/protocol/client.d.ts +0 -18
  218. package/dist/foundation/protocol/client.js +0 -130
  219. package/dist/foundation/protocol/index.d.ts +0 -3
  220. package/dist/foundation/protocol/index.js +0 -2
  221. package/dist/foundation/protocol/messages.d.ts +0 -90
  222. package/dist/foundation/protocol/messages.js +0 -100
  223. package/dist/foundation/release/cohort-selection.d.ts +0 -33
  224. package/dist/foundation/release/cohort-selection.js +0 -67
  225. package/dist/foundation/release/endpoint-lock.d.ts +0 -2
  226. package/dist/foundation/release/endpoint-lock.js +0 -37
  227. package/dist/foundation/release/endpoint-recovery.d.ts +0 -10
  228. package/dist/foundation/release/endpoint-recovery.js +0 -45
  229. package/dist/foundation/release/endpoints.d.ts +0 -32
  230. package/dist/foundation/release/endpoints.js +0 -152
  231. package/dist/foundation/release/prepared-update-activation.d.ts +0 -3
  232. package/dist/foundation/release/prepared-update-activation.js +0 -27
  233. package/dist/foundation/release/process-cleanup.d.ts +0 -14
  234. package/dist/foundation/release/process-cleanup.js +0 -76
  235. package/dist/foundation/release/supervisor-identity.d.ts +0 -15
  236. package/dist/foundation/release/supervisor-identity.js +0 -63
  237. package/dist/foundation/resident-tabs/boot-identity.d.ts +0 -6
  238. package/dist/foundation/resident-tabs/boot-identity.js +0 -16
  239. package/dist/foundation/resident-tabs/bounded-host-command.d.ts +0 -20
  240. package/dist/foundation/resident-tabs/bounded-host-command.js +0 -62
  241. package/dist/foundation/resident-tabs/bridge-client.d.ts +0 -73
  242. package/dist/foundation/resident-tabs/bridge-client.js +0 -327
  243. package/dist/foundation/resident-tabs/continuity.d.ts +0 -12
  244. package/dist/foundation/resident-tabs/continuity.js +0 -63
  245. package/dist/foundation/resident-tabs/doctor.d.ts +0 -28
  246. package/dist/foundation/resident-tabs/doctor.js +0 -166
  247. package/dist/foundation/resident-tabs/draft-checkpoint.d.ts +0 -27
  248. package/dist/foundation/resident-tabs/draft-checkpoint.js +0 -145
  249. package/dist/foundation/resident-tabs/ensure-terminal-host.d.ts +0 -36
  250. package/dist/foundation/resident-tabs/ensure-terminal-host.js +0 -151
  251. package/dist/foundation/resident-tabs/fault-injection.d.ts +0 -8
  252. package/dist/foundation/resident-tabs/fault-injection.js +0 -26
  253. package/dist/foundation/resident-tabs/fixture-control.d.ts +0 -7
  254. package/dist/foundation/resident-tabs/fixture-control.js +0 -35
  255. package/dist/foundation/resident-tabs/host-entry.d.ts +0 -1
  256. package/dist/foundation/resident-tabs/host-entry.js +0 -17
  257. package/dist/foundation/resident-tabs/index.d.ts +0 -15
  258. package/dist/foundation/resident-tabs/index.js +0 -10
  259. package/dist/foundation/resident-tabs/maintenance.d.ts +0 -39
  260. package/dist/foundation/resident-tabs/maintenance.js +0 -75
  261. package/dist/foundation/resident-tabs/progress-observation-schema.d.ts +0 -34
  262. package/dist/foundation/resident-tabs/progress-observation-schema.js +0 -1
  263. package/dist/foundation/resident-tabs/progress-observation.d.ts +0 -4
  264. package/dist/foundation/resident-tabs/progress-observation.js +0 -150
  265. package/dist/foundation/resident-tabs/prompt-journal.d.ts +0 -63
  266. package/dist/foundation/resident-tabs/prompt-journal.js +0 -213
  267. package/dist/foundation/resident-tabs/protocol.d.ts +0 -12
  268. package/dist/foundation/resident-tabs/protocol.js +0 -195
  269. package/dist/foundation/resident-tabs/recovery.d.ts +0 -26
  270. package/dist/foundation/resident-tabs/recovery.js +0 -205
  271. package/dist/foundation/resident-tabs/release-holds.d.ts +0 -28
  272. package/dist/foundation/resident-tabs/release-holds.js +0 -78
  273. package/dist/foundation/resident-tabs/routes.d.ts +0 -5
  274. package/dist/foundation/resident-tabs/routes.js +0 -5
  275. package/dist/foundation/resident-tabs/routing.d.ts +0 -11
  276. package/dist/foundation/resident-tabs/routing.js +0 -10
  277. package/dist/foundation/resident-tabs/runtime-control.d.ts +0 -38
  278. package/dist/foundation/resident-tabs/runtime-control.js +0 -74
  279. package/dist/foundation/resident-tabs/session-sync.d.ts +0 -14
  280. package/dist/foundation/resident-tabs/session-sync.js +0 -37
  281. package/dist/foundation/resident-tabs/settings.d.ts +0 -16
  282. package/dist/foundation/resident-tabs/settings.js +0 -60
  283. package/dist/foundation/resident-tabs/terminal-host-artifact.d.ts +0 -14
  284. package/dist/foundation/resident-tabs/terminal-host-artifact.js +0 -78
  285. package/dist/foundation/resident-tabs/zip-archive.d.ts +0 -9
  286. package/dist/foundation/resident-tabs/zip-archive.js +0 -56
  287. package/dist/foundation/storage/control-store.d.ts +0 -20
  288. package/dist/foundation/storage/control-store.js +0 -331
  289. package/dist/foundation/storage/index.d.ts +0 -1
  290. package/dist/foundation/storage/index.js +0 -1
  291. package/dist/foundation/supervision/index.d.ts +0 -3
  292. package/dist/foundation/supervision/index.js +0 -3
  293. package/dist/foundation/supervision/main.d.ts +0 -1
  294. package/dist/foundation/supervision/main.js +0 -86
  295. package/dist/foundation/supervision/paths.d.ts +0 -1
  296. package/dist/foundation/supervision/paths.js +0 -1
  297. package/dist/foundation/supervision/server.d.ts +0 -46
  298. package/dist/foundation/supervision/server.js +0 -606
  299. package/dist/integrations/pi/engine/offline-settings-port.d.ts +0 -23
  300. package/dist/integrations/pi/engine/offline-settings-port.js +0 -54
  301. package/dist/native/darwin-arm64/manifest.json +0 -23
  302. package/dist/native/darwin-arm64/process-guardian.node +0 -0
  303. package/dist/native/darwin-arm64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10500
  304. package/dist/native/darwin-arm64/terminal-host.manifest.json +0 -46
  305. package/dist/native/darwin-arm64/terminal-host.node +0 -0
  306. package/dist/native/darwin-x64/manifest.json +0 -23
  307. package/dist/native/darwin-x64/process-guardian.node +0 -0
  308. package/dist/native/darwin-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10737
  309. package/dist/native/darwin-x64/terminal-host.manifest.json +0 -46
  310. package/dist/native/darwin-x64/terminal-host.node +0 -0
  311. package/dist/native/linux-x64/manifest.json +0 -23
  312. package/dist/native/linux-x64/process-guardian.node +0 -0
  313. package/dist/native/linux-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -11226
  314. package/dist/native/linux-x64/terminal-host.manifest.json +0 -46
  315. package/dist/native/linux-x64/terminal-host.node +0 -0
  316. package/dist/native/win32-x64/manifest.json +0 -23
  317. package/dist/native/win32-x64/process-guardian.node +0 -0
  318. package/dist/native/win32-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10757
  319. package/dist/native/win32-x64/terminal-host.manifest.json +0 -46
  320. package/dist/native/win32-x64/terminal-host.node +0 -0
  321. package/docs/architecture/evidence/resident-tabs/linux-x64.md +0 -37
  322. package/docs/architecture/evidence/resident-tabs/macos-arm64.md +0 -36
  323. package/docs/architecture/evidence/resident-tabs/macos-x64.md +0 -35
  324. package/docs/architecture/evidence/resident-tabs/windows-x64.md +0 -36
  325. package/docs/architecture/evidence/terminal-host-spike/manual-one-pane-terminal-host.md +0 -70
  326. package/docs/architecture/evidence/terminal-host-spike/manual-two-by-two-basic-terminal-host.md +0 -32
  327. package/docs/architecture/evidence/terminal-host-spike/milestone-baseline.json +0 -115
  328. package/docs/architecture/evidence/terminal-host-spike/owned-ui-foundation-prerequisite.json +0 -48
  329. package/docs/architecture/evidence/terminal-host-spike/terminal-host-provenance.json +0 -125
  330. package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-1.json +0 -56
  331. package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-3.json +0 -174
  332. package/docs/architecture/evidence/terminal-host-spike/terminal-spike-acceptance-record.json +0 -18
  333. package/docs/architecture/native-fixture-isolation.md +0 -23
  334. package/docs/architecture/process-guardian-provenance.md +0 -36
  335. package/docs/architecture/resident-tabs-requirements.md +0 -18
  336. package/docs/architecture/resident-tabs.md +0 -668
  337. package/docs/architecture/terminal-host-proof-gate.md +0 -34
  338. package/docs/architecture/terminal-host-provenance.md +0 -81
  339. package/docs/architecture/terminal-host-spike-evidence.md +0 -39
  340. package/docs/launch-recovery.md +0 -23
  341. package/docs/manual-launch-instance-acceptance.md +0 -43
  342. package/docs/manual-resident-tabs-acceptance.md +0 -51
@@ -5,7 +5,6 @@ import { PromptHistoryController } from "./prompt-history-controller.js";
5
5
  import { SessionDialogCoordinator } from "./dialog-coordinator.js";
6
6
  import { LoginInteraction } from "./login-interaction.js";
7
7
  import { PromptSubmission } from "./prompt-submission.js";
8
- import { ResidentTabCoordinator } from "./resident-tab-coordinator.js";
9
8
  import { SessionConcerns } from "./session-concern.js";
10
9
  import { composeExitText, SessionStopLatch } from "./session-lifecycle.js";
11
10
  import { openWorkflowSelector } from "./workflow-router.js";
@@ -28,15 +27,6 @@ import { writeSystemClipboardText, } from "./system-clipboard.js";
28
27
  import { OwnedUiSessionShellRoot, shellResourceEntries, } from "./session-shell-root.js";
29
28
  // Invariant: a disposed shell leaves the engine a host that holds no reference back to it.
30
29
  const DETACHED_WORKFLOW_INTERACTION = { prompt: async () => null, notify() { } };
31
- // Invariant: the resume mode belongs to the presenter instance, not the persisted session or profile.
32
- const SOLO_RESUME_HINTS = new WeakSet();
33
- /** Resident Agents refuse the commands their tab bar serves instead, naming where they live. */
34
- const RESIDENT_UTILITY_TAB_REFUSALS = Object.freeze({
35
- settings: "Settings is available from the global Settings tab.",
36
- // Platform: macOS labels Alt `Option`.
37
- changelog: `The changelog opens as its own tab from the command palette (${process.platform === "darwin" ? "Option" : "Alt"}+/).`,
38
- name: "Rename the session by renaming its tab (F2).",
39
- });
40
30
  export { OwnedUiSessionShellRoot, } from "./session-shell-root.js";
41
31
  export { OwnedUiTerminalHost, sessionTerminalHostOptions } from "./shell-host.js";
42
32
  export { formatSessionResumeCommand, quoteCommandArgument } from "./session-lifecycle.js";
@@ -51,7 +41,6 @@ export class OwnedUiSessionPresenter {
51
41
  root;
52
42
  #host;
53
43
  #terminal;
54
- #resident;
55
44
  #submission;
56
45
  #login;
57
46
  #concerns;
@@ -112,8 +101,6 @@ export class OwnedUiSessionPresenter {
112
101
  this.#sessionBindingGeneration = this.backend.identity.sessionBindingGeneration;
113
102
  this.#suggestionModelKey = suggestionModelKey(this.backend.session.view());
114
103
  this.#customViewport = sessionLayout === "custom-viewport";
115
- if (options.presentation?.soloResumeHint)
116
- SOLO_RESUME_HINTS.add(this);
117
104
  this.#inputCoordination = inputPresentation?.coordination !== false;
118
105
  this.#host = host;
119
106
  this.#terminal = host.connect(this);
@@ -133,7 +120,7 @@ export class OwnedUiSessionPresenter {
133
120
  ...(sharedClipboard === undefined ? {} : { pool: sharedClipboard.copy }),
134
121
  ...(terminal === undefined && clipboard === undefined ? {} : { destination: "terminal" }),
135
122
  ...(clipboard?.writeText === undefined ? {} : { writeText: (text, signal) => clipboard.writeText(text, signal) }),
136
- // Invariant: the owned host is the route contract. Resident and pseudoterminal children must not infer
123
+ // Invariant: the owned host is the route contract. Pseudoterminal children must not infer
137
124
  // clipboard reachability from Node's view of stdout, and inactive presenters are fenced here.
138
125
  terminal: { submit: async (control, signal) => {
139
126
  if (signal.aborted || this.#disposed || !this.#terminal.running || !this.#terminal.attached)
@@ -180,8 +167,6 @@ export class OwnedUiSessionPresenter {
180
167
  replacementSurfaceActive: !this.root.usesDefaultInputSurface(),
181
168
  }),
182
169
  enableDockInputReuse: inputPresentation?.viewportReuse !== false,
183
- footerSessionName: options.engine.residentTab === undefined,
184
- hideUtilityTabCommands: options.engine.residentTab !== undefined,
185
170
  persistentHistory: this.#customViewport && promptHistory !== undefined,
186
171
  ...(promptHistory === undefined ? {} : { historyEditor: promptHistory.editor }),
187
172
  onSubmit: text => { void this.submit(text).catch(() => this.#submission.reportError()); },
@@ -201,7 +186,6 @@ export class OwnedUiSessionPresenter {
201
186
  onDequeue: () => this.restoreQueuedInput(),
202
187
  onEditorChange: text => {
203
188
  this.#submission.noteEditorChange();
204
- this.#resident.checkpoint(text);
205
189
  promptSuggestionController?.abortPending();
206
190
  if (text.length === 0) {
207
191
  // Concurrency: the editor synchronizes deletion-owned autocomplete after onChange.
@@ -263,8 +247,6 @@ export class OwnedUiSessionPresenter {
263
247
  // Invariant: the presenter owns its root (theme subscription and helper clients) and disposes it once the
264
248
  // terminal no longer renders it.
265
249
  constructed.push(() => this.root.dispose());
266
- this.#resident = new ResidentTabCoordinator(options.engine.residentTab, { root: this.root });
267
- constructed.push(() => this.#resident.dispose());
268
250
  const startupRoute = options.engine.startupRoute;
269
251
  this.#dialogs = new SessionDialogCoordinator({
270
252
  terminal: this.#terminal,
@@ -272,7 +254,6 @@ export class OwnedUiSessionPresenter {
272
254
  routeHost: routeHost ?? null,
273
255
  disposed: () => this.#disposed,
274
256
  exit: () => { void this.shutdown(); },
275
- routeClosed: route => this.#resident.closeOwnedRoute(route),
276
257
  ...(startupRoute === undefined ? {} : { startupRoute }),
277
258
  });
278
259
  constructed.push(() => this.#dialogs.dispose());
@@ -283,7 +264,6 @@ export class OwnedUiSessionPresenter {
283
264
  syncProgress: () => this.#syncTerminalProgress(this.view()),
284
265
  });
285
266
  this.#submission = this.#createSubmission(cwd);
286
- this.#resident.restoreInput(options.history?.imageSidecar);
287
267
  this.#reloadPresentation = reloadPresentation;
288
268
  const presentationInterval = streamPresentationOptions?.intervalMs ?? STREAM_PRESENTATION_INTERVAL_MS;
289
269
  this.#streamPresentation = streamPresentationOptions?.scheduler === undefined
@@ -378,7 +358,6 @@ export class OwnedUiSessionPresenter {
378
358
  this.#stop.settleAfter(() => this.dispose());
379
359
  return;
380
360
  }
381
- this.#resident.observeLifecycle(event);
382
361
  // Performance: a streamed chunk names one block, and touching only that block is what keeps the
383
362
  // cost of a chunk the same in a long session as in a new one. Everything else
384
363
  // resynchronizes the view, which is cheap next to re-reading the transcript.
@@ -841,21 +820,13 @@ export class OwnedUiSessionPresenter {
841
820
  }
842
821
  shutdown() {
843
822
  this.#shutdownPromise ??= this.#shutdown().finally(() => {
844
- // Invariant: a rejected resident detach is retryable; ordinary shutdown has disposed the shell already.
823
+ // Invariant: a failed quit is retryable; ordinary shutdown has disposed the shell already.
845
824
  if (!this.#disposed)
846
825
  this.#shutdownPromise = undefined;
847
826
  });
848
827
  return this.#shutdownPromise;
849
828
  }
850
829
  async #shutdown() {
851
- const detached = await this.#resident.detach();
852
- if (detached === true)
853
- return { outcome: "completed", diagnostic: null };
854
- if (detached !== undefined) {
855
- this.root.appendWorkflowStatus(detached);
856
- this.#terminal.requestRender();
857
- return rejected("resident tab detach is unavailable");
858
- }
859
830
  try {
860
831
  const quit = this.backend.workflows.executeWorkflow({ command: "quit", argument: "" });
861
832
  // Invariant: a slow or hung engine quit never holds the terminal past the cleanup deadline. The
@@ -906,7 +877,7 @@ export class OwnedUiSessionPresenter {
906
877
  return { outcome: "completed", diagnostic: null };
907
878
  }
908
879
  }
909
- const selected = openWorkflowSelector(request, this, { residentTab: this.#resident.active });
880
+ const selected = openWorkflowSelector(request, this);
910
881
  if (selected !== undefined)
911
882
  return selected;
912
883
  if (request.command === "reload") {
@@ -1089,7 +1060,6 @@ export class OwnedUiSessionPresenter {
1089
1060
  customViewport: this.#customViewport,
1090
1061
  exitMode: this.backend.identity.disposed ? this.#fullscreenExitOutput : this.backend.settings.snapshot().fullscreenExitOutput,
1091
1062
  resume: this.backend.identity.currentSessionResumeMetadata(),
1092
- soloResumeHint: SOLO_RESUME_HINTS.has(this),
1093
1063
  transcript: () => this.root.exitTranscript(terminal.columns),
1094
1064
  });
1095
1065
  });
@@ -1110,8 +1080,6 @@ export class OwnedUiSessionPresenter {
1110
1080
  }
1111
1081
  await historyCleanup.catch(() => false); // Security: background durability outcomes never enter terminal output.
1112
1082
  await boundedCleanup(() => pasteCleanup).catch(error => settled.push(error));
1113
- await boundedCleanup(() => this.#resident.gracefulStop(this.#currentSessionFile()))
1114
- .catch(error => settled.push(error));
1115
1083
  await boundedCleanup(() => this.backend.extensions.unbindExtensionUi()).catch(error => settled.push(error));
1116
1084
  return settled;
1117
1085
  };
@@ -1166,7 +1134,6 @@ export class OwnedUiSessionPresenter {
1166
1134
  backend: this.backend,
1167
1135
  root: this.root,
1168
1136
  terminal: this.#terminal,
1169
- residentTab: this.#resident,
1170
1137
  cwd,
1171
1138
  promptHistory: () => this.#promptHistory,
1172
1139
  imageSidecar: () => this.#historyBinding?.imageSidecar,
@@ -1195,7 +1162,6 @@ export class OwnedUiSessionPresenter {
1195
1162
  { onSessionReplaced: () => this.root.setInputSurface(null) },
1196
1163
  { onSessionReplaced: () => this.root.resetExtensionUi() },
1197
1164
  { onSessionReplaced: () => this.root.resetWorkflowPresentation() },
1198
- this.#resident,
1199
1165
  ]);
1200
1166
  }
1201
1167
  // Invariant: delivery recovery does not replace a store; conversation or live scope changes can.
@@ -1293,8 +1259,8 @@ export class OwnedUiSessionPresenter {
1293
1259
  openOwnedRoute(route) {
1294
1260
  if (this.#disposed)
1295
1261
  return;
1296
- // Invariant: a route requested before the runtime runs (the resident Settings bridge route arrives
1297
- // before start()) is retained, latest wins, and presented through the startup-route path once started.
1262
+ // Invariant: a route requested before the runtime runs is retained, latest wins, and presented
1263
+ // through the startup-route path once started.
1298
1264
  if (!this.#terminal.running) {
1299
1265
  this.#dialogs.retainStartupRoute(route);
1300
1266
  return;
@@ -1305,17 +1271,13 @@ export class OwnedUiSessionPresenter {
1305
1271
  }
1306
1272
  }
1307
1273
  hotkeysPresentation() {
1308
- const presentation = this.root.hotkeysPresentation();
1309
- return this.#resident.active ? { ...presentation, residentTabs: true } : presentation;
1274
+ return this.root.hotkeysPresentation();
1310
1275
  }
1311
1276
  async #slashCommand(text) {
1312
1277
  const body = text.slice(1).trim();
1313
1278
  const separator = body.search(/\s/);
1314
1279
  const name = separator < 0 ? body : body.slice(0, separator);
1315
1280
  const argument = separator < 0 ? "" : body.slice(separator + 1).trimStart();
1316
- const utilityTab = this.#resident.active ? RESIDENT_UTILITY_TAB_REFUSALS[name] : undefined;
1317
- if (utilityTab !== undefined)
1318
- return rejected(utilityTab);
1319
1281
  if (this.#dialogs.claimsRoute(name))
1320
1282
  return this.#dialogs.openRoute(name);
1321
1283
  if (this.#isWorkflowRoute(name))
@@ -1447,9 +1409,6 @@ function copyCharacters(snapshot) {
1447
1409
  }
1448
1410
  return hasContent ? count : undefined;
1449
1411
  }
1450
- function rejected(diagnostic) {
1451
- return { outcome: "rejected", diagnostic };
1452
- }
1453
1412
  function workflowAdapterResult(result) {
1454
1413
  if (result.outcome === "completed")
1455
1414
  return { outcome: "completed", diagnostic: null };
@@ -22,7 +22,6 @@ export class SessionViewportController {
22
22
  #pasteDiagnosticRequest = 0;
23
23
  #viewport = new TranscriptViewport();
24
24
  #config = {
25
- timeFormat: "8:00 PM",
26
25
  scrollbarAppearance: "auto",
27
26
  scrollbarStyle: "thin",
28
27
  scrollbarSpeed: "normal",
@@ -171,11 +170,9 @@ export class SessionViewportController {
171
170
  }
172
171
  /** Returns true when document wrapping may have changed. */
173
172
  setConfig(config) {
174
- const normalized = { ...config, timeFormat: config.timeFormat ?? "8:00 PM" };
175
- const layoutChanged = normalized.scrollbarAppearance !== this.#config.scrollbarAppearance
176
- || normalized.timeFormat !== this.#config.timeFormat;
177
- this.#config = normalized;
178
- this.#viewport.setConfig(normalized);
173
+ const layoutChanged = config.scrollbarAppearance !== this.#config.scrollbarAppearance;
174
+ this.#config = config;
175
+ this.#viewport.setConfig(config);
179
176
  this.#requestRender();
180
177
  return layoutChanged;
181
178
  }
@@ -1,8 +1,6 @@
1
1
  import { MOUSE_TRACKING_OFF, MOUSE_TRACKING_ON, parseMouseInput } from "../../ui/components/mouse.js";
2
2
  import { readVisibleHyperlinks } from "../../ui/components/visible-hyperlinks.js";
3
3
  import { piCanvasBackgroundAnsi } from "../../integrations/pi/components/theme.js";
4
- import { residentFixtureControl } from "../../foundation/resident-tabs/fixture-control.js";
5
- import { residentProgressObserver } from "../../foundation/resident-tabs/progress-observation.js";
6
4
  import { DamageAwareTerminalAdapter, } from "../../integrations/pi/tui-runtime/damage-aware-terminal.js";
7
5
  import { PiTuiRuntimeAdapter, legacyKeyInput } from "../../integrations/pi/tui-runtime/adapter.js";
8
6
  import { classifyPiTuiInput } from "../../integrations/pi/tui-runtime/input-presentation-coordinator.js";
@@ -57,8 +55,6 @@ export class OwnedUiTerminalHost {
57
55
  this.#customViewport = options.layout === "custom-viewport";
58
56
  this.#quitOutro = options.quitOutro;
59
57
  const input = options.input;
60
- const fixtureControl = residentFixtureControl();
61
- const progressObserver = residentProgressObserver();
62
58
  let damageTerminal;
63
59
  const surface = {
64
60
  render: width => this.#active?.render(width) ?? [],
@@ -84,13 +80,6 @@ export class OwnedUiTerminalHost {
84
80
  inspectHyperlinks: readVisibleHyperlinks,
85
81
  onResize: () => this.#active?.noteImmediatePresentation(),
86
82
  onHyperlinkCleanupRequired: () => this.runtime?.requestRender(true),
87
- ...(fixtureControl === null ? {} : {
88
- allowWrite: () => !fixtureControl.stopped("child-render-write"),
89
- writeChunks: data => fixtureControl.fragmentChildWrite(data),
90
- }),
91
- ...(progressObserver === null ? {} : {
92
- onWrite: ({ bytes, fragments, transaction, frameId, cause }) => progressObserver.childRenderWrite(bytes, fragments, transaction, frameId, cause),
93
- }),
94
83
  });
95
84
  return damageTerminal;
96
85
  },
@@ -102,12 +91,9 @@ export class OwnedUiTerminalHost {
102
91
  },
103
92
  }),
104
93
  } : { layoutRoot: pinnedLayoutRoot(this.#delegatingLayoutParts()) }),
105
- ...(input?.onEvent === undefined && progressObserver === null ? {} : {
94
+ ...(input?.onEvent === undefined ? {} : {
106
95
  inputDiagnostics: {
107
- onEvent: event => {
108
- input?.onEvent?.(event);
109
- progressObserver?.inputPhase?.(event.phase, event.revision);
110
- },
96
+ onEvent: input.onEvent,
111
97
  ...(input?.now === undefined ? {} : { now: input.now }),
112
98
  },
113
99
  }),
@@ -168,8 +154,6 @@ export class OwnedUiTerminalHost {
168
154
  active() {
169
155
  return this.#active;
170
156
  }
171
- // Invariant: resident tab visibility never gates rendering here; a hidden tab keeps painting into its
172
- // resident terminal, and the native holder alone withholds inactive surfaces from attach clients.
173
157
  requestRender(from, force = false) {
174
158
  if (from === this.#active)
175
159
  this.runtime.requestRender(force);
@@ -1,4 +1,4 @@
1
- import type { OwnedUiSessionViewModel, OwnedUiViewportSettings } from "../../contracts/owned-ui/index.js";
1
+ import type { OwnedUiSessionViewModel } from "../../contracts/owned-ui/index.js";
2
2
  import type { TranscriptPromptAnchor } from "../../ui/components/transcript-viewport.js";
3
3
  import type { PiShellTranscriptComponentPort } from "../../integrations/pi/components/shell-shared-facade.js";
4
4
  type TranscriptBlock = OwnedUiSessionViewModel["transcript"][number];
@@ -22,7 +22,6 @@ export interface TranscriptDocumentChrome {
22
22
  /** An extension header may animate, so a document under one is never cached. */
23
23
  hasExtensionHeader(): boolean;
24
24
  thinkingVisible(): boolean;
25
- timeFormat(): OwnedUiViewportSettings["timeFormat"];
26
25
  }
27
26
  export interface TranscriptDocumentOptions {
28
27
  readonly customViewport: boolean;
@@ -1,9 +1,7 @@
1
1
  import { acceptsTranscriptUpdate } from "../../contracts/owned-ui/index.js";
2
- import { formatSubmittedPromptTime, submittedPromptLayout } from "../../ui/components/submitted-prompt.js";
3
- import { nativeHyperlinkStyle, overlaySpan } from "../../ui/components/spans.js";
4
- import { displayWidth } from "../../ui/components/text.js";
2
+ import { nativeHyperlinkStyle } from "../../ui/components/spans.js";
5
3
  import { createPiShellChangelog, createPiShellCollapsedChangelog, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateNotice, } from "../../integrations/pi/components/shell-presenters-info.js";
6
- import { isPiPromptStyleCompaction, paintPiSubmittedPromptTimestamp, renderPiShellStartupDiagnostic, renderPiShellTranscriptBlock, } from "../../integrations/pi/components/shell-presenters-transcript.js";
4
+ import { isPiPromptStyleCompaction, renderPiShellStartupDiagnostic, renderPiShellTranscriptBlock, } from "../../integrations/pi/components/shell-presenters-transcript.js";
7
5
  import { piTheme } from "../../integrations/pi/components/upstream/theme/theme.js";
8
6
  const LAYOUT_ONLY = new Set(["editor-padding", "diagnostics", "workflow-status", "extension-header"]);
9
7
  const WORKFLOW_STATUS_PREFIX = "workflow-status-";
@@ -213,13 +211,11 @@ export class TranscriptDocument {
213
211
  }
214
212
  rows.push(...blockRows);
215
213
  if (promptLike && blockRows[0] !== undefined) {
216
- const source = pinnedPromptSource(block, blockRows[0], blockWidth, chrome.timeFormat());
217
214
  promptAnchors.push({
218
215
  id: block.id,
219
216
  firstRow,
220
217
  lastRow: Math.max(firstRow, rows.length - 1),
221
- sourceRow: source.row,
222
- copySuffixWidth: source.copySuffixWidth,
218
+ sourceRow: blockRows[0],
223
219
  prominentSourceRow: blockRows[0],
224
220
  });
225
221
  }
@@ -343,24 +339,3 @@ function sanitizeExitTranscriptRow(row) {
343
339
  export function nativeTranscriptLinkColor(text, target) {
344
340
  return piTheme().fg(/^file:/iu.test(target) ? "accent" : "mdLink", text);
345
341
  }
346
- /** Preserve the stable metadata-grey foreground for every pinned timestamp state. */
347
- function pinnedPromptSource(block, sourceRow, width, timeFormat) {
348
- const unchanged = { row: sourceRow, copySuffixWidth: 0 };
349
- if (typeof block.payload !== "object" || block.payload === null)
350
- return unchanged;
351
- const value = block.payload.timestamp;
352
- if (typeof value !== "number" || !Number.isFinite(value))
353
- return unchanged;
354
- const format = timeFormat ?? "8:00 PM";
355
- const timestamp = formatSubmittedPromptTime(value, format);
356
- if (timestamp === null || submittedPromptLayout(width, value, format).timestamp === null)
357
- return unchanged;
358
- const rowWidth = displayWidth(sourceRow);
359
- const timestampWidth = displayWidth(timestamp);
360
- if (rowWidth < timestampWidth)
361
- return unchanged;
362
- return {
363
- row: overlaySpan(sourceRow, rowWidth - timestampWidth, rowWidth, paintPiSubmittedPromptTimestamp(timestamp)),
364
- copySuffixWidth: timestampWidth,
365
- };
366
- }
@@ -115,7 +115,7 @@ export class WorkflowOutput {
115
115
  if (result.command === "hotkeys") {
116
116
  this.#lastStatusId = undefined;
117
117
  const presentation = this.#ports.hotkeysPresentation();
118
- const hotkeys = createPiShellHotkeys(presentation.bindings, presentation.getShortcuts, presentation.profile, presentation.residentTabs);
118
+ const hotkeys = createPiShellHotkeys(presentation.bindings, presentation.getShortcuts, presentation.profile);
119
119
  this.#appendAnchored(width => hotkeys.render(width), () => hotkeys.dispose?.());
120
120
  return true;
121
121
  }
@@ -20,6 +20,4 @@ export interface WorkflowSelectors {
20
20
  * has opened, or undefined when the request goes to the engine. The decision itself is synchronous,
21
21
  * so a request that goes to the engine reaches it in the same turn.
22
22
  */
23
- export declare function openWorkflowSelector(request: OwnedUiWorkflowRequest, selectors: WorkflowSelectors, options: {
24
- readonly residentTab: boolean;
25
- }): OwnedUiCommandResult | Promise<OwnedUiCommandResult> | undefined;
23
+ export declare function openWorkflowSelector(request: OwnedUiWorkflowRequest, selectors: WorkflowSelectors): OwnedUiCommandResult | Promise<OwnedUiCommandResult> | undefined;
@@ -26,13 +26,10 @@ const SELECTOR_ROUTES = [
26
26
  * has opened, or undefined when the request goes to the engine. The decision itself is synchronous,
27
27
  * so a request that goes to the engine reaches it in the same turn.
28
28
  */
29
- export function openWorkflowSelector(request, selectors, options) {
29
+ export function openWorkflowSelector(request, selectors) {
30
30
  const route = SELECTOR_ROUTES.find(candidate => candidate.command === request.command && candidate.pending(request));
31
31
  if (route === undefined)
32
32
  return undefined;
33
- if (route.command === "settings" && options.residentTab) {
34
- return { outcome: "rejected", diagnostic: "Settings is available from the global Settings tab." };
35
- }
36
33
  const completed = { outcome: "completed", diagnostic: null };
37
34
  const opened = route.open(selectors, request);
38
35
  return opened instanceof Promise ? opened.then(() => completed) : completed;
@@ -1,8 +1,7 @@
1
- import { type InteractiveLaunchIntent, type InteractiveLaunchMode, type LaunchProfileId, type SessionSelection } from "../features/launch/index.js";
1
+ import { type InteractiveLaunchIntent, type LaunchProfileId, type SessionSelection } from "../features/launch/index.js";
2
2
  import type { CliCapabilities } from "./capabilities.js";
3
3
  import type { PackageCommandRequest } from "./packages.js";
4
4
  import type { SessionContextRequest } from "./session-context.js";
5
- import type { TabsRequest } from "./tabs-request.js";
6
5
  import { type PackageCliVerb, type PackageCommandNamespace, type PackageSyntaxDiagnostic } from "./package-messages.js";
7
6
  export type UpdateChannel = "stable" | "next";
8
7
  export interface CliHandlers {
@@ -11,7 +10,6 @@ export interface CliHandlers {
11
10
  readonly update: (channel: UpdateChannel, target?: string) => Promise<number>;
12
11
  readonly packages: (request: PackageCommandRequest) => Promise<number>;
13
12
  readonly sessionContext: (request: SessionContextRequest) => Promise<number>;
14
- readonly tabs: (request: TabsRequest) => Promise<number>;
15
13
  /** Removes A1 from the machine; absent in hosts that cannot uninstall. */
16
14
  readonly uninstall?: (request: {
17
15
  readonly yes: boolean;
@@ -24,8 +22,6 @@ export interface CliOutput {
24
22
  }
25
23
  export declare function cliUsage(capabilities: CliCapabilities): string;
26
24
  export declare function cliHelp(capabilities: CliCapabilities): string;
27
- /** Focused help for the resident-tab maintenance forms; printing it contacts no host. */
28
- export declare function tabsHelp(): string;
29
25
  export declare function dispatchCli(arguments_: readonly string[], handlers: CliHandlers, output: CliOutput, capabilities: CliCapabilities): Promise<number>;
30
26
  export type CliCommand = {
31
27
  readonly kind: "noop";
@@ -42,7 +38,6 @@ export type CliCommand = {
42
38
  } | {
43
39
  readonly kind: "launch";
44
40
  readonly profileId: LaunchProfileId;
45
- readonly launchMode: InteractiveLaunchMode;
46
41
  readonly sessionSelection?: SessionSelection;
47
42
  } | {
48
43
  readonly kind: "version";
@@ -56,11 +51,6 @@ export type CliCommand = {
56
51
  } | {
57
52
  readonly kind: "session-context";
58
53
  readonly request: SessionContextRequest;
59
- } | {
60
- readonly kind: "tabs";
61
- readonly request: TabsRequest;
62
- } | {
63
- readonly kind: "tabs-help";
64
54
  } | {
65
55
  readonly kind: "uninstall";
66
56
  readonly request: {
@@ -6,9 +6,6 @@ export function cliUsage(capabilities) {
6
6
  "",
7
7
  "--session <path|id>",
8
8
  "--session-dir <dir> --session <path|id>",
9
- "solo",
10
- "solo --session <path|id>",
11
- "solo --session-dir <dir> --session <path|id>",
12
9
  ...(capabilities.developmentComparison ? ["pi"] : []),
13
10
  "help",
14
11
  "version",
@@ -26,10 +23,6 @@ export function cliUsage(capabilities) {
26
23
  "session worktrees",
27
24
  "session link-worktree <path>",
28
25
  "session unlink-worktree",
29
- "tabs",
30
- "tabs stop <id>|--all",
31
- "tabs host status|stop",
32
- "tabs doctor",
33
26
  ]);
34
27
  }
35
28
  export function cliHelp(capabilities) {
@@ -39,9 +32,6 @@ export function cliHelp(capabilities) {
39
32
  ` ${command}`,
40
33
  ` ${command} --session <path|id>`,
41
34
  ` ${command} --session-dir <dir> --session <path|id>`,
42
- ` ${command} solo`,
43
- ` ${command} solo --session <path|id>`,
44
- ` ${command} solo --session-dir <dir> --session <path|id>`,
45
35
  ...(capabilities.developmentComparison ? [` ${command} pi`] : []),
46
36
  ` ${command} help`,
47
37
  ` ${command} version`,
@@ -66,32 +56,9 @@ export function cliHelp(capabilities) {
66
56
  ` ${command} session link-worktree <path>`,
67
57
  ` ${command} session unlink-worktree`,
68
58
  "",
69
- "Tabs:",
70
- ` ${command} tabs`,
71
- ` ${command} tabs stop <id>|--all`,
72
- ` ${command} tabs host status|stop`,
73
- ` ${command} tabs doctor`,
74
- "",
75
59
  ].join("\n");
76
60
  }
77
- /** Focused help for the resident-tab maintenance forms; printing it contacts no host. */
78
- export function tabsHelp() {
79
- const command = PRODUCT_TEXT.commandName;
80
- return [
81
- "Resident tabs:",
82
- ` ${command} tabs List running tabs`,
83
- ` ${command} tabs stop <id> Stop one tab; its session stays resumable`,
84
- ` ${command} tabs stop --all Stop every tab and keep the host`,
85
- ` ${command} tabs host status Show host identity, limits, and health counters`,
86
- ` ${command} tabs host stop Stop every tab and the host`,
87
- ` ${command} tabs doctor Write a redacted diagnostic bundle`,
88
- "",
89
- "Options:",
90
- " --json Print the versioned machine-readable report",
91
- "",
92
- ].join("\n");
93
- }
94
- const PROFILE_WORDS = new Set(["pi", "solo"]);
61
+ const PROFILE_WORDS = new Set(["pi"]);
95
62
  export async function dispatchCli(arguments_, handlers, output, capabilities) {
96
63
  const command = parseCliCommand(arguments_, capabilities);
97
64
  if (command.kind === "noop")
@@ -113,31 +80,25 @@ export async function dispatchCli(arguments_, handlers, output, capabilities) {
113
80
  return 2;
114
81
  }
115
82
  if (command.kind === "launch")
116
- return await handlers.launch(interactiveLaunchIntent(command.profileId, command.sessionSelection, command.launchMode));
83
+ return await handlers.launch(interactiveLaunchIntent(command.profileId, command.sessionSelection));
117
84
  if (command.kind === "version")
118
85
  return await handlers.version();
119
86
  if (command.kind === "packages")
120
87
  return await handlers.packages(command.request);
121
88
  if (command.kind === "session-context")
122
89
  return await handlers.sessionContext(command.request);
123
- if (command.kind === "tabs-help") {
124
- output.stdout(tabsHelp());
125
- return 0;
126
- }
127
- if (command.kind === "tabs")
128
- return await handlers.tabs(command.request);
129
90
  if (command.kind === "uninstall")
130
91
  return handlers.uninstall ? await handlers.uninstall(command.request) : 2;
131
92
  return await handlers.update(command.channel, command.target);
132
93
  }
133
94
  export function parseCliCommand(arguments_, capabilities) {
134
95
  if (arguments_.length === 0)
135
- return { kind: "launch", profileId: "a1", launchMode: "tabs" };
96
+ return { kind: "launch", profileId: "a1" };
136
97
  const [command, ...rest] = arguments_;
137
98
  if (command === "--session" || command === "--session-dir") {
138
99
  try {
139
100
  const sessionSelection = parseSessionSelection(arguments_);
140
- return { kind: "launch", profileId: "a1", launchMode: "tabs", ...(sessionSelection === undefined ? {} : { sessionSelection }) };
101
+ return { kind: "launch", profileId: "a1", ...(sessionSelection === undefined ? {} : { sessionSelection }) };
141
102
  }
142
103
  catch (error) {
143
104
  return { kind: "error", message: PRODUCT_TEXT.diagnostic(`could not parse session launch: ${error instanceof Error ? error.message : String(error)}`) };
@@ -158,66 +119,18 @@ export function parseCliCommand(arguments_, capabilities) {
158
119
  if (command === "pi") {
159
120
  if (rest.length > 0)
160
121
  return parsePackageCommand(rest, "pi");
161
- return capabilities.developmentComparison ? { kind: "launch", profileId: "pi", launchMode: "solo" } : { kind: "noop" };
162
- }
163
- if (command === "solo") {
164
- if (rest.length === 0)
165
- return { kind: "launch", profileId: "a1", launchMode: "solo" };
166
- try {
167
- const sessionSelection = parseSessionSelection(rest);
168
- return { kind: "launch", profileId: "a1", launchMode: "solo", ...(sessionSelection === undefined ? {} : { sessionSelection }) };
169
- }
170
- catch (error) {
171
- return { kind: "error", message: PRODUCT_TEXT.diagnostic(`could not parse solo session launch: ${error instanceof Error ? error.message : String(error)}`) };
172
- }
122
+ return capabilities.developmentComparison ? { kind: "launch", profileId: "pi" } : { kind: "noop" };
173
123
  }
174
124
  if (command === "update")
175
125
  return parseUpdate(rest, capabilities.runningChannel ?? "stable");
176
126
  if (command === "session")
177
127
  return parseSessionContext(rest);
178
- if (command === "tabs")
179
- return parseTabs(rest);
180
128
  if (command?.startsWith("update:"))
181
129
  return { kind: "noop" };
182
130
  // Rationale: unsupported and reserved command spaces are deliberately quiet. Help is
183
131
  // explicit, and a typo must never start an interactive or maintenance path.
184
132
  return { kind: "noop" };
185
133
  }
186
- /** Parses `a1 tabs` before any I/O; a malformed form fails with one line and contacts no host. */
187
- function parseTabs(rest) {
188
- if (rest.some(value => value === "--help" || value === "-h"))
189
- return { kind: "tabs-help" };
190
- const json = rest.includes("--json");
191
- const words = rest.filter(value => value !== "--json");
192
- const fail = (detail) => ({ kind: "error", message: PRODUCT_TEXT.diagnostic(`could not parse tabs: ${detail}`) });
193
- const [action, value, extra] = words;
194
- if (action === undefined)
195
- return { kind: "tabs", request: { action: "list", json } };
196
- if (action === "stop") {
197
- if (value === undefined)
198
- return fail("stop requires a tab id or --all.");
199
- if (extra !== undefined)
200
- return fail("stop accepts one tab id or --all.");
201
- if (value === "--all")
202
- return { kind: "tabs", request: { action: "stop-all", json } };
203
- if (value.startsWith("-"))
204
- return fail(`unknown option ${value}.`);
205
- return { kind: "tabs", request: { action: "stop", tabId: value, json } };
206
- }
207
- if (action === "host") {
208
- if (extra !== undefined || (value !== "status" && value !== "stop"))
209
- return fail("host accepts status or stop.");
210
- return { kind: "tabs", request: { action: value === "status" ? "host-status" : "host-stop", json } };
211
- }
212
- if (action === "doctor") {
213
- if (value !== undefined)
214
- return fail("doctor does not accept arguments.");
215
- return { kind: "tabs", request: { action: "doctor", json } };
216
- }
217
- if (action.startsWith("-"))
218
- return fail(`unknown option ${action}.`);
219
- return fail(`unknown subcommand ${action}; use list, stop, host, or doctor.`);
220
- }
221
134
  function parseSessionContext(rest) {
222
135
  const [action, value, extra] = rest;
223
136
  if (action === "link-worktree") {
@@ -1,4 +1,5 @@
1
1
  import { PRIMARY_SESSION_AGENT_ID, updateSessionRepositoryContext, } from "../features/launch/index.js";
2
+ import { inspectLiveProcess } from "../foundation/lifecycle/index.js";
2
3
  import { PRODUCT_IDENTITY, PRODUCT_TEXT } from "../product-identity.js";
3
4
  /** Apply repository context only when invoked by an exact live A1 shell-tool runtime. */
4
5
  export async function runSessionContextCommand(request, options = {}) {
@@ -11,9 +12,7 @@ export async function runSessionContextCommand(request, options = {}) {
11
12
  return 2;
12
13
  }
13
14
  try {
14
- if (options.inspectProcess === undefined)
15
- throw Object.assign(new Error("native process identity inspection is unavailable"), { code: "process-inspection-unavailable" });
16
- const outcome = await updateSessionRepositoryContext({ sessionId: identity.sessionId, sessionFile: identity.sessionFile }, request, { runtimeId: identity.runtimeId, inspectProcess: options.inspectProcess });
15
+ const outcome = await updateSessionRepositoryContext({ sessionId: identity.sessionId, sessionFile: identity.sessionFile }, request, { runtimeId: identity.runtimeId, inspectProcess: options.inspectProcess ?? inspectLiveProcess });
17
16
  if (outcome.kind === "unlinked")
18
17
  stdout("Session worktree context cleared.\n");
19
18
  if (outcome.kind === "linked")
@@ -42,16 +41,15 @@ function readIdentity(environment) {
42
41
  return null;
43
42
  return { sessionId, sessionFile, runtimeId };
44
43
  }
45
- /** Known coordination failures must not expose native paths or another session's identity. */
44
+ /** Known coordination failures must not expose internal paths or another session's identity. */
46
45
  function recoveryDetail(code) {
47
46
  const details = {
48
47
  "worktree-claim-busy": "another mutation is still running; runtime registration retries automatically, so retry this link shortly",
49
48
  "worktree-legacy-recovery-required": "an older-format worktree lock requires safe recovery; stop all older A1 processes, move only session-worktree-claims/mutation.lock to a backup while stopped, then start the updated A1; keep all sessions and worktree claims",
50
- "worktree-coordination-unavailable": "native worktree coordination is unavailable; repair or update this A1 installation, then retry",
49
+ "worktree-coordination-unavailable": "worktree coordination is unavailable; repair or update this A1 installation, then retry",
51
50
  "worktree-coordination-io": "worktree coordination could not access its files; check A1 data-directory permissions and filesystem availability, then retry",
52
51
  "worktree-coordination-boundary": "unexpected worktree coordination entry; retain it for inspection, and do not delete the claim store",
53
- "process-inspection-unavailable": "native process inspection is unavailable; repair the A1 installation before retrying; no ownership was overridden",
54
- "session-runtime-unverifiable": "runtime identity could not be verified; check native process inspection and retry; no ownership was overridden",
52
+ "session-runtime-unverifiable": "runtime identity could not be verified; retry; no ownership was overridden",
55
53
  "session-runtime-unavailable": "this session has not registered yet; updated A1 retries registration automatically; retry shortly and follow any specific coordination error if it persists",
56
54
  "session-runtime-stopped": "this shell belongs to a stopped runtime; resume in a running A1 session before linking",
57
55
  "worktree-active-in-another-session": "another live agent owns this worktree; use a different worktree or wait for its owner to release it",