+
    Q(i/                    h   ^ RI H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 ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ]'       d   ^ RIH!t! ]! R4      t"R R lt#R R lt$RPK                  R4      t&RPO                  4       t(Rt)Rt*R R lt+R# )    )annotationsN)Path)TYPE_CHECKINGAny)ValidationError)Align)ConsoleGroup)Panel)Table)Text)
get_logger)MCPServerConfig)FileSystemSource)get_cached_typeadapter)check_for_newer_version)FastMCPz
cli.configc                   V ^8  d   QhRR/# )   returnbool )formats   "[/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/fastmcp/utilities/cli.py__annotate__r      s     6 6T 6    c                 R    \        \        P                  P                  R4      4      # )z:Check if we're already running in a FastMCP uv subprocess.FASTMCP_UV_SPAWNED)r   osenvirongetr   r   r   is_already_in_uv_subprocessr"      s    

3455r   c                    V ^8  d   QhRRRR/# )r   server_specz
str | Noner   ztuple[MCPServerConfig, str]r   )r   s   "r   r   r   !   s"     i% i%i% !i%r   c                H   RpRpV f   \        R4      pVP                  4       '       gA   \        P                  ! 4       pV'       d   TpM \        P                  R4       \        R4      h\        V4      p\        P                  RV 24       MT pVP                  R4      '       d   \        V4      pVP                  4       '       d    \        V4      ;_uu_ 4       p\        P                  ! V4      pRRR4       RX9   d   MN \        \        4      pVP                  V4      pVP                  '       d   VP                  P!                  V4       Vf   \'        VR7      p	\        V	R	7      pVP)                  4       p
VP+                  R
4      ;p'       d   WR,          R
&   VP+                  R4      ;p'       d5   V
R,          P+                  R4      ;'       g    . pW,           V
R,          R&   VP+                  R4      ;p'       d   \        V4      V
R,          R&   VP+                  R4      ;p'       d   \        V4      V
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   VP+                  R4      ;p'       d   VV
R,          R&   \        R/ V
B pVV3#   + '       g   i     ELr; i  \"         d     EL-i ; i  \        P$                  \        3 d     ELOi ; i)ag  Load config from server_spec and apply CLI overrides.

This consolidates the config parsing logic that was duplicated across
run, inspect, and dev commands.

Args:
    server_spec: Python file, config file, URL, or None to auto-detect
    cli_overrides: CLI arguments that override config values

Returns:
    Tuple of (MCPServerConfig, resolved_server_spec)
