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

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 (296) hide show
  1. package/bin/ui.js +3 -3
  2. package/dist/app/session-shell/clipboard-diagnostics.d.ts +2 -2
  3. package/dist/app/session-shell/clipboard-image.d.ts +0 -1
  4. package/dist/app/session-shell/clipboard-image.js +1 -1
  5. package/dist/app/session-shell/dialog-coordinator.d.ts +6 -5
  6. package/dist/app/session-shell/dialog-coordinator.js +3 -4
  7. package/dist/app/session-shell/dock-chrome.d.ts +11 -6
  8. package/dist/app/session-shell/dock-chrome.js +5 -8
  9. package/dist/app/session-shell/editor-hyperlink-budget.d.ts +0 -2
  10. package/dist/app/session-shell/editor-hyperlink-budget.js +1 -1
  11. package/dist/app/session-shell/exit-notice.d.ts +2 -2
  12. package/dist/app/session-shell/exit-notice.js +1 -1
  13. package/dist/app/session-shell/extension-surface.d.ts +8 -7
  14. package/dist/app/session-shell/helper-pool.d.ts +3 -4
  15. package/dist/app/session-shell/helper-pool.js +1 -1
  16. package/dist/app/session-shell/image-preparation-client.d.ts +4 -3
  17. package/dist/app/session-shell/image-preparation.d.ts +0 -2
  18. package/dist/app/session-shell/image-preparation.js +2 -2
  19. package/dist/app/session-shell/image-source.d.ts +2 -3
  20. package/dist/app/session-shell/image-source.js +2 -2
  21. package/dist/app/session-shell/input-surface-switch.d.ts +9 -7
  22. package/dist/app/session-shell/input-surface-switch.js +1 -2
  23. package/dist/app/session-shell/login-interaction.d.ts +5 -4
  24. package/dist/app/session-shell/login-interaction.js +2 -3
  25. package/dist/app/session-shell/paste-executor.d.ts +4 -8
  26. package/dist/app/session-shell/paste-executor.js +2 -2
  27. package/dist/app/session-shell/paste-protocol.d.ts +2 -2
  28. package/dist/app/session-shell/path-chip-presentation.d.ts +0 -5
  29. package/dist/app/session-shell/path-chip-presentation.js +3 -3
  30. package/dist/app/session-shell/prompt-chips.d.ts +8 -7
  31. package/dist/app/session-shell/prompt-history-controller.d.ts +3 -3
  32. package/dist/app/session-shell/prompt-submission.d.ts +5 -2
  33. package/dist/app/session-shell/prompt-submission.js +13 -14
  34. package/dist/app/session-shell/quit-outro-effects.d.ts +3 -3
  35. package/dist/app/session-shell/quit-outro-effects.js +1 -4
  36. package/dist/app/session-shell/quit-outro.d.ts +9 -12
  37. package/dist/app/session-shell/quit-outro.js +11 -11
  38. package/dist/app/session-shell/resource-labels.d.ts +2 -0
  39. package/dist/app/session-shell/resource-labels.js +158 -0
  40. package/dist/app/session-shell/response-copy-protocol.d.ts +3 -2
  41. package/dist/app/session-shell/response-copy-transport.d.ts +2 -14
  42. package/dist/app/session-shell/response-copy-transport.js +1 -1
  43. package/dist/app/session-shell/session-lifecycle.d.ts +2 -1
  44. package/dist/app/session-shell/session-prompt-history.d.ts +29 -0
  45. package/dist/app/session-shell/session-prompt-history.js +80 -0
  46. package/dist/app/session-shell/session-selectors.d.ts +46 -0
  47. package/dist/app/session-shell/session-selectors.js +269 -0
  48. package/dist/app/session-shell/session-shell-root.d.ts +76 -113
  49. package/dist/app/session-shell/session-shell-root.js +103 -329
  50. package/dist/app/session-shell/session-shell.d.ts +14 -37
  51. package/dist/app/session-shell/session-shell.js +177 -612
  52. package/dist/app/session-shell/session-viewport-controller.d.ts +9 -16
  53. package/dist/app/session-shell/session-viewport-controller.js +42 -320
  54. package/dist/app/session-shell/settings-bindings.d.ts +25 -3
  55. package/dist/app/session-shell/settings-bindings.js +26 -2
  56. package/dist/app/session-shell/share-operation.d.ts +3 -3
  57. package/dist/app/session-shell/share-operation.js +4 -6
  58. package/dist/app/session-shell/shell-clipboard.d.ts +59 -0
  59. package/dist/app/session-shell/shell-clipboard.js +119 -0
  60. package/dist/app/session-shell/shell-editor-factory.d.ts +8 -4
  61. package/dist/app/session-shell/shell-editor-factory.js +13 -15
  62. package/dist/app/session-shell/shell-host.d.ts +16 -17
  63. package/dist/app/session-shell/shell-host.js +18 -19
  64. package/dist/app/session-shell/shell-layout.d.ts +2 -2
  65. package/dist/app/session-shell/shell-prompt-suggestions.d.ts +26 -0
  66. package/dist/app/session-shell/shell-prompt-suggestions.js +48 -0
  67. package/dist/app/session-shell/suggestion-surface.d.ts +1 -6
  68. package/dist/app/session-shell/suggestion-surface.js +1 -1
  69. package/dist/app/session-shell/system-clipboard.d.ts +2 -14
  70. package/dist/app/session-shell/system-clipboard.js +2 -7
  71. package/dist/app/session-shell/transcript-document.d.ts +11 -8
  72. package/dist/app/session-shell/transcript-document.js +13 -14
  73. package/dist/app/session-shell/viewport-layout.d.ts +2 -2
  74. package/dist/app/session-shell/viewport-pointer.d.ts +83 -0
  75. package/dist/app/session-shell/viewport-pointer.js +361 -0
  76. package/dist/app/session-shell/workflow-output.d.ts +5 -3
  77. package/dist/app/session-shell/workflow-output.js +13 -15
  78. package/dist/cli/package-messages.d.ts +0 -1
  79. package/dist/cli/package-messages.js +1 -1
  80. package/dist/cli/session-context.d.ts +1 -1
  81. package/dist/cli/uninstall.d.ts +3 -2
  82. package/dist/composition/owned-settings.d.ts +2 -1
  83. package/dist/composition/owned-settings.js +0 -3
  84. package/dist/composition/owned-ui.d.ts +1 -1
  85. package/dist/composition/owned-ui.js +77 -73
  86. package/dist/composition/reference-selection-options.d.ts +1 -1
  87. package/dist/composition/reference-selection-options.js +1 -1
  88. package/dist/composition/session-runtime-registry.d.ts +2 -1
  89. package/dist/composition/settings-route-host.js +3 -10
  90. package/dist/composition/settings-search-input.d.ts +2 -1
  91. package/dist/composition/startup-route.d.ts +2 -2
  92. package/dist/composition/startup-route.js +2 -2
  93. package/dist/contracts/owned-ui/extension-ui.d.ts +2 -1
  94. package/dist/contracts/owned-ui/index.d.ts +2 -1
  95. package/dist/contracts/owned-ui/index.js +1 -1
  96. package/dist/contracts/owned-ui/session-presenters.d.ts +3 -0
  97. package/dist/contracts/owned-ui/shell-components.d.ts +543 -0
  98. package/dist/contracts/owned-ui/validation.d.ts +1 -11
  99. package/dist/contracts/owned-ui/validation.js +8 -104
  100. package/dist/contracts/presentation/component.d.ts +17 -0
  101. package/dist/contracts/presentation/component.js +8 -0
  102. package/dist/contracts/presentation/index.d.ts +6 -15
  103. package/dist/contracts/presentation/index.js +2 -0
  104. package/dist/contracts/presentation/terminal.d.ts +284 -0
  105. package/dist/contracts/presentation/terminal.js +1 -0
  106. package/dist/contracts/presentation/theme.d.ts +46 -0
  107. package/dist/contracts/presentation/theme.js +1 -0
  108. package/dist/features/launch/development-launch.js +1 -1
  109. package/dist/features/launch/runtime-selection.d.ts +2 -2
  110. package/dist/features/launch/runtime-selection.js +2 -2
  111. package/dist/features/owned-ui/project-trust-prompt.d.ts +2 -2
  112. package/dist/features/owned-ui/project-trust-prompt.js +1 -1
  113. package/dist/features/owned-ui/release-note-state.d.ts +2 -1
  114. package/dist/features/owned-ui/settings-app.js +49 -425
  115. package/dist/features/owned-ui/settings-edits.d.ts +31 -0
  116. package/dist/features/owned-ui/settings-edits.js +139 -0
  117. package/dist/features/owned-ui/settings-model-dialog.d.ts +41 -0
  118. package/dist/features/owned-ui/settings-model-dialog.js +194 -0
  119. package/dist/features/owned-ui/settings-scroll-rail.d.ts +29 -0
  120. package/dist/features/owned-ui/settings-scroll-rail.js +79 -0
  121. package/dist/features/owned-ui/settings-search-input.d.ts +2 -1
  122. package/dist/features/prompt-history/service.d.ts +3 -2
  123. package/dist/foundation/lifecycle/claim-gate.d.ts +2 -1
  124. package/dist/foundation/release/automatic-update.d.ts +5 -14
  125. package/dist/foundation/release/automatic-update.js +15 -22
  126. package/dist/foundation/release/bootstrap.js +4 -4
  127. package/dist/foundation/release/dependency-certification.d.ts +0 -1
  128. package/dist/foundation/release/dependency-certification.js +1 -1
  129. package/dist/foundation/release/dependency-layer.js +3 -3
  130. package/dist/foundation/release/early-accent.d.ts +2 -2
  131. package/dist/foundation/release/early-accent.js +1 -1
  132. package/dist/foundation/release/index.d.ts +2 -2
  133. package/dist/foundation/release/index.js +1 -1
  134. package/dist/foundation/release/latest-release.d.ts +3 -18
  135. package/dist/foundation/release/latest-release.js +11 -11
  136. package/dist/foundation/release/managed-path.d.ts +10 -0
  137. package/dist/foundation/release/managed-path.js +26 -0
  138. package/dist/foundation/release/ordinary-launch-selection.d.ts +1 -1
  139. package/dist/foundation/release/ordinary-launch-selection.js +1 -1
  140. package/dist/foundation/release/release-gc.d.ts +3 -3
  141. package/dist/foundation/release/release-gc.js +10 -12
  142. package/dist/foundation/release/{cohort-state.d.ts → release-state.d.ts} +23 -23
  143. package/dist/foundation/release/{cohort-state.js → release-state.js} +8 -8
  144. package/dist/foundation/release/restart-certification.js +3 -4
  145. package/dist/foundation/release/update-activation.js +3 -3
  146. package/dist/foundation/release/update-execution-lease.d.ts +2 -3
  147. package/dist/foundation/release/update-execution-lease.js +2 -8
  148. package/dist/foundation/release/update-installer.d.ts +45 -0
  149. package/dist/foundation/release/update-installer.js +57 -0
  150. package/dist/foundation/release/update-launch.d.ts +2 -2
  151. package/dist/foundation/release/update-recovery.js +2 -9
  152. package/dist/foundation/release/update.d.ts +4 -25
  153. package/dist/foundation/release/update.js +164 -183
  154. package/dist/foundation/startup/startup-budget.d.ts +5 -5
  155. package/dist/foundation/startup/startup-budget.js +2 -2
  156. package/dist/integrations/pi/components/bracketed-paste.d.ts +33 -0
  157. package/dist/integrations/pi/components/bracketed-paste.js +123 -0
  158. package/dist/integrations/pi/components/editor-interaction.d.ts +4 -12
  159. package/dist/integrations/pi/components/index.d.ts +15 -9
  160. package/dist/integrations/pi/components/index.js +9 -5
  161. package/dist/integrations/pi/components/lazy-selectors.d.ts +2 -10
  162. package/dist/integrations/pi/components/lazy-selectors.js +1 -1
  163. package/dist/integrations/pi/components/modal-frame.d.ts +5 -22
  164. package/dist/integrations/pi/components/modal-frame.js +3 -23
  165. package/dist/integrations/pi/components/owned-editor-ux.d.ts +4 -3
  166. package/dist/integrations/pi/components/owned-editor-ux.js +46 -140
  167. package/dist/integrations/pi/components/prompt-input-port.d.ts +2 -19
  168. package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -1
  169. package/dist/integrations/pi/components/shell-editor-autocomplete.d.ts +3 -2
  170. package/dist/integrations/pi/components/shell-footer-status.d.ts +2 -2
  171. package/dist/integrations/pi/components/shell-footer-status.js +3 -2
  172. package/dist/integrations/pi/components/shell-presenters-info.d.ts +6 -5
  173. package/dist/integrations/pi/components/shell-presenters-info.js +2 -1
  174. package/dist/integrations/pi/components/shell-session-info-reference.d.ts +2 -1
  175. package/dist/integrations/pi/components/shell-shared-facade.d.ts +33 -227
  176. package/dist/integrations/pi/components/shell-shared-facade.js +8 -1
  177. package/dist/integrations/pi/components/skills-command.d.ts +1 -9
  178. package/dist/integrations/pi/components/skills-command.js +5 -5
  179. package/dist/integrations/pi/components/theme.d.ts +9 -2
  180. package/dist/integrations/pi/components/theme.js +17 -2
  181. package/dist/integrations/pi/components/thinking-selector-dialog.d.ts +2 -1
  182. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
  183. package/dist/integrations/pi/engine/adapter.d.ts +4 -13
  184. package/dist/integrations/pi/engine/adapter.js +9 -61
  185. package/dist/integrations/pi/engine/changelog.d.ts +2 -2
  186. package/dist/integrations/pi/engine/changelog.js +3 -3
  187. package/dist/integrations/pi/engine/compaction-progress.d.ts +2 -3
  188. package/dist/integrations/pi/engine/compaction-progress.js +1 -1
  189. package/dist/integrations/pi/engine/conformance.d.ts +2 -1
  190. package/dist/integrations/pi/engine/default-model-setting.d.ts +0 -2
  191. package/dist/integrations/pi/engine/default-model-setting.js +1 -2
  192. package/dist/integrations/pi/engine/event-delivery.d.ts +2 -1
  193. package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -1
  194. package/dist/integrations/pi/engine/host.js +3 -3
  195. package/dist/integrations/pi/engine/message-values.d.ts +0 -1
  196. package/dist/integrations/pi/engine/message-values.js +1 -1
  197. package/dist/integrations/pi/engine/pending-delivery.d.ts +0 -4
  198. package/dist/integrations/pi/engine/pending-delivery.js +3 -3
  199. package/dist/integrations/pi/engine/ports.d.ts +7 -1
  200. package/dist/integrations/pi/engine/ports.js +4 -0
  201. package/dist/integrations/pi/engine/project-trust-preflight.d.ts +2 -1
  202. package/dist/integrations/pi/engine/prompt-suggestions.d.ts +3 -2
  203. package/dist/integrations/pi/engine/provider-authentication.d.ts +1 -1
  204. package/dist/integrations/pi/engine/public-main-entry.d.ts +1 -5
  205. package/dist/integrations/pi/engine/public-main-entry.js +1 -1
  206. package/dist/integrations/pi/engine/repository-metadata.d.ts +49 -0
  207. package/dist/integrations/pi/engine/repository-metadata.js +189 -0
  208. package/dist/integrations/pi/engine/repository-pr-rest.d.ts +1 -9
  209. package/dist/integrations/pi/engine/repository-pr-rest.js +2 -2
  210. package/dist/integrations/pi/engine/repository-pr.d.ts +1 -3
  211. package/dist/integrations/pi/engine/repository-pr.js +1 -1
  212. package/dist/integrations/pi/engine/resource-catalog.d.ts +2 -1
  213. package/dist/integrations/pi/engine/session-integration.d.ts +1 -1
  214. package/dist/integrations/pi/engine/session-runtime.d.ts +7 -12
  215. package/dist/integrations/pi/engine/session-runtime.js +21 -178
  216. package/dist/integrations/pi/engine/settings-bridge.d.ts +0 -2
  217. package/dist/integrations/pi/engine/settings-bridge.js +1 -1
  218. package/dist/integrations/pi/engine/settings-port.d.ts +3 -2
  219. package/dist/integrations/pi/engine/transcript-projection.d.ts +2 -1
  220. package/dist/integrations/pi/engine/view-state.d.ts +21 -2
  221. package/dist/integrations/pi/engine/view-state.js +129 -1
  222. package/dist/integrations/pi/engine/workflow-contexts.d.ts +1 -1
  223. package/dist/integrations/pi/engine/workflow-runner.d.ts +1 -2
  224. package/dist/integrations/pi/engine/workflow-runner.js +254 -365
  225. package/dist/integrations/pi/engine/workflow-share.d.ts +9 -0
  226. package/dist/integrations/pi/engine/workflow-share.js +168 -0
  227. package/dist/integrations/pi/engine/workflow-support.d.ts +0 -20
  228. package/dist/integrations/pi/engine/workflow-support.js +4 -65
  229. package/dist/integrations/pi/engine/workflows.d.ts +5 -5
  230. package/dist/integrations/pi/session-presenters/components.d.ts +3 -0
  231. package/dist/integrations/pi/session-presenters/components.js +75 -0
  232. package/dist/integrations/pi/session-presenters/index.d.ts +1 -0
  233. package/dist/integrations/pi/session-presenters/index.js +1 -0
  234. package/dist/integrations/pi/session-presenters/presentation.d.ts +3 -0
  235. package/dist/integrations/pi/session-presenters/presentation.js +10 -0
  236. package/dist/integrations/pi/session-presenters/presenters.d.ts +2 -1
  237. package/dist/integrations/pi/session-presenters/presenters.js +3 -1
  238. package/dist/integrations/pi/tui-runtime/adapter.d.ts +9 -19
  239. package/dist/integrations/pi/tui-runtime/adapter.js +56 -174
  240. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +9 -44
  241. package/dist/integrations/pi/tui-runtime/index.d.ts +1 -1
  242. package/dist/integrations/pi/tui-runtime/index.js +1 -0
  243. package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +4 -6
  244. package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +4 -10
  245. package/dist/integrations/pi/tui-runtime/overlay-geometry.js +3 -9
  246. package/dist/integrations/pi/tui-runtime/presentation-adapter.d.ts +2 -2
  247. package/dist/integrations/pi/tui-runtime/runtime-factory.d.ts +3 -0
  248. package/dist/integrations/pi/tui-runtime/runtime-factory.js +11 -0
  249. package/dist/ui/components/index.d.ts +2 -2
  250. package/dist/ui/components/index.js +1 -1
  251. package/dist/ui/components/selection-copy.d.ts +0 -1
  252. package/dist/ui/components/selection-copy.js +0 -12
  253. package/dist/ui/components/theme.d.ts +4 -19
  254. package/dist/ui/components/theme.js +6 -0
  255. package/dist/ui/components/transcript-viewport-frame.d.ts +120 -0
  256. package/dist/ui/components/transcript-viewport-frame.js +314 -0
  257. package/dist/ui/components/transcript-viewport-types.d.ts +147 -0
  258. package/dist/ui/components/transcript-viewport-types.js +1 -0
  259. package/dist/ui/components/transcript-viewport.d.ts +2 -147
  260. package/dist/ui/components/transcript-viewport.js +87 -315
  261. package/dist/ui/settings/declarations.d.ts +2 -3
  262. package/dist/ui/settings/declarations.js +2 -3
  263. package/dist/ui/settings/early-accent.js +1 -1
  264. package/dist/ui/settings/index.d.ts +3 -5
  265. package/dist/ui/settings/index.js +2 -3
  266. package/dist/ui/settings/manager.d.ts +0 -4
  267. package/dist/ui/settings/manager.js +6 -62
  268. package/dist/ui/settings/resolution.d.ts +6 -18
  269. package/dist/ui/settings/resolution.js +4 -103
  270. package/dist/ui/settings/sections.d.ts +0 -4
  271. package/dist/ui/settings/sections.js +1 -1
  272. package/docs/architecture/boundaries.md +2 -2
  273. package/docs/architecture/internal-naming.md +2 -0
  274. package/docs/architecture/project-structure.md +4 -2
  275. package/docs/validation.md +1 -1
  276. package/package.json +3 -4
  277. package/dist/integrations/pi/components/components.d.ts +0 -4
  278. package/dist/integrations/pi/components/components.js +0 -48
  279. package/dist/integrations/pi/components/conformance.d.ts +0 -18
  280. package/dist/integrations/pi/components/conformance.js +0 -70
  281. package/dist/integrations/pi/components/shell-components.d.ts +0 -7
  282. package/dist/integrations/pi/components/shell-components.js +0 -7
  283. package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +0 -33
  284. package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -114
  285. package/dist/integrations/pi/engine/diagnostics-state.d.ts +0 -9
  286. package/dist/integrations/pi/engine/diagnostics-state.js +0 -34
  287. package/dist/integrations/pi/engine/usage-view.d.ts +0 -4
  288. package/dist/integrations/pi/engine/usage-view.js +0 -56
  289. package/dist/integrations/pi/tui-runtime/contracts.d.ts +0 -166
  290. package/dist/ui/settings/migrations.d.ts +0 -19
  291. package/dist/ui/settings/migrations.js +0 -225
  292. package/dist/ui/settings/progress-palette.generated.d.ts +0 -139
  293. package/dist/ui/settings/progress-palette.generated.js +0 -139
  294. /package/dist/{integrations/pi/tui-runtime/contracts.js → contracts/owned-ui/shell-components.js} +0 -0
  295. /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.d.ts +0 -0
  296. /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.js +0 -0
