@timurproko/a1 0.2.7-dev.1249 → 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 (340) 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/diagnostics-state.d.ts +0 -1
  122. package/dist/integrations/pi/engine/diagnostics-state.js +0 -14
  123. package/dist/integrations/pi/engine/prompt-suggestions.d.ts +0 -1
  124. package/dist/integrations/pi/engine/prompt-suggestions.js +0 -40
  125. package/dist/integrations/pi/engine/session-runtime.js +0 -2
  126. package/dist/integrations/pi/engine/workflow-runner.js +1 -1
  127. package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -2
  128. package/dist/integrations/pi/tui-runtime/adapter.js +2 -2
  129. package/dist/product-identity.d.ts +4 -6
  130. package/dist/product-identity.js +6 -11
  131. package/dist/product-identity.json +1 -40
  132. package/dist/runtime-payload-inventory.json +0 -3
  133. package/dist/ui/components/index.d.ts +2 -2
  134. package/dist/ui/components/index.js +1 -1
  135. package/dist/ui/components/submitted-prompt.d.ts +3 -13
  136. package/dist/ui/components/submitted-prompt.js +8 -41
  137. package/dist/ui/components/transcript-viewport.d.ts +1 -3
  138. package/dist/ui/components/transcript-viewport.js +1 -4
  139. package/dist/ui/settings/declarations.d.ts +3 -97
  140. package/dist/ui/settings/declarations.js +3 -78
  141. package/dist/ui/settings/migrations.js +18 -2
  142. package/docs/architecture/boundaries.md +22 -39
  143. package/docs/architecture/code-documentation.md +2 -2
  144. package/docs/architecture/internal-naming.md +9 -17
  145. package/docs/architecture/project-structure.md +9 -14
  146. package/docs/architecture/resource-and-data-policy.md +16 -31
  147. package/docs/architecture/toolchain.md +14 -19
  148. package/docs/architecture/ui-reference-provenance.md +2 -2
  149. package/docs/ci-release-runbook.md +5 -5
  150. package/docs/features/launch-profiles.md +11 -17
  151. package/docs/features/prompt-history.md +10 -11
  152. package/docs/local-worktree-cleanup.md +28 -1
  153. package/docs/manual-owned-ui-checkpoint.md +0 -1
  154. package/docs/validation.md +5 -11
  155. package/docs/worktree-link-recovery.md +6 -6
  156. package/package.json +7 -19
  157. package/bin/guardian.js +0 -42
  158. package/bin/supervisor.js +0 -7
  159. package/bin/tab-launch-context.d.ts +0 -27
  160. package/bin/tab-launch-context.js +0 -94
  161. package/dist/app/session-shell/resident-tab-coordinator.d.ts +0 -38
  162. package/dist/app/session-shell/resident-tab-coordinator.js +0 -77
  163. package/dist/cli/tabs-request.d.ts +0 -7
  164. package/dist/cli/tabs-request.js +0 -1
  165. package/dist/cli/tabs.d.ts +0 -14
  166. package/dist/cli/tabs.js +0 -151
  167. package/dist/composition/resident-tab-bridge.d.ts +0 -41
  168. package/dist/composition/resident-tab-bridge.js +0 -209
  169. package/dist/composition/utility-tab.d.ts +0 -28
  170. package/dist/composition/utility-tab.js +0 -244
  171. package/dist/features/owned-ui/plus-menu-dialog.d.ts +0 -28
  172. package/dist/features/owned-ui/plus-menu-dialog.js +0 -89
  173. package/dist/features/resident-tab/auto-name.d.ts +0 -11
  174. package/dist/features/resident-tab/auto-name.js +0 -44
  175. package/dist/features/resident-tab/index.d.ts +0 -5
  176. package/dist/features/resident-tab/index.js +0 -7
  177. package/dist/features/resident-tab/shortcut-bindings-file.d.ts +0 -8
  178. package/dist/features/resident-tab/shortcut-bindings-file.js +0 -40
  179. package/dist/features/resident-tab/shortcut-declarations.d.ts +0 -13
  180. package/dist/features/resident-tab/shortcut-declarations.js +0 -26
  181. package/dist/features/resident-tab/shortcut-projection.d.ts +0 -29
  182. package/dist/features/resident-tab/shortcut-projection.js +0 -64
  183. package/dist/features/resident-tab/status-deriver.d.ts +0 -10
  184. package/dist/features/resident-tab/status-deriver.js +0 -12
  185. package/dist/foundation/launch-guardian/exit-watcher.d.ts +0 -14
  186. package/dist/foundation/launch-guardian/exit-watcher.js +0 -103
  187. package/dist/foundation/launch-guardian/index.d.ts +0 -2
  188. package/dist/foundation/launch-guardian/index.js +0 -1
  189. package/dist/foundation/launch-guardian/main.d.ts +0 -39
  190. package/dist/foundation/launch-guardian/main.js +0 -232
  191. package/dist/foundation/lifecycle/commands.d.ts +0 -40
  192. package/dist/foundation/lifecycle/commands.js +0 -1
  193. package/dist/foundation/lifecycle/launch-instance.d.ts +0 -46
  194. package/dist/foundation/lifecycle/launch-instance.js +0 -134
  195. package/dist/foundation/lifecycle/native-claim-gate.d.ts +0 -5
  196. package/dist/foundation/lifecycle/native-claim-gate.js +0 -41
  197. package/dist/foundation/lifecycle/supervisor-startup.d.ts +0 -30
  198. package/dist/foundation/lifecycle/supervisor-startup.js +0 -106
  199. package/dist/foundation/process-containment/addon-containment.d.ts +0 -20
  200. package/dist/foundation/process-containment/addon-containment.js +0 -139
  201. package/dist/foundation/process-containment/addon-process-inspector.d.ts +0 -11
  202. package/dist/foundation/process-containment/addon-process-inspector.js +0 -36
  203. package/dist/foundation/process-containment/addon.d.ts +0 -47
  204. package/dist/foundation/process-containment/addon.js +0 -57
  205. package/dist/foundation/process-containment/artifact.d.ts +0 -1
  206. package/dist/foundation/process-containment/artifact.js +0 -35
  207. package/dist/foundation/process-containment/contracts.d.ts +0 -33
  208. package/dist/foundation/process-containment/contracts.js +0 -35
  209. package/dist/foundation/process-containment/index.d.ts +0 -9
  210. package/dist/foundation/process-containment/index.js +0 -7
  211. package/dist/foundation/process-containment/linux-process-inspector.d.ts +0 -7
  212. package/dist/foundation/process-containment/linux-process-inspector.js +0 -27
  213. package/dist/foundation/process-containment/native-process-inspector.d.ts +0 -4
  214. package/dist/foundation/process-containment/native-process-inspector.js +0 -21
  215. package/dist/foundation/protocol/client.d.ts +0 -18
  216. package/dist/foundation/protocol/client.js +0 -130
  217. package/dist/foundation/protocol/index.d.ts +0 -3
  218. package/dist/foundation/protocol/index.js +0 -2
  219. package/dist/foundation/protocol/messages.d.ts +0 -90
  220. package/dist/foundation/protocol/messages.js +0 -100
  221. package/dist/foundation/release/cohort-selection.d.ts +0 -33
  222. package/dist/foundation/release/cohort-selection.js +0 -67
  223. package/dist/foundation/release/endpoint-lock.d.ts +0 -2
  224. package/dist/foundation/release/endpoint-lock.js +0 -37
  225. package/dist/foundation/release/endpoint-recovery.d.ts +0 -10
  226. package/dist/foundation/release/endpoint-recovery.js +0 -45
  227. package/dist/foundation/release/endpoints.d.ts +0 -32
  228. package/dist/foundation/release/endpoints.js +0 -152
  229. package/dist/foundation/release/prepared-update-activation.d.ts +0 -3
  230. package/dist/foundation/release/prepared-update-activation.js +0 -27
  231. package/dist/foundation/release/process-cleanup.d.ts +0 -14
  232. package/dist/foundation/release/process-cleanup.js +0 -76
  233. package/dist/foundation/release/supervisor-identity.d.ts +0 -15
  234. package/dist/foundation/release/supervisor-identity.js +0 -63
  235. package/dist/foundation/resident-tabs/boot-identity.d.ts +0 -6
  236. package/dist/foundation/resident-tabs/boot-identity.js +0 -16
  237. package/dist/foundation/resident-tabs/bounded-host-command.d.ts +0 -20
  238. package/dist/foundation/resident-tabs/bounded-host-command.js +0 -62
  239. package/dist/foundation/resident-tabs/bridge-client.d.ts +0 -73
  240. package/dist/foundation/resident-tabs/bridge-client.js +0 -327
  241. package/dist/foundation/resident-tabs/continuity.d.ts +0 -12
  242. package/dist/foundation/resident-tabs/continuity.js +0 -63
  243. package/dist/foundation/resident-tabs/doctor.d.ts +0 -28
  244. package/dist/foundation/resident-tabs/doctor.js +0 -166
  245. package/dist/foundation/resident-tabs/draft-checkpoint.d.ts +0 -27
  246. package/dist/foundation/resident-tabs/draft-checkpoint.js +0 -145
  247. package/dist/foundation/resident-tabs/ensure-terminal-host.d.ts +0 -36
  248. package/dist/foundation/resident-tabs/ensure-terminal-host.js +0 -151
  249. package/dist/foundation/resident-tabs/fault-injection.d.ts +0 -8
  250. package/dist/foundation/resident-tabs/fault-injection.js +0 -26
  251. package/dist/foundation/resident-tabs/fixture-control.d.ts +0 -7
  252. package/dist/foundation/resident-tabs/fixture-control.js +0 -35
  253. package/dist/foundation/resident-tabs/host-entry.d.ts +0 -1
  254. package/dist/foundation/resident-tabs/host-entry.js +0 -17
  255. package/dist/foundation/resident-tabs/index.d.ts +0 -15
  256. package/dist/foundation/resident-tabs/index.js +0 -10
  257. package/dist/foundation/resident-tabs/maintenance.d.ts +0 -39
  258. package/dist/foundation/resident-tabs/maintenance.js +0 -75
  259. package/dist/foundation/resident-tabs/progress-observation-schema.d.ts +0 -34
  260. package/dist/foundation/resident-tabs/progress-observation-schema.js +0 -1
  261. package/dist/foundation/resident-tabs/progress-observation.d.ts +0 -4
  262. package/dist/foundation/resident-tabs/progress-observation.js +0 -150
  263. package/dist/foundation/resident-tabs/prompt-journal.d.ts +0 -63
  264. package/dist/foundation/resident-tabs/prompt-journal.js +0 -213
  265. package/dist/foundation/resident-tabs/protocol.d.ts +0 -12
  266. package/dist/foundation/resident-tabs/protocol.js +0 -195
  267. package/dist/foundation/resident-tabs/recovery.d.ts +0 -26
  268. package/dist/foundation/resident-tabs/recovery.js +0 -205
  269. package/dist/foundation/resident-tabs/release-holds.d.ts +0 -28
  270. package/dist/foundation/resident-tabs/release-holds.js +0 -78
  271. package/dist/foundation/resident-tabs/routes.d.ts +0 -5
  272. package/dist/foundation/resident-tabs/routes.js +0 -5
  273. package/dist/foundation/resident-tabs/routing.d.ts +0 -11
  274. package/dist/foundation/resident-tabs/routing.js +0 -10
  275. package/dist/foundation/resident-tabs/runtime-control.d.ts +0 -38
  276. package/dist/foundation/resident-tabs/runtime-control.js +0 -74
  277. package/dist/foundation/resident-tabs/session-sync.d.ts +0 -14
  278. package/dist/foundation/resident-tabs/session-sync.js +0 -37
  279. package/dist/foundation/resident-tabs/settings.d.ts +0 -16
  280. package/dist/foundation/resident-tabs/settings.js +0 -60
  281. package/dist/foundation/resident-tabs/terminal-host-artifact.d.ts +0 -14
  282. package/dist/foundation/resident-tabs/terminal-host-artifact.js +0 -78
  283. package/dist/foundation/resident-tabs/zip-archive.d.ts +0 -9
  284. package/dist/foundation/resident-tabs/zip-archive.js +0 -56
  285. package/dist/foundation/storage/control-store.d.ts +0 -20
  286. package/dist/foundation/storage/control-store.js +0 -331
  287. package/dist/foundation/storage/index.d.ts +0 -1
  288. package/dist/foundation/storage/index.js +0 -1
  289. package/dist/foundation/supervision/index.d.ts +0 -3
  290. package/dist/foundation/supervision/index.js +0 -3
  291. package/dist/foundation/supervision/main.d.ts +0 -1
  292. package/dist/foundation/supervision/main.js +0 -86
  293. package/dist/foundation/supervision/paths.d.ts +0 -1
  294. package/dist/foundation/supervision/paths.js +0 -1
  295. package/dist/foundation/supervision/server.d.ts +0 -46
  296. package/dist/foundation/supervision/server.js +0 -611
  297. package/dist/integrations/pi/engine/offline-settings-port.d.ts +0 -23
  298. package/dist/integrations/pi/engine/offline-settings-port.js +0 -54
  299. package/dist/native/darwin-arm64/manifest.json +0 -23
  300. package/dist/native/darwin-arm64/process-guardian.node +0 -0
  301. package/dist/native/darwin-arm64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10500
  302. package/dist/native/darwin-arm64/terminal-host.manifest.json +0 -46
  303. package/dist/native/darwin-arm64/terminal-host.node +0 -0
  304. package/dist/native/darwin-x64/manifest.json +0 -23
  305. package/dist/native/darwin-x64/process-guardian.node +0 -0
  306. package/dist/native/darwin-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10737
  307. package/dist/native/darwin-x64/terminal-host.manifest.json +0 -46
  308. package/dist/native/darwin-x64/terminal-host.node +0 -0
  309. package/dist/native/linux-x64/manifest.json +0 -23
  310. package/dist/native/linux-x64/process-guardian.node +0 -0
  311. package/dist/native/linux-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -11226
  312. package/dist/native/linux-x64/terminal-host.manifest.json +0 -46
  313. package/dist/native/linux-x64/terminal-host.node +0 -0
  314. package/dist/native/win32-x64/manifest.json +0 -23
  315. package/dist/native/win32-x64/process-guardian.node +0 -0
  316. package/dist/native/win32-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10757
  317. package/dist/native/win32-x64/terminal-host.manifest.json +0 -46
  318. package/dist/native/win32-x64/terminal-host.node +0 -0
  319. package/docs/architecture/evidence/resident-tabs/linux-x64.md +0 -37
  320. package/docs/architecture/evidence/resident-tabs/macos-arm64.md +0 -36
  321. package/docs/architecture/evidence/resident-tabs/macos-x64.md +0 -35
  322. package/docs/architecture/evidence/resident-tabs/windows-x64.md +0 -36
  323. package/docs/architecture/evidence/terminal-host-spike/manual-one-pane-terminal-host.md +0 -70
  324. package/docs/architecture/evidence/terminal-host-spike/manual-two-by-two-basic-terminal-host.md +0 -32
  325. package/docs/architecture/evidence/terminal-host-spike/milestone-baseline.json +0 -115
  326. package/docs/architecture/evidence/terminal-host-spike/owned-ui-foundation-prerequisite.json +0 -48
  327. package/docs/architecture/evidence/terminal-host-spike/terminal-host-provenance.json +0 -125
  328. package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-1.json +0 -56
  329. package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-3.json +0 -174
  330. package/docs/architecture/evidence/terminal-host-spike/terminal-spike-acceptance-record.json +0 -18
  331. package/docs/architecture/native-fixture-isolation.md +0 -23
  332. package/docs/architecture/process-guardian-provenance.md +0 -36
  333. package/docs/architecture/resident-tabs-requirements.md +0 -18
  334. package/docs/architecture/resident-tabs.md +0 -668
  335. package/docs/architecture/terminal-host-proof-gate.md +0 -34
  336. package/docs/architecture/terminal-host-provenance.md +0 -81
  337. package/docs/architecture/terminal-host-spike-evidence.md +0 -39
  338. package/docs/launch-recovery.md +0 -23
  339. package/docs/manual-launch-instance-acceptance.md +0 -43
  340. package/docs/manual-resident-tabs-acceptance.md +0 -51
