§
    øžyj[  ã                  óÌ  — U d Z ddlmZ ddlZddlZddlmZmZmZm	Z	 ddl
mZmZmZmZmZ ddlmZmZ  ej        e¦  «        Zddd	d
ddœd
ddœddd
iddœdddœd
 ee¦  «        dedœd
 ee¦  «        dedœd
ddœdddœdddœdddœd
ddœdœdgdœd œZd!ed"<   dCd$„ZdDd&„ZdDd'„ZdEd)„Zd*„ ZdFd-„ZdGd1„ZdHd3„Z dId5„Z!dJd8„Z"d9Z#dKd=„Z$dCd>„Z% ej&        dd?ee"eg d@dAe%¬B¦	  «	         dS )Lu  
Video Generation Tool
=====================

Single ``video_generate`` tool that dispatches to a plugin-registered
video generation provider. Mirrors the ``image_generate`` design:

- ``agent/video_gen_provider.py`` defines the :class:`VideoGenProvider` ABC.
- ``agent/video_gen_registry.py`` holds the active providers (populated by
  plugins at import time).
- Each provider lives under ``plugins/video_gen/<name>/``.

The tool itself is intentionally backend-agnostic and ships **no in-tree
provider** â€” turn on a backend by enabling a plugin (``hermes plugins
enable video_gen/<name>``) and selecting it in ``hermes tools`` â†’ Video
Generation.

Unified surface
---------------
One tool covers the common cases - text-to-video, image-to-video, and
reference-to-video - with a compact schema:

    prompt                   text instruction (required)
    image_url                drives image-to-video
    reference_image_urls     list, up to provider-declared cap
    duration                 seconds (provider clamps)
    aspect_ratio             "16:9" | "9:16" | "1:1" | ...
    resolution               "480p" | "540p" | "720p" | "1080p"
    negative_prompt          optional (Pixverse/Kling style)
    audio                    optional (Veo3/Pixverse pricing tier)
    seed                     optional
    model                    optional, override the active provider's default

Providers ignore parameters they do not support. The tool layer does
**lightweight** validation (type/required-prompt) and lets each provider
do its own clamping inside :meth:`VideoGenProvider.generate` â€” that keeps
the tool surface stable as new providers ship with different capabilities.

Video edit and video extend are intentionally not exposed here; providers with
those workflows should expose separate tools.
é    )ÚannotationsN)ÚAnyÚDictÚListÚOptional)ÚCOMMON_ASPECT_RATIOSÚCOMMON_RESOLUTIONSÚDEFAULT_ASPECT_RATIOÚDEFAULT_RESOLUTIONÚerror_response)ÚregistryÚ
tool_errorÚvideo_generateuG   (rebuilt at get_definitions() time â€” see _build_dynamic_video_schema)ÚobjectÚstringz\Text instruction describing the desired video, motion, subject, style, camera movement, etc.)ÚtypeÚdescriptiona  Optional public HTTPS URL of a still image. When provided, the active backend routes to its image-to-video endpoint (animate the image); when omitted, it routes to text-to-video. For xAI chaining, use the `image` or `public_url` HTTPS URL from a prior Imagine result.Úarrayr   z—Optional list of public HTTPS reference image URLs (style or character refs). For xAI chaining, use `image` or `public_url` from prior Imagine results.)r   Úitemsr   Úintegerz�Desired video duration in seconds. Providers clamp to their supported range (commonly 4-15s). Omit to use the provider's default.z<Output aspect ratio. Providers clamp to their supported set.)r   Úenumr   Údefaultz:Output resolution. Providers clamp to their supported set.u”   Optional negative prompt â€” content to avoid in the output. Supported by Pixverse, Kling, and similar; ignored by providers that do not support it.ÚbooleanzkOptional audio generation toggle. Supported by Veo3 and Pixverse (affects pricing tier); ignored elsewhere.z<Optional seed for reproducible outputs (provider-dependent).a#  Optional high-resolution pass: when true, the generated video is run through the active backend's video upscaler (extra cost and latency, roughly 2x resolution). Use when the user asks for high-res / 4K output. Omit for the model's native resolution. Ignored by backends without an upscaler.uÁ   Optional model override. If omitted, the user's configured ``video_gen.model`` (set via `hermes tools` â†’ Video Generation) is used. Models that the active provider does not know are rejected.)ÚpromptÚ	image_urlÚreference_image_urlsÚdurationÚaspect_ratioÚ
resolutionÚnegative_promptÚaudioÚseedÚupscaleÚmodelr   )r   Ú
propertiesÚrequired)Únamer   Ú
parametersúDict[str, Any]ÚVIDEO_GENERATE_SCHEMAÚreturnc                 ó  — 	 ddl m}   | ¦   «         }t          |t          ¦  «        r|                     d¦  «        nd }t          |t          ¦  «        r|ni S # t
          $ r'}t                               d|¦  «         i cY d }~S d }~ww xY w)Nr   )Úload_configÚ	video_genz#Could not read video_gen config: %s)Úhermes_cli.configr-   Ú
