
    sj                    j   U d Z ddlmZ ddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZ ddlmZmZmZ  ej        e          Zdddd	dd
ddddddddddddddddddddddddddddddddddddd d!d d"d#d$d%d&d'ddd(d)dd d*d d+d,dd-dddddd.d/d d0d d1d2d3ddd4dddd5i d6d7d8d/d9d d:d;d<d d=d>d?d@dAddBd3dCddDdEdFdGdGdGdGdHdHdIdIdJdKdLdMddNddOddPdd dQd dRdSddTdUdVddddWdXdd dYd dZd[dd3d\d-ddddd]d^dd d_d dd`dd$ddaddddWdbdcd ddd dedfdgdhddidddjdkdd dld dmdndddddddoZdpedq<   drZddvZdd{Zdd|Z ed}d~h          ZddZddZddZdadsed<    ej                     Z!ddZ"da#dsed<   da$dsed<    ej                     Z%d Z&d Z'ddZ(ddZ)dZ*dZ+	 dddZ, G d de          Z-ddZ.dS )u  FAL.ai video generation backend.

User-facing surface: pick a **model family** (e.g. "Pixverse v6",
"Veo 3.1", "Seedance 2.0", "Kling v3 4K", "LTX 2.3", "Happy Horse").
The plugin auto-routes to the family's text-to-video endpoint when
called without ``image_url``, and to its image-to-video endpoint when
``image_url`` is provided. The agent never sees the routing — it just
calls ``video_generate(prompt=..., image_url=...)``.

Model families (most expose both t2v + i2v; gemini-omni-flash is image-to-video only):

  Cheap tier:
    ltx-2.3            fal-ai/ltx-2.3-22b/text-to-video           /  fal-ai/ltx-2.3-22b/image-to-video
    pixverse-v6        fal-ai/pixverse/v6/text-to-video           /  fal-ai/pixverse/v6/image-to-video
    seedance-2.0-mini  bytedance/seedance-2.0/mini/text-to-video  /  bytedance/seedance-2.0/mini/image-to-video

  Premium tier:
    veo3.1             fal-ai/veo3.1                              /  fal-ai/veo3.1/image-to-video
    seedance-2.0       bytedance/seedance-2.0/text-to-video       /  bytedance/seedance-2.0/image-to-video
    seedance-2.5       bytedance/seedance-2.5/text-to-video       /  bytedance/seedance-2.5/image-to-video
    minimax-h3         minimax/h3/text-to-video                   /  minimax/h3/image-to-video
    flux-3             blackforestlabs/flux-3/text-to-video       /  blackforestlabs/flux-3/image-to-video
    grok-imagine-1.5   xai/grok-imagine-video/v1.5/text-to-video  /  xai/grok-imagine-video/v1.5/image-to-video
    kling-v3-4k        fal-ai/kling-video/v3/4k/text-to-video     /  fal-ai/kling-video/v3/4k/image-to-video
    happy-horse        alibaba/happy-horse/text-to-video          /  alibaba/happy-horse/image-to-video

  Image-to-video only (no text_endpoint):
    gemini-omni-flash  google/gemini-omni-flash/image-to-video

Selection precedence for the active family:
    1. ``model=`` arg from the tool call
    2. ``FAL_VIDEO_MODEL`` env var
    3. ``video_gen.fal.model`` in ``config.yaml``
    4. ``video_gen.model`` in ``config.yaml`` (when it's one of our family IDs
       or a full endpoint path that contains a family ID)
    5. ``DEFAULT_MODEL``

