+
    jHàjØ  ã                   óB   € R t ^ RIHt ^ RIHt RtRtR R ltR R ltR	# )
zÄExecution-mode invariants every cron job definition must satisfy.

``create_job`` and ``update_job`` (``cron/jobs.py``) both run these, so an update cannot
bypass a rule the create door enforces.
)ÚOptional)Údisplay_hermes_homeud   no_agent=True requires a script â€” with no agent and no script there is nothing for the job to run.zµscript must name a file under {scripts_dir} (e.g. 'watchdog.sh'), not a shell command line: {script!r} has no such file. Write the command into a script there and pass its filename.c          
      óŽ   € V ^8„  d   QhR\         \        ,          R\         \        ,          R\        R\         \        ,          RR/# )é   Úmonitor_scriptÚmonitor_urlÚno_agentÚscriptÚreturnN)r   ÚstrÚbool)Úformats   "Ú9/home/ubuntu/.hermes/hermes-agent/cron/jobs_invariants.pyÚ__annotate__r      sM   € ÷ Mñ MÜœS•MðMäœ#•ðMô ðMô ”S�Mð	Mð
 
ñMó    c                óT  € V '       d   V'       d   \        R4      hV '       g	   V'       d   V'       d   \        R4      hV'       d   V'       g   \        \        4      hV'       dC   \        V4      '       d0   \        \        P	                  \        4       R,           VR7      4      hR# R# )z^Execution-mode invariants shared by create_job and update_job (no bypass via the update
door).ua   monitor_script and monitor_url are mutually exclusive â€” a job can only have one monitor source.uÈ   monitor_script/monitor_url cannot be combined with no_agent=True â€” the whole point of a monitor job is to suppress or wake the AGENT based on source changes. Use a plain no_agent script job instead.z	/scripts/)Úscripts_dirr	   N)Ú
ValueErrorÚNO_AGENT_WITHOUT_SCRIPT_ERRORÚ_script_is_command_lineÚSCRIPT_IS_COMMAND_LINE_ERRORr   r   )r   r   r   r	   s   &&&&r   Ú_validate_job_mode_invariantsr      s‘   € ÷ Ÿ+Üð0ó1ð 	1÷ 	Ÿ+¯8ÜðPóQð 	Q÷ ŸÜÔ6Ó7Ð7ßÔ)¨&×1Ò1ÜÔ5×<Ñ<Ü+Ó-°Õ;ÀFð =ó Ló Mð 	Mñ 2�vr   c                ó0   € V ^8„  d   QhR\         R\        /# )r   r	   r
   )r   r   )r   s   "r   r   r   -   s   € ÷ .ñ .¤Cð .¬Dñ .r   c                ó  € \         ;QJ d*    R V P                  4        4       F  '       g   K   RM	  RM! R V P                  4        4       4      '       g   R# ^ RIHp V! V 4      pVRJ ;'       g    VP	                  4       '       * # )zóA ``script`` with whitespace that resolves to no file is a command line (``echo hi``),
not a path; run every tick it would deliver "Script not found" as the payload. A plain
missing filename stays creatable (``hermes cron doctor`` reports it).c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5i)N)Úisspace)Ú.0Úchs   & r   Ú	<genexpr>Ú*_script_is_command_line.<locals>.<genexpr>1   s   é € Ð5¡n �z‰z�|ˆ|£nùs   ‚TF)Ú_resolve_script_pathN)ÚanyÚstripÚcron.lifecycle_guardr    Úis_file)r	   r    Úpaths   &  r   r   r   -   s\   € ÷ ‹3Ñ5 f§l¡l¤nÓ5�3�3Š3Ñ5 f§l¡l¤nÓ5×5Ò5ÙÝ9Ù Ó'€DØ�4ˆ<×-Ð-˜tŸ|™|›~Ô-Ð-r   N)	Ú__doc__Útypingr   Úhermes_constantsr   r   r   r   r   © r   r   Ú<module>r*      s2   ðñõ
 å 0ð+ð ð`ð õM÷0.r   