@timurproko/a1 0.2.7-dev.806 → 0.2.7-dev.809

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/app/session-shell/dialog-coordinator.d.ts +42 -0
  2. package/dist/app/session-shell/dialog-coordinator.js +133 -0
  3. package/dist/app/session-shell/dock-chrome.d.ts +34 -0
  4. package/dist/app/session-shell/dock-chrome.js +109 -0
  5. package/dist/app/session-shell/exit-notice.d.ts +1 -1
  6. package/dist/app/session-shell/exit-notice.js +1 -1
  7. package/dist/app/session-shell/extension-surface.d.ts +30 -0
  8. package/dist/app/session-shell/extension-surface.js +105 -0
  9. package/dist/app/session-shell/input-surface-switch.d.ts +36 -0
  10. package/dist/app/session-shell/input-surface-switch.js +85 -0
  11. package/dist/app/session-shell/login-interaction.d.ts +27 -0
  12. package/dist/app/session-shell/login-interaction.js +91 -0
  13. package/dist/app/session-shell/prompt-submission.d.ts +48 -0
  14. package/dist/app/session-shell/prompt-submission.js +276 -0
  15. package/dist/app/session-shell/resident-tab-coordinator.d.ts +41 -0
  16. package/dist/app/session-shell/resident-tab-coordinator.js +120 -0
  17. package/dist/app/session-shell/session-concern.d.ts +22 -0
  18. package/dist/app/session-shell/session-concern.js +29 -0
  19. package/dist/app/session-shell/session-lifecycle.d.ts +29 -0
  20. package/dist/app/session-shell/session-lifecycle.js +49 -0
  21. package/dist/app/session-shell/session-shell-root.d.ts +1 -1
  22. package/dist/app/session-shell/session-shell-root.js +182 -931
  23. package/dist/app/session-shell/session-shell.d.ts +2 -8
  24. package/dist/app/session-shell/session-shell.js +209 -897
  25. package/dist/app/session-shell/settings-bindings.d.ts +17 -0
  26. package/dist/app/session-shell/settings-bindings.js +91 -0
  27. package/dist/app/session-shell/shell-editor-factory.d.ts +27 -0
  28. package/dist/app/session-shell/shell-editor-factory.js +102 -0
  29. package/dist/app/session-shell/shell-host.d.ts +6 -0
  30. package/dist/app/session-shell/shell-host.js +26 -4
  31. package/dist/app/session-shell/shell-layout.d.ts +64 -0
  32. package/dist/app/session-shell/shell-layout.js +18 -0
  33. package/dist/app/session-shell/suggestion-surface.d.ts +25 -0
  34. package/dist/app/session-shell/suggestion-surface.js +63 -0
  35. package/dist/app/session-shell/transcript-document.d.ts +78 -0
  36. package/dist/app/session-shell/transcript-document.js +365 -0
  37. package/dist/app/session-shell/viewport-layout.d.ts +31 -0
  38. package/dist/app/session-shell/viewport-layout.js +160 -0
  39. package/dist/app/session-shell/workflow-output.d.ts +33 -0
  40. package/dist/app/session-shell/workflow-output.js +174 -0
  41. package/dist/app/session-shell/workflow-router.d.ts +25 -0
  42. package/dist/app/session-shell/workflow-router.js +39 -0
  43. package/dist/composition/owned-ui.d.ts +6 -25
  44. package/dist/composition/owned-ui.js +48 -242
  45. package/dist/composition/resident-tab-bridge.d.ts +16 -0
  46. package/dist/composition/resident-tab-bridge.js +159 -0
  47. package/dist/composition/session-backend.d.ts +19 -0
  48. package/dist/composition/session-backend.js +1 -0
  49. package/dist/composition/session-runtime-registry.d.ts +20 -0
  50. package/dist/composition/session-runtime-registry.js +85 -0
  51. package/dist/composition/settings-route-host.d.ts +6 -1
  52. package/dist/composition/settings-route-host.js +7 -6
  53. package/dist/composition/startup-route.d.ts +32 -0
  54. package/dist/composition/startup-route.js +72 -0
  55. package/dist/features/owned-ui/settings-app.d.ts +4 -1
  56. package/dist/features/owned-ui/settings-app.js +9 -3
  57. package/dist/features/resident-tab/shortcut-declarations.js +1 -1
  58. package/dist/features/resident-tab/status-deriver.d.ts +4 -3
  59. package/dist/features/resident-tab/status-deriver.js +2 -5
  60. package/dist/foundation/release/bootstrap.js +2 -2
  61. package/dist/foundation/resident-tabs/bridge-client.d.ts +1 -1
  62. package/dist/foundation/resident-tabs/bridge-client.js +2 -1
  63. package/dist/foundation/resident-tabs/fixture-control.d.ts +7 -0
  64. package/dist/foundation/resident-tabs/fixture-control.js +35 -0
  65. package/dist/foundation/resident-tabs/progress-observation.d.ts +7 -0
  66. package/dist/foundation/resident-tabs/progress-observation.js +119 -0
  67. package/dist/foundation/terminal-cleanup/index.d.ts +1 -1
  68. package/dist/foundation/terminal-cleanup/index.js +1 -1
  69. package/dist/foundation/terminal-cleanup/terminal-reset.d.ts +5 -0
  70. package/dist/foundation/terminal-cleanup/terminal-reset.js +5 -0
  71. package/dist/integrations/pi/engine/adapter.d.ts +4 -77
  72. package/dist/integrations/pi/engine/adapter.js +85 -393
  73. package/dist/integrations/pi/engine/command-dispatch.d.ts +13 -0
  74. package/dist/integrations/pi/engine/command-dispatch.js +57 -0
  75. package/dist/integrations/pi/engine/host.js +2 -2
  76. package/dist/integrations/pi/engine/ports.d.ts +56 -0
  77. package/dist/integrations/pi/engine/ports.js +89 -0
  78. package/dist/integrations/pi/engine/session-runtime.js +5 -2
  79. package/dist/integrations/pi/engine/view-state.d.ts +42 -0
  80. package/dist/integrations/pi/engine/view-state.js +126 -0
  81. package/dist/integrations/pi/tui-runtime/adapter.d.ts +6 -0
  82. package/dist/integrations/pi/tui-runtime/adapter.js +28 -1
  83. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +11 -0
  84. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +30 -1
  85. package/dist/native/darwin-arm64/manifest.json +1 -1
  86. package/dist/native/darwin-arm64/terminal-host.manifest.json +3 -3
  87. package/dist/native/darwin-arm64/terminal-host.node +0 -0
  88. package/dist/native/darwin-x64/manifest.json +1 -1
  89. package/dist/native/darwin-x64/terminal-host.manifest.json +3 -3
  90. package/dist/native/darwin-x64/terminal-host.node +0 -0
  91. package/dist/native/linux-x64/manifest.json +1 -1
  92. package/dist/native/linux-x64/terminal-host.manifest.json +3 -3
  93. package/dist/native/linux-x64/terminal-host.node +0 -0
  94. package/dist/native/win32-x64/manifest.json +2 -2
  95. package/dist/native/win32-x64/process-guardian.node +0 -0
  96. package/dist/native/win32-x64/terminal-host.manifest.json +3 -3
  97. package/dist/native/win32-x64/terminal-host.node +0 -0
  98. package/dist/product-identity.d.ts +2 -2
  99. package/dist/product-identity.js +2 -2
  100. package/dist/product-identity.json +6 -0
  101. package/dist/ui/settings/manager.d.ts +6 -0
  102. package/dist/ui/settings/manager.js +25 -0
  103. package/docs/architecture/boundaries.md +14 -0
  104. package/docs/architecture/resident-tabs.md +23 -18
  105. package/package.json +2 -1
