export interface MissingPackage { /** The raw `packages[]` entry as stored in settings.json. */ source: string; /** Absolute path it resolved to (which does not exist). */ resolved: string; } export interface GlobalHumanloopHealth { bundledVersion: string | null; globalVersion: string | null; current: boolean; } /** Read the installed library's version rather than coupling this check to the * dependency range in crouter's package.json. The bundled copy is the floor * required by crouter's generated `hl inbox toggle` binding. */ export declare function bundledHumanloopVersion(): string | null; /** Read the PATH-visible `hl` package directly. Spawning `npm ls -g` here * makes every front-door boot pay for npm's global dependency-tree scan; a * linked development install can make that scan take many seconds. The real * executable points into the package for both ordinary and npm-linked installs, * so walking upward to its package.json is authoritative for the CLI crtr will * actually invoke. */ export declare function globalHumanloopVersion(): string | null; export declare function globalHumanloopHealth(): GlobalHumanloopHealth; /** A non-fatal action-oriented diagnostic for a missing, unreadable, or stale * global `hl` executable. */ export declare function globalHumanloopWarning(): string | null; export declare function globalHumanloopInstallCommand(): string; /** * The pi agent config dir (`~/.pi/agent`, or `$PI_CODING_AGENT_DIR`) — a local * reimplementation of pi's `getAgentDir()`. Reimplemented (not imported) ON * PURPOSE: `getAgentDir` lives in `@earendil-works/pi-coding-agent`, and * importing that package pulls in the ENTIRE ~360ms pi engine module graph. The * front door calls this on every bare-`crtr` boot BEFORE spawning the broker, so * a static/dynamic pi import here adds ~316ms of serialized dead-time in the * foreground before the broker (which loads pi itself) even starts. This mirrors * pi's contract exactly: `$PI_CODING_AGENT_DIR` (tilde-expanded) else * `~/.pi/agent`. Same precedent as `bearings.ts` (keep the pi engine out of the * hot/foreground path). If pi ever rebrands its configDir/env, update here. */ export declare function piAgentDir(homeDir?: string): string; /** * Return every local-path package in `/settings.json` whose resolved * path is missing. Empty when settings is absent/unreadable or all paths exist. * Mirrors pi's own resolution: `resolve(agentDir, expandTilde(source))`. */ export declare function findMissingPackagePaths(agentDir: string, homeDir?: string): MissingPackage[]; /** A human-readable, actionable warning for a set of missing packages, or * `null` when nothing is missing. Names `crtr sys setup` as the fix. */ export declare function missingPackageWarning(agentDir: string, homeDir?: string): string | null;