/** Mirror of subcommands.ts's exported shape — kept local to avoid a * cyclic import (subcommands.ts imports from diag.ts via diagCmd). */ export type SubcommandResult = { code: number; lines: string[]; }; /** Compute the skew verdict between two semvers. */ export type SkewVerdict = 'match' | 'patch-diff' | 'minor-diff' | 'major-diff' | 'unparseable'; export declare function skewVerdict(manifestVer: string | undefined, localVer: string | undefined): SkewVerdict; /** GH #22: the kernel backend that actually answered on this machine. */ export type KernelBackendTier = 'native' | 'wasm' | 'js'; export interface DiagReport { dir: string; surface: string | undefined; manifestKernelVersion: string | undefined; localKernelVersion: string | undefined; verdict: SkewVerdict; actionable: string | undefined; manifestGeneratorVersion: string | undefined; localGeneratorVersion: string | undefined; generatorVerdict: SkewVerdict; kernelBackend: KernelBackendTier | undefined; requestedBackend: string | null; backendReasons: { native?: string; wasm?: string; }; } export declare function buildDiagReport(harnessDir: string): Promise; /** * Format a diag report for human reading. Returns the lines + an exit * code suitable for the CLI: 0 on match/patch, 1 on minor/major, 2 if * the manifest is missing entirely. */ export declare function formatDiagReport(report: DiagReport): SubcommandResult; /** * Format a report as JSON for programmatic consumers. Includes the full * report shape + the resolved exit code (delegated to formatDiagReport * so the verdict-to-exit-code mapping has exactly ONE definition) so * callers can gate on either the structured data or the exit code. */ export declare function formatDiagReportJson(report: DiagReport): SubcommandResult; /** * iter 90 — support-bundle JSON. Single-command snapshot of every * diagnostic surface a maintainer would need to triage an issue: * * - The diag report (skew verdict + versions) * - The manifest contents (sanitised — vars stay since they're chosen * by the user, but anything starting with `secret_`/`token_`/`key_` * is replaced with "" so users can paste this without * leaking credentials they typed into prompts) * - The harness's package.json name + version + @metaharness/* deps * - Node version, platform, arch (for cross-OS bug repro) * - Last 3 .harness/* file paths (presence/absence proves which * lifecycle steps the user has run) * * Users run `harness diag --bundle` and paste the output into a GitHub * issue. Maintainers get every load-bearing fact in one block. */ export interface SupportBundle { schema: 1; generatedAt: string; diag: DiagReport & { exitCode: number; }; harness: { packageName: string | undefined; packageVersion: string | undefined; rufloDeps: Record; }; manifest: { present: boolean; content: unknown | undefined; }; harnessFiles: string[]; env: { nodeVersion: string; platform: string; arch: string; }; } export declare function buildSupportBundle(harnessDir: string): Promise; export declare function diagCmd(args: string[]): Promise; //# sourceMappingURL=diag.d.ts.map