+
    „WÝjrÉ  ã                   óf  € R t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIH	t	 ^ RI
HtHtHtHtHt ]	! ]4      P"                  P"                  P%                  4       t]P(                  P+                  ^ ]! ]4      4       ^ RIHtHt R€R R lltR tR	 R
 ltR R ltR R ltR R ltR R lt R R lt!R R lt"R R lt#R R lt$R R lt%RR]PL                  3RR ]PN                  3/t(R�R" R# llt)R$ R% lt*R& R' lt+R‚R( R) llt,R* R+ lt-R, R- lt.R. R/ lt/R0 t0RƒR1 R2 llt1R3]Pd                  R4]PL                  R5]Pf                  R6]Ph                  /t5R7 R8 lt6R9t7R:t8R; R< lt9R= R> lt:R?R!/R@ RA llt;R?R!/RB RC llt<R„RD RE llt=RF t>RG RH lt?RI RJ lt@RK RL ltAR…tBRM RN ltCRO RP ltDRQ RR ltER†tFRS RT ltGR‡tHRU RV ltIRW tJRX tKRY RZ ltLR[ R\ ltMR] R^ ltNR_ R` ltORaRb RcRd ReRf RgRh RiRj RkRl RmRn RoRp RqRr RsRt RuRv RwRx RyRz /tP]PRi,          ]PR{&   ]PRo,          ]PR|&   ]PRy,          ;]PR}&   ]PR~&   R tQR# )ˆzCron subcommand for hermes CLI.N)ÚtimezoneÚUTC©ÚPath)ÚAnyÚDictÚIterableÚListÚOptional)ÚColorsÚcolorc                óˆ   € V ^8„  d   QhR\         \        \        ,          ,          R\         \        \        ,          ,          /# )é   ÚskillsÚreturn)r
   r   ÚstrÚlist)Úformats   "ÚCC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\cron.pyÚ__annotate__r      s0   € ÷ 	ñ 	´¼(Ä3½-Õ1Hð 	ÔT\Ô]aÔbeÕ]fÕTgñ 	ó    c                óÜ   € Vf   V f   R# . pVe   \        V4      MV . FI  p\        T;'       g    R4      P                  4       pV'       g   K0  WB9  g   K8  VP                  V4       KK  	  V# )zDDeduped, stripped skill names; None when neither argument was given.NÚ )r   r   ÚstripÚappend)Úsingle_skillr   Ú
normalizedÚitemÚtexts   &&   r   Ú_normalize_skillsr      sg   € à‚~˜,Ò.ÙØ€JØ &Ò 2”�V”¸¸ÒFˆÜ�4—:�:˜2‹×$Ñ$Ó&ˆß‰4�DÖ*Ø×Ñ˜dÖ#ñ Gð Ðr   c                  óF   € ^ RI Hp \        P                  ! V! R/ V B 4      # )é    )Úcronjob© )Útools.cronjob_toolsr"   ÚjsonÚloads)ÚkwargsÚcronjob_tools   , r   Ú	_cron_apir)      s   € Ý;Ü�:Š:‘lÑ, VÑ,Ó-Ð-r   c                ó$   € V ^8„  d   QhR\         /# ©r   r   ©r   )r   s   "r   r   r   "   s   € ÷ ñ ¤Cñ r   c                 ój   €  ^ RI Hp  V ! 4       P                  ;'       g    R#   \         d     R# i ; i)uX   Resolved cron scheduler provider name ('builtin', 'chronos', â€¦); 'builtin' on failure.©Úresolve_cron_schedulerÚbuiltin)Úcron.scheduler_providerr/   ÚnameÚ	Exceptionr.   s    r   Ú_active_cron_provider_namer4   "   s3   € ðÝBÙ%Ó'×,Ñ,×9Ð9°	Ð9øÜô Úðús   ‚#  # £2±2c                ó:   € V ^8„  d   QhR\         \        ,          /# r+   )r
   Úbool)r   s   "r   r   r   +   s   € ÷ ñ ¤8¬D¥>ñ r   c                 óž  €  \        4       R8w  d   R# \        P                  ! \        4      ;_uu_ 4        ^ RIHp  V ! 4       '       d    RRR4       R#  RRR4       ^ RIHpHp V! 4       '       d   R# ^ RI	H
pHp \        V! 4       4      '       g   R# V! 4       ;'       g    V! 4       #   + '       g   i     L]; i  \         d     R# i ; i)uÆ  Tri-state readiness of a scheduler serving THIS home (None = probe failed).

A gateway launched from this home proves itself by process liveness. Any other scheduler that
ticks this home â€” the host multiplexer for a served profile, or the in-process ticker inside
``hermes serve`` / the Desktop backend (#121881) â€” proves itself only by the fresh heartbeat it
writes into this home's store. External providers use their own machinery and are exempt.
r0   T)Úis_gateway_runtime_lock_activeN©Úfind_gateway_pidsÚ+named_profile_served_by_running_multiplexer©Úget_ticker_heartbeat_ageÚticker_heartbeat_writer_aliveF)r4   Ú
contextlibÚsuppressr3   Úgateway.statusr8   Úhermes_cli.gatewayr:   r;   Ú	cron.jobsr=   r>   Ú_ticker_age_is_fresh)r8   r:   r;   r=   r>   s        r   Ú_builtin_gateway_livenessrE   +   s¡   € ðÜ%Ó'¨9Ô4Ùô × Ò ¤×+Õ+ÝEÙ-×/Ò/Ø÷ ,Ñ+à/÷ ,÷ 	fÙ×ÒÙßUÜ#Ñ$<Ó$>×?Ò?Ùñ
 ;Ó<×_Ð_Ñ@]Ó@_Ð_÷ ,×+ûô ô ÚðúsE   ‚B= “"B= µB*Á
B= ÁB= Á4B= ÂB= Â"B= Â*B:	Â5B= Â=CÃCc                ó   € V ^8„  d   QhRR/# ©r   r   Nr#   )r   s   "r   r   r   L   s   € ÷ Gñ G dñ Gr   c                 óÐ   € \        4       RJd   R# ^ RIHp  \        \	        RV ! 4        R2\
        P                  4      4       \        \	        R\
        P                  4      4       R# )zaWarn at create/list time when the scheduler is not ready; stay silent on an unknown probe result.FN©Úget_active_profile_nameu+     âš   Scheduler is not ready for profile 'z6': no gateway serves it and no fresh ticker heartbeat.z¦     If no gateway is running: hermes gateway install
                    sudo hermes gateway install --system  # Linux servers
     Check status:  hermes cron status)rE   Úhermes_cli.profilesrJ   Úprintr   r   ÚYELLOWÚDIMrI   s    r   Ú_warn_if_gateway_not_runningrO   L   sc   € ä Ó"¨%Ó/ÙÝ;ô 
Œ%Ð=Ñ>UÓ>WÐ=Xð YFð FÜGMÇ}Á}óVô Wä	Œ%ð 9ä:@¿*¹*óFö Gr   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úsecondsr   )Úfloatr   )r   s   "r   r   r   Z   s   € ÷ Dñ Dœeð D¬ñ Dr   c                ó8  €  \        ^ \        V 4      4      p T ^<8  d   T  R2# \	        T ^<4      w  r\	        T^<4      w  r1\	        T^4      w  rCTR3TR3T'       g   TM^ R3.pRP                  R T 4       4      ;'       g    R#   \        \        3 d     R# i ; i)	z=Render a lateness duration compactly: '31m', '2h 30m', '45s'.Ú?ÚsÚdÚhÚmÚ c              3   óF   "  € T F  w  rV'       g   K  V V 2x € K  	  R # 5i©Nr#   )Ú.0ÚnÚunits   &  r   Ú	<genexpr>Ú#_format_lateness.<locals>.<genexpr>f   s   é € Ð;±¡W Q¼”L�q�c˜$˜•L³ùs   ‚!“!Ú0m)ÚmaxÚintÚ	TypeErrorÚ
ValueErrorÚdivmodÚjoin)rQ   ÚminutesÚ_ÚhoursÚdaysÚpartss   &     r   Ú_format_latenessrm   Z   s©   € ðÜ�aœ˜W›Ó&ˆð �„|Ø�˜!ˆ}ÐÜ˜ Ó$�J€GÜ˜G RÓ(�N€EÜ˜ Ó#�K€DØ�Cˆ[˜5 #˜,¿©À!ÀSÐ(IÐJ€EØ�8‰8Ñ;±Ó;Ó;×CÐC¸tÐCøô ”zÐ"ô Úðús   ‚B ÂBÂBc                ó:   € V ^8„  d   QhR\         \        ,          /# r+   )r
   r   )r   s   "r   r   r   i   s   € ÷ Pñ P¤(¬3¥-ñ Pr   c                 ó,   € R RRR/P                  V 4      # )Úcatch_upzcatch-up after missed fireÚlate©Úget)Úkinds   &r   Ú_dispatch_kind_labelru   i   s   € ØÐ4°f¸fÐE×IÑIÈ$ÓOÐOr   c                óF   € V ^8„  d   QhR\         R\        \        ,          /# )r   Únext_run_atr   )r   r
   rR   )r   s   "r   r   r   m   s"   € ÷ Hñ H¬3ð H´8¼Eµ?ñ Hr   c                óº   € ^ RI Hp ^ RIHp V! V 4      pVf   R# V! 4       P	                  \
        4      VP	                  \
        4      ,
          P                  4       # )a8  Seconds the stored ``next_run_at`` is already in the past (negative while still
upcoming); None when it is not a parseable ISO timestamp.

Parses through the scheduler's own ``_parse_aware`` so the CLI and the ticker agree on
the instant (mixed UTC offsets, DST folds, legacy naive stamps read as system-local).
©Ú_parse_aware)ÚnowN)rC   rz   Úhermes_timer{   Ú
astimezoner   Útotal_seconds)rw   rz   r{   Údts   &   r   Ú_next_run_overdue_secondsr€   m   sF   € õ 'ÝÙ	�kÓ	"€BØ	‚zÙá‹E×ÑœSÓ! B§M¡M´#Ó$6Õ6×EÑEÓGÐGr   c                ót   € V ^8„  d   QhR\         \        \        3,          R\        \        \        3,          /# ©r   Újobr   )Údictr   r   Útuple)r   s   "r   r   r   }   s.   € ÷ Qñ Q”tœC¤˜H•~ð Q¬%´´S°­/ñ Qr   c                ó  € V P                  RR4      p\        V4      pVe:   V\        8:  g/   V P                  RR4      '       d   V P                  R4      R
9   d   RV3# R\        V R\	        V4       R	2\
        P                  4      3# )zá``("Next run" | "Overdue", value)`` for one job.

A stamp parked past `cron doctor`'s grace on a job that is supposed to fire is the only
user-visible trace of a dead scheduler; never present it as an upcoming run (#114309).
rw   rT   ÚenabledTÚstatezNext runÚOverdueú  (u:    ago â€” the job has not fired; is the scheduler running?)>   ÚpausedÚ	completed)rs   r€   Ú_OVERDUE_GRACE_SECONDSr   rm   r   rM   )rƒ   ÚstampÚ	overdue_ss   &  r   Ú_next_run_rowr�   }   s•   € ð �G‰G�M 3Ó'€EÜ)¨%Ó0€IØÒ˜YÔ*@Ô@Ø—7‘7˜9 d×+Ò+¨s¯w©w°wÓ/?ÐCZÔ/ZØ˜EÐ"Ð"Ø”u ˜w cÔ*:¸9Ó*EÐ)Fð G@ð @ÜAGÇÁóPð Qð Qr   c                óF   € V ^8„  d   QhR\         R\        \        ,          /# )r   Údispatchr   )r„   r
   r   )r   s   "r   r   r   Œ   s   € ÷ :ñ :¤ð :¬´#­ñ :r   c                óÎ  a € \        S \        4      '       g   R# V 3R lR 4       w  rpV'       d   V'       d	   V'       g   R# \        S P                  R^ 4      4      pVR8X  d   \	        RV R2\
        P                  4      # \        V4      ;'       g    Rp\	        RV R	2\
        P                  4      R