Nzfastmcp.jsonzNo server specification provided and no fastmcp.json found in current directory.
Please specify a server file or create a fastmcp.json configuration.z-No server specification or fastmcp.json foundzUsing configuration from z.json
mcpServers)path)sourcepythonenvironmentwith_packagesdependencieswith_requirementsrequirementsprojecteditable	transport
deploymenthostportr'   	log_levelserver_argsargsr   )r   existsr   find_configloggererrorFileNotFoundErrorstrinfoendswithopenjsonloadr   validate_pythonr2   apply_runtime_settingsr   JSONDecodeErrorr   
model_dumpr!   )r$   cli_overridesconfigconfig_pathfound_configresolved_specfdataadapterr(   config_dictpython_overridepackages_overrideexistingrequirements_overrideproject_overrideeditable_overridetransport_overridehost_overrideport_overridepath_overridelog_level_overrideserver_args_override
new_configs   &,                      r   load_and_merge_configr]   !   sw     FK >*!!##*668L*[ ((WXXK(/}=># g&&=)+&&!99Q<D '  4'
"8"I!(!8!8!> ",,,"--DD[Q ~!}5 / ##%K (++H555/>M"8,)--o>>>}-11.AGGR5F5QM">2 - 1 12E FFF589N5OM">2(,,Y777034D0EM"9-)--j9991BM":. +..{;;;1CL!+.%))&11}1,9L!&)%))&11}1,9L!&)%))&11}1,9L!&)*..{;;;1CL!+.,00???,@L!&) !/;/J}$$} '&&" +  ((*;< sI   	N M3N AM0 M-	'	N 0M?;N >M??N N! N!a[  
    _ __ ___  _____           __  __  _____________    ____    ____ 
   _ __ ___ .'____/___ ______/ /_/  |/  / ____/ __ \  |___ \  / __ \
  _ __ ___ / /_  / __ `/ ___/ __/ /|_/ / /   / /_/ /  ___/ / / / / /
 _ __ ___ / __/ / /_/ (__  ) /_/ /  / / /___/ ____/  /  __/_/ /_/ / 
_ __ ___ /_/    \____/____/\__/_/  /_/\____/_/      /_____(*)____/  


u  [38;2;0;198;255m [38;2;0;195;255m█[38;2;0;192;255m▀[38;2;0;189;255m▀[38;2;0;186;255m [38;2;0;184;255m▄[38;2;0;181;255m▀[38;2;0;178;255m█[38;2;0;175;255m [38;2;0;172;255m█[38;2;0;169;255m▀[38;2;0;166;255m▀[38;2;0;163;255m [38;2;0;160;255m▀[38;2;0;157;255m█[38;2;0;155;255m▀[38;2;0;152;255m [38;2;0;149;255m█[38;2;0;146;255m▀[38;2;0;143;255m▄[38;2;0;140;255m▀[38;2;0;137;255m█[38;2;0;134;255m [38;2;0;131;255m█[38;2;0;128;255m▀[38;2;0;126;255m▀[38;2;0;123;255m [38;2;0;120;255m█[38;2;0;117;255m▀[38;2;0;114;255m█[39m
[38;2;0;198;255m [38;2;0;195;255m█[38;2;0;192;255m▀[38;2;0;189;255m [38;2;0;186;255m [38;2;0;184;255m█[38;2;0;181;255m▀[38;2;0;178;255m█[38;2;0;175;255m [38;2;0;172;255m▄[38;2;0;169;255m▄[38;2;0;166;255m█[38;2;0;163;255m [38;2;0;160;255m [38;2;0;157;255m█[38;2;0;155;255m [38;2;0;152;255m [38;2;0;149;255m█[38;2;0;146;255m [38;2;0;143;255m▀[38;2;0;140;255m [38;2;0;137;255m█[38;2;0;134;255m [38;2;0;131;255m█[38;2;0;128;255m▄[38;2;0;126;255m▄[38;2;0;123;255m [38;2;0;120;255m█[38;2;0;117;255m▀[38;2;0;114;255m▀[39mu    [38;2;0;170;255m▄[38;2;0;142;255m▀[38;2;0;114;255m▀[38;2;0;86;255m▀[39m
 [38;2;0;170;255m█[38;2;0;142;255m▀[38;2;0;114;255m▀[39m
[38;2;0;170;255m▀[39m
[0mu  [38;2;0;198;255m [38;2;0;195;255m▄[38;2;0;192;255m▀[38;2;0;189;255m▀[38;2;0;186;255m [38;2;0;184;255m▄[38;2;0;181;255m▀[38;2;0;178;255m█[38;2;0;175;255m [38;2;0;172;255m█[38;2;0;169;255m▀[38;2;0;166;255m▀[38;2;0;163;255m [38;2;0;160;255m▀[38;2;0;157;255m█[38;2;0;155;255m▀[38;2;0;152;255m [38;2;0;149;255m█[38;2;0;146;255m▀[38;2;0;143;255m▄[38;2;0;140;255m▀[38;2;0;137;255m█[38;2;0;134;255m [38;2;0;131;255m█[38;2;0;128;255m▀[38;2;0;126;255m▀[38;2;0;123;255m [38;2;0;120;255m█[38;2;0;117;255m▀[38;2;0;114;255m█[39m
[38;2;0;198;255m [38;2;0;195;255m█[38;2;0;192;255m▀[38;2;0;189;255m [38;2;0;186;255m [38;2;0;184;255m█[38;2;0;181;255m▀[38;2;0;178;255m█[38;2;0;175;255m [38;2;0;172;255m▄[38;2;0;169;255m▄[38;2;0;166;255m█[38;2;0;163;255m [38;2;0;160;255m [38;2;0;157;255m█[38;2;0;155;255m [38;2;0;152;255m [38;2;0;149;255m█[38;2;0;146;255m [38;2;0;143;255m▀[38;2;0;140;255m [38;2;0;137;255m█[38;2;0;134;255m [38;2;0;131;255m█[38;2;0;128;255m▄[38;2;0;126;255m▄[38;2;0;123;255m [38;2;0;120;255m█[38;2;0;117;255m▀[38;2;0;114;255m▀[39m
c                    V ^8  d   QhRRRR/# )r   serverzFastMCP[Any]r   Noner   )r   s   "r   r   r      s     D+ D+l D+t D+r   c                   \        4       p\        P                  ! \        RR7      p\        R\        P
                   2RR7      p\        P                  ! RR7      pVP                  RRR	7       VP                  R
RR	7       VP                  RRR	7       V P                  pV P                  '       d   VRV P                   2,          pVP                  RR\        VRR7      4       VP                  RRR4       \        RRR7      p\        R\        P                  ! V4      RR\        P                  ! V4      \        P                  ! V4      R\        P                  ! V4      4      p\        VRR^PR7      p\!        RR7      p	R\        P                  ! V4      .p
V'       d   \        P"                  ! RVR34      p\        RRR7      p\        \        \        P                  ! V4      \        P                  ! V4      4      RR^PR7      pV
P%                  \        P                  ! V4      4       V
P%                  R4       V	P'                  \        V
!  4       R# ) zECreates and logs a formatted banner with server information and logo.T)no_wrapzFastMCP z	bold blue)style)paddingboldcenter)rd   justifycyanleftdimz, u   🖥zServer:u   🚀zDeploy free:zhttps://fastmcp.cloudzhttps://gofastmcp.com )border_stylere   width)stderrr^   z
bold greenz"Run: pip install --upgrade fastmcpblueN)r      )rq      )u   🎉 Update available: rf   )r   r   )r   r   	from_ansiLOGO_ASCII_4fastmcp__version__r   grid
add_columnnameversionadd_rowr
   r   rg   r   r	   assembleappendprint)r`   newer_version	logo_text
title_text
info_tableserver_infodocs_urlpanel_contentpanelconsoleoutput_elementsupdate_line1update_line2update_notices   &             r   log_server_bannerr      s    ,-M |T:I !4!4 56kJJ F+J97v6++K~~~FNN+,,vy${%*HIv~/FG +59H
Y

Z X
Z 	M E T"G 37U8K1LO }}/L)
 @N%,,|,ell<.HI	
 	u||M:;4 MM%)*r   ),
__future__r   rA   r   pathlibr   typingr   r   pydanticr   
rich.alignr   rich.consoler	   r
   
rich.panelr   
rich.tabler   	rich.textr   ru   fastmcp.utilities.loggingr   #fastmcp.utilities.mcp_server_configr   9fastmcp.utilities.mcp_server_config.v1.sources.filesystemr   fastmcp.utilities.typesr   fastmcp.utilities.version_checkr   r   r:   r"   r]   lstripLOGO_ASCII_1stripLOGO_ASCII_2LOGO_ASCII_3rt   r   r   r   r   <module>r      s    "  	  % $  '     0 ? V : C	L	!6
i%X F4L T %' , V  D+r   