@@ -1,16 +1,22 @@
1
- export { adaptPiAssistantMessage, adaptPiToolExecution, adaptPiUserMessage } from "./components.js";
2
1
  export { loadHistoryEditor, type HistoryEditorConstructor } from "./history-editor-loader.js";
3
- export { PiComponentConformanceError, runPiComponentConformance } from "./conformance.js";
4
- export type { PiComponentConformanceReport, PiComponentConformanceResult } from "./conformance.js";
5
2
  export { createPiShellOperationLoader, createPiShellShareOperationDialog, type PiShellOperationLoaderPort, } from "./share-operation-dialog.js";
6
- export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, componentFromPort, componentPort, createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellStatus, createPiShellThemeSelector, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isPiPromptStyleCompaction, isRecord, piShellHyperlink, piShellTruncateToWidth, piShellVisibleWidth, renderPiShellChangelogLines, renderPiShellCommandMessage, renderPiShellHotkeysLines, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStartupDiagnostic, renderPiShellStatusText, renderPiShellTranscriptBlock, validatedAssistantMessage, } from "./shell-components.js";
3
+ export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, createPiShellEditor, } from "./shell-editor-autocomplete.js";
4
+ export { componentFromPort, componentPort, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isRecord, piShellHyperlink, piShellTruncateToWidth, piShellVisibleWidth, } from "./shell-shared-facade.js";
5
+ export { createPiExtensionUiBridge, } from "./shell-extension-ui.js";
6
+ export { createPiQueuedInputStatus, createPiShellFooter, createPiShellHeader, createPiShellLoadedResources, createPiShellStatus, } from "./shell-footer-status.js";
7
+ export { createPiShellArmin, createPiShellAuthProviderSelector, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellExtensionSelector, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellThemeSelector, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, } from "./shell-selectors-dialogs.js";
8
+ export { createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellHotkeys, createPiShellSessionInfo, renderPiShellChangelogLines, renderPiShellCommandMessage, renderPiShellHotkeysLines, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStatusText, } from "./shell-presenters-info.js";
9
+ export { createPiShellTranscriptComponent, isPiPromptStyleCompaction, renderPiShellStartupDiagnostic, renderPiShellTranscriptBlock, validatedAssistantMessage, } from "./shell-presenters-transcript.js";
7
10
  export { renderPiShellHotkeySections } from "./shell-hotkey-sections.js";
