export interface ExtensionFunctionResult {
    receiver_type: string;
    extensions: Array<{
        name: string;
        file: string;
        start_line: number;
        signature?: string;
        docstring?: string;
    }>;
    total: number;
}
/**
 * Find all extension functions defined for a given receiver type.
 * Scans Kotlin symbol signatures for the `ReceiverType.` prefix pattern.
 */
export declare function findExtensionFunctions(repo: string, receiverType: string, options?: {
    file_pattern?: string;
}): Promise<ExtensionFunctionResult>;
export interface SealedHierarchyResult {
    sealed_class: {
        name: string;
        file: string;
        start_line: number;
        kind: string;
    };
    subtypes: Array<{
        name: string;
        file: string;
        start_line: number;
        kind: string;
    }>;
    when_blocks: Array<{
        file: string;
        line: number;
        branches_found: string[];
        branches_missing: string[];
        is_exhaustive: boolean;
    }>;
    total_subtypes: number;
    total_when_blocks: number;
    all_exhaustive: boolean;
}
/**
 * Analyze a sealed class/interface hierarchy.
 * Finds all subtypes and checks when() blocks for exhaustiveness.
 */
export declare function analyzeSealedHierarchy(repo: string, sealedClassName: string): Promise<SealedHierarchyResult>;
export interface SuspendDispatcherTransition {
    function: string;
    dispatcher: string;
    line: number;
}
export interface SuspendWarning {
    function: string;
    file: string;
    line: number;
    message: string;
    severity: "warning" | "critical";
}
export interface SuspendChainResult {
    root: string;
    chain: string[];
    dispatcher_transitions: SuspendDispatcherTransition[];
    warnings: SuspendWarning[];
    depth: number;
}
/**
 * Trace the suspend function call chain starting from `functionName`. Walks
 * out up to `depth` levels through callees (identified by text scan of the
 * source), filtering to suspend-only nodes. Emits dispatcher transitions and
 * coroutine anti-pattern warnings for each visited function.
 *
 * Walk strategy: we look up each callee name in the symbol index. When a
 * function body contains `otherFn(`, we recurse into the symbol named
 * `otherFn` if it exists and is a suspend function. This is intentionally
 * lexical (not call-graph) — accurate enough for typical coroutine code and
 * avoids a full graph build.
 */
export declare function traceSuspendChain(repo: string, functionName: string, options?: {
    depth?: number;
}): Promise<SuspendChainResult>;
export interface KmpMatchedDeclaration {
    name: string;
    kind: string;
    expect_source_set: string;
    actual_source_sets: string[];
}
export interface KmpMissingDeclaration {
    name: string;
    kind: string;
    source_set: string;
    missing_from: string[];
}
export interface KmpOrphanDeclaration {
    name: string;
    kind: string;
    source_set: string;
    file: string;
}
export interface KmpAnalysisResult {
    total_expects: number;
    fully_matched: number;
    source_sets_detected: string[];
    matched: KmpMatchedDeclaration[];
    missing_actuals: KmpMissingDeclaration[];
    orphan_actuals: KmpOrphanDeclaration[];
}
/**
 * Analyze KMP expect/actual declarations across source sets. Groups symbols
 * tagged with `meta.kmp_modifier` by simple name, splits them into expects
 * and actuals, and reports three verdicts per declaration:
 *
 *   - matched:         commonMain expect + at least one platform actual
 *   - missing_actuals: commonMain expect but one or more platform source
 *                      sets (discovered from the index files list) have no
 *                      corresponding `actual`
 *   - orphan_actuals:  actual without any commonMain expect
 */
export declare function analyzeKmpDeclarations(repo: string): Promise<KmpAnalysisResult>;
export interface FlowChainResult {
    root: string;
    file: string;
    start_line: number;
    operators: string[];
    operator_count: number;
    has_terminal: boolean;
    warnings: string[];
}
/**
 * Trace a Kotlin Flow operator chain from a function or property. Scans the
 * symbol source for `.operator(` calls matching known Flow operators, reports
 * the ordered chain, and flags common issues:
 *
 *   - `.collect` without `.catch` — unhandled exception in flow
 *   - `.stateIn(initialValue=...)` without a scope parameter — missing
 *     lifecycle binding (requires `viewModelScope` or `lifecycleScope`)
 *
 * The function name can be either a function returning Flow<T> or a property
 * initialized with a Flow chain.
 */
export declare function traceFlowChain(repo: string, symbolName: string): Promise<FlowChainResult>;
//# sourceMappingURL=kotlin-tools.d.ts.map