@@ -4,17 +4,13 @@
4
4
 
5
5
  | Command | Purpose | Pi user profile |
6
6
  |---|---|---|
7
- | `a1` | A1 | `~/.a1/agent` |
7
+ | `a1` | A1, one agent in this terminal | `~/.a1/agent` |
8
8
  | `a1 --session <path\|id>` | Resume a persisted A1 session | `~/.a1/agent` (or explicitly selected storage) |
9
- | `a1 solo` | Fresh A1 direct single-agent mode | `~/.a1/agent` |
10
- | `a1 solo --session <path\|id>` | Resume a persisted A1 session in direct single-agent mode | `~/.a1/agent` (or explicitly selected storage) |
11
9
  | `a1 pi` | Pi-compatible direct comparison surface using the ordinary Pi profile | ordinary `~/.pi/agent` |
12
10
 
13
- `a1 solo` is available in release and prerelease builds. Without arguments it starts a fresh single-agent session; with `--session` and optional `--session-dir` it resumes a saved session. Both forms omit the tab strip and the Tabs settings section.
14
-
15
11
  `a1 pi` is a development instrument for comparing A1 against pinned Pi. Prerelease builds — what `a1 update --develop` or `a1 update --develop <number>` installs — expose it. A release build does not recognize the launch form. Repository development can run the comparison directly with `npm start:pi`.
