/** * squad doctor — setup validation diagnostic command. * * Inspects the .squad/ directory (or hub layout) and reports * the health of every expected file / convention. Always exits 0 * because this is a diagnostic tool, not a gate. * * Inspired by @spboyer (Shayne Boyer)'s doctor command in PR bradygaster/squad#131. * * @module cli/commands/doctor */ /** Result of a single diagnostic check. */ export interface DoctorCheck { name: string; status: 'pass' | 'fail' | 'warn'; message: string; /** Optional severity hint for display; keeps the status union stable. */ severity?: 'info'; } /** Detected squad layout mode. */ export type DoctorMode = 'local' | 'remote' | 'hub'; /** * Check that Node.js is ≥22.5.0 for node:sqlite availability. * Accepts an optional version string for testing. */ export declare function checkNodeVersion(nodeVersion?: string): DoctorCheck; /** * Check that squad git sync hooks are installed when the state backend requires them. * Only runs for 'two-layer' and 'orphan' backends (which need hooks to push state branches). * Returns undefined when the check is not applicable. */ export declare function checkGitSyncHooks(cwd: string, squadDir: string): DoctorCheck | undefined; /** * Check that every LF-pinned file is actually LF *on disk*. * * `.gitattributes` governs checkout, not files already on disk: git only * re-smudges a working file when the pull also changes that file's index * content. So adding an `eol=lf` rule leaves every already-LF-in-index path * still CRLF on disk in existing Windows checkouts, indefinitely (#1793). * The symptom is not an error — a CRLF shebang survives Vite's shebang * stripping as a bare `#`, the module fails to parse, and the vitest suite * importing it reports "no tests". A green-looking zero (#1788). * * DELIBERATELY A SEPARATE IMPLEMENTATION FROM scripts/check-shebang-eol.mjs, * which owns the same invariant family for repo tooling. That script is a repo * script and is not published inside this package, so `dist/` cannot import it * without breaking every installed copy of the CLI. Do not "deduplicate" these * by adding an import across that boundary. What they must keep in sync is the * record-parsing shape above, which is pinned by tests on both sides. * * Returns undefined when the check does not apply (not a git repo, git absent, * or no LF-pinned files at all), matching the other conditional checks. */ export declare function checkWorktreeEol(cwd: string): DoctorCheck | undefined; /** * Run all doctor checks for the given working directory. * Returns an array of check results — never throws for check failures. */ export declare function runDoctor(cwd?: string): Promise; /** * Detect the squad mode for the given working directory. * Exported for tests and display. */ export declare function getDoctorMode(cwd?: string): DoctorMode; /** * Print doctor results to stdout. Intended for CLI use. */ export declare function printDoctorReport(checks: DoctorCheck[], mode: DoctorMode): void; /** * CLI entry point — run doctor and print results. */ export declare function doctorCommand(cwd?: string): Promise; //# sourceMappingURL=doctor.d.ts.map