trimprompt 1.0.46 → 1.0.48

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/cache-manager.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x2a8718=a0_0x58dd;(function(_0x1815a8,_0x5ce21d){const _0x10d087=a0_0x58dd,_0x1949a2=_0x1815a8();while(!![]){try{const _0x50c59d=-parseInt(_0x10d087(0xcf))/0x1+parseInt(_0x10d087(0xd8))/0x2+-parseInt(_0x10d087(0xfa))/0x3+-parseInt(_0x10d087(0xf1))/0x4+-parseInt(_0x10d087(0xdb))/0x5+-parseInt(_0x10d087(0x100))/0x6+-parseInt(_0x10d087(0xcb))/0x7*(-parseInt(_0x10d087(0xcc))/0x8);if(_0x50c59d===_0x5ce21d)break;else _0x1949a2['push'](_0x1949a2['shift']());}catch(_0x3bd435){_0x1949a2['push'](_0x1949a2['shift']());}}}(a0_0xc1bb,0xd2a5e));var __createBinding=this&&this[a0_0x2a8718(0xf6)]||(Object[a0_0x2a8718(0xfc)]?function(_0x1833ee,_0x14e6d6,_0x3768d0,_0x5890e6){const _0x257325=a0_0x2a8718;if(_0x5890e6===undefined)_0x5890e6=_0x3768d0;var _0x381bea=Object['getOwnPropertyDescriptor'](_0x14e6d6,_0x3768d0);(!_0x381bea||(_0x257325(0xf4)in _0x381bea?!_0x14e6d6[_0x257325(0xe6)]:_0x381bea[_0x257325(0xe0)]||_0x381bea[_0x257325(0xca)]))&&(_0x381bea={'enumerable':!![],'get':function(){return _0x14e6d6[_0x3768d0];}}),Object['defineProperty'](_0x1833ee,_0x5890e6,_0x381bea);}:function(_0x531dde,_0x281489,_0x151866,_0x5891e1){if(_0x5891e1===undefined)_0x5891e1=_0x151866;_0x531dde[_0x5891e1]=_0x281489[_0x151866];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0xffe9d5,_0x598889){const _0x1bac8d=a0_0x2a8718;Object[_0x1bac8d(0xdc)](_0xffe9d5,_0x1bac8d(0xf7),{'enumerable':!![],'value':_0x598889});}:function(_0x208fa5,_0x4c42b5){const _0x3e760a=a0_0x2a8718;_0x208fa5[_0x3e760a(0xf7)]=_0x4c42b5;}),__importStar=this&&this[a0_0x2a8718(0xdf)]||(function(){var _0x473e64=function(_0x29ac91){const _0x5e8b6e=a0_0x58dd;return _0x473e64=Object[_0x5e8b6e(0xfd)]||function(_0x4a1ad9){const _0x47d3f1=_0x5e8b6e;var _0x52aa9f=[];for(var _0x1cb962 in _0x4a1ad9)if(Object[_0x47d3f1(0x101)]['hasOwnProperty']['call'](_0x4a1ad9,_0x1cb962))_0x52aa9f[_0x52aa9f[_0x47d3f1(0xd6)]]=_0x1cb962;return _0x52aa9f;},_0x473e64(_0x29ac91);};return function(_0x2a67aa){const _0x4f8252=a0_0x58dd;if(_0x2a67aa&&_0x2a67aa[_0x4f8252(0xe6)])return _0x2a67aa;var _0x3d48a3={};if(_0x2a67aa!=null){for(var _0x35731f=_0x473e64(_0x2a67aa),_0x2a4b82=0x0;_0x2a4b82<_0x35731f[_0x4f8252(0xd6)];_0x2a4b82++)if(_0x35731f[_0x2a4b82]!==_0x4f8252(0xf7))__createBinding(_0x3d48a3,_0x2a67aa,_0x35731f[_0x2a4b82]);}return __setModuleDefault(_0x3d48a3,_0x2a67aa),_0x3d48a3;};}());Object[a0_0x2a8718(0xdc)](exports,a0_0x2a8718(0xe6),{'value':!![]}),exports[a0_0x2a8718(0xda)]=saveChunk,exports[a0_0x2a8718(0xd9)]=retrieveChunk,exports['enforceEvictionPolicy']=enforceEvictionPolicy;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),crypto=__importStar(require(a0_0x2a8718(0xf3))),baseDir=path[a0_0x2a8718(0xeb)](os[a0_0x2a8718(0xd3)](),a0_0x2a8718(0xe3)),cacheDir=path[a0_0x2a8718(0xeb)](baseDir,a0_0x2a8718(0xf9)),MAX_CACHE_BYTES=0x1f4*0x400*0x400,TTL_MS=0xe*0x18*0x3c*0x3c*0x3e8;function ensureCacheDir(){const _0x38eb11=a0_0x2a8718;!fs[_0x38eb11(0xe5)](cacheDir)&&fs[_0x38eb11(0xf0)](cacheDir,{'recursive':!![]});}function a0_0x58dd(_0x330b43,_0x552f78){_0x330b43=_0x330b43-0xc9;const _0xc1bb73=a0_0xc1bb();let _0x58dd29=_0xc1bb73[_0x330b43];return _0x58dd29;}function saveChunk(_0x176c15,_0x4f0aed,_0x2ceaf2,_0xf986d4){const _0x3dba66=a0_0x2a8718;ensureCacheDir();const _0x440eab=crypto[_0x3dba66(0xf5)](_0x3dba66(0xde))[_0x3dba66(0xff)](_0x2ceaf2)[_0x3dba66(0xee)](_0x3dba66(0xea))['substring'](0x0,0x8),_0x47554a='tp_chk_'+_0x440eab,_0x478fd1=path[_0x3dba66(0xeb)](cacheDir,_0x176c15);!fs['existsSync'](_0x478fd1)&&fs[_0x3dba66(0xf0)](_0x478fd1,{'recursive':!![]});const _0x3cbce0=path[_0x3dba66(0xeb)](_0x478fd1,_0x47554a+_0x3dba66(0xd2)),_0x48246d=new Date()[_0x3dba66(0xfb)](),_0x494e88=Math[_0x3dba66(0xfe)](_0x2ceaf2[_0x3dba66(0xd6)]/0x4),_0x14c201=Math['ceil'](_0xf986d4[_0x3dba66(0xd6)]/0x4),_0x5c731b={'chunk_id':_0x47554a,'session_id':_0x176c15,'agent_key':_0x4f0aed,'raw_tokens':_0x494e88,'compressed_tokens':_0x14c201,'created_at':_0x48246d,'last_accessed_at':_0x48246d,'summary':_0xf986d4,'raw_payload':_0x2ceaf2};return fs[_0x3dba66(0xe2)](_0x3cbce0,JSON[_0x3dba66(0xf2)](_0x5c731b,null,0x2),_0x3dba66(0xe1)),enforceEvictionPolicy(),_0x5c731b;}function retrieveChunk(_0x2162d8){const _0x2cf893=a0_0x2a8718;ensureCacheDir();try{const _0x3cfcf2=fs['readdirSync'](cacheDir);for(const _0x16feeb of _0x3cfcf2){const _0x99a100=path[_0x2cf893(0xeb)](cacheDir,_0x16feeb);if(fs[_0x2cf893(0xec)](_0x99a100)[_0x2cf893(0xe7)]()){const _0x42e028=path[_0x2cf893(0xeb)](_0x99a100,_0x2162d8+'.json');if(fs[_0x2cf893(0xe5)](_0x42e028)){const _0x21d4d1=fs[_0x2cf893(0xd0)](_0x42e028,_0x2cf893(0xe1)),_0x148296=JSON[_0x2cf893(0xd5)](_0x21d4d1);return _0x148296[_0x2cf893(0xc9)]=new Date()['toISOString'](),fs[_0x2cf893(0xe2)](_0x42e028,JSON[_0x2cf893(0xf2)](_0x148296,null,0x2),_0x2cf893(0xe1)),_0x148296;}}}}catch{}return null;}function enforceEvictionPolicy(){const _0x4ecbdc=a0_0x2a8718;ensureCacheDir();try{const _0x45a9c3=Date[_0x4ecbdc(0xe4)]();let _0x4eb7b2=0x0;const _0xa07853=[],_0x276cf9=fs[_0x4ecbdc(0xe8)](cacheDir);for(const _0x1e97c0 of _0x276cf9){const _0x2273eb=path[_0x4ecbdc(0xeb)](cacheDir,_0x1e97c0);if(fs[_0x4ecbdc(0xec)](_0x2273eb)[_0x4ecbdc(0xe7)]()){const _0x4fc5de=fs[_0x4ecbdc(0xe8)](_0x2273eb);for(const _0xb41c3c of _0x4fc5de){if(_0xb41c3c[_0x4ecbdc(0xe9)](_0x4ecbdc(0xd2))){const _0x55dcf6=path[_0x4ecbdc(0xeb)](_0x2273eb,_0xb41c3c),_0x29728f=fs['statSync'](_0x55dcf6);try{const _0x29ab20=JSON[_0x4ecbdc(0xd5)](fs[_0x4ecbdc(0xd0)](_0x55dcf6,_0x4ecbdc(0xe1))),_0x80ea46=new Date(_0x29ab20[_0x4ecbdc(0xed)]||_0x29728f['birthtime'])[_0x4ecbdc(0xd4)](),_0x1adcb1=new Date(_0x29ab20[_0x4ecbdc(0xc9)]||_0x29728f[_0x4ecbdc(0xdd)])['getTime']();if(_0x45a9c3-_0x80ea46>TTL_MS){fs[_0x4ecbdc(0xd7)](_0x55dcf6);continue;}_0x4eb7b2+=_0x29728f[_0x4ecbdc(0xf8)],_0xa07853[_0x4ecbdc(0xef)]({'path':_0x55dcf6,'size':_0x29728f[_0x4ecbdc(0xf8)],'lastAccessed':_0x1adcb1,'createdAt':_0x80ea46});}catch{fs[_0x4ecbdc(0xd7)](_0x55dcf6);}}}}}if(_0x4eb7b2>MAX_CACHE_BYTES){_0xa07853[_0x4ecbdc(0xd1)]((_0x1eef74,_0x506a64)=>_0x1eef74[_0x4ecbdc(0xce)]-_0x506a64[_0x4ecbdc(0xce)]);for(const _0x2dafaa of _0xa07853){if(_0x4eb7b2<=MAX_CACHE_BYTES*0.8)break;try{fs['unlinkSync'](_0x2dafaa[_0x4ecbdc(0xcd)]),_0x4eb7b2-=_0x2dafaa[_0x4ecbdc(0xf8)];}catch{}}}}catch{}}function a0_0xc1bb(){const _0x58f856=['utf8','writeFileSync','.trimprompt','now','existsSync','__esModule','isDirectory','readdirSync','endsWith','hex','join','statSync','created_at','digest','push','mkdirSync','5763788mbqRkK','stringify','crypto','get','createHash','__createBinding','default','size','cache','1091403NeWMri','toISOString','create','getOwnPropertyNames','ceil','update','7214430foPCcv','prototype','last_accessed_at','configurable','7hiuysx','39150896djjdIy','path','lastAccessed','540734TUbCfA','readFileSync','sort','.json','homedir','getTime','parse','length','unlinkSync','2358430nkFNYz','retrieveChunk','saveChunk','8311880VtvFbK','defineProperty','mtime','sha256','__importStar','writable'];a0_0xc1bb=function(){return _0x58f856;};return a0_0xc1bb();}
1
+ 'use strict';const a0_0x2a18a9=a0_0x52f1;(function(_0x242b09,_0x183685){const _0x1e6837=a0_0x52f1,_0x349697=_0x242b09();while(!![]){try{const _0x6527d6=-parseInt(_0x1e6837(0x1e0))/0x1*(-parseInt(_0x1e6837(0x1d9))/0x2)+-parseInt(_0x1e6837(0x1eb))/0x3+parseInt(_0x1e6837(0x1ed))/0x4*(parseInt(_0x1e6837(0x1da))/0x5)+parseInt(_0x1e6837(0x1cb))/0x6*(-parseInt(_0x1e6837(0x1cf))/0x7)+-parseInt(_0x1e6837(0x1e6))/0x8+-parseInt(_0x1e6837(0x1ea))/0x9+parseInt(_0x1e6837(0x1d7))/0xa;if(_0x6527d6===_0x183685)break;else _0x349697['push'](_0x349697['shift']());}catch(_0x2dcd1e){_0x349697['push'](_0x349697['shift']());}}}(a0_0x582f,0x36a8d));var __createBinding=this&&this[a0_0x2a18a9(0x1c7)]||(Object[a0_0x2a18a9(0x1d8)]?function(_0x21de17,_0x3a67e9,_0x56abfc,_0x3a3f32){const _0x1e369d=a0_0x2a18a9;if(_0x3a3f32===undefined)_0x3a3f32=_0x56abfc;var _0x37a836=Object['getOwnPropertyDescriptor'](_0x3a67e9,_0x56abfc);(!_0x37a836||(_0x1e369d(0x1f0)in _0x37a836?!_0x3a67e9['__esModule']:_0x37a836['writable']||_0x37a836[_0x1e369d(0x1e2)]))&&(_0x37a836={'enumerable':!![],'get':function(){return _0x3a67e9[_0x56abfc];}}),Object[_0x1e369d(0x1e5)](_0x21de17,_0x3a3f32,_0x37a836);}:function(_0x5a882f,_0x1b9d46,_0x4fcc86,_0x178a58){if(_0x178a58===undefined)_0x178a58=_0x4fcc86;_0x5a882f[_0x178a58]=_0x1b9d46[_0x4fcc86];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x59b2e3,_0x411dfb){const _0x1a4cc9=a0_0x2a18a9;Object[_0x1a4cc9(0x1e5)](_0x59b2e3,_0x1a4cc9(0x1df),{'enumerable':!![],'value':_0x411dfb});}:function(_0x4832a9,_0x2ffd21){const _0x589300=a0_0x2a18a9;_0x4832a9[_0x589300(0x1df)]=_0x2ffd21;}),__importStar=this&&this['__importStar']||(function(){var _0x573b0a=function(_0x328f7e){return _0x573b0a=Object['getOwnPropertyNames']||function(_0x5c8ae8){const _0x3d2919=a0_0x52f1;var _0x425bc0=[];for(var _0x22f482 in _0x5c8ae8)if(Object['prototype'][_0x3d2919(0x1c5)][_0x3d2919(0x1e3)](_0x5c8ae8,_0x22f482))_0x425bc0[_0x425bc0[_0x3d2919(0x1e7)]]=_0x22f482;return _0x425bc0;},_0x573b0a(_0x328f7e);};return function(_0x41edb8){const _0x4b1340=a0_0x52f1;if(_0x41edb8&&_0x41edb8[_0x4b1340(0x1f1)])return _0x41edb8;var _0x114c3e={};if(_0x41edb8!=null){for(var _0xc5bf57=_0x573b0a(_0x41edb8),_0x1e9f59=0x0;_0x1e9f59<_0xc5bf57['length'];_0x1e9f59++)if(_0xc5bf57[_0x1e9f59]!=='default')__createBinding(_0x114c3e,_0x41edb8,_0xc5bf57[_0x1e9f59]);}return __setModuleDefault(_0x114c3e,_0x41edb8),_0x114c3e;};}());Object[a0_0x2a18a9(0x1e5)](exports,a0_0x2a18a9(0x1f1),{'value':!![]}),exports[a0_0x2a18a9(0x1c8)]=saveChunk,exports[a0_0x2a18a9(0x1dc)]=retrieveChunk,exports[a0_0x2a18a9(0x1de)]=enforceEvictionPolicy;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2a18a9(0x1d5))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x2a18a9(0x1cd))),baseDir=path[a0_0x2a18a9(0x1c6)](os['homedir'](),'.trimprompt'),cacheDir=path['join'](baseDir,a0_0x2a18a9(0x1f9)),MAX_CACHE_BYTES=0x1f4*0x400*0x400,TTL_MS=0xe*0x18*0x3c*0x3c*0x3e8;function ensureCacheDir(){const _0x551b11=a0_0x2a18a9;!fs['existsSync'](cacheDir)&&fs[_0x551b11(0x1e8)](cacheDir,{'recursive':!![]});}function a0_0x52f1(_0x294cf0,_0x1f80c4){_0x294cf0=_0x294cf0-0x1c5;const _0x582ffd=a0_0x582f();let _0x52f141=_0x582ffd[_0x294cf0];return _0x52f141;}function a0_0x582f(){const _0x32baac=['writeFileSync','path','ceil','8601390VdWDrI','create','102axWjez','1555VKoOif','size','retrieveChunk','birthtime','enforceEvictionPolicy','default','7795jYtWPe','toISOString','configurable','call','unlinkSync','defineProperty','913160FihDaH','length','mkdirSync','mtime','3085767EYGSOa','1158207KDVCtQ','readdirSync','2828iODtwd','stringify','utf8','get','__esModule','last_accessed_at','sort','parse','isDirectory','.json','getTime','hex','cache','existsSync','hasOwnProperty','join','__createBinding','saveChunk','statSync','tp_chk_','6pICMdR','substring','crypto','now','2874193wJXBFT','readFileSync','update','endsWith','createHash'];a0_0x582f=function(){return _0x32baac;};return a0_0x582f();}function saveChunk(_0x15ded3,_0x4a0009,_0x4d5271,_0x4cbb4a){const _0x241632=a0_0x2a18a9;ensureCacheDir();const _0x44c30a=crypto[_0x241632(0x1d3)]('sha256')[_0x241632(0x1d1)](_0x4d5271)['digest'](_0x241632(0x1f8))[_0x241632(0x1cc)](0x0,0x8),_0x35f087=_0x241632(0x1ca)+_0x44c30a,_0x2ebf14=path[_0x241632(0x1c6)](cacheDir,_0x15ded3);!fs[_0x241632(0x1fa)](_0x2ebf14)&&fs[_0x241632(0x1e8)](_0x2ebf14,{'recursive':!![]});const _0x24364f=path['join'](_0x2ebf14,_0x35f087+'.json'),_0x48e25a=new Date()[_0x241632(0x1e1)](),_0x221313=Math['ceil'](_0x4d5271[_0x241632(0x1e7)]/0x4),_0x2374ce=Math[_0x241632(0x1d6)](_0x4cbb4a[_0x241632(0x1e7)]/0x4),_0x169afb={'chunk_id':_0x35f087,'session_id':_0x15ded3,'agent_key':_0x4a0009,'raw_tokens':_0x221313,'compressed_tokens':_0x2374ce,'created_at':_0x48e25a,'last_accessed_at':_0x48e25a,'summary':_0x4cbb4a,'raw_payload':_0x4d5271};return fs[_0x241632(0x1d4)](_0x24364f,JSON[_0x241632(0x1ee)](_0x169afb,null,0x2),_0x241632(0x1ef)),enforceEvictionPolicy(),_0x169afb;}function retrieveChunk(_0x32a1e2){const _0x21c032=a0_0x2a18a9;ensureCacheDir();try{const _0x6ebf53=fs[_0x21c032(0x1ec)](cacheDir);for(const _0x4bc483 of _0x6ebf53){const _0x3b0ac1=path[_0x21c032(0x1c6)](cacheDir,_0x4bc483);if(fs['statSync'](_0x3b0ac1)[_0x21c032(0x1f5)]()){const _0x7de4cf=path[_0x21c032(0x1c6)](_0x3b0ac1,_0x32a1e2+_0x21c032(0x1f6));if(fs[_0x21c032(0x1fa)](_0x7de4cf)){const _0x337a94=fs[_0x21c032(0x1d0)](_0x7de4cf,_0x21c032(0x1ef)),_0x489191=JSON[_0x21c032(0x1f4)](_0x337a94);return _0x489191[_0x21c032(0x1f2)]=new Date()['toISOString'](),fs[_0x21c032(0x1d4)](_0x7de4cf,JSON[_0x21c032(0x1ee)](_0x489191,null,0x2),_0x21c032(0x1ef)),_0x489191;}}}}catch{}return null;}function enforceEvictionPolicy(){const _0x14dfbc=a0_0x2a18a9;ensureCacheDir();try{const _0x3394af=Date[_0x14dfbc(0x1ce)]();let _0x5d5fda=0x0;const _0xacba2f=[],_0x575de9=fs[_0x14dfbc(0x1ec)](cacheDir);for(const _0x2547f7 of _0x575de9){const _0x57e137=path[_0x14dfbc(0x1c6)](cacheDir,_0x2547f7);if(fs[_0x14dfbc(0x1c9)](_0x57e137)[_0x14dfbc(0x1f5)]()){const _0x48b18d=fs[_0x14dfbc(0x1ec)](_0x57e137);for(const _0x7f1d1b of _0x48b18d){if(_0x7f1d1b[_0x14dfbc(0x1d2)](_0x14dfbc(0x1f6))){const _0x39c7ff=path[_0x14dfbc(0x1c6)](_0x57e137,_0x7f1d1b),_0x148c75=fs[_0x14dfbc(0x1c9)](_0x39c7ff);try{const _0x3262b0=JSON['parse'](fs[_0x14dfbc(0x1d0)](_0x39c7ff,_0x14dfbc(0x1ef))),_0x4640e4=new Date(_0x3262b0['created_at']||_0x148c75[_0x14dfbc(0x1dd)])['getTime'](),_0x53b62a=new Date(_0x3262b0[_0x14dfbc(0x1f2)]||_0x148c75[_0x14dfbc(0x1e9)])[_0x14dfbc(0x1f7)]();if(_0x3394af-_0x4640e4>TTL_MS){fs[_0x14dfbc(0x1e4)](_0x39c7ff);continue;}_0x5d5fda+=_0x148c75[_0x14dfbc(0x1db)],_0xacba2f['push']({'path':_0x39c7ff,'size':_0x148c75[_0x14dfbc(0x1db)],'lastAccessed':_0x53b62a,'createdAt':_0x4640e4});}catch{fs[_0x14dfbc(0x1e4)](_0x39c7ff);}}}}}if(_0x5d5fda>MAX_CACHE_BYTES){_0xacba2f[_0x14dfbc(0x1f3)]((_0x57f99c,_0x1edea3)=>_0x57f99c['lastAccessed']-_0x1edea3['lastAccessed']);for(const _0x166f19 of _0xacba2f){if(_0x5d5fda<=MAX_CACHE_BYTES*0.8)break;try{fs['unlinkSync'](_0x166f19[_0x14dfbc(0x1d5)]),_0x5d5fda-=_0x166f19[_0x14dfbc(0x1db)];}catch{}}}}catch{}}
package/cache.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x22b70f=a0_0x2ae2;(function(_0x4bdadb,_0x1e5fc0){const _0x3575f2=a0_0x2ae2,_0x3ef1a6=_0x4bdadb();while(!![]){try{const _0x40efde=-parseInt(_0x3575f2(0x1f1))/0x1+parseInt(_0x3575f2(0x1fa))/0x2*(-parseInt(_0x3575f2(0x219))/0x3)+parseInt(_0x3575f2(0x21c))/0x4*(parseInt(_0x3575f2(0x229))/0x5)+-parseInt(_0x3575f2(0x21f))/0x6*(parseInt(_0x3575f2(0x20e))/0x7)+parseInt(_0x3575f2(0x1e0))/0x8+parseInt(_0x3575f2(0x1ed))/0x9+parseInt(_0x3575f2(0x224))/0xa;if(_0x40efde===_0x1e5fc0)break;else _0x3ef1a6['push'](_0x3ef1a6['shift']());}catch(_0x3c82e2){_0x3ef1a6['push'](_0x3ef1a6['shift']());}}}(a0_0x1bc6,0x2d8fa));var __createBinding=this&&this[a0_0x22b70f(0x228)]||(Object[a0_0x22b70f(0x215)]?function(_0xf80b5d,_0x332cde,_0x9087e,_0x5be118){const _0x13194d=a0_0x22b70f;if(_0x5be118===undefined)_0x5be118=_0x9087e;var _0x19aad4=Object['getOwnPropertyDescriptor'](_0x332cde,_0x9087e);(!_0x19aad4||(_0x13194d(0x1ff)in _0x19aad4?!_0x332cde[_0x13194d(0x1fe)]:_0x19aad4[_0x13194d(0x1fd)]||_0x19aad4[_0x13194d(0x21d)]))&&(_0x19aad4={'enumerable':!![],'get':function(){return _0x332cde[_0x9087e];}}),Object[_0x13194d(0x218)](_0xf80b5d,_0x5be118,_0x19aad4);}:function(_0x6f801d,_0x1b7a40,_0x185282,_0x874d24){if(_0x874d24===undefined)_0x874d24=_0x185282;_0x6f801d[_0x874d24]=_0x1b7a40[_0x185282];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x22b70f(0x215)]?function(_0xf54378,_0x4a83ba){const _0x15d4e5=a0_0x22b70f;Object[_0x15d4e5(0x218)](_0xf54378,_0x15d4e5(0x21a),{'enumerable':!![],'value':_0x4a83ba});}:function(_0x55b588,_0x4abc5b){const _0x51f920=a0_0x22b70f;_0x55b588[_0x51f920(0x21a)]=_0x4abc5b;}),__importStar=this&&this[a0_0x22b70f(0x21b)]||(function(){var _0x31190a=function(_0x60430b){const _0x301f58=a0_0x2ae2;return _0x31190a=Object[_0x301f58(0x1fb)]||function(_0x1cf9f9){const _0xb7b917=_0x301f58;var _0x424445=[];for(var _0x15846a in _0x1cf9f9)if(Object['prototype'][_0xb7b917(0x21e)][_0xb7b917(0x203)](_0x1cf9f9,_0x15846a))_0x424445[_0x424445[_0xb7b917(0x1e8)]]=_0x15846a;return _0x424445;},_0x31190a(_0x60430b);};return function(_0x4e40f2){const _0x121153=a0_0x2ae2;if(_0x4e40f2&&_0x4e40f2[_0x121153(0x1fe)])return _0x4e40f2;var _0x2fec6e={};if(_0x4e40f2!=null){for(var _0x46c3f9=_0x31190a(_0x4e40f2),_0x5c1dd0=0x0;_0x5c1dd0<_0x46c3f9['length'];_0x5c1dd0++)if(_0x46c3f9[_0x5c1dd0]!=='default')__createBinding(_0x2fec6e,_0x4e40f2,_0x46c3f9[_0x5c1dd0]);}return __setModuleDefault(_0x2fec6e,_0x4e40f2),_0x2fec6e;};}());Object[a0_0x22b70f(0x218)](exports,a0_0x22b70f(0x1fe),{'value':!![]}),exports['dedup']=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x22b70f(0x221))),os=__importStar(require('os')),crypto=__importStar(require('crypto')),CACHE_DIR=path[a0_0x22b70f(0x1e9)](os[a0_0x22b70f(0x209)](),a0_0x22b70f(0x1dd)),CACHE_FILE=path[a0_0x22b70f(0x1e9)](CACHE_DIR,'cache.json'),MAX_ENTRIES=0x12c,TTL_SECONDS={'file':0x78,'git-status':0x1e,'git-log':0x3c,'git-show':0xe10,'ls':0x3c,'tree':0x3c,'docker-ps':0x1e,'docker-images':0x3c,'kubectl':0x1e,'ruff':0x3c,'go-vet':0x3c};function classifyCommand(_0x356bd6){const _0x177c5b=a0_0x22b70f,_0x4c4aa6=_0x356bd6[_0x177c5b(0x216)]()[_0x177c5b(0x1f6)]();if(_0x4c4aa6['match'](/^(cat|head|tail|read|bat)\s/))return _0x177c5b(0x1fc);if(_0x4c4aa6[_0x177c5b(0x1ea)](_0x177c5b(0x220))||_0x4c4aa6['includes'](_0x177c5b(0x217)))return'git-status';if(_0x4c4aa6[_0x177c5b(0x1ea)](_0x177c5b(0x205))||_0x4c4aa6[_0x177c5b(0x1ea)](_0x177c5b(0x1ec)))return _0x177c5b(0x226);if(_0x4c4aa6['includes'](_0x177c5b(0x227))||_0x4c4aa6['includes']('yadm\x20show'))return _0x177c5b(0x22c);if(_0x4c4aa6[_0x177c5b(0x210)](/^(ls|dir)(\s|$)/)||_0x4c4aa6[_0x177c5b(0x1ea)](_0x177c5b(0x1f2))||_0x4c4aa6['endsWith'](_0x177c5b(0x1f5)))return'ls';if(_0x4c4aa6['match'](/^tree(\s|$)/)||_0x4c4aa6[_0x177c5b(0x1ea)](_0x177c5b(0x225))||_0x4c4aa6[_0x177c5b(0x1e7)]('\x20tree'))return _0x177c5b(0x223);if(_0x4c4aa6[_0x177c5b(0x210)](/docker\s+ps/))return _0x177c5b(0x1f7);if(_0x4c4aa6['match'](/docker\s+images/))return _0x177c5b(0x1e2);if(_0x4c4aa6['includes'](_0x177c5b(0x1df))||_0x4c4aa6[_0x177c5b(0x1ea)]('kubectl\x20describe'))return _0x177c5b(0x20b);if(_0x4c4aa6['includes'](_0x177c5b(0x211))||_0x4c4aa6['includes'](_0x177c5b(0x1e4)))return'ruff';if(_0x4c4aa6[_0x177c5b(0x1ea)]('go\x20vet'))return _0x177c5b(0x201);return'';}function md5(_0x4c6c1b){const _0x209f5c=a0_0x22b70f;return crypto[_0x209f5c(0x20a)](_0x209f5c(0x207))['update'](_0x4c6c1b)[_0x209f5c(0x20d)](_0x209f5c(0x1f3));}function loadStore(){const _0x12d6b8=a0_0x22b70f;try{if(fs[_0x12d6b8(0x222)](CACHE_FILE))return JSON[_0x12d6b8(0x1e1)](fs[_0x12d6b8(0x200)](CACHE_FILE,_0x12d6b8(0x212)));}catch{}return{};}function a0_0x2ae2(_0x4ec529,_0x5ec940){_0x4ec529=_0x4ec529-0x1dd;const _0x1bc61e=a0_0x1bc6();let _0x2ae24e=_0x1bc61e[_0x4ec529];return _0x2ae24e;}function saveStore(_0x5de66f){const _0x4f757e=a0_0x22b70f;try{if(!fs[_0x4f757e(0x222)](CACHE_DIR))fs['mkdirSync'](CACHE_DIR,{'recursive':!![]});const _0x5ce439=Object[_0x4f757e(0x20f)](_0x5de66f);if(_0x5ce439[_0x4f757e(0x1e8)]>MAX_ENTRIES){const _0x36c4ca=_0x5ce439[_0x4f757e(0x214)]((_0x2b45e4,_0x2cdc50)=>_0x5de66f[_0x2b45e4][_0x4f757e(0x22b)]-_0x5de66f[_0x2cdc50][_0x4f757e(0x22b)]);for(const _0x3fb21b of _0x36c4ca[_0x4f757e(0x1f9)](0x0,_0x5ce439[_0x4f757e(0x1e8)]-MAX_ENTRIES)){delete _0x5de66f[_0x3fb21b];}}fs[_0x4f757e(0x208)](CACHE_FILE,JSON[_0x4f757e(0x213)](_0x5de66f),_0x4f757e(0x212));}catch{}}function a0_0x1bc6(){const _0x49d213=['cwd','now','329907Vjagzn','\x20ls\x20','hex','[cached\x20—\x20unchanged\x20since\x20','\x20ls','toLowerCase','docker-ps','git-status','slice','4bkhIcJ','getOwnPropertyNames','file','writable','__esModule','get','readFileSync','go-vet','\x20lines','call','s\x20ago,\x20','git\x20log','split','md5','writeFileSync','homedir','createHash','kubectl','\x20entries','digest','21721PnEBVQ','keys','match','ruff\x20check','utf8','stringify','sort','create','trim','yadm\x20status','defineProperty','302334kjmPMP','default','__importStar','1255724KrmYnv','configurable','hasOwnProperty','630pTISfT','git\x20status','path','existsSync','tree','5626840nyYozC','\x20tree\x20','git-log','git\x20show','__createBinding','5YXkpJF','startsWith','timestamp','git-show','.trimprompt','\x20chars','kubectl\x20get','1251360mlQDpj','parse','docker-images','round','ruff\x20','summary','hash','endsWith','length','join','includes','docker','yadm\x20log','97749eWVPpp','\x20lines,\x20'];a0_0x1bc6=function(){return _0x49d213;};return a0_0x1bc6();}function buildSummary(_0x2d64a0,_0x2bba73){const _0x2b730c=a0_0x22b70f,_0x28ff60=_0x2d64a0[_0x2b730c(0x206)]('\x0a')[_0x2b730c(0x1e8)],_0xb54135=_0x2d64a0[_0x2b730c(0x1e8)];if(_0x2bba73===_0x2b730c(0x1fc))return _0x28ff60+_0x2b730c(0x1ee)+_0xb54135+_0x2b730c(0x1de);if(_0x2bba73===_0x2b730c(0x1f8))return _0x28ff60+'\x20lines';if(_0x2bba73===_0x2b730c(0x226))return _0x28ff60+_0x2b730c(0x20c);if(_0x2bba73[_0x2b730c(0x22a)](_0x2b730c(0x1eb)))return _0x28ff60+_0x2b730c(0x202);return _0x28ff60+_0x2b730c(0x1ee)+_0xb54135+'\x20chars';}function dedup(_0x26faff,_0x30b018){const _0x178eac=a0_0x22b70f;try{const _0x2e2da5=classifyCommand(_0x26faff);if(!_0x2e2da5)return null;const _0x42f8be=TTL_SECONDS[_0x2e2da5];if(!_0x42f8be)return null;const _0x2cc25e=process[_0x178eac(0x1ef)](),_0x23e623=md5(_0x2cc25e+'::'+_0x26faff[_0x178eac(0x216)]()),_0x43cbca=md5(_0x30b018),_0xe1e134=Date[_0x178eac(0x1f0)](),_0x2b7c31=loadStore(),_0x2ec648=_0x2b7c31[_0x23e623];if(_0x2ec648&&_0x2ec648[_0x178eac(0x1e6)]===_0x43cbca&&_0xe1e134-_0x2ec648[_0x178eac(0x22b)]<_0x42f8be*0x3e8){const _0x116222=Math[_0x178eac(0x1e3)]((_0xe1e134-_0x2ec648[_0x178eac(0x22b)])/0x3e8);return _0x178eac(0x1f4)+_0x116222+_0x178eac(0x204)+_0x2ec648[_0x178eac(0x1e5)]+']';}_0x2b7c31[_0x23e623]={'hash':_0x43cbca,'summary':buildSummary(_0x30b018,_0x2e2da5),'timestamp':_0xe1e134,'chars':_0x30b018[_0x178eac(0x1e8)]},saveStore(_0x2b7c31);}catch{}return null;}
1
+ 'use strict';const a0_0x273522=a0_0x7f49;(function(_0x42c9a6,_0x2e8e33){const _0x52342c=a0_0x7f49,_0x476c02=_0x42c9a6();while(!![]){try{const _0x58bed8=parseInt(_0x52342c(0xd2))/0x1*(parseInt(_0x52342c(0xb5))/0x2)+parseInt(_0x52342c(0xc8))/0x3*(-parseInt(_0x52342c(0xe0))/0x4)+parseInt(_0x52342c(0xbd))/0x5*(-parseInt(_0x52342c(0xb9))/0x6)+parseInt(_0x52342c(0xe4))/0x7+-parseInt(_0x52342c(0xc7))/0x8*(parseInt(_0x52342c(0xd5))/0x9)+parseInt(_0x52342c(0xa4))/0xa+parseInt(_0x52342c(0xa6))/0xb;if(_0x58bed8===_0x2e8e33)break;else _0x476c02['push'](_0x476c02['shift']());}catch(_0x1cab37){_0x476c02['push'](_0x476c02['shift']());}}}(a0_0x637f,0x7b00f));var __createBinding=this&&this[a0_0x273522(0xc1)]||(Object['create']?function(_0x449f09,_0x118050,_0x3a53de,_0x28e0fb){const _0x493126=a0_0x273522;if(_0x28e0fb===undefined)_0x28e0fb=_0x3a53de;var _0x56f10a=Object['getOwnPropertyDescriptor'](_0x118050,_0x3a53de);(!_0x56f10a||(_0x493126(0xca)in _0x56f10a?!_0x118050[_0x493126(0xda)]:_0x56f10a['writable']||_0x56f10a[_0x493126(0xdd)]))&&(_0x56f10a={'enumerable':!![],'get':function(){return _0x118050[_0x3a53de];}}),Object[_0x493126(0xeb)](_0x449f09,_0x28e0fb,_0x56f10a);}:function(_0x287626,_0x34a950,_0x18b6c9,_0x34c235){if(_0x34c235===undefined)_0x34c235=_0x18b6c9;_0x287626[_0x34c235]=_0x34a950[_0x18b6c9];}),__setModuleDefault=this&&this[a0_0x273522(0xb3)]||(Object[a0_0x273522(0xce)]?function(_0x22982e,_0x2bf93a){const _0x3f0672=a0_0x273522;Object['defineProperty'](_0x22982e,_0x3f0672(0xc9),{'enumerable':!![],'value':_0x2bf93a});}:function(_0x9d7796,_0x2f148b){const _0x5d5af9=a0_0x273522;_0x9d7796[_0x5d5af9(0xc9)]=_0x2f148b;}),__importStar=this&&this[a0_0x273522(0xc5)]||(function(){var _0x3acb62=function(_0x58c32a){const _0x2d2558=a0_0x7f49;return _0x3acb62=Object[_0x2d2558(0xe5)]||function(_0xef1e03){const _0x558b4d=_0x2d2558;var _0x409ec2=[];for(var _0x2cf4fb in _0xef1e03)if(Object[_0x558b4d(0xc0)][_0x558b4d(0xd9)][_0x558b4d(0xa5)](_0xef1e03,_0x2cf4fb))_0x409ec2[_0x409ec2[_0x558b4d(0xdc)]]=_0x2cf4fb;return _0x409ec2;},_0x3acb62(_0x58c32a);};return function(_0x4f89f9){const _0x23ec40=a0_0x7f49;if(_0x4f89f9&&_0x4f89f9[_0x23ec40(0xda)])return _0x4f89f9;var _0x23e060={};if(_0x4f89f9!=null){for(var _0x2c9498=_0x3acb62(_0x4f89f9),_0x51d3bc=0x0;_0x51d3bc<_0x2c9498['length'];_0x51d3bc++)if(_0x2c9498[_0x51d3bc]!=='default')__createBinding(_0x23e060,_0x4f89f9,_0x2c9498[_0x51d3bc]);}return __setModuleDefault(_0x23e060,_0x4f89f9),_0x23e060;};}());Object[a0_0x273522(0xeb)](exports,a0_0x273522(0xda),{'value':!![]}),exports['dedup']=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x273522(0xa9))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x273522(0xcd))),CACHE_DIR=path[a0_0x273522(0xa7)](os[a0_0x273522(0xab)](),'.trimprompt'),CACHE_FILE=path[a0_0x273522(0xa7)](CACHE_DIR,'cache.json'),MAX_ENTRIES=0x12c,TTL_SECONDS={'file':0x78,'git-status':0x1e,'git-log':0x3c,'git-show':0xe10,'ls':0x3c,'tree':0x3c,'docker-ps':0x1e,'docker-images':0x3c,'kubectl':0x1e,'ruff':0x3c,'go-vet':0x3c};function classifyCommand(_0x4d62df){const _0x5dc0f2=a0_0x273522,_0x3a6b64=_0x4d62df['trim']()[_0x5dc0f2(0xbe)]();if(_0x3a6b64['match'](/^(cat|head|tail|read|bat)\s/))return _0x5dc0f2(0xd7);if(_0x3a6b64['includes'](_0x5dc0f2(0xef))||_0x3a6b64[_0x5dc0f2(0xb1)]('yadm\x20status'))return _0x5dc0f2(0xae);if(_0x3a6b64[_0x5dc0f2(0xb1)](_0x5dc0f2(0xbc))||_0x3a6b64['includes'](_0x5dc0f2(0xee)))return'git-log';if(_0x3a6b64[_0x5dc0f2(0xb1)](_0x5dc0f2(0xb2))||_0x3a6b64[_0x5dc0f2(0xb1)](_0x5dc0f2(0xc3)))return'git-show';if(_0x3a6b64[_0x5dc0f2(0xcb)](/^(ls|dir)(\s|$)/)||_0x3a6b64['includes'](_0x5dc0f2(0xba))||_0x3a6b64['endsWith'](_0x5dc0f2(0xad)))return'ls';if(_0x3a6b64[_0x5dc0f2(0xcb)](/^tree(\s|$)/)||_0x3a6b64[_0x5dc0f2(0xb1)]('\x20tree\x20')||_0x3a6b64[_0x5dc0f2(0xb0)](_0x5dc0f2(0xb4)))return _0x5dc0f2(0xc6);if(_0x3a6b64[_0x5dc0f2(0xcb)](/docker\s+ps/))return'docker-ps';if(_0x3a6b64[_0x5dc0f2(0xcb)](/docker\s+images/))return'docker-images';if(_0x3a6b64['includes'](_0x5dc0f2(0xe2))||_0x3a6b64[_0x5dc0f2(0xb1)](_0x5dc0f2(0xb7)))return'kubectl';if(_0x3a6b64[_0x5dc0f2(0xb1)](_0x5dc0f2(0xb8))||_0x3a6b64[_0x5dc0f2(0xb1)](_0x5dc0f2(0xe6)))return'ruff';if(_0x3a6b64[_0x5dc0f2(0xb1)]('go\x20vet'))return _0x5dc0f2(0xe7);return'';}function a0_0x637f(){const _0x392b50=['tree','8IUGfjB','1936029ehbjGF','default','get','match','stringify','crypto','create','mkdirSync','sort','git-log','1EDJMBL','createHash','summary','1817766NeDens','keys','file','writeFileSync','hasOwnProperty','__esModule','update','length','configurable','round','readFileSync','4tAjEOS','existsSync','kubectl\x20get','\x20lines,\x20','4891768Gtkpxr','getOwnPropertyNames','ruff\x20','go-vet','now','md5','[cached\x20—\x20unchanged\x20since\x20','defineProperty','cwd','split','yadm\x20log','git\x20status','\x20chars','hash','3085900FySAos','call','8657099InOeQL','join','\x20lines','path','parse','homedir','trim','\x20ls','git-status','slice','endsWith','includes','git\x20show','__setModuleDefault','\x20tree','21256bFBscQ','timestamp','kubectl\x20describe','ruff\x20check','246qrsvXP','\x20ls\x20','s\x20ago,\x20','git\x20log','55355rzSUkh','toLowerCase','\x20entries','prototype','__createBinding','hex','yadm\x20show','startsWith','__importStar'];a0_0x637f=function(){return _0x392b50;};return a0_0x637f();}function md5(_0x1dd2e1){const _0x1f55d7=a0_0x273522;return crypto[_0x1f55d7(0xd3)](_0x1f55d7(0xe9))[_0x1f55d7(0xdb)](_0x1dd2e1)['digest'](_0x1f55d7(0xc2));}function loadStore(){const _0x2809ad=a0_0x273522;try{if(fs[_0x2809ad(0xe1)](CACHE_FILE))return JSON[_0x2809ad(0xaa)](fs[_0x2809ad(0xdf)](CACHE_FILE,'utf8'));}catch{}return{};}function a0_0x7f49(_0x15bcfd,_0x133c53){_0x15bcfd=_0x15bcfd-0xa2;const _0x637fa7=a0_0x637f();let _0x7f49e7=_0x637fa7[_0x15bcfd];return _0x7f49e7;}function saveStore(_0x4d8e33){const _0xf6c983=a0_0x273522;try{if(!fs[_0xf6c983(0xe1)](CACHE_DIR))fs[_0xf6c983(0xcf)](CACHE_DIR,{'recursive':!![]});const _0xbaf8d5=Object[_0xf6c983(0xd6)](_0x4d8e33);if(_0xbaf8d5[_0xf6c983(0xdc)]>MAX_ENTRIES){const _0x1d4448=_0xbaf8d5[_0xf6c983(0xd0)]((_0x559d5b,_0x5021f4)=>_0x4d8e33[_0x559d5b][_0xf6c983(0xb6)]-_0x4d8e33[_0x5021f4]['timestamp']);for(const _0x9ee430 of _0x1d4448[_0xf6c983(0xaf)](0x0,_0xbaf8d5[_0xf6c983(0xdc)]-MAX_ENTRIES)){delete _0x4d8e33[_0x9ee430];}}fs[_0xf6c983(0xd8)](CACHE_FILE,JSON[_0xf6c983(0xcc)](_0x4d8e33),'utf8');}catch{}}function buildSummary(_0x116492,_0x340c54){const _0x4e8fb4=a0_0x273522,_0x55c6cc=_0x116492[_0x4e8fb4(0xed)]('\x0a')['length'],_0x380de9=_0x116492[_0x4e8fb4(0xdc)];if(_0x340c54===_0x4e8fb4(0xd7))return _0x55c6cc+_0x4e8fb4(0xe3)+_0x380de9+'\x20chars';if(_0x340c54===_0x4e8fb4(0xae))return _0x55c6cc+'\x20lines';if(_0x340c54===_0x4e8fb4(0xd1))return _0x55c6cc+_0x4e8fb4(0xbf);if(_0x340c54[_0x4e8fb4(0xc4)]('docker'))return _0x55c6cc+_0x4e8fb4(0xa8);return _0x55c6cc+_0x4e8fb4(0xe3)+_0x380de9+_0x4e8fb4(0xa2);}function dedup(_0x4789fc,_0x221a88){const _0x3f3041=a0_0x273522;try{const _0x452c0d=classifyCommand(_0x4789fc);if(!_0x452c0d)return null;const _0x4b2d2b=TTL_SECONDS[_0x452c0d];if(!_0x4b2d2b)return null;const _0x3832c3=process[_0x3f3041(0xec)](),_0x1fcb16=md5(_0x3832c3+'::'+_0x4789fc[_0x3f3041(0xac)]()),_0xc9ea7c=md5(_0x221a88),_0x435ba8=Date[_0x3f3041(0xe8)](),_0x44c02e=loadStore(),_0x454f15=_0x44c02e[_0x1fcb16];if(_0x454f15&&_0x454f15[_0x3f3041(0xa3)]===_0xc9ea7c&&_0x435ba8-_0x454f15['timestamp']<_0x4b2d2b*0x3e8){const _0x9e7195=Math[_0x3f3041(0xde)]((_0x435ba8-_0x454f15[_0x3f3041(0xb6)])/0x3e8);return _0x3f3041(0xea)+_0x9e7195+_0x3f3041(0xbb)+_0x454f15[_0x3f3041(0xd4)]+']';}_0x44c02e[_0x1fcb16]={'hash':_0xc9ea7c,'summary':buildSummary(_0x221a88,_0x452c0d),'timestamp':_0x435ba8,'chars':_0x221a88['length']},saveStore(_0x44c02e);}catch{}return null;}
package/ccr.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x206317=a0_0x1e04;(function(_0x30cfbc,_0x55d7a2){const _0x1f1084=a0_0x1e04,_0x25c4e4=_0x30cfbc();while(!![]){try{const _0x64ddfe=parseInt(_0x1f1084(0xa5))/0x1*(parseInt(_0x1f1084(0xd4))/0x2)+-parseInt(_0x1f1084(0xb1))/0x3+parseInt(_0x1f1084(0xc4))/0x4+parseInt(_0x1f1084(0xa2))/0x5+parseInt(_0x1f1084(0xb8))/0x6+-parseInt(_0x1f1084(0xaa))/0x7*(parseInt(_0x1f1084(0xd6))/0x8)+-parseInt(_0x1f1084(0xd3))/0x9;if(_0x64ddfe===_0x55d7a2)break;else _0x25c4e4['push'](_0x25c4e4['shift']());}catch(_0xb91856){_0x25c4e4['push'](_0x25c4e4['shift']());}}}(a0_0x4c50,0xa4303));var __createBinding=this&&this[a0_0x206317(0x96)]||(Object['create']?function(_0x5a5890,_0x4b23a6,_0x165a71,_0x1a8be1){const _0x5647a5=a0_0x206317;if(_0x1a8be1===undefined)_0x1a8be1=_0x165a71;var _0x3f811b=Object[_0x5647a5(0xd1)](_0x4b23a6,_0x165a71);(!_0x3f811b||(_0x5647a5(0xb4)in _0x3f811b?!_0x4b23a6[_0x5647a5(0x9e)]:_0x3f811b['writable']||_0x3f811b[_0x5647a5(0x9c)]))&&(_0x3f811b={'enumerable':!![],'get':function(){return _0x4b23a6[_0x165a71];}}),Object[_0x5647a5(0x97)](_0x5a5890,_0x1a8be1,_0x3f811b);}:function(_0xf3d8db,_0x264afd,_0x237317,_0x189c56){if(_0x189c56===undefined)_0x189c56=_0x237317;_0xf3d8db[_0x189c56]=_0x264afd[_0x237317];}),__setModuleDefault=this&&this[a0_0x206317(0xac)]||(Object[a0_0x206317(0xbb)]?function(_0x5117f2,_0x4ff192){const _0x19e915=a0_0x206317;Object[_0x19e915(0x97)](_0x5117f2,_0x19e915(0xc1),{'enumerable':!![],'value':_0x4ff192});}:function(_0x1e90c7,_0x15ab0b){const _0x5123cc=a0_0x206317;_0x1e90c7[_0x5123cc(0xc1)]=_0x15ab0b;}),__importStar=this&&this[a0_0x206317(0xc3)]||(function(){var _0x459263=function(_0x3f8006){const _0x416b48=a0_0x1e04;return _0x459263=Object[_0x416b48(0xdb)]||function(_0x2200a6){const _0x421bf1=_0x416b48;var _0x2e55ab=[];for(var _0x2659ad in _0x2200a6)if(Object[_0x421bf1(0xa6)][_0x421bf1(0xba)][_0x421bf1(0xa1)](_0x2200a6,_0x2659ad))_0x2e55ab[_0x2e55ab[_0x421bf1(0xce)]]=_0x2659ad;return _0x2e55ab;},_0x459263(_0x3f8006);};return function(_0x37772b){if(_0x37772b&&_0x37772b['__esModule'])return _0x37772b;var _0x423055={};if(_0x37772b!=null){for(var _0x23bb4a=_0x459263(_0x37772b),_0x1333d1=0x0;_0x1333d1<_0x23bb4a['length'];_0x1333d1++)if(_0x23bb4a[_0x1333d1]!=='default')__createBinding(_0x423055,_0x37772b,_0x23bb4a[_0x1333d1]);}return __setModuleDefault(_0x423055,_0x37772b),_0x423055;};}());Object[a0_0x206317(0x97)](exports,'__esModule',{'value':!![]}),exports[a0_0x206317(0xb7)]=skeletonize,exports['runCcr']=runCcr;function a0_0x4c50(){const _0x4edd06=['getOwnPropertyDescriptor','replace','16279758nBOOyi','781486jinbpo','[TrimPrompt:\x20CCR\x20Active.\x20Body\x20of\x20functions\x20collapsed\x20to\x20save\x20tokens.\x20Hash:\x20','8FgeeKy','mkdirSync','.jsx','md5','.js','getOwnPropertyNames','tp_','startsWith','function','digest','push','__createBinding','defineProperty',']\x0a\x0a','join','.py','trim','configurable','extname','__esModule','from\x20','let','call','6687400TCJzrN','interface','.go','2WAPiHv','prototype','match','update','.java','1454551GtvosT','utf8','__setModuleDefault','path','ccr','\x20lines\x20collapsed\x20to\x20save\x20tokens]\x20...\x0a','.rs','1244865tkWdIJ','#\x20...\x20[collapsed]','pub','get','.\x20To\x20read\x20the\x20full\x20raw\x20content,\x20run\x20the\x20shell\x20command:\x20trim\x20retrieve\x20','class','skeletonize','547608sYWiGV','split','hasOwnProperty','create','.tsx','endsWith','class\x20','package','\x27\x27\x27','default','const','__importStar','3575564JpVNLQ','toLowerCase','import\x20','trimStart','homedir','crypto','repeat','\x22\x22\x22','substring','pop','length','.trimprompt','slice'];a0_0x4c50=function(){return _0x4edd06;};return a0_0x4c50();}function a0_0x1e04(_0x55a279,_0x32db2e){_0x55a279=_0x55a279-0x95;const _0x4c503e=a0_0x4c50();let _0x1e0480=_0x4c503e[_0x55a279];return _0x1e0480;}const crypto=__importStar(require(a0_0x206317(0xc9))),fs=__importStar(require('fs')),path=__importStar(require(a0_0x206317(0xad))),os=__importStar(require('os'));function skeletonize(_0x372d41,_0x274135){const _0x48dc53=a0_0x206317,_0x4707a8=path[_0x48dc53(0x9d)](_0x274135[_0x48dc53(0xb9)]('\x20')[_0x48dc53(0xcd)]()||'')[_0x48dc53(0xc5)](),_0x34d7bf=_0x372d41[_0x48dc53(0xb9)]('\x0a'),_0x2926f7=[];if(_0x4707a8===_0x48dc53(0x9a)){let _0x74fafb=![],_0x320c28='';for(let _0x4c19e2=0x0;_0x4c19e2<_0x34d7bf[_0x48dc53(0xce)];_0x4c19e2++){const _0x41f450=_0x34d7bf[_0x4c19e2],_0x1177bf=_0x41f450['trim'](),_0x44612c=_0x41f450[_0x48dc53(0xce)]-_0x41f450[_0x48dc53(0xc7)]()[_0x48dc53(0xce)];if(!_0x74fafb&&(_0x1177bf['startsWith'](_0x48dc53(0xcb))||_0x1177bf['startsWith'](_0x48dc53(0xc0)))){_0x74fafb=!![],_0x320c28=_0x1177bf['substring'](0x0,0x3),_0x2926f7[_0x48dc53(0x95)](_0x41f450);_0x1177bf['endsWith'](_0x320c28)&&_0x1177bf[_0x48dc53(0xce)]>0x3&&(_0x74fafb=![]);continue;}if(_0x74fafb){_0x2926f7[_0x48dc53(0x95)](_0x41f450);_0x1177bf[_0x48dc53(0xbd)](_0x320c28)&&(_0x74fafb=![]);continue;}if(_0x1177bf[_0x48dc53(0xdd)](_0x48dc53(0xc6))||_0x1177bf['startsWith'](_0x48dc53(0x9f))||_0x1177bf[_0x48dc53(0xdd)](_0x48dc53(0xbe))||_0x1177bf[_0x48dc53(0xdd)]('def\x20')||_0x1177bf[_0x48dc53(0xdd)]('@')||_0x1177bf[_0x48dc53(0xdd)]('#')||_0x1177bf[_0x48dc53(0xce)]===0x0)_0x2926f7['push'](_0x41f450);else{const _0x6d236=_0x2926f7[_0x2926f7[_0x48dc53(0xce)]-0x1]||'';if(!_0x6d236[_0x48dc53(0x9b)]()[_0x48dc53(0xbd)](_0x48dc53(0xb2))){const _0x254d11='\x20'[_0x48dc53(0xca)](_0x44612c);_0x2926f7[_0x48dc53(0x95)](_0x254d11+_0x48dc53(0xb2));}}}return _0x2926f7['join']('\x0a');}if([_0x48dc53(0xda),'.ts',_0x48dc53(0xd8),_0x48dc53(0xbc),_0x48dc53(0xa4),_0x48dc53(0xb0),_0x48dc53(0xa9),'.c','.cpp','.h']['includes'](_0x4707a8)){let _0x3bf915=0x0;for(let _0x34bccb=0x0;_0x34bccb<_0x34d7bf[_0x48dc53(0xce)];_0x34bccb++){const _0x3901e3=_0x34d7bf[_0x34bccb],_0x303978=_0x3901e3['trim'](),_0x1d5f9b=(_0x303978['match'](/\{/g)||[])[_0x48dc53(0xce)],_0x169ced=(_0x303978[_0x48dc53(0xa7)](/\}/g)||[])[_0x48dc53(0xce)];if(_0x3bf915===0x0)(_0x303978[_0x48dc53(0xdd)]('import')||_0x303978[_0x48dc53(0xdd)]('export')||_0x303978[_0x48dc53(0xdd)](_0x48dc53(0xc2))||_0x303978[_0x48dc53(0xdd)](_0x48dc53(0xa0))||_0x303978[_0x48dc53(0xdd)]('var')||_0x303978[_0x48dc53(0xdd)](_0x48dc53(0xb6))||_0x303978['startsWith'](_0x48dc53(0xde))||_0x303978[_0x48dc53(0xdd)](_0x48dc53(0xa3))||_0x303978['startsWith']('type')||_0x303978[_0x48dc53(0xdd)](_0x48dc53(0xbf))||_0x303978[_0x48dc53(0xdd)]('fn')||_0x303978[_0x48dc53(0xdd)](_0x48dc53(0xb3))||_0x303978[_0x48dc53(0xce)]===0x0||_0x303978[_0x48dc53(0xdd)]('//')||_0x303978[_0x48dc53(0xdd)]('/*')||_0x303978['startsWith']('*'))&&_0x2926f7[_0x48dc53(0x95)](_0x3901e3),_0x1d5f9b>_0x169ced&&(_0x3bf915+=_0x1d5f9b-_0x169ced);else{const _0x4db297=_0x3bf915+_0x1d5f9b-_0x169ced;if(_0x4db297<=0x0){const _0x405ddf=_0x3901e3[_0x48dc53(0xa7)](/^\s*/)?.[0x0]||'';_0x2926f7[_0x48dc53(0x95)](_0x405ddf+'//\x20...\x20[collapsed]'),_0x2926f7[_0x48dc53(0x95)](_0x3901e3),_0x3bf915=0x0;}else _0x3bf915=_0x4db297;}}return _0x2926f7['join']('\x0a');}if(_0x34d7bf[_0x48dc53(0xce)]<=0x64)return _0x372d41;return[..._0x34d7bf['slice'](0x0,0x1e),'\x0a...\x20['+(_0x34d7bf[_0x48dc53(0xce)]-0x32)+_0x48dc53(0xaf),..._0x34d7bf[_0x48dc53(0xd0)](-0x14)][_0x48dc53(0x99)]('\x0a');}function runCcr(_0x469d84,_0x4e28b3){const _0x10694f=a0_0x206317,_0x387b2c=_0x4e28b3[_0x10694f(0xd2)](/\\/g,'/'),_0x29f24f=_0x10694f(0xdc)+crypto['createHash'](_0x10694f(0xd9))[_0x10694f(0xa8)](_0x469d84)[_0x10694f(0xdf)]('hex')[_0x10694f(0xcc)](0x0,0xa),_0x1548e3=path[_0x10694f(0x99)](os[_0x10694f(0xc8)](),_0x10694f(0xcf)),_0x47031c=path[_0x10694f(0x99)](_0x1548e3,_0x10694f(0xae));!fs['existsSync'](_0x47031c)&&fs[_0x10694f(0xd7)](_0x47031c,{'recursive':!![]});fs['writeFileSync'](path[_0x10694f(0x99)](_0x47031c,_0x29f24f+'.txt'),_0x469d84,_0x10694f(0xab));const _0x343b20=skeletonize(_0x469d84,_0x387b2c);return _0x10694f(0xd5)+_0x29f24f+_0x10694f(0xb5)+_0x29f24f+_0x10694f(0x98)+_0x343b20;}
1
+ 'use strict';const a0_0x335423=a0_0xba9b;function a0_0xba9b(_0x680174,_0x4cd824){_0x680174=_0x680174-0x13e;const _0x402b19=a0_0x402b();let _0xba9b0=_0x402b19[_0x680174];return _0xba9b0;}(function(_0x2c8a65,_0x3c5292){const _0x5a56d2=a0_0xba9b,_0x3ab741=_0x2c8a65();while(!![]){try{const _0x2d193e=parseInt(_0x5a56d2(0x147))/0x1*(parseInt(_0x5a56d2(0x16f))/0x2)+parseInt(_0x5a56d2(0x152))/0x3+parseInt(_0x5a56d2(0x141))/0x4+parseInt(_0x5a56d2(0x177))/0x5+parseInt(_0x5a56d2(0x153))/0x6*(parseInt(_0x5a56d2(0x17a))/0x7)+-parseInt(_0x5a56d2(0x170))/0x8+-parseInt(_0x5a56d2(0x148))/0x9*(parseInt(_0x5a56d2(0x146))/0xa);if(_0x2d193e===_0x3c5292)break;else _0x3ab741['push'](_0x3ab741['shift']());}catch(_0x287357){_0x3ab741['push'](_0x3ab741['shift']());}}}(a0_0x402b,0xee6ce));var __createBinding=this&&this[a0_0x335423(0x14d)]||(Object[a0_0x335423(0x181)]?function(_0x2a71f2,_0x309270,_0xce8ace,_0x3f62f6){const _0x373692=a0_0x335423;if(_0x3f62f6===undefined)_0x3f62f6=_0xce8ace;var _0x1f13f5=Object['getOwnPropertyDescriptor'](_0x309270,_0xce8ace);(!_0x1f13f5||('get'in _0x1f13f5?!_0x309270[_0x373692(0x155)]:_0x1f13f5[_0x373692(0x149)]||_0x1f13f5[_0x373692(0x186)]))&&(_0x1f13f5={'enumerable':!![],'get':function(){return _0x309270[_0xce8ace];}}),Object['defineProperty'](_0x2a71f2,_0x3f62f6,_0x1f13f5);}:function(_0x151e00,_0x32a451,_0x5f550c,_0x344aab){if(_0x344aab===undefined)_0x344aab=_0x5f550c;_0x151e00[_0x344aab]=_0x32a451[_0x5f550c];}),__setModuleDefault=this&&this[a0_0x335423(0x13f)]||(Object[a0_0x335423(0x181)]?function(_0x429147,_0xa54201){const _0x583928=a0_0x335423;Object[_0x583928(0x143)](_0x429147,_0x583928(0x15f),{'enumerable':!![],'value':_0xa54201});}:function(_0x4c4bd4,_0x11388d){const _0x2fffe0=a0_0x335423;_0x4c4bd4[_0x2fffe0(0x15f)]=_0x11388d;}),__importStar=this&&this[a0_0x335423(0x15b)]||(function(){var _0x1f0dc4=function(_0x9e72d5){const _0x4604ba=a0_0xba9b;return _0x1f0dc4=Object[_0x4604ba(0x168)]||function(_0x3f1021){const _0xa4b67f=_0x4604ba;var _0x5046b5=[];for(var _0x2177f3 in _0x3f1021)if(Object[_0xa4b67f(0x17d)][_0xa4b67f(0x145)]['call'](_0x3f1021,_0x2177f3))_0x5046b5[_0x5046b5[_0xa4b67f(0x182)]]=_0x2177f3;return _0x5046b5;},_0x1f0dc4(_0x9e72d5);};return function(_0x201b41){const _0x211abc=a0_0xba9b;if(_0x201b41&&_0x201b41[_0x211abc(0x155)])return _0x201b41;var _0x12ccee={};if(_0x201b41!=null){for(var _0x24faa2=_0x1f0dc4(_0x201b41),_0x27e14a=0x0;_0x27e14a<_0x24faa2['length'];_0x27e14a++)if(_0x24faa2[_0x27e14a]!==_0x211abc(0x15f))__createBinding(_0x12ccee,_0x201b41,_0x24faa2[_0x27e14a]);}return __setModuleDefault(_0x12ccee,_0x201b41),_0x12ccee;};}());Object[a0_0x335423(0x143)](exports,a0_0x335423(0x155),{'value':!![]}),exports['skeletonize']=skeletonize,exports['runCcr']=runCcr;function a0_0x402b(){const _0x4d0d75=['ccr','hex','[TrimPrompt:\x20CCR\x20Active.\x20Body\x20of\x20functions\x20collapsed\x20to\x20save\x20tokens.\x20Hash:\x20','replace','createHash','__importStar','trimStart','const','\x22\x22\x22','default',']\x0a\x0a','startsWith','.ts','.jsx','homedir','path','//\x20...\x20[collapsed]','let','getOwnPropertyNames','writeFileSync','pub','utf8','toLowerCase','function','package','514zpYRZU','88960kOSMjF','\x20lines\x20collapsed\x20to\x20save\x20tokens]\x20...\x0a','digest','.rs','#\x20...\x20[collapsed]','join','import\x20','5329170YtzjPZ','pop','endsWith','7UWlVyy','trim','\x0a...\x20[','prototype','export','.py','update','create','length','mkdirSync','match','.tsx','configurable','extname','__setModuleDefault','.js','3163176CYfFBx','.java','defineProperty','existsSync','hasOwnProperty','10iYVFGv','1009hDpVxZ','27865062wPwjsC','writable','type','\x27\x27\x27','import','__createBinding','push','slice','split','md5','536802xIdREY','10733718cnQlZx','.\x20To\x20read\x20the\x20full\x20raw\x20content,\x20run\x20the\x20shell\x20command:\x20trim\x20retrieve\x20','__esModule'];a0_0x402b=function(){return _0x4d0d75;};return a0_0x402b();}const crypto=__importStar(require('crypto')),fs=__importStar(require('fs')),path=__importStar(require(a0_0x335423(0x165))),os=__importStar(require('os'));function skeletonize(_0x51a168,_0x1dfb62){const _0x257aa5=a0_0x335423,_0x301816=path[_0x257aa5(0x13e)](_0x1dfb62[_0x257aa5(0x150)]('\x20')[_0x257aa5(0x178)]()||'')[_0x257aa5(0x16c)](),_0x4aee5e=_0x51a168[_0x257aa5(0x150)]('\x0a'),_0x481e05=[];if(_0x301816===_0x257aa5(0x17f)){let _0xf90309=![],_0x460cfb='';for(let _0x213bf1=0x0;_0x213bf1<_0x4aee5e[_0x257aa5(0x182)];_0x213bf1++){const _0x54e2b1=_0x4aee5e[_0x213bf1],_0xe1c671=_0x54e2b1[_0x257aa5(0x17b)](),_0x1a5d21=_0x54e2b1[_0x257aa5(0x182)]-_0x54e2b1[_0x257aa5(0x15c)]()['length'];if(!_0xf90309&&(_0xe1c671[_0x257aa5(0x161)](_0x257aa5(0x15e))||_0xe1c671[_0x257aa5(0x161)](_0x257aa5(0x14b)))){_0xf90309=!![],_0x460cfb=_0xe1c671['substring'](0x0,0x3),_0x481e05[_0x257aa5(0x14e)](_0x54e2b1);_0xe1c671['endsWith'](_0x460cfb)&&_0xe1c671[_0x257aa5(0x182)]>0x3&&(_0xf90309=![]);continue;}if(_0xf90309){_0x481e05[_0x257aa5(0x14e)](_0x54e2b1);_0xe1c671[_0x257aa5(0x179)](_0x460cfb)&&(_0xf90309=![]);continue;}if(_0xe1c671[_0x257aa5(0x161)](_0x257aa5(0x176))||_0xe1c671[_0x257aa5(0x161)]('from\x20')||_0xe1c671[_0x257aa5(0x161)]('class\x20')||_0xe1c671[_0x257aa5(0x161)]('def\x20')||_0xe1c671[_0x257aa5(0x161)]('@')||_0xe1c671[_0x257aa5(0x161)]('#')||_0xe1c671['length']===0x0)_0x481e05[_0x257aa5(0x14e)](_0x54e2b1);else{const _0xba5a77=_0x481e05[_0x481e05[_0x257aa5(0x182)]-0x1]||'';if(!_0xba5a77['trim']()['endsWith'](_0x257aa5(0x174))){const _0x2ea5b5='\x20'['repeat'](_0x1a5d21);_0x481e05[_0x257aa5(0x14e)](_0x2ea5b5+_0x257aa5(0x174));}}}return _0x481e05['join']('\x0a');}if([_0x257aa5(0x140),_0x257aa5(0x162),_0x257aa5(0x163),_0x257aa5(0x185),'.go',_0x257aa5(0x173),_0x257aa5(0x142),'.c','.cpp','.h']['includes'](_0x301816)){let _0x33da83=0x0;for(let _0x23add1=0x0;_0x23add1<_0x4aee5e[_0x257aa5(0x182)];_0x23add1++){const _0x1da68a=_0x4aee5e[_0x23add1],_0x4390e0=_0x1da68a['trim'](),_0x584e11=(_0x4390e0[_0x257aa5(0x184)](/\{/g)||[])[_0x257aa5(0x182)],_0x4ffb9d=(_0x4390e0['match'](/\}/g)||[])[_0x257aa5(0x182)];if(_0x33da83===0x0)(_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x14c))||_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x17e))||_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x15d))||_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x167))||_0x4390e0[_0x257aa5(0x161)]('var')||_0x4390e0[_0x257aa5(0x161)]('class')||_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x16d))||_0x4390e0[_0x257aa5(0x161)]('interface')||_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x14a))||_0x4390e0[_0x257aa5(0x161)](_0x257aa5(0x16e))||_0x4390e0[_0x257aa5(0x161)]('fn')||_0x4390e0['startsWith'](_0x257aa5(0x16a))||_0x4390e0[_0x257aa5(0x182)]===0x0||_0x4390e0[_0x257aa5(0x161)]('//')||_0x4390e0['startsWith']('/*')||_0x4390e0[_0x257aa5(0x161)]('*'))&&_0x481e05[_0x257aa5(0x14e)](_0x1da68a),_0x584e11>_0x4ffb9d&&(_0x33da83+=_0x584e11-_0x4ffb9d);else{const _0x130710=_0x33da83+_0x584e11-_0x4ffb9d;if(_0x130710<=0x0){const _0x3a8986=_0x1da68a[_0x257aa5(0x184)](/^\s*/)?.[0x0]||'';_0x481e05[_0x257aa5(0x14e)](_0x3a8986+_0x257aa5(0x166)),_0x481e05[_0x257aa5(0x14e)](_0x1da68a),_0x33da83=0x0;}else _0x33da83=_0x130710;}}return _0x481e05[_0x257aa5(0x175)]('\x0a');}if(_0x4aee5e[_0x257aa5(0x182)]<=0x64)return _0x51a168;return[..._0x4aee5e[_0x257aa5(0x14f)](0x0,0x1e),_0x257aa5(0x17c)+(_0x4aee5e['length']-0x32)+_0x257aa5(0x171),..._0x4aee5e[_0x257aa5(0x14f)](-0x14)][_0x257aa5(0x175)]('\x0a');}function runCcr(_0x158f53,_0x58198d){const _0x517d3e=a0_0x335423,_0x441546=_0x58198d[_0x517d3e(0x159)](/\\/g,'/'),_0x3e921d='tp_'+crypto[_0x517d3e(0x15a)](_0x517d3e(0x151))[_0x517d3e(0x180)](_0x158f53)[_0x517d3e(0x172)](_0x517d3e(0x157))['substring'](0x0,0xa),_0x4c3aee=path[_0x517d3e(0x175)](os[_0x517d3e(0x164)](),'.trimprompt'),_0x4721eb=path[_0x517d3e(0x175)](_0x4c3aee,_0x517d3e(0x156));!fs[_0x517d3e(0x144)](_0x4721eb)&&fs[_0x517d3e(0x183)](_0x4721eb,{'recursive':!![]});fs[_0x517d3e(0x169)](path[_0x517d3e(0x175)](_0x4721eb,_0x3e921d+'.txt'),_0x158f53,_0x517d3e(0x16b));const _0x5913b8=skeletonize(_0x158f53,_0x441546);return _0x517d3e(0x158)+_0x3e921d+_0x517d3e(0x154)+_0x3e921d+_0x517d3e(0x160)+_0x5913b8;}
package/cli.js CHANGED
@@ -108,6 +108,14 @@ async function runProxy(args) {
108
108
  program.help();
109
109
  return;
110
110
  }
