/**
 * Shared Analysis Orchestrator
 *
 * Extracts the core analysis pipeline from the CLI analyze command into a
 * reusable function that can be called from both the CLI and a server-side
 * worker process.
 *
 * IMPORTANT: This module must NEVER call process.exit(). The caller (CLI
 * wrapper or server worker) is responsible for process lifecycle.
 */
export interface AnalyzeCallbacks {
    onProgress: (phase: string, percent: number, message: string) => void;
    onLog?: (message: string) => void;
}
export interface AnalyzeOptions {
    /**
     * Force a full re-index of the pipeline. Callers may OR this with
     * other flags that imply re-analysis (e.g. `--skills`), so the value
     * here is the PIPELINE-force signal, NOT the registry-collision
     * bypass. See `allowDuplicateName` below.
     */
    force?: boolean;
    /** Repair only search indexes without re-running full parsing/indexing. */
    repairFts?: boolean;
    /** Emit per-index FTS create logs. */
    verbose?: boolean;
    embeddings?: boolean;
    /**
     * Override the auto-skip node-count cap for embedding generation.
     * `undefined` (default) keeps the built-in 50,000-node safety limit;
     * `0` disables the cap entirely; any positive integer sets a custom cap.
     * Mapped from the CLI's `--embeddings [limit]` argument.
     */
    embeddingsNodeLimit?: number;
    /**
     * Explicitly drop any embeddings present in the existing index instead of
     * preserving them. Only meaningful when `embeddings` is false/undefined:
     * the default behavior in that case is to load the previously generated
     * embeddings and re-insert them after the rebuild so a routine
     * re-analyze does not silently wipe a long embedding pass (#issue: analyze
     * silently wipes existing embeddings when run without --embeddings).
     */
    dropEmbeddings?: boolean;
    skipGit?: boolean;
    /** Skip AGENTS.md and CLAUDE.md gitnexus block updates. */
    skipAgentsMd?: boolean;
    /** Omit volatile symbol/relationship counts from AGENTS.md and CLAUDE.md. */
    noStats?: boolean;
    /** Skip installing standard GitNexus skill files to .claude/skills/gitnexus/. */
    skipSkills?: boolean;
    /**
     * User-provided alias for the registry `name` (#829). When set,
     * forwarded to `registerRepo` so the indexed repo is stored under
     * this alias instead of the path-derived basename.
     */
    registryName?: string;
    /**
     * Bypass the `RegistryNameCollisionError` guard and allow two paths
     * to register under the same `name` (#829). Controlled by the
     * dedicated `--allow-duplicate-name` CLI flag, intentionally
     * independent from `--force` — users who hit the collision guard
     * should be able to accept the duplicate without paying the cost
     * of a pipeline re-index.
     */
    allowDuplicateName?: boolean;
    /**
     * Worker pool size override, threaded from the CLI `--workers` flag.
     * Forwarded to `PipelineOptions.workerPoolSize` so the parse phase
     * sizes the pool without `analyzeCommand` mutating `process.env`.
     * `0` disables the pool (sequential fallback); positive integer sets
     * the count; `undefined` defers to the env / auto-formula fallback.
     */
    workerPoolSize?: number;
}
export interface AnalyzeResult {
    repoName: string;
    repoPath: string;
    stats: {
        files?: number;
        nodes?: number;
        edges?: number;
        communities?: number;
        processes?: number;
        embeddings?: number;
    };
    alreadyUpToDate?: boolean;
    /** The raw pipeline result — only populated when needed by callers (e.g. skill generation). */
    pipelineResult?: any;
    /** True when analyze only repaired FTS indexes and skipped pipeline re-analysis. */
    ftsRepairedOnly?: boolean;
}
export { deriveEmbeddingMode, DEFAULT_EMBEDDING_NODE_LIMIT } from './embedding-mode.js';
export type { EmbeddingMode } from './embedding-mode.js';
export declare const PHASE_LABELS: Record<string, string>;
/**
 * Run the full GitNexus analysis pipeline.
 *
 * This is the shared core extracted from the CLI `analyze` command. It
 * handles: pipeline execution, LadybugDB loading, FTS indexing, embedding
 * generation, metadata persistence, and AI context file generation.
 *
 * The function communicates progress and log messages exclusively through
 * the {@link AnalyzeCallbacks} interface — it never writes to stdout/stderr
 * directly and never calls `process.exit()`.
 */
export declare function runFullAnalysis(repoPath: string, options: AnalyzeOptions, callbacks: AnalyzeCallbacks): Promise<AnalyzeResult>;
