+
    „WÝjèQ  ã                  óh  a € 0 t $ R t^ RIHt ^ RI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 ^ RIHtHtHtHtHt ^ RIHt ^ RIHt ]P>                  ! ] 4      t!]! R	R
7       ! R R4      4       t"]! R	R
7       ! R R4      4       t#]! R	R
7       ! R R4      4       t$]! R	R
7       ! R R4      4       t%R R lt&Rt'Rt(Rt)Rt*RPR/t+RQR/t,R R lt-RRRR /R! R" llt.RRRR /R# R$ lllt/R%t0^t1RSt2]Pf                  ! 4       t4Rs5R&]6R'&   R( R) lt7/ R*]8R3bR+]8R3bR,]8R3bR-]8R3bR.]8^ 3bR/]8^ 3bR0]9R3bR1]9R3bR2]8^3bR3]8^ 3bR4]:/ 3bR5];R63bR7]8^ 3bR8]<R93bR:];R63bR;]9R	3bR<];R=3bR>]8^3R?];R63/Ct=R@ RA lt>RB RC lt?]?! 4       s@RD]6RE&   RTRF RG lltARH RI ltBRJ RK ltCRL RM ltDRN RO ltER# )Uu´  Curated starter catalog for the managed local runtime.

Every entry carries the estimator inputs (measured on real GGUFs) so the picker can price a model
BEFORE the user downloads gigabytes; once a file is on disk, profile_from_gguf() is the authority.
Builds proven end-to-end on real hardware are marked validated; day-0 entries ship without the flag
â€” ensure_model_ready's touch generation still gates every first load at runtime.
)ÚannotationsN)Ú	dataclassÚfield)ÚPurePosixPath)ÚFLOORÚRUNTIME_OVERHEAD_BYTESÚTARGET_WINDOWÚ
LaunchPlanÚplan_launch)ÚHardwareBudgetÚ	LayerKindÚModelProfileÚPhysicsRefusalÚ	as_loaded)Úmodel_id_from_stem)Úis_nvidia_n1x_pci_idT)Úfrozenc                  óp   € ] tR t^t$ RtR]R&   R]R&   RtR]R&   RtR]R	&   R
tR]R&   ]	R R l4       t
RtR# )Ú	AssetFileu‚  One downloadable file: repo-relative path and exact bytes (feeds the estimator and the
progress bar; no download-time integrity check by design â€” a corrupt file surfaces as a
llama.cpp load error). ``local`` overrides the on-disk name (repos reuse generic names like
mmproj-BF16.gguf). Non-model extras live under the models dir's assets/ subdirectory so the
router never lists them.
ÚstrÚpathÚintÚ
size_bytesNz
str | NoneÚlocalÚrepoÚmainÚrevisionc               ó   € V ^8„  d   QhRR/# ©é   Úreturnr   © )Úformats   "ÚTC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\local_runtime\catalog.pyÚ__annotate__ÚAssetFile.__annotate__-   s   € ÷ ;ñ ;˜Cñ ;ó    c                	óh   € V P                   ;'       g     \        V P                  4      P                  # ©N)r   r   r   Úname©Úselfs   &r#   Ú
local_nameÚAssetFile.local_name,   s#   € à�z‰z×:Ð:œ]¨4¯9©9Ó5×:Ñ:Ð:r&   r!   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__r   r   r   Úpropertyr,   Ú__static_attributes__r!   r&   r#   r   r      sC   ‡ ñð ƒIØƒOØ€Eˆ:ÓØ€Dˆ*ÓØ€HˆcÓàô;ó ô;r&   r   c                  óŽ   € ] tR t^1t$ RtR]R&   R]R&   RtR]R&   ^ tR	]R
&   ]R R l4       t	]R R l4       t
]R R l4       tRtR# )ÚQuantVariantzbOne downloadable build. Split GGUFs list every part in files; the model loads from the
first part.r   ÚquantÚtupleÚfilesFÚboolÚ	validatedr   Ú
lazy_bytesc               ó   € V ^8„  d   QhRR/# r   r!   )r"   s   "r#   r$   ÚQuantVariant.__annotate__>   s   € ÷ `ñ `˜#ñ `r&   c                	ó’   € \        \        V P                  ^ ,          P                  4      P                  P                  R4      4      # )é    z.gguf)r   r   r:   r   r)   Úremovesuffixr*   s   &r#   Úmodel_idÚQuantVariant.model_id=   s2   € ä!¤-°·
±
¸1µ×0BÑ0BÓ"C×"HÑ"H×"UÑ"UÐV]Ó"^Ó_Ð_r&   c               ó   € V ^8„  d   QhRR/# ©r   r    r   r!   )r"   s   "r#   r$   r?   B   s   € ÷ 5ñ 5˜Cñ 5r&   c                	ó:   € \        R  V P                   4       4      # )c              3  ó8   "  € T F  qP                   x € K  	  R # 5ir(   ©r   ©Ú.0Úfs   & r#   Ú	<genexpr>Ú*QuantVariant.size_bytes.<locals>.<genexpr>C   s   é € Ð4© A—<–<«ùó   ‚)Úsumr:   r*   s   &r#   r   ÚQuantVariant.size_bytesA   s   € äÑ4¨¯ªÓ4Ó4Ð4r&   c               ó   € V ^8„  d   QhRR/# rF   r!   )r"   s   "r#   r$   r?   F   s   € ÷ 1ñ 1˜sñ 1r&   c                ó<   € V P                   V P                  ,
          # )uØ   Pre-download estimate of the weights the engine loads: GGUF bytes â‰ˆ tensor bytes + a <2%