8
11
  export type { PiShellHotkeySection } from "./shell-hotkey-sections.js";
9
- export type { PiExtensionUiBridge, PiExtensionUiBridgeHost, PiShellAuthProviderOption, PiShellAutocompleteCommand, PiShellClipboardContent, PiShellCommandMessagePresentation, PiShellComponentPort, PiShellEditorBodyGeometry, PiShellEditorOptions, PiShellEditorPointerEvent, PiKeybindingsHost, PiShellEditorPort, PiShellEditorTextRange, PiShellExtensionRendererResolver, PiShellHeaderOptions, PiShellHeaderPort, PiShellHotkeysPresentation, PiShellImageAssetResolver, PiShellLoadedResourcesPort, PiShellLoginDialogPort, PiShellModelSelectorOptions, PiShellModelsDialogOptions, PiShellModelsDialogPort, PiShellPasteReservation, PiShellQueuedInputPort, PiShellResourceEntry, PiShellResourceSection, PiShellScopedModelDescriptor, PiShellScopedModelsSelectorOptions, PiShellScopedModelsSelectorPort, PiShellSelectorOption, PiShellSelectorOptions, PiShellSessionInfoPresentation, PiShellSettingsSelectorOptions, PiShellStartupNotice, PiShellStatusPlacement, PiShellStatusPort, PiShellSubmittedPromptComposer, PiShellTranscriptComponentPort, PiShellViewComponentPort, } from "./shell-components.js";
10
- export { PINNED_PI_LAYOUT, applyConfiguredPiTheme, applyPiTheme, applyPiThemeInstance, currentPiAccentColor, currentPiThemeName, derivePiAccentProjection, derivePiCanvasBackground, detectPiTerminalBackgroundFromEnv, detectPiTerminalBackgroundTheme, detectPiTerminalThemeForAuto, ensurePiTheme, getAvailablePiThemes, getPiSelectListTheme, loadPiTheme, onPiThemeChange, parsePiAutoThemeSetting, piCanvasBackgroundAnsi, piTheme, resolvePiThemeSetting, setPiAccentColor, setPiPackageBorderProjectionEnabled, stopPiThemeWatcher, } from "./theme.js";
11
- export type { PiAccentProjection, PiColorMode, PiTerminalTheme, PiTerminalThemeDetection, PiTerminalThemeDetector, PiThemeBackground, PiThemeResult } from "./theme.js";
12
- export { OwnedPiThemeController } from "./upstream/theme/theme-controller.js";
13
- export type { PiThemeRuntimePort, PiThemeSettingsPort } from "./upstream/theme/theme-controller.js";
12
+ export type { PiExtensionUiBridge, PiExtensionUiBridgeHost, } from "./shell-extension-ui.js";
13
+ export type { PiShellAuthProviderOption, PiShellLoginDialogPort, PiShellModelSelectorOptions, PiShellModelsDialogOptions, PiShellModelsDialogPort, PiShellScopedModelDescriptor, PiShellScopedModelsSelectorOptions, PiShellScopedModelsSelectorPort, PiShellSettingsSelectorOptions, } from "./shell-selectors-dialogs.js";
14
+ export type { PiShellAutocompleteCommand, PiShellClipboardContent, PiShellComponentPort, PiShellEditorBodyGeometry, PiShellEditorOptions, PiShellEditorPointerEvent, PiKeybindingsHost, PiShellEditorPort, PiShellEditorTextRange, PiShellExtensionRendererResolver, PiShellHeaderOptions, PiShellHeaderPort, PiShellImageAssetResolver, PiShellLoadedResourcesPort, PiShellPasteReservation, PiShellQueuedInputPort, PiShellResourceEntry, PiShellResourceSection, PiShellSelectorOption, PiShellSelectorOptions, PiShellStartupNotice, PiShellStatusPlacement, PiShellStatusPort, PiShellTranscriptComponentPort, PiShellViewComponentPort, } from "./shell-shared-facade.js";
15
+ export type { PiShellCommandMessagePresentation, PiShellHotkeysPresentation, PiShellSessionInfoPresentation, } from "./shell-presenters-info.js";
16
+ export type { PiShellSubmittedPromptComposer, } from "./shell-presenters-transcript.js";
17
+ export { PINNED_PI_LAYOUT, applyConfiguredPiTheme, applyPiTheme, applyPiThemeInstance, currentPiAccentColor, currentPiThemeName, derivePiAccentProjection, derivePiCanvasBackground, detectPiTerminalBackgroundFromEnv, detectPiTerminalBackgroundTheme, detectPiTerminalThemeForAuto, ensurePiTheme, getAvailablePiThemes, loadPiTheme, onPiThemeChange, parsePiAutoThemeSetting, piCanvasBackgroundAnsi, piTheme, resolvePiThemeSetting, setPiAccentColor, setPiPackageBorderProjectionEnabled, stopPiThemeWatcher, } from "./upstream/theme/theme.js";
18
+ export type { PiAccentProjection, PiColorMode, PiTerminalTheme, PiTerminalThemeDetection, PiTerminalThemeDetector, PiThemeBackground, PiThemeResult } from "./upstream/theme/theme.js";
19
+ export { PI_THEME_SOURCE, getPiSelectListTheme, piUiTheme } from "./theme.js";
14
20
  export { PI_MODAL_CONTENT_PADDING_X, PiModalFrame, PiModalHeader, addPiModalHeader, adoptPiModalFrame, adoptPiModalHeader, } from "./modal-frame.js";
