/** * 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; 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 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 the canvas subsystem directory (shipped with package). * * The child process a canvas extension runs in imports the SDK shim from here, so * it has to be a real path on disk — not a path inside the Bun binary's virtual * filesystem. Same shape as {@link getThemesDir} and {@link getExportTemplateDir}: * - For Bun binary: `canvas/` next to the executable (copied by scripts/build-binaries.sh) * - For Node.js (dist/): `dist/core/canvas/` * - For tsx (src/): `src/core/canvas/` */ export declare function getCanvasDir(): string; /** Get path to README.md */ export declare function getReadmePath(): string; /** Get path to docs directory */ export declare function getDocsPath(): string; /** Get path to CHANGELOG.md */ export declare function getChangelogPath(): string; /** * Resolve the command used to spawn a hoocode subagent child process by * re-running the current process. * * - Bun binary: the compiled executable spawns itself (argv[1] is not a script). * - Node.js / tsx: spawn the current runtime (process.execPath) replaying the * runtime flags (process.execArgv, e.g. tsx's `--import`) and the entry script * that launched this process (process.argv[1]). * * This mirrors exactly how the parent was started, so it works whether running * from dist/, from source via tsx, or as a packaged binary. */ export declare function getSubagentSpawnCommand(): { executable: string; prefixArgs: 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; export declare const VERSION: string; export declare const ENV_AGENT_DIR: string; export declare const ENV_SESSION_DIR: string; export declare const ENV_USER_AGENTS_DIR: string; export declare function expandTildePath(path: string): string; /** * The URL of a session viewer, if one is configured. * * HooCode does not host a session viewer, so there is no default. `/share` * uploads the session to a gist and the gist URL is the shareable artifact -- * printing a second "Share URL" on a host nobody runs was a dead link dressed * up as a feature, inherited from upstream. * * Anyone running their own viewer points `HOOCODE_SHARE_VIEWER_URL` at it and * gets the extra line back. */ export declare function getShareViewerUrl(gistId: string): string | undefined; /** Get the agent config directory (e.g., ~/.hoocode/) */ export declare function getAgentDir(): string; /** * The cross-vendor user scope (e.g. `~/.agents/`). * * Unlike the native home this directory is shared with other agent tools, so * hoocode only ever reads from it. Overridable so tests do not depend on * whatever the developer happens to keep in their real `~/.agents`. */ export declare function getUserAgentsDir(): string; /** Root directory for subagent runtime state within a project. */ export declare function getDispatchRoot(cwd: string): string; /** Per-task runtime directory for a single subagent dispatch. */ export declare function getDispatchTaskDir(cwd: string, taskId: string): string; /** Get the hoocode config root directory (e.g., ~/.hoocode/). Equivalent to getAgentDir(). */ export declare function getHooCodeDir(): string; /** Get path to user's custom themes directory */ export declare function getCustomThemesDir(): string; /** Get path to auth.json */ export declare function getAuthPath(): string; /** Get path to managed binaries directory (fd, rg) */ export declare function getBinDir(): string; /** Get path to sessions directory */ export declare function getSessionsDir(): string; /** Get path to debug log file */ export declare function getDebugLogPath(): string; export {}; //# sourceMappingURL=config.d.ts.map