V RV R2,           \	        RV R2\
        P                  4      ,           # )z÷One-line scheduled-vs-actual dispatch summary; None when the stamp is malformed.

On-time dispatches render dim; late/catch-up dispatches render loudly so a run fired long
after gateway downtime doesn't look like an ordinary success.

See #99879.
Nc              3   óF   <"  € T F  pSP                  V4      x € K  	  R # 5ir[   rr   )r\   Úkr’   s   & €r   r_   Ú$_dispatch_display.<locals>.<genexpr>–   s   øé € ÐbÑ8a°1˜xŸ|™|¨AŸ˜Ó8aùs   ƒ!Úlateness_secondsÚon_timezon time (scheduled Ú)rq   õ   âš  ú: z
scheduled ú, ran rY   Ú(ú late))Úscheduled_atÚdispatched_atrt   )	Ú
isinstancer„   rm   rs   r   r   rN   ru   rM   )r’   Ú	scheduledÚactualrt   ÚlatenessÚlabels   f     r   Ú_dispatch_displayr¦   Œ   sÉ   ø€ ô �h¤×%Ò%ÙÜbÑ8aÓbÑ€I�tßŸF¯$ÙÜ §¡Ð-?ÀÓ CÓD€HØˆyÔÜÐ*¨9¨+°QÐ7¼¿¹ÓDÐDÜ  Ó&×0Ð0¨&€EÜ�D˜˜˜rÐ"¤F§M¡MÓ2°zÀ)ÀÈFÐSYÐRZÐZ[Ð5\Õ\Ü�a˜�z Ð(¬&¯-©-Ó8õ9ð :r   c                ó(   € V ^8„  d   QhR\         RR/# )r   Útitler   Nr,   )r   s   "r   r   r   ¡   s   € ÷ ñ œð  ñ r   c                óÚ   € \        4        RpRV R2RV P                  ^04      ,           R,           RV R23 F&  p\        \        V\        P                  4      4       K(  	  \        4        R# )	zIBoxed cyan section header shared by ``cron list`` and ``cron incidents``.u   â”Œu   â”�u   â”‚u   â””u   â”˜NuÛ   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€u   â”‚                         )rL   Úljustr   r   ÚCYAN)r¨   ÚruleÚlines   &  r   Ú_print_bannerr®   ¡   s]   € ä	„GØ€DØ�t�f˜C�Ð"2°U·[±[À³_Õ"DÀuÕ"LÐPSÐTXÐSYÐY\ÈoÓ^ˆÜŒe�Dœ&Ÿ+™+Ó&Ö'ñ _ä	†Gr   c                ó$   € V ^8„  d   QhR\         /# r+   r,   )r   s   "r   r   r   ª   s   € ÷ `ñ `¤sñ `r   c                 ó‚   € \        V \        4      '       d    R P                  \        \        V 4      4      # \	        V 4      # )ú, )r¡   r   rg   Úmapr   )Ú
unverifieds   &r   Ú_unverified_targetsr´   ª   s0   € Ü.8¸ÄT×.JÒ.Jˆ4�9‰9”Sœ˜jÓ)Ó*Ð_ÔPSÐT^ÓP_Ð_r   r‹   z[paused]rŒ   z[completed]Fc                ó$   € V ^8„  d   QhR\         /# )r   Úshow_all©r6   )r   s   "r   r   r   ±   s   € ÷ #ñ #œñ #r   c           
     óv  € ^ RI Hp \        RRR7      w  r#Vf   R# V '       g9   V Uu. uF,  pVP                  RR4      '       g   V! V4      R8X  g   K*  VNK.  	  pp^ RIHp V'       g/   \        \        RV! 4        R	2\        P                  4      4       R# \        R
V! 4        R24       V Fø  p\        P                  V! V4      4      ;'       g=    VP                  RR4      '       d   R\        P                  3MR\        P                  3p\        R\        VP                  RR4      \        P                  4       R\        V!   24       \        V4       F  w  rx\        RVR,           R V 24       K  	  \!        V4       F  p	\        RV	 24       K  	  \        4        Kú  	  \#        4        R# u upi )zList all scheduled jobs.)Úeffective_job_stateT)Úinclude_disabledÚbriefNr‡   r‹   rI   zNo scheduled jobs in profile 'zI'.
Create one with 'hermes cron create ...' or the /cron command in chat.zScheduled Jobs (profile: r™   z[active]z
[disabled]ú  ÚidrT   rY   ú    Ú:z<11)rC   r¹   Ú_probe_then_list_jobsrs   rK   rJ   rL   r   r   rN   r®   Ú_STATE_BADGESÚGREENÚREDrM   Ú	_job_rowsÚ_job_warningsrO   )
r¶   r¹   Ú_store_reportÚjobsrƒ   rJ   Úbadger¥   Úvaluer­   s
   &         r   Ú	cron_listrÊ   ±   s•  € å-Ü/ÀÈTÔRÑ€MØ‚|Ùßáó
Ù�CØ�w‰w�y $×'Ò'Ñ+>¸sÓ+CÀxÑ+O÷ ˆC™4ð 	ð 
õ
 <ßÜŒeÐ4Ñ5LÓ5NÐ4Oð P]ð ]Ü^d×^hÑ^hójô 	káäÐ-Ñ.EÓ.GÐ-HÈÐJÔKãˆä×!Ñ!Ñ"5°cÓ":Ó;÷ dð dØ*-¯'©'°)¸T×*BÒ*BˆZœŸ™Ñ&ÈÔW]×WaÑWaÐHbð 	ä�”5˜Ÿ™  sÓ+¬V¯]©]Ó;Ð<¸A¼eÀU¹m¸_ÐMÔNÜ% cžN‰LˆEÜ�D˜ � SÐ)¨%¨Ð1Ö2ñ +ä! #Ö&ˆDÜ�D˜˜�-Ö ñ 'äŽñ ô !Ö"ùò1
