"use strict";exports.id=7541,exports.ids=[7541],exports.modules={"./src/commands/sandbox-config.ts"(n,s,e){e.r(s),e.d(s,{handleSandboxDisable:()=>c,handleSandboxEnable:()=>d,handleSandboxReset:()=>b});var o=e("../shell-exec/dist/index.js"),t=e("./src/console-io.ts"),a=e("./src/sandbox-gate.ts"),i=e("./src/utils/sandbox-messages.ts"),r=function(n,s,e,o){return new(e||(e=Promise))((function(t,a){function i(n){try{d(o.next(n))}catch(n){a(n)}}function r(n){try{d(o.throw(n))}catch(n){a(n)}}function d(n){var s;n.done?t(n.value):(s=n.value,s instanceof e?s:new e((function(n){n(s)}))).then(i,r)}d((o=o.apply(n,s||[])).next())}))};function d(n){return r(this,void 0,void 0,(function*(){(0,a.Y)()&&(0,o.isSandboxSupported)()||(yield n.transform((n=>Object.assign(Object.assign({},n),{sandbox:Object.assign(Object.assign({},n.sandbox),{mode:"disabled"})}))),(0,t.OT)(`Error: Sandbox is not available on this system. ${(0,i.l)()}.`),process.exit(1)),yield n.transform((n=>Object.assign(Object.assign({},n),{sandbox:Object.assign(Object.assign({},n.sandbox),{mode:"enabled"})}))),(0,t.OT)("✅ Sandbox mode enabled. Commands will now run in a sandbox environment."),(0,t.OT)("💡 Use 'agent sandbox disable' to switch back to allowlist mode."),process.exit(0)}))}function c(n){return r(this,void 0,void 0,(function*(){yield n.transform((n=>Object.assign(Object.assign({},n),{sandbox:Object.assign(Object.assign({},n.sandbox),{mode:"disabled"})}))),(0,t.OT)("✅ Sandbox mode disabled. Commands will now use allowlist mode (default)."),(0,t.OT)("💡 Use 'agent sandbox enable' to switch back to sandbox mode."),process.exit(0)}))}function b(n){return r(this,void 0,void 0,(function*(){yield n.transform((n=>{const{sandbox:s}=n,e=function(n,s){var e={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(o=Object.getOwnPropertySymbols(n);t<o.length;t++)s.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(n,o[t])&&(e[o[t]]=n[o[t]])}return e}(n,["sandbox"]);return Object.assign(Object.assign({},e),{showSandboxIntro:!0})})),(0,t.OT)("✅ Sandbox configuration reset. All sandbox-specific settings have been removed."),(0,t.OT)("💡 Use 'agent sandbox enable' to configure sandbox mode again."),process.exit(0)}))}},"./src/sandbox-gate.ts"(n,s,e){e.d(s,{Y:()=>a});var o=e("./src/statsig.ts");function t(n,s){return(0,o.mD)()?(0,o.QF)(n):s}function a(n="linux"){return!(!t("composer_sandbox_settings_visible",!0)||"win32"===n&&t("sandbox_force_disable_win32",!0))}},"./src/utils/sandbox-messages.ts"(n,s,e){e.d(s,{l:()=>t});var o=e("node:os");function t(){return function(){const n=function(){try{const n=o.release().match(/^(\d+)\.(\d+)/);if(n)return{major:parseInt(n[1],10),minor:parseInt(n[2],10)}}catch(n){}return null}();return!!n&&(n.major>6||6===n.major&&n.minor>=2)}()?"Sandbox failed to start, possibly due to AppArmor configuration. Visit https://cursor.com/docs/agent/terminal for troubleshooting steps":"Sandbox requires kernel v6.2 or later and may require additional AppArmor policies to be set. Visit https://cursor.com/docs/agent/terminal for troubleshooting steps"}}};