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

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 (253) 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 +4 -5
  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/response-copy-protocol.d.ts +3 -2
  39. package/dist/app/session-shell/response-copy-transport.d.ts +2 -14
  40. package/dist/app/session-shell/response-copy-transport.js +1 -1
  41. package/dist/app/session-shell/session-lifecycle.d.ts +2 -1
  42. package/dist/app/session-shell/session-shell-root.d.ts +74 -89
  43. package/dist/app/session-shell/session-shell-root.js +81 -113
  44. package/dist/app/session-shell/session-shell.d.ts +13 -16
  45. package/dist/app/session-shell/session-shell.js +144 -268
  46. package/dist/app/session-shell/session-viewport-controller.d.ts +7 -6
  47. package/dist/app/session-shell/session-viewport-controller.js +2 -2
  48. package/dist/app/session-shell/settings-bindings.d.ts +24 -2
  49. package/dist/app/session-shell/settings-bindings.js +24 -0
  50. package/dist/app/session-shell/share-operation.d.ts +3 -3
  51. package/dist/app/session-shell/share-operation.js +4 -6
  52. package/dist/app/session-shell/shell-clipboard.d.ts +59 -0
  53. package/dist/app/session-shell/shell-clipboard.js +119 -0
  54. package/dist/app/session-shell/shell-editor-factory.d.ts +8 -4
  55. package/dist/app/session-shell/shell-editor-factory.js +13 -15
  56. package/dist/app/session-shell/shell-host.d.ts +16 -17
  57. package/dist/app/session-shell/shell-host.js +18 -19
  58. package/dist/app/session-shell/shell-layout.d.ts +2 -2
  59. package/dist/app/session-shell/shell-prompt-suggestions.d.ts +26 -0
  60. package/dist/app/session-shell/shell-prompt-suggestions.js +48 -0
  61. package/dist/app/session-shell/suggestion-surface.d.ts +1 -6
  62. package/dist/app/session-shell/suggestion-surface.js +1 -1
  63. package/dist/app/session-shell/system-clipboard.d.ts +2 -14
  64. package/dist/app/session-shell/system-clipboard.js +2 -7
  65. package/dist/app/session-shell/transcript-document.d.ts +11 -8
  66. package/dist/app/session-shell/transcript-document.js +13 -14
  67. package/dist/app/session-shell/viewport-layout.d.ts +2 -2
  68. package/dist/app/session-shell/workflow-output.d.ts +5 -3
  69. package/dist/app/session-shell/workflow-output.js +13 -15
  70. package/dist/cli/package-messages.d.ts +0 -1
  71. package/dist/cli/package-messages.js +1 -1
  72. package/dist/cli/session-context.d.ts +1 -1
  73. package/dist/cli/uninstall.d.ts +3 -2
  74. package/dist/composition/owned-settings.d.ts +2 -1
  75. package/dist/composition/owned-settings.js +0 -3
  76. package/dist/composition/owned-ui.d.ts +1 -1
  77. package/dist/composition/owned-ui.js +27 -27
  78. package/dist/composition/reference-selection-options.d.ts +1 -1
  79. package/dist/composition/reference-selection-options.js +1 -1
  80. package/dist/composition/session-runtime-registry.d.ts +2 -1
  81. package/dist/composition/settings-route-host.js +3 -10
  82. package/dist/composition/settings-search-input.d.ts +2 -1
  83. package/dist/composition/startup-route.d.ts +2 -2
  84. package/dist/composition/startup-route.js +2 -2
  85. package/dist/contracts/owned-ui/extension-ui.d.ts +2 -1
  86. package/dist/contracts/owned-ui/index.d.ts +1 -0
  87. package/dist/contracts/owned-ui/session-presenters.d.ts +3 -0
  88. package/dist/contracts/owned-ui/shell-components.d.ts +543 -0
  89. package/dist/contracts/owned-ui/shell-components.js +1 -0
  90. package/dist/contracts/presentation/component.d.ts +17 -0
  91. package/dist/contracts/presentation/component.js +8 -0
  92. package/dist/contracts/presentation/index.d.ts +6 -15
  93. package/dist/contracts/presentation/index.js +2 -0
  94. package/dist/contracts/presentation/terminal.d.ts +290 -0
  95. package/dist/contracts/presentation/terminal.js +1 -0
  96. package/dist/contracts/presentation/theme.d.ts +46 -0
  97. package/dist/contracts/presentation/theme.js +1 -0
  98. package/dist/features/launch/development-launch.js +1 -1
  99. package/dist/features/launch/runtime-selection.d.ts +2 -2
  100. package/dist/features/launch/runtime-selection.js +2 -2
  101. package/dist/features/owned-ui/project-trust-prompt.d.ts +2 -2
  102. package/dist/features/owned-ui/project-trust-prompt.js +1 -1
  103. package/dist/features/owned-ui/release-note-state.d.ts +2 -1
  104. package/dist/features/owned-ui/settings-app.js +38 -219
  105. package/dist/features/owned-ui/settings-edits.d.ts +31 -0
  106. package/dist/features/owned-ui/settings-edits.js +139 -0
  107. package/dist/features/owned-ui/settings-scroll-rail.d.ts +29 -0
  108. package/dist/features/owned-ui/settings-scroll-rail.js +79 -0
  109. package/dist/features/owned-ui/settings-search-input.d.ts +2 -1
  110. package/dist/features/prompt-history/service.d.ts +3 -2
  111. package/dist/foundation/lifecycle/claim-gate.d.ts +2 -1
  112. package/dist/foundation/release/automatic-update.d.ts +5 -14
  113. package/dist/foundation/release/automatic-update.js +14 -14
  114. package/dist/foundation/release/bootstrap.js +4 -4
  115. package/dist/foundation/release/dependency-certification.d.ts +0 -1
  116. package/dist/foundation/release/dependency-certification.js +1 -1
  117. package/dist/foundation/release/early-accent.d.ts +2 -2
  118. package/dist/foundation/release/early-accent.js +1 -1
  119. package/dist/foundation/release/index.d.ts +2 -2
  120. package/dist/foundation/release/index.js +1 -1
  121. package/dist/foundation/release/latest-release.d.ts +3 -18
  122. package/dist/foundation/release/latest-release.js +10 -10
  123. package/dist/foundation/release/ordinary-launch-selection.d.ts +1 -1
  124. package/dist/foundation/release/ordinary-launch-selection.js +1 -1
  125. package/dist/foundation/release/release-gc.d.ts +3 -3
  126. package/dist/foundation/release/release-gc.js +4 -4
  127. package/dist/foundation/release/{cohort-state.d.ts → release-state.d.ts} +23 -23
  128. package/dist/foundation/release/{cohort-state.js → release-state.js} +8 -8
  129. package/dist/foundation/release/update-activation.js +2 -2
  130. package/dist/foundation/release/update-execution-lease.d.ts +2 -3
  131. package/dist/foundation/release/update-execution-lease.js +1 -1
  132. package/dist/foundation/release/update-launch.d.ts +2 -2
  133. package/dist/foundation/release/update.d.ts +0 -2
  134. package/dist/foundation/release/update.js +14 -14
  135. package/dist/foundation/startup/startup-budget.d.ts +5 -5
  136. package/dist/foundation/startup/startup-budget.js +2 -2
  137. package/dist/integrations/pi/components/editor-interaction.d.ts +4 -12
  138. package/dist/integrations/pi/components/index.d.ts +15 -9
  139. package/dist/integrations/pi/components/index.js +9 -5
  140. package/dist/integrations/pi/components/lazy-selectors.d.ts +2 -10
  141. package/dist/integrations/pi/components/lazy-selectors.js +1 -1
  142. package/dist/integrations/pi/components/modal-frame.d.ts +5 -22
  143. package/dist/integrations/pi/components/modal-frame.js +3 -23
  144. package/dist/integrations/pi/components/owned-editor-ux.d.ts +4 -3
  145. package/dist/integrations/pi/components/prompt-input-port.d.ts +2 -19
  146. package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -1
  147. package/dist/integrations/pi/components/shell-editor-autocomplete.d.ts +3 -2
  148. package/dist/integrations/pi/components/shell-footer-status.d.ts +2 -2
  149. package/dist/integrations/pi/components/shell-footer-status.js +3 -2
  150. package/dist/integrations/pi/components/shell-presenters-info.d.ts +6 -5
  151. package/dist/integrations/pi/components/shell-presenters-info.js +2 -1
  152. package/dist/integrations/pi/components/shell-session-info-reference.d.ts +2 -1
  153. package/dist/integrations/pi/components/shell-shared-facade.d.ts +33 -227
  154. package/dist/integrations/pi/components/shell-shared-facade.js +8 -1
  155. package/dist/integrations/pi/components/skills-command.d.ts +1 -9
  156. package/dist/integrations/pi/components/skills-command.js +5 -5
  157. package/dist/integrations/pi/components/theme.d.ts +9 -2
  158. package/dist/integrations/pi/components/theme.js +17 -2
  159. package/dist/integrations/pi/components/thinking-selector-dialog.d.ts +2 -1
  160. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
  161. package/dist/integrations/pi/engine/adapter.d.ts +3 -5
  162. package/dist/integrations/pi/engine/adapter.js +3 -12
  163. package/dist/integrations/pi/engine/changelog.d.ts +2 -2
  164. package/dist/integrations/pi/engine/changelog.js +3 -3
  165. package/dist/integrations/pi/engine/compaction-progress.d.ts +2 -3
  166. package/dist/integrations/pi/engine/compaction-progress.js +1 -1
  167. package/dist/integrations/pi/engine/conformance.d.ts +2 -1
  168. package/dist/integrations/pi/engine/default-model-setting.d.ts +0 -2
  169. package/dist/integrations/pi/engine/default-model-setting.js +1 -2
  170. package/dist/integrations/pi/engine/event-delivery.d.ts +2 -1
  171. package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -1
  172. package/dist/integrations/pi/engine/host.js +2 -2
  173. package/dist/integrations/pi/engine/message-values.d.ts +0 -1
  174. package/dist/integrations/pi/engine/message-values.js +1 -1
  175. package/dist/integrations/pi/engine/pending-delivery.d.ts +0 -4
  176. package/dist/integrations/pi/engine/pending-delivery.js +3 -3
  177. package/dist/integrations/pi/engine/ports.d.ts +7 -1
  178. package/dist/integrations/pi/engine/ports.js +4 -0
  179. package/dist/integrations/pi/engine/project-trust-preflight.d.ts +2 -1
  180. package/dist/integrations/pi/engine/prompt-suggestions.d.ts +3 -2
  181. package/dist/integrations/pi/engine/provider-authentication.d.ts +1 -1
  182. package/dist/integrations/pi/engine/public-main-entry.d.ts +1 -5
  183. package/dist/integrations/pi/engine/public-main-entry.js +1 -1
  184. package/dist/integrations/pi/engine/repository-pr-rest.d.ts +1 -9
  185. package/dist/integrations/pi/engine/repository-pr-rest.js +2 -2
  186. package/dist/integrations/pi/engine/repository-pr.d.ts +1 -3
  187. package/dist/integrations/pi/engine/repository-pr.js +1 -1
  188. package/dist/integrations/pi/engine/resource-catalog.d.ts +2 -1
  189. package/dist/integrations/pi/engine/session-integration.d.ts +1 -1
  190. package/dist/integrations/pi/engine/session-runtime.d.ts +4 -3
  191. package/dist/integrations/pi/engine/settings-bridge.d.ts +0 -2
  192. package/dist/integrations/pi/engine/settings-bridge.js +1 -1
  193. package/dist/integrations/pi/engine/settings-port.d.ts +3 -2
  194. package/dist/integrations/pi/engine/transcript-projection.d.ts +2 -1
  195. package/dist/integrations/pi/engine/workflow-contexts.d.ts +1 -1
  196. package/dist/integrations/pi/engine/workflow-runner.d.ts +1 -1
  197. package/dist/integrations/pi/engine/workflow-support.d.ts +0 -6
  198. package/dist/integrations/pi/engine/workflow-support.js +4 -18
  199. package/dist/integrations/pi/engine/workflows.d.ts +5 -5
  200. package/dist/integrations/pi/session-presenters/components.d.ts +3 -0
  201. package/dist/integrations/pi/session-presenters/components.js +75 -0
  202. package/dist/integrations/pi/session-presenters/index.d.ts +1 -0
  203. package/dist/integrations/pi/session-presenters/index.js +1 -0
  204. package/dist/integrations/pi/session-presenters/presentation.d.ts +3 -0
  205. package/dist/integrations/pi/session-presenters/presentation.js +10 -0
  206. package/dist/integrations/pi/session-presenters/presenters.d.ts +2 -1
  207. package/dist/integrations/pi/session-presenters/presenters.js +3 -1
  208. package/dist/integrations/pi/tui-runtime/adapter.js +21 -30
  209. package/dist/integrations/pi/tui-runtime/contracts.d.ts +22 -166
  210. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +5 -40
  211. package/dist/integrations/pi/tui-runtime/index.d.ts +1 -0
  212. package/dist/integrations/pi/tui-runtime/index.js +1 -0
  213. package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +4 -6
  214. package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +2 -8
  215. package/dist/integrations/pi/tui-runtime/overlay-geometry.js +3 -9
  216. package/dist/integrations/pi/tui-runtime/runtime-factory.d.ts +3 -0
  217. package/dist/integrations/pi/tui-runtime/runtime-factory.js +11 -0
  218. package/dist/ui/components/index.d.ts +2 -2
  219. package/dist/ui/components/index.js +1 -1
  220. package/dist/ui/components/selection-copy.d.ts +0 -1
  221. package/dist/ui/components/selection-copy.js +0 -12
  222. package/dist/ui/components/theme.d.ts +4 -19
  223. package/dist/ui/components/theme.js +6 -0
  224. package/dist/ui/settings/declarations.d.ts +2 -3
  225. package/dist/ui/settings/declarations.js +2 -3
  226. package/dist/ui/settings/early-accent.js +1 -1
  227. package/dist/ui/settings/index.d.ts +3 -5
  228. package/dist/ui/settings/index.js +2 -3
  229. package/dist/ui/settings/manager.d.ts +0 -4
  230. package/dist/ui/settings/manager.js +6 -62
  231. package/dist/ui/settings/resolution.d.ts +6 -18
  232. package/dist/ui/settings/resolution.js +4 -103
  233. package/dist/ui/settings/sections.d.ts +0 -4
  234. package/dist/ui/settings/sections.js +1 -1
  235. package/docs/architecture/boundaries.md +2 -2
  236. package/docs/architecture/internal-naming.md +2 -0
  237. package/docs/architecture/project-structure.md +4 -2
  238. package/docs/validation.md +1 -1
  239. package/package.json +3 -4
  240. package/dist/integrations/pi/components/components.d.ts +0 -4
  241. package/dist/integrations/pi/components/components.js +0 -48
  242. package/dist/integrations/pi/components/conformance.d.ts +0 -18
  243. package/dist/integrations/pi/components/conformance.js +0 -70
  244. package/dist/integrations/pi/components/shell-components.d.ts +0 -7
  245. package/dist/integrations/pi/components/shell-components.js +0 -7
  246. package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +0 -33
  247. package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -114
  248. package/dist/ui/settings/migrations.d.ts +0 -19
  249. package/dist/ui/settings/migrations.js +0 -225
  250. package/dist/ui/settings/progress-palette.generated.d.ts +0 -139
  251. package/dist/ui/settings/progress-palette.generated.js +0 -139
  252. /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.d.ts +0 -0
  253. /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.js +0 -0