s   ¨F6Á
F6ÁF6c                óR   € V ^8„  d   QhR\         \        \        3,          R\        /# r‚   ©r„   r   r   )r   s   "r   r   r   Ó   s"   € ÷ ñ œ4¤¤S �>ð ¬cñ r   c                 ó*  € V R ,          pVR8X  d   \        R\        P                  4      # VR8X  d   \        R\        P                  4      # VR8X  dB   \        R\	        V P                  R4      4       R\        V 4       2\        P                  4      # \        V RV P                  R	R
4       2\        P                  4      p\        V P                  R4      ;'       g    ^ 4      pV^8¼  d&   V\        RV R2\        P                  4      ,          pV# )Úlast_statusÚokÚdelivery_queuedz'finished; delivery is still in progressÚdelivery_failedz'ran, but the result was not delivered (Úlast_delivery_errorú). r›   Ú
last_errorrT   Úfailure_streakrŠ   z failures in a row))	r   r   rÂ   rM   Ú_short_reasonrs   Ú_delivery_fix_hintrÃ   rc   )rƒ   rÎ   ÚdisplayÚstreaks   &   r   Ú_last_run_displayrÚ   Ó   s÷   € Ø�mÕ$€KØ�dÔÜ�Tœ6Ÿ<™<Ó(Ð(ØÐ'Ô'ÜÐ>ÄÇÁÓNÐNØÐ'Ô'äÐ>¼}ÈSÏWÉWÐUjÓMkÓ?lÐ>mÐmpÜ*¨3Ó/Ð0ð2Ü39·=±=óBð 	Bä�{�m 2 c§g¡g¨l¸CÓ&@Ð%AÐBÄFÇJÁJÓO€GÜ�—‘Ð)Ó*×/Ð/¨aÓ0€FØ�„{Ø”5˜3˜v˜hÐ&9Ð:¼F¿J¹JÓGÕGˆØ€Nr   c                óŠ   € V ^8„  d   QhR\         \        \        3,          R\        \        \        \        3,          ,          /# r‚   )r„   r   r   r   r…   )r   s   "r   r   r   ä   s/   € ÷ "?ñ "?”4œœS˜•>ð "?¤d¬5´´c°­?Õ&;ñ "?r   c                óâ  € V P                  R4      ;'       g    / pVP                  R4      pV P                  R4      ;'       g    R.pV P                  R4      ;'       g$    V P                  R4      '       d   V R,          .M. pV P                  R4      ;'       g    V P                  R4      pV P                  R	4      ;'       g    / pV P                  R
4      ;'       g    / pRV'       d   RP                  V4      MR3RV P                  R4      3RV'       d   V R2MR3RV'       d   VP                  R4      MR3RV P                  R4      '       d"   \        R\        P                  4      R,           MR3RV P                  R4      3RV P                  R4      3RV P                  R4      '       d!   V P                  RR4       R \        V 4       2MR3R!\        V P                  R"4      4      3R#V'       d(   VP                  R$R4       R VP                  R%R4       2MR3.
pR&V P                  R'R(4      3R)V P                  R*V P                  R+/ 4      P                  R,R4      4      3R-V'       d   VP                  R.^ 4       R/V 2MR03\        V 4      R1\        V\        4      '       d   TMRP                  V4      3.V U	U
u. uF  w  ršV
'       g   K  Wš3NK  	  up
p	,           # u up
p	i )2z<``(label, value)`` detail rows for one job in ``cron list``.ÚrepeatÚtimesÚdeliverÚlocalr   ÚskillÚmonitor_scriptÚmonitor_urlÚmonitor_stateÚlatest_executionÚSkillsr±   r   ÚScriptÚscriptÚMonitorz# (agent runs only on output change)ÚChangedÚlast_changed_atÚModeÚno_agentzno-agentz# (script stdout delivered directly)ÚWorkdirÚworkdirÚPythonÚinterpreterzLast runrÎ   Úlast_run_atrT   r¼   ÚDispatchÚlast_dispatchÚ	ExecutionÚstatusr½   ÚNamer2   ú	(unnamed)ÚScheduleÚschedule_displayÚschedulerÉ   ÚRepeatrŒ   Ú/u   âˆžÚDeliver)
rs   rg   r   r   rN   rÚ   r¦   r�   r¡   r   )rƒ   Úrepeat_infoÚrepeat_timesrß   r   Úmonitor_sourceÚ	mon_staterå   Úoptionalr¥   rÉ   s   &          r   rÄ   rÄ   ä   s·  € ð —'‘'˜(Ó#×)Ð) r€KØ—?‘? 7Ó+€Lð �g‰g�iÓ ×-Ð- W I€GØ�W‰W�XÓ×NÐN°S·W±W¸W×5EÒ5E C¨¥L¡>È2€FØ—W‘WÐ-Ó.×HÐH°#·'±'¸-Ó2H€NØ—‘˜Ó(×.Ð.¨B€IØ—w‘wÐ1Ó2×8Ð8°bÐà	¯�4—9‘9˜VÔ$°BÐ7Ø	�3—7‘7˜8Ó$Ð%Ø	Ïn�~Ð&Ð&IÑJØð	à	¿�I—M‘MÐ"3Ô4ÈBÐOØ	Ø�G‰G�J×Òô �z¤6§:¡:Ó.Ð1VÖVØ%'ð	)à	�C—G‘G˜IÓ&Ð'Ø	�3—7‘7˜=Ó)Ð*Ø	Ø�G‰G�M×"Ò"ð Ÿ™ ¨sÓ3Ð4°BÔ7HÈÓ7MÐ6NÑOØ(*ð	,à	Ô& s§w¡w¨Ó'?Ó@ÐAØ	ßð *×-Ñ-¨h¸Ó<Ð=¸RÐ@P×@TÑ@TÐUYÐ[^Ó@_Ð?`ÑaØ"$ð	&ð'€Hð  
�—‘˜ Ó-Ð.Ø	�S—W‘WÐ/°·±¸ÀRÓ1H×1LÑ1LÈWÐVYÓ1ZÓ[Ð\Ø	Ï,�k—o‘o k°1Ó5Ð6°a¸°~ÑFÐ\aÐbÜ�cÓØ	œz¨'´3×7Ò7‘G¸T¿Y¹YÀwÓ=OÐPðñ -5Ô>©H™L˜E¼Œˆ%‹©HÒ>õ?ð ?ùó 	?s   Ë	K+ËK+c                ó<   € V ^8„  d   QhR\         R\        R\        /# )r   r   Úlimitr   )r   rc   r   )r   s   "r   r   r   	  s&   € ÷ ^ñ ^œð ^¤Cð ^´#ñ ^r   c                ó"  € \        T ;'       g    R4      P                  4       P                  4       pV'       d'   RP                  V^ ,          P	                  4       4      MRp\        V4      V8”  d   VRV^,
           R,           # T;'       g    R# )zVFirst line of an adapter/error blob, whitespace-collapsed and capped, or 'no details'.r   rY   Nu   â€¦z
no details)r   r   Ú
splitlinesrg   ÚsplitÚlen)r   r  ÚfirstÚreasons   &&  r   rÖ   rÖ   	  so   € ä�—
�
˜‹O×!Ñ!Ó#×.Ñ.Ó0€Eß+0ˆS�X‰X�e˜A•h—n‘nÓ&Ô'°b€FÜ,/°«K¸%Ô,?ˆF�;�U˜Q•YÐ %Õ'Ð]Àf×F\ÐF\ÐP\Ð]r   c                óR   € V ^8„  d   QhR\         \        \        3,          R\        /# r‚   rÌ   )r   s   "r   r   r     s&   € ÷ Oñ OœD¤¤c �Nð O¬sñ Or   c                 ó.   € R V P                  RR4       R2# )zOCheck the target with `hermes cron status` or change it with `hermes cron edit r½   ú<id>z --deliver <target>`.rr   ©rƒ   s   &r   r×   r×     s'   € ð!Ø!$§¡¨¨vÓ!6Ð 7Ð7LðNð Or   c                ó€   € V ^8„  d   QhR\         \        \        3,          R\         \        \        3,          R\        /# )r   rƒ   Úfire_errr   rÌ   )r   s   "r   r   r     s6   € ÷ Iñ IœD¤¤c �Nð I´d¼3Ä¸8µnð IÌñ Ir   c           	      óz   € R VP                  RR4       R\        VR,          4       RV P                  RR4       R2# )	zmissed scheduled fire at ÚatrT   r›   Údetailz]. The messaging gateway was unreachable. Run `hermes gateway restart`, then `hermes cron run r½   r  z` to run it now.)rs   rÖ   )rƒ   r  s   &&r   Ú_missed_fire_issuer    sN   € Ø'¨¯©°T¸3Ó(?Ð'@ÀÄ=ÐQYÐZbÕQcÓCdÐBeð f à #§¡¨¨fÓ 5Ð6Ð6FðHð Ir   c                óh   € V ^8„  d   QhR\         \        \        3,          R\        \        ,          /# r‚   ©r„   r   r   r   )r   s   "r   r   r     s&   € ÷ ñ ”tœC¤˜H•~ð ¬$¬s­)ñ r   c                óh  € . pV P                  R4      ;p'       d   VP                  RV 24       V P                  R4      '       dK   VP                  \        R\        P                  4       R\        V R,          4       R\        V 4       24       V P                  R4      ;p'       d9   VP                  \        R\        P                  4       R	\        V4       R
24       V P                  R4      p\        V\        4      '       dM   VP                  R4      '       d6   VP                  \        R\        W4       2\        P                  4      4       V P                  R4      p\        V\        4      '       d·   VP                  R4      '       d    \        V P                  R4      ;'       g    R4      R9   pTP                  \        RVP                  RR4       R\        VR,          4       2V'       d   RMR,           V'       d   \        P                  M\        P                  4      4       V# )z;Delivery / fire warning lines for one job in ``cron list``.Úlast_delivery_queuedzNDelivery still in progress (the result was handed off but not confirmed yet): rÒ   u!   âš  The result was not delivered:rY   z. Úlast_delivery_unverifiedu   âš  Delivery UNVERIFIED:z adapter acked z  without message_id/raw_responseÚlast_fire_errorr  rš   Úlast_failurerÎ   r   u   âš  Last failure at r  rT   r›   u    â€” recovered since>   rÏ   rÐ   )rs   r   r   r   rM   rÖ   r×   r´   r¡   r„   r  rÃ   r   )rƒ   ÚlinesÚqueuedr³   r  r  Ú	recovereds   &      r   rÅ   rÅ     sÔ  € à€EØ—‘Ð/Ó0Ð0€vÖ0Ø�‰ÐeÐflÐemÐnÔoØ
‡w�wÐ$×%Ò%Ø�‰œÐAÄ6Ç=Á=ÓQÐRÐRSÜ% cÐ*?Õ&@ÓAÐBÀ"ÔEWÐX[ÓE\ÐD]ð_ô 	`ð —W‘WÐ7Ó8Ð8€zÖ8Ø�‰œÐ8¼&¿-¹-ÓHÐIÈÜ+¨JÓ7Ð8Ð8XðZô 	[à�w‰wÐ(Ó)€HÜ�(œD×!Ò! h§l¡l°8×&<Ò&<Ø�‰”U˜TÔ"4°SÓ"CÐ!DÐEÄvÇzÁzÓRÔSð
 —7‘7˜>Ó*€LÜ�,¤×%Ò%¨,×*:Ñ*:¸8×*DÒ*DÜ˜Ÿ™ Ó.×4Ð4°"Ó5Ð9RÑRˆ	Ø�‰”UØ" <×#3Ñ#3°D¸#Ó#>Ð"?¸rÜ˜\¨(Õ3Ó4Ð5ð7ßT]Ñ:PÐceõgç&ŒF�MŠM¬F¯J©Jó8ô 	9ð €Lr   c                 ó^  € ^ RI Hp Hp ^ RIHp V! R4        V! RRR7       ^ #   T  d=   p\        \        RT 2\        P                  4      4       \        R4        Rp?^# Rp?i\         d=   p\        \        R	T 2\        P                  4      4       \        R
4        Rp?^# Rp?ii ; i)zþRun due jobs once and exit (external-scheduler mode: a system crontab calls this).

No gateway runs here by definition, and none is started: agent jobs are skipped with a logged
reason until the gateway is up (headless surfaces refuse rather than spawn).)ÚCronTickYieldedÚtick)Úbegin_processÚcronT)ÚverboseÚheadlessu   âœ— zn  A fresher gateway process owns the runtime lock and will fire due jobs; this stale process yielded its tick.Nu   âœ— Cron tick failed: z=  Check `hermes cron status` and the gateway log for details.)Úcron.schedulerr!  r"  Ú/hermes_cli.observability.shared_metrics_processr#  rL   r   r   rM   ÚOSErrorrÃ   )r!  r"  r#  Úexcs       r   Ú	cron_tickr+  9  s“   € ÷
 5ÝMá�&ÔðÙ�T DÕ)ñ øð ô äŒe�d˜3˜%�L¤&§-¡-Ó0Ô1Üð 0ô 	1åûÜô ô 	ŒeÐ,¨S¨EÐ2´F·J±JÓ?Ô@ÜÐMÔNÝûðús&   ˜
$ ¤B,«1A"Á"B,Á/B,Á01B'Â'B,c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   Újob_idr  )r
   r   rc   )r   s   "r   r   r   T  s   € ÷ ,ñ ,”hœs•mð ,´3ñ ,r   c                ó�  € ^ RI Hp V! WR7      pV'       g   \        R4       R# V F›  p\        VP                  RR4       RVP                  RR4      R	 R
VP                  RR4       RVP                  RR4       RVP                  RR4       2	4       VP                  R4      '       g   K†  \        RVR,           24       K�  	  R# )z,Show indexed durable cron execution history.)Úlist_executions)r-  r  z$No cron execution attempts recorded.Nr½   rT   r¼   rö   z<9z  job=r-  z	  source=ÚsourceÚ
claimed_atÚerrorr¾   )Úcron.executionsr/  rL   rs   )r-  r  r/  ÚrecordsÚrecords   &&   r   Ú	cron_runsr6  T  s»   € å/Ù VÔ9€GßÜÐ4Ô5ÙÛˆÜ�—‘˜D #Ó&Ð' r¨&¯*©*°X¸sÓ*CÀBÐ)Gð HØ—Z‘Z ¨#Ó.Ð/¨y¸¿¹ÀHÈcÓ9RÐ8SÐSUØ—‘˜L¨#Ó.Ð/ð1ô 	2ð �:‰:�g×ÔÜ�D˜ �Ð)Ð*Ö+ó r   ÚdetectedÚalertedÚresolvedÚclosedc                ó$   € V ^8„  d   QhR\         /# r+   ©rc   )r   s   "r   r   r   g  s   € ÷ +ñ +œCñ +r   c           
     óÄ  € ^ RI HpHp \        V RR4      pVR8X  d›   \        V RR4      pV'       g&   \	        \        R\        P                  4      4       ^# V! V4      '       d*   \	        \        RV R	2\        P                  4      4       ^ # \	        \        R
V R2\        P                  4      4       ^ # \        V RR4      pV! VR7      pV'       gU   \	        \        R\        P                  4      4       V'       d(   \	        \        RV R2\        P                  4      4       ^ # \        R4       V EFu  p\        VR,          \        P                  VR,          \        P                  4      4      p\        P                  ! RRVP                  R4      ;'       g    R4      P!                  4       p	\#        V	4      ^ 8”  d   V	R,          P%                  4       R,           p	RVR,          3RVP                  RR4      3RVP                  RR4      3R VP                  R!R4      3R"V	3R#VP                  R$4      3.p
\	        R%\        VR&,          \        P                  4       R%V 24       V
 F.  w  r¼VR#8w  g   V'       g   K  \	        R'VR(,           R) V 24       K0  	  \	        4        EKx  	  \	        \        R%\#        V4       R*2\        P                  4      4       ^ # )+z¨List (``[--state <s>]``) or ``ack <id>`` durable cron failure incidents.

