@timurproko/a1 0.1.0 → 0.1.1-dev.2

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 (507) hide show
  1. package/README.md +8 -6
  2. package/bin/a1-ui.js +24 -0
  3. package/bin/{addone.js → a1.js} +2 -2
  4. package/dist/src/cli/dispatch.d.ts +4 -5
  5. package/dist/src/cli/dispatch.js +11 -11
  6. package/dist/src/cli/index.d.ts +0 -1
  7. package/dist/src/cli/index.js +0 -1
  8. package/dist/src/cli/version-stats.d.ts +0 -1
  9. package/dist/src/cli/version-stats.js +27 -23
  10. package/dist/src/cli/version.d.ts +1 -2
  11. package/dist/src/cli/version.js +4 -4
  12. package/dist/src/composition/index.d.ts +22 -0
  13. package/dist/src/composition/index.js +166 -0
  14. package/dist/src/composition/transparent-runtime.d.ts +6 -0
  15. package/dist/src/composition/transparent-runtime.js +19 -0
  16. package/dist/src/features/launch/development-launch.d.ts +0 -1
  17. package/dist/src/features/launch/development-launch.js +12 -11
  18. package/dist/src/features/launch/index.d.ts +0 -1
  19. package/dist/src/features/launch/index.js +0 -1
  20. package/dist/src/features/launch/initialize-profile.d.ts +1 -2
  21. package/dist/src/features/launch/initialize-profile.js +1 -2
  22. package/dist/src/features/launch/intent.d.ts +0 -1
  23. package/dist/src/features/launch/intent.js +0 -1
  24. package/dist/src/features/launch/prepare-launch.d.ts +2 -3
  25. package/dist/src/features/launch/prepare-launch.js +3 -4
  26. package/dist/src/features/launch/profile-paths.d.ts +2 -3
  27. package/dist/src/features/launch/profile-paths.js +9 -8
  28. package/dist/src/features/launch/profiles.d.ts +2 -3
  29. package/dist/src/features/launch/profiles.js +5 -6
  30. package/dist/src/features/launch/runtime-selection.d.ts +1 -2
  31. package/dist/src/features/launch/runtime-selection.js +1 -2
  32. package/dist/src/features/owned-ui/customization.d.ts +5 -3
  33. package/dist/src/features/owned-ui/customization.js +2 -4
  34. package/dist/src/features/owned-ui/diagnostics.d.ts +0 -1
  35. package/dist/src/features/owned-ui/diagnostics.js +0 -1
  36. package/dist/src/features/owned-ui/index.d.ts +0 -2
  37. package/dist/src/features/owned-ui/index.js +0 -2
  38. package/dist/src/features/owned-ui/run.d.ts +3 -7
  39. package/dist/src/features/owned-ui/run.js +7 -15
  40. package/dist/src/features/workspace/capabilities.d.ts +0 -1
  41. package/dist/src/features/workspace/capabilities.js +0 -1
  42. package/dist/src/features/workspace/index.d.ts +0 -1
  43. package/dist/src/features/workspace/index.js +0 -1
  44. package/dist/src/features/workspace/presentation.d.ts +1 -2
  45. package/dist/src/features/workspace/presentation.js +5 -4
  46. package/dist/src/features/workspace/reconciliation.d.ts +0 -1
  47. package/dist/src/features/workspace/reconciliation.js +0 -1
  48. package/dist/src/features/workspace/reducer.d.ts +0 -1
  49. package/dist/src/features/workspace/reducer.js +0 -1
  50. package/dist/src/features/workspace/router.d.ts +0 -1
  51. package/dist/src/features/workspace/router.js +0 -1
  52. package/dist/src/features/workspace/store.d.ts +0 -1
  53. package/dist/src/features/workspace/store.js +0 -1
  54. package/dist/src/foundation/agent-engine-contracts/capability-ports.d.ts +95 -0
  55. package/dist/src/foundation/agent-engine-contracts/capability-ports.js +35 -0
  56. package/dist/src/foundation/agent-engine-contracts/domain-validation.d.ts +12 -0
  57. package/dist/src/foundation/agent-engine-contracts/domain-validation.js +89 -0
  58. package/dist/src/foundation/agent-engine-contracts/domain.d.ts +90 -0
  59. package/dist/src/foundation/agent-engine-contracts/domain.js +1 -0
  60. package/dist/src/foundation/agent-engine-contracts/index.d.ts +7 -0
  61. package/dist/src/foundation/agent-engine-contracts/index.js +7 -0
  62. package/dist/src/foundation/agent-engine-contracts/model.d.ts +78 -0
  63. package/dist/src/foundation/agent-engine-contracts/model.js +1 -0
  64. package/dist/src/foundation/agent-engine-contracts/ports.d.ts +18 -0
  65. package/dist/src/foundation/agent-engine-contracts/ports.js +1 -0
  66. package/dist/src/foundation/agent-engine-contracts/serialization.d.ts +7 -0
  67. package/dist/src/foundation/agent-engine-contracts/serialization.js +58 -0
  68. package/dist/src/foundation/agent-engine-contracts/validation.d.ts +5 -0
  69. package/dist/src/foundation/agent-engine-contracts/validation.js +128 -0
  70. package/dist/src/foundation/lifecycle/index.d.ts +0 -1
  71. package/dist/src/foundation/lifecycle/index.js +0 -1
  72. package/dist/src/foundation/lifecycle/model.d.ts +1 -2
  73. package/dist/src/foundation/lifecycle/model.js +3 -3
  74. package/dist/src/foundation/lifecycle/paths.d.ts +2 -3
  75. package/dist/src/foundation/lifecycle/paths.js +32 -16
  76. package/dist/src/foundation/native-host-protocol/codec.d.ts +0 -1
  77. package/dist/src/foundation/native-host-protocol/codec.js +0 -1
  78. package/dist/src/foundation/native-host-protocol/evidence.d.ts +2 -3
  79. package/dist/src/foundation/native-host-protocol/evidence.js +4 -4
  80. package/dist/src/foundation/native-host-protocol/index.d.ts +0 -1
  81. package/dist/src/foundation/native-host-protocol/index.js +0 -1
  82. package/dist/src/foundation/native-host-protocol/messages.d.ts +1 -2
  83. package/dist/src/foundation/native-host-protocol/messages.js +2 -2
  84. package/dist/src/foundation/native-host-protocol/proof-gate.d.ts +0 -1
  85. package/dist/src/foundation/native-host-protocol/proof-gate.js +0 -1
  86. package/dist/src/foundation/owned-ui-contracts/extension-ui.d.ts +0 -1
  87. package/dist/src/foundation/owned-ui-contracts/extension-ui.js +0 -1
  88. package/dist/src/foundation/owned-ui-contracts/index.d.ts +0 -1
  89. package/dist/src/foundation/owned-ui-contracts/index.js +0 -1
  90. package/dist/src/foundation/owned-ui-contracts/model.d.ts +0 -1
  91. package/dist/src/foundation/owned-ui-contracts/model.js +0 -1
  92. package/dist/src/foundation/owned-ui-contracts/validation.d.ts +0 -1
  93. package/dist/src/foundation/owned-ui-contracts/validation.js +0 -1
  94. package/dist/src/foundation/pi-component-adapter/components.d.ts +0 -1
  95. package/dist/src/foundation/pi-component-adapter/components.js +0 -1
  96. package/dist/src/foundation/pi-component-adapter/conformance.d.ts +1 -1
  97. package/dist/src/foundation/pi-component-adapter/conformance.js +10 -4
  98. package/dist/src/foundation/pi-component-adapter/index.d.ts +0 -1
  99. package/dist/src/foundation/pi-component-adapter/index.js +0 -1
  100. package/dist/src/foundation/pi-component-adapter/resources/builtin-themes.d.ts +165 -0
  101. package/dist/src/foundation/pi-component-adapter/resources/builtin-themes.js +166 -0
  102. package/dist/src/foundation/pi-component-adapter/shell-components.d.ts +0 -1
  103. package/dist/src/foundation/pi-component-adapter/shell-components.js +0 -1
  104. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.d.ts +0 -1
  105. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js +10 -13
  106. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.d.ts +0 -1
  107. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js +0 -1
  108. package/dist/src/foundation/pi-component-adapter/shell-footer-status.d.ts +0 -1
  109. package/dist/src/foundation/pi-component-adapter/shell-footer-status.js +5 -62
  110. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts +0 -1
  111. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js +0 -1
  112. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.d.ts +0 -1
  113. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js +0 -1
  114. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts +0 -1
  115. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js +0 -1
  116. package/dist/src/foundation/pi-component-adapter/theme.d.ts +0 -1
  117. package/dist/src/foundation/pi-component-adapter/theme.js +0 -1
  118. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts +0 -1
  119. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js +0 -1
  120. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts +0 -1
  121. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.js +0 -1
  122. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts +0 -1
  123. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js +0 -1
  124. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts +0 -1
  125. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.js +0 -1
  126. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts +0 -1
  127. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js +3 -27
  128. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts +0 -1
  129. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js +0 -1
  130. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts +0 -1
  131. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js +0 -1
  132. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.d.ts +0 -1
  133. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.js +0 -1
  134. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.d.ts +0 -1
  135. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js +0 -1
  136. package/dist/src/foundation/pi-component-adapter/upstream/components/owned-editor.d.ts +18 -0
  137. package/dist/src/foundation/pi-component-adapter/upstream/components/owned-editor.js +55 -0
  138. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts +0 -1
  139. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js +0 -1
  140. package/dist/src/foundation/pi-component-adapter/upstream/components/session-footer.d.ts +10 -0
  141. package/dist/src/foundation/pi-component-adapter/upstream/components/session-footer.js +120 -0
  142. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.d.ts +0 -1
  143. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js +0 -1
  144. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts +0 -1
  145. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js +0 -1
  146. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts +1 -2
  147. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js +1 -2
  148. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts +0 -1
  149. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js +0 -1
  150. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts +0 -1
  151. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js +0 -1
  152. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts +0 -1
  153. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js +0 -1
  154. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.d.ts +0 -1
  155. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.js +0 -1
  156. package/dist/src/foundation/pi-component-adapter/upstream/model-search.d.ts +0 -1
  157. package/dist/src/foundation/pi-component-adapter/upstream/model-search.js +0 -1
  158. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.d.ts +0 -1
  159. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.js +1 -2
  160. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts +0 -1
  161. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js +18 -15
  162. package/dist/src/foundation/pi-engine-adapter/adapter.d.ts +2 -202
  163. package/dist/src/foundation/pi-engine-adapter/adapter.js +76 -174
  164. package/dist/src/foundation/pi-engine-adapter/conformance.d.ts +24 -1
  165. package/dist/src/foundation/pi-engine-adapter/conformance.js +60 -15
  166. package/dist/src/foundation/pi-engine-adapter/index.d.ts +6 -1
  167. package/dist/src/foundation/pi-engine-adapter/index.js +6 -1
  168. package/dist/src/foundation/pi-engine-adapter/model-auth-integration.d.ts +30 -0
  169. package/dist/src/foundation/pi-engine-adapter/model-auth-integration.js +61 -0
  170. package/dist/src/foundation/pi-engine-adapter/public-main-entry.d.ts +5 -0
  171. package/dist/src/foundation/pi-engine-adapter/public-main-entry.js +18 -0
  172. package/dist/src/foundation/pi-engine-adapter/resource-extension-integration.d.ts +31 -0
  173. package/dist/src/foundation/pi-engine-adapter/resource-extension-integration.js +80 -0
  174. package/dist/src/foundation/pi-engine-adapter/runtime-integration.d.ts +18 -0
  175. package/dist/src/foundation/pi-engine-adapter/runtime-integration.js +32 -0
  176. package/dist/src/foundation/pi-engine-adapter/session-integration.d.ts +43 -0
  177. package/dist/src/foundation/pi-engine-adapter/session-integration.js +97 -0
  178. package/dist/src/foundation/pi-engine-adapter/settings-integration.d.ts +17 -0
  179. package/dist/src/foundation/pi-engine-adapter/settings-integration.js +85 -0
  180. package/dist/src/foundation/pi-engine-adapter/workflow-controllers.d.ts +20 -0
  181. package/dist/src/foundation/pi-engine-adapter/workflow-controllers.js +48 -0
  182. package/dist/src/foundation/pi-engine-adapter/workflows.d.ts +0 -1
  183. package/dist/src/foundation/pi-engine-adapter/workflows.js +0 -1
  184. package/dist/src/foundation/pi-owned-ui-integration/index.d.ts +1 -0
  185. package/dist/src/foundation/pi-owned-ui-integration/index.js +1 -0
  186. package/dist/src/{features/owned-ui/pi-session-shell.d.ts → foundation/pi-owned-ui-integration/session-shell.d.ts} +17 -14
  187. package/dist/src/{features/owned-ui/pi-session-shell.js → foundation/pi-owned-ui-integration/session-shell.js} +59 -60
  188. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.d.ts +0 -1
  189. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js +0 -1
  190. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.d.ts +8 -4
  191. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.js +22 -9
  192. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.d.ts +0 -2
  193. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.js +1 -2
  194. package/dist/src/foundation/pi-tui-runtime-adapter/index.d.ts +1 -1
  195. package/dist/src/foundation/pi-tui-runtime-adapter/index.js +1 -1
  196. package/dist/src/foundation/pi-tui-runtime-adapter/presentation-adapter.d.ts +4 -0
  197. package/dist/src/foundation/pi-tui-runtime-adapter/presentation-adapter.js +48 -0
  198. package/dist/src/foundation/presentation-contracts/index.d.ts +96 -0
  199. package/dist/src/foundation/presentation-contracts/index.js +38 -0
  200. package/dist/src/foundation/protocol/client.d.ts +0 -1
  201. package/dist/src/foundation/protocol/client.js +0 -1
  202. package/dist/src/foundation/protocol/index.d.ts +0 -1
  203. package/dist/src/foundation/protocol/index.js +0 -1
  204. package/dist/src/foundation/protocol/messages.d.ts +1 -2
  205. package/dist/src/foundation/protocol/messages.js +2 -2
  206. package/dist/src/foundation/release/bootstrap.d.ts +0 -1
  207. package/dist/src/foundation/release/bootstrap.js +55 -22
  208. package/dist/src/foundation/release/cohort-selection.d.ts +0 -1
  209. package/dist/src/foundation/release/cohort-selection.js +0 -1
  210. package/dist/src/foundation/release/cohort-state.d.ts +3 -2
  211. package/dist/src/foundation/release/cohort-state.js +5 -4
  212. package/dist/src/foundation/release/concurrency.d.ts +1 -0
  213. package/dist/src/foundation/release/concurrency.js +17 -0
  214. package/dist/src/foundation/release/development-preview-release.d.ts +2 -2
  215. package/dist/src/foundation/release/development-preview-release.js +3 -2
  216. package/dist/src/foundation/release/index.d.ts +0 -1
  217. package/dist/src/foundation/release/index.js +0 -1
  218. package/dist/src/foundation/release/process-cleanup.d.ts +0 -1
  219. package/dist/src/foundation/release/process-cleanup.js +0 -1
  220. package/dist/src/foundation/release/release-gc.d.ts +0 -1
  221. package/dist/src/foundation/release/release-gc.js +0 -1
  222. package/dist/src/foundation/release/release-store.d.ts +24 -6
  223. package/dist/src/foundation/release/release-store.js +56 -21
  224. package/dist/src/foundation/release/release.d.ts +5 -6
  225. package/dist/src/foundation/release/release.js +21 -19
  226. package/dist/src/foundation/release/stable-release.d.ts +2 -2
  227. package/dist/src/foundation/release/stable-release.js +6 -5
  228. package/dist/src/foundation/release/update-transaction.d.ts +2 -2
  229. package/dist/src/foundation/release/update-transaction.js +8 -7
  230. package/dist/src/foundation/release/update.d.ts +2 -3
  231. package/dist/src/foundation/release/update.js +31 -29
  232. package/dist/src/foundation/storage/control-store.d.ts +0 -1
  233. package/dist/src/foundation/storage/control-store.js +28 -7
  234. package/dist/src/foundation/storage/index.d.ts +0 -1
  235. package/dist/src/foundation/storage/index.js +0 -1
  236. package/dist/src/foundation/structured-agent-runtime/backpressure.d.ts +0 -1
  237. package/dist/src/foundation/structured-agent-runtime/backpressure.js +0 -1
  238. package/dist/src/foundation/structured-agent-runtime/commands.d.ts +0 -1
  239. package/dist/src/foundation/structured-agent-runtime/commands.js +0 -1
  240. package/dist/src/foundation/structured-agent-runtime/handshake.d.ts +2 -3
  241. package/dist/src/foundation/structured-agent-runtime/handshake.js +13 -13
  242. package/dist/src/foundation/structured-agent-runtime/index.d.ts +0 -1
  243. package/dist/src/foundation/structured-agent-runtime/index.js +0 -1
  244. package/dist/src/foundation/structured-agent-runtime/reconnection.d.ts +0 -1
  245. package/dist/src/foundation/structured-agent-runtime/reconnection.js +0 -1
  246. package/dist/src/foundation/structured-agent-runtime/state.d.ts +0 -1
  247. package/dist/src/foundation/structured-agent-runtime/state.js +0 -1
  248. package/dist/src/foundation/supervision/index.d.ts +1 -2
  249. package/dist/src/foundation/supervision/index.js +1 -2
  250. package/dist/src/foundation/supervision/main.d.ts +0 -1
  251. package/dist/src/foundation/supervision/main.js +11 -10
  252. package/dist/src/foundation/supervision/paths.d.ts +1 -2
  253. package/dist/src/foundation/supervision/paths.js +1 -2
  254. package/dist/src/foundation/supervision/server.d.ts +3 -4
  255. package/dist/src/foundation/supervision/server.js +7 -6
  256. package/dist/src/foundation/transparent-terminal/command-resolution.d.ts +0 -1
  257. package/dist/src/foundation/transparent-terminal/command-resolution.js +0 -1
  258. package/dist/src/foundation/transparent-terminal/foreground-broker.d.ts +0 -1
  259. package/dist/src/foundation/transparent-terminal/foreground-broker.js +0 -1
  260. package/dist/src/foundation/transparent-terminal/index.d.ts +1 -1
  261. package/dist/src/foundation/transparent-terminal/index.js +1 -1
  262. package/dist/src/foundation/transparent-terminal/main.d.ts +3 -4
  263. package/dist/src/foundation/transparent-terminal/main.js +8 -21
  264. package/dist/src/foundation/transparent-terminal/native-launcher.d.ts +0 -1
  265. package/dist/src/foundation/transparent-terminal/native-launcher.js +0 -1
  266. package/dist/src/foundation/workspace-contracts/index.d.ts +0 -1
  267. package/dist/src/foundation/workspace-contracts/index.js +0 -1
  268. package/dist/src/foundation/workspace-contracts/model.d.ts +0 -1
  269. package/dist/src/foundation/workspace-contracts/model.js +0 -1
  270. package/dist/src/foundation/workspace-contracts/validation.d.ts +0 -1
  271. package/dist/src/foundation/workspace-contracts/validation.js +0 -1
  272. package/dist/src/product-identity.d.ts +37 -0
  273. package/dist/src/product-identity.js +149 -0
  274. package/dist/src/product-identity.json +96 -0
  275. package/docs/architecture/boundaries.md +2 -2
  276. package/docs/architecture/project-structure.md +2 -2
  277. package/docs/architecture/resource-and-data-policy.md +1 -1
  278. package/docs/architecture/terminal-host-proof-gate.md +2 -2
  279. package/docs/architecture/terminal-host-provenance.md +3 -3
  280. package/docs/architecture/terminal-host-spike-evidence.md +1 -1
  281. package/docs/architecture/toolchain.md +33 -7
  282. package/docs/features/launch-profiles.md +6 -6
  283. package/docs/manual-pi-boundary-candidate.md +33 -0
  284. package/docs/manual-transparent-checkpoint.md +11 -11
  285. package/package.json +10 -3
  286. package/bin/addone-ui.js +0 -20
  287. package/dist/src/cli/dispatch.d.ts.map +0 -1
  288. package/dist/src/cli/dispatch.js.map +0 -1
  289. package/dist/src/cli/index.d.ts.map +0 -1
  290. package/dist/src/cli/index.js.map +0 -1
  291. package/dist/src/cli/version-stats.d.ts.map +0 -1
  292. package/dist/src/cli/version-stats.js.map +0 -1
  293. package/dist/src/cli/version.d.ts.map +0 -1
  294. package/dist/src/cli/version.js.map +0 -1
  295. package/dist/src/features/launch/development-launch.d.ts.map +0 -1
  296. package/dist/src/features/launch/development-launch.js.map +0 -1
  297. package/dist/src/features/launch/index.d.ts.map +0 -1
  298. package/dist/src/features/launch/index.js.map +0 -1
  299. package/dist/src/features/launch/initialize-profile.d.ts.map +0 -1
  300. package/dist/src/features/launch/initialize-profile.js.map +0 -1
  301. package/dist/src/features/launch/intent.d.ts.map +0 -1
  302. package/dist/src/features/launch/intent.js.map +0 -1
  303. package/dist/src/features/launch/prepare-launch.d.ts.map +0 -1
  304. package/dist/src/features/launch/prepare-launch.js.map +0 -1
  305. package/dist/src/features/launch/profile-paths.d.ts.map +0 -1
  306. package/dist/src/features/launch/profile-paths.js.map +0 -1
  307. package/dist/src/features/launch/profiles.d.ts.map +0 -1
  308. package/dist/src/features/launch/profiles.js.map +0 -1
  309. package/dist/src/features/launch/runtime-selection.d.ts.map +0 -1
  310. package/dist/src/features/launch/runtime-selection.js.map +0 -1
  311. package/dist/src/features/owned-ui/customization.d.ts.map +0 -1
  312. package/dist/src/features/owned-ui/customization.js.map +0 -1
  313. package/dist/src/features/owned-ui/diagnostics.d.ts.map +0 -1
  314. package/dist/src/features/owned-ui/diagnostics.js.map +0 -1
  315. package/dist/src/features/owned-ui/index.d.ts.map +0 -1
  316. package/dist/src/features/owned-ui/index.js.map +0 -1
  317. package/dist/src/features/owned-ui/pi-session-shell.d.ts.map +0 -1
  318. package/dist/src/features/owned-ui/pi-session-shell.js.map +0 -1
  319. package/dist/src/features/owned-ui/run.d.ts.map +0 -1
  320. package/dist/src/features/owned-ui/run.js.map +0 -1
  321. package/dist/src/features/workspace/capabilities.d.ts.map +0 -1
  322. package/dist/src/features/workspace/capabilities.js.map +0 -1
  323. package/dist/src/features/workspace/index.d.ts.map +0 -1
  324. package/dist/src/features/workspace/index.js.map +0 -1
  325. package/dist/src/features/workspace/presentation.d.ts.map +0 -1
  326. package/dist/src/features/workspace/presentation.js.map +0 -1
  327. package/dist/src/features/workspace/reconciliation.d.ts.map +0 -1
  328. package/dist/src/features/workspace/reconciliation.js.map +0 -1
  329. package/dist/src/features/workspace/reducer.d.ts.map +0 -1
  330. package/dist/src/features/workspace/reducer.js.map +0 -1
  331. package/dist/src/features/workspace/router.d.ts.map +0 -1
  332. package/dist/src/features/workspace/router.js.map +0 -1
  333. package/dist/src/features/workspace/store.d.ts.map +0 -1
  334. package/dist/src/features/workspace/store.js.map +0 -1
  335. package/dist/src/foundation/lifecycle/index.d.ts.map +0 -1
  336. package/dist/src/foundation/lifecycle/index.js.map +0 -1
  337. package/dist/src/foundation/lifecycle/model.d.ts.map +0 -1
  338. package/dist/src/foundation/lifecycle/model.js.map +0 -1
  339. package/dist/src/foundation/lifecycle/paths.d.ts.map +0 -1
  340. package/dist/src/foundation/lifecycle/paths.js.map +0 -1
  341. package/dist/src/foundation/native-host-protocol/codec.d.ts.map +0 -1
  342. package/dist/src/foundation/native-host-protocol/codec.js.map +0 -1
  343. package/dist/src/foundation/native-host-protocol/evidence.d.ts.map +0 -1
  344. package/dist/src/foundation/native-host-protocol/evidence.js.map +0 -1
  345. package/dist/src/foundation/native-host-protocol/index.d.ts.map +0 -1
  346. package/dist/src/foundation/native-host-protocol/index.js.map +0 -1
  347. package/dist/src/foundation/native-host-protocol/messages.d.ts.map +0 -1
  348. package/dist/src/foundation/native-host-protocol/messages.js.map +0 -1
  349. package/dist/src/foundation/native-host-protocol/proof-gate.d.ts.map +0 -1
  350. package/dist/src/foundation/native-host-protocol/proof-gate.js.map +0 -1
  351. package/dist/src/foundation/owned-ui-contracts/extension-ui.d.ts.map +0 -1
  352. package/dist/src/foundation/owned-ui-contracts/extension-ui.js.map +0 -1
  353. package/dist/src/foundation/owned-ui-contracts/index.d.ts.map +0 -1
  354. package/dist/src/foundation/owned-ui-contracts/index.js.map +0 -1
  355. package/dist/src/foundation/owned-ui-contracts/model.d.ts.map +0 -1
  356. package/dist/src/foundation/owned-ui-contracts/model.js.map +0 -1
  357. package/dist/src/foundation/owned-ui-contracts/validation.d.ts.map +0 -1
  358. package/dist/src/foundation/owned-ui-contracts/validation.js.map +0 -1
  359. package/dist/src/foundation/pi-component-adapter/components.d.ts.map +0 -1
  360. package/dist/src/foundation/pi-component-adapter/components.js.map +0 -1
  361. package/dist/src/foundation/pi-component-adapter/conformance.d.ts.map +0 -1
  362. package/dist/src/foundation/pi-component-adapter/conformance.js.map +0 -1
  363. package/dist/src/foundation/pi-component-adapter/index.d.ts.map +0 -1
  364. package/dist/src/foundation/pi-component-adapter/index.js.map +0 -1
  365. package/dist/src/foundation/pi-component-adapter/shell-components.d.ts.map +0 -1
  366. package/dist/src/foundation/pi-component-adapter/shell-components.js.map +0 -1
  367. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.d.ts.map +0 -1
  368. package/dist/src/foundation/pi-component-adapter/shell-editor-autocomplete.js.map +0 -1
  369. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.d.ts.map +0 -1
  370. package/dist/src/foundation/pi-component-adapter/shell-extension-ui.js.map +0 -1
  371. package/dist/src/foundation/pi-component-adapter/shell-footer-status.d.ts.map +0 -1
  372. package/dist/src/foundation/pi-component-adapter/shell-footer-status.js.map +0 -1
  373. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.d.ts.map +0 -1
  374. package/dist/src/foundation/pi-component-adapter/shell-presenters-transcript.js.map +0 -1
  375. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.d.ts.map +0 -1
  376. package/dist/src/foundation/pi-component-adapter/shell-selectors-dialogs.js.map +0 -1
  377. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.d.ts.map +0 -1
  378. package/dist/src/foundation/pi-component-adapter/shell-shared-facade.js.map +0 -1
  379. package/dist/src/foundation/pi-component-adapter/theme.d.ts.map +0 -1
  380. package/dist/src/foundation/pi-component-adapter/theme.js.map +0 -1
  381. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.d.ts.map +0 -1
  382. package/dist/src/foundation/pi-component-adapter/upstream/adjacent/core/keybindings.js.map +0 -1
  383. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.d.ts.map +0 -1
  384. package/dist/src/foundation/pi-component-adapter/upstream/components/countdown-timer.js.map +0 -1
  385. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.d.ts.map +0 -1
  386. package/dist/src/foundation/pi-component-adapter/upstream/components/custom-entry.js.map +0 -1
  387. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.d.ts.map +0 -1
  388. package/dist/src/foundation/pi-component-adapter/upstream/components/daxnuts.js.map +0 -1
  389. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.d.ts.map +0 -1
  390. package/dist/src/foundation/pi-component-adapter/upstream/components/earendil-announcement.js.map +0 -1
  391. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.d.ts.map +0 -1
  392. package/dist/src/foundation/pi-component-adapter/upstream/components/extension-editor.js.map +0 -1
  393. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.d.ts.map +0 -1
  394. package/dist/src/foundation/pi-component-adapter/upstream/components/first-time-setup.js.map +0 -1
  395. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.d.ts.map +0 -1
  396. package/dist/src/foundation/pi-component-adapter/upstream/components/markdown-transform.js.map +0 -1
  397. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.d.ts.map +0 -1
  398. package/dist/src/foundation/pi-component-adapter/upstream/components/mermaid.js.map +0 -1
  399. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.d.ts.map +0 -1
  400. package/dist/src/foundation/pi-component-adapter/upstream/components/scoped-models-selector.js.map +0 -1
  401. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.d.ts.map +0 -1
  402. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector-search.js.map +0 -1
  403. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.d.ts.map +0 -1
  404. package/dist/src/foundation/pi-component-adapter/upstream/components/session-selector.js.map +0 -1
  405. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.d.ts.map +0 -1
  406. package/dist/src/foundation/pi-component-adapter/upstream/components/skill-invocation-message.js.map +0 -1
  407. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.d.ts.map +0 -1
  408. package/dist/src/foundation/pi-component-adapter/upstream/components/status-indicator.js.map +0 -1
  409. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.d.ts.map +0 -1
  410. package/dist/src/foundation/pi-component-adapter/upstream/components/tree-selector.js.map +0 -1
  411. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.d.ts.map +0 -1
  412. package/dist/src/foundation/pi-component-adapter/upstream/components/trust-selector.js.map +0 -1
  413. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.d.ts.map +0 -1
  414. package/dist/src/foundation/pi-component-adapter/upstream/external-editor.js.map +0 -1
  415. package/dist/src/foundation/pi-component-adapter/upstream/model-search.d.ts.map +0 -1
  416. package/dist/src/foundation/pi-component-adapter/upstream/model-search.js.map +0 -1
  417. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.d.ts.map +0 -1
  418. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme-controller.js.map +0 -1
  419. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.d.ts.map +0 -1
  420. package/dist/src/foundation/pi-component-adapter/upstream/theme/theme.js.map +0 -1
  421. package/dist/src/foundation/pi-engine-adapter/adapter.d.ts.map +0 -1
  422. package/dist/src/foundation/pi-engine-adapter/adapter.js.map +0 -1
  423. package/dist/src/foundation/pi-engine-adapter/conformance.d.ts.map +0 -1
  424. package/dist/src/foundation/pi-engine-adapter/conformance.js.map +0 -1
  425. package/dist/src/foundation/pi-engine-adapter/index.d.ts.map +0 -1
  426. package/dist/src/foundation/pi-engine-adapter/index.js.map +0 -1
  427. package/dist/src/foundation/pi-engine-adapter/workflows.d.ts.map +0 -1
  428. package/dist/src/foundation/pi-engine-adapter/workflows.js.map +0 -1
  429. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.d.ts.map +0 -1
  430. package/dist/src/foundation/pi-tui-runtime-adapter/adapter.js.map +0 -1
  431. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.d.ts.map +0 -1
  432. package/dist/src/foundation/pi-tui-runtime-adapter/conformance.js.map +0 -1
  433. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.d.ts.map +0 -1
  434. package/dist/src/foundation/pi-tui-runtime-adapter/contracts.js.map +0 -1
  435. package/dist/src/foundation/pi-tui-runtime-adapter/index.d.ts.map +0 -1
  436. package/dist/src/foundation/pi-tui-runtime-adapter/index.js.map +0 -1
  437. package/dist/src/foundation/protocol/client.d.ts.map +0 -1
  438. package/dist/src/foundation/protocol/client.js.map +0 -1
  439. package/dist/src/foundation/protocol/index.d.ts.map +0 -1
  440. package/dist/src/foundation/protocol/index.js.map +0 -1
  441. package/dist/src/foundation/protocol/messages.d.ts.map +0 -1
  442. package/dist/src/foundation/protocol/messages.js.map +0 -1
  443. package/dist/src/foundation/release/bootstrap.d.ts.map +0 -1
  444. package/dist/src/foundation/release/bootstrap.js.map +0 -1
  445. package/dist/src/foundation/release/cohort-selection.d.ts.map +0 -1
  446. package/dist/src/foundation/release/cohort-selection.js.map +0 -1
  447. package/dist/src/foundation/release/cohort-state.d.ts.map +0 -1
  448. package/dist/src/foundation/release/cohort-state.js.map +0 -1
  449. package/dist/src/foundation/release/development-preview-release.d.ts.map +0 -1
  450. package/dist/src/foundation/release/development-preview-release.js.map +0 -1
  451. package/dist/src/foundation/release/index.d.ts.map +0 -1
  452. package/dist/src/foundation/release/index.js.map +0 -1
  453. package/dist/src/foundation/release/process-cleanup.d.ts.map +0 -1
  454. package/dist/src/foundation/release/process-cleanup.js.map +0 -1
  455. package/dist/src/foundation/release/release-gc.d.ts.map +0 -1
  456. package/dist/src/foundation/release/release-gc.js.map +0 -1
  457. package/dist/src/foundation/release/release-store.d.ts.map +0 -1
  458. package/dist/src/foundation/release/release-store.js.map +0 -1
  459. package/dist/src/foundation/release/release.d.ts.map +0 -1
  460. package/dist/src/foundation/release/release.js.map +0 -1
  461. package/dist/src/foundation/release/stable-release.d.ts.map +0 -1
  462. package/dist/src/foundation/release/stable-release.js.map +0 -1
  463. package/dist/src/foundation/release/update-transaction.d.ts.map +0 -1
  464. package/dist/src/foundation/release/update-transaction.js.map +0 -1
  465. package/dist/src/foundation/release/update.d.ts.map +0 -1
  466. package/dist/src/foundation/release/update.js.map +0 -1
  467. package/dist/src/foundation/storage/control-store.d.ts.map +0 -1
  468. package/dist/src/foundation/storage/control-store.js.map +0 -1
  469. package/dist/src/foundation/storage/index.d.ts.map +0 -1
  470. package/dist/src/foundation/storage/index.js.map +0 -1
  471. package/dist/src/foundation/structured-agent-runtime/backpressure.d.ts.map +0 -1
  472. package/dist/src/foundation/structured-agent-runtime/backpressure.js.map +0 -1
  473. package/dist/src/foundation/structured-agent-runtime/commands.d.ts.map +0 -1
  474. package/dist/src/foundation/structured-agent-runtime/commands.js.map +0 -1
  475. package/dist/src/foundation/structured-agent-runtime/handshake.d.ts.map +0 -1
  476. package/dist/src/foundation/structured-agent-runtime/handshake.js.map +0 -1
  477. package/dist/src/foundation/structured-agent-runtime/index.d.ts.map +0 -1
  478. package/dist/src/foundation/structured-agent-runtime/index.js.map +0 -1
  479. package/dist/src/foundation/structured-agent-runtime/reconnection.d.ts.map +0 -1
  480. package/dist/src/foundation/structured-agent-runtime/reconnection.js.map +0 -1
  481. package/dist/src/foundation/structured-agent-runtime/state.d.ts.map +0 -1
  482. package/dist/src/foundation/structured-agent-runtime/state.js.map +0 -1
  483. package/dist/src/foundation/supervision/index.d.ts.map +0 -1
  484. package/dist/src/foundation/supervision/index.js.map +0 -1
  485. package/dist/src/foundation/supervision/main.d.ts.map +0 -1
  486. package/dist/src/foundation/supervision/main.js.map +0 -1
  487. package/dist/src/foundation/supervision/paths.d.ts.map +0 -1
  488. package/dist/src/foundation/supervision/paths.js.map +0 -1
  489. package/dist/src/foundation/supervision/server.d.ts.map +0 -1
  490. package/dist/src/foundation/supervision/server.js.map +0 -1
  491. package/dist/src/foundation/transparent-terminal/command-resolution.d.ts.map +0 -1
  492. package/dist/src/foundation/transparent-terminal/command-resolution.js.map +0 -1
  493. package/dist/src/foundation/transparent-terminal/foreground-broker.d.ts.map +0 -1
  494. package/dist/src/foundation/transparent-terminal/foreground-broker.js.map +0 -1
  495. package/dist/src/foundation/transparent-terminal/index.d.ts.map +0 -1
  496. package/dist/src/foundation/transparent-terminal/index.js.map +0 -1
  497. package/dist/src/foundation/transparent-terminal/main.d.ts.map +0 -1
  498. package/dist/src/foundation/transparent-terminal/main.js.map +0 -1
  499. package/dist/src/foundation/transparent-terminal/native-launcher.d.ts.map +0 -1
  500. package/dist/src/foundation/transparent-terminal/native-launcher.js.map +0 -1
  501. package/dist/src/foundation/workspace-contracts/index.d.ts.map +0 -1
  502. package/dist/src/foundation/workspace-contracts/index.js.map +0 -1
  503. package/dist/src/foundation/workspace-contracts/model.d.ts.map +0 -1
  504. package/dist/src/foundation/workspace-contracts/model.js.map +0 -1
  505. package/dist/src/foundation/workspace-contracts/validation.d.ts.map +0 -1
  506. package/dist/src/foundation/workspace-contracts/validation.js.map +0 -1
  507. /package/bin/{addone-supervisor.js → a1-supervisor.js} +0 -0
