@timurproko/a1 0.1.8-dev.226 → 0.1.8-dev.259
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/guardian.js +4 -2
- package/bin/supervisor.js +1 -1
- package/bin/ui.js +44 -36
- package/bin/warmup.js +18 -9
- package/dist/cli/dispatch.d.ts +9 -1
- package/dist/cli/dispatch.js +73 -14
- package/dist/cli/package-messages.d.ts +26 -0
- package/dist/cli/package-messages.js +71 -0
- package/dist/cli/packages.d.ts +2 -1
- package/dist/cli/packages.js +12 -19
- package/dist/composition/owned-ui.d.ts +5 -2
- package/dist/composition/owned-ui.js +3 -1
- package/dist/contracts/agent-engine/package-ports.d.ts +6 -0
- package/dist/features/launch/intent.d.ts +5 -3
- package/dist/features/launch/intent.js +7 -2
- package/dist/features/owned-ui/index.d.ts +1 -0
- package/dist/features/owned-ui/index.js +1 -0
- package/dist/features/owned-ui/session-fork-prompt.d.ts +8 -0
- package/dist/features/owned-ui/session-fork-prompt.js +34 -0
- package/dist/foundation/launch-guardian/main.d.ts +2 -0
- package/dist/foundation/launch-guardian/main.js +8 -3
- package/dist/foundation/lifecycle/index.d.ts +2 -0
- package/dist/foundation/lifecycle/index.js +2 -0
- package/dist/foundation/lifecycle/paths.d.ts +2 -0
- package/dist/foundation/lifecycle/paths.js +9 -2
- package/dist/foundation/lifecycle/session-selection.d.ts +9 -0
- package/dist/foundation/lifecycle/session-selection.js +39 -0
- package/dist/foundation/lifecycle/supervisor-startup.d.ts +30 -0
- package/dist/foundation/lifecycle/supervisor-startup.js +106 -0
- package/dist/foundation/process-containment/darwin-process-inspector.d.ts +5 -0
- package/dist/foundation/process-containment/darwin-process-inspector.js +7 -0
- package/dist/foundation/process-containment/index.d.ts +1 -0
- package/dist/foundation/process-containment/index.js +1 -0
- package/dist/foundation/process-containment/windows-process-inspector.d.ts +2 -1
- package/dist/foundation/process-containment/windows-process-inspector.js +4 -2
- package/dist/foundation/release/bootstrap.d.ts +10 -3
- package/dist/foundation/release/bootstrap.js +58 -25
- package/dist/foundation/release/dependency-layer.js +11 -10
- package/dist/foundation/release/immutable-platform.d.ts +6 -0
- package/dist/foundation/release/immutable-platform.js +13 -0
- package/dist/foundation/release/index.d.ts +1 -0
- package/dist/foundation/release/index.js +1 -0
- package/dist/foundation/release/release-store.d.ts +1 -1
- package/dist/foundation/release/release-store.js +4 -2
- package/dist/foundation/release/restart-certification.d.ts +67 -0
- package/dist/foundation/release/restart-certification.js +211 -0
- package/dist/foundation/release/update.js +4 -4
- package/dist/foundation/release/warmup.js +1 -1
- package/dist/foundation/startup/startup-runtime.d.ts +2 -2
- package/dist/foundation/startup/startup-runtime.js +1 -1
- package/dist/foundation/supervision/main.d.ts +1 -1
- package/dist/foundation/supervision/main.js +60 -30
- package/dist/foundation/supervision/server.js +14 -1
- package/dist/integrations/pi/components/shell-footer-status.js +28 -12
- package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +4 -1
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +2 -1
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +5 -0
- package/dist/integrations/pi/engine/adapter.d.ts +6 -0
- package/dist/integrations/pi/engine/adapter.js +354 -53
- package/dist/integrations/pi/engine/index.d.ts +1 -0
- package/dist/integrations/pi/engine/index.js +1 -0
- package/dist/integrations/pi/engine/package-integration.js +31 -25
- package/dist/integrations/pi/engine/runtime-integration.d.ts +3 -0
- package/dist/integrations/pi/engine/runtime-integration.js +11 -4
- package/dist/integrations/pi/engine/session-selection.d.ts +28 -0
- package/dist/integrations/pi/engine/session-selection.js +90 -0
- package/dist/integrations/pi/engine/workflows.d.ts +18 -1
- package/dist/integrations/pi/session-ui/session-shell-root.d.ts +5 -1
- package/dist/integrations/pi/session-ui/session-shell-root.js +76 -24
- package/dist/integrations/pi/session-ui/session-shell.d.ts +1 -1
- package/dist/integrations/pi/session-ui/session-shell.js +46 -14
- package/dist/integrations/pi/session-ui/session-viewport-controller.d.ts +2 -1
- package/dist/integrations/pi/session-ui/session-viewport-controller.js +47 -18
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +12 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +166 -26
- package/dist/native/darwin-arm64/manifest.json +4 -4
- package/dist/native/darwin-arm64/process-guardian +0 -0
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/linux-x64/process-guardian +0 -0
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/ui/components/index.d.ts +1 -0
- package/dist/ui/components/index.js +1 -0
- package/dist/ui/components/text-selection.js +8 -35
- package/dist/ui/components/transcript-viewport.d.ts +8 -2
- package/dist/ui/components/transcript-viewport.js +8 -6
- package/dist/ui/components/visible-hyperlinks.d.ts +19 -0
- package/dist/ui/components/visible-hyperlinks.js +64 -0
- package/docs/architecture/process-guardian-provenance.md +3 -1
- package/docs/architecture/ui-reference-provenance.md +2 -0
- package/docs/ci-release-runbook.md +1 -1
- package/docs/features/launch-profiles.md +17 -1
- package/docs/manual-ghost-link-baseline.md +89 -0
- package/package.json +1 -1
|
@@ -72,19 +72,25 @@ export function createPiShellStatus(view, formatProgressStatus, runtime) {
|
|
|
72
72
|
const statusUi = createTuiFacade(runtime ?? { getColumns: () => 80, getRows: () => 24, requestRender() { } });
|
|
73
73
|
let workingOverride;
|
|
74
74
|
let outputPad = PINNED_PI_LAYOUT.outputPad;
|
|
75
|
-
let
|
|
76
|
-
let
|
|
75
|
+
let placement = statusPlacement(view, workingOverride);
|
|
76
|
+
let component = statusComponent(view, statusUi, workingOverride, outputPad, formatProgressStatus, placement);
|
|
77
|
+
let signature = statusSignature(view, workingOverride, outputPad, placement);
|
|
77
78
|
const rebuild = () => {
|
|
78
|
-
const
|
|
79
|
+
const nextPlacement = statusPlacement(view, workingOverride);
|
|
80
|
+
const nextSignature = statusSignature(view, workingOverride, outputPad, nextPlacement);
|
|
79
81
|
if (nextSignature === signature)
|
|
80
82
|
return;
|
|
81
83
|
if (component !== undefined && "dispose" in component && typeof component.dispose === "function")
|
|
82
84
|
component.dispose();
|
|
85
|
+
placement = nextPlacement;
|
|
83
86
|
signature = nextSignature;
|
|
84
|
-
component = statusComponent(view, statusUi, workingOverride, outputPad, formatProgressStatus);
|
|
87
|
+
component = statusComponent(view, statusUi, workingOverride, outputPad, formatProgressStatus, placement);
|
|
85
88
|
};
|
|
86
89
|
return {
|
|
87
90
|
render: width => component?.render(width) ?? [],
|
|
91
|
+
renderDock: width => placement === "dock" ? component?.render(width) ?? [] : [],
|
|
92
|
+
renderLive: width => placement === "live" ? component?.render(width) ?? [] : [],
|
|
93
|
+
placement: () => placement,
|
|
88
94
|
invalidate: () => component?.invalidate(),
|
|
89
95
|
update(next) {
|
|
90
96
|
view = next;
|
|
@@ -126,20 +132,30 @@ export function createPiQueuedInputStatus(submissions, presentation = "pinned")
|
|
|
126
132
|
},
|
|
127
133
|
};
|
|
128
134
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
135
|
+
function statusPlacement(view, workingOverride) {
|
|
136
|
+
// Invariant: live spinner placement follows semantic lifecycle, not text. An extension
|
|
137
|
+
// override is visible only when its lifecycle is busy, so a stale override cannot spin
|
|
138
|
+
// after completion or make an idle informational status scrollable.
|
|
139
|
+
if (view.lifecycle === "busy")
|
|
140
|
+
return "live";
|
|
141
|
+
if (view.lifecycle === "failed")
|
|
142
|
+
return "dock";
|
|
143
|
+
return view.status.workingMessage === null ? "hidden" : "dock";
|
|
144
|
+
}
|
|
145
|
+
function statusComponent(view, ui, workingOverride, outputPad, formatProgressStatus, placement) {
|
|
146
|
+
if (placement === "live") {
|
|
131
147
|
return new WorkingStatusIndicator(ui, formatProgressStatus(workingOverride ?? view.status.workingMessage ?? "Working"));
|
|
132
148
|
}
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
149
|
+
if (placement === "dock") {
|
|
150
|
+
if (view.lifecycle === "failed") {
|
|
151
|
+
return new Text(piTheme().fg("error", view.status.diagnostics.at(-1) ?? "Session failed"), outputPad, 0);
|
|
152
|
+
}
|
|
137
153
|
return new Text(piTheme().fg("muted", view.status.workingMessage), outputPad, 0);
|
|
138
154
|
}
|
|
139
155
|
return undefined;
|
|
140
156
|
}
|
|
141
|
-
function statusSignature(view, workingOverride, outputPad) {
|
|
142
|
-
return `${outputPad}\u0000${view.lifecycle}\u0000${workingOverride ?? ""}\u0000${view.status.workingMessage ?? ""}\u0000${view.status.diagnostics.at(-1) ?? ""}`;
|
|
157
|
+
function statusSignature(view, workingOverride, outputPad, placement) {
|
|
158
|
+
return `${placement}\u0000${outputPad}\u0000${view.lifecycle}\u0000${workingOverride ?? ""}\u0000${view.status.workingMessage ?? ""}\u0000${view.status.diagnostics.at(-1) ?? ""}`;
|
|
143
159
|
}
|
|
144
160
|
function queuedInputText(submissions, presentation) {
|
|
145
161
|
if (submissions.length === 0)
|
|
@@ -91,7 +91,10 @@ export declare function createPiShellLoginDialog(runtime: Pick<PiShellEditorOpti
|
|
|
91
91
|
export declare function createPiShellArmin(runtime: Pick<PiShellEditorOptions, "getColumns" | "getRows" | "requestRender">): PiShellComponentPort;
|
|
92
92
|
export declare function createPiShellDaxnuts(runtime: Pick<PiShellEditorOptions, "getColumns" | "getRows" | "requestRender">): PiShellComponentPort;
|
|
93
93
|
export declare function createPiShellEarendilAnnouncement(): PiShellComponentPort;
|
|
94
|
-
export
|
|
94
|
+
export interface PiShellOperationLoaderPort extends PiShellComponentPort {
|
|
95
|
+
readonly signal: AbortSignal;
|
|
96
|
+
}
|
|
97
|
+
export declare function createPiShellOperationLoader(runtime: Pick<PiShellEditorOptions, "getColumns" | "getRows" | "requestRender">, message: string): PiShellOperationLoaderPort;
|
|
95
98
|
export declare function createPiShellReloadBox(): PiShellComponentPort;
|
|
96
99
|
export interface PiShellAuthProviderOption extends PiShellSelectorOption {
|
|
97
100
|
readonly providerId: string;
|
|
@@ -148,7 +148,8 @@ export function createPiShellEarendilAnnouncement() {
|
|
|
148
148
|
}
|
|
149
149
|
export function createPiShellOperationLoader(runtime, message) {
|
|
150
150
|
ensureTheme();
|
|
151
|
-
|
|
151
|
+
const loader = new BorderedLoader(createTuiFacade(runtime), piTheme(), message, { cancellable: true });
|
|
152
|
+
return { ...componentPort(loader), signal: loader.signal };
|
|
152
153
|
}
|
|
153
154
|
export function createPiShellReloadBox() {
|
|
154
155
|
ensureTheme();
|
|
@@ -55,9 +55,14 @@ export interface PiShellAutocompleteCommand {
|
|
|
55
55
|
export interface PiShellViewComponentPort extends PiShellComponentPort {
|
|
56
56
|
update(view: OwnedUiSessionViewModel): void;
|
|
57
57
|
}
|
|
58
|
+
export type PiShellStatusPlacement = "live" | "dock" | "hidden";
|
|
58
59
|
export interface PiShellStatusPort extends PiShellViewComponentPort {
|
|
59
60
|
setWorkingOverride(message: string | undefined): void;
|
|
60
61
|
setOutputPad(padding: 0 | 1): void;
|
|
62
|
+
/** Semantic row placement; callers must not inspect rendered text. */
|
|
63
|
+
placement(): PiShellStatusPlacement;
|
|
64
|
+
renderDock(width: number): readonly string[];
|
|
65
|
+
renderLive(width: number): readonly string[];
|
|
61
66
|
}
|
|
62
67
|
export interface PiShellQueuedInputPort extends PiShellComponentPort {
|
|
63
68
|
update(submissions: readonly string[]): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PiSessionForkPrompt, PiSessionSelection } from "./session-selection.js";
|
|
1
2
|
import { type AgentSessionRuntime, type AgentSessionServices, type SessionInfo } from "@earendil-works/pi-coding-agent";
|
|
2
3
|
import { OWNED_UI_EXTENSION_CONTRACT_VERSION, OWNED_UI_EXTENSION_RENDER_CALLBACKS, OWNED_UI_EXTENSION_UI_CALLBACKS, OWNED_UI_EXTENSION_UI_PROPERTIES, type OwnedUiCommand, type OwnedUiCommandOutcome, type OwnedUiImageAttachment, type OwnedUiEvent, type OwnedUiSessionViewModel, type OwnedUiSnapshot } from "../../../contracts/owned-ui/index.js";
|
|
3
4
|
import { type PiAuthenticationProviderOption, type PiBashWorkflowResult, type PiPinnedSettingsCallback, type PiPinnedSettingsSnapshot, type PiWorkflowAutocompleteCommand, type PiWorkflowHost, type PiWorkflowInteractionHost, type PiWorkflowOption, type PiWorkflowRequest, type PiWorkflowResult } from "./workflows.js";
|
|
@@ -10,6 +11,8 @@ export interface PiEngineRuntimeFactoryInput {
|
|
|
10
11
|
readonly agentDir: string;
|
|
11
12
|
readonly sessionId: string;
|
|
12
13
|
readonly sessionPath?: string;
|
|
14
|
+
readonly sessionSelection?: PiSessionSelection;
|
|
15
|
+
readonly sessionForkPrompt?: PiSessionForkPrompt;
|
|
13
16
|
readonly projectTrustPrompt?: PiProjectTrustPreflightPrompt;
|
|
14
17
|
}
|
|
15
18
|
export interface PiScopedModelDescriptor {
|
|
@@ -101,6 +104,8 @@ export interface PiEngineAdapterOptions {
|
|
|
101
104
|
readonly agentDir?: string;
|
|
102
105
|
readonly sessionId?: string;
|
|
103
106
|
readonly sessionPath?: string;
|
|
107
|
+
readonly sessionSelection?: PiSessionSelection;
|
|
108
|
+
readonly sessionForkPrompt?: PiSessionForkPrompt;
|
|
104
109
|
readonly createRuntime?: PiEngineRuntimeFactory;
|
|
105
110
|
readonly workflowHost?: PiWorkflowHost;
|
|
106
111
|
/**
|
|
@@ -128,6 +133,7 @@ export declare class PiEngineAdapter {
|
|
|
128
133
|
setWorkflowInteractionHost(interaction: PiWorkflowInteractionHost): void;
|
|
129
134
|
get sessionId(): string;
|
|
130
135
|
get sessionGeneration(): number;
|
|
136
|
+
get cwd(): string;
|
|
131
137
|
get agentDir(): string;
|
|
132
138
|
resolveTranscriptImage(assetId: string): OwnedUiImageAttachment | null;
|
|
133
139
|
currentSessionFile(): string | null;
|