@@ -25,9 +25,9 @@ export async function composeOwnedUiApplication(options = {}) {
25
25
  }
26
26
  export async function composeOwnedUi(options = {}) {
27
27
  const cwd = options.cwd ?? process.cwd();
28
- const ownedSurfaces = options.ownedSurfaces !== "off";
28
+ const productMode = options.productMode ?? "bare", bare = productMode === "bare";
29
29
  const sessionRuntimes = new SessionRuntimeRegistry({
30
- runtimeId: ownedSurfaces ? process.env[PRODUCT_IDENTITY.environment.sessionRuntimeId] : undefined,
30
+ runtimeId: bare ? process.env[PRODUCT_IDENTITY.environment.sessionRuntimeId] : undefined,
31
31
  inspectProcess: options.inspectProcess,
32
32
  });
33
33
  const productPaths = resolveProductPaths();
@@ -43,13 +43,13 @@ export async function composeOwnedUi(options = {}) {
43
43
  // Invariant: process-wide engine state has one owner. The host installs the HTTP dispatcher, applies
44
44
  // the theme singletons, and announces startup notices once; every session is created through it.
45
45
  const host = await (options.createEngineHost ?? (async (hostOptions) => createPiEngineHost(hostOptions)))({
46
- productMode: ownedSurfaces ? "bare" : "comparison",
46
+ productMode,
47
47
  availableThemes: () => getAvailablePiThemes().map(theme => theme.name),
48
- announceStartupChangelog: !ownedSurfaces,
48
+ announceStartupChangelog: !bare,
49
49
  theme: {
50
- base: ownedSurfaces ? "dark" : "engine-configured",
51
- accentColor: settings !== null && ownedSurfaces ? settings.value("accentColor") : "purple",
52
- packageBorderProjection: ownedSurfaces,
50
+ base: bare ? "dark" : "engine-configured",
51
+ accentColor: settings !== null && bare ? settings.value("accentColor") : "purple",
52
+ packageBorderProjection: bare,
53
53
  apply: { base: applyConfiguredPiTheme, accentColor: setPiAccentColor, packageBorderProjection: setPiPackageBorderProjectionEnabled },
54
54
  },
55
55
  ...(projectTrustPrompt === undefined ? {} : { projectTrustPrompt }),
@@ -58,7 +58,7 @@ export async function composeOwnedUi(options = {}) {
58
58
  try {
59
59
  backend = await host.create({
60
60
  cwd,
61
- ...(ownedSurfaces ? { repositoryContextReader: sessionRuntimes.readerFor(undefined) } : {}),
61
+ ...(bare ? { repositoryContextReader: sessionRuntimes.readerFor(undefined) } : {}),
62
62
  ...(options.sessionPath === undefined ? {} : { sessionPath: options.sessionPath }),
63
63
  ...(options.sessionSelection === undefined ? {} : { sessionSelection: options.sessionSelection }),
64
64
  ...(sessionForkPrompt === undefined ? {} : { sessionForkPrompt }),
@@ -69,13 +69,13 @@ export async function composeOwnedUi(options = {}) {
69
69
  throw error;
70
70
  }
71
71
  const releaseNote = await StartupReleaseNote.load({
72
- ownedSurfaces,
72
+ productMode,
73
73
  configDir: productPaths.configDir,
74
74
  ...(options.releaseNotes === undefined ? {} : { releaseNotes: options.releaseNotes }),
75
75
  ...(options.packageVersion === undefined ? {} : { packageVersion: options.packageVersion }),
76
76
  ...(options.profileId === undefined ? {} : { profileId: options.profileId }),
77
77
  });
78
- const unsubscribeAccentChange = settings === null || !ownedSurfaces
78
+ const unsubscribeAccentChange = settings === null || !bare
79
79
  ? () => { }
80
80
  : settings.onChange(current => {
81
81
  const accent = current.value("accentColor");
@@ -83,12 +83,12 @@ export async function composeOwnedUi(options = {}) {
83
83
  });
84
84
  // Rationale: separate A1 processes share one settings document; a live scope change saved in
85
85
  // one reaches the others only by rereading that document.
86
- const unwatchSharedSettings = settings === null || !ownedSurfaces
86
+ const unwatchSharedSettings = settings === null || !bare
87
87
  ? () => { }
88
88
  : watchSharedSettings(settings);
89
89
  const unsubscribeAccent = () => { unwatchSharedSettings(); unsubscribeAccentChange(); };
90
90
  // Invariant: the Settings search and agent prompt borrow the same resolved Pi keybindings.
91
- const keybindingsHost = createPiKeybindingsHost({ profile: ownedSurfaces ? "a1" : "pi", agentDir: backend.identity.agentDir });
91
+ const keybindingsHost = createPiKeybindingsHost({ profile: bare ? "a1" : "pi", agentDir: backend.identity.agentDir });
92
92
  const keybindings = keybindingsHost;
93
93
  // Rationale: Routes open only after shell construction.
94
94
  const references = {
@@ -105,41 +105,41 @@ export async function composeOwnedUi(options = {}) {
105
105
  },
106
106
  session: () => import("./session-info-reference.js").then(m => m.loadSessionInfoReference(backend)),
107
107
  };
108
- const routeHost = settings === null || !ownedSurfaces ? null
108
+ const routeHost = settings === null || !bare ? null
109
109
  : createOwnedRouteHost(settings, references, settingsRouteOptions(keybindings, backend.identity.agentDir, cwd));
110
- const viewportSettings = settings === null || !ownedSurfaces ? null : {
110
+ const viewportSettings = settings === null || !bare ? null : {
111
111
  snapshot: () => viewportSettingsSnapshot(settings),
112
112
  onChange: listener => settings.onChange(() => listener(viewportSettingsSnapshot(settings))),
113
113
  };
114
- const backgroundSettings = settings === null || !ownedSurfaces ? null : {
114
+ const backgroundSettings = settings === null || !bare ? null : {
115
115
  snapshot: () => settings.value("backgroundStyle"),
116
116
  // Rationale: one manager notification also recomputes an accent-derived canvas after accentColor changes.
117
117
  onChange: listener => settings.onChange(current => listener(current.value("backgroundStyle"))),
118
118
  };
119
119
  const diagnosticDestination = options.suggestionDiagnosticsPath ?? process.env[PRODUCT_IDENTITY.environment.suggestionDiagnostics];
120
- const suggestionDiagnostics = settings !== null && ownedSurfaces && diagnosticDestination?.trim()
120
+ const suggestionDiagnostics = settings !== null && bare && diagnosticDestination?.trim()
121
121
  ? await import("../features/prompt-suggestions/diagnostics.js").then(module => new module.SuggestionDiagnosticCapture({ enabled: true, destination: diagnosticDestination })) : null;
122
- const promptSuggestions = settings === null || !ownedSurfaces ? null : {
122
+ const promptSuggestions = settings === null || !bare ? null : {
123
123
  ...(suggestionDiagnostics === null ? {} : { diagnostics: suggestionDiagnostics }),
124
124
  generator: backend,
125
125
  enabled: () => settings.value("promptSuggestions"),
126
126
  onChange: (listener) => settings.onChange(() => listener(settings.value("promptSuggestions"))),
127
127
  };
128
- const promptImages = settings === null || !ownedSurfaces ? null : {
128
+ const promptImages = settings === null || !bare ? null : {
129
129
  limit: () => settings.value("promptImageLimit"),
130
130
  onChange: (listener) => settings.onChange(listener),
131
131
  };
132
- const skills = settings === null || !ownedSurfaces ? null : {
132
+ const skills = settings === null || !bare ? null : {
133
133
  presentation: () => settings.value("skillsPresentation"),
134
134
  // Rationale: one listener covers both the A1 presentation choice and the engine skill-command toggle.
135
135
  onChange: (listener) => settings.onChange(() => listener()),
136
136
  };
137
- const promptHistory = createPromptHistoryConfiguration(settings, backend, ownedSurfaces);
137
+ const promptHistory = createPromptHistoryConfiguration(settings, backend, bare);
138
138
  const clipboardDestination = options.clipboardDiagnosticsPath ?? process.env[PRODUCT_IDENTITY.environment.clipboardDiagnostics];
139
- const clipboardDiagnostics = settings !== null && ownedSurfaces && clipboardDestination?.trim()
139
+ const clipboardDiagnostics = settings !== null && bare && clipboardDestination?.trim()
140
140
  ? new ClipboardDiagnosticCapture(clipboardDestination) : null;
141
141
  // Invariant: process-wide services are created once here and borrowed by every session shell.
142
- const clipboardServices = ownedSurfaces ? createOwnedUiClipboardServices() : null;
142
+ const clipboardServices = bare ? createOwnedUiClipboardServices() : null;
143
143
  let createdTerminalHost;
144
144
  let terminalHost;
145
145
  let presenter;
@@ -151,14 +151,14 @@ export async function composeOwnedUi(options = {}) {
151
151
  cwd: backend.identity.cwd,
152
152
  ...(routeHost === null ? {} : { routeHost }),
153
153
  ...(releaseNote.startupRoute === undefined ? {} : { startupRoute: releaseNote.startupRoute }),
154
- ...(ownedSurfaces ? { sessionLayout: "custom-viewport" } : {}),
154
+ ...(bare ? { sessionLayout: "custom-viewport" } : {}),
155
155
  },
156
156
  presentation: {
157
157
  ...(options.terminal === undefined ? {} : { terminal: createPiTerminalBridge(options.terminal) }),
158
158
  ...(clipboardDiagnostics === null ? {} : { input: { onEvent: event => clipboardDiagnostics.runtime(event) } }),
159
159
  ...(viewportSettings === null ? {} : { viewportSettings }),
160
160
  ...(backgroundSettings === null ? {} : { backgroundSettings }),
161
- ...(settings === null || !ownedSurfaces ? {} : {
161
+ ...(settings === null || !bare ? {} : {
162
162
  quitOutro: { snapshot: () => quitOutroSettingsSnapshot(settings), interactive: process.stdout.isTTY === true },
163
163
  }),
164
164
  },
@@ -197,7 +197,7 @@ export async function composeOwnedUi(options = {}) {
197
197
  const releaseUpdates = deferStartupReleaseUpdateObservation({
198
198
  backend,
199
199
  configDir: productPaths.configDir,
200
- mode: settings === null || !ownedSurfaces ? "auto" : settings.value("updateCheck"),
200
+ mode: settings === null || !bare ? "auto" : settings.value("updateCheck"),
201
201
  packageVersion: releaseNote.packageVersion, readPackageVersion,
202
202
  checkForNewerRelease: options.checkForNewerRelease,
203
203
  });
@@ -240,10 +240,10 @@ export async function composeOwnedUi(options = {}) {
240
240
  };
241
241
  return { application, settings };
242
242
  }
243
- function createPromptHistoryConfiguration(settings, backend, ownedSurfaces) {
243
+ function createPromptHistoryConfiguration(settings, backend, bare) {
244
244
  const limit = settings?.value("promptHistoryMaxItems") ?? 100;
245
245
  const scope = settings?.value("promptHistoryScope") ?? "unique";
246
- const enabled = settings !== null && ownedSurfaces && settings.value("promptHistoryEnabled");
246
+ const enabled = settings !== null && bare && settings.value("promptHistoryEnabled");
247
247
  const sessionId = enabled ? backend.identity.currentHistorySessionId() : null;
248
248
  if (settings === null || !enabled || (scope === "unique" && sessionId === null))
249
249
  return null;
@@ -1,3 +1,3 @@
1
1
  import type { ReferenceDocumentSelectionOptions } from "../features/owned-ui/reference-document-selection.js";
2
- /** Builds the Changelog selection clipboard policy without loading Pi's engine in a utility tab. */
2
+ /** Builds the Changelog selection clipboard policy without loading Pi's engine. */
3
3
  export declare function createReferenceSelectionOptions(settingsFile: string, copyText: ((text: string) => boolean | void) | undefined): ReferenceDocumentSelectionOptions;
@@ -1,5 +1,5 @@
1
1
  import { readFileSync } from "node:fs";
2
- /** Builds the Changelog selection clipboard policy without loading Pi's engine in a utility tab. */
2
+ /** Builds the Changelog selection clipboard policy without loading Pi's engine. */
3
3
  export function createReferenceSelectionOptions(settingsFile, copyText) {
4
4
  return {
5
5
  copyOnSelect: () => {
@@ -1,5 +1,5 @@
1
1
  import type { ProcessIdentity } from "../foundation/lifecycle/model.js";
2
- export interface SessionRuntimeRegistryOptions {
2
+ interface SessionRuntimeRegistryOptions {
3
3
  /** Absent outside claim-owning runtimes. */
4
4
  readonly runtimeId: string | undefined;
5
5
  /** Process liveness inspection; absent SDK seams cannot claim. */
@@ -15,3 +15,4 @@ export declare class SessionRuntimeRegistry {
15
15
  /** Drain publication before releasing claims; never republish after disposal. */
16
16
  dispose(): Promise<void>;
17
17
  }
18
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { CHANGELOG_ROUTE, HOTKEYS_ROUTE, HOTKEYS_TITLE } from "../features/owned-ui/reference-routes.js";
2
2
  import { SETTINGS_APP_ID, SETTINGS_ROUTE } from "../features/owned-ui/settings-route.js";
3
- import { piTheme, renderPiAccentPreview } from "../integrations/pi/components/upstream/theme/theme.js";
3
+ import { piTheme } from "../integrations/pi/components/upstream/theme/theme.js";
4
+ import { piUiTheme } from "../integrations/pi/components/theme.js";
4
5
  import { faint } from "../ui/components/text.js";
5
6
  /** Declares settings and lazy document routes. */
6
7
  export function createOwnedRouteHost(settings, references, options = {}) {
@@ -145,13 +146,5 @@ async function hostApp(id, route, create, closeOnInterrupt = true, appInputBefor
145
146
  };
146
147
  }
147
148
  function pinnedTheme(panel) {
148
- return {
149
- fg: (token, text) => piTheme().fg(token, text),
150
- bold: (text) => piTheme().bold(text),
151
- plain: (text) => text,
152
- accentPreview: (color, text) => renderPiAccentPreview(color, text),
153
- disabled: (text) => faint(piTheme().fg("dim", text)),
154
- highlight: (text) => piTheme().bg("selectedBg", text),
155
- panel,
156
- };
149
+ return piUiTheme({ panel, disabled: text => faint(piTheme().fg("dim", text)) });
157
150
  }
@@ -1,9 +1,10 @@
1
1
  import type { SettingsSearchInputFactory } from "../features/owned-ui/settings-search-input.js";
2
2
  import { type PiKeybindingsHost } from "../integrations/pi/components/shell-shared-facade.js";
3
- export interface SettingsSearchInputFactoryOptions {
3
+ interface SettingsSearchInputFactoryOptions {
4
4
  readonly keybindings?: PiKeybindingsHost;
5
5
  readonly agentDir?: string;
6
6
  readonly cwd?: string;
7
7
  }
8
8
  /** Builds Settings search from the same configurable owned editor used by the agent prompt. */
9
9
  export declare function createSettingsSearchInputFactory(options?: SettingsSearchInputFactoryOptions): SettingsSearchInputFactory;
10
+ export {};
@@ -2,8 +2,8 @@ import type { OwnedUiShellEngineOptions } from "../app/session-shell/index.js";
2
2
  import type { ReleaseNoteCatalog } from "../features/owned-ui/release-notes.js";
3
3
  import type { StartupReleaseUpdateObservationOptions } from "./release-update-observation.js";
4
4
  type StartupRoute = NonNullable<OwnedUiShellEngineOptions["startupRoute"]>;
5
- export interface StartupReleaseNoteOptions {
6
- readonly ownedSurfaces: boolean;
5
+ interface StartupReleaseNoteOptions {
6
+ readonly productMode: "bare" | "comparison";
7
7
  /** Deterministic catalog and version seams for composition tests. */
8
8
  readonly releaseNotes?: ReleaseNoteCatalog;
9
9
  readonly packageVersion?: string;
@@ -40,7 +40,7 @@ export class StartupReleaseNote {
40
40
  static async load(options) {
41
41
  let catalog = null;
42
42
  let failure;
43
- if (options.ownedSurfaces) {
43
+ if (options.productMode === "bare") {
44
44
  try {
45
45
  catalog = options.releaseNotes
46
46
  ?? await import("../features/owned-ui/release-notes.js").then(module => module.readPackagedReleaseNotes());
@@ -49,7 +49,7 @@ export class StartupReleaseNote {
49
49
  failure = error;
50
50
  }
51
51
  }
52
- const packageVersion = options.ownedSurfaces ? options.packageVersion ?? await readPackageVersion() : null;
52
+ const packageVersion = options.productMode === "bare" ? options.packageVersion ?? await readPackageVersion() : null;
53
53
  const current = packageVersion === null ? null : catalog?.current(packageVersion) ?? null;
54
54
  const profileId = options.profileId;
55
55
  const claim = current === null || profileId === undefined
@@ -183,7 +183,7 @@ export interface OwnedUiExtensionOverlayHandle {
183
183
  /** The most recently rendered terminal-relative rectangle of a visible overlay. */
184
184
  getBounds(): OwnedUiExtensionOverlayBounds | undefined;
185
185
  }
186
- export interface OwnedUiExtensionOverlayBounds {
186
+ interface OwnedUiExtensionOverlayBounds {
187
187
  readonly row: number;
188
188
  readonly col: number;
189
189
  readonly width: number;
@@ -308,3 +308,4 @@ export interface OwnedUiExtensionRendererPort {
308
308
  }, theme: OwnedUiExtensionThemePort, context: OwnedUiExtensionToolRenderContext): OwnedUiExtensionComponent;
309
309
  }
310
310
  export declare function assertOwnedUiExtensionUiPort(value: unknown): asserts value is OwnedUiExtensionUiPort;
311
+ export {};
@@ -18,3 +18,4 @@ export type { SuggestionAttemptTrigger, SuggestionDecision, SuggestionDecisionRe
18
18
  export { PROMPT_HISTORY_EDITOR_REPLACEMENT, PROMPT_HISTORY_MAX_ENTRY_BYTES, PROMPT_HISTORY_MAX_PENDING, PROMPT_HISTORY_MAX_TEXT_BYTES, assertPromptHistorySubmission, } from "./prompt-history.js";
19
19
  export type { PromptHistoryFailure, PromptHistoryImageSidecarAttachment, PromptHistoryImageSidecarPort, PromptHistoryImageSidecarRecord, PromptHistoryKind, PromptHistoryPort, PromptHistoryResult, PromptHistorySnapshot, PromptHistorySubmission, } from "./prompt-history.js";
20
20
  export { assertOwnedUiCommand, assertOwnedUiCustomization, assertOwnedUiDiagnostics, assertOwnedUiEditorState, assertOwnedUiEvent, assertOwnedUiPromptSuggestionIdentity, assertOwnedUiPromptSuggestionRequest, assertOwnedUiPromptSuggestionResult, assertOwnedUiPromptSuggestionState, assertOwnedUiSessionViewModel, assertOwnedUiSnapshot, assertOwnedUiStatusView, assertOwnedUiTerminalSurface, assertOwnedUiTranscriptBlock, } from "./validation.js";
21
+ export type { OwnedUiShellAuthProviderOption, OwnedUiShellAutocompleteCommand, OwnedUiShellClipboardContent, OwnedUiShellCommandMessage, OwnedUiShellComponentPort, OwnedUiShellComponents, OwnedUiShellEditorBodyGeometry, OwnedUiShellEditorOptions, OwnedUiShellEditorPointerEvent, OwnedUiShellEditorPort, OwnedUiShellEditorRecall, OwnedUiShellEditorTextRange, OwnedUiShellExtensionRendererResolver, OwnedUiShellExtensionUiBridge, OwnedUiShellExtensionUiBridgeHost, OwnedUiShellHeaderOptions, OwnedUiShellHeaderPort, OwnedUiShellHistoryEditor, OwnedUiShellHotkeysPresentation, OwnedUiShellImageAssetResolver, OwnedUiShellKeybindings, OwnedUiShellKeybindingsHost, OwnedUiShellLazySelectorLoader, OwnedUiShellLoadedResourcesPort, OwnedUiShellLoginDialogPort, OwnedUiShellMermaidRenderingMode, OwnedUiShellOperationLoaderPort, OwnedUiShellPasteReservation, OwnedUiShellProgramStatus, OwnedUiShellProgramStatusBlocked, OwnedUiShellProgramStatusReporter, OwnedUiShellProgressPresentationMode, OwnedUiShellProgressStatusPresentation, OwnedUiShellPromptInputBody, OwnedUiShellPromptInputGeometry, OwnedUiShellPromptInputPresentation, OwnedUiShellQueuedInputPort, OwnedUiShellReleaseUpdate, OwnedUiShellReleaseUpdateBanner, OwnedUiShellResourceEntry, OwnedUiShellResourceSection, OwnedUiShellRuntime, OwnedUiShellSelectorOption, OwnedUiShellSelectorOptions, OwnedUiShellSkillSummary, OwnedUiShellStartupNotice, OwnedUiShellStatusPlacement, OwnedUiShellStatusPort, OwnedUiShellSubmittedPromptComposer, OwnedUiShellThinkingLevel, OwnedUiShellThinkingSelectorOptions, OwnedUiShellTranscriptComponentPort, OwnedUiShellTreeFilterMode, OwnedUiShellTreeSelectorOptions, OwnedUiShellTrustDecision, OwnedUiShellTrustOption, OwnedUiShellTrustSelectorOptions, OwnedUiShellTrustUpdate, OwnedUiShellViewComponentPort, } from "./shell-components.js";
@@ -1,3 +1,4 @@
1
+ import type { OwnedUiShellComponents } from "./shell-components.js";
1
2
  /**
2
3
  * Presenters for the selectors and transcript renderers whose inputs are engine objects. The shell opens them
3
4
  * through this port and never holds those objects; the Pi session presenters owner implements it.
@@ -71,6 +72,8 @@ export interface OwnedUiTranscriptRendererPort {
71
72
  getShortcuts(bindings: Readonly<Record<string, string | readonly string[] | undefined>>): readonly OwnedUiShortcutDescription[];
72
73
  }
73
74
  export interface OwnedUiSessionPresenters {
75
+ /** The vendor components and text helpers the shell renders with. */
76
+ readonly components: OwnedUiShellComponents;
74
77
  transcriptRenderers(): OwnedUiTranscriptRendererPort;
75
78
  openModelSelector(host: OwnedUiDialogHost, initialSearchInput?: string): void;
76
79
  openSessionSelector(host: OwnedUiDialogHost, onExit: () => void): Promise<void>;