trimprompt 1.0.39 → 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';const a0_0x4f41be=a0_0x3061;(function(_0x1bbe3b,_0x9ba10){const _0x19c2d=a0_0x3061,_0x24f6bb=_0x1bbe3b();while(!![]){try{const _0x5702be=parseInt(_0x19c2d(0xf6))/0x1+parseInt(_0x19c2d(0x103))/0x2+parseInt(_0x19c2d(0xdd))/0x3+parseInt(_0x19c2d(0xf3))/0x4+parseInt(_0x19c2d(0xf7))/0x5+-parseInt(_0x19c2d(0x10f))/0x6*(-parseInt(_0x19c2d(0xfa))/0x7)+-parseInt(_0x19c2d(0xe2))/0x8*(parseInt(_0x19c2d(0xe3))/0x9);if(_0x5702be===_0x9ba10)break;else _0x24f6bb['push'](_0x24f6bb['shift']());}catch(_0x54bba8){_0x24f6bb['push'](_0x24f6bb['shift']());}}}(a0_0x35eb,0x5e982));function a0_0x35eb(){const _0x50752b=['thread','\x20failed,\x20','1704632myoWao','\x0aWarnings:','\x0aFailures:','330302bGlNkv','1326950BrOfFc','failures:','join','2723mqaiko','filter','\x20crates\x20successfully','startsWith','Compiling\x20','----\x20failures\x20----','\x20passed,\x20','\x20ignored','\x20more\x20errors','410336kzfSjO','min','panicked','test\x20result:\x20ok','\x20crates,\x20','includes','Cargo\x20test:\x20all\x20tests\x20passed','defineProperty','\x20errors,\x20','\x20\x20...\x20+','\x20warnings','warning:','11442nDgoFe','assert','trim','length','\x20passed','endsWith','push','303741sJnXOo','match','Cargo:\x20','__esModule','left:','13461040FrEKmD','9LVmmHi','Cargo\x20test:\x20','\x20----','\x20\x20\x20\x20','warning[','error[','right:','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','split','\x20more\x20failures','Cargo:\x20compiled\x20','slice','replace','error:'];a0_0x35eb=function(){return _0x50752b;};return a0_0x35eb();}Object[a0_0x4f41be(0x10a)](exports,a0_0x4f41be(0xe0),{'value':!![]}),exports['filterCargoTest']=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function filterCargoTest(_0x36f848){const _0x1a963e=a0_0x4f41be,_0x1f8405=_0x36f848[_0x1a963e(0xeb)]('\x0a');let _0x310c4b=0x0,_0x5cef52=0x0,_0x5de747=0x0,_0x3d6760=0x0;const _0x5219d7=[];let _0x146869=![],_0x1c8c79=[];for(const _0x1fe58d of _0x1f8405){const _0x4641f1=_0x1fe58d[_0x1a963e(0xd8)](),_0x4b6a72=_0x4641f1[_0x1a963e(0xde)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x4b6a72){_0x310c4b+=parseInt(_0x4b6a72[0x2]),_0x5cef52+=parseInt(_0x4b6a72[0x3]),_0x5de747+=parseInt(_0x4b6a72[0x4]),_0x3d6760+=parseInt(_0x4b6a72[0x5]);continue;}if(_0x4641f1===_0x1a963e(0xf8)||_0x4641f1===_0x1a963e(0xff)){_0x146869=!![];continue;}if(_0x146869){if(_0x4641f1['startsWith']('----\x20')&&_0x4641f1[_0x1a963e(0xdb)](_0x1a963e(0xe5))){if(_0x1c8c79['length']>0x0)_0x5219d7[_0x1a963e(0xdc)](_0x1c8c79[_0x1a963e(0xf9)]('\x0a'));_0x1c8c79=[_0x4641f1[_0x1a963e(0xef)](/^-+\s*/,'')['replace'](/\s*-+$/,'')];}else{if(_0x4641f1===_0x1a963e(0xf8)||_0x4641f1[_0x1a963e(0xfd)]('test\x20result:')){if(_0x1c8c79[_0x1a963e(0xd9)]>0x0)_0x5219d7[_0x1a963e(0xdc)](_0x1c8c79[_0x1a963e(0xf9)]('\x0a'));_0x1c8c79=[],_0x146869=![];}else _0x4641f1['length']>0x0&&_0x1c8c79[_0x1a963e(0xdc)](_0x1fe58d);}}}if(_0x1c8c79[_0x1a963e(0xd9)]>0x0)_0x5219d7[_0x1a963e(0xdc)](_0x1c8c79[_0x1a963e(0xf9)]('\x0a'));if(_0x310c4b===0x0&&_0x5cef52===0x0&&_0x5de747===0x0){if(_0x36f848[_0x1a963e(0x108)](_0x1a963e(0x106)))return _0x1a963e(0x109);return _0x36f848;}if(_0x5cef52===0x0){const _0x17b213=[_0x1a963e(0xe4)+_0x310c4b+_0x1a963e(0xda)];if(_0x5de747>0x0)_0x17b213[_0x1a963e(0xdc)](_0x5de747+_0x1a963e(0x101));return _0x17b213[_0x1a963e(0xf9)](',\x20');}const _0x2ea8d5=[_0x1a963e(0xe4)+_0x310c4b+_0x1a963e(0x100)+_0x5cef52+_0x1a963e(0xf2)+_0x5de747+_0x1a963e(0x101)];if(_0x5219d7[_0x1a963e(0xd9)]>0x0){_0x2ea8d5['push'](_0x1a963e(0xf5));const _0x4a2209=0x3;for(let _0x30d287=0x0;_0x30d287<Math[_0x1a963e(0x104)](_0x5219d7[_0x1a963e(0xd9)],_0x4a2209);_0x30d287++){const _0x5be9e3=_0x5219d7[_0x30d287][_0x1a963e(0xeb)]('\x0a');_0x2ea8d5['push']('\x20\x20'+(_0x30d287+0x1)+'.\x20'+_0x5be9e3[0x0]);const _0x556360=_0x5be9e3[_0x1a963e(0xee)](0x1),_0x16236c=_0x556360[_0x1a963e(0xfb)](_0x43ee70=>_0x43ee70['trim']()['startsWith'](_0x1a963e(0xf1))||_0x43ee70['includes'](_0x1a963e(0x105))||_0x43ee70[_0x1a963e(0x108)](_0x1a963e(0x110))||_0x43ee70[_0x1a963e(0x108)](_0x1a963e(0xe1))||_0x43ee70[_0x1a963e(0x108)](_0x1a963e(0xe9)));for(const _0x483483 of _0x16236c[_0x1a963e(0xee)](0x0,0x5)){_0x2ea8d5['push'](_0x1a963e(0xe6)+_0x483483['trim']());}}_0x5219d7[_0x1a963e(0xd9)]>_0x4a2209&&_0x2ea8d5[_0x1a963e(0xdc)](_0x1a963e(0x10c)+(_0x5219d7[_0x1a963e(0xd9)]-_0x4a2209)+_0x1a963e(0xec));}return _0x2ea8d5[_0x1a963e(0xf9)]('\x0a');}function a0_0x3061(_0x1e9285,_0x1d249a){const _0x35eb12=a0_0x35eb();return a0_0x3061=function(_0x30612e,_0x4f4418){_0x30612e=_0x30612e-0xd8;let _0x5deb83=_0x35eb12[_0x30612e];return _0x5deb83;},a0_0x3061(_0x1e9285,_0x1d249a);}function filterCargoBuild(_0x3d3de0){const _0x5a500c=a0_0x4f41be,_0x41e9c1=_0x3d3de0[_0x5a500c(0xeb)]('\x0a'),_0x59a4d5=[],_0x2863ec=[];let _0xda7ddb=0x0;for(const _0x46400f of _0x41e9c1){const _0x1eb801=_0x46400f[_0x5a500c(0xd8)]();if(_0x1eb801[_0x5a500c(0xfd)](_0x5a500c(0xfe)))_0xda7ddb++;else{if(_0x1eb801[_0x5a500c(0xfd)](_0x5a500c(0xe7))||_0x1eb801['startsWith'](_0x5a500c(0x10e)))_0x59a4d5['push'](_0x1eb801);else{if(_0x1eb801['startsWith'](_0x5a500c(0xe8))||_0x1eb801[_0x5a500c(0xfd)](_0x5a500c(0xf0)))_0x2863ec[_0x5a500c(0xdc)](_0x1eb801);}}}if(_0x2863ec[_0x5a500c(0xd9)]===0x0&&_0x59a4d5['length']===0x0)return _0xda7ddb>0x0?_0x5a500c(0xed)+_0xda7ddb+_0x5a500c(0xfc):_0x3d3de0[_0x5a500c(0xd8)]();const _0x53c63d=[];if(_0x2863ec['length']>0x0){_0x53c63d[_0x5a500c(0xdc)](_0x5a500c(0xdf)+_0x2863ec['length']+_0x5a500c(0x10b)+_0x59a4d5[_0x5a500c(0xd9)]+'\x20warnings'),_0x53c63d[_0x5a500c(0xdc)]('\x0aErrors:');for(const _0x403b7b of _0x2863ec[_0x5a500c(0xee)](0x0,0x5))_0x53c63d['push']('\x20\x20'+_0x403b7b);if(_0x2863ec[_0x5a500c(0xd9)]>0x5)_0x53c63d[_0x5a500c(0xdc)](_0x5a500c(0x10c)+(_0x2863ec[_0x5a500c(0xd9)]-0x5)+_0x5a500c(0x102));}else _0x53c63d[_0x5a500c(0xdc)](_0x5a500c(0xed)+_0xda7ddb+_0x5a500c(0x107)+_0x59a4d5[_0x5a500c(0xd9)]+_0x5a500c(0x10d));if(_0x59a4d5['length']>0x0&&_0x59a4d5['length']<=0x5){_0x53c63d[_0x5a500c(0xdc)](_0x5a500c(0xf4));for(const _0x52d15b of _0x59a4d5)_0x53c63d[_0x5a500c(0xdc)]('\x20\x20'+_0x52d15b);}else _0x59a4d5[_0x5a500c(0xd9)]>0x5&&_0x53c63d[_0x5a500c(0xdc)]('\x0a('+_0x59a4d5['length']+_0x5a500c(0xea));return _0x53c63d[_0x5a500c(0xf9)]('\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_0x823fb2=a0_0x9b64;(function(_0x4a98b3,_0x5be84a){const _0x2f83ee=a0_0x9b64,_0x33f75a=_0x4a98b3();while(!![]){try{const _0x42d749=-parseInt(_0x2f83ee(0x1f9))/0x1*(-parseInt(_0x2f83ee(0x1f3))/0x2)+parseInt(_0x2f83ee(0x22a))/0x3+-parseInt(_0x2f83ee(0x219))/0x4+parseInt(_0x2f83ee(0x1f5))/0x5+-parseInt(_0x2f83ee(0x1d2))/0x6+parseInt(_0x2f83ee(0x1b8))/0x7*(parseInt(_0x2f83ee(0x22b))/0x8)+parseInt(_0x2f83ee(0x21b))/0x9*(-parseInt(_0x2f83ee(0x1ac))/0xa);if(_0x42d749===_0x5be84a)break;else _0x33f75a['push'](_0x33f75a['shift']());}catch(_0x2ac133){_0x33f75a['push'](_0x33f75a['shift']());}}}(a0_0x4ed2,0x231f9));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x481318,_0x4dfaed,_0x1b164c,_0x3bbc09){const _0x57a1a1=a0_0x9b64;if(_0x3bbc09===undefined)_0x3bbc09=_0x1b164c;var _0x49dbc2=Object[_0x57a1a1(0x1b9)](_0x4dfaed,_0x1b164c);(!_0x49dbc2||(_0x57a1a1(0x1cf)in _0x49dbc2?!_0x4dfaed['__esModule']:_0x49dbc2[_0x57a1a1(0x1aa)]||_0x49dbc2['configurable']))&&(_0x49dbc2={'enumerable':!![],'get':function(){return _0x4dfaed[_0x1b164c];}}),Object[_0x57a1a1(0x234)](_0x481318,_0x3bbc09,_0x49dbc2);}:function(_0x367a0e,_0x4c8ddf,_0x18bb3a,_0x2aa6d7){if(_0x2aa6d7===undefined)_0x2aa6d7=_0x18bb3a;_0x367a0e[_0x2aa6d7]=_0x4c8ddf[_0x18bb3a];}),__setModuleDefault=this&&this[a0_0x823fb2(0x1b7)]||(Object[a0_0x823fb2(0x220)]?function(_0x5ded17,_0x2298ba){const _0x2e43ca=a0_0x823fb2;Object['defineProperty'](_0x5ded17,_0x2e43ca(0x1d3),{'enumerable':!![],'value':_0x2298ba});}:function(_0x42a898,_0x435fd8){const _0xa8a075=a0_0x823fb2;_0x42a898[_0xa8a075(0x1d3)]=_0x435fd8;}),__importStar=this&&this[a0_0x823fb2(0x21c)]||(function(){var _0x1a94c1=function(_0xdf92bf){const _0xb281b5=a0_0x9b64;return _0x1a94c1=Object[_0xb281b5(0x229)]||function(_0x3e81eb){const _0x7b7cb1=_0xb281b5;var _0x4511ac=[];for(var _0x5519c6 in _0x3e81eb)if(Object[_0x7b7cb1(0x1d0)][_0x7b7cb1(0x1ef)][_0x7b7cb1(0x21a)](_0x3e81eb,_0x5519c6))_0x4511ac[_0x4511ac['length']]=_0x5519c6;return _0x4511ac;},_0x1a94c1(_0xdf92bf);};return function(_0x19c86d){const _0x21d817=a0_0x9b64;if(_0x19c86d&&_0x19c86d[_0x21d817(0x21d)])return _0x19c86d;var _0x320795={};if(_0x19c86d!=null){for(var _0x310c86=_0x1a94c1(_0x19c86d),_0x2a3a57=0x0;_0x2a3a57<_0x310c86[_0x21d817(0x1db)];_0x2a3a57++)if(_0x310c86[_0x2a3a57]!==_0x21d817(0x1d3))__createBinding(_0x320795,_0x19c86d,_0x310c86[_0x2a3a57]);}return __setModuleDefault(_0x320795,_0x19c86d),_0x320795;};}());Object[a0_0x823fb2(0x234)](exports,a0_0x823fb2(0x21d),{'value':!![]}),exports[a0_0x823fb2(0x201)]=filterLs,exports[a0_0x823fb2(0x1c1)]=filterTree,exports[a0_0x823fb2(0x1b1)]=filterCat,exports[a0_0x823fb2(0x1eb)]=filterGrep,exports[a0_0x823fb2(0x22d)]=filterFind;const path=__importStar(require(a0_0x823fb2(0x1c0))),generic_1=require(a0_0x823fb2(0x20f)),tracker_1=require(a0_0x823fb2(0x1d7));function a0_0x9b64(_0x5a3b8d,_0x31b704){const _0x4ed24d=a0_0x4ed2();return a0_0x9b64=function(_0x9b64e4,_0x39387e){_0x9b64e4=_0x9b64e4-0x1a1;let _0x117f90=_0x4ed24d[_0x9b64e4];return _0x117f90;},a0_0x9b64(_0x5a3b8d,_0x31b704);}function isFeatureEnabled(_0x592e7a){const _0x5f4d27=a0_0x823fb2;try{const _0x14337e=tracker_1['tracker'][_0x5f4d27(0x23a)](),_0x2c2a67=_0x14337e[_0x5f4d27(0x235)];if(!_0x2c2a67||_0x2c2a67[_0x592e7a]===undefined)return!![];return _0x2c2a67[_0x592e7a]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x823fb2(0x1d9),a0_0x823fb2(0x224),a0_0x823fb2(0x21e),'Cargo.lock','go.sum','poetry.lock',a0_0x823fb2(0x1ab),a0_0x823fb2(0x1b0),a0_0x823fb2(0x1cb)],BINARY_EXTENSIONS=[a0_0x823fb2(0x1f8),a0_0x823fb2(0x233),'.map',a0_0x823fb2(0x1df),a0_0x823fb2(0x208),'.jpg','.jpeg',a0_0x823fb2(0x202),a0_0x823fb2(0x1a6),a0_0x823fb2(0x205),a0_0x823fb2(0x1b6),a0_0x823fb2(0x1c6),a0_0x823fb2(0x1e8),a0_0x823fb2(0x1f2),a0_0x823fb2(0x1e6),'.tgz','.gz','.bz2',a0_0x823fb2(0x1ba),a0_0x823fb2(0x1b3),a0_0x823fb2(0x1a2),a0_0x823fb2(0x221),a0_0x823fb2(0x1a7),'.dylib',a0_0x823fb2(0x216),a0_0x823fb2(0x21f),a0_0x823fb2(0x203),a0_0x823fb2(0x227),a0_0x823fb2(0x212),'.woff',a0_0x823fb2(0x210),a0_0x823fb2(0x1fa),a0_0x823fb2(0x1e7),a0_0x823fb2(0x231),a0_0x823fb2(0x1a1),a0_0x823fb2(0x228),a0_0x823fb2(0x1f6),a0_0x823fb2(0x230),a0_0x823fb2(0x1d6),a0_0x823fb2(0x20e),a0_0x823fb2(0x1fe),a0_0x823fb2(0x1a5),a0_0x823fb2(0x1a3),'.o',a0_0x823fb2(0x1e3)];function extractFilename(_0x512fd0){const _0x4fbcc9=a0_0x823fb2,_0x234930=_0x512fd0[_0x4fbcc9(0x1c2)]()[_0x4fbcc9(0x1c7)](/\s+/);for(let _0xbf12f8=0x1;_0xbf12f8<_0x234930[_0x4fbcc9(0x1db)];_0xbf12f8++){if(!_0x234930[_0xbf12f8]['startsWith']('-'))return _0x234930[_0xbf12f8];}return null;}function filterLockFile(_0x49bf49,_0x512221){const _0x5de512=a0_0x823fb2;try{const _0x67e8f9=path[_0x5de512(0x222)](_0x512221)[_0x5de512(0x1cc)]();if(!LOCK_FILES[_0x5de512(0x1de)](_0x5b93b3=>_0x67e8f9===_0x5b93b3['toLowerCase']()))return null;const _0x595aa5=_0x49bf49[_0x5de512(0x1db)];let _0x4a064b=0x0;if(_0x67e8f9===_0x5de512(0x1d9))try{const _0x3a6e10=JSON[_0x5de512(0x1f1)](_0x49bf49);_0x4a064b=Object['keys'](_0x3a6e10[_0x5de512(0x1d5)]||_0x3a6e10['dependencies']||{})[_0x5de512(0x1db)];}catch{_0x4a064b=(_0x49bf49['match'](/"resolved":/g)||[])[_0x5de512(0x1db)];}else{if(_0x67e8f9===_0x5de512(0x224))_0x4a064b=(_0x49bf49[_0x5de512(0x214)](/^"?[^#\s][^:]*:$/gm)||[])[_0x5de512(0x1db)];else{if(_0x67e8f9===_0x5de512(0x1e1)||_0x67e8f9===_0x5de512(0x226))_0x4a064b=(_0x49bf49[_0x5de512(0x214)](/\[\[package\]\]/g)||[])['length'];else{if(_0x67e8f9===_0x5de512(0x1cd))_0x4a064b=Math[_0x5de512(0x1c4)](_0x49bf49['split']('\x0a')[_0x5de512(0x232)](_0x401f3d=>_0x401f3d[_0x5de512(0x1c2)]())[_0x5de512(0x1db)]/0x2);else{if(_0x67e8f9===_0x5de512(0x1ab))try{_0x4a064b=JSON[_0x5de512(0x1f1)](_0x49bf49)['packages']?.[_0x5de512(0x1db)]||0x0;}catch{}else _0x67e8f9===_0x5de512(0x21e)?_0x4a064b=(_0x49bf49[_0x5de512(0x214)](/^\s{2}['"@a-z]/gm)||[])[_0x5de512(0x1db)]:_0x4a064b=_0x49bf49['split']('\x0a')['filter'](_0x2fe9fe=>_0x2fe9fe[_0x5de512(0x1c2)]())['length'];}}}}return _0x5de512(0x237)+path[_0x5de512(0x222)](_0x512221)+':\x20'+_0x4a064b+_0x5de512(0x213)+_0x595aa5['toLocaleString']()+_0x5de512(0x1c8);}catch{return null;}}function filterBinaryOrMinified(_0x596beb,_0x18ef58){const _0x1409c0=a0_0x823fb2;try{if(_0x18ef58){const _0x50fb24=_0x18ef58[_0x1409c0(0x1cc)]();for(const _0x2a988b of BINARY_EXTENSIONS){if(_0x50fb24['endsWith'](_0x2a988b))return _0x1409c0(0x200)+path[_0x1409c0(0x222)](_0x18ef58)+',\x20'+_0x596beb[_0x1409c0(0x1db)][_0x1409c0(0x239)]()+_0x1409c0(0x206)+_0x2a988b+_0x1409c0(0x20d);}}const _0x2a580b=_0x596beb['substring'](0x0,0x3e8);let _0x1b1d9b=0x0;for(let _0x10217d=0x0;_0x10217d<_0x2a580b[_0x1409c0(0x1db)];_0x10217d++){if(_0x2a580b[_0x1409c0(0x225)](_0x10217d)===0x0)_0x1b1d9b++;}if(_0x1b1d9b>0x0)return _0x1409c0(0x1ee)+_0x596beb[_0x1409c0(0x1db)][_0x1409c0(0x239)]()+_0x1409c0(0x1f0);let _0x5c7551=0x0;for(let _0x2dec03=0x0;_0x2dec03<_0x2a580b[_0x1409c0(0x1db)];_0x2dec03++){const _0xf5885f=_0x2a580b[_0x1409c0(0x225)](_0x2dec03);if(_0xf5885f<0x20&&_0xf5885f!==0xa&&_0xf5885f!==0xd&&_0xf5885f!==0x9)_0x5c7551++;}if(_0x2a580b['length']>0x64&&_0x5c7551>_0x2a580b[_0x1409c0(0x1db)]*0.1)return _0x1409c0(0x1ee)+_0x596beb[_0x1409c0(0x1db)][_0x1409c0(0x239)]()+'\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)';const _0x282903=_0x596beb[_0x1409c0(0x1c7)]('\x0a');if(_0x282903[_0x1409c0(0x1db)]<=0x3&&_0x596beb[_0x1409c0(0x1db)]>0x1388)return'[minified\x20file]\x20'+_0x596beb[_0x1409c0(0x1db)]['toLocaleString']()+'\x20chars\x20across\x20'+_0x282903[_0x1409c0(0x1db)]+_0x1409c0(0x1f7);return null;}catch{return null;}}function filterJsonMinify(_0x5aff6f){const _0x129638=a0_0x823fb2;try{const _0x154d55=_0x5aff6f[_0x129638(0x1c2)]();if(!_0x154d55[_0x129638(0x1bb)]('{')&&!_0x154d55['startsWith']('['))return null;const _0x4abada=_0x154d55[_0x129638(0x1c7)]('\x0a');if(_0x4abada[_0x129638(0x1db)]<=0x14)return null;const _0x23d04c=JSON[_0x129638(0x1f1)](_0x154d55),_0x111825=JSON['stringify'](_0x23d04c);if(_0x111825[_0x129638(0x1db)]<_0x154d55[_0x129638(0x1db)])return _0x111825;return null;}catch{return null;}}function filterLs(_0x12ebe2){const _0x4faf1f=a0_0x823fb2,_0x20935e=_0x12ebe2[_0x4faf1f(0x1c7)]('\x0a')[_0x4faf1f(0x232)](_0x2ad3=>_0x2ad3['trim']()['length']>0x0);if(_0x20935e[_0x4faf1f(0x1db)]===0x0)return _0x4faf1f(0x23e);if(_0x20935e[_0x4faf1f(0x1db)]<=0x1e)return _0x12ebe2[_0x4faf1f(0x1c2)]();const _0x453a22=[],_0x3fca98=[];for(const _0x81b458 of _0x20935e){const _0x25d146=_0x81b458[_0x4faf1f(0x1c2)]();if(_0x25d146['startsWith'](_0x4faf1f(0x218))||_0x25d146['startsWith']('d')&&_0x25d146[_0x4faf1f(0x20c)]('..'))continue;_0x25d146['endsWith']('/')||_0x25d146[_0x4faf1f(0x1bb)]('d')&&_0x25d146[_0x4faf1f(0x20c)]('\x20')?_0x453a22[_0x4faf1f(0x217)](_0x25d146):_0x3fca98[_0x4faf1f(0x217)](_0x25d146);}const _0x3ce14c=[];return _0x453a22[_0x4faf1f(0x1db)]>0x0&&(_0x453a22['length']<=0xf?_0x3ce14c[_0x4faf1f(0x217)](..._0x453a22):(_0x3ce14c[_0x4faf1f(0x217)](..._0x453a22[_0x4faf1f(0x1bc)](0x0,0xa)),_0x3ce14c[_0x4faf1f(0x217)](_0x4faf1f(0x1b4)+(_0x453a22[_0x4faf1f(0x1db)]-0xa)+_0x4faf1f(0x1d4)))),_0x3fca98['length']>0x0&&(_0x3fca98[_0x4faf1f(0x1db)]<=0x14?_0x3ce14c[_0x4faf1f(0x217)](..._0x3fca98):(_0x3ce14c['push'](..._0x3fca98[_0x4faf1f(0x1bc)](0x0,0xf)),_0x3ce14c[_0x4faf1f(0x217)](_0x4faf1f(0x1b4)+(_0x3fca98[_0x4faf1f(0x1db)]-0xf)+_0x4faf1f(0x1e5)))),_0x3ce14c['push']('\x0a('+_0x453a22[_0x4faf1f(0x1db)]+_0x4faf1f(0x1ff)+_0x3fca98['length']+'\x20files)'),_0x3ce14c[_0x4faf1f(0x1c9)]('\x0a');}function filterTree(_0x3bd7d5){const _0x46f2a2=a0_0x823fb2,_0x3b5c45=_0x3bd7d5['split']('\x0a');if(_0x3b5c45[_0x46f2a2(0x1db)]<=0x32)return _0x3bd7d5[_0x46f2a2(0x1c2)]();const _0x4411bb=[];let _0x554dc4=0x0,_0x56aabd=0x0,_0x2426e9=0x0;for(const _0x1987ba of _0x3b5c45){const _0x55301f=_0x1987ba[_0x46f2a2(0x214)](/(\d+)\s+director/),_0x44c09b=_0x1987ba[_0x46f2a2(0x214)](/(\d+)\s+file/);if(_0x55301f)_0x2426e9=parseInt(_0x55301f[0x1]);if(_0x44c09b)_0x56aabd=parseInt(_0x44c09b[0x1]);const _0x1749c3=(_0x1987ba[_0x46f2a2(0x214)](/^[│├└\s─]+/)||[''])[0x0][_0x46f2a2(0x1db)];_0x1749c3<=0x4&&(_0x4411bb[_0x46f2a2(0x217)](_0x1987ba),_0x554dc4++);}return _0x3b5c45[_0x46f2a2(0x1db)]>_0x4411bb[_0x46f2a2(0x1db)]&&_0x4411bb[_0x46f2a2(0x217)](_0x46f2a2(0x1d8)+_0x2426e9+'\x20directories,\x20'+_0x56aabd+_0x46f2a2(0x22e)),_0x4411bb['join']('\x0a');}function filterCat(_0xf595fd,_0x44517e=''){const _0xabbed3=a0_0x823fb2,_0x56e76f=extractFilename(_0x44517e);try{if(_0x56e76f&&isFeatureEnabled(_0xabbed3(0x23c))){const _0xa12a84=filterLockFile(_0xf595fd,_0x56e76f);if(_0xa12a84)return _0xa12a84;}if(isFeatureEnabled(_0xabbed3(0x215))){const _0xa210e3=filterBinaryOrMinified(_0xf595fd,_0x56e76f);if(_0xa210e3)return _0xa210e3;}if(isFeatureEnabled(_0xabbed3(0x1bd))){const _0x37d653=(0x0,generic_1[_0xabbed3(0x1b5)])(_0xf595fd);if(_0x37d653)return _0x37d653;}const _0x436d19=filterJsonMinify(_0xf595fd);if(_0x436d19)return _0x436d19;if(_0x56e76f&&isFeatureEnabled(_0xabbed3(0x207))){const _0x17ea37=path[_0xabbed3(0x20a)](_0x56e76f)[_0xabbed3(0x1cc)](),_0x45760c=[_0xabbed3(0x238),_0xabbed3(0x1ca),_0xabbed3(0x1fb),_0xabbed3(0x1c5),_0xabbed3(0x20b),_0xabbed3(0x1ce),'.rs',_0xabbed3(0x22c),'.c',_0xabbed3(0x1dc),_0xabbed3(0x1bf),'.rb',_0xabbed3(0x211),'.kt'];if(_0x45760c[_0xabbed3(0x20c)](_0x17ea37)){const _0x56802e=_0xf595fd[_0xabbed3(0x1c7)]('\x0a');if(_0x56802e[_0xabbed3(0x1db)]>0x64){const _0x5a4c00=[];_0x5a4c00['push'](_0xabbed3(0x1e2)+path[_0xabbed3(0x222)](_0x56e76f)+'\x20('+_0x56802e[_0xabbed3(0x1db)]+'\x20lines)'),_0x5a4c00[_0xabbed3(0x217)]('');for(const _0x426cfd of _0x56802e){const _0x4ba9b1=_0x426cfd['trim']();if(_0x4ba9b1[_0xabbed3(0x1bb)]('import\x20')||_0x4ba9b1[_0xabbed3(0x1bb)](_0xabbed3(0x1be))||_0x4ba9b1['startsWith'](_0xabbed3(0x1d1))||_0x4ba9b1[_0xabbed3(0x214)](/=\s*require\(/)||_0x4ba9b1[_0xabbed3(0x1bb)](_0xabbed3(0x22f))||_0x4ba9b1[_0xabbed3(0x1bb)](_0xabbed3(0x1ed))||_0x4ba9b1['startsWith'](_0xabbed3(0x1f4)))_0x5a4c00[_0xabbed3(0x217)](_0x426cfd);else{if(_0x4ba9b1[_0xabbed3(0x214)](/^(export\s+)?(async\s+)?function\s+/)||_0x4ba9b1[_0xabbed3(0x214)](/^(export\s+)?(default\s+)?class\s+/)||_0x4ba9b1['match'](/^(export\s+)?(type|interface|enum)\s+/)||_0x4ba9b1[_0xabbed3(0x214)](/^(async\s+)?def\s+/)||_0x4ba9b1[_0xabbed3(0x214)](/^func\s+/)||_0x4ba9b1['match'](/^type\s+\w+\s+(struct|interface)/)||_0x4ba9b1['match'](/^(pub\s+)?(async\s+)?fn\s+/)||_0x4ba9b1[_0xabbed3(0x214)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x4ba9b1[_0xabbed3(0x214)](/^(public|private|protected|static)\s+/))_0x5a4c00[_0xabbed3(0x217)](_0x426cfd);else{if(_0x4ba9b1[_0xabbed3(0x1bb)](_0xabbed3(0x236))&&!_0x4ba9b1[_0xabbed3(0x20c)]('=>')&&_0x4ba9b1[_0xabbed3(0x1db)]<0x78)_0x5a4c00[_0xabbed3(0x217)](_0x426cfd);else _0x4ba9b1[_0xabbed3(0x1bb)]('@')&&!_0x4ba9b1['startsWith']('@param')&&!_0x4ba9b1['startsWith'](_0xabbed3(0x1ea))&&_0x5a4c00['push'](_0x426cfd);}}}_0x5a4c00[_0xabbed3(0x217)](''),_0x5a4c00[_0xabbed3(0x217)]('('+_0x56802e[_0xabbed3(0x1db)]+_0xabbed3(0x23d)+(_0x5a4c00[_0xabbed3(0x1db)]-0x2)+_0xabbed3(0x1fc));const _0x2b03d3=_0x5a4c00[_0xabbed3(0x1c9)]('\x0a');if(_0x2b03d3[_0xabbed3(0x1db)]<_0xf595fd[_0xabbed3(0x1db)])return _0x2b03d3;}}}}catch{}let _0x32fc6f=(0x0,generic_1[_0xabbed3(0x1b2)])(_0xf595fd);if(_0x56e76f){const _0x4a8c5f=path[_0xabbed3(0x20a)](_0x56e76f)[_0xabbed3(0x1cc)]();_0x32fc6f=(0x0,generic_1[_0xabbed3(0x1a8)])(_0x32fc6f,_0x4a8c5f);}const _0x5336ca=_0x32fc6f[_0xabbed3(0x1c7)]('\x0a');if(_0x5336ca[_0xabbed3(0x1db)]<=0x64)return _0x32fc6f;const _0x391376=[];return _0x391376[_0xabbed3(0x217)](..._0x5336ca[_0xabbed3(0x1bc)](0x0,0x32)),_0x391376[_0xabbed3(0x217)](_0xabbed3(0x1e0)+(_0x5336ca[_0xabbed3(0x1db)]-0x50)+_0xabbed3(0x1c3)),_0x391376[_0xabbed3(0x217)](..._0x5336ca['slice'](-0x1e)),_0x391376[_0xabbed3(0x217)]('\x0a('+_0x5336ca[_0xabbed3(0x1db)]+_0xabbed3(0x209)),_0x391376[_0xabbed3(0x1c9)]('\x0a');}function a0_0x4ed2(){const _0x2af7af=['#include\x20','.avi','.otf','filter','.min.css','defineProperty','features_enabled','export\x20','[lock\x20file]\x20','.ts','toLocaleString','getConfig','\x20\x20...\x20+','lock','\x20lines\x20total,\x20','Empty\x20directory','substring','.mp3','.exe','.class','\x20matches\x20across\x20','.pyo','.ico','.so','stripComments','\x20files\x20found\x20across\x20','writable','composer.lock','240IsIToR','\x20more\x20matches','/\x20(','keys','Gemfile.lock','filterCat','collapseWhitespace','.rar','...\x20+','smartCrushJson','.webp','__setModuleDefault','18389CuGyhT','getOwnPropertyDescriptor','.7z','startsWith','slice','json_crusher','from\x20','.cs','path','filterTree','trim','\x20lines\x20truncated]\x20...\x0a','floor','.jsx','.svg','split','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','join','.js','bun.lockb','toLowerCase','go.sum','.go','get','prototype','require(','622182PhkDyu','default','\x20more\x20directories','packages','.mov','../tracker','\x0a...\x20(','package-lock.json','entries','length','.cpp','\x20directories','some','.wasm','\x0a...\x20[','cargo.lock','[code\x20skeleton]\x20','.obj','indexOf','\x20more\x20files','.tar.gz','.eot','.pdf',':\x20...\x20(','@return','filterGrep','dirname','use\x20','[binary\x20file]\x20','hasOwnProperty','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','parse','.zip','161608XmfeaD','package\x20','644800EGVyTi','.wav','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','.min.js','1BfqCfw','.ttf','.tsx','\x20structural\x20lines\x20shown)','No\x20files\x20found','.pyc','\x20directories,\x20','[binary/minified\x20file]\x20','filterLs','.gif','.sqlite','sort','.bmp','\x20chars,\x20type:\x20','skeleton','.png','\x20lines\x20total)','extname','.py','includes','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','.webm','./generic','.woff2','.swift','.sqlite3','\x20dependencies,\x20','match','binary','.bin','push','total\x20','148952Arzsqc','call','25605JhPSvz','__importStar','__esModule','pnpm-lock.yaml','.dat','create','.dll','basename','\x20files)','yarn.lock','charCodeAt','poetry.lock','.db','.mp4','getOwnPropertyNames','130470kvocfm','304JAIlTd','.java','filterFind','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)'];a0_0x4ed2=function(){return _0x2af7af;};return a0_0x4ed2();}function filterGrep(_0x2de893){const _0x47bc89=a0_0x823fb2,_0x1c8336=_0x2de893['split']('\x0a')['filter'](_0x926c5d=>_0x926c5d[_0x47bc89(0x1c2)]()[_0x47bc89(0x1db)]>0x0);if(_0x1c8336[_0x47bc89(0x1db)]===0x0)return'No\x20matches\x20found';if(_0x1c8336['length']<=0x32)return _0x2de893[_0x47bc89(0x1c2)]();const _0x56f587={},_0x10627e=[];for(const _0x34fd62 of _0x1c8336){const _0x136177=_0x34fd62[_0x47bc89(0x1e4)](':');if(_0x136177>0x0&&_0x136177<0xc8){const _0x6fc289=_0x34fd62[_0x47bc89(0x23f)](0x0,_0x136177);if(_0x6fc289[_0x47bc89(0x20c)]('/')||_0x6fc289['includes']('\x5c')||_0x6fc289[_0x47bc89(0x20c)]('.')){if(!_0x56f587[_0x6fc289])_0x56f587[_0x6fc289]=[];_0x56f587[_0x6fc289][_0x47bc89(0x217)](_0x34fd62[_0x47bc89(0x23f)](_0x136177+0x1)['trim']());continue;}}_0x10627e['push'](_0x34fd62);}const _0x217f29=[],_0x13a320=Object[_0x47bc89(0x1af)](_0x56f587);if(_0x13a320[_0x47bc89(0x1db)]>0x0){const _0x50434d=0x14,_0x1fae8e=_0x13a320[_0x47bc89(0x1bc)](0x0,_0x50434d);for(const _0x2dd490 of _0x1fae8e){const _0x4234ca=_0x56f587[_0x2dd490];if(_0x4234ca[_0x47bc89(0x1db)]<=0x3)for(const _0x409ea3 of _0x4234ca){_0x217f29[_0x47bc89(0x217)](_0x2dd490+':\x20'+_0x409ea3);}else _0x217f29[_0x47bc89(0x217)](_0x2dd490+':\x20'+_0x4234ca[0x0]),_0x217f29['push'](_0x2dd490+_0x47bc89(0x1e9)+_0x4234ca[_0x47bc89(0x1db)]+'\x20matches\x20in\x20this\x20file)');}_0x13a320[_0x47bc89(0x1db)]>_0x50434d&&_0x217f29['push'](_0x47bc89(0x1b4)+(_0x13a320[_0x47bc89(0x1db)]-_0x50434d)+'\x20more\x20files\x20with\x20matches');}if(_0x10627e[_0x47bc89(0x1db)]>0x0){const _0x4be091=0x1e;_0x217f29['push'](..._0x10627e[_0x47bc89(0x1bc)](0x0,_0x4be091)),_0x10627e[_0x47bc89(0x1db)]>_0x4be091&&_0x217f29[_0x47bc89(0x217)]('...\x20+'+(_0x10627e[_0x47bc89(0x1db)]-_0x4be091)+_0x47bc89(0x1ad));}const _0x300784=_0x1c8336[_0x47bc89(0x1db)];return _0x217f29[_0x47bc89(0x217)]('\x0a('+_0x300784+_0x47bc89(0x1a4)+(_0x13a320[_0x47bc89(0x1db)]||'?')+'\x20files)'),_0x217f29[_0x47bc89(0x1c9)]('\x0a');}function filterFind(_0x396106){const _0x23e179=a0_0x823fb2,_0x7b6d0c=_0x396106[_0x23e179(0x1c7)]('\x0a')['filter'](_0x58aee8=>_0x58aee8[_0x23e179(0x1c2)]()['length']>0x0);if(_0x7b6d0c[_0x23e179(0x1db)]===0x0)return _0x23e179(0x1fd);if(_0x7b6d0c[_0x23e179(0x1db)]<=0x32)return _0x396106[_0x23e179(0x1c2)]();const _0x278cfa={};for(const _0x3ce8fc of _0x7b6d0c){const _0x3e8320=path[_0x23e179(0x1ec)](_0x3ce8fc[_0x23e179(0x1c2)]())||'.';_0x278cfa[_0x3e8320]=(_0x278cfa[_0x3e8320]||0x0)+0x1;}const _0x4022a1=Object[_0x23e179(0x1da)](_0x278cfa)[_0x23e179(0x204)]((_0x45669c,_0x580f03)=>_0x580f03[0x1]-_0x45669c[0x1]),_0x2a217b=[_0x7b6d0c['length']+_0x23e179(0x1a9)+_0x4022a1[_0x23e179(0x1db)]+_0x23e179(0x1dd),''],_0x4596cc=0x1e;for(const [_0x340df7,_0x3173ad]of _0x4022a1[_0x23e179(0x1bc)](0x0,_0x4596cc)){_0x2a217b[_0x23e179(0x217)]('\x20\x20'+_0x340df7+_0x23e179(0x1ae)+_0x3173ad+_0x23e179(0x223));}return _0x4022a1[_0x23e179(0x1db)]>_0x4596cc&&_0x2a217b[_0x23e179(0x217)](_0x23e179(0x23b)+(_0x4022a1[_0x23e179(0x1db)]-_0x4596cc)+'\x20more\x20directories'),_0x2a217b['join']('\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';function a0_0x4bc4(_0x4f0cda,_0x25b9a5){var _0x3e5145=a0_0x3e51();return a0_0x4bc4=function(_0x4bc4b7,_0x4a37bd){_0x4bc4b7=_0x4bc4b7-0xe1;var _0x454588=_0x3e5145[_0x4bc4b7];return _0x454588;},a0_0x4bc4(_0x4f0cda,_0x25b9a5);}function a0_0x3e51(){var _0x5dfe41=['__createBinding','2781009KWlODT','hooks','1470636iglRwg','378060RtTSko','get','join','__esModule','415672iFbMCR','mkdirSync','existsSync','2kYjXjd','8rmIyiP','defineProperty','create','//\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','homedir','utf8','path','length','__setModuleDefault','installClaudeHooks','.claude','139036zkhOOE','default','103327fIvEvm','318261hVhxlI'];a0_0x3e51=function(){return _0x5dfe41;};return a0_0x3e51();}var a0_0x268fe3=a0_0x4bc4;(function(_0x352d7f,_0x3841b3){var _0x5586dd=a0_0x4bc4,_0x3e363c=_0x352d7f();while(!![]){try{var _0x44caa0=parseInt(_0x5586dd(0xf8))/0x1*(-parseInt(_0x5586dd(0xec))/0x2)+-parseInt(_0x5586dd(0xfb))/0x3+-parseInt(_0x5586dd(0xe9))/0x4+-parseInt(_0x5586dd(0xe5))/0x5+parseInt(_0x5586dd(0xe4))/0x6+parseInt(_0x5586dd(0xfa))/0x7*(parseInt(_0x5586dd(0xed))/0x8)+parseInt(_0x5586dd(0xe2))/0x9;if(_0x44caa0===_0x3841b3)break;else _0x3e363c['push'](_0x3e363c['shift']());}catch(_0x329ae6){_0x3e363c['push'](_0x3e363c['shift']());}}}(a0_0x3e51,0x23357));var __createBinding=this&&this[a0_0x268fe3(0xe1)]||(Object[a0_0x268fe3(0xef)]?function(_0x5ebb26,_0x35c7f,_0x2d5979,_0xb32173){var _0x50eeb1=a0_0x268fe3;if(_0xb32173===undefined)_0xb32173=_0x2d5979;var _0x160eb9=Object['getOwnPropertyDescriptor'](_0x35c7f,_0x2d5979);(!_0x160eb9||(_0x50eeb1(0xe6)in _0x160eb9?!_0x35c7f['__esModule']:_0x160eb9['writable']||_0x160eb9['configurable']))&&(_0x160eb9={'enumerable':!![],'get':function(){return _0x35c7f[_0x2d5979];}}),Object[_0x50eeb1(0xee)](_0x5ebb26,_0xb32173,_0x160eb9);}:function(_0x51a8eb,_0x2da6b8,_0x4f18b3,_0x386c31){if(_0x386c31===undefined)_0x386c31=_0x4f18b3;_0x51a8eb[_0x386c31]=_0x2da6b8[_0x4f18b3];}),__setModuleDefault=this&&this[a0_0x268fe3(0xf5)]||(Object[a0_0x268fe3(0xef)]?function(_0x4816c4,_0x2a04c6){var _0xa9f3a1=a0_0x268fe3;Object[_0xa9f3a1(0xee)](_0x4816c4,_0xa9f3a1(0xf9),{'enumerable':!![],'value':_0x2a04c6});}:function(_0x5f49bb,_0x54110e){var _0x4b7986=a0_0x268fe3;_0x5f49bb[_0x4b7986(0xf9)]=_0x54110e;}),__importStar=this&&this['__importStar']||(function(){var _0x333994=function(_0x2b79ab){return _0x333994=Object['getOwnPropertyNames']||function(_0x4ad6d2){var _0x1c9861=a0_0x4bc4,_0x2de70a=[];for(var _0x1da94e in _0x4ad6d2)if(Object['prototype']['hasOwnProperty']['call'](_0x4ad6d2,_0x1da94e))_0x2de70a[_0x2de70a[_0x1c9861(0xf4)]]=_0x1da94e;return _0x2de70a;},_0x333994(_0x2b79ab);};return function(_0x2f358b){var _0xd361d9=a0_0x4bc4;if(_0x2f358b&&_0x2f358b['__esModule'])return _0x2f358b;var _0x9a9beb={};if(_0x2f358b!=null){for(var _0x5a3af5=_0x333994(_0x2f358b),_0xae0db2=0x0;_0xae0db2<_0x5a3af5[_0xd361d9(0xf4)];_0xae0db2++)if(_0x5a3af5[_0xae0db2]!==_0xd361d9(0xf9))__createBinding(_0x9a9beb,_0x2f358b,_0x5a3af5[_0xae0db2]);}return __setModuleDefault(_0x9a9beb,_0x2f358b),_0x9a9beb;};}());Object[a0_0x268fe3(0xee)](exports,a0_0x268fe3(0xe8),{'value':!![]}),exports[a0_0x268fe3(0xf6)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x268fe3(0xf3))),os=__importStar(require('os'));function installClaudeHooks(){var _0x22d765=a0_0x268fe3;try{const _0xd7c5f4=path[_0x22d765(0xe7)](os[_0x22d765(0xf1)](),_0x22d765(0xf7),_0x22d765(0xe3));!fs[_0x22d765(0xeb)](_0xd7c5f4)&&fs[_0x22d765(0xea)](_0xd7c5f4,{'recursive':!![]});const _0x4ade2a=path[_0x22d765(0xe7)](_0xd7c5f4,'post_tool_use.js'),_0x3fbf9a=_0x22d765(0xf0);fs['writeFileSync'](_0x4ade2a,_0x3fbf9a,_0x22d765(0xf2));}catch(_0x20abd0){}}
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';function a0_0x158f(_0x2bd6d1,_0x344374){const _0x42b49c=a0_0x42b4();return a0_0x158f=function(_0x158f4d,_0x2b0c99){_0x158f4d=_0x158f4d-0xe3;let _0x1c1de9=_0x42b49c[_0x158f4d];return _0x1c1de9;},a0_0x158f(_0x2bd6d1,_0x344374);}const a0_0x53952c=a0_0x158f;(function(_0x110cfa,_0x2c7e40){const _0x435286=a0_0x158f,_0xe60136=_0x110cfa();while(!![]){try{const _0x4df1e6=-parseInt(_0x435286(0x10d))/0x1+-parseInt(_0x435286(0x12a))/0x2*(-parseInt(_0x435286(0x128))/0x3)+-parseInt(_0x435286(0xe9))/0x4+parseInt(_0x435286(0x12d))/0x5*(-parseInt(_0x435286(0x10b))/0x6)+parseInt(_0x435286(0x11f))/0x7+-parseInt(_0x435286(0xeb))/0x8+parseInt(_0x435286(0x117))/0x9;if(_0x4df1e6===_0x2c7e40)break;else _0xe60136['push'](_0xe60136['shift']());}catch(_0x1989de){_0xe60136['push'](_0xe60136['shift']());}}}(a0_0x42b4,0x52c82));var __createBinding=this&&this[a0_0x53952c(0xef)]||(Object[a0_0x53952c(0x107)]?function(_0x7135fb,_0xfc7c50,_0x23684b,_0x19ec3c){const _0xf99911=a0_0x53952c;if(_0x19ec3c===undefined)_0x19ec3c=_0x23684b;var _0x609eec=Object[_0xf99911(0xf8)](_0xfc7c50,_0x23684b);(!_0x609eec||(_0xf99911(0xe5)in _0x609eec?!_0xfc7c50[_0xf99911(0x11b)]:_0x609eec[_0xf99911(0xff)]||_0x609eec[_0xf99911(0x123)]))&&(_0x609eec={'enumerable':!![],'get':function(){return _0xfc7c50[_0x23684b];}}),Object[_0xf99911(0x103)](_0x7135fb,_0x19ec3c,_0x609eec);}:function(_0x453897,_0x5a0936,_0x250d99,_0x333262){if(_0x333262===undefined)_0x333262=_0x250d99;_0x453897[_0x333262]=_0x5a0936[_0x250d99];}),__setModuleDefault=this&&this[a0_0x53952c(0x10f)]||(Object[a0_0x53952c(0x107)]?function(_0xd96323,_0x2f7fa3){const _0x1d4837=a0_0x53952c;Object[_0x1d4837(0x103)](_0xd96323,'default',{'enumerable':!![],'value':_0x2f7fa3});}:function(_0x3db0a3,_0x2df260){_0x3db0a3['default']=_0x2df260;}),__importStar=this&&this['__importStar']||(function(){var _0x4dc900=function(_0x3fc791){return _0x4dc900=Object['getOwnPropertyNames']||function(_0x1e32f3){const _0x38d3a6=a0_0x158f;var _0x36ec52=[];for(var _0x43dd27 in _0x1e32f3)if(Object['prototype'][_0x38d3a6(0x119)][_0x38d3a6(0x104)](_0x1e32f3,_0x43dd27))_0x36ec52[_0x36ec52[_0x38d3a6(0xf3)]]=_0x43dd27;return _0x36ec52;},_0x4dc900(_0x3fc791);};return function(_0x371b16){const _0x6be17c=a0_0x158f;if(_0x371b16&&_0x371b16[_0x6be17c(0x11b)])return _0x371b16;var _0x416c40={};if(_0x371b16!=null){for(var _0x2f9aa7=_0x4dc900(_0x371b16),_0x555aab=0x0;_0x555aab<_0x2f9aa7['length'];_0x555aab++)if(_0x2f9aa7[_0x555aab]!=='default')__createBinding(_0x416c40,_0x371b16,_0x2f9aa7[_0x555aab]);}return __setModuleDefault(_0x416c40,_0x371b16),_0x416c40;};}());Object['defineProperty'](exports,a0_0x53952c(0x11b),{'value':!![]}),exports[a0_0x53952c(0x112)]=runMcpProxy;const child_process_1=require(a0_0x53952c(0x11a)),readline=__importStar(require(a0_0x53952c(0x10e))),filters_1=require(a0_0x53952c(0x11d)),tracker_1=require(a0_0x53952c(0x121)),proxy_conv_1=require(a0_0x53952c(0x108)),proxy_resp_1=require(a0_0x53952c(0x113));function a0_0x42b4(){const _0x44b673=['exit','parse','26300cFwjWx','tracker','result','logExecution','string','default','get','write','inherit','stdin','2258964ahSTfx','features_enabled','76496oMpAZu','trimmedCount','\x20trimmed,\x20~','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','__createBinding','text','optimizeMaxTokens','error','length','createInterface','proxy:resp-optimize','getConfig','resp_optimize','getOwnPropertyDescriptor','stringify','proxy:conv-compress','\x20messages\x20(','stdout','trim','complexity','writable','jsonrpc','message','messages','defineProperty','call','spawn','method','create','./proxy-conv','close','\x20tokens\x20saved)','678JnBbpD','max_tokens:\x20','157540nokkZh','readline','__setModuleDefault','content','compressConversation','runMcpProxy','./proxy-resp','max_tokens','type','line','3209265rpBaTm','compressOutput','hasOwnProperty','child_process','__esModule','conv_compress','./filters','params','4736921EFSqTp','pipe','./tracker','mcp\x20tool\x20(id:\x20','configurable','2.0','isArray','savedTokens','mcp-tool-call','2373yYJnEW','redaction_enabled','1598JBXHnN'];a0_0x42b4=function(){return _0x44b673;};return a0_0x42b4();}function runMcpProxy(_0x6f57e7,_0x165e18){const _0x55b2dd=a0_0x53952c,_0x16304a=(0x0,child_process_1[_0x55b2dd(0x105)])(_0x6f57e7,_0x165e18,{'stdio':[_0x55b2dd(0x120),_0x55b2dd(0x120),_0x55b2dd(0xe7)]}),_0x2532fa=tracker_1[_0x55b2dd(0x12e)][_0x55b2dd(0xf6)](),_0x4f7589=_0x2532fa[_0x55b2dd(0xea)]||{},_0x461d67=_0x4f7589[_0x55b2dd(0x11c)]!==![],_0x1ef70f=_0x4f7589[_0x55b2dd(0xf7)]!==![],_0x38e17a=readline[_0x55b2dd(0xf4)]({'input':process[_0x55b2dd(0xe8)],'terminal':![]});_0x38e17a['on']('line',_0x571d8b=>{const _0xaf669b=_0x55b2dd;try{const _0x39e6da=JSON['parse'](_0x571d8b);if(_0x39e6da&&_0x39e6da[_0xaf669b(0x100)]==='2.0'&&_0x39e6da[_0xaf669b(0x106)]&&_0x39e6da['params']){const _0x27ee5a=_0x39e6da[_0xaf669b(0x11e)];if(Array[_0xaf669b(0x125)](_0x27ee5a[_0xaf669b(0x102)])&&_0x27ee5a[_0xaf669b(0x102)][_0xaf669b(0xf3)]>0x0){if(_0x461d67){const _0x214d94=(0x0,proxy_conv_1[_0xaf669b(0x111)])(_0x27ee5a[_0xaf669b(0x102)]);(_0x214d94[_0xaf669b(0xec)]>0x0||_0x214d94[_0xaf669b(0x126)]>0x0)&&(_0x27ee5a[_0xaf669b(0x102)]=_0x214d94[_0xaf669b(0x102)],tracker_1[_0xaf669b(0x12e)]['logExecution'](_0xaf669b(0xfa),_0x214d94[_0xaf669b(0xec)]+_0x214d94[_0xaf669b(0x102)][_0xaf669b(0xf3)]+'\x20messages',_0x214d94[_0xaf669b(0x102)][_0xaf669b(0xf3)]+_0xaf669b(0xfb)+_0x214d94[_0xaf669b(0xec)]+_0xaf669b(0xed)+_0x214d94['savedTokens']+_0xaf669b(0x10a),0x0,undefined,[_0xaf669b(0x11c)]));}if(_0x1ef70f){const _0x5a8e37=(0x0,proxy_resp_1[_0xaf669b(0xf1)])(_0x27ee5a[_0xaf669b(0x102)],_0x27ee5a[_0xaf669b(0x114)]);if(_0x5a8e37){const _0x327e82=_0x27ee5a[_0xaf669b(0x114)]||_0xaf669b(0xe4);_0x27ee5a[_0xaf669b(0x114)]=_0x5a8e37[_0xaf669b(0x114)],tracker_1[_0xaf669b(0x12e)][_0xaf669b(0x130)](_0xaf669b(0xf5),_0xaf669b(0x10c)+_0x327e82,'max_tokens:\x20'+_0x5a8e37[_0xaf669b(0x114)]+'\x20('+_0x5a8e37[_0xaf669b(0xfe)]+')',0x0,undefined,[_0xaf669b(0xf7)]);}}}_0x16304a[_0xaf669b(0xe8)][_0xaf669b(0xe6)](JSON['stringify'](_0x39e6da)+'\x0a');}else _0x16304a['stdin'][_0xaf669b(0xe6)](_0x571d8b+'\x0a');}catch{_0x16304a[_0xaf669b(0xe8)]['write'](_0x571d8b+'\x0a');}}),_0x38e17a['on']('close',()=>{const _0x494821=_0x55b2dd;try{_0x16304a[_0x494821(0xe8)]['end']();}catch{}});const _0x5d533c=readline['createInterface']({'input':_0x16304a[_0x55b2dd(0xfc)],'terminal':![]});_0x5d533c['on'](_0x55b2dd(0x116),_0x164b6e=>{const _0x4e86d9=_0x55b2dd;try{const _0xabc6a=JSON[_0x4e86d9(0x12c)](_0x164b6e);if(_0xabc6a&&_0xabc6a[_0x4e86d9(0x100)]===_0x4e86d9(0x124)&&_0xabc6a['id']!==undefined&&_0xabc6a['result']&&Array[_0x4e86d9(0x125)](_0xabc6a[_0x4e86d9(0x12f)][_0x4e86d9(0x110)])){let _0xd0edb2=![];for(const _0xfde9e7 of _0xabc6a['result'][_0x4e86d9(0x110)]){if(_0xfde9e7[_0x4e86d9(0x115)]==='text'&&typeof _0xfde9e7[_0x4e86d9(0xf0)]===_0x4e86d9(0xe3)&&_0xfde9e7[_0x4e86d9(0xf0)][_0x4e86d9(0xfd)]()[_0x4e86d9(0xf3)]>0x0){const _0x211676=_0xfde9e7[_0x4e86d9(0xf0)],_0x515c8b=(0x0,filters_1[_0x4e86d9(0x118)])(_0x4e86d9(0x127),_0x211676,'',tracker_1[_0x4e86d9(0x12e)]['getConfig']()[_0x4e86d9(0x129)]);tracker_1['tracker'][_0x4e86d9(0x130)](_0x4e86d9(0x122)+_0xabc6a['id']+')',_0x211676,_0x515c8b,0x0),_0xfde9e7[_0x4e86d9(0xf0)]=_0x515c8b,_0xd0edb2=!![];}}_0xd0edb2?process[_0x4e86d9(0xfc)][_0x4e86d9(0xe6)](JSON[_0x4e86d9(0xf9)](_0xabc6a)+'\x0a'):process['stdout'][_0x4e86d9(0xe6)](_0x164b6e+'\x0a');}else process[_0x4e86d9(0xfc)][_0x4e86d9(0xe6)](_0x164b6e+'\x0a');}catch{process[_0x4e86d9(0xfc)][_0x4e86d9(0xe6)](_0x164b6e+'\x0a');}}),_0x16304a['on'](_0x55b2dd(0x109),_0x51b97c=>{const _0x41f16b=_0x55b2dd;process[_0x41f16b(0x12b)](_0x51b97c||0x0);}),_0x16304a['on'](_0x55b2dd(0xf2),_0x17a935=>{const _0x478115=_0x55b2dd;console[_0x478115(0xf2)](_0x478115(0xee)+_0x17a935[_0x478115(0x101)]),process[_0x478115(0x12b)](0x1);});}
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.39",
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_0x461966=a0_0x3498;(function(_0x3c15bc,_0x1db0c7){const _0x40b0d3=a0_0x3498,_0x13e587=_0x3c15bc();while(!![]){try{const _0x450359=-parseInt(_0x40b0d3(0x1b7))/0x1+parseInt(_0x40b0d3(0x1cc))/0x2*(parseInt(_0x40b0d3(0x1af))/0x3)+-parseInt(_0x40b0d3(0x1b6))/0x4+parseInt(_0x40b0d3(0x1c4))/0x5+-parseInt(_0x40b0d3(0x1b2))/0x6*(-parseInt(_0x40b0d3(0x1a6))/0x7)+parseInt(_0x40b0d3(0x1ca))/0x8+-parseInt(_0x40b0d3(0x1ae))/0x9*(-parseInt(_0x40b0d3(0x1b8))/0xa);if(_0x450359===_0x1db0c7)break;else _0x13e587['push'](_0x13e587['shift']());}catch(_0x4698a7){_0x13e587['push'](_0x13e587['shift']());}}}(a0_0x937c,0xcb920));function a0_0x3498(_0xb58642,_0x367c51){const _0x937cc3=a0_0x937c();return a0_0x3498=function(_0x349829,_0xc09c56){_0x349829=_0x349829-0x1a5;let _0x62b2ee=_0x937cc3[_0x349829];return _0x62b2ee;},a0_0x3498(_0xb58642,_0x367c51);}Object['defineProperty'](exports,a0_0x461966(0x1c2),{'value':!![]}),exports[a0_0x461966(0x1c8)]=compressConversation;function a0_0x937c(){const _0x436fed=['ceil','282zZreEf','role','filter','sort','5542876KNrmfO','1119410wBFoXl','44650fsCLNY','length','\x20lines\x20trimmed\x20...]','msg','push','split','originalIndex','type','isArray','map','__esModule','string','2259740OwQXwD','\x0a[...\x20','reduce','join','compressConversation','system','10029000PrVVTz','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','2492858hFFxwR','object','indexOf','tool_result','25046vfzAYU','forEach','content','tokens','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','slice','score','\x20chars\x20trimmed\x20...]','441vZKOhk','3koPUFO','text'];a0_0x937c=function(){return _0x436fed;};return a0_0x937c();}const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function estimateTokens(_0x156fcc){const _0x7695fd=a0_0x461966;return Math[_0x7695fd(0x1b1)](_0x156fcc[_0x7695fd(0x1b9)]/0x4);}function blockText(_0x3f3f0f){const _0x2c6f47=a0_0x461966;if(!_0x3f3f0f||typeof _0x3f3f0f!==_0x2c6f47(0x1cd))return'';if(_0x3f3f0f[_0x2c6f47(0x1bf)]==='text'&&typeof _0x3f3f0f[_0x2c6f47(0x1b0)]===_0x2c6f47(0x1c3))return _0x3f3f0f[_0x2c6f47(0x1b0)];if(_0x3f3f0f[_0x2c6f47(0x1bf)]===_0x2c6f47(0x1a5)){if(typeof _0x3f3f0f['content']===_0x2c6f47(0x1c3))return _0x3f3f0f['content'];if(Array[_0x2c6f47(0x1c0)](_0x3f3f0f[_0x2c6f47(0x1a8)]))return _0x3f3f0f[_0x2c6f47(0x1a8)][_0x2c6f47(0x1c1)](blockText)[_0x2c6f47(0x1b4)](Boolean)['join']('\x0a');}return'';}function messageText(_0x44244e){const _0x28133c=a0_0x461966;if(typeof _0x44244e[_0x28133c(0x1a8)]===_0x28133c(0x1c3))return _0x44244e[_0x28133c(0x1a8)];if(Array[_0x28133c(0x1c0)](_0x44244e[_0x28133c(0x1a8)]))return _0x44244e[_0x28133c(0x1a8)][_0x28133c(0x1c1)](blockText)[_0x28133c(0x1b4)](Boolean)[_0x28133c(0x1c7)]('\x0a');return'';}function summarizeText(_0x1dd76){const _0x158515=a0_0x461966,_0x2d918b=estimateTokens(_0x1dd76),_0x1275c0=_0x1dd76[_0x158515(0x1bd)]('\x0a');if(_0x2d918b>0x7d0){if(_0x1275c0[_0x158515(0x1b9)]>0xa){const _0x267063=_0x1275c0[_0x158515(0x1ab)](0x0,0x5)[_0x158515(0x1c7)]('\x0a'),_0x5d9004=_0x1275c0[_0x158515(0x1ab)](-0x5)['join']('\x0a');return _0x267063+'\x0a[...\x20'+(_0x1275c0[_0x158515(0x1b9)]-0xa)+_0x158515(0x1aa)+_0x5d9004;}return _0x1dd76[_0x158515(0x1ab)](0x0,0x7d0)+('\x0a[...\x20'+(_0x1dd76[_0x158515(0x1b9)]-0x7d0)+_0x158515(0x1cb));}if(_0x2d918b>0x1f4){if(_0x1275c0[_0x158515(0x1b9)]>0xa)return _0x1275c0[_0x158515(0x1ab)](0x0,0xa)[_0x158515(0x1c7)]('\x0a')+(_0x158515(0x1c5)+(_0x1275c0[_0x158515(0x1b9)]-0xa)+_0x158515(0x1ba));return _0x1dd76[_0x158515(0x1ab)](0x0,0x320)+('\x0a[...\x20'+(_0x1dd76[_0x158515(0x1b9)]-0x320)+_0x158515(0x1ad));}return _0x1dd76;}function summarizeBlock(_0x2dbd1a){const _0x3a3077=a0_0x461966;if(!_0x2dbd1a||typeof _0x2dbd1a!==_0x3a3077(0x1cd))return _0x2dbd1a;if(_0x2dbd1a[_0x3a3077(0x1bf)]===_0x3a3077(0x1b0)&&typeof _0x2dbd1a[_0x3a3077(0x1b0)]==='string')return{..._0x2dbd1a,'text':summarizeText(_0x2dbd1a['text'])};if(_0x2dbd1a[_0x3a3077(0x1bf)]===_0x3a3077(0x1a5)){if(typeof _0x2dbd1a[_0x3a3077(0x1a8)]==='string')return{..._0x2dbd1a,'content':summarizeText(_0x2dbd1a[_0x3a3077(0x1a8)])};if(Array[_0x3a3077(0x1c0)](_0x2dbd1a['content'])){const _0x48bdaa=largestBlockIndex(_0x2dbd1a[_0x3a3077(0x1a8)]);if(_0x48bdaa>=0x0){const _0x5e1512=_0x2dbd1a[_0x3a3077(0x1a8)][_0x3a3077(0x1c1)]((_0x1f73ed,_0x3c84e4)=>_0x3c84e4===_0x48bdaa?summarizeBlock(_0x1f73ed):_0x1f73ed);return{..._0x2dbd1a,'content':_0x5e1512};}}}return _0x2dbd1a;}function largestBlockIndex(_0x1f2e0d){const _0x3707d0=a0_0x461966;let _0x56918c=-0x1,_0x2b51f8=-0x1;return _0x1f2e0d[_0x3707d0(0x1a7)]((_0x186452,_0x70214c)=>{const _0x279b99=blockText(_0x186452)['length'];_0x279b99>_0x2b51f8&&(_0x2b51f8=_0x279b99,_0x56918c=_0x70214c);}),_0x2b51f8>0x0?_0x56918c:-0x1;}function scoreMessage(_0x17d059,_0x416794,_0x23e9c5){const _0x3dcc46=ROLE_WEIGHT[_0x17d059['role']]||0.4,_0x444979=(_0x416794+0x1)/_0x23e9c5,_0x7e995d=messageText(_0x17d059),_0x1c0ae7=estimateTokens(_0x7e995d),_0x13529d=_0x1c0ae7>0x7d0?0.6:_0x1c0ae7>0x1f4?0.8:0x1;return _0x3dcc46*(0.3+0.7*_0x444979)*_0x13529d;}function summarizeMessage(_0x383912){const _0x246f50=a0_0x461966,_0x287ce2=estimateTokens(messageText(_0x383912));if(_0x287ce2<=0x1f4)return _0x383912;if(typeof _0x383912[_0x246f50(0x1a8)]===_0x246f50(0x1c3))return{..._0x383912,'content':summarizeText(_0x383912[_0x246f50(0x1a8)])};if(Array[_0x246f50(0x1c0)](_0x383912[_0x246f50(0x1a8)])){const _0x37c1d3=largestBlockIndex(_0x383912['content']);if(_0x37c1d3>=0x0){const _0x1a0b95=_0x383912['content'][_0x246f50(0x1c1)]((_0x13560e,_0x45643a)=>_0x45643a===_0x37c1d3?summarizeBlock(_0x13560e):_0x13560e);return{..._0x383912,'content':_0x1a0b95};}}return _0x383912;}function compressConversation(_0x41967f,_0x181f05){const _0x5ac0c8=a0_0x461966,_0x8673b4={'messages':_0x41967f,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x41967f||!Array['isArray'](_0x41967f)||_0x41967f[_0x5ac0c8(0x1b9)]<=0x6)return _0x8673b4;try{return _compressConversation(_0x41967f,_0x181f05);}catch{return _0x8673b4;}}function _compressConversation(_0x299628,_0x289cd2){const _0x50f67e=a0_0x461966,_0x2eb964=_0x289cd2||0x13880,_0x5e4cc9=0x4,_0xfe9559=_0x299628[_0x50f67e(0x1b4)](_0x17b9f8=>_0x17b9f8['role']===_0x50f67e(0x1c9)),_0x5cd2fe=_0x299628[_0x50f67e(0x1b4)](_0x34ec31=>_0x34ec31[_0x50f67e(0x1b3)]!==_0x50f67e(0x1c9)),_0x60507=_0x5cd2fe['slice'](-_0x5e4cc9),_0x14f85c=_0x5cd2fe[_0x50f67e(0x1ab)](0x0,-_0x5e4cc9),_0x2c7679=_0x14f85c['map']((_0x3a1a7f,_0x12a613)=>({'msg':_0x3a1a7f,'score':scoreMessage(_0x3a1a7f,_0x12a613,_0x14f85c[_0x50f67e(0x1b9)]),'tokens':estimateTokens(messageText(_0x3a1a7f))})),_0xf1d35d=_0x2c7679[_0x50f67e(0x1c6)]((_0x5bedb7,_0x4f9096)=>_0x5bedb7+_0x4f9096[_0x50f67e(0x1a9)],0x0),_0x77b45f=_0x60507[_0x50f67e(0x1c6)]((_0x3cb0d2,_0x215e27)=>_0x3cb0d2+estimateTokens(messageText(_0x215e27)),0x0),_0x4faa6e=_0xfe9559[_0x50f67e(0x1c6)]((_0x5ac695,_0x358dfe)=>_0x5ac695+estimateTokens(messageText(_0x358dfe)),0x0),_0x5b9a35=_0x2eb964-_0x77b45f-_0x4faa6e;if(_0xf1d35d<=_0x5b9a35){let _0x11e642=0x0;const _0x55af54=_0x2c7679[_0x50f67e(0x1c1)](_0x1b95b0=>{const _0x56637a=_0x50f67e;if(_0x1b95b0[_0x56637a(0x1a9)]>0x1f4){const _0x3c3961=summarizeMessage(_0x1b95b0['msg']),_0x4cc650=estimateTokens(messageText(_0x3c3961));if(_0x4cc650<_0x1b95b0['tokens'])return _0x11e642+=_0x1b95b0[_0x56637a(0x1a9)]-_0x4cc650,_0x3c3961;}return _0x1b95b0[_0x56637a(0x1bb)];});return{'messages':[..._0xfe9559,..._0x55af54,..._0x60507],'trimmedCount':0x0,'savedTokens':_0x11e642};}_0x2c7679[_0x50f67e(0x1b5)]((_0x3cf88f,_0x52425f)=>_0x52425f[_0x50f67e(0x1ac)]-_0x3cf88f[_0x50f67e(0x1ac)]);let _0x5c0d5c=0x0,_0x20bbf9=0x0,_0x2ba939=0x0;const _0x5db10e=[];for(const _0x1a9ddb of _0x2c7679){if(_0x5c0d5c+_0x1a9ddb['tokens']<=_0x5b9a35){if(_0x1a9ddb[_0x50f67e(0x1a9)]>0x3e8){const _0x350d39=summarizeMessage(_0x1a9ddb[_0x50f67e(0x1bb)]),_0x49dc88=estimateTokens(messageText(_0x350d39));_0x2ba939+=_0x1a9ddb[_0x50f67e(0x1a9)]-_0x49dc88,_0x5c0d5c+=_0x49dc88,_0x5db10e[_0x50f67e(0x1bc)]({'msg':_0x350d39,'originalIndex':_0x14f85c['indexOf'](_0x1a9ddb[_0x50f67e(0x1bb)])});}else _0x5c0d5c+=_0x1a9ddb[_0x50f67e(0x1a9)],_0x5db10e[_0x50f67e(0x1bc)]({'msg':_0x1a9ddb[_0x50f67e(0x1bb)],'originalIndex':_0x14f85c[_0x50f67e(0x1ce)](_0x1a9ddb['msg'])});}else _0x20bbf9++,_0x2ba939+=_0x1a9ddb[_0x50f67e(0x1a9)];}_0x5db10e[_0x50f67e(0x1b5)]((_0x4debe2,_0x5d11c6)=>_0x4debe2[_0x50f67e(0x1be)]-_0x5d11c6[_0x50f67e(0x1be)]);const _0x5e3c87=[..._0xfe9559,..._0x5db10e[_0x50f67e(0x1c1)](_0x374d2e=>_0x374d2e[_0x50f67e(0x1bb)]),..._0x60507];return{'messages':_0x5e3c87,'trimmedCount':_0x20bbf9,'savedTokens':_0x2ba939};}
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';const a0_0x3fc224=a0_0x2ad3;(function(_0x5dbedd,_0x118dfc){const _0x487048=a0_0x2ad3,_0x46823c=_0x5dbedd();while(!![]){try{const _0x344e90=-parseInt(_0x487048(0x1e5))/0x1*(parseInt(_0x487048(0x1e2))/0x2)+parseInt(_0x487048(0x1d8))/0x3*(parseInt(_0x487048(0x1e1))/0x4)+-parseInt(_0x487048(0x1e6))/0x5*(-parseInt(_0x487048(0x1d9))/0x6)+parseInt(_0x487048(0x1eb))/0x7+-parseInt(_0x487048(0x1e0))/0x8*(-parseInt(_0x487048(0x1d6))/0x9)+parseInt(_0x487048(0x1d2))/0xa*(parseInt(_0x487048(0x1e9))/0xb)+parseInt(_0x487048(0x1d1))/0xc*(-parseInt(_0x487048(0x1d7))/0xd);if(_0x344e90===_0x118dfc)break;else _0x46823c['push'](_0x46823c['shift']());}catch(_0xc041ea){_0x46823c['push'](_0x46823c['shift']());}}}(a0_0x3f22,0xf3e35));function a0_0x3f22(){const _0x32cff4=['116697kxSfro','1873338zqSmhz','filter','type','toLowerCase','role','complex','user','3725776qXXyLr','188ODQREj','46WfTsBe','text','join','41710TPbZgB','5uiEuKZ','test','medium','8278127GVchsM','string','10013136QgAXzw','optimizeMaxTokens','split','defineProperty','19779780PVrTYO','10CDcvgz','length','simple','some','18ppOdVe','26UnHSVC'];a0_0x3f22=function(){return _0x32cff4;};return a0_0x3f22();}Object[a0_0x3fc224(0x1ee)](exports,'__esModule',{'value':!![]}),exports[a0_0x3fc224(0x1ec)]=optimizeMaxTokens;function a0_0x2ad3(_0xf09ff8,_0xcf93c3){const _0x3f2208=a0_0x3f22();return a0_0x2ad3=function(_0x2ad3a4,_0x1e0685){_0x2ad3a4=_0x2ad3a4-0x1d1;let _0x257746=_0x3f2208[_0x2ad3a4];return _0x257746;},a0_0x2ad3(_0xf09ff8,_0xcf93c3);}function lastUserText(_0x45cfdd){const _0x5f19c9=a0_0x3fc224;for(let _0x52fa78=_0x45cfdd[_0x5f19c9(0x1d3)]-0x1;_0x52fa78>=0x0;_0x52fa78--){if(_0x45cfdd[_0x52fa78][_0x5f19c9(0x1dd)]===_0x5f19c9(0x1df)){const _0x40ba8e=_0x45cfdd[_0x52fa78]['content'];if(typeof _0x40ba8e===_0x5f19c9(0x1ea))return _0x40ba8e;if(Array['isArray'](_0x40ba8e))return _0x40ba8e[_0x5f19c9(0x1da)](_0x165f7d=>_0x165f7d[_0x5f19c9(0x1db)]===_0x5f19c9(0x1e3)&&_0x165f7d[_0x5f19c9(0x1e3)])['map'](_0x507d2a=>_0x507d2a[_0x5f19c9(0x1e3)])[_0x5f19c9(0x1e4)]('\x0a');}}return'';}function classifyComplexity(_0x5361a4){const _0x2de7d6=a0_0x3fc224,_0x7e559a=_0x5361a4[_0x2de7d6(0x1dc)](),_0x20641d=_0x7e559a[_0x2de7d6(0x1ed)](/\s+/)[_0x2de7d6(0x1d3)],_0x2040ad=[/^(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(_0x20641d<0x14&&_0x2040ad[_0x2de7d6(0x1d5)](_0x1eaad1=>_0x1eaad1[_0x2de7d6(0x1e7)](_0x7e559a)))return _0x2de7d6(0x1d4);const _0x5b46d6=[/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(_0x20641d>0x50||_0x5b46d6[_0x2de7d6(0x1d5)](_0x5db16c=>_0x5db16c['test'](_0x7e559a)))return _0x2de7d6(0x1de);return _0x2de7d6(0x1e8);}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0x17de4e,_0x4b6eb9){const _0x4c7bc7=a0_0x3fc224;if(!_0x17de4e||_0x17de4e[_0x4c7bc7(0x1d3)]===0x0)return null;const _0xa5c1b8=lastUserText(_0x17de4e);if(!_0xa5c1b8)return null;const _0x12bd09=classifyComplexity(_0xa5c1b8),_0x2c4f25=MAX_TOKENS_MAP[_0x12bd09];if(_0x4b6eb9&&_0x4b6eb9<=_0x2c4f25)return null;return{'max_tokens':_0x2c4f25,'complexity':_0x12bd09};}
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_0x2e7b59=a0_0x43dd;function a0_0x4532(){const _0x2381ff=['generic_credential','[REDACTED_DB_CONNECTION]','Basic\x20Auth','aws_key','defineProperty','$1=[REDACTED_AWS_SECRET]','slack_token','Anthropic\x20API\x20Key','jwt','8bGKzbc','AWS\x20Access\x20Key','Database\x20Connection\x20String','408KpaeIr','email','[REDACTED_PRIVATE_KEY]','rules','replace','[REDACTED_JWT]','5335ahAmgI','Private\x20Key\x20Block','text','[REDACTED_STRIPE_KEY]','twilio_key','Bearer\x20Token','includes','github_token','gcp_key','53137dvNpnA','sendgrid_key','GitHub\x20Token','azure_conn','regex','length','aws_secret','redactor','Stripe\x20Key','loadDefaultRules','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','stripe_key','[REDACTED_OPENAI_KEY]','bearer','[REDACTED_SLACK_TOKEN]','[REDACTED_AZURE_CONNECTION]','421941oMMTpH','redact','Slack\x20Token','[REDACTED_IP]','push','9809577vrWsij','OpenAI\x20API\x20Key','alert','JWT\x20Token','Email\x20Address','[REDACTED_ANTHROPIC_KEY]','1011112ptXRgc','basic_auth','Redactor','667486ncfAcy','redactWithAudit','Bearer\x20[REDACTED_TOKEN]','Azure\x20Connection\x20String','Generic\x20API\x20Key/Secret/Password','type','[REDACTED_TWILIO_KEY]','968853JJIGmj','SendGrid\x20Key','GCP\x20Service\x20Account\x20Key'];a0_0x4532=function(){return _0x2381ff;};return a0_0x4532();}(function(_0x46ddc9,_0x57a38b){const _0x5e0f2d=a0_0x43dd,_0x10a7b6=_0x46ddc9();while(!![]){try{const _0x407731=-parseInt(_0x5e0f2d(0x165))/0x1+parseInt(_0x5e0f2d(0x173))/0x2+-parseInt(_0x5e0f2d(0x17a))/0x3+-parseInt(_0x5e0f2d(0x186))/0x4*(parseInt(_0x5e0f2d(0x18f))/0x5)+parseInt(_0x5e0f2d(0x189))/0x6*(-parseInt(_0x5e0f2d(0x198))/0x7)+parseInt(_0x5e0f2d(0x170))/0x8+parseInt(_0x5e0f2d(0x16a))/0x9;if(_0x407731===_0x57a38b)break;else _0x10a7b6['push'](_0x10a7b6['shift']());}catch(_0x3d3d7c){_0x10a7b6['push'](_0x10a7b6['shift']());}}}(a0_0x4532,0x46097));Object[a0_0x2e7b59(0x181)](exports,'__esModule',{'value':!![]}),exports[a0_0x2e7b59(0x19f)]=exports[a0_0x2e7b59(0x172)]=void 0x0;class Redactor{[a0_0x2e7b59(0x18c)]=[];constructor(){const _0x4cd9e5=a0_0x2e7b59;this[_0x4cd9e5(0x1a1)]();}[a0_0x2e7b59(0x1a1)](){const _0x5632f1=a0_0x2e7b59;this[_0x5632f1(0x18c)]=[{'name':_0x5632f1(0x187),'type':_0x5632f1(0x180),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':'[REDACTED_AWS_KEY]'},{'name':'AWS\x20Secret\x20Key','type':_0x5632f1(0x19e),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x5632f1(0x182)},{'name':_0x5632f1(0x17c),'type':_0x5632f1(0x197),'regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x5632f1(0x1a2)},{'name':_0x5632f1(0x176),'type':_0x5632f1(0x19b),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x5632f1(0x164)},{'name':_0x5632f1(0x184),'type':'anthropic_key','regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x5632f1(0x16f)},{'name':_0x5632f1(0x16b),'type':'openai_key','regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x5632f1(0x1a4)},{'name':_0x5632f1(0x19a),'type':_0x5632f1(0x196),'regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':'[REDACTED_GITHUB_TOKEN]'},{'name':_0x5632f1(0x167),'type':_0x5632f1(0x183),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x5632f1(0x163)},{'name':_0x5632f1(0x1a0),'type':_0x5632f1(0x1a3),'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':_0x5632f1(0x192)},{'name':'Twilio\x20Key','type':_0x5632f1(0x193),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x5632f1(0x179)},{'name':_0x5632f1(0x17b),'type':_0x5632f1(0x199),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':'[REDACTED_SENDGRID_KEY]'},{'name':_0x5632f1(0x190),'type':'private_key','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':_0x5632f1(0x18b)},{'name':_0x5632f1(0x16d),'type':_0x5632f1(0x185),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x5632f1(0x18e)},{'name':_0x5632f1(0x194),'type':_0x5632f1(0x162),'regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x5632f1(0x175)},{'name':_0x5632f1(0x17f),'type':_0x5632f1(0x171),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':'Basic\x20[REDACTED_AUTH]'},{'name':_0x5632f1(0x188),'type':'db_connection','regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x5632f1(0x17e)},{'name':_0x5632f1(0x177),'type':_0x5632f1(0x17d),'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':'IPv4\x20Address\x20(non-local)','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':_0x5632f1(0x168),'alert':![]},{'name':_0x5632f1(0x16e),'type':_0x5632f1(0x18a),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':'[REDACTED_EMAIL]','alert':![]}];}[a0_0x2e7b59(0x166)](_0x5ea1dd){const _0x50f24d=a0_0x2e7b59;return this[_0x50f24d(0x174)](_0x5ea1dd)[_0x50f24d(0x191)];}[a0_0x2e7b59(0x174)](_0x449378){const _0x27875d=a0_0x2e7b59;let _0x59f82a=_0x449378,_0x13759e=0x0;const _0x18dc36=[];for(const _0x22211a of this['rules']){const _0x3e646d=_0x59f82a['match'](_0x22211a[_0x27875d(0x19c)]);_0x3e646d&&_0x3e646d['length']>0x0&&(_0x22211a[_0x27875d(0x16c)]!==![]&&(_0x13759e+=_0x3e646d[_0x27875d(0x19d)],!_0x18dc36[_0x27875d(0x195)](_0x22211a[_0x27875d(0x178)])&&_0x18dc36[_0x27875d(0x169)](_0x22211a[_0x27875d(0x178)])),_0x59f82a=_0x59f82a[_0x27875d(0x18d)](_0x22211a['regex'],_0x22211a['replacement']));}return{'text':_0x59f82a,'secretsFound':_0x13759e,'secretTypes':_0x18dc36};}}function a0_0x43dd(_0x323d9a,_0x3b2477){const _0x4532d4=a0_0x4532();return a0_0x43dd=function(_0x43dd05,_0x1974dd){_0x43dd05=_0x43dd05-0x162;let _0x370979=_0x4532d4[_0x43dd05];return _0x370979;},a0_0x43dd(_0x323d9a,_0x3b2477);}exports[a0_0x2e7b59(0x172)]=Redactor,exports[a0_0x2e7b59(0x19f)]=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_0x1d7986=a0_0x5228;(function(_0x4f46fb,_0x478ff9){const _0x4475f5=a0_0x5228,_0xc087bc=_0x4f46fb();while(!![]){try{const _0x52a1dd=-parseInt(_0x4475f5(0x1b5))/0x1*(-parseInt(_0x4475f5(0x1a0))/0x2)+parseInt(_0x4475f5(0x1bb))/0x3+parseInt(_0x4475f5(0x1bd))/0x4+parseInt(_0x4475f5(0x19c))/0x5+parseInt(_0x4475f5(0x1a5))/0x6+parseInt(_0x4475f5(0x1ad))/0x7+-parseInt(_0x4475f5(0x19f))/0x8;if(_0x52a1dd===_0x478ff9)break;else _0xc087bc['push'](_0xc087bc['shift']());}catch(_0x2327c7){_0xc087bc['push'](_0xc087bc['shift']());}}}(a0_0x1235,0xc8ab1));function a0_0x5228(_0xfceca2,_0x1eae6e){const _0x12355c=a0_0x1235();return a0_0x5228=function(_0x522823,_0x3e7ec8){_0x522823=_0x522823-0x19c;let _0x106f53=_0x12355c[_0x522823];return _0x106f53;},a0_0x5228(_0xfceca2,_0x1eae6e);}function a0_0x1235(){const _0x268629=['Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a','35745440lflFWa','2854858EmmZDt','Test\x20suite\x20run\x20starting...\x0a','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','test_api.py\x20PASS\x0a','9362406nVrmoG','repeat','Step\x201/10\x20:\x20FROM\x20node:20\x0a','env','logExecution','pytest\x20tests/app','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','Compilation\x20Output:\x0a','8222221qXkqfw','gemini-1-5-pro','Optimizing\x20assets...\x0a','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','claude-3-opus','./tracker','tracker','test_db.py\x20PASS\x0a','1ScAhgq','defineProperty','added\x201420\x20packages\x20in\x2014s\x0a','log','Successfully\x20built\x20image.','gpt-4o','1774704XPZSAP','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','1385192FhmZql','npm\x20run\x20build','__esModule','TRIMPROMPT_MODEL','test_auth.py\x20PASS\x0a','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','949090CArlTP','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.'];a0_0x1235=function(){return _0x268629;};return a0_0x1235();}Object[a0_0x1d7986(0x1b6)](exports,a0_0x1d7986(0x1bf),{'value':!![]});const tracker_1=require(a0_0x1d7986(0x1b2));console[a0_0x1d7986(0x1b8)](a0_0x1d7986(0x1a2)),process[a0_0x1d7986(0x1a8)][a0_0x1d7986(0x1c0)]=a0_0x1d7986(0x1b1),tracker_1[a0_0x1d7986(0x1b3)][a0_0x1d7986(0x1a9)](a0_0x1d7986(0x1be),a0_0x1d7986(0x1ac)+'[INFO]\x20Building\x20modules...\x0a'+a0_0x1d7986(0x1af)+a0_0x1d7986(0x1a3)[a0_0x1d7986(0x1a6)](0x190),a0_0x1d7986(0x1c2),0x0),process[a0_0x1d7986(0x1a8)]['TRIMPROMPT_MODEL']=a0_0x1d7986(0x1ba),tracker_1[a0_0x1d7986(0x1b3)]['logExecution'](a0_0x1d7986(0x1aa),a0_0x1d7986(0x1a1)+a0_0x1d7986(0x1c1)+a0_0x1d7986(0x1b4)+a0_0x1d7986(0x1a4)[a0_0x1d7986(0x1a6)](0x12c)+'All\x20303\x20tests\x20passed\x20in\x204.22s.',a0_0x1d7986(0x1bc),0x0),process[a0_0x1d7986(0x1a8)][a0_0x1d7986(0x1c0)]=a0_0x1d7986(0x1ae),tracker_1[a0_0x1d7986(0x1b3)]['logExecution']('docker\x20build\x20.',a0_0x1d7986(0x1b0)+a0_0x1d7986(0x1a7)+a0_0x1d7986(0x1ab)+a0_0x1d7986(0x19e)+a0_0x1d7986(0x1b7)[a0_0x1d7986(0x1a6)](0x3)+a0_0x1d7986(0x1b9),a0_0x1d7986(0x19d),0x0),console[a0_0x1d7986(0x1b8)]('Database\x20successfully\x20seeded!');
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));