+
    i*                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ]! ]4      P                  4       P                  ^,          t
]! ]
4      ]P                  9  d#   ]P                  P                  ^ ]! ]
4      4       ^ RIHtHtHt ^ RIHtHtHtHtHt ^ RIHtHt ^ RIHt ^ RIHt ^ R	IH t  ^ R
I!H"t" R t#R t$]%R8X  d
   ]$! 4        R# R# )    )annotationsN)Path)DB_PATHinit_db	fetch_one)create_projectcreate_scenecreate_taskmark_task_submittedupdate_task_from_callback)validate_payloadValidationError)download_pending_assets)make_jwt)_extract_assets)choose_endpointc                    \         P                  ! 4       '       d   \         P                  ! 4        R FJ  p \        \	        \         4      V ,           4      pVP                  4       '       g   K:  VP                  4        KL  	  \        4        R# )-walN)r   z-shm)r   existsunlinkr   strr   )suffixps     %scripts/doublecheck_pipeline_state.pyreset_dbr      sO    ~~)"W&'88::qxxz # I    c                    \        4        \        R RRR7      p V P                  R4      ^8H  p\        RRR4       \	        RR	R
RR^RRRRR^RR/4       Rp \        RRR/4       R\        RR/4      R\        RR/4      R\        RR/4      /p\        R	RRR/4      p\        VRRRRRRRR R!//4       RRR R"R#R$R%R&R'R(R)R*R+R,R-R./R/R0/R1R2R)R3R+R4R5R6R-R7/.R8R9^ R+R4/.//p\        V4      p\        Wv4       \        Wv4       \        4       p\        R:V34      p	\        R;V34      R<,          p
\        \         P"                  ! R$R=R>VR?VR@VRAV	RBV
RC\%        V4      /RD^RE7      4       R#   \         d   p\        T4      p Rp?ELRp?ii ; i)FAK_TESTSK_TESTi Se)now.	proj_demozDemo ProjectzDoublecheck validationscene_idscene_demo_001
project_idordering	narrationnvisual_promptvtarget_duration
scene_typetextNextendpromptx	image_ref
continuity
text2videodemokling_demo_task_003req_demo_003
request_iddatatask_idtask_status	submittedsucceedtask_status_msgokfinal_unit_deduction12	task_infoparent_videoidparent_2urlzhttps://example.com/parent2.mp4duration9external_task_idext_003task_resultvideosvid_003zCfile:///Users/moon/.openclaw/workspace/youtube-automation/README.mdwatermark_url 5imagesindexzvSELECT final_unit_deduction,parent_video_id,parent_video_url,parent_video_duration FROM tasks WHERE task_id_internal=?z9SELECT COUNT(*) AS cnt FROM assets WHERE source_task_id=?cntTjwt_okvalidation_errorroutesnormalized_task_fieldsasset_countdownloaded_countF)ensure_asciiindent)r   r   countr   r	   r   r   r   r   r
   r   r   r   r   r   printjsondumpslen)tokenrS   rT   erU   r9   payloadinternal
downloadedtaskrW   s              r   mainrf      s   JY	z:E[["F;0HI*-l;zRST_`cdstw  yJ  KL  MY  Z`  a  b"HS>2
 	f 56_l;%?@o|L&ABF *L8F:KLG!6Vdekmv  xM  N[  \g  mh  Ii  j'i$tntJu=^_ijm&n  qC  DM  N4	%8}  N  OQ  R\  ]`  #a  "b  dl  ov  wx  y~  D  nE  mF  GG )1HH&H&(*J  N  QY  P[  \DWZbYdefklK	$**dD(F4FHXZbdj  mE  GK  MZ  \g  i{  }@  AK  }L  M  \a  jk  l  m3  "q6"s   E# #F.E??F__main__)&
__future__r   r]   ossyspathlibr   __file__resolveparentsROOTr   pathinsert
scripts.dbr   r   r   scripts.repositoryr   r	   r
   r   r   scripts.validatorsr   r   scripts.asset_downloaderr   scripts.kling_authr   server.callback_receiverr   scripts.scene_routerr   r   rf   __name__ r   r   <module>r{      s    "  	 
 H~''*t9CHHHHOOAs4y! 2 2 x x @ < ' 4 0#mL zF r   