16
12
 
17
- There is no `a1 agent` command. The former `a1 ui` subcommand is removed. Unsupported commands return quietly without selecting another runtime. Bare `a1` is the normal A1 product surface.
13
+ There is no `a1 agent` command. The former `a1 ui` subcommand, the `a1 solo` launch word, and the `a1 tabs …` maintenance commands are removed; like any other unsupported command they return quietly without selecting another runtime. Bare `a1` is the normal A1 product surface.
18
14
 
19
15
  ## First launch
20
16
 
@@ -37,20 +33,18 @@ Run Pi’s normal `/login` independently in each profile that needs stored authe
37
33
 
38
34
  ## Resume a session
39
35
 
40
- After a conversation has been persisted, exit A1 and run the command it prints from the original project directory. Exited solo sessions print the solo form; tabbed A1 sessions keep the tabbed form:
36
+ After a conversation has been persisted, exit A1 and run the command it prints from the original project directory:
41
37
 
42
38
  ```sh
43
39
  a1 --session <id>
44
40
  a1 --session-dir '/path/to/session store' --session <id>
45
- a1 solo --session <id>
46
- a1 solo --session-dir '/path/to/session store' --session <id>
47
41
  ```
48
42
 
49
43
  `--session` also accepts a `.jsonl` file path; `--session-dir` may come before or after it. Explicit storage overrides `PI_CODING_AGENT_SESSION_DIR`, which overrides default storage. IDs are searched in the current project before other projects within the A1 store. A cross-project ID match asks before creating a fork with a new identity; an explicit file resumes directly using its stored working directory. Missing or invalid targets fail rather than create an empty replacement.
50
44
 
51
- Resume uses the shipped Pi's public restoration behavior, including the compaction format it writes. It sends no model prompt by itself and does not recover, convert, or modify an unrelated conversation. A tabbed selection opens in a new A1 tab or focuses the tab already holding it; a solo selection opens in the direct strip-free UI without starting the resident host. A live session remains protected by its single-writer lease. Pi picker/continue CLI aliases and `a1 pi --session` are not supported; in-UI `/resume` is unchanged.
45
+ Resume uses the shipped Pi's public restoration behavior, including the compaction format it writes. It sends no model prompt by itself and does not recover, convert, or modify an unrelated conversation. A session already open in another A1 process stays protected by the session writer guard, so A1 offers a fork instead of attaching to it. Pi picker/continue CLI aliases and `a1 pi --session` are not supported; in-UI `/resume` is unchanged.
52
46
 
53
- Regression evidence creates disposable sessions through Pi 0.84.2, then executes the emitted command through the packed public entry, bootstrap, guardian, and owned UI. Default/custom storage, Windows Git Bash quoting, supervisor restart, failure cleanup, and simultaneous distinct selections are covered in `test/foundation/release/session-resume.integration.test.ts`. CI runs it in the resource-sensitive `package-smoke` scope, not the fast remainder. Unsupported synthetic retained-tail certification is separate deferred work.
47
+ Regression evidence creates disposable sessions through the pinned Pi, then executes the emitted command through the packed public entry, bootstrap, and owned UI. Default/custom storage, Windows Git Bash quoting, an occupied session, failure cleanup, and simultaneous distinct selections are covered in `test/foundation/release/session-resume.integration.test.ts`. CI runs it in the resource-sensitive `package-smoke` scope, not the fast remainder. Unsupported synthetic retained-tail certification is separate deferred work.
54
48
 
55
49
  ## Pi comparison profile
56
50
 
@@ -58,14 +52,14 @@ Regression evidence creates disposable sessions through Pi 0.84.2, then executes
58
52
 
59
53
  ## Terminal behavior
60
54
 
61
- All interactive launch forms run the A1-owned full-viewport TUI over pinned Pi engine, component, and terminal APIs. Bare `a1` attaches to the native resident host; each tab runs the owned UI in a holder-owned pseudoterminal, while Node never relays or renders terminal bytes. `a1 solo` uses the direct owned path without resident infrastructure. `a1 pi` uses that same direct pipeline with A1-specific screens withheld.
55
+ All interactive launch forms run the A1-owned full-viewport TUI over pinned Pi engine, component, and terminal APIs. The installed `a1` command selects the approved active release and runs its UI as one directly attached child process with the terminal inherited; nothing relays or renders terminal bytes in between. `a1 pi` uses that same pipeline with A1-specific screens withheld.
62
56
 
63
- ## Concurrent instance lifecycle
57
+ ## Concurrent launches
64
58
 
65
- Each `a1 solo` or `a1 pi` invocation receives a unique non-detachable launch instance. Normal A1 clients instead attach to the profile's tab set, which can be viewed from concurrent terminals with explicit input-controller transfer. Profile files remain shared according to the selected profile root.
59
+ Every `a1` or `a1 pi` invocation is an independent process. Any number can run at once in different terminals; profile files remain shared according to the selected profile root, and the session writer guard keeps each session file to one writer.
66
60
 
67
- Normal exit or terminal closure tears down a solo/comparison launch instance within bounded graceful and forced deadlines. Closing or detaching a normal A1 client leaves its tabs running; a tab and its process tree stop only when the user explicitly closes that tab.
61
+ Quitting with `/quit` or `Ctrl+C` twice ends the agent and returns to the shell. Closing the terminal ends the agent too, as it does for upstream Pi. If the UI exits uncleanly, the launcher restores the terminal and prints the resume command.
68
62
 
69
- ## Recovery and comparison
63
+ ## Comparison and reporting
70
64
 
71
- If A1's normal mode cannot start, bare `a1` falls back to the direct path with one notice. To start single agent mode explicitly, run `a1 solo` from the same working directory. To compare against the pinned Pi profile, run `a1 pi`; its profile data is intentionally separate, so authentication or settings may need independent configuration. Use `a1 --version` to record the installed A1 release before reporting a difference.
65
+ To compare against the pinned Pi profile, run `a1 pi`; its profile data is intentionally separate, so authentication or settings may need independent configuration. Use `a1 --version` to record the installed A1 release before reporting a difference.
@@ -44,11 +44,11 @@ imported automatically.
44
44
  The default uses A1's effective profile home: `A1_PROFILE_HOME` when set, otherwise
45
45
  the operating-system home. A custom agent-profile directory changes the history
46
46
  identity, not this default root. `A1_DATA_DIR` takes precedence for storage;
47
- `XDG_DATA_HOME` does not redirect default history. Control metadata, settings,
47
+ `XDG_DATA_HOME` does not redirect default history. Release state, settings,
48
48
  agent resources, releases, logs, runtime files, and caches keep their existing
49
49
  locations. For repository-local `./scripts/dev` launches, history uses a stable
50
- checkout-wide data root so two independent solo instances share the selected
51
- Shared database, while control and runtime data remain isolated per launch.
50
+ checkout-wide data root so two independent instances share the selected
51
+ Shared database, while release and runtime data remain isolated per launch.
52
52
  The development-only `A1_DEV_HISTORY_DATA_DIR` selects that root; an explicit
53
53
  `A1_DATA_DIR` still overrides its launcher default. Existing histories in old
54
54
  per-instance development roots are not moved or combined.
@@ -62,14 +62,14 @@ Old and new releases using different roots do not synchronize history.
62
62
  In Shared mode the filename is the original `a1-` SHA-256 profile identity,
63
63
  independent of project, session, checkout, and release. In Unique mode (the
64
64
  default), a domain-separated digest also includes the stable conversation session
65
- ID; two solo launches or resident tabs therefore use different databases and
65
+ ID; two concurrent launches therefore use different databases and
66
66
  image sidecars. Resuming the same session reuses its store; starting or forking a
67
67
  session selects a different one. Windows ordinary case and separator variants
68
68
  normalize together. Moving a profile, unresolved symlink aliases, or selecting a
69
69
  different data root can select a different history; A1 never silently merges or
70
70
  imports it.
71
71
 
