import type { ProgressEvent, ProgressPhase } from '../progress-event.js';
import type { CodebaseIndex, ContentMode } from '../code/types.js';
import type { WorkspaceDocumentSet } from './types.js';
export interface WorkspacePrepareOptions {
    /** Include code indexing via buildCodebaseIndex. Default: true. */
    includeCode?: boolean;
    /** Include document inspection via inspectWorkspaceDocumentSet. Default: true. */
    includeDocuments?: boolean;
    /** Directories to exclude from both code and document discovery. */
    excludeDir?: string[];
    /** Disable .gitignore respect. */
    noGitignore?: boolean;
    /** Additional gitignore-style patterns applied after repo .gitignore rules. */
    ignorePatterns?: string[];
    /** Additional ignore overlay patterns evaluated independently from the base matcher. */
    overlayIgnorePatterns?: string[];
    /** Content retention mode for indexed code. */
    contentMode?: ContentMode;
    /** Skip code files larger than this many bytes. */
    maxFileSizeBytes?: number;
    /** Skip code files with more than this many lines. */
    maxLines?: number;
    /** Skip likely minified code files. Default: true. */
    skipMinified?: boolean;
    /** Abort long-running preparation work. */
    signal?: AbortSignal;
    /** Maximum document file size in MB. */
    largeFileLimitMb?: number;
    /** Maximum number of document files to inspect. */
    maxFiles?: number;
    /** Maximum number of documents to load for cross-reference detection. */
    maxReferenceFiles?: number;
    /** Include raw markdown content in document summaries. */
    includeMarkdown?: boolean;
    /**
     * Execution mode for code indexing.
     * - `'auto'` (default): subprocess when code indexing is enabled, inline for docs-only.
     * - `'inline'`: run code indexing in the current process.
     * - `'subprocess'`: always fork a child process for code indexing.
     */
    executionMode?: 'auto' | 'inline' | 'subprocess';
}
export interface WorkspacePreparedContext {
    rootDir: string;
    code: {
        index: CodebaseIndex;
        fileCount: number;
        nodeCount: number;
        edgeCount: number;
        contentMode: ContentMode;
        skippedFileCount: number;
    } | null;
    documents: WorkspaceDocumentSet | null;
    elapsedMs: number;
    errors: string[];
}
export interface WorkspacePreparationProgressEvent {
    /** Which subsystem is reporting: 'prepare' for overall, 'code' for indexing, 'documents' for inspection. */
    scope: 'prepare' | 'code' | 'documents';
    /** Current stage within the scope (e.g. 'discover', 'parse', 'index', 'inspect', 'references'). */
    stage: string;
    completed: number;
    total: number;
    detail?: string;
    stats?: Record<string, number>;
    /** Standard `ProgressPhase` for this event; mirrors `stage` when stage is a known phase. */
    phase?: ProgressPhase;
    /** Path of the file currently being processed, when the underlying event reported one. */
    currentPath?: string;
    /** Epoch milliseconds when the emitting operation started, when available. */
    startedAt?: number;
    /** Elapsed milliseconds since the emitting operation started, when available. */
    elapsedMs?: number;
}
export type OnPrepareProgress = (event: WorkspacePreparationProgressEvent) => void;
/**
 * Adapts a workspace preparation progress event to the standard `ProgressEvent` shape,
 * so consumers can route prepare progress through generic `OnProgress` handlers.
 * Falls back to the `'start'` phase when neither `phase` nor a recognizable `stage` is present.
 */
export declare function prepareProgressToProgressEvent(event: WorkspacePreparationProgressEvent): ProgressEvent;
