import { Placeholders } from "../contracts/placeholders.type.mjs"; import { PersonaContract } from "../contracts/system-prompt.contract.mjs"; //#region ../ai/src/system-prompt/persona.d.ts /** * Concrete `PersonaContract` โ€” a reusable "who the agent is" block. * * **Role.** A single addressable prompt block representing the agent's * identity (`"You are Alex, a senior TypeScript engineer."`). Exists as * its own type so personas can be defined once and reused across many * `SystemPrompt` compositions, agents, and sessions โ€” each render can * supply a different placeholder map. * * **Responsibility.** * - Owns: the `type: "persona"` discriminator, the raw template text, and * the placeholder-rendering step. * - Does NOT own: composition with instructions, ordering, joining, or * any knowledge of the surrounding `SystemPrompt`. Those concerns live * in `SystemPrompt`. * * Users construct via the `ai.persona()` factory โ€” `new Persona()` is not * the public API (see ยง4.2 of code-style.md). * * @example * const alex = ai.persona("You are Alex, a TypeScript expert."); * * const prompt = ai.systemPrompt() * .persona(alex) * .instruction("Always cite sources."); */ declare class Persona implements PersonaContract { readonly text: string; readonly type: "persona"; constructor(text: string); /** * Substitute `{{mustache}}` placeholders in the persona text against the * supplied map. Delegates to the shared `renderPlaceholders` helper so * persona / instruction / system-prompt rendering stays identical. */ resolve(placeholders?: Placeholders): string; } /** * Create a `Persona` from raw template text. * * @example * const alex = persona("You are Alex, a TypeScript expert."); * const greeter = persona("You are a greeter in {{language|English}}."); */ declare function persona(text: string): Persona; //#endregion export { Persona, persona }; //# sourceMappingURL=persona.d.mts.map