15
21
  export { ModelsDialogComponent } from "./models-dialog.js";
16
22
  export type { ModelsDialogCallbacks, ModelsDialogConfig, ModelsDialogFilter, ModelsDialogModel } from "./models-dialog.js";
@@ -1,11 +1,15 @@
1
- export { adaptPiAssistantMessage, adaptPiToolExecution, adaptPiUserMessage } from "./components.js";
2
1
  export { loadHistoryEditor } from "./history-editor-loader.js";
3
- export { PiComponentConformanceError, runPiComponentConformance } from "./conformance.js";
4
2
  export { createPiShellOperationLoader, createPiShellShareOperationDialog, } from "./share-operation-dialog.js";
5
- export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, componentFromPort, componentPort, createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellStatus, createPiShellThemeSelector, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isPiPromptStyleCompaction, isRecord, piShellHyperlink, piShellTruncateToWidth, piShellVisibleWidth, renderPiShellChangelogLines, renderPiShellCommandMessage, renderPiShellHotkeysLines, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStartupDiagnostic, renderPiShellStatusText, renderPiShellTranscriptBlock, validatedAssistantMessage, } from "./shell-components.js";
3
+ export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, createPiShellEditor, } from "./shell-editor-autocomplete.js";
4
+ export { componentFromPort, componentPort, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isRecord, piShellHyperlink, piShellTruncateToWidth, piShellVisibleWidth, } from "./shell-shared-facade.js";
5
+ export { createPiExtensionUiBridge, } from "./shell-extension-ui.js";
6
+ export { createPiQueuedInputStatus, createPiShellFooter, createPiShellHeader, createPiShellLoadedResources, createPiShellStatus, } from "./shell-footer-status.js";
7
+ export { createPiShellArmin, createPiShellAuthProviderSelector, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellExtensionSelector, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellThemeSelector, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, } from "./shell-selectors-dialogs.js";
8
+ export { createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellHotkeys, createPiShellSessionInfo, renderPiShellChangelogLines, renderPiShellCommandMessage, renderPiShellHotkeysLines, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStatusText, } from "./shell-presenters-info.js";
9
+ export { createPiShellTranscriptComponent, isPiPromptStyleCompaction, renderPiShellStartupDiagnostic, renderPiShellTranscriptBlock, validatedAssistantMessage, } from "./shell-presenters-transcript.js";
6
10
  export { renderPiShellHotkeySections } from "./shell-hotkey-sections.js";