@@ -1,38 +1,17 @@
1
- import { type AgentSession } from "../startup-public.js";
2
- import { type OwnedUiCommand, type OwnedUiExtensionPort, type OwnedUiExtensionUiPort, type OwnedUiImageAttachment, type OwnedUiPromptSuggestionGeneratorPort, type OwnedUiPromptSuggestionReasoning, type OwnedUiPromptSuggestionRequest, type OwnedUiPromptSuggestionResult, type OwnedUiEvent, type OwnedUiReleaseUpdate, type OwnedUiSessionBackend, type OwnedUiSessionCatalogPort, type OwnedUiSessionIdentityPort, type OwnedUiSessionPort, type OwnedUiSessionSettingsPort, type OwnedUiSessionViewModel, type OwnedUiSnapshot, type OwnedUiWorkflowPort } from "../../../contracts/owned-ui/index.js";
3
- import type { PiAuthenticationProviderOption, PiBashWorkflowResult, PiModelsContext, PiModelsRefreshResult, PiPinnedSettingsCallback, PiPinnedSettingsSnapshot, PiProjectTrustContext, PiProjectTrustUpdate, PiScopedModelsContext, PiScopedModelsRefreshResult, PiSessionResumeMetadata, PiSessionSelectorContext, PiTreeSelectorContext, PiWorkflowAutocompleteCommand, PiWorkflowHost, PiWorkflowInteractionHost, PiWorkflowOption, PiWorkflowRequest, PiWorkflowResult } from "./workflows.js";
1
+ import { type OwnedUiCommand, type OwnedUiExtensionPort, type OwnedUiPromptSuggestionGeneratorPort, type OwnedUiPromptSuggestionReasoning, type OwnedUiPromptSuggestionRequest, type OwnedUiPromptSuggestionResult, type OwnedUiEvent, type OwnedUiSessionBackend, type OwnedUiSessionCatalogPort, type OwnedUiSessionIdentityPort, type OwnedUiSessionPort, type OwnedUiSessionSettingsPort, type OwnedUiSessionViewModel, type OwnedUiSnapshot, type OwnedUiWorkflowPort } from "../../../contracts/owned-ui/index.js";
2
+ import type { PiPinnedSettingsSnapshot, PiWorkflowHost, PiWorkflowInteractionHost, PiWorkflowRequest, PiWorkflowResult } from "./workflows.js";
4
3
  import type { PiSettingsBridge } from "./settings-bridge.js";
