import type { EmbeddingProvider } from "./embedding-provider";
export declare const SYNAPSE_DEFAULT_MODEL = "gte-modernbert-base-f16";
export declare const SYNAPSE_MAX_INPUT_TOKENS = 8192;
export declare const SYNAPSE_DEFAULT_QUERY_TIMEOUT_MS = 3000;
export declare const SYNAPSE_DEFAULT_BATCH_TIMEOUT_MS = 120000;
export type SynapseErrorCode = "queue_full" | "model_loading" | "transport" | "timeout" | "artifact_invalid" | "substitution_rejected" | "not_certified" | "probe_required" | "idempotency_conflict" | "schema_violation" | "module_restarted";
export interface SynapseCatalogEntry {
    model: string;
    fingerprint: string;
    table_epoch: number;
    dims?: number;
    recommended_batch?: number;
    provenance?: unknown;
    certified?: boolean;
    status?: string;
}
export interface SynapseLaneMetadata extends SynapseCatalogEntry {
    laneIdentity: string;
}
export interface SynapseClientLike {
    call<Response = unknown>(moduleId: string, method: string, params?: unknown, options?: {
        timeoutMs?: number;
        identity?: {
            project_root: string;
            harness: string;
            session: string;
        };
        targetKind?: "management_surface" | "tool_provider";
    }): Promise<Response>;
    close(): void;
}
export interface SynapseEmbeddingProviderOptions {
    connectionFile: string;
    projectRoot: string;
    session: string;
    model?: string;
    fingerprint?: string;
    tableEpoch?: number;
    dims?: number;
    recommendedBatch?: number;
    provenance?: unknown;
    moduleId?: string;
    queryTimeoutMs?: number;
    batchTimeoutMs?: number;
    clientFactory?: () => Promise<SynapseClientLike>;
}
export declare class SynapseEmbeddingError extends Error {
    readonly code: SynapseErrorCode;
    readonly retryAfterMs?: number;
    readonly permanent: boolean;
    constructor(code: SynapseErrorCode, message: string, options?: {
        retryAfterMs?: number;
        permanent?: boolean;
        cause?: unknown;
    });
}
export declare function getSynapseLaneIdentity(model: string, fingerprint: string): string;
export declare function getSynapseBatchRequestKey(args: {
    model: string;
    fingerprint: string;
    tableEpoch: number;
    items: readonly {
        id: string;
        contentSha256: string;
    }[];
}): string;
export declare class SynapseEmbeddingProvider implements EmbeddingProvider {
    modelId: string;
    readonly maxInputTokens = 8192;
    metadata: SynapseLaneMetadata | null;
    private readonly options;
    private client;
    private initialized;
    private initializing;
    private permanentFailure;
    private batchLimit;
    constructor(options: SynapseEmbeddingProviderOptions);
    static discover(options: SynapseEmbeddingProviderOptions): Promise<SynapseLaneMetadata>;
    initialize(): Promise<boolean>;
    embed(text: string, signal?: AbortSignal): Promise<Float32Array | null>;
    embedBatch(texts: string[], signal?: AbortSignal): Promise<(Float32Array | null)[]>;
    embedItems(items: readonly {
        id: string;
        text: string;
        contentSha256: string;
    }[], signal?: AbortSignal): Promise<Map<string, Float32Array>>;
    dispose(): Promise<void>;
    isLoaded(): boolean;
    private requestConstraints;
    private batchRequest;
    private requestKey;
    private pollBatch;
    private callWithRetry;
    private validateResponse;
    private logCallFailure;
}
export declare function _resetSynapseClientForTests(): void;
//# sourceMappingURL=embedding-synapse.d.ts.map