/** Scope bucket used by doctor exit policies and JSON summaries. */ export type DoctorCheckScope = 'environment' | 'workspace'; /** Policy used to decide which failed checks should fail the process. */ export type DoctorExitPolicy = 'strict' | 'workspace-only'; /** * One doctor check rendered by the CLI diagnostics flow. */ export interface DoctorCheck { /** Stable machine-readable diagnostic id for structured integrations. */ code?: string; /** Human-readable status detail rendered next to the label. */ detail: string; /** Short label for the dependency, directory, or template check. */ label: string; /** Scope bucket used by machine-readable summaries and exit-code policies. */ scope?: DoctorCheckScope; /** Final pass/fail/warn status for this diagnostic row. */ status: 'pass' | 'fail' | 'warn'; } /** One failed row classified against the active doctor exit policy. */ export interface DoctorFailureSummary { code?: string; label: string; scope: DoctorCheckScope | 'unknown'; severity: 'advisory' | 'error'; } /** Stable JSON summary for `wp-typia doctor --format json`. */ export interface DoctorRunSummary { advisoryFailureCount: number; advisoryFailures: DoctorFailureSummary[]; exitCode: 0 | 1; exitFailureCount: number; exitFailures: DoctorFailureSummary[]; exitPolicy: DoctorExitPolicy; failed: number; passed: number; total: number; warnings: number; } interface RunDoctorOptions { exitPolicy?: DoctorExitPolicy; renderLine?: (check: DoctorCheck) => void; renderSummaryLine?: (summaryLine: string) => void; wordpressVersionCheck?: boolean; } interface DoctorSummaryOptions { exitPolicy?: DoctorExitPolicy; } /** Options used when collecting doctor checks before rendering. */ export interface GetDoctorChecksOptions { /** Include opt-in WordPress feature floor and plugin header checks. */ wordpressVersionCheck?: boolean; } /** * Collect all runtime doctor checks for the current environment. * * The returned array concatenates environment checks (command availability, * directory writability, and built-in template assets) followed by * project checks in display order. Official workspaces cover package metadata, * inventory, blocks, variations, patterns, bindings, and optional migration * hints. Supported standalone scaffolds cover package/bootstrap integrity, * source layout, dependencies, and canonical generated-artifact freshness. * * @param cwd Working directory to validate for writability. * @param options Optional feature gates for additional doctor rows. * @param options.wordpressVersionCheck Include WordPress feature floor and plugin header checks. * @returns Ordered doctor check rows ready for CLI rendering. */ export declare function getDoctorChecks(cwd: string, options?: GetDoctorChecksOptions): Promise; /** * Return failed rows that contribute to the process exit code for one policy. */ export declare function getDoctorExitFailureChecks(checks: readonly DoctorCheck[], options?: DoctorSummaryOptions): DoctorCheck[]; /** * Format only exit-contributing doctor failures for structured diagnostics. */ export declare function getDoctorExitFailureDetailLines(checks: readonly DoctorCheck[], options?: DoctorSummaryOptions): string[]; /** * Build the stable JSON summary for one doctor run. */ export declare function createDoctorRunSummary(checks: readonly DoctorCheck[], options?: DoctorSummaryOptions): DoctorRunSummary; /** * Run doctor checks, render each line, and fail when one or more failed checks * contribute to the exit code under the active exit policy. * * The default `strict` policy treats every failed row as exit-contributing. * The `workspace-only` policy only fails on workspace-scoped rows so * environment/runtime failures remain advisory for CI gates that only care * about generated workspace artifacts. * * @param cwd Working directory to validate. * @param options Optional renderer overrides and exit-policy selection. * @param options.exitPolicy Policy deciding which failed checks contribute to the process exit code. * @param options.renderLine Optional renderer for each check row. Defaults to the stdout line printer. * @param options.renderSummaryLine Optional renderer for the summary row. Defaults to the stdout line printer unless a custom `renderLine` suppresses implicit summary output. * @param options.wordpressVersionCheck Include WordPress feature floor and plugin header checks. * @returns The completed list of doctor checks. * @throws {Error} When one or more failed checks contribute to the exit code under the active policy. */ export declare function runDoctor(cwd: string, options?: RunDoctorOptions): Promise; export {};