111
+ if (!hasMarker('.welcomed')) {
112
+ process.stderr.write(`\n[TrimPrompt] Installed! Please restart your terminal/editor (Cursor/Claude) for optimizations to take effect.\n\n`);
113
+ setMarker('.welcomed');
114
+ if (!hasMarker('.install_pinged')) {
115
+ setMarker('.install_pinged');
116
+ fireDomainInstallPing();
117
+ }
118
+ }
111
119
  const rawCmd = args[0];
112
120
  const rawArgs = args.slice(1);
113
121
  const commandLine = args.join(' ');
@@ -162,7 +170,7 @@ async function runProxy(args) {
162
170
  process.exit(result.exitCode);
163
171
  }
164
172
  const PKG_VERSION = (() => {
165
- const version = '1.0.46';
173
+ const version = '1.0.48';
166
174
  if (version !== '__VERSION__')
167
175
  return version;
168
176
  try {
package/dashboard.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x1fbc46=a0_0x4f84;(function(_0x325096,_0x1c964e){const _0x117ff7=a0_0x4f84,_0x5670d8=_0x325096();while(!![]){try{const _0x182012=-parseInt(_0x117ff7(0x1cd))/0x1*(-parseInt(_0x117ff7(0x1cc))/0x2)+parseInt(_0x117ff7(0x1ae))/0x3*(parseInt(_0x117ff7(0x186))/0x4)+-parseInt(_0x117ff7(0x188))/0x5+parseInt(_0x117ff7(0x16d))/0x6*(-parseInt(_0x117ff7(0x190))/0x7)+parseInt(_0x117ff7(0x1d4))/0x8*(parseInt(_0x117ff7(0x1b3))/0x9)+-parseInt(_0x117ff7(0x180))/0xa+-parseInt(_0x117ff7(0x17f))/0xb;if(_0x182012===_0x1c964e)break;else _0x5670d8['push'](_0x5670d8['shift']());}catch(_0xd7cf90){_0x5670d8['push'](_0x5670d8['shift']());}}}(a0_0x5cfb,0x6ed5d));var __createBinding=this&&this[a0_0x1fbc46(0x19e)]||(Object['create']?function(_0x3b7bc0,_0x44db2b,_0x316d53,_0x2d5bf9){const _0xc813f9=a0_0x1fbc46;if(_0x2d5bf9===undefined)_0x2d5bf9=_0x316d53;var _0x307601=Object['getOwnPropertyDescriptor'](_0x44db2b,_0x316d53);(!_0x307601||(_0xc813f9(0x177)in _0x307601?!_0x44db2b['__esModule']:_0x307601[_0xc813f9(0x1d3)]||_0x307601[_0xc813f9(0x185)]))&&(_0x307601={'enumerable':!![],'get':function(){return _0x44db2b[_0x316d53];}}),Object[_0xc813f9(0x179)](_0x3b7bc0,_0x2d5bf9,_0x307601);}:function(_0x45eab2,_0x1ecc9b,_0x270856,_0x2e31fe){if(_0x2e31fe===undefined)_0x2e31fe=_0x270856;_0x45eab2[_0x2e31fe]=_0x1ecc9b[_0x270856];}),__setModuleDefault=this&&this[a0_0x1fbc46(0x1d2)]||(Object[a0_0x1fbc46(0x1c9)]?function(_0x4429e4,_0x1bddaa){const _0x13e8e5=a0_0x1fbc46;Object[_0x13e8e5(0x179)](_0x4429e4,_0x13e8e5(0x174),{'enumerable':!![],'value':_0x1bddaa});}:function(_0x2b97ff,_0x418c95){const _0x5b7541=a0_0x1fbc46;_0x2b97ff[_0x5b7541(0x174)]=_0x418c95;}),__importStar=this&&this[a0_0x1fbc46(0x1c5)]||(function(){var _0x4252d9=function(_0x342a63){const _0xb0d154=a0_0x4f84;return _0x4252d9=Object[_0xb0d154(0x1b5)]||function(_0x56a180){const _0x3a264c=_0xb0d154;var _0x351ba0=[];for(var _0x3c2e1d in _0x56a180)if(Object[_0x3a264c(0x176)]['hasOwnProperty'][_0x3a264c(0x175)](_0x56a180,_0x3c2e1d))_0x351ba0[_0x351ba0[_0x3a264c(0x184)]]=_0x3c2e1d;return _0x351ba0;},_0x4252d9(_0x342a63);};return function(_0xd86d3f){const _0x5bf5bb=a0_0x4f84;if(_0xd86d3f&&_0xd86d3f['__esModule'])return _0xd86d3f;var _0x348cfb={};if(_0xd86d3f!=null){for(var _0x34b6f3=_0x4252d9(_0xd86d3f),_0x41a739=0x0;_0x41a739<_0x34b6f3[_0x5bf5bb(0x184)];_0x41a739++)if(_0x34b6f3[_0x41a739]!=='default')__createBinding(_0x348cfb,_0xd86d3f,_0x34b6f3[_0x41a739]);}return __setModuleDefault(_0x348cfb,_0xd86d3f),_0x348cfb;};}()),__importDefault=this&&this[a0_0x1fbc46(0x181)]||function(_0x1245a4){const _0x3d4a7b=a0_0x1fbc46;return _0x1245a4&&_0x1245a4[_0x3d4a7b(0x1e0)]?_0x1245a4:{'default':_0x1245a4};};Object[a0_0x1fbc46(0x179)](exports,a0_0x1fbc46(0x1e0),{'value':!![]}),exports[a0_0x1fbc46(0x1c8)]=startDashboard;const express_1=__importDefault(require('express')),path=__importStar(require(a0_0x1fbc46(0x1df))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x1fbc46(0x1de))),tracker_1=require(a0_0x1fbc46(0x1e5)),app=(0x0,express_1['default'])();function a0_0x5cfb(){const _0x22a89d=['Missing\x20agentKey','argv','find','Raw\x20output\x20log\x20file\x20not\x20found.','kill','log','reason','__createBinding','logs','slice','.trimprompt','listen','filter','win32','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','error','then','No\x20compressible\x20content\x20found\x20in\x20this\x20session','copilot','includes','/api/config/toggle','--headless','json','1243374viiQlP','Compressed\x20output\x20log\x20file\x20not\x20found.','/api/stats/inspect/:id','message','SIGINT','5709402HWTclW','Directory\x20not\x20found','getOwnPropertyNames','now','exit','aider','getConfig','execPath','openclaw','join','SIGTERM','compactPath','child_process','http://localhost:','.comp.txt','opencode','explorer\x20\x22','/api/config/features','__importStar','conv:','ignore','startDashboard','create','cli.js','body','1456556ARrWnr','1nUobEe','codex','getStatsSummary','start','use','__setModuleDefault','writable','8YRUkWh','getLogs','index.html','resolve','catch','/favicon.png','features_enabled','post','../src/favicon.png','/api/config','open','path','__esModule','EADDRINUSE','existsSync','status','darwin','./tracker','5172qRARyd','platform','payload','lastModified','No\x20active\x20session\x20file\x20found','fullPath','reductionPct','default','call','prototype','get','command','defineProperty','favicon.png','homedir','activeSavedTokens','params','claude','5773306BozPMj','3533660xNjgud','__importDefault','utf8','Missing\x20key','length','configurable','8WEmfql','timestamp','2917695MHogAd','/api/config/open-dir','tracker','[TrimPrompt]\x20Dashboard\x20error:\x20','cursor','/api/agent/compact','readFileSync','sendFile','2240yYARvF','.raw.txt','/api/stats/summary','xdg-open\x20\x22','/api/config/custom-path','model','./file-watcher'];a0_0x5cfb=function(){return _0x22a89d;};return a0_0x5cfb();}app[a0_0x1fbc46(0x1d1)](express_1[a0_0x1fbc46(0x174)][a0_0x1fbc46(0x1ad)]());const baseDir=path[a0_0x1fbc46(0x1bc)](os[a0_0x1fbc46(0x17b)](),a0_0x1fbc46(0x1a1)),logsDir=path[a0_0x1fbc46(0x1bc)](baseDir,a0_0x1fbc46(0x19f));let configPayloadCache=null;const CONFIG_CACHE_TTL_MS=0x2710;function invalidateConfigCache(){configPayloadCache=null;}function a0_0x4f84(_0x784d6a,_0x352a){_0x784d6a=_0x784d6a-0x16d;const _0x5cfbda=a0_0x5cfb();let _0x4f849d=_0x5cfbda[_0x784d6a];return _0x4f849d;}app[a0_0x1fbc46(0x177)]('/',(_0x53c8c4,_0x9a7bcb)=>{const _0xa7f589=a0_0x1fbc46,_0x5bc6d5=path[_0xa7f589(0x1bc)](__dirname,_0xa7f589(0x1d6));fs[_0xa7f589(0x1e2)](_0x5bc6d5)?_0x9a7bcb[_0xa7f589(0x18f)](_0x5bc6d5):_0x9a7bcb['sendFile'](path[_0xa7f589(0x1bc)](__dirname,'../src/index.html'));}),app[a0_0x1fbc46(0x177)](a0_0x1fbc46(0x1d9),(_0x546880,_0x1a319d)=>{const _0x693dea=a0_0x1fbc46,_0x1d81c9=path['join'](__dirname,_0x693dea(0x17a));fs[_0x693dea(0x1e2)](_0x1d81c9)?_0x1a319d['sendFile'](_0x1d81c9):_0x1a319d[_0x693dea(0x18f)](path[_0x693dea(0x1bc)](__dirname,_0x693dea(0x1dc)));}),app[a0_0x1fbc46(0x177)](a0_0x1fbc46(0x192),(_0x140ccf,_0x5c93cc)=>{const _0x52a90e=a0_0x1fbc46,_0x132241=_0x140ccf['query'][_0x52a90e(0x195)]||'auto',_0x16dda0=tracker_1[_0x52a90e(0x18a)][_0x52a90e(0x1cf)](_0x132241);_0x5c93cc[_0x52a90e(0x1ad)](_0x16dda0);}),app[a0_0x1fbc46(0x177)]('/api/stats/history',(_0xff49da,_0xb53c84)=>{const _0xc96c9d=a0_0x1fbc46,_0x368c3c=tracker_1[_0xc96c9d(0x18a)][_0xc96c9d(0x1d5)]();_0xb53c84[_0xc96c9d(0x1ad)](_0x368c3c[_0xc96c9d(0x184)]>0x1f4?_0x368c3c[_0xc96c9d(0x1a0)](-0x1f4):_0x368c3c);}),app[a0_0x1fbc46(0x177)](a0_0x1fbc46(0x1b0),(_0x3ac379,_0x36954c)=>{const _0x9b3aef=a0_0x1fbc46,_0x252a8b=_0x3ac379[_0x9b3aef(0x17d)]['id'],_0x119253=path[_0x9b3aef(0x1bc)](logsDir,_0x252a8b+_0x9b3aef(0x191)),_0x1f2d70=path[_0x9b3aef(0x1bc)](logsDir,_0x252a8b+_0x9b3aef(0x1c1));let _0x36405f=_0x9b3aef(0x19a),_0x56a836=_0x9b3aef(0x1af);try{fs[_0x9b3aef(0x1e2)](_0x119253)&&(_0x36405f=fs['readFileSync'](_0x119253,_0x9b3aef(0x182))),fs['existsSync'](_0x1f2d70)&&(_0x56a836=fs[_0x9b3aef(0x18e)](_0x1f2d70,_0x9b3aef(0x182)));}catch(_0x455821){}_0x36954c[_0x9b3aef(0x1ad)]({'id':_0x252a8b,'raw':_0x36405f,'compressed':_0x56a836});}),app['get']('/api/config/features',(_0x1ae296,_0x3424a5)=>{const _0x4b8930=a0_0x1fbc46,_0x11d5e1=tracker_1[_0x4b8930(0x18a)][_0x4b8930(0x1b9)]();_0x3424a5[_0x4b8930(0x1ad)](_0x11d5e1['features_enabled']||{});}),app[a0_0x1fbc46(0x1db)](a0_0x1fbc46(0x1c4),(_0x271a0f,_0x2529bd)=>{const _0x2181a0=a0_0x1fbc46,_0x3e2ae3=_0x271a0f[_0x2181a0(0x1cb)];tracker_1['tracker']['setConfig'](_0x2181a0(0x1da),_0x3e2ae3),invalidateConfigCache(),_0x2529bd[_0x2181a0(0x1ad)]({'ok':!![]});}),app[a0_0x1fbc46(0x1db)](a0_0x1fbc46(0x18d),async(_0x17c94e,_0x2130e7)=>{const _0x3cdd1f=a0_0x1fbc46;try{const {getLatestSessionFile:_0x56ec34,compactSessionCopy:_0x4ec027}=await Promise[_0x3cdd1f(0x1d7)]()['then'](()=>__importStar(require('./file-watcher'))),{agentKey:_0x440a1d}=_0x17c94e['body']||{},_0x58672a=_0x440a1d||_0x3cdd1f(0x17e),_0x2c490f=_0x56ec34(_0x58672a);if(_0x2c490f&&_0x2c490f[_0x3cdd1f(0x172)]&&fs[_0x3cdd1f(0x1e2)](_0x2c490f[_0x3cdd1f(0x172)])){const _0x2fee21=_0x4ec027(_0x2c490f[_0x3cdd1f(0x172)],_0x58672a);_0x2fee21['ok']&&(_0x2fee21['savedTokens']||0x0)>0x0?_0x2130e7[_0x3cdd1f(0x1ad)]({'ok':!![],'fileName':_0x2c490f['fileName'],'tokensSaved':_0x2fee21['savedTokens'],'rawTokens':_0x2fee21['rawTokens'],'compressedTokens':_0x2fee21['compressedTokens'],'reductionPct':_0x2fee21[_0x3cdd1f(0x173)],'compactPath':_0x2fee21[_0x3cdd1f(0x1be)]}):_0x2130e7['json']({'ok':![],'message':_0x2fee21[_0x3cdd1f(0x19d)]||_0x3cdd1f(0x1a8)});}else _0x2130e7[_0x3cdd1f(0x1ad)]({'ok':![],'message':_0x3cdd1f(0x171)});}catch(_0x3bb928){_0x2130e7[_0x3cdd1f(0x1e3)](0x1f4)[_0x3cdd1f(0x1ad)]({'ok':![],'error':_0x3bb928[_0x3cdd1f(0x1b1)]});}}),app[a0_0x1fbc46(0x177)](a0_0x1fbc46(0x1dd),async(_0x15c2f7,_0x5c2ce0)=>{const _0x619907=a0_0x1fbc46;if(configPayloadCache&&Date[_0x619907(0x1b6)]()-configPayloadCache['at']<CONFIG_CACHE_TTL_MS)return _0x5c2ce0[_0x619907(0x1ad)](configPayloadCache[_0x619907(0x16f)]);const {loadConfig:_0x2af485,getAgentStoragePaths:_0x458d78,getLatestSessionFile:_0x52c765,loadSessionsState:_0x588e5d}=await Promise[_0x619907(0x1d7)]()[_0x619907(0x1a7)](()=>__importStar(require(_0x619907(0x196)))),_0x48745b=_0x2af485(),_0x164315=[_0x619907(0x17e),'gemini',_0x619907(0x1ce),_0x619907(0x18c),_0x619907(0x1b8),_0x619907(0x1a9),_0x619907(0x1bb),_0x619907(0x1c2),'cortex'],_0x13a638={},_0x1d8189={},_0x385b05={},_0x15680e=_0x588e5d(),_0x1cde8c=tracker_1[_0x619907(0x18a)]['getLogs']()||[];for(const _0x3091c4 of _0x164315){_0x13a638[_0x3091c4]=_0x458d78(_0x3091c4);const _0x14440d=_0x52c765(_0x3091c4);if(_0x14440d&&_0x14440d[_0x619907(0x172)]&&_0x15680e[_0x14440d['fullPath']])_0x14440d['activeSavedTokens']=_0x15680e[_0x14440d[_0x619907(0x172)]][_0x619907(0x17c)]||0x0;else{if(_0x14440d)_0x14440d[_0x619907(0x17c)]=0x0;}_0x385b05[_0x3091c4]=_0x14440d;const _0x1466d2=_0x1cde8c[_0x619907(0x1a3)](_0x5459c1=>_0x5459c1[_0x619907(0x178)]&&_0x5459c1[_0x619907(0x178)][_0x619907(0x1aa)](_0x619907(0x1c6)+_0x3091c4));_0x1466d2['length']>0x0?_0x1d8189[_0x3091c4]=_0x1466d2[_0x1466d2['length']-0x1][_0x619907(0x187)]:_0x1d8189[_0x3091c4]=_0x14440d?_0x14440d[_0x619907(0x170)]:null;}const _0x441936={..._0x48745b,'resolvedPaths':_0x13a638,'lastActiveTimestamps':_0x1d8189,'latestSessions':_0x385b05};configPayloadCache={'at':Date[_0x619907(0x1b6)](),'payload':_0x441936},_0x5c2ce0[_0x619907(0x1ad)](_0x441936);}),app[a0_0x1fbc46(0x1db)](a0_0x1fbc46(0x189),async(_0x374126,_0x27390b)=>{const _0x396757=a0_0x1fbc46,{getAgentStoragePaths:_0x126aea}=await Promise[_0x396757(0x1d7)]()[_0x396757(0x1a7)](()=>__importStar(require(_0x396757(0x196)))),{agentKey:_0x4cf6ce}=_0x374126[_0x396757(0x1cb)]||{};if(!_0x4cf6ce)return _0x27390b[_0x396757(0x1e3)](0x190)[_0x396757(0x1ad)]({'error':_0x396757(0x197)});const _0x59d870=_0x126aea(_0x4cf6ce),_0x1f3f5f=_0x59d870[_0x396757(0x199)](_0x1ba4a5=>fs[_0x396757(0x1e2)](_0x1ba4a5))||_0x59d870[0x0];if(_0x1f3f5f){if(!fs[_0x396757(0x1e2)](_0x1f3f5f))try{fs['mkdirSync'](_0x1f3f5f,{'recursive':!![]});}catch{}const {exec:_0x59488d}=await Promise[_0x396757(0x1d7)]()[_0x396757(0x1a7)](()=>__importStar(require(_0x396757(0x1bf)))),_0x10e4ac=process[_0x396757(0x16e)]===_0x396757(0x1a4)?_0x396757(0x1c3)+_0x1f3f5f+'\x22':process[_0x396757(0x16e)]===_0x396757(0x1e4)?'open\x20\x22'+_0x1f3f5f+'\x22':_0x396757(0x193)+_0x1f3f5f+'\x22';return _0x59488d(_0x10e4ac),_0x27390b[_0x396757(0x1ad)]({'success':!![],'openedPath':_0x1f3f5f});}_0x27390b[_0x396757(0x1e3)](0x194)[_0x396757(0x1ad)]({'error':_0x396757(0x1b4)});}),app[a0_0x1fbc46(0x1db)](a0_0x1fbc46(0x1ab),async(_0x1a47f0,_0x169873)=>{const _0x1b3c6c=a0_0x1fbc46,{saveConfig:_0x5aa2af}=await Promise[_0x1b3c6c(0x1d7)]()[_0x1b3c6c(0x1a7)](()=>__importStar(require(_0x1b3c6c(0x196)))),{key:_0x571537,value:_0x544c03}=_0x1a47f0[_0x1b3c6c(0x1cb)]||{};if(_0x571537){const _0x56a6e6=_0x5aa2af({'conversation_toggles':{[_0x571537]:_0x544c03}});return invalidateConfigCache(),_0x169873[_0x1b3c6c(0x1ad)](_0x56a6e6);}_0x169873[_0x1b3c6c(0x1e3)](0x190)['json']({'error':_0x1b3c6c(0x183)});}),app['post'](a0_0x1fbc46(0x194),async(_0x35276b,_0x2bc3e3)=>{const _0x2db46d=a0_0x1fbc46,{saveConfig:_0x761a50}=await Promise['resolve']()['then'](()=>__importStar(require(_0x2db46d(0x196)))),{agentKey:_0x4e3261,path:_0x3cded8}=_0x35276b[_0x2db46d(0x1cb)]||{};if(_0x4e3261){const _0x4f25a4=_0x761a50({'custom_storage_paths':{[_0x4e3261]:_0x3cded8||null}});return invalidateConfigCache(),_0x2bc3e3[_0x2db46d(0x1ad)](_0x4f25a4);}_0x2bc3e3['status'](0x190)['json']({'error':'Missing\x20agentKey'});});function startDashboard(_0x4d87ce=0xfa0){const _0x12cc97=a0_0x1fbc46;let _0x153efb=_0x4d87ce;const _0x1293cd=process[_0x12cc97(0x198)][_0x12cc97(0x1aa)](_0x12cc97(0x1ac))||process.env.TRIMPROMPT_HEADLESS==='1',_0x32f908=app[_0x12cc97(0x1a2)](_0x153efb,()=>{const _0x285ac7=_0x12cc97,_0x2c6d34=_0x285ac7(0x1c0)+_0x153efb;!_0x1293cd&&(console[_0x285ac7(0x19c)](_0x285ac7(0x1a5)+_0x2c6d34),console[_0x285ac7(0x19c)]('Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.'));try{const {spawn:_0xc73a1e}=require('child_process'),_0x3f4d3a=_0xc73a1e(process[_0x285ac7(0x1ba)],[path[_0x285ac7(0x1bc)](__dirname,_0x285ac7(0x1ca)),'watcher',_0x285ac7(0x1d0)],{'stdio':_0x285ac7(0x1c7),'windowsHide':!![]}),_0x340313=()=>{const _0xd14f6b=_0x285ac7;try{_0x3f4d3a[_0xd14f6b(0x19b)]();}catch{}};process['on'](_0x285ac7(0x1b7),_0x340313),process['on'](_0x285ac7(0x1b2),()=>{_0x340313(),process['exit'](0x0);}),process['on'](_0x285ac7(0x1bd),()=>{_0x340313(),process['exit'](0x0);});}catch{}!_0x1293cd&&process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1[_0x285ac7(0x174)])(_0x2c6d34)[_0x285ac7(0x1d8)](()=>{});});_0x32f908['on'](_0x12cc97(0x1a6),_0x45000c=>{const _0x24e606=_0x12cc97;_0x45000c['code']===_0x24e606(0x1e1)?startDashboard(_0x153efb+0x1):console[_0x24e606(0x1a6)](_0x24e606(0x18b)+_0x45000c[_0x24e606(0x1b1)]);});}
1
+ 'use strict';const a0_0x5bdb90=a0_0x1d71;(function(_0x36d5bd,_0x1087f7){const _0x4941a9=a0_0x1d71,_0x3510a6=_0x36d5bd();while(!![]){try{const _0x43c05a=-parseInt(_0x4941a9(0xf3))/0x1*(-parseInt(_0x4941a9(0x112))/0x2)+-parseInt(_0x4941a9(0xfd))/0x3+-parseInt(_0x4941a9(0x12b))/0x4+parseInt(_0x4941a9(0x146))/0x5+-parseInt(_0x4941a9(0xf2))/0x6*(-parseInt(_0x4941a9(0x148))/0x7)+-parseInt(_0x4941a9(0x14e))/0x8*(parseInt(_0x4941a9(0x141))/0x9)+-parseInt(_0x4941a9(0x161))/0xa*(parseInt(_0x4941a9(0xf0))/0xb);if(_0x43c05a===_0x1087f7)break;else _0x3510a6['push'](_0x3510a6['shift']());}catch(_0x12f7f3){_0x3510a6['push'](_0x3510a6['shift']());}}}(a0_0x54d3,0x31897));var __createBinding=this&&this['__createBinding']||(Object[a0_0x5bdb90(0x114)]?function(_0x53c1f9,_0x5bb9c8,_0xbc7e9d,_0x4605d8){const _0x128cb5=a0_0x5bdb90;if(_0x4605d8===undefined)_0x4605d8=_0xbc7e9d;var _0xd4c26a=Object[_0x128cb5(0x11a)](_0x5bb9c8,_0xbc7e9d);(!_0xd4c26a||(_0x128cb5(0x102)in _0xd4c26a?!_0x5bb9c8[_0x128cb5(0x118)]:_0xd4c26a[_0x128cb5(0x145)]||_0xd4c26a[_0x128cb5(0x121)]))&&(_0xd4c26a={'enumerable':!![],'get':function(){return _0x5bb9c8[_0xbc7e9d];}}),Object[_0x128cb5(0x14a)](_0x53c1f9,_0x4605d8,_0xd4c26a);}:function(_0x58388a,_0x269be7,_0x1f4c88,_0x53baa1){if(_0x53baa1===undefined)_0x53baa1=_0x1f4c88;_0x58388a[_0x53baa1]=_0x269be7[_0x1f4c88];}),__setModuleDefault=this&&this[a0_0x5bdb90(0x142)]||(Object[a0_0x5bdb90(0x114)]?function(_0x5028b8,_0x3f8716){const _0x5860ff=a0_0x5bdb90;Object[_0x5860ff(0x14a)](_0x5028b8,_0x5860ff(0xfa),{'enumerable':!![],'value':_0x3f8716});}:function(_0x31601c,_0x133676){const _0x4f7368=a0_0x5bdb90;_0x31601c[_0x4f7368(0xfa)]=_0x133676;}),__importStar=this&&this[a0_0x5bdb90(0x147)]||(function(){var _0x544d73=function(_0x4e6d00){return _0x544d73=Object['getOwnPropertyNames']||function(_0x30f855){const _0x5e6f95=a0_0x1d71;var _0x2aef4b=[];for(var _0x13080c in _0x30f855)if(Object[_0x5e6f95(0x132)][_0x5e6f95(0x106)][_0x5e6f95(0x150)](_0x30f855,_0x13080c))_0x2aef4b[_0x2aef4b[_0x5e6f95(0x10c)]]=_0x13080c;return _0x2aef4b;},_0x544d73(_0x4e6d00);};return function(_0x318be0){const _0xf6bf8a=a0_0x1d71;if(_0x318be0&&_0x318be0[_0xf6bf8a(0x118)])return _0x318be0;var _0x1c163c={};if(_0x318be0!=null){for(var _0x179e2c=_0x544d73(_0x318be0),_0x39aad4=0x0;_0x39aad4<_0x179e2c['length'];_0x39aad4++)if(_0x179e2c[_0x39aad4]!==_0xf6bf8a(0xfa))__createBinding(_0x1c163c,_0x318be0,_0x179e2c[_0x39aad4]);}return __setModuleDefault(_0x1c163c,_0x318be0),_0x1c163c;};}()),__importDefault=this&&this['__importDefault']||function(_0xc6a72){const _0x3f8b8b=a0_0x5bdb90;return _0xc6a72&&_0xc6a72[_0x3f8b8b(0x118)]?_0xc6a72:{'default':_0xc6a72};};Object[a0_0x5bdb90(0x14a)](exports,a0_0x5bdb90(0x118),{'value':!![]}),exports[a0_0x5bdb90(0x12f)]=startDashboard;const express_1=__importDefault(require(a0_0x5bdb90(0x15d))),path=__importStar(require('path')),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x5bdb90(0x164))),tracker_1=require(a0_0x5bdb90(0x11b)),app=(0x0,express_1[a0_0x5bdb90(0xfa)])();app[a0_0x5bdb90(0x110)](express_1[a0_0x5bdb90(0xfa)]['json']());function a0_0x1d71(_0x50136d,_0x145dcc){_0x50136d=_0x50136d-0xed;const _0x54d3cf=a0_0x54d3();let _0x1d7118=_0x54d3cf[_0x50136d];return _0x1d7118;}const baseDir=path[a0_0x5bdb90(0xee)](os['homedir'](),a0_0x5bdb90(0x140)),logsDir=path[a0_0x5bdb90(0xee)](baseDir,a0_0x5bdb90(0x122));let configPayloadCache=null;const CONFIG_CACHE_TTL_MS=0x2710;function invalidateConfigCache(){configPayloadCache=null;}app[a0_0x5bdb90(0x102)]('/',(_0x540524,_0x42bd6b)=>{const _0x4431a9=a0_0x5bdb90,_0x11a504=path[_0x4431a9(0xee)](__dirname,'index.html');fs[_0x4431a9(0x137)](_0x11a504)?_0x42bd6b[_0x4431a9(0x127)](_0x11a504):_0x42bd6b['sendFile'](path[_0x4431a9(0xee)](__dirname,'../src/index.html'));}),app[a0_0x5bdb90(0x102)](a0_0x5bdb90(0x13c),(_0x3bdf5f,_0x179062)=>{const _0x340fe0=a0_0x5bdb90,_0x4674fc=path[_0x340fe0(0xee)](__dirname,_0x340fe0(0x158));fs[_0x340fe0(0x137)](_0x4674fc)?_0x179062[_0x340fe0(0x127)](_0x4674fc):_0x179062['sendFile'](path[_0x340fe0(0xee)](__dirname,_0x340fe0(0x109)));}),app[a0_0x5bdb90(0x102)]('/api/stats/summary',(_0x402921,_0xa5a96b)=>{const _0x1e758c=a0_0x5bdb90,_0x328cac=_0x402921[_0x1e758c(0x10b)][_0x1e758c(0x113)]||'auto',_0x54da3d=tracker_1[_0x1e758c(0x143)]['getStatsSummary'](_0x328cac);_0xa5a96b[_0x1e758c(0x12e)](_0x54da3d);}),app[a0_0x5bdb90(0x102)](a0_0x5bdb90(0x133),(_0x864572,_0x5247a7)=>{const _0x5c1c31=a0_0x5bdb90,_0x20145a=tracker_1[_0x5c1c31(0x143)][_0x5c1c31(0x15e)]();_0x5247a7['json'](_0x20145a['length']>0x1f4?_0x20145a[_0x5c1c31(0x108)](-0x1f4):_0x20145a);}),app[a0_0x5bdb90(0x102)]('/api/stats/inspect/:id',(_0x239e4c,_0x2b8d22)=>{const _0x2dda5b=a0_0x5bdb90,_0x17ab47=_0x239e4c[_0x2dda5b(0x152)]['id'],_0x30b8b2=path[_0x2dda5b(0xee)](logsDir,_0x17ab47+_0x2dda5b(0x160)),_0x2a5e3d=path[_0x2dda5b(0xee)](logsDir,_0x17ab47+'.comp.txt');let _0x5b764f=_0x2dda5b(0x129),_0x176229=_0x2dda5b(0x13b);try{fs[_0x2dda5b(0x137)](_0x30b8b2)&&(_0x5b764f=fs[_0x2dda5b(0x149)](_0x30b8b2,_0x2dda5b(0x139))),fs[_0x2dda5b(0x137)](_0x2a5e3d)&&(_0x176229=fs[_0x2dda5b(0x149)](_0x2a5e3d,_0x2dda5b(0x139)));}catch(_0x1133bf){}_0x2b8d22[_0x2dda5b(0x12e)]({'id':_0x17ab47,'raw':_0x5b764f,'compressed':_0x176229});}),app[a0_0x5bdb90(0x102)]('/api/config/features',(_0x581a6b,_0x5d72d9)=>{const _0x2554f5=a0_0x5bdb90,_0xcd54e1=tracker_1[_0x2554f5(0x143)][_0x2554f5(0xfb)]();_0x5d72d9['json'](_0xcd54e1[_0x2554f5(0xf4)]||{});}),app['post']('/api/config/features',(_0x409576,_0x34339d)=>{const _0x482657=a0_0x5bdb90,_0x350cda=_0x409576['body'];tracker_1[_0x482657(0x143)][_0x482657(0xfe)](_0x482657(0xf4),_0x350cda),invalidateConfigCache(),_0x34339d['json']({'ok':!![]});}),app['post'](a0_0x5bdb90(0x155),async(_0x2775d7,_0x5adc6a)=>{const _0x4afded=a0_0x5bdb90;try{const {getLatestSessionFile:_0x32e865,compactSessionCopy:_0x260230}=await Promise[_0x4afded(0x163)]()[_0x4afded(0xf9)](()=>__importStar(require(_0x4afded(0x10a)))),{agentKey:_0x3007cb}=_0x2775d7[_0x4afded(0x12a)]||{},_0x53253e=_0x3007cb||_0x4afded(0x115),_0x35d8d0=_0x32e865(_0x53253e);if(_0x35d8d0&&_0x35d8d0[_0x4afded(0x130)]&&fs[_0x4afded(0x137)](_0x35d8d0['fullPath'])){const _0x4c8849=_0x260230(_0x35d8d0[_0x4afded(0x130)],_0x53253e);_0x4c8849['ok']&&(_0x4c8849[_0x4afded(0x100)]||0x0)>0x0?_0x5adc6a[_0x4afded(0x12e)]({'ok':!![],'fileName':_0x35d8d0[_0x4afded(0x101)],'tokensSaved':_0x4c8849[_0x4afded(0x100)],'rawTokens':_0x4c8849['rawTokens'],'compressedTokens':_0x4c8849[_0x4afded(0x126)],'reductionPct':_0x4c8849[_0x4afded(0x104)],'compactPath':_0x4c8849[_0x4afded(0x116)]}):_0x5adc6a[_0x4afded(0x12e)]({'ok':![],'message':_0x4c8849[_0x4afded(0xfc)]||_0x4afded(0x157)});}else _0x5adc6a[_0x4afded(0x12e)]({'ok':![],'message':'No\x20active\x20session\x20file\x20found'});}catch(_0x13e7c6){_0x5adc6a[_0x4afded(0x162)](0x1f4)[_0x4afded(0x12e)]({'ok':![],'error':_0x13e7c6[_0x4afded(0x131)]});}}),app[a0_0x5bdb90(0x102)](a0_0x5bdb90(0xff),async(_0x304929,_0xf2dfc)=>{const _0x203f1d=a0_0x5bdb90;if(configPayloadCache&&Date[_0x203f1d(0x154)]()-configPayloadCache['at']<CONFIG_CACHE_TTL_MS)return _0xf2dfc[_0x203f1d(0x12e)](configPayloadCache[_0x203f1d(0x13d)]);const {loadConfig:_0x9e9593,getAgentStoragePaths:_0x13731a,getLatestSessionFile:_0x28a553,loadSessionsState:_0x3f459b}=await Promise[_0x203f1d(0x163)]()['then'](()=>__importStar(require(_0x203f1d(0x10a)))),_0x479b92=_0x9e9593(),_0x4ef295=[_0x203f1d(0x115),_0x203f1d(0x10d),_0x203f1d(0x12c),_0x203f1d(0x13a),_0x203f1d(0x13e),'copilot',_0x203f1d(0x103),_0x203f1d(0x10e),_0x203f1d(0x15f)],_0x43a7b5={},_0x5035a4={},_0x3aa5c2={},_0x35bc2e=_0x3f459b(),_0x8823bd=tracker_1[_0x203f1d(0x143)][_0x203f1d(0x15e)]()||[];for(const _0xde5241 of _0x4ef295){_0x43a7b5[_0xde5241]=_0x13731a(_0xde5241);const _0x4c6256=_0x28a553(_0xde5241);if(_0x4c6256&&_0x4c6256[_0x203f1d(0x130)]&&_0x35bc2e[_0x4c6256[_0x203f1d(0x130)]])_0x4c6256[_0x203f1d(0xf1)]=_0x35bc2e[_0x4c6256[_0x203f1d(0x130)]][_0x203f1d(0xf1)]||0x0;else{if(_0x4c6256)_0x4c6256[_0x203f1d(0xf1)]=0x0;}_0x3aa5c2[_0xde5241]=_0x4c6256;const _0x3b8d5a=_0x8823bd[_0x203f1d(0x14b)](_0x1ad2e2=>_0x1ad2e2[_0x203f1d(0x156)]&&_0x1ad2e2[_0x203f1d(0x156)]['includes'](_0x203f1d(0x11e)+_0xde5241));_0x3b8d5a[_0x203f1d(0x10c)]>0x0?_0x5035a4[_0xde5241]=_0x3b8d5a[_0x3b8d5a[_0x203f1d(0x10c)]-0x1][_0x203f1d(0x15c)]:_0x5035a4[_0xde5241]=_0x4c6256?_0x4c6256[_0x203f1d(0xf5)]:null;}const _0x56ba31={..._0x479b92,'resolvedPaths':_0x43a7b5,'lastActiveTimestamps':_0x5035a4,'latestSessions':_0x3aa5c2};configPayloadCache={'at':Date['now'](),'payload':_0x56ba31},_0xf2dfc[_0x203f1d(0x12e)](_0x56ba31);}),app[a0_0x5bdb90(0x128)](a0_0x5bdb90(0x14d),async(_0x69712b,_0x4f2b02)=>{const _0x2faaf3=a0_0x5bdb90,{getAgentStoragePaths:_0xc83f7b}=await Promise['resolve']()[_0x2faaf3(0xf9)](()=>__importStar(require(_0x2faaf3(0x10a)))),{agentKey:_0x19d0a6}=_0x69712b[_0x2faaf3(0x12a)]||{};if(!_0x19d0a6)return _0x4f2b02[_0x2faaf3(0x162)](0x190)[_0x2faaf3(0x12e)]({'error':_0x2faaf3(0xf6)});const _0x49968f=_0xc83f7b(_0x19d0a6),_0x51f607=_0x49968f['find'](_0x52ab01=>fs[_0x2faaf3(0x137)](_0x52ab01))||_0x49968f[0x0];if(_0x51f607){if(!fs[_0x2faaf3(0x137)](_0x51f607))try{fs[_0x2faaf3(0x10f)](_0x51f607,{'recursive':!![]});}catch{}const {exec:_0x314f53}=await Promise[_0x2faaf3(0x163)]()[_0x2faaf3(0xf9)](()=>__importStar(require('child_process'))),_0x515895=process['platform']===_0x2faaf3(0x124)?_0x2faaf3(0x134)+_0x51f607+'\x22':process[_0x2faaf3(0x11d)]===_0x2faaf3(0x138)?_0x2faaf3(0x14f)+_0x51f607+'\x22':_0x2faaf3(0x15b)+_0x51f607+'\x22';return _0x314f53(_0x515895),_0x4f2b02['json']({'success':!![],'openedPath':_0x51f607});}_0x4f2b02[_0x2faaf3(0x162)](0x194)[_0x2faaf3(0x12e)]({'error':_0x2faaf3(0xed)});}),app[a0_0x5bdb90(0x128)](a0_0x5bdb90(0x111),async(_0x409b79,_0x3ac9bc)=>{const _0x3746ff=a0_0x5bdb90,{saveConfig:_0x28672b}=await Promise['resolve']()[_0x3746ff(0xf9)](()=>__importStar(require(_0x3746ff(0x10a)))),{key:_0x16158e,value:_0x3b19c3}=_0x409b79[_0x3746ff(0x12a)]||{};if(_0x16158e){const _0x4aca1c=_0x28672b({'conversation_toggles':{[_0x16158e]:_0x3b19c3}});return invalidateConfigCache(),_0x3ac9bc['json'](_0x4aca1c);}_0x3ac9bc[_0x3746ff(0x162)](0x190)['json']({'error':'Missing\x20key'});}),app[a0_0x5bdb90(0x128)](a0_0x5bdb90(0x120),async(_0x1b81ee,_0x4a4ce5)=>{const _0xe93c61=a0_0x5bdb90,{saveConfig:_0x547c5b}=await Promise['resolve']()[_0xe93c61(0xf9)](()=>__importStar(require(_0xe93c61(0x10a)))),{agentKey:_0x47a2d2,path:_0x577c50}=_0x1b81ee['body']||{};if(_0x47a2d2){const _0x163d8e=_0x547c5b({'custom_storage_paths':{[_0x47a2d2]:_0x577c50||null}});return invalidateConfigCache(),_0x4a4ce5['json'](_0x163d8e);}_0x4a4ce5[_0xe93c61(0x162)](0x190)[_0xe93c61(0x12e)]({'error':_0xe93c61(0xf6)});});function startDashboard(_0xd37d80=0xfa0){const _0x1a4acb=a0_0x5bdb90;let _0x495390=_0xd37d80;const _0x240eb5=process[_0x1a4acb(0xf8)][_0x1a4acb(0x15a)](_0x1a4acb(0x159))||process.env.TRIMPROMPT_HEADLESS==='1',_0x287958=app[_0x1a4acb(0x11f)](_0x495390,()=>{const _0x1b0e10=_0x1a4acb,_0x207ac7=_0x1b0e10(0x151)+_0x495390;!_0x240eb5&&(console['log'](_0x1b0e10(0x123)+_0x207ac7),console[_0x1b0e10(0x11c)]('Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.'));try{const {spawn:_0x16b422}=require(_0x1b0e10(0xf7)),_0x2baea0=_0x16b422(process[_0x1b0e10(0x135)],[path['join'](__dirname,_0x1b0e10(0x13f)),_0x1b0e10(0x136),_0x1b0e10(0x119)],{'stdio':_0x1b0e10(0x107),'windowsHide':!![]}),_0x181e18=()=>{const _0x4c647f=_0x1b0e10;try{_0x2baea0[_0x4c647f(0xef)]();}catch{}};process['on'](_0x1b0e10(0x144),_0x181e18),process['on'](_0x1b0e10(0x117),()=>{const _0x312e93=_0x1b0e10;_0x181e18(),process[_0x312e93(0x144)](0x0);}),process['on'](_0x1b0e10(0x125),()=>{const _0x137c37=_0x1b0e10;_0x181e18(),process[_0x137c37(0x144)](0x0);});}catch{}!_0x240eb5&&process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1[_0x1b0e10(0xfa)])(_0x207ac7)[_0x1b0e10(0x12d)](()=>{});});_0x287958['on'](_0x1a4acb(0x153),_0x1b385d=>{const _0xbe0c3c=_0x1a4acb;_0x1b385d[_0xbe0c3c(0x105)]===_0xbe0c3c(0x14c)?startDashboard(_0x495390+0x1):console[_0xbe0c3c(0x153)]('[TrimPrompt]\x20Dashboard\x20error:\x20'+_0x1b385d[_0xbe0c3c(0x131)]);});}function a0_0x54d3(){const _0x1451b6=['354513KqINfh','setConfig','/api/config','savedTokens','fileName','get','openclaw','reductionPct','code','hasOwnProperty','ignore','slice','../src/favicon.png','./file-watcher','query','length','gemini','opencode','mkdirSync','use','/api/config/toggle','62qxoNoC','model','create','claude','compactPath','SIGINT','__esModule','start','getOwnPropertyDescriptor','./tracker','log','platform','conv:','listen','/api/config/custom-path','configurable','logs','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','win32','SIGTERM','compressedTokens','sendFile','post','Raw\x20output\x20log\x20file\x20not\x20found.','body','541068ltSdCK','codex','catch','json','startDashboard','fullPath','message','prototype','/api/stats/history','explorer\x20\x22','execPath','watcher','existsSync','darwin','utf8','cursor','Compressed\x20output\x20log\x20file\x20not\x20found.','/favicon.png','payload','aider','cli.js','.trimprompt','9epAbaS','__setModuleDefault','tracker','exit','writable','992580yQXqbW','__importStar','161777gGjMCS','readFileSync','defineProperty','filter','EADDRINUSE','/api/config/open-dir','596216oPGbUl','open\x20\x22','call','http://localhost:','params','error','now','/api/agent/compact','command','No\x20compressible\x20content\x20found\x20in\x20this\x20session','favicon.png','--headless','includes','xdg-open\x20\x22','timestamp','express','getLogs','cortex','.raw.txt','20hBsYGd','status','resolve','open','Directory\x20not\x20found','join','kill','833701fvhdqT','activeSavedTokens','102fQrCYQ','2937sDoOnF','features_enabled','lastModified','Missing\x20agentKey','child_process','argv','then','default','getConfig','reason'];a0_0x54d3=function(){return _0x1451b6;};return a0_0x54d3();}
package/executor.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x237c(){var _0x41649e=['654852MDMGdT','includes','length','toLowerCase','spawn','__createBinding','pipe','Failed\x20to\x20spawn\x20command\x20\x22','__setModuleDefault','error','child_process','trim','4250637KVAAdA','7204eTVAtE','path','2AeXLTC','stdout','588462JVUcgG','split','inherit','toString','getOwnPropertyDescriptor','550289jqJaid','\x22:\x20','6nCRoKa','defineProperty','data','join','close','delimiter','prototype','5201420feNnRV','configurable','homedir','create','__esModule','hasOwnProperty','map','24TZGdRn','__importStar','default','2731440wAQecy'];a0_0x237c=function(){return _0x41649e;};return a0_0x237c();}var a0_0x191477=a0_0x37fc;(function(_0x41fde7,_0x5df267){var _0xe092d4=a0_0x37fc,_0x36587f=_0x41fde7();while(!![]){try{var _0x240ede=-parseInt(_0xe092d4(0x16f))/0x1*(-parseInt(_0xe092d4(0x168))/0x2)+-parseInt(_0xe092d4(0x171))/0x3*(parseInt(_0xe092d4(0x166))/0x4)+-parseInt(_0xe092d4(0x158))/0x5+parseInt(_0xe092d4(0x159))/0x6+parseInt(_0xe092d4(0x16a))/0x7*(parseInt(_0xe092d4(0x155))/0x8)+parseInt(_0xe092d4(0x165))/0x9+-parseInt(_0xe092d4(0x14e))/0xa;if(_0x240ede===_0x5df267)break;else _0x36587f['push'](_0x36587f['shift']());}catch(_0x2b8ae8){_0x36587f['push'](_0x36587f['shift']());}}}(a0_0x237c,0x4ca22));var __createBinding=this&&this[a0_0x191477(0x15e)]||(Object[a0_0x191477(0x151)]?function(_0x362104,_0x49e25a,_0xd2763c,_0x11b87e){var _0x3a0b37=a0_0x191477;if(_0x11b87e===undefined)_0x11b87e=_0xd2763c;var _0x480c1f=Object[_0x3a0b37(0x16e)](_0x49e25a,_0xd2763c);(!_0x480c1f||('get'in _0x480c1f?!_0x49e25a[_0x3a0b37(0x152)]:_0x480c1f['writable']||_0x480c1f[_0x3a0b37(0x14f)]))&&(_0x480c1f={'enumerable':!![],'get':function(){return _0x49e25a[_0xd2763c];}}),Object[_0x3a0b37(0x172)](_0x362104,_0x11b87e,_0x480c1f);}:function(_0x7d64e3,_0x28ea29,_0x15228d,_0x2222dd){if(_0x2222dd===undefined)_0x2222dd=_0x15228d;_0x7d64e3[_0x2222dd]=_0x28ea29[_0x15228d];}),__setModuleDefault=this&&this[a0_0x191477(0x161)]||(Object[a0_0x191477(0x151)]?function(_0x59c8c9,_0x1cb7cf){var _0x9a3047=a0_0x191477;Object[_0x9a3047(0x172)](_0x59c8c9,_0x9a3047(0x157),{'enumerable':!![],'value':_0x1cb7cf});}:function(_0x4f15e4,_0x69c3f7){var _0x964990=a0_0x191477;_0x4f15e4[_0x964990(0x157)]=_0x69c3f7;}),__importStar=this&&this[a0_0x191477(0x156)]||(function(){var _0x2fbc56=function(_0x4b56d0){return _0x2fbc56=Object['getOwnPropertyNames']||function(_0xdfea07){var _0x4772d2=a0_0x37fc,_0x4d9a39=[];for(var _0x2c4c07 in _0xdfea07)if(Object[_0x4772d2(0x14d)][_0x4772d2(0x153)]['call'](_0xdfea07,_0x2c4c07))_0x4d9a39[_0x4d9a39[_0x4772d2(0x15b)]]=_0x2c4c07;return _0x4d9a39;},_0x2fbc56(_0x4b56d0);};return function(_0x30029a){var _0xe88ddc=a0_0x37fc;if(_0x30029a&&_0x30029a['__esModule'])return _0x30029a;var _0x5c3816={};if(_0x30029a!=null){for(var _0x54d202=_0x2fbc56(_0x30029a),_0x2ac4a3=0x0;_0x2ac4a3<_0x54d202[_0xe88ddc(0x15b)];_0x2ac4a3++)if(_0x54d202[_0x2ac4a3]!==_0xe88ddc(0x157))__createBinding(_0x5c3816,_0x30029a,_0x54d202[_0x2ac4a3]);}return __setModuleDefault(_0x5c3816,_0x30029a),_0x5c3816;};}());Object[a0_0x191477(0x172)](exports,'__esModule',{'value':!![]}),exports['executeCommand']=executeCommand;const child_process_1=require(a0_0x191477(0x163)),path=__importStar(require(a0_0x191477(0x167))),os=__importStar(require('os'));function a0_0x37fc(_0x5bba5a,_0x1b7375){_0x5bba5a=_0x5bba5a-0x14a;var _0x237c18=a0_0x237c();var _0x37fc25=_0x237c18[_0x5bba5a];return _0x37fc25;}function executeCommand(_0x219440,_0x12b86f){return new Promise(_0x2eef7c=>{var _0x1332d3=a0_0x37fc;const _0x5a0316=path[_0x1332d3(0x14a)](os[_0x1332d3(0x150)](),'.trimprompt','shims'),_0x3dd9cf=(process.env.PATH||'')[_0x1332d3(0x16b)](path[_0x1332d3(0x14c)])['filter'](_0x278088=>_0x278088[_0x1332d3(0x164)]()['toLowerCase']()!==_0x5a0316[_0x1332d3(0x15c)]())[_0x1332d3(0x14a)](path[_0x1332d3(0x14c)]),_0x5ab793={...process.env,'PATH':_0x3dd9cf,'TRIMPROMPT_DISABLED':'1'},_0x5ed89f=_0x12b86f[_0x1332d3(0x154)](_0x18cf3e=>_0x18cf3e[_0x1332d3(0x15a)]('\x20')&&!_0x18cf3e['startsWith']('\x22')?'\x22'+_0x18cf3e+'\x22':_0x18cf3e),_0x34424e=[_0x219440,..._0x5ed89f][_0x1332d3(0x14a)]('\x20'),_0x390a21=(0x0,child_process_1[_0x1332d3(0x15d)])(_0x34424e,[],{'stdio':[_0x1332d3(0x16c),_0x1332d3(0x15f),_0x1332d3(0x15f)],'shell':!![],'env':_0x5ab793});let _0x41de48='',_0x36ab07='';_0x390a21[_0x1332d3(0x169)]?.['on'](_0x1332d3(0x173),_0x48fb7a=>{_0x41de48+=_0x48fb7a['toString']();}),_0x390a21['stderr']?.['on'](_0x1332d3(0x173),_0x2440c4=>{var _0xd67630=_0x1332d3;_0x36ab07+=_0x2440c4[_0xd67630(0x16d)]();}),_0x390a21['on'](_0x1332d3(0x162),_0x3e9a9c=>{var _0x1a2034=_0x1332d3;_0x2eef7c({'exitCode':0x1,'stdout':'','stderr':_0x1a2034(0x160)+_0x219440+_0x1a2034(0x170)+_0x3e9a9c['message']});}),_0x390a21['on'](_0x1332d3(0x14b),_0x375355=>{_0x2eef7c({'exitCode':_0x375355??0x0,'stdout':_0x41de48,'stderr':_0x36ab07});});});}
1
+ 'use strict';var a0_0x5eccfc=a0_0x36cf;function a0_0x36cf(_0x2614dd,_0x3f0226){_0x2614dd=_0x2614dd-0x161;var _0x2fa6ca=a0_0x2fa6();var _0x36cf57=_0x2fa6ca[_0x2614dd];return _0x36cf57;}(function(_0x2888b3,_0x447a3a){var _0x3e806f=a0_0x36cf,_0x2d47f3=_0x2888b3();while(!![]){try{var _0x1b6f15=parseInt(_0x3e806f(0x162))/0x1+parseInt(_0x3e806f(0x171))/0x2*(-parseInt(_0x3e806f(0x16b))/0x3)+parseInt(_0x3e806f(0x179))/0x4*(parseInt(_0x3e806f(0x185))/0x5)+-parseInt(_0x3e806f(0x174))/0x6*(-parseInt(_0x3e806f(0x17f))/0x7)+parseInt(_0x3e806f(0x184))/0x8+parseInt(_0x3e806f(0x16c))/0x9*(-parseInt(_0x3e806f(0x172))/0xa)+-parseInt(_0x3e806f(0x190))/0xb;if(_0x1b6f15===_0x447a3a)break;else _0x2d47f3['push'](_0x2d47f3['shift']());}catch(_0x55e2fc){_0x2d47f3['push'](_0x2d47f3['shift']());}}}(a0_0x2fa6,0xc3fd8));var __createBinding=this&&this[a0_0x5eccfc(0x16f)]||(Object['create']?function(_0x1fc977,_0x484b2f,_0x396ef3,_0x583820){var _0x28cc83=a0_0x5eccfc;if(_0x583820===undefined)_0x583820=_0x396ef3;var _0x4974aa=Object[_0x28cc83(0x164)](_0x484b2f,_0x396ef3);(!_0x4974aa||(_0x28cc83(0x181)in _0x4974aa?!_0x484b2f[_0x28cc83(0x17b)]:_0x4974aa[_0x28cc83(0x189)]||_0x4974aa[_0x28cc83(0x182)]))&&(_0x4974aa={'enumerable':!![],'get':function(){return _0x484b2f[_0x396ef3];}}),Object[_0x28cc83(0x186)](_0x1fc977,_0x583820,_0x4974aa);}:function(_0x19384a,_0x3afb52,_0x32066a,_0x2b6bf7){if(_0x2b6bf7===undefined)_0x2b6bf7=_0x32066a;_0x19384a[_0x2b6bf7]=_0x3afb52[_0x32066a];}),__setModuleDefault=this&&this[a0_0x5eccfc(0x17c)]||(Object[a0_0x5eccfc(0x173)]?function(_0x5a8455,_0x45cb7c){var _0x4c8b57=a0_0x5eccfc;Object[_0x4c8b57(0x186)](_0x5a8455,'default',{'enumerable':!![],'value':_0x45cb7c});}:function(_0xe78b05,_0x2d28ba){var _0x4e0d35=a0_0x5eccfc;_0xe78b05[_0x4e0d35(0x175)]=_0x2d28ba;}),__importStar=this&&this['__importStar']||(function(){var _0x45afb5=function(_0x537e27){var _0x4b3d2b=a0_0x36cf;return _0x45afb5=Object[_0x4b3d2b(0x167)]||function(_0x46f05f){var _0x448eb7=_0x4b3d2b,_0xc111c3=[];for(var _0xf525a9 in _0x46f05f)if(Object[_0x448eb7(0x161)][_0x448eb7(0x166)][_0x448eb7(0x16a)](_0x46f05f,_0xf525a9))_0xc111c3[_0xc111c3[_0x448eb7(0x18b)]]=_0xf525a9;return _0xc111c3;},_0x45afb5(_0x537e27);};return function(_0x2c1c49){var _0x188524=a0_0x36cf;if(_0x2c1c49&&_0x2c1c49[_0x188524(0x17b)])return _0x2c1c49;var _0xf3c6b4={};if(_0x2c1c49!=null){for(var _0x1e9e63=_0x45afb5(_0x2c1c49),_0x25cc28=0x0;_0x25cc28<_0x1e9e63[_0x188524(0x18b)];_0x25cc28++)if(_0x1e9e63[_0x25cc28]!==_0x188524(0x175))__createBinding(_0xf3c6b4,_0x2c1c49,_0x1e9e63[_0x25cc28]);}return __setModuleDefault(_0xf3c6b4,_0x2c1c49),_0xf3c6b4;};}());Object[a0_0x5eccfc(0x186)](exports,a0_0x5eccfc(0x17b),{'value':!![]}),exports[a0_0x5eccfc(0x177)]=executeCommand;const child_process_1=require(a0_0x5eccfc(0x187)),path=__importStar(require(a0_0x5eccfc(0x170))),os=__importStar(require('os'));function a0_0x2fa6(){var _0x442cce=['75kAHKYA','3429yYVZsk','join','map','__createBinding','path','51926LYYErH','19230YKmoHG','create','26538EqVPPA','default','data','executeCommand','homedir','2304164eHptGE','stdout','__esModule','__setModuleDefault','toString','startsWith','1540bkTcBP','spawn','get','configurable','pipe','737000Kbjcgr','5IdPAii','defineProperty','child_process','delimiter','writable','toLowerCase','length','split','stderr','error','trim','1372602grxTRB','message','prototype','668070nQnJXY','.trimprompt','getOwnPropertyDescriptor','includes','hasOwnProperty','getOwnPropertyNames','Failed\x20to\x20spawn\x20command\x20\x22','inherit','call'];a0_0x2fa6=function(){return _0x442cce;};return a0_0x2fa6();}function executeCommand(_0x2d88e4,_0x30b744){return new Promise(_0x38788b=>{var _0x16dbf3=a0_0x36cf;const _0x53ad09=path[_0x16dbf3(0x16d)](os[_0x16dbf3(0x178)](),_0x16dbf3(0x163),'shims'),_0x5a18e2=(process.env.PATH||'')[_0x16dbf3(0x18c)](path[_0x16dbf3(0x188)])['filter'](_0x5473af=>_0x5473af[_0x16dbf3(0x18f)]()[_0x16dbf3(0x18a)]()!==_0x53ad09[_0x16dbf3(0x18a)]())[_0x16dbf3(0x16d)](path[_0x16dbf3(0x188)]),_0x448299={...process.env,'PATH':_0x5a18e2,'TRIMPROMPT_DISABLED':'1'},_0x12d036=_0x30b744[_0x16dbf3(0x16e)](_0x2b24bf=>_0x2b24bf[_0x16dbf3(0x165)]('\x20')&&!_0x2b24bf[_0x16dbf3(0x17e)]('\x22')?'\x22'+_0x2b24bf+'\x22':_0x2b24bf),_0x436a34=[_0x2d88e4,..._0x12d036][_0x16dbf3(0x16d)]('\x20'),_0x3b1fb2=(0x0,child_process_1[_0x16dbf3(0x180)])(_0x436a34,[],{'stdio':[_0x16dbf3(0x169),'pipe',_0x16dbf3(0x183)],'shell':!![],'env':_0x448299});let _0x24f9af='',_0x7216df='';_0x3b1fb2[_0x16dbf3(0x17a)]?.['on'](_0x16dbf3(0x176),_0x19bdb4=>{var _0x3a721a=_0x16dbf3;_0x24f9af+=_0x19bdb4[_0x3a721a(0x17d)]();}),_0x3b1fb2[_0x16dbf3(0x18d)]?.['on']('data',_0x5aa345=>{var _0x5e487b=_0x16dbf3;_0x7216df+=_0x5aa345[_0x5e487b(0x17d)]();}),_0x3b1fb2['on'](_0x16dbf3(0x18e),_0x2d2733=>{var _0x598b27=_0x16dbf3;_0x38788b({'exitCode':0x1,'stdout':'','stderr':_0x598b27(0x168)+_0x2d88e4+'\x22:\x20'+_0x2d2733[_0x598b27(0x191)]});}),_0x3b1fb2['on']('close',_0x3859df=>{_0x38788b({'exitCode':_0x3859df??0x0,'stdout':_0x24f9af,'stderr':_0x7216df});});});}
package/file-watcher.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x1f9d15=a0_0x2c0f;(function(_0x49225d,_0x441a41){const _0x42859b=a0_0x2c0f,_0x224fd1=_0x49225d();while(!![]){try{const _0x3b0bbb=-parseInt(_0x42859b(0x1be))/0x1+parseInt(_0x42859b(0x13f))/0x2*(parseInt(_0x42859b(0x1c7))/0x3)+-parseInt(_0x42859b(0x13b))/0x4+parseInt(_0x42859b(0x183))/0x5*(-parseInt(_0x42859b(0x189))/0x6)+parseInt(_0x42859b(0x161))/0x7*(parseInt(_0x42859b(0x1d0))/0x8)+-parseInt(_0x42859b(0x196))/0x9+parseInt(_0x42859b(0x1ca))/0xa;if(_0x3b0bbb===_0x441a41)break;else _0x224fd1['push'](_0x224fd1['shift']());}catch(_0x50f9b0){_0x224fd1['push'](_0x224fd1['shift']());}}}(a0_0x4b02,0xd779d));var __createBinding=this&&this[a0_0x1f9d15(0x13c)]||(Object['create']?function(_0x227863,_0x272f96,_0x7d61b6,_0x177cad){const _0x37c8c7=a0_0x1f9d15;if(_0x177cad===undefined)_0x177cad=_0x7d61b6;var _0x1454f3=Object['getOwnPropertyDescriptor'](_0x272f96,_0x7d61b6);(!_0x1454f3||(_0x37c8c7(0x168)in _0x1454f3?!_0x272f96['__esModule']:_0x1454f3[_0x37c8c7(0x174)]||_0x1454f3[_0x37c8c7(0x142)]))&&(_0x1454f3={'enumerable':!![],'get':function(){return _0x272f96[_0x7d61b6];}}),Object['defineProperty'](_0x227863,_0x177cad,_0x1454f3);}:function(_0x214ccb,_0x255837,_0x21b397,_0x35327c){if(_0x35327c===undefined)_0x35327c=_0x21b397;_0x214ccb[_0x35327c]=_0x255837[_0x21b397];}),__setModuleDefault=this&&this[a0_0x1f9d15(0x1d8)]||(Object[a0_0x1f9d15(0x19d)]?function(_0x29d69d,_0x5958a4){const _0x55bf57=a0_0x1f9d15;Object[_0x55bf57(0x139)](_0x29d69d,_0x55bf57(0x14c),{'enumerable':!![],'value':_0x5958a4});}:function(_0xfca22e,_0x5a5ec9){const _0x2f788b=a0_0x1f9d15;_0xfca22e[_0x2f788b(0x14c)]=_0x5a5ec9;}),__importStar=this&&this['__importStar']||(function(){var _0x49d2aa=function(_0xd8b154){const _0x5c481b=a0_0x2c0f;return _0x49d2aa=Object[_0x5c481b(0x1c0)]||function(_0x27b53e){const _0x566766=_0x5c481b;var _0x72dcc3=[];for(var _0x5cc988 in _0x27b53e)if(Object['prototype']['hasOwnProperty']['call'](_0x27b53e,_0x5cc988))_0x72dcc3[_0x72dcc3[_0x566766(0x140)]]=_0x5cc988;return _0x72dcc3;},_0x49d2aa(_0xd8b154);};return function(_0x177bb0){const _0x39a296=a0_0x2c0f;if(_0x177bb0&&_0x177bb0[_0x39a296(0x1b5)])return _0x177bb0;var _0x262a52={};if(_0x177bb0!=null){for(var _0x2ced8f=_0x49d2aa(_0x177bb0),_0x1a2a57=0x0;_0x1a2a57<_0x2ced8f[_0x39a296(0x140)];_0x1a2a57++)if(_0x2ced8f[_0x1a2a57]!==_0x39a296(0x14c))__createBinding(_0x262a52,_0x177bb0,_0x2ced8f[_0x1a2a57]);}return __setModuleDefault(_0x262a52,_0x177bb0),_0x262a52;};}());Object[a0_0x1f9d15(0x139)](exports,a0_0x1f9d15(0x1b5),{'value':!![]}),exports[a0_0x1f9d15(0x1bb)]=loadConfig,exports['saveConfig']=saveConfig,exports[a0_0x1f9d15(0x17d)]=getAgentStoragePaths,exports[a0_0x1f9d15(0x1cb)]=getLatestSessionFile,exports[a0_0x1f9d15(0x1bd)]=loadSessionsState,exports[a0_0x1f9d15(0x159)]=saveSessionStateItem,exports[a0_0x1f9d15(0x19b)]=processSessionFile,exports[a0_0x1f9d15(0x1a4)]=compactSessionCopy,exports[a0_0x1f9d15(0x1a9)]=compactLiveSession,exports[a0_0x1f9d15(0x1c3)]=installWindowsStartupService,exports[a0_0x1f9d15(0x1c6)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1f9d15(0x134))),os=__importStar(require('os')),cache_manager_1=require(a0_0x1f9d15(0x173)),tracker_1=require(a0_0x1f9d15(0x1cf)),baseDir=path[a0_0x1f9d15(0x14b)](os[a0_0x1f9d15(0x16a)](),a0_0x1f9d15(0x12c)),configPath=path['join'](baseDir,a0_0x1f9d15(0x1ba)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0xfed28=a0_0x1f9d15;try{if(!fs[_0xfed28(0x133)](baseDir))fs[_0xfed28(0x16d)](baseDir,{'recursive':!![]});if(fs[_0xfed28(0x133)](configPath)){const _0x2199ba=JSON[_0xfed28(0x138)](fs[_0xfed28(0x155)](configPath,_0xfed28(0x1a6)));return{...DEFAULT_CONFIG,..._0x2199ba,'conversation_toggles':{...DEFAULT_CONFIG[_0xfed28(0x14d)],..._0x2199ba[_0xfed28(0x14d)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x2199ba[_0xfed28(0x1a5)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x2c401d){const _0x251d1c=a0_0x1f9d15,_0x18e12b=loadConfig(),_0x238a17={..._0x18e12b,..._0x2c401d,'conversation_toggles':{..._0x18e12b[_0x251d1c(0x14d)],..._0x2c401d[_0x251d1c(0x14d)]||{}},'custom_storage_paths':{..._0x18e12b[_0x251d1c(0x1a5)],..._0x2c401d['custom_storage_paths']||{}}};try{if(!fs['existsSync'](baseDir))fs[_0x251d1c(0x16d)](baseDir,{'recursive':!![]});fs[_0x251d1c(0x149)](configPath,JSON[_0x251d1c(0x194)](_0x238a17,null,0x2),_0x251d1c(0x1a6));}catch{}return _0x238a17;}function getAgentStoragePaths(_0x251390){const _0x246747=a0_0x1f9d15,_0x444fb3=loadConfig(),_0x3ab16d=_0x444fb3[_0x246747(0x1a5)][_0x251390];if(_0x3ab16d&&fs[_0x246747(0x133)](_0x3ab16d))return[_0x3ab16d];const _0x1636b9=os[_0x246747(0x16a)](),_0x1d77f9=process[_0x246747(0x18b)]===_0x246747(0x186),_0x50447b=process[_0x246747(0x18b)]===_0x246747(0x19c);switch(_0x251390){case'claude':return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x150),_0x246747(0x18a)),path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x150),_0x246747(0x1b4))];case'codex':return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x164),_0x246747(0x16e)),path['join'](_0x1636b9,_0x246747(0x123),_0x246747(0x17e),_0x246747(0x1b1))];case _0x246747(0x188):case _0x246747(0x1cc):return[path[_0x246747(0x14b)](_0x1636b9,'.gemini',_0x246747(0x1cc)),path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x127)),path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x123),_0x246747(0x17e),'Gemini'),path['join'](_0x1636b9,_0x246747(0x131),_0x246747(0x188))];case'cursor':if(_0x1d77f9)return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x123),_0x246747(0x17e),_0x246747(0x13d),'User',_0x246747(0x172))];if(_0x50447b)return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x129),_0x246747(0x165),_0x246747(0x13d),'User',_0x246747(0x172))];return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x131),_0x246747(0x13d),_0x246747(0x187),_0x246747(0x172))];case _0x246747(0x17a):return[process[_0x246747(0x137)](),path['join'](_0x1636b9,_0x246747(0x18d))];case'copilot':if(_0x1d77f9)return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x123),'Local',_0x246747(0x1ae))];return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x131),'github-copilot-cli')];case _0x246747(0x1b9):return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x1ce),_0x246747(0x185)),path[_0x246747(0x14b)](process[_0x246747(0x137)](),_0x246747(0x1ce),_0x246747(0x126))];case'opencode':return[path[_0x246747(0x14b)](_0x1636b9,_0x246747(0x146),'sessions')];case'cortex':return[path['join'](_0x1636b9,'.cortex',_0x246747(0x15b))];default:return[];}}function a0_0x2c0f(_0x5b91e3,_0x2b5f8b){_0x5b91e3=_0x5b91e3-0x11e;const _0x4b02c5=a0_0x4b02();let _0x2c0fbf=_0x4b02c5[_0x5b91e3];return _0x2c0fbf;}function getLatestSessionFile(_0x2f3cc7){const _0x255ff5=getAgentStoragePaths(_0x2f3cc7);let _0x5538c3=null,_0x476e61=0x0,_0x2ecab5=null,_0x201ec3=null;for(const _0x36bfae of _0x255ff5){if(fs['existsSync'](_0x36bfae)){if(!_0x201ec3)_0x201ec3=_0x36bfae;const _0x2e70e7=(_0x28a5aa,_0x4a2fdb=0x0)=>{const _0x5a0c7f=a0_0x2c0f;if(_0x4a2fdb>0x6)return;try{const _0x1953d9=fs['readdirSync'](_0x28a5aa,{'withFileTypes':!![]});for(const _0x28e7e9 of _0x1953d9){const _0x49a534=path['join'](_0x28a5aa,_0x28e7e9['name']);if(_0x28e7e9[_0x5a0c7f(0x144)]()){const _0x1e4411=_0x28e7e9[_0x5a0c7f(0x16c)][_0x5a0c7f(0x154)]();if(_0x1e4411===_0x5a0c7f(0x192)||_0x1e4411===_0x5a0c7f(0x190)||_0x1e4411===_0x5a0c7f(0x1c4)||_0x1e4411===_0x5a0c7f(0x1a2)||_0x1e4411===_0x5a0c7f(0x1aa)||_0x1e4411===_0x5a0c7f(0x195)||_0x1e4411===_0x5a0c7f(0x166)||_0x1e4411==='dist'||_0x1e4411===_0x5a0c7f(0x156)||_0x1e4411===_0x5a0c7f(0x15e)||_0x1e4411===_0x5a0c7f(0x143))continue;_0x2e70e7(_0x49a534,_0x4a2fdb+0x1);}else{if(_0x28e7e9[_0x5a0c7f(0x1bf)]()&&!_0x28e7e9['name']['startsWith']('.')){const _0xc89168=_0x28e7e9[_0x5a0c7f(0x16c)]['toLowerCase']();if(_0xc89168[_0x5a0c7f(0x193)](_0x5a0c7f(0x171))||_0xc89168[_0x5a0c7f(0x17b)](_0x5a0c7f(0x1ab))||_0xc89168['endsWith'](_0x5a0c7f(0x175))||_0xc89168[_0x5a0c7f(0x17b)](_0x5a0c7f(0x1d2))||_0xc89168[_0x5a0c7f(0x17b)](_0x5a0c7f(0x1d5))||_0xc89168[_0x5a0c7f(0x17b)](_0x5a0c7f(0x1d3))||_0xc89168[_0x5a0c7f(0x17b)](_0x5a0c7f(0x181))||_0xc89168['endsWith']('.webp')||_0xc89168['endsWith'](_0x5a0c7f(0x18e))||_0xc89168[_0x5a0c7f(0x17b)](_0x5a0c7f(0x121))||_0xc89168['endsWith']('.shm')||_0xc89168[_0x5a0c7f(0x17b)]('.tmp')||_0xc89168[_0x5a0c7f(0x17b)]('.lock')||_0xc89168[_0x5a0c7f(0x17b)]('.dat')||_0xc89168['startsWith'](_0x5a0c7f(0x145))||_0xc89168[_0x5a0c7f(0x1cd)](_0x5a0c7f(0x157)))continue;const _0x48bc76=fs[_0x5a0c7f(0x1ad)](_0x49a534);_0x48bc76[_0x5a0c7f(0x15f)]>_0x476e61&&(_0x476e61=_0x48bc76[_0x5a0c7f(0x15f)],_0x5538c3=_0x28e7e9['name'],_0x2ecab5=_0x49a534,_0x201ec3=_0x36bfae);}}}}catch{}};_0x2e70e7(_0x36bfae);}}return{'fileName':_0x5538c3,'lastModified':_0x476e61>0x0?new Date(_0x476e61)['toISOString']():null,'fullPath':_0x2ecab5,'dirPath':_0x201ec3};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x33defa,_0x198c3e,_0x3facf2){const _0x5ee4cc=a0_0x1f9d15;let _0x27cc2b=![],_0x379f02=0x0;if(!_0x33defa)return{'modified':_0x27cc2b,'savedTokens':_0x379f02};const _0x1db284=_0x2eb1fc=>_0x2eb1fc[_0x5ee4cc(0x1ac)](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x33defa[_0x5ee4cc(0x19e)]===_0x5ee4cc(0x162)){let _0x437767=_0x33defa['content'],_0x122464=_0x1db284(_0x437767);_0x122464[_0x5ee4cc(0x140)]<_0x437767[_0x5ee4cc(0x140)]&&(_0x33defa[_0x5ee4cc(0x19e)]=_0x122464,_0x27cc2b=!![],_0x379f02+=Math['ceil']((_0x437767['length']-_0x122464['length'])/0x4));if(_0x33defa[_0x5ee4cc(0x19e)][_0x5ee4cc(0x140)]>OFFLOAD_THRESHOLD_CHARS&&!_0x33defa[_0x5ee4cc(0x19e)][_0x5ee4cc(0x193)]('TrimPrompt\x20Cache\x20Engine')){const _0x5b669b=_0x5ee4cc(0x14e)+Math[_0x5ee4cc(0x141)](_0x33defa['content'][_0x5ee4cc(0x140)]/0x4)+'\x20tokens).',_0x5d38fa=(0x0,cache_manager_1['saveChunk'])(_0x198c3e,_0x3facf2,_0x33defa['content'],_0x5b669b);_0x33defa['content']=_0x5ee4cc(0x15c)+_0x5d38fa['raw_tokens']+'\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x5d38fa[_0x5ee4cc(0x1a7)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x5d38fa[_0x5ee4cc(0x1a7)]+'`\x0a',_0x27cc2b=!![],_0x379f02+=Math[_0x5ee4cc(0x176)](0x0,_0x5d38fa['raw_tokens']-_0x5d38fa[_0x5ee4cc(0x15d)]);}}else{if(Array[_0x5ee4cc(0x19a)](_0x33defa['content']))for(const _0x1f405a of _0x33defa[_0x5ee4cc(0x19e)]){if(_0x1f405a&&typeof _0x1f405a==='object'){if(typeof _0x1f405a['text']===_0x5ee4cc(0x162)){let _0x26028d=_0x1f405a[_0x5ee4cc(0x169)],_0x15ad12=_0x1db284(_0x26028d);_0x15ad12[_0x5ee4cc(0x140)]<_0x26028d['length']&&(_0x1f405a['text']=_0x15ad12,_0x27cc2b=!![],_0x379f02+=Math['ceil']((_0x26028d[_0x5ee4cc(0x140)]-_0x15ad12[_0x5ee4cc(0x140)])/0x4));if(_0x1f405a[_0x5ee4cc(0x169)][_0x5ee4cc(0x140)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1f405a[_0x5ee4cc(0x169)][_0x5ee4cc(0x193)](_0x5ee4cc(0x1a8))){const _0x93856e='Summary:\x20Text\x20block\x20offloaded\x20('+Math[_0x5ee4cc(0x141)](_0x1f405a[_0x5ee4cc(0x169)]['length']/0x4)+_0x5ee4cc(0x152),_0x16f7ef=(0x0,cache_manager_1[_0x5ee4cc(0x14a)])(_0x198c3e,_0x3facf2,_0x1f405a['text'],_0x93856e);_0x1f405a['text']='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x16f7ef[_0x5ee4cc(0x1a7)]+_0x5ee4cc(0x12e)+_0x16f7ef[_0x5ee4cc(0x1a7)]+'`\x0a',_0x27cc2b=!![],_0x379f02+=Math['max'](0x0,_0x16f7ef[_0x5ee4cc(0x122)]-_0x16f7ef[_0x5ee4cc(0x15d)]);}}else{if(typeof _0x1f405a[_0x5ee4cc(0x19e)]===_0x5ee4cc(0x162)){let _0x759ac7=_0x1f405a[_0x5ee4cc(0x19e)],_0x5b7404=_0x1db284(_0x759ac7);_0x5b7404[_0x5ee4cc(0x140)]<_0x759ac7[_0x5ee4cc(0x140)]&&(_0x1f405a[_0x5ee4cc(0x19e)]=_0x5b7404,_0x27cc2b=!![],_0x379f02+=Math[_0x5ee4cc(0x141)]((_0x759ac7[_0x5ee4cc(0x140)]-_0x5b7404[_0x5ee4cc(0x140)])/0x4));if(_0x1f405a[_0x5ee4cc(0x19e)][_0x5ee4cc(0x140)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1f405a[_0x5ee4cc(0x19e)][_0x5ee4cc(0x193)](_0x5ee4cc(0x1a8))){const _0x277d52=_0x5ee4cc(0x158)+Math[_0x5ee4cc(0x141)](_0x1f405a['content'][_0x5ee4cc(0x140)]/0x4)+'\x20tokens).',_0x3b8d00=(0x0,cache_manager_1['saveChunk'])(_0x198c3e,_0x3facf2,_0x1f405a[_0x5ee4cc(0x19e)],_0x277d52);_0x1f405a[_0x5ee4cc(0x19e)]=_0x5ee4cc(0x132)+_0x3b8d00['chunk_id']+_0x5ee4cc(0x12e)+_0x3b8d00[_0x5ee4cc(0x1a7)]+'`\x0a',_0x27cc2b=!![],_0x379f02+=Math[_0x5ee4cc(0x176)](0x0,_0x3b8d00['raw_tokens']-_0x3b8d00[_0x5ee4cc(0x15d)]);}}}}}}return{'modified':_0x27cc2b,'savedTokens':_0x379f02};}const sessionsStatePath=path[a0_0x1f9d15(0x14b)](baseDir,a0_0x1f9d15(0x151));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x85cd4a=a0_0x1f9d15;try{if(fs[_0x85cd4a(0x133)](sessionsStatePath)){const _0x371a2f=JSON[_0x85cd4a(0x138)](fs['readFileSync'](sessionsStatePath,_0x85cd4a(0x1a6)));if(_0x371a2f&&typeof _0x371a2f==='object')return sessionsStateMemoryCache=_0x371a2f,_0x371a2f;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x217088,_0x35ef21,_0x533b5c,_0x4c1802=0x0,_0x515054=0x0,_0x2c9bca=0x0){const _0x55d187=a0_0x1f9d15;try{const _0x4dc4a7=loadSessionsState(),_0x1a2aae=_0x4dc4a7[_0x217088]||{},_0x50a375=_0x515054||_0x1a2aae['autoCompactSaved']||0x0,_0x10de4b=_0x2c9bca||_0x1a2aae[_0x55d187(0x1b0)]||0x0,_0x316658=_0x533b5c!==undefined?_0x533b5c:_0x1a2aae[_0x55d187(0x1b6)]||0x0;_0x4dc4a7[_0x217088]={'lineCount':_0x35ef21||_0x1a2aae[_0x55d187(0x1b7)]||0x1,'activeSavedTokens':_0x316658+_0x50a375+_0x10de4b,'sideCacheSaved':_0x4c1802||_0x1a2aae[_0x55d187(0x160)]||0x0,'officialCompactSaved':_0x316658,'autoCompactSaved':_0x50a375,'hookSavedTokens':_0x10de4b},sessionsStateMemoryCache=_0x4dc4a7;if(!fs['existsSync'](baseDir))fs[_0x55d187(0x16d)](baseDir,{'recursive':!![]});const _0x31ff8a=sessionsStatePath+_0x55d187(0x17c);fs[_0x55d187(0x149)](_0x31ff8a,JSON['stringify'](_0x4dc4a7,null,0x2),_0x55d187(0x1a6)),fs['renameSync'](_0x31ff8a,sessionsStatePath);}catch{}}function processSessionFile(_0x5028a5,_0xf332ac){const _0x5848c4=a0_0x1f9d15;try{if(!fs[_0x5848c4(0x133)](_0x5028a5))return;const _0x4e5857=fs[_0x5848c4(0x1ad)](_0x5028a5);if(_0x4e5857[_0x5848c4(0x144)]()||_0x4e5857['size']===0x0)return;const _0x5639bb=loadConfig(),_0x57a2f7=_0x5848c4(0x11f)+_0xf332ac;if(_0x5639bb[_0x5848c4(0x14d)][_0x57a2f7]===![])return;const _0x8ae682=fs[_0x5848c4(0x155)](_0x5028a5,_0x5848c4(0x1a6)),_0xf3c6c5=path[_0x5848c4(0x18f)](_0x5028a5)[_0x5848c4(0x154)]();let _0x4a7a15=0x1;if(_0xf3c6c5===_0x5848c4(0x167)||_0xf3c6c5===_0x5848c4(0x136))_0x4a7a15=_0x8ae682[_0x5848c4(0x12b)]('\x0a')[_0x5848c4(0x191)](Boolean)[_0x5848c4(0x140)];else{if(_0xf3c6c5===_0x5848c4(0x1c1))try{const _0x3beacf=JSON[_0x5848c4(0x138)](_0x8ae682),_0x3db2e7=Array[_0x5848c4(0x19a)](_0x3beacf[_0x5848c4(0x178)])?_0x3beacf[_0x5848c4(0x178)]:Array[_0x5848c4(0x19a)](_0x3beacf)?_0x3beacf:null;if(_0x3db2e7)_0x4a7a15=_0x3db2e7[_0x5848c4(0x140)];}catch{}}let _0x182cda=0x0;if((_0xf3c6c5==='.jsonl'||_0xf3c6c5===_0x5848c4(0x136))&&_0x8ae682[_0x5848c4(0x193)](_0x5848c4(0x148))&&_0x8ae682[_0x5848c4(0x193)](_0x5848c4(0x184))){const _0x5a2b21=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x39f575 of _0x8ae682[_0x5848c4(0x12b)]('\x0a')){if(!_0x39f575[_0x5848c4(0x193)](_0x5848c4(0x148))||!_0x39f575[_0x5848c4(0x193)](_0x5848c4(0x184)))continue;try{const _0x145138=JSON[_0x5848c4(0x138)](_0x39f575);if(_0x145138[_0x5848c4(0x120)]!=='system')continue;const _0x57fc28=typeof _0x145138[_0x5848c4(0x19e)]===_0x5848c4(0x162)?_0x145138['content']:_0x145138[_0x5848c4(0x179)]&&typeof _0x145138[_0x5848c4(0x179)][_0x5848c4(0x19e)]===_0x5848c4(0x162)?_0x145138['message'][_0x5848c4(0x19e)]:'';if(!_0x57fc28)continue;for(const _0x33ad63 of _0x57fc28['matchAll'](_0x5a2b21)){let _0x5b1a7d=parseFloat(_0x33ad63[0x1]);if(_0x33ad63[0x0][_0x5848c4(0x154)]()[_0x5848c4(0x193)]('k'))_0x5b1a7d=_0x5b1a7d*0x3e8;_0x182cda+=Math[_0x5848c4(0x13a)](_0x5b1a7d);}}catch{}}}const _0x283d42=loadSessionsState(),_0x408ec9=_0x283d42[_0x5028a5],_0x3c3208=_0x408ec9?_0x408ec9[_0x5848c4(0x1b7)]:0x0,_0x94a06e=_0x408ec9?_0x408ec9[_0x5848c4(0x1a3)]||0x0:0x0;if(_0x3c3208>0x0&&_0x4a7a15>_0x3c3208&&_0x94a06e>0x0){const _0x247ee4=_0x5848c4(0x180)+_0xf332ac;tracker_1[_0x5848c4(0x163)][_0x5848c4(0x19f)](_0x247ee4,'A'[_0x5848c4(0x170)](_0x94a06e*0x4),'',0x0,undefined,['conv_'+_0xf332ac,'live-conv',_0xf332ac,'prompt_turn']);}const _0x5d4c70=_0x408ec9&&_0x408ec9[_0x5848c4(0x1b6)]!==undefined?_0x408ec9[_0x5848c4(0x1b6)]:0x0,_0x11daea=Math[_0x5848c4(0x176)](_0x5d4c70,_0x182cda);saveSessionStateItem(_0x5028a5,_0x4a7a15,_0x11daea,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x3f2425,_0x400a2f){const _0x5feacb=a0_0x1f9d15;try{if(!fs[_0x5feacb(0x133)](_0x3f2425))return{'ok':![],'reason':'Session\x20file\x20not\x20found'};const _0x28f60a=path['extname'](_0x3f2425)[_0x5feacb(0x154)]();if(_0x28f60a!=='.json'&&_0x28f60a!==_0x5feacb(0x167)&&_0x28f60a!=='.json1')return{'ok':![],'reason':_0x5feacb(0x1a0)+(_0x28f60a||_0x5feacb(0x16f))+_0x5feacb(0x125)};const _0x233716=fs['readFileSync'](_0x3f2425,_0x5feacb(0x1a6)),_0x52ceeb=Buffer[_0x5feacb(0x198)](_0x233716,_0x5feacb(0x1a6)),_0x2ee70d=path['basename'](_0x3f2425,_0x28f60a);let _0x4322b6=_0x233716,_0x5d155f=![];if(_0x28f60a===_0x5feacb(0x1c1)){const _0x46b6ca=JSON[_0x5feacb(0x138)](_0x233716),_0x21ffb9=Array[_0x5feacb(0x19a)](_0x46b6ca['messages'])?_0x46b6ca['messages']:Array['isArray'](_0x46b6ca)?_0x46b6ca:null;if(_0x21ffb9){for(const _0x4d1954 of _0x21ffb9){const _0x832e8c=compressMessageContent(_0x4d1954,_0x2ee70d,_0x400a2f);if(_0x832e8c[_0x5feacb(0x1c2)])_0x5d155f=!![];}if(_0x5d155f)_0x4322b6=JSON['stringify'](_0x46b6ca,null,0x2);}}else{const _0xbcf97e=_0x233716[_0x5feacb(0x12b)]('\x0a'),_0x5b7711=[];for(let _0x3cf99a of _0xbcf97e){if(!_0x3cf99a['trim']()){_0x5b7711['push'](_0x3cf99a);continue;}try{const _0x153c32=JSON[_0x5feacb(0x138)](_0x3cf99a),_0x403f13=_0x153c32['message']||_0x153c32;if(_0x403f13){const _0x91baed=compressMessageContent(_0x403f13,_0x2ee70d,_0x400a2f);_0x91baed[_0x5feacb(0x1c2)]&&(_0x5d155f=!![],_0x3cf99a=JSON[_0x5feacb(0x194)](_0x153c32));}}catch{}_0x5b7711['push'](_0x3cf99a);}if(_0x5d155f)_0x4322b6=_0x5b7711[_0x5feacb(0x14b)]('\x0a');}const _0x1c68bd=Buffer[_0x5feacb(0x198)](_0x4322b6,_0x5feacb(0x1a6)),_0x21cd89=path[_0x5feacb(0x14b)](path[_0x5feacb(0x12d)](_0x3f2425),_0x2ee70d+_0x5feacb(0x171)+_0x28f60a);fs[_0x5feacb(0x149)](_0x21cd89,_0x4322b6,_0x5feacb(0x1a6));const _0x24f756=Math[_0x5feacb(0x141)](_0x52ceeb/0x4),_0x4ac63a=Math[_0x5feacb(0x141)](_0x1c68bd/0x4),_0x4f8195=Math['max'](0x0,_0x24f756-_0x4ac63a),_0x3ae99b=_0x52ceeb>0x0?Math[_0x5feacb(0x13a)]((0x1-_0x1c68bd/_0x52ceeb)*0x3e8)/0xa:0x0;return _0x4f8195>0x0&&tracker_1[_0x5feacb(0x163)][_0x5feacb(0x19f)]('compact:'+_0x400a2f,_0x233716,_0x4322b6,_0x4f8195,undefined,['conv_'+_0x400a2f,'live-conv',_0x400a2f,_0x5feacb(0x124)]),{'ok':!![],'compactPath':_0x21cd89,'rawBytes':_0x52ceeb,'compressedBytes':_0x1c68bd,'rawTokens':_0x24f756,'compressedTokens':_0x4ac63a,'savedTokens':_0x4f8195,'reductionPct':_0x3ae99b};}catch(_0x549743){return{'ok':![],'reason':_0x549743?.['message']||_0x5feacb(0x18c)};}}function compactLiveSession(_0x228845,_0x3d4880){const _0xed72c5=a0_0x1f9d15;try{if(!fs['existsSync'](_0x228845))return{'ok':![],'savedTokens':0x0,'reason':_0xed72c5(0x1d1)};const _0x3ab526=path[_0xed72c5(0x18f)](_0x228845)[_0xed72c5(0x154)]();if(_0x3ab526!==_0xed72c5(0x1c1)&&_0x3ab526!=='.jsonl'&&_0x3ab526!=='.json1')return{'ok':![],'savedTokens':0x0,'reason':_0xed72c5(0x177)};const _0x1d2a7c=fs[_0xed72c5(0x155)](_0x228845,_0xed72c5(0x1a6)),_0x3a1c35=Buffer[_0xed72c5(0x198)](_0x1d2a7c,_0xed72c5(0x1a6)),_0x2b6acd=Math[_0xed72c5(0x141)](_0x3a1c35/0x4),_0x1a1461=path[_0xed72c5(0x1b3)](_0x228845,_0x3ab526);let _0x543951=_0x1d2a7c,_0x29fd05=![];if(_0x3ab526===_0xed72c5(0x1c1)){const _0x3fa573=JSON['parse'](_0x1d2a7c),_0x769171=Array[_0xed72c5(0x19a)](_0x3fa573['messages'])?_0x3fa573[_0xed72c5(0x178)]:Array['isArray'](_0x3fa573)?_0x3fa573:null;if(_0x769171){for(const _0x314f83 of _0x769171){const _0x11b79e=compressMessageContent(_0x314f83,_0x1a1461,_0x3d4880);if(_0x11b79e['modified'])_0x29fd05=!![];}const {compressConversation:_0x569077}=require(_0xed72c5(0x197)),_0x30280f=_0x569077(_0x769171,0x9c40);_0x30280f['savedTokens']>0x0&&(_0x29fd05=!![],Array['isArray'](_0x3fa573[_0xed72c5(0x178)])?_0x3fa573[_0xed72c5(0x178)]=_0x30280f[_0xed72c5(0x178)]:_0x543951=JSON[_0xed72c5(0x194)](_0x30280f['messages'],null,0x2)),_0x29fd05&&!Array[_0xed72c5(0x19a)](_0x3fa573)&&(_0x543951=JSON['stringify'](_0x3fa573,null,0x2));}}else{const _0x29d504=_0x1d2a7c[_0xed72c5(0x12b)]('\x0a'),_0x4f37ad=[],_0x3a1f9a=[];for(const _0x3f36ea of _0x29d504){if(!_0x3f36ea[_0xed72c5(0x153)]())continue;try{const _0x4c60e7=JSON[_0xed72c5(0x138)](_0x3f36ea);_0x4f37ad[_0xed72c5(0x182)](_0x4c60e7);const _0x203217=_0x4c60e7[_0xed72c5(0x179)]||_0x4c60e7;_0x203217&&typeof _0x203217[_0xed72c5(0x12a)]===_0xed72c5(0x162)&&_0x3a1f9a['push'](_0x203217);}catch{}}for(const _0x227bbb of _0x3a1f9a){const _0x3d74b9=compressMessageContent(_0x227bbb,_0x1a1461,_0x3d4880);if(_0x3d74b9[_0xed72c5(0x1c2)])_0x29fd05=!![];}const {compressConversation:_0x43874e}=require(_0xed72c5(0x197)),_0xd49f0a=_0x43874e(_0x3a1f9a,0x9c40);if(_0xd49f0a[_0xed72c5(0x1d4)]>0x0||_0x29fd05){const _0x38211d=[];for(const _0x114a28 of _0x4f37ad){const _0x28f528=_0x114a28[_0xed72c5(0x179)]||_0x114a28;if(_0x28f528&&typeof _0x28f528[_0xed72c5(0x12a)]===_0xed72c5(0x162)){const _0x221017=_0xd49f0a[_0xed72c5(0x178)][_0xed72c5(0x147)](_0x143fd6=>_0x143fd6===_0x28f528);_0x221017?(_0x114a28[_0xed72c5(0x179)]?_0x114a28[_0xed72c5(0x179)]=_0x221017:Object[_0xed72c5(0x135)](_0x114a28,_0x221017),_0x38211d['push'](JSON[_0xed72c5(0x194)](_0x114a28))):_0x29fd05=!![];}else _0x38211d[_0xed72c5(0x182)](JSON[_0xed72c5(0x194)](_0x114a28));}_0x543951=_0x38211d['join']('\x0a'),_0x29fd05=!![];}}if(_0x29fd05){const _0x272879=Buffer[_0xed72c5(0x198)](_0x543951,'utf8');fs[_0xed72c5(0x149)](_0x228845,_0x543951,'utf8');const _0x116928=Math[_0xed72c5(0x141)](_0x272879/0x4),_0x56c145=Math['max'](0x0,_0x2b6acd-_0x116928);if(_0x56c145>0x0){const _0xd3ad61=loadSessionsState(),_0x40e414=_0xd3ad61[_0x228845]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x413f27=_0x40e414[_0xed72c5(0x1c9)]||0x0,_0x483895=_0x413f27+_0x56c145;saveSessionStateItem(_0x228845,_0x40e414[_0xed72c5(0x1b7)],_0x40e414[_0xed72c5(0x1b6)]||0x0,_0x40e414['sideCacheSaved']||0x0,_0x483895,_0x40e414['hookSavedTokens']||0x0),tracker_1[_0xed72c5(0x163)][_0xed72c5(0x19f)](_0xed72c5(0x14f)+_0x3d4880,_0x1d2a7c,_0x543951,_0x56c145,undefined,[_0xed72c5(0x11f)+_0x3d4880,_0xed72c5(0x1d6),_0x3d4880,_0xed72c5(0x124)]);}return{'ok':!![],'savedTokens':_0x56c145};}return{'ok':!![],'savedTokens':0x0};}catch(_0x581b8d){return{'ok':![],'savedTokens':0x0,'reason':_0x581b8d[_0xed72c5(0x179)]||_0xed72c5(0x13e)};}}function installWindowsStartupService(){const _0x5c4e50=a0_0x1f9d15;if(process['platform']!=='win32')return;try{const _0xa91162=path[_0x5c4e50(0x14b)](os['homedir'](),'AppData','Roaming','Microsoft',_0x5c4e50(0x128),'Start\x20Menu',_0x5c4e50(0x1c5),_0x5c4e50(0x199));if(!fs['existsSync'](_0xa91162))fs['mkdirSync'](_0xa91162,{'recursive':!![]});const _0x2cadb8=path[_0x5c4e50(0x14b)](_0xa91162,_0x5c4e50(0x12f)),_0x2192a1=path[_0x5c4e50(0x14b)](__dirname,_0x5c4e50(0x17f)),_0x2b900c=_0x2192a1[_0x5c4e50(0x1ac)](/\\/g,'\x5c\x5c'),_0x388af5=_0x5c4e50(0x130)+_0x2b900c+_0x5c4e50(0x1c8);fs[_0x5c4e50(0x149)](_0x2cadb8,_0x388af5,_0x5c4e50(0x1a6));}catch{}}function startWatcherDaemon(){const _0x382c77=a0_0x1f9d15;installWindowsStartupService();try{const {installClaudeHooks:_0x5177b7}=require(_0x382c77(0x1af));_0x5177b7();}catch(_0x35a884){}const _0x8145e3=['claude',_0x382c77(0x188),_0x382c77(0x11e),_0x382c77(0x16b),_0x382c77(0x17a),_0x382c77(0x1b8),_0x382c77(0x1b9),'opencode',_0x382c77(0x1a1)];for(const _0x38f61f of _0x8145e3){const _0x19878f=getAgentStoragePaths(_0x38f61f);for(const _0x45d913 of _0x19878f){if(fs[_0x382c77(0x133)](_0x45d913))try{fs[_0x382c77(0x1d7)](_0x45d913,{'recursive':!![]},(_0x44a963,_0x365c08)=>{const _0x5b9ca8=_0x382c77;if(!_0x365c08)return;const _0x2b9019=path[_0x5b9ca8(0x14b)](_0x45d913,_0x365c08);if(debounceTimers[_0x5b9ca8(0x15a)](_0x2b9019))clearTimeout(debounceTimers[_0x5b9ca8(0x168)](_0x2b9019));const _0xa211f5=setTimeout(()=>processSessionFile(_0x2b9019,_0x38f61f),0x1f4);debounceTimers[_0x5b9ca8(0x1b2)](_0x2b9019,_0xa211f5);});}catch{}}}setInterval(()=>{const _0x509d03=_0x382c77;for(const _0x1511b8 of _0x8145e3){try{const _0x51d9c4=getLatestSessionFile(_0x1511b8);_0x51d9c4&&_0x51d9c4['fullPath']&&processSessionFile(_0x51d9c4[_0x509d03(0x1bc)],_0x1511b8);}catch{}}},0xbb8);const _0x5d0464=()=>{const _0x1273eb=_0x382c77;for(const _0x557959 of _0x8145e3){try{const _0x3e2008=getLatestSessionFile(_0x557959);_0x3e2008&&_0x3e2008[_0x1273eb(0x1bc)]&&compactLiveSession(_0x3e2008[_0x1273eb(0x1bc)],_0x557959);}catch{}}};setTimeout(_0x5d0464,0x7d0),setInterval(_0x5d0464,0x2bf20);}function a0_0x4b02(){const _0x5e0884=['sessions','none','repeat','.compact','workspaceStorage','./cache-manager','writable','.vscdb','max','Unsupported\x20extension','messages','message','aider','endsWith','.tmp','getAgentStoragePaths','Roaming','cli.js','conv:','.gif','push','5IYragk','tokens','storage','win32','User','gemini','4919442OfqHIf','projects','platform','compaction\x20failed','.aider.chat.history.md','.pb','extname','.git','filter','node_modules','includes','stringify','__pycache__','6697269AqrpBq','./proxy-conv','byteLength','Startup','isArray','processSessionFile','darwin','create','content','logExecution','Unsupported\x20format\x20\x27','cortex','env','activeSavedTokens','compactSessionCopy','custom_storage_paths','utf8','chunk_id','TrimPrompt\x20Cache\x20Engine','compactLiveSession','venv','.db','replace','statSync','github-copilot-cli','./hooks/claude-hook','hookSavedTokens','Codex','set','basename','history','__esModule','officialCompactSaved','lineCount','copilot','openclaw','config.json','loadConfig','fullPath','loadSessionsState','1744214AQCFtI','isFile','getOwnPropertyNames','.json','modified','installWindowsStartupService','.venv','Programs','startWatcherDaemon','3FUswMe','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','autoCompactSaved','26137980gizCzn','getLatestSessionFile','antigravity','startsWith','.openclaw','./tracker','101256GKXKjY','File\x20not\x20found','.png','.jpeg','savedTokens','.jpg','live-conv','watch','__setModuleDefault','codex','conv_','type','.wal','raw_tokens','AppData','compact_copy','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','context','.gemini','Windows','Library','role','split','.trimprompt','dirname','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','TrimPromptDaemon.vbs','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','.config','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','existsSync','path','assign','.json1','cwd','parse','defineProperty','round','253072hLyhaI','__createBinding','Cursor','Compaction\x20failed','1863058cUpwSq','length','ceil','configurable','.agents','isDirectory','media__','.opencode','find','saved','writeFileSync','saveChunk','join','default','conversation_toggles','Summary:\x20Content\x20offloaded\x20(','compact:','.claude','sessions_state.json','\x20tokens).','trim','toLowerCase','readFileSync','build','image_','Summary:\x20Tool\x20result\x20offloaded\x20(','saveSessionStateItem','has','cache','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','compressed_tokens','out','mtimeMs','sideCacheSaved','392VFbqZE','string','tracker','.codex','Application\x20Support','.next','.jsonl','get','text','homedir','cursor','name','mkdirSync'];a0_0x4b02=function(){return _0x5e0884;};return a0_0x4b02();}
1
+ 'use strict';const a0_0x2691ba=a0_0x44b3;function a0_0x44b3(_0x53b2e0,_0x20dde9){_0x53b2e0=_0x53b2e0-0xee;const _0x571f67=a0_0x571f();let _0x44b346=_0x571f67[_0x53b2e0];return _0x44b346;}function a0_0x571f(){const _0x4c763a=['storage','none','length','antigravity','context','writable','name','.tmp','.pb','content','gemini','role','media__','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','mtimeMs','tracker','sessions_state.json','default','existsSync','.opencode','push','repeat','copilot','saved','path','readFileSync','parse','loadConfig','byteLength','Summary:\x20Content\x20offloaded\x20(','split','Unsupported\x20format\x20\x27','423704dDeMkY','filter','officialCompactSaved','.dat','.jpg','.claude','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','cortex','startsWith','fullPath','.compact','homedir','\x20tokens).','File\x20not\x20found','compact_copy','Local','stringify','object','activeSavedTokens','autoCompactSaved','32RfVqmk','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','messages','writeFileSync','set','__esModule','255630MANVDl','.config','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','.gif','Library','Codex','User','message','statSync','utf8','ceil','trim','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','build','7945TlRZYw','Session\x20file\x20not\x20found','renameSync','__createBinding','savedTokens','image_','6561582gKBBYn','basename','extname','.shm','sessions','TrimPromptDaemon.vbs','saveChunk','__importStar','__pycache__','endsWith','round','find','call','cli.js','workspaceStorage','.wal','getLatestSessionFile','cursor','.json1','conv_','./cache-manager','dist','text','.db','1192eSbEsd','4698666HASvfy','platform','1176057YNraoL','size','sideCacheSaved','.git','node_modules','AppData','live-conv','processSessionFile','TrimPrompt\x20Cache\x20Engine','out','.agents','history','isFile','compaction\x20failed','darwin','defineProperty','Windows','92214tAavcF','.gemini','prompt_turn','configurable','toLowerCase','create','raw_tokens','projects','hookSavedTokens','Roaming','claude','venv','.vscdb','hasOwnProperty','.webp','chunk_id','.next','modified','cwd','.png','Cursor','conversation_toggles','.openclaw','join','config.json','Compaction\x20failed','Application\x20Support','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','isDirectory','Summary:\x20Tool\x20result\x20offloaded\x20(','Programs','string','isArray','max','compressed_tokens','aider','logExecution','dirname','has','win32','mkdirSync','get','replace','Summary:\x20Text\x20block\x20offloaded\x20(','lineCount','matchAll','.json','loadSessionsState','saveSessionStateItem','opencode','includes','github-copilot-cli','compact:','.jsonl','.cortex','custom_storage_paths','env','getOwnPropertyDescriptor','openclaw'];a0_0x571f=function(){return _0x4c763a;};return a0_0x571f();}(function(_0x52fb6b,_0x2fe787){const _0x359ce2=a0_0x44b3,_0x1236b4=_0x52fb6b();while(!![]){try{const _0x1254df=parseInt(_0x359ce2(0x164))/0x1+parseInt(_0x359ce2(0x149))/0x2+parseInt(_0x359ce2(0x193))/0x3+parseInt(_0x359ce2(0x15e))/0x4*(-parseInt(_0x359ce2(0x172))/0x5)+-parseInt(_0x359ce2(0x178))/0x6+-parseInt(_0x359ce2(0x191))/0x7+parseInt(_0x359ce2(0x190))/0x8*(parseInt(_0x359ce2(0xee))/0x9);if(_0x1254df===_0x2fe787)break;else _0x1236b4['push'](_0x1236b4['shift']());}catch(_0x2ed9bc){_0x1236b4['push'](_0x1236b4['shift']());}}}(a0_0x571f,0x94960));var __createBinding=this&&this[a0_0x2691ba(0x175)]||(Object[a0_0x2691ba(0xf3)]?function(_0x3196fa,_0x255c92,_0x10cb29,_0x5c1d7f){const _0x52c4bc=a0_0x2691ba;if(_0x5c1d7f===undefined)_0x5c1d7f=_0x10cb29;var _0x31507f=Object[_0x52c4bc(0x127)](_0x255c92,_0x10cb29);(!_0x31507f||(_0x52c4bc(0x117)in _0x31507f?!_0x255c92['__esModule']:_0x31507f[_0x52c4bc(0x12e)]||_0x31507f[_0x52c4bc(0xf1)]))&&(_0x31507f={'enumerable':!![],'get':function(){return _0x255c92[_0x10cb29];}}),Object[_0x52c4bc(0x1a2)](_0x3196fa,_0x5c1d7f,_0x31507f);}:function(_0x5afa84,_0xedaa9,_0x243948,_0x315f6d){if(_0x315f6d===undefined)_0x315f6d=_0x243948;_0x5afa84[_0x315f6d]=_0xedaa9[_0x243948];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x45e067,_0x35577a){const _0x554aef=a0_0x2691ba;Object['defineProperty'](_0x45e067,_0x554aef(0x13a),{'enumerable':!![],'value':_0x35577a});}:function(_0x49f7b2,_0x10d939){_0x49f7b2['default']=_0x10d939;}),__importStar=this&&this[a0_0x2691ba(0x17f)]||(function(){var _0x49ff3c=function(_0x51db69){return _0x49ff3c=Object['getOwnPropertyNames']||function(_0x50d0d0){const _0x587ea7=a0_0x44b3;var _0x4fa1bf=[];for(var _0x4b8e58 in _0x50d0d0)if(Object['prototype'][_0x587ea7(0xfb)][_0x587ea7(0x184)](_0x50d0d0,_0x4b8e58))_0x4fa1bf[_0x4fa1bf[_0x587ea7(0x12b)]]=_0x4b8e58;return _0x4fa1bf;},_0x49ff3c(_0x51db69);};return function(_0x2a7331){const _0x403b73=a0_0x44b3;if(_0x2a7331&&_0x2a7331[_0x403b73(0x163)])return _0x2a7331;var _0x4542db={};if(_0x2a7331!=null){for(var _0x4275d8=_0x49ff3c(_0x2a7331),_0x12aaec=0x0;_0x12aaec<_0x4275d8['length'];_0x12aaec++)if(_0x4275d8[_0x12aaec]!==_0x403b73(0x13a))__createBinding(_0x4542db,_0x2a7331,_0x4275d8[_0x12aaec]);}return __setModuleDefault(_0x4542db,_0x2a7331),_0x4542db;};}());Object[a0_0x2691ba(0x1a2)](exports,'__esModule',{'value':!![]}),exports[a0_0x2691ba(0x144)]=loadConfig,exports['saveConfig']=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0x2691ba(0x188)]=getLatestSessionFile,exports[a0_0x2691ba(0x11d)]=loadSessionsState,exports[a0_0x2691ba(0x11e)]=saveSessionStateItem,exports[a0_0x2691ba(0x19a)]=processSessionFile,exports['compactSessionCopy']=compactSessionCopy,exports['compactLiveSession']=compactLiveSession,exports['installWindowsStartupService']=installWindowsStartupService,exports['startWatcherDaemon']=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2691ba(0x141))),os=__importStar(require('os')),cache_manager_1=require(a0_0x2691ba(0x18c)),tracker_1=require('./tracker'),baseDir=path[a0_0x2691ba(0x105)](os[a0_0x2691ba(0x155)](),'.trimprompt'),configPath=path[a0_0x2691ba(0x105)](baseDir,a0_0x2691ba(0x106)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x5c6439=a0_0x2691ba;try{if(!fs[_0x5c6439(0x13b)](baseDir))fs[_0x5c6439(0x116)](baseDir,{'recursive':!![]});if(fs[_0x5c6439(0x13b)](configPath)){const _0x1fae45=JSON[_0x5c6439(0x143)](fs['readFileSync'](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x1fae45,'conversation_toggles':{...DEFAULT_CONFIG[_0x5c6439(0x103)],..._0x1fae45[_0x5c6439(0x103)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x5c6439(0x125)],..._0x1fae45['custom_storage_paths']||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x598b18){const _0x456c57=a0_0x2691ba,_0x55076f=loadConfig(),_0x2b7b40={..._0x55076f,..._0x598b18,'conversation_toggles':{..._0x55076f[_0x456c57(0x103)],..._0x598b18[_0x456c57(0x103)]||{}},'custom_storage_paths':{..._0x55076f[_0x456c57(0x125)],..._0x598b18['custom_storage_paths']||{}}};try{if(!fs[_0x456c57(0x13b)](baseDir))fs[_0x456c57(0x116)](baseDir,{'recursive':!![]});fs[_0x456c57(0x161)](configPath,JSON['stringify'](_0x2b7b40,null,0x2),_0x456c57(0x16d));}catch{}return _0x2b7b40;}function getAgentStoragePaths(_0x5c3f8b){const _0x4e46ee=a0_0x2691ba,_0x315845=loadConfig(),_0xefc51f=_0x315845['custom_storage_paths'][_0x5c3f8b];if(_0xefc51f&&fs[_0x4e46ee(0x13b)](_0xefc51f))return[_0xefc51f];const _0x482494=os['homedir'](),_0x930d78=process['platform']==='win32',_0x3b8c76=process['platform']===_0x4e46ee(0x1a1);switch(_0x5c3f8b){case _0x4e46ee(0xf8):return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x14e),_0x4e46ee(0xf5)),path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x14e),_0x4e46ee(0x19e))];case'codex':return[path[_0x4e46ee(0x105)](_0x482494,'.codex',_0x4e46ee(0x17c)),path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x198),_0x4e46ee(0xf7),_0x4e46ee(0x169))];case _0x4e46ee(0x133):case'antigravity':return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0xef),_0x4e46ee(0x12c)),path['join'](_0x482494,_0x4e46ee(0xef)),path['join'](_0x482494,_0x4e46ee(0x198),_0x4e46ee(0xf7),'Gemini'),path['join'](_0x482494,'.config',_0x4e46ee(0x133))];case _0x4e46ee(0x189):if(_0x930d78)return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x198),_0x4e46ee(0xf7),_0x4e46ee(0x102),_0x4e46ee(0x16a),_0x4e46ee(0x186))];if(_0x3b8c76)return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x168),_0x4e46ee(0x108),_0x4e46ee(0x102),_0x4e46ee(0x16a),_0x4e46ee(0x186))];return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x165),_0x4e46ee(0x102),_0x4e46ee(0x16a),'workspaceStorage')];case _0x4e46ee(0x111):return[process[_0x4e46ee(0x100)](),path[_0x4e46ee(0x105)](_0x482494,'.aider.chat.history.md')];case _0x4e46ee(0x13f):if(_0x930d78)return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x198),_0x4e46ee(0x159),_0x4e46ee(0x121))];return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x165),_0x4e46ee(0x121))];case _0x4e46ee(0x128):return[path[_0x4e46ee(0x105)](_0x482494,_0x4e46ee(0x104),_0x4e46ee(0x129)),path[_0x4e46ee(0x105)](process['cwd'](),_0x4e46ee(0x104),_0x4e46ee(0x12d))];case _0x4e46ee(0x11f):return[path['join'](_0x482494,_0x4e46ee(0x13c),_0x4e46ee(0x17c))];case _0x4e46ee(0x151):return[path['join'](_0x482494,_0x4e46ee(0x124),'cache')];default:return[];}}function getLatestSessionFile(_0x245849){const _0x2d844e=a0_0x2691ba,_0x158835=getAgentStoragePaths(_0x245849);let _0x45f28f=null,_0x4f73a0=0x0,_0x386a18=null,_0x3483e7=null;for(const _0x42496e of _0x158835){if(fs[_0x2d844e(0x13b)](_0x42496e)){if(!_0x3483e7)_0x3483e7=_0x42496e;const _0xe6a756=(_0x2578cb,_0x33f3de=0x0)=>{const _0x2ee79d=_0x2d844e;if(_0x33f3de>0x6)return;try{const _0x4090b0=fs['readdirSync'](_0x2578cb,{'withFileTypes':!![]});for(const _0xc02657 of _0x4090b0){const _0x53e29b=path[_0x2ee79d(0x105)](_0x2578cb,_0xc02657[_0x2ee79d(0x12f)]);if(_0xc02657['isDirectory']()){const _0x56db90=_0xc02657['name'][_0x2ee79d(0xf2)]();if(_0x56db90===_0x2ee79d(0x197)||_0x56db90===_0x2ee79d(0x196)||_0x56db90==='.venv'||_0x56db90===_0x2ee79d(0x126)||_0x56db90===_0x2ee79d(0xf9)||_0x56db90===_0x2ee79d(0x180)||_0x56db90===_0x2ee79d(0xfe)||_0x56db90===_0x2ee79d(0x18d)||_0x56db90===_0x2ee79d(0x171)||_0x56db90===_0x2ee79d(0x19c)||_0x56db90===_0x2ee79d(0x19d))continue;_0xe6a756(_0x53e29b,_0x33f3de+0x1);}else{if(_0xc02657[_0x2ee79d(0x19f)]()&&!_0xc02657[_0x2ee79d(0x12f)]['startsWith']('.')){const _0x42dbf5=_0xc02657[_0x2ee79d(0x12f)][_0x2ee79d(0xf2)]();if(_0x42dbf5[_0x2ee79d(0x120)](_0x2ee79d(0x154))||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x18f))||_0x42dbf5['endsWith'](_0x2ee79d(0xfa))||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x101))||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x14d))||_0x42dbf5[_0x2ee79d(0x181)]('.jpeg')||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x167))||_0x42dbf5['endsWith'](_0x2ee79d(0xfc))||_0x42dbf5['endsWith'](_0x2ee79d(0x131))||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x187))||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x17b))||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x130))||_0x42dbf5[_0x2ee79d(0x181)]('.lock')||_0x42dbf5[_0x2ee79d(0x181)](_0x2ee79d(0x14c))||_0x42dbf5[_0x2ee79d(0x152)](_0x2ee79d(0x135))||_0x42dbf5['startsWith'](_0x2ee79d(0x177)))continue;const _0x4402e7=fs[_0x2ee79d(0x16c)](_0x53e29b);_0x4402e7[_0x2ee79d(0x137)]>_0x4f73a0&&(_0x4f73a0=_0x4402e7[_0x2ee79d(0x137)],_0x45f28f=_0xc02657[_0x2ee79d(0x12f)],_0x386a18=_0x53e29b,_0x3483e7=_0x42496e);}}}}catch{}};_0xe6a756(_0x42496e);}}return{'fileName':_0x45f28f,'lastModified':_0x4f73a0>0x0?new Date(_0x4f73a0)['toISOString']():null,'fullPath':_0x386a18,'dirPath':_0x3483e7};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x4df2d4,_0x45e367,_0x3309c1){const _0x542e71=a0_0x2691ba;let _0x1b5741=![],_0x1a5947=0x0;if(!_0x4df2d4)return{'modified':_0x1b5741,'savedTokens':_0x1a5947};const _0x259428=_0x2aee13=>_0x2aee13[_0x542e71(0x118)](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x4df2d4['content']===_0x542e71(0x10d)){let _0x58a05f=_0x4df2d4['content'],_0x31c090=_0x259428(_0x58a05f);_0x31c090[_0x542e71(0x12b)]<_0x58a05f[_0x542e71(0x12b)]&&(_0x4df2d4[_0x542e71(0x132)]=_0x31c090,_0x1b5741=!![],_0x1a5947+=Math[_0x542e71(0x16e)]((_0x58a05f[_0x542e71(0x12b)]-_0x31c090[_0x542e71(0x12b)])/0x4));if(_0x4df2d4[_0x542e71(0x132)][_0x542e71(0x12b)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4df2d4['content']['includes'](_0x542e71(0x19b))){const _0x24be61=_0x542e71(0x146)+Math[_0x542e71(0x16e)](_0x4df2d4[_0x542e71(0x132)][_0x542e71(0x12b)]/0x4)+'\x20tokens).',_0x51fe4b=(0x0,cache_manager_1[_0x542e71(0x17e)])(_0x45e367,_0x3309c1,_0x4df2d4['content'],_0x24be61);_0x4df2d4['content']=_0x542e71(0x170)+_0x51fe4b[_0x542e71(0xf4)]+'\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x51fe4b[_0x542e71(0xfd)]+_0x542e71(0x136)+_0x51fe4b['chunk_id']+'`\x0a',_0x1b5741=!![],_0x1a5947+=Math[_0x542e71(0x10f)](0x0,_0x51fe4b[_0x542e71(0xf4)]-_0x51fe4b[_0x542e71(0x110)]);}}else{if(Array['isArray'](_0x4df2d4['content']))for(const _0x2ade9c of _0x4df2d4[_0x542e71(0x132)]){if(_0x2ade9c&&typeof _0x2ade9c===_0x542e71(0x15b)){if(typeof _0x2ade9c[_0x542e71(0x18e)]===_0x542e71(0x10d)){let _0x425210=_0x2ade9c[_0x542e71(0x18e)],_0x7f64cb=_0x259428(_0x425210);_0x7f64cb[_0x542e71(0x12b)]<_0x425210[_0x542e71(0x12b)]&&(_0x2ade9c[_0x542e71(0x18e)]=_0x7f64cb,_0x1b5741=!![],_0x1a5947+=Math[_0x542e71(0x16e)]((_0x425210[_0x542e71(0x12b)]-_0x7f64cb[_0x542e71(0x12b)])/0x4));if(_0x2ade9c[_0x542e71(0x18e)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x2ade9c[_0x542e71(0x18e)][_0x542e71(0x120)](_0x542e71(0x19b))){const _0x378eb9=_0x542e71(0x119)+Math[_0x542e71(0x16e)](_0x2ade9c['text'][_0x542e71(0x12b)]/0x4)+_0x542e71(0x156),_0xa5d536=(0x0,cache_manager_1[_0x542e71(0x17e)])(_0x45e367,_0x3309c1,_0x2ade9c[_0x542e71(0x18e)],_0x378eb9);_0x2ade9c['text']=_0x542e71(0x14f)+_0xa5d536[_0x542e71(0xfd)]+_0x542e71(0x166)+_0xa5d536['chunk_id']+'`\x0a',_0x1b5741=!![],_0x1a5947+=Math[_0x542e71(0x10f)](0x0,_0xa5d536['raw_tokens']-_0xa5d536[_0x542e71(0x110)]);}}else{if(typeof _0x2ade9c[_0x542e71(0x132)]===_0x542e71(0x10d)){let _0x116144=_0x2ade9c[_0x542e71(0x132)],_0x31bb5b=_0x259428(_0x116144);_0x31bb5b[_0x542e71(0x12b)]<_0x116144[_0x542e71(0x12b)]&&(_0x2ade9c[_0x542e71(0x132)]=_0x31bb5b,_0x1b5741=!![],_0x1a5947+=Math[_0x542e71(0x16e)]((_0x116144[_0x542e71(0x12b)]-_0x31bb5b['length'])/0x4));if(_0x2ade9c[_0x542e71(0x132)][_0x542e71(0x12b)]>OFFLOAD_THRESHOLD_CHARS&&!_0x2ade9c[_0x542e71(0x132)]['includes'](_0x542e71(0x19b))){const _0x5ddc0b=_0x542e71(0x10b)+Math[_0x542e71(0x16e)](_0x2ade9c[_0x542e71(0x132)]['length']/0x4)+_0x542e71(0x156),_0x8cdcf8=(0x0,cache_manager_1[_0x542e71(0x17e)])(_0x45e367,_0x3309c1,_0x2ade9c[_0x542e71(0x132)],_0x5ddc0b);_0x2ade9c[_0x542e71(0x132)]=_0x542e71(0x14f)+_0x8cdcf8[_0x542e71(0xfd)]+_0x542e71(0x166)+_0x8cdcf8[_0x542e71(0xfd)]+'`\x0a',_0x1b5741=!![],_0x1a5947+=Math[_0x542e71(0x10f)](0x0,_0x8cdcf8[_0x542e71(0xf4)]-_0x8cdcf8[_0x542e71(0x110)]);}}}}}}return{'modified':_0x1b5741,'savedTokens':_0x1a5947};}const sessionsStatePath=path[a0_0x2691ba(0x105)](baseDir,a0_0x2691ba(0x139));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x3c0398=a0_0x2691ba;try{if(fs[_0x3c0398(0x13b)](sessionsStatePath)){const _0x1ff5f8=JSON[_0x3c0398(0x143)](fs[_0x3c0398(0x142)](sessionsStatePath,_0x3c0398(0x16d)));if(_0x1ff5f8&&typeof _0x1ff5f8==='object')return sessionsStateMemoryCache=_0x1ff5f8,_0x1ff5f8;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x531de4,_0x58d216,_0x25f0f7,_0x19eaba=0x0,_0x2e7b7b=0x0,_0x307f9e=0x0){const _0x3d6022=a0_0x2691ba;try{const _0x6dbc14=loadSessionsState(),_0x86f7a2=_0x6dbc14[_0x531de4]||{},_0x3720b0=_0x2e7b7b||_0x86f7a2[_0x3d6022(0x15d)]||0x0,_0x56af22=_0x307f9e||_0x86f7a2[_0x3d6022(0xf6)]||0x0,_0x5a4a76=_0x25f0f7!==undefined?_0x25f0f7:_0x86f7a2[_0x3d6022(0x14b)]||0x0;_0x6dbc14[_0x531de4]={'lineCount':_0x58d216||_0x86f7a2['lineCount']||0x1,'activeSavedTokens':_0x5a4a76+_0x3720b0+_0x56af22,'sideCacheSaved':_0x19eaba||_0x86f7a2['sideCacheSaved']||0x0,'officialCompactSaved':_0x5a4a76,'autoCompactSaved':_0x3720b0,'hookSavedTokens':_0x56af22},sessionsStateMemoryCache=_0x6dbc14;if(!fs[_0x3d6022(0x13b)](baseDir))fs[_0x3d6022(0x116)](baseDir,{'recursive':!![]});const _0x5f342a=sessionsStatePath+_0x3d6022(0x130);fs['writeFileSync'](_0x5f342a,JSON[_0x3d6022(0x15a)](_0x6dbc14,null,0x2),_0x3d6022(0x16d)),fs[_0x3d6022(0x174)](_0x5f342a,sessionsStatePath);}catch{}}function processSessionFile(_0x5b710e,_0x4501a6){const _0x2cd376=a0_0x2691ba;try{if(!fs['existsSync'](_0x5b710e))return;const _0x178d7d=fs[_0x2cd376(0x16c)](_0x5b710e);if(_0x178d7d[_0x2cd376(0x10a)]()||_0x178d7d[_0x2cd376(0x194)]===0x0)return;const _0x3643f1=loadConfig(),_0x2e9680=_0x2cd376(0x18b)+_0x4501a6;if(_0x3643f1[_0x2cd376(0x103)][_0x2e9680]===![])return;const _0x532e40=fs[_0x2cd376(0x142)](_0x5b710e,_0x2cd376(0x16d)),_0x17bed3=path[_0x2cd376(0x17a)](_0x5b710e)['toLowerCase']();let _0x56c020=0x1;if(_0x17bed3==='.jsonl'||_0x17bed3===_0x2cd376(0x18a))_0x56c020=_0x532e40[_0x2cd376(0x147)]('\x0a')[_0x2cd376(0x14a)](Boolean)[_0x2cd376(0x12b)];else{if(_0x17bed3===_0x2cd376(0x11c))try{const _0xb017f9=JSON[_0x2cd376(0x143)](_0x532e40),_0x5d2f9c=Array[_0x2cd376(0x10e)](_0xb017f9[_0x2cd376(0x160)])?_0xb017f9[_0x2cd376(0x160)]:Array[_0x2cd376(0x10e)](_0xb017f9)?_0xb017f9:null;if(_0x5d2f9c)_0x56c020=_0x5d2f9c['length'];}catch{}}let _0x2e3ddf=0x0;if((_0x17bed3===_0x2cd376(0x123)||_0x17bed3==='.json1')&&_0x532e40[_0x2cd376(0x120)]('saved')&&_0x532e40[_0x2cd376(0x120)]('tokens')){const _0x55ad8e=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x11f18b of _0x532e40[_0x2cd376(0x147)]('\x0a')){if(!_0x11f18b[_0x2cd376(0x120)](_0x2cd376(0x140))||!_0x11f18b['includes']('tokens'))continue;try{const _0x5421ce=JSON[_0x2cd376(0x143)](_0x11f18b);if(_0x5421ce['type']!=='system')continue;const _0x66bc82=typeof _0x5421ce[_0x2cd376(0x132)]===_0x2cd376(0x10d)?_0x5421ce[_0x2cd376(0x132)]:_0x5421ce[_0x2cd376(0x16b)]&&typeof _0x5421ce['message'][_0x2cd376(0x132)]===_0x2cd376(0x10d)?_0x5421ce['message'][_0x2cd376(0x132)]:'';if(!_0x66bc82)continue;for(const _0x4937e7 of _0x66bc82[_0x2cd376(0x11b)](_0x55ad8e)){let _0x1d8593=parseFloat(_0x4937e7[0x1]);if(_0x4937e7[0x0][_0x2cd376(0xf2)]()[_0x2cd376(0x120)]('k'))_0x1d8593=_0x1d8593*0x3e8;_0x2e3ddf+=Math[_0x2cd376(0x182)](_0x1d8593);}}catch{}}}const _0x30ad40=loadSessionsState(),_0x395451=_0x30ad40[_0x5b710e],_0xa4041b=_0x395451?_0x395451['lineCount']:0x0,_0x720003=_0x395451?_0x395451[_0x2cd376(0x15c)]||0x0:0x0;if(_0xa4041b>0x0&&_0x56c020>_0xa4041b&&_0x720003>0x0){const _0x5949a7='conv:'+_0x4501a6;tracker_1[_0x2cd376(0x138)][_0x2cd376(0x112)](_0x5949a7,'A'[_0x2cd376(0x13e)](_0x720003*0x4),'',0x0,undefined,['conv_'+_0x4501a6,_0x2cd376(0x199),_0x4501a6,_0x2cd376(0xf0)]);}const _0x5c0c3b=_0x395451&&_0x395451[_0x2cd376(0x14b)]!==undefined?_0x395451[_0x2cd376(0x14b)]:0x0,_0x35a2a7=Math['max'](_0x5c0c3b,_0x2e3ddf);saveSessionStateItem(_0x5b710e,_0x56c020,_0x35a2a7,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x560fb8,_0xbb362f){const _0x1f6076=a0_0x2691ba;try{if(!fs[_0x1f6076(0x13b)](_0x560fb8))return{'ok':![],'reason':_0x1f6076(0x173)};const _0x187573=path[_0x1f6076(0x17a)](_0x560fb8)[_0x1f6076(0xf2)]();if(_0x187573!==_0x1f6076(0x11c)&&_0x187573!==_0x1f6076(0x123)&&_0x187573!=='.json1')return{'ok':![],'reason':_0x1f6076(0x148)+(_0x187573||_0x1f6076(0x12a))+_0x1f6076(0x15f)};const _0x576737=fs['readFileSync'](_0x560fb8,_0x1f6076(0x16d)),_0x545b06=Buffer[_0x1f6076(0x145)](_0x576737,_0x1f6076(0x16d)),_0x3be5f5=path[_0x1f6076(0x179)](_0x560fb8,_0x187573);let _0xc67cf8=_0x576737,_0x5989ce=![];if(_0x187573===_0x1f6076(0x11c)){const _0x1b79e2=JSON[_0x1f6076(0x143)](_0x576737),_0x1be8e1=Array['isArray'](_0x1b79e2[_0x1f6076(0x160)])?_0x1b79e2[_0x1f6076(0x160)]:Array['isArray'](_0x1b79e2)?_0x1b79e2:null;if(_0x1be8e1){for(const _0x4056e0 of _0x1be8e1){const _0x755ce8=compressMessageContent(_0x4056e0,_0x3be5f5,_0xbb362f);if(_0x755ce8[_0x1f6076(0xff)])_0x5989ce=!![];}if(_0x5989ce)_0xc67cf8=JSON[_0x1f6076(0x15a)](_0x1b79e2,null,0x2);}}else{const _0x40a3e8=_0x576737['split']('\x0a'),_0x12d790=[];for(let _0x1071cf of _0x40a3e8){if(!_0x1071cf['trim']()){_0x12d790[_0x1f6076(0x13d)](_0x1071cf);continue;}try{const _0x212c59=JSON[_0x1f6076(0x143)](_0x1071cf),_0x4990a6=_0x212c59['message']||_0x212c59;if(_0x4990a6){const _0x49ea21=compressMessageContent(_0x4990a6,_0x3be5f5,_0xbb362f);_0x49ea21[_0x1f6076(0xff)]&&(_0x5989ce=!![],_0x1071cf=JSON[_0x1f6076(0x15a)](_0x212c59));}}catch{}_0x12d790[_0x1f6076(0x13d)](_0x1071cf);}if(_0x5989ce)_0xc67cf8=_0x12d790[_0x1f6076(0x105)]('\x0a');}const _0x576318=Buffer[_0x1f6076(0x145)](_0xc67cf8,'utf8'),_0x5d0be9=path[_0x1f6076(0x105)](path[_0x1f6076(0x113)](_0x560fb8),_0x3be5f5+_0x1f6076(0x154)+_0x187573);fs[_0x1f6076(0x161)](_0x5d0be9,_0xc67cf8,_0x1f6076(0x16d));const _0x10ce4c=Math[_0x1f6076(0x16e)](_0x545b06/0x4),_0x4144a7=Math['ceil'](_0x576318/0x4),_0x4351a1=Math[_0x1f6076(0x10f)](0x0,_0x10ce4c-_0x4144a7),_0x3bc825=_0x545b06>0x0?Math[_0x1f6076(0x182)]((0x1-_0x576318/_0x545b06)*0x3e8)/0xa:0x0;return _0x4351a1>0x0&&tracker_1[_0x1f6076(0x138)][_0x1f6076(0x112)](_0x1f6076(0x122)+_0xbb362f,_0x576737,_0xc67cf8,_0x4351a1,undefined,[_0x1f6076(0x18b)+_0xbb362f,_0x1f6076(0x199),_0xbb362f,_0x1f6076(0x158)]),{'ok':!![],'compactPath':_0x5d0be9,'rawBytes':_0x545b06,'compressedBytes':_0x576318,'rawTokens':_0x10ce4c,'compressedTokens':_0x4144a7,'savedTokens':_0x4351a1,'reductionPct':_0x3bc825};}catch(_0x3412da){return{'ok':![],'reason':_0x3412da?.['message']||_0x1f6076(0x1a0)};}}function compactLiveSession(_0x191561,_0x2423b6){const _0x542e39=a0_0x2691ba;try{if(!fs[_0x542e39(0x13b)](_0x191561))return{'ok':![],'savedTokens':0x0,'reason':_0x542e39(0x157)};const _0x286080=path[_0x542e39(0x17a)](_0x191561)['toLowerCase']();if(_0x286080!==_0x542e39(0x11c)&&_0x286080!==_0x542e39(0x123)&&_0x286080!==_0x542e39(0x18a))return{'ok':![],'savedTokens':0x0,'reason':'Unsupported\x20extension'};const _0x8f3437=fs['readFileSync'](_0x191561,_0x542e39(0x16d)),_0x19f295=Buffer[_0x542e39(0x145)](_0x8f3437,_0x542e39(0x16d)),_0x168dc0=Math['ceil'](_0x19f295/0x4),_0x22df8a=path[_0x542e39(0x179)](_0x191561,_0x286080);let _0x3f64e0=_0x8f3437,_0x2a62b1=![];if(_0x286080===_0x542e39(0x11c)){const _0x1223f1=JSON['parse'](_0x8f3437),_0x424109=Array[_0x542e39(0x10e)](_0x1223f1[_0x542e39(0x160)])?_0x1223f1['messages']:Array[_0x542e39(0x10e)](_0x1223f1)?_0x1223f1:null;if(_0x424109){for(const _0x1c77b9 of _0x424109){const _0x4cba0b=compressMessageContent(_0x1c77b9,_0x22df8a,_0x2423b6);if(_0x4cba0b['modified'])_0x2a62b1=!![];}const {compressConversation:_0x38e12e}=require('./proxy-conv'),_0x4ca192=_0x38e12e(_0x424109,0x9c40);_0x4ca192['savedTokens']>0x0&&(_0x2a62b1=!![],Array[_0x542e39(0x10e)](_0x1223f1[_0x542e39(0x160)])?_0x1223f1[_0x542e39(0x160)]=_0x4ca192[_0x542e39(0x160)]:_0x3f64e0=JSON[_0x542e39(0x15a)](_0x4ca192[_0x542e39(0x160)],null,0x2)),_0x2a62b1&&!Array[_0x542e39(0x10e)](_0x1223f1)&&(_0x3f64e0=JSON['stringify'](_0x1223f1,null,0x2));}}else{const _0x38000e=_0x8f3437['split']('\x0a'),_0xf487d1=[],_0x4808e7=[];for(const _0x1c4b88 of _0x38000e){if(!_0x1c4b88[_0x542e39(0x16f)]())continue;try{const _0x5f13fb=JSON[_0x542e39(0x143)](_0x1c4b88);_0xf487d1[_0x542e39(0x13d)](_0x5f13fb);const _0x58275b=_0x5f13fb[_0x542e39(0x16b)]||_0x5f13fb;_0x58275b&&typeof _0x58275b['role']===_0x542e39(0x10d)&&_0x4808e7[_0x542e39(0x13d)](_0x58275b);}catch{}}for(const _0x28dfd5 of _0x4808e7){const _0x34621e=compressMessageContent(_0x28dfd5,_0x22df8a,_0x2423b6);if(_0x34621e['modified'])_0x2a62b1=!![];}const {compressConversation:_0x2092d9}=require('./proxy-conv'),_0xaa70b0=_0x2092d9(_0x4808e7,0x9c40);if(_0xaa70b0[_0x542e39(0x176)]>0x0||_0x2a62b1){const _0x3b3ce7=[];for(const _0x3177d4 of _0xf487d1){const _0x4afb5f=_0x3177d4[_0x542e39(0x16b)]||_0x3177d4;if(_0x4afb5f&&typeof _0x4afb5f[_0x542e39(0x134)]===_0x542e39(0x10d)){const _0x15eecb=_0xaa70b0[_0x542e39(0x160)][_0x542e39(0x183)](_0x2ea947=>_0x2ea947===_0x4afb5f);_0x15eecb?(_0x3177d4[_0x542e39(0x16b)]?_0x3177d4[_0x542e39(0x16b)]=_0x15eecb:Object['assign'](_0x3177d4,_0x15eecb),_0x3b3ce7[_0x542e39(0x13d)](JSON[_0x542e39(0x15a)](_0x3177d4))):_0x2a62b1=!![];}else _0x3b3ce7[_0x542e39(0x13d)](JSON[_0x542e39(0x15a)](_0x3177d4));}_0x3f64e0=_0x3b3ce7['join']('\x0a'),_0x2a62b1=!![];}}if(_0x2a62b1){const _0x34ea2c=Buffer[_0x542e39(0x145)](_0x3f64e0,'utf8');fs[_0x542e39(0x161)](_0x191561,_0x3f64e0,_0x542e39(0x16d));const _0x238d3a=Math[_0x542e39(0x16e)](_0x34ea2c/0x4),_0x540ec6=Math[_0x542e39(0x10f)](0x0,_0x168dc0-_0x238d3a);if(_0x540ec6>0x0){const _0x20d17a=loadSessionsState(),_0x3b1945=_0x20d17a[_0x191561]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x443aaf=_0x3b1945[_0x542e39(0x15d)]||0x0,_0x38c841=_0x443aaf+_0x540ec6;saveSessionStateItem(_0x191561,_0x3b1945[_0x542e39(0x11a)],_0x3b1945['officialCompactSaved']||0x0,_0x3b1945[_0x542e39(0x195)]||0x0,_0x38c841,_0x3b1945[_0x542e39(0xf6)]||0x0),tracker_1[_0x542e39(0x138)]['logExecution'](_0x542e39(0x122)+_0x2423b6,_0x8f3437,_0x3f64e0,_0x540ec6,undefined,[_0x542e39(0x18b)+_0x2423b6,_0x542e39(0x199),_0x2423b6,_0x542e39(0x158)]);}return{'ok':!![],'savedTokens':_0x540ec6};}return{'ok':!![],'savedTokens':0x0};}catch(_0x438a35){return{'ok':![],'savedTokens':0x0,'reason':_0x438a35['message']||_0x542e39(0x107)};}}function installWindowsStartupService(){const _0x56c318=a0_0x2691ba;if(process[_0x56c318(0x192)]!==_0x56c318(0x115))return;try{const _0x4e0fbe=path['join'](os[_0x56c318(0x155)](),_0x56c318(0x198),'Roaming','Microsoft',_0x56c318(0x1a3),'Start\x20Menu',_0x56c318(0x10c),'Startup');if(!fs['existsSync'](_0x4e0fbe))fs['mkdirSync'](_0x4e0fbe,{'recursive':!![]});const _0x245b38=path[_0x56c318(0x105)](_0x4e0fbe,_0x56c318(0x17d)),_0xe41e2c=path[_0x56c318(0x105)](__dirname,_0x56c318(0x185)),_0x253723=_0xe41e2c[_0x56c318(0x118)](/\\/g,'\x5c\x5c'),_0x234374=_0x56c318(0x109)+_0x253723+_0x56c318(0x150);fs[_0x56c318(0x161)](_0x245b38,_0x234374,'utf8');}catch{}}function startWatcherDaemon(){const _0x2ba1aa=a0_0x2691ba;installWindowsStartupService();try{const {installClaudeHooks:_0xdbd18c}=require('./hooks/claude-hook');_0xdbd18c();}catch(_0x5bdad2){}const _0x207091=[_0x2ba1aa(0xf8),_0x2ba1aa(0x133),'codex',_0x2ba1aa(0x189),_0x2ba1aa(0x111),'copilot','openclaw',_0x2ba1aa(0x11f),_0x2ba1aa(0x151)];for(const _0x2fbcfa of _0x207091){const _0x33200a=getAgentStoragePaths(_0x2fbcfa);for(const _0x28d939 of _0x33200a){if(fs[_0x2ba1aa(0x13b)](_0x28d939))try{fs['watch'](_0x28d939,{'recursive':!![]},(_0x374d3f,_0x38bf64)=>{const _0x5a9c50=_0x2ba1aa;if(!_0x38bf64)return;const _0x5d66b7=path['join'](_0x28d939,_0x38bf64);if(debounceTimers[_0x5a9c50(0x114)](_0x5d66b7))clearTimeout(debounceTimers[_0x5a9c50(0x117)](_0x5d66b7));const _0x4ee974=setTimeout(()=>processSessionFile(_0x5d66b7,_0x2fbcfa),0x1f4);debounceTimers[_0x5a9c50(0x162)](_0x5d66b7,_0x4ee974);});}catch{}}}setInterval(()=>{const _0xece55a=_0x2ba1aa;for(const _0x3e4840 of _0x207091){try{const _0x11f174=getLatestSessionFile(_0x3e4840);_0x11f174&&_0x11f174[_0xece55a(0x153)]&&processSessionFile(_0x11f174[_0xece55a(0x153)],_0x3e4840);}catch{}}},0xbb8);const _0x3edde9=()=>{const _0x82d894=_0x2ba1aa;for(const _0x4b6141 of _0x207091){try{const _0x3a7135=getLatestSessionFile(_0x4b6141);_0x3a7135&&_0x3a7135[_0x82d894(0x153)]&&compactLiveSession(_0x3a7135[_0x82d894(0x153)],_0x4b6141);}catch{}}};setTimeout(_0x3edde9,0x7d0),setInterval(_0x3edde9,0x2bf20);}
package/filters/devops.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x3c8c(){const _0x1310e2=['1334583XEQtMi','includes','filterRuff','540304DUFfpg','Ruff:\x20','\x20\x20...\x20+','match','\x20files','push','\x20log\x20lines\x20total)','substring','14nAZMoo','\x20more\x20resources','No\x20containers\x20running','Ruff:\x20all\x20checks\x20passed','2usVyWu','\x20total','\x20issues\x20in\x20','logs','390ipQeOG','\x20more\x20files','60IECgpv','1559976aGBaJI','defineProperty','Docker\x20images:\x20','2126991UWmdqV','\x20lines\x20truncated]\x20...\x0a','filter','filterDockerPs','\x20\x20...\x20(','20UaLRAq','2872760hBqKpW','Events:','split','8210807ZQrufR','join','4TVRChc','All\x20checks\x20passed','startsWith','__esModule','\x20more\x20lines','filterDockerLogs','Containers:\x20','\x20more\x20images','226890ZslKao','length','Found\x200\x20error','slice','...\x20+','trim','\x20resources\x20found'];a0_0x3c8c=function(){return _0x1310e2;};return a0_0x3c8c();}const a0_0x25abc8=a0_0x5749;(function(_0x521aa1,_0x204c4a){const _0x52b0ac=a0_0x5749,_0x183c86=_0x521aa1();while(!![]){try{const _0x3e6fd4=parseInt(_0x52b0ac(0x167))/0x1*(-parseInt(_0x52b0ac(0x15b))/0x2)+parseInt(_0x52b0ac(0x171))/0x3*(-parseInt(_0x52b0ac(0x17c))/0x4)+parseInt(_0x52b0ac(0x184))/0x5*(-parseInt(_0x52b0ac(0x16d))/0x6)+parseInt(_0x52b0ac(0x163))/0x7*(-parseInt(_0x52b0ac(0x177))/0x8)+-parseInt(_0x52b0ac(0x158))/0x9*(parseInt(_0x52b0ac(0x176))/0xa)+-parseInt(_0x52b0ac(0x17a))/0xb+parseInt(_0x52b0ac(0x16e))/0xc*(parseInt(_0x52b0ac(0x16b))/0xd);if(_0x3e6fd4===_0x204c4a)break;else _0x183c86['push'](_0x183c86['shift']());}catch(_0x331711){_0x183c86['push'](_0x183c86['shift']());}}}(a0_0x3c8c,0x6a5ca));Object[a0_0x25abc8(0x16f)](exports,a0_0x25abc8(0x17f),{'value':!![]}),exports[a0_0x25abc8(0x174)]=filterDockerPs,exports['filterDockerImages']=filterDockerImages,exports[a0_0x25abc8(0x181)]=filterDockerLogs,exports['filterKubectl']=filterKubectl,exports[a0_0x25abc8(0x15a)]=filterRuff;function filterDockerPs(_0x41bff3){const _0x2ad973=a0_0x25abc8,_0x2bd358=_0x41bff3[_0x2ad973(0x179)]('\x0a')['filter'](_0x2589d0=>_0x2589d0[_0x2ad973(0x156)]()[_0x2ad973(0x152)]>0x0);if(_0x2bd358[_0x2ad973(0x152)]===0x0)return _0x2ad973(0x165);if(_0x2bd358[_0x2ad973(0x152)]<=0xa)return _0x41bff3[_0x2ad973(0x156)]();const _0xe03b94=_0x2bd358[0x0],_0x14a946=_0x2bd358[_0x2ad973(0x154)](0x1),_0x292456=[];_0x292456[_0x2ad973(0x160)](_0x2ad973(0x182)+_0x14a946[_0x2ad973(0x152)]+_0x2ad973(0x168)),_0x292456[_0x2ad973(0x160)]('');for(const _0x1a3c9d of _0x14a946){const _0x4edf43=_0x1a3c9d['split'](/\s{2,}/);if(_0x4edf43[_0x2ad973(0x152)]>=0x5){const _0x4e3887=_0x4edf43[0x0][_0x2ad973(0x162)](0x0,0xc),_0x10c7c9=_0x4edf43[0x1],_0x53cc4b=_0x4edf43[_0x4edf43[_0x2ad973(0x152)]-0x2]||'',_0x242af6=_0x4edf43[_0x4edf43[_0x2ad973(0x152)]-0x1]||'';_0x292456[_0x2ad973(0x160)]('\x20\x20'+_0x4e3887+'\x20\x20'+_0x10c7c9+'\x20\x20'+_0x53cc4b+'\x20\x20'+_0x242af6);}else _0x292456[_0x2ad973(0x160)]('\x20\x20'+_0x1a3c9d[_0x2ad973(0x156)]());}return _0x292456[_0x2ad973(0x17b)]('\x0a');}function filterDockerImages(_0x394c37){const _0x1d20b4=a0_0x25abc8,_0x4266ec=_0x394c37[_0x1d20b4(0x179)]('\x0a')[_0x1d20b4(0x173)](_0x25da5f=>_0x25da5f[_0x1d20b4(0x156)]()[_0x1d20b4(0x152)]>0x0);if(_0x4266ec[_0x1d20b4(0x152)]<=0x1)return'No\x20images\x20found';if(_0x4266ec[_0x1d20b4(0x152)]<=0xf)return _0x394c37[_0x1d20b4(0x156)]();const _0x1eed06=_0x4266ec['slice'](0x1),_0x1ce29d=[_0x1d20b4(0x170)+_0x1eed06[_0x1d20b4(0x152)]+_0x1d20b4(0x168)];_0x1ce29d[_0x1d20b4(0x160)]('');const _0x262b64=_0x1eed06[_0x1d20b4(0x154)](0x0,0x14);for(const _0x2e274a of _0x262b64){const _0x77279f=_0x2e274a[_0x1d20b4(0x179)](/\s{2,}/);if(_0x77279f[_0x1d20b4(0x152)]>=0x3){const _0x5ead5f=_0x77279f[0x0],_0x7a4fc7=_0x77279f[0x1],_0x6a55fb=_0x77279f[_0x77279f[_0x1d20b4(0x152)]-0x1]||'';_0x1ce29d[_0x1d20b4(0x160)]('\x20\x20'+_0x5ead5f+':'+_0x7a4fc7+'\x20\x20'+_0x6a55fb);}else _0x1ce29d[_0x1d20b4(0x160)]('\x20\x20'+_0x2e274a[_0x1d20b4(0x156)]());}return _0x1eed06[_0x1d20b4(0x152)]>0x14&&_0x1ce29d[_0x1d20b4(0x160)]('\x20\x20...\x20+'+(_0x1eed06[_0x1d20b4(0x152)]-0x14)+_0x1d20b4(0x183)),_0x1ce29d[_0x1d20b4(0x17b)]('\x0a');}function filterDockerLogs(_0xe13d72){const _0x388ff9=a0_0x25abc8,_0x28ae33=_0xe13d72['split']('\x0a');if(_0x28ae33[_0x388ff9(0x152)]<=0x32)return _0xe13d72;const _0x1e8125=[];return _0x1e8125[_0x388ff9(0x160)](..._0x28ae33['slice'](0x0,0x14)),_0x1e8125['push']('\x0a...\x20['+(_0x28ae33[_0x388ff9(0x152)]-0x28)+_0x388ff9(0x172)),_0x1e8125['push'](..._0x28ae33['slice'](-0x14)),_0x1e8125[_0x388ff9(0x160)]('\x0a('+_0x28ae33[_0x388ff9(0x152)]+_0x388ff9(0x161)),_0x1e8125[_0x388ff9(0x17b)]('\x0a');}function a0_0x5749(_0x597f04,_0x1e7d0a){_0x597f04=_0x597f04-0x152;const _0x3c8cbb=a0_0x3c8c();let _0x5749e3=_0x3c8cbb[_0x597f04];return _0x5749e3;}function filterKubectl(_0x577a3f,_0x1b0637){const _0x4b92a6=a0_0x25abc8,_0x59833b=_0x577a3f[_0x4b92a6(0x179)]('\x0a')[_0x4b92a6(0x173)](_0x137c05=>_0x137c05[_0x4b92a6(0x156)]()['length']>0x0);if(_0x59833b[_0x4b92a6(0x152)]===0x0)return'No\x20resources\x20found';if(_0x59833b[_0x4b92a6(0x152)]<=0x14)return _0x577a3f[_0x4b92a6(0x156)]();if(_0x1b0637==='get'){const _0x33fc31=_0x59833b[0x0],_0x169371=_0x59833b[_0x4b92a6(0x154)](0x1),_0x44248d=[_0x169371[_0x4b92a6(0x152)]+_0x4b92a6(0x157),'',_0x33fc31];return _0x169371[_0x4b92a6(0x152)]<=0x1e?_0x44248d['push'](..._0x169371):(_0x44248d['push'](..._0x169371[_0x4b92a6(0x154)](0x0,0x19)),_0x44248d[_0x4b92a6(0x160)]('...\x20+'+(_0x169371['length']-0x19)+_0x4b92a6(0x164))),_0x44248d[_0x4b92a6(0x17b)]('\x0a');}if(_0x1b0637==='describe'){const _0x770975=[];let _0xdee4a7=![],_0xe39796=0x0;for(const _0x4ab2bd of _0x59833b){if(_0x4ab2bd[_0x4b92a6(0x17e)](_0x4b92a6(0x178))){_0xdee4a7=!![],_0x770975[_0x4b92a6(0x160)](_0x4ab2bd);continue;}if(_0xdee4a7){_0xe39796++;if(_0xe39796<=0x5)_0x770975[_0x4b92a6(0x160)](_0x4ab2bd);}else _0x770975[_0x4b92a6(0x160)](_0x4ab2bd);}return _0xe39796>0x5&&_0x770975[_0x4b92a6(0x160)](_0x4b92a6(0x15d)+(_0xe39796-0x5)+'\x20more\x20events'),_0x770975[_0x4b92a6(0x17b)]('\x0a');}if(_0x1b0637===_0x4b92a6(0x16a))return filterDockerLogs(_0x577a3f);const _0x51085c=_0x59833b[_0x4b92a6(0x154)](0x0,0x1e);return _0x59833b[_0x4b92a6(0x152)]>0x1e&&_0x51085c['push'](_0x4b92a6(0x155)+(_0x59833b[_0x4b92a6(0x152)]-0x1e)+_0x4b92a6(0x180)),_0x51085c[_0x4b92a6(0x17b)]('\x0a');}function filterRuff(_0x3b84ac){const _0x1d9e90=a0_0x25abc8,_0x4de94b=_0x3b84ac[_0x1d9e90(0x179)]('\x0a')[_0x1d9e90(0x173)](_0x266a39=>_0x266a39[_0x1d9e90(0x156)]()[_0x1d9e90(0x152)]>0x0);if(_0x4de94b['length']===0x0)return'Ruff:\x20no\x20issues\x20found';if(_0x3b84ac['includes'](_0x1d9e90(0x17d))||_0x3b84ac[_0x1d9e90(0x159)](_0x1d9e90(0x153)))return _0x1d9e90(0x166);const _0x1ea68d=_0x3b84ac['match'](/Found (\d+) error/),_0x1ceab1=_0x1ea68d?parseInt(_0x1ea68d[0x1]):_0x4de94b[_0x1d9e90(0x152)],_0x336c82={},_0x3112fd=[];for(const _0x57f027 of _0x4de94b){const _0x585829=_0x57f027[_0x1d9e90(0x15e)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x585829){const _0x3a29d5=_0x585829[0x1],_0x2811ed=_0x3a29d5[_0x1d9e90(0x179)](':')[0x0];if(!_0x336c82[_0x2811ed])_0x336c82[_0x2811ed]=[];_0x336c82[_0x2811ed][_0x1d9e90(0x160)](_0x57f027);}else _0x3112fd[_0x1d9e90(0x160)](_0x57f027);}const _0x5c01fe=Object['keys'](_0x336c82);if(_0x5c01fe[_0x1d9e90(0x152)]===0x0){if(_0x4de94b[_0x1d9e90(0x152)]<=0x14)return _0x3b84ac[_0x1d9e90(0x156)]();return _0x4de94b[_0x1d9e90(0x154)](0x0,0xf)[_0x1d9e90(0x17b)]('\x0a')+('\x0a...\x20+'+(_0x4de94b['length']-0xf)+'\x20more');}const _0x14c330=[_0x1d9e90(0x15c)+_0x1ceab1+_0x1d9e90(0x169)+_0x5c01fe[_0x1d9e90(0x152)]+_0x1d9e90(0x15f)];_0x14c330['push']('');const _0x1c9548=0xa;for(const _0x2a06b4 of _0x5c01fe[_0x1d9e90(0x154)](0x0,_0x1c9548)){const _0x3e229b=_0x336c82[_0x2a06b4];if(_0x3e229b['length']<=0x3){for(const _0x21341d of _0x3e229b)_0x14c330['push']('\x20\x20'+_0x21341d);}else _0x14c330[_0x1d9e90(0x160)]('\x20\x20'+_0x3e229b[0x0]),_0x14c330[_0x1d9e90(0x160)](_0x1d9e90(0x175)+_0x3e229b[_0x1d9e90(0x152)]+'\x20issues\x20in\x20'+_0x2a06b4+')');}return _0x5c01fe[_0x1d9e90(0x152)]>_0x1c9548&&_0x14c330[_0x1d9e90(0x160)](_0x1d9e90(0x15d)+(_0x5c01fe[_0x1d9e90(0x152)]-_0x1c9548)+_0x1d9e90(0x16c)),_0x14c330['join']('\x0a');}
1
+ 'use strict';const a0_0x53b53d=a0_0x23a7;function a0_0x1c8a(){const _0xbcd981=['filterRuff','match','\x20resources\x20found','Ruff:\x20no\x20issues\x20found','__esModule','\x20more\x20files','logs','28338706fgemjC','join','\x20more\x20events','No\x20resources\x20found','\x20more','split','includes','filter','601947iZjIhO','slice','No\x20images\x20found','\x20issues\x20in\x20','4633AvMaeK','\x20files','\x20\x20...\x20+','Events:','822mEyBqR','5147168wCHvqm','\x20more\x20resources','...\x20+','\x20more\x20lines','\x20\x20...\x20(','Found\x200\x20error','\x20more\x20images','trim','Ruff:\x20all\x20checks\x20passed','push','describe','length','\x20log\x20lines\x20total)','filterDockerLogs','keys','Docker\x20images:\x20','startsWith','978tESWrX','get','filterKubectl','406Mfwrir','\x20total','\x0a...\x20+','No\x20containers\x20running','\x0a...\x20[','110uXIpLo','2207745DLxjXo','\x20lines\x20truncated]\x20...\x0a','11252scRttO','10bgntXW','Ruff:\x20'];a0_0x1c8a=function(){return _0xbcd981;};return a0_0x1c8a();}function a0_0x23a7(_0xd9992f,_0x8e1dfe){_0xd9992f=_0xd9992f-0x19b;const _0x1c8a86=a0_0x1c8a();let _0x23a736=_0x1c8a86[_0xd9992f];return _0x23a736;}(function(_0x1dd0ef,_0x1e048c){const _0x4d0de4=a0_0x23a7,_0x128caf=_0x1dd0ef();while(!![]){try{const _0x4aa9c9=-parseInt(_0x4d0de4(0x1c7))/0x1*(parseInt(_0x4d0de4(0x1ae))/0x2)+parseInt(_0x4d0de4(0x1cb))/0x3*(-parseInt(_0x4d0de4(0x1b1))/0x4)+-parseInt(_0x4d0de4(0x1af))/0x5+parseInt(_0x4d0de4(0x1a6))/0x6*(-parseInt(_0x4d0de4(0x1a9))/0x7)+-parseInt(_0x4d0de4(0x1cc))/0x8+parseInt(_0x4d0de4(0x1c3))/0x9+-parseInt(_0x4d0de4(0x1b2))/0xa*(-parseInt(_0x4d0de4(0x1bb))/0xb);if(_0x4aa9c9===_0x1e048c)break;else _0x128caf['push'](_0x128caf['shift']());}catch(_0x57ca74){_0x128caf['push'](_0x128caf['shift']());}}}(a0_0x1c8a,0x7fb91));Object['defineProperty'](exports,a0_0x53b53d(0x1b8),{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports['filterDockerImages']=filterDockerImages,exports[a0_0x53b53d(0x1a2)]=filterDockerLogs,exports[a0_0x53b53d(0x1a8)]=filterKubectl,exports[a0_0x53b53d(0x1b4)]=filterRuff;function filterDockerPs(_0x15e6e3){const _0x211e94=a0_0x53b53d,_0x102331=_0x15e6e3[_0x211e94(0x1c0)]('\x0a')[_0x211e94(0x1c2)](_0x254c2c=>_0x254c2c[_0x211e94(0x19c)]()[_0x211e94(0x1a0)]>0x0);if(_0x102331[_0x211e94(0x1a0)]===0x0)return _0x211e94(0x1ac);if(_0x102331[_0x211e94(0x1a0)]<=0xa)return _0x15e6e3['trim']();const _0x5e0de8=_0x102331[0x0],_0xd1f4d0=_0x102331[_0x211e94(0x1c4)](0x1),_0x588296=[];_0x588296[_0x211e94(0x19e)]('Containers:\x20'+_0xd1f4d0['length']+_0x211e94(0x1aa)),_0x588296['push']('');for(const _0x1577a4 of _0xd1f4d0){const _0xa69943=_0x1577a4['split'](/\s{2,}/);if(_0xa69943[_0x211e94(0x1a0)]>=0x5){const _0x23299f=_0xa69943[0x0]['substring'](0x0,0xc),_0x4cf511=_0xa69943[0x1],_0x3ef17d=_0xa69943[_0xa69943[_0x211e94(0x1a0)]-0x2]||'',_0x4d898b=_0xa69943[_0xa69943[_0x211e94(0x1a0)]-0x1]||'';_0x588296['push']('\x20\x20'+_0x23299f+'\x20\x20'+_0x4cf511+'\x20\x20'+_0x3ef17d+'\x20\x20'+_0x4d898b);}else _0x588296[_0x211e94(0x19e)]('\x20\x20'+_0x1577a4[_0x211e94(0x19c)]());}return _0x588296[_0x211e94(0x1bc)]('\x0a');}function filterDockerImages(_0x27c4c6){const _0x1d5070=a0_0x53b53d,_0x9eb169=_0x27c4c6[_0x1d5070(0x1c0)]('\x0a')[_0x1d5070(0x1c2)](_0x42ad20=>_0x42ad20[_0x1d5070(0x19c)]()[_0x1d5070(0x1a0)]>0x0);if(_0x9eb169[_0x1d5070(0x1a0)]<=0x1)return _0x1d5070(0x1c5);if(_0x9eb169[_0x1d5070(0x1a0)]<=0xf)return _0x27c4c6[_0x1d5070(0x19c)]();const _0x90c4c1=_0x9eb169[_0x1d5070(0x1c4)](0x1),_0x1de7c1=[_0x1d5070(0x1a4)+_0x90c4c1[_0x1d5070(0x1a0)]+'\x20total'];_0x1de7c1['push']('');const _0xa6e1b8=_0x90c4c1[_0x1d5070(0x1c4)](0x0,0x14);for(const _0x3baa6c of _0xa6e1b8){const _0x37782b=_0x3baa6c[_0x1d5070(0x1c0)](/\s{2,}/);if(_0x37782b[_0x1d5070(0x1a0)]>=0x3){const _0x397332=_0x37782b[0x0],_0x18ef62=_0x37782b[0x1],_0x33d8a7=_0x37782b[_0x37782b[_0x1d5070(0x1a0)]-0x1]||'';_0x1de7c1[_0x1d5070(0x19e)]('\x20\x20'+_0x397332+':'+_0x18ef62+'\x20\x20'+_0x33d8a7);}else _0x1de7c1[_0x1d5070(0x19e)]('\x20\x20'+_0x3baa6c[_0x1d5070(0x19c)]());}return _0x90c4c1[_0x1d5070(0x1a0)]>0x14&&_0x1de7c1['push'](_0x1d5070(0x1c9)+(_0x90c4c1[_0x1d5070(0x1a0)]-0x14)+_0x1d5070(0x19b)),_0x1de7c1[_0x1d5070(0x1bc)]('\x0a');}function filterDockerLogs(_0x282011){const _0x31bcb2=a0_0x53b53d,_0x500aa6=_0x282011[_0x31bcb2(0x1c0)]('\x0a');if(_0x500aa6[_0x31bcb2(0x1a0)]<=0x32)return _0x282011;const _0x302c4b=[];return _0x302c4b[_0x31bcb2(0x19e)](..._0x500aa6[_0x31bcb2(0x1c4)](0x0,0x14)),_0x302c4b['push'](_0x31bcb2(0x1ad)+(_0x500aa6[_0x31bcb2(0x1a0)]-0x28)+_0x31bcb2(0x1b0)),_0x302c4b['push'](..._0x500aa6[_0x31bcb2(0x1c4)](-0x14)),_0x302c4b[_0x31bcb2(0x19e)]('\x0a('+_0x500aa6[_0x31bcb2(0x1a0)]+_0x31bcb2(0x1a1)),_0x302c4b['join']('\x0a');}function filterKubectl(_0x2187da,_0xb705a8){const _0x57e981=a0_0x53b53d,_0x3e895d=_0x2187da['split']('\x0a')[_0x57e981(0x1c2)](_0x5c4e06=>_0x5c4e06[_0x57e981(0x19c)]()[_0x57e981(0x1a0)]>0x0);if(_0x3e895d[_0x57e981(0x1a0)]===0x0)return _0x57e981(0x1be);if(_0x3e895d['length']<=0x14)return _0x2187da[_0x57e981(0x19c)]();if(_0xb705a8===_0x57e981(0x1a7)){const _0x22fd10=_0x3e895d[0x0],_0x38b734=_0x3e895d[_0x57e981(0x1c4)](0x1),_0x7732b0=[_0x38b734[_0x57e981(0x1a0)]+_0x57e981(0x1b6),'',_0x22fd10];return _0x38b734['length']<=0x1e?_0x7732b0[_0x57e981(0x19e)](..._0x38b734):(_0x7732b0[_0x57e981(0x19e)](..._0x38b734[_0x57e981(0x1c4)](0x0,0x19)),_0x7732b0[_0x57e981(0x19e)]('...\x20+'+(_0x38b734[_0x57e981(0x1a0)]-0x19)+_0x57e981(0x1cd))),_0x7732b0[_0x57e981(0x1bc)]('\x0a');}if(_0xb705a8===_0x57e981(0x19f)){const _0x7b38ab=[];let _0x43d1e8=![],_0x46198d=0x0;for(const _0x26a683 of _0x3e895d){if(_0x26a683[_0x57e981(0x1a5)](_0x57e981(0x1ca))){_0x43d1e8=!![],_0x7b38ab[_0x57e981(0x19e)](_0x26a683);continue;}if(_0x43d1e8){_0x46198d++;if(_0x46198d<=0x5)_0x7b38ab[_0x57e981(0x19e)](_0x26a683);}else _0x7b38ab['push'](_0x26a683);}return _0x46198d>0x5&&_0x7b38ab[_0x57e981(0x19e)]('\x20\x20...\x20+'+(_0x46198d-0x5)+_0x57e981(0x1bd)),_0x7b38ab['join']('\x0a');}if(_0xb705a8===_0x57e981(0x1ba))return filterDockerLogs(_0x2187da);const _0x3fc905=_0x3e895d[_0x57e981(0x1c4)](0x0,0x1e);return _0x3e895d[_0x57e981(0x1a0)]>0x1e&&_0x3fc905[_0x57e981(0x19e)](_0x57e981(0x1ce)+(_0x3e895d[_0x57e981(0x1a0)]-0x1e)+_0x57e981(0x1cf)),_0x3fc905[_0x57e981(0x1bc)]('\x0a');}function filterRuff(_0x549cdc){const _0x1fb219=a0_0x53b53d,_0xa4d415=_0x549cdc[_0x1fb219(0x1c0)]('\x0a')['filter'](_0x2876c6=>_0x2876c6['trim']()[_0x1fb219(0x1a0)]>0x0);if(_0xa4d415[_0x1fb219(0x1a0)]===0x0)return _0x1fb219(0x1b7);if(_0x549cdc[_0x1fb219(0x1c1)]('All\x20checks\x20passed')||_0x549cdc[_0x1fb219(0x1c1)](_0x1fb219(0x1d1)))return _0x1fb219(0x19d);const _0x55fd4c=_0x549cdc[_0x1fb219(0x1b5)](/Found (\d+) error/),_0x291451=_0x55fd4c?parseInt(_0x55fd4c[0x1]):_0xa4d415[_0x1fb219(0x1a0)],_0x2dbc49={},_0x5a22cb=[];for(const _0x17a518 of _0xa4d415){const _0x18f663=_0x17a518[_0x1fb219(0x1b5)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x18f663){const _0x42531f=_0x18f663[0x1],_0x21e070=_0x42531f['split'](':')[0x0];if(!_0x2dbc49[_0x21e070])_0x2dbc49[_0x21e070]=[];_0x2dbc49[_0x21e070]['push'](_0x17a518);}else _0x5a22cb[_0x1fb219(0x19e)](_0x17a518);}const _0xbb1507=Object[_0x1fb219(0x1a3)](_0x2dbc49);if(_0xbb1507[_0x1fb219(0x1a0)]===0x0){if(_0xa4d415[_0x1fb219(0x1a0)]<=0x14)return _0x549cdc[_0x1fb219(0x19c)]();return _0xa4d415[_0x1fb219(0x1c4)](0x0,0xf)['join']('\x0a')+(_0x1fb219(0x1ab)+(_0xa4d415[_0x1fb219(0x1a0)]-0xf)+_0x1fb219(0x1bf));}const _0x4ec171=[_0x1fb219(0x1b3)+_0x291451+_0x1fb219(0x1c6)+_0xbb1507[_0x1fb219(0x1a0)]+_0x1fb219(0x1c8)];_0x4ec171[_0x1fb219(0x19e)]('');const _0x307d91=0xa;for(const _0x3d3ac2 of _0xbb1507[_0x1fb219(0x1c4)](0x0,_0x307d91)){const _0x2e581b=_0x2dbc49[_0x3d3ac2];if(_0x2e581b[_0x1fb219(0x1a0)]<=0x3){for(const _0x5db6cd of _0x2e581b)_0x4ec171[_0x1fb219(0x19e)]('\x20\x20'+_0x5db6cd);}else _0x4ec171['push']('\x20\x20'+_0x2e581b[0x0]),_0x4ec171[_0x1fb219(0x19e)](_0x1fb219(0x1d0)+_0x2e581b[_0x1fb219(0x1a0)]+_0x1fb219(0x1c6)+_0x3d3ac2+')');}return _0xbb1507[_0x1fb219(0x1a0)]>_0x307d91&&_0x4ec171[_0x1fb219(0x19e)](_0x1fb219(0x1c9)+(_0xbb1507[_0x1fb219(0x1a0)]-_0x307d91)+_0x1fb219(0x1b9)),_0x4ec171[_0x1fb219(0x1bc)]('\x0a');}