import type { Content } from "../types/primitives.js"; import type { IAgentRuntime } from "../types/runtime.js"; export interface EnsureAgentVoiceOptions { /** Origin of the outbound text (connector source, `autonomy`, `escalation`, * …). Part of the cache key and the reportError context so the same literal * from two surfaces rephrases independently. */ source: string; } /** * Build the rephrase prompt from the character persona and the raw text. Reuses * the failure-reply hard-rules skeleton: no internal-mechanism words, no * em-dashes, preserve every exact value verbatim, return only the reply text. * Exported for direct unit testing of prompt content. * * The complete bio and voice/style directive lists are included, never an * item-count cap: a dropped directive (for example a language or formality * rule) would silently rewrite this literal against a persona the owner never * configured. Only non-string and blank entries are filtered out. */ export declare function buildVoiceGatePrompt(character: IAgentRuntime["character"], rawText: string): string; /** * Rewrite `content.text` into the agent's natural voice unless it is already * voiced or empty. Returns a new `Content` with `agentVoiced: true` on success; * on any failure (thrown model call, blank output, no model surface) returns * the ORIGINAL content unchanged after `runtime.reportError` — delivery is * never blocked. Non-text content (attachments only, no `text`) passes through. */ export declare function ensureAgentVoice(runtime: IAgentRuntime, content: Content, options: EnsureAgentVoiceOptions): Promise;