isinstanceÚdictÚgetÚ	ExceptionÚloggerÚdebug)r-   ÚcfgÚsectionÚexcs       úA/home/ragecks/.hermes/hermes-agent/tools/video_generation_tool.pyÚ_read_video_gen_sectionr:   ³   s¥   € ðØ1Ð1Ð1Ð1Ð1Ð1àˆk‰mŒmˆÝ*4°S½$Ñ*?Ô*?ÐI�#—'’'˜+Ñ&Ô&Ð&ÀTˆÝ$ W­dÑ3Ô3Ð;ˆwˆw¸Ð;øÝð ð ð Ý�ŠÐ:¸CÑ@Ô@Ð@Øˆ	ˆ	ˆ	ˆ	ˆ	ˆ	øøøøðøøøs   ‚AA Á
BÁ!BÁ=BÂBúOptional[str]c                 óÂ   — t          ¦   «                              d¦  «        } t          | t          ¦  «        r(|                      ¦   «         r|                      ¦   «         S d S )NÚprovider©r:   r2   r0   ÚstrÚstrip©Úvalues    r9   Ú_read_configured_video_providerrC   ¿   sO   € Ý#Ñ%Ô%×)Ò)¨*Ñ5Ô5€EÝ�%�ÑÔð  %§+¢+¡-¤-ð Ø�{Š{‰}Œ}ÐØˆ4ó    c                 óÂ   — t          ¦   «                              d¦  «        } t          | t          ¦  «        r(|                      ¦   «         r|                      ¦   «         S d S )Nr$   r>   rA   s    r9   Ú_read_configured_video_modelrF   Æ   sO   € Ý#Ñ%Ô%×)Ò)¨'Ñ2Ô2€EÝ�%�ÑÔð  %§+¢+¡-¤-ð Ø�{Š{‰}Œ}ÐØˆ4rD   Úboolc                 óÀ   — 	 ddl m}  ddlm}  |¦   «           | ¦   «         D ]*}	 |                     ¦   «         r dS Œ# t
          $ r Y Œ'w xY wn# t
          $ r Y nw xY wdS )z´Return True when at least one registered provider reports available.

    Triggers plugin discovery (idempotent) so user-installed plugins are
    visible to the toolset gate.
    r   )Úlist_providers©Ú_ensure_plugins_discoveredTF)Úagent.video_gen_registryrI   Úhermes_cli.pluginsrK   Úis_availabler3   )rI   rK   r=   s      r9   Ú#check_video_generation_requirementsrO   Ò   sÂ   € ðØ;Ð;Ð;Ð;Ð;Ð;ØAÐAÐAÐAÐAÐAà"Ð"Ñ$Ô$Ð$Ø&˜Ñ(Ô(ð 	ð 	ˆHðØ×(Ò(Ñ*Ô*ð  Ø˜4˜4ð øåð ð ð Ø�ðøøøð		øõ ð ð ð Øˆðøøøàˆ5s6   ‚"A ¥=¹A ¼A ½
