/** * CLI embedder — pluggable text-to-vector embedding for search commands * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ export type EmbedderFunction = (text: string) => Promise; export interface EmbedderConfig { /** Provider name: 'ollama' or 'custom' */ provider: string; /** Model identifier (e.g. 'nomic-embed-text') */ model?: string; /** Base URL for the provider (e.g. 'http://localhost:11434' for Ollama) */ baseUrl?: string; } /** * Resolve an embedder function from environment variables or appstash config. * * Resolution order: * 1. EMBEDDER_PROVIDER env var (+ EMBEDDER_MODEL, EMBEDDER_BASE_URL) * 2. appstash config keys: embedder.provider, embedder.model, embedder.baseUrl * 3. null (no embedder configured) * * @param store - Optional appstash config store for reading persisted config * @returns An EmbedderFunction or null if no embedder is configured */ export declare function resolveEmbedder(store?: { getVar: (key: string) => string | undefined; }): EmbedderFunction | null; /** * Auto-embed text values in vector where-clause fields. * * When --auto-embed is passed, any vector field in the where clause that * contains a text string (instead of a float array) will be converted to * an embedding vector using the configured embedder. * * @param where - The where clause object (mutated in place) * @param vectorFieldNames - Names of vector embedding fields (e.g. ['vectorEmbedding']) * @param embedder - The resolved embedder function * @returns The modified where clause */ export declare function autoEmbedWhere(where: T, vectorFieldNames: string[], embedder: EmbedderFunction): Promise; /** * Auto-embed text values in mutation input data (create/update). * * When --auto-embed is passed on create or update, any vector field in * the input data that contains a text string will be converted to an * embedding vector using the configured embedder. * * Usage: * csdk article create --input.embedding "Machine learning concepts" --auto-embed * csdk article update --id xxx --input.embedding "Updated description" --auto-embed * * This is a CLI-only convenience — in production, database triggers or * a job queue should handle embedding generation. * * @param data - The mutation input data object (mutated in place) * @param vectorFieldNames - Names of vector embedding fields (e.g. ['embedding']) * @param embedder - The resolved embedder function * @returns The modified data object with text values replaced by vectors */ export declare function autoEmbedInput(data: T, vectorFieldNames: string[], embedder: EmbedderFunction): Promise;