@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
@@ -17,7 +17,6 @@ type UpdateObservationModule = Pick<typeof import("./release-update-observation.
17
17
  export declare function deferStartupReleaseUpdateObservation(options: StartupReleaseUpdateObservationOptions, load?: () => Promise<UpdateObservationModule>): {
18
18
  start(): void;
19
19
  stop(): void;
20
- clientChanged(): void;
21
20
  };
22
21
  /**
23
22
  * The release notes bare A1 ships and the one note this version shows once per profile on startup:
@@ -23,7 +23,6 @@ export function deferStartupReleaseUpdateObservation(options, load = () => impor
23
23
  }).catch(() => { });
24
24
  },
25
25
  stop() { stopped = true; observation?.stop(); },
26
- clientChanged() { observation?.clientChanged(); },
27
26
  };
28
27
  }
29
28
  /**
@@ -3,7 +3,7 @@ export type UiAccentColor = "purple" | "blue" | "cyan" | "green" | "orange" | "p
3
3
  export { OWNED_UI_EXTENSION_CONTRACT_VERSION, OWNED_UI_EXTENSION_RENDER_CALLBACKS, OWNED_UI_EXTENSION_UI_CALLBACKS, OWNED_UI_EXTENSION_UI_PROPERTIES, assertOwnedUiExtensionUiPort, } from "./extension-ui.js";
4
4
  export type { OwnedUiExtensionAutocompleteItem, OwnedUiExtensionAutocompleteProvider, OwnedUiExtensionAutocompleteProviderFactory, OwnedUiExtensionAutocompleteSuggestions, OwnedUiExtensionComponent, OwnedUiExtensionComponentFactory, OwnedUiExtensionComponentFactoryContext, OwnedUiExtensionCustomFactory, OwnedUiExtensionCustomOptions, OwnedUiExtensionDialogOptions, OwnedUiExtensionEditorComponent, OwnedUiExtensionEditorFactory, OwnedUiExtensionEditorThemePort, OwnedUiExtensionEntryRenderInput, OwnedUiExtensionFooterDataPort, OwnedUiExtensionFooterFactory, OwnedUiExtensionInputListener, OwnedUiExtensionKeybindingsPort, OwnedUiExtensionMessageRenderInput, OwnedUiExtensionNotificationSeverity, OwnedUiExtensionOverlayAnchor, OwnedUiExtensionOverlayHandle, OwnedUiExtensionOverlayMargin, OwnedUiExtensionOverlayOptions, OwnedUiExtensionRenderCallback, OwnedUiExtensionRendererPort, OwnedUiExtensionRuntimePort, OwnedUiExtensionSelectListThemePort, OwnedUiExtensionSizeValue, OwnedUiExtensionTerminalPort, OwnedUiExtensionThemeBackground, OwnedUiExtensionThemeColor, OwnedUiExtensionThemeInfo, OwnedUiExtensionThemePort, OwnedUiExtensionToolRenderContext, OwnedUiExtensionUiCallback, OwnedUiExtensionUiPort, OwnedUiExtensionUiProperty, OwnedUiExtensionWidgetOptions, OwnedUiExtensionWidgetPlacement, OwnedUiExtensionWorkingIndicatorOptions, } from "./extension-ui.js";
5
5
  export { OWNED_UI_CONTRACT_VERSION } from "./model.js";
6
- export type { OwnedUiBackgroundSettingsPort, OwnedUiBackgroundStyle, OwnedUiBlockStatus, OwnedUiCommand, OwnedUiCommandOutcome, OwnedUiCorrelationId, OwnedUiCustomization, OwnedUiDiagnostics, OwnedUiDialog, OwnedUiEditorState, OwnedUiEntityId, OwnedUiEvent, OwnedUiFooterView, OwnedUiImageAttachment, OwnedUiLifecycle, OwnedUiModelInfo, OwnedUiOverlay, OwnedUiPromptSuggestionGeneratorPort, OwnedUiPromptSuggestionIdentity, OwnedUiPromptSuggestionReasoning, OwnedUiPromptSuggestionRequest, OwnedUiPromptSuggestionResult, OwnedUiPromptSuggestionState, OwnedUiQuitOutroSettings, OwnedUiQuitOutroSettingsPort, OwnedUiSessionId, OwnedUiSessionViewModel, OwnedUiSeverity, OwnedUiSlotId, OwnedUiSnapshot, OwnedUiStatusView, OwnedUiTerminalSurface, OwnedUiThinkingLevel, OwnedUiTimeFormat, OwnedUiToolRendering, OwnedUiToolResultPart, OwnedUiToolState, OwnedUiTranscriptBlock, OwnedUiTranscriptBlockKind, OwnedUiTranscriptImageReference, OwnedUiUsageView, OwnedUiViewportSettings, OwnedUiViewportSettingsPort, } from "./model.js";
6
+ export type { OwnedUiBackgroundSettingsPort, OwnedUiBackgroundStyle, OwnedUiBlockStatus, OwnedUiCommand, OwnedUiCommandOutcome, OwnedUiCorrelationId, OwnedUiCustomization, OwnedUiDiagnostics, OwnedUiDialog, OwnedUiEditorState, OwnedUiEntityId, OwnedUiEvent, OwnedUiFooterView, OwnedUiImageAttachment, OwnedUiLifecycle, OwnedUiModelInfo, OwnedUiOverlay, OwnedUiPromptSuggestionGeneratorPort, OwnedUiPromptSuggestionIdentity, OwnedUiPromptSuggestionReasoning, OwnedUiPromptSuggestionRequest, OwnedUiPromptSuggestionResult, OwnedUiPromptSuggestionState, OwnedUiQuitOutroSettings, OwnedUiQuitOutroSettingsPort, OwnedUiSessionId, OwnedUiSessionViewModel, OwnedUiSeverity, OwnedUiSlotId, OwnedUiSnapshot, OwnedUiStatusView, OwnedUiTerminalSurface, OwnedUiThinkingLevel, OwnedUiToolRendering, OwnedUiToolResultPart, OwnedUiToolState, OwnedUiTranscriptBlock, OwnedUiTranscriptBlockKind, OwnedUiTranscriptImageReference, OwnedUiUsageView, OwnedUiViewportSettings, OwnedUiViewportSettingsPort, } from "./model.js";
7
7
  export type { OwnedUiExtensionPort, OwnedUiSessionBackend, OwnedUiSessionCatalogPort, OwnedUiSessionFactory, OwnedUiSessionIdentityPort, OwnedUiSessionPort, OwnedUiSessionRequest, OwnedUiSessionSettingsPort, OwnedUiWorkflowPort, } from "./session-backend.js";
8
8
  export type { OwnedUiDialogHost, OwnedUiInputSurface, OwnedUiPresenterHost, OwnedUiSessionPresenter, OwnedUiSessionPresenters, OwnedUiShortcutDescription, OwnedUiTerminalHost, OwnedUiTranscriptRendererPort, } from "./session-presenters.js";
9
9
  export { OWNED_UI_HIDDEN_COMMAND_NAMES, OWNED_UI_MODELS_COMMAND_NAME, OWNED_UI_WORKFLOW_COMMAND_NAMES, } from "./session-workflows.js";
@@ -53,10 +53,7 @@ export interface OwnedUiPromptSuggestionGeneratorPort {
53
53
  generate(request: OwnedUiPromptSuggestionRequest): Promise<OwnedUiPromptSuggestionResult>;
54
54
  }
55
55
  export type OwnedUiThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
56
- export type OwnedUiTimeFormat = "20:00" | "8:00 PM";
57
56
  export interface OwnedUiViewportSettings {
58
- /** Omitted by older SDK callers; bare A1 composition always supplies the owned default. */
59
- readonly timeFormat?: OwnedUiTimeFormat;
60
57
  readonly scrollbarAppearance: "auto" | "always" | "hidden";
61
58
  readonly scrollbarStyle: "thin" | "thick";
62
59
  /** normal is baseline; fast is 2x normal; high is normal plus fast. */
@@ -339,14 +339,11 @@ export interface OwnedUiVisualExtensionSupport {
339
339
  }
340
340
  /** A newer release found by the startup check, or one installed for the next restart. */
341
341
  export type OwnedUiReleaseUpdate = {
342
- readonly status: "client-connected";
343
- readonly version: string;
344
- } | {
345
342
  readonly status?: "available";
346
343
  readonly version: string;
347
344
  readonly command: string;
348
345
  readonly changelogUrl: string | null;
349
346
  } | {
350
- readonly status: "blocked" | "blocked-cleared" | "installed";
347
+ readonly status: "installed";
351
348
  readonly version: string;
352
349
  };
@@ -36,7 +36,6 @@ export function resolveDevelopmentLaunchEnvironment(canonicalPackageRoot, releas
36
36
  [PRODUCT_IDENTITY.environment.configDir]: resolve(source[PRODUCT_IDENTITY.environment.configDir] ?? persistentConfigDir),
37
37
  [PRODUCT_IDENTITY.environment.dataDir]: dataDir,
38
38
  [PRODUCT_IDENTITY.environment.runtimeDir]: resolve(source[PRODUCT_IDENTITY.environment.runtimeDir] ?? join(developmentRoot, "runtime")),
39
- [PRODUCT_IDENTITY.environment.databasePath]: resolve(source[PRODUCT_IDENTITY.environment.databasePath] ?? join(dataDir, PRODUCT_IDENTITY.endpoint.databaseFilename)),
40
39
  },
41
40
  };