72
- The database is separate from `control.sqlite3`, agent resources, and disposable
72
+ The database is separate from release state, agent resources, and disposable
73
73
  caches. Upgrades, ordinary npm uninstall/reinstall, release rollback, cache cleanup,
74
74
  and conversation deletion do not clear it. Reusing saved history requires the
75
75
  same profile and history root; explicitly deleting user data still removes it.
@@ -91,9 +91,9 @@ The History section in `/settings` provides:
91
91
  storage and durable recall for subsequent launches, not current-session
92
92
  recovery. Existing enabled instances keep running until closed.
93
93
  - **History scope:** Unique (default) keeps each agent session's durable prompts
94
- separate across solo launches and resident tabs. Shared restores the former
95
- profile-wide store. Switching applies to running agents, including other solo
96
- processes and resident tabs, when their shared settings update arrives. New
94
+ separate across concurrent launches. Shared restores the former
95
+ profile-wide store. Switching applies to running agents, including other A1
96
+ processes, when their shared settings update arrives. New
97
97
  prompts use the newly selected store; already-submitted writes finish in their
98
98
  original store. Switching never transfers or deletes records, and it preserves
99
99
  unsent drafts. Existing profiles without this setting default to Unique, so
@@ -145,9 +145,8 @@ Build the checkout, then launch it through `./scripts/dev`. Use an isolated
145
145
  `A1_DATA_DIR` for disposable history checks; keep that same directory on each
146
146
  restart and in both concurrent terminals. The development launcher always sets
147
147
  an isolated `A1_DATA_DIR`; to try the home-based location in that launcher,
148
- explicitly select `A1_DATA_DIR=<effective-home>/.a1/data` and keep
149
- `A1_DATABASE_PATH` in a separate disposable directory so control metadata is not
150
- placed beside history. For a history-only review, `NODE_DISABLE_COMPILE_CACHE=1`
148
+ explicitly select `A1_DATA_DIR=<effective-home>/.a1/data` in a disposable
149
+ profile home. For a history-only review, `NODE_DISABLE_COMPILE_CACHE=1`
151
150
  also avoids creating compile-cache files under that explicitly overridden root.
152
151
  The focused path/composition tests cover normal no-override selection. Test:
153
152
 
@@ -99,6 +99,32 @@ node scripts/governance/local-worktree-cleanup.mjs discard \
99
99
 
100
100
  An open, merged, reopened, forked, protected, reserved, advanced, dirty, active, linked, nested, replaced, current, or unverifiable candidate remains blocking. Remote deletion followed by a Windows lock or later local blocker is reported as `partial`; the journal preserves the remaining worktree/local ref for the same exact confirmed command to inspect and resume. The command never scans by age or name, adopts another session's checkout, enables queue/watch, or turns PR close events into automatic discard authority.
101
101
 
102
+ ### Closed-unmerged branch without a checkout
103
+
104
+ Use the same explicitly confirmed `discard` operation with `--branch` instead of `--path` when the checkout is already gone and no live cleanup registration owns the ref. The selectors are mutually exclusive:
105
+
106
+ ```bash
107
+ cd /d/Git/a1 && node scripts/governance/local-worktree-cleanup.mjs discard --repo D:/Git/a1 --branch feature/rejected-example --change rejected-example --pr 123 --confirm-closed-unmerged
108
+ ```
109
+
110
+ Branch mode verifies the named same-repository PR is still closed-unmerged into `develop`, its implementation association matches the requested change, no other open PR uses the branch, no Git worktree has it checked out, and no nonterminal registration owns the ref. Protected/reserved refs, advanced local or remote tips, malformed evidence, conflicting journals, and scoped lock contention block. It never creates a checkout, invents a filesystem identity, deletes a directory, or adopts a worktree.
111
+
112
+ A branch-scoped `branch-discard-<ref-digest>.json` journal beside the ordinary cleanup state pins the repository, exact ref, change, PR, expected head, and deletion step without changing existing worktree records. After local preflight, the command journals intent, revalidates live evidence, expected-head deletes only the remote ref, verifies remote absence, and compare-and-deletes the unchanged local ref. Absent refs support resumption. Repeated completed requests report `already-discarded` only while both refs remain absent; a recreated ref is retained as `discard-ref-recreated`. Command reports, not the worktree-only registration list, describe this branch-scoped state. Sweep and queue never invoke branch-only discard.
113
+
114
+ ## Explicit disposable-link remediation
115
+
116
+ Ordinary completion and sweep still refuse external descendant links. For one released, eligible merged candidate, a separately confirmed `unlink-disposable-link` operation can remove one explicitly named ignored descendant link beneath a central disposable root without admitting its external target into purge:
117
+
118
+ ```bash
119
+ cd /d/Git/a1 && node scripts/governance/local-worktree-cleanup.mjs unlink-disposable-link --repo D:/Git/a1 --path D:/Git/a1/.worktrees/example-task --change example-task --pr 123 --link .artifacts/agent/shared-node-modules --confirm-link-only
120
+ ```
121
+
122
+ The command requires the existing released registration, exact candidate/change/PR, accepted HEAD ancestry, eligible merged/archive evidence, absent remote topic ref, and clean local content except for that one named link. Invoke it from primary, with no known conflicting editor, using integrated repository policy. Owned, current, replaced, dirty, ineligible, unregistered, or resource-busy candidates remain blocked. Other unsafe links remain blockers; no wildcard or bulk-link option exists.
123
+
124
+ Only a relative slash-separated path strictly below a central disposable root is accepted. The path must be ignored and untracked, its parents must be real non-link directories inside the canonical worktree, and its final entry must be a resolvable symlink or junction with a target outside that worktree. Internally targeted links remain on the ordinary generated-content path and are rejected by this no-target-enumeration operation. Escapes, root substitutions, ordinary files/directories, cycles, Git-metadata targets, identity/target/parent drift, and locked links block. The command revalidates candidate authority, full local content, ancestor identities, link fingerprint, and target before every bounded non-recursive unlink attempt, including Windows junction fallback. It never enumerates, traverses, modifies, or removes the target.
125
+
126
+ An `unlinked` report records the candidate and removed link identity without target contents. The worktree and its released registration remain intact; a later ordinary `complete` or sweep must independently repeat every normal gate. The operation enables nothing, deletes no ref, does not grant ongoing link-removal authority, and cannot repair locked leftover directories. A missing selected link reports a named blocker rather than fabricating prior success.
127
+
102
128
  ## Explicit redundant no-PR retirement
103
129
 
104
130
  A non-empty unregistered checkout is never adopted by sweep, preview, queue/watch, branch pruning, age, or ancestry. After the maintainer explicitly authorizes one exact redundant checkout, use the repository-owned operation from the primary checkout:
@@ -170,7 +196,7 @@ Registration binds the repository, exact directory/filesystem identity, candidat
170
196
 
171
197
  A CI/base/older-ancestor checkout does not qualify automatically. Version 3 has no local acceptance/archive checkout to register. No local archive checkout is required when a legacy archive was generated entirely on GitHub. Legacy version-1/version-2 linkage remains supported, but individually reviewing and registering a legacy checkout is explicit adoption, not a bulk sweep.
172
198
 
173
- Low-level `register` keeps an explicit disposable allowlist for legacy and diagnostic use. The standard `complete` command supplies the central repository policy automatically; agents do not choose flags for normal completed-delivery cleanup. Neither route permits discarding tracked, staged, unstaged, untracked, unknown ignored, unapproved linked, special, or actual nested repository/submodule content. The sole link exception is the guarded exact-root or contained descendant behavior above. Declaring or centrally recognizing a generated directory does not bypass ignored-path, identity, type, or traversal checks.
199
+ Low-level `register` keeps an explicit disposable allowlist for legacy and diagnostic use. The standard `complete` command supplies the central repository policy automatically; agents do not choose flags for normal completed-delivery cleanup. Neither route permits discarding tracked, staged, unstaged, untracked, unknown ignored, unapproved linked, special, or actual nested repository/submodule content. Automatic purge admits only the guarded exact-root or contained descendant behavior above. Separately confirmed named-link remediation removes only its exact link entry and never widens purge authority. Declaring or centrally recognizing a generated directory does not bypass ignored-path, identity, type, or traversal checks.
174
200
 
175
201
  Before handing a completed checkout to cleanup, stop its development processes, leave its directory, and release it using the returned ID and current generation:
176
202
 