Authentication via ``FAL_KEY`` or the managed Nous gateway. Output is an
HTTPS URL from FAL's CDN; the gateway downloads and delivers it.
    )annotationsN)AnyDictListOptionalTuple)VideoGenProvidererror_responsesuccess_responsezLTX 2.3 (22B)z~30-60scheapz322B model with native audio generation. Affordable.z fal-ai/ltx-2.3-22b/text-to-videoz!fal-ai/ltx-2.3-22b/image-to-videoT)displayspeedprice	strengthstiertext_endpointimage_endpointaspect_ratiosresolutions	durationsaudionegativezPixverse v6z~30-90sz.Affordable. Negative prompts. 1-15s durations.z fal-ai/pixverse/v6/text-to-videoz!fal-ai/pixverse/v6/image-to-video360p540p720p1080p)      zSeedance 2.0 MinizAByteDance. Faster/cheaper Seedance tier, audio + lip-sync, 4-15s.z)bytedance/seedance-2.0/mini/text-to-videoz*bytedance/seedance-2.0/mini/image-to-video)21:916:94:31:13:49:16)480pr   )   r   F)r   r   r   r   r   r   r   r   r   r   r   r   seedzVeo 3.1z~60-120spremiumzBGoogle DeepMind. Cinematic, native audio, strong prompt adherence.zfal-ai/veo3.1zfal-ai/veo3.1/image-to-video)r!   r%   )r   r   4k)r'         s)r   r   r   r   r   r   r   r   r   r   duration_suffixr   r   zSeedance 2.0z;ByteDance. Cinematic, synchronized audio + lip-sync, 4-15s.z$bytedance/seedance-2.0/text-to-videoz%bytedance/seedance-2.0/image-to-video)r&   r   r   zSeedance 2.5z~60-180szUByteDance flagship. Native 30s single-pass, audio in the same latent space, lip-sync.z$bytedance/seedance-2.5/text-to-videoz%bytedance/seedance-2.5/image-to-video)aspect_ratio)r'      )r   r   r   r   r   r   r   image_drop_keysr   r   r   r   r   r(   r   z
MiniMax H3r   r   r   zCMiniMax frontier. Native 2K (up to 4K), 5-15s, seven aspect ratios.r   r   zminimax/h3/text-to-videor   zminimax/h3/image-to-videoduration_intr1   r   r   )768P2K4Kresolution_aliasesr3   r4   r5   )r&   r   r   768pr   2kr*   2160pr   )   r   r   r   r(   zFLUX 3 (via FAL)zGBlack Forest Labs frontier video. Native audio, 5-20s, 8 aspect ratios.z$blackforestlabs/flux-3/text-to-videoz%blackforestlabs/flux-3/image-to-video)r    z2:1r!   r"   r#   r$   r%   )r   r   )r:      )r   r   r   r   r   r   r   r2   r   r   r   r   r   r(   zGrok Imagine 1.5 (via FAL)z=xAI. Fast stylized video with audio, 1-15s, cheap per second.z)xai/grok-imagine-video/v1.5/text-to-videoz*xai/grok-imagine-video/v1.5/image-to-video)r!   r"   z3:2r#   z2:3r$   r%   )r   r   r   r   r   r   r   r2   r1   r   r   r   r   r   r(   zGemini Omni Flash (via FAL)zBGoogle. Image-to-video with audio, physics-grounded motion, 3-10s.z'google/gemini-omni-flash/image-to-video)   
   zKling v3 4Kz	~120-300sz14K output, native audio (Chinese/English), 3-15s.z&fal-ai/kling-video/v3/4k/text-to-videoz'fal-ai/kling-video/v3/4k/image-to-videostart_image_urlr!   r%   r#   )r<   r   )r   r   r   r   r   r   r   image_param_keyr   r   r   r   r   zHappy Horse 1.0uA   Alibaba. New model, sparse public docs — conservative defaults.z!alibaba/happy-horse/text-to-videoz"alibaba/happy-horse/image-to-video)zltx-2.3pixverse-v6zseedance-2.0-minizveo3.1zseedance-2.0zseedance-2.5z
minimax-h3zflux-3zgrok-imagine-1.5zgemini-omni-flashzkling-v3-4kzhappy-horsezDict[str, Dict[str, Any]]FAL_FAMILIESrA   r   returnboolc                    t          | t                    rt          |           dk    rdS t          d | D                       sdS | d         | d         z
  dk    S )zIHeuristic: a 2-tuple of ints with a gap > 1 is treated as ``(min, max)``.   Fc              3  @   K   | ]}t          |t                    V  d S N)
