/** * Detect if we're running as a Bun compiled binary. * Bun binaries have import.meta.url containing "$bunfs", "~BUN", or "%7EBUN" (Bun's virtual filesystem path) */ export declare const isBunBinary: boolean; /** Detect if Bun is the runtime (compiled binary or bun run) */ export declare const isBunRuntime: boolean; export type InstallMethod = "bun-binary" | "npm" | "pnpm" | "yarn" | "bun" | "unknown"; interface SelfUpdateCommandStep { command: string; args: string[]; display: string; } export interface SelfUpdateCommand extends SelfUpdateCommandStep { steps?: SelfUpdateCommandStep[]; } export declare function detectInstallMethod(): InstallMethod; export declare function getSelfUpdateCommand(packageName: string, npmCommand?: string[], updatePackageName?: string): SelfUpdateCommand | undefined; export declare function getSelfUpdateUnavailableInstruction(packageName: string, npmCommand?: string[], updatePackageName?: string): string; export declare function getUpdateInstruction(packageName: string): string; /** * Get the base directory for resolving package assets (themes, package.json, README.md, CHANGELOG.md). * - For Bun binary: returns the directory containing the executable * - For Node.js (dist/): returns __dirname (the dist/ directory) * - For tsx (src/): returns parent directory (the package root) */ export declare function getPackageDir(): string; /** * Get path to built-in themes directory (shipped with package) * - For Bun binary: theme/ next to executable * - For Node.js (dist/): dist/modes/interactive/theme/ * - For tsx (src/): src/modes/interactive/theme/ */ export declare function getThemesDir(): string; /** * Get path to HTML export template directory (shipped with package) * - For Bun binary: export-html/ next to executable * - For Node.js (dist/): dist/core/export-html/ * - For tsx (src/): src/core/export-html/ */ export declare function getExportTemplateDir(): string; /** Get path to package.json */ export declare function getPackageJsonPath(): string; /** Get path to README.md */ export declare function getReadmePath(): string; /** Get path to docs directory */ export declare function getDocsPath(): string; /** Get path to examples directory */ export declare function getExamplesPath(): string; /** Get path to CHANGELOG.md */ export declare function getChangelogPath(): string; /** * Get path to built-in interactive assets directory. * - For Bun binary: assets/ next to executable * - For Node.js (dist/): dist/modes/interactive/assets/ * - For tsx (src/): src/modes/interactive/assets/ */ export declare function getInteractiveAssetsDir(): string; /** Get path to a bundled interactive asset */ export declare function getBundledInteractiveAssetPath(name: string): string; /** * Get path to bundled resources directory (shipped with package). * - For Bun binary: bundled-resources/ next to executable * - For Node.js (dist/): dist/bundled-resources/ * - For tsx (src/): src/bundled-resources/ */ export declare function getBundledResourcesDir(): string; /** * Get path to bundled skills directory. */ export declare function getBundledSkillsDir(): string; /** * Get path to bundled prompts directory. */ export declare function getBundledPromptsDir(): string; /** * Get path to bundled extensions directory. */ export declare function getBundledExtensionsDir(): string; export declare const PACKAGE_NAME: string; export declare const APP_NAME: string; export declare const APP_TITLE: string; export declare const CONFIG_DIR_NAME: string; /** True only when installed package metadata supplied the runtime identity. */ export declare const VERSION_SOURCE_AVAILABLE: boolean; export declare const VERSION: string; /** * Build a POSIX-valid environment-variable name from an app name and a suffix. * * APP_NAME comes from `piConfig.name`, which may contain characters that are invalid in a shell * env-var name — notably the hyphen in "pi-adaptative". A hyphenated name cannot be exported from * a shell (`export PI-ADAPTATIVE_CODING_AGENT_DIR=…` is a parse error), which silently made the * documented config-dir override unusable. Uppercase, collapse every character outside [A-Z0-9_] * to "_", and prefix "_" if the result would start with a digit (names may not begin with one). * e.g. "pi" -> PI_CODING_AGENT_DIR, "pi-adaptative" -> PI_ADAPTATIVE_CODING_AGENT_DIR. */ export declare function toEnvVarName(appName: string, suffix: string): string; export declare const ENV_AGENT_DIR: string; export declare const ENV_SESSION_DIR: string; export declare function expandTildePath(path: string): string; /** Get the share viewer URL for a gist ID */ export declare function getShareViewerUrl(gistId: string): string; /** Get the agent config directory (e.g., ~/.pi/agent/) */ export declare function getAgentDir(): string; /** Get path to user's custom themes directory */ export declare function getCustomThemesDir(): string; /** Get path to models.json */ export declare function getModelsPath(): string; /** Get path to auth.json */ export declare function getAuthPath(): string; /** Get path to settings.json */ export declare function getSettingsPath(): string; /** Get path to tools directory */ export declare function getToolsDir(): string; /** Get path to managed binaries directory (fd, rg, jq, uv) */ export declare function getBinDir(): string; /** Get path to prompt templates directory */ export declare function getPromptsDir(): string; /** Get path to reusable profile definitions directory */ export declare function getProfilesDir(agentDir?: string): string; /** Get path to sessions directory */ export declare function getSessionsDir(): string; /** Get the process-scoped debug log under the disposable work hierarchy. */ export declare function getDebugLogPath(): string; export {}; //# sourceMappingURL=config.d.ts.map