Acking closes an incident so its failure ping stays silent until the error signature changes.
)Úack_incidentÚlist_incidentsÚincident_actionr   ÚackÚincident_idNuA   âœ— Incident ID required: hermes cron incidents ack <incident_id>u   âœ“ Incident z acknowledged (closed).z	Incident z not found or already closed.rˆ   )rˆ   z#No cron failure incidents recorded.z  (filtered by state 'z')zCron Failure Incidentsz\s+rY   r2  r   :Né�   Nz...ÚJobr-  ÚTypeÚfailure_typeÚunknownz
First seenÚfirst_seen_atrT   z	Last seenÚlast_seen_atÚErrorÚOutputÚoutput_filer¼   r½   r¾   r¿   z<12z= incident(s)  |  ack one with: hermes cron incidents ack <id>)Úcron.incidentsr>  r?  ÚgetattrrL   r   r   rÃ   rÂ   rM   rN   r®   Ú_INCIDENT_STATE_COLORSrs   ÚreÚsubr   r	  Úrstrip)Úargsr>  r?  ÚactionrB  rˆ   Ú	incidentsÚincÚstate_displayÚ
error_textÚrowsr¥   rÉ   s   &            r   Úcron_incidentsrZ  g  sg  € ÷
 <Ü�TÐ,¨fÓ5€FØ�„Ü˜d M°4Ó8ˆßÜ”%Ð[Ô]c×]gÑ]gÓhÔiÙÙ˜×$Ò$Ü”%˜-¨ }Ð4KÐLÌfÏlÉlÓ[Ô\ñ ô ”%˜) K =Ð0MÐNÔPV×P]ÑP]Ó^Ô_Ùä�D˜' 4Ó(€EÙ UÔ+€IßÜŒeÐ9¼6¿:¹:ÓFÔGßÜ”%Ð0°°°rÐ:¼F¿J¹JÓGÔHÙäÐ*Ô+ÜˆÜ˜c '�lÔ,B×,FÑ,FÀsÈ7Å|ÔU[×U_ÑU_Ó,`ÓaˆÜ—V’V˜F C¨¯©°Ó)9×)?Ð)?¸RÓ@×FÑFÓHˆ
Üˆz‹?˜SÔ Ø# DÕ)×0Ñ0Ó2°UÕ:ˆJØ˜˜H�Ð&¨°·±¸ÈÓ1SÐ(TØ˜sŸw™w ¸Ó<Ð=Ø˜cŸg™g n°cÓ:Ð;¸gÀzÐ=RØ˜3Ÿ7™7 =Ó1Ð2ð4ˆô 	�”5˜˜T�¤F§M¡MÓ2Ð3°2°m°_ÐEÔFÛ ‰LˆEØ˜Ô §E¡EÜ˜˜U S�[¨Ð-¨e¨WÐ5Ö6ñ !ô 	�ñ ô 
Œ%�"”S˜“^Ð$Ð$aÐbÜ—
‘
óô ár   zÁ  Hint: jobs.json may be owned by another user (e.g. rewritten by a root `docker exec hermes hermes cron ...`). Fix ownership to match the gateway user, and prefer `docker exec -u <uid>:<gid>`.zÄ  Hint: the ticker hit file-descriptor exhaustion (EMFILE). The scheduler now retries with backoff and attempts fd reclamation, but if the leak persists, restart the gateway to recover scheduling.c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   Úager   )r
   rR   r6   )r   s   "r   r   r   �  s"   € ÷ Gñ Gœh¤u�oð G´$ñ Gr   c                 óJ   € ^ RI Hp V RJ;'       d    W^,          ^,           8*  # )r!   )ÚTICKER_INTERVAL_SECONDSN)rC   r^  )r\  r^  s   & r   rD   rD   �  s$   € Ý1Ø�dˆ?×FÐF˜sÀÕ&AÀBÕ&FÑFÐFr   c                ó:   € V ^8„  d   QhR\         \        ,          /# r+   )r
   r„   )r   s   "r   r   r   ¢  s   € ÷ 8ñ 8¤(¬4¥.ñ 8r   c                 óH   € ^ RI Hp  ^ RIHp V! V ! 4       P                  4      # )z²Probe the active cron store (never a marker inside it): ``None`` when it accepts writes.
Runs before any job read: loading jobs re-secures the dir, which can mask a mode problem.)Ú_current_cron_store)Úprobe_report)rC   ra  Úcron.store_healthrb  Úcron_dir)ra  rb  s     r   Ú_store_unwritable_reportre  ¢  s   € õ .Ý.ÙÑ+Ó-×6Ñ6Ó7Ð7r   r»   c                ó0   € V ^8„  d   QhR\         R\         /# )r   rº   r»   r·   )r   s   "r   r   r   ª  s   € ÷ ñ ¬tð ¼Dñ r   c                óŒ   € ^ RI Hp \        4       ;pe   \        W1R7        W2! V R7      3#   \         d    Tf   h TR3u # i ; i)aI  ``(store report or None, jobs or None)``. Probes and prints the unwritable-store warning
BEFORE reading jobs: loading re-secures the dir mode (masking a mode problem), and on an
unwritable store the read itself can fail (it creates cron/output). Jobs is ``None`` only
when that read failed on a store already reported unwritable.©Ú	list_jobsN)r»   ©rº   )rC   ri  re  Ú_print_store_unwritabler)  )rº   r»   ri  Úreports   $$  r   rÀ   rÀ   ª  sT   € õ
 $Ü*Ó,Ð,ˆÒ9Ü Õ4ðØ�yÐ2BÔCÐCÐCøÜô ØŠ>ØØ�tˆ|Òðús   ¢	, ¬AÁAc                ó4   € V ^8„  d   QhR\         R\        RR/# )r   rl  r»   r   N)r„   r6   )r   s   "r   r   r   º  s&   € ÷ kñ k¤Dð k´Dð kÀTñ kr   c                óÄ  € V'       dE   \        \        R V R,           RV R,           RV R,           R2\        P                  4      4       R# \        \        R\        P                  4      4       \        \        R	V R,           R
V R,           RV R,           R2\        P                  4      4       \        \        RV R,           R2\        P                  4      4       R# )u   âš  Cron store Ústorez is NOT writable (r2  u(   ) â€” scheduled jobs are being skipped; Úfixz. See `hermes cron status`.NuC   âš  Cron store is NOT writable â€” scheduled jobs are being skippedr¼   r›   z (last successful write Úsincer™   z  Fix: z0. Each due job then fires once on the next tick.)rL   r   r   rÃ   rM   )rl  r»   s   &$r   rk  rk  º  sÌ   € ßÜŒe�o f¨W¥oÐ%6Ð6HÈÐPWÍÐHYð Z*Ø*0°­-¨Ð8SðUÜV\×V`ÑV`óbô 	cáÜ	Œ%ÐUÔW]×WaÑWaÓ
bÔcÜ	Œ%�"�V˜G•_Ð% R¨¨w­Ð'8Ð8PÐQWÐX_ÕQ`ÐPaÐabÐcÔek×eoÑeoÓ
pÔqÜ	Œ%�'˜& �-˜Ð(XÐYÔ[a×[hÑ[hÓ
iÖjr   c                ó4   € V ^8„  d   QhR\         R\        RR/# )r   ÚpidsÚrestart_commandr   N)r   r   )r   s   "r   r   r   Ä  s"   € ÷ <=ñ <=œtð <=´cð <=ÐY]ñ <=r   c           	     ó°  a€ ^ RI HpHpHp ^ RIHp ^ RIHp V! 4       pV! 4       pV! 4       p	V '       d#   RRP                  \        \        V 4      4       2MRoR V3R llp
Vf   V
! R	4       \        R
V 24       R# \        V4      '       g&   V
! R\        V4       R24       \        RV 24       R# V! V	4      ;peQ   V
! R4       \        \        RV^ ,           RV^,           R2\        P                  4      4       \        RV 24       R# Ve   \        V4      '       d   VfÚ   V	'       dÒ   T
! RVe#   R\        \        V4      4      ,           R,           MR R24       V	'       d‹   \        \        RV	 2\        P                  4      4       RV	9   d)   \        \        \         \        P"                  4      4       M5V! V	4      '       d(   \        \        \$        \        P"                  4      4       \        R4       R# \        \        R\        P&                  4      4       S'       d   \        S4       Ve   \        R\        V4       R24       R# R# )zöReport builtin-ticker liveness for a gateway process known to be alive.

The ticker THREAD can die silently or stay alive while every tick fails, so check both
the liveness heartbeat and the last-successful-tick marker before saying "will fire".
)r=   Úget_ticker_last_errorÚget_ticker_success_age)Ú_is_fd_exhaustion_text)Ústale_code_yield_labelsz  PID: r±   Nc                ó(   € V ^8„  d   QhR\         RR/# )r   Úheadliner   Nr,   )r   s   "r   r   Ú*_print_ticker_health.<locals>.__annotate__Ô  s   € ÷ ñ œð  ñ r   c                 óx   <€ \        \        V \        P                  4      4       S'       d   \        S4       R # R # r[   )rL   r   r   rM   )r{  Úpid_lines   &€r   Ú_warnÚ#_print_ticker_health.<locals>._warnÔ  s%   ø€ ÜŒe�HœfŸm™mÓ,Ô-ßÜ�(ŽOñ r   uH   âš  Gateway is running but the cron ticker has not reported a heartbeat.z¸  Cron jobs will NOT fire until the ticker writes its first heartbeat.
  If the gateway just started, wait ~60s and re-run `hermes cron status`.
  If heartbeat never appears, restart: uN   âš  Gateway is running but the cron ticker looks STALLED â€” no heartbeat for zs (expected every ~60s).z(  Cron jobs may NOT be firing. Restart: uZ   âš  Gateway is running STALE code â€” its cron ticker yields every tick and fires NOTHING.z  Booted on z, checkout is now at z2 (the code was updated under the running gateway).z   Restart it onto the new code: uC   âš  Gateway and cron ticker are running, but no tick has succeeded zin rU   Úyetu    â€” ticks may be failing.z  Last tick error: zPermission deniedz.  Check the gateway log for 'Cron tick error'.u<   âœ“ Gateway is running â€” cron jobs will fire automaticallyz  Ticker heartbeat: zs ago)rC   r=   rv  rw  r'  rx  ry  rg   r²   r   rL   rD   rc   r   r   rÃ   Ú_PERMISSION_HINTrM   Ú_FD_EXHAUSTION_HINTrÂ   )rs  rt  r=   rv  rw  Ú_cron_is_fd_exhaustion_textry  Úhb_ageÚok_agerÔ   r  Úskewr~  s   &&          @r   Ú_print_ticker_healthrˆ  Ä  s"  ø€ ÷Qñ QåTÝ6Ù%Ó'€FÙ#Ó%€FÙ&Ó(€Jß8<�˜Ÿ™¤3¤s¨D£>Ó2Ð3Ñ4À$€H÷ð ð
 ‚~áÐXÔYÜð 8à8GÐ7HðJö 	Kô " &×)Ò)Ùð "Ü"% f£+ Ð.FðHô 	IäÐ8¸Ð8IÐJÖKÙ)¨*Ó5Ð
5ˆ$Ò	Bñ 	ð ô 	 äŒe�l 4¨¥7 )Ð+@ÀÀaÅÀ	ð JHð HÜIOÏÉóUô 	VäÐ0°Ð0AÐBÖCØ
Ò
Ô%9¸&×%AÒ%AÀvÂ~×Zdáð Ø=CÒ=O˜5¤3¤s¨6£{Ó#3Õ3°cÖ9ÐUZÐ[ð \*ð*ô 	+÷ ô
 ”%Ð-¨j¨\Ð:¼F¿J¹JÓGÔHØ" jÔ0Ü”eÔ,¬f¯m©mÓ<Õ=Ù,¨Z×8Ò8Ü”eÔ/´·±Ó?Ô@ÜÐ>Ö?äŒeÐRÔTZ×T`ÑT`ÓaÔbßÜ�(ŒOØÒÜÐ(¬¨V«¨°UÐ;Ö<ñ r   c            
     óÒ  € ^ RI Hp Hp ^ RIHp \        4        \        RR7      w  r4Vf%   \        \        R\        P                  4      4       M=Ve:   \        R V 4       4      p\        \        RV R	2\        P                  4      4       Ve   \        4        \        4       pVR
8w  dM   \        \        RV R2\        P                  4      4       \        \        R\        P                  4      4       EMî^ RIHp V! 4       pRp	\         P"                  ! \$        4      ;_uu_ 4        V! V4      p	RRR4       V	e   . MV ! 4       p
RpRpRpV	fÒ   V
'       gÊ   \         P"                  ! \$        4      ;_uu_ 4        ^ RIHpHp V! 4       pV'       d   V! 4       MRpV'       d   V.MT
p
RRR4       V'       g   V! 4       pV'       g[   V'       gS   \         P"                  ! \$        4      ;_uu_ 4        ^ RIHpHp \3        V! 4       4      ;'       d    V! 4       pRRR4       V	eˆ   \        RV	P5                  4        24       Rp\         P"                  ! \$        4      ;_uu_ 4        ^ RI Hp V! V4      pRRR4       Ve   VP8                  MRp\;        V	P<                  .RV R2R7       EM9V
'       g   V'       g   V'       g	   V'       dS   V'       d   \        R4       \;        . RR7       MøV'       d   \        RV R24       \;        . RR7       MÓ\;        V
4       MÇ\        \        RV R2\        P                  4      4       \         P"                  ! \$        4      ;_uu_ 4        ^ RIHpHp V! 4       pVeF   VV^,          ^,           8”  d1   \        \        R\A        V4       R 2\        PB                  4      4       RRR4       \        R!4       VR#9  d   \        R"4       \        4        \E        V4       \        4        R#   + '       g   i     ELÞ; i  + '       g   i     EL{; i  + '       g   i     EL; i  + '       g   i     EL×; i  + '       g   i     Lž; i)$zShow cron execution status.r9   rI   Frj  Nz3  Jobs could not be read from the unwritable store.c              3   ó|   "  € T F2  p\        VP                  R 4      4      ;'       g    ^ ^ 8”  g   K.  ^x € K4  	  R# 5i)rw   N)r€   rs   )r\   Újs   & r   r_   Úcron_status.<locals>.<genexpr>  s3   é € Ðk¡˜AÔ1JÈ1Ï5É5ÐQ^ÓK_Ó1`×1eÐ1eÐdeÐijÑ0j—a’a£ùs   ‚%<¨<²
<r¼   z due run(s) not firedr0   u   âœ“ Cron provider: uD    â€” jobs fire via the managed scheduler, not the in-process ticker.zq  (No ticker heartbeat is expected for an external provider; due jobs are delivered by an authenticated webhook.))Úhost_gateway_serving)Úget_running_pidr8   r<   z  Scheduler host: )Úhost_multiplexer_servingÚdefaultzhermes --profile z gateway restart)rt  z>  Scheduler host: the host gateway (multiplexing this profile)z(hermes --profile default gateway restartzY  Scheduler host: an in-process ticker (hermes serve / Desktop backend) ticking profile 'Ú'z5restart the Hermes Desktop app (or its serve backend)u%   âœ— No scheduler is serving profile 'u!   ' â€” its cron jobs will NOT fire)r^  r=   z  Scheduler last ticked u6    ago â€” jobs that came due since then have not fired.a3  
  Start the ONE host gateway (it multiplexes every profile, this one included):
    hermes --profile default gateway install   # user service
    sudo hermes --profile default gateway install --system  # Linux servers: boot-time service
    hermes --profile default gateway run       # Or run in foregroundak  
  It serves this profile automatically. If a per-profile service or gateway
  from an older release is still installed, fold it in (preflight + dry run):
      hermes --profile default gateway migrate --multiplex --dry-run
      hermes --profile default gateway migrate --multiplex
  Check: hermes cron status from this profile should show its ticker heartbeat.
)r�  Úcustom)#rB   r:   r;   rK   rJ   rL   rÀ   r   r   rÃ   Úsumr4   rÂ   rN   Úgateway.host_topologyr�  r?   r@   r3   rA   rŽ  r8   rC   r=   r>   rD   Údescriber�  Úprofile_labelrˆ  Úpidr^  rm   rM   Ú_print_active_jobs_summary)r:   r;   rJ   Ústore_reportÚactive_jobsÚoverdueÚproviderr�  ÚactiveÚhostrs  Úgateway_alive_via_lockÚserved_by_multiplexerÚin_process_tickerrŽ  r8   Úlock_pidr=   r>   Úownerr�  Úhost_profiler^  r…  s                           r   Úcron_statusr¥    sˆ  € çaÝ;Ü	„Gä 5ÀuÔ MÑ€LØÒÜŒeÐIÌ6Ï:É:ÓVÕWØ	Ò	!ÜÑk¡ÓkÓkˆÜŒe�b˜˜	Ð!6Ð7¼¿¹ÓDÔEØÒÜŒÜ)Ó+€HØ�9Ôô 	ŒeÐ)¨(¨ð 41ð 1Ü28·,±,ó@ô 	AäŒeð KÜLRÏJÉJóXö 	Yõ 	?Ù(Ó*ˆð ˆÜ× Ò ¤×+Õ+Ù'¨Ó/ˆD÷ ,àÒ%‰rÑ+<Ó+>ˆØ!&ÐØ %ÐØ!ÐØŠ<§ô ×$Ò$¤Y×/Õ/÷ [Ù)GÓ)IÐ&ß0F™?Ô,ÈD�ß%-˜‘z°4�÷ 0÷ *Ù(SÓ(UÐ%ß)×2Gô  ×(Ò(¬×3Õ3ßaÜ)=Ñ>VÓ>XÓ)Y÷ *Mð *MÙ-JÓ-Lð &÷ 4ð ÒÜÐ& t§}¡}£Ð&7Ð8Ô9ð ˆEÜ×$Ò$¤Y×/Õ/ÝGÙ0°Ó8�÷ 0ð 38Ò2C˜5×.Ò.ÈˆLÜ  $§(¡( Ð?PÐQ]ÐP^Ð^nÐ=o×pß×+×/D×HYß$ÜÐVÔWÜ$ RÐ9cÖdß"ÜÐqÐrxÐqyÐyzÐ{Ô|Ü$ RÐ9pÖqä$ TÕ*ô ”%Ð?À¸xÐGhÐiÔkq×kuÑkuÓvÔwô ×$Ò$¤Y×/Õ/ßWÙ1Ó3�ØÒ%¨&Ð3JÈQÕ3NÐQSÕ3SÔ*SÜœ%Ð :Ü#3°FÓ#;Ð"<ð ==ð!=ä>D¿m¹móMô N÷	 0ô ð Zô [ð Ð2Ô2Üð jô kô 
„GÜ˜{Ô+Ü	†G÷S ,×+Ð+ú÷ 0×/Ð/ú÷ 4×3Ð3ú÷ 0×/Ð/ú÷( 0×/úsC   Ä(	PÅ:(PÆ#PÇ1(P.É%QÍ'AQÐP	ÐP+	Ð.P?	ÑQ	ÑQ&	c                ó   € V ^8„  d   QhRR/# rG   r#   )r   s   "r   r   r   l  s   € ÷ &?ñ &?¨ñ &?r   c                óÄ  € V '       g   \        R4       R# ^ RIHp V  Uu. uF>  pV! VP                  R4      4      ;pf   K   VP	                  \
        4      VR,          3NK@  	  pp\        R\        V 4       R24       V'       dr   \        VR R7      ^,          p\        V4      pVe@   V\        8”  d5   \        \        R	V R
\        V4       R2\        P                  4      4       M\        RV 24       V  Uu. uFK  p\        VP                  R4      \        4      '       g   K*  VR,          P                  R4      R9   g   KI  VNKM  	  ppV'       Ed    \        4        \        \        R\        V4       R2\        P                  4      4       V F½  pVR,          p\        VP                  R^ 4      4      p	\        RVP                  RR4       RVP                  RR4       R\!        VP                  R4      4       RVP                  RR4       RVP                  RR4       R2\        RV	 R2\        P                  4      ,           4       K¿  	  R# R# u upi u upi ) zJPrint the '<N> active job(s)' + next-run line shared by every status path.z  No active jobsNry   rw   r¼   z active job(s)c                 ó   € V ^ ,          # ©r!   r#   )Úruns   &r   Ú<lambda>Ú,_print_active_jobs_summary.<locals>.<lambda>{  s   € °#°a¶&r   )Úkeyu     âš  Next run u    is OVERDUE â€” passed z: ago but the job has not fired (is the scheduler running?)ú  Next run: rô   rt   u     âš  z job(s) last fired late:r—   r¾   r½   rT   r2   rø   r›   z, scheduled rŸ   rœ   r    rY   r�   rž   )rq   rp   )rL   rC   rz   rs   r}   r   r	  Úminr€   r�   r   rm   r   rM   r¡   r„   ru   )
rÇ   rz   r‹  ÚparsedÚ	next_runsÚearliestÚ
overdue_byrq   rV   Úlate_bys
   &         r   r˜  r˜  l  s4  € çÜÐ Ô!ÙÝ&ñ FJó PÁTÀÙ+¨A¯E©E°-Ó,@ÓAÐA�Vô <�&×#Ñ#¤CÓ(¨!¨MÕ*:Ó;ÁT€Ið Pä	ˆBŒs�4‹yˆk˜Ð
(Ô)ßÜ�yÑ&8Ô9¸!Õ<ˆÜ.¨xÓ8ˆ
ØÒ! jÔ3IÔ&Iô
 ”%˜/¨(¨Ð3JÜ+¨JÓ7Ð8ð 96ð6ä7=·}±}óFõ Gô �L  
Ð+Ô,áó H‘t�!œz¨!¯%©%°Ó*@Ä$×GŒAØ�/Õ"×&Ñ& vÓ.Ð2FÑF÷ ˆA‘t€Dð Hç€tÜŒÜŒe�fœS ›Y˜KÐ'?Ð@Ä&Ç-Á-ÓPÔQÛˆAØ�/Õ"ˆAÜ& q§u¡uÐ-?ÀÓ'CÓDˆGÜ�D˜Ÿ™˜t SÓ)Ð*¨"¨Q¯U©U°6¸;Ó-GÐ,HÈÔK_Ð`a×`eÑ`eÐflÓ`mÓKnÐJoð pØ Ÿu™u ^°SÓ9Ð:¸&ÀÇÁÀÐX[ÓA\Ð@]Ð]^ð`ä˜A˜g˜Y fÐ-¬v¯}©}Ó=õ>ö ?ó ñ ùò'Pùò"Hs    IÁ"IÃ;'IÄ'IÅIc                ó$   € V ^8„  d   QhR\         /# r+   r   )r   s   "r   r   r   •  s   € ÷ 'ñ 'œtñ 'r   c                 ó4   € ^ RI Hp  V P                  R,          # )uY   Scripts dir for cron jobs â€” via ``CRON_DIR`` so monkeypatched cron storage is honoured.©ÚCRON_DIRÚscripts)rC   r¸  Úparentr·  s    r   Ú_scripts_dir_for_cronr»  •  s   € å"Ø�?‰?˜YÕ&Ð&r   c                óF   € V ^8„  d   QhR\         R\        \         ,          /# )r   rè   r   ©r   r
   )r   s   "r   r   r   ›  s   € ÷ ñ ¤ð ¬´#­ñ r   c                ó¤  € \        4       P                  4       p\        V 4      P                  4       pVP	                  4       '       d   VP                  4       MW,          P                  4       p VP                  V4       TP                  4       '       g   RT 2# TP                  4       '       g   RT 2# R#   \         d    RT RT : 2u # i ; i)z=Human-readable script issue, or ``None`` when the path is OK.zscript resolves outside r›   zscript not found: zscript path is not a file: N)	r»  Úresolver   Ú
expanduserÚis_absoluteÚrelative_tore   ÚexistsÚis_file)rè   Úscripts_dirÚrawÚpaths   &   r   Ú_script_health_issuerÈ  ›  s¹   € ä'Ó)×1Ñ1Ó3€KÜ
ˆv‹,×
!Ñ
!Ó
#€CØŸO™O×-Ò-ˆ3�;‰;Œ=°KÕ4E×3NÑ3NÓ3P€DðDØ×Ñ˜Ô%ð �;‰;�=Š=Ø# D 6Ð*Ð*Ø�<‰<�>Š>Ø,¨T¨FÐ3Ð3Ùøô ô DØ)¨+¨°b¸¹
ÐCÒCðDús   Á/B8 Â8CÃCc                óF   € V ^8„  d   QhR\         R\        \         ,          /# )r   Únext_runr   r½  )r   s   "r   r   r   ²  s"   € ÷ `ñ `¤cð `¬h´s­mñ `r   c                ó”   € \        V 4      pVf   RV : 2# V\        8:  d   R# VR8¼  d   VR,          R R2MV^<,          R R2pRV R	2# )
z8Issue string when ``next_run_at`` is parked in the past.Nz&next_run_at is not a valid timestamp: i  z.1frW   z.0frX   znext_run_at is u:    overdue â€” job is not firing (is the scheduler running?))r€   r�   )rÊ  r�   Úamounts   &  r   Ú_next_run_overdue_issuerÍ  ²  si   € ä)¨(Ó3€IØÒØ7¸±|ÐDÐDØÔ*Ô*ÙØ+4¸Ô+<�	˜DÕ  Ð% QÑ'ÀYÐQSÅ^ÐTWÐDXÐXYÐBZ€FØ˜V˜HÐ$^Ð_Ð_r   c                óh   € V ^8„  d   QhR\         \        \        3,          R\        \        ,          /# r‚   r  )r   s   "r   r   r   ½  s&   € ÷ "ñ "¤T¬#¬s¨(¥^ð "¼¼S½	ñ "r   c                 ób  € . p\        V P                  R 4      ;'       g    R4      P                  4       P                  4       pV'       dL   VR9  dE   TP	                  R\        V P                  R4      ;'       g    R4      P                  4        24       \        V P                  R4      ;'       g    R4      P                  4       ;p'       d*   VP	                  R\        V4       R\        V 4       24       V P                  R4      ;p'       d"   VP	                  R	\        V4      ,           4       \        V P                  R
4      ;p\        4      '       dg   \        VP                  R4      4      ;p'       dE   VP	                  RV RVP                  RR4       R\        VP                  R^ 4      4       R24       \        V P                  R4      ;p\        4      '       d2   VP                  R4      '       d   VP	                  \        W4      4       V P                  RR4      '       dw   V P                  R4      R 9  da   \        V P                  R4      ;'       g    R4      P                  4       pV'       d   \        V4      MRp	V	'       d   VP	                  V	4       \        V P                  R4      ;'       g    R4      P                  4       p
V P                  R4      '       d   V
'       g   VP	                  R4       V
'       d%   \        V
4      ;p'       d   VP	                  V4       \        V P                  R4      ;'       g    R4      P                  4       pV'       dB   \        V4      P!                  4       P#                  4       '       g   VP	                  RV 24       V# )!rÎ   r   zlast run failed: rÔ   úunknown errorrÒ   z4last run finished but the result was not delivered (rÓ   r  z;last delivery unverified (adapter acked without evidence): rô   rt   zlast fire was z (scheduled rŸ   rT   r±   r—   z5 late). This warning clears at the next on-time fire.r  r  r‡   Trˆ   rw   zactive job has no next_run_atrè   rí   zno-agent job has no scriptrï   zworkdir not found: >   rÏ   rÑ   rÐ   >   r‹   rŒ   )r   rs   r   Úlowerr   rÖ   r×   r´   r¡   r„   ru   rm   r  rÍ  rÈ  r   rÀ  rÃ  )rƒ   ÚissuesrÎ   Údelivery_errr³   r’   r¥   r  rÊ  Úissuerè   Úscript_issuerï   s   &            r   Ú_cron_doctor_issues_for_jobrÖ  ½  sß  € Ø€FÜ�c—g‘g˜mÓ,×2Ð2°Ó3×9Ñ9Ó;×AÑAÓC€Kç�{Ð*VÔVØ�‰Ð)¬#¨c¯g©g°lÓ.C×.VÐ.VÀÓ*W×*]Ñ*]Ó*_Ð)`ÐaÔbÜ˜3Ÿ7™7Ð#8Ó9×?Ð?¸RÓ@×FÑFÓHÐH€|ÖHØ�‰ÐLÌ]Ð[gÓMhÐLiÐilÜ+¨CÓ0Ð1ð3ô 	4à—W‘WÐ7Ó8Ð8€zÖ8Ø�‰ÐSÜ+¨JÓ7õ8ô 	9ô ˜cŸg™g oÓ6Ð6�(¼×=Ò=Ü(¨¯©°fÓ)=Ó>Ð>ˆ5Ö>Ø�M‰M˜N¨5¨'°¸h¿l¹lÈ>Ð[^Ó>_Ð=`Ð`bÜ-¨h¯l©lÐ;MÈqÓ.QÓRÐSð TJðJô Kô ˜cŸg™gÐ&7Ó8Ð8�(¼$×?Ò?ÀHÇLÁLÐQY×DZÒDZà�‰Ô(¨Ó7Ô8Ø
‡w�wˆy˜$×Ò C§G¡G¨GÓ$4Ð<SÔ$SÜ�s—w‘w˜}Ó-×3Ð3°Ó4×:Ñ:Ó<ˆß5=Ô'¨Ô1ÐCbˆßØ�M‰M˜%Ô Ü�—‘˜Ó"×(Ð( bÓ)×/Ñ/Ó1€FØ
‡w�wˆz×Ò§6Ø�‰Ð2Ô3ßÔ#7¸Ó#?Ð?�<Ö?Ø�‰�lÔ#Ü�#—'‘'˜)Ó$×*Ð*¨Ó+×1Ñ1Ó3€Gß”t˜G“}×/Ñ/Ó1×8Ñ8×:Ò:Ø�‰Ð+¨G¨9Ð5Ô6Ø€Mr   c                ó$   € V ^8„  d   QhR\         /# r+   r<  )r   s   "r   r   r   â  s   € ÷ ñ ”Sñ r   c            
     ó  € ^ RI Hp  V ! RR7      pV Uu. uF  p\        V4      ;p'       g   K  W#3NK  	  ppV'       gb   \        \	        R\
        P                  4      4       V'       d   R\        V4       R2MRp\        \	        V\
        P                  4      4       ^ # \        R V 4       4      p\        \	        R	V R
