+
    jR                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt ^ RIHt ^ RIHtHtHt ^ RIHtHt Rt0 R<mtR=t0 R>mt  ! R	 R
]!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 R lt'R R lt(RR/R R l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t0R* R+ lt1R, R- lt2R. R/ lt3 ! R0 R1]Ph                  Pj                  4      t6R2 R3 lt7R4R5/R6 R7 llt8R4R5/R8 R9 llt9RR/R: R; llt:R# )?    )annotationsN)	dataclass)UTCdatetime)Path)AccountAuthorityBindingAuthorityMode)AccountSnapshotHealthStatuszauthority_endpoints.jsonc                      ] tR t^5tRtR# )AuthorityConfigurationError N)__name__
__module____qualname____firstlineno____static_attributes__r       J/home/user/overdeck-private-tests/subrouter-s5-systray/authority_client.pyr   r   5   s    r   r   T)frozenc                  ,    ] tR t^9t$ R]R&   R]R&   RtR# )AuthorityEndpointstrnameoriginr   Nr   r   r   r   __annotations__r   r   r   r   r   r   9   s    
IKr   r   c                  6    ] tR t^?t$ R]R&   R]R&   R]R&   RtR# )GatewayStatusr   statedetailfloat
checked_atr   Nr   r   r   r   r    r    ?   s    JKr   r    c                  J    ] tR t^Ft$ R]R&   R]R&   R]R&   R]R&   R	]R
&   RtR# )AuthorityLaunchr   
executableztuple[str, ...]argvdict[str, str]environmentr   gateway_homer    sanitized_statusr   Nr   r   r   r   r&   r&   F   s    O
##r   r&   c                    V ^8  d   QhRRRR/# )   valuer   returnr   )formats   "r   __annotate__r2   O   s     B B B Br   c                v    \         P                  ! V P                  R 4      4      P                  4       R,          # )utf-8:N   N)hashlibsha256encode	hexdigestr/   s   &r   _fingerprintr;   O   s(    >>%,,w/0::<SAAr   c               (    V ^8  d   QhRRRRRRRR/# )	r.   pathr   bodyr   modeintr0   Noner   )r1   s   "r   r2   r2   S   s(     / / /C /s /t /r   c                   V P                   P                  R R RR7       \        P                  ! RV P                   R2V P                   R7      w  r4\        V4      p \        P                  ! W24       \        P                  ! VRRR7      ;_uu_ 4       pVP                  V4       VP                  4        \        P                  ! VP                  4       4       RRR4       \        P                  ! WP4       \        P                  ! V P                   \        P                  \        P                   ,          4      p \        P                  ! V4       \        P"                  ! V4        VP%                  R R	7       R#   + '       g   i     L; i  \        P"                  ! T4       i ; i  TP%                  R R	7       i ; i)
T  parentsexist_okr?   .prefixdirwr4   )encodingN)
missing_ok)parentmkdirtempfilemkstempr   r   osfchmodfdopenwriteflushfsyncfilenoreplaceopenO_RDONLYO_DIRECTORYcloseunlink)r=   r>   r?   fd	temporarytemporary_pathhandledirectory_fds   &&&     r   _atomic_writerd   S   s"   KKdT>$$a		{!,<$++NMB)_N/
		"YYr311VLLLLNHHV]]_% 2 	

>(wwt{{BKK"..,HI	#HH\"HH\". 21 HH\".s>   7F, AE>A"F, =F F, >F		F, F))F, ,G c                    V ^8  d   QhRRRR/# )r.   sourcer)   r0   r   )r1   s   "r   r2   r2   g   s      > n r   c                    V P                  4        UUu/ uF1  w  rV\        9  g   K  VP                  \        4      '       d   K/  WbK3  	  upp# u uppi N)items_PROVIDER_ENV_NAMES
startswith_PROVIDER_ENV_PREFIXES)rf   r   r/   s   &  r   _sanitized_environmentrm   g   sR     "<<>)KD** 	  67 	)  s   AAAinherited_environmentc               (    V ^8  d   QhRRRRRRRR/# )	r.   base_dirr   toolr   rn   dict[str, str] | Noner0   r)   r   )r1   s   "r   r2   r2   p   s0      
 1	
 r   c               B   VR	9  d   \        R4      hV R,          V,          p\        V/ 4       \        \        Vf   \        P
                  MT4      4      p\        V4      VR&   VR8X  d&   \        V4      VR&   \        VR,          4      VR&   V# \        V4      VR&   V# )
