/** * Standing prompt rules — pure, deterministic prompt-fragment scrubbers. * * No I/O, no network. Each helper enforces a "standing rule" that should * hold across every provider prompt: * - proper names get swapped for stable visual descriptors, * - brand tokens get neutralised away, * - identity-drift and audio-source rules get appended verbatim. */ export interface CastDescriptor { name: string; descriptor: string; } /** * Replace each cast `name` with its `descriptor` using word-boundary, * case-sensitive matching. Substrings inside larger words are left intact * (e.g. "Mee" does not clobber "Meera"). */ export declare function stripProperNames(text: string, cast: CastDescriptor[]): string; /** * Remove brand tokens (word-boundary, case-insensitive) so the result no * longer contains the brand name. Each token is replaced with a neutral * descriptor and any doubled/leading/trailing whitespace is collapsed. */ export declare function brandNeutralize(text: string, brands: string[]): string; /** Standing rule: forbid identity drift / face morphing across frames. */ export declare function noFaceMorphTag(): string; /** Standing rule: diegetic audio only (no scored/added music or VO). */ export declare function diegeticAudioLine(): string; /** Rewrite known prohibitions into positive positional/behavioral locks. */ export declare function negativeToPositive(text: string): string; /** * StoryCraft anti-drift rule: rather than referring back to earlier scenes * ("the same woman as before"), re-state the FULL cast + setting + prop * descriptions verbatim in every scene prompt so the model never has to recall * across generations. * * Pure + idempotent: if the descriptor block (identified by `REPASTE_BLOCK_MARKER`) * is already present in `prompt`, the prompt is returned unchanged. When no * descriptors are supplied, the prompt is returned unchanged. */ export declare function repasteContinuityDescriptors(prompt: string, descriptors: { cast?: string[]; settings?: string[]; props?: string[]; }): string; /** * The three standing CRITICAL RULES for the motion-overlay composer. They are * always emitted verbatim at the top of every composed Omni prompt: * * 1. AUDIO — pass the original voiceover through untouched; only the visual * layer receives new content. * 2. NO METADATA ON SCREEN — never render px/ms/hex/font-name/easing/stroke as * visible text; ONLY text inside quotation marks in the SHOTS section * renders (a hard-won guard against Omni leaking styling notes on screen). * 3. TEXT ONLY, NO PORTRAITS — no human silhouettes/portrait outlines/avatar * icons (a policy-filter guardrail). The avatar-host layout's separately * generated host base is exempt; the overlay prompt still forbids drawn * portraits. */ export declare const MOTION_OVERLAY_CRITICAL_RULES: { readonly audio: "CRITICAL RULE 1 — AUDIO: Do not transcribe, translate, regenerate, dub, or modify the audio in any way. The original voiceover must be passed through unchanged to the output. Only the visual layer receives new content."; readonly noMetadata: "CRITICAL RULE 2 — NO METADATA ON SCREEN: This prompt contains internal styling notes. Under no circumstances should any of the following appear as visible text in the output video: pixel sizes, font weights or family names, colour codes, easing curve names, durations, frame rates, stroke widths, or any other technical specification. ONLY render text that is explicitly placed inside quotation marks in the SHOTS section below."; readonly noPortraits: "CRITICAL RULE 3 — TEXT ONLY, NO PORTRAITS: Do not generate human silhouettes, portrait outlines, avatar icons, or any depiction of a person. When the speech mentions a person, render their name as pure centred typography, like a directory listing or a credit roll — never a human figure."; }; /** * The three motion-overlay CRITICAL RULE strings, in order (audio, no-metadata, * no-portraits). Pure — `compose-prompt` reuses this so the rules live in one * place. Returns a fresh array each call. */ export declare function motionOverlayCriticalRules(): string[]; /** One resolved asset tag: the descriptor substituted into prompt text, and an optional reference to wire. */ export interface AssetTagEntry { descriptor: string; referencePath?: string; } /** name (lowercased) -> entry. */ export type AssetTagLookup = Map; export interface ResolveAssetTagsResult { /** Prompt text with @Name tokens replaced by descriptors (or the bare word if unresolved). */ text: string; /** References to wire, dedup, first-appearance order. */ referencedPaths: string[]; /** Tag names with no lookup entry (caller warns; never fatal). */ unresolved: string[]; } /** * Resolve `@Name` tags in a prompt. Each tag is replaced with the looked-up * visual descriptor and its reference (if any) is collected; an unresolved tag * is replaced with the bare word and recorded in `unresolved`. Pure — runs * BEFORE stripProperNames so any residual proper names still get scrubbed. */ export declare function resolveAssetTags(text: string, lookup: AssetTagLookup): ResolveAssetTagsResult; //# sourceMappingURL=prompt-rules.d.ts.map