A
ÁA Á	A
Á
A Á
AÁAc                 óÞ   — 	 ddl m}  ddlm}  |¦   «           | ¦   «         }|€ |d¬¦  «          | ¦   «         }|S # t          $ r&}t
                               d|¦  «         Y d}~dS d}~ww xY w)uÅ   Return the active provider object or None.

    Forces plugin discovery before checking the registry â€” handles cases
    where a long-lived session was started before a plugin was installed.
    r   )Úget_active_providerrJ   NT)Úforcez(video_gen provider resolution failed: %s)rL   rQ   rM   rK   r3   r4   r5   )rQ   rK   r=   r8   s       r9   Ú_resolve_active_providerrS   í   s¶   € ðØ@Ð@Ð@Ð@Ð@Ð@ØAÐAÐAÐAÐAÐAà"Ð"Ñ$Ô$Ð$Ø&Ð&Ñ(Ô(ˆØÐØ&Ð&¨TÐ2Ñ2Ô2Ð2Ø*Ð*Ñ,Ô,ˆHØˆøÝð ð ð Ý�ŠÐ?ÀÑEÔEÐEØˆtˆtˆtˆtˆtøøøøðøøøs   ‚9< ¼
A,ÁA'Á'A,Ú
configuredr?   c                ó¤   — | r*d| › d�}t          j        t          |d| ¬¦  «        ¦  «        S d}t          j        t          |d¬¦  «        ¦  «        S )Nzvideo_gen.provider='uŸ   ' is set but no plugin registered that name. Run `hermes plugins list` to see installed video gen backends, or `hermes tools` â†’ Video Generation to pick one.Úprovider_not_registered)ÚerrorÚ
error_typer=   u{   No video generation backend is configured. Run `hermes tools` â†’ Video Generation to enable one (xAI, FAL, or Google Veo).Úno_provider_configured)rW   rX   )ÚjsonÚdumpsr   )rT   Úmsgs     r9   Ú_missing_provider_errorr]     s�   € Øð 
ð' :ð 'ð 'ð 'ð 	õ Œz�.ØÐ";Øð
ñ 
ô 
ñ ô ð 	ð
	Dð õ Œ:•nØÐ6ðñ ô ñ ô ð rD   rB   r   úOptional[int]c                óf   — | �| dk    rd S 	 t          | ¦  «        S # t          t          f$ r Y d S w xY w)NÚ )ÚintÚ	TypeErrorÚ