@@ -0,0 +1,85 @@
1
+ export const EXPOSED_SETTING_KEYS = Object.freeze([
2
+ "autoCompact", "showImages", "imageWidthCells", "autoResizeImages", "blockImages", "enableSkillCommands",
3
+ "steeringMode", "followUpMode", "transport", "httpIdleTimeoutMs", "thinkingLevel", "theme", "hideThinkingBlock",
4
+ "mermaidRenderingMode", "showCacheMissNotices", "collapseChangelog", "enableInstallTelemetry", "quietStartup",
5
+ "defaultProjectTrust", "doubleEscapeAction", "treeFilterMode", "showHardwareCursor", "editorPaddingX", "outputPad",
6
+ "autocompleteMaxVisible", "clearOnShrink", "showTerminalProgress", "tuiMode", "fullscreenExitOutput", "fullscreenScrollbar", "warnings",
7
+ ]);
8
+ export class PiSettingsIntegration {
9
+ settings;
10
+ capabilities = { write: true, flush: true };
11
+ #operations;
12
+ constructor(settings) {
13
+ this.settings = settings;
14
+ this.#operations = new Map(operations(settings).map(operation => [operation.descriptor.key, operation]));
15
+ if (this.#operations.size !== EXPOSED_SETTING_KEYS.length || EXPOSED_SETTING_KEYS.some(key => !this.#operations.has(key))) {
16
+ throw new Error("Pi settings integration does not cover every A1-exposed setting");
17
+ }
18
+ }
19
+ async listSettings() { return [...this.#operations.values()].map(operation => operation.descriptor); }
20
+ async readSetting(key) { return this.#operations.get(key)?.read(); }
21
+ async writeSetting(key, value) { this.writeSettingNow(key, value); }
22
+ writeSettingNow(key, value) {
23
+ const operation = this.#operations.get(key);
24
+ if (!operation)
25
+ throw new Error(`setting is unavailable: ${key}`);
26
+ operation.write(value);
27
+ }
28
+ async flush() { await this.settings.flush(); }
29
+ }
30
+ function operations(settings) {
31
+ return [
32
+ bool("autoCompact", () => settings.getCompactionEnabled(), value => settings.setCompactionEnabled(value)),
33
+ bool("showImages", () => settings.getShowImages(), value => settings.setShowImages(value)),
34
+ numberSetting("imageWidthCells", () => settings.getImageWidthCells(), value => settings.setImageWidthCells(value), 1),
35
+ bool("autoResizeImages", () => settings.getImageAutoResize(), value => settings.setImageAutoResize(value)),
36
+ bool("blockImages", () => settings.getBlockImages(), value => settings.setBlockImages(value)),
37
+ bool("enableSkillCommands", () => settings.getEnableSkillCommands(), value => settings.setEnableSkillCommands(value)),
38
+ choice("steeringMode", ["all", "one-at-a-time"], () => settings.getSteeringMode(), value => settings.setSteeringMode(value)),
39
+ choice("followUpMode", ["all", "one-at-a-time"], () => settings.getFollowUpMode(), value => settings.setFollowUpMode(value)),
40
+ choice("transport", ["sse", "websocket", "websocket-cached", "auto"], () => settings.getTransport(), value => settings.setTransport(value)),
41
+ numberSetting("httpIdleTimeoutMs", () => settings.getHttpIdleTimeoutMs(), value => settings.setHttpIdleTimeoutMs(value), 0),
42
+ choice("thinkingLevel", ["off", "minimal", "low", "medium", "high", "xhigh"], () => settings.getDefaultThinkingLevel() ?? "medium", value => settings.setDefaultThinkingLevel(value)),
43
+ stringSetting("theme", () => settings.getTheme() ?? "default", value => settings.setTheme(value)),
44
+ bool("hideThinkingBlock", () => settings.getHideThinkingBlock(), value => settings.setHideThinkingBlock(value)),
45
+ choice("mermaidRenderingMode", ["off", "final", "streaming"], () => settings.getMermaidRenderingMode(), value => settings.setMermaidRenderingMode(value)),
46
+ bool("showCacheMissNotices", () => settings.getShowCacheMissNotices(), value => settings.setShowCacheMissNotices(value)),
47
+ bool("collapseChangelog", () => settings.getCollapseChangelog(), value => settings.setCollapseChangelog(value)),
48
+ bool("enableInstallTelemetry", () => settings.getEnableInstallTelemetry(), value => settings.setEnableInstallTelemetry(value)),
49
+ bool("quietStartup", () => settings.getQuietStartup(), value => settings.setQuietStartup(value)),
50
+ choice("defaultProjectTrust", ["ask", "always", "never"], () => settings.getDefaultProjectTrust(), value => settings.setDefaultProjectTrust(value)),
51
+ choice("doubleEscapeAction", ["fork", "tree", "none"], () => settings.getDoubleEscapeAction(), value => settings.setDoubleEscapeAction(value)),
52
+ choice("treeFilterMode", ["default", "no-tools", "user-only", "labeled-only", "all"], () => settings.getTreeFilterMode(), value => settings.setTreeFilterMode(value)),
53
+ bool("showHardwareCursor", () => settings.getShowHardwareCursor(), value => settings.setShowHardwareCursor(value)),
54
+ numberSetting("editorPaddingX", () => settings.getEditorPaddingX(), value => settings.setEditorPaddingX(value), 0),
55
+ choice("outputPad", [0, 1], () => settings.getOutputPad(), value => settings.setOutputPad(value)),
56
+ numberSetting("autocompleteMaxVisible", () => settings.getAutocompleteMaxVisible(), value => settings.setAutocompleteMaxVisible(value), 1),
57
+ bool("clearOnShrink", () => settings.getClearOnShrink(), value => settings.setClearOnShrink(value)),
58
+ bool("showTerminalProgress", () => settings.getShowTerminalProgress(), value => settings.setShowTerminalProgress(value)),
59
+ choice("tuiMode", ["regular", "fullscreen"], () => settings.getTuiMode(), value => settings.setTuiMode(value)),
60
+ choice("fullscreenExitOutput", ["transcript", "resume-hint"], () => settings.getFullscreenExitOutput(), value => settings.setFullscreenExitOutput(value)),
61
+ choice("fullscreenScrollbar", ["hidden", "auto", "always"], () => settings.getFullscreenScrollbar(), value => settings.setFullscreenScrollbar(value)),
62
+ jsonObject("warnings", () => settings.getWarnings(), value => settings.setWarnings(value)),
63
+ ];
64
+ }
65
+ function bool(key, read, write) {
66
+ return { descriptor: { key, valueType: "boolean", writable: true }, read, write(value) { if (typeof value !== "boolean")
67
+ invalid(key); write(value); } };
68
+ }
69
+ function numberSetting(key, read, write, minimum) {
70
+ return { descriptor: { key, valueType: "number", writable: true }, read, write(value) { if (typeof value !== "number" || !Number.isSafeInteger(value) || value < minimum)
71
+ invalid(key); write(value); } };
72
+ }
73
+ function stringSetting(key, read, write) {
74
+ return { descriptor: { key, valueType: "string", writable: true }, read, write(value) { if (typeof value !== "string" || value.length === 0)
75
+ invalid(key); write(value); } };
76
+ }
77
+ function jsonObject(key, read, write) {
78
+ return { descriptor: { key, valueType: "json", writable: true }, read: () => Object.fromEntries(Object.entries(read()).filter((entry) => typeof entry[1] === "boolean")), write(value) { if (!value || typeof value !== "object" || Array.isArray(value))
79
+ invalid(key); write(value); } };
80
+ }
81
+ function choice(key, choices, read, write) {
82
+ return { descriptor: { key, valueType: "enum", writable: true, choices }, read, write(value) { if (!choices.includes(value))
83
+ invalid(key); write(value); } };
84
+ }
85
+ function invalid(key) { throw new TypeError(`setting value is invalid: ${key}`); }
@@ -0,0 +1,20 @@
1
+ import type { AgentJsonValue, AgentWorkflowDescriptor, AgentWorkflowPort } from "../agent-engine-contracts/index.js";
2
+ import { type PiWorkflowRoute } from "./workflows.js";
3
+ export type WorkflowCapability = "prompt" | "abort" | "compact" | "bash" | "models.read" | "models.write" | "auth.login" | "auth.logout" | "settings.read" | "settings.write" | "resources.read" | "resources.reload" | "session.read" | "session.new" | "session.resume" | "session.fork" | "session.tree" | "session.import" | "clipboard.write" | "export.write" | "share.write" | "process.quit" | "diagnostics.read";
4
+ export interface WorkflowControllerResult {
5
+ readonly outcome: "completed" | "cancelled" | "failed";
6
+ readonly message: string;
7
+ readonly value?: AgentJsonValue;
8
+ }
9
+ export declare class PiWorkflowControllerPort implements AgentWorkflowPort {
10
+ #private;
11
+ private readonly execute;
12
+ readonly capabilities: {
13
+ execute: boolean;
14
+ };
15
+ constructor(available: readonly WorkflowCapability[], execute: (workflowId: PiWorkflowRoute, input: AgentJsonValue, signal?: AbortSignal) => Promise<WorkflowControllerResult>);
16
+ listWorkflows(): Promise<readonly AgentWorkflowDescriptor[]>;
17
+ executeWorkflow(workflowId: string, input: AgentJsonValue, signal?: AbortSignal): Promise<AgentJsonValue>;
18
+ }
19
+ export declare const PI_BUILTIN_WORKFLOW_ROUTES: readonly ("name" | "share" | "model" | "login" | "logout" | "settings" | "reload" | "compact" | "new" | "resume" | "scoped-models" | "export" | "import" | "copy" | "session" | "changelog" | "hotkeys" | "fork" | "clone" | "tree" | "trust" | "quit" | "debug" | "arminsayshi" | "dementedelves")[];
20
+ export declare const PI_WORKFLOW_CAPABILITIES: readonly WorkflowCapability[];
@@ -0,0 +1,48 @@
1
+ import { PINNED_PI_HIDDEN_COMMAND_NAMES, PINNED_PI_WORKFLOW_COMMAND_NAMES } from "./workflows.js";
2
+ const DEFINITIONS = [
3
+ define("settings", "settings.read", "settings.write"), define("model", "models.read", "models.write"),
4
+ define("scoped-models", "models.read", "models.write"), define("export", "export.write"), define("import", "session.import"),
5
+ define("share", "share.write"), define("copy", "clipboard.write"), define("name", "session.read"), define("session", "session.read"),
6
+ define("changelog", "resources.read"), define("hotkeys", "resources.read"), define("fork", "session.fork"), define("clone", "session.fork"),
7
+ define("tree", "session.tree"), define("trust", "settings.write"), define("login", "auth.login"), define("logout", "auth.logout"),
8
+ define("new", "session.new"), define("compact", "compact"), define("resume", "session.resume"), define("reload", "resources.reload"),
9
+ define("quit", "process.quit"), define("debug", "diagnostics.read"), define("arminsayshi", "resources.read"), define("dementedelves", "resources.read"),
10
+ ];
11
+ export class PiWorkflowControllerPort {
12
+ execute;
13
+ capabilities = { execute: true };
14
+ #available;
15
+ constructor(available, execute) {
16
+ this.execute = execute;
17
+ this.#available = new Set(available);
18
+ }
19
+ async listWorkflows() {
20
+ return DEFINITIONS.map(definition => ({ id: definition.id, label: definition.id, requiredCommands: definition.required }));
21
+ }
22
+ async executeWorkflow(workflowId, input, signal) {
23
+ const definition = DEFINITIONS.find(value => value.id === workflowId);
24
+ if (!definition)
25
+ return failure(`workflow is unavailable: ${workflowId}`);
26
+ const missing = definition.required.filter(capability => !this.#available.has(capability));
27
+ if (missing.length > 0)
28
+ return failure(`${workflowId} requires unavailable capabilities: ${missing.join(", ")}`);
29
+ if (signal?.aborted)
30
+ return { outcome: "cancelled", message: "workflow cancelled" };
31
+ try {
32
+ const result = await this.execute(definition.id, input, signal);
33
+ return { ...result, message: bounded(result.message) };
34
+ }
35
+ catch (error) {
36
+ return failure(`${workflowId} failed: ${error instanceof Error ? error.message : String(error)}`);
37
+ }
38
+ }
39
+ }
40
+ export const PI_BUILTIN_WORKFLOW_ROUTES = Object.freeze([...PINNED_PI_WORKFLOW_COMMAND_NAMES, ...PINNED_PI_HIDDEN_COMMAND_NAMES]);
41
+ export const PI_WORKFLOW_CAPABILITIES = Object.freeze([
42
+ "prompt", "abort", "compact", "bash", "models.read", "models.write", "auth.login", "auth.logout", "settings.read", "settings.write",
43
+ "resources.read", "resources.reload", "session.read", "session.new", "session.resume", "session.fork", "session.tree", "session.import",
44
+ "clipboard.write", "export.write", "share.write", "process.quit", "diagnostics.read",
45
+ ]);
46
+ function define(id, ...required) { return { id, required }; }
47
+ function failure(message) { return { outcome: "failed", message: bounded(message) }; }
48
+ function bounded(message) { return message.length <= 512 ? message : `${message.slice(0, 509)}...`; }
@@ -162,4 +162,3 @@ export interface PiBashWorkflowResult {
162
162
  readonly truncated: boolean;
163
163
  readonly excludeFromContext: boolean;
164
164
  }
165
- //# sourceMappingURL=workflows.d.ts.map
@@ -58,4 +58,3 @@ export const PINNED_PI_SETTINGS_CALLBACKS = [
58
58
  "onWarningsChange",
59
59
  "onCancel",
60
60
  ];
61
- //# sourceMappingURL=workflows.js.map
@@ -0,0 +1 @@
1
+ export * from "./session-shell.js";
@@ -0,0 +1 @@
1
+ export * from "./session-shell.js";
@@ -1,14 +1,17 @@
1
- import type { OwnedUiSessionViewModel, OwnedUiThinkingLevel } from "../../foundation/owned-ui-contracts/index.js";
2
- import { type AdapterCommandResult, type PiEngineAdapter, type PiWorkflowRequest, type PiWorkflowResult } from "../../foundation/pi-engine-adapter/index.js";
3
- import { type PiShellComponentPort, type PiShellEditorPort, type PiShellExtensionRendererResolver, type PiShellHeaderOptions, type PiShellHeaderPort, type PiShellLoadedResourcesPort, type PiShellSelectorOption, type PiShellTranscriptComponentPort } from "../../foundation/pi-component-adapter/index.js";
4
- import { PiTuiRuntimeAdapter, type PiTuiComponentPort, type PiTuiLayoutNode, type PiTuiOverlayHandle, type PiTuiTerminalPort } from "../../foundation/pi-tui-runtime-adapter/index.js";
5
- export interface PiSessionShellOptions {
6
- readonly adapter: PiEngineAdapter;
1
+ import type { OwnedUiSessionViewModel, OwnedUiThinkingLevel } from "../owned-ui-contracts/index.js";
2
+ import { type AdapterCommandResult, type PiEngineAdapter, type PiWorkflowRequest, type PiWorkflowResult } from "../pi-engine-adapter/index.js";
3
+ import { type PiShellComponentPort, type PiShellEditorPort, type PiShellExtensionRendererResolver, type PiShellHeaderOptions, type PiShellHeaderPort, type PiShellLoadedResourcesPort, type PiShellSelectorOption, type PiShellTranscriptComponentPort } from "../pi-component-adapter/index.js";
4
+ import { PiTuiRuntimeAdapter, type PiTuiComponentPort, type PiTuiLayoutNode, type PiTuiOverlayHandle, type PiTuiTerminalPort } from "../pi-tui-runtime-adapter/index.js";
5
+ type OwnedUiBackendPort = PiEngineAdapter;
6
+ type OwnedUiTerminalPort = PiTuiTerminalPort;
7
+ type OwnedUiStartupOptions = PiShellHeaderOptions;
8
+ export interface OwnedUiSessionShellOptions {
9
+ readonly backend: OwnedUiBackendPort;
7
10
  readonly cwd: string;
8
- readonly terminal?: PiTuiTerminalPort;
9
- readonly startup?: PiShellHeaderOptions;
11
+ readonly terminal?: OwnedUiTerminalPort;
12
+ readonly startup?: OwnedUiStartupOptions;
10
13
  }
11
- export declare class PiSessionShellRoot implements PiTuiComponentPort {
14
+ export declare class OwnedUiSessionShellRoot implements PiTuiComponentPort {
12
15
  #private;
13
16
  readonly editor: PiShellEditorPort;
14
17
  readonly header: PiShellHeaderPort;
@@ -54,12 +57,12 @@ export declare class PiSessionShellRoot implements PiTuiComponentPort {
54
57
  setFocused(focused: boolean): void;
55
58
  dispose(): void;
56
59
  }
57
- export declare class PiSessionShell {
60
+ export declare class OwnedUiSessionShell {
58
61
  #private;
59
- readonly adapter: PiEngineAdapter;
60
- readonly root: PiSessionShellRoot;
62
+ readonly backend: OwnedUiBackendPort;
63
+ readonly root: OwnedUiSessionShellRoot;
61
64
  readonly runtime: PiTuiRuntimeAdapter;
62
- constructor(options: PiSessionShellOptions);
65
+ constructor(options: OwnedUiSessionShellOptions);
63
66
  view(): OwnedUiSessionViewModel;
64
67
  start(): void;
65
68
  onView(listener: (view: OwnedUiSessionViewModel) => void): () => void;
@@ -94,4 +97,4 @@ export declare class PiSessionShell {
94
97
  showScopedModelsSelector(): void;
95
98
  dispose(): Promise<void>;
96
99
  }
97
- //# sourceMappingURL=pi-session-shell.d.ts.map
100
+ export {};
@@ -1,7 +1,7 @@
1
- import { PINNED_PI_HIDDEN_COMMAND_NAMES, PINNED_PI_WORKFLOW_COMMAND_NAMES, } from "../../foundation/pi-engine-adapter/index.js";
2
- import { createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellDaxnuts, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellOperationLoader, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellStatus, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, piTheme, renderPiShellStatusText, renderPiShellTranscriptBlock, } from "../../foundation/pi-component-adapter/index.js";
3
- import { PiTuiRuntimeAdapter, } from "../../foundation/pi-tui-runtime-adapter/index.js";
4
- export class PiSessionShellRoot {
1
+ import { PINNED_PI_HIDDEN_COMMAND_NAMES, PINNED_PI_WORKFLOW_COMMAND_NAMES, } from "../pi-engine-adapter/index.js";
2
+ import { createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellDaxnuts, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellOperationLoader, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellStatus, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, piTheme, renderPiShellStatusText, renderPiShellTranscriptBlock, } from "../pi-component-adapter/index.js";
3
+ import { PiTuiRuntimeAdapter, } from "../pi-tui-runtime-adapter/index.js";
4
+ export class OwnedUiSessionShellRoot {
5
5
  editor;
6
6
  header;
7
7
  resources;
@@ -495,8 +495,8 @@ function layoutPort(render, invalidate, handleInput) {
495
495
  ...(handleInput === undefined ? {} : { handleInput }),
496
496
  };
497
497
  }
498
- function shellResourceEntries(adapter) {
499
- const resources = adapter.nonVisualResources().map(resource => ({
498
+ function shellResourceEntries(backend) {
499
+ const resources = backend.nonVisualResources().map(resource => ({
500
500
  section: resource.kind === "skill"
501
501
  ? "Skills"
502
502
  : resource.kind === "prompt-template"
@@ -512,7 +512,7 @@ function shellResourceEntries(adapter) {
512
512
  sourcePath: resource.sourcePath,
513
513
  diagnostic: resource.diagnostic,
514
514
  }));
515
- for (const extension of adapter.extensionResources()) {
515
+ for (const extension of backend.extensionResources()) {
516
516
  if (extension.hidden)
517
517
  continue;
518
518
  resources.push({
@@ -531,8 +531,8 @@ function compactResourceLabel(path) {
531
531
  return segments.at(-2) ?? leaf;
532
532
  return leaf;
533
533
  }
534
- export class PiSessionShell {
535
- adapter;
534
+ export class OwnedUiSessionShell {
535
+ backend;
536
536
  root;
537
537
  runtime;
538
538
  #cwd;
@@ -551,14 +551,14 @@ export class PiSessionShell {
551
551
  #activeLoginDialog;
552
552
  #sessionGeneration;
553
553
  constructor(options) {
554
- this.adapter = options.adapter;
555
- this.#sessionGeneration = this.adapter.sessionGeneration;
554
+ this.backend = options.backend;
555
+ this.#sessionGeneration = this.backend.sessionGeneration;
556
556
  this.#cwd = options.cwd;
557
557
  this.#stopped = new Promise(resolve => {
558
558
  this.#resolveStopped = resolve;
559
559
  });
560
560
  let runtime;
561
- this.root = new PiSessionShellRoot(this.adapter.view(), options.cwd, {
561
+ this.root = new OwnedUiSessionShellRoot(this.backend.view(), options.cwd, {
562
562
  getColumns: () => runtime?.viewport().columns ?? options.terminal?.columns ?? 80,
563
563
  getRows: () => runtime?.viewport().rows ?? options.terminal?.rows ?? 24,
564
564
  requestRender: () => runtime?.requestRender(),
@@ -578,15 +578,15 @@ export class PiSessionShell {
578
578
  onDequeue: () => this.restoreQueuedInput(),
579
579
  }, {
580
580
  ...options.startup,
581
- resources: options.startup?.resources ?? shellResourceEntries(this.adapter),
582
- }, this.adapter.agentDir, {
583
- getMessageRenderer: customType => this.adapter.pinnedMessageRenderer(customType),
584
- getToolDefinition: toolName => this.adapter.pinnedToolDefinition(toolName),
581
+ resources: options.startup?.resources ?? shellResourceEntries(this.backend),
582
+ }, this.backend.agentDir, {
583
+ getMessageRenderer: customType => this.backend.pinnedMessageRenderer(customType),
584
+ getToolDefinition: toolName => this.backend.pinnedToolDefinition(toolName),
585
585
  });
586
- const tuiMode = this.adapter.disposed ? "regular" : this.adapter.pinnedSettingsSnapshot().tuiMode;
586
+ const tuiMode = this.backend.disposed ? "regular" : this.backend.pinnedSettingsSnapshot().tuiMode;
587
587
  const runtimeOptions = options.terminal === undefined
588
- ? { root: this.root, mode: tuiMode, layoutRoot: this.root.layoutRoot(), hardwareCursor: this.adapter.view().terminal.hardwareCursor }
589
- : { root: this.root, mode: tuiMode, layoutRoot: this.root.layoutRoot(), terminal: options.terminal, hardwareCursor: this.adapter.view().terminal.hardwareCursor };
588
+ ? { root: this.root, mode: tuiMode, layoutRoot: this.root.layoutRoot(), hardwareCursor: this.backend.view().terminal.hardwareCursor }
589
+ : { root: this.root, mode: tuiMode, layoutRoot: this.root.layoutRoot(), terminal: options.terminal, hardwareCursor: this.backend.view().terminal.hardwareCursor };
590
590
  runtime = new PiTuiRuntimeAdapter(runtimeOptions);
591
591
  this.runtime = runtime;
592
592
  this.#extensionBridge = createPiExtensionUiBridge({
@@ -595,7 +595,7 @@ export class PiSessionShell {
595
595
  getRows: () => this.runtime.viewport().rows,
596
596
  requestRender: () => this.runtime.requestRender(),
597
597
  },
598
- agentDir: this.adapter.agentDir,
598
+ agentDir: this.backend.agentDir,
599
599
  setInputSurface: component => this.root.setInputSurface(component),
600
600
  showOverlay: (component, overlayOptions) => this.runtime.showOverlay(component, overlayOptions),
601
601
  listenInput: handler => this.runtime.addInputListener(handler),
@@ -615,32 +615,32 @@ export class PiSessionShell {
615
615
  getToolsExpanded: () => this.root.toolsExpanded,
616
616
  setToolsExpanded: expanded => this.root.setToolsExpanded(expanded),
617
617
  });
618
- this.adapter.setWorkflowInteractionHost({
618
+ this.backend.setWorkflowInteractionHost({
619
619
  startLogin: request => this.#startWorkflowLogin(request),
620
620
  prompt: request => this.#requestWorkflowInput(request),
621
621
  notify: event => this.#notifyWorkflowLogin(event),
622
622
  finishLogin: () => this.#finishWorkflowLogin(),
623
623
  });
624
- this.root.editor.setAutocompleteCommands(this.adapter.workflowAutocompleteCommands());
625
- this.#unsubscribe = this.adapter.onEvent(event => {
624
+ this.root.editor.setAutocompleteCommands(this.backend.workflowAutocompleteCommands());
625
+ this.#unsubscribe = this.backend.onEvent(event => {
626
626
  this.#syncView();
627
627
  if (this.view().lifecycle === "ready" && this.#compactionQueue.length > 0)
628
628
  void this.#flushCompactionQueue();
629
629
  if (event.type === "session-lifecycle" && event.lifecycle === "stopped")
630
630
  this.#resolveStopped?.();
631
631
  });
632
- if (this.adapter.view().lifecycle === "stopped")
632
+ if (this.backend.view().lifecycle === "stopped")
633
633
  this.#resolveStopped?.();
634
634
  }
635
635
  view() {
636
- return this.adapter.view();
636
+ return this.backend.view();
637
637
  }
638
638
  start() {
639
639
  if (this.#started)
640
640
  return;
641
641
  this.#started = true;
642
642
  this.runtime.start();
643
- void this.adapter.bindExtensionUi(this.#extensionBridge.context, () => { void this.shutdown(); });
643
+ void this.backend.bindExtensionUi(this.#extensionBridge.context, () => { void this.shutdown(); });
644
644
  this.#syncView();
645
645
  }
646
646
  onView(listener) {
@@ -663,7 +663,7 @@ export class PiSessionShell {
663
663
  if (command) {
664
664
  this.root.editor.addToHistory(input);
665
665
  try {
666
- const result = await this.adapter.executeBashWorkflow(command, excludeFromContext);
666
+ const result = await this.backend.executeBashWorkflow(command, excludeFromContext);
667
667
  const workflow = {
668
668
  command: "debug",
669
669
  outcome: result.cancelled ? "cancelled" : result.exitCode === 0 || result.exitCode === undefined ? "completed" : "failed",
@@ -694,7 +694,7 @@ export class PiSessionShell {
694
694
  return this.#execute({
695
695
  type,
696
696
  correlationId: this.#correlation(type),
697
- sessionId: this.adapter.sessionId,
697
+ sessionId: this.backend.sessionId,
698
698
  text: input,
699
699
  });
700
700
  }
@@ -731,7 +731,7 @@ export class PiSessionShell {
731
731
  return this.#execute({
732
732
  type: "resume-session",
733
733
  correlationId: this.#correlation("resume"),
734
- sessionId: this.adapter.sessionId,
734
+ sessionId: this.backend.sessionId,
735
735
  sessionPath,
736
736
  });
737
737
  }
@@ -739,7 +739,7 @@ export class PiSessionShell {
739
739
  return this.#execute({
740
740
  type: "set-model",
741
741
  correlationId: this.#correlation("model"),
742
- sessionId: this.adapter.sessionId,
742
+ sessionId: this.backend.sessionId,
743
743
  model: { providerId, modelId, displayName: modelId },
744
744
  });
745
745
  }
@@ -747,7 +747,7 @@ export class PiSessionShell {
747
747
  return this.#execute({
748
748
  type: "set-thinking-level",
749
749
  correlationId: this.#correlation("thinking"),
750
- sessionId: this.adapter.sessionId,
750
+ sessionId: this.backend.sessionId,
751
751
  thinkingLevel,
752
752
  });
753
753
  }
@@ -757,7 +757,7 @@ export class PiSessionShell {
757
757
  return this.setThinkingLevel(levels[(current + 1) % levels.length] ?? "off");
758
758
  }
759
759
  async cycleModel(direction) {
760
- const result = await this.adapter.cycleModelWorkflow(direction);
760
+ const result = await this.backend.cycleModelWorkflow(direction);
761
761
  this.root.appendWorkflowResult(result);
762
762
  if (result.outcome === "completed")
763
763
  this.#showDaxnutsForActiveModel();
@@ -777,12 +777,12 @@ export class PiSessionShell {
777
777
  return this.#execute({
778
778
  type: "follow-up",
779
779
  correlationId: this.#correlation("follow-up"),
780
- sessionId: this.adapter.sessionId,
780
+ sessionId: this.backend.sessionId,
781
781
  text,
782
782
  });
783
783
  }
784
784
  restoreQueuedInput() {
785
- const queued = [...this.adapter.clearQueuedWorkflows(), ...this.#compactionQueue.map(item => item.text)];
785
+ const queued = [...this.backend.clearQueuedWorkflows(), ...this.#compactionQueue.map(item => item.text)];
786
786
  this.#compactionQueue = [];
787
787
  if (queued.length === 0)
788
788
  return;
@@ -810,7 +810,7 @@ export class PiSessionShell {
810
810
  return handle;
811
811
  }
812
812
  showModelSelector() {
813
- const context = this.adapter.pinnedModelSelectorContext();
813
+ const context = this.backend.pinnedModelSelectorContext();
814
814
  const close = () => {
815
815
  this.root.setInputSurface(null);
816
816
  this.runtime.requestRender();
@@ -832,7 +832,7 @@ export class PiSessionShell {
832
832
  this.runtime.requestRender();
833
833
  }
834
834
  showForkSelector() {
835
- const options = this.adapter.pinnedForkOptions();
835
+ const options = this.backend.pinnedForkOptions();
836
836
  if (options.length === 0) {
837
837
  this.root.appendWorkflowResult({ command: "fork", outcome: "failed", message: "No user messages available to fork from" });
838
838
  this.runtime.requestRender();
@@ -850,7 +850,7 @@ export class PiSessionShell {
850
850
  this.runtime.requestRender();
851
851
  }
852
852
  async showLogoutSelector() {
853
- const options = await this.adapter.pinnedLogoutOptions();
853
+ const options = await this.backend.pinnedLogoutOptions();
854
854
  if (options.length === 0) {
855
855
  this.root.appendWorkflowStatus("No authenticated providers available.");
856
856
  this.runtime.requestRender();
@@ -868,7 +868,7 @@ export class PiSessionShell {
868
868
  this.runtime.requestRender();
869
869
  }
870
870
  showLoginMethodSelector(providerReference) {
871
- const method = this.adapter.pinnedLoginMethodOptions(providerReference);
871
+ const method = this.backend.pinnedLoginMethodOptions(providerReference);
872
872
  if (method.options.length === 0) {
873
873
  this.root.appendWorkflowResult({ command: "login", outcome: "failed", message: `No authentication methods available for ${providerReference}` });
874
874
  this.runtime.requestRender();
@@ -896,7 +896,7 @@ export class PiSessionShell {
896
896
  this.runtime.requestRender();
897
897
  }
898
898
  showTreeSelector(initialSelectedId) {
899
- const context = this.adapter.pinnedTreeSelectorContext();
899
+ const context = this.backend.pinnedTreeSelectorContext();
900
900
  if (context.tree.length === 0) {
901
901
  this.root.appendWorkflowStatus("No entries in session");
902
902
  this.runtime.requestRender();
@@ -941,7 +941,7 @@ export class PiSessionShell {
941
941
  this.runtime.requestRender();
942
942
  }
943
943
  showLoginProviderSelector(authType) {
944
- const options = this.adapter.pinnedLoginOptions(authType);
944
+ const options = this.backend.pinnedLoginOptions(authType);
945
945
  if (options.length === 0) {
946
946
  this.root.appendWorkflowStatus(authType === "oauth" ? "No subscription providers available." : "No API key providers available.");
947
947
  this.runtime.requestRender();
@@ -962,7 +962,7 @@ export class PiSessionShell {
962
962
  this.runtime.requestRender();
963
963
  }
964
964
  showSessionSelector() {
965
- const context = this.adapter.pinnedSessionSelectorContext();
965
+ const context = this.backend.pinnedSessionSelectorContext();
966
966
  const close = () => {
967
967
  this.root.setInputSurface(null);
968
968
  this.runtime.requestRender();
@@ -987,7 +987,7 @@ export class PiSessionShell {
987
987
  this.runtime.requestRender();
988
988
  }
989
989
  showSettingsSelector() {
990
- const snapshot = this.adapter.pinnedSettingsSnapshot();
990
+ const snapshot = this.backend.pinnedSettingsSnapshot();
991
991
  const close = () => {
992
992
  this.root.setInputSurface(null);
993
993
  this.runtime.requestRender();
@@ -1013,7 +1013,7 @@ export class PiSessionShell {
1013
1013
  return;
1014
1014
  }
1015
1015
  }
1016
- const result = this.adapter.applyPinnedSettingValue(callback, value);
1016
+ const result = this.backend.applyPinnedSettingValue(callback, value);
1017
1017
  if (result.outcome === "failed")
1018
1018
  this.root.appendWorkflowResult(result);
1019
1019
  else if (callback === "onTuiModeChange")
@@ -1091,7 +1091,7 @@ export class PiSessionShell {
1091
1091
  }
1092
1092
  let result;
1093
1093
  try {
1094
- result = await this.adapter.executeWorkflow(request);
1094
+ result = await this.backend.executeWorkflow(request);
1095
1095
  }
1096
1096
  finally {
1097
1097
  if (operationSurface) {
@@ -1109,7 +1109,7 @@ export class PiSessionShell {
1109
1109
  return { outcome: "failed", diagnostic: `Owned controller missing for ${request.command}` };
1110
1110
  }
1111
1111
  if (request.command === "reload" && result.outcome === "completed") {
1112
- this.root.editor.setAutocompleteCommands(this.adapter.workflowAutocompleteCommands());
1112
+ this.root.editor.setAutocompleteCommands(this.backend.workflowAutocompleteCommands());
1113
1113
  }
1114
1114
  this.root.appendWorkflowResult(result);
1115
1115
  if (request.command === "model" && result.outcome === "completed")
@@ -1118,7 +1118,7 @@ export class PiSessionShell {
1118
1118
  return workflowAdapterResult(result);
1119
1119
  }
1120
1120
  showTrustSelector() {
1121
- const context = this.adapter.pinnedProjectTrustContext();
1121
+ const context = this.backend.pinnedProjectTrustContext();
1122
1122
  const close = () => {
1123
1123
  this.root.setInputSurface(null);
1124
1124
  this.runtime.requestRender();
@@ -1127,7 +1127,7 @@ export class PiSessionShell {
1127
1127
  ...context,
1128
1128
  onSelect: selection => {
1129
1129
  try {
1130
- this.adapter.persistProjectTrust(selection.updates);
1130
+ this.backend.persistProjectTrust(selection.updates);
1131
1131
  close();
1132
1132
  this.root.appendWorkflowStatus(`Saved trust decision: ${selection.trusted ? "trusted" : "untrusted"}. Restart pi for this to take effect.`);
1133
1133
  }
@@ -1143,7 +1143,7 @@ export class PiSessionShell {
1143
1143
  this.runtime.requestRender();
1144
1144
  }
1145
1145
  showScopedModelsSelector() {
1146
- const initial = this.adapter.pinnedScopedModelsContext();
1146
+ const initial = this.backend.pinnedScopedModelsContext();
1147
1147
  let currentEnabledIds = initial.enabledModelIds === null ? null : [...initial.enabledModelIds];
1148
1148
  let selectionChanged = false;
1149
1149
  let disposed = false;
@@ -1167,12 +1167,12 @@ export class PiSessionShell {
1167
1167
  onChange: enabledIds => {
1168
1168
  selectionChanged = true;
1169
1169
  currentEnabledIds = enabledIds === null ? null : [...enabledIds];
1170
- this.adapter.updateScopedModels(currentEnabledIds);
1170
+ this.backend.updateScopedModels(currentEnabledIds);
1171
1171
  this.runtime.requestRender();
1172
1172
  },
1173
1173
  onPersist: enabledIds => {
1174
1174
  currentEnabledIds = enabledIds === null ? null : [...enabledIds];
1175
- this.adapter.persistScopedModels(currentEnabledIds);
1175
+ this.backend.persistScopedModels(currentEnabledIds);
1176
1176
  this.root.appendWorkflowStatus("Model selection saved to settings");
1177
1177
  this.runtime.requestRender();
1178
1178
  },
@@ -1189,7 +1189,7 @@ export class PiSessionShell {
1189
1189
  };
1190
1190
  this.root.setInputSurface(component);
1191
1191
  this.runtime.requestRender();
1192
- void this.adapter.refreshScopedModels(controller.signal).then(refreshed => {
1192
+ void this.backend.refreshScopedModels(controller.signal).then(refreshed => {
1193
1193
  if (disposed)
1194
1194
  return;
1195
1195
  if (!selectionChanged) {
@@ -1198,7 +1198,7 @@ export class PiSessionShell {
1198
1198
  }
1199
1199
  else {
1200
1200
  component.updateModels(refreshed.models);
1201
- this.adapter.updateScopedModels(currentEnabledIds);
1201
+ this.backend.updateScopedModels(currentEnabledIds);
1202
1202
  }
1203
1203
  component.setRefreshStatus(timedOut ? "Model refresh timed out; showing cached models." : refreshed.status, timedOut ? "warning" : refreshed.statusKind);
1204
1204
  this.runtime.requestRender();
@@ -1223,14 +1223,14 @@ export class PiSessionShell {
1223
1223
  this.#disposed = true;
1224
1224
  this.#unsubscribe();
1225
1225
  this.#dialogHandle?.hide();
1226
- await this.adapter.unbindExtensionUi();
1226
+ await this.backend.unbindExtensionUi();
1227
1227
  this.#extensionBridge.dispose();
1228
1228
  await this.runtime.dispose();
1229
1229
  }
1230
1230
  #syncView() {
1231
1231
  const view = this.view();
1232
- if (this.adapter.sessionGeneration !== this.#sessionGeneration) {
1233
- this.#sessionGeneration = this.adapter.sessionGeneration;
1232
+ if (this.backend.sessionGeneration !== this.#sessionGeneration) {
1233
+ this.#sessionGeneration = this.backend.sessionGeneration;
1234
1234
  this.#activeLoginDialog = undefined;
1235
1235
  this.#extensionBridge.reset();
1236
1236
  this.root.setInputSurface(null);
@@ -1280,7 +1280,7 @@ export class PiSessionShell {
1280
1280
  return this.#execute({
1281
1281
  type: this.view().lifecycle === "busy" ? "steer" : "prompt",
1282
1282
  correlationId: this.#correlation("prompt-command"),
1283
- sessionId: this.adapter.sessionId,
1283
+ sessionId: this.backend.sessionId,
1284
1284
  text,
1285
1285
  });
1286
1286
  }
@@ -1396,16 +1396,16 @@ export class PiSessionShell {
1396
1396
  await this.#execute({
1397
1397
  type: item.type,
1398
1398
  correlationId: this.#correlation(`compaction-${item.type}`),
1399
- sessionId: this.adapter.sessionId,
1399
+ sessionId: this.backend.sessionId,
1400
1400
  text: item.text,
1401
1401
  });
1402
1402
  }
1403
1403
  }
1404
1404
  async #execute(command) {
1405
- return this.adapter.execute(command);
1405
+ return this.backend.execute(command);
1406
1406
  }
1407
1407
  #simple(type) {
1408
- return { type, correlationId: this.#correlation(type), sessionId: this.adapter.sessionId };
1408
+ return { type, correlationId: this.#correlation(type), sessionId: this.backend.sessionId };
1409
1409
  }
1410
1410
  #correlation(prefix) {
1411
1411
  this.#sequence += 1;
@@ -1434,4 +1434,3 @@ function isWorkflowRoute(value) {
1434
1434
  return PINNED_PI_WORKFLOW_COMMAND_NAMES.includes(value)
1435
1435
  || PINNED_PI_HIDDEN_COMMAND_NAMES.includes(value);
1436
1436
  }
1437
- //# sourceMappingURL=pi-session-shell.js.map
@@ -31,4 +31,3 @@ export declare class PiTuiRuntimeAdapter {
31
31
  stop(options?: PiTuiStopOptions): Promise<void>;
32
32
  dispose(options?: PiTuiStopOptions): Promise<void>;
33
33
  }
34
- //# sourceMappingURL=adapter.d.ts.map
@@ -482,4 +482,3 @@ function toOverlayOptions(options) {
482
482
  mapped.nonCapturing = options.nonCapturing;
483
483
  return mapped;
484
484
  }
485
- //# sourceMappingURL=adapter.js.map