(()=>{"use strict";var e={532:(e,r,t)=>{var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var __export=(e,r)=>{for(var t in r)n(e,t,{get:r[t],enumerable:true})};var __copyProps=(e,r,t,i)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let c of o(r))if(!a.call(e,c)&&c!==t)n(e,c,{get:()=>r[c],enumerable:!(i=s(r,c))||i.enumerable})}return e};var __toCommonJS=e=>__copyProps(n({},"__esModule",{value:true}),e);var i={};__export(i,{KNOWN_AGENTS:()=>d,determineAgent:()=>determineAgent});e.exports=__toCommonJS(i);var c=t(455);var u=t(24);const _="/opt/.devin";const p="cursor";const g="cursor-cli";const O="claude";const v="cowork";const A="devin";const f="replit";const E="gemini";const C="codex";const m="antigravity";const I="augment-cli";const T="opencode";const N="github-copilot";const l="github-copilot-cli";const D="v0";const d={CURSOR:p,CURSOR_CLI:g,CLAUDE:O,COWORK:v,DEVIN:A,REPLIT:f,GEMINI:E,CODEX:C,ANTIGRAVITY:m,AUGMENT_CLI:I,OPENCODE:T,GITHUB_COPILOT:N,V0:D};async function determineAgent(){if(process.env.AI_AGENT){const e=process.env.AI_AGENT.trim();if(e){if(e===N||e===l){return{isAgent:true,agent:{name:N}}}if(e===D){return{isAgent:true,agent:{name:D}}}return{isAgent:true,agent:{name:e}}}}if(process.env.CURSOR_TRACE_ID){return{isAgent:true,agent:{name:p}}}if(process.env.CURSOR_AGENT||process.env.CURSOR_EXTENSION_HOST_ROLE==="agent-exec"){return{isAgent:true,agent:{name:g}}}if(process.env.GEMINI_CLI){return{isAgent:true,agent:{name:E}}}if(process.env.CODEX_SANDBOX||process.env.CODEX_CI||process.env.CODEX_THREAD_ID){return{isAgent:true,agent:{name:C}}}if(process.env.ANTIGRAVITY_AGENT){return{isAgent:true,agent:{name:m}}}if(process.env.AUGMENT_AGENT){return{isAgent:true,agent:{name:I}}}if(process.env.OPENCODE_CLIENT){return{isAgent:true,agent:{name:T}}}if(process.env.CLAUDECODE||process.env.CLAUDE_CODE){if(process.env.CLAUDE_CODE_IS_COWORK){return{isAgent:true,agent:{name:v}}}return{isAgent:true,agent:{name:O}}}if(process.env.REPL_ID){return{isAgent:true,agent:{name:f}}}if(process.env.COPILOT_MODEL||process.env.COPILOT_ALLOW_ALL||process.env.COPILOT_GITHUB_TOKEN){return{isAgent:true,agent:{name:N}}}try{await(0,c.access)(_,u.constants.F_OK);return{isAgent:true,agent:{name:A}}}catch(e){}return{isAgent:false,agent:void 0}}0&&0},24:e=>{e.exports=require("node:fs")},455:e=>{e.exports=require("node:fs/promises")}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var s=r[t]={exports:{}};var o=true;try{e[t](s,s.exports,__nccwpck_require__);o=false}finally{if(o)delete r[t]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(532);module.exports=t})();