trimprompt 1.0.42 → 1.0.44

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_0x50c8b1=a0_0x3c53;(function(_0x4c1680,_0x5cd107){const _0x540c12=a0_0x3c53,_0x191b98=_0x4c1680();while(!![]){try{const _0x4cf520=-parseInt(_0x540c12(0x103))/0x1+-parseInt(_0x540c12(0xfc))/0x2*(parseInt(_0x540c12(0xea))/0x3)+parseInt(_0x540c12(0x10d))/0x4*(parseInt(_0x540c12(0x104))/0x5)+-parseInt(_0x540c12(0x101))/0x6*(parseInt(_0x540c12(0x10a))/0x7)+parseInt(_0x540c12(0xec))/0x8+parseInt(_0x540c12(0xfe))/0x9*(-parseInt(_0x540c12(0xed))/0xa)+parseInt(_0x540c12(0xd3))/0xb*(parseInt(_0x540c12(0xf9))/0xc);if(_0x4cf520===_0x5cd107)break;else _0x191b98['push'](_0x191b98['shift']());}catch(_0x17d8dc){_0x191b98['push'](_0x191b98['shift']());}}}(a0_0x1cf0,0xdfa67));function a0_0x1cf0(){const _0x4dd6cb=['__createBinding','length','path','unlinkSync','defineProperty','birthtime','readdirSync','crypto','last_accessed_at','readFileSync','writeFileSync','__setModuleDefault','endsWith','created_at','update','__importStar','5227812ypHegQ','parse','61760RrHdEm','10TWjiFu','existsSync','utf8','mkdirSync','createHash','getOwnPropertyDescriptor','size','saveChunk','.json','.trimprompt','configurable','enforceEvictionPolicy','972HeUlUY','call','toISOString','2LqhTWC','create','6068259mfmpTu','push','cache','5586Dfohgs','digest','172565GNtXZj','115NPoTQv','now','writable','getTime','get','retrieveChunk','4949DLwBqg','stringify','tp_chk_','185828mStJuw','join','isDirectory','default','419287RKQdzY','statSync','ceil','getOwnPropertyNames','__esModule','lastAccessed','mtime'];a0_0x1cf0=function(){return _0x4dd6cb;};return a0_0x1cf0();}var __createBinding=this&&this[a0_0x50c8b1(0xda)]||(Object[a0_0x50c8b1(0xfd)]?function(_0x3c5f9a,_0x334ab4,_0xe0a7a0,_0x22c262){const _0x2e20ca=a0_0x50c8b1;if(_0x22c262===undefined)_0x22c262=_0xe0a7a0;var _0x33bfc7=Object[_0x2e20ca(0xf2)](_0x334ab4,_0xe0a7a0);(!_0x33bfc7||(_0x2e20ca(0x108)in _0x33bfc7?!_0x334ab4[_0x2e20ca(0xd7)]:_0x33bfc7[_0x2e20ca(0x106)]||_0x33bfc7[_0x2e20ca(0xf7)]))&&(_0x33bfc7={'enumerable':!![],'get':function(){return _0x334ab4[_0xe0a7a0];}}),Object[_0x2e20ca(0xde)](_0x3c5f9a,_0x22c262,_0x33bfc7);}:function(_0x2ed834,_0x53b0ee,_0x187d31,_0x952c61){if(_0x952c61===undefined)_0x952c61=_0x187d31;_0x2ed834[_0x952c61]=_0x53b0ee[_0x187d31];}),__setModuleDefault=this&&this[a0_0x50c8b1(0xe5)]||(Object[a0_0x50c8b1(0xfd)]?function(_0x4f37eb,_0x594ba5){const _0x1a98cd=a0_0x50c8b1;Object[_0x1a98cd(0xde)](_0x4f37eb,'default',{'enumerable':!![],'value':_0x594ba5});}:function(_0x45ee30,_0x1544b8){_0x45ee30['default']=_0x1544b8;}),__importStar=this&&this[a0_0x50c8b1(0xe9)]||(function(){var _0x104aad=function(_0xc99fba){const _0x5a1465=a0_0x3c53;return _0x104aad=Object[_0x5a1465(0xd6)]||function(_0x3b245e){const _0x36a8a0=_0x5a1465;var _0x11b391=[];for(var _0x1a9449 in _0x3b245e)if(Object['prototype']['hasOwnProperty'][_0x36a8a0(0xfa)](_0x3b245e,_0x1a9449))_0x11b391[_0x11b391['length']]=_0x1a9449;return _0x11b391;},_0x104aad(_0xc99fba);};return function(_0x196bf6){const _0x323a79=a0_0x3c53;if(_0x196bf6&&_0x196bf6[_0x323a79(0xd7)])return _0x196bf6;var _0x1d93b3={};if(_0x196bf6!=null){for(var _0x208358=_0x104aad(_0x196bf6),_0x5e01ab=0x0;_0x5e01ab<_0x208358[_0x323a79(0xdb)];_0x5e01ab++)if(_0x208358[_0x5e01ab]!==_0x323a79(0x110))__createBinding(_0x1d93b3,_0x196bf6,_0x208358[_0x5e01ab]);}return __setModuleDefault(_0x1d93b3,_0x196bf6),_0x1d93b3;};}());function a0_0x3c53(_0x5a022d,_0x228740){_0x5a022d=_0x5a022d-0xd3;const _0x1cf0ae=a0_0x1cf0();let _0x3c531a=_0x1cf0ae[_0x5a022d];return _0x3c531a;}Object[a0_0x50c8b1(0xde)](exports,a0_0x50c8b1(0xd7),{'value':!![]}),exports[a0_0x50c8b1(0xf4)]=saveChunk,exports[a0_0x50c8b1(0x109)]=retrieveChunk,exports[a0_0x50c8b1(0xf8)]=enforceEvictionPolicy;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x50c8b1(0xdc))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x50c8b1(0xe1))),baseDir=path[a0_0x50c8b1(0x10e)](os['homedir'](),a0_0x50c8b1(0xf6)),cacheDir=path['join'](baseDir,a0_0x50c8b1(0x100)),MAX_CACHE_BYTES=0x1f4*0x400*0x400,TTL_MS=0xe*0x18*0x3c*0x3c*0x3e8;function ensureCacheDir(){const _0x221fca=a0_0x50c8b1;!fs['existsSync'](cacheDir)&&fs[_0x221fca(0xf0)](cacheDir,{'recursive':!![]});}function saveChunk(_0x257376,_0x3e3aaa,_0x9ec95e,_0x397e7e){const _0x4d2cb1=a0_0x50c8b1;ensureCacheDir();const _0x7f44a=crypto[_0x4d2cb1(0xf1)]('sha256')[_0x4d2cb1(0xe8)](_0x9ec95e)[_0x4d2cb1(0x102)]('hex')['substring'](0x0,0x8),_0x4e5f5c=_0x4d2cb1(0x10c)+_0x7f44a,_0x44c58f=path[_0x4d2cb1(0x10e)](cacheDir,_0x257376);!fs['existsSync'](_0x44c58f)&&fs[_0x4d2cb1(0xf0)](_0x44c58f,{'recursive':!![]});const _0x3ba160=path['join'](_0x44c58f,_0x4e5f5c+'.json'),_0x474376=new Date()[_0x4d2cb1(0xfb)](),_0x1b04f0=Math[_0x4d2cb1(0xd5)](_0x9ec95e['length']/0x4),_0xfe4bd2=Math[_0x4d2cb1(0xd5)](_0x397e7e[_0x4d2cb1(0xdb)]/0x4),_0x9f847f={'chunk_id':_0x4e5f5c,'session_id':_0x257376,'agent_key':_0x3e3aaa,'raw_tokens':_0x1b04f0,'compressed_tokens':_0xfe4bd2,'created_at':_0x474376,'last_accessed_at':_0x474376,'summary':_0x397e7e,'raw_payload':_0x9ec95e};return fs[_0x4d2cb1(0xe4)](_0x3ba160,JSON[_0x4d2cb1(0x10b)](_0x9f847f,null,0x2),_0x4d2cb1(0xef)),enforceEvictionPolicy(),_0x9f847f;}function retrieveChunk(_0x296df0){const _0x1e75b3=a0_0x50c8b1;ensureCacheDir();try{const _0x537a0d=fs['readdirSync'](cacheDir);for(const _0x41f289 of _0x537a0d){const _0xb38f42=path['join'](cacheDir,_0x41f289);if(fs[_0x1e75b3(0xd4)](_0xb38f42)[_0x1e75b3(0x10f)]()){const _0x5f281f=path['join'](_0xb38f42,_0x296df0+_0x1e75b3(0xf5));if(fs[_0x1e75b3(0xee)](_0x5f281f)){const _0x48fd33=fs[_0x1e75b3(0xe3)](_0x5f281f,'utf8'),_0x1b32e2=JSON[_0x1e75b3(0xeb)](_0x48fd33);return _0x1b32e2[_0x1e75b3(0xe2)]=new Date()[_0x1e75b3(0xfb)](),fs[_0x1e75b3(0xe4)](_0x5f281f,JSON[_0x1e75b3(0x10b)](_0x1b32e2,null,0x2),_0x1e75b3(0xef)),_0x1b32e2;}}}}catch{}return null;}function enforceEvictionPolicy(){const _0x237e94=a0_0x50c8b1;ensureCacheDir();try{const _0x45960c=Date[_0x237e94(0x105)]();let _0x520d1c=0x0;const _0x2e6e89=[],_0xe51135=fs['readdirSync'](cacheDir);for(const _0x22e24f of _0xe51135){const _0x455e7b=path['join'](cacheDir,_0x22e24f);if(fs[_0x237e94(0xd4)](_0x455e7b)[_0x237e94(0x10f)]()){const _0x57d968=fs[_0x237e94(0xe0)](_0x455e7b);for(const _0x1517b6 of _0x57d968){if(_0x1517b6[_0x237e94(0xe6)](_0x237e94(0xf5))){const _0x3b2db6=path[_0x237e94(0x10e)](_0x455e7b,_0x1517b6),_0xf3cc6=fs[_0x237e94(0xd4)](_0x3b2db6);try{const _0x4785b5=JSON[_0x237e94(0xeb)](fs['readFileSync'](_0x3b2db6,_0x237e94(0xef))),_0x5a4f08=new Date(_0x4785b5[_0x237e94(0xe7)]||_0xf3cc6[_0x237e94(0xdf)])[_0x237e94(0x107)](),_0x150ed0=new Date(_0x4785b5[_0x237e94(0xe2)]||_0xf3cc6[_0x237e94(0xd9)])[_0x237e94(0x107)]();if(_0x45960c-_0x5a4f08>TTL_MS){fs[_0x237e94(0xdd)](_0x3b2db6);continue;}_0x520d1c+=_0xf3cc6[_0x237e94(0xf3)],_0x2e6e89[_0x237e94(0xff)]({'path':_0x3b2db6,'size':_0xf3cc6[_0x237e94(0xf3)],'lastAccessed':_0x150ed0,'createdAt':_0x5a4f08});}catch{fs[_0x237e94(0xdd)](_0x3b2db6);}}}}}if(_0x520d1c>MAX_CACHE_BYTES){_0x2e6e89['sort']((_0x13f084,_0x39d7eb)=>_0x13f084[_0x237e94(0xd8)]-_0x39d7eb[_0x237e94(0xd8)]);for(const _0xb733e4 of _0x2e6e89){if(_0x520d1c<=MAX_CACHE_BYTES*0.8)break;try{fs[_0x237e94(0xdd)](_0xb733e4[_0x237e94(0xdc)]),_0x520d1c-=_0xb733e4[_0x237e94(0xf3)];}catch{}}}}catch{}}
1
+ 'use strict';const a0_0x5a4648=a0_0x1bbc;(function(_0x3d6f42,_0x11e5cc){const _0x57878f=a0_0x1bbc,_0x1d88a5=_0x3d6f42();while(!![]){try{const _0xe1181c=-parseInt(_0x57878f(0x13d))/0x1+-parseInt(_0x57878f(0x145))/0x2*(-parseInt(_0x57878f(0x16b))/0x3)+parseInt(_0x57878f(0x15c))/0x4*(-parseInt(_0x57878f(0x179))/0x5)+-parseInt(_0x57878f(0x162))/0x6*(parseInt(_0x57878f(0x13e))/0x7)+-parseInt(_0x57878f(0x16e))/0x8*(parseInt(_0x57878f(0x168))/0x9)+-parseInt(_0x57878f(0x148))/0xa+-parseInt(_0x57878f(0x147))/0xb*(-parseInt(_0x57878f(0x150))/0xc);if(_0xe1181c===_0x11e5cc)break;else _0x1d88a5['push'](_0x1d88a5['shift']());}catch(_0x4dfdc1){_0x1d88a5['push'](_0x1d88a5['shift']());}}}(a0_0x3f3a,0x889a8));var __createBinding=this&&this[a0_0x5a4648(0x151)]||(Object[a0_0x5a4648(0x167)]?function(_0x5122b1,_0x2c9eb9,_0x4da103,_0x35abd4){const _0x214f90=a0_0x5a4648;if(_0x35abd4===undefined)_0x35abd4=_0x4da103;var _0x4ccf3c=Object['getOwnPropertyDescriptor'](_0x2c9eb9,_0x4da103);(!_0x4ccf3c||(_0x214f90(0x142)in _0x4ccf3c?!_0x2c9eb9[_0x214f90(0x16f)]:_0x4ccf3c[_0x214f90(0x155)]||_0x4ccf3c[_0x214f90(0x158)]))&&(_0x4ccf3c={'enumerable':!![],'get':function(){return _0x2c9eb9[_0x4da103];}}),Object[_0x214f90(0x154)](_0x5122b1,_0x35abd4,_0x4ccf3c);}:function(_0x367b2a,_0x2b0b8b,_0x2449a2,_0x4782b4){if(_0x4782b4===undefined)_0x4782b4=_0x2449a2;_0x367b2a[_0x4782b4]=_0x2b0b8b[_0x2449a2];}),__setModuleDefault=this&&this[a0_0x5a4648(0x160)]||(Object[a0_0x5a4648(0x167)]?function(_0x1343b5,_0x1f1742){const _0x30e97f=a0_0x5a4648;Object['defineProperty'](_0x1343b5,_0x30e97f(0x177),{'enumerable':!![],'value':_0x1f1742});}:function(_0x58cea1,_0x2f27b7){const _0x136c97=a0_0x5a4648;_0x58cea1[_0x136c97(0x177)]=_0x2f27b7;}),__importStar=this&&this[a0_0x5a4648(0x141)]||(function(){var _0x2986c1=function(_0x420973){const _0x360686=a0_0x1bbc;return _0x2986c1=Object[_0x360686(0x161)]||function(_0x3791c9){const _0x48b21e=_0x360686;var _0x3f0ba1=[];for(var _0xab1e69 in _0x3791c9)if(Object[_0x48b21e(0x15e)][_0x48b21e(0x13f)]['call'](_0x3791c9,_0xab1e69))_0x3f0ba1[_0x3f0ba1[_0x48b21e(0x152)]]=_0xab1e69;return _0x3f0ba1;},_0x2986c1(_0x420973);};return function(_0x45b332){const _0x5993dd=a0_0x1bbc;if(_0x45b332&&_0x45b332[_0x5993dd(0x16f)])return _0x45b332;var _0x2772cf={};if(_0x45b332!=null){for(var _0x195d5f=_0x2986c1(_0x45b332),_0x2d4fa4=0x0;_0x2d4fa4<_0x195d5f[_0x5993dd(0x152)];_0x2d4fa4++)if(_0x195d5f[_0x2d4fa4]!=='default')__createBinding(_0x2772cf,_0x45b332,_0x195d5f[_0x2d4fa4]);}return __setModuleDefault(_0x2772cf,_0x45b332),_0x2772cf;};}());Object['defineProperty'](exports,a0_0x5a4648(0x16f),{'value':!![]}),exports[a0_0x5a4648(0x15f)]=saveChunk,exports['retrieveChunk']=retrieveChunk,exports[a0_0x5a4648(0x176)]=enforceEvictionPolicy;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5a4648(0x175))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x5a4648(0x172))),baseDir=path[a0_0x5a4648(0x166)](os['homedir'](),a0_0x5a4648(0x140)),cacheDir=path[a0_0x5a4648(0x166)](baseDir,a0_0x5a4648(0x178)),MAX_CACHE_BYTES=0x1f4*0x400*0x400,TTL_MS=0xe*0x18*0x3c*0x3c*0x3e8;function ensureCacheDir(){const _0x38e8ea=a0_0x5a4648;!fs[_0x38e8ea(0x14f)](cacheDir)&&fs[_0x38e8ea(0x15b)](cacheDir,{'recursive':!![]});}function a0_0x3f3a(){const _0x15071e=['parse','crypto','readFileSync','writeFileSync','path','enforceEvictionPolicy','default','cache','5390hddoKX','152715NedEYD','7ILOtxi','hasOwnProperty','.trimprompt','__importStar','get','size','digest','10ooLwwM','hex','4988698YqZpkw','7405570xMGKWj','getTime','update','last_accessed_at','birthtime','createHash','isDirectory','existsSync','60ByaSgw','__createBinding','length','readdirSync','defineProperty','writable','.json','mtime','configurable','created_at','toISOString','mkdirSync','80ODCchD','substring','prototype','saveChunk','__setModuleDefault','getOwnPropertyNames','5629620vGjSZR','utf8','now','statSync','join','create','801iaPLhP','lastAccessed','unlinkSync','557211JpNYfS','stringify','push','70440NyWBhk','__esModule','endsWith'];a0_0x3f3a=function(){return _0x15071e;};return a0_0x3f3a();}function saveChunk(_0x1001dc,_0x137bde,_0x137f29,_0x28f4d2){const _0x17df3d=a0_0x5a4648;ensureCacheDir();const _0x6260a3=crypto[_0x17df3d(0x14d)]('sha256')[_0x17df3d(0x14a)](_0x137f29)[_0x17df3d(0x144)](_0x17df3d(0x146))[_0x17df3d(0x15d)](0x0,0x8),_0x445e2f='tp_chk_'+_0x6260a3,_0x5eb184=path[_0x17df3d(0x166)](cacheDir,_0x1001dc);!fs['existsSync'](_0x5eb184)&&fs[_0x17df3d(0x15b)](_0x5eb184,{'recursive':!![]});const _0x4898e5=path[_0x17df3d(0x166)](_0x5eb184,_0x445e2f+_0x17df3d(0x156)),_0x4cf641=new Date()[_0x17df3d(0x15a)](),_0x194993=Math['ceil'](_0x137f29[_0x17df3d(0x152)]/0x4),_0x232af7=Math['ceil'](_0x28f4d2['length']/0x4),_0x24b194={'chunk_id':_0x445e2f,'session_id':_0x1001dc,'agent_key':_0x137bde,'raw_tokens':_0x194993,'compressed_tokens':_0x232af7,'created_at':_0x4cf641,'last_accessed_at':_0x4cf641,'summary':_0x28f4d2,'raw_payload':_0x137f29};return fs[_0x17df3d(0x174)](_0x4898e5,JSON[_0x17df3d(0x16c)](_0x24b194,null,0x2),'utf8'),enforceEvictionPolicy(),_0x24b194;}function a0_0x1bbc(_0x27266e,_0x392991){_0x27266e=_0x27266e-0x13d;const _0x3f3ac0=a0_0x3f3a();let _0x1bbc96=_0x3f3ac0[_0x27266e];return _0x1bbc96;}function retrieveChunk(_0x4af2c8){const _0x2e11cb=a0_0x5a4648;ensureCacheDir();try{const _0xf6de33=fs[_0x2e11cb(0x153)](cacheDir);for(const _0x2a0917 of _0xf6de33){const _0x3b7b49=path[_0x2e11cb(0x166)](cacheDir,_0x2a0917);if(fs['statSync'](_0x3b7b49)['isDirectory']()){const _0x1f02a1=path[_0x2e11cb(0x166)](_0x3b7b49,_0x4af2c8+'.json');if(fs[_0x2e11cb(0x14f)](_0x1f02a1)){const _0x336bfc=fs['readFileSync'](_0x1f02a1,_0x2e11cb(0x163)),_0x1e5f8c=JSON[_0x2e11cb(0x171)](_0x336bfc);return _0x1e5f8c[_0x2e11cb(0x14b)]=new Date()[_0x2e11cb(0x15a)](),fs[_0x2e11cb(0x174)](_0x1f02a1,JSON[_0x2e11cb(0x16c)](_0x1e5f8c,null,0x2),'utf8'),_0x1e5f8c;}}}}catch{}return null;}function enforceEvictionPolicy(){const _0x7bfc58=a0_0x5a4648;ensureCacheDir();try{const _0x183c82=Date[_0x7bfc58(0x164)]();let _0x17e49e=0x0;const _0x284d2c=[],_0x72d555=fs[_0x7bfc58(0x153)](cacheDir);for(const _0xf5881b of _0x72d555){const _0x4579e2=path[_0x7bfc58(0x166)](cacheDir,_0xf5881b);if(fs[_0x7bfc58(0x165)](_0x4579e2)[_0x7bfc58(0x14e)]()){const _0x455114=fs['readdirSync'](_0x4579e2);for(const _0x320cd1 of _0x455114){if(_0x320cd1[_0x7bfc58(0x170)](_0x7bfc58(0x156))){const _0x4ce186=path[_0x7bfc58(0x166)](_0x4579e2,_0x320cd1),_0x81bfc0=fs[_0x7bfc58(0x165)](_0x4ce186);try{const _0xcaef38=JSON[_0x7bfc58(0x171)](fs[_0x7bfc58(0x173)](_0x4ce186,_0x7bfc58(0x163))),_0xc6eb50=new Date(_0xcaef38[_0x7bfc58(0x159)]||_0x81bfc0[_0x7bfc58(0x14c)])[_0x7bfc58(0x149)](),_0x28c56a=new Date(_0xcaef38['last_accessed_at']||_0x81bfc0[_0x7bfc58(0x157)])[_0x7bfc58(0x149)]();if(_0x183c82-_0xc6eb50>TTL_MS){fs['unlinkSync'](_0x4ce186);continue;}_0x17e49e+=_0x81bfc0[_0x7bfc58(0x143)],_0x284d2c[_0x7bfc58(0x16d)]({'path':_0x4ce186,'size':_0x81bfc0[_0x7bfc58(0x143)],'lastAccessed':_0x28c56a,'createdAt':_0xc6eb50});}catch{fs[_0x7bfc58(0x16a)](_0x4ce186);}}}}}if(_0x17e49e>MAX_CACHE_BYTES){_0x284d2c['sort']((_0x59fc9a,_0x5a9cc7)=>_0x59fc9a[_0x7bfc58(0x169)]-_0x5a9cc7[_0x7bfc58(0x169)]);for(const _0x15678c of _0x284d2c){if(_0x17e49e<=MAX_CACHE_BYTES*0.8)break;try{fs[_0x7bfc58(0x16a)](_0x15678c['path']),_0x17e49e-=_0x15678c[_0x7bfc58(0x143)];}catch{}}}}catch{}}
package/cache.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0xa1cc=a0_0x544f;function a0_0x544f(_0x388b4f,_0xa0f40a){_0x388b4f=_0x388b4f-0xe1;const _0x35952f=a0_0x3595();let _0x544fa6=_0x35952f[_0x388b4f];return _0x544fa6;}function a0_0x3595(){const _0x469ece=['436DJSASS','ruff\x20','join','docker','\x20tree','writable','digest','1338975ERGzWQ','.trimprompt','now','endsWith','s\x20ago,\x20','593fqnHGG','docker-images','__importStar','git-log','round','split','\x20lines,\x20','includes','length','4215426LXuZgE','yadm\x20log','path','prototype','kubectl\x20describe','1602461xnDBXG','utf8','8WCdvJk','file','md5','git\x20log','slice','writeFileSync','parse','859692flEZfB','ruff\x20check','__createBinding','default','[cached\x20—\x20unchanged\x20since\x20','\x20lines','summary','create','hex','kubectl','dedup','go\x20vet','cache.json','defineProperty','readFileSync','trim','tree','sort','get','update','toLowerCase','stringify','docker-ps','configurable','yadm\x20status','3941828xVSfcE','timestamp','crypto','match','1242144QueLFT','\x20chars','keys','getOwnPropertyNames','\x20entries','git-status','existsSync','__esModule'];a0_0x3595=function(){return _0x469ece;};return a0_0x3595();}(function(_0x56303f,_0x2898aa){const _0x206bef=a0_0x544f,_0x2ae55a=_0x56303f();while(!![]){try{const _0x5b60fc=-parseInt(_0x206bef(0xfe))/0x1*(parseInt(_0x206bef(0xf2))/0x2)+parseInt(_0x206bef(0x115))/0x3+parseInt(_0x206bef(0xe6))/0x4+-parseInt(_0x206bef(0xf9))/0x5+-parseInt(_0x206bef(0x107))/0x6+parseInt(_0x206bef(0x10c))/0x7*(parseInt(_0x206bef(0x10e))/0x8)+parseInt(_0x206bef(0xea))/0x9;if(_0x5b60fc===_0x2898aa)break;else _0x2ae55a['push'](_0x2ae55a['shift']());}catch(_0x6f1570){_0x2ae55a['push'](_0x2ae55a['shift']());}}}(a0_0x3595,0x83ab8));var __createBinding=this&&this[a0_0xa1cc(0x117)]||(Object['create']?function(_0x10ba53,_0x243153,_0x5eebcf,_0x5e92fb){const _0x4cd807=a0_0xa1cc;if(_0x5e92fb===undefined)_0x5e92fb=_0x5eebcf;var _0x429f36=Object['getOwnPropertyDescriptor'](_0x243153,_0x5eebcf);(!_0x429f36||(_0x4cd807(0x127)in _0x429f36?!_0x243153[_0x4cd807(0xf1)]:_0x429f36[_0x4cd807(0xf7)]||_0x429f36[_0x4cd807(0xe4)]))&&(_0x429f36={'enumerable':!![],'get':function(){return _0x243153[_0x5eebcf];}}),Object[_0x4cd807(0x122)](_0x10ba53,_0x5e92fb,_0x429f36);}:function(_0x4525c7,_0x26c068,_0x51e63b,_0x34908e){if(_0x34908e===undefined)_0x34908e=_0x51e63b;_0x4525c7[_0x34908e]=_0x26c068[_0x51e63b];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0xa1cc(0x11c)]?function(_0x5dc3b7,_0x3c846f){const _0x3ff225=a0_0xa1cc;Object['defineProperty'](_0x5dc3b7,_0x3ff225(0x118),{'enumerable':!![],'value':_0x3c846f});}:function(_0xb59d76,_0x4058bf){const _0x31eb57=a0_0xa1cc;_0xb59d76[_0x31eb57(0x118)]=_0x4058bf;}),__importStar=this&&this[a0_0xa1cc(0x100)]||(function(){var _0x5247c9=function(_0x5ee189){const _0x28ea26=a0_0x544f;return _0x5247c9=Object[_0x28ea26(0xed)]||function(_0x4737b7){const _0x1eacf5=_0x28ea26;var _0x20e486=[];for(var _0x5abcbf in _0x4737b7)if(Object[_0x1eacf5(0x10a)]['hasOwnProperty']['call'](_0x4737b7,_0x5abcbf))_0x20e486[_0x20e486[_0x1eacf5(0x106)]]=_0x5abcbf;return _0x20e486;},_0x5247c9(_0x5ee189);};return function(_0x362f13){const _0x47534d=a0_0x544f;if(_0x362f13&&_0x362f13['__esModule'])return _0x362f13;var _0x376b80={};if(_0x362f13!=null){for(var _0x68415f=_0x5247c9(_0x362f13),_0x107e17=0x0;_0x107e17<_0x68415f[_0x47534d(0x106)];_0x107e17++)if(_0x68415f[_0x107e17]!=='default')__createBinding(_0x376b80,_0x362f13,_0x68415f[_0x107e17]);}return __setModuleDefault(_0x376b80,_0x362f13),_0x376b80;};}());Object[a0_0xa1cc(0x122)](exports,a0_0xa1cc(0xf1),{'value':!![]}),exports[a0_0xa1cc(0x11f)]=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0xa1cc(0x109))),os=__importStar(require('os')),crypto=__importStar(require(a0_0xa1cc(0xe8))),CACHE_DIR=path[a0_0xa1cc(0xf4)](os['homedir'](),a0_0xa1cc(0xfa)),CACHE_FILE=path[a0_0xa1cc(0xf4)](CACHE_DIR,a0_0xa1cc(0x121)),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(_0x256120){const _0x8fa944=a0_0xa1cc,_0x37100d=_0x256120[_0x8fa944(0x124)]()[_0x8fa944(0xe1)]();if(_0x37100d['match'](/^(cat|head|tail|read|bat)\s/))return _0x8fa944(0x10f);if(_0x37100d['includes']('git\x20status')||_0x37100d[_0x8fa944(0x105)](_0x8fa944(0xe5)))return'git-status';if(_0x37100d[_0x8fa944(0x105)](_0x8fa944(0x111))||_0x37100d[_0x8fa944(0x105)](_0x8fa944(0x108)))return _0x8fa944(0x101);if(_0x37100d[_0x8fa944(0x105)]('git\x20show')||_0x37100d[_0x8fa944(0x105)]('yadm\x20show'))return'git-show';if(_0x37100d[_0x8fa944(0xe9)](/^(ls|dir)(\s|$)/)||_0x37100d[_0x8fa944(0x105)]('\x20ls\x20')||_0x37100d['endsWith']('\x20ls'))return'ls';if(_0x37100d[_0x8fa944(0xe9)](/^tree(\s|$)/)||_0x37100d['includes']('\x20tree\x20')||_0x37100d[_0x8fa944(0xfc)](_0x8fa944(0xf6)))return _0x8fa944(0x125);if(_0x37100d[_0x8fa944(0xe9)](/docker\s+ps/))return _0x8fa944(0xe3);if(_0x37100d[_0x8fa944(0xe9)](/docker\s+images/))return _0x8fa944(0xff);if(_0x37100d[_0x8fa944(0x105)]('kubectl\x20get')||_0x37100d[_0x8fa944(0x105)](_0x8fa944(0x10b)))return _0x8fa944(0x11e);if(_0x37100d['includes'](_0x8fa944(0x116))||_0x37100d[_0x8fa944(0x105)](_0x8fa944(0xf3)))return'ruff';if(_0x37100d['includes'](_0x8fa944(0x120)))return'go-vet';return'';}function md5(_0xf2266){const _0x20c61e=a0_0xa1cc;return crypto['createHash'](_0x20c61e(0x110))[_0x20c61e(0x128)](_0xf2266)[_0x20c61e(0xf8)](_0x20c61e(0x11d));}function loadStore(){const _0xf155c8=a0_0xa1cc;try{if(fs[_0xf155c8(0xf0)](CACHE_FILE))return JSON[_0xf155c8(0x114)](fs[_0xf155c8(0x123)](CACHE_FILE,_0xf155c8(0x10d)));}catch{}return{};}function saveStore(_0x493d68){const _0x8078e8=a0_0xa1cc;try{if(!fs[_0x8078e8(0xf0)](CACHE_DIR))fs['mkdirSync'](CACHE_DIR,{'recursive':!![]});const _0x4eff2c=Object[_0x8078e8(0xec)](_0x493d68);if(_0x4eff2c[_0x8078e8(0x106)]>MAX_ENTRIES){const _0x310aac=_0x4eff2c[_0x8078e8(0x126)]((_0x5d5bc1,_0x2c7351)=>_0x493d68[_0x5d5bc1][_0x8078e8(0xe7)]-_0x493d68[_0x2c7351][_0x8078e8(0xe7)]);for(const _0x5f5af8 of _0x310aac[_0x8078e8(0x112)](0x0,_0x4eff2c[_0x8078e8(0x106)]-MAX_ENTRIES)){delete _0x493d68[_0x5f5af8];}}fs[_0x8078e8(0x113)](CACHE_FILE,JSON[_0x8078e8(0xe2)](_0x493d68),_0x8078e8(0x10d));}catch{}}function buildSummary(_0x53c6e6,_0x2533be){const _0x1d4c4f=a0_0xa1cc,_0x1ad6df=_0x53c6e6[_0x1d4c4f(0x103)]('\x0a')['length'],_0x187070=_0x53c6e6[_0x1d4c4f(0x106)];if(_0x2533be===_0x1d4c4f(0x10f))return _0x1ad6df+_0x1d4c4f(0x104)+_0x187070+'\x20chars';if(_0x2533be===_0x1d4c4f(0xef))return _0x1ad6df+_0x1d4c4f(0x11a);if(_0x2533be==='git-log')return _0x1ad6df+_0x1d4c4f(0xee);if(_0x2533be['startsWith'](_0x1d4c4f(0xf5)))return _0x1ad6df+_0x1d4c4f(0x11a);return _0x1ad6df+_0x1d4c4f(0x104)+_0x187070+_0x1d4c4f(0xeb);}function dedup(_0x5c61dd,_0x119c9b){const _0xbc345d=a0_0xa1cc;try{const _0x3284a1=classifyCommand(_0x5c61dd);if(!_0x3284a1)return null;const _0x20e0b1=TTL_SECONDS[_0x3284a1];if(!_0x20e0b1)return null;const _0x4d2bbb=process['cwd'](),_0xa1a06a=md5(_0x4d2bbb+'::'+_0x5c61dd[_0xbc345d(0x124)]()),_0x519200=md5(_0x119c9b),_0xd350fa=Date[_0xbc345d(0xfb)](),_0x58f7c5=loadStore(),_0x22c1f5=_0x58f7c5[_0xa1a06a];if(_0x22c1f5&&_0x22c1f5['hash']===_0x519200&&_0xd350fa-_0x22c1f5[_0xbc345d(0xe7)]<_0x20e0b1*0x3e8){const _0x596a58=Math[_0xbc345d(0x102)]((_0xd350fa-_0x22c1f5[_0xbc345d(0xe7)])/0x3e8);return _0xbc345d(0x119)+_0x596a58+_0xbc345d(0xfd)+_0x22c1f5[_0xbc345d(0x11b)]+']';}_0x58f7c5[_0xa1a06a]={'hash':_0x519200,'summary':buildSummary(_0x119c9b,_0x3284a1),'timestamp':_0xd350fa,'chars':_0x119c9b[_0xbc345d(0x106)]},saveStore(_0x58f7c5);}catch{}return null;}
1
+ 'use strict';const a0_0x3070fe=a0_0x4866;(function(_0xdeb4a4,_0x3b33c5){const _0x9759d2=a0_0x4866,_0xfe9d07=_0xdeb4a4();while(!![]){try{const _0x245ab2=-parseInt(_0x9759d2(0xd3))/0x1*(parseInt(_0x9759d2(0xcd))/0x2)+-parseInt(_0x9759d2(0xc0))/0x3+-parseInt(_0x9759d2(0xbd))/0x4*(-parseInt(_0x9759d2(0xa1))/0x5)+parseInt(_0x9759d2(0xa2))/0x6+parseInt(_0x9759d2(0xb3))/0x7+parseInt(_0x9759d2(0xa7))/0x8+-parseInt(_0x9759d2(0xd2))/0x9;if(_0x245ab2===_0x3b33c5)break;else _0xfe9d07['push'](_0xfe9d07['shift']());}catch(_0x44bae9){_0xfe9d07['push'](_0xfe9d07['shift']());}}}(a0_0xa845,0xbbc42));var __createBinding=this&&this[a0_0x3070fe(0xab)]||(Object[a0_0x3070fe(0xa0)]?function(_0x4bf297,_0x4dad18,_0x46ba2c,_0x1de444){const _0x2a3810=a0_0x3070fe;if(_0x1de444===undefined)_0x1de444=_0x46ba2c;var _0x485a5e=Object['getOwnPropertyDescriptor'](_0x4dad18,_0x46ba2c);(!_0x485a5e||(_0x2a3810(0xbb)in _0x485a5e?!_0x4dad18[_0x2a3810(0x9d)]:_0x485a5e[_0x2a3810(0xc9)]||_0x485a5e[_0x2a3810(0xb2)]))&&(_0x485a5e={'enumerable':!![],'get':function(){return _0x4dad18[_0x46ba2c];}}),Object['defineProperty'](_0x4bf297,_0x1de444,_0x485a5e);}:function(_0x4ef7c6,_0x426866,_0x3a9a6b,_0x344d4d){if(_0x344d4d===undefined)_0x344d4d=_0x3a9a6b;_0x4ef7c6[_0x344d4d]=_0x426866[_0x3a9a6b];}),__setModuleDefault=this&&this[a0_0x3070fe(0xc2)]||(Object['create']?function(_0x4c8bd7,_0x2da313){const _0x570033=a0_0x3070fe;Object[_0x570033(0x98)](_0x4c8bd7,_0x570033(0xb9),{'enumerable':!![],'value':_0x2da313});}:function(_0xe41172,_0x2fa789){const _0x379c13=a0_0x3070fe;_0xe41172[_0x379c13(0xb9)]=_0x2fa789;}),__importStar=this&&this[a0_0x3070fe(0xd1)]||(function(){var _0x429068=function(_0x49c4f2){return _0x429068=Object['getOwnPropertyNames']||function(_0x21d015){const _0x344763=a0_0x4866;var _0x1492a3=[];for(var _0x5da38f in _0x21d015)if(Object[_0x344763(0x91)]['hasOwnProperty']['call'](_0x21d015,_0x5da38f))_0x1492a3[_0x1492a3[_0x344763(0xb6)]]=_0x5da38f;return _0x1492a3;},_0x429068(_0x49c4f2);};return function(_0x3b1b33){const _0x1807db=a0_0x4866;if(_0x3b1b33&&_0x3b1b33['__esModule'])return _0x3b1b33;var _0x4ba43b={};if(_0x3b1b33!=null){for(var _0x2a3573=_0x429068(_0x3b1b33),_0x4fec40=0x0;_0x4fec40<_0x2a3573[_0x1807db(0xb6)];_0x4fec40++)if(_0x2a3573[_0x4fec40]!==_0x1807db(0xb9))__createBinding(_0x4ba43b,_0x3b1b33,_0x2a3573[_0x4fec40]);}return __setModuleDefault(_0x4ba43b,_0x3b1b33),_0x4ba43b;};}());Object[a0_0x3070fe(0x98)](exports,a0_0x3070fe(0x9d),{'value':!![]}),exports[a0_0x3070fe(0xb1)]=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3070fe(0xad))),os=__importStar(require('os')),crypto=__importStar(require('crypto')),CACHE_DIR=path[a0_0x3070fe(0x92)](os['homedir'](),a0_0x3070fe(0x90)),CACHE_FILE=path[a0_0x3070fe(0x92)](CACHE_DIR,a0_0x3070fe(0x95)),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(_0x1cc3a0){const _0x2b871f=a0_0x3070fe,_0x194b22=_0x1cc3a0[_0x2b871f(0xcb)]()[_0x2b871f(0x99)]();if(_0x194b22[_0x2b871f(0x9f)](/^(cat|head|tail|read|bat)\s/))return _0x2b871f(0xa6);if(_0x194b22['includes']('git\x20status')||_0x194b22['includes'](_0x2b871f(0xac)))return _0x2b871f(0xb5);if(_0x194b22[_0x2b871f(0xc1)](_0x2b871f(0xcf))||_0x194b22[_0x2b871f(0xc1)](_0x2b871f(0x9a)))return _0x2b871f(0xba);if(_0x194b22[_0x2b871f(0xc1)](_0x2b871f(0x9c))||_0x194b22['includes']('yadm\x20show'))return'git-show';if(_0x194b22[_0x2b871f(0x9f)](/^(ls|dir)(\s|$)/)||_0x194b22['includes'](_0x2b871f(0xaf))||_0x194b22[_0x2b871f(0xca)](_0x2b871f(0x8e)))return'ls';if(_0x194b22[_0x2b871f(0x9f)](/^tree(\s|$)/)||_0x194b22['includes'](_0x2b871f(0xb7))||_0x194b22[_0x2b871f(0xca)](_0x2b871f(0xd0)))return _0x2b871f(0xc5);if(_0x194b22[_0x2b871f(0x9f)](/docker\s+ps/))return'docker-ps';if(_0x194b22[_0x2b871f(0x9f)](/docker\s+images/))return'docker-images';if(_0x194b22[_0x2b871f(0xc1)]('kubectl\x20get')||_0x194b22[_0x2b871f(0xc1)](_0x2b871f(0x8f)))return _0x2b871f(0xa3);if(_0x194b22[_0x2b871f(0xc1)](_0x2b871f(0xbc))||_0x194b22[_0x2b871f(0xc1)]('ruff\x20'))return'ruff';if(_0x194b22[_0x2b871f(0xc1)](_0x2b871f(0xa5)))return _0x2b871f(0xc7);return'';}function a0_0x4866(_0x4f0dc9,_0x46bbd2){_0x4f0dc9=_0x4f0dc9-0x8e;const _0xa84536=a0_0xa845();let _0x486670=_0xa84536[_0x4f0dc9];return _0x486670;}function md5(_0x4747c4){const _0x422955=a0_0x3070fe;return crypto[_0x422955(0xd4)](_0x422955(0xb4))[_0x422955(0x96)](_0x4747c4)[_0x422955(0xa8)]('hex');}function loadStore(){const _0x2ca9bc=a0_0x3070fe;try{if(fs['existsSync'](CACHE_FILE))return JSON[_0x2ca9bc(0xa4)](fs[_0x2ca9bc(0xd5)](CACHE_FILE,'utf8'));}catch{}return{};}function saveStore(_0x5b71cc){const _0x37eef3=a0_0x3070fe;try{if(!fs[_0x37eef3(0xd6)](CACHE_DIR))fs[_0x37eef3(0x9e)](CACHE_DIR,{'recursive':!![]});const _0x599258=Object['keys'](_0x5b71cc);if(_0x599258[_0x37eef3(0xb6)]>MAX_ENTRIES){const _0x7f6e53=_0x599258[_0x37eef3(0xa9)]((_0x44d877,_0xc6dda7)=>_0x5b71cc[_0x44d877]['timestamp']-_0x5b71cc[_0xc6dda7][_0x37eef3(0xbf)]);for(const _0x56a198 of _0x7f6e53[_0x37eef3(0xc6)](0x0,_0x599258[_0x37eef3(0xb6)]-MAX_ENTRIES)){delete _0x5b71cc[_0x56a198];}}fs[_0x37eef3(0xd7)](CACHE_FILE,JSON['stringify'](_0x5b71cc),_0x37eef3(0xcc));}catch{}}function buildSummary(_0x4289da,_0x56cd83){const _0x80c41c=a0_0x3070fe,_0x29fbe6=_0x4289da[_0x80c41c(0x93)]('\x0a')[_0x80c41c(0xb6)],_0x3f1a21=_0x4289da[_0x80c41c(0xb6)];if(_0x56cd83===_0x80c41c(0xa6))return _0x29fbe6+_0x80c41c(0xb8)+_0x3f1a21+'\x20chars';if(_0x56cd83===_0x80c41c(0xb5))return _0x29fbe6+_0x80c41c(0xc4);if(_0x56cd83===_0x80c41c(0xba))return _0x29fbe6+_0x80c41c(0x9b);if(_0x56cd83[_0x80c41c(0x94)]('docker'))return _0x29fbe6+_0x80c41c(0xc4);return _0x29fbe6+_0x80c41c(0xb8)+_0x3f1a21+_0x80c41c(0xce);}function dedup(_0x3bdeb3,_0x64c56d){const _0x381b0a=a0_0x3070fe;try{const _0x678656=classifyCommand(_0x3bdeb3);if(!_0x678656)return null;const _0x5eec6a=TTL_SECONDS[_0x678656];if(!_0x5eec6a)return null;const _0x11e363=process[_0x381b0a(0x97)](),_0x24cdaa=md5(_0x11e363+'::'+_0x3bdeb3['trim']()),_0x41d2a9=md5(_0x64c56d),_0x41e28e=Date[_0x381b0a(0xbe)](),_0x169660=loadStore(),_0x10224f=_0x169660[_0x24cdaa];if(_0x10224f&&_0x10224f[_0x381b0a(0xc3)]===_0x41d2a9&&_0x41e28e-_0x10224f[_0x381b0a(0xbf)]<_0x5eec6a*0x3e8){const _0x776eaf=Math[_0x381b0a(0xc8)]((_0x41e28e-_0x10224f[_0x381b0a(0xbf)])/0x3e8);return _0x381b0a(0xaa)+_0x776eaf+_0x381b0a(0xae)+_0x10224f[_0x381b0a(0xb0)]+']';}_0x169660[_0x24cdaa]={'hash':_0x41d2a9,'summary':buildSummary(_0x64c56d,_0x678656),'timestamp':_0x41e28e,'chars':_0x64c56d[_0x381b0a(0xb6)]},saveStore(_0x169660);}catch{}return null;}function a0_0xa845(){const _0x39c535=['4011376huoeWD','digest','sort','[cached\x20—\x20unchanged\x20since\x20','__createBinding','yadm\x20status','path','s\x20ago,\x20','\x20ls\x20','summary','dedup','configurable','3518480sIBtjn','md5','git-status','length','\x20tree\x20','\x20lines,\x20','default','git-log','get','ruff\x20check','20KUMKZp','now','timestamp','206091rBNfvb','includes','__setModuleDefault','hash','\x20lines','tree','slice','go-vet','round','writable','endsWith','trim','utf8','64igvpjt','\x20chars','git\x20log','\x20tree','__importStar','13274703dKBOJq','26074ybfKkY','createHash','readFileSync','existsSync','writeFileSync','\x20ls','kubectl\x20describe','.trimprompt','prototype','join','split','startsWith','cache.json','update','cwd','defineProperty','toLowerCase','yadm\x20log','\x20entries','git\x20show','__esModule','mkdirSync','match','create','875440PRDMbF','7605720ypTAmK','kubectl','parse','go\x20vet','file'];a0_0xa845=function(){return _0x39c535;};return a0_0xa845();}
package/ccr.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x12456a=a0_0x5841;function a0_0x890e(){const _0x2b3ba6=['3927730NvEyNO','class','\x22\x22\x22','length','md5','1467HCgamS','pop','__setModuleDefault','150362dvuvqc','defineProperty','trim','function','utf8','endsWith','substring','__importStar','tp_','push','ccr','replace','export','.ts','writeFileSync','.java','match','def\x20','1371684WfadHT','join',']\x0a\x0a','repeat','.trimprompt','update','hasOwnProperty','.txt','16798430lGFGWG','homedir','create','writable','.cpp','runCcr','pub','package','hex','var','[TrimPrompt:\x20CCR\x20Active.\x20Body\x20of\x20functions\x20collapsed\x20to\x20save\x20tokens.\x20Hash:\x20','import','import\x20','57616RSGvEp','slice','split','interface','default','297606BfOXbN','#\x20...\x20[collapsed]','get','11NWTiQx','9snZcHy','startsWith','configurable','path','__esModule','//\x20...\x20[collapsed]','crypto','.go','.\x20To\x20read\x20the\x20full\x20raw\x20content,\x20run\x20the\x20shell\x20command:\x20trim\x20retrieve\x20','call','mkdirSync','__createBinding','\x20lines\x20collapsed\x20to\x20save\x20tokens]\x20...\x0a','extname','from\x20','.py','createHash','prototype','65ljDBIO','existsSync','trimStart','let','7644994QpugXM','.jsx','.rs','.tsx','digest','class\x20'];a0_0x890e=function(){return _0x2b3ba6;};return a0_0x890e();}(function(_0x3994b3,_0x2eb1d6){const _0x1badd1=a0_0x5841,_0x53c99a=_0x3994b3();while(!![]){try{const _0x4cf9e3=-parseInt(_0x1badd1(0x14f))/0x1*(-parseInt(_0x1badd1(0x174))/0x2)+-parseInt(_0x1badd1(0x150))/0x3*(-parseInt(_0x1badd1(0x186))/0x4)+-parseInt(_0x1badd1(0x162))/0x5*(parseInt(_0x1badd1(0x14c))/0x6)+-parseInt(_0x1badd1(0x166))/0x7+-parseInt(_0x1badd1(0x19b))/0x8*(parseInt(_0x1badd1(0x171))/0x9)+parseInt(_0x1badd1(0x16c))/0xa+parseInt(_0x1badd1(0x18e))/0xb;if(_0x4cf9e3===_0x2eb1d6)break;else _0x53c99a['push'](_0x53c99a['shift']());}catch(_0x52a86a){_0x53c99a['push'](_0x53c99a['shift']());}}}(a0_0x890e,0xd3208));function a0_0x5841(_0x10beb3,_0x3423b3){_0x10beb3=_0x10beb3-0x14b;const _0x890ed1=a0_0x890e();let _0x58410c=_0x890ed1[_0x10beb3];return _0x58410c;}var __createBinding=this&&this[a0_0x12456a(0x15b)]||(Object['create']?function(_0xa9c58c,_0x458326,_0x4454f0,_0x48562a){const _0x5e9e30=a0_0x12456a;if(_0x48562a===undefined)_0x48562a=_0x4454f0;var _0x541020=Object['getOwnPropertyDescriptor'](_0x458326,_0x4454f0);(!_0x541020||(_0x5e9e30(0x14e)in _0x541020?!_0x458326[_0x5e9e30(0x154)]:_0x541020[_0x5e9e30(0x191)]||_0x541020[_0x5e9e30(0x152)]))&&(_0x541020={'enumerable':!![],'get':function(){return _0x458326[_0x4454f0];}}),Object[_0x5e9e30(0x175)](_0xa9c58c,_0x48562a,_0x541020);}:function(_0x484dc3,_0x3a737c,_0x430ddc,_0x345c5f){if(_0x345c5f===undefined)_0x345c5f=_0x430ddc;_0x484dc3[_0x345c5f]=_0x3a737c[_0x430ddc];}),__setModuleDefault=this&&this[a0_0x12456a(0x173)]||(Object[a0_0x12456a(0x190)]?function(_0xc48faa,_0xa94d76){const _0x5777d5=a0_0x12456a;Object[_0x5777d5(0x175)](_0xc48faa,_0x5777d5(0x14b),{'enumerable':!![],'value':_0xa94d76});}:function(_0x29ee14,_0x2aed44){const _0x484969=a0_0x12456a;_0x29ee14[_0x484969(0x14b)]=_0x2aed44;}),__importStar=this&&this[a0_0x12456a(0x17b)]||(function(){var _0x1178c5=function(_0x4e3391){return _0x1178c5=Object['getOwnPropertyNames']||function(_0x4fce28){const _0x438921=a0_0x5841;var _0x5a8c86=[];for(var _0x5afd8f in _0x4fce28)if(Object[_0x438921(0x161)][_0x438921(0x18c)][_0x438921(0x159)](_0x4fce28,_0x5afd8f))_0x5a8c86[_0x5a8c86['length']]=_0x5afd8f;return _0x5a8c86;},_0x1178c5(_0x4e3391);};return function(_0x31eac5){const _0x51a3ca=a0_0x5841;if(_0x31eac5&&_0x31eac5[_0x51a3ca(0x154)])return _0x31eac5;var _0x5c7d3d={};if(_0x31eac5!=null){for(var _0x2da2c2=_0x1178c5(_0x31eac5),_0x39fd01=0x0;_0x39fd01<_0x2da2c2[_0x51a3ca(0x16f)];_0x39fd01++)if(_0x2da2c2[_0x39fd01]!==_0x51a3ca(0x14b))__createBinding(_0x5c7d3d,_0x31eac5,_0x2da2c2[_0x39fd01]);}return __setModuleDefault(_0x5c7d3d,_0x31eac5),_0x5c7d3d;};}());Object[a0_0x12456a(0x175)](exports,a0_0x12456a(0x154),{'value':!![]}),exports['skeletonize']=skeletonize,exports[a0_0x12456a(0x193)]=runCcr;const crypto=__importStar(require(a0_0x12456a(0x156))),fs=__importStar(require('fs')),path=__importStar(require(a0_0x12456a(0x153))),os=__importStar(require('os'));function skeletonize(_0x320d14,_0x6d945d){const _0x38ae3d=a0_0x12456a,_0x52471e=path[_0x38ae3d(0x15d)](_0x6d945d['split']('\x20')[_0x38ae3d(0x172)]()||'')['toLowerCase'](),_0x1d544e=_0x320d14[_0x38ae3d(0x19d)]('\x0a'),_0x2390df=[];if(_0x52471e===_0x38ae3d(0x15f)){let _0x579b16=![],_0xc0bad8='';for(let _0x7c6936=0x0;_0x7c6936<_0x1d544e[_0x38ae3d(0x16f)];_0x7c6936++){const _0x1b6afe=_0x1d544e[_0x7c6936],_0x78b86a=_0x1b6afe[_0x38ae3d(0x176)](),_0x1ad75c=_0x1b6afe[_0x38ae3d(0x16f)]-_0x1b6afe[_0x38ae3d(0x164)]()[_0x38ae3d(0x16f)];if(!_0x579b16&&(_0x78b86a['startsWith'](_0x38ae3d(0x16e))||_0x78b86a['startsWith']('\x27\x27\x27'))){_0x579b16=!![],_0xc0bad8=_0x78b86a[_0x38ae3d(0x17a)](0x0,0x3),_0x2390df[_0x38ae3d(0x17d)](_0x1b6afe);_0x78b86a['endsWith'](_0xc0bad8)&&_0x78b86a['length']>0x3&&(_0x579b16=![]);continue;}if(_0x579b16){_0x2390df[_0x38ae3d(0x17d)](_0x1b6afe);_0x78b86a['endsWith'](_0xc0bad8)&&(_0x579b16=![]);continue;}if(_0x78b86a['startsWith'](_0x38ae3d(0x19a))||_0x78b86a['startsWith'](_0x38ae3d(0x15e))||_0x78b86a[_0x38ae3d(0x151)](_0x38ae3d(0x16b))||_0x78b86a[_0x38ae3d(0x151)](_0x38ae3d(0x185))||_0x78b86a[_0x38ae3d(0x151)]('@')||_0x78b86a[_0x38ae3d(0x151)]('#')||_0x78b86a[_0x38ae3d(0x16f)]===0x0)_0x2390df[_0x38ae3d(0x17d)](_0x1b6afe);else{const _0x426a7c=_0x2390df[_0x2390df[_0x38ae3d(0x16f)]-0x1]||'';if(!_0x426a7c['trim']()[_0x38ae3d(0x179)](_0x38ae3d(0x14d))){const _0x35c704='\x20'[_0x38ae3d(0x189)](_0x1ad75c);_0x2390df[_0x38ae3d(0x17d)](_0x35c704+_0x38ae3d(0x14d));}}}return _0x2390df[_0x38ae3d(0x187)]('\x0a');}if(['.js',_0x38ae3d(0x181),_0x38ae3d(0x167),_0x38ae3d(0x169),_0x38ae3d(0x157),_0x38ae3d(0x168),_0x38ae3d(0x183),'.c',_0x38ae3d(0x192),'.h']['includes'](_0x52471e)){let _0x4cbc8a=0x0;for(let _0x46a12c=0x0;_0x46a12c<_0x1d544e[_0x38ae3d(0x16f)];_0x46a12c++){const _0xea07b6=_0x1d544e[_0x46a12c],_0x58126e=_0xea07b6[_0x38ae3d(0x176)](),_0x559542=(_0x58126e[_0x38ae3d(0x184)](/\{/g)||[])['length'],_0x259496=(_0x58126e['match'](/\}/g)||[])[_0x38ae3d(0x16f)];if(_0x4cbc8a===0x0)(_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x199))||_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x180))||_0x58126e[_0x38ae3d(0x151)]('const')||_0x58126e['startsWith'](_0x38ae3d(0x165))||_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x197))||_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x16d))||_0x58126e['startsWith'](_0x38ae3d(0x177))||_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x19e))||_0x58126e[_0x38ae3d(0x151)]('type')||_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x195))||_0x58126e[_0x38ae3d(0x151)]('fn')||_0x58126e[_0x38ae3d(0x151)](_0x38ae3d(0x194))||_0x58126e[_0x38ae3d(0x16f)]===0x0||_0x58126e['startsWith']('//')||_0x58126e[_0x38ae3d(0x151)]('/*')||_0x58126e[_0x38ae3d(0x151)]('*'))&&_0x2390df[_0x38ae3d(0x17d)](_0xea07b6),_0x559542>_0x259496&&(_0x4cbc8a+=_0x559542-_0x259496);else{const _0x34b05f=_0x4cbc8a+_0x559542-_0x259496;if(_0x34b05f<=0x0){const _0x5f2ef0=_0xea07b6['match'](/^\s*/)?.[0x0]||'';_0x2390df[_0x38ae3d(0x17d)](_0x5f2ef0+_0x38ae3d(0x155)),_0x2390df[_0x38ae3d(0x17d)](_0xea07b6),_0x4cbc8a=0x0;}else _0x4cbc8a=_0x34b05f;}}return _0x2390df[_0x38ae3d(0x187)]('\x0a');}if(_0x1d544e[_0x38ae3d(0x16f)]<=0x64)return _0x320d14;return[..._0x1d544e[_0x38ae3d(0x19c)](0x0,0x1e),'\x0a...\x20['+(_0x1d544e['length']-0x32)+_0x38ae3d(0x15c),..._0x1d544e[_0x38ae3d(0x19c)](-0x14)][_0x38ae3d(0x187)]('\x0a');}function runCcr(_0x4da20a,_0x436e7c){const _0x37de90=a0_0x12456a,_0x51ad18=_0x436e7c[_0x37de90(0x17f)](/\\/g,'/'),_0x1c5f6f=_0x37de90(0x17c)+crypto[_0x37de90(0x160)](_0x37de90(0x170))[_0x37de90(0x18b)](_0x4da20a)[_0x37de90(0x16a)](_0x37de90(0x196))[_0x37de90(0x17a)](0x0,0xa),_0x3a3c95=path['join'](os[_0x37de90(0x18f)](),_0x37de90(0x18a)),_0x516079=path[_0x37de90(0x187)](_0x3a3c95,_0x37de90(0x17e));!fs[_0x37de90(0x163)](_0x516079)&&fs[_0x37de90(0x15a)](_0x516079,{'recursive':!![]});fs[_0x37de90(0x182)](path[_0x37de90(0x187)](_0x516079,_0x1c5f6f+_0x37de90(0x18d)),_0x4da20a,_0x37de90(0x178));const _0x22ebee=skeletonize(_0x4da20a,_0x51ad18);return _0x37de90(0x198)+_0x1c5f6f+_0x37de90(0x158)+_0x1c5f6f+_0x37de90(0x188)+_0x22ebee;}
1
+ 'use strict';const a0_0x2e31a3=a0_0x16f2;(function(_0xa81249,_0x2e6707){const _0x57e8c3=a0_0x16f2,_0x532d47=_0xa81249();while(!![]){try{const _0x31b389=-parseInt(_0x57e8c3(0x13b))/0x1+-parseInt(_0x57e8c3(0x14f))/0x2+parseInt(_0x57e8c3(0x149))/0x3*(parseInt(_0x57e8c3(0x162))/0x4)+parseInt(_0x57e8c3(0x150))/0x5*(-parseInt(_0x57e8c3(0x14a))/0x6)+parseInt(_0x57e8c3(0x141))/0x7+parseInt(_0x57e8c3(0x134))/0x8+parseInt(_0x57e8c3(0x143))/0x9;if(_0x31b389===_0x2e6707)break;else _0x532d47['push'](_0x532d47['shift']());}catch(_0x3a2040){_0x532d47['push'](_0x532d47['shift']());}}}(a0_0x3b87,0x93d6e));var __createBinding=this&&this[a0_0x2e31a3(0x14e)]||(Object['create']?function(_0x48df5c,_0x40893d,_0x2f5b85,_0xfbb945){const _0x19abb7=a0_0x2e31a3;if(_0xfbb945===undefined)_0xfbb945=_0x2f5b85;var _0x1557fd=Object[_0x19abb7(0x14b)](_0x40893d,_0x2f5b85);(!_0x1557fd||(_0x19abb7(0x12e)in _0x1557fd?!_0x40893d[_0x19abb7(0x131)]:_0x1557fd['writable']||_0x1557fd['configurable']))&&(_0x1557fd={'enumerable':!![],'get':function(){return _0x40893d[_0x2f5b85];}}),Object[_0x19abb7(0x124)](_0x48df5c,_0xfbb945,_0x1557fd);}:function(_0x77dfb5,_0x5cf5d5,_0x2da7cb,_0xbbf5bf){if(_0xbbf5bf===undefined)_0xbbf5bf=_0x2da7cb;_0x77dfb5[_0xbbf5bf]=_0x5cf5d5[_0x2da7cb];}),__setModuleDefault=this&&this[a0_0x2e31a3(0x13c)]||(Object[a0_0x2e31a3(0x12d)]?function(_0x400f1d,_0x51c75d){const _0x239ef3=a0_0x2e31a3;Object[_0x239ef3(0x124)](_0x400f1d,_0x239ef3(0x158),{'enumerable':!![],'value':_0x51c75d});}:function(_0x17ef0e,_0x4144f5){_0x17ef0e['default']=_0x4144f5;}),__importStar=this&&this[a0_0x2e31a3(0x153)]||(function(){var _0x142f18=function(_0x1b596a){const _0x206f70=a0_0x16f2;return _0x142f18=Object[_0x206f70(0x139)]||function(_0x2d6108){const _0x1b9d0e=_0x206f70;var _0x2736d2=[];for(var _0x49ef31 in _0x2d6108)if(Object['prototype'][_0x1b9d0e(0x15b)][_0x1b9d0e(0x12b)](_0x2d6108,_0x49ef31))_0x2736d2[_0x2736d2[_0x1b9d0e(0x14c)]]=_0x49ef31;return _0x2736d2;},_0x142f18(_0x1b596a);};return function(_0x523926){const _0x5cac28=a0_0x16f2;if(_0x523926&&_0x523926[_0x5cac28(0x131)])return _0x523926;var _0x15e42e={};if(_0x523926!=null){for(var _0x245e56=_0x142f18(_0x523926),_0x213098=0x0;_0x213098<_0x245e56[_0x5cac28(0x14c)];_0x213098++)if(_0x245e56[_0x213098]!==_0x5cac28(0x158))__createBinding(_0x15e42e,_0x523926,_0x245e56[_0x213098]);}return __setModuleDefault(_0x15e42e,_0x523926),_0x15e42e;};}());function a0_0x3b87(){const _0x14678f=['.java','.trimprompt','.tsx','startsWith','.py','pop','crypto','defineProperty','existsSync','split','interface','createHash','function','hex','call','skeletonize','create','get','def\x20','class\x20','__esModule','writeFileSync','push','1302648gOJZfL','.go','import','var','update','getOwnPropertyNames','let','350617ucGqUC','__setModuleDefault','\x22\x22\x22','export','match','md5','4688432uDfVIn','join','10765062VyItWc','trim','\x20lines\x20collapsed\x20to\x20save\x20tokens]\x20...\x0a','substring','includes','runCcr','9RKOOqp','6141204zSrLzZ','getOwnPropertyDescriptor','length','slice','__createBinding','2107238rYlFWf','5lLGXnn','.rs','endsWith','__importStar','from\x20','path','replace','type','default','\x27\x27\x27','.\x20To\x20read\x20the\x20full\x20raw\x20content,\x20run\x20the\x20shell\x20command:\x20trim\x20retrieve\x20','hasOwnProperty','.jsx','const','#\x20...\x20[collapsed]','extname','digest','import\x20','1339460VYhVjb','utf8','.ts',']\x0a\x0a'];a0_0x3b87=function(){return _0x14678f;};return a0_0x3b87();}Object[a0_0x2e31a3(0x124)](exports,a0_0x2e31a3(0x131),{'value':!![]}),exports[a0_0x2e31a3(0x12c)]=skeletonize,exports[a0_0x2e31a3(0x148)]=runCcr;const crypto=__importStar(require(a0_0x2e31a3(0x123))),fs=__importStar(require('fs')),path=__importStar(require(a0_0x2e31a3(0x155))),os=__importStar(require('os'));function a0_0x16f2(_0x17c099,_0x13d157){_0x17c099=_0x17c099-0x11b;const _0x3b87c3=a0_0x3b87();let _0x16f265=_0x3b87c3[_0x17c099];return _0x16f265;}function skeletonize(_0x59a5e1,_0x102dfc){const _0x239999=a0_0x2e31a3,_0x2d07ab=path[_0x239999(0x15f)](_0x102dfc[_0x239999(0x126)]('\x20')[_0x239999(0x122)]()||'')['toLowerCase'](),_0x269a5b=_0x59a5e1['split']('\x0a'),_0xcbf814=[];if(_0x2d07ab===_0x239999(0x121)){let _0x20197d=![],_0x19f4e8='';for(let _0x814797=0x0;_0x814797<_0x269a5b[_0x239999(0x14c)];_0x814797++){const _0x5312ef=_0x269a5b[_0x814797],_0x1b558c=_0x5312ef['trim'](),_0x308faf=_0x5312ef[_0x239999(0x14c)]-_0x5312ef['trimStart']()[_0x239999(0x14c)];if(!_0x20197d&&(_0x1b558c['startsWith'](_0x239999(0x13d))||_0x1b558c[_0x239999(0x120)](_0x239999(0x159)))){_0x20197d=!![],_0x19f4e8=_0x1b558c[_0x239999(0x146)](0x0,0x3),_0xcbf814[_0x239999(0x133)](_0x5312ef);_0x1b558c[_0x239999(0x152)](_0x19f4e8)&&_0x1b558c[_0x239999(0x14c)]>0x3&&(_0x20197d=![]);continue;}if(_0x20197d){_0xcbf814[_0x239999(0x133)](_0x5312ef);_0x1b558c[_0x239999(0x152)](_0x19f4e8)&&(_0x20197d=![]);continue;}if(_0x1b558c[_0x239999(0x120)](_0x239999(0x161))||_0x1b558c[_0x239999(0x120)](_0x239999(0x154))||_0x1b558c[_0x239999(0x120)](_0x239999(0x130))||_0x1b558c[_0x239999(0x120)](_0x239999(0x12f))||_0x1b558c['startsWith']('@')||_0x1b558c[_0x239999(0x120)]('#')||_0x1b558c[_0x239999(0x14c)]===0x0)_0xcbf814[_0x239999(0x133)](_0x5312ef);else{const _0x776046=_0xcbf814[_0xcbf814[_0x239999(0x14c)]-0x1]||'';if(!_0x776046[_0x239999(0x144)]()[_0x239999(0x152)](_0x239999(0x15e))){const _0x22dcfa='\x20'['repeat'](_0x308faf);_0xcbf814[_0x239999(0x133)](_0x22dcfa+_0x239999(0x15e));}}}return _0xcbf814['join']('\x0a');}if(['.js',_0x239999(0x11b),_0x239999(0x15c),_0x239999(0x11f),_0x239999(0x135),_0x239999(0x151),_0x239999(0x11d),'.c','.cpp','.h'][_0x239999(0x147)](_0x2d07ab)){let _0x3d5010=0x0;for(let _0x3b0b0b=0x0;_0x3b0b0b<_0x269a5b[_0x239999(0x14c)];_0x3b0b0b++){const _0x3ae79f=_0x269a5b[_0x3b0b0b],_0x334148=_0x3ae79f['trim'](),_0x8c8f15=(_0x334148[_0x239999(0x13f)](/\{/g)||[])['length'],_0x3f15a5=(_0x334148[_0x239999(0x13f)](/\}/g)||[])[_0x239999(0x14c)];if(_0x3d5010===0x0)(_0x334148[_0x239999(0x120)](_0x239999(0x136))||_0x334148[_0x239999(0x120)](_0x239999(0x13e))||_0x334148['startsWith'](_0x239999(0x15d))||_0x334148[_0x239999(0x120)](_0x239999(0x13a))||_0x334148[_0x239999(0x120)](_0x239999(0x137))||_0x334148[_0x239999(0x120)]('class')||_0x334148[_0x239999(0x120)](_0x239999(0x129))||_0x334148[_0x239999(0x120)](_0x239999(0x127))||_0x334148[_0x239999(0x120)](_0x239999(0x157))||_0x334148[_0x239999(0x120)]('package')||_0x334148[_0x239999(0x120)]('fn')||_0x334148[_0x239999(0x120)]('pub')||_0x334148[_0x239999(0x14c)]===0x0||_0x334148[_0x239999(0x120)]('//')||_0x334148[_0x239999(0x120)]('/*')||_0x334148[_0x239999(0x120)]('*'))&&_0xcbf814[_0x239999(0x133)](_0x3ae79f),_0x8c8f15>_0x3f15a5&&(_0x3d5010+=_0x8c8f15-_0x3f15a5);else{const _0x239448=_0x3d5010+_0x8c8f15-_0x3f15a5;if(_0x239448<=0x0){const _0x1a537b=_0x3ae79f[_0x239999(0x13f)](/^\s*/)?.[0x0]||'';_0xcbf814[_0x239999(0x133)](_0x1a537b+'//\x20...\x20[collapsed]'),_0xcbf814[_0x239999(0x133)](_0x3ae79f),_0x3d5010=0x0;}else _0x3d5010=_0x239448;}}return _0xcbf814[_0x239999(0x142)]('\x0a');}if(_0x269a5b[_0x239999(0x14c)]<=0x64)return _0x59a5e1;return[..._0x269a5b[_0x239999(0x14d)](0x0,0x1e),'\x0a...\x20['+(_0x269a5b['length']-0x32)+_0x239999(0x145),..._0x269a5b[_0x239999(0x14d)](-0x14)][_0x239999(0x142)]('\x0a');}function runCcr(_0x5b7c18,_0x4bcc32){const _0x4184e7=a0_0x2e31a3,_0x1d7a37=_0x4bcc32[_0x4184e7(0x156)](/\\/g,'/'),_0x8682b2='tp_'+crypto[_0x4184e7(0x128)](_0x4184e7(0x140))[_0x4184e7(0x138)](_0x5b7c18)[_0x4184e7(0x160)](_0x4184e7(0x12a))[_0x4184e7(0x146)](0x0,0xa),_0x5d243d=path[_0x4184e7(0x142)](os['homedir'](),_0x4184e7(0x11e)),_0x3a0f1f=path[_0x4184e7(0x142)](_0x5d243d,'ccr');!fs[_0x4184e7(0x125)](_0x3a0f1f)&&fs['mkdirSync'](_0x3a0f1f,{'recursive':!![]});fs[_0x4184e7(0x132)](path[_0x4184e7(0x142)](_0x3a0f1f,_0x8682b2+'.txt'),_0x5b7c18,_0x4184e7(0x163));const _0x4d0400=skeletonize(_0x5b7c18,_0x1d7a37);return'[TrimPrompt:\x20CCR\x20Active.\x20Body\x20of\x20functions\x20collapsed\x20to\x20save\x20tokens.\x20Hash:\x20'+_0x8682b2+_0x4184e7(0x15a)+_0x8682b2+_0x4184e7(0x11c)+_0x4d0400;}
package/cli.js CHANGED
@@ -162,7 +162,7 @@ async function runProxy(args) {
162
162
  process.exit(result.exitCode);
163
163
  }
