/** * ollama_embed — FLAGSHIP TOOL. * * Batch-aware vector embeddings. Powers concept-search over memory/, * canon, doctrine, protocols — the bridge from filename search to idea search. * * Tier: Embed. Pin model version alongside vectors so drift is detectable. */ import { z } from "zod"; import type { Envelope } from "../envelope.js"; import type { RunContext } from "../runContext.js"; export declare const embedSchema: z.ZodObject<{ input: z.ZodUnion]>; }, z.core.$strip>; export type EmbedInput = z.infer; export interface EmbedResult { embeddings: number[][]; model_version: string; count: number; dim: number; } /** * Payload-size warning threshold. Exported for tests so the invariant * "warnings fire when payload crosses 500KB" stays codified and not a * floating magic number in an assertion. * * 500 KB corresponds to roughly 130 768-dim float32 vectors serialized * as JSON text — well under Node/MCP transport limits, but past the * point where batch-level concept search via ollama_embed_search is a * strictly better shape. */ export declare const EMBED_PAYLOAD_WARN_BYTES: number; /** * Compute the approximate JSON-wire size of the embeddings array. We * don't serialize the full envelope to measure — just the vectors, since * they're what blows the budget at scale. Each number is counted as a * fixed 9-byte estimate (e.g. "-0.123456,") which tracks real JSON * payloads to within a few percent. */ export declare function estimateEmbeddingsBytes(embeddings: number[][]): number; export declare function handleEmbed(input: EmbedInput, ctx: RunContext): Promise>; //# sourceMappingURL=embed.d.ts.map