import{gZ as N,lZ as $}from"./cli-0.5.4-prfn3sxd.mjs";import{B3 as Z,b3 as M,h0 as L,k0 as Y}from"./cli-0.5.4-jqt00ywx.mjs";import{F5 as K,X5 as X}from"./cli-0.5.4-j7kkqxv6.mjs";import{B6 as Q,J6 as V}from"./cli-0.5.4-cbq01zg3.mjs";import{Lea as J,Mea as W}from"./cli-0.5.4-e822fzaq.mjs";import{Fga as P,Nga as S}from"./cli-0.5.4-sgcaw17t.mjs";import{Zma as R}from"./cli-0.5.4-aacw1src.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 tS,j as uS,b as vS};
