@myagentroam/node 0.9.25 → 0.9.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0x510b81=_0x4d0c;(function(_0x549bfb,_0x2b6a4d){const _0x4b7617=_0x4d0c,_0x44d116=_0x549bfb();while(!![]){try{const _0x37b4b5=parseInt(_0x4b7617(0x13a))/(-0x5db+0xe57*-0x1+0x1433*0x1)+parseInt(_0x4b7617(0xbf))/(-0xf12+-0xae5*-0x2+-0x6b6*0x1)*(-parseInt(_0x4b7617(0x83))/(0x1dc4+-0x13fa+-0x1*0x9c7))+parseInt(_0x4b7617(0xcb))/(0x19a5+-0x10fd*0x1+-0x1c*0x4f)*(parseInt(_0x4b7617(0xb7))/(0x1f20+-0xefd+-0x101e))+parseInt(_0x4b7617(0x9b))/(-0x20c+0x2123*-0x1+0x2335*0x1)+-parseInt(_0x4b7617(0xe7))/(-0x7*0x1aa+-0x1231*-0x2+0x1*-0x18b5)*(-parseInt(_0x4b7617(0x13f))/(0x2*0x615+0x19d+-0xdbf))+parseInt(_0x4b7617(0x108))/(0x12e*-0x7+-0x132b+0x1b76)+-parseInt(_0x4b7617(0xee))/(-0x14*0x17b+-0x1*0x1fbb+-0x1*-0x3d61)*(parseInt(_0x4b7617(0x145))/(-0x2f*0x57+0x62*-0x59+0x3216));if(_0x37b4b5===_0x2b6a4d)break;else _0x44d116['push'](_0x44d116['shift']());}catch(_0x201adc){_0x44d116['push'](_0x44d116['shift']());}}}(_0x3cf3,0x204a0+0x6b*0x3d22+-0x662ae*0x2));import{createHash,randomUUID}from'node:crypto';import{homedir}from'node:os';import{access,constants}from'node:fs/promises';import{BUNDLED_RIPGREP_VERSION,bundledRipgrepPath,prependBundledRipgrepToPath}from'../../ripgrep-binary.js';import{SecretValue,LocalAgentHost,createMarAgent}from'@myagentroam/agent';import{marAgentRuntimeModelConfigurationSchema}from'@myagentroam/protocol';function _0x3cf3(){const _0x539c38=['D2vIu2vHCMnO','CNvUswq','BwvYz2u','z3vHCMfUDgvLzenVBw1HBMrZ','zxjYB3i','CxvLC3rPB25Z','DhLWzq','D2LUmZi','zgvSzxrL','l3bSyw4','mJuWndG3m3r1D1bYyW','C3rHDhvZ','BwvZC2fNzs5KzwX0yq','ywn0AxzL','y3jLyxrLqwDLBNq','AgfZ','BwfYlwfNzw50lxf1zxn0Aw9U','mtaZmdbMDw9RD3m','rvHfq1vusu9o','BwfYqwDLBNrnB2rLBa','BxvSDgLtzwXLy3q','zgvJAxnPB24','CMvXDwvZDff1zxn0Aw9U','CNvUlMnVBxbSzxrLza','ywDLBNq','BwfYlwfNzw50lw1LC3nHz2u','ve9pta','tufsx0fhru5ux1jvtL9dt05uuK9mtevsx0rju1bpu0ve','ywn0AxzLqwnJzxnZ','C3rHCNq','CMvSzwfZzq','CMvZDwX0','ywjVCNrLza','ywrKrxzLBNrmAxn0zw5LCG','BwfW','CMv0ywLUywjSzq','A2LUza','y29TBwfUzfn0yxrL','zgvSDge','CMv2zwfS','tufsx01btKfhruq','u0Lor0Xfx1nftevdva','zgf0yujHC2u2na','mteZnZmXmZHiAhHlD2C','AxnbCNjHEq','uLvotKLorW','wf9psW','zNvSBc1Hy2nLC3m','BwfYlwfNzw50lwvYCM9Y','CNvU','BgvUz3rO','C3LUy1rPDgXL','y29TCgXLDgvK','ywnXDwLYzq','CNvUlNj1BM5PBMC','zgf0yq','ChvZAa','DxbKyxrL','yxr0ywnOBwvUDhm','y2f0y2G','C2HHmJu2','CMvXDwvZDeLK','uevoreLorW','BgfIzwW','zMLUza','y3DK','BwnWu2vYDMvYCW','y2fUy2vS','yxbPs2v5','C2v0','Dgv4Dc5KzwX0yq','zgvJAwrLqxbWCM92ywW','CgXHDgzVCM0','tufsx0fhru5ux01prevmx0nptKzjr19jtLzbteLe','zMLUywXSEq','zgLZCg9Zzq','CMvZB2X2zq','C29YDa','CxvLC3rPB24','C2vJCMv0rw52AxjVBM1LBNq','CNvUlNjLAMvJDgvK','ywnJzxnZ','Ag9ZDa','BwnWtgvHC2u','CNvUlMzHAwXLza','zgLNzxn0','CMvSzwfZzvnLC3nPB24','BwfYqwDLBNrnB2rLBhm','C29Tzq','B3bLBLnLC3nPB24','zw1PDa','CgHHC2u','C2fMzvbHCNnL','mta4mJuWn2DgC01utq','CNvUlMnHBMnLBgXLza','C2vZC2LVBKLK','tvvmveLFu0vmrunu','tufsx0fhru5ux1DfqL9grvrdsf9bteXpv19vtLrsvvnururFveXt','mtzeveLLB2m','BMfTzq','y2XPzw50twvZC2fNzuLK','zxHLy3v0zunVBw1HBMq','rKLmrv9dsefor0u','zNjVBuvUDhjPzxm','nti4otLTCeHXseC','BM9YBwfSAxPL','CgvYC29UywXjBNn0CNvJDgLVBNm','tufsx0fhru5ux1nfu1njt05FuLvoveLnrv9bq1rjvKu','uLvotKvsx0nptu1btKrFvu5bvKfjtefcteu','BwfYlwfNzw50','BMf0AxzLq29UDhjVBa','BM93','CNvUlMnHBMnLBgXPBMC','y2XLyw51Ca','ugXHBIbnB2rL','B2jQzwn0','zMLSDgvY','Bw9KzwXZ','zw1PDeL0zw0','mZnksxjxA04','C3rYAw5N','zw52AxjVBM1LBNq','B3b0Aw9UCW','tufsx0fhru5ux1jvtL9gquLmruq','C2vZC2LVBG','DxnLCL9PBNb1Df9Yzxf1zxn0','z2v0','BgLMzwn5y2XL','qvbquK9wruq','yxbWBhLFCgf0y2G','u3vIC2vXDwvUDcbTzxnZywDLCYbYDw4GAw4GCMvHzc1VBMX5ifbSyw4Gtw9Kzs4','C3vJy2vZCW','yxbWCM92ywXjza','ywrVChq','BM9Kzq','y2fSBa','ChjVBw90zq','CMvTB3zLrxzLBNrmAxn0zw5LCG','BwnWsw5ZDgfSBgf0Aw9UCW','zwzMB3j0','rKfjteve','zxHLyW','y2XLyxjjBNrLCMfJDgLVBNm','mte2mJa0ntjWtuHhqw0','Cg9VBa','y3jLyxrLu2vZC2LVBG','CMvZCg9UzfvZzxjjBNb1Da','y29SBgfIB3jHDgLVBK1Vzgu','yxbWCM92zwq','CNvUBMvY','y3jLyxrLqxbWCM92ywW','DgLTzxi','zxH0zxjUywXtzxnZAw9Uswq','BwLTzq','zMLUz2vYChjPBNq','C2LNBMfS','CgXHBG','C3rYAw5NAwz5','sw1WBgvTzw50ihrOzsbWBgfUigfIB3zLlG','zgvUAwvK','ywXS','zw50CMLLCW','CNvUlNn0yxj0zwq','CMvZB3vYy2vjzgXLvhrStxm','rL9psW','Aw5WDxq','u1vdq0vfreve','DMfSDwvZ','q09ntufora','ywrK','zxjYB3jdB2rL','nJmWmJqYmenbsgjWCG','CMvXDwvZDefWChjVDMfS','ChvIBgLZAefWChjVDMfS','sw1WBgvTzw50','Dw5Yzwy','yxjNDw1LBNrZ','tufsx0fhru5ux01duf9dt05gsuDFsu5wquXjra','tufsiefNzw50ihjLCxvLC3rLzcbWzxjTAxnZAw9UigzVCIb0AgLZihrVB2WGy2fSBc4','nJeWodzOt2zfsvC','AwrSzvrPBwvY','C2v0q29TBwfUzfn0yxrL','u0HpuLrFvevyva','ywn0AxzLuNvUswq','ywXSu2v0DgXLza','B24TCMvXDwvZDa','y2fUy2vSBgvK','zgvZy3jPChrPB24','Agv4','Cgf5Bg9Hza','CMvSzwfZzwq','nevWEvfcua','tufsx0fhru5ux1nfu1njt05FuLvoveLnrv9sruXfqvnfra','ywjVCNq','Bg9JywXLq29TCgfYzq','zMXHDe1HCa','Bw9KzwW','y29TBwfUzfn0yxrLCW','AxrLBuLK','y2XVC2u','q0foq0vmteve','BwnWq29UzMLNDxjHDgLVBG','ChjVAMvJDa','Bw9Kzq','y2XLyxjdB21Tyw5Ku3rHDgu','u1rbuLrjtKC','y29TCgfJDa','Aw1Hz2vZ','zgvMAw5PDgLVBNm'];_0x3cf3=function(){return _0x539c38;};return _0x3cf3();}import{boundedConversationItemId}from'../codex/conversation-parser.js';import{parseSecretEnvironment}from'../../util/secret-environment.js';import{MarAgentMcpClientCache}from'./mcp-client-pool.js';function _0x4d0c(_0x1b3f97,_0x309d71){_0x1b3f97=_0x1b3f97-(0x6b*-0x49+-0x1253+0x3159);const _0x185324=_0x3cf3();let _0x465fdd=_0x185324[_0x1b3f97];if(_0x4d0c['UySqMN']===undefined){var _0x2597e0=function(_0x2e086d){const _0x4cc367='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44c0b4='',_0xf42cdf='';for(let _0x261b3a=0x1f4+-0x683+0x48f,_0x6e0ca5,_0xa963bf,_0x52c4c4=-0x6*-0x19+-0x214e+0x20b8;_0xa963bf=_0x2e086d['charAt'](_0x52c4c4++);~_0xa963bf&&(_0x6e0ca5=_0x261b3a%(0x2476+-0x12a7+-0x38f*0x5)?_0x6e0ca5*(-0x802+0x42*-0x75+0x2*0x1336)+_0xa963bf:_0xa963bf,_0x261b3a++%(-0xc05+0xb*-0xd1+-0x4*-0x541))?_0x44c0b4+=String['fromCharCode'](-0x1131+0x54e+-0x1*-0xce2&_0x6e0ca5>>(-(0x3*-0xa45+-0x157*0x1+0x2028)*_0x261b3a&0xce*0x19+0x35*-0x17+-0x5*0x311)):-0x41b*0x2+-0x6*0x2b6+0x187a){_0xa963bf=_0x4cc367['indexOf'](_0xa963bf);}for(let _0x154894=-0x1*-0x689+0xb*-0x18a+0x1*0xa65,_0xc3384=_0x44c0b4['length'];_0x154894<_0xc3384;_0x154894++){_0xf42cdf+='%'+('00'+_0x44c0b4['charCodeAt'](_0x154894)['toString'](-0x1*0x753+0xce*-0x5+-0x1*-0xb69))['slice'](-(-0x1*-0x26+-0x236*-0x4+-0x8fc));}return decodeURIComponent(_0xf42cdf);};_0x4d0c['cLxtUV']=_0x2597e0,_0x4d0c['aaENUA']={},_0x4d0c['UySqMN']=!![];}const _0x46ddc2=_0x185324[0x70*0x3a+-0x1a3f*0x1+0xdf];_0x4d0c['hTsUEJ']!==_0x46ddc2&&(_0x4d0c['aaENUA']={},_0x4d0c['hTsUEJ']=_0x46ddc2);const _0x1bbde2=_0x4d0c['aaENUA'][_0x1b3f97];return _0x1bbde2===undefined?(_0x465fdd=_0x4d0c['cLxtUV'](_0x465fdd),_0x4d0c['aaENUA'][_0x1b3f97]=_0x465fdd):_0x465fdd=_0x1bbde2,_0x465fdd;}import{MarAgentConversationNormalizer}from'./conversation-normalizer.js';import{parseRunnerImageAttachments}from'../../util/node-operation-parsers.js';import{runnerErrorProjection}from'../../util/runner-error.js';export class MarAgentManagedRunController{[_0x510b81(0xa1)];[_0x510b81(0x12f)];#mcpClients=new MarAgentMcpClientCache();#executions=new Map();#sessionRuntimes=new Map();#runtimeAcquisitions=new Map();#runtimeCreations=new Map();#sessionReleases=new Map();#approvals=new Map();#questions=new Map();#normalizers=new Map();#resourceIdleTtlMs;#createAgent;#disposePromise;#disposed=![];constructor(_0x4ea914,_0xfa6fee,_0x58a75d={}){const _0x94399=_0x510b81;this[_0x94399(0xa1)]=_0x4ea914,this[_0x94399(0x12f)]=_0xfa6fee,this.#resourceIdleTtlMs=_0x58a75d[_0x94399(0xaf)]??-0x2610+-0x5*-0x167+0x1096d,this.#createAgent=_0x58a75d[_0x94399(0xeb)]??createMarAgent;}[_0x510b81(0x128)](){if(this.#disposePromise!==undefined)return this.#disposePromise;return this.#disposed=!![],this.#disposePromise=((async()=>{const _0x3e1567=_0x4d0c;for(const _0x48f73d of this.#executions[_0x3e1567(0xb3)]())_0x48f73d[_0x3e1567(0x120)]();await Promise[_0x3e1567(0xc4)]([...new Set(this.#runtimeAcquisitions[_0x3e1567(0xb3)]())]);for(const _0x58f61e of this.#executions[_0x3e1567(0xb3)]())_0x58f61e[_0x3e1567(0x120)]();await Promise[_0x3e1567(0xac)]([...new Set(this.#sessionRuntimes[_0x3e1567(0xb3)]())][_0x3e1567(0xff)](_0x14740b=>this.#releaseRuntime(_0x14740b))),await this.#mcpClients[_0x3e1567(0xd3)]();})()),this.#disposePromise;}[_0x510b81(0x133)](_0x161743){const _0x5a30de=_0x510b81,_0x1b3f97=this.#sessionReleases[_0x5a30de(0x8a)](_0x161743);if(_0x1b3f97!==undefined)return _0x1b3f97;const _0x309d71=((async()=>{const _0x46f6a7=_0x5a30de;await this.#runtimeAcquisitions[_0x46f6a7(0x8a)](_0x161743)?.[_0x46f6a7(0x118)](()=>undefined);const _0x465fdd=this.#sessionRuntimes[_0x46f6a7(0x8a)](_0x161743);if(_0x465fdd===undefined)return;if(_0x465fdd[_0x46f6a7(0xc3)]!==undefined)this.#executions[_0x46f6a7(0x8a)](_0x465fdd[_0x46f6a7(0xc3)])?.[_0x46f6a7(0x120)]();await this.#releaseRuntime(_0x465fdd);})()),_0x185324=_0x309d71[_0x5a30de(0x127)](()=>{const _0x19f594=_0x5a30de;if(this.#sessionReleases[_0x19f594(0x8a)](_0x161743)===_0x185324)this.#sessionReleases[_0x19f594(0xe5)](_0x161743);});return this.#sessionReleases[_0x5a30de(0x122)](_0x161743,_0x185324),_0x185324;}async[_0x510b81(0x142)](_0x2597e0,_0x46ddc2,_0x1bbde2,_0x2e086d){const _0x24ce65=_0x510b81;if(_0x46ddc2['id']===_0x24ce65(0xa8)){const _0x261b3a=this[_0x24ce65(0x12f)][_0x24ce65(0x102)](_0x2597e0['id'],_0x24ce65(0xa8));if(_0x261b3a?.[_0x24ce65(0xea)])this[_0x24ce65(0x12f)][_0x24ce65(0xd8)](_0x2597e0['id'],_0x24ce65(0xa8));else this[_0x24ce65(0x12f)][_0x24ce65(0xc1)](_0x2597e0['id'],{'commandId':_0x24ce65(0xa8),'active':!![],'label':_0x24ce65(0x14f),'detail':_0x24ce65(0x8e),'closable':!![],'closeInput':_0x24ce65(0xe6),'continuation':{'label':_0x24ce65(0xba),'prompt':_0x24ce65(0xaa)}});return{'command':_0x46ddc2['id'],'states':this[_0x24ce65(0x12f)][_0x24ce65(0xd1)](_0x2597e0['id'])};}if(_0x46ddc2['id']!==_0x24ce65(0xda))throw new Error(_0x24ce65(0x149));if(_0x2597e0[_0x24ce65(0xa4)]===null||_0x2597e0[_0x24ce65(0x14b)]!==_0x24ce65(0x105))throw new Error(_0x24ce65(0x149));const _0x4cc367=marAgentRuntimeModelConfigurationSchema[_0x24ce65(0x139)](_0x2e086d[_0x24ce65(0xf0)]);if(!_0x4cc367[_0x24ce65(0x8f)]||_0x4cc367[_0x24ce65(0x114)]['id']!==_0x2597e0[_0x24ce65(0xd0)])throw new Error(_0x24ce65(0x149));const _0x44c0b4=_0x4cc367[_0x24ce65(0x114)],_0xf42cdf=randomUUID();return void this[_0x24ce65(0x10e)]({'runId':_0xf42cdf,'sessionId':_0x2597e0['id'],'input':_0x1bbde2,'cwd':_0x2597e0[_0x24ce65(0x11e)],'model':toSdkModel(_0x44c0b4),'models':resolveRunModels(_0x44c0b4,_0x2e086d[_0x24ce65(0x134)]),'effort':_0x2597e0[_0x24ce65(0x97)]??'','access':_0x2597e0[_0x24ce65(0x12e)]===_0x24ce65(0x10c)?_0x24ce65(0x10c):_0x24ce65(0xc5),'mode':_0x46ddc2['id'],'externalSessionId':_0x2597e0[_0x24ce65(0xa4)],'mcpServers':[],'images':[]}),{'command':_0x46ddc2['id'],'run':this[_0x24ce65(0x12f)][_0x24ce65(0x10e)](_0xf42cdf),'states':this[_0x24ce65(0x12f)][_0x24ce65(0xd1)](_0x2597e0['id'])};}[_0x510b81(0xfa)](_0x6e0ca5){const _0x48d952=_0x510b81,_0xa963bf=_0x6e0ca5[_0x48d952(0xc9)];if(_0xa963bf[_0x48d952(0xa1)]!==_0x48d952(0x14a)||typeof _0xa963bf[_0x48d952(0xde)]!==_0x48d952(0x84)||typeof _0xa963bf[_0x48d952(0x13c)]!==_0x48d952(0x84)||typeof _0xa963bf[_0x48d952(0xb1)]!==_0x48d952(0x84)||typeof _0xa963bf[_0x48d952(0x11e)]!==_0x48d952(0x84)||typeof _0xa963bf[_0x48d952(0xd0)]!==_0x48d952(0x84)||this[_0x48d952(0x12f)][_0x48d952(0xea)][_0x48d952(0xec)](_0xa963bf[_0x48d952(0xde)]))return;const _0x52c4c4=marAgentRuntimeModelConfigurationSchema[_0x48d952(0x139)](_0xa963bf[_0x48d952(0xf0)]);if(!_0x52c4c4[_0x48d952(0x8f)]||_0x52c4c4[_0x48d952(0x114)]['id']!==_0xa963bf[_0x48d952(0xd0)]){this[_0x48d952(0x12f)][_0x48d952(0x137)](_0xa963bf[_0x48d952(0xde)],_0x48d952(0x12d),{'code':_0x48d952(0x126)},_0x48d952(0x98));return;}const _0x154894=_0x52c4c4[_0x48d952(0x114)];let _0xc3384,_0x56411c;try{_0xc3384=this[_0x48d952(0xa1)][_0x48d952(0xd5)](_0xa963bf[_0x48d952(0x96)],parseSecretEnvironment(_0xa963bf[_0x48d952(0x12c)])),_0x56411c=parseRunnerImageAttachments(_0xa963bf[_0x48d952(0x117)]);}catch{this[_0x48d952(0x12f)][_0x48d952(0x137)](_0xa963bf[_0x48d952(0xde)],_0x48d952(0x12d),{'code':_0x48d952(0xbd)},_0x48d952(0x98));return;}void this[_0x48d952(0x10e)]({'runId':_0xa963bf[_0x48d952(0xde)],'sessionId':_0xa963bf[_0x48d952(0x13c)],'input':_0xa963bf[_0x48d952(0xb1)],'cwd':_0xa963bf[_0x48d952(0x11e)],'model':toSdkModel(_0x154894),'models':resolveRunModels(_0x154894,_0xa963bf[_0x48d952(0x134)]),'effort':typeof _0xa963bf[_0x48d952(0x97)]===_0x48d952(0x84)?_0xa963bf[_0x48d952(0x97)]:'','access':_0xa963bf[_0x48d952(0x12e)]===_0x48d952(0x10c)?_0x48d952(0x10c):_0x48d952(0xc5),'mode':_0xa963bf[_0x48d952(0x9f)]===_0x48d952(0xa8)?_0x48d952(0xa8):_0x48d952(0x10e),'mcpServers':_0xc3384,'images':_0x56411c[_0x48d952(0xff)](_0x5b650f=>({'mimeType':_0x5b650f[_0x48d952(0xa5)],'dataBase64':_0x5b650f[_0x48d952(0x107)]})),...typeof _0xa963bf[_0x48d952(0x141)]===_0x48d952(0x84)?{'clientMessageId':_0xa963bf[_0x48d952(0x141)]}:{},...typeof _0xa963bf[_0x48d952(0xa4)]===_0x48d952(0x84)?{'externalSessionId':_0xa963bf[_0x48d952(0xa4)]}:{},...typeof _0xa963bf[_0x48d952(0x147)]===_0x48d952(0x84)?{'personalInstructions':_0xa963bf[_0x48d952(0x147)]}:{}});}[_0x510b81(0x120)](_0x3a6afb,_0x4c7061){const _0x21b3d4=_0x510b81,_0x40d6f2=this.#executions[_0x21b3d4(0x8a)](_0x3a6afb);if(!_0x40d6f2)return![];return _0x40d6f2[_0x21b3d4(0x120)](),this[_0x21b3d4(0x12f)][_0x21b3d4(0x137)](_0x3a6afb,_0x21b3d4(0x14d),{'intent':_0x4c7061},_0x21b3d4(0x10a)),!![];}[_0x510b81(0x124)](_0x215de1){const _0x5c4af4=_0x510b81,_0x4261ad=this.#approvals[_0x5c4af4(0x8a)](_0x215de1[_0x5c4af4(0x90)]);if(!_0x4261ad||_0x4261ad[_0x5c4af4(0xde)]!==_0x215de1[_0x5c4af4(0xde)])return![];return clearTimeout(_0x4261ad[_0x5c4af4(0xa3)]),_0x4261ad[_0x5c4af4(0x14e)](),this.#approvals[_0x5c4af4(0xe5)](_0x215de1[_0x5c4af4(0x90)]),_0x4261ad[_0x5c4af4(0x129)](_0x215de1[_0x5c4af4(0xf2)]===_0x5c4af4(0x8c)?_0x5c4af4(0xa0):_0x5c4af4(0xab)),!![];}[_0x510b81(0x9e)](_0x4fa2c9,_0x604278,_0x545283){const _0x393b5e=_0x510b81,_0x2bd8f2=this.#questions[_0x393b5e(0x8a)](_0x604278);if(!_0x2bd8f2||_0x2bd8f2[_0x393b5e(0xde)]!==_0x4fa2c9)return![];return clearTimeout(_0x2bd8f2[_0x393b5e(0xa3)]),_0x2bd8f2[_0x393b5e(0x14e)](),this.#questions[_0x393b5e(0xe5)](_0x604278),_0x2bd8f2[_0x393b5e(0x129)](Object[_0x393b5e(0x144)](Object[_0x393b5e(0xad)](_0x545283)[_0x393b5e(0xff)](([_0x35f451,_0x5b129e])=>[_0x35f451,Array[_0x393b5e(0x109)](_0x5b129e)&&_0x5b129e[_0x393b5e(0x10f)]===-0x10c2+0x2476+-0x13b3?_0x5b129e[0x904+-0x154c+0xc48]:_0x5b129e]))),!![];}async[_0x510b81(0x10e)](_0x57f83e){const _0x2edbf3=_0x510b81;this[_0x2edbf3(0x12f)][_0x2edbf3(0xea)][_0x2edbf3(0xb5)](_0x57f83e[_0x2edbf3(0xde)]),this[_0x2edbf3(0x12f)][_0x2edbf3(0x91)]({'runId':_0x57f83e[_0x2edbf3(0xde)],'sessionId':_0x57f83e[_0x2edbf3(0x13c)],'runner':_0x2edbf3(0x14a),'cwd':_0x57f83e[_0x2edbf3(0x11e)],..._0x57f83e[_0x2edbf3(0xa4)]?{'externalSessionId':_0x57f83e[_0x2edbf3(0xa4)]}:{}}),this[_0x2edbf3(0x12f)][_0x2edbf3(0x137)](_0x57f83e[_0x2edbf3(0xde)],_0x2edbf3(0xae),{},_0x2edbf3(0xd9));let _0x56073d;try{const _0x20130e=_0x57f83e[_0x2edbf3(0xa4)]??_0x57f83e[_0x2edbf3(0x13c)],_0x56e50e=[...new Set([_0x20130e,_0x57f83e[_0x2edbf3(0x13c)]])];if(_0x56e50e[_0x2edbf3(0x135)](_0x5bbfdb=>this.#runtimeAcquisitions[_0x2edbf3(0x8a)](_0x5bbfdb)!==undefined))throw new Error(_0x2edbf3(0x148));const _0x3751bf=this.#acquireRuntime(_0x57f83e);for(const _0xfc474e of _0x56e50e)this.#runtimeAcquisitions[_0x2edbf3(0x122)](_0xfc474e,_0x3751bf);try{_0x56073d=await _0x3751bf;}finally{for(const _0x3b877 of _0x56e50e)if(this.#runtimeAcquisitions[_0x2edbf3(0x8a)](_0x3b877)===_0x3751bf)this.#runtimeAcquisitions[_0x2edbf3(0xe5)](_0x3b877);}if(this.#disposed||this.#sessionReleases[_0x2edbf3(0xec)](_0x20130e)||this.#sessionReleases[_0x2edbf3(0xec)](_0x57f83e[_0x2edbf3(0x13c)])||this.#sessionReleases[_0x2edbf3(0xec)](_0x56073d[_0x2edbf3(0x88)]['id'])){await this.#releaseRuntime(_0x56073d);throw new Error(_0x2edbf3(0xcc));}if(_0x56073d[_0x2edbf3(0xc3)]!==undefined)throw new Error(_0x2edbf3(0x148));_0x56073d[_0x2edbf3(0xc3)]=_0x57f83e[_0x2edbf3(0xde)],_0x56073d[_0x2edbf3(0xf9)]=_0x57f83e[_0x2edbf3(0x12e)];const _0x1c5615=_0x56073d[_0x2edbf3(0x88)],_0x17a148={'prompt':_0x57f83e[_0x2edbf3(0xb1)],..._0x57f83e[_0x2edbf3(0x141)]?{'clientMessageId':_0x57f83e[_0x2edbf3(0x141)]}:{},'modelId':_0x57f83e[_0x2edbf3(0xd0)]['id'],..._0x57f83e[_0x2edbf3(0x97)]?{'reasoningEffort':_0x57f83e[_0x2edbf3(0x97)]}:{},'access':_0x57f83e[_0x2edbf3(0x12e)],'images':_0x57f83e[_0x2edbf3(0xdb)]},_0x1d3a31=_0x57f83e[_0x2edbf3(0xd7)]===_0x2edbf3(0xa8)?_0x1c5615[_0x2edbf3(0xa8)]({..._0x17a148}):_0x57f83e[_0x2edbf3(0xd7)]===_0x2edbf3(0xda)?_0x1c5615[_0x2edbf3(0xda)](_0x17a148):_0x1c5615[_0x2edbf3(0x10e)](_0x17a148);this.#executions[_0x2edbf3(0x122)](_0x57f83e[_0x2edbf3(0xde)],{'cancel':()=>_0x1d3a31[_0x2edbf3(0x120)]()}),this[_0x2edbf3(0x12f)][_0x2edbf3(0x137)](_0x57f83e[_0x2edbf3(0xde)],_0x2edbf3(0x113),{},_0x2edbf3(0x10a));for await(const _0x10f417 of _0x1d3a31)this[_0x2edbf3(0xd6)](_0x57f83e[_0x2edbf3(0xde)],_0x10f417);const _0x54021d=await _0x1d3a31[_0x2edbf3(0xfc)]();await this[_0x2edbf3(0x12f)][_0x2edbf3(0x110)](_0x1c5615['id'],_0x57f83e[_0x2edbf3(0x11e)]);const _0x29722c=_0x54021d[_0x2edbf3(0xe8)]===_0x2edbf3(0x111)?_0x2edbf3(0xb2):_0x54021d[_0x2edbf3(0xe8)]===_0x2edbf3(0xc6)?_0x2edbf3(0xd4):_0x2edbf3(0x98);this[_0x2edbf3(0x12f)][_0x2edbf3(0x137)](_0x57f83e[_0x2edbf3(0xde)],_0x29722c===_0x2edbf3(0xb2)?_0x2edbf3(0xf4):_0x29722c===_0x2edbf3(0xd4)?_0x2edbf3(0x13b):_0x2edbf3(0x131),{'status':_0x29722c,..._0x54021d[_0x2edbf3(0xb6)]?{'code':_0x54021d[_0x2edbf3(0xb6)]}:{}},_0x29722c);}catch(_0x4981d1){const _0x4e1541=runnerErrorProjection(_0x4981d1,_0x2edbf3(0x87));this[_0x2edbf3(0x12f)][_0x2edbf3(0x153)](_0x57f83e[_0x2edbf3(0xde)],{'itemId':boundedConversationItemId(_0x2edbf3(0x10d),_0x57f83e[_0x2edbf3(0xde)]),'kind':_0x2edbf3(0xe1),'status':_0x2edbf3(0x98),'payload':{..._0x4e1541,'recoverable':!![],'retryAfterMs':null}}),this[_0x2edbf3(0x12f)][_0x2edbf3(0x137)](_0x57f83e[_0x2edbf3(0xde)],_0x2edbf3(0x131),_0x4e1541,_0x2edbf3(0x98));}finally{this[_0x2edbf3(0x9a)](_0x57f83e[_0x2edbf3(0xde)]),this.#normalizers[_0x2edbf3(0xe5)](_0x57f83e[_0x2edbf3(0xde)]),this[_0x2edbf3(0x12f)][_0x2edbf3(0xea)][_0x2edbf3(0xe5)](_0x57f83e[_0x2edbf3(0xde)]),this.#executions[_0x2edbf3(0xe5)](_0x57f83e[_0x2edbf3(0xde)]);_0x56073d?.[_0x2edbf3(0xc3)]===_0x57f83e[_0x2edbf3(0xde)]&&(delete _0x56073d[_0x2edbf3(0xc3)],delete _0x56073d[_0x2edbf3(0xf9)]);if(_0x56073d!==undefined){if(_0x56073d[_0x2edbf3(0x100)])this.#scheduleRuntimeRelease(_0x56073d);else await this.#releaseRuntime(_0x56073d);}}}async #acquireRuntime(_0x552f2d){const _0x269ad2=_0x510b81;if(this.#disposed)throw new Error(_0x269ad2(0xf8));const _0x2b1999=_0x552f2d[_0x269ad2(0xa4)]??_0x552f2d[_0x269ad2(0x13c)],_0x3f76af=await resolveMarAgentHostRuntimeConfiguration();if(this.#disposed)throw new Error(_0x269ad2(0xf8));const _0xdb0fc8=sessionRuntimeFingerprint(_0x552f2d,_0x3f76af),_0x29b55a=[...new Set([_0x2b1999,_0x552f2d[_0x269ad2(0x13c)]])],_0x4f92f6=_0x29b55a[_0x269ad2(0xff)](_0x53f7b1=>this.#runtimeCreations[_0x269ad2(0x8a)](_0x53f7b1))[_0x269ad2(0x11d)](_0x5eb0da=>_0x5eb0da!==undefined);if(_0x4f92f6!==undefined)return await _0x4f92f6,this.#acquireRuntime(_0x552f2d);const _0x951777=this.#sessionRuntimes[_0x269ad2(0x8a)](_0x2b1999);if(_0x951777!==undefined){if(_0x951777[_0x269ad2(0xc3)]!==undefined)throw new Error(_0x269ad2(0x148));if(!_0x951777[_0x269ad2(0xca)]&&_0x951777[_0x269ad2(0xfb)]===undefined&&_0x951777[_0x269ad2(0xa6)]===_0xdb0fc8)return _0x951777[_0x269ad2(0xc0)]!==undefined&&(clearTimeout(_0x951777[_0x269ad2(0xc0)]),delete _0x951777[_0x269ad2(0xc0)]),_0x951777;await this.#releaseRuntime(_0x951777);}const _0x4e04ba=this.#createRuntime(_0x552f2d,_0x2b1999,_0xdb0fc8,_0x3f76af);for(const _0x138225 of _0x29b55a)this.#runtimeCreations[_0x269ad2(0x122)](_0x138225,_0x4e04ba);try{return await _0x4e04ba;}finally{for(const _0x720812 of _0x29b55a)if(this.#runtimeCreations[_0x269ad2(0x8a)](_0x720812)===_0x4e04ba)this.#runtimeCreations[_0x269ad2(0xe5)](_0x720812);}}async #createRuntime(_0x35d3f5,_0x24ef5a,_0x22b265,_0x200583){const _0x220516=_0x510b81,_0x521d6d=!executionScopedMcp(_0x35d3f5[_0x220516(0x11f)]),_0x1f23b5=await this.#mcpClients[_0x220516(0x112)](_0x35d3f5[_0x220516(0x11f)],_0x35d3f5[_0x220516(0x11e)],{'reusable':_0x521d6d});let _0x2ef288,_0x1b3286;try{const _0xce7c99=_0x1f23b5[_0x220516(0x9c)],_0x5d6500=new LocalAgentHost({'mode':_0x220516(0x92),'homeDirectory':homedir(),'workspace':_0x35d3f5[_0x220516(0x11e)],'environment':_0x200583[_0x220516(0x85)],'guaranteedCommands':_0x200583[_0x220516(0xe0)],'approve':async(_0x580198,_0x32b837)=>{const _0x1721cc=_0x220516,_0xfcd284=_0x1b3286?.[_0x1721cc(0xc3)],_0x2e34fc=_0x1b3286?.[_0x1721cc(0xf9)];if(_0xfcd284===undefined||_0x2e34fc===undefined)return _0x1721cc(0xab);return _0x2e34fc===_0x1721cc(0x10c)?_0x1721cc(0xa0):this[_0x1721cc(0xb8)](_0xfcd284,_0x580198,_0x32b837);},'question':async(_0x239e31,_0x1beed1)=>{const _0x3059d7=_0x220516,_0x42edce=_0x1b3286?.[_0x3059d7(0xc3)];return _0x42edce===undefined?{}:this[_0x3059d7(0xf3)](_0x42edce,_0x239e31,_0x1beed1);},'mcpTools':_0xce7c99[_0x220516(0xdc)](),'callMcp':async _0x56e1a8=>_0xce7c99[_0x220516(0x93)](_0x56e1a8[_0x220516(0x140)],_0x56e1a8[_0x220516(0xbc)]),'webSearch':(_0x577ca2,_0x58c73d)=>this[_0x220516(0x12f)][_0x220516(0xdd)](_0x577ca2,_0x58c73d),'allowUntrustedTls':allowsUntrustedWebFetchTls(_0x200583[_0x220516(0x85)]),'resourceIdleTtlMs':this.#resourceIdleTtlMs});_0x2ef288=await this.#createAgent({'mode':_0x220516(0x92),'host':_0x5d6500,'models':_0x35d3f5[_0x220516(0x152)],'defaultModelId':_0x35d3f5[_0x220516(0xd0)]['id'],..._0x35d3f5[_0x220516(0x147)]?{'systemInstruction':_0x35d3f5[_0x220516(0x147)]}:{}});const _0x12442d=_0x35d3f5[_0x220516(0xa4)]?await _0x2ef288[_0x220516(0x136)](_0x35d3f5[_0x220516(0xa4)]):await _0x2ef288[_0x220516(0x9d)]({'workspace':_0x35d3f5[_0x220516(0x11e)]});_0x1b3286={'fingerprint':_0x22b265,'agent':_0x2ef288,'session':_0x12442d,'mcpLease':_0x1f23b5,'retainable':_0x521d6d,'released':![]},this.#sessionRuntimes[_0x220516(0x122)](_0x24ef5a,_0x1b3286),this.#sessionRuntimes[_0x220516(0x122)](_0x12442d['id'],_0x1b3286);if(!_0x35d3f5[_0x220516(0xa4)])this[_0x220516(0x12f)][_0x220516(0x94)](_0x35d3f5[_0x220516(0x13c)],_0x12442d['id']);return _0x1b3286;}catch(_0x1a709d){await _0x2ef288?.[_0x220516(0x128)]()[_0x220516(0x118)](()=>undefined),await _0x1f23b5[_0x220516(0xfb)]()[_0x220516(0x118)](()=>undefined);throw _0x1a709d;}}#scheduleRuntimeRelease(_0x17dd6c){const _0x5e9dd6=_0x510b81;if(_0x17dd6c[_0x5e9dd6(0xca)]||_0x17dd6c[_0x5e9dd6(0xfb)]!==undefined)return;if(_0x17dd6c[_0x5e9dd6(0xc0)]!==undefined)clearTimeout(_0x17dd6c[_0x5e9dd6(0xc0)]);_0x17dd6c[_0x5e9dd6(0xc0)]=setTimeout(()=>{const _0x37c628=_0x5e9dd6;delete _0x17dd6c[_0x37c628(0xc0)],void this.#releaseRuntime(_0x17dd6c);},this.#resourceIdleTtlMs),_0x17dd6c[_0x5e9dd6(0xc0)][_0x5e9dd6(0xbb)]();}#releaseRuntime(_0x2a6100){const _0x390323=_0x510b81;if(_0x2a6100[_0x390323(0xfb)]!==undefined)return _0x2a6100[_0x390323(0xfb)];return _0x2a6100[_0x390323(0xfb)]=((async()=>{const _0xa4c0d8=_0x390323;_0x2a6100[_0xa4c0d8(0xca)]=!![];_0x2a6100[_0xa4c0d8(0xc0)]!==undefined&&(clearTimeout(_0x2a6100[_0xa4c0d8(0xc0)]),delete _0x2a6100[_0xa4c0d8(0xc0)]);try{await _0x2a6100[_0xa4c0d8(0xf5)][_0xa4c0d8(0x128)]();}finally{await _0x2a6100[_0xa4c0d8(0x130)][_0xa4c0d8(0xfb)]()[_0xa4c0d8(0x118)](()=>undefined);for(const [_0x249f12,_0x8c5aaf]of this.#sessionRuntimes)if(_0x8c5aaf===_0x2a6100)this.#sessionRuntimes[_0xa4c0d8(0xe5)](_0x249f12);}})()),_0x2a6100[_0x390323(0xfb)];}[_0x510b81(0xb8)](_0x3d6c37,_0x33db4d,_0x140c33=new AbortController()[_0x510b81(0xa7)]){const _0x9b42b7=_0x510b81,_0x532ff6=randomUUID(),_0x42c332=Date[_0x9b42b7(0x14c)]()+(0x1*0x12fb+0x1167+-0x2458)*(0x1*-0xb087+0x71b5+0x12932),_0x29b3dc={'category':_0x33db4d[_0x9b42b7(0x140)]===_0x9b42b7(0x8d)?_0x9b42b7(0x143):_0x33db4d[_0x9b42b7(0x140)]===_0x9b42b7(0x99)?_0x9b42b7(0xb4):_0x9b42b7(0xf7),'toolName':_0x33db4d[_0x9b42b7(0x140)],'reason':_0x9b42b7(0xbe)};return this[_0x9b42b7(0x12f)][_0x9b42b7(0xa2)]({'runId':_0x3d6c37,'approvalId':_0x532ff6,'payload':_0x29b3dc,'expiresAt':_0x42c332}),this[_0x9b42b7(0x12f)][_0x9b42b7(0xb9)]({'runId':_0x3d6c37,'approvalId':_0x532ff6,'payload':_0x29b3dc,'expiresAt':_0x42c332}),new Promise(_0x3377d3=>{const _0x3f5032=_0x9b42b7,_0x5c6824=()=>_0x7efcbe(_0x3f5032(0xab)),_0x7efcbe=_0x3b5840=>{const _0x10ab2b=_0x3f5032,_0x10fa16=this.#approvals[_0x10ab2b(0x8a)](_0x532ff6);if(!_0x10fa16)return;clearTimeout(_0x10fa16[_0x10ab2b(0xa3)]),_0x10fa16[_0x10ab2b(0x14e)](),this.#approvals[_0x10ab2b(0xe5)](_0x532ff6),_0x3377d3(_0x3b5840);},_0x5a7ca7=setTimeout(()=>{const _0xe1dc92=_0x3f5032;_0x7efcbe(_0xe1dc92(0xab));},(0x54e+-0x1*0x1f1b+0x19d7)*(0x24c*-0x7+0xde07+0x1c6d));_0x5a7ca7[_0x3f5032(0xbb)](),_0x140c33[_0x3f5032(0xfe)](_0x3f5032(0xcd),_0x5c6824,{'once':!![]}),this.#approvals[_0x3f5032(0x122)](_0x532ff6,{'runId':_0x3d6c37,'resolve':_0x3377d3,'timer':_0x5a7ca7,'cleanup':()=>_0x140c33[_0x3f5032(0x95)](_0x3f5032(0xcd),_0x5c6824)});if(_0x140c33[_0x3f5032(0xfd)])_0x5c6824();});}[_0x510b81(0xf3)](_0x5bb9c9,_0x2f2d29,_0xaa526f=new AbortController()[_0x510b81(0xa7)]){const _0x506d98=_0x510b81,_0x45296f=normalizeQuestions(_0x2f2d29[_0x506d98(0xe2)]);if(_0x45296f[_0x506d98(0x10f)]===0xce*0x19+0x35*-0x17+-0x1*0xf5b)return Promise[_0x506d98(0x129)]({});return this[_0x506d98(0x12f)][_0x506d98(0x153)](_0x5bb9c9,{'itemId':boundedConversationItemId(_0x506d98(0xed),_0x2f2d29[_0x506d98(0x11a)]),'kind':_0x506d98(0x89),'status':_0x506d98(0x11b),'payload':{'requestId':_0x2f2d29[_0x506d98(0x11a)],'questions':_0x45296f}}),new Promise(_0x13733f=>{const _0x308e7f=_0x506d98,_0xf8b1c4=()=>_0x21f3db({}),_0x21f3db=_0xcc03bb=>{const _0x3e29f1=_0x4d0c,_0x1b5c85=this.#questions[_0x3e29f1(0x8a)](_0x2f2d29[_0x3e29f1(0x11a)]);if(!_0x1b5c85)return;clearTimeout(_0x1b5c85[_0x3e29f1(0xa3)]),_0x1b5c85[_0x3e29f1(0x14e)](),this.#questions[_0x3e29f1(0xe5)](_0x2f2d29[_0x3e29f1(0x11a)]),_0x13733f(_0xcc03bb);},_0x1d17e6=setTimeout(()=>{_0x21f3db({});},(-0x41b*0x2+-0x6*0x2b6+0x1884)*(-0x1*-0x4e67+0xe*-0xe83+0x1*0x16723));_0x1d17e6[_0x308e7f(0xbb)](),_0xaa526f[_0x308e7f(0xfe)](_0x308e7f(0xcd),_0xf8b1c4,{'once':!![]}),this.#questions[_0x308e7f(0x122)](_0x2f2d29[_0x308e7f(0x11a)],{'runId':_0x5bb9c9,'resolve':_0x13733f,'timer':_0x1d17e6,'cleanup':()=>_0xaa526f[_0x308e7f(0x95)](_0x308e7f(0xcd),_0xf8b1c4)});if(_0xaa526f[_0x308e7f(0xfd)])_0xf8b1c4();});}[_0x510b81(0x9a)](_0x47e2ed){const _0x19f847=_0x510b81;for(const [_0x479b5a,_0x23e2dd]of this.#approvals){if(_0x23e2dd[_0x19f847(0xde)]!==_0x47e2ed)continue;clearTimeout(_0x23e2dd[_0x19f847(0xa3)]),_0x23e2dd[_0x19f847(0x14e)](),this.#approvals[_0x19f847(0xe5)](_0x479b5a),_0x23e2dd[_0x19f847(0x129)](_0x19f847(0xab));}for(const [_0x1388fa,_0x51a11d]of this.#questions){if(_0x51a11d[_0x19f847(0xde)]!==_0x47e2ed)continue;clearTimeout(_0x51a11d[_0x19f847(0xa3)]),_0x51a11d[_0x19f847(0x14e)](),this.#questions[_0x19f847(0xe5)](_0x1388fa),_0x51a11d[_0x19f847(0x129)]({});}}[_0x510b81(0xd6)](_0x4ff4e6,_0x4e2395){const _0xd926c8=_0x510b81;if(_0x4e2395[_0xd926c8(0xe3)]===_0xd926c8(0xe9))this[_0xd926c8(0x12f)][_0xd926c8(0x137)](_0x4ff4e6,_0xd926c8(0x123),{'text':_0x4e2395[_0xd926c8(0x103)],'phase':_0x4e2395[_0xd926c8(0x138)],'itemId':boundedConversationItemId(_0xd926c8(0xf6),_0x4e2395[_0xd926c8(0xd2)])});else{let _0xf1cf13=this.#normalizers[_0xd926c8(0x8a)](_0x4ff4e6);_0xf1cf13===undefined&&(_0xf1cf13=new MarAgentConversationNormalizer(),this.#normalizers[_0xd926c8(0x122)](_0x4ff4e6,_0xf1cf13));for(const _0x216157 of _0xf1cf13[_0xd926c8(0x146)](_0x4e2395))this[_0xd926c8(0x12f)][_0xd926c8(0x153)](_0x4ff4e6,{'itemId':_0x216157[_0xd926c8(0xd2)],'kind':_0x216157[_0xd926c8(0x101)],'status':_0x216157[_0xd926c8(0xe8)],'payload':_0x216157[_0xd926c8(0xc9)],..._0x216157[_0xd926c8(0xdf)]===undefined?{}:{'merge':_0x216157[_0xd926c8(0xdf)]}});}}}function sessionRuntimeFingerprint(_0x121efe,_0x53a7df){const _0x548526=_0x510b81;return createHash(_0x548526(0x119))[_0x548526(0x116)](JSON[_0x548526(0xa9)]({'cwd':_0x121efe[_0x548526(0x11e)],'defaultModelId':_0x121efe[_0x548526(0xd0)]['id'],'models':_0x121efe[_0x548526(0x152)][_0x548526(0xff)](_0x5cd74b=>({..._0x5cd74b,'apiKey':createHash(_0x548526(0x119))[_0x548526(0x116)](_0x5cd74b[_0x548526(0x121)][_0x548526(0x104)]())[_0x548526(0x132)](_0x548526(0xc8))})),'personalInstructions':_0x121efe[_0x548526(0x147)]??'','mcpServers':_0x121efe[_0x548526(0x11f)],'environment':Object[_0x548526(0xad)](_0x53a7df[_0x548526(0x85)])[_0x548526(0x151)](_0x31d992=>_0x31d992[-0x1*0x753+0xce*-0x5+-0x1*-0xb5a]!==undefined)[_0x548526(0x12a)](([_0x5a7270],[_0x20713f])=>_0x5a7270[_0x548526(0xce)](_0x20713f)),'guaranteedCommands':Object[_0x548526(0xad)](_0x53a7df[_0x548526(0xe0)])[_0x548526(0x12a)](([_0x4ec8a7],[_0x500aff])=>_0x4ec8a7[_0x548526(0xce)](_0x500aff))}))[_0x548526(0x132)](_0x548526(0xc8));}export function allowsUntrustedWebFetchTls(_0x15e0fd){const _0x21b204=_0x510b81;return _0x15e0fd[_0x21b204(0x13e)]!=='0';}function executionScopedMcp(_0x39de1e){const _0x493aa9=_0x510b81;return _0x39de1e[_0x493aa9(0x135)](_0x1857cc=>_0x1857cc[_0x493aa9(0x8b)]===_0x493aa9(0xef));}async function resolveMarAgentHostRuntimeConfiguration(){const _0x5e9ab1={...process.env},_0x29dda9=await availableBundledRipgrep();return{'environment':_0x29dda9===undefined?_0x5e9ab1:prependBundledRipgrepToPath(_0x5e9ab1,_0x29dda9),'guaranteedCommands':_0x29dda9===undefined?{}:{'rg':BUNDLED_RIPGREP_VERSION}};}async function availableBundledRipgrep(){const _0x1b5e38=_0x510b81;try{const _0x7ef306=bundledRipgrepPath();return await access(_0x7ef306,process[_0x1b5e38(0x125)]===_0x1b5e38(0xe4)?constants[_0x1b5e38(0xb0)]:constants[_0x1b5e38(0x10b)]),_0x7ef306;}catch{return undefined;}}function normalizeQuestions(_0xae2d4){const _0x583620=_0x510b81;return _0xae2d4[_0x583620(0xcf)](_0xeb116e=>{const _0x126b21=_0x583620;if(_0xeb116e===null||typeof _0xeb116e!==_0x126b21(0x150)||Array[_0x126b21(0x109)](_0xeb116e))return[];const _0x668099=_0xeb116e;if(typeof _0x668099['id']!==_0x126b21(0x84)||typeof _0x668099[_0x126b21(0x12b)]!==_0x126b21(0x84))return[];const _0x3f8cf4=Array[_0x126b21(0x109)](_0x668099[_0x126b21(0x86)])?_0x668099[_0x126b21(0x86)][_0x126b21(0xcf)](_0x3e7e54=>{const _0x2d370a=_0x126b21;if(_0x3e7e54===null||typeof _0x3e7e54!==_0x2d370a(0x150)||Array[_0x2d370a(0x109)](_0x3e7e54))return[];const _0xb46b92=_0x3e7e54;if(typeof _0xb46b92[_0x2d370a(0x11c)]!==_0x2d370a(0x84))return[];return[{'value':_0xb46b92[_0x2d370a(0x11c)],'label':_0xb46b92[_0x2d370a(0x11c)],'description':typeof _0xb46b92[_0x2d370a(0xc7)]===_0x2d370a(0x84)?_0xb46b92[_0x2d370a(0xc7)]:null}];}):[],_0x1b870d=_0x668099[_0x126b21(0xf1)]===!![];return[{'id':_0x668099['id'],'prompt':_0x668099[_0x126b21(0x12b)],'input':_0x3f8cf4[_0x126b21(0x10f)]===-0x1*-0x26+-0x236*-0x4+-0x8fe?_0x126b21(0xc2):_0x1b870d?_0x126b21(0x13d):_0x126b21(0x106),'options':_0x3f8cf4,'allowOther':!![],..._0x1b870d?{'multiSelect':!![]}:{}}];});}function toSdkModel(_0x5bd6ac){const _0x39a6b2=_0x510b81;return{..._0x5bd6ac,'apiKey':new SecretValue(_0x5bd6ac[_0x39a6b2(0x121)])};}export function resolveRunModels(_0x54ac3a,_0x58e912){const _0x311367=_0x510b81,_0x4382fb=[_0x54ac3a];if(Array[_0x311367(0x109)](_0x58e912))for(const _0x2e8751 of _0x58e912){const _0x43d296=marAgentRuntimeModelConfigurationSchema[_0x311367(0x139)](_0x2e8751);if(_0x43d296[_0x311367(0x8f)]&&_0x43d296[_0x311367(0x114)]['id']!==_0x54ac3a['id'])_0x4382fb[_0x311367(0x115)](_0x43d296[_0x311367(0x114)]);}const _0x969172=new Set();return _0x4382fb[_0x311367(0x151)](_0x30f895=>{const _0x2464a2=_0x311367;if(_0x969172[_0x2464a2(0xec)](_0x30f895['id']))return![];return _0x969172[_0x2464a2(0xb5)](_0x30f895['id']),!![];})[_0x311367(0xff)](toSdkModel);}
|
|
2
|
+
const _0x6efef5=_0x4e87;(function(_0x139d89,_0x15b0a6){const _0x43998b=_0x4e87,_0x4cd263=_0x139d89();while(!![]){try{const _0x1c3157=parseInt(_0x43998b(0x1da))/(0x2148+0x5*-0x70d+-0xb*-0x2e)+parseInt(_0x43998b(0x17c))/(-0x18df+0x1*0x73d+0x11a4)*(-parseInt(_0x43998b(0x17b))/(0x12d6+0x1a61+0x4*-0xb4d))+-parseInt(_0x43998b(0x1d6))/(0x5*-0x655+0x1db4+0x1f9)+parseInt(_0x43998b(0x16b))/(0x3*-0x42c+0x2*0x980+-0x14b*0x5)+-parseInt(_0x43998b(0x197))/(-0x1f*-0xf1+0x9e2*-0x1+-0x1347)*(parseInt(_0x43998b(0x17f))/(0x21cb+0x4d*-0x3d+0xf6b*-0x1))+-parseInt(_0x43998b(0x163))/(-0x5dd*0x2+-0xe4a+0x1a0c)+parseInt(_0x43998b(0x1c3))/(0x8b*0x16+-0x1d*-0x4f+-0x14dc);if(_0x1c3157===_0x15b0a6)break;else _0x4cd263['push'](_0x4cd263['shift']());}catch(_0x243ee1){_0x4cd263['push'](_0x4cd263['shift']());}}}(_0x53be,0x4810f+-0x1b161+0x721b5));import{createHash,randomUUID}from'node:crypto';import{homedir}from'node:os';import{access,constants}from'node:fs/promises';function _0x53be(){const _0x5e3723=['y29TCgXLDgvK','CMvSzwfZzvnLC3nPB24','zgvSDge','yxjNDw1LBNrZ','CNvUlMnHBMnLBgXPBMC','Dgv4Dc5KzwX0yq','zgLNzxn0','BwfYqwDLBNrnB2rLBa','DxbKyxrL','ywXSu2v0DgXLza','CNvUBMvY','zMLUz2vYChjPBNq','ugXHBIbnB2rL','zxjYB3i','ywDLBNq','BwvZC2fNzs5KzwX0yq','rL9psW','u1rbuLrjtKC','BMfTzq','y2fUy2vS','u0HpuLrFvevyva','zwzMB3j0','Aw1Hz2vZ','tufsx0fhru5ux1jvtL9dt05uuK9mtevsx0rju1bpu0ve','C29Tzq','C2vZC2LVBKLK','CNvUlNjLAMvJDgvK','zw1PDeL0zw0','tufsx0fhru5ux1DfqL9grvrdsf9bteXpv19vtLrsvvnururFveXt','ywjVCNrLza','CNvUlNj1BM5PBMC','ywXS','Bw9KzwW','oty0nty3mKfQtMDQqG','tufsx0fhru5ux1nfu1njt05FuLvoveLnrv9sruXfqvnfra','A2LUza','CNvUlMnHBMnLBgXLza','tufsx0fhru5ux1jvtL9gquLmruq','C2LNBMfS','CgHHC2u','C3rYAw5N','mte2nJG2nxvAv0zMzW','zMXHDe1HCa','CMvZDwX0','CMv0ywLUywjSzq','uLvotKvsx0nptu1btKrFvu5bvKfjtefcteu','D2LUmZi','BwfYlwfNzw50lwvYCM9Y','ywrKrxzLBNrmAxn0zw5LCG','z3vHCMfUDgvLzenVBw1HBMrZ','CMvSzwfZzwq','ChjVBw90zq','y3jLyxrLqwDLBNq','zxjYB3jdB2rL','BwvYz2u','zxH0zxjUywXtzxnZAw9Uswq','BgvUz3rO','m3DYD09xAa','mtaXnJy5ofzUtu5eCG','u3vIC2vXDwvUDcbTzxnZywDLCYbYDw4GAw4GCMvHzc1VBMX5ifbSyw4Gtw9Kzs4','Bg9JywXLq29TCgfYzq','mtu0EezxsefS','zNvSBc1Hy2nLC3m','y2XLyxjjBNrLCMfJDgLVBNm','C29YDa','CMvXDwvZDeLK','C2vJCMv0rw52AxjVBM1LBNq','BwfYqwDLBNrnB2rLBhm','ve9pta','B3b0Aw9UCW','D2vIu2vHCMnO','tufsx01btKfhruq','ywrVChq','DgLTzxi','yxr0ywnOBwvUDhm','tvvmveLFu0vmrunu','zgvJAxnPB24','BwfYlwfNzw50lxf1zxn0Aw9U','Agv4','y2f0y2G','Cg9VBa','uLvotKLorW','DMfSDwvZ','Ag9ZDa','y2XLyxjdB21Tyw5Ku3rHDgu','mJi1ntq2Egzky05f','C3rHCNq','ywn0AxzL','CgXHDgzVCM0','B3bLBLnLC3nPB24','q0foq0vmteve','C3rYAw5NAwz5','zxHLyW','CMvXDwvZDefWChjVDMfS','y29TCgfJDa','z2v0','AwrSzvrPBwvY','zgf0yq','AxnbCNjHEq','rKLmrv9dsefor0u','BgfIzwW','ChjVAMvJDa','CMvXDwvZDff1zxn0Aw9U','yxbWBhLFCgf0y2G','yxbWCM92ywXjza','BwnWq29UzMLNDxjHDgLVBG','Bw9Kzq','y29TBwfUzfn0yxrL','BwnWsw5ZDgfSBgf0Aw9UCW','zgvSzxrL','CNvUlNn0yxj0zwq','u1vdq0vfreve','C2v0q29TBwfUzfn0yxrL','ywn0AxzLqwnJzxnZ','C3LUy1rPDgXL','BwnWu2vYDMvYCW','zMLUza','yxbWCM92zwq','zgLZCg9Zzq','zw52AxjVBM1LBNq','ywrK','CgXHBG','CNvUlMnVBxbSzxrLza','CgvYC29UywXjBNn0CNvJDgLVBNm','y2XPzw50twvZC2fNzuLK','C3vJy2vZCW','y2XVC2u','q09ntufora','zgvUAwvK','mJi3ntG5odroyM5rq3m','ChvIBgLZAefWChjVDMfS','uevoreLorW','AgfZ','CNvU','B24TCMvXDwvZDa','BwnWu2vJCMv0rw52AxjVBM1LBNq','ywn0AxzLuNvUswq','zgvZy3jPChrPB24','zMLSDgvY','C2HHmJu2','BgLMzwn5y2XL','tufsx0fhru5ux1nfu1njt05FuLvoveLnrv9bq1rjvKu','CMvZB3vYy2vjzgXLvhrStxm','y2fUy2vSBgvK','ChvZAa','tufsx0fhru5ux01prevmx0nptKzjr19jtLzbteLe','BwnWtgvHC2u','DxnLCL9PBNb1Df9Yzxf1zxn0','mtm3mJCWnfnIBwDvsG','CMvSzwfZzq','l3bSyw4','sw1WBgvTzw50ihrOzsbWBgfUigfIB3zLlG','nZCZnZa2qK5yyKLI','tufsx0fhru5ux01duf9dt05gsuDFsu5wquXjra','tufsiefNzw50ihjLCxvLC3rLzcbWzxjTAxnZAw9UigzVCIb0AgLZihrVB2WGy2fSBc4','BwfYlwfNzw50','u0Lor0Xfx1nftevdva','CNvUlMzHAwXLza','C2vZC2LVBG','DhLWzq','zw50CMLLCW','BwfYlwfNzw50lw1LC3nHz2u','y3DK','C2fMzvbHCNnL','y3jLyxrLqxbWCM92ywW','CxvLC3rPB25Z','BM93','Bw9KzwXZ','rvHfq1vusu9o','BM9Kzq','zMLUywXSEq','zgvMAw5PDgLVBNm','ywnJzxnZ','y29SBgfIB3jHDgLVBK1Vzgu','CNvUswq','BM9YBwfSAxPL','Cgf5Bg9Hza','BxvSDgLtzwXLy3q','zgvJAwrLqxbWCM92ywW','C3rHDhvZ','CxvLC3rPB24','ywjVCNq','zgf0yujHC2u2na','rKfjteve','CMvZB2X2zq','y2XLyw51Ca','yxbPs2v5','ywnXDwLYzq','y3jLyxrLu2vZC2LVBG','CMvZCg9UzfvZzxjjBNb1Da','y29TBwfUzfn0yxrLCW','Aw5WDxq','BMf0AxzLq29UDhjVBa','AxrLBuLK','y2fSBa','BwfW','zNjVBuvUDhjPzxm','CMvTB3zLrxzLBNrmAxn0zw5LCG','zw1PDa','qvbquK9wruq','CMv2zwfS','sw1WBgvTzw50','zxHLy3v0zunVBw1HBMq','Dw5Yzwy','BwLTzq','B2jQzwn0','C2v0','wf9psW'];_0x53be=function(){return _0x5e3723;};return _0x53be();}import{BUNDLED_RIPGREP_VERSION,bundledRipgrepPath,prependBundledRipgrepToPath}from'../../ripgrep-binary.js';import{SecretValue,LocalAgentHost,createMarAgent}from'@myagentroam/agent';import{marAgentRuntimeModelConfigurationSchema}from'@myagentroam/protocol';import{boundedConversationItemId}from'../codex/conversation-parser.js';import{parseSecretEnvironment}from'../../util/secret-environment.js';import{MarAgentMcpClientCache}from'./mcp-client-pool.js';function _0x4e87(_0x336d52,_0x5d83db){_0x336d52=_0x336d52-(0x1591*0x1+-0x6b6*0x1+-0xd7b);const _0x402ee7=_0x53be();let _0x379d26=_0x402ee7[_0x336d52];if(_0x4e87['hhUOTd']===undefined){var _0x45651b=function(_0x52e490){const _0x148e8a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2f515c='',_0x4c3b34='';for(let _0x369ad1=-0x167c+-0x6f6+0x1d72,_0x4853f2,_0x46c924,_0x2fb0a5=-0xce2+-0x1*0x262c+0x330e;_0x46c924=_0x52e490['charAt'](_0x2fb0a5++);~_0x46c924&&(_0x4853f2=_0x369ad1%(0x173c*0x1+0x2603*0x1+-0x3d3b)?_0x4853f2*(-0x1518+0x233a+0x6f1*-0x2)+_0x46c924:_0x46c924,_0x369ad1++%(-0x348+0x6b*-0x4f+0x2451))?_0x2f515c+=String['fromCharCode'](-0x982*-0x4+0x1b*-0x89+-0x1696&_0x4853f2>>(-(-0x1*-0xb8d+0x23*-0xfb+0x16c6)*_0x369ad1&-0x58d*-0x1+-0x1afa*-0x1+-0x1*0x2081)):-0x26b1+0x1f8*0x3+0x20c9){_0x46c924=_0x148e8a['indexOf'](_0x46c924);}for(let _0x2de0bf=0x1008+-0x8c5+-0x743,_0x4d1674=_0x2f515c['length'];_0x2de0bf<_0x4d1674;_0x2de0bf++){_0x4c3b34+='%'+('00'+_0x2f515c['charCodeAt'](_0x2de0bf)['toString'](0xb0b*-0x3+0x1*-0x90f+0x20*0x152))['slice'](-(0x3f*0x62+-0x1*-0x1b2f+-0x334b));}return decodeURIComponent(_0x4c3b34);};_0x4e87['zAyWZt']=_0x45651b,_0x4e87['mUPOjR']={},_0x4e87['hhUOTd']=!![];}const _0x3f8cb0=_0x402ee7[0x55*-0x58+-0x16b1*-0x1+0x687];_0x4e87['xKhMFB']!==_0x3f8cb0&&(_0x4e87['mUPOjR']={},_0x4e87['xKhMFB']=_0x3f8cb0);const _0x368c92=_0x4e87['mUPOjR'][_0x336d52];return _0x368c92===undefined?(_0x379d26=_0x4e87['zAyWZt'](_0x379d26),_0x4e87['mUPOjR'][_0x336d52]=_0x379d26):_0x379d26=_0x368c92,_0x379d26;}import{MarAgentConversationNormalizer}from'./conversation-normalizer.js';import{parseRunnerImageAttachments}from'../../util/node-operation-parsers.js';import{runnerErrorProjection}from'../../util/runner-error.js';export class MarAgentManagedRunController{[_0x6efef5(0x21c)];[_0x6efef5(0x195)];#mcpClients=new MarAgentMcpClientCache();#executions=new Map();#sessionRuntimes=new Map();#runtimeAcquisitions=new Map();#runtimeCreations=new Map();#sessionReleases=new Map();#approvals=new Map();#questions=new Map();#normalizers=new Map();#resourceIdleTtlMs;#createAgent;#disposePromise;#disposed=![];constructor(_0x472ee3,_0x35d167,_0x532796={}){const _0x5c9cfc=_0x6efef5;this[_0x5c9cfc(0x21c)]=_0x472ee3,this[_0x5c9cfc(0x195)]=_0x35d167,this.#resourceIdleTtlMs=_0x532796[_0x5c9cfc(0x1d0)]??-0xde34+-0xa8e6+0x2717a,this.#createAgent=_0x532796[_0x5c9cfc(0x176)]??createMarAgent;}[_0x6efef5(0x1b8)](){if(this.#disposePromise!==undefined)return this.#disposePromise;return this.#disposed=!![],this.#disposePromise=((async()=>{const _0x476b70=_0x4e87;for(const _0xb6fd73 of this.#executions[_0x476b70(0x194)]())_0xb6fd73[_0x476b70(0x225)]();await Promise[_0x476b70(0x21b)]([...new Set(this.#runtimeAcquisitions[_0x476b70(0x194)]())]);for(const _0x336d52 of this.#executions[_0x476b70(0x194)]())_0x336d52[_0x476b70(0x225)]();await Promise[_0x476b70(0x161)]([...new Set(this.#sessionRuntimes[_0x476b70(0x194)]())][_0x476b70(0x205)](_0x5d83db=>this.#releaseRuntime(_0x5d83db))),await this.#mcpClients[_0x476b70(0x1c0)]();})()),this.#disposePromise;}[_0x6efef5(0x213)](_0x402ee7){const _0x12ce7a=_0x6efef5,_0x379d26=this.#sessionReleases[_0x12ce7a(0x1a1)](_0x402ee7);if(_0x379d26!==undefined)return _0x379d26;const _0x45651b=((async()=>{const _0x3c03f0=_0x12ce7a;await this.#runtimeAcquisitions[_0x3c03f0(0x1a1)](_0x402ee7)?.[_0x3c03f0(0x191)](()=>undefined);const _0x368c92=this.#sessionRuntimes[_0x3c03f0(0x1a1)](_0x402ee7);if(_0x368c92===undefined)return;if(_0x368c92[_0x3c03f0(0x1ca)]!==undefined)this.#executions[_0x3c03f0(0x1a1)](_0x368c92[_0x3c03f0(0x1ca)])?.[_0x3c03f0(0x225)]();await this.#releaseRuntime(_0x368c92);})()),_0x3f8cb0=_0x45651b[_0x12ce7a(0x1ec)](()=>{const _0xec9f37=_0x12ce7a;if(this.#sessionReleases[_0xec9f37(0x1a1)](_0x402ee7)===_0x3f8cb0)this.#sessionReleases[_0xec9f37(0x1af)](_0x402ee7);});return this.#sessionReleases[_0x12ce7a(0x210)](_0x402ee7,_0x3f8cb0),_0x3f8cb0;}async[_0x6efef5(0x20c)](_0x52e490,_0x148e8a,_0x2f515c,_0x4c3b34){const _0x37e7e9=_0x6efef5;if(_0x148e8a['id']===_0x37e7e9(0x1bb)){const _0x2fb0a5=this[_0x37e7e9(0x195)][_0x37e7e9(0x1ad)](_0x52e490['id'],_0x37e7e9(0x1bb));if(_0x2fb0a5?.[_0x37e7e9(0x199)])this[_0x37e7e9(0x195)][_0x37e7e9(0x196)](_0x52e490['id'],_0x37e7e9(0x1bb));else this[_0x37e7e9(0x195)][_0x37e7e9(0x1b2)](_0x52e490['id'],{'commandId':_0x37e7e9(0x1bb),'active':!![],'label':_0x37e7e9(0x21e),'detail':_0x37e7e9(0x17d),'closable':!![],'closeInput':_0x37e7e9(0x1d8),'continuation':{'label':_0x37e7e9(0x20b),'prompt':_0x37e7e9(0x1d9)}});return{'command':_0x148e8a['id'],'states':this[_0x37e7e9(0x195)][_0x37e7e9(0x200)](_0x52e490['id'])};}if(_0x148e8a['id']!==_0x37e7e9(0x1a0))throw new Error(_0x37e7e9(0x16f));if(_0x52e490[_0x37e7e9(0x179)]===null||_0x52e490[_0x37e7e9(0x202)]!==_0x37e7e9(0x189))throw new Error(_0x37e7e9(0x16f));const _0x369ad1=marAgentRuntimeModelConfigurationSchema[_0x37e7e9(0x1e5)](_0x4c3b34[_0x37e7e9(0x219)]);if(!_0x369ad1[_0x37e7e9(0x1bf)]||_0x369ad1[_0x37e7e9(0x1a3)]['id']!==_0x52e490[_0x37e7e9(0x162)])throw new Error(_0x37e7e9(0x16f));const _0x4853f2=_0x369ad1[_0x37e7e9(0x1a3)],_0x46c924=randomUUID();return void this[_0x37e7e9(0x1c7)]({'runId':_0x46c924,'sessionId':_0x52e490['id'],'input':_0x2f515c,'cwd':_0x52e490[_0x37e7e9(0x1e4)],'model':toSdkModel(_0x4853f2),'models':resolveRunModels(_0x4853f2,_0x4c3b34[_0x37e7e9(0x185)]),'effort':_0x52e490[_0x37e7e9(0x227)]??'','access':_0x52e490[_0x37e7e9(0x1ee)]===_0x37e7e9(0x180)?_0x37e7e9(0x180):_0x37e7e9(0x1c8),'mode':_0x148e8a['id'],'externalSessionId':_0x52e490[_0x37e7e9(0x179)],'mcpServers':[],'images':[]}),{'command':_0x148e8a['id'],'run':this[_0x37e7e9(0x195)][_0x37e7e9(0x1c7)](_0x46c924),'states':this[_0x37e7e9(0x195)][_0x37e7e9(0x200)](_0x52e490['id'])};}[_0x6efef5(0x198)](_0x2de0bf){const _0x1d0afe=_0x6efef5,_0x4d1674=_0x2de0bf[_0x1d0afe(0x1f2)];if(_0x4d1674[_0x1d0afe(0x21c)]!==_0x1d0afe(0x1dd)||typeof _0x4d1674[_0x1d0afe(0x1f0)]!==_0x1d0afe(0x16a)||typeof _0x4d1674[_0x1d0afe(0x22b)]!==_0x1d0afe(0x16a)||typeof _0x4d1674[_0x1d0afe(0x201)]!==_0x1d0afe(0x16a)||typeof _0x4d1674[_0x1d0afe(0x1e4)]!==_0x1d0afe(0x16a)||typeof _0x4d1674[_0x1d0afe(0x162)]!==_0x1d0afe(0x16a)||this[_0x1d0afe(0x195)][_0x1d0afe(0x199)][_0x1d0afe(0x1c6)](_0x4d1674[_0x1d0afe(0x1f0)]))return;const _0x3ebf01=marAgentRuntimeModelConfigurationSchema[_0x1d0afe(0x1e5)](_0x4d1674[_0x1d0afe(0x219)]);if(!_0x3ebf01[_0x1d0afe(0x1bf)]||_0x3ebf01[_0x1d0afe(0x1a3)]['id']!==_0x4d1674[_0x1d0afe(0x162)]){this[_0x1d0afe(0x195)][_0x1d0afe(0x208)](_0x4d1674[_0x1d0afe(0x1f0)],_0x1d0afe(0x22c),{'code':_0x1d0afe(0x1d3)},_0x1d0afe(0x1f9));return;}const _0x2ac320=_0x3ebf01[_0x1d0afe(0x1a3)];let _0x31edfd,_0x341d3a;try{const _0x257799=parseSecretEnvironment(_0x4d1674[_0x1d0afe(0x184)]),_0x12cc8e=parseSecretEnvironment(_0x4d1674[_0x1d0afe(0x1c9)]);_0x31edfd=this[_0x1d0afe(0x21c)][_0x1d0afe(0x1ab)](_0x4d1674[_0x1d0afe(0x1ae)],{..._0x257799,..._0x12cc8e}),_0x341d3a=parseRunnerImageAttachments(_0x4d1674[_0x1d0afe(0x18c)]);}catch{this[_0x1d0afe(0x195)][_0x1d0afe(0x208)](_0x4d1674[_0x1d0afe(0x1f0)],_0x1d0afe(0x22c),{'code':_0x1d0afe(0x1db)},_0x1d0afe(0x1f9));return;}void this[_0x1d0afe(0x1c7)]({'runId':_0x4d1674[_0x1d0afe(0x1f0)],'sessionId':_0x4d1674[_0x1d0afe(0x22b)],'input':_0x4d1674[_0x1d0afe(0x201)],'cwd':_0x4d1674[_0x1d0afe(0x1e4)],'model':toSdkModel(_0x2ac320),'models':resolveRunModels(_0x2ac320,_0x4d1674[_0x1d0afe(0x185)]),'effort':typeof _0x4d1674[_0x1d0afe(0x227)]===_0x1d0afe(0x16a)?_0x4d1674[_0x1d0afe(0x227)]:'','access':_0x4d1674[_0x1d0afe(0x1ee)]===_0x1d0afe(0x180)?_0x1d0afe(0x180):_0x1d0afe(0x1c8),'mode':_0x4d1674[_0x1d0afe(0x1ef)]===_0x1d0afe(0x1bb)?_0x1d0afe(0x1bb):_0x1d0afe(0x1c7),'mcpServers':_0x31edfd,'images':_0x341d3a[_0x1d0afe(0x205)](_0x48a1cf=>({'mimeType':_0x48a1cf[_0x1d0afe(0x20e)],'dataBase64':_0x48a1cf[_0x1d0afe(0x1f8)]})),...typeof _0x4d1674[_0x1d0afe(0x1be)]===_0x1d0afe(0x16a)?{'clientMessageId':_0x4d1674[_0x1d0afe(0x1be)]}:{},...typeof _0x4d1674[_0x1d0afe(0x179)]===_0x1d0afe(0x16a)?{'externalSessionId':_0x4d1674[_0x1d0afe(0x179)]}:{},...typeof _0x4d1674[_0x1d0afe(0x1bd)]===_0x1d0afe(0x16a)?{'personalInstructions':_0x4d1674[_0x1d0afe(0x1bd)]}:{}});}[_0x6efef5(0x225)](_0x12fbb2,_0x62248d){const _0x1d45a6=_0x6efef5,_0x4d3cef=this.#executions[_0x1d45a6(0x1a1)](_0x12fbb2);if(!_0x4d3cef)return![];return _0x4d3cef[_0x1d45a6(0x225)](),this[_0x1d45a6(0x195)][_0x1d45a6(0x208)](_0x12fbb2,_0x1d45a6(0x216),{'intent':_0x62248d},_0x1d45a6(0x193)),!![];}[_0x6efef5(0x1f4)](_0x525b3f){const _0x3ab9b5=_0x6efef5,_0x2baae7=this.#approvals[_0x3ab9b5(0x1a1)](_0x525b3f[_0x3ab9b5(0x1aa)]);if(!_0x2baae7||_0x2baae7[_0x3ab9b5(0x1f0)]!==_0x525b3f[_0x3ab9b5(0x1f0)])return![];return clearTimeout(_0x2baae7[_0x3ab9b5(0x18b)]),_0x2baae7[_0x3ab9b5(0x1fb)](),this.#approvals[_0x3ab9b5(0x1af)](_0x525b3f[_0x3ab9b5(0x1aa)]),_0x2baae7[_0x3ab9b5(0x1fa)](_0x525b3f[_0x3ab9b5(0x18e)]===_0x3ab9b5(0x209)?_0x3ab9b5(0x1b7):_0x3ab9b5(0x1c2)),!![];}[_0x6efef5(0x1ff)](_0x2197d7,_0x32ff3c,_0x34e5b6){const _0x1edb4d=_0x6efef5,_0x32225b=this.#questions[_0x1edb4d(0x1a1)](_0x32ff3c);if(!_0x32225b||_0x32225b[_0x1edb4d(0x1f0)]!==_0x2197d7)return![];return clearTimeout(_0x32225b[_0x1edb4d(0x18b)]),_0x32225b[_0x1edb4d(0x1fb)](),this.#questions[_0x1edb4d(0x1af)](_0x32ff3c),_0x32225b[_0x1edb4d(0x1fa)](Object[_0x1edb4d(0x206)](Object[_0x1edb4d(0x1e2)](_0x34e5b6)[_0x1edb4d(0x205)](([_0x1abfb4,_0x47d831])=>[_0x1abfb4,Array[_0x1edb4d(0x1a4)](_0x47d831)&&_0x47d831[_0x1edb4d(0x17a)]===0xf22+0x22b*-0x1+0x452*-0x3?_0x47d831[0xeea+0x1fad+-0x2e97*0x1]:_0x47d831]))),!![];}async[_0x6efef5(0x1c7)](_0x39d626){const _0x4610d3=_0x6efef5;this[_0x4610d3(0x195)][_0x4610d3(0x199)][_0x4610d3(0x1ba)](_0x39d626[_0x4610d3(0x1f0)]),this[_0x4610d3(0x195)][_0x4610d3(0x18a)]({'runId':_0x39d626[_0x4610d3(0x1f0)],'sessionId':_0x39d626[_0x4610d3(0x22b)],'runner':_0x4610d3(0x1dd),'cwd':_0x39d626[_0x4610d3(0x1e4)],..._0x39d626[_0x4610d3(0x179)]?{'externalSessionId':_0x39d626[_0x4610d3(0x179)]}:{}}),this[_0x4610d3(0x195)][_0x4610d3(0x208)](_0x39d626[_0x4610d3(0x1f0)],_0x4610d3(0x1b0),{},_0x4610d3(0x223));let _0x33b0cc;try{const _0x2f549e=_0x39d626[_0x4610d3(0x179)]??_0x39d626[_0x4610d3(0x22b)],_0x378082=[...new Set([_0x2f549e,_0x39d626[_0x4610d3(0x22b)]])];if(_0x378082[_0x4610d3(0x22a)](_0x44b61f=>this.#runtimeAcquisitions[_0x4610d3(0x1a1)](_0x44b61f)!==undefined))throw new Error(_0x4610d3(0x1cf));const _0x57ff03=this.#acquireRuntime(_0x39d626);for(const _0x15af9b of _0x378082)this.#runtimeAcquisitions[_0x4610d3(0x210)](_0x15af9b,_0x57ff03);try{_0x33b0cc=await _0x57ff03;}finally{for(const _0x533932 of _0x378082)if(this.#runtimeAcquisitions[_0x4610d3(0x1a1)](_0x533932)===_0x57ff03)this.#runtimeAcquisitions[_0x4610d3(0x1af)](_0x533932);}if(this.#disposed||this.#sessionReleases[_0x4610d3(0x1c6)](_0x2f549e)||this.#sessionReleases[_0x4610d3(0x1c6)](_0x39d626[_0x4610d3(0x22b)])||this.#sessionReleases[_0x4610d3(0x1c6)](_0x33b0cc[_0x4610d3(0x1e0)]['id'])){await this.#releaseRuntime(_0x33b0cc);throw new Error(_0x4610d3(0x164));}if(_0x33b0cc[_0x4610d3(0x1ca)]!==undefined)throw new Error(_0x4610d3(0x1cf));_0x33b0cc[_0x4610d3(0x1ca)]=_0x39d626[_0x4610d3(0x1f0)],_0x33b0cc[_0x4610d3(0x1b3)]=_0x39d626[_0x4610d3(0x1ee)];const _0x2af763=_0x33b0cc[_0x4610d3(0x1e0)],_0x35d34a={'prompt':_0x39d626[_0x4610d3(0x201)],..._0x39d626[_0x4610d3(0x1be)]?{'clientMessageId':_0x39d626[_0x4610d3(0x1be)]}:{},'modelId':_0x39d626[_0x4610d3(0x162)]['id'],..._0x39d626[_0x4610d3(0x227)]?{'reasoningEffort':_0x39d626[_0x4610d3(0x227)]}:{},'access':_0x39d626[_0x4610d3(0x1ee)],'images':_0x39d626[_0x4610d3(0x228)]},_0x26d21b=_0x39d626[_0x4610d3(0x1ac)]===_0x4610d3(0x1bb)?_0x2af763[_0x4610d3(0x1bb)]({..._0x35d34a}):_0x39d626[_0x4610d3(0x1ac)]===_0x4610d3(0x1a0)?_0x2af763[_0x4610d3(0x1a0)](_0x35d34a):_0x2af763[_0x4610d3(0x1c7)](_0x35d34a);this.#executions[_0x4610d3(0x210)](_0x39d626[_0x4610d3(0x1f0)],{'cancel':()=>_0x26d21b[_0x4610d3(0x225)]()}),this[_0x4610d3(0x195)][_0x4610d3(0x208)](_0x39d626[_0x4610d3(0x1f0)],_0x4610d3(0x160),{},_0x4610d3(0x193));for await(const _0x510121 of _0x26d21b)this[_0x4610d3(0x1a7)](_0x39d626[_0x4610d3(0x1f0)],_0x510121);const _0x2f3fd0=await _0x26d21b[_0x4610d3(0x16d)]();await this[_0x4610d3(0x195)][_0x4610d3(0x1b4)](_0x2af763['id'],_0x39d626[_0x4610d3(0x1e4)]);const _0x3bb9db=_0x2f3fd0[_0x4610d3(0x1f5)]===_0x4610d3(0x212)?_0x4610d3(0x1b1):_0x2f3fd0[_0x4610d3(0x1f5)]===_0x4610d3(0x1d1)?_0x4610d3(0x19c):_0x4610d3(0x1f9);this[_0x4610d3(0x195)][_0x4610d3(0x208)](_0x39d626[_0x4610d3(0x1f0)],_0x3bb9db===_0x4610d3(0x1b1)?_0x4610d3(0x1bc):_0x3bb9db===_0x4610d3(0x19c)?_0x4610d3(0x166):_0x4610d3(0x1df),{'status':_0x3bb9db,..._0x2f3fd0[_0x4610d3(0x177)]?{'code':_0x2f3fd0[_0x4610d3(0x177)]}:{}},_0x3bb9db);}catch(_0x22583f){const _0x2a686d=runnerErrorProjection(_0x22583f,_0x4610d3(0x167));this[_0x4610d3(0x195)][_0x4610d3(0x22d)](_0x39d626[_0x4610d3(0x1f0)],{'itemId':boundedConversationItemId(_0x4610d3(0x171),_0x39d626[_0x4610d3(0x1f0)]),'kind':_0x4610d3(0x21f),'status':_0x4610d3(0x1f9),'payload':{..._0x2a686d,'recoverable':!![],'retryAfterMs':null}}),this[_0x4610d3(0x195)][_0x4610d3(0x208)](_0x39d626[_0x4610d3(0x1f0)],_0x4610d3(0x1df),_0x2a686d,_0x4610d3(0x1f9));}finally{this[_0x4610d3(0x181)](_0x39d626[_0x4610d3(0x1f0)]),this.#normalizers[_0x4610d3(0x1af)](_0x39d626[_0x4610d3(0x1f0)]),this[_0x4610d3(0x195)][_0x4610d3(0x199)][_0x4610d3(0x1af)](_0x39d626[_0x4610d3(0x1f0)]),this.#executions[_0x4610d3(0x1af)](_0x39d626[_0x4610d3(0x1f0)]);_0x33b0cc?.[_0x4610d3(0x1ca)]===_0x39d626[_0x4610d3(0x1f0)]&&(delete _0x33b0cc[_0x4610d3(0x1ca)],delete _0x33b0cc[_0x4610d3(0x1b3)]);if(_0x33b0cc!==undefined){if(_0x33b0cc[_0x4610d3(0x16e)])this.#scheduleRuntimeRelease(_0x33b0cc);else await this.#releaseRuntime(_0x33b0cc);}}}async #acquireRuntime(_0x21640f){const _0x1641c5=_0x6efef5;if(this.#disposed)throw new Error(_0x1641c5(0x229));const _0x22ffd5=_0x21640f[_0x1641c5(0x179)]??_0x21640f[_0x1641c5(0x22b)],_0x82772b=await resolveMarAgentHostRuntimeConfiguration();if(this.#disposed)throw new Error(_0x1641c5(0x229));const _0x3fdbd1=sessionRuntimeFingerprint(_0x21640f,_0x82772b),_0x3bd727=[...new Set([_0x22ffd5,_0x21640f[_0x1641c5(0x22b)]])],_0x43d94d=_0x3bd727[_0x1641c5(0x205)](_0x891ce8=>this.#runtimeCreations[_0x1641c5(0x1a1)](_0x891ce8))[_0x1641c5(0x1b6)](_0x44864e=>_0x44864e!==undefined);if(_0x43d94d!==undefined)return await _0x43d94d,this.#acquireRuntime(_0x21640f);const _0x48078b=this.#sessionRuntimes[_0x1641c5(0x1a1)](_0x22ffd5);if(_0x48078b!==undefined){if(_0x48078b[_0x1641c5(0x1ca)]!==undefined)throw new Error(_0x1641c5(0x1cf));if(!_0x48078b[_0x1641c5(0x174)]&&_0x48078b[_0x1641c5(0x1d7)]===undefined&&_0x48078b[_0x1641c5(0x21d)]===_0x3fdbd1)return _0x48078b[_0x1641c5(0x1a2)]!==undefined&&(clearTimeout(_0x48078b[_0x1641c5(0x1a2)]),delete _0x48078b[_0x1641c5(0x1a2)]),_0x48078b;await this.#releaseRuntime(_0x48078b);}const _0x11aa8d=this.#createRuntime(_0x21640f,_0x22ffd5,_0x3fdbd1,_0x82772b);for(const _0x1243bf of _0x3bd727)this.#runtimeCreations[_0x1641c5(0x210)](_0x1243bf,_0x11aa8d);try{return await _0x11aa8d;}finally{for(const _0x4bbcae of _0x3bd727)if(this.#runtimeCreations[_0x1641c5(0x1a1)](_0x4bbcae)===_0x11aa8d)this.#runtimeCreations[_0x1641c5(0x1af)](_0x4bbcae);}}async #createRuntime(_0x74fcc8,_0x431dca,_0x40d5ac,_0x26dfd6){const _0x2facf8=_0x6efef5,_0x2d87b4=!executionScopedMcp(_0x74fcc8[_0x2facf8(0x1b5)]),_0x5b347d=await this.#mcpClients[_0x2facf8(0x1fd)](_0x74fcc8[_0x2facf8(0x1b5)],_0x74fcc8[_0x2facf8(0x1e4)],{'reusable':_0x2d87b4});let _0x54976b,_0x244c0c;try{const _0x38136e=_0x5b347d[_0x2facf8(0x192)],_0x1f38f7=new LocalAgentHost({'mode':_0x2facf8(0x1eb),'homeDirectory':homedir(),'workspace':_0x74fcc8[_0x2facf8(0x1e4)],'environment':_0x26dfd6[_0x2facf8(0x1b9)],'guaranteedCommands':_0x26dfd6[_0x2facf8(0x173)],'approve':async(_0x3ce89c,_0x4551f1)=>{const _0x1e0457=_0x2facf8,_0x25458b=_0x244c0c?.[_0x1e0457(0x1ca)],_0x1fd097=_0x244c0c?.[_0x1e0457(0x1b3)];if(_0x25458b===undefined||_0x1fd097===undefined)return _0x1e0457(0x1c2);return _0x1fd097===_0x1e0457(0x180)?_0x1e0457(0x1b7):this[_0x1e0457(0x19f)](_0x25458b,_0x3ce89c,_0x4551f1);},'question':async(_0x5cac0d,_0x140b1c)=>{const _0x4d3ed0=_0x2facf8,_0x1196c3=_0x244c0c?.[_0x4d3ed0(0x1ca)];return _0x1196c3===undefined?{}:this[_0x4d3ed0(0x1a8)](_0x1196c3,_0x5cac0d,_0x140b1c);},'mcpTools':_0x38136e[_0x2facf8(0x1ed)](),'callMcp':async _0x6bc303=>_0x38136e[_0x2facf8(0x204)](_0x6bc303[_0x2facf8(0x224)],_0x6bc303[_0x2facf8(0x215)]),'webSearch':(_0x201965,_0x2bf5d6)=>this[_0x2facf8(0x195)][_0x2facf8(0x188)](_0x201965,_0x2bf5d6),'allowUntrustedTls':allowsUntrustedWebFetchTls(_0x26dfd6[_0x2facf8(0x1b9)]),'resourceIdleTtlMs':this.#resourceIdleTtlMs});_0x54976b=await this.#createAgent({'mode':_0x2facf8(0x1eb),'host':_0x1f38f7,'models':_0x74fcc8[_0x2facf8(0x1e9)],'defaultModelId':_0x74fcc8[_0x2facf8(0x162)]['id'],..._0x74fcc8[_0x2facf8(0x1bd)]?{'systemInstruction':_0x74fcc8[_0x2facf8(0x1bd)]}:{}});const _0x158267=_0x74fcc8[_0x2facf8(0x179)]?await _0x54976b[_0x2facf8(0x19b)](_0x74fcc8[_0x2facf8(0x179)]):await _0x54976b[_0x2facf8(0x1fe)]({'workspace':_0x74fcc8[_0x2facf8(0x1e4)]});_0x244c0c={'fingerprint':_0x40d5ac,'agent':_0x54976b,'session':_0x158267,'mcpLease':_0x5b347d,'retainable':_0x2d87b4,'released':![]},this.#sessionRuntimes[_0x2facf8(0x210)](_0x431dca,_0x244c0c),this.#sessionRuntimes[_0x2facf8(0x210)](_0x158267['id'],_0x244c0c);if(!_0x74fcc8[_0x2facf8(0x179)])this[_0x2facf8(0x195)][_0x2facf8(0x175)](_0x74fcc8[_0x2facf8(0x22b)],_0x158267['id']);return _0x244c0c;}catch(_0x3e8798){await _0x54976b?.[_0x2facf8(0x1b8)]()[_0x2facf8(0x191)](()=>undefined),await _0x5b347d[_0x2facf8(0x1d7)]()[_0x2facf8(0x191)](()=>undefined);throw _0x3e8798;}}#scheduleRuntimeRelease(_0x52348c){const _0x21040b=_0x6efef5;if(_0x52348c[_0x21040b(0x174)]||_0x52348c[_0x21040b(0x1d7)]!==undefined)return;if(_0x52348c[_0x21040b(0x1a2)]!==undefined)clearTimeout(_0x52348c[_0x21040b(0x1a2)]);_0x52348c[_0x21040b(0x1a2)]=setTimeout(()=>{const _0x580e83=_0x21040b;delete _0x52348c[_0x580e83(0x1a2)],void this.#releaseRuntime(_0x52348c);},this.#resourceIdleTtlMs),_0x52348c[_0x21040b(0x1a2)][_0x21040b(0x20d)]();}#releaseRuntime(_0x10753f){const _0x1092dd=_0x6efef5;if(_0x10753f[_0x1092dd(0x1d7)]!==undefined)return _0x10753f[_0x1092dd(0x1d7)];return _0x10753f[_0x1092dd(0x1d7)]=((async()=>{const _0x5f327e=_0x1092dd;_0x10753f[_0x5f327e(0x174)]=!![];_0x10753f[_0x5f327e(0x1a2)]!==undefined&&(clearTimeout(_0x10753f[_0x5f327e(0x1a2)]),delete _0x10753f[_0x5f327e(0x1a2)]);try{await _0x10753f[_0x5f327e(0x220)][_0x5f327e(0x1b8)]();}finally{await _0x10753f[_0x5f327e(0x1d4)][_0x5f327e(0x1d7)]()[_0x5f327e(0x191)](()=>undefined);for(const [_0x5ea55a,_0x4c7627]of this.#sessionRuntimes)if(_0x4c7627===_0x10753f)this.#sessionRuntimes[_0x5f327e(0x1af)](_0x5ea55a);}})()),_0x10753f[_0x1092dd(0x1d7)];}[_0x6efef5(0x19f)](_0x12c657,_0x3286bb,_0x4270fa=new AbortController()[_0x6efef5(0x168)]){const _0x4d2403=_0x6efef5,_0x11b646=randomUUID(),_0x5f1d72=Date[_0x4d2403(0x1e8)]()+(-0x1*0x18+0x1838+-0x1816)*(0x1d193+-0x10*-0x126a+-0x251*0xe3),_0x225135={'category':_0x3286bb[_0x4d2403(0x224)]===_0x4d2403(0x1a9)?_0x4d2403(0x1a5):_0x3286bb[_0x4d2403(0x224)]===_0x4d2403(0x19e)?_0x4d2403(0x1c1):_0x4d2403(0x186),'toolName':_0x3286bb[_0x4d2403(0x224)],'reason':_0x4d2403(0x1dc)};return this[_0x4d2403(0x195)][_0x4d2403(0x1e6)]({'runId':_0x12c657,'approvalId':_0x11b646,'payload':_0x225135,'expiresAt':_0x5f1d72}),this[_0x4d2403(0x195)][_0x4d2403(0x1c4)]({'runId':_0x12c657,'approvalId':_0x11b646,'payload':_0x225135,'expiresAt':_0x5f1d72}),new Promise(_0x3c1f66=>{const _0x4ba963=_0x4d2403,_0x362bd8=()=>_0x5543f9(_0x4ba963(0x1c2)),_0x5543f9=_0x19cba2=>{const _0x3e0101=_0x4ba963,_0x3619ef=this.#approvals[_0x3e0101(0x1a1)](_0x11b646);if(!_0x3619ef)return;clearTimeout(_0x3619ef[_0x3e0101(0x18b)]),_0x3619ef[_0x3e0101(0x1fb)](),this.#approvals[_0x3e0101(0x1af)](_0x11b646),_0x3c1f66(_0x19cba2);},_0x268863=setTimeout(()=>{const _0x4c59b4=_0x4ba963;_0x5543f9(_0x4c59b4(0x1c2));},(0x210b+-0x11f5*-0x1+-0xb*0x4a2)*(0x7992+0x1a6b*0x7+-0x481f*0x1));_0x268863[_0x4ba963(0x20d)](),_0x4270fa[_0x4ba963(0x172)](_0x4ba963(0x1f7),_0x362bd8,{'once':!![]}),this.#approvals[_0x4ba963(0x210)](_0x11b646,{'runId':_0x12c657,'resolve':_0x3c1f66,'timer':_0x268863,'cleanup':()=>_0x4270fa[_0x4ba963(0x207)](_0x4ba963(0x1f7),_0x362bd8)});if(_0x4270fa[_0x4ba963(0x22f)])_0x362bd8();});}[_0x6efef5(0x1a8)](_0x28b06e,_0x226155,_0x2cd947=new AbortController()[_0x6efef5(0x168)]){const _0x4e1252=_0x6efef5,_0x168b40=normalizeQuestions(_0x226155[_0x4e1252(0x1e7)]);if(_0x168b40[_0x4e1252(0x17a)]===-0x2*-0xcc0+-0x2545+-0x1*-0xbc5)return Promise[_0x4e1252(0x1fa)]({});return this[_0x4e1252(0x195)][_0x4e1252(0x22d)](_0x28b06e,{'itemId':boundedConversationItemId(_0x4e1252(0x18f),_0x226155[_0x4e1252(0x183)]),'kind':_0x4e1252(0x1d5),'status':_0x4e1252(0x1c5),'payload':{'requestId':_0x226155[_0x4e1252(0x183)],'questions':_0x168b40}}),new Promise(_0x58cf24=>{const _0x881b70=_0x4e1252,_0xe6a790=()=>_0x1ce3d0({}),_0x1ce3d0=_0x7d9d1=>{const _0x25f0aa=_0x4e87,_0x121b89=this.#questions[_0x25f0aa(0x1a1)](_0x226155[_0x25f0aa(0x183)]);if(!_0x121b89)return;clearTimeout(_0x121b89[_0x25f0aa(0x18b)]),_0x121b89[_0x25f0aa(0x1fb)](),this.#questions[_0x25f0aa(0x1af)](_0x226155[_0x25f0aa(0x183)]),_0x58cf24(_0x7d9d1);},_0x3582cb=setTimeout(()=>{_0x1ce3d0({});},(0x642+-0x2*-0x11de+-0x29f4)*(-0x19008+-0x17e23+0x152d9*0x3));_0x3582cb[_0x881b70(0x20d)](),_0x2cd947[_0x881b70(0x172)](_0x881b70(0x1f7),_0xe6a790,{'once':!![]}),this.#questions[_0x881b70(0x210)](_0x226155[_0x881b70(0x183)],{'runId':_0x28b06e,'resolve':_0x58cf24,'timer':_0x3582cb,'cleanup':()=>_0x2cd947[_0x881b70(0x207)](_0x881b70(0x1f7),_0xe6a790)});if(_0x2cd947[_0x881b70(0x22f)])_0xe6a790();});}[_0x6efef5(0x181)](_0x18523e){const _0x4d290c=_0x6efef5;for(const [_0x304e9a,_0x388eab]of this.#approvals){if(_0x388eab[_0x4d290c(0x1f0)]!==_0x18523e)continue;clearTimeout(_0x388eab[_0x4d290c(0x18b)]),_0x388eab[_0x4d290c(0x1fb)](),this.#approvals[_0x4d290c(0x1af)](_0x304e9a),_0x388eab[_0x4d290c(0x1fa)](_0x4d290c(0x1c2));}for(const [_0x36a693,_0x11b4be]of this.#questions){if(_0x11b4be[_0x4d290c(0x1f0)]!==_0x18523e)continue;clearTimeout(_0x11b4be[_0x4d290c(0x18b)]),_0x11b4be[_0x4d290c(0x1fb)](),this.#questions[_0x4d290c(0x1af)](_0x36a693),_0x11b4be[_0x4d290c(0x1fa)]({});}}[_0x6efef5(0x1a7)](_0x282e00,_0x59bc76){const _0x336299=_0x6efef5;if(_0x59bc76[_0x336299(0x1e1)]===_0x336299(0x221))this[_0x336299(0x195)][_0x336299(0x208)](_0x282e00,_0x336299(0x217),{'text':_0x59bc76[_0x336299(0x214)],'phase':_0x59bc76[_0x336299(0x169)],'itemId':boundedConversationItemId(_0x336299(0x1e3),_0x59bc76[_0x336299(0x203)])});else{let _0x7648d8=this.#normalizers[_0x336299(0x1a1)](_0x282e00);_0x7648d8===undefined&&(_0x7648d8=new MarAgentConversationNormalizer(),this.#normalizers[_0x336299(0x210)](_0x282e00,_0x7648d8));for(const _0x279f16 of _0x7648d8[_0x336299(0x1f1)](_0x59bc76))this[_0x336299(0x195)][_0x336299(0x22d)](_0x282e00,{'itemId':_0x279f16[_0x336299(0x203)],'kind':_0x279f16[_0x336299(0x165)],'status':_0x279f16[_0x336299(0x1f5)],'payload':_0x279f16[_0x336299(0x1f2)],..._0x279f16[_0x336299(0x178)]===undefined?{}:{'merge':_0x279f16[_0x336299(0x178)]}});}}}function sessionRuntimeFingerprint(_0x58f644,_0x447022){const _0x5cdfa6=_0x6efef5;return createHash(_0x5cdfa6(0x1cd))[_0x5cdfa6(0x21a)](JSON[_0x5cdfa6(0x19d)]({'cwd':_0x58f644[_0x5cdfa6(0x1e4)],'defaultModelId':_0x58f644[_0x5cdfa6(0x162)]['id'],'models':_0x58f644[_0x5cdfa6(0x1e9)][_0x5cdfa6(0x205)](_0x3f0d3b=>({..._0x3f0d3b,'apiKey':createHash(_0x5cdfa6(0x1cd))[_0x5cdfa6(0x21a)](_0x3f0d3b[_0x5cdfa6(0x1fc)][_0x5cdfa6(0x20a)]())[_0x5cdfa6(0x218)](_0x5cdfa6(0x190))})),'personalInstructions':_0x58f644[_0x5cdfa6(0x1bd)]??'','mcpServers':_0x58f644[_0x5cdfa6(0x1b5)],'environment':Object[_0x5cdfa6(0x1e2)](_0x447022[_0x5cdfa6(0x1b9)])[_0x5cdfa6(0x1cc)](_0xf2ea11=>_0xf2ea11[0x4*0x52f+0x39*0xd+0x3f*-0x60]!==undefined)[_0x5cdfa6(0x182)](([_0x2185df],[_0x327bb5])=>_0x2185df[_0x5cdfa6(0x17e)](_0x327bb5)),'guaranteedCommands':Object[_0x5cdfa6(0x1e2)](_0x447022[_0x5cdfa6(0x173)])[_0x5cdfa6(0x182)](([_0x31976f],[_0x5cc658])=>_0x31976f[_0x5cdfa6(0x17e)](_0x5cc658))}))[_0x5cdfa6(0x218)](_0x5cdfa6(0x190));}export function allowsUntrustedWebFetchTls(_0x122f1d){const _0x1e5086=_0x6efef5;return _0x122f1d[_0x1e5086(0x22e)]!=='0';}function executionScopedMcp(_0x1b759d){const _0x1f0ba=_0x6efef5;return _0x1b759d[_0x1f0ba(0x22a)](_0x25431a=>_0x25431a[_0x1f0ba(0x1ce)]===_0x1f0ba(0x1ea));}async function resolveMarAgentHostRuntimeConfiguration(){const _0x1d47cf={...process.env},_0x55c4f7=await availableBundledRipgrep();return{'environment':_0x55c4f7===undefined?_0x1d47cf:prependBundledRipgrepToPath(_0x1d47cf,_0x55c4f7),'guaranteedCommands':_0x55c4f7===undefined?{}:{'rg':BUNDLED_RIPGREP_VERSION}};}async function availableBundledRipgrep(){const _0xe3f244=_0x6efef5;try{const _0x45dbbc=bundledRipgrepPath();return await access(_0x45dbbc,process[_0xe3f244(0x19a)]===_0xe3f244(0x170)?constants[_0xe3f244(0x222)]:constants[_0xe3f244(0x211)]),_0x45dbbc;}catch{return undefined;}}function normalizeQuestions(_0x391275){const _0x1bbd8f=_0x6efef5;return _0x391275[_0x1bbd8f(0x16c)](_0x234aca=>{const _0x2e5ca8=_0x1bbd8f;if(_0x234aca===null||typeof _0x234aca!==_0x2e5ca8(0x20f)||Array[_0x2e5ca8(0x1a4)](_0x234aca))return[];const _0x5e959c=_0x234aca;if(typeof _0x5e959c['id']!==_0x2e5ca8(0x16a)||typeof _0x5e959c[_0x2e5ca8(0x1f6)]!==_0x2e5ca8(0x16a))return[];const _0x5a872e=Array[_0x2e5ca8(0x1a4)](_0x5e959c[_0x2e5ca8(0x187)])?_0x5e959c[_0x2e5ca8(0x187)][_0x2e5ca8(0x16c)](_0x193169=>{const _0x211696=_0x2e5ca8;if(_0x193169===null||typeof _0x193169!==_0x211696(0x20f)||Array[_0x211696(0x1a4)](_0x193169))return[];const _0x26ef0b=_0x193169;if(typeof _0x26ef0b[_0x211696(0x1a6)]!==_0x211696(0x16a))return[];return[{'value':_0x26ef0b[_0x211696(0x1a6)],'label':_0x26ef0b[_0x211696(0x1a6)],'description':typeof _0x26ef0b[_0x211696(0x1cb)]===_0x211696(0x16a)?_0x26ef0b[_0x211696(0x1cb)]:null}];}):[],_0x46b27e=_0x5e959c[_0x2e5ca8(0x1f3)]===!![];return[{'id':_0x5e959c['id'],'prompt':_0x5e959c[_0x2e5ca8(0x1f6)],'input':_0x5a872e[_0x2e5ca8(0x17a)]===0x2298+-0x256+0x1021*-0x2?_0x2e5ca8(0x226):_0x46b27e?_0x2e5ca8(0x18d):_0x2e5ca8(0x1de),'options':_0x5a872e,'allowOther':!![],..._0x46b27e?{'multiSelect':!![]}:{}}];});}function toSdkModel(_0x2ed543){const _0xdc8c03=_0x6efef5;return{..._0x2ed543,'apiKey':new SecretValue(_0x2ed543[_0xdc8c03(0x1fc)])};}export function resolveRunModels(_0x3bff0e,_0x564894){const _0xc61a4a=_0x6efef5,_0x36f18a=[_0x3bff0e];if(Array[_0xc61a4a(0x1a4)](_0x564894))for(const _0x39f2f7 of _0x564894){const _0x5d987b=marAgentRuntimeModelConfigurationSchema[_0xc61a4a(0x1e5)](_0x39f2f7);if(_0x5d987b[_0xc61a4a(0x1bf)]&&_0x5d987b[_0xc61a4a(0x1a3)]['id']!==_0x3bff0e['id'])_0x36f18a[_0xc61a4a(0x1d2)](_0x5d987b[_0xc61a4a(0x1a3)]);}const _0x3ca33a=new Set();return _0x36f18a[_0xc61a4a(0x1cc)](_0x18d6ca=>{const _0xeb3b48=_0xc61a4a;if(_0x3ca33a[_0xeb3b48(0x1c6)](_0x18d6ca['id']))return![];return _0x3ca33a[_0xeb3b48(0x1ba)](_0x18d6ca['id']),!![];})[_0xc61a4a(0x205)](toSdkModel);}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0x58eaa3=_0x55de;function _0x590a(){const _0x1f3bf0=['zMfPBfnLC3nPB24','Bgf0zxn0tgvHC2vfEhbPCNK','CMvSzwfZzvnLC3nPB25mzwfZzxm','C3rYAw5N','Dw5PDa','C2vZC2LVBI53yxrJAc5YDw50Aw1LlxnUyxbZAg90lMzHAwXLza','C3rYAw5NAwz5','ChjVAMvJDf9ZBMfWC2HVDa','Bg9JywWTDgvZDc1UB2rL','mtq2mdK5nfPNwe12Cq','CMvHzhK','Dw5RBM93BG','zMLSDgvY','C2L6zq','AgfZ','Bw9Kzq','CMvSzwfZzvnUyxbZAg90ugvUzgLUz0v2zw50CW','C2v0','CMvUzxC','DMfSDwvZ','mtmWDgDkBKzr','CNvUBMvY','B2jZzxj2zwrqywDL','uLvotKLorW','DgLTzxi','CgvYzM9YBvjLzNjLC2G','D2f0y2GUC2vZC2LVBI5ZBMfWC2HVDa','C291CMnL','BwfUywDLzefJDgL2zq','z2v0','CgvUzgLUz0v2zw50CW','zxHLy3v0zvDHDgnO','ChvIBgLZAfj1BNrPBwvtBMfWC2HVDa','BM9KzuLK','mZm3ndi5m1zIzxr1qW','zw1PDfjLywX0Aw1L','u0vtu0LptL9xqvrdsf9svu5usu1fx1noqvbtse9ux0zbsuXfra','y29UDMvYz2vqywDL','DgvZDa','yxv0Ag9YAxr5','C25HChnOB3rtzxf1zw5Jzq','ChjVAMvJDeLUAxrPywXqywDL','CNvU','zw1PDf9WywDL','ChjLC2vUDf9ZzxnZAw9U','y2f0zwDVCNK','C2LNBMf0DxjL','C2vZC2LVBI53yxrJAc5PBML0AwfSlMzHAwXLza','C3rVCa','Aw5PDgLHBf9YzwzYzxnO','zw1PDfnUyxbZAg90vg9mzwfZzxm','C3vZCgvUzgvK','surmrq','C2vZC2LVBI53yxrJAc5YDw5UAw5NlwHPC3rVCNKUzMfPBgvK','CgfNzq','D29YA3nWywnLswq','ywnJzxb0zwq','odyYnZK2u3DUtNjW','ChvZAa','mtGWngXXu0Lwvq','zw1PDfbHz2u','CMvZB2X2zq','y29UDMvYz2viAxn0B3j5','Bwf4','DhjHBNnPDgLVBKDLBMvYyxrPB24','zMfPBhvYzxm','B3b0Aw9UCW','Aw5PDgLHBgL6zuXLyxnL','BgvHC2vZ','D2f0y2Hjza','CMvHzfbHz2u','B3DUzxjlzxK','CMvMCMvZAefJDgL2Axr5','tKfusvzfx1rsqu5tq1jjufrFvu5bvKfjtefcteu','BM9KzuDLBMvYyxrPB24','C2vZC2LVBKLK','x193B3jRC3bHy2vxyxrJAfnLC3nPB25iyxnO','D2f0y2GUC2vZC2LVBI5LDMvUDa','CMvMCMvZAfrPBwvY','CMvHzf9WywDL','Bg9N','y2XLyxi','C25HChnOB3rtzw50','CNvUDgLTzvbHz2u','Bg9JywWTDgvZDa','zw1PDe9IC2vYDMvKugfNzq','C2XPy2u','C2vZC2LVBG','C2vZC2LVBLnPz25HDhvYzq','zxH0zxjUywXtzxnZAw9Uswq','u0vtu0LptL9xqvrdsf9ttKfqu0Hpvf9gquLmruq','q09ovKvsr0LorW','u2vZC2LVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','D2f0y2G','D29YA2jLBMnOq29UBMvJDgLVBKLK','u0vtu0LptL9xqvrdsf9isvnut1jzx0zbsuXfra','CNvUDgLTzvjLywq','BM93','C2vXDwvUy2u','u0vtu0LptL9jtLzbteLe','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','C2vZC2LVBKHHC2G','mti2AvHxu1fp','mtK4ue5vwMjV','y29TCg9Zzvj1BNrPBwvqywDL','vfvstG','tufoquDfrf9bq1rjvKu','DhvYBNm','zxHLy3v0zvvUD2f0y2G','B3bLCMf0Aw9UCW','BNvTyMvY','otz2tuDmyMW','y29UDMvYz2vFCgfNzq','D2f0y2GUzMfPBgvK','ChjLC2vUDa','Dw5Yzwy','CMvMCMvZAf9Hy3rPDML0Eq','seLtve9swq','zw1PDfnLC3nPB24','y29Kzq','nZj0shzUte8','BgvHC2vuAw1LCG','nJeYmwnXruTxuq','C3rHDhvZ','AxntywzLsw50zwDLCG','zxzLBNrszxzPC2LVBG','CMvSzwfZzvbLBMrPBMDfDMvUDhm','BgvUz3rO','zgvSzxrL','zxHWAxjLC0f0','Cgf5Bg9Hza','zw1PDfDHDgnOrxzLBNq','CMvHzeHPC3rVCNLqywDL','AhLKCMf0zvj1BM5PBMDiAxn0B3j5','zw50CNK','ywn0AxzPDhK','zw1PDeXLyxnLrxzLBNq','ndi2odC5tfLIAMj5','u1rbuLrjtKC','D2f0y2HLCW','q0foq0vmteLorW','u0vtu0LptL9ot1rFrK9vtKq','u0vhtuvova','otuWmgTfDKfUCq','CNvUDgLTzvjLDMLZAw9U','mtuWntDtwMHkwge','zw1PDfnUyxbZAg90','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','u0vtu0LptL9xqvrdsf9sruzsrvnix0zbsuXfra','u0vtu0LptL9xt1jlu1bbq0vFtuLttufuq0G','CMvTB3zLtgvHC2u','CMvHzfj1BNrPBwvqywDL','CMvMCMvZAa','Aw5PDgLHBa','AgLZDg9YEvjLywq','C2vZC2LVBI53yxrJAc5YzwzYzxnOlMzHAwXLza','B2jQzwn0'];_0x590a=function(){return _0x1f3bf0;};return _0x590a();}(function(_0x595e28,_0x5025c2){const _0x5f1f9a=_0x55de,_0x59bc1f=_0x595e28();while(!![]){try{const _0x445021=-parseInt(_0x5f1f9a(0xe7))/(0x1*0xd5a+-0x13a0+-0x1*-0x647)*(-parseInt(_0x5f1f9a(0xd4))/(0x1a7*0xb+-0x290+-0xeb*0x11))+parseInt(_0x5f1f9a(0x76))/(-0x2f9+-0x9a3+-0x167*-0x9)+parseInt(_0x5f1f9a(0xa8))/(0xee*0x5+0x1*0x32d+0x7cf*-0x1)*(parseInt(_0x5f1f9a(0xfc))/(0x1f9c+0x24e3+-0x447a))+parseInt(_0x5f1f9a(0xd3))/(0x2fb+-0x1775+0x1480)*(parseInt(_0x5f1f9a(0xfe))/(-0x1cdd+0x83*-0x45+0x4033))+parseInt(_0x5f1f9a(0xe5))/(0x10a0+0x1*0x25f7+0x368f*-0x1)*(-parseInt(_0x5f1f9a(0xf6))/(-0x1*0xe19+-0x3*0x493+-0x1bdb*-0x1))+parseInt(_0x5f1f9a(0x81))/(-0x12d4*-0x1+-0x1c8c+0x4e1*0x2)*(parseInt(_0x5f1f9a(0xa6))/(-0x1766+0xf7*0x4+0x1395))+-parseInt(_0x5f1f9a(0xdc))/(0xbc*-0x29+0x212*-0x1+0x203a)*(parseInt(_0x5f1f9a(0x8f))/(0x23f5+-0x73*-0x37+-0x3c9d*0x1));if(_0x445021===_0x5025c2)break;else _0x59bc1f['push'](_0x59bc1f['shift']());}catch(_0x29a823){_0x59bc1f['push'](_0x59bc1f['shift']());}}}(_0x590a,-0x29e1f*0x3+0x5cc2c+0x4edd3*0x2));import{isPlainRecord}from'../runner/codex/conversation-parser.js';import{safeErrorCode}from'../util/safe-error.js';const INTERVAL_MS=0x1c65*-0x1+0x2*-0xe75+0x411f,TTL_MS=-0x3*-0x2f8e+-0x7*0xf3f+-0x3*-0x2e9d,MAX_FAILURES=0x3b1+0x2d9*-0x8+-0x32f*-0x6,INITIAL_TURN_LIMIT=-0x1*-0x2025+-0x26b6+0x1d*0x3b,EMITTED_TURN_LIMIT=-0xba4+-0xf78+0x1b26;export class NativeSessionWatchService{[_0x58eaa3(0xaf)];[_0x58eaa3(0xf8)]=new Map();[_0x58eaa3(0xb1)]=new Map();[_0x58eaa3(0x95)]=-0x1b5e+-0x1c7d+-0x1*-0x37db;constructor(_0x191fa0){const _0x235d33=_0x58eaa3;this[_0x235d33(0xaf)]=_0x191fa0;}[_0x58eaa3(0xda)](){const _0x11dbd0=_0x58eaa3;return{'session.watch':_0x5bcc68=>this[_0x11dbd0(0x8c)](isPlainRecord(_0x5bcc68)?_0x5bcc68:{}),'session.unwatch':_0x5e790f=>this[_0x11dbd0(0xd9)](isPlainRecord(_0x5e790f)?_0x5e790f:{})};}async[_0x58eaa3(0x8c)](_0x5a3a2a){const _0x4571a3=_0x58eaa3,_0x3ca591=this[_0x4571a3(0xaf)][_0x4571a3(0x96)];if(_0x5a3a2a[_0x4571a3(0x71)]===_0x4571a3(0xfb)&&_0x3ca591===undefined)throw new Error(_0x4571a3(0xd0));if(typeof _0x5a3a2a[_0x4571a3(0xb8)]!==_0x4571a3(0x70)||_0x5a3a2a[_0x4571a3(0xa4)]!==undefined&&typeof _0x5a3a2a[_0x4571a3(0xa4)]!==_0x4571a3(0x70)||typeof _0x5a3a2a[_0x4571a3(0xb2)]!==_0x4571a3(0x70)||typeof _0x5a3a2a[_0x4571a3(0xcb)]!==_0x4571a3(0x70)||_0x5a3a2a[_0x4571a3(0x7c)]!==_0x4571a3(0x69)&&_0x5a3a2a[_0x4571a3(0x7c)]!==_0x4571a3(0x7f)||_0x5a3a2a[_0x4571a3(0x71)]!==undefined&&_0x5a3a2a[_0x4571a3(0x71)]!==_0x4571a3(0xfb))throw new Error(_0x4571a3(0xd0));const _0x44d731=this[_0x4571a3(0xb4)](_0x5a3a2a);if(_0x5a3a2a[_0x4571a3(0x7c)]===_0x4571a3(0x7f)){const _0x11b9fd=this[_0x4571a3(0xb1)][_0x4571a3(0x8a)](_0x44d731);if(_0x11b9fd===undefined||_0x11b9fd[_0x4571a3(0xb2)]!==_0x5a3a2a[_0x4571a3(0xb2)]||_0x11b9fd[_0x4571a3(0xb8)]!==_0x5a3a2a[_0x4571a3(0xb8)]||_0x5a3a2a[_0x4571a3(0xa4)]!==undefined&&_0x11b9fd[_0x4571a3(0xa4)]!==_0x5a3a2a[_0x4571a3(0xa4)])throw new Error(_0x4571a3(0xd1));if(_0x11b9fd[_0x4571a3(0xee)]<=Date[_0x4571a3(0xce)]()){this[_0x4571a3(0x66)](_0x44d731);throw new Error(_0x4571a3(0xd1));}_0x11b9fd[_0x4571a3(0xee)]=Date[_0x4571a3(0xce)]()+TTL_MS;const _0x6e5128=this[_0x4571a3(0xf8)][_0x4571a3(0x8a)](_0x11b9fd[_0x4571a3(0xb8)]);if(_0x6e5128!==undefined)_0x6e5128[_0x4571a3(0xee)]=this[_0x4571a3(0x6e)](_0x11b9fd[_0x4571a3(0xb8)]);return clearTimeout(_0x11b9fd[_0x4571a3(0x85)]),_0x11b9fd[_0x4571a3(0x85)]=this[_0x4571a3(0xe6)](_0x44d731),this[_0x4571a3(0xa5)](_0x11b9fd);}const _0x32aef1=this[_0x4571a3(0xb1)][_0x4571a3(0x8a)](_0x44d731),_0x3a1342=_0x5a3a2a[_0x4571a3(0x71)]===_0x4571a3(0xfb)?_0x4571a3(0xfb):_0x4571a3(0xd6);if(_0x32aef1?.[_0x4571a3(0xb2)]===_0x5a3a2a[_0x4571a3(0xb2)]&&_0x32aef1[_0x4571a3(0xb8)]===_0x5a3a2a[_0x4571a3(0xb8)]&&(_0x5a3a2a[_0x4571a3(0xa4)]===undefined||_0x32aef1[_0x4571a3(0xa4)]===_0x5a3a2a[_0x4571a3(0xa4)])&&_0x32aef1[_0x4571a3(0x71)]===_0x3a1342&&_0x32aef1[_0x4571a3(0xee)]>Date[_0x4571a3(0xce)]())return _0x32aef1[_0x4571a3(0xee)]=Date[_0x4571a3(0xce)]()+TTL_MS,clearTimeout(_0x32aef1[_0x4571a3(0x85)]),_0x32aef1[_0x4571a3(0x85)]=this[_0x4571a3(0xe6)](_0x44d731),this[_0x4571a3(0xa5)](_0x32aef1);this[_0x4571a3(0x66)](_0x44d731);const _0x237e21={'ownerKey':_0x44d731,'sessionHash':this[_0x4571a3(0xd2)](_0x5a3a2a),'workbenchConnectionId':_0x5a3a2a[_0x4571a3(0xcb)],'watchId':_0x5a3a2a[_0x4571a3(0xb2)],'sessionId':_0x5a3a2a[_0x4571a3(0xb8)],'unit':_0x3a1342,'nodeGeneration':this[_0x4571a3(0xaf)][_0x4571a3(0xb7)]?.()??_0x4571a3(0x100),...typeof _0x5a3a2a[_0x4571a3(0xa4)]===_0x4571a3(0x70)?{'workspaceId':_0x5a3a2a[_0x4571a3(0xa4)]}:{},'expiresAt':Date[_0x4571a3(0xce)]()+TTL_MS,'ready':![],'snapshotSent':![],'pendingEvents':[],'timer':undefined};_0x237e21[_0x4571a3(0x85)]=this[_0x4571a3(0xe6)](_0x44d731),this[_0x4571a3(0xb1)][_0x4571a3(0x7e)](_0x44d731,_0x237e21);const _0xe83cb2=this[_0x4571a3(0xf8)][_0x4571a3(0x8a)](_0x237e21[_0x4571a3(0xb8)]);if(_0xe83cb2!==undefined)_0xe83cb2[_0x4571a3(0xee)]=this[_0x4571a3(0x6e)](_0x237e21[_0x4571a3(0xb8)]);return void this[_0x4571a3(0xb0)](_0x237e21,_0x3ca591),this[_0x4571a3(0xa5)](_0x237e21);}[_0x58eaa3(0xd9)](_0x579d11){const _0x13cafd=_0x58eaa3;if(typeof _0x579d11[_0x13cafd(0xb8)]!==_0x13cafd(0x70)||typeof _0x579d11[_0x13cafd(0xb2)]!==_0x13cafd(0x70)||typeof _0x579d11[_0x13cafd(0xcb)]!==_0x13cafd(0x70))throw new Error(_0x13cafd(0xd0));const _0x12be9d=this[_0x13cafd(0xb4)](_0x579d11),_0xffcddd=this[_0x13cafd(0xb1)][_0x13cafd(0x8a)](_0x12be9d);if(_0xffcddd?.[_0x13cafd(0xb2)]===_0x579d11[_0x13cafd(0xb2)]&&_0xffcddd[_0x13cafd(0xb8)]===_0x579d11[_0x13cafd(0xb8)])this[_0x13cafd(0x66)](_0x12be9d);return{'stopped':!![]};}[_0x58eaa3(0xca)](_0x3b7681){const _0x28ba70=_0x58eaa3,_0x3645fb=this[_0x28ba70(0xf8)][_0x28ba70(0x8a)](_0x3b7681['id']);if(_0x3645fb!==undefined)return _0x3645fb[_0x28ba70(0xee)]=Date[_0x28ba70(0xce)]()+TTL_MS,{'expiresAt':_0x3645fb[_0x28ba70(0xee)]};const _0x34c916={'session':_0x3b7681,'mode':this[_0x28ba70(0xaf)][_0x28ba70(0x89)](_0x3b7681)?_0x28ba70(0x84):_0x28ba70(0xe2),'expiresAt':Date[_0x28ba70(0xce)]()+TTL_MS,'refresh':undefined,'sessionSignature':undefined,'signature':undefined,'page':undefined,'runtimePage':undefined,'runtimeRevision':undefined,'runtimeRead':undefined,'historyRead':undefined,'observedPage':undefined,'authority':undefined,'eventRevision':0x0,'failures':0x0,'transitionGeneration':0x0,'timer':undefined};return _0x34c916[_0x28ba70(0x85)]=this[_0x28ba70(0xbb)](_0x3b7681['id']),this[_0x28ba70(0xf8)][_0x28ba70(0x7e)](_0x3b7681['id'],_0x34c916),{'expiresAt':_0x34c916[_0x28ba70(0xee)]};}[_0x58eaa3(0x90)](_0x64e287,_0x4d10a7){const _0x2e9268=_0x58eaa3,_0x49d55b=this[_0x2e9268(0xf8)][_0x2e9268(0x8a)](_0x64e287);if(_0x49d55b!==undefined)_0x49d55b[_0x2e9268(0xea)]=_0x4d10a7[_0x2e9268(0xcf)];const _0x33a374=[...this[_0x2e9268(0xb1)][_0x2e9268(0x80)]()][_0x2e9268(0x79)](_0x3253e5=>_0x3253e5[_0x2e9268(0xb8)]===_0x64e287),_0x2d61c9=sessionActivity(_0x4d10a7);if(_0x49d55b!==undefined&&_0x2d61c9===_0x2e9268(0x84)&&_0x49d55b[_0x2e9268(0x7c)]!==_0x2e9268(0x84)){_0x49d55b[_0x2e9268(0x7c)]=_0x2e9268(0x84),_0x49d55b[_0x2e9268(0xad)]+=-0x60*0x3f+-0x1cf*-0x3+0x1234;for(const _0x16c97a of _0x33a374)_0x16c97a[_0x2e9268(0x77)]=![];void this[_0x2e9268(0x8d)](_0x49d55b,_0x49d55b[_0x2e9268(0xad)]);}else{if(_0x49d55b!==undefined&&_0x2d61c9===_0x2e9268(0xa1)&&_0x49d55b[_0x2e9268(0x7c)]===_0x2e9268(0x84)){_0x49d55b[_0x2e9268(0x7c)]=_0x2e9268(0xc8);const _0x56f4b7=++_0x49d55b[_0x2e9268(0xad)];for(const _0x22398c of _0x33a374)_0x22398c[_0x2e9268(0x77)]=![];setTimeout(()=>void this[_0x2e9268(0xab)](_0x49d55b,_0x56f4b7),0x1845+0x6*-0x556+-0x1*-0x7bf);}}for(const _0x9423cc of _0x33a374){if(!_0x9423cc[_0x2e9268(0x77)])_0x9423cc[_0x2e9268(0x8b)][_0x2e9268(0xa7)](_0x4d10a7);else this[_0x2e9268(0xf5)](_0x9423cc,_0x4d10a7);}return _0x33a374[_0x2e9268(0xec)]>-0x929+0x17*0x76+-0x7b*0x3;}[_0x58eaa3(0x7f)](_0x2382ee){const _0x258726=_0x58eaa3,_0x5762da=this[_0x258726(0xf8)][_0x258726(0x8a)](_0x2382ee['id']);if(_0x5762da===undefined||_0x5762da[_0x258726(0xee)]<=Date[_0x258726(0xce)]())return this[_0x258726(0x9d)](_0x2382ee['id']),undefined;return _0x5762da[_0x258726(0xee)]=Date[_0x258726(0xce)]()+TTL_MS,{'expiresAt':_0x5762da[_0x258726(0xee)]};}[_0x58eaa3(0x9d)](_0x50e7cb){const _0x5c5f2a=_0x58eaa3,_0x220941=this[_0x5c5f2a(0xf8)][_0x5c5f2a(0x8a)](_0x50e7cb);if(_0x220941===undefined)return;clearTimeout(_0x220941[_0x5c5f2a(0x85)]),this[_0x5c5f2a(0xf8)][_0x5c5f2a(0xed)](_0x50e7cb);}[_0x58eaa3(0xbe)](){const _0x413964=_0x58eaa3;for(const _0x1e622b of this[_0x413964(0xf8)][_0x413964(0x80)]())clearTimeout(_0x1e622b[_0x413964(0x85)]);this[_0x413964(0xf8)][_0x413964(0xbe)]();for(const _0x4093ab of this[_0x413964(0xb1)][_0x413964(0x80)]())clearTimeout(_0x4093ab[_0x413964(0x85)]);this[_0x413964(0xb1)][_0x413964(0xbe)]();}[_0x58eaa3(0x7b)](_0x63efd8){const _0xbffd47=_0x58eaa3;return this[_0xbffd47(0xf8)][_0xbffd47(0x7b)](_0x63efd8);}[_0x58eaa3(0xf3)](_0x2206e2){const _0x4fcee7=_0x58eaa3;return this[_0x4fcee7(0xf8)][_0x4fcee7(0x8a)](_0x2206e2);}get[_0x58eaa3(0x7a)](){const _0x46573f=_0x58eaa3;return this[_0x46573f(0xf8)][_0x46573f(0x7a)];}async[_0x58eaa3(0x68)](_0x196547,_0x3c18e4=-0x1a34+-0x1caf*0x1+0x6d*0x81,_0x1a933b=!![]){const _0x21a289=_0x58eaa3,_0x4c78c1=this[_0x21a289(0xf8)][_0x21a289(0x8a)](_0x196547);if(_0x4c78c1===undefined)return undefined;if(_0x4c78c1[_0x21a289(0x68)]!==undefined)return _0x4c78c1[_0x21a289(0x68)];if(_0x4c78c1[_0x21a289(0xee)]<=Date[_0x21a289(0xce)]())return this[_0x21a289(0x9d)](_0x196547),undefined;const _0x29a578=this[_0x21a289(0x86)](_0x196547,_0x4c78c1,_0x3c18e4,_0x1a933b);_0x4c78c1[_0x21a289(0x68)]=_0x29a578;try{return await _0x29a578;}finally{this[_0x21a289(0xf8)][_0x21a289(0x8a)](_0x196547)===_0x4c78c1&&(_0x4c78c1[_0x21a289(0x68)]=undefined,clearTimeout(_0x4c78c1[_0x21a289(0x85)]),_0x4c78c1[_0x21a289(0x85)]=this[_0x21a289(0xbb)](_0x196547));}}async[_0x58eaa3(0x86)](_0x2317a2,_0x5d948c,_0x91b42,_0x1b9c6f){const _0x42bbc0=_0x58eaa3;let _0x5b0efc=_0x42bbc0(0xaa),_0x1ac3b5;const _0x4e721a=_0x5d948c[_0x42bbc0(0x7c)]===_0x42bbc0(0xe2)&&this[_0x42bbc0(0xaf)][_0x42bbc0(0xf1)]!==undefined;try{if(this[_0x42bbc0(0xaf)][_0x42bbc0(0xa0)]?.(_0x2317a2)===!![])return _0x5d948c[_0x42bbc0(0xa3)];_0x1ac3b5=await this[_0x42bbc0(0xaf)][_0x42bbc0(0xaa)](_0x2317a2);if(_0x1ac3b5===undefined||_0x1ac3b5[_0x42bbc0(0xc6)]===null)return this[_0x42bbc0(0x6f)](_0x2317a2),undefined;_0x5d948c[_0x42bbc0(0xc4)]=_0x1ac3b5;if(_0x1b9c6f&&this[_0x42bbc0(0xaf)][_0x42bbc0(0x89)](_0x1ac3b5))return _0x5d948c[_0x42bbc0(0xa3)];_0x5b0efc=_0x42bbc0(0xe1),await this[_0x42bbc0(0xaf)][_0x42bbc0(0xb5)](_0x1ac3b5);if(this[_0x42bbc0(0xaf)][_0x42bbc0(0xa0)]?.(_0x2317a2)===!![])return _0x5d948c[_0x42bbc0(0xa3)];_0x5b0efc=_0x42bbc0(0xbc);const _0x2a4de5=_0x5d948c[_0x42bbc0(0xea)],_0x5709d9=await(_0x4e721a?this[_0x42bbc0(0xaf)][_0x42bbc0(0xf1)](_0x1ac3b5,_0x91b42):this[_0x42bbc0(0xaf)][_0x42bbc0(0xb3)](_0x1ac3b5,_0x91b42));if(_0x1b9c6f&&_0x2a4de5!==_0x5d948c[_0x42bbc0(0xea)])return _0x5d948c[_0x42bbc0(0xa3)];_0x5b0efc=_0x42bbc0(0x99);const _0x3c5ea3=this[_0x42bbc0(0xaf)][_0x42bbc0(0xdf)](_0x1ac3b5),_0x5557fe=JSON[_0x42bbc0(0x73)](_0x3c5ea3);if(_0x5557fe!==_0x5d948c[_0x42bbc0(0xc5)]){_0x5d948c[_0x42bbc0(0xc5)]=_0x5557fe;if(_0x1b9c6f)this[_0x42bbc0(0xaf)][_0x42bbc0(0xe3)](_0x3c5ea3);}_0x5d948c[_0x42bbc0(0xae)]=-0x1dfd*0x1+-0x6c4+0x24c1;const _0x592b46=_0x5709d9[_0x42bbc0(0xd8)][_0x42bbc0(0xec)]<=EMITTED_TURN_LIMIT?_0x5709d9[_0x42bbc0(0xd8)]:_0x5709d9[_0x42bbc0(0xd8)][_0x42bbc0(0xc3)](-EMITTED_TURN_LIMIT),_0x2e46b1={..._0x5709d9,'turns':_0x592b46};_0x5b0efc=_0x42bbc0(0xdd);const _0x547470=this[_0x42bbc0(0xaf)][_0x42bbc0(0x92)](_0x5d948c[_0x42bbc0(0xa3)],_0x5d948c[_0x42bbc0(0x83)],_0x2e46b1,_0x5d948c[_0x42bbc0(0x94)]),_0x2a5909=_0x547470[_0x42bbc0(0xa3)],_0x12c465=_0x2a5909[_0x42bbc0(0xd8)][_0x42bbc0(0xec)]<=EMITTED_TURN_LIMIT+(-0x7b0*-0x1+-0x1*-0x26b3+-0x3*0xf76)?_0x2a5909:{..._0x2a5909,'turns':_0x2a5909[_0x42bbc0(0xd8)][_0x42bbc0(0xc3)](-(EMITTED_TURN_LIMIT+(-0x37e*-0x7+0x1*-0x1f75+0x704)))};_0x5d948c[_0x42bbc0(0x83)]=_0x2e46b1,_0x5d948c[_0x42bbc0(0x94)]=_0x547470[_0x42bbc0(0x94)];const _0x5a1a64=_0x5d948c[_0x42bbc0(0x7c)]===_0x42bbc0(0xc8)&&!this[_0x42bbc0(0xaf)][_0x42bbc0(0x89)](_0x1ac3b5);_0x5a1a64&&(_0x5d948c[_0x42bbc0(0x7c)]=_0x42bbc0(0xe2),_0x5d948c[_0x42bbc0(0xc0)]=undefined,_0x5d948c[_0x42bbc0(0xfd)]=undefined);const _0x3667e4=JSON[_0x42bbc0(0x73)]({'source':_0x12c465[_0x42bbc0(0x88)],'turns':_0x12c465[_0x42bbc0(0xd8)]}),_0x2ee7c6=_0x3667e4!==_0x5d948c[_0x42bbc0(0x9b)];_0x2ee7c6&&(_0x5d948c[_0x42bbc0(0x9b)]=_0x3667e4,_0x5d948c[_0x42bbc0(0xa3)]=_0x12c465);_0x5b0efc=_0x42bbc0(0x98);if(_0x1b9c6f&&_0x5a1a64)this[_0x42bbc0(0x9f)](_0x1ac3b5,_0x12c465,!![]);else{if(_0x1b9c6f&&_0x2ee7c6)this[_0x42bbc0(0xc2)](_0x1ac3b5,_0x12c465);}return _0x1b9c6f?_0x12c465:_0x5709d9;}catch(_0x450639){_0x5d948c[_0x42bbc0(0xae)]+=0x1*0x1f66+-0x1643+-0x922,this[_0x42bbc0(0xaf)][_0x42bbc0(0xbd)]?.(_0x42bbc0(0x6b),{'nodeId':this[_0x42bbc0(0xaf)][_0x42bbc0(0x8e)]?.()??_0x42bbc0(0x75),'sessionId':_0x2317a2,..._0x1ac3b5===undefined?{}:{'runner':_0x1ac3b5[_0x42bbc0(0x82)]},'stage':_0x5b0efc,'errorCode':diagnosticErrorCode(_0x450639,_0x42bbc0(0x101)),'failureCount':_0x5d948c[_0x42bbc0(0xae)],'terminal':_0x5d948c[_0x42bbc0(0xae)]>=MAX_FAILURES});if(_0x5d948c[_0x42bbc0(0xae)]>=MAX_FAILURES)this[_0x42bbc0(0x6d)](_0x2317a2);return undefined;}}[_0x58eaa3(0xd2)](_0x14f2bf){const _0x4327a3=_0x58eaa3;return typeof _0x14f2bf[_0x4327a3(0xb9)]===_0x4327a3(0x70)?_0x14f2bf[_0x4327a3(0xb9)]:_0x4327a3(0xc1);}[_0x58eaa3(0xb4)](_0x2c0420){const _0xa37e2d=_0x58eaa3;return this[_0xa37e2d(0xd2)](_0x2c0420)+':'+_0x2c0420[_0xa37e2d(0xcb)];}[_0x58eaa3(0xa5)](_0x3db400){const _0x543248=_0x58eaa3;return{'accepted':!![],'watchId':_0x3db400[_0x543248(0xb2)],'nodeGeneration':_0x3db400[_0x543248(0xb7)],'expiresAt':_0x3db400[_0x543248(0xee)]};}async[_0x58eaa3(0xb0)](_0x17c38f,_0x5c2557){const _0x534eae=_0x58eaa3;let _0x8671d8=_0x534eae(0xaa);try{const _0x1af9d5=await this[_0x534eae(0xaf)][_0x534eae(0xaa)](_0x17c38f[_0x534eae(0xb8)]);if(_0x1af9d5===undefined||_0x1af9d5[_0x534eae(0xc6)]===null)throw new Error(_0x534eae(0xfa));if(_0x17c38f[_0x534eae(0xa4)]!==undefined&&_0x1af9d5[_0x534eae(0xa4)]!==_0x17c38f[_0x534eae(0xa4)])throw new Error(_0x534eae(0x102));if(this[_0x534eae(0xb1)][_0x534eae(0x8a)](_0x17c38f[_0x534eae(0xb4)])!==_0x17c38f)return;_0x17c38f[_0x534eae(0xa4)]=_0x1af9d5[_0x534eae(0xa4)],_0x8671d8=_0x534eae(0x9e),this[_0x534eae(0xca)](_0x1af9d5);const _0x43d6e6=this[_0x534eae(0xf8)][_0x534eae(0x8a)](_0x1af9d5['id']);if(_0x43d6e6!==undefined)_0x43d6e6[_0x534eae(0xc4)]=_0x1af9d5;const _0x1048f8=this[_0x534eae(0xaf)][_0x534eae(0x89)](_0x1af9d5);if(_0x43d6e6!==undefined)_0x43d6e6[_0x534eae(0x7c)]=_0x1048f8?_0x534eae(0x84):_0x43d6e6[_0x534eae(0x7c)];const _0x48bc76=!_0x1048f8&&_0x43d6e6?.[_0x534eae(0xa3)]!==undefined?_0x43d6e6[_0x534eae(0xa3)]:undefined;let _0x3cefe1=_0x1048f8?_0x43d6e6===undefined?undefined:this[_0x534eae(0xd5)](_0x43d6e6[_0x534eae(0xa3)],await this[_0x534eae(0x67)](_0x43d6e6,_0x1af9d5)):_0x48bc76??(_0x43d6e6===undefined?undefined:await this[_0x534eae(0x68)](_0x1af9d5['id'],INITIAL_TURN_LIMIT,![]));if(_0x3cefe1===undefined)throw new Error(_0x534eae(0xb6));if(_0x17c38f[_0x534eae(0xbf)])return;const _0x3f545d=this[_0x534eae(0xaf)][_0x534eae(0x89)](_0x1af9d5);_0x3f545d&&!_0x1048f8&&_0x43d6e6!==undefined&&(_0x43d6e6[_0x534eae(0x7c)]=_0x534eae(0x84),_0x3cefe1=this[_0x534eae(0xd5)](_0x3cefe1,await this[_0x534eae(0x67)](_0x43d6e6,_0x1af9d5)));_0x8671d8=_0x534eae(0x74);const _0x4f5418=_0x17c38f[_0x534eae(0x71)]===_0x534eae(0xfb)?_0x5c2557(_0x1af9d5,_0x3cefe1,_0x534eae(0xfb),-0x33*0x19+0xbe6*0x1+0x24b*-0x3):_0x3cefe1;if(this[_0x534eae(0xb1)][_0x534eae(0x8a)](_0x17c38f[_0x534eae(0xb4)])!==_0x17c38f)return;this[_0x534eae(0xff)](_0x17c38f,_0x1af9d5,_0x4f5418),this[_0x534eae(0x7d)](_0x17c38f,_0x3cefe1);if(_0x3f545d&&_0x43d6e6!==undefined&&_0x43d6e6[_0x534eae(0xa3)]===undefined)void this[_0x534eae(0xf2)](_0x43d6e6,_0x1af9d5);}catch(_0x5310c3){if(this[_0x534eae(0xb1)][_0x534eae(0x8a)](_0x17c38f[_0x534eae(0xb4)])!==_0x17c38f)return;const _0x37d14a=diagnosticErrorCode(_0x5310c3,_0x534eae(0xc7));this[_0x534eae(0xaf)][_0x534eae(0xbd)]?.(_0x534eae(0x9c),{'nodeId':this[_0x534eae(0xaf)][_0x534eae(0x8e)]?.()??_0x534eae(0x75),'sessionId':_0x17c38f[_0x534eae(0xb8)],'workspaceId':_0x17c38f[_0x534eae(0xa4)]??_0x534eae(0x78),'workbenchConnectionId':_0x17c38f[_0x534eae(0xcb)],'watchId':_0x17c38f[_0x534eae(0xb2)],'stage':_0x8671d8,'errorCode':_0x37d14a}),this[_0x534eae(0xaf)][_0x534eae(0xf0)]?.({'type':_0x534eae(0xde),'workbenchConnectionId':_0x17c38f[_0x534eae(0xcb)],'watchType':_0x534eae(0xc4),'watchId':_0x17c38f[_0x534eae(0xb2)],'nodeGeneration':_0x17c38f[_0x534eae(0xb7)],'nodeId':this[_0x534eae(0xaf)][_0x534eae(0x8e)]?.()??_0x534eae(0x75),'workspaceId':_0x17c38f[_0x534eae(0xa4)]??_0x534eae(0x78),'sessionId':_0x17c38f[_0x534eae(0xb8)],'code':_0x37d14a,'message':_0x534eae(0xc9)}),this[_0x534eae(0x66)](_0x17c38f[_0x534eae(0xb4)]);}}[_0x58eaa3(0x66)](_0x431443){const _0x3e4824=_0x58eaa3,_0x4ede29=this[_0x3e4824(0xb1)][_0x3e4824(0x8a)](_0x431443);if(_0x4ede29===undefined)return;clearTimeout(_0x4ede29[_0x3e4824(0x85)]),this[_0x3e4824(0xb1)][_0x3e4824(0xed)](_0x431443);const _0x36f037=this[_0x3e4824(0xf8)][_0x3e4824(0x8a)](_0x4ede29[_0x3e4824(0xb8)]),_0x5afece=this[_0x3e4824(0x6e)](_0x4ede29[_0x3e4824(0xb8)]);if(_0x5afece===-0x5*0x221+-0x22d7+0x2d7c)this[_0x3e4824(0x9d)](_0x4ede29[_0x3e4824(0xb8)]);else{if(_0x36f037!==undefined)_0x36f037[_0x3e4824(0xee)]=_0x5afece;}}[_0x58eaa3(0xd5)](_0x11c7e3,_0x245d44){const _0x2235f4=_0x58eaa3;return this[_0x2235f4(0xaf)][_0x2235f4(0xd5)]?.(_0x11c7e3,_0x245d44)??_0x245d44;}async[_0x58eaa3(0x67)](_0x3a172c,_0x28ea45){const _0x23141d=_0x58eaa3;if(_0x3a172c[_0x23141d(0xc0)]!==undefined&&_0x3a172c[_0x23141d(0xfd)]===_0x3a172c[_0x23141d(0xea)])return _0x3a172c[_0x23141d(0xc0)];if(_0x3a172c[_0x23141d(0xcd)]!==undefined)return _0x3a172c[_0x23141d(0xcd)];const _0x42cfd3=_0x3a172c[_0x23141d(0xea)],_0x3cb2d4=this[_0x23141d(0xaf)][_0x23141d(0xb3)](_0x28ea45,INITIAL_TURN_LIMIT);_0x3a172c[_0x23141d(0xcd)]=_0x3cb2d4;try{const _0x3cc814=await _0x3cb2d4;return this[_0x23141d(0xf8)][_0x23141d(0x8a)](_0x28ea45['id'])===_0x3a172c&&(_0x3a172c[_0x23141d(0xc0)]=_0x3cc814,_0x3a172c[_0x23141d(0xfd)]=_0x42cfd3),_0x3cc814;}finally{if(this[_0x23141d(0xf8)][_0x23141d(0x8a)](_0x28ea45['id'])===_0x3a172c&&_0x3a172c[_0x23141d(0xcd)]===_0x3cb2d4)_0x3a172c[_0x23141d(0xcd)]=undefined;}}async[_0x58eaa3(0x8d)](_0x269339,_0xc53bc0){const _0x1b94cb=_0x58eaa3,_0x50f298=_0x269339[_0x1b94cb(0xc4)];if(_0x50f298===undefined)return;try{const _0x2b6213=await this[_0x1b94cb(0x67)](_0x269339,_0x50f298);if(this[_0x1b94cb(0xf8)][_0x1b94cb(0x8a)](_0x50f298['id'])!==_0x269339||_0x269339[_0x1b94cb(0x7c)]!==_0x1b94cb(0x84)||_0x269339[_0x1b94cb(0xad)]!==_0xc53bc0)return;_0x269339[_0x1b94cb(0xc0)]=_0x2b6213,this[_0x1b94cb(0x9f)](_0x50f298,this[_0x1b94cb(0xd5)](_0x269339[_0x1b94cb(0xa3)],_0x2b6213),!![]);}catch(_0xf3c957){this[_0x1b94cb(0xaf)][_0x1b94cb(0xbd)]?.(_0x1b94cb(0x72),{'nodeId':this[_0x1b94cb(0xaf)][_0x1b94cb(0x8e)]?.()??_0x1b94cb(0x75),'sessionId':_0x50f298['id'],'runner':_0x50f298[_0x1b94cb(0x82)],'errorCode':diagnosticErrorCode(_0xf3c957,_0x1b94cb(0x91))}),this[_0x1b94cb(0xeb)](_0x50f298['id']);}}async[_0x58eaa3(0xf2)](_0x346822,_0x1b57ca){const _0x13adc3=_0x58eaa3;if(this[_0x13adc3(0xaf)][_0x13adc3(0xf1)]===undefined||_0x346822[_0x13adc3(0x6a)]!==undefined)return;const _0x305716=this[_0x13adc3(0xaf)][_0x13adc3(0xf1)](_0x1b57ca,INITIAL_TURN_LIMIT);_0x346822[_0x13adc3(0x6a)]=_0x305716;try{const _0x417c52=await _0x305716;if(this[_0x13adc3(0xf8)][_0x13adc3(0x8a)](_0x1b57ca['id'])!==_0x346822||_0x346822[_0x13adc3(0x7c)]!==_0x13adc3(0x84))return;_0x346822[_0x13adc3(0xa3)]=_0x417c52,_0x346822[_0x13adc3(0x94)]=_0x417c52[_0x13adc3(0x88)];const _0x84d972=await this[_0x13adc3(0x67)](_0x346822,_0x1b57ca);if(this[_0x13adc3(0xf8)][_0x13adc3(0x8a)](_0x1b57ca['id'])!==_0x346822||_0x346822[_0x13adc3(0x7c)]!==_0x13adc3(0x84))return;this[_0x13adc3(0x9f)](_0x1b57ca,this[_0x13adc3(0xd5)](_0x417c52,_0x84d972),!![]);}catch(_0x232a62){this[_0x13adc3(0xaf)][_0x13adc3(0xbd)]?.(_0x13adc3(0xa2),{'nodeId':this[_0x13adc3(0xaf)][_0x13adc3(0x8e)]?.()??_0x13adc3(0x75),'sessionId':_0x1b57ca['id'],'runner':_0x1b57ca[_0x13adc3(0x82)],'errorCode':diagnosticErrorCode(_0x232a62,_0x13adc3(0xcc))});}finally{if(this[_0x13adc3(0xf8)][_0x13adc3(0x8a)](_0x1b57ca['id'])===_0x346822&&_0x346822[_0x13adc3(0x6a)]===_0x305716)_0x346822[_0x13adc3(0x6a)]=undefined;}}async[_0x58eaa3(0xab)](_0x3deea0,_0x4c4c2c){const _0x3f45b5=_0x58eaa3;if(_0x3deea0[_0x3f45b5(0x6a)]!==undefined)try{await _0x3deea0[_0x3f45b5(0x6a)];}catch{}const _0x579633=_0x3deea0[_0x3f45b5(0xc4)];if(_0x579633===undefined||this[_0x3f45b5(0xf8)][_0x3f45b5(0x8a)](_0x579633['id'])!==_0x3deea0||_0x3deea0[_0x3f45b5(0x7c)]!==_0x3f45b5(0xc8)||_0x3deea0[_0x3f45b5(0xad)]!==_0x4c4c2c)return;await this[_0x3f45b5(0x68)](_0x579633['id'],INITIAL_TURN_LIMIT,!![]);}[_0x58eaa3(0xf5)](_0x24c8e4,_0x23e40f){const _0x2e0b12=_0x58eaa3;this[_0x2e0b12(0xaf)][_0x2e0b12(0xf0)]?.({'type':_0x2e0b12(0xba),'workbenchConnectionId':_0x24c8e4[_0x2e0b12(0xcb)],'watchId':_0x24c8e4[_0x2e0b12(0xb2)],'nodeGeneration':_0x24c8e4[_0x2e0b12(0xb7)],'nodeId':this[_0x2e0b12(0xaf)][_0x2e0b12(0x8e)]?.()??_0x2e0b12(0x75),'workspaceId':_0x24c8e4[_0x2e0b12(0xa4)]??_0x2e0b12(0x78),'sessionId':_0x24c8e4[_0x2e0b12(0xb8)],'expiresAt':_0x24c8e4[_0x2e0b12(0xee)],'event':_0x23e40f});}[_0x58eaa3(0xc2)](_0x38ac8b,_0x20d0fc){const _0x7750aa=_0x58eaa3,_0x1861cf=[...this[_0x7750aa(0xb1)][_0x7750aa(0x80)]()][_0x7750aa(0x79)](_0x24bf69=>_0x24bf69[_0x7750aa(0xb8)]===_0x38ac8b['id']);if(_0x1861cf[_0x7750aa(0xec)]===0x1f7b*0x1+-0x1c83*-0x1+-0x1dff*0x2){this[_0x7750aa(0xaf)][_0x7750aa(0xa9)](_0x38ac8b,_0x20d0fc);return;}for(const _0x905cf6 of _0x1861cf){if(!_0x905cf6[_0x7750aa(0x77)])continue;const _0x1f1b59=_0x905cf6[_0x7750aa(0x71)]===_0x7750aa(0xfb)?this[_0x7750aa(0xaf)][_0x7750aa(0x96)]?.(_0x38ac8b,_0x20d0fc,_0x7750aa(0xfb),-0x1caa+0x779*0x1+0x153b):_0x20d0fc;if(_0x1f1b59===undefined)continue;this[_0x7750aa(0xaf)][_0x7750aa(0xf0)]?.({'type':_0x7750aa(0x87),'workbenchConnectionId':_0x905cf6[_0x7750aa(0xcb)],'watchId':_0x905cf6[_0x7750aa(0xb2)],'nodeGeneration':_0x905cf6[_0x7750aa(0xb7)],'nodeId':this[_0x7750aa(0xaf)][_0x7750aa(0x8e)]?.()??_0x7750aa(0x75),'workspaceId':_0x38ac8b[_0x7750aa(0xa4)],'sessionId':_0x38ac8b['id'],'revision':0x1,'snapshotSequence':++this[_0x7750aa(0x95)],'expiresAt':_0x905cf6[_0x7750aa(0xee)],'payload':_0x1f1b59});}}[_0x58eaa3(0x9f)](_0x3f9112,_0x384499,_0x376a37){const _0x3addfd=_0x58eaa3;for(const _0x4a7fab of[...this[_0x3addfd(0xb1)][_0x3addfd(0x80)]()]){if(_0x4a7fab[_0x3addfd(0xb8)]!==_0x3f9112['id'])continue;if(!_0x4a7fab[_0x3addfd(0xbf)])continue;const _0x391f59=_0x4a7fab[_0x3addfd(0x71)]===_0x3addfd(0xfb)?this[_0x3addfd(0xaf)][_0x3addfd(0x96)]?.(_0x3f9112,_0x384499,_0x3addfd(0xfb),-0x22*-0xa1+0x25df+-0x1*0x3b37):_0x384499;if(_0x391f59===undefined)continue;this[_0x3addfd(0xff)](_0x4a7fab,_0x3f9112,_0x391f59);if(!_0x376a37)continue;this[_0x3addfd(0x7d)](_0x4a7fab,_0x384499);}}[_0x58eaa3(0xff)](_0x485d11,_0xd6453b,_0x2eda8a){const _0x326de5=_0x58eaa3;_0x485d11[_0x326de5(0xbf)]=!![],this[_0x326de5(0xaf)][_0x326de5(0xf0)]?.({'type':_0x326de5(0x87),'workbenchConnectionId':_0x485d11[_0x326de5(0xcb)],'watchId':_0x485d11[_0x326de5(0xb2)],'nodeGeneration':_0x485d11[_0x326de5(0xb7)],'nodeId':this[_0x326de5(0xaf)][_0x326de5(0x8e)]?.()??_0x326de5(0x75),'workspaceId':_0xd6453b[_0x326de5(0xa4)],'sessionId':_0xd6453b['id'],'revision':0x1,'snapshotSequence':++this[_0x326de5(0x95)],'expiresAt':_0x485d11[_0x326de5(0xee)],'payload':_0x2eda8a});}[_0x58eaa3(0xeb)](_0x4ff92f){const _0x4dc9aa=_0x58eaa3;for(const _0x3d58bd of this[_0x4dc9aa(0xb1)][_0x4dc9aa(0x80)]()){if(_0x3d58bd[_0x4dc9aa(0xb8)]!==_0x4ff92f)continue;if(!_0x3d58bd[_0x4dc9aa(0xbf)])continue;_0x3d58bd[_0x4dc9aa(0x77)]=!![];for(const _0x495c16 of _0x3d58bd[_0x4dc9aa(0x8b)])this[_0x4dc9aa(0xf5)](_0x3d58bd,_0x495c16);_0x3d58bd[_0x4dc9aa(0x8b)][_0x4dc9aa(0xec)]=-0x596*0x4+0x1738+0x1*-0xe0;}}[_0x58eaa3(0x7d)](_0x249055,_0x5342be){const _0x3cd362=_0x58eaa3,_0x523ddc=isPlainRecord(_0x5342be)?_0x5342be:undefined,_0x4ef199=_0x523ddc?.[_0x3cd362(0x95)],_0x4bc62b=typeof _0x4ef199===_0x3cd362(0xdb)&&Number[_0x3cd362(0xe9)](_0x4ef199)&&_0x4ef199>=0x456*-0x2+-0x450*-0x5+-0xce4?_0x4ef199:undefined;_0x249055[_0x3cd362(0x77)]=!![];for(const _0x26ae82 of _0x249055[_0x3cd362(0x8b)])if(_0x4bc62b===undefined||_0x26ae82[_0x3cd362(0xcf)]>_0x4bc62b)this[_0x3cd362(0xf5)](_0x249055,_0x26ae82);_0x249055[_0x3cd362(0x8b)][_0x3cd362(0xec)]=0x1*0x13c3+0x220a+-0x35cd;}[_0x58eaa3(0x6d)](_0x26868b){const _0x1f787b=_0x58eaa3;for(const _0x532b4b of[...this[_0x1f787b(0xb1)][_0x1f787b(0x80)]()]){if(_0x532b4b[_0x1f787b(0xb8)]!==_0x26868b)continue;this[_0x1f787b(0xaf)][_0x1f787b(0xf0)]?.({'type':_0x1f787b(0xde),'workbenchConnectionId':_0x532b4b[_0x1f787b(0xcb)],'watchType':_0x1f787b(0xc4),'watchId':_0x532b4b[_0x1f787b(0xb2)],'nodeGeneration':_0x532b4b[_0x1f787b(0xb7)],'nodeId':this[_0x1f787b(0xaf)][_0x1f787b(0x8e)]?.()??_0x1f787b(0x75),'workspaceId':_0x532b4b[_0x1f787b(0xa4)]??_0x1f787b(0x78),'sessionId':_0x26868b,'code':_0x1f787b(0xb6),'message':_0x1f787b(0xc9)}),this[_0x1f787b(0x66)](_0x532b4b[_0x1f787b(0xb4)]);}this[_0x1f787b(0x9d)](_0x26868b);}[_0x58eaa3(0x6f)](_0x4af00e){const _0x18c518=_0x58eaa3;for(const _0x337c85 of[...this[_0x18c518(0xb1)][_0x18c518(0x80)]()])if(_0x337c85[_0x18c518(0xb8)]===_0x4af00e)this[_0x18c518(0x66)](_0x337c85[_0x18c518(0xb4)]);this[_0x18c518(0x9d)](_0x4af00e);}[_0x58eaa3(0xe6)](_0x310a9f){const _0x276181=_0x58eaa3,_0x5520d7=setTimeout(()=>this[_0x276181(0x66)](_0x310a9f),TTL_MS);return _0x5520d7[_0x276181(0xe0)](),_0x5520d7;}[_0x58eaa3(0x6e)](_0x3d677c){const _0x3dc7e9=_0x58eaa3;let _0x4002d8=0x6b3+0x26eb+-0x2d9e;for(const _0x5096bd of this[_0x3dc7e9(0xb1)][_0x3dc7e9(0x80)]())if(_0x5096bd[_0x3dc7e9(0xb8)]===_0x3d677c)_0x4002d8=Math[_0x3dc7e9(0xac)](_0x4002d8,_0x5096bd[_0x3dc7e9(0xee)]);return _0x4002d8;}[_0x58eaa3(0xbb)](_0x13729c){const _0x5272cb=_0x58eaa3,_0x16cedf=setTimeout(()=>void this[_0x5272cb(0x68)](_0x13729c),INTERVAL_MS);return _0x16cedf[_0x5272cb(0xe0)](),_0x16cedf;}}function _0x55de(_0x4d8655,_0x94af12){_0x4d8655=_0x4d8655-(0x230*0xd+0x6*0x5de+-0x3f3e);const _0x59edbb=_0x590a();let _0xc9be87=_0x59edbb[_0x4d8655];if(_0x55de['zjVeRs']===undefined){var _0x35c16c=function(_0x560263){const _0x1484cd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5312cb='',_0x331030='';for(let _0x233d64=0x1d7d+-0x1b8d+-0x1f0,_0x20a40d,_0x299b94,_0x3e3614=0x3*0x62f+0x24aa+-0xb*0x505;_0x299b94=_0x560263['charAt'](_0x3e3614++);~_0x299b94&&(_0x20a40d=_0x233d64%(-0x1*-0xdd3+-0x1*0x853+-0x34*0x1b)?_0x20a40d*(0x1*-0x5c3+0x1e5b+-0x1858*0x1)+_0x299b94:_0x299b94,_0x233d64++%(0x1d60+0x4*-0x25+-0x1cc8))?_0x5312cb+=String['fromCharCode'](-0xf78+-0x4c6+0x153d&_0x20a40d>>(-(-0x1c7d+-0x3*0x32d+0x2606)*_0x233d64&0x56d+-0x23dd*-0x1+-0x2944)):0x1845+0x6*-0x556+-0x1*-0x7bf){_0x299b94=_0x1484cd['indexOf'](_0x299b94);}for(let _0x5a94a0=-0x929+0x17*0x76+-0x7b*0x3,_0x14761c=_0x5312cb['length'];_0x5a94a0<_0x14761c;_0x5a94a0++){_0x331030+='%'+('00'+_0x5312cb['charCodeAt'](_0x5a94a0)['toString'](-0x1a34+-0x1caf*0x1+0x1b*0x209))['slice'](-(-0x1dfd*0x1+-0x6c4+0x24c3));}return decodeURIComponent(_0x331030);};_0x55de['cgIpRw']=_0x35c16c,_0x55de['ftqHJm']={},_0x55de['zjVeRs']=!![];}const _0x2fcd7b=_0x59edbb[-0x7b0*-0x1+-0x1*-0x26b3+-0x13*0x271];_0x55de['UUwOkF']!==_0x2fcd7b&&(_0x55de['ftqHJm']={},_0x55de['UUwOkF']=_0x2fcd7b);const _0x132044=_0x55de['ftqHJm'][_0x4d8655];return _0x132044===undefined?(_0xc9be87=_0x55de['cgIpRw'](_0xc9be87),_0x55de['ftqHJm'][_0x4d8655]=_0xc9be87):_0xc9be87=_0x132044,_0xc9be87;}function diagnosticErrorCode(_0x19f3ff,_0x45c047){const _0x44df04=_0x58eaa3,_0x33e4d9=safeErrorCode(_0x19f3ff,'');if(_0x33e4d9[_0x44df04(0xec)]>-0x2*-0x1109+0x70b+-0x291d)return _0x33e4d9;if(_0x19f3ff!==null&&typeof _0x19f3ff===_0x44df04(0x6c)&&_0x44df04(0xe4)in _0x19f3ff&&typeof _0x19f3ff[_0x44df04(0xe4)]===_0x44df04(0x70)&&/^[A-Z][A-Z0-9_]{0,127}$/[_0x44df04(0x93)](_0x19f3ff[_0x44df04(0xe4)]))return _0x19f3ff[_0x44df04(0xe4)];return _0x45c047;}function sessionActivity(_0xf2339b){const _0x2eb608=_0x58eaa3;if(!isPlainRecord(_0xf2339b[_0x2eb608(0xef)]))return undefined;if(_0xf2339b[_0x2eb608(0x9a)]===_0x2eb608(0x97)&&isPlainRecord(_0xf2339b[_0x2eb608(0xef)][_0x2eb608(0x97)])){const _0xceceb7=_0xf2339b[_0x2eb608(0xef)][_0x2eb608(0x97)][_0x2eb608(0xe8)];if(_0xceceb7===_0x2eb608(0xf7)||_0xceceb7===_0x2eb608(0x84)||_0xceceb7===_0x2eb608(0xf9))return _0x2eb608(0x84);return undefined;}if(_0xf2339b[_0x2eb608(0x9a)]!==_0x2eb608(0xc4))return undefined;const _0x286e46=_0xf2339b[_0x2eb608(0xef)][_0x2eb608(0xc4)];if(!isPlainRecord(_0x286e46)||typeof _0x286e46[_0x2eb608(0xf4)]!==_0x2eb608(0x70))return undefined;return _0x286e46[_0x2eb608(0xf4)]===_0x2eb608(0xd7)?_0x2eb608(0x84):_0x2eb608(0xa1);}
|
|
2
|
+
function _0x46f0(){const _0x49a1f6=['C2vZC2LVBI53yxrJAc5YDw5UAw5NlwHPC3rVCNKUzMfPBgvK','DhvYBNm','D2f0y2G','zMfPBfnLC3nPB24','C3vZCgvUzgvK','Bgf0zxn0tgvHC2vfEhbPCNK','CMvTB3zLtgvHC2u','CMvSzwfZzvnUyxbZAg90ugvUzgLUz0v2zw50CW','BNvTyMvY','AhLKCMf0zvj1BM5PBMDiAxn0B3j5','y29TCg9Zzvj1BNrPBwvqywDL','Bg9N','u0vtu0LptL9jtLzbteLe','CMvHzeHPC3rVCNLqywDL','C2vZC2LVBI53yxrJAc5YzwzYzxnOlMzHAwXLza','C25HChnOB3rtzxf1zw5Jzq','Cgf5Bg9Hza','x193B3jRC3bHy2vxyxrJAfnLC3nPB25iyxnO','CMvHzf9WywDL','DgLTzxi','u0vtu0LptL9xqvrdsf9isvnut1jzx0zbsuXfra','zxH0zxjUywXtzxnZAw9Uswq','C2LNBMf0DxjL','zxHWAxjLC0f0','CNvU','BM9KzuDLBMvYyxrPB24','tKfusvzfx1rsqu5tq1jjufrFvu5bvKfjtefcteu','B3b0Aw9UCW','zxHLy3v0zvDHDgnO','C2v0','DhjHBNnPDgLVBKDLBMvYyxrPB24','zxHLy3v0zvvUD2f0y2G','DMfSDwvZ','uLvotKLorW','DgvZDa','CMvMCMvZAefJDgL2Axr5','C2vZC2LVBKLK','C2vZC2LVBG','zw1PDe9IC2vYDMvKugfNzq','Bg9JywWTDgvZDa','zMfPBhvYzxm','vfvstG','y2XLyxi','u1rbuLrjtKC','z2v0','CMvUzxC','C2XPy2u','zw1PDfnLC3nPB24','q09ovKvsr0LorW','Aw5PDgLHBf9YzwzYzxnO','CNvUDgLTzvjLDMLZAw9U','D2f0y2Hjza','C2vXDwvUy2u','BgvHC2vZ','Aw5PDgLHBgL6zuXLyxnL','C3rYAw5N','D2f0y2GUzMfPBgvK','Aw5PDgLHBa','B3bLCMf0Aw9UCW','ywnJzxb0zwq','zgvSzxrL','C3rYAw5NAwz5','D29YA3nWywnLswq','CgvYzM9YBvjLzNjLC2G','BgvUz3rO','CNvUDgLTzvjLywq','zw1PDfnUyxbZAg90vg9mzwfZzxm','ywn0AxzPDhK','BwfUywDLzefJDgL2zq','ChvZAa','y29UDMvYz2viAxn0B3j5','Dw5PDa','C3rHDhvZ','u0vtu0LptL9ot1rFrK9vtKq','CMvMCMvZAf9Hy3rPDML0Eq','yxv0Ag9YAxr5','B3DUzxjlzxK','CNvUBMvY','zw1PDfjLywX0Aw1L','mtm1meTMsvnhzq','mtm4nJi1mJbzELb4zwm','ChjLC2vUDf9ZzxnZAw9U','ote1mZu5mener1LVDa','mLjqr0TSva','u2vZC2LVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','Bg9JywWTDgvZDc1UB2rL','y2f0zwDVCNK','zw1PDeXLyxnLrxzLBNq','u0vtu0LptL9xqvrdsf9ttKfqu0Hpvf9gquLmruq','AgfZ','Bw9Kzq','q0foq0vmteLorW','surmrq','AgLZDg9YEvjLywq','C2L6zq','zxzLBNrszxzPC2LVBG','BM93','u0vtu0LptL9xqvrdsf9sruzsrvnix0zbsuXfra','y29Kzq','ChjLC2vUDa','Dw5Yzwy','Dw5RBM93BG','C25HChnOB3rtzw50','CgvUzgLUz0v2zw50CW','ChjVAMvJDeLUAxrPywXqywDL','C291CMnL','BgvHC2vuAw1LCG','zw1PDfDHDgnOrxzLBNq','D2f0y2GUC2vZC2LVBI5LDMvUDa','tufoquDfrf9bq1rjvKu','Bwf4','u0vtu0LptL9xqvrdsf9svu5usu1fx1noqvbtse9ux0zbsuXfra','D2f0y2GUC2vZC2LVBI5ZBMfWC2HVDa','CMvHzhK','ChvIBgLZAfj1BNrPBwvtBMfWC2HVDa','C3rVCa','AxntywzLsw50zwDLCG','B2jZzxj2zwrqywDL','otm1otqZm1DUzM1Yrq','D29YA2jLBMnOq29UBMvJDgLVBKLK','BM9KzuLK','C2vZC2LVBKHHC2G','seLtve9swq','CgfNzq','ChjVAMvJDf9ZBMfWC2HVDa','zw1PDfbHz2u','CMvZB2X2zq','y29UDMvYz2vqywDL','zw50CNK','y29UDMvYz2vFCgfNzq','zMLSDgvY','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','nZi1nJu1ANL1qujo','C2vZC2LVBLnPz25HDhvYzq','D2f0y2HLCW','CNvUDgLTzvbHz2u','mtyXnNDMC1PPyW','oty5mM93AgHWrq','CMvSzwfZzvbLBMrPBMDfDMvUDhm','u0vhtuvova','mteXotqYsgXHq0zy','zw1PDf9WywDL','CMvHzfbHz2u','CMvSzwfZzvnLC3nPB25mzwfZzxm','C2vZC2LVBI53yxrJAc5YDw50Aw1LlxnUyxbZAg90lMzHAwXLza','CMvMCMvZAfrPBwvY','CMvMCMvZAa','mZe2mtLOA1DhCvG','CMvHzfj1BNrPBwvqywDL','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','B2jQzwn0','C2vZC2LVBI53yxrJAc5PBML0AwfSlMzHAwXLza','zw1PDfnUyxbZAg90','u0vtu0LptL9xt1jlu1bbq0vFtuLttufuq0G'];_0x46f0=function(){return _0x49a1f6;};return _0x46f0();}function _0x4dc8(_0x5e8ad7,_0x5edb10){_0x5e8ad7=_0x5e8ad7-(0x727*0x3+-0x1d*0xb8+-0x1*-0x32);const _0x438ac7=_0x46f0();let _0x2f6523=_0x438ac7[_0x5e8ad7];if(_0x4dc8['csfjdJ']===undefined){var _0x4518ce=function(_0x2c412a){const _0x310950='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5edf35='',_0x5b6844='';for(let _0x2f84f0=-0x221b+-0x4c0+0x26db,_0x5c8439,_0x4589fa,_0x28bb7e=-0x1448+0xe7b+0x5*0x129;_0x4589fa=_0x2c412a['charAt'](_0x28bb7e++);~_0x4589fa&&(_0x5c8439=_0x2f84f0%(0x265d+-0x503*-0x7+-0x2*0x24b7)?_0x5c8439*(0x15b*0xa+-0x573+-0x7db)+_0x4589fa:_0x4589fa,_0x2f84f0++%(-0x20f*0x7+0x1fe2+-0x6d*0x29))?_0x5edf35+=String['fromCharCode'](0xef6+0x4*0x563+0x2383*-0x1&_0x5c8439>>(-(-0x8f9*-0x3+0x395*-0x6+-0x56b*0x1)*_0x2f84f0&-0x1686+-0x2*-0x19f+0x7*0x2c2)):-0x2ec+-0x5*0x14c+0x1c*0x56){_0x4589fa=_0x310950['indexOf'](_0x4589fa);}for(let _0x3bea16=0x5c4+0x1*-0x147e+-0x82*-0x1d,_0x2c4037=_0x5edf35['length'];_0x3bea16<_0x2c4037;_0x3bea16++){_0x5b6844+='%'+('00'+_0x5edf35['charCodeAt'](_0x3bea16)['toString'](0x1*0x62c+0x181*-0xb+0xa6f))['slice'](-(0x5d*-0x11+0x6d*0x2b+0x2*-0x610));}return decodeURIComponent(_0x5b6844);};_0x4dc8['ODxklB']=_0x4518ce,_0x4dc8['EaKqTc']={},_0x4dc8['csfjdJ']=!![];}const _0x5338f5=_0x438ac7[0x1b01*0x1+-0x1f74+0x473];_0x4dc8['hZJlPP']!==_0x5338f5&&(_0x4dc8['EaKqTc']={},_0x4dc8['hZJlPP']=_0x5338f5);const _0x579bd5=_0x4dc8['EaKqTc'][_0x5e8ad7];return _0x579bd5===undefined?(_0x2f6523=_0x4dc8['ODxklB'](_0x2f6523),_0x4dc8['EaKqTc'][_0x5e8ad7]=_0x2f6523):_0x2f6523=_0x579bd5,_0x2f6523;}const _0x44c1f3=_0x4dc8;(function(_0x38e76b,_0x5d35ba){const _0x150833=_0x4dc8,_0x22c890=_0x38e76b();while(!![]){try{const _0x79ad46=parseInt(_0x150833(0x15b))/(-0x18bf+-0x49*-0x9+0x162f)*(parseInt(_0x150833(0x12a))/(0x1*-0x26fd+0x1288+-0xd*-0x193))+parseInt(_0x150833(0x126))/(0x4fc+0x7e3+0x66e*-0x2)*(-parseInt(_0x150833(0x160))/(-0x3*0x928+-0x26aa+0x2113*0x2))+parseInt(_0x150833(0x129))/(-0x1*-0x23ed+0x454+-0x32*0xce)+parseInt(_0x150833(0x163))/(0x92b+-0x1*-0x2345+-0x2c6a)+-parseInt(_0x150833(0xd0))/(0x712+-0x46*0x59+0x114b*0x1)*(parseInt(_0x150833(0x15f))/(-0xffb+0x1*-0x228d+-0x8*-0x652))+-parseInt(_0x150833(0x14d))/(-0x1c26+0x12a*0x18+0x3f)+parseInt(_0x150833(0x127))/(0x24fc+-0x146*-0x1+0x8*-0x4c7);if(_0x79ad46===_0x5d35ba)break;else _0x22c890['push'](_0x22c890['shift']());}catch(_0x1b5839){_0x22c890['push'](_0x22c890['shift']());}}}(_0x46f0,-0xfe3d6+-0x25db*-0x13+0x1b18b6));import{isPlainRecord}from'../runner/codex/conversation-parser.js';import{safeErrorCode}from'../util/safe-error.js';const INTERVAL_MS=-0x238e+-0x100f+-0x1*-0x3b6d,TTL_MS=0x1380a*-0x1+-0x89*-0x42+-0x280*-0xb5,MAX_FAILURES=-0x7*-0x545+0x373*-0x1+-0x216d,INITIAL_TURN_LIMIT=0x2b5*-0xe+-0xe69+0x346d,EMITTED_TURN_LIMIT=0x2f*0xa+-0x1913+0x1*0x1747;export class NativeSessionWatchService{[_0x44c1f3(0xf2)];[_0x44c1f3(0x15d)]=new Map();[_0x44c1f3(0x10c)]=new Map();[_0x44c1f3(0xe6)]=-0x397*-0x1+-0x2d4*-0x8+0x1a37*-0x1;constructor(_0x772dbf){const _0x3bee1d=_0x44c1f3;this[_0x3bee1d(0xf2)]=_0x772dbf;}[_0x44c1f3(0x111)](){const _0xad91a7=_0x44c1f3;return{'session.watch':_0x4aba54=>this[_0xad91a7(0xf3)](isPlainRecord(_0x4aba54)?_0x4aba54:{}),'session.unwatch':_0x256b29=>this[_0xad91a7(0xf6)](isPlainRecord(_0x256b29)?_0x256b29:{})};}async[_0x44c1f3(0xf3)](_0xa5fe52){const _0x39abcd=_0x44c1f3,_0x12db8e=this[_0x39abcd(0xf2)][_0x39abcd(0x13f)];if(_0xa5fe52[_0x39abcd(0x11e)]===_0x39abcd(0x162)&&_0x12db8e===undefined)throw new Error(_0x39abcd(0xe3));if(typeof _0xa5fe52[_0x39abcd(0xfb)]!==_0x39abcd(0x10e)||_0xa5fe52[_0x39abcd(0x115)]!==undefined&&typeof _0xa5fe52[_0x39abcd(0x115)]!==_0x39abcd(0x10e)||typeof _0xa5fe52[_0x39abcd(0x10a)]!==_0x39abcd(0x10e)||typeof _0xa5fe52[_0x39abcd(0x14e)]!==_0x39abcd(0x10e)||_0xa5fe52[_0x39abcd(0x131)]!==_0x39abcd(0x110)&&_0xa5fe52[_0x39abcd(0x131)]!==_0x39abcd(0x104)||_0xa5fe52[_0x39abcd(0x11e)]!==undefined&&_0xa5fe52[_0x39abcd(0x11e)]!==_0x39abcd(0x162))throw new Error(_0x39abcd(0xe3));const _0x2b92fa=this[_0x39abcd(0x123)](_0xa5fe52);if(_0xa5fe52[_0x39abcd(0x131)]===_0x39abcd(0x104)){const _0x681385=this[_0x39abcd(0x10c)][_0x39abcd(0x103)](_0x2b92fa);if(_0x681385===undefined||_0x681385[_0x39abcd(0x10a)]!==_0xa5fe52[_0x39abcd(0x10a)]||_0x681385[_0x39abcd(0xfb)]!==_0xa5fe52[_0x39abcd(0xfb)]||_0xa5fe52[_0x39abcd(0x115)]!==undefined&&_0x681385[_0x39abcd(0x115)]!==_0xa5fe52[_0x39abcd(0x115)])throw new Error(_0x39abcd(0x15a));if(_0x681385[_0x39abcd(0xee)]<=Date[_0x39abcd(0x137)]()){this[_0x39abcd(0xdd)](_0x2b92fa);throw new Error(_0x39abcd(0x15a));}_0x681385[_0x39abcd(0xee)]=Date[_0x39abcd(0x137)]()+TTL_MS;const _0x52f472=this[_0x39abcd(0x15d)][_0x39abcd(0x103)](_0x681385[_0x39abcd(0xfb)]);if(_0x52f472!==undefined)_0x52f472[_0x39abcd(0xee)]=this[_0x39abcd(0xdc)](_0x681385[_0x39abcd(0xfb)]);return clearTimeout(_0x681385[_0x39abcd(0xea)]),_0x681385[_0x39abcd(0xea)]=this[_0x39abcd(0x141)](_0x2b92fa),this[_0x39abcd(0x112)](_0x681385);}const _0x58ad4e=this[_0x39abcd(0x10c)][_0x39abcd(0x103)](_0x2b92fa),_0x3c893d=_0xa5fe52[_0x39abcd(0x11e)]===_0x39abcd(0x162)?_0x39abcd(0x162):_0x39abcd(0x100);if(_0x58ad4e?.[_0x39abcd(0x10a)]===_0xa5fe52[_0x39abcd(0x10a)]&&_0x58ad4e[_0x39abcd(0xfb)]===_0xa5fe52[_0x39abcd(0xfb)]&&(_0xa5fe52[_0x39abcd(0x115)]===undefined||_0x58ad4e[_0x39abcd(0x115)]===_0xa5fe52[_0x39abcd(0x115)])&&_0x58ad4e[_0x39abcd(0x11e)]===_0x3c893d&&_0x58ad4e[_0x39abcd(0xee)]>Date[_0x39abcd(0x137)]())return _0x58ad4e[_0x39abcd(0xee)]=Date[_0x39abcd(0x137)]()+TTL_MS,clearTimeout(_0x58ad4e[_0x39abcd(0xea)]),_0x58ad4e[_0x39abcd(0xea)]=this[_0x39abcd(0x141)](_0x2b92fa),this[_0x39abcd(0x112)](_0x58ad4e);this[_0x39abcd(0xdd)](_0x2b92fa);const _0x5a0e80={'ownerKey':_0x2b92fa,'sessionHash':this[_0x39abcd(0x150)](_0xa5fe52),'workbenchConnectionId':_0xa5fe52[_0x39abcd(0x14e)],'watchId':_0xa5fe52[_0x39abcd(0x10a)],'sessionId':_0xa5fe52[_0x39abcd(0xfb)],'unit':_0x3c893d,'nodeGeneration':this[_0x39abcd(0xf2)][_0x39abcd(0xf0)]?.()??_0x39abcd(0xd2),...typeof _0xa5fe52[_0x39abcd(0x115)]===_0x39abcd(0x10e)?{'workspaceId':_0xa5fe52[_0x39abcd(0x115)]}:{},'expiresAt':Date[_0x39abcd(0x137)]()+TTL_MS,'ready':![],'snapshotSent':![],'pendingEvents':[],'timer':undefined};_0x5a0e80[_0x39abcd(0xea)]=this[_0x39abcd(0x141)](_0x2b92fa),this[_0x39abcd(0x10c)][_0x39abcd(0xf4)](_0x2b92fa,_0x5a0e80);const _0xcb232=this[_0x39abcd(0x15d)][_0x39abcd(0x103)](_0x5a0e80[_0x39abcd(0xfb)]);if(_0xcb232!==undefined)_0xcb232[_0x39abcd(0xee)]=this[_0x39abcd(0xdc)](_0x5a0e80[_0x39abcd(0xfb)]);return void this[_0x39abcd(0x10d)](_0x5a0e80,_0x12db8e),this[_0x39abcd(0x112)](_0x5a0e80);}[_0x44c1f3(0xf6)](_0x1b29f9){const _0x1fef2b=_0x44c1f3;if(typeof _0x1b29f9[_0x1fef2b(0xfb)]!==_0x1fef2b(0x10e)||typeof _0x1b29f9[_0x1fef2b(0x10a)]!==_0x1fef2b(0x10e)||typeof _0x1b29f9[_0x1fef2b(0x14e)]!==_0x1fef2b(0x10e))throw new Error(_0x1fef2b(0xe3));const _0x3bf77a=this[_0x1fef2b(0x123)](_0x1b29f9),_0x4a2932=this[_0x1fef2b(0x10c)][_0x1fef2b(0x103)](_0x3bf77a);if(_0x4a2932?.[_0x1fef2b(0x10a)]===_0x1b29f9[_0x1fef2b(0x10a)]&&_0x4a2932[_0x1fef2b(0xfb)]===_0x1b29f9[_0x1fef2b(0xfb)])this[_0x1fef2b(0xdd)](_0x3bf77a);return{'stopped':!![]};}[_0x44c1f3(0xd9)](_0x3d6222){const _0x3e1c82=_0x44c1f3,_0x4489bb=this[_0x3e1c82(0x15d)][_0x3e1c82(0x103)](_0x3d6222['id']);if(_0x4489bb!==undefined)return _0x4489bb[_0x3e1c82(0xee)]=Date[_0x3e1c82(0x137)]()+TTL_MS,{'expiresAt':_0x4489bb[_0x3e1c82(0xee)]};const _0x38ef30={'session':_0x3d6222,'mode':this[_0x3e1c82(0xf2)][_0x3e1c82(0x11b)](_0x3d6222)?_0x3e1c82(0xf8):_0x3e1c82(0x151),'expiresAt':Date[_0x3e1c82(0x137)]()+TTL_MS,'refresh':undefined,'sessionSignature':undefined,'signature':undefined,'page':undefined,'runtimePage':undefined,'runtimeRevision':undefined,'runtimeRead':undefined,'historyRead':undefined,'observedPage':undefined,'authority':undefined,'eventRevision':0x0,'failures':0x0,'transitionGeneration':0x0,'timer':undefined};return _0x38ef30[_0x3e1c82(0xea)]=this[_0x3e1c82(0x168)](_0x3d6222['id']),this[_0x3e1c82(0x15d)][_0x3e1c82(0xf4)](_0x3d6222['id'],_0x38ef30),{'expiresAt':_0x38ef30[_0x3e1c82(0xee)]};}[_0x44c1f3(0x125)](_0x7d9a20,_0x454571){const _0x15a4d5=_0x44c1f3,_0x36bc2a=this[_0x15a4d5(0x15d)][_0x15a4d5(0x103)](_0x7d9a20);if(_0x36bc2a!==undefined)_0x36bc2a[_0x15a4d5(0x136)]=_0x454571[_0x15a4d5(0x10b)];const _0x200981=[...this[_0x15a4d5(0x10c)][_0x15a4d5(0xf7)]()][_0x15a4d5(0x159)](_0x128f69=>_0x128f69[_0x15a4d5(0xfb)]===_0x7d9a20),_0x1c9072=sessionActivity(_0x454571);if(_0x36bc2a!==undefined&&_0x1c9072===_0x15a4d5(0xf8)&&_0x36bc2a[_0x15a4d5(0x131)]!==_0x15a4d5(0xf8)){_0x36bc2a[_0x15a4d5(0x131)]=_0x15a4d5(0xf8),_0x36bc2a[_0x15a4d5(0xf5)]+=0x1246+-0x35*0xac+-0x1*-0x1157;for(const _0x25b1c9 of _0x200981)_0x25b1c9[_0x15a4d5(0x148)]=![];void this[_0x15a4d5(0x149)](_0x36bc2a,_0x36bc2a[_0x15a4d5(0xf5)]);}else{if(_0x36bc2a!==undefined&&_0x1c9072===_0x15a4d5(0x133)&&_0x36bc2a[_0x15a4d5(0x131)]===_0x15a4d5(0xf8)){_0x36bc2a[_0x15a4d5(0x131)]=_0x15a4d5(0x107);const _0x59a9e4=++_0x36bc2a[_0x15a4d5(0xf5)];for(const _0x51792a of _0x200981)_0x51792a[_0x15a4d5(0x148)]=![];setTimeout(()=>void this[_0x15a4d5(0x11d)](_0x36bc2a,_0x59a9e4),0x3c+0xc32+-0xc6e);}}for(const _0x20d143 of _0x200981){if(!_0x20d143[_0x15a4d5(0x148)])_0x20d143[_0x15a4d5(0x13e)][_0x15a4d5(0x11c)](_0x454571);else this[_0x15a4d5(0x12e)](_0x20d143,_0x454571);}return _0x200981[_0x15a4d5(0x117)]>0x3*0xabd+-0x50*0x29+-0x1367;}[_0x44c1f3(0x104)](_0x282901){const _0x16f092=_0x44c1f3,_0x553534=this[_0x16f092(0x15d)][_0x16f092(0x103)](_0x282901['id']);if(_0x553534===undefined||_0x553534[_0x16f092(0xee)]<=Date[_0x16f092(0x137)]())return this[_0x16f092(0x14a)](_0x282901['id']),undefined;return _0x553534[_0x16f092(0xee)]=Date[_0x16f092(0x137)]()+TTL_MS,{'expiresAt':_0x553534[_0x16f092(0xee)]};}[_0x44c1f3(0x14a)](_0x229932){const _0x24f174=_0x44c1f3,_0x2d3d38=this[_0x24f174(0x15d)][_0x24f174(0x103)](_0x229932);if(_0x2d3d38===undefined)return;clearTimeout(_0x2d3d38[_0x24f174(0xea)]),this[_0x24f174(0x15d)][_0x24f174(0x113)](_0x229932);}[_0x44c1f3(0x101)](){const _0x147f96=_0x44c1f3;for(const _0x533014 of this[_0x147f96(0x15d)][_0x147f96(0xf7)]())clearTimeout(_0x533014[_0x147f96(0xea)]);this[_0x147f96(0x15d)][_0x147f96(0x101)]();for(const _0x32d5c2 of this[_0x147f96(0x10c)][_0x147f96(0xf7)]())clearTimeout(_0x32d5c2[_0x147f96(0xea)]);this[_0x147f96(0x10c)][_0x147f96(0x101)]();}[_0x44c1f3(0x130)](_0x26a52e){const _0x4db9b3=_0x44c1f3;return this[_0x4db9b3(0x15d)][_0x4db9b3(0x130)](_0x26a52e);}[_0x44c1f3(0x157)](_0x498db8){const _0x1c71fc=_0x44c1f3;return this[_0x1c71fc(0x15d)][_0x1c71fc(0x103)](_0x498db8);}get[_0x44c1f3(0x135)](){const _0x5f40b4=_0x44c1f3;return this[_0x5f40b4(0x15d)][_0x5f40b4(0x135)];}async[_0x44c1f3(0xcf)](_0x2ecac0,_0x352a97=-0x49*-0x41+-0x1*-0x13+0x1*-0x1292,_0x55db89=!![]){const _0x171d2d=_0x44c1f3,_0x1b3391=this[_0x171d2d(0x15d)][_0x171d2d(0x103)](_0x2ecac0);if(_0x1b3391===undefined)return undefined;if(_0x1b3391[_0x171d2d(0xcf)]!==undefined)return _0x1b3391[_0x171d2d(0xcf)];if(_0x1b3391[_0x171d2d(0xee)]<=Date[_0x171d2d(0x137)]())return this[_0x171d2d(0x14a)](_0x2ecac0),undefined;const _0x576a8e=this[_0x171d2d(0x116)](_0x2ecac0,_0x1b3391,_0x352a97,_0x55db89);_0x1b3391[_0x171d2d(0xcf)]=_0x576a8e;try{return await _0x576a8e;}finally{this[_0x171d2d(0x15d)][_0x171d2d(0x103)](_0x2ecac0)===_0x1b3391&&(_0x1b3391[_0x171d2d(0xcf)]=undefined,clearTimeout(_0x1b3391[_0x171d2d(0xea)]),_0x1b3391[_0x171d2d(0xea)]=this[_0x171d2d(0x168)](_0x2ecac0));}}async[_0x44c1f3(0x116)](_0x129031,_0xd67a69,_0x44817d,_0x173aff){const _0x14c7c5=_0x44c1f3;let _0x59f63b=_0x14c7c5(0x155),_0x4d7223;const _0x59946b=_0xd67a69[_0x14c7c5(0x131)]===_0x14c7c5(0x151)&&this[_0x14c7c5(0xf2)][_0x14c7c5(0xe4)]!==undefined;try{if(this[_0x14c7c5(0xf2)][_0x14c7c5(0xdb)]?.(_0x129031)===!![])return _0xd67a69[_0x14c7c5(0x152)];_0x4d7223=await this[_0x14c7c5(0xf2)][_0x14c7c5(0x155)](_0x129031);if(_0x4d7223===undefined||_0x4d7223[_0x14c7c5(0xec)]===null)return this[_0x14c7c5(0x166)](_0x129031),undefined;_0xd67a69[_0x14c7c5(0xfc)]=_0x4d7223;if(_0x173aff&&this[_0x14c7c5(0xf2)][_0x14c7c5(0x11b)](_0x4d7223))return _0xd67a69[_0x14c7c5(0x152)];_0x59f63b=_0x14c7c5(0x121),await this[_0x14c7c5(0xf2)][_0x14c7c5(0xfa)](_0x4d7223);if(this[_0x14c7c5(0xf2)][_0x14c7c5(0xdb)]?.(_0x129031)===!![])return _0xd67a69[_0x14c7c5(0x152)];_0x59f63b=_0x14c7c5(0xe9);const _0x552f08=_0xd67a69[_0x14c7c5(0x136)],_0x55098e=await(_0x59946b?this[_0x14c7c5(0xf2)][_0x14c7c5(0xe4)](_0x4d7223,_0x44817d):this[_0x14c7c5(0xf2)][_0x14c7c5(0x165)](_0x4d7223,_0x44817d));if(_0x173aff&&_0x552f08!==_0xd67a69[_0x14c7c5(0x136)])return _0xd67a69[_0x14c7c5(0x152)];_0x59f63b=_0x14c7c5(0x128);const _0x3c6225=this[_0x14c7c5(0xf2)][_0x14c7c5(0x13a)](_0x4d7223),_0x5457b7=JSON[_0x14c7c5(0x114)](_0x3c6225);if(_0x5457b7!==_0xd67a69[_0x14c7c5(0x15c)]){_0xd67a69[_0x14c7c5(0x15c)]=_0x5457b7;if(_0x173aff)this[_0x14c7c5(0xf2)][_0x14c7c5(0x106)](_0x3c6225);}_0xd67a69[_0x14c7c5(0xff)]=0xa6e+0x1a93+0x2501*-0x1;const _0x29c7c8=_0x55098e[_0x14c7c5(0xd8)][_0x14c7c5(0x117)]<=EMITTED_TURN_LIMIT?_0x55098e[_0x14c7c5(0xd8)]:_0x55098e[_0x14c7c5(0xd8)][_0x14c7c5(0x105)](-EMITTED_TURN_LIMIT),_0x1e1c5b={..._0x55098e,'turns':_0x29c7c8};_0x59f63b=_0x14c7c5(0x158);const _0x31c056=this[_0x14c7c5(0xf2)][_0x14c7c5(0x156)](_0xd67a69[_0x14c7c5(0x152)],_0xd67a69[_0x14c7c5(0x14c)],_0x1e1c5b,_0xd67a69[_0x14c7c5(0x122)]),_0x4ccf0e=_0x31c056[_0x14c7c5(0x152)],_0x47354e=_0x4ccf0e[_0x14c7c5(0xd8)][_0x14c7c5(0x117)]<=EMITTED_TURN_LIMIT+(0x29a*0xb+0x72*0x12+-0x24a1)?_0x4ccf0e:{..._0x4ccf0e,'turns':_0x4ccf0e[_0x14c7c5(0xd8)][_0x14c7c5(0x105)](-(EMITTED_TURN_LIMIT+(0x19aa+0x2066+0x3a0f*-0x1)))};_0xd67a69[_0x14c7c5(0x14c)]=_0x1e1c5b,_0xd67a69[_0x14c7c5(0x122)]=_0x31c056[_0x14c7c5(0x122)];const _0x5508be=_0xd67a69[_0x14c7c5(0x131)]===_0x14c7c5(0x107)&&!this[_0x14c7c5(0xf2)][_0x14c7c5(0x11b)](_0x4d7223);_0x5508be&&(_0xd67a69[_0x14c7c5(0x131)]=_0x14c7c5(0x151),_0xd67a69[_0x14c7c5(0x15e)]=undefined,_0xd67a69[_0x14c7c5(0x109)]=undefined);const _0xe01419=JSON[_0x14c7c5(0x114)]({'source':_0x47354e[_0x14c7c5(0x140)],'turns':_0x47354e[_0x14c7c5(0xd8)]}),_0x10d091=_0xe01419!==_0xd67a69[_0x14c7c5(0xed)];_0x10d091&&(_0xd67a69[_0x14c7c5(0xed)]=_0xe01419,_0xd67a69[_0x14c7c5(0x152)]=_0x47354e);_0x59f63b=_0x14c7c5(0x164);if(_0x173aff&&_0x5508be)this[_0x14c7c5(0x119)](_0x4d7223,_0x47354e,!![]);else{if(_0x173aff&&_0x10d091)this[_0x14c7c5(0xfd)](_0x4d7223,_0x47354e);}return _0x173aff?_0x47354e:_0x55098e;}catch(_0x49122c){_0xd67a69[_0x14c7c5(0xff)]+=0x411*0x4+-0x1*0x3e+0x1005*-0x1,this[_0x14c7c5(0xf2)][_0x14c7c5(0xe2)]?.(_0x14c7c5(0xe5),{'nodeId':this[_0x14c7c5(0xf2)][_0x14c7c5(0x14f)]?.()??_0x14c7c5(0x12c),'sessionId':_0x129031,..._0x4d7223===undefined?{}:{'runner':_0x4d7223[_0x14c7c5(0x124)]},'stage':_0x59f63b,'errorCode':diagnosticErrorCode(_0x49122c,_0x14c7c5(0x138)),'failureCount':_0xd67a69[_0x14c7c5(0xff)],'terminal':_0xd67a69[_0x14c7c5(0xff)]>=MAX_FAILURES});if(_0xd67a69[_0x14c7c5(0xff)]>=MAX_FAILURES)this[_0x14c7c5(0xda)](_0x129031);return undefined;}}[_0x44c1f3(0x150)](_0x381892){const _0x2bc23d=_0x44c1f3;return typeof _0x381892[_0x2bc23d(0xe8)]===_0x2bc23d(0x10e)?_0x381892[_0x2bc23d(0xe8)]:_0x2bc23d(0xfe);}[_0x44c1f3(0x123)](_0x24eaa0){const _0x5d40f9=_0x44c1f3;return this[_0x5d40f9(0x150)](_0x24eaa0)+':'+_0x24eaa0[_0x5d40f9(0x14e)];}[_0x44c1f3(0x112)](_0x268b3e){const _0x47c353=_0x44c1f3;return{'accepted':!![],'watchId':_0x268b3e[_0x47c353(0x10a)],'nodeGeneration':_0x268b3e[_0x47c353(0xf0)],'expiresAt':_0x268b3e[_0x47c353(0xee)]};}async[_0x44c1f3(0x10d)](_0x1a1720,_0x2f1547){const _0x343aa4=_0x44c1f3;let _0x50b241=_0x343aa4(0x155);try{const _0xd07973=await this[_0x343aa4(0xf2)][_0x343aa4(0x155)](_0x1a1720[_0x343aa4(0xfb)]);if(_0xd07973===undefined||_0xd07973[_0x343aa4(0xec)]===null)throw new Error(_0x343aa4(0x120));if(_0x1a1720[_0x343aa4(0x115)]!==undefined&&_0xd07973[_0x343aa4(0x115)]!==_0x1a1720[_0x343aa4(0x115)])throw new Error(_0x343aa4(0xd6));if(this[_0x343aa4(0x10c)][_0x343aa4(0x103)](_0x1a1720[_0x343aa4(0x123)])!==_0x1a1720)return;_0x1a1720[_0x343aa4(0x115)]=_0xd07973[_0x343aa4(0x115)],_0x50b241=_0x343aa4(0x108),this[_0x343aa4(0xd9)](_0xd07973);const _0x2c42d8=this[_0x343aa4(0x15d)][_0x343aa4(0x103)](_0xd07973['id']);if(_0x2c42d8!==undefined)_0x2c42d8[_0x343aa4(0xfc)]=_0xd07973;const _0xe03fc0=this[_0x343aa4(0xf2)][_0x343aa4(0x11b)](_0xd07973);if(_0x2c42d8!==undefined)_0x2c42d8[_0x343aa4(0x131)]=_0xe03fc0?_0x343aa4(0xf8):_0x2c42d8[_0x343aa4(0x131)];const _0xdf6bea=!_0xe03fc0&&_0x2c42d8?.[_0x343aa4(0x152)]!==undefined?_0x2c42d8[_0x343aa4(0x152)]:undefined;let _0x2b2803=_0xe03fc0?_0x2c42d8===undefined?undefined:this[_0x343aa4(0xe1)](_0x2c42d8[_0x343aa4(0x152)],await this[_0x343aa4(0xd1)](_0x2c42d8,_0xd07973)):_0xdf6bea??(_0x2c42d8===undefined?undefined:await this[_0x343aa4(0xcf)](_0xd07973['id'],INITIAL_TURN_LIMIT,![]));if(_0x2b2803===undefined)throw new Error(_0x343aa4(0xf1));if(_0x1a1720[_0x343aa4(0x13d)])return;const _0x13c118=this[_0x343aa4(0xf2)][_0x343aa4(0x11b)](_0xd07973);_0x13c118&&!_0xe03fc0&&_0x2c42d8!==undefined&&(_0x2c42d8[_0x343aa4(0x131)]=_0x343aa4(0xf8),_0x2b2803=this[_0x343aa4(0xe1)](_0x2b2803,await this[_0x343aa4(0xd1)](_0x2c42d8,_0xd07973)));_0x50b241=_0x343aa4(0x153);const _0xaea428=_0x1a1720[_0x343aa4(0x11e)]===_0x343aa4(0x162)?_0x2f1547(_0xd07973,_0x2b2803,_0x343aa4(0x162),0x46*0x83+-0x23+-0x1*0x23a5):_0x2b2803;if(this[_0x343aa4(0x10c)][_0x343aa4(0x103)](_0x1a1720[_0x343aa4(0x123)])!==_0x1a1720)return;this[_0x343aa4(0xd5)](_0x1a1720,_0xd07973,_0xaea428),this[_0x343aa4(0xde)](_0x1a1720,_0x2b2803);if(_0x13c118&&_0x2c42d8!==undefined&&_0x2c42d8[_0x343aa4(0x152)]===undefined)void this[_0x343aa4(0xe0)](_0x2c42d8,_0xd07973);}catch(_0x134ec9){if(this[_0x343aa4(0x10c)][_0x343aa4(0x103)](_0x1a1720[_0x343aa4(0x123)])!==_0x1a1720)return;const _0x59062b=diagnosticErrorCode(_0x134ec9,_0x343aa4(0x12f));this[_0x343aa4(0xf2)][_0x343aa4(0xe2)]?.(_0x343aa4(0xd4),{'nodeId':this[_0x343aa4(0xf2)][_0x343aa4(0x14f)]?.()??_0x343aa4(0x12c),'sessionId':_0x1a1720[_0x343aa4(0xfb)],'workspaceId':_0x1a1720[_0x343aa4(0x115)]??_0x343aa4(0x13c),'workbenchConnectionId':_0x1a1720[_0x343aa4(0x14e)],'watchId':_0x1a1720[_0x343aa4(0x10a)],'stage':_0x50b241,'errorCode':_0x59062b}),this[_0x343aa4(0xf2)][_0x343aa4(0x142)]?.({'type':_0x343aa4(0x10f),'workbenchConnectionId':_0x1a1720[_0x343aa4(0x14e)],'watchType':_0x343aa4(0xfc),'watchId':_0x1a1720[_0x343aa4(0x10a)],'nodeGeneration':_0x1a1720[_0x343aa4(0xf0)],'nodeId':this[_0x343aa4(0xf2)][_0x343aa4(0x14f)]?.()??_0x343aa4(0x12c),'workspaceId':_0x1a1720[_0x343aa4(0x115)]??_0x343aa4(0x13c),'sessionId':_0x1a1720[_0x343aa4(0xfb)],'code':_0x59062b,'message':_0x343aa4(0x12b)}),this[_0x343aa4(0xdd)](_0x1a1720[_0x343aa4(0x123)]);}}[_0x44c1f3(0xdd)](_0x4f95c6){const _0xc25a0a=_0x44c1f3,_0x11176c=this[_0xc25a0a(0x10c)][_0xc25a0a(0x103)](_0x4f95c6);if(_0x11176c===undefined)return;clearTimeout(_0x11176c[_0xc25a0a(0xea)]),this[_0xc25a0a(0x10c)][_0xc25a0a(0x113)](_0x4f95c6);const _0xe5de1f=this[_0xc25a0a(0x15d)][_0xc25a0a(0x103)](_0x11176c[_0xc25a0a(0xfb)]),_0x5df93d=this[_0xc25a0a(0xdc)](_0x11176c[_0xc25a0a(0xfb)]);if(_0x5df93d===-0x1b1a+0x66*-0xf+0x3a*0x92)this[_0xc25a0a(0x14a)](_0x11176c[_0xc25a0a(0xfb)]);else{if(_0xe5de1f!==undefined)_0xe5de1f[_0xc25a0a(0xee)]=_0x5df93d;}}[_0x44c1f3(0xe1)](_0x1b4e19,_0xbb6a75){const _0x26d45a=_0x44c1f3;return this[_0x26d45a(0xf2)][_0x26d45a(0xe1)]?.(_0x1b4e19,_0xbb6a75)??_0xbb6a75;}async[_0x44c1f3(0xd1)](_0x3240af,_0x3e123c){const _0x9e5aec=_0x44c1f3;if(_0x3240af[_0x9e5aec(0x15e)]!==undefined&&_0x3240af[_0x9e5aec(0x109)]===_0x3240af[_0x9e5aec(0x136)])return _0x3240af[_0x9e5aec(0x15e)];if(_0x3240af[_0x9e5aec(0x118)]!==undefined)return _0x3240af[_0x9e5aec(0x118)];const _0x534ebc=_0x3240af[_0x9e5aec(0x136)],_0x4c5a97=this[_0x9e5aec(0xf2)][_0x9e5aec(0x165)](_0x3e123c,INITIAL_TURN_LIMIT);_0x3240af[_0x9e5aec(0x118)]=_0x4c5a97;try{const _0x5d0421=await _0x4c5a97;return this[_0x9e5aec(0x15d)][_0x9e5aec(0x103)](_0x3e123c['id'])===_0x3240af&&(_0x3240af[_0x9e5aec(0x15e)]=_0x5d0421,_0x3240af[_0x9e5aec(0x109)]=_0x534ebc),_0x5d0421;}finally{if(this[_0x9e5aec(0x15d)][_0x9e5aec(0x103)](_0x3e123c['id'])===_0x3240af&&_0x3240af[_0x9e5aec(0x118)]===_0x4c5a97)_0x3240af[_0x9e5aec(0x118)]=undefined;}}async[_0x44c1f3(0x149)](_0xf525df,_0x52ce05){const _0x581b5b=_0x44c1f3,_0x1b9e80=_0xf525df[_0x581b5b(0xfc)];if(_0x1b9e80===undefined)return;try{const _0x36d8d9=await this[_0x581b5b(0xd1)](_0xf525df,_0x1b9e80);if(this[_0x581b5b(0x15d)][_0x581b5b(0x103)](_0x1b9e80['id'])!==_0xf525df||_0xf525df[_0x581b5b(0x131)]!==_0x581b5b(0xf8)||_0xf525df[_0x581b5b(0xf5)]!==_0x52ce05)return;_0xf525df[_0x581b5b(0x15e)]=_0x36d8d9,this[_0x581b5b(0x119)](_0x1b9e80,this[_0x581b5b(0xe1)](_0xf525df[_0x581b5b(0x152)],_0x36d8d9),!![]);}catch(_0x1b93cb){this[_0x581b5b(0xf2)][_0x581b5b(0xe2)]?.(_0x581b5b(0x167),{'nodeId':this[_0x581b5b(0xf2)][_0x581b5b(0x14f)]?.()??_0x581b5b(0x12c),'sessionId':_0x1b9e80['id'],'runner':_0x1b9e80[_0x581b5b(0x124)],'errorCode':diagnosticErrorCode(_0x1b93cb,_0x581b5b(0x146))}),this[_0x581b5b(0x161)](_0x1b9e80['id']);}}async[_0x44c1f3(0xe0)](_0x537494,_0x2911e1){const _0x50e3de=_0x44c1f3;if(this[_0x50e3de(0xf2)][_0x50e3de(0xe4)]===undefined||_0x537494[_0x50e3de(0x134)]!==undefined)return;const _0x3cb000=this[_0x50e3de(0xf2)][_0x50e3de(0xe4)](_0x2911e1,INITIAL_TURN_LIMIT);_0x537494[_0x50e3de(0x134)]=_0x3cb000;try{const _0x31a255=await _0x3cb000;if(this[_0x50e3de(0x15d)][_0x50e3de(0x103)](_0x2911e1['id'])!==_0x537494||_0x537494[_0x50e3de(0x131)]!==_0x50e3de(0xf8))return;_0x537494[_0x50e3de(0x152)]=_0x31a255,_0x537494[_0x50e3de(0x122)]=_0x31a255[_0x50e3de(0x140)];const _0x96b1e=_0x537494[_0x50e3de(0xf5)];for(const _0x5331f3 of this[_0x50e3de(0x10c)][_0x50e3de(0xf7)]())if(_0x5331f3[_0x50e3de(0xfb)]===_0x2911e1['id'])_0x5331f3[_0x50e3de(0x148)]=![];await this[_0x50e3de(0x149)](_0x537494,_0x96b1e);}catch(_0x2b4ac5){this[_0x50e3de(0xf2)][_0x50e3de(0xe2)]?.(_0x50e3de(0xd7),{'nodeId':this[_0x50e3de(0xf2)][_0x50e3de(0x14f)]?.()??_0x50e3de(0x12c),'sessionId':_0x2911e1['id'],'runner':_0x2911e1[_0x50e3de(0x124)],'errorCode':diagnosticErrorCode(_0x2b4ac5,_0x50e3de(0xeb))});}finally{if(this[_0x50e3de(0x15d)][_0x50e3de(0x103)](_0x2911e1['id'])===_0x537494&&_0x537494[_0x50e3de(0x134)]===_0x3cb000)_0x537494[_0x50e3de(0x134)]=undefined;}}async[_0x44c1f3(0x11d)](_0x34e7df,_0x2c0982){const _0x32b242=_0x44c1f3;if(_0x34e7df[_0x32b242(0x134)]!==undefined)try{await _0x34e7df[_0x32b242(0x134)];}catch{}const _0x40c3d9=_0x34e7df[_0x32b242(0xfc)];if(_0x40c3d9===undefined||this[_0x32b242(0x15d)][_0x32b242(0x103)](_0x40c3d9['id'])!==_0x34e7df||_0x34e7df[_0x32b242(0x131)]!==_0x32b242(0x107)||_0x34e7df[_0x32b242(0xf5)]!==_0x2c0982)return;await this[_0x32b242(0xcf)](_0x40c3d9['id'],INITIAL_TURN_LIMIT,!![]);}[_0x44c1f3(0x12e)](_0xe96d37,_0x10c643){const _0x370525=_0x44c1f3;this[_0x370525(0xf2)][_0x370525(0x142)]?.({'type':_0x370525(0x143),'workbenchConnectionId':_0xe96d37[_0x370525(0x14e)],'watchId':_0xe96d37[_0x370525(0x10a)],'nodeGeneration':_0xe96d37[_0x370525(0xf0)],'nodeId':this[_0x370525(0xf2)][_0x370525(0x14f)]?.()??_0x370525(0x12c),'workspaceId':_0xe96d37[_0x370525(0x115)]??_0x370525(0x13c),'sessionId':_0xe96d37[_0x370525(0xfb)],'expiresAt':_0xe96d37[_0x370525(0xee)],'event':_0x10c643});}[_0x44c1f3(0xfd)](_0x4589cd,_0x1af811){const _0x3a5076=_0x44c1f3,_0x3fa9c8=[...this[_0x3a5076(0x10c)][_0x3a5076(0xf7)]()][_0x3a5076(0x159)](_0x56afeb=>_0x56afeb[_0x3a5076(0xfb)]===_0x4589cd['id']);if(_0x3fa9c8[_0x3a5076(0x117)]===-0x8*0x1ac+0x12b9+-0x559*0x1){this[_0x3a5076(0xf2)][_0x3a5076(0x154)](_0x4589cd,_0x1af811);return;}for(const _0x5e98d0 of _0x3fa9c8){if(!_0x5e98d0[_0x3a5076(0x148)])continue;const _0x1b5c4a=_0x5e98d0[_0x3a5076(0x11e)]===_0x3a5076(0x162)?this[_0x3a5076(0xf2)][_0x3a5076(0x13f)]?.(_0x4589cd,_0x1af811,_0x3a5076(0x162),-0x1*0x2c5+0x1998+-0x13*0x133):_0x1af811;if(_0x1b5c4a===undefined)continue;this[_0x3a5076(0xf2)][_0x3a5076(0x142)]?.({'type':_0x3a5076(0x147),'workbenchConnectionId':_0x5e98d0[_0x3a5076(0x14e)],'watchId':_0x5e98d0[_0x3a5076(0x10a)],'nodeGeneration':_0x5e98d0[_0x3a5076(0xf0)],'nodeId':this[_0x3a5076(0xf2)][_0x3a5076(0x14f)]?.()??_0x3a5076(0x12c),'workspaceId':_0x4589cd[_0x3a5076(0x115)],'sessionId':_0x4589cd['id'],'revision':0x1,'snapshotSequence':++this[_0x3a5076(0xe6)],'expiresAt':_0x5e98d0[_0x3a5076(0xee)],'payload':_0x1b5c4a});}}[_0x44c1f3(0x119)](_0x2c011a,_0x8817c9,_0x4fd98f){const _0x367240=_0x44c1f3;for(const _0x3730a9 of[...this[_0x367240(0x10c)][_0x367240(0xf7)]()]){if(_0x3730a9[_0x367240(0xfb)]!==_0x2c011a['id'])continue;if(!_0x3730a9[_0x367240(0x13d)])continue;const _0x3901fb=_0x3730a9[_0x367240(0x11e)]===_0x367240(0x162)?this[_0x367240(0xf2)][_0x367240(0x13f)]?.(_0x2c011a,_0x8817c9,_0x367240(0x162),-0x5*0x51b+0xef*-0x16+0x2e1b):_0x8817c9;if(_0x3901fb===undefined)continue;this[_0x367240(0xd5)](_0x3730a9,_0x2c011a,_0x3901fb);if(!_0x4fd98f)continue;this[_0x367240(0xde)](_0x3730a9,_0x8817c9);}}[_0x44c1f3(0xd5)](_0x32bc1c,_0x474789,_0x4f2f9a){const _0x197afb=_0x44c1f3;_0x32bc1c[_0x197afb(0x13d)]=!![],this[_0x197afb(0xf2)][_0x197afb(0x142)]?.({'type':_0x197afb(0x147),'workbenchConnectionId':_0x32bc1c[_0x197afb(0x14e)],'watchId':_0x32bc1c[_0x197afb(0x10a)],'nodeGeneration':_0x32bc1c[_0x197afb(0xf0)],'nodeId':this[_0x197afb(0xf2)][_0x197afb(0x14f)]?.()??_0x197afb(0x12c),'workspaceId':_0x474789[_0x197afb(0x115)],'sessionId':_0x474789['id'],'revision':0x1,'snapshotSequence':++this[_0x197afb(0xe6)],'expiresAt':_0x32bc1c[_0x197afb(0xee)],'payload':_0x4f2f9a});}[_0x44c1f3(0x161)](_0x3479bc){const _0x37e252=_0x44c1f3;for(const _0x373113 of this[_0x37e252(0x10c)][_0x37e252(0xf7)]()){if(_0x373113[_0x37e252(0xfb)]!==_0x3479bc)continue;if(!_0x373113[_0x37e252(0x13d)])continue;_0x373113[_0x37e252(0x148)]=!![];for(const _0x577803 of _0x373113[_0x37e252(0x13e)])this[_0x37e252(0x12e)](_0x373113,_0x577803);_0x373113[_0x37e252(0x13e)][_0x37e252(0x117)]=-0x2367*-0x1+0x18*0x191+-0x1855*0x3;}}[_0x44c1f3(0xde)](_0x11e089,_0x23cb79){const _0x502cd2=_0x44c1f3,_0x51ec4e=isPlainRecord(_0x23cb79)?_0x23cb79:undefined,_0x4add59=_0x51ec4e?.[_0x502cd2(0xe6)],_0xd98f04=typeof _0x4add59===_0x502cd2(0xdf)&&Number[_0x502cd2(0x14b)](_0x4add59)&&_0x4add59>=0x76a+-0x234e+-0x2a*-0xaa?_0x4add59:undefined;_0x11e089[_0x502cd2(0x148)]=!![];for(const _0xd4a05c of _0x11e089[_0x502cd2(0x13e)])if(_0xd98f04===undefined||_0xd4a05c[_0x502cd2(0x10b)]>_0xd98f04)this[_0x502cd2(0x12e)](_0x11e089,_0xd4a05c);_0x11e089[_0x502cd2(0x13e)][_0x502cd2(0x117)]=-0x7*-0x496+-0x29d*-0xb+0x1*-0x3cd9;}[_0x44c1f3(0xda)](_0x53606c){const _0x5a017d=_0x44c1f3;for(const _0x391bf7 of[...this[_0x5a017d(0x10c)][_0x5a017d(0xf7)]()]){if(_0x391bf7[_0x5a017d(0xfb)]!==_0x53606c)continue;this[_0x5a017d(0xf2)][_0x5a017d(0x142)]?.({'type':_0x5a017d(0x10f),'workbenchConnectionId':_0x391bf7[_0x5a017d(0x14e)],'watchType':_0x5a017d(0xfc),'watchId':_0x391bf7[_0x5a017d(0x10a)],'nodeGeneration':_0x391bf7[_0x5a017d(0xf0)],'nodeId':this[_0x5a017d(0xf2)][_0x5a017d(0x14f)]?.()??_0x5a017d(0x12c),'workspaceId':_0x391bf7[_0x5a017d(0x115)]??_0x5a017d(0x13c),'sessionId':_0x53606c,'code':_0x5a017d(0xf1),'message':_0x5a017d(0x12b)}),this[_0x5a017d(0xdd)](_0x391bf7[_0x5a017d(0x123)]);}this[_0x5a017d(0x14a)](_0x53606c);}[_0x44c1f3(0x166)](_0x3add1a){const _0x5d23b4=_0x44c1f3;for(const _0x553d5d of[...this[_0x5d23b4(0x10c)][_0x5d23b4(0xf7)]()])if(_0x553d5d[_0x5d23b4(0xfb)]===_0x3add1a)this[_0x5d23b4(0xdd)](_0x553d5d[_0x5d23b4(0x123)]);this[_0x5d23b4(0x14a)](_0x3add1a);}[_0x44c1f3(0x141)](_0xbe51a7){const _0x543b39=_0x44c1f3,_0x3a805f=setTimeout(()=>this[_0x543b39(0xdd)](_0xbe51a7),TTL_MS);return _0x3a805f[_0x543b39(0x13b)](),_0x3a805f;}[_0x44c1f3(0xdc)](_0x28151e){const _0x538af4=_0x44c1f3;let _0x127c37=0x169e+0x2*0xba2+-0x16f1*0x2;for(const _0x30e8bb of this[_0x538af4(0x10c)][_0x538af4(0xf7)]())if(_0x30e8bb[_0x538af4(0xfb)]===_0x28151e)_0x127c37=Math[_0x538af4(0x145)](_0x127c37,_0x30e8bb[_0x538af4(0xee)]);return _0x127c37;}[_0x44c1f3(0x168)](_0x3c4117){const _0x11e471=_0x44c1f3,_0x2ff52f=setTimeout(()=>void this[_0x11e471(0xcf)](_0x3c4117),INTERVAL_MS);return _0x2ff52f[_0x11e471(0x13b)](),_0x2ff52f;}}function diagnosticErrorCode(_0x2cdd48,_0x4e814d){const _0x2a30dd=_0x44c1f3,_0x5d42dc=safeErrorCode(_0x2cdd48,'');if(_0x5d42dc[_0x2a30dd(0x117)]>-0x880+-0x1161*-0x1+-0x8e1)return _0x5d42dc;if(_0x2cdd48!==null&&typeof _0x2cdd48===_0x2a30dd(0xd3)&&_0x2a30dd(0x139)in _0x2cdd48&&typeof _0x2cdd48[_0x2a30dd(0x139)]===_0x2a30dd(0x10e)&&/^[A-Z][A-Z0-9_]{0,127}$/[_0x2a30dd(0xf9)](_0x2cdd48[_0x2a30dd(0x139)]))return _0x2cdd48[_0x2a30dd(0x139)];return _0x4e814d;}function sessionActivity(_0x5e62dd){const _0x3a8b0d=_0x44c1f3;if(!isPlainRecord(_0x5e62dd[_0x3a8b0d(0xe7)]))return undefined;if(_0x5e62dd[_0x3a8b0d(0x12d)]===_0x3a8b0d(0xef)&&isPlainRecord(_0x5e62dd[_0x3a8b0d(0xe7)][_0x3a8b0d(0xef)])){const _0x51d28a=_0x5e62dd[_0x3a8b0d(0xe7)][_0x3a8b0d(0xef)][_0x3a8b0d(0x11f)];if(_0x51d28a===_0x3a8b0d(0x102)||_0x51d28a===_0x3a8b0d(0xf8)||_0x51d28a===_0x3a8b0d(0x132))return _0x3a8b0d(0xf8);return undefined;}if(_0x5e62dd[_0x3a8b0d(0x12d)]!==_0x3a8b0d(0xfc))return undefined;const _0x597b5e=_0x5e62dd[_0x3a8b0d(0xe7)][_0x3a8b0d(0xfc)];if(!isPlainRecord(_0x597b5e)||typeof _0x597b5e[_0x3a8b0d(0x11a)]!==_0x3a8b0d(0x10e))return undefined;return _0x597b5e[_0x3a8b0d(0x11a)]===_0x3a8b0d(0x144)?_0x3a8b0d(0xf8):_0x3a8b0d(0x133);}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.26",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"node-pty": "1.1.0",
|
|
26
26
|
"ws": "^8.21.3",
|
|
27
27
|
"zod": "4.4.3",
|
|
28
|
-
"@myagentroam/agent": "^0.9.
|
|
29
|
-
"@myagentroam/protocol": "^0.9.
|
|
28
|
+
"@myagentroam/agent": "^0.9.26",
|
|
29
|
+
"@myagentroam/protocol": "^0.9.26"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/ws": "^8.18.1"
|