ValueErrorrA   s    r9   Ú_coerce_intrd     sL   € Ø€}˜ š˜ØˆtðÝ�5‰zŒzÐøÝ•zÐ"ð ð ð Øˆtˆtðøøøs   Œ ›0¯0úOptional[bool]c                óÊ   — | €d S t          | t          ¦  «        r| S t          | t          ¦  «        r2|                      ¦   «                              ¦   «         }|dv rdS |dv rdS d S )N>   Ú1ÚonÚyesÚtrueT>   Ú0ÚnoÚoffÚfalseF)r0   rG   r?   r@   Úlower)rB   Úvs     r9   Ú_coerce_boolrq   %  su   € Ø€}ØˆtÝ�%�ÑÔð ØˆÝ�%�ÑÔð Ø�KŠK‰MŒM×ÒÑ!Ô!ˆØÐ*Ð*Ð*Ø�4ØÐ+Ð+Ð+Ø�5Øˆ4rD   úOptional[List[str]]c                ó,  — | €d S t          | t          ¦  «        r| g} t          | t          t          f¦  «        sd S g }| D ]R}t          |t          ¦  «        r;|                     ¦   «         r'|                     |                     ¦   «         ¦  «         ŒS|pd S ©N)r0   r?   ÚlistÚtupler@   Úappend)rB   ÚoutÚitems      r9   Ú_normalize_reference_imagesrz   3  sš   € Ø€}ØˆtÝ�%�ÑÔð Ø�ˆÝ�e�d¥E˜]Ñ+Ô+ð ØˆtØ€CØð %ð %ˆÝ�d�CÑ Ô ð 	% T§Z¢Z¡\¤\ð 	%Ø�JŠJ�t—z’z‘|”|Ñ$Ô$Ð$øØˆ;�$ÐrD   ÚargsÚ_kwc                óP  — |                       d¦  «        pd                     ¦   «         }|                       d¦  «        pd                     ¦   «         pd }t          |                       d¦  «        ¦  «        }|                      d¦  «        }ddlm}  ||||¦  «        \  }}}|�|S t          |                       d¦  «        ¦  «        }|                       d	¦  «        pt                               ¦   «         pt          }	|                       d
¦  «        pt                               ¦   «         pt          }
|                       d¦  «        pd                     ¦   «         pd }t          |                       d¦  «        ¦  «        }t          |                       d¦  «        ¦  «        }t          |                       d¦  «        ¦  «        }|                       d¦  «        pd                     ¦   «         pd }|st          d¦  «        S d| v sd| v rt          d¦  «        S t          ¦   «         }t          ¦   «         }|€t          |¦  «        S |p!t          ¦   «         p|                     ¦   «         }|t          |¦  «        ||||	|
||||dœ}d„ |                     ¦   «         D ¦   «         }	  |j        d!d|i|¤Ž}�n# t$          $ r}t&                               dt+          |dd¦  «        |¦  «         t-          j        t1          dt+          |dd¦  «        › d�dt+          |dd¦  «        |pd|¬¦  «        ¦  «        cY d }~S d }~wt2          $ r�}t&                               dt+          |dd¦  «        |¦  «         t-          j        t1          dt+          |dd¦  «        › d|› �dt+          |dd¦  «        |pd|¬¦  «        ¦  «        cY d }~S d }~ww xY wt5          |t6          ¦  «        s7t-          j        t1          d dt+          |dd¦  «        |pd|¬¦  «        ¦  «        S t-          j        |¦  «        S )"Nr   r`   r   r   Útask_idr   )Ú_confine_source_imagesr   r   r   r    r!   r"   r#   r$   z'prompt is required for video generationÚ	operationÚ	video_urlz†video_generate only supports text-to-video, image-to-video, and reference-to-video; use a provider-specific tool for video edit/extend)r$   Ú_model_override_explicitr   r   r   r   r   r    r!   r"   r#   c                ó   — i | ]
\  }}|®||“ŒS rt   © )Ú.0Úkrp   s      r9   ú
<dictcomp>z*_handle_video_generate.<locals>.<dictcomp>{  s   € Ð?Ð?Ð?‘t�q˜!°°ˆa�°°°rD   zBvideo_gen provider '%s' rejected kwargs (signature too narrow): %sr'   ú?z
Provider 'z\' signature is out of date with the video_generate schema. Report this to the plugin author.Úprovider_contract)rW   rX   r=   r$   r   z"video_gen provider '%s' raised: %sz	' error: Úprovider_exceptionz#Provider returned a non-dict resultr„   )r2   r@   rz   Útools.image_generation_toolr   rd   r
   r   rq   r   rC   rS   r]   rF   Údefault_modelrG   r   Úgeneraterb   r4   ÚwarningÚgetattrrZ   r[   r   r3   r0   r1   )r{   r|   r   r   r   r~   r   Úconfine_errorr   r   r   r    r!   r"   r#   Úmodel_overriderT   r=   r$   ÚkwargsÚresultr8   s                         r9   Ú_handle_video_generater”   A  sÁ  € Ø�hŠh�xÑ Ô Ð& B×-Ò-Ñ/Ô/€FØ—’˜+Ñ&Ô&Ð,¨"×3Ò3Ñ5Ô5Ð=¸€IÝ6°t·x²xÐ@VÑ7WÔ7WÑXÔXÐØ�gŠg�iÑ Ô €Gð
 CÐBÐBÐBÐBÐBà5KÐ5KØÐ'¨ñ62ô 62Ñ2€IÐ# ]àÐ ØÐÝ˜4Ÿ8š8 JÑ/Ô/Ñ0Ô0€HØ—H’H˜^Ñ,Ô,ÐDÕ0D×KÒKÑMÔMÐeÕQe€LØ—(’(˜<Ñ(Ô(Ð>Õ,>×EÒEÑGÔGÐ]ÕK]€JØ—x’xÐ 1Ñ2Ô2Ð8°b×?Ò?ÑAÔAÐIÀT€OÝ˜Ÿš 'Ñ*Ô*Ñ+Ô+€EÝ�t—x’x Ñ'Ô'Ñ(Ô(€DÝ˜4Ÿ8š8 IÑ.Ô.Ñ/Ô/€GØ—h’h˜wÑ'Ô'Ð-¨2×4Ò4Ñ6Ô6Ð>¸$€Nð
 ð EÝÐCÑDÔDÐDØ�dÐÐ˜k¨TÐ1Ð1ÝðUñ
ô 
ð 	
õ 1Ñ2Ô2€JÝ'Ñ)Ô)€HØÐÝ& zÑ2Ô2Ð2ð ÐXÕ:Ñ<Ô<ÐXÀ×@VÒ@VÑ@XÔ@X€Eð Ý$(¨Ñ$8Ô$8ØØ 4ØØ$Ø Ø*ØØØðð €Fð @Ð?˜vŸ|š|™~œ~Ð?Ñ?Ô?€FðØ"�Ô"Ð;Ð;¨&Ð;°FÐ;Ð;ˆ‰øÝð ð ð õ 	�ŠØPÝ�H˜f cÑ*Ô*¨Cñ	
ô 	
ð 	
õ Œz�.ð)�W X¨v°sÑ;Ô;ð )ð )ð )ð +Ý˜X v¨rÑ2Ô2Ø�+˜2Øð

