import { type DoctorReport, type InstallRequiredResult, type InstalledPackage, type PiPluginsManifest } from "../lib/pi-plugins-doctor.js"; export interface DoctorCommandOptions { /** If true, run `pi install` for declared installable plugins (required + recommended A/B; user scope). */ installPiPlugins?: boolean; /** When true, never non-zero solely for advisory (init/update warn mode still uses classify exit). */ warnOnly?: boolean; /** Run the non-blocking init/update install path without normal doctor output. */ silent?: boolean; /** Explicit opt-out for the init/update silent install path. */ noPiPlugins?: boolean; /** Workspace root used for `.aiws/tmp/pi-plugin-install-*.json` summaries. */ workspaceRoot?: string; homeDir?: string; manifest?: PiPluginsManifest; installed?: InstalledPackage[]; runPiList?: () => Promise<{ ok: boolean; text: string; }>; runInstall?: (args: string[]) => Promise<{ code: number; stdout: string; stderr: string; }>; checkPi?: () => Promise; installTimeoutMs?: number; now?: () => Date; } export interface DoctorCommandResult { report: DoctorReport; text: string; exitCode: number; install?: InstallRequiredResult; summaryPath?: string; } export interface SilentPiPluginsInstallOptions { /** Workspace root where the non-secret install summary is written. */ workspaceRoot: string; /** Skip user-level Pi package installation without throwing or calling `pi install`. */ noPiPlugins?: boolean; homeDir?: string; manifest?: PiPluginsManifest; installed?: InstalledPackage[]; runPiList?: () => Promise<{ ok: boolean; text: string; }>; runInstall?: (args: string[]) => Promise<{ code: number; stdout: string; stderr: string; }>; checkPi?: () => Promise; installTimeoutMs?: number; /** Injectable clock for deterministic focused tests. */ now?: () => Date; } export interface SilentPiPluginsInstallResult { report?: DoctorReport; text: string; skipped: boolean; install?: InstallRequiredResult; summaryPath?: string; /** A diagnostic that did not block the caller; details are also redacted in the summary. */ error?: string; } /** * Init/update entry point: install only missing allowlisted Pi packages, * continue on every failure, and persist a redacted summary under `.aiws/tmp`. * Successful installs are silent; only actionable aggregate warnings are * printed. This helper never throws for Pi detection/install/summary errors. */ export declare function installPiPluginsSilently(options: SilentPiPluginsInstallOptions): Promise; /** * `aiws doctor` — detect Pi user-level plugins vs AIWS manifest; no silent install. */ export declare function doctorCommand(options?: DoctorCommandOptions): Promise; /** Print doctor as non-blocking warning (init --pi / update with .pi). */ export declare function printPiPluginsDoctorWarn(options?: { homeDir?: string; }): Promise;