/**
 * `neotoma doctor` — consolidated diagnostics for agent-led onboarding.
 *
 * Returns a single machine-readable snapshot covering install/runtime/API/MCP/
 * CLI instructions/permission-file state so agents do not improvise with shell
 * introspection (python3, grep, ls, cat, jq, find, which, node -e).
 */
import type { Config } from "./config.js";
import { type HooksReport } from "./hooks_detect.js";
/** Tool identifiers used across commands. */
export type ToolId = "claude-code" | "claude-desktop" | "cursor" | "codex" | "openclaw" | "windsurf" | "continue" | "vscode";
/** How the `neotoma` binary was located (if at all). */
export type ResolvedVia = "mise" | "nvm" | "fnm" | "npm" | "path" | "unknown";
/** Per-tool permission-file status. */
export interface PermissionFileStatus {
    path: string | null;
    exists: boolean;
    has_neotoma_allow: boolean;
    has_npm_install_allow: boolean;
}
/** Canonical markdown mirror state surfaced to activation. */
export interface MirrorReport {
    /** Whether mirror write-through is currently enabled. */
    enabled: boolean;
    /** Resolved absolute path of the mirror root. */
    path: string;
    /** True when the mirror path sits inside a git repo. */
    inside_git_repo: boolean;
    /** Absolute path of the enclosing git repo, or null when `inside_git_repo` is false. */
    git_repo_root: string | null;
    /** True when `<git_repo_root>/.gitignore` already ignores the mirror directory. */
    gitignored: boolean;
    /**
     * Activation may offer the mirror iff it is not already enabled. Prior
     * declines are tracked at the agent level (stored as a `user_preference`
     * during activation), not in doctor.
     */
    eligible_for_offer: boolean;
}
export type DataDirRiskCode = "icloud_drive" | "macos_synced_desktop_or_documents" | "prior_sqlite_repair_artifacts" | "dev_data_in_wrong_env";
export interface DataDirRisk {
    code: DataDirRiskCode;
    severity: "warn";
    message: string;
    suggested_action: string;
}
/** Consolidated doctor snapshot. */
export interface DoctorReport {
    neotoma: {
        installed: boolean;
        version: string | null;
        neotoma_on_path: boolean;
        node_on_path: boolean;
        resolved_via: ResolvedVia;
        which_neotoma: string | null;
        global_bin: string | null;
        global_package_dir: string | null;
        npm_global_root: string | null;
        path_fix_hint: string | null;
    };
    data: {
        config_dir: string;
        data_dir: string;
        /** Fix #170: source that resolved data_dir — env var, project-local .env, or global default. */
        data_dir_source: "env" | "project_local" | "global_default";
        /** Fix #170: the global default path when data_dir_source is NOT global_default; null otherwise. */
        global_default_data_dir: string | null;
        db_exists: boolean;
        initialized: boolean;
        risks: DataDirRisk[];
        suggested_safe_data_dir: string | null;
        /** Non-null when the dev DB has user data and the prod DB does not. */
        env_split_warning: import("./commands/db_migrate_env_split.js").EnvSplitWarning | null;
    };
    api: {
        running: boolean;
        env: "dev" | "prod" | null;
        port: number | null;
        pid: number | null;
        base_url: string | null;
    };
    mcp_servers_detected: Record<string, {
        path: string | null;
        has_neotoma: boolean;
        has_neotoma_dev: boolean;
    }>;
    cli_instructions: {
        project: {
            cursor: boolean;
            claude: boolean;
            codex: boolean;
        };
        user: {
            cursor: boolean;
            claude: boolean;
            codex: boolean;
        };
    };
    permission_files: Record<string, PermissionFileStatus>;
    current_tool_hint: ToolId | null;
    hooks: HooksReport;
    mirror: MirrorReport;
    suggested_next_step: "install" | "init" | "configure-mcp" | "configure-cli-instructions" | "configure-permissions" | "activate" | "offer-hooks" | "offer-mirror" | "ready";
}
export declare function suggestSafeDataDir(homeDir?: string): string | null;
export declare function detectDataDirRisks(params: {
    dataDir: string;
    homeDir?: string;
    platform?: NodeJS.Platform;
    hasPriorRepairArtifacts?: boolean;
}): DataDirRisk[];
/** Heuristically detect which agent harness invoked the CLI (for `current_tool_hint`). */
export declare function detectCurrentToolHint(cwd: string, env?: NodeJS.ProcessEnv): ToolId | null;
export interface RunDoctorOptions {
    cwd?: string;
    /** Optional config override (used by tests). */
    config?: Config;
}
export declare function runDoctor(opts?: RunDoctorOptions): Promise<DoctorReport>;
//# sourceMappingURL=doctor.d.ts.map