164
164
  const PKG_VERSION = (() => {
165
- const version = '1.0.42';
165
+ const version = '1.0.44';
166
166
  if (version !== '__VERSION__')
167
167
  return version;
168
168
  try {
package/dashboard.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x413d4c=a0_0x4b54;(function(_0x2442cc,_0x2a56ff){const _0x47aeac=a0_0x4b54,_0x418e01=_0x2442cc();while(!![]){try{const _0x51def3=-parseInt(_0x47aeac(0x174))/0x1*(-parseInt(_0x47aeac(0x12c))/0x2)+parseInt(_0x47aeac(0x148))/0x3*(-parseInt(_0x47aeac(0x147))/0x4)+parseInt(_0x47aeac(0x126))/0x5*(-parseInt(_0x47aeac(0x112))/0x6)+-parseInt(_0x47aeac(0x16b))/0x7+-parseInt(_0x47aeac(0x13c))/0x8*(parseInt(_0x47aeac(0x15e))/0x9)+parseInt(_0x47aeac(0x11f))/0xa+parseInt(_0x47aeac(0x162))/0xb;if(_0x51def3===_0x2a56ff)break;else _0x418e01['push'](_0x418e01['shift']());}catch(_0x2bf17a){_0x418e01['push'](_0x418e01['shift']());}}}(a0_0xc155,0xa0cf6));var __createBinding=this&&this['__createBinding']||(Object[a0_0x413d4c(0x11b)]?function(_0x498ec9,_0x7c80cd,_0x239e02,_0xcd4bc7){const _0x397f53=a0_0x413d4c;if(_0xcd4bc7===undefined)_0xcd4bc7=_0x239e02;var _0xec05a1=Object['getOwnPropertyDescriptor'](_0x7c80cd,_0x239e02);(!_0xec05a1||('get'in _0xec05a1?!_0x7c80cd[_0x397f53(0x11c)]:_0xec05a1[_0x397f53(0x17c)]||_0xec05a1[_0x397f53(0x151)]))&&(_0xec05a1={'enumerable':!![],'get':function(){return _0x7c80cd[_0x239e02];}}),Object[_0x397f53(0x138)](_0x498ec9,_0xcd4bc7,_0xec05a1);}:function(_0x1d6922,_0x6d6fd9,_0x2bc8e5,_0x21337a){if(_0x21337a===undefined)_0x21337a=_0x2bc8e5;_0x1d6922[_0x21337a]=_0x6d6fd9[_0x2bc8e5];}),__setModuleDefault=this&&this[a0_0x413d4c(0x11a)]||(Object[a0_0x413d4c(0x11b)]?function(_0x24592a,_0x5d969f){const _0x2cfc1e=a0_0x413d4c;Object['defineProperty'](_0x24592a,_0x2cfc1e(0x161),{'enumerable':!![],'value':_0x5d969f});}:function(_0x4b01cd,_0x4a3cf5){_0x4b01cd['default']=_0x4a3cf5;}),__importStar=this&&this[a0_0x413d4c(0x12e)]||(function(){var _0x68780c=function(_0x34a3a2){return _0x68780c=Object['getOwnPropertyNames']||function(_0x309f39){const _0x4fd819=a0_0x4b54;var _0x2682f4=[];for(var _0x5a2f85 in _0x309f39)if(Object[_0x4fd819(0x120)][_0x4fd819(0x144)]['call'](_0x309f39,_0x5a2f85))_0x2682f4[_0x2682f4[_0x4fd819(0x175)]]=_0x5a2f85;return _0x2682f4;},_0x68780c(_0x34a3a2);};return function(_0x274b59){const _0x30c974=a0_0x4b54;if(_0x274b59&&_0x274b59['__esModule'])return _0x274b59;var _0x277407={};if(_0x274b59!=null){for(var _0x471a7b=_0x68780c(_0x274b59),_0x3127f4=0x0;_0x3127f4<_0x471a7b[_0x30c974(0x175)];_0x3127f4++)if(_0x471a7b[_0x3127f4]!=='default')__createBinding(_0x277407,_0x274b59,_0x471a7b[_0x3127f4]);}return __setModuleDefault(_0x277407,_0x274b59),_0x277407;};}()),__importDefault=this&&this[a0_0x413d4c(0x136)]||function(_0x96626e){const _0x36f502=a0_0x413d4c;return _0x96626e&&_0x96626e[_0x36f502(0x11c)]?_0x96626e:{'default':_0x96626e};};Object[a0_0x413d4c(0x138)](exports,'__esModule',{'value':!![]}),exports[a0_0x413d4c(0x170)]=startDashboard;const express_1=__importDefault(require('express')),path=__importStar(require(a0_0x413d4c(0x16e))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x413d4c(0x179))),tracker_1=require('./tracker'),app=(0x0,express_1['default'])();app['use'](express_1[a0_0x413d4c(0x161)][a0_0x413d4c(0x153)]());const baseDir=path[a0_0x413d4c(0x16a)](os['homedir'](),'.trimprompt'),logsDir=path[a0_0x413d4c(0x16a)](baseDir,'logs');let configPayloadCache=null;const CONFIG_CACHE_TTL_MS=0x2710;function a0_0xc155(){const _0x5871e7=['/api/stats/inspect/:id','../src/index.html','mkdirSync','tracker','reason','join','8660078LUfdYe','/api/stats/summary','No\x20active\x20session\x20file\x20found','path','--headless','startDashboard','query','then','darwin','4370RaEMml','length','post','existsSync','http://localhost:','open','body','readFileSync','writable','cortex','command','48YDNxJI','status','xdg-open\x20\x22','params','conv:','features_enabled','compressedTokens','listen','__setModuleDefault','create','__esModule','ignore','fullPath','8567180lMWwPo','prototype','message','get','codex','auto','activeSavedTokens','47865tcVGRz','watcher','timestamp','No\x20compressible\x20content\x20found\x20in\x20this\x20session','setConfig','fileName','392LokzJC','/api/agent/compact','__importStar','./file-watcher','open\x20\x22','.raw.txt','gemini','opencode','explorer\x20\x22','EADDRINUSE','__importDefault','SIGINT','defineProperty','rawTokens','sendFile','Missing\x20key','4699216itnTEN','exit','savedTokens','/api/config/open-dir','/api/stats/history','.comp.txt','getLogs','getStatsSummary','hasOwnProperty','child_process','log','8mkUFtu','157203tzRtYu','find','cli.js','platform','../src/favicon.png','/api/config/toggle','getConfig','/api/config/features','includes','configurable','catch','json','cursor','/api/config','aider','error','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','resolve','payload','compactPath','execPath','9WvRnoX','now','Missing\x20agentKey','default','10465202bVyYwa','index.html','Raw\x20output\x20log\x20file\x20not\x20found.'];a0_0xc155=function(){return _0x5871e7;};return a0_0xc155();}function invalidateConfigCache(){configPayloadCache=null;}function a0_0x4b54(_0x4be6f0,_0x54a070){_0x4be6f0=_0x4be6f0-0x110;const _0xc15501=a0_0xc155();let _0x4b5497=_0xc15501[_0x4be6f0];return _0x4b5497;}app[a0_0x413d4c(0x122)]('/',(_0x2b9f21,_0x5113a6)=>{const _0x4e84e3=a0_0x413d4c,_0x230b10=path[_0x4e84e3(0x16a)](__dirname,_0x4e84e3(0x163));fs[_0x4e84e3(0x177)](_0x230b10)?_0x5113a6[_0x4e84e3(0x13a)](_0x230b10):_0x5113a6[_0x4e84e3(0x13a)](path[_0x4e84e3(0x16a)](__dirname,_0x4e84e3(0x166)));}),app[a0_0x413d4c(0x122)]('/favicon.png',(_0x396d56,_0x39ee48)=>{const _0x5f26fe=a0_0x413d4c,_0x54f735=path['join'](__dirname,'favicon.png');fs['existsSync'](_0x54f735)?_0x39ee48[_0x5f26fe(0x13a)](_0x54f735):_0x39ee48[_0x5f26fe(0x13a)](path[_0x5f26fe(0x16a)](__dirname,_0x5f26fe(0x14c)));}),app[a0_0x413d4c(0x122)](a0_0x413d4c(0x16c),(_0x52720b,_0x3f9f88)=>{const _0x386a32=a0_0x413d4c,_0x2c436b=_0x52720b[_0x386a32(0x171)]['model']||_0x386a32(0x124),_0x16161f=tracker_1[_0x386a32(0x168)][_0x386a32(0x143)](_0x2c436b);_0x3f9f88['json'](_0x16161f);}),app[a0_0x413d4c(0x122)](a0_0x413d4c(0x140),(_0x329e09,_0x539e23)=>{const _0x428727=a0_0x413d4c,_0x11719d=tracker_1[_0x428727(0x168)][_0x428727(0x142)]();_0x539e23[_0x428727(0x153)](_0x11719d['length']>0x1f4?_0x11719d['slice'](-0x1f4):_0x11719d);}),app[a0_0x413d4c(0x122)](a0_0x413d4c(0x165),(_0x264b81,_0x1afa09)=>{const _0x248a7d=a0_0x413d4c,_0x15cd5f=_0x264b81[_0x248a7d(0x115)]['id'],_0x51fa36=path[_0x248a7d(0x16a)](logsDir,_0x15cd5f+_0x248a7d(0x131)),_0x2c8750=path['join'](logsDir,_0x15cd5f+_0x248a7d(0x141));let _0x4d28a6=_0x248a7d(0x164),_0x17a0f6='Compressed\x20output\x20log\x20file\x20not\x20found.';try{fs[_0x248a7d(0x177)](_0x51fa36)&&(_0x4d28a6=fs[_0x248a7d(0x17b)](_0x51fa36,'utf8')),fs[_0x248a7d(0x177)](_0x2c8750)&&(_0x17a0f6=fs['readFileSync'](_0x2c8750,'utf8'));}catch(_0x4f2cf3){}_0x1afa09[_0x248a7d(0x153)]({'id':_0x15cd5f,'raw':_0x4d28a6,'compressed':_0x17a0f6});}),app[a0_0x413d4c(0x122)](a0_0x413d4c(0x14f),(_0x4e7550,_0xd7982e)=>{const _0xc28192=a0_0x413d4c,_0x1edc02=tracker_1[_0xc28192(0x168)][_0xc28192(0x14e)]();_0xd7982e[_0xc28192(0x153)](_0x1edc02[_0xc28192(0x117)]||{});}),app[a0_0x413d4c(0x176)](a0_0x413d4c(0x14f),(_0x4f55f4,_0x19eb1c)=>{const _0x1eb556=a0_0x413d4c,_0x3e67a6=_0x4f55f4[_0x1eb556(0x17a)];tracker_1[_0x1eb556(0x168)][_0x1eb556(0x12a)](_0x1eb556(0x117),_0x3e67a6),invalidateConfigCache(),_0x19eb1c[_0x1eb556(0x153)]({'ok':!![]});}),app[a0_0x413d4c(0x176)](a0_0x413d4c(0x12d),async(_0xd227f1,_0x1ddca9)=>{const _0x1de704=a0_0x413d4c;try{const {getLatestSessionFile:_0x3719ee,compactSessionCopy:_0x334667}=await Promise['resolve']()[_0x1de704(0x172)](()=>__importStar(require(_0x1de704(0x12f)))),{agentKey:_0x57ac66}=_0xd227f1[_0x1de704(0x17a)]||{},_0x3c217b=_0x57ac66||'claude',_0x2a8f9f=_0x3719ee(_0x3c217b);if(_0x2a8f9f&&_0x2a8f9f[_0x1de704(0x11e)]&&fs['existsSync'](_0x2a8f9f[_0x1de704(0x11e)])){const _0x1a5089=_0x334667(_0x2a8f9f['fullPath'],_0x3c217b);_0x1a5089['ok']&&(_0x1a5089[_0x1de704(0x13e)]||0x0)>0x0?_0x1ddca9[_0x1de704(0x153)]({'ok':!![],'fileName':_0x2a8f9f[_0x1de704(0x12b)],'tokensSaved':_0x1a5089['savedTokens'],'rawTokens':_0x1a5089[_0x1de704(0x139)],'compressedTokens':_0x1a5089[_0x1de704(0x118)],'reductionPct':_0x1a5089['reductionPct'],'compactPath':_0x1a5089[_0x1de704(0x15c)]}):_0x1ddca9[_0x1de704(0x153)]({'ok':![],'message':_0x1a5089[_0x1de704(0x169)]||_0x1de704(0x129)});}else _0x1ddca9[_0x1de704(0x153)]({'ok':![],'message':_0x1de704(0x16d)});}catch(_0x41b861){_0x1ddca9['status'](0x1f4)['json']({'ok':![],'error':_0x41b861['message']});}}),app[a0_0x413d4c(0x122)](a0_0x413d4c(0x155),async(_0x1d3b62,_0x21c0cc)=>{const _0x376046=a0_0x413d4c;if(configPayloadCache&&Date[_0x376046(0x15f)]()-configPayloadCache['at']<CONFIG_CACHE_TTL_MS)return _0x21c0cc[_0x376046(0x153)](configPayloadCache[_0x376046(0x15b)]);const {loadConfig:_0x5240be,getAgentStoragePaths:_0x52eb85,getLatestSessionFile:_0x56e09f,loadSessionsState:_0x1d0b71}=await Promise[_0x376046(0x15a)]()[_0x376046(0x172)](()=>__importStar(require(_0x376046(0x12f)))),_0x3ee2c9=_0x5240be(),_0xa78385=['claude',_0x376046(0x132),_0x376046(0x123),_0x376046(0x154),_0x376046(0x156),'copilot','openclaw',_0x376046(0x133),_0x376046(0x110)],_0x1e15ef={},_0x57d274={},_0x5c5f7d={},_0x224ab7=_0x1d0b71(),_0x2fe6ff=tracker_1[_0x376046(0x168)]['getLogs']()||[];for(const _0x502bd3 of _0xa78385){_0x1e15ef[_0x502bd3]=_0x52eb85(_0x502bd3);const _0x252031=_0x56e09f(_0x502bd3);if(_0x252031&&_0x252031['fullPath']&&_0x224ab7[_0x252031[_0x376046(0x11e)]])_0x252031[_0x376046(0x125)]=_0x224ab7[_0x252031[_0x376046(0x11e)]][_0x376046(0x125)]||0x0;else{if(_0x252031)_0x252031[_0x376046(0x125)]=0x0;}_0x5c5f7d[_0x502bd3]=_0x252031;const _0xc85471=_0x2fe6ff['filter'](_0x29b4c8=>_0x29b4c8[_0x376046(0x111)]&&_0x29b4c8[_0x376046(0x111)][_0x376046(0x150)](_0x376046(0x116)+_0x502bd3));_0xc85471[_0x376046(0x175)]>0x0?_0x57d274[_0x502bd3]=_0xc85471[_0xc85471[_0x376046(0x175)]-0x1][_0x376046(0x128)]:_0x57d274[_0x502bd3]=_0x252031?_0x252031['lastModified']:null;}const _0x31f026={..._0x3ee2c9,'resolvedPaths':_0x1e15ef,'lastActiveTimestamps':_0x57d274,'latestSessions':_0x5c5f7d};configPayloadCache={'at':Date[_0x376046(0x15f)](),'payload':_0x31f026},_0x21c0cc[_0x376046(0x153)](_0x31f026);}),app['post'](a0_0x413d4c(0x13f),async(_0x3d189b,_0x472d21)=>{const _0x4a4716=a0_0x413d4c,{getAgentStoragePaths:_0x62b97d}=await Promise[_0x4a4716(0x15a)]()[_0x4a4716(0x172)](()=>__importStar(require(_0x4a4716(0x12f)))),{agentKey:_0x254326}=_0x3d189b[_0x4a4716(0x17a)]||{};if(!_0x254326)return _0x472d21[_0x4a4716(0x113)](0x190)['json']({'error':'Missing\x20agentKey'});const _0x2800d3=_0x62b97d(_0x254326),_0x5dbb1e=_0x2800d3[_0x4a4716(0x149)](_0xde03f3=>fs[_0x4a4716(0x177)](_0xde03f3))||_0x2800d3[0x0];if(_0x5dbb1e){if(!fs[_0x4a4716(0x177)](_0x5dbb1e))try{fs[_0x4a4716(0x167)](_0x5dbb1e,{'recursive':!![]});}catch{}const {exec:_0x460944}=await Promise[_0x4a4716(0x15a)]()['then'](()=>__importStar(require(_0x4a4716(0x145)))),_0x33fb85=process[_0x4a4716(0x14b)]==='win32'?_0x4a4716(0x134)+_0x5dbb1e+'\x22':process['platform']===_0x4a4716(0x173)?_0x4a4716(0x130)+_0x5dbb1e+'\x22':_0x4a4716(0x114)+_0x5dbb1e+'\x22';return _0x460944(_0x33fb85),_0x472d21['json']({'success':!![],'openedPath':_0x5dbb1e});}_0x472d21[_0x4a4716(0x113)](0x194)[_0x4a4716(0x153)]({'error':'Directory\x20not\x20found'});}),app[a0_0x413d4c(0x176)](a0_0x413d4c(0x14d),async(_0x15ce74,_0x2f7f4e)=>{const _0x4cea19=a0_0x413d4c,{saveConfig:_0x416a49}=await Promise[_0x4cea19(0x15a)]()[_0x4cea19(0x172)](()=>__importStar(require(_0x4cea19(0x12f)))),{key:_0x17f000,value:_0x316b16}=_0x15ce74['body']||{};if(_0x17f000){const _0x49469a=_0x416a49({'conversation_toggles':{[_0x17f000]:_0x316b16}});return invalidateConfigCache(),_0x2f7f4e[_0x4cea19(0x153)](_0x49469a);}_0x2f7f4e[_0x4cea19(0x113)](0x190)['json']({'error':_0x4cea19(0x13b)});}),app[a0_0x413d4c(0x176)]('/api/config/custom-path',async(_0x47ef5f,_0x33541e)=>{const _0x6bdc60=a0_0x413d4c,{saveConfig:_0x5edca0}=await Promise[_0x6bdc60(0x15a)]()[_0x6bdc60(0x172)](()=>__importStar(require('./file-watcher'))),{agentKey:_0x595804,path:_0x14a69b}=_0x47ef5f[_0x6bdc60(0x17a)]||{};if(_0x595804){const _0x4b6b34=_0x5edca0({'custom_storage_paths':{[_0x595804]:_0x14a69b||null}});return invalidateConfigCache(),_0x33541e['json'](_0x4b6b34);}_0x33541e[_0x6bdc60(0x113)](0x190)[_0x6bdc60(0x153)]({'error':_0x6bdc60(0x160)});});function startDashboard(_0x3d94cf=0xfa0){const _0x20e661=a0_0x413d4c;let _0x454ab8=_0x3d94cf;const _0x30025d=process['argv'][_0x20e661(0x150)](_0x20e661(0x16f))||process.env.TRIMPROMPT_HEADLESS==='1',_0x551496=app[_0x20e661(0x119)](_0x454ab8,()=>{const _0x4e21a0=_0x20e661,_0x566711=_0x4e21a0(0x178)+_0x454ab8;!_0x30025d&&(console[_0x4e21a0(0x146)](_0x4e21a0(0x158)+_0x566711),console[_0x4e21a0(0x146)](_0x4e21a0(0x159)));try{const {spawn:_0x456b86}=require(_0x4e21a0(0x145)),_0x5be189=_0x456b86(process[_0x4e21a0(0x15d)],[path[_0x4e21a0(0x16a)](__dirname,_0x4e21a0(0x14a)),_0x4e21a0(0x127),'start'],{'stdio':_0x4e21a0(0x11d),'windowsHide':!![]}),_0x985a2c=()=>{try{_0x5be189['kill']();}catch{}};process['on'](_0x4e21a0(0x13d),_0x985a2c),process['on'](_0x4e21a0(0x137),()=>{const _0x5d3bf4=_0x4e21a0;_0x985a2c(),process[_0x5d3bf4(0x13d)](0x0);}),process['on']('SIGTERM',()=>{_0x985a2c(),process['exit'](0x0);});}catch{}!_0x30025d&&process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1['default'])(_0x566711)[_0x4e21a0(0x152)](()=>{});});_0x551496['on'](_0x20e661(0x157),_0x1892a3=>{const _0x35a4a8=_0x20e661;_0x1892a3['code']===_0x35a4a8(0x135)?startDashboard(_0x454ab8+0x1):console[_0x35a4a8(0x157)]('[TrimPrompt]\x20Dashboard\x20error:\x20'+_0x1892a3[_0x35a4a8(0x121)]);});}
1
+ 'use strict';const a0_0x55833c=a0_0xfdb5;(function(_0x2ed84b,_0xdd8856){const _0x231e78=a0_0xfdb5,_0x2feb14=_0x2ed84b();while(!![]){try{const _0x461be5=-parseInt(_0x231e78(0x135))/0x1*(-parseInt(_0x231e78(0x118))/0x2)+-parseInt(_0x231e78(0x15d))/0x3*(-parseInt(_0x231e78(0x156))/0x4)+-parseInt(_0x231e78(0x181))/0x5+parseInt(_0x231e78(0x141))/0x6*(-parseInt(_0x231e78(0x134))/0x7)+parseInt(_0x231e78(0x120))/0x8*(parseInt(_0x231e78(0x188))/0x9)+parseInt(_0x231e78(0x18a))/0xa*(parseInt(_0x231e78(0x161))/0xb)+-parseInt(_0x231e78(0x167))/0xc*(parseInt(_0x231e78(0x17e))/0xd);if(_0x461be5===_0xdd8856)break;else _0x2feb14['push'](_0x2feb14['shift']());}catch(_0x824590){_0x2feb14['push'](_0x2feb14['shift']());}}}(a0_0x4eb8,0x2ccfb));function a0_0xfdb5(_0x55d506,_0x5f49c1){_0x55d506=_0x55d506-0x118;const _0x4eb830=a0_0x4eb8();let _0xfdb5d5=_0x4eb830[_0x55d506];return _0xfdb5d5;}function a0_0x4eb8(){const _0x3eead0=['fileName','aider','defineProperty','claude','hasOwnProperty','getConfig','37870DQxVva','1TJTBlm','join','Missing\x20agentKey','lastModified','length','copilot','json','./file-watcher','__createBinding','readFileSync','utf8','logs','330cTzfvE','error','No\x20compressible\x20content\x20found\x20in\x20this\x20session','rawTokens','Directory\x20not\x20found','cli.js','existsSync','cortex','command','path','catch','conv:','watcher','getLogs','/api/config/features','opencode','cursor','/api/stats/history','execPath','call','activeSavedTokens','144dlXHbl','getOwnPropertyNames','getStatsSummary','includes','homedir','explorer\x20\x22','configurable','7191VHxZzL','exit','filter','xdg-open\x20\x22','40667YbmMGf','default','[TrimPrompt]\x20Dashboard\x20error:\x20','ignore','resolve','./tracker','36zOvkTa','child_process','open','/api/stats/summary','getOwnPropertyDescriptor','gemini','.comp.txt','message','/api/agent/compact','timestamp','writable','savedTokens','../src/favicon.png','use','index.html','win32','tracker','compressedTokens','favicon.png','prototype','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','__esModule','slice','120107sFUKXo','compactPath','http://localhost:','72690gyBwFB','now','Compressed\x20output\x20log\x20file\x20not\x20found.','open\x20\x22','__setModuleDefault','EADDRINUSE','listen','10215lkACou','fullPath','150tPkQjy','auto','then','/favicon.png','openclaw','params','SIGTERM','175280JRkBoU','argv','mkdirSync','get','No\x20active\x20session\x20file\x20found','post','platform','.trimprompt','2072lOmhco','darwin','status','features_enabled','reductionPct','/api/config/open-dir','sendFile','body','--headless','kill','log','payload','create','code'];a0_0x4eb8=function(){return _0x3eead0;};return a0_0x4eb8();}var __createBinding=this&&this[a0_0x55833c(0x13d)]||(Object[a0_0x55833c(0x12c)]?function(_0x2fdc54,_0xa8162b,_0x10516b,_0x5d9ca7){const _0x250655=a0_0x55833c;if(_0x5d9ca7===undefined)_0x5d9ca7=_0x10516b;var _0x1773ac=Object[_0x250655(0x16b)](_0xa8162b,_0x10516b);(!_0x1773ac||(_0x250655(0x11b)in _0x1773ac?!_0xa8162b[_0x250655(0x17c)]:_0x1773ac[_0x250655(0x171)]||_0x1773ac[_0x250655(0x15c)]))&&(_0x1773ac={'enumerable':!![],'get':function(){return _0xa8162b[_0x10516b];}}),Object['defineProperty'](_0x2fdc54,_0x5d9ca7,_0x1773ac);}:function(_0xec3ac7,_0xae76de,_0x3a3c3f,_0x160ea1){if(_0x160ea1===undefined)_0x160ea1=_0x3a3c3f;_0xec3ac7[_0x160ea1]=_0xae76de[_0x3a3c3f];}),__setModuleDefault=this&&this[a0_0x55833c(0x185)]||(Object['create']?function(_0x17e692,_0x3bda37){const _0x5470bc=a0_0x55833c;Object[_0x5470bc(0x130)](_0x17e692,_0x5470bc(0x162),{'enumerable':!![],'value':_0x3bda37});}:function(_0x482ccd,_0x395de7){_0x482ccd['default']=_0x395de7;}),__importStar=this&&this['__importStar']||(function(){var _0x2d3933=function(_0x2fff2d){const _0x3853bd=a0_0xfdb5;return _0x2d3933=Object[_0x3853bd(0x157)]||function(_0x57412c){const _0x5b810e=_0x3853bd;var _0x3cad5d=[];for(var _0x3a030a in _0x57412c)if(Object[_0x5b810e(0x17a)][_0x5b810e(0x132)][_0x5b810e(0x154)](_0x57412c,_0x3a030a))_0x3cad5d[_0x3cad5d[_0x5b810e(0x139)]]=_0x3a030a;return _0x3cad5d;},_0x2d3933(_0x2fff2d);};return function(_0x425538){const _0x4e162b=a0_0xfdb5;if(_0x425538&&_0x425538['__esModule'])return _0x425538;var _0x2684a2={};if(_0x425538!=null){for(var _0x3ebf94=_0x2d3933(_0x425538),_0xec4545=0x0;_0xec4545<_0x3ebf94[_0x4e162b(0x139)];_0xec4545++)if(_0x3ebf94[_0xec4545]!==_0x4e162b(0x162))__createBinding(_0x2684a2,_0x425538,_0x3ebf94[_0xec4545]);}return __setModuleDefault(_0x2684a2,_0x425538),_0x2684a2;};}()),__importDefault=this&&this['__importDefault']||function(_0x290e9a){const _0x145cd4=a0_0x55833c;return _0x290e9a&&_0x290e9a[_0x145cd4(0x17c)]?_0x290e9a:{'default':_0x290e9a};};Object[a0_0x55833c(0x130)](exports,a0_0x55833c(0x17c),{'value':!![]}),exports['startDashboard']=startDashboard;const express_1=__importDefault(require('express')),path=__importStar(require(a0_0x55833c(0x14a))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x55833c(0x169))),tracker_1=require(a0_0x55833c(0x166)),app=(0x0,express_1['default'])();app[a0_0x55833c(0x174)](express_1['default'][a0_0x55833c(0x13b)]());const baseDir=path[a0_0x55833c(0x136)](os[a0_0x55833c(0x15a)](),a0_0x55833c(0x11f)),logsDir=path[a0_0x55833c(0x136)](baseDir,a0_0x55833c(0x140));let configPayloadCache=null;const CONFIG_CACHE_TTL_MS=0x2710;function invalidateConfigCache(){configPayloadCache=null;}app[a0_0x55833c(0x11b)]('/',(_0x296b2a,_0x2e24ad)=>{const _0x241dc3=a0_0x55833c,_0x51802e=path['join'](__dirname,_0x241dc3(0x175));fs[_0x241dc3(0x147)](_0x51802e)?_0x2e24ad[_0x241dc3(0x126)](_0x51802e):_0x2e24ad[_0x241dc3(0x126)](path['join'](__dirname,'../src/index.html'));}),app['get'](a0_0x55833c(0x18d),(_0x2ff71f,_0x4be61e)=>{const _0x29e5eb=a0_0x55833c,_0x363c60=path[_0x29e5eb(0x136)](__dirname,_0x29e5eb(0x179));fs[_0x29e5eb(0x147)](_0x363c60)?_0x4be61e['sendFile'](_0x363c60):_0x4be61e[_0x29e5eb(0x126)](path[_0x29e5eb(0x136)](__dirname,_0x29e5eb(0x173)));}),app[a0_0x55833c(0x11b)](a0_0x55833c(0x16a),(_0x2ca565,_0x4fce1f)=>{const _0x50045b=a0_0x55833c,_0x335a87=_0x2ca565['query']['model']||_0x50045b(0x18b),_0x4ad24c=tracker_1[_0x50045b(0x177)][_0x50045b(0x158)](_0x335a87);_0x4fce1f[_0x50045b(0x13b)](_0x4ad24c);}),app['get'](a0_0x55833c(0x152),(_0xb4a280,_0x431709)=>{const _0xa35c78=a0_0x55833c,_0x200e81=tracker_1['tracker'][_0xa35c78(0x14e)]();_0x431709[_0xa35c78(0x13b)](_0x200e81[_0xa35c78(0x139)]>0x1f4?_0x200e81[_0xa35c78(0x17d)](-0x1f4):_0x200e81);}),app[a0_0x55833c(0x11b)]('/api/stats/inspect/:id',(_0x50b664,_0x5450f8)=>{const _0x4ef5d1=a0_0x55833c,_0x581407=_0x50b664[_0x4ef5d1(0x18f)]['id'],_0x1ab6b4=path[_0x4ef5d1(0x136)](logsDir,_0x581407+'.raw.txt'),_0xd9de16=path['join'](logsDir,_0x581407+_0x4ef5d1(0x16d));let _0x5ef6b2='Raw\x20output\x20log\x20file\x20not\x20found.',_0x188256=_0x4ef5d1(0x183);try{fs['existsSync'](_0x1ab6b4)&&(_0x5ef6b2=fs[_0x4ef5d1(0x13e)](_0x1ab6b4,_0x4ef5d1(0x13f))),fs[_0x4ef5d1(0x147)](_0xd9de16)&&(_0x188256=fs[_0x4ef5d1(0x13e)](_0xd9de16,'utf8'));}catch(_0x589cdd){}_0x5450f8['json']({'id':_0x581407,'raw':_0x5ef6b2,'compressed':_0x188256});}),app[a0_0x55833c(0x11b)]('/api/config/features',(_0x16af58,_0x4d97c2)=>{const _0x135c70=a0_0x55833c,_0x53a567=tracker_1[_0x135c70(0x177)][_0x135c70(0x133)]();_0x4d97c2['json'](_0x53a567[_0x135c70(0x123)]||{});}),app[a0_0x55833c(0x11d)](a0_0x55833c(0x14f),(_0x2f7276,_0x3ec1e3)=>{const _0x36184a=a0_0x55833c,_0x440701=_0x2f7276['body'];tracker_1['tracker']['setConfig'](_0x36184a(0x123),_0x440701),invalidateConfigCache(),_0x3ec1e3[_0x36184a(0x13b)]({'ok':!![]});}),app[a0_0x55833c(0x11d)](a0_0x55833c(0x16f),async(_0x1b6331,_0x58e57c)=>{const _0x297fe2=a0_0x55833c;try{const {getLatestSessionFile:_0xe90f60,compactSessionCopy:_0x3973b6}=await Promise[_0x297fe2(0x165)]()['then'](()=>__importStar(require(_0x297fe2(0x13c)))),{agentKey:_0x23f8f7}=_0x1b6331[_0x297fe2(0x127)]||{},_0x4e9009=_0x23f8f7||_0x297fe2(0x131),_0x4017e5=_0xe90f60(_0x4e9009);if(_0x4017e5&&_0x4017e5[_0x297fe2(0x189)]&&fs[_0x297fe2(0x147)](_0x4017e5[_0x297fe2(0x189)])){const _0xa48379=_0x3973b6(_0x4017e5[_0x297fe2(0x189)],_0x4e9009);_0xa48379['ok']&&(_0xa48379[_0x297fe2(0x172)]||0x0)>0x0?_0x58e57c['json']({'ok':!![],'fileName':_0x4017e5[_0x297fe2(0x12e)],'tokensSaved':_0xa48379[_0x297fe2(0x172)],'rawTokens':_0xa48379[_0x297fe2(0x144)],'compressedTokens':_0xa48379[_0x297fe2(0x178)],'reductionPct':_0xa48379[_0x297fe2(0x124)],'compactPath':_0xa48379[_0x297fe2(0x17f)]}):_0x58e57c['json']({'ok':![],'message':_0xa48379['reason']||_0x297fe2(0x143)});}else _0x58e57c['json']({'ok':![],'message':_0x297fe2(0x11c)});}catch(_0x1fc59b){_0x58e57c[_0x297fe2(0x122)](0x1f4)[_0x297fe2(0x13b)]({'ok':![],'error':_0x1fc59b[_0x297fe2(0x16e)]});}}),app[a0_0x55833c(0x11b)]('/api/config',async(_0x43db45,_0x9cf2a2)=>{const _0xc6798=a0_0x55833c;if(configPayloadCache&&Date[_0xc6798(0x182)]()-configPayloadCache['at']<CONFIG_CACHE_TTL_MS)return _0x9cf2a2['json'](configPayloadCache[_0xc6798(0x12b)]);const {loadConfig:_0x254a01,getAgentStoragePaths:_0x3839ef,getLatestSessionFile:_0x1ff27d,loadSessionsState:_0x380b9c}=await Promise[_0xc6798(0x165)]()[_0xc6798(0x18c)](()=>__importStar(require(_0xc6798(0x13c)))),_0x6321d5=_0x254a01(),_0x2c0bb9=[_0xc6798(0x131),_0xc6798(0x16c),'codex',_0xc6798(0x151),_0xc6798(0x12f),_0xc6798(0x13a),_0xc6798(0x18e),_0xc6798(0x150),_0xc6798(0x148)],_0xbc4c62={},_0x1cb9e3={},_0x238a9d={},_0x1e9c44=_0x380b9c(),_0x4d0f4b=tracker_1[_0xc6798(0x177)][_0xc6798(0x14e)]()||[];for(const _0xec1755 of _0x2c0bb9){_0xbc4c62[_0xec1755]=_0x3839ef(_0xec1755);const _0x57d702=_0x1ff27d(_0xec1755);if(_0x57d702&&_0x57d702[_0xc6798(0x189)]&&_0x1e9c44[_0x57d702[_0xc6798(0x189)]])_0x57d702[_0xc6798(0x155)]=_0x1e9c44[_0x57d702['fullPath']][_0xc6798(0x155)]||0x0;else{if(_0x57d702)_0x57d702['activeSavedTokens']=0x0;}_0x238a9d[_0xec1755]=_0x57d702;const _0x2e38ba=_0x4d0f4b[_0xc6798(0x15f)](_0x3089bc=>_0x3089bc[_0xc6798(0x149)]&&_0x3089bc[_0xc6798(0x149)][_0xc6798(0x159)](_0xc6798(0x14c)+_0xec1755));_0x2e38ba[_0xc6798(0x139)]>0x0?_0x1cb9e3[_0xec1755]=_0x2e38ba[_0x2e38ba[_0xc6798(0x139)]-0x1][_0xc6798(0x170)]:_0x1cb9e3[_0xec1755]=_0x57d702?_0x57d702[_0xc6798(0x138)]:null;}const _0x3a2e45={..._0x6321d5,'resolvedPaths':_0xbc4c62,'lastActiveTimestamps':_0x1cb9e3,'latestSessions':_0x238a9d};configPayloadCache={'at':Date[_0xc6798(0x182)](),'payload':_0x3a2e45},_0x9cf2a2['json'](_0x3a2e45);}),app[a0_0x55833c(0x11d)](a0_0x55833c(0x125),async(_0x29bc74,_0x3fcd64)=>{const _0x5a435e=a0_0x55833c,{getAgentStoragePaths:_0x1a482f}=await Promise[_0x5a435e(0x165)]()['then'](()=>__importStar(require(_0x5a435e(0x13c)))),{agentKey:_0x2880a2}=_0x29bc74[_0x5a435e(0x127)]||{};if(!_0x2880a2)return _0x3fcd64['status'](0x190)['json']({'error':'Missing\x20agentKey'});const _0x360555=_0x1a482f(_0x2880a2),_0x4097c8=_0x360555['find'](_0x329916=>fs[_0x5a435e(0x147)](_0x329916))||_0x360555[0x0];if(_0x4097c8){if(!fs[_0x5a435e(0x147)](_0x4097c8))try{fs[_0x5a435e(0x11a)](_0x4097c8,{'recursive':!![]});}catch{}const {exec:_0x9b7a1}=await Promise[_0x5a435e(0x165)]()[_0x5a435e(0x18c)](()=>__importStar(require('child_process'))),_0x423a39=process[_0x5a435e(0x11e)]===_0x5a435e(0x176)?_0x5a435e(0x15b)+_0x4097c8+'\x22':process[_0x5a435e(0x11e)]===_0x5a435e(0x121)?_0x5a435e(0x184)+_0x4097c8+'\x22':_0x5a435e(0x160)+_0x4097c8+'\x22';return _0x9b7a1(_0x423a39),_0x3fcd64[_0x5a435e(0x13b)]({'success':!![],'openedPath':_0x4097c8});}_0x3fcd64[_0x5a435e(0x122)](0x194)[_0x5a435e(0x13b)]({'error':_0x5a435e(0x145)});}),app[a0_0x55833c(0x11d)]('/api/config/toggle',async(_0x1b18e4,_0x379560)=>{const _0x1801f0=a0_0x55833c,{saveConfig:_0x3a4fa5}=await Promise[_0x1801f0(0x165)]()[_0x1801f0(0x18c)](()=>__importStar(require(_0x1801f0(0x13c)))),{key:_0x28f285,value:_0x26a8a2}=_0x1b18e4[_0x1801f0(0x127)]||{};if(_0x28f285){const _0x5c9d4c=_0x3a4fa5({'conversation_toggles':{[_0x28f285]:_0x26a8a2}});return invalidateConfigCache(),_0x379560[_0x1801f0(0x13b)](_0x5c9d4c);}_0x379560[_0x1801f0(0x122)](0x190)['json']({'error':'Missing\x20key'});}),app[a0_0x55833c(0x11d)]('/api/config/custom-path',async(_0x3366e3,_0x8c6490)=>{const _0x51f374=a0_0x55833c,{saveConfig:_0x3c78ca}=await Promise['resolve']()['then'](()=>__importStar(require(_0x51f374(0x13c)))),{agentKey:_0x2cd729,path:_0x4821f5}=_0x3366e3[_0x51f374(0x127)]||{};if(_0x2cd729){const _0x34e65e=_0x3c78ca({'custom_storage_paths':{[_0x2cd729]:_0x4821f5||null}});return invalidateConfigCache(),_0x8c6490[_0x51f374(0x13b)](_0x34e65e);}_0x8c6490[_0x51f374(0x122)](0x190)[_0x51f374(0x13b)]({'error':_0x51f374(0x137)});});function startDashboard(_0x1f9060=0xfa0){const _0x18a1cd=a0_0x55833c;let _0x4e1458=_0x1f9060;const _0x90cefb=process[_0x18a1cd(0x119)][_0x18a1cd(0x159)](_0x18a1cd(0x128))||process.env.TRIMPROMPT_HEADLESS==='1',_0x377093=app[_0x18a1cd(0x187)](_0x4e1458,()=>{const _0x3e5472=_0x18a1cd,_0x3980ec=_0x3e5472(0x180)+_0x4e1458;!_0x90cefb&&(console[_0x3e5472(0x12a)](_0x3e5472(0x17b)+_0x3980ec),console[_0x3e5472(0x12a)]('Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.'));try{const {spawn:_0x57afcd}=require(_0x3e5472(0x168)),_0x5813cd=_0x57afcd(process[_0x3e5472(0x153)],[path['join'](__dirname,_0x3e5472(0x146)),_0x3e5472(0x14d),'start'],{'stdio':_0x3e5472(0x164),'windowsHide':!![]}),_0x49777e=()=>{const _0x5cb490=_0x3e5472;try{_0x5813cd[_0x5cb490(0x129)]();}catch{}};process['on'](_0x3e5472(0x15e),_0x49777e),process['on']('SIGINT',()=>{const _0x1becd3=_0x3e5472;_0x49777e(),process[_0x1becd3(0x15e)](0x0);}),process['on'](_0x3e5472(0x190),()=>{const _0x29477c=_0x3e5472;_0x49777e(),process[_0x29477c(0x15e)](0x0);});}catch{}!_0x90cefb&&process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1['default'])(_0x3980ec)[_0x3e5472(0x14b)](()=>{});});_0x377093['on'](_0x18a1cd(0x142),_0x137596=>{const _0x57495d=_0x18a1cd;_0x137596[_0x57495d(0x12d)]===_0x57495d(0x186)?startDashboard(_0x4e1458+0x1):console['error'](_0x57495d(0x163)+_0x137596['message']);});}
package/executor.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x2399(_0x4debf3,_0x153501){_0x4debf3=_0x4debf3-0x147;var _0x51a55b=a0_0x51a5();var _0x239949=_0x51a55b[_0x4debf3];return _0x239949;}var a0_0x183f05=a0_0x2399;function a0_0x51a5(){var _0x1d080f=['344598gynvvI','shims','trim','339784rBvPWn','.trimprompt','__createBinding','filter','__setModuleDefault','delimiter','__importStar','Failed\x20to\x20spawn\x20command\x20\x22','homedir','includes','__esModule','5175UcybkI','1395009advNrS','split','message','startsWith','get','join','hasOwnProperty','3604256CBeCta','\x22:\x20','getOwnPropertyDescriptor','42222qzCVVJ','defineProperty','inherit','close','53956lbEaDR','pipe','3MlMsaK','stdout','toLowerCase','data','create','call','length','prototype','child_process','default'];a0_0x51a5=function(){return _0x1d080f;};return a0_0x51a5();}(function(_0x4c72f1,_0x517231){var _0x112c60=a0_0x2399,_0x5ac87b=_0x4c72f1();while(!![]){try{var _0xcb5c30=-parseInt(_0x112c60(0x15b))/0x1+-parseInt(_0x112c60(0x167))/0x2+-parseInt(_0x112c60(0x15d))/0x3*(-parseInt(_0x112c60(0x16a))/0x4)+-parseInt(_0x112c60(0x14c))/0x5+-parseInt(_0x112c60(0x157))/0x6+-parseInt(_0x112c60(0x14d))/0x7+parseInt(_0x112c60(0x154))/0x8;if(_0xcb5c30===_0x517231)break;else _0x5ac87b['push'](_0x5ac87b['shift']());}catch(_0x21cdc4){_0x5ac87b['push'](_0x5ac87b['shift']());}}}(a0_0x51a5,0x18de8));var __createBinding=this&&this[a0_0x183f05(0x16c)]||(Object['create']?function(_0x110261,_0x20d037,_0x1f9cf6,_0x25af31){var _0x2102c3=a0_0x183f05;if(_0x25af31===undefined)_0x25af31=_0x1f9cf6;var _0x189cc6=Object[_0x2102c3(0x156)](_0x20d037,_0x1f9cf6);(!_0x189cc6||(_0x2102c3(0x151)in _0x189cc6?!_0x20d037[_0x2102c3(0x14b)]:_0x189cc6['writable']||_0x189cc6['configurable']))&&(_0x189cc6={'enumerable':!![],'get':function(){return _0x20d037[_0x1f9cf6];}}),Object[_0x2102c3(0x158)](_0x110261,_0x25af31,_0x189cc6);}:function(_0x5caff2,_0x23ad95,_0x19c12c,_0xc18c5c){if(_0xc18c5c===undefined)_0xc18c5c=_0x19c12c;_0x5caff2[_0xc18c5c]=_0x23ad95[_0x19c12c];}),__setModuleDefault=this&&this[a0_0x183f05(0x16e)]||(Object[a0_0x183f05(0x161)]?function(_0xfb9168,_0x29abea){var _0x3373cd=a0_0x183f05;Object[_0x3373cd(0x158)](_0xfb9168,_0x3373cd(0x166),{'enumerable':!![],'value':_0x29abea});}:function(_0x2a8ed8,_0x5c0766){var _0x5d188d=a0_0x183f05;_0x2a8ed8[_0x5d188d(0x166)]=_0x5c0766;}),__importStar=this&&this[a0_0x183f05(0x147)]||(function(){var _0x6da3a4=function(_0x114479){return _0x6da3a4=Object['getOwnPropertyNames']||function(_0x3872e3){var _0x5922a4=a0_0x2399,_0x370bfd=[];for(var _0x45ad93 in _0x3872e3)if(Object[_0x5922a4(0x164)][_0x5922a4(0x153)][_0x5922a4(0x162)](_0x3872e3,_0x45ad93))_0x370bfd[_0x370bfd[_0x5922a4(0x163)]]=_0x45ad93;return _0x370bfd;},_0x6da3a4(_0x114479);};return function(_0x1bca9a){var _0x1cb71b=a0_0x2399;if(_0x1bca9a&&_0x1bca9a[_0x1cb71b(0x14b)])return _0x1bca9a;var _0x13fd56={};if(_0x1bca9a!=null){for(var _0x32395d=_0x6da3a4(_0x1bca9a),_0x4f1ab7=0x0;_0x4f1ab7<_0x32395d['length'];_0x4f1ab7++)if(_0x32395d[_0x4f1ab7]!==_0x1cb71b(0x166))__createBinding(_0x13fd56,_0x1bca9a,_0x32395d[_0x4f1ab7]);}return __setModuleDefault(_0x13fd56,_0x1bca9a),_0x13fd56;};}());Object[a0_0x183f05(0x158)](exports,a0_0x183f05(0x14b),{'value':!![]}),exports['executeCommand']=executeCommand;const child_process_1=require(a0_0x183f05(0x165)),path=__importStar(require('path')),os=__importStar(require('os'));function executeCommand(_0x43fdff,_0x428d23){return new Promise(_0x230f27=>{var _0x1a00e1=a0_0x2399;const _0x5bb172=path[_0x1a00e1(0x152)](os[_0x1a00e1(0x149)](),_0x1a00e1(0x16b),_0x1a00e1(0x168)),_0x29a25e=(process.env.PATH||'')[_0x1a00e1(0x14e)](path[_0x1a00e1(0x16f)])[_0x1a00e1(0x16d)](_0x3bde53=>_0x3bde53[_0x1a00e1(0x169)]()[_0x1a00e1(0x15f)]()!==_0x5bb172[_0x1a00e1(0x15f)]())[_0x1a00e1(0x152)](path['delimiter']),_0x2de4ef={...process.env,'PATH':_0x29a25e,'TRIMPROMPT_DISABLED':'1'},_0x33cd45=_0x428d23['map'](_0x914b0=>_0x914b0[_0x1a00e1(0x14a)]('\x20')&&!_0x914b0[_0x1a00e1(0x150)]('\x22')?'\x22'+_0x914b0+'\x22':_0x914b0),_0x49ef1b=[_0x43fdff,..._0x33cd45]['join']('\x20'),_0x42f66d=(0x0,child_process_1['spawn'])(_0x49ef1b,[],{'stdio':[_0x1a00e1(0x159),_0x1a00e1(0x15c),_0x1a00e1(0x15c)],'shell':!![],'env':_0x2de4ef});let _0x3e3ab9='',_0x274617='';_0x42f66d[_0x1a00e1(0x15e)]?.['on'](_0x1a00e1(0x160),_0x3ade39=>{_0x3e3ab9+=_0x3ade39['toString']();}),_0x42f66d['stderr']?.['on']('data',_0x941685=>{_0x274617+=_0x941685['toString']();}),_0x42f66d['on']('error',_0x36178c=>{var _0x4a7cc9=_0x1a00e1;_0x230f27({'exitCode':0x1,'stdout':'','stderr':_0x4a7cc9(0x148)+_0x43fdff+_0x4a7cc9(0x155)+_0x36178c[_0x4a7cc9(0x14f)]});}),_0x42f66d['on'](_0x1a00e1(0x15a),_0x1cbb86=>{_0x230f27({'exitCode':_0x1cbb86??0x0,'stdout':_0x3e3ab9,'stderr':_0x274617});});});}
1
+ 'use strict';var a0_0x22124f=a0_0x3041;(function(_0x351de1,_0x2da0ba){var _0x425a47=a0_0x3041,_0x4919f1=_0x351de1();while(!![]){try{var _0x131ae0=-parseInt(_0x425a47(0x199))/0x1+parseInt(_0x425a47(0x1ab))/0x2*(-parseInt(_0x425a47(0x1ae))/0x3)+-parseInt(_0x425a47(0x1b3))/0x4*(-parseInt(_0x425a47(0x1a2))/0x5)+parseInt(_0x425a47(0x1b2))/0x6+parseInt(_0x425a47(0x1b9))/0x7*(parseInt(_0x425a47(0x1ad))/0x8)+parseInt(_0x425a47(0x1aa))/0x9+parseInt(_0x425a47(0x198))/0xa*(-parseInt(_0x425a47(0x1bb))/0xb);if(_0x131ae0===_0x2da0ba)break;else _0x4919f1['push'](_0x4919f1['shift']());}catch(_0x3854c7){_0x4919f1['push'](_0x4919f1['shift']());}}}(a0_0x296d,0x3672f));function a0_0x296d(){var _0x292466=['inherit','delimiter','executeCommand','prototype','814239guzotE','18GopcOe','__createBinding','632jVrjiV','109941ZHfefX','.trimprompt','homedir','pipe','985770AfZFVn','4ZVAkbL','__esModule','close','__importStar','call','filter','9149xEDtSK','default','24167QeghdV','shims','join','stderr','toLowerCase','length','data','child_process','toString','10ynhBGe','162863eHBcna','configurable','split','map','startsWith','getOwnPropertyDescriptor','defineProperty','writable','path','1799435GsJEyl','message','hasOwnProperty','\x22:\x20'];a0_0x296d=function(){return _0x292466;};return a0_0x296d();}function a0_0x3041(_0x462c05,_0x15451c){_0x462c05=_0x462c05-0x190;var _0x296d27=a0_0x296d();var _0x304172=_0x296d27[_0x462c05];return _0x304172;}var __createBinding=this&&this[a0_0x22124f(0x1ac)]||(Object['create']?function(_0x1cc297,_0x5f0545,_0x38a38b,_0x5dfa3b){var _0x4e5122=a0_0x22124f;if(_0x5dfa3b===undefined)_0x5dfa3b=_0x38a38b;var _0x2daf77=Object[_0x4e5122(0x19e)](_0x5f0545,_0x38a38b);(!_0x2daf77||('get'in _0x2daf77?!_0x5f0545[_0x4e5122(0x1b4)]:_0x2daf77[_0x4e5122(0x1a0)]||_0x2daf77[_0x4e5122(0x19a)]))&&(_0x2daf77={'enumerable':!![],'get':function(){return _0x5f0545[_0x38a38b];}}),Object[_0x4e5122(0x19f)](_0x1cc297,_0x5dfa3b,_0x2daf77);}:function(_0x2bdf24,_0x1d6bbc,_0x378609,_0x50445a){if(_0x50445a===undefined)_0x50445a=_0x378609;_0x2bdf24[_0x50445a]=_0x1d6bbc[_0x378609];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x1e043a,_0x2ef71b){var _0xaf3b1d=a0_0x22124f;Object[_0xaf3b1d(0x19f)](_0x1e043a,_0xaf3b1d(0x1ba),{'enumerable':!![],'value':_0x2ef71b});}:function(_0x57adfe,_0x55300c){var _0x34b62b=a0_0x22124f;_0x57adfe[_0x34b62b(0x1ba)]=_0x55300c;}),__importStar=this&&this[a0_0x22124f(0x1b6)]||(function(){var _0x38ba5b=function(_0x5486b3){return _0x38ba5b=Object['getOwnPropertyNames']||function(_0xf4f40a){var _0x259460=a0_0x3041,_0x266386=[];for(var _0x326dda in _0xf4f40a)if(Object[_0x259460(0x1a9)][_0x259460(0x1a4)][_0x259460(0x1b7)](_0xf4f40a,_0x326dda))_0x266386[_0x266386[_0x259460(0x194)]]=_0x326dda;return _0x266386;},_0x38ba5b(_0x5486b3);};return function(_0x411c0){var _0x224945=a0_0x3041;if(_0x411c0&&_0x411c0[_0x224945(0x1b4)])return _0x411c0;var _0x303dba={};if(_0x411c0!=null){for(var _0x35dc1c=_0x38ba5b(_0x411c0),_0x55ae7b=0x0;_0x55ae7b<_0x35dc1c[_0x224945(0x194)];_0x55ae7b++)if(_0x35dc1c[_0x55ae7b]!=='default')__createBinding(_0x303dba,_0x411c0,_0x35dc1c[_0x55ae7b]);}return __setModuleDefault(_0x303dba,_0x411c0),_0x303dba;};}());Object[a0_0x22124f(0x19f)](exports,a0_0x22124f(0x1b4),{'value':!![]}),exports[a0_0x22124f(0x1a8)]=executeCommand;const child_process_1=require(a0_0x22124f(0x196)),path=__importStar(require(a0_0x22124f(0x1a1))),os=__importStar(require('os'));function executeCommand(_0x2ef379,_0x117eed){return new Promise(_0x1577d1=>{var _0x2388c7=a0_0x3041;const _0x4d8086=path[_0x2388c7(0x191)](os[_0x2388c7(0x1b0)](),_0x2388c7(0x1af),_0x2388c7(0x190)),_0x3a7268=(process.env.PATH||'')[_0x2388c7(0x19b)](path[_0x2388c7(0x1a7)])[_0x2388c7(0x1b8)](_0x5c4f6b=>_0x5c4f6b['trim']()[_0x2388c7(0x193)]()!==_0x4d8086['toLowerCase']())[_0x2388c7(0x191)](path[_0x2388c7(0x1a7)]),_0x18f9cb={...process.env,'PATH':_0x3a7268,'TRIMPROMPT_DISABLED':'1'},_0xea610c=_0x117eed[_0x2388c7(0x19c)](_0x927991=>_0x927991['includes']('\x20')&&!_0x927991[_0x2388c7(0x19d)]('\x22')?'\x22'+_0x927991+'\x22':_0x927991),_0x42de87=[_0x2ef379,..._0xea610c][_0x2388c7(0x191)]('\x20'),_0x3b160b=(0x0,child_process_1['spawn'])(_0x42de87,[],{'stdio':[_0x2388c7(0x1a6),_0x2388c7(0x1b1),_0x2388c7(0x1b1)],'shell':!![],'env':_0x18f9cb});let _0x191cfd='',_0x4eb732='';_0x3b160b['stdout']?.['on'](_0x2388c7(0x195),_0x2569ff=>{var _0x581493=_0x2388c7;_0x191cfd+=_0x2569ff[_0x581493(0x197)]();}),_0x3b160b[_0x2388c7(0x192)]?.['on'](_0x2388c7(0x195),_0xfd6b30=>{_0x4eb732+=_0xfd6b30['toString']();}),_0x3b160b['on']('error',_0x474d91=>{var _0x3d17ac=_0x2388c7;_0x1577d1({'exitCode':0x1,'stdout':'','stderr':'Failed\x20to\x20spawn\x20command\x20\x22'+_0x2ef379+_0x3d17ac(0x1a5)+_0x474d91[_0x3d17ac(0x1a3)]});}),_0x3b160b['on'](_0x2388c7(0x1b5),_0xb56627=>{_0x1577d1({'exitCode':_0xb56627??0x0,'stdout':_0x191cfd,'stderr':_0x4eb732});});});}
package/file-watcher.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x5cb1a6=a0_0x41a1;(function(_0x6a577b,_0x5c1b1f){const _0x5d4eb6=a0_0x41a1,_0x460cf2=_0x6a577b();while(!![]){try{const _0x3b2488=parseInt(_0x5d4eb6(0x22b))/0x1*(-parseInt(_0x5d4eb6(0x20c))/0x2)+parseInt(_0x5d4eb6(0x28e))/0x3+-parseInt(_0x5d4eb6(0x244))/0x4+parseInt(_0x5d4eb6(0x279))/0x5+parseInt(_0x5d4eb6(0x217))/0x6*(-parseInt(_0x5d4eb6(0x235))/0x7)+-parseInt(_0x5d4eb6(0x226))/0x8+-parseInt(_0x5d4eb6(0x275))/0x9*(-parseInt(_0x5d4eb6(0x20a))/0xa);if(_0x3b2488===_0x5c1b1f)break;else _0x460cf2['push'](_0x460cf2['shift']());}catch(_0x4c6d94){_0x460cf2['push'](_0x460cf2['shift']());}}}(a0_0x5d39,0xc13a7));var __createBinding=this&&this[a0_0x5cb1a6(0x259)]||(Object[a0_0x5cb1a6(0x227)]?function(_0x3bb2c5,_0x4f269b,_0x3dede5,_0x347735){const _0x2e267c=a0_0x5cb1a6;if(_0x347735===undefined)_0x347735=_0x3dede5;var _0x151e6e=Object[_0x2e267c(0x28d)](_0x4f269b,_0x3dede5);(!_0x151e6e||(_0x2e267c(0x1e2)in _0x151e6e?!_0x4f269b[_0x2e267c(0x262)]:_0x151e6e[_0x2e267c(0x25f)]||_0x151e6e[_0x2e267c(0x285)]))&&(_0x151e6e={'enumerable':!![],'get':function(){return _0x4f269b[_0x3dede5];}}),Object[_0x2e267c(0x1ea)](_0x3bb2c5,_0x347735,_0x151e6e);}:function(_0x3b12ce,_0x404612,_0x44ccd6,_0x5d2870){if(_0x5d2870===undefined)_0x5d2870=_0x44ccd6;_0x3b12ce[_0x5d2870]=_0x404612[_0x44ccd6];}),__setModuleDefault=this&&this[a0_0x5cb1a6(0x23a)]||(Object[a0_0x5cb1a6(0x227)]?function(_0x389e67,_0x5ef11f){const _0x2bf9ed=a0_0x5cb1a6;Object[_0x2bf9ed(0x1ea)](_0x389e67,_0x2bf9ed(0x24b),{'enumerable':!![],'value':_0x5ef11f});}:function(_0x5c45e7,_0x8bf102){_0x5c45e7['default']=_0x8bf102;}),__importStar=this&&this[a0_0x5cb1a6(0x245)]||(function(){var _0x51411c=function(_0x5c6f81){const _0x34c5d2=a0_0x41a1;return _0x51411c=Object[_0x34c5d2(0x218)]||function(_0x4e3d6a){const _0x34a62c=_0x34c5d2;var _0x52d094=[];for(var _0x199808 in _0x4e3d6a)if(Object[_0x34a62c(0x1fd)]['hasOwnProperty'][_0x34a62c(0x1e4)](_0x4e3d6a,_0x199808))_0x52d094[_0x52d094[_0x34a62c(0x240)]]=_0x199808;return _0x52d094;},_0x51411c(_0x5c6f81);};return function(_0x445b8f){const _0x13f26a=a0_0x41a1;if(_0x445b8f&&_0x445b8f['__esModule'])return _0x445b8f;var _0x338e65={};if(_0x445b8f!=null){for(var _0x1fa799=_0x51411c(_0x445b8f),_0x3d7518=0x0;_0x3d7518<_0x1fa799[_0x13f26a(0x240)];_0x3d7518++)if(_0x1fa799[_0x3d7518]!==_0x13f26a(0x24b))__createBinding(_0x338e65,_0x445b8f,_0x1fa799[_0x3d7518]);}return __setModuleDefault(_0x338e65,_0x445b8f),_0x338e65;};}());function a0_0x5d39(){const _0x4b0f67=['.next','parse','saved','writable','compact_copy','find','__esModule','byteLength','.gemini','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','github-copilot-cli','cache','codex','image_','openclaw','installWindowsStartupService','Unsupported\x20extension','cursor','./hooks/claude-hook','darwin','./proxy-conv','.openclaw','sessions_state.json','stringify','join','15894YXVHkv','Startup','message','.dat','3021650EBFCFf','copilot','context','messages','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','AppData','existsSync','workspaceStorage','Summary:\x20Tool\x20result\x20offloaded\x20(','trim','hookSavedTokens','saveConfig','configurable','aider','officialCompactSaved','includes','saveChunk','\x20tokens).','utf8','max','getOwnPropertyDescriptor','4130970vGmunA','mtimeMs','endsWith','conv_','.vscdb','Unsupported\x20format\x20\x27','cortex','tokens','Programs','assign','replace','get','isArray','call','Roaming','compactSessionCopy','.compact','storage','.webp','defineProperty','.json','win32','Application\x20Support','.lock','sessions','compaction\x20failed','gemini','tracker','.git','loadSessionsState','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','TrimPromptDaemon.vbs','compact:','push','projects','isFile','repeat','round','prototype','text','Gemini','.opencode','User','dirname','Cursor','string','getLatestSessionFile','live-conv','.aider.chat.history.md','modified','.jsonl','14870oXhsyE','.config','32MwlWOk','.claude','.jpg','content','logExecution','size','path','compactLiveSession','none','mkdirSync','toLowerCase','12PrNhuN','getOwnPropertyNames','.db','conversation_toggles','TrimPrompt\x20Cache\x20Engine','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','chunk_id','has','history','sideCacheSaved','startsWith','.wal','ceil','Session\x20file\x20not\x20found','statSync','10098808cWHVCS','create','config.json','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','role','39CJhtxx','Compaction\x20failed','readdirSync','split','raw_tokens','platform','venv','env','.cortex','.json1','4414102xikoBb','Summary:\x20Text\x20block\x20offloaded\x20(','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','fullPath','writeFileSync','__setModuleDefault','extname','.agents','watch','filter','savedTokens','length','activeSavedTokens','processSessionFile','claude','5167008wbNhNE','__importStar','compressed_tokens','readFileSync','opencode','custom_storage_paths','.tmp','default','File\x20not\x20found','cwd','object','Microsoft','name','prompt_turn','.jpeg','.codex','homedir','Summary:\x20Content\x20offloaded\x20(','lineCount','antigravity','./cache-manager','__createBinding','cli.js','media__'];a0_0x5d39=function(){return _0x4b0f67;};return a0_0x5d39();}Object[a0_0x5cb1a6(0x1ea)](exports,'__esModule',{'value':!![]}),exports['loadConfig']=loadConfig,exports[a0_0x5cb1a6(0x284)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0x5cb1a6(0x205)]=getLatestSessionFile,exports[a0_0x5cb1a6(0x1f4)]=loadSessionsState,exports['saveSessionStateItem']=saveSessionStateItem,exports[a0_0x5cb1a6(0x242)]=processSessionFile,exports[a0_0x5cb1a6(0x1e6)]=compactSessionCopy,exports[a0_0x5cb1a6(0x213)]=compactLiveSession,exports[a0_0x5cb1a6(0x26b)]=installWindowsStartupService,exports['startWatcherDaemon']=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5cb1a6(0x212))),os=__importStar(require('os')),cache_manager_1=require(a0_0x5cb1a6(0x258)),tracker_1=require('./tracker'),baseDir=path[a0_0x5cb1a6(0x274)](os[a0_0x5cb1a6(0x254)](),'.trimprompt'),configPath=path[a0_0x5cb1a6(0x274)](baseDir,a0_0x5cb1a6(0x228)),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 _0x458bc3=a0_0x5cb1a6;try{if(!fs[_0x458bc3(0x27f)](baseDir))fs[_0x458bc3(0x215)](baseDir,{'recursive':!![]});if(fs['existsSync'](configPath)){const _0x477b82=JSON[_0x458bc3(0x25d)](fs[_0x458bc3(0x247)](configPath,_0x458bc3(0x28b)));return{...DEFAULT_CONFIG,..._0x477b82,'conversation_toggles':{...DEFAULT_CONFIG['conversation_toggles'],..._0x477b82[_0x458bc3(0x21a)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x458bc3(0x249)],..._0x477b82['custom_storage_paths']||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x5936f5){const _0x40c09b=a0_0x5cb1a6,_0x29a4d2=loadConfig(),_0x534e60={..._0x29a4d2,..._0x5936f5,'conversation_toggles':{..._0x29a4d2['conversation_toggles'],..._0x5936f5[_0x40c09b(0x21a)]||{}},'custom_storage_paths':{..._0x29a4d2[_0x40c09b(0x249)],..._0x5936f5[_0x40c09b(0x249)]||{}}};try{if(!fs['existsSync'](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x40c09b(0x239)](configPath,JSON[_0x40c09b(0x273)](_0x534e60,null,0x2),_0x40c09b(0x28b));}catch{}return _0x534e60;}function getAgentStoragePaths(_0xb6baf6){const _0x27e179=a0_0x5cb1a6,_0xdc36aa=loadConfig(),_0x227129=_0xdc36aa['custom_storage_paths'][_0xb6baf6];if(_0x227129&&fs['existsSync'](_0x227129))return[_0x227129];const _0x279f5e=os['homedir'](),_0x4fcb27=process[_0x27e179(0x230)]===_0x27e179(0x1ec),_0x33f7da=process['platform']===_0x27e179(0x26f);switch(_0xb6baf6){case _0x27e179(0x243):return[path['join'](_0x279f5e,_0x27e179(0x20d),_0x27e179(0x1f9)),path[_0x27e179(0x274)](_0x279f5e,'.claude',_0x27e179(0x21f))];case _0x27e179(0x268):return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x253),'sessions'),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x27e),_0x27e179(0x1e5),'Codex')];case'gemini':case _0x27e179(0x257):return[path[_0x27e179(0x274)](_0x279f5e,'.gemini','antigravity'),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x264)),path['join'](_0x279f5e,_0x27e179(0x27e),_0x27e179(0x1e5),_0x27e179(0x1ff)),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x20b),_0x27e179(0x1f1))];case _0x27e179(0x26d):if(_0x4fcb27)return[path[_0x27e179(0x274)](_0x279f5e,'AppData',_0x27e179(0x1e5),_0x27e179(0x203),'User',_0x27e179(0x280))];if(_0x33f7da)return[path['join'](_0x279f5e,'Library',_0x27e179(0x1ed),'Cursor',_0x27e179(0x201),'workspaceStorage')];return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x20b),_0x27e179(0x203),_0x27e179(0x201),'workspaceStorage')];case _0x27e179(0x286):return[process[_0x27e179(0x24d)](),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x207))];case _0x27e179(0x27a):if(_0x4fcb27)return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x27e),'Local',_0x27e179(0x266))];return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x20b),_0x27e179(0x266))];case _0x27e179(0x26a):return[path['join'](_0x279f5e,_0x27e179(0x271),_0x27e179(0x1e8)),path[_0x27e179(0x274)](process[_0x27e179(0x24d)](),_0x27e179(0x271),_0x27e179(0x27b))];case _0x27e179(0x248):return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x200),_0x27e179(0x1ef))];case _0x27e179(0x294):return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x233),_0x27e179(0x267))];default:return[];}}function a0_0x41a1(_0x57c59b,_0x518cb4){_0x57c59b=_0x57c59b-0x1df;const _0x5d39ba=a0_0x5d39();let _0x41a165=_0x5d39ba[_0x57c59b];return _0x41a165;}function getLatestSessionFile(_0x2cec90){const _0x3af28c=a0_0x5cb1a6,_0x2a2b79=getAgentStoragePaths(_0x2cec90);let _0x226196=null,_0x5606f1=0x0,_0x517563=null,_0x3961ca=null;for(const _0x3bbbc6 of _0x2a2b79){if(fs[_0x3af28c(0x27f)](_0x3bbbc6)){if(!_0x3961ca)_0x3961ca=_0x3bbbc6;const _0x421d7c=(_0x43fadf,_0x28db69=0x0)=>{const _0x48c229=_0x3af28c;if(_0x28db69>0x6)return;try{const _0x329df5=fs[_0x48c229(0x22d)](_0x43fadf,{'withFileTypes':!![]});for(const _0x398c41 of _0x329df5){const _0x591e8e=path[_0x48c229(0x274)](_0x43fadf,_0x398c41[_0x48c229(0x250)]);if(_0x398c41['isDirectory']()){const _0x1b15af=_0x398c41['name'][_0x48c229(0x216)]();if(_0x1b15af==='node_modules'||_0x1b15af===_0x48c229(0x1f3)||_0x1b15af==='.venv'||_0x1b15af===_0x48c229(0x232)||_0x1b15af===_0x48c229(0x231)||_0x1b15af==='__pycache__'||_0x1b15af===_0x48c229(0x25c)||_0x1b15af==='dist'||_0x1b15af==='build'||_0x1b15af==='out'||_0x1b15af===_0x48c229(0x23c))continue;_0x421d7c(_0x591e8e,_0x28db69+0x1);}else{if(_0x398c41[_0x48c229(0x1fa)]()&&!_0x398c41[_0x48c229(0x250)][_0x48c229(0x221)]('.')){const _0x3fe528=_0x398c41[_0x48c229(0x250)]['toLowerCase']();if(_0x3fe528[_0x48c229(0x288)](_0x48c229(0x1e7))||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x219))||_0x3fe528['endsWith'](_0x48c229(0x292))||_0x3fe528[_0x48c229(0x290)]('.png')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x20e))||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x252))||_0x3fe528['endsWith']('.gif')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x1e9))||_0x3fe528[_0x48c229(0x290)]('.pb')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x222))||_0x3fe528[_0x48c229(0x290)]('.shm')||_0x3fe528[_0x48c229(0x290)]('.tmp')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x1ee))||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x278))||_0x3fe528[_0x48c229(0x221)](_0x48c229(0x25b))||_0x3fe528[_0x48c229(0x221)](_0x48c229(0x269)))continue;const _0x508ef1=fs['statSync'](_0x591e8e);_0x508ef1[_0x48c229(0x28f)]>_0x5606f1&&(_0x5606f1=_0x508ef1[_0x48c229(0x28f)],_0x226196=_0x398c41['name'],_0x517563=_0x591e8e,_0x3961ca=_0x3bbbc6);}}}}catch{}};_0x421d7c(_0x3bbbc6);}}return{'fileName':_0x226196,'lastModified':_0x5606f1>0x0?new Date(_0x5606f1)['toISOString']():null,'fullPath':_0x517563,'dirPath':_0x3961ca};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x5a4999,_0x26704d,_0x48ae1d){const _0x5898c3=a0_0x5cb1a6;let _0x3dca6a=![],_0x52f238=0x0;if(!_0x5a4999)return{'modified':_0x3dca6a,'savedTokens':_0x52f238};const _0x4fcd80=_0x44c10b=>_0x44c10b[_0x5898c3(0x1e1)](/\r\n/g,'\x0a')[_0x5898c3(0x1e1)](/\n{3,}/g,'\x0a\x0a');if(typeof _0x5a4999[_0x5898c3(0x20f)]==='string'){let _0x358b2d=_0x5a4999[_0x5898c3(0x20f)],_0x5edcd5=_0x4fcd80(_0x358b2d);_0x5edcd5['length']<_0x358b2d[_0x5898c3(0x240)]&&(_0x5a4999[_0x5898c3(0x20f)]=_0x5edcd5,_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x223)]((_0x358b2d[_0x5898c3(0x240)]-_0x5edcd5[_0x5898c3(0x240)])/0x4));if(_0x5a4999[_0x5898c3(0x20f)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x5a4999[_0x5898c3(0x20f)][_0x5898c3(0x288)]('TrimPrompt\x20Cache\x20Engine')){const _0x567d6c=_0x5898c3(0x255)+Math[_0x5898c3(0x223)](_0x5a4999['content'][_0x5898c3(0x240)]/0x4)+_0x5898c3(0x28a),_0x23a910=(0x0,cache_manager_1[_0x5898c3(0x289)])(_0x26704d,_0x48ae1d,_0x5a4999[_0x5898c3(0x20f)],_0x567d6c);_0x5a4999[_0x5898c3(0x20f)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20('+_0x23a910[_0x5898c3(0x22f)]+'\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x23a910[_0x5898c3(0x21d)]+_0x5898c3(0x21c)+_0x23a910[_0x5898c3(0x21d)]+'`\x0a',_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x28c)](0x0,_0x23a910['raw_tokens']-_0x23a910[_0x5898c3(0x246)]);}}else{if(Array[_0x5898c3(0x1e3)](_0x5a4999[_0x5898c3(0x20f)]))for(const _0x5b774a of _0x5a4999[_0x5898c3(0x20f)]){if(_0x5b774a&&typeof _0x5b774a===_0x5898c3(0x24e)){if(typeof _0x5b774a['text']===_0x5898c3(0x204)){let _0x23eb61=_0x5b774a['text'],_0x2930c3=_0x4fcd80(_0x23eb61);_0x2930c3[_0x5898c3(0x240)]<_0x23eb61['length']&&(_0x5b774a[_0x5898c3(0x1fe)]=_0x2930c3,_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x223)]((_0x23eb61[_0x5898c3(0x240)]-_0x2930c3[_0x5898c3(0x240)])/0x4));if(_0x5b774a[_0x5898c3(0x1fe)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x5b774a[_0x5898c3(0x1fe)][_0x5898c3(0x288)](_0x5898c3(0x21b))){const _0x534614=_0x5898c3(0x236)+Math[_0x5898c3(0x223)](_0x5b774a[_0x5898c3(0x1fe)][_0x5898c3(0x240)]/0x4)+_0x5898c3(0x28a),_0x20eef4=(0x0,cache_manager_1[_0x5898c3(0x289)])(_0x26704d,_0x48ae1d,_0x5b774a[_0x5898c3(0x1fe)],_0x534614);_0x5b774a[_0x5898c3(0x1fe)]=_0x5898c3(0x229)+_0x20eef4[_0x5898c3(0x21d)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x20eef4['chunk_id']+'`\x0a',_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x28c)](0x0,_0x20eef4[_0x5898c3(0x22f)]-_0x20eef4[_0x5898c3(0x246)]);}}else{if(typeof _0x5b774a[_0x5898c3(0x20f)]===_0x5898c3(0x204)){let _0x357ab7=_0x5b774a[_0x5898c3(0x20f)],_0x178073=_0x4fcd80(_0x357ab7);_0x178073[_0x5898c3(0x240)]<_0x357ab7[_0x5898c3(0x240)]&&(_0x5b774a['content']=_0x178073,_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x223)]((_0x357ab7[_0x5898c3(0x240)]-_0x178073[_0x5898c3(0x240)])/0x4));if(_0x5b774a[_0x5898c3(0x20f)][_0x5898c3(0x240)]>OFFLOAD_THRESHOLD_CHARS&&!_0x5b774a[_0x5898c3(0x20f)]['includes']('TrimPrompt\x20Cache\x20Engine')){const _0x529a78=_0x5898c3(0x281)+Math[_0x5898c3(0x223)](_0x5b774a[_0x5898c3(0x20f)][_0x5898c3(0x240)]/0x4)+_0x5898c3(0x28a),_0x343f33=(0x0,cache_manager_1[_0x5898c3(0x289)])(_0x26704d,_0x48ae1d,_0x5b774a[_0x5898c3(0x20f)],_0x529a78);_0x5b774a[_0x5898c3(0x20f)]=_0x5898c3(0x229)+_0x343f33['chunk_id']+_0x5898c3(0x237)+_0x343f33[_0x5898c3(0x21d)]+'`\x0a',_0x3dca6a=!![],_0x52f238+=Math['max'](0x0,_0x343f33[_0x5898c3(0x22f)]-_0x343f33['compressed_tokens']);}}}}}}return{'modified':_0x3dca6a,'savedTokens':_0x52f238};}const sessionsStatePath=path[a0_0x5cb1a6(0x274)](baseDir,a0_0x5cb1a6(0x272));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x39bbc4=a0_0x5cb1a6;try{if(fs[_0x39bbc4(0x27f)](sessionsStatePath)){const _0x130dc6=JSON[_0x39bbc4(0x25d)](fs[_0x39bbc4(0x247)](sessionsStatePath,_0x39bbc4(0x28b)));if(_0x130dc6&&typeof _0x130dc6===_0x39bbc4(0x24e))return sessionsStateMemoryCache=_0x130dc6,_0x130dc6;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x469391,_0xe0334a,_0x442343,_0x45054e=0x0,_0x38a9af=0x0,_0x519220=0x0){const _0x505a45=a0_0x5cb1a6;try{const _0x203d10=loadSessionsState(),_0x12e62e=_0x203d10[_0x469391]||{},_0x556666=_0x38a9af||_0x12e62e['autoCompactSaved']||0x0,_0x59e052=_0x519220||_0x12e62e['hookSavedTokens']||0x0,_0x3e44c4=_0x442343!==undefined?_0x442343:_0x12e62e[_0x505a45(0x287)]||0x0;_0x203d10[_0x469391]={'lineCount':_0xe0334a||_0x12e62e[_0x505a45(0x256)]||0x1,'activeSavedTokens':_0x3e44c4+_0x556666+_0x59e052,'sideCacheSaved':_0x45054e||_0x12e62e[_0x505a45(0x220)]||0x0,'officialCompactSaved':_0x3e44c4,'autoCompactSaved':_0x556666,'hookSavedTokens':_0x59e052},sessionsStateMemoryCache=_0x203d10;if(!fs['existsSync'](baseDir))fs[_0x505a45(0x215)](baseDir,{'recursive':!![]});const _0x33f8ad=sessionsStatePath+_0x505a45(0x24a);fs[_0x505a45(0x239)](_0x33f8ad,JSON['stringify'](_0x203d10,null,0x2),_0x505a45(0x28b)),fs['renameSync'](_0x33f8ad,sessionsStatePath);}catch{}}function processSessionFile(_0x58d5c6,_0xf1d636){const _0x3c8dc1=a0_0x5cb1a6;try{if(!fs[_0x3c8dc1(0x27f)](_0x58d5c6))return;const _0x4bfe8b=fs[_0x3c8dc1(0x225)](_0x58d5c6);if(_0x4bfe8b['isDirectory']()||_0x4bfe8b[_0x3c8dc1(0x211)]===0x0)return;const _0x619815=loadConfig(),_0xfdd79c=_0x3c8dc1(0x291)+_0xf1d636;if(_0x619815[_0x3c8dc1(0x21a)][_0xfdd79c]===![])return;const _0x1ee501=fs[_0x3c8dc1(0x247)](_0x58d5c6,_0x3c8dc1(0x28b)),_0x4fa59f=path[_0x3c8dc1(0x23b)](_0x58d5c6)[_0x3c8dc1(0x216)]();let _0x58828a=0x1;if(_0x4fa59f===_0x3c8dc1(0x209)||_0x4fa59f===_0x3c8dc1(0x234))_0x58828a=_0x1ee501['split']('\x0a')[_0x3c8dc1(0x23e)](Boolean)[_0x3c8dc1(0x240)];else{if(_0x4fa59f===_0x3c8dc1(0x1eb))try{const _0x4921c1=JSON[_0x3c8dc1(0x25d)](_0x1ee501),_0x11822b=Array[_0x3c8dc1(0x1e3)](_0x4921c1[_0x3c8dc1(0x27c)])?_0x4921c1[_0x3c8dc1(0x27c)]:Array[_0x3c8dc1(0x1e3)](_0x4921c1)?_0x4921c1:null;if(_0x11822b)_0x58828a=_0x11822b[_0x3c8dc1(0x240)];}catch{}}let _0x47c301=0x0;if((_0x4fa59f==='.jsonl'||_0x4fa59f==='.json1')&&_0x1ee501[_0x3c8dc1(0x288)]('saved')&&_0x1ee501['includes']('tokens')){const _0x1b6c18=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x122534 of _0x1ee501['split']('\x0a')){if(!_0x122534[_0x3c8dc1(0x288)](_0x3c8dc1(0x25e))||!_0x122534['includes'](_0x3c8dc1(0x295)))continue;try{const _0x54a6fc=JSON['parse'](_0x122534);if(_0x54a6fc['type']!=='system')continue;const _0x24d774=typeof _0x54a6fc['content']==='string'?_0x54a6fc[_0x3c8dc1(0x20f)]:_0x54a6fc[_0x3c8dc1(0x277)]&&typeof _0x54a6fc[_0x3c8dc1(0x277)]['content']===_0x3c8dc1(0x204)?_0x54a6fc['message'][_0x3c8dc1(0x20f)]:'';if(!_0x24d774)continue;for(const _0x108bc8 of _0x24d774['matchAll'](_0x1b6c18)){let _0x3a0e24=parseFloat(_0x108bc8[0x1]);if(_0x108bc8[0x0][_0x3c8dc1(0x216)]()[_0x3c8dc1(0x288)]('k'))_0x3a0e24=_0x3a0e24*0x3e8;_0x47c301+=Math[_0x3c8dc1(0x1fc)](_0x3a0e24);}}catch{}}}const _0x2164b8=loadSessionsState(),_0x57c274=_0x2164b8[_0x58d5c6],_0x3f7899=_0x57c274?_0x57c274[_0x3c8dc1(0x256)]:0x0,_0x4a346e=_0x57c274?_0x57c274[_0x3c8dc1(0x241)]||0x0:0x0;if(_0x3f7899>0x0&&_0x58828a>_0x3f7899&&_0x4a346e>0x0){const _0x5222ea='conv:'+_0xf1d636;tracker_1['tracker'][_0x3c8dc1(0x210)](_0x5222ea,'A'[_0x3c8dc1(0x1fb)](_0x4a346e*0x4),'',0x0,undefined,[_0x3c8dc1(0x291)+_0xf1d636,_0x3c8dc1(0x206),_0xf1d636,_0x3c8dc1(0x251)]);}const _0x39c6d6=_0x57c274&&_0x57c274[_0x3c8dc1(0x287)]!==undefined?_0x57c274[_0x3c8dc1(0x287)]:0x0,_0x53bc9c=Math['max'](_0x39c6d6,_0x47c301);saveSessionStateItem(_0x58d5c6,_0x58828a,_0x53bc9c,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x482aee,_0x5ab893){const _0xc282e7=a0_0x5cb1a6;try{if(!fs[_0xc282e7(0x27f)](_0x482aee))return{'ok':![],'reason':_0xc282e7(0x224)};const _0x1adb9f=path['extname'](_0x482aee)[_0xc282e7(0x216)]();if(_0x1adb9f!=='.json'&&_0x1adb9f!==_0xc282e7(0x209)&&_0x1adb9f!=='.json1')return{'ok':![],'reason':_0xc282e7(0x293)+(_0x1adb9f||_0xc282e7(0x214))+_0xc282e7(0x1f5)};const _0x343a0c=fs[_0xc282e7(0x247)](_0x482aee,_0xc282e7(0x28b)),_0x180236=Buffer[_0xc282e7(0x263)](_0x343a0c,_0xc282e7(0x28b)),_0x2d0187=path['basename'](_0x482aee,_0x1adb9f);let _0xcf57b8=_0x343a0c,_0x3af91e=![];if(_0x1adb9f===_0xc282e7(0x1eb)){const _0x4d319a=JSON[_0xc282e7(0x25d)](_0x343a0c),_0x31f533=Array[_0xc282e7(0x1e3)](_0x4d319a[_0xc282e7(0x27c)])?_0x4d319a[_0xc282e7(0x27c)]:Array[_0xc282e7(0x1e3)](_0x4d319a)?_0x4d319a:null;if(_0x31f533){for(const _0x2040bf of _0x31f533){const _0x1aa3a0=compressMessageContent(_0x2040bf,_0x2d0187,_0x5ab893);if(_0x1aa3a0[_0xc282e7(0x208)])_0x3af91e=!![];}if(_0x3af91e)_0xcf57b8=JSON[_0xc282e7(0x273)](_0x4d319a,null,0x2);}}else{const _0x127fad=_0x343a0c[_0xc282e7(0x22e)]('\x0a'),_0x1d5f1c=[];for(let _0x402aac of _0x127fad){if(!_0x402aac['trim']()){_0x1d5f1c[_0xc282e7(0x1f8)](_0x402aac);continue;}try{const _0x4101e2=JSON[_0xc282e7(0x25d)](_0x402aac),_0x120083=_0x4101e2[_0xc282e7(0x277)]||_0x4101e2;if(_0x120083){const _0x43de11=compressMessageContent(_0x120083,_0x2d0187,_0x5ab893);_0x43de11['modified']&&(_0x3af91e=!![],_0x402aac=JSON[_0xc282e7(0x273)](_0x4101e2));}}catch{}_0x1d5f1c[_0xc282e7(0x1f8)](_0x402aac);}if(_0x3af91e)_0xcf57b8=_0x1d5f1c[_0xc282e7(0x274)]('\x0a');}const _0x330a64=Buffer[_0xc282e7(0x263)](_0xcf57b8,'utf8'),_0x335ef5=path[_0xc282e7(0x274)](path[_0xc282e7(0x202)](_0x482aee),_0x2d0187+_0xc282e7(0x1e7)+_0x1adb9f);fs[_0xc282e7(0x239)](_0x335ef5,_0xcf57b8,'utf8');const _0x2bbfe3=Math[_0xc282e7(0x223)](_0x180236/0x4),_0x554d77=Math[_0xc282e7(0x223)](_0x330a64/0x4),_0x5d1b0a=Math[_0xc282e7(0x28c)](0x0,_0x2bbfe3-_0x554d77),_0x328173=_0x180236>0x0?Math[_0xc282e7(0x1fc)]((0x1-_0x330a64/_0x180236)*0x3e8)/0xa:0x0;return _0x5d1b0a>0x0&&tracker_1[_0xc282e7(0x1f2)]['logExecution'](_0xc282e7(0x1f7)+_0x5ab893,_0x343a0c,_0xcf57b8,_0x5d1b0a,undefined,[_0xc282e7(0x291)+_0x5ab893,_0xc282e7(0x206),_0x5ab893,_0xc282e7(0x260)]),{'ok':!![],'compactPath':_0x335ef5,'rawBytes':_0x180236,'compressedBytes':_0x330a64,'rawTokens':_0x2bbfe3,'compressedTokens':_0x554d77,'savedTokens':_0x5d1b0a,'reductionPct':_0x328173};}catch(_0x13a01c){return{'ok':![],'reason':_0x13a01c?.['message']||_0xc282e7(0x1f0)};}}function compactLiveSession(_0x2ea6f1,_0x2a61a1){const _0x2348a0=a0_0x5cb1a6;try{if(!fs[_0x2348a0(0x27f)](_0x2ea6f1))return{'ok':![],'savedTokens':0x0,'reason':_0x2348a0(0x24c)};const _0x5429f5=path[_0x2348a0(0x23b)](_0x2ea6f1)[_0x2348a0(0x216)]();if(_0x5429f5!==_0x2348a0(0x1eb)&&_0x5429f5!=='.jsonl'&&_0x5429f5!==_0x2348a0(0x234))return{'ok':![],'savedTokens':0x0,'reason':_0x2348a0(0x26c)};const _0x52d05e=fs['readFileSync'](_0x2ea6f1,_0x2348a0(0x28b)),_0x5006f6=Buffer['byteLength'](_0x52d05e,'utf8'),_0x98fc6=Math['ceil'](_0x5006f6/0x4),_0x508f59=path['basename'](_0x2ea6f1,_0x5429f5);let _0x4ace1b=_0x52d05e,_0x19e5bc=![];if(_0x5429f5==='.json'){const _0x3e0f37=JSON[_0x2348a0(0x25d)](_0x52d05e),_0x1f8279=Array[_0x2348a0(0x1e3)](_0x3e0f37[_0x2348a0(0x27c)])?_0x3e0f37[_0x2348a0(0x27c)]:Array[_0x2348a0(0x1e3)](_0x3e0f37)?_0x3e0f37:null;if(_0x1f8279){for(const _0x58e1fb of _0x1f8279){const _0x4faf08=compressMessageContent(_0x58e1fb,_0x508f59,_0x2a61a1);if(_0x4faf08['modified'])_0x19e5bc=!![];}const {compressConversation:_0x69e992}=require('./proxy-conv'),_0x273425=_0x69e992(_0x1f8279,0x9c40);_0x273425[_0x2348a0(0x23f)]>0x0&&(_0x19e5bc=!![],Array['isArray'](_0x3e0f37['messages'])?_0x3e0f37[_0x2348a0(0x27c)]=_0x273425[_0x2348a0(0x27c)]:_0x4ace1b=JSON[_0x2348a0(0x273)](_0x273425[_0x2348a0(0x27c)],null,0x2)),_0x19e5bc&&!Array[_0x2348a0(0x1e3)](_0x3e0f37)&&(_0x4ace1b=JSON['stringify'](_0x3e0f37,null,0x2));}}else{const _0x2b9acf=_0x52d05e[_0x2348a0(0x22e)]('\x0a'),_0x5d1b8e=[],_0x31bc13=[];for(const _0x43b495 of _0x2b9acf){if(!_0x43b495[_0x2348a0(0x282)]())continue;try{const _0x55ab74=JSON['parse'](_0x43b495);_0x5d1b8e[_0x2348a0(0x1f8)](_0x55ab74);const _0x5e39ba=_0x55ab74[_0x2348a0(0x277)]||_0x55ab74;_0x5e39ba&&typeof _0x5e39ba[_0x2348a0(0x22a)]==='string'&&_0x31bc13[_0x2348a0(0x1f8)](_0x5e39ba);}catch{}}for(const _0x352c71 of _0x31bc13){const _0x1e850a=compressMessageContent(_0x352c71,_0x508f59,_0x2a61a1);if(_0x1e850a['modified'])_0x19e5bc=!![];}const {compressConversation:_0x3ea5a8}=require(_0x2348a0(0x270)),_0x41f489=_0x3ea5a8(_0x31bc13,0x9c40);if(_0x41f489[_0x2348a0(0x23f)]>0x0||_0x19e5bc){const _0x566acc=[];for(const _0x407ad4 of _0x5d1b8e){const _0x2dbae2=_0x407ad4[_0x2348a0(0x277)]||_0x407ad4;if(_0x2dbae2&&typeof _0x2dbae2['role']===_0x2348a0(0x204)){const _0x275d35=_0x41f489['messages'][_0x2348a0(0x261)](_0x2fa81d=>_0x2fa81d===_0x2dbae2);_0x275d35?(_0x407ad4[_0x2348a0(0x277)]?_0x407ad4[_0x2348a0(0x277)]=_0x275d35:Object[_0x2348a0(0x1e0)](_0x407ad4,_0x275d35),_0x566acc['push'](JSON['stringify'](_0x407ad4))):_0x19e5bc=!![];}else _0x566acc[_0x2348a0(0x1f8)](JSON[_0x2348a0(0x273)](_0x407ad4));}_0x4ace1b=_0x566acc[_0x2348a0(0x274)]('\x0a'),_0x19e5bc=!![];}}if(_0x19e5bc){const _0x336623=Buffer['byteLength'](_0x4ace1b,'utf8');fs[_0x2348a0(0x239)](_0x2ea6f1,_0x4ace1b,'utf8');const _0x39e9a6=Math[_0x2348a0(0x223)](_0x336623/0x4),_0xf4b637=Math[_0x2348a0(0x28c)](0x0,_0x98fc6-_0x39e9a6);if(_0xf4b637>0x0){const _0x1b64dc=loadSessionsState(),_0x389c7f=_0x1b64dc[_0x2ea6f1]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x4f6478=_0x389c7f['autoCompactSaved']||0x0,_0xdb2593=_0x4f6478+_0xf4b637;saveSessionStateItem(_0x2ea6f1,_0x389c7f[_0x2348a0(0x256)],_0x389c7f[_0x2348a0(0x287)]||0x0,_0x389c7f[_0x2348a0(0x220)]||0x0,_0xdb2593,_0x389c7f[_0x2348a0(0x283)]||0x0),tracker_1['tracker'][_0x2348a0(0x210)](_0x2348a0(0x1f7)+_0x2a61a1,_0x52d05e,_0x4ace1b,_0xf4b637,undefined,[_0x2348a0(0x291)+_0x2a61a1,_0x2348a0(0x206),_0x2a61a1,_0x2348a0(0x260)]);}return{'ok':!![],'savedTokens':_0xf4b637};}return{'ok':!![],'savedTokens':0x0};}catch(_0x5ab4da){return{'ok':![],'savedTokens':0x0,'reason':_0x5ab4da[_0x2348a0(0x277)]||_0x2348a0(0x22c)};}}function installWindowsStartupService(){const _0x35afe2=a0_0x5cb1a6;if(process[_0x35afe2(0x230)]!==_0x35afe2(0x1ec))return;try{const _0x53d78b=path['join'](os[_0x35afe2(0x254)](),'AppData','Roaming',_0x35afe2(0x24f),'Windows','Start\x20Menu',_0x35afe2(0x1df),_0x35afe2(0x276));if(!fs[_0x35afe2(0x27f)](_0x53d78b))fs['mkdirSync'](_0x53d78b,{'recursive':!![]});const _0x51cbdf=path['join'](_0x53d78b,_0x35afe2(0x1f6)),_0x47dfa7=path[_0x35afe2(0x274)](__dirname,_0x35afe2(0x25a)),_0x5c5118=_0x47dfa7[_0x35afe2(0x1e1)](/\\/g,'\x5c\x5c'),_0x51936d=_0x35afe2(0x27d)+_0x5c5118+_0x35afe2(0x265);fs['writeFileSync'](_0x51cbdf,_0x51936d,'utf8');}catch{}}function startWatcherDaemon(){const _0x34ed21=a0_0x5cb1a6;installWindowsStartupService();try{const {installClaudeHooks:_0x57cba0}=require(_0x34ed21(0x26e));_0x57cba0();}catch(_0x39bc1d){}const _0x47225c=[_0x34ed21(0x243),_0x34ed21(0x1f1),_0x34ed21(0x268),_0x34ed21(0x26d),_0x34ed21(0x286),_0x34ed21(0x27a),_0x34ed21(0x26a),_0x34ed21(0x248),_0x34ed21(0x294)];for(const _0x5d0659 of _0x47225c){const _0x52564c=getAgentStoragePaths(_0x5d0659);for(const _0x5fc168 of _0x52564c){if(fs[_0x34ed21(0x27f)](_0x5fc168))try{fs[_0x34ed21(0x23d)](_0x5fc168,{'recursive':!![]},(_0xb0a2a3,_0x5776ed)=>{const _0x2fe59e=_0x34ed21;if(!_0x5776ed)return;const _0x506c65=path[_0x2fe59e(0x274)](_0x5fc168,_0x5776ed);if(debounceTimers[_0x2fe59e(0x21e)](_0x506c65))clearTimeout(debounceTimers[_0x2fe59e(0x1e2)](_0x506c65));const _0x5967f8=setTimeout(()=>processSessionFile(_0x506c65,_0x5d0659),0x1f4);debounceTimers['set'](_0x506c65,_0x5967f8);});}catch{}}}setInterval(()=>{const _0x4f65e5=_0x34ed21;for(const _0x31c2c7 of _0x47225c){try{const _0x7a45c9=getLatestSessionFile(_0x31c2c7);_0x7a45c9&&_0x7a45c9[_0x4f65e5(0x238)]&&processSessionFile(_0x7a45c9[_0x4f65e5(0x238)],_0x31c2c7);}catch{}}},0xbb8);const _0xc2bed8=()=>{const _0x49da4e=_0x34ed21;for(const _0x2412c8 of _0x47225c){try{const _0x4dd7e6=getLatestSessionFile(_0x2412c8);_0x4dd7e6&&_0x4dd7e6[_0x49da4e(0x238)]&&compactLiveSession(_0x4dd7e6[_0x49da4e(0x238)],_0x2412c8);}catch{}}};setTimeout(_0xc2bed8,0x7d0),setInterval(_0xc2bed8,0x2bf20);}
1
+ 'use strict';const a0_0x2f8df4=a0_0x3eb6;(function(_0xa3111f,_0x160a1b){const _0x2267b2=a0_0x3eb6,_0x41bfee=_0xa3111f();while(!![]){try{const _0x2cd36e=parseInt(_0x2267b2(0x151))/0x1*(-parseInt(_0x2267b2(0x13f))/0x2)+-parseInt(_0x2267b2(0xe7))/0x3*(parseInt(_0x2267b2(0xb5))/0x4)+-parseInt(_0x2267b2(0xb9))/0x5+parseInt(_0x2267b2(0xba))/0x6*(parseInt(_0x2267b2(0x116))/0x7)+parseInt(_0x2267b2(0xb2))/0x8+-parseInt(_0x2267b2(0xca))/0x9+-parseInt(_0x2267b2(0x10c))/0xa*(-parseInt(_0x2267b2(0x143))/0xb);if(_0x2cd36e===_0x160a1b)break;else _0x41bfee['push'](_0x41bfee['shift']());}catch(_0x44d9fa){_0x41bfee['push'](_0x41bfee['shift']());}}}(a0_0x3ea5,0xd717c));var __createBinding=this&&this[a0_0x2f8df4(0x120)]||(Object[a0_0x2f8df4(0xfe)]?function(_0x32e913,_0x11b711,_0x380613,_0x120cb8){const _0x55ddb1=a0_0x2f8df4;if(_0x120cb8===undefined)_0x120cb8=_0x380613;var _0x387fa2=Object['getOwnPropertyDescriptor'](_0x11b711,_0x380613);(!_0x387fa2||(_0x55ddb1(0xda)in _0x387fa2?!_0x11b711[_0x55ddb1(0xc2)]:_0x387fa2['writable']||_0x387fa2[_0x55ddb1(0x12c)]))&&(_0x387fa2={'enumerable':!![],'get':function(){return _0x11b711[_0x380613];}}),Object[_0x55ddb1(0x10f)](_0x32e913,_0x120cb8,_0x387fa2);}:function(_0x102659,_0x123e41,_0x1a9695,_0x3337e6){if(_0x3337e6===undefined)_0x3337e6=_0x1a9695;_0x102659[_0x3337e6]=_0x123e41[_0x1a9695];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x2f8df4(0xfe)]?function(_0x39ad9a,_0x2e2c34){const _0x21c050=a0_0x2f8df4;Object[_0x21c050(0x10f)](_0x39ad9a,_0x21c050(0x10a),{'enumerable':!![],'value':_0x2e2c34});}:function(_0xb2e89a,_0x39fb84){_0xb2e89a['default']=_0x39fb84;}),__importStar=this&&this[a0_0x2f8df4(0x140)]||(function(){var _0x21d7bb=function(_0x544209){const _0x2b5d07=a0_0x3eb6;return _0x21d7bb=Object[_0x2b5d07(0xf1)]||function(_0x3f3bc1){const _0x3bb63d=_0x2b5d07;var _0x20a601=[];for(var _0x874cdb in _0x3f3bc1)if(Object['prototype'][_0x3bb63d(0xee)][_0x3bb63d(0xbf)](_0x3f3bc1,_0x874cdb))_0x20a601[_0x20a601[_0x3bb63d(0x157)]]=_0x874cdb;return _0x20a601;},_0x21d7bb(_0x544209);};return function(_0x59566e){const _0x143d01=a0_0x3eb6;if(_0x59566e&&_0x59566e[_0x143d01(0xc2)])return _0x59566e;var _0x1dc88b={};if(_0x59566e!=null){for(var _0x12a982=_0x21d7bb(_0x59566e),_0x1b72c8=0x0;_0x1b72c8<_0x12a982[_0x143d01(0x157)];_0x1b72c8++)if(_0x12a982[_0x1b72c8]!==_0x143d01(0x10a))__createBinding(_0x1dc88b,_0x59566e,_0x12a982[_0x1b72c8]);}return __setModuleDefault(_0x1dc88b,_0x59566e),_0x1dc88b;};}());Object[a0_0x2f8df4(0x10f)](exports,a0_0x2f8df4(0xc2),{'value':!![]}),exports['loadConfig']=loadConfig,exports[a0_0x2f8df4(0xfc)]=saveConfig,exports[a0_0x2f8df4(0xe0)]=getAgentStoragePaths,exports[a0_0x2f8df4(0x145)]=getLatestSessionFile,exports[a0_0x2f8df4(0xd7)]=loadSessionsState,exports['saveSessionStateItem']=saveSessionStateItem,exports[a0_0x2f8df4(0xd2)]=processSessionFile,exports[a0_0x2f8df4(0xd3)]=compactSessionCopy,exports[a0_0x2f8df4(0xce)]=compactLiveSession,exports['installWindowsStartupService']=installWindowsStartupService,exports[a0_0x2f8df4(0x109)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2f8df4(0x103))),os=__importStar(require('os')),cache_manager_1=require('./cache-manager'),tracker_1=require(a0_0x2f8df4(0x131)),baseDir=path[a0_0x2f8df4(0x10b)](os[a0_0x2f8df4(0x121)](),a0_0x2f8df4(0x127)),configPath=path[a0_0x2f8df4(0x10b)](baseDir,a0_0x2f8df4(0xf3)),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 _0x36f434=a0_0x2f8df4;try{if(!fs['existsSync'](baseDir))fs[_0x36f434(0xaa)](baseDir,{'recursive':!![]});if(fs[_0x36f434(0xdd)](configPath)){const _0xe8e3af=JSON[_0x36f434(0xde)](fs[_0x36f434(0x11e)](configPath,_0x36f434(0xe1)));return{...DEFAULT_CONFIG,..._0xe8e3af,'conversation_toggles':{...DEFAULT_CONFIG['conversation_toggles'],..._0xe8e3af[_0x36f434(0x148)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0xe8e3af['custom_storage_paths']||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x7914a4){const _0x5e989a=a0_0x2f8df4,_0x1e31d8=loadConfig(),_0x14844f={..._0x1e31d8,..._0x7914a4,'conversation_toggles':{..._0x1e31d8[_0x5e989a(0x148)],..._0x7914a4[_0x5e989a(0x148)]||{}},'custom_storage_paths':{..._0x1e31d8[_0x5e989a(0x135)],..._0x7914a4[_0x5e989a(0x135)]||{}}};try{if(!fs[_0x5e989a(0xdd)](baseDir))fs[_0x5e989a(0xaa)](baseDir,{'recursive':!![]});fs['writeFileSync'](configPath,JSON[_0x5e989a(0x101)](_0x14844f,null,0x2),'utf8');}catch{}return _0x14844f;}function getAgentStoragePaths(_0x6c2b6c){const _0x5586d2=a0_0x2f8df4,_0x529b20=loadConfig(),_0xe1127=_0x529b20['custom_storage_paths'][_0x6c2b6c];if(_0xe1127&&fs['existsSync'](_0xe1127))return[_0xe1127];const _0x37dc97=os[_0x5586d2(0x121)](),_0x258c4e=process[_0x5586d2(0xe4)]===_0x5586d2(0xc8),_0x56faa0=process[_0x5586d2(0xe4)]===_0x5586d2(0xcc);switch(_0x6c2b6c){case _0x5586d2(0xe2):return[path[_0x5586d2(0x10b)](_0x37dc97,'.claude','projects'),path[_0x5586d2(0x10b)](_0x37dc97,'.claude','history')];case _0x5586d2(0xea):return[path['join'](_0x37dc97,_0x5586d2(0xd8),'sessions'),path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0xe5),_0x5586d2(0x15e),_0x5586d2(0xd4))];case _0x5586d2(0x141):case _0x5586d2(0xc6):return[path[_0x5586d2(0x10b)](_0x37dc97,'.gemini',_0x5586d2(0xc6)),path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0x115)),path['join'](_0x37dc97,'AppData',_0x5586d2(0x15e),_0x5586d2(0xed)),path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0x104),_0x5586d2(0x141))];case _0x5586d2(0x146):if(_0x258c4e)return[path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0xe5),_0x5586d2(0x15e),_0x5586d2(0x14a),_0x5586d2(0xf8),'workspaceStorage')];if(_0x56faa0)return[path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0x12b),_0x5586d2(0x137),'Cursor',_0x5586d2(0xf8),_0x5586d2(0x123))];return[path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0x104),_0x5586d2(0x14a),_0x5586d2(0xf8),_0x5586d2(0x123))];case _0x5586d2(0xb4):return[process[_0x5586d2(0x155)](),path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0x159))];case _0x5586d2(0xf9):if(_0x258c4e)return[path[_0x5586d2(0x10b)](_0x37dc97,'AppData',_0x5586d2(0x13b),_0x5586d2(0x12e))];return[path[_0x5586d2(0x10b)](_0x37dc97,'.config',_0x5586d2(0x12e))];case _0x5586d2(0xfb):return[path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0xb1),_0x5586d2(0x13d)),path['join'](process[_0x5586d2(0x155)](),'.openclaw','context')];case _0x5586d2(0xc3):return[path['join'](_0x37dc97,_0x5586d2(0x11c),_0x5586d2(0x125))];case'cortex':return[path[_0x5586d2(0x10b)](_0x37dc97,_0x5586d2(0x132),_0x5586d2(0xad))];default:return[];}}function getLatestSessionFile(_0x55055d){const _0x562e92=a0_0x2f8df4,_0x22cfe=getAgentStoragePaths(_0x55055d);let _0xc542c7=null,_0x1c65d0=0x0,_0x1cd9ae=null,_0x380939=null;for(const _0x13412f of _0x22cfe){if(fs[_0x562e92(0xdd)](_0x13412f)){if(!_0x380939)_0x380939=_0x13412f;const _0x50b2d2=(_0x184e34,_0x58ed53=0x0)=>{const _0x1da612=_0x562e92;if(_0x58ed53>0x6)return;try{const _0xe0c54f=fs[_0x1da612(0x138)](_0x184e34,{'withFileTypes':!![]});for(const _0x45fb40 of _0xe0c54f){const _0x319ad2=path['join'](_0x184e34,_0x45fb40[_0x1da612(0xe6)]);if(_0x45fb40[_0x1da612(0xff)]()){const _0x4f32c7=_0x45fb40['name'][_0x1da612(0x11f)]();if(_0x4f32c7==='node_modules'||_0x4f32c7==='.git'||_0x4f32c7===_0x1da612(0xef)||_0x4f32c7===_0x1da612(0x14e)||_0x4f32c7===_0x1da612(0x15b)||_0x4f32c7===_0x1da612(0x129)||_0x4f32c7===_0x1da612(0xc9)||_0x4f32c7===_0x1da612(0xf5)||_0x4f32c7===_0x1da612(0xb0)||_0x4f32c7==='out'||_0x4f32c7===_0x1da612(0xb8))continue;_0x50b2d2(_0x319ad2,_0x58ed53+0x1);}else{if(_0x45fb40['isFile']()&&!_0x45fb40[_0x1da612(0xe6)]['startsWith']('.')){const _0x3393a1=_0x45fb40[_0x1da612(0xe6)]['toLowerCase']();if(_0x3393a1[_0x1da612(0x126)](_0x1da612(0x118))||_0x3393a1['endsWith'](_0x1da612(0xbb))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0x14c))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0x13a))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0x100))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0xb7))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0x149))||_0x3393a1['endsWith'](_0x1da612(0xd0))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0xcd))||_0x3393a1[_0x1da612(0x153)]('.wal')||_0x3393a1[_0x1da612(0x153)](_0x1da612(0xf0))||_0x3393a1[_0x1da612(0x153)](_0x1da612(0x142))||_0x3393a1['endsWith']('.lock')||_0x3393a1[_0x1da612(0x153)]('.dat')||_0x3393a1[_0x1da612(0xb3)]('media__')||_0x3393a1['startsWith'](_0x1da612(0x156)))continue;const _0x591d99=fs[_0x1da612(0x111)](_0x319ad2);_0x591d99[_0x1da612(0x134)]>_0x1c65d0&&(_0x1c65d0=_0x591d99[_0x1da612(0x134)],_0xc542c7=_0x45fb40['name'],_0x1cd9ae=_0x319ad2,_0x380939=_0x13412f);}}}}catch{}};_0x50b2d2(_0x13412f);}}return{'fileName':_0xc542c7,'lastModified':_0x1c65d0>0x0?new Date(_0x1c65d0)[_0x562e92(0x154)]():null,'fullPath':_0x1cd9ae,'dirPath':_0x380939};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function a0_0x3ea5(){const _0x4374df=['env','repeat','Windows','4261FOQjle','.json','endsWith','toISOString','cwd','image_','length','TrimPromptDaemon.vbs','.aider.chat.history.md','system','venv','prompt_turn','Unsupported\x20extension','Roaming','mkdirSync','Microsoft','.json1','cache','ceil','push','build','.openclaw','5557752AcVDyQ','startsWith','aider','44zaBXwM','Session\x20file\x20not\x20found','.jpeg','.agents','7776815dQQMZQ','66uuYQkD','.db','logExecution','content','messages','call','live-conv','chunk_id','__esModule','opencode','split','cortex','antigravity','text','win32','.next','1712808lFcKHN','compaction\x20failed','darwin','.pb','compactLiveSession','isArray','.webp','./hooks/claude-hook','processSessionFile','compactSessionCopy','Codex','lineCount','assign','loadSessionsState','.codex','sideCacheSaved','get','role','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','existsSync','parse','modified','getAgentStoragePaths','utf8','claude','matchAll','platform','AppData','name','373629KtftSq','trim','extname','codex','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','tracker','Gemini','hasOwnProperty','.venv','.shm','getOwnPropertyNames','string','config.json','round','dist','TrimPrompt\x20Cache\x20Engine','max','User','copilot','none','openclaw','saveConfig','writeFileSync','create','isDirectory','.jpg','stringify','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','path','.config','hookSavedTokens','saved','set','conv_','startWatcherDaemon','default','join','31731250eNwUGn','has','message','defineProperty','.jsonl','statSync','officialCompactSaved','fullPath','tokens','.gemini','1012039czgUYN','size','.compact','savedTokens','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','\x20tokens).','.opencode','saveChunk','readFileSync','toLowerCase','__createBinding','homedir','./proxy-conv','workspaceStorage','Startup','sessions','includes','.trimprompt','raw_tokens','__pycache__','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','Library','configurable','conv:','github-copilot-cli','replace','compact_copy','./tracker','.cortex','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','mtimeMs','custom_storage_paths','byteLength','Application\x20Support','readdirSync','basename','.png','Local','renameSync','storage','object','686oSLRVh','__importStar','gemini','.tmp','11DOptau','compressed_tokens','getLatestSessionFile','cursor','Summary:\x20Text\x20block\x20offloaded\x20(','conversation_toggles','.gif','Cursor','autoCompactSaved','.vscdb','compact:'];a0_0x3ea5=function(){return _0x4374df;};return a0_0x3ea5();}function a0_0x3eb6(_0x5d545c,_0xa32e60){_0x5d545c=_0x5d545c-0xaa;const _0x3ea5d6=a0_0x3ea5();let _0x3eb609=_0x3ea5d6[_0x5d545c];return _0x3eb609;}function compressMessageContent(_0x59180e,_0x4bd445,_0x103d72){const _0x3e7cc7=a0_0x2f8df4;let _0x3ca0ba=![],_0x518e65=0x0;if(!_0x59180e)return{'modified':_0x3ca0ba,'savedTokens':_0x518e65};const _0x13ad20=_0x3e8090=>_0x3e8090[_0x3e7cc7(0x12f)](/\r\n/g,'\x0a')[_0x3e7cc7(0x12f)](/\n{3,}/g,'\x0a\x0a');if(typeof _0x59180e[_0x3e7cc7(0xbd)]===_0x3e7cc7(0xf2)){let _0x13f079=_0x59180e[_0x3e7cc7(0xbd)],_0x587f08=_0x13ad20(_0x13f079);_0x587f08[_0x3e7cc7(0x157)]<_0x13f079['length']&&(_0x59180e['content']=_0x587f08,_0x3ca0ba=!![],_0x518e65+=Math['ceil']((_0x13f079[_0x3e7cc7(0x157)]-_0x587f08['length'])/0x4));if(_0x59180e[_0x3e7cc7(0xbd)][_0x3e7cc7(0x157)]>OFFLOAD_THRESHOLD_CHARS&&!_0x59180e[_0x3e7cc7(0xbd)][_0x3e7cc7(0x126)](_0x3e7cc7(0xf6))){const _0x3c5dd8='Summary:\x20Content\x20offloaded\x20('+Math[_0x3e7cc7(0xae)](_0x59180e[_0x3e7cc7(0xbd)][_0x3e7cc7(0x157)]/0x4)+_0x3e7cc7(0x11b),_0x19c5c8=(0x0,cache_manager_1['saveChunk'])(_0x4bd445,_0x103d72,_0x59180e[_0x3e7cc7(0xbd)],_0x3c5dd8);_0x59180e[_0x3e7cc7(0xbd)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20('+_0x19c5c8[_0x3e7cc7(0x128)]+_0x3e7cc7(0x133)+_0x19c5c8[_0x3e7cc7(0xc1)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x19c5c8[_0x3e7cc7(0xc1)]+'`\x0a',_0x3ca0ba=!![],_0x518e65+=Math[_0x3e7cc7(0xf7)](0x0,_0x19c5c8[_0x3e7cc7(0x128)]-_0x19c5c8[_0x3e7cc7(0x144)]);}}else{if(Array[_0x3e7cc7(0xcf)](_0x59180e[_0x3e7cc7(0xbd)]))for(const _0x1798c8 of _0x59180e[_0x3e7cc7(0xbd)]){if(_0x1798c8&&typeof _0x1798c8===_0x3e7cc7(0x13e)){if(typeof _0x1798c8[_0x3e7cc7(0xc7)]===_0x3e7cc7(0xf2)){let _0x30e531=_0x1798c8[_0x3e7cc7(0xc7)],_0xa8c308=_0x13ad20(_0x30e531);_0xa8c308[_0x3e7cc7(0x157)]<_0x30e531[_0x3e7cc7(0x157)]&&(_0x1798c8['text']=_0xa8c308,_0x3ca0ba=!![],_0x518e65+=Math['ceil']((_0x30e531['length']-_0xa8c308[_0x3e7cc7(0x157)])/0x4));if(_0x1798c8['text'][_0x3e7cc7(0x157)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1798c8[_0x3e7cc7(0xc7)][_0x3e7cc7(0x126)](_0x3e7cc7(0xf6))){const _0x5df636=_0x3e7cc7(0x147)+Math[_0x3e7cc7(0xae)](_0x1798c8['text'][_0x3e7cc7(0x157)]/0x4)+_0x3e7cc7(0x11b),_0x4fa4f2=(0x0,cache_manager_1[_0x3e7cc7(0x11d)])(_0x4bd445,_0x103d72,_0x1798c8[_0x3e7cc7(0xc7)],_0x5df636);_0x1798c8[_0x3e7cc7(0xc7)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x4fa4f2[_0x3e7cc7(0xc1)]+_0x3e7cc7(0x102)+_0x4fa4f2[_0x3e7cc7(0xc1)]+'`\x0a',_0x3ca0ba=!![],_0x518e65+=Math[_0x3e7cc7(0xf7)](0x0,_0x4fa4f2[_0x3e7cc7(0x128)]-_0x4fa4f2[_0x3e7cc7(0x144)]);}}else{if(typeof _0x1798c8['content']===_0x3e7cc7(0xf2)){let _0x2c7970=_0x1798c8[_0x3e7cc7(0xbd)],_0x334feb=_0x13ad20(_0x2c7970);_0x334feb['length']<_0x2c7970[_0x3e7cc7(0x157)]&&(_0x1798c8[_0x3e7cc7(0xbd)]=_0x334feb,_0x3ca0ba=!![],_0x518e65+=Math['ceil']((_0x2c7970['length']-_0x334feb[_0x3e7cc7(0x157)])/0x4));if(_0x1798c8[_0x3e7cc7(0xbd)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x1798c8[_0x3e7cc7(0xbd)][_0x3e7cc7(0x126)](_0x3e7cc7(0xf6))){const _0x4a8129='Summary:\x20Tool\x20result\x20offloaded\x20('+Math['ceil'](_0x1798c8[_0x3e7cc7(0xbd)]['length']/0x4)+_0x3e7cc7(0x11b),_0x27a403=(0x0,cache_manager_1['saveChunk'])(_0x4bd445,_0x103d72,_0x1798c8[_0x3e7cc7(0xbd)],_0x4a8129);_0x1798c8[_0x3e7cc7(0xbd)]=_0x3e7cc7(0x12a)+_0x27a403[_0x3e7cc7(0xc1)]+_0x3e7cc7(0x102)+_0x27a403['chunk_id']+'`\x0a',_0x3ca0ba=!![],_0x518e65+=Math[_0x3e7cc7(0xf7)](0x0,_0x27a403['raw_tokens']-_0x27a403[_0x3e7cc7(0x144)]);}}}}}}return{'modified':_0x3ca0ba,'savedTokens':_0x518e65};}const sessionsStatePath=path[a0_0x2f8df4(0x10b)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x1f88c6=a0_0x2f8df4;try{if(fs[_0x1f88c6(0xdd)](sessionsStatePath)){const _0x3df304=JSON['parse'](fs[_0x1f88c6(0x11e)](sessionsStatePath,_0x1f88c6(0xe1)));if(_0x3df304&&typeof _0x3df304===_0x1f88c6(0x13e))return sessionsStateMemoryCache=_0x3df304,_0x3df304;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x46cbe0,_0x3b6f78,_0x309e15,_0x5f00b7=0x0,_0x35c065=0x0,_0x3371b5=0x0){const _0x4e01d5=a0_0x2f8df4;try{const _0x49cfed=loadSessionsState(),_0x25ecce=_0x49cfed[_0x46cbe0]||{},_0x291b83=_0x35c065||_0x25ecce[_0x4e01d5(0x14b)]||0x0,_0x16588c=_0x3371b5||_0x25ecce[_0x4e01d5(0x105)]||0x0,_0x2ba1fa=_0x309e15!==undefined?_0x309e15:_0x25ecce[_0x4e01d5(0x112)]||0x0;_0x49cfed[_0x46cbe0]={'lineCount':_0x3b6f78||_0x25ecce[_0x4e01d5(0xd5)]||0x1,'activeSavedTokens':_0x2ba1fa+_0x291b83+_0x16588c,'sideCacheSaved':_0x5f00b7||_0x25ecce[_0x4e01d5(0xd9)]||0x0,'officialCompactSaved':_0x2ba1fa,'autoCompactSaved':_0x291b83,'hookSavedTokens':_0x16588c},sessionsStateMemoryCache=_0x49cfed;if(!fs[_0x4e01d5(0xdd)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});const _0x1960f3=sessionsStatePath+'.tmp';fs['writeFileSync'](_0x1960f3,JSON[_0x4e01d5(0x101)](_0x49cfed,null,0x2),_0x4e01d5(0xe1)),fs[_0x4e01d5(0x13c)](_0x1960f3,sessionsStatePath);}catch{}}function processSessionFile(_0x4567af,_0x414932){const _0x3317c5=a0_0x2f8df4;try{if(!fs[_0x3317c5(0xdd)](_0x4567af))return;const _0x577118=fs[_0x3317c5(0x111)](_0x4567af);if(_0x577118[_0x3317c5(0xff)]()||_0x577118[_0x3317c5(0x117)]===0x0)return;const _0x5e53ae=loadConfig(),_0x4bcc7b=_0x3317c5(0x108)+_0x414932;if(_0x5e53ae[_0x3317c5(0x148)][_0x4bcc7b]===![])return;const _0x2571f0=fs[_0x3317c5(0x11e)](_0x4567af,_0x3317c5(0xe1)),_0x3d7bee=path[_0x3317c5(0xe9)](_0x4567af)[_0x3317c5(0x11f)]();let _0x14fb81=0x1;if(_0x3d7bee===_0x3317c5(0x110)||_0x3d7bee===_0x3317c5(0xac))_0x14fb81=_0x2571f0['split']('\x0a')['filter'](Boolean)[_0x3317c5(0x157)];else{if(_0x3d7bee===_0x3317c5(0x152))try{const _0x478ae7=JSON['parse'](_0x2571f0),_0x3c6961=Array[_0x3317c5(0xcf)](_0x478ae7[_0x3317c5(0xbe)])?_0x478ae7[_0x3317c5(0xbe)]:Array[_0x3317c5(0xcf)](_0x478ae7)?_0x478ae7:null;if(_0x3c6961)_0x14fb81=_0x3c6961[_0x3317c5(0x157)];}catch{}}let _0x6ad753=0x0;if((_0x3d7bee===_0x3317c5(0x110)||_0x3d7bee===_0x3317c5(0xac))&&_0x2571f0[_0x3317c5(0x126)](_0x3317c5(0x106))&&_0x2571f0[_0x3317c5(0x126)](_0x3317c5(0x114))){const _0x59f031=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x37165b of _0x2571f0[_0x3317c5(0xc4)]('\x0a')){if(!_0x37165b[_0x3317c5(0x126)](_0x3317c5(0x106))||!_0x37165b[_0x3317c5(0x126)]('tokens'))continue;try{const _0x186ea2=JSON[_0x3317c5(0xde)](_0x37165b);if(_0x186ea2['type']!==_0x3317c5(0x15a))continue;const _0x5aae9c=typeof _0x186ea2[_0x3317c5(0xbd)]==='string'?_0x186ea2[_0x3317c5(0xbd)]:_0x186ea2[_0x3317c5(0x10e)]&&typeof _0x186ea2[_0x3317c5(0x10e)][_0x3317c5(0xbd)]===_0x3317c5(0xf2)?_0x186ea2['message'][_0x3317c5(0xbd)]:'';if(!_0x5aae9c)continue;for(const _0x31c08a of _0x5aae9c[_0x3317c5(0xe3)](_0x59f031)){let _0x7c5384=parseFloat(_0x31c08a[0x1]);if(_0x31c08a[0x0][_0x3317c5(0x11f)]()[_0x3317c5(0x126)]('k'))_0x7c5384=_0x7c5384*0x3e8;_0x6ad753+=Math[_0x3317c5(0xf4)](_0x7c5384);}}catch{}}}const _0x13a357=loadSessionsState(),_0x5bea9b=_0x13a357[_0x4567af],_0x11d7b8=_0x5bea9b?_0x5bea9b['lineCount']:0x0,_0x33e99e=_0x5bea9b?_0x5bea9b['activeSavedTokens']||0x0:0x0;if(_0x11d7b8>0x0&&_0x14fb81>_0x11d7b8&&_0x33e99e>0x0){const _0x312abc=_0x3317c5(0x12d)+_0x414932;tracker_1[_0x3317c5(0xec)][_0x3317c5(0xbc)](_0x312abc,'A'[_0x3317c5(0x14f)](_0x33e99e*0x4),'',0x0,undefined,[_0x3317c5(0x108)+_0x414932,'live-conv',_0x414932,_0x3317c5(0x15c)]);}const _0x43759a=_0x5bea9b&&_0x5bea9b[_0x3317c5(0x112)]!==undefined?_0x5bea9b[_0x3317c5(0x112)]:0x0,_0x5d9d6f=Math['max'](_0x43759a,_0x6ad753);saveSessionStateItem(_0x4567af,_0x14fb81,_0x5d9d6f,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x53d3fa,_0x2cc3f7){const _0x16def6=a0_0x2f8df4;try{if(!fs[_0x16def6(0xdd)](_0x53d3fa))return{'ok':![],'reason':_0x16def6(0xb6)};const _0x304c61=path['extname'](_0x53d3fa)['toLowerCase']();if(_0x304c61!==_0x16def6(0x152)&&_0x304c61!==_0x16def6(0x110)&&_0x304c61!==_0x16def6(0xac))return{'ok':![],'reason':'Unsupported\x20format\x20\x27'+(_0x304c61||_0x16def6(0xfa))+_0x16def6(0xeb)};const _0x357b57=fs[_0x16def6(0x11e)](_0x53d3fa,_0x16def6(0xe1)),_0x4c7965=Buffer['byteLength'](_0x357b57,_0x16def6(0xe1)),_0x270686=path[_0x16def6(0x139)](_0x53d3fa,_0x304c61);let _0x1e110a=_0x357b57,_0x3ad7aa=![];if(_0x304c61===_0x16def6(0x152)){const _0x22c7ce=JSON[_0x16def6(0xde)](_0x357b57),_0x2d658f=Array[_0x16def6(0xcf)](_0x22c7ce[_0x16def6(0xbe)])?_0x22c7ce['messages']:Array[_0x16def6(0xcf)](_0x22c7ce)?_0x22c7ce:null;if(_0x2d658f){for(const _0x24274e of _0x2d658f){const _0x49d001=compressMessageContent(_0x24274e,_0x270686,_0x2cc3f7);if(_0x49d001[_0x16def6(0xdf)])_0x3ad7aa=!![];}if(_0x3ad7aa)_0x1e110a=JSON[_0x16def6(0x101)](_0x22c7ce,null,0x2);}}else{const _0x3263c4=_0x357b57[_0x16def6(0xc4)]('\x0a'),_0x1eb52=[];for(let _0x389f25 of _0x3263c4){if(!_0x389f25[_0x16def6(0xe8)]()){_0x1eb52[_0x16def6(0xaf)](_0x389f25);continue;}try{const _0x40e0fc=JSON[_0x16def6(0xde)](_0x389f25),_0x3a604f=_0x40e0fc[_0x16def6(0x10e)]||_0x40e0fc;if(_0x3a604f){const _0x25b81c=compressMessageContent(_0x3a604f,_0x270686,_0x2cc3f7);_0x25b81c[_0x16def6(0xdf)]&&(_0x3ad7aa=!![],_0x389f25=JSON[_0x16def6(0x101)](_0x40e0fc));}}catch{}_0x1eb52[_0x16def6(0xaf)](_0x389f25);}if(_0x3ad7aa)_0x1e110a=_0x1eb52[_0x16def6(0x10b)]('\x0a');}const _0x35be37=Buffer[_0x16def6(0x136)](_0x1e110a,_0x16def6(0xe1)),_0xd67ccd=path[_0x16def6(0x10b)](path['dirname'](_0x53d3fa),_0x270686+_0x16def6(0x118)+_0x304c61);fs[_0x16def6(0xfd)](_0xd67ccd,_0x1e110a,_0x16def6(0xe1));const _0x542571=Math['ceil'](_0x4c7965/0x4),_0x437604=Math[_0x16def6(0xae)](_0x35be37/0x4),_0x5df407=Math[_0x16def6(0xf7)](0x0,_0x542571-_0x437604),_0x355cd9=_0x4c7965>0x0?Math[_0x16def6(0xf4)]((0x1-_0x35be37/_0x4c7965)*0x3e8)/0xa:0x0;return _0x5df407>0x0&&tracker_1[_0x16def6(0xec)][_0x16def6(0xbc)](_0x16def6(0x14d)+_0x2cc3f7,_0x357b57,_0x1e110a,_0x5df407,undefined,[_0x16def6(0x108)+_0x2cc3f7,'live-conv',_0x2cc3f7,_0x16def6(0x130)]),{'ok':!![],'compactPath':_0xd67ccd,'rawBytes':_0x4c7965,'compressedBytes':_0x35be37,'rawTokens':_0x542571,'compressedTokens':_0x437604,'savedTokens':_0x5df407,'reductionPct':_0x355cd9};}catch(_0x1f166e){return{'ok':![],'reason':_0x1f166e?.[_0x16def6(0x10e)]||_0x16def6(0xcb)};}}function compactLiveSession(_0xe52688,_0x39d61e){const _0x1fe993=a0_0x2f8df4;try{if(!fs[_0x1fe993(0xdd)](_0xe52688))return{'ok':![],'savedTokens':0x0,'reason':'File\x20not\x20found'};const _0x4cb948=path[_0x1fe993(0xe9)](_0xe52688)['toLowerCase']();if(_0x4cb948!==_0x1fe993(0x152)&&_0x4cb948!==_0x1fe993(0x110)&&_0x4cb948!==_0x1fe993(0xac))return{'ok':![],'savedTokens':0x0,'reason':_0x1fe993(0x15d)};const _0x3b610f=fs[_0x1fe993(0x11e)](_0xe52688,'utf8'),_0x5b1d95=Buffer[_0x1fe993(0x136)](_0x3b610f,_0x1fe993(0xe1)),_0x317459=Math['ceil'](_0x5b1d95/0x4),_0x186c0e=path[_0x1fe993(0x139)](_0xe52688,_0x4cb948);let _0x2644f6=_0x3b610f,_0x21b5b3=![];if(_0x4cb948===_0x1fe993(0x152)){const _0x5518d2=JSON[_0x1fe993(0xde)](_0x3b610f),_0x479d3e=Array[_0x1fe993(0xcf)](_0x5518d2[_0x1fe993(0xbe)])?_0x5518d2[_0x1fe993(0xbe)]:Array[_0x1fe993(0xcf)](_0x5518d2)?_0x5518d2:null;if(_0x479d3e){for(const _0x2111e4 of _0x479d3e){const _0x49e1a6=compressMessageContent(_0x2111e4,_0x186c0e,_0x39d61e);if(_0x49e1a6[_0x1fe993(0xdf)])_0x21b5b3=!![];}const {compressConversation:_0x34d0c8}=require(_0x1fe993(0x122)),_0x58c82f=_0x34d0c8(_0x479d3e,0x9c40);_0x58c82f[_0x1fe993(0x119)]>0x0&&(_0x21b5b3=!![],Array['isArray'](_0x5518d2[_0x1fe993(0xbe)])?_0x5518d2[_0x1fe993(0xbe)]=_0x58c82f[_0x1fe993(0xbe)]:_0x2644f6=JSON[_0x1fe993(0x101)](_0x58c82f['messages'],null,0x2)),_0x21b5b3&&!Array[_0x1fe993(0xcf)](_0x5518d2)&&(_0x2644f6=JSON['stringify'](_0x5518d2,null,0x2));}}else{const _0x27bd96=_0x3b610f[_0x1fe993(0xc4)]('\x0a'),_0x1d936a=[],_0x5919e9=[];for(const _0x55632b of _0x27bd96){if(!_0x55632b[_0x1fe993(0xe8)]())continue;try{const _0x318c97=JSON[_0x1fe993(0xde)](_0x55632b);_0x1d936a[_0x1fe993(0xaf)](_0x318c97);const _0x546de9=_0x318c97[_0x1fe993(0x10e)]||_0x318c97;_0x546de9&&typeof _0x546de9[_0x1fe993(0xdb)]===_0x1fe993(0xf2)&&_0x5919e9['push'](_0x546de9);}catch{}}for(const _0x5806d2 of _0x5919e9){const _0x44d5b6=compressMessageContent(_0x5806d2,_0x186c0e,_0x39d61e);if(_0x44d5b6[_0x1fe993(0xdf)])_0x21b5b3=!![];}const {compressConversation:_0x324488}=require(_0x1fe993(0x122)),_0x2a1328=_0x324488(_0x5919e9,0x9c40);if(_0x2a1328[_0x1fe993(0x119)]>0x0||_0x21b5b3){const _0x348a20=[];for(const _0x1f70ff of _0x1d936a){const _0x3f3bc0=_0x1f70ff[_0x1fe993(0x10e)]||_0x1f70ff;if(_0x3f3bc0&&typeof _0x3f3bc0['role']===_0x1fe993(0xf2)){const _0x1a01ae=_0x2a1328[_0x1fe993(0xbe)]['find'](_0x382691=>_0x382691===_0x3f3bc0);_0x1a01ae?(_0x1f70ff[_0x1fe993(0x10e)]?_0x1f70ff[_0x1fe993(0x10e)]=_0x1a01ae:Object[_0x1fe993(0xd6)](_0x1f70ff,_0x1a01ae),_0x348a20[_0x1fe993(0xaf)](JSON[_0x1fe993(0x101)](_0x1f70ff))):_0x21b5b3=!![];}else _0x348a20[_0x1fe993(0xaf)](JSON[_0x1fe993(0x101)](_0x1f70ff));}_0x2644f6=_0x348a20[_0x1fe993(0x10b)]('\x0a'),_0x21b5b3=!![];}}if(_0x21b5b3){const _0x2edd48=Buffer[_0x1fe993(0x136)](_0x2644f6,_0x1fe993(0xe1));fs[_0x1fe993(0xfd)](_0xe52688,_0x2644f6,'utf8');const _0xa80a6f=Math[_0x1fe993(0xae)](_0x2edd48/0x4),_0x3c2a98=Math['max'](0x0,_0x317459-_0xa80a6f);if(_0x3c2a98>0x0){const _0x48d8e5=loadSessionsState(),_0x53147=_0x48d8e5[_0xe52688]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0xfa708e=_0x53147[_0x1fe993(0x14b)]||0x0,_0x4f4ee6=_0xfa708e+_0x3c2a98;saveSessionStateItem(_0xe52688,_0x53147[_0x1fe993(0xd5)],_0x53147[_0x1fe993(0x112)]||0x0,_0x53147[_0x1fe993(0xd9)]||0x0,_0x4f4ee6,_0x53147['hookSavedTokens']||0x0),tracker_1[_0x1fe993(0xec)]['logExecution']('compact:'+_0x39d61e,_0x3b610f,_0x2644f6,_0x3c2a98,undefined,[_0x1fe993(0x108)+_0x39d61e,_0x1fe993(0xc0),_0x39d61e,'compact_copy']);}return{'ok':!![],'savedTokens':_0x3c2a98};}return{'ok':!![],'savedTokens':0x0};}catch(_0x371577){return{'ok':![],'savedTokens':0x0,'reason':_0x371577[_0x1fe993(0x10e)]||'Compaction\x20failed'};}}function installWindowsStartupService(){const _0x18c38e=a0_0x2f8df4;if(process[_0x18c38e(0xe4)]!==_0x18c38e(0xc8))return;try{const _0x229ff8=path[_0x18c38e(0x10b)](os[_0x18c38e(0x121)](),_0x18c38e(0xe5),_0x18c38e(0x15e),_0x18c38e(0xab),_0x18c38e(0x150),'Start\x20Menu','Programs',_0x18c38e(0x124));if(!fs[_0x18c38e(0xdd)](_0x229ff8))fs[_0x18c38e(0xaa)](_0x229ff8,{'recursive':!![]});const _0x239789=path[_0x18c38e(0x10b)](_0x229ff8,_0x18c38e(0x158)),_0x332f05=path[_0x18c38e(0x10b)](__dirname,'cli.js'),_0x5c3703=_0x332f05[_0x18c38e(0x12f)](/\\/g,'\x5c\x5c'),_0x4a9918=_0x18c38e(0xdc)+_0x5c3703+_0x18c38e(0x11a);fs[_0x18c38e(0xfd)](_0x239789,_0x4a9918,'utf8');}catch{}}function startWatcherDaemon(){const _0x5e6f07=a0_0x2f8df4;installWindowsStartupService();try{const {installClaudeHooks:_0x589d83}=require(_0x5e6f07(0xd1));_0x589d83();}catch(_0x54781b){}const _0x31b930=[_0x5e6f07(0xe2),_0x5e6f07(0x141),'codex',_0x5e6f07(0x146),_0x5e6f07(0xb4),_0x5e6f07(0xf9),'openclaw',_0x5e6f07(0xc3),_0x5e6f07(0xc5)];for(const _0x44944f of _0x31b930){const _0x17adb4=getAgentStoragePaths(_0x44944f);for(const _0x15d2c9 of _0x17adb4){if(fs[_0x5e6f07(0xdd)](_0x15d2c9))try{fs['watch'](_0x15d2c9,{'recursive':!![]},(_0x579df8,_0xeeab2e)=>{const _0x28731e=_0x5e6f07;if(!_0xeeab2e)return;const _0x132712=path[_0x28731e(0x10b)](_0x15d2c9,_0xeeab2e);if(debounceTimers[_0x28731e(0x10d)](_0x132712))clearTimeout(debounceTimers['get'](_0x132712));const _0x244a50=setTimeout(()=>processSessionFile(_0x132712,_0x44944f),0x1f4);debounceTimers[_0x28731e(0x107)](_0x132712,_0x244a50);});}catch{}}}setInterval(()=>{for(const _0x5aca5c of _0x31b930){try{const _0x303c61=getLatestSessionFile(_0x5aca5c);_0x303c61&&_0x303c61['fullPath']&&processSessionFile(_0x303c61['fullPath'],_0x5aca5c);}catch{}}},0xbb8);const _0x3b963e=()=>{const _0x2c2630=_0x5e6f07;for(const _0x1ef1a8 of _0x31b930){try{const _0x323ea4=getLatestSessionFile(_0x1ef1a8);_0x323ea4&&_0x323ea4[_0x2c2630(0x113)]&&compactLiveSession(_0x323ea4[_0x2c2630(0x113)],_0x1ef1a8);}catch{}}};setTimeout(_0x3b963e,0x7d0),setInterval(_0x3b963e,0x2bf20);}
package/filters/devops.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x2d9015=a0_0x56eb;(function(_0xfee13,_0x4aebe0){const _0x13ed71=a0_0x56eb,_0x31b0d1=_0xfee13();while(!![]){try{const _0x4f7c88=-parseInt(_0x13ed71(0xe5))/0x1+parseInt(_0x13ed71(0xed))/0x2+-parseInt(_0x13ed71(0xce))/0x3*(parseInt(_0x13ed71(0xe1))/0x4)+-parseInt(_0x13ed71(0xd5))/0x5*(-parseInt(_0x13ed71(0xf5))/0x6)+-parseInt(_0x13ed71(0xca))/0x7*(-parseInt(_0x13ed71(0xf1))/0x8)+parseInt(_0x13ed71(0xfc))/0x9*(-parseInt(_0x13ed71(0xf2))/0xa)+-parseInt(_0x13ed71(0xe0))/0xb;if(_0x4f7c88===_0x4aebe0)break;else _0x31b0d1['push'](_0x31b0d1['shift']());}catch(_0x4091e0){_0x31b0d1['push'](_0x31b0d1['shift']());}}}(a0_0x547e,0x2bfa3));Object[a0_0x2d9015(0xcc)](exports,a0_0x2d9015(0xd4),{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports[a0_0x2d9015(0xde)]=filterDockerImages,exports[a0_0x2d9015(0xea)]=filterDockerLogs,exports[a0_0x2d9015(0xe2)]=filterKubectl,exports[a0_0x2d9015(0xfb)]=filterRuff;function filterDockerPs(_0x3a51bf){const _0x110f3c=a0_0x2d9015,_0x222463=_0x3a51bf[_0x110f3c(0xec)]('\x0a')[_0x110f3c(0xdd)](_0x3a3353=>_0x3a3353['trim']()[_0x110f3c(0xd1)]>0x0);if(_0x222463[_0x110f3c(0xd1)]===0x0)return'No\x20containers\x20running';if(_0x222463[_0x110f3c(0xd1)]<=0xa)return _0x3a51bf['trim']();const _0x50d02a=_0x222463[0x0],_0x299771=_0x222463[_0x110f3c(0xf6)](0x1),_0x4c439a=[];_0x4c439a[_0x110f3c(0xd9)](_0x110f3c(0xe3)+_0x299771[_0x110f3c(0xd1)]+_0x110f3c(0xdb)),_0x4c439a[_0x110f3c(0xd9)]('');for(const _0x4bceae of _0x299771){const _0xfaaca6=_0x4bceae[_0x110f3c(0xec)](/\s{2,}/);if(_0xfaaca6[_0x110f3c(0xd1)]>=0x5){const _0x403d30=_0xfaaca6[0x0]['substring'](0x0,0xc),_0x15f4ef=_0xfaaca6[0x1],_0x4d3208=_0xfaaca6[_0xfaaca6[_0x110f3c(0xd1)]-0x2]||'',_0x2a8676=_0xfaaca6[_0xfaaca6['length']-0x1]||'';_0x4c439a['push']('\x20\x20'+_0x403d30+'\x20\x20'+_0x15f4ef+'\x20\x20'+_0x4d3208+'\x20\x20'+_0x2a8676);}else _0x4c439a[_0x110f3c(0xd9)]('\x20\x20'+_0x4bceae[_0x110f3c(0xeb)]());}return _0x4c439a[_0x110f3c(0xf9)]('\x0a');}function a0_0x56eb(_0x2de6a2,_0x286edd){_0x2de6a2=_0x2de6a2-0xca;const _0x547ebc=a0_0x547e();let _0x56ebad=_0x547ebc[_0x2de6a2];return _0x56ebad;}function filterDockerImages(_0x30215d){const _0x5b6b2b=a0_0x2d9015,_0x112d81=_0x30215d['split']('\x0a')[_0x5b6b2b(0xdd)](_0x56a2ca=>_0x56a2ca[_0x5b6b2b(0xeb)]()[_0x5b6b2b(0xd1)]>0x0);if(_0x112d81[_0x5b6b2b(0xd1)]<=0x1)return _0x5b6b2b(0xe6);if(_0x112d81[_0x5b6b2b(0xd1)]<=0xf)return _0x30215d[_0x5b6b2b(0xeb)]();const _0xb72c98=_0x112d81[_0x5b6b2b(0xf6)](0x1),_0x548139=[_0x5b6b2b(0xd0)+_0xb72c98[_0x5b6b2b(0xd1)]+_0x5b6b2b(0xdb)];_0x548139[_0x5b6b2b(0xd9)]('');const _0x156866=_0xb72c98[_0x5b6b2b(0xf6)](0x0,0x14);for(const _0x9cae54 of _0x156866){const _0x5ef4d3=_0x9cae54[_0x5b6b2b(0xec)](/\s{2,}/);if(_0x5ef4d3[_0x5b6b2b(0xd1)]>=0x3){const _0x56a4d1=_0x5ef4d3[0x0],_0x441591=_0x5ef4d3[0x1],_0x236379=_0x5ef4d3[_0x5ef4d3[_0x5b6b2b(0xd1)]-0x1]||'';_0x548139[_0x5b6b2b(0xd9)]('\x20\x20'+_0x56a4d1+':'+_0x441591+'\x20\x20'+_0x236379);}else _0x548139[_0x5b6b2b(0xd9)]('\x20\x20'+_0x9cae54[_0x5b6b2b(0xeb)]());}return _0xb72c98['length']>0x14&&_0x548139[_0x5b6b2b(0xd9)](_0x5b6b2b(0xf7)+(_0xb72c98[_0x5b6b2b(0xd1)]-0x14)+_0x5b6b2b(0xcf)),_0x548139[_0x5b6b2b(0xf9)]('\x0a');}function filterDockerLogs(_0x51ca1b){const _0x25e93d=a0_0x2d9015,_0x1c436c=_0x51ca1b[_0x25e93d(0xec)]('\x0a');if(_0x1c436c['length']<=0x32)return _0x51ca1b;const _0x3a51fc=[];return _0x3a51fc['push'](..._0x1c436c[_0x25e93d(0xf6)](0x0,0x14)),_0x3a51fc['push'](_0x25e93d(0xd2)+(_0x1c436c[_0x25e93d(0xd1)]-0x28)+_0x25e93d(0xf8)),_0x3a51fc['push'](..._0x1c436c[_0x25e93d(0xf6)](-0x14)),_0x3a51fc[_0x25e93d(0xd9)]('\x0a('+_0x1c436c[_0x25e93d(0xd1)]+_0x25e93d(0xe9)),_0x3a51fc[_0x25e93d(0xf9)]('\x0a');}function a0_0x547e(){const _0x50b065=['\x20more\x20images','Docker\x20images:\x20','length','\x0a...\x20[','All\x20checks\x20passed','__esModule','578070gucvhT','Found\x200\x20error','\x20resources\x20found','startsWith','push','\x20issues\x20in\x20','\x20total','Events:','filter','filterDockerImages','\x20files','3968525WPMYaj','12psSIAN','filterKubectl','Containers:\x20','includes','73461lAiqWb','No\x20images\x20found','Ruff:\x20','\x20more\x20files','\x20log\x20lines\x20total)','filterDockerLogs','trim','split','148340esExRv','\x20\x20...\x20(','\x20more\x20lines','Ruff:\x20no\x20issues\x20found','4216JrbQxv','910xcspWL','describe','logs','18XgiVLz','slice','\x20\x20...\x20+','\x20lines\x20truncated]\x20...\x0a','join','...\x20+','filterRuff','4554eGDNQb','\x20more\x20events','match','4151VOpNMa','\x20more\x20resources','defineProperty','No\x20resources\x20found','73110mkZBUM'];a0_0x547e=function(){return _0x50b065;};return a0_0x547e();}function filterKubectl(_0x33717d,_0xcb0f18){const _0x437888=a0_0x2d9015,_0x37b957=_0x33717d['split']('\x0a')['filter'](_0x1711c8=>_0x1711c8[_0x437888(0xeb)]()['length']>0x0);if(_0x37b957['length']===0x0)return _0x437888(0xcd);if(_0x37b957['length']<=0x14)return _0x33717d[_0x437888(0xeb)]();if(_0xcb0f18==='get'){const _0x4e7177=_0x37b957[0x0],_0x3a90de=_0x37b957[_0x437888(0xf6)](0x1),_0x266193=[_0x3a90de[_0x437888(0xd1)]+_0x437888(0xd7),'',_0x4e7177];return _0x3a90de[_0x437888(0xd1)]<=0x1e?_0x266193['push'](..._0x3a90de):(_0x266193[_0x437888(0xd9)](..._0x3a90de[_0x437888(0xf6)](0x0,0x19)),_0x266193[_0x437888(0xd9)](_0x437888(0xfa)+(_0x3a90de[_0x437888(0xd1)]-0x19)+_0x437888(0xcb))),_0x266193[_0x437888(0xf9)]('\x0a');}if(_0xcb0f18===_0x437888(0xf3)){const _0x216904=[];let _0x47832f=![],_0x3575e2=0x0;for(const _0x2a1fc2 of _0x37b957){if(_0x2a1fc2[_0x437888(0xd8)](_0x437888(0xdc))){_0x47832f=!![],_0x216904[_0x437888(0xd9)](_0x2a1fc2);continue;}if(_0x47832f){_0x3575e2++;if(_0x3575e2<=0x5)_0x216904[_0x437888(0xd9)](_0x2a1fc2);}else _0x216904['push'](_0x2a1fc2);}return _0x3575e2>0x5&&_0x216904[_0x437888(0xd9)](_0x437888(0xf7)+(_0x3575e2-0x5)+_0x437888(0xfd)),_0x216904[_0x437888(0xf9)]('\x0a');}if(_0xcb0f18===_0x437888(0xf4))return filterDockerLogs(_0x33717d);const _0x21dc9c=_0x37b957['slice'](0x0,0x1e);return _0x37b957[_0x437888(0xd1)]>0x1e&&_0x21dc9c[_0x437888(0xd9)]('...\x20+'+(_0x37b957[_0x437888(0xd1)]-0x1e)+_0x437888(0xef)),_0x21dc9c[_0x437888(0xf9)]('\x0a');}function filterRuff(_0xeeba69){const _0x260915=a0_0x2d9015,_0x3dcce0=_0xeeba69[_0x260915(0xec)]('\x0a')[_0x260915(0xdd)](_0x2c66a6=>_0x2c66a6['trim']()[_0x260915(0xd1)]>0x0);if(_0x3dcce0['length']===0x0)return _0x260915(0xf0);if(_0xeeba69[_0x260915(0xe4)](_0x260915(0xd3))||_0xeeba69['includes'](_0x260915(0xd6)))return'Ruff:\x20all\x20checks\x20passed';const _0x4ac925=_0xeeba69[_0x260915(0xfe)](/Found (\d+) error/),_0x2bc18a=_0x4ac925?parseInt(_0x4ac925[0x1]):_0x3dcce0['length'],_0xcb7f3a={},_0x3664db=[];for(const _0xd10078 of _0x3dcce0){const _0x2b1a84=_0xd10078[_0x260915(0xfe)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x2b1a84){const _0xae8106=_0x2b1a84[0x1],_0x596146=_0xae8106[_0x260915(0xec)](':')[0x0];if(!_0xcb7f3a[_0x596146])_0xcb7f3a[_0x596146]=[];_0xcb7f3a[_0x596146][_0x260915(0xd9)](_0xd10078);}else _0x3664db[_0x260915(0xd9)](_0xd10078);}const _0x46e04a=Object['keys'](_0xcb7f3a);if(_0x46e04a[_0x260915(0xd1)]===0x0){if(_0x3dcce0[_0x260915(0xd1)]<=0x14)return _0xeeba69['trim']();return _0x3dcce0[_0x260915(0xf6)](0x0,0xf)['join']('\x0a')+('\x0a...\x20+'+(_0x3dcce0[_0x260915(0xd1)]-0xf)+'\x20more');}const _0x6be765=[_0x260915(0xe7)+_0x2bc18a+'\x20issues\x20in\x20'+_0x46e04a['length']+_0x260915(0xdf)];_0x6be765[_0x260915(0xd9)]('');const _0x4051b2=0xa;for(const _0x308a3a of _0x46e04a['slice'](0x0,_0x4051b2)){const _0x58dfbb=_0xcb7f3a[_0x308a3a];if(_0x58dfbb[_0x260915(0xd1)]<=0x3){for(const _0x4eeb61 of _0x58dfbb)_0x6be765[_0x260915(0xd9)]('\x20\x20'+_0x4eeb61);}else _0x6be765[_0x260915(0xd9)]('\x20\x20'+_0x58dfbb[0x0]),_0x6be765[_0x260915(0xd9)](_0x260915(0xee)+_0x58dfbb[_0x260915(0xd1)]+_0x260915(0xda)+_0x308a3a+')');}return _0x46e04a[_0x260915(0xd1)]>_0x4051b2&&_0x6be765[_0x260915(0xd9)]('\x20\x20...\x20+'+(_0x46e04a[_0x260915(0xd1)]-_0x4051b2)+_0x260915(0xe8)),_0x6be765[_0x260915(0xf9)]('\x0a');}
1
+ 'use strict';const a0_0x1de0f4=a0_0x70dc;(function(_0x57916d,_0x556d9e){const _0x315967=a0_0x70dc,_0x5583fa=_0x57916d();while(!![]){try{const _0xf560a8=-parseInt(_0x315967(0x19d))/0x1*(-parseInt(_0x315967(0x1ab))/0x2)+-parseInt(_0x315967(0x196))/0x3+-parseInt(_0x315967(0x191))/0x4*(parseInt(_0x315967(0x19c))/0x5)+-parseInt(_0x315967(0x1bf))/0x6+-parseInt(_0x315967(0x1b5))/0x7*(-parseInt(_0x315967(0x19b))/0x8)+-parseInt(_0x315967(0x19a))/0x9+-parseInt(_0x315967(0x1b1))/0xa*(-parseInt(_0x315967(0x1bd))/0xb);if(_0xf560a8===_0x556d9e)break;else _0x5583fa['push'](_0x5583fa['shift']());}catch(_0x347061){_0x5583fa['push'](_0x5583fa['shift']());}}}(a0_0x369e,0x9d23a));function a0_0x70dc(_0x59d48e,_0x29014d){_0x59d48e=_0x59d48e-0x18d;const _0x369e7d=a0_0x369e();let _0x70dc1c=_0x369e7d[_0x59d48e];return _0x70dc1c;}function a0_0x369e(){const _0x114866=['Found\x200\x20error','Docker\x20images:\x20','\x20more','4QehlkV','\x20more\x20images','filterDockerImages','\x20more\x20lines','...\x20+','2647047AQckoL','All\x20checks\x20passed','__esModule','\x20more\x20files','2239992uuDxcA','5112DgHxAL','1962010BuliCX','330793gdXcCG','\x20more\x20events','\x20\x20...\x20(','filterDockerPs','defineProperty','includes','No\x20resources\x20found','\x20lines\x20truncated]\x20...\x0a','trim','slice','\x20\x20...\x20+','\x20total','length','get','4obKRwZ','Ruff:\x20no\x20issues\x20found','match','push','No\x20images\x20found','describe','1370NUJVwX','startsWith','Events:','split','12537bvdAje','filter','filterKubectl','\x20more\x20resources','Ruff:\x20all\x20checks\x20passed','filterDockerLogs','Containers:\x20','\x20issues\x20in\x20','120329IqkUhy','substring','6824382OlmPKy','join','\x20files'];a0_0x369e=function(){return _0x114866;};return a0_0x369e();}Object[a0_0x1de0f4(0x1a1)](exports,a0_0x1de0f4(0x198),{'value':!![]}),exports[a0_0x1de0f4(0x1a0)]=filterDockerPs,exports[a0_0x1de0f4(0x193)]=filterDockerImages,exports[a0_0x1de0f4(0x1ba)]=filterDockerLogs,exports[a0_0x1de0f4(0x1b7)]=filterKubectl,exports['filterRuff']=filterRuff;function filterDockerPs(_0x53dd11){const _0x4273d2=a0_0x1de0f4,_0x34f87e=_0x53dd11[_0x4273d2(0x1b4)]('\x0a')['filter'](_0x30b3fa=>_0x30b3fa[_0x4273d2(0x1a5)]()[_0x4273d2(0x1a9)]>0x0);if(_0x34f87e[_0x4273d2(0x1a9)]===0x0)return'No\x20containers\x20running';if(_0x34f87e['length']<=0xa)return _0x53dd11['trim']();const _0x202f86=_0x34f87e[0x0],_0xe717c2=_0x34f87e[_0x4273d2(0x1a6)](0x1),_0x46e4c9=[];_0x46e4c9[_0x4273d2(0x1ae)](_0x4273d2(0x1bb)+_0xe717c2['length']+'\x20total'),_0x46e4c9[_0x4273d2(0x1ae)]('');for(const _0x43d9e0 of _0xe717c2){const _0x39af27=_0x43d9e0['split'](/\s{2,}/);if(_0x39af27['length']>=0x5){const _0x263cce=_0x39af27[0x0][_0x4273d2(0x1be)](0x0,0xc),_0x78672c=_0x39af27[0x1],_0x4b9150=_0x39af27[_0x39af27['length']-0x2]||'',_0x182b93=_0x39af27[_0x39af27[_0x4273d2(0x1a9)]-0x1]||'';_0x46e4c9[_0x4273d2(0x1ae)]('\x20\x20'+_0x263cce+'\x20\x20'+_0x78672c+'\x20\x20'+_0x4b9150+'\x20\x20'+_0x182b93);}else _0x46e4c9['push']('\x20\x20'+_0x43d9e0[_0x4273d2(0x1a5)]());}return _0x46e4c9['join']('\x0a');}function filterDockerImages(_0x5e1e95){const _0x548058=a0_0x1de0f4,_0x176bfc=_0x5e1e95[_0x548058(0x1b4)]('\x0a')[_0x548058(0x1b6)](_0x571b31=>_0x571b31[_0x548058(0x1a5)]()['length']>0x0);if(_0x176bfc[_0x548058(0x1a9)]<=0x1)return _0x548058(0x1af);if(_0x176bfc['length']<=0xf)return _0x5e1e95[_0x548058(0x1a5)]();const _0xe5f691=_0x176bfc[_0x548058(0x1a6)](0x1),_0x15a363=[_0x548058(0x18f)+_0xe5f691['length']+_0x548058(0x1a8)];_0x15a363['push']('');const _0x43ef94=_0xe5f691[_0x548058(0x1a6)](0x0,0x14);for(const _0x5e88ac of _0x43ef94){const _0x54e7c8=_0x5e88ac[_0x548058(0x1b4)](/\s{2,}/);if(_0x54e7c8[_0x548058(0x1a9)]>=0x3){const _0x1400fe=_0x54e7c8[0x0],_0x3c4e5f=_0x54e7c8[0x1],_0x393f5b=_0x54e7c8[_0x54e7c8[_0x548058(0x1a9)]-0x1]||'';_0x15a363[_0x548058(0x1ae)]('\x20\x20'+_0x1400fe+':'+_0x3c4e5f+'\x20\x20'+_0x393f5b);}else _0x15a363['push']('\x20\x20'+_0x5e88ac[_0x548058(0x1a5)]());}return _0xe5f691[_0x548058(0x1a9)]>0x14&&_0x15a363[_0x548058(0x1ae)](_0x548058(0x1a7)+(_0xe5f691[_0x548058(0x1a9)]-0x14)+_0x548058(0x192)),_0x15a363[_0x548058(0x1c0)]('\x0a');}function filterDockerLogs(_0x69f0e){const _0x15fd4a=a0_0x1de0f4,_0x5e38c1=_0x69f0e[_0x15fd4a(0x1b4)]('\x0a');if(_0x5e38c1[_0x15fd4a(0x1a9)]<=0x32)return _0x69f0e;const _0xc9d4dd=[];return _0xc9d4dd['push'](..._0x5e38c1[_0x15fd4a(0x1a6)](0x0,0x14)),_0xc9d4dd['push']('\x0a...\x20['+(_0x5e38c1[_0x15fd4a(0x1a9)]-0x28)+_0x15fd4a(0x1a4)),_0xc9d4dd[_0x15fd4a(0x1ae)](..._0x5e38c1[_0x15fd4a(0x1a6)](-0x14)),_0xc9d4dd[_0x15fd4a(0x1ae)]('\x0a('+_0x5e38c1['length']+'\x20log\x20lines\x20total)'),_0xc9d4dd[_0x15fd4a(0x1c0)]('\x0a');}function filterKubectl(_0x21f5a4,_0x19dd2e){const _0x1091a0=a0_0x1de0f4,_0x56e54f=_0x21f5a4[_0x1091a0(0x1b4)]('\x0a')[_0x1091a0(0x1b6)](_0x41fbf6=>_0x41fbf6['trim']()[_0x1091a0(0x1a9)]>0x0);if(_0x56e54f[_0x1091a0(0x1a9)]===0x0)return _0x1091a0(0x1a3);if(_0x56e54f['length']<=0x14)return _0x21f5a4['trim']();if(_0x19dd2e===_0x1091a0(0x1aa)){const _0x2b0182=_0x56e54f[0x0],_0x5bca6f=_0x56e54f[_0x1091a0(0x1a6)](0x1),_0x42f09e=[_0x5bca6f['length']+'\x20resources\x20found','',_0x2b0182];return _0x5bca6f[_0x1091a0(0x1a9)]<=0x1e?_0x42f09e['push'](..._0x5bca6f):(_0x42f09e[_0x1091a0(0x1ae)](..._0x5bca6f[_0x1091a0(0x1a6)](0x0,0x19)),_0x42f09e[_0x1091a0(0x1ae)](_0x1091a0(0x195)+(_0x5bca6f[_0x1091a0(0x1a9)]-0x19)+_0x1091a0(0x1b8))),_0x42f09e['join']('\x0a');}if(_0x19dd2e===_0x1091a0(0x1b0)){const _0x213252=[];let _0x15cd67=![],_0x3e7835=0x0;for(const _0x1f598b of _0x56e54f){if(_0x1f598b[_0x1091a0(0x1b2)](_0x1091a0(0x1b3))){_0x15cd67=!![],_0x213252[_0x1091a0(0x1ae)](_0x1f598b);continue;}if(_0x15cd67){_0x3e7835++;if(_0x3e7835<=0x5)_0x213252[_0x1091a0(0x1ae)](_0x1f598b);}else _0x213252['push'](_0x1f598b);}return _0x3e7835>0x5&&_0x213252['push'](_0x1091a0(0x1a7)+(_0x3e7835-0x5)+_0x1091a0(0x19e)),_0x213252[_0x1091a0(0x1c0)]('\x0a');}if(_0x19dd2e==='logs')return filterDockerLogs(_0x21f5a4);const _0x5aae84=_0x56e54f[_0x1091a0(0x1a6)](0x0,0x1e);return _0x56e54f[_0x1091a0(0x1a9)]>0x1e&&_0x5aae84[_0x1091a0(0x1ae)]('...\x20+'+(_0x56e54f['length']-0x1e)+_0x1091a0(0x194)),_0x5aae84[_0x1091a0(0x1c0)]('\x0a');}function filterRuff(_0x56da77){const _0x499763=a0_0x1de0f4,_0x4bc073=_0x56da77['split']('\x0a')[_0x499763(0x1b6)](_0x2e8471=>_0x2e8471[_0x499763(0x1a5)]()['length']>0x0);if(_0x4bc073[_0x499763(0x1a9)]===0x0)return _0x499763(0x1ac);if(_0x56da77[_0x499763(0x1a2)](_0x499763(0x197))||_0x56da77['includes'](_0x499763(0x18e)))return _0x499763(0x1b9);const _0x6147a7=_0x56da77[_0x499763(0x1ad)](/Found (\d+) error/),_0x30396e=_0x6147a7?parseInt(_0x6147a7[0x1]):_0x4bc073[_0x499763(0x1a9)],_0x1e1b29={},_0x45aa48=[];for(const _0x369fe8 of _0x4bc073){const _0xfeaaf1=_0x369fe8[_0x499763(0x1ad)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0xfeaaf1){const _0x442a78=_0xfeaaf1[0x1],_0x5dac49=_0x442a78[_0x499763(0x1b4)](':')[0x0];if(!_0x1e1b29[_0x5dac49])_0x1e1b29[_0x5dac49]=[];_0x1e1b29[_0x5dac49][_0x499763(0x1ae)](_0x369fe8);}else _0x45aa48[_0x499763(0x1ae)](_0x369fe8);}const _0x108999=Object['keys'](_0x1e1b29);if(_0x108999[_0x499763(0x1a9)]===0x0){if(_0x4bc073[_0x499763(0x1a9)]<=0x14)return _0x56da77['trim']();return _0x4bc073[_0x499763(0x1a6)](0x0,0xf)[_0x499763(0x1c0)]('\x0a')+('\x0a...\x20+'+(_0x4bc073['length']-0xf)+_0x499763(0x190));}const _0x2b5a1d=['Ruff:\x20'+_0x30396e+_0x499763(0x1bc)+_0x108999[_0x499763(0x1a9)]+_0x499763(0x18d)];_0x2b5a1d[_0x499763(0x1ae)]('');const _0x57f257=0xa;for(const _0x300542 of _0x108999[_0x499763(0x1a6)](0x0,_0x57f257)){const _0x289c01=_0x1e1b29[_0x300542];if(_0x289c01[_0x499763(0x1a9)]<=0x3){for(const _0x29a389 of _0x289c01)_0x2b5a1d['push']('\x20\x20'+_0x29a389);}else _0x2b5a1d[_0x499763(0x1ae)]('\x20\x20'+_0x289c01[0x0]),_0x2b5a1d['push'](_0x499763(0x19f)+_0x289c01['length']+'\x20issues\x20in\x20'+_0x300542+')');}return _0x108999['length']>_0x57f257&&_0x2b5a1d[_0x499763(0x1ae)](_0x499763(0x1a7)+(_0x108999[_0x499763(0x1a9)]-_0x57f257)+_0x499763(0x199)),_0x2b5a1d[_0x499763(0x1c0)]('\x0a');}