trimprompt 1.0.41 → 1.0.43
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 +493 -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/mcp.js +1 -1
- package/package.json +2 -2
- package/postinstall.js +42 -0
- 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 +387 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x17d7b2=a0_0xa406;(function(_0xef21bd,_0xa5b69a){var _0x1c6bb7=a0_0xa406,_0x5395a8=_0xef21bd();while(!![]){try{var _0x340a8d=parseInt(_0x1c6bb7(0x125))/0x1+-parseInt(_0x1c6bb7(0x142))/0x2+parseInt(_0x1c6bb7(0x12f))/0x3+-parseInt(_0x1c6bb7(0x141))/0x4*(parseInt(_0x1c6bb7(0x127))/0x5)+parseInt(_0x1c6bb7(0x153))/0x6*(parseInt(_0x1c6bb7(0x135))/0x7)+-parseInt(_0x1c6bb7(0x126))/0x8+parseInt(_0x1c6bb7(0x131))/0x9*(-parseInt(_0x1c6bb7(0x140))/0xa);if(_0x340a8d===_0xa5b69a)break;else _0x5395a8['push'](_0x5395a8['shift']());}catch(_0x36eb19){_0x5395a8['push'](_0x5395a8['shift']());}}}(a0_0x3a2d,0x41723));var __createBinding=this&&this[a0_0x17d7b2(0x13b)]||(Object[a0_0x17d7b2(0x14d)]?function(_0x342701,_0x1299fc,_0x251552,_0x2dae3e){var _0x4048fa=a0_0x17d7b2;if(_0x2dae3e===undefined)_0x2dae3e=_0x251552;var _0x3c8ec1=Object[_0x4048fa(0x129)](_0x1299fc,_0x251552);(!_0x3c8ec1||(_0x4048fa(0x13a)in _0x3c8ec1?!_0x1299fc[_0x4048fa(0x137)]:_0x3c8ec1[_0x4048fa(0x128)]||_0x3c8ec1[_0x4048fa(0x152)]))&&(_0x3c8ec1={'enumerable':!![],'get':function(){return _0x1299fc[_0x251552];}}),Object[_0x4048fa(0x134)](_0x342701,_0x2dae3e,_0x3c8ec1);}:function(_0x4e9e61,_0x45068a,_0x12fc9f,_0x24a9ac){if(_0x24a9ac===undefined)_0x24a9ac=_0x12fc9f;_0x4e9e61[_0x24a9ac]=_0x45068a[_0x12fc9f];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x17d7b2(0x14d)]?function(_0x2a0df6,_0x198439){var _0x4a4011=a0_0x17d7b2;Object[_0x4a4011(0x134)](_0x2a0df6,_0x4a4011(0x12d),{'enumerable':!![],'value':_0x198439});}:function(_0xaf87dc,_0x17b8b4){_0xaf87dc['default']=_0x17b8b4;}),__importStar=this&&this[a0_0x17d7b2(0x138)]||(function(){var _0x1c48d9=function(_0x3f8d35){var _0x95113f=a0_0xa406;return _0x1c48d9=Object[_0x95113f(0x143)]||function(_0x7f3a69){var _0x8dded5=_0x95113f,_0x29b024=[];for(var _0xa739ba in _0x7f3a69)if(Object[_0x8dded5(0x13e)][_0x8dded5(0x14e)]['call'](_0x7f3a69,_0xa739ba))_0x29b024[_0x29b024[_0x8dded5(0x14f)]]=_0xa739ba;return _0x29b024;},_0x1c48d9(_0x3f8d35);};return function(_0x567497){var _0x299e95=a0_0xa406;if(_0x567497&&_0x567497['__esModule'])return _0x567497;var _0x2aa9bc={};if(_0x567497!=null){for(var _0x5caf9a=_0x1c48d9(_0x567497),_0x217497=0x0;_0x217497<_0x5caf9a['length'];_0x217497++)if(_0x5caf9a[_0x217497]!==_0x299e95(0x12d))__createBinding(_0x2aa9bc,_0x567497,_0x5caf9a[_0x217497]);}return __setModuleDefault(_0x2aa9bc,_0x567497),_0x2aa9bc;};}());Object[a0_0x17d7b2(0x134)](exports,a0_0x17d7b2(0x137),{'value':!![]}),exports[a0_0x17d7b2(0x145)]=executeCommand;function a0_0xa406(_0x3566e4,_0x437e8e){_0x3566e4=_0x3566e4-0x125;var _0x3a2dff=a0_0x3a2d();var _0xa4066b=_0x3a2dff[_0x3566e4];return _0xa4066b;}function a0_0x3a2d(){var _0x4ac064=['prototype','startsWith','10tOeOxr','4604fMVueh','505982cLTQIW','getOwnPropertyNames','stdout','executeCommand','stderr','path','toLowerCase','split','inherit','delimiter','error','create','hasOwnProperty','length','child_process','shims','configurable','6pXbOQV','489583CDVjUs','297760RqfTYs','135lkaUtI','writable','getOwnPropertyDescriptor','join','map','includes','default','filter','89676tIKzNc','message','2493981GKthXa','spawn','data','defineProperty','2428923DBGbLq','toString','__esModule','__importStar','pipe','get','__createBinding','.trimprompt','homedir'];a0_0x3a2d=function(){return _0x4ac064;};return a0_0x3a2d();}const child_process_1=require(a0_0x17d7b2(0x150)),path=__importStar(require(a0_0x17d7b2(0x147))),os=__importStar(require('os'));function executeCommand(_0x569078,_0x3f8889){return new Promise(_0x190537=>{var _0x388631=a0_0xa406;const _0x52cb91=path[_0x388631(0x12a)](os[_0x388631(0x13d)](),_0x388631(0x13c),_0x388631(0x151)),_0x2e3707=(process.env.PATH||'')[_0x388631(0x149)](path[_0x388631(0x14b)])[_0x388631(0x12e)](_0x26cfa7=>_0x26cfa7['trim']()[_0x388631(0x148)]()!==_0x52cb91[_0x388631(0x148)]())[_0x388631(0x12a)](path[_0x388631(0x14b)]),_0x29de39={...process.env,'PATH':_0x2e3707,'TRIMPROMPT_DISABLED':'1'},_0x26d6ff=_0x3f8889[_0x388631(0x12b)](_0x3299f1=>_0x3299f1[_0x388631(0x12c)]('\x20')&&!_0x3299f1[_0x388631(0x13f)]('\x22')?'\x22'+_0x3299f1+'\x22':_0x3299f1),_0x54f33e=[_0x569078,..._0x26d6ff][_0x388631(0x12a)]('\x20'),_0x138e86=(0x0,child_process_1[_0x388631(0x132)])(_0x54f33e,[],{'stdio':[_0x388631(0x14a),_0x388631(0x139),_0x388631(0x139)],'shell':!![],'env':_0x29de39});let _0x266d92='',_0x5df6f1='';_0x138e86[_0x388631(0x144)]?.['on'](_0x388631(0x133),_0x331b98=>{_0x266d92+=_0x331b98['toString']();}),_0x138e86[_0x388631(0x146)]?.['on'](_0x388631(0x133),_0x5b0df3=>{var _0xdd4fcf=_0x388631;_0x5df6f1+=_0x5b0df3[_0xdd4fcf(0x136)]();}),_0x138e86['on'](_0x388631(0x14c),_0x1aa335=>{var _0x3f7ce8=_0x388631;_0x190537({'exitCode':0x1,'stdout':'','stderr':'Failed\x20to\x20spawn\x20command\x20\x22'+_0x569078+'\x22:\x20'+_0x1aa335[_0x3f7ce8(0x130)]});}),_0x138e86['on']('close',_0x57fbfb=>{_0x190537({'exitCode':_0x57fbfb??0x0,'stdout':_0x266d92,'stderr':_0x5df6f1});});});}
|
package/file-watcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x170d80=a0_0x5d9d;(function(_0x3c5608,_0x244ae4){const _0x5e4768=a0_0x5d9d,_0x292615=_0x3c5608();while(!![]){try{const _0x2ca227=parseInt(_0x5e4768(0x15c))/0x1*(parseInt(_0x5e4768(0x11b))/0x2)+parseInt(_0x5e4768(0x135))/0x3+-parseInt(_0x5e4768(0x119))/0x4+parseInt(_0x5e4768(0x1b2))/0x5+parseInt(_0x5e4768(0x19c))/0x6+-parseInt(_0x5e4768(0x199))/0x7+-parseInt(_0x5e4768(0x156))/0x8;if(_0x2ca227===_0x244ae4)break;else _0x292615['push'](_0x292615['shift']());}catch(_0x5b00f5){_0x292615['push'](_0x292615['shift']());}}}(a0_0x42a9,0x524dc));var __createBinding=this&&this[a0_0x170d80(0x155)]||(Object[a0_0x170d80(0x105)]?function(_0x4e5cf9,_0x31c5e2,_0x44c9f6,_0x3e4f50){const _0xfe6b5c=a0_0x170d80;if(_0x3e4f50===undefined)_0x3e4f50=_0x44c9f6;var _0x115ad8=Object[_0xfe6b5c(0x143)](_0x31c5e2,_0x44c9f6);(!_0x115ad8||(_0xfe6b5c(0x174)in _0x115ad8?!_0x31c5e2['__esModule']:_0x115ad8[_0xfe6b5c(0x11d)]||_0x115ad8[_0xfe6b5c(0x107)]))&&(_0x115ad8={'enumerable':!![],'get':function(){return _0x31c5e2[_0x44c9f6];}}),Object[_0xfe6b5c(0x16a)](_0x4e5cf9,_0x3e4f50,_0x115ad8);}:function(_0x53ea74,_0x399bb3,_0xc78bbe,_0x70ba75){if(_0x70ba75===undefined)_0x70ba75=_0xc78bbe;_0x53ea74[_0x70ba75]=_0x399bb3[_0xc78bbe];}),__setModuleDefault=this&&this[a0_0x170d80(0x1ad)]||(Object[a0_0x170d80(0x105)]?function(_0x24aa0f,_0x50251){const _0x189afd=a0_0x170d80;Object[_0x189afd(0x16a)](_0x24aa0f,'default',{'enumerable':!![],'value':_0x50251});}:function(_0x439180,_0x50878a){const _0x1dbfc0=a0_0x170d80;_0x439180[_0x1dbfc0(0x15b)]=_0x50878a;}),__importStar=this&&this[a0_0x170d80(0x158)]||(function(){var _0xa9b957=function(_0x26ddf6){const _0x3cfef0=a0_0x5d9d;return _0xa9b957=Object[_0x3cfef0(0x136)]||function(_0x3da540){const _0x29c4ce=_0x3cfef0;var _0x6e790b=[];for(var _0x21d62b in _0x3da540)if(Object[_0x29c4ce(0x12a)][_0x29c4ce(0x120)][_0x29c4ce(0x13a)](_0x3da540,_0x21d62b))_0x6e790b[_0x6e790b[_0x29c4ce(0x115)]]=_0x21d62b;return _0x6e790b;},_0xa9b957(_0x26ddf6);};return function(_0x2375ec){const _0x4dcc35=a0_0x5d9d;if(_0x2375ec&&_0x2375ec[_0x4dcc35(0x1b9)])return _0x2375ec;var _0x1c96a8={};if(_0x2375ec!=null){for(var _0x5a9ed4=_0xa9b957(_0x2375ec),_0x13003a=0x0;_0x13003a<_0x5a9ed4[_0x4dcc35(0x115)];_0x13003a++)if(_0x5a9ed4[_0x13003a]!=='default')__createBinding(_0x1c96a8,_0x2375ec,_0x5a9ed4[_0x13003a]);}return __setModuleDefault(_0x1c96a8,_0x2375ec),_0x1c96a8;};}());Object[a0_0x170d80(0x16a)](exports,'__esModule',{'value':!![]}),exports['loadConfig']=loadConfig,exports[a0_0x170d80(0x13e)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0x170d80(0x162)]=getLatestSessionFile,exports[a0_0x170d80(0x1a2)]=loadSessionsState,exports[a0_0x170d80(0x1ab)]=saveSessionStateItem,exports[a0_0x170d80(0x12b)]=processSessionFile,exports['compactSessionCopy']=compactSessionCopy,exports[a0_0x170d80(0x130)]=compactLiveSession,exports[a0_0x170d80(0x151)]=installWindowsStartupService,exports[a0_0x170d80(0x103)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x170d80(0x102))),os=__importStar(require('os')),cache_manager_1=require('./cache-manager'),tracker_1=require('./tracker'),baseDir=path[a0_0x170d80(0x170)](os['homedir'](),a0_0x170d80(0x196)),configPath=path[a0_0x170d80(0x170)](baseDir,a0_0x170d80(0x1a1)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x314d25=a0_0x170d80;try{if(!fs[_0x314d25(0x12e)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});if(fs[_0x314d25(0x12e)](configPath)){const _0x4930d6=JSON[_0x314d25(0x16c)](fs[_0x314d25(0x18a)](configPath,_0x314d25(0x19f)));return{...DEFAULT_CONFIG,..._0x4930d6,'conversation_toggles':{...DEFAULT_CONFIG[_0x314d25(0x182)],..._0x4930d6[_0x314d25(0x182)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x4930d6['custom_storage_paths']||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x4c7629){const _0x3c70d3=a0_0x170d80,_0x438be1=loadConfig(),_0x4216a2={..._0x438be1,..._0x4c7629,'conversation_toggles':{..._0x438be1['conversation_toggles'],..._0x4c7629['conversation_toggles']||{}},'custom_storage_paths':{..._0x438be1['custom_storage_paths'],..._0x4c7629[_0x3c70d3(0x110)]||{}}};try{if(!fs[_0x3c70d3(0x12e)](baseDir))fs[_0x3c70d3(0x153)](baseDir,{'recursive':!![]});fs[_0x3c70d3(0x19b)](configPath,JSON['stringify'](_0x4216a2,null,0x2),_0x3c70d3(0x19f));}catch{}return _0x4216a2;}function getAgentStoragePaths(_0x3539db){const _0x28b9b9=a0_0x170d80,_0x5ddb91=loadConfig(),_0x2756f5=_0x5ddb91[_0x28b9b9(0x110)][_0x3539db];if(_0x2756f5&&fs[_0x28b9b9(0x12e)](_0x2756f5))return[_0x2756f5];const _0x40736a=os[_0x28b9b9(0x159)](),_0x2d7578=process['platform']===_0x28b9b9(0x10e),_0x270846=process[_0x28b9b9(0x144)]==='darwin';switch(_0x3539db){case'claude':return[path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x19e),_0x28b9b9(0x142)),path['join'](_0x40736a,_0x28b9b9(0x19e),'history')];case _0x28b9b9(0x14d):return[path[_0x28b9b9(0x170)](_0x40736a,'.codex',_0x28b9b9(0x10c)),path[_0x28b9b9(0x170)](_0x40736a,'AppData',_0x28b9b9(0x10d),_0x28b9b9(0x166))];case _0x28b9b9(0x19d):case'antigravity':return[path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x187),_0x28b9b9(0x1ba)),path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x187)),path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x1af),_0x28b9b9(0x10d),_0x28b9b9(0x121)),path[_0x28b9b9(0x170)](_0x40736a,'.config',_0x28b9b9(0x19d))];case _0x28b9b9(0x1b0):if(_0x2d7578)return[path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x1af),_0x28b9b9(0x10d),_0x28b9b9(0x18b),_0x28b9b9(0x185),_0x28b9b9(0x17d))];if(_0x270846)return[path['join'](_0x40736a,'Library',_0x28b9b9(0x112),_0x28b9b9(0x18b),'User',_0x28b9b9(0x17d))];return[path['join'](_0x40736a,_0x28b9b9(0x11f),'Cursor','User',_0x28b9b9(0x17d))];case _0x28b9b9(0x1a4):return[process['cwd'](),path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x169))];case _0x28b9b9(0x150):if(_0x2d7578)return[path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x1af),'Local',_0x28b9b9(0x1a0))];return[path[_0x28b9b9(0x170)](_0x40736a,'.config',_0x28b9b9(0x1a0))];case'openclaw':return[path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x1a3),_0x28b9b9(0x132)),path[_0x28b9b9(0x170)](process['cwd'](),_0x28b9b9(0x1a3),'context')];case _0x28b9b9(0x10b):return[path[_0x28b9b9(0x170)](_0x40736a,'.opencode',_0x28b9b9(0x10c))];case _0x28b9b9(0x188):return[path[_0x28b9b9(0x170)](_0x40736a,_0x28b9b9(0x118),_0x28b9b9(0x109))];default:return[];}}function getLatestSessionFile(_0x4f38fa){const _0x206d9d=a0_0x170d80,_0x3502cd=getAgentStoragePaths(_0x4f38fa);let _0x4681ec=null,_0x302cfa=0x0,_0x24739f=null,_0x1d6dda=null;for(const _0x4d58fb of _0x3502cd){if(fs[_0x206d9d(0x12e)](_0x4d58fb)){if(!_0x1d6dda)_0x1d6dda=_0x4d58fb;const _0x484d43=(_0x1c2b60,_0x43cdc6=0x0)=>{const _0x43256a=_0x206d9d;if(_0x43cdc6>0x6)return;try{const _0x42b9db=fs['readdirSync'](_0x1c2b60,{'withFileTypes':!![]});for(const _0x5609ad of _0x42b9db){const _0x1f5930=path[_0x43256a(0x170)](_0x1c2b60,_0x5609ad[_0x43256a(0x16b)]);if(_0x5609ad['isDirectory']()){const _0x348243=_0x5609ad[_0x43256a(0x16b)][_0x43256a(0x124)]();if(_0x348243===_0x43256a(0x179)||_0x348243===_0x43256a(0x12c)||_0x348243===_0x43256a(0x15a)||_0x348243===_0x43256a(0x139)||_0x348243===_0x43256a(0x1b1)||_0x348243===_0x43256a(0x1b3)||_0x348243===_0x43256a(0x189)||_0x348243==='dist'||_0x348243==='build'||_0x348243===_0x43256a(0x1a8)||_0x348243===_0x43256a(0x175))continue;_0x484d43(_0x1f5930,_0x43cdc6+0x1);}else{if(_0x5609ad['isFile']()&&!_0x5609ad['name']['startsWith']('.')){const _0x5a05bf=_0x5609ad['name'][_0x43256a(0x124)]();if(_0x5a05bf[_0x43256a(0x16d)]('.compact')||_0x5a05bf[_0x43256a(0x148)]('.db')||_0x5a05bf['endsWith'](_0x43256a(0x123))||_0x5a05bf[_0x43256a(0x148)]('.png')||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x116))||_0x5a05bf['endsWith'](_0x43256a(0x184))||_0x5a05bf[_0x43256a(0x148)]('.gif')||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x145))||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x106))||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x161))||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x13f))||_0x5a05bf['endsWith'](_0x43256a(0x16e))||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x129))||_0x5a05bf[_0x43256a(0x148)](_0x43256a(0x126))||_0x5a05bf[_0x43256a(0x1a7)](_0x43256a(0x108))||_0x5a05bf[_0x43256a(0x1a7)](_0x43256a(0x1ae)))continue;const _0x3aefc6=fs[_0x43256a(0x133)](_0x1f5930);_0x3aefc6[_0x43256a(0x1a9)]>_0x302cfa&&(_0x302cfa=_0x3aefc6[_0x43256a(0x1a9)],_0x4681ec=_0x5609ad[_0x43256a(0x16b)],_0x24739f=_0x1f5930,_0x1d6dda=_0x4d58fb);}}}}catch{}};_0x484d43(_0x4d58fb);}}return{'fileName':_0x4681ec,'lastModified':_0x302cfa>0x0?new Date(_0x302cfa)[_0x206d9d(0x186)]():null,'fullPath':_0x24739f,'dirPath':_0x1d6dda};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x5bd7dc,_0x2be5a6,_0x41b07a){const _0x1b8c92=a0_0x170d80;let _0x553667=![],_0x1597f6=0x0;if(!_0x5bd7dc)return{'modified':_0x553667,'savedTokens':_0x1597f6};const _0x5298b2=_0x24a9b3=>_0x24a9b3[_0x1b8c92(0x15e)](/\r\n/g,'\x0a')[_0x1b8c92(0x15e)](/\n{3,}/g,'\x0a\x0a');if(typeof _0x5bd7dc[_0x1b8c92(0x10a)]===_0x1b8c92(0x137)){let _0x4bd472=_0x5bd7dc['content'],_0x346768=_0x5298b2(_0x4bd472);_0x346768[_0x1b8c92(0x115)]<_0x4bd472[_0x1b8c92(0x115)]&&(_0x5bd7dc['content']=_0x346768,_0x553667=!![],_0x1597f6+=Math[_0x1b8c92(0x1aa)]((_0x4bd472[_0x1b8c92(0x115)]-_0x346768[_0x1b8c92(0x115)])/0x4));if(_0x5bd7dc[_0x1b8c92(0x10a)][_0x1b8c92(0x115)]>OFFLOAD_THRESHOLD_CHARS&&!_0x5bd7dc[_0x1b8c92(0x10a)][_0x1b8c92(0x16d)](_0x1b8c92(0x1a5))){const _0x37c456=_0x1b8c92(0x160)+Math[_0x1b8c92(0x1aa)](_0x5bd7dc[_0x1b8c92(0x10a)]['length']/0x4)+'\x20tokens).',_0x447d99=(0x0,cache_manager_1[_0x1b8c92(0x195)])(_0x2be5a6,_0x41b07a,_0x5bd7dc['content'],_0x37c456);_0x5bd7dc[_0x1b8c92(0x10a)]=_0x1b8c92(0x154)+_0x447d99['raw_tokens']+_0x1b8c92(0x194)+_0x447d99[_0x1b8c92(0x171)]+_0x1b8c92(0x1a6)+_0x447d99['chunk_id']+'`\x0a',_0x553667=!![],_0x1597f6+=Math[_0x1b8c92(0x111)](0x0,_0x447d99[_0x1b8c92(0x190)]-_0x447d99[_0x1b8c92(0x18e)]);}}else{if(Array[_0x1b8c92(0x14f)](_0x5bd7dc['content']))for(const _0x53f7a1 of _0x5bd7dc['content']){if(_0x53f7a1&&typeof _0x53f7a1===_0x1b8c92(0x178)){if(typeof _0x53f7a1[_0x1b8c92(0x113)]===_0x1b8c92(0x137)){let _0x4b5999=_0x53f7a1['text'],_0x4a9096=_0x5298b2(_0x4b5999);_0x4a9096['length']<_0x4b5999[_0x1b8c92(0x115)]&&(_0x53f7a1[_0x1b8c92(0x113)]=_0x4a9096,_0x553667=!![],_0x1597f6+=Math['ceil']((_0x4b5999[_0x1b8c92(0x115)]-_0x4a9096[_0x1b8c92(0x115)])/0x4));if(_0x53f7a1[_0x1b8c92(0x113)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x53f7a1[_0x1b8c92(0x113)][_0x1b8c92(0x16d)](_0x1b8c92(0x1a5))){const _0x126169=_0x1b8c92(0x127)+Math[_0x1b8c92(0x1aa)](_0x53f7a1[_0x1b8c92(0x113)]['length']/0x4)+_0x1b8c92(0x18d),_0x380065=(0x0,cache_manager_1['saveChunk'])(_0x2be5a6,_0x41b07a,_0x53f7a1[_0x1b8c92(0x113)],_0x126169);_0x53f7a1['text']='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x380065['chunk_id']+_0x1b8c92(0x14a)+_0x380065['chunk_id']+'`\x0a',_0x553667=!![],_0x1597f6+=Math[_0x1b8c92(0x111)](0x0,_0x380065[_0x1b8c92(0x190)]-_0x380065[_0x1b8c92(0x18e)]);}}else{if(typeof _0x53f7a1[_0x1b8c92(0x10a)]===_0x1b8c92(0x137)){let _0x4843a1=_0x53f7a1[_0x1b8c92(0x10a)],_0x5d667d=_0x5298b2(_0x4843a1);_0x5d667d[_0x1b8c92(0x115)]<_0x4843a1[_0x1b8c92(0x115)]&&(_0x53f7a1[_0x1b8c92(0x10a)]=_0x5d667d,_0x553667=!![],_0x1597f6+=Math[_0x1b8c92(0x1aa)]((_0x4843a1[_0x1b8c92(0x115)]-_0x5d667d[_0x1b8c92(0x115)])/0x4));if(_0x53f7a1[_0x1b8c92(0x10a)][_0x1b8c92(0x115)]>OFFLOAD_THRESHOLD_CHARS&&!_0x53f7a1[_0x1b8c92(0x10a)]['includes'](_0x1b8c92(0x1a5))){const _0x57b2f6=_0x1b8c92(0x18c)+Math[_0x1b8c92(0x1aa)](_0x53f7a1[_0x1b8c92(0x10a)][_0x1b8c92(0x115)]/0x4)+_0x1b8c92(0x18d),_0x4cc09b=(0x0,cache_manager_1['saveChunk'])(_0x2be5a6,_0x41b07a,_0x53f7a1['content'],_0x57b2f6);_0x53f7a1[_0x1b8c92(0x10a)]=_0x1b8c92(0x183)+_0x4cc09b[_0x1b8c92(0x171)]+_0x1b8c92(0x14a)+_0x4cc09b[_0x1b8c92(0x171)]+'`\x0a',_0x553667=!![],_0x1597f6+=Math[_0x1b8c92(0x111)](0x0,_0x4cc09b[_0x1b8c92(0x190)]-_0x4cc09b['compressed_tokens']);}}}}}}return{'modified':_0x553667,'savedTokens':_0x1597f6};}const sessionsStatePath=path[a0_0x170d80(0x170)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x112a8e=a0_0x170d80;try{if(fs[_0x112a8e(0x12e)](sessionsStatePath)){const _0x339740=JSON[_0x112a8e(0x16c)](fs[_0x112a8e(0x18a)](sessionsStatePath,_0x112a8e(0x19f)));if(_0x339740&&typeof _0x339740===_0x112a8e(0x178))return sessionsStateMemoryCache=_0x339740,_0x339740;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x27ded5,_0x2f16d4,_0x380cd5,_0x559e3f=0x0,_0x41bfd0=0x0,_0x14ecd6=0x0){const _0x3401fe=a0_0x170d80;try{const _0x1161cd=loadSessionsState(),_0x405ae4=_0x1161cd[_0x27ded5]||{},_0x4a9659=_0x41bfd0||_0x405ae4[_0x3401fe(0x180)]||0x0,_0x3b3cc8=_0x14ecd6||_0x405ae4[_0x3401fe(0x165)]||0x0,_0x1f6199=_0x380cd5!==undefined?_0x380cd5:_0x405ae4[_0x3401fe(0x149)]||0x0;_0x1161cd[_0x27ded5]={'lineCount':_0x2f16d4||_0x405ae4[_0x3401fe(0x1b8)]||0x1,'activeSavedTokens':_0x1f6199+_0x4a9659+_0x3b3cc8,'sideCacheSaved':_0x559e3f||_0x405ae4[_0x3401fe(0x13c)]||0x0,'officialCompactSaved':_0x1f6199,'autoCompactSaved':_0x4a9659,'hookSavedTokens':_0x3b3cc8},sessionsStateMemoryCache=_0x1161cd;if(!fs['existsSync'](baseDir))fs[_0x3401fe(0x153)](baseDir,{'recursive':!![]});const _0x2ed6ed=sessionsStatePath+_0x3401fe(0x16e);fs['writeFileSync'](_0x2ed6ed,JSON['stringify'](_0x1161cd,null,0x2),_0x3401fe(0x19f)),fs[_0x3401fe(0x146)](_0x2ed6ed,sessionsStatePath);}catch{}}function processSessionFile(_0x8377c3,_0x5b07c4){const _0xf6435f=a0_0x170d80;try{if(!fs[_0xf6435f(0x12e)](_0x8377c3))return;const _0x46deed=fs[_0xf6435f(0x133)](_0x8377c3);if(_0x46deed[_0xf6435f(0x15f)]()||_0x46deed[_0xf6435f(0x163)]===0x0)return;const _0x50660c=loadConfig(),_0x2cd198=_0xf6435f(0x11e)+_0x5b07c4;if(_0x50660c[_0xf6435f(0x182)][_0x2cd198]===![])return;const _0x2cbf95=fs[_0xf6435f(0x18a)](_0x8377c3,_0xf6435f(0x19f)),_0x271e60=path[_0xf6435f(0x16f)](_0x8377c3)[_0xf6435f(0x124)]();let _0x370d1f=0x1;if(_0x271e60===_0xf6435f(0x173)||_0x271e60==='.json1')_0x370d1f=_0x2cbf95['split']('\x0a')[_0xf6435f(0x101)](Boolean)[_0xf6435f(0x115)];else{if(_0x271e60==='.json')try{const _0x370079=JSON[_0xf6435f(0x16c)](_0x2cbf95),_0x1c99df=Array[_0xf6435f(0x14f)](_0x370079['messages'])?_0x370079[_0xf6435f(0x125)]:Array[_0xf6435f(0x14f)](_0x370079)?_0x370079:null;if(_0x1c99df)_0x370d1f=_0x1c99df[_0xf6435f(0x115)];}catch{}}let _0x3b6bbb=0x0;if((_0x271e60==='.jsonl'||_0x271e60==='.json1')&&_0x2cbf95['includes'](_0xf6435f(0x147))&&_0x2cbf95[_0xf6435f(0x16d)](_0xf6435f(0x104))){const _0x427dd4=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x511119 of _0x2cbf95[_0xf6435f(0x168)]('\x0a')){if(!_0x511119[_0xf6435f(0x16d)](_0xf6435f(0x147))||!_0x511119[_0xf6435f(0x16d)](_0xf6435f(0x104)))continue;try{const _0x51e649=JSON[_0xf6435f(0x16c)](_0x511119);if(_0x51e649[_0xf6435f(0x134)]!==_0xf6435f(0x157))continue;const _0x1ca329=typeof _0x51e649[_0xf6435f(0x10a)]===_0xf6435f(0x137)?_0x51e649[_0xf6435f(0x10a)]:_0x51e649[_0xf6435f(0x152)]&&typeof _0x51e649[_0xf6435f(0x152)]['content']===_0xf6435f(0x137)?_0x51e649['message']['content']:'';if(!_0x1ca329)continue;for(const _0x2bfab3 of _0x1ca329[_0xf6435f(0x114)](_0x427dd4)){let _0x376351=parseFloat(_0x2bfab3[0x1]);if(_0x2bfab3[0x0][_0xf6435f(0x124)]()['includes']('k'))_0x376351=_0x376351*0x3e8;_0x3b6bbb+=Math[_0xf6435f(0x164)](_0x376351);}}catch{}}}const _0x583cae=loadSessionsState(),_0xc09e53=_0x583cae[_0x8377c3],_0x10b8c6=_0xc09e53?_0xc09e53[_0xf6435f(0x1b8)]:0x0,_0x5b60b5=_0xc09e53?_0xc09e53['activeSavedTokens']||0x0:0x0;if(_0x10b8c6>0x0&&_0x370d1f>_0x10b8c6&&_0x5b60b5>0x0){const _0x5bb19a=_0xf6435f(0x181)+_0x5b07c4;tracker_1[_0xf6435f(0x11a)][_0xf6435f(0x17f)](_0x5bb19a,'A'[_0xf6435f(0x19a)](_0x5b60b5*0x4),'',0x0,undefined,[_0xf6435f(0x11e)+_0x5b07c4,_0xf6435f(0x1b7),_0x5b07c4,_0xf6435f(0x1ac)]);}const _0x49fffd=_0xc09e53&&_0xc09e53[_0xf6435f(0x149)]!==undefined?_0xc09e53['officialCompactSaved']:0x0,_0x264c9e=Math[_0xf6435f(0x111)](_0x49fffd,_0x3b6bbb);saveSessionStateItem(_0x8377c3,_0x370d1f,_0x264c9e,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x2dec68,_0x3b4e50){const _0x204ac8=a0_0x170d80;try{if(!fs[_0x204ac8(0x12e)](_0x2dec68))return{'ok':![],'reason':'Session\x20file\x20not\x20found'};const _0x1f6d89=path['extname'](_0x2dec68)[_0x204ac8(0x124)]();if(_0x1f6d89!==_0x204ac8(0x15d)&&_0x1f6d89!==_0x204ac8(0x173)&&_0x1f6d89!==_0x204ac8(0x198))return{'ok':![],'reason':_0x204ac8(0x131)+(_0x1f6d89||_0x204ac8(0x172))+'\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)'};const _0x225006=fs['readFileSync'](_0x2dec68,'utf8'),_0x53e8f6=Buffer['byteLength'](_0x225006,_0x204ac8(0x19f)),_0xd851f3=path[_0x204ac8(0x12f)](_0x2dec68,_0x1f6d89);let _0x4feec5=_0x225006,_0x2efa7b=![];if(_0x1f6d89==='.json'){const _0x129166=JSON[_0x204ac8(0x16c)](_0x225006),_0x5b8a6d=Array[_0x204ac8(0x14f)](_0x129166[_0x204ac8(0x125)])?_0x129166[_0x204ac8(0x125)]:Array['isArray'](_0x129166)?_0x129166:null;if(_0x5b8a6d){for(const _0x207793 of _0x5b8a6d){const _0x1e22b9=compressMessageContent(_0x207793,_0xd851f3,_0x3b4e50);if(_0x1e22b9['modified'])_0x2efa7b=!![];}if(_0x2efa7b)_0x4feec5=JSON['stringify'](_0x129166,null,0x2);}}else{const _0x183b67=_0x225006['split']('\x0a'),_0x354b3b=[];for(let _0x187946 of _0x183b67){if(!_0x187946['trim']()){_0x354b3b['push'](_0x187946);continue;}try{const _0x5243a5=JSON[_0x204ac8(0x16c)](_0x187946),_0xe93a97=_0x5243a5[_0x204ac8(0x152)]||_0x5243a5;if(_0xe93a97){const _0x313714=compressMessageContent(_0xe93a97,_0xd851f3,_0x3b4e50);_0x313714[_0x204ac8(0x193)]&&(_0x2efa7b=!![],_0x187946=JSON[_0x204ac8(0x122)](_0x5243a5));}}catch{}_0x354b3b[_0x204ac8(0x191)](_0x187946);}if(_0x2efa7b)_0x4feec5=_0x354b3b[_0x204ac8(0x170)]('\x0a');}const _0x134254=Buffer['byteLength'](_0x4feec5,_0x204ac8(0x19f)),_0x511ca2=path['join'](path[_0x204ac8(0x13d)](_0x2dec68),_0xd851f3+_0x204ac8(0x167)+_0x1f6d89);fs['writeFileSync'](_0x511ca2,_0x4feec5,_0x204ac8(0x19f));const _0x17286e=Math[_0x204ac8(0x1aa)](_0x53e8f6/0x4),_0x11b5fb=Math[_0x204ac8(0x1aa)](_0x134254/0x4),_0x43c800=Math[_0x204ac8(0x111)](0x0,_0x17286e-_0x11b5fb),_0x30be02=_0x53e8f6>0x0?Math[_0x204ac8(0x164)]((0x1-_0x134254/_0x53e8f6)*0x3e8)/0xa:0x0;return _0x43c800>0x0&&tracker_1['tracker'][_0x204ac8(0x17f)](_0x204ac8(0x176)+_0x3b4e50,_0x225006,_0x4feec5,_0x43c800,undefined,[_0x204ac8(0x11e)+_0x3b4e50,_0x204ac8(0x1b7),_0x3b4e50,_0x204ac8(0x192)]),{'ok':!![],'compactPath':_0x511ca2,'rawBytes':_0x53e8f6,'compressedBytes':_0x134254,'rawTokens':_0x17286e,'compressedTokens':_0x11b5fb,'savedTokens':_0x43c800,'reductionPct':_0x30be02};}catch(_0xf30c5){return{'ok':![],'reason':_0xf30c5?.[_0x204ac8(0x152)]||_0x204ac8(0x140)};}}function a0_0x42a9(){const _0x2bf934=['platform','.webp','renameSync','saved','endsWith','officialCompactSaved','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','Windows','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','codex','Programs','isArray','copilot','installWindowsStartupService','message','mkdirSync','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','__createBinding','2056808HDCtQc','system','__importStar','homedir','.venv','default','1XLYnsI','.json','replace','isDirectory','Summary:\x20Content\x20offloaded\x20(','.wal','getLatestSessionFile','size','round','hookSavedTokens','Codex','.compact','split','.aider.chat.history.md','defineProperty','name','parse','includes','.tmp','extname','join','chunk_id','none','.jsonl','get','.agents','compact:','./proxy-conv','object','node_modules','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','watch','savedTokens','workspaceStorage','File\x20not\x20found','logExecution','autoCompactSaved','conv:','conversation_toggles','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','.jpeg','User','toISOString','.gemini','cortex','.next','readFileSync','Cursor','Summary:\x20Tool\x20result\x20offloaded\x20(','\x20tokens).','compressed_tokens','Unsupported\x20extension','raw_tokens','push','compact_copy','modified','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','saveChunk','.trimprompt','fullPath','.json1','2911083WLIlEX','repeat','writeFileSync','2204358uSrVXW','gemini','.claude','utf8','github-copilot-cli','config.json','loadSessionsState','.openclaw','aider','TrimPrompt\x20Cache\x20Engine','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','startsWith','out','mtimeMs','ceil','saveSessionStateItem','prompt_turn','__setModuleDefault','image_','AppData','cursor','venv','1883480vqOMTR','__pycache__','has','./hooks/claude-hook','assign','live-conv','lineCount','__esModule','antigravity','cli.js','byteLength','filter','path','startWatcherDaemon','tokens','create','.pb','configurable','media__','cache','content','opencode','sessions','Roaming','win32','trim','custom_storage_paths','max','Application\x20Support','text','matchAll','length','.jpg','Startup','.cortex','1425796lHRlAS','tracker','1094070rWftWm','TrimPromptDaemon.vbs','writable','conv_','.config','hasOwnProperty','Gemini','stringify','.vscdb','toLowerCase','messages','.dat','Summary:\x20Text\x20block\x20offloaded\x20(','Microsoft','.lock','prototype','processSessionFile','.git','set','existsSync','basename','compactLiveSession','Unsupported\x20format\x20\x27','storage','statSync','type','226233tLGKVh','getOwnPropertyNames','string','find','env','call','role','sideCacheSaved','dirname','saveConfig','.shm','compaction\x20failed','Start\x20Menu','projects','getOwnPropertyDescriptor'];a0_0x42a9=function(){return _0x2bf934;};return a0_0x42a9();}function a0_0x5d9d(_0x52e760,_0x3a15a8){_0x52e760=_0x52e760-0x101;const _0x42a9b0=a0_0x42a9();let _0x5d9d45=_0x42a9b0[_0x52e760];return _0x5d9d45;}function compactLiveSession(_0x3995b8,_0x346c9b){const _0x1045ab=a0_0x170d80;try{if(!fs[_0x1045ab(0x12e)](_0x3995b8))return{'ok':![],'savedTokens':0x0,'reason':_0x1045ab(0x17e)};const _0x39a595=path[_0x1045ab(0x16f)](_0x3995b8)[_0x1045ab(0x124)]();if(_0x39a595!=='.json'&&_0x39a595!==_0x1045ab(0x173)&&_0x39a595!==_0x1045ab(0x198))return{'ok':![],'savedTokens':0x0,'reason':_0x1045ab(0x18f)};const _0x5a7f2c=fs[_0x1045ab(0x18a)](_0x3995b8,_0x1045ab(0x19f)),_0x3fcaee=Buffer[_0x1045ab(0x1bc)](_0x5a7f2c,'utf8'),_0x28cad6=Math[_0x1045ab(0x1aa)](_0x3fcaee/0x4),_0x495108=path[_0x1045ab(0x12f)](_0x3995b8,_0x39a595);let _0x5e69e2=_0x5a7f2c,_0x15aba6=![];if(_0x39a595===_0x1045ab(0x15d)){const _0x2604ce=JSON[_0x1045ab(0x16c)](_0x5a7f2c),_0x411f0f=Array[_0x1045ab(0x14f)](_0x2604ce['messages'])?_0x2604ce[_0x1045ab(0x125)]:Array['isArray'](_0x2604ce)?_0x2604ce:null;if(_0x411f0f){for(const _0x206016 of _0x411f0f){const _0xf59429=compressMessageContent(_0x206016,_0x495108,_0x346c9b);if(_0xf59429[_0x1045ab(0x193)])_0x15aba6=!![];}const {compressConversation:_0x35fbf3}=require('./proxy-conv'),_0x33b188=_0x35fbf3(_0x411f0f,0x9c40);_0x33b188['savedTokens']>0x0&&(_0x15aba6=!![],Array[_0x1045ab(0x14f)](_0x2604ce['messages'])?_0x2604ce['messages']=_0x33b188[_0x1045ab(0x125)]:_0x5e69e2=JSON[_0x1045ab(0x122)](_0x33b188['messages'],null,0x2)),_0x15aba6&&!Array['isArray'](_0x2604ce)&&(_0x5e69e2=JSON[_0x1045ab(0x122)](_0x2604ce,null,0x2));}}else{const _0x53b65=_0x5a7f2c['split']('\x0a'),_0x1dc2a7=[],_0x4da71d=[];for(const _0x58f621 of _0x53b65){if(!_0x58f621[_0x1045ab(0x10f)]())continue;try{const _0x2244a2=JSON[_0x1045ab(0x16c)](_0x58f621);_0x1dc2a7['push'](_0x2244a2);const _0x4588dc=_0x2244a2[_0x1045ab(0x152)]||_0x2244a2;_0x4588dc&&typeof _0x4588dc[_0x1045ab(0x13b)]===_0x1045ab(0x137)&&_0x4da71d[_0x1045ab(0x191)](_0x4588dc);}catch{}}for(const _0x207308 of _0x4da71d){const _0x538ac5=compressMessageContent(_0x207308,_0x495108,_0x346c9b);if(_0x538ac5[_0x1045ab(0x193)])_0x15aba6=!![];}const {compressConversation:_0x52749e}=require(_0x1045ab(0x177)),_0x268c95=_0x52749e(_0x4da71d,0x9c40);if(_0x268c95[_0x1045ab(0x17c)]>0x0||_0x15aba6){const _0x11ab8a=[];for(const _0x20cf71 of _0x1dc2a7){const _0xde21cf=_0x20cf71[_0x1045ab(0x152)]||_0x20cf71;if(_0xde21cf&&typeof _0xde21cf[_0x1045ab(0x13b)]==='string'){const _0x1dd5ca=_0x268c95[_0x1045ab(0x125)][_0x1045ab(0x138)](_0x3a6bd2=>_0x3a6bd2===_0xde21cf);_0x1dd5ca?(_0x20cf71['message']?_0x20cf71['message']=_0x1dd5ca:Object[_0x1045ab(0x1b6)](_0x20cf71,_0x1dd5ca),_0x11ab8a[_0x1045ab(0x191)](JSON['stringify'](_0x20cf71))):_0x15aba6=!![];}else _0x11ab8a[_0x1045ab(0x191)](JSON[_0x1045ab(0x122)](_0x20cf71));}_0x5e69e2=_0x11ab8a['join']('\x0a'),_0x15aba6=!![];}}if(_0x15aba6){const _0x5c8c8d=Buffer[_0x1045ab(0x1bc)](_0x5e69e2,_0x1045ab(0x19f));fs['writeFileSync'](_0x3995b8,_0x5e69e2,'utf8');const _0x271edb=Math[_0x1045ab(0x1aa)](_0x5c8c8d/0x4),_0x37b006=Math[_0x1045ab(0x111)](0x0,_0x28cad6-_0x271edb);if(_0x37b006>0x0){const _0x409284=loadSessionsState(),_0x36a767=_0x409284[_0x3995b8]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x55fb50=_0x36a767[_0x1045ab(0x180)]||0x0,_0x487665=_0x55fb50+_0x37b006;saveSessionStateItem(_0x3995b8,_0x36a767[_0x1045ab(0x1b8)],_0x36a767[_0x1045ab(0x149)]||0x0,_0x36a767[_0x1045ab(0x13c)]||0x0,_0x487665,_0x36a767[_0x1045ab(0x165)]||0x0),tracker_1[_0x1045ab(0x11a)][_0x1045ab(0x17f)](_0x1045ab(0x176)+_0x346c9b,_0x5a7f2c,_0x5e69e2,_0x37b006,undefined,[_0x1045ab(0x11e)+_0x346c9b,_0x1045ab(0x1b7),_0x346c9b,_0x1045ab(0x192)]);}return{'ok':!![],'savedTokens':_0x37b006};}return{'ok':!![],'savedTokens':0x0};}catch(_0x4740a9){return{'ok':![],'savedTokens':0x0,'reason':_0x4740a9[_0x1045ab(0x152)]||'Compaction\x20failed'};}}function installWindowsStartupService(){const _0x2ebd1e=a0_0x170d80;if(process['platform']!=='win32')return;try{const _0x2ed8c5=path[_0x2ebd1e(0x170)](os[_0x2ebd1e(0x159)](),_0x2ebd1e(0x1af),_0x2ebd1e(0x10d),_0x2ebd1e(0x128),_0x2ebd1e(0x14b),_0x2ebd1e(0x141),_0x2ebd1e(0x14e),_0x2ebd1e(0x117));if(!fs[_0x2ebd1e(0x12e)](_0x2ed8c5))fs[_0x2ebd1e(0x153)](_0x2ed8c5,{'recursive':!![]});const _0xa81d99=path[_0x2ebd1e(0x170)](_0x2ed8c5,_0x2ebd1e(0x11c)),_0x392fe5=path['join'](__dirname,_0x2ebd1e(0x1bb)),_0x316be0=_0x392fe5[_0x2ebd1e(0x15e)](/\\/g,'\x5c\x5c'),_0x3ae773=_0x2ebd1e(0x14c)+_0x316be0+_0x2ebd1e(0x17a);fs[_0x2ebd1e(0x19b)](_0xa81d99,_0x3ae773,_0x2ebd1e(0x19f));}catch{}}function startWatcherDaemon(){const _0x3e611a=a0_0x170d80;installWindowsStartupService();try{const {installClaudeHooks:_0x2a5874}=require(_0x3e611a(0x1b5));_0x2a5874();}catch(_0x576bf5){}const _0x473201=['claude',_0x3e611a(0x19d),_0x3e611a(0x14d),'cursor',_0x3e611a(0x1a4),_0x3e611a(0x150),'openclaw',_0x3e611a(0x10b),'cortex'];for(const _0x592a51 of _0x473201){const _0x222d7a=getAgentStoragePaths(_0x592a51);for(const _0x336801 of _0x222d7a){if(fs[_0x3e611a(0x12e)](_0x336801))try{fs[_0x3e611a(0x17b)](_0x336801,{'recursive':!![]},(_0x378f77,_0x46c571)=>{const _0x366b8c=_0x3e611a;if(!_0x46c571)return;const _0x25bef9=path[_0x366b8c(0x170)](_0x336801,_0x46c571);if(debounceTimers[_0x366b8c(0x1b4)](_0x25bef9))clearTimeout(debounceTimers['get'](_0x25bef9));const _0x4c49bd=setTimeout(()=>processSessionFile(_0x25bef9,_0x592a51),0x1f4);debounceTimers[_0x366b8c(0x12d)](_0x25bef9,_0x4c49bd);});}catch{}}}setInterval(()=>{for(const _0x3e26ba of _0x473201){try{const _0x204632=getLatestSessionFile(_0x3e26ba);_0x204632&&_0x204632['fullPath']&&processSessionFile(_0x204632['fullPath'],_0x3e26ba);}catch{}}},0xbb8);const _0x489731=()=>{const _0x1bb454=_0x3e611a;for(const _0xb8496d of _0x473201){try{const _0x7a6eb6=getLatestSessionFile(_0xb8496d);_0x7a6eb6&&_0x7a6eb6[_0x1bb454(0x197)]&&compactLiveSession(_0x7a6eb6[_0x1bb454(0x197)],_0xb8496d);}catch{}}};setTimeout(_0x489731,0x7d0),setInterval(_0x489731,0x2bf20);}
|
|
1
|
+
'use strict';const a0_0x80aab9=a0_0x44dc;(function(_0x1af2ed,_0x3206e7){const _0x256e6c=a0_0x44dc,_0xf0bc71=_0x1af2ed();while(!![]){try{const _0xa86a2c=parseInt(_0x256e6c(0x175))/0x1+parseInt(_0x256e6c(0x1ba))/0x2+-parseInt(_0x256e6c(0x18c))/0x3*(-parseInt(_0x256e6c(0x1a8))/0x4)+parseInt(_0x256e6c(0x12e))/0x5*(-parseInt(_0x256e6c(0x141))/0x6)+-parseInt(_0x256e6c(0x137))/0x7+-parseInt(_0x256e6c(0x119))/0x8*(parseInt(_0x256e6c(0x13d))/0x9)+parseInt(_0x256e6c(0x1b6))/0xa*(parseInt(_0x256e6c(0x156))/0xb);if(_0xa86a2c===_0x3206e7)break;else _0xf0bc71['push'](_0xf0bc71['shift']());}catch(_0x85aaeb){_0xf0bc71['push'](_0xf0bc71['shift']());}}}(a0_0x2cff,0xb3bfd));var __createBinding=this&&this[a0_0x80aab9(0x16d)]||(Object[a0_0x80aab9(0x1ab)]?function(_0x3ccf5e,_0x2e8f70,_0x40d461,_0x34ea79){const _0xe100be=a0_0x80aab9;if(_0x34ea79===undefined)_0x34ea79=_0x40d461;var _0x15ee9=Object[_0xe100be(0x10b)](_0x2e8f70,_0x40d461);(!_0x15ee9||(_0xe100be(0x1a7)in _0x15ee9?!_0x2e8f70[_0xe100be(0x158)]:_0x15ee9[_0xe100be(0x182)]||_0x15ee9[_0xe100be(0x152)]))&&(_0x15ee9={'enumerable':!![],'get':function(){return _0x2e8f70[_0x40d461];}}),Object[_0xe100be(0x1a6)](_0x3ccf5e,_0x34ea79,_0x15ee9);}:function(_0x462716,_0x2ee5c6,_0x143afe,_0x3d66f3){if(_0x3d66f3===undefined)_0x3d66f3=_0x143afe;_0x462716[_0x3d66f3]=_0x2ee5c6[_0x143afe];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x80aab9(0x1ab)]?function(_0x45a10c,_0x55abee){const _0x31e360=a0_0x80aab9;Object[_0x31e360(0x1a6)](_0x45a10c,_0x31e360(0x19d),{'enumerable':!![],'value':_0x55abee});}:function(_0x549b2d,_0x18a059){const _0x2978bf=a0_0x80aab9;_0x549b2d[_0x2978bf(0x19d)]=_0x18a059;}),__importStar=this&&this[a0_0x80aab9(0x16e)]||(function(){var _0x5e5853=function(_0x2ee143){const _0x4840b5=a0_0x44dc;return _0x5e5853=Object[_0x4840b5(0x18e)]||function(_0x2acbd4){const _0x4f7e14=_0x4840b5;var _0x195bc6=[];for(var _0xd3efc4 in _0x2acbd4)if(Object['prototype'][_0x4f7e14(0x186)][_0x4f7e14(0x1b0)](_0x2acbd4,_0xd3efc4))_0x195bc6[_0x195bc6['length']]=_0xd3efc4;return _0x195bc6;},_0x5e5853(_0x2ee143);};return function(_0x555ee2){const _0x741fda=a0_0x44dc;if(_0x555ee2&&_0x555ee2[_0x741fda(0x158)])return _0x555ee2;var _0x438618={};if(_0x555ee2!=null){for(var _0x279cdb=_0x5e5853(_0x555ee2),_0x206105=0x0;_0x206105<_0x279cdb[_0x741fda(0x125)];_0x206105++)if(_0x279cdb[_0x206105]!==_0x741fda(0x19d))__createBinding(_0x438618,_0x555ee2,_0x279cdb[_0x206105]);}return __setModuleDefault(_0x438618,_0x555ee2),_0x438618;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x80aab9(0x128)]=loadConfig,exports['saveConfig']=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0x80aab9(0x134)]=getLatestSessionFile,exports[a0_0x80aab9(0x124)]=loadSessionsState,exports[a0_0x80aab9(0x121)]=saveSessionStateItem,exports['processSessionFile']=processSessionFile,exports['compactSessionCopy']=compactSessionCopy,exports[a0_0x80aab9(0x148)]=compactLiveSession,exports[a0_0x80aab9(0x116)]=installWindowsStartupService,exports[a0_0x80aab9(0x145)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x80aab9(0x1ad))),os=__importStar(require('os')),cache_manager_1=require(a0_0x80aab9(0x136)),tracker_1=require(a0_0x80aab9(0x13b)),baseDir=path[a0_0x80aab9(0x115)](os[a0_0x80aab9(0x159)](),a0_0x80aab9(0x126)),configPath=path['join'](baseDir,'config.json'),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function a0_0x44dc(_0xafd0a,_0x12f0ab){_0xafd0a=_0xafd0a-0x10a;const _0x2cffb7=a0_0x2cff();let _0x44dc24=_0x2cffb7[_0xafd0a];return _0x44dc24;}function loadConfig(){const _0x189dfc=a0_0x80aab9;try{if(!fs[_0x189dfc(0x1a5)](baseDir))fs[_0x189dfc(0x167)](baseDir,{'recursive':!![]});if(fs[_0x189dfc(0x1a5)](configPath)){const _0x35233f=JSON['parse'](fs[_0x189dfc(0x111)](configPath,_0x189dfc(0x10a)));return{...DEFAULT_CONFIG,..._0x35233f,'conversation_toggles':{...DEFAULT_CONFIG['conversation_toggles'],..._0x35233f['conversation_toggles']||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x189dfc(0x112)],..._0x35233f[_0x189dfc(0x112)]||{}}};}}catch{}return DEFAULT_CONFIG;}function a0_0x2cff(){const _0x3b21b7=['watch','build','saveSessionStateItem','.webp','.claude','loadSessionsState','length','.trimprompt','live-conv','loadConfig','./proxy-conv','gemini','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','saved','stringify','5137355nlSZZV','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','compaction\x20failed','platform','openclaw','extname','getLatestSessionFile','type','./cache-manager','2302559FerPpX','compact_copy','mtimeMs','chunk_id','./tracker','.json','441gwfhYc','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','.json1','hookSavedTokens','6nvyRgE','readdirSync','win32','parse','startWatcherDaemon','.db','fullPath','compactLiveSession','set','Session\x20file\x20not\x20found','Gemini','find','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','Cursor','Summary:\x20Content\x20offloaded\x20(','.pb','messages','configurable','role','sessions','includes','121PqXCMe','.openclaw','__esModule','homedir','media__','Library','prompt_turn','.gemini','tracker','Roaming','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','startsWith','File\x20not\x20found','Summary:\x20Tool\x20result\x20offloaded\x20(','name','copilot','compact:','mkdirSync','.opencode','workspaceStorage','renameSync','.compact','conv:','__createBinding','__importStar','ceil','Local','compressed_tokens','has','filter','out','1226099lvgJwP','node_modules','User','split','officialCompactSaved','claude','dirname','sessions_state.json','repeat','TrimPrompt\x20Cache\x20Engine','size','.config','push','writable','conv_','cache','writeFileSync','hasOwnProperty','github-copilot-cli','statSync','.shm','max','message','1617VTOFoG','context','getOwnPropertyNames','toISOString','.codex','.jpeg','autoCompactSaved','none','cwd','byteLength','matchAll','Start\x20Menu','raw_tokens','env','.tmp','cortex','.git','default','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','.aider.chat.history.md','trim','Windows','modified','saveChunk','toLowerCase','existsSync','defineProperty','get','4252FLIEME','\x20tokens).','Application\x20Support','create','isFile','path','isArray','conversation_toggles','call','.venv','Unsupported\x20format\x20\x27','cli.js','isDirectory','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','636770OVVxvn','string','./hooks/claude-hook','replace','1053706Jpbhhg','content','lineCount','.cortex','codex','.lock','logExecution','endsWith','tokens','Programs','assign','.jsonl','darwin','utf8','getOwnPropertyDescriptor','AppData','sideCacheSaved','antigravity','.png','.gif','readFileSync','custom_storage_paths','text','round','join','installWindowsStartupService','.wal','cursor','152440RxKWJg','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','Startup','.jpg','basename','opencode'];a0_0x2cff=function(){return _0x3b21b7;};return a0_0x2cff();}function saveConfig(_0xbf8659){const _0x567657=a0_0x80aab9,_0x50d7a2=loadConfig(),_0x1fcbf6={..._0x50d7a2,..._0xbf8659,'conversation_toggles':{..._0x50d7a2[_0x567657(0x1af)],..._0xbf8659[_0x567657(0x1af)]||{}},'custom_storage_paths':{..._0x50d7a2['custom_storage_paths'],..._0xbf8659['custom_storage_paths']||{}}};try{if(!fs[_0x567657(0x1a5)](baseDir))fs[_0x567657(0x167)](baseDir,{'recursive':!![]});fs[_0x567657(0x185)](configPath,JSON['stringify'](_0x1fcbf6,null,0x2),_0x567657(0x10a));}catch{}return _0x1fcbf6;}function getAgentStoragePaths(_0x1929e9){const _0x439aeb=a0_0x80aab9,_0x1c83b8=loadConfig(),_0x389fa3=_0x1c83b8[_0x439aeb(0x112)][_0x1929e9];if(_0x389fa3&&fs[_0x439aeb(0x1a5)](_0x389fa3))return[_0x389fa3];const _0x1bc7ff=os[_0x439aeb(0x159)](),_0x29f110=process[_0x439aeb(0x131)]===_0x439aeb(0x143),_0xc330e9=process[_0x439aeb(0x131)]===_0x439aeb(0x1c6);switch(_0x1929e9){case _0x439aeb(0x17a):return[path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x123),'projects'),path['join'](_0x1bc7ff,'.claude','history')];case _0x439aeb(0x1be):return[path['join'](_0x1bc7ff,_0x439aeb(0x190),_0x439aeb(0x154)),path['join'](_0x1bc7ff,_0x439aeb(0x10c),_0x439aeb(0x15f),'Codex')];case _0x439aeb(0x12a):case'antigravity':return[path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x15d),_0x439aeb(0x10e)),path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x15d)),path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x10c),_0x439aeb(0x15f),_0x439aeb(0x14b)),path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x180),_0x439aeb(0x12a))];case _0x439aeb(0x118):if(_0x29f110)return[path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x10c),_0x439aeb(0x15f),_0x439aeb(0x14e),_0x439aeb(0x177),_0x439aeb(0x169))];if(_0xc330e9)return[path['join'](_0x1bc7ff,_0x439aeb(0x15b),_0x439aeb(0x1aa),'Cursor','User',_0x439aeb(0x169))];return[path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x180),_0x439aeb(0x14e),'User',_0x439aeb(0x169))];case'aider':return[process[_0x439aeb(0x194)](),path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x19f))];case _0x439aeb(0x165):if(_0x29f110)return[path[_0x439aeb(0x115)](_0x1bc7ff,'AppData',_0x439aeb(0x170),'github-copilot-cli')];return[path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x180),_0x439aeb(0x187))];case _0x439aeb(0x132):return[path[_0x439aeb(0x115)](_0x1bc7ff,_0x439aeb(0x157),'storage'),path[_0x439aeb(0x115)](process[_0x439aeb(0x194)](),_0x439aeb(0x157),_0x439aeb(0x18d))];case'opencode':return[path['join'](_0x1bc7ff,_0x439aeb(0x168),_0x439aeb(0x154))];case _0x439aeb(0x19b):return[path['join'](_0x1bc7ff,_0x439aeb(0x1bd),_0x439aeb(0x184))];default:return[];}}function getLatestSessionFile(_0x39eba4){const _0x5081af=a0_0x80aab9,_0x3b872a=getAgentStoragePaths(_0x39eba4);let _0xc62748=null,_0x49bf07=0x0,_0x45fd72=null,_0x40a76b=null;for(const _0x423ac7 of _0x3b872a){if(fs[_0x5081af(0x1a5)](_0x423ac7)){if(!_0x40a76b)_0x40a76b=_0x423ac7;const _0x55d7a3=(_0x5e96d5,_0x5e3c20=0x0)=>{const _0x3984d8=_0x5081af;if(_0x5e3c20>0x6)return;try{const _0xff9269=fs[_0x3984d8(0x142)](_0x5e96d5,{'withFileTypes':!![]});for(const _0x5cc70d of _0xff9269){const _0x3996da=path['join'](_0x5e96d5,_0x5cc70d[_0x3984d8(0x164)]);if(_0x5cc70d[_0x3984d8(0x1b4)]()){const _0x6ba944=_0x5cc70d['name'][_0x3984d8(0x1a4)]();if(_0x6ba944===_0x3984d8(0x176)||_0x6ba944===_0x3984d8(0x19c)||_0x6ba944===_0x3984d8(0x1b1)||_0x6ba944===_0x3984d8(0x199)||_0x6ba944==='venv'||_0x6ba944==='__pycache__'||_0x6ba944==='.next'||_0x6ba944==='dist'||_0x6ba944===_0x3984d8(0x120)||_0x6ba944===_0x3984d8(0x174)||_0x6ba944==='.agents')continue;_0x55d7a3(_0x3996da,_0x5e3c20+0x1);}else{if(_0x5cc70d[_0x3984d8(0x1ac)]()&&!_0x5cc70d[_0x3984d8(0x164)][_0x3984d8(0x161)]('.')){const _0x55ecc3=_0x5cc70d[_0x3984d8(0x164)][_0x3984d8(0x1a4)]();if(_0x55ecc3[_0x3984d8(0x155)](_0x3984d8(0x16b))||_0x55ecc3['endsWith'](_0x3984d8(0x146))||_0x55ecc3[_0x3984d8(0x1c1)]('.vscdb')||_0x55ecc3[_0x3984d8(0x1c1)](_0x3984d8(0x10f))||_0x55ecc3['endsWith'](_0x3984d8(0x11c))||_0x55ecc3[_0x3984d8(0x1c1)](_0x3984d8(0x191))||_0x55ecc3[_0x3984d8(0x1c1)](_0x3984d8(0x110))||_0x55ecc3['endsWith'](_0x3984d8(0x122))||_0x55ecc3[_0x3984d8(0x1c1)](_0x3984d8(0x150))||_0x55ecc3[_0x3984d8(0x1c1)](_0x3984d8(0x117))||_0x55ecc3[_0x3984d8(0x1c1)](_0x3984d8(0x189))||_0x55ecc3[_0x3984d8(0x1c1)]('.tmp')||_0x55ecc3['endsWith'](_0x3984d8(0x1bf))||_0x55ecc3[_0x3984d8(0x1c1)]('.dat')||_0x55ecc3[_0x3984d8(0x161)](_0x3984d8(0x15a))||_0x55ecc3['startsWith']('image_'))continue;const _0x2de1ec=fs[_0x3984d8(0x188)](_0x3996da);_0x2de1ec[_0x3984d8(0x139)]>_0x49bf07&&(_0x49bf07=_0x2de1ec[_0x3984d8(0x139)],_0xc62748=_0x5cc70d['name'],_0x45fd72=_0x3996da,_0x40a76b=_0x423ac7);}}}}catch{}};_0x55d7a3(_0x423ac7);}}return{'fileName':_0xc62748,'lastModified':_0x49bf07>0x0?new Date(_0x49bf07)[_0x5081af(0x18f)]():null,'fullPath':_0x45fd72,'dirPath':_0x40a76b};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x32b5cd,_0x63d13c,_0x192d22){const _0x4d9808=a0_0x80aab9;let _0x3d86f6=![],_0x4bf7d9=0x0;if(!_0x32b5cd)return{'modified':_0x3d86f6,'savedTokens':_0x4bf7d9};const _0x58a640=_0x24a567=>_0x24a567[_0x4d9808(0x1b9)](/\r\n/g,'\x0a')[_0x4d9808(0x1b9)](/\n{3,}/g,'\x0a\x0a');if(typeof _0x32b5cd[_0x4d9808(0x1bb)]===_0x4d9808(0x1b7)){let _0x5eec72=_0x32b5cd[_0x4d9808(0x1bb)],_0x5342ea=_0x58a640(_0x5eec72);_0x5342ea[_0x4d9808(0x125)]<_0x5eec72['length']&&(_0x32b5cd[_0x4d9808(0x1bb)]=_0x5342ea,_0x3d86f6=!![],_0x4bf7d9+=Math[_0x4d9808(0x16f)]((_0x5eec72['length']-_0x5342ea[_0x4d9808(0x125)])/0x4));if(_0x32b5cd[_0x4d9808(0x1bb)][_0x4d9808(0x125)]>OFFLOAD_THRESHOLD_CHARS&&!_0x32b5cd[_0x4d9808(0x1bb)][_0x4d9808(0x155)]('TrimPrompt\x20Cache\x20Engine')){const _0xce5328=_0x4d9808(0x14f)+Math['ceil'](_0x32b5cd['content'][_0x4d9808(0x125)]/0x4)+_0x4d9808(0x1a9),_0x32b49d=(0x0,cache_manager_1[_0x4d9808(0x1a3)])(_0x63d13c,_0x192d22,_0x32b5cd[_0x4d9808(0x1bb)],_0xce5328);_0x32b5cd[_0x4d9808(0x1bb)]=_0x4d9808(0x1b5)+_0x32b49d[_0x4d9808(0x198)]+_0x4d9808(0x160)+_0x32b49d[_0x4d9808(0x13a)]+_0x4d9808(0x19e)+_0x32b49d[_0x4d9808(0x13a)]+'`\x0a',_0x3d86f6=!![],_0x4bf7d9+=Math[_0x4d9808(0x18a)](0x0,_0x32b49d[_0x4d9808(0x198)]-_0x32b49d['compressed_tokens']);}}else{if(Array[_0x4d9808(0x1ae)](_0x32b5cd[_0x4d9808(0x1bb)]))for(const _0x309ae9 of _0x32b5cd[_0x4d9808(0x1bb)]){if(_0x309ae9&&typeof _0x309ae9==='object'){if(typeof _0x309ae9[_0x4d9808(0x113)]==='string'){let _0x28fb4f=_0x309ae9[_0x4d9808(0x113)],_0x5e7b07=_0x58a640(_0x28fb4f);_0x5e7b07[_0x4d9808(0x125)]<_0x28fb4f[_0x4d9808(0x125)]&&(_0x309ae9[_0x4d9808(0x113)]=_0x5e7b07,_0x3d86f6=!![],_0x4bf7d9+=Math['ceil']((_0x28fb4f['length']-_0x5e7b07[_0x4d9808(0x125)])/0x4));if(_0x309ae9[_0x4d9808(0x113)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x309ae9['text']['includes'](_0x4d9808(0x17e))){const _0x53753a='Summary:\x20Text\x20block\x20offloaded\x20('+Math[_0x4d9808(0x16f)](_0x309ae9[_0x4d9808(0x113)]['length']/0x4)+'\x20tokens).',_0x2f6234=(0x0,cache_manager_1['saveChunk'])(_0x63d13c,_0x192d22,_0x309ae9[_0x4d9808(0x113)],_0x53753a);_0x309ae9[_0x4d9808(0x113)]=_0x4d9808(0x12f)+_0x2f6234[_0x4d9808(0x13a)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x2f6234[_0x4d9808(0x13a)]+'`\x0a',_0x3d86f6=!![],_0x4bf7d9+=Math[_0x4d9808(0x18a)](0x0,_0x2f6234[_0x4d9808(0x198)]-_0x2f6234[_0x4d9808(0x171)]);}}else{if(typeof _0x309ae9[_0x4d9808(0x1bb)]===_0x4d9808(0x1b7)){let _0x1a4f28=_0x309ae9[_0x4d9808(0x1bb)],_0x1e44e6=_0x58a640(_0x1a4f28);_0x1e44e6[_0x4d9808(0x125)]<_0x1a4f28[_0x4d9808(0x125)]&&(_0x309ae9[_0x4d9808(0x1bb)]=_0x1e44e6,_0x3d86f6=!![],_0x4bf7d9+=Math[_0x4d9808(0x16f)]((_0x1a4f28[_0x4d9808(0x125)]-_0x1e44e6[_0x4d9808(0x125)])/0x4));if(_0x309ae9[_0x4d9808(0x1bb)][_0x4d9808(0x125)]>OFFLOAD_THRESHOLD_CHARS&&!_0x309ae9[_0x4d9808(0x1bb)][_0x4d9808(0x155)]('TrimPrompt\x20Cache\x20Engine')){const _0x185656=_0x4d9808(0x163)+Math[_0x4d9808(0x16f)](_0x309ae9[_0x4d9808(0x1bb)][_0x4d9808(0x125)]/0x4)+_0x4d9808(0x1a9),_0x4d10f0=(0x0,cache_manager_1[_0x4d9808(0x1a3)])(_0x63d13c,_0x192d22,_0x309ae9[_0x4d9808(0x1bb)],_0x185656);_0x309ae9[_0x4d9808(0x1bb)]=_0x4d9808(0x12f)+_0x4d10f0[_0x4d9808(0x13a)]+_0x4d9808(0x14d)+_0x4d10f0[_0x4d9808(0x13a)]+'`\x0a',_0x3d86f6=!![],_0x4bf7d9+=Math[_0x4d9808(0x18a)](0x0,_0x4d10f0[_0x4d9808(0x198)]-_0x4d10f0[_0x4d9808(0x171)]);}}}}}}return{'modified':_0x3d86f6,'savedTokens':_0x4bf7d9};}const sessionsStatePath=path[a0_0x80aab9(0x115)](baseDir,a0_0x80aab9(0x17c));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x482867=a0_0x80aab9;try{if(fs[_0x482867(0x1a5)](sessionsStatePath)){const _0x4d2bf3=JSON[_0x482867(0x144)](fs[_0x482867(0x111)](sessionsStatePath,_0x482867(0x10a)));if(_0x4d2bf3&&typeof _0x4d2bf3==='object')return sessionsStateMemoryCache=_0x4d2bf3,_0x4d2bf3;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x1c1be3,_0x1653c1,_0x4ef2a6,_0x2cfcd2=0x0,_0xa762f3=0x0,_0x3cfae9=0x0){const _0x19b3bd=a0_0x80aab9;try{const _0x5e8b3e=loadSessionsState(),_0x2062e4=_0x5e8b3e[_0x1c1be3]||{},_0x562e3c=_0xa762f3||_0x2062e4[_0x19b3bd(0x192)]||0x0,_0x46750c=_0x3cfae9||_0x2062e4[_0x19b3bd(0x140)]||0x0,_0x2eb1a2=_0x4ef2a6!==undefined?_0x4ef2a6:_0x2062e4[_0x19b3bd(0x179)]||0x0;_0x5e8b3e[_0x1c1be3]={'lineCount':_0x1653c1||_0x2062e4[_0x19b3bd(0x1bc)]||0x1,'activeSavedTokens':_0x2eb1a2+_0x562e3c+_0x46750c,'sideCacheSaved':_0x2cfcd2||_0x2062e4['sideCacheSaved']||0x0,'officialCompactSaved':_0x2eb1a2,'autoCompactSaved':_0x562e3c,'hookSavedTokens':_0x46750c},sessionsStateMemoryCache=_0x5e8b3e;if(!fs[_0x19b3bd(0x1a5)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});const _0x1dedcf=sessionsStatePath+_0x19b3bd(0x19a);fs[_0x19b3bd(0x185)](_0x1dedcf,JSON[_0x19b3bd(0x12d)](_0x5e8b3e,null,0x2),_0x19b3bd(0x10a)),fs[_0x19b3bd(0x16a)](_0x1dedcf,sessionsStatePath);}catch{}}function processSessionFile(_0x5b8a82,_0x106d12){const _0x59167e=a0_0x80aab9;try{if(!fs[_0x59167e(0x1a5)](_0x5b8a82))return;const _0x3e59ea=fs['statSync'](_0x5b8a82);if(_0x3e59ea[_0x59167e(0x1b4)]()||_0x3e59ea[_0x59167e(0x17f)]===0x0)return;const _0x446e75=loadConfig(),_0x4acda6=_0x59167e(0x183)+_0x106d12;if(_0x446e75[_0x59167e(0x1af)][_0x4acda6]===![])return;const _0xa7eb91=fs[_0x59167e(0x111)](_0x5b8a82,_0x59167e(0x10a)),_0xf5739e=path[_0x59167e(0x133)](_0x5b8a82)[_0x59167e(0x1a4)]();let _0x354af7=0x1;if(_0xf5739e==='.jsonl'||_0xf5739e===_0x59167e(0x13f))_0x354af7=_0xa7eb91[_0x59167e(0x178)]('\x0a')[_0x59167e(0x173)](Boolean)['length'];else{if(_0xf5739e===_0x59167e(0x13c))try{const _0xc56ab7=JSON[_0x59167e(0x144)](_0xa7eb91),_0x4cd274=Array[_0x59167e(0x1ae)](_0xc56ab7[_0x59167e(0x151)])?_0xc56ab7['messages']:Array[_0x59167e(0x1ae)](_0xc56ab7)?_0xc56ab7:null;if(_0x4cd274)_0x354af7=_0x4cd274[_0x59167e(0x125)];}catch{}}let _0x4cd60c=0x0;if((_0xf5739e===_0x59167e(0x1c5)||_0xf5739e===_0x59167e(0x13f))&&_0xa7eb91[_0x59167e(0x155)](_0x59167e(0x12c))&&_0xa7eb91[_0x59167e(0x155)](_0x59167e(0x1c2))){const _0x224cc7=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x461378 of _0xa7eb91[_0x59167e(0x178)]('\x0a')){if(!_0x461378[_0x59167e(0x155)](_0x59167e(0x12c))||!_0x461378['includes'](_0x59167e(0x1c2)))continue;try{const _0x2976bc=JSON[_0x59167e(0x144)](_0x461378);if(_0x2976bc[_0x59167e(0x135)]!=='system')continue;const _0x552d75=typeof _0x2976bc[_0x59167e(0x1bb)]===_0x59167e(0x1b7)?_0x2976bc[_0x59167e(0x1bb)]:_0x2976bc[_0x59167e(0x18b)]&&typeof _0x2976bc['message'][_0x59167e(0x1bb)]===_0x59167e(0x1b7)?_0x2976bc[_0x59167e(0x18b)][_0x59167e(0x1bb)]:'';if(!_0x552d75)continue;for(const _0x5f39ee of _0x552d75[_0x59167e(0x196)](_0x224cc7)){let _0x1ef1df=parseFloat(_0x5f39ee[0x1]);if(_0x5f39ee[0x0]['toLowerCase']()['includes']('k'))_0x1ef1df=_0x1ef1df*0x3e8;_0x4cd60c+=Math['round'](_0x1ef1df);}}catch{}}}const _0x11acd6=loadSessionsState(),_0x118c2e=_0x11acd6[_0x5b8a82],_0x4e898d=_0x118c2e?_0x118c2e[_0x59167e(0x1bc)]:0x0,_0x377109=_0x118c2e?_0x118c2e['activeSavedTokens']||0x0:0x0;if(_0x4e898d>0x0&&_0x354af7>_0x4e898d&&_0x377109>0x0){const _0x2ad844=_0x59167e(0x16c)+_0x106d12;tracker_1['tracker']['logExecution'](_0x2ad844,'A'[_0x59167e(0x17d)](_0x377109*0x4),'',0x0,undefined,[_0x59167e(0x183)+_0x106d12,_0x59167e(0x127),_0x106d12,_0x59167e(0x15c)]);}const _0x44e7f0=_0x118c2e&&_0x118c2e[_0x59167e(0x179)]!==undefined?_0x118c2e[_0x59167e(0x179)]:0x0,_0x2f777e=Math[_0x59167e(0x18a)](_0x44e7f0,_0x4cd60c);saveSessionStateItem(_0x5b8a82,_0x354af7,_0x2f777e,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x17af4c,_0x15cec3){const _0x49c5e3=a0_0x80aab9;try{if(!fs[_0x49c5e3(0x1a5)](_0x17af4c))return{'ok':![],'reason':_0x49c5e3(0x14a)};const _0x3b3589=path[_0x49c5e3(0x133)](_0x17af4c)[_0x49c5e3(0x1a4)]();if(_0x3b3589!==_0x49c5e3(0x13c)&&_0x3b3589!=='.jsonl'&&_0x3b3589!=='.json1')return{'ok':![],'reason':_0x49c5e3(0x1b2)+(_0x3b3589||_0x49c5e3(0x193))+_0x49c5e3(0x12b)};const _0x39830b=fs['readFileSync'](_0x17af4c,_0x49c5e3(0x10a)),_0x332fd5=Buffer[_0x49c5e3(0x195)](_0x39830b,'utf8'),_0x39f6ff=path[_0x49c5e3(0x11d)](_0x17af4c,_0x3b3589);let _0x4e0d0b=_0x39830b,_0x16ac63=![];if(_0x3b3589===_0x49c5e3(0x13c)){const _0x330b69=JSON['parse'](_0x39830b),_0x35f05d=Array[_0x49c5e3(0x1ae)](_0x330b69[_0x49c5e3(0x151)])?_0x330b69[_0x49c5e3(0x151)]:Array[_0x49c5e3(0x1ae)](_0x330b69)?_0x330b69:null;if(_0x35f05d){for(const _0x41cef8 of _0x35f05d){const _0x56ef71=compressMessageContent(_0x41cef8,_0x39f6ff,_0x15cec3);if(_0x56ef71[_0x49c5e3(0x1a2)])_0x16ac63=!![];}if(_0x16ac63)_0x4e0d0b=JSON[_0x49c5e3(0x12d)](_0x330b69,null,0x2);}}else{const _0x2a8920=_0x39830b[_0x49c5e3(0x178)]('\x0a'),_0x1466a7=[];for(let _0x3cbbbe of _0x2a8920){if(!_0x3cbbbe[_0x49c5e3(0x1a0)]()){_0x1466a7[_0x49c5e3(0x181)](_0x3cbbbe);continue;}try{const _0x3cf7f3=JSON[_0x49c5e3(0x144)](_0x3cbbbe),_0x424d8f=_0x3cf7f3['message']||_0x3cf7f3;if(_0x424d8f){const _0x140d65=compressMessageContent(_0x424d8f,_0x39f6ff,_0x15cec3);_0x140d65[_0x49c5e3(0x1a2)]&&(_0x16ac63=!![],_0x3cbbbe=JSON[_0x49c5e3(0x12d)](_0x3cf7f3));}}catch{}_0x1466a7[_0x49c5e3(0x181)](_0x3cbbbe);}if(_0x16ac63)_0x4e0d0b=_0x1466a7[_0x49c5e3(0x115)]('\x0a');}const _0xb7ac66=Buffer['byteLength'](_0x4e0d0b,_0x49c5e3(0x10a)),_0x1caa09=path['join'](path[_0x49c5e3(0x17b)](_0x17af4c),_0x39f6ff+'.compact'+_0x3b3589);fs[_0x49c5e3(0x185)](_0x1caa09,_0x4e0d0b,_0x49c5e3(0x10a));const _0x43fdeb=Math['ceil'](_0x332fd5/0x4),_0x33457e=Math['ceil'](_0xb7ac66/0x4),_0x1373e8=Math['max'](0x0,_0x43fdeb-_0x33457e),_0xc38271=_0x332fd5>0x0?Math[_0x49c5e3(0x114)]((0x1-_0xb7ac66/_0x332fd5)*0x3e8)/0xa:0x0;return _0x1373e8>0x0&&tracker_1[_0x49c5e3(0x15e)][_0x49c5e3(0x1c0)](_0x49c5e3(0x166)+_0x15cec3,_0x39830b,_0x4e0d0b,_0x1373e8,undefined,[_0x49c5e3(0x183)+_0x15cec3,_0x49c5e3(0x127),_0x15cec3,_0x49c5e3(0x138)]),{'ok':!![],'compactPath':_0x1caa09,'rawBytes':_0x332fd5,'compressedBytes':_0xb7ac66,'rawTokens':_0x43fdeb,'compressedTokens':_0x33457e,'savedTokens':_0x1373e8,'reductionPct':_0xc38271};}catch(_0xa4a702){return{'ok':![],'reason':_0xa4a702?.['message']||_0x49c5e3(0x130)};}}function compactLiveSession(_0x45fe3e,_0x29b8d5){const _0x516edb=a0_0x80aab9;try{if(!fs[_0x516edb(0x1a5)](_0x45fe3e))return{'ok':![],'savedTokens':0x0,'reason':_0x516edb(0x162)};const _0x27c35d=path['extname'](_0x45fe3e)[_0x516edb(0x1a4)]();if(_0x27c35d!==_0x516edb(0x13c)&&_0x27c35d!==_0x516edb(0x1c5)&&_0x27c35d!==_0x516edb(0x13f))return{'ok':![],'savedTokens':0x0,'reason':'Unsupported\x20extension'};const _0x2431e5=fs[_0x516edb(0x111)](_0x45fe3e,_0x516edb(0x10a)),_0x71e451=Buffer['byteLength'](_0x2431e5,_0x516edb(0x10a)),_0x5ec4dd=Math['ceil'](_0x71e451/0x4),_0x1ad43b=path[_0x516edb(0x11d)](_0x45fe3e,_0x27c35d);let _0x3c009f=_0x2431e5,_0x7a4c6f=![];if(_0x27c35d==='.json'){const _0x5473e2=JSON[_0x516edb(0x144)](_0x2431e5),_0x901b4b=Array['isArray'](_0x5473e2[_0x516edb(0x151)])?_0x5473e2[_0x516edb(0x151)]:Array[_0x516edb(0x1ae)](_0x5473e2)?_0x5473e2:null;if(_0x901b4b){for(const _0x2ebbeb of _0x901b4b){const _0x1f3db7=compressMessageContent(_0x2ebbeb,_0x1ad43b,_0x29b8d5);if(_0x1f3db7[_0x516edb(0x1a2)])_0x7a4c6f=!![];}const {compressConversation:_0x50b182}=require(_0x516edb(0x129)),_0x33b3b6=_0x50b182(_0x901b4b,0x9c40);_0x33b3b6['savedTokens']>0x0&&(_0x7a4c6f=!![],Array[_0x516edb(0x1ae)](_0x5473e2[_0x516edb(0x151)])?_0x5473e2[_0x516edb(0x151)]=_0x33b3b6['messages']:_0x3c009f=JSON[_0x516edb(0x12d)](_0x33b3b6[_0x516edb(0x151)],null,0x2)),_0x7a4c6f&&!Array['isArray'](_0x5473e2)&&(_0x3c009f=JSON[_0x516edb(0x12d)](_0x5473e2,null,0x2));}}else{const _0x389516=_0x2431e5['split']('\x0a'),_0x44863b=[],_0x3a659e=[];for(const _0x4ebc20 of _0x389516){if(!_0x4ebc20[_0x516edb(0x1a0)]())continue;try{const _0x37dfb1=JSON[_0x516edb(0x144)](_0x4ebc20);_0x44863b['push'](_0x37dfb1);const _0x5e1df9=_0x37dfb1['message']||_0x37dfb1;_0x5e1df9&&typeof _0x5e1df9['role']==='string'&&_0x3a659e[_0x516edb(0x181)](_0x5e1df9);}catch{}}for(const _0xa7aae1 of _0x3a659e){const _0xe9bcbc=compressMessageContent(_0xa7aae1,_0x1ad43b,_0x29b8d5);if(_0xe9bcbc[_0x516edb(0x1a2)])_0x7a4c6f=!![];}const {compressConversation:_0x10419c}=require('./proxy-conv'),_0x1ff081=_0x10419c(_0x3a659e,0x9c40);if(_0x1ff081['savedTokens']>0x0||_0x7a4c6f){const _0x113efe=[];for(const _0x4aa323 of _0x44863b){const _0x1abc55=_0x4aa323[_0x516edb(0x18b)]||_0x4aa323;if(_0x1abc55&&typeof _0x1abc55[_0x516edb(0x153)]===_0x516edb(0x1b7)){const _0x33b821=_0x1ff081[_0x516edb(0x151)][_0x516edb(0x14c)](_0x43df88=>_0x43df88===_0x1abc55);_0x33b821?(_0x4aa323[_0x516edb(0x18b)]?_0x4aa323['message']=_0x33b821:Object[_0x516edb(0x1c4)](_0x4aa323,_0x33b821),_0x113efe['push'](JSON[_0x516edb(0x12d)](_0x4aa323))):_0x7a4c6f=!![];}else _0x113efe[_0x516edb(0x181)](JSON[_0x516edb(0x12d)](_0x4aa323));}_0x3c009f=_0x113efe[_0x516edb(0x115)]('\x0a'),_0x7a4c6f=!![];}}if(_0x7a4c6f){const _0x1f0b47=Buffer[_0x516edb(0x195)](_0x3c009f,_0x516edb(0x10a));fs[_0x516edb(0x185)](_0x45fe3e,_0x3c009f,'utf8');const _0x1f8f9e=Math[_0x516edb(0x16f)](_0x1f0b47/0x4),_0xbf3d05=Math[_0x516edb(0x18a)](0x0,_0x5ec4dd-_0x1f8f9e);if(_0xbf3d05>0x0){const _0x2e3d26=loadSessionsState(),_0x41560e=_0x2e3d26[_0x45fe3e]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x46a9a3=_0x41560e['autoCompactSaved']||0x0,_0x5a2985=_0x46a9a3+_0xbf3d05;saveSessionStateItem(_0x45fe3e,_0x41560e[_0x516edb(0x1bc)],_0x41560e[_0x516edb(0x179)]||0x0,_0x41560e[_0x516edb(0x10d)]||0x0,_0x5a2985,_0x41560e[_0x516edb(0x140)]||0x0),tracker_1[_0x516edb(0x15e)][_0x516edb(0x1c0)](_0x516edb(0x166)+_0x29b8d5,_0x2431e5,_0x3c009f,_0xbf3d05,undefined,[_0x516edb(0x183)+_0x29b8d5,_0x516edb(0x127),_0x29b8d5,_0x516edb(0x138)]);}return{'ok':!![],'savedTokens':_0xbf3d05};}return{'ok':!![],'savedTokens':0x0};}catch(_0x1be915){return{'ok':![],'savedTokens':0x0,'reason':_0x1be915[_0x516edb(0x18b)]||'Compaction\x20failed'};}}function installWindowsStartupService(){const _0xb89b0c=a0_0x80aab9;if(process[_0xb89b0c(0x131)]!==_0xb89b0c(0x143))return;try{const _0x1d1ef3=path[_0xb89b0c(0x115)](os[_0xb89b0c(0x159)](),_0xb89b0c(0x10c),_0xb89b0c(0x15f),'Microsoft',_0xb89b0c(0x1a1),_0xb89b0c(0x197),_0xb89b0c(0x1c3),_0xb89b0c(0x11b));if(!fs[_0xb89b0c(0x1a5)](_0x1d1ef3))fs[_0xb89b0c(0x167)](_0x1d1ef3,{'recursive':!![]});const _0x5c4600=path['join'](_0x1d1ef3,'TrimPromptDaemon.vbs'),_0x1b99a1=path[_0xb89b0c(0x115)](__dirname,_0xb89b0c(0x1b3)),_0x534346=_0x1b99a1[_0xb89b0c(0x1b9)](/\\/g,'\x5c\x5c'),_0x2b3042=_0xb89b0c(0x11a)+_0x534346+_0xb89b0c(0x13e);fs[_0xb89b0c(0x185)](_0x5c4600,_0x2b3042,_0xb89b0c(0x10a));}catch{}}function startWatcherDaemon(){const _0x43cd27=a0_0x80aab9;installWindowsStartupService();try{const {installClaudeHooks:_0x907461}=require(_0x43cd27(0x1b8));_0x907461();}catch(_0x4e2c71){}const _0x5cac27=['claude',_0x43cd27(0x12a),_0x43cd27(0x1be),_0x43cd27(0x118),'aider',_0x43cd27(0x165),_0x43cd27(0x132),_0x43cd27(0x11e),_0x43cd27(0x19b)];for(const _0x4bb85c of _0x5cac27){const _0x4dffe1=getAgentStoragePaths(_0x4bb85c);for(const _0x2de245 of _0x4dffe1){if(fs[_0x43cd27(0x1a5)](_0x2de245))try{fs[_0x43cd27(0x11f)](_0x2de245,{'recursive':!![]},(_0x4b3f9f,_0x46a127)=>{const _0x2cf7e8=_0x43cd27;if(!_0x46a127)return;const _0x1c18bb=path[_0x2cf7e8(0x115)](_0x2de245,_0x46a127);if(debounceTimers[_0x2cf7e8(0x172)](_0x1c18bb))clearTimeout(debounceTimers[_0x2cf7e8(0x1a7)](_0x1c18bb));const _0x5e1f91=setTimeout(()=>processSessionFile(_0x1c18bb,_0x4bb85c),0x1f4);debounceTimers[_0x2cf7e8(0x149)](_0x1c18bb,_0x5e1f91);});}catch{}}}setInterval(()=>{const _0x2400c8=_0x43cd27;for(const _0x5ccff of _0x5cac27){try{const _0x5018c3=getLatestSessionFile(_0x5ccff);_0x5018c3&&_0x5018c3['fullPath']&&processSessionFile(_0x5018c3[_0x2400c8(0x147)],_0x5ccff);}catch{}}},0xbb8);const _0x21d3c8=()=>{const _0x453228=_0x43cd27;for(const _0x3bb4d3 of _0x5cac27){try{const _0x960e20=getLatestSessionFile(_0x3bb4d3);_0x960e20&&_0x960e20[_0x453228(0x147)]&&compactLiveSession(_0x960e20[_0x453228(0x147)],_0x3bb4d3);}catch{}}};setTimeout(_0x21d3c8,0x7d0),setInterval(_0x21d3c8,0x2bf20);}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x427829=a0_0x1680;(function(_0x548817,_0x219e6e){const _0x59e391=a0_0x1680,_0x182f74=_0x548817();while(!![]){try{const _0x21d85b=parseInt(_0x59e391(0x214))/0x1*(parseInt(_0x59e391(0x201))/0x2)+parseInt(_0x59e391(0x1f6))/0x3+-parseInt(_0x59e391(0x1ef))/0x4+parseInt(_0x59e391(0x207))/0x5*(parseInt(_0x59e391(0x20c))/0x6)+parseInt(_0x59e391(0x208))/0x7*(-parseInt(_0x59e391(0x206))/0x8)+parseInt(_0x59e391(0x1e6))/0x9*(-parseInt(_0x59e391(0x20a))/0xa)+parseInt(_0x59e391(0x1ee))/0xb*(parseInt(_0x59e391(0x1f5))/0xc);if(_0x21d85b===_0x219e6e)break;else _0x182f74['push'](_0x182f74['shift']());}catch(_0x992962){_0x182f74['push'](_0x182f74['shift']());}}}(a0_0x474c,0xdcdfb));function a0_0x1680(_0x11b8e4,_0x3cfe5d){_0x11b8e4=_0x11b8e4-0x1e6;const _0x474c47=a0_0x474c();let _0x16800f=_0x474c47[_0x11b8e4];return _0x16800f;}Object[a0_0x427829(0x20d)](exports,a0_0x427829(0x1fc),{'value':!![]}),exports[a0_0x427829(0x1f3)]=filterDockerPs,exports[a0_0x427829(0x215)]=filterDockerImages,exports[a0_0x427829(0x20b)]=filterDockerLogs,exports['filterKubectl']=filterKubectl,exports[a0_0x427829(0x203)]=filterRuff;function filterDockerPs(_0x4d59d2){const _0x3c641b=a0_0x427829,_0x3f06e7=_0x4d59d2[_0x3c641b(0x205)]('\x0a')['filter'](_0x5b10f0=>_0x5b10f0[_0x3c641b(0x1e9)]()[_0x3c641b(0x1f4)]>0x0);if(_0x3f06e7[_0x3c641b(0x1f4)]===0x0)return _0x3c641b(0x20f);if(_0x3f06e7[_0x3c641b(0x1f4)]<=0xa)return _0x4d59d2[_0x3c641b(0x1e9)]();const _0x44b34d=_0x3f06e7[0x0],_0x2e5e8b=_0x3f06e7[_0x3c641b(0x1fb)](0x1),_0x1e92aa=[];_0x1e92aa[_0x3c641b(0x1f7)](_0x3c641b(0x1fd)+_0x2e5e8b[_0x3c641b(0x1f4)]+'\x20total'),_0x1e92aa[_0x3c641b(0x1f7)]('');for(const _0x4106c1 of _0x2e5e8b){const _0x54a940=_0x4106c1['split'](/\s{2,}/);if(_0x54a940['length']>=0x5){const _0x3fdfeb=_0x54a940[0x0][_0x3c641b(0x1fe)](0x0,0xc),_0x2c21c5=_0x54a940[0x1],_0x1d061e=_0x54a940[_0x54a940[_0x3c641b(0x1f4)]-0x2]||'',_0x1a6800=_0x54a940[_0x54a940[_0x3c641b(0x1f4)]-0x1]||'';_0x1e92aa[_0x3c641b(0x1f7)]('\x20\x20'+_0x3fdfeb+'\x20\x20'+_0x2c21c5+'\x20\x20'+_0x1d061e+'\x20\x20'+_0x1a6800);}else _0x1e92aa[_0x3c641b(0x1f7)]('\x20\x20'+_0x4106c1[_0x3c641b(0x1e9)]());}return _0x1e92aa['join']('\x0a');}function filterDockerImages(_0x19acc9){const _0x1e1e73=a0_0x427829,_0x3529b4=_0x19acc9[_0x1e1e73(0x205)]('\x0a')['filter'](_0x3475c4=>_0x3475c4[_0x1e1e73(0x1e9)]()[_0x1e1e73(0x1f4)]>0x0);if(_0x3529b4['length']<=0x1)return _0x1e1e73(0x1e8);if(_0x3529b4[_0x1e1e73(0x1f4)]<=0xf)return _0x19acc9['trim']();const _0x57f432=_0x3529b4[_0x1e1e73(0x1fb)](0x1),_0x4cafa1=[_0x1e1e73(0x202)+_0x57f432[_0x1e1e73(0x1f4)]+_0x1e1e73(0x217)];_0x4cafa1['push']('');const _0x3a4e81=_0x57f432['slice'](0x0,0x14);for(const _0x218611 of _0x3a4e81){const _0x366e48=_0x218611[_0x1e1e73(0x205)](/\s{2,}/);if(_0x366e48[_0x1e1e73(0x1f4)]>=0x3){const _0x5bcd72=_0x366e48[0x0],_0x427468=_0x366e48[0x1],_0x52320b=_0x366e48[_0x366e48[_0x1e1e73(0x1f4)]-0x1]||'';_0x4cafa1[_0x1e1e73(0x1f7)]('\x20\x20'+_0x5bcd72+':'+_0x427468+'\x20\x20'+_0x52320b);}else _0x4cafa1['push']('\x20\x20'+_0x218611[_0x1e1e73(0x1e9)]());}return _0x57f432['length']>0x14&&_0x4cafa1[_0x1e1e73(0x1f7)](_0x1e1e73(0x1f8)+(_0x57f432[_0x1e1e73(0x1f4)]-0x14)+_0x1e1e73(0x1ff)),_0x4cafa1[_0x1e1e73(0x216)]('\x0a');}function a0_0x474c(){const _0x2678a1=['trim','All\x20checks\x20passed','filter','No\x20resources\x20found','\x20\x20...\x20(','187iQxwLl','4292104hjMckl','\x20more\x20resources','Events:','Ruff:\x20no\x20issues\x20found','filterDockerPs','length','2067996fRpTuJ','898650Kpmbbe','push','\x20\x20...\x20+','...\x20+','Found\x200\x20error','slice','__esModule','Containers:\x20','substring','\x20more\x20images','\x0a...\x20+','314966QoPpbR','Docker\x20images:\x20','filterRuff','startsWith','split','124840WUzQbC','5439370rBOXRg','644JSqAnA','Ruff:\x20all\x20checks\x20passed','3790uPkBiV','filterDockerLogs','6rNGlsw','defineProperty','\x20resources\x20found','No\x20containers\x20running','\x20more\x20lines','get','\x0a...\x20[','\x20issues\x20in\x20','3aJMvDj','filterDockerImages','join','\x20total','32679fgJtSu','match','No\x20images\x20found'];a0_0x474c=function(){return _0x2678a1;};return a0_0x474c();}function filterDockerLogs(_0x3fb8b5){const _0x21f557=a0_0x427829,_0x5c090a=_0x3fb8b5['split']('\x0a');if(_0x5c090a[_0x21f557(0x1f4)]<=0x32)return _0x3fb8b5;const _0x322971=[];return _0x322971[_0x21f557(0x1f7)](..._0x5c090a[_0x21f557(0x1fb)](0x0,0x14)),_0x322971[_0x21f557(0x1f7)](_0x21f557(0x212)+(_0x5c090a[_0x21f557(0x1f4)]-0x28)+'\x20lines\x20truncated]\x20...\x0a'),_0x322971[_0x21f557(0x1f7)](..._0x5c090a[_0x21f557(0x1fb)](-0x14)),_0x322971[_0x21f557(0x1f7)]('\x0a('+_0x5c090a['length']+'\x20log\x20lines\x20total)'),_0x322971[_0x21f557(0x216)]('\x0a');}function filterKubectl(_0x47e76d,_0x196d8c){const _0x421d90=a0_0x427829,_0x4a890f=_0x47e76d[_0x421d90(0x205)]('\x0a')['filter'](_0x5f5bbf=>_0x5f5bbf[_0x421d90(0x1e9)]()[_0x421d90(0x1f4)]>0x0);if(_0x4a890f['length']===0x0)return _0x421d90(0x1ec);if(_0x4a890f[_0x421d90(0x1f4)]<=0x14)return _0x47e76d[_0x421d90(0x1e9)]();if(_0x196d8c===_0x421d90(0x211)){const _0x51bdf0=_0x4a890f[0x0],_0x1069f4=_0x4a890f[_0x421d90(0x1fb)](0x1),_0x57b2f9=[_0x1069f4[_0x421d90(0x1f4)]+_0x421d90(0x20e),'',_0x51bdf0];return _0x1069f4[_0x421d90(0x1f4)]<=0x1e?_0x57b2f9['push'](..._0x1069f4):(_0x57b2f9[_0x421d90(0x1f7)](..._0x1069f4['slice'](0x0,0x19)),_0x57b2f9['push']('...\x20+'+(_0x1069f4['length']-0x19)+_0x421d90(0x1f0))),_0x57b2f9[_0x421d90(0x216)]('\x0a');}if(_0x196d8c==='describe'){const _0x2d98d7=[];let _0x4fc406=![],_0x4db1bd=0x0;for(const _0x48a409 of _0x4a890f){if(_0x48a409[_0x421d90(0x204)](_0x421d90(0x1f1))){_0x4fc406=!![],_0x2d98d7['push'](_0x48a409);continue;}if(_0x4fc406){_0x4db1bd++;if(_0x4db1bd<=0x5)_0x2d98d7[_0x421d90(0x1f7)](_0x48a409);}else _0x2d98d7[_0x421d90(0x1f7)](_0x48a409);}return _0x4db1bd>0x5&&_0x2d98d7[_0x421d90(0x1f7)](_0x421d90(0x1f8)+(_0x4db1bd-0x5)+'\x20more\x20events'),_0x2d98d7[_0x421d90(0x216)]('\x0a');}if(_0x196d8c==='logs')return filterDockerLogs(_0x47e76d);const _0x2eea91=_0x4a890f[_0x421d90(0x1fb)](0x0,0x1e);return _0x4a890f['length']>0x1e&&_0x2eea91[_0x421d90(0x1f7)](_0x421d90(0x1f9)+(_0x4a890f[_0x421d90(0x1f4)]-0x1e)+_0x421d90(0x210)),_0x2eea91[_0x421d90(0x216)]('\x0a');}function filterRuff(_0x4a1c8a){const _0x233094=a0_0x427829,_0x8a08b6=_0x4a1c8a[_0x233094(0x205)]('\x0a')[_0x233094(0x1eb)](_0x35df42=>_0x35df42['trim']()[_0x233094(0x1f4)]>0x0);if(_0x8a08b6[_0x233094(0x1f4)]===0x0)return _0x233094(0x1f2);if(_0x4a1c8a['includes'](_0x233094(0x1ea))||_0x4a1c8a['includes'](_0x233094(0x1fa)))return _0x233094(0x209);const _0x481688=_0x4a1c8a[_0x233094(0x1e7)](/Found (\d+) error/),_0x4b4c9c=_0x481688?parseInt(_0x481688[0x1]):_0x8a08b6[_0x233094(0x1f4)],_0x529767={},_0x57c7e6=[];for(const _0x3f9fff of _0x8a08b6){const _0xbdd80e=_0x3f9fff['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0xbdd80e){const _0x48a38f=_0xbdd80e[0x1],_0xc157e9=_0x48a38f[_0x233094(0x205)](':')[0x0];if(!_0x529767[_0xc157e9])_0x529767[_0xc157e9]=[];_0x529767[_0xc157e9][_0x233094(0x1f7)](_0x3f9fff);}else _0x57c7e6[_0x233094(0x1f7)](_0x3f9fff);}const _0x25707e=Object['keys'](_0x529767);if(_0x25707e['length']===0x0){if(_0x8a08b6[_0x233094(0x1f4)]<=0x14)return _0x4a1c8a[_0x233094(0x1e9)]();return _0x8a08b6[_0x233094(0x1fb)](0x0,0xf)['join']('\x0a')+(_0x233094(0x200)+(_0x8a08b6[_0x233094(0x1f4)]-0xf)+'\x20more');}const _0x2249fd=['Ruff:\x20'+_0x4b4c9c+_0x233094(0x213)+_0x25707e[_0x233094(0x1f4)]+'\x20files'];_0x2249fd[_0x233094(0x1f7)]('');const _0x3aae62=0xa;for(const _0x169669 of _0x25707e[_0x233094(0x1fb)](0x0,_0x3aae62)){const _0x16265d=_0x529767[_0x169669];if(_0x16265d[_0x233094(0x1f4)]<=0x3){for(const _0x2daa82 of _0x16265d)_0x2249fd[_0x233094(0x1f7)]('\x20\x20'+_0x2daa82);}else _0x2249fd[_0x233094(0x1f7)]('\x20\x20'+_0x16265d[0x0]),_0x2249fd[_0x233094(0x1f7)](_0x233094(0x1ed)+_0x16265d['length']+_0x233094(0x213)+_0x169669+')');}return _0x25707e['length']>_0x3aae62&&_0x2249fd[_0x233094(0x1f7)](_0x233094(0x1f8)+(_0x25707e[_0x233094(0x1f4)]-_0x3aae62)+'\x20more\x20files'),_0x2249fd['join']('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1c293d=a0_0x1220;(function(_0x6fcfbc,_0x234632){const _0x44d922=a0_0x1220,_0x3b567a=_0x6fcfbc();while(!![]){try{const _0x32ed41=parseInt(_0x44d922(0x198))/0x1+parseInt(_0x44d922(0x195))/0x2+-parseInt(_0x44d922(0x187))/0x3*(parseInt(_0x44d922(0x1aa))/0x4)+parseInt(_0x44d922(0x1a2))/0x5+parseInt(_0x44d922(0x18d))/0x6+parseInt(_0x44d922(0x194))/0x7+parseInt(_0x44d922(0x180))/0x8*(-parseInt(_0x44d922(0x18e))/0x9);if(_0x32ed41===_0x234632)break;else _0x3b567a['push'](_0x3b567a['shift']());}catch(_0x544299){_0x3b567a['push'](_0x3b567a['shift']());}}}(a0_0x3a4f,0xbb69e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['stripAnsi']=stripAnsi,exports[a0_0x1c293d(0x19f)]=collapseDuplicates,exports[a0_0x1c293d(0x1ab)]=collapseWhitespace,exports[a0_0x1c293d(0x19a)]=stripComments,exports[a0_0x1c293d(0x18b)]=smartCrushJson,exports[a0_0x1c293d(0x1a3)]=softTruncate;function stripAnsi(_0x49ea6e){const _0x10e46c=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x49ea6e['replace'](_0x10e46c,'');}function collapseDuplicates(_0xe8c5be){const _0x1f76c9=a0_0x1c293d,_0x50f37e=_0xe8c5be[_0x1f76c9(0x19e)]('\x0a');if(_0x50f37e[_0x1f76c9(0x1a6)]<=0x1)return _0xe8c5be;const _0x449198=[];let _0x46f21f=_0x50f37e[0x0],_0x25faa8=0x1;for(let _0x213cae=0x1;_0x213cae<_0x50f37e['length'];_0x213cae++){const _0x27719b=_0x50f37e[_0x213cae];_0x27719b===_0x46f21f&&_0x27719b[_0x1f76c9(0x185)]()[_0x1f76c9(0x1a6)]>0x0?_0x25faa8++:(_0x25faa8>0x1?_0x449198['push'](_0x46f21f+_0x1f76c9(0x193)+_0x25faa8+']'):_0x449198[_0x1f76c9(0x184)](_0x46f21f),_0x46f21f=_0x27719b,_0x25faa8=0x1);}return _0x25faa8>0x1?_0x449198[_0x1f76c9(0x184)](_0x46f21f+_0x1f76c9(0x193)+_0x25faa8+']'):_0x449198[_0x1f76c9(0x184)](_0x46f21f),_0x449198['join']('\x0a');}function collapseWhitespace(_0x50d8a0){const _0x29bba2=a0_0x1c293d;let _0x44be3d=_0x50d8a0[_0x29bba2(0x183)](/[ \t]+$/gm,'');return _0x44be3d=_0x44be3d[_0x29bba2(0x183)](/\n{4,}/g,_0x29bba2(0x192)),_0x44be3d;}function stripComments(_0x536860,_0x455abe){const _0x397615=a0_0x1c293d;if(!_0x455abe)return _0x536860;const _0x963e72=_0x536860[_0x397615(0x19e)]('\x0a');if(_0x963e72['length']<=0x96)return _0x536860;const _0x9d9cc6={'.ts':/^\s*\/\//,'.js':/^\s*\/\//,'.tsx':/^\s*\/\//,'.jsx':/^\s*\/\//,'.py':/^\s*#(?!!)/,'.rb':/^\s*#(?!!)/,'.sh':/^\s*#(?!!)/,'.go':/^\s*\/\//,'.rs':/^\s*\/\//,'.java':/^\s*\/\//,'.c':/^\s*\/\//,'.cpp':/^\s*\/\//,'.cs':/^\s*\/\//,'.swift':/^\s*\/\//,'.kt':/^\s*\/\//,'.yaml':/^\s*#(?!!)/,'.yml':/^\s*#(?!!)/},_0x20cf52=_0x9d9cc6[_0x455abe[_0x397615(0x1a9)]()];if(!_0x20cf52)return _0x536860;const _0x10d2f3=_0x963e72[_0x397615(0x1a0)](_0x4fd71b=>!_0x20cf52[_0x397615(0x191)](_0x4fd71b));return _0x10d2f3[_0x397615(0x1a7)]('\x0a');}function a0_0x1220(_0x2979fa,_0x36d250){_0x2979fa=_0x2979fa-0x180;const _0x3a4f16=a0_0x3a4f();let _0x12203f=_0x3a4f16[_0x2979fa];return _0x12203f;}function smartCrushJson(_0x3bdf5f){const _0x311345=a0_0x1c293d;try{const _0x305eb4=_0x3bdf5f['trim']();if(!_0x305eb4[_0x311345(0x181)]('['))return null;const _0x519116=JSON['parse'](_0x305eb4);if(!Array[_0x311345(0x18f)](_0x519116)||_0x519116[_0x311345(0x1a6)]<0x3)return null;if(typeof _0x519116[0x0]!==_0x311345(0x1a4)||_0x519116[0x0]===null)return null;const _0x3a3702=Object[_0x311345(0x18a)](_0x519116[0x0]);if(_0x3a3702[_0x311345(0x1a6)]===0x0)return null;const _0x45f2d8=_0x3a3702[_0x311345(0x1a0)](_0x74adc6=>{const _0x27e652=_0x311345,_0xc3c4c9=_0x74adc6[_0x27e652(0x1a9)]();return!_0xc3c4c9['includes']('resolved')&&!_0xc3c4c9[_0x27e652(0x1ac)]('integrity')&&!_0xc3c4c9[_0x27e652(0x1ac)](_0x27e652(0x18c))&&!_0xc3c4c9[_0x27e652(0x1ac)](_0x27e652(0x19c))&&!_0xc3c4c9['includes']('checksum')&&!_0xc3c4c9['includes'](_0x27e652(0x19d))&&!_0xc3c4c9[_0x27e652(0x1ac)](_0x27e652(0x190))&&_0xc3c4c9!==_0x27e652(0x19b)&&_0xc3c4c9!==_0x27e652(0x199)&&_0xc3c4c9!=='bugs'&&_0xc3c4c9!=='repository';})[_0x311345(0x196)](0x0,0x6);if(_0x45f2d8[_0x311345(0x1a6)]===0x0)return null;const _0x1df7a5=[];_0x1df7a5[_0x311345(0x184)](_0x45f2d8[_0x311345(0x1a7)]('|'));const _0x46942a=0x1e;for(let _0x171fa9=0x0;_0x171fa9<Math['min'](_0x519116[_0x311345(0x1a6)],_0x46942a);_0x171fa9++){const _0x5da556=_0x45f2d8[_0x311345(0x186)](_0x7b83de=>{const _0x2a65da=_0x311345,_0x2675e4=_0x519116[_0x171fa9][_0x7b83de];if(_0x2675e4===null||_0x2675e4===undefined)return'';if(typeof _0x2675e4==='object')return JSON[_0x2a65da(0x1a1)](_0x2675e4)[_0x2a65da(0x188)](0x0,0x28);return String(_0x2675e4)[_0x2a65da(0x188)](0x0,0x3c);});_0x1df7a5['push'](_0x5da556[_0x311345(0x1a7)]('|'));}_0x519116[_0x311345(0x1a6)]>_0x46942a&&_0x1df7a5[_0x311345(0x184)](_0x311345(0x189)+(_0x519116[_0x311345(0x1a6)]-_0x46942a)+'\x20more\x20rows');_0x1df7a5['push']('\x0a('+_0x519116[_0x311345(0x1a6)]+_0x311345(0x1a5)+_0x3a3702[_0x311345(0x1a6)]+'\x20fields,\x20showing\x20'+_0x45f2d8[_0x311345(0x1a6)]+_0x311345(0x197));const _0x3a26cf=_0x1df7a5[_0x311345(0x1a7)]('\x0a');if(_0x3a26cf[_0x311345(0x1a6)]<_0x305eb4[_0x311345(0x1a6)])return _0x3a26cf;return null;}catch{return null;}}function a0_0x3a4f(){const _0x454281=['toLowerCase','28IXNStv','collapseWhitespace','includes','16810888AzXFjd','startsWith','\x20characters\x20of\x20output]\x20...\x0a','replace','push','trim','map','235905xLHFsV','substring','...\x20+','keys','smartCrushJson','sha','210168zhNhWg','9maPCAH','isArray','dev','test','\x0a\x0a\x0a','\x20[x','10168564WFGJYL','1375286mVYGgR','slice','\x20key\x20fields)','457366ZPpYzV','engines','stripComments','funding','hash','signature','split','collapseDuplicates','filter','stringify','3933815uaKRYO','softTruncate','object','\x20items,\x20','length','join','\x0a...\x20[TrimPrompt:\x20Truncated\x20'];a0_0x3a4f=function(){return _0x454281;};return a0_0x3a4f();}function softTruncate(_0x14f932,_0x24121c=0x4e20){const _0x30334e=a0_0x1c293d;if(_0x14f932[_0x30334e(0x1a6)]<=_0x24121c)return _0x14f932;const _0xac5137=_0x14f932['split']('\x0a');if(_0xac5137['length']<=0xc8)return _0x14f932;const _0x31c570=0x32,_0x3653dd=0x96,_0x56a881=_0xac5137['slice'](0x0,_0x31c570),_0x1b82c0=_0xac5137[_0x30334e(0x196)](_0xac5137['length']-_0x3653dd),_0x29f20c=_0x14f932[_0x30334e(0x1a6)]-(_0x56a881['join']('\x0a')[_0x30334e(0x1a6)]+_0x1b82c0[_0x30334e(0x1a7)]('\x0a')[_0x30334e(0x1a6)]);return[..._0x56a881,_0x30334e(0x1a8)+_0x29f20c+_0x30334e(0x182),..._0x1b82c0][_0x30334e(0x1a7)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x34355b=a0_0x2059;(function(_0x1f9d01,_0x5a0c0f){const _0x4c0bf4=a0_0x2059,_0x6a432f=_0x1f9d01();while(!![]){try{const _0x280c8c=-parseInt(_0x4c0bf4(0xfa))/0x1+-parseInt(_0x4c0bf4(0x108))/0x2*(-parseInt(_0x4c0bf4(0x11a))/0x3)+parseInt(_0x4c0bf4(0x103))/0x4*(-parseInt(_0x4c0bf4(0x102))/0x5)+-parseInt(_0x4c0bf4(0x117))/0x6*(-parseInt(_0x4c0bf4(0x129))/0x7)+parseInt(_0x4c0bf4(0x10c))/0x8*(-parseInt(_0x4c0bf4(0x119))/0x9)+parseInt(_0x4c0bf4(0x127))/0xa*(parseInt(_0x4c0bf4(0x104))/0xb)+-parseInt(_0x4c0bf4(0x10e))/0xc;if(_0x280c8c===_0x5a0c0f)break;else _0x6a432f['push'](_0x6a432f['shift']());}catch(_0xc1c504){_0x6a432f['push'](_0x6a432f['shift']());}}}(a0_0x4f81,0x55715));function a0_0x4f81(){const _0x2c6229=['83265MnCqWm','push','length','filter','__esModule','No\x20modifications','configurable','__createBinding','1650QFelYg','6796XRiYDp','2553155dYaCeg','/\x20(','path','\x20(+','310750sYQEEU','getOwnPropertyDescriptor','substring','get','566136IoOXNQ','writable','2256072LSzGtQ','*\x20Branch:\x20','trim','diff\x20--git','slice','create','join','map','---','231690BjlOPX','filterGitDiff','27TsDrrV','12YTbZCl','prototype','dirname','\x20\x20...\x20+','\x20lines\x20of\x20description)','replace','---END---','\x0aUntracked\x20files:','split','basename','[file]\x20','defineProperty','\x0aChanges:','10wyKwJU','filterGitLog','98RCesDn','startsWith','__importStar','call','\x20\x20??\x20'];a0_0x4f81=function(){return _0x2c6229;};return a0_0x4f81();}var __createBinding=this&&this[a0_0x34355b(0x101)]||(Object[a0_0x34355b(0x113)]?function(_0x929efc,_0x141136,_0x29bdb2,_0x3b88ba){const _0x2babc1=a0_0x34355b;if(_0x3b88ba===undefined)_0x3b88ba=_0x29bdb2;var _0x22b809=Object[_0x2babc1(0x109)](_0x141136,_0x29bdb2);(!_0x22b809||(_0x2babc1(0x10b)in _0x22b809?!_0x141136[_0x2babc1(0xfe)]:_0x22b809[_0x2babc1(0x10d)]||_0x22b809[_0x2babc1(0x100)]))&&(_0x22b809={'enumerable':!![],'get':function(){return _0x141136[_0x29bdb2];}}),Object[_0x2babc1(0x125)](_0x929efc,_0x3b88ba,_0x22b809);}:function(_0xead4dd,_0x51ebbc,_0xf7a9d3,_0xa0214b){if(_0xa0214b===undefined)_0xa0214b=_0xf7a9d3;_0xead4dd[_0xa0214b]=_0x51ebbc[_0xf7a9d3];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0xc35c38,_0x422b97){Object['defineProperty'](_0xc35c38,'default',{'enumerable':!![],'value':_0x422b97});}:function(_0x598440,_0x517e65){_0x598440['default']=_0x517e65;}),__importStar=this&&this[a0_0x34355b(0x12b)]||(function(){var _0x3e4a27=function(_0x3f830d){return _0x3e4a27=Object['getOwnPropertyNames']||function(_0x5cfbe7){const _0x35b0a4=a0_0x2059;var _0x39470c=[];for(var _0x2e80be in _0x5cfbe7)if(Object[_0x35b0a4(0x11b)]['hasOwnProperty'][_0x35b0a4(0xf8)](_0x5cfbe7,_0x2e80be))_0x39470c[_0x39470c[_0x35b0a4(0xfc)]]=_0x2e80be;return _0x39470c;},_0x3e4a27(_0x3f830d);};return function(_0x38bdb5){const _0x359b00=a0_0x2059;if(_0x38bdb5&&_0x38bdb5['__esModule'])return _0x38bdb5;var _0x357348={};if(_0x38bdb5!=null){for(var _0x27412b=_0x3e4a27(_0x38bdb5),_0x1bdc2b=0x0;_0x1bdc2b<_0x27412b[_0x359b00(0xfc)];_0x1bdc2b++)if(_0x27412b[_0x1bdc2b]!=='default')__createBinding(_0x357348,_0x38bdb5,_0x27412b[_0x1bdc2b]);}return __setModuleDefault(_0x357348,_0x38bdb5),_0x357348;};}());Object[a0_0x34355b(0x125)](exports,a0_0x34355b(0xfe),{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x34355b(0x128)]=filterGitLog,exports[a0_0x34355b(0x118)]=filterGitDiff;function a0_0x2059(_0x503f31,_0x5c3671){_0x503f31=_0x503f31-0xf8;const _0x4f8153=a0_0x4f81();let _0x205908=_0x4f8153[_0x503f31];return _0x205908;}const path=__importStar(require(a0_0x34355b(0x106)));function filterGitStatus(_0xb1ca3e){const _0x5a7522=a0_0x34355b,_0x1516f7=_0xb1ca3e[_0x5a7522(0x122)]('\x0a')[_0x5a7522(0x115)](_0x5ad54e=>_0x5ad54e[_0x5a7522(0x110)]())[_0x5a7522(0xfd)](_0x19cbf9=>_0x19cbf9['length']>0x0);if(_0x1516f7[_0x5a7522(0xfc)]===0x0)return'Clean\x20working\x20tree';const _0x36e508=[],_0xcbaba7=[],_0x47e0a0=[];for(const _0x449ab6 of _0x1516f7){if(_0x449ab6['startsWith']('##')){const _0x4c97a7=_0x449ab6[_0x5a7522(0x11f)](/^##\s*/,'');_0x36e508[_0x5a7522(0xfb)](_0x5a7522(0x10f)+_0x4c97a7);}else _0x449ab6['startsWith']('??')?_0xcbaba7[_0x5a7522(0xfb)](_0x449ab6[_0x5a7522(0x10a)](0x3)[_0x5a7522(0x110)]()):_0x47e0a0[_0x5a7522(0xfb)](_0x449ab6);}_0x47e0a0['length']>0x0&&(_0x36e508[_0x5a7522(0xfb)](_0x5a7522(0x126)),_0x36e508[_0x5a7522(0xfb)](..._0x47e0a0[_0x5a7522(0x115)](_0x32061d=>'\x20\x20'+_0x32061d)));if(_0xcbaba7[_0x5a7522(0xfc)]>0x0){_0x36e508['push'](_0x5a7522(0x121));const _0x4f5784={},_0x533a1c=[];for(const _0x4c4c4a of _0xcbaba7){const _0x141406=path[_0x5a7522(0x11c)](_0x4c4c4a);_0x141406==='.'||_0x141406===''?_0x533a1c[_0x5a7522(0xfb)](_0x4c4c4a):(!_0x4f5784[_0x141406]&&(_0x4f5784[_0x141406]=[]),_0x4f5784[_0x141406]['push'](path[_0x5a7522(0x123)](_0x4c4c4a)));}for(const [_0x2c74ce,_0x867627]of Object['entries'](_0x4f5784)){if(_0x867627[_0x5a7522(0xfc)]>0x5)_0x36e508[_0x5a7522(0xfb)](_0x5a7522(0xf9)+_0x2c74ce+_0x5a7522(0x105)+_0x867627[_0x5a7522(0xfc)]+'\x20untracked\x20files)');else for(const _0x23d01c of _0x867627){_0x36e508[_0x5a7522(0xfb)](_0x5a7522(0xf9)+path['join'](_0x2c74ce,_0x23d01c));}}for(const _0xc0eaec of _0x533a1c){_0x36e508[_0x5a7522(0xfb)](_0x5a7522(0xf9)+_0xc0eaec);}}return _0x36e508[_0x5a7522(0x114)]('\x0a');}function filterGitLog(_0x27370e){const _0x8c9f3=a0_0x34355b,_0x342767=_0x27370e['split'](_0x8c9f3(0x120))[_0x8c9f3(0x115)](_0x1c4e70=>_0x1c4e70['trim']())[_0x8c9f3(0xfd)](_0x2bd45b=>_0x2bd45b[_0x8c9f3(0xfc)]>0x0);if(_0x342767[_0x8c9f3(0xfc)]===0x0)return _0x27370e;const _0x1e9855=[];for(const _0x162339 of _0x342767){const _0x25e271=_0x162339[_0x8c9f3(0x122)]('\x0a'),_0x11e5fd=_0x25e271[0x0]||'',_0x2640e7=_0x25e271[_0x8c9f3(0x112)](0x1)[_0x8c9f3(0x115)](_0x16e604=>_0x16e604[_0x8c9f3(0x110)]())[_0x8c9f3(0xfd)](_0x508342=>_0x508342['length']>0x0);_0x1e9855['push']('-\x20'+_0x11e5fd),_0x2640e7[_0x8c9f3(0xfc)]>0x0&&(_0x1e9855[_0x8c9f3(0xfb)]('\x20\x20'+_0x2640e7[0x0]),_0x2640e7[_0x8c9f3(0xfc)]>0x1&&_0x1e9855['push']('\x20\x20...\x20(+'+(_0x2640e7[_0x8c9f3(0xfc)]-0x1)+_0x8c9f3(0x11e)));}return _0x1e9855[_0x8c9f3(0x114)]('\x0a');}function filterGitDiff(_0x121121){const _0x594f77=a0_0x34355b,_0x843192=_0x121121['split']('\x0a'),_0x96d373=[];let _0x288dd3='',_0x5ea792=0x0,_0x4d4f47=0x0,_0x3e21ca=[];const _0xdbeb96=()=>{const _0x32e7e8=a0_0x2059;if(_0x288dd3&&(_0x5ea792>0x0||_0x4d4f47>0x0)){_0x96d373[_0x32e7e8(0xfb)](_0x32e7e8(0x124)+_0x288dd3+_0x32e7e8(0x107)+_0x5ea792+'\x20-'+_0x4d4f47+')');const _0x522d76=0xa,_0x538873=_0x3e21ca['slice'](0x0,_0x522d76);for(const _0x245c8a of _0x538873){_0x96d373['push']('\x20\x20'+_0x245c8a);}const _0x2757e4=_0x5ea792+_0x4d4f47-_0x522d76;_0x2757e4>0x0&&_0x96d373['push'](_0x32e7e8(0x11d)+_0x2757e4+'\x20more\x20modifications');}_0x5ea792=0x0,_0x4d4f47=0x0,_0x3e21ca=[];};for(const _0xa0ebaa of _0x843192){if(_0xa0ebaa[_0x594f77(0x12a)](_0x594f77(0x111))){_0xdbeb96();const _0x3e6e20=_0xa0ebaa['match'](/\sb\/(.+)$/);_0x288dd3=_0x3e6e20?_0x3e6e20[0x1]:'unknown_file';}else{if(_0xa0ebaa[_0x594f77(0x12a)]('+')&&!_0xa0ebaa[_0x594f77(0x12a)]('+++'))_0x5ea792++,_0x3e21ca['push'](_0xa0ebaa);else _0xa0ebaa[_0x594f77(0x12a)]('-')&&!_0xa0ebaa[_0x594f77(0x12a)](_0x594f77(0x116))&&(_0x4d4f47++,_0x3e21ca[_0x594f77(0xfb)](_0xa0ebaa));}}_0xdbeb96();const _0x1983ef=_0x96d373['join']('\x0a');return _0x1983ef[_0x594f77(0xfc)]>0x0?_0x1983ef:_0x594f77(0xff);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xe1aeee=a0_0x2cfb;(function(_0x5c61aa,_0x106809){const _0x43b6b7=a0_0x2cfb,_0x531f04=_0x5c61aa();while(!![]){try{const _0x25d938=parseInt(_0x43b6b7(0x163))/0x1+parseInt(_0x43b6b7(0x171))/0x2*(parseInt(_0x43b6b7(0x15b))/0x3)+parseInt(_0x43b6b7(0x14f))/0x4+parseInt(_0x43b6b7(0x159))/0x5+parseInt(_0x43b6b7(0x160))/0x6+-parseInt(_0x43b6b7(0x151))/0x7+-parseInt(_0x43b6b7(0x167))/0x8;if(_0x25d938===_0x106809)break;else _0x531f04['push'](_0x531f04['shift']());}catch(_0x9403ef){_0x531f04['push'](_0x531f04['shift']());}}}(a0_0x1b56,0xa8bc8));function a0_0x1b56(){const _0x52785a=['\x20more\x20failures','===\x20RUN','trim','includes','836400osIayo','\x20passed','8718738kllhxW','\x20more\x20lines','filter','\x20passed,\x20','slice','match','\x20skipped','filterGoVet','5757285YUlIKF','defineProperty','1194759oDyQjp','...\x20+','Go\x20test:\x20','FAIL','__esModule','4704336HRXGMP','no\x20test\x20files','filterGoTest','172421KzRRuy','join','push','\x20failed,\x20','9414896eKiVii','split','length','Go\x20test:\x20no\x20test\x20files','\x20\x20\x20\x20','Go\x20vet:\x20no\x20issues\x20found','PASS','lines','\x20\x20\x20\x20...\x20+','\x0aFailures:','4EGFjdl','startsWith'];a0_0x1b56=function(){return _0x52785a;};return a0_0x1b56();}function a0_0x2cfb(_0x16db96,_0x329644){_0x16db96=_0x16db96-0x14a;const _0x1b56b1=a0_0x1b56();let _0x2cfb29=_0x1b56b1[_0x16db96];return _0x2cfb29;}Object[a0_0xe1aeee(0x15a)](exports,a0_0xe1aeee(0x15f),{'value':!![]}),exports[a0_0xe1aeee(0x162)]=filterGoTest,exports[a0_0xe1aeee(0x158)]=filterGoVet;function filterGoTest(_0x546aca){const _0x1369c1=a0_0xe1aeee,_0x31def3=_0x546aca['split']('\x0a');let _0x5c2aae=0x0,_0x1adaab=0x0,_0x135663=0x0;const _0x1e551b=[],_0x5c3ba6=[];let _0x296718=null;for(const _0x51a365 of _0x31def3){const _0x4d310d=_0x51a365[_0x1369c1(0x14d)](),_0x54711f=_0x4d310d['match'](/^ok\s+\S+\s+[\d.]+s/);if(_0x54711f){_0x5c3ba6[_0x1369c1(0x165)](_0x4d310d);continue;}const _0x1ea09d=_0x4d310d['match'](/^FAIL\s+\S+/);if(_0x1ea09d){_0x5c3ba6[_0x1369c1(0x165)](_0x4d310d);continue;}const _0x4d4565=_0x4d310d[_0x1369c1(0x156)](/^--- PASS:/);if(_0x4d4565){_0x5c2aae++;continue;}const _0xa11350=_0x4d310d[_0x1369c1(0x156)](/^--- FAIL:\s+(\S+)/);if(_0xa11350){if(_0x296718)_0x1e551b['push'](_0x296718);_0x296718={'name':_0xa11350[0x1],'lines':[]},_0x1adaab++;continue;}if(_0x4d310d[_0x1369c1(0x14a)]('---\x20SKIP:')){_0x135663++;continue;}_0x296718&&_0x4d310d['length']>0x0&&!_0x4d310d['startsWith']('===\x20RUN')&&_0x296718['lines'][_0x1369c1(0x165)](_0x51a365),_0x4d310d[_0x1369c1(0x14a)](_0x1369c1(0x14c))&&(_0x296718&&(_0x1e551b[_0x1369c1(0x165)](_0x296718),_0x296718=null));}if(_0x296718)_0x1e551b[_0x1369c1(0x165)](_0x296718);if(_0x5c2aae===0x0&&_0x1adaab===0x0&&_0x135663===0x0){if(_0x546aca[_0x1369c1(0x14e)](_0x1369c1(0x16d))&&!_0x546aca[_0x1369c1(0x14e)](_0x1369c1(0x15e)))return'Go\x20test:\x20all\x20tests\x20passed';if(_0x546aca['includes'](_0x1369c1(0x161)))return _0x1369c1(0x16a);return _0x546aca;}if(_0x1adaab===0x0){const _0x32c6e3=['Go\x20test:\x20'+_0x5c2aae+_0x1369c1(0x150)];if(_0x135663>0x0)_0x32c6e3[_0x1369c1(0x165)](_0x135663+_0x1369c1(0x157));return _0x32c6e3['join'](',\x20');}const _0x496e95=[_0x1369c1(0x15d)+_0x5c2aae+_0x1369c1(0x154)+_0x1adaab+_0x1369c1(0x166)+_0x135663+'\x20skipped'];if(_0x1e551b['length']>0x0){_0x496e95[_0x1369c1(0x165)](_0x1369c1(0x170));const _0x54c1bc=0x3;for(let _0xe120c7=0x0;_0xe120c7<Math['min'](_0x1e551b['length'],_0x54c1bc);_0xe120c7++){const _0x132ce5=_0x1e551b[_0xe120c7];_0x496e95[_0x1369c1(0x165)]('\x20\x20'+(_0xe120c7+0x1)+'.\x20'+_0x132ce5['name']);for(const _0x49bc0c of _0x132ce5['lines']['slice'](0x0,0x5)){_0x496e95['push'](_0x1369c1(0x16b)+_0x49bc0c[_0x1369c1(0x14d)]());}_0x132ce5[_0x1369c1(0x16e)][_0x1369c1(0x169)]>0x5&&_0x496e95[_0x1369c1(0x165)](_0x1369c1(0x16f)+(_0x132ce5[_0x1369c1(0x16e)][_0x1369c1(0x169)]-0x5)+_0x1369c1(0x152));}_0x1e551b[_0x1369c1(0x169)]>_0x54c1bc&&_0x496e95[_0x1369c1(0x165)]('\x20\x20...\x20+'+(_0x1e551b[_0x1369c1(0x169)]-_0x54c1bc)+_0x1369c1(0x14b));}return _0x496e95[_0x1369c1(0x164)]('\x0a');}function filterGoVet(_0x4427a7){const _0x29fc57=a0_0xe1aeee,_0x4138c3=_0x4427a7[_0x29fc57(0x168)]('\x0a')[_0x29fc57(0x153)](_0x36bb64=>_0x36bb64[_0x29fc57(0x14d)]()[_0x29fc57(0x169)]>0x0);if(_0x4138c3[_0x29fc57(0x169)]===0x0)return _0x29fc57(0x16c);if(_0x4138c3['length']<=0x14)return _0x4427a7['trim']();const _0x183f4c=['Go\x20vet:\x20'+_0x4138c3[_0x29fc57(0x169)]+'\x20issues\x20found'];return _0x183f4c['push'](..._0x4138c3[_0x29fc57(0x155)](0x0,0xa)),_0x4138c3[_0x29fc57(0x169)]>0xa&&_0x183f4c[_0x29fc57(0x165)](_0x29fc57(0x15c)+(_0x4138c3['length']-0xa)+'\x20more\x20issues'),_0x183f4c[_0x29fc57(0x164)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x2e24(){const _0xfc0270=['rewriteCommand','trim\x20find','yarn\x20test','trim\x20read','trim\x20tree','filterGitLog','filterNpmInstall','400jWXYkK','compressOutput','[minified\x20file]','redact','2IqgbOn','startsWith','trim\x20go','[lock\x20file]','filterDockerImages','match','ruff\x20check','npm\x20i','filterCargoTest','git\x20show','text','cargo\x20build','trim\x20glab','pytest','secretsFound','length','includes','redactor','./git','jest','git\x20diff','tracker','trim\x20','endsWith','trim\x20pytest','./rust','test','4568883HiEPMg','secretTypes','filterCargoBuild','cargo\x20test','npm\x20test','trim\x20npm','vitest','ruff\x20','filterFind','pip\x20install','kubectl','355766rRfsxc','6zDQwGN','cargo\x20check','push','10cuzJfL','trim\x20ruff','../redactor','filterLs','./shell','\x20ls','trim\x20cargo','whitespace','trim\x20pnpm','filterGitStatus','softTruncate','defineProperty','npm\x20i\x20','523975EQuzqz','trim','[binary','trim\x20kubectl','lastRedactAudit','git\x20log','yadm\x20log','filterTree','some','./devops','trim\x20ls','trim\x20pip','lastFeatures','yadm\x20diff','go\x20vet','npm\x20install','pattern','2705017wwpVeV','ansi_strip','./go','trim\x20npx','trim\x20git','\x20ls\x20','collapseDuplicates','pip3\x20install','redactWithAudit','getConfig','726090HMCGrj','3204XhrFPd','./generic','./python','yarn\x20install','trim\x20gh','cargo\x20clippy','npm\x20run\x20test','filterDockerLogs','collapseWhitespace','trim\x20grep','filter','1325188udqmRF','lock','[code\x20skeleton]','filterRuff','filterGoVet','pnpm\x20install','toLowerCase'];a0_0x2e24=function(){return _0xfc0270;};return a0_0x2e24();}const a0_0x422d3a=a0_0x25f7;(function(_0x346278,_0x28669d){const _0x17c20d=a0_0x25f7,_0x487fd7=_0x346278();while(!![]){try{const _0x361cf9=-parseInt(_0x17c20d(0x167))/0x1*(-parseInt(_0x17c20d(0x141))/0x2)+parseInt(_0x17c20d(0x193))/0x3+parseInt(_0x17c20d(0x12f))/0x4+parseInt(_0x17c20d(0x178))/0x5+-parseInt(_0x17c20d(0x168))/0x6*(parseInt(_0x17c20d(0x189))/0x7)+parseInt(_0x17c20d(0x13d))/0x8*(-parseInt(_0x17c20d(0x194))/0x9)+-parseInt(_0x17c20d(0x16b))/0xa*(parseInt(_0x17c20d(0x15c))/0xb);if(_0x361cf9===_0x28669d)break;else _0x487fd7['push'](_0x487fd7['shift']());}catch(_0x1a1c5b){_0x487fd7['push'](_0x487fd7['shift']());}}}(a0_0x2e24,0x34520));Object[a0_0x422d3a(0x176)](exports,'__esModule',{'value':!![]}),exports['lastFeatures']=exports[a0_0x422d3a(0x17c)]=void 0x0,exports[a0_0x422d3a(0x13e)]=compressOutput,exports[a0_0x422d3a(0x136)]=rewriteCommand;const generic_1=require(a0_0x422d3a(0x195)),git_1=require(a0_0x422d3a(0x153)),python_1=require(a0_0x422d3a(0x196)),js_1=require('./js'),shell_1=require(a0_0x422d3a(0x16f)),rust_1=require(a0_0x422d3a(0x15a)),go_1=require(a0_0x422d3a(0x18b)),devops_1=require(a0_0x422d3a(0x181)),redactor_1=require(a0_0x422d3a(0x16d)),tracker_1=require('../tracker');function a0_0x25f7(_0x315bcd,_0x27ab4b){_0x315bcd=_0x315bcd-0x12a;const _0x2e2410=a0_0x2e24();let _0x25f7a4=_0x2e2410[_0x315bcd];return _0x25f7a4;}exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x422d3a(0x184)]=[];function isFeatureEnabled(_0x288687){const _0x2ec89b=a0_0x422d3a;try{const _0x5482f8=tracker_1[_0x2ec89b(0x156)][_0x2ec89b(0x192)](),_0x8da899=_0x5482f8['features_enabled'];if(!_0x8da899||_0x8da899[_0x288687]===undefined)return!![];return _0x8da899[_0x288687]!==![];}catch{return!![];}}function compressOutput(_0x10429,_0x4c256a,_0x469175,_0x3b2ea4=!![]){const _0x4925b9=a0_0x422d3a,_0x4d319f=_0x10429[_0x4925b9(0x179)]();let _0x1265ef=_0x4c256a;_0x469175[_0x4925b9(0x179)]()[_0x4925b9(0x150)]>0x0&&(_0x1265ef=_0x4c256a+'\x0a'+_0x469175);let _0x23e482=isFeatureEnabled(_0x4925b9(0x18a))?(0x0,generic_1['stripAnsi'])(_0x1265ef):_0x1265ef;const _0x2557a5=[];if(_0x23e482[_0x4925b9(0x150)]<_0x1265ef[_0x4925b9(0x150)])_0x2557a5['push'](_0x4925b9(0x18a));const _0x5839d4=(_0x291e67,_0x23d784)=>{const _0x2f6f10=_0x4925b9;return _0x2557a5[_0x2f6f10(0x16a)](_0x291e67),exports[_0x2f6f10(0x184)]=_0x2557a5,_0x23d784;};if(_0x3b2ea4&&isFeatureEnabled(_0x4925b9(0x140))){const _0x3e08a7=redactor_1[_0x4925b9(0x152)][_0x4925b9(0x191)](_0x23e482);_0x23e482=_0x3e08a7[_0x4925b9(0x14b)],exports['lastRedactAudit']={'secretsFound':_0x3e08a7[_0x4925b9(0x14f)],'secretTypes':_0x3e08a7[_0x4925b9(0x15d)]};if(_0x3e08a7['secretsFound']>0x0)_0x2557a5[_0x4925b9(0x16a)]('redact');}else exports[_0x4925b9(0x17c)]={'secretsFound':0x0,'secretTypes':[]};const _0x4ee5b9=_0x4d319f[_0x4925b9(0x135)](),_0x10af7f=isFeatureEnabled(_0x4925b9(0x12e));try{if(_0x10af7f){if(_0x4ee5b9['includes']('git\x20status')||_0x4ee5b9[_0x4925b9(0x151)]('yadm\x20status'))return _0x5839d4(_0x4925b9(0x12e),(0x0,git_1[_0x4925b9(0x174)])(_0x23e482));if(_0x4ee5b9['includes'](_0x4925b9(0x17d))||_0x4ee5b9['includes'](_0x4925b9(0x17e)))return _0x5839d4(_0x4925b9(0x12e),(0x0,git_1[_0x4925b9(0x13b)])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x155))||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x14a))||_0x4ee5b9['includes'](_0x4925b9(0x185)))return _0x5839d4('filter',(0x0,git_1['filterGitDiff'])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x14e))||_0x4ee5b9[_0x4925b9(0x146)](/python3?\s+-m\s+pytest/))return _0x5839d4(_0x4925b9(0x12e),(0x0,python_1['filterPytest'])(_0x23e482));if(_0x4ee5b9['includes'](_0x4925b9(0x165))||_0x4ee5b9['includes'](_0x4925b9(0x190)))return _0x5839d4('filter',(0x0,python_1['filterPipInstall'])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x147))||_0x4ee5b9['includes'](_0x4925b9(0x163)))return _0x5839d4(_0x4925b9(0x12e),(0x0,devops_1[_0x4925b9(0x132)])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x187))||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x177))||_0x4ee5b9[_0x4925b9(0x158)](_0x4925b9(0x148))||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x134))||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x197)))return _0x5839d4(_0x4925b9(0x12e),(0x0,js_1[_0x4925b9(0x13c)])(_0x23e482));if(_0x4ee5b9['includes'](_0x4925b9(0x154))||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x162)))return _0x5839d4(_0x4925b9(0x12e),(0x0,js_1['filterJestVitest'])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x160))||_0x4ee5b9[_0x4925b9(0x151)]('pnpm\x20test')||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x138))||_0x4ee5b9['includes'](_0x4925b9(0x12a)))return _0x5839d4(_0x4925b9(0x12e),(0x0,js_1['filterJestVitest'])(_0x23e482));if(_0x4ee5b9['includes'](_0x4925b9(0x15f)))return _0x5839d4(_0x4925b9(0x12e),(0x0,rust_1[_0x4925b9(0x149)])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x14c))||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x169))||_0x4ee5b9['includes'](_0x4925b9(0x199)))return _0x5839d4(_0x4925b9(0x12e),(0x0,rust_1[_0x4925b9(0x15e)])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)]('go\x20test'))return _0x5839d4(_0x4925b9(0x12e),(0x0,go_1['filterGoTest'])(_0x23e482));if(_0x4ee5b9['includes'](_0x4925b9(0x186)))return _0x5839d4(_0x4925b9(0x12e),(0x0,go_1[_0x4925b9(0x133)])(_0x23e482));if(_0x4ee5b9['match'](/docker\s+ps/))return _0x5839d4(_0x4925b9(0x12e),(0x0,devops_1['filterDockerPs'])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x146)](/docker\s+images/))return _0x5839d4(_0x4925b9(0x12e),(0x0,devops_1[_0x4925b9(0x145)])(_0x23e482));if(_0x4ee5b9['match'](/docker\s+logs/))return _0x5839d4(_0x4925b9(0x12e),(0x0,devops_1[_0x4925b9(0x12b)])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x166))){const _0x4e8a12=_0x4ee5b9[_0x4925b9(0x146)](/kubectl\s+(get|logs|describe|apply)/),_0x321378=_0x4e8a12?_0x4e8a12[0x1]:'get';return _0x5839d4(_0x4925b9(0x12e),(0x0,devops_1['filterKubectl'])(_0x23e482,_0x321378));}if(_0x4ee5b9[_0x4925b9(0x146)](/^(ls|dir)(\s|$)/)||_0x4ee5b9[_0x4925b9(0x151)](_0x4925b9(0x18e))||_0x4ee5b9[_0x4925b9(0x158)](_0x4925b9(0x170)))return _0x5839d4(_0x4925b9(0x12e),(0x0,shell_1[_0x4925b9(0x16e)])(_0x23e482));if(_0x4ee5b9[_0x4925b9(0x146)](/^tree(\s|$)/)||_0x4ee5b9['includes']('\x20tree\x20')||_0x4ee5b9[_0x4925b9(0x158)]('\x20tree'))return _0x5839d4(_0x4925b9(0x12e),(0x0,shell_1[_0x4925b9(0x17f)])(_0x23e482));if(_0x4ee5b9['match'](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x436562=(0x0,shell_1['filterCat'])(_0x23e482,_0x4d319f);if(_0x436562[_0x4925b9(0x151)](_0x4925b9(0x144)))_0x2557a5[_0x4925b9(0x16a)](_0x4925b9(0x130));else{if(_0x436562[_0x4925b9(0x151)](_0x4925b9(0x17a))||_0x436562[_0x4925b9(0x151)](_0x4925b9(0x13f)))_0x2557a5[_0x4925b9(0x16a)]('binary');else{if(_0x436562['includes'](_0x4925b9(0x131)))_0x2557a5[_0x4925b9(0x16a)]('skeleton');else{if(_0x436562[_0x4925b9(0x151)]('|\x20')&&_0x436562['includes']('---')&&_0x436562['length']<_0x23e482[_0x4925b9(0x150)]*0.5)_0x2557a5[_0x4925b9(0x16a)]('json_crusher');else{if(_0x436562[_0x4925b9(0x151)]('lines\x20truncated'))_0x2557a5['push'](_0x4925b9(0x12e));}}}}if(_0x436562[_0x4925b9(0x150)]<_0x23e482[_0x4925b9(0x150)]&&!_0x2557a5[_0x4925b9(0x180)](_0xe30441=>_0xe30441!==_0x4925b9(0x18a)&&_0xe30441!=='redact'))_0x2557a5[_0x4925b9(0x16a)](_0x4925b9(0x12e));return exports[_0x4925b9(0x184)]=_0x2557a5,_0x436562;}if(_0x4ee5b9['match'](/^find(\s|$)/))return _0x5839d4('filter',(0x0,shell_1[_0x4925b9(0x164)])(_0x23e482));if(_0x4ee5b9['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x5839d4(_0x4925b9(0x12e),(0x0,shell_1['filterGrep'])(_0x23e482));}}catch(_0x2b3a09){}return isFeatureEnabled(_0x4925b9(0x172))&&(_0x23e482=(0x0,generic_1[_0x4925b9(0x12c)])(_0x23e482),_0x2557a5[_0x4925b9(0x16a)]('whitespace')),_0x23e482=(0x0,generic_1[_0x4925b9(0x18f)])(_0x23e482),_0x23e482=(0x0,generic_1[_0x4925b9(0x175)])(_0x23e482,0x4e20),exports[_0x4925b9(0x184)]=_0x2557a5,_0x23e482;}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x422d3a(0x18d)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x422d3a(0x198)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x422d3a(0x14d)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x422d3a(0x171)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x422d3a(0x173)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x422d3a(0x161)},{'pattern':/^npx\s+/,'prefix':a0_0x422d3a(0x18c)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x422d3a(0x139)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x422d3a(0x12d)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x422d3a(0x182)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x422d3a(0x13a)},{'pattern':/^find\s+/,'prefix':a0_0x422d3a(0x137)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x422d3a(0x17b)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x422d3a(0x159)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x422d3a(0x16c)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x422d3a(0x183)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x422d3a(0x143)}];function rewriteCommand(_0x419f5e){const _0xa0fa9e=a0_0x422d3a,_0x1a1f7f=_0x419f5e[_0xa0fa9e(0x179)]();if(_0x1a1f7f[_0xa0fa9e(0x142)](_0xa0fa9e(0x157)))return _0x1a1f7f;for(const _0x94e93c of REWRITE_RULES){if(_0x94e93c[_0xa0fa9e(0x188)][_0xa0fa9e(0x15b)](_0x1a1f7f))return _0xa0fa9e(0x157)+_0x1a1f7f;}return _0x1a1f7f;}
|
|
1
|
+
'use strict';const a0_0x2556bd=a0_0x6eb8;(function(_0xcc424b,_0x1e9e5b){const _0x21cf66=a0_0x6eb8,_0x2e0dd9=_0xcc424b();while(!![]){try{const _0x39fa09=-parseInt(_0x21cf66(0xac))/0x1*(-parseInt(_0x21cf66(0xd9))/0x2)+-parseInt(_0x21cf66(0xd3))/0x3*(parseInt(_0x21cf66(0xa6))/0x4)+-parseInt(_0x21cf66(0xb6))/0x5*(-parseInt(_0x21cf66(0xaa))/0x6)+-parseInt(_0x21cf66(0x98))/0x7+-parseInt(_0x21cf66(0xc9))/0x8+parseInt(_0x21cf66(0x7b))/0x9*(parseInt(_0x21cf66(0x86))/0xa)+parseInt(_0x21cf66(0x96))/0xb;if(_0x39fa09===_0x1e9e5b)break;else _0x2e0dd9['push'](_0x2e0dd9['shift']());}catch(_0x2d06b3){_0x2e0dd9['push'](_0x2e0dd9['shift']());}}}(a0_0x4de6,0x5016a));Object[a0_0x2556bd(0xca)](exports,'__esModule',{'value':!![]}),exports[a0_0x2556bd(0x9c)]=exports[a0_0x2556bd(0xe4)]=void 0x0,exports[a0_0x2556bd(0xc2)]=compressOutput,exports['rewriteCommand']=rewriteCommand;function a0_0x4de6(){const _0x18ccbe=['jest','510QkMjvn','trim\x20git','[binary','push','match','trim\x20gh','trim\x20cargo','trim\x20pytest','filterGoTest','tracker','filterPipInstall','ruff\x20','cargo\x20check','secretsFound','vitest','\x20tree','1683275rWPZPO','pip\x20install','3042767XPBSHB','../redactor','trim\x20npm','\x20ls\x20','lastFeatures','startsWith','trim\x20find','filterCat','trim\x20docker','includes','trim\x20kubectl','go\x20vet','npm\x20install','trim\x20pip','2336660OcuxaI','filterGrep','filterDockerPs','npm\x20test','257292JwOGtK','npm\x20i','5721BovcUX','filterDockerImages','redactor','secretTypes','trim','endsWith','npm\x20i\x20','binary','./rust','redactWithAudit','70njcJhL','length','trim\x20go','filter','get','[code\x20skeleton]','cargo\x20build','[minified\x20file]','./git','./python','collapseDuplicates','trim\x20','compressOutput','some','./go','trim\x20npx','filterTree','git\x20show','go\x20test','770512NPsaIY','defineProperty','lock','filterDockerLogs','trim\x20pnpm','kubectl','trim\x20tree','./devops','softTruncate','text','3SYtmKi','ansi_strip','filterCargoTest','redact','filterGitDiff','filterCargoBuild','12Ymzpjs','filterJestVitest','yadm\x20diff','trim\x20ls','pattern','whitespace','trim\x20ruff','./shell','trim\x20read','[lock\x20file]','collapseWhitespace','lastRedactAudit','ruff\x20check','filterKubectl','filterPytest','115677VfRGVT','yarn\x20test','toLowerCase','yadm\x20log','pytest','filterRuff','cargo\x20test','git\x20diff','../tracker','getConfig'];a0_0x4de6=function(){return _0x18ccbe;};return a0_0x4de6();}const generic_1=require('./generic'),git_1=require(a0_0x2556bd(0xbe)),python_1=require(a0_0x2556bd(0xbf)),js_1=require('./js'),shell_1=require(a0_0x2556bd(0xe0)),rust_1=require(a0_0x2556bd(0xb4)),go_1=require(a0_0x2556bd(0xc4)),devops_1=require(a0_0x2556bd(0xd0)),redactor_1=require(a0_0x2556bd(0x99)),tracker_1=require(a0_0x2556bd(0x83));exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]},exports['lastFeatures']=[];function a0_0x6eb8(_0x1cc5eb,_0x40f3ec){_0x1cc5eb=_0x1cc5eb-0x7a;const _0x4de6b1=a0_0x4de6();let _0x6eb8ec=_0x4de6b1[_0x1cc5eb];return _0x6eb8ec;}function isFeatureEnabled(_0x5ca0cd){const _0xbb80b2=a0_0x2556bd;try{const _0x153a3b=tracker_1[_0xbb80b2(0x8f)][_0xbb80b2(0x84)](),_0x3914c6=_0x153a3b['features_enabled'];if(!_0x3914c6||_0x3914c6[_0x5ca0cd]===undefined)return!![];return _0x3914c6[_0x5ca0cd]!==![];}catch{return!![];}}function compressOutput(_0x37f552,_0x206e50,_0x494203,_0x463e8c=!![]){const _0x2be638=a0_0x2556bd,_0x2ba419=_0x37f552[_0x2be638(0xb0)]();let _0x393745=_0x206e50;_0x494203[_0x2be638(0xb0)]()[_0x2be638(0xb7)]>0x0&&(_0x393745=_0x206e50+'\x0a'+_0x494203);let _0x5c22a8=isFeatureEnabled('ansi_strip')?(0x0,generic_1['stripAnsi'])(_0x393745):_0x393745;const _0x3f8a2d=[];if(_0x5c22a8[_0x2be638(0xb7)]<_0x393745[_0x2be638(0xb7)])_0x3f8a2d['push']('ansi_strip');const _0x211e99=(_0x187d41,_0x4910c4)=>{const _0x50850e=_0x2be638;return _0x3f8a2d[_0x50850e(0x89)](_0x187d41),exports[_0x50850e(0x9c)]=_0x3f8a2d,_0x4910c4;};if(_0x463e8c&&isFeatureEnabled(_0x2be638(0xd6))){const _0x6d13e2=redactor_1[_0x2be638(0xae)][_0x2be638(0xb5)](_0x5c22a8);_0x5c22a8=_0x6d13e2[_0x2be638(0xd2)],exports['lastRedactAudit']={'secretsFound':_0x6d13e2[_0x2be638(0x93)],'secretTypes':_0x6d13e2[_0x2be638(0xaf)]};if(_0x6d13e2[_0x2be638(0x93)]>0x0)_0x3f8a2d['push'](_0x2be638(0xd6));}else exports[_0x2be638(0xe4)]={'secretsFound':0x0,'secretTypes':[]};const _0xf4bcd6=_0x2ba419[_0x2be638(0x7d)](),_0x2eab44=isFeatureEnabled(_0x2be638(0xb9));try{if(_0x2eab44){if(_0xf4bcd6['includes']('git\x20status')||_0xf4bcd6[_0x2be638(0xa1)]('yadm\x20status'))return _0x211e99(_0x2be638(0xb9),(0x0,git_1['filterGitStatus'])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)]('git\x20log')||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x7e)))return _0x211e99(_0x2be638(0xb9),(0x0,git_1['filterGitLog'])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x82))||_0xf4bcd6['includes'](_0x2be638(0xc7))||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xdb)))return _0x211e99(_0x2be638(0xb9),(0x0,git_1[_0x2be638(0xd7)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x7f))||_0xf4bcd6['match'](/python3?\s+-m\s+pytest/))return _0x211e99('filter',(0x0,python_1[_0x2be638(0x7a)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x97))||_0xf4bcd6[_0x2be638(0xa1)]('pip3\x20install'))return _0x211e99(_0x2be638(0xb9),(0x0,python_1[_0x2be638(0x90)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xe5))||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x91)))return _0x211e99(_0x2be638(0xb9),(0x0,devops_1[_0x2be638(0x80)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xa4))||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xb2))||_0xf4bcd6[_0x2be638(0xb1)](_0x2be638(0xab))||_0xf4bcd6[_0x2be638(0xa1)]('pnpm\x20install')||_0xf4bcd6[_0x2be638(0xa1)]('yarn\x20install'))return _0x211e99('filter',(0x0,js_1['filterNpmInstall'])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x85))||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x94)))return _0x211e99('filter',(0x0,js_1[_0x2be638(0xda)])(_0x5c22a8));if(_0xf4bcd6['includes'](_0x2be638(0xa9))||_0xf4bcd6['includes']('pnpm\x20test')||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x7c))||_0xf4bcd6[_0x2be638(0xa1)]('npm\x20run\x20test'))return _0x211e99(_0x2be638(0xb9),(0x0,js_1[_0x2be638(0xda)])(_0x5c22a8));if(_0xf4bcd6['includes'](_0x2be638(0x81)))return _0x211e99('filter',(0x0,rust_1[_0x2be638(0xd5)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xbc))||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x92))||_0xf4bcd6[_0x2be638(0xa1)]('cargo\x20clippy'))return _0x211e99(_0x2be638(0xb9),(0x0,rust_1[_0x2be638(0xd8)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xc8)))return _0x211e99('filter',(0x0,go_1[_0x2be638(0x8e)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xa3)))return _0x211e99(_0x2be638(0xb9),(0x0,go_1['filterGoVet'])(_0x5c22a8));if(_0xf4bcd6['match'](/docker\s+ps/))return _0x211e99(_0x2be638(0xb9),(0x0,devops_1[_0x2be638(0xa8)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0x8a)](/docker\s+images/))return _0x211e99('filter',(0x0,devops_1[_0x2be638(0xad)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0x8a)](/docker\s+logs/))return _0x211e99(_0x2be638(0xb9),(0x0,devops_1[_0x2be638(0xcc)])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0xce))){const _0x20e906=_0xf4bcd6[_0x2be638(0x8a)](/kubectl\s+(get|logs|describe|apply)/),_0x2d747c=_0x20e906?_0x20e906[0x1]:_0x2be638(0xba);return _0x211e99(_0x2be638(0xb9),(0x0,devops_1[_0x2be638(0xe6)])(_0x5c22a8,_0x2d747c));}if(_0xf4bcd6['match'](/^(ls|dir)(\s|$)/)||_0xf4bcd6[_0x2be638(0xa1)](_0x2be638(0x9b))||_0xf4bcd6[_0x2be638(0xb1)]('\x20ls'))return _0x211e99(_0x2be638(0xb9),(0x0,shell_1['filterLs'])(_0x5c22a8));if(_0xf4bcd6['match'](/^tree(\s|$)/)||_0xf4bcd6[_0x2be638(0xa1)]('\x20tree\x20')||_0xf4bcd6[_0x2be638(0xb1)](_0x2be638(0x95)))return _0x211e99(_0x2be638(0xb9),(0x0,shell_1[_0x2be638(0xc6)])(_0x5c22a8));if(_0xf4bcd6['match'](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x3b1529=(0x0,shell_1[_0x2be638(0x9f)])(_0x5c22a8,_0x2ba419);if(_0x3b1529[_0x2be638(0xa1)](_0x2be638(0xe2)))_0x3f8a2d['push'](_0x2be638(0xcb));else{if(_0x3b1529[_0x2be638(0xa1)](_0x2be638(0x88))||_0x3b1529[_0x2be638(0xa1)](_0x2be638(0xbd)))_0x3f8a2d[_0x2be638(0x89)](_0x2be638(0xb3));else{if(_0x3b1529[_0x2be638(0xa1)](_0x2be638(0xbb)))_0x3f8a2d['push']('skeleton');else{if(_0x3b1529['includes']('|\x20')&&_0x3b1529[_0x2be638(0xa1)]('---')&&_0x3b1529[_0x2be638(0xb7)]<_0x5c22a8[_0x2be638(0xb7)]*0.5)_0x3f8a2d[_0x2be638(0x89)]('json_crusher');else{if(_0x3b1529[_0x2be638(0xa1)]('lines\x20truncated'))_0x3f8a2d[_0x2be638(0x89)](_0x2be638(0xb9));}}}}if(_0x3b1529['length']<_0x5c22a8['length']&&!_0x3f8a2d[_0x2be638(0xc3)](_0x51fc49=>_0x51fc49!==_0x2be638(0xd4)&&_0x51fc49!==_0x2be638(0xd6)))_0x3f8a2d['push'](_0x2be638(0xb9));return exports[_0x2be638(0x9c)]=_0x3f8a2d,_0x3b1529;}if(_0xf4bcd6[_0x2be638(0x8a)](/^find(\s|$)/))return _0x211e99(_0x2be638(0xb9),(0x0,shell_1['filterFind'])(_0x5c22a8));if(_0xf4bcd6[_0x2be638(0x8a)](/^(grep|rg|ripgrep)(\s|$)/))return _0x211e99('filter',(0x0,shell_1[_0x2be638(0xa7)])(_0x5c22a8));}}catch(_0xdec7df){}return isFeatureEnabled(_0x2be638(0xde))&&(_0x5c22a8=(0x0,generic_1[_0x2be638(0xe3)])(_0x5c22a8),_0x3f8a2d[_0x2be638(0x89)](_0x2be638(0xde))),_0x5c22a8=(0x0,generic_1[_0x2be638(0xc0)])(_0x5c22a8),_0x5c22a8=(0x0,generic_1[_0x2be638(0xd1)])(_0x5c22a8,0x4e20),exports[_0x2be638(0x9c)]=_0x3f8a2d,_0x5c22a8;}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x2556bd(0x87)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x2556bd(0x8b)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':'trim\x20glab'},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x2556bd(0x8c)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x2556bd(0xcd)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x2556bd(0x9a)},{'pattern':/^npx\s+/,'prefix':a0_0x2556bd(0xc5)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x2556bd(0xe1)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':a0_0x2556bd(0xdc)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x2556bd(0xcf)},{'pattern':/^find\s+/,'prefix':a0_0x2556bd(0x9e)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x2556bd(0xa0)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x2556bd(0xa2)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x2556bd(0x8d)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x2556bd(0xdf)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x2556bd(0xa5)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x2556bd(0xb8)}];function rewriteCommand(_0x8a805){const _0x13bef4=a0_0x2556bd,_0x25218a=_0x8a805[_0x13bef4(0xb0)]();if(_0x25218a[_0x13bef4(0x9d)]('trim\x20'))return _0x25218a;for(const _0x2ffbd9 of REWRITE_RULES){if(_0x2ffbd9[_0x13bef4(0xdd)]['test'](_0x25218a))return _0x13bef4(0xc1)+_0x25218a;}return _0x25218a;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4f10a9=a0_0x1fda;function a0_0x1fda(_0x2edaeb,_0x133d03){_0x2edaeb=_0x2edaeb-0x171;const _0x55acfa=a0_0x55ac();let _0x1fda3a=_0x55acfa[_0x2edaeb];return _0x1fda3a;}(function(_0x586842,_0x43fa34){const _0x224037=a0_0x1fda,_0x3c6605=_0x586842();while(!![]){try{const _0x4d549b=-parseInt(_0x224037(0x18c))/0x1*(parseInt(_0x224037(0x17f))/0x2)+parseInt(_0x224037(0x18e))/0x3*(-parseInt(_0x224037(0x198))/0x4)+-parseInt(_0x224037(0x176))/0x5+parseInt(_0x224037(0x197))/0x6+-parseInt(_0x224037(0x184))/0x7+-parseInt(_0x224037(0x183))/0x8*(-parseInt(_0x224037(0x18a))/0x9)+-parseInt(_0x224037(0x194))/0xa*(-parseInt(_0x224037(0x180))/0xb);if(_0x4d549b===_0x43fa34)break;else _0x3c6605['push'](_0x3c6605['shift']());}catch(_0x47ef44){_0x3c6605['push'](_0x3c6605['shift']());}}}(a0_0x55ac,0xd477d));Object[a0_0x4f10a9(0x19a)](exports,a0_0x4f10a9(0x18d),{'value':!![]}),exports[a0_0x4f10a9(0x191)]=filterNpmInstall,exports[a0_0x4f10a9(0x17a)]=filterJestVitest;function filterNpmInstall(_0x4ca7ce){const _0x213b86=a0_0x4f10a9,_0x3cbf87=_0x4ca7ce[_0x213b86(0x185)](/\r/g,'\x0a'),_0x50050d=_0x3cbf87[_0x213b86(0x18b)]('\x0a'),_0x3d431f=[];for(const _0x34a4d3 of _0x50050d){const _0x5bd5ad=_0x34a4d3[_0x213b86(0x179)]();(_0x5bd5ad['includes'](_0x213b86(0x196))||_0x5bd5ad['includes']('removed\x20')||_0x5bd5ad[_0x213b86(0x182)](_0x213b86(0x190))||_0x5bd5ad['includes'](_0x213b86(0x186))||_0x5bd5ad[_0x213b86(0x182)](_0x213b86(0x173)))&&(!_0x5bd5ad[_0x213b86(0x182)]('%')&&!_0x5bd5ad['startsWith']('⠋')&&!_0x5bd5ad[_0x213b86(0x17b)]('⠙')&&_0x3d431f['push'](_0x5bd5ad));}const _0x3913bc=_0x3d431f['join']('\x0a')[_0x213b86(0x179)]();return _0x3913bc[_0x213b86(0x18f)]>0x0?_0x3913bc:_0x213b86(0x17d);}function a0_0x55ac(){const _0x39da0e=['Test\x20Files:','added\x20','7331418zEtNmQ','4RrzRZy','\x20failed\x20(','defineProperty','slice','FAIL\x20\x20','found\x20','FAIL','\x0aFailures:','546635eOQBmP','\x20passed','Tests:','trim','filterJestVitest','startsWith','\x20\x20...\x20(','NPM:\x20Packages\x20verified/installed\x20successfully','match','244RjAycw','11IqOwIc','\x20total)','includes','3049808PQDgfR','2301474wEORcn','replace','up\x20to\x20date','\x20passed,\x20','join','PASS','9VeEpSd','split','4393YkaXfu','__esModule','2264973xGHcFR','length','audited\x20','filterNpmInstall','Test\x20Runner:\x20','push','9961860IPfypJ'];a0_0x55ac=function(){return _0x39da0e;};return a0_0x55ac();}function filterJestVitest(_0x36be2a){const _0x11fa7c=a0_0x4f10a9,_0x14a688=_0x36be2a[_0x11fa7c(0x18b)]('\x0a');let _0x57fc4d=0x0,_0x2eaf0b=0x0,_0x3005ae=0x0;const _0x535e52=[];let _0x7c219b=![];for(const _0x13b0ed of _0x14a688){const _0x44644e=_0x13b0ed[_0x11fa7c(0x179)]();if(_0x44644e['startsWith'](_0x11fa7c(0x178))||_0x44644e[_0x11fa7c(0x182)](_0x11fa7c(0x195))){const _0x35580b=_0x44644e[_0x11fa7c(0x17e)](/(\d+)\s+passed/),_0xc0820f=_0x44644e[_0x11fa7c(0x17e)](/(\d+)\s+failed/),_0x3abb16=_0x44644e['match'](/(\d+)\s+total/);if(_0x35580b)_0x57fc4d=parseInt(_0x35580b[0x1]);if(_0xc0820f)_0x2eaf0b=parseInt(_0xc0820f[0x1]);if(_0x3abb16)_0x3005ae=parseInt(_0x3abb16[0x1]);continue;}(_0x44644e[_0x11fa7c(0x17b)]('❯')||_0x44644e[_0x11fa7c(0x17b)]('●')||_0x44644e[_0x11fa7c(0x17b)](_0x11fa7c(0x172)))&&(_0x7c219b=!![]),_0x7c219b&&(_0x44644e[_0x11fa7c(0x18f)]>0x0&&!_0x44644e[_0x11fa7c(0x17b)]('Test\x20Suites:')&&!_0x44644e['startsWith'](_0x11fa7c(0x178))&&_0x535e52[_0x11fa7c(0x193)](_0x13b0ed));}if(_0x3005ae===0x0&&_0x57fc4d===0x0&&_0x2eaf0b===0x0){if(_0x36be2a[_0x11fa7c(0x182)](_0x11fa7c(0x189))&&!_0x36be2a[_0x11fa7c(0x182)](_0x11fa7c(0x174))){const _0x2652ff=_0x36be2a['match'](/(\d+)\s+passed/),_0x48d40a=_0x2652ff?_0x2652ff[0x1]:'all';return _0x11fa7c(0x192)+_0x48d40a+_0x11fa7c(0x177);}return _0x36be2a;}if(_0x2eaf0b===0x0&&_0x57fc4d>0x0)return _0x11fa7c(0x192)+_0x57fc4d+_0x11fa7c(0x177);const _0x3e2c79=[_0x11fa7c(0x192)+_0x57fc4d+_0x11fa7c(0x187)+_0x2eaf0b+_0x11fa7c(0x199)+_0x3005ae+_0x11fa7c(0x181)];if(_0x535e52['length']>0x0){_0x3e2c79[_0x11fa7c(0x193)](_0x11fa7c(0x175));const _0x5a393d=0x19,_0x37652d=_0x535e52[_0x11fa7c(0x171)](0x0,_0x5a393d);for(const _0x485be7 of _0x37652d){_0x3e2c79['push']('\x20\x20'+_0x485be7);}_0x535e52[_0x11fa7c(0x18f)]>_0x5a393d&&_0x3e2c79['push'](_0x11fa7c(0x17c)+(_0x535e52[_0x11fa7c(0x18f)]-_0x5a393d)+'\x20lines\x20of\x20trace\x20details\x20truncated)');}return _0x3e2c79[_0x11fa7c(0x188)]('\x0a');}
|