Compare commits

...
Author SHA1 Message Date
Ben Davis 86f867e175 Add Pi reasoning work log plan 2026-05-07 00:31:16 -07:00
Ben Davis c4410eeaca Show displayed Pi custom messages
- Map Pi message_end events with visible assistant/custom content into completed assistant items
- Cover displayed and hidden custom message behavior
2026-05-06 22:49:44 -07:00
Ben Davis c411eae365 Surface Pi extension runtime state
- Add Pi UI state and diagnostic events with JSON-safe payloads
- Expose Pi extension resources in provider snapshots and UI panels
2026-05-06 22:20:43 -07:00
Ben Davis 8c5df792e2 Add Pi extension UI input bridge
- Route Pi extension UI activity and config through runtime events
- Support select, confirm, text, and textarea pending input flows
- Improve Pi tool display payloads and pending input tests
2026-05-06 19:00:04 -07:00
Ben Davis 3a5b8ee928 Document Pi extension support plan
- Add Pi provider compatibility reference
- Capture staged implementation plan for Pi extension hosting
2026-05-06 18:03:05 -07:00
Ben Davis a683adbfdc Add Pi provider support 2026-05-06 16:45:11 -07:00
Ben Davis 6c2bbdc0d3 Optimize thread navigation render work 2026-05-06 16:07:53 -07:00
Ben Davis c22bca1ac4 Merge branch 't3code/vscode-theme-plan' into davis/main 2026-05-06 15:28:45 -07:00
Ben Davis 357211864c Remove sidebar footer separator 2026-05-06 15:24:46 -07:00
Ben Davis 4e4f44f286 fix 2026-05-06 02:29:21 -07:00
Ben Davis 90c0d7d95a Ignore stale theme loads after preference changes
- Add preference equality guard in theme hook
- Prevent outdated async theme loads from overriding newer selections
2026-05-06 02:21:19 -07:00
Ben Davis 2b7dcd0295 Persist fallback theme and reuse destructive color
- Reset stored theme preference when the requested VS Code theme cannot be loaded
- Reuse the resolved destructive color for both destructive and destructive-foreground mapping
2026-05-06 02:08:03 -07:00
Ben Davis 169e16803d Add VS Code theme discovery and app theming
- Discover editor themes from desktop installs
- Map theme colors into shared app and syntax tokens
- Wire theme state through desktop, web, and settings
2026-05-06 02:01:32 -07:00
Ben Davis 0dc0cc76be Add VS Code theme integration plan
- Document discovery, mapping, and persistence strategy
- Outline desktop bridge, settings UI, and rollout phases
2026-05-06 01:09:14 -07:00
75 changed files with 10064 additions and 405 deletions

No files matched your search

+1090
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -18,7 +18,8 @@
"@effect/platform-node": "catalog:",
"effect": "catalog:",
"electron": "40.9.3",
"electron-updater": "^6.6.2"
"electron-updater": "^6.6.2",
"jsonc-parser": "^3.3.1"
},
"devDependencies": {
"@t3tools/client-runtime": "workspace:*",
@@ -64,6 +64,7 @@ const clientSettings: ClientSettings = {
sidebarProjectSortOrder: "manual",
sidebarThreadSortOrder: "created_at",
timestampFormat: "24-hour",
themePreference: { mode: "system" },
};
const savedRegistryRecord: PersistedSavedEnvironmentRecord = {
+54 -5
View File
@@ -30,6 +30,7 @@ import type {
DesktopUpdateActionResult,
DesktopUpdateCheckResult,
DesktopUpdateState,
DesktopWindowThemeColors,
} from "@t3tools/contracts";
import { autoUpdater } from "electron-updater";
@@ -84,12 +85,21 @@ import { isArm64HostRunningIntelBuild, resolveDesktopRuntimeInfo } from "./runti
import { resolveDesktopAppBranding } from "./appBranding.ts";
import { bindFirstRevealTrigger, type RevealSubscription } from "./windowReveal.ts";
import { resolveTailscaleAdvertisedEndpoints } from "./tailscaleEndpointProvider.ts";
import {
discoverEditorColorThemes,
getEditorThemePreferences,
loadEditorColorTheme,
} from "./vscodeThemeDiscovery.ts";
syncShellEnvironment();
const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
const CONFIRM_CHANNEL = "desktop:confirm";
const SET_THEME_CHANNEL = "desktop:set-theme";
const DISCOVER_COLOR_THEMES_CHANNEL = "desktop:discover-color-themes";
const LOAD_COLOR_THEME_CHANNEL = "desktop:load-color-theme";
const GET_EDITOR_THEME_PREFERENCES_CHANNEL = "desktop:get-editor-theme-preferences";
const SET_WINDOW_THEME_COLORS_CHANNEL = "desktop:set-window-theme-colors";
const CONTEXT_MENU_CHANNEL = "desktop:context-menu";
const OPEN_EXTERNAL_CHANNEL = "desktop:open-external";
const MENU_ACTION_CHANNEL = "desktop:menu-action";
@@ -118,6 +128,7 @@ const DESKTOP_SETTINGS_PATH = Path.join(STATE_DIR, "desktop-settings.json");
const CLIENT_SETTINGS_PATH = Path.join(STATE_DIR, "client-settings.json");
const SAVED_ENVIRONMENT_REGISTRY_PATH = Path.join(STATE_DIR, "saved-environments.json");
const DESKTOP_SCHEME = "t3";
let windowThemeColors: DesktopWindowThemeColors | null = null;
const ROOT_DIR = Path.resolve(__dirname, "../../..");
const isDevelopment = Boolean(process.env.VITE_DEV_SERVER_URL);
// Dev-only SSH launcher override. Set this to an absolute path on the SSH host
@@ -498,6 +509,20 @@ function getSafeTheme(rawTheme: unknown): DesktopTheme | null {
return null;
}
function getSafeWindowThemeColors(rawInput: unknown): DesktopWindowThemeColors | null {
if (typeof rawInput !== "object" || rawInput === null || Array.isArray(rawInput)) return null;
const input = rawInput as Record<string, unknown>;
if (typeof input.backgroundColor !== "string" || input.backgroundColor.trim().length === 0) {
return null;
}
return {
backgroundColor: input.backgroundColor,
titleBarColor: typeof input.titleBarColor === "string" ? input.titleBarColor : undefined,
titleBarSymbolColor:
typeof input.titleBarSymbolColor === "string" ? input.titleBarSymbolColor : undefined,
};
}
async function waitForBackendHttpReady(
baseUrl: string,
options?: Parameters<typeof waitForHttpReady>[1],
@@ -1818,6 +1843,26 @@ function registerIpcHandlers(): void {
nativeTheme.themeSource = theme;
});
ipcMain.removeHandler(DISCOVER_COLOR_THEMES_CHANNEL);
ipcMain.handle(DISCOVER_COLOR_THEMES_CHANNEL, async () => discoverEditorColorThemes());
ipcMain.removeHandler(LOAD_COLOR_THEME_CHANNEL);
ipcMain.handle(LOAD_COLOR_THEME_CHANNEL, async (_event, rawThemeId: unknown) => {
if (typeof rawThemeId !== "string") return null;
return loadEditorColorTheme(rawThemeId);
});
ipcMain.removeHandler(GET_EDITOR_THEME_PREFERENCES_CHANNEL);
ipcMain.handle(GET_EDITOR_THEME_PREFERENCES_CHANNEL, async () => getEditorThemePreferences());
ipcMain.removeHandler(SET_WINDOW_THEME_COLORS_CHANNEL);
ipcMain.handle(SET_WINDOW_THEME_COLORS_CHANNEL, async (_event, rawInput: unknown) => {
const input = getSafeWindowThemeColors(rawInput);
if (!input) return;
windowThemeColors = input;
syncAllWindowAppearance();
});
ipcMain.removeHandler(CONTEXT_MENU_CHANNEL);
ipcMain.handle(
CONTEXT_MENU_CHANNEL,
@@ -1989,7 +2034,9 @@ function getIconOption(): { icon: string } | Record<string, never> {
}
function getInitialWindowBackgroundColor(): string {
return nativeTheme.shouldUseDarkColors ? "#0a0a0a" : "#ffffff";
return (
windowThemeColors?.backgroundColor ?? (nativeTheme.shouldUseDarkColors ? "#0a0a0a" : "#ffffff")
);
}
function getWindowTitleBarOptions(): WindowTitleBarOptions {
@@ -2003,11 +2050,13 @@ function getWindowTitleBarOptions(): WindowTitleBarOptions {
return {
titleBarStyle: "hidden",
titleBarOverlay: {
color: TITLEBAR_COLOR,
color: windowThemeColors?.titleBarColor ?? TITLEBAR_COLOR,
height: TITLEBAR_HEIGHT,
symbolColor: nativeTheme.shouldUseDarkColors
? TITLEBAR_DARK_SYMBOL_COLOR
: TITLEBAR_LIGHT_SYMBOL_COLOR,
symbolColor:
windowThemeColors?.titleBarSymbolColor ??
(nativeTheme.shouldUseDarkColors
? TITLEBAR_DARK_SYMBOL_COLOR
: TITLEBAR_LIGHT_SYMBOL_COLOR),
},
};
}
+8
View File
@@ -4,6 +4,10 @@ import type { DesktopBridge } from "@t3tools/contracts";
const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
const CONFIRM_CHANNEL = "desktop:confirm";
const SET_THEME_CHANNEL = "desktop:set-theme";
const DISCOVER_COLOR_THEMES_CHANNEL = "desktop:discover-color-themes";
const LOAD_COLOR_THEME_CHANNEL = "desktop:load-color-theme";
const GET_EDITOR_THEME_PREFERENCES_CHANNEL = "desktop:get-editor-theme-preferences";
const SET_WINDOW_THEME_COLORS_CHANNEL = "desktop:set-window-theme-colors";
const CONTEXT_MENU_CHANNEL = "desktop:context-menu";
const OPEN_EXTERNAL_CHANNEL = "desktop:open-external";
const MENU_ACTION_CHANNEL = "desktop:menu-action";
@@ -114,7 +118,11 @@ contextBridge.exposeInMainWorld("desktopBridge", {
getAdvertisedEndpoints: () => ipcRenderer.invoke(GET_ADVERTISED_ENDPOINTS_CHANNEL),
pickFolder: (options) => ipcRenderer.invoke(PICK_FOLDER_CHANNEL, options),
confirm: (message) => ipcRenderer.invoke(CONFIRM_CHANNEL, message),
discoverColorThemes: () => ipcRenderer.invoke(DISCOVER_COLOR_THEMES_CHANNEL),
loadColorTheme: (themeId) => ipcRenderer.invoke(LOAD_COLOR_THEME_CHANNEL, themeId),
getEditorThemePreferences: () => ipcRenderer.invoke(GET_EDITOR_THEME_PREFERENCES_CHANNEL),
setTheme: (theme) => ipcRenderer.invoke(SET_THEME_CHANNEL, theme),
setWindowThemeColors: (input) => ipcRenderer.invoke(SET_WINDOW_THEME_COLORS_CHANNEL, input),
showContextMenu: (items, position) => ipcRenderer.invoke(CONTEXT_MENU_CHANNEL, items, position),
openExternal: (url: string) => ipcRenderer.invoke(OPEN_EXTERNAL_CHANNEL, url),
onMenuAction: (listener) => {
@@ -0,0 +1,104 @@
import * as FS from "node:fs";
import * as OS from "node:os";
import * as Path from "node:path";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import {
discoverEditorColorThemes,
getEditorThemePreferences,
loadEditorColorTheme,
resolveEditorRoots,
} from "./vscodeThemeDiscovery.ts";
let tempDir = "";
function writeJson(filePath: string, value: unknown) {
FS.mkdirSync(Path.dirname(filePath), { recursive: true });
FS.writeFileSync(filePath, JSON.stringify(value, null, 2));
}
describe("vscodeThemeDiscovery", () => {
beforeEach(() => {
tempDir = FS.mkdtempSync(Path.join(OS.tmpdir(), "t3-vscode-themes-"));
});
afterEach(() => {
FS.rmSync(tempDir, { recursive: true, force: true });
});
it("discovers contributed themes and ignores unsafe paths", () => {
const roots = resolveEditorRoots({ platform: "darwin", homedir: tempDir });
const vscodeRoot = roots.find((root) => root.source === "vscode");
expect(vscodeRoot).toBeDefined();
if (!vscodeRoot) return;
const extensionDir = Path.join(vscodeRoot.extensionsPath, "github.github-vscode-theme");
writeJson(Path.join(extensionDir, "package.json"), {
publisher: "GitHub",
displayName: "GitHub Theme",
contributes: {
themes: [
{ label: "GitHub Dark Default", uiTheme: "vs-dark", path: "./themes/dark.json" },
{ label: "Escaped", uiTheme: "vs", path: "../escaped.json" },
],
},
});
writeJson(Path.join(extensionDir, "themes", "dark.json"), {
colors: { "editor.background": "#0d1117" },
});
expect(discoverEditorColorThemes(roots)).toMatchObject([
{
source: "vscode",
label: "GitHub Dark Default",
kind: "dark",
publisher: "GitHub",
},
]);
});
it("loads JSONC settings overrides into the resolved app theme", () => {
const roots = resolveEditorRoots({ platform: "darwin", homedir: tempDir });
const vscodeRoot = roots.find((root) => root.source === "vscode");
expect(vscodeRoot).toBeDefined();
if (!vscodeRoot) return;
const extensionDir = Path.join(vscodeRoot.extensionsPath, "github.github-vscode-theme");
writeJson(Path.join(extensionDir, "package.json"), {
contributes: {
themes: [{ label: "GitHub Dark Default", uiTheme: "vs-dark", path: "./themes/dark.json" }],
},
});
writeJson(Path.join(extensionDir, "themes", "dark.json"), {
semanticHighlighting: true,
colors: {
"editor.background": "#0d1117",
"editor.foreground": "#e6edf3",
},
tokenColors: [],
});
FS.mkdirSync(Path.dirname(vscodeRoot.settingsPath), { recursive: true });
FS.writeFileSync(
vscodeRoot.settingsPath,
`{
"workbench.colorTheme": "GitHub Dark Default",
"workbench.colorCustomizations": {
"button.background": "#238636",
"[GitHub Dark Default]": {
"sideBar.background": "#010409"
}
}
}`,
);
const preferences = getEditorThemePreferences(roots);
expect(preferences[0]?.colorTheme).toBe("GitHub Dark Default");
const themeId = discoverEditorColorThemes(roots)[0]?.id;
expect(themeId).toBeTruthy();
const resolved = themeId ? loadEditorColorTheme(themeId, roots) : null;
expect(resolved?.colors["button.background"]).toBe("#238636");
expect(resolved?.colors["sideBar.background"]).toBe("#010409");
expect(resolved?.appVariables["--primary"]).toBe("#238636");
});
});
+284
View File
@@ -0,0 +1,284 @@
import * as FS from "node:fs";
import * as OS from "node:os";
import * as Path from "node:path";
import { parse as parseJsonc } from "jsonc-parser";
import type {
DiscoveredColorTheme,
EditorThemePreference,
EditorThemeSource,
ResolvedColorTheme,
ThemeKind,
} from "@t3tools/contracts";
import {
mapVscodeColorsToAppVariables,
normalizeCssColor,
normalizeThemeColors,
} from "@t3tools/shared/themeMapping";
interface EditorRoot {
readonly source: EditorThemeSource;
readonly extensionsPath: string;
readonly settingsPath: string;
}
function isObject(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
function kindFromUiTheme(uiTheme: unknown): ThemeKind {
if (uiTheme === "hc-light") return "high-contrast-light";
if (uiTheme === "hc-black") return "high-contrast-dark";
if (uiTheme === "vs") return "light";
return "dark";
}
function readJsonOrJsoncFile(filePath: string): unknown | null {
try {
return parseJsonc(FS.readFileSync(filePath, "utf8"));
} catch {
return null;
}
}
function safeResolveChild(root: string, relativePath: string): string | null {
const resolved = Path.resolve(root, relativePath);
const normalizedRoot = Path.resolve(root);
if (resolved === normalizedRoot || resolved.startsWith(`${normalizedRoot}${Path.sep}`)) {
return resolved;
}
return null;
}
export function resolveEditorRoots(input: {
readonly platform: NodeJS.Platform;
readonly homedir: string;
readonly appData?: string;
}): readonly EditorRoot[] {
const home = input.homedir;
if (input.platform === "win32") {
const appData = input.appData ?? Path.join(home, "AppData", "Roaming");
return [
{
source: "vscode",
extensionsPath: Path.join(home, ".vscode", "extensions"),
settingsPath: Path.join(appData, "Code", "User", "settings.json"),
},
{
source: "vscode-insiders",
extensionsPath: Path.join(home, ".vscode-insiders", "extensions"),
settingsPath: Path.join(appData, "Code - Insiders", "User", "settings.json"),
},
{
source: "cursor",
extensionsPath: Path.join(home, ".cursor", "extensions"),
settingsPath: Path.join(appData, "Cursor", "User", "settings.json"),
},
];
}
if (input.platform === "darwin") {
return [
{
source: "vscode",
extensionsPath: Path.join(home, ".vscode", "extensions"),
settingsPath: Path.join(
home,
"Library",
"Application Support",
"Code",
"User",
"settings.json",
),
},
{
source: "vscode-insiders",
extensionsPath: Path.join(home, ".vscode-insiders", "extensions"),
settingsPath: Path.join(
home,
"Library",
"Application Support",
"Code - Insiders",
"User",
"settings.json",
),
},
{
source: "cursor",
extensionsPath: Path.join(home, ".cursor", "extensions"),
settingsPath: Path.join(
home,
"Library",
"Application Support",
"Cursor",
"User",
"settings.json",
),
},
];
}
return [
{
source: "vscode",
extensionsPath: Path.join(home, ".vscode", "extensions"),
settingsPath: Path.join(home, ".config", "Code", "User", "settings.json"),
},
{
source: "vscode-insiders",
extensionsPath: Path.join(home, ".vscode-insiders", "extensions"),
settingsPath: Path.join(home, ".config", "Code - Insiders", "User", "settings.json"),
},
{
source: "cursor",
extensionsPath: Path.join(home, ".cursor", "extensions"),
settingsPath: Path.join(home, ".config", "Cursor", "User", "settings.json"),
},
];
}
function resolveDefaultEditorRoots() {
const input: { platform: NodeJS.Platform; homedir: string; appData?: string } = {
platform: process.platform,
homedir: OS.homedir(),
};
if (process.env.APPDATA) input.appData = process.env.APPDATA;
return resolveEditorRoots(input);
}
function readEditorSettings(settingsPath: string): Record<string, unknown> {
const parsed = readJsonOrJsoncFile(settingsPath);
return isObject(parsed) ? parsed : {};
}
export function getEditorThemePreferences(
roots = resolveDefaultEditorRoots(),
): readonly EditorThemePreference[] {
return roots.map((root) => {
const settings = readEditorSettings(root.settingsPath);
const customizations = settings["workbench.colorCustomizations"];
return {
source: root.source,
colorTheme:
typeof settings["workbench.colorTheme"] === "string"
? settings["workbench.colorTheme"]
: null,
preferredLightColorTheme:
typeof settings["workbench.preferredLightColorTheme"] === "string"
? settings["workbench.preferredLightColorTheme"]
: null,
preferredDarkColorTheme:
typeof settings["workbench.preferredDarkColorTheme"] === "string"
? settings["workbench.preferredDarkColorTheme"]
: null,
autoDetectColorScheme: settings["window.autoDetectColorScheme"] === true,
workbenchColorCustomizations: isObject(customizations) ? customizations : {},
editorTokenColorCustomizations: settings["editor.tokenColorCustomizations"],
};
});
}
export function discoverEditorColorThemes(
roots = resolveDefaultEditorRoots(),
): readonly DiscoveredColorTheme[] {
const themes: DiscoveredColorTheme[] = [];
for (const root of roots) {
if (!FS.existsSync(root.extensionsPath)) continue;
for (const entry of FS.readdirSync(root.extensionsPath, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const extensionDir = Path.join(root.extensionsPath, entry.name);
const packagePath = Path.join(extensionDir, "package.json");
const packageJson = readJsonOrJsoncFile(packagePath);
if (!isObject(packageJson)) continue;
const contributes = packageJson.contributes;
const contributedThemes = isObject(contributes) ? contributes.themes : null;
if (!Array.isArray(contributedThemes)) continue;
for (const theme of contributedThemes) {
if (!isObject(theme) || typeof theme.label !== "string" || typeof theme.path !== "string") {
continue;
}
const themePath = safeResolveChild(extensionDir, theme.path);
if (!themePath || !FS.existsSync(themePath)) continue;
themes.push({
id: `${root.source}:${entry.name}:${theme.label}`,
source: root.source,
extensionId: entry.name,
extensionDisplayName:
typeof packageJson.displayName === "string" ? packageJson.displayName : undefined,
label: theme.label,
kind: kindFromUiTheme(theme.uiTheme),
themePath,
packagePath,
publisher: typeof packageJson.publisher === "string" ? packageJson.publisher : undefined,
});
}
}
}
return themes.toSorted((a, b) => a.label.localeCompare(b.label));
}
function mergeWorkbenchOverrides(input: {
readonly themeLabel: string;
readonly themeColors: Record<string, string>;
readonly customizations: Record<string, unknown>;
}) {
const next = { ...input.themeColors };
for (const [key, rawValue] of Object.entries(input.customizations)) {
if (key.startsWith("[") && key.endsWith("]")) continue;
const color = normalizeCssColor(rawValue);
if (color) next[key] = color;
}
const scoped = input.customizations[`[${input.themeLabel}]`];
if (isObject(scoped)) {
for (const [key, rawValue] of Object.entries(scoped)) {
const color = normalizeCssColor(rawValue);
if (color) next[key] = color;
}
}
return next;
}
export function loadEditorColorTheme(
themeId: string,
roots = resolveDefaultEditorRoots(),
): ResolvedColorTheme | null {
const themes = discoverEditorColorThemes(roots);
const theme = themes.find((entry) => entry.id === themeId);
if (!theme) return null;
const rawTheme = readJsonOrJsoncFile(theme.themePath);
if (!isObject(rawTheme)) return null;
const preferences = getEditorThemePreferences(roots);
const preference = preferences.find((entry) => entry.source === theme.source);
const colors = mergeWorkbenchOverrides({
themeLabel: theme.label,
themeColors: normalizeThemeColors(rawTheme.colors),
customizations: preference?.workbenchColorCustomizations ?? {},
});
return {
id: theme.id,
label: theme.label,
source: theme.source,
kind: theme.kind,
colors,
tokenColors: rawTheme.tokenColors ?? [],
semanticHighlighting:
typeof rawTheme.semanticHighlighting === "boolean"
? rawTheme.semanticHighlighting
: undefined,
semanticTokenColors: rawTheme.semanticTokenColors,
appVariables: mapVscodeColorsToAppVariables({ kind: theme.kind, colors }),
};
}
+1
View File
@@ -28,6 +28,7 @@
"@effect/platform-bun": "catalog:",
"@effect/platform-node": "catalog:",
"@effect/sql-sqlite-bun": "catalog:",
"@mariozechner/pi-coding-agent": "^0.73.0",
"@opencode-ai/sdk": "^1.3.15",
"@pierre/diffs": "catalog:",
"effect": "catalog:",
@@ -357,6 +357,73 @@ function runtimeEventToActivities(
];
}
case "extension.activity": {
if (
event.payload.visibility === "pi-panel" ||
event.payload.visibility === "debug" ||
event.payload.visibility === "hidden"
) {
return [];
}
return [
{
id: event.eventId,
createdAt: event.createdAt,
tone: event.payload.severity === "error" ? "error" : "info",
kind: "extension.activity",
summary: event.payload.message,
payload: event.payload,
turnId: toTurnId(event.turnId) ?? null,
...maybeSequence,
},
];
}
case "pi.ui.state.updated": {
return [
{
id: event.eventId,
createdAt: event.createdAt,
tone: "info",
kind: "pi.ui.state.updated",
summary: `Pi ${event.payload.surface} updated`,
payload: event.payload,
turnId: toTurnId(event.turnId) ?? null,
...maybeSequence,
},
];
}
case "pi.extension.configured": {
return [
{
id: event.eventId,
createdAt: event.createdAt,
tone: "info",
kind: "pi.extension.configured",
summary: "Pi extensions configured",
payload: event.payload,
turnId: toTurnId(event.turnId) ?? null,
...maybeSequence,
},
];
}
case "pi.extension.diagnostic": {
return [
{
id: event.eventId,
createdAt: event.createdAt,
tone: event.payload.severity === "error" ? "error" : "info",
kind: "pi.extension.diagnostic",
summary: event.payload.message,
payload: event.payload,
turnId: toTurnId(event.turnId) ?? null,
...maybeSequence,
},
];
}
case "turn.plan.updated": {
return [
{
@@ -0,0 +1,103 @@
import { PiSettings, ProviderDriverKind, type ServerProvider } from "@t3tools/contracts";
import { Duration, Effect, Schema, Stream } from "effect";
import { makePiTextGeneration } from "../../textGeneration/PiTextGeneration.ts";
import { ServerConfig } from "../../config.ts";
import { ProviderDriverError } from "../Errors.ts";
import { makePiAdapter } from "../Layers/PiAdapter.ts";
import { checkPiProviderStatus, makePendingPiProvider } from "../Layers/PiProvider.ts";
import { makeManagedServerProvider } from "../makeManagedServerProvider.ts";
import type { ProviderDriver, ProviderInstance } from "../ProviderDriver.ts";
import type { ServerProviderDraft } from "../providerSnapshot.ts";
import { makeManualOnlyProviderMaintenanceCapabilities } from "../providerMaintenance.ts";
const DRIVER_KIND = ProviderDriverKind.make("pi");
const SNAPSHOT_REFRESH_INTERVAL = Duration.minutes(5);
export type PiDriverEnv = ServerConfig;
const withInstanceIdentity =
(input: {
readonly instanceId: ProviderInstance["instanceId"];
readonly displayName: string | undefined;
readonly accentColor: string | undefined;
readonly continuationGroupKey: string;
}) =>
(snapshot: ServerProviderDraft): ServerProvider => ({
...snapshot,
instanceId: input.instanceId,
driver: DRIVER_KIND,
...(input.displayName ? { displayName: input.displayName } : {}),
...(input.accentColor ? { accentColor: input.accentColor } : {}),
continuation: { groupKey: input.continuationGroupKey },
});
function piContinuationIdentity(settings: PiSettings, instanceId: ProviderInstance["instanceId"]) {
const agentDir = settings.agentDir.trim() || "~/.pi/agent";
return {
driverKind: DRIVER_KIND,
continuationKey: `pi:agent-dir:${agentDir}:instance:${instanceId}`,
};
}
export const PiDriver: ProviderDriver<PiSettings, PiDriverEnv> = {
driverKind: DRIVER_KIND,
metadata: {
displayName: "Pi",
supportsMultipleInstances: true,
},
configSchema: PiSettings,
defaultConfig: (): PiSettings => Schema.decodeSync(PiSettings)({}),
create: ({ instanceId, displayName, accentColor, enabled, config }) =>
Effect.gen(function* () {
const effectiveConfig = { ...config, enabled } satisfies PiSettings;
const continuationIdentity = piContinuationIdentity(effectiveConfig, instanceId);
const stampIdentity = withInstanceIdentity({
instanceId,
displayName,
accentColor,
continuationGroupKey: continuationIdentity.continuationKey,
});
const adapter = yield* makePiAdapter(effectiveConfig, { instanceId });
const textGeneration = yield* makePiTextGeneration(effectiveConfig);
const serverConfig = yield* ServerConfig;
const snapshot = yield* makeManagedServerProvider<PiSettings>({
maintenanceCapabilities: makeManualOnlyProviderMaintenanceCapabilities({
provider: DRIVER_KIND,
packageName: "@mariozechner/pi-coding-agent",
}),
getSettings: Effect.succeed(effectiveConfig),
streamSettings: Stream.never,
haveSettingsChanged: () => false,
initialSnapshot: (settings) => stampIdentity(makePendingPiProvider(settings)),
checkProvider: checkPiProviderStatus(effectiveConfig, serverConfig.cwd).pipe(
Effect.map(stampIdentity),
),
refreshInterval: SNAPSHOT_REFRESH_INTERVAL,
}).pipe(
Effect.mapError(
(cause) =>
new ProviderDriverError({
driver: DRIVER_KIND,
instanceId,
detail: `Failed to build Pi snapshot: ${cause instanceof Error ? cause.message : String(cause)}`,
cause,
}),
),
);
return {
instanceId,
driverKind: DRIVER_KIND,
continuationIdentity,
displayName,
accentColor,
enabled,
snapshot,
adapter,
textGeneration,
} satisfies ProviderInstance;
}),
};
@@ -0,0 +1,50 @@
import type { AgentSessionEvent } from "@mariozechner/pi-coding-agent";
import { ProviderInstanceId, ThreadId, TurnId } from "@t3tools/contracts";
import { describe, expect, it } from "vitest";
import { mapPiDisplayMessageEndEvent } from "./PiAdapter.ts";
describe("mapPiDisplayMessageEndEvent", () => {
const context = {
threadId: ThreadId.make("thread-1"),
providerInstanceId: ProviderInstanceId.make("pi"),
activeTurnId: TurnId.make("turn-1"),
};
it("projects display custom messages from extension commands into assistant output", () => {
const events = mapPiDisplayMessageEndEvent(context, {
type: "message_end",
message: {
role: "custom",
customType: "oc",
content: "Generated output from /oc",
display: true,
timestamp: Date.now(),
},
} as Extract<AgentSessionEvent, { readonly type: "message_end" }>);
expect(events).toHaveLength(1);
expect(events[0]?.type).toBe("item.completed");
if (events[0]?.type !== "item.completed") {
throw new Error("expected item.completed");
}
expect(events[0].turnId).toBe("turn-1");
expect(events[0].payload.itemType).toBe("assistant_message");
expect(events[0].payload.detail).toBe("Generated output from /oc");
});
it("ignores hidden custom messages", () => {
const events = mapPiDisplayMessageEndEvent(context, {
type: "message_end",
message: {
role: "custom",
customType: "context",
content: "Hidden context",
display: false,
timestamp: Date.now(),
},
} as Extract<AgentSessionEvent, { readonly type: "message_end" }>);
expect(events).toEqual([]);
});
});
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,417 @@
import { join } from "node:path";
import {
AuthStorage,
DefaultResourceLoader,
ExtensionRunner,
getAgentDir,
ModelRegistry,
SessionManager,
VERSION,
type Skill,
} from "@mariozechner/pi-coding-agent";
import {
type ModelCapabilities,
type PiExtensionConfiguredPayload,
PiSettings,
ProviderDriverKind,
type ServerProvider,
type ServerProviderModel,
type ServerProviderSkill,
type ServerProviderSlashCommand,
} from "@t3tools/contracts";
import { createModelCapabilities } from "@t3tools/shared/model";
import { Effect } from "effect";
import { expandHomePath } from "../../pathExpansion.ts";
import {
buildSelectOptionDescriptor,
buildServerProvider,
providerModelsFromSettings,
type ServerProviderDraft,
} from "../providerSnapshot.ts";
import { PI_BUILT_IN_SLASH_COMMANDS } from "../pi/PiSlashCommands.ts";
import { toPiJsonValue } from "../pi/jsonSafe.ts";
const DRIVER_KIND = ProviderDriverKind.make("pi");
const PI_PRESENTATION = {
displayName: "Pi",
badgeLabel: "Full Access",
showInteractionModeToggle: false,
} as const;
const PI_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"] as const;
type PiThinkingLevel = (typeof PI_THINKING_LEVELS)[number];
const PI_THINKING_LABELS: Record<PiThinkingLevel, string> = {
off: "Off",
minimal: "Minimal",
low: "Low",
medium: "Medium",
high: "High",
xhigh: "Extra High",
};
const DEFAULT_PI_THINKING_LEVEL: PiThinkingLevel = "medium";
const DEFAULT_PI_MODEL_CAPABILITIES: ModelCapabilities = createModelCapabilities({
optionDescriptors: [
buildSelectOptionDescriptor({
id: "reasoningEffort",
label: "Reasoning",
options: PI_THINKING_LEVELS.map((level) => ({
value: level,
label: PI_THINKING_LABELS[level],
isDefault: level === DEFAULT_PI_THINKING_LEVEL,
})),
}),
],
});
export function resolvePiAgentDir(settings: PiSettings): string | undefined {
const configured = settings.agentDir.trim();
return configured.length > 0 ? expandHomePath(configured) : undefined;
}
function resolveEffectivePiAgentDir(settings: PiSettings): string {
return resolvePiAgentDir(settings) ?? getAgentDir();
}
export function resolvePiSessionDir(settings: PiSettings): string | undefined {
const configured = settings.sessionDir.trim();
return configured.length > 0 ? expandHomePath(configured) : undefined;
}
function makePiAuthStorage(settings: PiSettings): AuthStorage {
const agentDir = resolvePiAgentDir(settings);
return AuthStorage.create(agentDir ? join(agentDir, "auth.json") : undefined);
}
function makePiModelRegistry(settings: PiSettings): ModelRegistry {
const agentDir = resolvePiAgentDir(settings);
const authStorage = makePiAuthStorage(settings);
return ModelRegistry.create(authStorage, agentDir ? join(agentDir, "models.json") : undefined);
}
type PiModel = ReturnType<ModelRegistry["getAll"]>[number];
function getPiSupportedThinkingLevels(model: PiModel): ReadonlyArray<PiThinkingLevel> {
if (!model.reasoning) {
return ["off"];
}
return PI_THINKING_LEVELS.filter((level) => {
const mapped = model.thinkingLevelMap?.[level];
if (mapped === null) {
return false;
}
return level !== "xhigh" || mapped !== undefined;
});
}
function piModelCapabilities(model: PiModel): ModelCapabilities {
const levels = getPiSupportedThinkingLevels(model);
if (levels.length === 0) {
return createModelCapabilities({ optionDescriptors: [] });
}
const defaultLevel = levels.includes(DEFAULT_PI_THINKING_LEVEL)
? DEFAULT_PI_THINKING_LEVEL
: levels[0];
return createModelCapabilities({
optionDescriptors: [
buildSelectOptionDescriptor({
id: "reasoningEffort",
label: "Reasoning",
options: levels.map((level) => ({
value: level,
label: PI_THINKING_LABELS[level],
isDefault: level === defaultLevel,
})),
}),
],
});
}
export function piModelToServerModel(model: PiModel): ServerProviderModel {
const slug = `${model.provider}/${model.id}`;
return {
slug,
name: model.name.trim() || slug,
shortName: model.id,
subProvider: model.provider,
isCustom: false,
capabilities: piModelCapabilities(model),
};
}
function piSkillToServerSkill(skill: Skill): ServerProviderSkill | undefined {
const name = skill.name.trim();
if (!name) {
return undefined;
}
const description = skill.description.trim();
return {
name,
path: skill.filePath,
enabled: !skill.disableModelInvocation,
displayName: name,
...(description ? { description } : {}),
...(description ? { shortDescription: description } : {}),
};
}
type PiResolvedCommand = ReturnType<ExtensionRunner["getRegisteredCommands"]>[number];
type PiRegisteredTool = ReturnType<ExtensionRunner["getAllRegisteredTools"]>[number];
export interface PiExtensionInventory {
readonly extensionPaths: ReadonlyArray<string>;
readonly slashCommands: PiExtensionConfiguredPayload["slashCommands"];
readonly tools: PiExtensionConfiguredPayload["tools"];
readonly flags: ReadonlyArray<string>;
}
interface PiProviderResources {
readonly slashCommands: ReadonlyArray<ServerProviderSlashCommand>;
readonly skills: ReadonlyArray<ServerProviderSkill>;
readonly pi: NonNullable<ServerProvider["pi"]>;
}
function optionalTrimmed(value: string | undefined): string | undefined {
const trimmed = value?.trim();
return trimmed && trimmed.length > 0 ? trimmed : undefined;
}
export function piExtensionCommandToSnapshot(
command: PiResolvedCommand,
): PiExtensionInventory["slashCommands"][number] {
const commandRecord = Object(command) as Record<string, unknown>;
const input =
commandRecord.input && typeof commandRecord.input === "object"
? (commandRecord.input as { readonly hint?: unknown })
: undefined;
const name =
typeof commandRecord.invocationName === "string" ? commandRecord.invocationName : command.name;
const description = optionalTrimmed(command.description);
const sourceInfo = toPiJsonValue(command.sourceInfo);
const snapshot = {
name,
source: "extension",
...(sourceInfo !== undefined ? { sourceInfo } : {}),
...(description ? { description } : {}),
};
return typeof input?.hint === "string"
? Object.assign(snapshot, { input: { hint: input.hint } })
: snapshot;
}
export function piExtensionToolToSnapshot(
tool: PiRegisteredTool,
): PiExtensionInventory["tools"][number] {
const description = optionalTrimmed(tool.definition.description);
const sourceInfo = toPiJsonValue(tool.sourceInfo);
return {
name: tool.definition.name,
...(description ? { description } : {}),
...(sourceInfo !== undefined ? { sourceInfo } : {}),
};
}
export function getPiExtensionInventoryFromRunner(
runner: ExtensionRunner | undefined,
): PiExtensionInventory {
if (!runner) {
return {
extensionPaths: [],
slashCommands: [],
tools: [],
flags: [],
};
}
return {
extensionPaths: runner.getExtensionPaths(),
slashCommands: runner.getRegisteredCommands().map(piExtensionCommandToSnapshot),
tools: runner.getAllRegisteredTools().map(piExtensionToolToSnapshot),
flags: [...runner.getFlags().keys()],
};
}
function mergePiSlashCommands(
baseCommands: ReadonlyArray<ServerProviderSlashCommand>,
extensionCommands: ReadonlyArray<ServerProviderSlashCommand>,
): ReadonlyArray<ServerProviderSlashCommand> {
const commands = [...baseCommands];
const seen = new Set(commands.map((command) => command.name));
for (const command of extensionCommands) {
if (seen.has(command.name)) continue;
commands.push(command);
seen.add(command.name);
}
return commands;
}
function piSnapshotCommandToServerSlashCommand(
command: PiExtensionInventory["slashCommands"][number],
): ServerProviderSlashCommand {
const description = optionalTrimmed(command.description);
const input =
command.input && typeof command.input === "object"
? (command.input as { readonly hint?: unknown })
: undefined;
const hint = typeof input?.hint === "string" ? optionalTrimmed(input.hint) : undefined;
return {
name: command.name,
...(description ? { description } : {}),
...(hint ? { input: { hint } } : {}),
};
}
async function loadPiProviderResources(
settings: PiSettings,
cwd: string,
): Promise<PiProviderResources> {
const agentDir = resolveEffectivePiAgentDir(settings);
const loader = new DefaultResourceLoader({
cwd,
agentDir,
});
await loader.reload();
const extensions = loader.getExtensions();
const runner = new ExtensionRunner(
extensions.extensions,
extensions.runtime,
cwd,
SessionManager.inMemory(cwd),
makePiModelRegistry(settings),
);
const inventory = getPiExtensionInventoryFromRunner(runner);
const extensionCommands = inventory.slashCommands.map(piSnapshotCommandToServerSlashCommand);
return {
slashCommands: mergePiSlashCommands(PI_BUILT_IN_SLASH_COMMANDS, extensionCommands),
skills: loader
.getSkills()
.skills.map(piSkillToServerSkill)
.filter((skill) => skill !== undefined),
pi: {
extensionPaths: [...inventory.extensionPaths],
tools: [...inventory.tools],
flags: [...inventory.flags],
},
};
}
function fallbackPiProviderResources(): PiProviderResources {
return {
slashCommands: PI_BUILT_IN_SLASH_COMMANDS,
skills: [],
pi: {
extensionPaths: [],
tools: [],
flags: [],
},
};
}
export function makePendingPiProvider(settings: PiSettings): ServerProviderDraft {
return buildServerProvider({
driver: DRIVER_KIND,
presentation: PI_PRESENTATION,
enabled: settings.enabled,
checkedAt: new Date().toISOString(),
models: providerModelsFromSettings(
[],
DRIVER_KIND,
settings.customModels,
DEFAULT_PI_MODEL_CAPABILITIES,
),
slashCommands: PI_BUILT_IN_SLASH_COMMANDS,
skills: [],
probe: {
installed: true,
version: VERSION,
status: "warning",
auth: {
status: "unknown",
type: "pi",
label: "Pi",
},
message: "Checking Pi configuration...",
},
});
}
export const checkPiProviderStatus = (settings: PiSettings, cwd = process.cwd()) =>
Effect.promise(async () => {
try {
const modelRegistry = makePiModelRegistry(settings);
const availableModels = modelRegistry.getAvailable();
const authenticated = availableModels.some((model) => modelRegistry.hasConfiguredAuth(model));
const builtInModels = availableModels.map(piModelToServerModel);
let resources = fallbackPiProviderResources();
let resourceMessage: string | undefined;
try {
resources = await loadPiProviderResources(settings, cwd);
} catch (cause) {
resourceMessage = cause instanceof Error ? cause.message : String(cause);
}
const message = authenticated
? resourceMessage
? `Failed to read Pi extensions or skills: ${resourceMessage}`
: undefined
: "Pi has no configured authenticated model.";
return buildServerProvider({
driver: DRIVER_KIND,
presentation: PI_PRESENTATION,
enabled: settings.enabled,
checkedAt: new Date().toISOString(),
models: providerModelsFromSettings(
builtInModels,
DRIVER_KIND,
settings.customModels,
DEFAULT_PI_MODEL_CAPABILITIES,
),
slashCommands: resources.slashCommands,
skills: resources.skills,
pi: resources.pi,
probe: {
installed: true,
version: VERSION,
status: authenticated && !resourceMessage ? "ready" : "warning",
auth: {
status: authenticated ? "authenticated" : "unauthenticated",
type: "pi",
label: "Pi",
},
...(message ? { message } : {}),
},
});
} catch (cause) {
const message = cause instanceof Error ? cause.message : String(cause);
return buildServerProvider({
driver: DRIVER_KIND,
presentation: PI_PRESENTATION,
enabled: settings.enabled,
checkedAt: new Date().toISOString(),
models: providerModelsFromSettings(
[],
DRIVER_KIND,
settings.customModels,
DEFAULT_PI_MODEL_CAPABILITIES,
),
slashCommands: PI_BUILT_IN_SLASH_COMMANDS,
skills: [],
probe: {
installed: true,
version: VERSION,
status: "error",
auth: {
status: "unknown",
type: "pi",
label: "Pi",
},
message: `Failed to read Pi configuration: ${message}`,
},
});
}
});
@@ -512,6 +512,62 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
]);
});
it("prunes models that disappear from a non-empty refreshed provider snapshot", () => {
const previousProvider = {
instanceId: ProviderInstanceId.make("pi"),
driver: ProviderDriverKind.make("pi"),
status: "ready",
enabled: true,
installed: true,
auth: { status: "authenticated" },
checkedAt: "2026-04-14T00:00:00.000Z",
version: "0.73.0",
models: [
{
slug: "openai/gpt-5.5",
name: "GPT-5.5",
isCustom: false,
capabilities: createModelCapabilities({
optionDescriptors: [
selectDescriptor("reasoning", "Reasoning", [
{ id: "medium", label: "Medium", isDefault: true },
]),
],
}),
},
{
slug: "openrouter/anthropic/claude-opus-4.6",
name: "Claude Opus 4.6",
subProvider: "openrouter",
isCustom: false,
capabilities: createModelCapabilities({
optionDescriptors: [],
}),
},
],
slashCommands: [],
skills: [],
} as const satisfies ServerProvider;
const refreshedProvider = {
...previousProvider,
checkedAt: "2026-04-14T00:01:00.000Z",
models: [
{
slug: "openai/gpt-5.5",
name: "GPT-5.5",
isCustom: false,
capabilities: createModelCapabilities({
optionDescriptors: [],
}),
},
],
} satisfies ServerProvider;
assert.deepStrictEqual(mergeProviderSnapshot(previousProvider, refreshedProvider).models, [
previousProvider.models[0],
]);
});
it("persists merged provider snapshots for the providers that were refreshed", () => {
const previousProviders = [
{
@@ -1231,6 +1287,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
"codex",
"cursor",
"opencode",
"pi",
]);
assert.strictEqual(cursorProvider?.enabled, false);
assert.strictEqual(cursorProvider?.status, "disabled");
@@ -89,8 +89,7 @@ const mergeProviderModels = (
capabilities: previousModel.capabilities,
};
});
const nextSlugs = new Set(nextModels.map((model) => model.slug));
return [...mergedModels, ...previousModels.filter((model) => !nextSlugs.has(model.slug))];
return mergedModels;
};
export const mergeProviderSnapshot = (
+4 -1
View File
@@ -24,6 +24,7 @@ import { ClaudeDriver, type ClaudeDriverEnv } from "./Drivers/ClaudeDriver.ts";
import { CodexDriver, type CodexDriverEnv } from "./Drivers/CodexDriver.ts";
import { CursorDriver, type CursorDriverEnv } from "./Drivers/CursorDriver.ts";
import { OpenCodeDriver, type OpenCodeDriverEnv } from "./Drivers/OpenCodeDriver.ts";
import { PiDriver, type PiDriverEnv } from "./Drivers/PiDriver.ts";
import type { AnyProviderDriver } from "./ProviderDriver.ts";
/**
@@ -35,7 +36,8 @@ export type BuiltInDriversEnv =
| ClaudeDriverEnv
| CodexDriverEnv
| CursorDriverEnv
| OpenCodeDriverEnv;
| OpenCodeDriverEnv
| PiDriverEnv;
/**
* Ordered list of built-in drivers. Order matters only for tie-breaking in
@@ -47,4 +49,5 @@ export const BUILT_IN_DRIVERS: ReadonlyArray<AnyProviderDriver<BuiltInDriversEnv
ClaudeDriver,
CursorDriver,
OpenCodeDriver,
PiDriver,
];
@@ -0,0 +1,69 @@
import { ProviderInstanceId, ThreadId, type ProviderRuntimeEvent } from "@t3tools/contracts";
import { describe, expect, it } from "vitest";
import { makePiExtensionUiBridge } from "./PiExtensionUiBridge.ts";
describe("makePiExtensionUiBridge", () => {
it("provides a Pi-compatible plain-text theme and routes status to Pi panel state", async () => {
const events: ProviderRuntimeEvent[] = [];
const bridge = makePiExtensionUiBridge({
getContext: () => ({
threadId: ThreadId.make("thread-1"),
providerInstanceId: ProviderInstanceId.make("pi"),
activeTurnId: undefined,
}),
publishRuntimeEvent: async (event) => {
events.push(event);
},
});
expect(bridge.uiContext.theme.fg("dim", "generating")).toBe("generating");
bridge.uiContext.setStatus("tps", bridge.uiContext.theme.fg("accent", "42 tok/s"));
await Promise.resolve();
expect(events[0]?.type).toBe("pi.ui.state.updated");
const [event] = events;
if (event?.type !== "pi.ui.state.updated") {
throw new Error("expected pi.ui.state.updated");
}
expect(event.payload.surface).toBe("status");
expect(event.payload.key).toBe("tps");
expect(event.payload.text).toBe("42 tok/s");
});
it("publishes only JSON-safe extension activity data", async () => {
const events: ProviderRuntimeEvent[] = [];
const bridge = makePiExtensionUiBridge({
getContext: () => ({
threadId: ThreadId.make("thread-1"),
providerInstanceId: ProviderInstanceId.make("pi"),
activeTurnId: undefined,
}),
publishRuntimeEvent: async (event) => {
events.push(event);
},
});
await bridge.publishActivity({
activityType: "widget",
message: "Widget updated",
data: {
path: "/tmp/pi-extension.ts",
baseDir: undefined,
render: () => undefined,
nested: { ok: true, missing: undefined },
},
});
expect(events[0]?.type).toBe("extension.activity");
const [event] = events;
if (event?.type !== "extension.activity") {
throw new Error("expected extension.activity");
}
expect(event.payload.data).toEqual({
path: "/tmp/pi-extension.ts",
nested: { ok: true },
});
});
});
@@ -0,0 +1,698 @@
import {
type ExtensionActivityPayload,
type PiExtensionDiagnosticPayload,
type PiUiStateUpdatedPayload,
ApprovalRequestId,
RuntimeRequestId,
type ProviderRuntimeEvent,
type ProviderUserInputAnswers,
type ThreadId,
type TurnId,
type UserInputQuestion,
EventId,
ProviderDriverKind,
ProviderInstanceId,
} from "@t3tools/contracts";
import {
Theme,
type ExtensionUIContext,
type ExtensionUIDialogOptions,
type ExtensionWidgetOptions,
type ThemeColor,
} from "@mariozechner/pi-coding-agent";
import { toPiJsonValue } from "./jsonSafe.ts";
export interface PiExtensionUiBridgeContext {
readonly threadId: ThreadId;
readonly providerInstanceId: ProviderInstanceId;
readonly activeTurnId: TurnId | undefined;
}
export type PiRuntimeEventPublisher = (event: ProviderRuntimeEvent) => Promise<void>;
interface PendingPiExtensionDialog {
readonly kind: "select" | "confirm" | "input" | "editor";
readonly resolve: (value: string | boolean | undefined) => void;
}
export interface PiExtensionUiBridge {
readonly uiContext: ExtensionUIContext;
readonly respond: (
requestId: ApprovalRequestId,
answers: ProviderUserInputAnswers,
) => Promise<void>;
readonly publishActivity: (activity: PiExtensionActivityInput) => Promise<void>;
readonly publishDiagnostic: (diagnostic: PiExtensionDiagnosticInput) => Promise<void>;
readonly dispose: () => void;
}
interface PiExtensionActivityInput {
readonly activityType: ExtensionActivityPayload["activityType"];
readonly message: string;
readonly severity?: "info" | "warning" | "error";
readonly extensionPath?: string;
readonly data?: unknown;
}
interface PiUiStateInput {
readonly surface: PiUiStateUpdatedPayload["surface"];
readonly key: string;
readonly label?: string;
readonly text?: string;
readonly lines?: readonly string[];
readonly state?: PiUiStateUpdatedPayload["state"];
readonly placement?: string;
readonly extensionPath?: string;
readonly data?: unknown;
}
interface PiExtensionDiagnosticInput {
readonly message: string;
readonly severity?: PiExtensionDiagnosticPayload["severity"];
readonly visibility?: PiExtensionDiagnosticPayload["visibility"];
readonly extensionPath?: string;
readonly event?: string;
readonly diagnosticKey?: string;
readonly repeatCount?: number;
readonly hiddenCount?: number;
readonly detail?: unknown;
}
interface UiStatePublicationState {
lastPublishedAt: number;
lastSignature: string | null;
pending: PiUiStateInput | null;
pendingSignature: string | null;
timeout: ReturnType<typeof setTimeout> | null;
}
const UI_STATE_THROTTLE_MS = 250;
const ANSI_PATTERN = new RegExp(String.raw`\x1B\[[0-?]*[ -/]*[@-~]`, "g");
const fallbackFgColors = {
accent: "#7aa2f7",
border: "#6b7280",
borderAccent: "#7aa2f7",
borderMuted: "#4b5563",
success: "#80c990",
error: "#f7768e",
warning: "#e0af68",
muted: "#9ca3af",
dim: "#6b7280",
text: "#d1d5db",
thinkingText: "#9ca3af",
userMessageText: "#d1d5db",
customMessageText: "#d1d5db",
customMessageLabel: "#9ca3af",
toolTitle: "#d1d5db",
toolOutput: "#d1d5db",
mdHeading: "#d1d5db",
mdLink: "#7aa2f7",
mdLinkUrl: "#9ca3af",
mdCode: "#d1d5db",
mdCodeBlock: "#d1d5db",
mdCodeBlockBorder: "#4b5563",
mdQuote: "#9ca3af",
mdQuoteBorder: "#4b5563",
mdHr: "#4b5563",
mdListBullet: "#9ca3af",
toolDiffAdded: "#80c990",
toolDiffRemoved: "#f7768e",
toolDiffContext: "#9ca3af",
syntaxComment: "#6b7280",
syntaxKeyword: "#bb9af7",
syntaxFunction: "#7aa2f7",
syntaxVariable: "#d1d5db",
syntaxString: "#9ece6a",
syntaxNumber: "#ff9e64",
syntaxType: "#2ac3de",
syntaxOperator: "#89ddff",
syntaxPunctuation: "#9ca3af",
thinkingOff: "#6b7280",
thinkingMinimal: "#9ca3af",
thinkingLow: "#7aa2f7",
thinkingMedium: "#e0af68",
thinkingHigh: "#ff9e64",
thinkingXhigh: "#f7768e",
bashMode: "#7aa2f7",
} satisfies Record<ThemeColor, string | number>;
const fallbackBgColors: ConstructorParameters<typeof Theme>[1] = {
selectedBg: "#1f2937",
userMessageBg: "#111827",
customMessageBg: "#111827",
toolPendingBg: "#111827",
toolSuccessBg: "#111827",
toolErrorBg: "#111827",
};
class PlainTextPiTheme extends Theme {
constructor() {
super(fallbackFgColors, fallbackBgColors, "truecolor", { name: "t3" });
}
override fg(_color: ThemeColor, text: string) {
return text;
}
override bg(_color: Parameters<Theme["bg"]>[0], text: string) {
return text;
}
override bold(text: string) {
return text;
}
override italic(text: string) {
return text;
}
override underline(text: string) {
return text;
}
override inverse(text: string) {
return text;
}
override strikethrough(text: string) {
return text;
}
override getFgAnsi(_color: ThemeColor) {
return "";
}
override getBgAnsi(_color: Parameters<Theme["bg"]>[0]) {
return "";
}
override getThinkingBorderColor(_level: Parameters<Theme["getThinkingBorderColor"]>[0]) {
return (text: string) => text;
}
override getBashModeBorderColor() {
return (text: string) => text;
}
}
const fallbackTheme = new PlainTextPiTheme();
function nowIso() {
return new Date().toISOString();
}
function nextEventId() {
return EventId.make(crypto.randomUUID());
}
function baseEvent(context: PiExtensionUiBridgeContext) {
return {
eventId: nextEventId(),
provider: ProviderDriverKind.make("pi"),
providerInstanceId: context.providerInstanceId,
threadId: context.threadId,
...(context.activeTurnId ? { turnId: context.activeTurnId } : {}),
createdAt: nowIso(),
};
}
function trimToMessage(value: string, fallback: string) {
const trimmed = value.trim();
return trimmed.length > 0 ? trimmed : fallback;
}
function stripAnsi(value: string) {
return value.replace(ANSI_PATTERN, "");
}
function sanitizeDisplayText(value: string | undefined): string | undefined {
return value === undefined ? undefined : stripAnsi(value);
}
function uiStateKey(state: Pick<PiUiStateInput, "surface" | "key">) {
return `${state.surface}:${state.key}`;
}
function uiStateSignature(state: PiUiStateInput) {
return JSON.stringify({
surface: state.surface,
key: state.key,
label: state.label,
text: state.text,
lines: state.lines,
state: state.state,
placement: state.placement,
});
}
function makeQuestion(input: {
readonly requestId: ApprovalRequestId;
readonly kind: PendingPiExtensionDialog["kind"];
readonly title: string;
readonly message?: string | undefined;
readonly options?: readonly string[] | undefined;
readonly placeholder?: string | undefined;
readonly prefill?: string | undefined;
}): UserInputQuestion {
if (input.kind === "confirm") {
return {
id: input.requestId,
header: trimToMessage(input.title, "Confirm"),
question: trimToMessage(input.message ?? input.title, input.title),
inputKind: "confirm",
options: [
{ label: "Yes", description: "Yes" },
{ label: "No", description: "No" },
],
multiSelect: false,
};
}
if (input.kind === "input" || input.kind === "editor") {
return {
id: input.requestId,
header: trimToMessage(input.title, input.kind === "input" ? "Input" : "Editor"),
question: trimToMessage(input.message ?? input.title, input.title),
inputKind: input.kind === "input" ? "text" : "textarea",
options: [],
...(input.placeholder ? { placeholder: input.placeholder } : {}),
...(input.prefill ? { prefill: input.prefill } : {}),
multiSelect: false,
};
}
return {
id: input.requestId,
header: trimToMessage(input.title, "Select"),
question: trimToMessage(input.message ?? input.title, input.title),
inputKind: "select",
options: (input.options ?? []).map((option) => ({
label: trimToMessage(option, "Option"),
description: trimToMessage(option, "Option"),
})),
multiSelect: false,
};
}
function firstAnswer(answers: ProviderUserInputAnswers): unknown {
const first = Object.values(answers)[0];
return Array.isArray(first) ? first[0] : first;
}
function resolveDialogAnswer(
kind: PendingPiExtensionDialog["kind"],
answers: ProviderUserInputAnswers,
) {
const answer = firstAnswer(answers);
if (typeof answer !== "string") {
return undefined;
}
if (kind === "confirm") {
return answer.toLowerCase() === "yes";
}
return answer;
}
export function makePiExtensionUiBridge(input: {
readonly getContext: () => PiExtensionUiBridgeContext;
readonly publishRuntimeEvent: PiRuntimeEventPublisher;
}): PiExtensionUiBridge {
const pendingDialogs = new Map<ApprovalRequestId, PendingPiExtensionDialog>();
const uiStatePublications = new Map<string, UiStatePublicationState>();
let editorText = "";
let toolsExpanded = false;
const publishActivity = async (activity: PiExtensionActivityInput) => {
const data = toPiJsonValue(activity.data);
await input.publishRuntimeEvent({
...baseEvent(input.getContext()),
type: "extension.activity",
payload: {
source: "pi.extension.ui",
activityType: activity.activityType,
message: trimToMessage(activity.message, "Pi extension activity"),
...(activity.severity ? { severity: activity.severity } : {}),
...(activity.extensionPath ? { extensionPath: activity.extensionPath } : {}),
...(data !== undefined ? { data } : {}),
uiOnly: true,
},
});
};
const publishDiagnostic = async (diagnostic: PiExtensionDiagnosticInput) => {
const detail = toPiJsonValue(diagnostic.detail);
await input.publishRuntimeEvent({
...baseEvent(input.getContext()),
type: "pi.extension.diagnostic",
payload: {
source: "pi.extension",
message: trimToMessage(diagnostic.message, "Pi extension diagnostic"),
severity: diagnostic.severity ?? "warning",
visibility: diagnostic.visibility ?? "pi-panel",
...(diagnostic.extensionPath ? { extensionPath: diagnostic.extensionPath } : {}),
...(diagnostic.event ? { event: diagnostic.event } : {}),
...(diagnostic.diagnosticKey ? { diagnosticKey: diagnostic.diagnosticKey } : {}),
...(diagnostic.repeatCount ? { repeatCount: diagnostic.repeatCount } : {}),
...(diagnostic.hiddenCount !== undefined ? { hiddenCount: diagnostic.hiddenCount } : {}),
...(detail !== undefined ? { detail } : {}),
uiOnly: true,
},
});
};
const publishUiStateNow = async (state: PiUiStateInput) => {
const publicationKey = uiStateKey(state);
const publicationState = uiStatePublications.get(publicationKey);
const signature = uiStateSignature(state);
if (publicationState) {
publicationState.lastPublishedAt = Date.now();
publicationState.lastSignature = signature;
publicationState.pendingSignature = null;
}
const data = toPiJsonValue(state.data);
await input.publishRuntimeEvent({
...baseEvent(input.getContext()),
type: "pi.ui.state.updated",
payload: {
source: "pi.extension.ui",
surface: state.surface,
key: trimToMessage(state.key, state.surface),
...(state.label ? { label: state.label } : {}),
...(state.text !== undefined ? { text: sanitizeDisplayText(state.text) } : {}),
...(state.lines ? { lines: state.lines.map(stripAnsi) } : {}),
...(state.state ? { state: state.state } : {}),
...(state.placement ? { placement: state.placement } : {}),
...(state.extensionPath ? { extensionPath: state.extensionPath } : {}),
...(data !== undefined ? { data } : {}),
uiOnly: true,
},
});
};
const publishUiState = (state: PiUiStateInput, options?: { readonly throttle?: boolean }) => {
const publicationKey = uiStateKey(state);
const signature = uiStateSignature(state);
const existing = uiStatePublications.get(publicationKey);
const publicationState =
existing ??
({
lastPublishedAt: 0,
lastSignature: null,
pending: null,
pendingSignature: null,
timeout: null,
} satisfies UiStatePublicationState);
if (!existing) {
uiStatePublications.set(publicationKey, publicationState);
}
if (
publicationState.lastSignature === signature ||
publicationState.pendingSignature === signature
) {
return;
}
if (!options?.throttle) {
if (publicationState.timeout) {
clearTimeout(publicationState.timeout);
publicationState.timeout = null;
publicationState.pending = null;
publicationState.pendingSignature = null;
}
void publishUiStateNow(state);
return;
}
const elapsed = Date.now() - publicationState.lastPublishedAt;
if (elapsed >= UI_STATE_THROTTLE_MS) {
void publishUiStateNow(state);
return;
}
publicationState.pending = state;
publicationState.pendingSignature = signature;
if (publicationState.timeout) {
return;
}
publicationState.timeout = setTimeout(() => {
publicationState.timeout = null;
const pending = publicationState.pending;
publicationState.pending = null;
publicationState.pendingSignature = null;
if (pending) {
void publishUiStateNow(pending);
}
}, UI_STATE_THROTTLE_MS - elapsed);
publicationState.timeout.unref?.();
};
const openDialog = <T extends string | boolean>(dialog: {
readonly kind: PendingPiExtensionDialog["kind"];
readonly title: string;
readonly message?: string | undefined;
readonly options?: readonly string[] | undefined;
readonly placeholder?: string | undefined;
readonly prefill?: string | undefined;
readonly opts?: ExtensionUIDialogOptions | undefined;
}) =>
new Promise<T | undefined>((resolve) => {
if (dialog.opts?.signal?.aborted) {
resolve(undefined);
return;
}
const requestId = ApprovalRequestId.make(crypto.randomUUID());
pendingDialogs.set(requestId, {
kind: dialog.kind,
resolve: (value) => resolve(value as T | undefined),
});
const abort = () => {
pendingDialogs.delete(requestId);
resolve(undefined);
};
dialog.opts?.signal?.addEventListener("abort", abort, { once: true });
if (dialog.opts?.timeout && dialog.opts.timeout > 0) {
setTimeout(abort, dialog.opts.timeout).unref?.();
}
void input.publishRuntimeEvent({
...baseEvent(input.getContext()),
type: "user-input.requested",
requestId: RuntimeRequestId.make(requestId),
payload: {
questions: [
makeQuestion({
requestId,
kind: dialog.kind,
title: dialog.title,
message: dialog.message,
options: dialog.options,
placeholder: dialog.placeholder,
prefill: dialog.prefill,
}),
],
},
});
});
const publishUnsupportedUi = (input: {
readonly surface: PiUiStateInput["surface"];
readonly key: string;
readonly message: string;
readonly data?: unknown;
}) => {
publishUiState({
surface: input.surface,
key: input.key,
text: input.message,
state: "unsupported",
data: input.data,
});
void publishDiagnostic({
message: input.message,
severity: "warning",
detail: input.data,
});
};
const uiContext: ExtensionUIContext = {
select: (title, options, opts) => openDialog({ kind: "select", title, options, opts }),
confirm: async (title, message, opts) => {
const value = await openDialog<boolean>({ kind: "confirm", title, message, opts });
return value === true;
},
input: (title, placeholder, opts) => openDialog({ kind: "input", title, placeholder, opts }),
notify: (message, type = "info") => {
void publishActivity({ activityType: "notify", message: stripAnsi(message), severity: type });
},
onTerminalInput: () => () => {},
setStatus: (key, text) => {
publishUiState(
{
surface: "status",
key,
label: key,
...(text === undefined ? { state: "cleared" } : { text, state: "set" }),
},
{ throttle: true },
);
},
setWorkingMessage: (message) => {
publishUiState(
{
surface: "status",
key: "working",
label: "working",
...(message === undefined ? { state: "cleared" } : { text: message, state: "set" }),
},
{ throttle: true },
);
},
setWorkingVisible: () => {},
setWorkingIndicator: () => {},
setHiddenThinkingLabel: () => {},
setWidget: (
key: string,
content: string[] | ((...args: ReadonlyArray<never>) => unknown) | undefined,
options?: ExtensionWidgetOptions,
) => {
if (Array.isArray(content)) {
publishUiState({
surface: "widget",
key,
label: key,
lines: content,
state: "set",
...(options?.placement ? { placement: options.placement } : {}),
data: { options },
});
return;
}
if (content === undefined) {
publishUiState({ surface: "widget", key, state: "cleared" });
return;
}
if (typeof content === "function") {
publishUnsupportedUi({
surface: "widget",
key,
message: "Custom widget rendering is not available in T3 yet.",
data: { key, options },
});
}
},
setFooter: (factory) => {
if (factory) {
publishUnsupportedUi({
surface: "footer",
key: "custom",
message: "Custom footer rendering is not available in T3 yet.",
data: { surface: "footer" },
});
return;
}
publishUiState({ surface: "footer", key: "custom", state: "cleared" });
},
setHeader: (factory) => {
if (factory) {
publishUnsupportedUi({
surface: "header",
key: "custom",
message: "Custom header rendering is not available in T3 yet.",
data: { surface: "header" },
});
return;
}
publishUiState({ surface: "header", key: "custom", state: "cleared" });
},
setTitle: (title) => {
publishUiState({ surface: "title", key: "title", label: "title", text: title });
},
custom: async () => {
await publishDiagnostic({
message: "Custom Pi UI is not available in T3 yet.",
severity: "warning",
});
return undefined as never;
},
pasteToEditor: (text) => {
editorText = `${editorText}${text}`;
publishUiState({
surface: "editor",
key: "composer",
text: editorText,
state: "set",
data: { action: "paste" },
});
},
setEditorText: (text) => {
editorText = text;
publishUiState({
surface: "editor",
key: "composer",
text,
state: "set",
data: { action: "set" },
});
},
getEditorText: () => editorText,
editor: (title, prefill) => openDialog({ kind: "editor", title, prefill }),
addAutocompleteProvider: () => {},
setEditorComponent: (factory) => {
if (factory) {
publishUnsupportedUi({
surface: "editor",
key: "custom",
message: "Custom editor rendering is not available in T3 yet.",
data: { surface: "editor" },
});
} else {
publishUiState({ surface: "editor", key: "custom", state: "cleared" });
}
},
getEditorComponent: () => undefined,
theme: fallbackTheme,
getAllThemes: () => [],
getTheme: () => undefined,
setTheme: () => ({
success: false,
error: "T3 Pi theme switching is not implemented yet.",
}),
getToolsExpanded: () => toolsExpanded,
setToolsExpanded: (expanded) => {
toolsExpanded = expanded;
},
};
return {
uiContext,
publishActivity,
publishDiagnostic,
respond: async (requestId, answers) => {
const pending = pendingDialogs.get(requestId);
if (!pending) {
throw new Error(`Unknown pending Pi extension input request: ${requestId}`);
}
pendingDialogs.delete(requestId);
pending.resolve(resolveDialogAnswer(pending.kind, answers));
},
dispose: () => {
for (const publication of uiStatePublications.values()) {
if (publication.timeout) {
clearTimeout(publication.timeout);
}
}
uiStatePublications.clear();
for (const pending of pendingDialogs.values()) {
pending.resolve(undefined);
}
pendingDialogs.clear();
},
};
}
@@ -0,0 +1,46 @@
import type { ServerProviderSlashCommand } from "@t3tools/contracts";
export const PI_BUILT_IN_SLASH_COMMANDS = [
{ name: "settings", description: "Open settings menu" },
{ name: "model", description: "Select model" },
{ name: "scoped-models", description: "Enable or disable scoped models" },
{ name: "export", description: "Export session" },
{ name: "import", description: "Import and resume a session" },
{ name: "share", description: "Share session" },
{ name: "copy", description: "Copy last agent message" },
{ name: "name", description: "Set session display name" },
{ name: "session", description: "Show session info and stats" },
{ name: "changelog", description: "Show changelog entries" },
{ name: "hotkeys", description: "Show keyboard shortcuts" },
{ name: "fork", description: "Create a session fork" },
{ name: "clone", description: "Duplicate current session" },
{ name: "tree", description: "Navigate session tree" },
{ name: "login", description: "Configure provider authentication" },
{ name: "logout", description: "Remove provider authentication" },
{ name: "new", description: "Start a new session" },
{ name: "compact", description: "Compact session context" },
{ name: "resume", description: "Resume a different session" },
{ name: "reload", description: "Reload extensions, skills, prompts, and themes" },
{ name: "quit", description: "Quit Pi" },
] satisfies ReadonlyArray<ServerProviderSlashCommand>;
export function parsePiSlashCommand(text: string):
| {
readonly name: string;
readonly args: string;
}
| undefined {
const trimmed = text.trim();
if (!trimmed.startsWith("/") || trimmed.startsWith("//")) {
return undefined;
}
const withoutSlash = trimmed.slice(1);
const [rawName, ...rest] = withoutSlash.split(/\s+/);
const name = rawName?.trim();
if (!name) {
return undefined;
}
return { name, args: rest.join(" ").trim() };
}
@@ -0,0 +1,35 @@
import { describe, expect, it } from "vitest";
import { toPiJsonValue } from "./jsonSafe.ts";
describe("toPiJsonValue", () => {
it("removes non-JSON object fields before Pi metadata crosses RPC", () => {
const cyclic: Record<string, unknown> = { label: "cycle" };
cyclic.self = cyclic;
expect(
toPiJsonValue({
path: "/Users/davis/.pi/agent/extensions/pi-mcp/src/index.ts",
source: "local",
baseDir: undefined,
nested: {
enabled: true,
missing: undefined,
callback: () => undefined,
},
list: [undefined, Number.NaN, "tool"],
cyclic,
}),
).toEqual({
path: "/Users/davis/.pi/agent/extensions/pi-mcp/src/index.ts",
source: "local",
nested: {
enabled: true,
},
list: [null, null, "tool"],
cyclic: {
label: "cycle",
},
});
});
});
+46
View File
@@ -0,0 +1,46 @@
import type { Schema } from "effect";
export type PiJsonValue = Schema.Json;
function toPiJsonValueInternal(value: unknown, seen: WeakSet<object>): PiJsonValue | undefined {
if (value === null || typeof value === "string" || typeof value === "boolean") {
return value;
}
if (typeof value === "number") {
return Number.isFinite(value) ? value : undefined;
}
if (Array.isArray(value)) {
if (seen.has(value)) return undefined;
seen.add(value);
try {
return value.map((item) => toPiJsonValueInternal(item, seen) ?? null);
} finally {
seen.delete(value);
}
}
if (typeof value === "object" && value !== null) {
if (seen.has(value)) return undefined;
seen.add(value);
try {
const out: Record<string, PiJsonValue> = {};
for (const [key, nested] of Object.entries(value)) {
const jsonValue = toPiJsonValueInternal(nested, seen);
if (jsonValue !== undefined) {
out[key] = jsonValue;
}
}
return out;
} finally {
seen.delete(value);
}
}
return undefined;
}
export function toPiJsonValue(value: unknown): PiJsonValue | undefined {
return toPiJsonValueInternal(value, new WeakSet());
}
@@ -191,6 +191,7 @@ export function buildServerProvider(input: {
models: ReadonlyArray<ServerProviderModel>;
slashCommands?: ReadonlyArray<ServerProviderSlashCommand>;
skills?: ReadonlyArray<ServerProviderSkill>;
pi?: ServerProvider["pi"];
probe: ProviderProbeResult;
}): ServerProviderDraft {
const versionAdvisory = input.driver
@@ -216,6 +217,7 @@ export function buildServerProvider(input: {
models: input.models,
slashCommands: [...(input.slashCommands ?? [])],
skills: [...(input.skills ?? [])],
...(input.pi ? { pi: input.pi } : {}),
...(versionAdvisory ? { versionAdvisory } : {}),
};
}
@@ -63,6 +63,7 @@ export const hydrateCachedProvider = (input: {
checkedAt: input.cachedProvider.checkedAt,
slashCommands: input.cachedProvider.slashCommands,
skills: input.cachedProvider.skills,
...(input.cachedProvider.pi ? { pi: input.cachedProvider.pi } : {}),
};
return input.cachedProvider.message
@@ -0,0 +1,192 @@
import {
AuthStorage,
createAgentSession,
ModelRegistry,
SessionManager,
type AgentSession,
} from "@mariozechner/pi-coding-agent";
import { PiSettings, TextGenerationError, type ModelSelection } from "@t3tools/contracts";
import { sanitizeBranchFragment } from "@t3tools/shared/git";
import { Effect, Schema } from "effect";
import { join } from "node:path";
import { resolvePiAgentDir } from "../provider/Layers/PiProvider.ts";
import {
buildBranchNamePrompt,
buildCommitMessagePrompt,
buildPrContentPrompt,
buildThreadTitlePrompt,
} from "./TextGenerationPrompts.ts";
import { type TextGenerationShape } from "./TextGeneration.ts";
import {
extractJsonObject,
sanitizeCommitSubject,
sanitizePrTitle,
sanitizeThreadTitle,
} from "./TextGenerationUtils.ts";
function findPiModel(settings: PiSettings, modelSelection: ModelSelection) {
const modelSlug = modelSelection.model.trim();
if (!modelSlug || modelSlug === "auto") {
return undefined;
}
const agentDir = resolvePiAgentDir(settings);
const authStorage = AuthStorage.create(agentDir ? join(agentDir, "auth.json") : undefined);
const modelRegistry = ModelRegistry.create(
authStorage,
agentDir ? join(agentDir, "models.json") : undefined,
);
const [provider, modelId] = modelSlug.split("/", 2);
return provider && modelId ? modelRegistry.find(provider, modelId) : undefined;
}
function extractLastAssistantText(session: AgentSession): string {
for (const message of session.messages.toReversed()) {
if (message.role !== "assistant") {
continue;
}
return message.content
.filter((part) => part.type === "text")
.map((part) => part.text)
.join("")
.trim();
}
return "";
}
const toTextGenerationError = (operation: string, cause: unknown) =>
new TextGenerationError({
operation,
detail: cause instanceof Error ? cause.message : String(cause),
cause,
});
export const makePiTextGeneration = (settings: PiSettings) =>
Effect.succeed({
generateCommitMessage: (input) =>
Effect.tryPromise({
try: async () => {
const { prompt, outputSchema } = buildCommitMessagePrompt({
branch: input.branch,
stagedSummary: input.stagedSummary,
stagedPatch: input.stagedPatch,
includeBranch: input.includeBranch ?? false,
});
const generated = await runPiJson({
settings,
operation: "generateCommitMessage",
cwd: input.cwd,
prompt,
outputSchema,
modelSelection: input.modelSelection,
});
return {
subject: sanitizeCommitSubject(requireGeneratedField(generated, "subject")),
body: requireGeneratedField(generated, "body").trim(),
...(input.includeBranch && generated.branch
? { branch: sanitizeBranchFragment(generated.branch) }
: {}),
};
},
catch: (cause) => toTextGenerationError("generateCommitMessage", cause),
}),
generatePrContent: (input) =>
Effect.tryPromise({
try: async () => {
const { prompt, outputSchema } = buildPrContentPrompt({
baseBranch: input.baseBranch,
headBranch: input.headBranch,
commitSummary: input.commitSummary,
diffSummary: input.diffSummary,
diffPatch: input.diffPatch,
});
const generated = await runPiJson({
settings,
operation: "generatePrContent",
cwd: input.cwd,
prompt,
outputSchema,
modelSelection: input.modelSelection,
});
return {
title: sanitizePrTitle(requireGeneratedField(generated, "title")),
body: requireGeneratedField(generated, "body").trim(),
};
},
catch: (cause) => toTextGenerationError("generatePrContent", cause),
}),
generateBranchName: (input) =>
Effect.tryPromise({
try: async () => {
const { prompt, outputSchema } = buildBranchNamePrompt({
message: input.message,
attachments: input.attachments,
});
const generated = await runPiJson({
settings,
operation: "generateBranchName",
cwd: input.cwd,
prompt,
outputSchema,
modelSelection: input.modelSelection,
});
return { branch: sanitizeBranchFragment(requireGeneratedField(generated, "branch")) };
},
catch: (cause) => toTextGenerationError("generateBranchName", cause),
}),
generateThreadTitle: (input) =>
Effect.tryPromise({
try: async () => {
const { prompt, outputSchema } = buildThreadTitlePrompt({
message: input.message,
attachments: input.attachments,
});
const generated = await runPiJson({
settings,
operation: "generateThreadTitle",
cwd: input.cwd,
prompt,
outputSchema,
modelSelection: input.modelSelection,
});
return { title: sanitizeThreadTitle(requireGeneratedField(generated, "title")) };
},
catch: (cause) => toTextGenerationError("generateThreadTitle", cause),
}),
} satisfies TextGenerationShape);
async function runPiJson(input: {
readonly settings: PiSettings;
readonly operation: string;
readonly cwd: string;
readonly prompt: string;
readonly outputSchema: Schema.Top;
readonly modelSelection: ModelSelection;
}): Promise<Record<string, string>> {
const agentDir = resolvePiAgentDir(input.settings);
const model = findPiModel(input.settings, input.modelSelection);
const { session } = await createAgentSession({
cwd: input.cwd,
...(agentDir ? { agentDir } : {}),
sessionManager: SessionManager.inMemory(input.cwd),
...(model ? { model } : {}),
});
try {
await session.prompt(input.prompt, { source: "rpc" });
const text = extractLastAssistantText(session);
const json = extractJsonObject(text);
return Schema.decodeUnknownPromise(Schema.Record(Schema.String, Schema.String))(
JSON.parse(json),
);
} finally {
session.dispose();
}
}
function requireGeneratedField(generated: Record<string, string>, key: string): string {
const value = generated[key]?.trim();
if (!value) {
throw new Error(`Pi text generation did not return '${key}'.`);
}
return value;
}
@@ -8,7 +8,7 @@ import {
} from "../provider/Services/ProviderInstanceRegistry.ts";
import type { ProviderInstance } from "../provider/ProviderDriver.ts";
export type TextGenerationProvider = "codex" | "claudeAgent" | "cursor" | "opencode";
export type TextGenerationProvider = "codex" | "claudeAgent" | "cursor" | "opencode" | "pi";
export interface CommitMessageGenerationInput {
cwd: string;
+156 -112
View File
@@ -1,11 +1,9 @@
import { DiffsHighlighter, getSharedHighlighter, SupportedLanguages } from "@pierre/diffs";
import { CheckIcon, CopyIcon } from "lucide-react";
import React, {
import {
Children,
Suspense,
type MouseEvent as ReactMouseEvent,
isValidElement,
use,
useCallback,
memo,
useEffect,
@@ -22,8 +20,8 @@ import { VscodeEntryIcon } from "./chat/VscodeEntryIcon";
import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
import { stackedThreadToast, toastManager } from "./ui/toast";
import { openInPreferredEditor } from "../editorPreferences";
import { resolveDiffThemeName, type DiffThemeName } from "../lib/diffRendering";
import { fnv1a32 } from "../lib/diffRendering";
import { resolveSyntaxThemeName } from "../lib/syntaxTheme";
import { LRUCache } from "../lib/lruCache";
import { useTheme } from "../hooks/useTheme";
import {
@@ -34,27 +32,6 @@ import {
import { readLocalApi } from "../localApi";
import { cn } from "../lib/utils";
class CodeHighlightErrorBoundary extends React.Component<
{ fallback: ReactNode; children: ReactNode },
{ hasError: boolean }
> {
constructor(props: { fallback: ReactNode; children: ReactNode }) {
super(props);
this.state = { hasError: false };
}
static getDerivedStateFromError() {
return { hasError: true };
}
override render() {
if (this.state.hasError) {
return this.props.fallback;
}
return this.props.children;
}
}
interface ChatMarkdownProps {
text: string;
cwd: string | undefined;
@@ -69,12 +46,26 @@ const highlightedCodeCache = new LRUCache<string>(
MAX_HIGHLIGHT_CACHE_MEMORY_BYTES,
);
const highlighterPromiseCache = new Map<string, Promise<DiffsHighlighter>>();
const unsupportedHighlightLanguages = new Set<string>();
const HIGHLIGHT_LANGUAGE_ALIASES: Readonly<Record<string, string>> = {
baml: "text",
gitignore: "ini",
plaintext: "text",
txt: "text",
};
function normalizeHighlightLanguage(language: string): string {
const normalizedLanguage = language.trim().toLowerCase();
if (!normalizedLanguage) {
return "text";
}
return HIGHLIGHT_LANGUAGE_ALIASES[normalizedLanguage] ?? normalizedLanguage;
}
function extractFenceLanguage(className: string | undefined): string {
const match = className?.match(CODE_FENCE_LANGUAGE_REGEX);
const raw = match?.[1] ?? "text";
// Shiki doesn't bundle a gitignore grammar; ini is a close match (#685)
return raw === "gitignore" ? "ini" : raw;
return normalizeHighlightLanguage(raw);
}
function nodeToPlainText(node: ReactNode): string {
@@ -112,7 +103,7 @@ function extractCodeBlock(
};
}
function createHighlightCacheKey(code: string, language: string, themeName: DiffThemeName): string {
function createHighlightCacheKey(code: string, language: string, themeName: string): string {
return `${fnv1a32(code).toString(36)}:${code.length}:${language}:${themeName}`;
}
@@ -120,27 +111,71 @@ function estimateHighlightedSize(html: string, code: string): number {
return Math.max(html.length * 2, code.length * 3);
}
function getHighlighterPromise(language: string): Promise<DiffsHighlighter> {
const cached = highlighterPromiseCache.get(language);
function getHighlighterPromise(language: string, themeName: string): Promise<DiffsHighlighter> {
const highlighterLanguage = unsupportedHighlightLanguages.has(language) ? "text" : language;
const cacheKey = `${highlighterLanguage}:${themeName}`;
const cached = highlighterPromiseCache.get(cacheKey);
if (cached) return cached;
const promise = getSharedHighlighter({
themes: [resolveDiffThemeName("dark"), resolveDiffThemeName("light")],
langs: [language as SupportedLanguages],
themes: [themeName],
langs: [highlighterLanguage as SupportedLanguages],
preferredHighlighter: "shiki-js",
}).catch((err) => {
highlighterPromiseCache.delete(language);
if (language === "text") {
highlighterPromiseCache.delete(cacheKey);
if (highlighterLanguage === "text") {
// "text" itself failed — Shiki cannot initialize at all, surface the error
throw err;
}
// Language not supported by Shiki — fall back to "text"
return getHighlighterPromise("text");
unsupportedHighlightLanguages.add(highlighterLanguage);
return getHighlighterPromise("text", themeName);
});
highlighterPromiseCache.set(language, promise);
highlighterPromiseCache.set(cacheKey, promise);
return promise;
}
function renderHighlightedHtml(
highlighter: DiffsHighlighter,
code: string,
language: string,
themeName: string,
): string {
const highlightLanguage = unsupportedHighlightLanguages.has(language) ? "text" : language;
try {
return highlighter.codeToHtml(code, {
lang: highlightLanguage as SupportedLanguages,
theme: themeName,
});
} catch (error) {
if (highlightLanguage === "text") {
throw error;
}
unsupportedHighlightLanguages.add(highlightLanguage);
return highlighter.codeToHtml(code, { lang: "text", theme: themeName });
}
}
function scheduleHighlightWork(callback: () => void): () => void {
if (typeof window === "undefined") {
callback();
return () => undefined;
}
const idleWindow = window as Window & {
requestIdleCallback?: (callback: () => void, options?: { timeout: number }) => number;
cancelIdleCallback?: (handle: number) => void;
};
if (idleWindow.requestIdleCallback && idleWindow.cancelIdleCallback) {
const idleHandle = idleWindow.requestIdleCallback(callback, { timeout: 1500 });
return () => idleWindow.cancelIdleCallback?.(idleHandle);
}
const timeoutHandle = window.setTimeout(callback, 0);
return () => window.clearTimeout(timeoutHandle);
}
function MarkdownCodeBlock({ code, children }: { code: string; children: ReactNode }) {
const [copied, setCopied] = useState(false);
const copiedTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
@@ -189,88 +224,97 @@ function MarkdownCodeBlock({ code, children }: { code: string; children: ReactNo
);
}
interface SuspenseShikiCodeBlockProps {
interface ShikiCodeBlockProps {
className: string | undefined;
code: string;
themeName: DiffThemeName;
themeName: string;
isStreaming: boolean;
fallback: ReactNode;
}
function SuspenseShikiCodeBlock({
type HighlightedCodeState = {
cacheKey: string;
html: string;
};
function ShikiCodeBlock({
className,
code,
themeName,
isStreaming,
}: SuspenseShikiCodeBlockProps) {
fallback,
}: ShikiCodeBlockProps) {
const language = extractFenceLanguage(className);
const cacheKey = createHighlightCacheKey(code, language, themeName);
const cachedHighlightedHtml = !isStreaming ? highlightedCodeCache.get(cacheKey) : null;
const [highlightedCode, setHighlightedCode] = useState<HighlightedCodeState | null>(() => {
const cachedHighlightedHtml = isStreaming ? null : highlightedCodeCache.get(cacheKey);
return cachedHighlightedHtml == null ? null : { cacheKey, html: cachedHighlightedHtml };
});
if (cachedHighlightedHtml != null) {
return (
<div
className="chat-markdown-shiki"
dangerouslySetInnerHTML={{ __html: cachedHighlightedHtml }}
/>
);
useEffect(() => {
if (isStreaming) {
setHighlightedCode(null);
return;
}
const cachedHighlightedHtml = highlightedCodeCache.get(cacheKey);
if (cachedHighlightedHtml != null) {
setHighlightedCode({ cacheKey, html: cachedHighlightedHtml });
return;
}
let isCancelled = false;
let cancelHighlightWork: (() => void) | null = null;
setHighlightedCode(null);
void getHighlighterPromise(language, themeName)
.then((highlighter) => {
if (isCancelled) return;
cancelHighlightWork = scheduleHighlightWork(() => {
if (isCancelled) return;
let highlightedHtml: string;
try {
highlightedHtml = renderHighlightedHtml(highlighter, code, language, themeName);
} catch {
return;
}
if (isCancelled) return;
highlightedCodeCache.set(
cacheKey,
highlightedHtml,
estimateHighlightedSize(highlightedHtml, code),
);
setHighlightedCode({ cacheKey, html: highlightedHtml });
});
})
.catch(() => {
if (!isCancelled) {
setHighlightedCode(null);
}
});
return () => {
isCancelled = true;
cancelHighlightWork?.();
};
}, [cacheKey, code, isStreaming, language, themeName]);
const cachedHighlightedHtml = isStreaming ? null : highlightedCodeCache.get(cacheKey);
const activeHighlightedHtml =
cachedHighlightedHtml ?? (highlightedCode?.cacheKey === cacheKey ? highlightedCode.html : null);
if (activeHighlightedHtml == null) {
return <>{fallback}</>;
}
return (
<UncachedShikiCodeBlock
code={code}
language={language}
themeName={themeName}
cacheKey={cacheKey}
isStreaming={isStreaming}
<div
className="chat-markdown-shiki"
dangerouslySetInnerHTML={{ __html: activeHighlightedHtml }}
/>
);
}
interface UncachedShikiCodeBlockProps {
code: string;
language: string;
themeName: DiffThemeName;
cacheKey: string;
isStreaming: boolean;
}
function UncachedShikiCodeBlock({
code,
language,
themeName,
cacheKey,
isStreaming,
}: UncachedShikiCodeBlockProps) {
const highlighter = use(getHighlighterPromise(language));
const highlightedHtml = useMemo(() => {
try {
return highlighter.codeToHtml(code, { lang: language, theme: themeName });
} catch (error) {
// Log highlighting failures for debugging while falling back to plain text
console.warn(
`Code highlighting failed for language "${language}", falling back to plain text.`,
error instanceof Error ? error.message : error,
);
// If highlighting fails for this language, render as plain text
return highlighter.codeToHtml(code, { lang: "text", theme: themeName });
}
}, [code, highlighter, language, themeName]);
useEffect(() => {
if (!isStreaming) {
highlightedCodeCache.set(
cacheKey,
highlightedHtml,
estimateHighlightedSize(highlightedHtml, code),
);
}
}, [cacheKey, code, highlightedHtml, isStreaming]);
return (
<div className="chat-markdown-shiki" dangerouslySetInnerHTML={{ __html: highlightedHtml }} />
);
}
interface MarkdownFileLinkProps {
href: string;
targetPath: string;
@@ -508,8 +552,11 @@ function areMarkdownFileLinkPropsEqual(
}
function ChatMarkdown({ text, cwd, isStreaming = false }: ChatMarkdownProps) {
const { resolvedTheme } = useTheme();
const diffThemeName = resolveDiffThemeName(resolvedTheme);
const { resolvedTheme, resolvedColorTheme } = useTheme();
const codeBlockThemeName = useMemo(
() => resolveSyntaxThemeName({ resolvedTheme, resolvedColorTheme }),
[resolvedColorTheme, resolvedTheme],
);
const markdownFileLinkMetaByHref = useMemo(() => {
const metaByHref = new Map<
string,
@@ -572,22 +619,19 @@ function ChatMarkdown({ text, cwd, isStreaming = false }: ChatMarkdownProps) {
return (
<MarkdownCodeBlock code={codeBlock.code}>
<CodeHighlightErrorBoundary fallback={<pre {...props}>{children}</pre>}>
<Suspense fallback={<pre {...props}>{children}</pre>}>
<SuspenseShikiCodeBlock
className={codeBlock.className}
code={codeBlock.code}
themeName={diffThemeName}
isStreaming={isStreaming}
/>
</Suspense>
</CodeHighlightErrorBoundary>
<ShikiCodeBlock
className={codeBlock.className}
code={codeBlock.code}
themeName={codeBlockThemeName}
isStreaming={isStreaming}
fallback={<pre {...props}>{children}</pre>}
/>
</MarkdownCodeBlock>
);
},
}),
[
diffThemeName,
codeBlockThemeName,
fileLinkParentSuffixByPath,
isStreaming,
markdownFileLinkMetaByHref,
+25 -5
View File
@@ -69,6 +69,7 @@ import {
buildPendingUserInputAnswers,
derivePendingUserInputProgress,
setPendingUserInputCustomAnswer,
setPendingUserInputTextAnswer,
togglePendingUserInputOptionSelection,
type PendingUserInputDraftAnswer,
} from "../pendingUserInput";
@@ -116,7 +117,7 @@ import {
} from "~/projectScripts";
import { newCommandId, newDraftId, newMessageId, newThreadId } from "~/lib/utils";
import { getProviderModelCapabilities, resolveSelectableProvider } from "../providerModels";
import { useSettings } from "../hooks/useSettings";
import { useProjectGroupingSettings, useSettings } from "../hooks/useSettings";
import { resolveAppModelSelectionForInstance } from "../modelSelection";
import { isTerminalFocused } from "../lib/terminalFocus";
import { deriveLogicalProjectKeyFromSettings } from "../logicalProject";
@@ -941,10 +942,7 @@ export default function ChatView(props: ChatViewProps) {
},
[],
);
const projectGroupingSettings = useSettings((settings) => ({
sidebarProjectGroupingMode: settings.sidebarProjectGroupingMode,
sidebarProjectGroupingOverrides: settings.sidebarProjectGroupingOverrides,
}));
const projectGroupingSettings = useProjectGroupingSettings();
const logicalProjectEnvironments = useMemo(() => {
if (!activeProject) return [];
const logicalKey = deriveLogicalProjectKeyFromSettings(activeProject, projectGroupingSettings);
@@ -3057,6 +3055,25 @@ export default function ChatView(props: ChatViewProps) {
[activePendingUserInput],
);
const onChangeActivePendingUserInputTextAnswer = useCallback(
(questionId: string, value: string) => {
if (!activePendingUserInput) {
return;
}
setPendingUserInputAnswersByRequestId((existing) => ({
...existing,
[activePendingUserInput.requestId]: {
...existing[activePendingUserInput.requestId],
[questionId]: setPendingUserInputTextAnswer(
existing[activePendingUserInput.requestId]?.[questionId],
value,
),
},
}));
},
[activePendingUserInput],
);
const onAdvanceActivePendingUserInput = useCallback(() => {
if (!activePendingUserInput || !activePendingProgress) {
return;
@@ -3665,6 +3682,9 @@ export default function ChatView(props: ChatViewProps) {
onChangeActivePendingUserInputCustomAnswer={
onChangeActivePendingUserInputCustomAnswer
}
onChangeActivePendingUserInputTextAnswer={
onChangeActivePendingUserInputTextAnswer
}
onProviderModelSelect={onProviderModelSelect}
toggleInteractionMode={toggleInteractionMode}
handleRuntimeModeChange={handleRuntimeModeChange}
+10 -6
View File
@@ -30,7 +30,7 @@ import { resolvePathLinkTarget } from "../terminal-links";
import { parseDiffRouteSearch, stripDiffSearchParams } from "../diffRouteSearch";
import { useTheme } from "../hooks/useTheme";
import { buildPatchCacheKey } from "../lib/diffRendering";
import { resolveDiffThemeName } from "../lib/diffRendering";
import { resolveSyntaxThemeName } from "../lib/syntaxTheme";
import { useTurnDiffSummaries } from "../hooks/useTurnDiffSummaries";
import { selectProjectByRef, useStore } from "../store";
import { createThreadSelectorByRef } from "../storeSelectors";
@@ -185,8 +185,12 @@ export { DiffWorkerPoolProvider } from "./DiffWorkerPoolProvider";
export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
const navigate = useNavigate();
const { resolvedTheme } = useTheme();
const { resolvedTheme, resolvedColorTheme } = useTheme();
const settings = useSettings();
const diffThemeName = useMemo(
() => resolveSyntaxThemeName({ resolvedTheme, resolvedColorTheme }),
[resolvedColorTheme, resolvedTheme],
);
const [diffRenderMode, setDiffRenderMode] = useState<DiffRenderMode>("stacked");
const [diffWordWrap, setDiffWordWrap] = useState(settings.diffWordWrap);
const [diffIgnoreWhitespace, setDiffIgnoreWhitespace] = useState(settings.diffIgnoreWhitespace);
@@ -321,8 +325,8 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
const hasResolvedPatch = typeof selectedPatch === "string";
const hasNoNetChanges = hasResolvedPatch && selectedPatch.trim().length === 0;
const renderablePatch = useMemo(
() => getRenderablePatch(selectedPatch, `diff-panel:${resolvedTheme}`),
[resolvedTheme, selectedPatch],
() => getRenderablePatch(selectedPatch, `diff-panel:${diffThemeName}`),
[diffThemeName, selectedPatch],
);
const renderableFiles = useMemo(() => {
if (!renderablePatch || renderablePatch.kind !== "files") {
@@ -662,7 +666,7 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
{renderableFiles.map((fileDiff) => {
const filePath = resolveFileDiffPath(fileDiff);
const fileKey = buildFileDiffRenderKey(fileDiff);
const themedFileKey = `${fileKey}:${resolvedTheme}`;
const themedFileKey = `${fileKey}:${diffThemeName}`;
const collapsed = collapsedDiffFileKeys.has(fileKey);
return (
<div
@@ -709,7 +713,7 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
diffStyle: diffRenderMode === "split" ? "split" : "unified",
lineDiffType: "none",
overflow: diffWordWrap ? "wrap" : "scroll",
theme: resolveDiffThemeName(resolvedTheme),
theme: diffThemeName,
themeType: resolvedTheme as DiffThemeType,
unsafeCSS: DIFF_PANEL_UNSAFE_CSS,
}}
@@ -1,10 +1,11 @@
import type { DiffsThemeNames } from "@pierre/diffs";
import { WorkerPoolContextProvider, useWorkerPool } from "@pierre/diffs/react";
import DiffsWorker from "@pierre/diffs/worker/worker.js?worker";
import { useEffect, useMemo, type ReactNode } from "react";
import { useTheme } from "../hooks/useTheme";
import { resolveDiffThemeName, type DiffThemeName } from "../lib/diffRendering";
import { resolveSyntaxThemeName } from "../lib/syntaxTheme";
function DiffWorkerThemeSync({ themeName }: { themeName: DiffThemeName }) {
function DiffWorkerThemeSync({ themeName }: { themeName: DiffsThemeNames }) {
const workerPool = useWorkerPool();
useEffect(() => {
@@ -29,8 +30,11 @@ function DiffWorkerThemeSync({ themeName }: { themeName: DiffThemeName }) {
}
export function DiffWorkerPoolProvider({ children }: { children?: ReactNode }) {
const { resolvedTheme } = useTheme();
const diffThemeName = resolveDiffThemeName(resolvedTheme);
const { resolvedTheme, resolvedColorTheme } = useTheme();
const diffThemeName = useMemo(
() => resolveSyntaxThemeName({ resolvedTheme, resolvedColorTheme }),
[resolvedColorTheme, resolvedTheme],
);
const workerPoolSize = useMemo(() => {
const cores =
typeof navigator === "undefined" ? 4 : Math.max(1, navigator.hardwareConcurrency || 4);
@@ -125,6 +125,12 @@ function createBaseServerConfig(): ServerConfig {
serverPassword: "",
customModels: [],
},
pi: {
enabled: true,
agentDir: "",
sessionDir: "",
customModels: [],
},
},
},
};
+3 -11
View File
@@ -141,7 +141,6 @@ import {
SidebarMenuSub,
SidebarMenuSubButton,
SidebarMenuSubItem,
SidebarSeparator,
SidebarTrigger,
useSidebar,
} from "./ui/sidebar";
@@ -167,7 +166,7 @@ import { SidebarUpdatePill } from "./sidebar/SidebarUpdatePill";
import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
import { CommandDialogTrigger } from "./ui/command";
import { readEnvironmentApi } from "../environmentApi";
import { useSettings, useUpdateSettings } from "~/hooks/useSettings";
import { useProjectGroupingSettings, useSettings, useUpdateSettings } from "~/hooks/useSettings";
import { useServerKeybindings } from "../rpc/serverState";
import {
derivePhysicalProjectKey,
@@ -931,10 +930,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
const defaultThreadEnvMode = useSettings<ThreadEnvMode>(
(settings) => settings.defaultThreadEnvMode,
);
const projectGroupingSettings = useSettings((settings) => ({
sidebarProjectGroupingMode: settings.sidebarProjectGroupingMode,
sidebarProjectGroupingOverrides: settings.sidebarProjectGroupingOverrides,
}));
const projectGroupingSettings = useProjectGroupingSettings();
const { updateSettings } = useUpdateSettings();
const router = useRouter();
const { isMobile, setOpenMobile } = useSidebar();
@@ -2725,10 +2721,7 @@ export default function Sidebar() {
const sidebarThreadSortOrder = useSettings((s) => s.sidebarThreadSortOrder);
const sidebarProjectSortOrder = useSettings((s) => s.sidebarProjectSortOrder);
const sidebarProjectGroupingMode = useSettings((s) => s.sidebarProjectGroupingMode);
const projectGroupingSettings = useSettings((settings) => ({
sidebarProjectGroupingMode: settings.sidebarProjectGroupingMode,
sidebarProjectGroupingOverrides: settings.sidebarProjectGroupingOverrides,
}));
const projectGroupingSettings = useProjectGroupingSettings();
const { updateSettings } = useUpdateSettings();
const { handleNewThread } = useNewThreadHandler();
const { archiveThread, deleteThread } = useThreadActions();
@@ -3386,7 +3379,6 @@ export default function Sidebar() {
projectsLength={projects.length}
/>
<SidebarSeparator />
<SidebarChromeFooter />
</>
)}
@@ -120,13 +120,30 @@ function terminalThemeFromApp(mountElement?: HTMLElement | null): ITheme {
drawerStyles.color,
normalizeComputedColor(bodyStyles.color, fallbackForeground),
);
const rootStyles = getComputedStyle(document.documentElement);
const themedBackground = normalizeComputedColor(
rootStyles.getPropertyValue("--terminal-background"),
background,
);
const themedForeground = normalizeComputedColor(
rootStyles.getPropertyValue("--terminal-foreground"),
foreground,
);
const themedCursor = normalizeComputedColor(
rootStyles.getPropertyValue("--terminal-cursor"),
isDark ? "rgb(180, 203, 255)" : "rgb(38, 56, 78)",
);
const themedSelection = normalizeComputedColor(
rootStyles.getPropertyValue("--terminal-selection-background"),
isDark ? "rgba(180, 203, 255, 0.25)" : "rgba(37, 63, 99, 0.2)",
);
if (isDark) {
return {
background,
foreground,
cursor: "rgb(180, 203, 255)",
selectionBackground: "rgba(180, 203, 255, 0.25)",
background: themedBackground,
foreground: themedForeground,
cursor: themedCursor,
selectionBackground: themedSelection,
scrollbarSliderBackground: "rgba(255, 255, 255, 0.1)",
scrollbarSliderHoverBackground: "rgba(255, 255, 255, 0.18)",
scrollbarSliderActiveBackground: "rgba(255, 255, 255, 0.22)",
@@ -150,10 +167,10 @@ function terminalThemeFromApp(mountElement?: HTMLElement | null): ITheme {
}
return {
background,
foreground,
cursor: "rgb(38, 56, 78)",
selectionBackground: "rgba(37, 63, 99, 0.2)",
background: themedBackground,
foreground: themedForeground,
cursor: themedCursor,
selectionBackground: themedSelection,
scrollbarSliderBackground: "rgba(0, 0, 0, 0.15)",
scrollbarSliderHoverBackground: "rgba(0, 0, 0, 0.25)",
scrollbarSliderActiveBackground: "rgba(0, 0, 0, 0.3)",
+207 -30
View File
@@ -33,6 +33,7 @@ import {
import { useQuery } from "@tanstack/react-query";
import { useDebouncedValue } from "@tanstack/react-pacer";
import { projectSearchEntriesQueryOptions } from "~/lib/projectReactQuery";
import { ensureLocalApi } from "../../localApi";
import {
clampCollapsedComposerCursor,
type ComposerTrigger,
@@ -69,6 +70,12 @@ import { ComposerPrimaryActions } from "./ComposerPrimaryActions";
import { ComposerPendingApprovalPanel } from "./ComposerPendingApprovalPanel";
import { ComposerPendingUserInputPanel } from "./ComposerPendingUserInputPanel";
import { ComposerPlanFollowUpBanner } from "./ComposerPlanFollowUpBanner";
import {
PiRuntimePanel,
PiRuntimePanelTrigger,
type PiRuntimePanelTab,
usePiRuntimePanelState,
} from "./PiRuntimePanel";
import { resolveComposerMenuActiveItemId } from "./composerMenuHighlight";
import { searchSlashCommandItems } from "./composerSlashCommandSearch";
import {
@@ -114,6 +121,7 @@ import { searchProviderSkills } from "../../providerSkillSearch";
import { useMediaQuery } from "../../hooks/useMediaQuery";
const IMAGE_SIZE_LIMIT_LABEL = `${Math.round(PROVIDER_SEND_TURN_MAX_IMAGE_BYTES / (1024 * 1024))}MB`;
const PI_PROVIDER = ProviderDriverKind.make("pi");
const runtimeModeConfig: Record<
RuntimeMode,
@@ -472,6 +480,7 @@ export interface ChatComposerProps {
expandedCursor: number,
cursorAdjacentToMention: boolean,
) => void;
onChangeActivePendingUserInputTextAnswer: (questionId: string, value: string) => void;
onProviderModelSelect: (instanceId: ProviderInstanceId, model: string) => void;
toggleInteractionMode: () => void;
@@ -547,6 +556,7 @@ export const ChatComposer = memo(
onAdvanceActivePendingUserInput,
onPreviousActivePendingUserInputQuestion,
onChangeActivePendingUserInputCustomAnswer,
onChangeActivePendingUserInputTextAnswer,
onProviderModelSelect,
toggleInteractionMode,
handleRuntimeModeChange,
@@ -720,17 +730,59 @@ export const ChatComposer = memo(
() => selectedProviderEntry?.models ?? [],
[selectedProviderEntry],
);
const isPiProviderSelected = selectedProvider === PI_PROVIDER;
const [isComposerModelPickerOpen, setIsComposerModelPickerOpen] = useState(false);
const [isModelPickerOptionsHydrated, setIsModelPickerOptionsHydrated] = useState(false);
const [piPanelOpen, setPiPanelOpen] = useState(false);
const [piPanelTab, setPiPanelTab] = useState<PiRuntimePanelTab>("home");
const piPanelState = usePiRuntimePanelState({
activities: activeThreadActivities,
provider: selectedProviderStatus,
skills: selectedProviderStatus?.skills,
thread: activeThread,
gitCwd,
model: selectedModel,
});
const selectedProviderSlashCommands = useMemo(() => {
const commands = [...(selectedProviderStatus?.slashCommands ?? [])];
if (!isPiProviderSelected) {
return commands;
}
const seen = new Set(commands.map((command) => command.name));
for (const command of piPanelState.slashCommands) {
if (seen.has(command.name)) continue;
commands.push(command);
seen.add(command.name);
}
return commands;
}, [isPiProviderSelected, piPanelState.slashCommands, selectedProviderStatus?.slashCommands]);
const selectedProviderModelsForComposer = useMemo(() => {
if (!isPiProviderSelected || piPanelState.models.length === 0) {
return selectedProviderModels;
}
const modelsBySlug = new Map(selectedProviderModels.map((model) => [model.slug, model]));
for (const model of piPanelState.models) {
modelsBySlug.set(model.slug, model);
}
return [...modelsBySlug.values()];
}, [isPiProviderSelected, piPanelState.models, selectedProviderModels]);
const composerProviderState = useMemo(
() =>
getComposerProviderState({
provider: selectedProvider,
model: selectedModel,
models: selectedProviderModels,
models: selectedProviderModelsForComposer,
prompt,
modelOptions: composerModelOptions?.[selectedProvider],
}),
[composerModelOptions, prompt, selectedModel, selectedProvider, selectedProviderModels],
[
composerModelOptions,
prompt,
selectedModel,
selectedProvider,
selectedProviderModelsForComposer,
],
);
const selectedPromptEffort = composerProviderState.promptEffort;
@@ -754,15 +806,55 @@ export const ChatComposer = memo(
// instance (built-in + custom) as a first-class sidebar entry. The
// options are server-reported models plus that exact instance's
// configured custom models; selected slugs are not injected into lists.
// Keep the closed/first-open path scoped to the active instance so large
// dynamic provider catalogs don't block the composer or popover paint.
const modelOptionsByInstance = useMemo<
ReadonlyMap<ProviderInstanceId, ReadonlyArray<AppModelOption>>
>(() => {
const out = new Map<ProviderInstanceId, ReadonlyArray<AppModelOption>>();
for (const entry of providerInstanceEntries) {
out.set(entry.instanceId, getAppModelOptionsForInstance(settings, entry));
const entries = isModelPickerOptionsHydrated
? providerInstanceEntries
: (() => {
const initialEntries = new Map<ProviderInstanceId, ProviderInstanceEntry>();
if (selectedProviderEntry) {
initialEntries.set(selectedProviderEntry.instanceId, selectedProviderEntry);
}
for (const favorite of settings.favorites ?? []) {
const favoriteEntry = providerInstanceEntries.find(
(entry) => entry.instanceId === favorite.provider,
);
if (favoriteEntry) {
initialEntries.set(favoriteEntry.instanceId, favoriteEntry);
}
}
return [...initialEntries.values()];
})();
for (const entry of entries) {
const entryForOptions =
isPiProviderSelected &&
entry.instanceId === selectedInstanceId &&
selectedProviderModelsForComposer.length > 0
? ({
...entry,
models: selectedProviderModelsForComposer,
snapshot: {
...entry.snapshot,
models: selectedProviderModelsForComposer,
},
} satisfies ProviderInstanceEntry)
: entry;
out.set(entry.instanceId, getAppModelOptionsForInstance(settings, entryForOptions));
}
return out;
}, [providerInstanceEntries, settings]);
}, [
isModelPickerOptionsHydrated,
isPiProviderSelected,
providerInstanceEntries,
selectedInstanceId,
selectedProviderEntry,
selectedProviderModelsForComposer,
settings,
]);
const selectedModelForPickerWithCustomFallback = useMemo(() => {
const currentOptions = modelOptionsByInstance.get(selectedInstanceId) ?? [];
return currentOptions.some((option) => option.slug === selectedModelForPicker)
@@ -770,6 +862,39 @@ export const ChatComposer = memo(
: (normalizeModelSlug(selectedModelForPicker, selectedProvider) ?? selectedModelForPicker);
}, [modelOptionsByInstance, selectedInstanceId, selectedModelForPicker, selectedProvider]);
useEffect(() => {
if (!isComposerModelPickerOpen) {
setIsModelPickerOptionsHydrated(false);
return;
}
const frame = window.requestAnimationFrame(() => {
setIsModelPickerOptionsHydrated(true);
});
return () => {
window.cancelAnimationFrame(frame);
};
}, [isComposerModelPickerOpen]);
useEffect(() => {
if (!isPiProviderSelected) {
setPiPanelOpen(false);
}
}, [isPiProviderSelected]);
useEffect(() => {
if (!isComposerModelPickerOpen) {
return;
}
void ensureLocalApi()
.server.refreshProviders({ instanceId: selectedInstanceId })
.catch(() => {
// The existing provider snapshot remains usable if this background
// probe fails; the settings page exposes manual refresh status.
});
}, [isComposerModelPickerOpen, selectedInstanceId]);
// ------------------------------------------------------------------
// Context window
// ------------------------------------------------------------------
@@ -794,7 +919,6 @@ export const ChatComposer = memo(
const [isDragOverComposer, setIsDragOverComposer] = useState(false);
const [isComposerFooterCompact, setIsComposerFooterCompact] = useState(false);
const [isComposerPrimaryActionsCompact, setIsComposerPrimaryActionsCompact] = useState(false);
const [isComposerModelPickerOpen, setIsComposerModelPickerOpen] = useState(false);
const [isComposerFocused, setIsComposerFocused] = useState(false);
const isMobileViewport = useMediaQuery("max-sm");
const isComposerCollapsedMobile = isMobileViewport && !isComposerFocused;
@@ -888,16 +1012,14 @@ export const ChatComposer = memo(
description: "Switch this thread back to normal build mode",
},
] satisfies ReadonlyArray<Extract<ComposerCommandItem, { type: "slash-command" }>>;
const providerSlashCommandItems = (selectedProviderStatus?.slashCommands ?? []).map(
(command) => ({
id: `provider-slash-command:${selectedProvider}:${command.name}`,
type: "provider-slash-command" as const,
provider: selectedProvider,
command,
label: `/${command.name}`,
description: command.description ?? command.input?.hint ?? "Run provider command",
}),
);
const providerSlashCommandItems = selectedProviderSlashCommands.map((command) => ({
id: `provider-slash-command:${selectedProvider}:${command.name}`,
type: "provider-slash-command" as const,
provider: selectedProvider,
command,
label: `/${command.name}`,
description: command.description ?? command.input?.hint ?? "Run provider command",
}));
const query = composerTrigger.query.trim().toLowerCase();
const slashCommandItems = [...builtInSlashCommandItems, ...providerSlashCommandItems];
if (!query) {
@@ -922,7 +1044,13 @@ export const ChatComposer = memo(
}));
}
return [];
}, [composerTrigger, selectedProvider, selectedProviderStatus, workspaceEntries]);
}, [
composerTrigger,
selectedProvider,
selectedProviderSlashCommands,
selectedProviderStatus,
workspaceEntries,
]);
const composerMenuOpen = Boolean(composerTrigger);
const composerMenuSearchKey = composerTrigger
@@ -957,7 +1085,8 @@ export const ChatComposer = memo(
const hasComposerHeader =
isComposerApprovalState ||
pendingUserInputs.length > 0 ||
(showPlanFollowUpPrompt && activeProposedPlan !== null);
(showPlanFollowUpPrompt && activeProposedPlan !== null) ||
(isPiProviderSelected && piPanelOpen);
const showCollapsedMobilePromptRow =
isComposerCollapsedMobile && !isComposerApprovalState && pendingUserInputs.length === 0;
@@ -1024,7 +1153,7 @@ export const ChatComposer = memo(
...(routeKind === "server" ? { threadRef: routeThreadRef } : {}),
...(routeKind === "draft" && draftId ? { draftId } : {}),
model: selectedModel,
models: selectedProviderModels,
models: selectedProviderModelsForComposer,
modelOptions: composerModelOptions?.[selectedProvider],
prompt,
onPromptChange: setPromptFromTraits,
@@ -1034,7 +1163,7 @@ export const ChatComposer = memo(
...(routeKind === "server" ? { threadRef: routeThreadRef } : {}),
...(routeKind === "draft" && draftId ? { draftId } : {}),
model: selectedModel,
models: selectedProviderModels,
models: selectedProviderModelsForComposer,
modelOptions: composerModelOptions?.[selectedProvider],
prompt,
onPromptChange: setPromptFromTraits,
@@ -1474,7 +1603,7 @@ export const ChatComposer = memo(
}, [readComposerSnapshot]);
const onSelectComposerItem = useCallback(
(item: ComposerCommandItem) => {
(item: ComposerCommandItem, action: "insert" | "run" = "run") => {
if (composerSelectLockRef.current) return;
composerSelectLockRef.current = true;
window.requestAnimationFrame(() => {
@@ -1522,21 +1651,42 @@ export const ChatComposer = memo(
return;
}
if (item.type === "provider-slash-command") {
const replacement = `/${item.command.name} `;
const replacement = action === "run" ? `/${item.command.name}` : `/${item.command.name} `;
const replacementRangeEnd = extendReplacementRangeForTrailingSpace(
snapshot.value,
trigger.rangeEnd,
replacement,
);
const expectedText = snapshot.value.slice(trigger.rangeStart, replacementRangeEnd);
if (action === "run") {
const next = replaceTextRange(
snapshot.value,
trigger.rangeStart,
replacementRangeEnd,
replacement,
);
if (expectedText !== snapshot.value.slice(trigger.rangeStart, replacementRangeEnd)) {
return;
}
promptRef.current = next.text;
setPrompt(next.text);
setComposerCursor(collapseExpandedComposerCursor(next.text, next.cursor));
setComposerTrigger(null);
setComposerHighlightedItemId(null);
window.requestAnimationFrame(() => {
onSend();
});
return;
}
const applied = applyPromptReplacement(
trigger.rangeStart,
replacementRangeEnd,
replacement,
{ expectedText: snapshot.value.slice(trigger.rangeStart, replacementRangeEnd) },
{
expectedText,
},
);
if (applied) {
setComposerHighlightedItemId(null);
}
if (applied) setComposerHighlightedItemId(null);
return;
}
if (item.type === "skill") {
@@ -1558,7 +1708,14 @@ export const ChatComposer = memo(
return;
}
},
[applyPromptReplacement, handleInteractionModeChange, resolveActiveComposerTrigger],
[
applyPromptReplacement,
handleInteractionModeChange,
onSend,
promptRef,
resolveActiveComposerTrigger,
setPrompt,
],
);
const onComposerMenuItemHighlighted = useCallback(
@@ -1674,7 +1831,7 @@ export const ChatComposer = memo(
return true;
}
if ((key === "Enter" || key === "Tab") && selectedItem) {
onSelectComposerItem(selectedItem);
onSelectComposerItem(selectedItem, key === "Tab" ? "insert" : "run");
return true;
}
}
@@ -1918,7 +2075,7 @@ export const ChatComposer = memo(
selectedModelSelection,
selectedProvider,
selectedModel,
selectedProviderModels,
selectedProviderModels: selectedProviderModelsForComposer,
}),
}),
[
@@ -1937,7 +2094,7 @@ export const ChatComposer = memo(
selectedModelSelection,
selectedPromptEffort,
selectedProvider,
selectedProviderModels,
selectedProviderModelsForComposer,
],
);
@@ -2004,6 +2161,7 @@ export const ChatComposer = memo(
answers={activePendingDraftAnswers}
questionIndex={activePendingQuestionIndex}
onToggleOption={onSelectActivePendingUserInputOption}
onChangeTextAnswer={onChangeActivePendingUserInputTextAnswer}
onAdvance={onAdvanceActivePendingUserInput}
/>
</div>
@@ -2044,6 +2202,7 @@ export const ChatComposer = memo(
answers={activePendingDraftAnswers}
questionIndex={activePendingQuestionIndex}
onToggleOption={onSelectActivePendingUserInputOption}
onChangeTextAnswer={onChangeActivePendingUserInputTextAnswer}
onAdvance={onAdvanceActivePendingUserInput}
/>
<div className="px-3 pb-3 sm:px-4">
@@ -2092,6 +2251,15 @@ export const ChatComposer = memo(
</div>
) : null}
{!isComposerCollapsedMobile && isPiProviderSelected && piPanelOpen ? (
<PiRuntimePanel
state={piPanelState}
tab={piPanelTab}
onTabChange={setPiPanelTab}
onClose={() => setPiPanelOpen(false)}
/>
) : null}
{showCollapsedMobilePromptRow ? (
<div className="flex items-center justify-between gap-2 px-3 py-2">
<button
@@ -2344,6 +2512,15 @@ export const ChatComposer = memo(
onInstanceModelChange={onProviderModelSelect}
/>
{isPiProviderSelected ? (
<PiRuntimePanelTrigger
state={piPanelState}
open={piPanelOpen}
compact={isComposerFooterCompact}
onToggle={() => setPiPanelOpen((open) => !open)}
/>
) : null}
{isComposerFooterCompact ? (
<CompactComposerControlsMenu
activePlan={showPlanSidebarToggle}
@@ -1,5 +1,5 @@
import { type ApprovalRequestId } from "@t3tools/contracts";
import { memo, useEffect, useEffectEvent, useRef } from "react";
import { memo, useEffect, useEffectEvent, useMemo, useRef } from "react";
import { type PendingUserInput } from "../../session-logic";
import {
derivePendingUserInputProgress,
@@ -14,6 +14,7 @@ interface PendingUserInputPanelProps {
answers: Record<string, PendingUserInputDraftAnswer>;
questionIndex: number;
onToggleOption: (questionId: string, optionLabel: string) => void;
onChangeTextAnswer: (questionId: string, value: string) => void;
onAdvance: () => void;
}
@@ -23,6 +24,7 @@ export const ComposerPendingUserInputPanel = memo(function ComposerPendingUserIn
answers,
questionIndex,
onToggleOption,
onChangeTextAnswer,
onAdvance,
}: PendingUserInputPanelProps) {
if (pendingUserInputs.length === 0) return null;
@@ -37,6 +39,7 @@ export const ComposerPendingUserInputPanel = memo(function ComposerPendingUserIn
answers={answers}
questionIndex={questionIndex}
onToggleOption={onToggleOption}
onChangeTextAnswer={onChangeTextAnswer}
onAdvance={onAdvance}
/>
);
@@ -48,6 +51,7 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(
answers,
questionIndex,
onToggleOption,
onChangeTextAnswer,
onAdvance,
}: {
prompt: PendingUserInput;
@@ -55,10 +59,12 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(
answers: Record<string, PendingUserInputDraftAnswer>;
questionIndex: number;
onToggleOption: (questionId: string, optionLabel: string) => void;
onChangeTextAnswer: (questionId: string, value: string) => void;
onAdvance: () => void;
}) {
const progress = derivePendingUserInputProgress(prompt.questions, answers, questionIndex);
const activeQuestion = progress.activeQuestion;
const activeOptions = useMemo(() => activeQuestion?.options ?? [], [activeQuestion?.options]);
const autoAdvanceTimerRef = useRef<number | null>(null);
const onAdvanceRef = useRef(onAdvance);
@@ -109,15 +115,15 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(
const digit = Number.parseInt(event.key, 10);
if (Number.isNaN(digit) || digit < 1 || digit > 9) return;
const optionIndex = digit - 1;
if (optionIndex >= activeQuestion.options.length) return;
const option = activeQuestion.options[optionIndex];
if (optionIndex >= activeOptions.length) return;
const option = activeOptions[optionIndex];
if (!option) return;
event.preventDefault();
handleOptionSelection(activeQuestion.id, option.label);
};
document.addEventListener("keydown", handler);
return () => document.removeEventListener("keydown", handler);
}, [activeQuestion, isResponding]);
}, [activeOptions, activeQuestion, isResponding]);
if (!activeQuestion) {
return null;
@@ -141,49 +147,83 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(
{activeQuestion.multiSelect ? (
<p className="mt-1 text-xs text-muted-foreground/65">Select one or more options.</p>
) : null}
<div className="mt-3 space-y-1">
{activeQuestion.options.map((option, index) => {
const isSelected = progress.selectedOptionLabels.includes(option.label);
const shortcutKey = index < 9 ? index + 1 : null;
return (
<button
key={`${activeQuestion.id}:${option.label}`}
type="button"
{activeQuestion.inputKind === "text" || activeQuestion.inputKind === "textarea" ? (
<div className="mt-3 space-y-2">
{activeQuestion.inputKind === "textarea" ? (
<textarea
value={progress.textAnswer}
placeholder={activeQuestion.placeholder ?? activeQuestion.prefill}
disabled={isResponding}
onClick={() => handleOptionSelection(activeQuestion.id, option.label)}
className={cn(
"group flex w-full items-center gap-3 rounded-lg border px-3 py-2 text-left transition-all duration-150",
isSelected
? "border-blue-500/40 bg-blue-500/8 text-foreground"
: "border-transparent bg-muted/20 text-foreground/80 hover:bg-muted/40 hover:border-border/40",
isResponding && "opacity-50 cursor-not-allowed",
)}
>
{shortcutKey !== null ? (
<kbd
className={cn(
"flex size-5 shrink-0 items-center justify-center rounded text-[11px] font-medium tabular-nums transition-colors duration-150",
isSelected
? "bg-blue-500/20 text-blue-400"
: "bg-muted/40 text-muted-foreground/50 group-hover:bg-muted/60 group-hover:text-muted-foreground/70",
)}
>
{shortcutKey}
</kbd>
) : null}
<div className="min-w-0 flex-1">
<span className="text-sm font-medium">{option.label}</span>
{option.description && option.description !== option.label ? (
<span className="ml-2 text-xs text-muted-foreground/50">
{option.description}
</span>
rows={5}
onChange={(event) => onChangeTextAnswer(activeQuestion.id, event.currentTarget.value)}
className="min-h-28 w-full resize-y rounded-lg border border-border/60 bg-background/80 px-3 py-2 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground/45 focus:border-blue-500/45 focus:ring-2 focus:ring-blue-500/15 disabled:cursor-not-allowed disabled:opacity-50"
/>
) : (
<input
value={progress.textAnswer}
placeholder={activeQuestion.placeholder ?? activeQuestion.prefill}
disabled={isResponding}
onChange={(event) => onChangeTextAnswer(activeQuestion.id, event.currentTarget.value)}
className="h-9 w-full rounded-lg border border-border/60 bg-background/80 px-3 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground/45 focus:border-blue-500/45 focus:ring-2 focus:ring-blue-500/15 disabled:cursor-not-allowed disabled:opacity-50"
/>
)}
<button
type="button"
disabled={isResponding || !progress.canAdvance}
onClick={onAdvance}
className={cn(
"ml-auto flex h-8 items-center rounded-md bg-foreground px-3 text-xs font-medium text-background transition-opacity",
(isResponding || !progress.canAdvance) && "cursor-not-allowed opacity-50",
)}
>
Submit
</button>
</div>
) : (
<div className="mt-3 space-y-1">
{activeOptions.map((option, index) => {
const isSelected = progress.selectedOptionLabels.includes(option.label);
const shortcutKey = index < 9 ? index + 1 : null;
return (
<button
key={`${activeQuestion.id}:${option.label}`}
type="button"
disabled={isResponding}
onClick={() => handleOptionSelection(activeQuestion.id, option.label)}
className={cn(
"group flex w-full items-center gap-3 rounded-lg border px-3 py-2 text-left transition-all duration-150",
isSelected
? "border-blue-500/40 bg-blue-500/8 text-foreground"
: "border-transparent bg-muted/20 text-foreground/80 hover:bg-muted/40 hover:border-border/40",
isResponding && "opacity-50 cursor-not-allowed",
)}
>
{shortcutKey !== null ? (
<kbd
className={cn(
"flex size-5 shrink-0 items-center justify-center rounded text-[11px] font-medium tabular-nums transition-colors duration-150",
isSelected
? "bg-blue-500/20 text-blue-400"
: "bg-muted/40 text-muted-foreground/50 group-hover:bg-muted/60 group-hover:text-muted-foreground/70",
)}
>
{shortcutKey}
</kbd>
) : null}
</div>
{isSelected ? <CheckIcon className="size-3.5 shrink-0 text-blue-400" /> : null}
</button>
);
})}
</div>
<div className="min-w-0 flex-1">
<span className="text-sm font-medium">{option.label}</span>
{option.description && option.description !== option.label ? (
<span className="ml-2 text-xs text-muted-foreground/50">
{option.description}
</span>
) : null}
</div>
{isSelected ? <CheckIcon className="size-3.5 shrink-0 text-blue-400" /> : null}
</button>
);
})}
</div>
)}
</div>
);
});
@@ -663,7 +663,7 @@ function AssistantChangedFilesSectionInner({
return (
<div className="mt-2 rounded-lg border border-border/80 bg-card/45 p-2.5">
<div className="sticky top-2 z-10 mb-1.5 flex items-center justify-between gap-2 bg-background before:absolute before:inset-x-0 before:-top-2 before:h-2 before:bg-background before:content-['']">
<div className="sticky top-2 z-10 mb-1.5 flex items-center justify-between gap-2 bg-[color-mix(in_srgb,var(--card)_45%,var(--background))] before:absolute before:inset-x-0 before:-top-2 before:h-2 before:bg-[color-mix(in_srgb,var(--card)_45%,var(--background))] before:content-['']">
<p className="text-[10px] uppercase tracking-[0.12em] text-muted-foreground/65">
<span>Changed files ({changedFileCountLabel})</span>
{hasNonZeroStat(summaryStat) && (
@@ -37,6 +37,8 @@ type ModelPickerItem = {
};
const EMPTY_MODEL_JUMP_LABELS = new Map<string, string>();
const INITIAL_RENDERED_MODEL_COUNT = 80;
const MODEL_RENDER_INCREMENT = 160;
// Split a `${instanceId}:${slug}` combobox key back into its pieces. Slugs
// can contain colons (e.g. some vendor model ids), so we only split on the
@@ -93,6 +95,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
const searchInputRef = useRef<HTMLInputElement>(null);
const listRegionRef = useRef<HTMLDivElement>(null);
const highlightedModelKeyRef = useRef<string | null>(null);
const [renderedModelLimit, setRenderedModelLimit] = useState(INITIAL_RENDERED_MODEL_COUNT);
const favorites = useSettings((s) => s.favorites ?? []);
const [selectedInstanceId, setSelectedInstanceId] = useState<ProviderInstanceId | "favorites">(
() => {
@@ -175,6 +178,22 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
}
return ready;
}, [instanceEntries]);
const hasResolvedFavorites = useMemo(() => {
if (favoritesSet.size === 0 || props.lockedProvider !== null) return false;
for (const [instanceId, models] of modelOptionsByInstance) {
if (!readyInstanceSet.has(instanceId)) continue;
if (models.some((model) => favoritesSet.has(providerModelKey(instanceId, model.slug)))) {
return true;
}
}
return false;
}, [favoritesSet, modelOptionsByInstance, props.lockedProvider, readyInstanceSet]);
useLayoutEffect(() => {
if (selectedInstanceId === "favorites" && !hasResolvedFavorites) {
setSelectedInstanceId(props.activeInstanceId);
}
}, [hasResolvedFavorites, props.activeInstanceId, selectedInstanceId]);
// Flatten models into a searchable array. One pass over the
// instance-keyed map; each model carries its instance id + driver kind
@@ -328,6 +347,10 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
selectedInstanceId,
]);
useEffect(() => {
setRenderedModelLimit(INITIAL_RENDERED_MODEL_COUNT);
}, [props.activeInstanceId, props.lockedProvider, searchQuery, selectedInstanceId]);
const handleModelSelect = useCallback(
(modelSlug: string, instanceId: ProviderInstanceId) => {
const options = modelOptionsByInstance.get(instanceId);
@@ -382,12 +405,37 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
props.activeInstanceId,
instanceEntries,
]);
const renderedModels = useMemo(() => {
const models = filteredModels.slice(0, renderedModelLimit);
if (
models.some(
(model) => model.instanceId === props.activeInstanceId && model.slug === props.model,
)
) {
return models;
}
const activeModel = filteredModels.find(
(model) => model.instanceId === props.activeInstanceId && model.slug === props.model,
);
return activeModel ? [...models, activeModel] : models;
}, [filteredModels, props.activeInstanceId, props.model, renderedModelLimit]);
const renderedModelKeys = useMemo(
(): string[] => renderedModels.map((model) => `${model.instanceId}:${model.slug}`),
[renderedModels],
);
const renderedModelByKey = useMemo(
(): ReadonlyMap<string, ModelPickerItem> =>
new Map(renderedModels.map((model) => [`${model.instanceId}:${model.slug}`, model] as const)),
[renderedModels],
);
const hasMoreRenderedModels = renderedModels.length < filteredModels.length;
const modelJumpCommandByKey = useMemo(() => {
const mapping = new Map<
string,
NonNullable<ReturnType<typeof modelPickerJumpCommandForIndex>>
>();
for (const [visibleModelIndex, model] of filteredModels.entries()) {
for (const [visibleModelIndex, model] of renderedModels.entries()) {
const jumpCommand = modelPickerJumpCommandForIndex(visibleModelIndex);
if (!jumpCommand) {
return mapping;
@@ -395,24 +443,11 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
mapping.set(`${model.instanceId}:${model.slug}`, jumpCommand);
}
return mapping;
}, [filteredModels]);
}, [renderedModels]);
const modelJumpModelKeys = useMemo(
() => [...modelJumpCommandByKey.keys()],
[modelJumpCommandByKey],
);
const allModelKeys = useMemo(
(): string[] => flatModels.map((model) => `${model.instanceId}:${model.slug}`),
[flatModels],
);
const filteredModelKeys = useMemo(
(): string[] => filteredModels.map((model) => `${model.instanceId}:${model.slug}`),
[filteredModels],
);
const filteredModelByKey = useMemo(
(): ReadonlyMap<string, ModelPickerItem> =>
new Map(filteredModels.map((model) => [`${model.instanceId}:${model.slug}`, model] as const)),
[filteredModels],
);
const modelJumpShortcutContext = useMemo(
() =>
({
@@ -472,6 +507,35 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
};
}, [handleModelSelect, keybindings, modelJumpModelKeys, modelJumpShortcutContext]);
useEffect(() => {
if (!hasMoreRenderedModels) {
return;
}
const viewport = listRegionRef.current?.querySelector<HTMLElement>(
'[data-slot="scroll-area-viewport"]',
);
if (!viewport) {
return;
}
const onScroll = () => {
const remainingScrollDistance =
viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop;
if (remainingScrollDistance > 96) {
return;
}
setRenderedModelLimit((currentLimit) =>
Math.min(currentLimit + MODEL_RENDER_INCREMENT, filteredModels.length),
);
};
viewport.addEventListener("scroll", onScroll, { passive: true });
onScroll();
return () => {
viewport.removeEventListener("scroll", onScroll);
};
}, [filteredModels.length, hasMoreRenderedModels]);
useLayoutEffect(() => {
const listRegion = listRegionRef.current;
if (!listRegion) {
@@ -513,7 +577,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
window.cancelAnimationFrame(nestedFrame);
window.clearTimeout(timeout);
};
}, [filteredModelKeys]);
}, [renderedModelKeys]);
return (
<TooltipProvider delay={0}>
@@ -545,8 +609,8 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
{/* Main content area */}
<Combobox
inline
items={allModelKeys}
filteredItems={filteredModelKeys}
items={renderedModelKeys}
filteredItems={renderedModelKeys}
filter={null}
autoHighlight
open
@@ -612,8 +676,8 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
className="relative min-h-0 flex-1 before:pointer-events-none before:absolute before:inset-0 before:bg-muted/40"
>
<ComboboxList className="model-picker-list size-full divide-y px-2 py-1">
{filteredModelKeys.map((modelKey, index) => {
const model = filteredModelByKey.get(modelKey);
{renderedModelKeys.map((modelKey, index) => {
const model = renderedModelByKey.get(modelKey);
if (!model) {
return null;
}
@@ -0,0 +1,160 @@
import {
EventId,
ProviderDriverKind,
ProviderInstanceId,
type OrchestrationThreadActivity,
} from "@t3tools/contracts";
import { describe, expect, it } from "vitest";
import { derivePiRuntimePanelState } from "./PiRuntimePanel";
function makeActivity(overrides: {
readonly id: string;
readonly createdAt?: string;
readonly kind: string;
readonly summary?: string;
readonly tone?: OrchestrationThreadActivity["tone"];
readonly payload: Record<string, unknown>;
}): OrchestrationThreadActivity {
return {
id: EventId.make(overrides.id),
createdAt: overrides.createdAt ?? "2026-02-23T00:00:00.000Z",
kind: overrides.kind,
summary: overrides.summary ?? overrides.kind,
tone: overrides.tone ?? "info",
payload: overrides.payload,
turnId: null,
};
}
describe("derivePiRuntimePanelState", () => {
it("derives status summaries, extension inventory, and deduped diagnostics", () => {
const state = derivePiRuntimePanelState({
activities: [
makeActivity({
id: "config",
kind: "pi.extension.configured",
payload: {
source: "pi.extension",
extensionPaths: ["/Users/davis/.pi/agent/extensions/tps-tracker.ts"],
slashCommands: [{ name: "usage", description: "Show usage" }],
tools: [{ name: "search" }],
flags: [],
models: [
{
slug: "extension/model",
name: "Extension Model",
isCustom: false,
capabilities: null,
},
],
},
}),
makeActivity({
id: "status",
kind: "pi.ui.state.updated",
payload: {
source: "pi.extension.ui",
surface: "status",
key: "tps",
label: "tps",
text: "42 tok/s",
},
}),
makeActivity({
id: "diag-1",
createdAt: "2026-02-23T00:00:01.000Z",
kind: "pi.extension.diagnostic",
tone: "error",
payload: {
source: "pi.extension",
message: "message_update failed",
severity: "error",
diagnosticKey: "tps :: message_update :: theme",
extensionPath: "/Users/davis/.pi/agent/extensions/tps-tracker.ts",
event: "message_update",
hiddenCount: 1,
},
}),
makeActivity({
id: "diag-2",
createdAt: "2026-02-23T00:00:02.000Z",
kind: "pi.extension.diagnostic",
tone: "error",
payload: {
source: "pi.extension",
message: "message_update failed",
severity: "error",
diagnosticKey: "tps :: message_update :: theme",
extensionPath: "/Users/davis/.pi/agent/extensions/tps-tracker.ts",
event: "message_update",
hiddenCount: 99,
},
}),
],
provider: null,
skills: [],
cwd: "/Users/davis/project",
branch: "main",
model: "openai/gpt-5.5",
});
expect(state.summaryStatus).toBe("tps 42 tok/s");
expect(state.extensions[0]?.name).toBe("tps-tracker.ts");
expect(state.slashCommands[0]?.name).toBe("usage");
expect(state.models[0]?.slug).toBe("extension/model");
expect(state.logs).toHaveLength(1);
expect(state.logs[0]?.hiddenCount).toBe(99);
});
it("uses provider snapshot metadata before Pi session activity exists", () => {
const state = derivePiRuntimePanelState({
activities: [],
provider: {
instanceId: ProviderInstanceId.make("pi"),
driver: ProviderDriverKind.make("pi"),
displayName: "Pi",
enabled: true,
installed: true,
version: "0.73.0",
status: "ready",
auth: { status: "authenticated", type: "pi", label: "Pi" },
checkedAt: "2026-02-23T00:00:00.000Z",
models: [
{
slug: "openai/gpt-5.5",
name: "GPT-5.5",
isCustom: false,
capabilities: null,
},
],
slashCommands: [
{ name: "reload", description: "Reload extensions, skills, prompts, and themes" },
{ name: "usage", description: "Show usage" },
],
skills: [
{
name: "review",
displayName: "review",
path: "/Users/davis/.pi/agent/skills/review/SKILL.md",
enabled: true,
},
],
pi: {
extensionPaths: ["/Users/davis/.pi/agent/extensions/tps-tracker.ts"],
tools: [{ name: "search" }],
flags: ["verbose"],
},
},
skills: undefined,
cwd: "/Users/davis/project",
branch: "main",
model: "openai/gpt-5.5",
});
expect(state.extensions[0]?.name).toBe("tps-tracker.ts");
expect(state.skills[0]?.name).toBe("review");
expect(state.slashCommands.map((command) => command.name)).toEqual(["reload", "usage"]);
expect(state.models[0]?.slug).toBe("openai/gpt-5.5");
});
});
@@ -0,0 +1,616 @@
import type { OrchestrationThreadActivity, ServerProvider } from "@t3tools/contracts";
import { AlertTriangleIcon, ChevronDownIcon, ChevronUpIcon, XIcon } from "lucide-react";
import { useMemo } from "react";
import {
formatProviderSkillDisplayName,
formatProviderSkillInstallSource,
} from "../../providerSkillPresentation";
import type { Thread } from "../../types";
import { basenameOfPath } from "../../vscode-icons";
import { Badge } from "../ui/badge";
import { Button } from "../ui/button";
import { ScrollArea } from "../ui/scroll-area";
import { cn } from "~/lib/utils";
export type PiRuntimePanelTab = "home" | "extensions" | "logs";
interface PiPanelRow {
readonly key: string;
readonly surface: string;
readonly label: string;
readonly text: string;
readonly state?: "set" | "cleared" | "unsupported";
}
interface PiPanelWidget {
readonly key: string;
readonly surface: "widget";
readonly label: string;
readonly lines: readonly string[];
readonly text?: string | undefined;
readonly state?: "set" | "cleared" | "unsupported";
}
interface PiPanelExtension {
readonly path: string;
readonly name: string;
readonly tools: number;
readonly commands: number;
}
interface PiPanelLog {
readonly id: string;
readonly createdAt: string;
readonly severity: "info" | "warning" | "error";
readonly source: string;
readonly message: string;
readonly detail?: string | undefined;
readonly hiddenCount: number;
}
export interface PiRuntimePanelState {
readonly summaryStatus: string | null;
readonly issueCount: number;
readonly statuses: readonly PiPanelRow[];
readonly headers: readonly PiPanelRow[];
readonly footers: readonly PiPanelRow[];
readonly title: string | null;
readonly widgets: readonly PiPanelWidget[];
readonly extensions: readonly PiPanelExtension[];
readonly models: ReadonlyArray<ServerProvider["models"][number]>;
readonly slashCommands: ServerProvider["slashCommands"];
readonly skills: ServerProvider["skills"];
readonly logs: readonly PiPanelLog[];
readonly cwd: string | null;
readonly branch: string | null;
readonly model: string | null;
}
interface PiRuntimePanelProps {
readonly state: PiRuntimePanelState;
readonly tab: PiRuntimePanelTab;
readonly onTabChange: (tab: PiRuntimePanelTab) => void;
readonly onClose: () => void;
}
interface PiRuntimePanelTriggerProps {
readonly state: PiRuntimePanelState;
readonly open: boolean;
readonly compact: boolean;
readonly onToggle: () => void;
}
const PANEL_TABS: ReadonlyArray<{ readonly id: PiRuntimePanelTab; readonly label: string }> = [
{ id: "home", label: "Home" },
{ id: "extensions", label: "Extensions" },
{ id: "logs", label: "Logs" },
];
const PI_UI_SURFACES = new Set(["header", "footer", "status", "widget", "title", "editor"]);
const PI_UI_STATES = new Set(["set", "cleared", "unsupported"]);
const DIAGNOSTIC_SEVERITIES = new Set(["info", "warning", "error"]);
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null;
}
function readString(value: unknown): string | undefined {
return typeof value === "string" ? value : undefined;
}
function readStringArray(value: unknown): string[] {
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
}
function readSlashCommands(value: unknown): ServerProvider["slashCommands"] {
if (!Array.isArray(value)) return [];
return value.flatMap((entry) => {
if (!isRecord(entry)) return [];
const name = readString(entry.name);
if (!name) return [];
const description = readString(entry.description);
const input = isRecord(entry.input) ? entry.input : null;
const hint = readString(input?.hint);
return [
{
name,
...(description ? { description } : {}),
...(hint ? { input: { hint } } : {}),
},
];
});
}
function readProviderModels(value: unknown): ReadonlyArray<ServerProvider["models"][number]> {
if (!Array.isArray(value)) return [];
return value.flatMap((entry) => {
if (!isRecord(entry)) return [];
const slug = readString(entry.slug);
const name = readString(entry.name);
if (!slug || !name) return [];
const shortName = readString(entry.shortName);
const subProvider = readString(entry.subProvider);
const capabilities = isRecord(entry.capabilities)
? (entry.capabilities as ServerProvider["models"][number]["capabilities"])
: null;
return [
{
slug,
name,
...(shortName ? { shortName } : {}),
...(subProvider ? { subProvider } : {}),
isCustom: typeof entry.isCustom === "boolean" ? entry.isCustom : false,
capabilities,
},
];
});
}
function readState(value: unknown): PiPanelRow["state"] | undefined {
return typeof value === "string" && PI_UI_STATES.has(value)
? (value as PiPanelRow["state"])
: undefined;
}
function readSeverity(value: unknown): PiPanelLog["severity"] {
return typeof value === "string" && DIAGNOSTIC_SEVERITIES.has(value)
? (value as PiPanelLog["severity"])
: "info";
}
function compactText(value: string | undefined): string | undefined {
const trimmed = value?.replace(/\s+/g, " ").trim();
return trimmed && trimmed.length > 0 ? trimmed : undefined;
}
function formatSummaryStatus(row: PiPanelRow | undefined): string | null {
if (!row) return null;
const text = compactText(row.text);
if (!text) return null;
if (text.toLowerCase().startsWith(row.label.toLowerCase())) {
return text;
}
return `${row.label} ${text}`;
}
function displayPathName(path: string): string {
return basenameOfPath(path) || path;
}
function activityOrder(left: OrchestrationThreadActivity, right: OrchestrationThreadActivity) {
const bySequence = (left.sequence ?? 0) - (right.sequence ?? 0);
if (bySequence !== 0) return bySequence;
return left.createdAt.localeCompare(right.createdAt);
}
export function derivePiRuntimePanelState(input: {
readonly activities: ReadonlyArray<OrchestrationThreadActivity>;
readonly provider: ServerProvider | null | undefined;
readonly skills: ServerProvider["skills"] | undefined;
readonly cwd: string | null | undefined;
readonly branch: string | null | undefined;
readonly model: string | null | undefined;
}): PiRuntimePanelState {
const uiState = new Map<string, PiPanelRow | PiPanelWidget>();
const diagnostics = new Map<string, PiPanelLog>();
const providerPi = input.provider?.pi;
let extensionPaths: readonly string[] = providerPi?.extensionPaths ?? [];
let models: ReadonlyArray<ServerProvider["models"][number]> = input.provider?.models ?? [];
let slashCommands: ServerProvider["slashCommands"] = input.provider?.slashCommands ?? [];
let commandCount = slashCommands.length;
let toolCount = providerPi?.tools.length ?? 0;
for (const activity of [...input.activities].toSorted(activityOrder)) {
if (activity.kind === "pi.ui.state.updated" && isRecord(activity.payload)) {
const surface = readString(activity.payload.surface);
const key = readString(activity.payload.key);
if (!surface || !key || !PI_UI_SURFACES.has(surface)) {
continue;
}
const state = readState(activity.payload.state) ?? "set";
const mapKey = `${surface}:${key}`;
if (state === "cleared") {
uiState.delete(mapKey);
continue;
}
const label = readString(activity.payload.label) ?? key;
const text = readString(activity.payload.text) ?? "";
if (surface === "widget") {
uiState.set(mapKey, {
key,
surface: "widget",
label,
text,
lines: readStringArray(activity.payload.lines),
state,
});
} else {
uiState.set(mapKey, { key, surface, label, text, state });
}
continue;
}
if (activity.kind === "pi.extension.configured" && isRecord(activity.payload)) {
extensionPaths = readStringArray(activity.payload.extensionPaths);
slashCommands = readSlashCommands(activity.payload.slashCommands);
commandCount = slashCommands.length;
toolCount = Array.isArray(activity.payload.tools) ? activity.payload.tools.length : 0;
models = readProviderModels(activity.payload.models);
continue;
}
if (activity.kind === "pi.extension.diagnostic" && isRecord(activity.payload)) {
const message = readString(activity.payload.message);
if (!message) continue;
const key = readString(activity.payload.diagnosticKey) ?? activity.id;
const extensionPath = readString(activity.payload.extensionPath);
const event = readString(activity.payload.event);
const hiddenCount =
typeof activity.payload.hiddenCount === "number" ? activity.payload.hiddenCount : 0;
diagnostics.set(key, {
id: activity.id,
createdAt: activity.createdAt,
severity: readSeverity(activity.payload.severity),
source: extensionPath ? displayPathName(extensionPath) : event || "pi",
message,
detail: event && extensionPath ? event : undefined,
hiddenCount,
});
continue;
}
if (activity.kind === "extension.activity" && isRecord(activity.payload)) {
const message = readString(activity.payload.message);
if (!message) continue;
diagnostics.set(activity.id, {
id: activity.id,
createdAt: activity.createdAt,
severity: readSeverity(activity.payload.severity),
source: (() => {
const extensionPath = readString(activity.payload.extensionPath);
return extensionPath ? displayPathName(extensionPath) : "notify";
})(),
message,
hiddenCount: 0,
});
}
}
const rows = Array.from(uiState.values());
const panelRows = rows.filter((row): row is PiPanelRow => !("lines" in row));
const headers = panelRows.filter((row) => row.surface === "header");
const footers = panelRows.filter((row) => row.surface === "footer");
const statusRows = panelRows.filter((row) => row.surface === "status");
const widgets = rows.filter((row): row is PiPanelWidget => "lines" in row);
const titleRow = uiState.get("title:title");
const title = titleRow && !("lines" in titleRow) ? (compactText(titleRow.text) ?? null) : null;
const summaryStatus =
formatSummaryStatus(statusRows.find((row) => row.key === "tps")) ??
formatSummaryStatus(statusRows.find((row) => row.key !== "working")) ??
formatSummaryStatus(statusRows[0]);
const logs = Array.from(diagnostics.values()).toSorted((left, right) =>
right.createdAt.localeCompare(left.createdAt),
);
const issueCount = logs.filter(
(log) => log.severity === "warning" || log.severity === "error",
).length;
const perExtensionCommandCount =
extensionPaths.length > 0 ? Math.floor(commandCount / extensionPaths.length) : 0;
const perExtensionToolCount =
extensionPaths.length > 0 ? Math.floor(toolCount / extensionPaths.length) : 0;
return {
summaryStatus,
issueCount,
statuses: statusRows,
headers,
footers,
title,
widgets,
extensions: extensionPaths.map((path) => ({
path,
name: displayPathName(path),
commands: perExtensionCommandCount,
tools: perExtensionToolCount,
})),
models,
slashCommands,
skills: input.skills ?? input.provider?.skills ?? [],
logs,
cwd: input.cwd ?? null,
branch: input.branch ?? null,
model: input.model ?? null,
};
}
export function usePiRuntimePanelState(input: {
readonly activities: ReadonlyArray<OrchestrationThreadActivity> | undefined;
readonly provider: ServerProvider | null | undefined;
readonly skills: ServerProvider["skills"] | undefined;
readonly thread: Thread | null | undefined;
readonly gitCwd: string | null | undefined;
readonly model: string | null | undefined;
}) {
return useMemo(
() =>
derivePiRuntimePanelState({
activities: input.activities ?? [],
provider: input.provider,
skills: input.skills,
cwd: input.thread?.worktreePath ?? input.gitCwd ?? null,
branch: input.thread?.branch ?? null,
model: input.model ?? null,
}),
[input.activities, input.gitCwd, input.model, input.provider, input.skills, input.thread],
);
}
export function PiRuntimePanelTrigger(props: PiRuntimePanelTriggerProps) {
const summary = props.compact ? null : props.state.summaryStatus;
const Icon = props.open ? ChevronUpIcon : ChevronDownIcon;
return (
<Button
type="button"
variant="ghost"
size="xs"
className={cn(
"h-7 max-w-56 gap-1.5 px-2 text-muted-foreground hover:text-foreground",
props.open && "bg-accent text-foreground",
)}
aria-expanded={props.open}
aria-label="Toggle Pi panel"
onClick={props.onToggle}
>
<span className="font-medium text-foreground/85">Pi</span>
{summary ? <span className="truncate text-muted-foreground">{summary}</span> : null}
{props.state.issueCount > 0 ? (
<Badge variant="warning" size="sm" className="h-4 min-w-4 px-1">
{props.state.issueCount}
</Badge>
) : null}
<Icon className="size-3.5" />
</Button>
);
}
export function PiRuntimePanel(props: PiRuntimePanelProps) {
return (
<div className="flex h-[min(18rem,40vh)] min-h-0 flex-col border-b border-border/65 bg-muted/15">
<div className="flex min-w-0 items-center justify-between gap-2 border-b border-border/55 px-3 py-2 sm:px-4">
<div className="flex min-w-0 items-center gap-2">
<span className="text-foreground text-sm font-medium">Pi</span>
{props.state.summaryStatus ? (
<span className="truncate text-muted-foreground text-xs">
{props.state.summaryStatus}
</span>
) : null}
{props.state.issueCount > 0 ? (
<Badge variant="warning" size="sm">
{props.state.issueCount}
</Badge>
) : null}
</div>
<Button
type="button"
variant="ghost"
size="icon-xs"
aria-label="Close Pi panel"
onClick={props.onClose}
>
<XIcon />
</Button>
</div>
<div className="flex gap-1 px-3 pt-2 sm:px-4" role="tablist" aria-label="Pi panel sections">
{PANEL_TABS.map((tab) => (
<button
key={tab.id}
type="button"
role="tab"
aria-selected={props.tab === tab.id}
className={cn(
"rounded-md px-2 py-1 text-xs transition-colors",
props.tab === tab.id
? "bg-accent text-foreground"
: "text-muted-foreground hover:bg-accent/60 hover:text-foreground",
)}
onClick={() => props.onTabChange(tab.id)}
>
{tab.label}
</button>
))}
</div>
<ScrollArea className="min-h-0 flex-1" scrollbarGutter scrollFade>
<div className="px-3 py-3 sm:px-4">{renderPanelTab(props.state, props.tab)}</div>
</ScrollArea>
</div>
);
}
function renderPanelTab(state: PiRuntimePanelState, tab: PiRuntimePanelTab) {
switch (tab) {
case "home":
return <PiPanelHome state={state} />;
case "extensions":
return <PiPanelExtensions state={state} />;
case "logs":
return <PiPanelLogs logs={state.logs} />;
}
}
function PiPanelHome({ state }: { readonly state: PiRuntimePanelState }) {
return (
<div className="space-y-3 text-xs">
{state.title || state.headers.length > 0 ? (
<section className="space-y-1">
<PiPanelSectionLabel>Header</PiPanelSectionLabel>
{state.title ? <PiKeyValue label="title" value={state.title} /> : null}
{state.headers.map((row) => (
<PiKeyValue
key={row.key}
label={row.label}
value={row.text}
muted={row.state === "unsupported"}
/>
))}
</section>
) : null}
<section className="space-y-1">
<PiPanelSectionLabel>Status</PiPanelSectionLabel>
{state.statuses.length > 0 ? (
state.statuses.map((row) => (
<PiKeyValue
key={row.key}
label={row.label}
value={row.text}
muted={row.state === "unsupported"}
/>
))
) : (
<PiEmptyLine>No active status</PiEmptyLine>
)}
</section>
<section className="space-y-1">
<PiPanelSectionLabel>Widgets</PiPanelSectionLabel>
{state.widgets.length > 0 ? (
state.widgets.map((widget) => (
<div key={widget.key} className="min-w-0">
<div className="text-muted-foreground">{widget.label}</div>
<pre className="mt-1 max-h-28 overflow-auto whitespace-pre-wrap rounded-md bg-background/50 px-2 py-1.5 font-mono text-[11px] text-foreground">
{widget.lines.length > 0 ? widget.lines.join("\n") : widget.text}
</pre>
</div>
))
) : (
<PiEmptyLine>No active widgets</PiEmptyLine>
)}
</section>
<section className="space-y-1">
<PiPanelSectionLabel>Footer</PiPanelSectionLabel>
{state.cwd ? <PiKeyValue label="cwd" value={state.cwd} /> : null}
{state.branch ? <PiKeyValue label="branch" value={state.branch} /> : null}
{state.model ? <PiKeyValue label="model" value={state.model} /> : null}
{state.footers.map((row) => (
<PiKeyValue
key={row.key}
label={row.label}
value={row.text}
muted={row.state === "unsupported"}
/>
))}
</section>
</div>
);
}
function PiPanelExtensions({ state }: { readonly state: PiRuntimePanelState }) {
return (
<div className="space-y-3 text-xs">
<section className="space-y-1.5">
<PiPanelSectionLabel>Extensions</PiPanelSectionLabel>
{state.extensions.length > 0 ? (
state.extensions.map((extension) => (
<div key={extension.path} className="flex min-w-0 items-center justify-between gap-3">
<div className="min-w-0">
<div className="truncate text-foreground">{extension.name}</div>
<div className="truncate text-muted-foreground">{extension.path}</div>
</div>
<span className="shrink-0 text-muted-foreground">active</span>
</div>
))
) : (
<PiEmptyLine>No extension snapshot yet</PiEmptyLine>
)}
</section>
<section className="space-y-1.5">
<PiPanelSectionLabel>Skills</PiPanelSectionLabel>
{state.skills.length > 0 ? (
state.skills.map((skill) => {
const source = formatProviderSkillInstallSource(skill);
return (
<div key={skill.name} className="flex min-w-0 items-center justify-between gap-3">
<span className="truncate text-foreground">
{formatProviderSkillDisplayName(skill)}
</span>
{source ? <span className="shrink-0 text-muted-foreground">{source}</span> : null}
</div>
);
})
) : (
<PiEmptyLine>No Pi skills loaded</PiEmptyLine>
)}
</section>
</div>
);
}
function PiPanelLogs({ logs }: { readonly logs: readonly PiPanelLog[] }) {
if (logs.length === 0) {
return <PiEmptyLine>No Pi logs yet</PiEmptyLine>;
}
return (
<div className="space-y-2 text-xs">
{logs.slice(0, 12).map((log) => (
<div key={log.id} className="flex min-w-0 gap-2">
<span
className={cn(
"mt-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-sm",
log.severity === "error"
? "text-destructive-foreground"
: log.severity === "warning"
? "text-warning-foreground"
: "text-muted-foreground",
)}
>
{log.severity === "info" ? null : <AlertTriangleIcon className="size-3" />}
</span>
<div className="min-w-0 flex-1">
<div className="flex min-w-0 items-center gap-2">
<span className="shrink-0 text-muted-foreground">{log.severity}</span>
<span className="truncate text-foreground">{log.source}</span>
</div>
<div className="mt-0.5 text-muted-foreground">{log.message}</div>
{log.hiddenCount > 0 ? (
<div className="mt-0.5 text-muted-foreground/70">
{log.hiddenCount} repeats hidden
</div>
) : null}
</div>
</div>
))}
</div>
);
}
function PiPanelSectionLabel({ children }: { readonly children: string }) {
return (
<div className="text-[11px] font-medium uppercase tracking-normal text-muted-foreground">
{children}
</div>
);
}
function PiKeyValue(props: {
readonly label: string;
readonly value: string;
readonly muted?: boolean;
}) {
return (
<div className="grid min-w-0 grid-cols-[5.5rem_minmax(0,1fr)] gap-2">
<span className="truncate text-muted-foreground">{props.label}</span>
<span
className={cn("min-w-0 truncate text-foreground", props.muted && "text-muted-foreground")}
>
{props.value}
</span>
</div>
);
}
function PiEmptyLine({ children }: { readonly children: string }) {
return <div className="text-muted-foreground/70">{children}</div>;
}
@@ -254,6 +254,7 @@ async function mountPicker(props: {
lockedContinuationGroupKey?: string | null;
providers?: ReadonlyArray<ServerProvider>;
settings?: UnifiedSettings;
modelOptionsByInstance?: ReadonlyMap<ProviderInstanceId, ReadonlyArray<ModelEsque>>;
triggerVariant?: "ghost" | "outline";
}) {
const host = document.createElement("div");
@@ -262,12 +263,14 @@ async function mountPicker(props: {
const providers = props.providers ?? TEST_PROVIDERS;
const instanceEntries = sortProviderInstanceEntries(deriveProviderInstanceEntries(providers));
const activeInstanceId = props.activeInstanceId ?? CODEX_INSTANCE_ID;
const modelOptionsByInstance = getCustomModelOptionsByInstance(
props.settings ?? DEFAULT_UNIFIED_SETTINGS,
providers,
activeInstanceId,
props.model,
);
const modelOptionsByInstance =
props.modelOptionsByInstance ??
getCustomModelOptionsByInstance(
props.settings ?? DEFAULT_UNIFIED_SETTINGS,
providers,
activeInstanceId,
props.model,
);
const screen = await render(
<ProviderModelPicker
activeInstanceId={activeInstanceId}
@@ -372,6 +375,43 @@ describe("ProviderModelPicker", () => {
}
});
it("falls back to the active instance when favorites are not in the loaded option slice", async () => {
localStorage.setItem(
"t3code:client-settings:v1",
JSON.stringify({
...DEFAULT_CLIENT_SETTINGS,
favorites: [{ provider: "codex", model: "gpt-5-codex" }],
}),
);
const allOptions = getCustomModelOptionsByInstance(
DEFAULT_UNIFIED_SETTINGS,
TEST_PROVIDERS,
CLAUDE_INSTANCE_ID,
"claude-opus-4-6",
);
const mounted = await mountPicker({
activeInstanceId: CLAUDE_INSTANCE_ID,
model: "claude-opus-4-6",
lockedProvider: null,
modelOptionsByInstance: new Map([
[CLAUDE_INSTANCE_ID, allOptions.get(CLAUDE_INSTANCE_ID) ?? []],
]),
});
try {
await page.getByRole("button").click();
await vi.waitFor(() => {
const text = document.body.textContent ?? "";
expect(text).not.toContain("No models found");
expect(text).toContain("Claude Opus 4.6");
});
} finally {
localStorage.removeItem("t3code:client-settings:v1");
await mounted.cleanup();
}
});
it("filters models by selected provider in sidebar", async () => {
const mounted = await mountPicker({
activeInstanceId: CLAUDE_INSTANCE_ID,
@@ -169,18 +169,20 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: {
align="start"
className="border-0 bg-transparent p-0 shadow-none before:hidden [--viewport-inline-padding:0] *:data-[slot=popover-viewport]:p-0"
>
<ModelPickerContent
activeInstanceId={activeInstanceId}
model={props.model}
lockedProvider={props.lockedProvider}
lockedContinuationGroupKey={props.lockedContinuationGroupKey ?? null}
instanceEntries={props.instanceEntries}
{...(props.keybindings ? { keybindings: props.keybindings } : {})}
modelOptionsByInstance={props.modelOptionsByInstance}
terminalOpen={props.terminalOpen ?? false}
onRequestClose={() => setIsMenuOpen(false)}
onInstanceModelChange={handleInstanceModelChange}
/>
{isMenuOpen ? (
<ModelPickerContent
activeInstanceId={activeInstanceId}
model={props.model}
lockedProvider={props.lockedProvider}
lockedContinuationGroupKey={props.lockedContinuationGroupKey ?? null}
instanceEntries={props.instanceEntries}
{...(props.keybindings ? { keybindings: props.keybindings } : {})}
modelOptionsByInstance={props.modelOptionsByInstance}
terminalOpen={props.terminalOpen ?? false}
onRequestClose={() => setIsMenuOpen(false)}
onInstanceModelChange={handleInstanceModelChange}
/>
) : null}
</PopoverPopup>
</Popover>
);
@@ -1,5 +1,5 @@
import { ProviderDriverKind } from "@t3tools/contracts";
import { ClaudeAI, CursorIcon, Icon, OpenAI, OpenCodeIcon } from "../Icons";
import { ClaudeAI, CursorIcon, Icon, OpenAI, OpenCodeIcon, PiAgentIcon } from "../Icons";
import { PROVIDER_OPTIONS } from "../../session-logic";
export const PROVIDER_ICON_BY_PROVIDER: Partial<Record<ProviderDriverKind, Icon>> = {
@@ -7,6 +7,7 @@ export const PROVIDER_ICON_BY_PROVIDER: Partial<Record<ProviderDriverKind, Icon>
[ProviderDriverKind.make("claudeAgent")]: ClaudeAI,
[ProviderDriverKind.make("opencode")]: OpenCodeIcon,
[ProviderDriverKind.make("cursor")]: CursorIcon,
[ProviderDriverKind.make("pi")]: PiAgentIcon,
};
function isAvailableProviderOption(option: (typeof PROVIDER_OPTIONS)[number]): option is {
@@ -427,7 +427,11 @@ const createDesktopBridgeStub = (overrides?: {
getAdvertisedEndpoints: vi.fn().mockResolvedValue(overrides?.advertisedEndpoints ?? []),
pickFolder: vi.fn().mockResolvedValue(null),
confirm: vi.fn().mockResolvedValue(false),
discoverColorThemes: vi.fn().mockResolvedValue([]),
loadColorTheme: vi.fn().mockResolvedValue(null),
getEditorThemePreferences: vi.fn().mockResolvedValue([]),
setTheme: vi.fn().mockResolvedValue(undefined),
setWindowThemeColors: vi.fn().mockResolvedValue(undefined),
showContextMenu: vi.fn().mockResolvedValue(null),
openExternal: vi.fn().mockResolvedValue(true),
onMenuAction: () => () => {},
@@ -10,6 +10,7 @@ import {
type ProviderInstanceConfig,
type ProviderInstanceId,
type ScopedThreadRef,
type ThemePreference,
} from "@t3tools/contracts";
import { scopeThreadRef } from "@t3tools/client-runtime";
import { DEFAULT_UNIFIED_SETTINGS } from "@t3tools/contracts/settings";
@@ -95,6 +96,26 @@ const THEME_OPTIONS = [
},
] as const;
function themePreferenceToSelectValue(preference: ThemePreference) {
if (preference.mode === "system") return "system";
if (preference.mode === "builtin") return `builtin:${preference.theme}`;
if (preference.mode === "external") return `external:${preference.themeId}`;
return `follow-editor:${preference.source}`;
}
function selectValueToThemePreference(value: string): ThemePreference | null {
if (value === "system") return { mode: "system" };
if (value === "builtin:light") return { mode: "builtin", theme: "light" };
if (value === "builtin:dark") return { mode: "builtin", theme: "dark" };
if (value.startsWith("external:")) return { mode: "external", themeId: value.slice(9) };
if (value === "follow-editor:vscode") return { mode: "follow-editor", source: "vscode" };
if (value === "follow-editor:cursor") return { mode: "follow-editor", source: "cursor" };
if (value === "follow-editor:vscode-insiders") {
return { mode: "follow-editor", source: "vscode-insiders" };
}
return null;
}
const TIMESTAMP_FORMAT_LABELS = {
locale: "System default",
"12-hour": "12-hour",
@@ -438,7 +459,16 @@ export function useSettingsRestore(onRestored?: () => void) {
}
export function GeneralSettingsPanel() {
const { theme, setTheme } = useTheme();
const {
theme,
preference,
setTheme,
setThemePreference,
discoveredThemes,
refreshThemes,
status: themeStatus,
message: themeMessage,
} = useTheme();
const settings = useSettings();
const { updateSettings } = useUpdateSettings();
const observability = useServerObservability();
@@ -479,34 +509,67 @@ export function GeneralSettingsPanel() {
<SettingsSection title="General">
<SettingsRow
title="Theme"
description="Choose how T3 Code looks across the app."
description={
themeMessage ??
(discoveredThemes.length > 0
? `Detected ${discoveredThemes.length} themes from VS Code and Cursor.`
: "Choose how T3 Code looks across the app.")
}
resetAction={
theme !== "system" ? (
<SettingResetButton label="theme" onClick={() => setTheme("system")} />
) : null
}
control={
<Select
value={theme}
onValueChange={(value) => {
if (value === "system" || value === "light" || value === "dark") {
setTheme(value);
}
}}
>
<SelectTrigger className="w-full sm:w-40" aria-label="Theme preference">
<SelectValue>
{THEME_OPTIONS.find((option) => option.value === theme)?.label ?? "System"}
</SelectValue>
</SelectTrigger>
<SelectPopup align="end" alignItemWithTrigger={false}>
{THEME_OPTIONS.map((option) => (
<SelectItem hideIndicator key={option.value} value={option.value}>
{option.label}
<div className="flex w-full items-center justify-end gap-2 sm:w-auto">
<Button
type="button"
variant="ghost"
size="icon"
aria-label="Refresh editor themes"
disabled={themeStatus === "loading"}
onClick={() => void refreshThemes()}
>
{themeStatus === "loading" ? (
<LoaderIcon className="size-4 animate-spin" />
) : (
<RefreshCwIcon className="size-4" />
)}
</Button>
<Select
value={themePreferenceToSelectValue(preference)}
onValueChange={(value) => {
if (!value) return;
const nextPreference = selectValueToThemePreference(value);
if (nextPreference) setThemePreference(nextPreference);
}}
>
<SelectTrigger className="w-full sm:w-64" aria-label="Theme preference">
<SelectValue>
{preference.mode === "external"
? (discoveredThemes.find((entry) => entry.id === preference.themeId)?.label ??
"External theme")
: (THEME_OPTIONS.find((option) => option.value === theme)?.label ?? "System")}
</SelectValue>
</SelectTrigger>
<SelectPopup align="end" alignItemWithTrigger={false}>
<SelectItem hideIndicator value="system">
System
</SelectItem>
))}
</SelectPopup>
</Select>
<SelectItem hideIndicator value="builtin:light">
Light
</SelectItem>
<SelectItem hideIndicator value="builtin:dark">
Dark
</SelectItem>
{discoveredThemes.map((entry) => (
<SelectItem hideIndicator key={entry.id} value={`external:${entry.id}`}>
{entry.source === "cursor" ? "Cursor" : "VS Code"} · {entry.label}
</SelectItem>
))}
</SelectPopup>
</Select>
</div>
}
/>
@@ -3,10 +3,11 @@ import {
CodexSettings,
CursorSettings,
OpenCodeSettings,
PiSettings,
ProviderDriverKind,
} from "@t3tools/contracts";
import type { Schema } from "effect";
import { ClaudeAI, CursorIcon, type Icon, OpenAI, OpenCodeIcon } from "../Icons";
import { ClaudeAI, CursorIcon, type Icon, OpenAI, OpenCodeIcon, PiAgentIcon } from "../Icons";
type ProviderSettingsSchema = {
readonly fields: Readonly<Record<string, Schema.Top>>;
@@ -59,6 +60,13 @@ export const PROVIDER_CLIENT_DEFINITIONS: readonly ProviderClientDefinition[] =
icon: OpenCodeIcon,
settingsSchema: OpenCodeSettings,
},
{
value: ProviderDriverKind.make("pi"),
label: "Pi",
icon: PiAgentIcon,
badgeLabel: "Full Access",
settingsSchema: PiSettings,
},
];
export const PROVIDER_CLIENT_DEFINITION_BY_VALUE: Partial<
+2 -5
View File
@@ -15,14 +15,11 @@ import { selectProjectsAcrossEnvironments, useStore } from "../store";
import { createThreadSelectorByRef } from "../storeSelectors";
import { resolveThreadRouteTarget } from "../threadRoutes";
import { useUiStateStore } from "../uiStateStore";
import { useSettings } from "./useSettings";
import { useProjectGroupingSettings } from "./useSettings";
function useNewThreadState() {
const projects = useStore(useShallow((store) => selectProjectsAcrossEnvironments(store)));
const projectGroupingSettings = useSettings((settings) => ({
sidebarProjectGroupingMode: settings.sidebarProjectGroupingMode,
sidebarProjectGroupingOverrides: settings.sidebarProjectGroupingOverrides,
}));
const projectGroupingSettings = useProjectGroupingSettings();
const router = useRouter();
const getCurrentRouteTarget = useCallback(() => {
const currentRouteParams = router.state.matches[router.state.matches.length - 1]?.params ?? {};
+19
View File
@@ -22,6 +22,7 @@ import { ensureLocalApi } from "~/localApi";
import { Struct } from "effect";
import { applyServerSettingsPatch } from "@t3tools/shared/serverSettings";
import { applySettingsUpdated, getServerConfig, useServerSettings } from "~/rpc/serverState";
import type { ProjectGroupingSettings } from "~/logicalProject";
const CLIENT_SETTINGS_PERSISTENCE_ERROR_SCOPE = "[CLIENT_SETTINGS]";
@@ -31,6 +32,11 @@ let clientSettingsSnapshot = DEFAULT_CLIENT_SETTINGS;
let clientSettingsHydrated = false;
let clientSettingsHydrationPromise: Promise<void> | null = null;
const selectSidebarProjectGroupingMode = (settings: UnifiedSettings) =>
settings.sidebarProjectGroupingMode;
const selectSidebarProjectGroupingOverrides = (settings: UnifiedSettings) =>
settings.sidebarProjectGroupingOverrides;
function emitClientSettingsChange() {
for (const listener of clientSettingsListeners) {
listener();
@@ -186,6 +192,19 @@ export function useSettings<T = UnifiedSettings>(selector?: (s: UnifiedSettings)
return useMemo(() => (selector ? selector(merged) : (merged as T)), [merged, selector]);
}
export function useProjectGroupingSettings(): ProjectGroupingSettings {
const sidebarProjectGroupingMode = useSettings(selectSidebarProjectGroupingMode);
const sidebarProjectGroupingOverrides = useSettings(selectSidebarProjectGroupingOverrides);
return useMemo(
() => ({
sidebarProjectGroupingMode,
sidebarProjectGroupingOverrides,
}),
[sidebarProjectGroupingMode, sidebarProjectGroupingOverrides],
);
}
/**
* Returns an updater that routes each key to the correct backing store.
*
+383 -73
View File
@@ -1,23 +1,48 @@
import { useCallback, useEffect, useSyncExternalStore } from "react";
import { useCallback, useSyncExternalStore } from "react";
import type {
DesktopTheme,
DiscoveredColorTheme,
ResolvedColorTheme,
ThemePreference,
} from "@t3tools/contracts";
import { DEFAULT_THEME_PREFERENCE } from "@t3tools/contracts";
import { EXTERNAL_APP_THEME_VARIABLES, isDarkThemeKind } from "@t3tools/shared/themeMapping";
type Theme = "light" | "dark" | "system";
type BuiltInTheme = "light" | "dark" | "system";
type ThemeStatus = "idle" | "loading" | "ready" | "error";
type ThemeSnapshot = {
theme: Theme;
preference: ThemePreference;
systemDark: boolean;
resolvedKind: "light" | "dark";
resolvedColorTheme: ResolvedColorTheme | null;
discoveredThemes: readonly DiscoveredColorTheme[];
status: ThemeStatus;
message: string | null;
};
const STORAGE_KEY = "t3code:theme";
const PREFERENCE_STORAGE_KEY = "t3code:theme-preference:v1";
const BOOTSTRAP_THEME_CACHE_KEY = "t3code:resolved-theme-cache:v1";
const MEDIA_QUERY = "(prefers-color-scheme: dark)";
const DEFAULT_THEME_SNAPSHOT: ThemeSnapshot = {
theme: "system",
systemDark: false,
};
const THEME_COLOR_META_NAME = "theme-color";
const DYNAMIC_THEME_COLOR_SELECTOR = `meta[name="${THEME_COLOR_META_NAME}"][data-dynamic-theme-color="true"]`;
let listeners: Array<() => void> = [];
let lastSnapshot: ThemeSnapshot | null = null;
let lastDesktopTheme: Theme | null = null;
let lastDesktopTheme: DesktopTheme | null = null;
let themeRuntimeRefCount = 0;
let stopThemeRuntime: (() => void) | null = null;
let refreshThemesPromise: Promise<void> | null = null;
const preferenceLoadPromises = new Map<string, Promise<void>>();
let state: ThemeSnapshot = {
preference: DEFAULT_THEME_PREFERENCE,
systemDark: false,
resolvedKind: "light",
resolvedColorTheme: null,
discoveredThemes: [],
status: "idle",
message: null,
};
function emitChange() {
for (const listener of listeners) listener();
@@ -31,18 +56,91 @@ function getSystemDark() {
return typeof window !== "undefined" && window.matchMedia(MEDIA_QUERY).matches;
}
function getStored(): Theme {
if (!hasThemeStorage()) return DEFAULT_THEME_SNAPSHOT.theme;
const raw = localStorage.getItem(STORAGE_KEY);
if (raw === "light" || raw === "dark" || raw === "system") return raw;
return DEFAULT_THEME_SNAPSHOT.theme;
function builtInToPreference(theme: BuiltInTheme): ThemePreference {
return theme === "system" ? { mode: "system" } : { mode: "builtin", theme };
}
function preferenceToBuiltInTheme(preference: ThemePreference): BuiltInTheme {
if (preference.mode === "builtin") return preference.theme;
return "system";
}
function parsePreference(value: string | null): ThemePreference | null {
if (!value) return null;
try {
const parsed = JSON.parse(value) as unknown;
if (typeof parsed !== "object" || parsed === null) return null;
if ("mode" in parsed && parsed.mode === "system") return { mode: "system" };
if ("mode" in parsed && parsed.mode === "builtin" && "theme" in parsed) {
if (parsed.theme === "light" || parsed.theme === "dark") {
return { mode: "builtin", theme: parsed.theme };
}
}
if ("mode" in parsed && parsed.mode === "external" && "themeId" in parsed) {
return typeof parsed.themeId === "string"
? { mode: "external", themeId: parsed.themeId }
: null;
}
if ("mode" in parsed && parsed.mode === "follow-editor" && "source" in parsed) {
if (
parsed.source === "vscode" ||
parsed.source === "cursor" ||
parsed.source === "vscode-insiders"
) {
return { mode: "follow-editor", source: parsed.source };
}
}
} catch {
return null;
}
return null;
}
function getStoredPreference(): ThemePreference {
if (!hasThemeStorage()) return DEFAULT_THEME_PREFERENCE;
const savedPreference = parsePreference(localStorage.getItem(PREFERENCE_STORAGE_KEY));
if (savedPreference) return savedPreference;
const legacy = localStorage.getItem(STORAGE_KEY);
if (legacy === "light" || legacy === "dark" || legacy === "system") {
const migrated = builtInToPreference(legacy);
localStorage.setItem(PREFERENCE_STORAGE_KEY, JSON.stringify(migrated));
return migrated;
}
return DEFAULT_THEME_PREFERENCE;
}
function setStoredPreference(preference: ThemePreference) {
if (!hasThemeStorage()) return;
localStorage.setItem(PREFERENCE_STORAGE_KEY, JSON.stringify(preference));
localStorage.setItem(STORAGE_KEY, preferenceToBuiltInTheme(preference));
}
function isSamePreference(a: ThemePreference, b: ThemePreference) {
if (a.mode !== b.mode) return false;
if (a.mode === "builtin") return a.theme === (b.mode === "builtin" ? b.theme : null);
if (a.mode === "external") return a.themeId === (b.mode === "external" ? b.themeId : null);
if (a.mode === "follow-editor") {
return a.source === (b.mode === "follow-editor" ? b.source : null);
}
return true;
}
function themePreferenceKey(preference: ThemePreference) {
switch (preference.mode) {
case "builtin":
return `builtin:${preference.theme}`;
case "external":
return `external:${preference.themeId}`;
case "follow-editor":
return `follow-editor:${preference.source}`;
case "system":
return "system";
}
}
function ensureThemeColorMetaTag(): HTMLMetaElement {
let element = document.querySelector<HTMLMetaElement>(DYNAMIC_THEME_COLOR_SELECTOR);
if (element) {
return element;
}
if (element) return element;
element = document.createElement("meta");
element.name = THEME_COLOR_META_NAME;
@@ -87,108 +185,320 @@ export function syncBrowserChromeTheme() {
ensureThemeColorMetaTag().setAttribute("content", backgroundColor);
}
function applyTheme(theme: Theme, suppressTransitions = false) {
if (typeof document === "undefined" || typeof window === "undefined") return;
if (suppressTransitions) {
document.documentElement.classList.add("no-transitions");
}
const isDark = theme === "dark" || (theme === "system" && getSystemDark());
document.documentElement.classList.toggle("dark", isDark);
syncBrowserChromeTheme();
syncDesktopTheme(theme);
if (suppressTransitions) {
// Force a reflow so the no-transitions class takes effect before removal
// oxlint-disable-next-line no-unused-expressions
document.documentElement.offsetHeight;
requestAnimationFrame(() => {
document.documentElement.classList.remove("no-transitions");
});
function clearExternalThemeVariables(root: HTMLElement) {
for (const name of EXTERNAL_APP_THEME_VARIABLES) {
root.style.removeProperty(name);
}
}
function syncDesktopTheme(theme: Theme) {
function syncDesktopTheme(theme: DesktopTheme) {
if (typeof window === "undefined") return;
const bridge = window.desktopBridge;
if (!bridge || lastDesktopTheme === theme) {
return;
}
if (!bridge?.setTheme || lastDesktopTheme === theme) return;
lastDesktopTheme = theme;
void bridge.setTheme(theme).catch(() => {
if (lastDesktopTheme === theme) {
lastDesktopTheme = null;
}
if (lastDesktopTheme === theme) lastDesktopTheme = null;
});
}
// Apply immediately on module load to prevent flash
function syncDesktopWindowColors(theme: ResolvedColorTheme | null) {
if (typeof window === "undefined") return;
const bridge = window.desktopBridge;
if (!bridge?.setWindowThemeColors || !theme) return;
const backgroundColor =
theme.appVariables["--app-chrome-background"] ??
theme.appVariables["--background"] ??
(isDarkThemeKind(theme.kind) ? "#0a0a0a" : "#ffffff");
void bridge
.setWindowThemeColors({
backgroundColor,
titleBarColor: backgroundColor,
titleBarSymbolColor: theme.appVariables["--foreground"],
})
.catch(() => {});
}
function applyResolvedTheme(theme: ResolvedColorTheme | null, suppressTransitions = false) {
if (typeof document === "undefined" || typeof window === "undefined") return;
const root = document.documentElement;
if (suppressTransitions) root.classList.add("no-transitions");
if (theme) {
for (const [name, value] of Object.entries(theme.appVariables)) {
root.style.setProperty(name, value);
}
} else {
clearExternalThemeVariables(root);
}
const preference = state.preference;
const isDark = theme
? isDarkThemeKind(theme.kind)
: preference.mode === "builtin"
? preference.theme === "dark"
: getSystemDark();
root.classList.toggle("dark", isDark);
root.dataset.themeSource = theme?.source ?? "builtin";
root.dataset.themeId = theme?.id ?? "";
syncBrowserChromeTheme();
syncDesktopTheme(
theme
? isDark
? "dark"
: "light"
: preference.mode === "system"
? "system"
: isDark
? "dark"
: "light",
);
syncDesktopWindowColors(theme);
if (suppressTransitions) {
// oxlint-disable-next-line no-unused-expressions
root.offsetHeight;
requestAnimationFrame(() => root.classList.remove("no-transitions"));
}
}
function recomputeSnapshot(next: Partial<ThemeSnapshot> = {}) {
const preference = next.preference ?? state.preference;
const systemDark = getSystemDark();
const resolvedTheme =
next.resolvedColorTheme === undefined ? state.resolvedColorTheme : next.resolvedColorTheme;
const resolvedKind: "light" | "dark" = resolvedTheme
? isDarkThemeKind(resolvedTheme.kind)
? "dark"
: "light"
: preference.mode === "builtin"
? preference.theme
: systemDark
? "dark"
: "light";
state = {
...state,
...next,
preference,
systemDark,
resolvedKind,
resolvedColorTheme: resolvedTheme,
};
lastSnapshot = null;
emitChange();
}
async function loadPreference(preference: ThemePreference, suppressTransitions = true) {
if (preference.mode === "external") {
const bridge = window.desktopBridge;
if (!bridge?.loadColorTheme) {
recomputeSnapshot({
preference,
resolvedColorTheme: null,
status: "error",
message: "Desktop theme discovery is unavailable in browser mode.",
});
applyResolvedTheme(null, suppressTransitions);
return;
}
recomputeSnapshot({ preference, status: "loading", message: null });
let theme: ResolvedColorTheme | null;
try {
theme = await bridge.loadColorTheme(preference.themeId);
} catch {
if (!isSamePreference(state.preference, preference)) return;
recomputeSnapshot({
resolvedColorTheme: null,
status: "error",
message: "Could not load selected editor theme.",
});
applyResolvedTheme(null, suppressTransitions);
return;
}
if (!isSamePreference(state.preference, preference)) return;
if (!theme) {
setStoredPreference(DEFAULT_THEME_PREFERENCE);
recomputeSnapshot({
preference: DEFAULT_THEME_PREFERENCE,
resolvedColorTheme: null,
status: "error",
message: "Selected theme is unavailable. Falling back to System.",
});
applyResolvedTheme(null, suppressTransitions);
return;
}
localStorage.setItem(
BOOTSTRAP_THEME_CACHE_KEY,
JSON.stringify({ id: theme.id, kind: theme.kind, appVariables: theme.appVariables }),
);
recomputeSnapshot({ preference, resolvedColorTheme: theme, status: "ready", message: null });
applyResolvedTheme(theme, suppressTransitions);
return;
}
recomputeSnapshot({ preference, resolvedColorTheme: null, status: "ready", message: null });
applyResolvedTheme(null, suppressTransitions);
}
function loadThemePreference(preference: ThemePreference, suppressTransitions = true) {
const key = themePreferenceKey(preference);
const existing = preferenceLoadPromises.get(key);
if (existing) return existing;
const promise = loadPreference(preference, suppressTransitions).finally(() => {
if (preferenceLoadPromises.get(key) === promise) {
preferenceLoadPromises.delete(key);
}
});
preferenceLoadPromises.set(key, promise);
return promise;
}
function loadStoredPreference(suppressTransitions = true) {
return loadThemePreference(getStoredPreference(), suppressTransitions);
}
async function refreshThemesNow() {
const bridge = typeof window !== "undefined" ? window.desktopBridge : null;
if (!bridge?.discoverColorThemes) {
recomputeSnapshot({
discoveredThemes: [],
status: "ready",
message: "Open the desktop app to use VS Code and Cursor themes.",
});
return;
}
recomputeSnapshot({ status: "loading", message: null });
try {
const discoveredThemes = await bridge.discoverColorThemes();
recomputeSnapshot({ discoveredThemes, status: "ready", message: null });
} catch {
recomputeSnapshot({ status: "error", message: "Could not refresh editor themes." });
}
}
export function refreshThemes() {
if (refreshThemesPromise) return refreshThemesPromise;
refreshThemesPromise = refreshThemesNow().finally(() => {
refreshThemesPromise = null;
});
return refreshThemesPromise;
}
function bootstrapCachedTheme() {
if (!hasThemeStorage()) return null;
const raw = localStorage.getItem(BOOTSTRAP_THEME_CACHE_KEY);
if (!raw) return null;
try {
const parsed = JSON.parse(raw) as Partial<ResolvedColorTheme>;
if (!parsed.id || !parsed.kind || !parsed.appVariables) return null;
return parsed as ResolvedColorTheme;
} catch {
return null;
}
}
if (typeof document !== "undefined" && hasThemeStorage()) {
applyTheme(getStored());
const preference = getStoredPreference();
state.preference = preference;
if (preference.mode === "external") {
state.resolvedColorTheme = bootstrapCachedTheme();
}
applyResolvedTheme(state.resolvedColorTheme);
}
function getSnapshot(): ThemeSnapshot {
if (!hasThemeStorage()) return DEFAULT_THEME_SNAPSHOT;
const theme = getStored();
const systemDark = theme === "system" ? getSystemDark() : false;
if (lastSnapshot && lastSnapshot.theme === theme && lastSnapshot.systemDark === systemDark) {
return lastSnapshot;
}
lastSnapshot = { theme, systemDark };
if (lastSnapshot) return lastSnapshot;
lastSnapshot = state;
return lastSnapshot;
}
function getServerSnapshot() {
return DEFAULT_THEME_SNAPSHOT;
return state;
}
function subscribe(listener: () => void): () => void {
if (typeof window === "undefined") return () => {};
listeners.push(listener);
// Listen for system preference changes
return () => {
listeners = listeners.filter((l) => l !== listener);
};
}
function startThemeRuntimeUnsafe() {
const mq = window.matchMedia(MEDIA_QUERY);
const handleChange = () => {
if (getStored() === "system") applyTheme("system", true);
emitChange();
recomputeSnapshot();
applyResolvedTheme(state.resolvedColorTheme, true);
};
mq.addEventListener("change", handleChange);
// Listen for storage changes from other tabs
const handleStorage = (e: StorageEvent) => {
if (e.key === STORAGE_KEY) {
applyTheme(getStored(), true);
emitChange();
if (e.key === STORAGE_KEY || e.key === PREFERENCE_STORAGE_KEY) {
void loadStoredPreference(true);
}
};
window.addEventListener("storage", handleStorage);
void loadStoredPreference(false).finally(() => {
void refreshThemes();
});
return () => {
listeners = listeners.filter((l) => l !== listener);
mq.removeEventListener("change", handleChange);
window.removeEventListener("storage", handleStorage);
};
}
export function startThemeRuntime() {
if (typeof window === "undefined") return () => {};
themeRuntimeRefCount += 1;
if (themeRuntimeRefCount === 1) {
stopThemeRuntime = startThemeRuntimeUnsafe();
}
let released = false;
return () => {
if (released) return;
released = true;
themeRuntimeRefCount = Math.max(0, themeRuntimeRefCount - 1);
if (themeRuntimeRefCount === 0) {
stopThemeRuntime?.();
stopThemeRuntime = null;
}
};
}
export function useTheme() {
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
const theme = snapshot.theme;
const resolvedTheme: "light" | "dark" =
theme === "system" ? (snapshot.systemDark ? "dark" : "light") : theme;
const setTheme = useCallback((next: Theme) => {
if (!hasThemeStorage()) return;
localStorage.setItem(STORAGE_KEY, next);
applyTheme(next, true);
emitChange();
const setThemePreference = useCallback((preference: ThemePreference) => {
setStoredPreference(preference);
void loadThemePreference(preference, true);
}, []);
// Keep DOM in sync on mount/change
useEffect(() => {
applyTheme(theme);
}, [theme]);
const setTheme = useCallback(
(next: BuiltInTheme) => {
setThemePreference(builtInToPreference(next));
},
[setThemePreference],
);
return { theme, setTheme, resolvedTheme } as const;
return {
theme: preferenceToBuiltInTheme(snapshot.preference),
setTheme,
preference: snapshot.preference,
setThemePreference,
resolvedTheme: snapshot.resolvedKind,
resolvedColorTheme: snapshot.resolvedColorTheme,
discoveredThemes: snapshot.discoveredThemes,
refreshThemes,
status: snapshot.status,
message: snapshot.message,
} as const;
}
+31
View File
@@ -31,6 +31,11 @@
--color-card: var(--card);
--color-foreground: var(--foreground);
--color-background: var(--background);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
@@ -112,6 +117,19 @@
--success-foreground: var(--color-emerald-700);
--warning: var(--color-amber-500);
--warning-foreground: var(--color-amber-700);
--sidebar: var(--background);
--sidebar-foreground: var(--foreground);
--sidebar-accent: var(--accent);
--sidebar-accent-foreground: var(--accent-foreground);
--sidebar-border: var(--border);
--terminal-background: var(--background);
--terminal-foreground: var(--foreground);
--terminal-cursor: var(--ring);
--terminal-selection-background: color-mix(in srgb, var(--ring) 24%, transparent);
--diff-inserted: var(--success);
--diff-removed: var(--destructive);
--chat-request-background: var(--card);
--chat-request-border: var(--border);
@variant dark {
color-scheme: dark;
@@ -141,6 +159,19 @@
--success-foreground: var(--color-emerald-400);
--warning: var(--color-amber-500);
--warning-foreground: var(--color-amber-400);
--sidebar: var(--background);
--sidebar-foreground: var(--foreground);
--sidebar-accent: var(--accent);
--sidebar-accent-foreground: var(--accent-foreground);
--sidebar-border: var(--border);
--terminal-background: var(--background);
--terminal-foreground: var(--foreground);
--terminal-cursor: var(--ring);
--terminal-selection-background: color-mix(in srgb, var(--ring) 24%, transparent);
--diff-inserted: var(--success);
--diff-removed: var(--destructive);
--chat-request-background: var(--card);
--chat-request-border: var(--border);
}
}
+77
View File
@@ -0,0 +1,77 @@
import { describe, expect, it } from "vitest";
import type { ResolvedColorTheme } from "@t3tools/contracts";
import { resolveCodeBlockThemeName, resolveSyntaxThemeName } from "./syntaxTheme";
function makeTheme(overrides: Partial<ResolvedColorTheme> = {}): ResolvedColorTheme {
return {
id: "vscode:github.github-vscode-theme:GitHub Dark Default",
label: "GitHub Dark Default",
source: "vscode",
kind: "dark",
colors: {
"editor.background": "#0d1117",
"editor.foreground": "#e6edf3",
},
tokenColors: [
{
scope: "keyword",
settings: {
foreground: "#ff7b72",
},
},
],
appVariables: {
"--background": "#0d1117",
"--foreground": "#e6edf3",
},
...overrides,
};
}
describe("syntaxTheme", () => {
it("falls back to built-in diff themes without an external theme", () => {
expect(resolveSyntaxThemeName({ resolvedTheme: "dark", resolvedColorTheme: null })).toBe(
"pierre-dark",
);
expect(resolveSyntaxThemeName({ resolvedTheme: "light", resolvedColorTheme: null })).toBe(
"pierre-light",
);
});
it("creates stable content-addressed custom syntax theme names", () => {
const theme = makeTheme();
expect(resolveSyntaxThemeName({ resolvedTheme: "dark", resolvedColorTheme: theme })).toBe(
resolveSyntaxThemeName({ resolvedTheme: "dark", resolvedColorTheme: theme }),
);
expect(
resolveSyntaxThemeName({
resolvedTheme: "dark",
resolvedColorTheme: makeTheme({
tokenColors: [{ scope: "keyword", settings: { foreground: "#79c0ff" } }],
}),
}),
).not.toBe(resolveSyntaxThemeName({ resolvedTheme: "dark", resolvedColorTheme: theme }));
});
it("keeps the code block resolver as an alias of the shared syntax resolver", () => {
const theme = makeTheme();
expect(resolveCodeBlockThemeName({ resolvedTheme: "dark", resolvedColorTheme: theme })).toBe(
resolveSyntaxThemeName({ resolvedTheme: "dark", resolvedColorTheme: theme }),
);
});
it("handles bootstrap-cached external themes before full colors load", () => {
const cachedTheme = {
id: "vscode:github.github-vscode-theme:GitHub Dark Default",
kind: "dark",
appVariables: {
"--background": "#0d1117",
"--foreground": "#e6edf3",
},
} satisfies Partial<ResolvedColorTheme>;
expect(
resolveSyntaxThemeName({ resolvedTheme: "dark", resolvedColorTheme: cachedTheme }),
).toMatch(/^t3-syntax-/);
});
});
+159
View File
@@ -0,0 +1,159 @@
import {
registerCustomTheme,
type DiffsThemeNames,
type ThemeRegistrationResolved,
} from "@pierre/diffs";
import type { ResolvedColorTheme } from "@t3tools/contracts";
import { isDarkThemeKind } from "@t3tools/shared/themeMapping";
import { resolveDiffThemeName } from "./diffRendering";
type BuiltInResolvedTheme = "light" | "dark";
type SyntaxColorTheme = Partial<ResolvedColorTheme>;
type ThemeSetting = ThemeRegistrationResolved["settings"][number];
type ThemeSettingOptions = ThemeSetting["settings"];
const registeredSyntaxThemes = new Set<string>();
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
function stableStringify(value: unknown): string {
if (Array.isArray(value)) {
return `[${value.map((entry) => stableStringify(entry)).join(",")}]`;
}
if (isRecord(value)) {
return `{${Object.entries(value)
.toSorted(([leftKey], [rightKey]) => leftKey.localeCompare(rightKey))
.map(([key, entry]) => `${JSON.stringify(key)}:${stableStringify(entry)}`)
.join(",")}}`;
}
return JSON.stringify(value);
}
function normalizeStringRecord(value: unknown): Record<string, string> {
if (!isRecord(value)) return {};
const normalized: Record<string, string> = {};
for (const [key, entry] of Object.entries(value)) {
if (typeof entry === "string") {
normalized[key] = entry;
}
}
return normalized;
}
function hashString(input: string) {
let hash = 0x811c9dc5;
for (let index = 0; index < input.length; index += 1) {
hash ^= input.charCodeAt(index);
hash = Math.imul(hash, 0x01000193) >>> 0;
}
return hash.toString(36);
}
function normalizeScopes(value: unknown): ThemeSetting["scope"] | undefined {
if (typeof value === "string") return value;
if (Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
return value;
}
return undefined;
}
function normalizeThemeSettings(value: unknown): ThemeSettingOptions | null {
if (!isRecord(value)) return null;
const settings: ThemeSettingOptions = {
...(typeof value.foreground === "string" ? { foreground: value.foreground } : {}),
...(typeof value.background === "string" ? { background: value.background } : {}),
...(typeof value.fontStyle === "string" ? { fontStyle: value.fontStyle } : {}),
};
return Object.keys(settings).length > 0 ? settings : null;
}
function normalizeTokenColors(value: unknown): ThemeRegistrationResolved["settings"] {
if (!Array.isArray(value)) return [];
const settings: ThemeRegistrationResolved["settings"] = [];
for (const entry of value) {
if (!isRecord(entry)) continue;
const tokenSettings = normalizeThemeSettings(entry.settings);
if (!tokenSettings) continue;
const scope = normalizeScopes(entry.scope);
const next: ThemeSetting = {
...(scope ? { scope } : {}),
...(typeof entry.name === "string" ? { name: entry.name } : {}),
settings: tokenSettings,
};
settings.push(next);
}
return settings;
}
function syntaxThemeName(theme: SyntaxColorTheme, fallbackTheme: BuiltInResolvedTheme) {
const colors = normalizeStringRecord(theme.colors);
return `t3-syntax-${hashString(
stableStringify({
id: theme.id,
kind: theme.kind ?? fallbackTheme,
colors,
tokenColors: theme.tokenColors,
semanticHighlighting: theme.semanticHighlighting,
}),
)}`;
}
function toShikiTheme(
theme: SyntaxColorTheme,
name: string,
fallbackTheme: BuiltInResolvedTheme,
): ThemeRegistrationResolved {
const colors = normalizeStringRecord(theme.colors);
const appVariables = normalizeStringRecord(theme.appVariables);
const foreground = colors["editor.foreground"] ?? appVariables["--foreground"] ?? "#f5f5f5";
const background = colors["editor.background"] ?? appVariables["--background"] ?? "#111111";
const settings = normalizeTokenColors(theme.tokenColors);
const isDark = theme.kind ? isDarkThemeKind(theme.kind) : fallbackTheme === "dark";
return {
name,
displayName: theme.label ?? "Custom Theme",
type: isDark ? "dark" : "light",
fg: foreground,
bg: background,
colors: {
...colors,
"editor.foreground": foreground,
"editor.background": background,
},
settings,
tokenColors: settings,
...(typeof theme.semanticHighlighting === "boolean"
? { semanticHighlighting: theme.semanticHighlighting }
: {}),
};
}
function registerSyntaxTheme(theme: SyntaxColorTheme, fallbackTheme: BuiltInResolvedTheme) {
const name = syntaxThemeName(theme, fallbackTheme);
if (registeredSyntaxThemes.has(name)) return name;
const shikiTheme = toShikiTheme(theme, name, fallbackTheme);
registerCustomTheme(name, async () => shikiTheme);
registeredSyntaxThemes.add(name);
return name;
}
export function resolveSyntaxThemeName(input: {
readonly resolvedTheme: BuiltInResolvedTheme;
readonly resolvedColorTheme: SyntaxColorTheme | null;
}): DiffsThemeNames {
if (!input.resolvedColorTheme) {
return resolveDiffThemeName(input.resolvedTheme);
}
return registerSyntaxTheme(input.resolvedColorTheme, input.resolvedTheme);
}
export const resolveCodeBlockThemeName = resolveSyntaxThemeName;
+12
View File
@@ -222,7 +222,11 @@ function makeDesktopBridge(overrides: Partial<DesktopBridge> = {}): DesktopBridg
getAdvertisedEndpoints: async () => [],
pickFolder: async () => null,
confirm: async () => true,
discoverColorThemes: async () => [],
loadColorTheme: async () => null,
getEditorThemePreferences: async () => [],
setTheme: async () => undefined,
setWindowThemeColors: async () => undefined,
showContextMenu: async () => null,
openExternal: async () => true,
onMenuAction: () => () => undefined,
@@ -513,6 +517,12 @@ describe("wsApi", () => {
await expect(api.server.refreshProviders()).resolves.toEqual({ providers: nextProviders });
expect(rpcClientMock.server.refreshProviders).toHaveBeenCalledWith();
const instanceId = ProviderInstanceId.make("pi");
await expect(api.server.refreshProviders({ instanceId })).resolves.toEqual({
providers: nextProviders,
});
expect(rpcClientMock.server.refreshProviders).toHaveBeenLastCalledWith({ instanceId });
});
it("forwards provider updates directly to the RPC client", async () => {
@@ -614,6 +624,7 @@ describe("wsApi", () => {
sidebarProjectSortOrder: "manual" as const,
sidebarThreadSortOrder: "created_at" as const,
timestampFormat: "24-hour" as const,
themePreference: { mode: "system" as const },
};
const getClientSettings = vi.fn().mockResolvedValue({
...clientSettings,
@@ -676,6 +687,7 @@ describe("wsApi", () => {
sidebarProjectSortOrder: "manual" as const,
sidebarThreadSortOrder: "created_at" as const,
timestampFormat: "24-hour" as const,
themePreference: { mode: "system" as const },
};
await api.persistence.setClientSettings(clientSettings);
+4 -2
View File
@@ -121,9 +121,11 @@ function createBrowserLocalApi(rpcClient?: WsRpcClient): LocalApi {
server: {
getConfig: () =>
rpcClient ? rpcClient.server.getConfig() : Promise.reject(unavailableLocalBackendError()),
refreshProviders: () =>
refreshProviders: (input) =>
rpcClient
? rpcClient.server.refreshProviders()
? input === undefined
? rpcClient.server.refreshProviders()
: rpcClient.server.refreshProviders(input)
: Promise.reject(unavailableLocalBackendError()),
updateProvider: (input) =>
rpcClient
+12 -5
View File
@@ -42,12 +42,14 @@ export function sortModelsForProviderInstance<T extends ModelSlugItem>(
): T[] {
const modelOrder = options?.modelOrder ?? [];
const favoriteModels = toSet(options?.favoriteModels);
const shouldGroupFavorites = options?.groupFavorites === true && favoriteModels.size > 0;
if (modelOrder.length === 0 && !shouldGroupFavorites) {
return [...models];
}
const orderBySlug = rankByValue(modelOrder);
const originalOrder = rankByValue(Arr.map(models, (model) => model.slug));
const orders: Array<Order.Order<T>> = [
...(options?.groupFavorites === true
? [byTrueFirst<T>((model) => favoriteModels.has(model.slug))]
: []),
...(shouldGroupFavorites ? [byTrueFirst<T>((model) => favoriteModels.has(model.slug))] : []),
byOptionalRank((model) => orderBySlug.get(model.slug)),
byOptionalRank((model) => originalOrder.get(model.slug)),
];
@@ -64,14 +66,19 @@ export function sortProviderModelItems<T extends ProviderModelItem>(
},
): T[] {
const favoriteModelKeys = toSet(options?.favoriteModelKeys);
const instanceOrderValues = options?.instanceOrder ?? [];
const shouldGroupFavorites = options?.groupFavorites === true && favoriteModelKeys.size > 0;
if (instanceOrderValues.length === 0 && !shouldGroupFavorites) {
return [...items];
}
const instanceOrder = new Map(
Arr.map(options?.instanceOrder ?? [], (instanceId, index) => [instanceId, index] as const),
Arr.map(instanceOrderValues, (instanceId, index) => [instanceId, index] as const),
);
const originalOrder = rankByValue(
Arr.map(items, (item) => providerModelKey(item.instanceId, item.slug)),
);
const orders: Array<Order.Order<T>> = [
...(options?.groupFavorites === true
...(shouldGroupFavorites
? [
byTrueFirst<T>((item) =>
favoriteModelKeys.has(providerModelKey(item.instanceId, item.slug)),
+8 -2
View File
@@ -105,9 +105,15 @@ function applyInstanceModelPreferences(
readonly modelOrder: ReadonlyArray<string>;
},
): AppModelOption[] {
const hiddenModels = new Set(preferences.hiddenModels);
if (preferences.hiddenModels.length === 0 && preferences.modelOrder.length === 0) {
return [...options];
}
const hiddenModels =
preferences.hiddenModels.length > 0 ? new Set(preferences.hiddenModels) : null;
return sortModelsForProviderInstance(
options.filter((option) => option.isCustom || !hiddenModels.has(option.slug)),
hiddenModels
? options.filter((option) => option.isCustom || !hiddenModels.has(option.slug))
: options,
{ modelOrder: preferences.modelOrder },
);
}
+44
View File
@@ -40,6 +40,25 @@ const multiSelectQuestion = {
multiSelect: true,
} as const;
const textQuestion = {
id: "token",
header: "Token",
question: "Enter token",
inputKind: "text",
options: [],
multiSelect: false,
} as const;
const textareaQuestion = {
id: "notes",
header: "Notes",
question: "Edit notes",
inputKind: "textarea",
options: [],
prefill: "Existing notes",
multiSelect: false,
} as const;
describe("resolvePendingUserInputAnswer", () => {
it("prefers a custom answer over selected options", () => {
expect(
@@ -66,6 +85,19 @@ describe("resolvePendingUserInputAnswer", () => {
).toEqual(["Server", "Web"]);
});
it("uses text answers for text and textarea prompts without options", () => {
expect(
resolvePendingUserInputAnswer(textQuestion, {
textAnswer: "secret-token",
}),
).toBe("secret-token");
expect(
resolvePendingUserInputAnswer(textareaQuestion, {
textAnswer: "updated notes",
}),
).toBe("updated notes");
});
it("clears the preset selection when a custom answer is entered", () => {
expect(
setPendingUserInputCustomAnswer(
@@ -150,6 +182,18 @@ describe("buildPendingUserInputAnswers", () => {
});
});
it("returns text answers for text prompts", () => {
expect(
buildPendingUserInputAnswers([textQuestion, textareaQuestion], {
token: { textAnswer: "secret-token" },
notes: { textAnswer: "updated notes" },
}),
).toEqual({
token: "secret-token",
notes: "updated notes",
});
});
it("returns null when any question is unanswered", () => {
expect(buildPendingUserInputAnswers([singleSelectQuestion], {})).toBeNull();
});
+19
View File
@@ -3,6 +3,7 @@ import type { UserInputQuestion } from "@t3tools/contracts";
export interface PendingUserInputDraftAnswer {
selectedOptionLabels?: string[];
customAnswer?: string;
textAnswer?: string;
}
export interface PendingUserInputProgress {
@@ -11,6 +12,7 @@ export interface PendingUserInputProgress {
activeDraft: PendingUserInputDraftAnswer | undefined;
selectedOptionLabels: string[];
customAnswer: string;
textAnswer: string;
resolvedAnswer: string | string[] | null;
usingCustomAnswer: boolean;
answeredQuestionCount: number;
@@ -46,6 +48,10 @@ export function resolvePendingUserInputAnswer(
draft: PendingUserInputDraftAnswer | undefined,
): string | string[] | null {
const customAnswer = normalizeDraftAnswer(draft?.customAnswer);
if (question.inputKind === "text" || question.inputKind === "textarea") {
return normalizeDraftAnswer(draft?.textAnswer ?? draft?.customAnswer);
}
if (customAnswer) {
return customAnswer;
}
@@ -58,6 +64,17 @@ export function resolvePendingUserInputAnswer(
return selectedOptionLabels[0] ?? null;
}
export function setPendingUserInputTextAnswer(
draft: PendingUserInputDraftAnswer | undefined,
textAnswer: string,
): PendingUserInputDraftAnswer {
return {
...draft,
customAnswer: "",
textAnswer,
};
}
export function setPendingUserInputCustomAnswer(
draft: PendingUserInputDraftAnswer | undefined,
customAnswer: string,
@@ -148,6 +165,7 @@ export function derivePendingUserInputProgress(
? resolvePendingUserInputAnswer(activeQuestion, activeDraft)
: null;
const customAnswer = activeDraft?.customAnswer ?? "";
const textAnswer = activeDraft?.textAnswer ?? activeQuestion?.prefill ?? "";
const answeredQuestionCount = countAnsweredPendingUserInputQuestions(questions, draftAnswers);
const isLastQuestion =
questions.length === 0 ? true : normalizedQuestionIndex >= questions.length - 1;
@@ -158,6 +176,7 @@ export function derivePendingUserInputProgress(
activeDraft,
selectedOptionLabels: normalizeSelectedOptionLabels(activeDraft?.selectedOptionLabels),
customAnswer,
textAnswer,
resolvedAnswer,
usingCustomAnswer: customAnswer.trim().length > 0,
answeredQuestionCount,
+10 -6
View File
@@ -29,7 +29,7 @@ import {
} from "../components/ui/toast";
import { resolveAndPersistPreferredEditor } from "../editorPreferences";
import { readLocalApi } from "../localApi";
import { useSettings } from "../hooks/useSettings";
import { useProjectGroupingSettings } from "../hooks/useSettings";
import {
deriveLogicalProjectKeyFromSettings,
derivePhysicalProjectKeyFromPath,
@@ -44,7 +44,7 @@ import {
} from "../rpc/serverState";
import { useStore } from "../store";
import { useUiStateStore } from "../uiStateStore";
import { syncBrowserChromeTheme } from "../hooks/useTheme";
import { startThemeRuntime, syncBrowserChromeTheme } from "../hooks/useTheme";
import {
ensureEnvironmentConnectionBootstrapped,
getPrimaryEnvironmentConnection,
@@ -133,6 +133,7 @@ function RootRouteView() {
<AnchoredToastProvider>
{primaryEnvironmentAuthenticated ? <AuthenticatedTracingBootstrap /> : null}
{primaryEnvironmentAuthenticated ? <ServerStateBootstrap /> : null}
<ThemeRuntimeBootstrap />
<EnvironmentConnectionManagerBootstrap />
<SshPasswordPromptDialog />
<HostedStaticEnvironmentBootstrap />
@@ -259,6 +260,12 @@ function ServerStateBootstrap() {
return null;
}
function ThemeRuntimeBootstrap() {
useEffect(() => startThemeRuntime(), []);
return null;
}
function AuthenticatedTracingBootstrap() {
useEffect(() => {
void configureClientTracing();
@@ -281,10 +288,7 @@ function EventRouter() {
const setActiveEnvironmentId = useStore((store) => store.setActiveEnvironmentId);
const navigate = useNavigate();
const pathname = useLocation({ select: (loc) => loc.pathname });
const projectGroupingSettings = useSettings((settings) => ({
sidebarProjectGroupingMode: settings.sidebarProjectGroupingMode,
sidebarProjectGroupingOverrides: settings.sidebarProjectGroupingOverrides,
}));
const projectGroupingSettings = useProjectGroupingSettings();
const readPathname = useEffectEvent(() => pathname);
const handledBootstrapThreadIdRef = useRef<string | null>(null);
const seenServerConfigUpdateIdRef = useRef(getServerConfigUpdatedNotification()?.id ?? 0);
+40
View File
@@ -249,6 +249,7 @@ describe("derivePendingUserInputs", () => {
id: "sandbox_mode",
header: "Sandbox",
question: "Which mode should be used?",
inputKind: "select",
options: [
{
label: "workspace-write",
@@ -620,6 +621,45 @@ describe("deriveWorkLogEntries", () => {
expect(entries.map((entry) => entry.id)).toEqual(["task-progress", "task-complete"]);
});
it("omits Pi panel state and diagnostics from the normal work log", () => {
const activities: OrchestrationThreadActivity[] = [
makeActivity({
id: "pi-status",
createdAt: "2026-02-23T00:00:01.000Z",
kind: "pi.ui.state.updated",
summary: "Pi status updated",
tone: "info",
payload: {
source: "pi.extension.ui",
surface: "status",
key: "tps",
text: "42 tok/s",
},
}),
makeActivity({
id: "pi-diagnostic",
createdAt: "2026-02-23T00:00:02.000Z",
kind: "pi.extension.diagnostic",
summary: "message_update failed",
tone: "error",
payload: {
source: "pi.extension",
message: "message_update failed",
severity: "error",
},
}),
makeActivity({
id: "tool-complete",
createdAt: "2026-02-23T00:00:03.000Z",
summary: "Tool call complete",
kind: "tool.completed",
}),
];
const entries = deriveWorkLogEntries(activities, undefined);
expect(entries.map((entry) => entry.id)).toEqual(["tool-complete"]);
});
it("uses payload summary as label for task entries when available", () => {
const activities: OrchestrationThreadActivity[] = [
makeActivity({
+49 -7
View File
@@ -22,6 +22,8 @@ import type {
TurnDiffSummary,
} from "./types";
type UserInputQuestionOption = NonNullable<UserInputQuestion["options"]>[number];
export type ProviderPickerKind = ProviderDriverKind;
export const PROVIDER_OPTIONS: Array<{
@@ -45,6 +47,12 @@ export const PROVIDER_OPTIONS: Array<{
available: true,
pickerSidebarBadge: "new",
},
{
value: ProviderDriverKind.make("pi"),
label: "Pi",
available: true,
pickerSidebarBadge: "new",
},
];
export interface WorkLogEntry {
@@ -272,16 +280,22 @@ function parseUserInputQuestions(
.map<UserInputQuestion | null>((entry) => {
if (!entry || typeof entry !== "object") return null;
const question = entry as Record<string, unknown>;
const inputKind =
question.inputKind === "confirm" ||
question.inputKind === "text" ||
question.inputKind === "textarea"
? question.inputKind
: "select";
if (
typeof question.id !== "string" ||
typeof question.header !== "string" ||
typeof question.question !== "string" ||
!Array.isArray(question.options)
typeof question.question !== "string"
) {
return null;
}
const options = question.options
.map<UserInputQuestion["options"][number] | null>((option) => {
const rawOptions = Array.isArray(question.options) ? question.options : [];
const options = rawOptions
.map<UserInputQuestionOption | null>((option) => {
if (!option || typeof option !== "object") return null;
const optionRecord = option as Record<string, unknown>;
if (
@@ -295,17 +309,25 @@ function parseUserInputQuestions(
description: optionRecord.description,
};
})
.filter((option): option is UserInputQuestion["options"][number] => option !== null);
if (options.length === 0) {
.filter((option): option is UserInputQuestionOption => option !== null);
if ((inputKind === "select" || inputKind === "confirm") && options.length === 0) {
return null;
}
return {
const parsedQuestion: UserInputQuestion = {
id: question.id,
header: question.header,
question: question.question,
inputKind,
options,
multiSelect: question.multiSelect === true,
};
if (typeof question.placeholder === "string") {
Object.assign(parsedQuestion, { placeholder: question.placeholder });
}
if (typeof question.prefill === "string") {
Object.assign(parsedQuestion, { prefill: question.prefill });
}
return parsedQuestion;
})
.filter((question): question is UserInputQuestion => question !== null);
return parsed.length > 0 ? parsed : null;
@@ -490,6 +512,7 @@ export function deriveWorkLogEntries(
.filter((activity) => activity.kind !== "tool.started")
.filter((activity) => activity.kind !== "task.started")
.filter((activity) => activity.kind !== "context-window.updated")
.filter((activity) => !isPiPanelOnlyActivity(activity))
.filter((activity) => activity.summary !== "Checkpoint captured")
.filter((activity) => !isPlanBoundaryToolActivity(activity))
.map(toDerivedWorkLogEntry);
@@ -498,6 +521,25 @@ export function deriveWorkLogEntries(
);
}
function isPiPanelOnlyActivity(activity: OrchestrationThreadActivity): boolean {
if (
activity.kind === "pi.ui.state.updated" ||
activity.kind === "pi.extension.configured" ||
activity.kind === "pi.extension.diagnostic"
) {
return true;
}
if (activity.kind !== "extension.activity") {
return false;
}
const payload =
activity.payload && typeof activity.payload === "object"
? (activity.payload as Record<string, unknown>)
: null;
const visibility = payload?.visibility;
return visibility === "pi-panel" || visibility === "debug" || visibility === "hidden";
}
function isPlanBoundaryToolActivity(activity: OrchestrationThreadActivity): boolean {
if (activity.kind !== "tool.updated" && activity.kind !== "tool.completed") {
return false;
+466 -10
View File
@@ -16,12 +16,13 @@
},
"apps/desktop": {
"name": "@t3tools/desktop",
"version": "0.0.21",
"version": "0.0.22",
"dependencies": {
"@effect/platform-node": "catalog:",
"effect": "catalog:",
"electron": "40.9.3",
"electron-updater": "^6.6.2",
"jsonc-parser": "^3.3.1",
},
"devDependencies": {
"@t3tools/client-runtime": "workspace:*",
@@ -49,7 +50,7 @@
},
"apps/server": {
"name": "t3",
"version": "0.0.21",
"version": "0.0.22",
"bin": {
"t3": "./dist/bin.mjs",
},
@@ -58,6 +59,7 @@
"@effect/platform-bun": "catalog:",
"@effect/platform-node": "catalog:",
"@effect/sql-sqlite-bun": "catalog:",
"@mariozechner/pi-coding-agent": "^0.73.0",
"@opencode-ai/sdk": "^1.3.15",
"@pierre/diffs": "catalog:",
"effect": "catalog:",
@@ -82,7 +84,7 @@
},
"apps/web": {
"name": "@t3tools/web",
"version": "0.0.21",
"version": "0.0.22",
"dependencies": {
"@base-ui/react": "^1.2.0",
"@dnd-kit/core": "^6.3.1",
@@ -148,7 +150,7 @@
},
"packages/contracts": {
"name": "@t3tools/contracts",
"version": "0.0.21",
"version": "0.0.22",
"dependencies": {
"effect": "catalog:",
},
@@ -310,6 +312,78 @@
"@astrojs/yaml2ts": ["@astrojs/[email protected]", "", { "dependencies": { "yaml": "^2.8.2" } }, "sha512-PJzRmgQzUxI2uwpdX2lXSHtP4G8ocp24/t+bZyf5Fy0SZLSF9f9KXZoMlFM/XCGue+B0nH/2IZ7FpBYQATBsCg=="],
"@aws-crypto/crc32": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="],
"@aws-crypto/sha256-browser": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw=="],
"@aws-crypto/sha256-js": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA=="],
"@aws-crypto/supports-web-crypto": ["@aws-crypto/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg=="],
"@aws-crypto/util": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ=="],
"@aws-sdk/client-bedrock-runtime": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.974.8", "@aws-sdk/credential-provider-node": "^3.972.39", "@aws-sdk/eventstream-handler-node": "^3.972.14", "@aws-sdk/middleware-eventstream": "^3.972.10", "@aws-sdk/middleware-host-header": "^3.972.10", "@aws-sdk/middleware-logger": "^3.972.10", "@aws-sdk/middleware-recursion-detection": "^3.972.11", "@aws-sdk/middleware-user-agent": "^3.972.38", "@aws-sdk/middleware-websocket": "^3.972.16", "@aws-sdk/region-config-resolver": "^3.972.13", "@aws-sdk/token-providers": "3.1043.0", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-endpoints": "^3.996.8", "@aws-sdk/util-user-agent-browser": "^3.972.10", "@aws-sdk/util-user-agent-node": "^3.973.24", "@smithy/config-resolver": "^4.4.17", "@smithy/core": "^3.23.17", "@smithy/eventstream-serde-browser": "^4.2.14", "@smithy/eventstream-serde-config-resolver": "^4.3.14", "@smithy/eventstream-serde-node": "^4.2.14", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/hash-node": "^4.2.14", "@smithy/invalid-dependency": "^4.2.14", "@smithy/middleware-content-length": "^4.2.14", "@smithy/middleware-endpoint": "^4.4.32", "@smithy/middleware-retry": "^4.5.7", "@smithy/middleware-serde": "^4.2.20", "@smithy/middleware-stack": "^4.2.14", "@smithy/node-config-provider": "^4.3.14", "@smithy/node-http-handler": "^4.6.1", "@smithy/protocol-http": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-body-length-node": "^4.2.3", "@smithy/util-defaults-mode-browser": "^4.3.49", "@smithy/util-defaults-mode-node": "^4.2.54", "@smithy/util-endpoints": "^3.4.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/util-stream": "^4.5.25", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-J22pIYr7ZND7F9oYvqALUeHBsA2ND8fHm7ZIu2SBkoYXuvTMdRIfbHwyas3cZkYp+W/zGaLC/5mAHcmQQuaSOw=="],
"@aws-sdk/core": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@aws-sdk/xml-builder": "^3.972.22", "@smithy/core": "^3.23.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/property-provider": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-njR2qoG6ZuB0kvAS2FyICsFZJ6gmCcf2X/7JcD14sUvGDm26wiZ5BrA6LOiUxKFEF+IVe7kdroxyE00YlkiYsw=="],
"@aws-sdk/credential-provider-env": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-XT0jtf8Fw9JE6ppsQeoNnZRiG+jqRixMT1v1ZR17G60UvVdsQmTG8nbEyHuEPfMxDXEhfdARaM/XiEhca4lGHQ=="],
"@aws-sdk/credential-provider-http": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/node-http-handler": "^4.6.1", "@smithy/property-provider": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-stream": "^4.5.25", "tslib": "^2.6.2" } }, "sha512-DPoGWfy7J7RKxvbf5kOKIGQkD2ek3dbKgzKIGrnLuvZBz5myU+Im/H6pmc14QcnFbqHMqxvtWSgRDSJW3qXLQg=="],
"@aws-sdk/credential-provider-ini": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/credential-provider-env": "^3.972.34", "@aws-sdk/credential-provider-http": "^3.972.36", "@aws-sdk/credential-provider-login": "^3.972.38", "@aws-sdk/credential-provider-process": "^3.972.34", "@aws-sdk/credential-provider-sso": "^3.972.38", "@aws-sdk/credential-provider-web-identity": "^3.972.38", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/credential-provider-imds": "^4.2.14", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-oDzUBu2MGJFgoar05sPMCwSrhw44ASyccrHzj66vO69OZqi7I6hZZxXfuPLC8OCzW7C+sU+bI73XHij41yekgQ=="],
"@aws-sdk/credential-provider-login": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-g1NosS8qe4OF++G2UFCM5ovSkgipC7YYor5KCWatG0UoMSO5YFj9C8muePlyVmOBV/WTI16Jo3/s1NUo/o1Bww=="],
"@aws-sdk/credential-provider-node": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.34", "@aws-sdk/credential-provider-http": "^3.972.36", "@aws-sdk/credential-provider-ini": "^3.972.38", "@aws-sdk/credential-provider-process": "^3.972.34", "@aws-sdk/credential-provider-sso": "^3.972.38", "@aws-sdk/credential-provider-web-identity": "^3.972.38", "@aws-sdk/types": "^3.973.8", "@smithy/credential-provider-imds": "^4.2.14", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-HEswDQyxUtadoZ/bJsPPENHg7R0Lzym5LuMksJeHvqhCOpP+rtkDLKI4/ZChH4w3cf5kG8n6bZuI8PzajoiqMg=="],
"@aws-sdk/credential-provider-process": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-T3IFs4EVmVi1dVN5RciFnklCANSzvrQd/VuHY9ThHSQmYkTogjcGkoJEr+oNUPQZnso52183088NqysMPji1/Q=="],
"@aws-sdk/credential-provider-sso": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/token-providers": "3.1041.0", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-5ZxG+t0+3Q3QPh8KEjX6syskhgNf7I0MN7oGioTf6Lm1NTjfP7sIcYGNsthXC2qR8vcD3edNZwCr2ovfSSWuRA=="],
"@aws-sdk/credential-provider-web-identity": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-lYHFF30DGI20jZcYX8cm6Ns0V7f1dDN6g/MBDLTyD/5iw+bXs3yBr2iAiHDkx4RFU5JgsnZvCHYKiRVPRdmOgw=="],
"@aws-sdk/eventstream-handler-node": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/eventstream-codec": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-m4X56gxG76/CKfxNVbOFuYwnAZcHgS6HOH8lgp15HoGHIAVTcZfZrXvcYzJFOMLEJgVn+JHBu6EiNV+xSNXXFg=="],
"@aws-sdk/middleware-eventstream": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-QUqLs7Af1II9X4fCRAu+EGHG3KHyOp4RkuLhRKoA3NuFlh6TL8i+zXBl8w2LUxqm44B/Kom45hgSlwA1SpTsXQ=="],
"@aws-sdk/middleware-host-header": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-IJSsIMeVQ8MMCPbuh1AbltkFhLBLXn7aejzfX5YKT/VLDHn++Dcz8886tXckE+wQssyPUhaXrJhdakO2VilRhg=="],
"@aws-sdk/middleware-logger": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-OOuGvvz1Dm20SjZo5oEBePFqxt5nf8AwkNDSyUHvD9/bfNASmstcYxFAHUowy4n6Io7mWUZ04JURZwSBvyQanQ=="],
"@aws-sdk/middleware-recursion-detection": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@aws/lambda-invoke-store": "^0.2.2", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-+zz6f79Kj9V5qFK2P+D8Ehjnw4AhphAlCAsPjUqEcInA9umtSSKMrHbSagEeOIsDNuvVrH98bjRHcyQukTrhaQ=="],
"@aws-sdk/middleware-sdk-s3": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-arn-parser": "^3.972.3", "@smithy/core": "^3.23.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-config-provider": "^4.2.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-stream": "^4.5.25", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-Km7M+i8DrLArVzrid1gfxeGhYHBd3uxvE77g0s5a52zPSVosxzQBnJ0gwWb6NIp/DOk8gsBMhi7V+cpJG0ndTA=="],
"@aws-sdk/middleware-user-agent": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-endpoints": "^3.996.8", "@smithy/core": "^3.23.17", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-retry": "^4.3.6", "tslib": "^2.6.2" } }, "sha512-iz+B29TXcAZsJpwB+AwG/TTGA5l/VnmMZ2UxtiySOZjI6gCdmviXPwdgzcmuazMy16rXoPY4mYCGe7zdNKfx5A=="],
"@aws-sdk/middleware-websocket": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-format-url": "^3.972.10", "@smithy/eventstream-codec": "^4.2.14", "@smithy/eventstream-serde-browser": "^4.2.14", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-86+S9oCyRVGzoMRpQhxkArp7kD2K75GPmaNevd9B6EyNhWoNvnCZZ3WbgN4j7ZT+jvtvBCGZvI2XHsWZJ+BRIg=="],
"@aws-sdk/nested-clients": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.974.8", "@aws-sdk/middleware-host-header": "^3.972.10", "@aws-sdk/middleware-logger": "^3.972.10", "@aws-sdk/middleware-recursion-detection": "^3.972.11", "@aws-sdk/middleware-user-agent": "^3.972.38", "@aws-sdk/region-config-resolver": "^3.972.13", "@aws-sdk/signature-v4-multi-region": "^3.996.25", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-endpoints": "^3.996.8", "@aws-sdk/util-user-agent-browser": "^3.972.10", "@aws-sdk/util-user-agent-node": "^3.973.24", "@smithy/config-resolver": "^4.4.17", "@smithy/core": "^3.23.17", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/hash-node": "^4.2.14", "@smithy/invalid-dependency": "^4.2.14", "@smithy/middleware-content-length": "^4.2.14", "@smithy/middleware-endpoint": "^4.4.32", "@smithy/middleware-retry": "^4.5.7", "@smithy/middleware-serde": "^4.2.20", "@smithy/middleware-stack": "^4.2.14", "@smithy/node-config-provider": "^4.3.14", "@smithy/node-http-handler": "^4.6.1", "@smithy/protocol-http": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-body-length-node": "^4.2.3", "@smithy/util-defaults-mode-browser": "^4.3.49", "@smithy/util-defaults-mode-node": "^4.2.54", "@smithy/util-endpoints": "^3.4.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-WBDnqatJl+kGObpfmfSxqnXeYTu3Me8wx8WCtvoxX3pfWrrTv8I4WTMSSs7PZqcRcVh8WeUKMgGFjMG+52SR1w=="],
"@aws-sdk/region-config-resolver": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/config-resolver": "^4.4.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-CvJ2ZIjK/jVD/lbOpowBVElJyC1YxLTIJ13yM0AEo0t2v7swOzGjSA6lJGH+DwZXQhcjUjoYwc8bVYCX5MDr1A=="],
"@aws-sdk/signature-v4-multi-region": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/middleware-sdk-s3": "^3.972.37", "@aws-sdk/types": "^3.973.8", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-+CMIt3e1VzlklAECmG+DtP1sV8iKq25FuA0OKpnJ4KA0kxUtd7CgClY7/RU6VzJBQwbN4EJ9Ue6plvqx1qGadw=="],
"@aws-sdk/token-providers": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-Rlh9piVFV4WOMGgcHY0+O4TMDOSJGYxh7dvxWIhmhf6ASvRPMA2HZb6DSCan8nl5IFXjCYxYXWjpb5+Ii77MjQ=="],
"@aws-sdk/types": ["@aws-sdk/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-gjlAdtHMbtR9X5iIhVUvbVcy55KnznpC6bkDUWW9z915bi0ckdUr5cjf16Kp6xq0bP5HBD2xzgbL9F9Quv5vUw=="],
"@aws-sdk/util-arn-parser": ["@aws-sdk/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA=="],
"@aws-sdk/util-endpoints": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-endpoints": "^3.4.2", "tslib": "^2.6.2" } }, "sha512-oOZHcRDihk5iEe5V25NVWg45b3qEA8OpHWVdU/XQh8Zj4heVPAJqWvMphQnU7LkufmUo10EpvFPZuQMiFLJK3g=="],
"@aws-sdk/util-format-url": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/querystring-builder": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-DEKiHNJVtNxdyTeQspzY+15Po/kHm6sF0Cs4HV9Q2+lplB63+DrvdeiSoOSdWEWAoO2RcY1veoXVDz2tWxWCgQ=="],
"@aws-sdk/util-locate-window": ["@aws-sdk/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-WhlJNNINQB+9qtLtZJcpQdgZw3SCDCpXdUJP7cToGwHbCWCnRckGlc6Bx/OhWwIYFNAn+FIydY8SZ0QmVu3xTQ=="],
"@aws-sdk/util-user-agent-browser": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/types": "^4.14.1", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-FAzqXvfEssGdSIz8ejatan0bOdx1qefBWKF/gWmVBXIP1HkS7v/wjjaqrAGGKvyihrXTXW00/2/1nTJtxpXz7g=="],
"@aws-sdk/util-user-agent-node": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/middleware-user-agent": "^3.972.38", "@aws-sdk/types": "^3.973.8", "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "@smithy/util-config-provider": "^4.2.2", "tslib": "^2.6.2" }, "peerDependencies": { "aws-crt": ">=1.0.0" }, "optionalPeers": ["aws-crt"] }, "sha512-ZWwlkjcIp7cEL8ZfTpTAPNkwx25p7xol0xlKoWVVf22+nsjwmLcHYtTPjIV1cSpmB/b6DaK4cb1fSkvCXHgRdw=="],
"@aws-sdk/xml-builder": ["@aws-sdk/[email protected]", "", { "dependencies": { "@nodable/entities": "2.1.0", "@smithy/types": "^4.14.1", "fast-xml-parser": "5.7.2", "tslib": "^2.6.2" } }, "sha512-PMYKKtJd70IsSG0yHrdAbxBr+ZWBKLvzFZfD3/urxgf6hXVMzuU5M+3MJ5G67RpOmLBu1fAUN65SbWuKUCOlAA=="],
"@aws/lambda-invoke-store": ["@aws/[email protected]", "", {}, "sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ=="],
"@babel/code-frame": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="],
"@babel/compat-data": ["@babel/[email protected]", "", {}, "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg=="],
@@ -356,6 +430,8 @@
"@blazediff/core": ["@blazediff/[email protected]", "", {}, "sha512-ehg3jIkYKulZh+8om/O25vkvSsXXwC+skXmyA87FFx6A/45eqOkZsBltMw/TVteb0mloiGT8oGRTcjRAz66zaA=="],
"@borewit/text-codec": ["@borewit/[email protected]", "", {}, "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ=="],
"@capsizecss/unpack": ["@capsizecss/[email protected]", "", { "dependencies": { "fontkitten": "^1.0.0" } }, "sha512-VERIM64vtTP1C4mxQ5thVT9fK0apjPFobqybMtA1UdUujWka24ERHbRHFGmpbbhp73MhV+KSsHQH9C6uOTdEQA=="],
"@clack/core": ["@clack/[email protected]", "", { "dependencies": { "sisteransi": "^1.0.5" } }, "sha512-SVcm4Dqm2ukn64/8Gub2wnlA5nS2iWJyCkdNHcvNHPIeBTGojpdJ+9cZKwLfmqy7irD4N5qLteSilJlE0WLAtA=="],
@@ -474,6 +550,8 @@
"@formkit/auto-animate": ["@formkit/[email protected]", "", {}, "sha512-VhP4zEAacXS3dfTpJpJ88QdLqMTcabMg0jwpOSxZ/VzfQVfl3GkZSCZThhGC5uhq/TxPHPzW0dzr4H9Bb1OgKA=="],
"@google/genai": ["@google/[email protected]", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-gwSvbpiN/17O9TbsqSsE/OzZcpv5Fo4RQjdngGgogtuB9RsyJ8ZHhX5KjHj1bp5N9snN2eK8LDGXSaWW2hof8Q=="],
"@hono/node-server": ["@hono/[email protected]", "", { "peerDependencies": { "hono": "^4" } }, "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw=="],
"@img/colour": ["@img/[email protected]", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="],
@@ -594,6 +672,40 @@
"@lexical/yjs": ["@lexical/[email protected]", "", { "dependencies": { "@lexical/offset": "0.41.0", "@lexical/selection": "0.41.0", "lexical": "0.41.0" }, "peerDependencies": { "yjs": ">=13.5.22" } }, "sha512-PaKTxSbVC4fpqUjQ7vUL9RkNF1PjL8TFl5jRe03PqoPYpE33buf3VXX6+cOUEfv9+uknSqLCPHoBS/4jN3a97w=="],
"@mariozechner/clipboard": ["@mariozechner/[email protected]", "", { "optionalDependencies": { "@mariozechner/clipboard-darwin-arm64": "0.3.2", "@mariozechner/clipboard-darwin-universal": "0.3.2", "@mariozechner/clipboard-darwin-x64": "0.3.2", "@mariozechner/clipboard-linux-arm64-gnu": "0.3.2", "@mariozechner/clipboard-linux-arm64-musl": "0.3.2", "@mariozechner/clipboard-linux-riscv64-gnu": "0.3.2", "@mariozechner/clipboard-linux-x64-gnu": "0.3.2", "@mariozechner/clipboard-linux-x64-musl": "0.3.2", "@mariozechner/clipboard-win32-arm64-msvc": "0.3.2", "@mariozechner/clipboard-win32-x64-msvc": "0.3.2" } }, "sha512-D3F+UrU9CR7roJt0zDLp6Oc+4/KlLDIrN4frH+6V90SJNW2KKUec1oCQIPaaDjCqeOsQyX9dyqYbImIQIM45PA=="],
"@mariozechner/clipboard-darwin-arm64": ["@mariozechner/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uBf6K7Je1ihsgvmWxA8UCGCeI+nbRVRXoarZdLjl6slz94Zs1tNKFZqx7aCI5O1i3e0B6ja82zZ06BWrl0MCVw=="],
"@mariozechner/clipboard-darwin-universal": ["@mariozechner/[email protected]", "", { "os": "darwin" }, "sha512-mxSheKTW2U9LsBdXy0SdmdCAE5HqNS9QUmpNHLnfJ+SsbFKALjEZc5oRrVMXxGQSirDvYf5bjmRyT0QYYonnlg=="],
"@mariozechner/clipboard-darwin-x64": ["@mariozechner/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-U1BcVEoidvwIp95+HJswSW+xr28EQiHR7rZjH6pn8Sja5yO4Yoe3yCN0Zm8Lo72BbSOK/fTSq0je7CJpaPCspg=="],
"@mariozechner/clipboard-linux-arm64-gnu": ["@mariozechner/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-BsinwG3yWTIjdgNCxsFlip7LkfwPk+ruw/aFCXHUg/fb5XC/Ksp+YMQ7u0LUtiKzIv/7LMXgZInJQH6gxbAaqQ=="],
"@mariozechner/clipboard-linux-arm64-musl": ["@mariozechner/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-0/Gi5Xq2V6goXBop19ePoHvXsmJD9SzFlO3S+d6+T2b+BlPcpOu3Oa0wTjl+cZrLAAEzA86aPNBI+VVAFDFPKw=="],
"@mariozechner/clipboard-linux-riscv64-gnu": ["@mariozechner/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-2AFFiXB24qf0zOZsxI1GJGb9wQGlOJyN6UwoXqmKS3dpQi/l6ix30IzDDA4c4ZcCcx4D+9HLYXhC1w7Sov8pXA=="],
"@mariozechner/clipboard-linux-x64-gnu": ["@mariozechner/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-v6fVnsn7WMGg73Dab8QMwyFce7tzGfgEixKgzLP8f1GJqkJZi5zO4k4FOHzSgUufgLil63gnxvMpjWkgfeQN7A=="],
"@mariozechner/clipboard-linux-x64-musl": ["@mariozechner/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-xVUtnoMQ8v2JVyfJLKKXACA6avdnchdbBkTsZs8BgJQo29qwCp5NIHAUO8gbJ40iaEGToW5RlmVk2M9V0HsHEw=="],
"@mariozechner/clipboard-win32-arm64-msvc": ["@mariozechner/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-AEgg95TNi8TGgak2wSXZkXKCvAUTjWoU1Pqb0ON7JHrX78p616XUFNTJohtIon3e0w6k0pYPZeCuqRCza/Tqeg=="],
"@mariozechner/clipboard-win32-x64-msvc": ["@mariozechner/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-tGRuYpZwDOD7HBrCpyRuhGnHHSCknELvqwKKUG4JSfSB7JIU7LKRh6zx6fMUOQd8uISK35TjFg5UcNih+vJhFA=="],
"@mariozechner/jiti": ["@mariozechner/[email protected]", "", { "dependencies": { "std-env": "^3.10.0", "yoctocolors": "^2.1.2" }, "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-faGUlTcXka5l7rv0lP3K3vGW/ejRuOS24RR2aSFWREUQqzjgdsuWNo/IiPqL3kWRGt6Ahl2+qcDAwtdeWeuGUw=="],
"@mariozechner/pi-agent-core": ["@mariozechner/[email protected]", "", { "dependencies": { "@mariozechner/pi-ai": "^0.73.0", "typebox": "^1.1.24" } }, "sha512-ugcpvq0X9fr9fTSK29/3S4+KU/eeVMrBb7ZU3HqiF3xD7I1GlgumLj4FYmDrYSEA6+rzgNWlJUKwjKh9o0Z6AA=="],
"@mariozechner/pi-ai": ["@mariozechner/[email protected]", "", { "dependencies": { "@anthropic-ai/sdk": "^0.91.1", "@aws-sdk/client-bedrock-runtime": "^3.1030.0", "@google/genai": "^1.40.0", "@mistralai/mistralai": "^2.2.0", "chalk": "^5.6.2", "openai": "6.26.0", "partial-json": "^0.1.7", "proxy-agent": "^6.5.0", "typebox": "^1.1.24", "undici": "^7.19.1", "zod-to-json-schema": "^3.24.6" }, "bin": { "pi-ai": "dist/cli.js" } }, "sha512-phKOpcde/ssz6UYszkmaGJ9LF9mgt/AP8LrtSwsfap+kMSeFfSQ2/mCSBT1mLJ2BqVuff9uXs1/+op1aQeaafQ=="],
"@mariozechner/pi-coding-agent": ["@mariozechner/[email protected]", "", { "dependencies": { "@mariozechner/jiti": "^2.6.2", "@mariozechner/pi-agent-core": "^0.73.0", "@mariozechner/pi-ai": "^0.73.0", "@mariozechner/pi-tui": "^0.73.0", "@silvia-odwyer/photon-node": "^0.3.4", "chalk": "^5.5.0", "cli-highlight": "^2.1.11", "diff": "^8.0.2", "extract-zip": "^2.0.1", "file-type": "^21.1.1", "glob": "^13.0.1", "hosted-git-info": "^9.0.2", "ignore": "^7.0.5", "marked": "^15.0.12", "minimatch": "^10.2.3", "proper-lockfile": "^4.1.2", "strip-ansi": "^7.1.0", "typebox": "^1.1.24", "undici": "^7.19.1", "uuid": "^14.0.0", "yaml": "^2.8.2" }, "optionalDependencies": { "@mariozechner/clipboard": "^0.3.5" }, "bin": { "pi": "dist/cli.js" } }, "sha512-Fs2dRIgtjDT8X5VDGNGzxj251B0FvkRsgX03YJv1FK4wg5Maj+jkf8/5A6tbPnPcXsCgs41xxJRf3tF5vJRccA=="],
"@mariozechner/pi-tui": ["@mariozechner/[email protected]", "", { "dependencies": { "@types/mime-types": "^2.1.4", "chalk": "^5.5.0", "get-east-asian-width": "^1.3.0", "marked": "^15.0.12", "mime-types": "^3.0.1" }, "optionalDependencies": { "koffi": "^2.9.0" } }, "sha512-St1W+tMPKHatfK+lblsKfL+SsFyFVMK2tW6xHpBfCiMuevbOCRo/CMatso7mu1642UO04ncmfCrrpUK5L9aoog=="],
"@mistralai/mistralai": ["@mistralai/[email protected]", "", { "dependencies": { "ws": "^8.18.0", "zod": "^3.25.0 || ^4.0.0", "zod-to-json-schema": "^3.25.0" } }, "sha512-uKU8CZmL2RzYKmplsU01hii4p3pe4HqJefpWNRWXm1Tcm0Sm4xXfwSLIy4k7ZCPlbETCGcp69E7hZs+WOJ5itQ=="],
"@modelcontextprotocol/sdk": ["@modelcontextprotocol/[email protected]", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ=="],
"@msgpackr-extract/msgpackr-extract-darwin-arm64": ["@msgpackr-extract/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw=="],
@@ -612,6 +724,8 @@
"@napi-rs/wasm-runtime": ["@napi-rs/[email protected]", "", { "dependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1", "@tybys/wasm-util": "^0.10.1" } }, "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A=="],
"@nodable/entities": ["@nodable/[email protected]", "", {}, "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA=="],
"@open-draft/deferred-promise": ["@open-draft/[email protected]", "", {}, "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA=="],
"@open-draft/logger": ["@open-draft/[email protected]", "", { "dependencies": { "is-node-process": "^1.2.0", "outvariant": "^1.4.0" } }, "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ=="],
@@ -710,6 +824,26 @@
"@preact/signals-core": ["@preact/[email protected]", "", {}, "sha512-AowtCcCU/33lFlh1zRFf/u+12rfrhtNakj7UpaGEsmMwUKpKWMVvcktOGcwBBNiB4lWrZWc01LhiyyzVklJyaQ=="],
"@protobufjs/aspromise": ["@protobufjs/[email protected]", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],
"@protobufjs/base64": ["@protobufjs/[email protected]", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],
"@protobufjs/codegen": ["@protobufjs/[email protected]", "", {}, "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g=="],
"@protobufjs/eventemitter": ["@protobufjs/[email protected]", "", {}, "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="],
"@protobufjs/fetch": ["@protobufjs/[email protected]", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" } }, "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ=="],
"@protobufjs/float": ["@protobufjs/[email protected]", "", {}, "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="],
"@protobufjs/inquire": ["@protobufjs/[email protected]", "", {}, "sha512-mnzgDV26ueAvk7rsbt9L7bE0SuAoqyuys/sMMrmVcN5x9VsxpcG3rqAUSgDyLp0UZlmNfIbQ4fHfCtreVBk8Ew=="],
"@protobufjs/path": ["@protobufjs/[email protected]", "", {}, "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="],
"@protobufjs/pool": ["@protobufjs/[email protected]", "", {}, "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="],
"@protobufjs/utf8": ["@protobufjs/[email protected]", "", {}, "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg=="],
"@quansync/fs": ["@quansync/[email protected]", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="],
"@rolldown/binding-android-arm64": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-0T1k9FinuBZ/t7rZ8jN6OpUKPnUjNdYHoj/cESWrQ3ZraAJ4OMm6z7QjSfCxqj8mOp9kTKc1zHK3kGz5vMu+nQ=="],
@@ -766,8 +900,98 @@
"@shikijs/vscode-textmate": ["@shikijs/[email protected]", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="],
"@silvia-odwyer/photon-node": ["@silvia-odwyer/[email protected]", "", {}, "sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA=="],
"@sindresorhus/is": ["@sindresorhus/[email protected]", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="],
"@smithy/config-resolver": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "@smithy/util-config-provider": "^4.2.2", "@smithy/util-endpoints": "^3.4.2", "@smithy/util-middleware": "^4.2.14", "tslib": "^2.6.2" } }, "sha512-TzDZcAnhTyAHbXVxWZo7/tEcrIeFq20IBk8So3OLOetWpR8EwY/yEqBMBFaJMeyEiREDq4NfEl+qO3OAUD+vbQ=="],
"@smithy/core": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-stream": "^4.5.25", "@smithy/util-utf8": "^4.2.2", "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" } }, "sha512-x7BlLbUFL8NWCGjMF9C+1N5cVCxcPa7g6Tv9B4A2luWx3be3oU8hQ96wIwxe/s7OhIzvoJH73HAUSg5JXVlEtQ=="],
"@smithy/credential-provider-imds": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.14", "@smithy/property-provider": "^4.2.14", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "tslib": "^2.6.2" } }, "sha512-Au28zBN48ZAoXdooGUHemuVBrkE+Ie6RPmGNIAJsFqj33Vhb6xAgRifUydZ2aY+M+KaMAETAlKk5NC5h1G7wpg=="],
"@smithy/eventstream-codec": ["@smithy/[email protected]", "", { "dependencies": { "@aws-crypto/crc32": "5.2.0", "@smithy/types": "^4.14.1", "@smithy/util-hex-encoding": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-erZq0nOIpzfeZdCyzZjdJb4nVSKLUmSkaQUVkRGQTXs30gyUGeKnrYEg+Xe1W5gE3aReS7IgsvANwVPxSzY6Pw=="],
"@smithy/eventstream-serde-browser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/eventstream-serde-universal": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-8IelTCtTctWRbb+0Dcy+C0aICh1qa0qWXqgjcXDmMuCvPJRnv26hiDZoAau2ILOniki65mCPKqOQs/BaWvO4CQ=="],
"@smithy/eventstream-serde-config-resolver": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-sqHiHpYRYo3FJlaIxD1J8PhbcmJAm7IuM16mVnwSkCToD7g00IBZzKuiLNMGmftULmEUX6/UAz8/NN5uMP8bVA=="],
"@smithy/eventstream-serde-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/eventstream-serde-universal": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-Ht/8BuGlKfFTy0H3+8eEu0vdpwGztCnaLLXtpXNdQqiR7Hj4vFScU3T436vRAjATglOIPjJXronY+1WxxNLSiw=="],
"@smithy/eventstream-serde-universal": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/eventstream-codec": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-lWyt4T2XQZUZgK3tQ3Wn0w3XBvZsK/vjTuJl6bXbnGZBHH0ZUSONTYiK9TgjTTzU54xQr3DRFwpjmhp0oLm3gg=="],
"@smithy/fetch-http-handler": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/querystring-builder": "^4.2.14", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "tslib": "^2.6.2" } }, "sha512-bXOvQzaSm6MnmLaWA1elgfQcAtN4UP3vXqV97bHuoOrHQOJiLT3ds6o9eo5bqd0TJfRFpzdGnDQdW3FACiAVdw=="],
"@smithy/hash-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-8ZBDY2DD4wr+GGjTpPtiglEsqr0lUP+KHqgZcWczFf6qeZ/YRjMIOoQWVQlmwu7EtxKTd8YXD8lblmYcpBIA1g=="],
"@smithy/invalid-dependency": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-c21qJiTSb25xvvOp+H2TNZzPCngrvl5vIPqPB8zQ/DmJF4QWXO19x1dWfMJZ6wZuuWUPPm0gV8C0cU3+ifcWuw=="],
"@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow=="],
"@smithy/middleware-content-length": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-xhHq7fX4/3lv5NHxLUk3OeEvl0xZ+Ek3qIbWaCL4f9JwgDZEclPBElljaZCAItdGPQl/kSM4LPMOpy1MYgprpw=="],
"@smithy/middleware-endpoint": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/middleware-serde": "^4.2.20", "@smithy/node-config-provider": "^4.3.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-middleware": "^4.2.14", "tslib": "^2.6.2" } }, "sha512-ZZkgyjnJppiZbIm6Qbx92pbXYi1uzenIvGhBSCDlc7NwuAkiqSgS75j1czAD25ZLs2FjMjYy1q7gyRVWG6JA0Q=="],
"@smithy/middleware-retry": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/protocol-http": "^5.3.14", "@smithy/service-error-classification": "^4.3.1", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" } }, "sha512-bRt6ZImqVSeTk39Nm81K20ObIiAZ3WefY7G6+iz/0tZjs4dgRRjvRX2sgsH+zi6iDCRR/aQvQofLKxxz4rPBZg=="],
"@smithy/middleware-serde": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-Lx9JMO9vArPtiChE3wbEZ5akMIDQpWQtlu90lhACQmNOXcGXRbaDywMHDzuDZ2OkZzP+9wQfZi3YJT9F67zTQQ=="],
"@smithy/middleware-stack": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-2dvkUKLuFdKsCRmOE4Mn63co0Djtsm+JMh0bYZQupN1pJwMeE8FmQmRLLzzEMN0dnNi7CDCYYH8F0EVwWiPBeA=="],
"@smithy/node-config-provider": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-S+gFjyo/weSVL0P1b9Ts8C/CwIfNCgUPikk3sl6QVsfE/uUuO+QsF+NsE/JkpvWqqyz1wg7HFdiaZuj5CoBMRg=="],
"@smithy/node-http-handler": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/querystring-builder": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-iB+orM4x3xrr57X3YaXazfKnntl0LHlZB1kcXSGzMV1Tt0+YwEjGlbjk/44qEGtBzXAz6yFDzkYTKSV6Pj2HUg=="],
"@smithy/property-provider": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-WuM31CgfsnQ/10i7NYr0PyxqknD72Y5uMfUMVSniPjbEPceiTErb4eIqJQ+pdxNEAUEWrewrGjIRjVbVHsxZiQ=="],
"@smithy/protocol-http": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-dN5F8kHx8RNU0r+pCwNmFZyz6ChjMkzShy/zup6MtkRmmix4vZzJdW+di7x//b1LiynIev88FM18ie+wwPcQtQ=="],
"@smithy/querystring-builder": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "@smithy/util-uri-escape": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-XYA5Z0IqTeF+5XDdh4BBmSA0HvbgVZIyv4cmOoUheDNR57K1HgBp9ukUMx3Cr3XpDHHpLBnexPE3LAtDsZkj2A=="],
"@smithy/querystring-parser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-hr+YyqBD23GVvRxGGrcc/oOeNlK3PzT5Fu4dzrDXxzS1LpFiuL2PQQqKPs87M79aW7ziMs+nvB3qdw77SqE7Lw=="],
"@smithy/service-error-classification": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1" } }, "sha512-aUQuDGh760ts/8MU+APjIZhlLPKhIIfqyzZaJikLEIMrdxFvxuLYD0WxWzaYWpmLbQlXDe9p7EWM3HsBe0K6Gw=="],
"@smithy/shared-ini-file-loader": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-495/V2I15SHgedSJoDPD23JuSfKAp726ZI1V0wtjB07Wh7q/0tri/0e0DLefZCHgxZonrGKt/OCTpAtP1wE1kQ=="],
"@smithy/signature-v4": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.2", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-uri-escape": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA=="],
"@smithy/smithy-client": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/middleware-endpoint": "^4.4.32", "@smithy/middleware-stack": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-stream": "^4.5.25", "tslib": "^2.6.2" } }, "sha512-y/Pcj1V9+qG98gyu1gvftHB7rDpdh+7kIBIggs55yGm3JdtBV8GT8IFF3a1qxZ79QnaJHX9GXzvBG6tAd+czJA=="],
"@smithy/types": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-59b5HtSVrVR/eYNei3BUj3DCPKD/G7EtDDe7OEJE7i7FtQFugYo6MxbotS8mVJkLNVf8gYaAlEBwwtJ9HzhWSg=="],
"@smithy/url-parser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/querystring-parser": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-p06BiBigJ8bTA3MgnOfCtDUWnAMY0YfedO/GRpmc7p+wg3KW8vbXy1xwSu5ASy0wV7rRYtlfZOIKH4XqfhjSQQ=="],
"@smithy/util-base64": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-XRH6b0H/5A3SgblmMa5ErXQ2XKhfbQB+Fm/oyLZ2O2kCUrwgg55bU0RekmzAhuwOjA9qdN5VU2BprOvGGUkOOQ=="],
"@smithy/util-body-length-browser": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-JKCrLNOup3OOgmzeaKQwi4ZCTWlYR5H4Gm1r2uTMVBXoemo1UEghk5vtMi1xSu2ymgKVGW631e2fp9/R610ZjQ=="],
"@smithy/util-body-length-node": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-ZkJGvqBzMHVHE7r/hcuCxlTY8pQr1kMtdsVPs7ex4mMU+EAbcXppfo5NmyxMYi2XU49eqaz56j2gsk4dHHPG/g=="],
"@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-FDXD7cvUoFWwN6vtQfEta540Y/YBe5JneK3SoZg9bThSoOAC/eGeYEua6RkBgKjGa/sz6Y+DuBZj3+YEY21y4Q=="],
"@smithy/util-config-provider": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ=="],
"@smithy/util-defaults-mode-browser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/property-provider": "^4.2.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-a5bNrdiONYB/qE2BuKegvUMd/+ZDwdg4vsNuuSzYE8qs2EYAdK9CynL+Rzn29PbPiUqoz/cbpRbcLzD5lEevHw=="],
"@smithy/util-defaults-mode-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/config-resolver": "^4.4.17", "@smithy/credential-provider-imds": "^4.2.14", "@smithy/node-config-provider": "^4.3.14", "@smithy/property-provider": "^4.2.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-g1cvrJvOnzeJgEdf7AE4luI7gp6L8weE0y9a9wQUSGtjb8QRHDbCJYuE4Sy0SD9N8RrnNPFsPltAz/OSoBR9Zw=="],
"@smithy/util-endpoints": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-a55Tr+3OKld4TTtnT+RhKOQHyPxm3j/xL4OR83WBUhLJaKDS9dnJ7arRMOp3t31dcLhApwG9bgvrRXBHlLdIkg=="],
"@smithy/util-hex-encoding": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-Qcz3W5vuHK4sLQdyT93k/rfrUwdJ8/HZ+nMUOyGdpeGA1Wxt65zYwi3oEl9kOM+RswvYq90fzkNDahPS8K0OIg=="],
"@smithy/util-middleware": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-1Su2vj9RYNDEv/V+2E+jXkkwGsgR7dc4sfHn9Z7ruzQHJIEni9zzw5CauvRXlFJfmgcqYP8fWa0dkh2Q2YaQyw=="],
"@smithy/util-retry": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/service-error-classification": "^4.3.1", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-LUIxbTBi+OpvXpg91poGA6BdyoleMDLnfXjVDqyi2RvZmTveY5loE/FgYUBCR5LU2BThW2SoZRh8dTIIy38IPw=="],
"@smithy/util-stream": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/fetch-http-handler": "^5.3.17", "@smithy/node-http-handler": "^4.6.1", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-/PFpG4k8Ze8Ei+mMKj3oiPICYekthuzePZMgZbCqMiXIHHf4n2aZ4Ps0aSRShycFTGuj/J6XldmC0x0DwednIA=="],
"@smithy/util-uri-escape": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw=="],
"@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw=="],
"@smithy/uuid": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-O/IEdcCUKkubz60tFbGA7ceITTAJsty+lBjNoorP4Z6XRqaFb/OjQjZODophEcuq68nKm6/0r+6/lLQ+XVpk8g=="],
"@standard-schema/spec": ["@standard-schema/[email protected]", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
"@szmarczak/http-timer": ["@szmarczak/[email protected]", "", { "dependencies": { "defer-to-connect": "^2.0.0" } }, "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w=="],
@@ -848,6 +1072,12 @@
"@tanstack/virtual-file-routes": ["@tanstack/[email protected]", "", {}, "sha512-EGWs9yvJA821pUkwkiZLQW89CzUumHyJy8NKq229BubyoWXfDw1oWnTJYSS/hhbLiwP9+KpopjeF5wWwnCCyeQ=="],
"@tokenizer/inflate": ["@tokenizer/[email protected]", "", { "dependencies": { "debug": "^4.4.3", "token-types": "^6.1.1" } }, "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA=="],
"@tokenizer/token": ["@tokenizer/[email protected]", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="],
"@tootallnate/quickjs-emscripten": ["@tootallnate/[email protected]", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
"@tybys/wasm-util": ["@tybys/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="],
"@types/babel__core": ["@types/[email protected]", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="],
@@ -882,6 +1112,8 @@
"@types/mdast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="],
"@types/mime-types": ["@types/[email protected]", "", {}, "sha512-lfU4b34HOri+kAY5UheuFMWPDOI+OPceBSHZKp69gEyTL/mmJ4cnU6Y/rlme3UL3GyOn6Y42hyIEw0/q8sWx5w=="],
"@types/ms": ["@types/[email protected]", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
"@types/nlcst": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA=="],
@@ -894,6 +1126,8 @@
"@types/responselike": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="],
"@types/retry": ["@types/[email protected]", "", {}, "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="],
"@types/statuses": ["@types/[email protected]", "", {}, "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA=="],
"@types/unist": ["@types/[email protected]", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
@@ -948,18 +1182,22 @@
"acorn": ["[email protected]", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="],
"agent-base": ["[email protected]", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
"ajv": ["[email protected]", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="],
"ajv-draft-04": ["[email protected]", "", { "peerDependencies": { "ajv": "^8.5.0" }, "optionalPeers": ["ajv"] }, "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw=="],
"ajv-formats": ["[email protected]", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="],
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
"ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
"ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"ansis": ["[email protected]", "", {}, "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig=="],
"any-promise": ["[email protected]", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="],
"anymatch": ["[email protected]", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="],
"argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
@@ -984,8 +1222,16 @@
"bail": ["[email protected]", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="],
"balanced-match": ["[email protected]", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
"base64-js": ["[email protected]", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
"baseline-browser-mapping": ["[email protected]", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-PCLz/LXGBsNTErbtB6i5u4eLpHeMfi93aUv5duMmj6caNu6IphS4q6UevDnL36sZQv9lrP11dbPKGMaXPwMKfQ=="],
"basic-ftp": ["[email protected]", "", {}, "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw=="],
"bignumber.js": ["[email protected]", "", {}, "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ=="],
"binary-extensions": ["[email protected]", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="],
"birpc": ["[email protected]", "", {}, "sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw=="],
@@ -996,12 +1242,18 @@
"boolean": ["[email protected]", "", {}, "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw=="],
"bowser": ["[email protected]", "", {}, "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg=="],
"brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="],
"braces": ["[email protected]", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
"browserslist": ["[email protected]", "", { "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA=="],
"buffer-crc32": ["[email protected]", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="],
"buffer-equal-constant-time": ["[email protected]", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="],
"builder-util-runtime": ["[email protected]", "", { "dependencies": { "debug": "^4.3.4", "sax": "^1.2.4" } }, "sha512-qt41tMfgHTllhResqM5DcnHyDIWNgzHvuY2jDcYP9iaGpkWxTUzV6GQjDeLnlR1/DtdlcsWQbA7sByMpmJFTLQ=="],
"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-1KGPpoxQWl9f6wcZh57LvrPIInQMn2TQ7jsgxqpRzg+l0QPOFvJVH7HmvHo/AiPgwXy+/Thf6Ov3EdVn1vOabg=="],
@@ -1026,6 +1278,8 @@
"chai": ["[email protected]", "", {}, "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg=="],
"chalk": ["[email protected]", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
"character-entities": ["[email protected]", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="],
"character-entities-html4": ["[email protected]", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="],
@@ -1040,6 +1294,8 @@
"class-variance-authority": ["[email protected]", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="],
"cli-highlight": ["[email protected]", "", { "dependencies": { "chalk": "^4.0.0", "highlight.js": "^10.7.1", "mz": "^2.4.0", "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.0", "yargs": "^16.0.0" }, "bin": { "highlight": "bin/highlight" } }, "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg=="],
"cli-width": ["[email protected]", "", {}, "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ=="],
"cliui": ["[email protected]", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],
@@ -1088,6 +1344,8 @@
"csstype": ["[email protected]", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
"data-uri-to-buffer": ["[email protected]", "", {}, "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw=="],
"debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
"decode-named-character-reference": ["[email protected]", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="],
@@ -1108,6 +1366,8 @@
"defu": ["[email protected]", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="],
"degenerator": ["[email protected]", "", { "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", "esprima": "^4.0.1" } }, "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ=="],
"denque": ["[email protected]", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
"depd": ["[email protected]", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="],
@@ -1142,6 +1402,8 @@
"dunder-proto": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
"ecdsa-sig-formatter": ["[email protected]", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="],
"ee-first": ["[email protected]", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="],
"effect": ["[email protected]", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "fast-check": "^4.6.0", "find-my-way-ts": "^0.1.6", "ini": "^6.0.0", "kubernetes-types": "^1.30.0", "msgpackr": "^1.11.9", "multipasta": "^0.2.7", "toml": "^4.1.1", "uuid": "^13.0.0", "yaml": "^2.8.3" } }, "sha512-xyUDLeHSe8d6lWGOvR6Fgn2HL6gYeTZ/S4Jzk9uc4ZUxMPPsNZlNXrvk0C7/utQFzeX7uAWcVnG2BjbA0SRoAA=="],
@@ -1190,12 +1452,18 @@
"escape-string-regexp": ["[email protected]", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
"escodegen": ["[email protected]", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w=="],
"esprima": ["[email protected]", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="],
"estraverse": ["[email protected]", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="],
"estree-util-is-identifier-name": ["[email protected]", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="],
"estree-walker": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="],
"esutils": ["[email protected]", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="],
"etag": ["[email protected]", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="],
"eventemitter3": ["[email protected]", "", {}, "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw=="],
@@ -1220,10 +1488,18 @@
"fast-uri": ["[email protected]", "", {}, "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA=="],
"fast-xml-builder": ["[email protected]", "", { "dependencies": { "path-expression-matcher": "^1.1.3" } }, "sha512-jcyKVSEX13iseJqg7n/KWw+xnu/7fdrZ333Fac54KjHDIELVCfDDJXYIm6DTJ0Su4gSzrhqiK0DzY/wZbF40mw=="],
"fast-xml-parser": ["[email protected]", "", { "dependencies": { "@nodable/entities": "^2.1.0", "fast-xml-builder": "^1.1.5", "path-expression-matcher": "^1.5.0", "strnum": "^2.2.3" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w=="],
"fd-slicer": ["[email protected]", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
"fdir": ["[email protected]", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
"fetch-blob": ["[email protected]", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="],
"file-type": ["[email protected]", "", { "dependencies": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.4", "token-types": "^6.1.1", "uint8array-extras": "^1.4.0" } }, "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g=="],
"fill-range": ["[email protected]", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
"finalhandler": ["[email protected]", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="],
@@ -1236,6 +1512,8 @@
"fontkitten": ["[email protected]", "", { "dependencies": { "tiny-inflate": "^1.0.3" } }, "sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw=="],
"formdata-polyfill": ["[email protected]", "", { "dependencies": { "fetch-blob": "^3.1.2" } }, "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g=="],
"forwarded": ["[email protected]", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="],
"fresh": ["[email protected]", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="],
@@ -1246,10 +1524,16 @@
"function-bind": ["[email protected]", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
"gaxios": ["[email protected]", "", { "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "node-fetch": "^3.3.2" } }, "sha512-bTIgTsM2bWn3XklZISBTQX7ZSddGW+IO3bMdGaemHZ3tbqExMENHLx6kKZ/KlejgrMtj8q7wBItt51yegqalrA=="],
"gcp-metadata": ["[email protected]", "", { "dependencies": { "gaxios": "^7.0.0", "google-logging-utils": "^1.0.0", "json-bigint": "^1.0.0" } }, "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg=="],
"gensync": ["[email protected]", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="],
"get-caller-file": ["[email protected]", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
"get-east-asian-width": ["[email protected]", "", {}, "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA=="],
"get-intrinsic": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="],
"get-proto": ["[email protected]", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="],
@@ -1258,14 +1542,22 @@
"get-tsconfig": ["[email protected]", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw=="],
"get-uri": ["[email protected]", "", { "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4" } }, "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg=="],
"github-slugger": ["[email protected]", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="],
"glob": ["[email protected]", "", { "dependencies": { "minimatch": "^10.2.2", "minipass": "^7.1.3", "path-scurry": "^2.0.2" } }, "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw=="],
"glob-parent": ["[email protected]", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
"global-agent": ["[email protected]", "", { "dependencies": { "boolean": "^3.0.1", "es6-error": "^4.1.1", "matcher": "^3.0.0", "roarr": "^2.15.3", "semver": "^7.3.2", "serialize-error": "^7.0.1" } }, "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q=="],
"globalthis": ["[email protected]", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],
"google-auth-library": ["[email protected]", "", { "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", "gaxios": "^7.1.4", "gcp-metadata": "8.1.2", "google-logging-utils": "1.1.3", "jws": "^4.0.0" } }, "sha512-e27Z6EThmVNNvtYASwQxose/G57rkRuaRbQyxM2bvYLLX/GqWZ5chWq2EBoUchJbCc57eC9ArzO5wMsEmWftCw=="],
"google-logging-utils": ["[email protected]", "", {}, "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA=="],
"gopd": ["[email protected]", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
"got": ["[email protected]", "", { "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" } }, "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g=="],
@@ -1276,6 +1568,8 @@
"h3": ["[email protected]", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.4", "radix3": "^1.1.2", "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, "sha512-oi15ESLW5LRthZ+qPCi5GNasY/gvynSKUQxgiovrY63bPAtG59wtM+LSrlcwvOHAXzGrXVLnI97brbkdPF9WoQ=="],
"has-flag": ["[email protected]", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
"has-property-descriptors": ["[email protected]", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="],
"has-symbols": ["[email protected]", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="],
@@ -1306,10 +1600,14 @@
"headers-polyfill": ["[email protected]", "", {}, "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ=="],
"highlight.js": ["[email protected]", "", {}, "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="],
"hono": ["[email protected]", "", {}, "sha512-am5zfg3yu6sqn5yjKBNqhnTX7Cv+m00ox+7jbaKkrLMRJ4rAdldd1xPd/JzbBWspqaQv6RSTrgFN95EsfhC+7w=="],
"hookable": ["[email protected]", "", {}, "sha512-ZoKZSJgu8voGK2geJS+6YtYjvIzu9AOM/KZXsBxr83uhLL++e9pEv/dlgwgy3dvHg06kTz6JOh1hk3C8Ceiymw=="],
"hosted-git-info": ["[email protected]", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-Hc+ghLoSt6QaYZUv0WBiIvmMDZuZZ7oaDvdH8MbfOO4lOsxdXLEvuC6ePoGs9H1X9oCLyq6+NVN0MKqD+ydxyg=="],
"html-escaper": ["[email protected]", "", {}, "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ=="],
"html-url-attributes": ["[email protected]", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="],
@@ -1320,10 +1618,18 @@
"http-errors": ["[email protected]", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="],
"http-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
"http2-wrapper": ["[email protected]", "", { "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" } }, "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg=="],
"https-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
"iconv-lite": ["[email protected]", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="],
"ieee754": ["[email protected]", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
"ignore": ["[email protected]", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="],
"import-without-cache": ["[email protected]", "", {}, "sha512-B6Lc2s6yApwnD2/pMzFh/d5AVjdsDXjgkeJ766FmFuJELIGHNycKRj+l3A39yZPM4CchqNCB4RITEAYB1KUM6A=="],
"inherits": ["[email protected]", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
@@ -1386,6 +1692,8 @@
"jsesc": ["[email protected]", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],
"json-bigint": ["[email protected]", "", { "dependencies": { "bignumber.js": "^9.0.0" } }, "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="],
"json-buffer": ["[email protected]", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
"json-schema-to-ts": ["[email protected]", "", { "dependencies": { "@babel/runtime": "^7.18.3", "ts-algebra": "^2.0.0" } }, "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g=="],
@@ -1398,14 +1706,20 @@
"json5": ["[email protected]", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="],
"jsonc-parser": ["jsonc-parser@2.3.1", "", {}, "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg=="],
"jsonc-parser": ["jsonc-parser@3.3.1", "", {}, "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ=="],
"jsonfile": ["[email protected]", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="],
"jwa": ["[email protected]", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg=="],
"jws": ["[email protected]", "", { "dependencies": { "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA=="],
"keyv": ["[email protected]", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
"kleur": ["[email protected]", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],
"koffi": ["[email protected]", "", {}, "sha512-0Ie6CfD026dNfWSosDw9dPxPzO9Rlyo0N8m5r05S8YjytIpuilzMFDMY4IDy/8xQsTwpuVinhncD+S8n3bcYZQ=="],
"kubernetes-types": ["[email protected]", "", {}, "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q=="],
"lazy-val": ["[email protected]", "", {}, "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q=="],
@@ -1446,6 +1760,8 @@
"lodash.isequal": ["[email protected]", "", {}, "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="],
"long": ["[email protected]", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="],
"longest-streak": ["[email protected]", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="],
"lowercase-keys": ["[email protected]", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="],
@@ -1462,6 +1778,8 @@
"markdown-table": ["[email protected]", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="],
"marked": ["[email protected]", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA=="],
"matcher": ["[email protected]", "", { "dependencies": { "escape-string-regexp": "^4.0.0" } }, "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng=="],
"math-intrinsics": ["[email protected]", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
@@ -1568,6 +1886,10 @@
"mimic-response": ["[email protected]", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="],
"minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="],
"minipass": ["[email protected]", "", {}, "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A=="],
"mrmime": ["[email protected]", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="],
"ms": ["[email protected]", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
@@ -1584,16 +1906,24 @@
"mute-stream": ["[email protected]", "", {}, "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA=="],
"mz": ["[email protected]", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="],
"nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="],
"negotiator": ["[email protected]", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="],
"neotraverse": ["[email protected]", "", {}, "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA=="],
"netmask": ["[email protected]", "", {}, "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA=="],
"nlcst-to-string": ["[email protected]", "", { "dependencies": { "@types/nlcst": "^2.0.0" } }, "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA=="],
"node-addon-api": ["[email protected]", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="],
"node-domexception": ["[email protected]", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="],
"node-fetch": ["[email protected]", "", { "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", "formdata-polyfill": "^4.0.10" } }, "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA=="],
"node-fetch-native": ["[email protected]", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="],
"node-gyp-build-optional-packages": ["[email protected]", "", { "dependencies": { "detect-libc": "^2.0.1" }, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw=="],
@@ -1632,6 +1962,8 @@
"open": ["[email protected]", "", { "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", "wsl-utils": "^0.1.0" } }, "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA=="],
"openai": ["[email protected]", "", { "peerDependencies": { "ws": "^8.18.0", "zod": "^3.25 || ^4.0" }, "optionalPeers": ["ws", "zod"], "bin": { "openai": "bin/cli" } }, "sha512-zd23dbWTjiJ6sSAX6s0HrCZi41JwTA1bQVs0wLQPZ2/5o2gxOJA5wh7yOAUgwYybfhDXyhwlpeQf7Mlgx8EOCA=="],
"outvariant": ["[email protected]", "", {}, "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA=="],
"oxfmt": ["[email protected]", "", { "dependencies": { "tinypool": "2.1.0" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.40.0", "@oxfmt/binding-android-arm64": "0.40.0", "@oxfmt/binding-darwin-arm64": "0.40.0", "@oxfmt/binding-darwin-x64": "0.40.0", "@oxfmt/binding-freebsd-x64": "0.40.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.40.0", "@oxfmt/binding-linux-arm-musleabihf": "0.40.0", "@oxfmt/binding-linux-arm64-gnu": "0.40.0", "@oxfmt/binding-linux-arm64-musl": "0.40.0", "@oxfmt/binding-linux-ppc64-gnu": "0.40.0", "@oxfmt/binding-linux-riscv64-gnu": "0.40.0", "@oxfmt/binding-linux-riscv64-musl": "0.40.0", "@oxfmt/binding-linux-s390x-gnu": "0.40.0", "@oxfmt/binding-linux-x64-gnu": "0.40.0", "@oxfmt/binding-linux-x64-musl": "0.40.0", "@oxfmt/binding-openharmony-arm64": "0.40.0", "@oxfmt/binding-win32-arm64-msvc": "0.40.0", "@oxfmt/binding-win32-ia32-msvc": "0.40.0", "@oxfmt/binding-win32-x64-msvc": "0.40.0" }, "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-g0C3I7xUj4b4DcagevM9kgH6+pUHytikxUcn3/VUkvzTNaaXBeyZqb7IBsHwojeXm4mTBEC/aBjBTMVUkZwWUQ=="],
@@ -1644,22 +1976,36 @@
"p-queue": ["[email protected]", "", { "dependencies": { "eventemitter3": "^5.0.1", "p-timeout": "^7.0.0" } }, "sha512-O/ZPaXuQV29uSLbxWBGGZO1mCQXV2BLIwUr59JUU9SoH76mnYvtms7aafH/isNSNGwuEfP6W/4xD0/TJXxrizw=="],
"p-retry": ["[email protected]", "", { "dependencies": { "@types/retry": "0.12.0", "retry": "^0.13.1" } }, "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ=="],
"p-timeout": ["[email protected]", "", {}, "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg=="],
"pac-proxy-agent": ["[email protected]", "", { "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", "socks-proxy-agent": "^8.0.5" } }, "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA=="],
"pac-resolver": ["[email protected]", "", { "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" } }, "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg=="],
"package-manager-detector": ["[email protected]", "", {}, "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA=="],
"parse-entities": ["[email protected]", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="],
"parse-latin": ["[email protected]", "", { "dependencies": { "@types/nlcst": "^2.0.0", "@types/unist": "^3.0.0", "nlcst-to-string": "^4.0.0", "unist-util-modify-children": "^4.0.0", "unist-util-visit-children": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ=="],
"parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
"parse5": ["parse5@5.1.1", "", {}, "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug=="],
"parse5-htmlparser2-tree-adapter": ["[email protected]", "", { "dependencies": { "parse5": "^6.0.1" } }, "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA=="],
"parseurl": ["[email protected]", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="],
"partial-json": ["[email protected]", "", {}, "sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA=="],
"path-browserify": ["[email protected]", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],
"path-expression-matcher": ["[email protected]", "", {}, "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ=="],
"path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
"path-scurry": ["[email protected]", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg=="],
"path-to-regexp": ["[email protected]", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="],
"pathe": ["[email protected]", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
@@ -1688,10 +2034,18 @@
"progress": ["[email protected]", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="],
"proper-lockfile": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.4", "retry": "^0.12.0", "signal-exit": "^3.0.2" } }, "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA=="],
"property-information": ["[email protected]", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="],
"protobufjs": ["[email protected]", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.1", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-M71sTMB146U3u0di3yup8iM+zv8yPRNQVr1KK4tyBitl3qFvEGucq/rGDRShD2rsJhtN02RJaJ7j5X5hmy8SJg=="],
"proxy-addr": ["[email protected]", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="],
"proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="],
"proxy-from-env": ["[email protected]", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
"pump": ["[email protected]", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],
"pure-rand": ["[email protected]", "", {}, "sha512-53B3MB8wetRdD6JZ4W/0gDKaOvKwuXrEmV1auQc0hASWge8rieKV4PCCVNVbJ+i24miiubb4c/B+dg8Ho0ikYw=="],
@@ -1770,6 +2124,8 @@
"retext-stringify": ["[email protected]", "", { "dependencies": { "@types/nlcst": "^2.0.0", "nlcst-to-string": "^4.0.0", "unified": "^11.0.0" } }, "sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA=="],
"retry": ["[email protected]", "", {}, "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="],
"rettime": ["[email protected]", "", {}, "sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw=="],
"roarr": ["[email protected]", "", { "dependencies": { "boolean": "^3.0.1", "detect-node": "^2.0.4", "globalthis": "^1.0.1", "json-stringify-safe": "^5.0.1", "semver-compare": "^1.0.0", "sprintf-js": "^1.1.2" } }, "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A=="],
@@ -1782,6 +2138,8 @@
"run-applescript": ["[email protected]", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="],
"safe-buffer": ["[email protected]", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
"safer-buffer": ["[email protected]", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
"sax": ["[email protected]", "", {}, "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA=="],
@@ -1822,14 +2180,20 @@
"siginfo": ["[email protected]", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="],
"signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
"signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
"sirv": ["[email protected]", "", { "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" } }, "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g=="],
"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
"smart-buffer": ["[email protected]", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
"smol-toml": ["[email protected]", "", {}, "sha512-4zemZi0HvTnYwLfrpk/CF9LOd9Lt87kAt50GnqhMpyF9U3poDAP2+iukq2bZsO/ufegbYehBkqINbsWxj4l4cw=="],
"socks": ["[email protected]", "", { "dependencies": { "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" } }, "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog=="],
"socks-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
"source-map": ["[email protected]", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="],
"source-map-js": ["[email protected]", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
@@ -1852,7 +2216,11 @@
"stringify-entities": ["[email protected]", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="],
"strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
"strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
"strnum": ["[email protected]", "", {}, "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg=="],
"strtok3": ["[email protected]", "", { "dependencies": { "@tokenizer/token": "^0.3.0" } }, "sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA=="],
"style-to-js": ["[email protected]", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="],
@@ -1860,6 +2228,8 @@
"sumchecker": ["[email protected]", "", { "dependencies": { "debug": "^4.1.0" } }, "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg=="],
"supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
"svgo": ["[email protected]", "", { "dependencies": { "commander": "^11.1.0", "css-select": "^5.1.0", "css-tree": "^3.0.1", "css-what": "^6.1.0", "csso": "^5.0.5", "picocolors": "^1.1.1", "sax": "^1.5.0" }, "bin": "./bin/svgo.js" }, "sha512-XDpWUOPC6FEibaLzjfe0ucaV0YrOjYotGJO1WpF0Zd+n6ZGEQUsSugaoLq9QkEZtAfQIxT42UChcssDVPP3+/w=="],
"t3": ["t3@workspace:apps/server"],
@@ -1874,6 +2244,10 @@
"tapable": ["[email protected]", "", {}, "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg=="],
"thenify": ["[email protected]", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="],
"thenify-all": ["[email protected]", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="],
"tiny-inflate": ["[email protected]", "", {}, "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="],
"tiny-invariant": ["[email protected]", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],
@@ -1902,6 +2276,8 @@
"toidentifier": ["[email protected]", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="],
"token-types": ["[email protected]", "", { "dependencies": { "@borewit/text-codec": "^0.2.1", "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" } }, "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww=="],
"toml": ["[email protected]", "", {}, "sha512-EBJnVBr3dTXdA89WVFoAIPUqkBjxPMwRqsfuo1r240tKFHXv3zgca4+NJib/h6TyvGF7vOawz0jGuryJCdNHrw=="],
"totalist": ["[email protected]", "", {}, "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ=="],
@@ -1942,6 +2318,8 @@
"type-is": ["[email protected]", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="],
"typebox": ["[email protected]", "", {}, "sha512-pZ0aQPmMmXoUvSbeuWf/Hzsc+avNw/Zd6VeE8CFgkVGWyuHPJvqeJJDeJqLve+K70LvjYIoleGcoJHPT17cWoA=="],
"typesafe-path": ["[email protected]", "", {}, "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA=="],
"typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
@@ -1950,6 +2328,8 @@
"ufo": ["[email protected]", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="],
"uint8array-extras": ["[email protected]", "", {}, "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A=="],
"ultrahtml": ["[email protected]", "", {}, "sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw=="],
"unconfig-core": ["[email protected]", "", { "dependencies": { "@quansync/fs": "^1.0.0", "quansync": "^1.0.0" } }, "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w=="],
@@ -2052,6 +2432,8 @@
"web-namespaces": ["[email protected]", "", {}, "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ=="],
"web-streams-polyfill": ["[email protected]", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],
"webpack-virtual-modules": ["[email protected]", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="],
"which": ["[email protected]", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
@@ -2088,6 +2470,8 @@
"yocto-queue": ["[email protected]", "", {}, "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ=="],
"yoctocolors": ["[email protected]", "", {}, "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug=="],
"yoctocolors-cjs": ["[email protected]", "", {}, "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw=="],
"zod": ["[email protected]", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
@@ -2102,6 +2486,12 @@
"@astrojs/yaml2ts/yaml": ["[email protected]", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A=="],
"@aws-crypto/sha256-browser/@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
"@aws-crypto/util/@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-Th7kPI6YPtvJUcdznooXJMy+9rQWjmEF81LxaJssngBzuysK4a/x+l8kjm1zb7nYsUPbndnBdUnwng/3PLvtGw=="],
"@babel/code-frame/@babel/helper-validator-identifier": ["@babel/[email protected]", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="],
"@babel/core/@babel/generator": ["@babel/[email protected]", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw=="],
@@ -2126,8 +2516,20 @@
"@electron/get/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
"@inquirer/core/signal-exit": ["[email protected]", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
"@inquirer/core/wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="],
"@mariozechner/jiti/std-env": ["[email protected]", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
"@mariozechner/pi-ai/@anthropic-ai/sdk": ["@anthropic-ai/[email protected]", "", { "dependencies": { "json-schema-to-ts": "^3.1.1" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["zod"], "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-LAmu761tSN9r66ixvmciswUj/ZC+1Q4iAfpedTfSVLeswRwnY3n2Nb6Tsk+cLPP28aLOPWeMgIuTuCcMC6W/iw=="],
"@mariozechner/pi-ai/undici": ["[email protected]", "", {}, "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ=="],
"@mariozechner/pi-coding-agent/undici": ["[email protected]", "", {}, "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ=="],
"@mariozechner/pi-coding-agent/uuid": ["[email protected]", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg=="],
"@pierre/diffs/shiki": ["[email protected]", "", { "dependencies": { "@shikijs/core": "3.23.0", "@shikijs/engine-javascript": "3.23.0", "@shikijs/engine-oniguruma": "3.23.0", "@shikijs/langs": "3.23.0", "@shikijs/themes": "3.23.0", "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA=="],
"@rolldown/plugin-babel/rolldown": ["[email protected]", "", { "dependencies": { "@oxc-project/types": "=0.115.0", "@rolldown/pluginutils": "1.0.0-rc.9" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.9", "@rolldown/binding-darwin-arm64": "1.0.0-rc.9", "@rolldown/binding-darwin-x64": "1.0.0-rc.9", "@rolldown/binding-freebsd-x64": "1.0.0-rc.9", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.9", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.9", "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.9", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.9", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.9", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.9", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.9" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q=="],
@@ -2168,24 +2570,48 @@
"@vitest/browser/ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="],
"@vscode/emmet-helper/jsonc-parser": ["[email protected]", "", {}, "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg=="],
"anymatch/picomatch": ["[email protected]", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
"ast-kit/@babel/parser": ["@babel/[email protected]", "", { "dependencies": { "@babel/types": "^8.0.0-rc.2" }, "bin": "./bin/babel-parser.js" }, "sha512-29AhEtcq4x8Dp3T72qvUMZHx0OMXCj4Jy/TEReQa+KWLln524Cj1fWb3QFi0l/xSpptQBR6y9RNEXuxpFvwiUQ=="],
"cli-highlight/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
"cli-highlight/yargs": ["[email protected]", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw=="],
"cliui/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
"clone-response/mimic-response": ["[email protected]", "", {}, "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="],
"csso/css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA=="],
"degenerator/ast-types": ["[email protected]", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w=="],
"dom-serializer/entities": ["[email protected]", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
"escodegen/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"express/cookie": ["[email protected]", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="],
"h3/cookie-es": ["[email protected]", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="],
"hast-util-from-html/parse5": ["[email protected]", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
"hast-util-raw/parse5": ["[email protected]", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
"mdast-util-find-and-replace/escape-string-regexp": ["[email protected]", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],
"node-fetch/data-uri-to-buffer": ["[email protected]", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="],
"p-retry/retry": ["[email protected]", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="],
"parse-entities/@types/unist": ["@types/[email protected]", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
"parse5-htmlparser2-tree-adapter/parse5": ["[email protected]", "", {}, "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="],
"proxy-agent/lru-cache": ["[email protected]", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
"recast/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"rolldown/@rolldown/pluginutils": ["@rolldown/[email protected]", "", {}, "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q=="],
@@ -2198,6 +2624,10 @@
"serialize-error/type-fest": ["[email protected]", "", {}, "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg=="],
"socks/ip-address": ["[email protected]", "", {}, "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA=="],
"string-width/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
"tsx/fsevents": ["[email protected]", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
"unrun/rolldown": ["[email protected]", "", { "dependencies": { "@oxc-project/types": "=0.115.0", "@rolldown/pluginutils": "1.0.0-rc.9" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.9", "@rolldown/binding-darwin-arm64": "1.0.0-rc.9", "@rolldown/binding-darwin-x64": "1.0.0-rc.9", "@rolldown/binding-freebsd-x64": "1.0.0-rc.9", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.9", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.9", "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.9", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.9", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.9", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.9", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.9" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q=="],
@@ -2208,7 +2638,7 @@
"vite/rolldown": ["[email protected]", "", { "dependencies": { "@oxc-project/types": "=0.115.0", "@rolldown/pluginutils": "1.0.0-rc.9" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.9", "@rolldown/binding-darwin-arm64": "1.0.0-rc.9", "@rolldown/binding-darwin-x64": "1.0.0-rc.9", "@rolldown/binding-freebsd-x64": "1.0.0-rc.9", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.9", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.9", "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.9", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.9", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.9", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.9", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.9", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.9" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q=="],
"vscode-json-languageservice/jsonc-parser": ["[email protected]", "", {}, "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ=="],
"wrap-ansi/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
"yaml-language-server/request-light": ["[email protected]", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="],
@@ -2216,12 +2646,18 @@
"yargs/yargs-parser": ["[email protected]", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
"@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
"@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
"@babel/generator/@babel/types/@babel/helper-string-parser": ["@babel/[email protected]", "", {}, "sha512-noLx87RwlBEMrTzncWd/FvTxoJ9+ycHNg0n8yyYydIoDsLZuxknKgWRJUqcrVkNrJ74uGyhWQzQaS3q8xfGAhQ=="],
"@electron/get/fs-extra/jsonfile": ["[email protected]", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="],
"@electron/get/fs-extra/universalify": ["[email protected]", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="],
"@inquirer/core/wrap-ansi/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
"@pierre/diffs/shiki/@shikijs/core": ["@shikijs/[email protected]", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA=="],
"@pierre/diffs/shiki/@shikijs/engine-javascript": ["@shikijs/[email protected]", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.4" } }, "sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA=="],
@@ -2292,10 +2728,18 @@
"ast-kit/@babel/parser/@babel/types": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-string-parser": "^8.0.0-rc.2", "@babel/helper-validator-identifier": "^8.0.0-rc.2" } }, "sha512-91gAaWRznDwSX4E2tZ1YjBuIfnQVOFDCQ2r0Toby0gu4XEbyF623kXLMA8d4ZbCu+fINcrudkmEcwSUHgDDkNw=="],
"cli-highlight/yargs/cliui": ["[email protected]", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ=="],
"cli-highlight/yargs/yargs-parser": ["[email protected]", "", {}, "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="],
"cliui/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
"csso/css-tree/mdn-data": ["[email protected]", "", {}, "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g=="],
"rolldown-plugin-dts/@babel/types/@babel/helper-string-parser": ["@babel/[email protected]", "", {}, "sha512-noLx87RwlBEMrTzncWd/FvTxoJ9+ycHNg0n8yyYydIoDsLZuxknKgWRJUqcrVkNrJ74uGyhWQzQaS3q8xfGAhQ=="],
"string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
"unrun/rolldown/@oxc-project/types": ["@oxc-project/[email protected]", "", {}, "sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw=="],
"unrun/rolldown/@rolldown/binding-android-arm64": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg=="],
@@ -2358,8 +2802,20 @@
"vite/rolldown/@rolldown/pluginutils": ["@rolldown/[email protected]", "", {}, "sha512-w6oiRWgEBl04QkFZgmW+jnU1EC9b57Oihi2ot3HNWIQRqgHp5PnYDia5iZ5FF7rpa4EQdiqMDXjlqKGXBhsoXw=="],
"wrap-ansi/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
"@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="],
"@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="],
"@inquirer/core/wrap-ansi/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
"@tanstack/router-plugin/chokidar/readdirp/picomatch": ["[email protected]", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
"ast-kit/@babel/parser/@babel/types/@babel/helper-string-parser": ["@babel/[email protected]", "", {}, "sha512-noLx87RwlBEMrTzncWd/FvTxoJ9+ycHNg0n8yyYydIoDsLZuxknKgWRJUqcrVkNrJ74uGyhWQzQaS3q8xfGAhQ=="],
"cli-highlight/yargs/cliui/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
"cli-highlight/yargs/cliui/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
}
}
@@ -0,0 +1,927 @@
# Pi Extension Support Plan
This implementation plan captures the current Pi extension-system findings and the first T3 Code
implementation target.
The provider/runtime reference and full Pi extension API mapping live in
[`docs/providers/pi.md`](../providers/pi.md). Treat that mapping as the source of truth for what
each `pi.*`, `ctx.*`, and `ctx.ui.*` call should do in T3.
Scope for this version: support the core extension contract first. Custom Pi TUI components can wait.
## Decisions From The Design Interview
- Custom components are out of scope for v1. If an extension calls `ctx.ui.custom(...)`, T3 should persist a UI-only activity entry that says `custom ui coming soon`, then resolve the call as unsupported/cancelled.
- Extension input requests should appear as a popup/card above the input box.
- `ctx.ui.notify(...)`, `ctx.ui.setStatus(...)`, and other transient UI calls should persist into the conversation/activity timeline, not disappear as toasts.
- Persisted extension activity is UI-only history. It must not be included in future model context.
- Extension-injected prompts from `pi.sendUserMessage(...)` should appear as normal user messages.
- Extension input answers are internal extension state. T3 should not automatically create user messages for answers unless the extension sends a user message itself.
- Extension-registered tools should be auto-enabled.
- Extension errors should be non-fatal by default: persist an error activity and keep the session alive unless the Pi session itself crashes.
- Extension commands can hydrate after Pi session init, but before the first message is sent if possible. A slight delay is fine.
- Pi extension commands should only appear in Pi threads.
- Project-local `.pi/extensions` should load automatically along with global/configured Pi extensions. No extra T3 permission prompt.
- Extension shell commands and side effects use Pi's permission model, not T3's approval/runtime-mode model.
- Runtime resolution preference should be:
1. `~/.pi/agent/node_modules/@mariozechner/pi-coding-agent`
2. T3's bundled `@mariozechner/pi-coding-agent`
3. Persisted warning if neither can load.
- Extension-registered providers should surface in the normal model picker after Pi init.
- Provider auth prompts from extensions should use the same popup above the composer.
- Extension commands should be available both through slash autocomplete and a menu/action surface.
- In slash autocomplete, `Enter` on the highlighted extension command should run it immediately; `Tab` should fill it into the composer.
- Menu clicks should run the extension command immediately with no args.
- If the user types `/command arg text`, pass `arg text` to the extension as the raw argument string.
- Commands should fire immediately even while Pi is streaming. The extension owns waiting, queuing, follow-up, or warnings.
- `pi.sendUserMessage(...)` while streaming should appear immediately as a queued follow-up user message.
## Current T3 State
The current Pi adapter starts SDK sessions, maps assistant text/reasoning deltas, maps tool lifecycle events, and binds extensions. The key gap is that extension binding has no real UI context:
```ts
// apps/server/src/provider/Layers/PiAdapter.ts
await input.context.session.bindExtensions({
commandContextActions,
shutdownHandler: () => {
void publishPiRuntimeWarning({
context: input.context,
publishRuntimeEvent: input.publishRuntimeEvent,
message: "Pi extension requested shutdown; close the T3 thread or stop the session instead.",
});
},
onError: (error) => {
void publishPiRuntimeError({
context: input.context,
publishRuntimeEvent: input.publishRuntimeEvent,
message: extensionErrorMessage(error),
detail: error,
});
},
});
```
Because no `uiContext` is passed, Pi's runner sees `ctx.hasUI === false`, and most `ctx.ui.*` calls are no-ops. That means extensions can load and register commands/tools, but T3 is not hosting their interactive surface.
The current user-input contract is also option-only:
```ts
// packages/contracts/src/providerRuntime.ts
export const UserInputQuestion = Schema.Struct({
id: TrimmedNonEmptyStringSchema,
header: TrimmedNonEmptyStringSchema,
question: TrimmedNonEmptyStringSchema,
options: Schema.Array(UserInputQuestionOption),
multiSelect: Schema.optional(Schema.Boolean).pipe(
Schema.withConstructorDefault(Effect.succeed(false)),
),
});
```
That works for existing choice prompts, but not for Pi's `input(...)` and `editor(...)` dialogs.
Current `respondToUserInput` is a hard failure:
```ts
// apps/server/src/provider/Layers/PiAdapter.ts
const respondToUserInput: ProviderAdapterShape<ProviderAdapterError>["respondToUserInput"] = () =>
Effect.fail(
new ProviderAdapterRequestError({
provider: PROVIDER,
method: "item/tool/respondToUserInput",
detail: "Pi extension user-input requests are not implemented yet.",
}),
);
```
Also important: current extension errors use `runtime.error`, and `ProviderRuntimeIngestion` treats that as a session error. That conflicts with the v1 decision that extension failures should be non-fatal.
## Pi SDK Contract To Mirror
Pi already has the right conceptual split in RPC mode:
- Dialog methods: `select`, `confirm`, `input`, `editor`. These block until a response arrives.
- Fire-and-forget methods: `notify`, `setStatus`, `setWidget`, `setTitle`, `setEditorText`. These do not wait for a response.
- Degraded methods in headless/RPC-like hosts: `custom()` can return unsupported, TUI-only footers/headers/editor components can be no-op or persisted as activity.
The SDK `ExtensionUIContext` methods T3 should care about for v1:
```ts
interface ExtensionUIContext {
select(
title: string,
options: string[],
opts?: ExtensionUIDialogOptions,
): Promise<string | undefined>;
confirm(title: string, message: string, opts?: ExtensionUIDialogOptions): Promise<boolean>;
input(
title: string,
placeholder?: string,
opts?: ExtensionUIDialogOptions,
): Promise<string | undefined>;
editor(title: string, prefill?: string): Promise<string | undefined>;
notify(message: string, type?: "info" | "warning" | "error"): void;
setStatus(key: string, text: string | undefined): void;
setWidget(key: string, content: string[] | undefined, options?: ExtensionWidgetOptions): void;
setTitle(title: string): void;
setEditorText(text: string): void;
pasteToEditor(text: string): void;
getEditorText(): string;
custom<T>(factory: unknown, options?: unknown): Promise<T>;
}
```
## Local Extension Inventory
Observed global/configured extensions under `/Users/davis/.pi/agent/extensions`:
| Extension | Main T3 needs |
| ----------------------- | -------------------------------------------------------------------------- |
| `copy-all.ts` | slash command, `waitForIdle`, clipboard side effect, persisted notify |
| `diff.ts` | agent/tool events, `pi.exec`, select dialog, persisted notify |
| `firecrawl-search.ts` | extension tool registration, auto-enabled tools |
| `flow-title.ts` | header/theme APIs can degrade to persisted activity or no-op |
| `oc.ts` | command execution, `pi.sendUserMessage` as normal user message |
| `usage.ts` | command execution, `waitForIdle`, `pi.sendUserMessage` |
| `tx9/index.ts` | command execution, streaming follow-up behavior, notify |
| `yeet.ts` | command execution, streaming follow-up behavior, notify |
| `zsh-user-bash.ts` | future `user_bash` path if T3 exposes Pi `!`/`!!` style bash |
| `tps-tracker.ts` | status updates persisted as individual activity entries |
| `update.ts` | flags, command, `pi.exec`, reload, notify |
| `opencode-zen-login.ts` | extension provider registration, auth/input popup, model picker refresh |
| `ephemeral/*` | command and custom UI. v1 should show `custom ui coming soon` |
| `pi-mcp/*` | commands, tool registration, OAuth/input popup, status, custom UI fallback |
The local Pi home uses `@mariozechner/pi-coding-agent@^0.66.1`; T3 currently bundles `@mariozechner/pi-coding-agent@^0.73.0`. This is a real design constraint, not just bookkeeping.
## Implementation Shape
Build a T3-side Pi extension host, not a TypeScript transformer. Extension TypeScript should still run through Pi's loader. T3 should provide compatible runtime objects and project their effects into T3 contracts/UI.
### Slice 1: Extension Activity Events
Add a non-fatal provider runtime event for extension UI/activity. Do not reuse `runtime.error` for extension failures, because that currently transitions the session to error.
Proposed contract:
```ts
// packages/contracts/src/providerRuntime.ts
const ExtensionActivityType = Schema.Literal("extension.activity");
const ExtensionActivityPayload = Schema.Struct({
source: TrimmedNonEmptyStringSchema, // e.g. "pi.extension.ui"
activityType: Schema.Literals([
"notify",
"status",
"widget",
"title",
"editor",
"custom-ui",
"error",
]),
message: TrimmedNonEmptyStringSchema,
severity: Schema.optional(Schema.Literals(["info", "warning", "error"])),
extensionPath: Schema.optional(TrimmedNonEmptyStringSchema),
data: Schema.optional(Schema.Unknown),
uiOnly: Schema.optional(Schema.Boolean).pipe(Schema.withConstructorDefault(Effect.succeed(true))),
});
const ProviderRuntimeExtensionActivityEvent = Schema.Struct({
...ProviderRuntimeEventBase.fields,
type: ExtensionActivityType,
payload: ExtensionActivityPayload,
});
```
In `ProviderRuntimeIngestion`, map it directly to an orchestration activity:
```ts
case "extension.activity": {
return [
{
id: event.eventId,
createdAt: event.createdAt,
tone: event.payload.severity === "error" ? "error" : "info",
kind: "extension.activity",
summary: event.payload.message,
payload: event.payload,
turnId: toTurnId(event.turnId) ?? null,
...maybeSequence,
},
];
}
```
This preserves notifications, status changes, unsupported custom UI, and extension errors as UI-only transcript activity.
### Slice 2: User Input Contract Upgrade
Extend `UserInputQuestion` instead of inventing a Pi-only popup path. That keeps existing `thread.user-input.respond` routing and the current composer plumbing.
Proposed shape:
```ts
export const UserInputQuestion = Schema.Struct({
id: TrimmedNonEmptyStringSchema,
header: TrimmedNonEmptyStringSchema,
question: TrimmedNonEmptyStringSchema,
inputKind: Schema.optional(Schema.Literals(["select", "confirm", "text", "textarea"])).pipe(
Schema.withConstructorDefault(Effect.succeed("select")),
),
options: Schema.Array(UserInputQuestionOption).pipe(
Schema.withConstructorDefault(Effect.succeed([])),
),
placeholder: Schema.optional(Schema.String),
prefill: Schema.optional(Schema.String),
multiSelect: Schema.optional(Schema.Boolean).pipe(
Schema.withConstructorDefault(Effect.succeed(false)),
),
});
```
Rules:
- `select`: options required. Existing behavior.
- `confirm`: render two options, `Yes` and `No`, and resolve to boolean in the Pi bridge.
- `text`: render a one-line input.
- `textarea`: render a multiline editor.
Update `apps/web/src/session-logic.ts` so `parseUserInputQuestions` accepts empty options for `text` and `textarea`, and update `apps/web/src/pendingUserInput.ts` so text/textarea answers are valid without selected options.
The UI location already mostly matches the desired shape: `ComposerPendingUserInputPanel` is rendered above the composer. It needs text and textarea modes, but the anchoring is right.
### Slice 3: PiExtensionUiBridge
Add a server-side bridge owned by `PiAdapter`.
New file:
```txt
apps/server/src/provider/pi/PiExtensionUiBridge.ts
```
Core responsibilities:
- Implement `ExtensionUIContext`.
- Keep a `pendingDialogs` map from T3 `ApprovalRequestId` to Pi resolvers.
- Emit `user-input.requested` for Pi `select`, `confirm`, `input`, and `editor`.
- Resolve pending dialogs from `respondToUserInput`.
- Emit `extension.activity` for `notify`, `setStatus`, `setWidget`, `setTitle`, `setEditorText`, `pasteToEditor`, unsupported TUI methods, and non-fatal extension errors.
- Make `custom()` persist `custom ui coming soon` and resolve immediately as unsupported.
Skeleton:
```ts
interface PendingPiExtensionDialog {
readonly kind: "select" | "confirm" | "input" | "editor";
readonly createdAt: string;
readonly resolve: (value: unknown) => void;
readonly reject: (cause: unknown) => void;
}
interface PiExtensionUiBridge {
readonly uiContext: ExtensionUIContext;
readonly respond: (
requestId: ApprovalRequestId,
answers: ProviderUserInputAnswers,
) => Promise<void>;
readonly dispose: () => void;
}
function makePiExtensionUiBridge(input: {
readonly context: PiSessionContext;
readonly publishRuntimeEvent: PiRuntimeEventPublisher;
}): PiExtensionUiBridge {
const pendingDialogs = new Map<ApprovalRequestId, PendingPiExtensionDialog>();
const publishActivity = async (activity: {
readonly activityType: ExtensionActivityPayload["activityType"];
readonly message: string;
readonly severity?: "info" | "warning" | "error";
readonly data?: unknown;
}) => {
await input.publishRuntimeEvent({
...makeContextEventBase(input.context, input.context.activeTurnId),
type: "extension.activity",
payload: {
source: "pi.extension.ui",
activityType: activity.activityType,
message: activity.message,
...(activity.severity ? { severity: activity.severity } : {}),
...(activity.data !== undefined ? { data: activity.data } : {}),
uiOnly: true,
},
});
};
const openDialog = <T>(dialog: {
readonly kind: PendingPiExtensionDialog["kind"];
readonly title: string;
readonly message?: string;
readonly options?: readonly string[];
readonly placeholder?: string;
readonly prefill?: string;
readonly timeout?: number;
readonly signal?: AbortSignal;
}) =>
new Promise<T | undefined>((resolve, reject) => {
const requestId = ApprovalRequestId.make(crypto.randomUUID());
pendingDialogs.set(requestId, {
kind: dialog.kind,
createdAt: nowIso(),
resolve,
reject,
});
void input.publishRuntimeEvent({
...makeContextEventBase(input.context, input.context.activeTurnId),
type: "user-input.requested",
requestId,
payload: {
questions: [
piDialogToUserInputQuestion({
requestId,
...dialog,
}),
],
},
});
});
const uiContext: ExtensionUIContext = {
select: (title, options, opts) =>
openDialog<string>({
kind: "select",
title,
options,
timeout: opts?.timeout,
signal: opts?.signal,
}),
confirm: async (title, message, opts) => {
const value = await openDialog<boolean>({
kind: "confirm",
title,
message,
timeout: opts?.timeout,
signal: opts?.signal,
});
return value === true;
},
input: (title, placeholder, opts) =>
openDialog<string>({
kind: "input",
title,
placeholder,
timeout: opts?.timeout,
signal: opts?.signal,
}),
editor: (title, prefill) =>
openDialog<string>({
kind: "editor",
title,
prefill,
}),
notify: (message, type = "info") => {
void publishActivity({ activityType: "notify", message, severity: type });
},
setStatus: (key, text) => {
void publishActivity({
activityType: "status",
message: text ? `${key}: ${text}` : `${key}: cleared`,
data: { key, text },
});
},
setWidget: (key, content, options) => {
if (Array.isArray(content)) {
void publishActivity({
activityType: "widget",
message: `${key}: ${content.join("\\n")}`,
data: { key, content, options },
});
return;
}
if (content) {
void publishActivity({
activityType: "custom-ui",
message: "custom ui coming soon",
data: { key, options },
});
}
},
setTitle: (title) => {
void publishActivity({ activityType: "title", message: title });
},
custom: async () => {
await publishActivity({
activityType: "custom-ui",
message: "custom ui coming soon",
});
return undefined as never;
},
// v1 degraded methods:
onTerminalInput: () => () => {},
setWorkingMessage: (message) => {
if (message) void publishActivity({ activityType: "status", message });
},
setWorkingVisible: () => {},
setWorkingIndicator: () => {},
setHiddenThinkingLabel: () => {},
setFooter: () => {},
setHeader: () => {},
pasteToEditor: (text) => {
void publishActivity({ activityType: "editor", message: text, data: { action: "paste" } });
},
setEditorText: (text) => {
void publishActivity({ activityType: "editor", message: text, data: { action: "set" } });
},
getEditorText: () => "",
addAutocompleteProvider: () => {},
setEditorComponent: () => {},
getEditorComponent: () => undefined,
theme: makeT3FallbackPiTheme(),
getAllThemes: () => [],
getTheme: () => undefined,
setTheme: () => ({ success: false, error: "T3 Pi theme switching is not implemented yet." }),
getToolsExpanded: () => false,
setToolsExpanded: () => {},
};
return {
uiContext,
respond: async (requestId, answers) => {
const pending = pendingDialogs.get(requestId);
if (!pending) {
throw new Error(`Unknown pending Pi extension input request: ${requestId}`);
}
pendingDialogs.delete(requestId);
pending.resolve(resolvePiDialogAnswer(pending.kind, answers));
},
dispose: () => {
for (const pending of pendingDialogs.values()) {
pending.resolve(undefined);
}
pendingDialogs.clear();
},
};
}
```
Actual implementation should avoid broad `unknown` payloads where the contract can be specific. The snippet is intentionally a shape, not final copy-paste code.
### Slice 4: Bind The Bridge
Extend the Pi session context:
```ts
interface PiSessionContext {
// existing fields...
extensionUiBridge?: PiExtensionUiBridge;
}
```
Then pass it into Pi:
```ts
const extensionUiBridge = makePiExtensionUiBridge({
context: liveContext,
publishRuntimeEvent,
});
liveContext.extensionUiBridge = extensionUiBridge;
await bindPiExtensions({
context: liveContext,
publishRuntimeEvent,
uiContext: extensionUiBridge.uiContext,
});
```
And update `bindPiExtensions`:
```ts
async function bindPiExtensions(input: {
readonly context: PiSessionContext;
readonly publishRuntimeEvent: PiRuntimeEventPublisher;
readonly uiContext: ExtensionUIContext;
}) {
await input.context.session.bindExtensions({
uiContext: input.uiContext,
commandContextActions,
shutdownHandler,
onError: (error) => {
void publishPiExtensionActivity({
context: input.context,
publishRuntimeEvent: input.publishRuntimeEvent,
message: extensionErrorMessage(error),
severity: "error",
detail: error,
});
},
});
}
```
Then `respondToUserInput` becomes real:
```ts
const respondToUserInput: ProviderAdapterShape<ProviderAdapterError>["respondToUserInput"] = (
threadId,
requestId,
answers,
) =>
Effect.gen(function* () {
const context = yield* requireSession(threadId);
const bridge = context.extensionUiBridge;
if (!bridge) {
return yield* new ProviderAdapterRequestError({
provider: PROVIDER,
method: "item/tool/respondToUserInput",
detail: "Pi extension UI bridge is not available for this session.",
});
}
yield* Effect.tryPromise({
try: () => bridge.respond(requestId, answers),
catch: (cause) => toAdapterError(PROVIDER, threadId, "item/tool/respondToUserInput", cause),
});
});
```
### Slice 5: Dynamic Commands, Tools, Providers, And Models
After `bindExtensions`, emit a session config/update event containing extension commands and tool metadata. Existing `session.configured` has `config: UnknownRecordSchema`, so it can carry the first version without a new event type:
```ts
function getPiExtensionConfigSnapshot(session: AgentSession) {
const runner = session.extensionRunner;
return {
extensionPaths: runner.getExtensionPaths(),
slashCommands: runner.getRegisteredCommands().map((command) => ({
name: command.name,
description: command.description,
input: command.input ? { hint: command.input.hint } : undefined,
source: "extension",
sourceInfo: command.sourceInfo,
})),
tools: runner.getAllRegisteredTools().map((tool) => ({
name: tool.definition.name,
description: tool.definition.description,
sourceInfo: tool.sourceInfo,
})),
flags: [...runner.getFlags().keys()],
};
}
```
Publish it:
```ts
await publishRuntimeEvent({
type: "session.configured",
eventId: nextEventId(),
provider: PROVIDER,
providerInstanceId,
threadId: input.threadId,
createdAt: nowIso(),
payload: {
config: {
piExtensions: getPiExtensionConfigSnapshot(session),
},
},
});
```
Then choose one of two UI hydration paths:
1. Preferred: let server provider snapshots refresh for the active Pi instance after session init/reload, so the existing composer reads `selectedProviderStatus.slashCommands`.
2. Faster first pass: store session-scoped `piExtensions.slashCommands` in thread activity/state and merge it into composer menu items only for the active Pi thread.
The preferred end state is provider snapshot refresh, because extension-registered providers/models also need the model picker. The first pass can still use `session.configured` for immediate command hydration.
Model/provider updates:
- After extension binding, call Pi model registry `getAvailable()` again.
- Rebuild Pi models with extension-registered providers included.
- Refresh the active Pi provider instance snapshot.
- The model picker already refreshes providers when opened, so the server side mostly needs an explicit "this instance changed" invalidation path.
### Slice 6: Slash Command Execution Semantics
Current selection behavior fills provider slash commands into the composer:
```ts
// apps/web/src/components/chat/ChatComposer.tsx
if (item.type === "provider-slash-command") {
const replacement = `/${item.command.name} `;
// ...
applyPromptReplacement(...);
}
```
Need split behavior:
- `Tab` fills the highlighted item into the composer.
- `Enter` runs the highlighted provider slash command immediately.
- Clicking a provider command in the command menu runs it immediately with no args.
- If the user typed `/something some text` and submits, T3 passes the full text into Pi. `parsePiSlashCommand` already extracts `name` and raw `args`.
Suggested refactor:
```ts
type ComposerCommandActivation = "fill" | "run";
const onSelectComposerItem = useCallback(
(item: ComposerCommandItem, activation: ComposerCommandActivation = "fill") => {
// path, built-ins, skills keep current fill/open behavior.
if (item.type === "provider-slash-command" && activation === "run") {
const commandText = `/${item.command.name}`;
applyPromptReplacement(trigger.rangeStart, trigger.rangeEnd, "", {
expectedText: snapshot.value.slice(trigger.rangeStart, trigger.rangeEnd),
});
onSendWithPrompt(commandText);
return;
}
if (item.type === "provider-slash-command") {
fillProviderSlashCommand(item);
return;
}
},
[
/* existing deps */
],
);
// key handling
if (key === "Enter" && selectedItem) {
onSelectComposerItem(selectedItem, "run");
return true;
}
if (key === "Tab" && selectedItem) {
onSelectComposerItem(selectedItem, "fill");
return true;
}
```
There may not be a clean `onSendWithPrompt` helper today. If so, add a small internal helper that mirrors the existing submit flow but accepts an override prompt.
Server-side, do not special-case extension commands in `dispatchPiSlashCommand`. Let `AgentSession.prompt(...)` execute registered extension commands immediately. Only built-in T3-handled Pi commands should stay in `dispatchPiSlashCommand`.
### Slice 7: Queued Follow-Up User Messages
Pi `AgentSession.prompt(...)` already knows that extension commands execute immediately even during streaming. Extension calls to `pi.sendUserMessage(...)` can queue follow-ups.
T3 still needs to project those queued/injected user messages:
- Listen to Pi `queue_update` and persist activity for follow-up queue changes.
- Map Pi user `message_start` or `message_end` events into real T3 user messages when the user message was created by Pi, not by T3's original `thread.turn.start`.
- Use a deterministic provider item id or Pi message id if available to avoid duplicates.
- Mark streaming-time injected messages as queued/follow-up immediately in the transcript, then let later Pi events transition naturally when processed.
This is essential for `/yeet`, `/usage`, `/oc`, and `/tx9`, because the user decision is that injected prompts should be normal user messages, not hidden automation.
### Slice 8: Tool Output Projection
Pi `tool_execution_*` events must render text outputs in the UI the same way other providers do.
This includes built-in tool calls such as `read`, `bash`/exec-style command execution, `grep`,
`find`, `ls`, `edit`, and `write`, plus extension-registered tools with text results.
Requirements:
- Continue using canonical `item.started`, `item.updated`, and `item.completed` events.
- Map Pi `bash`/exec-style tools to `itemType: "command_execution"`.
- Map Pi `edit` and `write` to `itemType: "file_change"`.
- Map Pi `read`, `grep`, `find`, `ls`, and extension tools to `itemType: "dynamic_tool_call"`
unless a more precise canonical type exists.
- Put displayable text into `payload.detail` when it should appear in the transcript.
- Keep structured output in `payload.data`, including `rawOutput.stdout`, `rawOutput.stderr`,
`rawOutput.content`, `command`, `exitCode`, and `toolCallId` when available.
- Make sure read-file contents, command stdout/stderr, grep/find/ls output, and extension tool text
are visible without requiring the user to inspect raw JSON.
- For partial output, update the same work-log/tool row by `toolCallId`.
- Reuse existing T3 truncation/collapse behavior for long outputs.
Suggested helper shape:
```ts
function piToolDisplayPayload(event: Extract<AgentSessionEvent, { type: "tool_execution_end" }>) {
const rawOutput = normalizePiToolRawOutput(event.toolName, event.result);
const detail = summarizePiToolDisplayText(event.toolName, rawOutput);
return {
itemType: piToolItemType(event.toolName),
status: event.isError ? "failed" : "completed",
title: piToolTitle(event.toolName),
...(detail ? { detail } : {}),
data: {
toolCallId: event.toolCallId,
toolName: event.toolName,
rawOutput,
},
};
}
```
The important part is that `payload.detail` carries the text the timeline should print, while
`payload.data.rawOutput` keeps the fuller structured result for copy/debug/details views.
### Slice 9: Project-Local Extensions
Pi's loader should already discover:
- Global `~/.pi/agent/extensions`
- Configured extension paths from `settings.json`
- Workspace-local `.pi/extensions`
T3 must ensure session `cwd` is the actual thread workspace/worktree cwd before `createAgentSession` and `bindExtensions`. That makes project-local extension loading automatic and scoped to the active thread.
No extra permission prompt.
### Slice 10: Runtime Version Resolution
The desired resolution order is local Pi home first, then T3's bundled SDK. This likely cannot be solved by only changing imports inside `PiAdapter`, because the session, extension runner, model registry, and type contracts need to come from the same Pi runtime.
Recommended design:
- Add a thin Pi runtime loader module:
```txt
apps/server/src/provider/pi/PiRuntimeResolver.ts
```
- Resolve package candidates:
```ts
const candidates = [
join(agentDir, "node_modules/@mariozechner/pi-coding-agent"),
"@mariozechner/pi-coding-agent",
] as const;
```
- Import the first candidate that works.
- Keep one runtime module per Pi session context.
- Emit `extension.activity` or `config.warning` if local Pi runtime fails and T3 falls back.
Sketch:
```ts
interface PiRuntimeModule {
readonly VERSION: string;
readonly AuthStorage: typeof import("@mariozechner/pi-coding-agent").AuthStorage;
readonly ModelRegistry: typeof import("@mariozechner/pi-coding-agent").ModelRegistry;
readonly SessionManager: typeof import("@mariozechner/pi-coding-agent").SessionManager;
readonly createAgentSession: typeof import("@mariozechner/pi-coding-agent").createAgentSession;
}
async function resolvePiRuntime(agentDir: string | undefined): Promise<{
readonly runtime: PiRuntimeModule;
readonly source: "agent-dir" | "bundled";
readonly warning?: string;
}> {
// Implementation should use dynamic import via pathToFileURL for the agent-dir package.
}
```
This is the riskiest slice because the rest of `PiAdapter.ts` currently imports Pi classes statically. A practical migration is:
1. Land UI bridge against the current bundled SDK.
2. Move Pi imports behind `PiRuntimeResolver`.
3. Verify local `~/.pi/agent` runtime compatibility.
### Slice 11: Web Rendering
Update the existing composer popup rather than creating a separate modal:
- `ComposerPendingUserInputPanel` renders above the composer already.
- Add rendering modes for `inputKind`.
- Add one-line input and textarea draft state to `PendingUserInputDraftAnswer`.
- Preserve current option shortcut behavior for select/confirm.
- For text/textarea, submit button uses the typed value.
Suggested draft type:
```ts
export interface PendingUserInputDraftAnswer {
selectedOptionLabels?: string[];
customAnswer?: string;
textAnswer?: string;
}
```
Then make `resolvePendingUserInputAnswer` branch by `question.inputKind`:
```ts
if (question.inputKind === "text" || question.inputKind === "textarea") {
return normalizeDraftAnswer(draft?.textAnswer ?? draft?.customAnswer);
}
```
For `confirm`, the bridge can encode options as `Yes` and `No` and translate back to boolean, so the existing option UI can be reused.
### Slice 12: Command Menu Surface
Add a Pi extension command menu/action surface near the composer controls. It should:
- Only render for Pi-selected threads.
- Use the hydrated extension command list.
- Click runs the command immediately with no args.
- Keep slash autocomplete for typed args.
- Avoid trying to infer which commands require args.
The command menu is separate from the slash autocomplete menu. It can be a compact menu button with extension command rows.
### Slice 13: Testing Plan
Unit tests:
- `packages/contracts/src/providerRuntime.test.ts`
- decodes `extension.activity`
- decodes `UserInputQuestion` for `select`, `confirm`, `text`, `textarea`
- `apps/server/src/provider/Layers/PiAdapter.test.ts`
- binds extensions with `uiContext`
- `notify` emits `extension.activity`
- extension `onError` emits non-fatal `extension.activity`, not `runtime.error`
- `select/input/editor/confirm` emit `user-input.requested`
- `respondToUserInput` resolves pending Pi dialog
- `custom()` emits `custom ui coming soon`
- Pi `read`, `bash`/exec, `grep`, `find`, `ls`, `edit`, and `write` tool outputs populate
displayable `payload.detail` plus structured `payload.data.rawOutput`
- `apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts`
- `extension.activity` persists as activity and does not set session error
- text/textarea user-input events persist and clear correctly
- Pi tool output activities preserve visible detail text like other providers
- `apps/web/src/session-logic.test.ts`
- derives pending text/textarea prompts
- clears stale pending Pi extension prompts
- derives visible work-log details from Pi `payload.detail` and `data.rawOutput`
- `apps/web/src/pendingUserInput.test.ts`
- resolves text, textarea, select, confirm answers
- `apps/web/src/components/chat/composerSlashCommandSearch.test.ts`
- provider extension commands search/filter correctly
- `apps/web/src/components/chat/ChatComposer.logic.test.ts` or nearest existing composer test
- `Enter` runs provider command
- `Tab` fills provider command
- click command menu item runs command
Manual verification using the user's local extensions:
1. Select a Pi model in a new thread and wait for extension commands to hydrate.
2. Confirm `/yeet`, `/usage`, `/oc`, and `/tx9` appear for Pi only.
3. Run `/yeet` while idle and verify the expanded prompt appears as a normal user message.
4. Run `/tx9` while streaming and verify the injected prompt appears as a queued follow-up user message.
5. Run `/copy-all` and verify notify activity is persisted.
6. Run `/diff` and verify the select popup appears above the composer.
7. Verify `tps-tracker` status updates append individual activity rows.
8. Run `/ephemeral` and verify `custom ui coming soon` appears as UI-only activity.
9. Verify Firecrawl tools are auto-enabled if `FIRECRAWL_API_KEY` is configured in Pi's environment.
10. Verify OpenCode Zen provider registration refreshes the model picker after Pi init.
11. Ask Pi to read a file and verify the read output appears in the transcript tool row.
12. Ask Pi to run a command and verify stdout/stderr appears in the transcript tool row like other
providers.
Required completion commands for code changes:
```bash
bun fmt
bun lint
bun typecheck
```
Do not run `bun test`; use targeted `bun run test ...` if tests are needed.
## Recommended Implementation Order
1. Add `extension.activity` contract and ingestion mapping.
2. Extend user-input question schema and web popup rendering for `text` and `textarea`.
3. Add `PiExtensionUiBridge` and wire `respondToUserInput`.
4. Switch extension `onError` to non-fatal `extension.activity`.
5. Publish session extension config after binding and reload.
6. Hydrate Pi extension commands into slash autocomplete for Pi threads only.
7. Implement `Enter` run versus `Tab` fill for provider slash commands.
8. Add command menu surface that runs commands with no args.
9. Project extension-injected user messages and follow-up queue activity.
10. Project Pi tool text output into visible tool rows for `read`, `bash`/exec, `grep`, `find`,
`ls`, `edit`, `write`, and extension tools.
11. Auto-enable and expose extension tools.
12. Refresh provider/model snapshots for extension-registered providers.
13. Move Pi runtime resolution behind local-agent-dir-first resolver.
## Non-Goals For v1
- Rendering Pi TUI custom components in the browser.
- Full `ctx.ui.setHeader`, `setFooter`, `setEditorComponent`, raw terminal input, or theme mutation parity.
- T3-specific permission prompts for Pi extension execution.
- Guessing which extension commands require args.
- Rewriting existing Pi extensions for T3.
## Later Custom UI Direction
When it is time to support custom components, the likely path is a browser-hosted TUI line renderer:
- Server calls the Pi component factory.
- Server calls `component.render(width)` and sends rendered lines to the browser.
- Browser renders ANSI/text lines in an overlay above the composer or in a modal.
- Browser sends key input back to server.
- Server calls `component.handleInput(data)`.
- `tui.requestRender()` becomes a render-update event.
- `done(value)` resolves the `ctx.ui.custom(...)` promise.
That should unlock `ephemeral` and `pi-mcp` without rewriting them, but it is deliberately not part of the first support layer.
+286
View File
@@ -0,0 +1,286 @@
# Pi Reasoning Work Log Plan
## Goal
Expose Pi provider reasoning in T3 Code using the existing activity/work-log path as a low-risk first pass. This avoids adding a new transcript item model until the behavior is proven.
Pi already maps `thinking_delta` events to provider runtime `content.delta` events with `streamKind: "reasoning_text"` in `apps/server/src/provider/Layers/PiAdapter.ts`:
```ts
if (assistantEvent.type === "thinking_delta") {
return [
{
...makeBaseEvent(context, event),
type: "content.delta",
payload: {
streamKind: "reasoning_text",
delta: assistantEvent.delta,
contentIndex: assistantEvent.contentIndex,
},
},
];
}
```
The missing piece is projecting those provider runtime reasoning deltas into orchestration activities in `apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts`.
## First-pass behavior
- Pi-only.
- Convert `reasoning_text` and `reasoning_summary_text` deltas into throttled `task.progress` activities.
- Store compact text in `payload.summary` for existing work-log labels.
- Store accumulated full text in `payload.detail` for future expandable UI.
- Flush final accumulated reasoning as `task.completed` on turn completion/failure/interruption/cancellation.
- Do not add new contracts yet.
## Implementation steps
### 1. Detect reasoning deltas
Near the existing assistant delta detection in `ProviderRuntimeIngestion.ts`:
```ts
const assistantDelta =
event.type === "content.delta" && event.payload.streamKind === "assistant_text"
? event.payload.delta
: undefined;
```
add:
```ts
const reasoningDelta =
event.type === "content.delta" &&
event.provider === "pi" &&
(event.payload.streamKind === "reasoning_text" ||
event.payload.streamKind === "reasoning_summary_text")
? event.payload.delta
: undefined;
```
Prefer a provider constant/driver id if one exists instead of the string literal `"pi"`.
### 2. Add compact label helper
```ts
function compactReasoningLabel(text: string) {
const normalized = text.replace(/\s+/g, " ").trim();
if (normalized.length === 0) {
return "Reasoning…";
}
if (normalized.length <= 160) {
return normalized;
}
return `${normalized.slice(0, 157)}…`;
}
```
### 3. Buffer reasoning by thread/turn/content index
Avoid one work-log entry per token. Use a small accumulator keyed by thread + turn + content index.
```ts
const reasoningBuffers = new Map<string, string>();
const reasoningLastEmitAt = new Map<string, number>();
const REASONING_ACTIVITY_MIN_INTERVAL_MS = 500;
function reasoningBufferKey(input: {
readonly threadId: ThreadId;
readonly turnId?: TurnId;
readonly contentIndex?: number;
}) {
return `${input.threadId}:${input.turnId ?? "unknown"}:${input.contentIndex ?? 0}`;
}
```
The exact location should match the existing ingestion service state style.
### 4. Dispatch throttled task progress activities
After computing `reasoningDelta`:
```ts
if (reasoningDelta && reasoningDelta.length > 0) {
const turnId = toTurnId(event.turnId);
const key = reasoningBufferKey({
threadId: thread.id,
...(turnId ? { turnId } : {}),
contentIndex: event.payload.contentIndex,
});
const nextText = `${reasoningBuffers.get(key) ?? ""}${reasoningDelta}`;
reasoningBuffers.set(key, nextText);
const nowMs = Date.parse(now);
const lastEmitAt = reasoningLastEmitAt.get(key) ?? 0;
if (nowMs - lastEmitAt >= REASONING_ACTIVITY_MIN_INTERVAL_MS) {
reasoningLastEmitAt.set(key, nowMs);
yield *
orchestrationEngine.dispatch({
type: "thread.activity.append",
commandId: providerCommandId(event, "reasoning-progress"),
threadId: thread.id,
activity: {
id: event.eventId,
tone: "info",
kind: "task.progress",
summary: "Reasoning update",
payload: {
source: "provider.reasoning",
streamKind: event.payload.streamKind,
summary: compactReasoningLabel(nextText),
detail: nextText,
},
turnId: turnId ?? null,
createdAt: now,
},
createdAt: now,
});
}
}
```
If duplicate activity ids become an issue, derive the activity id from the event id plus a suffix or a monotonically increasing sequence used elsewhere in the ingestion layer.
### 5. Flush final reasoning on turn end
On provider turn terminal events, flush buffered reasoning into a final `task.completed` activity.
```ts
if (
event.type === "turn.completed" ||
event.type === "turn.failed" ||
event.type === "turn.cancelled" ||
event.type === "turn.interrupted"
) {
const turnId = toTurnId(event.turnId);
if (turnId) {
yield *
flushReasoningActivity({
event,
threadId: thread.id,
turnId,
createdAt: now,
commandTag: "reasoning-final",
});
}
}
```
Helper shape:
```ts
function* flushReasoningActivity(input: {
readonly event: ProviderRuntimeEvent;
readonly threadId: ThreadId;
readonly turnId: TurnId;
readonly createdAt: IsoDateTime;
readonly commandTag: string;
}) {
const keyPrefix = `${input.threadId}:${input.turnId}:`;
for (const [key, text] of reasoningBuffers) {
if (!key.startsWith(keyPrefix)) continue;
const normalized = text.trim();
if (!normalized) continue;
yield* orchestrationEngine.dispatch({
type: "thread.activity.append",
commandId: providerCommandId(input.event, input.commandTag),
threadId: input.threadId,
activity: {
id: EventId.make(`${input.event.eventId}:reasoning:${key}`),
tone: "info",
kind: "task.completed",
summary: "Reasoning",
payload: {
source: "provider.reasoning",
summary: compactReasoningLabel(normalized),
detail: normalized,
},
turnId: input.turnId,
createdAt: input.createdAt,
},
createdAt: input.createdAt,
});
reasoningBuffers.delete(key);
reasoningLastEmitAt.delete(key);
}
}
```
Adjust branded id construction/imports to match the existing file.
## Tests
Primary file:
```txt
apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts
```
Add tests for:
1. Pi `reasoning_text` delta creates a `task.progress` activity.
2. Activity payload includes `source: "provider.reasoning"`.
3. `payload.summary` contains compacted reasoning text.
4. Non-Pi reasoning deltas are ignored for now.
5. Assistant text streaming still works unchanged.
6. Throttling prevents one activity per tiny delta, if throttling is implemented immediately.
7. Turn terminal event flushes accumulated reasoning as `task.completed`.
Example runtime event shape:
```ts
{
type: "content.delta",
provider: "pi",
eventId: EventId.make("event-reasoning-1"),
threadId: providerThreadId,
turnId: providerTurnId,
createdAt,
payload: {
streamKind: "reasoning_text",
delta: "I need to inspect the project structure first.",
contentIndex: 0,
},
}
```
Expected activity assertion shape:
```ts
expect(activity.kind).toBe("task.progress");
expect(activity.summary).toBe("Reasoning update");
expect(activity.payload).toMatchObject({
source: "provider.reasoning",
streamKind: "reasoning_text",
summary: "I need to inspect the project structure first.",
detail: "I need to inspect the project structure first.",
});
```
## Web UI
No first-pass UI changes should be required. `apps/web/src/session-logic.test.ts` already verifies that work-log task entries use `payload.summary` as the label.
Manual verification should confirm that activities with this shape render in the work log:
```ts
{
kind: "task.progress",
payload: {
summary: "...",
},
}
```
Later improvements can add expandable reasoning details, first-class reasoning transcript items, or a dedicated `thread.activity.update` command to replace append/throttle behavior.
+389
View File
@@ -0,0 +1,389 @@
# Pi
This is the T3 Code reference for Pi provider behavior and Pi extension compatibility.
The implementation roadmap lives in
[`docs/implementation-plans/pi-extension-support.md`](../implementation-plans/pi-extension-support.md).
This provider doc is the source of truth for the Pi extension API mapping: when an extension calls a
Pi function, this file says how T3 should handle it.
## Runtime Model
T3 Code should host Pi through the Pi SDK, not by translating extension TypeScript. The extension
code stays Pi-shaped. T3 provides compatible runtime objects and projects extension effects into T3
provider runtime events, orchestration activity, composer UI, and provider/model state.
Runtime resolution preference:
1. Use `~/.pi/agent/node_modules/@mariozechner/pi-coding-agent` when available.
2. Fall back to T3's bundled `@mariozechner/pi-coding-agent`.
3. Persist a visible warning if neither runtime can load.
Extension discovery should match Pi:
- global `~/.pi/agent/extensions`
- extension paths configured by Pi settings
- workspace-local `.pi/extensions`
Project-local extensions always run for Pi sessions. T3 does not add a separate permission prompt
for Pi extensions. Pi extension shell execution uses Pi's permission model, not T3's approval model.
## Mapping Status
The tables below use these status labels:
- `v1`: planned for the first T3 Pi extension support layer.
- `native`: Pi SDK already owns the behavior. T3 should avoid reimplementing it.
- `project`: Pi SDK owns the behavior, but T3 should project visible state into the UI.
- `degrade`: accept the call but persist a UI-only activity/warning or return a safe fallback.
- `future`: intentionally not handled in v1.
- `internal`: available to extensions, but no T3-facing behavior is needed.
Persisted extension activity and Pi panel state are UI-only history. They must not be included in
future model context.
## Pi Runtime Panel
When the selected provider is Pi, T3 renders a small Pi panel from the composer. The panel is not a
second chat interface and does not replace T3's composer. It is the home for Pi's TUI-adjacent
surfaces: header, footer, status, widgets, extension inventory, and diagnostics.
The panel has three tabs:
- `Home`: the Pi TUI projection. It contains header state, keyed status rows, working message,
string widgets, title metadata, and footer state.
- `Extensions`: loaded extension paths, registered extension tools/commands/providers when known,
and Pi skills. Slash commands still belong in `/` autocomplete, not in a separate commands tab.
- `Logs`: Pi diagnostics and extension lifecycle messages. High-frequency hook failures are deduped
here and hidden from the normal Work Log.
The open panel has a fixed maximum height inside the composer. Its tab body owns scrolling, so long
extension or skill lists never resize the composer surface after the panel is opened.
Closed state:
- The closed Pi button may show one compact status summary, for example
`Pi · tps 42 tok/s`, sourced from `ctx.ui.setStatus(...)`.
- Warning/error counts are T3 diagnostics and should appear as a quiet badge, not inline status copy.
Pi TUI surface mapping:
| Pi TUI surface | T3 panel section | Pi function source |
| -------------- | ---------------- | ----------------------------------------------------------------------------------- |
| Header | `Home` header | `ctx.ui.setHeader(...)`; fallback from title/session/git metadata when available. |
| Input | T3 composer | T3 keeps its own composer. Pi input prompts render above the composer when pending. |
| Body widgets | `Home` widgets | `ctx.ui.setWidget(...)`; string widgets render, component widgets degrade in v1. |
| Status/footer | `Home` status | `ctx.ui.setStatus(...)` and `ctx.ui.setWorkingMessage(...)`. |
| Footer | `Home` footer | `ctx.ui.setFooter(...)`; fallback from cwd, branch, model, usage, and context. |
| Logs | `Logs` | extension load/reload messages, `bindExtensions({ onError })`, degraded UI calls. |
Implementation rules:
- `ctx.ui.setStatus(...)`, `ctx.ui.setWorkingMessage(...)`, `ctx.ui.setTitle(...)`, and
`ctx.ui.setWidget(...)` update keyed Pi panel state. They do not append normal Work Log rows.
- Before a Pi session emits per-thread activity, T3 should seed the panel from the provider snapshot:
static extension paths, extension tools, extension slash commands, Pi skills, and available Pi
models. Live `pi.extension.configured` activity replaces this once the session is bound.
- `ctx.ui.notify(...)` remains user-visible activity when appropriate, and may also be mirrored in
Pi logs.
- Extension hook errors are non-fatal diagnostics. They are deduped by extension path, hook event,
and error message, then displayed in the Pi `Logs` tab instead of the normal Work Log.
- Repeated diagnostics should publish the first occurrence and occasional count updates, not one row
per failure.
- Unsupported custom TUI components should create a restrained placeholder in the relevant Pi panel
surface and a diagnostic log entry. They should not throw or hang the extension.
- T3 should strip terminal ANSI sequences before rendering Pi panel text in the browser.
## `ctx.ui` Mapping
| Pi extension key | T3 status | T3 handling |
| -------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctx.ui.select(title, options, opts)` | `v1` | Emit `user-input.requested` with `inputKind: "select"` and render a popup above the composer. Resolve with the selected option string or `undefined`. |
| `ctx.ui.confirm(title, message, opts)` | `v1` | Emit `user-input.requested` with `inputKind: "confirm"` and render a popup above the composer. Resolve `true` or `false`. |
| `ctx.ui.input(title, placeholder, opts)` | `v1` | Emit `user-input.requested` with `inputKind: "text"`. Resolve with submitted text or `undefined`. |
| `ctx.ui.editor(title, prefill)` | `v1` | Emit `user-input.requested` with `inputKind: "textarea"`. Resolve with submitted text or `undefined`. |
| `ctx.ui.notify(message, type)` | `v1` | Persist `extension.activity` with `activityType: "notify"` and severity from `type`. No toast-only behavior. |
| `ctx.ui.setStatus(key, text)` | `v1` | Update keyed Pi panel status state. If `text` is omitted, clear that status key. High-frequency updates should be throttled/deduped. |
| `ctx.ui.setWorkingMessage(message)` | `v1` | Update the Pi panel working/status row. If omitted, clear the custom working message. |
| `ctx.ui.setWidget(key, stringLines, options)` | `v1` | Update keyed Pi panel widget state with string lines and placement metadata. |
| `ctx.ui.setWidget(key, componentFactory, options)` | `degrade` | Update a Pi panel widget placeholder and emit a diagnostic. Do not render the component in v1. |
| `ctx.ui.setTitle(title)` | `v1` | Update Pi panel title/header metadata. Do not change browser title in v1. |
| `ctx.ui.custom(factory, options)` | `degrade` | Emit a Pi panel diagnostic and resolve as unsupported/cancelled so the extension does not hang. |
| `ctx.ui.pasteToEditor(text)` | `degrade` | Update internal editor text state and emit a Pi panel diagnostic in v1. Future work can mutate the composer. |
| `ctx.ui.setEditorText(text)` | `degrade` | Update internal editor text state and emit a Pi panel diagnostic in v1. Future work can mutate the composer. |
| `ctx.ui.getEditorText()` | `degrade` | Return `""` in v1. Future work can request current composer text from the client. |
| `ctx.ui.onTerminalInput(handler)` | `future` | Return an unsubscribe no-op. Optional one-time activity warning if an extension registers this. |
| `ctx.ui.setWorkingVisible(visible)` | `future` | No-op in v1. Optional UI-only activity for visibility changes. |
| `ctx.ui.setWorkingIndicator(options)` | `future` | No-op in v1. |
| `ctx.ui.setHiddenThinkingLabel(label)` | `future` | No-op in v1. Future mapping can alter reasoning block labels. |
| `ctx.ui.setFooter(factory)` | `degrade` | Update Pi panel footer placeholder state and emit a diagnostic when a custom factory is provided. |
| `ctx.ui.setHeader(factory)` | `degrade` | Update Pi panel header placeholder state and emit a diagnostic when a custom factory is provided. |
| `ctx.ui.addAutocompleteProvider(factory)` | `future` | No-op in v1. Future mapping can compose into T3 composer autocomplete. |
| `ctx.ui.setEditorComponent(factory)` | `future` | No-op in v1. |
| `ctx.ui.getEditorComponent()` | `future` | Return `undefined` in v1. |
| `ctx.ui.theme` | `degrade` | Return a stable fallback Pi-compatible theme object. Do not bind to T3 theme mutation in v1. |
| `ctx.ui.getAllThemes()` | `future` | Return `[]` in v1. |
| `ctx.ui.getTheme(name)` | `future` | Return `undefined` in v1. |
| `ctx.ui.setTheme(theme)` | `future` | Return `{ success: false, error }` and persist an unsupported activity if useful. |
| `ctx.ui.getToolsExpanded()` | `future` | Return `false` in v1. |
| `ctx.ui.setToolsExpanded(expanded)` | `future` | No-op in v1. |
T3 should set `ctx.hasUI === true` once this bridge exists. The UI is real for dialogs,
notifications, status, and text widgets, even though custom TUI components are degraded.
## `ctx` Mapping
| Pi extension key | T3 status | T3 handling |
| -------------------------- | --------- | ------------------------------------------------------------------------------------------------- |
| `ctx.ui` | `v1` | Use the T3 `PiExtensionUiBridge` described above. |
| `ctx.hasUI` | `v1` | Return `true` after bridge installation. |
| `ctx.cwd` | `native` | Comes from the Pi session cwd. Must be the thread workspace/worktree cwd. |
| `ctx.sessionManager` | `native` | Expose Pi's read-only session manager. T3 should not wrap in v1. |
| `ctx.modelRegistry` | `native` | Expose Pi model registry. T3 refreshes provider snapshots after extension provider/model changes. |
| `ctx.model` | `native` | Current Pi model. |
| `ctx.isIdle()` | `native` | Delegate to Pi agent state. |
| `ctx.signal` | `native` | Current Pi abort signal when streaming. |
| `ctx.abort()` | `native` | Abort current Pi operation. T3 should project the resulting turn/session events. |
| `ctx.hasPendingMessages()` | `project` | Delegate to Pi. T3 should project queue/follow-up state for visibility. |
| `ctx.shutdown()` | `degrade` | Persist a warning. Do not let extensions quit T3 in v1. |
| `ctx.getContextUsage()` | `native` | Delegate to Pi. Future work can project into T3 context meter if needed. |
| `ctx.compact(options)` | `project` | Delegate to Pi compaction. T3 should project compaction start/end activity and thread state. |
| `ctx.getSystemPrompt()` | `native` | Delegate to Pi. No T3 UI behavior. |
## Command `ctx` Mapping
These methods exist on `ExtensionCommandContext`, which command handlers receive.
| Pi extension key | T3 status | T3 handling |
| ----------------------------------------- | --------- | -------------------------------------------------------------------------------------------- |
| `ctx.waitForIdle()` | `native` | Delegate to `session.agent.waitForIdle()`. |
| `ctx.reload()` | `v1` | Delegate to `session.reload()`, then republish extension command/tool/provider config to T3. |
| `ctx.newSession(options)` | `future` | Persist warning and return `{ cancelled: true }` in v1. |
| `ctx.fork(entryId, options)` | `future` | Persist warning and return `{ cancelled: true }` in v1. |
| `ctx.navigateTree(targetId, options)` | `future` | Persist warning and return `{ cancelled: true }` in v1. |
| `ctx.switchSession(sessionPath, options)` | `future` | Persist warning and return `{ cancelled: true }` in v1. |
`ReplacedSessionContext.sendMessage(...)` and `ReplacedSessionContext.sendUserMessage(...)` only
matter after new-session/fork/switch support exists. Until then, the replacement-session path should
not be reachable.
## `pi` Factory API Mapping
This is the API passed to extension factories as `pi`.
| Pi extension key | T3 status | T3 handling |
| -------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `pi.registerTool(tool)` | `v1` | Let Pi register and execute the tool. Auto-enable extension tools. Publish tool metadata to T3 after init/reload. |
| `pi.registerCommand(name, options)` | `v1` | Let Pi register the command. Hydrate into T3 slash autocomplete for Pi threads only. |
| `pi.registerShortcut(shortcut, options)` | `future` | Registration may succeed inside Pi, but T3 does not bind shortcuts in v1. Optionally publish unsupported shortcut diagnostics. |
| `pi.registerFlag(name, options)` | `degrade` | Defaults exist inside Pi. T3 has no per-session CLI flag input in v1. |
| `pi.getFlag(name)` | `degrade` | Return Pi's current flag/default value. User-provided flag values are future work. |
| `pi.registerMessageRenderer(customType, renderer)` | `future` | Registration may succeed, but T3 does not render custom Pi message components in v1. Use fallback activity/message rendering. |
| `pi.sendMessage(message, options)` | `future` | Pi can persist custom messages. T3 should add fallback projection later. |
| `pi.sendUserMessage(content, options)` | `v1` | Project as a normal user message. If streaming, show immediately as queued follow-up and let Pi process it later. |
| `pi.appendEntry(customType, data)` | `native` | Pi session persistence only. No T3 UI projection in v1 unless paired with custom-message support. |
| `pi.setSessionName(name)` | `v1` | Project Pi `session_info_changed` to T3 `thread.metadata.updated`. |
| `pi.getSessionName()` | `native` | Delegate to Pi session manager. |
| `pi.setLabel(entryId, label)` | `future` | Pi-native label persistence. No T3 tree/label UI in v1. |
| `pi.exec(command, args, options)` | `native` | Execute with Pi permissions/environment. T3 should not route through approval prompts. Optional future activity projection. |
| `pi.getActiveTools()` | `v1` | Delegate to Pi and expose through T3 tools UI/state when available. |
| `pi.getAllTools()` | `v1` | Delegate to Pi. Publish tool metadata after init/reload. |
| `pi.setActiveTools(toolNames)` | `v1` | Delegate to Pi. Project active tool state if T3 has a tools UI. |
| `pi.getCommands()` | `v1` | Delegate to Pi. Used to hydrate slash autocomplete/menu. |
| `pi.setModel(model)` | `v1` | Delegate to Pi. Refresh T3 model picker/provider snapshot. |
| `pi.getThinkingLevel()` | `native` | Delegate to Pi. |
| `pi.setThinkingLevel(level)` | `project` | Delegate to Pi. Project thinking-level changes where T3 exposes model options. |
| `pi.registerProvider(name, config)` | `v1` | Delegate to Pi model registry. Refresh T3 model picker/provider snapshot after init/reload. Auth prompts use the same extension input popup. |
| `pi.unregisterProvider(name)` | `v1` | Delegate to Pi and refresh T3 provider snapshot. |
| `pi.events` | `internal` | Pi extension-to-extension event bus. No T3 bridge needed in v1. |
## `pi.on(...)` Event Mapping
All event handlers are registered through `pi.on(eventName, handler)`.
| Event key | T3 status | T3 handling |
| ------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `resources_discover` | `project` | Pi loads returned skill/prompt/theme paths. T3 republishes session config after startup/reload. |
| `session_start` | `native` | Pi emits during startup/resume/reload/new/fork. T3 projects config after handlers run. |
| `session_before_switch` | `future` | Only meaningful once T3 supports Pi session switching. |
| `session_before_fork` | `future` | Only meaningful once T3 supports Pi forking. |
| `session_before_compact` | `native` | Pi compaction honors handler result. T3 should project compaction activity. |
| `session_compact` | `project` | Pi-native. Project activity/thread state. |
| `session_shutdown` | `native` | Pi emits on reload/teardown. T3 should dispose bridge and pending dialogs. |
| `session_before_tree` | `future` | Only meaningful once T3 supports Pi session tree navigation. |
| `session_tree` | `future` | Only meaningful once T3 supports Pi session tree navigation. |
| `context` | `native` | Pi lets extensions modify messages before provider call. T3 should not duplicate this logic. |
| `before_provider_request` | `native` | Pi lets extensions replace provider payload. T3 should not inspect sensitive payloads unless needed for debugging. |
| `after_provider_response` | `native` | Pi emits after provider response. T3 no special behavior in v1. |
| `before_agent_start` | `native` | Pi can inject custom messages or replace system prompt. T3 should project any visible custom messages later. |
| `agent_start` | `project` | Pi-native. T3 can persist status/activity if useful. |
| `agent_end` | `project` | Pi-native. T3 can persist status/activity if useful. |
| `turn_start` | `project` | Pi-native. T3 already owns canonical turn start for user sends. Use carefully to avoid duplicates. |
| `turn_end` | `project` | Pi-native. T3 should project completion/usage where available. |
| `message_start` | `project` | Needed for extension-injected user messages and custom messages. |
| `message_update` | `project` | T3 already maps assistant text/reasoning deltas. |
| `message_end` | `project` | Needed to finalize projected assistant/user/custom messages. |
| `tool_execution_start` | `project` | T3 maps to `item.started`. Include enough display data for the same tool row UI used by other providers. |
| `tool_execution_update` | `project` | T3 maps to `item.updated`. Streaming/partial text output must be visible in the tool row when Pi provides it. |
| `tool_execution_end` | `project` | T3 maps to `item.completed`. Final text output must be visible in the tool row, not hidden only in raw `data`. |
| `model_select` | `project` | Project to provider/model state and model picker. |
| `thinking_level_select` | `project` | Project to model option state if visible. |
| `tool_call` | `native` | Pi allows blocking or mutating tool input. T3 should not revalidate mutated args. |
| `tool_result` | `native` | Pi allows modifying tool results. T3 projects final tool lifecycle after Pi modifications. |
| `user_bash` | `future` | Only meaningful if T3 exposes Pi `!`/`!!` user bash input. |
| `input` | `native` | Pi transforms or handles user input before agent processing. T3 should call `session.prompt(...)` so this hook runs. |
## Tool Definition Mapping
Extension tools are registered through `pi.registerTool(tool)`.
| Tool definition key | T3 status | T3 handling |
| --------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------- |
| `tool.name` | `v1` | Publish as extension tool metadata and use in T3 tool lifecycle rows. |
| `tool.label` | `v1` | Use as display label when available. |
| `tool.description` | `v1` | Publish in tool metadata and tools UI. |
| `tool.promptSnippet` | `native` | Pi uses it in the system prompt when tool is active. |
| `tool.promptGuidelines` | `native` | Pi uses it in the system prompt when tool is active. |
| `tool.parameters` | `native` | Pi validates and exposes schema to the model. T3 may display later. |
| `tool.renderShell` | `future` | Pi TUI rendering hint. T3 can ignore in v1. |
| `tool.prepareArguments(args)` | `native` | Pi calls before schema validation. |
| `tool.executionMode` | `native` | Pi controls sequential/parallel execution. |
| `tool.execute(toolCallId, params, signal, onUpdate, ctx)` | `native` | Pi executes with extension `ctx`. T3 projects tool lifecycle events emitted by Pi. |
| `tool.renderCall(args, theme, context)` | `future` | Custom TUI component rendering. T3 falls back to generic tool call display in v1. |
| `tool.renderResult(result, options, theme, context)` | `future` | Custom TUI component rendering. T3 falls back to generic tool result display in v1. |
## Tool Output Projection
Pi tool execution events must render like tool calls from the other providers. This is especially
important for built-in tool families such as `read`, `bash`/command execution, `grep`, `find`, `ls`,
`edit`, `write`, and extension tools that return text.
Mapping requirements:
- Use canonical `item.started`, `item.updated`, and `item.completed` events.
- Use `itemType: "command_execution"` for Pi `bash`/exec-style commands.
- Use `itemType: "file_change"` for Pi `edit` and `write`.
- Use `itemType: "dynamic_tool_call"` for Pi `read`, `grep`, `find`, `ls`, and extension tools
unless a more specific canonical type exists later.
- Put human-readable stdout/file contents/result previews into `payload.detail` when they should be
shown in the transcript.
- Keep structured/raw tool result data in `payload.data`, including `data.rawOutput.stdout`,
`data.rawOutput.stderr`, `data.rawOutput.content`, command, exit code, and tool call id when
available.
- Do not make the UI depend on opening raw JSON to see command output or read-file contents.
- Reuse the same truncation, collapse, and copy behavior used by existing T3 tool rows.
- For partial output, update the same tool row by `toolCallId`; do not append unrelated activity
entries for each chunk unless Pi emitted a separate tool execution.
## Event Result Mapping
Some `pi.on(...)` handlers return values that Pi consumes. T3 should let the Pi SDK own these
semantics and only project visible outcomes.
| Handler result key | T3 status | T3 handling |
| -------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------- |
| `resources_discover -> { skillPaths, promptPaths, themePaths }` | `native` | Pi extends its resources. T3 republishes refreshed config after startup/reload. |
| `context -> { messages }` | `native` | Pi replaces/augments context messages before the provider call. Do not include extension activity rows in this context. |
| `before_provider_request -> payload` | `native` | Pi replaces provider request payload. T3 should avoid logging raw provider payloads. |
| `before_agent_start -> { message }` | `project` | Pi can inject a custom message. T3 custom-message projection is future work unless it becomes a normal user message. |
| `before_agent_start -> { systemPrompt }` | `native` | Pi replaces/chains system prompt. T3 does not need to mirror prompt text. |
| `message_end -> { message }` | `native` | Pi replaces finalized message. T3 should project the final message after Pi modifications. |
| `tool_call -> { block, reason }` | `native` | Pi blocks tool execution. T3 should project final tool lifecycle/error if emitted by Pi. |
| `tool_result -> { content, details, isError }` | `native` | Pi modifies final tool result. T3 should project the modified result. |
| `user_bash -> { operations }` | `future` | Only needed if T3 exposes Pi `!`/`!!` user bash. |
| `user_bash -> { result }` | `future` | Only needed if T3 exposes Pi `!`/`!!` user bash. |
| `input -> { action: "continue" }` | `native` | Pi proceeds with the original input. |
| `input -> { action: "transform", text, images }` | `native` | Pi proceeds with transformed input. T3 should project the final user-visible message carefully to avoid duplicates. |
| `input -> { action: "handled" }` | `native` | Pi treats input as handled by extension. T3 should avoid starting a duplicate assistant turn. |
| `session_before_switch -> { cancel }` | `future` | Session switching is not v1. |
| `session_before_fork -> { cancel, skipConversationRestore }` | `future` | Session forking is not v1. |
| `session_before_tree -> { cancel, summary, customInstructions, replaceInstructions, label }` | `future` | Session tree navigation is not v1. |
| `session_before_compact -> { cancel, compaction }` | `native` | Pi compaction honors this. T3 projects compaction activity. |
## Importable Extension Helpers
These helpers can be imported from `@mariozechner/pi-coding-agent` by extension code. They are not
`ctx` methods, but they are part of the extension authoring surface.
| Helper key | T3 status | T3 handling |
| -------------------------------------- | ---------- | ------------------------------------------------------------------------------------------ |
| `defineTool(tool)` | `native` | Type/inference helper for extension authors. No T3 runtime behavior. |
| `isToolCallEventType(toolName, event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isBashToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isReadToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isEditToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isWriteToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isGrepToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isFindToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `isLsToolResult(event)` | `native` | Type guard helper. No T3 runtime behavior. |
| `createExtensionRuntime()` | `internal` | Pi loader/runtime helper. T3 may use internally, but normal extensions should not need it. |
| `discoverAndLoadExtensions(...)` | `internal` | Pi loader helper. T3 may use through Pi SDK/session creation. |
| `loadExtensionFromFactory(...)` | `internal` | Pi loader helper. No direct T3 bridge behavior. |
| `loadExtensions(...)` | `internal` | Pi loader helper. No direct T3 bridge behavior. |
| `ExtensionRunner` | `internal` | Pi runtime class. T3 interacts with it through `AgentSession.extensionRunner`. |
| `wrapRegisteredTool(...)` | `internal` | Pi wrapper helper. No direct T3 bridge behavior. |
| `wrapRegisteredTools(...)` | `internal` | Pi wrapper helper. No direct T3 bridge behavior. |
## Slash Command Behavior
Extension commands should appear only when the selected provider/model is Pi.
Hydration can happen after Pi session init. The composer may show a slight delay before extension
commands arrive.
Interaction rules:
- Typing `/command arg text` sends the raw input to Pi. Pi parses the command and receives
`arg text`.
- `Enter` on a highlighted provider slash command runs it immediately.
- `Tab` on a highlighted provider slash command fills it into the composer.
- Clicking a provider command in the menu runs it immediately with no args.
- Commands run immediately even while a turn is streaming. Extensions decide whether to wait,
queue, follow up, warn, or fail.
## User Input Behavior
Pi dialog answers are internal extension state. T3 does not automatically persist a user message for
an input answer.
If the extension uses the answer in TypeScript only, no user message is added. If the extension calls
`pi.sendUserMessage(...)`, that injected prompt is persisted as a normal user message.
## Error Behavior
Extension errors are non-fatal by default.
T3 should persist Pi diagnostics for extension hook/command errors, then continue the session. Do
not map extension hook/command errors to `runtime.error` unless the Pi session itself crashes.
Diagnostics belong in the Pi panel `Logs` tab by default. The normal Work Log should only show
extension errors when they are directly user-actionable and intentionally marked for the main
surface. High-frequency hooks such as `message_update` must be deduped and suppressed after the
first visible diagnostic.
## Current Local Extension Coverage
The user's current Pi home exercises these v1 surfaces:
- `/yeet`, `/usage`, `/oc`, `/tx9`: command hydration and `pi.sendUserMessage(...)`.
- `/copy-all`: command execution, `waitForIdle`, `notify`.
- `/diff`: command execution, `pi.exec`, `select`, `notify`.
- `tps-tracker`: frequent `setStatus` and final `notify`.
- `firecrawl-search`: extension tools `search` and `scrape`.
- `pi-mcp`: commands, tool registration, status, auth/input prompts, custom UI fallback.
- `opencode-zen-login`: provider registration and auth/input prompts.
- `/ephemeral`: custom UI fallback with `custom ui coming soon`.
## Future Custom UI Direction
The later custom UI layer should host Pi TUI-style components instead of rewriting them:
1. Server calls the component factory.
2. Server calls `component.render(width)`.
3. Browser renders ANSI/text lines.
4. Browser sends key input back to the server.
5. Server calls `component.handleInput(data)`.
6. `tui.requestRender()` emits a render update.
7. `done(value)` resolves the original `ctx.ui.custom(...)` promise.
That future layer should unlock custom overlays like `/ephemeral` and the Pi MCP panel.
+1
View File
@@ -11,6 +11,7 @@ export * from "./model.ts";
export * from "./keybindings.ts";
export * from "./server.ts";
export * from "./settings.ts";
export * from "./theme.ts";
export * from "./git.ts";
export * from "./vcs.ts";
export * from "./sourceControl.ts";
+11
View File
@@ -68,6 +68,13 @@ import type { AdvertisedEndpoint } from "./remoteAccess.ts";
import { EditorId } from "./editor.ts";
import type { ExecutionEnvironmentDescriptor } from "./environment.ts";
import type { ClientSettings, ServerSettings, ServerSettingsPatch } from "./settings.ts";
import type {
DesktopWindowThemeColors,
DiscoveredColorTheme,
EditorThemePreference,
ResolvedColorTheme,
ThemeId,
} from "./theme.ts";
import type {
SourceControlCloneRepositoryInput,
SourceControlCloneRepositoryResult,
@@ -241,7 +248,11 @@ export interface DesktopBridge {
getAdvertisedEndpoints: () => Promise<readonly AdvertisedEndpoint[]>;
pickFolder: (options?: PickFolderOptions) => Promise<string | null>;
confirm: (message: string) => Promise<boolean>;
discoverColorThemes: () => Promise<readonly DiscoveredColorTheme[]>;
loadColorTheme: (themeId: ThemeId) => Promise<ResolvedColorTheme | null>;
getEditorThemePreferences: () => Promise<readonly EditorThemePreference[]>;
setTheme: (theme: DesktopTheme) => Promise<void>;
setWindowThemeColors: (input: DesktopWindowThemeColors) => Promise<void>;
showContextMenu: <T extends string>(
items: readonly ContextMenuItem<T>[],
position?: { x: number; y: number },
+5
View File
@@ -129,6 +129,7 @@ const CODEX_DRIVER_KIND = ProviderDriverKind.make("codex");
const CLAUDE_DRIVER_KIND = ProviderDriverKind.make("claudeAgent");
const CURSOR_DRIVER_KIND = ProviderDriverKind.make("cursor");
const OPENCODE_DRIVER_KIND = ProviderDriverKind.make("opencode");
const PI_DRIVER_KIND = ProviderDriverKind.make("pi");
export const DEFAULT_MODEL = "gpt-5.4";
export const DEFAULT_GIT_TEXT_GENERATION_MODEL = "gpt-5.4-mini";
@@ -138,6 +139,7 @@ export const DEFAULT_MODEL_BY_PROVIDER: Partial<Record<ProviderDriverKind, strin
[CLAUDE_DRIVER_KIND]: "claude-sonnet-4-6",
[CURSOR_DRIVER_KIND]: "auto",
[OPENCODE_DRIVER_KIND]: "openai/gpt-5",
[PI_DRIVER_KIND]: "auto",
};
/** Per-provider text generation model defaults. */
@@ -148,6 +150,7 @@ export const DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER: Partial<
[CLAUDE_DRIVER_KIND]: "claude-haiku-4-5",
[CURSOR_DRIVER_KIND]: "composer-2",
[OPENCODE_DRIVER_KIND]: "openai/gpt-5",
[PI_DRIVER_KIND]: "auto",
};
export const MODEL_SLUG_ALIASES_BY_PROVIDER: Partial<
@@ -189,6 +192,7 @@ export const MODEL_SLUG_ALIASES_BY_PROVIDER: Partial<
"opus-4.5": "claude-opus-4-5",
},
[OPENCODE_DRIVER_KIND]: {},
[PI_DRIVER_KIND]: {},
};
// ── Provider display names ────────────────────────────────────────────
@@ -198,4 +202,5 @@ export const PROVIDER_DISPLAY_NAMES: Partial<Record<ProviderDriverKind, string>>
[CLAUDE_DRIVER_KIND]: "Claude",
[CURSOR_DRIVER_KIND]: "Cursor",
[OPENCODE_DRIVER_KIND]: "OpenCode",
[PI_DRIVER_KIND]: "Pi",
};
@@ -107,6 +107,187 @@ describe("ProviderRuntimeEvent", () => {
expect(parsed.payload.questions[0]?.options).toHaveLength(2);
});
it("decodes Pi text and textarea user-input questions without options", () => {
const parsed = decodeRuntimeEvent({
type: "user-input.requested",
eventId: "event-pi-input-1",
provider: "pi",
createdAt: "2026-02-28T00:00:01.000Z",
threadId: "thread-2",
requestId: "request-1",
payload: {
questions: [
{
id: "token",
header: "Token",
question: "Enter token",
inputKind: "text",
options: [],
placeholder: "sk-...",
},
{
id: "notes",
header: "Notes",
question: "Edit notes",
inputKind: "textarea",
options: [],
prefill: "Existing notes",
},
],
},
});
expect(parsed.type).toBe("user-input.requested");
if (parsed.type !== "user-input.requested") {
throw new Error("expected user-input.requested");
}
expect(parsed.payload.questions[0]?.options).toEqual([]);
expect(parsed.payload.questions[1]?.prefill).toBe("Existing notes");
});
it("decodes non-fatal extension activity events", () => {
const parsed = decodeRuntimeEvent({
type: "extension.activity",
eventId: "event-pi-activity-1",
provider: "pi",
createdAt: "2026-02-28T00:00:01.000Z",
threadId: "thread-2",
payload: {
source: "pi.extension.ui",
activityType: "notify",
message: "Copied thread",
severity: "info",
uiOnly: true,
},
});
expect(parsed.type).toBe("extension.activity");
if (parsed.type !== "extension.activity") {
throw new Error("expected extension.activity");
}
expect(parsed.payload.uiOnly).toBe(true);
});
it("decodes Pi panel state updates", () => {
const parsed = decodeRuntimeEvent({
type: "pi.ui.state.updated",
eventId: "event-pi-ui-1",
provider: "pi",
createdAt: "2026-02-28T00:00:01.000Z",
threadId: "thread-2",
payload: {
source: "pi.extension.ui",
surface: "status",
key: "tps",
label: "tps",
text: "42 tok/s",
state: "set",
uiOnly: true,
},
});
expect(parsed.type).toBe("pi.ui.state.updated");
if (parsed.type !== "pi.ui.state.updated") {
throw new Error("expected pi.ui.state.updated");
}
expect(parsed.payload.state).toBe("set");
expect(parsed.payload.uiOnly).toBe(true);
});
it("decodes Pi extension configured snapshots", () => {
const parsed = decodeRuntimeEvent({
type: "pi.extension.configured",
eventId: "event-pi-config-1",
provider: "pi",
createdAt: "2026-02-28T00:00:01.000Z",
threadId: "thread-2",
payload: {
source: "pi.extension",
extensionPaths: ["/Users/davis/.pi/agent/extensions/tps-tracker.ts"],
slashCommands: [
{
name: "usage",
description: "Show usage",
source: "extension",
sourceInfo: { path: "/Users/davis/.pi/agent/extensions/tps-tracker.ts" },
},
],
tools: [
{
name: "search",
description: "Search",
sourceInfo: { path: "/Users/davis/.pi/agent/extensions/tps-tracker.ts" },
},
],
flags: ["verbose"],
models: [{ slug: "extension/model", name: "Extension Model" }],
},
});
expect(parsed.type).toBe("pi.extension.configured");
if (parsed.type !== "pi.extension.configured") {
throw new Error("expected pi.extension.configured");
}
expect(parsed.payload.slashCommands[0]?.name).toBe("usage");
expect(parsed.payload.tools[0]?.sourceInfo).toEqual({
path: "/Users/davis/.pi/agent/extensions/tps-tracker.ts",
});
});
it("rejects non-JSON Pi extension configured metadata", () => {
expect(() =>
decodeRuntimeEvent({
type: "pi.extension.configured",
eventId: "event-pi-config-unsafe-1",
provider: "pi",
createdAt: "2026-02-28T00:00:01.000Z",
threadId: "thread-2",
payload: {
source: "pi.extension",
extensionPaths: ["/Users/davis/.pi/agent/extensions/pi-mcp/src/index.ts"],
slashCommands: [],
tools: [
{
name: "search",
sourceInfo: {
path: "/Users/davis/.pi/agent/extensions/pi-mcp/src/index.ts",
baseDir: undefined,
},
},
],
flags: [],
},
}),
).toThrow();
});
it("decodes Pi extension diagnostics with repeat counts", () => {
const parsed = decodeRuntimeEvent({
type: "pi.extension.diagnostic",
eventId: "event-pi-diagnostic-1",
provider: "pi",
createdAt: "2026-02-28T00:00:01.000Z",
threadId: "thread-2",
payload: {
source: "pi.extension",
message: "tps-tracker.ts failed during message_update",
severity: "error",
visibility: "pi-panel",
event: "message_update",
diagnosticKey: "tps-tracker :: message_update :: theme.fg is not a function",
repeatCount: 100,
hiddenCount: 99,
},
});
expect(parsed.type).toBe("pi.extension.diagnostic");
if (parsed.type !== "pi.extension.diagnostic") {
throw new Error("expected pi.extension.diagnostic");
}
expect(parsed.payload.visibility).toBe("pi-panel");
expect(parsed.payload.hiddenCount).toBe(99);
});
it("decodes user-input.resolved with answer map", () => {
const parsed = decodeRuntimeEvent({
type: "user-input.resolved",
+146 -1
View File
@@ -25,6 +25,7 @@ const RuntimeEventRawSource = Schema.Union([
Schema.Literal("claude.sdk.permission"),
Schema.Literal("codex.sdk.thread-event"),
Schema.Literal("opencode.sdk.event"),
Schema.Literal("pi.sdk.event"),
Schema.Literal("acp.jsonrpc"),
Schema.TemplateLiteral(["acp.", Schema.String, ".extension"]),
]);
@@ -190,6 +191,10 @@ const ProviderRuntimeEventType = Schema.Literals([
"config.warning",
"deprecation.notice",
"files.persisted",
"extension.activity",
"pi.ui.state.updated",
"pi.extension.configured",
"pi.extension.diagnostic",
"runtime.warning",
"runtime.error",
]);
@@ -240,6 +245,10 @@ const ModelReroutedType = Schema.Literal("model.rerouted");
const ConfigWarningType = Schema.Literal("config.warning");
const DeprecationNoticeType = Schema.Literal("deprecation.notice");
const FilesPersistedType = Schema.Literal("files.persisted");
const ExtensionActivityType = Schema.Literal("extension.activity");
const PiUiStateUpdatedType = Schema.Literal("pi.ui.state.updated");
const PiExtensionConfiguredType = Schema.Literal("pi.extension.configured");
const PiExtensionDiagnosticType = Schema.Literal("pi.extension.diagnostic");
const RuntimeWarningType = Schema.Literal("runtime.warning");
const RuntimeErrorType = Schema.Literal("runtime.error");
@@ -440,7 +449,14 @@ export const UserInputQuestion = Schema.Struct({
id: TrimmedNonEmptyStringSchema,
header: TrimmedNonEmptyStringSchema,
question: TrimmedNonEmptyStringSchema,
options: Schema.Array(UserInputQuestionOption),
inputKind: Schema.optional(Schema.Literals(["select", "confirm", "text", "textarea"])).pipe(
Schema.withConstructorDefault(Effect.succeed("select")),
),
options: Schema.optional(Schema.Array(UserInputQuestionOption)).pipe(
Schema.withConstructorDefault(Effect.succeed([])),
),
placeholder: Schema.optional(Schema.String),
prefill: Schema.optional(Schema.String),
multiSelect: Schema.optional(Schema.Boolean).pipe(
Schema.withConstructorDefault(Effect.succeed(false)),
),
@@ -588,6 +604,100 @@ const FilesPersistedPayload = Schema.Struct({
});
export type FilesPersistedPayload = typeof FilesPersistedPayload.Type;
export const ExtensionActivityPayload = Schema.Struct({
source: TrimmedNonEmptyStringSchema,
activityType: Schema.Literals([
"notify",
"status",
"widget",
"title",
"editor",
"custom-ui",
"error",
]),
message: TrimmedNonEmptyStringSchema,
severity: Schema.optional(Schema.Literals(["info", "warning", "error"])),
visibility: Schema.optional(Schema.Literals(["main", "pi-panel", "debug", "hidden"])),
extensionPath: Schema.optional(TrimmedNonEmptyStringSchema),
data: Schema.optional(Schema.Json),
uiOnly: Schema.optional(Schema.Boolean).pipe(Schema.withConstructorDefault(Effect.succeed(true))),
});
export type ExtensionActivityPayload = typeof ExtensionActivityPayload.Type;
export const PiUiPanelSurface = Schema.Literals([
"header",
"footer",
"status",
"widget",
"title",
"editor",
"custom",
]);
export type PiUiPanelSurface = typeof PiUiPanelSurface.Type;
export const PiUiStateUpdatedPayload = Schema.Struct({
source: TrimmedNonEmptyStringSchema,
surface: PiUiPanelSurface,
key: TrimmedNonEmptyStringSchema,
label: Schema.optional(TrimmedNonEmptyStringSchema),
text: Schema.optional(Schema.String),
lines: Schema.optional(Schema.Array(Schema.String)),
state: Schema.optional(Schema.Literals(["set", "cleared", "unsupported"])).pipe(
Schema.withConstructorDefault(Effect.succeed("set")),
),
placement: Schema.optional(TrimmedNonEmptyStringSchema),
extensionPath: Schema.optional(TrimmedNonEmptyStringSchema),
data: Schema.optional(Schema.Json),
uiOnly: Schema.optional(Schema.Boolean).pipe(Schema.withConstructorDefault(Effect.succeed(true))),
});
export type PiUiStateUpdatedPayload = typeof PiUiStateUpdatedPayload.Type;
const PiExtensionSlashCommandSnapshot = Schema.Struct({
name: TrimmedNonEmptyStringSchema,
description: Schema.optional(Schema.String),
source: Schema.optional(TrimmedNonEmptyStringSchema),
sourceInfo: Schema.optional(Schema.Json),
input: Schema.optional(Schema.Json),
});
export type PiExtensionSlashCommandSnapshot = typeof PiExtensionSlashCommandSnapshot.Type;
const PiExtensionToolSnapshot = Schema.Struct({
name: TrimmedNonEmptyStringSchema,
description: Schema.optional(Schema.String),
sourceInfo: Schema.optional(Schema.Json),
});
export type PiExtensionToolSnapshot = typeof PiExtensionToolSnapshot.Type;
export const PiExtensionConfiguredPayload = Schema.Struct({
source: TrimmedNonEmptyStringSchema,
extensionPaths: Schema.Array(Schema.String),
slashCommands: Schema.Array(PiExtensionSlashCommandSnapshot),
tools: Schema.Array(PiExtensionToolSnapshot),
flags: Schema.Array(Schema.String),
models: Schema.optional(Schema.Array(Schema.Json)),
skills: Schema.optional(Schema.Array(Schema.Json)),
});
export type PiExtensionConfiguredPayload = typeof PiExtensionConfiguredPayload.Type;
export const PiExtensionDiagnosticPayload = Schema.Struct({
source: TrimmedNonEmptyStringSchema,
message: TrimmedNonEmptyStringSchema,
severity: Schema.Literals(["info", "warning", "error"]),
visibility: Schema.optional(Schema.Literals(["main", "pi-panel", "debug", "hidden"])).pipe(
Schema.withConstructorDefault(Effect.succeed("pi-panel")),
),
extensionPath: Schema.optional(TrimmedNonEmptyStringSchema),
event: Schema.optional(TrimmedNonEmptyStringSchema),
diagnosticKey: Schema.optional(TrimmedNonEmptyStringSchema),
repeatCount: Schema.optional(PositiveInt).pipe(Schema.withConstructorDefault(Effect.succeed(1))),
hiddenCount: Schema.optional(NonNegativeInt).pipe(
Schema.withConstructorDefault(Effect.succeed(0)),
),
detail: Schema.optional(Schema.Json),
uiOnly: Schema.optional(Schema.Boolean).pipe(Schema.withConstructorDefault(Effect.succeed(true))),
});
export type PiExtensionDiagnosticPayload = typeof PiExtensionDiagnosticPayload.Type;
const RuntimeWarningPayload = Schema.Struct({
message: TrimmedNonEmptyStringSchema,
detail: Schema.optional(Schema.Unknown),
@@ -933,6 +1043,37 @@ const ProviderRuntimeFilesPersistedEvent = Schema.Struct({
});
export type ProviderRuntimeFilesPersistedEvent = typeof ProviderRuntimeFilesPersistedEvent.Type;
const ProviderRuntimeExtensionActivityEvent = Schema.Struct({
...ProviderRuntimeEventBase.fields,
type: ExtensionActivityType,
payload: ExtensionActivityPayload,
});
export type ProviderRuntimeExtensionActivityEvent =
typeof ProviderRuntimeExtensionActivityEvent.Type;
const ProviderRuntimePiUiStateUpdatedEvent = Schema.Struct({
...ProviderRuntimeEventBase.fields,
type: PiUiStateUpdatedType,
payload: PiUiStateUpdatedPayload,
});
export type ProviderRuntimePiUiStateUpdatedEvent = typeof ProviderRuntimePiUiStateUpdatedEvent.Type;
const ProviderRuntimePiExtensionConfiguredEvent = Schema.Struct({
...ProviderRuntimeEventBase.fields,
type: PiExtensionConfiguredType,
payload: PiExtensionConfiguredPayload,
});
export type ProviderRuntimePiExtensionConfiguredEvent =
typeof ProviderRuntimePiExtensionConfiguredEvent.Type;
const ProviderRuntimePiExtensionDiagnosticEvent = Schema.Struct({
...ProviderRuntimeEventBase.fields,
type: PiExtensionDiagnosticType,
payload: PiExtensionDiagnosticPayload,
});
export type ProviderRuntimePiExtensionDiagnosticEvent =
typeof ProviderRuntimePiExtensionDiagnosticEvent.Type;
const ProviderRuntimeWarningEvent = Schema.Struct({
...ProviderRuntimeEventBase.fields,
type: RuntimeWarningType,
@@ -993,6 +1134,10 @@ export const ProviderRuntimeEventV2 = Schema.Union([
ProviderRuntimeConfigWarningEvent,
ProviderRuntimeDeprecationNoticeEvent,
ProviderRuntimeFilesPersistedEvent,
ProviderRuntimeExtensionActivityEvent,
ProviderRuntimePiUiStateUpdatedEvent,
ProviderRuntimePiExtensionConfiguredEvent,
ProviderRuntimePiExtensionDiagnosticEvent,
ProviderRuntimeWarningEvent,
ProviderRuntimeErrorEvent,
]);
+65
View File
@@ -71,4 +71,69 @@ describe("ServerProvider", () => {
expect(parsed.continuation?.groupKey).toBe("codex:home:/Users/julius/.codex");
});
it("decodes Pi provider inventory metadata", () => {
const parsed = decodeServerProvider({
instanceId: "pi",
driver: "pi",
enabled: true,
installed: true,
version: "0.73.0",
status: "ready",
auth: {
status: "authenticated",
},
checkedAt: "2026-04-10T00:00:00.000Z",
models: [],
pi: {
extensionPaths: ["/Users/davis/.pi/agent/extensions/tps-tracker.ts"],
tools: [
{
name: "search",
description: "Search docs",
sourceInfo: { path: "/Users/davis/.pi/agent/extensions/tps-tracker.ts" },
},
],
flags: ["verbose"],
},
});
expect(parsed.pi?.extensionPaths).toEqual(["/Users/davis/.pi/agent/extensions/tps-tracker.ts"]);
expect(parsed.pi?.tools[0]?.name).toBe("search");
expect(parsed.pi?.tools[0]?.sourceInfo).toEqual({
path: "/Users/davis/.pi/agent/extensions/tps-tracker.ts",
});
expect(parsed.pi?.flags).toEqual(["verbose"]);
});
it("rejects non-JSON Pi provider inventory metadata", () => {
expect(() =>
decodeServerProvider({
instanceId: "pi",
driver: "pi",
enabled: true,
installed: true,
version: "0.73.0",
status: "ready",
auth: {
status: "authenticated",
},
checkedAt: "2026-04-10T00:00:00.000Z",
models: [],
pi: {
extensionPaths: ["/Users/davis/.pi/agent/extensions/pi-mcp/src/index.ts"],
tools: [
{
name: "search",
sourceInfo: {
path: "/Users/davis/.pi/agent/extensions/pi-mcp/src/index.ts",
baseDir: undefined,
},
},
],
flags: [],
},
}),
).toThrow();
});
});
+15
View File
@@ -79,6 +79,20 @@ export const ServerProviderSlashCommand = Schema.Struct({
});
export type ServerProviderSlashCommand = typeof ServerProviderSlashCommand.Type;
export const ServerProviderPiToolSnapshot = Schema.Struct({
name: TrimmedNonEmptyString,
description: Schema.optional(Schema.String),
sourceInfo: Schema.optional(Schema.Json),
});
export type ServerProviderPiToolSnapshot = typeof ServerProviderPiToolSnapshot.Type;
export const ServerProviderPiMetadata = Schema.Struct({
extensionPaths: Schema.Array(Schema.String),
tools: Schema.Array(ServerProviderPiToolSnapshot),
flags: Schema.Array(Schema.String),
});
export type ServerProviderPiMetadata = typeof ServerProviderPiMetadata.Type;
export const ServerProviderSkill = Schema.Struct({
name: TrimmedNonEmptyString,
description: Schema.optional(TrimmedNonEmptyString),
@@ -185,6 +199,7 @@ export const ServerProvider = Schema.Struct({
Schema.withDecodingDefault(Effect.succeed([])),
),
skills: Schema.Array(ServerProviderSkill).pipe(Schema.withDecodingDefault(Effect.succeed([]))),
pi: Schema.optionalKey(ServerProviderPiMetadata),
versionAdvisory: Schema.optionalKey(ServerProviderVersionAdvisory),
updateState: Schema.optionalKey(ServerProviderUpdateState),
});
+52
View File
@@ -5,6 +5,7 @@ import { TrimmedNonEmptyString, TrimmedString } from "./baseSchemas.ts";
import { DEFAULT_GIT_TEXT_GENERATION_MODEL, ProviderOptionSelections } from "./model.ts";
import { ModelSelection } from "./orchestration.ts";
import { ProviderInstanceConfig, ProviderInstanceId } from "./providerInstance.ts";
import { DEFAULT_THEME_PREFERENCE, ThemePreference } from "./theme.ts";
// ── Client Settings (local-only) ───────────────────────────────
@@ -78,6 +79,9 @@ export const ClientSettingsSchema = Schema.Struct({
timestampFormat: TimestampFormat.pipe(
Schema.withDecodingDefault(Effect.succeed(DEFAULT_TIMESTAMP_FORMAT)),
),
themePreference: ThemePreference.pipe(
Schema.withDecodingDefault(Effect.succeed(DEFAULT_THEME_PREFERENCE)),
),
});
export type ClientSettings = typeof ClientSettingsSchema.Type;
@@ -316,6 +320,45 @@ export const OpenCodeSettings = makeProviderSettingsSchema(
);
export type OpenCodeSettings = typeof OpenCodeSettings.Type;
export const PiSettings = makeProviderSettingsSchema(
{
enabled: Schema.Boolean.pipe(
Schema.withDecodingDefault(Effect.succeed(true)),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
agentDir: TrimmedString.pipe(
Schema.withDecodingDefault(Effect.succeed("")),
Schema.annotateKey({
title: "Pi agent directory",
description: "Custom Pi agent config directory.",
providerSettingsForm: {
placeholder: "~/.pi/agent",
clearWhenEmpty: "omit",
},
}),
),
sessionDir: TrimmedString.pipe(
Schema.withDecodingDefault(Effect.succeed("")),
Schema.annotateKey({
title: "Pi session directory",
description: "Optional custom Pi session directory.",
providerSettingsForm: {
placeholder: "~/.pi/agent/sessions",
clearWhenEmpty: "omit",
},
}),
),
customModels: Schema.Array(Schema.String).pipe(
Schema.withDecodingDefault(Effect.succeed([])),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
},
{
order: ["agentDir", "sessionDir"],
},
);
export type PiSettings = typeof PiSettings.Type;
export const ObservabilitySettings = Schema.Struct({
otlpTracesUrl: TrimmedString.pipe(Schema.withDecodingDefault(Effect.succeed(""))),
otlpMetricsUrl: TrimmedString.pipe(Schema.withDecodingDefault(Effect.succeed(""))),
@@ -348,6 +391,7 @@ export const ServerSettings = Schema.Struct({
claudeAgent: ClaudeSettings.pipe(Schema.withDecodingDefault(Effect.succeed({}))),
cursor: CursorSettings.pipe(Schema.withDecodingDefault(Effect.succeed({}))),
opencode: OpenCodeSettings.pipe(Schema.withDecodingDefault(Effect.succeed({}))),
pi: PiSettings.pipe(Schema.withDecodingDefault(Effect.succeed({}))),
}).pipe(Schema.withDecodingDefault(Effect.succeed({}))),
// New driver-agnostic instance map. Keyed by `ProviderInstanceId`; values
// are `ProviderInstanceConfig` envelopes. The driver-specific config blob
@@ -423,6 +467,13 @@ const OpenCodeSettingsPatch = Schema.Struct({
customModels: Schema.optionalKey(Schema.Array(Schema.String)),
});
const PiSettingsPatch = Schema.Struct({
enabled: Schema.optionalKey(Schema.Boolean),
agentDir: Schema.optionalKey(Schema.String),
sessionDir: Schema.optionalKey(Schema.String),
customModels: Schema.optionalKey(Schema.Array(Schema.String)),
});
export const ServerSettingsPatch = Schema.Struct({
// Server settings
enableAssistantStreaming: Schema.optionalKey(Schema.Boolean),
@@ -441,6 +492,7 @@ export const ServerSettingsPatch = Schema.Struct({
claudeAgent: Schema.optionalKey(ClaudeSettingsPatch),
cursor: Schema.optionalKey(CursorSettingsPatch),
opencode: Schema.optionalKey(OpenCodeSettingsPatch),
pi: Schema.optionalKey(PiSettingsPatch),
}),
),
// Whole-map replacement for the new instance config. Patching individual
+71
View File
@@ -0,0 +1,71 @@
import * as Schema from "effect/Schema";
export const ThemeSource = Schema.Literals(["builtin", "vscode", "cursor", "vscode-insiders"]);
export type ThemeSource = typeof ThemeSource.Type;
export const EditorThemeSource = Schema.Literals(["vscode", "cursor", "vscode-insiders"]);
export type EditorThemeSource = typeof EditorThemeSource.Type;
export const ThemeKind = Schema.Literals([
"light",
"dark",
"high-contrast-light",
"high-contrast-dark",
]);
export type ThemeKind = typeof ThemeKind.Type;
export type ThemeId = string;
export const DiscoveredColorTheme = Schema.Struct({
id: Schema.String,
source: EditorThemeSource,
extensionId: Schema.String,
extensionDisplayName: Schema.optional(Schema.String),
label: Schema.String,
kind: ThemeKind,
themePath: Schema.String,
packagePath: Schema.String,
publisher: Schema.optional(Schema.String),
});
export type DiscoveredColorTheme = typeof DiscoveredColorTheme.Type;
export const ResolvedColorTheme = Schema.Struct({
id: Schema.String,
label: Schema.String,
source: EditorThemeSource,
kind: ThemeKind,
colors: Schema.Record(Schema.String, Schema.String),
tokenColors: Schema.Unknown,
semanticHighlighting: Schema.optional(Schema.Boolean),
semanticTokenColors: Schema.optional(Schema.Unknown),
appVariables: Schema.Record(Schema.String, Schema.String),
});
export type ResolvedColorTheme = typeof ResolvedColorTheme.Type;
export const ThemePreference = Schema.Union([
Schema.Struct({ mode: Schema.Literal("system") }),
Schema.Struct({ mode: Schema.Literal("builtin"), theme: Schema.Literals(["light", "dark"]) }),
Schema.Struct({ mode: Schema.Literal("external"), themeId: Schema.String }),
Schema.Struct({ mode: Schema.Literal("follow-editor"), source: EditorThemeSource }),
]);
export type ThemePreference = typeof ThemePreference.Type;
export const DEFAULT_THEME_PREFERENCE = { mode: "system" } as const satisfies ThemePreference;
export const EditorThemePreference = Schema.Struct({
source: EditorThemeSource,
colorTheme: Schema.NullOr(Schema.String),
preferredLightColorTheme: Schema.NullOr(Schema.String),
preferredDarkColorTheme: Schema.NullOr(Schema.String),
autoDetectColorScheme: Schema.Boolean,
workbenchColorCustomizations: Schema.Record(Schema.String, Schema.Unknown),
editorTokenColorCustomizations: Schema.Unknown,
});
export type EditorThemePreference = typeof EditorThemePreference.Type;
export const DesktopWindowThemeColors = Schema.Struct({
backgroundColor: Schema.String,
titleBarColor: Schema.optional(Schema.String),
titleBarSymbolColor: Schema.optional(Schema.String),
});
export type DesktopWindowThemeColors = typeof DesktopWindowThemeColors.Type;
+4
View File
@@ -79,6 +79,10 @@
"./keybindings": {
"types": "./src/keybindings.ts",
"import": "./src/keybindings.ts"
},
"./themeMapping": {
"types": "./src/themeMapping.ts",
"import": "./src/themeMapping.ts"
}
},
"scripts": {
+38
View File
@@ -0,0 +1,38 @@
import { describe, expect, it } from "vitest";
import { mapVscodeColorsToAppVariables, normalizeThemeColors } from "./themeMapping.ts";
describe("themeMapping", () => {
it("normalizes supported VS Code hex colors only", () => {
expect(
normalizeThemeColors({
"editor.background": "#010203",
"button.background": "#abc",
ignored: "rgb(1, 2, 3)",
missing: null,
}),
).toEqual({
"editor.background": "#010203",
"button.background": "#abc",
});
});
it("maps VS Code workbench colors to app variables", () => {
const variables = mapVscodeColorsToAppVariables({
kind: "dark",
colors: {
"editor.background": "#0d1117",
"editor.foreground": "#e6edf3",
"button.background": "#238636",
"button.foreground": "#ffffff",
"sideBar.background": "#010409",
"terminal.ansiGreen": "#3fb950",
},
});
expect(variables["--background"]).toBe("#0d1117");
expect(variables["--foreground"]).toBe("#e6edf3");
expect(variables["--primary"]).toBe("#238636");
expect(variables["--sidebar"]).toBe("#010409");
expect(variables["--success"]).toBe("#3fb950");
});
});
+247
View File
@@ -0,0 +1,247 @@
import type { ThemeKind } from "@t3tools/contracts";
export const EXTERNAL_APP_THEME_VARIABLES = [
"--background",
"--app-chrome-background",
"--foreground",
"--card",
"--card-foreground",
"--popover",
"--popover-foreground",
"--primary",
"--primary-foreground",
"--secondary",
"--secondary-foreground",
"--muted",
"--muted-foreground",
"--accent",
"--accent-foreground",
"--destructive",
"--destructive-foreground",
"--border",
"--input",
"--ring",
"--info",
"--info-foreground",
"--success",
"--success-foreground",
"--warning",
"--warning-foreground",
"--sidebar",
"--sidebar-foreground",
"--sidebar-accent",
"--sidebar-accent-foreground",
"--sidebar-border",
"--terminal-background",
"--terminal-foreground",
"--terminal-cursor",
"--terminal-selection-background",
"--diff-inserted",
"--diff-removed",
"--chat-request-background",
"--chat-request-border",
] as const;
const HEX_COLOR_PATTERN = /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
const LIGHT_FALLBACKS = {
background: "#ffffff",
foreground: "#262626",
primary: "#315cec",
border: "#00000014",
destructive: "#ef4444",
info: "#3b82f6",
success: "#10b981",
warning: "#f59e0b",
};
const DARK_FALLBACKS = {
background: "#111111",
foreground: "#f5f5f5",
primary: "#6384ff",
border: "#ffffff14",
destructive: "#f87171",
info: "#60a5fa",
success: "#34d399",
warning: "#fbbf24",
};
export function isDarkThemeKind(kind: ThemeKind) {
return kind === "dark" || kind === "high-contrast-dark";
}
export function normalizeCssColor(value: unknown): string | null {
if (typeof value !== "string") return null;
const trimmed = value.trim();
if (!HEX_COLOR_PATTERN.test(trimmed)) return null;
return trimmed;
}
export function normalizeThemeColors(value: unknown): Record<string, string> {
if (typeof value !== "object" || value === null || Array.isArray(value)) return {};
const colors: Record<string, string> = {};
for (const [key, rawColor] of Object.entries(value)) {
const color = normalizeCssColor(rawColor);
if (color) colors[key] = color;
}
return colors;
}
function firstColor(colors: Record<string, string>, keys: readonly string[]) {
for (const key of keys) {
const color = colors[key];
if (color) return color;
}
return null;
}
function expandHexChannel(value: string) {
return value.length === 1 ? `${value}${value}` : value;
}
function readableForeground(background: string) {
const normalized = normalizeCssColor(background);
if (!normalized) return "#ffffff";
const hex = normalized.slice(1);
const rgb =
hex.length === 3 || hex.length === 4
? [hex.slice(0, 1), hex.slice(1, 2), hex.slice(2, 3)].map((channel) =>
parseInt(expandHexChannel(channel), 16),
)
: [hex.slice(0, 2), hex.slice(2, 4), hex.slice(4, 6)].map((channel) => parseInt(channel, 16));
const [red = 0, green = 0, blue = 0] = rgb;
const luminance = (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255;
return luminance > 0.55 ? "#111111" : "#ffffff";
}
function mix(base: string, foreground: string, percentage: number) {
return `color-mix(in srgb, ${base} ${percentage}%, ${foreground})`;
}
export function mapVscodeColorsToAppVariables(input: {
readonly kind: ThemeKind;
readonly colors: Record<string, string>;
}): Record<string, string> {
const fallback = isDarkThemeKind(input.kind) ? DARK_FALLBACKS : LIGHT_FALLBACKS;
const colors = input.colors;
const background =
firstColor(colors, ["editor.background", "sideBar.background"]) ?? fallback.background;
const foreground = firstColor(colors, ["foreground", "editor.foreground"]) ?? fallback.foreground;
const primary =
firstColor(colors, ["button.background", "activityBarBadge.background", "focusBorder"]) ??
fallback.primary;
const border =
firstColor(colors, ["widget.border", "sideBar.border", "editorGroup.border", "panel.border"]) ??
fallback.border;
const accent =
firstColor(colors, [
"list.activeSelectionBackground",
"list.hoverBackground",
"toolbar.hoverBackground",
]) ?? mix(background, foreground, 92);
const destructive =
firstColor(colors, [
"errorForeground",
"editorError.foreground",
"notificationsErrorIcon.foreground",
]) ?? fallback.destructive;
return {
"--background": background,
"--app-chrome-background":
firstColor(colors, ["titleBar.activeBackground", "sideBar.background"]) ?? background,
"--foreground": foreground,
"--card":
firstColor(colors, ["editorGroupHeader.tabsBackground", "sideBarSectionHeader.background"]) ??
mix(background, foreground, 94),
"--card-foreground": foreground,
"--popover":
firstColor(colors, [
"quickInput.background",
"editorWidget.background",
"dropdown.background",
]) ?? mix(background, foreground, 96),
"--popover-foreground":
firstColor(colors, [
"quickInput.foreground",
"editorWidget.foreground",
"dropdown.foreground",
"foreground",
]) ?? foreground,
"--primary": primary,
"--primary-foreground":
firstColor(colors, ["button.foreground"]) ?? readableForeground(primary),
"--secondary":
firstColor(colors, ["button.secondaryBackground", "badge.background"]) ??
mix(background, foreground, 90),
"--secondary-foreground":
firstColor(colors, ["button.secondaryForeground", "foreground"]) ?? foreground,
"--muted":
firstColor(colors, ["editor.lineHighlightBackground", "list.hoverBackground"]) ??
mix(background, foreground, 92),
"--muted-foreground":
firstColor(colors, ["descriptionForeground", "disabledForeground"]) ??
mix(foreground, background, 66),
"--accent": accent,
"--accent-foreground":
firstColor(colors, ["list.activeSelectionForeground", "list.hoverForeground"]) ?? foreground,
"--destructive": destructive,
"--destructive-foreground":
firstColor(colors, ["errorForeground", "editorError.foreground"]) ??
readableForeground(destructive),
"--border": border,
"--input":
firstColor(colors, [
"input.background",
"dropdown.background",
"settings.textInputBackground",
]) ?? mix(background, foreground, 90),
"--ring": firstColor(colors, ["focusBorder", "inputOption.activeBorder"]) ?? primary,
"--info": firstColor(colors, ["textLink.foreground", "terminal.ansiBlue"]) ?? fallback.info,
"--info-foreground":
firstColor(colors, ["textLink.foreground", "terminal.ansiBrightBlue"]) ?? fallback.info,
"--success":
firstColor(colors, ["gitDecoration.addedResourceForeground", "terminal.ansiGreen"]) ??
fallback.success,
"--success-foreground":
firstColor(colors, ["gitDecoration.addedResourceForeground", "terminal.ansiBrightGreen"]) ??
fallback.success,
"--warning":
firstColor(colors, ["notificationsWarningIcon.foreground", "terminal.ansiYellow"]) ??
fallback.warning,
"--warning-foreground":
firstColor(colors, ["notificationsWarningIcon.foreground", "terminal.ansiBrightYellow"]) ??
fallback.warning,
"--sidebar": firstColor(colors, ["sideBar.background", "activityBar.background"]) ?? background,
"--sidebar-foreground": firstColor(colors, ["sideBar.foreground", "foreground"]) ?? foreground,
"--sidebar-accent":
firstColor(colors, ["list.activeSelectionBackground", "activityBar.activeBackground"]) ??
accent,
"--sidebar-accent-foreground":
firstColor(colors, ["list.activeSelectionForeground", "sideBar.foreground"]) ?? foreground,
"--sidebar-border": firstColor(colors, ["sideBar.border", "activityBar.border"]) ?? border,
"--terminal-background":
firstColor(colors, ["terminal.background", "panel.background"]) ?? background,
"--terminal-foreground":
firstColor(colors, ["terminal.foreground", "foreground"]) ?? foreground,
"--terminal-cursor":
firstColor(colors, ["terminalCursor.foreground", "editorCursor.foreground"]) ?? primary,
"--terminal-selection-background":
firstColor(colors, ["terminal.selectionBackground", "editor.selectionBackground"]) ??
`color-mix(in srgb, ${primary} 24%, transparent)`,
"--diff-inserted":
firstColor(colors, [
"diffEditor.insertedTextBackground",
"gitDecoration.addedResourceForeground",
]) ?? fallback.success,
"--diff-removed":
firstColor(colors, [
"diffEditor.removedTextBackground",
"gitDecoration.deletedResourceForeground",
]) ?? fallback.destructive,
"--chat-request-background":
firstColor(colors, ["chat.requestBackground"]) ?? mix(background, foreground, 94),
"--chat-request-border": firstColor(colors, ["chat.requestBorder"]) ?? border,
};
}