5
- import type { PiSettingOwnerHandlers } from "./settings-bridge.js";
6
4
  import type { PiProjectTrustPreflightPrompt } from "./project-trust-preflight.js";
7
5
  import type { PiSessionForkPrompt, PiSessionSelection } from "./session-selection.js";
8
- import type { AgentSettingOwner } from "../../../contracts/agent-engine/index.js";
9
6
  import { type AdapterCommandResult } from "./command-dispatch.js";
10
- import { type OwnedPiVisualExtensionSupport } from "./extension-ui-binding.js";
11
- import { type OwnedPiExtensionResourceSummary, type OwnedPiResourceSummary } from "./resource-catalog.js";
12
7
  import { type PiEnginePackageUpdateProbe, type PiEngineRuntimeFactory, type PiRepositoryContextReader } from "./session-runtime.js";
13
8
  import { type PiEngineHostSessionPorts } from "./host-ports.js";
14
- import { PiWorkflowContexts } from "./workflow-contexts.js";
9
+ import { type PiSessionPresentationSource } from "./ports.js";
15
10
  export type { OwnedPiExtensionResourceSummary, OwnedPiExtensionSourceSummary, OwnedPiResourceSummary } from "./resource-catalog.js";
16
11
  export type { PiEngineRuntimeFactory, PiEngineRuntimeFactoryInput } from "./session-runtime.js";
17
12
  export type { AdapterCommandResult } from "./command-dispatch.js";
18
13
  export type { OwnedPiVisualExtensionSupport } from "./extension-ui-binding.js";
19
- /**
20
- * The Pi objects pinned selectors and transcript renderers are built from. They are not part of the
21
- * session backend contract; only the session presenters owner reads them.
22
- */
23
- export interface PiSessionPresentationSource {
24
- pinnedModelSelectorContext(): ReturnType<PiWorkflowContexts["pinnedModelSelectorContext"]>;
25
- pinnedSessionSelectorContext(): PiSessionSelectorContext;
26
- pinnedTreeSelectorContext(): PiTreeSelectorContext;
27
- pinnedMessageRenderer(customType: string): unknown;
28
- pinnedToolRenderers(toolName: string): unknown;
29
- pinnedShortcutDescriptions(bindings: Parameters<AgentSession["extensionRunner"]["getShortcuts"]>[0]): readonly {
30
- readonly key: string;
31
- readonly description: string;
32
- }[];
33
- pinnedSettingsModels(): Pick<PiPinnedSettingsSnapshot, "currentModel" | "availableDefaultModels">;
34
- applyPinnedSettingValue(callback: PiPinnedSettingsCallback, value: unknown): Promise<PiWorkflowResult>;
35
- }
14
+ export type { PiSessionPresentationSource } from "./ports.js";
36
15
  /** Explicit flush failure when required delivery was interrupted rather than completed. */
37
16
  export declare class EngineDeliveryError extends Error {
38
17
  constructor();
@@ -80,22 +59,6 @@ export declare class PiEngineAdapter implements OwnedUiSessionBackend, OwnedUiPr
80
59
  /** The Pi objects behind pinned selectors and renderers, for the session presenters owner only. */
81
60
  presentationSource(): PiSessionPresentationSource;
82
61
  setWorkflowInteractionHost(interaction: PiWorkflowInteractionHost): void;
83
- get sessionId(): string;
84
- get sessionGeneration(): number;
85
- /** Actual session replacements, excluding delivery-only invalidation of callbacks. */
86
- get sessionBindingGeneration(): number;
87
- get cwd(): string;
88
- get agentDir(): string;
89
- resolveTranscriptImage(assetId: string): OwnedUiImageAttachment | null;
90
- currentSessionFile(): string | null;
91
- currentSessionResumeMetadata(): PiSessionResumeMetadata | null;
92
- get disposed(): boolean;
93
- /**
94
- * Report a newer A1 release found by the startup check. The shell renders the diagnostic as
95
- * pinned Pi's `Update Available` notice; it arrives whenever the check resolves, so a late
96
- * result is appended to the transcript like Pi's own fire-and-forget version check.
97
- */
98
- announceReleaseUpdate(release: OwnedUiReleaseUpdate): void;
99
62
  suggestionReasoningPolicy(): OwnedUiPromptSuggestionReasoning;
100
63
  generate(request: OwnedUiPromptSuggestionRequest): Promise<OwnedUiPromptSuggestionResult>;
101
64
  generateResidentTabName(instruction: string, maxTokens: number, signal: AbortSignal): Promise<string | null>;
@@ -120,51 +83,15 @@ export declare class PiEngineAdapter implements OwnedUiSessionBackend, OwnedUiPr
120
83
  peakBytes: number;
121
84
  };
