import{UZ as N,ZZ as $}from"./cli-0.5.12-khvy67r3.mjs";import{F3 as M,O0 as L,R0 as Y,d4 as Z}from"./cli-0.5.12-pycnjaeg.mjs";import{Bca as Q,Jca as X}from"./cli-0.5.12-g4wb8mj2.mjs";import{bfa as J,cfa as V}from"./cli-0.5.12-k1crwtdc.mjs";import{Gga as S,yga as P}from"./cli-0.5.12-tfdwzg37.mjs";import{Dna as W,lna as K}from"./cli-0.5.12-495d826j.mjs";import{aoa as R}from"./cli-0.5.12-xzeb7mtb.mjs";async function C(){let F=M()?.accessToken;if(!F)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let y=await L();if(!y)throw Error("Unable to get organization UUID");let G=`${J().BASE_API_URL}/v1/environment_providers`;try{let B={...N(F),"x-organization-uuid":y},q=await K.get(G,{headers:B,timeout:15000});if(q.status!==200)throw Error(`Failed to fetch environments: ${q.status} ${q.statusText}`);return q.data.environments}catch(B){let q=P(B);throw Q(q),Error(`Failed to fetch environments: ${q.message}`)}}async function j(F){let y=M()?.accessToken;if(!y)throw Error("No access token available");let G=await L();if(!G)throw Error("Unable to get organization UUID");let B=`${J().BASE_API_URL}/v1/environment_providers/cloud/create`;return(await K.post(B,{name:F,kind:"anthropic_cloud",description:"",config:{environment_type:"anthropic",cwd:"/home/user",init_script:null,environment:{},languages:[{name:"python",version:"3.11"},{name:"node",version:"20"}],network_config:{allowed_hosts:[],allow_default_hosts:!0}}},{headers:{...N(y),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":G},timeout:15000})).data}var b=R(()=>{W();V();Y();Z();S();X();$()});
export{C as eT,j as fT,b as gT};