7
- export { PINNED_PI_LAYOUT, applyConfiguredPiTheme, applyPiTheme, applyPiThemeInstance, currentPiAccentColor, currentPiThemeName, derivePiAccentProjection, derivePiCanvasBackground, detectPiTerminalBackgroundFromEnv, detectPiTerminalBackgroundTheme, detectPiTerminalThemeForAuto, ensurePiTheme, getAvailablePiThemes, getPiSelectListTheme, loadPiTheme, onPiThemeChange, parsePiAutoThemeSetting, piCanvasBackgroundAnsi, piTheme, resolvePiThemeSetting, setPiAccentColor, setPiPackageBorderProjectionEnabled, stopPiThemeWatcher, } from "./theme.js";
8
- export { OwnedPiThemeController } from "./upstream/theme/theme-controller.js";
11
+ export { PINNED_PI_LAYOUT, applyConfiguredPiTheme, applyPiTheme, applyPiThemeInstance, currentPiAccentColor, currentPiThemeName, derivePiAccentProjection, derivePiCanvasBackground, detectPiTerminalBackgroundFromEnv, detectPiTerminalBackgroundTheme, detectPiTerminalThemeForAuto, ensurePiTheme, getAvailablePiThemes, loadPiTheme, onPiThemeChange, parsePiAutoThemeSetting, piCanvasBackgroundAnsi, piTheme, resolvePiThemeSetting, setPiAccentColor, setPiPackageBorderProjectionEnabled, stopPiThemeWatcher, } from "./upstream/theme/theme.js";
12
+ export { PI_THEME_SOURCE, getPiSelectListTheme, piUiTheme } from "./theme.js";
9
13
  export { PI_MODAL_CONTENT_PADDING_X, PiModalFrame, PiModalHeader, addPiModalHeader, adoptPiModalFrame, adoptPiModalHeader, } from "./modal-frame.js";
10
14
  export { ModelsDialogComponent } from "./models-dialog.js";
11
15
  export { CountdownTimer } from "./upstream/components/countdown-timer.js";
@@ -1,9 +1,7 @@
1
1
  import type { PiShellComponentPort } from "./shell-shared-facade.js";
2
2
  import type { ThinkingSelectorLevel } from "./upstream/components/thinking-selector.js";
3
3
  import type { FilterMode } from "./upstream/components/tree-selector.js";
