/** * Seedance 2.0 content-filter logic. * * A faithful TypeScript port of the content-filter functions in * `skills/video-replicator/scripts/seedance_client.py` * (pre_validate_prompt, sanitize_prompt L1/L2, is_content_violation, * _suggest_recovery). Pure and deterministic — no I/O, no network. * * Seedance enforces strict server-side safety filters (prompt scan + input * analysis). Filters tightened significantly after launch due to Hollywood IP * backlash, deepfake concerns, and Chinese regulatory requirements. Risk * categories (per the source skill): * * HIGH RISK (almost always blocked): * - Real human faces/photos as reference images * - Children/minors * - Celebrity/public figure names or strong likenesses * - Copyrighted characters/IP (Marvel, Disney, Star Wars, anime named, ...) * - NSFW / nudity / sexual / suggestive content * - Political figures or sensitive political topics * * MEDIUM RISK (sometimes blocked, retry with sanitization): * - Realistic human figures without stylization cues * - Brand names, trademarks, product names * - Violence/combat (graphic) * * SAFE (reliable): * - Generic "young adult figure", "elegant dancer", "athletic person" * - Fully stylized: anime, cartoon, 3D render, illustration, painting * - Camera/motion descriptors: dolly, pan, push in, slow zoom, cinematic * - Environment/nature/architecture without identifiable real places */ export type ContentFilterLevel = 'HIGH' | 'MEDIUM' | 'LOW'; export interface ContentFilterWarning { level: ContentFilterLevel; reason: string; match: string; } /** * Check if an error message indicates a content regulation violation * (error code 2038). These errors come from Seedance's Chinese content * moderation and are retryable with prompt sanitization. * * Port of `is_content_violation`. */ export declare function isContentViolation(errorMsg: string): boolean; /** * Check a prompt for likely content filter triggers before submission. * * Returns a list of warnings, each with `{ level, reason, match }`. * HIGH — near-certain filter triggers. * MEDIUM — sometimes pass but should be reworded if errors occur. * LOW — advisory only. * * Port of `pre_validate_prompt`. */ export declare function preValidatePrompt(prompt: string): ContentFilterWarning[]; /** * Sanitize a prompt to avoid content regulation violations. * * @param prompt Original prompt text (may contain @image1/@video1/@audio1 refs). * @param level Sanitization aggressiveness: * 1 = Light: strip brand names, celebrity/IP names, marketing superlatives, * replace minors with "young adult". * 2 = Heavy: reduce to pure camera motion + generic visual description. * * Media references (@image1, @video1, @audio1) are extracted and re-prefixed * at the start (where Seedance expects them). * * Port of `sanitize_prompt`. */ export declare function sanitizePrompt(prompt: string, level?: number): string; /** * Suggest a fix based on the error message. * * Port of `_suggest_recovery` (the `prompt` argument in the Python source is * unused, so it is omitted here). */ export declare function suggestRecovery(errorMsg: string): string; //# sourceMappingURL=seedance-content-filter.d.ts.map