\        V4       R2\
        P                  4      4       \        4        V Fe  w  r#\        R\	        VP                  RR4      \
        P                  4       RVP                  RR4       24       V F  p\        RV 24       K  	  Kg  	  \        4        \        \	        R\
        P                  4      4       ^# u upi )zDRun read-only cron health checks and return a shell-friendly status.rh  Frj  u   âœ“ Cron doctor found no issuesz
  Checked z active job(s).z  No active jobs configured.c              3   ó<   "  € T F  w  r\        V4      x € K  	  R # 5ir[   )r	  )r\   ri   rÒ  s   &  r   r_   Úcron_doctor.<locals>.<genexpr>ì  s   é € Ð<±8¡i a”c˜&—k�k³8ùs   ‚zCron doctor found z issue(s) across z job(s):r¼   r½   rT   rY   r2   rø   z    - z?Review the findings above, then run `hermes cron doctor` again.)rC   ri  rÖ  rL   r   r   rÂ   r	  rN   r“  rM   rs   )ri  rÇ   rƒ   rÒ  ÚfindingsÚnoteÚissue_countrÔ  s           r   Úcron_doctorrÞ  â  sA  € å#Ù eÔ,€DÙ)-Ó^© #Ô<WÐX[Ó<\Ð2\°&Ó2\”�“©€HÐ^ßÜŒeÐ5´v·|±|ÓDÔEß:>�œC ›I˜; oÑ6ÐDbˆÜŒe�Dœ&Ÿ*™*Ó%Ô&ÙÜÑ<±8Ó<Ó<€KÜ	Œ%Ð$ [ MÐ1BÄ3ÀxÃ=À/ÐQYÐZÔ\b×\iÑ\iÓ