4
- type ThinkingSelectorModule = typeof import("./thinking-selector-dialog.js");
5
- type TreeSelectorModule = typeof import("./upstream/components/tree-selector.js");
6
- export interface PiShellLazyThinkingSelectorOptions {
4
+ interface PiShellLazyThinkingSelectorOptions {
7
5
  readonly currentLevel: ThinkingSelectorLevel;
8
6
  readonly availableLevels: readonly ThinkingSelectorLevel[];
9
7
  readonly onSelect: (level: ThinkingSelectorLevel) => void;
@@ -15,7 +13,7 @@ export interface PiShellLazyThinkingSelectorOptions {
15
13
  readonly cycleBinding: string | readonly string[];
16
14
  };
17
15
  }
18
- export interface PiShellLazyTreeSelectorOptions {
16
+ interface PiShellLazyTreeSelectorOptions {
19
17
  readonly tree: readonly unknown[];
20
18
  readonly currentLeafId: string | null;
21
19
  readonly terminalHeight: number;
@@ -31,12 +29,6 @@ export interface PiShellLazySelectorLoader {
31
29
  createThinking(options: PiShellLazyThinkingSelectorOptions): Promise<PiShellComponentPort>;
32
30
  createTree(options: PiShellLazyTreeSelectorOptions): Promise<PiShellComponentPort>;
33
31
  }
34
- export interface PiShellLazySelectorImports {
35
- readonly thinking: () => Promise<ThinkingSelectorModule>;
36
- readonly tree: () => Promise<TreeSelectorModule>;
37
- }
38
- /** Builds one idempotent selector loader; fulfilled, in-flight, and rejected imports remain shared. */
39
- export declare function createPiShellLazySelectorLoader(imports?: PiShellLazySelectorImports): PiShellLazySelectorLoader;
40
32
  /** Production selector loader, dynamically reached only after the first input-ready frame. */
41
33
  export declare const piShellLazySelectors: PiShellLazySelectorLoader;
42
34
  export {};
@@ -4,7 +4,7 @@ const DEFAULT_IMPORTS = {
4
4
  tree: () => import("./upstream/components/tree-selector.js"),
5
5
  };
6
6
  /** Builds one idempotent selector loader; fulfilled, in-flight, and rejected imports remain shared. */
7
- export function createPiShellLazySelectorLoader(imports = DEFAULT_IMPORTS) {
7
+ function createPiShellLazySelectorLoader(imports = DEFAULT_IMPORTS) {
8
8
  let thinkingSelectorModule;
9
9
  let treeSelectorModule;
10
10
  const loadThinkingSelector = () => thinkingSelectorModule ??= imports.thinking();
@@ -1,31 +1,13 @@
1
- import { Container, Input, type Component, type Focusable, type TUI, type TuiMouseEvent, type TuiMouseEventResult } from "@earendil-works/pi-tui";
1
+ import { Container, Input, type Component, type Focusable } from "@earendil-works/pi-tui";
2
2
  export declare const PI_MODAL_CONTENT_PADDING_X = 1;
3
3
  /** Paints the standard Pi Input prompt as a live-themed dialog-search marker. */
4
4
  export declare function renderPiModalSearchInput(input: Input, width: number): string[];
5
- /** Keeps Pi Input behavior and geometry while owning only its standard dialog-search presentation. */
6
- export declare class PiModalSearchInput implements Component, Focusable {
7
- #private;
8
- constructor(input: Input);
9
- get focused(): boolean;
10
- set focused(value: boolean);
11
- invalidate(): void;
12
- render(width: number): string[];
13
- handleMouse(event: TuiMouseEvent): TuiMouseEventResult | undefined;
14
- }
15
5
  /** Replaces one explicitly identified direct Input child with the standard search presentation. */
16
- export declare function adoptPiModalSearchInput(container: Container, input: Component): PiModalSearchInput;
6
+ export declare function adoptPiModalSearchInput(container: Container, input: Component): Component & Focusable;
17
7
  /** Adds one standard dialog-search presentation while callers retain the Input controller. */
18
- export declare function addPiModalSearchInput(container: Container, input: Input): PiModalSearchInput;
8
+ export declare function addPiModalSearchInput(container: Container, input: Input): Component & Focusable;
19
9
  /** Adds the standard navigation/select/close footer before a dependency component's bottom rule. */
20
10
  export declare function addPiModalSelectFooter(container: Container): void;
21
- /** Owned cancellable operation frame with the canonical dialog close guidance. */
22
- export declare class PiCancellableOperationFrame extends Container {
23
- #private;
24
- constructor(tui: TUI, message: string);
25
- get signal(): AbortSignal;
26
- handleInput(data: string): void;
27
- dispose(): void;
28
- }
29
11
  /** The semantic top rule/title pair used while a modal assembles its frame. */
30
12
  export declare class PiModalHeader implements Component {
31
13
  readonly rule: Component;
@@ -46,7 +28,7 @@ export declare class PiModalFrame implements Component {
46
28
  }
47
29
  /** Add compact titled-modal chrome while a component assembles its semantic body. */
48
30
  export declare function addPiModalHeader(container: Container, rule: Component, title: Component): PiModalHeader;
49
- export interface PiModalFrameAdoption {
31
+ interface PiModalFrameAdoption {
50
32
  readonly topIndex: number;
51
33
  readonly bottomIndex: number;
52
34
  readonly header?: PiModalHeader;
@@ -65,3 +47,4 @@ export declare function adoptPiModalFrame(container: Container, adoption: PiModa
65
47
  * never inspected or rewritten. The pinned comparison profile does not call this adapter.
66
48
  */
67
49
  export declare function adoptPiModalHeader(container: Container, ruleIndex: number, titleIndex: number): PiModalHeader;
50
+ export {};
@@ -1,7 +1,6 @@
1
- import { CancellableLoader, Container, Input, Spacer, Text, } from "@earendil-works/pi-tui";
1
+ import { Container, Input, Spacer, Text, } from "@earendil-works/pi-tui";
2
2
  import { DIALOG_CONTENT_PADDING_X, dialogFrameGeometry, insetDialogContent } from "../../../contracts/presentation/index.js";
3
- import { DynamicBorder } from "../startup-public.js";
4
- import { DIALOG_CLOSE_SHORTCUT_HINT, paintPiBorder, piTheme, renderPiModalShortcutHints } from "./theme.js";
3
+ import { DIALOG_CLOSE_SHORTCUT_HINT, piTheme, renderPiModalShortcutHints } from "./theme.js";
5
4
  export const PI_MODAL_CONTENT_PADDING_X = DIALOG_CONTENT_PADDING_X;
6
5
  /** Paints the standard Pi Input prompt as a live-themed dialog-search marker. */
7
6
  export function renderPiModalSearchInput(input, width) {
@@ -14,7 +13,7 @@ export function renderPiModalSearchInput(input, width) {
14
13
  });
15
14
  }
16
15
  /** Keeps Pi Input behavior and geometry while owning only its standard dialog-search presentation. */
17
- export class PiModalSearchInput {
16
+ class PiModalSearchInput {
18
17
  #input;
19
18
  constructor(input) {
20
19
  this.#input = input;
@@ -48,25 +47,6 @@ export function addPiModalSelectFooter(container) {
48
47
  { key: "↑↓", action: "navigate" }, { key: "enter", action: "select" }, DIALOG_CLOSE_SHORTCUT_HINT,
49
48
  ]), 0, 0));
50
49
  }
51
- /** Owned cancellable operation frame with the canonical dialog close guidance. */
52
- export class PiCancellableOperationFrame extends Container {
53
- #loader;
54
- constructor(tui, message) {
55
- super();
56
- const theme = piTheme();
57
- this.#loader = new CancellableLoader(tui, text => theme.fg("accent", text), text => theme.fg("muted", text), message);
58
- this.addChild(new DynamicBorder(paintPiBorder));
59
- this.addChild(this.#loader);
60
- this.addChild(new Spacer(1));
61
- this.addChild(new Text(renderPiModalShortcutHints([DIALOG_CLOSE_SHORTCUT_HINT]), 0, 0));
62
- this.addChild(new Spacer(1));
63
- this.addChild(new DynamicBorder(paintPiBorder));
64
- adoptPiModalFrame(this, { topIndex: 0, bottomIndex: this.children.length - 1 });
65
- }
66
- get signal() { return this.#loader.signal; }
67
- handleInput(data) { this.#loader.handleInput(data); }
68
- dispose() { this.#loader.dispose(); }
69
- }
70
50
  /** The semantic top rule/title pair used while a modal assembles its frame. */
71
51
  export class PiModalHeader {
72
52
  rule;
@@ -7,7 +7,7 @@ import type { PiShellClipboardContent, PiShellEditorTextRange, PiShellPasteReser
7
7
  * vanilla Pi renders. This keeps owned UX additions out of the synchronized
8
8
  * Pi editor port and gives future interactions one registration point.
9
9
  */
10
- export interface OwnedEditorUxInterceptor {
10
+ interface OwnedEditorUxInterceptor {
11
11
  handleInput(data: string, next: (data?: string) => void): void;
12
12
  render(width: number, next: () => string[]): string[];
13
13
  reset(): void;
@@ -18,7 +18,7 @@ export interface OwnedEditorUxInterceptor {
18
18
  pasteClipboard?(): boolean;
19
19
  cancelPendingPastes?(): void;
20
20
  }
21
- export interface OwnedEditorPointerEvent {
21
+ interface OwnedEditorPointerEvent {
22
22
  readonly kind: "press" | "motion" | "release";
23
23
  readonly button: number;
24
24
  readonly column: number;
@@ -45,7 +45,7 @@ export declare class OwnedEditorUxInterception {
45
45
  ownsPointer(): boolean;
46
46
  pasteClipboard(): boolean;
47
47
  }
48
- export interface PromptSelectionUxOptions {
48
+ interface PromptSelectionUxOptions {
49
49
  readonly copyText: (text: string, cut: boolean) => void;
50
50
  readonly readClipboardContent: () => Promise<PiShellClipboardContent | null>;
51
51
  readonly beginClipboardPaste?: () => PiShellPasteReservation;
@@ -77,3 +77,4 @@ export declare function createPromptSelectionInterceptor(editor: Editor, keybind
77
77
  export declare function editorInsertedText(data: string): string | undefined;
78
78
  /** Shares the existing atomic-aware body layout with prompt/menu composition. */
79
79
  export declare function editorVisualLineCount(editor: Editor, width: number): number | undefined;
80
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { ImageAttachmentError, MAX_CLIPBOARD_TEXT_BYTES } from "../../../contracts/owned-ui/index.js";
2
2
  import { CURSOR_MARKER, decodeKittyPrintable, visibleWidth, } from "@earendil-works/pi-tui";
3
3
  import { promptPathWordRanges } from "./path-word-ranges.js";
4
+ import { BracketedPasteFramer, PASTE_START } from "./bracketed-paste.js";
4
5
  export class OwnedEditorUxInterception {
5
6
  interceptors;
6
7
  fallback;
@@ -68,7 +69,7 @@ class PromptSelectionInterceptor {
68
69
  #redoStack = [];
69
70
  #selectionRevision = 0;
70
71
  #pasteState = { generation: 0, preview: undefined };
71
- #terminalPaste;
72
+ #paste;
72
73
  #wordDirection;
73
74
  #geometry;
74
75
  editor;
@@ -78,11 +79,12 @@ class PromptSelectionInterceptor {
78
79
  this.editor = editor;
79
80
  this.keybindings = keybindings;
80
81
  this.options = options;
82
+ this.#paste = new BracketedPasteFramer(options.beginTextPaste === undefined ? undefined : MAX_CLIPBOARD_TEXT_BYTES);
81
83
  installAtomicSegmentation(editor, options.atomicRanges, () => this.#wordDirection);
82
84
  }
83
85
  handleInput(data, next) {
84
86
  this.#pasteState.preview = undefined;
85
- if (this.options.pasteEnabled === false ? discardTerminalPaste(this, data, value => this.handleInput(value, next)) : this.#handleTerminalPaste(data, next))
87
+ if (this.options.pasteEnabled === false ? this.#paste.discard(data, value => this.handleInput(value, next)) : this.#handleTerminalPaste(data, next))
86
88
  return;
87
89
  if (this.keybindings.matches(data, "owned.editor.selectAll")) {
88
90
  this.#selectAll();
@@ -166,24 +168,7 @@ class PromptSelectionInterceptor {
166
168
  return;
167
169
  }
168
170
  if (this.keybindings.matches(data, "tui.editor.cursorWordLeft")) {
169
- const before = this.#cursor();
170
- const startedWithAtomicFocus = this.#atomicFocus() !== undefined;
171
- this.#delegateWord(-1, next);
172
- let after = this.#cursor();
173
- const landedAtomic = this.#atomicRangeAt(after);
174
- if (!startedWithAtomicFocus && landedAtomic?.start === after.col && after.col > 0) {
175
- const line = editorState(this.editor).lines[after.line] ?? "";
176
- const previous = [...GRAPHEMES.segment(line.slice(0, after.col))].at(-1);
177
- if (previous !== undefined && !/^\s+$/u.test(previous.segment)) {
178
- this.#delegateWord(-1, next);
179
- after = this.#cursor();
180
- }
181
- }
182
- const line = editorState(this.editor).lines[after.line] ?? "";
183
- const landedPath = promptPathWordRanges(line).some(range => range.start === after.col);
184
- if (!samePosition(before, after) && !landedPath)
185
- this.#moveOntoPreviousSeparator();
186
- this.#requestRender();
171
+ this.#moveWordLeft(next);
187
172
  return;
188
173
  }
189
174
  const beforeText = this.editor.getText();
@@ -302,14 +287,15 @@ class PromptSelectionInterceptor {
302
287
  this.#pointerSelecting = false;
303
288
  this.#lastClick = undefined;
304
289
  this.#redoStack = [];
305
- DISABLED_TERMINAL_PASTES.delete(this);
290
+ // Invariant: reset forgets a paste being dropped, but a paste being inserted still completes.
291
+ if (this.options.pasteEnabled === false)
292
+ this.#paste.clear();
306
293
  this.#selectionRevision += 1;
307
294
  }
308
295
  cancelPendingPastes() {
309
296
  this.#pasteState.generation += 1;
310
297
  this.#pasteState.preview = undefined;
311
- this.#terminalPaste = undefined;
312
- DISABLED_TERMINAL_PASTES.delete(this);
298
+ this.#paste.clear();
313
299
  }
314
300
  hasSelection() {
315
301
  return this.#activeRange() !== undefined;
@@ -485,61 +471,30 @@ class PromptSelectionInterceptor {
485
471
  this.#requestRender();
486
472
  }
487
473
  #handleTerminalPaste(data, next) {
488
- const start = data.indexOf("\x1b[200~");
489
- if (this.#terminalPaste === undefined) {
474
+ if (!this.#paste.open) {
475
+ const start = data.indexOf(PASTE_START);
490
476
  if (start < 0)
491
477
  return false;
492
478
  if (start > 0) {
493
479
  const before = data.slice(0, start);
494
480
  this.handleInput(before, (replacement = before) => next(replacement));
495
481
  }
496
- this.#terminalPaste = { parts: [], piece: "", tail: "", bytes: 0, oversized: false };
497
- data = data.slice(start + 6);
482
+ data = data.slice(start);
498
483
  }
499
- // Protocol: inspect only the new fragment plus a delimiter-sized suffix, not the whole growing body.
500
- const pending = this.#terminalPaste;
501
- const fragment = pending.tail + data;
502
- const end = fragment.indexOf("\x1b[201~");
503
- const append = (part) => {
504
- if (pending.oversized || part.length === 0)
505
- return;
506
- if (this.options.beginTextPaste !== undefined) {
507
- pending.bytes += Buffer.byteLength(part);
508
- if (pending.bytes > MAX_CLIPBOARD_TEXT_BYTES) {
509
- pending.oversized = true;
510
- pending.parts = [];
511
- pending.piece = "";
512
- return;
513
- }
514
- }
515
- // Performance: bound fragment metadata even if a terminal supplies one character per input chunk.
516
- pending.piece += part;
517
- if (pending.piece.length >= 16_384) {
518
- pending.parts.push(pending.piece);
519
- pending.piece = "";
520
- }
521
- };
522
- if (end < 0) {
523
- let cut = Math.max(0, fragment.length - 5);
524
- if (cut > 0 && /[\uD800-\uDBFF]/u.test(fragment[cut - 1]) && /[\uDC00-\uDFFF]/u.test(fragment[cut]))
525
- cut--;
526
- append(fragment.slice(0, cut));
527
- pending.tail = fragment.slice(cut);
484
+ const pasted = this.#paste.feed(data);
485
+ if (pasted === undefined)
528
486
  return true;
529
- }
530
- append(fragment.slice(0, end));
531
- const remaining = fragment.slice(end + 6);
532
- this.#terminalPaste = undefined;
533
- if (pending.oversized) {
534
- this.options.onPasteInput?.(pending.bytes, "framing");
487
+ const { remaining, bytes } = pasted;
488
+ if (pasted.oversized) {
489
+ this.options.onPasteInput?.(bytes, "framing");
535
490
  this.options.onPasteRejected?.(new ImageAttachmentError("paste-size"));
536
491
  if (remaining.length > 0)
537
492
  this.handleInput(remaining, (replacement = remaining) => next(replacement));
538
493
  return true;
539
494
  }
540
- const text = pending.parts.join("") + pending.piece;
495
+ const text = pasted.text;
541
496
  const deferred = text.length > 0 && this.options.beginTextPaste !== undefined && (this.options.deferTextPaste?.(text) ?? true);
542
- this.options.onPasteInput?.(pending.bytes, "framing");
497
+ this.options.onPasteInput?.(bytes, "framing");
543
498
  if (text.length > 0)
544
499
  this.#redoStack = [];
545
500
  if (text.length === 0)
@@ -547,7 +502,7 @@ class PromptSelectionInterceptor {
547
502
  else if (deferred)
548
503
  this.#pasteFromClipboard(text);
549
504
  else {
550
- this.options.onPasteInput?.(pending.bytes, "inserting");
505
+ this.options.onPasteInput?.(bytes, "inserting");
551
506
  const transformed = this.options.transformPastedContent({ kind: "text", text });
552
507
  if (transformed === text && this.#orderedSelection() === undefined)
553
508
  next(`\x1b[200~${text}\x1b[201~`);
@@ -559,7 +514,7 @@ class PromptSelectionInterceptor {
559
514
  this.#redoStack = [];
560
515
  this.#requestRender();
561
516
  }
562
- this.options.onPasteInput?.(pending.bytes, "settled");
517
+ this.options.onPasteInput?.(bytes, "settled");
563
518
  }
564
519
  if (remaining.length > 0)
565
520
  this.handleInput(remaining, (replacement = remaining) => next(replacement));
@@ -835,14 +790,31 @@ class PromptSelectionInterceptor {
835
790
  const line = editorState(this.editor).lines[position.line] ?? "";
836
791
  return this.options.atomicRanges(line).find(range => position.col >= range.start && position.col < range.end);
837
792
  }
838
- #moveOntoPreviousSeparator() {
839
- const cursor = this.#cursor();
840
- if (cursor.col === 0)
841
- return;
842
- const line = editorState(this.editor).lines[cursor.line] ?? "";
843
- const previous = [...GRAPHEMES.segment(line.slice(0, cursor.col))].at(-1);
844
- if (previous !== undefined && /^\s+$/u.test(previous.segment))
845
- this.#moveCursor(-1);
793
+ // Compatibility: word-left steps over an atomic chip as one word, stops on a path boundary, and
794
+ // otherwise lands on the separator before the word, as pinned Pi's prompt editor does.
795
+ #moveWordLeft(next) {
796
+ const before = this.#cursor();
797
+ const startedWithAtomicFocus = this.#atomicFocus() !== undefined;
798
+ this.#delegateWord(-1, next);
799
+ let after = this.#cursor();
800
+ const landedAtomic = this.#atomicRangeAt(after);
801
+ if (!startedWithAtomicFocus && landedAtomic?.start === after.col && after.col > 0) {
802
+ const line = editorState(this.editor).lines[after.line] ?? "";
803
+ const previous = [...GRAPHEMES.segment(line.slice(0, after.col))].at(-1);
804
+ if (previous !== undefined && !/^\s+$/u.test(previous.segment)) {
805
+ this.#delegateWord(-1, next);
806
+ after = this.#cursor();
807
+ }
808
+ }
809
+ const line = editorState(this.editor).lines[after.line] ?? "";
810
+ const landedPath = promptPathWordRanges(line).some(range => range.start === after.col);
811
+ if (!samePosition(before, after) && !landedPath && after.col > 0) {
812
+ // Invariant: move onto the separator before the word, never past the line start.
813
+ const previous = [...GRAPHEMES.segment(line.slice(0, after.col))].at(-1);
814
+ if (previous !== undefined && /^\s+$/u.test(previous.segment))
815
+ this.#moveCursor(-1);
816
+ }
817
+ this.#requestRender();
846
818
  }
847
819
  #snapshot() {
848
820
  return { text: this.editor.getText(), cursor: this.#cursor() };
@@ -981,72 +953,6 @@ function isEditorSegment(value) {
981
953
  const input = Reflect.get(value, "input");
982
954
  return typeof segment === "string" && typeof index === "number" && typeof input === "string";
983
955
  }
984
- const DISABLED_TERMINAL_PASTES = new WeakMap();
985
- function discardTerminalPaste(owner, data, forward) {
986
- const startMarker = "\x1b[200~";
987
- const endMarker = "\x1b[201~";
988
- const state = DISABLED_TERMINAL_PASTES.get(owner) ?? { startTail: "", bodyTail: null };
989
- if (state.bodyTail !== null) {
990
- const framed = state.bodyTail + data;
991
- const end = framed.indexOf(endMarker);
992
- if (end < 0) {
993
- state.bodyTail = delimiterTail(framed, endMarker);
994
- DISABLED_TERMINAL_PASTES.set(owner, state);
995
- return true;
996
- }
997
- DISABLED_TERMINAL_PASTES.delete(owner);
998
- const remaining = framed.slice(end + endMarker.length);
999
- if (remaining.length > 0)
1000
- forward(remaining);
1001
- return true;
1002
- }
1003
- const hadStartTail = state.startTail.length > 0;
1004
- const candidate = state.startTail + data;
1005
- state.startTail = "";
1006
- const start = candidate.indexOf(startMarker);
1007
- if (start >= 0) {
1008
- if (start > 0)
1009
- forward(candidate.slice(0, start));
1010
- const framed = candidate.slice(start + startMarker.length);
1011
- const end = framed.indexOf(endMarker);
1012
- if (end < 0) {
1013
- state.bodyTail = delimiterTail(framed, endMarker);
1014
- DISABLED_TERMINAL_PASTES.set(owner, state);
1015
- }
1016
- else {
1017
- DISABLED_TERMINAL_PASTES.delete(owner);
1018
- const remaining = framed.slice(end + endMarker.length);
1019
- if (remaining.length > 0)
1020
- forward(remaining);
1021
- }
1022
- return true;
1023
- }
1024
- const partial = delimiterTail(candidate, startMarker);
1025
- // Compatibility: standalone Escape still cancels; marker fragments stay pending.
1026
- if (partial.length > 1) {
1027
- const before = candidate.slice(0, candidate.length - partial.length);
1028
- if (before.length > 0)
1029
- forward(before);
1030
- state.startTail = partial;
1031
- DISABLED_TERMINAL_PASTES.set(owner, state);
1032
- return true;
1033
- }
1034
- DISABLED_TERMINAL_PASTES.delete(owner);
1035
- if (hadStartTail) {
1036
- forward(candidate);
1037
- return true;
1038
- }
1039
- return false;
1040
- }
1041
- function delimiterTail(text, delimiter) {
1042
- const limit = Math.min(text.length, delimiter.length - 1);
1043
- for (let length = limit; length > 0; length -= 1) {
1044
- const suffix = text.slice(text.length - length);
1045
- if (delimiter.startsWith(suffix))
1046
- return suffix;
1047
- }
1048
- return "";
1049
- }
1050
956
  export function editorInsertedText(data) {
1051
957
  if (!data || data.includes("\u001b[200~"))
1052
958
  return undefined;
@@ -1,19 +1,2 @@
1
- export interface PiShellPromptInputGeometry {
2
- readonly prefixWidth: number;
3
- readonly innerWidth: number;
4
- readonly paddingX: number;
5
- readonly contentWidth: number;
6
- readonly layoutWidth: number;
7
- }
8
- export interface PiShellPromptInputBody {
9
- readonly rows: readonly string[];
10
- readonly topRule?: string | undefined;
11
- readonly bottomRule?: string | undefined;
12
- readonly after?: readonly string[];
13
- readonly afterIndent?: number;
14
- }
15
- export interface PiShellPromptInputPresentation {
16
- geometry(width: number, padding?: number): PiShellPromptInputGeometry;
17
- styleRule(text: string): string;
18
- render(width: number, body: (innerWidth: number) => PiShellPromptInputBody, ruled?: boolean, padding?: number): string[];
19
- }
1
+ import type { OwnedUiShellPromptInputPresentation } from "../../../contracts/owned-ui/index.js";
2
+ export type PiShellPromptInputPresentation = OwnedUiShellPromptInputPresentation;
@@ -151,5 +151,6 @@ export declare const BUILTIN_THEME_RESOURCES: Readonly<{
151
151
  };
152
152
  };
153
153
  }>;
154
- export type BuiltinThemeName = keyof typeof BUILTIN_THEME_RESOURCES;
154
+ type BuiltinThemeName = keyof typeof BUILTIN_THEME_RESOURCES;
155
155
  export declare function isBuiltinThemeName(name: string): name is BuiltinThemeName;
156
+ export {};
@@ -1,4 +1,5 @@
1
- import { type PiShellEditorPort, type PiShellEditorOptions } from "./shell-shared-facade.js";
1
+ import { type OwnedUiShellEditorOptions } from "../../../contracts/owned-ui/index.js";
2
+ import { type PiShellEditorPort } from "./shell-shared-facade.js";
2
3
  export declare const PINNED_PI_BUILTIN_SLASH_COMMANDS: ({
3
4
  readonly name: "thinking";
4
5
  readonly description: "Set thinking level";
@@ -20,4 +21,4 @@ export declare const OWNED_BUILTIN_SLASH_COMMANDS: ({
20
21
  name: string;
21
22
  description: string;
22
23
  })[];
23
- export declare function createPiShellEditor(options: PiShellEditorOptions): PiShellEditorPort;
24
+ export declare function createPiShellEditor(options: OwnedUiShellEditorOptions): PiShellEditorPort;
@@ -1,8 +1,8 @@
1
+ import type { OwnedUiShellKeybindings } from "../../../contracts/owned-ui/index.js";
1
2
  import type { OwnedUiSessionViewModel } from "../../../contracts/owned-ui/index.js";
2
- import { type KeybindingsConfig } from "./upstream/adjacent/core/keybindings.js";
3
3
  import { type PiShellViewComponentPort, type PiShellStatusPort, type PiShellProgressStatusPresentation, type PiShellQueuedInputPort, type PiShellHeaderPort, type PiShellResourceEntry, type PiShellLoadedResourcesPort, type PiShellHeaderOptions, type PiShellEditorOptions } from "./shell-shared-facade.js";
4
4
  export declare function createPiShellHeader(options?: PiShellHeaderOptions): PiShellHeaderPort;
5
5
  export declare function createPiShellLoadedResources(resources: readonly PiShellResourceEntry[], initialExpanded?: boolean): PiShellLoadedResourcesPort;
6
6
  export declare function createPiShellStatus(view: OwnedUiSessionViewModel, progressStatus: PiShellProgressStatusPresentation, runtime?: Pick<PiShellEditorOptions, "getColumns" | "getRows" | "requestRender">): PiShellStatusPort;
7
7
  export declare function createPiShellFooter(view: OwnedUiSessionViewModel, cwd: string, profile?: "pi" | "a1", showLevel?: () => boolean): PiShellViewComponentPort;
8
- export declare function createPiQueuedInputStatus(submissions: readonly string[], presentation?: "pinned" | "custom-viewport", getKeybindings?: () => KeybindingsConfig): PiShellQueuedInputPort;
8
+ export declare function createPiQueuedInputStatus(submissions: readonly string[], presentation?: "pinned" | "custom-viewport", getKeybindings?: () => OwnedUiShellKeybindings): PiShellQueuedInputPort;
@@ -1,3 +1,4 @@
1
+ import { piKeybindings } from "./shell-shared-facade.js";
1
2
  import { rawKeyHint, VERSION } from "../startup-public.js";
2
3
  import { Spacer, Text, } from "@earendil-works/pi-tui";
3
4
  import { SessionFooter } from "./upstream/components/session-footer.js";
@@ -263,7 +264,7 @@ function queuedInputText(submissions, presentation, bindings) {
263
264
  return submissions.map(submission => theme.fg("muted", `Steering: ${submission.replaceAll("\n", " ⏎ ")}`)).join("\n");
264
265
  }
265
266
  const messages = submissions.map(submission => theme.fg("dim", `Steering: ${submission.replaceAll("\n", " ⏎ ")}`));
266
- const keys = KeybindingsManager.fromOwnedBindings(bindings).getKeys("app.message.dequeue");
267
+ const keys = KeybindingsManager.fromOwnedBindings(piKeybindings(bindings)).getKeys("app.message.dequeue");
267
268
  const label = keys.length === 0 ? "Unbound" : keys.map(displayKeybinding).join("/");
268
269
  const dequeueHint = theme.fg("dim", `↳ ${label} to edit all queued messages`);
269
270
  // Compatibility: the custom viewport matches Pi's interactive queue presentation while the
@@ -290,7 +291,7 @@ function compactHeaderText() {
290
291
  return `${headerWithLogo(instructions)}\n${compactOnboarding}\n\n${onboarding}`;
291
292
  }
292
293
  function expandedHeaderText(bindings) {
293
- const keys = bindings === undefined ? undefined : KeybindingsManager.fromOwnedBindings(bindings);
294
+ const keys = bindings === undefined ? undefined : KeybindingsManager.fromOwnedBindings(piKeybindings(bindings));
294
295
  const instructions = [
295
296
  rawKeyHint("escape", "to interrupt"),
296
297
  rawKeyHint("ctrl+c", "to clear"),