header, less the tensors it reads from disk on demand â€” slightly conservative until
profile_from_gguf reads the real table.)r   r=   r*   s   &r#   Úweights_bytesÚQuantVariant.weights_bytesE   s   € ð
 �‰ §¡Õ0Ð0r&   r!   N)r.   r/   r0   r1   r2   r3   r<   r=   r4   rC   r   rT   r5   r!   r&   r#   r7   r7   1   se   ‡ ñð ƒJØƒLØ€IˆtÓð €J�Óàô`ó ð`ð ô5ó ð5ð ô1ó ô1r&   r7   c                  óä  € ] tR t^Mt$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R]R
&   R]R&   R]R&   ^ tR]R&   ^ tR]R&   RtR]R&   RtR]R&   ^t	R]R&   ^ t
R]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   ^tR]R&   RtR]R&   RtR]R&   ]! ]R 7      tR!]R"&   RtR]R#&   ^ tR]R$&   R%tR&]R'&   R(tR]R)&   ]R* R+ l4       t]R, R- l4       tR. R/ ltR0 R1 ltR2 R3 ltR4 R5 ltR6 R7 lt R8t!R# )9ÚCatalogEntryr   ÚidÚdisplay_nameÚdescriptionr   r9   Úvariantsr   Ún_ctx_trainÚfull_layersÚrecurrent_layersÚper_layer_f16Ú
swa_layersÚ
swa_windowFr;   ÚmoeÚmtpÚmtp_draft_depthÚn_vocabÚ ÚarchitectureNúAssetFile | NoneÚmmprojÚdraftúdraft-dsparkÚdraft_spec_typeÚdraft_depthÚdraft_min_engineÚmtp_head)Údefault_factoryÚdictÚsamplingÚ
min_engineÚqualityç      ð?ÚfloatÚdecode_fractionTÚ	recommendc               ó   € V ^8„  d   QhRR/# )r   r    r;   r!   )r"   s   "r#   r$   ÚCatalogEntry.__annotate__…   s   € ÷ 5ñ 5˜Tñ 5r&   c                óF   € V P                   ;'       g    V P                  RJ# )zKMTP spec decode runs, from heads built into the model or shipped beside it.N)rc   ro   r*   s   &r#   Úmtp_capableÚCatalogEntry.mtp_capable„   s   € ð �x‰x×4Ð4˜4Ÿ=™=°Ð4Ð4r&   c               ó   € V ^8„  d   QhRR/# rF   r!   )r"   s   "r#   r$   rz   Š   s   € ÷ Xñ X ñ Xr&   c                óR   € \        R V P                  V P                  3 4       4      # )zQCompanion files the engine loads beside the weights (vision projector, MTP head).c              3  óD   "  € T F  qf   K  VP                   x € K  	  R # 5ir(   rI   ©rK   Úas   & r#   rM   Ú/CatalogEntry.companion_bytes.<locals>.<genexpr>Œ   s   é € ÐWÑ)E A”<�1—<–<Ó)Eùs   ‚ Œ )rP   ri   ro   r*   s   &r#   Úcompanion_bytesÚCatalogEntry.companion_bytes‰   s"   € ô ÑW¨$¯+©+°t·}±}Ñ)EÓWÓWÐWr&   c               ó    € V ^8„  d   QhRRRR/# )r   Úvariantr7   r    r   r!   )r"   s   "r#   r$   rz   Ž   s   € ÷ Vñ V˜|ð V°ñ Vr&   c                	ó  € \         P                  V P                  3.V P                  ,          \         P                  V P                  3.V P
                  ,          ,           \         P                  ^ 3.V P                  ,          ,           p\        VP                  VP                  ^ V P                  Y P                  V P                  V P                  V P                  V P                   '       d   RMRVP"                  R7      # )rA   g333333ó?ru   )r)   rT   Úembd_table_bytesr\   Úlayersra   rb   rg   re   Úkv_scaler=   )r   ÚFULLr_   r]   ÚSWAr`   Ú	RECURRENTr^   r   rC   rT   r\   ra   rb   rg   re   r|   r=   )r+   r‡   rŠ   s   && r#   ÚprofileÚCatalogEntry.profileŽ   sÎ   € Ü—N‘N D×$6Ñ$6Ð7Ð8¸4×;KÑ;KÕKÜ—m‘m T×%7Ñ%7Ð8Ð9¸D¿O¹OÕKõLä×)Ñ)¨1Ð-Ð.°×1FÑ1FÕFõGˆô Ø×!Ñ!°×1FÑ1FÐYZØ×(Ñ(°ÇOÁOÐY]×YaÑYaØ×*Ñ*°D·L±LØ ×,×,Ð,‘S°#À'×BTÑBTô	Vð 	Vr&   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r‡   r7   Úbudgetr   r    r	   r!   )r"   s   "r#   r$   rz   ˜   s&   € ÷ Yñ Y <ð Y¸ð YÈJñ Yr&   c                	óŽ   € \        \        V P                  V4      V4      W P                  \        V P
                  ,           R 7      # ))r|   Úfixed_overhead)r
   r   r�   r|   r   r„   )r+   r‡   r’   s   &&&r#   Úlaunch_planÚCatalogEntry.launch_plan˜   s9   € äœ9 T§\¡\°'Ó%:¸FÓCÀV×YiÑYiÜ*@À4×CWÑCWÕ*WôYð 	Yr&   c               ó    € V ^8„  d   QhRRRR/# ©r   r‡   r7   r    r9   r!   )r"   s   "r#   r$   rz   �   s   € ÷ -ñ - lð -°uñ -r&   c                ó  € \         ;QJ d5    . R V P                  V P                  V P                  3 4       F  NK  	  5M.! R V P                  V P                  V P                  3 4       4      p\        VP                  4      V,           # )z=Everything a download job fetches for this variant, in order.c              3  ó0   "  € T F  qf   K  Vx € K  	  R # 5ir(   r!   r�   s   & r#   rM   Ú.CatalogEntry.download_files.<locals>.<genexpr>Ÿ   s   é € Ð\Ñ"J˜Q—q’qÓ"Jùó   ‚Œ
)r9   ri   rj   ro   r:   ©r+   r‡   Úextrass   && r#   Údownload_filesÚCatalogEntry.download_files�   sZ   € ç”Ñ\ 4§;¡;°·
±
¸D¿M¹MÑ"JÓ\—‘Ñ\ 4§;¡;°·
±
¸D¿M¹MÑ"JÓ\Ó\ˆÜ�W—]‘]Ó# fÕ,Ð,r&   c               ó    € V ^8„  d   QhRRRR/# )r   r‡   r7   r    r   r!   )r"   s   "r#   r$   rz   ¢   s   € ÷ Gñ G lð G°sñ Gr&   c                	óD   € \        R  V P                  V4       4       4      # )c              3  ó8   "  € T F  qP                   x € K  	  R # 5ir(   rI   rJ   s   & r#   rM   Ú.CatalogEntry.download_bytes.<locals>.<genexpr>£   s   é € ÐFÑ)E A—<–<Ó)EùrO   )rP   rŸ   )r+   r‡   s   &&r#   Údownload_bytesÚCatalogEntry.download_bytes¢   s   € ÜÑF¨×)<Ñ)<¸WÔ)EÓFÓFÐFr&   c               ó    € V ^8„  d   QhRRRR/# r˜   r!   )r"   s   "r#   r$   rz   ¥   s   € ÷ -ñ - \ð -°eñ -r&   c                óê   € \         ;QJ d*    . R V P                  V P                  3 4       F  NK  	  5M#! R V P                  V P                  3 4       4      p\        VP                  4      V,           # )z�The files a variant needs to count as downloaded. The draft is optional: a model
installed before its draft joined the catalog stays installed.c              3  ó0   "  € T F  qf   K  Vx € K  	  R # 5ir(   r!   r�   s   & r#   rM   Ú-CatalogEntry.install_files.<locals>.<genexpr>¨   s   é € ÐPÑ">˜Q—q’qÓ">ùrœ   )r9   ri   ro   r:   r�   s   && r#   Úinstall_filesÚCatalogEntry.install_files¥   sP   € ÷ ”ÑP 4§;¡;°·±Ñ">ÓP—‘ÑP 4§;¡;°·±Ñ">ÓPÓPˆÜ�W—]‘]Ó# fÕ,Ð,r&   r!   )"r.   r/   r0   r1   r3   r`   ra   rb   rc   rd   re   rg   ri   rj   rl   rm   rn   ro   r   rq   rr   rs   rt   rw   rx   r4   r|   r„   r�   r•   rŸ   r¥   r«   r5   r!   r&   r#   rW   rW   M   sO  ‡ àƒGØÓØÓØ
ƒIØƒOð ÓØÓØÓØÓØ€J�ÓØ€J�ÓØ€CˆÓØ€CˆÓð €O�SÓð €GˆSÓð €L�#ÓØ#€FÐÓ#Ø"€EÐÓ"ð *€O�SÓ)Ø€K�ÓØÐ�cÓð "&€HÐÓ%Ù¨4Ô0€HˆdÓ0ð €J�Óð
 €GˆSÓð !€O�UÓ ð €IˆtÓàô5ó ð5ð ôXó ðXõVõYõ
-õ
G÷-ñ -r&   rW   c                  ó:   € ] tR t^¬t$ RtR]R&   R]R&   R]R&   RtR	# )
ÚVariantChoicezjWhich build this machine should download and why. reason_key is a UI-copy
discriminator, not display text.r7   r‡   r;   Ú
zero_spillr   Ú
reason_keyr!   N)r.   r/   r0   r1   r2   r3   r5   r!   r&   r#   r®   r®   ¬   s   ‡ ñ(ð ÓØÓØ‡Or&   r®   c               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚentryrW   r’   r   r    zVariantChoice | Noner!   )r"   s   "r#   r$   r$   ¶   s'   € ÷ Fñ F˜,ð F°ð FÐCWñ Fr&   c                ó`  € V P                   R,          pV P                  W!4      P                  p\        V\        4      '       d   R# VP
                  '       d   \        VRRR7      # VP                  \        \        V P                  ;'       g    \        4      8¼  d   RMRp\        VRVR7      # )	a"  Fit the entry's one Q4-class build to this machine; headroom buys a bigger window, never a