ñ 

ô 

ñ 
ô 
ð 
	ð 
	ð 
	ð 
	ð 
	ð 
	øøøøõ ð ð ð Ý�ŠØ0Ý�H˜f cÑ*Ô*¨Cñ	
ô 	
ð 	
õ Œz�.ØM�w x°¸Ñ=Ô=ÐMÐMÈÐMÐMØ+Ý˜X v¨rÑ2Ô2Ø�+˜2Øð
ñ 
ô 
ñ ô ð 	ð 	ð 	ð 	ð 	ð 	øøøøðøøøõ �f�dÑ#Ô#ð ÝŒz�.Ø7Ø*Ý˜X v¨rÑ2Ô2Ø�+˜2Øð
ñ 
ô 
ñ ô ð 	õ Œ:�fÑÔÐs2   Ê"J3 Ê3
OÊ=A4L7Ì1OÌ7OÍA6O Î:OÏ Ou[  Generate a video from a text prompt (text-to-video), animate a still image (image-to-video), or guide generation with reference images. Pass `image_url` to animate an image or `reference_image_urls` for reference-to-video. Video edit/extend workflows are not part of this unified surface; use a dedicated provider-specific tool when one is available. The backend and model family are user-configured via `hermes tools` â†’ Video Generation; the agent does not pick them. Long-running generations may take 30 seconds to several minutes â€” the call blocks until the video is ready. Returns the result in the `video` field â€” either an HTTP URL or an absolute file path. To show it to the user, reference that path/URL in your response using the file-delivery convention for the current platform (your platform guidance describes how files are delivered here).Ú
model_metaÚbackend_capsú	List[str]c                ó   — g }t          |                      d¦  «        pg ¦  «        }|                      d¦  «        }|r|                     |¦  «         d|v rd|vr|                     d¦  «         nd|v rd|vr|                     d¦  «         |S )uÅ   Pull human-readable caveats out of one model's catalog metadata.

    Only surfaces things that meaningfully differ from the backend's
    overall capabilities â€” repeating defaults is noise.
    Ú
modalitiesÚmodalityÚimageÚtextu]   this model is image-to-video only â€” image_url is REQUIRED; text-only calls will be rejectedu?   this model is text-to-video only â€” image_url is not supported)Úsetr2   Úaddrw   )r•   r–   Úcaveatsr™   rš   s        r9   Ú_format_model_caveatsr    Ì  s¾   € ð €Gå�Z—^’^ LÑ1Ô1Ð7°RÑ8Ô8€JØ�~Š~˜jÑ)Ô)€HØð !Ø�Š�xÑ Ô Ð à�*ÐÐ ¨zÐ!9Ð!9Ø�Šð/ñ	
ô 	
ð 	
ð 	
ð 
�:Ð	Ð	 '°Ð";Ð";Ø�ŠØMñ	
ô 	
ð 	
ð €NrD   c                 óz  ‡— t           g} t          ¦   «         }t          ¦   «         }|€,|                      d¦  «         dd                     | ¦  «        iS 	 |                     ¦   «         pi }n# t          $ r i }Y nw xY w	 |                     ¦   «         pg }n# t          $ r g }Y nw xY w|p|                     ¦   «         Št          ˆfd„|D ¦   «         i ¦  «        }|j
        }d|› �}‰r|d‰› �z  }|                      |¦  «         t          ||¦  «        D ]}|                      d|› �¦  «         Œt          |                     d	¦  «        pg ¦  «        }	|                     d
