@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.
- package/bin/ui.js +3 -3
- package/dist/app/session-shell/clipboard-diagnostics.d.ts +2 -2
- package/dist/app/session-shell/clipboard-image.d.ts +0 -1
- package/dist/app/session-shell/clipboard-image.js +1 -1
- package/dist/app/session-shell/dialog-coordinator.d.ts +6 -5
- package/dist/app/session-shell/dialog-coordinator.js +3 -4
- package/dist/app/session-shell/dock-chrome.d.ts +11 -6
- package/dist/app/session-shell/dock-chrome.js +5 -8
- package/dist/app/session-shell/editor-hyperlink-budget.d.ts +0 -2
- package/dist/app/session-shell/editor-hyperlink-budget.js +1 -1
- package/dist/app/session-shell/exit-notice.d.ts +2 -2
- package/dist/app/session-shell/exit-notice.js +1 -1
- package/dist/app/session-shell/extension-surface.d.ts +8 -7
- package/dist/app/session-shell/helper-pool.d.ts +3 -4
- package/dist/app/session-shell/helper-pool.js +1 -1
- package/dist/app/session-shell/image-preparation-client.d.ts +4 -3
- package/dist/app/session-shell/image-preparation.d.ts +0 -2
- package/dist/app/session-shell/image-preparation.js +2 -2
- package/dist/app/session-shell/image-source.d.ts +2 -3
- package/dist/app/session-shell/image-source.js +2 -2
- package/dist/app/session-shell/input-surface-switch.d.ts +9 -7
- package/dist/app/session-shell/input-surface-switch.js +1 -2
- package/dist/app/session-shell/login-interaction.d.ts +5 -4
- package/dist/app/session-shell/login-interaction.js +2 -3
- package/dist/app/session-shell/paste-executor.d.ts +4 -8
- package/dist/app/session-shell/paste-executor.js +2 -2
- package/dist/app/session-shell/paste-protocol.d.ts +2 -2
- package/dist/app/session-shell/path-chip-presentation.d.ts +0 -5
- package/dist/app/session-shell/path-chip-presentation.js +3 -3
- package/dist/app/session-shell/prompt-chips.d.ts +8 -7
- package/dist/app/session-shell/prompt-history-controller.d.ts +3 -3
- package/dist/app/session-shell/prompt-submission.d.ts +5 -2
- package/dist/app/session-shell/prompt-submission.js +4 -5
- package/dist/app/session-shell/quit-outro-effects.d.ts +3 -3
- package/dist/app/session-shell/quit-outro-effects.js +1 -4
- package/dist/app/session-shell/quit-outro.d.ts +9 -12
- package/dist/app/session-shell/quit-outro.js +11 -11
- package/dist/app/session-shell/response-copy-protocol.d.ts +3 -2
- package/dist/app/session-shell/response-copy-transport.d.ts +2 -14
- package/dist/app/session-shell/response-copy-transport.js +1 -1
- package/dist/app/session-shell/session-lifecycle.d.ts +2 -1
- package/dist/app/session-shell/session-shell-root.d.ts +74 -89
- package/dist/app/session-shell/session-shell-root.js +81 -113
- package/dist/app/session-shell/session-shell.d.ts +13 -16
- package/dist/app/session-shell/session-shell.js +144 -268
- package/dist/app/session-shell/session-viewport-controller.d.ts +7 -6
- package/dist/app/session-shell/session-viewport-controller.js +2 -2
- package/dist/app/session-shell/settings-bindings.d.ts +24 -2
- package/dist/app/session-shell/settings-bindings.js +24 -0
- package/dist/app/session-shell/share-operation.d.ts +3 -3
- package/dist/app/session-shell/share-operation.js +4 -6
- package/dist/app/session-shell/shell-clipboard.d.ts +59 -0
- package/dist/app/session-shell/shell-clipboard.js +119 -0
- package/dist/app/session-shell/shell-editor-factory.d.ts +8 -4
- package/dist/app/session-shell/shell-editor-factory.js +13 -15
- package/dist/app/session-shell/shell-host.d.ts +16 -17
- package/dist/app/session-shell/shell-host.js +18 -19
- package/dist/app/session-shell/shell-layout.d.ts +2 -2
- package/dist/app/session-shell/shell-prompt-suggestions.d.ts +26 -0
- package/dist/app/session-shell/shell-prompt-suggestions.js +48 -0
- package/dist/app/session-shell/suggestion-surface.d.ts +1 -6
- package/dist/app/session-shell/suggestion-surface.js +1 -1
- package/dist/app/session-shell/system-clipboard.d.ts +2 -14
- package/dist/app/session-shell/system-clipboard.js +2 -7
- package/dist/app/session-shell/transcript-document.d.ts +11 -8
- package/dist/app/session-shell/transcript-document.js +13 -14
- package/dist/app/session-shell/viewport-layout.d.ts +2 -2
- package/dist/app/session-shell/workflow-output.d.ts +5 -3
- package/dist/app/session-shell/workflow-output.js +13 -15
- package/dist/cli/package-messages.d.ts +0 -1
- package/dist/cli/package-messages.js +1 -1
- package/dist/cli/session-context.d.ts +1 -1
- package/dist/cli/uninstall.d.ts +3 -2
- package/dist/composition/owned-settings.d.ts +2 -1
- package/dist/composition/owned-settings.js +0 -3
- package/dist/composition/owned-ui.d.ts +1 -1
- package/dist/composition/owned-ui.js +27 -27
- package/dist/composition/reference-selection-options.d.ts +1 -1
- package/dist/composition/reference-selection-options.js +1 -1
- package/dist/composition/session-runtime-registry.d.ts +2 -1
- package/dist/composition/settings-route-host.js +3 -10
- package/dist/composition/settings-search-input.d.ts +2 -1
- package/dist/composition/startup-route.d.ts +2 -2
- package/dist/composition/startup-route.js +2 -2
- package/dist/contracts/owned-ui/extension-ui.d.ts +2 -1
- package/dist/contracts/owned-ui/index.d.ts +1 -0
- package/dist/contracts/owned-ui/session-presenters.d.ts +3 -0
- package/dist/contracts/owned-ui/shell-components.d.ts +543 -0
- package/dist/contracts/owned-ui/shell-components.js +1 -0
- package/dist/contracts/presentation/component.d.ts +17 -0
- package/dist/contracts/presentation/component.js +8 -0
- package/dist/contracts/presentation/index.d.ts +6 -15
- package/dist/contracts/presentation/index.js +2 -0
- package/dist/contracts/presentation/terminal.d.ts +290 -0
- package/dist/contracts/presentation/terminal.js +1 -0
- package/dist/contracts/presentation/theme.d.ts +46 -0
- package/dist/contracts/presentation/theme.js +1 -0
- package/dist/features/launch/development-launch.js +1 -1
- package/dist/features/launch/runtime-selection.d.ts +2 -2
- package/dist/features/launch/runtime-selection.js +2 -2
- package/dist/features/owned-ui/project-trust-prompt.d.ts +2 -2
- package/dist/features/owned-ui/project-trust-prompt.js +1 -1
- package/dist/features/owned-ui/release-note-state.d.ts +2 -1
- package/dist/features/owned-ui/settings-app.js +38 -219
- package/dist/features/owned-ui/settings-edits.d.ts +31 -0
- package/dist/features/owned-ui/settings-edits.js +139 -0
- package/dist/features/owned-ui/settings-scroll-rail.d.ts +29 -0
- package/dist/features/owned-ui/settings-scroll-rail.js +79 -0
- package/dist/features/owned-ui/settings-search-input.d.ts +2 -1
- package/dist/features/prompt-history/service.d.ts +3 -2
- package/dist/foundation/lifecycle/claim-gate.d.ts +2 -1
- package/dist/foundation/release/automatic-update.d.ts +5 -14
- package/dist/foundation/release/automatic-update.js +14 -14
- package/dist/foundation/release/bootstrap.js +4 -4
- package/dist/foundation/release/dependency-certification.d.ts +0 -1
- package/dist/foundation/release/dependency-certification.js +1 -1
- package/dist/foundation/release/early-accent.d.ts +2 -2
- package/dist/foundation/release/early-accent.js +1 -1
- package/dist/foundation/release/index.d.ts +2 -2
- package/dist/foundation/release/index.js +1 -1
- package/dist/foundation/release/latest-release.d.ts +3 -18
- package/dist/foundation/release/latest-release.js +10 -10
- package/dist/foundation/release/ordinary-launch-selection.d.ts +1 -1
- package/dist/foundation/release/ordinary-launch-selection.js +1 -1
- package/dist/foundation/release/release-gc.d.ts +3 -3
- package/dist/foundation/release/release-gc.js +4 -4
- package/dist/foundation/release/{cohort-state.d.ts → release-state.d.ts} +23 -23
- package/dist/foundation/release/{cohort-state.js → release-state.js} +8 -8
- package/dist/foundation/release/update-activation.js +2 -2
- package/dist/foundation/release/update-execution-lease.d.ts +2 -3
- package/dist/foundation/release/update-execution-lease.js +1 -1
- package/dist/foundation/release/update-launch.d.ts +2 -2
- package/dist/foundation/release/update.d.ts +0 -2
- package/dist/foundation/release/update.js +14 -14
- package/dist/foundation/startup/startup-budget.d.ts +5 -5
- package/dist/foundation/startup/startup-budget.js +2 -2
- package/dist/integrations/pi/components/editor-interaction.d.ts +4 -12
- package/dist/integrations/pi/components/index.d.ts +15 -9
- package/dist/integrations/pi/components/index.js +9 -5
- package/dist/integrations/pi/components/lazy-selectors.d.ts +2 -10
- package/dist/integrations/pi/components/lazy-selectors.js +1 -1
- package/dist/integrations/pi/components/modal-frame.d.ts +5 -22
- package/dist/integrations/pi/components/modal-frame.js +3 -23
- package/dist/integrations/pi/components/owned-editor-ux.d.ts +4 -3
- package/dist/integrations/pi/components/prompt-input-port.d.ts +2 -19
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -1
- package/dist/integrations/pi/components/shell-editor-autocomplete.d.ts +3 -2
- package/dist/integrations/pi/components/shell-footer-status.d.ts +2 -2
- package/dist/integrations/pi/components/shell-footer-status.js +3 -2
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +6 -5
- package/dist/integrations/pi/components/shell-presenters-info.js +2 -1
- package/dist/integrations/pi/components/shell-session-info-reference.d.ts +2 -1
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +33 -227
- package/dist/integrations/pi/components/shell-shared-facade.js +8 -1
- package/dist/integrations/pi/components/skills-command.d.ts +1 -9
- package/dist/integrations/pi/components/skills-command.js +5 -5
- package/dist/integrations/pi/components/theme.d.ts +9 -2
- package/dist/integrations/pi/components/theme.js +17 -2
- package/dist/integrations/pi/components/thinking-selector-dialog.d.ts +2 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
- package/dist/integrations/pi/engine/adapter.d.ts +3 -5
- package/dist/integrations/pi/engine/adapter.js +3 -12
- package/dist/integrations/pi/engine/changelog.d.ts +2 -2
- package/dist/integrations/pi/engine/changelog.js +3 -3
- package/dist/integrations/pi/engine/compaction-progress.d.ts +2 -3
- package/dist/integrations/pi/engine/compaction-progress.js +1 -1
- package/dist/integrations/pi/engine/conformance.d.ts +2 -1
- package/dist/integrations/pi/engine/default-model-setting.d.ts +0 -2
- package/dist/integrations/pi/engine/default-model-setting.js +1 -2
- package/dist/integrations/pi/engine/event-delivery.d.ts +2 -1
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -1
- package/dist/integrations/pi/engine/host.js +2 -2
- package/dist/integrations/pi/engine/message-values.d.ts +0 -1
- package/dist/integrations/pi/engine/message-values.js +1 -1
- package/dist/integrations/pi/engine/pending-delivery.d.ts +0 -4
- package/dist/integrations/pi/engine/pending-delivery.js +3 -3
- package/dist/integrations/pi/engine/ports.d.ts +7 -1
- package/dist/integrations/pi/engine/ports.js +4 -0
- package/dist/integrations/pi/engine/project-trust-preflight.d.ts +2 -1
- package/dist/integrations/pi/engine/prompt-suggestions.d.ts +3 -2
- package/dist/integrations/pi/engine/provider-authentication.d.ts +1 -1
- package/dist/integrations/pi/engine/public-main-entry.d.ts +1 -5
- package/dist/integrations/pi/engine/public-main-entry.js +1 -1
- package/dist/integrations/pi/engine/repository-pr-rest.d.ts +1 -9
- package/dist/integrations/pi/engine/repository-pr-rest.js +2 -2
- package/dist/integrations/pi/engine/repository-pr.d.ts +1 -3
- package/dist/integrations/pi/engine/repository-pr.js +1 -1
- package/dist/integrations/pi/engine/resource-catalog.d.ts +2 -1
- package/dist/integrations/pi/engine/session-integration.d.ts +1 -1
- package/dist/integrations/pi/engine/session-runtime.d.ts +4 -3
- package/dist/integrations/pi/engine/settings-bridge.d.ts +0 -2
- package/dist/integrations/pi/engine/settings-bridge.js +1 -1
- package/dist/integrations/pi/engine/settings-port.d.ts +3 -2
- package/dist/integrations/pi/engine/transcript-projection.d.ts +2 -1
- package/dist/integrations/pi/engine/workflow-contexts.d.ts +1 -1
- package/dist/integrations/pi/engine/workflow-runner.d.ts +1 -1
- package/dist/integrations/pi/engine/workflow-support.d.ts +0 -6
- package/dist/integrations/pi/engine/workflow-support.js +4 -18
- package/dist/integrations/pi/engine/workflows.d.ts +5 -5
- package/dist/integrations/pi/session-presenters/components.d.ts +3 -0
- package/dist/integrations/pi/session-presenters/components.js +75 -0
- package/dist/integrations/pi/session-presenters/index.d.ts +1 -0
- package/dist/integrations/pi/session-presenters/index.js +1 -0
- package/dist/integrations/pi/session-presenters/presentation.d.ts +3 -0
- package/dist/integrations/pi/session-presenters/presentation.js +10 -0
- package/dist/integrations/pi/session-presenters/presenters.d.ts +2 -1
- package/dist/integrations/pi/session-presenters/presenters.js +3 -1
- package/dist/integrations/pi/tui-runtime/adapter.js +21 -30
- package/dist/integrations/pi/tui-runtime/contracts.d.ts +22 -166
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +5 -40
- package/dist/integrations/pi/tui-runtime/index.d.ts +1 -0
- package/dist/integrations/pi/tui-runtime/index.js +1 -0
- package/dist/integrations/pi/tui-runtime/input-presentation-coordinator.d.ts +4 -6
- package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +2 -8
- package/dist/integrations/pi/tui-runtime/overlay-geometry.js +3 -9
- package/dist/integrations/pi/tui-runtime/runtime-factory.d.ts +3 -0
- package/dist/integrations/pi/tui-runtime/runtime-factory.js +11 -0
- package/dist/ui/components/index.d.ts +2 -2
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/selection-copy.d.ts +0 -1
- package/dist/ui/components/selection-copy.js +0 -12
- package/dist/ui/components/theme.d.ts +4 -19
- package/dist/ui/components/theme.js +6 -0
- package/dist/ui/settings/declarations.d.ts +2 -3
- package/dist/ui/settings/declarations.js +2 -3
- package/dist/ui/settings/early-accent.js +1 -1
- package/dist/ui/settings/index.d.ts +3 -5
- package/dist/ui/settings/index.js +2 -3
- package/dist/ui/settings/manager.d.ts +0 -4
- package/dist/ui/settings/manager.js +6 -62
- package/dist/ui/settings/resolution.d.ts +6 -18
- package/dist/ui/settings/resolution.js +4 -103
- package/dist/ui/settings/sections.d.ts +0 -4
- package/dist/ui/settings/sections.js +1 -1
- package/docs/architecture/boundaries.md +2 -2
- package/docs/architecture/internal-naming.md +2 -0
- package/docs/architecture/project-structure.md +4 -2
- package/docs/validation.md +1 -1
- package/package.json +3 -4
- package/dist/integrations/pi/components/components.d.ts +0 -4
- package/dist/integrations/pi/components/components.js +0 -48
- package/dist/integrations/pi/components/conformance.d.ts +0 -18
- package/dist/integrations/pi/components/conformance.js +0 -70
- package/dist/integrations/pi/components/shell-components.d.ts +0 -7
- package/dist/integrations/pi/components/shell-components.js +0 -7
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +0 -33
- package/dist/integrations/pi/components/upstream/theme/theme-controller.js +0 -114
- package/dist/ui/settings/migrations.d.ts +0 -19
- package/dist/ui/settings/migrations.js +0 -225
- package/dist/ui/settings/progress-palette.generated.d.ts +0 -139
- package/dist/ui/settings/progress-palette.generated.js +0 -139
- /package/dist/{foundation/release → contracts/presentation}/progress-palette.generated.d.ts +0 -0
- /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
|
|
28
|
+
const productMode = options.productMode ?? "bare", bare = productMode === "bare";
|
|
29
29
|
const sessionRuntimes = new SessionRuntimeRegistry({
|
|
30
|
-
runtimeId:
|
|
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
|
|
46
|
+
productMode,
|
|
47
47
|
availableThemes: () => getAvailablePiThemes().map(theme => theme.name),
|
|
48
|
-
announceStartupChangelog: !
|
|
48
|
+
announceStartupChangelog: !bare,
|
|
49
49
|
theme: {
|
|
50
|
-
base:
|
|
51
|
-
accentColor: settings !== null &&
|
|
52
|
-
packageBorderProjection:
|
|
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
|
-
...(
|
|
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
|
-
|
|
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 || !
|
|
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 || !
|
|
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:
|
|
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 || !
|
|
108
|
+
const routeHost = settings === null || !bare ? null
|
|
109
109
|
: createOwnedRouteHost(settings, references, settingsRouteOptions(keybindings, backend.identity.agentDir, cwd));
|
|
110
|
-
const viewportSettings = settings === 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 || !
|
|
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 &&
|
|
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 || !
|
|
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 || !
|
|
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 || !
|
|
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,
|
|
137
|
+
const promptHistory = createPromptHistoryConfiguration(settings, backend, bare);
|
|
138
138
|
const clipboardDestination = options.clipboardDiagnosticsPath ?? process.env[PRODUCT_IDENTITY.environment.clipboardDiagnostics];
|
|
139
|
-
const clipboardDiagnostics = settings !== null &&
|
|
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 =
|
|
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
|
-
...(
|
|
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 || !
|
|
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 || !
|
|
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,
|
|
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 &&
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
readonly
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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>;
|