isinstanceint).0ds     B/home/agent/.hermes/hermes-agent/plugins/video_gen/fal/__init__.py	<genexpr>z%_is_duration_range.<locals>.<genexpr>-  s,      55az!S!!555555    r   r   )rI   tuplelenall)r   s    rM   _is_duration_rangerS   )  se    i'' 3y>>Q+>+>u55955555 uQ<)A,&**rO   familyDict[str, Any]durationOptional[int]c                   |                      d          }|sS t          |          rd n|d         S t          |          r#|\  }}t          |t          |                    S |v rS t          |fd          S )Nr   r   c                (    t          | z
            S rH   )abs)rL   rV   s    rM   <lambda>z!_clamp_duration.<locals>.<lambda>B  s    AL(9(9 rO   )key)getrS   maxmin)rT   rV   r   lohis    `   rM   _clamp_durationrb   2  s    

;''I 
 *)44Ftt)A,F)$$ *B2s2x(()))9y9999::::rO   c                    	 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 load video_gen config: %s)hermes_cli.configrd   rI   dictr]   	Exceptionloggerdebug)rd   cfgsectionexcs       rM   _load_video_gen_sectionrn   J  s    111111kmm*4S$*?*?I#''+&&&T$Wd33;ww;   :C@@@						s   AA 
B!B=BBztext-to-videozimage-to-videocstrOptional[str]c                   |                                  } | sdS | t          v r| S t                                          D ]5\  }}| |                    d          |                    d          fv r|c S 6g }t                                          D ]\  }}|                    d          |                    d          fD ]}t	          |t
                    s|                    | dz             s1|t          |           dz   d                             dd          d         }|t          v r&|
                    t          |           |f            n|r&|                    d d	           |d         d         S t          |                     d                    }d}d
}t          D ]*}||v r$t          |          |k    r|}t          |          }+|S )a6  Try to extract a known family ID from a model string.

    Handles bare IDs (``seedance-2.5``), full endpoint paths
    (``bytedance/seedance-2.5/text-to-video``), truncated endpoint stems
    (``minimax/h3``, ``bytedance/seedance-2.0/mini``), and provider-prefixed
    names (``bytedance/seedance-2.5``).
    Nr   r   /r   r   c                    | d         S )Nr    )items    rM   r[   z'_normalize_family_key.<locals>.<lambda>}  s
    Q rO   T)r\   reverse)striprB   itemsr]   rI   rp   
startswithrQ   split_ENDPOINT_MODALITY_LEAVESappendsortset)	ro   fidmeta	stem_hitsendpointfirstpartsbest_fidbest_lens	            rM   _normalize_family_keyr   Y  s    	
		A tL "''))  	T/**DHH5E,F,FGGGJJJ H (*I!'')) 	 		T/22DHH=M4N4NO 	 	Hh,, &&q3w// SVVaZ[[)//Q77:E111  #a&&#/// 2  //>>>|A
 E"HH    %<<CHHx//H3xxHOrO   explicitTuple[str, Dict[str, Any]]c                   g }|                     |            |                     t          j                            d                     t	                      }t          |                    d          t                    r|                    d          ni }t          |t                    r(|                     |                    d                     |                    d          }t          |t                    r|                     |           |D ]M}t          |t                    r6|                                r"t          |          }|r|t          |         fc S Nt          t          t                   fS )z>Decide which FAL family to use. Returns ``(family_id, meta)``.FAL_VIDEO_MODELfalmodel)r~   osenvironr]   rn   rI   rg   rp   ry   r   rB   DEFAULT_MODEL)r   
candidatesrk   fal_cfgtopro   r   s          rM   _resolve_familyr     sJ   &(Jhbjnn%677888
!
#
#C *3775>>4 @ @HcggennnbG'4   0'++g..///
'''

C#s # . .a 	.!'')) 	.'**C .L-----,}555rO   prompt	image_urlr/   
resolutionnegative_promptOptional[bool]c               N   i }	|r||	d<   |r|                      d          pd}
||	|
<   ||                      dd          r||	d<   |                      d          r|| d         v r||	d<   |                      d	          rP|                      d
          pi }|                     |pd                                |          }|| d	         v r||	d<   t          | |          }|O|                      d          r:|                      d          r||	d<   n|                      dd          }| | |	d<   |                      d          r|t          |          |	d<   |                      d          r|r||	d<   |r/|                      dd          D ]}
|	                    |
d           |	S )zJBuild a family-specific payload, dropping keys the family doesn't declare.r   r@   r   Nr(   Tr   r/   r   r6    r   r   r2   rV   r.   r   generate_audior   r   r1   ru   )r]   lowerrb   rD   pop)rT   r   r   rV   r/   r   r   r   r(   payloadr\   aliasesresolvedclampedsuffixs                  rM   _build_payloadr     s    !G #" ! jj*++:{  FJJvt44zz/"" 36/222&2GN# zz-   - **1228b;;
 0b7799:FFvm,,,$,GL! fh//Gvzz+66::n%% 	7")GJ ZZ 1266F%,"6f"6"6GJzz' 0u0$(KK !zz* 5/ 5%4!"  #::/44 	# 	#CKKT""""NrO   _fal_clientc                     t           t           S t          5  t           t           cddd           S ddlm}   |             a t           cddd           S # 1 swxY w Y   dS )ao  Lazy-load the ``fal_client`` SDK and cache it on this module.

    Delegates the actual import to :func:`tools.fal_common.import_fal_client`
    so the ``lazy_deps`` ensure-install handling stays in one place.

    Thread-safe via double-checked locking: concurrent first calls import
    the SDK exactly once instead of each racing thread re-running the import.
    Nr   import_fal_client)r   _fal_client_locktools.fal_commonr   r   s    rM   _load_fal_clientr     s     	  "        	766666''))                 s   AAAA_managed_fal_video_client _managed_fal_video_client_configc                    ddl m}  ddlm}m}m}m}  |d          }||k    r) | d          }|t           |d|d                    |S |& |            st           |d|d                    dS  |            rdS  | d          S )	u  Resolve the FAL video route from the stored selection.

    Plain switch on the stored ``video_gen`` provider string — mirrors the
    image FAL resolver: ``"nous"`` (or legacy ``use_gateway: true``) →
    managed only (unentitled ⇒ selection-naming error); any other stored
    provider → direct only (missing FAL_KEY ⇒ selection-naming error);
    never-configured category → legacy credential autodetect.
    r   resolve_managed_tool_gateway)NOUS_MANAGED_PROVIDERfal_key_is_configuredread_selectionselection_errorre   	fal-queueNzDthe Nous Tool Gateway is not available (not entitled or unreachable)zFAL_KEY is not set)tools.managed_tool_gatewayr   tools.tool_backend_helpersr   r   r   r   
ValueError)r   r   r   r   r   selectedgateways          rM   "_resolve_managed_fal_video_gatewayr     s%    HGGGGG            ~k**H(((..{;;?__%     $$&& 	__$    
 t t''444rO   c                D   ddl m} | j                            d          | j        f}t
          5  t          t          |k    rt          cddd           S t                        |t          | j        | j                  a|at          cddd           S # 1 swxY w Y   dS )zQReuse the managed FAL client so its internal httpx.Client is not leaked per call.r   )_ManagedFalSyncClientrs   N)r\   queue_run_origin)
r   r   gateway_originrstripnous_user_token_managed_fal_video_client_lockr   r   r   r   )managed_gatewayr   client_configs      rM   _get_managed_fal_video_clientr   >  s"    766666 	&--c22'M 
( ) )$05UYf5f5f,) ) ) ) ) ) ) ) 	$9$9/,;%
 %
 %
!
 ,9(() ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )s   B3BBBr   	argumentsc                   t                       dt          t          j                              i}t	                      }|t
                              | ||          S t          |          }	 |                    | ||          S # t          $ r@}ddl	m
}  ||          }|'d|cxk    rdk     rn nt          d|  d	| d
          | d}~ww xY w)zSubmit a FAL video request using direct credentials or the managed queue gateway.

    Returns a request handle whose ``.get()`` blocks until the result is ready.
    zx-idempotency-keyN)r   headersr   )_extract_http_statusi  i  z-Nous Subscription gateway rejected endpoint 'z' (HTTP u   ). This model may not yet be enabled on the Nous Portal's FAL proxy. Either:
  • Set FAL_KEY in your environment to use FAL.ai directly, or
  • Pick a different model via `hermes tools` → Video Generation.)r   rp   uuiduuid4r   r   submitr   rh   r   r   r   )r   r   request_headersr   managed_clientrm   r   statuss           rM   _submit_fal_video_requestr   U  s;   
 *C
,=,=>O8::O!!(i!YYY2?CCN$$# % 
 
 	

    999999%%c**#"5"5"5"5#"5"5"5"5"5Y Y YY Y Y   	s   .B 
C;CCc                     ddl m}  ddlm}m}m}  |d          }||k    r | d          duS |
 |            S  |            rdS  | d          duS )u:  True if the FAL video backend selected via `hermes tools` (or, on a
    never-configured install, any FAL backend) is reachable.

    Never raises — a stored-but-broken selection reports False here; the
    honest selection-naming error surfaces at call time from
    ``_resolve_managed_fal_video_gateway``.
    r   r   )r   r   r   re   r   NT)r   r   r   r   r   r   )r   r   r   r   r   s        rM   _check_fal_video_availabler   v  s     HGGGGG          ~k**H(((++K88DD$$&&& t''44D@@rO   zfal-ai/seedvr/upscale/videorF   	video_urlsource_request_idc                   	 t                               dt                     | dt          d}t                      |st	          d          ||d<   t          t          |          }|                                }n3# t          $ r&}t           	                    d|           Y d}~dS d}~ww xY wt          |t                    r|pi                     d          nd}t          |t                    r|                    d	          r|d	         S t          |t                    r|r|S t           	                    d
           dS )u  Upscale a generated video via SeedVR2; return the new URL or None.

    Best-effort: any failure logs and returns ``None`` so the caller falls
    back to the native-resolution video — an upscale failure must never
    destroy an already-successful generation.
    z%Upscaling video with SeedVR2 (%dx)...factor)r   upscale_modeupscale_factorNz9Managed SeedVR upscale requires the source FAL request idr   zVideo upscale failed: %svideourlzVideo upscaler returned no URL)ri   infoUPSCALER_FACTORr   RuntimeErrorr   UPSCALER_ENDPOINTr]   rh   warningrI   rg   rp   )r   r   r   handleresultrm   r   s          rM   _upscale_videor     sT   ;_MMM"$-%
 %
	
 .//;$ `"#^___->I)**+<iHH   13777ttttt ,6fd+C+CMV\rw'''E% 599U#3#3 U|% % 