42
41
  }
@@ -3,7 +3,7 @@ export type { DevelopmentLaunchEnvironment } from "./development-launch.js";
3
3
  export { PI_PROFILE_RESOURCE_DIRECTORIES, initializeProductProfile } from "./initialize-profile.js";
4
4
  export type { InitializedProfile } from "./initialize-profile.js";
5
5
  export { interactiveLaunchIntent, parseSessionSelection } from "./intent.js";
6
- export type { InteractiveLaunchIntent, InteractiveLaunchMode, LaunchIntent, LaunchProfileId, SessionSelection } from "./intent.js";
6
+ export type { InteractiveLaunchIntent, LaunchIntent, LaunchProfileId, SessionSelection } from "./intent.js";
7
7
  export { configurationRootForProfile, resolveLaunchProfilePaths, resolvePromptHistoryDataDir } from "./profile-paths.js";
8
8
  export type { LaunchProfilePathOptions, LaunchProfilePaths } from "./profile-paths.js";
9
9
  export { prepareInteractiveLaunch } from "./prepare-launch.js";
@@ -3,12 +3,10 @@ import type { LaunchProfileId } from "../../foundation/lifecycle/index.js";
3
3
  export { parseSessionSelection } from "../../foundation/lifecycle/index.js";
4
4
  export type { SessionSelection } from "../../foundation/lifecycle/index.js";
5
5
  export type { LaunchProfileId } from "../../foundation/lifecycle/index.js";
6
- export type InteractiveLaunchMode = "tabs" | "solo";
7
6
  export interface InteractiveLaunchIntent {
8
7
  readonly kind: "interactive";
9
8
  readonly profileId: LaunchProfileId;
10
- readonly launchMode: InteractiveLaunchMode;
11
9
  readonly sessionSelection?: SessionSelection;
12
10
  }
13
11
  export type LaunchIntent = InteractiveLaunchIntent;
