import type { RAGBackendsResponse, RAGContentFormat, RAGChunkingStrategy, RAGMutationResponse, RAGSyncResponse, RAGSyncRunOptions } from "@absolutejs/ai";
export declare const useRAGIndexAdmin: (path: string) => {
    backends: import("vue").Ref<{
        ok: true;
        defaultMode?: string | undefined;
        activeModeCookie?: string | undefined;
        backends: {
            id: string;
            label: string;
            path?: string | undefined;
            available: boolean;
            reason?: string | undefined;
            lastSeedMs?: number | undefined;
            status?: {
                backend: "in_memory";
                vectorMode: "in_memory";
                dimensions?: number | undefined;
                native?: undefined | undefined;
            } | {
                backend: "sqlite";
                vectorMode: "json_fallback" | "native_vec0";
                dimensions?: number | undefined;
                native?: {
                    requested: boolean;
                    available: boolean;
                    active: boolean;
                    mode?: "vec0" | undefined;
                    tableName?: string | undefined;
                    distanceMetric?: "cosine" | "l2" | undefined;
                    rowCount?: number | undefined;
                    pageCount?: number | undefined;
                    freelistCount?: number | undefined;
                    databaseBytes?: number | undefined;
                    lastHealthCheckAt?: number | undefined;
                    lastAnalyzeAt?: number | undefined;
                    resolution?: {
                        status: import("@absolutejs/ai").SQLiteVecResolutionStatus;
                        source: import("@absolutejs/ai").SQLiteVecResolutionSource;
                        platformKey: string;
                        packageName?: string | undefined;
                        packageVersion?: string | undefined;
                        packageRoot?: string | undefined;
                        libraryFile?: string | undefined;
                        libraryPath?: string | undefined;
                        reason?: string | undefined;
                    } | undefined;
                    fallbackReason?: string | undefined;
                    lastAnalyzeError?: string | undefined;
                    lastHealthError?: string | undefined;
                    lastLoadError?: string | undefined;
                    lastQueryError?: string | undefined;
                    lastUpsertError?: string | undefined;
                    lastQueryPlan?: {
                        pushdownMode: "none" | "partial" | "full";
                        pushdownApplied: boolean;
                        pushdownClauseCount: number;
                        totalFilterClauseCount: number;
                        jsRemainderClauseCount: number;
                        plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                        queryMultiplierUsed?: number | undefined;
                        candidateLimitUsed?: number | undefined;
                        maxBackfillsUsed?: number | undefined;
                        minResultsUsed?: number | undefined;
                        fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                        pushdownCoverageRatio?: number | undefined;
                        jsRemainderRatio?: number | undefined;
                        filteredCandidateCount?: number | undefined;
                        initialSearchK?: number | undefined;
                        finalSearchK?: number | undefined;
                        searchExpansionRatio?: number | undefined;
                        backfillCount?: number | undefined;
                        backfillLimitReached?: boolean | undefined;
                        minResultsSatisfied?: boolean | undefined;
                        returnedCount?: number | undefined;
                        candidateYieldRatio?: number | undefined;
                        topKFillRatio?: number | undefined;
                        underfilledTopK?: boolean | undefined;
                        candidateBudgetExhausted?: boolean | undefined;
                        candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                        queryMode: "json_fallback" | "native_vec0";
                    } | undefined;
                } | undefined;
            } | {
                backend: "postgres";
                vectorMode: "native_pgvector";
                dimensions?: number | undefined;
                native?: {
                    requested: boolean;
                    available: boolean;
                    active: boolean;
                    mode?: "pgvector" | undefined;
                    extensionName?: string | undefined;
                    schemaName?: string | undefined;
                    tableName?: string | undefined;
                    distanceMetric?: "cosine" | "l2" | "inner_product" | undefined;
                    indexType?: "none" | "hnsw" | "ivfflat" | undefined;
                    indexName?: string | undefined;
                    indexPresent?: boolean | undefined;
                    estimatedRowCount?: number | undefined;
                    tableBytes?: number | undefined;
                    indexBytes?: number | undefined;
                    totalBytes?: number | undefined;
                    lastHealthCheckAt?: number | undefined;
                    lastAnalyzeAt?: number | undefined;
                    lastReindexAt?: number | undefined;
                    fallbackReason?: string | undefined;
                    lastAnalyzeError?: string | undefined;
                    lastInitError?: string | undefined;
                    lastQueryError?: string | undefined;
                    lastReindexError?: string | undefined;
                    lastUpsertError?: string | undefined;
                    lastMigrationError?: string | undefined;
                    lastHealthError?: string | undefined;
                    lastFilterDebug?: {
                        filter?: Record<string, unknown> | undefined;
                        pushdownFilter?: Record<string, unknown> | undefined;
                        countSql?: string | undefined;
                        countParams?: unknown[] | undefined;
                        querySql?: string | undefined;
                        queryParams?: unknown[] | undefined;
                        countResultRaw?: unknown;
                        queryRowCount?: number | undefined;
                    } | undefined;
                    lastQueryPlan?: {
                        pushdownMode: "none" | "partial" | "full";
                        pushdownApplied: boolean;
                        pushdownClauseCount: number;
                        totalFilterClauseCount: number;
                        jsRemainderClauseCount: number;
                        plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                        queryMultiplierUsed?: number | undefined;
                        candidateLimitUsed?: number | undefined;
                        maxBackfillsUsed?: number | undefined;
                        minResultsUsed?: number | undefined;
                        fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                        pushdownCoverageRatio?: number | undefined;
                        jsRemainderRatio?: number | undefined;
                        filteredCandidateCount?: number | undefined;
                        initialSearchK?: number | undefined;
                        finalSearchK?: number | undefined;
                        searchExpansionRatio?: number | undefined;
                        backfillCount?: number | undefined;
                        backfillLimitReached?: boolean | undefined;
                        minResultsSatisfied?: boolean | undefined;
                        returnedCount?: number | undefined;
                        candidateYieldRatio?: number | undefined;
                        topKFillRatio?: number | undefined;
                        underfilledTopK?: boolean | undefined;
                        candidateBudgetExhausted?: boolean | undefined;
                        candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                        queryMode: "native_pgvector";
                    } | undefined;
                } | undefined;
            } | undefined;
            capabilities?: {
                backend: "in_memory" | "sqlite" | "postgres" | "custom";
                persistence: "memory_only" | "embedded" | "external";
                nativeVectorSearch: boolean;
                serverSideFiltering: boolean;
                streamingIngestStatus: boolean;
            } | undefined;
        }[];
    } | null, RAGBackendsResponse | {
        ok: true;
        defaultMode?: string | undefined;
        activeModeCookie?: string | undefined;
        backends: {
            id: string;
            label: string;
            path?: string | undefined;
            available: boolean;
            reason?: string | undefined;
            lastSeedMs?: number | undefined;
            status?: {
                backend: "in_memory";
                vectorMode: "in_memory";
                dimensions?: number | undefined;
                native?: undefined | undefined;
            } | {
                backend: "sqlite";
                vectorMode: "json_fallback" | "native_vec0";
                dimensions?: number | undefined;
                native?: {
                    requested: boolean;
                    available: boolean;
                    active: boolean;
                    mode?: "vec0" | undefined;
                    tableName?: string | undefined;
                    distanceMetric?: "cosine" | "l2" | undefined;
                    rowCount?: number | undefined;
                    pageCount?: number | undefined;
                    freelistCount?: number | undefined;
                    databaseBytes?: number | undefined;
                    lastHealthCheckAt?: number | undefined;
                    lastAnalyzeAt?: number | undefined;
                    resolution?: {
                        status: import("@absolutejs/ai").SQLiteVecResolutionStatus;
                        source: import("@absolutejs/ai").SQLiteVecResolutionSource;
                        platformKey: string;
                        packageName?: string | undefined;
                        packageVersion?: string | undefined;
                        packageRoot?: string | undefined;
                        libraryFile?: string | undefined;
                        libraryPath?: string | undefined;
                        reason?: string | undefined;
                    } | undefined;
                    fallbackReason?: string | undefined;
                    lastAnalyzeError?: string | undefined;
                    lastHealthError?: string | undefined;
                    lastLoadError?: string | undefined;
                    lastQueryError?: string | undefined;
                    lastUpsertError?: string | undefined;
                    lastQueryPlan?: {
                        pushdownMode: "none" | "partial" | "full";
                        pushdownApplied: boolean;
                        pushdownClauseCount: number;
                        totalFilterClauseCount: number;
                        jsRemainderClauseCount: number;
                        plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                        queryMultiplierUsed?: number | undefined;
                        candidateLimitUsed?: number | undefined;
                        maxBackfillsUsed?: number | undefined;
                        minResultsUsed?: number | undefined;
                        fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                        pushdownCoverageRatio?: number | undefined;
                        jsRemainderRatio?: number | undefined;
                        filteredCandidateCount?: number | undefined;
                        initialSearchK?: number | undefined;
                        finalSearchK?: number | undefined;
                        searchExpansionRatio?: number | undefined;
                        backfillCount?: number | undefined;
                        backfillLimitReached?: boolean | undefined;
                        minResultsSatisfied?: boolean | undefined;
                        returnedCount?: number | undefined;
                        candidateYieldRatio?: number | undefined;
                        topKFillRatio?: number | undefined;
                        underfilledTopK?: boolean | undefined;
                        candidateBudgetExhausted?: boolean | undefined;
                        candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                        queryMode: "json_fallback" | "native_vec0";
                    } | undefined;
                } | undefined;
            } | {
                backend: "postgres";
                vectorMode: "native_pgvector";
                dimensions?: number | undefined;
                native?: {
                    requested: boolean;
                    available: boolean;
                    active: boolean;
                    mode?: "pgvector" | undefined;
                    extensionName?: string | undefined;
                    schemaName?: string | undefined;
                    tableName?: string | undefined;
                    distanceMetric?: "cosine" | "l2" | "inner_product" | undefined;
                    indexType?: "none" | "hnsw" | "ivfflat" | undefined;
                    indexName?: string | undefined;
                    indexPresent?: boolean | undefined;
                    estimatedRowCount?: number | undefined;
                    tableBytes?: number | undefined;
                    indexBytes?: number | undefined;
                    totalBytes?: number | undefined;
                    lastHealthCheckAt?: number | undefined;
                    lastAnalyzeAt?: number | undefined;
                    lastReindexAt?: number | undefined;
                    fallbackReason?: string | undefined;
                    lastAnalyzeError?: string | undefined;
                    lastInitError?: string | undefined;
                    lastQueryError?: string | undefined;
                    lastReindexError?: string | undefined;
                    lastUpsertError?: string | undefined;
                    lastMigrationError?: string | undefined;
                    lastHealthError?: string | undefined;
                    lastFilterDebug?: {
                        filter?: Record<string, unknown> | undefined;
                        pushdownFilter?: Record<string, unknown> | undefined;
                        countSql?: string | undefined;
                        countParams?: unknown[] | undefined;
                        querySql?: string | undefined;
                        queryParams?: unknown[] | undefined;
                        countResultRaw?: unknown;
                        queryRowCount?: number | undefined;
                    } | undefined;
                    lastQueryPlan?: {
                        pushdownMode: "none" | "partial" | "full";
                        pushdownApplied: boolean;
                        pushdownClauseCount: number;
                        totalFilterClauseCount: number;
                        jsRemainderClauseCount: number;
                        plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                        queryMultiplierUsed?: number | undefined;
                        candidateLimitUsed?: number | undefined;
                        maxBackfillsUsed?: number | undefined;
                        minResultsUsed?: number | undefined;
                        fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                        pushdownCoverageRatio?: number | undefined;
                        jsRemainderRatio?: number | undefined;
                        filteredCandidateCount?: number | undefined;
                        initialSearchK?: number | undefined;
                        finalSearchK?: number | undefined;
                        searchExpansionRatio?: number | undefined;
                        backfillCount?: number | undefined;
                        backfillLimitReached?: boolean | undefined;
                        minResultsSatisfied?: boolean | undefined;
                        returnedCount?: number | undefined;
                        candidateYieldRatio?: number | undefined;
                        topKFillRatio?: number | undefined;
                        underfilledTopK?: boolean | undefined;
                        candidateBudgetExhausted?: boolean | undefined;
                        candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                        queryMode: "native_pgvector";
                    } | undefined;
                } | undefined;
            } | undefined;
            capabilities?: {
                backend: "in_memory" | "sqlite" | "postgres" | "custom";
                persistence: "memory_only" | "embedded" | "external";
                nativeVectorSearch: boolean;
                serverSideFiltering: boolean;
                streamingIngestStatus: boolean;
            } | undefined;
        }[];
    } | null>;
    analyzeBackend: () => Promise<RAGMutationResponse>;
    clearIndex: () => Promise<{
        ok: boolean;
    }>;
    createDocument: (input: {
        id?: string;
        title?: string;
        source?: string;
        text: string;
        format?: RAGContentFormat;
        metadata?: Record<string, unknown>;
        chunking?: {
            maxChunkLength?: number;
            chunkOverlap?: number;
            minChunkLength?: number;
            strategy?: RAGChunkingStrategy;
        };
    }) => Promise<RAGMutationResponse>;
    deleteDocument: (id: string) => Promise<RAGMutationResponse>;
    error: import("vue").Ref<string | null, string | null>;
    isLoading: import("vue").Ref<boolean, boolean>;
    lastMutation: import("vue").Ref<{
        ok: boolean;
        error?: string | undefined;
        deleted?: string | undefined;
        inserted?: string | undefined;
        reindexed?: string | undefined;
        status?: string | undefined;
        documents?: number | undefined;
        maintenance?: {
            backend: Exclude<import("@absolutejs/ai").RAGVectorStoreStatus["backend"], "in_memory">;
            activeJobs: {
                action: "analyze_backend" | "rebuild_native_index";
                startedAt: number;
                target?: string | undefined;
            }[];
            recentActions: {
                action: "analyze_backend" | "rebuild_native_index";
                status: import("@absolutejs/ai").RAGAdminActionRecord["status"];
                finishedAt?: number | undefined;
                target?: string | undefined;
                error?: string | undefined;
            }[];
            recommendations: {
                code: "backend_statistics_refresh_recommended" | "native_backend_inactive" | "native_backend_recent_errors" | "native_index_missing" | "native_index_rebuild_recommended" | "sqlite_storage_optimization_recommended";
                message: string;
                severity: "info" | "warning" | "error";
                action?: "analyze_backend" | "rebuild_native_index" | undefined;
            }[];
        } | undefined;
        workflowStatus?: {
            backend: "in_memory";
            vectorMode: "in_memory";
            dimensions?: number | undefined;
            native?: undefined | undefined;
        } | {
            backend: "sqlite";
            vectorMode: "json_fallback" | "native_vec0";
            dimensions?: number | undefined;
            native?: {
                requested: boolean;
                available: boolean;
                active: boolean;
                mode?: "vec0" | undefined;
                tableName?: string | undefined;
                distanceMetric?: "cosine" | "l2" | undefined;
                rowCount?: number | undefined;
                pageCount?: number | undefined;
                freelistCount?: number | undefined;
                databaseBytes?: number | undefined;
                lastHealthCheckAt?: number | undefined;
                lastAnalyzeAt?: number | undefined;
                resolution?: {
                    status: import("@absolutejs/ai").SQLiteVecResolutionStatus;
                    source: import("@absolutejs/ai").SQLiteVecResolutionSource;
                    platformKey: string;
                    packageName?: string | undefined;
                    packageVersion?: string | undefined;
                    packageRoot?: string | undefined;
                    libraryFile?: string | undefined;
                    libraryPath?: string | undefined;
                    reason?: string | undefined;
                } | undefined;
                fallbackReason?: string | undefined;
                lastAnalyzeError?: string | undefined;
                lastHealthError?: string | undefined;
                lastLoadError?: string | undefined;
                lastQueryError?: string | undefined;
                lastUpsertError?: string | undefined;
                lastQueryPlan?: {
                    pushdownMode: "none" | "partial" | "full";
                    pushdownApplied: boolean;
                    pushdownClauseCount: number;
                    totalFilterClauseCount: number;
                    jsRemainderClauseCount: number;
                    plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                    queryMultiplierUsed?: number | undefined;
                    candidateLimitUsed?: number | undefined;
                    maxBackfillsUsed?: number | undefined;
                    minResultsUsed?: number | undefined;
                    fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                    pushdownCoverageRatio?: number | undefined;
                    jsRemainderRatio?: number | undefined;
                    filteredCandidateCount?: number | undefined;
                    initialSearchK?: number | undefined;
                    finalSearchK?: number | undefined;
                    searchExpansionRatio?: number | undefined;
                    backfillCount?: number | undefined;
                    backfillLimitReached?: boolean | undefined;
                    minResultsSatisfied?: boolean | undefined;
                    returnedCount?: number | undefined;
                    candidateYieldRatio?: number | undefined;
                    topKFillRatio?: number | undefined;
                    underfilledTopK?: boolean | undefined;
                    candidateBudgetExhausted?: boolean | undefined;
                    candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                    queryMode: "json_fallback" | "native_vec0";
                } | undefined;
            } | undefined;
        } | {
            backend: "postgres";
            vectorMode: "native_pgvector";
            dimensions?: number | undefined;
            native?: {
                requested: boolean;
                available: boolean;
                active: boolean;
                mode?: "pgvector" | undefined;
                extensionName?: string | undefined;
                schemaName?: string | undefined;
                tableName?: string | undefined;
                distanceMetric?: "cosine" | "l2" | "inner_product" | undefined;
                indexType?: "none" | "hnsw" | "ivfflat" | undefined;
                indexName?: string | undefined;
                indexPresent?: boolean | undefined;
                estimatedRowCount?: number | undefined;
                tableBytes?: number | undefined;
                indexBytes?: number | undefined;
                totalBytes?: number | undefined;
                lastHealthCheckAt?: number | undefined;
                lastAnalyzeAt?: number | undefined;
                lastReindexAt?: number | undefined;
                fallbackReason?: string | undefined;
                lastAnalyzeError?: string | undefined;
                lastInitError?: string | undefined;
                lastQueryError?: string | undefined;
                lastReindexError?: string | undefined;
                lastUpsertError?: string | undefined;
                lastMigrationError?: string | undefined;
                lastHealthError?: string | undefined;
                lastFilterDebug?: {
                    filter?: Record<string, unknown> | undefined;
                    pushdownFilter?: Record<string, unknown> | undefined;
                    countSql?: string | undefined;
                    countParams?: unknown[] | undefined;
                    querySql?: string | undefined;
                    queryParams?: unknown[] | undefined;
                    countResultRaw?: unknown;
                    queryRowCount?: number | undefined;
                } | undefined;
                lastQueryPlan?: {
                    pushdownMode: "none" | "partial" | "full";
                    pushdownApplied: boolean;
                    pushdownClauseCount: number;
                    totalFilterClauseCount: number;
                    jsRemainderClauseCount: number;
                    plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                    queryMultiplierUsed?: number | undefined;
                    candidateLimitUsed?: number | undefined;
                    maxBackfillsUsed?: number | undefined;
                    minResultsUsed?: number | undefined;
                    fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                    pushdownCoverageRatio?: number | undefined;
                    jsRemainderRatio?: number | undefined;
                    filteredCandidateCount?: number | undefined;
                    initialSearchK?: number | undefined;
                    finalSearchK?: number | undefined;
                    searchExpansionRatio?: number | undefined;
                    backfillCount?: number | undefined;
                    backfillLimitReached?: boolean | undefined;
                    minResultsSatisfied?: boolean | undefined;
                    returnedCount?: number | undefined;
                    candidateYieldRatio?: number | undefined;
                    topKFillRatio?: number | undefined;
                    underfilledTopK?: boolean | undefined;
                    candidateBudgetExhausted?: boolean | undefined;
                    candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                    queryMode: "native_pgvector";
                } | undefined;
            } | undefined;
        } | undefined;
        admin?: {
            canAnalyzeBackend: boolean;
            canClearIndex: boolean;
            canCreateDocument: boolean;
            canDeleteDocument: boolean;
            canListSyncSources: boolean;
            canManageRetrievalBaselines: boolean;
            canPruneSearchTraces: boolean;
            canRebuildNativeIndex: boolean;
            canReindexDocument: boolean;
            canReindexSource: boolean;
            canReseed: boolean;
            canReset: boolean;
            canSyncAllSources: boolean;
            canSyncSource: boolean;
        } | undefined;
        adminActions?: {
            id: string;
            action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
            status: "completed" | "failed";
            startedAt: number;
            finishedAt?: number | undefined;
            elapsedMs?: number | undefined;
            documentId?: string | undefined;
            target?: string | undefined;
            error?: string | undefined;
        }[] | undefined;
        adminJobs?: {
            id: string;
            action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
            status: import("@absolutejs/ai").RAGAdminJobStatus;
            startedAt: number;
            finishedAt?: number | undefined;
            elapsedMs?: number | undefined;
            target?: string | undefined;
            error?: string | undefined;
        }[] | undefined;
        backendStats?: Record<string, {
            chunkCount: number;
            totalDocuments: number;
            elapsedMs: number;
        }> | undefined;
        document?: {
            corpusKey?: string | undefined;
            id: string;
            title: string;
            source: string;
            text?: string | undefined;
            kind?: string | undefined;
            format?: RAGContentFormat | undefined;
            chunkStrategy?: RAGChunkingStrategy | undefined;
            chunkSize?: number | undefined;
            chunkCount?: number | undefined;
            createdAt?: number | undefined;
            updatedAt?: number | undefined;
            metadata?: Record<string, unknown> | undefined;
            labels?: {
                contextLabel?: string | undefined;
                locatorLabel?: string | undefined;
                provenanceLabel?: string | undefined;
            } | undefined;
        } | undefined;
    } | null, RAGMutationResponse | {
        ok: boolean;
        error?: string | undefined;
        deleted?: string | undefined;
        inserted?: string | undefined;
        reindexed?: string | undefined;
        status?: string | undefined;
        documents?: number | undefined;
        maintenance?: {
            backend: Exclude<import("@absolutejs/ai").RAGVectorStoreStatus["backend"], "in_memory">;
            activeJobs: {
                action: "analyze_backend" | "rebuild_native_index";
                startedAt: number;
                target?: string | undefined;
            }[];
            recentActions: {
                action: "analyze_backend" | "rebuild_native_index";
                status: import("@absolutejs/ai").RAGAdminActionRecord["status"];
                finishedAt?: number | undefined;
                target?: string | undefined;
                error?: string | undefined;
            }[];
            recommendations: {
                code: "backend_statistics_refresh_recommended" | "native_backend_inactive" | "native_backend_recent_errors" | "native_index_missing" | "native_index_rebuild_recommended" | "sqlite_storage_optimization_recommended";
                message: string;
                severity: "info" | "warning" | "error";
                action?: "analyze_backend" | "rebuild_native_index" | undefined;
            }[];
        } | undefined;
        workflowStatus?: {
            backend: "in_memory";
            vectorMode: "in_memory";
            dimensions?: number | undefined;
            native?: undefined | undefined;
        } | {
            backend: "sqlite";
            vectorMode: "json_fallback" | "native_vec0";
            dimensions?: number | undefined;
            native?: {
                requested: boolean;
                available: boolean;
                active: boolean;
                mode?: "vec0" | undefined;
                tableName?: string | undefined;
                distanceMetric?: "cosine" | "l2" | undefined;
                rowCount?: number | undefined;
                pageCount?: number | undefined;
                freelistCount?: number | undefined;
                databaseBytes?: number | undefined;
                lastHealthCheckAt?: number | undefined;
                lastAnalyzeAt?: number | undefined;
                resolution?: {
                    status: import("@absolutejs/ai").SQLiteVecResolutionStatus;
                    source: import("@absolutejs/ai").SQLiteVecResolutionSource;
                    platformKey: string;
                    packageName?: string | undefined;
                    packageVersion?: string | undefined;
                    packageRoot?: string | undefined;
                    libraryFile?: string | undefined;
                    libraryPath?: string | undefined;
                    reason?: string | undefined;
                } | undefined;
                fallbackReason?: string | undefined;
                lastAnalyzeError?: string | undefined;
                lastHealthError?: string | undefined;
                lastLoadError?: string | undefined;
                lastQueryError?: string | undefined;
                lastUpsertError?: string | undefined;
                lastQueryPlan?: {
                    pushdownMode: "none" | "partial" | "full";
                    pushdownApplied: boolean;
                    pushdownClauseCount: number;
                    totalFilterClauseCount: number;
                    jsRemainderClauseCount: number;
                    plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                    queryMultiplierUsed?: number | undefined;
                    candidateLimitUsed?: number | undefined;
                    maxBackfillsUsed?: number | undefined;
                    minResultsUsed?: number | undefined;
                    fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                    pushdownCoverageRatio?: number | undefined;
                    jsRemainderRatio?: number | undefined;
                    filteredCandidateCount?: number | undefined;
                    initialSearchK?: number | undefined;
                    finalSearchK?: number | undefined;
                    searchExpansionRatio?: number | undefined;
                    backfillCount?: number | undefined;
                    backfillLimitReached?: boolean | undefined;
                    minResultsSatisfied?: boolean | undefined;
                    returnedCount?: number | undefined;
                    candidateYieldRatio?: number | undefined;
                    topKFillRatio?: number | undefined;
                    underfilledTopK?: boolean | undefined;
                    candidateBudgetExhausted?: boolean | undefined;
                    candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                    queryMode: "json_fallback" | "native_vec0";
                } | undefined;
            } | undefined;
        } | {
            backend: "postgres";
            vectorMode: "native_pgvector";
            dimensions?: number | undefined;
            native?: {
                requested: boolean;
                available: boolean;
                active: boolean;
                mode?: "pgvector" | undefined;
                extensionName?: string | undefined;
                schemaName?: string | undefined;
                tableName?: string | undefined;
                distanceMetric?: "cosine" | "l2" | "inner_product" | undefined;
                indexType?: "none" | "hnsw" | "ivfflat" | undefined;
                indexName?: string | undefined;
                indexPresent?: boolean | undefined;
                estimatedRowCount?: number | undefined;
                tableBytes?: number | undefined;
                indexBytes?: number | undefined;
                totalBytes?: number | undefined;
                lastHealthCheckAt?: number | undefined;
                lastAnalyzeAt?: number | undefined;
                lastReindexAt?: number | undefined;
                fallbackReason?: string | undefined;
                lastAnalyzeError?: string | undefined;
                lastInitError?: string | undefined;
                lastQueryError?: string | undefined;
                lastReindexError?: string | undefined;
                lastUpsertError?: string | undefined;
                lastMigrationError?: string | undefined;
                lastHealthError?: string | undefined;
                lastFilterDebug?: {
                    filter?: Record<string, unknown> | undefined;
                    pushdownFilter?: Record<string, unknown> | undefined;
                    countSql?: string | undefined;
                    countParams?: unknown[] | undefined;
                    querySql?: string | undefined;
                    queryParams?: unknown[] | undefined;
                    countResultRaw?: unknown;
                    queryRowCount?: number | undefined;
                } | undefined;
                lastQueryPlan?: {
                    pushdownMode: "none" | "partial" | "full";
                    pushdownApplied: boolean;
                    pushdownClauseCount: number;
                    totalFilterClauseCount: number;
                    jsRemainderClauseCount: number;
                    plannerProfileUsed?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
                    queryMultiplierUsed?: number | undefined;
                    candidateLimitUsed?: number | undefined;
                    maxBackfillsUsed?: number | undefined;
                    minResultsUsed?: number | undefined;
                    fillPolicyUsed?: "strict_topk" | "satisfy_min_results" | undefined;
                    pushdownCoverageRatio?: number | undefined;
                    jsRemainderRatio?: number | undefined;
                    filteredCandidateCount?: number | undefined;
                    initialSearchK?: number | undefined;
                    finalSearchK?: number | undefined;
                    searchExpansionRatio?: number | undefined;
                    backfillCount?: number | undefined;
                    backfillLimitReached?: boolean | undefined;
                    minResultsSatisfied?: boolean | undefined;
                    returnedCount?: number | undefined;
                    candidateYieldRatio?: number | undefined;
                    topKFillRatio?: number | undefined;
                    underfilledTopK?: boolean | undefined;
                    candidateBudgetExhausted?: boolean | undefined;
                    candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
                    queryMode: "native_pgvector";
                } | undefined;
            } | undefined;
        } | undefined;
        admin?: {
            canAnalyzeBackend: boolean;
            canClearIndex: boolean;
            canCreateDocument: boolean;
            canDeleteDocument: boolean;
            canListSyncSources: boolean;
            canManageRetrievalBaselines: boolean;
            canPruneSearchTraces: boolean;
            canRebuildNativeIndex: boolean;
            canReindexDocument: boolean;
            canReindexSource: boolean;
            canReseed: boolean;
            canReset: boolean;
            canSyncAllSources: boolean;
            canSyncSource: boolean;
        } | undefined;
        adminActions?: {
            id: string;
            action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
            status: "completed" | "failed";
            startedAt: number;
            finishedAt?: number | undefined;
            elapsedMs?: number | undefined;
            documentId?: string | undefined;
            target?: string | undefined;
            error?: string | undefined;
        }[] | undefined;
        adminJobs?: {
            id: string;
            action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
            status: import("@absolutejs/ai").RAGAdminJobStatus;
            startedAt: number;
            finishedAt?: number | undefined;
            elapsedMs?: number | undefined;
            target?: string | undefined;
            error?: string | undefined;
        }[] | undefined;
        backendStats?: Record<string, {
            chunkCount: number;
            totalDocuments: number;
            elapsedMs: number;
        }> | undefined;
        document?: {
            corpusKey?: string | undefined;
            id: string;
            title: string;
            source: string;
            text?: string | undefined;
            kind?: string | undefined;
            format?: RAGContentFormat | undefined;
            chunkStrategy?: RAGChunkingStrategy | undefined;
            chunkSize?: number | undefined;
            chunkCount?: number | undefined;
            createdAt?: number | undefined;
            updatedAt?: number | undefined;
            metadata?: Record<string, unknown> | undefined;
            labels?: {
                contextLabel?: string | undefined;
                locatorLabel?: string | undefined;
                provenanceLabel?: string | undefined;
            } | undefined;
        } | undefined;
    } | null>;
    loadBackends: () => Promise<RAGBackendsResponse>;
    loadSyncSources: () => Promise<RAGSyncResponse>;
    rebuildNativeIndex: () => Promise<RAGMutationResponse>;
    reindexDocument: (id: string) => Promise<RAGMutationResponse>;
    reindexSource: (source: string) => Promise<RAGMutationResponse>;
    reseed: () => Promise<RAGMutationResponse>;
    reset: () => Promise<RAGMutationResponse>;
    resetState: () => void;
    syncAllSources: (options?: RAGSyncRunOptions) => Promise<{
        ok: true;
        source: import("@absolutejs/ai").RAGSyncSourceRecord;
        partial?: boolean;
    } | {
        ok: true;
        sources: import("@absolutejs/ai").RAGSyncSourceRecord[];
        partial?: boolean;
        failedSourceIds?: string[];
        errorsBySource?: Record<string, string>;
    }>;
    syncSource: (id: string, options?: RAGSyncRunOptions) => Promise<{
        ok: true;
        source: import("@absolutejs/ai").RAGSyncSourceRecord;
        partial?: boolean;
    } | {
        ok: true;
        sources: import("@absolutejs/ai").RAGSyncSourceRecord[];
        partial?: boolean;
        failedSourceIds?: string[];
        errorsBySource?: Record<string, string>;
    }>;
    syncSources: import("vue").Ref<{
        ok: true;
        source: {
            id: string;
            label: string;
            kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
            status: import("@absolutejs/ai").RAGSyncSourceStatus;
            description?: string | undefined;
            target?: string | undefined;
            lastStartedAt?: number | undefined;
            lastSyncedAt?: number | undefined;
            lastSyncDurationMs?: number | undefined;
            lastError?: string | undefined;
            lastSuccessfulSyncAt?: number | undefined;
            consecutiveFailures?: number | undefined;
            retryAttempts?: number | undefined;
            nextRetryAt?: number | undefined;
            documentCount?: number | undefined;
            chunkCount?: number | undefined;
            reconciliation?: {
                refreshMode: "noop" | "targeted";
                staleDocumentIds: string[];
                staleSyncKeys: string[];
                refreshedDocumentIds: string[];
                refreshedSyncKeys: string[];
                unchangedDocumentIds: string[];
                unchangedSyncKeys: string[];
                targetedRefreshSyncKeys: string[];
                duplicateSyncKeyGroups: {
                    syncKey: string;
                    count: number;
                    documentIds: string[];
                }[];
                lineageConflicts: {
                    syncKey: string;
                    lineageIds: string[];
                    versionIds: string[];
                    latestDocumentIds: string[];
                    documentIds: string[];
                    documents: {
                        documentId: string;
                        lineageId?: string | undefined;
                        versionId?: string | undefined;
                        versionNumber?: number | undefined;
                        isLatestVersion: boolean;
                    }[];
                    reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
                }[];
            } | undefined;
            diagnostics?: {
                summary: string;
                entries: {
                    code: import("@absolutejs/ai").RAGSyncSourceDiagnosticCode;
                    severity: "info" | "warning" | "error";
                    summary: string;
                }[];
                extractionFailures?: {
                    itemLabel: string;
                    itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
                    reason: string;
                    remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
                }[] | undefined;
                retryGuidance?: {
                    action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
                    reason: string;
                    nextRetryAt?: number | undefined;
                    resumeCursor?: string | undefined;
                    syncKeys?: string[] | undefined;
                } | undefined;
            } | undefined;
            metadata?: Record<string, unknown> | undefined;
        };
        partial?: boolean | undefined;
    } | {
        ok: true;
        sources: {
            id: string;
            label: string;
            kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
            status: import("@absolutejs/ai").RAGSyncSourceStatus;
            description?: string | undefined;
            target?: string | undefined;
            lastStartedAt?: number | undefined;
            lastSyncedAt?: number | undefined;
            lastSyncDurationMs?: number | undefined;
            lastError?: string | undefined;
            lastSuccessfulSyncAt?: number | undefined;
            consecutiveFailures?: number | undefined;
            retryAttempts?: number | undefined;
            nextRetryAt?: number | undefined;
            documentCount?: number | undefined;
            chunkCount?: number | undefined;
            reconciliation?: {
                refreshMode: "noop" | "targeted";
                staleDocumentIds: string[];
                staleSyncKeys: string[];
                refreshedDocumentIds: string[];
                refreshedSyncKeys: string[];
                unchangedDocumentIds: string[];
                unchangedSyncKeys: string[];
                targetedRefreshSyncKeys: string[];
                duplicateSyncKeyGroups: {
                    syncKey: string;
                    count: number;
                    documentIds: string[];
                }[];
                lineageConflicts: {
                    syncKey: string;
                    lineageIds: string[];
                    versionIds: string[];
                    latestDocumentIds: string[];
                    documentIds: string[];
                    documents: {
                        documentId: string;
                        lineageId?: string | undefined;
                        versionId?: string | undefined;
                        versionNumber?: number | undefined;
                        isLatestVersion: boolean;
                    }[];
                    reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
                }[];
            } | undefined;
            diagnostics?: {
                summary: string;
                entries: {
                    code: import("@absolutejs/ai").RAGSyncSourceDiagnosticCode;
                    severity: "info" | "warning" | "error";
                    summary: string;
                }[];
                extractionFailures?: {
                    itemLabel: string;
                    itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
                    reason: string;
                    remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
                }[] | undefined;
                retryGuidance?: {
                    action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
                    reason: string;
                    nextRetryAt?: number | undefined;
                    resumeCursor?: string | undefined;
                    syncKeys?: string[] | undefined;
                } | undefined;
            } | undefined;
            metadata?: Record<string, unknown> | undefined;
        }[];
        partial?: boolean | undefined;
        failedSourceIds?: string[] | undefined;
        errorsBySource?: Record<string, string> | undefined;
    } | {
        ok: false;
        error: string;
    } | null, RAGSyncResponse | {
        ok: true;
        source: {
            id: string;
            label: string;
            kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
            status: import("@absolutejs/ai").RAGSyncSourceStatus;
            description?: string | undefined;
            target?: string | undefined;
            lastStartedAt?: number | undefined;
            lastSyncedAt?: number | undefined;
            lastSyncDurationMs?: number | undefined;
            lastError?: string | undefined;
            lastSuccessfulSyncAt?: number | undefined;
            consecutiveFailures?: number | undefined;
            retryAttempts?: number | undefined;
            nextRetryAt?: number | undefined;
            documentCount?: number | undefined;
            chunkCount?: number | undefined;
            reconciliation?: {
                refreshMode: "noop" | "targeted";
                staleDocumentIds: string[];
                staleSyncKeys: string[];
                refreshedDocumentIds: string[];
                refreshedSyncKeys: string[];
                unchangedDocumentIds: string[];
                unchangedSyncKeys: string[];
                targetedRefreshSyncKeys: string[];
                duplicateSyncKeyGroups: {
                    syncKey: string;
                    count: number;
                    documentIds: string[];
                }[];
                lineageConflicts: {
                    syncKey: string;
                    lineageIds: string[];
                    versionIds: string[];
                    latestDocumentIds: string[];
                    documentIds: string[];
                    documents: {
                        documentId: string;
                        lineageId?: string | undefined;
                        versionId?: string | undefined;
                        versionNumber?: number | undefined;
                        isLatestVersion: boolean;
                    }[];
                    reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
                }[];
            } | undefined;
            diagnostics?: {
                summary: string;
                entries: {
                    code: import("@absolutejs/ai").RAGSyncSourceDiagnosticCode;
                    severity: "info" | "warning" | "error";
                    summary: string;
                }[];
                extractionFailures?: {
                    itemLabel: string;
                    itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
                    reason: string;
                    remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
                }[] | undefined;
                retryGuidance?: {
                    action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
                    reason: string;
                    nextRetryAt?: number | undefined;
                    resumeCursor?: string | undefined;
                    syncKeys?: string[] | undefined;
                } | undefined;
            } | undefined;
            metadata?: Record<string, unknown> | undefined;
        };
        partial?: boolean | undefined;
    } | {
        ok: true;
        sources: {
            id: string;
            label: string;
            kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
            status: import("@absolutejs/ai").RAGSyncSourceStatus;
            description?: string | undefined;
            target?: string | undefined;
            lastStartedAt?: number | undefined;
            lastSyncedAt?: number | undefined;
            lastSyncDurationMs?: number | undefined;
            lastError?: string | undefined;
            lastSuccessfulSyncAt?: number | undefined;
            consecutiveFailures?: number | undefined;
            retryAttempts?: number | undefined;
            nextRetryAt?: number | undefined;
            documentCount?: number | undefined;
            chunkCount?: number | undefined;
            reconciliation?: {
                refreshMode: "noop" | "targeted";
                staleDocumentIds: string[];
                staleSyncKeys: string[];
                refreshedDocumentIds: string[];
                refreshedSyncKeys: string[];
                unchangedDocumentIds: string[];
                unchangedSyncKeys: string[];
                targetedRefreshSyncKeys: string[];
                duplicateSyncKeyGroups: {
                    syncKey: string;
                    count: number;
                    documentIds: string[];
                }[];
                lineageConflicts: {
                    syncKey: string;
                    lineageIds: string[];
                    versionIds: string[];
                    latestDocumentIds: string[];
                    documentIds: string[];
                    documents: {
                        documentId: string;
                        lineageId?: string | undefined;
                        versionId?: string | undefined;
                        versionNumber?: number | undefined;
                        isLatestVersion: boolean;
                    }[];
                    reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
                }[];
            } | undefined;
            diagnostics?: {
                summary: string;
                entries: {
                    code: import("@absolutejs/ai").RAGSyncSourceDiagnosticCode;
                    severity: "info" | "warning" | "error";
                    summary: string;
                }[];
                extractionFailures?: {
                    itemLabel: string;
                    itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
                    reason: string;
                    remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
                }[] | undefined;
                retryGuidance?: {
                    action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
                    reason: string;
                    nextRetryAt?: number | undefined;
                    resumeCursor?: string | undefined;
                    syncKeys?: string[] | undefined;
                } | undefined;
            } | undefined;
            metadata?: Record<string, unknown> | undefined;
        }[];
        partial?: boolean | undefined;
        failedSourceIds?: string[] | undefined;
        errorsBySource?: Record<string, string> | undefined;
    } | {
        ok: false;
        error: string;
    } | null>;
};
export type UseRAGIndexAdminResult = ReturnType<typeof useRAGIndexAdmin>;
