
    }j                    v    d Z ddlmZ ddlmZ dZdZ ed           G d d	                      Zd
dddZdS )zBSide-effect-free delivery planning for social media draft reviews.    )annotations)	dataclassi   )publishpostT)frozenc                  R    e Zd ZU ded<   dZded<   dZded<   dZded	<   d
Zded<   dS )SocialDraftDeliverystrtextreviewtopicsocial_draft_reviewdelivery_typeTboolrequires_human_approval ztuple[str, ...]side_effectsN)__name__
__module____qualname____annotations__r   r   r   r   r       T/home/agent/jarvis_runtime/autoshortsbot/AutoShortsBot/autoshorts/social/delivery.pyr	   r	      s`         IIIE.M....$((((($&L&&&&&&r   r	   r   )r   review_textr
   r   returnc               J   | pd                                 st          d          t          |           t          k    rt          d          |                                 t          fdt          D                       rt          d          t          | |ddd	          S )
z@Prepare a Telegram-bound social draft review without sending it. zreview text is requiredz(Telegram message exceeds 4096 charactersc              3      K   | ]}|v V  	d S )Nr   ).0wordlowereds     r   	<genexpr>z0prepare_social_draft_delivery.<locals>.<genexpr>   s'      
?
?t47?
?
?
?
?
?
?r   z/social draft delivery must not imply publishingr   Tr   )r   r   r   r   r   )strip
ValueErrorlen_TELEGRAM_MESSAGE_LIMITcasefoldany_FORBIDDEN_ACTION_WORDSr	   )r   r   r!   s     @r   prepare_social_draft_deliveryr*      s     2$$&& 42333
;111CDDD""$$G

?
?
?
?'>
?
?
??? LJKKK+ $   r   N)r   r
   r   r
   r   r	   )	__doc__
__future__r   dataclassesr   r&   r)   r	   r*   r   r   r   <module>r.      s    H H " " " " " " ! ! ! ! ! ! -  $' ' ' ' ' ' ' ' EM        r   