NN34444s   A8A; ;
B+B&&B+c                      e Zd ZdZed$d            Zed$d            Zd%dZd&d	Zd'dZ	d(dZ
d(dZddddddddddd
d)d#ZdS )*FALVideoGenProviderzFAL.ai multi-family video generation backend.

    Routes between text-to-video and image-to-video endpoints automatically
    based on whether ``image_url`` was provided.
    rC   rp   c                    dS )Nr   ru   selfs    rM   namezFALVideoGenProvider.name      urO   c                    dS )NFALru   r   s    rM   display_namez FALVideoGenProvider.display_name  r   rO   rD   c                B    	 t                      S # t          $ r Y dS w xY w)NF)r   rh   r   s    rM   is_availablez FALVideoGenProvider.is_available  s5    	-/// 	 	 	55	s    
List[Dict[str, Any]]c           
     6   g }t                                           D ]\  }}g }|                    d          r|                    d           |                    d          r|                    d           ||d         |d         |d         |d         |                    d	d
          |d}|                    d          }|r?t	          |          r|\  |d<   |d<   n$t          |          |d<   t          |          |d<   |                    |           |S )Nr   textr   imager   r   r   r   r   r)   )idr   r   r   r   r   
modalitiesr   min_durationmax_duration)rB   rz   r]   r~   rS   r_   r^   )r   outr   r   r   entrydurss          rM   list_modelszFALVideoGenProvider.list_models  s8   $&%++-- 	 	IC$&Jxx(( *!!&)))xx()) +!!'***	?g!+.g33(% %E 88K((D 6%d++ 6CG@E.)5+@+@,/IIE.),/IIE.)JJu
rO   rq   c                    t           S rH   )r   r   s    rM   default_modelz!FALVideoGenProvider.default_model  s    rO   rU   c                    dddddddgdS )	Nr   paidu   LTX, Pixverse, Seedance 2.0/2.5/Mini, Veo 3.1, MiniMax H3, FLUX 3, Kling 4K, Happy Horse, Grok Imagine, Gemini Omni — text-to-video & image-to-videoFAL_KEYzFAL.ai API keyzhttps://fal.ai/dashboard/keys)r\   r   r   )r   badgetagenv_varsru   r   s    rM   get_setup_schemaz$FALVideoGenProvider.get_setup_schema  s7     l %.: 	
 
 	
rO   c           	     J   d}d }t                                           D ]q}|                    d          }|st          |          r|\  }}nt	          |          t          |          }}t          ||          }||nt	          ||          }rddgg dg d|||nddddd	S )
Nr   r   r   r   r?   r   Tr   )r   r   r   r   r   supports_audiosupports_negative_promptmax_reference_images)rB   valuesr]   rS   r_   r^   )r   max_durmin_durr   r   r`   ra   s          rM   capabilitiesz FALVideoGenProvider.capabilities  s     !% '')) 		B 		BD88K((D !$'' .BBTCIIB'2&&G#ObbWb1A1AGG!7+444<<<#'.':GG"(,$%	
 	
 		
rO   Nr!   r   )
r   r   reference_image_urlsrV   r/   r   r   r   r(   upscaler   r   r   r  Optional[List[str]]rV   rW   r/   r   r   r   r   r(   r  kwargsr   c       
           t                      skddlm}  |d          G	 t                       n7# t          $ r*}t          t          |          dd|          cY d }~S d }~ww xY wt          ddd|          S 	 t                       n## t          $ r t          dd	d|          cY S w xY w|pd
	                                }t          |          \  }}|pd
	                                pd }|r2|                    d          }d}|st          d| ddd||          S n1|                    d          }d}|st          d| ddd||          S |st          ddd||          S t          ||||||||	|
	  	        }	 t          ||          }t          |dd           }|                                }nN# t          $ rA}t                               d|||d           t          d| dd|||          cY d }~S d }~ww xY wt%          |t&                    r|pi                     d          nd }d }t%          |t&                    r|                    d          }nt%          |t                    r|}|st          d d!d||          S d"}|r1t)          ||          }|r|}d}nt                               d#           ||d$}|r
t*          |d%<   t%          |t&                    rB|                    d&          r|s|d&         |d&<   |                    d'          r|d'         |d'<   t-          ||||d(|v r|nd
d)|v rAt/          d
                    d* t          |d)                   D                       pd+          ndd|,          S )-Nr   )r   re   auth_requiredr   )error
error_typeproviderr   u   No FAL backend available. Either set FAL_KEY (run `hermes tools` → Video Generation → FAL to configure) or sign in to Nous (`hermes setup`) for managed gateway access.z@fal_client Python package not installed (pip install fal-client)missing_dependencyr   r   r   zFAL family us    has no image-to-video endpoint. Pick a family with image-to-video support via `hermes tools` → Video Generation.modality_unsupported)r  r  r  r   r   r   r   zq has no text-to-video endpoint. Pass an image_url to use its image-to-video endpoint, or pick a different family.zprompt is required.missing_prompt)r   r   rV   r/   r   r   r   r(   
request_idz1FAL video gen failed (family=%s, endpoint=%s): %sT)exc_infozFAL video generation failed: 	api_error)r  r  r  r   r   r/   r   r   z%FAL returned no video URL in responseempty_responseFu?   Video upscale pass failed — returning native-resolution video)r   upscaledr   	file_sizecontent_typer/   rV   c              3  B   K   | ]}|                                 |V  d S rH   )isdigit)rK   ro   s     rM   rN   z/FALVideoGenProvider.generate.<locals>.<genexpr>  s/       T Tq		 T T T T T T TrO   0)r   r   r   modalityr/   rV   r  extra)r   r   r   r   r   r
   rp   r   ImportErrorry   r   r]   r   r   getattrrh   ri   r   rI   rg   r   r   r   rJ   join)r   r   r   r   r  rV   r/   r   r   r   r(   r  r  r   rm   	family_idrT   image_url_normr   modality_usedr   r   r   r   r   r   r  upscaled_urlr%  s                                rM   generatezFALVideoGenProvider.generate  sI     *++ 	AAAAAA~k**668888!   )!#hh#2!&%	         "V +	 	 	 		 	 	 	!X/	     	 ,B%%''+E22	6 $/r0022:d 	zz"233H#M 	%Di D D D  6")F   	 zz/22H"M 	%Pi P P P  6")F     	!++i    !$%!+

 

 

	.xAAF 'd C CZZ\\FF 
	 
	 
	NNC8S4     ";c;;&i)	        
	 0:&$/G/GQ2""7+++T!eT"" 	))E""CCs## 	C 	!=+i     	)#/@AAL "U   .68 L L 	6&5E"#eT"" 	>yy%% 8h 8%*;%7k"yy(( >(-n(=n%")77)B)B`jnu`u`uS T TC
