trimprompt 1.0.34 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/hooks/claude-hook.js +1 -1
- package/index.html +17 -21
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/filters/rust.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x5e43(){const _0x42a535=['includes','----\x20failures\x20----','assert','error[','warning:','2029701wJEUFJ','\x0aErrors:','min','2825248dfIuMl','__esModule','11262130uUCyec','\x0aWarnings:','\x20passed,\x20','thread','replace','16SfTUSb','slice','split','\x20crates,\x20','left:','Cargo\x20test:\x20all\x20tests\x20passed','trim','2340216DBtTvE','startsWith','7PrzctQ','test\x20result:\x20ok','failures:','40129ccCxAa','Cargo\x20test:\x20','\x0aFailures:','length','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','push','warning[','\x20\x20...\x20+','defineProperty','join','8crdCAy','2897965SdLdsQ','\x20crates\x20successfully','4509348HlUZgu','\x20warnings','\x20ignored','match','\x20----','\x20failed,\x20','\x20passed','\x20errors,\x20'];a0_0x5e43=function(){return _0x42a535;};return a0_0x5e43();}const a0_0x39c912=a0_0xd05f;(function(_0x2fc8a6,_0x3d43f3){const _0x38faea=a0_0xd05f,_0x60b966=_0x2fc8a6();while(!![]){try{const _0x5ccba5=parseInt(_0x38faea(0x125))/0x1*(-parseInt(_0x38faea(0x12f))/0x2)+parseInt(_0x38faea(0x13f))/0x3+-parseInt(_0x38faea(0x142))/0x4+parseInt(_0x38faea(0x130))/0x5+-parseInt(_0x38faea(0x132))/0x6*(-parseInt(_0x38faea(0x122))/0x7)+parseInt(_0x38faea(0x149))/0x8*(parseInt(_0x38faea(0x120))/0x9)+-parseInt(_0x38faea(0x144))/0xa;if(_0x5ccba5===_0x3d43f3)break;else _0x60b966['push'](_0x60b966['shift']());}catch(_0x43f8d8){_0x60b966['push'](_0x60b966['shift']());}}}(a0_0x5e43,0x828c5));function a0_0xd05f(_0x54d759,_0x5b37f3){_0x54d759=_0x54d759-0x120;const _0x5e4350=a0_0x5e43();let _0xd05f63=_0x5e4350[_0x54d759];return _0xd05f63;}Object[a0_0x39c912(0x12d)](exports,a0_0x39c912(0x143),{'value':!![]}),exports['filterCargoTest']=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function filterCargoTest(_0xe9d4bc){const _0x5851f8=a0_0x39c912,_0x44663d=_0xe9d4bc['split']('\x0a');let _0x4f0805=0x0,_0x209a06=0x0,_0xc22e4=0x0,_0x36f4e6=0x0;const _0x31dee0=[];let _0x3d644e=![],_0x1b68da=[];for(const _0x3a93a6 of _0x44663d){const _0x5c7845=_0x3a93a6[_0x5851f8(0x14f)](),_0xda365e=_0x5c7845[_0x5851f8(0x135)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0xda365e){_0x4f0805+=parseInt(_0xda365e[0x2]),_0x209a06+=parseInt(_0xda365e[0x3]),_0xc22e4+=parseInt(_0xda365e[0x4]),_0x36f4e6+=parseInt(_0xda365e[0x5]);continue;}if(_0x5c7845===_0x5851f8(0x124)||_0x5c7845===_0x5851f8(0x13b)){_0x3d644e=!![];continue;}if(_0x3d644e){if(_0x5c7845[_0x5851f8(0x121)]('----\x20')&&_0x5c7845['endsWith'](_0x5851f8(0x136))){if(_0x1b68da[_0x5851f8(0x128)]>0x0)_0x31dee0[_0x5851f8(0x12a)](_0x1b68da[_0x5851f8(0x12e)]('\x0a'));_0x1b68da=[_0x5c7845[_0x5851f8(0x148)](/^-+\s*/,'')[_0x5851f8(0x148)](/\s*-+$/,'')];}else{if(_0x5c7845===_0x5851f8(0x124)||_0x5c7845['startsWith']('test\x20result:')){if(_0x1b68da['length']>0x0)_0x31dee0['push'](_0x1b68da[_0x5851f8(0x12e)]('\x0a'));_0x1b68da=[],_0x3d644e=![];}else _0x5c7845[_0x5851f8(0x128)]>0x0&&_0x1b68da[_0x5851f8(0x12a)](_0x3a93a6);}}}if(_0x1b68da[_0x5851f8(0x128)]>0x0)_0x31dee0['push'](_0x1b68da['join']('\x0a'));if(_0x4f0805===0x0&&_0x209a06===0x0&&_0xc22e4===0x0){if(_0xe9d4bc[_0x5851f8(0x13a)](_0x5851f8(0x123)))return _0x5851f8(0x14e);return _0xe9d4bc;}if(_0x209a06===0x0){const _0x2b5923=[_0x5851f8(0x126)+_0x4f0805+_0x5851f8(0x138)];if(_0xc22e4>0x0)_0x2b5923[_0x5851f8(0x12a)](_0xc22e4+_0x5851f8(0x134));return _0x2b5923[_0x5851f8(0x12e)](',\x20');}const _0x1a1579=[_0x5851f8(0x126)+_0x4f0805+_0x5851f8(0x146)+_0x209a06+_0x5851f8(0x137)+_0xc22e4+_0x5851f8(0x134)];if(_0x31dee0[_0x5851f8(0x128)]>0x0){_0x1a1579[_0x5851f8(0x12a)](_0x5851f8(0x127));const _0x57117b=0x3;for(let _0x210065=0x0;_0x210065<Math[_0x5851f8(0x141)](_0x31dee0[_0x5851f8(0x128)],_0x57117b);_0x210065++){const _0x50251d=_0x31dee0[_0x210065][_0x5851f8(0x14b)]('\x0a');_0x1a1579[_0x5851f8(0x12a)]('\x20\x20'+(_0x210065+0x1)+'.\x20'+_0x50251d[0x0]);const _0x2275e9=_0x50251d['slice'](0x1),_0x2596b1=_0x2275e9['filter'](_0x5f265a=>_0x5f265a[_0x5851f8(0x14f)]()[_0x5851f8(0x121)](_0x5851f8(0x147))||_0x5f265a[_0x5851f8(0x13a)]('panicked')||_0x5f265a[_0x5851f8(0x13a)](_0x5851f8(0x13c))||_0x5f265a[_0x5851f8(0x13a)](_0x5851f8(0x14d))||_0x5f265a[_0x5851f8(0x13a)]('right:'));for(const _0x7c6b17 of _0x2596b1['slice'](0x0,0x5)){_0x1a1579[_0x5851f8(0x12a)]('\x20\x20\x20\x20'+_0x7c6b17[_0x5851f8(0x14f)]());}}_0x31dee0[_0x5851f8(0x128)]>_0x57117b&&_0x1a1579[_0x5851f8(0x12a)](_0x5851f8(0x12c)+(_0x31dee0['length']-_0x57117b)+'\x20more\x20failures');}return _0x1a1579[_0x5851f8(0x12e)]('\x0a');}function filterCargoBuild(_0xccd22a){const _0x523835=a0_0x39c912,_0x5335f8=_0xccd22a[_0x523835(0x14b)]('\x0a'),_0x47d019=[],_0x536ba1=[];let _0x1c461e=0x0;for(const _0x1a8dfb of _0x5335f8){const _0x336e88=_0x1a8dfb[_0x523835(0x14f)]();if(_0x336e88['startsWith']('Compiling\x20'))_0x1c461e++;else{if(_0x336e88[_0x523835(0x121)](_0x523835(0x12b))||_0x336e88[_0x523835(0x121)](_0x523835(0x13e)))_0x47d019[_0x523835(0x12a)](_0x336e88);else{if(_0x336e88[_0x523835(0x121)](_0x523835(0x13d))||_0x336e88[_0x523835(0x121)]('error:'))_0x536ba1[_0x523835(0x12a)](_0x336e88);}}}if(_0x536ba1[_0x523835(0x128)]===0x0&&_0x47d019[_0x523835(0x128)]===0x0)return _0x1c461e>0x0?'Cargo:\x20compiled\x20'+_0x1c461e+_0x523835(0x131):_0xccd22a[_0x523835(0x14f)]();const _0x13d523=[];if(_0x536ba1['length']>0x0){_0x13d523[_0x523835(0x12a)]('Cargo:\x20'+_0x536ba1[_0x523835(0x128)]+_0x523835(0x139)+_0x47d019[_0x523835(0x128)]+_0x523835(0x133)),_0x13d523[_0x523835(0x12a)](_0x523835(0x140));for(const _0x34c74f of _0x536ba1[_0x523835(0x14a)](0x0,0x5))_0x13d523['push']('\x20\x20'+_0x34c74f);if(_0x536ba1['length']>0x5)_0x13d523[_0x523835(0x12a)](_0x523835(0x12c)+(_0x536ba1[_0x523835(0x128)]-0x5)+'\x20more\x20errors');}else _0x13d523[_0x523835(0x12a)]('Cargo:\x20compiled\x20'+_0x1c461e+_0x523835(0x14c)+_0x47d019[_0x523835(0x128)]+_0x523835(0x133));if(_0x47d019[_0x523835(0x128)]>0x0&&_0x47d019['length']<=0x5){_0x13d523['push'](_0x523835(0x145));for(const _0x93f457 of _0x47d019)_0x13d523[_0x523835(0x12a)]('\x20\x20'+_0x93f457);}else _0x47d019['length']>0x5&&_0x13d523[_0x523835(0x12a)]('\x0a('+_0x47d019[_0x523835(0x128)]+_0x523835(0x129));return _0x13d523['join']('\x0a');}
|
package/filters/shell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x348bf5=a0_0x5374;(function(_0x3d3242,_0x468759){const _0x274e1c=a0_0x5374,_0x514059=_0x3d3242();while(!![]){try{const _0x44da2f=parseInt(_0x274e1c(0x22b))/0x1*(parseInt(_0x274e1c(0x1b8))/0x2)+-parseInt(_0x274e1c(0x1d5))/0x3+-parseInt(_0x274e1c(0x1f3))/0x4+-parseInt(_0x274e1c(0x211))/0x5*(-parseInt(_0x274e1c(0x204))/0x6)+parseInt(_0x274e1c(0x1d6))/0x7+parseInt(_0x274e1c(0x226))/0x8*(-parseInt(_0x274e1c(0x1a9))/0x9)+-parseInt(_0x274e1c(0x209))/0xa;if(_0x44da2f===_0x468759)break;else _0x514059['push'](_0x514059['shift']());}catch(_0x7e0d5d){_0x514059['push'](_0x514059['shift']());}}}(a0_0x4567,0x24f39));function a0_0x4567(){const _0x5851b5=['\x20\x20...\x20+','.otf','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','slice','filterCat','json_crusher','.tar.gz','dependencies','\x0a...\x20(','keys','.eot','.zip','.webp','.dll','startsWith','.dylib','.mp4','parse','.class','#include\x20','includes','dirname','sort','\x20directories,\x20','__esModule','length','.go','Cargo.lock','206112hGzOMM','[binary\x20file]\x20','...\x20+','.min.js','export\x20','\x0a...\x20[','filterLs','\x20files\x20found\x20across\x20','package\x20','.woff2','create','.db','.bz2','require(','features_enabled','.tgz','filter','6zrGkQn','writable','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','getOwnPropertyDescriptor','.sqlite3','3125160gyjLCb','./generic','.rs','pnpm-lock.yaml','.woff','.tsx','\x20chars\x20across\x20','.ts','446585jjSgpz','lock','push','\x20lines\x20total,\x20','use\x20',':\x20...\x20(','indexOf','extname','.7z','collapseWhitespace','toLocaleString','join','.js','.java','\x20structural\x20lines\x20shown)','default','@return','match','smartCrushJson','.cs','../tracker','8kHWYWt','\x20chars,\x20type:\x20','composer.lock','.bin','[lock\x20file]\x20','266833UeoHKm','.ttf','.svg','.gz','split','tracker','charCodeAt','.pdf','.map','.mp3','basename','from\x20','/\x20(','stringify','.pyo','getConfig','No\x20matches\x20found','.wav','\x20more\x20directories','import\x20','490689GXcyRW','.pyc','trim','total\x20','.wasm','hasOwnProperty','package-lock.json','.cpp','yarn.lock','stripComments','__importStar','poetry.lock','.swift','getOwnPropertyNames','defineProperty','2zMIadi','.rb','\x20more\x20files','.mov','.webm','.bmp','entries','Empty\x20directory','\x20directories','cargo.lock','.ico','some','\x20files)','toLowerCase','go.sum','.sqlite','.exe','packages','[minified\x20file]\x20','__createBinding','filterGrep','@param','.py','.rar','.png','\x20more\x20files\x20with\x20matches','.gif','filterFind','\x20lines\x20total)','256986jFnzFL','2096010obmOUY'];a0_0x4567=function(){return _0x5851b5;};return a0_0x4567();}var __createBinding=this&&this[a0_0x348bf5(0x1cb)]||(Object[a0_0x348bf5(0x1fd)]?function(_0x2103fd,_0x54ba66,_0x1affba,_0x40f0fd){const _0x4425fe=a0_0x348bf5;if(_0x40f0fd===undefined)_0x40f0fd=_0x1affba;var _0x344374=Object[_0x4425fe(0x207)](_0x54ba66,_0x1affba);(!_0x344374||('get'in _0x344374?!_0x54ba66[_0x4425fe(0x1ef)]:_0x344374[_0x4425fe(0x205)]||_0x344374['configurable']))&&(_0x344374={'enumerable':!![],'get':function(){return _0x54ba66[_0x1affba];}}),Object[_0x4425fe(0x1b7)](_0x2103fd,_0x40f0fd,_0x344374);}:function(_0x186ac8,_0x5aace4,_0x44c47b,_0x553b66){if(_0x553b66===undefined)_0x553b66=_0x44c47b;_0x186ac8[_0x553b66]=_0x5aace4[_0x44c47b];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x2abab7,_0x5c2161){const _0x13f3ab=a0_0x348bf5;Object[_0x13f3ab(0x1b7)](_0x2abab7,_0x13f3ab(0x220),{'enumerable':!![],'value':_0x5c2161});}:function(_0x41ce93,_0x321b7b){_0x41ce93['default']=_0x321b7b;}),__importStar=this&&this[a0_0x348bf5(0x1b3)]||(function(){var _0x54b26f=function(_0x3457ff){const _0x1bb7ba=a0_0x5374;return _0x54b26f=Object[_0x1bb7ba(0x1b6)]||function(_0x51c863){const _0x29cd7c=_0x1bb7ba;var _0x2c7c19=[];for(var _0x186630 in _0x51c863)if(Object['prototype'][_0x29cd7c(0x1ae)]['call'](_0x51c863,_0x186630))_0x2c7c19[_0x2c7c19[_0x29cd7c(0x1f0)]]=_0x186630;return _0x2c7c19;},_0x54b26f(_0x3457ff);};return function(_0x5e5281){const _0x2b4ee3=a0_0x5374;if(_0x5e5281&&_0x5e5281[_0x2b4ee3(0x1ef)])return _0x5e5281;var _0x5b1d5d={};if(_0x5e5281!=null){for(var _0x5daa5d=_0x54b26f(_0x5e5281),_0x4fe341=0x0;_0x4fe341<_0x5daa5d[_0x2b4ee3(0x1f0)];_0x4fe341++)if(_0x5daa5d[_0x4fe341]!=='default')__createBinding(_0x5b1d5d,_0x5e5281,_0x5daa5d[_0x4fe341]);}return __setModuleDefault(_0x5b1d5d,_0x5e5281),_0x5b1d5d;};}());Object[a0_0x348bf5(0x1b7)](exports,a0_0x348bf5(0x1ef),{'value':!![]}),exports[a0_0x348bf5(0x1f9)]=filterLs,exports['filterTree']=filterTree,exports[a0_0x348bf5(0x1db)]=filterCat,exports[a0_0x348bf5(0x1cc)]=filterGrep,exports[a0_0x348bf5(0x1d3)]=filterFind;const path=__importStar(require('path')),generic_1=require(a0_0x348bf5(0x20a)),tracker_1=require(a0_0x348bf5(0x225));function isFeatureEnabled(_0x35a505){const _0x2f1f27=a0_0x348bf5;try{const _0x46511e=tracker_1[_0x2f1f27(0x19a)][_0x2f1f27(0x1a4)](),_0x1e9137=_0x46511e[_0x2f1f27(0x201)];if(!_0x1e9137||_0x1e9137[_0x35a505]===undefined)return!![];return _0x1e9137[_0x35a505]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x348bf5(0x1af),a0_0x348bf5(0x1b1),a0_0x348bf5(0x20c),a0_0x348bf5(0x1f2),a0_0x348bf5(0x1c6),a0_0x348bf5(0x1b4),a0_0x348bf5(0x228),'Gemfile.lock','bun.lockb'],BINARY_EXTENSIONS=[a0_0x348bf5(0x1f6),'.min.css',a0_0x348bf5(0x19d),a0_0x348bf5(0x1ad),a0_0x348bf5(0x1d0),'.jpg','.jpeg',a0_0x348bf5(0x1d2),a0_0x348bf5(0x1c2),a0_0x348bf5(0x1bd),a0_0x348bf5(0x1e3),a0_0x348bf5(0x22d),a0_0x348bf5(0x19c),a0_0x348bf5(0x1e2),a0_0x348bf5(0x1dd),a0_0x348bf5(0x202),a0_0x348bf5(0x198),a0_0x348bf5(0x1ff),a0_0x348bf5(0x219),a0_0x348bf5(0x1cf),a0_0x348bf5(0x1c8),a0_0x348bf5(0x1e4),'.so',a0_0x348bf5(0x1e6),a0_0x348bf5(0x229),'.dat',a0_0x348bf5(0x1c7),a0_0x348bf5(0x1fe),a0_0x348bf5(0x208),a0_0x348bf5(0x20d),a0_0x348bf5(0x1fc),a0_0x348bf5(0x22c),a0_0x348bf5(0x1e1),a0_0x348bf5(0x1d8),a0_0x348bf5(0x19e),a0_0x348bf5(0x1e7),a0_0x348bf5(0x1a6),'.avi',a0_0x348bf5(0x1bb),a0_0x348bf5(0x1bc),a0_0x348bf5(0x1aa),a0_0x348bf5(0x1a3),a0_0x348bf5(0x1e9),'.o','.obj'];function extractFilename(_0x4a58a9){const _0x47fb21=a0_0x348bf5,_0x32bf7d=_0x4a58a9[_0x47fb21(0x1ab)]()[_0x47fb21(0x199)](/\s+/);for(let _0x236862=0x1;_0x236862<_0x32bf7d[_0x47fb21(0x1f0)];_0x236862++){if(!_0x32bf7d[_0x236862]['startsWith']('-'))return _0x32bf7d[_0x236862];}return null;}function filterLockFile(_0x2d48bc,_0x187c88){const _0x5bcf85=a0_0x348bf5;try{const _0x47ec01=path[_0x5bcf85(0x19f)](_0x187c88)['toLowerCase']();if(!LOCK_FILES[_0x5bcf85(0x1c3)](_0x221eb7=>_0x47ec01===_0x221eb7['toLowerCase']()))return null;const _0x1db99a=_0x2d48bc[_0x5bcf85(0x1f0)];let _0x38e082=0x0;if(_0x47ec01===_0x5bcf85(0x1af))try{const _0x3e1cd0=JSON[_0x5bcf85(0x1e8)](_0x2d48bc);_0x38e082=Object[_0x5bcf85(0x1e0)](_0x3e1cd0[_0x5bcf85(0x1c9)]||_0x3e1cd0[_0x5bcf85(0x1de)]||{})['length'];}catch{_0x38e082=(_0x2d48bc['match'](/"resolved":/g)||[])['length'];}else{if(_0x47ec01===_0x5bcf85(0x1b1))_0x38e082=(_0x2d48bc[_0x5bcf85(0x222)](/^"?[^#\s][^:]*:$/gm)||[])[_0x5bcf85(0x1f0)];else{if(_0x47ec01===_0x5bcf85(0x1c1)||_0x47ec01===_0x5bcf85(0x1b4))_0x38e082=(_0x2d48bc[_0x5bcf85(0x222)](/\[\[package\]\]/g)||[])[_0x5bcf85(0x1f0)];else{if(_0x47ec01==='go.sum')_0x38e082=Math['floor'](_0x2d48bc[_0x5bcf85(0x199)]('\x0a')[_0x5bcf85(0x203)](_0x69eff3=>_0x69eff3[_0x5bcf85(0x1ab)]())['length']/0x2);else{if(_0x47ec01===_0x5bcf85(0x228))try{_0x38e082=JSON['parse'](_0x2d48bc)[_0x5bcf85(0x1c9)]?.[_0x5bcf85(0x1f0)]||0x0;}catch{}else _0x47ec01===_0x5bcf85(0x20c)?_0x38e082=(_0x2d48bc[_0x5bcf85(0x222)](/^\s{2}['"@a-z]/gm)||[])[_0x5bcf85(0x1f0)]:_0x38e082=_0x2d48bc[_0x5bcf85(0x199)]('\x0a')[_0x5bcf85(0x203)](_0x52c498=>_0x52c498['trim']())[_0x5bcf85(0x1f0)];}}}}return _0x5bcf85(0x22a)+path[_0x5bcf85(0x19f)](_0x187c88)+':\x20'+_0x38e082+'\x20dependencies,\x20'+_0x1db99a[_0x5bcf85(0x21b)]()+'\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)';}catch{return null;}}function filterBinaryOrMinified(_0x1be49a,_0x1a3666){const _0x2accf5=a0_0x348bf5;try{if(_0x1a3666){const _0x3608f8=_0x1a3666[_0x2accf5(0x1c5)]();for(const _0x1e9f18 of BINARY_EXTENSIONS){if(_0x3608f8['endsWith'](_0x1e9f18))return'[binary/minified\x20file]\x20'+path[_0x2accf5(0x19f)](_0x1a3666)+',\x20'+_0x1be49a[_0x2accf5(0x1f0)][_0x2accf5(0x21b)]()+_0x2accf5(0x227)+_0x1e9f18+_0x2accf5(0x206);}}const _0x345f5a=_0x1be49a['substring'](0x0,0x3e8);let _0x47ee1a=0x0;for(let _0x34da48=0x0;_0x34da48<_0x345f5a[_0x2accf5(0x1f0)];_0x34da48++){if(_0x345f5a[_0x2accf5(0x19b)](_0x34da48)===0x0)_0x47ee1a++;}if(_0x47ee1a>0x0)return _0x2accf5(0x1f4)+_0x1be49a[_0x2accf5(0x1f0)]['toLocaleString']()+'\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)';let _0x482f3c=0x0;for(let _0x3ed9c6=0x0;_0x3ed9c6<_0x345f5a[_0x2accf5(0x1f0)];_0x3ed9c6++){const _0x125696=_0x345f5a[_0x2accf5(0x19b)](_0x3ed9c6);if(_0x125696<0x20&&_0x125696!==0xa&&_0x125696!==0xd&&_0x125696!==0x9)_0x482f3c++;}if(_0x345f5a[_0x2accf5(0x1f0)]>0x64&&_0x482f3c>_0x345f5a['length']*0.1)return _0x2accf5(0x1f4)+_0x1be49a[_0x2accf5(0x1f0)][_0x2accf5(0x21b)]()+'\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)';const _0x12dd1a=_0x1be49a['split']('\x0a');if(_0x12dd1a[_0x2accf5(0x1f0)]<=0x3&&_0x1be49a[_0x2accf5(0x1f0)]>0x1388)return _0x2accf5(0x1ca)+_0x1be49a[_0x2accf5(0x1f0)]['toLocaleString']()+_0x2accf5(0x20f)+_0x12dd1a[_0x2accf5(0x1f0)]+'\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)';return null;}catch{return null;}}function filterJsonMinify(_0x4c7be5){const _0x43df66=a0_0x348bf5;try{const _0x11c3df=_0x4c7be5[_0x43df66(0x1ab)]();if(!_0x11c3df[_0x43df66(0x1e5)]('{')&&!_0x11c3df['startsWith']('['))return null;const _0x3c0622=_0x11c3df[_0x43df66(0x199)]('\x0a');if(_0x3c0622[_0x43df66(0x1f0)]<=0x14)return null;const _0x365f31=JSON[_0x43df66(0x1e8)](_0x11c3df),_0x2b167a=JSON[_0x43df66(0x1a2)](_0x365f31);if(_0x2b167a['length']<_0x11c3df[_0x43df66(0x1f0)])return _0x2b167a;return null;}catch{return null;}}function filterLs(_0x5f2c5a){const _0x32ce9c=a0_0x348bf5,_0x1a56dc=_0x5f2c5a[_0x32ce9c(0x199)]('\x0a')[_0x32ce9c(0x203)](_0x2a0bb4=>_0x2a0bb4['trim']()['length']>0x0);if(_0x1a56dc['length']===0x0)return _0x32ce9c(0x1bf);if(_0x1a56dc[_0x32ce9c(0x1f0)]<=0x1e)return _0x5f2c5a['trim']();const _0x480f4e=[],_0x5477df=[];for(const _0x4e8953 of _0x1a56dc){const _0x2031d1=_0x4e8953['trim']();if(_0x2031d1[_0x32ce9c(0x1e5)](_0x32ce9c(0x1ac))||_0x2031d1[_0x32ce9c(0x1e5)]('d')&&_0x2031d1['includes']('..'))continue;_0x2031d1['endsWith']('/')||_0x2031d1[_0x32ce9c(0x1e5)]('d')&&_0x2031d1[_0x32ce9c(0x1eb)]('\x20')?_0x480f4e[_0x32ce9c(0x213)](_0x2031d1):_0x5477df[_0x32ce9c(0x213)](_0x2031d1);}const _0x15415a=[];return _0x480f4e[_0x32ce9c(0x1f0)]>0x0&&(_0x480f4e[_0x32ce9c(0x1f0)]<=0xf?_0x15415a[_0x32ce9c(0x213)](..._0x480f4e):(_0x15415a[_0x32ce9c(0x213)](..._0x480f4e[_0x32ce9c(0x1da)](0x0,0xa)),_0x15415a[_0x32ce9c(0x213)](_0x32ce9c(0x1f5)+(_0x480f4e[_0x32ce9c(0x1f0)]-0xa)+'\x20more\x20directories'))),_0x5477df['length']>0x0&&(_0x5477df['length']<=0x14?_0x15415a[_0x32ce9c(0x213)](..._0x5477df):(_0x15415a[_0x32ce9c(0x213)](..._0x5477df['slice'](0x0,0xf)),_0x15415a[_0x32ce9c(0x213)](_0x32ce9c(0x1f5)+(_0x5477df[_0x32ce9c(0x1f0)]-0xf)+_0x32ce9c(0x1ba)))),_0x15415a['push']('\x0a('+_0x480f4e[_0x32ce9c(0x1f0)]+_0x32ce9c(0x1ee)+_0x5477df[_0x32ce9c(0x1f0)]+_0x32ce9c(0x1c4)),_0x15415a['join']('\x0a');}function a0_0x5374(_0x2946ca,_0x199e1a){_0x2946ca=_0x2946ca-0x198;const _0x456714=a0_0x4567();let _0x5374d9=_0x456714[_0x2946ca];return _0x5374d9;}function filterTree(_0x44b707){const _0x474399=a0_0x348bf5,_0x1ae170=_0x44b707[_0x474399(0x199)]('\x0a');if(_0x1ae170['length']<=0x32)return _0x44b707[_0x474399(0x1ab)]();const _0x4571a6=[];let _0x182e8b=0x0,_0x258e6d=0x0,_0x4208e1=0x0;for(const _0x4b6c90 of _0x1ae170){const _0x478b98=_0x4b6c90[_0x474399(0x222)](/(\d+)\s+director/),_0x4018b9=_0x4b6c90[_0x474399(0x222)](/(\d+)\s+file/);if(_0x478b98)_0x4208e1=parseInt(_0x478b98[0x1]);if(_0x4018b9)_0x258e6d=parseInt(_0x4018b9[0x1]);const _0x3d8315=(_0x4b6c90[_0x474399(0x222)](/^[│├└\s─]+/)||[''])[0x0][_0x474399(0x1f0)];_0x3d8315<=0x4&&(_0x4571a6[_0x474399(0x213)](_0x4b6c90),_0x182e8b++);}return _0x1ae170[_0x474399(0x1f0)]>_0x4571a6['length']&&_0x4571a6[_0x474399(0x213)](_0x474399(0x1df)+_0x4208e1+'\x20directories,\x20'+_0x258e6d+_0x474399(0x1d9)),_0x4571a6[_0x474399(0x21c)]('\x0a');}function filterCat(_0x5cdd75,_0x4dce67=''){const _0x5857c9=a0_0x348bf5,_0x542ea1=extractFilename(_0x4dce67);try{if(_0x542ea1&&isFeatureEnabled(_0x5857c9(0x212))){const _0x4184c8=filterLockFile(_0x5cdd75,_0x542ea1);if(_0x4184c8)return _0x4184c8;}if(isFeatureEnabled('binary')){const _0x350271=filterBinaryOrMinified(_0x5cdd75,_0x542ea1);if(_0x350271)return _0x350271;}if(isFeatureEnabled(_0x5857c9(0x1dc))){const _0x590827=(0x0,generic_1[_0x5857c9(0x223)])(_0x5cdd75);if(_0x590827)return _0x590827;}const _0x30c52d=filterJsonMinify(_0x5cdd75);if(_0x30c52d)return _0x30c52d;if(_0x542ea1&&isFeatureEnabled('skeleton')){const _0x69da86=path[_0x5857c9(0x218)](_0x542ea1)[_0x5857c9(0x1c5)](),_0x31d939=[_0x5857c9(0x210),_0x5857c9(0x21d),_0x5857c9(0x20e),'.jsx',_0x5857c9(0x1ce),_0x5857c9(0x1f1),_0x5857c9(0x20b),_0x5857c9(0x21e),'.c',_0x5857c9(0x1b0),_0x5857c9(0x224),_0x5857c9(0x1b9),_0x5857c9(0x1b5),'.kt'];if(_0x31d939[_0x5857c9(0x1eb)](_0x69da86)){const _0x2c3e57=_0x5cdd75[_0x5857c9(0x199)]('\x0a');if(_0x2c3e57[_0x5857c9(0x1f0)]>0x64){const _0xf83585=[];_0xf83585['push']('[code\x20skeleton]\x20'+path[_0x5857c9(0x19f)](_0x542ea1)+'\x20('+_0x2c3e57[_0x5857c9(0x1f0)]+'\x20lines)'),_0xf83585[_0x5857c9(0x213)]('');for(const _0x2a2bd1 of _0x2c3e57){const _0x2595a3=_0x2a2bd1[_0x5857c9(0x1ab)]();if(_0x2595a3[_0x5857c9(0x1e5)](_0x5857c9(0x1a8))||_0x2595a3['startsWith'](_0x5857c9(0x1a0))||_0x2595a3[_0x5857c9(0x1e5)](_0x5857c9(0x200))||_0x2595a3[_0x5857c9(0x222)](/=\s*require\(/)||_0x2595a3['startsWith'](_0x5857c9(0x1ea))||_0x2595a3[_0x5857c9(0x1e5)](_0x5857c9(0x215))||_0x2595a3[_0x5857c9(0x1e5)](_0x5857c9(0x1fb)))_0xf83585[_0x5857c9(0x213)](_0x2a2bd1);else{if(_0x2595a3[_0x5857c9(0x222)](/^(export\s+)?(async\s+)?function\s+/)||_0x2595a3['match'](/^(export\s+)?(default\s+)?class\s+/)||_0x2595a3[_0x5857c9(0x222)](/^(export\s+)?(type|interface|enum)\s+/)||_0x2595a3[_0x5857c9(0x222)](/^(async\s+)?def\s+/)||_0x2595a3[_0x5857c9(0x222)](/^func\s+/)||_0x2595a3[_0x5857c9(0x222)](/^type\s+\w+\s+(struct|interface)/)||_0x2595a3[_0x5857c9(0x222)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x2595a3[_0x5857c9(0x222)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x2595a3[_0x5857c9(0x222)](/^(public|private|protected|static)\s+/))_0xf83585[_0x5857c9(0x213)](_0x2a2bd1);else{if(_0x2595a3['startsWith'](_0x5857c9(0x1f7))&&!_0x2595a3[_0x5857c9(0x1eb)]('=>')&&_0x2595a3[_0x5857c9(0x1f0)]<0x78)_0xf83585[_0x5857c9(0x213)](_0x2a2bd1);else _0x2595a3[_0x5857c9(0x1e5)]('@')&&!_0x2595a3[_0x5857c9(0x1e5)](_0x5857c9(0x1cd))&&!_0x2595a3[_0x5857c9(0x1e5)](_0x5857c9(0x221))&&_0xf83585[_0x5857c9(0x213)](_0x2a2bd1);}}}_0xf83585[_0x5857c9(0x213)](''),_0xf83585['push']('('+_0x2c3e57[_0x5857c9(0x1f0)]+_0x5857c9(0x214)+(_0xf83585[_0x5857c9(0x1f0)]-0x2)+_0x5857c9(0x21f));const _0x3e4e49=_0xf83585[_0x5857c9(0x21c)]('\x0a');if(_0x3e4e49[_0x5857c9(0x1f0)]<_0x5cdd75[_0x5857c9(0x1f0)])return _0x3e4e49;}}}}catch{}let _0x5873fd=(0x0,generic_1[_0x5857c9(0x21a)])(_0x5cdd75);if(_0x542ea1){const _0x356957=path['extname'](_0x542ea1)['toLowerCase']();_0x5873fd=(0x0,generic_1[_0x5857c9(0x1b2)])(_0x5873fd,_0x356957);}const _0x32fec0=_0x5873fd[_0x5857c9(0x199)]('\x0a');if(_0x32fec0[_0x5857c9(0x1f0)]<=0x64)return _0x5873fd;const _0x48ae23=[];return _0x48ae23[_0x5857c9(0x213)](..._0x32fec0[_0x5857c9(0x1da)](0x0,0x32)),_0x48ae23[_0x5857c9(0x213)](_0x5857c9(0x1f8)+(_0x32fec0[_0x5857c9(0x1f0)]-0x50)+'\x20lines\x20truncated]\x20...\x0a'),_0x48ae23['push'](..._0x32fec0['slice'](-0x1e)),_0x48ae23[_0x5857c9(0x213)]('\x0a('+_0x32fec0[_0x5857c9(0x1f0)]+_0x5857c9(0x1d4)),_0x48ae23[_0x5857c9(0x21c)]('\x0a');}function filterGrep(_0x34e3f1){const _0x5692b9=a0_0x348bf5,_0x35a697=_0x34e3f1[_0x5692b9(0x199)]('\x0a')['filter'](_0x405174=>_0x405174[_0x5692b9(0x1ab)]()[_0x5692b9(0x1f0)]>0x0);if(_0x35a697['length']===0x0)return _0x5692b9(0x1a5);if(_0x35a697[_0x5692b9(0x1f0)]<=0x32)return _0x34e3f1[_0x5692b9(0x1ab)]();const _0x47208f={},_0x246864=[];for(const _0xaec369 of _0x35a697){const _0x2cea7e=_0xaec369[_0x5692b9(0x217)](':');if(_0x2cea7e>0x0&&_0x2cea7e<0xc8){const _0x57a769=_0xaec369['substring'](0x0,_0x2cea7e);if(_0x57a769[_0x5692b9(0x1eb)]('/')||_0x57a769[_0x5692b9(0x1eb)]('\x5c')||_0x57a769[_0x5692b9(0x1eb)]('.')){if(!_0x47208f[_0x57a769])_0x47208f[_0x57a769]=[];_0x47208f[_0x57a769][_0x5692b9(0x213)](_0xaec369['substring'](_0x2cea7e+0x1)['trim']());continue;}}_0x246864['push'](_0xaec369);}const _0x121b20=[],_0xfe4f30=Object[_0x5692b9(0x1e0)](_0x47208f);if(_0xfe4f30['length']>0x0){const _0x7f28ee=0x14,_0x3198cb=_0xfe4f30[_0x5692b9(0x1da)](0x0,_0x7f28ee);for(const _0x5e7c0b of _0x3198cb){const _0x274274=_0x47208f[_0x5e7c0b];if(_0x274274['length']<=0x3)for(const _0x3f19f0 of _0x274274){_0x121b20['push'](_0x5e7c0b+':\x20'+_0x3f19f0);}else _0x121b20[_0x5692b9(0x213)](_0x5e7c0b+':\x20'+_0x274274[0x0]),_0x121b20['push'](_0x5e7c0b+_0x5692b9(0x216)+_0x274274['length']+'\x20matches\x20in\x20this\x20file)');}_0xfe4f30[_0x5692b9(0x1f0)]>_0x7f28ee&&_0x121b20[_0x5692b9(0x213)]('...\x20+'+(_0xfe4f30['length']-_0x7f28ee)+_0x5692b9(0x1d1));}if(_0x246864['length']>0x0){const _0x12b677=0x1e;_0x121b20[_0x5692b9(0x213)](..._0x246864['slice'](0x0,_0x12b677)),_0x246864[_0x5692b9(0x1f0)]>_0x12b677&&_0x121b20[_0x5692b9(0x213)](_0x5692b9(0x1f5)+(_0x246864[_0x5692b9(0x1f0)]-_0x12b677)+'\x20more\x20matches');}const _0x5cc953=_0x35a697[_0x5692b9(0x1f0)];return _0x121b20['push']('\x0a('+_0x5cc953+'\x20matches\x20across\x20'+(_0xfe4f30['length']||'?')+'\x20files)'),_0x121b20[_0x5692b9(0x21c)]('\x0a');}function filterFind(_0x107055){const _0xd59c9=a0_0x348bf5,_0x1d1e0f=_0x107055[_0xd59c9(0x199)]('\x0a')[_0xd59c9(0x203)](_0x13c519=>_0x13c519[_0xd59c9(0x1ab)]()['length']>0x0);if(_0x1d1e0f[_0xd59c9(0x1f0)]===0x0)return'No\x20files\x20found';if(_0x1d1e0f[_0xd59c9(0x1f0)]<=0x32)return _0x107055[_0xd59c9(0x1ab)]();const _0x566d37={};for(const _0x2c28d7 of _0x1d1e0f){const _0x4e429a=path[_0xd59c9(0x1ec)](_0x2c28d7[_0xd59c9(0x1ab)]())||'.';_0x566d37[_0x4e429a]=(_0x566d37[_0x4e429a]||0x0)+0x1;}const _0x2bd376=Object[_0xd59c9(0x1be)](_0x566d37)[_0xd59c9(0x1ed)]((_0x19ebd7,_0x293312)=>_0x293312[0x1]-_0x19ebd7[0x1]),_0x290508=[_0x1d1e0f['length']+_0xd59c9(0x1fa)+_0x2bd376[_0xd59c9(0x1f0)]+_0xd59c9(0x1c0),''],_0x35f35c=0x1e;for(const [_0x5b5453,_0x7c28e5]of _0x2bd376[_0xd59c9(0x1da)](0x0,_0x35f35c)){_0x290508[_0xd59c9(0x213)]('\x20\x20'+_0x5b5453+_0xd59c9(0x1a1)+_0x7c28e5+_0xd59c9(0x1c4));}return _0x2bd376[_0xd59c9(0x1f0)]>_0x35f35c&&_0x290508[_0xd59c9(0x213)](_0xd59c9(0x1d7)+(_0x2bd376['length']-_0x35f35c)+_0xd59c9(0x1a7)),_0x290508['join']('\x0a');}
|
|
1
|
+
'use strict';const a0_0x18f993=a0_0x3d02;(function(_0xac2c50,_0x39792a){const _0xea2af1=a0_0x3d02,_0x31d6ee=_0xac2c50();while(!![]){try{const _0xe3e64f=parseInt(_0xea2af1(0x211))/0x1*(parseInt(_0xea2af1(0x1d6))/0x2)+-parseInt(_0xea2af1(0x242))/0x3*(-parseInt(_0xea2af1(0x1cb))/0x4)+parseInt(_0xea2af1(0x224))/0x5+parseInt(_0xea2af1(0x1c7))/0x6*(-parseInt(_0xea2af1(0x1e7))/0x7)+-parseInt(_0xea2af1(0x1f5))/0x8+parseInt(_0xea2af1(0x1d3))/0x9*(parseInt(_0xea2af1(0x20f))/0xa)+parseInt(_0xea2af1(0x1f8))/0xb*(-parseInt(_0xea2af1(0x1e5))/0xc);if(_0xe3e64f===_0x39792a)break;else _0x31d6ee['push'](_0x31d6ee['shift']());}catch(_0x194a51){_0x31d6ee['push'](_0x31d6ee['shift']());}}}(a0_0x1883,0x2e3c8));var __createBinding=this&&this[a0_0x18f993(0x218)]||(Object['create']?function(_0x58051d,_0x1cc304,_0x5df263,_0x31287b){const _0x3aa8bd=a0_0x18f993;if(_0x31287b===undefined)_0x31287b=_0x5df263;var _0x236102=Object[_0x3aa8bd(0x249)](_0x1cc304,_0x5df263);(!_0x236102||(_0x3aa8bd(0x212)in _0x236102?!_0x1cc304[_0x3aa8bd(0x20b)]:_0x236102[_0x3aa8bd(0x251)]||_0x236102['configurable']))&&(_0x236102={'enumerable':!![],'get':function(){return _0x1cc304[_0x5df263];}}),Object[_0x3aa8bd(0x1fd)](_0x58051d,_0x31287b,_0x236102);}:function(_0x34b70f,_0x11991b,_0x18a232,_0x5d0448){if(_0x5d0448===undefined)_0x5d0448=_0x18a232;_0x34b70f[_0x5d0448]=_0x11991b[_0x18a232];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x18f993(0x1d0)]?function(_0x260fdd,_0x430c99){const _0x14880f=a0_0x18f993;Object[_0x14880f(0x1fd)](_0x260fdd,_0x14880f(0x221),{'enumerable':!![],'value':_0x430c99});}:function(_0x8c9c39,_0x43718f){const _0x47a1b8=a0_0x18f993;_0x8c9c39[_0x47a1b8(0x221)]=_0x43718f;}),__importStar=this&&this['__importStar']||(function(){var _0x27e56a=function(_0x48490f){return _0x27e56a=Object['getOwnPropertyNames']||function(_0x5f1b82){const _0x3590f6=a0_0x3d02;var _0x3c4eee=[];for(var _0x23879f in _0x5f1b82)if(Object[_0x3590f6(0x21d)][_0x3590f6(0x235)][_0x3590f6(0x232)](_0x5f1b82,_0x23879f))_0x3c4eee[_0x3c4eee[_0x3590f6(0x207)]]=_0x23879f;return _0x3c4eee;},_0x27e56a(_0x48490f);};return function(_0x84fd2){const _0xdfb6e8=a0_0x3d02;if(_0x84fd2&&_0x84fd2[_0xdfb6e8(0x20b)])return _0x84fd2;var _0x49108e={};if(_0x84fd2!=null){for(var _0x5a0063=_0x27e56a(_0x84fd2),_0xc8cd32=0x0;_0xc8cd32<_0x5a0063[_0xdfb6e8(0x207)];_0xc8cd32++)if(_0x5a0063[_0xc8cd32]!==_0xdfb6e8(0x221))__createBinding(_0x49108e,_0x84fd2,_0x5a0063[_0xc8cd32]);}return __setModuleDefault(_0x49108e,_0x84fd2),_0x49108e;};}());function a0_0x3d02(_0x584b2d,_0x1fc69d){_0x584b2d=_0x584b2d-0x1c7;const _0x188308=a0_0x1883();let _0x3d0245=_0x188308[_0x584b2d];return _0x3d0245;}Object[a0_0x18f993(0x1fd)](exports,a0_0x18f993(0x20b),{'value':!![]}),exports[a0_0x18f993(0x1ef)]=filterLs,exports['filterTree']=filterTree,exports[a0_0x18f993(0x1d4)]=filterCat,exports[a0_0x18f993(0x248)]=filterGrep,exports[a0_0x18f993(0x239)]=filterFind;const path=__importStar(require(a0_0x18f993(0x244))),generic_1=require(a0_0x18f993(0x1fb)),tracker_1=require(a0_0x18f993(0x229));function isFeatureEnabled(_0x44a40e){const _0x931046=a0_0x18f993;try{const _0x1774fd=tracker_1['tracker'][_0x931046(0x1f3)](),_0x4dc1dc=_0x1774fd[_0x931046(0x204)];if(!_0x4dc1dc||_0x4dc1dc[_0x44a40e]===undefined)return!![];return _0x4dc1dc[_0x44a40e]!==![];}catch{return!![];}}const LOCK_FILES=[a0_0x18f993(0x24f),'yarn.lock',a0_0x18f993(0x243),a0_0x18f993(0x1e3),a0_0x18f993(0x1eb),a0_0x18f993(0x227),a0_0x18f993(0x1e9),a0_0x18f993(0x208),a0_0x18f993(0x217)],BINARY_EXTENSIONS=[a0_0x18f993(0x1f0),a0_0x18f993(0x1ed),a0_0x18f993(0x1cf),'.wasm',a0_0x18f993(0x1fc),a0_0x18f993(0x223),a0_0x18f993(0x24d),'.gif','.ico',a0_0x18f993(0x1d2),a0_0x18f993(0x23a),a0_0x18f993(0x246),'.pdf',a0_0x18f993(0x203),a0_0x18f993(0x1e1),a0_0x18f993(0x22a),a0_0x18f993(0x23f),a0_0x18f993(0x1c8),'.7z',a0_0x18f993(0x1f6),'.exe',a0_0x18f993(0x240),a0_0x18f993(0x1df),a0_0x18f993(0x250),'.bin',a0_0x18f993(0x1ce),'.sqlite','.db','.sqlite3',a0_0x18f993(0x1ee),'.woff2',a0_0x18f993(0x24c),'.eot',a0_0x18f993(0x24e),a0_0x18f993(0x1d5),a0_0x18f993(0x202),'.wav',a0_0x18f993(0x205),'.mov','.webm','.pyc',a0_0x18f993(0x256),a0_0x18f993(0x201),'.o','.obj'];function extractFilename(_0x503b9e){const _0x324c0e=a0_0x18f993,_0x128ac9=_0x503b9e[_0x324c0e(0x254)]()[_0x324c0e(0x1dc)](/\s+/);for(let _0x49a398=0x1;_0x49a398<_0x128ac9[_0x324c0e(0x207)];_0x49a398++){if(!_0x128ac9[_0x49a398][_0x324c0e(0x1fa)]('-'))return _0x128ac9[_0x49a398];}return null;}function filterLockFile(_0xac467d,_0x5f0c72){const _0x2f1a63=a0_0x18f993;try{const _0x511260=path['basename'](_0x5f0c72)[_0x2f1a63(0x1ca)]();if(!LOCK_FILES[_0x2f1a63(0x1cc)](_0x3ad5f4=>_0x511260===_0x3ad5f4[_0x2f1a63(0x1ca)]()))return null;const _0x1f22d8=_0xac467d[_0x2f1a63(0x207)];let _0x21abde=0x0;if(_0x511260===_0x2f1a63(0x24f))try{const _0x5e97b5=JSON['parse'](_0xac467d);_0x21abde=Object[_0x2f1a63(0x1e0)](_0x5e97b5[_0x2f1a63(0x1dd)]||_0x5e97b5['dependencies']||{})[_0x2f1a63(0x207)];}catch{_0x21abde=(_0xac467d[_0x2f1a63(0x252)](/"resolved":/g)||[])[_0x2f1a63(0x207)];}else{if(_0x511260===_0x2f1a63(0x228))_0x21abde=(_0xac467d['match'](/^"?[^#\s][^:]*:$/gm)||[])['length'];else{if(_0x511260===_0x2f1a63(0x237)||_0x511260===_0x2f1a63(0x227))_0x21abde=(_0xac467d[_0x2f1a63(0x252)](/\[\[package\]\]/g)||[])[_0x2f1a63(0x207)];else{if(_0x511260===_0x2f1a63(0x1eb))_0x21abde=Math[_0x2f1a63(0x23b)](_0xac467d[_0x2f1a63(0x1dc)]('\x0a')[_0x2f1a63(0x255)](_0x261eb7=>_0x261eb7[_0x2f1a63(0x254)]())[_0x2f1a63(0x207)]/0x2);else{if(_0x511260==='composer.lock')try{_0x21abde=JSON[_0x2f1a63(0x200)](_0xac467d)[_0x2f1a63(0x1dd)]?.['length']||0x0;}catch{}else _0x511260===_0x2f1a63(0x243)?_0x21abde=(_0xac467d['match'](/^\s{2}['"@a-z]/gm)||[])['length']:_0x21abde=_0xac467d[_0x2f1a63(0x1dc)]('\x0a')[_0x2f1a63(0x255)](_0x1ce0f6=>_0x1ce0f6[_0x2f1a63(0x254)]())[_0x2f1a63(0x207)];}}}}return _0x2f1a63(0x258)+path[_0x2f1a63(0x21e)](_0x5f0c72)+':\x20'+_0x21abde+_0x2f1a63(0x23c)+_0x1f22d8[_0x2f1a63(0x206)]()+_0x2f1a63(0x214);}catch{return null;}}function filterBinaryOrMinified(_0x4dcdd2,_0x1edb80){const _0x34e692=a0_0x18f993;try{if(_0x1edb80){const _0x3ecaec=_0x1edb80[_0x34e692(0x1ca)]();for(const _0x5c0722 of BINARY_EXTENSIONS){if(_0x3ecaec[_0x34e692(0x20a)](_0x5c0722))return _0x34e692(0x1c9)+path['basename'](_0x1edb80)+',\x20'+_0x4dcdd2[_0x34e692(0x207)][_0x34e692(0x206)]()+_0x34e692(0x1f7)+_0x5c0722+_0x34e692(0x23e);}}const _0x2ddecd=_0x4dcdd2[_0x34e692(0x209)](0x0,0x3e8);let _0x1292d8=0x0;for(let _0x1bf81a=0x0;_0x1bf81a<_0x2ddecd['length'];_0x1bf81a++){if(_0x2ddecd[_0x34e692(0x21c)](_0x1bf81a)===0x0)_0x1292d8++;}if(_0x1292d8>0x0)return _0x34e692(0x1db)+_0x4dcdd2[_0x34e692(0x207)][_0x34e692(0x206)]()+_0x34e692(0x1d7);let _0x17690=0x0;for(let _0x47ea26=0x0;_0x47ea26<_0x2ddecd[_0x34e692(0x207)];_0x47ea26++){const _0x5083ed=_0x2ddecd[_0x34e692(0x21c)](_0x47ea26);if(_0x5083ed<0x20&&_0x5083ed!==0xa&&_0x5083ed!==0xd&&_0x5083ed!==0x9)_0x17690++;}if(_0x2ddecd[_0x34e692(0x207)]>0x64&&_0x17690>_0x2ddecd[_0x34e692(0x207)]*0.1)return _0x34e692(0x1db)+_0x4dcdd2['length'][_0x34e692(0x206)]()+_0x34e692(0x20d);const _0x252c70=_0x4dcdd2[_0x34e692(0x1dc)]('\x0a');if(_0x252c70['length']<=0x3&&_0x4dcdd2[_0x34e692(0x207)]>0x1388)return _0x34e692(0x234)+_0x4dcdd2[_0x34e692(0x207)][_0x34e692(0x206)]()+_0x34e692(0x210)+_0x252c70['length']+'\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)';return null;}catch{return null;}}function filterJsonMinify(_0x2995bc){const _0x59b61c=a0_0x18f993;try{const _0x505a4d=_0x2995bc[_0x59b61c(0x254)]();if(!_0x505a4d[_0x59b61c(0x1fa)]('{')&&!_0x505a4d['startsWith']('['))return null;const _0x1b1a99=_0x505a4d[_0x59b61c(0x1dc)]('\x0a');if(_0x1b1a99[_0x59b61c(0x207)]<=0x14)return null;const _0x548cb2=JSON['parse'](_0x505a4d),_0xe72c59=JSON[_0x59b61c(0x1cd)](_0x548cb2);if(_0xe72c59['length']<_0x505a4d[_0x59b61c(0x207)])return _0xe72c59;return null;}catch{return null;}}function filterLs(_0x307c4d){const _0x29898a=a0_0x18f993,_0x44c377=_0x307c4d[_0x29898a(0x1dc)]('\x0a')[_0x29898a(0x255)](_0x23e58d=>_0x23e58d['trim']()[_0x29898a(0x207)]>0x0);if(_0x44c377[_0x29898a(0x207)]===0x0)return _0x29898a(0x1f4);if(_0x44c377[_0x29898a(0x207)]<=0x1e)return _0x307c4d[_0x29898a(0x254)]();const _0x18e9e1=[],_0x11863f=[];for(const _0x4e34e4 of _0x44c377){const _0x5dc4e0=_0x4e34e4[_0x29898a(0x254)]();if(_0x5dc4e0['startsWith'](_0x29898a(0x257))||_0x5dc4e0[_0x29898a(0x1fa)]('d')&&_0x5dc4e0[_0x29898a(0x24a)]('..'))continue;_0x5dc4e0[_0x29898a(0x20a)]('/')||_0x5dc4e0[_0x29898a(0x1fa)]('d')&&_0x5dc4e0[_0x29898a(0x24a)]('\x20')?_0x18e9e1[_0x29898a(0x24b)](_0x5dc4e0):_0x11863f[_0x29898a(0x24b)](_0x5dc4e0);}const _0x113b5e=[];return _0x18e9e1['length']>0x0&&(_0x18e9e1['length']<=0xf?_0x113b5e[_0x29898a(0x24b)](..._0x18e9e1):(_0x113b5e[_0x29898a(0x24b)](..._0x18e9e1['slice'](0x0,0xa)),_0x113b5e[_0x29898a(0x24b)](_0x29898a(0x20c)+(_0x18e9e1[_0x29898a(0x207)]-0xa)+_0x29898a(0x231)))),_0x11863f[_0x29898a(0x207)]>0x0&&(_0x11863f['length']<=0x14?_0x113b5e[_0x29898a(0x24b)](..._0x11863f):(_0x113b5e[_0x29898a(0x24b)](..._0x11863f[_0x29898a(0x230)](0x0,0xf)),_0x113b5e[_0x29898a(0x24b)](_0x29898a(0x20c)+(_0x11863f['length']-0xf)+_0x29898a(0x236)))),_0x113b5e[_0x29898a(0x24b)]('\x0a('+_0x18e9e1[_0x29898a(0x207)]+'\x20directories,\x20'+_0x11863f['length']+_0x29898a(0x253)),_0x113b5e[_0x29898a(0x22d)]('\x0a');}function a0_0x1883(){const _0x4e143d=['../tracker','.tgz','smartCrushJson','\x0a...\x20(','join','\x20directories','.rs','slice','\x20more\x20directories','call','[code\x20skeleton]\x20','[minified\x20file]\x20','hasOwnProperty','\x20more\x20files','cargo.lock','dirname','filterFind','.webp','floor','\x20dependencies,\x20','/\x20(','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','.gz','.dll','.tsx','531yDVdDo','pnpm-lock.yaml','path','extname','.svg','\x20files\x20found\x20across\x20','filterGrep','getOwnPropertyDescriptor','includes','push','.ttf','.jpeg','.otf','package-lock.json','.dylib','writable','match','\x20files)','trim','filter','.pyo','total\x20','[lock\x20file]\x20','210708RAwIfE','.bz2','[binary/minified\x20file]\x20','toLowerCase','4612jHVaDs','some','stringify','.dat','.map','create','.cs','.bmp','9WtGINA','filterCat','.mp3','4SZMGuZ','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','export\x20','.ts','from\x20','[binary\x20file]\x20','split','packages','\x0a...\x20[','.so','keys','.tar.gz','skeleton','Cargo.lock','\x20lines\x20total)','7044084IKHmJc','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','7lMRlEK','\x20matches\x20across\x20','composer.lock','\x20\x20...\x20+','go.sum','.go','.min.css','.woff','filterLs','.min.js','\x20directories,\x20','use\x20','getConfig','Empty\x20directory','233008DpGoiV','.rar','\x20chars,\x20type:\x20','11JVpQvs','require(','startsWith','./generic','.png','defineProperty','\x20lines\x20total,\x20','entries','parse','.class','.mp4','.zip','features_enabled','.avi','toLocaleString','length','Gemfile.lock','substring','endsWith','__esModule','...\x20+','\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)','.js','1906490jlyxIS','\x20chars\x20across\x20','167164CLEPQQ','get','binary','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','.py','@return','bun.lockb','__createBinding','lock','#include\x20','\x20lines\x20truncated]\x20...\x0a','charCodeAt','prototype','basename','\x20matches\x20in\x20this\x20file)','.swift','default','import\x20','.jpg','557885dbjdlD','.jsx','indexOf','poetry.lock','yarn.lock'];a0_0x1883=function(){return _0x4e143d;};return a0_0x1883();}function filterTree(_0x7278e4){const _0xb1bdc7=a0_0x18f993,_0x11bb60=_0x7278e4[_0xb1bdc7(0x1dc)]('\x0a');if(_0x11bb60[_0xb1bdc7(0x207)]<=0x32)return _0x7278e4[_0xb1bdc7(0x254)]();const _0x27172f=[];let _0x230562=0x0,_0x287e9b=0x0,_0x11c963=0x0;for(const _0x5cc934 of _0x11bb60){const _0x503e9a=_0x5cc934['match'](/(\d+)\s+director/),_0x2df5de=_0x5cc934[_0xb1bdc7(0x252)](/(\d+)\s+file/);if(_0x503e9a)_0x11c963=parseInt(_0x503e9a[0x1]);if(_0x2df5de)_0x287e9b=parseInt(_0x2df5de[0x1]);const _0x27192b=(_0x5cc934['match'](/^[│├└\s─]+/)||[''])[0x0][_0xb1bdc7(0x207)];_0x27192b<=0x4&&(_0x27172f[_0xb1bdc7(0x24b)](_0x5cc934),_0x230562++);}return _0x11bb60[_0xb1bdc7(0x207)]>_0x27172f[_0xb1bdc7(0x207)]&&_0x27172f[_0xb1bdc7(0x24b)](_0xb1bdc7(0x22c)+_0x11c963+_0xb1bdc7(0x1f1)+_0x287e9b+_0xb1bdc7(0x1e6)),_0x27172f[_0xb1bdc7(0x22d)]('\x0a');}function filterCat(_0xe35b7f,_0x5e5c27=''){const _0x42cc60=a0_0x18f993,_0x1a8e93=extractFilename(_0x5e5c27);try{if(_0x1a8e93&&isFeatureEnabled(_0x42cc60(0x219))){const _0x3c9325=filterLockFile(_0xe35b7f,_0x1a8e93);if(_0x3c9325)return _0x3c9325;}if(isFeatureEnabled(_0x42cc60(0x213))){const _0x85e2cf=filterBinaryOrMinified(_0xe35b7f,_0x1a8e93);if(_0x85e2cf)return _0x85e2cf;}if(isFeatureEnabled('json_crusher')){const _0x7535c=(0x0,generic_1[_0x42cc60(0x22b)])(_0xe35b7f);if(_0x7535c)return _0x7535c;}const _0x31b87c=filterJsonMinify(_0xe35b7f);if(_0x31b87c)return _0x31b87c;if(_0x1a8e93&&isFeatureEnabled(_0x42cc60(0x1e2))){const _0x3acf24=path[_0x42cc60(0x245)](_0x1a8e93)[_0x42cc60(0x1ca)](),_0x797f87=[_0x42cc60(0x1d9),_0x42cc60(0x20e),_0x42cc60(0x241),_0x42cc60(0x225),_0x42cc60(0x215),_0x42cc60(0x1ec),_0x42cc60(0x22f),'.java','.c','.cpp',_0x42cc60(0x1d1),'.rb',_0x42cc60(0x220),'.kt'];if(_0x797f87[_0x42cc60(0x24a)](_0x3acf24)){const _0xd92e73=_0xe35b7f[_0x42cc60(0x1dc)]('\x0a');if(_0xd92e73[_0x42cc60(0x207)]>0x64){const _0x2242d3=[];_0x2242d3[_0x42cc60(0x24b)](_0x42cc60(0x233)+path[_0x42cc60(0x21e)](_0x1a8e93)+'\x20('+_0xd92e73[_0x42cc60(0x207)]+'\x20lines)'),_0x2242d3['push']('');for(const _0x21d4d0 of _0xd92e73){const _0x2e0d9e=_0x21d4d0[_0x42cc60(0x254)]();if(_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x222))||_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x1da))||_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x1f9))||_0x2e0d9e['match'](/=\s*require\(/)||_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x21a))||_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x1f2))||_0x2e0d9e[_0x42cc60(0x1fa)]('package\x20'))_0x2242d3['push'](_0x21d4d0);else{if(_0x2e0d9e[_0x42cc60(0x252)](/^(export\s+)?(async\s+)?function\s+/)||_0x2e0d9e[_0x42cc60(0x252)](/^(export\s+)?(default\s+)?class\s+/)||_0x2e0d9e['match'](/^(export\s+)?(type|interface|enum)\s+/)||_0x2e0d9e[_0x42cc60(0x252)](/^(async\s+)?def\s+/)||_0x2e0d9e['match'](/^func\s+/)||_0x2e0d9e[_0x42cc60(0x252)](/^type\s+\w+\s+(struct|interface)/)||_0x2e0d9e[_0x42cc60(0x252)](/^(pub\s+)?(async\s+)?fn\s+/)||_0x2e0d9e[_0x42cc60(0x252)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x2e0d9e['match'](/^(public|private|protected|static)\s+/))_0x2242d3['push'](_0x21d4d0);else{if(_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x1d8))&&!_0x2e0d9e[_0x42cc60(0x24a)]('=>')&&_0x2e0d9e['length']<0x78)_0x2242d3[_0x42cc60(0x24b)](_0x21d4d0);else _0x2e0d9e['startsWith']('@')&&!_0x2e0d9e[_0x42cc60(0x1fa)]('@param')&&!_0x2e0d9e[_0x42cc60(0x1fa)](_0x42cc60(0x216))&&_0x2242d3[_0x42cc60(0x24b)](_0x21d4d0);}}}_0x2242d3['push'](''),_0x2242d3[_0x42cc60(0x24b)]('('+_0xd92e73[_0x42cc60(0x207)]+_0x42cc60(0x1fe)+(_0x2242d3[_0x42cc60(0x207)]-0x2)+'\x20structural\x20lines\x20shown)');const _0x2868a4=_0x2242d3['join']('\x0a');if(_0x2868a4[_0x42cc60(0x207)]<_0xe35b7f[_0x42cc60(0x207)])return _0x2868a4;}}}}catch{}let _0x1acbdb=(0x0,generic_1['collapseWhitespace'])(_0xe35b7f);if(_0x1a8e93){const _0x587470=path[_0x42cc60(0x245)](_0x1a8e93)['toLowerCase']();_0x1acbdb=(0x0,generic_1['stripComments'])(_0x1acbdb,_0x587470);}const _0x55d7b8=_0x1acbdb[_0x42cc60(0x1dc)]('\x0a');if(_0x55d7b8['length']<=0x64)return _0x1acbdb;const _0x1b60ad=[];return _0x1b60ad[_0x42cc60(0x24b)](..._0x55d7b8['slice'](0x0,0x32)),_0x1b60ad[_0x42cc60(0x24b)](_0x42cc60(0x1de)+(_0x55d7b8[_0x42cc60(0x207)]-0x50)+_0x42cc60(0x21b)),_0x1b60ad[_0x42cc60(0x24b)](..._0x55d7b8['slice'](-0x1e)),_0x1b60ad[_0x42cc60(0x24b)]('\x0a('+_0x55d7b8[_0x42cc60(0x207)]+_0x42cc60(0x1e4)),_0x1b60ad[_0x42cc60(0x22d)]('\x0a');}function filterGrep(_0x2e5d01){const _0x1c9797=a0_0x18f993,_0x50b7d7=_0x2e5d01[_0x1c9797(0x1dc)]('\x0a')['filter'](_0x564fd4=>_0x564fd4['trim']()[_0x1c9797(0x207)]>0x0);if(_0x50b7d7[_0x1c9797(0x207)]===0x0)return'No\x20matches\x20found';if(_0x50b7d7['length']<=0x32)return _0x2e5d01[_0x1c9797(0x254)]();const _0x491679={},_0x25d407=[];for(const _0x8bb421 of _0x50b7d7){const _0x57e6cd=_0x8bb421[_0x1c9797(0x226)](':');if(_0x57e6cd>0x0&&_0x57e6cd<0xc8){const _0x23d96f=_0x8bb421['substring'](0x0,_0x57e6cd);if(_0x23d96f[_0x1c9797(0x24a)]('/')||_0x23d96f[_0x1c9797(0x24a)]('\x5c')||_0x23d96f[_0x1c9797(0x24a)]('.')){if(!_0x491679[_0x23d96f])_0x491679[_0x23d96f]=[];_0x491679[_0x23d96f][_0x1c9797(0x24b)](_0x8bb421[_0x1c9797(0x209)](_0x57e6cd+0x1)[_0x1c9797(0x254)]());continue;}}_0x25d407[_0x1c9797(0x24b)](_0x8bb421);}const _0x1c3bfb=[],_0x55a91e=Object[_0x1c9797(0x1e0)](_0x491679);if(_0x55a91e[_0x1c9797(0x207)]>0x0){const _0x2c46fe=0x14,_0x1b0d64=_0x55a91e[_0x1c9797(0x230)](0x0,_0x2c46fe);for(const _0x4e95a4 of _0x1b0d64){const _0x1a0962=_0x491679[_0x4e95a4];if(_0x1a0962[_0x1c9797(0x207)]<=0x3)for(const _0x5a61ef of _0x1a0962){_0x1c3bfb[_0x1c9797(0x24b)](_0x4e95a4+':\x20'+_0x5a61ef);}else _0x1c3bfb[_0x1c9797(0x24b)](_0x4e95a4+':\x20'+_0x1a0962[0x0]),_0x1c3bfb[_0x1c9797(0x24b)](_0x4e95a4+':\x20...\x20('+_0x1a0962[_0x1c9797(0x207)]+_0x1c9797(0x21f));}_0x55a91e[_0x1c9797(0x207)]>_0x2c46fe&&_0x1c3bfb['push']('...\x20+'+(_0x55a91e[_0x1c9797(0x207)]-_0x2c46fe)+'\x20more\x20files\x20with\x20matches');}if(_0x25d407[_0x1c9797(0x207)]>0x0){const _0x2361db=0x1e;_0x1c3bfb[_0x1c9797(0x24b)](..._0x25d407[_0x1c9797(0x230)](0x0,_0x2361db)),_0x25d407['length']>_0x2361db&&_0x1c3bfb[_0x1c9797(0x24b)]('...\x20+'+(_0x25d407[_0x1c9797(0x207)]-_0x2361db)+'\x20more\x20matches');}const _0x58f1e9=_0x50b7d7[_0x1c9797(0x207)];return _0x1c3bfb[_0x1c9797(0x24b)]('\x0a('+_0x58f1e9+_0x1c9797(0x1e8)+(_0x55a91e[_0x1c9797(0x207)]||'?')+_0x1c9797(0x253)),_0x1c3bfb['join']('\x0a');}function filterFind(_0x3e01fe){const _0x22b87d=a0_0x18f993,_0x40d2f4=_0x3e01fe['split']('\x0a')[_0x22b87d(0x255)](_0x585a95=>_0x585a95[_0x22b87d(0x254)]()[_0x22b87d(0x207)]>0x0);if(_0x40d2f4[_0x22b87d(0x207)]===0x0)return'No\x20files\x20found';if(_0x40d2f4[_0x22b87d(0x207)]<=0x32)return _0x3e01fe[_0x22b87d(0x254)]();const _0x630e3b={};for(const _0x42c0cb of _0x40d2f4){const _0x34ae7d=path[_0x22b87d(0x238)](_0x42c0cb[_0x22b87d(0x254)]())||'.';_0x630e3b[_0x34ae7d]=(_0x630e3b[_0x34ae7d]||0x0)+0x1;}const _0x5e2916=Object[_0x22b87d(0x1ff)](_0x630e3b)['sort']((_0x4022d2,_0x378cfd)=>_0x378cfd[0x1]-_0x4022d2[0x1]),_0x4a3782=[_0x40d2f4[_0x22b87d(0x207)]+_0x22b87d(0x247)+_0x5e2916[_0x22b87d(0x207)]+_0x22b87d(0x22e),''],_0x54f109=0x1e;for(const [_0x49048c,_0xad10ce]of _0x5e2916[_0x22b87d(0x230)](0x0,_0x54f109)){_0x4a3782[_0x22b87d(0x24b)]('\x20\x20'+_0x49048c+_0x22b87d(0x23d)+_0xad10ce+_0x22b87d(0x253));}return _0x5e2916[_0x22b87d(0x207)]>_0x54f109&&_0x4a3782[_0x22b87d(0x24b)](_0x22b87d(0x1ea)+(_0x5e2916[_0x22b87d(0x207)]-_0x54f109)+_0x22b87d(0x231)),_0x4a3782[_0x22b87d(0x22d)]('\x0a');}
|
package/hooks/claude-hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var a0_0x3479f1=a0_0x5a07;(function(_0x1f4917,_0x1751ab){var _0x13b1fb=a0_0x5a07,_0x161237=_0x1f4917();while(!![]){try{var _0x437bb6=-parseInt(_0x13b1fb(0x11e))/0x1*(parseInt(_0x13b1fb(0x130))/0x2)+parseInt(_0x13b1fb(0x123))/0x3+parseInt(_0x13b1fb(0x121))/0x4+parseInt(_0x13b1fb(0x126))/0x5*(parseInt(_0x13b1fb(0x115))/0x6)+parseInt(_0x13b1fb(0x117))/0x7+-parseInt(_0x13b1fb(0x120))/0x8+-parseInt(_0x13b1fb(0x11c))/0x9*(parseInt(_0x13b1fb(0x112))/0xa);if(_0x437bb6===_0x1751ab)break;else _0x161237['push'](_0x161237['shift']());}catch(_0x413e03){_0x161237['push'](_0x161237['shift']());}}}(a0_0x1624,0x5add4));var __createBinding=this&&this[a0_0x3479f1(0x114)]||(Object[a0_0x3479f1(0x11d)]?function(_0x5c4fbc,_0x5aab44,_0x4a1423,_0x466dff){var _0x153bf8=a0_0x3479f1;if(_0x466dff===undefined)_0x466dff=_0x4a1423;var _0x4acefd=Object['getOwnPropertyDescriptor'](_0x5aab44,_0x4a1423);(!_0x4acefd||('get'in _0x4acefd?!_0x5aab44[_0x153bf8(0x125)]:_0x4acefd[_0x153bf8(0x11a)]||_0x4acefd[_0x153bf8(0x119)]))&&(_0x4acefd={'enumerable':!![],'get':function(){return _0x5aab44[_0x4a1423];}}),Object[_0x153bf8(0x118)](_0x5c4fbc,_0x466dff,_0x4acefd);}:function(_0x5a3c96,_0x4fae42,_0x2b172f,_0x262f21){if(_0x262f21===undefined)_0x262f21=_0x2b172f;_0x5a3c96[_0x262f21]=_0x4fae42[_0x2b172f];}),__setModuleDefault=this&&this[a0_0x3479f1(0x12e)]||(Object[a0_0x3479f1(0x11d)]?function(_0x498505,_0x5e550d){var _0xa9f05a=a0_0x3479f1;Object[_0xa9f05a(0x118)](_0x498505,_0xa9f05a(0x113),{'enumerable':!![],'value':_0x5e550d});}:function(_0x4ea14d,_0xd8cbbb){var _0x1f04ac=a0_0x3479f1;_0x4ea14d[_0x1f04ac(0x113)]=_0xd8cbbb;}),__importStar=this&&this['__importStar']||(function(){var _0x5d1b11=function(_0x163fbf){var _0x4c6bd8=a0_0x5a07;return _0x5d1b11=Object[_0x4c6bd8(0x12f)]||function(_0x426718){var _0x38c72c=_0x4c6bd8,_0x37ffd3=[];for(var _0x52c2ad in _0x426718)if(Object[_0x38c72c(0x127)][_0x38c72c(0x11f)][_0x38c72c(0x122)](_0x426718,_0x52c2ad))_0x37ffd3[_0x37ffd3['length']]=_0x52c2ad;return _0x37ffd3;},_0x5d1b11(_0x163fbf);};return function(_0x2a7fc5){var _0x572bc9=a0_0x5a07;if(_0x2a7fc5&&_0x2a7fc5[_0x572bc9(0x125)])return _0x2a7fc5;var _0x4e96f2={};if(_0x2a7fc5!=null){for(var _0x34976d=_0x5d1b11(_0x2a7fc5),_0x31d23f=0x0;_0x31d23f<_0x34976d[_0x572bc9(0x12b)];_0x31d23f++)if(_0x34976d[_0x31d23f]!==_0x572bc9(0x113))__createBinding(_0x4e96f2,_0x2a7fc5,_0x34976d[_0x31d23f]);}return __setModuleDefault(_0x4e96f2,_0x2a7fc5),_0x4e96f2;};}());Object[a0_0x3479f1(0x118)](exports,a0_0x3479f1(0x125),{'value':!![]}),exports[a0_0x3479f1(0x12a)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3479f1(0x129))),os=__importStar(require('os'));function a0_0x5a07(_0xa1cc00,_0x38799b){_0xa1cc00=_0xa1cc00-0x111;var _0x1624db=a0_0x1624();var _0x5a075f=_0x1624db[_0xa1cc00];return _0x5a075f;}function a0_0x1624(){var _0x4d4626=['240txmSUZ','prototype','mkdirSync','path','installClaudeHooks','length','//\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','join','__setModuleDefault','getOwnPropertyNames','30hRGaeK','.claude','10gWJzEp','default','__createBinding','51924DEtpKr','existsSync','2970562mZNIlx','defineProperty','configurable','writable','homedir','1745433lpxhNg','create','12484cLwTyj','hasOwnProperty','5240032XaxdiN','591588ZwuKHR','call','1262178CHnIZW','post_tool_use.js','__esModule'];a0_0x1624=function(){return _0x4d4626;};return a0_0x1624();}function installClaudeHooks(){var _0x4b4731=a0_0x3479f1;try{const _0x561393=path[_0x4b4731(0x12d)](os[_0x4b4731(0x11b)](),_0x4b4731(0x111),'hooks');!fs[_0x4b4731(0x116)](_0x561393)&&fs[_0x4b4731(0x128)](_0x561393,{'recursive':!![]});const _0x211129=path['join'](_0x561393,_0x4b4731(0x124)),_0x4d0002=_0x4b4731(0x12c);fs['writeFileSync'](_0x211129,_0x4d0002,'utf8');}catch(_0xfa3c){}}
|
|
1
|
+
'use strict';var a0_0x3dca61=a0_0x4ba1;(function(_0x1a548,_0x2d466a){var _0x189961=a0_0x4ba1,_0x33abed=_0x1a548();while(!![]){try{var _0x66bca7=-parseInt(_0x189961(0x197))/0x1+-parseInt(_0x189961(0x180))/0x2*(parseInt(_0x189961(0x187))/0x3)+-parseInt(_0x189961(0x192))/0x4+parseInt(_0x189961(0x189))/0x5*(parseInt(_0x189961(0x185))/0x6)+parseInt(_0x189961(0x17b))/0x7+-parseInt(_0x189961(0x198))/0x8*(parseInt(_0x189961(0x18d))/0x9)+parseInt(_0x189961(0x17c))/0xa*(parseInt(_0x189961(0x17d))/0xb);if(_0x66bca7===_0x2d466a)break;else _0x33abed['push'](_0x33abed['shift']());}catch(_0x304a56){_0x33abed['push'](_0x33abed['shift']());}}}(a0_0x2a51,0xcc25d));var __createBinding=this&&this[a0_0x3dca61(0x195)]||(Object[a0_0x3dca61(0x17f)]?function(_0x453359,_0x2e87c7,_0x271901,_0x4c0675){var _0x1f3e47=a0_0x3dca61;if(_0x4c0675===undefined)_0x4c0675=_0x271901;var _0x503c43=Object[_0x1f3e47(0x193)](_0x2e87c7,_0x271901);(!_0x503c43||(_0x1f3e47(0x17e)in _0x503c43?!_0x2e87c7[_0x1f3e47(0x182)]:_0x503c43[_0x1f3e47(0x191)]||_0x503c43[_0x1f3e47(0x18c)]))&&(_0x503c43={'enumerable':!![],'get':function(){return _0x2e87c7[_0x271901];}}),Object[_0x1f3e47(0x199)](_0x453359,_0x4c0675,_0x503c43);}:function(_0x2ba3ae,_0x2832b0,_0x4b3044,_0x4b9e64){if(_0x4b9e64===undefined)_0x4b9e64=_0x4b3044;_0x2ba3ae[_0x4b9e64]=_0x2832b0[_0x4b3044];}),__setModuleDefault=this&&this[a0_0x3dca61(0x184)]||(Object[a0_0x3dca61(0x17f)]?function(_0x670e5f,_0x1f7e63){var _0x18ce1c=a0_0x3dca61;Object[_0x18ce1c(0x199)](_0x670e5f,_0x18ce1c(0x190),{'enumerable':!![],'value':_0x1f7e63});}:function(_0x10f37f,_0x3b3dec){var _0x24ac5f=a0_0x3dca61;_0x10f37f[_0x24ac5f(0x190)]=_0x3b3dec;}),__importStar=this&&this['__importStar']||(function(){var _0x4a3ccb=function(_0x1b41dc){var _0x13e5e0=a0_0x4ba1;return _0x4a3ccb=Object[_0x13e5e0(0x183)]||function(_0xddae59){var _0x485c14=_0x13e5e0,_0xfcf05a=[];for(var _0x40d1dc in _0xddae59)if(Object[_0x485c14(0x194)][_0x485c14(0x186)]['call'](_0xddae59,_0x40d1dc))_0xfcf05a[_0xfcf05a[_0x485c14(0x18a)]]=_0x40d1dc;return _0xfcf05a;},_0x4a3ccb(_0x1b41dc);};return function(_0x398dfa){var _0x495783=a0_0x4ba1;if(_0x398dfa&&_0x398dfa[_0x495783(0x182)])return _0x398dfa;var _0x5d0b24={};if(_0x398dfa!=null){for(var _0x277227=_0x4a3ccb(_0x398dfa),_0x1f9144=0x0;_0x1f9144<_0x277227[_0x495783(0x18a)];_0x1f9144++)if(_0x277227[_0x1f9144]!=='default')__createBinding(_0x5d0b24,_0x398dfa,_0x277227[_0x1f9144]);}return __setModuleDefault(_0x5d0b24,_0x398dfa),_0x5d0b24;};}());function a0_0x2a51(){var _0x81fdb9=['2790036btBncE','getOwnPropertyDescriptor','prototype','__createBinding','join','1633139rylpRk','332040afkBTg','defineProperty','path','installClaudeHooks','5733700gLUMNw','370tbzZyg','935506dlcleA','get','create','18322uUKeAx','existsSync','__esModule','getOwnPropertyNames','__setModuleDefault','12bFBEJV','hasOwnProperty','231sZnUVE','//\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','1218755GjEbbk','length','utf8','configurable','126uVvLfL','mkdirSync','hooks','default','writable'];a0_0x2a51=function(){return _0x81fdb9;};return a0_0x2a51();}Object[a0_0x3dca61(0x199)](exports,a0_0x3dca61(0x182),{'value':!![]}),exports[a0_0x3dca61(0x17a)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3dca61(0x19a))),os=__importStar(require('os'));function a0_0x4ba1(_0x366231,_0x14c9f7){_0x366231=_0x366231-0x17a;var _0x2a5129=a0_0x2a51();var _0x4ba1ed=_0x2a5129[_0x366231];return _0x4ba1ed;}function installClaudeHooks(){var _0x32309c=a0_0x3dca61;try{const _0xd70801=path[_0x32309c(0x196)](os['homedir'](),'.claude',_0x32309c(0x18f));!fs[_0x32309c(0x181)](_0xd70801)&&fs[_0x32309c(0x18e)](_0xd70801,{'recursive':!![]});const _0x3af1e9=path[_0x32309c(0x196)](_0xd70801,'post_tool_use.js'),_0x566af3=_0x32309c(0x188);fs['writeFileSync'](_0x3af1e9,_0x566af3,_0x32309c(0x18b));}catch(_0x1feacd){}}
|
package/index.html
CHANGED
|
@@ -1343,6 +1343,8 @@
|
|
|
1343
1343
|
return lastB - lastA;
|
|
1344
1344
|
});
|
|
1345
1345
|
|
|
1346
|
+
|
|
1347
|
+
|
|
1346
1348
|
tbody.innerHTML = '';
|
|
1347
1349
|
|
|
1348
1350
|
sortedGroupKeys.forEach((cmdKey, gIdx) => {
|
|
@@ -1350,21 +1352,13 @@
|
|
|
1350
1352
|
const latestLog = groupLogs[0];
|
|
1351
1353
|
const latestTime = new Date(latestLog.timestamp).toLocaleTimeString();
|
|
1352
1354
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
} else {
|
|
1361
|
-
groupLogs.forEach(l => {
|
|
1362
|
-
grpRaw += (l.estimated_raw_tokens || 0);
|
|
1363
|
-
grpComp += (l.estimated_compressed_tokens || 0);
|
|
1364
|
-
grpSaved += (l.tokens_saved || 0);
|
|
1365
|
-
grpSecrets += (l.secrets_found || 0);
|
|
1366
|
-
});
|
|
1367
|
-
}
|
|
1355
|
+
let grpRaw = 0, grpComp = 0, grpSaved = 0, grpSecrets = 0;
|
|
1356
|
+
groupLogs.forEach(l => {
|
|
1357
|
+
grpRaw += (l.estimated_raw_tokens || 0);
|
|
1358
|
+
grpComp += (l.estimated_compressed_tokens || 0);
|
|
1359
|
+
grpSaved += (l.tokens_saved || 0);
|
|
1360
|
+
grpSecrets += (l.secrets_found || 0);
|
|
1361
|
+
});
|
|
1368
1362
|
const grpSavingsPct = grpRaw > 0 ? ((grpSaved / grpRaw) * 100).toFixed(1) : '0.0';
|
|
1369
1363
|
const groupId = `grp-${gIdx}`;
|
|
1370
1364
|
const isGroupExpanded = expandedGroupKeys.has(cmdKey);
|
|
@@ -1390,7 +1384,7 @@
|
|
|
1390
1384
|
|
|
1391
1385
|
trHead.innerHTML = `
|
|
1392
1386
|
<td style="font-size:12px;color:#94A3B8;white-space:nowrap;"><span id="chev-${groupId}" style="display:inline-block;transition:transform 0.2s;margin-right:6px;font-size:10px;transform:${isGroupExpanded ? 'rotate(90deg)' : 'rotate(0deg)'}">▶</span>${latestTime}</td>
|
|
1393
|
-
<td style="font-weight: 600;color:#F1F5F9;text-transform:capitalize;">${displayCmd}
|
|
1387
|
+
<td style="font-weight: 600;color:#F1F5F9;text-transform:capitalize;">${displayCmd}${grpSecrets ? ' <span style="color:#F09595;font-size:11px;" title="' + grpSecrets + ' secrets redacted">🛡' + grpSecrets + '</span>' : ''}</td>
|
|
1394
1388
|
<td>${featureTagHtml(latestLog.features)}</td>
|
|
1395
1389
|
<td style="font-weight:500;">${grpRaw.toLocaleString()}</td>
|
|
1396
1390
|
<td style="font-weight:500;">${grpComp.toLocaleString()}</td>
|
|
@@ -1575,15 +1569,17 @@
|
|
|
1575
1569
|
const response = await fetch(`/api/stats/inspect/${id}`);
|
|
1576
1570
|
const data = await response.json();
|
|
1577
1571
|
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1572
|
+
const info = detectFilterType(data.raw, data.compressed, command);
|
|
1573
|
+
|
|
1574
|
+
const cmdLower = command ? command.toLowerCase() : '';
|
|
1575
|
+
if (cmdLower.includes('conv:') || cmdLower.includes('turn') || cmdLower.includes('message') || cmdLower.includes('chat')) {
|
|
1576
|
+
const rawTokens = Math.ceil(info.rawLen / 4) || 0;
|
|
1577
|
+
document.getElementById('diff-raw').innerHTML = `<div style="color:#F59E0B;font-size:13px;padding:24px;font-weight:600;line-height:1.6;">⚡ Live Conversation Context Active<br><span style="font-size:12px;color:#94A3B8;font-weight:400;">LLM History turn consisted of ${rawTokens.toLocaleString()} raw tokens. Without TrimPrompt, the LLM provider would have processed and billed this entire history context.</span></div>`;
|
|
1578
|
+
document.getElementById('diff-comp').innerHTML = `<div style="color:#10B981;font-size:13px;padding:24px;font-weight:600;line-height:1.6;">✅ 100% History Tokens Saved<br><span style="font-size:12px;color:#94A3B8;font-weight:400;">Active history session compaction saved 100% of these tokens. TrimPrompt kept this history cached/compressed so 0 tokens were sent to the LLM for this portion!</span></div>`;
|
|
1581
1579
|
} else {
|
|
1582
1580
|
document.getElementById('diff-raw').innerHTML = highlightRedacted(escapeHtml(data.raw), 'red');
|
|
1583
1581
|
document.getElementById('diff-comp').innerHTML = highlightRedacted(escapeHtml(data.compressed), 'green');
|
|
1584
1582
|
}
|
|
1585
|
-
|
|
1586
|
-
const info = detectFilterType(data.raw, data.compressed, command);
|
|
1587
1583
|
const bar = document.getElementById('inspect-info-bar');
|
|
1588
1584
|
let html = `<span>Raw: <strong>${info.rawLen.toLocaleString()}</strong> chars</span>`;
|
|
1589
1585
|
html += `<span>Compressed: <strong>${info.compLen.toLocaleString()}</strong> chars</span>`;
|
package/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xd3f8a9=a0_0x2c81;(function(_0x1af74f,_0x210bd8){const _0x120246=a0_0x2c81,_0x380ffa=_0x1af74f();while(!![]){try{const _0x21d6f1=parseInt(_0x120246(0x199))/0x1+-parseInt(_0x120246(0x1ca))/0x2+parseInt(_0x120246(0x18a))/0x3*(parseInt(_0x120246(0x1cc))/0x4)+parseInt(_0x120246(0x1c6))/0x5*(parseInt(_0x120246(0x1ab))/0x6)+parseInt(_0x120246(0x1ce))/0x7*(parseInt(_0x120246(0x1a7))/0x8)+-parseInt(_0x120246(0x1b8))/0x9+-parseInt(_0x120246(0x1b9))/0xa;if(_0x21d6f1===_0x210bd8)break;else _0x380ffa['push'](_0x380ffa['shift']());}catch(_0x75a07f){_0x380ffa['push'](_0x380ffa['shift']());}}}(a0_0x189c,0x6ad78));function a0_0x2c81(_0x1375fb,_0x3a132e){_0x1375fb=_0x1375fb-0x184;const _0x189ce6=a0_0x189c();let _0x2c8110=_0x189ce6[_0x1375fb];return _0x2c8110;}var __createBinding=this&&this[a0_0xd3f8a9(0x19b)]||(Object[a0_0xd3f8a9(0x1bf)]?function(_0xe35d7c,_0x726884,_0x2e39a9,_0x47c656){const _0xfae9c4=a0_0xd3f8a9;if(_0x47c656===undefined)_0x47c656=_0x2e39a9;var _0x323662=Object['getOwnPropertyDescriptor'](_0x726884,_0x2e39a9);(!_0x323662||(_0xfae9c4(0x19c)in _0x323662?!_0x726884[_0xfae9c4(0x1d2)]:_0x323662[_0xfae9c4(0x1c0)]||_0x323662[_0xfae9c4(0x18e)]))&&(_0x323662={'enumerable':!![],'get':function(){return _0x726884[_0x2e39a9];}}),Object[_0xfae9c4(0x1bc)](_0xe35d7c,_0x47c656,_0x323662);}:function(_0x12c6c8,_0x168d3d,_0x4277eb,_0x5dae41){if(_0x5dae41===undefined)_0x5dae41=_0x4277eb;_0x12c6c8[_0x5dae41]=_0x168d3d[_0x4277eb];}),__setModuleDefault=this&&this[a0_0xd3f8a9(0x1a0)]||(Object[a0_0xd3f8a9(0x1bf)]?function(_0x10c406,_0x20b2d3){Object['defineProperty'](_0x10c406,'default',{'enumerable':!![],'value':_0x20b2d3});}:function(_0x9c68de,_0x334e1b){const _0xf89fb1=a0_0xd3f8a9;_0x9c68de[_0xf89fb1(0x1d0)]=_0x334e1b;}),__importStar=this&&this[a0_0xd3f8a9(0x1a3)]||(function(){var _0x298b30=function(_0x4c69ef){const _0x23f0a4=a0_0x2c81;return _0x298b30=Object[_0x23f0a4(0x196)]||function(_0x388c46){const _0x49c991=_0x23f0a4;var _0x3d5cd5=[];for(var _0x3e98c8 in _0x388c46)if(Object['prototype'][_0x49c991(0x1c8)][_0x49c991(0x1b0)](_0x388c46,_0x3e98c8))_0x3d5cd5[_0x3d5cd5['length']]=_0x3e98c8;return _0x3d5cd5;},_0x298b30(_0x4c69ef);};return function(_0x36ba6e){const _0x5eba7f=a0_0x2c81;if(_0x36ba6e&&_0x36ba6e['__esModule'])return _0x36ba6e;var _0x503ce5={};if(_0x36ba6e!=null){for(var _0xb6654b=_0x298b30(_0x36ba6e),_0x3f6dd5=0x0;_0x3f6dd5<_0xb6654b['length'];_0x3f6dd5++)if(_0xb6654b[_0x3f6dd5]!==_0x5eba7f(0x1d0))__createBinding(_0x503ce5,_0x36ba6e,_0xb6654b[_0x3f6dd5]);}return __setModuleDefault(_0x503ce5,_0x36ba6e),_0x503ce5;};}());Object[a0_0xd3f8a9(0x1bc)](exports,a0_0xd3f8a9(0x1d2),{'value':!![]}),exports[a0_0xd3f8a9(0x1c3)]=runMcpProxy;const child_process_1=require(a0_0xd3f8a9(0x1af)),readline=__importStar(require(a0_0xd3f8a9(0x1a9))),filters_1=require(a0_0xd3f8a9(0x1ae)),tracker_1=require('./tracker'),proxy_conv_1=require(a0_0xd3f8a9(0x19d)),proxy_resp_1=require(a0_0xd3f8a9(0x1a8));function runMcpProxy(_0x214191,_0x345f39){const _0x440b66=a0_0xd3f8a9,_0xf9f8bf=(0x0,child_process_1[_0x440b66(0x18b)])(_0x214191,_0x345f39,{'stdio':[_0x440b66(0x1b5),_0x440b66(0x1b5),_0x440b66(0x1a2)]}),_0x3e20fc=tracker_1[_0x440b66(0x1c9)][_0x440b66(0x185)](),_0x4de976=_0x3e20fc[_0x440b66(0x1b1)]||{},_0x2ea2da=_0x4de976[_0x440b66(0x1aa)]!==![],_0x5858c3=_0x4de976[_0x440b66(0x19e)]!==![],_0x5a5ae6=readline[_0x440b66(0x1b3)]({'input':process[_0x440b66(0x187)],'terminal':![]});_0x5a5ae6['on'](_0x440b66(0x193),_0x1d2d5f=>{const _0x48d3e2=_0x440b66;try{const _0x4f752d=JSON['parse'](_0x1d2d5f);if(_0x4f752d&&_0x4f752d[_0x48d3e2(0x1c1)]==='2.0'&&_0x4f752d[_0x48d3e2(0x1a1)]&&_0x4f752d[_0x48d3e2(0x1d3)]){const _0x44d229=_0x4f752d['params'];if(Array[_0x48d3e2(0x19a)](_0x44d229[_0x48d3e2(0x1cd)])&&_0x44d229[_0x48d3e2(0x1cd)]['length']>0x0){if(_0x2ea2da){const _0x17c88a=(0x0,proxy_conv_1[_0x48d3e2(0x184)])(_0x44d229[_0x48d3e2(0x1cd)]);(_0x17c88a['trimmedCount']>0x0||_0x17c88a[_0x48d3e2(0x1a5)]>0x0)&&(_0x44d229[_0x48d3e2(0x1cd)]=_0x17c88a[_0x48d3e2(0x1cd)],tracker_1['tracker'][_0x48d3e2(0x18d)](_0x48d3e2(0x1b6),_0x17c88a[_0x48d3e2(0x1be)]+_0x17c88a[_0x48d3e2(0x1cd)][_0x48d3e2(0x1cf)]+_0x48d3e2(0x195),_0x17c88a[_0x48d3e2(0x1cd)][_0x48d3e2(0x1cf)]+_0x48d3e2(0x191)+_0x17c88a[_0x48d3e2(0x1be)]+_0x48d3e2(0x1bd)+_0x17c88a[_0x48d3e2(0x1a5)]+_0x48d3e2(0x1a6),0x0,undefined,['conv_compress']));}if(_0x5858c3){const _0x3840a8=(0x0,proxy_resp_1[_0x48d3e2(0x1c7)])(_0x44d229[_0x48d3e2(0x1cd)],_0x44d229[_0x48d3e2(0x18f)]);if(_0x3840a8){const _0x12a402=_0x44d229[_0x48d3e2(0x18f)]||'default';_0x44d229[_0x48d3e2(0x18f)]=_0x3840a8[_0x48d3e2(0x18f)],tracker_1['tracker']['logExecution'](_0x48d3e2(0x19f),'max_tokens:\x20'+_0x12a402,'max_tokens:\x20'+_0x3840a8[_0x48d3e2(0x18f)]+'\x20('+_0x3840a8[_0x48d3e2(0x186)]+')',0x0,undefined,[_0x48d3e2(0x19e)]);}}}_0xf9f8bf[_0x48d3e2(0x187)]['write'](JSON[_0x48d3e2(0x18c)](_0x4f752d)+'\x0a');}else _0xf9f8bf[_0x48d3e2(0x187)]['write'](_0x1d2d5f+'\x0a');}catch{_0xf9f8bf[_0x48d3e2(0x187)][_0x48d3e2(0x198)](_0x1d2d5f+'\x0a');}}),_0x5a5ae6['on'](_0x440b66(0x194),()=>{const _0x347f5c=_0x440b66;try{_0xf9f8bf[_0x347f5c(0x187)][_0x347f5c(0x1c2)]();}catch{}});const _0x12dd57=readline[_0x440b66(0x1b3)]({'input':_0xf9f8bf[_0x440b66(0x192)],'terminal':![]});_0x12dd57['on'](_0x440b66(0x193),_0x3de36e=>{const _0x2e8264=_0x440b66;try{const _0x388c08=JSON[_0x2e8264(0x190)](_0x3de36e);if(_0x388c08&&_0x388c08[_0x2e8264(0x1c1)]===_0x2e8264(0x1b4)&&_0x388c08['id']!==undefined&&_0x388c08['result']&&Array[_0x2e8264(0x19a)](_0x388c08[_0x2e8264(0x197)]['content'])){let _0x498fd0=![];for(const _0xe48010 of _0x388c08['result'][_0x2e8264(0x1b7)]){if(_0xe48010[_0x2e8264(0x1cb)]===_0x2e8264(0x1ba)&&typeof _0xe48010[_0x2e8264(0x1ba)]===_0x2e8264(0x1c4)&&_0xe48010[_0x2e8264(0x1ba)][_0x2e8264(0x1ac)]()[_0x2e8264(0x1cf)]>0x0){const _0x5221c3=_0xe48010[_0x2e8264(0x1ba)],_0x4f7ed5=(0x0,filters_1[_0x2e8264(0x1c5)])(_0x2e8264(0x189),_0x5221c3,'',tracker_1[_0x2e8264(0x1c9)][_0x2e8264(0x185)]()[_0x2e8264(0x1ad)]);tracker_1['tracker'][_0x2e8264(0x18d)](_0x2e8264(0x1d1)+_0x388c08['id']+')',_0x5221c3,_0x4f7ed5,0x0),_0xe48010['text']=_0x4f7ed5,_0x498fd0=!![];}}_0x498fd0?process[_0x2e8264(0x192)][_0x2e8264(0x198)](JSON[_0x2e8264(0x18c)](_0x388c08)+'\x0a'):process['stdout'][_0x2e8264(0x198)](_0x3de36e+'\x0a');}else process[_0x2e8264(0x192)][_0x2e8264(0x198)](_0x3de36e+'\x0a');}catch{process['stdout'][_0x2e8264(0x198)](_0x3de36e+'\x0a');}}),_0xf9f8bf['on'](_0x440b66(0x194),_0x4269c4=>{const _0x4c76f2=_0x440b66;process[_0x4c76f2(0x1b2)](_0x4269c4||0x0);}),_0xf9f8bf['on'](_0x440b66(0x188),_0x5fd4a9=>{const _0x47a451=_0x440b66;console['error'](_0x47a451(0x1a4)+_0x5fd4a9[_0x47a451(0x1bb)]),process['exit'](0x1);});}function a0_0x189c(){const _0x4b386c=['./proxy-resp','readline','conv_compress','446478iKTpXG','trim','redaction_enabled','./filters','child_process','call','features_enabled','exit','createInterface','2.0','pipe','proxy:conv-compress','content','601560bzjovH','6557830FYOWcF','text','message','defineProperty','\x20trimmed,\x20~','trimmedCount','create','writable','jsonrpc','end','runMcpProxy','string','compressOutput','25FQEmRi','optimizeMaxTokens','hasOwnProperty','tracker','1296148oYVXKO','type','384TsFIcy','messages','35LuTTiI','length','default','mcp\x20tool\x20(id:\x20','__esModule','params','compressConversation','getConfig','complexity','stdin','error','mcp-tool-call','26769zOpPQu','spawn','stringify','logExecution','configurable','max_tokens','parse','\x20messages\x20(','stdout','line','close','\x20messages','getOwnPropertyNames','result','write','157293qUGvDX','isArray','__createBinding','get','./proxy-conv','resp_optimize','proxy:resp-optimize','__setModuleDefault','method','inherit','__importStar','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','savedTokens','\x20tokens\x20saved)','675768rxIskp'];a0_0x189c=function(){return _0x4b386c;};return a0_0x189c();}
|
package/package.json
CHANGED
package/proxy-conv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4bf10c=a0_0x9da2;(function(_0x160453,_0x5de88b){const _0x50fd55=a0_0x9da2,_0x3f3939=_0x160453();while(!![]){try{const _0x26e12b=-parseInt(_0x50fd55(0xb9))/0x1*(-parseInt(_0x50fd55(0xae))/0x2)+-parseInt(_0x50fd55(0xa7))/0x3+-parseInt(_0x50fd55(0xb6))/0x4*(-parseInt(_0x50fd55(0xb8))/0x5)+-parseInt(_0x50fd55(0x97))/0x6+parseInt(_0x50fd55(0xb2))/0x7+-parseInt(_0x50fd55(0xad))/0x8*(parseInt(_0x50fd55(0xc0))/0x9)+-parseInt(_0x50fd55(0xa9))/0xa*(parseInt(_0x50fd55(0x9d))/0xb);if(_0x26e12b===_0x5de88b)break;else _0x3f3939['push'](_0x3f3939['shift']());}catch(_0x2bdc13){_0x3f3939['push'](_0x3f3939['shift']());}}}(a0_0x1a87,0x4d696));Object[a0_0x4bf10c(0x9a)](exports,a0_0x4bf10c(0xa5),{'value':!![]}),exports['compressConversation']=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function estimateTokens(_0x23443b){const _0x201ae8=a0_0x4bf10c;return Math[_0x201ae8(0xa2)](_0x23443b[_0x201ae8(0xb4)]/0x4);}function a0_0x1a87(){const _0x283ab8=['292CwjgmD','object','25820gisVae','1HhsaQr','reduce','filter','sort','slice','text','originalIndex','324wxxIWc','\x20chars\x20trimmed\x20...]','2058942dMNOHc','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','push','defineProperty','string','isArray','55fyVzAo','split','join','tool_result','map','ceil','type','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','__esModule','score','1705176GsXjWw','forEach','100840fXEMVe','\x0a[...\x20','content','\x20lines\x20trimmed\x20...]','35480icgGQi','1061158izOimZ','indexOf','system','tokens','3718092jJBClA','msg','length','role'];a0_0x1a87=function(){return _0x283ab8;};return a0_0x1a87();}function a0_0x9da2(_0x544df0,_0x5943ee){_0x544df0=_0x544df0-0x97;const _0x1a877a=a0_0x1a87();let _0x9da2db=_0x1a877a[_0x544df0];return _0x9da2db;}function blockText(_0x4509a5){const _0x3b6b05=a0_0x4bf10c;if(!_0x4509a5||typeof _0x4509a5!==_0x3b6b05(0xb7))return'';if(_0x4509a5[_0x3b6b05(0xa3)]==='text'&&typeof _0x4509a5['text']==='string')return _0x4509a5[_0x3b6b05(0xbe)];if(_0x4509a5[_0x3b6b05(0xa3)]===_0x3b6b05(0xa0)){if(typeof _0x4509a5[_0x3b6b05(0xab)]===_0x3b6b05(0x9b))return _0x4509a5[_0x3b6b05(0xab)];if(Array['isArray'](_0x4509a5[_0x3b6b05(0xab)]))return _0x4509a5[_0x3b6b05(0xab)][_0x3b6b05(0xa1)](blockText)['filter'](Boolean)[_0x3b6b05(0x9f)]('\x0a');}return'';}function messageText(_0x352deb){const _0xbb2ffb=a0_0x4bf10c;if(typeof _0x352deb[_0xbb2ffb(0xab)]===_0xbb2ffb(0x9b))return _0x352deb[_0xbb2ffb(0xab)];if(Array[_0xbb2ffb(0x9c)](_0x352deb[_0xbb2ffb(0xab)]))return _0x352deb[_0xbb2ffb(0xab)][_0xbb2ffb(0xa1)](blockText)[_0xbb2ffb(0xbb)](Boolean)['join']('\x0a');return'';}function summarizeText(_0x14fdfd){const _0x49db2c=a0_0x4bf10c,_0x1ef035=estimateTokens(_0x14fdfd),_0xa4eca1=_0x14fdfd[_0x49db2c(0x9e)]('\x0a');if(_0x1ef035>0x7d0){if(_0xa4eca1[_0x49db2c(0xb4)]>0xa){const _0x58bdf3=_0xa4eca1[_0x49db2c(0xbd)](0x0,0x5)['join']('\x0a'),_0x5c240a=_0xa4eca1['slice'](-0x5)[_0x49db2c(0x9f)]('\x0a');return _0x58bdf3+_0x49db2c(0xaa)+(_0xa4eca1[_0x49db2c(0xb4)]-0xa)+_0x49db2c(0xa4)+_0x5c240a;}return _0x14fdfd['slice'](0x0,0x7d0)+(_0x49db2c(0xaa)+(_0x14fdfd['length']-0x7d0)+_0x49db2c(0x98));}if(_0x1ef035>0x1f4){if(_0xa4eca1[_0x49db2c(0xb4)]>0xa)return _0xa4eca1[_0x49db2c(0xbd)](0x0,0xa)[_0x49db2c(0x9f)]('\x0a')+(_0x49db2c(0xaa)+(_0xa4eca1[_0x49db2c(0xb4)]-0xa)+_0x49db2c(0xac));return _0x14fdfd[_0x49db2c(0xbd)](0x0,0x320)+(_0x49db2c(0xaa)+(_0x14fdfd[_0x49db2c(0xb4)]-0x320)+_0x49db2c(0xc1));}return _0x14fdfd;}function summarizeBlock(_0x59e170){const _0x3fc74d=a0_0x4bf10c;if(!_0x59e170||typeof _0x59e170!==_0x3fc74d(0xb7))return _0x59e170;if(_0x59e170[_0x3fc74d(0xa3)]===_0x3fc74d(0xbe)&&typeof _0x59e170[_0x3fc74d(0xbe)]===_0x3fc74d(0x9b))return{..._0x59e170,'text':summarizeText(_0x59e170[_0x3fc74d(0xbe)])};if(_0x59e170[_0x3fc74d(0xa3)]==='tool_result'){if(typeof _0x59e170[_0x3fc74d(0xab)]===_0x3fc74d(0x9b))return{..._0x59e170,'content':summarizeText(_0x59e170['content'])};if(Array[_0x3fc74d(0x9c)](_0x59e170['content'])){const _0x593a40=largestBlockIndex(_0x59e170[_0x3fc74d(0xab)]);if(_0x593a40>=0x0){const _0xeef179=_0x59e170[_0x3fc74d(0xab)]['map']((_0x3c9dff,_0x1d19ca)=>_0x1d19ca===_0x593a40?summarizeBlock(_0x3c9dff):_0x3c9dff);return{..._0x59e170,'content':_0xeef179};}}}return _0x59e170;}function largestBlockIndex(_0x58d2f7){const _0x131b56=a0_0x4bf10c;let _0x27dc75=-0x1,_0x1ee50f=-0x1;return _0x58d2f7[_0x131b56(0xa8)]((_0x4f3c56,_0x52dc34)=>{const _0x3c1e97=_0x131b56,_0x3b90cb=blockText(_0x4f3c56)[_0x3c1e97(0xb4)];_0x3b90cb>_0x1ee50f&&(_0x1ee50f=_0x3b90cb,_0x27dc75=_0x52dc34);}),_0x1ee50f>0x0?_0x27dc75:-0x1;}function scoreMessage(_0x11add6,_0x45af3e,_0x192dea){const _0x2298c3=a0_0x4bf10c,_0x2d377d=ROLE_WEIGHT[_0x11add6[_0x2298c3(0xb5)]]||0.4,_0x5c917f=(_0x45af3e+0x1)/_0x192dea,_0x270a04=messageText(_0x11add6),_0x51c360=estimateTokens(_0x270a04),_0x43a9f5=_0x51c360>0x7d0?0.6:_0x51c360>0x1f4?0.8:0x1;return _0x2d377d*(0.3+0.7*_0x5c917f)*_0x43a9f5;}function summarizeMessage(_0x206a6e){const _0x4deed0=a0_0x4bf10c,_0x1b33c9=estimateTokens(messageText(_0x206a6e));if(_0x1b33c9<=0x1f4)return _0x206a6e;if(typeof _0x206a6e[_0x4deed0(0xab)]==='string')return{..._0x206a6e,'content':summarizeText(_0x206a6e['content'])};if(Array[_0x4deed0(0x9c)](_0x206a6e[_0x4deed0(0xab)])){const _0x485e97=largestBlockIndex(_0x206a6e['content']);if(_0x485e97>=0x0){const _0x30c7a=_0x206a6e['content'][_0x4deed0(0xa1)]((_0x14bbee,_0xf2e3ac)=>_0xf2e3ac===_0x485e97?summarizeBlock(_0x14bbee):_0x14bbee);return{..._0x206a6e,'content':_0x30c7a};}}return _0x206a6e;}function compressConversation(_0x40d78b,_0x56830e){const _0x31b0a6=a0_0x4bf10c,_0x55751e={'messages':_0x40d78b,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x40d78b||!Array['isArray'](_0x40d78b)||_0x40d78b[_0x31b0a6(0xb4)]<=0x6)return _0x55751e;try{return _compressConversation(_0x40d78b,_0x56830e);}catch{return _0x55751e;}}function _compressConversation(_0x5f2728,_0x39342a){const _0xbc4f34=a0_0x4bf10c,_0x5f4be4=_0x39342a||0x13880,_0x18ffa0=0x4,_0x2768b3=_0x5f2728['filter'](_0x20e059=>_0x20e059[_0xbc4f34(0xb5)]===_0xbc4f34(0xb0)),_0x5e6f07=_0x5f2728[_0xbc4f34(0xbb)](_0x5c39a8=>_0x5c39a8['role']!==_0xbc4f34(0xb0)),_0x4cdb13=_0x5e6f07[_0xbc4f34(0xbd)](-_0x18ffa0),_0x19502a=_0x5e6f07[_0xbc4f34(0xbd)](0x0,-_0x18ffa0),_0x2dfc79=_0x19502a[_0xbc4f34(0xa1)]((_0x2332fc,_0x14e17d)=>({'msg':_0x2332fc,'score':scoreMessage(_0x2332fc,_0x14e17d,_0x19502a[_0xbc4f34(0xb4)]),'tokens':estimateTokens(messageText(_0x2332fc))})),_0x5ba259=_0x2dfc79[_0xbc4f34(0xba)]((_0x37977e,_0x2586cb)=>_0x37977e+_0x2586cb['tokens'],0x0),_0x466f69=_0x4cdb13[_0xbc4f34(0xba)]((_0x162703,_0x5f5aa7)=>_0x162703+estimateTokens(messageText(_0x5f5aa7)),0x0),_0x1732e5=_0x2768b3[_0xbc4f34(0xba)]((_0x22f98d,_0x29c607)=>_0x22f98d+estimateTokens(messageText(_0x29c607)),0x0),_0xde28f8=_0x5f4be4-_0x466f69-_0x1732e5;if(_0x5ba259<=_0xde28f8){let _0x1aeafa=0x0;const _0xffba50=_0x2dfc79[_0xbc4f34(0xa1)](_0x5d8d69=>{const _0x182455=_0xbc4f34;if(_0x5d8d69[_0x182455(0xb1)]>0x1f4){const _0x50cddd=summarizeMessage(_0x5d8d69[_0x182455(0xb3)]),_0x165b99=estimateTokens(messageText(_0x50cddd));if(_0x165b99<_0x5d8d69[_0x182455(0xb1)])return _0x1aeafa+=_0x5d8d69[_0x182455(0xb1)]-_0x165b99,_0x50cddd;}return _0x5d8d69[_0x182455(0xb3)];});return{'messages':[..._0x2768b3,..._0xffba50,..._0x4cdb13],'trimmedCount':0x0,'savedTokens':_0x1aeafa};}_0x2dfc79[_0xbc4f34(0xbc)]((_0x208612,_0x9e8428)=>_0x9e8428['score']-_0x208612[_0xbc4f34(0xa6)]);let _0x2208c6=0x0,_0x138130=0x0,_0x21312a=0x0;const _0x1dc544=[];for(const _0x49fd48 of _0x2dfc79){if(_0x2208c6+_0x49fd48[_0xbc4f34(0xb1)]<=_0xde28f8){if(_0x49fd48['tokens']>0x3e8){const _0x2cacfe=summarizeMessage(_0x49fd48[_0xbc4f34(0xb3)]),_0x393c7b=estimateTokens(messageText(_0x2cacfe));_0x21312a+=_0x49fd48['tokens']-_0x393c7b,_0x2208c6+=_0x393c7b,_0x1dc544['push']({'msg':_0x2cacfe,'originalIndex':_0x19502a['indexOf'](_0x49fd48['msg'])});}else _0x2208c6+=_0x49fd48['tokens'],_0x1dc544[_0xbc4f34(0x99)]({'msg':_0x49fd48['msg'],'originalIndex':_0x19502a[_0xbc4f34(0xaf)](_0x49fd48['msg'])});}else _0x138130++,_0x21312a+=_0x49fd48[_0xbc4f34(0xb1)];}_0x1dc544[_0xbc4f34(0xbc)]((_0x3cf674,_0x29339f)=>_0x3cf674['originalIndex']-_0x29339f[_0xbc4f34(0xbf)]);const _0x335344=[..._0x2768b3,..._0x1dc544['map'](_0xbd93e2=>_0xbd93e2['msg']),..._0x4cdb13];return{'messages':_0x335344,'trimmedCount':_0x138130,'savedTokens':_0x21312a};}
|
package/proxy-resp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2ec317=a0_0x5bb1;(function(_0x23d0be,_0x38f79b){const _0x6ef670=a0_0x5bb1,_0x56fd85=_0x23d0be();while(!![]){try{const _0x34822a=-parseInt(_0x6ef670(0x196))/0x1+parseInt(_0x6ef670(0x194))/0x2+parseInt(_0x6ef670(0x18e))/0x3+-parseInt(_0x6ef670(0x19c))/0x4*(parseInt(_0x6ef670(0x19d))/0x5)+parseInt(_0x6ef670(0x197))/0x6+-parseInt(_0x6ef670(0x191))/0x7+parseInt(_0x6ef670(0x18a))/0x8;if(_0x34822a===_0x38f79b)break;else _0x56fd85['push'](_0x56fd85['shift']());}catch(_0x1e0b24){_0x56fd85['push'](_0x56fd85['shift']());}}}(a0_0x4b6d,0x8083d));Object['defineProperty'](exports,a0_0x2ec317(0x198),{'value':!![]}),exports[a0_0x2ec317(0x19b)]=optimizeMaxTokens;function lastUserText(_0x24b0eb){const _0x4db88d=a0_0x2ec317;for(let _0x4d5004=_0x24b0eb['length']-0x1;_0x4d5004>=0x0;_0x4d5004--){if(_0x24b0eb[_0x4d5004][_0x4db88d(0x18f)]==='user'){const _0x32c9d7=_0x24b0eb[_0x4d5004][_0x4db88d(0x190)];if(typeof _0x32c9d7===_0x4db88d(0x199))return _0x32c9d7;if(Array['isArray'](_0x32c9d7))return _0x32c9d7[_0x4db88d(0x19e)](_0x5af104=>_0x5af104[_0x4db88d(0x188)]==='text'&&_0x5af104[_0x4db88d(0x195)])['map'](_0x5b6487=>_0x5b6487[_0x4db88d(0x195)])[_0x4db88d(0x18d)]('\x0a');}}return'';}function a0_0x5bb1(_0x1ee50d,_0x9ae1f2){_0x1ee50d=_0x1ee50d-0x188;const _0x4b6dfe=a0_0x4b6d();let _0x5bb149=_0x4b6dfe[_0x1ee50d];return _0x5bb149;}function classifyComplexity(_0x48dbf1){const _0x327e0a=a0_0x2ec317,_0x9f3d9c=_0x48dbf1['toLowerCase'](),_0x57d2bf=_0x9f3d9c[_0x327e0a(0x192)](/\s+/)[_0x327e0a(0x193)],_0x80f64c=[/^(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(_0x57d2bf<0x14&&_0x80f64c[_0x327e0a(0x19f)](_0x268871=>_0x268871[_0x327e0a(0x189)](_0x9f3d9c)))return _0x327e0a(0x19a);const _0x459e27=[/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(_0x57d2bf>0x50||_0x459e27[_0x327e0a(0x19f)](_0x368717=>_0x368717['test'](_0x9f3d9c)))return _0x327e0a(0x18b);return _0x327e0a(0x18c);}function a0_0x4b6d(){const _0x4fa1d2=['40IVSUyK','84815BAXWff','filter','some','type','test','9425112UCkUDG','complex','medium','join','166752oysvOQ','role','content','3255973xSyGBL','split','length','259834uDpYbU','text','720785JhXcjm','3109866CZSiNP','__esModule','string','simple','optimizeMaxTokens'];a0_0x4b6d=function(){return _0x4fa1d2;};return a0_0x4b6d();}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0x527bf6,_0x1382d1){const _0x148a01=a0_0x2ec317;if(!_0x527bf6||_0x527bf6[_0x148a01(0x193)]===0x0)return null;const _0x15c830=lastUserText(_0x527bf6);if(!_0x15c830)return null;const _0x33a4ef=classifyComplexity(_0x15c830),_0xb60f33=MAX_TOKENS_MAP[_0x33a4ef];if(_0x1382d1&&_0x1382d1<=_0xb60f33)return null;return{'max_tokens':_0xb60f33,'complexity':_0x33a4ef};}
|
package/redactor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x14cd89=a0_0x215d;(function(_0x19a0ad,_0x4623f9){const _0x2f6a83=a0_0x215d,_0xccddc3=_0x19a0ad();while(!![]){try{const _0x2378fa=parseInt(_0x2f6a83(0xc7))/0x1*(-parseInt(_0x2f6a83(0xb8))/0x2)+parseInt(_0x2f6a83(0xb7))/0x3*(parseInt(_0x2f6a83(0xeb))/0x4)+-parseInt(_0x2f6a83(0xb1))/0x5+-parseInt(_0x2f6a83(0xde))/0x6+-parseInt(_0x2f6a83(0xbd))/0x7*(-parseInt(_0x2f6a83(0xba))/0x8)+parseInt(_0x2f6a83(0xbe))/0x9+-parseInt(_0x2f6a83(0xe2))/0xa*(-parseInt(_0x2f6a83(0xea))/0xb);if(_0x2378fa===_0x4623f9)break;else _0xccddc3['push'](_0xccddc3['shift']());}catch(_0x477b1d){_0xccddc3['push'](_0xccddc3['shift']());}}}(a0_0x3f91,0xd8229));function a0_0x215d(_0x68afc4,_0x53c159){_0x68afc4=_0x68afc4-0xa9;const _0x3f91e1=a0_0x3f91();let _0x215dd4=_0x3f91e1[_0x68afc4];return _0x215dd4;}Object[a0_0x14cd89(0xe8)](exports,a0_0x14cd89(0xe0),{'value':!![]}),exports[a0_0x14cd89(0xe5)]=exports[a0_0x14cd89(0xb3)]=void 0x0;function a0_0x3f91(){const _0x272249=['[REDACTED_AZURE_CONNECTION]','SendGrid\x20Key','generic_credential','[REDACTED_OPENAI_KEY]','IPv4\x20Address\x20(non-local)','anthropic_key','Azure\x20Connection\x20String','replace','5970625FjzdEJ','Basic\x20Auth','Redactor','GitHub\x20Token','aws_secret','Twilio\x20Key','159vbZlyO','94baDCKL','slack_token','72088ldUwGo','replacement','Bearer\x20[REDACTED_TOKEN]','1071pspMUR','14827932EGrCFc','openai_key','OpenAI\x20API\x20Key','redact','Private\x20Key\x20Block','regex','db_connection','ip_address','Bearer\x20Token','21157xdLFnd','redactWithAudit','sendgrid_key','[REDACTED_ANTHROPIC_KEY]','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','Slack\x20Token','[REDACTED_STRIPE_KEY]','[REDACTED_SLACK_TOKEN]','Database\x20Connection\x20String','[REDACTED_JWT]','Basic\x20[REDACTED_AUTH]','github_token','Generic\x20API\x20Key/Secret/Password','Email\x20Address','loadDefaultRules','[REDACTED_PRIVATE_KEY]','email','rules','basic_auth','type','stripe_key','$1=[REDACTED_CREDENTIAL]','AWS\x20Access\x20Key','2246664BdruFd','jwt','__esModule','match','70klJFkm','aws_key','AWS\x20Secret\x20Key','redactor','[REDACTED_DB_CONNECTION]','private_key','defineProperty','length','263714HuggzM','19184SQAvrW','[REDACTED_TWILIO_KEY]'];a0_0x3f91=function(){return _0x272249;};return a0_0x3f91();}class Redactor{['rules']=[];constructor(){this['loadDefaultRules']();}[a0_0x14cd89(0xd5)](){const _0x5f03d8=a0_0x14cd89;this[_0x5f03d8(0xd8)]=[{'name':_0x5f03d8(0xdd),'type':_0x5f03d8(0xe3),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':'[REDACTED_AWS_KEY]'},{'name':_0x5f03d8(0xe4),'type':_0x5f03d8(0xb5),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':'$1=[REDACTED_AWS_SECRET]'},{'name':'GCP\x20Service\x20Account\x20Key','type':'gcp_key','regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x5f03d8(0xcb)},{'name':_0x5f03d8(0xaf),'type':'azure_conn','regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x5f03d8(0xa9)},{'name':'Anthropic\x20API\x20Key','type':_0x5f03d8(0xae),'regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x5f03d8(0xca)},{'name':_0x5f03d8(0xc0),'type':_0x5f03d8(0xbf),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x5f03d8(0xac)},{'name':_0x5f03d8(0xb4),'type':_0x5f03d8(0xd2),'regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':'[REDACTED_GITHUB_TOKEN]'},{'name':_0x5f03d8(0xcc),'type':_0x5f03d8(0xb9),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x5f03d8(0xce)},{'name':'Stripe\x20Key','type':_0x5f03d8(0xdb),'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':_0x5f03d8(0xcd)},{'name':_0x5f03d8(0xb6),'type':'twilio_key','regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x5f03d8(0xec)},{'name':_0x5f03d8(0xaa),'type':_0x5f03d8(0xc9),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':'[REDACTED_SENDGRID_KEY]'},{'name':_0x5f03d8(0xc2),'type':_0x5f03d8(0xe7),'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':_0x5f03d8(0xd6)},{'name':'JWT\x20Token','type':_0x5f03d8(0xdf),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x5f03d8(0xd0)},{'name':_0x5f03d8(0xc6),'type':'bearer','regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x5f03d8(0xbc)},{'name':_0x5f03d8(0xb2),'type':_0x5f03d8(0xd9),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x5f03d8(0xd1)},{'name':_0x5f03d8(0xcf),'type':_0x5f03d8(0xc4),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x5f03d8(0xe6)},{'name':_0x5f03d8(0xd3),'type':_0x5f03d8(0xab),'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':_0x5f03d8(0xdc)},{'name':_0x5f03d8(0xad),'type':_0x5f03d8(0xc5),'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':'[REDACTED_IP]','alert':![]},{'name':_0x5f03d8(0xd4),'type':_0x5f03d8(0xd7),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':'[REDACTED_EMAIL]','alert':![]}];}[a0_0x14cd89(0xc1)](_0x36316d){const _0x39fcfa=a0_0x14cd89;return this[_0x39fcfa(0xc8)](_0x36316d)['text'];}[a0_0x14cd89(0xc8)](_0x2b4740){const _0x22ee5f=a0_0x14cd89;let _0x196017=_0x2b4740,_0x346ee0=0x0;const _0x83d9d7=[];for(const _0x1e85d5 of this[_0x22ee5f(0xd8)]){const _0x25714a=_0x196017[_0x22ee5f(0xe1)](_0x1e85d5['regex']);_0x25714a&&_0x25714a[_0x22ee5f(0xe9)]>0x0&&(_0x1e85d5['alert']!==![]&&(_0x346ee0+=_0x25714a[_0x22ee5f(0xe9)],!_0x83d9d7['includes'](_0x1e85d5['type'])&&_0x83d9d7['push'](_0x1e85d5[_0x22ee5f(0xda)])),_0x196017=_0x196017[_0x22ee5f(0xb0)](_0x1e85d5[_0x22ee5f(0xc3)],_0x1e85d5[_0x22ee5f(0xbb)]));}return{'text':_0x196017,'secretsFound':_0x346ee0,'secretTypes':_0x83d9d7};}}exports[a0_0x14cd89(0xb3)]=Redactor,exports[a0_0x14cd89(0xe5)]=new Redactor();
|
package/seed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3878e0=a0_0x35bd;function a0_0x1762(){const _0x5985ad=['274431XeKmTC','Compilation\x20Output:\x0a','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','Step\x201/10\x20:\x20FROM\x20node:20\x0a','1470345tFoOXd','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','added\x201420\x20packages\x20in\x2014s\x0a','10957192oninVh','__esModule','4cqtsgP','test_api.py\x20PASS\x0a','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','defineProperty','docker\x20build\x20.','gpt-4o','logExecution','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','claude-3-opus','4047414ePJtoR','Optimizing\x20assets...\x0a','Test\x20suite\x20run\x20starting...\x0a','1969604wnzkBP','gemini-1-5-pro','tracker','Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a','All\x20303\x20tests\x20passed\x20in\x204.22s.','[INFO]\x20Building\x20modules...\x0a','test_auth.py\x20PASS\x0a','repeat','135455qlFsAt','1075902IsvrtM'];a0_0x1762=function(){return _0x5985ad;};return a0_0x1762();}function a0_0x35bd(_0x3c6e4d,_0x2c0113){_0x3c6e4d=_0x3c6e4d-0x1ee;const _0x1762e6=a0_0x1762();let _0x35bddf=_0x1762e6[_0x3c6e4d];return _0x35bddf;}(function(_0x45c2bc,_0x54ee33){const _0x3ce991=a0_0x35bd,_0x551b5c=_0x45c2bc();while(!![]){try{const _0x4dc890=-parseInt(_0x3ce991(0x1f6))/0x1+parseInt(_0x3ce991(0x1f5))/0x2+parseInt(_0x3ce991(0x1fa))/0x3+-parseInt(_0x3ce991(0x1ff))/0x4*(-parseInt(_0x3ce991(0x1f4))/0x5)+parseInt(_0x3ce991(0x208))/0x6+parseInt(_0x3ce991(0x20b))/0x7+-parseInt(_0x3ce991(0x1fd))/0x8;if(_0x4dc890===_0x54ee33)break;else _0x551b5c['push'](_0x551b5c['shift']());}catch(_0x3e3fa8){_0x551b5c['push'](_0x551b5c['shift']());}}}(a0_0x1762,0x599aa));Object[a0_0x3878e0(0x202)](exports,a0_0x3878e0(0x1fe),{'value':!![]});const tracker_1=require('./tracker');console['log'](a0_0x3878e0(0x1f8)),process.env.TRIMPROMPT_MODEL=a0_0x3878e0(0x207),tracker_1[a0_0x3878e0(0x1ee)][a0_0x3878e0(0x205)]('npm\x20run\x20build',a0_0x3878e0(0x1f7)+a0_0x3878e0(0x1f1)+a0_0x3878e0(0x209)+a0_0x3878e0(0x201)[a0_0x3878e0(0x1f3)](0x190),'[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)',0x0),process.env.TRIMPROMPT_MODEL=a0_0x3878e0(0x204),tracker_1['tracker'][a0_0x3878e0(0x205)]('pytest\x20tests/app',a0_0x3878e0(0x20a)+a0_0x3878e0(0x1f2)+'test_db.py\x20PASS\x0a'+a0_0x3878e0(0x200)[a0_0x3878e0(0x1f3)](0x12c)+a0_0x3878e0(0x1f0),a0_0x3878e0(0x206),0x0),process.env.TRIMPROMPT_MODEL=a0_0x3878e0(0x20c),tracker_1['tracker'][a0_0x3878e0(0x205)](a0_0x3878e0(0x203),'Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a'+a0_0x3878e0(0x1f9)+a0_0x3878e0(0x1fb)+a0_0x3878e0(0x1ef)+a0_0x3878e0(0x1fc)['repeat'](0x3)+'Successfully\x20built\x20image.','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.',0x0),console['log']('Database\x20successfully\x20seeded!');
|