@timurproko/a1 0.2.7-dev.808 → 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.
- package/dist/app/session-shell/dialog-coordinator.d.ts +42 -0
- package/dist/app/session-shell/dialog-coordinator.js +133 -0
- package/dist/app/session-shell/dock-chrome.d.ts +34 -0
- package/dist/app/session-shell/dock-chrome.js +109 -0
- package/dist/app/session-shell/exit-notice.d.ts +1 -1
- package/dist/app/session-shell/exit-notice.js +1 -1
- package/dist/app/session-shell/extension-surface.d.ts +30 -0
- package/dist/app/session-shell/extension-surface.js +105 -0
- package/dist/app/session-shell/input-surface-switch.d.ts +36 -0
- package/dist/app/session-shell/input-surface-switch.js +85 -0
- package/dist/app/session-shell/login-interaction.d.ts +27 -0
- package/dist/app/session-shell/login-interaction.js +91 -0
- package/dist/app/session-shell/prompt-submission.d.ts +48 -0
- package/dist/app/session-shell/prompt-submission.js +276 -0
- package/dist/app/session-shell/resident-tab-coordinator.d.ts +41 -0
- package/dist/app/session-shell/resident-tab-coordinator.js +120 -0
- package/dist/app/session-shell/session-concern.d.ts +22 -0
- package/dist/app/session-shell/session-concern.js +29 -0
- package/dist/app/session-shell/session-lifecycle.d.ts +29 -0
- package/dist/app/session-shell/session-lifecycle.js +49 -0
- package/dist/app/session-shell/session-shell-root.d.ts +1 -1
- package/dist/app/session-shell/session-shell-root.js +182 -931
- package/dist/app/session-shell/session-shell.d.ts +2 -8
- package/dist/app/session-shell/session-shell.js +202 -901
- package/dist/app/session-shell/settings-bindings.d.ts +17 -0
- package/dist/app/session-shell/settings-bindings.js +91 -0
- package/dist/app/session-shell/shell-editor-factory.d.ts +27 -0
- package/dist/app/session-shell/shell-editor-factory.js +102 -0
- package/dist/app/session-shell/shell-host.d.ts +6 -0
- package/dist/app/session-shell/shell-host.js +8 -0
- package/dist/app/session-shell/shell-layout.d.ts +64 -0
- package/dist/app/session-shell/shell-layout.js +18 -0
- package/dist/app/session-shell/suggestion-surface.d.ts +25 -0
- package/dist/app/session-shell/suggestion-surface.js +63 -0
- package/dist/app/session-shell/transcript-document.d.ts +78 -0
- package/dist/app/session-shell/transcript-document.js +365 -0
- package/dist/app/session-shell/viewport-layout.d.ts +31 -0
- package/dist/app/session-shell/viewport-layout.js +160 -0
- package/dist/app/session-shell/workflow-output.d.ts +33 -0
- package/dist/app/session-shell/workflow-output.js +174 -0
- package/dist/app/session-shell/workflow-router.d.ts +25 -0
- package/dist/app/session-shell/workflow-router.js +39 -0
- package/dist/composition/owned-ui.d.ts +4 -25
- package/dist/composition/owned-ui.js +26 -270
- package/dist/composition/resident-tab-bridge.d.ts +16 -0
- package/dist/composition/resident-tab-bridge.js +159 -0
- package/dist/composition/session-backend.d.ts +19 -0
- package/dist/composition/session-backend.js +1 -0
- package/dist/composition/session-runtime-registry.d.ts +20 -0
- package/dist/composition/session-runtime-registry.js +85 -0
- package/dist/composition/startup-route.d.ts +32 -0
- package/dist/composition/startup-route.js +72 -0
- package/dist/integrations/pi/engine/adapter.d.ts +4 -77
- package/dist/integrations/pi/engine/adapter.js +85 -393
- package/dist/integrations/pi/engine/command-dispatch.d.ts +13 -0
- package/dist/integrations/pi/engine/command-dispatch.js +57 -0
- package/dist/integrations/pi/engine/host.js +2 -2
- package/dist/integrations/pi/engine/ports.d.ts +56 -0
- package/dist/integrations/pi/engine/ports.js +89 -0
- package/dist/integrations/pi/engine/view-state.d.ts +42 -0
- package/dist/integrations/pi/engine/view-state.js +126 -0
- package/dist/native/darwin-arm64/manifest.json +1 -1
- package/dist/native/darwin-arm64/terminal-host.manifest.json +3 -3
- package/dist/native/darwin-arm64/terminal-host.node +0 -0
- package/dist/native/darwin-x64/manifest.json +1 -1
- package/dist/native/darwin-x64/terminal-host.manifest.json +3 -3
- package/dist/native/darwin-x64/terminal-host.node +0 -0
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/linux-x64/terminal-host.manifest.json +3 -3
- package/dist/native/linux-x64/terminal-host.node +0 -0
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.node +0 -0
- package/dist/native/win32-x64/terminal-host.manifest.json +3 -3
- package/dist/native/win32-x64/terminal-host.node +0 -0
- package/docs/architecture/boundaries.md +14 -0
- package/docs/architecture/resident-tabs.md +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PRODUCT_TEXT } from "../../product-identity.js";
|
|
2
|
+
export function formatSessionResumeCommand(metadata) {
|
|
3
|
+
const args = [PRODUCT_TEXT.commandName];
|
|
4
|
+
if (!metadata.usesDefaultSessionDir)
|
|
5
|
+
args.push("--session-dir", quoteCommandArgument(metadata.sessionDir));
|
|
6
|
+
args.push("--session", metadata.sessionId);
|
|
7
|
+
return args.join(" ");
|
|
8
|
+
}
|
|
9
|
+
export function quoteCommandArgument(value) {
|
|
10
|
+
if (value.length > 0 && !/[^a-zA-Z0-9_\-./~:@]/.test(value))
|
|
11
|
+
return value;
|
|
12
|
+
return `'${value.replaceAll("'", `'\\''`)}'`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* What a fullscreen leave prints into the parent terminal: nothing after a regular-screen session,
|
|
16
|
+
* only the resume hint for bare A1 or when configured, and otherwise the transcript then the hint.
|
|
17
|
+
*/
|
|
18
|
+
export function composeExitText(input) {
|
|
19
|
+
if (input.terminalMode !== "fullscreen")
|
|
20
|
+
return "";
|
|
21
|
+
const resumeHint = input.resume === null ? "" : `${dim("To resume this session:")} ${formatSessionResumeCommand(input.resume)}`;
|
|
22
|
+
// Invariant: bare A1 leaves only the hint behind; the pinned comparison profile still
|
|
23
|
+
// honors fullscreenExitOutput, including the styled transcript.
|
|
24
|
+
if (input.customViewport || input.exitMode === "resume-hint")
|
|
25
|
+
return resumeHint;
|
|
26
|
+
return [input.transcript(), resumeHint].filter(Boolean).join("\n\n");
|
|
27
|
+
}
|
|
28
|
+
/** Resolves once when the session stops, whether it stopped itself, was quit, or was disposed. */
|
|
29
|
+
export class SessionStopLatch {
|
|
30
|
+
stopped;
|
|
31
|
+
#resolve;
|
|
32
|
+
constructor() {
|
|
33
|
+
this.stopped = new Promise(resolve => {
|
|
34
|
+
this.#resolve = resolve;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
resolve() {
|
|
38
|
+
const resolve = this.#resolve;
|
|
39
|
+
this.#resolve = undefined;
|
|
40
|
+
resolve?.();
|
|
41
|
+
}
|
|
42
|
+
/** The engine stopped on its own: dispose the shell, then resolve whether or not disposal failed. */
|
|
43
|
+
settleAfter(dispose) {
|
|
44
|
+
void dispose().then(() => this.resolve(), () => this.resolve());
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function dim(value) {
|
|
48
|
+
return `\u001b[2m${value}\u001b[22m`;
|
|
49
|
+
}
|
|
@@ -4,7 +4,7 @@ import type { PiTuiPointerSurface } from "../../integrations/pi/tui-runtime/cont
|
|
|
4
4
|
import type { UiRouteHost, UiRouteInput } from "../../ui/apps/contracts.js";
|
|
5
5
|
import type { TranscriptViewportFrame, TranscriptViewportFrameDescriptor } from "../../ui/components/transcript-viewport.js";
|
|
6
6
|
import type { PiShellLazySelectorLoader } from "../../integrations/pi/components/lazy-selectors.js";
|
|
7
|
-
import {
|
|
7
|
+
import type { PiShellHotkeysPresentation } from "../../integrations/pi/components/shell-presenters-info.js";
|
|
8
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
9
|
import { type PiTuiInputCoordinationScheduler, type PiTuiInputSurfaceKind } from "../../integrations/pi/tui-runtime/input-presentation-coordinator.js";
|
|
10
10
|
import type { PiTuiComponentPort, PiTuiInputDiagnosticsEvent, PiTuiLayoutNode, PiTuiTerminalPort } from "../../integrations/pi/tui-runtime/contracts.js";
|