@@ -214,6 +240,7 @@ State, journals, stop controls, and execution reports live in `<git-common-dir>/
214
240
  - `blocked`: ownership, content, path, provenance, authentication, or identity needs attention.
215
241
  - `unmanaged`: no local registration; no automatic adoption. Reason `empty-directory-recent` marks an all-empty folder still inside its ten-minute grace, and in preview `empty-directory` marks one an execution pass would remove.
216
242
  - `removed`: worktree and eligible local-ref operations were verified.
243
+ - `unlinked`: only the explicitly named disposable link entry was removed; its target, worktree, and released registration were preserved.
217
244
  - `already-absent`: a completed journal's path/ref are still absent.
218
245
  - `retired`: either evidence was unverifiable but nothing remained to delete and the merged PR registration completed with `retired-nothing-left`, or an exact confirmed `retire-redundant` operation safely removed its no-PR checkout and local ref.
219
246
  - `forgotten`: the maintainer explicitly closed an all-absent entry with `forget`.
@@ -22,7 +22,6 @@ $manualRoot = (Resolve-Path ".artifacts/manual-owned-ui").Path
22
22
  $env:A1_CONFIG_DIR = "$manualRoot\state\config"
23
23
  $env:A1_DATA_DIR = "$manualRoot\state\data"
24
24
  $env:A1_RUNTIME_DIR = "$manualRoot\state\runtime"
25
- $env:A1_DATABASE_PATH = "$manualRoot\state\data\control.sqlite3"
26
25
  ```
27
26
 
28
27
  Run each installed launch form yourself:
@@ -6,7 +6,7 @@ Development validation computes one exact base/head selection with:
6
6
  npm run select:validation-impact -- --base <full-base-sha> --head <full-head-sha> --output .artifacts/validation/impact.json
7
7
  ```
8
8
 
9
- The versioned `config/validation-ownership.json` registry maps stable product and test path groups to a mandatory PR core, an explicit critical floor per owner, changed and bounded transitive consumers, resource-sensitive tests, and integration owners. The coarse owners are UI/rendering, launch/startup, release/package/update, Pi, native containment, image/history, governance, and shared product inputs. Each integration owner in `config/integration-owners.json` declares `pull-request`, `direct-impact`, or `exhaustive` cadence. A changed pull-request test selects its owner; a changed exhaustive test selects focused deterministic contracts and records the exhaustive owner as cadence-deferred. Shared support selects every declared PR consumer and records affected exhaustive consumers; copies, renames, and deletions inspect both identities. Reasons and changed paths are recorded in `impact.json`.
9
+ The versioned `config/validation-ownership.json` registry maps stable product and test path groups to a mandatory PR core, an explicit critical floor per owner, changed and bounded transitive consumers, resource-sensitive tests, and integration owners. The coarse owners are UI/rendering, launch/startup, release/package/update, Pi, image/history, governance, and shared product inputs. Each integration owner in `config/integration-owners.json` declares `pull-request`, `direct-impact`, or `exhaustive` cadence. A changed pull-request test selects its owner; a changed exhaustive test selects focused deterministic contracts and records the exhaustive owner as cadence-deferred. Shared support selects every declared PR consumer and records affected exhaustive consumers; copies, renames, and deletions inspect both identities. Reasons and changed paths are recorded in `impact.json`.
10
10
 
11
11
  Reviewed `refinements` can narrow a coarse owner's tests and integration links for known subareas: scrollbar/settings, clipboard/editor/repository commands, documentation/cleanup/delivery governance, and development-environment tooling. Each rule keeps an explicit minimum test set; a bounded relative-import graph across `test/`, `src/`, `scripts/`, and `bin/` adds at most 24 sorted transitive consumers per changed path, including consumers outside the coarse owner, and integration owners of those retained consumers. The graph is supplemental, not sole coverage authority. Unreviewed or absent source identities and an unavailable graph retain the coarse owner. Changed tests, shared support, and mixed source/support changes retain their coarse contracts; rename and deletion classification still includes both identities. Some UI changes deliberately select more tests than before because the graph exposes formerly missed shell consumers.
12
12
 
@@ -40,7 +40,7 @@ Do not run preflight, `test:fast`, `test:full`, `test:release`, or directory-wid
40
40
  npm run preflight # pull-request validation's fast gates on the committed head
41
41
  ```
42
42
 
43
- Preflight selects the committed merge-base diff with `origin/develop` exactly as validation does (uncommitted paths are reported, not checked), writes it to `.artifacts/validation/local-impact.json`, and stops at the first failure. It runs the core job's install build and receipt, `typecheck`, `check:architecture`, changed-file code documentation, release documentation, changed-file naming, docs governance, strict OpenSpec validation with the workflow's pinned validator, the delivery-guidance test, and the core job's `pr-core-tests` and `pr-selected-tests` scopes. Each step invokes the script and arguments its workflow job runs, so a failure reports the same rule identifier and path. It never builds the native host, does not run resource-sensitive or integration owners, and CI remains the authority.
43
+ Preflight selects the committed merge-base diff with `origin/develop` exactly as validation does (uncommitted paths are reported, not checked), writes it to `.artifacts/validation/local-impact.json`, and stops at the first failure. It runs the core job's install build and receipt, `typecheck`, `check:architecture`, changed-file code documentation, release documentation, changed-file naming, docs governance, strict OpenSpec validation with the workflow's pinned validator, the delivery-guidance test, and the core job's `pr-core-tests` and `pr-selected-tests` scopes. Each step invokes the script and arguments its workflow job runs, so a failure reports the same rule identifier and path. It does not run resource-sensitive or integration owners, and CI remains the authority.
44
44
 
45
45
  `test:pr-core` is not a replacement for `test:fast`: CI combines it with directly changed and coarse-owner tests from the exact impact selection. Selected resource-sensitive tests run independently on an isolated Windows runner. Selected package, startup, rendering, Pi, compatibility, and platform owners also run independently after their actual prerequisites.
46
46
 
@@ -50,13 +50,7 @@ Conservative Development retains every critical owner floor and the small set of
50
50
  node scripts/release/generate-validation-ownership-ledger.mjs --output .artifacts/validation/ownership-ledger.json