jÔkÜ	„GÛ‰ˆÜ�”5˜Ÿ™  sÓ+¬V¯]©]Ó;Ð<¸A¸c¿g¹gÀfÈkÓ>ZÐ=[Ð\Ô]ÛˆEÜ�F˜5˜'Ð"Ö#ó ñ  ô 
„GÜ	Œ%ÐQÔSY×S]ÑS]Ó
^Ô_Ùùò _s
   ”F	®F	c                óF   € V ^8„  d   QhR\         \        \        3,          /# r+   rÌ   )r   s   "r   r   r      s   € ÷ Uñ UœT¤#¤s (�^ñ Ur   c           
     óX   € \          UUu/ uF  w  rV\        WR4      bK  	  upp# u uppi )zMCollect the create/update kwargs shared by ``cron create`` and ``cron edit``.N)Ú_JOB_ARG_FIELDSrN  )rS  Úapi_keyÚattrs   &  r   Ú_job_api_kwargsrä     s(   € åDSÔTÁO±=°7ˆG”W˜T¨Ó.Ò.ÁOÒTÐTùÓTs   Š&c                óJ   € V ^8„  d   QhR\         \        \        3,          RR/# )r   Újob_datar   NrÌ   )r   s   "r   r   r     s"   € ÷ 2ñ 2¤¤c¬3 h¥ð 2°Dñ 2r   c                ó–   € \          F>  w  rV P                  V4      '       g   K  \        VP                  W,          4      4       K@  	  R# )zPPrint the optional Script/Monitor/Mode/Continuity/Workdir lines of a job record.N)Ú_JOB_DETAIL_LINESrs   rL   r   )ræ  r­  Útemplates   &  r   Ú_print_job_detailsrê    s0   € ç*‰ˆØ�<‰<˜×ÔÜ�(—/‘/ (¥-Ó0Ö1ó +r   c                 óô  € \        RR RRV P                  RV P                  R\        V RR4      R\	        \        V RR4      \        V RR4      4      R\        V RR4      ;'       g    R/\        V R	R4      '       g   \        V R
