import{eZ as N,jZ as $}from"./cli-0.5.3-e58xste9.mjs";import{$2 as M,f0 as L,i0 as Y,z3 as Z}from"./cli-0.5.3-1vt6twff.mjs";import{D5 as K,V5 as X}from"./cli-0.5.3-vpcrbd8n.mjs";import{H6 as V,z6 as Q}from"./cli-0.5.3-t65dek0m.mjs";import{Jea as J,Kea as W}from"./cli-0.5.3-66650sba.mjs";import{Dga as P,Lga as S}from"./cli-0.5.3-c8bcrqa4.mjs";import{Xma as R}from"./cli-0.5.3-0df3r78b.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(()=>{X();W();Y();Z();S();V();$()});
export{C as rS,j as sS,b as tS};
