trimprompt 1.0.40 → 1.0.42
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/README.md +2 -3
- 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 +21 -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';
|
|
1
|
+
'use strict';function a0_0x2399(_0x4debf3,_0x153501){_0x4debf3=_0x4debf3-0x147;var _0x51a55b=a0_0x51a5();var _0x239949=_0x51a55b[_0x4debf3];return _0x239949;}var a0_0x183f05=a0_0x2399;function a0_0x51a5(){var _0x1d080f=['344598gynvvI','shims','trim','339784rBvPWn','.trimprompt','__createBinding','filter','__setModuleDefault','delimiter','__importStar','Failed\x20to\x20spawn\x20command\x20\x22','homedir','includes','__esModule','5175UcybkI','1395009advNrS','split','message','startsWith','get','join','hasOwnProperty','3604256CBeCta','\x22:\x20','getOwnPropertyDescriptor','42222qzCVVJ','defineProperty','inherit','close','53956lbEaDR','pipe','3MlMsaK','stdout','toLowerCase','data','create','call','length','prototype','child_process','default'];a0_0x51a5=function(){return _0x1d080f;};return a0_0x51a5();}(function(_0x4c72f1,_0x517231){var _0x112c60=a0_0x2399,_0x5ac87b=_0x4c72f1();while(!![]){try{var _0xcb5c30=-parseInt(_0x112c60(0x15b))/0x1+-parseInt(_0x112c60(0x167))/0x2+-parseInt(_0x112c60(0x15d))/0x3*(-parseInt(_0x112c60(0x16a))/0x4)+-parseInt(_0x112c60(0x14c))/0x5+-parseInt(_0x112c60(0x157))/0x6+-parseInt(_0x112c60(0x14d))/0x7+parseInt(_0x112c60(0x154))/0x8;if(_0xcb5c30===_0x517231)break;else _0x5ac87b['push'](_0x5ac87b['shift']());}catch(_0x21cdc4){_0x5ac87b['push'](_0x5ac87b['shift']());}}}(a0_0x51a5,0x18de8));var __createBinding=this&&this[a0_0x183f05(0x16c)]||(Object['create']?function(_0x110261,_0x20d037,_0x1f9cf6,_0x25af31){var _0x2102c3=a0_0x183f05;if(_0x25af31===undefined)_0x25af31=_0x1f9cf6;var _0x189cc6=Object[_0x2102c3(0x156)](_0x20d037,_0x1f9cf6);(!_0x189cc6||(_0x2102c3(0x151)in _0x189cc6?!_0x20d037[_0x2102c3(0x14b)]:_0x189cc6['writable']||_0x189cc6['configurable']))&&(_0x189cc6={'enumerable':!![],'get':function(){return _0x20d037[_0x1f9cf6];}}),Object[_0x2102c3(0x158)](_0x110261,_0x25af31,_0x189cc6);}:function(_0x5caff2,_0x23ad95,_0x19c12c,_0xc18c5c){if(_0xc18c5c===undefined)_0xc18c5c=_0x19c12c;_0x5caff2[_0xc18c5c]=_0x23ad95[_0x19c12c];}),__setModuleDefault=this&&this[a0_0x183f05(0x16e)]||(Object[a0_0x183f05(0x161)]?function(_0xfb9168,_0x29abea){var _0x3373cd=a0_0x183f05;Object[_0x3373cd(0x158)](_0xfb9168,_0x3373cd(0x166),{'enumerable':!![],'value':_0x29abea});}:function(_0x2a8ed8,_0x5c0766){var _0x5d188d=a0_0x183f05;_0x2a8ed8[_0x5d188d(0x166)]=_0x5c0766;}),__importStar=this&&this[a0_0x183f05(0x147)]||(function(){var _0x6da3a4=function(_0x114479){return _0x6da3a4=Object['getOwnPropertyNames']||function(_0x3872e3){var _0x5922a4=a0_0x2399,_0x370bfd=[];for(var _0x45ad93 in _0x3872e3)if(Object[_0x5922a4(0x164)][_0x5922a4(0x153)][_0x5922a4(0x162)](_0x3872e3,_0x45ad93))_0x370bfd[_0x370bfd[_0x5922a4(0x163)]]=_0x45ad93;return _0x370bfd;},_0x6da3a4(_0x114479);};return function(_0x1bca9a){var _0x1cb71b=a0_0x2399;if(_0x1bca9a&&_0x1bca9a[_0x1cb71b(0x14b)])return _0x1bca9a;var _0x13fd56={};if(_0x1bca9a!=null){for(var _0x32395d=_0x6da3a4(_0x1bca9a),_0x4f1ab7=0x0;_0x4f1ab7<_0x32395d['length'];_0x4f1ab7++)if(_0x32395d[_0x4f1ab7]!==_0x1cb71b(0x166))__createBinding(_0x13fd56,_0x1bca9a,_0x32395d[_0x4f1ab7]);}return __setModuleDefault(_0x13fd56,_0x1bca9a),_0x13fd56;};}());Object[a0_0x183f05(0x158)](exports,a0_0x183f05(0x14b),{'value':!![]}),exports['executeCommand']=executeCommand;const child_process_1=require(a0_0x183f05(0x165)),path=__importStar(require('path')),os=__importStar(require('os'));function executeCommand(_0x43fdff,_0x428d23){return new Promise(_0x230f27=>{var _0x1a00e1=a0_0x2399;const _0x5bb172=path[_0x1a00e1(0x152)](os[_0x1a00e1(0x149)](),_0x1a00e1(0x16b),_0x1a00e1(0x168)),_0x29a25e=(process.env.PATH||'')[_0x1a00e1(0x14e)](path[_0x1a00e1(0x16f)])[_0x1a00e1(0x16d)](_0x3bde53=>_0x3bde53[_0x1a00e1(0x169)]()[_0x1a00e1(0x15f)]()!==_0x5bb172[_0x1a00e1(0x15f)]())[_0x1a00e1(0x152)](path['delimiter']),_0x2de4ef={...process.env,'PATH':_0x29a25e,'TRIMPROMPT_DISABLED':'1'},_0x33cd45=_0x428d23['map'](_0x914b0=>_0x914b0[_0x1a00e1(0x14a)]('\x20')&&!_0x914b0[_0x1a00e1(0x150)]('\x22')?'\x22'+_0x914b0+'\x22':_0x914b0),_0x49ef1b=[_0x43fdff,..._0x33cd45]['join']('\x20'),_0x42f66d=(0x0,child_process_1['spawn'])(_0x49ef1b,[],{'stdio':[_0x1a00e1(0x159),_0x1a00e1(0x15c),_0x1a00e1(0x15c)],'shell':!![],'env':_0x2de4ef});let _0x3e3ab9='',_0x274617='';_0x42f66d[_0x1a00e1(0x15e)]?.['on'](_0x1a00e1(0x160),_0x3ade39=>{_0x3e3ab9+=_0x3ade39['toString']();}),_0x42f66d['stderr']?.['on']('data',_0x941685=>{_0x274617+=_0x941685['toString']();}),_0x42f66d['on']('error',_0x36178c=>{var _0x4a7cc9=_0x1a00e1;_0x230f27({'exitCode':0x1,'stdout':'','stderr':_0x4a7cc9(0x148)+_0x43fdff+_0x4a7cc9(0x155)+_0x36178c[_0x4a7cc9(0x14f)]});}),_0x42f66d['on'](_0x1a00e1(0x15a),_0x1cbb86=>{_0x230f27({'exitCode':_0x1cbb86??0x0,'stdout':_0x3e3ab9,'stderr':_0x274617});});});}
|
package/file-watcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x9cf7(_0x3e89d2,_0x186e7e){const _0x45d0ab=a0_0x45d0();return a0_0x9cf7=function(_0x9cf76d,_0x1206ec){_0x9cf76d=_0x9cf76d-0xa2;let _0x52001e=_0x45d0ab[_0x9cf76d];return _0x52001e;},a0_0x9cf7(_0x3e89d2,_0x186e7e);}const a0_0x2308b9=a0_0x9cf7;(function(_0x1da694,_0x15dac7){const _0x43ce9d=a0_0x9cf7,_0x5c7986=_0x1da694();while(!![]){try{const _0x2408d1=-parseInt(_0x43ce9d(0xff))/0x1*(parseInt(_0x43ce9d(0x111))/0x2)+-parseInt(_0x43ce9d(0x144))/0x3+parseInt(_0x43ce9d(0xdf))/0x4*(-parseInt(_0x43ce9d(0xb3))/0x5)+parseInt(_0x43ce9d(0x154))/0x6+-parseInt(_0x43ce9d(0x133))/0x7+-parseInt(_0x43ce9d(0x12e))/0x8*(parseInt(_0x43ce9d(0xd9))/0x9)+parseInt(_0x43ce9d(0xa5))/0xa;if(_0x2408d1===_0x15dac7)break;else _0x5c7986['push'](_0x5c7986['shift']());}catch(_0x44c266){_0x5c7986['push'](_0x5c7986['shift']());}}}(a0_0x45d0,0x587da));var __createBinding=this&&this['__createBinding']||(Object[a0_0x2308b9(0xc3)]?function(_0x52320c,_0x1ee573,_0x325a1f,_0x2f78b0){const _0x12ed2a=a0_0x2308b9;if(_0x2f78b0===undefined)_0x2f78b0=_0x325a1f;var _0x40f310=Object[_0x12ed2a(0xcc)](_0x1ee573,_0x325a1f);(!_0x40f310||('get'in _0x40f310?!_0x1ee573['__esModule']:_0x40f310['writable']||_0x40f310[_0x12ed2a(0xfe)]))&&(_0x40f310={'enumerable':!![],'get':function(){return _0x1ee573[_0x325a1f];}}),Object[_0x12ed2a(0xd7)](_0x52320c,_0x2f78b0,_0x40f310);}:function(_0x37beaf,_0x57cc73,_0x26d3f8,_0x2a3929){if(_0x2a3929===undefined)_0x2a3929=_0x26d3f8;_0x37beaf[_0x2a3929]=_0x57cc73[_0x26d3f8];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x2308b9(0xc3)]?function(_0x54f5ea,_0x2e5479){const _0x3a4e7b=a0_0x2308b9;Object['defineProperty'](_0x54f5ea,_0x3a4e7b(0x126),{'enumerable':!![],'value':_0x2e5479});}:function(_0x356663,_0x23cc98){_0x356663['default']=_0x23cc98;}),__importStar=this&&this['__importStar']||(function(){var _0x488a9d=function(_0x1cfc31){return _0x488a9d=Object['getOwnPropertyNames']||function(_0x540662){const _0x4f3494=a0_0x9cf7;var _0xcbd586=[];for(var _0x4ef673 in _0x540662)if(Object[_0x4f3494(0xa3)][_0x4f3494(0xf4)][_0x4f3494(0x156)](_0x540662,_0x4ef673))_0xcbd586[_0xcbd586[_0x4f3494(0x12b)]]=_0x4ef673;return _0xcbd586;},_0x488a9d(_0x1cfc31);};return function(_0x30b5d3){const _0x3bdfc0=a0_0x9cf7;if(_0x30b5d3&&_0x30b5d3[_0x3bdfc0(0xf7)])return _0x30b5d3;var _0x439518={};if(_0x30b5d3!=null){for(var _0x2eec2f=_0x488a9d(_0x30b5d3),_0x8deed0=0x0;_0x8deed0<_0x2eec2f[_0x3bdfc0(0x12b)];_0x8deed0++)if(_0x2eec2f[_0x8deed0]!=='default')__createBinding(_0x439518,_0x30b5d3,_0x2eec2f[_0x8deed0]);}return __setModuleDefault(_0x439518,_0x30b5d3),_0x439518;};}());Object[a0_0x2308b9(0xd7)](exports,a0_0x2308b9(0xf7),{'value':!![]}),exports[a0_0x2308b9(0xdb)]=loadConfig,exports[a0_0x2308b9(0xfa)]=saveConfig,exports[a0_0x2308b9(0xb8)]=getAgentStoragePaths,exports[a0_0x2308b9(0x11e)]=getLatestSessionFile,exports[a0_0x2308b9(0x13d)]=loadSessionsState,exports[a0_0x2308b9(0x135)]=saveSessionStateItem,exports[a0_0x2308b9(0xf6)]=processSessionFile,exports['compactSessionCopy']=compactSessionCopy,exports[a0_0x2308b9(0xe6)]=compactLiveSession,exports[a0_0x2308b9(0x13a)]=installWindowsStartupService,exports[a0_0x2308b9(0xa2)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),cache_manager_1=require(a0_0x2308b9(0xc8)),tracker_1=require(a0_0x2308b9(0x14a)),baseDir=path[a0_0x2308b9(0x146)](os[a0_0x2308b9(0xbb)](),a0_0x2308b9(0xb4)),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 loadConfig(){const _0x2e7958=a0_0x2308b9;try{if(!fs[_0x2e7958(0x14e)](baseDir))fs[_0x2e7958(0xb5)](baseDir,{'recursive':!![]});if(fs[_0x2e7958(0x14e)](configPath)){const _0x14df02=JSON['parse'](fs['readFileSync'](configPath,_0x2e7958(0x11b)));return{...DEFAULT_CONFIG,..._0x14df02,'conversation_toggles':{...DEFAULT_CONFIG[_0x2e7958(0xae)],..._0x14df02[_0x2e7958(0xae)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x2e7958(0xcf)],..._0x14df02[_0x2e7958(0xcf)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0xa79187){const _0x312ec6=a0_0x2308b9,_0x413362=loadConfig(),_0xff65ed={..._0x413362,..._0xa79187,'conversation_toggles':{..._0x413362[_0x312ec6(0xae)],..._0xa79187[_0x312ec6(0xae)]||{}},'custom_storage_paths':{..._0x413362[_0x312ec6(0xcf)],..._0xa79187[_0x312ec6(0xcf)]||{}}};try{if(!fs['existsSync'](baseDir))fs[_0x312ec6(0xb5)](baseDir,{'recursive':!![]});fs[_0x312ec6(0xd8)](configPath,JSON['stringify'](_0xff65ed,null,0x2),_0x312ec6(0x11b));}catch{}return _0xff65ed;}function getAgentStoragePaths(_0x47bb21){const _0x2fca2b=a0_0x2308b9,_0x39f9ca=loadConfig(),_0x6ceab9=_0x39f9ca['custom_storage_paths'][_0x47bb21];if(_0x6ceab9&&fs[_0x2fca2b(0x14e)](_0x6ceab9))return[_0x6ceab9];const _0x260540=os[_0x2fca2b(0xbb)](),_0x3c82e0=process[_0x2fca2b(0x117)]===_0x2fca2b(0xea),_0x4fed27=process[_0x2fca2b(0x117)]===_0x2fca2b(0x122);switch(_0x47bb21){case'claude':return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xa7),_0x2fca2b(0x147)),path['join'](_0x260540,'.claude',_0x2fca2b(0x158))];case'codex':return[path['join'](_0x260540,_0x2fca2b(0xba),_0x2fca2b(0xf2)),path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x13c),'Roaming',_0x2fca2b(0xce))];case _0x2fca2b(0xf1):case'antigravity':return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xfc),'antigravity'),path[_0x2fca2b(0x146)](_0x260540,'.gemini'),path['join'](_0x260540,'AppData',_0x2fca2b(0xbd),_0x2fca2b(0x113)),path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xbc),'gemini')];case _0x2fca2b(0x115):if(_0x3c82e0)return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x13c),_0x2fca2b(0xbd),_0x2fca2b(0x125),_0x2fca2b(0xc6),_0x2fca2b(0x128))];if(_0x4fed27)return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xb1),_0x2fca2b(0xfd),_0x2fca2b(0x125),_0x2fca2b(0xc6),'workspaceStorage')];return[path['join'](_0x260540,_0x2fca2b(0xbc),_0x2fca2b(0x125),'User',_0x2fca2b(0x128))];case _0x2fca2b(0x116):return[process[_0x2fca2b(0x120)](),path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xe9))];case'copilot':if(_0x3c82e0)return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x13c),_0x2fca2b(0xec),_0x2fca2b(0xd0))];return[path[_0x2fca2b(0x146)](_0x260540,'.config',_0x2fca2b(0xd0))];case _0x2fca2b(0x102):return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x145),'storage'),path['join'](process[_0x2fca2b(0x120)](),_0x2fca2b(0x145),'context')];case _0x2fca2b(0x143):return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xaa),_0x2fca2b(0xf2))];case _0x2fca2b(0xc4):return[path['join'](_0x260540,_0x2fca2b(0x10a),_0x2fca2b(0x123))];default:return[];}}function getLatestSessionFile(_0x3400ca){const _0x16ddb0=a0_0x2308b9,_0x2b1ca3=getAgentStoragePaths(_0x3400ca);let _0x4e15a3=null,_0x31586d=0x0,_0xd47150=null,_0x4573bf=null;for(const _0x474cdc of _0x2b1ca3){if(fs[_0x16ddb0(0x14e)](_0x474cdc)){if(!_0x4573bf)_0x4573bf=_0x474cdc;const _0x4452b1=(_0x3b6ed9,_0x326fde=0x0)=>{const _0x50ec82=_0x16ddb0;if(_0x326fde>0x6)return;try{const _0x37d9a0=fs[_0x50ec82(0x15c)](_0x3b6ed9,{'withFileTypes':!![]});for(const _0x203876 of _0x37d9a0){const _0x53d092=path[_0x50ec82(0x146)](_0x3b6ed9,_0x203876[_0x50ec82(0x10b)]);if(_0x203876[_0x50ec82(0x153)]()){const _0x435316=_0x203876[_0x50ec82(0x10b)][_0x50ec82(0x11f)]();if(_0x435316===_0x50ec82(0xc7)||_0x435316===_0x50ec82(0xda)||_0x435316===_0x50ec82(0x159)||_0x435316===_0x50ec82(0x119)||_0x435316===_0x50ec82(0xac)||_0x435316===_0x50ec82(0x13b)||_0x435316==='.next'||_0x435316===_0x50ec82(0xde)||_0x435316==='build'||_0x435316===_0x50ec82(0x10c)||_0x435316===_0x50ec82(0xb6))continue;_0x4452b1(_0x53d092,_0x326fde+0x1);}else{if(_0x203876[_0x50ec82(0x13e)]()&&!_0x203876[_0x50ec82(0x10b)][_0x50ec82(0xed)]('.')){const _0x3b594a=_0x203876[_0x50ec82(0x10b)][_0x50ec82(0x11f)]();if(_0x3b594a[_0x50ec82(0xa9)](_0x50ec82(0xe7))||_0x3b594a['endsWith']('.db')||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0xe1))||_0x3b594a['endsWith']('.png')||_0x3b594a['endsWith'](_0x50ec82(0xc1))||_0x3b594a['endsWith'](_0x50ec82(0x152))||_0x3b594a['endsWith'](_0x50ec82(0xdd))||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0x138))||_0x3b594a[_0x50ec82(0xc5)]('.pb')||_0x3b594a['endsWith'](_0x50ec82(0xe4))||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0x108))||_0x3b594a['endsWith'](_0x50ec82(0xb0))||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0x101))||_0x3b594a[_0x50ec82(0xc5)]('.dat')||_0x3b594a[_0x50ec82(0xed)]('media__')||_0x3b594a[_0x50ec82(0xed)](_0x50ec82(0x14c)))continue;const _0x2acd1e=fs[_0x50ec82(0x141)](_0x53d092);_0x2acd1e['mtimeMs']>_0x31586d&&(_0x31586d=_0x2acd1e[_0x50ec82(0xee)],_0x4e15a3=_0x203876['name'],_0xd47150=_0x53d092,_0x4573bf=_0x474cdc);}}}}catch{}};_0x4452b1(_0x474cdc);}}return{'fileName':_0x4e15a3,'lastModified':_0x31586d>0x0?new Date(_0x31586d)[_0x16ddb0(0x14b)]():null,'fullPath':_0xd47150,'dirPath':_0x4573bf};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0xa55f4b,_0x4a73da,_0x3d0a85){const _0x425e94=a0_0x2308b9;let _0x15bda4=![],_0x4361f4=0x0;if(!_0xa55f4b)return{'modified':_0x15bda4,'savedTokens':_0x4361f4};const _0x47fa40=_0x15e527=>_0x15e527['replace'](/\r\n/g,'\x0a')[_0x425e94(0x15a)](/\n{3,}/g,'\x0a\x0a');if(typeof _0xa55f4b['content']==='string'){let _0x38c622=_0xa55f4b[_0x425e94(0x11d)],_0x173560=_0x47fa40(_0x38c622);_0x173560[_0x425e94(0x12b)]<_0x38c622['length']&&(_0xa55f4b[_0x425e94(0x11d)]=_0x173560,_0x15bda4=!![],_0x4361f4+=Math['ceil']((_0x38c622['length']-_0x173560[_0x425e94(0x12b)])/0x4));if(_0xa55f4b['content']['length']>OFFLOAD_THRESHOLD_CHARS&&!_0xa55f4b[_0x425e94(0x11d)][_0x425e94(0xa9)](_0x425e94(0x13f))){const _0x349777=_0x425e94(0xb7)+Math[_0x425e94(0xbf)](_0xa55f4b[_0x425e94(0x11d)][_0x425e94(0x12b)]/0x4)+_0x425e94(0x10d),_0x555c10=(0x0,cache_manager_1[_0x425e94(0x114)])(_0x4a73da,_0x3d0a85,_0xa55f4b[_0x425e94(0x11d)],_0x349777);_0xa55f4b['content']=_0x425e94(0x142)+_0x555c10[_0x425e94(0x148)]+'\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x555c10[_0x425e94(0xe8)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x555c10['chunk_id']+'`\x0a',_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xe2)](0x0,_0x555c10[_0x425e94(0x148)]-_0x555c10[_0x425e94(0x107)]);}}else{if(Array[_0x425e94(0x10e)](_0xa55f4b[_0x425e94(0x11d)]))for(const _0x280ff2 of _0xa55f4b[_0x425e94(0x11d)]){if(_0x280ff2&&typeof _0x280ff2===_0x425e94(0x109)){if(typeof _0x280ff2[_0x425e94(0x15b)]===_0x425e94(0xf0)){let _0x38c16f=_0x280ff2[_0x425e94(0x15b)],_0x4af2c6=_0x47fa40(_0x38c16f);_0x4af2c6[_0x425e94(0x12b)]<_0x38c16f[_0x425e94(0x12b)]&&(_0x280ff2[_0x425e94(0x15b)]=_0x4af2c6,_0x15bda4=!![],_0x4361f4+=Math['ceil']((_0x38c16f[_0x425e94(0x12b)]-_0x4af2c6[_0x425e94(0x12b)])/0x4));if(_0x280ff2[_0x425e94(0x15b)][_0x425e94(0x12b)]>OFFLOAD_THRESHOLD_CHARS&&!_0x280ff2[_0x425e94(0x15b)][_0x425e94(0xa9)]('TrimPrompt\x20Cache\x20Engine')){const _0x222042=_0x425e94(0x131)+Math[_0x425e94(0xbf)](_0x280ff2[_0x425e94(0x15b)][_0x425e94(0x12b)]/0x4)+_0x425e94(0x10d),_0x206936=(0x0,cache_manager_1[_0x425e94(0x114)])(_0x4a73da,_0x3d0a85,_0x280ff2['text'],_0x222042);_0x280ff2[_0x425e94(0x15b)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x206936[_0x425e94(0xe8)]+_0x425e94(0x15f)+_0x206936[_0x425e94(0xe8)]+'`\x0a',_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xe2)](0x0,_0x206936[_0x425e94(0x148)]-_0x206936['compressed_tokens']);}}else{if(typeof _0x280ff2[_0x425e94(0x11d)]===_0x425e94(0xf0)){let _0x1b2c90=_0x280ff2[_0x425e94(0x11d)],_0x137106=_0x47fa40(_0x1b2c90);_0x137106['length']<_0x1b2c90[_0x425e94(0x12b)]&&(_0x280ff2['content']=_0x137106,_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xbf)]((_0x1b2c90[_0x425e94(0x12b)]-_0x137106[_0x425e94(0x12b)])/0x4));if(_0x280ff2[_0x425e94(0x11d)][_0x425e94(0x12b)]>OFFLOAD_THRESHOLD_CHARS&&!_0x280ff2[_0x425e94(0x11d)][_0x425e94(0xa9)]('TrimPrompt\x20Cache\x20Engine')){const _0x3a392b=_0x425e94(0xe3)+Math[_0x425e94(0xbf)](_0x280ff2[_0x425e94(0x11d)][_0x425e94(0x12b)]/0x4)+_0x425e94(0x10d),_0x5b82d1=(0x0,cache_manager_1[_0x425e94(0x114)])(_0x4a73da,_0x3d0a85,_0x280ff2[_0x425e94(0x11d)],_0x3a392b);_0x280ff2[_0x425e94(0x11d)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x5b82d1[_0x425e94(0xe8)]+_0x425e94(0x15f)+_0x5b82d1['chunk_id']+'`\x0a',_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xe2)](0x0,_0x5b82d1[_0x425e94(0x148)]-_0x5b82d1[_0x425e94(0x107)]);}}}}}}return{'modified':_0x15bda4,'savedTokens':_0x4361f4};}const sessionsStatePath=path['join'](baseDir,a0_0x2308b9(0xb9));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x53ccec=a0_0x2308b9;try{if(fs[_0x53ccec(0x14e)](sessionsStatePath)){const _0x5f3e9a=JSON[_0x53ccec(0xc9)](fs['readFileSync'](sessionsStatePath,'utf8'));if(_0x5f3e9a&&typeof _0x5f3e9a==='object')return sessionsStateMemoryCache=_0x5f3e9a,_0x5f3e9a;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x457a4f,_0x509d10,_0x21a1b6,_0x1da7ff=0x0,_0x3827b0=0x0,_0x446618=0x0){const _0x2d024=a0_0x2308b9;try{const _0x1464d8=loadSessionsState(),_0x9af73d=_0x1464d8[_0x457a4f]||{},_0x4cd8c3=_0x3827b0||_0x9af73d[_0x2d024(0x124)]||0x0,_0x4ae1df=_0x446618||_0x9af73d[_0x2d024(0xd5)]||0x0,_0x39de04=_0x21a1b6!==undefined?_0x21a1b6:_0x9af73d[_0x2d024(0x140)]||0x0;_0x1464d8[_0x457a4f]={'lineCount':_0x509d10||_0x9af73d['lineCount']||0x1,'activeSavedTokens':_0x39de04+_0x4cd8c3+_0x4ae1df,'sideCacheSaved':_0x1da7ff||_0x9af73d[_0x2d024(0xcb)]||0x0,'officialCompactSaved':_0x39de04,'autoCompactSaved':_0x4cd8c3,'hookSavedTokens':_0x4ae1df},sessionsStateMemoryCache=_0x1464d8;if(!fs[_0x2d024(0x14e)](baseDir))fs[_0x2d024(0xb5)](baseDir,{'recursive':!![]});const _0x5efeb5=sessionsStatePath+_0x2d024(0xb0);fs['writeFileSync'](_0x5efeb5,JSON[_0x2d024(0xc2)](_0x1464d8,null,0x2),'utf8'),fs[_0x2d024(0x155)](_0x5efeb5,sessionsStatePath);}catch{}}function a0_0x45d0(){const _0x2d1ba3=['.compact','chunk_id','.aider.chat.history.md','win32','extname','Local','startsWith','mtimeMs','savedTokens','string','gemini','sessions','byteLength','hasOwnProperty','none','processSessionFile','__esModule','Compaction\x20failed','Startup','saveConfig','matchAll','.gemini','Application\x20Support','configurable','2057MBrrDE','TrimPromptDaemon.vbs','.lock','openclaw','saved','readFileSync','claude','./hooks/claude-hook','compressed_tokens','.shm','object','.cortex','name','out','\x20tokens).','isArray','push','./proxy-conv','134mopFWX','.jsonl','Gemini','saveChunk','cursor','aider','platform','prompt_turn','env','role','utf8','lineCount','content','getLatestSessionFile','toLowerCase','cwd','trim','darwin','cache','autoCompactSaved','Cursor','default','get','workspaceStorage','set','logExecution','length','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','compaction\x20failed','328608cxSXvW','find','modified','Summary:\x20Text\x20block\x20offloaded\x20(','dirname','3315914JwzIlJ','.json1','saveSessionStateItem','Session\x20file\x20not\x20found','Start\x20Menu','.webp','Windows','installWindowsStartupService','__pycache__','AppData','loadSessionsState','isFile','TrimPrompt\x20Cache\x20Engine','officialCompactSaved','statSync','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','opencode','132831ONsqkS','.openclaw','join','projects','raw_tokens','assign','./tracker','toISOString','image_','messages','existsSync','tracker','round','File\x20not\x20found','.jpeg','isDirectory','4150614gCBBTg','renameSync','call','Programs','history','.venv','replace','text','readdirSync','Unsupported\x20extension','split','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','startWatcherDaemon','prototype','system','14731470eGsnjV','watch','.claude','conv_','includes','.opencode','cli.js','venv','live-conv','conversation_toggles','.json','.tmp','Library','Unsupported\x20format\x20\x27','1223610SyCrKz','.trimprompt','mkdirSync','.agents','Summary:\x20Content\x20offloaded\x20(','getAgentStoragePaths','sessions_state.json','.codex','homedir','.config','Roaming','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','ceil','message','.jpg','stringify','create','cortex','endsWith','User','node_modules','./cache-manager','parse','Microsoft','sideCacheSaved','getOwnPropertyDescriptor','fullPath','Codex','custom_storage_paths','github-copilot-cli','repeat','compact:','size','compact_copy','hookSavedTokens','filter','defineProperty','writeFileSync','144MnVLFG','.git','loadConfig','tokens','.gif','dist','8KdBQHM','conv:','.vscdb','max','Summary:\x20Tool\x20result\x20offloaded\x20(','.wal','codex','compactLiveSession'];a0_0x45d0=function(){return _0x2d1ba3;};return a0_0x45d0();}function processSessionFile(_0x5e87d8,_0x3a3e59){const _0x4ec1b9=a0_0x2308b9;try{if(!fs[_0x4ec1b9(0x14e)](_0x5e87d8))return;const _0x39e158=fs[_0x4ec1b9(0x141)](_0x5e87d8);if(_0x39e158[_0x4ec1b9(0x153)]()||_0x39e158[_0x4ec1b9(0xd3)]===0x0)return;const _0x3c34c2=loadConfig(),_0x18534d=_0x4ec1b9(0xa8)+_0x3a3e59;if(_0x3c34c2[_0x4ec1b9(0xae)][_0x18534d]===![])return;const _0x561494=fs[_0x4ec1b9(0x104)](_0x5e87d8,_0x4ec1b9(0x11b)),_0x1a6788=path[_0x4ec1b9(0xeb)](_0x5e87d8)[_0x4ec1b9(0x11f)]();let _0x323a01=0x1;if(_0x1a6788==='.jsonl'||_0x1a6788===_0x4ec1b9(0x134))_0x323a01=_0x561494['split']('\x0a')[_0x4ec1b9(0xd6)](Boolean)[_0x4ec1b9(0x12b)];else{if(_0x1a6788==='.json')try{const _0x3f6ff7=JSON[_0x4ec1b9(0xc9)](_0x561494),_0x1d3f0d=Array[_0x4ec1b9(0x10e)](_0x3f6ff7[_0x4ec1b9(0x14d)])?_0x3f6ff7[_0x4ec1b9(0x14d)]:Array[_0x4ec1b9(0x10e)](_0x3f6ff7)?_0x3f6ff7:null;if(_0x1d3f0d)_0x323a01=_0x1d3f0d[_0x4ec1b9(0x12b)];}catch{}}let _0x47d6d8=0x0;if((_0x1a6788===_0x4ec1b9(0x112)||_0x1a6788===_0x4ec1b9(0x134))&&_0x561494['includes'](_0x4ec1b9(0x103))&&_0x561494['includes'](_0x4ec1b9(0xdc))){const _0x1eb09a=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x116146 of _0x561494[_0x4ec1b9(0x15e)]('\x0a')){if(!_0x116146[_0x4ec1b9(0xa9)](_0x4ec1b9(0x103))||!_0x116146['includes']('tokens'))continue;try{const _0x20d771=JSON['parse'](_0x116146);if(_0x20d771['type']!==_0x4ec1b9(0xa4))continue;const _0x16207e=typeof _0x20d771[_0x4ec1b9(0x11d)]===_0x4ec1b9(0xf0)?_0x20d771[_0x4ec1b9(0x11d)]:_0x20d771['message']&&typeof _0x20d771['message'][_0x4ec1b9(0x11d)]===_0x4ec1b9(0xf0)?_0x20d771['message'][_0x4ec1b9(0x11d)]:'';if(!_0x16207e)continue;for(const _0x2031d8 of _0x16207e[_0x4ec1b9(0xfb)](_0x1eb09a)){let _0x2ac8bb=parseFloat(_0x2031d8[0x1]);if(_0x2031d8[0x0]['toLowerCase']()['includes']('k'))_0x2ac8bb=_0x2ac8bb*0x3e8;_0x47d6d8+=Math[_0x4ec1b9(0x150)](_0x2ac8bb);}}catch{}}}const _0x10566b=loadSessionsState(),_0x32e176=_0x10566b[_0x5e87d8],_0x25ff04=_0x32e176?_0x32e176[_0x4ec1b9(0x11c)]:0x0,_0x35d726=_0x32e176?_0x32e176['activeSavedTokens']||0x0:0x0;if(_0x25ff04>0x0&&_0x323a01>_0x25ff04&&_0x35d726>0x0){const _0x40693c=_0x4ec1b9(0xe0)+_0x3a3e59;tracker_1[_0x4ec1b9(0x14f)][_0x4ec1b9(0x12a)](_0x40693c,'A'[_0x4ec1b9(0xd1)](_0x35d726*0x4),'',0x0,undefined,[_0x4ec1b9(0xa8)+_0x3a3e59,'live-conv',_0x3a3e59,_0x4ec1b9(0x118)]);}const _0x3f7f6e=_0x32e176&&_0x32e176['officialCompactSaved']!==undefined?_0x32e176['officialCompactSaved']:0x0,_0x7cb805=Math[_0x4ec1b9(0xe2)](_0x3f7f6e,_0x47d6d8);saveSessionStateItem(_0x5e87d8,_0x323a01,_0x7cb805,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x357a84,_0x338b3e){const _0x2a4b48=a0_0x2308b9;try{if(!fs[_0x2a4b48(0x14e)](_0x357a84))return{'ok':![],'reason':_0x2a4b48(0x136)};const _0x2f841f=path['extname'](_0x357a84)['toLowerCase']();if(_0x2f841f!==_0x2a4b48(0xaf)&&_0x2f841f!==_0x2a4b48(0x112)&&_0x2f841f!=='.json1')return{'ok':![],'reason':_0x2a4b48(0xb2)+(_0x2f841f||_0x2a4b48(0xf5))+'\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)'};const _0x2be92a=fs[_0x2a4b48(0x104)](_0x357a84,'utf8'),_0x4964e9=Buffer[_0x2a4b48(0xf3)](_0x2be92a,_0x2a4b48(0x11b)),_0x155552=path['basename'](_0x357a84,_0x2f841f);let _0x44229a=_0x2be92a,_0x3a3dca=![];if(_0x2f841f===_0x2a4b48(0xaf)){const _0x2f6f67=JSON['parse'](_0x2be92a),_0x49279a=Array[_0x2a4b48(0x10e)](_0x2f6f67['messages'])?_0x2f6f67[_0x2a4b48(0x14d)]:Array[_0x2a4b48(0x10e)](_0x2f6f67)?_0x2f6f67:null;if(_0x49279a){for(const _0x1edb2a of _0x49279a){const _0x539c90=compressMessageContent(_0x1edb2a,_0x155552,_0x338b3e);if(_0x539c90[_0x2a4b48(0x130)])_0x3a3dca=!![];}if(_0x3a3dca)_0x44229a=JSON[_0x2a4b48(0xc2)](_0x2f6f67,null,0x2);}}else{const _0x3dfddf=_0x2be92a[_0x2a4b48(0x15e)]('\x0a'),_0x4f22fe=[];for(let _0x5565d5 of _0x3dfddf){if(!_0x5565d5[_0x2a4b48(0x121)]()){_0x4f22fe['push'](_0x5565d5);continue;}try{const _0x3358b8=JSON[_0x2a4b48(0xc9)](_0x5565d5),_0x4bc7e6=_0x3358b8[_0x2a4b48(0xc0)]||_0x3358b8;if(_0x4bc7e6){const _0x5833f7=compressMessageContent(_0x4bc7e6,_0x155552,_0x338b3e);_0x5833f7[_0x2a4b48(0x130)]&&(_0x3a3dca=!![],_0x5565d5=JSON['stringify'](_0x3358b8));}}catch{}_0x4f22fe['push'](_0x5565d5);}if(_0x3a3dca)_0x44229a=_0x4f22fe[_0x2a4b48(0x146)]('\x0a');}const _0x436a68=Buffer[_0x2a4b48(0xf3)](_0x44229a,'utf8'),_0xe49768=path[_0x2a4b48(0x146)](path[_0x2a4b48(0x132)](_0x357a84),_0x155552+_0x2a4b48(0xe7)+_0x2f841f);fs[_0x2a4b48(0xd8)](_0xe49768,_0x44229a,_0x2a4b48(0x11b));const _0x242ac3=Math['ceil'](_0x4964e9/0x4),_0x3e1f6d=Math[_0x2a4b48(0xbf)](_0x436a68/0x4),_0x3a4a80=Math[_0x2a4b48(0xe2)](0x0,_0x242ac3-_0x3e1f6d),_0x5b6ae8=_0x4964e9>0x0?Math[_0x2a4b48(0x150)]((0x1-_0x436a68/_0x4964e9)*0x3e8)/0xa:0x0;return _0x3a4a80>0x0&&tracker_1[_0x2a4b48(0x14f)]['logExecution'](_0x2a4b48(0xd2)+_0x338b3e,_0x2be92a,_0x44229a,_0x3a4a80,undefined,[_0x2a4b48(0xa8)+_0x338b3e,_0x2a4b48(0xad),_0x338b3e,'compact_copy']),{'ok':!![],'compactPath':_0xe49768,'rawBytes':_0x4964e9,'compressedBytes':_0x436a68,'rawTokens':_0x242ac3,'compressedTokens':_0x3e1f6d,'savedTokens':_0x3a4a80,'reductionPct':_0x5b6ae8};}catch(_0x482218){return{'ok':![],'reason':_0x482218?.[_0x2a4b48(0xc0)]||_0x2a4b48(0x12d)};}}function compactLiveSession(_0x4beeba,_0x2f1166){const _0xceefe=a0_0x2308b9;try{if(!fs[_0xceefe(0x14e)](_0x4beeba))return{'ok':![],'savedTokens':0x0,'reason':_0xceefe(0x151)};const _0x395de7=path[_0xceefe(0xeb)](_0x4beeba)['toLowerCase']();if(_0x395de7!=='.json'&&_0x395de7!==_0xceefe(0x112)&&_0x395de7!=='.json1')return{'ok':![],'savedTokens':0x0,'reason':_0xceefe(0x15d)};const _0x1e917b=fs['readFileSync'](_0x4beeba,'utf8'),_0x5e874a=Buffer[_0xceefe(0xf3)](_0x1e917b,_0xceefe(0x11b)),_0x9cae24=Math[_0xceefe(0xbf)](_0x5e874a/0x4),_0x38dadc=path['basename'](_0x4beeba,_0x395de7);let _0x2cf702=_0x1e917b,_0x2ea3a8=![];if(_0x395de7===_0xceefe(0xaf)){const _0x2e1c76=JSON['parse'](_0x1e917b),_0x54d56f=Array['isArray'](_0x2e1c76[_0xceefe(0x14d)])?_0x2e1c76[_0xceefe(0x14d)]:Array[_0xceefe(0x10e)](_0x2e1c76)?_0x2e1c76:null;if(_0x54d56f){for(const _0x243ef6 of _0x54d56f){const _0x217da1=compressMessageContent(_0x243ef6,_0x38dadc,_0x2f1166);if(_0x217da1['modified'])_0x2ea3a8=!![];}const {compressConversation:_0x523b7b}=require(_0xceefe(0x110)),_0x5a90b3=_0x523b7b(_0x54d56f,0x9c40);_0x5a90b3['savedTokens']>0x0&&(_0x2ea3a8=!![],Array[_0xceefe(0x10e)](_0x2e1c76[_0xceefe(0x14d)])?_0x2e1c76[_0xceefe(0x14d)]=_0x5a90b3[_0xceefe(0x14d)]:_0x2cf702=JSON['stringify'](_0x5a90b3[_0xceefe(0x14d)],null,0x2)),_0x2ea3a8&&!Array[_0xceefe(0x10e)](_0x2e1c76)&&(_0x2cf702=JSON[_0xceefe(0xc2)](_0x2e1c76,null,0x2));}}else{const _0x45bf17=_0x1e917b[_0xceefe(0x15e)]('\x0a'),_0x84cc8=[],_0x23e75c=[];for(const _0x4f8fc0 of _0x45bf17){if(!_0x4f8fc0[_0xceefe(0x121)]())continue;try{const _0xb85ebe=JSON['parse'](_0x4f8fc0);_0x84cc8['push'](_0xb85ebe);const _0x4805b2=_0xb85ebe[_0xceefe(0xc0)]||_0xb85ebe;_0x4805b2&&typeof _0x4805b2[_0xceefe(0x11a)]==='string'&&_0x23e75c[_0xceefe(0x10f)](_0x4805b2);}catch{}}for(const _0x2157e9 of _0x23e75c){const _0x352289=compressMessageContent(_0x2157e9,_0x38dadc,_0x2f1166);if(_0x352289['modified'])_0x2ea3a8=!![];}const {compressConversation:_0x50a4a8}=require(_0xceefe(0x110)),_0x43f9d5=_0x50a4a8(_0x23e75c,0x9c40);if(_0x43f9d5[_0xceefe(0xef)]>0x0||_0x2ea3a8){const _0x4a20ea=[];for(const _0x9dc4e4 of _0x84cc8){const _0x13154b=_0x9dc4e4[_0xceefe(0xc0)]||_0x9dc4e4;if(_0x13154b&&typeof _0x13154b[_0xceefe(0x11a)]===_0xceefe(0xf0)){const _0x5b330b=_0x43f9d5['messages'][_0xceefe(0x12f)](_0x12c2ee=>_0x12c2ee===_0x13154b);_0x5b330b?(_0x9dc4e4[_0xceefe(0xc0)]?_0x9dc4e4[_0xceefe(0xc0)]=_0x5b330b:Object[_0xceefe(0x149)](_0x9dc4e4,_0x5b330b),_0x4a20ea[_0xceefe(0x10f)](JSON[_0xceefe(0xc2)](_0x9dc4e4))):_0x2ea3a8=!![];}else _0x4a20ea[_0xceefe(0x10f)](JSON[_0xceefe(0xc2)](_0x9dc4e4));}_0x2cf702=_0x4a20ea[_0xceefe(0x146)]('\x0a'),_0x2ea3a8=!![];}}if(_0x2ea3a8){const _0x5d5328=Buffer[_0xceefe(0xf3)](_0x2cf702,_0xceefe(0x11b));fs[_0xceefe(0xd8)](_0x4beeba,_0x2cf702,_0xceefe(0x11b));const _0x4cb5fe=Math['ceil'](_0x5d5328/0x4),_0x118288=Math[_0xceefe(0xe2)](0x0,_0x9cae24-_0x4cb5fe);if(_0x118288>0x0){const _0xb74f9c=loadSessionsState(),_0x472dab=_0xb74f9c[_0x4beeba]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x380d60=_0x472dab['autoCompactSaved']||0x0,_0x12f154=_0x380d60+_0x118288;saveSessionStateItem(_0x4beeba,_0x472dab['lineCount'],_0x472dab[_0xceefe(0x140)]||0x0,_0x472dab[_0xceefe(0xcb)]||0x0,_0x12f154,_0x472dab['hookSavedTokens']||0x0),tracker_1[_0xceefe(0x14f)]['logExecution'](_0xceefe(0xd2)+_0x2f1166,_0x1e917b,_0x2cf702,_0x118288,undefined,[_0xceefe(0xa8)+_0x2f1166,_0xceefe(0xad),_0x2f1166,_0xceefe(0xd4)]);}return{'ok':!![],'savedTokens':_0x118288};}return{'ok':!![],'savedTokens':0x0};}catch(_0x122508){return{'ok':![],'savedTokens':0x0,'reason':_0x122508[_0xceefe(0xc0)]||_0xceefe(0xf8)};}}function installWindowsStartupService(){const _0x17a637=a0_0x2308b9;if(process[_0x17a637(0x117)]!==_0x17a637(0xea))return;try{const _0x5396f1=path[_0x17a637(0x146)](os[_0x17a637(0xbb)](),_0x17a637(0x13c),_0x17a637(0xbd),_0x17a637(0xca),_0x17a637(0x139),_0x17a637(0x137),_0x17a637(0x157),_0x17a637(0xf9));if(!fs[_0x17a637(0x14e)](_0x5396f1))fs[_0x17a637(0xb5)](_0x5396f1,{'recursive':!![]});const _0x4f9237=path[_0x17a637(0x146)](_0x5396f1,_0x17a637(0x100)),_0x46b27e=path[_0x17a637(0x146)](__dirname,_0x17a637(0xab)),_0x4dbfdb=_0x46b27e['replace'](/\\/g,'\x5c\x5c'),_0x333d62=_0x17a637(0x12c)+_0x4dbfdb+_0x17a637(0xbe);fs[_0x17a637(0xd8)](_0x4f9237,_0x333d62,_0x17a637(0x11b));}catch{}}function startWatcherDaemon(){const _0x38b593=a0_0x2308b9;installWindowsStartupService();try{const {installClaudeHooks:_0x17e598}=require(_0x38b593(0x106));_0x17e598();}catch(_0x9404d){}const _0x1745b2=[_0x38b593(0x105),_0x38b593(0xf1),_0x38b593(0xe5),_0x38b593(0x115),_0x38b593(0x116),'copilot',_0x38b593(0x102),_0x38b593(0x143),_0x38b593(0xc4)];for(const _0x4c7040 of _0x1745b2){const _0x45ee9e=getAgentStoragePaths(_0x4c7040);for(const _0x386baf of _0x45ee9e){if(fs[_0x38b593(0x14e)](_0x386baf))try{fs[_0x38b593(0xa6)](_0x386baf,{'recursive':!![]},(_0x39852b,_0xeac995)=>{const _0x25c191=_0x38b593;if(!_0xeac995)return;const _0x3c244b=path[_0x25c191(0x146)](_0x386baf,_0xeac995);if(debounceTimers['has'](_0x3c244b))clearTimeout(debounceTimers[_0x25c191(0x127)](_0x3c244b));const _0xc74f27=setTimeout(()=>processSessionFile(_0x3c244b,_0x4c7040),0x1f4);debounceTimers[_0x25c191(0x129)](_0x3c244b,_0xc74f27);});}catch{}}}setInterval(()=>{const _0x426690=_0x38b593;for(const _0x2e69bc of _0x1745b2){try{const _0x1321f6=getLatestSessionFile(_0x2e69bc);_0x1321f6&&_0x1321f6['fullPath']&&processSessionFile(_0x1321f6[_0x426690(0xcd)],_0x2e69bc);}catch{}}},0xbb8);const _0x36d4ed=()=>{const _0x2ba99b=_0x38b593;for(const _0x19e9c1 of _0x1745b2){try{const _0x4fc0d0=getLatestSessionFile(_0x19e9c1);_0x4fc0d0&&_0x4fc0d0[_0x2ba99b(0xcd)]&&compactLiveSession(_0x4fc0d0[_0x2ba99b(0xcd)],_0x19e9c1);}catch{}}};setTimeout(_0x36d4ed,0x7d0),setInterval(_0x36d4ed,0x2bf20);}
|
|
1
|
+
'use strict';const a0_0x5cb1a6=a0_0x41a1;(function(_0x6a577b,_0x5c1b1f){const _0x5d4eb6=a0_0x41a1,_0x460cf2=_0x6a577b();while(!![]){try{const _0x3b2488=parseInt(_0x5d4eb6(0x22b))/0x1*(-parseInt(_0x5d4eb6(0x20c))/0x2)+parseInt(_0x5d4eb6(0x28e))/0x3+-parseInt(_0x5d4eb6(0x244))/0x4+parseInt(_0x5d4eb6(0x279))/0x5+parseInt(_0x5d4eb6(0x217))/0x6*(-parseInt(_0x5d4eb6(0x235))/0x7)+-parseInt(_0x5d4eb6(0x226))/0x8+-parseInt(_0x5d4eb6(0x275))/0x9*(-parseInt(_0x5d4eb6(0x20a))/0xa);if(_0x3b2488===_0x5c1b1f)break;else _0x460cf2['push'](_0x460cf2['shift']());}catch(_0x4c6d94){_0x460cf2['push'](_0x460cf2['shift']());}}}(a0_0x5d39,0xc13a7));var __createBinding=this&&this[a0_0x5cb1a6(0x259)]||(Object[a0_0x5cb1a6(0x227)]?function(_0x3bb2c5,_0x4f269b,_0x3dede5,_0x347735){const _0x2e267c=a0_0x5cb1a6;if(_0x347735===undefined)_0x347735=_0x3dede5;var _0x151e6e=Object[_0x2e267c(0x28d)](_0x4f269b,_0x3dede5);(!_0x151e6e||(_0x2e267c(0x1e2)in _0x151e6e?!_0x4f269b[_0x2e267c(0x262)]:_0x151e6e[_0x2e267c(0x25f)]||_0x151e6e[_0x2e267c(0x285)]))&&(_0x151e6e={'enumerable':!![],'get':function(){return _0x4f269b[_0x3dede5];}}),Object[_0x2e267c(0x1ea)](_0x3bb2c5,_0x347735,_0x151e6e);}:function(_0x3b12ce,_0x404612,_0x44ccd6,_0x5d2870){if(_0x5d2870===undefined)_0x5d2870=_0x44ccd6;_0x3b12ce[_0x5d2870]=_0x404612[_0x44ccd6];}),__setModuleDefault=this&&this[a0_0x5cb1a6(0x23a)]||(Object[a0_0x5cb1a6(0x227)]?function(_0x389e67,_0x5ef11f){const _0x2bf9ed=a0_0x5cb1a6;Object[_0x2bf9ed(0x1ea)](_0x389e67,_0x2bf9ed(0x24b),{'enumerable':!![],'value':_0x5ef11f});}:function(_0x5c45e7,_0x8bf102){_0x5c45e7['default']=_0x8bf102;}),__importStar=this&&this[a0_0x5cb1a6(0x245)]||(function(){var _0x51411c=function(_0x5c6f81){const _0x34c5d2=a0_0x41a1;return _0x51411c=Object[_0x34c5d2(0x218)]||function(_0x4e3d6a){const _0x34a62c=_0x34c5d2;var _0x52d094=[];for(var _0x199808 in _0x4e3d6a)if(Object[_0x34a62c(0x1fd)]['hasOwnProperty'][_0x34a62c(0x1e4)](_0x4e3d6a,_0x199808))_0x52d094[_0x52d094[_0x34a62c(0x240)]]=_0x199808;return _0x52d094;},_0x51411c(_0x5c6f81);};return function(_0x445b8f){const _0x13f26a=a0_0x41a1;if(_0x445b8f&&_0x445b8f['__esModule'])return _0x445b8f;var _0x338e65={};if(_0x445b8f!=null){for(var _0x1fa799=_0x51411c(_0x445b8f),_0x3d7518=0x0;_0x3d7518<_0x1fa799[_0x13f26a(0x240)];_0x3d7518++)if(_0x1fa799[_0x3d7518]!==_0x13f26a(0x24b))__createBinding(_0x338e65,_0x445b8f,_0x1fa799[_0x3d7518]);}return __setModuleDefault(_0x338e65,_0x445b8f),_0x338e65;};}());function a0_0x5d39(){const _0x4b0f67=['.next','parse','saved','writable','compact_copy','find','__esModule','byteLength','.gemini','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','github-copilot-cli','cache','codex','image_','openclaw','installWindowsStartupService','Unsupported\x20extension','cursor','./hooks/claude-hook','darwin','./proxy-conv','.openclaw','sessions_state.json','stringify','join','15894YXVHkv','Startup','message','.dat','3021650EBFCFf','copilot','context','messages','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','AppData','existsSync','workspaceStorage','Summary:\x20Tool\x20result\x20offloaded\x20(','trim','hookSavedTokens','saveConfig','configurable','aider','officialCompactSaved','includes','saveChunk','\x20tokens).','utf8','max','getOwnPropertyDescriptor','4130970vGmunA','mtimeMs','endsWith','conv_','.vscdb','Unsupported\x20format\x20\x27','cortex','tokens','Programs','assign','replace','get','isArray','call','Roaming','compactSessionCopy','.compact','storage','.webp','defineProperty','.json','win32','Application\x20Support','.lock','sessions','compaction\x20failed','gemini','tracker','.git','loadSessionsState','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','TrimPromptDaemon.vbs','compact:','push','projects','isFile','repeat','round','prototype','text','Gemini','.opencode','User','dirname','Cursor','string','getLatestSessionFile','live-conv','.aider.chat.history.md','modified','.jsonl','14870oXhsyE','.config','32MwlWOk','.claude','.jpg','content','logExecution','size','path','compactLiveSession','none','mkdirSync','toLowerCase','12PrNhuN','getOwnPropertyNames','.db','conversation_toggles','TrimPrompt\x20Cache\x20Engine','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','chunk_id','has','history','sideCacheSaved','startsWith','.wal','ceil','Session\x20file\x20not\x20found','statSync','10098808cWHVCS','create','config.json','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','role','39CJhtxx','Compaction\x20failed','readdirSync','split','raw_tokens','platform','venv','env','.cortex','.json1','4414102xikoBb','Summary:\x20Text\x20block\x20offloaded\x20(','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','fullPath','writeFileSync','__setModuleDefault','extname','.agents','watch','filter','savedTokens','length','activeSavedTokens','processSessionFile','claude','5167008wbNhNE','__importStar','compressed_tokens','readFileSync','opencode','custom_storage_paths','.tmp','default','File\x20not\x20found','cwd','object','Microsoft','name','prompt_turn','.jpeg','.codex','homedir','Summary:\x20Content\x20offloaded\x20(','lineCount','antigravity','./cache-manager','__createBinding','cli.js','media__'];a0_0x5d39=function(){return _0x4b0f67;};return a0_0x5d39();}Object[a0_0x5cb1a6(0x1ea)](exports,'__esModule',{'value':!![]}),exports['loadConfig']=loadConfig,exports[a0_0x5cb1a6(0x284)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0x5cb1a6(0x205)]=getLatestSessionFile,exports[a0_0x5cb1a6(0x1f4)]=loadSessionsState,exports['saveSessionStateItem']=saveSessionStateItem,exports[a0_0x5cb1a6(0x242)]=processSessionFile,exports[a0_0x5cb1a6(0x1e6)]=compactSessionCopy,exports[a0_0x5cb1a6(0x213)]=compactLiveSession,exports[a0_0x5cb1a6(0x26b)]=installWindowsStartupService,exports['startWatcherDaemon']=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5cb1a6(0x212))),os=__importStar(require('os')),cache_manager_1=require(a0_0x5cb1a6(0x258)),tracker_1=require('./tracker'),baseDir=path[a0_0x5cb1a6(0x274)](os[a0_0x5cb1a6(0x254)](),'.trimprompt'),configPath=path[a0_0x5cb1a6(0x274)](baseDir,a0_0x5cb1a6(0x228)),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 _0x458bc3=a0_0x5cb1a6;try{if(!fs[_0x458bc3(0x27f)](baseDir))fs[_0x458bc3(0x215)](baseDir,{'recursive':!![]});if(fs['existsSync'](configPath)){const _0x477b82=JSON[_0x458bc3(0x25d)](fs[_0x458bc3(0x247)](configPath,_0x458bc3(0x28b)));return{...DEFAULT_CONFIG,..._0x477b82,'conversation_toggles':{...DEFAULT_CONFIG['conversation_toggles'],..._0x477b82[_0x458bc3(0x21a)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x458bc3(0x249)],..._0x477b82['custom_storage_paths']||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x5936f5){const _0x40c09b=a0_0x5cb1a6,_0x29a4d2=loadConfig(),_0x534e60={..._0x29a4d2,..._0x5936f5,'conversation_toggles':{..._0x29a4d2['conversation_toggles'],..._0x5936f5[_0x40c09b(0x21a)]||{}},'custom_storage_paths':{..._0x29a4d2[_0x40c09b(0x249)],..._0x5936f5[_0x40c09b(0x249)]||{}}};try{if(!fs['existsSync'](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x40c09b(0x239)](configPath,JSON[_0x40c09b(0x273)](_0x534e60,null,0x2),_0x40c09b(0x28b));}catch{}return _0x534e60;}function getAgentStoragePaths(_0xb6baf6){const _0x27e179=a0_0x5cb1a6,_0xdc36aa=loadConfig(),_0x227129=_0xdc36aa['custom_storage_paths'][_0xb6baf6];if(_0x227129&&fs['existsSync'](_0x227129))return[_0x227129];const _0x279f5e=os['homedir'](),_0x4fcb27=process[_0x27e179(0x230)]===_0x27e179(0x1ec),_0x33f7da=process['platform']===_0x27e179(0x26f);switch(_0xb6baf6){case _0x27e179(0x243):return[path['join'](_0x279f5e,_0x27e179(0x20d),_0x27e179(0x1f9)),path[_0x27e179(0x274)](_0x279f5e,'.claude',_0x27e179(0x21f))];case _0x27e179(0x268):return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x253),'sessions'),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x27e),_0x27e179(0x1e5),'Codex')];case'gemini':case _0x27e179(0x257):return[path[_0x27e179(0x274)](_0x279f5e,'.gemini','antigravity'),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x264)),path['join'](_0x279f5e,_0x27e179(0x27e),_0x27e179(0x1e5),_0x27e179(0x1ff)),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x20b),_0x27e179(0x1f1))];case _0x27e179(0x26d):if(_0x4fcb27)return[path[_0x27e179(0x274)](_0x279f5e,'AppData',_0x27e179(0x1e5),_0x27e179(0x203),'User',_0x27e179(0x280))];if(_0x33f7da)return[path['join'](_0x279f5e,'Library',_0x27e179(0x1ed),'Cursor',_0x27e179(0x201),'workspaceStorage')];return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x20b),_0x27e179(0x203),_0x27e179(0x201),'workspaceStorage')];case _0x27e179(0x286):return[process[_0x27e179(0x24d)](),path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x207))];case _0x27e179(0x27a):if(_0x4fcb27)return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x27e),'Local',_0x27e179(0x266))];return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x20b),_0x27e179(0x266))];case _0x27e179(0x26a):return[path['join'](_0x279f5e,_0x27e179(0x271),_0x27e179(0x1e8)),path[_0x27e179(0x274)](process[_0x27e179(0x24d)](),_0x27e179(0x271),_0x27e179(0x27b))];case _0x27e179(0x248):return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x200),_0x27e179(0x1ef))];case _0x27e179(0x294):return[path[_0x27e179(0x274)](_0x279f5e,_0x27e179(0x233),_0x27e179(0x267))];default:return[];}}function a0_0x41a1(_0x57c59b,_0x518cb4){_0x57c59b=_0x57c59b-0x1df;const _0x5d39ba=a0_0x5d39();let _0x41a165=_0x5d39ba[_0x57c59b];return _0x41a165;}function getLatestSessionFile(_0x2cec90){const _0x3af28c=a0_0x5cb1a6,_0x2a2b79=getAgentStoragePaths(_0x2cec90);let _0x226196=null,_0x5606f1=0x0,_0x517563=null,_0x3961ca=null;for(const _0x3bbbc6 of _0x2a2b79){if(fs[_0x3af28c(0x27f)](_0x3bbbc6)){if(!_0x3961ca)_0x3961ca=_0x3bbbc6;const _0x421d7c=(_0x43fadf,_0x28db69=0x0)=>{const _0x48c229=_0x3af28c;if(_0x28db69>0x6)return;try{const _0x329df5=fs[_0x48c229(0x22d)](_0x43fadf,{'withFileTypes':!![]});for(const _0x398c41 of _0x329df5){const _0x591e8e=path[_0x48c229(0x274)](_0x43fadf,_0x398c41[_0x48c229(0x250)]);if(_0x398c41['isDirectory']()){const _0x1b15af=_0x398c41['name'][_0x48c229(0x216)]();if(_0x1b15af==='node_modules'||_0x1b15af===_0x48c229(0x1f3)||_0x1b15af==='.venv'||_0x1b15af===_0x48c229(0x232)||_0x1b15af===_0x48c229(0x231)||_0x1b15af==='__pycache__'||_0x1b15af===_0x48c229(0x25c)||_0x1b15af==='dist'||_0x1b15af==='build'||_0x1b15af==='out'||_0x1b15af===_0x48c229(0x23c))continue;_0x421d7c(_0x591e8e,_0x28db69+0x1);}else{if(_0x398c41[_0x48c229(0x1fa)]()&&!_0x398c41[_0x48c229(0x250)][_0x48c229(0x221)]('.')){const _0x3fe528=_0x398c41[_0x48c229(0x250)]['toLowerCase']();if(_0x3fe528[_0x48c229(0x288)](_0x48c229(0x1e7))||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x219))||_0x3fe528['endsWith'](_0x48c229(0x292))||_0x3fe528[_0x48c229(0x290)]('.png')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x20e))||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x252))||_0x3fe528['endsWith']('.gif')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x1e9))||_0x3fe528[_0x48c229(0x290)]('.pb')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x222))||_0x3fe528[_0x48c229(0x290)]('.shm')||_0x3fe528[_0x48c229(0x290)]('.tmp')||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x1ee))||_0x3fe528[_0x48c229(0x290)](_0x48c229(0x278))||_0x3fe528[_0x48c229(0x221)](_0x48c229(0x25b))||_0x3fe528[_0x48c229(0x221)](_0x48c229(0x269)))continue;const _0x508ef1=fs['statSync'](_0x591e8e);_0x508ef1[_0x48c229(0x28f)]>_0x5606f1&&(_0x5606f1=_0x508ef1[_0x48c229(0x28f)],_0x226196=_0x398c41['name'],_0x517563=_0x591e8e,_0x3961ca=_0x3bbbc6);}}}}catch{}};_0x421d7c(_0x3bbbc6);}}return{'fileName':_0x226196,'lastModified':_0x5606f1>0x0?new Date(_0x5606f1)['toISOString']():null,'fullPath':_0x517563,'dirPath':_0x3961ca};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x5a4999,_0x26704d,_0x48ae1d){const _0x5898c3=a0_0x5cb1a6;let _0x3dca6a=![],_0x52f238=0x0;if(!_0x5a4999)return{'modified':_0x3dca6a,'savedTokens':_0x52f238};const _0x4fcd80=_0x44c10b=>_0x44c10b[_0x5898c3(0x1e1)](/\r\n/g,'\x0a')[_0x5898c3(0x1e1)](/\n{3,}/g,'\x0a\x0a');if(typeof _0x5a4999[_0x5898c3(0x20f)]==='string'){let _0x358b2d=_0x5a4999[_0x5898c3(0x20f)],_0x5edcd5=_0x4fcd80(_0x358b2d);_0x5edcd5['length']<_0x358b2d[_0x5898c3(0x240)]&&(_0x5a4999[_0x5898c3(0x20f)]=_0x5edcd5,_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x223)]((_0x358b2d[_0x5898c3(0x240)]-_0x5edcd5[_0x5898c3(0x240)])/0x4));if(_0x5a4999[_0x5898c3(0x20f)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x5a4999[_0x5898c3(0x20f)][_0x5898c3(0x288)]('TrimPrompt\x20Cache\x20Engine')){const _0x567d6c=_0x5898c3(0x255)+Math[_0x5898c3(0x223)](_0x5a4999['content'][_0x5898c3(0x240)]/0x4)+_0x5898c3(0x28a),_0x23a910=(0x0,cache_manager_1[_0x5898c3(0x289)])(_0x26704d,_0x48ae1d,_0x5a4999[_0x5898c3(0x20f)],_0x567d6c);_0x5a4999[_0x5898c3(0x20f)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20('+_0x23a910[_0x5898c3(0x22f)]+'\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x23a910[_0x5898c3(0x21d)]+_0x5898c3(0x21c)+_0x23a910[_0x5898c3(0x21d)]+'`\x0a',_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x28c)](0x0,_0x23a910['raw_tokens']-_0x23a910[_0x5898c3(0x246)]);}}else{if(Array[_0x5898c3(0x1e3)](_0x5a4999[_0x5898c3(0x20f)]))for(const _0x5b774a of _0x5a4999[_0x5898c3(0x20f)]){if(_0x5b774a&&typeof _0x5b774a===_0x5898c3(0x24e)){if(typeof _0x5b774a['text']===_0x5898c3(0x204)){let _0x23eb61=_0x5b774a['text'],_0x2930c3=_0x4fcd80(_0x23eb61);_0x2930c3[_0x5898c3(0x240)]<_0x23eb61['length']&&(_0x5b774a[_0x5898c3(0x1fe)]=_0x2930c3,_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x223)]((_0x23eb61[_0x5898c3(0x240)]-_0x2930c3[_0x5898c3(0x240)])/0x4));if(_0x5b774a[_0x5898c3(0x1fe)]['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x5b774a[_0x5898c3(0x1fe)][_0x5898c3(0x288)](_0x5898c3(0x21b))){const _0x534614=_0x5898c3(0x236)+Math[_0x5898c3(0x223)](_0x5b774a[_0x5898c3(0x1fe)][_0x5898c3(0x240)]/0x4)+_0x5898c3(0x28a),_0x20eef4=(0x0,cache_manager_1[_0x5898c3(0x289)])(_0x26704d,_0x48ae1d,_0x5b774a[_0x5898c3(0x1fe)],_0x534614);_0x5b774a[_0x5898c3(0x1fe)]=_0x5898c3(0x229)+_0x20eef4[_0x5898c3(0x21d)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x20eef4['chunk_id']+'`\x0a',_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x28c)](0x0,_0x20eef4[_0x5898c3(0x22f)]-_0x20eef4[_0x5898c3(0x246)]);}}else{if(typeof _0x5b774a[_0x5898c3(0x20f)]===_0x5898c3(0x204)){let _0x357ab7=_0x5b774a[_0x5898c3(0x20f)],_0x178073=_0x4fcd80(_0x357ab7);_0x178073[_0x5898c3(0x240)]<_0x357ab7[_0x5898c3(0x240)]&&(_0x5b774a['content']=_0x178073,_0x3dca6a=!![],_0x52f238+=Math[_0x5898c3(0x223)]((_0x357ab7[_0x5898c3(0x240)]-_0x178073[_0x5898c3(0x240)])/0x4));if(_0x5b774a[_0x5898c3(0x20f)][_0x5898c3(0x240)]>OFFLOAD_THRESHOLD_CHARS&&!_0x5b774a[_0x5898c3(0x20f)]['includes']('TrimPrompt\x20Cache\x20Engine')){const _0x529a78=_0x5898c3(0x281)+Math[_0x5898c3(0x223)](_0x5b774a[_0x5898c3(0x20f)][_0x5898c3(0x240)]/0x4)+_0x5898c3(0x28a),_0x343f33=(0x0,cache_manager_1[_0x5898c3(0x289)])(_0x26704d,_0x48ae1d,_0x5b774a[_0x5898c3(0x20f)],_0x529a78);_0x5b774a[_0x5898c3(0x20f)]=_0x5898c3(0x229)+_0x343f33['chunk_id']+_0x5898c3(0x237)+_0x343f33[_0x5898c3(0x21d)]+'`\x0a',_0x3dca6a=!![],_0x52f238+=Math['max'](0x0,_0x343f33[_0x5898c3(0x22f)]-_0x343f33['compressed_tokens']);}}}}}}return{'modified':_0x3dca6a,'savedTokens':_0x52f238};}const sessionsStatePath=path[a0_0x5cb1a6(0x274)](baseDir,a0_0x5cb1a6(0x272));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x39bbc4=a0_0x5cb1a6;try{if(fs[_0x39bbc4(0x27f)](sessionsStatePath)){const _0x130dc6=JSON[_0x39bbc4(0x25d)](fs[_0x39bbc4(0x247)](sessionsStatePath,_0x39bbc4(0x28b)));if(_0x130dc6&&typeof _0x130dc6===_0x39bbc4(0x24e))return sessionsStateMemoryCache=_0x130dc6,_0x130dc6;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x469391,_0xe0334a,_0x442343,_0x45054e=0x0,_0x38a9af=0x0,_0x519220=0x0){const _0x505a45=a0_0x5cb1a6;try{const _0x203d10=loadSessionsState(),_0x12e62e=_0x203d10[_0x469391]||{},_0x556666=_0x38a9af||_0x12e62e['autoCompactSaved']||0x0,_0x59e052=_0x519220||_0x12e62e['hookSavedTokens']||0x0,_0x3e44c4=_0x442343!==undefined?_0x442343:_0x12e62e[_0x505a45(0x287)]||0x0;_0x203d10[_0x469391]={'lineCount':_0xe0334a||_0x12e62e[_0x505a45(0x256)]||0x1,'activeSavedTokens':_0x3e44c4+_0x556666+_0x59e052,'sideCacheSaved':_0x45054e||_0x12e62e[_0x505a45(0x220)]||0x0,'officialCompactSaved':_0x3e44c4,'autoCompactSaved':_0x556666,'hookSavedTokens':_0x59e052},sessionsStateMemoryCache=_0x203d10;if(!fs['existsSync'](baseDir))fs[_0x505a45(0x215)](baseDir,{'recursive':!![]});const _0x33f8ad=sessionsStatePath+_0x505a45(0x24a);fs[_0x505a45(0x239)](_0x33f8ad,JSON['stringify'](_0x203d10,null,0x2),_0x505a45(0x28b)),fs['renameSync'](_0x33f8ad,sessionsStatePath);}catch{}}function processSessionFile(_0x58d5c6,_0xf1d636){const _0x3c8dc1=a0_0x5cb1a6;try{if(!fs[_0x3c8dc1(0x27f)](_0x58d5c6))return;const _0x4bfe8b=fs[_0x3c8dc1(0x225)](_0x58d5c6);if(_0x4bfe8b['isDirectory']()||_0x4bfe8b[_0x3c8dc1(0x211)]===0x0)return;const _0x619815=loadConfig(),_0xfdd79c=_0x3c8dc1(0x291)+_0xf1d636;if(_0x619815[_0x3c8dc1(0x21a)][_0xfdd79c]===![])return;const _0x1ee501=fs[_0x3c8dc1(0x247)](_0x58d5c6,_0x3c8dc1(0x28b)),_0x4fa59f=path[_0x3c8dc1(0x23b)](_0x58d5c6)[_0x3c8dc1(0x216)]();let _0x58828a=0x1;if(_0x4fa59f===_0x3c8dc1(0x209)||_0x4fa59f===_0x3c8dc1(0x234))_0x58828a=_0x1ee501['split']('\x0a')[_0x3c8dc1(0x23e)](Boolean)[_0x3c8dc1(0x240)];else{if(_0x4fa59f===_0x3c8dc1(0x1eb))try{const _0x4921c1=JSON[_0x3c8dc1(0x25d)](_0x1ee501),_0x11822b=Array[_0x3c8dc1(0x1e3)](_0x4921c1[_0x3c8dc1(0x27c)])?_0x4921c1[_0x3c8dc1(0x27c)]:Array[_0x3c8dc1(0x1e3)](_0x4921c1)?_0x4921c1:null;if(_0x11822b)_0x58828a=_0x11822b[_0x3c8dc1(0x240)];}catch{}}let _0x47c301=0x0;if((_0x4fa59f==='.jsonl'||_0x4fa59f==='.json1')&&_0x1ee501[_0x3c8dc1(0x288)]('saved')&&_0x1ee501['includes']('tokens')){const _0x1b6c18=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x122534 of _0x1ee501['split']('\x0a')){if(!_0x122534[_0x3c8dc1(0x288)](_0x3c8dc1(0x25e))||!_0x122534['includes'](_0x3c8dc1(0x295)))continue;try{const _0x54a6fc=JSON['parse'](_0x122534);if(_0x54a6fc['type']!=='system')continue;const _0x24d774=typeof _0x54a6fc['content']==='string'?_0x54a6fc[_0x3c8dc1(0x20f)]:_0x54a6fc[_0x3c8dc1(0x277)]&&typeof _0x54a6fc[_0x3c8dc1(0x277)]['content']===_0x3c8dc1(0x204)?_0x54a6fc['message'][_0x3c8dc1(0x20f)]:'';if(!_0x24d774)continue;for(const _0x108bc8 of _0x24d774['matchAll'](_0x1b6c18)){let _0x3a0e24=parseFloat(_0x108bc8[0x1]);if(_0x108bc8[0x0][_0x3c8dc1(0x216)]()[_0x3c8dc1(0x288)]('k'))_0x3a0e24=_0x3a0e24*0x3e8;_0x47c301+=Math[_0x3c8dc1(0x1fc)](_0x3a0e24);}}catch{}}}const _0x2164b8=loadSessionsState(),_0x57c274=_0x2164b8[_0x58d5c6],_0x3f7899=_0x57c274?_0x57c274[_0x3c8dc1(0x256)]:0x0,_0x4a346e=_0x57c274?_0x57c274[_0x3c8dc1(0x241)]||0x0:0x0;if(_0x3f7899>0x0&&_0x58828a>_0x3f7899&&_0x4a346e>0x0){const _0x5222ea='conv:'+_0xf1d636;tracker_1['tracker'][_0x3c8dc1(0x210)](_0x5222ea,'A'[_0x3c8dc1(0x1fb)](_0x4a346e*0x4),'',0x0,undefined,[_0x3c8dc1(0x291)+_0xf1d636,_0x3c8dc1(0x206),_0xf1d636,_0x3c8dc1(0x251)]);}const _0x39c6d6=_0x57c274&&_0x57c274[_0x3c8dc1(0x287)]!==undefined?_0x57c274[_0x3c8dc1(0x287)]:0x0,_0x53bc9c=Math['max'](_0x39c6d6,_0x47c301);saveSessionStateItem(_0x58d5c6,_0x58828a,_0x53bc9c,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x482aee,_0x5ab893){const _0xc282e7=a0_0x5cb1a6;try{if(!fs[_0xc282e7(0x27f)](_0x482aee))return{'ok':![],'reason':_0xc282e7(0x224)};const _0x1adb9f=path['extname'](_0x482aee)[_0xc282e7(0x216)]();if(_0x1adb9f!=='.json'&&_0x1adb9f!==_0xc282e7(0x209)&&_0x1adb9f!=='.json1')return{'ok':![],'reason':_0xc282e7(0x293)+(_0x1adb9f||_0xc282e7(0x214))+_0xc282e7(0x1f5)};const _0x343a0c=fs[_0xc282e7(0x247)](_0x482aee,_0xc282e7(0x28b)),_0x180236=Buffer[_0xc282e7(0x263)](_0x343a0c,_0xc282e7(0x28b)),_0x2d0187=path['basename'](_0x482aee,_0x1adb9f);let _0xcf57b8=_0x343a0c,_0x3af91e=![];if(_0x1adb9f===_0xc282e7(0x1eb)){const _0x4d319a=JSON[_0xc282e7(0x25d)](_0x343a0c),_0x31f533=Array[_0xc282e7(0x1e3)](_0x4d319a[_0xc282e7(0x27c)])?_0x4d319a[_0xc282e7(0x27c)]:Array[_0xc282e7(0x1e3)](_0x4d319a)?_0x4d319a:null;if(_0x31f533){for(const _0x2040bf of _0x31f533){const _0x1aa3a0=compressMessageContent(_0x2040bf,_0x2d0187,_0x5ab893);if(_0x1aa3a0[_0xc282e7(0x208)])_0x3af91e=!![];}if(_0x3af91e)_0xcf57b8=JSON[_0xc282e7(0x273)](_0x4d319a,null,0x2);}}else{const _0x127fad=_0x343a0c[_0xc282e7(0x22e)]('\x0a'),_0x1d5f1c=[];for(let _0x402aac of _0x127fad){if(!_0x402aac['trim']()){_0x1d5f1c[_0xc282e7(0x1f8)](_0x402aac);continue;}try{const _0x4101e2=JSON[_0xc282e7(0x25d)](_0x402aac),_0x120083=_0x4101e2[_0xc282e7(0x277)]||_0x4101e2;if(_0x120083){const _0x43de11=compressMessageContent(_0x120083,_0x2d0187,_0x5ab893);_0x43de11['modified']&&(_0x3af91e=!![],_0x402aac=JSON[_0xc282e7(0x273)](_0x4101e2));}}catch{}_0x1d5f1c[_0xc282e7(0x1f8)](_0x402aac);}if(_0x3af91e)_0xcf57b8=_0x1d5f1c[_0xc282e7(0x274)]('\x0a');}const _0x330a64=Buffer[_0xc282e7(0x263)](_0xcf57b8,'utf8'),_0x335ef5=path[_0xc282e7(0x274)](path[_0xc282e7(0x202)](_0x482aee),_0x2d0187+_0xc282e7(0x1e7)+_0x1adb9f);fs[_0xc282e7(0x239)](_0x335ef5,_0xcf57b8,'utf8');const _0x2bbfe3=Math[_0xc282e7(0x223)](_0x180236/0x4),_0x554d77=Math[_0xc282e7(0x223)](_0x330a64/0x4),_0x5d1b0a=Math[_0xc282e7(0x28c)](0x0,_0x2bbfe3-_0x554d77),_0x328173=_0x180236>0x0?Math[_0xc282e7(0x1fc)]((0x1-_0x330a64/_0x180236)*0x3e8)/0xa:0x0;return _0x5d1b0a>0x0&&tracker_1[_0xc282e7(0x1f2)]['logExecution'](_0xc282e7(0x1f7)+_0x5ab893,_0x343a0c,_0xcf57b8,_0x5d1b0a,undefined,[_0xc282e7(0x291)+_0x5ab893,_0xc282e7(0x206),_0x5ab893,_0xc282e7(0x260)]),{'ok':!![],'compactPath':_0x335ef5,'rawBytes':_0x180236,'compressedBytes':_0x330a64,'rawTokens':_0x2bbfe3,'compressedTokens':_0x554d77,'savedTokens':_0x5d1b0a,'reductionPct':_0x328173};}catch(_0x13a01c){return{'ok':![],'reason':_0x13a01c?.['message']||_0xc282e7(0x1f0)};}}function compactLiveSession(_0x2ea6f1,_0x2a61a1){const _0x2348a0=a0_0x5cb1a6;try{if(!fs[_0x2348a0(0x27f)](_0x2ea6f1))return{'ok':![],'savedTokens':0x0,'reason':_0x2348a0(0x24c)};const _0x5429f5=path[_0x2348a0(0x23b)](_0x2ea6f1)[_0x2348a0(0x216)]();if(_0x5429f5!==_0x2348a0(0x1eb)&&_0x5429f5!=='.jsonl'&&_0x5429f5!==_0x2348a0(0x234))return{'ok':![],'savedTokens':0x0,'reason':_0x2348a0(0x26c)};const _0x52d05e=fs['readFileSync'](_0x2ea6f1,_0x2348a0(0x28b)),_0x5006f6=Buffer['byteLength'](_0x52d05e,'utf8'),_0x98fc6=Math['ceil'](_0x5006f6/0x4),_0x508f59=path['basename'](_0x2ea6f1,_0x5429f5);let _0x4ace1b=_0x52d05e,_0x19e5bc=![];if(_0x5429f5==='.json'){const _0x3e0f37=JSON[_0x2348a0(0x25d)](_0x52d05e),_0x1f8279=Array[_0x2348a0(0x1e3)](_0x3e0f37[_0x2348a0(0x27c)])?_0x3e0f37[_0x2348a0(0x27c)]:Array[_0x2348a0(0x1e3)](_0x3e0f37)?_0x3e0f37:null;if(_0x1f8279){for(const _0x58e1fb of _0x1f8279){const _0x4faf08=compressMessageContent(_0x58e1fb,_0x508f59,_0x2a61a1);if(_0x4faf08['modified'])_0x19e5bc=!![];}const {compressConversation:_0x69e992}=require('./proxy-conv'),_0x273425=_0x69e992(_0x1f8279,0x9c40);_0x273425[_0x2348a0(0x23f)]>0x0&&(_0x19e5bc=!![],Array['isArray'](_0x3e0f37['messages'])?_0x3e0f37[_0x2348a0(0x27c)]=_0x273425[_0x2348a0(0x27c)]:_0x4ace1b=JSON[_0x2348a0(0x273)](_0x273425[_0x2348a0(0x27c)],null,0x2)),_0x19e5bc&&!Array[_0x2348a0(0x1e3)](_0x3e0f37)&&(_0x4ace1b=JSON['stringify'](_0x3e0f37,null,0x2));}}else{const _0x2b9acf=_0x52d05e[_0x2348a0(0x22e)]('\x0a'),_0x5d1b8e=[],_0x31bc13=[];for(const _0x43b495 of _0x2b9acf){if(!_0x43b495[_0x2348a0(0x282)]())continue;try{const _0x55ab74=JSON['parse'](_0x43b495);_0x5d1b8e[_0x2348a0(0x1f8)](_0x55ab74);const _0x5e39ba=_0x55ab74[_0x2348a0(0x277)]||_0x55ab74;_0x5e39ba&&typeof _0x5e39ba[_0x2348a0(0x22a)]==='string'&&_0x31bc13[_0x2348a0(0x1f8)](_0x5e39ba);}catch{}}for(const _0x352c71 of _0x31bc13){const _0x1e850a=compressMessageContent(_0x352c71,_0x508f59,_0x2a61a1);if(_0x1e850a['modified'])_0x19e5bc=!![];}const {compressConversation:_0x3ea5a8}=require(_0x2348a0(0x270)),_0x41f489=_0x3ea5a8(_0x31bc13,0x9c40);if(_0x41f489[_0x2348a0(0x23f)]>0x0||_0x19e5bc){const _0x566acc=[];for(const _0x407ad4 of _0x5d1b8e){const _0x2dbae2=_0x407ad4[_0x2348a0(0x277)]||_0x407ad4;if(_0x2dbae2&&typeof _0x2dbae2['role']===_0x2348a0(0x204)){const _0x275d35=_0x41f489['messages'][_0x2348a0(0x261)](_0x2fa81d=>_0x2fa81d===_0x2dbae2);_0x275d35?(_0x407ad4[_0x2348a0(0x277)]?_0x407ad4[_0x2348a0(0x277)]=_0x275d35:Object[_0x2348a0(0x1e0)](_0x407ad4,_0x275d35),_0x566acc['push'](JSON['stringify'](_0x407ad4))):_0x19e5bc=!![];}else _0x566acc[_0x2348a0(0x1f8)](JSON[_0x2348a0(0x273)](_0x407ad4));}_0x4ace1b=_0x566acc[_0x2348a0(0x274)]('\x0a'),_0x19e5bc=!![];}}if(_0x19e5bc){const _0x336623=Buffer['byteLength'](_0x4ace1b,'utf8');fs[_0x2348a0(0x239)](_0x2ea6f1,_0x4ace1b,'utf8');const _0x39e9a6=Math[_0x2348a0(0x223)](_0x336623/0x4),_0xf4b637=Math[_0x2348a0(0x28c)](0x0,_0x98fc6-_0x39e9a6);if(_0xf4b637>0x0){const _0x1b64dc=loadSessionsState(),_0x389c7f=_0x1b64dc[_0x2ea6f1]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x4f6478=_0x389c7f['autoCompactSaved']||0x0,_0xdb2593=_0x4f6478+_0xf4b637;saveSessionStateItem(_0x2ea6f1,_0x389c7f[_0x2348a0(0x256)],_0x389c7f[_0x2348a0(0x287)]||0x0,_0x389c7f[_0x2348a0(0x220)]||0x0,_0xdb2593,_0x389c7f[_0x2348a0(0x283)]||0x0),tracker_1['tracker'][_0x2348a0(0x210)](_0x2348a0(0x1f7)+_0x2a61a1,_0x52d05e,_0x4ace1b,_0xf4b637,undefined,[_0x2348a0(0x291)+_0x2a61a1,_0x2348a0(0x206),_0x2a61a1,_0x2348a0(0x260)]);}return{'ok':!![],'savedTokens':_0xf4b637};}return{'ok':!![],'savedTokens':0x0};}catch(_0x5ab4da){return{'ok':![],'savedTokens':0x0,'reason':_0x5ab4da[_0x2348a0(0x277)]||_0x2348a0(0x22c)};}}function installWindowsStartupService(){const _0x35afe2=a0_0x5cb1a6;if(process[_0x35afe2(0x230)]!==_0x35afe2(0x1ec))return;try{const _0x53d78b=path['join'](os[_0x35afe2(0x254)](),'AppData','Roaming',_0x35afe2(0x24f),'Windows','Start\x20Menu',_0x35afe2(0x1df),_0x35afe2(0x276));if(!fs[_0x35afe2(0x27f)](_0x53d78b))fs['mkdirSync'](_0x53d78b,{'recursive':!![]});const _0x51cbdf=path['join'](_0x53d78b,_0x35afe2(0x1f6)),_0x47dfa7=path[_0x35afe2(0x274)](__dirname,_0x35afe2(0x25a)),_0x5c5118=_0x47dfa7[_0x35afe2(0x1e1)](/\\/g,'\x5c\x5c'),_0x51936d=_0x35afe2(0x27d)+_0x5c5118+_0x35afe2(0x265);fs['writeFileSync'](_0x51cbdf,_0x51936d,'utf8');}catch{}}function startWatcherDaemon(){const _0x34ed21=a0_0x5cb1a6;installWindowsStartupService();try{const {installClaudeHooks:_0x57cba0}=require(_0x34ed21(0x26e));_0x57cba0();}catch(_0x39bc1d){}const _0x47225c=[_0x34ed21(0x243),_0x34ed21(0x1f1),_0x34ed21(0x268),_0x34ed21(0x26d),_0x34ed21(0x286),_0x34ed21(0x27a),_0x34ed21(0x26a),_0x34ed21(0x248),_0x34ed21(0x294)];for(const _0x5d0659 of _0x47225c){const _0x52564c=getAgentStoragePaths(_0x5d0659);for(const _0x5fc168 of _0x52564c){if(fs[_0x34ed21(0x27f)](_0x5fc168))try{fs[_0x34ed21(0x23d)](_0x5fc168,{'recursive':!![]},(_0xb0a2a3,_0x5776ed)=>{const _0x2fe59e=_0x34ed21;if(!_0x5776ed)return;const _0x506c65=path[_0x2fe59e(0x274)](_0x5fc168,_0x5776ed);if(debounceTimers[_0x2fe59e(0x21e)](_0x506c65))clearTimeout(debounceTimers[_0x2fe59e(0x1e2)](_0x506c65));const _0x5967f8=setTimeout(()=>processSessionFile(_0x506c65,_0x5d0659),0x1f4);debounceTimers['set'](_0x506c65,_0x5967f8);});}catch{}}}setInterval(()=>{const _0x4f65e5=_0x34ed21;for(const _0x31c2c7 of _0x47225c){try{const _0x7a45c9=getLatestSessionFile(_0x31c2c7);_0x7a45c9&&_0x7a45c9[_0x4f65e5(0x238)]&&processSessionFile(_0x7a45c9[_0x4f65e5(0x238)],_0x31c2c7);}catch{}}},0xbb8);const _0xc2bed8=()=>{const _0x49da4e=_0x34ed21;for(const _0x2412c8 of _0x47225c){try{const _0x4dd7e6=getLatestSessionFile(_0x2412c8);_0x4dd7e6&&_0x4dd7e6[_0x49da4e(0x238)]&&compactLiveSession(_0x4dd7e6[_0x49da4e(0x238)],_0x2412c8);}catch{}}};setTimeout(_0xc2bed8,0x7d0),setInterval(_0xc2bed8,0x2bf20);}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2d9015=a0_0x56eb;(function(_0xfee13,_0x4aebe0){const _0x13ed71=a0_0x56eb,_0x31b0d1=_0xfee13();while(!![]){try{const _0x4f7c88=-parseInt(_0x13ed71(0xe5))/0x1+parseInt(_0x13ed71(0xed))/0x2+-parseInt(_0x13ed71(0xce))/0x3*(parseInt(_0x13ed71(0xe1))/0x4)+-parseInt(_0x13ed71(0xd5))/0x5*(-parseInt(_0x13ed71(0xf5))/0x6)+-parseInt(_0x13ed71(0xca))/0x7*(-parseInt(_0x13ed71(0xf1))/0x8)+parseInt(_0x13ed71(0xfc))/0x9*(-parseInt(_0x13ed71(0xf2))/0xa)+-parseInt(_0x13ed71(0xe0))/0xb;if(_0x4f7c88===_0x4aebe0)break;else _0x31b0d1['push'](_0x31b0d1['shift']());}catch(_0x4091e0){_0x31b0d1['push'](_0x31b0d1['shift']());}}}(a0_0x547e,0x2bfa3));Object[a0_0x2d9015(0xcc)](exports,a0_0x2d9015(0xd4),{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports[a0_0x2d9015(0xde)]=filterDockerImages,exports[a0_0x2d9015(0xea)]=filterDockerLogs,exports[a0_0x2d9015(0xe2)]=filterKubectl,exports[a0_0x2d9015(0xfb)]=filterRuff;function filterDockerPs(_0x3a51bf){const _0x110f3c=a0_0x2d9015,_0x222463=_0x3a51bf[_0x110f3c(0xec)]('\x0a')[_0x110f3c(0xdd)](_0x3a3353=>_0x3a3353['trim']()[_0x110f3c(0xd1)]>0x0);if(_0x222463[_0x110f3c(0xd1)]===0x0)return'No\x20containers\x20running';if(_0x222463[_0x110f3c(0xd1)]<=0xa)return _0x3a51bf['trim']();const _0x50d02a=_0x222463[0x0],_0x299771=_0x222463[_0x110f3c(0xf6)](0x1),_0x4c439a=[];_0x4c439a[_0x110f3c(0xd9)](_0x110f3c(0xe3)+_0x299771[_0x110f3c(0xd1)]+_0x110f3c(0xdb)),_0x4c439a[_0x110f3c(0xd9)]('');for(const _0x4bceae of _0x299771){const _0xfaaca6=_0x4bceae[_0x110f3c(0xec)](/\s{2,}/);if(_0xfaaca6[_0x110f3c(0xd1)]>=0x5){const _0x403d30=_0xfaaca6[0x0]['substring'](0x0,0xc),_0x15f4ef=_0xfaaca6[0x1],_0x4d3208=_0xfaaca6[_0xfaaca6[_0x110f3c(0xd1)]-0x2]||'',_0x2a8676=_0xfaaca6[_0xfaaca6['length']-0x1]||'';_0x4c439a['push']('\x20\x20'+_0x403d30+'\x20\x20'+_0x15f4ef+'\x20\x20'+_0x4d3208+'\x20\x20'+_0x2a8676);}else _0x4c439a[_0x110f3c(0xd9)]('\x20\x20'+_0x4bceae[_0x110f3c(0xeb)]());}return _0x4c439a[_0x110f3c(0xf9)]('\x0a');}function a0_0x56eb(_0x2de6a2,_0x286edd){_0x2de6a2=_0x2de6a2-0xca;const _0x547ebc=a0_0x547e();let _0x56ebad=_0x547ebc[_0x2de6a2];return _0x56ebad;}function filterDockerImages(_0x30215d){const _0x5b6b2b=a0_0x2d9015,_0x112d81=_0x30215d['split']('\x0a')[_0x5b6b2b(0xdd)](_0x56a2ca=>_0x56a2ca[_0x5b6b2b(0xeb)]()[_0x5b6b2b(0xd1)]>0x0);if(_0x112d81[_0x5b6b2b(0xd1)]<=0x1)return _0x5b6b2b(0xe6);if(_0x112d81[_0x5b6b2b(0xd1)]<=0xf)return _0x30215d[_0x5b6b2b(0xeb)]();const _0xb72c98=_0x112d81[_0x5b6b2b(0xf6)](0x1),_0x548139=[_0x5b6b2b(0xd0)+_0xb72c98[_0x5b6b2b(0xd1)]+_0x5b6b2b(0xdb)];_0x548139[_0x5b6b2b(0xd9)]('');const _0x156866=_0xb72c98[_0x5b6b2b(0xf6)](0x0,0x14);for(const _0x9cae54 of _0x156866){const _0x5ef4d3=_0x9cae54[_0x5b6b2b(0xec)](/\s{2,}/);if(_0x5ef4d3[_0x5b6b2b(0xd1)]>=0x3){const _0x56a4d1=_0x5ef4d3[0x0],_0x441591=_0x5ef4d3[0x1],_0x236379=_0x5ef4d3[_0x5ef4d3[_0x5b6b2b(0xd1)]-0x1]||'';_0x548139[_0x5b6b2b(0xd9)]('\x20\x20'+_0x56a4d1+':'+_0x441591+'\x20\x20'+_0x236379);}else _0x548139[_0x5b6b2b(0xd9)]('\x20\x20'+_0x9cae54[_0x5b6b2b(0xeb)]());}return _0xb72c98['length']>0x14&&_0x548139[_0x5b6b2b(0xd9)](_0x5b6b2b(0xf7)+(_0xb72c98[_0x5b6b2b(0xd1)]-0x14)+_0x5b6b2b(0xcf)),_0x548139[_0x5b6b2b(0xf9)]('\x0a');}function filterDockerLogs(_0x51ca1b){const _0x25e93d=a0_0x2d9015,_0x1c436c=_0x51ca1b[_0x25e93d(0xec)]('\x0a');if(_0x1c436c['length']<=0x32)return _0x51ca1b;const _0x3a51fc=[];return _0x3a51fc['push'](..._0x1c436c[_0x25e93d(0xf6)](0x0,0x14)),_0x3a51fc['push'](_0x25e93d(0xd2)+(_0x1c436c[_0x25e93d(0xd1)]-0x28)+_0x25e93d(0xf8)),_0x3a51fc['push'](..._0x1c436c[_0x25e93d(0xf6)](-0x14)),_0x3a51fc[_0x25e93d(0xd9)]('\x0a('+_0x1c436c[_0x25e93d(0xd1)]+_0x25e93d(0xe9)),_0x3a51fc[_0x25e93d(0xf9)]('\x0a');}function a0_0x547e(){const _0x50b065=['\x20more\x20images','Docker\x20images:\x20','length','\x0a...\x20[','All\x20checks\x20passed','__esModule','578070gucvhT','Found\x200\x20error','\x20resources\x20found','startsWith','push','\x20issues\x20in\x20','\x20total','Events:','filter','filterDockerImages','\x20files','3968525WPMYaj','12psSIAN','filterKubectl','Containers:\x20','includes','73461lAiqWb','No\x20images\x20found','Ruff:\x20','\x20more\x20files','\x20log\x20lines\x20total)','filterDockerLogs','trim','split','148340esExRv','\x20\x20...\x20(','\x20more\x20lines','Ruff:\x20no\x20issues\x20found','4216JrbQxv','910xcspWL','describe','logs','18XgiVLz','slice','\x20\x20...\x20+','\x20lines\x20truncated]\x20...\x0a','join','...\x20+','filterRuff','4554eGDNQb','\x20more\x20events','match','4151VOpNMa','\x20more\x20resources','defineProperty','No\x20resources\x20found','73110mkZBUM'];a0_0x547e=function(){return _0x50b065;};return a0_0x547e();}function filterKubectl(_0x33717d,_0xcb0f18){const _0x437888=a0_0x2d9015,_0x37b957=_0x33717d['split']('\x0a')['filter'](_0x1711c8=>_0x1711c8[_0x437888(0xeb)]()['length']>0x0);if(_0x37b957['length']===0x0)return _0x437888(0xcd);if(_0x37b957['length']<=0x14)return _0x33717d[_0x437888(0xeb)]();if(_0xcb0f18==='get'){const _0x4e7177=_0x37b957[0x0],_0x3a90de=_0x37b957[_0x437888(0xf6)](0x1),_0x266193=[_0x3a90de[_0x437888(0xd1)]+_0x437888(0xd7),'',_0x4e7177];return _0x3a90de[_0x437888(0xd1)]<=0x1e?_0x266193['push'](..._0x3a90de):(_0x266193[_0x437888(0xd9)](..._0x3a90de[_0x437888(0xf6)](0x0,0x19)),_0x266193[_0x437888(0xd9)](_0x437888(0xfa)+(_0x3a90de[_0x437888(0xd1)]-0x19)+_0x437888(0xcb))),_0x266193[_0x437888(0xf9)]('\x0a');}if(_0xcb0f18===_0x437888(0xf3)){const _0x216904=[];let _0x47832f=![],_0x3575e2=0x0;for(const _0x2a1fc2 of _0x37b957){if(_0x2a1fc2[_0x437888(0xd8)](_0x437888(0xdc))){_0x47832f=!![],_0x216904[_0x437888(0xd9)](_0x2a1fc2);continue;}if(_0x47832f){_0x3575e2++;if(_0x3575e2<=0x5)_0x216904[_0x437888(0xd9)](_0x2a1fc2);}else _0x216904['push'](_0x2a1fc2);}return _0x3575e2>0x5&&_0x216904[_0x437888(0xd9)](_0x437888(0xf7)+(_0x3575e2-0x5)+_0x437888(0xfd)),_0x216904[_0x437888(0xf9)]('\x0a');}if(_0xcb0f18===_0x437888(0xf4))return filterDockerLogs(_0x33717d);const _0x21dc9c=_0x37b957['slice'](0x0,0x1e);return _0x37b957[_0x437888(0xd1)]>0x1e&&_0x21dc9c[_0x437888(0xd9)]('...\x20+'+(_0x37b957[_0x437888(0xd1)]-0x1e)+_0x437888(0xef)),_0x21dc9c[_0x437888(0xf9)]('\x0a');}function filterRuff(_0xeeba69){const _0x260915=a0_0x2d9015,_0x3dcce0=_0xeeba69[_0x260915(0xec)]('\x0a')[_0x260915(0xdd)](_0x2c66a6=>_0x2c66a6['trim']()[_0x260915(0xd1)]>0x0);if(_0x3dcce0['length']===0x0)return _0x260915(0xf0);if(_0xeeba69[_0x260915(0xe4)](_0x260915(0xd3))||_0xeeba69['includes'](_0x260915(0xd6)))return'Ruff:\x20all\x20checks\x20passed';const _0x4ac925=_0xeeba69[_0x260915(0xfe)](/Found (\d+) error/),_0x2bc18a=_0x4ac925?parseInt(_0x4ac925[0x1]):_0x3dcce0['length'],_0xcb7f3a={},_0x3664db=[];for(const _0xd10078 of _0x3dcce0){const _0x2b1a84=_0xd10078[_0x260915(0xfe)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x2b1a84){const _0xae8106=_0x2b1a84[0x1],_0x596146=_0xae8106[_0x260915(0xec)](':')[0x0];if(!_0xcb7f3a[_0x596146])_0xcb7f3a[_0x596146]=[];_0xcb7f3a[_0x596146][_0x260915(0xd9)](_0xd10078);}else _0x3664db[_0x260915(0xd9)](_0xd10078);}const _0x46e04a=Object['keys'](_0xcb7f3a);if(_0x46e04a[_0x260915(0xd1)]===0x0){if(_0x3dcce0[_0x260915(0xd1)]<=0x14)return _0xeeba69['trim']();return _0x3dcce0[_0x260915(0xf6)](0x0,0xf)['join']('\x0a')+('\x0a...\x20+'+(_0x3dcce0[_0x260915(0xd1)]-0xf)+'\x20more');}const _0x6be765=[_0x260915(0xe7)+_0x2bc18a+'\x20issues\x20in\x20'+_0x46e04a['length']+_0x260915(0xdf)];_0x6be765[_0x260915(0xd9)]('');const _0x4051b2=0xa;for(const _0x308a3a of _0x46e04a['slice'](0x0,_0x4051b2)){const _0x58dfbb=_0xcb7f3a[_0x308a3a];if(_0x58dfbb[_0x260915(0xd1)]<=0x3){for(const _0x4eeb61 of _0x58dfbb)_0x6be765[_0x260915(0xd9)]('\x20\x20'+_0x4eeb61);}else _0x6be765[_0x260915(0xd9)]('\x20\x20'+_0x58dfbb[0x0]),_0x6be765[_0x260915(0xd9)](_0x260915(0xee)+_0x58dfbb[_0x260915(0xd1)]+_0x260915(0xda)+_0x308a3a+')');}return _0x46e04a[_0x260915(0xd1)]>_0x4051b2&&_0x6be765[_0x260915(0xd9)]('\x20\x20...\x20+'+(_0x46e04a[_0x260915(0xd1)]-_0x4051b2)+_0x260915(0xe8)),_0x6be765[_0x260915(0xf9)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3ebd86=a0_0x6065;(function(_0x57f31b,_0x2a9190){const _0x54ddef=a0_0x6065,_0x244674=_0x57f31b();while(!![]){try{const _0x420086=-parseInt(_0x54ddef(0x18e))/0x1*(parseInt(_0x54ddef(0x198))/0x2)+-parseInt(_0x54ddef(0x188))/0x3+parseInt(_0x54ddef(0x191))/0x4+parseInt(_0x54ddef(0x192))/0x5+-parseInt(_0x54ddef(0x1ab))/0x6+parseInt(_0x54ddef(0x1b1))/0x7*(parseInt(_0x54ddef(0x1a0))/0x8)+parseInt(_0x54ddef(0x195))/0x9;if(_0x420086===_0x2a9190)break;else _0x244674['push'](_0x244674['shift']());}catch(_0x188a78){_0x244674['push'](_0x244674['shift']());}}}(a0_0x31b7,0xd6abf));function a0_0x6065(_0x50076a,_0x5ebec7){_0x50076a=_0x50076a-0x186;const _0x31b769=a0_0x31b7();let _0x6065b8=_0x31b769[_0x50076a];return _0x6065b8;}Object[a0_0x3ebd86(0x1a9)](exports,'__esModule',{'value':!![]}),exports[a0_0x3ebd86(0x1ae)]=stripAnsi,exports[a0_0x3ebd86(0x187)]=collapseDuplicates,exports[a0_0x3ebd86(0x197)]=collapseWhitespace,exports['stripComments']=stripComments,exports[a0_0x3ebd86(0x19c)]=smartCrushJson,exports[a0_0x3ebd86(0x190)]=softTruncate;function a0_0x31b7(){const _0x1a9dac=['\x20items,\x20','map','stripAnsi','repository','sha','7014945GkKWiU','stringify','...\x20+','length','trim','dev','collapseDuplicates','3587040ZBjeQD','\x20key\x20fields)','\x20[x','checksum','join','funding','8kfdgGU','slice','softTruncate','277156USjjvS','5915625PkZspL','startsWith','includes','1405062NvqjXS','engines','collapseWhitespace','12134sYSnHh','replace','substring','push','smartCrushJson','min','split','object','8HLYPku','resolved','filter','\x0a...\x20[TrimPrompt:\x20Truncated\x20','\x20characters\x20of\x20output]\x20...\x0a','integrity','parse','hash','toLowerCase','defineProperty','test','1722936ulbnCE'];a0_0x31b7=function(){return _0x1a9dac;};return a0_0x31b7();}function stripAnsi(_0x50a48d){const _0x1da695=a0_0x3ebd86,_0x2a61af=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x50a48d[_0x1da695(0x199)](_0x2a61af,'');}function collapseDuplicates(_0x29299b){const _0x553330=a0_0x3ebd86,_0x395997=_0x29299b['split']('\x0a');if(_0x395997[_0x553330(0x1b4)]<=0x1)return _0x29299b;const _0x419968=[];let _0x320474=_0x395997[0x0],_0x4e4bf8=0x1;for(let _0x4ded94=0x1;_0x4ded94<_0x395997['length'];_0x4ded94++){const _0x309d45=_0x395997[_0x4ded94];_0x309d45===_0x320474&&_0x309d45[_0x553330(0x1b5)]()[_0x553330(0x1b4)]>0x0?_0x4e4bf8++:(_0x4e4bf8>0x1?_0x419968['push'](_0x320474+_0x553330(0x18a)+_0x4e4bf8+']'):_0x419968['push'](_0x320474),_0x320474=_0x309d45,_0x4e4bf8=0x1);}return _0x4e4bf8>0x1?_0x419968[_0x553330(0x19b)](_0x320474+_0x553330(0x18a)+_0x4e4bf8+']'):_0x419968[_0x553330(0x19b)](_0x320474),_0x419968[_0x553330(0x18c)]('\x0a');}function collapseWhitespace(_0x5095d5){const _0x4d6dc3=a0_0x3ebd86;let _0x1e1352=_0x5095d5[_0x4d6dc3(0x199)](/[ \t]+$/gm,'');return _0x1e1352=_0x1e1352[_0x4d6dc3(0x199)](/\n{4,}/g,'\x0a\x0a\x0a'),_0x1e1352;}function stripComments(_0x5c7288,_0x10cea5){const _0x5b8e66=a0_0x3ebd86;if(!_0x10cea5)return _0x5c7288;const _0x54aeb6=_0x5c7288['split']('\x0a');if(_0x54aeb6[_0x5b8e66(0x1b4)]<=0x96)return _0x5c7288;const _0x5096be={'.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*#(?!!)/},_0xb3d9d9=_0x5096be[_0x10cea5[_0x5b8e66(0x1a8)]()];if(!_0xb3d9d9)return _0x5c7288;const _0x5c9ab9=_0x54aeb6[_0x5b8e66(0x1a2)](_0x152a73=>!_0xb3d9d9[_0x5b8e66(0x1aa)](_0x152a73));return _0x5c9ab9[_0x5b8e66(0x18c)]('\x0a');}function smartCrushJson(_0x116b01){const _0x10af19=a0_0x3ebd86;try{const _0x5bbb50=_0x116b01['trim']();if(!_0x5bbb50[_0x10af19(0x193)]('['))return null;const _0x696172=JSON[_0x10af19(0x1a6)](_0x5bbb50);if(!Array['isArray'](_0x696172)||_0x696172['length']<0x3)return null;if(typeof _0x696172[0x0]!==_0x10af19(0x19f)||_0x696172[0x0]===null)return null;const _0x58bbaa=Object['keys'](_0x696172[0x0]);if(_0x58bbaa['length']===0x0)return null;const _0x2019ee=_0x58bbaa['filter'](_0x220270=>{const _0x1adfae=_0x10af19,_0x4024be=_0x220270[_0x1adfae(0x1a8)]();return!_0x4024be[_0x1adfae(0x194)](_0x1adfae(0x1a1))&&!_0x4024be[_0x1adfae(0x194)](_0x1adfae(0x1a5))&&!_0x4024be['includes'](_0x1adfae(0x1b0))&&!_0x4024be[_0x1adfae(0x194)](_0x1adfae(0x1a7))&&!_0x4024be[_0x1adfae(0x194)](_0x1adfae(0x18b))&&!_0x4024be[_0x1adfae(0x194)]('signature')&&!_0x4024be[_0x1adfae(0x194)](_0x1adfae(0x186))&&_0x4024be!==_0x1adfae(0x18d)&&_0x4024be!==_0x1adfae(0x196)&&_0x4024be!=='bugs'&&_0x4024be!==_0x1adfae(0x1af);})['slice'](0x0,0x6);if(_0x2019ee['length']===0x0)return null;const _0x451472=[];_0x451472[_0x10af19(0x19b)](_0x2019ee[_0x10af19(0x18c)]('|'));const _0x3e58b6=0x1e;for(let _0x24beed=0x0;_0x24beed<Math[_0x10af19(0x19d)](_0x696172[_0x10af19(0x1b4)],_0x3e58b6);_0x24beed++){const _0x5b2385=_0x2019ee[_0x10af19(0x1ad)](_0x3d53e8=>{const _0x8e77c6=_0x10af19,_0x54e2d1=_0x696172[_0x24beed][_0x3d53e8];if(_0x54e2d1===null||_0x54e2d1===undefined)return'';if(typeof _0x54e2d1===_0x8e77c6(0x19f))return JSON[_0x8e77c6(0x1b2)](_0x54e2d1)[_0x8e77c6(0x19a)](0x0,0x28);return String(_0x54e2d1)[_0x8e77c6(0x19a)](0x0,0x3c);});_0x451472['push'](_0x5b2385[_0x10af19(0x18c)]('|'));}_0x696172[_0x10af19(0x1b4)]>_0x3e58b6&&_0x451472[_0x10af19(0x19b)](_0x10af19(0x1b3)+(_0x696172[_0x10af19(0x1b4)]-_0x3e58b6)+'\x20more\x20rows');_0x451472[_0x10af19(0x19b)]('\x0a('+_0x696172[_0x10af19(0x1b4)]+_0x10af19(0x1ac)+_0x58bbaa[_0x10af19(0x1b4)]+'\x20fields,\x20showing\x20'+_0x2019ee[_0x10af19(0x1b4)]+_0x10af19(0x189));const _0x23bee4=_0x451472['join']('\x0a');if(_0x23bee4[_0x10af19(0x1b4)]<_0x5bbb50[_0x10af19(0x1b4)])return _0x23bee4;return null;}catch{return null;}}function softTruncate(_0x10e2e0,_0x51bb0f=0x4e20){const _0x23c208=a0_0x3ebd86;if(_0x10e2e0['length']<=_0x51bb0f)return _0x10e2e0;const _0x20dd58=_0x10e2e0[_0x23c208(0x19e)]('\x0a');if(_0x20dd58[_0x23c208(0x1b4)]<=0xc8)return _0x10e2e0;const _0x95f6a8=0x32,_0x3ce41f=0x96,_0xf806dc=_0x20dd58['slice'](0x0,_0x95f6a8),_0x44046f=_0x20dd58[_0x23c208(0x18f)](_0x20dd58[_0x23c208(0x1b4)]-_0x3ce41f),_0x247134=_0x10e2e0[_0x23c208(0x1b4)]-(_0xf806dc[_0x23c208(0x18c)]('\x0a')['length']+_0x44046f['join']('\x0a')[_0x23c208(0x1b4)]);return[..._0xf806dc,_0x23c208(0x1a3)+_0x247134+_0x23c208(0x1a4),..._0x44046f][_0x23c208(0x18c)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a0_0x1d3380=a0_0x4f4e;function a0_0x369e(){const _0x2ecb45=['\x20\x20...\x20(+','99fgeOIO','\x20lines\x20of\x20description)','configurable','1953904oxFaNJ','[file]\x20','1726431rDUDzj','basename','push','1656IMnqXQ','\x0aChanges:','slice','filterGitStatus','defineProperty','20GPKZBY','8QGXkOx','2237191KVfXuJ','\x20more\x20modifications','---','prototype','substring','path','trim','split','Clean\x20working\x20tree','\x20untracked\x20files)','__setModuleDefault','dirname','+++','default','map','\x20\x20??\x20','filter','\x20(+','__importStar','entries','__createBinding','getOwnPropertyDescriptor','45730rfjXNX','startsWith','3351nGXHTn','2780JRMmba','*\x20Branch:\x20','unknown_file','getOwnPropertyNames','create','length','13814rsTLcm','48EiMTlS','__esModule','\x20\x20...\x20+','join','No\x20modifications','/\x20(','diff\x20--git'];a0_0x369e=function(){return _0x2ecb45;};return a0_0x369e();}(function(_0xf81185,_0x30f818){const _0x39fb38=a0_0x4f4e,_0x49b0e8=_0xf81185();while(!![]){try{const _0x195f27=-parseInt(_0x39fb38(0x1cd))/0x1*(-parseInt(_0x39fb38(0x1ed))/0x2)+parseInt(_0x39fb38(0x1e6))/0x3*(parseInt(_0x39fb38(0x1cc))/0x4)+-parseInt(_0x39fb38(0x1e7))/0x5*(parseInt(_0x39fb38(0x1c7))/0x6)+-parseInt(_0x39fb38(0x1fb))/0x7+-parseInt(_0x39fb38(0x1f9))/0x8+-parseInt(_0x39fb38(0x1f6))/0x9*(parseInt(_0x39fb38(0x1e4))/0xa)+parseInt(_0x39fb38(0x1ce))/0xb*(parseInt(_0x39fb38(0x1ee))/0xc);if(_0x195f27===_0x30f818)break;else _0x49b0e8['push'](_0x49b0e8['shift']());}catch(_0x11e83d){_0x49b0e8['push'](_0x49b0e8['shift']());}}}(a0_0x369e,0x2be17));var __createBinding=this&&this[a0_0x1d3380(0x1e2)]||(Object[a0_0x1d3380(0x1eb)]?function(_0x1740e4,_0x305c19,_0x50aa70,_0x10d043){const _0x421cad=a0_0x1d3380;if(_0x10d043===undefined)_0x10d043=_0x50aa70;var _0x3f00b6=Object[_0x421cad(0x1e3)](_0x305c19,_0x50aa70);(!_0x3f00b6||('get'in _0x3f00b6?!_0x305c19['__esModule']:_0x3f00b6['writable']||_0x3f00b6[_0x421cad(0x1f8)]))&&(_0x3f00b6={'enumerable':!![],'get':function(){return _0x305c19[_0x50aa70];}}),Object[_0x421cad(0x1cb)](_0x1740e4,_0x10d043,_0x3f00b6);}:function(_0x58df25,_0xb85dc0,_0x13f5b7,_0x3e2600){if(_0x3e2600===undefined)_0x3e2600=_0x13f5b7;_0x58df25[_0x3e2600]=_0xb85dc0[_0x13f5b7];}),__setModuleDefault=this&&this[a0_0x1d3380(0x1d8)]||(Object[a0_0x1d3380(0x1eb)]?function(_0x78ee65,_0x537761){const _0x3455a2=a0_0x1d3380;Object[_0x3455a2(0x1cb)](_0x78ee65,_0x3455a2(0x1db),{'enumerable':!![],'value':_0x537761});}:function(_0x3921b7,_0x45900a){_0x3921b7['default']=_0x45900a;}),__importStar=this&&this[a0_0x1d3380(0x1e0)]||(function(){var _0xadfad3=function(_0x234200){const _0x201f8e=a0_0x4f4e;return _0xadfad3=Object[_0x201f8e(0x1ea)]||function(_0x453eb8){const _0x50f47f=_0x201f8e;var _0x4e53b9=[];for(var _0x544126 in _0x453eb8)if(Object[_0x50f47f(0x1d1)]['hasOwnProperty']['call'](_0x453eb8,_0x544126))_0x4e53b9[_0x4e53b9[_0x50f47f(0x1ec)]]=_0x544126;return _0x4e53b9;},_0xadfad3(_0x234200);};return function(_0x5680db){const _0x457e0b=a0_0x4f4e;if(_0x5680db&&_0x5680db[_0x457e0b(0x1ef)])return _0x5680db;var _0x263200={};if(_0x5680db!=null){for(var _0x5f00bf=_0xadfad3(_0x5680db),_0x33c58a=0x0;_0x33c58a<_0x5f00bf[_0x457e0b(0x1ec)];_0x33c58a++)if(_0x5f00bf[_0x33c58a]!==_0x457e0b(0x1db))__createBinding(_0x263200,_0x5680db,_0x5f00bf[_0x33c58a]);}return __setModuleDefault(_0x263200,_0x5680db),_0x263200;};}());Object['defineProperty'](exports,a0_0x1d3380(0x1ef),{'value':!![]}),exports[a0_0x1d3380(0x1ca)]=filterGitStatus,exports['filterGitLog']=filterGitLog,exports['filterGitDiff']=filterGitDiff;const path=__importStar(require(a0_0x1d3380(0x1d3)));function filterGitStatus(_0xc0e3f4){const _0x28528a=a0_0x1d3380,_0x48da27=_0xc0e3f4[_0x28528a(0x1d5)]('\x0a')[_0x28528a(0x1dc)](_0x36ac8d=>_0x36ac8d[_0x28528a(0x1d4)]())['filter'](_0x1dcabc=>_0x1dcabc['length']>0x0);if(_0x48da27[_0x28528a(0x1ec)]===0x0)return _0x28528a(0x1d6);const _0x31df23=[],_0x35304f=[],_0xe8871f=[];for(const _0x1725e4 of _0x48da27){if(_0x1725e4[_0x28528a(0x1e5)]('##')){const _0x178249=_0x1725e4['replace'](/^##\s*/,'');_0x31df23['push'](_0x28528a(0x1e8)+_0x178249);}else _0x1725e4[_0x28528a(0x1e5)]('??')?_0x35304f['push'](_0x1725e4[_0x28528a(0x1d2)](0x3)[_0x28528a(0x1d4)]()):_0xe8871f['push'](_0x1725e4);}_0xe8871f[_0x28528a(0x1ec)]>0x0&&(_0x31df23[_0x28528a(0x1fd)](_0x28528a(0x1c8)),_0x31df23[_0x28528a(0x1fd)](..._0xe8871f[_0x28528a(0x1dc)](_0xa11a21=>'\x20\x20'+_0xa11a21)));if(_0x35304f[_0x28528a(0x1ec)]>0x0){_0x31df23[_0x28528a(0x1fd)]('\x0aUntracked\x20files:');const _0x500b2f={},_0x4b1ef9=[];for(const _0xdd71a of _0x35304f){const _0x3e0720=path[_0x28528a(0x1d9)](_0xdd71a);_0x3e0720==='.'||_0x3e0720===''?_0x4b1ef9['push'](_0xdd71a):(!_0x500b2f[_0x3e0720]&&(_0x500b2f[_0x3e0720]=[]),_0x500b2f[_0x3e0720][_0x28528a(0x1fd)](path[_0x28528a(0x1fc)](_0xdd71a)));}for(const [_0x22c2d8,_0x2a6be2]of Object[_0x28528a(0x1e1)](_0x500b2f)){if(_0x2a6be2[_0x28528a(0x1ec)]>0x5)_0x31df23[_0x28528a(0x1fd)](_0x28528a(0x1dd)+_0x22c2d8+_0x28528a(0x1f3)+_0x2a6be2[_0x28528a(0x1ec)]+_0x28528a(0x1d7));else for(const _0x47f3e3 of _0x2a6be2){_0x31df23['push'](_0x28528a(0x1dd)+path[_0x28528a(0x1f1)](_0x22c2d8,_0x47f3e3));}}for(const _0x34e088 of _0x4b1ef9){_0x31df23[_0x28528a(0x1fd)](_0x28528a(0x1dd)+_0x34e088);}}return _0x31df23['join']('\x0a');}function filterGitLog(_0x585d2e){const _0x5ed42a=a0_0x1d3380,_0x25a164=_0x585d2e['split']('---END---')['map'](_0x1375e5=>_0x1375e5[_0x5ed42a(0x1d4)]())['filter'](_0x352ad1=>_0x352ad1['length']>0x0);if(_0x25a164['length']===0x0)return _0x585d2e;const _0x5d2056=[];for(const _0x4d0f7f of _0x25a164){const _0x18f40d=_0x4d0f7f[_0x5ed42a(0x1d5)]('\x0a'),_0x2db5fe=_0x18f40d[0x0]||'',_0x5627e3=_0x18f40d[_0x5ed42a(0x1c9)](0x1)[_0x5ed42a(0x1dc)](_0x403b32=>_0x403b32[_0x5ed42a(0x1d4)]())[_0x5ed42a(0x1de)](_0x1a4a5f=>_0x1a4a5f[_0x5ed42a(0x1ec)]>0x0);_0x5d2056['push']('-\x20'+_0x2db5fe),_0x5627e3[_0x5ed42a(0x1ec)]>0x0&&(_0x5d2056[_0x5ed42a(0x1fd)]('\x20\x20'+_0x5627e3[0x0]),_0x5627e3[_0x5ed42a(0x1ec)]>0x1&&_0x5d2056[_0x5ed42a(0x1fd)](_0x5ed42a(0x1f5)+(_0x5627e3[_0x5ed42a(0x1ec)]-0x1)+_0x5ed42a(0x1f7)));}return _0x5d2056[_0x5ed42a(0x1f1)]('\x0a');}function a0_0x4f4e(_0x771280,_0x550ea0){_0x771280=_0x771280-0x1c7;const _0x369e40=a0_0x369e();let _0x4f4e76=_0x369e40[_0x771280];return _0x4f4e76;}function filterGitDiff(_0x2d8a38){const _0x3bb7fa=a0_0x1d3380,_0x4354c6=_0x2d8a38[_0x3bb7fa(0x1d5)]('\x0a'),_0x3b1f01=[];let _0x5abc1c='',_0x5cdce5=0x0,_0x20653f=0x0,_0x2d4796=[];const _0x4bcd45=()=>{const _0x1be134=_0x3bb7fa;if(_0x5abc1c&&(_0x5cdce5>0x0||_0x20653f>0x0)){_0x3b1f01['push'](_0x1be134(0x1fa)+_0x5abc1c+_0x1be134(0x1df)+_0x5cdce5+'\x20-'+_0x20653f+')');const _0x45909e=0xa,_0x1c375b=_0x2d4796[_0x1be134(0x1c9)](0x0,_0x45909e);for(const _0x5d5b2b of _0x1c375b){_0x3b1f01[_0x1be134(0x1fd)]('\x20\x20'+_0x5d5b2b);}const _0x5ec2af=_0x5cdce5+_0x20653f-_0x45909e;_0x5ec2af>0x0&&_0x3b1f01[_0x1be134(0x1fd)](_0x1be134(0x1f0)+_0x5ec2af+_0x1be134(0x1cf));}_0x5cdce5=0x0,_0x20653f=0x0,_0x2d4796=[];};for(const _0x1d73ed of _0x4354c6){if(_0x1d73ed[_0x3bb7fa(0x1e5)](_0x3bb7fa(0x1f4))){_0x4bcd45();const _0x131eb1=_0x1d73ed['match'](/\sb\/(.+)$/);_0x5abc1c=_0x131eb1?_0x131eb1[0x1]:_0x3bb7fa(0x1e9);}else{if(_0x1d73ed[_0x3bb7fa(0x1e5)]('+')&&!_0x1d73ed[_0x3bb7fa(0x1e5)](_0x3bb7fa(0x1da)))_0x5cdce5++,_0x2d4796[_0x3bb7fa(0x1fd)](_0x1d73ed);else _0x1d73ed[_0x3bb7fa(0x1e5)]('-')&&!_0x1d73ed['startsWith'](_0x3bb7fa(0x1d0))&&(_0x20653f++,_0x2d4796[_0x3bb7fa(0x1fd)](_0x1d73ed));}}_0x4bcd45();const _0x5a01b1=_0x3b1f01[_0x3bb7fa(0x1f1)]('\x0a');return _0x5a01b1[_0x3bb7fa(0x1ec)]>0x0?_0x5a01b1:_0x3bb7fa(0x1f2);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x51fe(_0x105442,_0x3b7968){_0x105442=_0x105442-0x1b8;const _0x50f160=a0_0x50f1();let _0x51fe6b=_0x50f160[_0x105442];return _0x51fe6b;}const a0_0x4a6118=a0_0x51fe;(function(_0x354d66,_0x576a2b){const _0x22a4c6=a0_0x51fe,_0x730062=_0x354d66();while(!![]){try{const _0x2a1849=parseInt(_0x22a4c6(0x1b9))/0x1*(parseInt(_0x22a4c6(0x1d8))/0x2)+-parseInt(_0x22a4c6(0x1c0))/0x3+-parseInt(_0x22a4c6(0x1c7))/0x4+-parseInt(_0x22a4c6(0x1c6))/0x5+-parseInt(_0x22a4c6(0x1e2))/0x6*(-parseInt(_0x22a4c6(0x1d6))/0x7)+parseInt(_0x22a4c6(0x1e0))/0x8+-parseInt(_0x22a4c6(0x1bf))/0x9*(-parseInt(_0x22a4c6(0x1c4))/0xa);if(_0x2a1849===_0x576a2b)break;else _0x730062['push'](_0x730062['shift']());}catch(_0x4c542c){_0x730062['push'](_0x730062['shift']());}}}(a0_0x50f1,0x72830));Object[a0_0x4a6118(0x1d9)](exports,'__esModule',{'value':!![]}),exports[a0_0x4a6118(0x1cb)]=filterGoTest,exports['filterGoVet']=filterGoVet;function a0_0x50f1(){const _0x4ce9e6=['\x20\x20\x20\x20','push','trim','PASS','match','5747440icglfx','\x20more\x20failures','50574qQSYvj','includes','5hvSekl','startsWith','lines','split','slice','\x20more\x20issues','40923QbtbWm','1329252ZNZONh','Go\x20vet:\x20','Go\x20test:\x20','\x20issues\x20found','2180MIQabF','\x20skipped','834210BvyWOE','2969348amWstV','Go\x20test:\x20no\x20test\x20files','\x20failed,\x20','\x0aFailures:','filterGoTest','FAIL','\x20passed','Go\x20test:\x20all\x20tests\x20passed','\x20\x20...\x20+','===\x20RUN','\x20passed,\x20','join','min','length','\x20more\x20lines','91xvMLLN','---\x20SKIP:','820LnvqoY','defineProperty','filter'];a0_0x50f1=function(){return _0x4ce9e6;};return a0_0x50f1();}function filterGoTest(_0x4d6e37){const _0x3c1451=a0_0x4a6118,_0x6b193e=_0x4d6e37[_0x3c1451(0x1bc)]('\x0a');let _0x16e369=0x0,_0x28dbb8=0x0,_0x9f05cd=0x0;const _0x2d6d6c=[],_0x49a0b2=[];let _0x1f6524=null;for(const _0xb53f3f of _0x6b193e){const _0x17a0ca=_0xb53f3f['trim'](),_0xf01596=_0x17a0ca[_0x3c1451(0x1df)](/^ok\s+\S+\s+[\d.]+s/);if(_0xf01596){_0x49a0b2['push'](_0x17a0ca);continue;}const _0x3a90ea=_0x17a0ca[_0x3c1451(0x1df)](/^FAIL\s+\S+/);if(_0x3a90ea){_0x49a0b2['push'](_0x17a0ca);continue;}const _0x140810=_0x17a0ca[_0x3c1451(0x1df)](/^--- PASS:/);if(_0x140810){_0x16e369++;continue;}const _0x28e60a=_0x17a0ca['match'](/^--- FAIL:\s+(\S+)/);if(_0x28e60a){if(_0x1f6524)_0x2d6d6c[_0x3c1451(0x1dc)](_0x1f6524);_0x1f6524={'name':_0x28e60a[0x1],'lines':[]},_0x28dbb8++;continue;}if(_0x17a0ca[_0x3c1451(0x1ba)](_0x3c1451(0x1d7))){_0x9f05cd++;continue;}_0x1f6524&&_0x17a0ca[_0x3c1451(0x1d4)]>0x0&&!_0x17a0ca[_0x3c1451(0x1ba)]('===\x20RUN')&&_0x1f6524['lines'][_0x3c1451(0x1dc)](_0xb53f3f),_0x17a0ca['startsWith'](_0x3c1451(0x1d0))&&(_0x1f6524&&(_0x2d6d6c[_0x3c1451(0x1dc)](_0x1f6524),_0x1f6524=null));}if(_0x1f6524)_0x2d6d6c[_0x3c1451(0x1dc)](_0x1f6524);if(_0x16e369===0x0&&_0x28dbb8===0x0&&_0x9f05cd===0x0){if(_0x4d6e37[_0x3c1451(0x1b8)](_0x3c1451(0x1de))&&!_0x4d6e37[_0x3c1451(0x1b8)](_0x3c1451(0x1cc)))return _0x3c1451(0x1ce);if(_0x4d6e37[_0x3c1451(0x1b8)]('no\x20test\x20files'))return _0x3c1451(0x1c8);return _0x4d6e37;}if(_0x28dbb8===0x0){const _0x183441=[_0x3c1451(0x1c2)+_0x16e369+_0x3c1451(0x1cd)];if(_0x9f05cd>0x0)_0x183441[_0x3c1451(0x1dc)](_0x9f05cd+_0x3c1451(0x1c5));return _0x183441[_0x3c1451(0x1d2)](',\x20');}const _0x5f3bb0=[_0x3c1451(0x1c2)+_0x16e369+_0x3c1451(0x1d1)+_0x28dbb8+_0x3c1451(0x1c9)+_0x9f05cd+_0x3c1451(0x1c5)];if(_0x2d6d6c[_0x3c1451(0x1d4)]>0x0){_0x5f3bb0[_0x3c1451(0x1dc)](_0x3c1451(0x1ca));const _0x230d4d=0x3;for(let _0x2eba37=0x0;_0x2eba37<Math[_0x3c1451(0x1d3)](_0x2d6d6c[_0x3c1451(0x1d4)],_0x230d4d);_0x2eba37++){const _0x33f57b=_0x2d6d6c[_0x2eba37];_0x5f3bb0[_0x3c1451(0x1dc)]('\x20\x20'+(_0x2eba37+0x1)+'.\x20'+_0x33f57b['name']);for(const _0x4961c7 of _0x33f57b[_0x3c1451(0x1bb)]['slice'](0x0,0x5)){_0x5f3bb0[_0x3c1451(0x1dc)](_0x3c1451(0x1db)+_0x4961c7[_0x3c1451(0x1dd)]());}_0x33f57b[_0x3c1451(0x1bb)][_0x3c1451(0x1d4)]>0x5&&_0x5f3bb0[_0x3c1451(0x1dc)]('\x20\x20\x20\x20...\x20+'+(_0x33f57b[_0x3c1451(0x1bb)][_0x3c1451(0x1d4)]-0x5)+_0x3c1451(0x1d5));}_0x2d6d6c['length']>_0x230d4d&&_0x5f3bb0[_0x3c1451(0x1dc)](_0x3c1451(0x1cf)+(_0x2d6d6c[_0x3c1451(0x1d4)]-_0x230d4d)+_0x3c1451(0x1e1));}return _0x5f3bb0[_0x3c1451(0x1d2)]('\x0a');}function filterGoVet(_0x5367e6){const _0x27701d=a0_0x4a6118,_0x1eae87=_0x5367e6[_0x27701d(0x1bc)]('\x0a')[_0x27701d(0x1da)](_0x6c5ea6=>_0x6c5ea6[_0x27701d(0x1dd)]()[_0x27701d(0x1d4)]>0x0);if(_0x1eae87['length']===0x0)return'Go\x20vet:\x20no\x20issues\x20found';if(_0x1eae87[_0x27701d(0x1d4)]<=0x14)return _0x5367e6[_0x27701d(0x1dd)]();const _0xe4010e=[_0x27701d(0x1c1)+_0x1eae87[_0x27701d(0x1d4)]+_0x27701d(0x1c3)];return _0xe4010e[_0x27701d(0x1dc)](..._0x1eae87[_0x27701d(0x1bd)](0x0,0xa)),_0x1eae87['length']>0xa&&_0xe4010e[_0x27701d(0x1dc)]('...\x20+'+(_0x1eae87[_0x27701d(0x1d4)]-0xa)+_0x27701d(0x1be)),_0xe4010e['join']('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x13e196=a0_0xbc7d;function a0_0x36b3(){const _0x39a8eb=['pip\x20install','trim\x20go','816lEDqHU','cargo\x20build','softTruncate','cargo\x20test','../tracker','some','getConfig','trim\x20gh','filterPytest','32351fMWiPZ','[minified\x20file]','collapseDuplicates','163452KgCGRf','pnpm\x20test','vitest','npm\x20run\x20test','npm\x20i','cargo\x20clippy','324126JmdQIP','trim','secretsFound','30nikaLC','./go','pnpm\x20install','redactor','filterGoTest','filterNpmInstall','trim\x20pip','2yybIMh','stripAnsi','\x20ls','./shell','filterKubectl','513334RisOuM','filterGitDiff','length','./devops','trim\x20','defineProperty','7VWbrLO','npm\x20test','../redactor','features_enabled','499265goGAFR','trim\x20pnpm','filterDockerPs','push','lastRedactAudit','trim\x20docker','filterTree','text','2729016LxbSPu','includes','filterGitLog','ansi_strip','trim\x20glab','redact','[binary','trim\x20git','compressOutput','./git','filterDockerLogs','filterGoVet','binary','__esModule','pytest','---','match','filterGrep','filterGitStatus','2207742ZczBRx','\x20tree\x20','yadm\x20status','filterCargoTest','filterCat','yarn\x20install','trim\x20npx','trim\x20read','jest','24HAUkkp','git\x20diff','trim\x20grep','filterCargoBuild','startsWith','trim\x20ls','skeleton','go\x20vet','trim\x20kubectl','trim\x20cargo','yadm\x20log','./python','get','git\x20status','git\x20log','lastFeatures','cargo\x20check','pattern','npm\x20install','endsWith','kubectl','yarn\x20test','filter','toLowerCase','\x20ls\x20','trim\x20ruff','trim\x20tree'];a0_0x36b3=function(){return _0x39a8eb;};return a0_0x36b3();}(function(_0x5f3e5e,_0x333c7c){const _0x382113=a0_0xbc7d,_0x1f9349=_0x5f3e5e();while(!![]){try{const _0x106753=parseInt(_0x382113(0xc4))/0x1*(-parseInt(_0x382113(0xbf))/0x2)+parseInt(_0x382113(0xf2))/0x3*(parseInt(_0x382113(0x11b))/0x4)+-parseInt(_0x382113(0xce))/0x5+parseInt(_0x382113(0xe9))/0x6*(parseInt(_0x382113(0xca))/0x7)+parseInt(_0x382113(0xd6))/0x8+-parseInt(_0x382113(0xb5))/0x9*(parseInt(_0x382113(0xb8))/0xa)+-parseInt(_0x382113(0x118))/0xb*(-parseInt(_0x382113(0x10f))/0xc);if(_0x106753===_0x333c7c)break;else _0x1f9349['push'](_0x1f9349['shift']());}catch(_0x543039){_0x1f9349['push'](_0x1f9349['shift']());}}}(a0_0x36b3,0x7dabb));Object[a0_0x13e196(0xc9)](exports,a0_0x13e196(0xe3),{'value':!![]}),exports[a0_0x13e196(0x101)]=exports[a0_0x13e196(0xd2)]=void 0x0,exports[a0_0x13e196(0xde)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require('./generic'),git_1=require(a0_0x13e196(0xdf)),python_1=require(a0_0x13e196(0xfd)),js_1=require('./js'),shell_1=require(a0_0x13e196(0xc2)),rust_1=require('./rust'),go_1=require(a0_0x13e196(0xb9)),devops_1=require(a0_0x13e196(0xc7)),redactor_1=require(a0_0x13e196(0xcc)),tracker_1=require(a0_0x13e196(0x113));exports[a0_0x13e196(0xd2)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x13e196(0x101)]=[];function a0_0xbc7d(_0x4b3612,_0x5b2429){const _0x36b368=a0_0x36b3();return a0_0xbc7d=function(_0xbc7d52,_0x5b9983){_0xbc7d52=_0xbc7d52-0xb4;let _0x1a07ab=_0x36b368[_0xbc7d52];return _0x1a07ab;},a0_0xbc7d(_0x4b3612,_0x5b2429);}function isFeatureEnabled(_0x425a83){const _0x5d393b=a0_0x13e196;try{const _0x415826=tracker_1['tracker'][_0x5d393b(0x115)](),_0x2ac1cd=_0x415826[_0x5d393b(0xcd)];if(!_0x2ac1cd||_0x2ac1cd[_0x425a83]===undefined)return!![];return _0x2ac1cd[_0x425a83]!==![];}catch{return!![];}}function compressOutput(_0x17a6b9,_0x49e5cc,_0x4956ab,_0x39082=!![]){const _0x56deda=a0_0x13e196,_0x55f38e=_0x17a6b9[_0x56deda(0xb6)]();let _0x2d75cb=_0x49e5cc;_0x4956ab[_0x56deda(0xb6)]()[_0x56deda(0xc6)]>0x0&&(_0x2d75cb=_0x49e5cc+'\x0a'+_0x4956ab);let _0x4796d9=isFeatureEnabled(_0x56deda(0xd9))?(0x0,generic_1[_0x56deda(0xc0)])(_0x2d75cb):_0x2d75cb;const _0x1c3f8b=[];if(_0x4796d9[_0x56deda(0xc6)]<_0x2d75cb[_0x56deda(0xc6)])_0x1c3f8b['push'](_0x56deda(0xd9));const _0x596d36=(_0x11b129,_0x3a15d2)=>{const _0x4d4286=_0x56deda;return _0x1c3f8b[_0x4d4286(0xd1)](_0x11b129),exports[_0x4d4286(0x101)]=_0x1c3f8b,_0x3a15d2;};if(_0x39082&&isFeatureEnabled(_0x56deda(0xdb))){const _0x32d6c8=redactor_1[_0x56deda(0xbb)]['redactWithAudit'](_0x4796d9);_0x4796d9=_0x32d6c8[_0x56deda(0xd5)],exports['lastRedactAudit']={'secretsFound':_0x32d6c8[_0x56deda(0xb7)],'secretTypes':_0x32d6c8['secretTypes']};if(_0x32d6c8[_0x56deda(0xb7)]>0x0)_0x1c3f8b[_0x56deda(0xd1)](_0x56deda(0xdb));}else exports[_0x56deda(0xd2)]={'secretsFound':0x0,'secretTypes':[]};const _0x1cfaf0=_0x55f38e[_0x56deda(0x109)](),_0x568033=isFeatureEnabled('filter');try{if(_0x568033){if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xff))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xeb)))return _0x596d36(_0x56deda(0x108),(0x0,git_1[_0x56deda(0xe8)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x100))||_0x1cfaf0['includes'](_0x56deda(0xfc)))return _0x596d36('filter',(0x0,git_1[_0x56deda(0xd8)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xf3))||_0x1cfaf0[_0x56deda(0xd7)]('git\x20show')||_0x1cfaf0[_0x56deda(0xd7)]('yadm\x20diff'))return _0x596d36('filter',(0x0,git_1[_0x56deda(0xc5)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xe4))||_0x1cfaf0['match'](/python3?\s+-m\s+pytest/))return _0x596d36(_0x56deda(0x108),(0x0,python_1[_0x56deda(0x117)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x10d))||_0x1cfaf0[_0x56deda(0xd7)]('pip3\x20install'))return _0x596d36('filter',(0x0,python_1['filterPipInstall'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)]('ruff\x20check')||_0x1cfaf0[_0x56deda(0xd7)]('ruff\x20'))return _0x596d36('filter',(0x0,devops_1['filterRuff'])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0x104))||_0x1cfaf0[_0x56deda(0xd7)]('npm\x20i\x20')||_0x1cfaf0['endsWith'](_0x56deda(0x11f))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xba))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xee)))return _0x596d36('filter',(0x0,js_1[_0x56deda(0xbd)])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0xf1))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x11d)))return _0x596d36(_0x56deda(0x108),(0x0,js_1['filterJestVitest'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xcb))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x11c))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x107))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x11e)))return _0x596d36(_0x56deda(0x108),(0x0,js_1['filterJestVitest'])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0x112)))return _0x596d36(_0x56deda(0x108),(0x0,rust_1[_0x56deda(0xec)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x110))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x102))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xb4)))return _0x596d36(_0x56deda(0x108),(0x0,rust_1[_0x56deda(0xf5)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)]('go\x20test'))return _0x596d36('filter',(0x0,go_1[_0x56deda(0xbc)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xf9)))return _0x596d36('filter',(0x0,go_1[_0x56deda(0xe1)])(_0x4796d9));if(_0x1cfaf0['match'](/docker\s+ps/))return _0x596d36(_0x56deda(0x108),(0x0,devops_1[_0x56deda(0xd0)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/docker\s+images/))return _0x596d36(_0x56deda(0x108),(0x0,devops_1['filterDockerImages'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/docker\s+logs/))return _0x596d36(_0x56deda(0x108),(0x0,devops_1[_0x56deda(0xe0)])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0x106))){const _0x5257b7=_0x1cfaf0['match'](/kubectl\s+(get|logs|describe|apply)/),_0x5e18a7=_0x5257b7?_0x5257b7[0x1]:_0x56deda(0xfe);return _0x596d36(_0x56deda(0x108),(0x0,devops_1[_0x56deda(0xc3)])(_0x4796d9,_0x5e18a7));}if(_0x1cfaf0[_0x56deda(0xe6)](/^(ls|dir)(\s|$)/)||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x10a))||_0x1cfaf0[_0x56deda(0x105)](_0x56deda(0xc1)))return _0x596d36(_0x56deda(0x108),(0x0,shell_1['filterLs'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/^tree(\s|$)/)||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xea))||_0x1cfaf0[_0x56deda(0x105)]('\x20tree'))return _0x596d36(_0x56deda(0x108),(0x0,shell_1[_0x56deda(0xd4)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x5046fd=(0x0,shell_1[_0x56deda(0xed)])(_0x4796d9,_0x55f38e);if(_0x5046fd[_0x56deda(0xd7)]('[lock\x20file]'))_0x1c3f8b['push']('lock');else{if(_0x5046fd['includes'](_0x56deda(0xdc))||_0x5046fd[_0x56deda(0xd7)](_0x56deda(0x119)))_0x1c3f8b[_0x56deda(0xd1)](_0x56deda(0xe2));else{if(_0x5046fd[_0x56deda(0xd7)]('[code\x20skeleton]'))_0x1c3f8b['push'](_0x56deda(0xf8));else{if(_0x5046fd[_0x56deda(0xd7)]('|\x20')&&_0x5046fd[_0x56deda(0xd7)](_0x56deda(0xe5))&&_0x5046fd[_0x56deda(0xc6)]<_0x4796d9[_0x56deda(0xc6)]*0.5)_0x1c3f8b[_0x56deda(0xd1)]('json_crusher');else{if(_0x5046fd['includes']('lines\x20truncated'))_0x1c3f8b[_0x56deda(0xd1)]('filter');}}}}if(_0x5046fd[_0x56deda(0xc6)]<_0x4796d9[_0x56deda(0xc6)]&&!_0x1c3f8b[_0x56deda(0x114)](_0x3f1f34=>_0x3f1f34!=='ansi_strip'&&_0x3f1f34!==_0x56deda(0xdb)))_0x1c3f8b[_0x56deda(0xd1)](_0x56deda(0x108));return exports[_0x56deda(0x101)]=_0x1c3f8b,_0x5046fd;}if(_0x1cfaf0[_0x56deda(0xe6)](/^find(\s|$)/))return _0x596d36(_0x56deda(0x108),(0x0,shell_1['filterFind'])(_0x4796d9));if(_0x1cfaf0['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x596d36(_0x56deda(0x108),(0x0,shell_1[_0x56deda(0xe7)])(_0x4796d9));}}catch(_0x3c44c0){}return isFeatureEnabled('whitespace')&&(_0x4796d9=(0x0,generic_1['collapseWhitespace'])(_0x4796d9),_0x1c3f8b[_0x56deda(0xd1)]('whitespace')),_0x4796d9=(0x0,generic_1[_0x56deda(0x11a)])(_0x4796d9),_0x4796d9=(0x0,generic_1[_0x56deda(0x111)])(_0x4796d9,0x4e20),exports[_0x56deda(0x101)]=_0x1c3f8b,_0x4796d9;}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_0x13e196(0xdd)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x13e196(0x116)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x13e196(0xda)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x13e196(0xfb)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x13e196(0xcf)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':a0_0x13e196(0xef)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x13e196(0xf0)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x13e196(0xf4)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x13e196(0xf7)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x13e196(0x10c)},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x13e196(0xd3)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x13e196(0xfa)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':'trim\x20pytest'},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x13e196(0x10b)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x13e196(0xbe)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x13e196(0x10e)}];function rewriteCommand(_0x4e2f3b){const _0x31ef2c=a0_0x13e196,_0x326e98=_0x4e2f3b[_0x31ef2c(0xb6)]();if(_0x326e98[_0x31ef2c(0xf6)](_0x31ef2c(0xc8)))return _0x326e98;for(const _0xf16fa of REWRITE_RULES){if(_0xf16fa[_0x31ef2c(0x103)]['test'](_0x326e98))return _0x31ef2c(0xc8)+_0x326e98;}return _0x326e98;}
|
|
1
|
+
'use strict';const a0_0x435292=a0_0x257b;(function(_0x18c151,_0x579bd3){const _0x3abecd=a0_0x257b,_0x170069=_0x18c151();while(!![]){try{const _0x551e75=parseInt(_0x3abecd(0x258))/0x1*(-parseInt(_0x3abecd(0x246))/0x2)+-parseInt(_0x3abecd(0x242))/0x3+-parseInt(_0x3abecd(0x1ff))/0x4*(-parseInt(_0x3abecd(0x20d))/0x5)+-parseInt(_0x3abecd(0x235))/0x6+-parseInt(_0x3abecd(0x234))/0x7*(-parseInt(_0x3abecd(0x203))/0x8)+-parseInt(_0x3abecd(0x250))/0x9*(parseInt(_0x3abecd(0x21d))/0xa)+parseInt(_0x3abecd(0x221))/0xb;if(_0x551e75===_0x579bd3)break;else _0x170069['push'](_0x170069['shift']());}catch(_0x30f41b){_0x170069['push'](_0x170069['shift']());}}}(a0_0x101d,0x7ef85));Object[a0_0x435292(0x217)](exports,a0_0x435292(0x1ef),{'value':!![]}),exports['lastFeatures']=exports[a0_0x435292(0x22a)]=void 0x0,exports[a0_0x435292(0x241)]=compressOutput,exports[a0_0x435292(0x230)]=rewriteCommand;const generic_1=require(a0_0x435292(0x233)),git_1=require(a0_0x435292(0x220)),python_1=require(a0_0x435292(0x20f)),js_1=require(a0_0x435292(0x23b)),shell_1=require('./shell'),rust_1=require(a0_0x435292(0x215)),go_1=require(a0_0x435292(0x21e)),devops_1=require(a0_0x435292(0x208)),redactor_1=require('../redactor'),tracker_1=require('../tracker');exports[a0_0x435292(0x22a)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x435292(0x1f9)]=[];function isFeatureEnabled(_0x432c78){const _0x10deb9=a0_0x435292;try{const _0xcbf01a=tracker_1[_0x10deb9(0x24f)][_0x10deb9(0x257)](),_0x287b20=_0xcbf01a['features_enabled'];if(!_0x287b20||_0x287b20[_0x432c78]===undefined)return!![];return _0x287b20[_0x432c78]!==![];}catch{return!![];}}function compressOutput(_0x3e8902,_0x2a37b9,_0x3bb29c,_0x219d42=!![]){const _0x4c2663=a0_0x435292,_0x298a55=_0x3e8902[_0x4c2663(0x228)]();let _0x264969=_0x2a37b9;_0x3bb29c[_0x4c2663(0x228)]()[_0x4c2663(0x207)]>0x0&&(_0x264969=_0x2a37b9+'\x0a'+_0x3bb29c);let _0x302439=isFeatureEnabled(_0x4c2663(0x216))?(0x0,generic_1[_0x4c2663(0x205)])(_0x264969):_0x264969;const _0x187491=[];if(_0x302439['length']<_0x264969[_0x4c2663(0x207)])_0x187491['push']('ansi_strip');const _0x2579b3=(_0x8a3ef8,_0x8ac28a)=>{const _0x37bfc7=_0x4c2663;return _0x187491[_0x37bfc7(0x23d)](_0x8a3ef8),exports[_0x37bfc7(0x1f9)]=_0x187491,_0x8ac28a;};if(_0x219d42&&isFeatureEnabled('redact')){const _0x57c443=redactor_1[_0x4c2663(0x23e)][_0x4c2663(0x251)](_0x302439);_0x302439=_0x57c443['text'],exports[_0x4c2663(0x22a)]={'secretsFound':_0x57c443[_0x4c2663(0x21a)],'secretTypes':_0x57c443[_0x4c2663(0x1f0)]};if(_0x57c443['secretsFound']>0x0)_0x187491[_0x4c2663(0x23d)](_0x4c2663(0x21c));}else exports[_0x4c2663(0x22a)]={'secretsFound':0x0,'secretTypes':[]};const _0x31b0b2=_0x298a55[_0x4c2663(0x20c)](),_0x3d3f80=isFeatureEnabled(_0x4c2663(0x1f8));try{if(_0x3d3f80){if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x204))||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x1ee)))return _0x2579b3('filter',(0x0,git_1[_0x4c2663(0x227)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x212))||_0x31b0b2[_0x4c2663(0x200)]('yadm\x20log'))return _0x2579b3(_0x4c2663(0x1f8),(0x0,git_1['filterGitLog'])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x210))||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x23f))||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x21f)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,git_1['filterGitDiff'])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x22e))||_0x31b0b2['match'](/python3?\s+-m\s+pytest/))return _0x2579b3(_0x4c2663(0x1f8),(0x0,python_1[_0x4c2663(0x224)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x1f1))||_0x31b0b2['includes'](_0x4c2663(0x1f6)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,python_1[_0x4c2663(0x238)])(_0x302439));if(_0x31b0b2['includes']('ruff\x20check')||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x226)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,devops_1['filterRuff'])(_0x302439));if(_0x31b0b2['includes']('npm\x20install')||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x22f))||_0x31b0b2['endsWith'](_0x4c2663(0x248))||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x20b))||_0x31b0b2[_0x4c2663(0x200)]('yarn\x20install'))return _0x2579b3(_0x4c2663(0x1f8),(0x0,js_1['filterNpmInstall'])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x240))||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x252)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,js_1[_0x4c2663(0x1f4)])(_0x302439));if(_0x31b0b2['includes'](_0x4c2663(0x23c))||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x245))||_0x31b0b2['includes']('yarn\x20test')||_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x231)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,js_1[_0x4c2663(0x1f4)])(_0x302439));if(_0x31b0b2['includes'](_0x4c2663(0x206)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,rust_1[_0x4c2663(0x229)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x1fb))||_0x31b0b2['includes'](_0x4c2663(0x211))||_0x31b0b2['includes']('cargo\x20clippy'))return _0x2579b3(_0x4c2663(0x1f8),(0x0,rust_1[_0x4c2663(0x218)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)]('go\x20test'))return _0x2579b3(_0x4c2663(0x1f8),(0x0,go_1['filterGoTest'])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x22b)))return _0x2579b3(_0x4c2663(0x1f8),(0x0,go_1['filterGoVet'])(_0x302439));if(_0x31b0b2['match'](/docker\s+ps/))return _0x2579b3('filter',(0x0,devops_1[_0x4c2663(0x247)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x24d)](/docker\s+images/))return _0x2579b3('filter',(0x0,devops_1[_0x4c2663(0x24e)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x24d)](/docker\s+logs/))return _0x2579b3('filter',(0x0,devops_1['filterDockerLogs'])(_0x302439));if(_0x31b0b2[_0x4c2663(0x200)](_0x4c2663(0x1fc))){const _0x273380=_0x31b0b2[_0x4c2663(0x24d)](/kubectl\s+(get|logs|describe|apply)/),_0x2c2050=_0x273380?_0x273380[0x1]:_0x4c2663(0x20e);return _0x2579b3(_0x4c2663(0x1f8),(0x0,devops_1[_0x4c2663(0x236)])(_0x302439,_0x2c2050));}if(_0x31b0b2[_0x4c2663(0x24d)](/^(ls|dir)(\s|$)/)||_0x31b0b2['includes'](_0x4c2663(0x22d))||_0x31b0b2[_0x4c2663(0x243)](_0x4c2663(0x219)))return _0x2579b3('filter',(0x0,shell_1[_0x4c2663(0x24c)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x24d)](/^tree(\s|$)/)||_0x31b0b2[_0x4c2663(0x200)]('\x20tree\x20')||_0x31b0b2['endsWith']('\x20tree'))return _0x2579b3('filter',(0x0,shell_1[_0x4c2663(0x209)])(_0x302439));if(_0x31b0b2[_0x4c2663(0x24d)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x24e0a3=(0x0,shell_1['filterCat'])(_0x302439,_0x298a55);if(_0x24e0a3[_0x4c2663(0x200)](_0x4c2663(0x20a)))_0x187491[_0x4c2663(0x23d)](_0x4c2663(0x1f5));else{if(_0x24e0a3['includes'](_0x4c2663(0x256))||_0x24e0a3[_0x4c2663(0x200)]('[minified\x20file]'))_0x187491[_0x4c2663(0x23d)]('binary');else{if(_0x24e0a3['includes'](_0x4c2663(0x1f7)))_0x187491[_0x4c2663(0x23d)]('skeleton');else{if(_0x24e0a3[_0x4c2663(0x200)]('|\x20')&&_0x24e0a3['includes'](_0x4c2663(0x1fa))&&_0x24e0a3[_0x4c2663(0x207)]<_0x302439[_0x4c2663(0x207)]*0.5)_0x187491[_0x4c2663(0x23d)](_0x4c2663(0x21b));else{if(_0x24e0a3[_0x4c2663(0x200)]('lines\x20truncated'))_0x187491['push'](_0x4c2663(0x1f8));}}}}if(_0x24e0a3['length']<_0x302439[_0x4c2663(0x207)]&&!_0x187491[_0x4c2663(0x237)](_0x4ca836=>_0x4ca836!==_0x4c2663(0x216)&&_0x4ca836!==_0x4c2663(0x21c)))_0x187491[_0x4c2663(0x23d)](_0x4c2663(0x1f8));return exports['lastFeatures']=_0x187491,_0x24e0a3;}if(_0x31b0b2[_0x4c2663(0x24d)](/^find(\s|$)/))return _0x2579b3('filter',(0x0,shell_1['filterFind'])(_0x302439));if(_0x31b0b2[_0x4c2663(0x24d)](/^(grep|rg|ripgrep)(\s|$)/))return _0x2579b3(_0x4c2663(0x1f8),(0x0,shell_1[_0x4c2663(0x23a)])(_0x302439));}}catch(_0x2c5e37){}return isFeatureEnabled(_0x4c2663(0x1fd))&&(_0x302439=(0x0,generic_1[_0x4c2663(0x1fe)])(_0x302439),_0x187491['push'](_0x4c2663(0x1fd))),_0x302439=(0x0,generic_1[_0x4c2663(0x232)])(_0x302439),_0x302439=(0x0,generic_1[_0x4c2663(0x1f3)])(_0x302439,0x4e20),exports[_0x4c2663(0x1f9)]=_0x187491,_0x302439;}function a0_0x257b(_0x4d53a,_0x59d846){_0x4d53a=_0x4d53a-0x1ee;const _0x101d04=a0_0x101d();let _0x257b43=_0x101d04[_0x4d53a];return _0x257b43;}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_0x435292(0x254)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':'trim\x20gh'},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x435292(0x24a)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x435292(0x22c)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x435292(0x244)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x435292(0x255)},{'pattern':/^npx\s+/,'prefix':'trim\x20npx'},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x435292(0x213)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':a0_0x435292(0x1f2)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x435292(0x201)},{'pattern':/^find\s+/,'prefix':a0_0x435292(0x202)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x435292(0x249)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x435292(0x239)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x435292(0x253)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x435292(0x24b)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x435292(0x222)},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function a0_0x101d(){const _0xd14b47=['pip3\x20install','[code\x20skeleton]','filter','lastFeatures','---','cargo\x20build','kubectl','whitespace','collapseWhitespace','56UfIdfn','includes','trim\x20tree','trim\x20find','680SURsGQ','git\x20status','stripAnsi','cargo\x20test','length','./devops','filterTree','[lock\x20file]','pnpm\x20install','toLowerCase','144465KpkIiS','get','./python','git\x20diff','cargo\x20check','git\x20log','trim\x20read','pattern','./rust','ansi_strip','defineProperty','filterCargoBuild','\x20ls','secretsFound','json_crusher','redact','15440LPlNOA','./go','yadm\x20diff','./git','13796684UowLze','trim\x20pip','test','filterPytest','trim\x20','ruff\x20','filterGitStatus','trim','filterCargoTest','lastRedactAudit','go\x20vet','trim\x20cargo','\x20ls\x20','pytest','npm\x20i\x20','rewriteCommand','npm\x20run\x20test','collapseDuplicates','./generic','81046ZtjAxu','2587446wEsqbY','filterKubectl','some','filterPipInstall','trim\x20kubectl','filterGrep','./js','npm\x20test','push','redactor','git\x20show','jest','compressOutput','2052666iWaTnD','endsWith','trim\x20pnpm','pnpm\x20test','8EtGRvM','filterDockerPs','npm\x20i','trim\x20docker','trim\x20glab','trim\x20ruff','filterLs','match','filterDockerImages','tracker','2763EeKkqP','redactWithAudit','vitest','trim\x20pytest','trim\x20git','trim\x20npm','[binary','getConfig','133334wbLLmk','startsWith','yadm\x20status','__esModule','secretTypes','pip\x20install','trim\x20ls','softTruncate','filterJestVitest','lock'];a0_0x101d=function(){return _0xd14b47;};return a0_0x101d();}function rewriteCommand(_0x58f2c2){const _0x3f9819=a0_0x435292,_0x12a849=_0x58f2c2[_0x3f9819(0x228)]();if(_0x12a849[_0x3f9819(0x259)](_0x3f9819(0x225)))return _0x12a849;for(const _0xdc38fb of REWRITE_RULES){if(_0xdc38fb[_0x3f9819(0x214)][_0x3f9819(0x223)](_0x12a849))return'trim\x20'+_0x12a849;}return _0x12a849;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x47ceb8=a0_0x3b87;(function(_0x19cff3,_0xded03c){const _0x5c2692=a0_0x3b87,_0x2ac90e=_0x19cff3();while(!![]){try{const _0x5ab45f=-parseInt(_0x5c2692(0xe0))/0x1*(-parseInt(_0x5c2692(0xc9))/0x2)+-parseInt(_0x5c2692(0xe7))/0x3+parseInt(_0x5c2692(0xe2))/0x4+parseInt(_0x5c2692(0xc7))/0x5+-parseInt(_0x5c2692(0xe3))/0x6*(parseInt(_0x5c2692(0xd9))/0x7)+-parseInt(_0x5c2692(0xd8))/0x8+parseInt(_0x5c2692(0xd3))/0x9;if(_0x5ab45f===_0xded03c)break;else _0x2ac90e['push'](_0x2ac90e['shift']());}catch(_0xb63bcf){_0x2ac90e['push'](_0x2ac90e['shift']());}}}(a0_0xcf19,0x351b5));function a0_0x3b87(_0x352cb9,_0x2397a9){_0x352cb9=_0x352cb9-0xc1;const _0xcf1940=a0_0xcf19();let _0x3b87c5=_0xcf1940[_0x352cb9];return _0x3b87c5;}Object['defineProperty'](exports,a0_0x47ceb8(0xdb),{'value':!![]}),exports[a0_0x47ceb8(0xd2)]=filterNpmInstall,exports['filterJestVitest']=filterJestVitest;function filterNpmInstall(_0x56a60e){const _0x5dd378=a0_0x47ceb8,_0x4a948a=_0x56a60e[_0x5dd378(0xcd)](/\r/g,'\x0a'),_0x4ccd31=_0x4a948a[_0x5dd378(0xde)]('\x0a'),_0x3c9b8f=[];for(const _0x100c33 of _0x4ccd31){const _0x3f0b44=_0x100c33[_0x5dd378(0xd7)]();(_0x3f0b44[_0x5dd378(0xe5)](_0x5dd378(0xcc))||_0x3f0b44['includes'](_0x5dd378(0xd6))||_0x3f0b44[_0x5dd378(0xe5)](_0x5dd378(0xc6))||_0x3f0b44[_0x5dd378(0xe5)](_0x5dd378(0xd4))||_0x3f0b44[_0x5dd378(0xe5)]('found\x20'))&&(!_0x3f0b44['includes']('%')&&!_0x3f0b44['startsWith']('⠋')&&!_0x3f0b44[_0x5dd378(0xdd)]('⠙')&&_0x3c9b8f['push'](_0x3f0b44));}const _0x2d3af0=_0x3c9b8f[_0x5dd378(0xda)]('\x0a')['trim']();return _0x2d3af0[_0x5dd378(0xdf)]>0x0?_0x2d3af0:_0x5dd378(0xc8);}function a0_0xcf19(){const _0x12d26e=['added\x20','replace','match','slice','\x0aFailures:','FAIL','filterNpmInstall','127836XQCUpx','up\x20to\x20date','\x20passed','removed\x20','trim','3186784HhSbAq','5138JfzuBR','join','__esModule','Tests:','startsWith','split','length','5ldsQGP','\x20passed,\x20','860760mtpZVx','498bpnMPN','PASS','includes','push','311073YRHAqO','\x20\x20...\x20(','FAIL\x20\x20','\x20total)','all','Test\x20Files:','audited\x20','924885FTjHfg','NPM:\x20Packages\x20verified/installed\x20successfully','146446nOgyby','Test\x20Runner:\x20','Test\x20Suites:'];a0_0xcf19=function(){return _0x12d26e;};return a0_0xcf19();}function filterJestVitest(_0x2b8551){const _0x147314=a0_0x47ceb8,_0xd0d3e=_0x2b8551['split']('\x0a');let _0x3dc558=0x0,_0x35817a=0x0,_0x4614cb=0x0;const _0x1dd1f2=[];let _0x50e76f=![];for(const _0x3e26a4 of _0xd0d3e){const _0x31717a=_0x3e26a4['trim']();if(_0x31717a['startsWith'](_0x147314(0xdc))||_0x31717a['includes'](_0x147314(0xc5))){const _0x73c19b=_0x31717a['match'](/(\d+)\s+passed/),_0x23c44b=_0x31717a[_0x147314(0xce)](/(\d+)\s+failed/),_0x5d46ec=_0x31717a['match'](/(\d+)\s+total/);if(_0x73c19b)_0x3dc558=parseInt(_0x73c19b[0x1]);if(_0x23c44b)_0x35817a=parseInt(_0x23c44b[0x1]);if(_0x5d46ec)_0x4614cb=parseInt(_0x5d46ec[0x1]);continue;}(_0x31717a[_0x147314(0xdd)]('❯')||_0x31717a[_0x147314(0xdd)]('●')||_0x31717a[_0x147314(0xdd)](_0x147314(0xc2)))&&(_0x50e76f=!![]),_0x50e76f&&(_0x31717a[_0x147314(0xdf)]>0x0&&!_0x31717a['startsWith'](_0x147314(0xcb))&&!_0x31717a[_0x147314(0xdd)](_0x147314(0xdc))&&_0x1dd1f2['push'](_0x3e26a4));}if(_0x4614cb===0x0&&_0x3dc558===0x0&&_0x35817a===0x0){if(_0x2b8551[_0x147314(0xe5)](_0x147314(0xe4))&&!_0x2b8551['includes'](_0x147314(0xd1))){const _0x388144=_0x2b8551['match'](/(\d+)\s+passed/),_0xfc116c=_0x388144?_0x388144[0x1]:_0x147314(0xc4);return'Test\x20Runner:\x20'+_0xfc116c+_0x147314(0xd5);}return _0x2b8551;}if(_0x35817a===0x0&&_0x3dc558>0x0)return _0x147314(0xca)+_0x3dc558+_0x147314(0xd5);const _0x40a487=[_0x147314(0xca)+_0x3dc558+_0x147314(0xe1)+_0x35817a+'\x20failed\x20('+_0x4614cb+_0x147314(0xc3)];if(_0x1dd1f2[_0x147314(0xdf)]>0x0){_0x40a487[_0x147314(0xe6)](_0x147314(0xd0));const _0x16f2b0=0x19,_0x6b102c=_0x1dd1f2[_0x147314(0xcf)](0x0,_0x16f2b0);for(const _0x2d98ea of _0x6b102c){_0x40a487['push']('\x20\x20'+_0x2d98ea);}_0x1dd1f2[_0x147314(0xdf)]>_0x16f2b0&&_0x40a487[_0x147314(0xe6)](_0x147314(0xc1)+(_0x1dd1f2[_0x147314(0xdf)]-_0x16f2b0)+'\x20lines\x20of\x20trace\x20details\x20truncated)');}return _0x40a487['join']('\x0a');}
|