/**
 * `@embed` directive write-time hook. `createDefaultEmbedder` builds the embedder
 * a table registers for an `@embed` attribute; `buildEmbedBefore` produces the
 * pre-commit callback that runs registered embedders and writes their vectors onto
 * the record before it commits.
 */
export type EmbedConfig = {
    source: string;
    model: string;
};
export type EmbedAttribute = {
    name: string;
    embed: EmbedConfig;
};
export type Embedder = (record: any) => Promise<number[] | Float32Array | null | undefined>;
type EmbedFn = (input: string | string[], opts: {
    model?: string;
    inputType?: 'document' | 'query';
}) => Promise<Float32Array[]>;
/** Test seam: override the embed function. Pass `undefined` to reset to `Models.embed`. */
export declare function __setEmbedFnForTest(fn: EmbedFn | undefined): void;
export declare function createDefaultEmbedder(embedConfig: EmbedConfig): Embedder;
/**
 * Build the pre-commit callback that runs embedders for every `@embed` attribute whose
 * source field is present in this write. Returns `undefined` when there's nothing to do
 * (no `@embed` attributes, a replication-receiver write, or no source field in the payload),
 * so the call site can skip it.
 *
 * Source-field semantics: embed only when the source field is in the payload. A PATCH that
 * omits it leaves the existing vector untouched; an explicit `source: null` clears the vector.
 */
export declare function buildEmbedBefore(record: any, context: any, options: any, embedAttributes: EmbedAttribute[] | undefined, userEmbedders: Record<string, Embedder>): (() => Promise<void>) | undefined;
export {};
