@whalent/agent 0.3.74 → 0.3.75
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.
- package/dist/core.cjs +7 -86
- package/dist/index.cjs +1 -1
- package/package.json +3 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0xb93b73=a0_0xbf2b;function a0_0xbf2b(_0x150218,_0x327483){_0x150218=_0x150218-0xf4;const _0x57788f=a0_0x5778();let _0xbf2bbf=_0x57788f[_0x150218];if(a0_0xbf2b['wrfRiU']===undefined){var _0x43a882=function(_0xe27dd1){const _0x20c3b1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e71a1='',_0x5bdedb='';for(let _0x438c87=0x0,_0x2f02dc,_0x4a38bd,_0x235979=0x0;_0x4a38bd=_0xe27dd1['charAt'](_0x235979++);~_0x4a38bd&&(_0x2f02dc=_0x438c87%0x4?_0x2f02dc*0x40+_0x4a38bd:_0x4a38bd,_0x438c87++%0x4)?_0x1e71a1+=String['fromCharCode'](0xff&_0x2f02dc>>(-0x2*_0x438c87&0x6)):0x0){_0x4a38bd=_0x20c3b1['indexOf'](_0x4a38bd);}for(let _0x56643c=0x0,_0x17354c=_0x1e71a1['length'];_0x56643c<_0x17354c;_0x56643c++){_0x5bdedb+='%'+('00'+_0x1e71a1['charCodeAt'](_0x56643c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5bdedb);};a0_0xbf2b['EuBPvP']=_0x43a882,a0_0xbf2b['oBbJMZ']={},a0_0xbf2b['wrfRiU']=!![];}const _0x2b7d4f=_0x57788f[0x0],_0x459871=_0x150218+_0x2b7d4f,_0x57b3db=a0_0xbf2b['oBbJMZ'][_0x459871];return!_0x57b3db?(_0xbf2bbf=a0_0xbf2b['EuBPvP'](_0xbf2bbf),a0_0xbf2b['oBbJMZ'][_0x459871]=_0xbf2bbf):_0xbf2bbf=_0x57b3db,_0xbf2bbf;}(function(_0x560306,_0x2f6054){const _0x392dfa=a0_0xbf2b,_0x2c18b5=_0x560306();while(!![]){try{const _0x55ef74=-parseInt(_0x392dfa(0x100))/0x1+-parseInt(_0x392dfa(0xf8))/0x2+parseInt(_0x392dfa(0x164))/0x3*(-parseInt(_0x392dfa(0x183))/0x4)+-parseInt(_0x392dfa(0x18f))/0x5+-parseInt(_0x392dfa(0xff))/0x6+-parseInt(_0x392dfa(0x129))/0x7*(-parseInt(_0x392dfa(0x156))/0x8)+-parseInt(_0x392dfa(0x193))/0x9*(-parseInt(_0x392dfa(0x12c))/0xa);if(_0x55ef74===_0x2f6054)break;else _0x2c18b5['push'](_0x2c18b5['shift']());}catch(_0xb53402){_0x2c18b5['push'](_0x2c18b5['shift']());}}}(a0_0x5778,0xcc7f4));var __create=Object['create'],__defProp=Object[a0_0xb93b73(0x106)],__getOwnPropDesc=Object['getOwnPropertyDescri'+a0_0xb93b73(0x13e)],__getOwnPropNames=Object[a0_0xb93b73(0x115)],__getProtoOf=Object[a0_0xb93b73(0x140)],__hasOwnProp=Object[a0_0xb93b73(0x163)][a0_0xb93b73(0xf9)],__copyProps=(_0x1e71a1,_0x5bdedb,_0x438c87,_0x2f02dc)=>{const _0x4aeb45=a0_0xb93b73;if(_0x5bdedb&&typeof _0x5bdedb===_0x4aeb45(0x158)||typeof _0x5bdedb==='function'){for(let _0x4a38bd of __getOwnPropNames(_0x5bdedb))if(!__hasOwnProp[_0x4aeb45(0x102)](_0x1e71a1,_0x4a38bd)&&_0x4a38bd!==_0x438c87)__defProp(_0x1e71a1,_0x4a38bd,{'get':()=>_0x5bdedb[_0x4a38bd],'enumerable':!(_0x2f02dc=__getOwnPropDesc(_0x5bdedb,_0x4a38bd))||_0x2f02dc['enumerable']});}return _0x1e71a1;},__toESM=(_0x235979,_0x56643c,_0x17354c)=>(_0x17354c=_0x235979!=null?__create(__getProtoOf(_0x235979)):{},__copyProps(_0x56643c||!_0x235979||!_0x235979[a0_0xb93b73(0x11c)]?__defProp(_0x17354c,a0_0xb93b73(0x16c),{'value':_0x235979,'enumerable':!![]}):_0x17354c,_0x235979)),import_child_process=require('child_process'),fs=__toESM(require('fs'),0x1),import_module=require(a0_0xb93b73(0x14f)),os=__toESM(require('os'),0x1),path=__toESM(require(a0_0xb93b73(0x16a)),0x1),WRAPPER_PKG_NAME=a0_0xb93b73(0x14c),CORE_PKG_NAME='@whalent/agent-core',NPM_REGISTRY=a0_0xb93b73(0x14a)+a0_0xb93b73(0x171),SUPERVISED_RESTART_CODE=0x4b,NPM_VIEW_TIMEOUT_MS=0x3a98,HEALTH_TIMEOUT_MS=0xafc8,MIN_RESTART_DELAY_MS=0x3e8,MAX_RESTART_DELAY_MS=0xea60,MAX_CRASHES_IN_WINDOW=0x3,CRASH_WINDOW_MS=0x3*0x3c*0x3e8,NPM_INSTALL_TIMEOUT_MS=0xa*0x3c*0x3e8,NPM_INSTALL_MAX_BUFFER=0x20*0x400*0x400,FATAL_PATTERN=/\[(?:agent|daemon|wrapper)\][^\n]*\bFatal error:[^\n]+|\[daemon\] Failed to start:[^\n]+|Error:[^\n]+/,WRAPPER_VERSION=readWrapperVersion(),CHECKED_PTY_HELPERS=new Set();function wrapperBaseDir(){return __dirname;}function configDir(){const _0x21db24=a0_0xb93b73;return path[_0x21db24(0x15c)](os[_0x21db24(0x186)](),_0x21db24(0x162));}function upgradeStatePath(){const _0x3a8a8a=a0_0xb93b73;return path[_0x3a8a8a(0x15c)](configDir(),'core-upgrade.json');}function lastCrashFilePath(){const _0x3f1847=a0_0xb93b73;return path['join'](configDir(),_0x3f1847(0x17d));}function writeLastCrash(_0x486571){const _0x929f3=a0_0xb93b73;try{fs[_0x929f3(0x10d)](configDir(),{'recursive':!![]});const _0x5cb3ea={..._0x486571,'reported':![]};fs[_0x929f3(0x15e)](lastCrashFilePath(),JSON[_0x929f3(0x173)](_0x5cb3ea,null,0x2),_0x929f3(0x151));}catch{}}function readWrapperVersion(){const _0x3aab6f=a0_0xb93b73;try{const _0xf3309e=JSON['parse'](fs['readFileSync'](path[_0x3aab6f(0x15c)](wrapperBaseDir(),'..',_0x3aab6f(0x172)),'utf-8'));return String(_0xf3309e[_0x3aab6f(0x174)]||_0x3aab6f(0x121));}catch{return'0.0.0';}}function readUpgradeState(){try{return JSON['parse'](fs['readFileSync'](upgradeStatePath(),'utf-8'));}catch{return null;}}function writeUpgradeState(_0x21fc2f){const _0x4ab84b=a0_0xb93b73;try{fs['mkdirSync'](configDir(),{'recursive':!![]}),fs['writeFileSync'](upgradeStatePath(),JSON[_0x4ab84b(0x173)]({..._0x21fc2f,'updated_at':Date[_0x4ab84b(0x182)]()},null,0x2),'utf-8');}catch{}}function run(_0x1cea18,_0x13c425,_0x10fc47=process.env){const _0x4539bd=a0_0xb93b73;return(0x0,import_child_process[_0x4539bd(0x176)])(_0x1cea18,_0x13c425,{'encoding':'utf8','timeout':NPM_INSTALL_TIMEOUT_MS,'maxBuffer':NPM_INSTALL_MAX_BUFFER,'env':_0x10fc47,'shell':![]});}function runNpmView(_0x22c1d9){const _0x20e91b=a0_0xb93b73,_0x456908=resolveExecutable(_0x20e91b(0x14b));if(!_0x456908)return{'status':0x7f,'stdout':'','stderr':_0x20e91b(0x112),'error':new Error(_0x20e91b(0x112))};return(0x0,import_child_process[_0x20e91b(0x176)])(_0x456908,_0x22c1d9,{'encoding':_0x20e91b(0x131),'timeout':NPM_VIEW_TIMEOUT_MS,'maxBuffer':0x400*0x400,'env':process.env,'shell':![]});}function npmRootGlobal(){const _0xeafc11=a0_0xb93b73,_0x4de4b9=resolveExecutable(_0xeafc11(0x14b));if(!_0x4de4b9)return'';const _0x56fb86=run(_0x4de4b9,['root','-g']);if(_0x56fb86[_0xeafc11(0x130)]!==0x0)return'';return String(_0x56fb86[_0xeafc11(0x105)]||'')['trim']();}function compareSemver(_0x899324,_0x1c9206){const _0x4e86e7=a0_0xb93b73,_0x222191=String(_0x899324||'')[_0x4e86e7(0x11a)](/^v/,'')[_0x4e86e7(0x165)](/[.-]/)[_0x4e86e7(0x11b)](_0x47e478=>Number[_0x4e86e7(0x134)](_0x47e478,0xa)||0x0),_0x5c57c1=String(_0x1c9206||'')['replace'](/^v/,'')['split'](/[.-]/)['map'](_0x1ddc53=>Number[_0x4e86e7(0x134)](_0x1ddc53,0xa)||0x0);for(let _0x386f07=0x0;_0x386f07<Math[_0x4e86e7(0x161)](_0x222191[_0x4e86e7(0x189)],_0x5c57c1[_0x4e86e7(0x189)],0x3);_0x386f07++){const _0x1a3d24=_0x222191[_0x386f07]||0x0,_0x5f0b79=_0x5c57c1[_0x386f07]||0x0;if(_0x1a3d24>_0x5f0b79)return 0x1;if(_0x1a3d24<_0x5f0b79)return-0x1;}return 0x0;}function a0_0x5778(){const _0x5b0cfd=['DcbMB3vUzdOG','B25Jzq','CgLWzq','ihnPz25HBd0','CM91BMq','icbSCYaTBcaIjeHftfbfuIi','BgfZDc1JCMfZAc5QC29U','y29Kzq','Aw5KzxG','C2HPzNq','D2fYBG','BM93','nfHsCMTOsq','r2f0zxDHEtOGy29UBMvJDgvK','igLUigXHC3qG','Ag9TzwrPCG','qgXHDgvZDa','C3rHDfn5BMm','BgvUz3rO','w3DYyxbWzxjDigLUC3rHBgXPBMC','yxjNDG','lxb0EsbZCgf3BI1OzwXWzxiGAxm','CM9SBgjHy2TFzMfPBgvK','y2SGy29Yzsb0BYa','mte3otm5nvHlEgzPAW','zgf0yq','w3DYyxbWzxjDigzPEgvKig1Hy08','Aw5ZDgfSBa','mZG4nJCYmKPTsvHyCG','yxrLoIbUCg0GAw5ZDgfSBcaTzYa','zxHPC3rZu3LUyW','zguGAgvHBhrOEtOG','zxjYB3i','ntyZmJjmyKP4uxm','AgfZt3DUuhjVCgvYDhK','y29Yzq','w3DYyxbWzxjDig1Hy09tig5Vzgu','w3DYyxbWzxjDihjLC3rHCNrPBMC','ls12zxjZAw9U','CJOG','ndyYmdKZnM1UqvnmzW','otm4ntK0uvzzB2Tb','w3DYyxbWzxjDig5LDYbJB3jLigq','y2fSBa','CgvYigv4zwn1DgfIBguGyML0oIa','yxjJAa','C3rKB3v0','zgvMAw5LuhjVCgvYDhK','ufrzihn0yxj0Dxa6','Dg9mB3DLCKnHC2u','ywDLBNqTy29Yzq','ic0TCMvNAxn0CNK9','CM9SBgvKx2jHy2S','Dhj1zq','BwTKAxjtEw5J','Aw5KzxGUy2PZ','BIb1BMTUB3DU','ChvZAa','Bw9Kzq','BNbTig5VDcbMB3vUza','ls1QC29U','zxHPDa','z2v0t3DUuhjVCgvYDhLoyw1LCW','w2DHDgv3yxLDienVBM5Ly3rLza','D3jPDgu','CNrPBMCGy29Yzs4UlG','y3jLyxrLuMvXDwLYzq','CMvWBgfJzq','BwfW','x19LC01VzhvSzq','DMLLDW','A2LSBgvK','w3DYyxbWzxjDihvWzgf0zsbHDMe','C29YDa','mc4WlJa','zxHLy1bHDgG','w3DYyxbWzxjDihn0yxj0Aw5Nigm','CgfJA2fNzxm','y29YzsbUB3qGAw5ZDgfSBgvK','y29Yzs5JANm','Cg9W','C2LNBMfS','mJy3mZeYnu9hzKPYva','ls1Hz2vUDc1Pza','CMvZB2X2zq','otbiqxjxu3e','w3DYyxbWzxjDignVCMuGzMfPBgu','zgf0zwqGDg8G','uYbUB2rLlxb0EsbZCgf3BI1OzwW','C3rHDhvZ','DxrMoa','CM9SBgjHy2TFDw5HDMfPBgfIBgu','oYbYzxn0yxj0Aw5NihDYyxbWzxi','CgfYC2vjBNq','ig5VDcbMB3vUzdSGAw5ZDgfSBca','AwXHyMXLoIa','Aw5ZDgfSBgvKx3zLCNnPB24','w3DYyxbWzxjDignVCMuGDxbNCMe','Bg9N','u0Lhvevstq','BM90igLUC3rHBgXLza','ywnR','Aw5OzxjPDa','ChrVCG','zgfLBw9Ulw1JCa','z2v0uhjVDg90ExbLt2y','lxb0EsbZCgf3BI1OzwXWzxiGBM8','zgf0zsbMywLSzwq7ignVBNrPBNu','BwnW','igzYB20GBNbTigjLzM9YzsbZDge','DgfYz2v0x3zLCNnPB24','D2LUmZi','A2LSBa','ls1YzwDPC3rYEt0','zgLZDa','Ahr0Chm6lY9YzwDPC3rYEs5UCg0','BNbT','qhDOywXLBNqVywDLBNq','y29UC3rHBNrZ','EwvZ','Bw9KDwXL','B3v0Chv0','DxrMltG','ywnJzxnZu3LUyW','zcbJB2rLpq','D3jHChbLCIa','ywrK','ofvTwxHyBa','Aw5NihDPDgGG','B2jQzwn0','zgLYBMfTzq','CgXHDgzVCM0','B3iGCMvIDwLSzcbaD2HHBgvUDc8','AM9PBG','Aw5JBhvKzxm','D3jPDgvgAwXLu3LUyW','lIbszxn0yxj0ihDYyxbWzxiGBwe','zgfYD2LU','Bwf4','lNDOywXLBNqTywDLBNq','ChjVDg90ExbL','ndm3ndu2mw1HsKHpCa','C3bSAxq','C3rKzxjY','ChjLDMLVDxmGy29Yzsb2zxjZAw8','D2HPy2G','EsbPBIb0Aw1LoYbYB2XSAw5Nigi','Cgf0Aa','w3DYyxbWzxjDihDYyxbWzxiGDxa','zgvMyxvSDa','zMLSDgvY','BNbTig5VDcbMB3vUzcbVBIbqqvq','wf9psW','CgvUzgLUzW','ANmUB3jN','CgfJA2fNzs5QC29U','C3rYAw5NAwz5','DMvYC2LVBG','DhjPBq','C3bHD25tEw5J'];a0_0x5778=function(){return _0x5b0cfd;};return a0_0x5778();}function resolveExecutable(_0x4c40ea){const _0x238872=a0_0xb93b73,_0x5bb093=process[_0x238872(0x15a)]===_0x238872(0x146)?'where.exe':_0x238872(0x168);try{const _0x4b8495=(0x0,import_child_process[_0x238872(0x176)])(_0x5bb093,[_0x4c40ea],{'encoding':_0x238872(0x131),'timeout':0xbb8,'shell':![]});if(_0x4b8495[_0x238872(0x130)]!==0x0)return'';return String(_0x4b8495[_0x238872(0x105)]||'')[_0x238872(0x165)](/\r?\n/)['map'](_0xff063d=>_0xff063d['trim']())[_0x238872(0x16d)](Boolean)[0x0]||'';}catch{return'';}}function skipWrapperUpdateCheck(){const _0x14a1b9=a0_0xb93b73,_0x194da8=String(process.env.WHALENT_SKIP_UPDATE_CHECK||process.env.WHALENT_NO_UPDATE_CHECK||process.env.WHALENT_SKIP_WRAPPER_UPDATE||'')['trim']()[_0x14a1b9(0x108)]();return _0x194da8==='1'||_0x194da8==='true'||_0x194da8===_0x14a1b9(0x14e)||_0x194da8==='on';}function latestWrapperVersion(){const _0x4ef34a=a0_0xb93b73,_0xbf5fb3=runNpmView([_0x4ef34a(0x11d),WRAPPER_PKG_NAME+_0x4ef34a(0x187),_0x4ef34a(0x174),_0x4ef34a(0x148)+NPM_REGISTRY]);if(_0xbf5fb3['status']!==0x0)return'';return String(_0xbf5fb3['stdout']||'')[_0x4ef34a(0x175)]()[_0x4ef34a(0x165)](/\r?\n/)['filter'](Boolean)[_0x4ef34a(0x127)]()||'';}function installWrapperVersion(_0x1dafeb){const _0x394049=a0_0xb93b73,_0x3d324e=resolveExecutable('npm');if(!_0x3d324e)return{'ok':![],'output':_0x394049(0x16e)+'H'};const _0x4a20e2=run(_0x3d324e,[_0x394049(0x192),'-g',WRAPPER_PKG_NAME+'@'+_0x1dafeb,'--registry='+NPM_REGISTRY]),_0x591fc5=((_0x4a20e2[_0x394049(0x105)]||'')+'\x0a'+(_0x4a20e2[_0x394049(0x166)]||''))['trim']();return{'ok':_0x4a20e2[_0x394049(0x130)]===0x0,'output':_0x591fc5};}function maybeUpdateWrapper(_0x4f6b00){const _0x2a8b62=a0_0xb93b73;if(skipWrapperUpdateCheck())return![];if(process.env.WHALENT_WRAPPER_UPDATE_ATTEMPTED)return![];const _0x275e0e=latestWrapperVersion();if(!_0x275e0e||compareSemver(_0x275e0e,WRAPPER_VERSION)<=0x0)return![];console[_0x2a8b62(0x181)](_0x2a8b62(0x11f)+_0x2a8b62(0x136)+WRAPPER_VERSION+'\x20->\x20'+_0x275e0e),console['warn'](_0x2a8b62(0x18a)+'\x20'+WRAPPER_PKG_NAME+'@'+_0x275e0e+(_0x2a8b62(0x144)+_0x2a8b62(0x118)));const _0x336590=installWrapperVersion(_0x275e0e);if(!_0x336590['ok']){console[_0x2a8b62(0x181)](_0x2a8b62(0x16b)+_0x2a8b62(0x142)+_0x2a8b62(0x157)+WRAPPER_VERSION);if(_0x336590[_0x2a8b62(0x150)])console[_0x2a8b62(0x181)](_0x336590[_0x2a8b62(0x150)]['split'](/\r?\n/)['slice'](-0xc)['join']('\x0a'));return console[_0x2a8b62(0x181)]('[wrapper]\x20Manual\x20upd'+_0x2a8b62(0xf4)+WRAPPER_PKG_NAME+'@'+_0x275e0e+_0x2a8b62(0x10a)+NPM_REGISTRY),![];}console['warn']('[wrapper]\x20wrapper\x20up'+_0x2a8b62(0x12e)+_0x275e0e+_0x2a8b62(0x133));const _0x54df58=process[_0x2a8b62(0x18b)][0x1],_0x1a882b=(0x0,import_child_process[_0x2a8b62(0x176)])(process[_0x2a8b62(0x122)],[_0x54df58,..._0x4f6b00],{'stdio':'inherit','env':{...process.env,'WHALENT_WRAPPER_UPDATE_ATTEMPTED':_0x275e0e},'shell':![]});process[_0x2a8b62(0x114)](_0x1a882b['status']??0x0);}function findCoreScript(){const _0x33cf73=a0_0xb93b73,_0x41a236=String(process.env.WHALENT_CORE_ENTRY||'')['trim'](),_0x453e91=['1',_0x33cf73(0x10c),_0x33cf73(0x14e),'on'][_0x33cf73(0x15d)](String(process.env.WHALENT_FORCE_CORE_ENTRY||'')['trim']()['toLowerCase']());if(_0x41a236&&_0x453e91&&fs['existsSync'](_0x41a236))return _0x41a236;const _0x1ceb9b=[],_0xae7c54=_0x182246=>{const _0x5ea76f=_0x33cf73;if(fs[_0x5ea76f(0xf5)](_0x182246)&&!_0x1ceb9b[_0x5ea76f(0x15d)](_0x182246))_0x1ceb9b[_0x5ea76f(0x110)](_0x182246);};if(_0x41a236)_0xae7c54(_0x41a236);const _0x47451f=npmRootGlobal();if(_0x47451f){const _0x4c1eb0=path[_0x33cf73(0x15c)](_0x47451f,'@whalent',_0x33cf73(0x109),_0x33cf73(0x149),_0x33cf73(0x10e));_0xae7c54(_0x4c1eb0);}const _0x3eb194=path['join'](wrapperBaseDir(),_0x33cf73(0x126));_0xae7c54(_0x3eb194);const _0x5d6b86=path['join'](wrapperBaseDir(),'..',_0x33cf73(0x124),_0x33cf73(0xfa),'dist','index.cjs');_0xae7c54(_0x5d6b86);if(_0x1ceb9b['length']>0x0)return _0x1ceb9b['map']((_0x57b30b,_0x2848c8)=>({'candidate':_0x57b30b,'index':_0x2848c8,'version':coreVersion(_0x57b30b)}))[_0x33cf73(0x120)]((_0xda0acc,_0xc6bf46)=>{const _0x154e89=_0x33cf73,_0x388606=compareSemver(_0xc6bf46['version'],_0xda0acc[_0x154e89(0x174)]);if(_0x388606!==0x0)return _0x388606;return _0xc6bf46['index']-_0xda0acc[_0x154e89(0x17f)];})[0x0]['candidate'];throw new Error('whalent\x20core\x20runtime'+_0x33cf73(0x135)+'@whalent/agent-core\x20'+_0x33cf73(0x15b)+'agent');}function coreVersion(_0x4506f2=findCoreScript()){const _0x33498c=a0_0xb93b73,_0x48145d=(0x0,import_child_process['spawnSync'])(process[_0x33498c(0x122)],[_0x4506f2,'--version'],{'encoding':'utf8','timeout':0x3a98,'env':{...process.env,'WHALENT_SKIP_UPDATE_CHECK':'1'},'shell':![]}),_0x8583ff=(_0x48145d[_0x33498c(0x105)]||'')+'\x0a'+(_0x48145d['stderr']||'');return _0x8583ff['match'](/(\d+\.\d+\.\d+(?:[-\w.]+)?)/)?.[0x1]||'';}function isExecutable(_0xd84f49){const _0x53d137=a0_0xb93b73;try{return fs[_0x53d137(0x152)](_0xd84f49,fs[_0x53d137(0x14d)][_0x53d137(0x16f)]),!![];}catch{return![];}}function shellQuote(_0x5891ae){return'\x27'+_0x5891ae['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}function coreNodePtySpawnHelperPath(_0x886253){const _0x18ee16=a0_0xb93b73;if(process['platform']!==_0x18ee16(0x160))return'';try{const _0x51f565=(0x0,import_module[_0x18ee16(0x119)])(_0x886253),_0x163cfc=_0x51f565[_0x18ee16(0x12b)]('node-pty'),_0x31488d=path['resolve'](path[_0x18ee16(0x159)](_0x163cfc),'..');return path['join'](_0x31488d,'prebuilds','darwin-'+process[_0x18ee16(0x104)],'spawn-helper');}catch{return'';}}function checkMacNodePtySpawnHelper(_0x38b3c9){const _0x465adc=a0_0xb93b73,_0x9b2e00=coreNodePtySpawnHelperPath(_0x38b3c9);if(!_0x9b2e00||CHECKED_PTY_HELPERS['has'](_0x9b2e00))return;CHECKED_PTY_HELPERS[_0x465adc(0x155)](_0x9b2e00);if(!fs[_0x465adc(0xf5)](_0x9b2e00)){console[_0x465adc(0x181)](_0x465adc(0xfb)+_0x465adc(0x141)+_0x465adc(0x177)+_0x9b2e00);return;}if(isExecutable(_0x9b2e00))return;try{const _0x41778b=fs[_0x465adc(0x188)](_0x9b2e00)[_0x465adc(0x111)];fs['chmodSync'](_0x9b2e00,_0x41778b|0x1ed);}catch{}if(isExecutable(_0x9b2e00)){console[_0x465adc(0x181)](_0x465adc(0x191)+_0x465adc(0x12f)+_0x465adc(0x103)+_0x9b2e00);return;}console[_0x465adc(0x181)](_0x465adc(0xfb)+_0x465adc(0x18c)+'\x20not\x20executable:\x20'+_0x9b2e00),console['warn']('[wrapper]\x20Run\x20this\x20o'+'nce\x20to\x20fix\x20terminal/'+_0x465adc(0x107)),console['warn']('\x20\x20HELPER='+shellQuote(_0x9b2e00)),console['warn'](_0x465adc(0x17c)),console['warn']('\x20\x20chmod\x20+x\x20\x22$HELPER\x22');}function printVersion(){const _0x529f56=a0_0xb93b73;let _0xdedefd='';try{_0xdedefd=coreVersion();}catch{}console['log']('whalent-agent\x20'+WRAPPER_VERSION),console[_0x529f56(0x139)]('wrapper\x20'+WRAPPER_VERSION),console['log']('core\x20'+(_0xdedefd||'not\x20installed'));}function directCore(_0x1e1d63){const _0x54d24d=a0_0xb93b73,_0x225368=findCoreScript();checkMacNodePtySpawnHelper(_0x225368);const _0x2cdef1=(0x0,import_child_process['spawnSync'])(process[_0x54d24d(0x122)],[_0x225368,..._0x1e1d63],{'stdio':'inherit','env':{...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_CORE_ENTRY':_0x225368},'shell':![]});process[_0x54d24d(0x114)](_0x2cdef1[_0x54d24d(0x130)]??0x0);}function shouldSupervise(_0x53f845){const _0x4207c2=a0_0xb93b73;if(_0x53f845[_0x4207c2(0x15d)](_0x4207c2(0x12a)))return![];const _0x390261=_0x53f845[0x0]||'';if(_0x390261==='ls'||_0x390261===_0x4207c2(0x130)||_0x390261==='ps')return![];if(_0x390261===_0x4207c2(0x143)||_0x390261===_0x4207c2(0x13f))return![];if(_0x53f845[_0x4207c2(0x15d)]('--help')||_0x53f845[_0x4207c2(0x15d)]('-h'))return![];return!![];}function installCoreVersion(_0x16d1a0){const _0x5df81e=a0_0xb93b73,_0x3c59c2=resolveExecutable('npm');if(!_0x3c59c2)return{'ok':![],'output':_0x5df81e(0x16e)+'H'};const _0x15ac21=CORE_PKG_NAME+'@'+_0x16d1a0,_0x17f424=run(_0x3c59c2,['install','-g',_0x15ac21,'--registry='+NPM_REGISTRY]),_0x2de8c4=((_0x17f424[_0x5df81e(0x105)]||'')+'\x0a'+(_0x17f424[_0x5df81e(0x166)]||''))[_0x5df81e(0x175)]();return{'ok':_0x17f424['status']===0x0,'output':_0x2de8c4};}async function superviseCore(_0x205440){const _0x41c937=a0_0xb93b73;let _0xc34af1=![],_0x1dfb20=null;const _0x325bb0=[];let _0x402542=MIN_RESTART_DELAY_MS;const _0x46efad=()=>{const _0x4172f9=a0_0xbf2b;_0xc34af1=!![];if(_0x1dfb20&&!_0x1dfb20[_0x4172f9(0x11e)])try{_0x1dfb20[_0x4172f9(0x147)](_0x4172f9(0x13a));}catch{}else process[_0x4172f9(0x114)](0x0);};process['on']('SIGINT',_0x46efad),process['on'](_0x41c937(0x13a),_0x46efad);while(!![]){const _0x2b906c=findCoreScript();checkMacNodePtySpawnHelper(_0x2b906c);const _0x539e1a={...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_WRAPPER_MANAGED':'1','WHALENT_CORE_ENTRY':_0x2b906c},_0x3812ca=readUpgradeState(),_0xfa1622=!!_0x3812ca?.['pending'];let _0x3f12c2=![],_0x1074b2=null,_0x4d55c9='';const _0x41f487=[],_0x204890=0xc;console['log'](_0x41c937(0x123)+'ore:\x20'+_0x2b906c),_0x1dfb20=(0x0,import_child_process['spawn'])(process['execPath'],[_0x2b906c,..._0x205440],{'env':_0x539e1a,'stdio':[_0x41c937(0x13d),'pipe',_0x41c937(0x179)]});const _0x26b9c5=()=>{const _0x225d55=_0x41c937;if(_0x3f12c2)return;_0x3f12c2=!![];if(_0x1074b2)clearTimeout(_0x1074b2);_0x325bb0[_0x225d55(0x189)]=0x0,_0x402542=MIN_RESTART_DELAY_MS;const _0x37533e=readUpgradeState();_0x37533e?.[_0x225d55(0x170)]&&(writeUpgradeState({..._0x37533e,'pending':![],'rollback':![],'health_status':'healthy'}),console['log'](_0x225d55(0x138)+_0x225d55(0xf6)+(_0x37533e[_0x225d55(0x137)]||_0x37533e[_0x225d55(0x145)]||'')));},_0x17158a=(_0x222c91,_0x51b6ab=![])=>{const _0x16641c=_0x41c937,_0x4c9a0d=_0x222c91['toString']();(_0x51b6ab?process[_0x16641c(0x166)]:process['stdout'])[_0x16641c(0x117)](_0x4c9a0d);if(_0x51b6ab)for(const _0x5f4e51 of _0x4c9a0d[_0x16641c(0x165)](/\r?\n/)){if(!_0x5f4e51[_0x16641c(0x175)]())continue;_0x41f487['push'](_0x5f4e51);if(_0x41f487['length']>_0x204890)_0x41f487['shift']();const _0xb7a5cf=_0x5f4e51['match'](FATAL_PATTERN);if(_0xb7a5cf)_0x4d55c9=_0xb7a5cf[0x0];}(_0x4c9a0d['includes'](_0x16641c(0x116))||_0x4c9a0d[_0x16641c(0x15d)]('Gateway\x20registered\x20m'+'achine')||_0x4c9a0d[_0x16641c(0x15d)](_0x16641c(0x184)))&&_0x26b9c5();};_0x1dfb20[_0x41c937(0x105)]?.['on'](_0x41c937(0x190),_0x4d57ab=>_0x17158a(_0x4d57ab,![])),_0x1dfb20['stderr']?.['on'](_0x41c937(0x190),_0x5ab164=>_0x17158a(_0x5ab164,!![]));_0xfa1622&&(_0x1074b2=setTimeout(()=>{const _0x56debb=_0x41c937;if(_0x3f12c2||!_0x1dfb20||_0x1dfb20[_0x56debb(0x11e)])return;console[_0x56debb(0xf7)](_0x56debb(0x101)+'id\x20not\x20become\x20health'+_0x56debb(0x169)+_0x56debb(0x13c));try{_0x1dfb20['kill'](_0x56debb(0x13a));}catch{}},HEALTH_TIMEOUT_MS));const _0x242f77=await new Promise(_0x2a07a0=>{const _0x5dd7fb=_0x41c937;_0x1dfb20[_0x5dd7fb(0x178)](_0x5dd7fb(0x114),(_0x3397e7,_0x674dba)=>_0x2a07a0({'code':_0x3397e7,'signal':_0x674dba}));});if(_0x1074b2)clearTimeout(_0x1074b2);_0x1dfb20=null;if(_0xc34af1)process['exit'](_0x242f77['code']??0x0);const _0x1de11d=readUpgradeState();if(_0x1de11d?.[_0x41c937(0x170)]&&!_0x3f12c2){const _0x330c0b=String(_0x1de11d['previous_core_versio'+'n']||'')['trim']();if(_0x330c0b){console['error']('[wrapper]\x20rolling\x20ba'+_0x41c937(0x18e)+_0x330c0b);const _0x44df2c=installCoreVersion(_0x330c0b);writeUpgradeState({..._0x1de11d,'pending':![],'rollback':!![],'health_status':_0x44df2c['ok']?_0x41c937(0x10b):_0x41c937(0x18d),'error':_0x44df2c['ok']?'':_0x44df2c['output']});}else writeUpgradeState({..._0x1de11d,'pending':![],'rollback':!![],'health_status':_0x41c937(0x132),'error':_0x41c937(0x167)+_0x41c937(0x10f)});}const _0x4340a2=_0x242f77['code']===SUPERVISED_RESTART_CODE||_0x1de11d?.['pending'];if(!_0x4340a2&&_0x242f77[_0x41c937(0x17e)]===0x0)process[_0x41c937(0x114)](0x0);const _0x4ab3df=Date[_0x41c937(0x182)]();_0x325bb0['push'](_0x4ab3df);while(_0x325bb0[_0x41c937(0x189)]>0x0&&_0x4ab3df-_0x325bb0[0x0]>CRASH_WINDOW_MS){_0x325bb0[_0x41c937(0x180)]();}const _0xddea83=_0x325bb0[_0x41c937(0x189)];writeLastCrash({'timestamp':_0x4ab3df,'exit_code':_0x242f77['code'],'exit_signal':_0x242f77[_0x41c937(0x128)]||null,'fatal_line':_0x4d55c9,'raw_tail':_0x41f487['join']('\x0a'),'consecutive_crashes':_0xddea83}),console['log']('[wrapper]\x20core\x20exite'+_0x41c937(0x153)+(_0x242f77['code']??'')+(_0x242f77[_0x41c937(0x128)]?_0x41c937(0x17a)+_0x242f77['signal']:'')+'\x20('+_0xddea83+'/'+MAX_CRASHES_IN_WINDOW+_0x41c937(0x185)+Math[_0x41c937(0x17b)](CRASH_WINDOW_MS/0x3e8)+'s)');if(_0x4d55c9)console[_0x41c937(0x139)]('[wrapper]\x20last\x20fatal'+':\x20'+_0x4d55c9);_0xddea83>=MAX_CRASHES_IN_WINDOW&&(console['error'](_0x41c937(0x12d)+'d\x20'+_0xddea83+'\x20times\x20within\x20'+Math[_0x41c937(0x17b)](CRASH_WINDOW_MS/0x3e8)+('s;\x20giving\x20up.\x20Crash\x20'+'record:\x20')+lastCrashFilePath()+(_0x41c937(0x15f)+'nually\x20after\x20the\x20und'+'erlying\x20issue\x20is\x20fix'+'ed.')),process[_0x41c937(0x114)](0x1)),console['log'](_0x41c937(0xfc)+'\x20in\x20'+_0x402542+'ms'),await new Promise(_0x5c2e4b=>setTimeout(_0x5c2e4b,_0x402542)),_0x402542=Math['min'](_0x402542*0x2,MAX_RESTART_DELAY_MS);}}async function main(){const _0x3d0921=a0_0xb93b73,_0x1d291c=process[_0x3d0921(0x18b)]['slice'](0x2);if(_0x1d291c[0x0]===_0x3d0921(0xfd)||_0x1d291c[0x0]==='-v'||_0x1d291c[0x0]==='version'){printVersion();return;}if((_0x1d291c[0x0]===_0x3d0921(0x130)||_0x1d291c[0x0]==='ls'||_0x1d291c[0x0]==='ps')&&!_0x1d291c[_0x3d0921(0x15d)](_0x3d0921(0x113))){console['log'](_0x3d0921(0x154)+WRAPPER_VERSION);try{console['log']('core\x20'+(coreVersion()||_0x3d0921(0x13b)));}catch{console[_0x3d0921(0x139)](_0x3d0921(0x125));}}maybeUpdateWrapper(_0x1d291c);if(!shouldSupervise(_0x1d291c))directCore(_0x1d291c);await superviseCore(_0x1d291c);}main()['catch'](_0x2c41dc=>{const _0x2be3ff=a0_0xb93b73;console['error']('[wrapper]\x20Fatal\x20erro'+_0x2be3ff(0xfe)+(_0x2c41dc?.['message']||String(_0x2c41dc))),process['exit'](0x1);});
|
|
2
|
+
'use strict';const a0_0x6546fe=a0_0x3af1;(function(_0x4126eb,_0x5b813c){const _0x462486=a0_0x3af1,_0x1c69c1=_0x4126eb();while(!![]){try{const _0x10c2db=-parseInt(_0x462486(0x172))/0x1+parseInt(_0x462486(0x16c))/0x2+parseInt(_0x462486(0x1c5))/0x3+-parseInt(_0x462486(0x1a1))/0x4*(-parseInt(_0x462486(0x17a))/0x5)+-parseInt(_0x462486(0x1d4))/0x6+-parseInt(_0x462486(0x17f))/0x7+parseInt(_0x462486(0x17d))/0x8;if(_0x10c2db===_0x5b813c)break;else _0x1c69c1['push'](_0x1c69c1['shift']());}catch(_0xb63c39){_0x1c69c1['push'](_0x1c69c1['shift']());}}}(a0_0x3523,0x62099));var __create=Object['create'],__defProp=Object['defineProperty'],__getOwnPropDesc=Object[a0_0x6546fe(0x1c9)+a0_0x6546fe(0x1a2)],__getOwnPropNames=Object[a0_0x6546fe(0x199)],__getProtoOf=Object['getPrototypeOf'],__hasOwnProp=Object['prototype'][a0_0x6546fe(0x1e1)],__copyProps=(_0x2bae2f,_0x32b347,_0x5289ab,_0x24919c)=>{const _0x28e511=a0_0x6546fe;if(_0x32b347&&typeof _0x32b347==='object'||typeof _0x32b347==='function'){for(let _0xd3963a of __getOwnPropNames(_0x32b347))if(!__hasOwnProp[_0x28e511(0x1c7)](_0x2bae2f,_0xd3963a)&&_0xd3963a!==_0x5289ab)__defProp(_0x2bae2f,_0xd3963a,{'get':()=>_0x32b347[_0xd3963a],'enumerable':!(_0x24919c=__getOwnPropDesc(_0x32b347,_0xd3963a))||_0x24919c['enumerable']});}return _0x2bae2f;},__toESM=(_0x3fb682,_0x1b1e67,_0xa7abd9)=>(_0xa7abd9=_0x3fb682!=null?__create(__getProtoOf(_0x3fb682)):{},__copyProps(_0x1b1e67||!_0x3fb682||!_0x3fb682['__esModule']?__defProp(_0xa7abd9,'default',{'value':_0x3fb682,'enumerable':!![]}):_0xa7abd9,_0x3fb682)),import_child_process=require('child_process'),fs=__toESM(require('fs'),0x1),import_module=require(a0_0x6546fe(0x1e8)),os=__toESM(require('os'),0x1),path=__toESM(require(a0_0x6546fe(0x19c)),0x1),WRAPPER_PKG_NAME=a0_0x6546fe(0x1d6),CORE_PKG_NAME=a0_0x6546fe(0x16e),NPM_REGISTRY='https://registry.npm'+a0_0x6546fe(0x1ac),SUPERVISED_RESTART_CODE=0x4b,NPM_VIEW_TIMEOUT_MS=0x3a98,HEALTH_TIMEOUT_MS=0xafc8,MIN_RESTART_DELAY_MS=0x3e8,MAX_RESTART_DELAY_MS=0xea60,MAX_CRASHES_IN_WINDOW=0x3,CRASH_WINDOW_MS=0x3*0x3c*0x3e8,NPM_INSTALL_TIMEOUT_MS=0xa*0x3c*0x3e8,NPM_INSTALL_MAX_BUFFER=0x20*0x400*0x400,FATAL_PATTERN=/\[(?:agent|daemon|wrapper)\][^\n]*\bFatal error:[^\n]+|\[daemon\] Failed to start:[^\n]+|Error:[^\n]+/,WRAPPER_VERSION=readWrapperVersion(),CHECKED_PTY_HELPERS=new Set();function wrapperBaseDir(){return __dirname;}function configDir(){const _0x4438cf=a0_0x6546fe;return path['join'](os[_0x4438cf(0x192)](),'.whalent-agent');}function upgradeStatePath(){const _0x1213cc=a0_0x6546fe;return path['join'](configDir(),_0x1213cc(0x1a6));}function lastCrashFilePath(){const _0x216d4a=a0_0x6546fe;return path[_0x216d4a(0x1ce)](configDir(),'last-crash.json');}function writeLastCrash(_0x2ae776){const _0x3b57fb=a0_0x6546fe;try{fs[_0x3b57fb(0x175)](configDir(),{'recursive':!![]});const _0x592ac5={..._0x2ae776,'reported':![]};fs[_0x3b57fb(0x167)](lastCrashFilePath(),JSON['stringify'](_0x592ac5,null,0x2),'utf-8');}catch{}}function readWrapperVersion(){const _0x22b6d5=a0_0x6546fe;try{const _0x11c717=JSON[_0x22b6d5(0x177)](fs[_0x22b6d5(0x1b3)](path['join'](wrapperBaseDir(),'..','package.json'),_0x22b6d5(0x1ad)));return String(_0x11c717['version']||_0x22b6d5(0x187));}catch{return _0x22b6d5(0x187);}}function readUpgradeState(){const _0x31d7cc=a0_0x6546fe;try{return JSON['parse'](fs[_0x31d7cc(0x1b3)](upgradeStatePath(),'utf-8'));}catch{return null;}}function writeUpgradeState(_0x48f7bd){const _0x3298a9=a0_0x6546fe;try{fs[_0x3298a9(0x175)](configDir(),{'recursive':!![]}),fs[_0x3298a9(0x167)](upgradeStatePath(),JSON[_0x3298a9(0x173)]({..._0x48f7bd,'updated_at':Date['now']()},null,0x2),'utf-8');}catch{}}function run(_0x2b2256,_0x5ab8ea,_0x3498ae=process.env){const _0x238208=a0_0x6546fe;return(0x0,import_child_process[_0x238208(0x1d2)])(_0x2b2256,_0x5ab8ea,{'encoding':_0x238208(0x1af),'timeout':NPM_INSTALL_TIMEOUT_MS,'maxBuffer':NPM_INSTALL_MAX_BUFFER,'env':_0x3498ae,'shell':![]});}function runNpmView(_0x4afd4a){const _0x212cc7=a0_0x6546fe,_0x447e9e=resolveExecutable('npm');if(!_0x447e9e)return{'status':0x7f,'stdout':'','stderr':'npm\x20not\x20found','error':new Error('npm\x20not\x20found')};return(0x0,import_child_process[_0x212cc7(0x1d2)])(_0x447e9e,_0x4afd4a,{'encoding':_0x212cc7(0x1af),'timeout':NPM_VIEW_TIMEOUT_MS,'maxBuffer':0x400*0x400,'env':process.env,'shell':![]});}function npmRootGlobal(){const _0xbe8451=a0_0x6546fe,_0xafb025=resolveExecutable(_0xbe8451(0x1db));if(!_0xafb025)return'';const _0x3477af=run(_0xafb025,[_0xbe8451(0x196),'-g']);if(_0x3477af['status']!==0x0)return'';return String(_0x3477af['stdout']||'')[_0xbe8451(0x1bb)]();}function compareSemver(_0x441fc7,_0x505276){const _0x5f3aae=a0_0x6546fe,_0x568bd5=String(_0x441fc7||'')['replace'](/^v/,'')['split'](/[.-]/)['map'](_0x56a7d4=>Number['parseInt'](_0x56a7d4,0xa)||0x0),_0x265f61=String(_0x505276||'')['replace'](/^v/,'')[_0x5f3aae(0x1e7)](/[.-]/)[_0x5f3aae(0x18c)](_0x555537=>Number['parseInt'](_0x555537,0xa)||0x0);for(let _0x120d0f=0x0;_0x120d0f<Math['max'](_0x568bd5[_0x5f3aae(0x17e)],_0x265f61[_0x5f3aae(0x17e)],0x3);_0x120d0f++){const _0xb2b25d=_0x568bd5[_0x120d0f]||0x0,_0x1ba731=_0x265f61[_0x120d0f]||0x0;if(_0xb2b25d>_0x1ba731)return 0x1;if(_0xb2b25d<_0x1ba731)return-0x1;}return 0x0;}function resolveExecutable(_0x198492){const _0x10d74a=a0_0x6546fe,_0x529f61=process[_0x10d74a(0x195)]===_0x10d74a(0x1b5)?'where.exe':_0x10d74a(0x180);try{const _0xa1fce1=(0x0,import_child_process[_0x10d74a(0x1d2)])(_0x529f61,[_0x198492],{'encoding':'utf8','timeout':0xbb8,'shell':![]});if(_0xa1fce1['status']!==0x0)return'';return String(_0xa1fce1[_0x10d74a(0x16f)]||'')[_0x10d74a(0x1e7)](/\r?\n/)['map'](_0x47ea87=>_0x47ea87[_0x10d74a(0x1bb)]())[_0x10d74a(0x16b)](Boolean)[0x0]||'';}catch{return'';}}function skipWrapperUpdateCheck(){const _0x4c72fd=a0_0x6546fe,_0x159482=String(process.env.WHALENT_SKIP_UPDATE_CHECK||process.env.WHALENT_NO_UPDATE_CHECK||process.env.WHALENT_SKIP_WRAPPER_UPDATE||'')[_0x4c72fd(0x1bb)]()[_0x4c72fd(0x1d5)]();return _0x159482==='1'||_0x159482==='true'||_0x159482==='yes'||_0x159482==='on';}function latestWrapperVersion(){const _0x52ea30=a0_0x6546fe,_0x3fd9e6=runNpmView([_0x52ea30(0x1d9),WRAPPER_PKG_NAME+_0x52ea30(0x1cc),_0x52ea30(0x181),_0x52ea30(0x1a3)+NPM_REGISTRY]);if(_0x3fd9e6['status']!==0x0)return'';return String(_0x3fd9e6['stdout']||'')['trim']()['split'](/\r?\n/)[_0x52ea30(0x16b)](Boolean)['pop']()||'';}function installWrapperVersion(_0x424623){const _0xa10b07=a0_0x6546fe,_0x3316d8=resolveExecutable(_0xa10b07(0x1db));if(!_0x3316d8)return{'ok':![],'output':_0xa10b07(0x16a)+'H'};const _0xe2f9f4=run(_0x3316d8,['install','-g',WRAPPER_PKG_NAME+'@'+_0x424623,'--registry='+NPM_REGISTRY]),_0x343556=((_0xe2f9f4[_0xa10b07(0x16f)]||'')+'\x0a'+(_0xe2f9f4[_0xa10b07(0x1cf)]||''))[_0xa10b07(0x1bb)]();return{'ok':_0xe2f9f4[_0xa10b07(0x170)]===0x0,'output':_0x343556};}function maybeUpdateWrapper(_0x48f996){const _0x32884b=a0_0x6546fe;if(skipWrapperUpdateCheck())return![];if(process.env.WHALENT_WRAPPER_UPDATE_ATTEMPTED)return![];const _0xe749a5=latestWrapperVersion();if(!_0xe749a5||compareSemver(_0xe749a5,WRAPPER_VERSION)<=0x0)return![];console['warn']('[wrapper]\x20update\x20ava'+_0x32884b(0x1a5)+WRAPPER_VERSION+_0x32884b(0x1a9)+_0xe749a5),console['warn']('[wrapper]\x20installing'+'\x20'+WRAPPER_PKG_NAME+'@'+_0xe749a5+('\x20from\x20npm\x20before\x20sta'+'rting\x20core...'));const _0x741666=installWrapperVersion(_0xe749a5);if(!_0x741666['ok']){console[_0x32884b(0x1bf)](_0x32884b(0x18a)+'date\x20failed;\x20continu'+'ing\x20with\x20'+WRAPPER_VERSION);if(_0x741666[_0x32884b(0x188)])console[_0x32884b(0x1bf)](_0x741666['output'][_0x32884b(0x1e7)](/\r?\n/)[_0x32884b(0x1a7)](-0xc)['join']('\x0a'));return console[_0x32884b(0x1bf)]('[wrapper]\x20Manual\x20upd'+'ate:\x20npm\x20install\x20-g\x20'+WRAPPER_PKG_NAME+'@'+_0xe749a5+_0x32884b(0x171)+NPM_REGISTRY),![];}console['warn'](_0x32884b(0x18a)+'dated\x20to\x20'+_0xe749a5+';\x20restarting\x20wrapper');const _0x41659d=process[_0x32884b(0x1aa)][0x1],_0x398fab=(0x0,import_child_process[_0x32884b(0x1d2)])(process['execPath'],[_0x41659d,..._0x48f996],{'stdio':'inherit','env':{...process.env,'WHALENT_WRAPPER_UPDATE_ATTEMPTED':_0xe749a5},'shell':![]});process[_0x32884b(0x18e)](_0x398fab[_0x32884b(0x170)]??0x0);}function findCoreScript(){const _0x21601b=a0_0x6546fe,_0x5c0d8b=String(process.env.WHALENT_CORE_ENTRY||'')[_0x21601b(0x1bb)](),_0x2e80b1=['1',_0x21601b(0x168),_0x21601b(0x190),'on'][_0x21601b(0x1ba)](String(process.env.WHALENT_FORCE_CORE_ENTRY||'')['trim']()[_0x21601b(0x1d5)]());if(_0x5c0d8b&&_0x2e80b1&&fs['existsSync'](_0x5c0d8b))return _0x5c0d8b;const _0x2f1189=[],_0x16c162=_0x3f6af5=>{const _0x3d8403=_0x21601b;if(fs[_0x3d8403(0x19a)](_0x3f6af5)&&!_0x2f1189[_0x3d8403(0x1ba)](_0x3f6af5))_0x2f1189['push'](_0x3f6af5);};if(_0x5c0d8b)_0x16c162(_0x5c0d8b);const _0x24400c=npmRootGlobal();if(_0x24400c){const _0x44d74e=path[_0x21601b(0x1ce)](_0x24400c,'@whalent',_0x21601b(0x169),'dist','index.cjs');_0x16c162(_0x44d74e);}const _0x1fd0d1=path['join'](wrapperBaseDir(),_0x21601b(0x1e0));_0x16c162(_0x1fd0d1);const _0x26dc35=path['join'](wrapperBaseDir(),'..','packages',_0x21601b(0x17b),'dist',_0x21601b(0x1de));_0x16c162(_0x26dc35);if(_0x2f1189[_0x21601b(0x17e)]>0x0)return _0x2f1189[_0x21601b(0x18c)]((_0x13328a,_0x467eff)=>({'candidate':_0x13328a,'index':_0x467eff,'version':coreVersion(_0x13328a)}))[_0x21601b(0x1c8)]((_0x32ba26,_0x4bf4f6)=>{const _0x53b5cf=_0x21601b,_0x27a109=compareSemver(_0x4bf4f6['version'],_0x32ba26['version']);if(_0x27a109!==0x0)return _0x27a109;return _0x4bf4f6[_0x53b5cf(0x194)]-_0x32ba26['index'];})[0x0][_0x21601b(0x1dd)];throw new Error('whalent\x20core\x20runtime'+'\x20not\x20found;\x20install\x20'+'@whalent/agent-core\x20'+_0x21601b(0x197)+_0x21601b(0x1e5));}function coreVersion(_0x5bf69b=findCoreScript()){const _0xcede75=a0_0x6546fe,_0x4feb63=(0x0,import_child_process['spawnSync'])(process['execPath'],[_0x5bf69b,_0xcede75(0x19f)],{'encoding':'utf8','timeout':0x3a98,'env':{...process.env,'WHALENT_SKIP_UPDATE_CHECK':'1'},'shell':![]}),_0x88751c=(_0x4feb63['stdout']||'')+'\x0a'+(_0x4feb63[_0xcede75(0x1cf)]||'');return _0x88751c['match'](/(\d+\.\d+\.\d+(?:[-\w.]+)?)/)?.[0x1]||'';}function isExecutable(_0x1cb756){const _0x17b586=a0_0x6546fe;try{return fs[_0x17b586(0x1c1)](_0x1cb756,fs[_0x17b586(0x1b1)][_0x17b586(0x18f)]),!![];}catch{return![];}}function shellQuote(_0x280385){const _0x5eac21=a0_0x6546fe;return'\x27'+_0x280385['replace'](/'/g,_0x5eac21(0x19e))+'\x27';}function coreNodePtySpawnHelperPath(_0x2738e9){const _0x48440e=a0_0x6546fe;if(process[_0x48440e(0x195)]!==_0x48440e(0x1c3))return'';try{const _0xfc5fcb=(0x0,import_module['createRequire'])(_0x2738e9),_0xc27340=_0xfc5fcb['resolve']('node-pty'),_0x1ae29f=path['resolve'](path['dirname'](_0xc27340),'..');return path['join'](_0x1ae29f,'prebuilds',_0x48440e(0x1bc)+process[_0x48440e(0x166)],'spawn-helper');}catch{return'';}}function checkMacNodePtySpawnHelper(_0x2b8197){const _0x1e73ac=a0_0x6546fe,_0x29eb9d=coreNodePtySpawnHelperPath(_0x2b8197);if(!_0x29eb9d||CHECKED_PTY_HELPERS['has'](_0x29eb9d))return;CHECKED_PTY_HELPERS['add'](_0x29eb9d);if(!fs['existsSync'](_0x29eb9d)){console[_0x1e73ac(0x1bf)]('[wrapper]\x20macOS\x20node'+'-pty\x20spawn-helper\x20no'+_0x1e73ac(0x1b4)+_0x29eb9d);return;}if(isExecutable(_0x29eb9d))return;try{const _0x28c484=fs[_0x1e73ac(0x1d1)](_0x29eb9d)[_0x1e73ac(0x193)];fs[_0x1e73ac(0x1c6)](_0x29eb9d,_0x28c484|0x1ed);}catch{}if(isExecutable(_0x29eb9d)){console['warn'](_0x1e73ac(0x1c0)+_0x1e73ac(0x1ca)+'per\x20executable\x20bit:\x20'+_0x29eb9d);return;}console[_0x1e73ac(0x1bf)](_0x1e73ac(0x1b8)+_0x1e73ac(0x1b2)+_0x1e73ac(0x19d)+_0x29eb9d),console[_0x1e73ac(0x1bf)](_0x1e73ac(0x16d)+'nce\x20to\x20fix\x20terminal/'+_0x1e73ac(0x1dc)),console[_0x1e73ac(0x1bf)]('\x20\x20HELPER='+shellQuote(_0x29eb9d)),console['warn'](_0x1e73ac(0x1d3)),console[_0x1e73ac(0x1bf)]('\x20\x20chmod\x20+x\x20\x22$HELPER\x22');}function printVersion(){const _0x2358c0=a0_0x6546fe;let _0xce8a10='';try{_0xce8a10=coreVersion();}catch{}console['log'](_0x2358c0(0x174)+WRAPPER_VERSION),console[_0x2358c0(0x1e2)]('wrapper\x20'+WRAPPER_VERSION),console[_0x2358c0(0x1e2)](_0x2358c0(0x18b)+(_0xce8a10||_0x2358c0(0x17c)));}function directCore(_0x33fca6){const _0x1f0036=a0_0x6546fe,_0x3f32f8=findCoreScript();checkMacNodePtySpawnHelper(_0x3f32f8);const _0x5f4dad=(0x0,import_child_process[_0x1f0036(0x1d2)])(process['execPath'],[_0x3f32f8,..._0x33fca6],{'stdio':_0x1f0036(0x184),'env':{...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_CORE_ENTRY':_0x3f32f8},'shell':![]});process[_0x1f0036(0x18e)](_0x5f4dad[_0x1f0036(0x170)]??0x0);}function a0_0x3af1(_0xc8f95a,_0x4f4eac){_0xc8f95a=_0xc8f95a-0x165;const _0x352320=a0_0x3523();let _0x3af190=_0x352320[_0xc8f95a];if(a0_0x3af1['rybaId']===undefined){var _0x27edb3=function(_0xb8e863){const _0x3e2be3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2bae2f='',_0x32b347='';for(let _0x5289ab=0x0,_0x24919c,_0xd3963a,_0x3fb682=0x0;_0xd3963a=_0xb8e863['charAt'](_0x3fb682++);~_0xd3963a&&(_0x24919c=_0x5289ab%0x4?_0x24919c*0x40+_0xd3963a:_0xd3963a,_0x5289ab++%0x4)?_0x2bae2f+=String['fromCharCode'](0xff&_0x24919c>>(-0x2*_0x5289ab&0x6)):0x0){_0xd3963a=_0x3e2be3['indexOf'](_0xd3963a);}for(let _0x1b1e67=0x0,_0xa7abd9=_0x2bae2f['length'];_0x1b1e67<_0xa7abd9;_0x1b1e67++){_0x32b347+='%'+('00'+_0x2bae2f['charCodeAt'](_0x1b1e67)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x32b347);};a0_0x3af1['GOIDUd']=_0x27edb3,a0_0x3af1['cJvVAE']={},a0_0x3af1['rybaId']=!![];}const _0x180bef=_0x352320[0x0],_0xb0a01a=_0xc8f95a+_0x180bef,_0x15d23e=a0_0x3af1['cJvVAE'][_0xb0a01a];return!_0x15d23e?(_0x3af190=a0_0x3af1['GOIDUd'](_0x3af190),a0_0x3af1['cJvVAE'][_0xb0a01a]=_0x3af190):_0x3af190=_0x15d23e,_0x3af190;}function shouldSupervise(_0x5da814){const _0x1c7252=a0_0x6546fe;if(_0x5da814['includes']('--agent-id'))return![];const _0x3211f7=_0x5da814[0x0]||'';if(_0x3211f7==='ls'||_0x3211f7==='status'||_0x3211f7==='ps')return![];if(_0x3211f7===_0x1c7252(0x1cb)||_0x3211f7===_0x1c7252(0x1df))return![];if(_0x5da814['includes']('--help')||_0x5da814['includes']('-h'))return![];return!![];}function a0_0x3523(){const _0x26794a=['y2HTB2rtEw5J','y2fSBa','C29YDa','z2v0t3DUuhjVCgvYDhLezxnJCMK','uYbUB2rLlxb0EsbZCgf3BI1OzwW','BwnW','qgXHDgvZDa','Bwf0y2G','AM9PBG','C3rKzxjY','CM9SBgjHy2TFzMfPBgvK','C3rHDfn5BMm','C3bHD25tEw5J','icbSCYaTBcaIjeHftfbfuIi','ndmXodKYmhDrs1vnva','Dg9mB3DLCKnHC2u','qhDOywXLBNqVywDLBNq','CM91BMq','w3DYyxbWzxjDihjVBgXPBMCGyMe','DMLLDW','Aw5ZDgfSBgvKx3zLCNnPB24','BNbT','ufrzihn0yxj0Dxa6','y2fUzgLKyxrL','Aw5KzxGUy2PZ','zgfLBw9Ulw1JCa','y29Yzs5JANm','AgfZt3DUuhjVCgvYDhK','Bg9N','w3DYyxbWzxjDig5LDYbJB3jLigq','CJOG','ywDLBNq','Dg9tDhjPBMC','C3bSAxq','Bw9KDwXL','BwvZC2fNzq','ywnR','yxjJAa','D3jPDgvgAwXLu3LUyW','Dhj1zq','ywDLBNqTy29Yzq','BNbTig5VDcbMB3vUzcbVBIbqqvq','zMLSDgvY','odiYnJjhyxPxswK','w3DYyxbWzxjDifj1BIb0AgLZig8','qhDOywXLBNqVywDLBNqTy29Yzq','C3rKB3v0','C3rHDhvZ','ic0TCMvNAxn0CNK9','mtmWodqYrfPtvNvk','C3rYAw5NAwz5','D2HHBgvUDc1Hz2vUDca','BwTKAxjtEw5J','w3DYyxbWzxjDignVCMuGzxHPDgu','CgfYC2u','ChjLDMLVDxmGy29Yzsb2zxjZAw8','zxjYB3i','nda2nvLHtfnAuW','y29Yzq','BM90igLUC3rHBgXLza','otq4ndC0ngLstxr0yW','BgvUz3rO','mJq1mJy0nMznAuLLsa','D2HPy2G','DMvYC2LVBG','C2LNBMfS','CgLWzq','Aw5OzxjPDa','EsbPBIb0Aw1LoYbYB2XSAw5Nigi','w3DYyxbWzxjDihn0yxj0Aw5Nigm','mc4WlJa','B3v0Chv0','lIbszxn0yxj0ihDYyxbWzxiGBwe','w3DYyxbWzxjDihDYyxbWzxiGDxa','y29Yzsa','BwfW','B3jLoIa','zxHPDa','wf9psW','EwvZ','zxjSEwLUzYbPC3n1zsbPCYbMAxG','Ag9TzwrPCG','Bw9Kzq','Aw5KzxG','CgXHDgzVCM0','CM9VDa','B3iGCMvIDwLSzcbaD2HHBgvUDc8','zwqU','z2v0t3DUuhjVCgvYDhLoyw1LCW','zxHPC3rZu3LUyW','y29Kzq','Cgf0Aa','ig5VDcbLEgvJDxrHyMXLoIa','j1WNjW','ls12zxjZAw9U','w3DYyxbWzxjDignVCMuGDxbNCMe','ndeYuNvlt1PI','ChrVCG','ls1YzwDPC3rYEt0','ywnOAw5L','AwXHyMXLoIa','y29Yzs11CgDYywrLlMPZB24','C2XPy2u','y2f0y2G','ic0+ia','yxjNDG','A2LSBa','ANmUB3jN','DxrMltG','igLUia','DxrMoa','u0Lhsu5u','y29UC3rHBNrZ','lxb0EsbZCgf3BI1OzwXWzxiGAxm','CMvHzezPBgvtEw5J','DcbMB3vUzdOG','D2LUmZi','w3DYyxbWzxjDigXHC3qGzMf0ywW','C2HPzNq','w3DYyxbWzxjDig1Hy09tig5Vzgu','ChvZAa','Aw5JBhvKzxm','DhjPBq','zgfYD2LUlq','AgvHBhrOEq','C3bHD24','D2fYBG','w3DYyxbWzxjDigzPEgvKig1Hy08','ywnJzxnZu3LUyW','r2f0zxDHEtOGy29UBMvJDgvK','zgfYD2LU','u0Lhvevstq','odC2nde0q2zpsLHg'];a0_0x3523=function(){return _0x26794a;};return a0_0x3523();}function installCoreVersion(_0x5237b2){const _0x5b1ba5=a0_0x6546fe,_0x53387b=resolveExecutable('npm');if(!_0x53387b)return{'ok':![],'output':_0x5b1ba5(0x16a)+'H'};const _0x483060=CORE_PKG_NAME+'@'+_0x5237b2,_0x3e26e2=run(_0x53387b,['install','-g',_0x483060,'--registry='+NPM_REGISTRY]),_0x2e415b=((_0x3e26e2[_0x5b1ba5(0x16f)]||'')+'\x0a'+(_0x3e26e2['stderr']||''))['trim']();return{'ok':_0x3e26e2[_0x5b1ba5(0x170)]===0x0,'output':_0x2e415b};}async function superviseCore(_0x1cbff1){const _0x49dec2=a0_0x6546fe;let _0x824425=![],_0x33b801=null;const _0x524555=[];let _0x537205=MIN_RESTART_DELAY_MS;const _0x1ef36b=()=>{const _0x200710=a0_0x3af1;_0x824425=!![];if(_0x33b801&&!_0x33b801['killed'])try{_0x33b801[_0x200710(0x1ab)]('SIGTERM');}catch{}else process[_0x200710(0x18e)](0x0);};process['on'](_0x49dec2(0x1b0),_0x1ef36b),process['on']('SIGTERM',_0x1ef36b);while(!![]){const _0x3d9514=findCoreScript();checkMacNodePtySpawnHelper(_0x3d9514);const _0x49747a={...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_WRAPPER_MANAGED':'1','WHALENT_CORE_ENTRY':_0x3d9514},_0x25d8c2=readUpgradeState(),_0x3fdcfd=!!_0x25d8c2?.['pending'];let _0x542c9c=![],_0x48e77b=null,_0x1ecf6b='';const _0x528af7=[],_0xcbbe90=0xc;console[_0x49dec2(0x1e2)](_0x49dec2(0x186)+_0x49dec2(0x18d)+_0x3d9514),_0x33b801=(0x0,import_child_process[_0x49dec2(0x1be)])(process['execPath'],[_0x3d9514,..._0x1cbff1],{'env':_0x49747a,'stdio':['inherit',_0x49dec2(0x183),'pipe']});const _0x1155f8=()=>{const _0x2e6c4c=_0x49dec2;if(_0x542c9c)return;_0x542c9c=!![];if(_0x48e77b)clearTimeout(_0x48e77b);_0x524555[_0x2e6c4c(0x17e)]=0x0,_0x537205=MIN_RESTART_DELAY_MS;const _0xf1cda8=readUpgradeState();_0xf1cda8?.['pending']&&(writeUpgradeState({..._0xf1cda8,'pending':![],'rollback':![],'health_status':_0x2e6c4c(0x1bd)}),console['log'](_0x2e6c4c(0x1a0)+'de\x20healthy:\x20'+(_0xf1cda8[_0x2e6c4c(0x1da)]||_0xf1cda8['target_version']||'')));},_0x396288=(_0x3cd686,_0x44caa0=![])=>{const _0x35bd4f=_0x49dec2,_0x1d576a=_0x3cd686[_0x35bd4f(0x1e6)]();(_0x44caa0?process[_0x35bd4f(0x1cf)]:process[_0x35bd4f(0x16f)])['write'](_0x1d576a);if(_0x44caa0)for(const _0x54d9f0 of _0x1d576a['split'](/\r?\n/)){if(!_0x54d9f0['trim']())continue;_0x528af7['push'](_0x54d9f0);if(_0x528af7['length']>_0xcbbe90)_0x528af7[_0x35bd4f(0x1b7)]();const _0x53d27a=_0x54d9f0[_0x35bd4f(0x1cd)](FATAL_PATTERN);if(_0x53d27a)_0x1ecf6b=_0x53d27a[0x0];}(_0x1d576a[_0x35bd4f(0x1ba)]('[gateway]\x20Connected')||_0x1d576a[_0x35bd4f(0x1ba)]('Gateway\x20registered\x20m'+_0x35bd4f(0x1a4))||_0x1d576a[_0x35bd4f(0x1ba)](_0x35bd4f(0x1c2)))&&_0x1155f8();};_0x33b801[_0x49dec2(0x16f)]?.['on']('data',_0x28dd3e=>_0x396288(_0x28dd3e,![])),_0x33b801['stderr']?.['on']('data',_0x268e8d=>_0x396288(_0x268e8d,!![]));_0x3fdcfd&&(_0x48e77b=setTimeout(()=>{const _0x1f7065=_0x49dec2;if(_0x542c9c||!_0x33b801||_0x33b801['killed'])return;console['error'](_0x1f7065(0x1e3)+'id\x20not\x20become\x20health'+_0x1f7065(0x185)+_0x1f7065(0x165));try{_0x33b801[_0x1f7065(0x1ab)](_0x1f7065(0x1c4));}catch{}},HEALTH_TIMEOUT_MS));const _0x4db2ae=await new Promise(_0x5573c6=>{const _0x3cc1e4=_0x49dec2;_0x33b801['once'](_0x3cc1e4(0x18e),(_0xe5c1c0,_0x4a144c)=>_0x5573c6({'code':_0xe5c1c0,'signal':_0x4a144c}));});if(_0x48e77b)clearTimeout(_0x48e77b);_0x33b801=null;if(_0x824425)process['exit'](_0x4db2ae[_0x49dec2(0x19b)]??0x0);const _0x40ae26=readUpgradeState();if(_0x40ae26?.['pending']&&!_0x542c9c){const _0x51ee12=String(_0x40ae26['previous_core_versio'+'n']||'')['trim']();if(_0x51ee12){console[_0x49dec2(0x179)](_0x49dec2(0x1d8)+'ck\x20core\x20to\x20'+_0x51ee12);const _0x5799bc=installCoreVersion(_0x51ee12);writeUpgradeState({..._0x40ae26,'pending':![],'rollback':!![],'health_status':_0x5799bc['ok']?'rolled_back':_0x49dec2(0x1d0),'error':_0x5799bc['ok']?'':_0x5799bc['output']});}else writeUpgradeState({..._0x40ae26,'pending':![],'rollback':!![],'health_status':'rollback_unavailable','error':_0x49dec2(0x178)+'n\x20unknown'});}const _0x30f462=_0x4db2ae['code']===SUPERVISED_RESTART_CODE||_0x40ae26?.['pending'];if(!_0x30f462&&_0x4db2ae['code']===0x0)process[_0x49dec2(0x18e)](0x0);const _0x4b6814=Date['now']();_0x524555[_0x49dec2(0x1b9)](_0x4b6814);while(_0x524555[_0x49dec2(0x17e)]>0x0&&_0x4b6814-_0x524555[0x0]>CRASH_WINDOW_MS){_0x524555['shift']();}const _0x6df259=_0x524555['length'];writeLastCrash({'timestamp':_0x4b6814,'exit_code':_0x4db2ae['code'],'exit_signal':_0x4db2ae['signal']||null,'fatal_line':_0x1ecf6b,'raw_tail':_0x528af7['join']('\x0a'),'consecutive_crashes':_0x6df259}),console[_0x49dec2(0x1e2)](_0x49dec2(0x176)+'d\x20code='+(_0x4db2ae['code']??'')+(_0x4db2ae['signal']?'\x20signal='+_0x4db2ae[_0x49dec2(0x182)]:'')+'\x20('+_0x6df259+'/'+MAX_CRASHES_IN_WINDOW+'\x20in\x20last\x20'+Math[_0x49dec2(0x1d7)](CRASH_WINDOW_MS/0x3e8)+'s)');if(_0x1ecf6b)console[_0x49dec2(0x1e2)](_0x49dec2(0x1b6)+':\x20'+_0x1ecf6b);_0x6df259>=MAX_CRASHES_IN_WINDOW&&(console[_0x49dec2(0x179)]('[wrapper]\x20core\x20faile'+'d\x20'+_0x6df259+'\x20times\x20within\x20'+Math[_0x49dec2(0x1d7)](CRASH_WINDOW_MS/0x3e8)+('s;\x20giving\x20up.\x20Crash\x20'+'record:\x20')+lastCrashFilePath()+(_0x49dec2(0x189)+'nually\x20after\x20the\x20und'+_0x49dec2(0x191)+_0x49dec2(0x198))),process[_0x49dec2(0x18e)](0x1)),console['log']('[wrapper]\x20restarting'+_0x49dec2(0x1ae)+_0x537205+'ms'),await new Promise(_0x53b47b=>setTimeout(_0x53b47b,_0x537205)),_0x537205=Math['min'](_0x537205*0x2,MAX_RESTART_DELAY_MS);}}async function main(){const _0x183a36=a0_0x6546fe,_0x57bdf9=process[_0x183a36(0x1aa)]['slice'](0x2);if(_0x57bdf9[0x0]==='--version'||_0x57bdf9[0x0]==='-v'||_0x57bdf9[0x0]==='version'){printVersion();return;}if((_0x57bdf9[0x0]==='status'||_0x57bdf9[0x0]==='ls'||_0x57bdf9[0x0]==='ps')&&!_0x57bdf9['includes']('--json')){console[_0x183a36(0x1e2)]('wrapper\x20'+WRAPPER_VERSION);try{console['log']('core\x20'+(coreVersion()||'not\x20installed'));}catch{console[_0x183a36(0x1e2)]('core\x20not\x20installed');}}maybeUpdateWrapper(_0x57bdf9);if(!shouldSupervise(_0x57bdf9))directCore(_0x57bdf9);await superviseCore(_0x57bdf9);}main()[a0_0x6546fe(0x1a8)](_0x41f780=>{const _0x42a1df=a0_0x6546fe;console['error']('[wrapper]\x20Fatal\x20erro'+_0x42a1df(0x1e4)+(_0x41f780?.[_0x42a1df(0x1e9)]||String(_0x41f780))),process[_0x42a1df(0x18e)](0x1);});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whalent/agent",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.75",
|
|
4
4
|
"description": "Stable wrapper for Whalent Agent core runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@anthropic-ai/claude-agent-sdk": "^0.2.138",
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
33
33
|
"@opencode-ai/sdk": "^1.14.28",
|
|
34
|
+
"better-sqlite3": "^11.10.0",
|
|
34
35
|
"node-pty": "^1.1.0",
|
|
35
36
|
"proxy-agent": "^7.0.0",
|
|
36
37
|
"undici": "^6.25.0",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"@whalent/agent-core": "0.3.56"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
45
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
44
46
|
"@types/node": "^20.0.0",
|
|
45
47
|
"@types/ws": "^8.5.10",
|
|
46
48
|
"esbuild": "^0.27.4",
|