import { SystemPromptContract } from "../contracts/system-prompt.contract.mjs"; import { PromptRegistryContract, PromptRegistryOptions } from "./prompt.type.mjs"; //#region ../ai/src/prompt/prompt.d.ts /** * Create a versioned, typed prompt registry — a thin facade over the unified * `ai.prompts` manager. * * **Role.** Public factory for {@link PromptRegistryContract}. Keeps * user-facing code free of `new` and consistent with `ai.memory`, * `ai.orchestrator`, `ai.batch` (all return instances). Each call returns a * fresh, isolated registry backed by its own unified manager, so parallel test * suites and multi-tenant apps never share mutable global prompt state. * * @param options - Seed entries, an optional default judge model, and an * optional Langfuse sync. * * @example * const prompts = prompt({ * prompts: [ * { * name: "support-agent", * versions: [ * { version: "1", template: "You are support for {{product}}. Reply in {{language|English}}." }, * { version: "2", template: "You are senior support for {{product}}.", required: ["product"] }, * ], * }, * ], * }); * * const resolved = prompts.resolve("support-agent", { placeholders: { product: "Warlock" } }); * const agent = ai.agent({ model, systemPrompt: resolved.toSystemPrompt() }); * // resolved.version === "2"; a missing `product` would throw PromptValidationError. * * @example * // Resolve a globally-registered prompt by name from `ai.prompts`. * ai.systemPrompt("You are support.", { name: "support" }); * const sp = ai.prompt("support"); // → the registered SystemPromptContract */ declare function promptFactory(name: string, versionOrTag?: string): SystemPromptContract; declare function promptFactory(options?: PromptRegistryOptions): PromptRegistryContract; /** * Create a versioned prompt registry, OR resolve a globally-registered prompt * by name from `ai.prompts`. * * - `prompt(options?)` → a fresh, isolated {@link PromptRegistryContract}. * - `prompt(name, versionOrTag?)` → the `SystemPromptContract` registered under * `name` in the process-wide `ai.prompts` manager (latest version by default, * or a specific version / pinned tag). */ declare const prompt: typeof promptFactory; //#endregion export { prompt }; //# sourceMappingURL=prompt.d.mts.map