122
85
  flushEvents(): Promise<void>;
123
- nonVisualResources(): readonly OwnedPiResourceSummary[];
124
- extensionResources(): readonly OwnedPiExtensionResourceSummary[];
125
- workflowAutocompleteCommands(): readonly PiWorkflowAutocompleteCommand[];
126
- visualExtensionSupport(): OwnedPiVisualExtensionSupport;
127
- bindExtensionUi(ui: OwnedUiExtensionUiPort, shutdown?: () => void | Promise<void>): Promise<void>;
128
- unbindExtensionUi(): Promise<void>;
129
- cycleModelWorkflow(direction: "forward" | "backward"): Promise<PiWorkflowResult>;
130
- pinnedProjectTrustContext(): PiProjectTrustContext;
131
- persistProjectTrust(updates: readonly PiProjectTrustUpdate[]): void;
132
- pinnedScopedModelsContext(): PiScopedModelsContext;
133
- updateScopedModels(enabledModelIds: readonly string[] | null): void;
134
- persistScopedModels(enabledModelIds: readonly string[] | null): void;
135
- refreshScopedModels(signal: AbortSignal): Promise<PiScopedModelsRefreshResult>;
136
- modelsContext(): PiModelsContext;
137
- setSessionModelScope(scopeIds: readonly string[]): void;
138
- persistModelScope(scopeIds: readonly string[]): void;
139
- refreshModels(signal: AbortSignal): Promise<PiModelsRefreshResult>;
140
- pinnedLoginOptions(authType?: "oauth" | "api_key"): readonly PiAuthenticationProviderOption[];
141
- pinnedLoginMethodOptions(providerReference: string): {
142
- readonly title: string;
143
- readonly options: readonly PiWorkflowOption[];
144
- };
145
- pinnedAmbientAuthentication(selection: string): ReturnType<PiWorkflowContexts["pinnedAmbientAuthentication"]>;
146
- pinnedLogoutOptions(): Promise<readonly PiAuthenticationProviderOption[]>;
147
- pinnedForkOptions(): readonly PiWorkflowOption[];
148
- /** Bind the owned UI's clipboard lifecycle without changing the comparison host. True means acknowledged delivery. */
149
- bindClipboardWriter(writer: (text: string) => Promise<boolean>): () => void;
150
- /** Workflow and tree copying share the active owner's write fence and delivery acknowledgment. */
151
- copyWorkflowText(text: string): Promise<boolean>;
152
86
  abortBashWorkflow(): void;
153
- executeBashWorkflow(command: string, excludeFromContext: boolean): Promise<PiBashWorkflowResult>;
154
- reloadBlockedResult(): PiWorkflowResult | null;
155
87
  executeWorkflow(request: PiWorkflowRequest): Promise<PiWorkflowResult>;
156
88
  /**
157
89
  * The theme the engine is configured with, in the engine's own grammar: a
158
90
  * theme's name, or a `light/dark` pair meaning "follow the terminal".
159
91
  */
160
92
  configuredTheme(): string | undefined;
161
- /** Persist the global thinking default without changing the live session level. */
162
- setDefaultThinkingLevel(level: PiPinnedSettingsSnapshot["defaultThinkingLevel"]): void;
163
93
  /** Settings port for the live runtime, or null before the runtime is available. */
164
94
  settingsPort(): PiSettingsBridge | null;
165
- /** Which settings surface this adapter serves; hidden-in-bare effects are unbindable in bare mode. */
166
- get settingsProductMode(): "bare" | "comparison";
167
- bindSettingsOwner(owner: AgentSettingOwner, handlers: PiSettingOwnerHandlers): () => void;
168
95
  pinnedSettingsSnapshot(): PiPinnedSettingsSnapshot;
169
96
  clearQueuedWorkflows(): readonly string[];
170
97
  view(): OwnedUiSessionViewModel;