+
    „WÝjñ  ã                  óx  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
Ht ^RIHt ]P                  ! ]4      tRt]R3^],          R3^],          R	3^Z],          R
33tR R ltR R ltRR/R R lltR R ltRRRR/t]P2                  RR 33]P4                  R]33]P6                  RR 33]P8                  RR 33]P:                  RR 33]P<                  R R! 3RR" 3RR# 33]P>                  R$]! R$4      3R%]! R&4      3R']! R(R)7      3R*]! R+4      3R,]! R-R)7      3R.]! R/4      33]P@                  R*R0 3R,R1 33]PB                  ]";QJ d$    . R2 ]#! ]PH                  4       4       F  NK  	  5M! R2 ]#! ]PH                  4       4       4      /	t%R3]&R4&   R5 R6 lt'R7 R8 lt(R9 R: lt)R;R/R< R= llt*R# )>a­  v5 signals: which disabled built-in tools models reach for, and when an install first adopts a feature.

``hermes.tool_unavailable.count`` is counted where the agent validates the calls a model emitted: a
name Hermes ships (``toolsets.BUILTIN_TOOL_NAMES``) that this session did not enable. Any other name
stays the v4 ``unknown_tool`` quality issue only, so a plugin, MCP or hallucinated name never leaves.

``hermes.feature_adoption.count`` rides on counters the subscriber already records: the first counter
row that proves a feature was really used latches it once per install, with the owning profile's age.
Features no counter can see report through :func:`record_feature_used`.
)ÚannotationsN)ÚPath)ÚAnyÚCallable)Úshared_metrics_contracti€Q Úsame_dayÚ1d_to_7dÚ	7d_to_30dÚ
30d_to_90dc          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
é   Úagentr   ÚnameÚissueÚstrÚrouteúdict[str, str]Úreturnzdict[str, str] | None© )Úformats   "ÚcC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\observability\shared_metrics_signals.pyÚ__annotate__r       s0   € ÷ (ñ ( 3ð (¨cð (¸#ð (Ànð (ÐYnñ (ó    c                ó  € VR8w  g,   \        V\        4      '       d   V\        P                  9  d   R# \	        V R^ 4      '       g   \	        V RR4      R8X  d   R# ^ RIHp ^ RIHp V! 4       '       g   W! V 4      9   d   R# / VCRV/C# )	a~  Fields for a call to a shipped built-in the session has disabled; None for anything else.

