import type { HarnessAdapter } from "../adapters/types.js"; import { type BinaryCacheInfo } from "./binary-cache.js"; import { type BuildBreakerSuspension } from "./build-breaker.js"; import type { LegacyPartitionDuplicationSummary } from "./legacy-storage.js"; import { type LspCacheReport } from "./lsp-cache.js"; export interface DiagnosticReport { timestamp: string; platform: string; arch: string; nodeVersion: string; cliVersion: string; binaryVersion: string | null; harnesses: HarnessDiagnostic[]; binaryCache: BinaryCacheInfo; /** LSP package and binary caches populated by plugin auto-install. */ lspCache: LspCacheReport; /** Active durable build-breaker suspensions, grouped by their stored project root. */ buildBreakerSuspensions?: BuildBreakerSuspension[]; } export type DiagnosticIssueSeverity = "high" | "medium" | "low" | "info"; export interface DiagnosticIssue { code: "binary_missing" | "host_missing" | "plugin_missing" | "config_parse_error" | "plugin_cli_version_skew" | "onnx_missing" | "onnx_incompatible"; severity: DiagnosticIssueSeverity; scope: string; message: string; remediation: string; } export interface HarnessDiagnostic { kind: string; displayName: string; hostInstalled: boolean; hostVersion: string | null; pluginRegistered: boolean; configPaths: ReturnType; aftConfig: { exists: boolean; parseError?: string; enabled: boolean; enabledSource?: string; flags: Record; }; pluginCache: ReturnType; storageDir: { path: string; /** True when the storage directory is present on disk. */ exists: boolean; /** True when the directory exists and is readable + writable. */ accessible: boolean; sizesByKey: Record; legacyDuplication?: LegacyPartitionDuplicationSummary; }; onnxRuntime: { required: boolean; systemPath: string | null; systemVersion: string | null; systemCompatible: boolean | null; ignoredSystemPath?: string | null; ignoredSystemReason?: string | null; cachedPath: string | null; cachedVersion: string | null; cachedCompatible: boolean | null; platform: string; installHint: string; requirement: string; }; logFile: { path: string; exists: boolean; sizeKb: number; }; } export declare function collectDiagnostics(adapters: HarnessAdapter[]): Promise; export declare function renderDiagnosticsMarkdown(report: DiagnosticReport): string; export declare function collectDiagnosticIssues(report: DiagnosticReport): DiagnosticIssue[]; export declare function findPluginCliVersionSkews(report: DiagnosticReport): DiagnosticIssue[]; export declare function formatDiagnosticIssuesSection(report: DiagnosticReport): string[]; /** Utility: read the tail of a log file, best-effort. */ export declare function tailLogFile(path: string, lines: number): string; //# sourceMappingURL=diagnostics.d.ts.map