0C,D,D T T TTT[X[\\\{|	
 	
 	
 		
sJ   0 
A$AA$A$;B
 
B*)B*5F7 7
H6G=7H=H)rC   rp   rC   rD   )rC   r   )rC   rq   rC   rU   )r   rp   r   rq   r   rq   r  r  rV   rW   r/   rp   r   rp   r   rq   r   r   r(   rW   r  r   r  r   rC   rU   )__name__
__module____qualname____doc__propertyr   r   r   r   r   r  r  r-  ru   rO   rM   r   r     s            X    X      6   
 
 
 

 
 
 
<  $#'48"&" )- $""&e
 e
 e
 e
 e
 e
 e
 e
rO   r   Nonec                H    |                      t                                 dS )uF   Plugin entry point — wire ``FALVideoGenProvider`` into the registry.N)register_video_gen_providerr   )ctxs    rM   registerr9    s#    ##$7$9$9:::::rO   )r   r   rC   rD   )rT   rU   rV   rW   rC   rW   r/  )ro   rp   rC   rq   )r   rq   rC   r   )rT   rU   r   rp   r   rq   rV   rW   r/   rp   r   rp   r   rq   r   r   r(   rW   rC   rU   )rC   r   )r   rp   r   rU   r.  rH   )r   rp   r   rq   rC   rq   )rC   r5  )/r3  
__future__r   loggingr   	threadingr   typingr   r   r   r   r   agent.video_gen_providerr	   r
   r   	getLoggerr0  ri   rB   __annotations__r   rS   rb   rn   	frozensetr}   r   r   r   r   Lockr   r   r   r   r   r   r   r   r   r   r   r   r   r9  ru   rO   rM   <module>rC     s  ' ' 'R # " " " " "  				      3 3 3 3 3 3 3 3 3 3 3 3 3 3          
	8	$	$6 #J;=  " !E;=8  'XDFF' " Y(8).   "R?A G0! & "l?A -F'# &< 	 	Z	
 		 	3 	5 	 	, 	F" 	+#$ 	FFFTD
 
%, 	W-. 	/0 	E12 	38 &^?AM( $ 0TDF,L0! & 1YC) $ !HAC -0 $ %X<>  IT+ T+ T T T Tl + + + +; ; ; ;0	 	 	 	 &I8H&IJJ 1 1 1 1h6 6 6 68C C C CT     !9>##    0 "&  % % % %(,   , , , ,!/!1!1 '5 '5 '5T) ) ).   BA A A A@ 2 
 (,! ! ! ! !R@
 @
 @
 @
 @
* @
 @
 @
P; ; ; ; ; ;rO   