Background reviews, delegated children and cron jobs run with toolsets Hermes (or the parent
model) narrowed on purpose, so their misses say nothing about what users should get by default.
A built-in deferred behind ``tool_search`` is enabled (reachable through ``tool_call``), not missing.
Úunknown_toolNÚ_delegate_depthÚplatformÚcron)Ú_tool_search_scoped_names)Úis_background_reviewÚ	tool_name)	Ú
isinstancer   ÚcontractÚBUILTIN_TOOL_NAMESÚgetattrÚagent.tool_executorr   Útools.skill_provenancer   )r   r   r   r   r   r   s   &&&&  r   Útool_unavailable_fieldsr'       s}   € ð �Ô¤j°´s×&;Ò&;¸tÌ8×KfÑKfÔ?fÙÜˆuÐ'¨×+Ò+¬w°u¸jÈ$Ó/OÐSYÔ/YÙÝ=Ý;á×Ò Ð)BÀ5Ó)IÔ!IÙØ'ˆeÐ'�[ $Ñ'Ð'r   c               ó    € V ^8„  d   QhRRRR/# ©r   Údr   r   Úboolr   )r   s   "r   r   r   5   s   € ÷ )ñ )�ð ) 4ñ )r   c                ó*   € V P                  R 4      R8H  # )ÚoutcomeÚsuccess©Úget©r*   s   &r   Ú_successr2   5   s   € Ø�5‰5�Ó˜yÑ(Ð(r   ÚprefixÚ c               ó$   € V ^8„  d   QhRRRRRR/# )r   Únamesr   r3   r   z Callable[[dict[str, str]], bool]r   )r   s   "r   r   r   9   s"   € ÷ ñ �#ð ˜sð Ð,Lñ r   c                ó   a a€ R  VV 3R llpV# )c               ó    € V ^8„  d   QhRRRR/# r)   r   )r   s   "r   r   Ú_tool.<locals>.__annotate__:   s   € ÷ [ñ [�ð [ 4ñ [r   c                óÂ   <€ V P                  R 4      ;'       g    Rp\        V 4      ;'       d2    VS9   ;'       g%    \        S4      ;'       d    VP                  S4      # )r    r4   )r0   r2   r+   Ú
startswith)r*   Útoolr6   r3   s   & €€r   ÚusedÚ_tool.<locals>.used:   sM   ø€ Ø�u‰u�[Ó!×'Ð' RˆÜ˜‹{×ZÐZ ¨¡× YÐ Y´°f³×1YÐ1YÀ$Ç/Á/ÐRXÓBYÐZr   r   )r3   r6   r=   s   dj r   Ú_toolr?   9   s   ù€ ÷[ñ [ð €Kr   c               ó    € V ^8„  d   QhRRRR/# r)   r   )r   s   "r   r   r   A   s   € ÷ Sñ S˜.ð S¨Tñ Sr   c                ób   € V P                  R4      R8H  ;'       d    V P                  R4      R8g  # )z[A skill created at the user's request (``agent_created`` is Hermes' own background review).ÚactionÚcreatedÚ
provenanceÚagent_createdr/   r1   s   &r   Úuser_created_skillrF   A   s+   € à�5‰5�‹?˜iÑ'×RÐR¨A¯E©E°,Ó,?À?Ñ,RÐRr   ÚdesktopÚtuiÚmemoryc                óP   € \        V 4      ;'       d    V P                  R 4      R8H  # )ÚoriginÚ
foreground©r2   r0   r1   s   &r   Ú<lambda>rN   J   s!   € ´X¸a³[×5dÐ5dÀQÇUÁUÈ8Ã_ÐXdÑEdÐ5dr   Úskills_createdÚ
delegationc                ó   € R # )Tr   r1   s   &r   rN   rN   L   s   € ¹dr   r   c                ó*   € V P                  R 4      R9   # )r-   >   Úfailedr.   r/   r1   s   &r   rN   rN   M   s   € °!·%±%¸	Ó2BÐF[Ò2[r   Úcuratorc                óP   € \        V 4      ;'       d    V P                  R 4      R8H  # )ÚtriggerÚmanualrM   r1   s   &r   rN   rN   N   s"   € ¼À»×8dÐ8dÈÏÉÈiÓHXÐ\dÑHdÐ8dr   Úgateway_platformc                ó*   € V P                  R 4      R9  # )r   >   NÚnoner/   r1   s   &r   rN   rN   P   s   €  q§u¡u¨ZÓ'8ÀÒ'Nr   c                ó*   € V P                  R 4      R8H  # )Úexecution_surfacerG   r/   r1   s   &r   rN   rN   Q   s   € ˜aŸe™eÐ$7Ó8¸IÒEr   c                ó*   € V P                  R 4      R8H  # )r\   rH   r/   r1   s   &r   rN   rN   R   s   € ˜!Ÿ%™%Ð 3Ó4¸Ò=r   ÚmcpÚpluginsÚpluginÚbrowserÚbrowser_)r3   ÚvoiceÚtext_to_speechÚkanbanÚkanban_ÚprojectsÚdesktop_projectc                ó*   € V P                  R 4      R8H  # )Úcommandrc   r/   r1   s   &r   rN   rN   ]   s   € ˜AŸE™E )Ó,°Ò7r   c                ó*   € V P                  R 4      R8H  # )rj   re   r/   r1   s   &r   rN   rN   ^   s   € ˜QŸU™U 9Ó-°Ò9r   c              #  ó0   "  € T F  qV3R  l3x € K  	  R# 5i)c                ó*   € V P                  R 4      V8H  # )Úfeaturer/   )r*   Úfs   &&r   rN   Ú<genexpr>.<lambda>`   s   € ÀQÇUÁUÈ9ÓEUÐYZÒEZr   Nr   )Ú.0rn   s   & r   Ú	<genexpr>rr   `   s$   é € ð  &Fñ  lEÐ`g¸GÓ0ZÕ&[ó  lEùs   ‚zCdict[str, tuple[tuple[str, Callable[[dict[str, str]], bool]], ...]]Ú_FEATURE_RULESc               ó$   € V ^8„  d   QhRRRRRR/# )r   Úmetric_namer   Ú
dimensionsr   r   ztuple[str, ...]r   )r   s   "r   r   r   d   s&   € ÷ añ a˜cð a¨~ð aÀ/ñ ar   c                ó¸   a€ \         ;QJ d+    . V3R l\        P                  V R4       4       F  NK  	  5# ! V3R l\        P                  V R4       4       4      # )z]Features a recorded counter proves were used (each is latched once per install by the store).c              3  óL   <"  € T F  w  rV! S4      '       g   K  Vx € K  	  R # 5i)Nr   )rq   r   r=   rv   s   &  €r   rr   Úfeatures_for.<locals>.<genexpr>f   s   øé € Ð`Ñ(K™*˜$ÉtÐT^×O_—’Ó(Kùs   ƒ$š
$r   )Útuplers   r0   )ru   rv   s   &fr   Úfeatures_forr{   d   s?   ø€ çŒ5Ô`¬×(:Ñ(:¸;ÈÔ(KÓ`�5Ð`ˆ5Ô`¬×(:Ñ(:¸;ÈÔ(KÓ`Ó`Ð`r   c               ó    € V ^8„  d   QhRRRR/# )r   Úhomer   r   r   r   )r   s   "r   r   r   i   s   € ÷ 	jñ 	j Dð 	j¨Sñ 	jr   c                ó(  € ^RI Hp  V! V 4      pTe1   \        P                  ! \        P                  ! 4       T,
          4      MRpTf   R# \        P                  ! T\        R4      #   \        P                  \        \
        \        3 d     R# i ; i)z`The owning profile's age (its first session), bucketed; ``unknown`` when state.db is unreadable.)Ú_first_session_started_atÚunknownNÚgte_90d)Úshared_metrics_snapshotr   Úsqlite3ÚErrorÚOSErrorÚ	TypeErrorÚ
ValueErrorr"   Ú_non_negative_numberÚtimeÚ_bucketÚ_DAYS_SINCE_INSTALL_THRESHOLDS)r}   r   ÚfirstÚages   &   r   Údays_since_install_bucketrŽ   i   s|   € åBðÙ)¨$Ó/ˆð AFÒ@QŒ(×
'Ò
'¬¯	ª	«°eÕ(;Ô
<ÐW[€CØšˆ9Ði¬×)9Ò)9¸#Ô?]Ð_hÓ)iÐiøô �M‰Mœ7¤I¬zÐ:ô Úðús   ˆA( Á(%BÂBc               ó    € V ^8„  d   QhRRRR/# )r   Úeventr   r   z!tuple[str, dict[str, str]] | Noner   )r   s   "r   r   r   u   s   € ÷ 	Dñ 	D ð 	DÐ(Iñ 	Dr   c                óŽ  € \         P                  ! V 3/ \         P                  B '       g   R# \         P                  ! V R4      \         P                  8w  d   R# \        V RR4      p\        V\        4      '       d.   \        V4      R08w  g   VR,          \         P                  9  d   R# \         P                  RVR,          /3# )zVA first-use fact for a feature no counter sees (never stored as a counter row itself).Nr   Údatarn   )
r"   Ú_valid_shapeÚ_MARK_SHAPEÚ_event_textÚFEATURE_USED_MARKr$   r!   ÚdictÚsetÚFEATURES)r�   r’   s   & r   Úfeature_used_counterrš   u   s–   € ä× Ò  Ñ?¬(×*>Ñ*>×?Ð?ÙÜ×Ò˜E 6Ó*¬h×.HÑ.HÔHÙÜ�5˜& $Ó'€DÜ�dœD×!Ò!¤S¨£Y°9°+Ô%=ÀÀiÅÔX`×XiÑXiÔAiÙÜ×%Ñ%¨	°4¸	µ?Ð'CÐCÐCr   Úhermes_homec               ó$   € V ^8„  d   QhRRRRRR/# )r   rn   r   r›   r   r   ÚNoner   )r   s   "r   r   r   �   s!   € ÷ .ñ . ð .°cð .ÀTñ .r   c               óx  € Rp V'       d   ^ RI Hp V! \        V4      4      p^RIHpHp V \        P                  9   d'   V! 4       '       d   V! \        P                  RV /4       Te   ^ RI Hp T! T4       R# R#   \         d    \        P                  RRR7        L:i ; i  Te   ^ RI Hp T! T4       i i ; i)	z�Report one real use of ``feature`` (only the first per install becomes a row). Never raises.
``hermes_home`` binds the owning profile for callers outside it.N)Úset_hermes_home_override)ÚenabledÚrecord_process_markrn   z'Shared-metrics feature use not recordedT)Úexc_info)Úreset_hermes_home_override)Úhermes_constantsrŸ   r   Úrelay_shared_metricsr    r¡   r"   r™   r–   Ú	ExceptionÚloggerÚdebugr£   )rn   r›   ÚtokenrŸ   r    r¡   r£   s   &$     r   Úrecord_feature_usedrª   �   s¤   € ð €Eð.ßÝAá,¬S°Ó-=Ó>ˆEßFà”h×'Ñ'Ô'©G¯IªIÙ¤× :Ñ :¸YÈÐ<PÔQð ÒÝCá& uÖ-ñ øô ô OÜ�‰Ð>ÈˆÖNðOûð ÒÝCá& uÕ-ð ús*   „AA< ÁA< Á<"B!ÂB$ Â B!Â!B$ Â$B9)+Ú__conditional_annotations__Ú__doc__Ú
__future__r   Úloggingrƒ   r‰   Úpathlibr   Útypingr   r   r4   r   r"   Ú	getLoggerÚ__name__r§   Ú_DAY_Sr‹   r'   r2   r?   rF   Ú_TASK_SURFACEÚMEMORY_OP_METRICÚSKILL_LIFECYCLE_METRICÚDELEGATION_RUN_METRICÚCRON_RUN_METRICÚCURATOR_RUN_METRICÚTASK_STARTED_METRICÚTOOL_USAGE_METRICÚSLASH_COMMAND_METRICr–   rz   Úsortedr™   rs   Ú__annotations__r{   rŽ   rš   rª   )r«   s   @r   Ú<module>r¿      sA  øðô	õ #ã Û Û Ý ß  å 1à	×	Ò	˜8Ó	$€à	€àˆZÐ˜1˜v�: zÐ2°R¸&µ[À+Ð4NÐQSÐV\ÕQ\Ð^jÐPkð"Ð õ(õ*)ð R÷ õSð
 ˜I u¨eÐ4€ð ×Ñ Ñ+dÐ eÐgØ×#Ñ#Ð'7Ð9KÐ&LÐ%NØ×"Ñ" l±NÐ%CÐ$EØ×Ñ Ñ([Ð\Ð^Ø×Ñ 9Ñ.dÐ"eÐ!gØ× Ñ Ø	ÑNÐOØ	ÑEÐFØ	Ñ=Ð>ð#ð
 ×ÑØ	‘�e“ÐØ	‘E˜(“OÐ$Ø	‘E Ô,Ð-Ø	‘%Ð(Ó)Ð*Ø	‘5 	Ô*Ð+Ø	‘UÐ,Ó-Ð.ð!ð ×!Ñ!Ø	Ñ7Ð8Ø	Ñ9Ð:ð$ð ×Ñ§ ñ  &FÑkqÐrz÷  sDñ  sDô  lEó  &F§¡ñ  &FÑkqÐrz÷  sDñ  sDô  lEó  &Fó  !Fð/W€ÐSó õ6aõ
	jõ	Dð.¸D÷ .ñ .r   