import{K as D}from"./cli-0.5.12-paj8nhxk.mjs";import{U as x}from"./cli-0.5.12-tnk4m7zs.mjs";import{mb as A}from"./cli-0.5.12-gfm1s8a2.mjs";import{nb as L}from"./cli-0.5.12-pwee4pmy.mjs";import{CQ as b,DQ as u,Vm as k,Wm as U,Zm as F,_m as p}from"./cli-0.5.12-zc0qwdy2.mjs";import{AR as O,DR as c}from"./cli-0.5.12-9mq24qzr.mjs";import{d4 as m,n0 as Y,s0 as I,x2 as w,y2 as M,y3 as E,z3 as G}from"./cli-0.5.12-pycnjaeg.mjs";import{gaa as X,haa as B,mca as $,pca as z}from"./cli-0.5.12-g4wb8mj2.mjs";import{pea as _,qea as y}from"./cli-0.5.12-asbn3d19.mjs";import{fga as K,iga as T}from"./cli-0.5.12-p5ps8gf0.mjs";import{Gga as S,zga as V}from"./cli-0.5.12-tfdwzg37.mjs";import{Mga as J,Oga as N,Wga as v}from"./cli-0.5.12-60w1a0bs.mjs";import{Dna as j,lna as W}from"./cli-0.5.12-495d826j.mjs";v();c();u();z();m();p();y();j();T();S();I();B();var C=void 0;function h(q){try{let H=new URL(q);return H.search="",H.toString().replace(/\/$/,"")}catch{return}}async function Z(){if(X())return;if(Y()!=="firstParty")return;try{let q=await W.get("https://api.anthropic.com/mcp-registry/v0/servers?version=latest&visibility=commercial",{timeout:5000}),H=new Set;for(let P of q.data.servers)for(let R of P.server.remotes??[]){let Q=h(R.url);if(Q)H.add(Q)}C=H,K(`[mcp-registry] Loaded ${H.size} official MCP URLs`)}catch(q){K(`Failed to fetch MCP registry: ${V(q)}`,{level:"error"})}}M();U();function Xq(){if(J(process.env.CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER)||N())return;O(),b(),x(),A();let q=$()?.transport;if(q==="bedrock"&&!J(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH))G();if(q==="vertex"&&!J(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH))E();if(F(_(),AbortSignal.timeout(3000),[]),D(),Z(),w(),k.initialize(),!N())L.initialize()}
export{Xq as I};
