@whalent/agent 0.3.70 → 0.3.71

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/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const a0_0x1906bb=a0_0x843a;(function(_0x13e196,_0xeed023){const _0xce9557=a0_0x843a,_0x5c4501=_0x13e196();while(!![]){try{const _0x590426=-parseInt(_0xce9557(0x121))/0x1+parseInt(_0xce9557(0x176))/0x2+parseInt(_0xce9557(0x137))/0x3+-parseInt(_0xce9557(0x183))/0x4+-parseInt(_0xce9557(0x151))/0x5*(-parseInt(_0xce9557(0x1a6))/0x6)+-parseInt(_0xce9557(0x189))/0x7+-parseInt(_0xce9557(0x179))/0x8*(-parseInt(_0xce9557(0x18d))/0x9);if(_0x590426===_0xeed023)break;else _0x5c4501['push'](_0x5c4501['shift']());}catch(_0x3fba7e){_0x5c4501['push'](_0x5c4501['shift']());}}}(a0_0xafaa,0x6c86a));var __create=Object['create'],__defProp=Object[a0_0x1906bb(0x199)],__getOwnPropDesc=Object[a0_0x1906bb(0x134)+a0_0x1906bb(0x1a5)],__getOwnPropNames=Object['getOwnPropertyNames'],__getProtoOf=Object[a0_0x1906bb(0x1ac)],__hasOwnProp=Object['prototype'][a0_0x1906bb(0x17d)],__copyProps=(_0x7c0d0d,_0x162a50,_0x3f3563,_0x655097)=>{const _0x268ae3=a0_0x1906bb;if(_0x162a50&&typeof _0x162a50===_0x268ae3(0x16c)||typeof _0x162a50==='function'){for(let _0x45e5d9 of __getOwnPropNames(_0x162a50))if(!__hasOwnProp['call'](_0x7c0d0d,_0x45e5d9)&&_0x45e5d9!==_0x3f3563)__defProp(_0x7c0d0d,_0x45e5d9,{'get':()=>_0x162a50[_0x45e5d9],'enumerable':!(_0x655097=__getOwnPropDesc(_0x162a50,_0x45e5d9))||_0x655097['enumerable']});}return _0x7c0d0d;},__toESM=(_0x744e54,_0x4e0ddf,_0x62ce19)=>(_0x62ce19=_0x744e54!=null?__create(__getProtoOf(_0x744e54)):{},__copyProps(_0x4e0ddf||!_0x744e54||!_0x744e54[a0_0x1906bb(0x152)]?__defProp(_0x62ce19,'default',{'value':_0x744e54,'enumerable':!![]}):_0x62ce19,_0x744e54)),import_child_process=require(a0_0x1906bb(0x19d)),fs=__toESM(require('fs'),0x1),import_module=require(a0_0x1906bb(0x164)),os=__toESM(require('os'),0x1),path=__toESM(require(a0_0x1906bb(0x178)),0x1),WRAPPER_PKG_NAME=a0_0x1906bb(0x166),CORE_PKG_NAME='@whalent/agent-core',NPM_REGISTRY=a0_0x1906bb(0x1a7)+'js.org',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 _0x339581=a0_0x1906bb;return path['join'](os['homedir'](),_0x339581(0x160));}function upgradeStatePath(){const _0x3b5ab3=a0_0x1906bb;return path[_0x3b5ab3(0x1a3)](configDir(),'core-upgrade.json');}function lastCrashFilePath(){const _0x5e1a74=a0_0x1906bb;return path[_0x5e1a74(0x1a3)](configDir(),_0x5e1a74(0x135));}function writeLastCrash(_0x567caa){const _0x136593=a0_0x1906bb;try{fs[_0x136593(0x184)](configDir(),{'recursive':!![]});const _0x507e57={..._0x567caa,'reported':![]};fs[_0x136593(0x19a)](lastCrashFilePath(),JSON['stringify'](_0x507e57,null,0x2),'utf-8');}catch{}}function readWrapperVersion(){const _0x525f50=a0_0x1906bb;try{const _0x49f158=JSON[_0x525f50(0x18c)](fs[_0x525f50(0x161)](path[_0x525f50(0x1a3)](wrapperBaseDir(),'..',_0x525f50(0x181)),_0x525f50(0x129)));return String(_0x49f158[_0x525f50(0x182)]||'0.0.0');}catch{return'0.0.0';}}function readUpgradeState(){const _0x2306d3=a0_0x1906bb;try{return JSON[_0x2306d3(0x18c)](fs[_0x2306d3(0x161)](upgradeStatePath(),_0x2306d3(0x129)));}catch{return null;}}function writeUpgradeState(_0x40e7a7){const _0x2974bb=a0_0x1906bb;try{fs[_0x2974bb(0x184)](configDir(),{'recursive':!![]}),fs[_0x2974bb(0x19a)](upgradeStatePath(),JSON[_0x2974bb(0x14b)]({..._0x40e7a7,'updated_at':Date[_0x2974bb(0x156)]()},null,0x2),'utf-8');}catch{}}function run(_0x287c8a,_0x20673b,_0x51d4fe=process.env){const _0x18aab4=a0_0x1906bb;return(0x0,import_child_process[_0x18aab4(0x169)])(_0x287c8a,_0x20673b,{'encoding':'utf8','timeout':NPM_INSTALL_TIMEOUT_MS,'maxBuffer':NPM_INSTALL_MAX_BUFFER,'env':_0x51d4fe,'shell':![]});}function runNpmView(_0x793a26){const _0x49453b=a0_0x1906bb,_0x4aeceb=resolveExecutable('npm');if(!_0x4aeceb)return{'status':0x7f,'stdout':'','stderr':'npm\x20not\x20found','error':new Error(_0x49453b(0x16d))};return(0x0,import_child_process[_0x49453b(0x169)])(_0x4aeceb,_0x793a26,{'encoding':'utf8','timeout':NPM_VIEW_TIMEOUT_MS,'maxBuffer':0x400*0x400,'env':process.env,'shell':![]});}function npmRootGlobal(){const _0x40216e=a0_0x1906bb,_0x376120=resolveExecutable('npm');if(!_0x376120)return'';const _0x1af8cb=run(_0x376120,['root','-g']);if(_0x1af8cb['status']!==0x0)return'';return String(_0x1af8cb['stdout']||'')[_0x40216e(0x173)]();}function compareSemver(_0xae948d,_0x660e89){const _0x39fec9=a0_0x1906bb,_0x781c9b=String(_0xae948d||'')['replace'](/^v/,'')[_0x39fec9(0x1aa)](/[.-]/)['map'](_0x4e71fb=>Number['parseInt'](_0x4e71fb,0xa)||0x0),_0x496395=String(_0x660e89||'')['replace'](/^v/,'')['split'](/[.-]/)['map'](_0x4fc671=>Number[_0x39fec9(0x162)](_0x4fc671,0xa)||0x0);for(let _0x286af1=0x0;_0x286af1<Math[_0x39fec9(0x123)](_0x781c9b[_0x39fec9(0x128)],_0x496395[_0x39fec9(0x128)],0x3);_0x286af1++){const _0x18ed4c=_0x781c9b[_0x286af1]||0x0,_0x4978d0=_0x496395[_0x286af1]||0x0;if(_0x18ed4c>_0x4978d0)return 0x1;if(_0x18ed4c<_0x4978d0)return-0x1;}return 0x0;}function resolveExecutable(_0x5d44b7){const _0x3531e5=a0_0x1906bb,_0x435ec1=process['platform']===_0x3531e5(0x142)?'where.exe':'which';try{const _0x25902c=(0x0,import_child_process['spawnSync'])(_0x435ec1,[_0x5d44b7],{'encoding':'utf8','timeout':0xbb8,'shell':![]});if(_0x25902c[_0x3531e5(0x188)]!==0x0)return'';return String(_0x25902c['stdout']||'')['split'](/\r?\n/)[_0x3531e5(0x195)](_0x22e324=>_0x22e324['trim']())[_0x3531e5(0x1a8)](Boolean)[0x0]||'';}catch{return'';}}function skipWrapperUpdateCheck(){const _0x3db588=a0_0x1906bb,_0x3b0402=String(process.env.WHALENT_SKIP_UPDATE_CHECK||process.env.WHALENT_NO_UPDATE_CHECK||process.env.WHALENT_SKIP_WRAPPER_UPDATE||'')[_0x3db588(0x173)]()['toLowerCase']();return _0x3b0402==='1'||_0x3b0402==='true'||_0x3b0402==='yes'||_0x3b0402==='on';}function latestWrapperVersion(){const _0x4ff5ab=a0_0x1906bb,_0x326b1d=runNpmView([_0x4ff5ab(0x12f),WRAPPER_PKG_NAME+_0x4ff5ab(0x12e),_0x4ff5ab(0x182),_0x4ff5ab(0x194)+NPM_REGISTRY]);if(_0x326b1d[_0x4ff5ab(0x188)]!==0x0)return'';return String(_0x326b1d[_0x4ff5ab(0x13c)]||'')[_0x4ff5ab(0x173)]()['split'](/\r?\n/)[_0x4ff5ab(0x1a8)](Boolean)['pop']()||'';}function installWrapperVersion(_0x30ade7){const _0xc5ae56=a0_0x1906bb,_0x41664c=resolveExecutable(_0xc5ae56(0x157));if(!_0x41664c)return{'ok':![],'output':_0xc5ae56(0x167)+'H'};const _0x5d4bf3=run(_0x41664c,['install','-g',WRAPPER_PKG_NAME+'@'+_0x30ade7,'--registry='+NPM_REGISTRY]),_0x586ed4=((_0x5d4bf3[_0xc5ae56(0x13c)]||'')+'\x0a'+(_0x5d4bf3['stderr']||''))[_0xc5ae56(0x173)]();return{'ok':_0x5d4bf3['status']===0x0,'output':_0x586ed4};}function maybeUpdateWrapper(_0x3e2926){const _0x459d5d=a0_0x1906bb;if(skipWrapperUpdateCheck())return![];if(process.env.WHALENT_WRAPPER_UPDATE_ATTEMPTED)return![];const _0x3f3fe5=latestWrapperVersion();if(!_0x3f3fe5||compareSemver(_0x3f3fe5,WRAPPER_VERSION)<=0x0)return![];console[_0x459d5d(0x133)](_0x459d5d(0x138)+_0x459d5d(0x158)+WRAPPER_VERSION+_0x459d5d(0x185)+_0x3f3fe5),console['warn']('[wrapper]\x20installing'+'\x20'+WRAPPER_PKG_NAME+'@'+_0x3f3fe5+('\x20from\x20npm\x20before\x20sta'+'rting\x20core...'));const _0x19fbf6=installWrapperVersion(_0x3f3fe5);if(!_0x19fbf6['ok']){console['warn'](_0x459d5d(0x132)+_0x459d5d(0x17c)+'ing\x20with\x20'+WRAPPER_VERSION);if(_0x19fbf6[_0x459d5d(0x16e)])console[_0x459d5d(0x133)](_0x19fbf6['output'][_0x459d5d(0x1aa)](/\r?\n/)['slice'](-0xc)['join']('\x0a'));return console[_0x459d5d(0x133)]('[wrapper]\x20Manual\x20upd'+_0x459d5d(0x12b)+WRAPPER_PKG_NAME+'@'+_0x3f3fe5+_0x459d5d(0x1a2)+NPM_REGISTRY),![];}console['warn']('[wrapper]\x20wrapper\x20up'+'dated\x20to\x20'+_0x3f3fe5+_0x459d5d(0x122));const _0x19bf45=process[_0x459d5d(0x190)][0x1],_0x5bc3cb=(0x0,import_child_process['spawnSync'])(process['execPath'],[_0x19bf45,..._0x3e2926],{'stdio':'inherit','env':{...process.env,'WHALENT_WRAPPER_UPDATE_ATTEMPTED':_0x3f3fe5},'shell':![]});process['exit'](_0x5bc3cb[_0x459d5d(0x188)]??0x0);}function findCoreScript(){const _0x491263=a0_0x1906bb,_0x56ae83=String(process.env.WHALENT_CORE_ENTRY||'')['trim'](),_0x3d9710=['1',_0x491263(0x143),_0x491263(0x141),'on']['includes'](String(process.env.WHALENT_FORCE_CORE_ENTRY||'')[_0x491263(0x173)]()[_0x491263(0x154)]());if(_0x56ae83&&_0x3d9710&&fs['existsSync'](_0x56ae83))return _0x56ae83;const _0x189835=[],_0x1ae78a=_0x355c14=>{const _0x49cf60=_0x491263;if(fs[_0x49cf60(0x177)](_0x355c14)&&!_0x189835['includes'](_0x355c14))_0x189835[_0x49cf60(0x131)](_0x355c14);};if(_0x56ae83)_0x1ae78a(_0x56ae83);const _0x36104a=npmRootGlobal();if(_0x36104a){const _0x5252d7=path['join'](_0x36104a,_0x491263(0x19f),'agent-core',_0x491263(0x13f),'index.cjs');_0x1ae78a(_0x5252d7);}const _0x21f6ab=path['join'](wrapperBaseDir(),_0x491263(0x14e));_0x1ae78a(_0x21f6ab);const _0x264749=path['join'](wrapperBaseDir(),'..','packages',_0x491263(0x18e),_0x491263(0x13f),_0x491263(0x14d));_0x1ae78a(_0x264749);if(_0x189835['length']>0x0)return _0x189835['map']((_0x52e84a,_0xc450b)=>({'candidate':_0x52e84a,'index':_0xc450b,'version':coreVersion(_0x52e84a)}))[_0x491263(0x171)]((_0xbf7944,_0x2fddce)=>{const _0x1001db=_0x491263,_0x3c52fd=compareSemver(_0x2fddce['version'],_0xbf7944['version']);if(_0x3c52fd!==0x0)return _0x3c52fd;return _0x2fddce['index']-_0xbf7944[_0x1001db(0x146)];})[0x0]['candidate'];throw new Error('whalent\x20core\x20runtime'+_0x491263(0x130)+'@whalent/agent-core\x20'+_0x491263(0x193)+'agent');}function coreVersion(_0x33583d=findCoreScript()){const _0xc46f86=a0_0x1906bb,_0x3c0269=(0x0,import_child_process['spawnSync'])(process[_0xc46f86(0x13b)],[_0x33583d,_0xc46f86(0x12d)],{'encoding':_0xc46f86(0x16b),'timeout':0x3a98,'env':{...process.env,'WHALENT_SKIP_UPDATE_CHECK':'1'},'shell':![]}),_0x27b91c=(_0x3c0269['stdout']||'')+'\x0a'+(_0x3c0269[_0xc46f86(0x140)]||'');return _0x27b91c['match'](/(\d+\.\d+\.\d+(?:[-\w.]+)?)/)?.[0x1]||'';}function isExecutable(_0x20d45e){const _0x3463b5=a0_0x1906bb;try{return fs[_0x3463b5(0x19e)](_0x20d45e,fs['constants']['X_OK']),!![];}catch{return![];}}function shellQuote(_0x51e98c){const _0x2954ff=a0_0x1906bb;return'\x27'+_0x51e98c['replace'](/'/g,_0x2954ff(0x14c))+'\x27';}function coreNodePtySpawnHelperPath(_0x28d545){const _0x2d68b0=a0_0x1906bb;if(process[_0x2d68b0(0x186)]!==_0x2d68b0(0x125))return'';try{const _0xb05b21=(0x0,import_module['createRequire'])(_0x28d545),_0x35bd2e=_0xb05b21[_0x2d68b0(0x168)]('node-pty'),_0x4447b6=path['resolve'](path[_0x2d68b0(0x19b)](_0x35bd2e),'..');return path['join'](_0x4447b6,_0x2d68b0(0x196),'darwin-'+process['arch'],_0x2d68b0(0x192));}catch{return'';}}function checkMacNodePtySpawnHelper(_0x2a3515){const _0x42bdaf=a0_0x1906bb,_0xb710d0=coreNodePtySpawnHelperPath(_0x2a3515);if(!_0xb710d0||CHECKED_PTY_HELPERS[_0x42bdaf(0x127)](_0xb710d0))return;CHECKED_PTY_HELPERS['add'](_0xb710d0);if(!fs[_0x42bdaf(0x177)](_0xb710d0)){console[_0x42bdaf(0x133)](_0x42bdaf(0x15b)+_0x42bdaf(0x163)+_0x42bdaf(0x124)+_0xb710d0);return;}if(isExecutable(_0xb710d0))return;try{const _0x212f58=fs[_0x42bdaf(0x15e)](_0xb710d0)['mode'];fs[_0x42bdaf(0x12c)](_0xb710d0,_0x212f58|0x1ed);}catch{}if(isExecutable(_0xb710d0)){console['warn']('[wrapper]\x20fixed\x20macO'+'S\x20node-pty\x20spawn-hel'+'per\x20executable\x20bit:\x20'+_0xb710d0);return;}console['warn']('[wrapper]\x20macOS\x20node'+'-pty\x20spawn-helper\x20is'+_0x42bdaf(0x136)+_0xb710d0),console['warn'](_0x42bdaf(0x19c)+'nce\x20to\x20fix\x20terminal/'+'PTY\x20startup:'),console[_0x42bdaf(0x133)](_0x42bdaf(0x174)+shellQuote(_0xb710d0)),console['warn'](_0x42bdaf(0x15c)),console['warn'](_0x42bdaf(0x17e));}function printVersion(){const _0x1094bc=a0_0x1906bb;let _0x29c7e3='';try{_0x29c7e3=coreVersion();}catch{}console['log'](_0x1094bc(0x15a)+WRAPPER_VERSION),console['log']('wrapper\x20'+WRAPPER_VERSION),console[_0x1094bc(0x148)]('core\x20'+(_0x29c7e3||'not\x20installed'));}function directCore(_0x4d93f2){const _0x349ae9=a0_0x1906bb,_0x59f1c7=findCoreScript();checkMacNodePtySpawnHelper(_0x59f1c7);const _0x21e40c=(0x0,import_child_process[_0x349ae9(0x169)])(process[_0x349ae9(0x13b)],[_0x59f1c7,..._0x4d93f2],{'stdio':_0x349ae9(0x1ae),'env':{...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_CORE_ENTRY':_0x59f1c7},'shell':![]});process['exit'](_0x21e40c['status']??0x0);}function shouldSupervise(_0x4056a9){const _0x2eb0be=a0_0x1906bb;if(_0x4056a9['includes'](_0x2eb0be(0x126)))return![];const _0x569f88=_0x4056a9[0x0]||'';if(_0x569f88==='ls'||_0x569f88===_0x2eb0be(0x188)||_0x569f88==='ps')return![];if(_0x569f88==='mcp'||_0x569f88==='daemon-mcp')return![];if(_0x4056a9[_0x2eb0be(0x1ab)](_0x2eb0be(0x13d))||_0x4056a9['includes']('-h'))return![];return!![];}function installCoreVersion(_0x1ae068){const _0xaa50c5=a0_0x1906bb,_0x3b1520=resolveExecutable(_0xaa50c5(0x157));if(!_0x3b1520)return{'ok':![],'output':'npm\x20not\x20found\x20on\x20PAT'+'H'};const _0x3d2cba=CORE_PKG_NAME+'@'+_0x1ae068,_0x3ea386=run(_0x3b1520,['install','-g',_0x3d2cba,_0xaa50c5(0x194)+NPM_REGISTRY]),_0x3b0339=((_0x3ea386[_0xaa50c5(0x13c)]||'')+'\x0a'+(_0x3ea386[_0xaa50c5(0x140)]||''))['trim']();return{'ok':_0x3ea386[_0xaa50c5(0x188)]===0x0,'output':_0x3b0339};}async function superviseCore(_0x498f70){const _0x36b672=a0_0x1906bb;let _0x3ba9eb=![],_0x426777=null;const _0xd5ceb1=[];let _0x257e39=MIN_RESTART_DELAY_MS;const _0x1bd293=()=>{_0x3ba9eb=!![];if(_0x426777&&!_0x426777['killed'])try{_0x426777['kill']('SIGTERM');}catch{}else process['exit'](0x0);};process['on'](_0x36b672(0x15f),_0x1bd293),process['on'](_0x36b672(0x18f),_0x1bd293);while(!![]){const _0x5b6639=findCoreScript();checkMacNodePtySpawnHelper(_0x5b6639);const _0x271d93={...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_WRAPPER_MANAGED':'1','WHALENT_CORE_ENTRY':_0x5b6639},_0x28c8d4=readUpgradeState(),_0x35b557=!!_0x28c8d4?.['pending'];let _0x107a47=![],_0x34aa8a=null,_0x35349d='';const _0x278f9d=[],_0x1c092b=0xc;console['log']('[wrapper]\x20starting\x20c'+_0x36b672(0x144)+_0x5b6639),_0x426777=(0x0,import_child_process[_0x36b672(0x1a4)])(process['execPath'],[_0x5b6639,..._0x498f70],{'env':_0x271d93,'stdio':[_0x36b672(0x1ae),_0x36b672(0x15d),_0x36b672(0x15d)]});const _0x56dc76=()=>{const _0x48dc07=_0x36b672;if(_0x107a47)return;_0x107a47=!![];if(_0x34aa8a)clearTimeout(_0x34aa8a);_0xd5ceb1['length']=0x0,_0x257e39=MIN_RESTART_DELAY_MS;const _0x271b3d=readUpgradeState();_0x271b3d?.['pending']&&(writeUpgradeState({..._0x271b3d,'pending':![],'rollback':![],'health_status':_0x48dc07(0x17a)}),console['log']('[wrapper]\x20core\x20upgra'+'de\x20healthy:\x20'+(_0x271b3d['installed_version']||_0x271b3d[_0x48dc07(0x155)]||'')));},_0x40810b=(_0x29a8de,_0x3a7165=![])=>{const _0x461bd1=_0x36b672,_0x3fad5d=_0x29a8de[_0x461bd1(0x18b)]();(_0x3a7165?process[_0x461bd1(0x140)]:process['stdout'])[_0x461bd1(0x147)](_0x3fad5d);if(_0x3a7165)for(const _0x2f1943 of _0x3fad5d['split'](/\r?\n/)){if(!_0x2f1943[_0x461bd1(0x173)]())continue;_0x278f9d[_0x461bd1(0x131)](_0x2f1943);if(_0x278f9d['length']>_0x1c092b)_0x278f9d['shift']();const _0x175df1=_0x2f1943['match'](FATAL_PATTERN);if(_0x175df1)_0x35349d=_0x175df1[0x0];}(_0x3fad5d['includes']('[gateway]\x20Connected')||_0x3fad5d['includes']('Gateway\x20registered\x20m'+'achine')||_0x3fad5d['includes']('Gateway:\x20connected'))&&_0x56dc76();};_0x426777['stdout']?.['on'](_0x36b672(0x180),_0xaa10c3=>_0x40810b(_0xaa10c3,![])),_0x426777['stderr']?.['on']('data',_0x1d1c5d=>_0x40810b(_0x1d1c5d,!![]));_0x35b557&&(_0x34aa8a=setTimeout(()=>{const _0xdf2182=_0x36b672;if(_0x107a47||!_0x426777||_0x426777['killed'])return;console[_0xdf2182(0x165)]('[wrapper]\x20new\x20core\x20d'+_0xdf2182(0x13a)+_0xdf2182(0x17f)+_0xdf2182(0x14a));try{_0x426777[_0xdf2182(0x159)](_0xdf2182(0x18f));}catch{}},HEALTH_TIMEOUT_MS));const _0x40ddec=await new Promise(_0x5829a4=>{const _0x37bf74=_0x36b672;_0x426777[_0x37bf74(0x1a9)]('exit',(_0x210dea,_0x56f567)=>_0x5829a4({'code':_0x210dea,'signal':_0x56f567}));});if(_0x34aa8a)clearTimeout(_0x34aa8a);_0x426777=null;if(_0x3ba9eb)process[_0x36b672(0x16a)](_0x40ddec[_0x36b672(0x13e)]??0x0);const _0x4b3af5=readUpgradeState();if(_0x4b3af5?.[_0x36b672(0x175)]&&!_0x107a47){const _0x5a9b22=String(_0x4b3af5['previous_core_versio'+'n']||'')['trim']();if(_0x5a9b22){console[_0x36b672(0x165)](_0x36b672(0x17b)+_0x36b672(0x197)+_0x5a9b22);const _0x3072d=installCoreVersion(_0x5a9b22);writeUpgradeState({..._0x4b3af5,'pending':![],'rollback':!![],'health_status':_0x3072d['ok']?_0x36b672(0x1ad):_0x36b672(0x16f),'error':_0x3072d['ok']?'':_0x3072d[_0x36b672(0x16e)]});}else writeUpgradeState({..._0x4b3af5,'pending':![],'rollback':!![],'health_status':'rollback_unavailable','error':_0x36b672(0x198)+_0x36b672(0x187)});}const _0x51c96f=_0x40ddec[_0x36b672(0x13e)]===SUPERVISED_RESTART_CODE||_0x4b3af5?.[_0x36b672(0x175)];if(!_0x51c96f&&_0x40ddec[_0x36b672(0x13e)]===0x0)process[_0x36b672(0x16a)](0x0);const _0x52ac8b=Date['now']();_0xd5ceb1[_0x36b672(0x131)](_0x52ac8b);while(_0xd5ceb1[_0x36b672(0x128)]>0x0&&_0x52ac8b-_0xd5ceb1[0x0]>CRASH_WINDOW_MS){_0xd5ceb1['shift']();}const _0x14fd86=_0xd5ceb1[_0x36b672(0x128)];writeLastCrash({'timestamp':_0x52ac8b,'exit_code':_0x40ddec[_0x36b672(0x13e)],'exit_signal':_0x40ddec[_0x36b672(0x18a)]||null,'fatal_line':_0x35349d,'raw_tail':_0x278f9d[_0x36b672(0x1a3)]('\x0a'),'consecutive_crashes':_0x14fd86}),console[_0x36b672(0x148)](_0x36b672(0x1a1)+_0x36b672(0x172)+(_0x40ddec['code']??'')+(_0x40ddec['signal']?'\x20signal='+_0x40ddec[_0x36b672(0x18a)]:'')+'\x20('+_0x14fd86+'/'+MAX_CRASHES_IN_WINDOW+_0x36b672(0x14f)+Math[_0x36b672(0x153)](CRASH_WINDOW_MS/0x3e8)+'s)');if(_0x35349d)console['log'](_0x36b672(0x149)+':\x20'+_0x35349d);_0x14fd86>=MAX_CRASHES_IN_WINDOW&&(console['error']('[wrapper]\x20core\x20faile'+'d\x20'+_0x14fd86+_0x36b672(0x150)+Math[_0x36b672(0x153)](CRASH_WINDOW_MS/0x3e8)+('s;\x20giving\x20up.\x20Crash\x20'+'record:\x20')+lastCrashFilePath()+(_0x36b672(0x139)+_0x36b672(0x191)+_0x36b672(0x1a0)+_0x36b672(0x170))),process['exit'](0x1)),console[_0x36b672(0x148)]('[wrapper]\x20restarting'+_0x36b672(0x145)+_0x257e39+'ms'),await new Promise(_0x43014e=>setTimeout(_0x43014e,_0x257e39)),_0x257e39=Math['min'](_0x257e39*0x2,MAX_RESTART_DELAY_MS);}}async function main(){const _0x3afddc=a0_0x1906bb,_0x4af6b2=process[_0x3afddc(0x190)]['slice'](0x2);if(_0x4af6b2[0x0]==='--version'||_0x4af6b2[0x0]==='-v'||_0x4af6b2[0x0]==='version'){printVersion();return;}if((_0x4af6b2[0x0]==='status'||_0x4af6b2[0x0]==='ls'||_0x4af6b2[0x0]==='ps')&&!_0x4af6b2[_0x3afddc(0x1ab)]('--json')){console[_0x3afddc(0x148)]('wrapper\x20'+WRAPPER_VERSION);try{console['log']('core\x20'+(coreVersion()||'not\x20installed'));}catch{console['log']('core\x20not\x20installed');}}maybeUpdateWrapper(_0x4af6b2);if(!shouldSupervise(_0x4af6b2))directCore(_0x4af6b2);await superviseCore(_0x4af6b2);}function a0_0x843a(_0x21f879,_0x3080ce){_0x21f879=_0x21f879-0x121;const _0xafaaee=a0_0xafaa();let _0x843a7=_0xafaaee[_0x21f879];if(a0_0x843a['lOUgRL']===undefined){var _0x49e311=function(_0x41e195){const _0x459059='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7c0d0d='',_0x162a50='';for(let _0x3f3563=0x0,_0x655097,_0x45e5d9,_0x744e54=0x0;_0x45e5d9=_0x41e195['charAt'](_0x744e54++);~_0x45e5d9&&(_0x655097=_0x3f3563%0x4?_0x655097*0x40+_0x45e5d9:_0x45e5d9,_0x3f3563++%0x4)?_0x7c0d0d+=String['fromCharCode'](0xff&_0x655097>>(-0x2*_0x3f3563&0x6)):0x0){_0x45e5d9=_0x459059['indexOf'](_0x45e5d9);}for(let _0x4e0ddf=0x0,_0x62ce19=_0x7c0d0d['length'];_0x4e0ddf<_0x62ce19;_0x4e0ddf++){_0x162a50+='%'+('00'+_0x7c0d0d['charCodeAt'](_0x4e0ddf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x162a50);};a0_0x843a['dgApKJ']=_0x49e311,a0_0x843a['gSwQFu']={},a0_0x843a['lOUgRL']=!![];}const _0x595cbc=_0xafaaee[0x0],_0x1c3dd5=_0x21f879+_0x595cbc,_0x2b57c7=a0_0x843a['gSwQFu'][_0x1c3dd5];return!_0x2b57c7?(_0x843a7=a0_0x843a['dgApKJ'](_0x843a7),a0_0x843a['gSwQFu'][_0x1c3dd5]=_0x843a7):_0x843a7=_0x2b57c7,_0x843a7;}main()[a0_0x1906bb(0x12a)](_0xf1ba3e=>{const _0x15bdae=a0_0x1906bb;console[_0x15bdae(0x165)]('[wrapper]\x20Fatal\x20erro'+'r:\x20'+(_0xf1ba3e?.['message']||String(_0xf1ba3e))),process[_0x15bdae(0x16a)](0x1);});function a0_0xafaa(){const _0x1f595f=['zxHPC3rZu3LUyW','Cgf0Aa','ndm3nJHIshLIveO','AgvHBhrOEq','w3DYyxbWzxjDihjVBgXPBMCGyMe','zgf0zsbMywLSzwq7ignVBNrPBNu','AgfZt3DUuhjVCgvYDhK','icbJAg1VzcaREcaIjeHftfbfuIi','EsbPBIb0Aw1LoYbYB2XSAw5Nigi','zgf0yq','CgfJA2fNzs5QC29U','DMvYC2LVBG','mZuZmJi5nKHbuuT1Da','BwTKAxjtEw5J','ic0+ia','CgXHDgzVCM0','BIb1BMTUB3DU','C3rHDhvZ','ndGXnZaZnNLPsK52qq','C2LNBMfS','Dg9tDhjPBMC','CgfYC2u','mtKXn0LIAK1esW','y29Yzq','u0Lhvevstq','yxjNDG','BNvHBgX5igfMDgvYihrOzsb1BMq','C3bHD24TAgvSCgvY','B3iGCMvIDwLSzcbaD2HHBgvUDc8','ls1YzwDPC3rYEt0','BwfW','ChjLyNvPBgrZ','y2SGy29Yzsb0BYa','ChjLDMLVDxmGy29Yzsb2zxjZAw8','zgvMAw5LuhjVCgvYDhK','D3jPDgvgAwXLu3LUyW','zgLYBMfTzq','w3DYyxbWzxjDifj1BIb0AgLZig8','y2HPBgrFChjVy2vZCW','ywnJzxnZu3LUyW','qhDOywXLBNq','zxjSEwLUzYbPC3n1zsbPCYbMAxG','w3DYyxbWzxjDignVCMuGzxHPDgu','ic0TCMvNAxn0CNK9','AM9PBG','C3bHD24','ChrVCG','mtHMy1jXAuK','Ahr0Chm6lY9YzwDPC3rYEs5UCg0','zMLSDgvY','B25Jzq','C3bSAxq','Aw5JBhvKzxm','z2v0uhjVDg90ExbLt2y','CM9SBgvKx2jHy2S','Aw5OzxjPDa','ntmWotKXC3jRD0HZ','oYbYzxn0yxj0Aw5NihDYyxbWzxi','Bwf4','DcbMB3vUzdOG','zgfYD2LU','ls1Hz2vUDc1Pza','AgfZ','BgvUz3rO','DxrMltG','y2f0y2G','yxrLoIbUCg0GAw5ZDgfSBcaTzYa','y2HTB2rtEw5J','ls12zxjZAw9U','qgXHDgvZDa','DMLLDW','ig5VDcbMB3vUzdSGAw5ZDgfSBca','ChvZAa','w3DYyxbWzxjDihDYyxbWzxiGDxa','D2fYBG','z2v0t3DUuhjVCgvYDhLezxnJCMK','BgfZDc1JCMfZAc5QC29U','ig5VDcbLEgvJDxrHyMXLoIa','mti3ntC0n0feBu55rG','w3DYyxbWzxjDihvWzgf0zsbHDMe','lIbszxn0yxj0ihDYyxbWzxiGBwe','AwqGBM90igjLy29TzsbOzwfSDgG','zxHLy1bHDgG','C3rKB3v0','ls1OzwXW','y29Kzq','zgLZDa','C3rKzxjY','EwvZ','D2LUmZi','Dhj1zq','B3jLoIa','igLUia','Aw5KzxG','D3jPDgu','Bg9N','w3DYyxbWzxjDigXHC3qGzMf0ywW','ywnR','C3rYAw5NAwz5','j1WNjW','Aw5KzxGUy2PZ','y29Yzs5JANm','igLUigXHC3qG','ihrPBwvZihDPDgHPBIa','otyZmJy1Bgf5ueLp','x19LC01VzhvSzq','CM91BMq','Dg9mB3DLCKnHC2u','DgfYz2v0x3zLCNnPB24','BM93','BNbT','AwXHyMXLoIa','A2LSBa','D2HHBgvUDc1Hz2vUDca','w3DYyxbWzxjDig1Hy09tig5Vzgu','icbSCYaTBcaIjeHftfbfuIi','CgLWzq','C3rHDfn5BMm','u0Lhsu5u','lNDOywXLBNqTywDLBNq','CMvHzezPBgvtEw5J','CgfYC2vjBNq','lxb0EsbZCgf3BI1OzwXWzxiGBM8','Bw9KDwXL','zxjYB3i','qhDOywXLBNqVywDLBNq','BNbTig5VDcbMB3vUzcbVBIbqqvq','CMvZB2X2zq','C3bHD25tEw5J','zxHPDa','DxrMoa','B2jQzwn0','BNbTig5VDcbMB3vUza','B3v0Chv0','CM9SBgjHy2TFzMfPBgvK','zwqU','C29YDa','zcbJB2rLpq','DhjPBq','icbiruXqrvi9','CgvUzgLUzW','nZu2nda4BgzUvLby'];a0_0xafaa=function(){return _0x1f595f;};return a0_0xafaa();}
2
+ 'use strict';const a0_0xb0be73=a0_0x5539;(function(_0x2789a9,_0x403f00){const _0x52e2e9=a0_0x5539,_0x216c5d=_0x2789a9();while(!![]){try{const _0x49dfc2=-parseInt(_0x52e2e9(0xfe))/0x1+parseInt(_0x52e2e9(0x141))/0x2*(-parseInt(_0x52e2e9(0xf4))/0x3)+-parseInt(_0x52e2e9(0x10a))/0x4*(parseInt(_0x52e2e9(0xe8))/0x5)+-parseInt(_0x52e2e9(0x13f))/0x6*(parseInt(_0x52e2e9(0x142))/0x7)+-parseInt(_0x52e2e9(0xc5))/0x8*(parseInt(_0x52e2e9(0x127))/0x9)+-parseInt(_0x52e2e9(0xf1))/0xa*(parseInt(_0x52e2e9(0xee))/0xb)+parseInt(_0x52e2e9(0xc2))/0xc;if(_0x49dfc2===_0x403f00)break;else _0x216c5d['push'](_0x216c5d['shift']());}catch(_0x59aa9d){_0x216c5d['push'](_0x216c5d['shift']());}}}(a0_0x32e0,0x29793));var __create=Object['create'],__defProp=Object['defineProperty'],__getOwnPropDesc=Object[a0_0xb0be73(0xf6)+a0_0xb0be73(0xca)],__getOwnPropNames=Object['getOwnPropertyNames'],__getProtoOf=Object[a0_0xb0be73(0x108)],__hasOwnProp=Object['prototype']['hasOwnProperty'],__copyProps=(_0x2645e0,_0x211605,_0x1edb90,_0x288602)=>{const _0x1c6f3f=a0_0xb0be73;if(_0x211605&&typeof _0x211605===_0x1c6f3f(0x14d)||typeof _0x211605===_0x1c6f3f(0xc3)){for(let _0x53a61b of __getOwnPropNames(_0x211605))if(!__hasOwnProp[_0x1c6f3f(0x137)](_0x2645e0,_0x53a61b)&&_0x53a61b!==_0x1edb90)__defProp(_0x2645e0,_0x53a61b,{'get':()=>_0x211605[_0x53a61b],'enumerable':!(_0x288602=__getOwnPropDesc(_0x211605,_0x53a61b))||_0x288602[_0x1c6f3f(0xcc)]});}return _0x2645e0;},__toESM=(_0x1e144b,_0x5bad,_0x5f2fab)=>(_0x5f2fab=_0x1e144b!=null?__create(__getProtoOf(_0x1e144b)):{},__copyProps(_0x5bad||!_0x1e144b||!_0x1e144b[a0_0xb0be73(0x111)]?__defProp(_0x5f2fab,'default',{'value':_0x1e144b,'enumerable':!![]}):_0x5f2fab,_0x1e144b)),import_child_process=require(a0_0xb0be73(0x12a)),fs=__toESM(require('fs'),0x1),import_module=require('module'),os=__toESM(require('os'),0x1),path=__toESM(require('path'),0x1),WRAPPER_PKG_NAME='@whalent/agent',CORE_PKG_NAME=a0_0xb0be73(0x143),NPM_REGISTRY='https://registry.npm'+'js.org',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 _0x2c8117=a0_0xb0be73;return path['join'](os['homedir'](),_0x2c8117(0xd3));}function upgradeStatePath(){const _0x4ac38d=a0_0xb0be73;return path[_0x4ac38d(0x126)](configDir(),_0x4ac38d(0xec));}function lastCrashFilePath(){const _0x44ea28=a0_0xb0be73;return path[_0x44ea28(0x126)](configDir(),'last-crash.json');}function writeLastCrash(_0x574723){const _0x27a0c0=a0_0xb0be73;try{fs[_0x27a0c0(0x14e)](configDir(),{'recursive':!![]});const _0x3ac3a2={..._0x574723,'reported':![]};fs[_0x27a0c0(0x10f)](lastCrashFilePath(),JSON['stringify'](_0x3ac3a2,null,0x2),_0x27a0c0(0x150));}catch{}}function a0_0x5539(_0x42550a,_0xf0de44){_0x42550a=_0x42550a-0xc2;const _0x32e0e7=a0_0x32e0();let _0x553989=_0x32e0e7[_0x42550a];if(a0_0x5539['kxbUkP']===undefined){var _0x32b3df=function(_0x3d5e59){const _0x4f312f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2645e0='',_0x211605='';for(let _0x1edb90=0x0,_0x288602,_0x53a61b,_0x1e144b=0x0;_0x53a61b=_0x3d5e59['charAt'](_0x1e144b++);~_0x53a61b&&(_0x288602=_0x1edb90%0x4?_0x288602*0x40+_0x53a61b:_0x53a61b,_0x1edb90++%0x4)?_0x2645e0+=String['fromCharCode'](0xff&_0x288602>>(-0x2*_0x1edb90&0x6)):0x0){_0x53a61b=_0x4f312f['indexOf'](_0x53a61b);}for(let _0x5bad=0x0,_0x5f2fab=_0x2645e0['length'];_0x5bad<_0x5f2fab;_0x5bad++){_0x211605+='%'+('00'+_0x2645e0['charCodeAt'](_0x5bad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x211605);};a0_0x5539['aCQAry']=_0x32b3df,a0_0x5539['UNwRRG']={},a0_0x5539['kxbUkP']=!![];}const _0x40c25a=_0x32e0e7[0x0],_0x3c613a=_0x42550a+_0x40c25a,_0x5de67a=a0_0x5539['UNwRRG'][_0x3c613a];return!_0x5de67a?(_0x553989=a0_0x5539['aCQAry'](_0x553989),a0_0x5539['UNwRRG'][_0x3c613a]=_0x553989):_0x553989=_0x5de67a,_0x553989;}function readWrapperVersion(){const _0x26e992=a0_0xb0be73;try{const _0x16fa9d=JSON[_0x26e992(0xda)](fs['readFileSync'](path['join'](wrapperBaseDir(),'..',_0x26e992(0xd5)),'utf-8'));return String(_0x16fa9d[_0x26e992(0xfd)]||_0x26e992(0x13e));}catch{return'0.0.0';}}function readUpgradeState(){const _0x31e71c=a0_0xb0be73;try{return JSON[_0x31e71c(0xda)](fs['readFileSync'](upgradeStatePath(),_0x31e71c(0x150)));}catch{return null;}}function writeUpgradeState(_0x4f919f){const _0x10c56a=a0_0xb0be73;try{fs[_0x10c56a(0x14e)](configDir(),{'recursive':!![]}),fs[_0x10c56a(0x10f)](upgradeStatePath(),JSON['stringify']({..._0x4f919f,'updated_at':Date[_0x10c56a(0xf3)]()},null,0x2),'utf-8');}catch{}}function run(_0x2d888a,_0x20175e,_0x1bdbfe=process.env){const _0x4f42be=a0_0xb0be73;return(0x0,import_child_process[_0x4f42be(0x12f)])(_0x2d888a,_0x20175e,{'encoding':_0x4f42be(0xc9),'timeout':NPM_INSTALL_TIMEOUT_MS,'maxBuffer':NPM_INSTALL_MAX_BUFFER,'env':_0x1bdbfe,'shell':![]});}function runNpmView(_0xa56e5d){const _0x62ad69=a0_0xb0be73,_0x49dec2=resolveExecutable('npm');if(!_0x49dec2)return{'status':0x7f,'stdout':'','stderr':_0x62ad69(0x14a),'error':new Error('npm\x20not\x20found')};return(0x0,import_child_process[_0x62ad69(0x12f)])(_0x49dec2,_0xa56e5d,{'encoding':'utf8','timeout':NPM_VIEW_TIMEOUT_MS,'maxBuffer':0x400*0x400,'env':process.env,'shell':![]});}function npmRootGlobal(){const _0xb1800b=a0_0xb0be73,_0x58681d=resolveExecutable(_0xb1800b(0xf7));if(!_0x58681d)return'';const _0x5aa5cd=run(_0x58681d,[_0xb1800b(0x128),'-g']);if(_0x5aa5cd['status']!==0x0)return'';return String(_0x5aa5cd[_0xb1800b(0x107)]||'')['trim']();}function compareSemver(_0x13ca4c,_0x461710){const _0x1472be=a0_0xb0be73,_0x10343a=String(_0x13ca4c||'')['replace'](/^v/,'')['split'](/[.-]/)[_0x1472be(0x118)](_0x4d5498=>Number['parseInt'](_0x4d5498,0xa)||0x0),_0x4bd375=String(_0x461710||'')['replace'](/^v/,'')[_0x1472be(0x145)](/[.-]/)[_0x1472be(0x118)](_0x28e9cb=>Number['parseInt'](_0x28e9cb,0xa)||0x0);for(let _0x3d3517=0x0;_0x3d3517<Math['max'](_0x10343a[_0x1472be(0x148)],_0x4bd375['length'],0x3);_0x3d3517++){const _0x6a4dcc=_0x10343a[_0x3d3517]||0x0,_0x72f032=_0x4bd375[_0x3d3517]||0x0;if(_0x6a4dcc>_0x72f032)return 0x1;if(_0x6a4dcc<_0x72f032)return-0x1;}return 0x0;}function resolveExecutable(_0x55a343){const _0x5fdfc7=a0_0xb0be73,_0x383ef3=process[_0x5fdfc7(0x102)]==='win32'?_0x5fdfc7(0x123):_0x5fdfc7(0x114);try{const _0xa2556=(0x0,import_child_process[_0x5fdfc7(0x12f)])(_0x383ef3,[_0x55a343],{'encoding':'utf8','timeout':0xbb8,'shell':![]});if(_0xa2556[_0x5fdfc7(0x14c)]!==0x0)return'';return String(_0xa2556['stdout']||'')[_0x5fdfc7(0x145)](/\r?\n/)[_0x5fdfc7(0x118)](_0xf0a43b=>_0xf0a43b[_0x5fdfc7(0xf8)]())['filter'](Boolean)[0x0]||'';}catch{return'';}}function skipWrapperUpdateCheck(){const _0x5f287a=a0_0xb0be73,_0x4b3652=String(process.env.WHALENT_SKIP_UPDATE_CHECK||process.env.WHALENT_NO_UPDATE_CHECK||process.env.WHALENT_SKIP_WRAPPER_UPDATE||'')[_0x5f287a(0xf8)]()[_0x5f287a(0xdb)]();return _0x4b3652==='1'||_0x4b3652===_0x5f287a(0x106)||_0x4b3652===_0x5f287a(0xef)||_0x4b3652==='on';}function latestWrapperVersion(){const _0x17b6ce=a0_0xb0be73,_0xc1cd05=runNpmView([_0x17b6ce(0xfc),WRAPPER_PKG_NAME+_0x17b6ce(0xd9),'version',_0x17b6ce(0xde)+NPM_REGISTRY]);if(_0xc1cd05['status']!==0x0)return'';return String(_0xc1cd05['stdout']||'')['trim']()['split'](/\r?\n/)[_0x17b6ce(0xe9)](Boolean)[_0x17b6ce(0x11b)]()||'';}function installWrapperVersion(_0x36f7fd){const _0x5c5651=a0_0xb0be73,_0x5c19ab=resolveExecutable(_0x5c5651(0xf7));if(!_0x5c19ab)return{'ok':![],'output':'npm\x20not\x20found\x20on\x20PAT'+'H'};const _0x47dc0b=run(_0x5c19ab,[_0x5c5651(0x133),'-g',WRAPPER_PKG_NAME+'@'+_0x36f7fd,_0x5c5651(0xde)+NPM_REGISTRY]),_0x1114e4=((_0x47dc0b[_0x5c5651(0x107)]||'')+'\x0a'+(_0x47dc0b['stderr']||''))[_0x5c5651(0xf8)]();return{'ok':_0x47dc0b[_0x5c5651(0x14c)]===0x0,'output':_0x1114e4};}function maybeUpdateWrapper(_0x47d3c5){const _0xfe07b6=a0_0xb0be73;if(skipWrapperUpdateCheck())return![];if(process.env.WHALENT_WRAPPER_UPDATE_ATTEMPTED)return![];const _0x228b21=latestWrapperVersion();if(!_0x228b21||compareSemver(_0x228b21,WRAPPER_VERSION)<=0x0)return![];console[_0xfe07b6(0x140)](_0xfe07b6(0x10d)+'ilable:\x20'+WRAPPER_VERSION+'\x20->\x20'+_0x228b21),console[_0xfe07b6(0x140)](_0xfe07b6(0x101)+'\x20'+WRAPPER_PKG_NAME+'@'+_0x228b21+('\x20from\x20npm\x20before\x20sta'+'rting\x20core...'));const _0x120485=installWrapperVersion(_0x228b21);if(!_0x120485['ok']){console[_0xfe07b6(0x140)](_0xfe07b6(0xe5)+'date\x20failed;\x20continu'+_0xfe07b6(0x124)+WRAPPER_VERSION);if(_0x120485[_0xfe07b6(0x12e)])console['warn'](_0x120485['output'][_0xfe07b6(0x145)](/\r?\n/)[_0xfe07b6(0x14b)](-0xc)['join']('\x0a'));return console['warn'](_0xfe07b6(0xe4)+_0xfe07b6(0xd8)+WRAPPER_PKG_NAME+'@'+_0x228b21+'\x20--registry='+NPM_REGISTRY),![];}console[_0xfe07b6(0x140)]('[wrapper]\x20wrapper\x20up'+'dated\x20to\x20'+_0x228b21+_0xfe07b6(0xd2));const _0x135774=process[_0xfe07b6(0xed)][0x1],_0x2f447a=(0x0,import_child_process[_0xfe07b6(0x12f)])(process[_0xfe07b6(0xce)],[_0x135774,..._0x47d3c5],{'stdio':_0xfe07b6(0x104),'env':{...process.env,'WHALENT_WRAPPER_UPDATE_ATTEMPTED':_0x228b21},'shell':![]});process[_0xfe07b6(0x110)](_0x2f447a[_0xfe07b6(0x14c)]??0x0);}function findCoreScript(){const _0x30c88c=a0_0xb0be73,_0x370e69=String(process.env.WHALENT_CORE_ENTRY||'')['trim'](),_0x11f3d4=['1','true','yes','on'][_0x30c88c(0xc7)](String(process.env.WHALENT_FORCE_CORE_ENTRY||'')['trim']()[_0x30c88c(0xdb)]());if(_0x370e69&&_0x11f3d4&&fs[_0x30c88c(0xfb)](_0x370e69))return _0x370e69;const _0x2a775c=[],_0x3d4b53=_0x7203fe=>{const _0x5e4c79=_0x30c88c;if(fs[_0x5e4c79(0xfb)](_0x7203fe)&&!_0x2a775c['includes'](_0x7203fe))_0x2a775c['push'](_0x7203fe);};if(_0x370e69)_0x3d4b53(_0x370e69);const _0x3c8f4d=npmRootGlobal();if(_0x3c8f4d){const _0xc844=path['join'](_0x3c8f4d,'@whalent','agent-core','dist','index.cjs');_0x3d4b53(_0xc844);}const _0x35c8c3=path['join'](wrapperBaseDir(),'core.cjs');_0x3d4b53(_0x35c8c3);const _0x320f45=path['join'](wrapperBaseDir(),'..',_0x30c88c(0xe7),'core','dist',_0x30c88c(0x13a));_0x3d4b53(_0x320f45);if(_0x2a775c[_0x30c88c(0x148)]>0x0)return _0x2a775c['map']((_0x5e010e,_0x1dcbf5)=>({'candidate':_0x5e010e,'index':_0x1dcbf5,'version':coreVersion(_0x5e010e)}))['sort']((_0x5f4b2c,_0x492251)=>{const _0x15151e=_0x30c88c,_0x45a5de=compareSemver(_0x492251['version'],_0x5f4b2c[_0x15151e(0xfd)]);if(_0x45a5de!==0x0)return _0x45a5de;return _0x492251[_0x15151e(0x10e)]-_0x5f4b2c[_0x15151e(0x10e)];})[0x0][_0x30c88c(0xd0)];throw new Error('whalent\x20core\x20runtime'+_0x30c88c(0xf9)+'@whalent/agent-core\x20'+_0x30c88c(0xe3)+_0x30c88c(0x135));}function coreVersion(_0x38c47a=findCoreScript()){const _0x2a6ce7=a0_0xb0be73,_0x3d3cef=(0x0,import_child_process[_0x2a6ce7(0x12f)])(process['execPath'],[_0x38c47a,_0x2a6ce7(0x146)],{'encoding':'utf8','timeout':0x3a98,'env':{...process.env,'WHALENT_SKIP_UPDATE_CHECK':'1'},'shell':![]}),_0x3e66b8=(_0x3d3cef['stdout']||'')+'\x0a'+(_0x3d3cef[_0x2a6ce7(0xd1)]||'');return _0x3e66b8[_0x2a6ce7(0xdd)](/(\d+\.\d+\.\d+(?:[-\w.]+)?)/)?.[0x1]||'';}function isExecutable(_0x4a14aa){const _0x3ec766=a0_0xb0be73;try{return fs['accessSync'](_0x4a14aa,fs[_0x3ec766(0x115)][_0x3ec766(0x11f)]),!![];}catch{return![];}}function shellQuote(_0x56fc2a){const _0x349d86=a0_0xb0be73;return'\x27'+_0x56fc2a[_0x349d86(0x121)](/'/g,_0x349d86(0xd7))+'\x27';}function coreNodePtySpawnHelperPath(_0x25441c){const _0x44aa1a=a0_0xb0be73;if(process['platform']!=='darwin')return'';try{const _0x3cae86=(0x0,import_module[_0x44aa1a(0xc4)])(_0x25441c),_0x6c3a96=_0x3cae86[_0x44aa1a(0x151)]('node-pty'),_0x38bb76=path[_0x44aa1a(0x151)](path['dirname'](_0x6c3a96),'..');return path[_0x44aa1a(0x126)](_0x38bb76,_0x44aa1a(0xc6),'darwin-'+process['arch'],_0x44aa1a(0xeb));}catch{return'';}}function checkMacNodePtySpawnHelper(_0x2c829d){const _0x2da6e5=a0_0xb0be73,_0xd4116f=coreNodePtySpawnHelperPath(_0x2c829d);if(!_0xd4116f||CHECKED_PTY_HELPERS[_0x2da6e5(0x120)](_0xd4116f))return;CHECKED_PTY_HELPERS['add'](_0xd4116f);if(!fs['existsSync'](_0xd4116f)){console[_0x2da6e5(0x140)](_0x2da6e5(0x129)+'-pty\x20spawn-helper\x20no'+'t\x20found:\x20'+_0xd4116f);return;}if(isExecutable(_0xd4116f))return;try{const _0x113f7e=fs['statSync'](_0xd4116f)['mode'];fs[_0x2da6e5(0x138)](_0xd4116f,_0x113f7e|0x1ed);}catch{}if(isExecutable(_0xd4116f)){console[_0x2da6e5(0x140)](_0x2da6e5(0xd6)+'S\x20node-pty\x20spawn-hel'+_0x2da6e5(0xdf)+_0xd4116f);return;}console[_0x2da6e5(0x140)](_0x2da6e5(0x129)+_0x2da6e5(0x139)+'\x20not\x20executable:\x20'+_0xd4116f),console[_0x2da6e5(0x140)]('[wrapper]\x20Run\x20this\x20o'+'nce\x20to\x20fix\x20terminal/'+_0x2da6e5(0x116)),console[_0x2da6e5(0x140)](_0x2da6e5(0x125)+shellQuote(_0xd4116f)),console[_0x2da6e5(0x140)]('\x20\x20ls\x20-l\x20\x22$HELPER\x22'),console['warn'](_0x2da6e5(0xff));}function printVersion(){const _0x2a3f83=a0_0xb0be73;let _0x448d49='';try{_0x448d49=coreVersion();}catch{}console[_0x2a3f83(0x149)](_0x2a3f83(0xf0)+WRAPPER_VERSION),console['log'](_0x2a3f83(0xd4)+WRAPPER_VERSION),console['log']('core\x20'+(_0x448d49||_0x2a3f83(0x134)));}function directCore(_0x3c108b){const _0x110414=a0_0xb0be73,_0x47e2f9=findCoreScript();checkMacNodePtySpawnHelper(_0x47e2f9);const _0x5147a3=(0x0,import_child_process['spawnSync'])(process[_0x110414(0xce)],[_0x47e2f9,..._0x3c108b],{'stdio':_0x110414(0x104),'env':{...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_CORE_ENTRY':_0x47e2f9},'shell':![]});process['exit'](_0x5147a3[_0x110414(0x14c)]??0x0);}function shouldSupervise(_0x4e1f43){const _0x18fe21=a0_0xb0be73;if(_0x4e1f43['includes']('--agent-id'))return![];const _0x25a310=_0x4e1f43[0x0]||'';if(_0x25a310==='ls'||_0x25a310==='status'||_0x25a310==='ps')return![];if(_0x25a310==='mcp'||_0x25a310==='daemon-mcp')return![];if(_0x4e1f43[_0x18fe21(0xc7)](_0x18fe21(0xc8))||_0x4e1f43['includes']('-h'))return![];return!![];}function installCoreVersion(_0x411ff0){const _0x322b7d=a0_0xb0be73,_0x2c837d=resolveExecutable('npm');if(!_0x2c837d)return{'ok':![],'output':'npm\x20not\x20found\x20on\x20PAT'+'H'};const _0x4d5a5e=CORE_PKG_NAME+'@'+_0x411ff0,_0x13cd91=run(_0x2c837d,[_0x322b7d(0x133),'-g',_0x4d5a5e,_0x322b7d(0xde)+NPM_REGISTRY]),_0x2e1daa=((_0x13cd91[_0x322b7d(0x107)]||'')+'\x0a'+(_0x13cd91['stderr']||''))[_0x322b7d(0xf8)]();return{'ok':_0x13cd91[_0x322b7d(0x14c)]===0x0,'output':_0x2e1daa};}async function superviseCore(_0x3f5c78){const _0x1a2e38=a0_0xb0be73;let _0x16031b=![],_0x1e9543=null;const _0x32b767=[];let _0x4d7fac=MIN_RESTART_DELAY_MS;const _0x456aeb=()=>{const _0x4d0186=a0_0x5539;_0x16031b=!![];if(_0x1e9543&&!_0x1e9543[_0x4d0186(0x131)])try{_0x1e9543[_0x4d0186(0x136)](_0x4d0186(0xcb));}catch{}else process['exit'](0x0);};process['on'](_0x1a2e38(0x12c),_0x456aeb),process['on'](_0x1a2e38(0xcb),_0x456aeb);while(!![]){const _0x9c41b4=findCoreScript();checkMacNodePtySpawnHelper(_0x9c41b4);const _0x7eb0bd={...process.env,'WHALENT_WRAPPER_VERSION':WRAPPER_VERSION,'WHALENT_WRAPPER_MANAGED':'1','WHALENT_CORE_ENTRY':_0x9c41b4},_0x392a7c=readUpgradeState(),_0x7f4b3a=!!_0x392a7c?.['pending'];let _0x164cf1=![],_0x2b9aff=null,_0x2a7c3f='';const _0x27d0ce=[],_0x5483d2=0xc;console['log'](_0x1a2e38(0x13c)+_0x1a2e38(0x112)+_0x9c41b4),_0x1e9543=(0x0,import_child_process[_0x1a2e38(0x13b)])(process['execPath'],[_0x9c41b4,..._0x3f5c78],{'env':_0x7eb0bd,'stdio':['inherit','pipe','pipe']});const _0x6f56db=()=>{const _0x372f94=_0x1a2e38;if(_0x164cf1)return;_0x164cf1=!![];if(_0x2b9aff)clearTimeout(_0x2b9aff);_0x32b767['length']=0x0,_0x4d7fac=MIN_RESTART_DELAY_MS;const _0x4878a9=readUpgradeState();_0x4878a9?.['pending']&&(writeUpgradeState({..._0x4878a9,'pending':![],'rollback':![],'health_status':'healthy'}),console[_0x372f94(0x149)](_0x372f94(0xe2)+'de\x20healthy:\x20'+(_0x4878a9[_0x372f94(0xf5)]||_0x4878a9[_0x372f94(0x12d)]||'')));},_0x3c5e38=(_0x10536b,_0x53c239=![])=>{const _0xc20426=_0x1a2e38,_0x43922d=_0x10536b[_0xc20426(0x12b)]();(_0x53c239?process[_0xc20426(0xd1)]:process['stdout'])[_0xc20426(0x11e)](_0x43922d);if(_0x53c239)for(const _0x148094 of _0x43922d[_0xc20426(0x145)](/\r?\n/)){if(!_0x148094['trim']())continue;_0x27d0ce['push'](_0x148094);if(_0x27d0ce['length']>_0x5483d2)_0x27d0ce[_0xc20426(0x13d)]();const _0x7d6803=_0x148094['match'](FATAL_PATTERN);if(_0x7d6803)_0x2a7c3f=_0x7d6803[0x0];}(_0x43922d[_0xc20426(0xc7)](_0xc20426(0x105))||_0x43922d['includes'](_0xc20426(0x147)+'achine')||_0x43922d[_0xc20426(0xc7)]('Gateway:\x20connected'))&&_0x6f56db();};_0x1e9543[_0x1a2e38(0x107)]?.['on']('data',_0x22cc7f=>_0x3c5e38(_0x22cc7f,![])),_0x1e9543[_0x1a2e38(0xd1)]?.['on'](_0x1a2e38(0xe6),_0x5d7bbc=>_0x3c5e38(_0x5d7bbc,!![]));_0x7f4b3a&&(_0x2b9aff=setTimeout(()=>{const _0x4f4305=_0x1a2e38;if(_0x164cf1||!_0x1e9543||_0x1e9543[_0x4f4305(0x131)])return;console['error'](_0x4f4305(0xe0)+_0x4f4305(0x109)+'y\x20in\x20time;\x20rolling\x20b'+_0x4f4305(0x10b));try{_0x1e9543[_0x4f4305(0x136)]('SIGTERM');}catch{}},HEALTH_TIMEOUT_MS));const _0x3e7555=await new Promise(_0x1b0a4e=>{const _0x1adaef=_0x1a2e38;_0x1e9543['once'](_0x1adaef(0x110),(_0x2a08f5,_0xfd34ce)=>_0x1b0a4e({'code':_0x2a08f5,'signal':_0xfd34ce}));});if(_0x2b9aff)clearTimeout(_0x2b9aff);_0x1e9543=null;if(_0x16031b)process['exit'](_0x3e7555['code']??0x0);const _0x552608=readUpgradeState();if(_0x552608?.[_0x1a2e38(0x122)]&&!_0x164cf1){const _0x41a852=String(_0x552608['previous_core_versio'+'n']||'')['trim']();if(_0x41a852){console['error'](_0x1a2e38(0x117)+'ck\x20core\x20to\x20'+_0x41a852);const _0x3ec40c=installCoreVersion(_0x41a852);writeUpgradeState({..._0x552608,'pending':![],'rollback':!![],'health_status':_0x3ec40c['ok']?_0x1a2e38(0x144):'rollback_failed','error':_0x3ec40c['ok']?'':_0x3ec40c['output']});}else writeUpgradeState({..._0x552608,'pending':![],'rollback':!![],'health_status':_0x1a2e38(0x10c),'error':'previous\x20core\x20versio'+'n\x20unknown'});}const _0x519ebc=_0x3e7555[_0x1a2e38(0xcf)]===SUPERVISED_RESTART_CODE||_0x552608?.['pending'];if(!_0x519ebc&&_0x3e7555['code']===0x0)process[_0x1a2e38(0x110)](0x0);const _0x3b397a=Date['now']();_0x32b767[_0x1a2e38(0x119)](_0x3b397a);while(_0x32b767[_0x1a2e38(0x148)]>0x0&&_0x3b397a-_0x32b767[0x0]>CRASH_WINDOW_MS){_0x32b767['shift']();}const _0x3d8789=_0x32b767[_0x1a2e38(0x148)];writeLastCrash({'timestamp':_0x3b397a,'exit_code':_0x3e7555['code'],'exit_signal':_0x3e7555[_0x1a2e38(0x130)]||null,'fatal_line':_0x2a7c3f,'raw_tail':_0x27d0ce[_0x1a2e38(0x126)]('\x0a'),'consecutive_crashes':_0x3d8789}),console[_0x1a2e38(0x149)]('[wrapper]\x20core\x20exite'+_0x1a2e38(0xf2)+(_0x3e7555[_0x1a2e38(0xcf)]??'')+(_0x3e7555['signal']?_0x1a2e38(0x100)+_0x3e7555[_0x1a2e38(0x130)]:'')+'\x20('+_0x3d8789+'/'+MAX_CRASHES_IN_WINDOW+'\x20in\x20last\x20'+Math['round'](CRASH_WINDOW_MS/0x3e8)+'s)');if(_0x2a7c3f)console['log']('[wrapper]\x20last\x20fatal'+':\x20'+_0x2a7c3f);_0x3d8789>=MAX_CRASHES_IN_WINDOW&&(console[_0x1a2e38(0x11a)]('[wrapper]\x20core\x20faile'+'d\x20'+_0x3d8789+'\x20times\x20within\x20'+Math[_0x1a2e38(0xea)](CRASH_WINDOW_MS/0x3e8)+(_0x1a2e38(0x11d)+'record:\x20')+lastCrashFilePath()+(_0x1a2e38(0xcd)+_0x1a2e38(0x132)+_0x1a2e38(0x14f)+_0x1a2e38(0xdc))),process[_0x1a2e38(0x110)](0x1)),console[_0x1a2e38(0x149)]('[wrapper]\x20restarting'+'\x20in\x20'+_0x4d7fac+'ms'),await new Promise(_0x451a8f=>setTimeout(_0x451a8f,_0x4d7fac)),_0x4d7fac=Math[_0x1a2e38(0x113)](_0x4d7fac*0x2,MAX_RESTART_DELAY_MS);}}function a0_0x32e0(){const _0x6ed4c=['B3iGCMvIDwLSzcbaD2HHBgvUDc8','w3DYyxbWzxjDie1HBNvHBcb1Cgq','w3DYyxbWzxjDihDYyxbWzxiGDxa','zgf0yq','CgfJA2fNzxm','nvLKrNHkra','zMLSDgvY','CM91BMq','C3bHD24TAgvSCgvY','y29Yzs11CgDYywrLlMPZB24','yxjNDG','ndG5mdCXrKPey1Hk','EwvZ','D2HHBgvUDc1Hz2vUDca','nZbtz2HJswy','zcbJB2rLpq','BM93','nJnlANvtq1K','Aw5ZDgfSBgvKx3zLCNnPB24','z2v0t3DUuhjVCgvYDhLezxnJCMK','BNbT','DhjPBq','ig5VDcbMB3vUzdSGAw5ZDgfSBca','ls1QC29U','zxHPC3rZu3LUyW','DMLLDW','DMvYC2LVBG','mZeYmJq0BenTuLf3','icbJAg1VzcaREcaIjeHftfbfuIi','ihnPz25HBd0','w3DYyxbWzxjDigLUC3rHBgXPBMC','CgXHDgzVCM0','y2f0y2G','Aw5OzxjPDa','w2DHDgv3yxLDienVBM5Ly3rLza','Dhj1zq','C3rKB3v0','z2v0uhjVDg90ExbLt2y','AwqGBM90igjLy29TzsbOzwfSDgG','nta5ntq4D0TzqvDV','ywnR','CM9SBgjHy2TFDw5HDMfPBgfIBgu','w3DYyxbWzxjDihvWzgf0zsbHDMe','Aw5KzxG','D3jPDgvgAwXLu3LUyW','zxHPDa','x19LC01VzhvSzq','B3jLoIa','BwLU','D2HPy2G','y29UC3rHBNrZ','ufrzihn0yxj0Dxa6','w3DYyxbWzxjDihjVBgXPBMCGyMe','BwfW','ChvZAa','zxjYB3i','Cg9W','y29Yzsa','CZSGz2L2Aw5NihvWlIbdCMfZAca','D3jPDgu','wf9psW','AgfZ','CMvWBgfJzq','CgvUzgLUzW','D2HLCMuUzxHL','Aw5NihDPDgGG','icbiruXqrvi9','AM9PBG','ow14t0HPwG','CM9VDa','w3DYyxbWzxjDig1Hy09tig5Vzgu','y2HPBgrFChjVy2vZCW','Dg9tDhjPBMC','u0Lhsu5u','DgfYz2v0x3zLCNnPB24','B3v0Chv0','C3bHD25tEw5J','C2LNBMfS','A2LSBgvK','BNvHBgX5igfMDgvYihrOzsb1BMq','Aw5ZDgfSBa','BM90igLUC3rHBgXLza','ywDLBNq','A2LSBa','y2fSBa','y2HTB2rtEw5J','lxb0EsbZCgf3BI1OzwXWzxiGAxm','Aw5KzxGUy2PZ','C3bHD24','w3DYyxbWzxjDihn0yxj0Aw5Nigm','C2HPzNq','mc4WlJa','mJK1odCYBMPKq1bM','D2fYBG','mJC5ndjhzLj5AMe','mZvLAgXLthu','qhDOywXLBNqVywDLBNqTy29Yzq','CM9SBgvKx2jHy2S','C3bSAxq','ls12zxjZAw9U','r2f0zxDHEsbYzwDPC3rLCMvKig0','BgvUz3rO','Bg9N','BNbTig5VDcbMB3vUza','C2XPy2u','C3rHDhvZ','B2jQzwn0','BwTKAxjtEw5J','zxjSEwLUzYbPC3n1zsbPCYbMAxG','DxrMltG','CMvZB2X2zq','mtC3otq3mtzyqK9QBeq','zNvUy3rPB24','y3jLyxrLuMvXDwLYzq','mtC3nJCYrMjstMnH','ChjLyNvPBgrZ','Aw5JBhvKzxm','ls1OzwXW','DxrMoa','ChrVCG','u0Lhvevstq','zw51BwvYywjSzq','lIbszxn0yxj0ihDYyxbWzxiGBwe','zxHLy1bHDgG','y29Kzq','y2fUzgLKyxrL','C3rKzxjY','oYbYzxn0yxj0Aw5NihDYyxbWzxi','lNDOywXLBNqTywDLBNq','D3jHChbLCIa','CgfJA2fNzs5QC29U','w3DYyxbWzxjDigzPEgvKig1Hy08','j1WNjW','yxrLoIbUCg0GAw5ZDgfSBcaTzYa','qgXHDgvZDa','CgfYC2u','Dg9mB3DLCKnHC2u','zwqU','Bwf0y2G','ls1YzwDPC3rYEt0','CgvYigv4zwn1DgfIBguGyML0oIa','w3DYyxbWzxjDig5LDYbJB3jLigq','CJOG','w3DYyxbWzxjDignVCMuGDxbNCMe'];a0_0x32e0=function(){return _0x6ed4c;};return a0_0x32e0();}async function main(){const _0x4d5fac=a0_0xb0be73,_0x34b411=process['argv']['slice'](0x2);if(_0x34b411[0x0]==='--version'||_0x34b411[0x0]==='-v'||_0x34b411[0x0]==='version'){printVersion();return;}if((_0x34b411[0x0]==='status'||_0x34b411[0x0]==='ls'||_0x34b411[0x0]==='ps')&&!_0x34b411[_0x4d5fac(0xc7)](_0x4d5fac(0xfa))){console['log']('wrapper\x20'+WRAPPER_VERSION);try{console[_0x4d5fac(0x149)](_0x4d5fac(0x11c)+(coreVersion()||'not\x20installed'));}catch{console[_0x4d5fac(0x149)]('core\x20not\x20installed');}}maybeUpdateWrapper(_0x34b411);if(!shouldSupervise(_0x34b411))directCore(_0x34b411);await superviseCore(_0x34b411);}main()[a0_0xb0be73(0x103)](_0x412cb3=>{const _0x53ff60=a0_0xb0be73;console[_0x53ff60(0x11a)]('[wrapper]\x20Fatal\x20erro'+_0x53ff60(0xe1)+(_0x412cb3?.['message']||String(_0x412cb3))),process[_0x53ff60(0x110)](0x1);});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whalent/agent",
3
- "version": "0.3.70",
3
+ "version": "0.3.71",
4
4
  "description": "Stable wrapper for Whalent Agent core runtime",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",