14
- export declare function interactiveLaunchIntent(profileId: LaunchProfileId, sessionSelection?: SessionSelection, launchMode?: InteractiveLaunchMode): InteractiveLaunchIntent;
12
+ export declare function interactiveLaunchIntent(profileId: LaunchProfileId, sessionSelection?: SessionSelection): InteractiveLaunchIntent;
@@ -1,11 +1,9 @@
1
1
  import { sessionSelectionArguments } from "../../foundation/lifecycle/index.js";
2
2
  export { parseSessionSelection } from "../../foundation/lifecycle/index.js";
3
- export function interactiveLaunchIntent(profileId, sessionSelection, launchMode = profileId === "a1" ? "tabs" : "solo") {
3
+ export function interactiveLaunchIntent(profileId, sessionSelection) {
4
4
  if (sessionSelection !== undefined && profileId !== "a1") {
5
5
  throw new Error("session selection requires the A1 profile");
6
6
  }
7
- if (profileId === "pi" && launchMode !== "solo")
8
- throw new Error("the Pi comparison launch is always solo");
9
7
  sessionSelectionArguments(sessionSelection);
10
- return Object.freeze({ kind: "interactive", profileId, launchMode, ...(sessionSelection === undefined ? {} : { sessionSelection }) });
8
+ return Object.freeze({ kind: "interactive", profileId, ...(sessionSelection === undefined ? {} : { sessionSelection }) });
11
9
  }
@@ -1,4 +1,4 @@
1
- import { type NativeProcessIdentity, type SessionRepositoryIdentity, type SessionWorktreeInventoryEntry } from "../../foundation/lifecycle/index.js";
1
+ import { type ProcessIdentity, type SessionRepositoryIdentity, type SessionWorktreeInventoryEntry } from "../../foundation/lifecycle/index.js";
2
2
  export { PRIMARY_SESSION_AGENT_ID } from "../../foundation/lifecycle/index.js";
3
3
  export type SessionContextRequest = {
4
4
  readonly action: "link-worktree";
@@ -19,6 +19,6 @@ export type SessionContextOutcome = {
19
19
  };
20
20
  export interface SessionContextRuntime {
21
21
  readonly runtimeId: string;
22
- readonly inspectProcess: (pid: number) => Promise<NativeProcessIdentity | null>;
22
+ readonly inspectProcess: (pid: number) => Promise<ProcessIdentity | null>;
23
23
  }
24
24
  export declare function updateSessionRepositoryContext(identity: SessionRepositoryIdentity, request: SessionContextRequest, runtime: SessionContextRuntime): Promise<SessionContextOutcome>;
@@ -25,8 +25,6 @@ export interface ReferenceScreenOptions {
25
25
  readonly document: ReferenceDocumentProvider;
26
26
  /** The reader's scroll settings, read on every frame so a live change is honored. */
27
27
  readonly scrollSettings: () => OwnedUiViewportSettings;
28
- /** The screen is a resident tab, such as the Changelog tab: it offers no screen-level close. */
29
- readonly pinned?: boolean;
30
28
  /** Enables owned text selection for document routes that explicitly opt in. */
31
29
  readonly selection?: ReferenceDocumentSelectionOptions;
32
30
  }
@@ -49,7 +49,6 @@ export class ReferenceScreenApp {
49
49
  #title;
50
50
  #document;
51
51
  #scrollSettings;
52
- #pinned;
53
52
  #selection;
54
53
  #scroll = 0;
55
54
  #interruptArmed = false;
@@ -69,7 +68,6 @@ export class ReferenceScreenApp {
69
68
  this.#title = options.title;
70
69
  this.#document = options.document;
71
70
  this.#scrollSettings = options.scrollSettings;
72
- this.#pinned = options.pinned === true;
73
71
  this.#selection = options.selection === undefined ? undefined : new ReferenceDocumentSelection(options.selection);
74
72
  }
75
73
  onActivate(host) {
@@ -178,8 +176,7 @@ export class ReferenceScreenApp {
178
176
  switch (action) {
179
177
  case "close":
180
178
  this.#selection?.handleInput(data);
181
- if (!this.#pinned)
182
- host.close();
179
+ host.close();
183
180
  return { consumed: true };
184
181
  case "up":
185
182
  this.#scrollBy(-1);
@@ -250,12 +247,8 @@ export class ReferenceScreenApp {
250
247
  }
251
248
  return { owned: true, changed: true };
252
249
  }
253
- // Invariant: a pinned screen is its tab and `Esc` does not close it, so it shows no close hint.
254
250
  #hintEntries() {
255
- const entries = REFERENCE_SCREEN_SHORTCUTS.hintEntries(SCOPE);
256
- if (!this.#pinned)
257
- return entries;
258
- return entries.filter(entry => entry.key !== DIALOG_CLOSE_SHORTCUT_HINT.key || entry.action !== DIALOG_CLOSE_SHORTCUT_HINT.action);
251
+ return REFERENCE_SCREEN_SHORTCUTS.hintEntries(SCOPE);
259
252
  }
260
253
  // Invariant: the title is the first document row, as in v2, so it scrolls with the document.
261
254
  #content(width, theme) {
@@ -13,15 +13,9 @@ export declare const SETTINGS_SHORTCUTS: ShortcutRegistry<Action>;
13
13
  export declare class SettingsApp implements UiApp {
14
14
  #private;
15
15
  readonly id = "settings";
16
- /**
17
- * `pinned` presents the screen as a resident Settings tab, which offers no screen-level close;
18
- * `configurePlusMenu` opens the tab bar's Plus Menu dialog in place of this screen's own.
19
- */
20
16
  constructor(session: OwnedSettingsManager, options: {
21
- readonly pinned?: boolean;
22
17
  readonly searchInputFactory: SettingsSearchInputFactory;
23
18
  readonly copyText?: (text: string) => void;
24
- readonly configurePlusMenu?: (() => boolean) | null;
25
19
  readonly dialogPanel?: (text: string) => string;
26
20
  });
27
21
  onActivate(host: AppHostServices): void;
@@ -1,6 +1,5 @@
1
1
  import { DIALOG_BACK_SHORTCUT_HINT, DIALOG_CLOSE_SHORTCUT_HINT } from "../../contracts/presentation/index.js";
2
- import { GLOBAL_SCOPE, LineInput, PLAIN_THEME, ShortcutRegistry, assertNoShortcutConflicts, blockJumpTarget, configureDialogChoiceCapacity, configureDialogTextRows, configureDialogWidth, numericValues, RAIL_COLUMNS, renderCenteredDialogOverlay, renderDialogPanel, renderSteppedDialogPanel, renderEmptyState, renderGroupHeader, renderListRow, renderNote, renderShortcutHintsWithClose, menuRowAt, regionAt, renderValueMenu, withScrollbarRail, stepperEnds, steppedValue, truncateToWidth, valueColumnFor, valueMenuFrame, blockRowSpan, displayWidth, formatLocalTime, handleLineInputKey, humanizeLabel, humanizeTitle, indexOfKey, layoutList, moveSelection, rowKey, scrollForSelection, scrollForTrackPage, scrollbarGeometry, scrollbarPresentation, ScrollbarRails, scrollbarWheelRows, selectableIndexes, } from "../../ui/components/index.js";
3
- import { FlagToggleDialog, PLUS_MENU_SETTING_ID, PlusMenuDialog } from "./plus-menu-dialog.js";
2
+ import { GLOBAL_SCOPE, LineInput, PLAIN_THEME, ShortcutRegistry, assertNoShortcutConflicts, blockJumpTarget, configureDialogChoiceCapacity, configureDialogTextRows, configureDialogWidth, numericValues, RAIL_COLUMNS, renderCenteredDialogOverlay, renderDialogPanel, renderSteppedDialogPanel, renderEmptyState, renderGroupHeader, renderListRow, renderNote, renderShortcutHintsWithClose, menuRowAt, regionAt, renderValueMenu, withScrollbarRail, stepperEnds, steppedValue, truncateToWidth, valueColumnFor, valueMenuFrame, blockRowSpan, displayWidth, handleLineInputKey, humanizeLabel, humanizeTitle, indexOfKey, layoutList, moveSelection, rowKey, scrollForSelection, scrollForTrackPage, scrollbarGeometry, scrollbarPresentation, ScrollbarRails, scrollbarWheelRows, selectableIndexes, } from "../../ui/components/index.js";
4
3
  import { SETTINGS_APP_ID } from "./settings-route.js";
5
4
  export { SETTINGS_APP_ID, SETTINGS_ROUTE } from "./settings-route.js";
6
5
  const SCOPE = SETTINGS_APP_ID;
@@ -22,7 +21,6 @@ const SCROLL_LINGER_MS = 900;
22
21
  const SCROLL_LINGER_REPAINT_MS = 925;
23
22
  /** What a structured value offers instead of printing itself. */
24
23
  const CONFIGURE = "configure";
25
- const TAB_BAR_RIGHT_ITEMS_SETTING_ID = "tabBarRightItems";
26
24
  export const SETTINGS_SHORTCUTS = new ShortcutRegistry();
27
25
  SETTINGS_SHORTCUTS.declare({ key: "edit", scope: SCOPE, description: "Search settings", section: "Change", hint: { keys: "Type", does: "search" } }, "edit-filter");
28
26
  SETTINGS_SHORTCUTS.declare({ key: "up", scope: SCOPE, description: "Previous setting", section: "Navigate", hint: { keys: "↑↓", does: "navigate" } }, "move-up");
@@ -120,15 +118,9 @@ export class SettingsApp {
120
118
  #activityTimer;
121
119
  #renderedScroll;
122
120
  #options;
123
- /**
124
- * `pinned` presents the screen as a resident Settings tab, which offers no screen-level close;
125
- * `configurePlusMenu` opens the tab bar's Plus Menu dialog in place of this screen's own.
126
- */
127
121
  constructor(session, options) {
128
122
  this.#session = session;
129
123
  this.#options = {
130
- pinned: options.pinned === true,
131
- configurePlusMenu: options.configurePlusMenu ?? null,
132
124
  dialogPanel: options.dialogPanel ?? null,
133
125
  };
134
126
  this.#search = {
@@ -275,8 +267,7 @@ export class SettingsApp {
275
267
  const selected = indexOfKey(rows, this.#selectedKey);
276
268
  switch (action) {
277
269
  case "close":
278
- if (!this.#options.pinned)
279
- host.close();
270
+ host.close();
280
271
  return { consumed: true };
281
272
  case "edit-filter":
282
273
  return { consumed: false };
@@ -517,9 +508,6 @@ export class SettingsApp {
517
508
  // selector may open empty so it can truthfully report that no authenticated models exist.
518
509
  if (entry.flags.length === 0 && modelDialog !== "default")
519
510
  return;
520
- // Rationale: beside a tab bar, its own Plus Menu dialog configures `+`, so both ways look the same.
521
- if (entry.backend === "a1" && entry.id === PLUS_MENU_SETTING_ID && this.#options.configurePlusMenu?.() === true)
522
- return;
523
511
  const stored = typeof entry.rawValue === "object" && entry.rawValue !== null && !Array.isArray(entry.rawValue)
524
512
  ? entry.rawValue
525
513
  : {};
@@ -540,13 +528,6 @@ export class SettingsApp {
540
528
  entry,
541
529
  flags: entry.flags.map(flag => flag.key),
542
530
  modelDialog,
543
- flagDialog: entry.backend !== "a1" ? null
544
- : entry.id === PLUS_MENU_SETTING_ID ? new PlusMenuDialog(entry.flags)
545
- : entry.id === TAB_BAR_RIGHT_ITEMS_SETTING_ID ? new FlagToggleDialog(entry.flags, {
546
- title: "Right Side",
547
- description: "Choose what the right side of the tab bar shows.",
548
- empty: "No items match",
549
- }) : null,
550
531
  filter: modelDialog === null ? null : new LineInput(""),
551
532
  step: "model",
552
533
  modelKey: null,
@@ -562,12 +543,6 @@ export class SettingsApp {
562
543
  return { consumed: false };
563
544
  if (open.modelDialog !== null)
564
545
  return this.#modelDialogKey(open, data);
565
- if (open.flagDialog !== null) {
566
- const outcome = open.flagDialog.handle(KEYS[data] ?? data, data, key => this.#toggleFlag(open.flags.indexOf(key)));
567
- if (outcome === "close")
568
- this.#structured = null;
569
- return { consumed: true };
570
- }
571
546
  switch (SETTINGS_SHORTCUTS.resolve(KEYS[data] ?? data, DIALOG_SCOPE)) {
572
547
  case "close":
573
548
  this.#structured = null;
@@ -1036,8 +1011,6 @@ export class SettingsApp {
1036
1011
  #dialogLines(open, width, height, theme) {
1037
1012
  if (open.modelDialog !== null)
1038
1013
  return this.#modelDialogLines(open, width, height, theme);
1039
- if (open.flagDialog !== null)
1040
- return open.flagDialog.lines(open.record, width, theme);
1041
1014
  const rows = open.flags.map(key => {
1042
1015
  const declared = open.entry.flags.find(flag => flag.key === key);
1043
1016
  return {
@@ -1111,8 +1084,7 @@ export class SettingsApp {
1111
1084
  #footerLines(width, theme) {
1112
1085
  // Rationale: standing guidance is more useful than transient feedback; failures still
1113
1086
  // roll back without displacing the Settings interaction contract.
1114
- const entries = SETTINGS_SHORTCUTS.hintEntries(SCOPE).filter(entry => !this.#options.pinned
1115
- || entry.key !== DIALOG_CLOSE_SHORTCUT_HINT.key || entry.action !== DIALOG_CLOSE_SHORTCUT_HINT.action);
1087
+ const entries = SETTINGS_SHORTCUTS.hintEntries(SCOPE);
1116
1088
  const status = renderShortcutHintsWithClose(entries, theme, width, width > 0 ? 1 : 0);
1117
1089
  const input = this.#search.input;
1118
1090
  if (input === null)
@@ -1224,11 +1196,8 @@ function labelOf(entry) {
1224
1196
  function rangeOf(entry) {
1225
1197
  return { minimum: entry.minimum, maximum: entry.maximum, values: numericValues(entry.choices) };
1226
1198
  }
1227
- /** Booleans read as yes and no; time-format choices preview the current local time. */
1228
- function displaySettingValue(entry, value) {
1229
- if (entry.backend === "a1" && entry.id === "timeFormat" && (value === "20:00" || value === "8:00 PM")) {
1230
- return formatLocalTime(new Date(), value) ?? value;
1231
- }
1199
+ /** Booleans read as yes and no. */
1200
+ function displaySettingValue(_entry, value) {
1232
1201
  if (typeof value === "boolean")
1233
1202
  return value ? "yes" : "no";
1234
1203
  return String(value);
@@ -6,12 +6,7 @@ export declare const PRIVATE_ENVIRONMENT: Readonly<{
6
6
  releaseDigest: "LAUNCH_CONTEXT_RELEASE_DIGEST";
7
7
  releaseLayers: "LAUNCH_CONTEXT_RELEASE_LAYERS";
8
8
  launchProfile: "LAUNCH_CONTEXT_PROFILE";
9
- launchMode: "LAUNCH_CONTEXT_MODE";
10
- updateVersion: "LAUNCH_CONTEXT_UPDATE_VERSION";
11
9
  immutableWarmup: "LAUNCH_CONTEXT_WARMUP";
12
- residentRootExecutable: "LAUNCH_CONTEXT_RESIDENT_ROOT_EXECUTABLE";
13
- residentRootArguments: "LAUNCH_CONTEXT_RESIDENT_ROOT_ARGUMENTS";
14
- residentFallback: "LAUNCH_CONTEXT_RESIDENT_FALLBACK";
15
10
  }>;
16
11
  /**
17
12
  * Keys published by releases that predate the neutral cutover. They are read when
@@ -35,15 +30,8 @@ export interface LaunchContext {
35
30
  readonly releaseDigest?: string;
36
31
  readonly releaseLayers?: string;
37
32
  readonly launchProfile?: "a1" | "pi";
38
- readonly launchMode?: "tabs" | "solo";
39
- readonly updateVersion?: string;
40
33
  readonly immutableWarmup?: "1";
41
- readonly residentRootExecutable?: string;
42
- readonly residentRootArguments?: string;
43
- readonly residentFallback?: string;
44
34
  }
45
- /** The Tabs settings configure resident tabs; a direct-route launch, by `a1 solo` or by a fallback, hides them. */
46
- export declare function hidesTabSettings(context: Pick<LaunchContext, "launchMode" | "residentFallback">): boolean;
47
35
  export type LaunchContextRequirement = "optional" | "profile" | "release" | "warmup";
48
36
  /** Read current keys, fall back to superseded keys per field, with bounded diagnostics. */
49
37
  export declare function readLaunchContext(environment: NodeJS.ProcessEnv, requirement?: LaunchContextRequirement, platform?: NodeJS.Platform): LaunchContext;
@@ -6,12 +6,7 @@ export const PRIVATE_ENVIRONMENT = Object.freeze({
6
6
  releaseDigest: "LAUNCH_CONTEXT_RELEASE_DIGEST",
7
7
  releaseLayers: "LAUNCH_CONTEXT_RELEASE_LAYERS",
8
8
  launchProfile: "LAUNCH_CONTEXT_PROFILE",
9
- launchMode: "LAUNCH_CONTEXT_MODE",
10
- updateVersion: "LAUNCH_CONTEXT_UPDATE_VERSION",
11
9
  immutableWarmup: "LAUNCH_CONTEXT_WARMUP",
12
- residentRootExecutable: "LAUNCH_CONTEXT_RESIDENT_ROOT_EXECUTABLE",
13
- residentRootArguments: "LAUNCH_CONTEXT_RESIDENT_ROOT_ARGUMENTS",
14
- residentFallback: "LAUNCH_CONTEXT_RESIDENT_FALLBACK",
15
10
  });
16
11
  /**
17
12
  * Keys published by releases that predate the neutral cutover. They are read when
@@ -32,10 +27,6 @@ const SUPERSEDED_ENTRIES = Object.entries(SUPERSEDED_ENVIRONMENT);
32
27
  const PRIVATE_KEYS = new Set([...Object.values(PRIVATE_ENVIRONMENT), ...Object.values(SUPERSEDED_ENVIRONMENT)]);
33
28
  const LOGICAL_KEYS = new Map(PRIVATE_ENTRIES.map(([logical, key]) => [key, logical]));
34
29
  const SUPERSEDED_LOGICAL_KEYS = new Map(SUPERSEDED_ENTRIES.map(([logical, key]) => [key, logical]));
35
- /** The Tabs settings configure resident tabs; a direct-route launch, by `a1 solo` or by a fallback, hides them. */
36
- export function hidesTabSettings(context) {
37
- return context.launchMode === "solo" || context.residentFallback !== undefined;
38
- }
39
30
  /** Read current keys, fall back to superseded keys per field, with bounded diagnostics. */
40
31
  export function readLaunchContext(environment, requirement = "optional", platform = process.platform) {
41
32
  const values = {};
@@ -70,25 +61,8 @@ export function readLaunchContext(environment, requirement = "optional", platfor
70
61
  if (values.launchProfile !== undefined && values.launchProfile !== "a1" && values.launchProfile !== "pi") {
71
62
  throw invalidContext("launchProfile", "unsupported profile");
72
63
  }
73
- if (values.launchMode !== undefined && values.launchMode !== "tabs" && values.launchMode !== "solo") {
74
- throw invalidContext("launchMode", "unsupported launch mode");
75
- }
76
- if (values.launchProfile === "pi" && values.launchMode === "tabs")
77
- throw invalidContext("launchMode", "Pi comparison cannot use tabs");
78
64
  if (values.immutableWarmup !== undefined && values.immutableWarmup !== "1")
79
65
  throw invalidContext("immutableWarmup", "invalid permission flag");
80
- if ((values.residentRootExecutable === undefined) !== (values.residentRootArguments === undefined))
81
- throw invalidContext("residentRootExecutable", "resident root command is incomplete");
82
- if (values.residentRootArguments !== undefined) {
83
- try {
84
- const argumentsValue = JSON.parse(values.residentRootArguments);
85
- if (!Array.isArray(argumentsValue) || argumentsValue.some(value => typeof value !== "string"))
86
- throw new Error("not string arguments");
87
- }
88
- catch {
89
- throw invalidContext("residentRootArguments", "invalid JSON argument list");
90
- }
91
- }
92
66
  if (values.releaseDigest !== undefined && !/^[a-f0-9]{64}$/.test(values.releaseDigest))
93
67
  throw invalidContext("releaseDigest", "invalid digest");
94
68
  if (requirement === "profile")
@@ -0,0 +1,8 @@
1
+ export interface ClaimGateHandle {
2
+ release(): void;
3
+ }
4
+ /**
5
+ * Try once to hold the worktree mutation gate. The gate is a lock directory beside the authority
6
+ * file; contention returns null so the caller keeps its own bounded retry.
7
+ */
8
+ export declare function tryAcquireClaimGate(path: string): ClaimGateHandle | null;
@@ -0,0 +1,37 @@
1
+ import lockfile from "proper-lockfile";
2
+ /** A stalled mutation loses the gate after this bound instead of holding it until the process ends. */
3
+ const CLAIM_GATE_STALE_MS = 10_000;
4
+ /**
5
+ * Try once to hold the worktree mutation gate. The gate is a lock directory beside the authority
6
+ * file; contention returns null so the caller keeps its own bounded retry.
7
+ */
8
+ export function tryAcquireClaimGate(path) {
9
+ let release;
10
+ try {
11
+ release = lockfile.lockSync(path, {
12
+ realpath: false,
13
+ lockfilePath: `${path}.gate`,
14
+ stale: CLAIM_GATE_STALE_MS,
15
+ onCompromised: () => { },
16
+ });
17
+ }
18
+ catch (cause) {
19
+ if (cause instanceof Error && "code" in cause && cause.code === "ELOCKED")
20
+ return null;
21
+ throw Object.assign(new Error("cannot access the worktree mutation gate; check A1 data-directory permissions and filesystem availability", { cause }), {
22
+ code: "worktree-coordination-io",
23
+ });
24
+ }
25
+ let released = false;
26
+ return {
27
+ release() {
28
+ if (released)
29
+ return;
30
+ released = true;
31
+ try {
32
+ release();
33
+ }
34
+ catch { /* Compatibility: a reclaimed stale gate is already gone. */ }
35
+ },
36
+ };
37
+ }
@@ -1,13 +1,9 @@
1
- export type { LaunchInstanceStopIntent, SupervisorCommand } from "./commands.js";
2
- export { assertLaunchInstance, assertLaunchInstanceOutcome, assertLaunchInstanceTransition, assertProcessContainmentIdentity } from "./launch-instance.js";
3
- export type { LaunchInstance, LaunchInstanceId, LaunchInstanceOutcome, LaunchInstanceShutdownPolicy, LaunchInstanceState, LaunchInstanceStopReason, ProcessContainmentIdentity, } from "./launch-instance.js";
4
- export { assertDimensions, assertLaunchProfileId, assertNativeProcessIdentity, assertTransparentTerminalLaunchProfile } from "./model.js";
5
- export type { CommandResult, DriverProfileId, GenerationId, LaunchProfileId, NativeProcessIdentity, RequestId, SupervisorSnapshot, TerminalDimensions, TransparentTerminalLaunchProfile, TransparentTerminalLifecycleOutcome, } from "./model.js";
6
- export { resolveCohortEndpoint, resolveProductPaths } from "./paths.js";
7
- export type { CohortEndpointPaths, ProductPaths } from "./paths.js";
1
+ export { assertLaunchProfileId } from "./model.js";
2
+ export type { LaunchProfileId, ProcessIdentity } from "./model.js";
3
+ export { PID_LIVENESS_IDENTITY, inspectLiveProcess } from "./process-liveness.js";
4
+ export { resolveProductPaths } from "./paths.js";
5
+ export type { ProductPaths } from "./paths.js";
8
6
  export { parseSessionSelection, sessionSelectionArguments } from "./session-selection.js";
9
7
  export type { SessionSelection } from "./session-selection.js";
10
8
  export { PRIMARY_SESSION_AGENT_ID, activateSessionRepositoryContext, clearSessionRepositoryContext, listSessionRepositoryWorktrees, readSessionRepositoryContext, registerSessionRepositoryRuntime, releaseSessionRepositoryRuntime, setSessionRepositoryContext, } from "./session-repository-context.js";
11
9
  export type { SessionRepositoryContext, SessionRepositoryContextOptions, SessionRepositoryIdentity, SessionWorktreeInventoryEntry, SessionWorktreeStatus, } from "./session-repository-context.js";
12
- export { createSupervisorStartupAttempt, publishSupervisorStartupResult, readSupervisorStartupResult, supervisorStartupFailure, supervisorStartupReady, supervisorStartupResultPath, } from "./supervisor-startup.js";
13
- export type { SupervisorStartupAttemptIdentity, SupervisorStartupResult } from "./supervisor-startup.js";
@@ -1,6 +1,5 @@
1
- export { assertLaunchInstance, assertLaunchInstanceOutcome, assertLaunchInstanceTransition, assertProcessContainmentIdentity } from "./launch-instance.js";
2
- export { assertDimensions, assertLaunchProfileId, assertNativeProcessIdentity, assertTransparentTerminalLaunchProfile } from "./model.js";
3
- export { resolveCohortEndpoint, resolveProductPaths } from "./paths.js";
1
+ export { assertLaunchProfileId } from "./model.js";
2
+ export { PID_LIVENESS_IDENTITY, inspectLiveProcess } from "./process-liveness.js";
3
+ export { resolveProductPaths } from "./paths.js";
4
4
  export { parseSessionSelection, sessionSelectionArguments } from "./session-selection.js";
5
5
  export { PRIMARY_SESSION_AGENT_ID, activateSessionRepositoryContext, clearSessionRepositoryContext, listSessionRepositoryWorktrees, readSessionRepositoryContext, registerSessionRepositoryRuntime, releaseSessionRepositoryRuntime, setSessionRepositoryContext, } from "./session-repository-context.js";
6
- export { createSupervisorStartupAttempt, publishSupervisorStartupResult, readSupervisorStartupResult, supervisorStartupFailure, supervisorStartupReady, supervisorStartupResultPath, } from "./supervisor-startup.js";
@@ -1,64 +1,7 @@
1
1
  export type LaunchProfileId = "a1" | "pi";
2
- export type GenerationId = string;
3
- export type DriverProfileId = string;
4
- export type RequestId = string;
5
- export interface TerminalDimensions {
6
- readonly columns: number;
7
- readonly rows: number;
8
- }
9
- export interface TransparentTerminalLaunchProfile {
10
- readonly id: DriverProfileId;
11
- readonly terminalCapability: "transparent";
12
- readonly executable: string;
13
- readonly arguments: readonly string[];
14
- readonly cwd: string;
15
- readonly environment: Readonly<Record<string, string>>;
16
- readonly terminalType: string;
17
- readonly dimensions: TerminalDimensions;
18
- readonly ownerDisconnect: "stop" | "detach";
19
- readonly recovery: "detach-only" | "none";
20
- readonly surface: "none";
21
- readonly visualReconnection: "none";
22
- }
23
- export interface NativeProcessIdentity {
2
+ /** A process as session coordination records it: a pid plus the identity its writer observed. */
3
+ export interface ProcessIdentity {
24
4
  readonly pid: number;
25
5
  readonly startIdentity: string;
26
6
  }
27
- export type TransparentTerminalLifecycleOutcome = {
28
- readonly kind: "exited";
29
- readonly exitCode: number;
30
- } | {
31
- readonly kind: "signaled";
32
- readonly signal: string;
33
- } | {
34
- readonly kind: "stopped";
35
- readonly reason: "owner-disconnect" | "user-request" | "update";
36
- } | {
37
- readonly kind: "detached";
38
- readonly reason: "owner-disconnect";
39
- } | {
40
- readonly kind: "spawn-error" | "broker-error";
41
- readonly message: string;
42
- readonly code: string | null;
43
- };
44
- export interface SupervisorSnapshot {
45
- readonly revision: number;
46
- readonly activeInstances: readonly {
47
- readonly id: string;
48
- readonly profileId: LaunchProfileId;
49
- readonly state: "requested" | "active" | "stopping";
50
- }[];
51
- }
52
- export interface CommandResult {
53
- readonly requestId: RequestId;
54
- readonly ok: boolean;
55
- readonly revision: number;
56
- readonly error?: {
57
- readonly code: "invalid-command" | "not-found" | "stale-generation" | "capability-error" | "containment-unsupported" | "ownership-error" | "release-superseded" | "driver-error";
58
- readonly message: string;
59
- };
60
- }
61
7
  export declare function assertLaunchProfileId(value: unknown): asserts value is LaunchProfileId;
62
- export declare function assertDimensions(dimensions: TerminalDimensions): void;
63
- export declare function assertTransparentTerminalLaunchProfile(profile: TransparentTerminalLaunchProfile): void;
64
- export declare function assertNativeProcessIdentity(identity: NativeProcessIdentity): void;
@@ -3,38 +3,3 @@ export function assertLaunchProfileId(value) {
3
3
  if (value !== "a1" && value !== "pi")
4
4
  throw new TypeError(PRODUCT_TEXT.diagnostic(`launch profile is invalid: ${String(value)}`));
5
5
  }
6
- export function assertDimensions(dimensions) {
7
- if (!Number.isInteger(dimensions.columns) || dimensions.columns < 2 || dimensions.columns > 500) {
8
- throw new RangeError("terminal columns must be an integer from 2 to 500");
9
- }
10
- if (!Number.isInteger(dimensions.rows) || dimensions.rows < 1 || dimensions.rows > 300) {
11
- throw new RangeError("terminal rows must be an integer from 1 to 300");
12
- }
13
- }
14
- export function assertTransparentTerminalLaunchProfile(profile) {
15
- if (!profile.id || profile.terminalCapability !== "transparent")
16
- throw new TypeError("invalid transparent terminal profile identity");
17
- if (!profile.executable || profile.executable.includes("\0"))
18
- throw new TypeError("transparent executable must be non-empty and contain no null byte");
19
- if (!profile.cwd || profile.cwd.includes("\0"))
20
- throw new TypeError("transparent working directory must be non-empty and contain no null byte");
21
- if (profile.arguments.some(value => typeof value !== "string" || value.includes("\0")))
22
- throw new TypeError("transparent arguments must contain no null byte");
23
- if (Object.entries(profile.environment).some(([name, value]) => !name || name.includes("=") || name.includes("\0") || value.includes("\0"))) {
24
- throw new TypeError("transparent environment contains an invalid name or value");
25
- }
26
- if (!profile.terminalType || profile.terminalType.includes("\0"))
27
- throw new TypeError("transparent terminal type is invalid");
28
- assertDimensions(profile.dimensions);
29
- if (profile.surface !== "none" || profile.visualReconnection !== "none")
30
- throw new TypeError("transparent profiles cannot declare a surface or visual reconnection");
31
- if (profile.ownerDisconnect === "detach" && profile.recovery !== "detach-only")
32
- throw new TypeError("transparent detach policy requires detach-only recovery");
33
- if (profile.ownerDisconnect === "stop" && profile.recovery !== "none")
34
- throw new TypeError("transparent stop policy requires no recovery claim");
35
- }
36
- export function assertNativeProcessIdentity(identity) {
37
- if (!Number.isSafeInteger(identity.pid) || identity.pid <= 0 || !identity.startIdentity || identity.startIdentity.includes("\0")) {
38
- throw new TypeError("invalid native process identity");
39
- }
40
- }
@@ -2,29 +2,5 @@ export interface ProductPaths {
2
2
  readonly configDir: string;
3
3
  readonly dataDir: string;
4
4
  readonly runtimeDir: string;
5
- readonly databasePath: string;
6
- /** The endpoint written by releases that predate cohort-scoped identity. */
7
- readonly endpoint: string;
8
- /** The metadata written by releases that predate cohort-scoped identity. */
9
- readonly endpointMetadataPath: string;
10
- readonly endpointsDir: string;
11
- /** A short, A1-managed socket directory when the host imposes a small Unix-path limit. */
12
- readonly endpointDirectory?: string | null;
13
- readonly supervisorLogPath: string;
14
5
  }
15
- /** Where one cohort listens, and where it records that it is listening. */
16
- export interface CohortEndpointPaths {
17
- readonly endpoint: string;
18
- readonly endpointMetadataPath: string;
19
- }
20
- /**
21
- * Endpoint identity for one release cohort. Two cohorts can be live at once — an update
22
- * leaves a working session on the release it started on — so the name a supervisor listens
23
- * on has to name the release as well as the runtime directory, or the two contend for one
24
- * endpoint and replacing one means ending the other.
25
- *
26
- * An explicit endpoint override keeps its single endpoint: it is how an isolated run pins
27
- * the address it is going to talk to.
28
- */
29
- export declare function resolveCohortEndpoint(paths: ProductPaths, releaseId: string, environment?: NodeJS.ProcessEnv, hostPlatform?: NodeJS.Platform): CohortEndpointPaths;
30
6
  export declare function resolveProductPaths(environment?: NodeJS.ProcessEnv, hostPlatform?: NodeJS.Platform, fallbackHome?: string): ProductPaths;