+
    lHàj  ã                   óx  € R t ^ RIt^RIHtHt ]P
                  ! ]4      t]! 4       t]P                  t	]P                  t]	! R4      ]R R l4       4       tR R lt]	! R4      ]R	 R
 l4       4       t]	! R4      ]R R l4       4       t]	! R4      ]R R l4       4       t]	! R4      ]R R l4       4       tR R ltR# )a^  Nous free-tier JSON-RPC handlers. ``free_tier.status`` answers from the
auth store with zero network and zero side effects; ``free_tier.provision`` retries a welcome-trial claim
that failed (desktop-only entry); ``free_tier.ack_notice``
persists the one-time notice flag on the free-tier identity itself, so it dies with that identity.
``free_tier.challenge_result`` records a presentation hint for the pending attempt; the
backend still exchanges with the portal to determine whether the credential is cleared.
Bodies are rebound onto server.py's globals (method_ctx.bind_module) and reference them bare.
N)ÚHandlerRegistryÚbind_modulezfree_tier.statusc                ó0   € V ^8„  d   QhR\         R\         /# ©é   ÚparamsÚreturn©Údict)Úformats   "ÚB/home/ubuntu/.hermes/hermes-agent/tui_gateway/methods_free_tier.pyÚ__annotate__r      s   € ÷ $'ñ $'”4ð $'œDñ $'ó    c                ó²  €  ^ RI Hp VP                  4       pVP                  4       pT;'       g    \	        4       pRTRTRTR\        T;'       d    VP                  4       4      RVP                  RVP                  /p^ RI H	p R	VP                  3R
VP                  33 F   w  r‰VP                  V	4      ;p
f   K  W¦V&   K"  	  V'       d2   V'       g*   TP                  VP                  4       ;'       g    / 4       ^ RI Hp VP!                  4       pV'       d   WÆR&   \#        W4      #   \$         d!   p\'        T R\)        T4      4      u Rp?# Rp?ii ; i)a  ``{has_guest, enabled, available, notice_pending, model, label}`` for the focused profile.
``available``: a guest that carries inference here (the welcome trial, on the desktop's local
backend). ``enabled``: available, or the trial can still be claimed on this machine. Whether
inference actually runs on it is a ROUTE question answered by ``setup.runtime_check.free_tier``.
``notice_pending`` is true until ``free_tier.ack_notice`` ran for this identity.
``nudge_due_in``: seconds until the sign-in offer after a finished task is due (install-wide,
``hermes_cli.free_tier_offer``); absent when none is pending. ``connector_nudge_due_in``: the
same for a guest without the trial that has connected an app.

A pure read: an identity is never created as a side effect of polling this (NS-845 Q1.2).©Ú	anon_authÚ	has_guestÚenabledÚ	availableÚnotice_pendingÚmodelÚlabel©Úfree_tier_offerÚnudge_due_inÚconnector_nudge_due_inN)Úanon_challengeÚ	challengeiâ  )Ú
hermes_clir   r   Úfree_inference_activeÚ_trial_claimableÚboolÚguest_notice_pendingÚGUEST_MODELÚFREE_TIER_LABELr   ÚTRIALÚ	CONNECTORÚoffer_due_inÚupdateÚlast_mint_failurer   Úpending_challengeÚ_okÚ	ExceptionÚ_errÚstr)Úridr   r   r   r   r   Úpayloadr   ÚkeyÚkindÚdue_inr   r   Úes   &&            r   Ú_r5      s:  € ð'Ý(Ø×'Ñ'Ó)ˆ	Ø×3Ñ3Ó5ˆ	Ø×1Ð1Ô/Ó1ˆà˜ I¨w¸ÀYØœd 9×#QÐ#Q°×1OÑ1OÓ1QÓRØ�Y×*Ñ*¨G°Y×5NÑ5NðPˆõ 	/Ø)¨?×+@Ñ+@ÐAÐD\Ð^m×^wÑ^wÐCxÓy‰IˆCØ)×6Ñ6°tÓ<Ð<�ÔIØ%˜“ñ z÷ Ÿ9ð �N‰N˜9×6Ñ6Ó8×>Ð>¸BÔ?õ 	.Ø"×4Ñ4Ó6ˆ	ßØ#,�KÑ Ü�3Ó Ð øÜô 'Ü�C˜œs 1›vÓ&Õ&ûð'úsG   ‚.D+ ±D+ ÁA'D+ Â=D+ ÃD+ Ã!D+ Ã7$D+ ÄD+ Ä+EÄ6EÅEÅEc                ó$   € V ^8„  d   QhR\         /# )r   r   )r!   )r   s   "r   r   r   =   s   € ÷ #ñ #œ$ñ #r   c                  ó    € ^ RI Hp  V ! 4       RJ # )é    ©Úclaim_blockerN)Úhermes_cli.welcome_trialr:   r9   s    r   r    r    =   s   € Ý6Ù‹?˜dÐ"Ð"r   zfree_tier.provisionc                ó0   € V ^8„  d   QhR\         R\         /# r   r	   )r   s   "r   r   r   D   s   € ÷ 'ñ '”4ð 'œDñ 'r   c                ó`  €  ^ RI HpHpHp ^ RIHp \        4       '       d;    VP                  RR7       VP                  R4      '       g   VP                  4        VP                  4       pVP                  4       ;'       g    \        4       pRVR	V/p	V'       d2   V'       g*   T	P                  VP                  4       ;'       g    / 4       \!        W	4      #   T d!   p\        P                  RT4        Rp?LÅRp?ii ; i  \"         d!   p
\%        T R
\'        T
4      4      u Rp
?
# Rp
?
ii ; i)a  The user's retry of a welcome-trial claim that failed: claims it when nothing blocks it here
(blocking, short timeout; the one attempt allowed inside the mint memo's cooldown). ``{has_guest,
enabled}``, plus ``{error, error_code, retryable, retry_after}`` when the portal refused.)r   Úfree_tier_bootstrapÚwelcome_trial)Ú	AuthErrorT)Úforcezwelcome trial claim failed: %sNÚprofiler   r   iä  )r   r   r>   r?   Úhermes_cli.auth_constantsr@   r    Úclaim_desktop_free_tierÚloggerÚinfoÚgetÚrefresh_recordr   r   r(   r)   r+   r,   r-   r.   )r/   r   r   r>   r?   r@   Úexcr   r   r0   r4   s   &&         r   r5   r5   B   sú   € ð'ßLÑLÝ7Ü×ÒðCØ×5Ñ5¸DÐ5ÔAð —:‘:˜i×(Ò(à#×2Ñ2Ô4Ø×'Ñ'Ó)ˆ	Ø×1Ñ1Ó3×IÐIÔ7GÓ7IˆØ 	¨9°gÐ>ˆßŸ9Ø�N‰N˜9×6Ñ6Ó8×>Ð>¸BÔ?Ü�3Ó Ð øð ô CÜ—‘Ð<¸c×BÑBûðCûô ô 'Ü�C˜œs 1›vÓ&Õ&ûð'úsc   ‚ D £C µD Á6D ÂD ÂD Â$!D ÃD ÃC?ÃC:Ã5D Ã:C?Ã?D ÄD-ÄD(Ä"D-Ä(D-zfree_tier.ack_noticec                ó0   € V ^8„  d   QhR\         R\         /# r   r	   )r   s   "r   r   r   _   s   € ÷ 'ñ '”4ð 'œDñ 'r   c                ó¶   €  ^ RI Hp \        V R\        VP	                  4       4      /4      #   \
         d!   p\        T R\        T4      4      u Rp?# Rp?ii ; i)zœMark the availability notice shown on the free-tier identity. ``acked`` is false when there is