claudecodexGateway: migration requiredzcredentialless-info-homesHOME
CODEX_HOMEsqliteCODEX_SQLITE_HOMECLAUDE_CONFIG_DIR>   ru   rt   )r   _materialize_immutable_homerm   dictrR   environr   )rp   rq   rn   rootr*   s   &&$  r   %build_credentialless_info_environmentr   p   s     &&)*GHH11D8Db)(08RZZ>STK d)Kw$'IL!+.th+?'(  ,/t9'(r   c                    V ^8  d   QhRRRR/# )r.   r=   r   r0   r@   r   )r1   s   "r   r2   r2      s       # r   c                   \         P                  ! R \         P                  \         P                  ,          \         P                  ,          \         P
                  ,          4      p V P                  P                  R,           F  p\         P                  ! V\         P                  \         P                  ,          \         P                  ,          \         P
                  ,          VR7      p\         P                  ! V4       Tp\         P                  ! V4      p\        P                  ! VP                  4      ^,          '       g   K  \        R4      h	  \         P                  ! V4      P                  ^ \         P                  ! 4       09  d   \        R4      hV#   \          d    \         P                  ! T4       h i ; i)/:   NNdir_fdrv   )rR   rZ   r[   r\   	O_CLOEXEC
O_NOFOLLOWrN   partsr]   fstatstatS_IMODEst_moder   st_uidgeteuid	Exception)r=   
descriptor	componentnext_descriptorinfos   &    r   _open_protected_parentr      s%   
bnn$r||3bmmCJ**2..I ggbnn,r||;bmmK!O
 HHZ (J88J'D||DLL)E1112OPP / 88J&&q"**,.??-.KLL 
s   &CF 	AF #G c               (    V ^8  d   QhRRRRRRRR/# )	r.   r=   r   	max_bytesr@   privateboolr0   r   r   )r1   s   "r   r2   r2      s(     )  ) t ) 3 )  ) # ) r   c          
        V P                  4       '       d   V P                  R9   d   \        R4      hRpRp \        V 4      p\        P
                  ! V P                  \        P                  \        P                  ,          \        P                  ,          VR7      p\        P                  ! V4      p\        P                  ! VP                  4      '       d6   VP                  ^8w  g%   VP                  \        P                  ! 4       8w  d   \        R4      hV'       d   ^?M^p\        P                   ! VP                  4      V,          '       d   \        R4      hVP"                  ^ 8:  g   VP"                  V8  d   \        R4      h\%        4       p\'        V4      V8:  dU   \        P(                  ! V\+        RV^,           \'        V4      ,
          4      4      pV'       g   MVP-                  V4       Kd  V'       d   \'        V4      V8  d   \        R4      h\/        V4      P1                  R4      V^ 8  d   \        P2                  ! V4       V^ 8  d   \        P2                  ! V4       # #   \         d    h \4        \6        3 d   p	\        R4      T	hRp	?	ii ; i  T^ 8  d   \        P2                  ! T4       T^ 8  d   \        P2                  ! T4       i i ; i) rv   r      r4   N>   r   rG   ..)is_absoluter   r   r   rR   rZ   r[   r   r   r   r   S_ISREGr   st_nlinkr   r   r   st_size	bytearraylenreadminextendbytesdecoder]   OSErrorUnicodeDecodeError)
r=   r   r   	parent_fdfile_fdr   forbidden_moder>   chunkexcs
   &$$       r   _read_protected_textr      s   o!=)*GHHIG$ *40	''IIKK",,&6

 xx T\\**}}!{{bjjl*-.KLL")u<<%66-.KLL<<1y 8-.KLL{$i9$GGGSy1}s4y/H%IJEKKs4y9,-.KLLT{!!'* a<HHW>HHY  ' '( R)*GHcQR a<HHW>HHY s=   C)I1 "0I1 B-I1 4I1 1JJJJJ! !=Kc               $    V ^8  d   QhRRRRRR/# )r.   rp   r   bindingr	   r0   r   r   )r1   s   "r   r2   r2      s(     )I )I )I8H )IM^ )Ir   c                l   V \         ,          p \        P                  ! \        VR RR7      4      p\        T\        4      '       d   \        T4      R08w  d   \	        R4      hTR,          p\        T\        4      '       g   \	        R4      hTP                  TP                  4      p\        T\        4      '       d   \        T4      R08w  d   \	        R4      hTR,          p\        T\        4      '       g   \	        R4      h\        P                  P                  T4      p TP                  p	TP"                  R9  g/   TP$                  '       d   TP&                  f   TP(                  e   \	        R4      hTP"                  R8X  d^   TP$                  P+                  R4      P-                  4       p
 \.        P0                  ! T
4      P2                  pT'       g   \	        R4      hTP4                  '       g$   TP6                  '       g   TP8                  R9  d   \	        R4      h\;        TP                  TP+                  R
4      4      #   \         d    h \        P
                   d   p\	        R4      ThRp?ii ; i  \          d   p\	        R4      ThRp?ii ; i  \          d	    T
R	8H  p Li ; i)   Fr   r   rv   Nauthoritiesr   httprG   	localhostr   >   r   https>   r   r   )_ENDPOINTS_FILEjsonloadsr   r   JSONDecodeError
isinstancer}   setgetauthority_namer   urllibparseurlsplitport
ValueErrorschemehostnameusernamepasswordrstriplower	ipaddress
ip_addressis_loopbackqueryfragmentr=   r   )rp   r   r=   payloadr   r   recordr   parsed_portr   loopbacks   &&          r   resolve_authority_endpointr      s6   o%DR**1$&RWXY
 gt$$G(G)*GHH-(Kk4(()*GHH__W334Ffd##s6{xj'@)*GHHHFfc"")*GHH\\""6*FR 	..??&??&)*GHH}}??))#.446	/ ++H5AAH -.KLL|||v&++Y*F)*GHHW33V]]35GHHK '  R)*GHcQR   R)*GHcQR  	/;.H	/sG   "I $J 5 J  I>,I>-I99I>JJJ J32J3c                    V ^8  d   QhRRRR/# )r.   r=   r   r0   r   r   )r1   s   "r   r2   r2      s      $ 3 r   c                    \        V R RR7      P                  4       pV'       d;   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R4      hV# )r   Tr   c              3  @   "   T F  qP                  4       x  K  	  R # 5irh   )isspace).0	characters   & r   	<genexpr>"_read_proxy_key.<locals>.<genexpr>   s     CU	))++Us   Frv   )r   stripanyr   )r=   r/   s   & r   _read_proxy_keyr      sM     tDJJLECCCUCCCCCUCCC)*GHHLr   c               (    V ^8  d   QhRRRRRRRR/# )r.   endpointr   r   r	   rq   r   r0   r   )r1   s   "r   r2   r2      s+     2 2+ 26F 2c 2VY 2r   c                    \         P                  P                  VP                  R R7      pVR8X  d   RMR pV P                   RV V 2# )r   saferu   z/v1/r/)r   r   quoteroute_idr   )r   r   rq   routesuffixs   &&&  r   _route_baser      sH    LLw//b9EgoU2Fooc%11r   c               (    V ^8  d   QhRRRRRRRR/# )r.   rp   r   accountr   r   r	   r0   r   )r1   s   "r   r2   r2     s0     @ @D @7 @=M @RV @r   c                    \        VP                   R VP                   R VP                   24      pV R,          VP                  ,          V,          # ) zgateway-homes)r;   tray_keyr   r   rq   )rp   r   r   identitys   &&& r   _gateway_rootr     sK    w//073I3I2J"WM]M]L^_`Ho%4x??r   c               $    V ^8  d   QhRRRRRR/# )r.   r   r   expectedr)   r0   rA   r   )r1   s   "r   r2   r2   	  s&     E E E ED Er   c                   R
p \         P                  ! V \         P                  \         P                  ,          \         P                  ,          \         P
                  ,          4      p \         P                  ! T4      p\        P                  ! TP                  4      '       dJ   TP                  \         P                  ! 4       8w  g&   \        P                  ! TP                  4      R8w  d   \        R4      h \         P                   ! T4      p\#        T4      \#        T4      8w  d   \        R4      hT EF%  pT\$        9   d   \        R4      hR
p \         P                  ! T\         P                  \         P                  ,          \         P
                  ,          TR7      p\         P                  ! T4      p\        P&                  ! TP                  4      '       dl   TP(                  ^8w  g[   TP                  \         P                  ! 4       8w  g7   \        P                  ! TP                  4      R8w  g   TP*                  R8  d   \        R4      h\-        4       p	\/        T	4      R8:  dN   \         P0                  ! T\3        RR\/        T	4      ,
          4      4      p
T
'       g   MT	P5                  T
4       K]  \/        T	4      R8  d   \        R4      h\7        T	4      P9                  R	4      p T^ 8  d   \         P<                  ! T4       YT,          8w  d   \        R4      h \>        P@                  ! T4      p\E        T4      '       g   EK  \        R4      h	  \         P<                  ! T4       R#   \         d     R# \         d   p\        R4      ThRp?ii ; i  \         d   p\        R4      ThRp?ii ; i  \         d    h \        \:        3 d   p\        R4      ThRp?ii ; i  T^ 8  d   \         P<                  ! T4       i i ; i  \>        PB                   d     EK  i ; i  \         P<                  ! T4       i ; i)r   Nrv   rC   r     r   r   i  r4   r   )#rR   rZ   r[   r\   r   r   FileNotFoundErrorr   r   r   r   S_ISDIRr   r   r   r   listdirr   _FORBIDDEN_AUTH_FILESr   r   r   r   r   r   r   r   r   r   r   r]   r   r   r   _contains_token_material)r   r   root_fdr   	root_infonamesr   r   r   
body_bytesr   r>   r/   s   &&           r   _validate_gateway_rootr  	  s7   GR''KK"..(2<<7"--G
:HHW%	Y..//2::</||I--.%7-.KLL	VJJw'E u:X&-.KLLD,,12OPPG&''KK",,.>"
 xx(T\\22}}){{bjjl2||DLL1U:||f,56STT&[
*o/GGGSvJ7O-PQE %%e,z?V+56STTZ(//8 a<HHW%~%12OPP

4( (..12OPPU X 	}   R)*GHcQR  	V-.KLRUU	V@ / /0 Z12OPVYYZ a<HHW%   '' 
 	s   A$M8 );P3 %AP3 :N$ AP3 FO35P3 )P?P3 P3 8N!N!N!NN!$O /N;;O  P3 O0O0O++O00O33 PP3 P0+P3 /P00P3 3Qc                    V ^8  d   QhRRRR/# )r.   r/   objectr0   r   r   )r1   s   "r   r2   r2   Q  s     	 	F 	t 	r   c                f   \        V \        4      '       dQ   \        ;QJ d*    R  V P                  4        4       F  '       g   K   R# 	  R# ! R  V P                  4        4       4      # \        V \        4      '       d5   \        ;QJ d    R V  4       F  '       g   K   R# 	  R# ! R V  4       4      # R# )c              3     a"   T Fm  w  op\        S\        4      ;'       dC    \        ;QJ d    V3R  lR 4       F  '       g   K   RM	  RM! V3R  lR 4       4      ;'       g    \        V4      x  Ko  	  R# 5i)c              3  H   <"   T F  qSP                  4       9   x  K  	  R # 5irh   )r   )r   termkeys   & r   r   5_contains_token_material.<locals>.<genexpr>.<genexpr>T  s     )uJt$#))+*=Jts   "TFN)tokensecretr   refresh)r   r   r   r   )r   nestedr
  s   & @r   r   +_contains_token_material.<locals>.<genexpr>S  sa      
  -V S!uucc)uJt)uccc)uJt)u&u 0 0'/0,s   A8A8A8A8$A8TFc              3  8   "   T F  p\        V4      x  K  	  R # 5irh   )r   )r   items   & r   r   r  Y  s     Ded+D11es   )r   r}   r   ri   listr:   s   &r   r   r   Q  s    %s 
  %{{}
ss 	
s 	
s 
  %{{}
 
 	

 %sDeDssDsDsDeDDDr   c               $    V ^8  d   QhRRRRRR/# )r.   r   r   filesr)   r0   r   )r1   s   "r   r2   r2   ]  s!     ( (d (> (d (r   c                    V P                   p VP                  R R RR7       VP                  4       p\
        P                  ! TP                  4      '       gx   \
        P                  ! TP                  4      '       dR   TP                  \        P                  ! 4       8w  g.   \
        P                  ! TP                  4      ^,          '       d   \	        R4      hT P                  4       '       g   T P                  4       '       d   \        Y4       T # \!        \"        P$                  ! RT P&                   R2TR7      4      p \        P(                  ! TR4       TP+                  4        F  w  rg\-        YV,          TR4       K  	  \        YQ4        \        P.                  ! YP4       \        P2                  ! T\        P4                  \        P6                  ,          \        P8                  ,          4      p \        P:                  ! T4       \        P<                  ! T4        TP                  4       '       d   \>        P@                  ! T4       \        Y4       T #   \         d   p\	        R4      ThRp?ii ; i  \0         d    \        Y4        Li ; i  \        P<                  ! T4       i ; i  \         d    h \         d   p\	        R4      ThRp?ii ; i  TP                  4       '       d   \>        P@                  ! T4       i i ; i)TrC   rD   rv   NrG   rH   r   )!rN   rO   lstatr   r   r   S_ISLNKr   r   r   rR   r   r   exists
is_symlinkr  r   rP   mkdtempr   chmodri   rd   renameFileExistsErrorrZ   r[   r\   r   rW   r]   shutilrmtree)	r   r  rN   parent_infor   stagingr   r>   rc   s	   &&       r   r|   r|   ]  s*   [[FRTDu=lln 	[(())||K//00-<<++,u44)*GHH{{}}))t+8##Qtyyk+;HIG#
% ++-JD'.$6 (w.	0IIg$ wwvr{{R^^'Cbll'RS	#HH\"HH\" >>MM'"4'KG  R)*GHcQR(  	0"4/	0 HH\"&  R)*GHcQR >>MM'" s   $I AJ4 I= (AJ4 8J J4 I:)I55I:=JJ4 JJ4 J11J4 4K	K
KKK /Lc          
     ,    V ^8  d   QhRRRRRRRRR	R/# )
r.   rp   r   r   r   r   r   r   r	   r0   r   )r1   s   "r   r2   r2     s:     4 444  4 	4
 
4r   c                   \        WV4      pR 0pVP                  R8X  d   VP                  R4       R^RVP                  R\	        VP
                  4      RVP                  R\        V4      RR	/pR \        P                  ! V^R
R7      R,           /pVP                  R8X  d4   \        W#VP                  4      pR\        P                  ! V4       R2VR&   \        WG4      # )zgateway-manifest.jsonru   zconfig.tomlschema	authorityroute_fingerprintproviderallowed_filesprovider_auth_files_presentFT)indent	sort_keys
zXmodel_provider = "subrouter"

[model_providers.subrouter]
name = "Subrouter"
base_url = z8
env_key = "SUBROUTER_PROXY_KEY"
wire_api = "responses"
)r   rq   addr   r;   r   r(  sortedr   dumpsr   r|   )	rp   r   r   r   r   allowedmanifestr  base_urls	   &&&&     r   materialize_gateway_homer4    s     G4D&'G||wM"!W++\'*:*:;G$$%uH 	 HQ$!ORV!VE ||wx',,? **X./ 0'' 	m 't33r   c                  "    ] tR tRtR R ltRtR# )_NoRedirecti  c               $    V ^8  d   QhRRRRRR/# )r.   _argsr  _kwargsr0   rA   r   )r1   s   "r   r2   _NoRedirect.__annotate__  s!      v & T r   c                	    R # rh   r   )selfr8  r9  s   &*,r   redirect_request_NoRedirect.redirect_request  s    r   r   N)r   r   r   r   r=  r   r   r   r   r6  r6    s     r   r6  c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r.   r   r   r   r	   r
  r   timeout_secsr#   r0   r    r   )r1   s   "r   r2   r2     sH     NM NMNMNM 
NM
 NM NMr   c                  \         P                  P                  VP                  R R7      pV P                   RV R2p\         P
                  P                  VRRV 2RR/RR	7      p\         P
                  P                  \         P
                  P                  / 4      \        4       4      p VP                  WcR
7      ;_uu_ 4       pVP                  ^8w  g   VP                  4       V8w  d   \        R4      hVP                  R4      p	\        V	4      R8  d   \        R4      h RRR4        \(        P*                  ! X	4      p0 R&mp\/        T\0        4      '       d   \3        T4      T8w  d   \        R4      hTR,          pTR,          pRRRRRRRR/p\/        T\4        4      '       d   Y9  g   TR,          TP6                  8w  gy   TR,          \9        TP                  4      8w  gX   \/        TR,          \4        4      '       d;   \:        P<                  ! RTR,          4      e   TR,          RJg   YT,          8w  d   \        R4      hTR,          p\/        T\4        4      '       g   \        R4      h \>        P@                  ! TPC                  RR 4      4      pTPF                  e<   TPI                  \J        4      PM                  4       \N        PN                  ! 4       8:  d   \        R4      hRR!RR"RR#RR$/T,          p\Q        TT\N        PN                  ! 4       R%7      #   + '       g   i     EL; i  \         d    h \         \         P"                  P$                  \         P"                  P&                  3 d   p
\        R4      T
hRp
?
ii ; i  \(        P,                   d   p
\        R4      T
hRp
?
ii ; i  \D         d   p
\        R4      T
hRp
?
ii ; i)'r   r   r   z/_subrouter/statusAuthorizationzBearer Acceptzapplication/jsonGET)headersmethod)timeoutzGateway: unavailablei@  i @  Nr!   r(  r'  grant_fingerprintgrant_expires_atgrant_revokedaccount_availabilityready	availablezmigration-requiredunavailableblocked	ambiguous	exhaustedz[0-9a-f]{12}FZz+00:00zGateway: readyrv   zGateway: repair requiredzGateway: quota exhausted)r!   r"   r$   >   r!   r(  rJ  rI  rH  r'  rK  ))r   r   r   r   r   requestRequestbuild_openerProxyHandlerr6  rZ   statusgeturlr   r   r   r   errorURLError	HTTPErrorr   r   r   r   r}   r   r   r(  r;   re	fullmatchr   fromisoformatrY   r   tzinfo
astimezoner   	timestamptimer    )r   r   r
  r@  r   urlrS  openerresponser>   r   r   expected_fieldsr!   availabilityexpected_availabilityexpiry