¦  «        }
|
r|	                     |
¦  «         |	p#t          |                     d	¦  «        pg ¦  «        }d|v rd|v r|                      d¦  «         |                     d¦  «        r1|                      dd                     |d         ¦  «        › �¦  «         |                     d¦  «        r1|                      dd                     |d         ¦  «        › �¦  «         |                     d|                     d¦  «        ¦  «        }|                     d|                     d¦  «        ¦  «        }|r|r|                      d|› d|› d�¦  «         |                     d¦  «        r|                      d¦  «         |                     d¦  «        r|                      d¦  «         |                     d¦  «        pd}|r|                      d|› d�¦  «         |j        d k    rT|                      d!¦  «         	 dd"lm}  |d#¦  «        }n# t          $ r d$}Y nw xY w|r|                      d%|› �¦  «         dd                     | ¦  «        iS )&a\  Build a description that reflects the active backend's actual surface.

    Cheap: reads config (already memoized by the caller), asks the active
    provider for `capabilities()` and the active model's catalog entry,
    and formats a few lines of prose. Falls back to the generic
    description when no provider is configured or registered.
    Nu|   
No video backend is available. Calls will return an error until the user picks one via `hermes tools` â†’ Video Generation.r   Ú
c              3  óx   •K  — | ]4}t          |t          ¦  «        ¯|                     d ¦  «        ‰k    ¯0|V — Œ5dS )ÚidN)r0   r1   r2   )r…   ÚmÚactive_models     €r9   ú	<genexpr>z._build_dynamic_video_schema.<locals>.<genexpr>  sF   øè è € ÐRÐRˆq�j¨­DÑ1Ô1ÐR°a·e²e¸D±k´kÀ\Ò6QÐ6QˆÐ6QÐ6QÐ6QÐ6QÐRÐRrD   z
Active backend: u    Â· model: z- r™   rš   rœ   r›   uk   - supports both text-to-video (omit image_url) and image-to-video (pass image_url) â€” routes automaticallyÚaspect_ratiosz- aspect_ratio choices: z, Úresolutionsz- resolution choices: Úmin_durationÚmax_durationz- duration range: Ú-ÚsÚsupports_audioz@- audio: pass `audio=true` to enable native audio (pricing tier)Úsupports_negative_promptz- negative_prompt: supportedÚmax_reference_imagesr   z- reference_image_urls: up to z imagesÚxaizÇ- chaining: for edit/extend pass the public HTTPS MP4 in `video` or `public_url` from the prior Imagine result (files-cdn). For image-to-video / reference-to-video pass public image URLs the same way)Úxai_storage_notice_textr.   r`   z- storage: )Ú_GENERIC_DESCRIPTIONrF   rS   rw   ÚjoinÚcapabilitiesr3   Úlist_modelsrŒ   ÚnextÚdisplay_namer    r�   r2   rž   r'   Útools.xai_httpr²   )ÚpartsÚconfigured_modelr=   ÚcapsÚmodelsr•   Úbackend_labelÚlineÚcÚmodel_modalitiesrš   Úeffective_modalitiesrª   r«   Úmax_refsr²   Únoticer¦   s                    @r9   Ú_build_dynamic_video_schemarÅ   é  s€  ø€ õ -Ð-€Eå3Ñ5Ô5Ðõ (Ñ)Ô)€HàÐØ�ŠðPñ	
ô 	
ð 	
ð ˜tŸyšy¨Ñ/Ô/Ð0Ð0ðØ×$Ò$Ñ&Ô&Ð,¨"ˆˆøÝð ð ð ØˆˆˆðøøøðØ×%Ò%Ñ'Ô'Ð-¨2ˆˆøÝð ð ð Øˆˆˆðøøøð $Ð? x×'=Ò'=Ñ'?Ô'?€LÝØRÐRÐRÐR�FÐRÑRÔRØ
ñô €Jð
 Ô)€MØ/ Ð/Ð/€DØð -ØÐ,˜lÐ,Ð,Ñ,ˆØ	‡L‚L�ÑÔÐõ # :¨tÑ4Ô4ð ð ˆØ�Š�X˜!�X�XÑÔÐÐõ
 ˜:Ÿ>š>¨,Ñ7Ô7Ð=¸2Ñ>Ô>ÐØ�~Š~˜jÑ)Ô)€HØð 'Ø×Ò˜XÑ&Ô&Ð&Ø+ÐP­s°4·8²8¸LÑ3IÔ3IÐ3OÈRÑ/PÔ/PÐØÐ%Ð%Ð%¨'Ð5IÐ*IÐ*IØ�ŠðGñ	
ô 	
ð 	
ð
 ‡x‚x�Ñ Ô ð TØ�ŠÐR°·	²	¸$¸Ô:OÑ0PÔ0PÐRÐRÑSÔSÐSØ‡x‚x�ÑÔð PØ�ŠÐN¨d¯iªi¸¸]Ô8KÑ.LÔ.LÐNÐNÑOÔOÐOØ—>’> .°$·(²(¸>Ñ2JÔ2JÑKÔK€LØ—>’> .°$·(²(¸>Ñ2JÔ2JÑKÔK€LØð 
˜ð 
Ø�ŠØ? Ð?Ð?°Ð?Ð?Ð?ñ	
ô 	
ð 	
ð ‡x‚xÐ Ñ!Ô!ð YØ�ŠÐWÑXÔXÐXØ‡x‚xÐ*Ñ+Ô+ð 5Ø�ŠÐ3Ñ4Ô4Ð4Ø�xŠxÐ.Ñ/Ô/Ð4°1€HØð IØ�ŠÐG°hÐGÐGÐGÑHÔHÐHØ„}˜ÒÐØ�Šðñ	
ô 	
ð 	
ð	Ø>Ð>Ð>Ð>Ð>Ð>à,Ð,¨[Ñ9Ô9ˆFˆFøÝð 	ð 	ð 	ØˆFˆFˆFð	øøøàð 	1Ø�LŠLÐ/ vÐ/Ð/Ñ0Ô0Ð0à˜4Ÿ9š9 UÑ+Ô+Ð,Ð,s6   ÁA, Á,A;Á:A;Á?B ÂB%Â$B%Í(M: Í:N	ÎN	r.   Fu   ðŸŽ¬)	r'   ÚtoolsetÚschemaÚhandlerÚcheck_fnÚrequires_envÚis_asyncÚemojiÚdynamic_schema_overrides)r+   r)   )r+   r;   )r+   rG   )rT   r;   r+   r?   )rB   r   r+   r^   )rB   r   r+   re   )rB   r   r+   rr   )r{   r)   r|   r   r+   r?   )r•   r)   r–   r)   r+   r—   )'Ú__doc__Ú
__future__r   rZ   ÚloggingÚtypingr   r   r   r   Úagent.video_gen_providerr   r	   r
   r   r   Útools.registryr   r   Ú	getLoggerÚ__name__r4   ru   r*   Ú__annotations__r:   rC   rF   rO   rS   r]   rd   rq   rz   r”   r³   r    rÅ   Úregisterr„   rD   r9   ú<module>rØ      sy  ðð(ð (ð (ðT #Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ðð ð ð ð ð ð ð ð ð ð ð ð ð ð 0Ð /Ð /Ð /Ð /Ð /Ð /Ð /à	ˆÔ	˜8Ñ	$Ô	$€ð ð ]àð !ð<ðð ð !ðJð	ð 	ð  Ø  (Ð+ðJð	%ð %ð "ð*ðð ð !Ø˜Ð1Ñ2Ô2ðð 0ðð ð !Ø˜Ð/Ñ0Ô0ðð .ðð ð !ðCð ð  ð "ðJðð ð "ð"ðð ð "ð#ð
ð 
ð !ð;ðð ðm_
ð _
ð@ �JðEcð cðm)ð m)Ð ð mð mð mñ mðj	ð 	ð 	ð 	ðð ð ð ðð ð ð ðð ð ð ð6ð ð ð*ð ð ð ð4ð ð ð ðð ð ð ðð ð ð ðfð fð fð fðv8ð ð"ð ð ð ð:b-ð b-ð b-ð b-ðT €Ô Ø	ØØ Ø"Ø0ØØØ
Ø8ð
ñ 
ô 
ð 
ð 
ð 
rD   