bigger quant.

"best-large-window": zero-spill at TARGET_WINDOW; "best-fits": zero-spill at the 64K floor;
"smallest-fits-spilled": weights spill to host RAM, priced honestly; None: physics refuses.
NFzsmallest-fits-spilled)r¯   r°   zbest-large-windowz	best-fitsTéÿÿÿÿ)r[   r•   ÚdecisionÚ
isinstancer   Úspilledr®   ÚwindowÚminr   r\   r   )r²   r’   r‡   rµ   Úreasons   &&   r#   Úselect_variantr»   ¶   s�   € ð �n‰n˜RÕ €GØ× Ñ  Ó1×:Ñ:€HÜ�(œN×+Ò+ÙØ××ÐÜ˜W°ÐCZÔ[Ð[Ø$,§O¡O´s¼=È%×J[ÑJ[×JdÐJdÔ_dÓ7eÔ$eÑ Ðkv€FÜ˜¨T¸fÔEÐEr&   g     @�@g     @j@g      T@g      4@úqwen3.8-27bgfffffæ5@c               ó$   € V ^8„  d   QhRRRRRR/# )r   r’   r   Úbackendr   r    ztuple[str, str, str]r!   )r"   s   "r#   r$   r$   î   s"   € ÷ 	:ñ 	:˜.ð 	:°3ð 	:Ð;Oñ 	:r&   c                óâ   € V P                   P                  R4      ^ ,          pV P                  e    \        V P                  4      '       d   RMRpVR8X  d   V'       d   RMTpV P                  W23# )zq(platform, backend, reference GPU name) for the shipped tables; the name is empty when the
GPU is not recognized.z (úNVIDIA RTX Spark N1Xrf   ÚautoÚcuda)Úgpu_nameÚ	partitionÚ
gpu_pci_idr   Úplatform)r’   r¾   rÃ   Úeffective_backends   &&  r#   Ú_hardware_keyrÈ   î   sc   € ð �‰×(Ñ(¨Ó.¨qÕ1€Hà×ÑÒ$Ü-AÀ&×BSÑBS×-TÒ-TÑ)ÐZ\ˆØ")¨VÔ"3¿™ÀgÐØ�O‰OÐ.Ð9Ð9r&   r·   Fr¾   rÁ   c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r   r²   rW   r‡   r7   r’   r   r·   r;   r¾   r   r    rv   r!   )r"   s   "r#   r$   r$   ú   s9   € ÷ 
-ñ 
- ,ð 
-¸ð 
-È~ð 
-Ø$(ð
-Ø;>ð
-ØLQñ
-r&   c               óº  € . \        W$4      OV P                  NVP                  NV P                  N5pVP                  '       d6   V P
                  '       d$   V'       g   \        P                  V4      ;pe   V# V'       d   \        MVP                  '       d   \        M\        p\        RVP                  V P                  ,          4      pVR,          V,          # )zMShipped measured baseline where matched, otherwise the memory-bound estimate.ru   g    eÍÍA)rÈ   rX   r8   rd   Úumarc   Ú_MEASURED_DECODE_TOK_SÚgetÚ_HOST_BANDWIDTH_GB_SÚ_UMA_BANDWIDTH_GB_SÚ_DISCRETE_BANDWIDTH_GB_SÚmaxr   rw   )	r²   r‡   r’   r·   r¾   ÚkeyÚmeasuredÚ	bandwidthÚbytes_per_tokens	   &&&$$    r#   Úpredicted_decode_tok_srÖ   ú   s¨   € ð \ŒM˜&Ó*Ð
[¨E¯H©HÐ
[°g·m±mÐ
[ÀU×EZÑEZÑ
[€CØ‡z‡z€z�e—i—i�i¯ÔAW×A[ÑA[Ð\_ÓA`Ð5`°XÒ4mØˆß)0Õ%Ø-3¯Z¯Z¨ZÕ)Ü.ð ô ˜#˜w×1Ñ1°E×4IÑ4IÕIÓJ€OØ�s�?˜_Õ,Ð,r&   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r’   r   Úentriesztuple[CatalogEntry, ...] | Noner¾   r   r    ztuple[CatalogEntry, str] | Noner!   )r"   s   "r#   r$   r$     s+   € ÷ !ñ !˜nð !Ø>ð!ØSVð!à:ñ!r&   c               ó  a aa€ \         ;QJ d    . R Vf   \        MT 4       F  NK  	  5M! R Vf   \        MT 4       4      pV Uu. uF  p\        VS 4      ;pf   K  WE3NK  	  ppV'       g   R# RVV 3R llpV UUu. uF  w  rEVP                  '       g   K  WE3NK  	  ppp\        P                  \        S S4      4      p	V F  w  r«V
P                  V	8X  g   K  V
R3u # 	  V Uu. uF  qÇ! V4      \        8¼  g   K  VNK  	  ppV'       d_   \        VR R7      ^ ,          o\        ;QJ d    V3R lV 4       F  '       g   K   R	M	  RM! V3R lV 4       4      pSV'       d   R
3# R3# R# u upi u uppi u upi )at  The catalog's default pick for THIS machine, with its reason key.

Callers pass pre-filtered entries when some are ineligible for reasons the catalog can't know
(engine too old). Entries marked ``recommend: false`` are never picked. Reasons:
product-default (the product's maker chose this entry and it runs resident);
best-quality-resident (quality won among resident entries clearing the pleasant floor);
speed-gated-quality (same, but the floor eliminated a HIGHER quality candidate).
Returns None when no eligible entry runs resident at the pleasant floor; slower and spilled
models remain available for explicit selection.
c              3  óL   "  € T F  qP                   '       g   K  Vx € K  	  R # 5ir(   )rx   )rK   Úes   & r#   rM   Ú$recommended_entry.<locals>.<genexpr>  s   é € ÐUÑD�qÏÍ—’ÓDùs   ‚$š
$NFc                óT   <€ \        V ^ ,          V ^,          P                  SVSR7      # )rA   )r·   r¾   )rÖ   r‡   )Útr·   r¾   r’   s   &&€€r#   ÚspeedÚ recommended_entry.<locals>.speed  s#   ø€ Ü% a¨¥d¨A¨a­D¯L©L¸&È'Ð[bÔcÐcr&   zproduct-defaultc                ód   € V ^ ,          P                   V ^,          P                  P                  ) 3# )rA   )rt   r‡   r   )rÞ   s   &r#   Ú<lambda>Ú#recommended_entry.<locals>.<lambda>#  s"   € ¨A¨a­D¯L©L¸1¸Q½4¿<¹<×;RÑ;RÐ:RÑ+Sr&   )rÒ   c              3  óZ   <"  € T F   w  rVP                   SP                   8„  x € K"  	  R # 5ir(   )rt   )rK   rÛ   Ú_Úpicks   &  €r#   rM   rÜ   $  s    øé € ÐH¹x±t°q˜!Ÿ)™) d§l¡lÖ2»xùs   ƒ(+Tzspeed-gated-qualityzbest-quality-resident©F)r9   ÚCATALOGr»   r¯   Ú_PRODUCT_DEFAULTSrÍ   rÈ   rX   ÚPLEASANT_FLOOR_TOK_SrÑ   Úany)r’   rØ   r¾   ÚpoolrÛ   ÚcÚfittingrß   ÚresidentÚproduct_defaultr²   rå   rÞ   ÚpleasantÚfloor_gatedræ   s   f&d            @r#   Úrecommended_entryró     sQ  ú€ ÷ Œ5ÑU¨ª�W¸WÐDÓU�5‰5ÑU¨ª�W¸WÐDÓUÓU€DÙ#ÓT™t˜!¬^¸A¸vÓ-FÐ(F¨Œv�‹v™t€GÐTßÙ÷dð dñ $+Ô;¡7™4˜1¨a¯l­l”�“¡7€HÑ;Ü'×+Ñ+¬M¸&À'Ó,JÓK€OÛ‰ˆØ�8‰8�Ö&ØÐ,Ð-Ò-ñ ñ $ÓH™8�a u¨Q£xÔ3GÑ'G—�™8€HÐHßÜ�8Ñ!SÔTÐUVÕWˆß“cÔH¹xÓH—c—c’cÔH¹xÓHÓHˆØ¯{Ð+ÐXÐXÐ@WÐXÐXñ ùò' Uùó <ùò
 Is$   ÁE1ÁE1Â E6ÂE6Ã*E<ÄE<zfhttps://raw.githubusercontent.com/NousResearch/hermes-agent/main/hermes_cli/local_runtime/catalog.jsonzfloat | NoneÚ_last_refresh_attemptc               ó    € V ^8„  d   QhRRRR/# )r   Údzdict | Noner    rh   r!   )r"   s   "r#   r$   r$   =  s   € ÷ Mñ M�;ð MÐ#3ñ Mr&   c           
     óÀ   € V '       g   R # \        V R,          \        V R,          4      V P                  R4      V P                  R4      V P                  RR4      R7      # )Nr   r   r   r   r   r   )r   r   r   r   r   )r   r   rÍ   )rö   s   &r#   Ú_asset_fromrø   =  sK   € ßÙÜ˜!˜F�)´°A°lµOÓ0DÈAÏEÉEÐRYËNØŸ%™% ›-°!·%±%¸
ÀFÓ2KôMð Mr&   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rr   rs   rf   rt   rw   ru   rg   rx   rl   rk   rm   rn   c               ó    € V ^8„  d   QhRRRR/# )r   Údocrq   r    útuple[CatalogEntry, ...]r!   )r"   s   "r#   r$   r$   Q  s   € ÷ ñ �tð Ð 8ñ r&   c                ó  € \        V P                  R^ 4      4      \        8w  d'   \        RV P                  R4      : R\         R24      h. pV R,           EF  p\        ;QJ d    . R VR,           4       F  NK  	  5M! R VR,           4       4      p\
        P                  4        UUUu/ uF+  w  pw  rVYE! Vf	   W$,          MVP                  WF4      4      bK-  	  ppppVP                  \        RRVR,          R	VR	,          R
VR
,          RVR,          RVR\        VP                  R4      4      R\        VP                  R4      4      R\        VP                  R4      4      /VB 4       EK  	  \	        V4      # u upppi )z´Parse a catalog document. Unknown fields are ignored (newer catalogs stay readable by older
apps); a major schema bump is the signal that they wouldn't be, and the caller skips it.Úschema_versionzcatalog schema z (this build reads Ú)Úmodelsc              3  ó   "  € T F„  p\        VR ,          \        VP                  R4      4      \        ;QJ d    . R VR,           4       F  NK  	  5M! R VR,           4       4      \	        VP                  R^ 4      4      R7      x € K†  	  R# 5i)r8   r<   c              3  ó8   "  € T F  p\        V4      x € K  	  R # 5ir(   )rø   rJ   s   & r#   rM   Ú*_load_catalog.<locals>.<genexpr>.<genexpr>Z  s   é € Ð1UÉ*ÀQ´+¸a·.°.Ë*ùrO   r:   r=   )r8   r<   r:   r=   N)r7   r;   rÍ   r9   r   )rK   Úvs   & r#   rM   Ú _load_catalog.<locals>.<genexpr>Y  st   é € ð 1ñ #0˜Qô &¨A¨g­JÄ$ÀqÇuÁuÈ[ÓGYÓBZß,1¬EÑ1UÈ!ÈGÎ*Ó1U¯E©EÑ1UÈ!ÈGÎ*Ó1UÓ,UÜ14°Q·U±U¸<ÈÓ5KÓ1L÷Nñ Nó #0ùs   ‚BBr[   rX   rY   rZ   r   ri   rj   ro   r!   )
r   rÍ   Ú_SCHEMA_VERSIONÚ
ValueErrorr9   Ú_SCALAR_FIELDSÚitemsÚappendrW   rø   )rú   rØ   Úmr[   ÚkÚcoerceÚdefaultÚscalarss   &       r#   Ú_load_catalogr  Q  sœ  € ô ˆ3�7‰7Ð# QÓ'Ó(¬OÔ;Ü˜?¨3¯7©7Ð3CÓ+DÑ*Gð H.Ü.=Ð->¸aðAó Bð 	Bà€GØ��]‰]ˆß”5ñ 1ð #$ J¦-ó1—5‘5ñ 1ð #$ J¦-ó1ó 1ˆô
 0>×/CÑ/CÔ/EõGÙ/EÑ+�qÑ+˜6ð �f W¢_˜QžT¸!¿%¹%ÀÓ:KÓLÒLÙ/Eð 	ò Gà�‰”|ñ Ø��wðØ%& ~Õ%6ðà˜-Õ(ðà/0°­yðàCKðô ˜qŸu™u X›Ó/ðô 8CÀ1Ç5Á5ÈÃ>Ó7Rðô ! §¡ zÓ!2Ó3ð	ð
 ñ÷ 	ñ ô �‹>ÐùôGs   Â,1E?
c               ó   € V ^8„  d   QhRR/# )r   r    rû   r!   )r"   s   "r#   r$   r$   h  s   € ÷ *ñ *Ð3ñ *r&   c                 óš   € ^ RI Hp  V ! R4      P                  R4      P                  RR7      p\	        \
        P                  ! V4      4      # )rA   )r:   zhermes_cli.local_runtimezcatalog.jsonz	utf-8-sig)Úencoding)Úimportlib.resourcesr:   ÚjoinpathÚ	read_textr  ÚjsonÚloads)r:   Úraws     r#   Ú_packaged_catalogr  h  s=   € Ý)á
Ð*Ó
+×
4Ñ
4°^Ó
D×
NÑ
NÐXcÐ
NÓ
d€CÜœŸš C›Ó)Ð)r&   rû   rè   c               ó    € V ^8„  d   QhRRRR/# )r   Úforcer;   r    r!   )r"   s   "r#   r$   r$   r  s   € ÷ ñ ˜4ð ¨Dñ r&   c                ó¸  € \         P                  ! 4       p\        ;_uu_ 4        V '       g*   \        e"   V\        ,
          \        8  d    RRR4       R# VsRRR4        \
        P                  P                  \        RR/R7      p\
        P                  P                  V^
R7      ;_uu_ 4       p\        \        P                  ! V4      4      pRRR4       X\         8w  d    \        P#                  R\%        T4      4       TsR	#   + '       g   i     L·; i  + '       g   i     LQ; i  \         d"   p\        P                  RT4        Rp?R# Rp?ii ; i)
züFetch the current catalog from the repo and swap it in memory. Best-effort: any failure
(offline, GitHub down, unreadable schema) leaves the running catalog untouched and retries
after the TTL. Returns True when a fetched document replaced the catalog.NFz
User-Agentzhermes-local-runtime)Úheaders)Útimeoutzcatalog refresh skipped: %sz'catalog refreshed from repo (%d models)T)ÚtimeÚ	monotonicÚ_refresh_lockrô   Ú_REFRESH_TTL_SÚurllibÚrequestÚRequestÚ_CATALOG_URLÚurlopenr  r  ÚloadÚ	ExceptionÚloggerÚdebugrè   ÚinfoÚlen)r  ÚnowÚreqÚrÚfetchedÚexcs   &     r#   Úrefresh_catalogr3  r  sñ   € ô �.Š.Ó
€Cß	ŽßÔ.Ò:¸sÔEZÕ?ZÔ]kÔ?kØ÷ 
‰ð !$Ð÷ 
ðÜ�n‰n×$Ñ$¤\¸LÐJ`Ð;aÐ$ÓbˆÜ�^‰^×#Ñ# C°Ð#×4Ô4¸Ü#¤D§I¢I¨a£LÓ1ˆG÷ 5ð
 ”'ÔÜ�‰Ð=¼sÀ7»|ÔLØ€GÙ÷ 
�ú÷ 5×4ûäô Ü�‰Ð2°CÔ8ÝûðúsH   ¤(DÁDÁ!AD- Â1 DÃD- ÄD	ÄD*	Ä%D- Ä*D- Ä-EÄ8EÅEc               ó   € V ^8„  d   QhRR/# )r   r    ÚNoner!   )r"   s   "r#   r$   r$   Š  s   € ÷ Zñ Z˜dñ Zr&   c                 ó¾   € \         p V e(   \        P                  ! 4       V ,
          \        8  d   R# \        P
                  ! \        RRR7      P                  4        R# )u�   TTL-gated background refresh; returns immediately. The current request serves the catalog
it already has â€” the refresh lands for the next one.NTzcatalog-refresh)ÚtargetÚdaemonr)   )rô   r  r   r"  Ú	threadingÚThreadr3  Ústart)Úlasts    r#   Úrefresh_catalog_soonr=  Š  sA   € ô !€DØÒœDŸNšNÓ,¨tÕ3´nÔDÙÜ×ÒœO°DÐ?PÔQ×WÑWÖYr&   c               ó   € V ^8„  d   QhRR/# )r   r    zdict[str, CatalogEntry]r!   )r"   s   "r#   r$   r$   “  s   € ÷ 2ñ 2Ð.ñ 2r&   c                 óL   € \          U u/ uF  q P                  V bK  	  up # u up i r(   )rè   rX   )r²   s    r#   Úcatalog_by_idr@  “  s    € Ý)0Ó1© �H‰H�eŠO©Ñ1Ð1ùÒ1s   ‰!c               ó    € V ^8„  d   QhRRRR/# )r   rC   r   r    z(tuple[CatalogEntry, QuantVariant] | Noner!   )r"   s   "r#   r$   r$   —  s   € ÷ ñ  3ð Ð+Sñ r&   c                óv   € \          F.  pVP                   F  pVP                  V 8X  g   K  W3u u # 	  K0  	  R# )z7Locate the entry + variant that owns a staged model id.N)rè   r[   rC   )rC   r²   r‡   s   &  r#   Úfind_entry_for_modelrC  —  s5   € çˆØ—~”~ˆGØ×Ñ 8Ö+Ø�~Ô%ó &ñ ñ r&   c               ó    € V ^8„  d   QhRRRR/# )r   rC   r   r    zCatalogEntry | Noner!   )r"   s   "r#   r$   r$      s   € ÷ /ñ /˜cð /Ð&9ñ /r&   c                ó6   € \        V 4      pVe
   V^ ,          # R # r(   )rC  )rC   Úhits   & r#   Úentry_for_modelrG     s   € Ü
˜xÓ
(€CØ’_ˆ3ˆq�6Ð.¨$Ð.r&   )Úwin32rÂ   rÀ   r¼   z	UD-Q4_K_Mr   )rH  rÂ   rÀ   r(   i`T  rç   )FÚ__conditional_annotations__r2   Ú
__future__r   r  Úloggingr9  r  Úurllib.requestr#  Údataclassesr   r   Úpathlibr   Ú'hermes_cli.local_runtime.context_policyr   r   r   r	   r
   Ú"hermes_cli.local_runtime.estimatorr   r   r   r   r   Úhermes_cli.local_runtime.ggufr   Úhermes_platform.host.productsr   Ú	getLoggerr.   r*  r   r7   rW   r®   r»   rÐ   rÏ   rÎ   rê   rÌ   ré   rÈ   rÖ   ró   r&  r  r"  ÚLockr!  rô   r3   rø   r   r;   rq   r   rv   r  r  r  rè   r3  r=  r@  rC  rG  )rI  s   @r#   Ú<module>rU     sÒ  øðôõ #ã Û Û Û Û ß (Ý !÷Kõ K÷Hõ Hå <Ý >à	×	Ò	˜8Ó	$€ñ �$Ô÷;ð ;ó ð;ñ& �$Ô÷1ð 1ó ð1ñ6 �$Ô÷[-ð [-ó ð[-ñ| �$Ô÷ð ó ðõFð4 "Ð ØÐ ØÐ ð
 Ð ð$Ø%)ðÐ ð .¨}ðÐ õ
	:ð
-Ø+0ð
-ØAG÷
-ñ!ØY_÷!ð !ðX>€à€Ø€Ø—’Ó €ð '+Ð �|Ó *õMð	Ø�C˜�;ð	Ø -°°T¨{ð	à˜˜d˜ð	à%4°s¸D°kð	ð �3˜�(ð	ð )¨3°¨(ð	ð 
ˆD�%ˆ=ð		ð   $¨ ð		ð 1BÀCÈÀ8ð		ð
 ��Qˆxð	ð
 $ d¨B Zð	ð
 2>ÀÀR¸yð	ð ��Qˆxð	ð +¨U°C¨Lð	ð ;IÈ3ÐPRÈ)ð	ð �$˜�ð	ð  1°3¸Ð2Gð	ð JWÐY\Ð^_ÐX`Ø˜˜b˜	ñ	€õõ.*ñ %6Ó$7€Ð	!Ó 7÷õ0Zõ2õ÷/r&   