no free-tier identity to mark (nothing to show again either).r   Úackediã  N)r   r   r+   r!   Úmark_guest_notice_shownr,   r-   r.   )r/   r   r   r4   s   &&  r   r5   r5   ]   sM   € ð
'Ý(Ü�3˜¤$ y×'HÑ'HÓ'JÓ"KÐLÓMÐMøÜô 'Ü�C˜œs 1›vÓ&Õ&ûð'ús   ‚*- ­A¸AÁAÁAzfree_tier.claim_nudgec                ó0   € V ^8„  d   QhR\         R\         /# r   r	   )r   s   "r   r   r   k   s   € ÷ 	'ñ 	'”4ð 	'œDñ 	'r   c                ó,  €  ^ RI Hp \        T R\        TP	                  VP                  R4      ;'       g    VP                  4      4      /4      #   \         d8   p\        P                  RRR7       \        T R\        T4      4      u Rp?# Rp?ii ; i)	zÇClaim the due sign-in offer of ``kind`` (``trial`` or ``connector``). Claim before showing,
so two windows never both show it: ``claimed`` is true for exactly one caller each time an offer
comes due.r   Úclaimedr2   zfree_tier.claim_nudge failedT)Úexc_infoiå  N)r   r   r+   r!   Úclaim_offerrG   r%   r,   rE   Úwarningr-   r.   )r/   r   r   r4   s   &&  r   r5   r5   i   sy   € ð'Ý.Ü�3˜¤D¨×)DÑ)DÀVÇZÁZÐPVÓEW×EpÐEpÐ[j×[pÑ[pÓ)qÓ$rÐsÓtÐtøÜô 'Ü�‰Ð5ÀˆÔEÜ�C˜œs 1›vÓ&Õ&ûð'ús"   ‚4A ·A ÁBÁ,BÂBÂBzfree_tier.challenge_resultc                ó0   € V ^8„  d   QhR\         R\         /# r   r	   )r   s   "r   r   r   y   s   € ÷ sñ s”4ð sœDñ sr   c                 óv   € ^ RI Hp \        V RV! VR,          VP                  R^ 4      VR,          4      /4      # )r8   )Úrecord_host_outcomeÚacceptedÚurlÚattemptÚoutcome)Úhermes_cli.anon_challengerV   r+   rG   )r/   r   rV   s   && r   r5   r5   w   s:   € õ >Üˆs�ZÑ!4°V¸Eµ]ÀFÇJÁJÈyÐZ[ÓD\Ð^dÐenÕ^oÓ!pÐqÓrÐrr   c                ó   € V ^8„  d   QhRR/# )r   r   N© )r   s   "r   r   r   ~   s   € ÷ 0ñ 0˜ñ 0r   c                 ó2   € \        \        4       V RR7       R# )r5   )ÚskipN)r5   )r   Úglobals)Úservers   &r   Úregisterrb   ~   s   € Ü”“	˜6¨×/r   )Ú__doc__ÚloggingÚ
method_ctxr   r   Ú	getLoggerÚ__name__rE   Ú	_registryÚmethodÚprofile_scopedÚ_profile_scopedr5   r    rb   r]   r   r   Ú<module>rl      s÷   ðñó ç 4à	×	Ò	˜8Ó	$€ÙÓ€	Ø	×	Ñ	€Ø×*Ñ*€ñ ÐÓØô$'ó ó ð$'õN#ñ
 ÐÓØô'ó ó ð'ñ2 ÐÓØô'ó ó  ð'ñ ÐÓ Øô	'ó ó !ð	'ñ Ð$Ó%Øôsó ó &ðs÷
0r   