trimprompt 1.0.40 → 1.0.41

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/filters/rust.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x55b7(_0x3843cc,_0x2b3451){const _0x56f2dd=a0_0x56f2();return a0_0x55b7=function(_0x55b76b,_0x1e7fa2){_0x55b76b=_0x55b76b-0x1b0;let _0x1c3f13=_0x56f2dd[_0x55b76b];return _0x1c3f13;},a0_0x55b7(_0x3843cc,_0x2b3451);}const a0_0x3d07ff=a0_0x55b7;(function(_0x2ee51a,_0x5c3670){const _0x51c071=a0_0x55b7,_0x50c946=_0x2ee51a();while(!![]){try{const _0x2206a5=-parseInt(_0x51c071(0x1cc))/0x1+-parseInt(_0x51c071(0x1e6))/0x2*(-parseInt(_0x51c071(0x1e5))/0x3)+parseInt(_0x51c071(0x1cb))/0x4+parseInt(_0x51c071(0x1b9))/0x5*(-parseInt(_0x51c071(0x1d6))/0x6)+-parseInt(_0x51c071(0x1d7))/0x7*(-parseInt(_0x51c071(0x1b4))/0x8)+-parseInt(_0x51c071(0x1d8))/0x9*(parseInt(_0x51c071(0x1c9))/0xa)+parseInt(_0x51c071(0x1b1))/0xb*(parseInt(_0x51c071(0x1c1))/0xc);if(_0x2206a5===_0x5c3670)break;else _0x50c946['push'](_0x50c946['shift']());}catch(_0x172bb0){_0x50c946['push'](_0x50c946['shift']());}}}(a0_0x56f2,0xa5dee));Object[a0_0x3d07ff(0x1e2)](exports,'__esModule',{'value':!![]}),exports['filterCargoTest']=filterCargoTest,exports[a0_0x3d07ff(0x1d2)]=filterCargoBuild;function filterCargoTest(_0x465890){const _0x79336d=a0_0x3d07ff,_0xf4dd9b=_0x465890[_0x79336d(0x1e4)]('\x0a');let _0x2ed1c7=0x0,_0x5749e7=0x0,_0x332161=0x0,_0x14a62e=0x0;const _0x3fff29=[];let _0x33bf2c=![],_0x31746c=[];for(const _0x4bda54 of _0xf4dd9b){const _0x278bae=_0x4bda54[_0x79336d(0x1ca)](),_0x5962ad=_0x278bae['match'](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x5962ad){_0x2ed1c7+=parseInt(_0x5962ad[0x2]),_0x5749e7+=parseInt(_0x5962ad[0x3]),_0x332161+=parseInt(_0x5962ad[0x4]),_0x14a62e+=parseInt(_0x5962ad[0x5]);continue;}if(_0x278bae===_0x79336d(0x1da)||_0x278bae===_0x79336d(0x1b2)){_0x33bf2c=!![];continue;}if(_0x33bf2c){if(_0x278bae[_0x79336d(0x1cf)]('----\x20')&&_0x278bae[_0x79336d(0x1df)](_0x79336d(0x1d5))){if(_0x31746c[_0x79336d(0x1c7)]>0x0)_0x3fff29[_0x79336d(0x1d3)](_0x31746c[_0x79336d(0x1c0)]('\x0a'));_0x31746c=[_0x278bae[_0x79336d(0x1b3)](/^-+\s*/,'')[_0x79336d(0x1b3)](/\s*-+$/,'')];}else{if(_0x278bae===_0x79336d(0x1da)||_0x278bae[_0x79336d(0x1cf)](_0x79336d(0x1bb))){if(_0x31746c['length']>0x0)_0x3fff29[_0x79336d(0x1d3)](_0x31746c['join']('\x0a'));_0x31746c=[],_0x33bf2c=![];}else _0x278bae[_0x79336d(0x1c7)]>0x0&&_0x31746c[_0x79336d(0x1d3)](_0x4bda54);}}}if(_0x31746c[_0x79336d(0x1c7)]>0x0)_0x3fff29[_0x79336d(0x1d3)](_0x31746c[_0x79336d(0x1c0)]('\x0a'));if(_0x2ed1c7===0x0&&_0x5749e7===0x0&&_0x332161===0x0){if(_0x465890[_0x79336d(0x1dd)](_0x79336d(0x1c8)))return _0x79336d(0x1b7);return _0x465890;}if(_0x5749e7===0x0){const _0x219255=[_0x79336d(0x1d1)+_0x2ed1c7+_0x79336d(0x1c5)];if(_0x332161>0x0)_0x219255[_0x79336d(0x1d3)](_0x332161+_0x79336d(0x1ce));return _0x219255[_0x79336d(0x1c0)](',\x20');}const _0x491fab=['Cargo\x20test:\x20'+_0x2ed1c7+_0x79336d(0x1d4)+_0x5749e7+'\x20failed,\x20'+_0x332161+'\x20ignored'];if(_0x3fff29[_0x79336d(0x1c7)]>0x0){_0x491fab[_0x79336d(0x1d3)](_0x79336d(0x1b6));const _0x24b2d4=0x3;for(let _0x3bb60c=0x0;_0x3bb60c<Math['min'](_0x3fff29[_0x79336d(0x1c7)],_0x24b2d4);_0x3bb60c++){const _0x43a3b0=_0x3fff29[_0x3bb60c][_0x79336d(0x1e4)]('\x0a');_0x491fab[_0x79336d(0x1d3)]('\x20\x20'+(_0x3bb60c+0x1)+'.\x20'+_0x43a3b0[0x0]);const _0x5f193b=_0x43a3b0['slice'](0x1),_0x31e7af=_0x5f193b['filter'](_0x176e24=>_0x176e24['trim']()[_0x79336d(0x1cf)](_0x79336d(0x1c2))||_0x176e24['includes'](_0x79336d(0x1c4))||_0x176e24[_0x79336d(0x1dd)](_0x79336d(0x1cd))||_0x176e24[_0x79336d(0x1dd)]('left:')||_0x176e24[_0x79336d(0x1dd)](_0x79336d(0x1bd)));for(const _0x4632a9 of _0x31e7af[_0x79336d(0x1e0)](0x0,0x5)){_0x491fab[_0x79336d(0x1d3)](_0x79336d(0x1c3)+_0x4632a9[_0x79336d(0x1ca)]());}}_0x3fff29['length']>_0x24b2d4&&_0x491fab[_0x79336d(0x1d3)](_0x79336d(0x1b0)+(_0x3fff29[_0x79336d(0x1c7)]-_0x24b2d4)+_0x79336d(0x1d9));}return _0x491fab[_0x79336d(0x1c0)]('\x0a');}function a0_0x56f2(){const _0x18b653=['includes','Cargo:\x20','endsWith','slice','Cargo:\x20compiled\x20','defineProperty','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','split','71046gOqLwZ','98yXRmQi','\x20\x20...\x20+','2026618CXANUh','----\x20failures\x20----','replace','8aOngfw','\x20crates\x20successfully','\x0aFailures:','Cargo\x20test:\x20all\x20tests\x20passed','Compiling\x20','7135YYzYEn','\x20warnings','test\x20result:','warning:','right:','error:','\x20errors,\x20','join','12gSoggS','thread','\x20\x20\x20\x20','panicked','\x20passed','\x0aWarnings:','length','test\x20result:\x20ok','1310090FsyYvS','trim','4947612BOBIpY','1131920qUmafR','assert','\x20ignored','startsWith','\x0aErrors:','Cargo\x20test:\x20','filterCargoBuild','push','\x20passed,\x20','\x20----','5340rkerkb','8083894XQOogB','45NPcoIg','\x20more\x20failures','failures:','error[','\x20crates,\x20'];a0_0x56f2=function(){return _0x18b653;};return a0_0x56f2();}function filterCargoBuild(_0x3f0604){const _0x3c6dd6=a0_0x3d07ff,_0x43c831=_0x3f0604['split']('\x0a'),_0x8b312f=[],_0x4e6f4f=[];let _0x488f2b=0x0;for(const _0x2c1a98 of _0x43c831){const _0x4e3d5f=_0x2c1a98[_0x3c6dd6(0x1ca)]();if(_0x4e3d5f['startsWith'](_0x3c6dd6(0x1b8)))_0x488f2b++;else{if(_0x4e3d5f[_0x3c6dd6(0x1cf)]('warning[')||_0x4e3d5f[_0x3c6dd6(0x1cf)](_0x3c6dd6(0x1bc)))_0x8b312f['push'](_0x4e3d5f);else{if(_0x4e3d5f[_0x3c6dd6(0x1cf)](_0x3c6dd6(0x1db))||_0x4e3d5f[_0x3c6dd6(0x1cf)](_0x3c6dd6(0x1be)))_0x4e6f4f[_0x3c6dd6(0x1d3)](_0x4e3d5f);}}}if(_0x4e6f4f[_0x3c6dd6(0x1c7)]===0x0&&_0x8b312f[_0x3c6dd6(0x1c7)]===0x0)return _0x488f2b>0x0?_0x3c6dd6(0x1e1)+_0x488f2b+_0x3c6dd6(0x1b5):_0x3f0604[_0x3c6dd6(0x1ca)]();const _0x45271b=[];if(_0x4e6f4f[_0x3c6dd6(0x1c7)]>0x0){_0x45271b[_0x3c6dd6(0x1d3)](_0x3c6dd6(0x1de)+_0x4e6f4f[_0x3c6dd6(0x1c7)]+_0x3c6dd6(0x1bf)+_0x8b312f[_0x3c6dd6(0x1c7)]+'\x20warnings'),_0x45271b[_0x3c6dd6(0x1d3)](_0x3c6dd6(0x1d0));for(const _0x8d963 of _0x4e6f4f[_0x3c6dd6(0x1e0)](0x0,0x5))_0x45271b['push']('\x20\x20'+_0x8d963);if(_0x4e6f4f['length']>0x5)_0x45271b[_0x3c6dd6(0x1d3)](_0x3c6dd6(0x1b0)+(_0x4e6f4f[_0x3c6dd6(0x1c7)]-0x5)+'\x20more\x20errors');}else _0x45271b[_0x3c6dd6(0x1d3)](_0x3c6dd6(0x1e1)+_0x488f2b+_0x3c6dd6(0x1dc)+_0x8b312f[_0x3c6dd6(0x1c7)]+_0x3c6dd6(0x1ba));if(_0x8b312f['length']>0x0&&_0x8b312f[_0x3c6dd6(0x1c7)]<=0x5){_0x45271b[_0x3c6dd6(0x1d3)](_0x3c6dd6(0x1c6));for(const _0x391498 of _0x8b312f)_0x45271b[_0x3c6dd6(0x1d3)]('\x20\x20'+_0x391498);}else _0x8b312f[_0x3c6dd6(0x1c7)]>0x5&&_0x45271b[_0x3c6dd6(0x1d3)]('\x0a('+_0x8b312f[_0x3c6dd6(0x1c7)]+_0x3c6dd6(0x1e3));return _0x45271b[_0x3c6dd6(0x1c0)]('\x0a');}
1
+ 'use strict';function a0_0x3a1e(_0x544857,_0x1cec09){_0x544857=_0x544857-0x13a;const _0x63a533=a0_0x63a5();let _0x3a1e72=_0x63a533[_0x544857];return _0x3a1e72;}const a0_0x36839f=a0_0x3a1e;(function(_0x68a724,_0x912b06){const _0x95a97d=a0_0x3a1e,_0x52b9e8=_0x68a724();while(!![]){try{const _0x4893bd=parseInt(_0x95a97d(0x167))/0x1+parseInt(_0x95a97d(0x168))/0x2*(parseInt(_0x95a97d(0x140))/0x3)+parseInt(_0x95a97d(0x151))/0x4+parseInt(_0x95a97d(0x147))/0x5+-parseInt(_0x95a97d(0x141))/0x6+parseInt(_0x95a97d(0x14f))/0x7*(-parseInt(_0x95a97d(0x13e))/0x8)+parseInt(_0x95a97d(0x144))/0x9*(-parseInt(_0x95a97d(0x15b))/0xa);if(_0x4893bd===_0x912b06)break;else _0x52b9e8['push'](_0x52b9e8['shift']());}catch(_0x556950){_0x52b9e8['push'](_0x52b9e8['shift']());}}}(a0_0x63a5,0x95723));Object['defineProperty'](exports,a0_0x36839f(0x15d),{'value':!![]}),exports[a0_0x36839f(0x160)]=filterCargoTest,exports[a0_0x36839f(0x14e)]=filterCargoBuild;function filterCargoTest(_0x44973a){const _0x565262=a0_0x36839f,_0x52f83b=_0x44973a[_0x565262(0x165)]('\x0a');let _0x2e9bbe=0x0,_0x455274=0x0,_0x16eab0=0x0,_0x7fe054=0x0;const _0x52f197=[];let _0x4e060b=![],_0x495684=[];for(const _0x3f0ff6 of _0x52f83b){const _0x5e59ca=_0x3f0ff6['trim'](),_0x91c00f=_0x5e59ca[_0x565262(0x154)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x91c00f){_0x2e9bbe+=parseInt(_0x91c00f[0x2]),_0x455274+=parseInt(_0x91c00f[0x3]),_0x16eab0+=parseInt(_0x91c00f[0x4]),_0x7fe054+=parseInt(_0x91c00f[0x5]);continue;}if(_0x5e59ca===_0x565262(0x158)||_0x5e59ca===_0x565262(0x146)){_0x4e060b=!![];continue;}if(_0x4e060b){if(_0x5e59ca[_0x565262(0x153)](_0x565262(0x13c))&&_0x5e59ca[_0x565262(0x15e)]('\x20----')){if(_0x495684[_0x565262(0x149)]>0x0)_0x52f197[_0x565262(0x13b)](_0x495684[_0x565262(0x16a)]('\x0a'));_0x495684=[_0x5e59ca[_0x565262(0x14b)](/^-+\s*/,'')[_0x565262(0x14b)](/\s*-+$/,'')];}else{if(_0x5e59ca===_0x565262(0x158)||_0x5e59ca[_0x565262(0x153)](_0x565262(0x169))){if(_0x495684[_0x565262(0x149)]>0x0)_0x52f197[_0x565262(0x13b)](_0x495684[_0x565262(0x16a)]('\x0a'));_0x495684=[],_0x4e060b=![];}else _0x5e59ca[_0x565262(0x149)]>0x0&&_0x495684['push'](_0x3f0ff6);}}}if(_0x495684['length']>0x0)_0x52f197['push'](_0x495684[_0x565262(0x16a)]('\x0a'));if(_0x2e9bbe===0x0&&_0x455274===0x0&&_0x16eab0===0x0){if(_0x44973a[_0x565262(0x163)]('test\x20result:\x20ok'))return _0x565262(0x13f);return _0x44973a;}if(_0x455274===0x0){const _0x259582=[_0x565262(0x15f)+_0x2e9bbe+'\x20passed'];if(_0x16eab0>0x0)_0x259582[_0x565262(0x13b)](_0x16eab0+_0x565262(0x13d));return _0x259582['join'](',\x20');}const _0x325722=[_0x565262(0x15f)+_0x2e9bbe+_0x565262(0x157)+_0x455274+_0x565262(0x13a)+_0x16eab0+_0x565262(0x13d)];if(_0x52f197[_0x565262(0x149)]>0x0){_0x325722['push'](_0x565262(0x162));const _0x153f64=0x3;for(let _0x3389bc=0x0;_0x3389bc<Math[_0x565262(0x155)](_0x52f197[_0x565262(0x149)],_0x153f64);_0x3389bc++){const _0x181755=_0x52f197[_0x3389bc][_0x565262(0x165)]('\x0a');_0x325722[_0x565262(0x13b)]('\x20\x20'+(_0x3389bc+0x1)+'.\x20'+_0x181755[0x0]);const _0x5c59d5=_0x181755['slice'](0x1),_0x25725f=_0x5c59d5['filter'](_0x22a028=>_0x22a028['trim']()[_0x565262(0x153)](_0x565262(0x156))||_0x22a028[_0x565262(0x163)]('panicked')||_0x22a028[_0x565262(0x163)](_0x565262(0x14a))||_0x22a028['includes'](_0x565262(0x15c))||_0x22a028['includes'](_0x565262(0x16b)));for(const _0x4553ab of _0x25725f[_0x565262(0x14c)](0x0,0x5)){_0x325722['push'](_0x565262(0x152)+_0x4553ab[_0x565262(0x16c)]());}}_0x52f197[_0x565262(0x149)]>_0x153f64&&_0x325722[_0x565262(0x13b)]('\x20\x20...\x20+'+(_0x52f197['length']-_0x153f64)+_0x565262(0x142));}return _0x325722[_0x565262(0x16a)]('\x0a');}function filterCargoBuild(_0x23e518){const _0x589664=a0_0x36839f,_0x1b62fb=_0x23e518['split']('\x0a'),_0x520aa0=[],_0x205a36=[];let _0x40f2fe=0x0;for(const _0x18f6eb of _0x1b62fb){const _0x30ee6b=_0x18f6eb[_0x589664(0x16c)]();if(_0x30ee6b[_0x589664(0x153)]('Compiling\x20'))_0x40f2fe++;else{if(_0x30ee6b['startsWith'](_0x589664(0x16e))||_0x30ee6b[_0x589664(0x153)](_0x589664(0x15a)))_0x520aa0[_0x589664(0x13b)](_0x30ee6b);else{if(_0x30ee6b['startsWith'](_0x589664(0x143))||_0x30ee6b[_0x589664(0x153)](_0x589664(0x148)))_0x205a36[_0x589664(0x13b)](_0x30ee6b);}}}if(_0x205a36[_0x589664(0x149)]===0x0&&_0x520aa0['length']===0x0)return _0x40f2fe>0x0?_0x589664(0x16d)+_0x40f2fe+_0x589664(0x164):_0x23e518[_0x589664(0x16c)]();const _0xb189a0=[];if(_0x205a36[_0x589664(0x149)]>0x0){_0xb189a0['push'](_0x589664(0x161)+_0x205a36[_0x589664(0x149)]+_0x589664(0x166)+_0x520aa0[_0x589664(0x149)]+'\x20warnings'),_0xb189a0[_0x589664(0x13b)]('\x0aErrors:');for(const _0x32e310 of _0x205a36['slice'](0x0,0x5))_0xb189a0[_0x589664(0x13b)]('\x20\x20'+_0x32e310);if(_0x205a36[_0x589664(0x149)]>0x5)_0xb189a0[_0x589664(0x13b)](_0x589664(0x14d)+(_0x205a36[_0x589664(0x149)]-0x5)+'\x20more\x20errors');}else _0xb189a0[_0x589664(0x13b)](_0x589664(0x16d)+_0x40f2fe+_0x589664(0x145)+_0x520aa0[_0x589664(0x149)]+'\x20warnings');if(_0x520aa0[_0x589664(0x149)]>0x0&&_0x520aa0['length']<=0x5){_0xb189a0[_0x589664(0x13b)](_0x589664(0x150));for(const _0x1c7faf of _0x520aa0)_0xb189a0[_0x589664(0x13b)]('\x20\x20'+_0x1c7faf);}else _0x520aa0[_0x589664(0x149)]>0x5&&_0xb189a0[_0x589664(0x13b)]('\x0a('+_0x520aa0['length']+_0x589664(0x159));return _0xb189a0[_0x589664(0x16a)]('\x0a');}function a0_0x63a5(){const _0x1a04f1=['endsWith','Cargo\x20test:\x20','filterCargoTest','Cargo:\x20','\x0aFailures:','includes','\x20crates\x20successfully','split','\x20errors,\x20','343705ehEBsZ','274dQiFQw','test\x20result:','join','right:','trim','Cargo:\x20compiled\x20','warning[','\x20failed,\x20','push','----\x20','\x20ignored','1150216kzboyo','Cargo\x20test:\x20all\x20tests\x20passed','11967ejCoXC','1694748KRxNEN','\x20more\x20failures','error[','18awrjKN','\x20crates,\x20','----\x20failures\x20----','2347210JKcKsp','error:','length','assert','replace','slice','\x20\x20...\x20+','filterCargoBuild','7KyNYQa','\x0aWarnings:','3632368nDZojs','\x20\x20\x20\x20','startsWith','match','min','thread','\x20passed,\x20','failures:','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','warning:','6146830zskJGF','left:','__esModule'];a0_0x63a5=function(){return _0x1a04f1;};return a0_0x63a5();}
package/filters/shell.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x40f52a=a0_0x2f8d;(function(_0x34d1b1,_0x505cd1){const _0x43785f=a0_0x2f8d,_0x1dc230=_0x34d1b1();while(!![]){try{const _0xcc49c2=-parseInt(_0x43785f(0x169))/0x1+-parseInt(_0x43785f(0x1b0))/0x2+parseInt(_0x43785f(0x196))/0x3+-parseInt(_0x43785f(0x194))/0x4*(-parseInt(_0x43785f(0x17b))/0x5)+-parseInt(_0x43785f(0x1aa))/0x6*(-parseInt(_0x43785f(0x1c1))/0x7)+-parseInt(_0x43785f(0x1b3))/0x8*(-parseInt(_0x43785f(0x155))/0x9)+-parseInt(_0x43785f(0x178))/0xa;if(_0xcc49c2===_0x505cd1)break;else _0x1dc230['push'](_0x1dc230['shift']());}catch(_0x5c6e69){_0x1dc230['push'](_0x1dc230['shift']());}}}(a0_0x6e5b,0x5a9ad));var __createBinding=this&&this[a0_0x40f52a(0x174)]||(Object[a0_0x40f52a(0x1cf)]?function(_0x590076,_0x154b49,_0x137e93,_0x2e9f25){const _0x130292=a0_0x40f52a;if(_0x2e9f25===undefined)_0x2e9f25=_0x137e93;var _0x30f7c1=Object[_0x130292(0x1b9)](_0x154b49,_0x137e93);(!_0x30f7c1||(_0x130292(0x18b)in _0x30f7c1?!_0x154b49[_0x130292(0x18e)]:_0x30f7c1[_0x130292(0x158)]||_0x30f7c1[_0x130292(0x1c2)]))&&(_0x30f7c1={'enumerable':!![],'get':function(){return _0x154b49[_0x137e93];}}),Object[_0x130292(0x14e)](_0x590076,_0x2e9f25,_0x30f7c1);}:function(_0x61809c,_0x256366,_0x59b96a,_0x2842c3){if(_0x2842c3===undefined)_0x2842c3=_0x59b96a;_0x61809c[_0x2842c3]=_0x256366[_0x59b96a];}),__setModuleDefault=this&&this[a0_0x40f52a(0x1b2)]||(Object[a0_0x40f52a(0x1cf)]?function(_0x4a2720,_0x41d11e){const _0x3c77c7=a0_0x40f52a;Object[_0x3c77c7(0x14e)](_0x4a2720,_0x3c77c7(0x15c),{'enumerable':!![],'value':_0x41d11e});}:function(_0x63815e,_0x31f445){const _0xf20b2=a0_0x40f52a;_0x63815e[_0xf20b2(0x15c)]=_0x31f445;}),__importStar=this&&this[a0_0x40f52a(0x163)]||(function(){var _0x4c3cd8=function(_0x3997f5){const _0x929eb6=a0_0x2f8d;return _0x4c3cd8=Object[_0x929eb6(0x1b1)]||function(_0x1e68fe){const _0x27c88b=_0x929eb6;var _0x788cc5=[];for(var _0x59ebeb in _0x1e68fe)if(Object[_0x27c88b(0x18d)][_0x27c88b(0x1d6)][_0x27c88b(0x16f)](_0x1e68fe,_0x59ebeb))_0x788cc5[_0x788cc5[_0x27c88b(0x1af)]]=_0x59ebeb;return _0x788cc5;},_0x4c3cd8(_0x3997f5);};return function(_0x819b9){const _0x1f1e6e=a0_0x2f8d;if(_0x819b9&&_0x819b9['__esModule'])return _0x819b9;var _0x2a318a={};if(_0x819b9!=null){for(var _0x222d2e=_0x4c3cd8(_0x819b9),_0x9eac54=0x0;_0x9eac54<_0x222d2e[_0x1f1e6e(0x1af)];_0x9eac54++)if(_0x222d2e[_0x9eac54]!==_0x1f1e6e(0x15c))__createBinding(_0x2a318a,_0x819b9,_0x222d2e[_0x9eac54]);}return __setModuleDefault(_0x2a318a,_0x819b9),_0x2a318a;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x40f52a(0x16b)]=filterLs,exports[a0_0x40f52a(0x1b8)]=filterTree,exports[a0_0x40f52a(0x1ab)]=filterCat,exports[a0_0x40f52a(0x1ba)]=filterGrep,exports[a0_0x40f52a(0x1de)]=filterFind;const path=__importStar(require('path')),generic_1=require('./generic'),tracker_1=require(a0_0x40f52a(0x193));function isFeatureEnabled(_0x28ef86){const _0x377cd5=a0_0x40f52a;try{const _0x19bbf6=tracker_1['tracker'][_0x377cd5(0x19a)](),_0x5825d2=_0x19bbf6[_0x377cd5(0x19d)];if(!_0x5825d2||_0x5825d2[_0x28ef86]===undefined)return!![];return _0x5825d2[_0x28ef86]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x40f52a(0x1ac),'yarn.lock',a0_0x40f52a(0x1d7),'Cargo.lock',a0_0x40f52a(0x1b7),a0_0x40f52a(0x1d2),a0_0x40f52a(0x189),a0_0x40f52a(0x17e),a0_0x40f52a(0x1ad)],BINARY_EXTENSIONS=['.min.js',a0_0x40f52a(0x156),a0_0x40f52a(0x153),a0_0x40f52a(0x1d5),'.png',a0_0x40f52a(0x1bd),a0_0x40f52a(0x190),'.gif',a0_0x40f52a(0x14f),a0_0x40f52a(0x191),a0_0x40f52a(0x1a2),a0_0x40f52a(0x18f),a0_0x40f52a(0x1dc),a0_0x40f52a(0x197),a0_0x40f52a(0x19e),a0_0x40f52a(0x168),a0_0x40f52a(0x1c0),a0_0x40f52a(0x1e3),a0_0x40f52a(0x1a0),a0_0x40f52a(0x18a),'.exe',a0_0x40f52a(0x160),a0_0x40f52a(0x1bb),a0_0x40f52a(0x1db),a0_0x40f52a(0x173),'.dat',a0_0x40f52a(0x16e),'.db',a0_0x40f52a(0x185),'.woff','.woff2',a0_0x40f52a(0x1d4),a0_0x40f52a(0x176),a0_0x40f52a(0x1c4),a0_0x40f52a(0x1d0),a0_0x40f52a(0x167),a0_0x40f52a(0x180),'.avi',a0_0x40f52a(0x15d),a0_0x40f52a(0x198),a0_0x40f52a(0x1bf),a0_0x40f52a(0x15b),a0_0x40f52a(0x1a6),'.o',a0_0x40f52a(0x19c)];function extractFilename(_0x16acfd){const _0x5bd88b=a0_0x40f52a,_0x4b1ec8=_0x16acfd[_0x5bd88b(0x1a5)]()['split'](/\s+/);for(let _0x28f8b1=0x1;_0x28f8b1<_0x4b1ec8[_0x5bd88b(0x1af)];_0x28f8b1++){if(!_0x4b1ec8[_0x28f8b1][_0x5bd88b(0x1b6)]('-'))return _0x4b1ec8[_0x28f8b1];}return null;}function filterLockFile(_0xdf1be7,_0x412cbd){const _0x5cfe31=a0_0x40f52a;try{const _0x5d18f7=path['basename'](_0x412cbd)[_0x5cfe31(0x159)]();if(!LOCK_FILES['some'](_0x6ae81d=>_0x5d18f7===_0x6ae81d['toLowerCase']()))return null;const _0x40a271=_0xdf1be7['length'];let _0x2b5678=0x0;if(_0x5d18f7===_0x5cfe31(0x1ac))try{const _0x3a0e3a=JSON['parse'](_0xdf1be7);_0x2b5678=Object[_0x5cfe31(0x1cc)](_0x3a0e3a['packages']||_0x3a0e3a['dependencies']||{})[_0x5cfe31(0x1af)];}catch{_0x2b5678=(_0xdf1be7['match'](/"resolved":/g)||[])[_0x5cfe31(0x1af)];}else{if(_0x5d18f7===_0x5cfe31(0x1d3))_0x2b5678=(_0xdf1be7[_0x5cfe31(0x1ae)](/^"?[^#\s][^:]*:$/gm)||[])['length'];else{if(_0x5d18f7===_0x5cfe31(0x195)||_0x5d18f7===_0x5cfe31(0x1d2))_0x2b5678=(_0xdf1be7[_0x5cfe31(0x1ae)](/\[\[package\]\]/g)||[])[_0x5cfe31(0x1af)];else{if(_0x5d18f7===_0x5cfe31(0x1b7))_0x2b5678=Math['floor'](_0xdf1be7[_0x5cfe31(0x1da)]('\x0a')[_0x5cfe31(0x152)](_0x6323c2=>_0x6323c2[_0x5cfe31(0x1a5)]())[_0x5cfe31(0x1af)]/0x2);else{if(_0x5d18f7==='composer.lock')try{_0x2b5678=JSON['parse'](_0xdf1be7)[_0x5cfe31(0x19b)]?.[_0x5cfe31(0x1af)]||0x0;}catch{}else _0x5d18f7===_0x5cfe31(0x1d7)?_0x2b5678=(_0xdf1be7[_0x5cfe31(0x1ae)](/^\s{2}['"@a-z]/gm)||[])[_0x5cfe31(0x1af)]:_0x2b5678=_0xdf1be7[_0x5cfe31(0x1da)]('\x0a')[_0x5cfe31(0x152)](_0x1774e6=>_0x1774e6[_0x5cfe31(0x1a5)]())[_0x5cfe31(0x1af)];}}}}return _0x5cfe31(0x175)+path['basename'](_0x412cbd)+':\x20'+_0x2b5678+_0x5cfe31(0x1bc)+_0x40a271[_0x5cfe31(0x1a1)]()+_0x5cfe31(0x17f);}catch{return null;}}function a0_0x6e5b(){const _0x2b396c=['1407716znyHoR','getOwnPropertyNames','__setModuleDefault','8ScCUqg','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','join','startsWith','go.sum','filterTree','getOwnPropertyDescriptor','filterGrep','.so','\x20dependencies,\x20','.jpg','\x20structural\x20lines\x20shown)','.pyc','.gz','7420KTVTzJ','configurable','.go','.otf','No\x20files\x20found','endsWith','slice','.kt','[binary\x20file]\x20','#include\x20','.js','keys','@return','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','create','.mp3','sort','poetry.lock','yarn.lock','.ttf','.wasm','hasOwnProperty','pnpm-lock.yaml','[binary/minified\x20file]\x20','indexOf','split','.dylib','.pdf','\x20more\x20files','filterFind','package\x20','push','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','charCodeAt','.bz2','defineProperty','.ico','\x0a...\x20(','.rs','filter','.map','.rb','2178801UasUuh','.min.css','substring','writable','toLowerCase','from\x20','.pyo','default','.mov','stringify','[minified\x20file]\x20','.dll','\x20more\x20directories','\x20matches\x20across\x20','__importStar','...\x20+','require(','.ts','.mp4','.tgz','230291VEwhjL','use\x20','filterLs','import\x20','\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)','.sqlite','call','parse','/\x20(','.cpp','.bin','__createBinding','[lock\x20file]\x20','.eot','.py','7092660bGEmaZ','\x20files\x20found\x20across\x20','collapseWhitespace','15QYejBO','includes','\x20more\x20files\x20with\x20matches','Gemfile.lock','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','.wav','\x20files)','\x20lines)','.cs','\x20lines\x20truncated]\x20...\x0a','.sqlite3','dirname','stripComments','json_crusher','composer.lock','.rar','get','.jsx','prototype','__esModule','.svg','.jpeg','.bmp','\x20chars\x20across\x20','../tracker','798876UNJXSk','cargo.lock','1522818GQkrCx','.zip','.webm','\x20directories,\x20','getConfig','packages','.obj','features_enabled','.tar.gz','export\x20','.7z','toLocaleString','.webp','extname','\x0a...\x20[','trim','.class','basename','.tsx','\x20directories','3768ZgSUts','filterCat','package-lock.json','bun.lockb','match','length'];a0_0x6e5b=function(){return _0x2b396c;};return a0_0x6e5b();}function filterBinaryOrMinified(_0x402f5f,_0x4da06d){const _0x2294a7=a0_0x40f52a;try{if(_0x4da06d){const _0x3b54c4=_0x4da06d['toLowerCase']();for(const _0x4439a9 of BINARY_EXTENSIONS){if(_0x3b54c4[_0x2294a7(0x1c6)](_0x4439a9))return _0x2294a7(0x1d8)+path[_0x2294a7(0x1a7)](_0x4da06d)+',\x20'+_0x402f5f['length']['toLocaleString']()+'\x20chars,\x20type:\x20'+_0x4439a9+_0x2294a7(0x1e1);}}const _0x95e893=_0x402f5f[_0x2294a7(0x157)](0x0,0x3e8);let _0x2cbac0=0x0;for(let _0x115819=0x0;_0x115819<_0x95e893[_0x2294a7(0x1af)];_0x115819++){if(_0x95e893['charCodeAt'](_0x115819)===0x0)_0x2cbac0++;}if(_0x2cbac0>0x0)return'[binary\x20file]\x20'+_0x402f5f[_0x2294a7(0x1af)]['toLocaleString']()+'\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)';let _0x33bfc0=0x0;for(let _0x3bcb21=0x0;_0x3bcb21<_0x95e893[_0x2294a7(0x1af)];_0x3bcb21++){const _0x342197=_0x95e893[_0x2294a7(0x1e2)](_0x3bcb21);if(_0x342197<0x20&&_0x342197!==0xa&&_0x342197!==0xd&&_0x342197!==0x9)_0x33bfc0++;}if(_0x95e893[_0x2294a7(0x1af)]>0x64&&_0x33bfc0>_0x95e893[_0x2294a7(0x1af)]*0.1)return _0x2294a7(0x1c9)+_0x402f5f[_0x2294a7(0x1af)][_0x2294a7(0x1a1)]()+_0x2294a7(0x16d);const _0x5bffa3=_0x402f5f[_0x2294a7(0x1da)]('\x0a');if(_0x5bffa3[_0x2294a7(0x1af)]<=0x3&&_0x402f5f[_0x2294a7(0x1af)]>0x1388)return _0x2294a7(0x15f)+_0x402f5f[_0x2294a7(0x1af)][_0x2294a7(0x1a1)]()+_0x2294a7(0x192)+_0x5bffa3[_0x2294a7(0x1af)]+_0x2294a7(0x1ce);return null;}catch{return null;}}function a0_0x2f8d(_0x330af4,_0x4bbd59){const _0x6e5b79=a0_0x6e5b();return a0_0x2f8d=function(_0x2f8da6,_0x363006){_0x2f8da6=_0x2f8da6-0x14e;let _0x4d4d3b=_0x6e5b79[_0x2f8da6];return _0x4d4d3b;},a0_0x2f8d(_0x330af4,_0x4bbd59);}function filterJsonMinify(_0x542765){const _0x5938fe=a0_0x40f52a;try{const _0x1c7ffa=_0x542765['trim']();if(!_0x1c7ffa[_0x5938fe(0x1b6)]('{')&&!_0x1c7ffa['startsWith']('['))return null;const _0x2ce437=_0x1c7ffa['split']('\x0a');if(_0x2ce437[_0x5938fe(0x1af)]<=0x14)return null;const _0x4243c3=JSON[_0x5938fe(0x170)](_0x1c7ffa),_0x4fc6d6=JSON[_0x5938fe(0x15e)](_0x4243c3);if(_0x4fc6d6[_0x5938fe(0x1af)]<_0x1c7ffa[_0x5938fe(0x1af)])return _0x4fc6d6;return null;}catch{return null;}}function filterLs(_0x1e77ca){const _0x24496c=a0_0x40f52a,_0x14cea8=_0x1e77ca['split']('\x0a')[_0x24496c(0x152)](_0x53c7f9=>_0x53c7f9['trim']()[_0x24496c(0x1af)]>0x0);if(_0x14cea8[_0x24496c(0x1af)]===0x0)return'Empty\x20directory';if(_0x14cea8[_0x24496c(0x1af)]<=0x1e)return _0x1e77ca['trim']();const _0x3186e7=[],_0x21a6d2=[];for(const _0x2f2218 of _0x14cea8){const _0x3bc51d=_0x2f2218[_0x24496c(0x1a5)]();if(_0x3bc51d[_0x24496c(0x1b6)]('total\x20')||_0x3bc51d['startsWith']('d')&&_0x3bc51d[_0x24496c(0x17c)]('..'))continue;_0x3bc51d[_0x24496c(0x1c6)]('/')||_0x3bc51d[_0x24496c(0x1b6)]('d')&&_0x3bc51d['includes']('\x20')?_0x3186e7[_0x24496c(0x1e0)](_0x3bc51d):_0x21a6d2[_0x24496c(0x1e0)](_0x3bc51d);}const _0x1b2802=[];return _0x3186e7[_0x24496c(0x1af)]>0x0&&(_0x3186e7[_0x24496c(0x1af)]<=0xf?_0x1b2802[_0x24496c(0x1e0)](..._0x3186e7):(_0x1b2802[_0x24496c(0x1e0)](..._0x3186e7[_0x24496c(0x1c7)](0x0,0xa)),_0x1b2802[_0x24496c(0x1e0)]('...\x20+'+(_0x3186e7['length']-0xa)+_0x24496c(0x161)))),_0x21a6d2['length']>0x0&&(_0x21a6d2['length']<=0x14?_0x1b2802[_0x24496c(0x1e0)](..._0x21a6d2):(_0x1b2802[_0x24496c(0x1e0)](..._0x21a6d2['slice'](0x0,0xf)),_0x1b2802['push'](_0x24496c(0x164)+(_0x21a6d2[_0x24496c(0x1af)]-0xf)+_0x24496c(0x1dd)))),_0x1b2802[_0x24496c(0x1e0)]('\x0a('+_0x3186e7[_0x24496c(0x1af)]+_0x24496c(0x199)+_0x21a6d2['length']+_0x24496c(0x181)),_0x1b2802[_0x24496c(0x1b5)]('\x0a');}function filterTree(_0x5e23c5){const _0xb2814e=a0_0x40f52a,_0x2f7c3b=_0x5e23c5[_0xb2814e(0x1da)]('\x0a');if(_0x2f7c3b['length']<=0x32)return _0x5e23c5[_0xb2814e(0x1a5)]();const _0x23b182=[];let _0x3ab14c=0x0,_0x2d6ab4=0x0,_0x36e6ca=0x0;for(const _0xa8e350 of _0x2f7c3b){const _0x454c02=_0xa8e350[_0xb2814e(0x1ae)](/(\d+)\s+director/),_0xecf14=_0xa8e350[_0xb2814e(0x1ae)](/(\d+)\s+file/);if(_0x454c02)_0x36e6ca=parseInt(_0x454c02[0x1]);if(_0xecf14)_0x2d6ab4=parseInt(_0xecf14[0x1]);const _0x2566df=(_0xa8e350['match'](/^[│├└\s─]+/)||[''])[0x0]['length'];_0x2566df<=0x4&&(_0x23b182[_0xb2814e(0x1e0)](_0xa8e350),_0x3ab14c++);}return _0x2f7c3b[_0xb2814e(0x1af)]>_0x23b182[_0xb2814e(0x1af)]&&_0x23b182[_0xb2814e(0x1e0)](_0xb2814e(0x150)+_0x36e6ca+'\x20directories,\x20'+_0x2d6ab4+_0xb2814e(0x1b4)),_0x23b182[_0xb2814e(0x1b5)]('\x0a');}function filterCat(_0x40f738,_0x53eeb9=''){const _0x325843=a0_0x40f52a,_0x256351=extractFilename(_0x53eeb9);try{if(_0x256351&&isFeatureEnabled('lock')){const _0x3222fa=filterLockFile(_0x40f738,_0x256351);if(_0x3222fa)return _0x3222fa;}if(isFeatureEnabled('binary')){const _0x45f066=filterBinaryOrMinified(_0x40f738,_0x256351);if(_0x45f066)return _0x45f066;}if(isFeatureEnabled(_0x325843(0x188))){const _0x213c1a=(0x0,generic_1['smartCrushJson'])(_0x40f738);if(_0x213c1a)return _0x213c1a;}const _0x62b9fe=filterJsonMinify(_0x40f738);if(_0x62b9fe)return _0x62b9fe;if(_0x256351&&isFeatureEnabled('skeleton')){const _0x2dbb99=path[_0x325843(0x1a3)](_0x256351)[_0x325843(0x159)](),_0x257252=[_0x325843(0x166),_0x325843(0x1cb),_0x325843(0x1a8),_0x325843(0x18c),_0x325843(0x177),_0x325843(0x1c3),_0x325843(0x151),'.java','.c',_0x325843(0x172),_0x325843(0x183),_0x325843(0x154),'.swift',_0x325843(0x1c8)];if(_0x257252[_0x325843(0x17c)](_0x2dbb99)){const _0x2c0ae4=_0x40f738[_0x325843(0x1da)]('\x0a');if(_0x2c0ae4[_0x325843(0x1af)]>0x64){const _0xe8797f=[];_0xe8797f[_0x325843(0x1e0)]('[code\x20skeleton]\x20'+path[_0x325843(0x1a7)](_0x256351)+'\x20('+_0x2c0ae4[_0x325843(0x1af)]+_0x325843(0x182)),_0xe8797f[_0x325843(0x1e0)]('');for(const _0x6b2d1 of _0x2c0ae4){const _0x584993=_0x6b2d1[_0x325843(0x1a5)]();if(_0x584993['startsWith'](_0x325843(0x16c))||_0x584993['startsWith'](_0x325843(0x15a))||_0x584993[_0x325843(0x1b6)](_0x325843(0x165))||_0x584993[_0x325843(0x1ae)](/=\s*require\(/)||_0x584993['startsWith'](_0x325843(0x1ca))||_0x584993['startsWith'](_0x325843(0x16a))||_0x584993[_0x325843(0x1b6)](_0x325843(0x1df)))_0xe8797f[_0x325843(0x1e0)](_0x6b2d1);else{if(_0x584993[_0x325843(0x1ae)](/^(export\s+)?(async\s+)?function\s+/)||_0x584993['match'](/^(export\s+)?(default\s+)?class\s+/)||_0x584993[_0x325843(0x1ae)](/^(export\s+)?(type|interface|enum)\s+/)||_0x584993['match'](/^(async\s+)?def\s+/)||_0x584993[_0x325843(0x1ae)](/^func\s+/)||_0x584993[_0x325843(0x1ae)](/^type\s+\w+\s+(struct|interface)/)||_0x584993[_0x325843(0x1ae)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x584993[_0x325843(0x1ae)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x584993[_0x325843(0x1ae)](/^(public|private|protected|static)\s+/))_0xe8797f[_0x325843(0x1e0)](_0x6b2d1);else{if(_0x584993[_0x325843(0x1b6)](_0x325843(0x19f))&&!_0x584993[_0x325843(0x17c)]('=>')&&_0x584993[_0x325843(0x1af)]<0x78)_0xe8797f[_0x325843(0x1e0)](_0x6b2d1);else _0x584993['startsWith']('@')&&!_0x584993[_0x325843(0x1b6)]('@param')&&!_0x584993[_0x325843(0x1b6)](_0x325843(0x1cd))&&_0xe8797f[_0x325843(0x1e0)](_0x6b2d1);}}}_0xe8797f['push'](''),_0xe8797f['push']('('+_0x2c0ae4[_0x325843(0x1af)]+'\x20lines\x20total,\x20'+(_0xe8797f[_0x325843(0x1af)]-0x2)+_0x325843(0x1be));const _0x3c3a3d=_0xe8797f[_0x325843(0x1b5)]('\x0a');if(_0x3c3a3d[_0x325843(0x1af)]<_0x40f738['length'])return _0x3c3a3d;}}}}catch{}let _0x2e578d=(0x0,generic_1[_0x325843(0x17a)])(_0x40f738);if(_0x256351){const _0x110954=path[_0x325843(0x1a3)](_0x256351)[_0x325843(0x159)]();_0x2e578d=(0x0,generic_1[_0x325843(0x187)])(_0x2e578d,_0x110954);}const _0x52eef6=_0x2e578d[_0x325843(0x1da)]('\x0a');if(_0x52eef6[_0x325843(0x1af)]<=0x64)return _0x2e578d;const _0x1d560c=[];return _0x1d560c[_0x325843(0x1e0)](..._0x52eef6[_0x325843(0x1c7)](0x0,0x32)),_0x1d560c['push'](_0x325843(0x1a4)+(_0x52eef6[_0x325843(0x1af)]-0x50)+_0x325843(0x184)),_0x1d560c['push'](..._0x52eef6[_0x325843(0x1c7)](-0x1e)),_0x1d560c[_0x325843(0x1e0)]('\x0a('+_0x52eef6[_0x325843(0x1af)]+'\x20lines\x20total)'),_0x1d560c[_0x325843(0x1b5)]('\x0a');}function filterGrep(_0x5ce706){const _0x31758e=a0_0x40f52a,_0x3bf1d7=_0x5ce706['split']('\x0a')[_0x31758e(0x152)](_0x41c261=>_0x41c261[_0x31758e(0x1a5)]()[_0x31758e(0x1af)]>0x0);if(_0x3bf1d7[_0x31758e(0x1af)]===0x0)return'No\x20matches\x20found';if(_0x3bf1d7[_0x31758e(0x1af)]<=0x32)return _0x5ce706[_0x31758e(0x1a5)]();const _0x9a433b={},_0x103e14=[];for(const _0x52517d of _0x3bf1d7){const _0x254138=_0x52517d[_0x31758e(0x1d9)](':');if(_0x254138>0x0&&_0x254138<0xc8){const _0x1b9b61=_0x52517d[_0x31758e(0x157)](0x0,_0x254138);if(_0x1b9b61[_0x31758e(0x17c)]('/')||_0x1b9b61[_0x31758e(0x17c)]('\x5c')||_0x1b9b61[_0x31758e(0x17c)]('.')){if(!_0x9a433b[_0x1b9b61])_0x9a433b[_0x1b9b61]=[];_0x9a433b[_0x1b9b61]['push'](_0x52517d[_0x31758e(0x157)](_0x254138+0x1)[_0x31758e(0x1a5)]());continue;}}_0x103e14[_0x31758e(0x1e0)](_0x52517d);}const _0x45dde8=[],_0x53273a=Object[_0x31758e(0x1cc)](_0x9a433b);if(_0x53273a[_0x31758e(0x1af)]>0x0){const _0x6ab1c9=0x14,_0x443370=_0x53273a[_0x31758e(0x1c7)](0x0,_0x6ab1c9);for(const _0x27b995 of _0x443370){const _0x169b0d=_0x9a433b[_0x27b995];if(_0x169b0d[_0x31758e(0x1af)]<=0x3)for(const _0x27edff of _0x169b0d){_0x45dde8[_0x31758e(0x1e0)](_0x27b995+':\x20'+_0x27edff);}else _0x45dde8[_0x31758e(0x1e0)](_0x27b995+':\x20'+_0x169b0d[0x0]),_0x45dde8[_0x31758e(0x1e0)](_0x27b995+':\x20...\x20('+_0x169b0d[_0x31758e(0x1af)]+'\x20matches\x20in\x20this\x20file)');}_0x53273a[_0x31758e(0x1af)]>_0x6ab1c9&&_0x45dde8[_0x31758e(0x1e0)](_0x31758e(0x164)+(_0x53273a[_0x31758e(0x1af)]-_0x6ab1c9)+_0x31758e(0x17d));}if(_0x103e14[_0x31758e(0x1af)]>0x0){const _0x210215=0x1e;_0x45dde8[_0x31758e(0x1e0)](..._0x103e14[_0x31758e(0x1c7)](0x0,_0x210215)),_0x103e14['length']>_0x210215&&_0x45dde8['push'](_0x31758e(0x164)+(_0x103e14[_0x31758e(0x1af)]-_0x210215)+'\x20more\x20matches');}const _0x49d692=_0x3bf1d7['length'];return _0x45dde8[_0x31758e(0x1e0)]('\x0a('+_0x49d692+_0x31758e(0x162)+(_0x53273a[_0x31758e(0x1af)]||'?')+_0x31758e(0x181)),_0x45dde8[_0x31758e(0x1b5)]('\x0a');}function filterFind(_0x3ad717){const _0x11cf02=a0_0x40f52a,_0x2c4321=_0x3ad717[_0x11cf02(0x1da)]('\x0a')['filter'](_0x3e0782=>_0x3e0782[_0x11cf02(0x1a5)]()[_0x11cf02(0x1af)]>0x0);if(_0x2c4321[_0x11cf02(0x1af)]===0x0)return _0x11cf02(0x1c5);if(_0x2c4321['length']<=0x32)return _0x3ad717[_0x11cf02(0x1a5)]();const _0x3c6ace={};for(const _0xe9a7c4 of _0x2c4321){const _0x4f012a=path[_0x11cf02(0x186)](_0xe9a7c4['trim']())||'.';_0x3c6ace[_0x4f012a]=(_0x3c6ace[_0x4f012a]||0x0)+0x1;}const _0x5625e4=Object['entries'](_0x3c6ace)[_0x11cf02(0x1d1)]((_0x2528f7,_0x4c97ed)=>_0x4c97ed[0x1]-_0x2528f7[0x1]),_0x3cd57d=[_0x2c4321['length']+_0x11cf02(0x179)+_0x5625e4[_0x11cf02(0x1af)]+_0x11cf02(0x1a9),''],_0xc23ff4=0x1e;for(const [_0x403aa4,_0x207118]of _0x5625e4[_0x11cf02(0x1c7)](0x0,_0xc23ff4)){_0x3cd57d[_0x11cf02(0x1e0)]('\x20\x20'+_0x403aa4+_0x11cf02(0x171)+_0x207118+_0x11cf02(0x181));}return _0x5625e4['length']>_0xc23ff4&&_0x3cd57d['push']('\x20\x20...\x20+'+(_0x5625e4[_0x11cf02(0x1af)]-_0xc23ff4)+_0x11cf02(0x161)),_0x3cd57d[_0x11cf02(0x1b5)]('\x0a');}
1
+ 'use strict';const a0_0x3b1cfc=a0_0x4b1e;(function(_0x4d862f,_0x1d9880){const _0x5e15cc=a0_0x4b1e,_0x54f288=_0x4d862f();while(!![]){try{const _0x6bfb8b=-parseInt(_0x5e15cc(0x142))/0x1+-parseInt(_0x5e15cc(0x17f))/0x2+parseInt(_0x5e15cc(0x111))/0x3*(parseInt(_0x5e15cc(0x148))/0x4)+parseInt(_0x5e15cc(0x14a))/0x5+parseInt(_0x5e15cc(0x149))/0x6+parseInt(_0x5e15cc(0x10d))/0x7+-parseInt(_0x5e15cc(0x145))/0x8;if(_0x6bfb8b===_0x1d9880)break;else _0x54f288['push'](_0x54f288['shift']());}catch(_0x39bcda){_0x54f288['push'](_0x54f288['shift']());}}}(a0_0x2086,0x7892d));function a0_0x4b1e(_0x3c91bc,_0x4418c5){_0x3c91bc=_0x3c91bc-0x105;const _0x208652=a0_0x2086();let _0x4b1ed1=_0x208652[_0x3c91bc];return _0x4b1ed1;}var __createBinding=this&&this[a0_0x3b1cfc(0x14b)]||(Object['create']?function(_0x2fa865,_0xb22231,_0x3d89d0,_0x535348){const _0x4afda1=a0_0x3b1cfc;if(_0x535348===undefined)_0x535348=_0x3d89d0;var _0x405749=Object[_0x4afda1(0x189)](_0xb22231,_0x3d89d0);(!_0x405749||(_0x4afda1(0x157)in _0x405749?!_0xb22231['__esModule']:_0x405749[_0x4afda1(0x155)]||_0x405749[_0x4afda1(0x18b)]))&&(_0x405749={'enumerable':!![],'get':function(){return _0xb22231[_0x3d89d0];}}),Object[_0x4afda1(0x10a)](_0x2fa865,_0x535348,_0x405749);}:function(_0x2be924,_0x496479,_0x2953bd,_0xdf68af){if(_0xdf68af===undefined)_0xdf68af=_0x2953bd;_0x2be924[_0xdf68af]=_0x496479[_0x2953bd];}),__setModuleDefault=this&&this[a0_0x3b1cfc(0x106)]||(Object[a0_0x3b1cfc(0x16c)]?function(_0xae7429,_0x2f6318){const _0x5098d9=a0_0x3b1cfc;Object[_0x5098d9(0x10a)](_0xae7429,_0x5098d9(0x17b),{'enumerable':!![],'value':_0x2f6318});}:function(_0x1796bb,_0x5e9f78){_0x1796bb['default']=_0x5e9f78;}),__importStar=this&&this[a0_0x3b1cfc(0x163)]||(function(){var _0x300cd9=function(_0x81ba0b){const _0x294a80=a0_0x4b1e;return _0x300cd9=Object[_0x294a80(0x11a)]||function(_0x45ef55){const _0x5d4e84=_0x294a80;var _0xf97fc9=[];for(var _0x4123c7 in _0x45ef55)if(Object[_0x5d4e84(0x16e)][_0x5d4e84(0x190)][_0x5d4e84(0x13d)](_0x45ef55,_0x4123c7))_0xf97fc9[_0xf97fc9[_0x5d4e84(0x16a)]]=_0x4123c7;return _0xf97fc9;},_0x300cd9(_0x81ba0b);};return function(_0x8d4a2e){const _0x50aa05=a0_0x4b1e;if(_0x8d4a2e&&_0x8d4a2e[_0x50aa05(0x143)])return _0x8d4a2e;var _0x196b6b={};if(_0x8d4a2e!=null){for(var _0x35669e=_0x300cd9(_0x8d4a2e),_0x3ece67=0x0;_0x3ece67<_0x35669e['length'];_0x3ece67++)if(_0x35669e[_0x3ece67]!==_0x50aa05(0x17b))__createBinding(_0x196b6b,_0x8d4a2e,_0x35669e[_0x3ece67]);}return __setModuleDefault(_0x196b6b,_0x8d4a2e),_0x196b6b;};}());Object[a0_0x3b1cfc(0x10a)](exports,a0_0x3b1cfc(0x143),{'value':!![]}),exports[a0_0x3b1cfc(0x141)]=filterLs,exports['filterTree']=filterTree,exports['filterCat']=filterCat,exports['filterGrep']=filterGrep,exports['filterFind']=filterFind;const path=__importStar(require(a0_0x3b1cfc(0x181))),generic_1=require(a0_0x3b1cfc(0x160)),tracker_1=require(a0_0x3b1cfc(0x172));function isFeatureEnabled(_0xafa03e){const _0x59bffe=a0_0x3b1cfc;try{const _0x2e7cd2=tracker_1[_0x59bffe(0x131)][_0x59bffe(0x11e)](),_0x2c308a=_0x2e7cd2['features_enabled'];if(!_0x2c308a||_0x2c308a[_0xafa03e]===undefined)return!![];return _0x2c308a[_0xafa03e]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x3b1cfc(0x180),a0_0x3b1cfc(0x184),a0_0x3b1cfc(0x15d),a0_0x3b1cfc(0x124),a0_0x3b1cfc(0x174),a0_0x3b1cfc(0x168),a0_0x3b1cfc(0x152),a0_0x3b1cfc(0x15f),a0_0x3b1cfc(0x11f)],BINARY_EXTENSIONS=[a0_0x3b1cfc(0x121),a0_0x3b1cfc(0x173),a0_0x3b1cfc(0x108),'.wasm',a0_0x3b1cfc(0x15c),'.jpg','.jpeg',a0_0x3b1cfc(0x130),a0_0x3b1cfc(0x188),a0_0x3b1cfc(0x16f),a0_0x3b1cfc(0x18e),'.svg',a0_0x3b1cfc(0x170),a0_0x3b1cfc(0x192),'.tar.gz','.tgz','.gz',a0_0x3b1cfc(0x110),a0_0x3b1cfc(0x133),a0_0x3b1cfc(0x185),'.exe',a0_0x3b1cfc(0x166),a0_0x3b1cfc(0x17c),a0_0x3b1cfc(0x107),a0_0x3b1cfc(0x14c),a0_0x3b1cfc(0x13a),'.sqlite','.db',a0_0x3b1cfc(0x175),a0_0x3b1cfc(0x187),a0_0x3b1cfc(0x177),a0_0x3b1cfc(0x10e),a0_0x3b1cfc(0x144),a0_0x3b1cfc(0x118),'.mp3',a0_0x3b1cfc(0x119),a0_0x3b1cfc(0x15e),'.avi','.mov',a0_0x3b1cfc(0x147),a0_0x3b1cfc(0x183),a0_0x3b1cfc(0x116),'.class','.o',a0_0x3b1cfc(0x136)];function extractFilename(_0x1c3cae){const _0x5963e1=a0_0x3b1cfc,_0x42818d=_0x1c3cae[_0x5963e1(0x132)]()[_0x5963e1(0x112)](/\s+/);for(let _0x13d02f=0x1;_0x13d02f<_0x42818d['length'];_0x13d02f++){if(!_0x42818d[_0x13d02f]['startsWith']('-'))return _0x42818d[_0x13d02f];}return null;}function filterLockFile(_0x3d28b2,_0x54223f){const _0xf8e2af=a0_0x3b1cfc;try{const _0x456da3=path['basename'](_0x54223f)[_0xf8e2af(0x171)]();if(!LOCK_FILES[_0xf8e2af(0x134)](_0x3abe1f=>_0x456da3===_0x3abe1f[_0xf8e2af(0x171)]()))return null;const _0xca5dfa=_0x3d28b2[_0xf8e2af(0x16a)];let _0x301a01=0x0;if(_0x456da3===_0xf8e2af(0x180))try{const _0x4dc72c=JSON[_0xf8e2af(0x13e)](_0x3d28b2);_0x301a01=Object[_0xf8e2af(0x161)](_0x4dc72c[_0xf8e2af(0x17d)]||_0x4dc72c['dependencies']||{})[_0xf8e2af(0x16a)];}catch{_0x301a01=(_0x3d28b2[_0xf8e2af(0x113)](/"resolved":/g)||[])[_0xf8e2af(0x16a)];}else{if(_0x456da3==='yarn.lock')_0x301a01=(_0x3d28b2[_0xf8e2af(0x113)](/^"?[^#\s][^:]*:$/gm)||[])[_0xf8e2af(0x16a)];else{if(_0x456da3===_0xf8e2af(0x156)||_0x456da3===_0xf8e2af(0x168))_0x301a01=(_0x3d28b2['match'](/\[\[package\]\]/g)||[])[_0xf8e2af(0x16a)];else{if(_0x456da3===_0xf8e2af(0x174))_0x301a01=Math[_0xf8e2af(0x109)](_0x3d28b2[_0xf8e2af(0x112)]('\x0a')[_0xf8e2af(0x117)](_0x41c8d7=>_0x41c8d7['trim']())[_0xf8e2af(0x16a)]/0x2);else{if(_0x456da3===_0xf8e2af(0x152))try{_0x301a01=JSON[_0xf8e2af(0x13e)](_0x3d28b2)[_0xf8e2af(0x17d)]?.[_0xf8e2af(0x16a)]||0x0;}catch{}else _0x456da3===_0xf8e2af(0x15d)?_0x301a01=(_0x3d28b2[_0xf8e2af(0x113)](/^\s{2}['"@a-z]/gm)||[])[_0xf8e2af(0x16a)]:_0x301a01=_0x3d28b2[_0xf8e2af(0x112)]('\x0a')['filter'](_0x523732=>_0x523732[_0xf8e2af(0x132)]())[_0xf8e2af(0x16a)];}}}}return'[lock\x20file]\x20'+path[_0xf8e2af(0x13f)](_0x54223f)+':\x20'+_0x301a01+_0xf8e2af(0x125)+_0xca5dfa[_0xf8e2af(0x150)]()+_0xf8e2af(0x135);}catch{return null;}}function filterBinaryOrMinified(_0x4daf20,_0x411835){const _0x15d1d5=a0_0x3b1cfc;try{if(_0x411835){const _0xf9894c=_0x411835[_0x15d1d5(0x171)]();for(const _0x142f80 of BINARY_EXTENSIONS){if(_0xf9894c['endsWith'](_0x142f80))return'[binary/minified\x20file]\x20'+path[_0x15d1d5(0x13f)](_0x411835)+',\x20'+_0x4daf20['length'][_0x15d1d5(0x150)]()+'\x20chars,\x20type:\x20'+_0x142f80+'\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)';}}const _0x332b2f=_0x4daf20[_0x15d1d5(0x165)](0x0,0x3e8);let _0x293b05=0x0;for(let _0x5f0e37=0x0;_0x5f0e37<_0x332b2f[_0x15d1d5(0x16a)];_0x5f0e37++){if(_0x332b2f[_0x15d1d5(0x123)](_0x5f0e37)===0x0)_0x293b05++;}if(_0x293b05>0x0)return _0x15d1d5(0x18f)+_0x4daf20[_0x15d1d5(0x16a)][_0x15d1d5(0x150)]()+'\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)';let _0x1bc22e=0x0;for(let _0x4f0498=0x0;_0x4f0498<_0x332b2f[_0x15d1d5(0x16a)];_0x4f0498++){const _0x46c3dd=_0x332b2f['charCodeAt'](_0x4f0498);if(_0x46c3dd<0x20&&_0x46c3dd!==0xa&&_0x46c3dd!==0xd&&_0x46c3dd!==0x9)_0x1bc22e++;}if(_0x332b2f[_0x15d1d5(0x16a)]>0x64&&_0x1bc22e>_0x332b2f[_0x15d1d5(0x16a)]*0.1)return'[binary\x20file]\x20'+_0x4daf20[_0x15d1d5(0x16a)]['toLocaleString']()+'\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)';const _0x23f387=_0x4daf20[_0x15d1d5(0x112)]('\x0a');if(_0x23f387['length']<=0x3&&_0x4daf20[_0x15d1d5(0x16a)]>0x1388)return _0x15d1d5(0x127)+_0x4daf20['length'][_0x15d1d5(0x150)]()+'\x20chars\x20across\x20'+_0x23f387['length']+_0x15d1d5(0x11d);return null;}catch{return null;}}function a0_0x2086(){const _0x7e0cf1=['composer.lock','\x20lines)','json_crusher','writable','cargo.lock','get','stripComments','\x20more\x20matches','lock','\x20more\x20files','.png','pnpm-lock.yaml','.wav','Gemfile.lock','./generic','keys','\x20directories','__importStar','smartCrushJson','substring','.dll','endsWith','poetry.lock','push','length','Empty\x20directory','create','slice','prototype','.bmp','.pdf','toLowerCase','../tracker','.min.css','go.sum','.sqlite3','...\x20+','.woff2','[code\x20skeleton]\x20','No\x20files\x20found','import\x20','default','.so','packages','binary','1815886piuSwf','package-lock.json','path','.cpp','.pyc','yarn.lock','.rar','join','.woff','.ico','getOwnPropertyDescriptor','\x20files)','configurable','extname','includes','.webp','[binary\x20file]\x20','hasOwnProperty','.go','.zip','/\x20(','__setModuleDefault','.dylib','.map','floor','defineProperty','.cs','.rb','256389QKsMUj','.ttf','.rs','.bz2','948qUbQkr','split','match','\x20lines\x20truncated]\x20...\x0a','entries','.pyo','filter','.otf','.mp4','getOwnPropertyNames','stringify','\x20lines\x20total,\x20','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','getConfig','bun.lockb','dirname','.min.js','#include\x20','charCodeAt','Cargo.lock','\x20dependencies,\x20','\x20files\x20found\x20across\x20','[minified\x20file]\x20','.py','require(','startsWith','\x20directories,\x20','\x20more\x20directories','\x20lines\x20total)','@return','sort','.gif','tracker','trim','.7z','some','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','.obj','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','\x20structural\x20lines\x20shown)','package\x20','.dat','\x0a...\x20[','.swift','call','parse','basename','skeleton','filterLs','187889eJQSbH','__esModule','.eot','2097728MbexkO','.java','.webm','4476NsoxmM','3964788iBZVkp','4004440gKSkYh','__createBinding','.bin','.jsx','\x0a...\x20(','indexOf','toLocaleString','.tsx'];a0_0x2086=function(){return _0x7e0cf1;};return a0_0x2086();}function filterJsonMinify(_0x47668f){const _0x48590a=a0_0x3b1cfc;try{const _0x548472=_0x47668f[_0x48590a(0x132)]();if(!_0x548472[_0x48590a(0x12a)]('{')&&!_0x548472['startsWith']('['))return null;const _0x12c23b=_0x548472[_0x48590a(0x112)]('\x0a');if(_0x12c23b[_0x48590a(0x16a)]<=0x14)return null;const _0x3a6bdb=JSON[_0x48590a(0x13e)](_0x548472),_0x4c0383=JSON[_0x48590a(0x11b)](_0x3a6bdb);if(_0x4c0383[_0x48590a(0x16a)]<_0x548472['length'])return _0x4c0383;return null;}catch{return null;}}function filterLs(_0x359c6f){const _0x338274=a0_0x3b1cfc,_0x365580=_0x359c6f[_0x338274(0x112)]('\x0a')[_0x338274(0x117)](_0x173ebb=>_0x173ebb[_0x338274(0x132)]()['length']>0x0);if(_0x365580[_0x338274(0x16a)]===0x0)return _0x338274(0x16b);if(_0x365580[_0x338274(0x16a)]<=0x1e)return _0x359c6f[_0x338274(0x132)]();const _0x2b3064=[],_0x498007=[];for(const _0xba24b1 of _0x365580){const _0x4be0c1=_0xba24b1['trim']();if(_0x4be0c1['startsWith']('total\x20')||_0x4be0c1[_0x338274(0x12a)]('d')&&_0x4be0c1['includes']('..'))continue;_0x4be0c1[_0x338274(0x167)]('/')||_0x4be0c1[_0x338274(0x12a)]('d')&&_0x4be0c1[_0x338274(0x18d)]('\x20')?_0x2b3064[_0x338274(0x169)](_0x4be0c1):_0x498007['push'](_0x4be0c1);}const _0x1b4b26=[];return _0x2b3064[_0x338274(0x16a)]>0x0&&(_0x2b3064[_0x338274(0x16a)]<=0xf?_0x1b4b26[_0x338274(0x169)](..._0x2b3064):(_0x1b4b26[_0x338274(0x169)](..._0x2b3064[_0x338274(0x16d)](0x0,0xa)),_0x1b4b26[_0x338274(0x169)](_0x338274(0x176)+(_0x2b3064['length']-0xa)+_0x338274(0x12c)))),_0x498007[_0x338274(0x16a)]>0x0&&(_0x498007['length']<=0x14?_0x1b4b26[_0x338274(0x169)](..._0x498007):(_0x1b4b26[_0x338274(0x169)](..._0x498007[_0x338274(0x16d)](0x0,0xf)),_0x1b4b26[_0x338274(0x169)](_0x338274(0x176)+(_0x498007[_0x338274(0x16a)]-0xf)+_0x338274(0x15b)))),_0x1b4b26[_0x338274(0x169)]('\x0a('+_0x2b3064[_0x338274(0x16a)]+_0x338274(0x12b)+_0x498007['length']+'\x20files)'),_0x1b4b26[_0x338274(0x186)]('\x0a');}function filterTree(_0x2787be){const _0x5762a3=a0_0x3b1cfc,_0x297ca2=_0x2787be[_0x5762a3(0x112)]('\x0a');if(_0x297ca2[_0x5762a3(0x16a)]<=0x32)return _0x2787be['trim']();const _0x549cfa=[];let _0x5ed2b7=0x0,_0x9288bf=0x0,_0x3b8ee6=0x0;for(const _0x16a9f8 of _0x297ca2){const _0x490280=_0x16a9f8['match'](/(\d+)\s+director/),_0x323807=_0x16a9f8[_0x5762a3(0x113)](/(\d+)\s+file/);if(_0x490280)_0x3b8ee6=parseInt(_0x490280[0x1]);if(_0x323807)_0x9288bf=parseInt(_0x323807[0x1]);const _0x493ede=(_0x16a9f8[_0x5762a3(0x113)](/^[│├└\s─]+/)||[''])[0x0][_0x5762a3(0x16a)];_0x493ede<=0x4&&(_0x549cfa[_0x5762a3(0x169)](_0x16a9f8),_0x5ed2b7++);}return _0x297ca2[_0x5762a3(0x16a)]>_0x549cfa[_0x5762a3(0x16a)]&&_0x549cfa[_0x5762a3(0x169)](_0x5762a3(0x14e)+_0x3b8ee6+_0x5762a3(0x12b)+_0x9288bf+_0x5762a3(0x137)),_0x549cfa['join']('\x0a');}function filterCat(_0x326a31,_0x52427c=''){const _0x51604a=a0_0x3b1cfc,_0x2f77d9=extractFilename(_0x52427c);try{if(_0x2f77d9&&isFeatureEnabled(_0x51604a(0x15a))){const _0x1af641=filterLockFile(_0x326a31,_0x2f77d9);if(_0x1af641)return _0x1af641;}if(isFeatureEnabled(_0x51604a(0x17e))){const _0x2f7c58=filterBinaryOrMinified(_0x326a31,_0x2f77d9);if(_0x2f7c58)return _0x2f7c58;}if(isFeatureEnabled(_0x51604a(0x154))){const _0x5bad09=(0x0,generic_1[_0x51604a(0x164)])(_0x326a31);if(_0x5bad09)return _0x5bad09;}const _0x1ae6a1=filterJsonMinify(_0x326a31);if(_0x1ae6a1)return _0x1ae6a1;if(_0x2f77d9&&isFeatureEnabled(_0x51604a(0x140))){const _0x21517a=path[_0x51604a(0x18c)](_0x2f77d9)[_0x51604a(0x171)](),_0x482433=['.ts','.js',_0x51604a(0x151),_0x51604a(0x14d),_0x51604a(0x128),_0x51604a(0x191),_0x51604a(0x10f),_0x51604a(0x146),'.c',_0x51604a(0x182),_0x51604a(0x10b),_0x51604a(0x10c),_0x51604a(0x13c),'.kt'];if(_0x482433[_0x51604a(0x18d)](_0x21517a)){const _0x8ed319=_0x326a31[_0x51604a(0x112)]('\x0a');if(_0x8ed319['length']>0x64){const _0x5215d3=[];_0x5215d3[_0x51604a(0x169)](_0x51604a(0x178)+path[_0x51604a(0x13f)](_0x2f77d9)+'\x20('+_0x8ed319['length']+_0x51604a(0x153)),_0x5215d3[_0x51604a(0x169)]('');for(const _0x2c789a of _0x8ed319){const _0x8b3eac=_0x2c789a['trim']();if(_0x8b3eac[_0x51604a(0x12a)](_0x51604a(0x17a))||_0x8b3eac[_0x51604a(0x12a)]('from\x20')||_0x8b3eac[_0x51604a(0x12a)](_0x51604a(0x129))||_0x8b3eac[_0x51604a(0x113)](/=\s*require\(/)||_0x8b3eac[_0x51604a(0x12a)](_0x51604a(0x122))||_0x8b3eac[_0x51604a(0x12a)]('use\x20')||_0x8b3eac['startsWith'](_0x51604a(0x139)))_0x5215d3[_0x51604a(0x169)](_0x2c789a);else{if(_0x8b3eac['match'](/^(export\s+)?(async\s+)?function\s+/)||_0x8b3eac[_0x51604a(0x113)](/^(export\s+)?(default\s+)?class\s+/)||_0x8b3eac[_0x51604a(0x113)](/^(export\s+)?(type|interface|enum)\s+/)||_0x8b3eac[_0x51604a(0x113)](/^(async\s+)?def\s+/)||_0x8b3eac[_0x51604a(0x113)](/^func\s+/)||_0x8b3eac[_0x51604a(0x113)](/^type\s+\w+\s+(struct|interface)/)||_0x8b3eac[_0x51604a(0x113)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x8b3eac['match'](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x8b3eac['match'](/^(public|private|protected|static)\s+/))_0x5215d3[_0x51604a(0x169)](_0x2c789a);else{if(_0x8b3eac['startsWith']('export\x20')&&!_0x8b3eac['includes']('=>')&&_0x8b3eac['length']<0x78)_0x5215d3[_0x51604a(0x169)](_0x2c789a);else _0x8b3eac[_0x51604a(0x12a)]('@')&&!_0x8b3eac[_0x51604a(0x12a)]('@param')&&!_0x8b3eac[_0x51604a(0x12a)](_0x51604a(0x12e))&&_0x5215d3[_0x51604a(0x169)](_0x2c789a);}}}_0x5215d3['push'](''),_0x5215d3['push']('('+_0x8ed319['length']+_0x51604a(0x11c)+(_0x5215d3['length']-0x2)+_0x51604a(0x138));const _0x36b1fb=_0x5215d3[_0x51604a(0x186)]('\x0a');if(_0x36b1fb[_0x51604a(0x16a)]<_0x326a31[_0x51604a(0x16a)])return _0x36b1fb;}}}}catch{}let _0x461b01=(0x0,generic_1['collapseWhitespace'])(_0x326a31);if(_0x2f77d9){const _0x5eea93=path[_0x51604a(0x18c)](_0x2f77d9)[_0x51604a(0x171)]();_0x461b01=(0x0,generic_1[_0x51604a(0x158)])(_0x461b01,_0x5eea93);}const _0x1ab52f=_0x461b01[_0x51604a(0x112)]('\x0a');if(_0x1ab52f[_0x51604a(0x16a)]<=0x64)return _0x461b01;const _0x55f55b=[];return _0x55f55b[_0x51604a(0x169)](..._0x1ab52f[_0x51604a(0x16d)](0x0,0x32)),_0x55f55b[_0x51604a(0x169)](_0x51604a(0x13b)+(_0x1ab52f[_0x51604a(0x16a)]-0x50)+_0x51604a(0x114)),_0x55f55b[_0x51604a(0x169)](..._0x1ab52f[_0x51604a(0x16d)](-0x1e)),_0x55f55b[_0x51604a(0x169)]('\x0a('+_0x1ab52f[_0x51604a(0x16a)]+_0x51604a(0x12d)),_0x55f55b[_0x51604a(0x186)]('\x0a');}function filterGrep(_0xd5e452){const _0x97d571=a0_0x3b1cfc,_0x2e5fec=_0xd5e452[_0x97d571(0x112)]('\x0a')['filter'](_0x3235c2=>_0x3235c2[_0x97d571(0x132)]()[_0x97d571(0x16a)]>0x0);if(_0x2e5fec[_0x97d571(0x16a)]===0x0)return'No\x20matches\x20found';if(_0x2e5fec['length']<=0x32)return _0xd5e452['trim']();const _0x113695={},_0x725a0b=[];for(const _0x3ef213 of _0x2e5fec){const _0x55c505=_0x3ef213[_0x97d571(0x14f)](':');if(_0x55c505>0x0&&_0x55c505<0xc8){const _0x518b34=_0x3ef213[_0x97d571(0x165)](0x0,_0x55c505);if(_0x518b34['includes']('/')||_0x518b34[_0x97d571(0x18d)]('\x5c')||_0x518b34[_0x97d571(0x18d)]('.')){if(!_0x113695[_0x518b34])_0x113695[_0x518b34]=[];_0x113695[_0x518b34]['push'](_0x3ef213[_0x97d571(0x165)](_0x55c505+0x1)[_0x97d571(0x132)]());continue;}}_0x725a0b[_0x97d571(0x169)](_0x3ef213);}const _0x145660=[],_0x4c9254=Object['keys'](_0x113695);if(_0x4c9254['length']>0x0){const _0x33a2fd=0x14,_0x50562e=_0x4c9254[_0x97d571(0x16d)](0x0,_0x33a2fd);for(const _0x1a6b55 of _0x50562e){const _0x2f2d70=_0x113695[_0x1a6b55];if(_0x2f2d70['length']<=0x3)for(const _0x207af1 of _0x2f2d70){_0x145660[_0x97d571(0x169)](_0x1a6b55+':\x20'+_0x207af1);}else _0x145660[_0x97d571(0x169)](_0x1a6b55+':\x20'+_0x2f2d70[0x0]),_0x145660[_0x97d571(0x169)](_0x1a6b55+':\x20...\x20('+_0x2f2d70[_0x97d571(0x16a)]+'\x20matches\x20in\x20this\x20file)');}_0x4c9254[_0x97d571(0x16a)]>_0x33a2fd&&_0x145660[_0x97d571(0x169)]('...\x20+'+(_0x4c9254[_0x97d571(0x16a)]-_0x33a2fd)+'\x20more\x20files\x20with\x20matches');}if(_0x725a0b['length']>0x0){const _0x3caf4a=0x1e;_0x145660[_0x97d571(0x169)](..._0x725a0b[_0x97d571(0x16d)](0x0,_0x3caf4a)),_0x725a0b[_0x97d571(0x16a)]>_0x3caf4a&&_0x145660[_0x97d571(0x169)](_0x97d571(0x176)+(_0x725a0b[_0x97d571(0x16a)]-_0x3caf4a)+_0x97d571(0x159));}const _0x42d4d5=_0x2e5fec[_0x97d571(0x16a)];return _0x145660[_0x97d571(0x169)]('\x0a('+_0x42d4d5+'\x20matches\x20across\x20'+(_0x4c9254['length']||'?')+'\x20files)'),_0x145660[_0x97d571(0x186)]('\x0a');}function filterFind(_0x4de026){const _0x3df0c8=a0_0x3b1cfc,_0x394e1f=_0x4de026[_0x3df0c8(0x112)]('\x0a')[_0x3df0c8(0x117)](_0x304ecd=>_0x304ecd['trim']()[_0x3df0c8(0x16a)]>0x0);if(_0x394e1f[_0x3df0c8(0x16a)]===0x0)return _0x3df0c8(0x179);if(_0x394e1f[_0x3df0c8(0x16a)]<=0x32)return _0x4de026['trim']();const _0x2cf94a={};for(const _0x3d21f7 of _0x394e1f){const _0x3f7cf2=path[_0x3df0c8(0x120)](_0x3d21f7[_0x3df0c8(0x132)]())||'.';_0x2cf94a[_0x3f7cf2]=(_0x2cf94a[_0x3f7cf2]||0x0)+0x1;}const _0x4289f8=Object[_0x3df0c8(0x115)](_0x2cf94a)[_0x3df0c8(0x12f)]((_0x5017e3,_0x20602f)=>_0x20602f[0x1]-_0x5017e3[0x1]),_0x2fdcd0=[_0x394e1f['length']+_0x3df0c8(0x126)+_0x4289f8['length']+_0x3df0c8(0x162),''],_0x489354=0x1e;for(const [_0x2e2711,_0x37d732]of _0x4289f8[_0x3df0c8(0x16d)](0x0,_0x489354)){_0x2fdcd0[_0x3df0c8(0x169)]('\x20\x20'+_0x2e2711+_0x3df0c8(0x105)+_0x37d732+_0x3df0c8(0x18a));}return _0x4289f8[_0x3df0c8(0x16a)]>_0x489354&&_0x2fdcd0[_0x3df0c8(0x169)]('\x20\x20...\x20+'+(_0x4289f8[_0x3df0c8(0x16a)]-_0x489354)+'\x20more\x20directories'),_0x2fdcd0[_0x3df0c8(0x186)]('\x0a');}
@@ -1 +1 @@
1
- 'use strict';var a0_0x580250=a0_0x1400;function a0_0x1400(_0x17f723,_0x1f8cc4){var _0x1c20c5=a0_0x1c20();return a0_0x1400=function(_0x140048,_0x171217){_0x140048=_0x140048-0x182;var _0x35be74=_0x1c20c5[_0x140048];return _0x35be74;},a0_0x1400(_0x17f723,_0x1f8cc4);}function a0_0x1c20(){var _0x4d3c4d=['5157224zukUXX','writable','7031IWNBfV','__importStar','.claude','getOwnPropertyDescriptor','getOwnPropertyNames','path','default','create','mkdirSync','1671qaZMDm','__setModuleDefault','installClaudeHooks','1964475UOGhea','length','110PwYlSB','4072FitRTM','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','2977713vYYQWa','defineProperty','2851644VnQwZD','post_tool_use.js','get','hasOwnProperty','__esModule','join','__createBinding','configurable','call','writeFileSync','existsSync','2414034vDscKy'];a0_0x1c20=function(){return _0x4d3c4d;};return a0_0x1c20();}(function(_0x30ea3f,_0x2be805){var _0x44fac9=a0_0x1400,_0x1882e2=_0x30ea3f();while(!![]){try{var _0x5f12d5=parseInt(_0x44fac9(0x1a2))/0x1*(-parseInt(_0x44fac9(0x18f))/0x2)+-parseInt(_0x44fac9(0x18a))/0x3*(-parseInt(_0x44fac9(0x190))/0x4)+parseInt(_0x44fac9(0x18d))/0x5+parseInt(_0x44fac9(0x194))/0x6+parseInt(_0x44fac9(0x19f))/0x7+-parseInt(_0x44fac9(0x1a0))/0x8+-parseInt(_0x44fac9(0x192))/0x9;if(_0x5f12d5===_0x2be805)break;else _0x1882e2['push'](_0x1882e2['shift']());}catch(_0x4b8dad){_0x1882e2['push'](_0x1882e2['shift']());}}}(a0_0x1c20,0x66032));var __createBinding=this&&this[a0_0x580250(0x19a)]||(Object['create']?function(_0x10b18a,_0x3be06f,_0x91c7a5,_0xf52939){var _0x1eeadf=a0_0x580250;if(_0xf52939===undefined)_0xf52939=_0x91c7a5;var _0x4f4459=Object[_0x1eeadf(0x184)](_0x3be06f,_0x91c7a5);(!_0x4f4459||(_0x1eeadf(0x196)in _0x4f4459?!_0x3be06f[_0x1eeadf(0x198)]:_0x4f4459[_0x1eeadf(0x1a1)]||_0x4f4459[_0x1eeadf(0x19b)]))&&(_0x4f4459={'enumerable':!![],'get':function(){return _0x3be06f[_0x91c7a5];}}),Object['defineProperty'](_0x10b18a,_0xf52939,_0x4f4459);}:function(_0x17234a,_0x7becc3,_0xda63e3,_0x3c96fc){if(_0x3c96fc===undefined)_0x3c96fc=_0xda63e3;_0x17234a[_0x3c96fc]=_0x7becc3[_0xda63e3];}),__setModuleDefault=this&&this[a0_0x580250(0x18b)]||(Object[a0_0x580250(0x188)]?function(_0xbf911c,_0x571cca){var _0x34a793=a0_0x580250;Object[_0x34a793(0x193)](_0xbf911c,_0x34a793(0x187),{'enumerable':!![],'value':_0x571cca});}:function(_0x48053c,_0x13d612){var _0x4f726b=a0_0x580250;_0x48053c[_0x4f726b(0x187)]=_0x13d612;}),__importStar=this&&this[a0_0x580250(0x182)]||(function(){var _0x276d4e=function(_0x4df9db){var _0x55241e=a0_0x1400;return _0x276d4e=Object[_0x55241e(0x185)]||function(_0x4adb67){var _0x50e6c7=_0x55241e,_0x2c7f23=[];for(var _0x3376ae in _0x4adb67)if(Object['prototype'][_0x50e6c7(0x197)][_0x50e6c7(0x19c)](_0x4adb67,_0x3376ae))_0x2c7f23[_0x2c7f23[_0x50e6c7(0x18e)]]=_0x3376ae;return _0x2c7f23;},_0x276d4e(_0x4df9db);};return function(_0x5cf3cc){var _0x2ffbf3=a0_0x1400;if(_0x5cf3cc&&_0x5cf3cc[_0x2ffbf3(0x198)])return _0x5cf3cc;var _0x41896d={};if(_0x5cf3cc!=null){for(var _0x518467=_0x276d4e(_0x5cf3cc),_0x58f8b5=0x0;_0x58f8b5<_0x518467[_0x2ffbf3(0x18e)];_0x58f8b5++)if(_0x518467[_0x58f8b5]!==_0x2ffbf3(0x187))__createBinding(_0x41896d,_0x5cf3cc,_0x518467[_0x58f8b5]);}return __setModuleDefault(_0x41896d,_0x5cf3cc),_0x41896d;};}());Object[a0_0x580250(0x193)](exports,'__esModule',{'value':!![]}),exports[a0_0x580250(0x18c)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x580250(0x186))),os=__importStar(require('os'));function installClaudeHooks(){var _0x12b9ba=a0_0x580250;try{const _0xb9814a=path[_0x12b9ba(0x199)](os['homedir'](),_0x12b9ba(0x183),'hooks');!fs[_0x12b9ba(0x19e)](_0xb9814a)&&fs[_0x12b9ba(0x189)](_0xb9814a,{'recursive':!![]});const _0x3b7b87=path[_0x12b9ba(0x199)](_0xb9814a,_0x12b9ba(0x195)),_0x2b2be1=_0x12b9ba(0x191);fs[_0x12b9ba(0x19d)](_0x3b7b87,_0x2b2be1,'utf8');}catch(_0x2d8c40){}}
1
+ 'use strict';var a0_0x5bbc60=a0_0x5e20;(function(_0x17247b,_0x3667d3){var _0x25b7bc=a0_0x5e20,_0x24b5ab=_0x17247b();while(!![]){try{var _0xbae4e4=parseInt(_0x25b7bc(0x180))/0x1*(parseInt(_0x25b7bc(0x194))/0x2)+-parseInt(_0x25b7bc(0x17e))/0x3+parseInt(_0x25b7bc(0x18f))/0x4+-parseInt(_0x25b7bc(0x17f))/0x5*(parseInt(_0x25b7bc(0x17c))/0x6)+-parseInt(_0x25b7bc(0x192))/0x7+-parseInt(_0x25b7bc(0x174))/0x8*(-parseInt(_0x25b7bc(0x188))/0x9)+parseInt(_0x25b7bc(0x186))/0xa*(parseInt(_0x25b7bc(0x17b))/0xb);if(_0xbae4e4===_0x3667d3)break;else _0x24b5ab['push'](_0x24b5ab['shift']());}catch(_0x408d82){_0x24b5ab['push'](_0x24b5ab['shift']());}}}(a0_0x387a,0x8eacd));var __createBinding=this&&this[a0_0x5bbc60(0x175)]||(Object['create']?function(_0x59cf63,_0x57b318,_0x1e620b,_0x387dc9){var _0x10e119=a0_0x5bbc60;if(_0x387dc9===undefined)_0x387dc9=_0x1e620b;var _0x1a1cf9=Object[_0x10e119(0x187)](_0x57b318,_0x1e620b);(!_0x1a1cf9||('get'in _0x1a1cf9?!_0x57b318[_0x10e119(0x191)]:_0x1a1cf9['writable']||_0x1a1cf9[_0x10e119(0x17a)]))&&(_0x1a1cf9={'enumerable':!![],'get':function(){return _0x57b318[_0x1e620b];}}),Object[_0x10e119(0x184)](_0x59cf63,_0x387dc9,_0x1a1cf9);}:function(_0x2c18f8,_0x4d636b,_0x24d8ec,_0x1bb9c8){if(_0x1bb9c8===undefined)_0x1bb9c8=_0x24d8ec;_0x2c18f8[_0x1bb9c8]=_0x4d636b[_0x24d8ec];}),__setModuleDefault=this&&this[a0_0x5bbc60(0x177)]||(Object['create']?function(_0x2c7063,_0x4b2cb0){Object['defineProperty'](_0x2c7063,'default',{'enumerable':!![],'value':_0x4b2cb0});}:function(_0xf270b7,_0x1c6935){_0xf270b7['default']=_0x1c6935;}),__importStar=this&&this[a0_0x5bbc60(0x18a)]||(function(){var _0x18c00f=function(_0x62d080){var _0x420867=a0_0x5e20;return _0x18c00f=Object[_0x420867(0x183)]||function(_0x3aaf20){var _0x35a52d=_0x420867,_0x132fd0=[];for(var _0x1e6002 in _0x3aaf20)if(Object[_0x35a52d(0x18e)][_0x35a52d(0x172)][_0x35a52d(0x189)](_0x3aaf20,_0x1e6002))_0x132fd0[_0x132fd0[_0x35a52d(0x18b)]]=_0x1e6002;return _0x132fd0;},_0x18c00f(_0x62d080);};return function(_0x1913dd){var _0x14e83c=a0_0x5e20;if(_0x1913dd&&_0x1913dd[_0x14e83c(0x191)])return _0x1913dd;var _0x11562d={};if(_0x1913dd!=null){for(var _0x2cefd8=_0x18c00f(_0x1913dd),_0x297e2b=0x0;_0x297e2b<_0x2cefd8['length'];_0x297e2b++)if(_0x2cefd8[_0x297e2b]!=='default')__createBinding(_0x11562d,_0x1913dd,_0x2cefd8[_0x297e2b]);}return __setModuleDefault(_0x11562d,_0x1913dd),_0x11562d;};}());function a0_0x387a(){var _0x1b45b2=['installClaudeHooks','configurable','4775375pdAjDJ','24jtEnMr','utf8','3374091VVGuRf','1196270zsufWi','1043909NlGOsX','writeFileSync','.claude','getOwnPropertyNames','defineProperty','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','10mvHNUE','getOwnPropertyDescriptor','261AFLJGo','call','__importStar','length','homedir','existsSync','prototype','4432236cUwGoR','post_tool_use.js','__esModule','7426510QSKKWM','mkdirSync','2cPgToQ','hasOwnProperty','path','314744ZYychr','__createBinding','hooks','__setModuleDefault','join'];a0_0x387a=function(){return _0x1b45b2;};return a0_0x387a();}function a0_0x5e20(_0x33b256,_0x48fbcd){_0x33b256=_0x33b256-0x172;var _0x387a98=a0_0x387a();var _0x5e2017=_0x387a98[_0x33b256];return _0x5e2017;}Object[a0_0x5bbc60(0x184)](exports,a0_0x5bbc60(0x191),{'value':!![]}),exports[a0_0x5bbc60(0x179)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5bbc60(0x173))),os=__importStar(require('os'));function installClaudeHooks(){var _0x10cf6a=a0_0x5bbc60;try{const _0x6a29bc=path[_0x10cf6a(0x178)](os[_0x10cf6a(0x18c)](),_0x10cf6a(0x182),_0x10cf6a(0x176));!fs[_0x10cf6a(0x18d)](_0x6a29bc)&&fs[_0x10cf6a(0x193)](_0x6a29bc,{'recursive':!![]});const _0x487fd0=path[_0x10cf6a(0x178)](_0x6a29bc,_0x10cf6a(0x190)),_0x5ccbc8=_0x10cf6a(0x185);fs[_0x10cf6a(0x181)](_0x487fd0,_0x5ccbc8,_0x10cf6a(0x17d));}catch(_0x14c7a6){}}
package/mcp.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0xbcf025=a0_0x2103;(function(_0x2d1c9c,_0x24cc9c){const _0x1de342=a0_0x2103,_0x1c8598=_0x2d1c9c();while(!![]){try{const _0x56f461=parseInt(_0x1de342(0x85))/0x1*(-parseInt(_0x1de342(0x87))/0x2)+parseInt(_0x1de342(0x99))/0x3+-parseInt(_0x1de342(0xb5))/0x4*(-parseInt(_0x1de342(0x8c))/0x5)+parseInt(_0x1de342(0xa7))/0x6+-parseInt(_0x1de342(0xa3))/0x7+-parseInt(_0x1de342(0xb7))/0x8*(parseInt(_0x1de342(0x95))/0x9)+-parseInt(_0x1de342(0x7d))/0xa*(-parseInt(_0x1de342(0x94))/0xb);if(_0x56f461===_0x24cc9c)break;else _0x1c8598['push'](_0x1c8598['shift']());}catch(_0x3b7cd4){_0x1c8598['push'](_0x1c8598['shift']());}}}(a0_0x3477,0x55d8d));var __createBinding=this&&this['__createBinding']||(Object[a0_0xbcf025(0x93)]?function(_0x22ec90,_0x15bd37,_0x40dcd9,_0x1f6fb8){const _0x4e9fe4=a0_0xbcf025;if(_0x1f6fb8===undefined)_0x1f6fb8=_0x40dcd9;var _0x116540=Object[_0x4e9fe4(0x8f)](_0x15bd37,_0x40dcd9);(!_0x116540||(_0x4e9fe4(0x8a)in _0x116540?!_0x15bd37['__esModule']:_0x116540['writable']||_0x116540[_0x4e9fe4(0xad)]))&&(_0x116540={'enumerable':!![],'get':function(){return _0x15bd37[_0x40dcd9];}}),Object[_0x4e9fe4(0xae)](_0x22ec90,_0x1f6fb8,_0x116540);}:function(_0x21acc1,_0x62ebe7,_0x4bf67c,_0x43522b){if(_0x43522b===undefined)_0x43522b=_0x4bf67c;_0x21acc1[_0x43522b]=_0x62ebe7[_0x4bf67c];}),__setModuleDefault=this&&this[a0_0xbcf025(0x89)]||(Object[a0_0xbcf025(0x93)]?function(_0x2e00eb,_0x2613ba){const _0x5b9884=a0_0xbcf025;Object['defineProperty'](_0x2e00eb,_0x5b9884(0x77),{'enumerable':!![],'value':_0x2613ba});}:function(_0x298020,_0x24b55f){const _0x4b4b2a=a0_0xbcf025;_0x298020[_0x4b4b2a(0x77)]=_0x24b55f;}),__importStar=this&&this['__importStar']||(function(){var _0x568f76=function(_0x26637a){const _0x148711=a0_0x2103;return _0x568f76=Object[_0x148711(0xa6)]||function(_0x5e727d){const _0x59764a=_0x148711;var _0x1161d1=[];for(var _0x6e68eb in _0x5e727d)if(Object[_0x59764a(0x8e)][_0x59764a(0x97)][_0x59764a(0x9b)](_0x5e727d,_0x6e68eb))_0x1161d1[_0x1161d1[_0x59764a(0x8b)]]=_0x6e68eb;return _0x1161d1;},_0x568f76(_0x26637a);};return function(_0x3f438b){const _0x1500f4=a0_0x2103;if(_0x3f438b&&_0x3f438b[_0x1500f4(0x74)])return _0x3f438b;var _0x1c530d={};if(_0x3f438b!=null){for(var _0x569eb4=_0x568f76(_0x3f438b),_0x3c125b=0x0;_0x3c125b<_0x569eb4[_0x1500f4(0x8b)];_0x3c125b++)if(_0x569eb4[_0x3c125b]!=='default')__createBinding(_0x1c530d,_0x3f438b,_0x569eb4[_0x3c125b]);}return __setModuleDefault(_0x1c530d,_0x3f438b),_0x1c530d;};}());function a0_0x2103(_0x37759c,_0x844004){const _0x3477f1=a0_0x3477();return a0_0x2103=function(_0x21038f,_0x202058){_0x21038f=_0x21038f-0x74;let _0x286706=_0x3477f1[_0x21038f];return _0x286706;},a0_0x2103(_0x37759c,_0x844004);}Object[a0_0xbcf025(0xae)](exports,'__esModule',{'value':!![]}),exports['runMcpProxy']=runMcpProxy;const child_process_1=require(a0_0xbcf025(0x91)),readline=__importStar(require(a0_0xbcf025(0x86))),filters_1=require(a0_0xbcf025(0x7f)),tracker_1=require('./tracker'),proxy_conv_1=require('./proxy-conv'),proxy_resp_1=require(a0_0xbcf025(0xa8));function runMcpProxy(_0x5ea93b,_0xa9b4bd){const _0x59978f=a0_0xbcf025,_0x39b34c=(0x0,child_process_1['spawn'])(_0x5ea93b,_0xa9b4bd,{'stdio':['pipe',_0x59978f(0xba),_0x59978f(0x96)]}),_0x51927e=tracker_1[_0x59978f(0xa1)][_0x59978f(0x78)](),_0x41daba=_0x51927e['features_enabled']||{},_0x1f2b2a=_0x41daba[_0x59978f(0xa5)]!==![],_0x41eaa9=_0x41daba[_0x59978f(0x80)]!==![],_0x44bde3=readline[_0x59978f(0x9f)]({'input':process[_0x59978f(0xb0)],'terminal':![]});_0x44bde3['on']('line',_0x1ffb1e=>{const _0x1b89e2=_0x59978f;try{const _0x4327eb=JSON[_0x1b89e2(0x7e)](_0x1ffb1e);if(_0x4327eb&&_0x4327eb[_0x1b89e2(0x98)]==='2.0'&&_0x4327eb[_0x1b89e2(0xb4)]&&_0x4327eb[_0x1b89e2(0xb1)]){const _0x417e8d=_0x4327eb[_0x1b89e2(0xb1)];if(Array[_0x1b89e2(0x7b)](_0x417e8d['messages'])&&_0x417e8d[_0x1b89e2(0xa4)][_0x1b89e2(0x8b)]>0x0){if(_0x1f2b2a){const _0x230666=(0x0,proxy_conv_1['compressConversation'])(_0x417e8d[_0x1b89e2(0xa4)]);(_0x230666['trimmedCount']>0x0||_0x230666['savedTokens']>0x0)&&(_0x417e8d[_0x1b89e2(0xa4)]=_0x230666[_0x1b89e2(0xa4)],tracker_1['tracker'][_0x1b89e2(0x82)](_0x1b89e2(0xac),_0x230666['trimmedCount']+_0x230666[_0x1b89e2(0xa4)][_0x1b89e2(0x8b)]+_0x1b89e2(0x7c),_0x230666[_0x1b89e2(0xa4)]['length']+_0x1b89e2(0xb6)+_0x230666[_0x1b89e2(0x9d)]+_0x1b89e2(0x9a)+_0x230666['savedTokens']+_0x1b89e2(0x90),0x0,undefined,['conv_compress']));}if(_0x41eaa9){const _0x5d2990=(0x0,proxy_resp_1[_0x1b89e2(0xa2)])(_0x417e8d[_0x1b89e2(0xa4)],_0x417e8d['max_tokens']);if(_0x5d2990){const _0x25dd33=_0x417e8d[_0x1b89e2(0xb8)]||_0x1b89e2(0x77);_0x417e8d['max_tokens']=_0x5d2990[_0x1b89e2(0xb8)],tracker_1[_0x1b89e2(0xa1)][_0x1b89e2(0x82)](_0x1b89e2(0x9e),_0x1b89e2(0x84)+_0x25dd33,_0x1b89e2(0x84)+_0x5d2990[_0x1b89e2(0xb8)]+'\x20('+_0x5d2990[_0x1b89e2(0x83)]+')',0x0,undefined,[_0x1b89e2(0x80)]);}}}_0x39b34c[_0x1b89e2(0xb0)][_0x1b89e2(0xbb)](JSON[_0x1b89e2(0xb2)](_0x4327eb)+'\x0a');}else _0x39b34c[_0x1b89e2(0xb0)]['write'](_0x1ffb1e+'\x0a');}catch{_0x39b34c[_0x1b89e2(0xb0)][_0x1b89e2(0xbb)](_0x1ffb1e+'\x0a');}}),_0x44bde3['on'](_0x59978f(0xb3),()=>{const _0x4d2fcd=_0x59978f;try{_0x39b34c[_0x4d2fcd(0xb0)]['end']();}catch{}});const _0x346cb3=readline['createInterface']({'input':_0x39b34c['stdout'],'terminal':![]});_0x346cb3['on'](_0x59978f(0xb9),_0xf87fd9=>{const _0x10eaa3=_0x59978f;try{const _0x36d422=JSON['parse'](_0xf87fd9);if(_0x36d422&&_0x36d422[_0x10eaa3(0x98)]===_0x10eaa3(0x7a)&&_0x36d422['id']!==undefined&&_0x36d422[_0x10eaa3(0xaf)]&&Array['isArray'](_0x36d422[_0x10eaa3(0xaf)][_0x10eaa3(0x9c)])){let _0x5bda84=![];for(const _0x5e0a89 of _0x36d422[_0x10eaa3(0xaf)][_0x10eaa3(0x9c)]){if(_0x5e0a89[_0x10eaa3(0x75)]===_0x10eaa3(0x88)&&typeof _0x5e0a89['text']===_0x10eaa3(0x81)&&_0x5e0a89[_0x10eaa3(0x88)][_0x10eaa3(0x8d)]()[_0x10eaa3(0x8b)]>0x0){const _0x3d2c6a=_0x5e0a89['text'],_0x29d53c=(0x0,filters_1['compressOutput'])(_0x10eaa3(0xaa),_0x3d2c6a,'',tracker_1[_0x10eaa3(0xa1)]['getConfig']()[_0x10eaa3(0xab)]);tracker_1[_0x10eaa3(0xa1)]['logExecution'](_0x10eaa3(0xa0)+_0x36d422['id']+')',_0x3d2c6a,_0x29d53c,0x0),_0x5e0a89[_0x10eaa3(0x88)]=_0x29d53c,_0x5bda84=!![];}}_0x5bda84?process[_0x10eaa3(0xa9)][_0x10eaa3(0xbb)](JSON[_0x10eaa3(0xb2)](_0x36d422)+'\x0a'):process['stdout'][_0x10eaa3(0xbb)](_0xf87fd9+'\x0a');}else process[_0x10eaa3(0xa9)][_0x10eaa3(0xbb)](_0xf87fd9+'\x0a');}catch{process[_0x10eaa3(0xa9)][_0x10eaa3(0xbb)](_0xf87fd9+'\x0a');}}),_0x39b34c['on'](_0x59978f(0xb3),_0x20a30a=>{const _0x29374f=_0x59978f;process[_0x29374f(0x76)](_0x20a30a||0x0);}),_0x39b34c['on'](_0x59978f(0x79),_0x318c02=>{const _0x1885d1=_0x59978f;console['error'](_0x1885d1(0x92)+_0x318c02['message']),process[_0x1885d1(0x76)](0x1);});}function a0_0x3477(){const _0x216312=['prototype','getOwnPropertyDescriptor','\x20tokens\x20saved)','child_process','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','create','9813067iduRYc','9NNqahx','inherit','hasOwnProperty','jsonrpc','443982bOjjPf','\x20trimmed,\x20~','call','content','trimmedCount','proxy:resp-optimize','createInterface','mcp\x20tool\x20(id:\x20','tracker','optimizeMaxTokens','4194729GaPxxg','messages','conv_compress','getOwnPropertyNames','3629400fElsjV','./proxy-resp','stdout','mcp-tool-call','redaction_enabled','proxy:conv-compress','configurable','defineProperty','result','stdin','params','stringify','close','method','316544OshJuT','\x20messages\x20(','1942088WRjaGl','max_tokens','line','pipe','write','__esModule','type','exit','default','getConfig','error','2.0','isArray','\x20messages','10nhRwQz','parse','./filters','resp_optimize','string','logExecution','complexity','max_tokens:\x20','5DAEmEC','readline','212196XWGaKw','text','__setModuleDefault','get','length','5GKjSQv','trim'];a0_0x3477=function(){return _0x216312;};return a0_0x3477();}
1
+ 'use strict';const a0_0x679d0b=a0_0x4045;function a0_0xa014(){const _0x1ae652=['error','16GWcEIy','isArray','runMcpProxy','text','line','child_process','377440dYABWn','getOwnPropertyDescriptor','savedTokens','48UfVPRq','getOwnPropertyNames','12036CEmBuj','stdout','__importStar','compressConversation','messages','exit','close','call','488097yqVGHu','trim','resp_optimize','prototype','tracker','mcp\x20tool\x20(id:\x20','conv_compress','hasOwnProperty','optimizeMaxTokens','./proxy-resp','3949XzhPrG','pipe','20620cYaYHU','./filters','max_tokens','getConfig','spawn','createInterface','defineProperty','params','trimmedCount','106541KJFwGi','\x20trimmed,\x20~','proxy:resp-optimize','890022POzTkk','1335qoWTBi','end','compressOutput','type','__setModuleDefault','parse','1593279pQgIRq','message','configurable','redaction_enabled','features_enabled','stdin','write','writable','complexity','get','jsonrpc','proxy:conv-compress','\x20tokens\x20saved)','logExecution','max_tokens:\x20','./proxy-conv','create','default','2.0','content','__esModule','stringify','result','length'];a0_0xa014=function(){return _0x1ae652;};return a0_0xa014();}function a0_0x4045(_0x1e0d49,_0x25a89a){_0x1e0d49=_0x1e0d49-0xd1;const _0xa01431=a0_0xa014();let _0x4045b3=_0xa01431[_0x1e0d49];return _0x4045b3;}(function(_0x169b13,_0x2d811c){const _0xc54ca6=a0_0x4045,_0x4ab6af=_0x169b13();while(!![]){try{const _0x11b736=parseInt(_0xc54ca6(0x11b))/0x1*(parseInt(_0xc54ca6(0xf3))/0x2)+-parseInt(_0xc54ca6(0xda))/0x3+parseInt(_0xc54ca6(0xfe))/0x4*(parseInt(_0xc54ca6(0xd4))/0x5)+-parseInt(_0xc54ca6(0xd3))/0x6+-parseInt(_0xc54ca6(0xf9))/0x7*(-parseInt(_0xc54ca6(0xfc))/0x8)+-parseInt(_0xc54ca6(0x106))/0x9+parseInt(_0xc54ca6(0x112))/0xa*(-parseInt(_0xc54ca6(0x110))/0xb);if(_0x11b736===_0x2d811c)break;else _0x4ab6af['push'](_0x4ab6af['shift']());}catch(_0x13b7f7){_0x4ab6af['push'](_0x4ab6af['shift']());}}}(a0_0xa014,0x7b5f2));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x37d44d,_0x2f6498,_0x12a583,_0x4a3c72){const _0x2458e4=a0_0x4045;if(_0x4a3c72===undefined)_0x4a3c72=_0x12a583;var _0x59ea9c=Object[_0x2458e4(0xfa)](_0x2f6498,_0x12a583);(!_0x59ea9c||(_0x2458e4(0xe3)in _0x59ea9c?!_0x2f6498[_0x2458e4(0xee)]:_0x59ea9c[_0x2458e4(0xe1)]||_0x59ea9c[_0x2458e4(0xdc)]))&&(_0x59ea9c={'enumerable':!![],'get':function(){return _0x2f6498[_0x12a583];}}),Object[_0x2458e4(0x118)](_0x37d44d,_0x4a3c72,_0x59ea9c);}:function(_0x12a6fb,_0x1c0c04,_0x19a5d3,_0x278788){if(_0x278788===undefined)_0x278788=_0x19a5d3;_0x12a6fb[_0x278788]=_0x1c0c04[_0x19a5d3];}),__setModuleDefault=this&&this[a0_0x679d0b(0xd8)]||(Object[a0_0x679d0b(0xea)]?function(_0x3a0407,_0x233df4){const _0x463875=a0_0x679d0b;Object[_0x463875(0x118)](_0x3a0407,_0x463875(0xeb),{'enumerable':!![],'value':_0x233df4});}:function(_0x3bcfeb,_0xd60218){const _0x2916d3=a0_0x679d0b;_0x3bcfeb[_0x2916d3(0xeb)]=_0xd60218;}),__importStar=this&&this[a0_0x679d0b(0x100)]||(function(){var _0x5964e8=function(_0x3e4b80){const _0x2c5991=a0_0x4045;return _0x5964e8=Object[_0x2c5991(0xfd)]||function(_0x164dc1){const _0x5d9771=_0x2c5991;var _0x13d737=[];for(var _0x18e48b in _0x164dc1)if(Object[_0x5d9771(0x109)][_0x5d9771(0x10d)][_0x5d9771(0x105)](_0x164dc1,_0x18e48b))_0x13d737[_0x13d737['length']]=_0x18e48b;return _0x13d737;},_0x5964e8(_0x3e4b80);};return function(_0x5744d5){const _0x544d29=a0_0x4045;if(_0x5744d5&&_0x5744d5['__esModule'])return _0x5744d5;var _0x537929={};if(_0x5744d5!=null){for(var _0x2dc9cb=_0x5964e8(_0x5744d5),_0x20b2a4=0x0;_0x20b2a4<_0x2dc9cb[_0x544d29(0xf1)];_0x20b2a4++)if(_0x2dc9cb[_0x20b2a4]!=='default')__createBinding(_0x537929,_0x5744d5,_0x2dc9cb[_0x20b2a4]);}return __setModuleDefault(_0x537929,_0x5744d5),_0x537929;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x679d0b(0xf5)]=runMcpProxy;const child_process_1=require(a0_0x679d0b(0xf8)),readline=__importStar(require('readline')),filters_1=require(a0_0x679d0b(0x113)),tracker_1=require('./tracker'),proxy_conv_1=require(a0_0x679d0b(0xe9)),proxy_resp_1=require(a0_0x679d0b(0x10f));function runMcpProxy(_0x154d01,_0x3ddc6d){const _0x453ff6=a0_0x679d0b,_0x2d51b4=(0x0,child_process_1[_0x453ff6(0x116)])(_0x154d01,_0x3ddc6d,{'stdio':[_0x453ff6(0x111),_0x453ff6(0x111),'inherit']}),_0x317af1=tracker_1['tracker'][_0x453ff6(0x115)](),_0x5f0cf1=_0x317af1[_0x453ff6(0xde)]||{},_0x5dbdf9=_0x5f0cf1['conv_compress']!==![],_0x320dcb=_0x5f0cf1[_0x453ff6(0x108)]!==![],_0x19e392=readline[_0x453ff6(0x117)]({'input':process[_0x453ff6(0xdf)],'terminal':![]});_0x19e392['on']('line',_0x3e7396=>{const _0x271c3a=_0x453ff6;try{const _0x27df00=JSON[_0x271c3a(0xd9)](_0x3e7396);if(_0x27df00&&_0x27df00[_0x271c3a(0xe4)]===_0x271c3a(0xec)&&_0x27df00['method']&&_0x27df00['params']){const _0x5778c8=_0x27df00[_0x271c3a(0x119)];if(Array[_0x271c3a(0xf4)](_0x5778c8['messages'])&&_0x5778c8[_0x271c3a(0x102)][_0x271c3a(0xf1)]>0x0){if(_0x5dbdf9){const _0x78290b=(0x0,proxy_conv_1[_0x271c3a(0x101)])(_0x5778c8[_0x271c3a(0x102)]);(_0x78290b[_0x271c3a(0x11a)]>0x0||_0x78290b['savedTokens']>0x0)&&(_0x5778c8['messages']=_0x78290b['messages'],tracker_1[_0x271c3a(0x10a)][_0x271c3a(0xe7)](_0x271c3a(0xe5),_0x78290b['trimmedCount']+_0x78290b[_0x271c3a(0x102)]['length']+'\x20messages',_0x78290b[_0x271c3a(0x102)][_0x271c3a(0xf1)]+'\x20messages\x20('+_0x78290b[_0x271c3a(0x11a)]+_0x271c3a(0xd1)+_0x78290b[_0x271c3a(0xfb)]+_0x271c3a(0xe6),0x0,undefined,[_0x271c3a(0x10c)]));}if(_0x320dcb){const _0xa994ac=(0x0,proxy_resp_1[_0x271c3a(0x10e)])(_0x5778c8['messages'],_0x5778c8[_0x271c3a(0x114)]);if(_0xa994ac){const _0x298f24=_0x5778c8[_0x271c3a(0x114)]||_0x271c3a(0xeb);_0x5778c8[_0x271c3a(0x114)]=_0xa994ac[_0x271c3a(0x114)],tracker_1[_0x271c3a(0x10a)][_0x271c3a(0xe7)](_0x271c3a(0xd2),_0x271c3a(0xe8)+_0x298f24,_0x271c3a(0xe8)+_0xa994ac[_0x271c3a(0x114)]+'\x20('+_0xa994ac[_0x271c3a(0xe2)]+')',0x0,undefined,[_0x271c3a(0x108)]);}}}_0x2d51b4[_0x271c3a(0xdf)]['write'](JSON[_0x271c3a(0xef)](_0x27df00)+'\x0a');}else _0x2d51b4['stdin'][_0x271c3a(0xe0)](_0x3e7396+'\x0a');}catch{_0x2d51b4[_0x271c3a(0xdf)]['write'](_0x3e7396+'\x0a');}}),_0x19e392['on'](_0x453ff6(0x104),()=>{const _0x36205c=_0x453ff6;try{_0x2d51b4[_0x36205c(0xdf)][_0x36205c(0xd5)]();}catch{}});const _0x481114=readline['createInterface']({'input':_0x2d51b4[_0x453ff6(0xff)],'terminal':![]});_0x481114['on'](_0x453ff6(0xf7),_0xaf04bf=>{const _0x13e187=_0x453ff6;try{const _0x138c07=JSON[_0x13e187(0xd9)](_0xaf04bf);if(_0x138c07&&_0x138c07[_0x13e187(0xe4)]===_0x13e187(0xec)&&_0x138c07['id']!==undefined&&_0x138c07['result']&&Array[_0x13e187(0xf4)](_0x138c07['result'][_0x13e187(0xed)])){let _0xf6c6b=![];for(const _0x426325 of _0x138c07[_0x13e187(0xf0)][_0x13e187(0xed)]){if(_0x426325[_0x13e187(0xd7)]==='text'&&typeof _0x426325[_0x13e187(0xf6)]==='string'&&_0x426325['text'][_0x13e187(0x107)]()[_0x13e187(0xf1)]>0x0){const _0x531f3d=_0x426325[_0x13e187(0xf6)],_0x5c52ac=(0x0,filters_1[_0x13e187(0xd6)])('mcp-tool-call',_0x531f3d,'',tracker_1[_0x13e187(0x10a)][_0x13e187(0x115)]()[_0x13e187(0xdd)]);tracker_1[_0x13e187(0x10a)][_0x13e187(0xe7)](_0x13e187(0x10b)+_0x138c07['id']+')',_0x531f3d,_0x5c52ac,0x0),_0x426325[_0x13e187(0xf6)]=_0x5c52ac,_0xf6c6b=!![];}}_0xf6c6b?process[_0x13e187(0xff)][_0x13e187(0xe0)](JSON[_0x13e187(0xef)](_0x138c07)+'\x0a'):process[_0x13e187(0xff)]['write'](_0xaf04bf+'\x0a');}else process[_0x13e187(0xff)][_0x13e187(0xe0)](_0xaf04bf+'\x0a');}catch{process[_0x13e187(0xff)][_0x13e187(0xe0)](_0xaf04bf+'\x0a');}}),_0x2d51b4['on'](_0x453ff6(0x104),_0x20a19d=>{const _0x58f5d2=_0x453ff6;process[_0x58f5d2(0x103)](_0x20a19d||0x0);}),_0x2d51b4['on'](_0x453ff6(0xf2),_0x323755=>{const _0x3b61bd=_0x453ff6;console[_0x3b61bd(0xf2)]('[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20'+_0x323755[_0x3b61bd(0xdb)]),process['exit'](0x1);});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trimprompt",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "TrimPrompt — Save 80% on LLM tokens. Zero-config CLI proxy for AI coding agents",
5
5
  "keywords": [
6
6
  "llm",
package/proxy-conv.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x32dc22=a0_0x313b;(function(_0x45e260,_0x16e4b8){const _0x4ec956=a0_0x313b,_0x4f915f=_0x45e260();while(!![]){try{const _0x2c123d=-parseInt(_0x4ec956(0x1bb))/0x1*(-parseInt(_0x4ec956(0x1cf))/0x2)+parseInt(_0x4ec956(0x1de))/0x3+parseInt(_0x4ec956(0x1bd))/0x4*(-parseInt(_0x4ec956(0x1b8))/0x5)+-parseInt(_0x4ec956(0x1d1))/0x6+-parseInt(_0x4ec956(0x1ce))/0x7*(-parseInt(_0x4ec956(0x1c9))/0x8)+parseInt(_0x4ec956(0x1c8))/0x9+-parseInt(_0x4ec956(0x1d3))/0xa*(parseInt(_0x4ec956(0x1d2))/0xb);if(_0x2c123d===_0x16e4b8)break;else _0x4f915f['push'](_0x4f915f['shift']());}catch(_0xa66200){_0x4f915f['push'](_0x4f915f['shift']());}}}(a0_0x514a,0x8a600));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x32dc22(0x1d4)]=compressConversation;function a0_0x514a(){const _0x56ba6c=['99870XzUlyg','compressConversation','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','score','content','object','slice','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','isArray','map','join','1724646ghqbhE','495HUMFGP','originalIndex','sort','131KiEawI','role','12156Jmdxqb','filter','system','tokens','\x20chars\x20trimmed\x20...]','msg','indexOf','\x0a[...\x20','length','push','tool_result','6965460WqDHBM','360PSsEWl','reduce','type','\x20lines\x20trimmed\x20...]','string','173957OPfUIb','7244LHHjcT','text','2077218ONXWCG','1903VCYMsL'];a0_0x514a=function(){return _0x56ba6c;};return a0_0x514a();}const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function estimateTokens(_0x142981){return Math['ceil'](_0x142981['length']/0x4);}function blockText(_0x2cf467){const _0xe9727d=a0_0x32dc22;if(!_0x2cf467||typeof _0x2cf467!==_0xe9727d(0x1d8))return'';if(_0x2cf467[_0xe9727d(0x1cb)]===_0xe9727d(0x1d0)&&typeof _0x2cf467[_0xe9727d(0x1d0)]===_0xe9727d(0x1cd))return _0x2cf467[_0xe9727d(0x1d0)];if(_0x2cf467[_0xe9727d(0x1cb)]==='tool_result'){if(typeof _0x2cf467['content']===_0xe9727d(0x1cd))return _0x2cf467[_0xe9727d(0x1d7)];if(Array[_0xe9727d(0x1db)](_0x2cf467['content']))return _0x2cf467['content']['map'](blockText)['filter'](Boolean)[_0xe9727d(0x1dd)]('\x0a');}return'';}function messageText(_0xf73622){const _0x31b6cf=a0_0x32dc22;if(typeof _0xf73622[_0x31b6cf(0x1d7)]===_0x31b6cf(0x1cd))return _0xf73622[_0x31b6cf(0x1d7)];if(Array[_0x31b6cf(0x1db)](_0xf73622['content']))return _0xf73622[_0x31b6cf(0x1d7)][_0x31b6cf(0x1dc)](blockText)['filter'](Boolean)[_0x31b6cf(0x1dd)]('\x0a');return'';}function summarizeText(_0x5894f4){const _0x592579=a0_0x32dc22,_0x3f7e35=estimateTokens(_0x5894f4),_0x3bf988=_0x5894f4['split']('\x0a');if(_0x3f7e35>0x7d0){if(_0x3bf988['length']>0xa){const _0x3a984a=_0x3bf988[_0x592579(0x1d9)](0x0,0x5)['join']('\x0a'),_0x59ae28=_0x3bf988[_0x592579(0x1d9)](-0x5)['join']('\x0a');return _0x3a984a+_0x592579(0x1c4)+(_0x3bf988[_0x592579(0x1c5)]-0xa)+_0x592579(0x1da)+_0x59ae28;}return _0x5894f4[_0x592579(0x1d9)](0x0,0x7d0)+('\x0a[...\x20'+(_0x5894f4[_0x592579(0x1c5)]-0x7d0)+_0x592579(0x1d5));}if(_0x3f7e35>0x1f4){if(_0x3bf988[_0x592579(0x1c5)]>0xa)return _0x3bf988[_0x592579(0x1d9)](0x0,0xa)[_0x592579(0x1dd)]('\x0a')+(_0x592579(0x1c4)+(_0x3bf988['length']-0xa)+_0x592579(0x1cc));return _0x5894f4[_0x592579(0x1d9)](0x0,0x320)+(_0x592579(0x1c4)+(_0x5894f4[_0x592579(0x1c5)]-0x320)+_0x592579(0x1c1));}return _0x5894f4;}function summarizeBlock(_0xf4841){const _0x1702c3=a0_0x32dc22;if(!_0xf4841||typeof _0xf4841!==_0x1702c3(0x1d8))return _0xf4841;if(_0xf4841['type']===_0x1702c3(0x1d0)&&typeof _0xf4841[_0x1702c3(0x1d0)]==='string')return{..._0xf4841,'text':summarizeText(_0xf4841[_0x1702c3(0x1d0)])};if(_0xf4841[_0x1702c3(0x1cb)]===_0x1702c3(0x1c7)){if(typeof _0xf4841[_0x1702c3(0x1d7)]===_0x1702c3(0x1cd))return{..._0xf4841,'content':summarizeText(_0xf4841[_0x1702c3(0x1d7)])};if(Array[_0x1702c3(0x1db)](_0xf4841['content'])){const _0x105dcd=largestBlockIndex(_0xf4841[_0x1702c3(0x1d7)]);if(_0x105dcd>=0x0){const _0xe06c05=_0xf4841[_0x1702c3(0x1d7)][_0x1702c3(0x1dc)]((_0x281237,_0x150694)=>_0x150694===_0x105dcd?summarizeBlock(_0x281237):_0x281237);return{..._0xf4841,'content':_0xe06c05};}}}return _0xf4841;}function largestBlockIndex(_0x2e3eed){let _0x204d8f=-0x1,_0x172b83=-0x1;return _0x2e3eed['forEach']((_0x536465,_0x47aca3)=>{const _0x552342=blockText(_0x536465)['length'];_0x552342>_0x172b83&&(_0x172b83=_0x552342,_0x204d8f=_0x47aca3);}),_0x172b83>0x0?_0x204d8f:-0x1;}function scoreMessage(_0x2bd8e6,_0x5021ec,_0x36a23d){const _0x3cfd80=a0_0x32dc22,_0x3d17ab=ROLE_WEIGHT[_0x2bd8e6[_0x3cfd80(0x1bc)]]||0.4,_0x4f311c=(_0x5021ec+0x1)/_0x36a23d,_0x227908=messageText(_0x2bd8e6),_0x116523=estimateTokens(_0x227908),_0x399411=_0x116523>0x7d0?0.6:_0x116523>0x1f4?0.8:0x1;return _0x3d17ab*(0.3+0.7*_0x4f311c)*_0x399411;}function summarizeMessage(_0xcf58ff){const _0x57e9ba=a0_0x32dc22,_0x503a65=estimateTokens(messageText(_0xcf58ff));if(_0x503a65<=0x1f4)return _0xcf58ff;if(typeof _0xcf58ff[_0x57e9ba(0x1d7)]===_0x57e9ba(0x1cd))return{..._0xcf58ff,'content':summarizeText(_0xcf58ff['content'])};if(Array[_0x57e9ba(0x1db)](_0xcf58ff[_0x57e9ba(0x1d7)])){const _0x5aaed0=largestBlockIndex(_0xcf58ff[_0x57e9ba(0x1d7)]);if(_0x5aaed0>=0x0){const _0xcc2a86=_0xcf58ff[_0x57e9ba(0x1d7)][_0x57e9ba(0x1dc)]((_0x320d64,_0x6e21d6)=>_0x6e21d6===_0x5aaed0?summarizeBlock(_0x320d64):_0x320d64);return{..._0xcf58ff,'content':_0xcc2a86};}}return _0xcf58ff;}function compressConversation(_0x1fda1f,_0x2f0f04){const _0xa3a0f1={'messages':_0x1fda1f,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x1fda1f||!Array['isArray'](_0x1fda1f)||_0x1fda1f['length']<=0x6)return _0xa3a0f1;try{return _compressConversation(_0x1fda1f,_0x2f0f04);}catch{return _0xa3a0f1;}}function a0_0x313b(_0x3df2bb,_0x1c6b44){const _0x514a4e=a0_0x514a();return a0_0x313b=function(_0x313b97,_0x15d6fc){_0x313b97=_0x313b97-0x1b8;let _0x59ea30=_0x514a4e[_0x313b97];return _0x59ea30;},a0_0x313b(_0x3df2bb,_0x1c6b44);}function _compressConversation(_0xf98bed,_0x4e65b2){const _0x289716=a0_0x32dc22,_0x10f720=_0x4e65b2||0x13880,_0x316c0a=0x4,_0x26df2d=_0xf98bed[_0x289716(0x1be)](_0x46fb6f=>_0x46fb6f[_0x289716(0x1bc)]===_0x289716(0x1bf)),_0xcb4088=_0xf98bed[_0x289716(0x1be)](_0xc04e5c=>_0xc04e5c[_0x289716(0x1bc)]!==_0x289716(0x1bf)),_0x2457c0=_0xcb4088[_0x289716(0x1d9)](-_0x316c0a),_0x2fe54b=_0xcb4088[_0x289716(0x1d9)](0x0,-_0x316c0a),_0x5040c2=_0x2fe54b['map']((_0x33b520,_0x293eac)=>({'msg':_0x33b520,'score':scoreMessage(_0x33b520,_0x293eac,_0x2fe54b[_0x289716(0x1c5)]),'tokens':estimateTokens(messageText(_0x33b520))})),_0x57aca1=_0x5040c2[_0x289716(0x1ca)]((_0x49b04b,_0x1dcc6b)=>_0x49b04b+_0x1dcc6b[_0x289716(0x1c0)],0x0),_0x462d50=_0x2457c0['reduce']((_0x2a31f4,_0x1a35ab)=>_0x2a31f4+estimateTokens(messageText(_0x1a35ab)),0x0),_0x228729=_0x26df2d['reduce']((_0x4011e8,_0x127d70)=>_0x4011e8+estimateTokens(messageText(_0x127d70)),0x0),_0x3667d9=_0x10f720-_0x462d50-_0x228729;if(_0x57aca1<=_0x3667d9){let _0x5a0f59=0x0;const _0x45953d=_0x5040c2[_0x289716(0x1dc)](_0x572705=>{const _0x19bbf2=_0x289716;if(_0x572705[_0x19bbf2(0x1c0)]>0x1f4){const _0x48872b=summarizeMessage(_0x572705[_0x19bbf2(0x1c2)]),_0x3eb426=estimateTokens(messageText(_0x48872b));if(_0x3eb426<_0x572705[_0x19bbf2(0x1c0)])return _0x5a0f59+=_0x572705[_0x19bbf2(0x1c0)]-_0x3eb426,_0x48872b;}return _0x572705[_0x19bbf2(0x1c2)];});return{'messages':[..._0x26df2d,..._0x45953d,..._0x2457c0],'trimmedCount':0x0,'savedTokens':_0x5a0f59};}_0x5040c2['sort']((_0x13304b,_0xb0993)=>_0xb0993[_0x289716(0x1d6)]-_0x13304b['score']);let _0x153df5=0x0,_0x49fd63=0x0,_0x49d099=0x0;const _0x2c0e53=[];for(const _0x4b5086 of _0x5040c2){if(_0x153df5+_0x4b5086['tokens']<=_0x3667d9){if(_0x4b5086[_0x289716(0x1c0)]>0x3e8){const _0x217f11=summarizeMessage(_0x4b5086['msg']),_0xac4fb9=estimateTokens(messageText(_0x217f11));_0x49d099+=_0x4b5086[_0x289716(0x1c0)]-_0xac4fb9,_0x153df5+=_0xac4fb9,_0x2c0e53[_0x289716(0x1c6)]({'msg':_0x217f11,'originalIndex':_0x2fe54b['indexOf'](_0x4b5086[_0x289716(0x1c2)])});}else _0x153df5+=_0x4b5086['tokens'],_0x2c0e53[_0x289716(0x1c6)]({'msg':_0x4b5086[_0x289716(0x1c2)],'originalIndex':_0x2fe54b[_0x289716(0x1c3)](_0x4b5086[_0x289716(0x1c2)])});}else _0x49fd63++,_0x49d099+=_0x4b5086[_0x289716(0x1c0)];}_0x2c0e53[_0x289716(0x1ba)]((_0x226f9e,_0x47fa0a)=>_0x226f9e['originalIndex']-_0x47fa0a[_0x289716(0x1b9)]);const _0x58f33c=[..._0x26df2d,..._0x2c0e53[_0x289716(0x1dc)](_0x100b65=>_0x100b65[_0x289716(0x1c2)]),..._0x2457c0];return{'messages':_0x58f33c,'trimmedCount':_0x49fd63,'savedTokens':_0x49d099};}
1
+ 'use strict';function a0_0x26a1(_0x549a81,_0xe2fa13){_0x549a81=_0x549a81-0x18a;const _0x206041=a0_0x2060();let _0x26a18e=_0x206041[_0x549a81];return _0x26a18e;}const a0_0x34c7ea=a0_0x26a1;(function(_0x2be344,_0x28eff9){const _0x35559b=a0_0x26a1,_0x287aed=_0x2be344();while(!![]){try{const _0x273c97=-parseInt(_0x35559b(0x18e))/0x1*(parseInt(_0x35559b(0x1b3))/0x2)+parseInt(_0x35559b(0x19c))/0x3+-parseInt(_0x35559b(0x1ab))/0x4+parseInt(_0x35559b(0x193))/0x5+parseInt(_0x35559b(0x1a2))/0x6*(-parseInt(_0x35559b(0x1a5))/0x7)+parseInt(_0x35559b(0x18f))/0x8*(parseInt(_0x35559b(0x1b2))/0x9)+parseInt(_0x35559b(0x199))/0xa;if(_0x273c97===_0x28eff9)break;else _0x287aed['push'](_0x287aed['shift']());}catch(_0x3b7d30){_0x287aed['push'](_0x287aed['shift']());}}}(a0_0x2060,0x8409e));Object[a0_0x34c7ea(0x19b)](exports,a0_0x34c7ea(0x1a7),{'value':!![]}),exports[a0_0x34c7ea(0x19f)]=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function a0_0x2060(){const _0x46bd75=['6388yQKvbP','24wHmdLU','string','forEach','tokens','1002660XkKSqq','object','push','msg','slice','role','366720DpcZTT','system','defineProperty','2392710CHVtdp','originalIndex','\x20chars\x20trimmed\x20...]','compressConversation','content','map','551568uYavvV','type','reduce','42jNmdhn','join','__esModule','sort','tool_result','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','422776Ungley','text','indexOf','\x0a[...\x20','length','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','ceil','815742oimiUD','34vHWbPe','filter','score','\x20lines\x20trimmed\x20...]','isArray'];a0_0x2060=function(){return _0x46bd75;};return a0_0x2060();}function estimateTokens(_0x20c6c5){const _0x5ddbf6=a0_0x34c7ea;return Math[_0x5ddbf6(0x1b1)](_0x20c6c5['length']/0x4);}function blockText(_0x5ad4de){const _0x5b64c2=a0_0x34c7ea;if(!_0x5ad4de||typeof _0x5ad4de!==_0x5b64c2(0x194))return'';if(_0x5ad4de[_0x5b64c2(0x1a3)]==='text'&&typeof _0x5ad4de[_0x5b64c2(0x1ac)]==='string')return _0x5ad4de[_0x5b64c2(0x1ac)];if(_0x5ad4de[_0x5b64c2(0x1a3)]===_0x5b64c2(0x1a9)){if(typeof _0x5ad4de[_0x5b64c2(0x1a0)]===_0x5b64c2(0x190))return _0x5ad4de[_0x5b64c2(0x1a0)];if(Array[_0x5b64c2(0x18d)](_0x5ad4de[_0x5b64c2(0x1a0)]))return _0x5ad4de[_0x5b64c2(0x1a0)][_0x5b64c2(0x1a1)](blockText)['filter'](Boolean)[_0x5b64c2(0x1a6)]('\x0a');}return'';}function messageText(_0x5cd2bb){const _0x3e0421=a0_0x34c7ea;if(typeof _0x5cd2bb[_0x3e0421(0x1a0)]===_0x3e0421(0x190))return _0x5cd2bb[_0x3e0421(0x1a0)];if(Array[_0x3e0421(0x18d)](_0x5cd2bb['content']))return _0x5cd2bb[_0x3e0421(0x1a0)][_0x3e0421(0x1a1)](blockText)[_0x3e0421(0x18a)](Boolean)[_0x3e0421(0x1a6)]('\x0a');return'';}function summarizeText(_0x11fc28){const _0x3e5ab5=a0_0x34c7ea,_0x3e236e=estimateTokens(_0x11fc28),_0x4f67a0=_0x11fc28['split']('\x0a');if(_0x3e236e>0x7d0){if(_0x4f67a0[_0x3e5ab5(0x1af)]>0xa){const _0x13144b=_0x4f67a0[_0x3e5ab5(0x197)](0x0,0x5)[_0x3e5ab5(0x1a6)]('\x0a'),_0x56e161=_0x4f67a0['slice'](-0x5)['join']('\x0a');return _0x13144b+_0x3e5ab5(0x1ae)+(_0x4f67a0[_0x3e5ab5(0x1af)]-0xa)+_0x3e5ab5(0x1b0)+_0x56e161;}return _0x11fc28['slice'](0x0,0x7d0)+('\x0a[...\x20'+(_0x11fc28[_0x3e5ab5(0x1af)]-0x7d0)+_0x3e5ab5(0x1aa));}if(_0x3e236e>0x1f4){if(_0x4f67a0[_0x3e5ab5(0x1af)]>0xa)return _0x4f67a0['slice'](0x0,0xa)['join']('\x0a')+(_0x3e5ab5(0x1ae)+(_0x4f67a0['length']-0xa)+_0x3e5ab5(0x18c));return _0x11fc28[_0x3e5ab5(0x197)](0x0,0x320)+('\x0a[...\x20'+(_0x11fc28[_0x3e5ab5(0x1af)]-0x320)+_0x3e5ab5(0x19e));}return _0x11fc28;}function summarizeBlock(_0xf0bc63){const _0x307cf2=a0_0x34c7ea;if(!_0xf0bc63||typeof _0xf0bc63!==_0x307cf2(0x194))return _0xf0bc63;if(_0xf0bc63[_0x307cf2(0x1a3)]===_0x307cf2(0x1ac)&&typeof _0xf0bc63['text']==='string')return{..._0xf0bc63,'text':summarizeText(_0xf0bc63['text'])};if(_0xf0bc63[_0x307cf2(0x1a3)]===_0x307cf2(0x1a9)){if(typeof _0xf0bc63['content']===_0x307cf2(0x190))return{..._0xf0bc63,'content':summarizeText(_0xf0bc63[_0x307cf2(0x1a0)])};if(Array[_0x307cf2(0x18d)](_0xf0bc63[_0x307cf2(0x1a0)])){const _0x4cc76e=largestBlockIndex(_0xf0bc63['content']);if(_0x4cc76e>=0x0){const _0x407fc5=_0xf0bc63[_0x307cf2(0x1a0)][_0x307cf2(0x1a1)]((_0x2f171b,_0x2f0501)=>_0x2f0501===_0x4cc76e?summarizeBlock(_0x2f171b):_0x2f171b);return{..._0xf0bc63,'content':_0x407fc5};}}}return _0xf0bc63;}function largestBlockIndex(_0x29b340){const _0x8524a6=a0_0x34c7ea;let _0x168414=-0x1,_0x4f3862=-0x1;return _0x29b340[_0x8524a6(0x191)]((_0x470114,_0x1f1b21)=>{const _0x5ba6bd=_0x8524a6,_0x4df506=blockText(_0x470114)[_0x5ba6bd(0x1af)];_0x4df506>_0x4f3862&&(_0x4f3862=_0x4df506,_0x168414=_0x1f1b21);}),_0x4f3862>0x0?_0x168414:-0x1;}function scoreMessage(_0x2bf323,_0x27905d,_0x422e6c){const _0x1b0795=ROLE_WEIGHT[_0x2bf323['role']]||0.4,_0x1bbd36=(_0x27905d+0x1)/_0x422e6c,_0x25059e=messageText(_0x2bf323),_0x3a7994=estimateTokens(_0x25059e),_0x5d0acc=_0x3a7994>0x7d0?0.6:_0x3a7994>0x1f4?0.8:0x1;return _0x1b0795*(0.3+0.7*_0x1bbd36)*_0x5d0acc;}function summarizeMessage(_0xf8f794){const _0x3433ae=a0_0x34c7ea,_0x53326f=estimateTokens(messageText(_0xf8f794));if(_0x53326f<=0x1f4)return _0xf8f794;if(typeof _0xf8f794[_0x3433ae(0x1a0)]===_0x3433ae(0x190))return{..._0xf8f794,'content':summarizeText(_0xf8f794[_0x3433ae(0x1a0)])};if(Array[_0x3433ae(0x18d)](_0xf8f794['content'])){const _0x50d6db=largestBlockIndex(_0xf8f794[_0x3433ae(0x1a0)]);if(_0x50d6db>=0x0){const _0x5b0a0b=_0xf8f794['content'][_0x3433ae(0x1a1)]((_0x2eb559,_0x4a2983)=>_0x4a2983===_0x50d6db?summarizeBlock(_0x2eb559):_0x2eb559);return{..._0xf8f794,'content':_0x5b0a0b};}}return _0xf8f794;}function compressConversation(_0x511f24,_0x41253a){const _0x4d5b6d=a0_0x34c7ea,_0x2f3d60={'messages':_0x511f24,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x511f24||!Array[_0x4d5b6d(0x18d)](_0x511f24)||_0x511f24[_0x4d5b6d(0x1af)]<=0x6)return _0x2f3d60;try{return _compressConversation(_0x511f24,_0x41253a);}catch{return _0x2f3d60;}}function _compressConversation(_0x35b2d6,_0x469b62){const _0x23e835=a0_0x34c7ea,_0x344ae7=_0x469b62||0x13880,_0x8a6b7=0x4,_0x43d546=_0x35b2d6[_0x23e835(0x18a)](_0x383581=>_0x383581[_0x23e835(0x198)]===_0x23e835(0x19a)),_0x27d3eb=_0x35b2d6[_0x23e835(0x18a)](_0x4794ef=>_0x4794ef[_0x23e835(0x198)]!==_0x23e835(0x19a)),_0x14ca61=_0x27d3eb['slice'](-_0x8a6b7),_0x1ff3c1=_0x27d3eb[_0x23e835(0x197)](0x0,-_0x8a6b7),_0x134165=_0x1ff3c1[_0x23e835(0x1a1)]((_0x1a41e1,_0x2d9903)=>({'msg':_0x1a41e1,'score':scoreMessage(_0x1a41e1,_0x2d9903,_0x1ff3c1[_0x23e835(0x1af)]),'tokens':estimateTokens(messageText(_0x1a41e1))})),_0xdf0839=_0x134165[_0x23e835(0x1a4)]((_0x125773,_0x3156f4)=>_0x125773+_0x3156f4[_0x23e835(0x192)],0x0),_0x73f70c=_0x14ca61[_0x23e835(0x1a4)]((_0x4427f9,_0x48fdb3)=>_0x4427f9+estimateTokens(messageText(_0x48fdb3)),0x0),_0x2030df=_0x43d546['reduce']((_0x3359cb,_0x445596)=>_0x3359cb+estimateTokens(messageText(_0x445596)),0x0),_0x56ed0a=_0x344ae7-_0x73f70c-_0x2030df;if(_0xdf0839<=_0x56ed0a){let _0x31aad7=0x0;const _0x19fd7b=_0x134165[_0x23e835(0x1a1)](_0x2d1ebc=>{const _0xcaeeac=_0x23e835;if(_0x2d1ebc[_0xcaeeac(0x192)]>0x1f4){const _0x1bd155=summarizeMessage(_0x2d1ebc[_0xcaeeac(0x196)]),_0x1c6697=estimateTokens(messageText(_0x1bd155));if(_0x1c6697<_0x2d1ebc['tokens'])return _0x31aad7+=_0x2d1ebc['tokens']-_0x1c6697,_0x1bd155;}return _0x2d1ebc[_0xcaeeac(0x196)];});return{'messages':[..._0x43d546,..._0x19fd7b,..._0x14ca61],'trimmedCount':0x0,'savedTokens':_0x31aad7};}_0x134165[_0x23e835(0x1a8)]((_0x5da3cd,_0x2a3247)=>_0x2a3247[_0x23e835(0x18b)]-_0x5da3cd[_0x23e835(0x18b)]);let _0x3556b4=0x0,_0x22a19d=0x0,_0x4cb19b=0x0;const _0x4b8306=[];for(const _0x290882 of _0x134165){if(_0x3556b4+_0x290882[_0x23e835(0x192)]<=_0x56ed0a){if(_0x290882[_0x23e835(0x192)]>0x3e8){const _0xe6c19d=summarizeMessage(_0x290882[_0x23e835(0x196)]),_0x3643d7=estimateTokens(messageText(_0xe6c19d));_0x4cb19b+=_0x290882[_0x23e835(0x192)]-_0x3643d7,_0x3556b4+=_0x3643d7,_0x4b8306['push']({'msg':_0xe6c19d,'originalIndex':_0x1ff3c1[_0x23e835(0x1ad)](_0x290882['msg'])});}else _0x3556b4+=_0x290882['tokens'],_0x4b8306[_0x23e835(0x195)]({'msg':_0x290882[_0x23e835(0x196)],'originalIndex':_0x1ff3c1['indexOf'](_0x290882[_0x23e835(0x196)])});}else _0x22a19d++,_0x4cb19b+=_0x290882[_0x23e835(0x192)];}_0x4b8306[_0x23e835(0x1a8)]((_0x50a152,_0x59ed46)=>_0x50a152[_0x23e835(0x19d)]-_0x59ed46[_0x23e835(0x19d)]);const _0x58f3df=[..._0x43d546,..._0x4b8306[_0x23e835(0x1a1)](_0x496923=>_0x496923[_0x23e835(0x196)]),..._0x14ca61];return{'messages':_0x58f3df,'trimmedCount':_0x22a19d,'savedTokens':_0x4cb19b};}
package/proxy-resp.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0xc59f(){const _0x544679=['text','1005066slKpnr','10090SmGCrg','__esModule','2BQlBkn','847164qGOvUH','test','17351543vnAoIi','filter','toLowerCase','3136mgetkz','length','20fnHVNS','user','split','simple','defineProperty','212ZYmnRk','optimizeMaxTokens','12aBFCwt','1162533CcExsv','medium','350206azWeeH','9544cdkgid','string','role'];a0_0xc59f=function(){return _0x544679;};return a0_0xc59f();}const a0_0x19d773=a0_0x57bc;function a0_0x57bc(_0x3446ec,_0x369fe7){const _0xc59fc=a0_0xc59f();return a0_0x57bc=function(_0x57bc8f,_0x54f608){_0x57bc8f=_0x57bc8f-0x134;let _0x42362d=_0xc59fc[_0x57bc8f];return _0x42362d;},a0_0x57bc(_0x3446ec,_0x369fe7);}(function(_0x2fcf1d,_0x467848){const _0x4c63a2=a0_0x57bc,_0x4101fb=_0x2fcf1d();while(!![]){try{const _0xe17d30=parseInt(_0x4c63a2(0x13e))/0x1*(-parseInt(_0x4c63a2(0x146))/0x2)+-parseInt(_0x4c63a2(0x13c))/0x3+-parseInt(_0x4c63a2(0x139))/0x4*(parseInt(_0x4c63a2(0x144))/0x5)+-parseInt(_0x4c63a2(0x147))/0x6+-parseInt(_0x4c63a2(0x14c))/0x7*(parseInt(_0x4c63a2(0x13f))/0x8)+parseInt(_0x4c63a2(0x143))/0x9*(parseInt(_0x4c63a2(0x134))/0xa)+-parseInt(_0x4c63a2(0x149))/0xb*(-parseInt(_0x4c63a2(0x13b))/0xc);if(_0xe17d30===_0x467848)break;else _0x4101fb['push'](_0x4101fb['shift']());}catch(_0x3a85cb){_0x4101fb['push'](_0x4101fb['shift']());}}}(a0_0xc59f,0x44770));Object[a0_0x19d773(0x138)](exports,a0_0x19d773(0x145),{'value':!![]}),exports[a0_0x19d773(0x13a)]=optimizeMaxTokens;function lastUserText(_0x5e012c){const _0x44804d=a0_0x19d773;for(let _0x59771e=_0x5e012c[_0x44804d(0x14d)]-0x1;_0x59771e>=0x0;_0x59771e--){if(_0x5e012c[_0x59771e][_0x44804d(0x141)]===_0x44804d(0x135)){const _0x3aac02=_0x5e012c[_0x59771e]['content'];if(typeof _0x3aac02===_0x44804d(0x140))return _0x3aac02;if(Array['isArray'](_0x3aac02))return _0x3aac02[_0x44804d(0x14a)](_0x49fdba=>_0x49fdba['type']===_0x44804d(0x142)&&_0x49fdba['text'])['map'](_0x3fe020=>_0x3fe020[_0x44804d(0x142)])['join']('\x0a');}}return'';}function classifyComplexity(_0x566f4c){const _0x4d16ca=a0_0x19d773,_0x4e2402=_0x566f4c[_0x4d16ca(0x14b)](),_0x2be045=_0x4e2402[_0x4d16ca(0x136)](/\s+/)[_0x4d16ca(0x14d)],_0x23aace=[/^(what|where|which|who|when|how many|is |are |does |do |can |has )\S/,/\?$/,/^(show|list|print|get|find|check|look up)/,/^(yes|no|ok|sure|thanks)/];if(_0x2be045<0x14&&_0x23aace['some'](_0x5b3e67=>_0x5b3e67[_0x4d16ca(0x148)](_0x4e2402)))return _0x4d16ca(0x137);const _0xa233d6=[/implement|refactor|rewrite|create .+ (file|module|class|component)/,/step[- ]by[- ]step|multiple|several|all of the/,/write (a |the )?(full|complete|entire)/,/add .+ and .+ and/,/migrate|convert .+ to/];if(_0x2be045>0x50||_0xa233d6['some'](_0x3cb71d=>_0x3cb71d[_0x4d16ca(0x148)](_0x4e2402)))return'complex';return _0x4d16ca(0x13d);}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0x30100b,_0x489295){if(!_0x30100b||_0x30100b['length']===0x0)return null;const _0x31c06d=lastUserText(_0x30100b);if(!_0x31c06d)return null;const _0x25cf65=classifyComplexity(_0x31c06d),_0x183c02=MAX_TOKENS_MAP[_0x25cf65];if(_0x489295&&_0x489295<=_0x183c02)return null;return{'max_tokens':_0x183c02,'complexity':_0x25cf65};}
1
+ 'use strict';const a0_0x1c51b4=a0_0x471e;(function(_0x571bd8,_0x47556c){const _0x108a10=a0_0x471e,_0x5f53a4=_0x571bd8();while(!![]){try{const _0x241c32=parseInt(_0x108a10(0x1b9))/0x1+-parseInt(_0x108a10(0x1ba))/0x2+-parseInt(_0x108a10(0x1b7))/0x3*(-parseInt(_0x108a10(0x1c3))/0x4)+-parseInt(_0x108a10(0x1ac))/0x5*(parseInt(_0x108a10(0x1b0))/0x6)+-parseInt(_0x108a10(0x1b2))/0x7*(-parseInt(_0x108a10(0x1b8))/0x8)+-parseInt(_0x108a10(0x1bb))/0x9*(-parseInt(_0x108a10(0x1c4))/0xa)+-parseInt(_0x108a10(0x1bf))/0xb;if(_0x241c32===_0x47556c)break;else _0x5f53a4['push'](_0x5f53a4['shift']());}catch(_0x54f8ec){_0x5f53a4['push'](_0x5f53a4['shift']());}}}(a0_0x4669,0x88a07));function a0_0x471e(_0x3e623f,_0x575d0a){_0x3e623f=_0x3e623f-0x1ab;const _0x4669e0=a0_0x4669();let _0x471e8e=_0x4669e0[_0x3e623f];return _0x471e8e;}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x1c51b4(0x1b5)]=optimizeMaxTokens;function lastUserText(_0x3508d3){const _0x455084=a0_0x1c51b4;for(let _0x1586dc=_0x3508d3[_0x455084(0x1c0)]-0x1;_0x1586dc>=0x0;_0x1586dc--){if(_0x3508d3[_0x1586dc][_0x455084(0x1b6)]===_0x455084(0x1b3)){const _0x26ff91=_0x3508d3[_0x1586dc][_0x455084(0x1c2)];if(typeof _0x26ff91===_0x455084(0x1bd))return _0x26ff91;if(Array[_0x455084(0x1b4)](_0x26ff91))return _0x26ff91[_0x455084(0x1bc)](_0x541e86=>_0x541e86[_0x455084(0x1c5)]===_0x455084(0x1c1)&&_0x541e86[_0x455084(0x1c1)])[_0x455084(0x1b1)](_0x337395=>_0x337395[_0x455084(0x1c1)])[_0x455084(0x1c8)]('\x0a');}}return'';}function classifyComplexity(_0x645d78){const _0x871d1f=a0_0x1c51b4,_0x5a423d=_0x645d78[_0x871d1f(0x1ad)](),_0x28f8e3=_0x5a423d[_0x871d1f(0x1c6)](/\s+/)[_0x871d1f(0x1c0)],_0x296134=[/^(what|where|which|who|when|how many|is |are |does |do |can |has )\S/,/\?$/,/^(show|list|print|get|find|check|look up)/,/^(yes|no|ok|sure|thanks)/];if(_0x28f8e3<0x14&&_0x296134['some'](_0x581b29=>_0x581b29[_0x871d1f(0x1c7)](_0x5a423d)))return _0x871d1f(0x1ae);const _0x50f0cc=[/implement|refactor|rewrite|create .+ (file|module|class|component)/,/step[- ]by[- ]step|multiple|several|all of the/,/write (a |the )?(full|complete|entire)/,/add .+ and .+ and/,/migrate|convert .+ to/];if(_0x28f8e3>0x50||_0x50f0cc[_0x871d1f(0x1af)](_0x41287e=>_0x41287e['test'](_0x5a423d)))return _0x871d1f(0x1be);return _0x871d1f(0x1ab);}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function a0_0x4669(){const _0x4b7984=['2083650FiHbgq','4581qvbMqN','filter','string','complex','9037413DhPuTq','length','text','content','7404JVVtKo','13430Uljpwi','type','split','test','join','medium','36095YzIdzo','toLowerCase','simple','some','582LPrdzx','map','168WbVOhf','user','isArray','optimizeMaxTokens','role','1518MkKTWq','186688iiBhwX','943017YcGuIn'];a0_0x4669=function(){return _0x4b7984;};return a0_0x4669();}function optimizeMaxTokens(_0x367723,_0x28d5ab){if(!_0x367723||_0x367723['length']===0x0)return null;const _0x137cce=lastUserText(_0x367723);if(!_0x137cce)return null;const _0x2f803f=classifyComplexity(_0x137cce),_0x4bef0e=MAX_TOKENS_MAP[_0x2f803f];if(_0x28d5ab&&_0x28d5ab<=_0x4bef0e)return null;return{'max_tokens':_0x4bef0e,'complexity':_0x2f803f};}
package/redactor.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x1cc868=a0_0x418f;(function(_0x1a3e44,_0x1a2f4c){const _0x2f617c=a0_0x418f,_0x5d107c=_0x1a3e44();while(!![]){try{const _0x510d3d=-parseInt(_0x2f617c(0x1a7))/0x1*(-parseInt(_0x2f617c(0x194))/0x2)+-parseInt(_0x2f617c(0x184))/0x3*(-parseInt(_0x2f617c(0x19a))/0x4)+-parseInt(_0x2f617c(0x193))/0x5+parseInt(_0x2f617c(0x17e))/0x6+-parseInt(_0x2f617c(0x190))/0x7+parseInt(_0x2f617c(0x18a))/0x8+parseInt(_0x2f617c(0x1a6))/0x9*(-parseInt(_0x2f617c(0x18f))/0xa);if(_0x510d3d===_0x1a2f4c)break;else _0x5d107c['push'](_0x5d107c['shift']());}catch(_0x3a221e){_0x5d107c['push'](_0x5d107c['shift']());}}}(a0_0x7377,0x33540));Object[a0_0x1cc868(0x192)](exports,a0_0x1cc868(0x18b),{'value':!![]}),exports['redactor']=exports[a0_0x1cc868(0x1a0)]=void 0x0;class Redactor{[a0_0x1cc868(0x17a)]=[];constructor(){const _0x1447f4=a0_0x1cc868;this[_0x1447f4(0x1aa)]();}[a0_0x1cc868(0x1aa)](){const _0x2abe24=a0_0x1cc868;this[_0x2abe24(0x17a)]=[{'name':'AWS\x20Access\x20Key','type':_0x2abe24(0x188),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':_0x2abe24(0x19c)},{'name':_0x2abe24(0x177),'type':_0x2abe24(0x17d),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x2abe24(0x198)},{'name':_0x2abe24(0x1a5),'type':'gcp_key','regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x2abe24(0x181)},{'name':'Azure\x20Connection\x20String','type':_0x2abe24(0x19b),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x2abe24(0x185)},{'name':_0x2abe24(0x17b),'type':'anthropic_key','regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x2abe24(0x180)},{'name':'OpenAI\x20API\x20Key','type':_0x2abe24(0x19e),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x2abe24(0x17c)},{'name':_0x2abe24(0x199),'type':_0x2abe24(0x175),'regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x2abe24(0x178)},{'name':_0x2abe24(0x191),'type':_0x2abe24(0x17f),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':'[REDACTED_SLACK_TOKEN]'},{'name':_0x2abe24(0x186),'type':_0x2abe24(0x1a1),'regex':/\b(sk_live_[A-Za-z0-9]{24,}|sk_test_[A-Za-z0-9]{24,}|rk_live_[A-Za-z0-9]{24,}|rk_test_[A-Za-z0-9]{24,})\b/g,'replacement':'[REDACTED_STRIPE_KEY]'},{'name':'Twilio\x20Key','type':_0x2abe24(0x19d),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x2abe24(0x18c)},{'name':_0x2abe24(0x173),'type':_0x2abe24(0x1a3),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x2abe24(0x1ab)},{'name':_0x2abe24(0x172),'type':_0x2abe24(0x195),'regex':/-----BEGIN\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----[\s\S]*?-----END\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----/g,'replacement':'[REDACTED_PRIVATE_KEY]'},{'name':'JWT\x20Token','type':_0x2abe24(0x1ac),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x2abe24(0x1a8)},{'name':_0x2abe24(0x171),'type':'bearer','regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x2abe24(0x187)},{'name':'Basic\x20Auth','type':_0x2abe24(0x18e),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x2abe24(0x1ad)},{'name':_0x2abe24(0x196),'type':'db_connection','regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x2abe24(0x1a4)},{'name':'Generic\x20API\x20Key/Secret/Password','type':_0x2abe24(0x170),'regex':/(api[_-]?key|secret[_-]?key|password|passwd|auth[_-]?token|private[_-]?key|access[_-]?token|refresh[_-]?token|client[_-]?secret)[\s:="']+[A-Za-z0-9_\-./+=]{16,}/gi,'replacement':_0x2abe24(0x179)},{'name':_0x2abe24(0x16f),'type':'ip_address','regex':/\b(?!127\.0\.0\.1|0\.0\.0\.0|255\.255\.255\.0|10\.\d|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':_0x2abe24(0x1a9),'alert':![]},{'name':_0x2abe24(0x182),'type':'email','regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x2abe24(0x183),'alert':![]}];}[a0_0x1cc868(0x1ae)](_0x5cb74b){const _0xcd3ba1=a0_0x1cc868;return this['redactWithAudit'](_0x5cb74b)[_0xcd3ba1(0x174)];}[a0_0x1cc868(0x19f)](_0x103206){const _0x55b432=a0_0x1cc868;let _0x2011a3=_0x103206,_0xd16272=0x0;const _0x60da78=[];for(const _0x14fab3 of this[_0x55b432(0x17a)]){const _0x2b7188=_0x2011a3[_0x55b432(0x197)](_0x14fab3[_0x55b432(0x18d)]);_0x2b7188&&_0x2b7188[_0x55b432(0x176)]>0x0&&(_0x14fab3[_0x55b432(0x189)]!==![]&&(_0xd16272+=_0x2b7188['length'],!_0x60da78['includes'](_0x14fab3['type'])&&_0x60da78['push'](_0x14fab3['type'])),_0x2011a3=_0x2011a3['replace'](_0x14fab3[_0x55b432(0x18d)],_0x14fab3['replacement']));}return{'text':_0x2011a3,'secretsFound':_0xd16272,'secretTypes':_0x60da78};}}function a0_0x418f(_0x30e1ef,_0x21a601){const _0x737780=a0_0x7377();return a0_0x418f=function(_0x418f24,_0x16d96f){_0x418f24=_0x418f24-0x16f;let _0xc72a8f=_0x737780[_0x418f24];return _0xc72a8f;},a0_0x418f(_0x30e1ef,_0x21a601);}function a0_0x7377(){const _0x2a21c9=['[REDACTED_AWS_KEY]','twilio_key','openai_key','redactWithAudit','Redactor','stripe_key','redactor','sendgrid_key','[REDACTED_DB_CONNECTION]','GCP\x20Service\x20Account\x20Key','423IltirV','12UVxlDt','[REDACTED_JWT]','[REDACTED_IP]','loadDefaultRules','[REDACTED_SENDGRID_KEY]','jwt','Basic\x20[REDACTED_AUTH]','redact','IPv4\x20Address\x20(non-local)','generic_credential','Bearer\x20Token','Private\x20Key\x20Block','SendGrid\x20Key','text','github_token','length','AWS\x20Secret\x20Key','[REDACTED_GITHUB_TOKEN]','$1=[REDACTED_CREDENTIAL]','rules','Anthropic\x20API\x20Key','[REDACTED_OPENAI_KEY]','aws_secret','1567818bNVWXx','slack_token','[REDACTED_ANTHROPIC_KEY]','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','Email\x20Address','[REDACTED_EMAIL]','15eblcAo','[REDACTED_AZURE_CONNECTION]','Stripe\x20Key','Bearer\x20[REDACTED_TOKEN]','aws_key','alert','100384eBVEDs','__esModule','[REDACTED_TWILIO_KEY]','regex','basic_auth','31590RkRsMW','2461200brXMQH','Slack\x20Token','defineProperty','892155SXImCA','59478YmdeFy','private_key','Database\x20Connection\x20String','match','$1=[REDACTED_AWS_SECRET]','GitHub\x20Token','206420eaXnWI','azure_conn'];a0_0x7377=function(){return _0x2a21c9;};return a0_0x7377();}exports['Redactor']=Redactor,exports[a0_0x1cc868(0x1a2)]=new Redactor();
1
+ 'use strict';function a0_0x3add(){const _0x982120=['Redactor','ip_address','Email\x20Address','redactWithAudit','[REDACTED_DB_CONNECTION]','[REDACTED_IP]','[REDACTED_AWS_KEY]','openai_key','[REDACTED_SLACK_TOKEN]','SendGrid\x20Key','email','redactor','Stripe\x20Key','Database\x20Connection\x20String','twilio_key','[REDACTED_GITHUB_TOKEN]','azure_conn','rules','length','3019744FUzSRl','39399336RKUEfc','OpenAI\x20API\x20Key','replacement','private_key','github_token','generic_credential','9490929AhLdSj','replace','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','GitHub\x20Token','Private\x20Key\x20Block','loadDefaultRules','5080045NbRSRt','69424ZlYYpf','[REDACTED_OPENAI_KEY]','aws_secret','push','Bearer\x20Token','anthropic_key','12172QcnOln','AWS\x20Access\x20Key','Slack\x20Token','[REDACTED_TWILIO_KEY]','2780070aARXeW','redact','defineProperty','text','aws_key','[REDACTED_AZURE_CONNECTION]','type','__esModule','regex','GCP\x20Service\x20Account\x20Key','Azure\x20Connection\x20String','435OXGXiX','IPv4\x20Address\x20(non-local)','slack_token','db_connection','Bearer\x20[REDACTED_TOKEN]','Anthropic\x20API\x20Key','jwt','[REDACTED_ANTHROPIC_KEY]','[REDACTED_JWT]','Basic\x20Auth','2xrlzJO','[REDACTED_SENDGRID_KEY]','[REDACTED_STRIPE_KEY]','$1=[REDACTED_AWS_SECRET]','Generic\x20API\x20Key/Secret/Password','[REDACTED_EMAIL]','match','JWT\x20Token','AWS\x20Secret\x20Key'];a0_0x3add=function(){return _0x982120;};return a0_0x3add();}const a0_0x2573e9=a0_0x50ee;(function(_0x75a78c,_0x18f43e){const _0x46b896=a0_0x50ee,_0x480790=_0x75a78c();while(!![]){try{const _0x2eeb6d=parseInt(_0x46b896(0x1ed))/0x1*(parseInt(_0x46b896(0x1c3))/0x2)+parseInt(_0x46b896(0x202))/0x3*(-parseInt(_0x46b896(0x1f3))/0x4)+-parseInt(_0x46b896(0x1ec))/0x5+-parseInt(_0x46b896(0x1f7))/0x6+-parseInt(_0x46b896(0x1e6))/0x7+-parseInt(_0x46b896(0x1df))/0x8+parseInt(_0x46b896(0x1e0))/0x9;if(_0x2eeb6d===_0x18f43e)break;else _0x480790['push'](_0x480790['shift']());}catch(_0x79467e){_0x480790['push'](_0x480790['shift']());}}}(a0_0x3add,0xc1a88));function a0_0x50ee(_0x4101a0,_0x59d9ed){_0x4101a0=_0x4101a0-0x1c1;const _0x3add71=a0_0x3add();let _0x50eebb=_0x3add71[_0x4101a0];return _0x50eebb;}Object[a0_0x2573e9(0x1f9)](exports,a0_0x2573e9(0x1fe),{'value':!![]}),exports[a0_0x2573e9(0x1d7)]=exports[a0_0x2573e9(0x1cc)]=void 0x0;class Redactor{[a0_0x2573e9(0x1dd)]=[];constructor(){this['loadDefaultRules']();}[a0_0x2573e9(0x1eb)](){const _0x2fe09b=a0_0x2573e9;this[_0x2fe09b(0x1dd)]=[{'name':_0x2fe09b(0x1f4),'type':_0x2fe09b(0x1fb),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':_0x2fe09b(0x1d2)},{'name':_0x2fe09b(0x1cb),'type':_0x2fe09b(0x1ef),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x2fe09b(0x1c6)},{'name':_0x2fe09b(0x200),'type':'gcp_key','regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x2fe09b(0x1e8)},{'name':_0x2fe09b(0x201),'type':_0x2fe09b(0x1dc),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x2fe09b(0x1fc)},{'name':_0x2fe09b(0x207),'type':_0x2fe09b(0x1f2),'regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x2fe09b(0x209)},{'name':_0x2fe09b(0x1e1),'type':_0x2fe09b(0x1d3),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x2fe09b(0x1ee)},{'name':_0x2fe09b(0x1e9),'type':_0x2fe09b(0x1e4),'regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x2fe09b(0x1db)},{'name':_0x2fe09b(0x1f5),'type':_0x2fe09b(0x204),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x2fe09b(0x1d4)},{'name':_0x2fe09b(0x1d8),'type':'stripe_key','regex':/\b(sk_live_[A-Za-z0-9]{24,}|sk_test_[A-Za-z0-9]{24,}|rk_live_[A-Za-z0-9]{24,}|rk_test_[A-Za-z0-9]{24,})\b/g,'replacement':_0x2fe09b(0x1c5)},{'name':'Twilio\x20Key','type':_0x2fe09b(0x1da),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x2fe09b(0x1f6)},{'name':_0x2fe09b(0x1d5),'type':'sendgrid_key','regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x2fe09b(0x1c4)},{'name':_0x2fe09b(0x1ea),'type':_0x2fe09b(0x1e3),'regex':/-----BEGIN\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----[\s\S]*?-----END\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----/g,'replacement':'[REDACTED_PRIVATE_KEY]'},{'name':_0x2fe09b(0x1ca),'type':_0x2fe09b(0x208),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x2fe09b(0x1c1)},{'name':_0x2fe09b(0x1f1),'type':'bearer','regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x2fe09b(0x206)},{'name':_0x2fe09b(0x1c2),'type':'basic_auth','regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':'Basic\x20[REDACTED_AUTH]'},{'name':_0x2fe09b(0x1d9),'type':_0x2fe09b(0x205),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x2fe09b(0x1d0)},{'name':_0x2fe09b(0x1c7),'type':_0x2fe09b(0x1e5),'regex':/(api[_-]?key|secret[_-]?key|password|passwd|auth[_-]?token|private[_-]?key|access[_-]?token|refresh[_-]?token|client[_-]?secret)[\s:="']+[A-Za-z0-9_\-./+=]{16,}/gi,'replacement':'$1=[REDACTED_CREDENTIAL]'},{'name':_0x2fe09b(0x203),'type':_0x2fe09b(0x1cd),'regex':/\b(?!127\.0\.0\.1|0\.0\.0\.0|255\.255\.255\.0|10\.\d|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':_0x2fe09b(0x1d1),'alert':![]},{'name':_0x2fe09b(0x1ce),'type':_0x2fe09b(0x1d6),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x2fe09b(0x1c8),'alert':![]}];}[a0_0x2573e9(0x1f8)](_0x340e6c){const _0xc7b6cd=a0_0x2573e9;return this['redactWithAudit'](_0x340e6c)[_0xc7b6cd(0x1fa)];}[a0_0x2573e9(0x1cf)](_0x127c6c){const _0x444fd8=a0_0x2573e9;let _0x28410e=_0x127c6c,_0x2b9099=0x0;const _0x57261f=[];for(const _0x258bce of this['rules']){const _0x35f52e=_0x28410e[_0x444fd8(0x1c9)](_0x258bce[_0x444fd8(0x1ff)]);_0x35f52e&&_0x35f52e[_0x444fd8(0x1de)]>0x0&&(_0x258bce['alert']!==![]&&(_0x2b9099+=_0x35f52e[_0x444fd8(0x1de)],!_0x57261f['includes'](_0x258bce[_0x444fd8(0x1fd)])&&_0x57261f[_0x444fd8(0x1f0)](_0x258bce['type'])),_0x28410e=_0x28410e[_0x444fd8(0x1e7)](_0x258bce['regex'],_0x258bce[_0x444fd8(0x1e2)]));}return{'text':_0x28410e,'secretsFound':_0x2b9099,'secretTypes':_0x57261f};}}exports[a0_0x2573e9(0x1cc)]=Redactor,exports[a0_0x2573e9(0x1d7)]=new Redactor();
package/seed.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x2a2e87=a0_0x3550;(function(_0x382e89,_0x3a6bbb){const _0x498004=a0_0x3550,_0x2f213c=_0x382e89();while(!![]){try{const _0x1cf56b=parseInt(_0x498004(0xbe))/0x1*(parseInt(_0x498004(0xc5))/0x2)+parseInt(_0x498004(0xd9))/0x3*(-parseInt(_0x498004(0xbc))/0x4)+-parseInt(_0x498004(0xd6))/0x5+-parseInt(_0x498004(0xcf))/0x6+-parseInt(_0x498004(0xc1))/0x7*(-parseInt(_0x498004(0xb9))/0x8)+-parseInt(_0x498004(0xd3))/0x9*(-parseInt(_0x498004(0xe0))/0xa)+-parseInt(_0x498004(0xc3))/0xb;if(_0x1cf56b===_0x3a6bbb)break;else _0x2f213c['push'](_0x2f213c['shift']());}catch(_0x192083){_0x2f213c['push'](_0x2f213c['shift']());}}}(a0_0x44ee,0x99300));function a0_0x3550(_0x26a1da,_0x568103){const _0x44ee32=a0_0x44ee();return a0_0x3550=function(_0x35502e,_0x462e6e){_0x35502e=_0x35502e-0xb9;let _0x3507c4=_0x44ee32[_0x35502e];return _0x3507c4;},a0_0x3550(_0x26a1da,_0x568103);}Object[a0_0x2a2e87(0xc6)](exports,a0_0x2a2e87(0xbf),{'value':!![]});function a0_0x44ee(){const _0x28b41e=['repeat','3474955wzKRCT','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','2mHMZnz','defineProperty','Optimizing\x20assets...\x0a','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','env','Test\x20suite\x20run\x20starting...\x0a','test_auth.py\x20PASS\x0a','Step\x201/10\x20:\x20FROM\x20node:20\x0a','gpt-4o','[INFO]\x20Building\x20modules...\x0a','4248426VbwKVu','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','log','Successfully\x20built\x20image.','7542ILdfoe','Database\x20successfully\x20seeded!','TRIMPROMPT_MODEL','227685Hjhvfg','claude-3-opus','tracker','118077vZXYzz','docker\x20build\x20.','test_db.py\x20PASS\x0a','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','logExecution','All\x20303\x20tests\x20passed\x20in\x204.22s.','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','6460cWiNZs','674528bVNWvp','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','pytest\x20tests/app','28pBLKBY','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','503658IhiEOq','__esModule','Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a','77TafBsD'];a0_0x44ee=function(){return _0x28b41e;};return a0_0x44ee();}const tracker_1=require('./tracker');console[a0_0x2a2e87(0xd1)](a0_0x2a2e87(0xbd)),process['env']['TRIMPROMPT_MODEL']=a0_0x2a2e87(0xd7),tracker_1[a0_0x2a2e87(0xd8)][a0_0x2a2e87(0xdd)]('npm\x20run\x20build','Compilation\x20Output:\x0a'+a0_0x2a2e87(0xce)+a0_0x2a2e87(0xc7)+a0_0x2a2e87(0xdc)['repeat'](0x190),a0_0x2a2e87(0xba),0x0),process[a0_0x2a2e87(0xc9)]['TRIMPROMPT_MODEL']=a0_0x2a2e87(0xcd),tracker_1[a0_0x2a2e87(0xd8)]['logExecution'](a0_0x2a2e87(0xbb),a0_0x2a2e87(0xca)+a0_0x2a2e87(0xcb)+a0_0x2a2e87(0xdb)+'test_api.py\x20PASS\x0a'['repeat'](0x12c)+a0_0x2a2e87(0xde),a0_0x2a2e87(0xdf),0x0),process[a0_0x2a2e87(0xc9)][a0_0x2a2e87(0xd5)]='gemini-1-5-pro',tracker_1['tracker'][a0_0x2a2e87(0xdd)](a0_0x2a2e87(0xda),a0_0x2a2e87(0xc4)+a0_0x2a2e87(0xcc)+a0_0x2a2e87(0xd0)+a0_0x2a2e87(0xc0)+'added\x201420\x20packages\x20in\x2014s\x0a'[a0_0x2a2e87(0xc2)](0x3)+a0_0x2a2e87(0xd2),a0_0x2a2e87(0xc8),0x0),console[a0_0x2a2e87(0xd1)](a0_0x2a2e87(0xd4));
1
+ 'use strict';function a0_0x3c4a(_0x4e79d2,_0x3e39af){_0x4e79d2=_0x4e79d2-0x11d;const _0x28f139=a0_0x28f1();let _0x3c4a7d=_0x28f139[_0x4e79d2];return _0x3c4a7d;}const a0_0x3d0423=a0_0x3c4a;(function(_0x456d50,_0x4393bd){const _0xbd23e2=a0_0x3c4a,_0x5d52e4=_0x456d50();while(!![]){try{const _0x6e653a=-parseInt(_0xbd23e2(0x127))/0x1*(-parseInt(_0xbd23e2(0x13f))/0x2)+parseInt(_0xbd23e2(0x122))/0x3+-parseInt(_0xbd23e2(0x123))/0x4+parseInt(_0xbd23e2(0x121))/0x5+parseInt(_0xbd23e2(0x13d))/0x6+-parseInt(_0xbd23e2(0x135))/0x7*(-parseInt(_0xbd23e2(0x12d))/0x8)+-parseInt(_0xbd23e2(0x12f))/0x9;if(_0x6e653a===_0x4393bd)break;else _0x5d52e4['push'](_0x5d52e4['shift']());}catch(_0x439126){_0x5d52e4['push'](_0x5d52e4['shift']());}}}(a0_0x28f1,0x7f7c2));Object[a0_0x3d0423(0x132)](exports,a0_0x3d0423(0x126),{'value':!![]});function a0_0x28f1(){const _0x352710=['Database\x20successfully\x20seeded!','Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a','defineProperty','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','gemini-1-5-pro','133nQnXkA','added\x201420\x20packages\x20in\x2014s\x0a','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','logExecution','[INFO]\x20Building\x20modules...\x0a','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','log','4005090PMyTCK','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','2ZtJduT','All\x20303\x20tests\x20passed\x20in\x204.22s.','tracker','Test\x20suite\x20run\x20starting...\x0a','Compilation\x20Output:\x0a','5092035ZkPCtg','544254FJWhNP','321912Cydshl','./tracker','test_api.py\x20PASS\x0a','__esModule','902121GoNULb','Step\x201/10\x20:\x20FROM\x20node:20\x0a','gpt-4o','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','repeat','docker\x20build\x20.','288592fxuKkK','claude-3-opus','25669899tyTPOk'];a0_0x28f1=function(){return _0x352710;};return a0_0x28f1();}const tracker_1=require(a0_0x3d0423(0x124));console[a0_0x3d0423(0x13c)]('Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...'),process.env.TRIMPROMPT_MODEL=a0_0x3d0423(0x12e),tracker_1[a0_0x3d0423(0x11e)][a0_0x3d0423(0x138)]('npm\x20run\x20build',a0_0x3d0423(0x120)+a0_0x3d0423(0x139)+'Optimizing\x20assets...\x0a'+a0_0x3d0423(0x13b)[a0_0x3d0423(0x12b)](0x190),a0_0x3d0423(0x137),0x0),process.env.TRIMPROMPT_MODEL=a0_0x3d0423(0x129),tracker_1[a0_0x3d0423(0x11e)][a0_0x3d0423(0x138)]('pytest\x20tests/app',a0_0x3d0423(0x11f)+'test_auth.py\x20PASS\x0a'+'test_db.py\x20PASS\x0a'+a0_0x3d0423(0x125)['repeat'](0x12c)+a0_0x3d0423(0x11d),a0_0x3d0423(0x13a),0x0),process.env.TRIMPROMPT_MODEL=a0_0x3d0423(0x134),tracker_1[a0_0x3d0423(0x11e)][a0_0x3d0423(0x138)](a0_0x3d0423(0x12c),a0_0x3d0423(0x12a)+a0_0x3d0423(0x128)+a0_0x3d0423(0x13e)+a0_0x3d0423(0x131)+a0_0x3d0423(0x136)[a0_0x3d0423(0x12b)](0x3)+'Successfully\x20built\x20image.',a0_0x3d0423(0x133),0x0),console[a0_0x3d0423(0x13c)](a0_0x3d0423(0x130));