51
51
  ```
52
52
 
53
- Containment-selected modular jobs build and test the debug `process-guardian.node` addon for their exact platform, export `A1_PROCESS_GUARDIAN_PATH` to that file, and run the launch-owner integration fixtures as Node processes. The tests exercise the real addon-held Windows job or Unix process group, addon-backed identity and terminal operations, and the Node exit watcher; no fixture invokes a process-guardian executable. The Windows startup lane keeps Defender real-time protection enabled while packaged startup loads the release addon.
54
-
55
- The `terminal-host` owner is CI-only. A change under `native/terminal-host/` or to its run scripts selects, per platform (Windows x64, Linux x64, macOS arm64), one **Native terminal host** job and three **Native terminal host tests** partition jobs. The partition jobs each build the test profile and run one third of the serialized `role_integration` suite (`run-terminal-host-probe.mjs --partition <i>/3`, partitioned by sorted test name read from the suite's source) and nothing else; the crate's unit tests run once, in the build-and-probe job, rather than once per partition. The feature-gated `role-host` binary stands in only for the fixed role grammar inside Rust integration tests and is never packaged. The build-and-probe job runs `npm run test:terminal-host` with the role suite skipped (`TERMINAL_HOST_PARTITION=none`), which runs the `--lib --bins` unit tests and the `release_isolation` integration test, building `terminal-host.node` with Rust, Node-API 9, and Zig 0.15.2 for the lane's exact target and baseline CPU model. It loads the addon for its version and non-interactive probes, verifies the shared session-writer lock export, and uploads the debug addon and frozen protocol manifest; Linux also runs bounded decoder fuzzing with a `cargo-fuzz` binary restored from an exact version-and-nightly cache when one exists.
56
-
57
- Candidate-packing lanes need the release terminal host but not its toolchain when an exact-input cache entry exists: they restore the addon, manifest, and notices, re-record the manifest's `host-entry.js` digest from the current build with `build-terminal-host.mjs --reuse`, and verify the result with `verify-native-artifacts.mjs --local` before recording the build receipt. See the Development cadence section of [`ci-release-runbook.md`](ci-release-runbook.md).
58
-
59
- The protected aggregate requires every partition of every selected platform, keyed by `partition` in the outcome authority and job envelope. Because the role suite no longer warms the resident launch paths in the build-and-probe job, its certification step runs one unmeasured `measure-resident-tabs.mjs` pass before the measured pass whose budgets are unchanged. Fidelity, latency, chaos, and certification start roles as `process.execPath dist/foundation/resident-tabs/host-entry.js` with `A1_TERMINAL_HOST_PATH` naming the addon. Windows cleanup identifies those Node-hosted residents by command line; it never kills every `node.exe` by image name. Locally, `npm run test:terminal-host` without a partition is unchanged and runs everything in one process. Local Windows builds fail in `build.rs` unless `TERMINAL_HOST_LOCAL_BUILD=1` is set, because Zig's package fetch unpacks test data that workstation antivirus quarantines. Native lanes also publish the terminal library they linked; a local build can link it instead of running Zig (see Local native iteration in [`architecture/resident-tabs.md`](architecture/resident-tabs.md)), which is development evidence only and never replaces selected CI. `TERMINAL_HOST_CONTRACTS_ONLY=1` is a library-only diagnostic and cannot substitute for selected CI. See [`native/terminal-host/README.md`](../native/terminal-host/README.md).
53
+ The repository has no native code, so no validation lane builds, caches, or certifies a native artifact; every lane builds the TypeScript product with `npm run build` and tests it as JavaScript. The Windows startup lane keeps Defender real-time protection enabled while it measures packaged startup.
60
54
 
61
55
  ## Coverage-preserving efficiency
62
56
 
@@ -96,7 +90,7 @@ For GitHub's explicit **re-run failed jobs** action, a successful job that GitHu
96
90
 
97
91
  Checkout-bound type, architecture, governance, unit, and smoke outcomes bind head/run/selection/scope authority without inventing package identity. Build and package receipts remain mandatory wherever validation consumes emitted or packed bytes: package, startup, update, compatibility, preview, release, and publication boundaries.
98
92
 
99
- A build receipt binds checkout head, complete build inputs, toolchain, emitted files, and native artifacts. A package receipt additionally binds exact tarball bytes, packed entries, manifest/bin identity, producer, and verified build/source authority. `VALIDATION_BUILD_READY` and `VALIDATION_CANDIDATE_TARBALL` only locate prerequisites; stale or tampered receipts cause fresh preparation or failure.
93
+ A build receipt binds checkout head, complete build inputs, toolchain, and emitted files. A package receipt additionally binds exact tarball bytes, packed entries, manifest/bin identity, producer, and verified build/source authority. `VALIDATION_BUILD_READY` and `VALIDATION_CANDIDATE_TARBALL` only locate prerequisites; stale or tampered receipts cause fresh preparation or failure.
100
94
 
101
95
  Npm download bytes may be reused with integrity checks and `--prefer-offline`, with normal network fallback. Every installation prefix remains fresh. Installed package trees, dependency certification, startup/profile state, mutable fixture repositories, passing outcomes, and publication evidence are never restored from caches.
102
96
 
@@ -143,7 +137,7 @@ Download these artifacts from the exact workflow run:
143
137
  - `development-validation-impact`: base/head, global selection identity, PR-core tests, selected pull-request owners, cadence-deferred exhaustive owners, exclusions, and bounded reasons.
144
138
  - `development-validation-outcome-<job>-<platform>-node<node>-attempt-<attempt>`: attempt-qualified outcome, content-free envelope, per-scope authority and duration, and applicable exact-artifact evidence.
145
139
  - `development-validation-aggregate-<head>-<run>-<attempt>`: selected/deferred owners, accepted/reused attempts, evidence count, runner critical path, total runner time, aggregate processing, setup/gate/scope time, cache state, and invocation count.
146
- - `pr-full-regression-selection-<run>-<attempt>` plus `complete-regression-aggregate-<run>-<attempt>`: current PR/head/base/metadata selection identity and all four exact-run native lane envelopes. Missing, mismatched, stale, failed, cancelled, or unexpected skip evidence blocks the protected aggregate. It reports the eight-minute critical-path and five-minute individual-scope targets as met or unmet; hosted queue delay is not test execution and remains separate.
140
+ - `pr-full-regression-selection-<run>-<attempt>` plus `complete-regression-aggregate-<run>-<attempt>`: current PR/head/base/metadata selection identity and all four exact-run platform lane envelopes. Missing, mismatched, stale, failed, cancelled, or unexpected skip evidence blocks the protected aggregate. It reports the eight-minute critical-path and five-minute individual-scope targets as met or unmet; hosted queue delay is not test execution and remains separate.
147
141
  - startup/resume phase JSONL and performance JSON: first-attempt launch evidence and retained failed setup/readiness records.
148
142
 
149
143
  For selected implementation candidates, record focused and pre-finalization full observations before finalization. Keep final head/run/selection identity in Actions and handoff rather than adding a post-success commit that invalidates that evidence. A successful selected PR run replaces an additional mandatory dispatch; standalone runs remain diagnostic, and numbered-package nightly recovery remains independent.
@@ -4,9 +4,9 @@ A1 coordinates worktree-claim mutations separately from the editing claims thems
4
4
 
5
5
  ## Automatic recovery
6
6
 
7
- Updated A1 holds an OS lock on the persistent `session-worktree-claims/mutation.authority` file. The OS releases it when the process exits, including a crash. `mutation.lock` is now a persistent directory that blocks older file-lock writers; its `owner.json` is only diagnostic metadata.
7
+ Updated A1 holds a `proper-lockfile` gate, the `mutation.authority.gate` lock directory beside the persistent `session-worktree-claims/mutation.authority` file, for each mutation. The holder refreshes it while working; a gate left by a crashed or stalled process becomes stale after 10 seconds and the next mutation reclaims it. `mutation.lock` is a persistent directory that blocks older file-lock writers; its `owner.json` is only diagnostic metadata.
8
8
 
9
- The next mutation safely recovers abandoned owner/pending metadata after taking native authority. Empty, truncated, NUL-filled, or otherwise malformed metadata does not prevent this recovery. One bounded `recovery.json` records the recovery reason/time, not the original bytes or session contents. A live native holder remains protected. Acquisition waits at most two seconds by default and honors cancellation.
9
+ The next mutation safely recovers abandoned owner/pending metadata after taking the gate. Empty, truncated, NUL-filled, or otherwise malformed metadata does not prevent this recovery. One bounded `recovery.json` records the recovery reason/time, not the original bytes or session contents. A live gate holder remains protected. Acquisition waits at most two seconds by default and honors cancellation.
10
10
 
11
11
  If startup registration fails temporarily, the running session retries on its 30-second refresh interval. Slow attempts are coalesced rather than queued indefinitely. Once registration succeeds, retry the explicit worktree link in the same session. Switching an agent's session replaces its publication identity, and disposal drains publication before releasing claims.
12
12
 
@@ -18,19 +18,19 @@ An existing regular-file `mutation.lock` belongs to the old protocol. Updated A1
18
18
 
19
19
  For this one-time legacy case, stop all older A1 processes normally, move only that exact regular lock file to a backup while they are stopped, then start updated A1. Keep sessions, runtime records, associations, editing claims, Git locks, and worktrees. Reinstalling/downgrading alone does not clear persisted legacy state. Never move the new directory or delete `mutation.authority` while A1 is running.
20
20
 
21
- When the old gate is absent, updated A1 initializes its compatibility barrier automatically. Older versions cannot mutate worktree claims after this point: all participating sessions must use the updated version. This intentionally prevents two incompatible mutation protocols from running concurrently. The installed native addon must support the new gate; there is no unsafe PID-file fallback if the addon is missing or outdated.
21
+ When the old gate is absent, updated A1 initializes its compatibility barrier automatically. Older versions cannot mutate worktree claims after this point: all participating sessions must use the updated version. This intentionally prevents two incompatible mutation protocols from running concurrently.
22
22
 
23
23
  ## Diagnostics
24
24
 
25
25
  | Code | Meaning / next step |
26
26
  | --- | --- |
27
- | `worktree-claim-busy` | A mutation still holds native authority. Retry the link shortly; runtime registration retries automatically. |
27
+ | `worktree-claim-busy` | A mutation still holds the gate. Retry the link shortly; runtime registration retries automatically. |
28
28
  | `worktree-legacy-recovery-required` | Retained old-format gate. Use the stopped-process legacy procedure above. |
29
- | `worktree-coordination-unavailable` | Missing or outdated native support. Repair/update the A1 installation. |
29
+ | `worktree-coordination-unavailable` | The installation cannot coordinate worktree claims. Repair/update the A1 installation. |
30
30
  | `worktree-coordination-io` | Gate/metadata filesystem access failed. Check permissions and storage availability. |
31
31
  | `worktree-coordination-boundary` | Unexpected file type, link, or entry. Retain it for inspection; do not clear the store. |
32
32
  | `session-runtime-unavailable` | Runtime registration has not succeeded. Retry after the next refresh and address any specific coordination failure. |
33
- | `process-inspection-unavailable` / `session-runtime-unverifiable` | Exact process identity cannot be checked. Repair inspection support; no ownership takeover is authorized. |
33
+ | `session-runtime-unverifiable` | The runtime's recorded process cannot be checked. Retry; no ownership takeover is authorized. |
34
34
  | `worktree-active-in-another-session` | Another live agent owns the target. Use a different worktree or have that owner release it. |
35
35
  | `worktree-owner-unverifiable` | The editing claim itself is uncertain. Gate recovery cannot make that claim available. |
36
36
 
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "name": "@timurproko/a1",
3
- "version": "0.2.7-dev.1249",
4
- "description": "Standalone terminal workspace for supervised native and managed agents",
3
+ "version": "0.2.7-dev.1252",
4
+ "description": "Standalone single-agent terminal UI on pinned Pi",
5
5
  "type": "module",
6
6
  "privateLaunchContract": "neutral-launch-v1",
7
7
  "updateActivationContracts": [
8
8
  "activate-v1"
9
9
  ],
10
- "residentControlContracts": [
11
- "resident-control-v1",
12
- "resident-workspace-v1"
13
- ],
14
10
  "updateCommandContracts": [
15
11
  "update-release-v1"
16
12
  ],
@@ -32,12 +28,10 @@
32
28
  "clean": "node scripts/clean.mjs",
33
29
  "build": "node scripts/development/run-build.mjs",
34
30
  "build:core": "node scripts/development/run-build.mjs --core",
35
- "build:managed": "npm run clean && tsc -p tsconfig.build.json && node scripts/release/generate-release-notes-resource.mjs && node scripts/pi/build-pi-settings-metadata.mjs && node scripts/pi/build-startup-public.mjs && node scripts/development/build-process-guardian.mjs",
36
- "build:process-guardian": "node scripts/development/build-process-guardian.mjs",
37
- "build:terminal-host": "node scripts/development/build-terminal-host.mjs",
31
+ "build:managed": "npm run clean && tsc -p tsconfig.build.json && node scripts/release/generate-release-notes-resource.mjs && node scripts/pi/build-pi-settings-metadata.mjs && node scripts/pi/build-startup-public.mjs",
38
32
  "typecheck": "tsgo -p tsconfig.json --noEmit && tsgo -p tsconfig.bin.json",
39
- "check:local": "npm run typecheck && npm run check:architecture && npm run check:names && vitest run test/repository-governance/native-ci-workflows.test.ts",
40
- "check:architecture": "node scripts/governance/check-architecture.mjs && node scripts/governance/check-session-writer-guard.mjs && node scripts/governance/check-product-identity-boundaries.mjs && node scripts/governance/check-package-identity.mjs && node scripts/governance/check-pinned-pi-source-ledger.mjs && node scripts/governance/check-terminal-host-provenance.mjs",
33
+ "check:local": "npm run typecheck && npm run check:architecture && npm run check:names",
34
+ "check:architecture": "node scripts/governance/check-architecture.mjs && node scripts/governance/check-session-writer-guard.mjs && node scripts/governance/check-product-identity-boundaries.mjs && node scripts/governance/check-package-identity.mjs && node scripts/governance/check-pinned-pi-source-ledger.mjs",
41
35
  "preflight": "node scripts/development/run-preflight.mjs",
42
36
  "check:names": "node scripts/governance/product-identifier-policy.mjs --check",
43
37
  "check:names:changed": "node scripts/governance/product-identifier-policy.mjs --check --selection .artifacts/validation/impact.json",
@@ -60,9 +54,6 @@
60
54
  "test:scope": "node scripts/release/run-validation-tier.mjs",
61
55
  "test:full": "node scripts/release/run-validation-tier.mjs full-release",
62
56
  "test:release": "node scripts/release/run-release-gates.mjs",
63
- "test:terminal-host": "node scripts/development/run-terminal-host-probe.mjs",
64
- "test:resident-parallel-progress": "node scripts/development/verify-resident-parallel-progress.mjs",
65
- "test:resident-chaos": "node scripts/development/run-resident-chaos.mjs --build",
66
57
  "test:pi-engine-conformance": "vitest run test/integrations/pi/engine/conformance.test.ts test/integrations/pi/engine/runtime-integration.test.ts test/integrations/pi/engine/session-integration.test.ts",
67
58
  "report:pi-engine-conformance": "npm run build --silent && node scripts/pi/run-pi-engine-conformance.mjs",
68
59
  "report:rendering-stability": "tsx scripts/pi/report-rendering-stability.ts",
@@ -70,8 +61,6 @@
70
61
  "sync:pi-ui": "npm run update:pi-component-parity && npm run update:pi-event-frame-parity",
71
62
  "update:pi-component-parity": "tsx scripts/pi/update-pi-component-parity.ts",
72
63
  "update:pi-event-frame-parity": "tsx scripts/pi/update-pi-event-frame-parity.ts",
73
- "proof:terminal-host": "node scripts/development/run-terminal-host.mjs",
74
- "proof:terminal-host:ci": "node scripts/development/certify-ci-terminal-host.mjs",
75
64
  "start": "npm run build && node scripts/development/dev-launch.mjs",
76
65
  "start:pi": "npm run build && node scripts/development/dev-launch.mjs pi",
77
66
  "prepack": "node scripts/release/validate-packaged-release-note.mjs && node scripts/release/prepack-gate.mjs",
@@ -110,7 +99,6 @@
110
99
  "cli",
111
100
  "tui",
112
101
  "terminal",
113
- "multiplexer",
114
102
  "agents"
115
103
  ],
116
104
  "author": "Timur Prokopiev",
@@ -126,7 +114,7 @@
126
114
  "@mariozechner/clipboard": "^0.3.9"
127
115
  },
128
116
  "publication": {
129
- "source": "fdbfddae64dfff5140ae471515eace2208be9246",
130
- "pullRequest": 872
117
+ "source": "9f0307c00ea0b83cfd4aea196543ddb7738fc6ee",
118
+ "pullRequest": 878
131
119
  }
132
120
  }
package/bin/guardian.js DELETED
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const startup = await import("../dist/foundation/startup/startup-runtime.js");
4
- startup.enableEnvironmentCompileCache(process.env);
5
- await startup.markStartupPhase(process.env, "guardian-start");
6
- const { resolve } = await import("node:path");
7
- const { parseSessionSelection } = await import("../dist/foundation/lifecycle/session-selection.js");
8
- const { runLaunchGuardian } = await import("../dist/foundation/launch-guardian/main.js");
9
-
10
- const { readLaunchContext } = await import("../dist/foundation/launch-context/index.js");
11
- const launchContext = readLaunchContext(process.env, "release");
12
- const releaseRoot = launchContext.releaseRoot;
13
- const profileId = readLaunchContext(process.env, "profile").launchProfile;
14
- // Invariant: the "release" and "profile" requirements above already refused an environment without
15
- // these values; the checks give the type checker the same certainty.
16
- if (releaseRoot === undefined || profileId === undefined) throw new Error("A1 launch context is incomplete");
17
-
18
- const sessionSelection = parseSessionSelection(process.argv.slice(2));
19
- const rootCommand = launchContext.residentRootExecutable === undefined ? undefined : {
20
- executable: launchContext.residentRootExecutable,
21
- arguments: JSON.parse(launchContext.residentRootArguments ?? "[]"),
22
- };
23
- Promise.resolve().then(() => runLaunchGuardian({
24
- ...(sessionSelection === undefined ? {} : { sessionSelection }),
25
- ...(rootCommand === undefined ? {} : { rootCommand }),
26
- profileId,
27
- releaseRoot,
28
- uiEntry: resolve(releaseRoot, "bin", "ui.js"),
29
- environment: process.env,
30
- cwd: process.cwd(),
31
- })).then(
32
- code => { process.exitCode = code; },
33
- error => {
34
- if (error instanceof Error && "code" in error && error.code === "release-superseded" && typeof process.send === "function") {
35
- process.send({ type: "a1-release-reselection" });
36
- process.exitCode = 1;
37
- return;
38
- }
39
- console.error(error instanceof Error ? error.message : String(error));
40
- process.exitCode = 1;
41
- },
42
- );
package/bin/supervisor.js DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runSupervisor } from "../dist/foundation/supervision/index.js";
3
-
4
- runSupervisor(process.argv.slice(2)).catch(error => {
5
- console.error(error instanceof Error ? error.stack ?? error.message : String(error));
6
- process.exitCode = 1;
7
- });
@@ -1,27 +0,0 @@
1
- export interface TabLaunchCredentials {
2
- readonly tabId: string;
3
- readonly token: string;
4
- readonly endpoint: string;
5
- readonly releaseId?: string;
6
- }
7
-
8
- export function formatResidentFallbackNotice(reason: string): string;
9
-
10
- export function assignFreshSessionRuntimeId(
11
- environment: Record<string, string | undefined>,
12
- name: string,
13
- createId: () => string,
14
- ): string;
15
-
16
- export function waitForStandbyPromotion(input: NodeJS.ReadStream, promotionFile?: string): Promise<void>;
17
-
18
- export function consumeTabLaunchContext(
19
- arguments_: readonly string[],
20
- environment: Record<string, string | undefined>,
21
- ): {
22
- readonly uiArguments: string[];
23
- readonly tabCredentials: TabLaunchCredentials | undefined;
24
- readonly tabDataDir?: string;
25
- readonly tabIncarnation?: number;
26
- readonly tabStandby: boolean;
27
- };
@@ -1,94 +0,0 @@
1
- import { existsSync } from "node:fs";
2
-
3
- const TAB_ENVIRONMENT_NAMES = ["A1_TAB_ID", "A1_TAB_TOKEN", "A1_TAB_ENDPOINT", "A1_TAB_RELEASE_ID"];
4
-
5
- /** @param {string} reason */
6
- export function formatResidentFallbackNotice(reason) {
7
- // Protocol: a host of another generation is never replaced automatically; only the user stops it.
8
- if (reason === "incompatible generation") {
9
- return "A1 normal mode unavailable (running tabs use another version); running in single agent mode. Run `a1 tabs host stop` to restart them on this version.";
10
- }
11
- return `A1 normal mode unavailable (${reason}); running in single agent mode.`;
12
- }
13
-
14
- /**
15
- * @param {Record<string, string | undefined>} environment
16
- * @param {string} name
17
- * @param {() => string} createId
18
- */
19
- export function assignFreshSessionRuntimeId(environment, name, createId) {
20
- const id = createId();
21
- if (typeof id !== "string" || id.length === 0 || id.includes("\0")) throw new Error("Session runtime identity generation failed");
22
- environment[name] = id;
23
- return id;
24
- }
25
-
26
- /**
27
- * Keep the standby below the session/runtime boundary until its authenticated holder promotes it.
28
- * Platform: Windows ConPTY may drop the in-band marker, so the holder also creates the promotion
29
- * file inside the tab's private data directory; whichever arrives first promotes the standby.
30
- * @param {NodeJS.ReadStream} input
31
- * @param {string} [promotionFile]
32
- */
33
- export function waitForStandbyPromotion(input, promotionFile) {
34
- return /** @type {Promise<void>} */ (new Promise((resolve, reject) => {
35
- const marker = Buffer.from("\x1b]a1;standby-promote\x07");
36
- let buffered = Buffer.alloc(0);
37
- /** @type {NodeJS.Timeout | undefined} */
38
- let poll;
39
- const cleanup = () => {
40
- if (poll !== undefined) clearInterval(poll);
41
- input.off("data", onData);
42
- input.off("error", onError);
43
- input.pause();
44
- if (input.isTTY) input.setRawMode(false);
45
- };
46
- /** @param {Error} error */
47
- const onError = error => { cleanup(); reject(error); };
48
- /** @param {Buffer | string} chunk */
49
- const onData = chunk => {
50
- const bytes = typeof chunk === "string" ? Buffer.from(chunk) : chunk;
51
- buffered = Buffer.concat([buffered, bytes]).subarray(-marker.length);
52
- if (buffered.equals(marker)) { cleanup(); resolve(undefined); }
53
- };
54
- if (input.isTTY) input.setRawMode(true);
55
- input.on("data", onData);
56
- input.on("error", onError);
57
- input.resume();
58
- if (promotionFile !== undefined) {
59
- poll = setInterval(() => {
60
- if (existsSync(promotionFile)) { cleanup(); resolve(undefined); }
61
- }, 10);
62
- }
63
- }));
64
- }
65
-
66
- /**
67
- * Security: consume bridge credentials into caller-private memory and erase their inheritable
68
- * environment entries before any extension-capable module loads.
69
- * @param {readonly string[]} arguments_
70
- * @param {Record<string, string | undefined>} environment
71
- */
72
- export function consumeTabLaunchContext(arguments_, environment) {
73
- const uiArguments = [...arguments_];
74
- const tabArgument = uiArguments.indexOf("--tab");
75
- const tabMode = tabArgument !== -1;
76
- if (tabMode) uiArguments.splice(tabArgument, 1);
77
- const standbyArgument = uiArguments.indexOf("--tab-standby");
78
- const tabStandby = standbyArgument !== -1;
79
- if (tabStandby) uiArguments.splice(standbyArgument, 1);
80
- const dataArgument = uiArguments.indexOf("--tab-data-dir");
81
- const tabDataDir = dataArgument === -1 ? undefined : uiArguments[dataArgument + 1];
82
- if (dataArgument !== -1) uiArguments.splice(dataArgument, 2);
83
- const incarnationArgument = uiArguments.indexOf("--tab-incarnation");
84
- const tabIncarnation = incarnationArgument === -1 ? undefined : Number(uiArguments[incarnationArgument + 1]);
85
- if (incarnationArgument !== -1) uiArguments.splice(incarnationArgument, 2);
86
- const [tabId, token, endpoint, releaseId] = TAB_ENVIRONMENT_NAMES.map(name => environment[name]);
87
- for (const name of TAB_ENVIRONMENT_NAMES) delete environment[name];
88
- if (!tabMode) return { uiArguments, tabCredentials: undefined, tabStandby: false };
89
- if (!tabId || !token || !endpoint || !tabDataDir || tabDataDir.includes("\0")
90
- || typeof tabIncarnation !== "number" || !Number.isSafeInteger(tabIncarnation) || tabIncarnation < 1) {
91
- throw new Error("A1 tab mode requires bridge credentials, recovery directory, and incarnation");
92
- }
93
- return { uiArguments, tabCredentials: { tabId, token, endpoint, ...(releaseId === undefined ? {} : { releaseId }) }, tabDataDir, tabIncarnation, tabStandby };
94
- }
@@ -1,38 +0,0 @@
1
- import type { OwnedUiEvent, PromptHistoryImageSidecarPort } from "../../contracts/owned-ui/index.js";
2
- import type { SessionConcern } from "./session-concern.js";
3
- import type { OwnedUiShellEngineOptions, OwnedUiSessionShellRoot } from "./session-shell-root.js";
4
- export type ResidentTabOptions = NonNullable<OwnedUiShellEngineOptions["residentTab"]>;
5
- export interface ResidentTabCoordinatorPorts {
6
- readonly root: Pick<OwnedUiSessionShellRoot, "appendWorkflowStatus" | "rehydrateHistoryText" | "editor">;
7
- }
8
- /**
9
- * The session presenter's side of a resident tab: recovered input, the idle status it reports to
10
- * the strip, prompt admission and correlation through the recovery journal, draft checkpoints,
11
- * detach on quit, and the graceful stop when the presenter is released. Outside a resident tab
12
- * every operation is a no-op.
13
- */
14
- export declare class ResidentTabCoordinator implements SessionConcern {
15
- #private;
16
- constructor(options: ResidentTabOptions | undefined, ports: ResidentTabCoordinatorPorts);
17
- /** True inside a resident tab, where Settings and the session name live in the global strip. */
18
- get active(): boolean;
19
- checkpoint(text: string): void;
20
- closeOwnedRoute(route: string): void;
21
- /** Puts the prompts and draft a previous tab process left unfinished back into the editor. */
22
- restoreInput(imageSidecar?: PromptHistoryImageSidecarPort): void;
23
- /** Reports idle to the strip whenever the session leaves its busy lifecycle. */
24
- observeLifecycle(event: OwnedUiEvent): void;
25
- /** Journals a prompt before it is sent; undefined outside a resident tab. Rejects when the journal cannot sync. */
26
- admit(input: Parameters<NonNullable<ResidentTabOptions["admit"]>>[0]): Promise<{
27
- readonly id: string;
28
- } | undefined>;
29
- /** The admitted prompt reached the engine; its journal entry is correlated with the engine's entry. */
30
- dispatched(submissionId: string, entryId: string): Promise<void>;
31
- /**
32
- * Leaves the tab without stopping its engine. Returns undefined outside a resident tab, true when
33
- * the client detached, or the notice to show when detaching is unavailable.
34
- */
35
- detach(): Promise<true | string | undefined>;
36
- gracefulStop(sessionFile: string | null): Promise<void>;
37
- dispose(): void;
38
- }