trimprompt 1.0.36 → 1.0.38
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 +14 -0
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/hooks/claude-hook.js +1 -1
- package/index.html +10 -10
- package/mcp.js +1 -1
- package/package.json +3 -4
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/file-watcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1eccfc=a0_0x1fa3;(function(_0x3b8ad5,_0x49c718){const _0x5ccbdb=a0_0x1fa3,_0x1c19af=_0x3b8ad5();while(!![]){try{const _0x1f7458=-parseInt(_0x5ccbdb(0x1ec))/0x1+parseInt(_0x5ccbdb(0x241))/0x2*(-parseInt(_0x5ccbdb(0x27d))/0x3)+-parseInt(_0x5ccbdb(0x228))/0x4*(-parseInt(_0x5ccbdb(0x1f6))/0x5)+parseInt(_0x5ccbdb(0x26b))/0x6+parseInt(_0x5ccbdb(0x268))/0x7*(-parseInt(_0x5ccbdb(0x22d))/0x8)+-parseInt(_0x5ccbdb(0x243))/0x9*(parseInt(_0x5ccbdb(0x1fe))/0xa)+parseInt(_0x5ccbdb(0x224))/0xb;if(_0x1f7458===_0x49c718)break;else _0x1c19af['push'](_0x1c19af['shift']());}catch(_0x50fc50){_0x1c19af['push'](_0x1c19af['shift']());}}}(a0_0x187c,0xa2eb8));function a0_0x1fa3(_0x512080,_0x811c09){_0x512080=_0x512080-0x1e2;const _0x187cc0=a0_0x187c();let _0x1fa3b2=_0x187cc0[_0x512080];return _0x1fa3b2;}var __createBinding=this&&this[a0_0x1eccfc(0x273)]||(Object[a0_0x1eccfc(0x281)]?function(_0x4e27a5,_0xbf3493,_0x4dd7c2,_0x1f28b1){const _0x452e3b=a0_0x1eccfc;if(_0x1f28b1===undefined)_0x1f28b1=_0x4dd7c2;var _0x10e9f8=Object[_0x452e3b(0x242)](_0xbf3493,_0x4dd7c2);(!_0x10e9f8||(_0x452e3b(0x29b)in _0x10e9f8?!_0xbf3493['__esModule']:_0x10e9f8[_0x452e3b(0x1f5)]||_0x10e9f8[_0x452e3b(0x1f4)]))&&(_0x10e9f8={'enumerable':!![],'get':function(){return _0xbf3493[_0x4dd7c2];}}),Object['defineProperty'](_0x4e27a5,_0x1f28b1,_0x10e9f8);}:function(_0x322050,_0x156f3e,_0x4159ef,_0x50f90c){if(_0x50f90c===undefined)_0x50f90c=_0x4159ef;_0x322050[_0x50f90c]=_0x156f3e[_0x4159ef];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x1eccfc(0x281)]?function(_0x5ca41f,_0x57e1d0){const _0x5c0961=a0_0x1eccfc;Object['defineProperty'](_0x5ca41f,_0x5c0961(0x297),{'enumerable':!![],'value':_0x57e1d0});}:function(_0x4202d3,_0xee872c){const _0x4b9a97=a0_0x1eccfc;_0x4202d3[_0x4b9a97(0x297)]=_0xee872c;}),__importStar=this&&this[a0_0x1eccfc(0x211)]||(function(){var _0x4b142c=function(_0x4cc29f){const _0x1ceeb9=a0_0x1fa3;return _0x4b142c=Object[_0x1ceeb9(0x24c)]||function(_0x5e2fda){const _0x4595cd=_0x1ceeb9;var _0x271240=[];for(var _0x250a22 in _0x5e2fda)if(Object[_0x4595cd(0x1ea)][_0x4595cd(0x27a)][_0x4595cd(0x222)](_0x5e2fda,_0x250a22))_0x271240[_0x271240[_0x4595cd(0x22c)]]=_0x250a22;return _0x271240;},_0x4b142c(_0x4cc29f);};return function(_0x5183bc){const _0x42f9da=a0_0x1fa3;if(_0x5183bc&&_0x5183bc['__esModule'])return _0x5183bc;var _0x4c5bf3={};if(_0x5183bc!=null){for(var _0x231c5e=_0x4b142c(_0x5183bc),_0x190460=0x0;_0x190460<_0x231c5e[_0x42f9da(0x22c)];_0x190460++)if(_0x231c5e[_0x190460]!==_0x42f9da(0x297))__createBinding(_0x4c5bf3,_0x5183bc,_0x231c5e[_0x190460]);}return __setModuleDefault(_0x4c5bf3,_0x5183bc),_0x4c5bf3;};}());Object[a0_0x1eccfc(0x24f)](exports,a0_0x1eccfc(0x225),{'value':!![]}),exports[a0_0x1eccfc(0x266)]=loadConfig,exports[a0_0x1eccfc(0x289)]=saveConfig,exports[a0_0x1eccfc(0x26e)]=getAgentStoragePaths,exports[a0_0x1eccfc(0x29e)]=getLatestSessionFile,exports[a0_0x1eccfc(0x23d)]=loadSessionsState,exports[a0_0x1eccfc(0x1fa)]=saveSessionStateItem,exports[a0_0x1eccfc(0x1e4)]=processSessionFile,exports[a0_0x1eccfc(0x21e)]=compactSessionCopy,exports[a0_0x1eccfc(0x271)]=compactLiveSession,exports[a0_0x1eccfc(0x238)]=installWindowsStartupService,exports['startWatcherDaemon']=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1eccfc(0x279))),os=__importStar(require('os')),cache_manager_1=require('./cache-manager'),tracker_1=require(a0_0x1eccfc(0x219)),baseDir=path[a0_0x1eccfc(0x23c)](os[a0_0x1eccfc(0x233)](),a0_0x1eccfc(0x28d)),configPath=path['join'](baseDir,a0_0x1eccfc(0x245)),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 _0x3fe86c=a0_0x1eccfc;try{if(!fs['existsSync'](baseDir))fs[_0x3fe86c(0x275)](baseDir,{'recursive':!![]});if(fs[_0x3fe86c(0x28b)](configPath)){const _0x5180f8=JSON[_0x3fe86c(0x248)](fs[_0x3fe86c(0x274)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x5180f8,'conversation_toggles':{...DEFAULT_CONFIG[_0x3fe86c(0x200)],..._0x5180f8[_0x3fe86c(0x200)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x3fe86c(0x258)],..._0x5180f8[_0x3fe86c(0x258)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x4f35a0){const _0x9f73a5=a0_0x1eccfc,_0x6f23f=loadConfig(),_0x1cd67e={..._0x6f23f,..._0x4f35a0,'conversation_toggles':{..._0x6f23f[_0x9f73a5(0x200)],..._0x4f35a0[_0x9f73a5(0x200)]||{}},'custom_storage_paths':{..._0x6f23f[_0x9f73a5(0x258)],..._0x4f35a0['custom_storage_paths']||{}}};try{if(!fs[_0x9f73a5(0x28b)](baseDir))fs[_0x9f73a5(0x275)](baseDir,{'recursive':!![]});fs['writeFileSync'](configPath,JSON[_0x9f73a5(0x26d)](_0x1cd67e,null,0x2),'utf8');}catch{}return _0x1cd67e;}function getAgentStoragePaths(_0x360bc7){const _0x4a52e1=a0_0x1eccfc,_0x22d4e8=loadConfig(),_0x2e23b4=_0x22d4e8['custom_storage_paths'][_0x360bc7];if(_0x2e23b4&&fs[_0x4a52e1(0x28b)](_0x2e23b4))return[_0x2e23b4];const _0x291797=os['homedir'](),_0x1bc9ba=process[_0x4a52e1(0x247)]==='win32',_0x4a1d81=process[_0x4a52e1(0x247)]==='darwin';switch(_0x360bc7){case _0x4a52e1(0x208):return[path[_0x4a52e1(0x23c)](_0x291797,'.claude',_0x4a52e1(0x235)),path[_0x4a52e1(0x23c)](_0x291797,'.claude',_0x4a52e1(0x254))];case _0x4a52e1(0x269):return[path['join'](_0x291797,'.codex',_0x4a52e1(0x257)),path['join'](_0x291797,_0x4a52e1(0x21c),_0x4a52e1(0x265),_0x4a52e1(0x231))];case _0x4a52e1(0x1fc):case _0x4a52e1(0x263):return[path[_0x4a52e1(0x23c)](_0x291797,_0x4a52e1(0x239),_0x4a52e1(0x263)),path[_0x4a52e1(0x23c)](_0x291797,_0x4a52e1(0x239)),path['join'](_0x291797,_0x4a52e1(0x21c),_0x4a52e1(0x265),_0x4a52e1(0x1f1)),path['join'](_0x291797,_0x4a52e1(0x1f8),_0x4a52e1(0x1fc))];case'cursor':if(_0x1bc9ba)return[path[_0x4a52e1(0x23c)](_0x291797,_0x4a52e1(0x21c),'Roaming',_0x4a52e1(0x1e9),_0x4a52e1(0x20d),_0x4a52e1(0x291))];if(_0x4a1d81)return[path[_0x4a52e1(0x23c)](_0x291797,'Library',_0x4a52e1(0x207),_0x4a52e1(0x1e9),'User',_0x4a52e1(0x291))];return[path[_0x4a52e1(0x23c)](_0x291797,_0x4a52e1(0x1f8),_0x4a52e1(0x1e9),_0x4a52e1(0x20d),_0x4a52e1(0x291))];case _0x4a52e1(0x299):return[process['cwd'](),path[_0x4a52e1(0x23c)](_0x291797,_0x4a52e1(0x287))];case'copilot':if(_0x1bc9ba)return[path[_0x4a52e1(0x23c)](_0x291797,_0x4a52e1(0x21c),'Local',_0x4a52e1(0x28f))];return[path[_0x4a52e1(0x23c)](_0x291797,'.config','github-copilot-cli')];case _0x4a52e1(0x20f):return[path['join'](_0x291797,_0x4a52e1(0x23b),_0x4a52e1(0x218)),path[_0x4a52e1(0x23c)](process['cwd'](),_0x4a52e1(0x23b),_0x4a52e1(0x234))];case _0x4a52e1(0x210):return[path[_0x4a52e1(0x23c)](_0x291797,'.opencode',_0x4a52e1(0x257))];case'cortex':return[path['join'](_0x291797,_0x4a52e1(0x217),_0x4a52e1(0x288))];default:return[];}}function getLatestSessionFile(_0x60939f){const _0x1c9b1c=a0_0x1eccfc,_0x2c1662=getAgentStoragePaths(_0x60939f);let _0xd918b9=null,_0x5dba1f=0x0,_0x20ec8c=null,_0x5ab1d8=null;for(const _0x1fe9b0 of _0x2c1662){if(fs['existsSync'](_0x1fe9b0)){if(!_0x5ab1d8)_0x5ab1d8=_0x1fe9b0;const _0x2312e9=(_0x2eb9f6,_0x5b8bd5=0x0)=>{const _0x47e789=a0_0x1fa3;if(_0x5b8bd5>0x6)return;try{const _0x40a98e=fs[_0x47e789(0x2a2)](_0x2eb9f6,{'withFileTypes':!![]});for(const _0x554b8c of _0x40a98e){const _0x30652f=path['join'](_0x2eb9f6,_0x554b8c[_0x47e789(0x2a1)]);if(_0x554b8c[_0x47e789(0x249)]()){const _0x2727ed=_0x554b8c[_0x47e789(0x2a1)][_0x47e789(0x280)]();if(_0x2727ed===_0x47e789(0x22e)||_0x2727ed===_0x47e789(0x1eb)||_0x2727ed===_0x47e789(0x295)||_0x2727ed===_0x47e789(0x252)||_0x2727ed===_0x47e789(0x22f)||_0x2727ed===_0x47e789(0x246)||_0x2727ed===_0x47e789(0x227)||_0x2727ed===_0x47e789(0x24e)||_0x2727ed===_0x47e789(0x293)||_0x2727ed===_0x47e789(0x250)||_0x2727ed===_0x47e789(0x232))continue;_0x2312e9(_0x30652f,_0x5b8bd5+0x1);}else{if(_0x554b8c['isFile']()&&!_0x554b8c[_0x47e789(0x2a1)][_0x47e789(0x27f)]('.')){const _0x57520e=_0x554b8c['name'][_0x47e789(0x280)]();if(_0x57520e['includes'](_0x47e789(0x204))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x230))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x22b))||_0x57520e['endsWith'](_0x47e789(0x20e))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x256))||_0x57520e[_0x47e789(0x26a)]('.jpeg')||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x264))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x267))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x284))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x253))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x1f3))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x24d))||_0x57520e[_0x47e789(0x26a)](_0x47e789(0x28c))||_0x57520e[_0x47e789(0x26a)]('.dat')||_0x57520e[_0x47e789(0x27f)](_0x47e789(0x24a))||_0x57520e[_0x47e789(0x27f)](_0x47e789(0x28a)))continue;const _0x39852c=fs[_0x47e789(0x209)](_0x30652f);_0x39852c[_0x47e789(0x292)]>_0x5dba1f&&(_0x5dba1f=_0x39852c[_0x47e789(0x292)],_0xd918b9=_0x554b8c[_0x47e789(0x2a1)],_0x20ec8c=_0x30652f,_0x5ab1d8=_0x1fe9b0);}}}}catch{}};_0x2312e9(_0x1fe9b0);}}return{'fileName':_0xd918b9,'lastModified':_0x5dba1f>0x0?new Date(_0x5dba1f)[_0x1c9b1c(0x2a0)]():null,'fullPath':_0x20ec8c,'dirPath':_0x5ab1d8};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x2a45c8,_0x55534c,_0x491a06){const _0x117e5b=a0_0x1eccfc;let _0x44c771=![],_0x58c29a=0x0;if(!_0x2a45c8)return{'modified':_0x44c771,'savedTokens':_0x58c29a};const _0x401ad0=_0x1860d7=>_0x1860d7[_0x117e5b(0x214)](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x2a45c8[_0x117e5b(0x277)]==='string'){let _0xbe76a5=_0x2a45c8[_0x117e5b(0x277)],_0x4bd22d=_0x401ad0(_0xbe76a5);_0x4bd22d[_0x117e5b(0x22c)]<_0xbe76a5[_0x117e5b(0x22c)]&&(_0x2a45c8[_0x117e5b(0x277)]=_0x4bd22d,_0x44c771=!![],_0x58c29a+=Math[_0x117e5b(0x23f)]((_0xbe76a5[_0x117e5b(0x22c)]-_0x4bd22d[_0x117e5b(0x22c)])/0x4));if(_0x2a45c8['content'][_0x117e5b(0x22c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x2a45c8[_0x117e5b(0x277)][_0x117e5b(0x20b)](_0x117e5b(0x1f7))){const _0x3f8fe1=_0x117e5b(0x221)+Math['ceil'](_0x2a45c8[_0x117e5b(0x277)][_0x117e5b(0x22c)]/0x4)+_0x117e5b(0x255),_0x5583ca=(0x0,cache_manager_1[_0x117e5b(0x1fb)])(_0x55534c,_0x491a06,_0x2a45c8['content'],_0x3f8fe1);_0x2a45c8[_0x117e5b(0x277)]=_0x117e5b(0x22a)+_0x5583ca[_0x117e5b(0x21d)]+_0x117e5b(0x27b)+_0x5583ca[_0x117e5b(0x2a4)]+_0x117e5b(0x1f0)+_0x5583ca['chunk_id']+'`\x0a',_0x44c771=!![],_0x58c29a+=Math[_0x117e5b(0x29c)](0x0,_0x5583ca['raw_tokens']-_0x5583ca[_0x117e5b(0x1e5)]);}}else{if(Array[_0x117e5b(0x28e)](_0x2a45c8[_0x117e5b(0x277)]))for(const _0x1169c2 of _0x2a45c8['content']){if(_0x1169c2&&typeof _0x1169c2===_0x117e5b(0x278)){if(typeof _0x1169c2['text']===_0x117e5b(0x296)){let _0x91c64=_0x1169c2[_0x117e5b(0x25f)],_0x462a60=_0x401ad0(_0x91c64);_0x462a60['length']<_0x91c64[_0x117e5b(0x22c)]&&(_0x1169c2[_0x117e5b(0x25f)]=_0x462a60,_0x44c771=!![],_0x58c29a+=Math[_0x117e5b(0x23f)]((_0x91c64[_0x117e5b(0x22c)]-_0x462a60[_0x117e5b(0x22c)])/0x4));if(_0x1169c2[_0x117e5b(0x25f)][_0x117e5b(0x22c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1169c2['text'][_0x117e5b(0x20b)](_0x117e5b(0x1f7))){const _0xdf2297=_0x117e5b(0x1e3)+Math[_0x117e5b(0x23f)](_0x1169c2[_0x117e5b(0x25f)]['length']/0x4)+'\x20tokens).',_0x3a94ff=(0x0,cache_manager_1[_0x117e5b(0x1fb)])(_0x55534c,_0x491a06,_0x1169c2[_0x117e5b(0x25f)],_0xdf2297);_0x1169c2['text']='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x3a94ff[_0x117e5b(0x2a4)]+_0x117e5b(0x25c)+_0x3a94ff[_0x117e5b(0x2a4)]+'`\x0a',_0x44c771=!![],_0x58c29a+=Math['max'](0x0,_0x3a94ff[_0x117e5b(0x21d)]-_0x3a94ff[_0x117e5b(0x1e5)]);}}else{if(typeof _0x1169c2[_0x117e5b(0x277)]===_0x117e5b(0x296)){let _0x56b965=_0x1169c2[_0x117e5b(0x277)],_0x36368a=_0x401ad0(_0x56b965);_0x36368a[_0x117e5b(0x22c)]<_0x56b965[_0x117e5b(0x22c)]&&(_0x1169c2['content']=_0x36368a,_0x44c771=!![],_0x58c29a+=Math[_0x117e5b(0x23f)]((_0x56b965[_0x117e5b(0x22c)]-_0x36368a['length'])/0x4));if(_0x1169c2[_0x117e5b(0x277)][_0x117e5b(0x22c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1169c2['content'][_0x117e5b(0x20b)](_0x117e5b(0x1f7))){const _0x257f00='Summary:\x20Tool\x20result\x20offloaded\x20('+Math[_0x117e5b(0x23f)](_0x1169c2['content']['length']/0x4)+_0x117e5b(0x255),_0x15db4a=(0x0,cache_manager_1['saveChunk'])(_0x55534c,_0x491a06,_0x1169c2[_0x117e5b(0x277)],_0x257f00);_0x1169c2['content']=_0x117e5b(0x25a)+_0x15db4a[_0x117e5b(0x2a4)]+_0x117e5b(0x25c)+_0x15db4a[_0x117e5b(0x2a4)]+'`\x0a',_0x44c771=!![],_0x58c29a+=Math[_0x117e5b(0x29c)](0x0,_0x15db4a[_0x117e5b(0x21d)]-_0x15db4a[_0x117e5b(0x1e5)]);}}}}}}return{'modified':_0x44c771,'savedTokens':_0x58c29a};}const sessionsStatePath=path[a0_0x1eccfc(0x23c)](baseDir,a0_0x1eccfc(0x1f9));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x45eb31=a0_0x1eccfc;try{if(fs[_0x45eb31(0x28b)](sessionsStatePath)){const _0x8dc0bf=JSON[_0x45eb31(0x248)](fs['readFileSync'](sessionsStatePath,_0x45eb31(0x202)));if(_0x8dc0bf&&typeof _0x8dc0bf==='object')return sessionsStateMemoryCache=_0x8dc0bf,_0x8dc0bf;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x2e78b2,_0x1b08cd,_0x4cd9a4,_0x5ade72=0x0,_0x1d5513=0x0,_0x2c8336=0x0){const _0x4b6a6f=a0_0x1eccfc;try{const _0x44e32b=loadSessionsState(),_0x5c27a0=_0x44e32b[_0x2e78b2]||{},_0x3824c8=_0x1d5513||_0x5c27a0[_0x4b6a6f(0x1ff)]||0x0,_0x1bf683=_0x2c8336||_0x5c27a0[_0x4b6a6f(0x1e7)]||0x0,_0x3361d9=_0x4cd9a4!==undefined?_0x4cd9a4:_0x5c27a0['officialCompactSaved']||0x0;_0x44e32b[_0x2e78b2]={'lineCount':_0x1b08cd||_0x5c27a0['lineCount']||0x1,'activeSavedTokens':_0x3361d9+_0x3824c8+_0x1bf683,'sideCacheSaved':_0x5ade72||_0x5c27a0[_0x4b6a6f(0x206)]||0x0,'officialCompactSaved':_0x3361d9,'autoCompactSaved':_0x3824c8,'hookSavedTokens':_0x1bf683},sessionsStateMemoryCache=_0x44e32b;if(!fs[_0x4b6a6f(0x28b)](baseDir))fs[_0x4b6a6f(0x275)](baseDir,{'recursive':!![]});const _0x33ee0b=sessionsStatePath+_0x4b6a6f(0x24d);fs[_0x4b6a6f(0x251)](_0x33ee0b,JSON[_0x4b6a6f(0x26d)](_0x44e32b,null,0x2),_0x4b6a6f(0x202)),fs['renameSync'](_0x33ee0b,sessionsStatePath);}catch{}}function processSessionFile(_0x97c5b9,_0x30757b){const _0x473471=a0_0x1eccfc;try{if(!fs[_0x473471(0x28b)](_0x97c5b9))return;const _0x26ba75=fs[_0x473471(0x209)](_0x97c5b9);if(_0x26ba75[_0x473471(0x249)]()||_0x26ba75[_0x473471(0x213)]===0x0)return;const _0x2d7a6e=loadConfig(),_0x4be9e5=_0x473471(0x276)+_0x30757b;if(_0x2d7a6e['conversation_toggles'][_0x4be9e5]===![])return;const _0x4bf4e8=fs['readFileSync'](_0x97c5b9,_0x473471(0x202)),_0x271f15=path[_0x473471(0x203)](_0x97c5b9)[_0x473471(0x280)]();let _0x45d9a1=0x1;if(_0x271f15===_0x473471(0x25e)||_0x271f15===_0x473471(0x261))_0x45d9a1=_0x4bf4e8[_0x473471(0x24b)]('\x0a')[_0x473471(0x262)](Boolean)['length'];else{if(_0x271f15===_0x473471(0x270))try{const _0xd8e240=JSON[_0x473471(0x248)](_0x4bf4e8),_0x2febd5=Array[_0x473471(0x28e)](_0xd8e240['messages'])?_0xd8e240[_0x473471(0x23a)]:Array[_0x473471(0x28e)](_0xd8e240)?_0xd8e240:null;if(_0x2febd5)_0x45d9a1=_0x2febd5[_0x473471(0x22c)];}catch{}}let _0x3b2a4b=0x0;if((_0x271f15===_0x473471(0x25e)||_0x271f15===_0x473471(0x261))&&_0x4bf4e8[_0x473471(0x20b)](_0x473471(0x20a))&&_0x4bf4e8['includes'](_0x473471(0x20c))){const _0x51f95d=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x1ec24f of _0x4bf4e8[_0x473471(0x24b)]('\x0a')){if(!_0x1ec24f[_0x473471(0x20b)](_0x473471(0x20a))||!_0x1ec24f[_0x473471(0x20b)](_0x473471(0x20c)))continue;try{const _0x498443=JSON[_0x473471(0x248)](_0x1ec24f);if(_0x498443[_0x473471(0x244)]!==_0x473471(0x21f))continue;const _0x3d17c4=typeof _0x498443[_0x473471(0x277)]===_0x473471(0x296)?_0x498443[_0x473471(0x277)]:_0x498443['message']&&typeof _0x498443[_0x473471(0x1fd)][_0x473471(0x277)]===_0x473471(0x296)?_0x498443['message'][_0x473471(0x277)]:'';if(!_0x3d17c4)continue;for(const _0x162a89 of _0x3d17c4[_0x473471(0x29d)](_0x51f95d)){let _0x2cec16=parseFloat(_0x162a89[0x1]);if(_0x162a89[0x0][_0x473471(0x280)]()[_0x473471(0x20b)]('k'))_0x2cec16=_0x2cec16*0x3e8;_0x3b2a4b+=Math[_0x473471(0x1f2)](_0x2cec16);}}catch{}}}const _0x2aa381=loadSessionsState(),_0xa2e90a=_0x2aa381[_0x97c5b9],_0x5ea7ac=_0xa2e90a?_0xa2e90a[_0x473471(0x212)]:0x0,_0x4612ce=_0xa2e90a?_0xa2e90a['activeSavedTokens']||0x0:0x0;if(_0x5ea7ac>0x0&&_0x45d9a1>_0x5ea7ac&&_0x4612ce>0x0){const _0x3adb2e=_0x473471(0x21b)+_0x30757b;tracker_1['tracker']['logExecution'](_0x3adb2e,'A'[_0x473471(0x27e)](_0x4612ce*0x4),'',0x0,undefined,[_0x473471(0x276)+_0x30757b,_0x473471(0x29f),_0x30757b,_0x473471(0x215)]);}const _0x345b76=_0xa2e90a&&_0xa2e90a['officialCompactSaved']!==undefined?_0xa2e90a[_0x473471(0x298)]:0x0,_0x38409f=Math[_0x473471(0x29c)](_0x345b76,_0x3b2a4b);saveSessionStateItem(_0x97c5b9,_0x45d9a1,_0x38409f,0x0,0x0,0x0);}catch{}}function a0_0x187c(){const _0x3c38d1=['.compact','logExecution','sideCacheSaved','Application\x20Support','claude','statSync','saved','includes','tokens','User','.png','openclaw','opencode','__importStar','lineCount','size','replace','prompt_turn','Unsupported\x20format\x20\x27','.cortex','storage','./tracker','cli.js','conv:','AppData','raw_tokens','compactSessionCopy','system','trim','Summary:\x20Content\x20offloaded\x20(','call','Startup','39680619zughjf','__esModule','none','.next','276088XIsiCK','modified','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','.vscdb','length','3964976CBeEks','node_modules','venv','.db','Codex','.agents','homedir','context','projects','TrimPromptDaemon.vbs','tracker','installWindowsStartupService','.gemini','messages','.openclaw','join','loadSessionsState','find','ceil','fullPath','10duDPwU','getOwnPropertyDescriptor','82035kozaEe','type','config.json','__pycache__','platform','parse','isDirectory','media__','split','getOwnPropertyNames','.tmp','dist','defineProperty','out','writeFileSync','env','.wal','history','\x20tokens).','.jpg','sessions','custom_storage_paths','push','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','dirname','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','assign','.jsonl','text','compact:','.json1','filter','antigravity','.gif','Roaming','loadConfig','.webp','14HyBndd','codex','endsWith','2319120NrZGfl','role','stringify','getAgentStoragePaths','Windows','.json','compactLiveSession','savedTokens','__createBinding','readFileSync','mkdirSync','conv_','content','object','path','hasOwnProperty','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','Unsupported\x20extension','745629TyoQLj','repeat','startsWith','toLowerCase','create','win32','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','.pb','watch','Microsoft','.aider.chat.history.md','cache','saveConfig','image_','existsSync','.lock','.trimprompt','isArray','github-copilot-cli','Start\x20Menu','workspaceStorage','mtimeMs','build','byteLength','.venv','string','default','officialCompactSaved','aider','Compaction\x20failed','get','max','matchAll','getLatestSessionFile','live-conv','toISOString','name','readdirSync','Programs','chunk_id','cursor','Summary:\x20Text\x20block\x20offloaded\x20(','processSessionFile','compressed_tokens','./proxy-conv','hookSavedTokens','Session\x20file\x20not\x20found','Cursor','prototype','.git','1189055vwhrSP','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','cortex','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','Gemini','round','.shm','configurable','writable','75GfSKGk','TrimPrompt\x20Cache\x20Engine','.config','sessions_state.json','saveSessionStateItem','saveChunk','gemini','message','1030klNgrD','autoCompactSaved','conversation_toggles','File\x20not\x20found','utf8','extname'];a0_0x187c=function(){return _0x3c38d1;};return a0_0x187c();}function compactSessionCopy(_0x391bfd,_0x3f99f8){const _0x50f235=a0_0x1eccfc;try{if(!fs[_0x50f235(0x28b)](_0x391bfd))return{'ok':![],'reason':_0x50f235(0x1e8)};const _0x4dce8b=path[_0x50f235(0x203)](_0x391bfd)['toLowerCase']();if(_0x4dce8b!==_0x50f235(0x270)&&_0x4dce8b!==_0x50f235(0x25e)&&_0x4dce8b!==_0x50f235(0x261))return{'ok':![],'reason':_0x50f235(0x216)+(_0x4dce8b||_0x50f235(0x226))+_0x50f235(0x283)};const _0x165802=fs[_0x50f235(0x274)](_0x391bfd,_0x50f235(0x202)),_0x19a79a=Buffer[_0x50f235(0x294)](_0x165802,_0x50f235(0x202)),_0x448e18=path['basename'](_0x391bfd,_0x4dce8b);let _0x135cea=_0x165802,_0x11ae89=![];if(_0x4dce8b==='.json'){const _0x163e01=JSON[_0x50f235(0x248)](_0x165802),_0x581285=Array[_0x50f235(0x28e)](_0x163e01['messages'])?_0x163e01[_0x50f235(0x23a)]:Array[_0x50f235(0x28e)](_0x163e01)?_0x163e01:null;if(_0x581285){for(const _0x556abb of _0x581285){const _0x2a237f=compressMessageContent(_0x556abb,_0x448e18,_0x3f99f8);if(_0x2a237f[_0x50f235(0x229)])_0x11ae89=!![];}if(_0x11ae89)_0x135cea=JSON['stringify'](_0x163e01,null,0x2);}}else{const _0x2256e9=_0x165802[_0x50f235(0x24b)]('\x0a'),_0x2558a6=[];for(let _0x1fc01c of _0x2256e9){if(!_0x1fc01c['trim']()){_0x2558a6[_0x50f235(0x259)](_0x1fc01c);continue;}try{const _0x1dd0f7=JSON[_0x50f235(0x248)](_0x1fc01c),_0x1ff18f=_0x1dd0f7[_0x50f235(0x1fd)]||_0x1dd0f7;if(_0x1ff18f){const _0x547e00=compressMessageContent(_0x1ff18f,_0x448e18,_0x3f99f8);_0x547e00[_0x50f235(0x229)]&&(_0x11ae89=!![],_0x1fc01c=JSON[_0x50f235(0x26d)](_0x1dd0f7));}}catch{}_0x2558a6[_0x50f235(0x259)](_0x1fc01c);}if(_0x11ae89)_0x135cea=_0x2558a6[_0x50f235(0x23c)]('\x0a');}const _0x26da68=Buffer[_0x50f235(0x294)](_0x135cea,_0x50f235(0x202)),_0x4894c8=path[_0x50f235(0x23c)](path[_0x50f235(0x25b)](_0x391bfd),_0x448e18+_0x50f235(0x204)+_0x4dce8b);fs[_0x50f235(0x251)](_0x4894c8,_0x135cea,_0x50f235(0x202));const _0x195ce0=Math[_0x50f235(0x23f)](_0x19a79a/0x4),_0x1b5ba5=Math['ceil'](_0x26da68/0x4),_0x198e3b=Math['max'](0x0,_0x195ce0-_0x1b5ba5),_0x39f1fc=_0x19a79a>0x0?Math[_0x50f235(0x1f2)]((0x1-_0x26da68/_0x19a79a)*0x3e8)/0xa:0x0;return _0x198e3b>0x0&&tracker_1[_0x50f235(0x237)][_0x50f235(0x205)](_0x50f235(0x260)+_0x3f99f8,_0x165802,_0x135cea,_0x198e3b,undefined,['conv_'+_0x3f99f8,'live-conv',_0x3f99f8,'compact_copy']),{'ok':!![],'compactPath':_0x4894c8,'rawBytes':_0x19a79a,'compressedBytes':_0x26da68,'rawTokens':_0x195ce0,'compressedTokens':_0x1b5ba5,'savedTokens':_0x198e3b,'reductionPct':_0x39f1fc};}catch(_0x5a0f47){return{'ok':![],'reason':_0x5a0f47?.[_0x50f235(0x1fd)]||'compaction\x20failed'};}}function compactLiveSession(_0x17b10e,_0x3bc95f){const _0x11f832=a0_0x1eccfc;try{if(!fs[_0x11f832(0x28b)](_0x17b10e))return{'ok':![],'savedTokens':0x0,'reason':_0x11f832(0x201)};const _0xe0df7b=path[_0x11f832(0x203)](_0x17b10e)[_0x11f832(0x280)]();if(_0xe0df7b!==_0x11f832(0x270)&&_0xe0df7b!=='.jsonl'&&_0xe0df7b!==_0x11f832(0x261))return{'ok':![],'savedTokens':0x0,'reason':_0x11f832(0x27c)};const _0x5c4a1a=fs[_0x11f832(0x274)](_0x17b10e,_0x11f832(0x202)),_0xcd4899=Buffer[_0x11f832(0x294)](_0x5c4a1a,_0x11f832(0x202)),_0x426e66=Math['ceil'](_0xcd4899/0x4),_0x4c14eb=path['basename'](_0x17b10e,_0xe0df7b);let _0x57d176=_0x5c4a1a,_0x4d4448=![];if(_0xe0df7b===_0x11f832(0x270)){const _0x14acb2=JSON['parse'](_0x5c4a1a),_0x3a7736=Array[_0x11f832(0x28e)](_0x14acb2['messages'])?_0x14acb2['messages']:Array['isArray'](_0x14acb2)?_0x14acb2:null;if(_0x3a7736){for(const _0x19e515 of _0x3a7736){const _0x1bd5ef=compressMessageContent(_0x19e515,_0x4c14eb,_0x3bc95f);if(_0x1bd5ef[_0x11f832(0x229)])_0x4d4448=!![];}const {compressConversation:_0x4e0ab9}=require(_0x11f832(0x1e6)),_0x34302f=_0x4e0ab9(_0x3a7736,0x9c40);_0x34302f[_0x11f832(0x272)]>0x0&&(_0x4d4448=!![],Array['isArray'](_0x14acb2[_0x11f832(0x23a)])?_0x14acb2['messages']=_0x34302f[_0x11f832(0x23a)]:_0x57d176=JSON[_0x11f832(0x26d)](_0x34302f['messages'],null,0x2)),_0x4d4448&&!Array[_0x11f832(0x28e)](_0x14acb2)&&(_0x57d176=JSON[_0x11f832(0x26d)](_0x14acb2,null,0x2));}}else{const _0x82b8fe=_0x5c4a1a[_0x11f832(0x24b)]('\x0a'),_0x3404ea=[],_0x10217e=[];for(const _0x5df68f of _0x82b8fe){if(!_0x5df68f[_0x11f832(0x220)]())continue;try{const _0x3ab952=JSON[_0x11f832(0x248)](_0x5df68f);_0x3404ea[_0x11f832(0x259)](_0x3ab952);const _0x28e27f=_0x3ab952[_0x11f832(0x1fd)]||_0x3ab952;_0x28e27f&&typeof _0x28e27f[_0x11f832(0x26c)]===_0x11f832(0x296)&&_0x10217e[_0x11f832(0x259)](_0x28e27f);}catch{}}for(const _0x168409 of _0x10217e){const _0x353275=compressMessageContent(_0x168409,_0x4c14eb,_0x3bc95f);if(_0x353275['modified'])_0x4d4448=!![];}const {compressConversation:_0x40bb34}=require(_0x11f832(0x1e6)),_0x259747=_0x40bb34(_0x10217e,0x9c40);if(_0x259747[_0x11f832(0x272)]>0x0||_0x4d4448){const _0x5867b4=[];for(const _0x515567 of _0x3404ea){const _0x17d15f=_0x515567[_0x11f832(0x1fd)]||_0x515567;if(_0x17d15f&&typeof _0x17d15f['role']===_0x11f832(0x296)){const _0x5142fc=_0x259747[_0x11f832(0x23a)][_0x11f832(0x23e)](_0x36e3fd=>_0x36e3fd===_0x17d15f);_0x5142fc?(_0x515567[_0x11f832(0x1fd)]?_0x515567['message']=_0x5142fc:Object[_0x11f832(0x25d)](_0x515567,_0x5142fc),_0x5867b4[_0x11f832(0x259)](JSON[_0x11f832(0x26d)](_0x515567))):_0x4d4448=!![];}else _0x5867b4[_0x11f832(0x259)](JSON[_0x11f832(0x26d)](_0x515567));}_0x57d176=_0x5867b4[_0x11f832(0x23c)]('\x0a'),_0x4d4448=!![];}}if(_0x4d4448){const _0xf3d9e3=Buffer[_0x11f832(0x294)](_0x57d176,_0x11f832(0x202));fs[_0x11f832(0x251)](_0x17b10e,_0x57d176,_0x11f832(0x202));const _0x20327d=Math[_0x11f832(0x23f)](_0xf3d9e3/0x4),_0x286e42=Math[_0x11f832(0x29c)](0x0,_0x426e66-_0x20327d);if(_0x286e42>0x0){const _0x5216c5=loadSessionsState(),_0x56acf6=_0x5216c5[_0x17b10e]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x27f60d=_0x56acf6['autoCompactSaved']||0x0,_0x14fb0d=_0x27f60d+_0x286e42;saveSessionStateItem(_0x17b10e,_0x56acf6[_0x11f832(0x212)],_0x56acf6['officialCompactSaved']||0x0,_0x56acf6[_0x11f832(0x206)]||0x0,_0x14fb0d,_0x56acf6[_0x11f832(0x1e7)]||0x0),tracker_1[_0x11f832(0x237)][_0x11f832(0x205)]('compact:'+_0x3bc95f,_0x5c4a1a,_0x57d176,_0x286e42,undefined,[_0x11f832(0x276)+_0x3bc95f,_0x11f832(0x29f),_0x3bc95f,'compact_copy']);}return{'ok':!![],'savedTokens':_0x286e42};}return{'ok':!![],'savedTokens':0x0};}catch(_0x2c2662){return{'ok':![],'savedTokens':0x0,'reason':_0x2c2662[_0x11f832(0x1fd)]||_0x11f832(0x29a)};}}function installWindowsStartupService(){const _0x5d72fe=a0_0x1eccfc;if(process[_0x5d72fe(0x247)]!==_0x5d72fe(0x282))return;try{const _0x310f55=path[_0x5d72fe(0x23c)](os[_0x5d72fe(0x233)](),_0x5d72fe(0x21c),_0x5d72fe(0x265),_0x5d72fe(0x286),_0x5d72fe(0x26f),_0x5d72fe(0x290),_0x5d72fe(0x2a3),_0x5d72fe(0x223));if(!fs[_0x5d72fe(0x28b)](_0x310f55))fs[_0x5d72fe(0x275)](_0x310f55,{'recursive':!![]});const _0x3539b7=path[_0x5d72fe(0x23c)](_0x310f55,_0x5d72fe(0x236)),_0x161428=path[_0x5d72fe(0x23c)](__dirname,_0x5d72fe(0x21a)),_0xbf604f=_0x161428['replace'](/\\/g,'\x5c\x5c'),_0x34f6a8=_0x5d72fe(0x1ee)+_0xbf604f+_0x5d72fe(0x1ed);fs[_0x5d72fe(0x251)](_0x3539b7,_0x34f6a8,_0x5d72fe(0x202));}catch{}}function startWatcherDaemon(){const _0x4d5002=a0_0x1eccfc;installWindowsStartupService();try{const {installClaudeHooks:_0x1fc2ba}=require('./hooks/claude-hook');_0x1fc2ba();}catch(_0x46a82b){}const _0x235df6=[_0x4d5002(0x208),_0x4d5002(0x1fc),_0x4d5002(0x269),_0x4d5002(0x1e2),_0x4d5002(0x299),'copilot',_0x4d5002(0x20f),_0x4d5002(0x210),_0x4d5002(0x1ef)];for(const _0x49bdf0 of _0x235df6){const _0x4bd3ca=getAgentStoragePaths(_0x49bdf0);for(const _0x264911 of _0x4bd3ca){if(fs['existsSync'](_0x264911))try{fs[_0x4d5002(0x285)](_0x264911,{'recursive':!![]},(_0x5bd522,_0x1f373d)=>{const _0x3a9e5d=_0x4d5002;if(!_0x1f373d)return;const _0x5471e4=path[_0x3a9e5d(0x23c)](_0x264911,_0x1f373d);if(debounceTimers['has'](_0x5471e4))clearTimeout(debounceTimers[_0x3a9e5d(0x29b)](_0x5471e4));const _0x18ab68=setTimeout(()=>processSessionFile(_0x5471e4,_0x49bdf0),0x1f4);debounceTimers['set'](_0x5471e4,_0x18ab68);});}catch{}}}setInterval(()=>{const _0x4fb276=_0x4d5002;for(const _0x4e55fb of _0x235df6){try{const _0x50c057=getLatestSessionFile(_0x4e55fb);_0x50c057&&_0x50c057[_0x4fb276(0x240)]&&processSessionFile(_0x50c057['fullPath'],_0x4e55fb);}catch{}}},0xbb8);const _0x435414=()=>{const _0x5349d1=_0x4d5002;for(const _0x56b80f of _0x235df6){try{const _0x134a53=getLatestSessionFile(_0x56b80f);_0x134a53&&_0x134a53[_0x5349d1(0x240)]&&compactLiveSession(_0x134a53[_0x5349d1(0x240)],_0x56b80f);}catch{}}};setTimeout(_0x435414,0x7d0),setInterval(_0x435414,0x2bf20);}
|
|
1
|
+
'use strict';const a0_0xd76980=a0_0x5027;(function(_0x51b0e3,_0x58277e){const _0x4d863f=a0_0x5027,_0x55ea26=_0x51b0e3();while(!![]){try{const _0x481784=parseInt(_0x4d863f(0x166))/0x1+parseInt(_0x4d863f(0x120))/0x2*(-parseInt(_0x4d863f(0xd7))/0x3)+parseInt(_0x4d863f(0xeb))/0x4+parseInt(_0x4d863f(0x101))/0x5*(-parseInt(_0x4d863f(0x168))/0x6)+parseInt(_0x4d863f(0x160))/0x7+-parseInt(_0x4d863f(0x15b))/0x8+-parseInt(_0x4d863f(0x165))/0x9;if(_0x481784===_0x58277e)break;else _0x55ea26['push'](_0x55ea26['shift']());}catch(_0x51384d){_0x55ea26['push'](_0x55ea26['shift']());}}}(a0_0x3808,0x92636));function a0_0x3808(){const _0x11c206=['./tracker','node_modules','media__','join','conv_','writable','compact:','.db','call','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','stringify','1545292WDiMtW','mkdirSync','build','.webp','.venv','path','name','string','Library','officialCompactSaved','.jpeg','set','.openclaw','mtimeMs','.agents','env','conversation_toggles','existsSync','Compaction\x20failed','hookSavedTokens','logExecution','history','170MnSqlm','Start\x20Menu','TrimPromptDaemon.vbs','out','activeSavedTokens','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','Startup','endsWith','cortex','trim','Application\x20Support','loadConfig','.json1','storage','.opencode','startsWith','sideCacheSaved','role','byteLength','extname','projects','.vscdb','saveConfig','.cortex','platform','darwin','none','config.json','Summary:\x20Text\x20block\x20offloaded\x20(','codex','sessions','2Dinlrb','tokens','hasOwnProperty','isArray','image_','utf8','./proxy-conv','copilot','includes','compressed_tokens','.png','.gif','length','writeFileSync','defineProperty','opencode','lineCount','workspaceStorage','type','ceil','split','readFileSync','parse','Cursor','.json','compaction\x20failed','chunk_id','AppData','antigravity','startWatcherDaemon','compactSessionCopy','fullPath','prompt_turn','installWindowsStartupService','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','isFile','Summary:\x20Tool\x20result\x20offloaded\x20(','__setModuleDefault','custom_storage_paths','isDirectory','repeat','.jpg','TrimPrompt\x20Cache\x20Engine','saveChunk','gemini','matchAll','savedTokens','.config','renameSync','saveSessionStateItem','round','context','getOwnPropertyDescriptor','processSessionFile','compactLiveSession','aider','github-copilot-cli','.claude','saved','5091584gpiREs','default','Gemini','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','.git','6103657KzYwlr','__esModule','messages','.trimprompt','modified','6100074LAjxSf','889806MtTyyp','conv:','354TseZua','Unsupported\x20extension','cache','Roaming','get','prototype','size','live-conv','Programs','raw_tokens','dirname','homedir','statSync','.wal','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','text','configurable','\x20tokens).','toLowerCase','User','win32','cwd','message','push','claude','Local','.gemini','openclaw','tracker','getLatestSessionFile','loadSessionsState','basename','__pycache__','.aider.chat.history.md','content','.lock','Codex','has','create','.jsonl','Microsoft','object','696702qsPwGe','__createBinding','./cache-manager','cursor','.shm','max','venv','autoCompactSaved','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'];a0_0x3808=function(){return _0x11c206;};return a0_0x3808();}var __createBinding=this&&this[a0_0xd76980(0xd8)]||(Object[a0_0xd76980(0xd3)]?function(_0x10c6e6,_0x3c4f79,_0x163d2f,_0x45abd4){const _0x104447=a0_0xd76980;if(_0x45abd4===undefined)_0x45abd4=_0x163d2f;var _0x82b06b=Object[_0x104447(0x154)](_0x3c4f79,_0x163d2f);(!_0x82b06b||('get'in _0x82b06b?!_0x3c4f79[_0x104447(0x161)]:_0x82b06b[_0x104447(0xe5)]||_0x82b06b[_0x104447(0x178)]))&&(_0x82b06b={'enumerable':!![],'get':function(){return _0x3c4f79[_0x163d2f];}}),Object[_0x104447(0x12e)](_0x10c6e6,_0x45abd4,_0x82b06b);}:function(_0xd48ab5,_0x4f57c6,_0x132769,_0x14b762){if(_0x14b762===undefined)_0x14b762=_0x132769;_0xd48ab5[_0x14b762]=_0x4f57c6[_0x132769];}),__setModuleDefault=this&&this[a0_0xd76980(0x145)]||(Object['create']?function(_0x397332,_0x40b78a){const _0x12ff3b=a0_0xd76980;Object['defineProperty'](_0x397332,_0x12ff3b(0x15c),{'enumerable':!![],'value':_0x40b78a});}:function(_0x5f06a1,_0x323adb){const _0x49ce23=a0_0xd76980;_0x5f06a1[_0x49ce23(0x15c)]=_0x323adb;}),__importStar=this&&this['__importStar']||(function(){var _0x32db64=function(_0xb8d966){return _0x32db64=Object['getOwnPropertyNames']||function(_0x340ad9){const _0x1800c2=a0_0x5027;var _0x5dd60f=[];for(var _0x439fe9 in _0x340ad9)if(Object[_0x1800c2(0x16d)][_0x1800c2(0x122)][_0x1800c2(0xe8)](_0x340ad9,_0x439fe9))_0x5dd60f[_0x5dd60f[_0x1800c2(0x12c)]]=_0x439fe9;return _0x5dd60f;},_0x32db64(_0xb8d966);};return function(_0x54ec50){const _0x157923=a0_0x5027;if(_0x54ec50&&_0x54ec50[_0x157923(0x161)])return _0x54ec50;var _0x28a8e5={};if(_0x54ec50!=null){for(var _0x38c636=_0x32db64(_0x54ec50),_0x1f10ad=0x0;_0x1f10ad<_0x38c636[_0x157923(0x12c)];_0x1f10ad++)if(_0x38c636[_0x1f10ad]!=='default')__createBinding(_0x28a8e5,_0x54ec50,_0x38c636[_0x1f10ad]);}return __setModuleDefault(_0x28a8e5,_0x54ec50),_0x28a8e5;};}());Object[a0_0xd76980(0x12e)](exports,a0_0xd76980(0x161),{'value':!![]}),exports[a0_0xd76980(0x10c)]=loadConfig,exports[a0_0xd76980(0x117)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0xd76980(0xca)]=getLatestSessionFile,exports[a0_0xd76980(0xcb)]=loadSessionsState,exports[a0_0xd76980(0x151)]=saveSessionStateItem,exports[a0_0xd76980(0x155)]=processSessionFile,exports[a0_0xd76980(0x13e)]=compactSessionCopy,exports[a0_0xd76980(0x156)]=compactLiveSession,exports[a0_0xd76980(0x141)]=installWindowsStartupService,exports[a0_0xd76980(0x13d)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0xd76980(0xf0))),os=__importStar(require('os')),cache_manager_1=require(a0_0xd76980(0xd9)),tracker_1=require(a0_0xd76980(0xe0)),baseDir=path[a0_0xd76980(0xe3)](os[a0_0xd76980(0x173)](),a0_0xd76980(0x163)),configPath=path[a0_0xd76980(0xe3)](baseDir,a0_0xd76980(0x11c)),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 _0x2282e7=a0_0xd76980;try{if(!fs[_0x2282e7(0xfc)](baseDir))fs[_0x2282e7(0xec)](baseDir,{'recursive':!![]});if(fs[_0x2282e7(0xfc)](configPath)){const _0x1f0641=JSON[_0x2282e7(0x136)](fs[_0x2282e7(0x135)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x1f0641,'conversation_toggles':{...DEFAULT_CONFIG[_0x2282e7(0xfb)],..._0x1f0641[_0x2282e7(0xfb)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x1f0641[_0x2282e7(0x146)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0xb2d991){const _0x32c066=a0_0xd76980,_0x2ff168=loadConfig(),_0xab1ec3={..._0x2ff168,..._0xb2d991,'conversation_toggles':{..._0x2ff168[_0x32c066(0xfb)],..._0xb2d991[_0x32c066(0xfb)]||{}},'custom_storage_paths':{..._0x2ff168['custom_storage_paths'],..._0xb2d991[_0x32c066(0x146)]||{}}};try{if(!fs[_0x32c066(0xfc)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x32c066(0x12d)](configPath,JSON[_0x32c066(0xea)](_0xab1ec3,null,0x2),'utf8');}catch{}return _0xab1ec3;}function getAgentStoragePaths(_0x38a623){const _0x512788=a0_0xd76980,_0x2d45d3=loadConfig(),_0x572128=_0x2d45d3[_0x512788(0x146)][_0x38a623];if(_0x572128&&fs['existsSync'](_0x572128))return[_0x572128];const _0xa64c50=os[_0x512788(0x173)](),_0x3d158b=process[_0x512788(0x119)]===_0x512788(0x17c),_0x1af2ae=process[_0x512788(0x119)]===_0x512788(0x11a);switch(_0x38a623){case _0x512788(0x180):return[path['join'](_0xa64c50,_0x512788(0x159),_0x512788(0x115)),path[_0x512788(0xe3)](_0xa64c50,'.claude',_0x512788(0x100))];case _0x512788(0x11e):return[path['join'](_0xa64c50,'.codex',_0x512788(0x11f)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x16b),_0x512788(0xd1))];case'gemini':case'antigravity':return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x182),_0x512788(0x13c)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x182)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x16b),_0x512788(0x15d)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x14c))];case _0x512788(0xda):if(_0x3d158b)return[path['join'](_0xa64c50,'AppData',_0x512788(0x16b),_0x512788(0x137),_0x512788(0x17b),_0x512788(0x131))];if(_0x1af2ae)return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xf3),_0x512788(0x10b),'Cursor','User','workspaceStorage')];return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x137),_0x512788(0x17b),_0x512788(0x131))];case'aider':return[process[_0x512788(0x17d)](),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xce))];case _0x512788(0x127):if(_0x3d158b)return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x181),_0x512788(0x158))];return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x158))];case _0x512788(0x183):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xf7),_0x512788(0x10e)),path[_0x512788(0xe3)](process[_0x512788(0x17d)](),'.openclaw',_0x512788(0x153))];case _0x512788(0x12f):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x10f),_0x512788(0x11f))];case _0x512788(0x109):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x118),_0x512788(0x16a))];default:return[];}}function getLatestSessionFile(_0x2417c1){const _0x5bc896=a0_0xd76980,_0x163462=getAgentStoragePaths(_0x2417c1);let _0x30fbb5=null,_0x588e9b=0x0,_0x2498e0=null,_0x21f5c3=null;for(const _0x53eac9 of _0x163462){if(fs[_0x5bc896(0xfc)](_0x53eac9)){if(!_0x21f5c3)_0x21f5c3=_0x53eac9;const _0xb7aeed=(_0x13dc28,_0x184d99=0x0)=>{const _0x5e8122=_0x5bc896;if(_0x184d99>0x6)return;try{const _0x56e674=fs['readdirSync'](_0x13dc28,{'withFileTypes':!![]});for(const _0xfe5109 of _0x56e674){const _0x420e7c=path[_0x5e8122(0xe3)](_0x13dc28,_0xfe5109['name']);if(_0xfe5109[_0x5e8122(0x147)]()){const _0x49bdb4=_0xfe5109['name'][_0x5e8122(0x17a)]();if(_0x49bdb4===_0x5e8122(0xe1)||_0x49bdb4===_0x5e8122(0x15f)||_0x49bdb4===_0x5e8122(0xef)||_0x49bdb4===_0x5e8122(0xfa)||_0x49bdb4===_0x5e8122(0xdd)||_0x49bdb4===_0x5e8122(0xcd)||_0x49bdb4==='.next'||_0x49bdb4==='dist'||_0x49bdb4===_0x5e8122(0xed)||_0x49bdb4===_0x5e8122(0x104)||_0x49bdb4===_0x5e8122(0xf9))continue;_0xb7aeed(_0x420e7c,_0x184d99+0x1);}else{if(_0xfe5109[_0x5e8122(0x143)]()&&!_0xfe5109[_0x5e8122(0xf1)][_0x5e8122(0x110)]('.')){const _0x59149c=_0xfe5109[_0x5e8122(0xf1)][_0x5e8122(0x17a)]();if(_0x59149c['includes']('.compact')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xe7))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x116))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x12a))||_0x59149c['endsWith'](_0x5e8122(0x149))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xf5))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x12b))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xee))||_0x59149c[_0x5e8122(0x108)]('.pb')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x175))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xdb))||_0x59149c[_0x5e8122(0x108)]('.tmp')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xd0))||_0x59149c[_0x5e8122(0x108)]('.dat')||_0x59149c['startsWith'](_0x5e8122(0xe2))||_0x59149c[_0x5e8122(0x110)](_0x5e8122(0x124)))continue;const _0x5ddd24=fs[_0x5e8122(0x174)](_0x420e7c);_0x5ddd24[_0x5e8122(0xf8)]>_0x588e9b&&(_0x588e9b=_0x5ddd24[_0x5e8122(0xf8)],_0x30fbb5=_0xfe5109[_0x5e8122(0xf1)],_0x2498e0=_0x420e7c,_0x21f5c3=_0x53eac9);}}}}catch{}};_0xb7aeed(_0x53eac9);}}return{'fileName':_0x30fbb5,'lastModified':_0x588e9b>0x0?new Date(_0x588e9b)['toISOString']():null,'fullPath':_0x2498e0,'dirPath':_0x21f5c3};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x1c8541,_0x3dd90d,_0x33ccf7){const _0x2d6222=a0_0xd76980;let _0x567f3b=![],_0x5e98a3=0x0;if(!_0x1c8541)return{'modified':_0x567f3b,'savedTokens':_0x5e98a3};const _0x4f28be=_0x50fb8f=>_0x50fb8f['replace'](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x1c8541[_0x2d6222(0xcf)]===_0x2d6222(0xf2)){let _0x1f3d36=_0x1c8541['content'],_0x43fa2c=_0x4f28be(_0x1f3d36);_0x43fa2c[_0x2d6222(0x12c)]<_0x1f3d36[_0x2d6222(0x12c)]&&(_0x1c8541[_0x2d6222(0xcf)]=_0x43fa2c,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x1f3d36[_0x2d6222(0x12c)]-_0x43fa2c[_0x2d6222(0x12c)])/0x4));if(_0x1c8541[_0x2d6222(0xcf)][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1c8541[_0x2d6222(0xcf)][_0x2d6222(0x128)](_0x2d6222(0x14a))){const _0x974231='Summary:\x20Content\x20offloaded\x20('+Math[_0x2d6222(0x133)](_0x1c8541['content']['length']/0x4)+_0x2d6222(0x179),_0x28bccc=(0x0,cache_manager_1['saveChunk'])(_0x3dd90d,_0x33ccf7,_0x1c8541['content'],_0x974231);_0x1c8541['content']=_0x2d6222(0x142)+_0x28bccc[_0x2d6222(0x171)]+_0x2d6222(0xe9)+_0x28bccc[_0x2d6222(0x13a)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x28bccc[_0x2d6222(0x13a)]+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math['max'](0x0,_0x28bccc['raw_tokens']-_0x28bccc[_0x2d6222(0x129)]);}}else{if(Array[_0x2d6222(0x123)](_0x1c8541[_0x2d6222(0xcf)]))for(const _0x4458d0 of _0x1c8541['content']){if(_0x4458d0&&typeof _0x4458d0===_0x2d6222(0xd6)){if(typeof _0x4458d0[_0x2d6222(0x177)]===_0x2d6222(0xf2)){let _0x11de29=_0x4458d0[_0x2d6222(0x177)],_0x38eefa=_0x4f28be(_0x11de29);_0x38eefa[_0x2d6222(0x12c)]<_0x11de29['length']&&(_0x4458d0['text']=_0x38eefa,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x11de29[_0x2d6222(0x12c)]-_0x38eefa[_0x2d6222(0x12c)])/0x4));if(_0x4458d0['text'][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4458d0[_0x2d6222(0x177)]['includes'](_0x2d6222(0x14a))){const _0x463414=_0x2d6222(0x11d)+Math[_0x2d6222(0x133)](_0x4458d0[_0x2d6222(0x177)][_0x2d6222(0x12c)]/0x4)+_0x2d6222(0x179),_0x4aa35f=(0x0,cache_manager_1[_0x2d6222(0x14b)])(_0x3dd90d,_0x33ccf7,_0x4458d0['text'],_0x463414);_0x4458d0[_0x2d6222(0x177)]=_0x2d6222(0x106)+_0x4aa35f[_0x2d6222(0x13a)]+_0x2d6222(0xdf)+_0x4aa35f['chunk_id']+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0xdc)](0x0,_0x4aa35f[_0x2d6222(0x171)]-_0x4aa35f['compressed_tokens']);}}else{if(typeof _0x4458d0[_0x2d6222(0xcf)]==='string'){let _0x3b2ecd=_0x4458d0[_0x2d6222(0xcf)],_0x3c8663=_0x4f28be(_0x3b2ecd);_0x3c8663['length']<_0x3b2ecd[_0x2d6222(0x12c)]&&(_0x4458d0[_0x2d6222(0xcf)]=_0x3c8663,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x3b2ecd[_0x2d6222(0x12c)]-_0x3c8663[_0x2d6222(0x12c)])/0x4));if(_0x4458d0[_0x2d6222(0xcf)][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4458d0['content'][_0x2d6222(0x128)]('TrimPrompt\x20Cache\x20Engine')){const _0x3ae502=_0x2d6222(0x144)+Math[_0x2d6222(0x133)](_0x4458d0[_0x2d6222(0xcf)][_0x2d6222(0x12c)]/0x4)+_0x2d6222(0x179),_0x197856=(0x0,cache_manager_1[_0x2d6222(0x14b)])(_0x3dd90d,_0x33ccf7,_0x4458d0[_0x2d6222(0xcf)],_0x3ae502);_0x4458d0[_0x2d6222(0xcf)]=_0x2d6222(0x106)+_0x197856[_0x2d6222(0x13a)]+_0x2d6222(0xdf)+_0x197856[_0x2d6222(0x13a)]+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0xdc)](0x0,_0x197856['raw_tokens']-_0x197856['compressed_tokens']);}}}}}}return{'modified':_0x567f3b,'savedTokens':_0x5e98a3};}const sessionsStatePath=path[a0_0xd76980(0xe3)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x336f0b=a0_0xd76980;try{if(fs[_0x336f0b(0xfc)](sessionsStatePath)){const _0x25f183=JSON[_0x336f0b(0x136)](fs['readFileSync'](sessionsStatePath,_0x336f0b(0x125)));if(_0x25f183&&typeof _0x25f183===_0x336f0b(0xd6))return sessionsStateMemoryCache=_0x25f183,_0x25f183;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x36c193,_0x2a5891,_0x3e1952,_0x3fc8e8=0x0,_0x274f70=0x0,_0x10dcb2=0x0){const _0x4f1c57=a0_0xd76980;try{const _0x21116e=loadSessionsState(),_0x1b1776=_0x21116e[_0x36c193]||{},_0x2c6549=_0x274f70||_0x1b1776[_0x4f1c57(0xde)]||0x0,_0x129993=_0x10dcb2||_0x1b1776[_0x4f1c57(0xfe)]||0x0,_0xf43c7=_0x3e1952!==undefined?_0x3e1952:_0x1b1776[_0x4f1c57(0xf4)]||0x0;_0x21116e[_0x36c193]={'lineCount':_0x2a5891||_0x1b1776[_0x4f1c57(0x130)]||0x1,'activeSavedTokens':_0xf43c7+_0x2c6549+_0x129993,'sideCacheSaved':_0x3fc8e8||_0x1b1776['sideCacheSaved']||0x0,'officialCompactSaved':_0xf43c7,'autoCompactSaved':_0x2c6549,'hookSavedTokens':_0x129993},sessionsStateMemoryCache=_0x21116e;if(!fs[_0x4f1c57(0xfc)](baseDir))fs[_0x4f1c57(0xec)](baseDir,{'recursive':!![]});const _0xcfaf3=sessionsStatePath+'.tmp';fs[_0x4f1c57(0x12d)](_0xcfaf3,JSON[_0x4f1c57(0xea)](_0x21116e,null,0x2),_0x4f1c57(0x125)),fs[_0x4f1c57(0x150)](_0xcfaf3,sessionsStatePath);}catch{}}function processSessionFile(_0x597e46,_0x2b1d7d){const _0x509e24=a0_0xd76980;try{if(!fs[_0x509e24(0xfc)](_0x597e46))return;const _0x18615b=fs[_0x509e24(0x174)](_0x597e46);if(_0x18615b['isDirectory']()||_0x18615b[_0x509e24(0x16e)]===0x0)return;const _0x392564=loadConfig(),_0x53696b=_0x509e24(0xe4)+_0x2b1d7d;if(_0x392564[_0x509e24(0xfb)][_0x53696b]===![])return;const _0xfa9f14=fs[_0x509e24(0x135)](_0x597e46,_0x509e24(0x125)),_0x35716a=path['extname'](_0x597e46)['toLowerCase']();let _0x478d80=0x1;if(_0x35716a==='.jsonl'||_0x35716a==='.json1')_0x478d80=_0xfa9f14[_0x509e24(0x134)]('\x0a')['filter'](Boolean)['length'];else{if(_0x35716a===_0x509e24(0x138))try{const _0x742ecf=JSON[_0x509e24(0x136)](_0xfa9f14),_0x35804d=Array[_0x509e24(0x123)](_0x742ecf[_0x509e24(0x162)])?_0x742ecf['messages']:Array[_0x509e24(0x123)](_0x742ecf)?_0x742ecf:null;if(_0x35804d)_0x478d80=_0x35804d[_0x509e24(0x12c)];}catch{}}let _0x12e5e2=0x0;if((_0x35716a===_0x509e24(0xd4)||_0x35716a==='.json1')&&_0xfa9f14[_0x509e24(0x128)](_0x509e24(0x15a))&&_0xfa9f14['includes'](_0x509e24(0x121))){const _0x458362=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x3d01c6 of _0xfa9f14['split']('\x0a')){if(!_0x3d01c6[_0x509e24(0x128)](_0x509e24(0x15a))||!_0x3d01c6['includes'](_0x509e24(0x121)))continue;try{const _0x4d756e=JSON[_0x509e24(0x136)](_0x3d01c6);if(_0x4d756e[_0x509e24(0x132)]!=='system')continue;const _0x5f3049=typeof _0x4d756e[_0x509e24(0xcf)]===_0x509e24(0xf2)?_0x4d756e[_0x509e24(0xcf)]:_0x4d756e[_0x509e24(0x17e)]&&typeof _0x4d756e[_0x509e24(0x17e)][_0x509e24(0xcf)]===_0x509e24(0xf2)?_0x4d756e[_0x509e24(0x17e)][_0x509e24(0xcf)]:'';if(!_0x5f3049)continue;for(const _0x7ab185 of _0x5f3049[_0x509e24(0x14d)](_0x458362)){let _0x4be644=parseFloat(_0x7ab185[0x1]);if(_0x7ab185[0x0]['toLowerCase']()['includes']('k'))_0x4be644=_0x4be644*0x3e8;_0x12e5e2+=Math[_0x509e24(0x152)](_0x4be644);}}catch{}}}const _0x2d2ae4=loadSessionsState(),_0x25565b=_0x2d2ae4[_0x597e46],_0x45eb89=_0x25565b?_0x25565b['lineCount']:0x0,_0x5e992f=_0x25565b?_0x25565b[_0x509e24(0x105)]||0x0:0x0;if(_0x45eb89>0x0&&_0x478d80>_0x45eb89&&_0x5e992f>0x0){const _0x3f5b1c=_0x509e24(0x167)+_0x2b1d7d;tracker_1[_0x509e24(0x184)]['logExecution'](_0x3f5b1c,'A'[_0x509e24(0x148)](_0x5e992f*0x4),'',0x0,undefined,[_0x509e24(0xe4)+_0x2b1d7d,_0x509e24(0x16f),_0x2b1d7d,_0x509e24(0x140)]);}const _0x5cd9d5=_0x25565b&&_0x25565b[_0x509e24(0xf4)]!==undefined?_0x25565b[_0x509e24(0xf4)]:0x0,_0x5cda2a=Math[_0x509e24(0xdc)](_0x5cd9d5,_0x12e5e2);saveSessionStateItem(_0x597e46,_0x478d80,_0x5cda2a,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x5d6361,_0x10b668){const _0x3efa0f=a0_0xd76980;try{if(!fs[_0x3efa0f(0xfc)](_0x5d6361))return{'ok':![],'reason':'Session\x20file\x20not\x20found'};const _0x33236d=path[_0x3efa0f(0x114)](_0x5d6361)['toLowerCase']();if(_0x33236d!==_0x3efa0f(0x138)&&_0x33236d!=='.jsonl'&&_0x33236d!==_0x3efa0f(0x10d))return{'ok':![],'reason':'Unsupported\x20format\x20\x27'+(_0x33236d||_0x3efa0f(0x11b))+'\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)'};const _0x485cba=fs[_0x3efa0f(0x135)](_0x5d6361,_0x3efa0f(0x125)),_0x290db0=Buffer[_0x3efa0f(0x113)](_0x485cba,'utf8'),_0x57cf11=path[_0x3efa0f(0xcc)](_0x5d6361,_0x33236d);let _0x5884fc=_0x485cba,_0xf5a20a=![];if(_0x33236d===_0x3efa0f(0x138)){const _0x453070=JSON[_0x3efa0f(0x136)](_0x485cba),_0x27d68a=Array[_0x3efa0f(0x123)](_0x453070[_0x3efa0f(0x162)])?_0x453070[_0x3efa0f(0x162)]:Array['isArray'](_0x453070)?_0x453070:null;if(_0x27d68a){for(const _0x28d796 of _0x27d68a){const _0x2134d5=compressMessageContent(_0x28d796,_0x57cf11,_0x10b668);if(_0x2134d5[_0x3efa0f(0x164)])_0xf5a20a=!![];}if(_0xf5a20a)_0x5884fc=JSON[_0x3efa0f(0xea)](_0x453070,null,0x2);}}else{const _0x5bd07a=_0x485cba[_0x3efa0f(0x134)]('\x0a'),_0x386563=[];for(let _0x5a8b50 of _0x5bd07a){if(!_0x5a8b50[_0x3efa0f(0x10a)]()){_0x386563[_0x3efa0f(0x17f)](_0x5a8b50);continue;}try{const _0x26caeb=JSON[_0x3efa0f(0x136)](_0x5a8b50),_0xb5f2b8=_0x26caeb[_0x3efa0f(0x17e)]||_0x26caeb;if(_0xb5f2b8){const _0x4c7c65=compressMessageContent(_0xb5f2b8,_0x57cf11,_0x10b668);_0x4c7c65[_0x3efa0f(0x164)]&&(_0xf5a20a=!![],_0x5a8b50=JSON[_0x3efa0f(0xea)](_0x26caeb));}}catch{}_0x386563[_0x3efa0f(0x17f)](_0x5a8b50);}if(_0xf5a20a)_0x5884fc=_0x386563['join']('\x0a');}const _0x1330c8=Buffer[_0x3efa0f(0x113)](_0x5884fc,_0x3efa0f(0x125)),_0x376448=path[_0x3efa0f(0xe3)](path[_0x3efa0f(0x172)](_0x5d6361),_0x57cf11+'.compact'+_0x33236d);fs['writeFileSync'](_0x376448,_0x5884fc,'utf8');const _0x27d928=Math[_0x3efa0f(0x133)](_0x290db0/0x4),_0x3a7cea=Math[_0x3efa0f(0x133)](_0x1330c8/0x4),_0x3cf2ed=Math[_0x3efa0f(0xdc)](0x0,_0x27d928-_0x3a7cea),_0x31c3f7=_0x290db0>0x0?Math['round']((0x1-_0x1330c8/_0x290db0)*0x3e8)/0xa:0x0;return _0x3cf2ed>0x0&&tracker_1['tracker']['logExecution'](_0x3efa0f(0xe6)+_0x10b668,_0x485cba,_0x5884fc,_0x3cf2ed,undefined,[_0x3efa0f(0xe4)+_0x10b668,_0x3efa0f(0x16f),_0x10b668,'compact_copy']),{'ok':!![],'compactPath':_0x376448,'rawBytes':_0x290db0,'compressedBytes':_0x1330c8,'rawTokens':_0x27d928,'compressedTokens':_0x3a7cea,'savedTokens':_0x3cf2ed,'reductionPct':_0x31c3f7};}catch(_0x56eefc){return{'ok':![],'reason':_0x56eefc?.[_0x3efa0f(0x17e)]||_0x3efa0f(0x139)};}}function compactLiveSession(_0x526b43,_0x521ae6){const _0x2674fb=a0_0xd76980;try{if(!fs[_0x2674fb(0xfc)](_0x526b43))return{'ok':![],'savedTokens':0x0,'reason':'File\x20not\x20found'};const _0x31f63b=path[_0x2674fb(0x114)](_0x526b43)[_0x2674fb(0x17a)]();if(_0x31f63b!=='.json'&&_0x31f63b!==_0x2674fb(0xd4)&&_0x31f63b!=='.json1')return{'ok':![],'savedTokens':0x0,'reason':_0x2674fb(0x169)};const _0x25e496=fs[_0x2674fb(0x135)](_0x526b43,'utf8'),_0x507ffe=Buffer[_0x2674fb(0x113)](_0x25e496,'utf8'),_0x3937da=Math['ceil'](_0x507ffe/0x4),_0x148574=path[_0x2674fb(0xcc)](_0x526b43,_0x31f63b);let _0x1ba49f=_0x25e496,_0x4fa5b6=![];if(_0x31f63b===_0x2674fb(0x138)){const _0xd569fc=JSON['parse'](_0x25e496),_0x179935=Array[_0x2674fb(0x123)](_0xd569fc['messages'])?_0xd569fc[_0x2674fb(0x162)]:Array['isArray'](_0xd569fc)?_0xd569fc:null;if(_0x179935){for(const _0x4a273c of _0x179935){const _0x415596=compressMessageContent(_0x4a273c,_0x148574,_0x521ae6);if(_0x415596[_0x2674fb(0x164)])_0x4fa5b6=!![];}const {compressConversation:_0x2047b2}=require(_0x2674fb(0x126)),_0x3f1175=_0x2047b2(_0x179935,0x9c40);_0x3f1175[_0x2674fb(0x14e)]>0x0&&(_0x4fa5b6=!![],Array[_0x2674fb(0x123)](_0xd569fc[_0x2674fb(0x162)])?_0xd569fc['messages']=_0x3f1175['messages']:_0x1ba49f=JSON[_0x2674fb(0xea)](_0x3f1175['messages'],null,0x2)),_0x4fa5b6&&!Array[_0x2674fb(0x123)](_0xd569fc)&&(_0x1ba49f=JSON['stringify'](_0xd569fc,null,0x2));}}else{const _0x28975e=_0x25e496[_0x2674fb(0x134)]('\x0a'),_0x4d0591=[],_0x2f6b2f=[];for(const _0x42fbd6 of _0x28975e){if(!_0x42fbd6[_0x2674fb(0x10a)]())continue;try{const _0x5d18e1=JSON[_0x2674fb(0x136)](_0x42fbd6);_0x4d0591[_0x2674fb(0x17f)](_0x5d18e1);const _0x51f465=_0x5d18e1[_0x2674fb(0x17e)]||_0x5d18e1;_0x51f465&&typeof _0x51f465['role']===_0x2674fb(0xf2)&&_0x2f6b2f[_0x2674fb(0x17f)](_0x51f465);}catch{}}for(const _0x5b30f8 of _0x2f6b2f){const _0x172e0e=compressMessageContent(_0x5b30f8,_0x148574,_0x521ae6);if(_0x172e0e[_0x2674fb(0x164)])_0x4fa5b6=!![];}const {compressConversation:_0xb0152e}=require(_0x2674fb(0x126)),_0x33eedf=_0xb0152e(_0x2f6b2f,0x9c40);if(_0x33eedf[_0x2674fb(0x14e)]>0x0||_0x4fa5b6){const _0x2e177f=[];for(const _0x16fa37 of _0x4d0591){const _0xf41202=_0x16fa37[_0x2674fb(0x17e)]||_0x16fa37;if(_0xf41202&&typeof _0xf41202[_0x2674fb(0x112)]===_0x2674fb(0xf2)){const _0x55f8fd=_0x33eedf[_0x2674fb(0x162)]['find'](_0x2d8797=>_0x2d8797===_0xf41202);_0x55f8fd?(_0x16fa37[_0x2674fb(0x17e)]?_0x16fa37[_0x2674fb(0x17e)]=_0x55f8fd:Object['assign'](_0x16fa37,_0x55f8fd),_0x2e177f[_0x2674fb(0x17f)](JSON['stringify'](_0x16fa37))):_0x4fa5b6=!![];}else _0x2e177f['push'](JSON['stringify'](_0x16fa37));}_0x1ba49f=_0x2e177f[_0x2674fb(0xe3)]('\x0a'),_0x4fa5b6=!![];}}if(_0x4fa5b6){const _0x433342=Buffer[_0x2674fb(0x113)](_0x1ba49f,_0x2674fb(0x125));fs[_0x2674fb(0x12d)](_0x526b43,_0x1ba49f,_0x2674fb(0x125));const _0xcc810c=Math[_0x2674fb(0x133)](_0x433342/0x4),_0x44495f=Math[_0x2674fb(0xdc)](0x0,_0x3937da-_0xcc810c);if(_0x44495f>0x0){const _0x829439=loadSessionsState(),_0x20aaa1=_0x829439[_0x526b43]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x3e1cca=_0x20aaa1['autoCompactSaved']||0x0,_0x2e0031=_0x3e1cca+_0x44495f;saveSessionStateItem(_0x526b43,_0x20aaa1[_0x2674fb(0x130)],_0x20aaa1[_0x2674fb(0xf4)]||0x0,_0x20aaa1[_0x2674fb(0x111)]||0x0,_0x2e0031,_0x20aaa1[_0x2674fb(0xfe)]||0x0),tracker_1[_0x2674fb(0x184)][_0x2674fb(0xff)](_0x2674fb(0xe6)+_0x521ae6,_0x25e496,_0x1ba49f,_0x44495f,undefined,[_0x2674fb(0xe4)+_0x521ae6,_0x2674fb(0x16f),_0x521ae6,'compact_copy']);}return{'ok':!![],'savedTokens':_0x44495f};}return{'ok':!![],'savedTokens':0x0};}catch(_0x3235a5){return{'ok':![],'savedTokens':0x0,'reason':_0x3235a5[_0x2674fb(0x17e)]||_0x2674fb(0xfd)};}}function installWindowsStartupService(){const _0xdebb21=a0_0xd76980;if(process[_0xdebb21(0x119)]!==_0xdebb21(0x17c))return;try{const _0x4573ee=path[_0xdebb21(0xe3)](os['homedir'](),_0xdebb21(0x13b),_0xdebb21(0x16b),_0xdebb21(0xd5),'Windows',_0xdebb21(0x102),_0xdebb21(0x170),_0xdebb21(0x107));if(!fs[_0xdebb21(0xfc)](_0x4573ee))fs[_0xdebb21(0xec)](_0x4573ee,{'recursive':!![]});const _0x514190=path[_0xdebb21(0xe3)](_0x4573ee,_0xdebb21(0x103)),_0xbaaed7=path['join'](__dirname,'cli.js'),_0x1effaf=_0xbaaed7['replace'](/\\/g,'\x5c\x5c'),_0xb79a5e=_0xdebb21(0x176)+_0x1effaf+_0xdebb21(0x15e);fs[_0xdebb21(0x12d)](_0x514190,_0xb79a5e,_0xdebb21(0x125));}catch{}}function a0_0x5027(_0x25892e,_0x543678){const _0x3808c5=a0_0x3808();return a0_0x5027=function(_0x502742,_0x3d2136){_0x502742=_0x502742-0xca;let _0x22c9e9=_0x3808c5[_0x502742];return _0x22c9e9;},a0_0x5027(_0x25892e,_0x543678);}function startWatcherDaemon(){const _0x3b6132=a0_0xd76980;installWindowsStartupService();try{const {installClaudeHooks:_0x5e8455}=require('./hooks/claude-hook');_0x5e8455();}catch(_0x442216){}const _0x188286=['claude',_0x3b6132(0x14c),_0x3b6132(0x11e),'cursor',_0x3b6132(0x157),_0x3b6132(0x127),_0x3b6132(0x183),_0x3b6132(0x12f),_0x3b6132(0x109)];for(const _0x47d63f of _0x188286){const _0x4c41ec=getAgentStoragePaths(_0x47d63f);for(const _0x179ef2 of _0x4c41ec){if(fs[_0x3b6132(0xfc)](_0x179ef2))try{fs['watch'](_0x179ef2,{'recursive':!![]},(_0xe5049d,_0x2ee9e7)=>{const _0x546533=_0x3b6132;if(!_0x2ee9e7)return;const _0x38c459=path[_0x546533(0xe3)](_0x179ef2,_0x2ee9e7);if(debounceTimers[_0x546533(0xd2)](_0x38c459))clearTimeout(debounceTimers[_0x546533(0x16c)](_0x38c459));const _0x4c0de5=setTimeout(()=>processSessionFile(_0x38c459,_0x47d63f),0x1f4);debounceTimers[_0x546533(0xf6)](_0x38c459,_0x4c0de5);});}catch{}}}setInterval(()=>{const _0x4fbd09=_0x3b6132;for(const _0x919db1 of _0x188286){try{const _0x2b1d00=getLatestSessionFile(_0x919db1);_0x2b1d00&&_0x2b1d00['fullPath']&&processSessionFile(_0x2b1d00[_0x4fbd09(0x13f)],_0x919db1);}catch{}}},0xbb8);const _0x2e4753=()=>{for(const _0x2f2597 of _0x188286){try{const _0x893f7d=getLatestSessionFile(_0x2f2597);_0x893f7d&&_0x893f7d['fullPath']&&compactLiveSession(_0x893f7d['fullPath'],_0x2f2597);}catch{}}};setTimeout(_0x2e4753,0x7d0),setInterval(_0x2e4753,0x2bf20);}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x20b437=a0_0x19ae;(function(_0x2e655c,_0x50b74f){const _0x22deb7=a0_0x19ae,_0x190489=_0x2e655c();while(!![]){try{const _0x5a3c99=parseInt(_0x22deb7(0xa8))/0x1+-parseInt(_0x22deb7(0xc5))/0x2+parseInt(_0x22deb7(0x9f))/0x3*(parseInt(_0x22deb7(0xa5))/0x4)+parseInt(_0x22deb7(0x9d))/0x5*(-parseInt(_0x22deb7(0xb6))/0x6)+-parseInt(_0x22deb7(0xa3))/0x7+parseInt(_0x22deb7(0xba))/0x8+-parseInt(_0x22deb7(0x9a))/0x9*(-parseInt(_0x22deb7(0xb8))/0xa);if(_0x5a3c99===_0x50b74f)break;else _0x190489['push'](_0x190489['shift']());}catch(_0x2e8641){_0x190489['push'](_0x190489['shift']());}}}(a0_0x18a7,0x837aa));Object[a0_0x20b437(0xb3)](exports,a0_0x20b437(0xa2),{'value':!![]}),exports[a0_0x20b437(0xc2)]=filterDockerPs,exports[a0_0x20b437(0xa0)]=filterDockerImages,exports['filterDockerLogs']=filterDockerLogs,exports[a0_0x20b437(0xb9)]=filterKubectl,exports[a0_0x20b437(0xae)]=filterRuff;function filterDockerPs(_0x398e1a){const _0x1fef2c=a0_0x20b437,_0x456732=_0x398e1a[_0x1fef2c(0xa4)]('\x0a')[_0x1fef2c(0xbe)](_0x1f7a02=>_0x1f7a02[_0x1fef2c(0xc1)]()[_0x1fef2c(0xc6)]>0x0);if(_0x456732[_0x1fef2c(0xc6)]===0x0)return _0x1fef2c(0xb0);if(_0x456732[_0x1fef2c(0xc6)]<=0xa)return _0x398e1a[_0x1fef2c(0xc1)]();const _0x30b155=_0x456732[0x0],_0x4d40c1=_0x456732[_0x1fef2c(0xb1)](0x1),_0x2b7153=[];_0x2b7153[_0x1fef2c(0xab)]('Containers:\x20'+_0x4d40c1[_0x1fef2c(0xc6)]+_0x1fef2c(0xbd)),_0x2b7153[_0x1fef2c(0xab)]('');for(const _0x51d871 of _0x4d40c1){const _0x406fc6=_0x51d871[_0x1fef2c(0xa4)](/\s{2,}/);if(_0x406fc6[_0x1fef2c(0xc6)]>=0x5){const _0x3c5116=_0x406fc6[0x0]['substring'](0x0,0xc),_0x5b6a4e=_0x406fc6[0x1],_0x26a18f=_0x406fc6[_0x406fc6[_0x1fef2c(0xc6)]-0x2]||'',_0x556beb=_0x406fc6[_0x406fc6[_0x1fef2c(0xc6)]-0x1]||'';_0x2b7153[_0x1fef2c(0xab)]('\x20\x20'+_0x3c5116+'\x20\x20'+_0x5b6a4e+'\x20\x20'+_0x26a18f+'\x20\x20'+_0x556beb);}else _0x2b7153['push']('\x20\x20'+_0x51d871['trim']());}return _0x2b7153['join']('\x0a');}function a0_0x19ae(_0x4fa2a6,_0x19ff2){const _0x18a797=a0_0x18a7();return a0_0x19ae=function(_0x19aed5,_0xc5d2f){_0x19aed5=_0x19aed5-0x98;let _0x12a7bf=_0x18a797[_0x19aed5];return _0x12a7bf;},a0_0x19ae(_0x4fa2a6,_0x19ff2);}function a0_0x18a7(){const _0xa9c6be=['5132536QToYhW','match','Docker\x20images:\x20','\x20total','filter','startsWith','logs','trim','filterDockerPs','\x0a...\x20[','\x20\x20...\x20(','281124PKpwGP','length','includes','\x20issues\x20in\x20','describe','join','\x20more\x20files','45OJeWEG','\x20more\x20images','\x20\x20...\x20+','4114055wWqMjF','No\x20resources\x20found','1806GTSsHZ','filterDockerImages','Ruff:\x20no\x20issues\x20found','__esModule','5145833IzzDVl','split','2896ADEUKP','...\x20+','Events:','814925WNAunI','\x20more','Ruff:\x20','push','\x20more\x20events','All\x20checks\x20passed','filterRuff','No\x20images\x20found','No\x20containers\x20running','slice','Found\x200\x20error','defineProperty','\x20resources\x20found','\x20lines\x20truncated]\x20...\x0a','6maNzFr','\x20more\x20lines','689380gdTNkt','filterKubectl'];a0_0x18a7=function(){return _0xa9c6be;};return a0_0x18a7();}function filterDockerImages(_0x53e41b){const _0x4bc684=a0_0x20b437,_0x432141=_0x53e41b[_0x4bc684(0xa4)]('\x0a')[_0x4bc684(0xbe)](_0xd08066=>_0xd08066['trim']()['length']>0x0);if(_0x432141['length']<=0x1)return _0x4bc684(0xaf);if(_0x432141['length']<=0xf)return _0x53e41b[_0x4bc684(0xc1)]();const _0x1df121=_0x432141[_0x4bc684(0xb1)](0x1),_0x134499=[_0x4bc684(0xbc)+_0x1df121[_0x4bc684(0xc6)]+'\x20total'];_0x134499[_0x4bc684(0xab)]('');const _0x913977=_0x1df121[_0x4bc684(0xb1)](0x0,0x14);for(const _0x23bcc6 of _0x913977){const _0x5d2348=_0x23bcc6[_0x4bc684(0xa4)](/\s{2,}/);if(_0x5d2348['length']>=0x3){const _0x1e0bdc=_0x5d2348[0x0],_0x4209a6=_0x5d2348[0x1],_0x312525=_0x5d2348[_0x5d2348[_0x4bc684(0xc6)]-0x1]||'';_0x134499[_0x4bc684(0xab)]('\x20\x20'+_0x1e0bdc+':'+_0x4209a6+'\x20\x20'+_0x312525);}else _0x134499['push']('\x20\x20'+_0x23bcc6[_0x4bc684(0xc1)]());}return _0x1df121[_0x4bc684(0xc6)]>0x14&&_0x134499[_0x4bc684(0xab)](_0x4bc684(0x9c)+(_0x1df121[_0x4bc684(0xc6)]-0x14)+_0x4bc684(0x9b)),_0x134499['join']('\x0a');}function filterDockerLogs(_0x8c1d13){const _0x454375=a0_0x20b437,_0x472506=_0x8c1d13[_0x454375(0xa4)]('\x0a');if(_0x472506[_0x454375(0xc6)]<=0x32)return _0x8c1d13;const _0x90900a=[];return _0x90900a[_0x454375(0xab)](..._0x472506[_0x454375(0xb1)](0x0,0x14)),_0x90900a[_0x454375(0xab)](_0x454375(0xc3)+(_0x472506[_0x454375(0xc6)]-0x28)+_0x454375(0xb5)),_0x90900a['push'](..._0x472506['slice'](-0x14)),_0x90900a['push']('\x0a('+_0x472506[_0x454375(0xc6)]+'\x20log\x20lines\x20total)'),_0x90900a[_0x454375(0x98)]('\x0a');}function filterKubectl(_0x46ee11,_0x41448b){const _0x32d2da=a0_0x20b437,_0x205cff=_0x46ee11['split']('\x0a')[_0x32d2da(0xbe)](_0x1ad110=>_0x1ad110[_0x32d2da(0xc1)]()[_0x32d2da(0xc6)]>0x0);if(_0x205cff[_0x32d2da(0xc6)]===0x0)return _0x32d2da(0x9e);if(_0x205cff[_0x32d2da(0xc6)]<=0x14)return _0x46ee11[_0x32d2da(0xc1)]();if(_0x41448b==='get'){const _0x5950f2=_0x205cff[0x0],_0x3fc7ac=_0x205cff[_0x32d2da(0xb1)](0x1),_0x137993=[_0x3fc7ac[_0x32d2da(0xc6)]+_0x32d2da(0xb4),'',_0x5950f2];return _0x3fc7ac[_0x32d2da(0xc6)]<=0x1e?_0x137993[_0x32d2da(0xab)](..._0x3fc7ac):(_0x137993[_0x32d2da(0xab)](..._0x3fc7ac['slice'](0x0,0x19)),_0x137993[_0x32d2da(0xab)](_0x32d2da(0xa6)+(_0x3fc7ac[_0x32d2da(0xc6)]-0x19)+'\x20more\x20resources')),_0x137993[_0x32d2da(0x98)]('\x0a');}if(_0x41448b===_0x32d2da(0xc9)){const _0xb9d9c=[];let _0x254718=![],_0xf991bc=0x0;for(const _0x3f3627 of _0x205cff){if(_0x3f3627[_0x32d2da(0xbf)](_0x32d2da(0xa7))){_0x254718=!![],_0xb9d9c[_0x32d2da(0xab)](_0x3f3627);continue;}if(_0x254718){_0xf991bc++;if(_0xf991bc<=0x5)_0xb9d9c[_0x32d2da(0xab)](_0x3f3627);}else _0xb9d9c['push'](_0x3f3627);}return _0xf991bc>0x5&&_0xb9d9c['push']('\x20\x20...\x20+'+(_0xf991bc-0x5)+_0x32d2da(0xac)),_0xb9d9c[_0x32d2da(0x98)]('\x0a');}if(_0x41448b===_0x32d2da(0xc0))return filterDockerLogs(_0x46ee11);const _0x5b66f5=_0x205cff['slice'](0x0,0x1e);return _0x205cff['length']>0x1e&&_0x5b66f5['push'](_0x32d2da(0xa6)+(_0x205cff[_0x32d2da(0xc6)]-0x1e)+_0x32d2da(0xb7)),_0x5b66f5[_0x32d2da(0x98)]('\x0a');}function filterRuff(_0x186488){const _0x20defc=a0_0x20b437,_0x28be59=_0x186488[_0x20defc(0xa4)]('\x0a')[_0x20defc(0xbe)](_0x3b1579=>_0x3b1579[_0x20defc(0xc1)]()['length']>0x0);if(_0x28be59[_0x20defc(0xc6)]===0x0)return _0x20defc(0xa1);if(_0x186488['includes'](_0x20defc(0xad))||_0x186488[_0x20defc(0xc7)](_0x20defc(0xb2)))return'Ruff:\x20all\x20checks\x20passed';const _0x3e6c0e=_0x186488[_0x20defc(0xbb)](/Found (\d+) error/),_0x4ec93d=_0x3e6c0e?parseInt(_0x3e6c0e[0x1]):_0x28be59[_0x20defc(0xc6)],_0x39ce67={},_0x3c551d=[];for(const _0x33e45f of _0x28be59){const _0x26545b=_0x33e45f['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x26545b){const _0x668f8e=_0x26545b[0x1],_0x4d9f0e=_0x668f8e[_0x20defc(0xa4)](':')[0x0];if(!_0x39ce67[_0x4d9f0e])_0x39ce67[_0x4d9f0e]=[];_0x39ce67[_0x4d9f0e][_0x20defc(0xab)](_0x33e45f);}else _0x3c551d[_0x20defc(0xab)](_0x33e45f);}const _0xc23a5c=Object['keys'](_0x39ce67);if(_0xc23a5c['length']===0x0){if(_0x28be59[_0x20defc(0xc6)]<=0x14)return _0x186488[_0x20defc(0xc1)]();return _0x28be59[_0x20defc(0xb1)](0x0,0xf)[_0x20defc(0x98)]('\x0a')+('\x0a...\x20+'+(_0x28be59[_0x20defc(0xc6)]-0xf)+_0x20defc(0xa9));}const _0x1b379d=[_0x20defc(0xaa)+_0x4ec93d+'\x20issues\x20in\x20'+_0xc23a5c[_0x20defc(0xc6)]+'\x20files'];_0x1b379d[_0x20defc(0xab)]('');const _0xdba2fd=0xa;for(const _0x2df59d of _0xc23a5c['slice'](0x0,_0xdba2fd)){const _0x21488b=_0x39ce67[_0x2df59d];if(_0x21488b[_0x20defc(0xc6)]<=0x3){for(const _0x1ee59e of _0x21488b)_0x1b379d[_0x20defc(0xab)]('\x20\x20'+_0x1ee59e);}else _0x1b379d[_0x20defc(0xab)]('\x20\x20'+_0x21488b[0x0]),_0x1b379d[_0x20defc(0xab)](_0x20defc(0xc4)+_0x21488b[_0x20defc(0xc6)]+_0x20defc(0xc8)+_0x2df59d+')');}return _0xc23a5c['length']>_0xdba2fd&&_0x1b379d[_0x20defc(0xab)](_0x20defc(0x9c)+(_0xc23a5c[_0x20defc(0xc6)]-_0xdba2fd)+_0x20defc(0x99)),_0x1b379d[_0x20defc(0x98)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x3a631b=a0_0x32b9;(function(_0x50b6db,_0x1003db){const _0x125144=a0_0x32b9,_0x2a32fa=_0x50b6db();while(!![]){try{const _0x46dd3c=parseInt(_0x125144(0x98))/0x1+-parseInt(_0x125144(0x84))/0x2+parseInt(_0x125144(0xa2))/0x3*(parseInt(_0x125144(0xa4))/0x4)+parseInt(_0x125144(0x9a))/0x5+-parseInt(_0x125144(0x7c))/0x6*(parseInt(_0x125144(0x7f))/0x7)+-parseInt(_0x125144(0x8f))/0x8+parseInt(_0x125144(0x7b))/0x9;if(_0x46dd3c===_0x1003db)break;else _0x2a32fa['push'](_0x2a32fa['shift']());}catch(_0x224db9){_0x2a32fa['push'](_0x2a32fa['shift']());}}}(a0_0x4750,0xf1922));Object[a0_0x3a631b(0x97)](exports,a0_0x3a631b(0xa9),{'value':!![]}),exports[a0_0x3a631b(0x8c)]=stripAnsi,exports[a0_0x3a631b(0x80)]=collapseDuplicates,exports[a0_0x3a631b(0x8a)]=collapseWhitespace,exports[a0_0x3a631b(0x9b)]=stripComments,exports[a0_0x3a631b(0x7e)]=smartCrushJson,exports[a0_0x3a631b(0x8d)]=softTruncate;function a0_0x32b9(_0x472f8f,_0xc2c6e9){const _0x475023=a0_0x4750();return a0_0x32b9=function(_0x32b9db,_0x173cac){_0x32b9db=_0x32b9db-0x79;let _0x3665fa=_0x475023[_0x32b9db];return _0x3665fa;},a0_0x32b9(_0x472f8f,_0xc2c6e9);}function stripAnsi(_0x54f112){const _0x3804d6=a0_0x3a631b,_0x58d5f2=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x54f112[_0x3804d6(0x81)](_0x58d5f2,'');}function collapseDuplicates(_0x53eb78){const _0xce350b=a0_0x3a631b,_0x393d5f=_0x53eb78['split']('\x0a');if(_0x393d5f[_0xce350b(0x9f)]<=0x1)return _0x53eb78;const _0xa9735c=[];let _0x334cb6=_0x393d5f[0x0],_0x3f516e=0x1;for(let _0x267573=0x1;_0x267573<_0x393d5f[_0xce350b(0x9f)];_0x267573++){const _0x294776=_0x393d5f[_0x267573];_0x294776===_0x334cb6&&_0x294776[_0xce350b(0xa7)]()[_0xce350b(0x9f)]>0x0?_0x3f516e++:(_0x3f516e>0x1?_0xa9735c[_0xce350b(0x95)](_0x334cb6+_0xce350b(0x79)+_0x3f516e+']'):_0xa9735c[_0xce350b(0x95)](_0x334cb6),_0x334cb6=_0x294776,_0x3f516e=0x1);}return _0x3f516e>0x1?_0xa9735c[_0xce350b(0x95)](_0x334cb6+_0xce350b(0x79)+_0x3f516e+']'):_0xa9735c['push'](_0x334cb6),_0xa9735c[_0xce350b(0x85)]('\x0a');}function collapseWhitespace(_0x38e42a){const _0x20837f=a0_0x3a631b;let _0x9465fc=_0x38e42a[_0x20837f(0x81)](/[ \t]+$/gm,'');return _0x9465fc=_0x9465fc[_0x20837f(0x81)](/\n{4,}/g,_0x20837f(0x87)),_0x9465fc;}function stripComments(_0x227166,_0x44b035){const _0x31ca98=a0_0x3a631b;if(!_0x44b035)return _0x227166;const _0x271a58=_0x227166[_0x31ca98(0x94)]('\x0a');if(_0x271a58[_0x31ca98(0x9f)]<=0x96)return _0x227166;const _0x177a66={'.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*#(?!!)/},_0x804a29=_0x177a66[_0x44b035[_0x31ca98(0x8e)]()];if(!_0x804a29)return _0x227166;const _0x199490=_0x271a58[_0x31ca98(0x89)](_0x50742f=>!_0x804a29[_0x31ca98(0x9e)](_0x50742f));return _0x199490['join']('\x0a');}function a0_0x4750(){const _0x34a3e3=['collapseDuplicates','replace','sha','\x20fields,\x20showing\x20','3454552fNQhGm','join','\x20items,\x20','\x0a\x0a\x0a','resolved','filter','collapseWhitespace','parse','stripAnsi','softTruncate','toLowerCase','4024200cltulJ','min','dev','slice','includes','split','push','\x0a...\x20[TrimPrompt:\x20Truncated\x20','defineProperty','1663123VqkPtp','\x20characters\x20of\x20output]\x20...\x0a','269890FtAdsc','stripComments','signature','map','test','length','stringify','isArray','681MDORMa','hash','25492NdRlAw','startsWith','object','trim','funding','__esModule','\x20[x','...\x20+','4847274ziYCpn','6SgIJwQ','integrity','smartCrushJson','3378081MYwmSF'];a0_0x4750=function(){return _0x34a3e3;};return a0_0x4750();}function smartCrushJson(_0x22bcad){const _0x11b2a0=a0_0x3a631b;try{const _0x46ef3d=_0x22bcad['trim']();if(!_0x46ef3d[_0x11b2a0(0xa5)]('['))return null;const _0x437fe1=JSON[_0x11b2a0(0x8b)](_0x46ef3d);if(!Array[_0x11b2a0(0xa1)](_0x437fe1)||_0x437fe1[_0x11b2a0(0x9f)]<0x3)return null;if(typeof _0x437fe1[0x0]!==_0x11b2a0(0xa6)||_0x437fe1[0x0]===null)return null;const _0x39ab53=Object['keys'](_0x437fe1[0x0]);if(_0x39ab53[_0x11b2a0(0x9f)]===0x0)return null;const _0x3274fc=_0x39ab53[_0x11b2a0(0x89)](_0x168445=>{const _0x9c482d=_0x11b2a0,_0x5f3d5f=_0x168445[_0x9c482d(0x8e)]();return!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x88))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x7d))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x82))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0xa3))&&!_0x5f3d5f['includes']('checksum')&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x9c))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x91))&&_0x5f3d5f!==_0x9c482d(0xa8)&&_0x5f3d5f!=='engines'&&_0x5f3d5f!=='bugs'&&_0x5f3d5f!=='repository';})['slice'](0x0,0x6);if(_0x3274fc[_0x11b2a0(0x9f)]===0x0)return null;const _0x59c87c=[];_0x59c87c['push'](_0x3274fc['join']('|'));const _0x40dca2=0x1e;for(let _0x2bf041=0x0;_0x2bf041<Math[_0x11b2a0(0x90)](_0x437fe1[_0x11b2a0(0x9f)],_0x40dca2);_0x2bf041++){const _0x518b18=_0x3274fc[_0x11b2a0(0x9d)](_0x43335c=>{const _0x2d27ce=_0x11b2a0,_0x5bc273=_0x437fe1[_0x2bf041][_0x43335c];if(_0x5bc273===null||_0x5bc273===undefined)return'';if(typeof _0x5bc273===_0x2d27ce(0xa6))return JSON[_0x2d27ce(0xa0)](_0x5bc273)['substring'](0x0,0x28);return String(_0x5bc273)['substring'](0x0,0x3c);});_0x59c87c[_0x11b2a0(0x95)](_0x518b18[_0x11b2a0(0x85)]('|'));}_0x437fe1[_0x11b2a0(0x9f)]>_0x40dca2&&_0x59c87c[_0x11b2a0(0x95)](_0x11b2a0(0x7a)+(_0x437fe1[_0x11b2a0(0x9f)]-_0x40dca2)+'\x20more\x20rows');_0x59c87c[_0x11b2a0(0x95)]('\x0a('+_0x437fe1[_0x11b2a0(0x9f)]+_0x11b2a0(0x86)+_0x39ab53['length']+_0x11b2a0(0x83)+_0x3274fc[_0x11b2a0(0x9f)]+'\x20key\x20fields)');const _0x26b462=_0x59c87c[_0x11b2a0(0x85)]('\x0a');if(_0x26b462['length']<_0x46ef3d[_0x11b2a0(0x9f)])return _0x26b462;return null;}catch{return null;}}function softTruncate(_0x469bc9,_0x1e1107=0x4e20){const _0x10083f=a0_0x3a631b;if(_0x469bc9[_0x10083f(0x9f)]<=_0x1e1107)return _0x469bc9;const _0x358552=_0x469bc9[_0x10083f(0x94)]('\x0a');if(_0x358552[_0x10083f(0x9f)]<=0xc8)return _0x469bc9;const _0x1a8a86=0x32,_0x13e8f6=0x96,_0x2dd10d=_0x358552[_0x10083f(0x92)](0x0,_0x1a8a86),_0x22e249=_0x358552[_0x10083f(0x92)](_0x358552[_0x10083f(0x9f)]-_0x13e8f6),_0x2c7bee=_0x469bc9[_0x10083f(0x9f)]-(_0x2dd10d[_0x10083f(0x85)]('\x0a')['length']+_0x22e249[_0x10083f(0x85)]('\x0a')[_0x10083f(0x9f)]);return[..._0x2dd10d,_0x10083f(0x96)+_0x2c7bee+_0x10083f(0x99),..._0x22e249][_0x10083f(0x85)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x394644=a0_0x11cf;(function(_0x80570d,_0x9613a4){const _0x4eecb5=a0_0x11cf,_0x58e2ba=_0x80570d();while(!![]){try{const _0x1651cb=parseInt(_0x4eecb5(0xbf))/0x1+parseInt(_0x4eecb5(0xdc))/0x2*(parseInt(_0x4eecb5(0xc5))/0x3)+parseInt(_0x4eecb5(0xcd))/0x4*(parseInt(_0x4eecb5(0xb1))/0x5)+-parseInt(_0x4eecb5(0xc0))/0x6*(parseInt(_0x4eecb5(0xbd))/0x7)+-parseInt(_0x4eecb5(0xcb))/0x8*(-parseInt(_0x4eecb5(0xd2))/0x9)+parseInt(_0x4eecb5(0xc8))/0xa+parseInt(_0x4eecb5(0xbb))/0xb*(-parseInt(_0x4eecb5(0xae))/0xc);if(_0x1651cb===_0x9613a4)break;else _0x58e2ba['push'](_0x58e2ba['shift']());}catch(_0x2176e7){_0x58e2ba['push'](_0x58e2ba['shift']());}}}(a0_0x57aa,0x6197a));var __createBinding=this&&this[a0_0x394644(0xb8)]||(Object[a0_0x394644(0xde)]?function(_0x22d98a,_0x1da065,_0x29c1d1,_0x498da6){const _0x169ed1=a0_0x394644;if(_0x498da6===undefined)_0x498da6=_0x29c1d1;var _0x468b15=Object[_0x169ed1(0xdb)](_0x1da065,_0x29c1d1);(!_0x468b15||(_0x169ed1(0xbe)in _0x468b15?!_0x1da065[_0x169ed1(0xb3)]:_0x468b15['writable']||_0x468b15['configurable']))&&(_0x468b15={'enumerable':!![],'get':function(){return _0x1da065[_0x29c1d1];}}),Object['defineProperty'](_0x22d98a,_0x498da6,_0x468b15);}:function(_0x1eb799,_0x2479cf,_0x5239e2,_0x19fcf8){if(_0x19fcf8===undefined)_0x19fcf8=_0x5239e2;_0x1eb799[_0x19fcf8]=_0x2479cf[_0x5239e2];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x394644(0xde)]?function(_0x55bb19,_0xa91af){const _0x54725e=a0_0x394644;Object[_0x54725e(0xd1)](_0x55bb19,_0x54725e(0xbc),{'enumerable':!![],'value':_0xa91af});}:function(_0x4cd0ce,_0xefc551){const _0x14e2f8=a0_0x394644;_0x4cd0ce[_0x14e2f8(0xbc)]=_0xefc551;}),__importStar=this&&this[a0_0x394644(0xb5)]||(function(){var _0x3d42ba=function(_0x22579e){const _0x19b207=a0_0x11cf;return _0x3d42ba=Object[_0x19b207(0xc3)]||function(_0x4e39db){const _0x3e6563=_0x19b207;var _0x49da0e=[];for(var _0x36c7b5 in _0x4e39db)if(Object[_0x3e6563(0xd9)][_0x3e6563(0xce)][_0x3e6563(0xd6)](_0x4e39db,_0x36c7b5))_0x49da0e[_0x49da0e[_0x3e6563(0xe0)]]=_0x36c7b5;return _0x49da0e;},_0x3d42ba(_0x22579e);};return function(_0x1a4c9d){const _0xe1dd0c=a0_0x11cf;if(_0x1a4c9d&&_0x1a4c9d[_0xe1dd0c(0xb3)])return _0x1a4c9d;var _0x9d4469={};if(_0x1a4c9d!=null){for(var _0x2d94b4=_0x3d42ba(_0x1a4c9d),_0x264b58=0x0;_0x264b58<_0x2d94b4['length'];_0x264b58++)if(_0x2d94b4[_0x264b58]!==_0xe1dd0c(0xbc))__createBinding(_0x9d4469,_0x1a4c9d,_0x2d94b4[_0x264b58]);}return __setModuleDefault(_0x9d4469,_0x1a4c9d),_0x9d4469;};}());function a0_0x57aa(){const _0x120d2d=['No\x20modifications','getOwnPropertyNames','filterGitDiff','6QLGmGm','slice','+++','7388350zCahau','filterGitStatus','\x20lines\x20of\x20description)','111200pnArpC','join','84HxROAN','hasOwnProperty','push','basename','defineProperty','9NtxKlf','substring','map','\x20\x20...\x20+','call','Clean\x20working\x20tree','\x20\x20...\x20(+','prototype','*\x20Branch:\x20','getOwnPropertyDescriptor','250474uNrBVc','\x20\x20??\x20','create','\x20untracked\x20files)','length','split','4513140qnsNsX','entries','startsWith','31945TtsDQD','match','__esModule','filter','__importStar','/\x20(','---END---','__createBinding','trim','filterGitLog','11YISLLQ','default','3959179EEAnqB','get','204052WzJoNj','6jyEssj','\x20(+'];a0_0x57aa=function(){return _0x120d2d;};return a0_0x57aa();}Object[a0_0x394644(0xd1)](exports,a0_0x394644(0xb3),{'value':!![]}),exports[a0_0x394644(0xc9)]=filterGitStatus,exports[a0_0x394644(0xba)]=filterGitLog,exports[a0_0x394644(0xc4)]=filterGitDiff;const path=__importStar(require('path'));function filterGitStatus(_0x511eae){const _0x4741c=a0_0x394644,_0x86a15f=_0x511eae['split']('\x0a')[_0x4741c(0xd4)](_0x550f34=>_0x550f34[_0x4741c(0xb9)]())['filter'](_0x283639=>_0x283639[_0x4741c(0xe0)]>0x0);if(_0x86a15f[_0x4741c(0xe0)]===0x0)return _0x4741c(0xd7);const _0x451501=[],_0x1c0c25=[],_0xf48e59=[];for(const _0xb307f6 of _0x86a15f){if(_0xb307f6[_0x4741c(0xb0)]('##')){const _0x38cc6d=_0xb307f6['replace'](/^##\s*/,'');_0x451501['push'](_0x4741c(0xda)+_0x38cc6d);}else _0xb307f6[_0x4741c(0xb0)]('??')?_0x1c0c25[_0x4741c(0xcf)](_0xb307f6[_0x4741c(0xd3)](0x3)['trim']()):_0xf48e59[_0x4741c(0xcf)](_0xb307f6);}_0xf48e59[_0x4741c(0xe0)]>0x0&&(_0x451501['push']('\x0aChanges:'),_0x451501[_0x4741c(0xcf)](..._0xf48e59['map'](_0x39c701=>'\x20\x20'+_0x39c701)));if(_0x1c0c25['length']>0x0){_0x451501['push']('\x0aUntracked\x20files:');const _0x101287={},_0x495320=[];for(const _0x43a715 of _0x1c0c25){const _0x39a8bb=path['dirname'](_0x43a715);_0x39a8bb==='.'||_0x39a8bb===''?_0x495320[_0x4741c(0xcf)](_0x43a715):(!_0x101287[_0x39a8bb]&&(_0x101287[_0x39a8bb]=[]),_0x101287[_0x39a8bb][_0x4741c(0xcf)](path[_0x4741c(0xd0)](_0x43a715)));}for(const [_0x55ad42,_0x1a7ca7]of Object[_0x4741c(0xaf)](_0x101287)){if(_0x1a7ca7[_0x4741c(0xe0)]>0x5)_0x451501['push'](_0x4741c(0xdd)+_0x55ad42+_0x4741c(0xb6)+_0x1a7ca7[_0x4741c(0xe0)]+_0x4741c(0xdf));else for(const _0x52d8af of _0x1a7ca7){_0x451501['push']('\x20\x20??\x20'+path['join'](_0x55ad42,_0x52d8af));}}for(const _0x4b0dc5 of _0x495320){_0x451501[_0x4741c(0xcf)](_0x4741c(0xdd)+_0x4b0dc5);}}return _0x451501['join']('\x0a');}function a0_0x11cf(_0x5d8b2f,_0x1c3a82){const _0x57aa19=a0_0x57aa();return a0_0x11cf=function(_0x11cf0e,_0x4b1bc7){_0x11cf0e=_0x11cf0e-0xae;let _0x3859e5=_0x57aa19[_0x11cf0e];return _0x3859e5;},a0_0x11cf(_0x5d8b2f,_0x1c3a82);}function filterGitLog(_0x172310){const _0x409bfc=a0_0x394644,_0xc3732b=_0x172310['split'](_0x409bfc(0xb7))[_0x409bfc(0xd4)](_0x230fbb=>_0x230fbb[_0x409bfc(0xb9)]())[_0x409bfc(0xb4)](_0x2d58ed=>_0x2d58ed[_0x409bfc(0xe0)]>0x0);if(_0xc3732b[_0x409bfc(0xe0)]===0x0)return _0x172310;const _0xcb9691=[];for(const _0x1babc8 of _0xc3732b){const _0x5d1c45=_0x1babc8[_0x409bfc(0xe1)]('\x0a'),_0x3b7d53=_0x5d1c45[0x0]||'',_0x52d5ea=_0x5d1c45[_0x409bfc(0xc6)](0x1)['map'](_0x2b4158=>_0x2b4158[_0x409bfc(0xb9)]())[_0x409bfc(0xb4)](_0x54661d=>_0x54661d[_0x409bfc(0xe0)]>0x0);_0xcb9691[_0x409bfc(0xcf)]('-\x20'+_0x3b7d53),_0x52d5ea[_0x409bfc(0xe0)]>0x0&&(_0xcb9691[_0x409bfc(0xcf)]('\x20\x20'+_0x52d5ea[0x0]),_0x52d5ea[_0x409bfc(0xe0)]>0x1&&_0xcb9691[_0x409bfc(0xcf)](_0x409bfc(0xd8)+(_0x52d5ea['length']-0x1)+_0x409bfc(0xca)));}return _0xcb9691[_0x409bfc(0xcc)]('\x0a');}function filterGitDiff(_0x4e28a1){const _0x4b66eb=a0_0x394644,_0x3bc5c0=_0x4e28a1[_0x4b66eb(0xe1)]('\x0a'),_0x44c698=[];let _0x3e64ec='',_0xcd10ac=0x0,_0x4ac582=0x0,_0x24c484=[];const _0x2e48dc=()=>{const _0x237101=_0x4b66eb;if(_0x3e64ec&&(_0xcd10ac>0x0||_0x4ac582>0x0)){_0x44c698[_0x237101(0xcf)]('[file]\x20'+_0x3e64ec+_0x237101(0xc1)+_0xcd10ac+'\x20-'+_0x4ac582+')');const _0x1b5829=0xa,_0x72b435=_0x24c484[_0x237101(0xc6)](0x0,_0x1b5829);for(const _0x3f9e09 of _0x72b435){_0x44c698[_0x237101(0xcf)]('\x20\x20'+_0x3f9e09);}const _0x1f574b=_0xcd10ac+_0x4ac582-_0x1b5829;_0x1f574b>0x0&&_0x44c698[_0x237101(0xcf)](_0x237101(0xd5)+_0x1f574b+'\x20more\x20modifications');}_0xcd10ac=0x0,_0x4ac582=0x0,_0x24c484=[];};for(const _0x260e9e of _0x3bc5c0){if(_0x260e9e['startsWith']('diff\x20--git')){_0x2e48dc();const _0xb79a9d=_0x260e9e[_0x4b66eb(0xb2)](/\sb\/(.+)$/);_0x3e64ec=_0xb79a9d?_0xb79a9d[0x1]:'unknown_file';}else{if(_0x260e9e[_0x4b66eb(0xb0)]('+')&&!_0x260e9e[_0x4b66eb(0xb0)](_0x4b66eb(0xc7)))_0xcd10ac++,_0x24c484[_0x4b66eb(0xcf)](_0x260e9e);else _0x260e9e[_0x4b66eb(0xb0)]('-')&&!_0x260e9e[_0x4b66eb(0xb0)]('---')&&(_0x4ac582++,_0x24c484['push'](_0x260e9e));}}_0x2e48dc();const _0x4d34ea=_0x44c698[_0x4b66eb(0xcc)]('\x0a');return _0x4d34ea[_0x4b66eb(0xe0)]>0x0?_0x4d34ea:_0x4b66eb(0xc2);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x317af4=a0_0x3900;function a0_0x2f3a(){const _0x4a61ab=['\x20more\x20issues','\x20skipped','\x0aFailures:','5837685HVPtDx','Go\x20test:\x20no\x20test\x20files','startsWith','1645405UEoFTL','Go\x20vet:\x20no\x20issues\x20found','\x20failed,\x20','695970osMiTI','name','match','Go\x20test:\x20all\x20tests\x20passed','===\x20RUN','6OaBMUE','27080jDlmHY','filterGoVet','\x20more\x20failures','min','FAIL','push','1800190yePRqI','join','__esModule','Go\x20test:\x20','12BSjQoX','---\x20SKIP:','649816ylVlIz','\x20issues\x20found','2AQSRzF','no\x20test\x20files','trim','6878664zPDWVm','length','\x20passed,\x20','split','includes','lines','PASS','\x20\x20\x20\x20','Go\x20vet:\x20','...\x20+','9FwkYuD'];a0_0x2f3a=function(){return _0x4a61ab;};return a0_0x2f3a();}(function(_0x55bfa7,_0x6cd532){const _0x2d426c=a0_0x3900,_0x412f0=_0x55bfa7();while(!![]){try{const _0xcda887=-parseInt(_0x2d426c(0x1bf))/0x1*(-parseInt(_0x2d426c(0x1c1))/0x2)+-parseInt(_0x2d426c(0x1bd))/0x3*(parseInt(_0x2d426c(0x1b3))/0x4)+parseInt(_0x2d426c(0x1aa))/0x5*(-parseInt(_0x2d426c(0x1b2))/0x6)+-parseInt(_0x2d426c(0x1a7))/0x7+-parseInt(_0x2d426c(0x1c4))/0x8*(-parseInt(_0x2d426c(0x1a3))/0x9)+parseInt(_0x2d426c(0x1b9))/0xa+-parseInt(_0x2d426c(0x1ad))/0xb;if(_0xcda887===_0x6cd532)break;else _0x412f0['push'](_0x412f0['shift']());}catch(_0x3f3cdb){_0x412f0['push'](_0x412f0['shift']());}}}(a0_0x2f3a,0x6a83a));Object['defineProperty'](exports,a0_0x317af4(0x1bb),{'value':!![]}),exports['filterGoTest']=filterGoTest,exports[a0_0x317af4(0x1b4)]=filterGoVet;function filterGoTest(_0x5ca680){const _0x4f46c5=a0_0x317af4,_0x3fb2cb=_0x5ca680[_0x4f46c5(0x19c)]('\x0a');let _0x28f0fd=0x0,_0x2d834c=0x0,_0x677e1=0x0;const _0x426a1e=[],_0x55396e=[];let _0x536239=null;for(const _0x4325ec of _0x3fb2cb){const _0x1f6cfb=_0x4325ec[_0x4f46c5(0x1c3)](),_0x359cd5=_0x1f6cfb[_0x4f46c5(0x1af)](/^ok\s+\S+\s+[\d.]+s/);if(_0x359cd5){_0x55396e[_0x4f46c5(0x1b8)](_0x1f6cfb);continue;}const _0x372056=_0x1f6cfb['match'](/^FAIL\s+\S+/);if(_0x372056){_0x55396e[_0x4f46c5(0x1b8)](_0x1f6cfb);continue;}const _0x448651=_0x1f6cfb[_0x4f46c5(0x1af)](/^--- PASS:/);if(_0x448651){_0x28f0fd++;continue;}const _0x15d263=_0x1f6cfb['match'](/^--- FAIL:\s+(\S+)/);if(_0x15d263){if(_0x536239)_0x426a1e[_0x4f46c5(0x1b8)](_0x536239);_0x536239={'name':_0x15d263[0x1],'lines':[]},_0x2d834c++;continue;}if(_0x1f6cfb[_0x4f46c5(0x1a9)](_0x4f46c5(0x1be))){_0x677e1++;continue;}_0x536239&&_0x1f6cfb['length']>0x0&&!_0x1f6cfb[_0x4f46c5(0x1a9)]('===\x20RUN')&&_0x536239[_0x4f46c5(0x19e)][_0x4f46c5(0x1b8)](_0x4325ec),_0x1f6cfb[_0x4f46c5(0x1a9)](_0x4f46c5(0x1b1))&&(_0x536239&&(_0x426a1e[_0x4f46c5(0x1b8)](_0x536239),_0x536239=null));}if(_0x536239)_0x426a1e[_0x4f46c5(0x1b8)](_0x536239);if(_0x28f0fd===0x0&&_0x2d834c===0x0&&_0x677e1===0x0){if(_0x5ca680[_0x4f46c5(0x19d)](_0x4f46c5(0x19f))&&!_0x5ca680[_0x4f46c5(0x19d)](_0x4f46c5(0x1b7)))return _0x4f46c5(0x1b0);if(_0x5ca680[_0x4f46c5(0x19d)](_0x4f46c5(0x1c2)))return _0x4f46c5(0x1a8);return _0x5ca680;}if(_0x2d834c===0x0){const _0x1f693f=['Go\x20test:\x20'+_0x28f0fd+'\x20passed'];if(_0x677e1>0x0)_0x1f693f[_0x4f46c5(0x1b8)](_0x677e1+_0x4f46c5(0x1a5));return _0x1f693f[_0x4f46c5(0x1ba)](',\x20');}const _0x3e5a3a=[_0x4f46c5(0x1bc)+_0x28f0fd+_0x4f46c5(0x1c6)+_0x2d834c+_0x4f46c5(0x1ac)+_0x677e1+_0x4f46c5(0x1a5)];if(_0x426a1e[_0x4f46c5(0x1c5)]>0x0){_0x3e5a3a[_0x4f46c5(0x1b8)](_0x4f46c5(0x1a6));const _0x34dfe1=0x3;for(let _0x531a12=0x0;_0x531a12<Math[_0x4f46c5(0x1b6)](_0x426a1e[_0x4f46c5(0x1c5)],_0x34dfe1);_0x531a12++){const _0x3ebd15=_0x426a1e[_0x531a12];_0x3e5a3a[_0x4f46c5(0x1b8)]('\x20\x20'+(_0x531a12+0x1)+'.\x20'+_0x3ebd15[_0x4f46c5(0x1ae)]);for(const _0xfc8a83 of _0x3ebd15['lines']['slice'](0x0,0x5)){_0x3e5a3a[_0x4f46c5(0x1b8)](_0x4f46c5(0x1a0)+_0xfc8a83[_0x4f46c5(0x1c3)]());}_0x3ebd15[_0x4f46c5(0x19e)][_0x4f46c5(0x1c5)]>0x5&&_0x3e5a3a[_0x4f46c5(0x1b8)]('\x20\x20\x20\x20...\x20+'+(_0x3ebd15[_0x4f46c5(0x19e)][_0x4f46c5(0x1c5)]-0x5)+'\x20more\x20lines');}_0x426a1e[_0x4f46c5(0x1c5)]>_0x34dfe1&&_0x3e5a3a[_0x4f46c5(0x1b8)]('\x20\x20...\x20+'+(_0x426a1e[_0x4f46c5(0x1c5)]-_0x34dfe1)+_0x4f46c5(0x1b5));}return _0x3e5a3a[_0x4f46c5(0x1ba)]('\x0a');}function a0_0x3900(_0x13bbba,_0x11e1d4){const _0x2f3a2e=a0_0x2f3a();return a0_0x3900=function(_0x390053,_0x5b07d7){_0x390053=_0x390053-0x19c;let _0x361b6d=_0x2f3a2e[_0x390053];return _0x361b6d;},a0_0x3900(_0x13bbba,_0x11e1d4);}function filterGoVet(_0x5d703a){const _0x1167e9=a0_0x317af4,_0x188cc4=_0x5d703a[_0x1167e9(0x19c)]('\x0a')['filter'](_0x1c47dd=>_0x1c47dd[_0x1167e9(0x1c3)]()['length']>0x0);if(_0x188cc4['length']===0x0)return _0x1167e9(0x1ab);if(_0x188cc4['length']<=0x14)return _0x5d703a[_0x1167e9(0x1c3)]();const _0x4bfc11=[_0x1167e9(0x1a1)+_0x188cc4['length']+_0x1167e9(0x1c0)];return _0x4bfc11[_0x1167e9(0x1b8)](..._0x188cc4['slice'](0x0,0xa)),_0x188cc4[_0x1167e9(0x1c5)]>0xa&&_0x4bfc11[_0x1167e9(0x1b8)](_0x1167e9(0x1a2)+(_0x188cc4[_0x1167e9(0x1c5)]-0xa)+_0x1167e9(0x1a4)),_0x4bfc11[_0x1167e9(0x1ba)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5b53fa=a0_0x1fea;(function(_0x2ee08e,_0x27c3c1){const _0x246fd7=a0_0x1fea,_0x26e15a=_0x2ee08e();while(!![]){try{const _0x45a087=parseInt(_0x246fd7(0x20d))/0x1+-parseInt(_0x246fd7(0x1cf))/0x2*(-parseInt(_0x246fd7(0x1d2))/0x3)+-parseInt(_0x246fd7(0x1e0))/0x4+-parseInt(_0x246fd7(0x215))/0x5*(parseInt(_0x246fd7(0x1eb))/0x6)+-parseInt(_0x246fd7(0x1ae))/0x7*(-parseInt(_0x246fd7(0x1d0))/0x8)+parseInt(_0x246fd7(0x210))/0x9+-parseInt(_0x246fd7(0x1ff))/0xa*(parseInt(_0x246fd7(0x1f1))/0xb);if(_0x45a087===_0x27c3c1)break;else _0x26e15a['push'](_0x26e15a['shift']());}catch(_0x1845ad){_0x26e15a['push'](_0x26e15a['shift']());}}}(a0_0x3c2d,0xd8449));Object[a0_0x5b53fa(0x1ef)](exports,'__esModule',{'value':!![]}),exports[a0_0x5b53fa(0x1f7)]=exports[a0_0x5b53fa(0x1c3)]=void 0x0,exports[a0_0x5b53fa(0x1c0)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require(a0_0x5b53fa(0x1b6)),git_1=require(a0_0x5b53fa(0x1bd)),python_1=require(a0_0x5b53fa(0x1e6)),js_1=require(a0_0x5b53fa(0x212)),shell_1=require(a0_0x5b53fa(0x1f2)),rust_1=require('./rust'),go_1=require('./go'),devops_1=require(a0_0x5b53fa(0x1dd)),redactor_1=require('../redactor'),tracker_1=require(a0_0x5b53fa(0x20b));exports[a0_0x5b53fa(0x1c3)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x5b53fa(0x1f7)]=[];function isFeatureEnabled(_0x373ae8){const _0xf96cba=a0_0x5b53fa;try{const _0x443221=tracker_1[_0xf96cba(0x1f0)][_0xf96cba(0x1df)](),_0x13be10=_0x443221[_0xf96cba(0x1c1)];if(!_0x13be10||_0x13be10[_0x373ae8]===undefined)return!![];return _0x13be10[_0x373ae8]!==![];}catch{return!![];}}function a0_0x3c2d(){const _0x4375c0=['collapseDuplicates','filterKubectl','npm\x20i\x20','./git','trim\x20docker','cargo\x20check','compressOutput','features_enabled','redactor','lastRedactAudit','pnpm\x20install','filterFind','filterGoVet','json_crusher','yarn\x20install','trim\x20pnpm','npm\x20test','filterGrep','trim\x20npx','trim\x20kubectl','stripAnsi','582WHFbgi','112mlGNww','trim\x20go','15669WTcdqR','trim\x20git','trim\x20read','whitespace','text','push','softTruncate','filterCargoBuild','includes','pip\x20install','get','./devops','trim\x20find','getConfig','2504360pEdxri','---','filter','filterJestVitest','pnpm\x20test','ruff\x20','./python','trim\x20ruff','pytest','go\x20test','endsWith','36tdbGhJ','trim\x20grep','filterPipInstall','yadm\x20log','defineProperty','tracker','11RDjOhi','./shell','redact','[lock\x20file]','redactWithAudit','filterNpmInstall','lastFeatures','trim\x20','trim','filterDockerLogs','git\x20diff','[binary','trim\x20cargo','filterDockerImages','8177090PXURHc','trim\x20npm','cargo\x20build','filterLs','length','jest','[code\x20skeleton]','filterCat','startsWith','git\x20show','trim\x20ls','trim\x20glab','../tracker','[minified\x20file]','565394zOyOwf','yadm\x20status','vitest','5363793dqHeBl','filterGitDiff','./js','collapseWhitespace','trim\x20tree','530420WzGnxj','match','ansi_strip','kubectl','skeleton','secretsFound','142436mkWhGs','git\x20log','filterGitLog','trim\x20pytest','filterRuff','trim\x20pip','yarn\x20test','go\x20vet','./generic','toLowerCase','\x20ls\x20','git\x20status'];a0_0x3c2d=function(){return _0x4375c0;};return a0_0x3c2d();}function compressOutput(_0x2bf5b1,_0x3ee989,_0x2c8d2e,_0x49d903=!![]){const _0x3f5371=a0_0x5b53fa,_0x3df028=_0x2bf5b1[_0x3f5371(0x1f9)]();let _0x3ad58c=_0x3ee989;_0x2c8d2e[_0x3f5371(0x1f9)]()['length']>0x0&&(_0x3ad58c=_0x3ee989+'\x0a'+_0x2c8d2e);let _0x3d4043=isFeatureEnabled(_0x3f5371(0x217))?(0x0,generic_1[_0x3f5371(0x1ce)])(_0x3ad58c):_0x3ad58c;const _0x542f37=[];if(_0x3d4043[_0x3f5371(0x203)]<_0x3ad58c[_0x3f5371(0x203)])_0x542f37['push'](_0x3f5371(0x217));const _0x9c9521=(_0x52b2f1,_0x59aa38)=>{const _0x331c38=_0x3f5371;return _0x542f37[_0x331c38(0x1d7)](_0x52b2f1),exports[_0x331c38(0x1f7)]=_0x542f37,_0x59aa38;};if(_0x49d903&&isFeatureEnabled(_0x3f5371(0x1f3))){const _0x363eab=redactor_1[_0x3f5371(0x1c2)][_0x3f5371(0x1f5)](_0x3d4043);_0x3d4043=_0x363eab[_0x3f5371(0x1d6)],exports[_0x3f5371(0x1c3)]={'secretsFound':_0x363eab[_0x3f5371(0x1ad)],'secretTypes':_0x363eab['secretTypes']};if(_0x363eab['secretsFound']>0x0)_0x542f37[_0x3f5371(0x1d7)](_0x3f5371(0x1f3));}else exports[_0x3f5371(0x1c3)]={'secretsFound':0x0,'secretTypes':[]};const _0x5c68bf=_0x3df028[_0x3f5371(0x1b7)](),_0x2c764c=isFeatureEnabled(_0x3f5371(0x1e2));try{if(_0x2c764c){if(_0x5c68bf['includes'](_0x3f5371(0x1b9))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x20e)))return _0x9c9521('filter',(0x0,git_1['filterGitStatus'])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1af))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1ee)))return _0x9c9521('filter',(0x0,git_1[_0x3f5371(0x1b0)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1fb))||_0x5c68bf['includes'](_0x3f5371(0x208))||_0x5c68bf[_0x3f5371(0x1da)]('yadm\x20diff'))return _0x9c9521(_0x3f5371(0x1e2),(0x0,git_1[_0x3f5371(0x211)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1e8))||_0x5c68bf[_0x3f5371(0x216)](/python3?\s+-m\s+pytest/))return _0x9c9521('filter',(0x0,python_1['filterPytest'])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1db))||_0x5c68bf[_0x3f5371(0x1da)]('pip3\x20install'))return _0x9c9521('filter',(0x0,python_1[_0x3f5371(0x1ed)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)]('ruff\x20check')||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1e5)))return _0x9c9521(_0x3f5371(0x1e2),(0x0,devops_1[_0x3f5371(0x1b2)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)]('npm\x20install')||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1bc))||_0x5c68bf['endsWith']('npm\x20i')||_0x5c68bf['includes'](_0x3f5371(0x1c4))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1c8)))return _0x9c9521(_0x3f5371(0x1e2),(0x0,js_1[_0x3f5371(0x1f6)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x204))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x20f)))return _0x9c9521(_0x3f5371(0x1e2),(0x0,js_1['filterJestVitest'])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1ca))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1e4))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1b4))||_0x5c68bf[_0x3f5371(0x1da)]('npm\x20run\x20test'))return _0x9c9521(_0x3f5371(0x1e2),(0x0,js_1[_0x3f5371(0x1e3)])(_0x3d4043));if(_0x5c68bf['includes']('cargo\x20test'))return _0x9c9521(_0x3f5371(0x1e2),(0x0,rust_1['filterCargoTest'])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x201))||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1bf))||_0x5c68bf[_0x3f5371(0x1da)]('cargo\x20clippy'))return _0x9c9521(_0x3f5371(0x1e2),(0x0,rust_1[_0x3f5371(0x1d9)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1e9)))return _0x9c9521(_0x3f5371(0x1e2),(0x0,go_1['filterGoTest'])(_0x3d4043));if(_0x5c68bf['includes'](_0x3f5371(0x1b5)))return _0x9c9521(_0x3f5371(0x1e2),(0x0,go_1[_0x3f5371(0x1c6)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x216)](/docker\s+ps/))return _0x9c9521(_0x3f5371(0x1e2),(0x0,devops_1['filterDockerPs'])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x216)](/docker\s+images/))return _0x9c9521(_0x3f5371(0x1e2),(0x0,devops_1[_0x3f5371(0x1fe)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x216)](/docker\s+logs/))return _0x9c9521(_0x3f5371(0x1e2),(0x0,devops_1[_0x3f5371(0x1fa)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1ab))){const _0x2f0cdf=_0x5c68bf[_0x3f5371(0x216)](/kubectl\s+(get|logs|describe|apply)/),_0x42223b=_0x2f0cdf?_0x2f0cdf[0x1]:_0x3f5371(0x1dc);return _0x9c9521(_0x3f5371(0x1e2),(0x0,devops_1[_0x3f5371(0x1bb)])(_0x3d4043,_0x42223b));}if(_0x5c68bf[_0x3f5371(0x216)](/^(ls|dir)(\s|$)/)||_0x5c68bf[_0x3f5371(0x1da)](_0x3f5371(0x1b8))||_0x5c68bf[_0x3f5371(0x1ea)]('\x20ls'))return _0x9c9521(_0x3f5371(0x1e2),(0x0,shell_1[_0x3f5371(0x202)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x216)](/^tree(\s|$)/)||_0x5c68bf[_0x3f5371(0x1da)]('\x20tree\x20')||_0x5c68bf[_0x3f5371(0x1ea)]('\x20tree'))return _0x9c9521(_0x3f5371(0x1e2),(0x0,shell_1['filterTree'])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x216)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x4300c8=(0x0,shell_1[_0x3f5371(0x206)])(_0x3d4043,_0x3df028);if(_0x4300c8[_0x3f5371(0x1da)](_0x3f5371(0x1f4)))_0x542f37[_0x3f5371(0x1d7)]('lock');else{if(_0x4300c8[_0x3f5371(0x1da)](_0x3f5371(0x1fc))||_0x4300c8[_0x3f5371(0x1da)](_0x3f5371(0x20c)))_0x542f37[_0x3f5371(0x1d7)]('binary');else{if(_0x4300c8['includes'](_0x3f5371(0x205)))_0x542f37[_0x3f5371(0x1d7)](_0x3f5371(0x1ac));else{if(_0x4300c8['includes']('|\x20')&&_0x4300c8[_0x3f5371(0x1da)](_0x3f5371(0x1e1))&&_0x4300c8['length']<_0x3d4043[_0x3f5371(0x203)]*0.5)_0x542f37[_0x3f5371(0x1d7)](_0x3f5371(0x1c7));else{if(_0x4300c8[_0x3f5371(0x1da)]('lines\x20truncated'))_0x542f37['push'](_0x3f5371(0x1e2));}}}}if(_0x4300c8[_0x3f5371(0x203)]<_0x3d4043[_0x3f5371(0x203)]&&!_0x542f37['some'](_0x11efec=>_0x11efec!==_0x3f5371(0x217)&&_0x11efec!==_0x3f5371(0x1f3)))_0x542f37[_0x3f5371(0x1d7)]('filter');return exports['lastFeatures']=_0x542f37,_0x4300c8;}if(_0x5c68bf[_0x3f5371(0x216)](/^find(\s|$)/))return _0x9c9521(_0x3f5371(0x1e2),(0x0,shell_1[_0x3f5371(0x1c5)])(_0x3d4043));if(_0x5c68bf[_0x3f5371(0x216)](/^(grep|rg|ripgrep)(\s|$)/))return _0x9c9521('filter',(0x0,shell_1[_0x3f5371(0x1cb)])(_0x3d4043));}}catch(_0xeae8c3){}return isFeatureEnabled('whitespace')&&(_0x3d4043=(0x0,generic_1[_0x3f5371(0x213)])(_0x3d4043),_0x542f37[_0x3f5371(0x1d7)](_0x3f5371(0x1d5))),_0x3d4043=(0x0,generic_1[_0x3f5371(0x1ba)])(_0x3d4043),_0x3d4043=(0x0,generic_1[_0x3f5371(0x1d8)])(_0x3d4043,0x4e20),exports[_0x3f5371(0x1f7)]=_0x542f37,_0x3d4043;}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_0x5b53fa(0x1d3)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':'trim\x20gh'},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x5b53fa(0x20a)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x5b53fa(0x1fd)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x5b53fa(0x1c9)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x5b53fa(0x200)},{'pattern':/^npx\s+/,'prefix':a0_0x5b53fa(0x1cc)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x5b53fa(0x1d4)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x5b53fa(0x1ec)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x5b53fa(0x209)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x5b53fa(0x214)},{'pattern':/^find\s+/,'prefix':a0_0x5b53fa(0x1de)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x5b53fa(0x1be)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x5b53fa(0x1cd)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x5b53fa(0x1b1)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x5b53fa(0x1e7)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x5b53fa(0x1b3)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x5b53fa(0x1d1)}];function a0_0x1fea(_0x4d5b26,_0x31cdf2){_0x4d5b26=_0x4d5b26-0x1ab;const _0x3c2de6=a0_0x3c2d();let _0x1fea74=_0x3c2de6[_0x4d5b26];return _0x1fea74;}function rewriteCommand(_0x3be6f4){const _0x44e764=a0_0x5b53fa,_0xd70594=_0x3be6f4[_0x44e764(0x1f9)]();if(_0xd70594[_0x44e764(0x207)](_0x44e764(0x1f8)))return _0xd70594;for(const _0x493b85 of REWRITE_RULES){if(_0x493b85['pattern']['test'](_0xd70594))return'trim\x20'+_0xd70594;}return _0xd70594;}
|
|
1
|
+
'use strict';const a0_0x35a65e=a0_0x433f;function a0_0x17a0(){const _0x2e0c42=['lastFeatures','filterJestVitest','\x20tree','trim\x20npx','filterDockerPs','[minified\x20file]','toLowerCase','[lock\x20file]','[binary','trim\x20ruff','match','pnpm\x20install','git\x20diff','18070XqzeRu','includes','filterRuff','npm\x20install','features_enabled','cargo\x20build','../tracker','filter','filterCargoBuild','trim\x20pytest','yadm\x20log','---','vitest','yarn\x20install','pytest','./python','cargo\x20check','defineProperty','filterGoTest','collapseDuplicates','pip\x20install','trim\x20gh','cargo\x20clippy','filterNpmInstall','endsWith','1112688GtqIwL','102151gymkiQ','redactWithAudit','lock','kubectl','filterDockerLogs','filterKubectl','npm\x20i','trim\x20read','filterCargoTest','filterCat','compressOutput','70746jLbSgJ','pattern','length','filterTree','ansi_strip','npm\x20i\x20','trim\x20tree','trim\x20npm','rewriteCommand','1ikZHjl','lastRedactAudit','npm\x20run\x20test','getConfig','trim\x20find','filterGitDiff','get','secretsFound','trim\x20pnpm','filterGrep','trim\x20grep','filterFind','24YzokUk','16DXoHId','./rust','yarn\x20test','trim','./go','387DNyFwJ','redactor','\x20ls','git\x20show','whitespace','secretTypes','go\x20vet','binary','trim\x20cargo','stripAnsi','yadm\x20status','trim\x20','1847197RgAvsL','go\x20test','redact','308548ndTRCt','text','test','softTruncate','./js','trim\x20glab','startsWith','ruff\x20check','tracker','cargo\x20test','pip3\x20install','yadm\x20diff','collapseWhitespace','trim\x20go','trim\x20kubectl','lines\x20truncated','push','../redactor','5VbMzLc','3186648YIKZpV','filterGitStatus','trim\x20pip','[code\x20skeleton]','filterPipInstall','./shell','trim\x20git','git\x20status','filterDockerImages','\x20tree\x20','npm\x20test','./git'];a0_0x17a0=function(){return _0x2e0c42;};return a0_0x17a0();}(function(_0x1c4c43,_0x3066ae){const _0x222ca7=a0_0x433f,_0x1719ad=_0x1c4c43();while(!![]){try{const _0x130c3a=parseInt(_0x222ca7(0x15f))/0x1*(-parseInt(_0x222ca7(0x156))/0x2)+-parseInt(_0x222ca7(0x14a))/0x3+parseInt(_0x222ca7(0x180))/0x4*(-parseInt(_0x222ca7(0x192))/0x5)+parseInt(_0x222ca7(0x193))/0x6+parseInt(_0x222ca7(0x14b))/0x7*(-parseInt(_0x222ca7(0x16c))/0x8)+-parseInt(_0x222ca7(0x171))/0x9*(parseInt(_0x222ca7(0x131))/0xa)+-parseInt(_0x222ca7(0x17d))/0xb*(-parseInt(_0x222ca7(0x16b))/0xc);if(_0x130c3a===_0x3066ae)break;else _0x1719ad['push'](_0x1719ad['shift']());}catch(_0x19ce99){_0x1719ad['push'](_0x1719ad['shift']());}}}(a0_0x17a0,0x438bd));Object[a0_0x35a65e(0x142)](exports,'__esModule',{'value':!![]}),exports[a0_0x35a65e(0x19f)]=exports[a0_0x35a65e(0x160)]=void 0x0,exports[a0_0x35a65e(0x155)]=compressOutput,exports[a0_0x35a65e(0x15e)]=rewriteCommand;const generic_1=require('./generic'),git_1=require(a0_0x35a65e(0x19e)),python_1=require(a0_0x35a65e(0x140)),js_1=require(a0_0x35a65e(0x184)),shell_1=require(a0_0x35a65e(0x198)),rust_1=require(a0_0x35a65e(0x16d)),go_1=require(a0_0x35a65e(0x170)),devops_1=require('./devops'),redactor_1=require(a0_0x35a65e(0x191)),tracker_1=require(a0_0x35a65e(0x137));exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x35a65e(0x19f)]=[];function isFeatureEnabled(_0x14aa75){const _0x330b1d=a0_0x35a65e;try{const _0x5ef6d6=tracker_1[_0x330b1d(0x188)][_0x330b1d(0x162)](),_0x29ddb9=_0x5ef6d6[_0x330b1d(0x135)];if(!_0x29ddb9||_0x29ddb9[_0x14aa75]===undefined)return!![];return _0x29ddb9[_0x14aa75]!==![];}catch{return!![];}}function compressOutput(_0x3465a3,_0x2a297e,_0x60532c,_0x3ed1be=!![]){const _0x3476fa=a0_0x35a65e,_0x54769d=_0x3465a3['trim']();let _0x3157d8=_0x2a297e;_0x60532c[_0x3476fa(0x16f)]()[_0x3476fa(0x158)]>0x0&&(_0x3157d8=_0x2a297e+'\x0a'+_0x60532c);let _0x86af51=isFeatureEnabled(_0x3476fa(0x15a))?(0x0,generic_1[_0x3476fa(0x17a)])(_0x3157d8):_0x3157d8;const _0x5d1ae9=[];if(_0x86af51[_0x3476fa(0x158)]<_0x3157d8[_0x3476fa(0x158)])_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x15a));const _0x55fcbe=(_0x50435e,_0x15318c)=>{const _0xe487bf=_0x3476fa;return _0x5d1ae9['push'](_0x50435e),exports[_0xe487bf(0x19f)]=_0x5d1ae9,_0x15318c;};if(_0x3ed1be&&isFeatureEnabled('redact')){const _0x22911a=redactor_1[_0x3476fa(0x172)][_0x3476fa(0x14c)](_0x86af51);_0x86af51=_0x22911a[_0x3476fa(0x181)],exports[_0x3476fa(0x160)]={'secretsFound':_0x22911a[_0x3476fa(0x166)],'secretTypes':_0x22911a[_0x3476fa(0x176)]};if(_0x22911a[_0x3476fa(0x166)]>0x0)_0x5d1ae9['push'](_0x3476fa(0x17f));}else exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};const _0x40dd85=_0x54769d[_0x3476fa(0x1a5)](),_0x5606a8=isFeatureEnabled(_0x3476fa(0x138));try{if(_0x5606a8){if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19a))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x17b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1[_0x3476fa(0x194)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)]('git\x20log')||_0x40dd85['includes'](_0x3476fa(0x13b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1['filterGitLog'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x130))||_0x40dd85['includes'](_0x3476fa(0x174))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x18b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1[_0x3476fa(0x164)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x13f))||_0x40dd85[_0x3476fa(0x1a9)](/python3?\s+-m\s+pytest/))return _0x55fcbe('filter',(0x0,python_1['filterPytest'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x145))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x18a)))return _0x55fcbe('filter',(0x0,python_1[_0x3476fa(0x197)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x187))||_0x40dd85[_0x3476fa(0x132)]('ruff\x20'))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x133)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x134))||_0x40dd85['includes'](_0x3476fa(0x15b))||_0x40dd85[_0x3476fa(0x149)](_0x3476fa(0x151))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x1aa))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x13e)))return _0x55fcbe(_0x3476fa(0x138),(0x0,js_1[_0x3476fa(0x148)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)]('jest')||_0x40dd85['includes'](_0x3476fa(0x13d)))return _0x55fcbe(_0x3476fa(0x138),(0x0,js_1[_0x3476fa(0x1a0)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19d))||_0x40dd85[_0x3476fa(0x132)]('pnpm\x20test')||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x16e))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x161)))return _0x55fcbe('filter',(0x0,js_1[_0x3476fa(0x1a0)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x189)))return _0x55fcbe(_0x3476fa(0x138),(0x0,rust_1[_0x3476fa(0x153)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x136))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x141))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x147)))return _0x55fcbe(_0x3476fa(0x138),(0x0,rust_1[_0x3476fa(0x139)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x17e)))return _0x55fcbe(_0x3476fa(0x138),(0x0,go_1[_0x3476fa(0x143)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x177)))return _0x55fcbe(_0x3476fa(0x138),(0x0,go_1['filterGoVet'])(_0x86af51));if(_0x40dd85['match'](/docker\s+ps/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x1a3)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/docker\s+images/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x19b)])(_0x86af51));if(_0x40dd85['match'](/docker\s+logs/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x14f)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x14e))){const _0x5b01d=_0x40dd85[_0x3476fa(0x1a9)](/kubectl\s+(get|logs|describe|apply)/),_0x20c95f=_0x5b01d?_0x5b01d[0x1]:_0x3476fa(0x165);return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x150)])(_0x86af51,_0x20c95f));}if(_0x40dd85[_0x3476fa(0x1a9)](/^(ls|dir)(\s|$)/)||_0x40dd85[_0x3476fa(0x132)]('\x20ls\x20')||_0x40dd85[_0x3476fa(0x149)](_0x3476fa(0x173)))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1['filterLs'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/^tree(\s|$)/)||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19c))||_0x40dd85['endsWith'](_0x3476fa(0x1a1)))return _0x55fcbe('filter',(0x0,shell_1[_0x3476fa(0x159)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x120f04=(0x0,shell_1[_0x3476fa(0x154)])(_0x86af51,_0x54769d);if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a6)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x14d));else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a7))||_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a4)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x178));else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x196)))_0x5d1ae9[_0x3476fa(0x190)]('skeleton');else{if(_0x120f04['includes']('|\x20')&&_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x13c))&&_0x120f04[_0x3476fa(0x158)]<_0x86af51[_0x3476fa(0x158)]*0.5)_0x5d1ae9[_0x3476fa(0x190)]('json_crusher');else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x18f)))_0x5d1ae9['push']('filter');}}}}if(_0x120f04[_0x3476fa(0x158)]<_0x86af51[_0x3476fa(0x158)]&&!_0x5d1ae9['some'](_0x3a176c=>_0x3a176c!==_0x3476fa(0x15a)&&_0x3a176c!==_0x3476fa(0x17f)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x138));return exports[_0x3476fa(0x19f)]=_0x5d1ae9,_0x120f04;}if(_0x40dd85[_0x3476fa(0x1a9)](/^find(\s|$)/))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1[_0x3476fa(0x16a)])(_0x86af51));if(_0x40dd85['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1[_0x3476fa(0x168)])(_0x86af51));}}catch(_0x3d4a7d){}return isFeatureEnabled(_0x3476fa(0x175))&&(_0x86af51=(0x0,generic_1[_0x3476fa(0x18c)])(_0x86af51),_0x5d1ae9[_0x3476fa(0x190)]('whitespace')),_0x86af51=(0x0,generic_1[_0x3476fa(0x144)])(_0x86af51),_0x86af51=(0x0,generic_1[_0x3476fa(0x183)])(_0x86af51,0x4e20),exports[_0x3476fa(0x19f)]=_0x5d1ae9,_0x86af51;}function a0_0x433f(_0x251644,_0xd0bf91){const _0x17a066=a0_0x17a0();return a0_0x433f=function(_0x433fe2,_0x5caf00){_0x433fe2=_0x433fe2-0x130;let _0x37cd99=_0x17a066[_0x433fe2];return _0x37cd99;},a0_0x433f(_0x251644,_0xd0bf91);}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_0x35a65e(0x199)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x35a65e(0x146)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x35a65e(0x185)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x35a65e(0x179)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x35a65e(0x167)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x35a65e(0x15d)},{'pattern':/^npx\s+/,'prefix':a0_0x35a65e(0x1a2)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x35a65e(0x152)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x35a65e(0x169)},{'pattern':/^ls(\s|$)/,'prefix':'trim\x20ls'},{'pattern':/^tree(\s|$)/,'prefix':a0_0x35a65e(0x15c)},{'pattern':/^find\s+/,'prefix':a0_0x35a65e(0x163)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x35a65e(0x18e)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x35a65e(0x13a)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x35a65e(0x1a8)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x35a65e(0x195)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x35a65e(0x18d)}];function rewriteCommand(_0x4aeee8){const _0x1b4eb1=a0_0x35a65e,_0x521519=_0x4aeee8[_0x1b4eb1(0x16f)]();if(_0x521519[_0x1b4eb1(0x186)](_0x1b4eb1(0x17c)))return _0x521519;for(const _0x594581 of REWRITE_RULES){if(_0x594581[_0x1b4eb1(0x157)][_0x1b4eb1(0x182)](_0x521519))return'trim\x20'+_0x521519;}return _0x521519;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x466483=a0_0x3dd5;function a0_0x3dd5(_0x5e3b6a,_0x36b860){const _0x1712db=a0_0x1712();return a0_0x3dd5=function(_0x3dd5f6,_0x2c10e0){_0x3dd5f6=_0x3dd5f6-0x171;let _0x5bc9b7=_0x1712db[_0x3dd5f6];return _0x5bc9b7;},a0_0x3dd5(_0x5e3b6a,_0x36b860);}(function(_0x3086a7,_0x548804){const _0x4a2577=a0_0x3dd5,_0x5a5155=_0x3086a7();while(!![]){try{const _0x24fc51=-parseInt(_0x4a2577(0x193))/0x1+parseInt(_0x4a2577(0x171))/0x2*(parseInt(_0x4a2577(0x172))/0x3)+parseInt(_0x4a2577(0x180))/0x4+parseInt(_0x4a2577(0x188))/0x5*(parseInt(_0x4a2577(0x17c))/0x6)+parseInt(_0x4a2577(0x182))/0x7*(-parseInt(_0x4a2577(0x191))/0x8)+parseInt(_0x4a2577(0x18b))/0x9+-parseInt(_0x4a2577(0x197))/0xa*(parseInt(_0x4a2577(0x17e))/0xb);if(_0x24fc51===_0x548804)break;else _0x5a5155['push'](_0x5a5155['shift']());}catch(_0xd1f715){_0x5a5155['push'](_0x5a5155['shift']());}}}(a0_0x1712,0x663f5));Object[a0_0x466483(0x192)](exports,a0_0x466483(0x178),{'value':!![]}),exports[a0_0x466483(0x17a)]=filterNpmInstall,exports[a0_0x466483(0x195)]=filterJestVitest;function a0_0x1712(){const _0x15bc6a=['9110OFoOFY','Test\x20Runner:\x20','12nntDoO','50352XPoWZr','PASS','\x0aFailures:','\x20passed','\x20lines\x20of\x20trace\x20details\x20truncated)','\x20total)','__esModule','Test\x20Suites:','filterNpmInstall','\x20\x20...\x20(','4490634HLnsFy','join','4411qedLyS','length','426420ZBEVHk','FAIL\x20\x20','371eGzmwn','match','push','\x20passed,\x20','startsWith','added\x20','5hXzkzp','up\x20to\x20date','removed\x20','5887368vnwboY','all','includes','FAIL','trim','NPM:\x20Packages\x20verified/installed\x20successfully','94376xiAsWZ','defineProperty','200543ZDGQWj','Tests:','filterJestVitest','replace'];a0_0x1712=function(){return _0x15bc6a;};return a0_0x1712();}function filterNpmInstall(_0x5aa3ce){const _0x4dd490=a0_0x466483,_0x1a5d79=_0x5aa3ce[_0x4dd490(0x196)](/\r/g,'\x0a'),_0x42b231=_0x1a5d79['split']('\x0a'),_0x539dab=[];for(const _0x3b2c04 of _0x42b231){const _0x49165b=_0x3b2c04['trim']();(_0x49165b[_0x4dd490(0x18d)](_0x4dd490(0x187))||_0x49165b[_0x4dd490(0x18d)](_0x4dd490(0x18a))||_0x49165b['includes']('audited\x20')||_0x49165b[_0x4dd490(0x18d)](_0x4dd490(0x189))||_0x49165b[_0x4dd490(0x18d)]('found\x20'))&&(!_0x49165b[_0x4dd490(0x18d)]('%')&&!_0x49165b[_0x4dd490(0x186)]('⠋')&&!_0x49165b[_0x4dd490(0x186)]('⠙')&&_0x539dab[_0x4dd490(0x184)](_0x49165b));}const _0x1fcc2c=_0x539dab[_0x4dd490(0x17d)]('\x0a')['trim']();return _0x1fcc2c['length']>0x0?_0x1fcc2c:_0x4dd490(0x190);}function filterJestVitest(_0x17ebc4){const _0x3e834a=a0_0x466483,_0x3edc84=_0x17ebc4['split']('\x0a');let _0x192dd1=0x0,_0x1e290e=0x0,_0x2ba3a6=0x0;const _0x6483da=[];let _0x6e62b4=![];for(const _0x3569a5 of _0x3edc84){const _0x2371c9=_0x3569a5[_0x3e834a(0x18f)]();if(_0x2371c9[_0x3e834a(0x186)](_0x3e834a(0x194))||_0x2371c9[_0x3e834a(0x18d)]('Test\x20Files:')){const _0x34a6c6=_0x2371c9[_0x3e834a(0x183)](/(\d+)\s+passed/),_0x261a29=_0x2371c9[_0x3e834a(0x183)](/(\d+)\s+failed/),_0x43d08c=_0x2371c9[_0x3e834a(0x183)](/(\d+)\s+total/);if(_0x34a6c6)_0x192dd1=parseInt(_0x34a6c6[0x1]);if(_0x261a29)_0x1e290e=parseInt(_0x261a29[0x1]);if(_0x43d08c)_0x2ba3a6=parseInt(_0x43d08c[0x1]);continue;}(_0x2371c9[_0x3e834a(0x186)]('❯')||_0x2371c9[_0x3e834a(0x186)]('●')||_0x2371c9[_0x3e834a(0x186)](_0x3e834a(0x181)))&&(_0x6e62b4=!![]),_0x6e62b4&&(_0x2371c9[_0x3e834a(0x17f)]>0x0&&!_0x2371c9[_0x3e834a(0x186)](_0x3e834a(0x179))&&!_0x2371c9[_0x3e834a(0x186)]('Tests:')&&_0x6483da[_0x3e834a(0x184)](_0x3569a5));}if(_0x2ba3a6===0x0&&_0x192dd1===0x0&&_0x1e290e===0x0){if(_0x17ebc4[_0x3e834a(0x18d)](_0x3e834a(0x173))&&!_0x17ebc4[_0x3e834a(0x18d)](_0x3e834a(0x18e))){const _0xde710c=_0x17ebc4[_0x3e834a(0x183)](/(\d+)\s+passed/),_0x2696c4=_0xde710c?_0xde710c[0x1]:_0x3e834a(0x18c);return _0x3e834a(0x198)+_0x2696c4+_0x3e834a(0x175);}return _0x17ebc4;}if(_0x1e290e===0x0&&_0x192dd1>0x0)return _0x3e834a(0x198)+_0x192dd1+_0x3e834a(0x175);const _0x8fbca2=[_0x3e834a(0x198)+_0x192dd1+_0x3e834a(0x185)+_0x1e290e+'\x20failed\x20('+_0x2ba3a6+_0x3e834a(0x177)];if(_0x6483da[_0x3e834a(0x17f)]>0x0){_0x8fbca2['push'](_0x3e834a(0x174));const _0x3146a3=0x19,_0x407c82=_0x6483da['slice'](0x0,_0x3146a3);for(const _0x34498e of _0x407c82){_0x8fbca2[_0x3e834a(0x184)]('\x20\x20'+_0x34498e);}_0x6483da[_0x3e834a(0x17f)]>_0x3146a3&&_0x8fbca2['push'](_0x3e834a(0x17b)+(_0x6483da['length']-_0x3146a3)+_0x3e834a(0x176));}return _0x8fbca2['join']('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2617c4=a0_0x2669;(function(_0x359b46,_0x36222d){const _0x5098a8=a0_0x2669,_0x22a66=_0x359b46();while(!![]){try{const _0x499fb0=-parseInt(_0x5098a8(0xbf))/0x1+-parseInt(_0x5098a8(0xa0))/0x2+-parseInt(_0x5098a8(0xb1))/0x3+parseInt(_0x5098a8(0x9c))/0x4+-parseInt(_0x5098a8(0xa2))/0x5+-parseInt(_0x5098a8(0xb5))/0x6+parseInt(_0x5098a8(0xad))/0x7;if(_0x499fb0===_0x36222d)break;else _0x22a66['push'](_0x22a66['shift']());}catch(_0x2dd7fc){_0x22a66['push'](_0x22a66['shift']());}}}(a0_0x1d42,0x3e269));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x2617c4(0xb6)]=filterPytest,exports[a0_0x2617c4(0x9f)]=filterPipInstall;function filterPytest(_0x25893c){const _0x4bff6c=a0_0x2617c4,_0x2fe08c=_0x25893c[_0x4bff6c(0xa7)]('\x0a');let _0x53dcf1=0x0,_0xb94c57=0x0,_0x1b8717=0x0,_0x1457aa=0x0,_0x168ee1=0x0;const _0x2e0081=[];let _0x75b561=[],_0x3a420c=![];for(const _0x100f98 of _0x2fe08c){const _0x5c819a=_0x100f98['trim']();if(_0x5c819a[_0x4bff6c(0xb9)](_0x4bff6c(0xbe))||_0x5c819a[_0x4bff6c(0xb9)](_0x4bff6c(0xa8))){_0x3a420c=!![];continue;}else(_0x5c819a[_0x4bff6c(0xb9)](_0x4bff6c(0xbb))||_0x5c819a[_0x4bff6c(0xb9)]('===')&&_0x5c819a[_0x4bff6c(0xab)](_0x4bff6c(0xc1)))&&(_0x3a420c=![],_0x75b561[_0x4bff6c(0xa3)]>0x0&&(_0x2e0081[_0x4bff6c(0xc4)](_0x75b561),_0x75b561=[]));if(_0x3a420c){if(_0x5c819a[_0x4bff6c(0xb9)]('___'))_0x75b561[_0x4bff6c(0xa3)]>0x0&&(_0x2e0081['push'](_0x75b561),_0x75b561=[]),_0x75b561[_0x4bff6c(0xc4)](_0x5c819a);else _0x5c819a[_0x4bff6c(0xa3)]>0x0&&_0x75b561[_0x4bff6c(0xc4)](_0x100f98);continue;}if(_0x5c819a[_0x4bff6c(0xb9)]('===')&&_0x5c819a['includes']('\x20in\x20')){const _0x529915=_0x5c819a[_0x4bff6c(0xb2)](/(\d+)\s+passed/),_0x405133=_0x5c819a['match'](/(\d+)\s+failed/),_0xcec90a=_0x5c819a['match'](/(\d+)\s+skipped/),_0x4f4d90=_0x5c819a[_0x4bff6c(0xb2)](/(\d+)\s+xfailed/),_0x3a9a6b=_0x5c819a[_0x4bff6c(0xb2)](/(\d+)\s+xpassed/);if(_0x529915)_0x53dcf1=parseInt(_0x529915[0x1]);if(_0x405133)_0xb94c57=parseInt(_0x405133[0x1]);if(_0xcec90a)_0x1b8717=parseInt(_0xcec90a[0x1]);if(_0x4f4d90)_0x1457aa=parseInt(_0x4f4d90[0x1]);if(_0x3a9a6b)_0x168ee1=parseInt(_0x3a9a6b[0x1]);}}_0x75b561[_0x4bff6c(0xa3)]>0x0&&_0x2e0081[_0x4bff6c(0xc4)](_0x75b561);if(_0x53dcf1===0x0&&_0xb94c57===0x0&&_0x1b8717===0x0&&_0x1457aa===0x0&&_0x168ee1===0x0){if(_0x25893c['includes'](_0x4bff6c(0xc1))&&!_0x25893c[_0x4bff6c(0xab)](_0x4bff6c(0xba)))return _0x4bff6c(0xa5);return _0x25893c;}if(_0xb94c57===0x0&&_0x53dcf1>0x0&&_0x1b8717===0x0&&_0x1457aa===0x0&&_0x168ee1===0x0)return'Pytest:\x20'+_0x53dcf1+'\x20passed';const _0x1c7044=[];_0x1c7044[_0x4bff6c(0xc4)](_0x4bff6c(0xaa)+_0x53dcf1+_0x4bff6c(0xa6));if(_0xb94c57>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0xb94c57+_0x4bff6c(0xbc));if(_0x1b8717>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0x1b8717+_0x4bff6c(0xb0));if(_0x1457aa>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0x1457aa+_0x4bff6c(0xa4));if(_0x168ee1>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0x168ee1+_0x4bff6c(0xa9));const _0x38c087=[_0x1c7044['join'](',\x20')];if(_0x2e0081['length']>0x0){_0x38c087[_0x4bff6c(0xc4)](_0x4bff6c(0x9b));const _0x2d7c9e=0x3,_0x3d6cab=_0x2e0081[_0x4bff6c(0xc7)](0x0,_0x2d7c9e);for(let _0x54e8e6=0x0;_0x54e8e6<_0x3d6cab[_0x4bff6c(0xa3)];_0x54e8e6++){const _0x58f105=_0x3d6cab[_0x54e8e6],_0x246a9a=_0x58f105[0x0]['replace'](/_/g,'')[_0x4bff6c(0x9e)]();_0x38c087[_0x4bff6c(0xc4)]('\x20\x20'+(_0x54e8e6+0x1)+_0x4bff6c(0xb7)+_0x246a9a);const _0x294f24=_0x58f105[_0x4bff6c(0xc7)](0x1),_0x9334b5=_0x294f24['filter'](_0x606be0=>{const _0xf8dcc5=_0x4bff6c,_0x21aa70=_0x606be0[_0xf8dcc5(0x9e)]();return _0x21aa70[_0xf8dcc5(0xb9)]('>')||_0x21aa70[_0xf8dcc5(0xb9)](_0xf8dcc5(0xb8))||_0x21aa70[_0xf8dcc5(0xab)](_0xf8dcc5(0xc5))||_0x21aa70[_0xf8dcc5(0xab)](_0xf8dcc5(0xaf));});for(const _0x467291 of _0x9334b5[_0x4bff6c(0xc7)](0x0,0x8)){_0x38c087[_0x4bff6c(0xc4)](_0x4bff6c(0xbd)+_0x467291);}_0x9334b5[_0x4bff6c(0xa3)]>0x8&&_0x38c087['push'](_0x4bff6c(0xac)+(_0x9334b5[_0x4bff6c(0xa3)]-0x8)+_0x4bff6c(0xa1));}_0x2e0081['length']>_0x2d7c9e&&_0x38c087[_0x4bff6c(0xc4)](_0x4bff6c(0xb3)+(_0x2e0081[_0x4bff6c(0xa3)]-_0x2d7c9e)+_0x4bff6c(0xc2));}return _0x38c087[_0x4bff6c(0x9d)]('\x0a');}function a0_0x2669(_0x1c7d01,_0x484f9b){const _0x1d42b2=a0_0x1d42();return a0_0x2669=function(_0x2669d5,_0x407682){_0x2669d5=_0x2669d5-0x9b;let _0x179714=_0x1d42b2[_0x2669d5];return _0x179714;},a0_0x2669(_0x1c7d01,_0x484f9b);}function a0_0x1d42(){const _0x504ddf=['startsWith','failed','===\x20short\x20test\x20summary\x20info\x20===','\x20failed','\x20\x20\x20\x20','===\x20FAILURES\x20===','487102EHUWWq','filter','passed','\x20more\x20failures\x20truncated','Requirement\x20already\x20satisfied','push','.py:','Collecting','slice','\x0aFailures:','77204zSltAC','join','trim','filterPipInstall','679692pbLXVf','\x20lines\x20of\x20stacktrace\x20truncated)','1249325opbaDA','length','\x20xfailed','Pytest:\x20All\x20tests\x20passed','\x20passed','split','===\x20ERRORS\x20===','\x20xpassed\x20(warning!)','Pytest:\x20','includes','\x20\x20\x20\x20...\x20(','10368302sZgWhd','Downloading','AssertionError:','\x20skipped','119919PsMBwN','match','\x20\x20...\x20+','Successfully\x20installed','774792oKtbHH','filterPytest','.\x20[FAIL]\x20','E\x20\x20\x20'];a0_0x1d42=function(){return _0x504ddf;};return a0_0x1d42();}function filterPipInstall(_0x1451bd){const _0x19aa23=a0_0x2617c4,_0x27f317=_0x1451bd[_0x19aa23(0xa7)]('\x0a'),_0x54717e=[];for(const _0x591181 of _0x27f317){const _0xf2e4b9=_0x591181[_0x19aa23(0x9e)]();_0xf2e4b9['startsWith'](_0x19aa23(0xb4))&&_0x54717e[_0x19aa23(0xc4)](_0xf2e4b9);}if(_0x54717e[_0x19aa23(0xa3)]>0x0)return _0x54717e[_0x19aa23(0x9d)]('\x0a');return _0x27f317[_0x19aa23(0xc0)](_0x21aa6c=>{const _0x5dd1b0=_0x19aa23,_0x17e95a=_0x21aa6c[_0x5dd1b0(0x9e)]();return!_0x17e95a[_0x5dd1b0(0xb9)](_0x5dd1b0(0xc6))&&!_0x17e95a[_0x5dd1b0(0xb9)](_0x5dd1b0(0xae))&&!_0x17e95a[_0x5dd1b0(0xab)]('Using\x20cached')&&!_0x17e95a[_0x5dd1b0(0xb9)](_0x5dd1b0(0xc3));})[_0x19aa23(0x9d)]('\x0a')[_0x19aa23(0x9e)]();}
|