R4      e   R	V P
                  R
\        V R
R4      /M/ B\        V 4      B pVP                  R4      '       g9   \        \        RVP                  RR4       2\        P                  4      4       ^# \        \        RVR,           2\        P                  4      4       \        RVR,           RVR,           24       VP                  R4      '       d%   \        RRP                  VR,          4       24       \        VP                  R/ 4      4       VP                  R/ 4      P                  RR4      '       g   \        R4       M\        RVR,           24       \        4        ^ # )rT  Úcreaterû   Úpromptrá   Nr   rí   Fr‹   Úpaused_reasonÚsuccesszFailed to create job: r2  rÐ  zCreated job: r-  ú  Name: r2   ú
  Schedule: ú
  Skills: r±   rƒ   r‡   Tu?     Created PAUSED â€” resume to schedule, or explicitly run now.r®  rw   r#   )r)   rû   rí  rN  r   r‹   rä  rs   rL   r   r   rÃ   rÂ   rg   rê  rO   )rS  Úresults   & r   Úcron_createrô    sÓ  € ô ñ !Øð!Ø"&§-¡-ð!Ø8<¿¹ð!ä�d˜G TÓ*ð!ô !¤¨¨w¸Ó!=¼wÀtÈXÐW[Ó?\Ó]ð!ô ˜˜z¨5Ó1×9Ð9°Tð	!ô �d˜H e×,Ò,´¸¸oÈtÓ0TÒ0`ð �d—k‘k ?´G¸DÀ/ÐSWÓ4XÑYØfhð!ô ˜$Ó
ñ!€Fð �:‰:�i× Ò ÜŒeÐ,¨V¯Z©Z¸ÀÓ-QÐ,RÐSÔU[×U_ÑU_Ó`ÔaÙÜ	Œ%�-  xÕ 0Ð1Ð2´F·L±LÓ
AÔBÜ	ˆH�V˜F•^Ð$ N°6¸*Õ3EÐ2FÐ
GÔHØ‡z�z�(×ÒÜ�
˜4Ÿ9™9 V¨HÕ%5Ó6Ð7Ð8Ô9Ü�v—z‘z %¨Ó,Ô-Ø�:‰:�e˜RÓ ×$Ñ$ Y°×5Ò5ÜÐOÕPä�˜V MÕ2Ð3Ð4Ô5Ü Ô"Ùr   c                 ó`  € ^ RI HpHp  V! V P                  4      pT'       g3   \	        \        RT P                   2\        P                  4      4       ^# \        TP                  R	4      ;'       g$    TP                  R
4      '       d   TR
,          .M. 4      p\        \        T R
R4      \        T R	R4      4      p\        R\        T RR4      4      ;'       g    . p\        \        R\        T RR4      4      ;'       g    . 4      p	Rp
\        T RR4      '       d   . p
MPTe   Tp
MIT'       g	   T	'       d:   T Uu. uF  q»T	9  g   K  TNK  	  p
pY¨ Uu. uF  q»T
9  g   K  TNK  	  up,          p
\        R RRRT P                  R\        T RR4      R\        T RR4      R	T
R\        T RR4      /\!        T 4      B pTP                  R4      '       g9   \	        \        RTP                  RR4       2\        P                  4      4       ^# TR,          p\	        \        RTR,           2\        P"                  4      4       \	        RTR,           RTR,           24       \	        TP                  R	4      '       d   RRP%                  TR	,          4       2MR4       \'        T4       ^ #   T dt   p\	        \        \        T4      \        P                  4      4       TP                   F,  p\	        RTR,           RTP                  R4      : R24       K.  	   Rp?^# Rp?ii ; iu upi u upi )!r!   )ÚAmbiguousJobReferenceÚresolve_job_refr¼   r½   z	  (name: r2   r™   NúJob not found: r   rá   Ú
add_skillsÚremove_skillsÚclear_skillsFrT  Úupdater-  rû   rí  rí   rï  zFailed to update job: r2  rÐ  rƒ   zUpdated job: rð  rñ  rò  r±   z  Skills: noner#   )rC   rö  r÷  r-  rL   r   r   r   rÃ   Úmatchesrs   r   r   rN  Úsetr)   rä  rÂ   rg   rê  )rS  rö  r÷  rƒ   r*  rX   Úexisting_skillsÚreplacement_skillsrù  rú  Úfinal_skillsrá   ró  Úupdateds   &             r   Ú	cron_editr  1  sÔ  € ß@ðÙ˜dŸk™kÓ*ˆ÷ ÜŒe�o d§k¡k ]Ð3´V·Z±ZÓ@ÔAÙÜ˜3Ÿ7™7 8Ó,×\Ð\À3Ç7Á7È7×CSÒCS°#°gµ,±ÐY[Ó]€OÜ*¬7°4¸À$Ó+GÌÐQUÐW_ÐaeÓIfÓgÐÜ" 4¬°°|ÀTÓ)JÓK×QÐQÈr€JÜÔ)¨$´¸¸oÈtÓ0TÓU×[Ð[ÐY[Ó\€Mà€LÜˆt�^ U×+Ò+Ø‰Ø	Ò	'Ø)‰ß	—}Ù+:ÓY©? %È=Ñ>XŸ˜©?ˆÐYØ¨JÓT©J 5À|Ñ:SŸ˜©JÑTÕTˆÜñ Z˜hð Z¨t¯{©{ð ZÜ '¨¨j¸$Ó ?ðZä% d¨H°dÓ;ðZàDPðZô !(¨¨j¸$Ó ?ðZô DSÐSWÓCXñZ€Fð �:‰:�i× Ò ÜŒeÐ,¨V¯Z©Z¸ÀÓ-QÐ,RÐSÔU[×U_ÑU_Ó`ÔaÙØ�U�m€GÜ	Œ%�- ¨Õ 1Ð2Ð3´V·\±\Ó
BÔCÜ	ˆH�W˜V•_Ð% ^°G¸JÕ4GÐ3HÐ
IÔJÜ	¸¿¹ÀX×9NÒ9NˆJ�t—y‘y ¨Õ!2Ó3Ð4Ñ
5Ø
ôä�wÔÙøðE !ô ÜŒe”C˜“HœfŸj™jÓ)Ô*Ø—”ˆAÜ�B�q˜•w�i˜y¨¯©¨v«Ñ(9¸Ð;Ö<ñ åûð	üò& ZùÚTs0   ŠJ) Ä;L&ÅL&ÅL+Å!L+Ê)L#Ê0A(LÌL#c                óH   € V ^8„  d   QhR\         R\         R\         R\        /# )r   rT  r-  Úsuccess_verbr   )r   rc   )r   s   "r   r   r   Z  s(   € ÷ ñ œð ¤Sð ¼ð Äñ r   c                 óh  € R pV R8X  dC   \         P                  ! \        4      ;_uu_ 4        ^ RIHp VP                  R4      pR R R 4        \        WR7      pVe   XP                  V4       TP                  R4      '       g<   \        \        RT  RTP                  RR	4       2\        P                  4      4       ^# TP                  R
4      ;'       g    TP                  R4      ;'       g    / p\        \        T RTP                  RT4       RT R2\        P                  4      4       T R9   dD   TP                  R
/ 4      P                  R4      '       d   \        RTR
,          R,           24       T R8X  dƒ   \        R\        TP                  R
/ 4      4       24       TP                  R4      '       dE   TP                  R4      RJ d0   TP                  R4      '       g   TP                  R4      R8w  d   ^# ^ #   + '       g   i     ELÊ; i  Te   XP                  T4       i i ; i)Nrª  )Ú_SESSION_ASYNC_DELIVERYF)rT  r-  rï  z
Failed to z job: r2  rÐ  rƒ   Úremoved_jobr2   ú (r™   rw   r®  r¼   ÚexecutedÚexecution_successÚdelegation_idÚexecution_modeÚ
background>   rª  Úresume)r?   r@   r3   Úgateway.session_contextr  rþ  r)   Úresetrs   rL   r   r   rÃ   rÂ   Ú_run_outcome)rT  r-  r  Ú_stateless_tokenr  ró  rƒ   s   &&&    r   Ú_job_actionr  Z  sÐ  € ØÐØ�„ô
 × Ò ¤×+Õ+õ
 HØ6×:Ñ:¸5ÓAÐ÷ ,ð<Ü &Ô8ˆàÒ'Ø#×)Ñ)Ð*:Ô;Ø�:‰:�i× Ò ÜŒe�j  ¨¨v¯z©z¸'À?Ó/SÐ.TÐUÔW]×WaÑWaÓbÔcÙØ
�*‰*�UÓ
×
>Ð
>˜vŸz™z¨-Ó8×
>Ð
>¸B€CÜ	Œ%�<�.  s§w¡w¨v°vÓ'>Ð&?¸rÀ&ÀÈÐKÌVÏ\É\Ó
ZÔ[ØÐ"Ô" v§z¡z°%¸Ó'<×'@Ñ'@À×'OÒ'OÜ�˜V E�]¨=Õ9Ð:Ð;Ô<Ø�„Ü�”< §
¡
¨5°"Ó 5Ó6Ð7Ð8Ô9Ø�G‰G�J×Ò C§G¡GÐ,?Ó$@ÀEÓ$IØŸ™ ×0Ò0°S·W±WÐ=MÓ5NÐR^Ô5^ÙÙ÷1 ,×+Ð+ûð Ò'Ø#×)Ñ)Ð*:Õ;ð (ús   ¬HÁH ÈH	ÈH1c                óR   € V ^8„  d   QhR\         \        \        3,          R\        /# r‚   rÌ   )r   s   "r   r   r   |  s&   € ÷ Uñ U”dœ3¤˜8•nð U¬ñ Ur   c                ó"  € V P                  R4      '       d   RV R,           R2# V P                  R4      R8X  d   R# V P                  R4      '       d#   RV P                  R	4      '       d   R
 R2# R R2# V P                  R4      ;'       g    R# )zÐOne-line verdict for a manual run.

A background-dispatched run (execution_mode="background" / delegation_id) keeps running
after this CLI exits, so report the dispatch rather than a success/failure verdict.
r  z"Running in background (delegation z).r  r  zRunning in background.r
  z	Ran now: r  Ú	succeededÚfailedÚ.Úexecution_skippedz'It will run on the next scheduler tick.rr   r  s   &r   r  r  |  s“   € ð ‡w�wˆ×ÒØ3°C¸Õ4HÐ3IÈÐLÐLØ
‡w�wÐÓ  LÔ0Ù'Ø
‡w�wˆz×ÒØ¨#¯'©'Ð2E×*FÒ*F˜;ÐUÐUVÐWÐWÈHÐUÐUVÐWÐWØ�7‰7Ð&Ó'×TÐTÐ+TÐTr   c                ó$   € V ^8„  d   QhR\         /# r+   r<  )r   s   "r   r   r   ‹  s   € ÷ ñ œñ r   c           	     ó,  € \        V RR4      p\        V RR4      pV'       d.   V'       d&   \        \        R\        P                  4      4       ^# V'       g    V'       g   \        RV P                  R4      # ^ RIHpH	pH
p  T! V P                  V'       d   V! 4       P                  4       MT4      pT'       g3   \        \        R
T P                   2\        P                  4      4       ^# \        \        RTP                  RT P                  4       RT P                   R2\        P                  4      RTP                  R4       2,           4       ^ #   T\        3 d2   p\        \        R	T 2\        P                  4      4        Rp?^# Rp?ii ; i)z>Resume a paused job or explicitly re-arm a completed one-shot.Úrun_atNÚrun_nowFz%Use exactly one of --at or --run-now.r  ÚResumed)rö  Ú_hermes_nowÚrearm_oneshotzFailed to re-arm job: rø  zRe-armed job: r2   r	  r™   z
  Next run: rw   )rN  rL   r   r   rÃ   r  r-  rC   rö  r   r!  Ú	isoformatre   rs   rÂ   )rS  r  r  rö  r   r!  rƒ   r*  s   &       r   Úcron_resumer#  ‹  s/  € ä�T˜8 TÓ*€FÜ�d˜I uÓ-€Gß—'ÜŒeÐ;¼V¿Z¹ZÓHÔIÙßŸ'Ü˜8 T§[¡[°)Ó<Ð<ßKÑKðÙ˜DŸK™KÇg©«×)@Ñ)@Ô)BÐSYÓZˆ÷ ÜŒe�o d§k¡k ]Ð3´V·Z±ZÓ@ÔAÙÜ	Œ%�. §¡¨°·±Ó!=Ð >¸bÀÇÁÀÈQÐOÔQW×Q]ÑQ]Ó
