module.exports=[980738,(a,b,c)=>{b.exports=a.x("node-pty-c710df912a232c01",()=>require("node-pty-c710df912a232c01"))},433541,a=>a.a(async(b,c)=>{try{let b=await a.y("ws-4df7fc762dfa9a52");a.n(b),c()}catch(a){c(a)}},!0),504446,(a,b,c)=>{b.exports=a.x("net",()=>require("net"))},42847,a=>{"use strict";var b=a.i(980738),c=a.i(163812);class d{taskId;_pty;killed=!1;disconnectTimer=null;_buffer="";static BUFFER_MAX=51200;_onData;_exitListeners=[];_idleTimer=null;_idleThresholdMs;_onIdle;_idleFired=!1;constructor(a,e,f,g,h,i,j,k,l){this.taskId=a,this._onData=h,this._onIdle=k??null,this._idleThresholdMs=Math.max(l??18e4,18e4);const m={...(0,c.stripClaudeNestingEnv)((0,c.ensurePathInEnv)(process.env)),TERM:"xterm-color",...j};try{this._pty=b.spawn(e,f,{name:"xterm-color",cols:80,rows:24,cwd:g,env:m})}catch(a){throw console.error(`[pty] spawn failed: command="${e}", cwd="${g}", PATH="${m.PATH?.slice(0,200)}"`),a}this._pty.onData(a=>{this._buffer+=a,this._buffer.length>d.BUFFER_MAX&&(this._buffer=this._buffer.slice(this._buffer.length-d.BUFFER_MAX)),this._resetIdleTimer(),this._onData(a)}),this._pty.onExit(({exitCode:a,signal:b})=>{for(let c of(this.killed=!0,this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null),i(a,b),this._exitListeners))c(a)}),this._resetIdleTimer()}_resetIdleTimer(){this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null),null===this._onIdle||this.killed||this._idleFired||(this._idleTimer=setTimeout(()=>{this._idleFired=!0,this._onIdle?.()},this._idleThresholdMs))}setDataListener(a){this._onData=a}setExitListener(a){this._exitListeners=[a]}write(a){this.killed||(this._resetIdleTimer(),this._pty.write(a))}resize(a,b){this.killed||this._pty.resize(a,b)}getBuffer(){return this._buffer}get isIdle(){return this._idleFired}kill(a){if(!this.killed){this.killed=!0,this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null);try{this._pty.kill(a)}catch{}}}forceKill(){try{this._pty.kill("SIGKILL")}catch{}this.killed=!0}}a.s(["PtySession",0,d])},962620,a=>{"use strict";var b=a.i(42847),c=a.i(163812);let d=globalThis;d.__ptySessions||(d.__ptySessions=new Map);let e=d.__ptySessions;function f(a){let b=e.get(a);b&&(e.delete(a),b.disconnectTimer&&(clearTimeout(b.disconnectTimer),b.disconnectTimer=null),b.kill())}function g(){for(let a of e.keys())f(a)}let h=globalThis;"phase-production-build"===process.env.NEXT_PHASE||h.__ptySignalHandlersRegistered||(h.__ptySignalHandlersRegistered=!0,process.once("SIGTERM",()=>{console.error("[session-store] SIGTERM received — cleaning up PTY sessions"),g()}),process.once("SIGINT",()=>{console.error("[session-store] SIGINT received — cleaning up PTY sessions"),g()})),a.s(["createSession",0,function(a,d,g,h,i,j,k,l,m){f(a);let{command:n,args:o}=(0,c.resolveSpawnTargetSync)(d,g),p=new b.PtySession(a,n,o,h,i,j,k,l,m);return e.set(a,p),p},"destroyAllSessions",0,g,"destroySession",0,f,"getSession",0,function(a){return e.get(a)}])},312369,a=>{"use strict";var b=a.i(761469);async function c(a,c){let d=await b.db.systemConfig.findUnique({where:{key:a}});if(!d)return c;try{return JSON.parse(d.value)}catch{return c}}a.s(["readConfigValue",0,c])},640545,a=>a.a(async(b,c)=>{try{var d=a.i(823615);a.i(117738);var e=b([d]);[d]=e.then?(await e)():e,a.s(["broadcastNotification",()=>d.broadcastNotification]),c()}catch(a){c(a)}},!1)];

//# sourceMappingURL=%5Broot-of-the-server%5D__0qp5cw1._.js.map