@timurproko/a1 0.1.8-dev.518 → 0.1.8-dev.527
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/README.md +28 -137
- package/dist/app/session-shell/session-shell-root.js +1 -1
- package/dist/app/session-shell/session-shell.d.ts +2 -2
- package/dist/app/session-shell/session-shell.js +9 -9
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +2 -1
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +19 -0
- package/dist/integrations/pi/components/shell-presenters-info.js +56 -2
- package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +6 -4
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +5 -4
- package/dist/integrations/pi/components/skills-dialog.js +15 -5
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +2 -2
- 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/daxnuts.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/daxnuts.js +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 +2 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.js +7 -2
- package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
- 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.d.ts +8 -6
- package/dist/integrations/pi/components/upstream/components/session-selector.js +75 -49
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +18 -10
- package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +3 -3
- package/dist/integrations/pi/components/upstream/components/status-indicator.js +8 -8
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +3 -1
- 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 +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.js +8 -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.d.ts +3 -0
- package/dist/integrations/pi/components/upstream/history/text-helpers.js +4 -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/theme/theme-controller.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme.js +1 -1
- package/dist/integrations/pi/engine/index.d.ts +1 -1
- package/dist/integrations/pi/engine/index.js +1 -1
- package/dist/integrations/pi/engine/pi-settings-metadata.json +12 -0
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/settings-bridge.d.ts +1 -1
- package/dist/integrations/pi/engine/settings-bridge.js +2 -0
- package/dist/integrations/pi/engine/settings-port.js +11 -1
- package/dist/integrations/pi/engine/usage-view.js +1 -1
- package/dist/integrations/pi/engine/workflow-runner.js +4 -1
- package/dist/integrations/pi/engine/workflow-support.d.ts +6 -1
- package/dist/integrations/pi/engine/workflow-support.js +36 -2
- package/dist/integrations/pi/engine/workflows.d.ts +36 -3
- package/dist/integrations/pi/engine/workflows.js +8 -0
- package/dist/integrations/pi/startup-public.js +1001 -976
- package/dist/integrations/pi/startup-public.manifest.json +1846 -1672
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +7 -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/runtime-payload-inventory.json +41121 -34266
- package/docs/architecture/toolchain.md +2 -0
- package/docs/ci-release-runbook.md +32 -24
- package/docs/openspec-archive-automation.md +2 -2
- package/package.json +5 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SettingsManager } from "../startup-public.js";
|
|
2
2
|
import type { AgentJsonValue, AgentSettingApplicationBoundary, AgentSettingChangeOutcome, AgentSettingDescriptor, AgentSettingOwner, AgentSettingsPort } from "../../../contracts/agent-engine/index.js";
|
|
3
|
-
export type PiSettingKey = "autoCompact" | "showImages" | "imageWidthCells" | "autoResizeImages" | "blockImages" | "enableSkillCommands" | "steeringMode" | "followUpMode" | "transport" | "httpIdleTimeoutMs" | "modelThinkingLevels" | "theme" | "hideThinkingBlock" | "mermaidRenderingMode" | "showCacheMissNotices" | "collapseChangelog" | "enableInstallTelemetry" | "quietStartup" | "defaultProjectTrust" | "doubleEscapeAction" | "treeFilterMode" | "showHardwareCursor" | "editorPaddingX" | "outputPad" | "autocompleteMaxVisible" | "clearOnShrink" | "showTerminalProgress" | "tuiMode" | "fullscreenExitOutput" | "fullscreenScrollbar" | "fullscreenCopyOnSelect" | "warnings";
|
|
3
|
+
export type PiSettingKey = "autoCompact" | "showImages" | "imageWidthCells" | "autoResizeImages" | "blockImages" | "enableSkillCommands" | "steeringMode" | "followUpMode" | "transport" | "httpIdleTimeoutMs" | "cacheWarmingMode" | "modelThinkingLevels" | "theme" | "hideThinkingBlock" | "mermaidRenderingMode" | "showCacheMissNotices" | "collapseChangelog" | "enableInstallTelemetry" | "quietStartup" | "defaultProjectTrust" | "doubleEscapeAction" | "treeFilterMode" | "showHardwareCursor" | "editorPaddingX" | "outputPad" | "autocompleteMaxVisible" | "clearOnShrink" | "showTerminalProgress" | "tuiMode" | "fullscreenExitOutput" | "fullscreenScrollbar" | "fullscreenCopyOnSelect" | "warnings";
|
|
4
4
|
export type PiSettingVisualClass = "none" | "transcript" | "transcript-geometry" | "editor-menu" | "queue-transcript" | "status-error" | "retry-error" | "footer-transcript" | "markdown" | "transcript-notice" | "startup-transcript" | "startup-selector" | "selector" | "terminal-cursor" | "editor-geometry" | "menu-geometry" | "terminal-frame" | "terminal-status" | "hidden";
|
|
5
5
|
export interface PiSettingVisualEvidence {
|
|
6
6
|
/** Reviewed visual family; `none` still names the behavior that can emit styled diagnostics. */
|
|
@@ -14,6 +14,7 @@ export const PI_SETTING_EFFECTS = Object.freeze({
|
|
|
14
14
|
followUpMode: effect("live", "agent", "queue-transcript", "pinned follow-up queue and submitted prompt rows", "pinned-status-indicator-parity"),
|
|
15
15
|
transport: effect("live", "agent", "status-error", "pinned provider request status and failure rows", "settings-effects-provider-parity"),
|
|
16
16
|
httpIdleTimeoutMs: effect("live", "agent", "retry-error", "pinned timeout, retry, and terminal failure rows", "pinned-transcript-lifecycle-parity"),
|
|
17
|
+
cacheWarmingMode: effect("live", "agent", "footer-transcript", "pinned cache warming notices and session usage rows", "pinned-transcript-lifecycle-parity"),
|
|
17
18
|
modelThinkingLevels: effect("live", "agent", "footer-transcript", "pinned per-model thinking override, footer indicator, and thinking rows", "pinned-status-indicator-parity"),
|
|
18
19
|
theme: hiddenEffect("live", "shell", "pinned theme selector and complete themed shell", "pinned-theme-parity"),
|
|
19
20
|
hideThinkingBlock: effect("live", "shell", "transcript", "pinned thinking block presence and spacing", "pinned-transcript-lifecycle-parity"),
|
|
@@ -401,6 +402,7 @@ function operations(settings, providers) {
|
|
|
401
402
|
choice("followUpMode", offered("followUpMode"), () => settings.getFollowUpMode(), value => settings.setFollowUpMode(value)),
|
|
402
403
|
choice("transport", offered("transport"), () => settings.getTransport(), value => settings.setTransport(value)),
|
|
403
404
|
numberSetting("httpIdleTimeoutMs", () => settings.getHttpIdleTimeoutMs(), value => settings.setHttpIdleTimeoutMs(value), 0),
|
|
405
|
+
choice("cacheWarmingMode", offered("cacheWarmingMode"), () => settings.getCacheWarmingMode(), value => settings.setCacheWarmingMode(value)),
|
|
404
406
|
modelThinkingLevels(settings),
|
|
405
407
|
themeSetting(settings, themes),
|
|
406
408
|
bool("hideThinkingBlock", () => settings.getHideThinkingBlock(), value => settings.setHideThinkingBlock(value)),
|
|
@@ -112,6 +112,13 @@ export class PiEngineSettings {
|
|
|
112
112
|
configureOwnedHttpDispatcher(value);
|
|
113
113
|
settings.setHttpIdleTimeoutMs(value);
|
|
114
114
|
} },
|
|
115
|
+
cacheWarmingMode: { apply: value => {
|
|
116
|
+
if (value !== "off" && value !== "streaming" && value !== "idle")
|
|
117
|
+
throw new TypeError("Cache warming mode is invalid");
|
|
118
|
+
// Invariant: the warmer reads the mode per decision, but only the session route
|
|
119
|
+
// also retires an in-flight idle loop when the mode stops allowing one.
|
|
120
|
+
this.#ports.requireSession().setCacheWarmingMode(value);
|
|
121
|
+
} },
|
|
115
122
|
modelThinkingLevels: { apply: value => {
|
|
116
123
|
if (!isRecord(value))
|
|
117
124
|
throw new TypeError("Per-model thinking levels are invalid");
|
|
@@ -183,6 +190,7 @@ export class PiEngineSettings {
|
|
|
183
190
|
followUpMode: session.followUpMode ?? setting(settings?.getFollowUpMode, "one-at-a-time"),
|
|
184
191
|
transport: setting(settings?.getTransport, "sse"),
|
|
185
192
|
httpIdleTimeoutMs: setting(settings?.getHttpIdleTimeoutMs, 300_000),
|
|
193
|
+
cacheWarmingMode: setting(settings?.getCacheWarmingMode, "streaming"),
|
|
186
194
|
thinkingLevel: readThinkingLevel(session.thinkingLevel),
|
|
187
195
|
availableThinkingLevels: Array.isArray(levels) ? levels.map(readThinkingLevel) : ["off", "minimal", "low", "medium", "high", "xhigh"],
|
|
188
196
|
defaultThinkingLevel: readThinkingLevel(settings?.getDefaultThinkingLevel?.() ?? "medium"),
|
|
@@ -245,6 +253,7 @@ export class PiEngineSettings {
|
|
|
245
253
|
onFollowUpModeChange: snapshot.followUpMode,
|
|
246
254
|
onTransportChange: snapshot.transport,
|
|
247
255
|
onHttpIdleTimeoutMsChange: snapshot.httpIdleTimeoutMs,
|
|
256
|
+
onCacheWarmingModeChange: snapshot.cacheWarmingMode,
|
|
248
257
|
onModelThinkingLevelChange: snapshot.modelThinkingLevels,
|
|
249
258
|
onModelThinkingLevelRemove: snapshot.modelThinkingLevels,
|
|
250
259
|
onFullscreenCopyOnSelectChange: snapshot.fullscreenCopyOnSelect,
|
|
@@ -306,7 +315,8 @@ function settingKeyForCallback(callback) {
|
|
|
306
315
|
onAutoCompactChange: "autoCompact", onShowImagesChange: "showImages", onImageWidthCellsChange: "imageWidthCells",
|
|
307
316
|
onAutoResizeImagesChange: "autoResizeImages", onBlockImagesChange: "blockImages", onEnableSkillCommandsChange: "enableSkillCommands",
|
|
308
317
|
onSteeringModeChange: "steeringMode", onFollowUpModeChange: "followUpMode", onTransportChange: "transport",
|
|
309
|
-
onHttpIdleTimeoutMsChange: "httpIdleTimeoutMs",
|
|
318
|
+
onHttpIdleTimeoutMsChange: "httpIdleTimeoutMs", onCacheWarmingModeChange: "cacheWarmingMode",
|
|
319
|
+
onModelThinkingLevelChange: "modelThinkingLevels", onModelThinkingLevelRemove: "modelThinkingLevels",
|
|
310
320
|
onThemeChange: "theme", onThemePreview: "theme", onFullscreenCopyOnSelectChange: "fullscreenCopyOnSelect",
|
|
311
321
|
onHideThinkingBlockChange: "hideThinkingBlock", onMermaidRenderingModeChange: "mermaidRenderingMode",
|
|
312
322
|
onShowCacheMissNoticesChange: "showCacheMissNotices", onCollapseChangelogChange: "collapseChangelog",
|
|
@@ -16,7 +16,7 @@ export function readUsageView(session, runtime, activeModel) {
|
|
|
16
16
|
const message = entry.type === "message" && isRecord(entry.message) ? entry.message : undefined;
|
|
17
17
|
const usage = message !== undefined && isRecord(message.usage)
|
|
18
18
|
? message.usage
|
|
19
|
-
: (entry.type === "branch_summary" || entry.type === "compaction") && isRecord(entry.usage) ? entry.usage : undefined;
|
|
19
|
+
: (entry.type === "usage" || entry.type === "branch_summary" || entry.type === "compaction") && isRecord(entry.usage) ? entry.usage : undefined;
|
|
20
20
|
if (usage === undefined)
|
|
21
21
|
continue;
|
|
22
22
|
input += finiteNumber(usage.input);
|
|
@@ -404,7 +404,10 @@ export class PiWorkflowRunner {
|
|
|
404
404
|
const entries = manager?.getEntries();
|
|
405
405
|
return {
|
|
406
406
|
...workflowResult(request.command, "completed", "Session Info"),
|
|
407
|
-
presentation: pinnedSessionInfoPresentation(stats, manager?.getSessionName(), Array.isArray(entries) ? entries : [], runtime.services.modelRuntime
|
|
407
|
+
presentation: pinnedSessionInfoPresentation(stats, manager?.getSessionName(), Array.isArray(entries) ? entries : [], runtime.services.modelRuntime, {
|
|
408
|
+
mode: runtime.services.settingsManager?.getCacheWarmingMode?.(),
|
|
409
|
+
status: session.cacheWarmingStatus,
|
|
410
|
+
}),
|
|
408
411
|
};
|
|
409
412
|
}
|
|
410
413
|
case "changelog": {
|
|
@@ -3,7 +3,12 @@ import type { PiScopedModelDescriptor, PiSessionInfoPresentation, PiWorkflowHost
|
|
|
3
3
|
type PiServicesApi = AgentSessionServices;
|
|
4
4
|
export declare const AUTH_REFRESH_TIMEOUT_MS = 15000;
|
|
5
5
|
export declare const PINNED_DEFAULT_MODEL_BY_PROVIDER: Readonly<Record<string, string>>;
|
|
6
|
-
export declare function pinnedSessionInfoPresentation(value: unknown, sessionName: string | undefined, entries: readonly unknown[], modelRuntime: PiServicesApi["modelRuntime"]
|
|
6
|
+
export declare function pinnedSessionInfoPresentation(value: unknown, sessionName: string | undefined, entries: readonly unknown[], modelRuntime: PiServicesApi["modelRuntime"], cacheWarming: {
|
|
7
|
+
readonly mode: unknown;
|
|
8
|
+
readonly status: unknown;
|
|
9
|
+
}): PiSessionInfoPresentation;
|
|
10
|
+
/** The engine reports warming as a mode plus, once it has acted, the decision that produced the state. */
|
|
11
|
+
export declare function pinnedCacheWarming(mode: unknown, status: unknown): PiSessionInfoPresentation["cacheWarming"];
|
|
7
12
|
export declare function pinnedUsageCostBreakdown(entries: readonly unknown[]): PiSessionInfoPresentation["usageBreakdown"];
|
|
8
13
|
export declare function pinnedCacheWaste(entries: readonly unknown[], modelRuntime: PiServicesApi["modelRuntime"]): PiSessionInfoPresentation["cacheWaste"];
|
|
9
14
|
export declare function defaultWorkflowHost(): PiWorkflowHost;
|
|
@@ -6,7 +6,8 @@ import { dynamicObject, finiteNumber, isRecord, stringProperty, stringValue } fr
|
|
|
6
6
|
import { copyToClipboard } from "../startup-public.js";
|
|
7
7
|
const execFileAsync = promisify(execFile);
|
|
8
8
|
export const AUTH_REFRESH_TIMEOUT_MS = 15_000;
|
|
9
|
-
// Provenance:
|
|
9
|
+
// Provenance: the pinned engine's core/model-resolver.ts defaultModelPerProvider, which every
|
|
10
|
+
// upgrade that adds a provider extends; the version this mirrors is the pin, not one named here.
|
|
10
11
|
export const PINNED_DEFAULT_MODEL_BY_PROVIDER = Object.freeze({
|
|
11
12
|
"amazon-bedrock": "us.anthropic.claude-opus-4-6-v1",
|
|
12
13
|
"ant-ling": "Ring-2.6-1T",
|
|
@@ -27,6 +28,7 @@ export const PINNED_DEFAULT_MODEL_BY_PROVIDER = Object.freeze({
|
|
|
27
28
|
cerebras: "zai-glm-4.7",
|
|
28
29
|
zai: "glm-5.1",
|
|
29
30
|
"zai-coding-cn": "glm-5.1",
|
|
31
|
+
meta: "muse-spark-1.3",
|
|
30
32
|
mistral: "devstral-medium-latest",
|
|
31
33
|
minimax: "MiniMax-M2.7",
|
|
32
34
|
"minimax-cn": "MiniMax-M2.7",
|
|
@@ -49,7 +51,7 @@ export const PINNED_DEFAULT_MODEL_BY_PROVIDER = Object.freeze({
|
|
|
49
51
|
"xiaomi-token-plan-ams": "mimo-v2.5-pro",
|
|
50
52
|
"xiaomi-token-plan-sgp": "mimo-v2.5-pro",
|
|
51
53
|
});
|
|
52
|
-
export function pinnedSessionInfoPresentation(value, sessionName, entries, modelRuntime) {
|
|
54
|
+
export function pinnedSessionInfoPresentation(value, sessionName, entries, modelRuntime, cacheWarming) {
|
|
53
55
|
const stats = isRecord(value) ? value : {};
|
|
54
56
|
const tokens = dynamicObject(stats, "tokens");
|
|
55
57
|
return {
|
|
@@ -74,6 +76,38 @@ export function pinnedSessionInfoPresentation(value, sessionName, entries, model
|
|
|
74
76
|
},
|
|
75
77
|
cacheWaste: pinnedCacheWaste(entries, modelRuntime),
|
|
76
78
|
usageBreakdown: pinnedUsageCostBreakdown(entries),
|
|
79
|
+
cacheWarming: pinnedCacheWarming(cacheWarming.mode, cacheWarming.status),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/** The engine reports warming as a mode plus, once it has acted, the decision that produced the state. */
|
|
83
|
+
export function pinnedCacheWarming(mode, status) {
|
|
84
|
+
const resolved = stringValue(mode) ?? "off";
|
|
85
|
+
if (!isRecord(status))
|
|
86
|
+
return { mode: resolved };
|
|
87
|
+
const state = stringProperty(status, "state");
|
|
88
|
+
if (state !== "inactive" && state !== "scheduled" && state !== "refreshing")
|
|
89
|
+
return { mode: resolved };
|
|
90
|
+
const reason = stringProperty(status, "reason");
|
|
91
|
+
const nextWarmAt = status.nextWarmAt;
|
|
92
|
+
const decision = isRecord(status.decision) ? status.decision : undefined;
|
|
93
|
+
const phase = decision === undefined ? undefined : stringProperty(decision, "phase");
|
|
94
|
+
return {
|
|
95
|
+
mode: resolved,
|
|
96
|
+
status: {
|
|
97
|
+
state,
|
|
98
|
+
...(reason === undefined ? {} : { reason }),
|
|
99
|
+
...(typeof nextWarmAt === "number" && Number.isFinite(nextWarmAt) ? { nextWarmAt } : {}),
|
|
100
|
+
...(status.extensionOverride === true ? { extensionOverride: true } : {}),
|
|
101
|
+
...(decision === undefined ? {} : { decision: {
|
|
102
|
+
phase: phase === "streaming" ? "streaming" : "idle",
|
|
103
|
+
action: stringProperty(decision, "action") ?? "stop",
|
|
104
|
+
warmCost: finiteNumber(decision.warmCost),
|
|
105
|
+
missCost: finiteNumber(decision.missCost),
|
|
106
|
+
continuationProbability: finiteNumber(decision.continuationProbability),
|
|
107
|
+
expectedSavings: finiteNumber(decision.expectedSavings),
|
|
108
|
+
economicsAvailable: decision.economicsAvailable === true,
|
|
109
|
+
} }),
|
|
110
|
+
},
|
|
77
111
|
};
|
|
78
112
|
}
|
|
79
113
|
export function pinnedUsageCostBreakdown(entries) {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { SessionInfo } from "../startup-public.js";
|
|
2
2
|
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
3
|
export declare const PINNED_PI_HIDDEN_COMMAND_NAMES: readonly ["debug", "arminsayshi", "dementedelves"];
|
|
4
|
+
/**
|
|
5
|
+
* Commands the pinned engine advertises that A1 deliberately does not present. `/bug` collects,
|
|
6
|
+
* uploads, and archives a report through modules the package keeps off its public surface, so A1
|
|
7
|
+
* cannot reproduce the route and does not offer a partial one. Naming them here keeps the manifest
|
|
8
|
+
* comparison exact: a command upstream adds still fails the gate until it is classified.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PINNED_PI_DECLINED_COMMAND_NAMES: readonly ["bug"];
|
|
4
11
|
export type PiWorkflowCommandName = typeof PINNED_PI_WORKFLOW_COMMAND_NAMES[number];
|
|
5
12
|
export type PiHiddenWorkflowCommandName = typeof PINNED_PI_HIDDEN_COMMAND_NAMES[number];
|
|
6
13
|
/** The one bare-A1 model command; it replaces the pinned `model` and `scoped-models` routes there. */
|
|
@@ -13,7 +20,7 @@ export type PiProductMode = "bare" | "comparison";
|
|
|
13
20
|
/** The advertised command catalog for a product mode; hidden routes are shared by both. */
|
|
14
21
|
export declare function workflowCommandNames(productMode: PiProductMode): readonly (PiWorkflowCommandName | OwnedModelsCommandName)[];
|
|
15
22
|
export type PiWorkflowRoute = PiWorkflowCommandName | PiHiddenWorkflowCommandName | OwnedModelsCommandName;
|
|
16
|
-
export declare const PINNED_PI_SETTINGS_CALLBACKS: readonly ["onAutoCompactChange", "onShowImagesChange", "onImageWidthCellsChange", "onAutoResizeImagesChange", "onBlockImagesChange", "onEnableSkillCommandsChange", "onSteeringModeChange", "onFollowUpModeChange", "onTransportChange", "onHttpIdleTimeoutMsChange", "onModelThinkingLevelChange", "onModelThinkingLevelRemove", "onThemeChange", "onThemePreview", "onHideThinkingBlockChange", "onMermaidRenderingModeChange", "onShowCacheMissNoticesChange", "onCollapseChangelogChange", "onEnableInstallTelemetryChange", "onQuietStartupChange", "onDefaultProjectTrustChange", "onDoubleEscapeActionChange", "onTreeFilterModeChange", "onShowHardwareCursorChange", "onEditorPaddingXChange", "onOutputPadChange", "onAutocompleteMaxVisibleChange", "onClearOnShrinkChange", "onShowTerminalProgressChange", "onTuiModeChange", "onFullscreenExitOutputChange", "onFullscreenScrollbarChange", "onFullscreenCopyOnSelectChange", "onWarningsChange", "onCancel"];
|
|
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", "onWarningsChange", "onCancel"];
|
|
17
24
|
export type PiPinnedSettingsCallback = typeof PINNED_PI_SETTINGS_CALLBACKS[number];
|
|
18
25
|
export interface PiPinnedSettingsSnapshot {
|
|
19
26
|
readonly autoCompact: boolean;
|
|
@@ -26,6 +33,7 @@ export interface PiPinnedSettingsSnapshot {
|
|
|
26
33
|
readonly followUpMode: "all" | "one-at-a-time";
|
|
27
34
|
readonly transport: "sse" | "websocket" | "websocket-cached" | "auto";
|
|
28
35
|
readonly httpIdleTimeoutMs: number;
|
|
36
|
+
readonly cacheWarmingMode: "off" | "streaming" | "idle";
|
|
29
37
|
readonly thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
30
38
|
readonly availableThinkingLevels: readonly ("off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[];
|
|
31
39
|
/** The stored global default the selector offers to restore; the session's level may differ. */
|
|
@@ -123,6 +131,26 @@ export interface PiSessionInfoPresentation {
|
|
|
123
131
|
readonly cost: number;
|
|
124
132
|
readonly tokens: number;
|
|
125
133
|
}[];
|
|
134
|
+
readonly cacheWarming: PiCacheWarmingPresentation;
|
|
135
|
+
}
|
|
136
|
+
/** The engine's prompt-cache warming mode and, once warming has acted, the decision behind it. */
|
|
137
|
+
export interface PiCacheWarmingPresentation {
|
|
138
|
+
readonly mode: string;
|
|
139
|
+
readonly status?: {
|
|
140
|
+
readonly state: "inactive" | "scheduled" | "refreshing";
|
|
141
|
+
readonly reason?: string;
|
|
142
|
+
readonly nextWarmAt?: number;
|
|
143
|
+
readonly extensionOverride?: boolean;
|
|
144
|
+
readonly decision?: {
|
|
145
|
+
readonly phase: "streaming" | "idle";
|
|
146
|
+
readonly action: string;
|
|
147
|
+
readonly warmCost: number;
|
|
148
|
+
readonly missCost: number;
|
|
149
|
+
readonly continuationProbability: number;
|
|
150
|
+
readonly expectedSavings: number;
|
|
151
|
+
readonly economicsAvailable: boolean;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
126
154
|
}
|
|
127
155
|
export type PiWorkflowPresentation = PiSessionInfoPresentation;
|
|
128
156
|
export type PiWorkflowMessageKind = "status" | "warning" | "error" | "accent" | "silent";
|
|
@@ -248,10 +276,15 @@ export interface PiSessionResumeMetadata {
|
|
|
248
276
|
readonly sessionDir: string;
|
|
249
277
|
readonly usesDefaultSessionDir: boolean;
|
|
250
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Progress a session listing reports. `partialSessions` carries what the pinned manager has
|
|
281
|
+
* loaded so far, so the selector can show results before the listing finishes.
|
|
282
|
+
*/
|
|
283
|
+
export type PiSessionListProgress = (loaded: number, total: number, partialSessions?: readonly SessionInfo[]) => void;
|
|
251
284
|
export interface PiSessionSelectorContext {
|
|
252
285
|
readonly currentSessionFilePath: string | undefined;
|
|
253
|
-
readonly loadCurrentSessions: (onProgress?:
|
|
254
|
-
readonly loadAllSessions: (onProgress?:
|
|
286
|
+
readonly loadCurrentSessions: (onProgress?: PiSessionListProgress) => Promise<SessionInfo[]>;
|
|
287
|
+
readonly loadAllSessions: (onProgress?: PiSessionListProgress) => Promise<SessionInfo[]>;
|
|
255
288
|
readonly renameSession: (sessionFilePath: string, nextName: string | undefined) => Promise<void>;
|
|
256
289
|
}
|
|
257
290
|
export interface PiScopedModelsRefreshResult extends PiScopedModelsContext {
|
|
@@ -24,6 +24,13 @@ export const PINNED_PI_WORKFLOW_COMMAND_NAMES = [
|
|
|
24
24
|
"quit",
|
|
25
25
|
];
|
|
26
26
|
export const PINNED_PI_HIDDEN_COMMAND_NAMES = ["debug", "arminsayshi", "dementedelves"];
|
|
27
|
+
/**
|
|
28
|
+
* Commands the pinned engine advertises that A1 deliberately does not present. `/bug` collects,
|
|
29
|
+
* uploads, and archives a report through modules the package keeps off its public surface, so A1
|
|
30
|
+
* cannot reproduce the route and does not offer a partial one. Naming them here keeps the manifest
|
|
31
|
+
* comparison exact: a command upstream adds still fails the gate until it is classified.
|
|
32
|
+
*/
|
|
33
|
+
export const PINNED_PI_DECLINED_COMMAND_NAMES = ["bug"];
|
|
27
34
|
/** The one bare-A1 model command; it replaces the pinned `model` and `scoped-models` routes there. */
|
|
28
35
|
export const OWNED_MODELS_COMMAND_NAME = "models";
|
|
29
36
|
/** Bare A1's advertised command catalog: the pinned catalog with `models` in place of `model` and `scoped-models`. */
|
|
@@ -43,6 +50,7 @@ export const PINNED_PI_SETTINGS_CALLBACKS = [
|
|
|
43
50
|
"onFollowUpModeChange",
|
|
44
51
|
"onTransportChange",
|
|
45
52
|
"onHttpIdleTimeoutMsChange",
|
|
53
|
+
"onCacheWarmingModeChange",
|
|
46
54
|
"onModelThinkingLevelChange",
|
|
47
55
|
"onModelThinkingLevelRemove",
|
|
48
56
|
"onThemeChange",
|