@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
@@ -1,6 +1,6 @@
1
+ import type { OwnedUiShellEditorPort } from "../../contracts/owned-ui/index.js";
1
2
  import type { OwnedUiSessionViewModel } from "../../contracts/owned-ui/index.js";
2
3
  import type { TranscriptViewportFrame, TranscriptViewportFrameInput, TranscriptViewportTheme } from "../../ui/components/transcript-viewport.js";
3
- import type { PiShellEditorPort } from "../../integrations/pi/components/shell-shared-facade.js";
4
4
  import type { DockChrome } from "./dock-chrome.js";
5
5
  import type { InputSurfaceSwitch } from "./input-surface-switch.js";
6
6
  import type { PromptChipStore } from "./prompt-chips.js";
@@ -20,7 +20,7 @@ export interface DockLayout {
20
20
  export interface ShellLayoutPorts {
21
21
  readonly viewport: SessionViewportController;
22
22
  readonly input: InputSurfaceSwitch;
23
- readonly editor: Pick<PiShellEditorPort, "getText">;
23
+ readonly editor: Pick<OwnedUiShellEditorPort, "getText">;
24
24
  readonly promptChips: Pick<PromptChipStore, "atomicRanges">;
25
25
  readonly dockChrome: Pick<DockChrome, "renderPromptOverlay" | "renderReleaseBanner" | "locateReleaseClose">;
26
26
  readonly theme: TranscriptViewportTheme;
@@ -0,0 +1,26 @@
1
+ import type { OwnedUiEvent, OwnedUiSessionViewModel, SuggestionDecision } from "../../contracts/owned-ui/index.js";
2
+ import { type ContextualPromptSuggestionSurface } from "./prompt-suggestion-controller.js";
3
+ import type { SessionConcern } from "./session-concern.js";
4
+ import type { OwnedUiShellSuggestionOptions } from "./session-shell-root.js";
5
+ type ResponseEvent = Extract<OwnedUiEvent, {
6
+ readonly type: "assistant-message-completed" | "agent-run-settled";
7
+ }>;
8
+ /**
9
+ * One shell's contextual prompt suggestions: the controller, its live enablement, and the model key that
10
+ * invalidates a pending suggestion. Without suggestion options every call is a no-op.
11
+ */
12
+ export declare class ShellPromptSuggestions implements SessionConcern {
13
+ #private;
14
+ constructor(options: OwnedUiShellSuggestionOptions | undefined, surface: ContextualPromptSuggestionSurface, view: OwnedUiSessionViewModel);
15
+ invalidate(): void;
16
+ abortPending(): void;
17
+ accept(): void;
18
+ restoreAvailable(): void;
19
+ /** Hands a completed or settled response to the controller. */
20
+ route(event: ResponseEvent, prepareBlockReason: () => SuggestionDecision): void;
21
+ /** Invalidates a pending suggestion when the session was replaced or the active model changed. */
22
+ noteView(view: OwnedUiSessionViewModel, sessionReplaced: boolean): void;
23
+ onSessionReplaced(): void;
24
+ dispose(): void;
25
+ }
26
+ export {};
@@ -0,0 +1,48 @@
1
+ import { ContextualPromptSuggestionController } from "./prompt-suggestion-controller.js";
2
+ import { routeResponseToSuggestions, suggestionModelKey } from "./suggestion-surface.js";
3
+ /**
4
+ * One shell's contextual prompt suggestions: the controller, its live enablement, and the model key that
5
+ * invalidates a pending suggestion. Without suggestion options every call is a no-op.
6
+ */
7
+ export class ShellPromptSuggestions {
8
+ #controller;
9
+ #unsubscribe;
10
+ #modelKey;
11
+ constructor(options, surface, view) {
12
+ this.#modelKey = suggestionModelKey(view);
13
+ this.#controller = options === undefined ? null : new ContextualPromptSuggestionController({
14
+ generator: options.generator,
15
+ enabled: options.enabled(),
16
+ ...(options.diagnostics === undefined ? {} : { diagnostics: options.diagnostics }),
17
+ surface,
18
+ });
19
+ try {
20
+ this.#unsubscribe = options === undefined ? () => { } : options.onChange(enabled => this.#controller?.setEnabled(enabled));
21
+ }
22
+ catch (error) {
23
+ this.#controller?.dispose();
24
+ throw error;
25
+ }
26
+ }
27
+ invalidate() { this.#controller?.invalidate(); }
28
+ abortPending() { this.#controller?.abortPending(); }
29
+ accept() { this.#controller?.accept(); }
30
+ restoreAvailable() { this.#controller?.restoreAvailable(); }
31
+ /** Hands a completed or settled response to the controller. */
32
+ route(event, prepareBlockReason) {
33
+ routeResponseToSuggestions(this.#controller, event, prepareBlockReason);
34
+ }
35
+ /** Invalidates a pending suggestion when the session was replaced or the active model changed. */
36
+ noteView(view, sessionReplaced) {
37
+ const key = suggestionModelKey(view);
38
+ if (!sessionReplaced && key === this.#modelKey)
39
+ return;
40
+ this.#controller?.invalidate();
41
+ this.#modelKey = key;
42
+ }
43
+ onSessionReplaced() { this.invalidate(); }
44
+ dispose() {
45
+ this.#controller?.dispose();
46
+ this.#unsubscribe();
47
+ }
48
+ }
@@ -6,14 +6,9 @@ type ResponseEvent = Extract<OwnedUiEvent, {
6
6
  }>;
7
7
  /** The provider/model key a suggestion identity and the session view are compared by; empty without a model. */
8
8
  export declare function suggestionModelKey(view: Pick<OwnedUiSessionViewModel, "activeModel">): string;
9
- /**
10
- * Why a completed response cannot seed a suggestion, checked in order; `prepareBlockReason` is asked
11
- * only when the response itself qualifies.
12
- */
13
- export declare function responseSuggestionDecision(event: ResponseEvent, prepareBlockReason: () => SuggestionDecision): SuggestionDecision;
14
9
  /** Hands one completed or settled response to the controller: skipped without a model, otherwise considered or settled. */
15
10
  export declare function routeResponseToSuggestions(controller: Pick<ContextualPromptSuggestionController, "skip" | "consider" | "settle"> | null, event: ResponseEvent, prepareBlockReason: () => SuggestionDecision): void;
16
- export interface SuggestionPresentationState {
11
+ interface SuggestionPresentationState {
17
12
  readonly disposed: boolean;
18
13
  readonly view: Pick<OwnedUiSessionViewModel, "sessionId" | "activeModel">;
19
14
  readonly sessionGeneration: number;
@@ -6,7 +6,7 @@ export function suggestionModelKey(view) {
6
6
  * Why a completed response cannot seed a suggestion, checked in order; `prepareBlockReason` is asked
7
7
  * only when the response itself qualifies.
8
8
  */
9
- export function responseSuggestionDecision(event, prepareBlockReason) {
9
+ function responseSuggestionDecision(event, prepareBlockReason) {
10
10
  if (!event.successful)
11
11
  return "failed-response";
12
12
  if (event.toolContinuation || event.stopReason === "toolUse")
@@ -1,20 +1,8 @@
1
- import type { PiShellClipboardContent } from "../../integrations/pi/components/shell-shared-facade.js";
2
- export interface SystemClipboardImageReader {
3
- hasImage(): boolean;
4
- getImageBinary?(): Promise<readonly number[]>;
5
- getImageBase64?(): Promise<string>;
6
- }
7
- /** Load the native adapter during shell startup so the first paste is warm. */
8
- export declare function preloadSystemClipboard(): void;
1
+ import type { OwnedUiShellClipboardContent } from "../../contracts/owned-ui/index.js";
9
2
  /**
10
3
  * Reads plain text through platform clipboard commands without importing Pi's
11
4
  * private clipboard module. Failures are deliberately non-fatal: a denied or
12
5
  * unavailable clipboard simply makes the paste action a no-op.
13
6
  */
14
- export declare function readSystemClipboardContent(signal?: AbortSignal, strict?: boolean): Promise<PiShellClipboardContent | null>;
15
- export declare function readSystemClipboardImage(reader: SystemClipboardImageReader): Promise<{
16
- readonly data: string;
17
- readonly mimeType: string;
18
- } | null>;
19
- export declare function readSystemClipboardText(signal?: AbortSignal, strict?: boolean): Promise<string | null>;
7
+ export declare function readSystemClipboardContent(signal?: AbortSignal, strict?: boolean): Promise<OwnedUiShellClipboardContent | null>;
20
8
  export declare function writeSystemClipboardText(text: string): Promise<void>;
@@ -5,11 +5,6 @@ import { assertSourceBytes } from "./image-source.js";
5
5
  const MAX_CLIPBOARD_BYTES = 16 * 1024 * 1024;
6
6
  let nativeClipboardPromise;
7
7
  let pendingClipboardWrite = Promise.resolve();
8
- /** Load the native adapter during shell startup so the first paste is warm. */
9
- export function preloadSystemClipboard() {
10
- if (process.platform === "win32" || process.platform === "darwin")
11
- void nativeClipboard();
12
- }
13
8
  /**
14
9
  * Reads plain text through platform clipboard commands without importing Pi's
15
10
  * private clipboard module. Failures are deliberately non-fatal: a denied or
@@ -38,7 +33,7 @@ export async function readSystemClipboardContent(signal, strict = false) {
38
33
  const text = await readSystemClipboardText(signal, strict);
39
34
  return text === null ? null : { kind: "text", text };
40
35
  }
41
- export async function readSystemClipboardImage(reader) {
36
+ async function readSystemClipboardImage(reader) {
42
37
  if (!reader.hasImage())
43
38
  return null;
44
39
  if (reader.getImageBinary !== undefined) {
@@ -74,7 +69,7 @@ export async function readSystemClipboardImage(reader) {
74
69
  }
75
70
  return null;
76
71
  }
77
- export async function readSystemClipboardText(signal, strict = false) {
72
+ async function readSystemClipboardText(signal, strict = false) {
78
73
  // Concurrency: Ctrl+C/Ctrl+X and Ctrl+V can arrive in adjacent input turns. Serialize the
79
74
  // read behind our native write so paste never observes the previous value.
80
75
  await pendingClipboardWrite;
@@ -1,6 +1,7 @@
1
+ import type { OwnedUiShellComponents, OwnedUiShellTranscriptComponentPort } from "../../contracts/owned-ui/index.js";
1
2
  import type { OwnedUiSessionViewModel } from "../../contracts/owned-ui/index.js";
3
+ import type { ThemeSource } from "../../contracts/presentation/index.js";
2
4
  import type { TranscriptPromptAnchor } from "../../ui/components/transcript-viewport.js";
3
- import type { PiShellTranscriptComponentPort } from "../../integrations/pi/components/shell-shared-facade.js";
4
5
  type TranscriptBlock = OwnedUiSessionViewModel["transcript"][number];
5
6
  export interface TranscriptDocumentLayout {
6
7
  readonly rows: readonly string[];
@@ -13,7 +14,7 @@ export interface TranscriptDocumentLayout {
13
14
  */
14
15
  export type TranscriptInvalidation = "editor-padding" | "diagnostics" | "workflow-status" | "extension-header" | "viewport-config" | "extension-renderers" | "block-presentation" | "tools-expanded" | "repaint";
15
16
  /** What the document reads from the shell around it on every uncached layout. */
16
- export interface TranscriptDocumentChrome {
17
+ interface TranscriptDocumentChrome {
17
18
  diagnostics(): OwnedUiSessionViewModel["diagnostics"];
18
19
  /** The extension header's rows when one is set, else the built-in header's rows for this layout. */
19
20
  headerRows(width: number): readonly string[];
@@ -23,11 +24,13 @@ export interface TranscriptDocumentChrome {
23
24
  hasExtensionHeader(): boolean;
24
25
  thinkingVisible(): boolean;
25
26
  }
26
- export interface TranscriptDocumentOptions {
27
+ interface TranscriptDocumentOptions {
28
+ readonly theme: ThemeSource;
29
+ readonly components: Pick<OwnedUiShellComponents, "info" | "transcript">;
27
30
  readonly customViewport: boolean;
28
31
  readonly cwd: string;
29
32
  /** Creates the component for a newly seen block; its change callback should call `blockChanged`. */
30
- mount(block: TranscriptBlock): PiShellTranscriptComponentPort;
33
+ mount(block: TranscriptBlock): OwnedUiShellTranscriptComponentPort;
31
34
  readonly chrome: TranscriptDocumentChrome;
32
35
  }
33
36
  /**
@@ -40,8 +43,8 @@ export declare class TranscriptDocument {
40
43
  /** Block component renders since construction, for rendering evidence. */
41
44
  get renderCount(): number;
42
45
  get lastId(): string | undefined;
43
- component(id: string): PiShellTranscriptComponentPort | undefined;
44
- components(): IterableIterator<PiShellTranscriptComponentPort>;
46
+ component(id: string): OwnedUiShellTranscriptComponentPort | undefined;
47
+ components(): IterableIterator<OwnedUiShellTranscriptComponentPort>;
45
48
  anchorOf(id: string): number | undefined;
46
49
  /**
47
50
  * Applies one block: its component is created or updated in place and the order grows
@@ -52,7 +55,7 @@ export declare class TranscriptDocument {
52
55
  /** Replaces the whole transcript with the view's blocks, keeping anchored workflow output in place. */
53
56
  sync(blocks: OwnedUiSessionViewModel["transcript"]): void;
54
57
  /** Appends workflow output anchored after the transcript's first `anchor` blocks. */
55
- appendAnchored(id: string, component: PiShellTranscriptComponentPort, anchor: number): void;
58
+ appendAnchored(id: string, component: OwnedUiShellTranscriptComponentPort, anchor: number): void;
56
59
  /** Disposes every anchored workflow output and drops it from the order. */
57
60
  removeAnchored(): void;
58
61
  /** One block's component drew something new: drop its rows and every layout that contains them. */
@@ -73,5 +76,5 @@ export declare function parseReleaseUpdateDiagnostic(message: string): {
73
76
  changelogUrl: string | null;
74
77
  } | null;
75
78
  /** Web URLs use link blue; file targets retain A1's cyan interactive accent. */
76
- export declare function nativeTranscriptLinkColor(text: string, target: string): string;
79
+ export declare function transcriptLinkColor(theme: ThemeSource): (text: string, target: string) => string;
77
80
  export {};
@@ -1,8 +1,5 @@
1
1
  import { acceptsTranscriptUpdate } from "../../contracts/owned-ui/index.js";
2
2
  import { nativeHyperlinkStyle } from "../../ui/components/spans.js";
3
- import { createPiShellChangelog, createPiShellCollapsedChangelog, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateNotice, } from "../../integrations/pi/components/shell-presenters-info.js";
4
- import { isPiPromptStyleCompaction, renderPiShellStartupDiagnostic, renderPiShellTranscriptBlock, } from "../../integrations/pi/components/shell-presenters-transcript.js";
5
- import { piTheme } from "../../integrations/pi/components/upstream/theme/theme.js";
6
3
  const LAYOUT_ONLY = new Set(["editor-padding", "diagnostics", "workflow-status", "extension-header"]);
7
4
  const WORKFLOW_STATUS_PREFIX = "workflow-status-";
8
5
  /**
@@ -19,8 +16,10 @@ export class TranscriptDocument {
19
16
  // Performance: document layouts are shared by wheel, rail, jump, and selection frames.
20
17
  #layouts = new Map();
21
18
  #renders = 0;
19
+ #linkColor;
22
20
  constructor(options) {
23
21
  this.#options = options;
22
+ this.#linkColor = transcriptLinkColor(options.theme);
24
23
  }
25
24
  /** Block component renders since construction, for rendering evidence. */
26
25
  get renderCount() {
@@ -171,7 +170,7 @@ export class TranscriptDocument {
171
170
  // bare A1 presents them in its prompt-adjacent notice dock instead.
172
171
  .filter(diagnostic => diagnostic.code === "engine-startup"
173
172
  || !customViewport && diagnostic.code === "project-trust")
174
- .flatMap(diagnostic => renderPiShellStartupDiagnostic(diagnostic, width));
173
+ .flatMap(diagnostic => this.#options.components.transcript.renderStartupDiagnostic(diagnostic, width));
175
174
  const resourceRows = [...chrome.resourceRows(width)];
176
175
  if (resourceRows.at(-1) === "")
177
176
  resourceRows.pop();
@@ -191,7 +190,7 @@ export class TranscriptDocument {
191
190
  if (!thinkingVisible && block?.kind === "thinking")
192
191
  continue;
193
192
  const promptLike = block !== undefined
194
- && (block.kind === "user" || customViewport && isPiPromptStyleCompaction(block));
193
+ && (block.kind === "user" || customViewport && this.#options.components.transcript.isPromptStyleCompaction(block));
195
194
  // Invariant: the custom viewport has already removed its rail gutter from this width.
196
195
  // Prompt-like and ordinary blocks therefore share one right content edge.
197
196
  const blockWidth = width;
@@ -240,11 +239,11 @@ export class TranscriptDocument {
240
239
  .filter(diagnostic => !customViewport && diagnostic.code === "release-update")
241
240
  .flatMap(diagnostic => {
242
241
  const release = parseReleaseUpdateDiagnostic(diagnostic.message);
243
- return release === null ? [] : renderPiShellReleaseUpdateNotice(release, width);
242
+ return release === null ? [] : this.#options.components.info.releaseUpdateNotice(release, width);
244
243
  }));
245
244
  rows.push(...diagnostics
246
245
  .filter(diagnostic => diagnostic.code === "package-updates")
247
- .flatMap(diagnostic => renderPiShellPackageUpdateNotice(diagnostic.message.split("\n").filter(line => line.startsWith("- ")).map(line => line.slice(2)), width)));
246
+ .flatMap(diagnostic => this.#options.components.info.packageUpdateNotice(diagnostic.message.split("\n").filter(line => line.startsWith("- ")).map(line => line.slice(2)), width)));
248
247
  rows.push(...diagnostics
249
248
  .filter(diagnostic => diagnostic.code === "changelog-collapsed" || diagnostic.code === "changelog-expanded")
250
249
  // Rationale: bare A1 translates either startup diagnostic into transient dock chrome;
@@ -252,8 +251,8 @@ export class TranscriptDocument {
252
251
  .flatMap(diagnostic => customViewport
253
252
  ? []
254
253
  : diagnostic.code === "changelog-collapsed"
255
- ? createPiShellCollapsedChangelog().render(width)
256
- : createPiShellChangelog(diagnostic.message).render(width)));
254
+ ? this.#options.components.info.collapsedChangelog().render(width)
255
+ : this.#options.components.info.changelog(diagnostic.message).render(width)));
257
256
  rows.push(...diagnostics
258
257
  .filter(diagnostic => diagnostic.code !== "engine-startup" && diagnostic.code !== "project-trust"
259
258
  && diagnostic.code !== "release-update" && diagnostic.code !== "release-update-installed"
@@ -261,7 +260,7 @@ export class TranscriptDocument {
261
260
  && diagnostic.code !== "package-updates" && diagnostic.code !== "changelog-collapsed"
262
261
  && diagnostic.code !== "changelog-expanded")
263
262
  .slice(-3)
264
- .flatMap(diagnostic => renderPiShellTranscriptBlock({
263
+ .flatMap(diagnostic => this.#options.components.transcript.renderBlock({
265
264
  id: `diagnostic-${diagnostic.sequence}`,
266
265
  kind: diagnostic.severity === "error" ? "error" : "system",
267
266
  status: "finalized",
@@ -280,7 +279,7 @@ export class TranscriptDocument {
280
279
  const block = this.#blocks.get(id);
281
280
  if (block === undefined || (!thinkingVisible && block.kind === "thinking"))
282
281
  continue;
283
- if (rows.length > 0 && (block.kind === "user" || this.#options.customViewport && isPiPromptStyleCompaction(block)))
282
+ if (rows.length > 0 && (block.kind === "user" || this.#options.customViewport && this.#options.components.transcript.isPromptStyleCompaction(block)))
284
283
  rows.push("");
285
284
  rows.push(...this.#blockRows(id, block, width).map(sanitizeExitTranscriptRow));
286
285
  }
@@ -298,7 +297,7 @@ export class TranscriptDocument {
298
297
  const rows = component.render(width);
299
298
  if (!this.#options.customViewport || block?.kind === "user")
300
299
  return rows;
301
- return rows.map(row => nativeHyperlinkStyle(row, nativeTranscriptLinkColor));
300
+ return rows.map(row => nativeHyperlinkStyle(row, this.#linkColor));
302
301
  };
303
302
  if (block === undefined || block.status !== "finalized")
304
303
  return render();
@@ -336,6 +335,6 @@ function sanitizeExitTranscriptRow(row) {
336
335
  return row.replace(KITTY_IMAGE_CONTROL, "").replace(ITERM_IMAGE_CONTROL, "");
337
336
  }
338
337
  /** Web URLs use link blue; file targets retain A1's cyan interactive accent. */
339
- export function nativeTranscriptLinkColor(text, target) {
340
- return piTheme().fg(/^file:/iu.test(target) ? "accent" : "mdLink", text);
338
+ export function transcriptLinkColor(theme) {
339
+ return (text, target) => theme.current().fg(/^file:/iu.test(target) ? "accent" : "mdLink", text);
341
340
  }
@@ -1,5 +1,5 @@
1
+ import type { OwnedUiShellComponentPort } from "../../contracts/owned-ui/index.js";
1
2
  import type { TranscriptPromptAnchor, TranscriptViewportFrameInput } from "../../ui/components/transcript-viewport.js";
2
- import type { PiShellComponentPort } from "../../integrations/pi/components/shell-shared-facade.js";
3
3
  import type { ShellLayout, ShellLayoutPorts } from "./shell-layout.js";
4
4
  interface VisibleViewportSnapshot {
5
5
  readonly width: number;
@@ -8,7 +8,7 @@ interface VisibleViewportSnapshot {
8
8
  readonly transientSignature: string;
9
9
  readonly promptAnchors: readonly TranscriptPromptAnchor[];
10
10
  readonly dockLength: number;
11
- readonly inputSurface: PiShellComponentPort;
11
+ readonly inputSurface: OwnedUiShellComponentPort;
12
12
  readonly viewportRevision: number;
13
13
  readonly selectionRevision: number;
14
14
  readonly pointerPosition: TranscriptViewportFrameInput["pointerPosition"];
@@ -1,15 +1,16 @@
1
+ import type { OwnedUiShellComponents, OwnedUiShellHotkeysPresentation } from "../../contracts/owned-ui/index.js";
1
2
  import type { ImageAttachmentError, OwnedUiWorkflowMessage, OwnedUiWorkflowResult } from "../../contracts/owned-ui/index.js";
2
- import { type PiShellHotkeysPresentation } from "../../integrations/pi/components/shell-presenters-info.js";
3
3
  import type { DockChrome } from "./dock-chrome.js";
4
4
  import type { TranscriptDocument } from "./transcript-document.js";
5
- export interface WorkflowOutputPorts {
5
+ interface WorkflowOutputPorts {
6
6
  readonly customViewport: boolean;
7
+ readonly components: Pick<OwnedUiShellComponents, "info" | "text">;
7
8
  readonly document: Pick<TranscriptDocument, "lastId" | "anchorOf" | "invalidate" | "appendAnchored" | "removeAnchored">;
8
9
  readonly dock: Pick<DockChrome, "setNotice" | "dismissNotice">;
9
10
  /** How many semantic transcript blocks precede new output; workflow output anchors after them. */
10
11
  transcriptLength(): number;
11
12
  outputPad(): 0 | 1;
12
- hotkeysPresentation(): PiShellHotkeysPresentation;
13
+ hotkeysPresentation(): OwnedUiShellHotkeysPresentation;
13
14
  readonly componentRuntime: {
14
15
  getColumns(): number;
15
16
  getRows(): number;
@@ -31,3 +32,4 @@ export declare class WorkflowOutput {
31
32
  /** Drops every anchored output and the status-replacement chain. */
32
33
  reset(): void;
33
34
  }
35
+ export {};
@@ -1,6 +1,3 @@
1
- import { createPiShellArmin, createPiShellEarendilAnnouncement, } from "../../integrations/pi/components/shell-selectors-dialogs.js";
2
- import { createPiShellChangelog, createPiShellHotkeys, createPiShellSessionInfo, renderPiShellCommandMessage, renderPiShellStatusText, } from "../../integrations/pi/components/shell-presenters-info.js";
3
- import { piShellHyperlink } from "../../integrations/pi/components/shell-shared-facade.js";
4
1
  /**
5
2
  * Presents workflow results: bare A1 answers in the dock notice, the pinned profile appends
6
3
  * transcript-anchored output, and consecutive status lines at the same anchor replace each other.
@@ -33,7 +30,7 @@ export class WorkflowOutput {
33
30
  }
34
31
  const id = this.#appendAnchored(width => [
35
32
  "",
36
- ...renderPiShellStatusText(this.#statusMessages.get(id) ?? message, width),
33
+ ...this.#ports.components.info.statusText(this.#statusMessages.get(id) ?? message, width),
37
34
  ]);
38
35
  this.#statusMessages.set(id, message);
39
36
  this.#lastStatusId = id;
@@ -53,7 +50,7 @@ export class WorkflowOutput {
53
50
  }
54
51
  this.#lastStatusId = undefined;
55
52
  const presentation = { kind: message.kind, message: message.message };
56
- this.#appendAnchored(width => renderPiShellCommandMessage(presentation, width, this.#ports.outputPad()));
53
+ this.#appendAnchored(width => this.#ports.components.info.commandMessage(presentation, width, this.#ports.outputPad()));
57
54
  }
58
55
  appendResult(result, errorCode) {
59
56
  if (result.messages !== undefined) {
@@ -86,16 +83,17 @@ export class WorkflowOutput {
86
83
  if (result.outcome === "completed" && (result.command === "new" || result.command === "name" || result.command === "debug")) {
87
84
  this.#lastStatusId = undefined;
88
85
  const presentation = { kind: result.command, message: result.message, ...(result.detail === undefined ? {} : { detail: result.detail }) };
89
- this.#appendAnchored(width => renderPiShellCommandMessage(presentation, width, this.#ports.outputPad()));
86
+ this.#appendAnchored(width => this.#ports.components.info.commandMessage(presentation, width, this.#ports.outputPad()));
90
87
  return;
91
88
  }
92
89
  if (result.outcome === "completed" && this.#appendAnnouncement(result.command))
93
90
  return;
94
91
  // Rationale: the pinned engine links both share URLs; the workflow result carries the plain URLs.
92
+ const link = (url) => this.#ports.components.text.hyperlink(url);
95
93
  const message = result.command !== "share" ? result.message
96
- : result.detail ? `${linkShareUrl(result.message)}\nGist: ${piShellHyperlink(result.detail)}`
94
+ : result.detail ? `${linkShareUrl(result.message, link)}\nGist: ${link(result.detail)}`
97
95
  // Protocol: Radius shares carry only the artifact URL.
98
- : linkShareUrl(result.message);
96
+ : linkShareUrl(result.message, link);
99
97
  this.appendStatus(message);
100
98
  }
101
99
  /** Drops every anchored output and the status-replacement chain. */
@@ -108,20 +106,20 @@ export class WorkflowOutput {
108
106
  #appendPresentation(result) {
109
107
  if (result.command === "session" && result.presentation?.kind === "session-info") {
110
108
  this.#lastStatusId = undefined;
111
- const sessionInfo = createPiShellSessionInfo(result.presentation);
109
+ const sessionInfo = this.#ports.components.info.sessionInfo(result.presentation);
112
110
  this.#appendAnchored(width => sessionInfo.render(width), () => sessionInfo.dispose?.());
113
111
  return true;
114
112
  }
115
113
  if (result.command === "hotkeys") {
116
114
  this.#lastStatusId = undefined;
117
115
  const presentation = this.#ports.hotkeysPresentation();
118
- const hotkeys = createPiShellHotkeys(presentation.bindings, presentation.getShortcuts, presentation.profile);
116
+ const hotkeys = this.#ports.components.info.hotkeys(presentation.bindings, presentation.getShortcuts, presentation.profile);
119
117
  this.#appendAnchored(width => hotkeys.render(width), () => hotkeys.dispose?.());
120
118
  return true;
121
119
  }
122
120
  if (result.command === "changelog") {
123
121
  this.#lastStatusId = undefined;
124
- const changelog = createPiShellChangelog(result.detail ?? "No changelog entries found.");
122
+ const changelog = this.#ports.components.info.changelog(result.detail ?? "No changelog entries found.");
125
123
  this.#appendAnchored(width => changelog.render(width), () => changelog.dispose?.());
126
124
  return true;
127
125
  }
@@ -131,13 +129,13 @@ export class WorkflowOutput {
131
129
  #appendAnnouncement(command) {
132
130
  if (command === "arminsayshi") {
133
131
  this.#lastStatusId = undefined;
134
- const armin = createPiShellArmin(this.#ports.componentRuntime);
132
+ const armin = this.#ports.components.info.armin(this.#ports.componentRuntime);
135
133
  this.#appendAnchored(width => ["", ...armin.render(width)], () => armin.dispose?.());
136
134
  return true;
137
135
  }
138
136
  if (command === "dementedelves") {
139
137
  this.#lastStatusId = undefined;
140
- const announcement = createPiShellEarendilAnnouncement();
138
+ const announcement = this.#ports.components.info.earendilAnnouncement();
141
139
  this.#appendAnchored(width => ["", ...announcement.render(width)], () => announcement.dispose?.());
142
140
  return true;
143
141
  }
@@ -168,7 +166,7 @@ export class WorkflowOutput {
168
166
  }
169
167
  }
170
168
  /** "Share URL: <url>" with the URL made clickable; other share wordings pass through unchanged. */
171
- function linkShareUrl(message) {
169
+ function linkShareUrl(message, link) {
172
170
  const match = /^Share URL: (\S+)$/.exec(message);
173
- return match === null ? message : `Share URL: ${piShellHyperlink(match[1])}`;
171
+ return match === null ? message : `Share URL: ${link(match[1])}`;
174
172
  }
@@ -19,7 +19,6 @@ export type PackageSyntaxDiagnostic = {
19
19
  readonly message: string;
20
20
  };
21
21
  type MessageStyle = Pick<typeof chalk, "red" | "dim" | "bold">;
22
- export declare function packageCommandUsage(verb: PackageCliVerb, namespace?: PackageCommandNamespace): string;
23
22
  /** Diagnostic facts stay unstyled until the terminal boundary decides color support. */
24
23
  export declare function renderPackageSyntax(diagnostic: PackageSyntaxDiagnostic, namespace?: PackageCommandNamespace, style?: MessageStyle): string;
25
24
  /** Pi's help layout, with unsupported options and examples deliberately absent. */
@@ -2,7 +2,7 @@
2
2
  // at 914cf1472e715297caa30db4b9535d534a9eb718 (MIT); grammar is restricted to A1's supported subset.
3
3
  import chalk from "chalk";
4
4
  import { PRODUCT_TEXT } from "../product-identity.js";
5
- export function packageCommandUsage(verb, namespace = "pi") {
5
+ function packageCommandUsage(verb, namespace = "pi") {
6
6
  const command = namespace === "direct"
7
7
  ? `${PRODUCT_TEXT.commandName} ${verb}`
8
8
  : `${PRODUCT_TEXT.commandName} pi ${verb}`;
@@ -1,6 +1,6 @@
1
1
  import { type SessionContextRequest } from "../features/launch/index.js";
2
2
  export type { SessionContextRequest } from "../features/launch/index.js";
3
- export interface SessionContextCommandOptions {
3
+ interface SessionContextCommandOptions {
4
4
  readonly environment?: NodeJS.ProcessEnv;
5
5
  readonly inspectProcess?: (pid: number) => Promise<{
6
6
  readonly pid: number;
@@ -1,10 +1,10 @@
1
- export interface UninstallRequest {
1
+ interface UninstallRequest {
2
2
  /** Skips the program-removal question; user data is still kept unless `purge` is set. */
3
3
  readonly yes: boolean;
4
4
  /** Also removes sessions, settings, sign-ins, and prompt history. */
5
5
  readonly purge: boolean;
6
6
  }
7
- export interface UninstallOutput {
7
+ interface UninstallOutput {
8
8
  readonly stdout: (message: string) => void;
9
9
  readonly stderr: (message: string) => void;
10
10
  }
@@ -24,3 +24,4 @@ export interface UninstallDependencies {
24
24
  * Sessions and settings live in the profile home and leave only with explicit consent.
25
25
  */
26
26
  export declare function runUninstall(request: UninstallRequest, dependencies: UninstallDependencies): Promise<number>;
27
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { AgentSettingsPort } from "../contracts/agent-engine/index.js";
2
2
  import { OwnedSettingsManager } from "../ui/settings/manager.js";
3
- export interface OwnedSettingsManagerFactoryOptions {
3
+ interface OwnedSettingsManagerFactoryOptions {
4
4
  readonly profileId: string;
5
5
  readonly agent?: AgentSettingsPort | null;
6
6
  readonly agentProvider?: () => AgentSettingsPort | null;
@@ -9,3 +9,4 @@ export interface OwnedSettingsManagerFactoryOptions {
9
9
  export declare function createOwnedSettingsManager(options: OwnedSettingsManagerFactoryOptions): OwnedSettingsManager;
10
10
  /** Rereads the shared settings document whenever its stat changes; returns the stop. */
11
11
  export declare function watchSharedSettings(settings: Pick<OwnedSettingsManager, "file" | "refresh">): () => void;
12
+ export {};
@@ -1,17 +1,14 @@
1
1
  import { statSync } from "node:fs";
2
2
  import { resolveLaunchProfilePaths } from "../features/launch/profile-paths.js";
3
- import { resolveProductPaths } from "../foundation/lifecycle/paths.js";
4
3
  import { PRODUCT_IDENTITY } from "../product-identity.js";
5
4
  import { OwnedSettingsManager } from "../ui/settings/manager.js";
6
5
  /** Builds the profile-global settings manager shared by the Agent and slim utility compositions. */
7
6
  export function createOwnedSettingsManager(options) {
8
7
  const profilePaths = resolveLaunchProfilePaths();
9
- const productPaths = resolveProductPaths();
10
8
  return new OwnedSettingsManager({
11
9
  profileDir: profilePaths.agentProfile,
12
10
  profileId: options.profileId,
13
11
  namespace: PRODUCT_IDENTITY.commandName,
14
- legacyConfigDir: productPaths.configDir,
15
12
  ...(options.agent === undefined ? {} : { agent: options.agent }),
16
13
  ...(options.agentProvider === undefined ? {} : { agentProvider: options.agentProvider }),
17
14
  hiddenAgentSettingIds: ["fullscreenWheelScrollLines"],
@@ -21,7 +21,7 @@ export interface OwnedUiCompositionOptions {
21
21
  /** A1 settings profile; comparison paths omit it. */
22
22
  readonly profileId?: string;
23
23
  /** `off` withholds A1-specific surfaces from comparison profiles. */
24
- readonly ownedSurfaces?: "on" | "off";
24
+ readonly productMode?: "bare" | "comparison";
25
25
  readonly projectTrustPrompt?: PiProjectTrustPreflightPrompt;
26
26
  /** Explicit local diagnostic destination; ignored by comparison/settings-free compositions. */
27
27
  readonly suggestionDiagnosticsPath?: string;