@timurproko/a1 0.2.6-dev.717 → 0.2.6-dev.734
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/cli.js +13 -2
- package/bin/ui.js +13 -0
- package/dist/app/session-shell/clipboard-services.d.ts +19 -0
- package/dist/app/session-shell/clipboard-services.js +7 -0
- package/dist/app/session-shell/exit-notice.d.ts +9 -5
- package/dist/app/session-shell/exit-notice.js +5 -5
- package/dist/app/session-shell/index.d.ts +3 -1
- package/dist/app/session-shell/index.js +1 -0
- package/dist/app/session-shell/paste-preparation-client.d.ts +3 -0
- package/dist/app/session-shell/paste-preparation-client.js +5 -2
- package/dist/app/session-shell/path-chip-presentation.d.ts +10 -3
- package/dist/app/session-shell/path-chip-presentation.js +48 -6
- package/dist/app/session-shell/prompt-chips.js +30 -4
- package/dist/app/session-shell/prompt-suggestion-controller.d.ts +5 -4
- package/dist/app/session-shell/prompt-suggestion-controller.js +148 -58
- package/dist/app/session-shell/quit-outro.d.ts +3 -1
- package/dist/app/session-shell/quit-outro.js +23 -8
- package/dist/app/session-shell/response-copy-transport.d.ts +6 -1
- package/dist/app/session-shell/response-copy-transport.js +8 -2
- package/dist/app/session-shell/session-shell-root.d.ts +22 -11
- package/dist/app/session-shell/session-shell-root.js +19 -12
- package/dist/app/session-shell/session-shell.d.ts +19 -21
- package/dist/app/session-shell/session-shell.js +678 -840
- package/dist/app/session-shell/session-viewport-controller.js +33 -21
- package/dist/cli/dispatch.js +5 -3
- package/dist/cli/session-context.d.ts +5 -1
- package/dist/cli/session-context.js +25 -8
- package/dist/composition/owned-ui.d.ts +23 -2
- package/dist/composition/owned-ui.js +124 -33
- package/dist/composition/session-info-reference.d.ts +2 -2
- package/dist/composition/session-info-reference.js +2 -2
- package/dist/composition/settings-route-host.js +2 -1
- package/dist/contracts/agent-engine/capability-ports.d.ts +1 -85
- package/dist/contracts/agent-engine/capability-ports.js +1 -35
- package/dist/contracts/agent-engine/index.d.ts +1 -7
- package/dist/contracts/agent-engine/index.js +0 -4
- package/dist/contracts/owned-ui/index.d.ts +9 -3
- package/dist/contracts/owned-ui/index.js +2 -1
- package/dist/contracts/owned-ui/model.d.ts +10 -0
- package/dist/contracts/owned-ui/session-backend.d.ts +119 -0
- package/dist/contracts/owned-ui/session-presenters.d.ts +55 -0
- package/dist/contracts/owned-ui/session-presenters.js +1 -0
- package/dist/contracts/owned-ui/session-workflows.d.ts +342 -0
- package/dist/contracts/owned-ui/session-workflows.js +30 -0
- package/dist/contracts/owned-ui/suggestion-diagnostics.d.ts +5 -1
- package/dist/contracts/owned-ui/suggestion-diagnostics.js +3 -1
- package/dist/contracts/owned-ui/validation.js +7 -0
- package/dist/features/launch/index.d.ts +1 -1
- package/dist/features/launch/session-context.d.ts +17 -2
- package/dist/features/launch/session-context.js +9 -5
- package/dist/features/owned-ui/settings-app.js +56 -54
- package/dist/features/prompt-suggestions/diagnostics.js +4 -1
- package/dist/foundation/lifecycle/index.d.ts +2 -2
- package/dist/foundation/lifecycle/index.js +1 -1
- package/dist/foundation/lifecycle/session-repository-context.d.ts +19 -2
- package/dist/foundation/lifecycle/session-repository-context.js +434 -66
- package/dist/foundation/process-containment/index.d.ts +1 -0
- package/dist/foundation/process-containment/index.js +1 -0
- package/dist/foundation/process-containment/native-process-inspector.d.ts +3 -0
- package/dist/foundation/process-containment/native-process-inspector.js +21 -0
- package/dist/foundation/release/bootstrap.js +1 -2
- package/dist/foundation/release/progress-palette.generated.d.ts +2 -2
- package/dist/foundation/release/progress-palette.generated.js +2 -2
- package/dist/foundation/release/release-gc.js +1 -1
- package/dist/foundation/release/update.js +0 -4
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/foundation/storage/control-store.js +0 -12
- package/dist/integrations/pi/components/components.js +2 -18
- package/dist/integrations/pi/components/index.d.ts +4 -4
- package/dist/integrations/pi/components/index.js +2 -2
- package/dist/integrations/pi/components/modal-frame.js +3 -4
- package/dist/integrations/pi/components/models-dialog.js +6 -35
- package/dist/integrations/pi/components/prompt-input-port.d.ts +1 -0
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -2
- package/dist/integrations/pi/components/resources/builtin-themes.js +2 -2
- package/dist/integrations/pi/components/share-operation-dialog.js +3 -3
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +19 -16
- package/dist/integrations/pi/components/shell-extension-ui.d.ts +5 -3
- package/dist/integrations/pi/components/shell-extension-ui.js +26 -12
- package/dist/integrations/pi/components/shell-hotkey-sections.js +2 -2
- package/dist/integrations/pi/components/shell-presenters-info.js +10 -10
- package/dist/integrations/pi/components/shell-presenters-transcript.js +13 -13
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +5 -6
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +21 -1
- package/dist/integrations/pi/components/shell-shared-facade.js +19 -3
- package/dist/integrations/pi/components/skills-dialog.js +3 -3
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +2 -3
- package/dist/integrations/pi/components/theme.d.ts +9 -0
- package/dist/integrations/pi/components/theme.js +30 -0
- package/dist/integrations/pi/components/tool-result-adapter.js +6 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +1 -1
- package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
- package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.js +6 -6
- package/dist/integrations/pi/components/upstream/components/extension-input.js +4 -4
- package/dist/integrations/pi/components/upstream/components/extension-selector.js +4 -4
- package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +5 -5
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +8 -5
- package/dist/integrations/pi/components/upstream/components/pi-logo.js +1 -1
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.js +3 -3
- package/dist/integrations/pi/components/upstream/components/session-footer.js +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector.js +9 -9
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +3 -2
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +6 -3
- package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/status-indicator.js +1 -1
- package/dist/integrations/pi/components/upstream/components/themed-text.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/themed-text.js +1 -1
- package/dist/integrations/pi/components/upstream/components/thinking-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/thinking-selector.js +2 -2
- package/dist/integrations/pi/components/upstream/components/tool-execution.d.ts +4 -0
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +11 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +2 -2
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +27 -18
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +4 -4
- package/dist/integrations/pi/components/upstream/history/editor-core.js +11 -7
- package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/kill-ring.js +1 -1
- package/dist/integrations/pi/components/upstream/history/printable-key.js +1 -1
- package/dist/integrations/pi/components/upstream/history/text-helpers.js +1 -1
- package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/undo-stack.js +1 -1
- package/dist/integrations/pi/components/upstream/history/word-navigation.js +1 -1
- package/dist/integrations/pi/components/upstream/model-search.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/program-status-reporter.d.ts +31 -0
- package/dist/integrations/pi/components/upstream/program-status-reporter.js +89 -0
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme.d.ts +22 -1
- package/dist/integrations/pi/components/upstream/theme/theme.js +225 -10
- package/dist/integrations/pi/engine/adapter.d.ts +44 -24
- package/dist/integrations/pi/engine/adapter.js +130 -22
- package/dist/integrations/pi/engine/command-dispatch.d.ts +2 -5
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -11
- package/dist/integrations/pi/engine/host-ports.d.ts +20 -0
- package/dist/integrations/pi/engine/host-ports.js +13 -0
- package/dist/integrations/pi/engine/host.d.ts +70 -0
- package/dist/integrations/pi/engine/host.js +147 -0
- package/dist/integrations/pi/engine/index.d.ts +8 -4
- package/dist/integrations/pi/engine/index.js +3 -1
- package/dist/integrations/pi/engine/pi-settings-metadata.json +1 -1
- package/dist/integrations/pi/engine/resource-catalog.d.ts +4 -23
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/runtime-integration.d.ts +8 -2
- package/dist/integrations/pi/engine/runtime-integration.js +12 -7
- package/dist/integrations/pi/engine/session-events.js +10 -2
- package/dist/integrations/pi/engine/session-integration.d.ts +3 -8
- package/dist/integrations/pi/engine/session-integration.js +0 -49
- package/dist/integrations/pi/engine/session-runtime.d.ts +18 -3
- package/dist/integrations/pi/engine/session-runtime.js +18 -7
- package/dist/integrations/pi/engine/settings-bridge.d.ts +2 -2
- package/dist/integrations/pi/engine/settings-bridge.js +0 -2
- package/dist/integrations/pi/engine/settings-port.d.ts +2 -0
- package/dist/integrations/pi/engine/settings-port.js +3 -5
- package/dist/integrations/pi/engine/transcript-projection.js +2 -1
- package/dist/integrations/pi/engine/workflows.d.ts +33 -260
- package/dist/integrations/pi/engine/workflows.js +6 -28
- package/dist/integrations/pi/session-presenters/index.d.ts +2 -0
- package/dist/integrations/pi/session-presenters/index.js +1 -0
- package/dist/integrations/pi/session-presenters/presenters.d.ts +16 -0
- package/dist/integrations/pi/session-presenters/presenters.js +341 -0
- package/dist/integrations/pi/startup-public.js +306 -290
- package/dist/integrations/pi/startup-public.manifest.json +289 -265
- package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -1
- package/dist/integrations/pi/tui-runtime/adapter.js +7 -2
- package/dist/integrations/pi/tui-runtime/contracts.d.ts +3 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +8 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +67 -2
- package/dist/integrations/pi/tui-runtime/index.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/index.js +1 -1
- package/dist/native/darwin-arm64/manifest.json +1 -1
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/product-identity.d.ts +2 -2
- package/dist/product-identity.js +2 -2
- package/dist/product-identity.json +3 -1
- package/dist/runtime-payload-inventory.json +3092 -2878
- package/dist/ui/components/prompt-input.d.ts +2 -0
- package/dist/ui/components/prompt-input.js +5 -1
- package/dist/ui/components/text-selection.d.ts +1 -1
- package/dist/ui/components/text-selection.js +3 -1
- package/dist/ui/components/theme.d.ts +2 -0
- package/dist/ui/components/transcript-viewport.d.ts +6 -4
- package/dist/ui/components/transcript-viewport.js +94 -16
- package/dist/ui/components/value-menu.d.ts +2 -0
- package/dist/ui/components/value-menu.js +13 -8
- package/dist/ui/settings/declarations.d.ts +38 -14
- package/dist/ui/settings/declarations.js +35 -11
- package/dist/ui/settings/migrations.js +23 -0
- package/docs/architecture/boundaries.md +9 -1
- package/docs/architecture/project-structure.md +7 -5
- package/docs/architecture/prompt-suggestions.md +14 -10
- package/docs/local-worktree-cleanup.md +11 -5
- package/docs/openspec-archive-automation.md +6 -5
- package/package.json +3 -3
- package/dist/contracts/agent-engine/model.d.ts +0 -78
- package/dist/contracts/agent-engine/model.js +0 -1
- package/dist/contracts/agent-engine/ports.d.ts +0 -18
- package/dist/contracts/agent-engine/serialization.d.ts +0 -7
- package/dist/contracts/agent-engine/serialization.js +0 -58
- package/dist/contracts/agent-engine/validation.d.ts +0 -5
- package/dist/contracts/agent-engine/validation.js +0 -128
- package/dist/integrations/pi/components/upstream/theme/system-theme.d.ts +0 -61
- package/dist/integrations/pi/components/upstream/theme/system-theme.js +0 -709
- /package/dist/contracts/{agent-engine/ports.js → owned-ui/session-backend.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SessionInfo } from "../startup-public.js";
|
|
2
|
+
import { type OwnedUiAuthenticationProviderOption, type OwnedUiAuthenticationProviderStatus, type OwnedUiBashWorkflowResult, type OwnedUiCacheWarmingPresentation, type OwnedUiHiddenWorkflowCommandName, type OwnedUiModelsCommandName, type OwnedUiModelsContext, type OwnedUiModelsRefreshResult, type OwnedUiProjectTrustContext, type OwnedUiProjectTrustUpdate, type OwnedUiScopedModelDescriptor, type OwnedUiScopedModelsContext, type OwnedUiScopedModelsRefreshResult, type OwnedUiSessionInfoPresentation, type OwnedUiSessionProductMode, type OwnedUiSessionResumeMetadata, type OwnedUiSessionSettingsSnapshot, type OwnedUiWorkflowAutocompleteCommand, type OwnedUiWorkflowCommandName, type OwnedUiWorkflowInteractionHost, type OwnedUiWorkflowInteractionRequest, type OwnedUiWorkflowLoginNotification, type OwnedUiWorkflowLoginStart, type OwnedUiWorkflowMessage, type OwnedUiWorkflowMessageKind, type OwnedUiWorkflowOption, type OwnedUiWorkflowOutcome, type OwnedUiWorkflowPresentation, type OwnedUiWorkflowRequest, type OwnedUiWorkflowResult, type OwnedUiWorkflowRoute } from "../../../contracts/owned-ui/index.js";
|
|
2
3
|
export declare const PINNED_PI_WORKFLOW_COMMAND_NAMES: readonly ["settings", "model", "tree", "thinking", "scoped-models", "export", "import", "share", "copy", "name", "session", "changelog", "hotkeys", "fork", "clone", "trust", "login", "logout", "new", "compact", "resume", "reload", "quit"];
|
|
3
4
|
export declare const PINNED_PI_HIDDEN_COMMAND_NAMES: readonly ["debug", "arminsayshi", "dementedelves"];
|
|
4
5
|
/**
|
|
@@ -8,218 +9,49 @@ export declare const PINNED_PI_HIDDEN_COMMAND_NAMES: readonly ["debug", "arminsa
|
|
|
8
9
|
* comparison exact: a command upstream adds still fails the gate until it is classified.
|
|
9
10
|
*/
|
|
10
11
|
export declare const PINNED_PI_DECLINED_COMMAND_NAMES: readonly ["bug"];
|
|
11
|
-
export type PiWorkflowCommandName =
|
|
12
|
-
export type PiHiddenWorkflowCommandName =
|
|
13
|
-
/** The one bare-A1 model command; it replaces the pinned `model` and `scoped-models` routes there. */
|
|
12
|
+
export type PiWorkflowCommandName = OwnedUiWorkflowCommandName;
|
|
13
|
+
export type PiHiddenWorkflowCommandName = OwnedUiHiddenWorkflowCommandName;
|
|
14
14
|
export declare const OWNED_MODELS_COMMAND_NAME: "models";
|
|
15
|
-
export type OwnedModelsCommandName =
|
|
15
|
+
export type OwnedModelsCommandName = OwnedUiModelsCommandName;
|
|
16
16
|
export type OwnedWorkflowCommandName = Exclude<PiWorkflowCommandName, "model" | "scoped-models"> | OwnedModelsCommandName;
|
|
17
17
|
/** Bare A1's advertised catalog: `models` replaces the pinned pair and is followed by `thinking`. */
|
|
18
18
|
export declare const OWNED_WORKFLOW_COMMAND_NAMES: readonly OwnedWorkflowCommandName[];
|
|
19
|
-
export type PiProductMode =
|
|
19
|
+
export type PiProductMode = OwnedUiSessionProductMode;
|
|
20
20
|
/** The advertised command catalog for a product mode; hidden routes are shared by both. */
|
|
21
21
|
export declare function workflowCommandNames(productMode: PiProductMode): readonly (PiWorkflowCommandName | OwnedModelsCommandName)[];
|
|
22
|
-
export type PiWorkflowRoute =
|
|
22
|
+
export type PiWorkflowRoute = OwnedUiWorkflowRoute;
|
|
23
23
|
export declare const PINNED_PI_SETTINGS_CALLBACKS: readonly ["onAutoCompactChange", "onShowImagesChange", "onImageWidthCellsChange", "onAutoResizeImagesChange", "onBlockImagesChange", "onEnableSkillCommandsChange", "onSteeringModeChange", "onFollowUpModeChange", "onTransportChange", "onHttpIdleTimeoutMsChange", "onCacheWarmingModeChange", "onModelThinkingLevelChange", "onModelThinkingLevelRemove", "onThemeChange", "onThemePreview", "onHideThinkingBlockChange", "onMermaidRenderingModeChange", "onShowCacheMissNoticesChange", "onCollapseChangelogChange", "onEnableInstallTelemetryChange", "onQuietStartupChange", "onDefaultProjectTrustChange", "onDoubleEscapeActionChange", "onTreeFilterModeChange", "onShowHardwareCursorChange", "onEditorPaddingXChange", "onOutputPadChange", "onAutocompleteMaxVisibleChange", "onClearOnShrinkChange", "onShowTerminalProgressChange", "onTuiModeChange", "onFullscreenExitOutputChange", "onFullscreenScrollbarChange", "onFullscreenCopyOnSelectChange", "onFullscreenWheelScrollLinesChange", "onWarningsChange", "onCancel"];
|
|
24
24
|
export type PiPinnedSettingsCallback = typeof PINNED_PI_SETTINGS_CALLBACKS[number];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
readonly showImages: boolean;
|
|
28
|
-
readonly imageWidthCells: number;
|
|
29
|
-
readonly autoResizeImages: boolean;
|
|
30
|
-
readonly blockImages: boolean;
|
|
31
|
-
readonly enableSkillCommands: boolean;
|
|
32
|
-
readonly steeringMode: "all" | "one-at-a-time";
|
|
33
|
-
readonly followUpMode: "all" | "one-at-a-time";
|
|
34
|
-
readonly transport: "sse" | "websocket" | "websocket-cached" | "auto";
|
|
35
|
-
readonly httpIdleTimeoutMs: number;
|
|
36
|
-
readonly cacheWarmingMode: "off" | "streaming" | "idle";
|
|
37
|
-
readonly thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
38
|
-
readonly availableThinkingLevels: readonly ("off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[];
|
|
39
|
-
/** The stored global default the selector offers to restore; the session's level may differ. */
|
|
40
|
-
readonly defaultThinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
41
|
-
/** Per-model thinking overrides keyed `provider/modelId`. */
|
|
42
|
-
readonly modelThinkingLevels: Readonly<Record<string, string>>;
|
|
43
|
-
/** `provider/modelId` of the persisted default model, or the engine's "not set" wording. */
|
|
44
|
-
readonly defaultModel: string;
|
|
25
|
+
/** The neutral settings snapshot plus the model values only the pinned settings selector reads. */
|
|
26
|
+
export interface PiPinnedSettingsSnapshot extends OwnedUiSessionSettingsSnapshot {
|
|
45
27
|
readonly currentModel?: unknown;
|
|
46
28
|
readonly availableDefaultModels: readonly unknown[];
|
|
47
|
-
readonly currentTheme: string;
|
|
48
|
-
readonly terminalTheme: "dark" | "light";
|
|
49
|
-
readonly availableThemes: readonly string[];
|
|
50
|
-
readonly hideThinkingBlock: boolean;
|
|
51
|
-
readonly mermaidRenderingMode: "off" | "final" | "streaming";
|
|
52
|
-
readonly showCacheMissNotices: boolean;
|
|
53
|
-
readonly collapseChangelog: boolean;
|
|
54
|
-
readonly enableInstallTelemetry: boolean;
|
|
55
|
-
readonly doubleEscapeAction: "fork" | "tree" | "none";
|
|
56
|
-
readonly treeFilterMode: "default" | "no-tools" | "user-only" | "labeled-only" | "all";
|
|
57
|
-
readonly showHardwareCursor: boolean;
|
|
58
|
-
readonly editorPaddingX: number;
|
|
59
|
-
readonly outputPad: 0 | 1;
|
|
60
|
-
readonly autocompleteMaxVisible: number;
|
|
61
|
-
readonly quietStartup: boolean | "header";
|
|
62
|
-
readonly defaultProjectTrust: "ask" | "always" | "never";
|
|
63
|
-
readonly clearOnShrink: boolean;
|
|
64
|
-
readonly showTerminalProgress: boolean;
|
|
65
|
-
readonly tuiMode: "regular" | "fullscreen";
|
|
66
|
-
readonly fullscreenExitOutput: "transcript" | "resume-hint";
|
|
67
|
-
readonly fullscreenScrollbar: "hidden" | "auto" | "always";
|
|
68
|
-
readonly fullscreenCopyOnSelect: boolean;
|
|
69
|
-
readonly fullscreenWheelScrollLines: number | "auto";
|
|
70
|
-
readonly warnings: {
|
|
71
|
-
readonly anthropicExtraUsage?: boolean;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export interface PiWorkflowOption {
|
|
75
|
-
readonly id: string;
|
|
76
|
-
readonly label: string;
|
|
77
|
-
readonly description?: string;
|
|
78
|
-
}
|
|
79
|
-
export interface PiAuthenticationProviderStatus {
|
|
80
|
-
readonly type: "oauth" | "api_key";
|
|
81
|
-
readonly source?: string;
|
|
82
|
-
}
|
|
83
|
-
export interface PiAuthenticationProviderOption extends PiWorkflowOption {
|
|
84
|
-
readonly providerId: string;
|
|
85
|
-
readonly authType: "oauth" | "api_key";
|
|
86
|
-
readonly status?: PiAuthenticationProviderStatus;
|
|
87
|
-
}
|
|
88
|
-
export interface PiWorkflowRequest {
|
|
89
|
-
readonly command: PiWorkflowRoute;
|
|
90
|
-
readonly argument: string;
|
|
91
|
-
readonly selection?: string;
|
|
92
|
-
/** For the model route: also persist the selection as the default model. The bare `models` route always persists. */
|
|
93
|
-
readonly persist?: boolean;
|
|
94
|
-
readonly confirmed?: boolean;
|
|
95
|
-
/** Recovery cwd selected after an import/resume source cwd is unavailable. */
|
|
96
|
-
readonly cwdOverride?: string;
|
|
97
|
-
/** Cancellation for an owned operation surface such as `/share`. */
|
|
98
|
-
readonly signal?: AbortSignal;
|
|
99
|
-
readonly treeSummary?: {
|
|
100
|
-
readonly summarize: boolean;
|
|
101
|
-
readonly customInstructions?: string;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
export type PiWorkflowOutcome = "completed" | "cancelled" | "failed" | "requires-selection" | "requires-confirmation";
|
|
105
|
-
export interface PiSessionInfoPresentation {
|
|
106
|
-
readonly kind: "session-info";
|
|
107
|
-
readonly sessionName?: string;
|
|
108
|
-
readonly stats: {
|
|
109
|
-
readonly sessionFile?: string;
|
|
110
|
-
readonly sessionId: string;
|
|
111
|
-
readonly userMessages: number;
|
|
112
|
-
readonly assistantMessages: number;
|
|
113
|
-
readonly toolCalls: number;
|
|
114
|
-
readonly toolResults: number;
|
|
115
|
-
readonly totalMessages: number;
|
|
116
|
-
readonly tokens: {
|
|
117
|
-
readonly input: number;
|
|
118
|
-
readonly output: number;
|
|
119
|
-
readonly cacheRead: number;
|
|
120
|
-
readonly cacheWrite: number;
|
|
121
|
-
readonly total: number;
|
|
122
|
-
};
|
|
123
|
-
readonly cost: number;
|
|
124
|
-
};
|
|
125
|
-
readonly cacheWaste: {
|
|
126
|
-
readonly missedTokens: number;
|
|
127
|
-
readonly missedCost: number;
|
|
128
|
-
readonly missCount: number;
|
|
129
|
-
};
|
|
130
|
-
readonly usageBreakdown: readonly {
|
|
131
|
-
readonly key: string;
|
|
132
|
-
readonly cost: number;
|
|
133
|
-
readonly tokens: number;
|
|
134
|
-
}[];
|
|
135
|
-
readonly cacheWarming: PiCacheWarmingPresentation;
|
|
136
|
-
}
|
|
137
|
-
/** The engine's prompt-cache warming mode and, once warming has acted, the decision behind it. */
|
|
138
|
-
export interface PiCacheWarmingPresentation {
|
|
139
|
-
readonly mode: string;
|
|
140
|
-
readonly status?: {
|
|
141
|
-
readonly state: "inactive" | "scheduled" | "refreshing";
|
|
142
|
-
readonly reason?: string;
|
|
143
|
-
readonly nextWarmAt?: number;
|
|
144
|
-
readonly extensionOverride?: boolean;
|
|
145
|
-
readonly decision?: {
|
|
146
|
-
readonly phase: "streaming" | "idle";
|
|
147
|
-
readonly action: string;
|
|
148
|
-
readonly warmCost: number;
|
|
149
|
-
readonly missCost: number;
|
|
150
|
-
readonly continuationProbability: number;
|
|
151
|
-
readonly expectedSavings: number;
|
|
152
|
-
readonly economicsAvailable: boolean;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
export type PiWorkflowPresentation = PiSessionInfoPresentation;
|
|
157
|
-
export type PiWorkflowMessageKind = "status" | "warning" | "error" | "accent" | "silent";
|
|
158
|
-
export interface PiWorkflowMessage {
|
|
159
|
-
readonly kind: Exclude<PiWorkflowMessageKind, "silent">;
|
|
160
|
-
readonly message: string;
|
|
161
|
-
}
|
|
162
|
-
export interface PiWorkflowResult {
|
|
163
|
-
readonly command: PiWorkflowRoute;
|
|
164
|
-
readonly outcome: PiWorkflowOutcome;
|
|
165
|
-
readonly message: string;
|
|
166
|
-
/** Explicit presentation semantics; never inferred from message prefixes. */
|
|
167
|
-
readonly messageKind?: PiWorkflowMessageKind;
|
|
168
|
-
/** Ordered messages for truthful partial-success outcomes. */
|
|
169
|
-
readonly messages?: readonly PiWorkflowMessage[];
|
|
170
|
-
readonly detail?: string;
|
|
171
|
-
readonly selectorTitle?: string;
|
|
172
|
-
readonly options?: readonly PiWorkflowOption[];
|
|
173
|
-
readonly presentation?: PiWorkflowPresentation;
|
|
174
|
-
}
|
|
175
|
-
export interface PiWorkflowAutocompleteCommand {
|
|
176
|
-
readonly name: string;
|
|
177
|
-
readonly description?: string;
|
|
178
|
-
readonly argumentHint?: string;
|
|
179
|
-
readonly argumentOptions?: readonly PiWorkflowOption[];
|
|
180
|
-
readonly source: "builtin" | "prompt" | "skill" | "extension";
|
|
181
|
-
}
|
|
182
|
-
export interface PiWorkflowInteractionRequest {
|
|
183
|
-
readonly type: "text" | "secret" | "manual-code" | "select";
|
|
184
|
-
readonly message: string;
|
|
185
|
-
readonly placeholder?: string;
|
|
186
|
-
readonly options?: readonly {
|
|
187
|
-
readonly id: string;
|
|
188
|
-
readonly label: string;
|
|
189
|
-
}[];
|
|
190
|
-
}
|
|
191
|
-
export interface PiWorkflowLoginStart {
|
|
192
|
-
readonly providerId: string;
|
|
193
|
-
readonly providerName: string;
|
|
194
|
-
readonly authType: "oauth" | "api_key";
|
|
195
|
-
}
|
|
196
|
-
export type PiWorkflowLoginNotification = {
|
|
197
|
-
readonly type: "auth_url";
|
|
198
|
-
readonly url: string;
|
|
199
|
-
readonly instructions?: string;
|
|
200
|
-
} | {
|
|
201
|
-
readonly type: "device_code";
|
|
202
|
-
readonly verificationUri: string;
|
|
203
|
-
readonly userCode: string;
|
|
204
|
-
} | {
|
|
205
|
-
readonly type: "info";
|
|
206
|
-
readonly message: string;
|
|
207
|
-
readonly links?: readonly {
|
|
208
|
-
readonly label?: string;
|
|
209
|
-
readonly url: string;
|
|
210
|
-
}[];
|
|
211
|
-
} | {
|
|
212
|
-
readonly type: "waiting" | "progress";
|
|
213
|
-
readonly message: string;
|
|
214
|
-
};
|
|
215
|
-
export interface PiWorkflowInteractionHost {
|
|
216
|
-
startLogin?(request: PiWorkflowLoginStart): void;
|
|
217
|
-
prompt(request: PiWorkflowInteractionRequest): Promise<string | null>;
|
|
218
|
-
notify(event: PiWorkflowLoginNotification): void;
|
|
219
|
-
/** Deliver a post-login status or warning after the authentication dialog closes. */
|
|
220
|
-
publish?(message: PiWorkflowMessage): void;
|
|
221
|
-
finishLogin?(): void;
|
|
222
29
|
}
|
|
30
|
+
export type PiWorkflowOption = OwnedUiWorkflowOption;
|
|
31
|
+
export type PiAuthenticationProviderStatus = OwnedUiAuthenticationProviderStatus;
|
|
32
|
+
export type PiAuthenticationProviderOption = OwnedUiAuthenticationProviderOption;
|
|
33
|
+
export type PiWorkflowRequest = OwnedUiWorkflowRequest;
|
|
34
|
+
export type PiWorkflowOutcome = OwnedUiWorkflowOutcome;
|
|
35
|
+
export type PiSessionInfoPresentation = OwnedUiSessionInfoPresentation;
|
|
36
|
+
export type PiCacheWarmingPresentation = OwnedUiCacheWarmingPresentation;
|
|
37
|
+
export type PiWorkflowPresentation = OwnedUiWorkflowPresentation;
|
|
38
|
+
export type PiWorkflowMessageKind = OwnedUiWorkflowMessageKind;
|
|
39
|
+
export type PiWorkflowMessage = OwnedUiWorkflowMessage;
|
|
40
|
+
export type PiWorkflowResult = OwnedUiWorkflowResult;
|
|
41
|
+
export type PiWorkflowAutocompleteCommand = OwnedUiWorkflowAutocompleteCommand;
|
|
42
|
+
export type PiWorkflowInteractionRequest = OwnedUiWorkflowInteractionRequest;
|
|
43
|
+
export type PiWorkflowLoginStart = OwnedUiWorkflowLoginStart;
|
|
44
|
+
export type PiWorkflowLoginNotification = OwnedUiWorkflowLoginNotification;
|
|
45
|
+
export type PiWorkflowInteractionHost = OwnedUiWorkflowInteractionHost;
|
|
46
|
+
export type PiBashWorkflowResult = OwnedUiBashWorkflowResult;
|
|
47
|
+
export type PiScopedModelDescriptor = OwnedUiScopedModelDescriptor;
|
|
48
|
+
export type PiScopedModelsContext = OwnedUiScopedModelsContext;
|
|
49
|
+
export type PiProjectTrustUpdate = OwnedUiProjectTrustUpdate;
|
|
50
|
+
export type PiProjectTrustContext = OwnedUiProjectTrustContext;
|
|
51
|
+
export type PiSessionResumeMetadata = OwnedUiSessionResumeMetadata;
|
|
52
|
+
export type PiScopedModelsRefreshResult = OwnedUiScopedModelsRefreshResult;
|
|
53
|
+
export type PiModelsContext = OwnedUiModelsContext;
|
|
54
|
+
export type PiModelsRefreshResult = OwnedUiModelsRefreshResult;
|
|
223
55
|
export interface PiWorkflowHost {
|
|
224
56
|
copyText(text: string): Promise<void>;
|
|
225
57
|
runCommand(command: string, arguments_: readonly string[], options?: {
|
|
@@ -230,41 +62,6 @@ export interface PiWorkflowHost {
|
|
|
230
62
|
}>;
|
|
231
63
|
readChangelog(sinceVersion?: string): Promise<string>;
|
|
232
64
|
}
|
|
233
|
-
export interface PiBashWorkflowResult {
|
|
234
|
-
readonly command: string;
|
|
235
|
-
readonly output: string;
|
|
236
|
-
readonly exitCode: number | undefined;
|
|
237
|
-
readonly cancelled: boolean;
|
|
238
|
-
readonly truncated: boolean;
|
|
239
|
-
readonly excludeFromContext: boolean;
|
|
240
|
-
}
|
|
241
|
-
export interface PiScopedModelDescriptor {
|
|
242
|
-
readonly provider: string;
|
|
243
|
-
readonly id: string;
|
|
244
|
-
readonly name: string;
|
|
245
|
-
}
|
|
246
|
-
export interface PiScopedModelsContext {
|
|
247
|
-
readonly models: readonly PiScopedModelDescriptor[];
|
|
248
|
-
readonly enabledModelIds: readonly string[] | null;
|
|
249
|
-
}
|
|
250
|
-
export interface PiProjectTrustUpdate {
|
|
251
|
-
readonly path: string;
|
|
252
|
-
readonly decision: boolean | null;
|
|
253
|
-
}
|
|
254
|
-
export interface PiProjectTrustContext {
|
|
255
|
-
readonly cwd: string;
|
|
256
|
-
readonly savedDecision: {
|
|
257
|
-
readonly path: string;
|
|
258
|
-
readonly decision: boolean;
|
|
259
|
-
} | null;
|
|
260
|
-
readonly projectTrusted: boolean;
|
|
261
|
-
readonly trustOptions: readonly {
|
|
262
|
-
readonly label: string;
|
|
263
|
-
readonly trusted: boolean;
|
|
264
|
-
readonly updates: readonly PiProjectTrustUpdate[];
|
|
265
|
-
readonly savedPath?: string;
|
|
266
|
-
}[];
|
|
267
|
-
}
|
|
268
65
|
export interface PiTreeSelectorContext {
|
|
269
66
|
readonly tree: readonly unknown[];
|
|
270
67
|
readonly currentLeafId: string | null;
|
|
@@ -272,11 +69,6 @@ export interface PiTreeSelectorContext {
|
|
|
272
69
|
readonly skipSummaryPrompt: boolean;
|
|
273
70
|
readonly appendLabelChange: (entryId: string, label: string | undefined) => void;
|
|
274
71
|
}
|
|
275
|
-
export interface PiSessionResumeMetadata {
|
|
276
|
-
readonly sessionId: string;
|
|
277
|
-
readonly sessionDir: string;
|
|
278
|
-
readonly usesDefaultSessionDir: boolean;
|
|
279
|
-
}
|
|
280
72
|
/**
|
|
281
73
|
* Progress a session listing reports. `partialSessions` carries what the pinned manager has
|
|
282
74
|
* loaded so far, so the selector can show results before the listing finishes.
|
|
@@ -288,22 +80,3 @@ export interface PiSessionSelectorContext {
|
|
|
288
80
|
readonly loadAllSessions: (onProgress?: PiSessionListProgress) => Promise<SessionInfo[]>;
|
|
289
81
|
readonly renameSession: (sessionFilePath: string, nextName: string | undefined) => Promise<void>;
|
|
290
82
|
}
|
|
291
|
-
export interface PiScopedModelsRefreshResult extends PiScopedModelsContext {
|
|
292
|
-
readonly status: string;
|
|
293
|
-
readonly statusKind: "success" | "warning";
|
|
294
|
-
}
|
|
295
|
-
/** What the bare-A1 Models dialog reads: the authenticated catalog and the explicit session and persisted scopes, kept apart. */
|
|
296
|
-
export interface PiModelsContext {
|
|
297
|
-
readonly models: readonly PiScopedModelDescriptor[];
|
|
298
|
-
/** `provider/id` of the active model, or null before one is set. */
|
|
299
|
-
readonly activeModelId: string | null;
|
|
300
|
-
/** Ordered `provider/id` references the session cycles; empty is the all-model fallback, not an explicit full scope. */
|
|
301
|
-
readonly sessionScopeIds: readonly string[];
|
|
302
|
-
/** The persisted `enabledModels` patterns resolved against the catalog, in order; unmatched patterns stay verbatim. */
|
|
303
|
-
readonly persistedScopeIds: readonly string[];
|
|
304
|
-
}
|
|
305
|
-
export interface PiModelsRefreshResult {
|
|
306
|
-
readonly models: readonly PiScopedModelDescriptor[];
|
|
307
|
-
readonly status: string;
|
|
308
|
-
readonly statusKind: "success" | "warning";
|
|
309
|
-
}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"scoped-models",
|
|
7
|
-
"export",
|
|
8
|
-
"import",
|
|
9
|
-
"share",
|
|
10
|
-
"copy",
|
|
11
|
-
"name",
|
|
12
|
-
"session",
|
|
13
|
-
"changelog",
|
|
14
|
-
"hotkeys",
|
|
15
|
-
"fork",
|
|
16
|
-
"clone",
|
|
17
|
-
"trust",
|
|
18
|
-
"login",
|
|
19
|
-
"logout",
|
|
20
|
-
"new",
|
|
21
|
-
"compact",
|
|
22
|
-
"resume",
|
|
23
|
-
"reload",
|
|
24
|
-
"quit",
|
|
25
|
-
];
|
|
26
|
-
export const PINNED_PI_HIDDEN_COMMAND_NAMES = ["debug", "arminsayshi", "dementedelves"];
|
|
1
|
+
import { OWNED_UI_HIDDEN_COMMAND_NAMES, OWNED_UI_MODELS_COMMAND_NAME, OWNED_UI_WORKFLOW_COMMAND_NAMES, } from "../../../contracts/owned-ui/index.js";
|
|
2
|
+
// Compatibility: one-cycle aliases for the payloads that moved to the owned-UI contract, so engine
|
|
3
|
+
// internals keep their names until extract-pi-session-presenters retires them.
|
|
4
|
+
export const PINNED_PI_WORKFLOW_COMMAND_NAMES = OWNED_UI_WORKFLOW_COMMAND_NAMES;
|
|
5
|
+
export const PINNED_PI_HIDDEN_COMMAND_NAMES = OWNED_UI_HIDDEN_COMMAND_NAMES;
|
|
27
6
|
/**
|
|
28
7
|
* Commands the pinned engine advertises that A1 deliberately does not present. `/bug` collects,
|
|
29
8
|
* uploads, and archives a report through modules the package keeps off its public surface, so A1
|
|
@@ -31,8 +10,7 @@ export const PINNED_PI_HIDDEN_COMMAND_NAMES = ["debug", "arminsayshi", "demented
|
|
|
31
10
|
* comparison exact: a command upstream adds still fails the gate until it is classified.
|
|
32
11
|
*/
|
|
33
12
|
export const PINNED_PI_DECLINED_COMMAND_NAMES = ["bug"];
|
|
34
|
-
|
|
35
|
-
export const OWNED_MODELS_COMMAND_NAME = "models";
|
|
13
|
+
export const OWNED_MODELS_COMMAND_NAME = OWNED_UI_MODELS_COMMAND_NAME;
|
|
36
14
|
/** Bare A1's advertised catalog: `models` replaces the pinned pair and is followed by `thinking`. */
|
|
37
15
|
export const OWNED_WORKFLOW_COMMAND_NAMES = Object.freeze(PINNED_PI_WORKFLOW_COMMAND_NAMES.flatMap((name) => name === "model"
|
|
38
16
|
? [OWNED_MODELS_COMMAND_NAME, "thinking"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createPiSessionPresenters } from "./presenters.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OwnedUiSessionBackend, OwnedUiSessionPresenters } from "../../../contracts/owned-ui/index.js";
|
|
2
|
+
import type { PiSessionPresentationSource } from "../engine/adapter.js";
|
|
3
|
+
import type { PiShellLazySelectorLoader } from "../components/lazy-selectors.js";
|
|
4
|
+
/** The session backend plus the Pi objects its selectors are built from; the Pi engine adapter is one. */
|
|
5
|
+
export interface PiSessionPresenterBackend extends OwnedUiSessionBackend {
|
|
6
|
+
presentationSource(): PiSessionPresentationSource;
|
|
7
|
+
}
|
|
8
|
+
export interface PiSessionPresentersOptions {
|
|
9
|
+
/** Test seam for pending and failed optional selector-module preparation. */
|
|
10
|
+
readonly lazySelectors?: PiShellLazySelectorLoader;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Builds the selectors and transcript renderers whose inputs are Pi engine objects. This owner is the one place
|
|
14
|
+
* that sees both the engine adapter and the Pi components, so the shell only ever holds the neutral port.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createPiSessionPresenters(adapter: PiSessionPresenterBackend, options?: PiSessionPresentersOptions): OwnedUiSessionPresenters;
|