import type { ParsedArgs } from './commands'; import { type WorkspaceSummary } from './workspace'; import { type PaneDaemonEndpoint } from './daemonClient'; import { type PanePlatform } from './platform'; import { RUNPANE_CONTRACT } from './generated/contract'; type ProcessImageStatus = 'current' | 'replaced' | 'deleted' | 'unknown'; type RestartStatus = 'ready' | 'broken' | 'unknown'; interface RemoteDaemonExecutableHealth { processImage: { status: ProcessImageStatus; runtimePath: string | null; installedPath: string | null; evidence: string; }; restart: { status: RestartStatus; launcherPath?: string; resolvedPath?: string; evidence: string; }; diagnosticCode?: 'PANE_REMOTE_DAEMON_EXECUTABLE_DELETED' | 'PANE_REMOTE_DAEMON_UPDATE_PENDING' | 'PANE_REMOTE_DAEMON_LAUNCHER_STALE'; recoveryCommand?: string; checkedAt: string; } interface DaemonDoctorResult { ok: true; app: { version: string; isPackaged: boolean; platform: string; electronVersion?: string; nodeVersion?: string; }; daemon: { channels: string[]; executableHealth?: RemoteDaemonExecutableHealth; }; repos: { count: number; active?: { id: number; name: string; path: string; active: boolean; environment?: string; sessionCount: number; }; }; terminal?: { graphicsProtocols: string[]; sizeReports: boolean; imageLimits: { storageLimitMb: number; pixelLimit: number; }; }; agentContext: { recommendedFirstCommands: string[]; }; } interface DoctorReleaseCheck { ok: boolean; tagName?: string; artifactName?: string; format?: string; preferredDownloadUrl?: string; fallbackDownloadUrl?: string; error?: string; } interface DoctorInstalledPaneCheck { found: boolean; path?: string; version?: string; } interface DoctorDaemonCheck { reachable: boolean; endpoint: PaneDaemonEndpoint; result?: DaemonDoctorResult; error?: string; nextCommand?: string; } interface DoctorReport { ok: boolean; source: 'npm' | 'pip'; wrapper: { runtime: 'node'; version: string; paneDir: string; endpoint: PaneDaemonEndpoint; }; platform?: PanePlatform; release: DoctorReleaseCheck; installedPane: DoctorInstalledPaneCheck; daemon: DoctorDaemonCheck; remoteDaemonService: RemoteDaemonServiceDoctorCheck; remoteSetup: RemoteSetupDoctorCheck; watchDefaults: DoctorWatchDefaults; workspaces: WorkspaceSummary; nextCommands: string[]; } type DoctorWatchDefaults = typeof RUNPANE_CONTRACT.defaults.watch; interface RemoteDaemonServiceDoctorCheck { paneDir: string; managed: boolean; reachable: boolean; endpoint: PaneDaemonEndpoint; executableHealth?: RemoteDaemonExecutableHealth; } interface RemoteSetupDiagnostic { code: string; severity: 'warning' | 'error'; message: string; recoveryCommand?: string; } interface RemoteSetupDoctorCheck { ready: boolean; displayAvailable: boolean; headlessEnvironmentApplied: boolean; diagnostics: RemoteSetupDiagnostic[]; } export interface PreparedDoctorReport { ok: boolean; title: string; path: string; sha256: string; redactionCount: number; proposedCommand: string; filed: boolean; issueUrl?: string; fallbackUrl?: string; error?: string; } interface RedactedDoctorReport { text: string; count: number; } export declare function runDoctor(parsed: ParsedArgs, source?: 'npm' | 'pip'): Promise; export declare function prepareDoctorFailureReport(parsed: ParsedArgs, doctor: DoctorReport): PreparedDoctorReport; export declare function redactDoctorReport(value: string, home?: string): RedactedDoctorReport; export declare function fileDoctorFailureReport(prepared: PreparedDoctorReport): void; interface LegacyHealthOverrides { platform?: NodeJS.Platform; launcherPath?: string; installedCandidates?: string[]; runtimePath?: string | null; checkedAt?: string; } export declare function inspectLegacyRemoteDaemonHealth(paneDir: string, reachable: boolean, overrides?: LegacyHealthOverrides): RemoteDaemonExecutableHealth; export declare function createRemoteDaemonHealthDiagnostic(service: RemoteDaemonServiceDoctorCheck): RemoteSetupDiagnostic | undefined; interface RemoteSetupProbes { displayAvailable: boolean; hasFuseRuntime: boolean; isRoot: boolean; unprivilegedUserNamespaceDisabled: boolean; hasSystemctl: boolean; } export declare function collectRemoteSetupCheck(platform: PanePlatform | undefined, releaseFormat: string | undefined, probeOverrides?: Partial): RemoteSetupDoctorCheck; export declare function watchDefaults(): DoctorWatchDefaults; export declare function formatWatchDefaults(defaults: DoctorWatchDefaults): string; export {}; //# sourceMappingURL=doctor.d.ts.map