@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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { OwnedUiShellEditorPort } from "../../contracts/owned-ui/index.js";
|
|
1
2
|
import { type PromptHistoryKind, type PromptHistoryPort } from "../../contracts/owned-ui/index.js";
|
|
2
|
-
import type { PiShellEditorPort } from "../../integrations/pi/components/index.js";
|
|
3
3
|
/** Merges bounded recall snapshots; the editor alone owns browsing, draft, cursor, and undo state. */
|
|
4
4
|
export declare class PromptHistoryController {
|
|
5
5
|
#private;
|
|
6
6
|
readonly options: {
|
|
7
|
-
editor:
|
|
7
|
+
editor: OwnedUiShellEditorPort;
|
|
8
8
|
store: PromptHistoryPort;
|
|
9
9
|
limit: number;
|
|
10
10
|
fallback: readonly string[];
|
|
@@ -16,7 +16,7 @@ export declare class PromptHistoryController {
|
|
|
16
16
|
rehydrate?: (text: string) => string;
|
|
17
17
|
};
|
|
18
18
|
constructor(options: {
|
|
19
|
-
editor:
|
|
19
|
+
editor: OwnedUiShellEditorPort;
|
|
20
20
|
store: PromptHistoryPort;
|
|
21
21
|
limit: number;
|
|
22
22
|
fallback: readonly string[];
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import type { OwnedUiShellComponents } from "../../contracts/owned-ui/index.js";
|
|
1
2
|
import type { OwnedUiCommand, OwnedUiCommandResult, OwnedUiSessionBackend, OwnedUiSessionViewModel, PromptHistoryImageSidecarPort } from "../../contracts/owned-ui/index.js";
|
|
2
3
|
import type { PromptHistoryController } from "./prompt-history-controller.js";
|
|
3
4
|
import type { SessionConcern } from "./session-concern.js";
|
|
4
5
|
import type { OwnedUiSessionShellRoot } from "./session-shell-root.js";
|
|
5
6
|
import type { OwnedUiPresenterTerminal } from "./shell-host.js";
|
|
6
|
-
|
|
7
|
+
interface PromptSubmissionPorts {
|
|
7
8
|
readonly backend: Pick<OwnedUiSessionBackend, "session" | "identity" | "workflows">;
|
|
8
|
-
readonly root: Pick<OwnedUiSessionShellRoot, "editor" | "hasPendingPastes" | "waitForPromptPastes" | "setExtensionWidget" | "prepareHistoryText" | "imageChipAttachmentsFromEditor" | "preparePromptSubmission" | "omitUnsentPromptImages" | "resumeViewportFollowing" | "beginImageSubmissionStatus" | "
|
|
9
|
+
readonly root: Pick<OwnedUiSessionShellRoot, "editor" | "hasPendingPastes" | "waitForPromptPastes" | "setExtensionWidget" | "prepareHistoryText" | "imageChipAttachmentsFromEditor" | "preparePromptSubmission" | "omitUnsentPromptImages" | "resumeViewportFollowing" | "beginImageSubmissionStatus" | "workflow">;
|
|
9
10
|
readonly terminal: Pick<OwnedUiPresenterTerminal, "requestRender">;
|
|
10
11
|
readonly cwd: string;
|
|
12
|
+
readonly statusText: OwnedUiShellComponents["info"]["statusText"];
|
|
11
13
|
promptHistory(): PromptHistoryController | null;
|
|
12
14
|
imageSidecar(): PromptHistoryImageSidecarPort | undefined;
|
|
13
15
|
disposed(): boolean;
|
|
@@ -44,3 +46,4 @@ export declare class PromptSubmission implements SessionConcern {
|
|
|
44
46
|
onSessionReplaced(): void;
|
|
45
47
|
dispose(): void;
|
|
46
48
|
}
|
|
49
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { assertOwnedUiCommand, assertPromptImages, ImageAttachmentError, } from "../../contracts/owned-ui/index.js";
|
|
2
|
-
import { renderPiShellStatusText } from "../../integrations/pi/components/shell-presenters-info.js";
|
|
3
2
|
const rejected = (diagnostic) => ({ outcome: "rejected", diagnostic });
|
|
4
3
|
/**
|
|
5
4
|
* Turns editor input into engine commands: prompts, steering, follow-ups, and bash, each recorded
|
|
@@ -80,7 +79,7 @@ export class PromptSubmission {
|
|
|
80
79
|
reportError(error, message) {
|
|
81
80
|
// Security: arbitrary provider/extension error messages can contain the entire request.
|
|
82
81
|
try {
|
|
83
|
-
this.#ports.root.
|
|
82
|
+
this.#ports.root.workflow.appendResult({ command: "debug", outcome: "failed", message: message
|
|
84
83
|
?? (error instanceof ImageAttachmentError ? error.message : "Submission failed. Check the prompt and try again.") }, error instanceof ImageAttachmentError ? error.code : undefined);
|
|
85
84
|
this.#ports.terminal.requestRender();
|
|
86
85
|
}
|
|
@@ -120,7 +119,7 @@ export class PromptSubmission {
|
|
|
120
119
|
#showWaiting() {
|
|
121
120
|
const count = this.#waiting.size;
|
|
122
121
|
this.#ports.root.setExtensionWidget("owned-image-preparation", count === 0 ? null : {
|
|
123
|
-
render: width => [...
|
|
122
|
+
render: width => [...this.#ports.statusText(`Waiting for images (${count} submission${count === 1 ? "" : "s"}) — Esc cancels; dequeue restores`, width)],
|
|
124
123
|
invalidate: () => { },
|
|
125
124
|
}, "aboveEditor");
|
|
126
125
|
this.#ports.terminal.requestRender();
|
|
@@ -222,13 +221,13 @@ export class PromptSubmission {
|
|
|
222
221
|
message: result.cancelled ? "Bash command cancelled" : `Bash exited ${result.exitCode ?? 0}: ${command}`,
|
|
223
222
|
...(result.output ? { detail: result.output } : {}),
|
|
224
223
|
};
|
|
225
|
-
this.#ports.root.
|
|
224
|
+
this.#ports.root.workflow.appendResult(workflow);
|
|
226
225
|
this.#ports.terminal.requestRender();
|
|
227
226
|
return workflow.outcome === "failed" ? rejected(workflow.message) : { outcome: "completed", diagnostic: null };
|
|
228
227
|
}
|
|
229
228
|
catch (error) {
|
|
230
229
|
const message = `Bash command failed: ${error instanceof Error ? error.message : String(error)}`;
|
|
231
|
-
this.#ports.root.
|
|
230
|
+
this.#ports.root.workflow.appendResult({ command: "debug", outcome: "failed", message });
|
|
232
231
|
this.#ports.terminal.requestRender();
|
|
233
232
|
return rejected(message);
|
|
234
233
|
}
|
|
@@ -16,14 +16,14 @@ export interface QuitOutroCell {
|
|
|
16
16
|
readonly glyph: string;
|
|
17
17
|
readonly color: string;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
interface QuitOutroPlan {
|
|
20
20
|
/** Sorted by `start`. */
|
|
21
21
|
readonly sparkles: readonly QuitOutroCell[];
|
|
22
22
|
/** Sorted by `end`. */
|
|
23
23
|
readonly clears: readonly QuitOutroCell[];
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
declare const QUIT_OUTRO_EFFECTS: readonly ["fall", "dissolve", "starburst", "waves"];
|
|
26
26
|
export type QuitOutroEffect = (typeof QUIT_OUTRO_EFFECTS)[number];
|
|
27
|
-
export declare function isQuitOutroEffect(value: unknown): value is QuitOutroEffect;
|
|
28
27
|
/** Builds the selected effect's deterministic plan for the captured row widths. */
|
|
29
28
|
export declare function createQuitOutroPlan(effect: QuitOutroEffect, rowWidths: readonly number[], seed: number): QuitOutroPlan;
|
|
29
|
+
export {};
|
|
@@ -6,10 +6,7 @@
|
|
|
6
6
|
* cell from `start`, and clears blank a cell at `end`. The player consumes both
|
|
7
7
|
* in order, so a fixed seed yields a byte-stable animation.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
export function isQuitOutroEffect(value) {
|
|
11
|
-
return typeof value === "string" && QUIT_OUTRO_EFFECTS.includes(value);
|
|
12
|
-
}
|
|
9
|
+
const QUIT_OUTRO_EFFECTS = Object.freeze(["fall", "dissolve", "starburst", "waves"]);
|
|
13
10
|
const WHITE = "\x1b[38;2;238;238;238m";
|
|
14
11
|
const DUST_GLYPHS = [".", "·", "'", ":", "+", "°"];
|
|
15
12
|
const FALL_GLYPHS = [".", ".", "·", "'", ":", "°"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type QuitOutroEffect } from "./quit-outro-effects.js";
|
|
2
|
-
|
|
2
|
+
interface QuitOutroFrame {
|
|
3
3
|
/** Row content as presented, truncated to `columns`; index 0 is the top row. */
|
|
4
4
|
readonly lines: readonly string[];
|
|
5
5
|
readonly columns: number;
|
|
@@ -7,7 +7,7 @@ export interface QuitOutroFrame {
|
|
|
7
7
|
/** Visible width of each line, at most `columns`. */
|
|
8
8
|
readonly rowWidths: readonly number[];
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
interface QuitOutroPlayback {
|
|
11
11
|
write(data: string): void;
|
|
12
12
|
/** Monotonic clock seam; defaults to `Date.now`. */
|
|
13
13
|
now?(): number;
|
|
@@ -16,25 +16,22 @@ export interface QuitOutroPlayback {
|
|
|
16
16
|
/** Plan seed; defaults to a time- and geometry-derived value. */
|
|
17
17
|
readonly seed?: number;
|
|
18
18
|
/** Active bare-A1 canvas; omitted preserves transparent playback bytes. */
|
|
19
|
-
readonly
|
|
19
|
+
readonly canvas?: QuitOutroCanvas;
|
|
20
|
+
}
|
|
21
|
+
/** A painted canvas: its background sequence and how to rebase a row's default background onto it. */
|
|
22
|
+
export interface QuitOutroCanvas {
|
|
23
|
+
readonly ansi: string;
|
|
24
|
+
readonly rebase: (content: string, backgroundAnsi: string) => string;
|
|
20
25
|
}
|
|
21
|
-
export declare const QUIT_OUTRO_MIN_MS = 300;
|
|
22
|
-
export declare const QUIT_OUTRO_MAX_MS = 2000;
|
|
23
|
-
/** Wall-clock allowance beyond the clamped duration before playback abandons remaining ticks. */
|
|
24
|
-
export declare const QUIT_OUTRO_GUARD_MS = 500;
|
|
25
|
-
/** Tick ceiling for a clock that stops advancing: the longest playback plus its guard at 30 fps. */
|
|
26
|
-
export declare const QUIT_OUTRO_MAX_TICKS: number;
|
|
27
|
-
export declare function clampQuitOutroDuration(durationMs: number): number;
|
|
28
26
|
/**
|
|
29
27
|
* Captures the presented rows into an outro frame. Returns null when nothing is
|
|
30
28
|
* visible, so a blank screen never animates.
|
|
31
29
|
*/
|
|
32
30
|
export declare function captureQuitOutroFrame(presented: readonly string[], columns: number, rows: number): QuitOutroFrame | null;
|
|
33
|
-
/** The clear-and-repaint block that seeds the animation surface with the captured frame. */
|
|
34
|
-
export declare function createQuitOutroSurfaceFrame(frame: QuitOutroFrame, canvasBackgroundAnsi?: string): string;
|
|
35
31
|
/**
|
|
36
32
|
* Plays the effect over the frame. Resolves true when the plan was played to
|
|
37
33
|
* completion or abandoned at its guard, false when there was nothing to play.
|
|
38
34
|
* Write failures propagate so the caller can decide to continue restoration.
|
|
39
35
|
*/
|
|
40
36
|
export declare function playQuitOutro(frame: QuitOutroFrame, effect: QuitOutroEffect, durationMs: number, playback: QuitOutroPlayback): Promise<boolean>;
|
|
37
|
+
export {};
|
|
@@ -6,22 +6,21 @@
|
|
|
6
6
|
* terminal cannot delay restoration past the configured clamp.
|
|
7
7
|
*/
|
|
8
8
|
import { displayWidth, truncateToWidth } from "../../ui/components/index.js";
|
|
9
|
-
import { rebaseTerminalDefaultBackground } from "../../integrations/pi/tui-runtime/index.js";
|
|
10
9
|
import { createQuitOutroPlan } from "./quit-outro-effects.js";
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const QUIT_OUTRO_MIN_MS = 300;
|
|
11
|
+
const QUIT_OUTRO_MAX_MS = 2000;
|
|
13
12
|
/** Wall-clock allowance beyond the clamped duration before playback abandons remaining ticks. */
|
|
14
|
-
|
|
13
|
+
const QUIT_OUTRO_GUARD_MS = 500;
|
|
15
14
|
const FRAME_MS = 1000 / 30;
|
|
16
15
|
/** Tick ceiling for a clock that stops advancing: the longest playback plus its guard at 30 fps. */
|
|
17
|
-
|
|
16
|
+
const QUIT_OUTRO_MAX_TICKS = Math.ceil((QUIT_OUTRO_MAX_MS + QUIT_OUTRO_GUARD_MS) / FRAME_MS) + 1;
|
|
18
17
|
const SYNC_BEGIN = "\x1b[?2026h";
|
|
19
18
|
const SYNC_END = "\x1b[?2026l";
|
|
20
19
|
const RESET = "\x1b[0m";
|
|
21
20
|
const CLEAR_SCREEN = "\x1b[2J";
|
|
22
21
|
const HOME = "\x1b[H";
|
|
23
22
|
const HIDE_CURSOR = "\x1b[?25l";
|
|
24
|
-
|
|
23
|
+
function clampQuitOutroDuration(durationMs) {
|
|
25
24
|
if (!Number.isFinite(durationMs))
|
|
26
25
|
return QUIT_OUTRO_MIN_MS;
|
|
27
26
|
return Math.max(QUIT_OUTRO_MIN_MS, Math.min(QUIT_OUTRO_MAX_MS, Math.floor(durationMs)));
|
|
@@ -45,8 +44,8 @@ export function captureQuitOutroFrame(presented, columns, rows) {
|
|
|
45
44
|
return { lines, columns: width, rows: height, rowWidths };
|
|
46
45
|
}
|
|
47
46
|
/** The clear-and-repaint block that seeds the animation surface with the captured frame. */
|
|
48
|
-
|
|
49
|
-
if (
|
|
47
|
+
function createQuitOutroSurfaceFrame(frame, canvas) {
|
|
48
|
+
if (canvas === undefined) {
|
|
50
49
|
let output = `${SYNC_BEGIN}${HIDE_CURSOR}${CLEAR_SCREEN}${HOME}${RESET}`;
|
|
51
50
|
for (let row = 0; row < frame.rows; row++) {
|
|
52
51
|
const line = frame.lines[row] ?? "";
|
|
@@ -55,12 +54,13 @@ export function createQuitOutroSurfaceFrame(frame, canvasBackgroundAnsi) {
|
|
|
55
54
|
}
|
|
56
55
|
return `${output}${SYNC_END}`;
|
|
57
56
|
}
|
|
57
|
+
const canvasBackgroundAnsi = canvas.ansi;
|
|
58
58
|
let output = `${SYNC_BEGIN}${HIDE_CURSOR}${RESET}${canvasBackgroundAnsi}${CLEAR_SCREEN}${HOME}`;
|
|
59
59
|
for (let row = 0; row < frame.rows; row++) {
|
|
60
60
|
const line = frame.lines[row] ?? "";
|
|
61
61
|
if (frame.rowWidths[row] > 0) {
|
|
62
62
|
output += `${cursorAt(row, 0)}${canvasBackgroundAnsi}`
|
|
63
|
-
+ `${
|
|
63
|
+
+ `${canvas.rebase(line, canvasBackgroundAnsi)}${RESET}${canvasBackgroundAnsi}`;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return `${output}${RESET}${SYNC_END}`;
|
|
@@ -81,8 +81,8 @@ export async function playQuitOutro(frame, effect, durationMs, playback) {
|
|
|
81
81
|
let sparkleIndex = 0;
|
|
82
82
|
let clearIndex = 0;
|
|
83
83
|
let ticks = 0;
|
|
84
|
-
|
|
85
|
-
playback.
|
|
84
|
+
playback.write(createQuitOutroSurfaceFrame(frame, playback.canvas));
|
|
85
|
+
const canvas = playback.canvas?.ansi;
|
|
86
86
|
const startedAt = now();
|
|
87
87
|
for (;;) {
|
|
88
88
|
ticks += 1;
|
|
@@ -4,8 +4,8 @@ export declare const COPY_CLEANUP_MS = 250;
|
|
|
4
4
|
export declare const MAX_COPY_BYTES: number;
|
|
5
5
|
export declare const MAX_COPY_CONTROL_BYTES: number;
|
|
6
6
|
export declare const COPY_CHUNK_UNITS = 16384;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type CopyOutcome = "delivered" | "submitted-unverified" | "failed" | "timed-out" | "superseded" | "canceled";
|
|
8
|
+
type CopyFailure = "size" | "unavailable" | "denied" | "transport" | "unsafe";
|
|
9
9
|
export interface CopyResult {
|
|
10
10
|
readonly outcome: CopyOutcome;
|
|
11
11
|
readonly failure?: CopyFailure;
|
|
@@ -54,3 +54,4 @@ export type CopyHelperOutput = {
|
|
|
54
54
|
readonly result: CopyResult;
|
|
55
55
|
readonly control?: string;
|
|
56
56
|
};
|
|
57
|
+
export {};
|
|
@@ -15,26 +15,13 @@ export interface OwnedResponseCopyExecutor extends ResponseCopyExecutor {
|
|
|
15
15
|
dispose(): void;
|
|
16
16
|
readonly warmed: boolean;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
interface ResponseCopyTerminal {
|
|
19
19
|
readonly maxBytes?: number;
|
|
20
20
|
/** A supported non-blocking submission boundary, not clipboard acknowledgment. */
|
|
21
21
|
submit(control: string, signal: AbortSignal): Promise<void>;
|
|
22
22
|
}
|
|
23
23
|
/** Never substitute a remote host's native clipboard for the terminal user's clipboard. */
|
|
24
24
|
export declare function responseCopyDestination(env: NodeJS.ProcessEnv): "native" | "terminal";
|
|
25
|
-
/**
|
|
26
|
-
* Spawn options for one operating-system clipboard writer.
|
|
27
|
-
* Platform: on POSIX the writer is detached into its own process group, as pinned Pi 1.4 does, so a writer
|
|
28
|
-
* that daemonizes to keep serving the clipboard is not stopped when Ctrl+Z sends SIGTSTP to the shell's group.
|
|
29
|
-
*/
|
|
30
|
-
export declare function platformClipboardWriteOptions(signal: AbortSignal, platform?: NodeJS.Platform): {
|
|
31
|
-
signal: AbortSignal;
|
|
32
|
-
windowsHide: boolean;
|
|
33
|
-
timeout: number;
|
|
34
|
-
killSignal: "SIGKILL";
|
|
35
|
-
maxBuffer: number;
|
|
36
|
-
detached: boolean;
|
|
37
|
-
};
|
|
38
25
|
/** Isolates preparation and native clipboard access; only the owner may submit terminal controls. */
|
|
39
26
|
export declare function createResponseCopyExecutor(options?: {
|
|
40
27
|
readonly terminal?: ResponseCopyTerminal;
|
|
@@ -52,3 +39,4 @@ export declare function createResponseCopyExecutor(options?: {
|
|
|
52
39
|
}): OwnedResponseCopyExecutor;
|
|
53
40
|
/** A spare-of-one pool of copy helpers; `createResponseCopyExecutor` takes its child and warms the next one after each copy. */
|
|
54
41
|
export declare function createCopyHelperPool(helper?: URL, idleMs?: number): HelperPool;
|
|
42
|
+
export {};
|
|
@@ -25,7 +25,7 @@ function platformClipboardCommands() {
|
|
|
25
25
|
* Platform: on POSIX the writer is detached into its own process group, as pinned Pi 1.4 does, so a writer
|
|
26
26
|
* that daemonizes to keep serving the clipboard is not stopped when Ctrl+Z sends SIGTSTP to the shell's group.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
function platformClipboardWriteOptions(signal, platform = process.platform) {
|
|
29
29
|
return {
|
|
30
30
|
signal,
|
|
31
31
|
windowsHide: true,
|
|
@@ -5,7 +5,7 @@ export interface SessionResumeCommandMetadata {
|
|
|
5
5
|
}
|
|
6
6
|
export declare function formatSessionResumeCommand(metadata: SessionResumeCommandMetadata): string;
|
|
7
7
|
export declare function quoteCommandArgument(value: string): string;
|
|
8
|
-
|
|
8
|
+
interface ExitTextInput {
|
|
9
9
|
readonly terminalMode: "regular" | "fullscreen";
|
|
10
10
|
readonly customViewport: boolean;
|
|
11
11
|
readonly exitMode: "transcript" | "resume-hint";
|
|
@@ -27,3 +27,4 @@ export declare class SessionStopLatch {
|
|
|
27
27
|
/** The engine stopped on its own: dispose the shell, then resolve whether or not disposal failed. */
|
|
28
28
|
settleAfter(dispose: () => Promise<void>): void;
|
|
29
29
|
}
|
|
30
|
+
export {};
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { OwnedUiShellComponents, OwnedUiShellHotkeysPresentation, OwnedUiShellClipboardContent, OwnedUiShellComponentPort, OwnedUiShellEditorPort, OwnedUiShellHeaderOptions, OwnedUiShellHeaderPort, OwnedUiShellHistoryEditor, OwnedUiShellImageAssetResolver, OwnedUiShellKeybindingsHost, OwnedUiShellLoadedResourcesPort, OwnedUiShellResourceEntry } from "../../contracts/owned-ui/index.js";
|
|
2
|
+
import type { TerminalComponentPort, TerminalInputCoordinationScheduler, TerminalInputDiagnosticsEvent, TerminalInputSurfaceKind, TerminalLayoutNode, TerminalPointerSurface, TerminalPort } from "../../contracts/presentation/index.js";
|
|
3
|
+
import type { ShellPresentationPorts, ThemeSource } from "../../contracts/presentation/index.js";
|
|
4
|
+
import type { OwnedUiBackgroundSettingsPort, OwnedUiPromptSuggestionGeneratorPort, OwnedUiSessionBackend, OwnedUiSessionPresenters, OwnedUiSessionViewModel, OwnedUiTranscriptRendererPort, OwnedUiViewportSettings, OwnedUiViewportSettingsPort, OwnedUiQuitOutroSettingsPort, SuggestionDecision, SuggestionDiagnosticObserver } from "../../contracts/owned-ui/index.js";
|
|
4
5
|
import type { UiRouteHost, UiRouteInput } from "../../ui/apps/contracts.js";
|
|
5
6
|
import type { TranscriptViewportFrame, TranscriptViewportFrameDescriptor } from "../../ui/components/transcript-viewport.js";
|
|
6
|
-
import type { PiShellLazySelectorLoader } from "../../integrations/pi/components/lazy-selectors.js";
|
|
7
|
-
import type { PiShellHotkeysPresentation } from "../../integrations/pi/components/shell-presenters-info.js";
|
|
8
|
-
import { type PiShellClipboardContent, type PiShellComponentPort, type PiKeybindingsHost, type PiShellEditorPort, type PiShellHeaderOptions, type PiShellHeaderPort, type PiShellImageAssetResolver, type PiShellLoadedResourcesPort, type PiShellResourceEntry, type PiShellTranscriptComponentPort } from "../../integrations/pi/components/shell-shared-facade.js";
|
|
9
|
-
import { type PiTuiInputCoordinationScheduler, type PiTuiInputSurfaceKind } from "../../integrations/pi/tui-runtime/input-presentation-coordinator.js";
|
|
10
|
-
import type { PiTuiComponentPort, PiTuiInputDiagnosticsEvent, PiTuiLayoutNode, PiTuiTerminalPort } from "../../integrations/pi/tui-runtime/contracts.js";
|
|
11
7
|
import { type PreparedPrompt } from "./prompt-chips.js";
|
|
12
8
|
import type { PastePreparationClientOptions } from "./paste-preparation-client.js";
|
|
13
9
|
import type { OwnedUiClipboardServices } from "./clipboard-services.js";
|
|
10
|
+
import type { OwnedUiClipboardPort } from "./shell-clipboard.js";
|
|
14
11
|
import { type SessionViewportInputResult } from "./session-viewport-controller.js";
|
|
15
12
|
import type { ResponseCopyExecutor } from "./response-copy-transport.js";
|
|
16
13
|
import type { ResponseCopyEvent } from "./response-copy-protocol.js";
|
|
17
14
|
import type { PasteEvent, PasteSource } from "./paste-protocol.js";
|
|
15
|
+
import { DockChrome } from "./dock-chrome.js";
|
|
16
|
+
import { WorkflowOutput } from "./workflow-output.js";
|
|
17
|
+
import { TranscriptDocument } from "./transcript-document.js";
|
|
18
18
|
import type { StreamPresentationScheduler } from "./stream-presentation-coalescer.js";
|
|
19
|
-
|
|
20
|
-
type OwnedUiStartupOptions =
|
|
21
|
-
export interface OwnedUiClipboardPort {
|
|
22
|
-
readText(signal?: AbortSignal): Promise<string | null>;
|
|
23
|
-
readImage?(signal?: AbortSignal): Promise<{
|
|
24
|
-
readonly data: string;
|
|
25
|
-
readonly mimeType: string;
|
|
26
|
-
} | null>;
|
|
27
|
-
writeText?(text: string, signal?: AbortSignal): Promise<void>;
|
|
28
|
-
}
|
|
19
|
+
type OwnedUiTerminalPort = TerminalPort;
|
|
20
|
+
type OwnedUiStartupOptions = OwnedUiShellHeaderOptions;
|
|
29
21
|
/** The engine session the shell presents and the composition's decisions about it. */
|
|
30
22
|
export interface OwnedUiShellEngineOptions {
|
|
31
23
|
readonly backend: OwnedUiSessionBackend;
|
|
@@ -78,8 +70,8 @@ export interface OwnedUiShellPresentationOptions {
|
|
|
78
70
|
readonly seed?: number;
|
|
79
71
|
};
|
|
80
72
|
readonly input?: {
|
|
81
|
-
readonly scheduler?:
|
|
82
|
-
readonly onEvent?: (event:
|
|
73
|
+
readonly scheduler?: TerminalInputCoordinationScheduler;
|
|
74
|
+
readonly onEvent?: (event: TerminalInputDiagnosticsEvent) => void;
|
|
83
75
|
readonly now?: () => number;
|
|
84
76
|
/** Evidence-only baseline seam; production leaves coordination enabled. */
|
|
85
77
|
readonly coordination?: boolean;
|
|
@@ -98,7 +90,7 @@ export interface OwnedUiShellHistoryOptions {
|
|
|
98
90
|
readonly forScope?: (scope: "unique" | "shared", sessionId: string | null) => Pick<OwnedUiShellHistoryOptions, "store" | "imageSidecar"> | null;
|
|
99
91
|
readonly onScopeChange?: (listener: (scope: "unique" | "shared") => void) => () => void;
|
|
100
92
|
readonly limit: number;
|
|
101
|
-
readonly editor:
|
|
93
|
+
readonly editor: OwnedUiShellHistoryEditor;
|
|
102
94
|
/** Optional per-profile filesystem sidecar for image chip payloads. When present, submit
|
|
103
95
|
* writes each referenced attachment and recall reads them back to rehydrate live chips.
|
|
104
96
|
* When absent, image chips silently strip on recall, matching the missing-sidecar path. */
|
|
@@ -124,8 +116,6 @@ export interface OwnedUiShellDiagnosticOptions {
|
|
|
124
116
|
readonly paste?: (event: PasteEvent) => void;
|
|
125
117
|
/** Test seams for isolated paste preparation: an in-process starter, or the forked helper's entry. */
|
|
126
118
|
readonly pastePreparation?: Omit<PastePreparationClientOptions, "onEvent" | "spareIdleMs">;
|
|
127
|
-
/** Test seam for pending and failed optional selector-module preparation. */
|
|
128
|
-
readonly lazySelectors?: PiShellLazySelectorLoader;
|
|
129
119
|
}
|
|
130
120
|
/** Live prompt-image admission policy supplied only by the bare-A1 profile. */
|
|
131
121
|
export interface OwnedUiShellPromptImagesOptions {
|
|
@@ -141,13 +131,13 @@ export interface OwnedUiShellSkillsOptions {
|
|
|
141
131
|
export interface OwnedUiShellSharedServices {
|
|
142
132
|
readonly clipboard?: OwnedUiClipboardServices;
|
|
143
133
|
/** Must match the shell's layout: the owned-input profile for the custom viewport, Pi's otherwise. */
|
|
144
|
-
readonly keybindings?:
|
|
134
|
+
readonly keybindings?: OwnedUiShellKeybindingsHost;
|
|
145
135
|
}
|
|
146
136
|
/** What composes an owned session shell, grouped by the collaborator that provides each part. */
|
|
147
137
|
export interface OwnedUiSessionShellOptions {
|
|
148
138
|
readonly engine: OwnedUiShellEngineOptions;
|
|
149
|
-
/** Resolves selectors
|
|
150
|
-
readonly presenters: OwnedUiSessionPresenters;
|
|
139
|
+
/** Resolves selectors, engine-backed transcript renderers, and the vendor presentation ports. */
|
|
140
|
+
readonly presenters: OwnedUiSessionPresenters & ShellPresentationPorts;
|
|
151
141
|
readonly presentation?: OwnedUiShellPresentationOptions;
|
|
152
142
|
readonly history?: OwnedUiShellHistoryOptions;
|
|
153
143
|
readonly suggestions?: OwnedUiShellSuggestionOptions;
|
|
@@ -158,46 +148,56 @@ export interface OwnedUiSessionShellOptions {
|
|
|
158
148
|
readonly diagnostics?: OwnedUiShellDiagnosticOptions;
|
|
159
149
|
readonly shared?: OwnedUiShellSharedServices;
|
|
160
150
|
}
|
|
151
|
+
/** What the render root needs from its presenter: terminal size and render requests, the theme, and input callbacks. */
|
|
152
|
+
interface OwnedUiSessionShellRootHandlers {
|
|
153
|
+
readonly presentation: ShellPresentationPorts;
|
|
154
|
+
readonly components: OwnedUiShellComponents;
|
|
155
|
+
readonly getColumns: () => number;
|
|
156
|
+
readonly getRows: () => number;
|
|
157
|
+
readonly requestRender: (force?: boolean) => void;
|
|
158
|
+
readonly onViewportFrame?: (frame: TranscriptViewportFrame) => void;
|
|
159
|
+
readonly requestHyperlinkCleanup?: (rows?: readonly number[]) => void;
|
|
160
|
+
readonly enableDockInputReuse?: boolean;
|
|
161
|
+
readonly persistentHistory?: boolean;
|
|
162
|
+
readonly historyEditor?: OwnedUiShellHistoryEditor;
|
|
163
|
+
readonly onSubmit: (text: string) => void;
|
|
164
|
+
readonly onPasteRejected?: (error: unknown) => void;
|
|
165
|
+
readonly onInterrupt: () => void;
|
|
166
|
+
readonly onClear?: () => void;
|
|
167
|
+
readonly onExit: () => void;
|
|
168
|
+
readonly onModelSelect: () => void;
|
|
169
|
+
readonly onModelCycle?: (direction: "forward" | "backward") => void;
|
|
170
|
+
readonly onThinkingCycle: () => void;
|
|
171
|
+
readonly onThinkingToggle?: () => void;
|
|
172
|
+
readonly onMessageCopy?: () => void;
|
|
173
|
+
readonly onFollowUp?: () => void;
|
|
174
|
+
readonly onDequeue?: () => void;
|
|
175
|
+
readonly onEditorChange?: (text: string) => void;
|
|
176
|
+
readonly onPromptSuggestionAccepted?: (text: string) => void;
|
|
177
|
+
readonly onInputSurfaceChanged?: () => void;
|
|
178
|
+
readonly onPromptSuggestionEligibilityChanged?: () => void;
|
|
179
|
+
readonly onCopyText?: (text: string, cut: boolean) => void;
|
|
180
|
+
readonly readClipboardContent?: (signal?: AbortSignal) => Promise<OwnedUiShellClipboardContent | null>;
|
|
181
|
+
readonly captureClipboardPaste?: () => PasteSource;
|
|
182
|
+
readonly pasteDiagnostics?: (event: PasteEvent) => void;
|
|
183
|
+
readonly pastePreparation?: Omit<PastePreparationClientOptions, "onEvent">;
|
|
184
|
+
readonly keybindings?: OwnedUiShellKeybindingsHost;
|
|
185
|
+
readonly promptImageLimit?: () => number;
|
|
186
|
+
readonly skillsPresentation?: () => "collapse" | "expand";
|
|
187
|
+
}
|
|
161
188
|
/** Composes session state into the owned transcript, viewport, editor, and dock. */
|
|
162
|
-
export declare class OwnedUiSessionShellRoot implements
|
|
189
|
+
export declare class OwnedUiSessionShellRoot implements TerminalComponentPort {
|
|
163
190
|
#private;
|
|
164
|
-
readonly editor:
|
|
165
|
-
readonly header:
|
|
166
|
-
readonly resources:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
readonly persistentHistory?: boolean;
|
|
175
|
-
readonly historyEditor?: import("../../integrations/pi/components/index.js").HistoryEditorConstructor;
|
|
176
|
-
readonly onSubmit: (text: string) => void;
|
|
177
|
-
readonly onPasteRejected?: (error: unknown) => void;
|
|
178
|
-
readonly onInterrupt: () => void;
|
|
179
|
-
readonly onClear?: () => void;
|
|
180
|
-
readonly onExit: () => void;
|
|
181
|
-
readonly onModelSelect: () => void;
|
|
182
|
-
readonly onModelCycle?: (direction: "forward" | "backward") => void;
|
|
183
|
-
readonly onThinkingCycle: () => void;
|
|
184
|
-
readonly onThinkingToggle?: () => void;
|
|
185
|
-
readonly onMessageCopy?: () => void;
|
|
186
|
-
readonly onFollowUp?: () => void;
|
|
187
|
-
readonly onDequeue?: () => void;
|
|
188
|
-
readonly onEditorChange?: (text: string) => void;
|
|
189
|
-
readonly onPromptSuggestionAccepted?: (text: string) => void;
|
|
190
|
-
readonly onInputSurfaceChanged?: () => void;
|
|
191
|
-
readonly onPromptSuggestionEligibilityChanged?: () => void;
|
|
192
|
-
readonly onCopyText?: (text: string, cut: boolean) => void;
|
|
193
|
-
readonly readClipboardContent?: (signal?: AbortSignal) => Promise<PiShellClipboardContent | null>;
|
|
194
|
-
readonly captureClipboardPaste?: () => PasteSource;
|
|
195
|
-
readonly pasteDiagnostics?: (event: PasteEvent) => void;
|
|
196
|
-
readonly pastePreparation?: Omit<PastePreparationClientOptions, "onEvent">;
|
|
197
|
-
readonly keybindings?: PiKeybindingsHost;
|
|
198
|
-
readonly promptImageLimit?: () => number;
|
|
199
|
-
readonly skillsPresentation?: () => "collapse" | "expand";
|
|
200
|
-
}, startup?: PiShellHeaderOptions, agentDir?: string, extensionRenderers?: OwnedUiTranscriptRendererPort, sessionLayout?: "pinned" | "custom-viewport", imageAssets?: PiShellImageAssetResolver);
|
|
191
|
+
readonly editor: OwnedUiShellEditorPort;
|
|
192
|
+
readonly header: OwnedUiShellHeaderPort;
|
|
193
|
+
readonly resources: OwnedUiShellLoadedResourcesPort;
|
|
194
|
+
/** The transcript's semantic rows, caches, and engine-backed block renderers. */
|
|
195
|
+
readonly transcript: TranscriptDocument;
|
|
196
|
+
/** Workflow results, messages, and status lines appended to the transcript. */
|
|
197
|
+
readonly workflow: WorkflowOutput;
|
|
198
|
+
/** The dock's notices, copy acknowledgement, and release banner. */
|
|
199
|
+
readonly chrome: DockChrome;
|
|
200
|
+
constructor(view: OwnedUiSessionViewModel, cwd: string, handlers: OwnedUiSessionShellRootHandlers, startup?: OwnedUiShellHeaderOptions, agentDir?: string, extensionRenderers?: OwnedUiTranscriptRendererPort, sessionLayout?: "pinned" | "custom-viewport", imageAssets?: OwnedUiShellImageAssetResolver);
|
|
201
201
|
setEditorPaddingX(padding: number): void;
|
|
202
202
|
setAutocompleteMaxVisible(maxVisible: number): void;
|
|
203
203
|
setOutputPad(padding: 0 | 1): void;
|
|
@@ -230,12 +230,6 @@ export declare class OwnedUiSessionShellRoot implements PiTuiComponentPort {
|
|
|
230
230
|
canPresentPromptSuggestion(): boolean;
|
|
231
231
|
setPromptSuggestion(text: string | null): void;
|
|
232
232
|
update(view: OwnedUiSessionViewModel): void;
|
|
233
|
-
/**
|
|
234
|
-
* Applies one block: its component is created or updated in place and the order grows
|
|
235
|
-
* only when the block is new. A streamed chunk costs one component update rather than a
|
|
236
|
-
* walk of the whole transcript.
|
|
237
|
-
*/
|
|
238
|
-
applyTranscriptBlock(block: OwnedUiSessionViewModel["transcript"][number]): void;
|
|
239
233
|
render(width: number): readonly string[];
|
|
240
234
|
viewportFrameDescriptor(): TranscriptViewportFrameDescriptor | null;
|
|
241
235
|
/** Read-only, payload-free evidence; observing a pending frame must never render or repair it. */
|
|
@@ -268,58 +262,49 @@ export declare class OwnedUiSessionShellRoot implements PiTuiComponentPort {
|
|
|
268
262
|
hasActiveSelection(): boolean;
|
|
269
263
|
setViewportConfig(config: OwnedUiViewportSettings): void;
|
|
270
264
|
setFullscreenCopyOnSelect(enabled: boolean): void;
|
|
271
|
-
showCopyAcknowledgement(message: string): void;
|
|
272
265
|
resumeViewportFollowing(): void;
|
|
273
266
|
noteCompletedAssistantMessage(): void;
|
|
274
|
-
/** A new session binding owns new mounts even when it reuses semantic invocation ids. */
|
|
275
|
-
resetTranscript(): void;
|
|
276
267
|
resetViewport(): void;
|
|
277
268
|
clearViewportPointerState(): void;
|
|
278
|
-
setViewportOverlaySurfaces(surfaces: readonly
|
|
269
|
+
setViewportOverlaySurfaces(surfaces: readonly TerminalPointerSurface[] | null): void;
|
|
279
270
|
viewportInputGeometryReady(width: number, height: number): boolean;
|
|
280
271
|
handleViewportPreInput(data: string, allowWheel?: boolean, now?: number, editorActive?: boolean): SessionViewportInputResult;
|
|
281
|
-
dismissNotice(): void;
|
|
282
272
|
/** The pinned-profile layout regions of this session; the terminal host arranges them with `pinnedLayoutRoot`. */
|
|
283
273
|
layoutParts(): PinnedLayoutParts;
|
|
284
|
-
transcriptComponent(id: string): PiShellTranscriptComponentPort | undefined;
|
|
285
|
-
exitTranscript(width: number): string;
|
|
286
|
-
appendWorkflowStatus(message: string): void;
|
|
287
|
-
appendWorkflowMessage(message: OwnedUiWorkflowMessage, errorCode?: ImageAttachmentError["code"]): void;
|
|
288
|
-
appendWorkflowResult(result: OwnedUiWorkflowResult, errorCode?: ImageAttachmentError["code"]): void;
|
|
289
274
|
toggleThinkingVisibility(): void;
|
|
290
275
|
get toolsExpanded(): boolean;
|
|
291
276
|
setToolsExpanded(expanded: boolean): void;
|
|
292
|
-
setExtensionWidget(key: string, component:
|
|
293
|
-
setExtensionHeader(component:
|
|
294
|
-
setExtensionFooter(component:
|
|
277
|
+
setExtensionWidget(key: string, component: OwnedUiShellComponentPort | null, placement: "aboveEditor" | "belowEditor"): void;
|
|
278
|
+
setExtensionHeader(component: OwnedUiShellComponentPort | null): void;
|
|
279
|
+
setExtensionFooter(component: OwnedUiShellComponentPort | null): void;
|
|
295
280
|
setExtensionStatus(key: string, text: string | undefined): void;
|
|
296
281
|
setExtensionWorking(message: string | undefined, visible?: boolean): void;
|
|
297
282
|
beginImageSubmissionStatus(): () => void;
|
|
298
|
-
hotkeysPresentation():
|
|
283
|
+
hotkeysPresentation(): OwnedUiShellHotkeysPresentation;
|
|
299
284
|
resetWorkflowPresentation(): void;
|
|
300
285
|
resetExtensionUi(): void;
|
|
301
286
|
addExtensionNotification(message: string, type: "info" | "warning" | "error"): void;
|
|
302
287
|
extensionFooterData(): unknown;
|
|
303
288
|
usesDefaultInputSurface(): boolean;
|
|
304
|
-
inputCoordinationSurface():
|
|
289
|
+
inputCoordinationSurface(): TerminalInputSurfaceKind;
|
|
305
290
|
viewportCompositionEvidence(): {
|
|
306
291
|
readonly full: number;
|
|
307
292
|
readonly dockOnly: number;
|
|
308
293
|
};
|
|
309
294
|
transcriptRenderCount(): number;
|
|
310
295
|
setFooterLevel(visible: boolean): void;
|
|
311
|
-
setInputSurface(component:
|
|
296
|
+
setInputSurface(component: OwnedUiShellComponentPort | null, disposePrevious?: boolean, coordination?: Exclude<TerminalInputSurfaceKind, "editor">): void;
|
|
312
297
|
handleInput(data: string): void;
|
|
313
298
|
invalidate(): void;
|
|
314
299
|
setFocused(focused: boolean): void;
|
|
315
300
|
dispose(): void;
|
|
316
301
|
}
|
|
317
302
|
export type PinnedLayoutPart = "document" | "queued" | "aboveWidgets" | "status" | "editor" | "belowWidgets" | "footer";
|
|
318
|
-
export type PinnedLayoutParts = Readonly<Record<PinnedLayoutPart,
|
|
303
|
+
export type PinnedLayoutParts = Readonly<Record<PinnedLayoutPart, TerminalComponentPort>>;
|
|
319
304
|
/**
|
|
320
305
|
* The pinned-profile screen: a followed transcript scroll above the dock. The runtime mounts one such layout,
|
|
321
306
|
* so its single `transcript` scroll view is shared by whichever session the parts currently resolve to.
|
|
322
307
|
*/
|
|
323
|
-
export declare function pinnedLayoutRoot(parts: PinnedLayoutParts):
|
|
324
|
-
export declare function shellResourceEntries(backend: OwnedUiSessionBackend): readonly
|
|
308
|
+
export declare function pinnedLayoutRoot(parts: PinnedLayoutParts, theme: ThemeSource): TerminalLayoutNode;
|
|
309
|
+
export declare function shellResourceEntries(backend: OwnedUiSessionBackend): readonly OwnedUiShellResourceEntry[];
|
|
325
310
|
export {};
|