expires_atr"   s   &&&$               r   _fetch_gateway_statusrk    sg    LLw//b9E__S'9
:Cnn$$ GC5/8=OP % G
 ^^((##B'F
K[[[778#%):c)A12HII==(D4y6!12HII "	 8K**T"O gt$$G(G)*@AAGE12Lm;[	 uc""-:'"2"22&'<8H8H+II'"56<<<<1D)EFN?#5077)*@AA'(Ffc"")*@AAK++FNN3,IJ
  J$9$9#$>$H$H$Jdiik$Y)*@AA!;-/	
 F uV		LLw 877 ' V\\**FLL,B,BC K)*@AsJK  K)*@AsJKJ  K)*@AsJKsn   -L8 AL$&L8 /N 8&N> $L5	/L8 5L8 8AN NNNN;*N66N;>O	OOr@        $@c               (    V ^8  d   QhRRRRRRRR/# )	r.   rp   r   r   r	   r@  r#   r0   r    r   )r1   s   "r   r2   r2      s0       	
 r   c               `    \        W4      p\        VP                  4      p\        VVVVR 7      # )r@  )r   r   proxy_grant_refrk  )rp   r   r@  r   r
  s   &&$  r   fetch_gateway_statusrq     s7     *(<H
'11
2C !	 r   c               (    V ^8  d   QhRRRRRRRR/# )	r.   rp   r   r   r   r@  r#   r0   r   r   )r1   s   "r   r2   r2     s0       	
 r   c          
        VP                   pVf   \        R4      h \        WVR7      pTP                  R8X  d   \        P                  M\        P                  p\        TR R TP                  TP                  R7      #   \         dE   p\        \        P
                  R R \        P                  ! 4       \        T4      R7      u R p?# R p?ii ; i)Nrv   ro  )rW  primary_used_pctsecondary_used_pctr$   r"   rL  )authority_bindingr   rq  r   r   UNKNOWNrb  r   r!   OKBROKENr$   r"   )rp   r   r@  r   rW  r   healths   &&$    r   gateway_health_snapshotr{    s     ''G)*GHH	
%hlS !' 7\__\=P=PF$$}}  ' 
''!#yy{s8
 	

s   A? ?C
9C	C	Cc               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r.   rp   r   r   r   rq   r   r(   z	list[str]rn   rr   r0   r&   r   )r1   s   "r   r2   r2   -  sD     * *** * 	* 1* *r   c               
   VP                   pVe    VP                  \        P                  8X  d   \	        R4      hW!P
                  8w  g   VP                  V8w  d   \	        R4      h\        W4      p\        VP                  4      p\        WeVRR7      p\        WWe4      p	\        \        Vf   \        P                  MT4      4      p
\!        \"        P$                  ! 4       4      pWR&   W*R&   \!        V	4      V
R&   \'        WeV4      p\)        V4      pVR8X  d)   \!        V	4      V
R&   \!        V	R	,          4      V
R
&   WzR&   M)VR8X  d   \!        V	4      V
R&   WR&   WzR&   M\	        R4      h\+        V\-        V4      V
V	VR7      # )Nrv   rl  ro  SUBROUTER_SESSION_IDSUBROUTER_PROVIDERrw   ru   rx   ry   rz   SUBROUTER_PROXY_KEYrt   r{   ANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKEN)r'   r(   r*   r+   r,   )rv  r?   r
   NATIVEr   rq   r(  r   r   rp  rk  r4  rm   r}   rR   r~   r   uuiduuid4r   r  r&   tuple)rp   r   rq   r(   rn   r   r   r
  rW  r+   r*   
session_idr3  	forwardeds   &&&&$         r   build_authority_launchr  -  sz    ''G',,-*>*>>)*GHH||w//47)*GHH)(<H
'11
2C"8cMF+HxQL(08RZZ>STK TZZ\"J*4&'(,$%l+K8d3HT
Iw$'$5L!+.|h/F+G'(-0)*		+.|+<'(,4().1*+)*GHH9! r   >   	auth.jsonclaude.json.credentials.json)	
ANTHROPIC_AWS_AZURE_CHATGPT_CLAUDE_CODEX_GOOGLE_OPENAI_
SUBROUTER_>   NO_PROXYno_proxy	ALL_PROXY	all_proxy
HTTP_PROXY
http_proxyHTTPS_PROXYhttps_proxy);
__future__r   r6   r   r   rR   r\  r  r   rP   rb  urllib.errorr   urllib.parseurllib.requestr  dataclassesr   r   r   pathlibr   account_registryr   r	   r
   health_clientr   r   r   r   rl   rj   RuntimeErrorr   r   r    r&   r;   rd   rm   r   r   r   r   r   r   r   r  r   r|   r4  rS  HTTPRedirectHandlerr6  rk  rq  r{  r  r   r   r   <module>r     so   "    	 	         ! "  E E 7 - 

 	 	, 	 $  
 $   $$ $ $B/( 48	,2) X)IX2@
EP	(V4D&..44 
NMb 	  	:* 48* *r   