^Ø˜SŸW™W ]Ó3Ð4Ð5õ6ô 7áøð "¤:Ð.ô ÜŒeÐ,¨S¨EÐ2´F·J±JÓ?Ô@Ýûðús   ÂE ÂE ÅFÅ"&FÆFc                ó$   € V ^8„  d   QhR\         /# r+   r<  )r   s   "r   r   r   ¢  s   € ÷ +ñ +œ#ñ +r   c                óF  € ^ RI Hp \        \        V RR4      ;'       g    R4      p\        V RR4      ;'       g    Rp\        V RR4      p\        V RR4      pV'       g&   \	        \        R	\        P                  4      4       ^#  VR9  dµ   VP                  V4      pV'       g(   \	        \        RV R2\        P                  4      4       V Fl  p\	        R\        VR,          \        P                  4       RVR,           R\        R\        VR,          4      ,           \        P                  4       24       Kn  	  ^ # VR
8X  d   RMV R2pVe   VR
8X  d-   Vf)   \	        \        RV 2\        P                  4      4       ^# VR
8X  d?   VP                  W$V4       \	        \        RV RV R2\        P                  4      4       ^ # VR8X  d$   VP                  W$4      p	V	e   \	        V	4       ^ # MCVP                  W$4      '       d-   \	        \        RV RV R2\        P                  4      4       ^ # \	        \        RV RV R2\        P                  4      4       ^#   \         d2   p
\	        \        RT
 2\        P                  4      4        Rp
?
^# Rp
?
ii ; i)zãHandle ``hermes cron notepad <job_id> [get|set|delete|list]`` (per-job durable KV).

A running cron agent updates its own notepad via its terminal tool; the scheduler injects
non-empty notepads into the job prompt on each run.
)Únotepadr-  r   Únotepad_actionNr   r­  rÉ   zA job ID is required.rþ  rs   zNotepad for job z
 is empty.r¼   z = z
    z	updated: Ú
updated_atzset <key> <value>z <key>z$Usage: hermes cron notepad <job_id> zSet notepad key 'z
' for job r  zDeleted notepad key 'zNo notepad key 'zNotepad error: )rþ  rs   Údelete)r$  r&  r   rN  rL   r   r   rÃ   Ú
list_notesrN   rM   Úset_noterÂ   Úget_noteÚdelete_notere   )rS  r&  r-  rT  r­  rÉ   ÚnotesrÜ  Ú
usage_argsÚstoredr*  s   &          r   Úcron_notepadr1  ¢  sH  € õ Ü”˜˜x¨Ó,×2Ð2°Ó3€FÜ�TÐ+¨TÓ2×<Ð<°f€FÜ
�$˜˜tÓ
$€CÜ�D˜' 4Ó(€EßÜŒeÐ+¬V¯Z©ZÓ8Ô9ÙðØÐ1Ô1Ø×&Ñ& vÓ.ˆEßÜ”eÐ.¨v¨h°jÐAÄ6Ç:Á:ÓNÔOÛ�Ü˜œ5  e¥¬f¯m©mÓ<Ð=¸SÀÀgÅÀð PÜ" ;´°T¸,Õ5GÓ1HÕ#HÌ&Ï*É*ÓUÐVðXö Yñ ñ Ø,2°e¬OÑ(ÀFÀ8È6ÐARˆ
ØŠ;˜6 Uœ?¨uª}Ü”%Ð>¸z¸lÐKÌVÏZÉZÓXÔYÙØ�UŒ?Ø×Ñ˜V¨%Ô0Ü”%Ð+¨C¨5°
¸6¸(À!ÐDÄfÇlÁlÓSÔTÙØ�UŒ?Ø×%Ñ% fÓ2ˆFØÒ!Ü�f”Ùð "ð × Ñ  ×-Ò-Ü”%Ð/°¨u°J¸v¸hÀaÐHÌ&Ï,É,ÓWÔXÙÜŒeÐ& s e¨:°f°X¸QÐ?ÄÇÁÓOÔPÙøÜô ÜŒe�o c UÐ+¬V¯Z©ZÓ8Ô9Ýûðús@   ÂI$ Â&BI$ ÅAI$ ÆAI$ Ç'I$ Ç4AI$ È8*I$ É$J É/&JÊJ r   c                 óB   € \        \        V R R4      4      ;'       g    ^ # )ÚallF)rÊ   rN  ©Úas   &r   r«  r«  Ò  s   € ”i¤¨¨5°%Ó 8Ó9×>Ð>¸QÐ>r   rö   c                 ó*   € \        4       ;'       g    ^ # r©  )r¥  r4  s   &r   r«  r«  Ó  s   € œ›×*Ð*¨Ð*r   Údoctorc                 ó   € \        4       # r[   )rÞ  r4  s   &r   r«  r«  Ô  s   € œœr   r"  c                 ó   € \        4       # r[   )r+  r4  s   &r   r«  r«  Õ  s   € ”i”kr   Úrunsc                 óZ   € \        \        V R R4      \        V R^4      4      ;'       g    ^ # )r-  Nr  )r6  rN  r4  s   &r   r«  r«  Ö  s*   € ”i¤¨¨8°TÓ :¼GÀAÀwÐPRÓ<SÓT×YÐYÐXYÐYr   rU  c                 ó   € \        V 4      # r[   )rZ  r4  s   &r   r«  r«  ×  s	   € œ>¨!Ô,r   r&  c                 ó   € \        V 4      # r[   )r1  r4  s   &r   r«  r«  Ø  s   € œ aœr   rì  c                 ó   € \        V 4      # r[   )rô  r4  s   &r   r«  r«  Ù  ó   € œ Aœr   Úeditc                 ó   € \        V 4      # r[   )r  r4  s   &r   r«  r«  Ú  s   € ”i ”lr   Úpausec                 ó0   € \        R V P                  R4      # )rB  ÚPaused©r  r-  r4  s   &r   r«  r«  Û  s   € ”{ 7¨A¯H©H°hÔ?r   r  c                 ó   € \        V 4      # r[   )r#  r4  s   &r   r«  r«  Ü  r?  r   rª  c                 ó0   € \        R V P                  R4      # )rª  Ú	TriggeredrE  r4  s   &r   r«  r«  Ý  s   € ”[ ¨¯©°+Ô>r   Úremovec                 ó0   € \        R V P                  R4      # )rI  ÚRemovedrE  r4  s   &r   r«  r«  Þ  s   € œ H¨a¯h©h¸	ÔBr   ÚhistoryÚaddÚrmr)  c                ó¸   € \        V RR4      p\        P                  Vf   RMT4      pVe	   V! V 4      # \        RV R24       \        P
                  ! ^4       R# )zHandle cron subcommands.Úcron_commandNr   zUnknown cron command: zV
Usage: hermes cron [list|create|edit|pause|resume|run|remove|status|runs|doctor|tick])rN  Ú_CRON_SUBCOMMANDSrs   rL   ÚsysÚexit)rS  ÚsubcmdÚhandlers   &  r   rP  rP  å  s]   € ä�T˜>¨4Ó0€FÜ×#Ñ#¨fªn¡FÀ&ÓI€GØÒÙ�t‹}ÐÜ	Ð" 6 (ð +bð bô cä‡H‚HˆQ†Kr   )NN)F)éx   )Né   )zhermes gateway restarti„  ))r2   r2   )rß   rß   )Úfailure_deliverrX  )rÝ   rÝ   )rè   rè   )rï   rï   )ÚmodelrY  )rœ  Úmodel_provider)Úpinnedr[  )râ   râ   )rã   rã   )Ú
continuityr\  )Úreasoning_effortr]  )rñ   rñ   ))rè   z  Script: {})râ   ú0  Monitor: {} (agent runs only on output change))rã   r^  )rí   z3  Mode: no-agent (script stdout delivered directly))r\  z:  Continuity: on (each run sees the previous run's output))rï   z  Workdir: {})rñ   z  Python: {})RÚ__doc__r?   r%   rP  rR  Údatetimer   r   Úpathlibr   Útypingr   r   r   r	   r
   Ú__file__rº  r¿  ÚPROJECT_ROOTrÇ  Úinsertr   Úhermes_cli.colorsr   r   r   r)   r4   rE   rO   rm   ru   r€   r�   r¦   r®   r´   rM   ÚBLUErÁ   rÊ   rÚ   rÄ   rÖ   r×   r  rÅ   r+  r6  rÃ   rÂ   rN   rO  rZ  r‚  rƒ  rD   re  rÀ   rk  rˆ  r¥  r˜  r»  rÈ  r�   rÍ  rÖ  rÞ  rá  rä  rè  rê  rô  r  r  r  r#  r1  rQ  rP  r#   r   r   Ú<module>rh     sj  ðÙ %ã Û Û 	Û 
ß "Ý ß 6Õ 6á�H‹~×$Ñ$×+Ñ+×3Ñ3Ó5€Ø ‡�‡��‘3�|Ó$Ô %ç +÷	ò.õ
õõBGõDõPõHõ Qõ:õ*õ`ð ˜J¨¯©Ð6¸ÀmÐU[×U`ÑU`ÐEaÐb€÷#õDõ""?÷J^õOõ
Iõò<÷6,ð % f§j¡j°)¸V¿]¹]ÈJÐX^×XdÑXdØ" F§J¡Jð0Ð õ+ð\EÐ ðNÐ õ
Gõ
8ðÀ5÷ ð k¸5÷ k÷<=ò~fõR&?õR'õð( !Ð õ`õ"õJð,3€õUð
%Ð õ2òò6&õRõDUõõ.+ð` Ñ>ØÑ*ØÑ%Ø
Ñ!Ø
ÑYØÑ,ØÑ(ØÑ&Ø
Ñ"ØÑ?ØÑ&Ø	Ñ>ØÑBðÐ ð  1°Õ8Ð �)Ñ Ø,¨XÕ6Ð �%Ñ Ø8IÈ(Õ8SÐ SÐ �$Ñ Ð+¨HÑ5ôr   