trimprompt 1.0.30 → 1.0.31

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/file-watcher.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x517c16=a0_0x2839;function a0_0x3956(){const _0x77adaa=['raw_tokens','conversation_toggles','TrimPrompt\x20Cache\x20Engine','chunk_id','config.json','cwd','sessions','tracker','extname','processSessionFile','Gemini','active_turn','messages','default','copilot','push','.gif','getOwnPropertyNames','github-copilot-cli','.opencode','228543wcKEet','.wal','opencode','isDirectory','mtimeMs','4082089QTwMfx','loadConfig','claude','repeat','conv_','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','startsWith','24bUWtnt','history','endsWith','includes','./hooks/claude-hook','sideCacheSaved','.codex','.jpeg','object','50aMyBON','win32','.lock','codex','.json','get','length','image_','169173uTbCoN','existsSync','ceil','.tmp','cortex','context','.shm','homedir','.gemini','message','.jsonl','round','saveChunk','598970YJgzTH','AppData','call','name','defineProperty','readdirSync','replace','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','.trimprompt','projects','custom_storage_paths','__importStar','loadSessionsState','User','readFileSync','cache','Codex','storage','toLowerCase','Roaming','startWatcherDaemon','.aider.chat.history.md','hasOwnProperty','content','live-conv','parse','trim','openclaw','.openclaw','trim_offload','path','isArray','.json1','statSync','writable','.webp','Application\x20Support','antigravity','max','.cortex','activeSavedTokens','split','watch','getAgentStoragePaths','string','mkdirSync','lineCount','modified','writeFileSync','248bICaqc','.config','logExecution','Summary:\x20Tool\x20result\x20offloaded\x20(','Cursor','Summary:\x20Text\x20block\x20offloaded\x20(','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','official_compact','basename','join','cursor','gemini','isFile','\x20tokens).','21aPldqg','getLatestSessionFile','conv:','__createBinding','stringify','compressed_tokens','1986092bYhRfR','create','248961zIGfUc','fullPath','configurable','1317558XlpmFD','officialCompactSaved','TrimPromptDaemon.vbs','.dat','Microsoft','.claude','media__','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','saveConfig','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','utf8','toISOString','text'];a0_0x3956=function(){return _0x77adaa;};return a0_0x3956();}(function(_0x26eac8,_0x1b0abb){const _0x448785=a0_0x2839,_0x5c5da6=_0x26eac8();while(!![]){try{const _0x3c720a=-parseInt(_0x448785(0x18f))/0x1+parseInt(_0x448785(0x169))/0x2+-parseInt(_0x448785(0x16b))/0x3*(-parseInt(_0x448785(0x19b))/0x4)+-parseInt(_0x448785(0x1b9))/0x5+-parseInt(_0x448785(0x16e))/0x6*(-parseInt(_0x448785(0x163))/0x7)+-parseInt(_0x448785(0x155))/0x8*(-parseInt(_0x448785(0x1ac))/0x9)+parseInt(_0x448785(0x1a4))/0xa*(-parseInt(_0x448785(0x194))/0xb);if(_0x3c720a===_0x1b0abb)break;else _0x5c5da6['push'](_0x5c5da6['shift']());}catch(_0x3fb371){_0x5c5da6['push'](_0x5c5da6['shift']());}}}(a0_0x3956,0x810ee));var __createBinding=this&&this[a0_0x517c16(0x166)]||(Object[a0_0x517c16(0x16a)]?function(_0x1b04a6,_0x231efa,_0x2abc5f,_0x587b8a){const _0x2584a4=a0_0x517c16;if(_0x587b8a===undefined)_0x587b8a=_0x2abc5f;var _0x316232=Object['getOwnPropertyDescriptor'](_0x231efa,_0x2abc5f);(!_0x316232||(_0x2584a4(0x1a9)in _0x316232?!_0x231efa['__esModule']:_0x316232[_0x2584a4(0x1db)]||_0x316232[_0x2584a4(0x16d)]))&&(_0x316232={'enumerable':!![],'get':function(){return _0x231efa[_0x2abc5f];}}),Object[_0x2584a4(0x1bd)](_0x1b04a6,_0x587b8a,_0x316232);}:function(_0x62c5ba,_0x30a797,_0x2249a5,_0xeb8195){if(_0xeb8195===undefined)_0xeb8195=_0x2249a5;_0x62c5ba[_0xeb8195]=_0x30a797[_0x2249a5];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x517c16(0x16a)]?function(_0x3a41c8,_0x5a84cc){const _0x5ce255=a0_0x517c16;Object['defineProperty'](_0x3a41c8,_0x5ce255(0x188),{'enumerable':!![],'value':_0x5a84cc});}:function(_0x4cd396,_0xb624ea){const _0x467439=a0_0x517c16;_0x4cd396[_0x467439(0x188)]=_0xb624ea;}),__importStar=this&&this[a0_0x517c16(0x1c4)]||(function(){var _0x18e172=function(_0x56b473){const _0x45572b=a0_0x2839;return _0x18e172=Object[_0x45572b(0x18c)]||function(_0x3818a3){const _0x199910=_0x45572b;var _0x407d4a=[];for(var _0x3517a0 in _0x3818a3)if(Object['prototype'][_0x199910(0x1cf)][_0x199910(0x1bb)](_0x3818a3,_0x3517a0))_0x407d4a[_0x407d4a[_0x199910(0x1aa)]]=_0x3517a0;return _0x407d4a;},_0x18e172(_0x56b473);};return function(_0x1adc3e){const _0x56268c=a0_0x2839;if(_0x1adc3e&&_0x1adc3e['__esModule'])return _0x1adc3e;var _0x3df53f={};if(_0x1adc3e!=null){for(var _0x391ac0=_0x18e172(_0x1adc3e),_0x5e37dd=0x0;_0x5e37dd<_0x391ac0[_0x56268c(0x1aa)];_0x5e37dd++)if(_0x391ac0[_0x5e37dd]!==_0x56268c(0x188))__createBinding(_0x3df53f,_0x1adc3e,_0x391ac0[_0x5e37dd]);}return __setModuleDefault(_0x3df53f,_0x1adc3e),_0x3df53f;};}());Object[a0_0x517c16(0x1bd)](exports,'__esModule',{'value':!![]}),exports[a0_0x517c16(0x195)]=loadConfig,exports[a0_0x517c16(0x176)]=saveConfig,exports[a0_0x517c16(0x1e4)]=getAgentStoragePaths,exports[a0_0x517c16(0x164)]=getLatestSessionFile,exports[a0_0x517c16(0x1c5)]=loadSessionsState,exports[a0_0x517c16(0x184)]=processSessionFile,exports['installWindowsStartupService']=installWindowsStartupService,exports[a0_0x517c16(0x1cd)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x517c16(0x1d7))),os=__importStar(require('os')),cache_manager_1=require('./cache-manager'),tracker_1=require('./tracker'),baseDir=path[a0_0x517c16(0x15e)](os[a0_0x517c16(0x1b3)](),a0_0x517c16(0x1c1)),configPath=path[a0_0x517c16(0x15e)](baseDir,a0_0x517c16(0x17f)),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 _0x3396aa=a0_0x517c16;try{if(!fs[_0x3396aa(0x1ad)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});if(fs[_0x3396aa(0x1ad)](configPath)){const _0x3dc6ae=JSON[_0x3396aa(0x1d2)](fs[_0x3396aa(0x1c7)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x3dc6ae,'conversation_toggles':{...DEFAULT_CONFIG[_0x3396aa(0x17c)],..._0x3dc6ae[_0x3396aa(0x17c)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x3dc6ae[_0x3396aa(0x1c3)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x7f9a11){const _0x56eded=a0_0x517c16,_0x10b1df=loadConfig(),_0x1df747={..._0x10b1df,..._0x7f9a11,'conversation_toggles':{..._0x10b1df[_0x56eded(0x17c)],..._0x7f9a11['conversation_toggles']||{}},'custom_storage_paths':{..._0x10b1df[_0x56eded(0x1c3)],..._0x7f9a11[_0x56eded(0x1c3)]||{}}};try{if(!fs['existsSync'](baseDir))fs[_0x56eded(0x1e6)](baseDir,{'recursive':!![]});fs[_0x56eded(0x154)](configPath,JSON[_0x56eded(0x167)](_0x1df747,null,0x2),_0x56eded(0x178));}catch{}return _0x1df747;}function a0_0x2839(_0x3b842f,_0xded721){_0x3b842f=_0x3b842f-0x154;const _0x3956e1=a0_0x3956();let _0x2839de=_0x3956e1[_0x3b842f];return _0x2839de;}function getAgentStoragePaths(_0x2f6833){const _0x54baa3=a0_0x517c16,_0x2de53d=loadConfig(),_0x20f67e=_0x2de53d[_0x54baa3(0x1c3)][_0x2f6833];if(_0x20f67e&&fs[_0x54baa3(0x1ad)](_0x20f67e))return[_0x20f67e];const _0x45a174=os[_0x54baa3(0x1b3)](),_0x6e6f93=process['platform']===_0x54baa3(0x1a5),_0x43cb79=process['platform']==='darwin';switch(_0x2f6833){case _0x54baa3(0x196):return[path['join'](_0x45a174,_0x54baa3(0x173),_0x54baa3(0x1c2)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x173),_0x54baa3(0x19c))];case _0x54baa3(0x1a7):return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1a1),_0x54baa3(0x181)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1ba),_0x54baa3(0x1cc),_0x54baa3(0x1c9))];case'gemini':return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1b4),_0x54baa3(0x1de)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1b4)),path['join'](_0x45a174,_0x54baa3(0x1ba),_0x54baa3(0x1cc),_0x54baa3(0x185)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x156),_0x54baa3(0x160))];case'cursor':if(_0x6e6f93)return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1ba),_0x54baa3(0x1cc),'Cursor',_0x54baa3(0x1c6),'workspaceStorage')];if(_0x43cb79)return[path['join'](_0x45a174,'Library',_0x54baa3(0x1dd),_0x54baa3(0x159),_0x54baa3(0x1c6),'workspaceStorage')];return[path['join'](_0x45a174,_0x54baa3(0x156),_0x54baa3(0x159),_0x54baa3(0x1c6),'workspaceStorage')];case'aider':return[process[_0x54baa3(0x180)](),path['join'](_0x45a174,_0x54baa3(0x1ce))];case'copilot':if(_0x6e6f93)return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1ba),'Local',_0x54baa3(0x18d))];return[path[_0x54baa3(0x15e)](_0x45a174,'.config',_0x54baa3(0x18d))];case _0x54baa3(0x1d4):return[path[_0x54baa3(0x15e)](_0x45a174,'.openclaw',_0x54baa3(0x1ca)),path[_0x54baa3(0x15e)](process[_0x54baa3(0x180)](),_0x54baa3(0x1d5),_0x54baa3(0x1b1))];case _0x54baa3(0x191):return[path['join'](_0x45a174,_0x54baa3(0x18e),_0x54baa3(0x181))];case _0x54baa3(0x1b0):return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1e0),_0x54baa3(0x1c8))];default:return[];}}function getLatestSessionFile(_0x1a43b5){const _0x553ded=a0_0x517c16,_0x1a13e0=getAgentStoragePaths(_0x1a43b5);let _0x271c0a=null,_0x40f347=0x0,_0x352e0c=null,_0x1976a4=null;for(const _0x451adb of _0x1a13e0){if(fs[_0x553ded(0x1ad)](_0x451adb)){if(!_0x1976a4)_0x1976a4=_0x451adb;const _0x41932b=(_0x17bb73,_0x5915a8=0x0)=>{const _0x44029e=_0x553ded;if(_0x5915a8>0x3)return;try{const _0x15475a=fs[_0x44029e(0x1be)](_0x17bb73,{'withFileTypes':!![]});for(const _0xba4fe5 of _0x15475a){const _0x48f29a=path[_0x44029e(0x15e)](_0x17bb73,_0xba4fe5['name']);if(_0xba4fe5['isDirectory']())_0x41932b(_0x48f29a,_0x5915a8+0x1);else{if(_0xba4fe5[_0x44029e(0x161)]()&&!_0xba4fe5[_0x44029e(0x1bc)][_0x44029e(0x19a)]('.')){const _0x29d419=_0xba4fe5[_0x44029e(0x1bc)]['toLowerCase']();if(_0x29d419[_0x44029e(0x19d)]('.png')||_0x29d419[_0x44029e(0x19d)]('.jpg')||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x1a2))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x18b))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x1dc))||_0x29d419[_0x44029e(0x19d)]('.pb')||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x190))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x1b2))||_0x29d419[_0x44029e(0x19d)]('.tmp')||_0x29d419['endsWith'](_0x44029e(0x1a6))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x171))||_0x29d419[_0x44029e(0x19a)](_0x44029e(0x174))||_0x29d419[_0x44029e(0x19a)](_0x44029e(0x1ab)))continue;const _0x198627=fs[_0x44029e(0x1da)](_0x48f29a);_0x198627[_0x44029e(0x193)]>_0x40f347&&(_0x40f347=_0x198627[_0x44029e(0x193)],_0x271c0a=_0xba4fe5['name'],_0x352e0c=_0x48f29a,_0x1976a4=_0x451adb);}}}}catch{}};_0x41932b(_0x451adb);}}return{'fileName':_0x271c0a,'lastModified':_0x40f347>0x0?new Date(_0x40f347)[_0x553ded(0x179)]():null,'fullPath':_0x352e0c,'dirPath':_0x1976a4};}const debounceTimers=new Map(),lastLoggedTimes=new Map();function compressMessageContent(_0x395a68,_0x603dc5,_0x5e8100){const _0x130449=a0_0x517c16;let _0x398d05=![],_0x317ddd=0x0;if(!_0x395a68)return{'modified':_0x398d05,'savedTokens':_0x317ddd};const _0x3f170c=_0x47cdd5=>_0x47cdd5[_0x130449(0x1bf)](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x395a68[_0x130449(0x1d0)]===_0x130449(0x1e5)){let _0x5151b2=_0x395a68[_0x130449(0x1d0)],_0x91e9ad=_0x3f170c(_0x5151b2);_0x91e9ad[_0x130449(0x1aa)]<_0x5151b2[_0x130449(0x1aa)]&&(_0x395a68['content']=_0x91e9ad,_0x398d05=!![],_0x317ddd+=Math[_0x130449(0x1ae)]((_0x5151b2[_0x130449(0x1aa)]-_0x91e9ad[_0x130449(0x1aa)])/0x4));if(_0x395a68[_0x130449(0x1d0)]['length']>0x12c&&!_0x395a68['content'][_0x130449(0x19e)](_0x130449(0x17d))){const _0x13c420='Summary:\x20Content\x20offloaded\x20('+Math[_0x130449(0x1ae)](_0x395a68[_0x130449(0x1d0)]['length']/0x4)+_0x130449(0x162),_0x1ddb4c=(0x0,cache_manager_1[_0x130449(0x1b8)])(_0x603dc5,_0x5e8100,_0x395a68[_0x130449(0x1d0)],_0x13c420);_0x395a68[_0x130449(0x1d0)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20('+_0x1ddb4c[_0x130449(0x17b)]+_0x130449(0x199)+_0x1ddb4c[_0x130449(0x17e)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x1ddb4c[_0x130449(0x17e)]+'`\x0a',_0x398d05=!![],_0x317ddd+=Math[_0x130449(0x1df)](0x0,_0x1ddb4c['raw_tokens']-_0x1ddb4c[_0x130449(0x168)]);}}else{if(Array[_0x130449(0x1d8)](_0x395a68[_0x130449(0x1d0)]))for(const _0x28ac20 of _0x395a68['content']){if(_0x28ac20&&typeof _0x28ac20===_0x130449(0x1a3)){if(typeof _0x28ac20[_0x130449(0x17a)]==='string'){let _0x5ef8cb=_0x28ac20[_0x130449(0x17a)],_0x4c5b88=_0x3f170c(_0x5ef8cb);_0x4c5b88[_0x130449(0x1aa)]<_0x5ef8cb['length']&&(_0x28ac20['text']=_0x4c5b88,_0x398d05=!![],_0x317ddd+=Math['ceil']((_0x5ef8cb[_0x130449(0x1aa)]-_0x4c5b88[_0x130449(0x1aa)])/0x4));if(_0x28ac20[_0x130449(0x17a)]['length']>0x12c&&!_0x28ac20[_0x130449(0x17a)][_0x130449(0x19e)]('TrimPrompt\x20Cache\x20Engine')){const _0x56b203=_0x130449(0x15a)+Math[_0x130449(0x1ae)](_0x28ac20['text'][_0x130449(0x1aa)]/0x4)+_0x130449(0x162),_0x30b73a=(0x0,cache_manager_1[_0x130449(0x1b8)])(_0x603dc5,_0x5e8100,_0x28ac20[_0x130449(0x17a)],_0x56b203);_0x28ac20[_0x130449(0x17a)]=_0x130449(0x177)+_0x30b73a[_0x130449(0x17e)]+_0x130449(0x175)+_0x30b73a['chunk_id']+'`\x0a',_0x398d05=!![],_0x317ddd+=Math['max'](0x0,_0x30b73a[_0x130449(0x17b)]-_0x30b73a[_0x130449(0x168)]);}}else{if(typeof _0x28ac20[_0x130449(0x1d0)]===_0x130449(0x1e5)){let _0x51a902=_0x28ac20[_0x130449(0x1d0)],_0x254d58=_0x3f170c(_0x51a902);_0x254d58[_0x130449(0x1aa)]<_0x51a902[_0x130449(0x1aa)]&&(_0x28ac20['content']=_0x254d58,_0x398d05=!![],_0x317ddd+=Math['ceil']((_0x51a902[_0x130449(0x1aa)]-_0x254d58['length'])/0x4));if(_0x28ac20[_0x130449(0x1d0)][_0x130449(0x1aa)]>0x12c&&!_0x28ac20['content']['includes']('TrimPrompt\x20Cache\x20Engine')){const _0x1e83f8=_0x130449(0x158)+Math[_0x130449(0x1ae)](_0x28ac20[_0x130449(0x1d0)][_0x130449(0x1aa)]/0x4)+_0x130449(0x162),_0x4d74fe=(0x0,cache_manager_1[_0x130449(0x1b8)])(_0x603dc5,_0x5e8100,_0x28ac20['content'],_0x1e83f8);_0x28ac20[_0x130449(0x1d0)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x4d74fe[_0x130449(0x17e)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x4d74fe[_0x130449(0x17e)]+'`\x0a',_0x398d05=!![],_0x317ddd+=Math[_0x130449(0x1df)](0x0,_0x4d74fe['raw_tokens']-_0x4d74fe[_0x130449(0x168)]);}}}}}}return{'modified':_0x398d05,'savedTokens':_0x317ddd};}const sessionsStatePath=path[a0_0x517c16(0x15e)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x8527a=a0_0x517c16;try{if(fs[_0x8527a(0x1ad)](sessionsStatePath)){const _0x210193=JSON[_0x8527a(0x1d2)](fs['readFileSync'](sessionsStatePath,_0x8527a(0x178)));if(_0x210193&&typeof _0x210193===_0x8527a(0x1a3))return sessionsStateMemoryCache=_0x210193,_0x210193;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x1936ea,_0x14db71,_0x39a6e9,_0x35a1f2=0x0,_0x5c1dbc=0x0){const _0x1f5192=a0_0x517c16;try{const _0x631ffc=loadSessionsState();_0x631ffc[_0x1936ea]={'lineCount':_0x14db71,'activeSavedTokens':_0x39a6e9,'sideCacheSaved':_0x35a1f2,'officialCompactSaved':_0x5c1dbc},sessionsStateMemoryCache=_0x631ffc;if(!fs[_0x1f5192(0x1ad)](baseDir))fs[_0x1f5192(0x1e6)](baseDir,{'recursive':!![]});const _0x298bce=sessionsStatePath+_0x1f5192(0x1af);fs[_0x1f5192(0x154)](_0x298bce,JSON[_0x1f5192(0x167)](_0x631ffc,null,0x2),'utf8'),fs['renameSync'](_0x298bce,sessionsStatePath);}catch{}}function processSessionFile(_0x478639,_0x2d556e){const _0x58fba8=a0_0x517c16;try{if(!fs[_0x58fba8(0x1ad)](_0x478639))return;const _0x5d6531=fs[_0x58fba8(0x1da)](_0x478639);if(_0x5d6531[_0x58fba8(0x192)]()||_0x5d6531['size']===0x0)return;const _0x1e1b80=loadConfig(),_0x18612f=_0x58fba8(0x198)+_0x2d556e;if(_0x1e1b80['conversation_toggles'][_0x18612f]===![])return;const _0x1ad922=fs[_0x58fba8(0x1c7)](_0x478639,_0x58fba8(0x178));let _0xee39c2=![],_0x4d403a=_0x1ad922,_0x13a07e=0x0;const _0x5a4084=path[_0x58fba8(0x183)](_0x478639)[_0x58fba8(0x1cb)](),_0x52fbed=path[_0x58fba8(0x15d)](_0x478639,_0x5a4084);let _0x866cff=0x1;if(_0x2d556e!==_0x58fba8(0x196)){if(_0x5a4084===_0x58fba8(0x1a8))try{const _0x54e8e9=JSON['parse'](_0x1ad922),_0xc60501=Array[_0x58fba8(0x1d8)](_0x54e8e9[_0x58fba8(0x187)])?_0x54e8e9[_0x58fba8(0x187)]:Array[_0x58fba8(0x1d8)](_0x54e8e9)?_0x54e8e9:null;if(_0xc60501){_0x866cff=_0xc60501['length'];for(let _0x51399a=0x0;_0x51399a<_0xc60501['length'];_0x51399a++){const _0x56c2cf=compressMessageContent(_0xc60501[_0x51399a],_0x52fbed,_0x2d556e);_0x56c2cf[_0x58fba8(0x1e8)]&&(_0xee39c2=!![],_0x13a07e+=_0x56c2cf['savedTokens']);}_0xee39c2&&(_0x4d403a=JSON['stringify'](_0x54e8e9,null,0x2));}}catch{}else{if(_0x5a4084===_0x58fba8(0x1b6)||_0x5a4084===_0x58fba8(0x1d9))try{const _0x1ad439=_0x1ad922['split']('\x0a');_0x866cff=_0x1ad439[_0x58fba8(0x1aa)];const _0x558672=[];for(let _0x46f6a2 of _0x1ad439){if(!_0x46f6a2[_0x58fba8(0x1d3)]()){_0x558672[_0x58fba8(0x18a)](_0x46f6a2);continue;}try{const _0x40907e=JSON[_0x58fba8(0x1d2)](_0x46f6a2),_0x47cb09=_0x40907e[_0x58fba8(0x1b5)]||_0x40907e;if(_0x47cb09){const _0x3e4f27=compressMessageContent(_0x47cb09,_0x52fbed,_0x2d556e);_0x3e4f27[_0x58fba8(0x1e8)]&&(_0xee39c2=!![],_0x13a07e+=_0x3e4f27['savedTokens'],_0x46f6a2=JSON[_0x58fba8(0x167)](_0x40907e));}}catch{}_0x558672[_0x58fba8(0x18a)](_0x46f6a2);}_0xee39c2&&(_0x4d403a=_0x558672[_0x58fba8(0x15e)]('\x0a'));}catch{}}}else(_0x5a4084===_0x58fba8(0x1b6)||_0x5a4084==='.json1')&&(_0x866cff=_0x1ad922[_0x58fba8(0x1e2)]('\x0a')['filter'](Boolean)['length']);let _0xa39ed4=0x0;const _0x4ddc8c=_0x1ad922['matchAll'](/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi);for(const _0x40628f of _0x4ddc8c){let _0x27ff98=parseFloat(_0x40628f[0x1]);_0x40628f[0x0][_0x58fba8(0x1cb)]()['includes']('k')&&(_0x27ff98=_0x27ff98*0x3e8),_0xa39ed4+=Math[_0x58fba8(0x1b7)](_0x27ff98);}const _0x195ae0=loadSessionsState(),_0x289e64=_0x195ae0[_0x478639],_0x15b857=_0x289e64&&_0x289e64[_0x58fba8(0x1a0)]!==undefined?_0x289e64[_0x58fba8(0x1a0)]:0x0,_0x3aec7c=_0x289e64&&_0x289e64['officialCompactSaved']!==undefined?_0x289e64[_0x58fba8(0x16f)]:_0x289e64?_0x289e64[_0x58fba8(0x1e1)]:0x0,_0xc12c6c=_0x289e64?_0x289e64[_0x58fba8(0x1e7)]:0x0,_0x4d65ce=_0x866cff>_0xc12c6c;let _0x505574=_0x15b857,_0x3803e4=Math['max'](_0x3aec7c,_0xa39ed4);if(_0xee39c2){fs[_0x58fba8(0x154)](_0x478639,_0x4d403a,_0x58fba8(0x178)),_0x505574+=_0x13a07e;const _0x4fe9f2=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x4fe9f2,_0x505574,_0x3803e4);const _0xa76acd='x'[_0x58fba8(0x197)](_0x4fe9f2*0x4);tracker_1[_0x58fba8(0x182)]['logExecution'](_0x58fba8(0x165)+_0x2d556e,_0xa76acd,'',0x0,undefined,[_0x58fba8(0x198)+_0x2d556e,_0x58fba8(0x1d1),_0x2d556e,_0x58fba8(0x1d6)]);}else{if(_0xa39ed4>_0x3aec7c){_0x3803e4=_0xa39ed4;const _0x487fe0=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x487fe0,_0x505574,_0x3803e4);const _0x2dda9f='x'['repeat'](_0x487fe0*0x4);tracker_1['tracker'][_0x58fba8(0x157)](_0x58fba8(0x165)+_0x2d556e,_0x2dda9f,'',0x0,undefined,[_0x58fba8(0x198)+_0x2d556e,_0x58fba8(0x1d1),_0x2d556e,_0x58fba8(0x15c)]);}else{if(_0x4d65ce){const _0x2f238d=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x2f238d,_0x505574,_0x3803e4);if(_0x2f238d>0x0){const _0x1e5567='x'[_0x58fba8(0x197)](_0x2f238d*0x4);tracker_1[_0x58fba8(0x182)][_0x58fba8(0x157)]('conv:'+_0x2d556e,_0x1e5567,'',0x0,undefined,[_0x58fba8(0x198)+_0x2d556e,_0x58fba8(0x1d1),_0x2d556e,_0x58fba8(0x186)]);}}else{const _0x58e54d=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x58e54d,_0x505574,_0x3803e4);}}}}catch{}}function installWindowsStartupService(){const _0x2924b7=a0_0x517c16;if(process['platform']!=='win32')return;try{const _0x30a72d=path[_0x2924b7(0x15e)](os[_0x2924b7(0x1b3)](),_0x2924b7(0x1ba),_0x2924b7(0x1cc),_0x2924b7(0x172),'Windows','Start\x20Menu','Programs','Startup');if(!fs[_0x2924b7(0x1ad)](_0x30a72d))fs[_0x2924b7(0x1e6)](_0x30a72d,{'recursive':!![]});const _0x4642c3=path[_0x2924b7(0x15e)](_0x30a72d,_0x2924b7(0x170)),_0x537298=path['join'](__dirname,'cli.js'),_0x9755c8=_0x537298[_0x2924b7(0x1bf)](/\\/g,'\x5c\x5c'),_0x4090b5=_0x2924b7(0x15b)+_0x9755c8+_0x2924b7(0x1c0);fs[_0x2924b7(0x154)](_0x4642c3,_0x4090b5,_0x2924b7(0x178));}catch{}}function startWatcherDaemon(){const _0x41723a=a0_0x517c16;installWindowsStartupService();try{const {installClaudeHooks:_0x243110}=require(_0x41723a(0x19f));_0x243110();}catch(_0x1a748f){}const _0x290522=[_0x41723a(0x196),_0x41723a(0x160),_0x41723a(0x1a7),_0x41723a(0x15f),'aider',_0x41723a(0x189),_0x41723a(0x1d4),'opencode',_0x41723a(0x1b0)];for(const _0x482229 of _0x290522){const _0x295733=getAgentStoragePaths(_0x482229);for(const _0x75994a of _0x295733){if(fs['existsSync'](_0x75994a))try{fs[_0x41723a(0x1e3)](_0x75994a,{'recursive':!![]},(_0x37de0a,_0x4f6ee3)=>{const _0x370748=_0x41723a;if(!_0x4f6ee3)return;const _0x194c25=path[_0x370748(0x15e)](_0x75994a,_0x4f6ee3);if(debounceTimers['has'](_0x194c25))clearTimeout(debounceTimers['get'](_0x194c25));const _0x4b6689=setTimeout(()=>processSessionFile(_0x194c25,_0x482229),0x1f4);debounceTimers['set'](_0x194c25,_0x4b6689);});}catch{}}}setInterval(()=>{const _0x3637d3=_0x41723a;for(const _0x3b1a1f of _0x290522){try{const _0x693e9f=getLatestSessionFile(_0x3b1a1f);_0x693e9f&&_0x693e9f['fullPath']&&processSessionFile(_0x693e9f[_0x3637d3(0x16c)],_0x3b1a1f);}catch{}}},0xbb8);}
1
+ 'use strict';const a0_0x14bc19=a0_0x2798;function a0_0x2798(_0x4cb7f4,_0x3d1f36){const _0x17190b=a0_0x1719();return a0_0x2798=function(_0x27982c,_0x13350c){_0x27982c=_0x27982c-0x18b;let _0xd24a9c=_0x17190b[_0x27982c];return _0xd24a9c;},a0_0x2798(_0x4cb7f4,_0x3d1f36);}(function(_0x340720,_0x2e2967){const _0x59d632=a0_0x2798,_0x50c9b5=_0x340720();while(!![]){try{const _0x40ae42=-parseInt(_0x59d632(0x1c7))/0x1+-parseInt(_0x59d632(0x18b))/0x2*(-parseInt(_0x59d632(0x1d2))/0x3)+parseInt(_0x59d632(0x1ac))/0x4+parseInt(_0x59d632(0x19f))/0x5+-parseInt(_0x59d632(0x1a2))/0x6+parseInt(_0x59d632(0x1ad))/0x7*(parseInt(_0x59d632(0x1cd))/0x8)+-parseInt(_0x59d632(0x20a))/0x9*(parseInt(_0x59d632(0x199))/0xa);if(_0x40ae42===_0x2e2967)break;else _0x50c9b5['push'](_0x50c9b5['shift']());}catch(_0x2fc725){_0x50c9b5['push'](_0x50c9b5['shift']());}}}(a0_0x1719,0x573d0));var __createBinding=this&&this[a0_0x14bc19(0x1f9)]||(Object['create']?function(_0x29b554,_0x501a33,_0x2d9217,_0x556e7e){const _0x43edae=a0_0x14bc19;if(_0x556e7e===undefined)_0x556e7e=_0x2d9217;var _0x29accf=Object[_0x43edae(0x1c0)](_0x501a33,_0x2d9217);(!_0x29accf||(_0x43edae(0x209)in _0x29accf?!_0x501a33['__esModule']:_0x29accf[_0x43edae(0x222)]||_0x29accf[_0x43edae(0x19e)]))&&(_0x29accf={'enumerable':!![],'get':function(){return _0x501a33[_0x2d9217];}}),Object[_0x43edae(0x1c2)](_0x29b554,_0x556e7e,_0x29accf);}:function(_0x31c1c0,_0x4ccfc3,_0x448f12,_0xbf660f){if(_0xbf660f===undefined)_0xbf660f=_0x448f12;_0x31c1c0[_0xbf660f]=_0x4ccfc3[_0x448f12];}),__setModuleDefault=this&&this[a0_0x14bc19(0x218)]||(Object[a0_0x14bc19(0x1f8)]?function(_0x3be507,_0x557529){const _0x20189d=a0_0x14bc19;Object['defineProperty'](_0x3be507,_0x20189d(0x1e6),{'enumerable':!![],'value':_0x557529});}:function(_0x4fff73,_0x4c74ca){_0x4fff73['default']=_0x4c74ca;}),__importStar=this&&this[a0_0x14bc19(0x1ae)]||(function(){var _0x101012=function(_0x3392af){const _0x5b3cfe=a0_0x2798;return _0x101012=Object[_0x5b3cfe(0x1ec)]||function(_0x1e42f2){const _0x40faef=_0x5b3cfe;var _0x2c81fe=[];for(var _0x5f0538 in _0x1e42f2)if(Object['prototype'][_0x40faef(0x219)][_0x40faef(0x224)](_0x1e42f2,_0x5f0538))_0x2c81fe[_0x2c81fe[_0x40faef(0x1f4)]]=_0x5f0538;return _0x2c81fe;},_0x101012(_0x3392af);};return function(_0x524aaf){const _0x42ab40=a0_0x2798;if(_0x524aaf&&_0x524aaf[_0x42ab40(0x1db)])return _0x524aaf;var _0x297c70={};if(_0x524aaf!=null){for(var _0x5c5aea=_0x101012(_0x524aaf),_0x422e22=0x0;_0x422e22<_0x5c5aea[_0x42ab40(0x1f4)];_0x422e22++)if(_0x5c5aea[_0x422e22]!==_0x42ab40(0x1e6))__createBinding(_0x297c70,_0x524aaf,_0x5c5aea[_0x422e22]);}return __setModuleDefault(_0x297c70,_0x524aaf),_0x297c70;};}());Object[a0_0x14bc19(0x1c2)](exports,'__esModule',{'value':!![]}),exports[a0_0x14bc19(0x208)]=loadConfig,exports[a0_0x14bc19(0x1d8)]=saveConfig,exports[a0_0x14bc19(0x1e4)]=getAgentStoragePaths,exports[a0_0x14bc19(0x20f)]=getLatestSessionFile,exports['loadSessionsState']=loadSessionsState,exports['processSessionFile']=processSessionFile,exports['installWindowsStartupService']=installWindowsStartupService,exports[a0_0x14bc19(0x1f5)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x14bc19(0x214))),os=__importStar(require('os')),cache_manager_1=require(a0_0x14bc19(0x223)),tracker_1=require(a0_0x14bc19(0x1a5)),baseDir=path['join'](os[a0_0x14bc19(0x1e3)](),a0_0x14bc19(0x21a)),configPath=path[a0_0x14bc19(0x217)](baseDir,'config.json'),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x6e5ff=a0_0x14bc19;try{if(!fs['existsSync'](baseDir))fs[_0x6e5ff(0x1b6)](baseDir,{'recursive':!![]});if(fs[_0x6e5ff(0x221)](configPath)){const _0xf3414a=JSON[_0x6e5ff(0x1d3)](fs[_0x6e5ff(0x1da)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0xf3414a,'conversation_toggles':{...DEFAULT_CONFIG[_0x6e5ff(0x191)],..._0xf3414a[_0x6e5ff(0x191)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x6e5ff(0x1e1)],..._0xf3414a[_0x6e5ff(0x1e1)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x4d60cd){const _0x5629ea=a0_0x14bc19,_0x2da764=loadConfig(),_0xb64c01={..._0x2da764,..._0x4d60cd,'conversation_toggles':{..._0x2da764[_0x5629ea(0x191)],..._0x4d60cd[_0x5629ea(0x191)]||{}},'custom_storage_paths':{..._0x2da764['custom_storage_paths'],..._0x4d60cd['custom_storage_paths']||{}}};try{if(!fs[_0x5629ea(0x221)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x5629ea(0x20b)](configPath,JSON[_0x5629ea(0x1fa)](_0xb64c01,null,0x2),_0x5629ea(0x1a3));}catch{}return _0xb64c01;}function getAgentStoragePaths(_0xde90d3){const _0x3994a9=a0_0x14bc19,_0x11719d=loadConfig(),_0x5b2081=_0x11719d['custom_storage_paths'][_0xde90d3];if(_0x5b2081&&fs[_0x3994a9(0x221)](_0x5b2081))return[_0x5b2081];const _0x3bebc0=os[_0x3994a9(0x1e3)](),_0xe3aca3=process[_0x3994a9(0x1cc)]===_0x3994a9(0x1c8),_0x30be2c=process['platform']==='darwin';switch(_0xde90d3){case _0x3994a9(0x1e0):return[path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1f2),_0x3994a9(0x202)),path[_0x3994a9(0x217)](_0x3bebc0,'.claude',_0x3994a9(0x1ef))];case'codex':return[path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1e7),_0x3994a9(0x18f)),path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1c6),_0x3994a9(0x1bd),'Codex')];case _0x3994a9(0x1cb):return[path['join'](_0x3bebc0,_0x3994a9(0x1ed),_0x3994a9(0x216)),path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1ed)),path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1c6),'Roaming',_0x3994a9(0x18d)),path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1c3),'gemini')];case _0x3994a9(0x18e):if(_0xe3aca3)return[path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1c6),'Roaming',_0x3994a9(0x1dd),'User','workspaceStorage')];if(_0x30be2c)return[path[_0x3994a9(0x217)](_0x3bebc0,'Library','Application\x20Support',_0x3994a9(0x1dd),'User','workspaceStorage')];return[path['join'](_0x3bebc0,_0x3994a9(0x1c3),'Cursor',_0x3994a9(0x1fb),_0x3994a9(0x21d))];case _0x3994a9(0x211):return[process[_0x3994a9(0x201)](),path['join'](_0x3bebc0,'.aider.chat.history.md')];case _0x3994a9(0x206):if(_0xe3aca3)return[path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x1c6),_0x3994a9(0x1df),_0x3994a9(0x205))];return[path['join'](_0x3bebc0,_0x3994a9(0x1c3),_0x3994a9(0x205))];case _0x3994a9(0x1ba):return[path[_0x3994a9(0x217)](_0x3bebc0,'.openclaw','storage'),path[_0x3994a9(0x217)](process[_0x3994a9(0x201)](),_0x3994a9(0x194),'context')];case _0x3994a9(0x1c4):return[path[_0x3994a9(0x217)](_0x3bebc0,_0x3994a9(0x197),_0x3994a9(0x18f))];case _0x3994a9(0x20d):return[path['join'](_0x3bebc0,_0x3994a9(0x1ce),'cache')];default:return[];}}function getLatestSessionFile(_0x8f90ca){const _0x1e9c3c=a0_0x14bc19,_0x295874=getAgentStoragePaths(_0x8f90ca);let _0x237513=null,_0x35dead=0x0,_0x5cb83c=null,_0x4f1fdc=null;for(const _0x4e172a of _0x295874){if(fs['existsSync'](_0x4e172a)){if(!_0x4f1fdc)_0x4f1fdc=_0x4e172a;const _0x35ff24=(_0x1cf536,_0x2e2bcf=0x0)=>{const _0x269d42=a0_0x2798;if(_0x2e2bcf>0x3)return;try{const _0x41db31=fs['readdirSync'](_0x1cf536,{'withFileTypes':!![]});for(const _0x3b963f of _0x41db31){const _0xfd8639=path[_0x269d42(0x217)](_0x1cf536,_0x3b963f[_0x269d42(0x220)]);if(_0x3b963f[_0x269d42(0x1a4)]())_0x35ff24(_0xfd8639,_0x2e2bcf+0x1);else{if(_0x3b963f[_0x269d42(0x21f)]()&&!_0x3b963f[_0x269d42(0x220)][_0x269d42(0x1f6)]('.')){const _0x51093a=_0x3b963f[_0x269d42(0x220)]['toLowerCase']();if(_0x51093a[_0x269d42(0x215)]('.png')||_0x51093a[_0x269d42(0x215)](_0x269d42(0x1e8))||_0x51093a['endsWith'](_0x269d42(0x1c1))||_0x51093a['endsWith']('.gif')||_0x51093a[_0x269d42(0x215)](_0x269d42(0x1a0))||_0x51093a[_0x269d42(0x215)](_0x269d42(0x21b))||_0x51093a['endsWith']('.wal')||_0x51093a[_0x269d42(0x215)](_0x269d42(0x1cf))||_0x51093a[_0x269d42(0x215)]('.tmp')||_0x51093a[_0x269d42(0x215)](_0x269d42(0x1e2))||_0x51093a[_0x269d42(0x215)]('.dat')||_0x51093a['startsWith']('media__')||_0x51093a[_0x269d42(0x1f6)](_0x269d42(0x193)))continue;const _0x534232=fs[_0x269d42(0x1d4)](_0xfd8639);_0x534232['mtimeMs']>_0x35dead&&(_0x35dead=_0x534232[_0x269d42(0x19a)],_0x237513=_0x3b963f[_0x269d42(0x220)],_0x5cb83c=_0xfd8639,_0x4f1fdc=_0x4e172a);}}}}catch{}};_0x35ff24(_0x4e172a);}}return{'fileName':_0x237513,'lastModified':_0x35dead>0x0?new Date(_0x35dead)[_0x1e9c3c(0x19d)]():null,'fullPath':_0x5cb83c,'dirPath':_0x4f1fdc};}const debounceTimers=new Map(),lastLoggedTimes=new Map();function compressMessageContent(_0xc18c2c,_0x1d66a8,_0x2f0c1c){const _0xf4f2=a0_0x14bc19;let _0x4be605=![],_0x150784=0x0;if(!_0xc18c2c)return{'modified':_0x4be605,'savedTokens':_0x150784};const _0x24d82c=_0x2ae0b9=>_0x2ae0b9[_0xf4f2(0x190)](/\r\n/g,'\x0a')[_0xf4f2(0x190)](/\n{3,}/g,'\x0a\x0a');if(typeof _0xc18c2c[_0xf4f2(0x1d9)]===_0xf4f2(0x198)){let _0x12f513=_0xc18c2c['content'],_0x3303de=_0x24d82c(_0x12f513);_0x3303de[_0xf4f2(0x1f4)]<_0x12f513[_0xf4f2(0x1f4)]&&(_0xc18c2c['content']=_0x3303de,_0x4be605=!![],_0x150784+=Math[_0xf4f2(0x203)]((_0x12f513[_0xf4f2(0x1f4)]-_0x3303de[_0xf4f2(0x1f4)])/0x4));if(_0xc18c2c['content'][_0xf4f2(0x1f4)]>0x12c&&!_0xc18c2c['content'][_0xf4f2(0x1b2)](_0xf4f2(0x1d6))){const _0x57d7c4=_0xf4f2(0x1b9)+Math[_0xf4f2(0x203)](_0xc18c2c[_0xf4f2(0x1d9)]['length']/0x4)+'\x20tokens).',_0x38a3dc=(0x0,cache_manager_1[_0xf4f2(0x1de)])(_0x1d66a8,_0x2f0c1c,_0xc18c2c['content'],_0x57d7c4);_0xc18c2c[_0xf4f2(0x1d9)]=_0xf4f2(0x20e)+_0x38a3dc[_0xf4f2(0x1b0)]+_0xf4f2(0x1f7)+_0x38a3dc[_0xf4f2(0x1c9)]+_0xf4f2(0x1a6)+_0x38a3dc[_0xf4f2(0x1c9)]+'`\x0a',_0x4be605=!![],_0x150784+=Math[_0xf4f2(0x1e5)](0x0,_0x38a3dc[_0xf4f2(0x1b0)]-_0x38a3dc[_0xf4f2(0x20c)]);}}else{if(Array[_0xf4f2(0x212)](_0xc18c2c[_0xf4f2(0x1d9)]))for(const _0x5dec0b of _0xc18c2c[_0xf4f2(0x1d9)]){if(_0x5dec0b&&typeof _0x5dec0b===_0xf4f2(0x1b5)){if(typeof _0x5dec0b[_0xf4f2(0x1a1)]==='string'){let _0x5bd31e=_0x5dec0b['text'],_0x46fd28=_0x24d82c(_0x5bd31e);_0x46fd28[_0xf4f2(0x1f4)]<_0x5bd31e[_0xf4f2(0x1f4)]&&(_0x5dec0b[_0xf4f2(0x1a1)]=_0x46fd28,_0x4be605=!![],_0x150784+=Math[_0xf4f2(0x203)]((_0x5bd31e[_0xf4f2(0x1f4)]-_0x46fd28['length'])/0x4));if(_0x5dec0b[_0xf4f2(0x1a1)][_0xf4f2(0x1f4)]>0x12c&&!_0x5dec0b[_0xf4f2(0x1a1)][_0xf4f2(0x1b2)](_0xf4f2(0x1d6))){const _0x822b89=_0xf4f2(0x1ab)+Math[_0xf4f2(0x203)](_0x5dec0b['text'][_0xf4f2(0x1f4)]/0x4)+_0xf4f2(0x1b1),_0x209e44=(0x0,cache_manager_1['saveChunk'])(_0x1d66a8,_0x2f0c1c,_0x5dec0b[_0xf4f2(0x1a1)],_0x822b89);_0x5dec0b[_0xf4f2(0x1a1)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x209e44[_0xf4f2(0x1c9)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x209e44[_0xf4f2(0x1c9)]+'`\x0a',_0x4be605=!![],_0x150784+=Math[_0xf4f2(0x1e5)](0x0,_0x209e44[_0xf4f2(0x1b0)]-_0x209e44[_0xf4f2(0x20c)]);}}else{if(typeof _0x5dec0b[_0xf4f2(0x1d9)]===_0xf4f2(0x198)){let _0x34f7b2=_0x5dec0b[_0xf4f2(0x1d9)],_0x1afd8a=_0x24d82c(_0x34f7b2);_0x1afd8a[_0xf4f2(0x1f4)]<_0x34f7b2[_0xf4f2(0x1f4)]&&(_0x5dec0b[_0xf4f2(0x1d9)]=_0x1afd8a,_0x4be605=!![],_0x150784+=Math[_0xf4f2(0x203)]((_0x34f7b2[_0xf4f2(0x1f4)]-_0x1afd8a['length'])/0x4));if(_0x5dec0b[_0xf4f2(0x1d9)][_0xf4f2(0x1f4)]>0x12c&&!_0x5dec0b['content'][_0xf4f2(0x1b2)](_0xf4f2(0x1d6))){const _0x334d2c=_0xf4f2(0x1dc)+Math[_0xf4f2(0x203)](_0x5dec0b['content'][_0xf4f2(0x1f4)]/0x4)+'\x20tokens).',_0x93bde2=(0x0,cache_manager_1[_0xf4f2(0x1de)])(_0x1d66a8,_0x2f0c1c,_0x5dec0b[_0xf4f2(0x1d9)],_0x334d2c);_0x5dec0b[_0xf4f2(0x1d9)]=_0xf4f2(0x195)+_0x93bde2[_0xf4f2(0x1c9)]+_0xf4f2(0x1ff)+_0x93bde2[_0xf4f2(0x1c9)]+'`\x0a',_0x4be605=!![],_0x150784+=Math[_0xf4f2(0x1e5)](0x0,_0x93bde2[_0xf4f2(0x1b0)]-_0x93bde2[_0xf4f2(0x20c)]);}}}}}}return{'modified':_0x4be605,'savedTokens':_0x150784};}const sessionsStatePath=path['join'](baseDir,a0_0x14bc19(0x1b3));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x2485fc=a0_0x14bc19;try{if(fs[_0x2485fc(0x221)](sessionsStatePath)){const _0x4b077f=JSON['parse'](fs[_0x2485fc(0x1da)](sessionsStatePath,_0x2485fc(0x1a3)));if(_0x4b077f&&typeof _0x4b077f===_0x2485fc(0x1b5))return sessionsStateMemoryCache=_0x4b077f,_0x4b077f;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x567c40,_0x2bb427,_0x14af53,_0x7b9f12=0x0,_0x3e3a92=0x0){const _0x5b9e32=a0_0x14bc19;try{const _0x27a161=loadSessionsState();_0x27a161[_0x567c40]={'lineCount':_0x2bb427,'activeSavedTokens':_0x14af53,'sideCacheSaved':_0x7b9f12,'officialCompactSaved':_0x3e3a92},sessionsStateMemoryCache=_0x27a161;if(!fs[_0x5b9e32(0x221)](baseDir))fs[_0x5b9e32(0x1b6)](baseDir,{'recursive':!![]});const _0x4ad677=sessionsStatePath+_0x5b9e32(0x1c5);fs[_0x5b9e32(0x20b)](_0x4ad677,JSON['stringify'](_0x27a161,null,0x2),_0x5b9e32(0x1a3)),fs['renameSync'](_0x4ad677,sessionsStatePath);}catch{}}function processSessionFile(_0x5547e9,_0x5baf3c){const _0x468f75=a0_0x14bc19;try{if(!fs[_0x468f75(0x221)](_0x5547e9))return;const _0x2bfbce=fs['statSync'](_0x5547e9);if(_0x2bfbce['isDirectory']()||_0x2bfbce['size']===0x0)return;const _0x4c005b=loadConfig(),_0x184afb='conv_'+_0x5baf3c;if(_0x4c005b[_0x468f75(0x191)][_0x184afb]===![])return;const _0x3e85c3=fs['readFileSync'](_0x5547e9,_0x468f75(0x1a3));let _0x19c7b4=![],_0x229be8=_0x3e85c3,_0x148ba5=0x0;const _0x1a4990=path[_0x468f75(0x204)](_0x5547e9)['toLowerCase'](),_0x31178e=path['basename'](_0x5547e9,_0x1a4990);let _0x2299d2=0x1;if(_0x5baf3c!==_0x468f75(0x1e0)){if(_0x1a4990===_0x468f75(0x192))try{const _0x35f515=JSON['parse'](_0x3e85c3),_0x401f5d=Array[_0x468f75(0x212)](_0x35f515[_0x468f75(0x1ea)])?_0x35f515[_0x468f75(0x1ea)]:Array[_0x468f75(0x212)](_0x35f515)?_0x35f515:null;if(_0x401f5d){_0x2299d2=_0x401f5d[_0x468f75(0x1f4)];for(let _0x2f85a8=0x0;_0x2f85a8<_0x401f5d[_0x468f75(0x1f4)];_0x2f85a8++){const _0x36e8e=compressMessageContent(_0x401f5d[_0x2f85a8],_0x31178e,_0x5baf3c);_0x36e8e[_0x468f75(0x1d7)]&&(_0x19c7b4=!![],_0x148ba5+=_0x36e8e['savedTokens']);}_0x19c7b4&&(_0x229be8=JSON[_0x468f75(0x1fa)](_0x35f515,null,0x2));}}catch{}else{if(_0x1a4990===_0x468f75(0x1b7)||_0x1a4990==='.json1')try{const _0x19877a=_0x3e85c3[_0x468f75(0x1fe)]('\x0a');_0x2299d2=_0x19877a[_0x468f75(0x1f4)];const _0x17c2aa=[];for(let _0x4632c5 of _0x19877a){if(!_0x4632c5[_0x468f75(0x213)]()){_0x17c2aa[_0x468f75(0x196)](_0x4632c5);continue;}try{const _0x5bb480=JSON[_0x468f75(0x1d3)](_0x4632c5),_0x59fce5=_0x5bb480[_0x468f75(0x1bc)]||_0x5bb480;if(_0x59fce5){const _0x211b3e=compressMessageContent(_0x59fce5,_0x31178e,_0x5baf3c);_0x211b3e[_0x468f75(0x1d7)]&&(_0x19c7b4=!![],_0x148ba5+=_0x211b3e[_0x468f75(0x1d5)],_0x4632c5=JSON[_0x468f75(0x1fa)](_0x5bb480));}}catch{}_0x17c2aa[_0x468f75(0x196)](_0x4632c5);}_0x19c7b4&&(_0x229be8=_0x17c2aa[_0x468f75(0x217)]('\x0a'));}catch{}}}else(_0x1a4990===_0x468f75(0x1b7)||_0x1a4990===_0x468f75(0x18c))&&(_0x2299d2=_0x3e85c3['split']('\x0a')[_0x468f75(0x1a9)](Boolean)[_0x468f75(0x1f4)]);let _0x5843d3=0x0;const _0x3c9b9a=_0x3e85c3[_0x468f75(0x1f0)](/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi);for(const _0x5a0cd7 of _0x3c9b9a){let _0x1012a3=parseFloat(_0x5a0cd7[0x1]);_0x5a0cd7[0x0][_0x468f75(0x19c)]()[_0x468f75(0x1b2)]('k')&&(_0x1012a3=_0x1012a3*0x3e8),_0x5843d3+=Math[_0x468f75(0x21e)](_0x1012a3);}const _0x3a2400=loadSessionsState(),_0x53c7a4=_0x3a2400[_0x5547e9],_0x2736af=_0x53c7a4&&_0x53c7a4['sideCacheSaved']!==undefined?_0x53c7a4[_0x468f75(0x1f3)]:0x0,_0x29e9ac=_0x53c7a4&&_0x53c7a4[_0x468f75(0x1d1)]!==undefined?_0x53c7a4[_0x468f75(0x1d1)]:_0x53c7a4?_0x53c7a4['activeSavedTokens']:0x0,_0x4f0751=_0x53c7a4?_0x53c7a4[_0x468f75(0x19b)]:0x0,_0x456676=_0x2299d2>_0x4f0751;let _0x21d489=_0x2736af,_0x14e6d3=Math[_0x468f75(0x1e5)](_0x29e9ac,_0x5843d3);if(_0x19c7b4){fs[_0x468f75(0x20b)](_0x5547e9,_0x229be8,_0x468f75(0x1a3)),_0x21d489+=_0x148ba5;const _0x5cc743=_0x21d489+_0x14e6d3;saveSessionStateItem(_0x5547e9,_0x2299d2,_0x5cc743,_0x21d489,_0x14e6d3);const _0x51ca40='x'[_0x468f75(0x1be)](_0x5cc743*0x4);tracker_1[_0x468f75(0x207)][_0x468f75(0x200)](_0x468f75(0x1a7)+_0x5baf3c,_0x51ca40,'',0x0,undefined,['conv_'+_0x5baf3c,_0x468f75(0x1b8),_0x5baf3c,_0x468f75(0x1d0)]);}else{if(_0x5843d3>_0x29e9ac){_0x14e6d3=_0x5843d3;const _0x1234e3=_0x21d489+_0x14e6d3;saveSessionStateItem(_0x5547e9,_0x2299d2,_0x1234e3,_0x21d489,_0x14e6d3);const _0x20b33d='x'[_0x468f75(0x1be)](_0x1234e3*0x4);tracker_1[_0x468f75(0x207)][_0x468f75(0x200)](_0x468f75(0x1a7)+_0x5baf3c,_0x20b33d,'',0x0,undefined,[_0x468f75(0x1ca)+_0x5baf3c,'live-conv',_0x5baf3c,_0x468f75(0x1a8)]);}else{if(_0x456676){const _0x34b4d7=_0x21d489+_0x14e6d3;saveSessionStateItem(_0x5547e9,_0x2299d2,_0x34b4d7,_0x21d489,_0x14e6d3);if(_0x34b4d7>0x0){const _0x52f569='x'[_0x468f75(0x1be)](_0x34b4d7*0x4);tracker_1['tracker']['logExecution'](_0x468f75(0x1a7)+_0x5baf3c,_0x52f569,'',0x0,undefined,[_0x468f75(0x1ca)+_0x5baf3c,_0x468f75(0x1b8),_0x5baf3c,_0x468f75(0x1b4)]);}}else{const _0x21a8f4=_0x21d489+_0x14e6d3;saveSessionStateItem(_0x5547e9,_0x2299d2,_0x21a8f4,_0x21d489,_0x14e6d3);}}}}catch{}}function installWindowsStartupService(){const _0x546a29=a0_0x14bc19;if(process[_0x546a29(0x1cc)]!==_0x546a29(0x1c8))return;try{const _0x17f587=path[_0x546a29(0x217)](os[_0x546a29(0x1e3)](),_0x546a29(0x1c6),_0x546a29(0x1bd),'Microsoft',_0x546a29(0x1fc),_0x546a29(0x21c),_0x546a29(0x1f1),_0x546a29(0x1bb));if(!fs[_0x546a29(0x221)](_0x17f587))fs['mkdirSync'](_0x17f587,{'recursive':!![]});const _0x2af766=path['join'](_0x17f587,'TrimPromptDaemon.vbs'),_0x13d76e=path[_0x546a29(0x217)](__dirname,_0x546a29(0x1bf)),_0x568129=_0x13d76e['replace'](/\\/g,'\x5c\x5c'),_0x4cd165=_0x546a29(0x1ee)+_0x568129+_0x546a29(0x1af);fs['writeFileSync'](_0x2af766,_0x4cd165,'utf8');}catch{}}function startWatcherDaemon(){const _0xfb7f71=a0_0x14bc19;installWindowsStartupService();try{const {installClaudeHooks:_0x1024cf}=require(_0xfb7f71(0x1aa));_0x1024cf();}catch(_0x3ee9e8){}const _0x47b907=[_0xfb7f71(0x1e0),'gemini',_0xfb7f71(0x1eb),_0xfb7f71(0x18e),_0xfb7f71(0x211),_0xfb7f71(0x206),_0xfb7f71(0x1ba),_0xfb7f71(0x1c4),_0xfb7f71(0x20d)];for(const _0x5024d1 of _0x47b907){const _0x3dd82c=getAgentStoragePaths(_0x5024d1);for(const _0xd750e3 of _0x3dd82c){if(fs[_0xfb7f71(0x221)](_0xd750e3))try{fs[_0xfb7f71(0x1e9)](_0xd750e3,{'recursive':!![]},(_0x19182c,_0x2d661a)=>{const _0x32d428=_0xfb7f71;if(!_0x2d661a)return;const _0x30e1bc=path['join'](_0xd750e3,_0x2d661a);if(debounceTimers[_0x32d428(0x210)](_0x30e1bc))clearTimeout(debounceTimers['get'](_0x30e1bc));const _0x1c12ea=setTimeout(()=>processSessionFile(_0x30e1bc,_0x5024d1),0x1f4);debounceTimers['set'](_0x30e1bc,_0x1c12ea);});}catch{}}}setInterval(()=>{const _0x5d316d=_0xfb7f71;for(const _0x59356d of _0x47b907){try{const _0x5b026d=getLatestSessionFile(_0x59356d);_0x5b026d&&_0x5b026d['fullPath']&&processSessionFile(_0x5b026d[_0x5d316d(0x1fd)],_0x59356d);}catch{}}},0xbb8);}function a0_0x1719(){const _0x5dcac5=['toISOString','configurable','1259905diKUqJ','.webp','text','3726906KLqzVk','utf8','isDirectory','./tracker','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','conv:','official_compact','filter','./hooks/claude-hook','Summary:\x20Text\x20block\x20offloaded\x20(','304844ccSeAn','14iMPqeD','__importStar','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','raw_tokens','\x20tokens).','includes','sessions_state.json','active_turn','object','mkdirSync','.jsonl','live-conv','Summary:\x20Content\x20offloaded\x20(','openclaw','Startup','message','Roaming','repeat','cli.js','getOwnPropertyDescriptor','.jpeg','defineProperty','.config','opencode','.tmp','AppData','325147TfiZvC','win32','chunk_id','conv_','gemini','platform','2211056FjhXzH','.cortex','.shm','trim_offload','officialCompactSaved','3DkAEiA','parse','statSync','savedTokens','TrimPrompt\x20Cache\x20Engine','modified','saveConfig','content','readFileSync','__esModule','Summary:\x20Tool\x20result\x20offloaded\x20(','Cursor','saveChunk','Local','claude','custom_storage_paths','.lock','homedir','getAgentStoragePaths','max','default','.codex','.jpg','watch','messages','codex','getOwnPropertyNames','.gemini','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','history','matchAll','Programs','.claude','sideCacheSaved','length','startWatcherDaemon','startsWith','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','create','__createBinding','stringify','User','Windows','fullPath','split','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','logExecution','cwd','projects','ceil','extname','github-copilot-cli','copilot','tracker','loadConfig','get','1076913MDSofU','writeFileSync','compressed_tokens','cortex','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','getLatestSessionFile','has','aider','isArray','trim','path','endsWith','antigravity','join','__setModuleDefault','hasOwnProperty','.trimprompt','.pb','Start\x20Menu','workspaceStorage','round','isFile','name','existsSync','writable','./cache-manager','call','1084654THNobv','.json1','Gemini','cursor','sessions','replace','conversation_toggles','.json','image_','.openclaw','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','push','.opencode','string','10MbOTgZ','mtimeMs','lineCount','toLowerCase'];a0_0x1719=function(){return _0x5dcac5;};return a0_0x1719();}
package/filters/devops.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x56f9e6=a0_0x3253;function a0_0x3253(_0x4e2d0f,_0x24e0a4){_0x4e2d0f=_0x4e2d0f-0x149;const _0x33e92a=a0_0x33e9();let _0x3253df=_0x33e92a[_0x4e2d0f];return _0x3253df;}(function(_0x75c5f6,_0x36a69c){const _0x353b81=a0_0x3253,_0x56bf1a=_0x75c5f6();while(!![]){try{const _0x54a355=parseInt(_0x353b81(0x14b))/0x1*(parseInt(_0x353b81(0x177))/0x2)+-parseInt(_0x353b81(0x155))/0x3*(-parseInt(_0x353b81(0x149))/0x4)+-parseInt(_0x353b81(0x16d))/0x5+-parseInt(_0x353b81(0x17a))/0x6*(-parseInt(_0x353b81(0x172))/0x7)+-parseInt(_0x353b81(0x14a))/0x8*(parseInt(_0x353b81(0x14e))/0x9)+-parseInt(_0x353b81(0x153))/0xa+parseInt(_0x353b81(0x14f))/0xb;if(_0x54a355===_0x36a69c)break;else _0x56bf1a['push'](_0x56bf1a['shift']());}catch(_0x122dc1){_0x56bf1a['push'](_0x56bf1a['shift']());}}}(a0_0x33e9,0x418ab));Object[a0_0x56f9e6(0x160)](exports,a0_0x56f9e6(0x156),{'value':!![]}),exports[a0_0x56f9e6(0x174)]=filterDockerPs,exports['filterDockerImages']=filterDockerImages,exports[a0_0x56f9e6(0x150)]=filterDockerLogs,exports[a0_0x56f9e6(0x163)]=filterKubectl,exports['filterRuff']=filterRuff;function filterDockerPs(_0x5032ff){const _0x44095a=a0_0x56f9e6,_0x4aa5d8=_0x5032ff[_0x44095a(0x17b)]('\x0a')[_0x44095a(0x152)](_0x13e867=>_0x13e867['trim']()[_0x44095a(0x173)]>0x0);if(_0x4aa5d8[_0x44095a(0x173)]===0x0)return _0x44095a(0x15d);if(_0x4aa5d8['length']<=0xa)return _0x5032ff[_0x44095a(0x165)]();const _0x4c6306=_0x4aa5d8[0x0],_0x5937b7=_0x4aa5d8['slice'](0x1),_0x3f27c6=[];_0x3f27c6['push']('Containers:\x20'+_0x5937b7[_0x44095a(0x173)]+'\x20total'),_0x3f27c6['push']('');for(const _0x286c3d of _0x5937b7){const _0x15a150=_0x286c3d['split'](/\s{2,}/);if(_0x15a150[_0x44095a(0x173)]>=0x5){const _0x1c8ac3=_0x15a150[0x0][_0x44095a(0x167)](0x0,0xc),_0x2e4c18=_0x15a150[0x1],_0x14ece7=_0x15a150[_0x15a150[_0x44095a(0x173)]-0x2]||'',_0x2c9f2f=_0x15a150[_0x15a150['length']-0x1]||'';_0x3f27c6[_0x44095a(0x168)]('\x20\x20'+_0x1c8ac3+'\x20\x20'+_0x2e4c18+'\x20\x20'+_0x14ece7+'\x20\x20'+_0x2c9f2f);}else _0x3f27c6['push']('\x20\x20'+_0x286c3d[_0x44095a(0x165)]());}return _0x3f27c6['join']('\x0a');}function filterDockerImages(_0x53ec85){const _0x3b39c8=a0_0x56f9e6,_0x3f3395=_0x53ec85[_0x3b39c8(0x17b)]('\x0a')[_0x3b39c8(0x152)](_0xaa497d=>_0xaa497d['trim']()['length']>0x0);if(_0x3f3395['length']<=0x1)return _0x3b39c8(0x162);if(_0x3f3395[_0x3b39c8(0x173)]<=0xf)return _0x53ec85[_0x3b39c8(0x165)]();const _0x1a2abe=_0x3f3395[_0x3b39c8(0x16e)](0x1),_0x59b21c=['Docker\x20images:\x20'+_0x1a2abe[_0x3b39c8(0x173)]+'\x20total'];_0x59b21c[_0x3b39c8(0x168)]('');const _0x543c83=_0x1a2abe[_0x3b39c8(0x16e)](0x0,0x14);for(const _0x1ef18a of _0x543c83){const _0x2c747a=_0x1ef18a['split'](/\s{2,}/);if(_0x2c747a[_0x3b39c8(0x173)]>=0x3){const _0x54ee0c=_0x2c747a[0x0],_0x3512c4=_0x2c747a[0x1],_0xb67c83=_0x2c747a[_0x2c747a[_0x3b39c8(0x173)]-0x1]||'';_0x59b21c[_0x3b39c8(0x168)]('\x20\x20'+_0x54ee0c+':'+_0x3512c4+'\x20\x20'+_0xb67c83);}else _0x59b21c[_0x3b39c8(0x168)]('\x20\x20'+_0x1ef18a[_0x3b39c8(0x165)]());}return _0x1a2abe[_0x3b39c8(0x173)]>0x14&&_0x59b21c[_0x3b39c8(0x168)](_0x3b39c8(0x17c)+(_0x1a2abe[_0x3b39c8(0x173)]-0x14)+_0x3b39c8(0x170)),_0x59b21c[_0x3b39c8(0x15f)]('\x0a');}function filterDockerLogs(_0xe0a7da){const _0x4423d1=a0_0x56f9e6,_0x254005=_0xe0a7da[_0x4423d1(0x17b)]('\x0a');if(_0x254005[_0x4423d1(0x173)]<=0x32)return _0xe0a7da;const _0x2f230d=[];return _0x2f230d[_0x4423d1(0x168)](..._0x254005['slice'](0x0,0x14)),_0x2f230d[_0x4423d1(0x168)](_0x4423d1(0x15a)+(_0x254005['length']-0x28)+_0x4423d1(0x16c)),_0x2f230d['push'](..._0x254005[_0x4423d1(0x16e)](-0x14)),_0x2f230d[_0x4423d1(0x168)]('\x0a('+_0x254005['length']+'\x20log\x20lines\x20total)'),_0x2f230d['join']('\x0a');}function filterKubectl(_0xdbc075,_0x51c0ee){const _0x4789d1=a0_0x56f9e6,_0x5f54d6=_0xdbc075['split']('\x0a')[_0x4789d1(0x152)](_0x2f35f6=>_0x2f35f6['trim']()[_0x4789d1(0x173)]>0x0);if(_0x5f54d6[_0x4789d1(0x173)]===0x0)return _0x4789d1(0x14d);if(_0x5f54d6[_0x4789d1(0x173)]<=0x14)return _0xdbc075['trim']();if(_0x51c0ee===_0x4789d1(0x154)){const _0x34f6be=_0x5f54d6[0x0],_0x46bca8=_0x5f54d6[_0x4789d1(0x16e)](0x1),_0xa70f40=[_0x46bca8[_0x4789d1(0x173)]+_0x4789d1(0x179),'',_0x34f6be];return _0x46bca8[_0x4789d1(0x173)]<=0x1e?_0xa70f40[_0x4789d1(0x168)](..._0x46bca8):(_0xa70f40[_0x4789d1(0x168)](..._0x46bca8[_0x4789d1(0x16e)](0x0,0x19)),_0xa70f40[_0x4789d1(0x168)](_0x4789d1(0x161)+(_0x46bca8[_0x4789d1(0x173)]-0x19)+_0x4789d1(0x171))),_0xa70f40[_0x4789d1(0x15f)]('\x0a');}if(_0x51c0ee===_0x4789d1(0x15e)){const _0x461e92=[];let _0x12476b=![],_0x3c2287=0x0;for(const _0x336cad of _0x5f54d6){if(_0x336cad[_0x4789d1(0x16a)]('Events:')){_0x12476b=!![],_0x461e92[_0x4789d1(0x168)](_0x336cad);continue;}if(_0x12476b){_0x3c2287++;if(_0x3c2287<=0x5)_0x461e92[_0x4789d1(0x168)](_0x336cad);}else _0x461e92[_0x4789d1(0x168)](_0x336cad);}return _0x3c2287>0x5&&_0x461e92[_0x4789d1(0x168)](_0x4789d1(0x17c)+(_0x3c2287-0x5)+_0x4789d1(0x169)),_0x461e92[_0x4789d1(0x15f)]('\x0a');}if(_0x51c0ee===_0x4789d1(0x176))return filterDockerLogs(_0xdbc075);const _0x267621=_0x5f54d6[_0x4789d1(0x16e)](0x0,0x1e);return _0x5f54d6['length']>0x1e&&_0x267621[_0x4789d1(0x168)](_0x4789d1(0x161)+(_0x5f54d6[_0x4789d1(0x173)]-0x1e)+_0x4789d1(0x15b)),_0x267621[_0x4789d1(0x15f)]('\x0a');}function filterRuff(_0x4d6152){const _0xb27b4b=a0_0x56f9e6,_0x1aed30=_0x4d6152[_0xb27b4b(0x17b)]('\x0a')[_0xb27b4b(0x152)](_0x2dc660=>_0x2dc660[_0xb27b4b(0x165)]()['length']>0x0);if(_0x1aed30[_0xb27b4b(0x173)]===0x0)return _0xb27b4b(0x157);if(_0x4d6152[_0xb27b4b(0x15c)](_0xb27b4b(0x175))||_0x4d6152['includes'](_0xb27b4b(0x158)))return _0xb27b4b(0x16b);const _0x26f4d0=_0x4d6152[_0xb27b4b(0x164)](/Found (\d+) error/),_0x5de22f=_0x26f4d0?parseInt(_0x26f4d0[0x1]):_0x1aed30[_0xb27b4b(0x173)],_0x1ba424={},_0x31ead2=[];for(const _0x144c4a of _0x1aed30){const _0x29e3cb=_0x144c4a['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x29e3cb){const _0x2eb077=_0x29e3cb[0x1],_0x514db6=_0x2eb077['split'](':')[0x0];if(!_0x1ba424[_0x514db6])_0x1ba424[_0x514db6]=[];_0x1ba424[_0x514db6][_0xb27b4b(0x168)](_0x144c4a);}else _0x31ead2[_0xb27b4b(0x168)](_0x144c4a);}const _0x106606=Object[_0xb27b4b(0x151)](_0x1ba424);if(_0x106606[_0xb27b4b(0x173)]===0x0){if(_0x1aed30[_0xb27b4b(0x173)]<=0x14)return _0x4d6152[_0xb27b4b(0x165)]();return _0x1aed30['slice'](0x0,0xf)[_0xb27b4b(0x15f)]('\x0a')+(_0xb27b4b(0x159)+(_0x1aed30[_0xb27b4b(0x173)]-0xf)+_0xb27b4b(0x14c));}const _0x306fb9=[_0xb27b4b(0x178)+_0x5de22f+_0xb27b4b(0x166)+_0x106606[_0xb27b4b(0x173)]+'\x20files'];_0x306fb9[_0xb27b4b(0x168)]('');const _0x4de9cc=0xa;for(const _0x3287a9 of _0x106606[_0xb27b4b(0x16e)](0x0,_0x4de9cc)){const _0x3c7bf5=_0x1ba424[_0x3287a9];if(_0x3c7bf5['length']<=0x3){for(const _0x185315 of _0x3c7bf5)_0x306fb9['push']('\x20\x20'+_0x185315);}else _0x306fb9['push']('\x20\x20'+_0x3c7bf5[0x0]),_0x306fb9['push']('\x20\x20...\x20('+_0x3c7bf5[_0xb27b4b(0x173)]+_0xb27b4b(0x166)+_0x3287a9+')');}return _0x106606[_0xb27b4b(0x173)]>_0x4de9cc&&_0x306fb9[_0xb27b4b(0x168)](_0xb27b4b(0x17c)+(_0x106606[_0xb27b4b(0x173)]-_0x4de9cc)+_0xb27b4b(0x16f)),_0x306fb9[_0xb27b4b(0x15f)]('\x0a');}function a0_0x33e9(){const _0x48693b=['\x20more\x20lines','includes','No\x20containers\x20running','describe','join','defineProperty','...\x20+','No\x20images\x20found','filterKubectl','match','trim','\x20issues\x20in\x20','substring','push','\x20more\x20events','startsWith','Ruff:\x20all\x20checks\x20passed','\x20lines\x20truncated]\x20...\x0a','2675430DUFIKp','slice','\x20more\x20files','\x20more\x20images','\x20more\x20resources','1197CcJKIl','length','filterDockerPs','All\x20checks\x20passed','logs','2866hNluer','Ruff:\x20','\x20resources\x20found','1566IkwyZM','split','\x20\x20...\x20+','29236bnePCi','31272FaGmJm','223EdLfwB','\x20more','No\x20resources\x20found','18kWDASf','1816067VOkkFk','filterDockerLogs','keys','filter','29750FVHGep','get','117yWrqPc','__esModule','Ruff:\x20no\x20issues\x20found','Found\x200\x20error','\x0a...\x20+','\x0a...\x20['];a0_0x33e9=function(){return _0x48693b;};return a0_0x33e9();}
1
+ 'use strict';const a0_0x268fa7=a0_0x43dc;(function(_0x150307,_0x52ab1e){const _0x18d317=a0_0x43dc,_0x177bad=_0x150307();while(!![]){try{const _0x143653=-parseInt(_0x18d317(0x105))/0x1*(-parseInt(_0x18d317(0xf4))/0x2)+-parseInt(_0x18d317(0x11a))/0x3+-parseInt(_0x18d317(0x111))/0x4*(-parseInt(_0x18d317(0x10e))/0x5)+-parseInt(_0x18d317(0x113))/0x6*(parseInt(_0x18d317(0xeb))/0x7)+parseInt(_0x18d317(0xec))/0x8+-parseInt(_0x18d317(0xea))/0x9*(-parseInt(_0x18d317(0x100))/0xa)+-parseInt(_0x18d317(0xf3))/0xb;if(_0x143653===_0x52ab1e)break;else _0x177bad['push'](_0x177bad['shift']());}catch(_0x1b1f9a){_0x177bad['push'](_0x177bad['shift']());}}}(a0_0x3e74,0xd91e7));Object[a0_0x268fa7(0xf2)](exports,a0_0x268fa7(0x11c),{'value':!![]}),exports[a0_0x268fa7(0x102)]=filterDockerPs,exports[a0_0x268fa7(0x11b)]=filterDockerImages,exports[a0_0x268fa7(0x115)]=filterDockerLogs,exports[a0_0x268fa7(0xee)]=filterKubectl,exports[a0_0x268fa7(0xf0)]=filterRuff;function a0_0x43dc(_0x2da4d8,_0x313aee){const _0x3e74eb=a0_0x3e74();return a0_0x43dc=function(_0x43dc80,_0x52c78a){_0x43dc80=_0x43dc80-0xe7;let _0x19d990=_0x3e74eb[_0x43dc80];return _0x19d990;},a0_0x43dc(_0x2da4d8,_0x313aee);}function filterDockerPs(_0x27c3da){const _0x26324d=a0_0x268fa7,_0xa066a5=_0x27c3da[_0x26324d(0xe7)]('\x0a')['filter'](_0x435de1=>_0x435de1[_0x26324d(0xfb)]()[_0x26324d(0x10c)]>0x0);if(_0xa066a5[_0x26324d(0x10c)]===0x0)return _0x26324d(0x10b);if(_0xa066a5[_0x26324d(0x10c)]<=0xa)return _0x27c3da[_0x26324d(0xfb)]();const _0x1db453=_0xa066a5[0x0],_0x16d889=_0xa066a5[_0x26324d(0x107)](0x1),_0xf19ce=[];_0xf19ce[_0x26324d(0xf7)](_0x26324d(0x112)+_0x16d889['length']+_0x26324d(0xf9)),_0xf19ce[_0x26324d(0xf7)]('');for(const _0x1832b0 of _0x16d889){const _0x1403fe=_0x1832b0[_0x26324d(0xe7)](/\s{2,}/);if(_0x1403fe['length']>=0x5){const _0x587848=_0x1403fe[0x0][_0x26324d(0x10a)](0x0,0xc),_0x585e97=_0x1403fe[0x1],_0x4bf87c=_0x1403fe[_0x1403fe[_0x26324d(0x10c)]-0x2]||'',_0x3cef04=_0x1403fe[_0x1403fe[_0x26324d(0x10c)]-0x1]||'';_0xf19ce[_0x26324d(0xf7)]('\x20\x20'+_0x587848+'\x20\x20'+_0x585e97+'\x20\x20'+_0x4bf87c+'\x20\x20'+_0x3cef04);}else _0xf19ce['push']('\x20\x20'+_0x1832b0[_0x26324d(0xfb)]());}return _0xf19ce['join']('\x0a');}function filterDockerImages(_0x3a9dfd){const _0x403e40=a0_0x268fa7,_0x1ee3a0=_0x3a9dfd['split']('\x0a')[_0x403e40(0xff)](_0x1e3577=>_0x1e3577['trim']()[_0x403e40(0x10c)]>0x0);if(_0x1ee3a0[_0x403e40(0x10c)]<=0x1)return _0x403e40(0xf1);if(_0x1ee3a0[_0x403e40(0x10c)]<=0xf)return _0x3a9dfd[_0x403e40(0xfb)]();const _0x38cb04=_0x1ee3a0[_0x403e40(0x107)](0x1),_0x31082e=[_0x403e40(0xfa)+_0x38cb04[_0x403e40(0x10c)]+_0x403e40(0xf9)];_0x31082e['push']('');const _0x92dda3=_0x38cb04['slice'](0x0,0x14);for(const _0x54e548 of _0x92dda3){const _0x4a2f96=_0x54e548['split'](/\s{2,}/);if(_0x4a2f96[_0x403e40(0x10c)]>=0x3){const _0x4cfff6=_0x4a2f96[0x0],_0x281053=_0x4a2f96[0x1],_0x19640d=_0x4a2f96[_0x4a2f96[_0x403e40(0x10c)]-0x1]||'';_0x31082e[_0x403e40(0xf7)]('\x20\x20'+_0x4cfff6+':'+_0x281053+'\x20\x20'+_0x19640d);}else _0x31082e[_0x403e40(0xf7)]('\x20\x20'+_0x54e548[_0x403e40(0xfb)]());}return _0x38cb04[_0x403e40(0x10c)]>0x14&&_0x31082e['push'](_0x403e40(0xef)+(_0x38cb04[_0x403e40(0x10c)]-0x14)+_0x403e40(0x118)),_0x31082e['join']('\x0a');}function filterDockerLogs(_0x12cfb3){const _0x5f2dbb=a0_0x268fa7,_0xe6d4d1=_0x12cfb3[_0x5f2dbb(0xe7)]('\x0a');if(_0xe6d4d1[_0x5f2dbb(0x10c)]<=0x32)return _0x12cfb3;const _0x57435f=[];return _0x57435f[_0x5f2dbb(0xf7)](..._0xe6d4d1[_0x5f2dbb(0x107)](0x0,0x14)),_0x57435f[_0x5f2dbb(0xf7)](_0x5f2dbb(0x101)+(_0xe6d4d1[_0x5f2dbb(0x10c)]-0x28)+_0x5f2dbb(0x103)),_0x57435f['push'](..._0xe6d4d1['slice'](-0x14)),_0x57435f[_0x5f2dbb(0xf7)]('\x0a('+_0xe6d4d1['length']+'\x20log\x20lines\x20total)'),_0x57435f['join']('\x0a');}function a0_0x3e74(){const _0x581155=['match','Found\x200\x20error','642942qotvuj','9807ulfVqd','7484008qdJbLP','Events:','filterKubectl','\x20\x20...\x20+','filterRuff','No\x20images\x20found','defineProperty','4650844uidAak','2mfITxw','Ruff:\x20','No\x20resources\x20found','push','\x20more\x20files','\x20total','Docker\x20images:\x20','trim','\x20issues\x20in\x20','join','describe','filter','100uEARYc','\x0a...\x20[','filterDockerPs','\x20lines\x20truncated]\x20...\x0a','\x20more\x20resources','1160141orYctF','\x20more\x20lines','slice','\x20more\x20events','All\x20checks\x20passed','substring','No\x20containers\x20running','length','...\x20+','95MlqarO','includes','\x20more','150004lRlPNw','Containers:\x20','4860AanyYp','\x20resources\x20found','filterDockerLogs','startsWith','Ruff:\x20no\x20issues\x20found','\x20more\x20images','Ruff:\x20all\x20checks\x20passed','3226824KusalY','filterDockerImages','__esModule','split'];a0_0x3e74=function(){return _0x581155;};return a0_0x3e74();}function filterKubectl(_0x26a843,_0x133539){const _0xd621f8=a0_0x268fa7,_0x2eac0e=_0x26a843['split']('\x0a')[_0xd621f8(0xff)](_0x29e147=>_0x29e147[_0xd621f8(0xfb)]()[_0xd621f8(0x10c)]>0x0);if(_0x2eac0e['length']===0x0)return _0xd621f8(0xf6);if(_0x2eac0e['length']<=0x14)return _0x26a843['trim']();if(_0x133539==='get'){const _0x6d5efa=_0x2eac0e[0x0],_0x3650a9=_0x2eac0e[_0xd621f8(0x107)](0x1),_0x5494ad=[_0x3650a9[_0xd621f8(0x10c)]+_0xd621f8(0x114),'',_0x6d5efa];return _0x3650a9[_0xd621f8(0x10c)]<=0x1e?_0x5494ad[_0xd621f8(0xf7)](..._0x3650a9):(_0x5494ad['push'](..._0x3650a9['slice'](0x0,0x19)),_0x5494ad[_0xd621f8(0xf7)](_0xd621f8(0x10d)+(_0x3650a9[_0xd621f8(0x10c)]-0x19)+_0xd621f8(0x104))),_0x5494ad[_0xd621f8(0xfd)]('\x0a');}if(_0x133539===_0xd621f8(0xfe)){const _0x16cf85=[];let _0x28fa5b=![],_0x278a24=0x0;for(const _0xee532 of _0x2eac0e){if(_0xee532[_0xd621f8(0x116)](_0xd621f8(0xed))){_0x28fa5b=!![],_0x16cf85[_0xd621f8(0xf7)](_0xee532);continue;}if(_0x28fa5b){_0x278a24++;if(_0x278a24<=0x5)_0x16cf85[_0xd621f8(0xf7)](_0xee532);}else _0x16cf85[_0xd621f8(0xf7)](_0xee532);}return _0x278a24>0x5&&_0x16cf85[_0xd621f8(0xf7)](_0xd621f8(0xef)+(_0x278a24-0x5)+_0xd621f8(0x108)),_0x16cf85[_0xd621f8(0xfd)]('\x0a');}if(_0x133539==='logs')return filterDockerLogs(_0x26a843);const _0x3fe0a0=_0x2eac0e[_0xd621f8(0x107)](0x0,0x1e);return _0x2eac0e[_0xd621f8(0x10c)]>0x1e&&_0x3fe0a0['push'](_0xd621f8(0x10d)+(_0x2eac0e[_0xd621f8(0x10c)]-0x1e)+_0xd621f8(0x106)),_0x3fe0a0['join']('\x0a');}function filterRuff(_0x31ab6a){const _0x222c7c=a0_0x268fa7,_0x579774=_0x31ab6a[_0x222c7c(0xe7)]('\x0a')[_0x222c7c(0xff)](_0x46d339=>_0x46d339['trim']()['length']>0x0);if(_0x579774['length']===0x0)return _0x222c7c(0x117);if(_0x31ab6a[_0x222c7c(0x10f)](_0x222c7c(0x109))||_0x31ab6a['includes'](_0x222c7c(0xe9)))return _0x222c7c(0x119);const _0x2d72be=_0x31ab6a[_0x222c7c(0xe8)](/Found (\d+) error/),_0x227a55=_0x2d72be?parseInt(_0x2d72be[0x1]):_0x579774[_0x222c7c(0x10c)],_0x1e4c84={},_0x4700f3=[];for(const _0x593a57 of _0x579774){const _0x402711=_0x593a57[_0x222c7c(0xe8)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x402711){const _0x1fd7a6=_0x402711[0x1],_0x3597db=_0x1fd7a6[_0x222c7c(0xe7)](':')[0x0];if(!_0x1e4c84[_0x3597db])_0x1e4c84[_0x3597db]=[];_0x1e4c84[_0x3597db][_0x222c7c(0xf7)](_0x593a57);}else _0x4700f3[_0x222c7c(0xf7)](_0x593a57);}const _0x8ac0b=Object['keys'](_0x1e4c84);if(_0x8ac0b[_0x222c7c(0x10c)]===0x0){if(_0x579774[_0x222c7c(0x10c)]<=0x14)return _0x31ab6a['trim']();return _0x579774[_0x222c7c(0x107)](0x0,0xf)[_0x222c7c(0xfd)]('\x0a')+('\x0a...\x20+'+(_0x579774[_0x222c7c(0x10c)]-0xf)+_0x222c7c(0x110));}const _0x4de67c=[_0x222c7c(0xf5)+_0x227a55+'\x20issues\x20in\x20'+_0x8ac0b[_0x222c7c(0x10c)]+'\x20files'];_0x4de67c[_0x222c7c(0xf7)]('');const _0x5094ab=0xa;for(const _0xfde25d of _0x8ac0b['slice'](0x0,_0x5094ab)){const _0x14e464=_0x1e4c84[_0xfde25d];if(_0x14e464['length']<=0x3){for(const _0x4770ae of _0x14e464)_0x4de67c[_0x222c7c(0xf7)]('\x20\x20'+_0x4770ae);}else _0x4de67c[_0x222c7c(0xf7)]('\x20\x20'+_0x14e464[0x0]),_0x4de67c[_0x222c7c(0xf7)]('\x20\x20...\x20('+_0x14e464[_0x222c7c(0x10c)]+_0x222c7c(0xfc)+_0xfde25d+')');}return _0x8ac0b[_0x222c7c(0x10c)]>_0x5094ab&&_0x4de67c['push'](_0x222c7c(0xef)+(_0x8ac0b[_0x222c7c(0x10c)]-_0x5094ab)+_0x222c7c(0xf8)),_0x4de67c[_0x222c7c(0xfd)]('\x0a');}
@@ -1 +1 @@
1
- 'use strict';const a0_0x8dc01e=a0_0x2d91;(function(_0x44b9a0,_0x105646){const _0x4e99b0=a0_0x2d91,_0x4e0ce4=_0x44b9a0();while(!![]){try{const _0x15b517=parseInt(_0x4e99b0(0x180))/0x1+-parseInt(_0x4e99b0(0x16d))/0x2+parseInt(_0x4e99b0(0x169))/0x3+-parseInt(_0x4e99b0(0x194))/0x4*(-parseInt(_0x4e99b0(0x172))/0x5)+-parseInt(_0x4e99b0(0x166))/0x6*(parseInt(_0x4e99b0(0x164))/0x7)+parseInt(_0x4e99b0(0x17b))/0x8+parseInt(_0x4e99b0(0x167))/0x9*(-parseInt(_0x4e99b0(0x168))/0xa);if(_0x15b517===_0x105646)break;else _0x4e0ce4['push'](_0x4e0ce4['shift']());}catch(_0x57dc11){_0x4e0ce4['push'](_0x4e0ce4['shift']());}}}(a0_0xb3b5,0x71f9d));function a0_0xb3b5(){const _0x353280=['trim','min','\x20more\x20rows','checksum','toLowerCase','isArray','split','resolved','stripComments','__esModule','hash','replace','stripAnsi','test','4nQXujl','collapseWhitespace','12278nVMHFE','integrity','6vyyfTY','9VlUJem','8912910lsrBRc','1762005kTuFct','softTruncate','includes','repository','320154jmvlle','...\x20+','\x20[x','join','smartCrushJson','1806785iDwOCu','\x20key\x20fields)','substring','filter','dev','signature','length','defineProperty','engines','1714200tHytdU','funding','\x0a...\x20[TrimPrompt:\x20Truncated\x20','push','slice','357000GWYMXi','startsWith','\x0a\x0a\x0a','collapseDuplicates','map','sha'];a0_0xb3b5=function(){return _0x353280;};return a0_0xb3b5();}Object[a0_0x8dc01e(0x179)](exports,a0_0x8dc01e(0x18f),{'value':!![]}),exports[a0_0x8dc01e(0x192)]=stripAnsi,exports[a0_0x8dc01e(0x183)]=collapseDuplicates,exports[a0_0x8dc01e(0x195)]=collapseWhitespace,exports[a0_0x8dc01e(0x18e)]=stripComments,exports[a0_0x8dc01e(0x171)]=smartCrushJson,exports[a0_0x8dc01e(0x16a)]=softTruncate;function stripAnsi(_0x3f204b){const _0x1108e7=a0_0x8dc01e,_0x28cd3b=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x3f204b[_0x1108e7(0x191)](_0x28cd3b,'');}function collapseDuplicates(_0x45e211){const _0x3052bc=a0_0x8dc01e,_0x5e2dcb=_0x45e211[_0x3052bc(0x18c)]('\x0a');if(_0x5e2dcb[_0x3052bc(0x178)]<=0x1)return _0x45e211;const _0x13abca=[];let _0x4958fb=_0x5e2dcb[0x0],_0x2f7643=0x1;for(let _0x1ee2aa=0x1;_0x1ee2aa<_0x5e2dcb['length'];_0x1ee2aa++){const _0x46eef7=_0x5e2dcb[_0x1ee2aa];_0x46eef7===_0x4958fb&&_0x46eef7[_0x3052bc(0x186)]()[_0x3052bc(0x178)]>0x0?_0x2f7643++:(_0x2f7643>0x1?_0x13abca[_0x3052bc(0x17e)](_0x4958fb+'\x20[x'+_0x2f7643+']'):_0x13abca['push'](_0x4958fb),_0x4958fb=_0x46eef7,_0x2f7643=0x1);}return _0x2f7643>0x1?_0x13abca[_0x3052bc(0x17e)](_0x4958fb+_0x3052bc(0x16f)+_0x2f7643+']'):_0x13abca[_0x3052bc(0x17e)](_0x4958fb),_0x13abca[_0x3052bc(0x170)]('\x0a');}function collapseWhitespace(_0x59d707){const _0x17c8ae=a0_0x8dc01e;let _0x10b7f6=_0x59d707[_0x17c8ae(0x191)](/[ \t]+$/gm,'');return _0x10b7f6=_0x10b7f6[_0x17c8ae(0x191)](/\n{4,}/g,_0x17c8ae(0x182)),_0x10b7f6;}function stripComments(_0x1a4ae3,_0x326842){const _0x31be6b=a0_0x8dc01e;if(!_0x326842)return _0x1a4ae3;const _0x255a5f=_0x1a4ae3[_0x31be6b(0x18c)]('\x0a');if(_0x255a5f[_0x31be6b(0x178)]<=0x96)return _0x1a4ae3;const _0x1efb1e={'.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*#(?!!)/},_0x164f85=_0x1efb1e[_0x326842[_0x31be6b(0x18a)]()];if(!_0x164f85)return _0x1a4ae3;const _0x3e8d3f=_0x255a5f[_0x31be6b(0x175)](_0x1d5388=>!_0x164f85[_0x31be6b(0x193)](_0x1d5388));return _0x3e8d3f[_0x31be6b(0x170)]('\x0a');}function smartCrushJson(_0x13fd22){const _0x59936d=a0_0x8dc01e;try{const _0x239d58=_0x13fd22[_0x59936d(0x186)]();if(!_0x239d58[_0x59936d(0x181)]('['))return null;const _0x575610=JSON['parse'](_0x239d58);if(!Array[_0x59936d(0x18b)](_0x575610)||_0x575610[_0x59936d(0x178)]<0x3)return null;if(typeof _0x575610[0x0]!=='object'||_0x575610[0x0]===null)return null;const _0x32e53b=Object['keys'](_0x575610[0x0]);if(_0x32e53b[_0x59936d(0x178)]===0x0)return null;const _0x452cb4=_0x32e53b['filter'](_0x6e3b47=>{const _0x1bfc16=_0x59936d,_0x214ce6=_0x6e3b47[_0x1bfc16(0x18a)]();return!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x18d))&&!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x165))&&!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x185))&&!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x190))&&!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x189))&&!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x177))&&!_0x214ce6[_0x1bfc16(0x16b)](_0x1bfc16(0x176))&&_0x214ce6!==_0x1bfc16(0x17c)&&_0x214ce6!==_0x1bfc16(0x17a)&&_0x214ce6!=='bugs'&&_0x214ce6!==_0x1bfc16(0x16c);})['slice'](0x0,0x6);if(_0x452cb4['length']===0x0)return null;const _0xcb5db8=[];_0xcb5db8[_0x59936d(0x17e)](_0x452cb4['join']('|'));const _0x521cab=0x1e;for(let _0x231299=0x0;_0x231299<Math[_0x59936d(0x187)](_0x575610['length'],_0x521cab);_0x231299++){const _0x1d6899=_0x452cb4[_0x59936d(0x184)](_0x4703c5=>{const _0x2ffcd3=_0x59936d,_0x3f5c06=_0x575610[_0x231299][_0x4703c5];if(_0x3f5c06===null||_0x3f5c06===undefined)return'';if(typeof _0x3f5c06==='object')return JSON['stringify'](_0x3f5c06)[_0x2ffcd3(0x174)](0x0,0x28);return String(_0x3f5c06)['substring'](0x0,0x3c);});_0xcb5db8[_0x59936d(0x17e)](_0x1d6899[_0x59936d(0x170)]('|'));}_0x575610[_0x59936d(0x178)]>_0x521cab&&_0xcb5db8[_0x59936d(0x17e)](_0x59936d(0x16e)+(_0x575610[_0x59936d(0x178)]-_0x521cab)+_0x59936d(0x188));_0xcb5db8[_0x59936d(0x17e)]('\x0a('+_0x575610[_0x59936d(0x178)]+'\x20items,\x20'+_0x32e53b[_0x59936d(0x178)]+'\x20fields,\x20showing\x20'+_0x452cb4['length']+_0x59936d(0x173));const _0x140fb9=_0xcb5db8[_0x59936d(0x170)]('\x0a');if(_0x140fb9[_0x59936d(0x178)]<_0x239d58[_0x59936d(0x178)])return _0x140fb9;return null;}catch{return null;}}function a0_0x2d91(_0x75b63d,_0x29e0da){_0x75b63d=_0x75b63d-0x164;const _0xb3b517=a0_0xb3b5();let _0x2d9160=_0xb3b517[_0x75b63d];return _0x2d9160;}function softTruncate(_0x158400,_0x434fca=0x4e20){const _0x574858=a0_0x8dc01e;if(_0x158400[_0x574858(0x178)]<=_0x434fca)return _0x158400;const _0x5a77aa=_0x158400[_0x574858(0x18c)]('\x0a');if(_0x5a77aa[_0x574858(0x178)]<=0xc8)return _0x158400;const _0x2eba18=0x32,_0x4f87cb=0x96,_0x238006=_0x5a77aa[_0x574858(0x17f)](0x0,_0x2eba18),_0x33206b=_0x5a77aa[_0x574858(0x17f)](_0x5a77aa[_0x574858(0x178)]-_0x4f87cb),_0x30ab7f=_0x158400[_0x574858(0x178)]-(_0x238006[_0x574858(0x170)]('\x0a')[_0x574858(0x178)]+_0x33206b[_0x574858(0x170)]('\x0a')[_0x574858(0x178)]);return[..._0x238006,_0x574858(0x17d)+_0x30ab7f+'\x20characters\x20of\x20output]\x20...\x0a',..._0x33206b][_0x574858(0x170)]('\x0a');}
1
+ 'use strict';const a0_0x529a75=a0_0x4929;(function(_0x4bab02,_0x31161b){const _0x2c1f7d=a0_0x4929,_0x54407f=_0x4bab02();while(!![]){try{const _0x27eafc=-parseInt(_0x2c1f7d(0xdc))/0x1+-parseInt(_0x2c1f7d(0xd1))/0x2+parseInt(_0x2c1f7d(0xcc))/0x3+-parseInt(_0x2c1f7d(0xc9))/0x4+-parseInt(_0x2c1f7d(0xb7))/0x5+parseInt(_0x2c1f7d(0xcb))/0x6+-parseInt(_0x2c1f7d(0xbd))/0x7*(-parseInt(_0x2c1f7d(0xb9))/0x8);if(_0x27eafc===_0x31161b)break;else _0x54407f['push'](_0x54407f['shift']());}catch(_0x3f697c){_0x54407f['push'](_0x54407f['shift']());}}}(a0_0x4d45,0x21a2c));Object['defineProperty'](exports,a0_0x529a75(0xc2),{'value':!![]}),exports['stripAnsi']=stripAnsi,exports[a0_0x529a75(0xcf)]=collapseDuplicates,exports['collapseWhitespace']=collapseWhitespace,exports[a0_0x529a75(0xb5)]=stripComments,exports[a0_0x529a75(0xcd)]=smartCrushJson,exports[a0_0x529a75(0xca)]=softTruncate;function stripAnsi(_0x3886c2){const _0x53b8f0=a0_0x529a75,_0x4d0737=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x3886c2[_0x53b8f0(0xd5)](_0x4d0737,'');}function collapseDuplicates(_0xc7867a){const _0x461084=a0_0x529a75,_0x3e72a3=_0xc7867a[_0x461084(0xc0)]('\x0a');if(_0x3e72a3[_0x461084(0xd0)]<=0x1)return _0xc7867a;const _0x44b5f2=[];let _0x3ca40b=_0x3e72a3[0x0],_0x37547d=0x1;for(let _0x4abb3a=0x1;_0x4abb3a<_0x3e72a3['length'];_0x4abb3a++){const _0x3ac645=_0x3e72a3[_0x4abb3a];_0x3ac645===_0x3ca40b&&_0x3ac645['trim']()[_0x461084(0xd0)]>0x0?_0x37547d++:(_0x37547d>0x1?_0x44b5f2[_0x461084(0xba)](_0x3ca40b+_0x461084(0xc4)+_0x37547d+']'):_0x44b5f2['push'](_0x3ca40b),_0x3ca40b=_0x3ac645,_0x37547d=0x1);}return _0x37547d>0x1?_0x44b5f2[_0x461084(0xba)](_0x3ca40b+_0x461084(0xc4)+_0x37547d+']'):_0x44b5f2[_0x461084(0xba)](_0x3ca40b),_0x44b5f2[_0x461084(0xb2)]('\x0a');}function collapseWhitespace(_0x40a3b3){const _0x4ef8f4=a0_0x529a75;let _0x2c3f28=_0x40a3b3[_0x4ef8f4(0xd5)](/[ \t]+$/gm,'');return _0x2c3f28=_0x2c3f28[_0x4ef8f4(0xd5)](/\n{4,}/g,_0x4ef8f4(0xb6)),_0x2c3f28;}function stripComments(_0xefc7d,_0x4c0d15){const _0x3ef4fe=a0_0x529a75;if(!_0x4c0d15)return _0xefc7d;const _0x56d2d0=_0xefc7d[_0x3ef4fe(0xc0)]('\x0a');if(_0x56d2d0[_0x3ef4fe(0xd0)]<=0x96)return _0xefc7d;const _0x412b27={'.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*#(?!!)/},_0x261851=_0x412b27[_0x4c0d15[_0x3ef4fe(0xce)]()];if(!_0x261851)return _0xefc7d;const _0x5c8590=_0x56d2d0[_0x3ef4fe(0xd4)](_0x6afd86=>!_0x261851['test'](_0x6afd86));return _0x5c8590[_0x3ef4fe(0xb2)]('\x0a');}function a0_0x4929(_0x3a63a7,_0x316b12){const _0x4d4508=a0_0x4d45();return a0_0x4929=function(_0x492946,_0x3c064b){_0x492946=_0x492946-0xb2;let _0x1d4cf2=_0x4d4508[_0x492946];return _0x1d4cf2;},a0_0x4929(_0x3a63a7,_0x316b12);}function smartCrushJson(_0xb82d84){const _0xbcce12=a0_0x529a75;try{const _0xf993f2=_0xb82d84['trim']();if(!_0xf993f2[_0xbcce12(0xc7)]('['))return null;const _0x2c57c8=JSON[_0xbcce12(0xbe)](_0xf993f2);if(!Array[_0xbcce12(0xd6)](_0x2c57c8)||_0x2c57c8[_0xbcce12(0xd0)]<0x3)return null;if(typeof _0x2c57c8[0x0]!=='object'||_0x2c57c8[0x0]===null)return null;const _0xf67c17=Object[_0xbcce12(0xd8)](_0x2c57c8[0x0]);if(_0xf67c17[_0xbcce12(0xd0)]===0x0)return null;const _0x4f173f=_0xf67c17['filter'](_0x16ad86=>{const _0x336053=_0xbcce12,_0x3f869d=_0x16ad86['toLowerCase']();return!_0x3f869d[_0x336053(0xbb)](_0x336053(0xdb))&&!_0x3f869d['includes'](_0x336053(0xd7))&&!_0x3f869d[_0x336053(0xbb)](_0x336053(0xbf))&&!_0x3f869d[_0x336053(0xbb)]('hash')&&!_0x3f869d[_0x336053(0xbb)](_0x336053(0xd3))&&!_0x3f869d['includes'](_0x336053(0xc8))&&!_0x3f869d['includes'](_0x336053(0xc3))&&_0x3f869d!==_0x336053(0xb8)&&_0x3f869d!=='engines'&&_0x3f869d!==_0x336053(0xd9)&&_0x3f869d!==_0x336053(0xda);})[_0xbcce12(0xc6)](0x0,0x6);if(_0x4f173f[_0xbcce12(0xd0)]===0x0)return null;const _0x1aed47=[];_0x1aed47[_0xbcce12(0xba)](_0x4f173f['join']('|'));const _0x4c8463=0x1e;for(let _0x4b4a85=0x0;_0x4b4a85<Math[_0xbcce12(0xb3)](_0x2c57c8[_0xbcce12(0xd0)],_0x4c8463);_0x4b4a85++){const _0x47e983=_0x4f173f['map'](_0x735a4b=>{const _0x1809c9=_0xbcce12,_0x79a549=_0x2c57c8[_0x4b4a85][_0x735a4b];if(_0x79a549===null||_0x79a549===undefined)return'';if(typeof _0x79a549===_0x1809c9(0xc5))return JSON[_0x1809c9(0xb4)](_0x79a549)[_0x1809c9(0xde)](0x0,0x28);return String(_0x79a549)[_0x1809c9(0xde)](0x0,0x3c);});_0x1aed47[_0xbcce12(0xba)](_0x47e983['join']('|'));}_0x2c57c8['length']>_0x4c8463&&_0x1aed47['push'](_0xbcce12(0xd2)+(_0x2c57c8[_0xbcce12(0xd0)]-_0x4c8463)+'\x20more\x20rows');_0x1aed47[_0xbcce12(0xba)]('\x0a('+_0x2c57c8[_0xbcce12(0xd0)]+_0xbcce12(0xdd)+_0xf67c17[_0xbcce12(0xd0)]+_0xbcce12(0xbc)+_0x4f173f[_0xbcce12(0xd0)]+_0xbcce12(0xdf));const _0x3d35bd=_0x1aed47[_0xbcce12(0xb2)]('\x0a');if(_0x3d35bd['length']<_0xf993f2['length'])return _0x3d35bd;return null;}catch{return null;}}function softTruncate(_0x30046a,_0x512b91=0x4e20){const _0x521d76=a0_0x529a75;if(_0x30046a[_0x521d76(0xd0)]<=_0x512b91)return _0x30046a;const _0xd179e1=_0x30046a[_0x521d76(0xc0)]('\x0a');if(_0xd179e1[_0x521d76(0xd0)]<=0xc8)return _0x30046a;const _0x339eef=0x32,_0x1b275e=0x96,_0x1f4f18=_0xd179e1[_0x521d76(0xc6)](0x0,_0x339eef),_0x161340=_0xd179e1[_0x521d76(0xc6)](_0xd179e1[_0x521d76(0xd0)]-_0x1b275e),_0x555600=_0x30046a['length']-(_0x1f4f18[_0x521d76(0xb2)]('\x0a')['length']+_0x161340['join']('\x0a')['length']);return[..._0x1f4f18,_0x521d76(0xc1)+_0x555600+'\x20characters\x20of\x20output]\x20...\x0a',..._0x161340][_0x521d76(0xb2)]('\x0a');}function a0_0x4d45(){const _0x274e8c=['parse','sha','split','\x0a...\x20[TrimPrompt:\x20Truncated\x20','__esModule','dev','\x20[x','object','slice','startsWith','signature','195812ZHYNeu','softTruncate','88374vrUzSm','404517qUncql','smartCrushJson','toLowerCase','collapseDuplicates','length','446866layOJC','...\x20+','checksum','filter','replace','isArray','integrity','keys','bugs','repository','resolved','27058aLzBos','\x20items,\x20','substring','\x20key\x20fields)','join','min','stringify','stripComments','\x0a\x0a\x0a','511670zzQUpv','funding','1559928SzDBeo','push','includes','\x20fields,\x20showing\x20','14rtgNXg'];a0_0x4d45=function(){return _0x274e8c;};return a0_0x4d45();}
package/filters/git.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x4afb(_0x1fafbe,_0x1625c3){_0x1fafbe=_0x1fafbe-0x1cc;const _0x937d3b=a0_0x937d();let _0x4afb5c=_0x937d3b[_0x1fafbe];return _0x4afb5c;}const a0_0x4e06c1=a0_0x4afb;(function(_0x7dbcf4,_0x4d466b){const _0x16a3ad=a0_0x4afb,_0x144991=_0x7dbcf4();while(!![]){try{const _0x4f9813=parseInt(_0x16a3ad(0x1d9))/0x1+-parseInt(_0x16a3ad(0x1de))/0x2+parseInt(_0x16a3ad(0x1ff))/0x3+parseInt(_0x16a3ad(0x1ea))/0x4+parseInt(_0x16a3ad(0x1d7))/0x5*(parseInt(_0x16a3ad(0x1e1))/0x6)+-parseInt(_0x16a3ad(0x1d6))/0x7*(parseInt(_0x16a3ad(0x1e3))/0x8)+parseInt(_0x16a3ad(0x1fc))/0x9*(-parseInt(_0x16a3ad(0x1df))/0xa);if(_0x4f9813===_0x4d466b)break;else _0x144991['push'](_0x144991['shift']());}catch(_0x2f9733){_0x144991['push'](_0x144991['shift']());}}}(a0_0x937d,0x36c71));var __createBinding=this&&this[a0_0x4e06c1(0x1ef)]||(Object[a0_0x4e06c1(0x1dd)]?function(_0x40f14d,_0x7bde65,_0x5aa8d4,_0x1c2d32){const _0x582577=a0_0x4e06c1;if(_0x1c2d32===undefined)_0x1c2d32=_0x5aa8d4;var _0x2ead91=Object['getOwnPropertyDescriptor'](_0x7bde65,_0x5aa8d4);(!_0x2ead91||('get'in _0x2ead91?!_0x7bde65[_0x582577(0x1ce)]:_0x2ead91[_0x582577(0x1fb)]||_0x2ead91[_0x582577(0x1cf)]))&&(_0x2ead91={'enumerable':!![],'get':function(){return _0x7bde65[_0x5aa8d4];}}),Object[_0x582577(0x1d5)](_0x40f14d,_0x1c2d32,_0x2ead91);}:function(_0x590981,_0x704051,_0x308a95,_0x468cf9){if(_0x468cf9===undefined)_0x468cf9=_0x308a95;_0x590981[_0x468cf9]=_0x704051[_0x308a95];}),__setModuleDefault=this&&this[a0_0x4e06c1(0x1ec)]||(Object[a0_0x4e06c1(0x1dd)]?function(_0x3f9fbe,_0x7b2818){const _0x123103=a0_0x4e06c1;Object[_0x123103(0x1d5)](_0x3f9fbe,_0x123103(0x1e6),{'enumerable':!![],'value':_0x7b2818});}:function(_0x367936,_0x13d281){const _0x41bf9d=a0_0x4e06c1;_0x367936[_0x41bf9d(0x1e6)]=_0x13d281;}),__importStar=this&&this[a0_0x4e06c1(0x1fe)]||(function(){var _0x50fae5=function(_0x462ea2){const _0xb6c23c=a0_0x4afb;return _0x50fae5=Object[_0xb6c23c(0x1e7)]||function(_0x38390e){const _0x5a6e37=_0xb6c23c;var _0x4ab4ff=[];for(var _0x4a0b0e in _0x38390e)if(Object[_0x5a6e37(0x1f6)]['hasOwnProperty'][_0x5a6e37(0x1e8)](_0x38390e,_0x4a0b0e))_0x4ab4ff[_0x4ab4ff[_0x5a6e37(0x1eb)]]=_0x4a0b0e;return _0x4ab4ff;},_0x50fae5(_0x462ea2);};return function(_0x56ef96){const _0x87b703=a0_0x4afb;if(_0x56ef96&&_0x56ef96[_0x87b703(0x1ce)])return _0x56ef96;var _0x48d19e={};if(_0x56ef96!=null){for(var _0x4c0f10=_0x50fae5(_0x56ef96),_0x497947=0x0;_0x497947<_0x4c0f10['length'];_0x497947++)if(_0x4c0f10[_0x497947]!==_0x87b703(0x1e6))__createBinding(_0x48d19e,_0x56ef96,_0x4c0f10[_0x497947]);}return __setModuleDefault(_0x48d19e,_0x56ef96),_0x48d19e;};}());Object[a0_0x4e06c1(0x1d5)](exports,'__esModule',{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x4e06c1(0x1f9)]=filterGitLog,exports[a0_0x4e06c1(0x1e5)]=filterGitDiff;const path=__importStar(require(a0_0x4e06c1(0x1d2)));function filterGitStatus(_0x293dec){const _0x408713=a0_0x4e06c1,_0x228cad=_0x293dec[_0x408713(0x1e0)]('\x0a')[_0x408713(0x1f3)](_0x5c2f1e=>_0x5c2f1e[_0x408713(0x1f5)]())[_0x408713(0x1d3)](_0x381393=>_0x381393[_0x408713(0x1eb)]>0x0);if(_0x228cad[_0x408713(0x1eb)]===0x0)return'Clean\x20working\x20tree';const _0x13b18f=[],_0x52e615=[],_0x1d5911=[];for(const _0x13e48f of _0x228cad){if(_0x13e48f[_0x408713(0x1d4)]('##')){const _0x41d95c=_0x13e48f[_0x408713(0x1f7)](/^##\s*/,'');_0x13b18f[_0x408713(0x1d1)](_0x408713(0x1d8)+_0x41d95c);}else _0x13e48f[_0x408713(0x1d4)]('??')?_0x52e615[_0x408713(0x1d1)](_0x13e48f[_0x408713(0x1e2)](0x3)[_0x408713(0x1f5)]()):_0x1d5911[_0x408713(0x1d1)](_0x13e48f);}_0x1d5911[_0x408713(0x1eb)]>0x0&&(_0x13b18f[_0x408713(0x1d1)](_0x408713(0x1fa)),_0x13b18f[_0x408713(0x1d1)](..._0x1d5911[_0x408713(0x1f3)](_0x2e8cb5=>'\x20\x20'+_0x2e8cb5)));if(_0x52e615['length']>0x0){_0x13b18f[_0x408713(0x1d1)](_0x408713(0x1ee));const _0x5d97c6={},_0x37830b=[];for(const _0x437b51 of _0x52e615){const _0x239004=path['dirname'](_0x437b51);_0x239004==='.'||_0x239004===''?_0x37830b[_0x408713(0x1d1)](_0x437b51):(!_0x5d97c6[_0x239004]&&(_0x5d97c6[_0x239004]=[]),_0x5d97c6[_0x239004][_0x408713(0x1d1)](path[_0x408713(0x1f1)](_0x437b51)));}for(const [_0x343ec3,_0x434af9]of Object[_0x408713(0x1e9)](_0x5d97c6)){if(_0x434af9[_0x408713(0x1eb)]>0x5)_0x13b18f['push']('\x20\x20??\x20'+_0x343ec3+_0x408713(0x1f4)+_0x434af9[_0x408713(0x1eb)]+_0x408713(0x1dc));else for(const _0x3b4f41 of _0x434af9){_0x13b18f[_0x408713(0x1d1)](_0x408713(0x1db)+path[_0x408713(0x200)](_0x343ec3,_0x3b4f41));}}for(const _0x2bb479 of _0x37830b){_0x13b18f['push'](_0x408713(0x1db)+_0x2bb479);}}return _0x13b18f[_0x408713(0x200)]('\x0a');}function filterGitLog(_0x3b4dea){const _0x32823c=a0_0x4e06c1,_0x1bd47f=_0x3b4dea[_0x32823c(0x1e0)]('---END---')[_0x32823c(0x1f3)](_0x3ebf07=>_0x3ebf07['trim']())['filter'](_0x15be03=>_0x15be03[_0x32823c(0x1eb)]>0x0);if(_0x1bd47f[_0x32823c(0x1eb)]===0x0)return _0x3b4dea;const _0x322b4d=[];for(const _0x132d5e of _0x1bd47f){const _0x5819c7=_0x132d5e['split']('\x0a'),_0x17e394=_0x5819c7[0x0]||'',_0x2d8c70=_0x5819c7[_0x32823c(0x1fd)](0x1)['map'](_0x374d62=>_0x374d62[_0x32823c(0x1f5)]())[_0x32823c(0x1d3)](_0x1f47bd=>_0x1f47bd[_0x32823c(0x1eb)]>0x0);_0x322b4d[_0x32823c(0x1d1)]('-\x20'+_0x17e394),_0x2d8c70[_0x32823c(0x1eb)]>0x0&&(_0x322b4d[_0x32823c(0x1d1)]('\x20\x20'+_0x2d8c70[0x0]),_0x2d8c70[_0x32823c(0x1eb)]>0x1&&_0x322b4d[_0x32823c(0x1d1)](_0x32823c(0x1f0)+(_0x2d8c70['length']-0x1)+'\x20lines\x20of\x20description)'));}return _0x322b4d[_0x32823c(0x200)]('\x0a');}function a0_0x937d(){const _0x10d057=['\x20more\x20modifications','map','/\x20(','trim','prototype','replace','\x20\x20...\x20+','filterGitLog','\x0aChanges:','writable','900621SozbGo','slice','__importStar','1221252tfTBMN','join','+++','\x20(+','__esModule','configurable','[file]\x20','push','path','filter','startsWith','defineProperty','109067nijoMl','1082830SrCjdv','*\x20Branch:\x20','44312HKwBCd','unknown_file','\x20\x20??\x20','\x20untracked\x20files)','create','89882JYaodZ','70olRReG','split','6gzbzsz','substring','48wSDFiH','diff\x20--git','filterGitDiff','default','getOwnPropertyNames','call','entries','1581268jrfHoC','length','__setModuleDefault','---','\x0aUntracked\x20files:','__createBinding','\x20\x20...\x20(+','basename'];a0_0x937d=function(){return _0x10d057;};return a0_0x937d();}function filterGitDiff(_0x5957c5){const _0x4de5c7=a0_0x4e06c1,_0x4d16e5=_0x5957c5[_0x4de5c7(0x1e0)]('\x0a'),_0x554091=[];let _0x1426b9='',_0x595ab8=0x0,_0x4d6eb7=0x0,_0x320ccd=[];const _0x27224e=()=>{const _0x3c84ce=_0x4de5c7;if(_0x1426b9&&(_0x595ab8>0x0||_0x4d6eb7>0x0)){_0x554091[_0x3c84ce(0x1d1)](_0x3c84ce(0x1d0)+_0x1426b9+_0x3c84ce(0x1cd)+_0x595ab8+'\x20-'+_0x4d6eb7+')');const _0x21906d=0xa,_0x4413fa=_0x320ccd['slice'](0x0,_0x21906d);for(const _0x569b4c of _0x4413fa){_0x554091[_0x3c84ce(0x1d1)]('\x20\x20'+_0x569b4c);}const _0x2368d0=_0x595ab8+_0x4d6eb7-_0x21906d;_0x2368d0>0x0&&_0x554091[_0x3c84ce(0x1d1)](_0x3c84ce(0x1f8)+_0x2368d0+_0x3c84ce(0x1f2));}_0x595ab8=0x0,_0x4d6eb7=0x0,_0x320ccd=[];};for(const _0x18491c of _0x4d16e5){if(_0x18491c[_0x4de5c7(0x1d4)](_0x4de5c7(0x1e4))){_0x27224e();const _0x2c383c=_0x18491c['match'](/\sb\/(.+)$/);_0x1426b9=_0x2c383c?_0x2c383c[0x1]:_0x4de5c7(0x1da);}else{if(_0x18491c[_0x4de5c7(0x1d4)]('+')&&!_0x18491c[_0x4de5c7(0x1d4)](_0x4de5c7(0x1cc)))_0x595ab8++,_0x320ccd[_0x4de5c7(0x1d1)](_0x18491c);else _0x18491c[_0x4de5c7(0x1d4)]('-')&&!_0x18491c['startsWith'](_0x4de5c7(0x1ed))&&(_0x4d6eb7++,_0x320ccd[_0x4de5c7(0x1d1)](_0x18491c));}}_0x27224e();const _0x4bdf88=_0x554091[_0x4de5c7(0x200)]('\x0a');return _0x4bdf88[_0x4de5c7(0x1eb)]>0x0?_0x4bdf88:'No\x20modifications';}
1
+ 'use strict';const a0_0x2baf71=a0_0x50e5;(function(_0x35a5b1,_0x28b95d){const _0x4ebbc3=a0_0x50e5,_0x1acf57=_0x35a5b1();while(!![]){try{const _0x1ab4ba=parseInt(_0x4ebbc3(0x19e))/0x1+parseInt(_0x4ebbc3(0x19c))/0x2*(-parseInt(_0x4ebbc3(0x196))/0x3)+parseInt(_0x4ebbc3(0x178))/0x4+-parseInt(_0x4ebbc3(0x19a))/0x5*(-parseInt(_0x4ebbc3(0x171))/0x6)+parseInt(_0x4ebbc3(0x185))/0x7*(parseInt(_0x4ebbc3(0x175))/0x8)+-parseInt(_0x4ebbc3(0x18d))/0x9+parseInt(_0x4ebbc3(0x172))/0xa*(parseInt(_0x4ebbc3(0x1a1))/0xb);if(_0x1ab4ba===_0x28b95d)break;else _0x1acf57['push'](_0x1acf57['shift']());}catch(_0x4d3b4b){_0x1acf57['push'](_0x1acf57['shift']());}}}(a0_0x15f1,0xcd95e));var __createBinding=this&&this[a0_0x2baf71(0x188)]||(Object[a0_0x2baf71(0x198)]?function(_0x5e4be3,_0x2283e0,_0x574b70,_0x37be69){const _0x5e71cf=a0_0x2baf71;if(_0x37be69===undefined)_0x37be69=_0x574b70;var _0x4737f9=Object[_0x5e71cf(0x176)](_0x2283e0,_0x574b70);(!_0x4737f9||(_0x5e71cf(0x179)in _0x4737f9?!_0x2283e0[_0x5e71cf(0x195)]:_0x4737f9[_0x5e71cf(0x189)]||_0x4737f9[_0x5e71cf(0x17e)]))&&(_0x4737f9={'enumerable':!![],'get':function(){return _0x2283e0[_0x574b70];}}),Object['defineProperty'](_0x5e4be3,_0x37be69,_0x4737f9);}:function(_0x1ffbf0,_0x1103b7,_0x394adb,_0x48e00b){if(_0x48e00b===undefined)_0x48e00b=_0x394adb;_0x1ffbf0[_0x48e00b]=_0x1103b7[_0x394adb];}),__setModuleDefault=this&&this[a0_0x2baf71(0x18e)]||(Object['create']?function(_0x3c4151,_0x277711){Object['defineProperty'](_0x3c4151,'default',{'enumerable':!![],'value':_0x277711});}:function(_0xdf7bac,_0x42faae){const _0x30a92b=a0_0x2baf71;_0xdf7bac[_0x30a92b(0x18c)]=_0x42faae;}),__importStar=this&&this[a0_0x2baf71(0x183)]||(function(){var _0x269152=function(_0xcd5811){const _0x215bd4=a0_0x50e5;return _0x269152=Object[_0x215bd4(0x177)]||function(_0x501f20){const _0x8e0164=_0x215bd4;var _0x397ce3=[];for(var _0x46bf35 in _0x501f20)if(Object[_0x8e0164(0x16e)][_0x8e0164(0x173)][_0x8e0164(0x187)](_0x501f20,_0x46bf35))_0x397ce3[_0x397ce3['length']]=_0x46bf35;return _0x397ce3;},_0x269152(_0xcd5811);};return function(_0x5c3098){const _0x4f0a88=a0_0x50e5;if(_0x5c3098&&_0x5c3098[_0x4f0a88(0x195)])return _0x5c3098;var _0x3626a7={};if(_0x5c3098!=null){for(var _0x896690=_0x269152(_0x5c3098),_0x475846=0x0;_0x475846<_0x896690[_0x4f0a88(0x191)];_0x475846++)if(_0x896690[_0x475846]!==_0x4f0a88(0x18c))__createBinding(_0x3626a7,_0x5c3098,_0x896690[_0x475846]);}return __setModuleDefault(_0x3626a7,_0x5c3098),_0x3626a7;};}());function a0_0x50e5(_0x3f7f4b,_0x1dbb2c){const _0x15f12b=a0_0x15f1();return a0_0x50e5=function(_0x50e563,_0x589cc5){_0x50e563=_0x50e563-0x16e;let _0x5bf689=_0x15f12b[_0x50e563];return _0x5bf689;},a0_0x50e5(_0x3f7f4b,_0x1dbb2c);}Object[a0_0x2baf71(0x170)](exports,'__esModule',{'value':!![]}),exports[a0_0x2baf71(0x18a)]=filterGitStatus,exports[a0_0x2baf71(0x1a4)]=filterGitLog,exports[a0_0x2baf71(0x1a3)]=filterGitDiff;function a0_0x15f1(){const _0x2d5572=['configurable','*\x20Branch:\x20','map','\x20\x20??\x20','basename','__importStar','---END---','7609bwVOjc','+++','call','__createBinding','writable','filterGitStatus','substring','default','9830763AqVUeS','__setModuleDefault','split','\x0aChanges:','length','match','slice','\x20(+','__esModule','3oBbgRJ','path','create','join','165RLMPhs','Clean\x20working\x20tree','2737346VgsEZM','No\x20modifications','1365252lDuScO','startsWith','\x20\x20...\x20+','77wnVZAV','trim','filterGitDiff','filterGitLog','dirname','diff\x20--git','entries','/\x20(','filter','prototype','push','defineProperty','44220XHXZBC','788420FEioOO','hasOwnProperty','replace','8000DUNVZj','getOwnPropertyDescriptor','getOwnPropertyNames','222808qqbqMb','get','\x20more\x20modifications','\x20\x20...\x20(+','\x20lines\x20of\x20description)','\x20untracked\x20files)'];a0_0x15f1=function(){return _0x2d5572;};return a0_0x15f1();}const path=__importStar(require(a0_0x2baf71(0x197)));function filterGitStatus(_0x2186df){const _0x1efb1f=a0_0x2baf71,_0x74d6ed=_0x2186df[_0x1efb1f(0x18f)]('\x0a')[_0x1efb1f(0x180)](_0x2ba678=>_0x2ba678[_0x1efb1f(0x1a2)]())[_0x1efb1f(0x1a9)](_0x53c192=>_0x53c192[_0x1efb1f(0x191)]>0x0);if(_0x74d6ed[_0x1efb1f(0x191)]===0x0)return _0x1efb1f(0x19b);const _0x438969=[],_0x5d2a7b=[],_0x56de78=[];for(const _0xbfcbbd of _0x74d6ed){if(_0xbfcbbd[_0x1efb1f(0x19f)]('##')){const _0x5aed20=_0xbfcbbd[_0x1efb1f(0x174)](/^##\s*/,'');_0x438969[_0x1efb1f(0x16f)](_0x1efb1f(0x17f)+_0x5aed20);}else _0xbfcbbd[_0x1efb1f(0x19f)]('??')?_0x5d2a7b[_0x1efb1f(0x16f)](_0xbfcbbd[_0x1efb1f(0x18b)](0x3)[_0x1efb1f(0x1a2)]()):_0x56de78[_0x1efb1f(0x16f)](_0xbfcbbd);}_0x56de78[_0x1efb1f(0x191)]>0x0&&(_0x438969['push'](_0x1efb1f(0x190)),_0x438969['push'](..._0x56de78['map'](_0x380843=>'\x20\x20'+_0x380843)));if(_0x5d2a7b[_0x1efb1f(0x191)]>0x0){_0x438969['push']('\x0aUntracked\x20files:');const _0x53cfda={},_0x3daa9d=[];for(const _0x5c2dc5 of _0x5d2a7b){const _0x47df02=path[_0x1efb1f(0x1a5)](_0x5c2dc5);_0x47df02==='.'||_0x47df02===''?_0x3daa9d[_0x1efb1f(0x16f)](_0x5c2dc5):(!_0x53cfda[_0x47df02]&&(_0x53cfda[_0x47df02]=[]),_0x53cfda[_0x47df02][_0x1efb1f(0x16f)](path[_0x1efb1f(0x182)](_0x5c2dc5)));}for(const [_0x2158d3,_0x368d4d]of Object[_0x1efb1f(0x1a7)](_0x53cfda)){if(_0x368d4d[_0x1efb1f(0x191)]>0x5)_0x438969[_0x1efb1f(0x16f)]('\x20\x20??\x20'+_0x2158d3+_0x1efb1f(0x1a8)+_0x368d4d['length']+_0x1efb1f(0x17d));else for(const _0x4d452d of _0x368d4d){_0x438969[_0x1efb1f(0x16f)](_0x1efb1f(0x181)+path[_0x1efb1f(0x199)](_0x2158d3,_0x4d452d));}}for(const _0x1bc3fd of _0x3daa9d){_0x438969[_0x1efb1f(0x16f)](_0x1efb1f(0x181)+_0x1bc3fd);}}return _0x438969[_0x1efb1f(0x199)]('\x0a');}function filterGitLog(_0x41d7ba){const _0x512b70=a0_0x2baf71,_0x44bba5=_0x41d7ba[_0x512b70(0x18f)](_0x512b70(0x184))['map'](_0x4f1a7f=>_0x4f1a7f['trim']())['filter'](_0x233240=>_0x233240[_0x512b70(0x191)]>0x0);if(_0x44bba5['length']===0x0)return _0x41d7ba;const _0x2c3a23=[];for(const _0x50d55c of _0x44bba5){const _0x1a9ad0=_0x50d55c['split']('\x0a'),_0x451cd5=_0x1a9ad0[0x0]||'',_0x16bce0=_0x1a9ad0['slice'](0x1)[_0x512b70(0x180)](_0x37e70e=>_0x37e70e[_0x512b70(0x1a2)]())['filter'](_0x1b0b96=>_0x1b0b96[_0x512b70(0x191)]>0x0);_0x2c3a23[_0x512b70(0x16f)]('-\x20'+_0x451cd5),_0x16bce0['length']>0x0&&(_0x2c3a23['push']('\x20\x20'+_0x16bce0[0x0]),_0x16bce0['length']>0x1&&_0x2c3a23[_0x512b70(0x16f)](_0x512b70(0x17b)+(_0x16bce0[_0x512b70(0x191)]-0x1)+_0x512b70(0x17c)));}return _0x2c3a23['join']('\x0a');}function filterGitDiff(_0x309db6){const _0x77906a=a0_0x2baf71,_0x47e737=_0x309db6[_0x77906a(0x18f)]('\x0a'),_0x7be569=[];let _0x568726='',_0x4e09c9=0x0,_0x86f9c5=0x0,_0x2b2a75=[];const _0x11563a=()=>{const _0x4f05d8=_0x77906a;if(_0x568726&&(_0x4e09c9>0x0||_0x86f9c5>0x0)){_0x7be569[_0x4f05d8(0x16f)]('[file]\x20'+_0x568726+_0x4f05d8(0x194)+_0x4e09c9+'\x20-'+_0x86f9c5+')');const _0x7e5183=0xa,_0x28a28e=_0x2b2a75[_0x4f05d8(0x193)](0x0,_0x7e5183);for(const _0x3b3c35 of _0x28a28e){_0x7be569[_0x4f05d8(0x16f)]('\x20\x20'+_0x3b3c35);}const _0x119136=_0x4e09c9+_0x86f9c5-_0x7e5183;_0x119136>0x0&&_0x7be569[_0x4f05d8(0x16f)](_0x4f05d8(0x1a0)+_0x119136+_0x4f05d8(0x17a));}_0x4e09c9=0x0,_0x86f9c5=0x0,_0x2b2a75=[];};for(const _0x585292 of _0x47e737){if(_0x585292[_0x77906a(0x19f)](_0x77906a(0x1a6))){_0x11563a();const _0x552376=_0x585292[_0x77906a(0x192)](/\sb\/(.+)$/);_0x568726=_0x552376?_0x552376[0x1]:'unknown_file';}else{if(_0x585292[_0x77906a(0x19f)]('+')&&!_0x585292[_0x77906a(0x19f)](_0x77906a(0x186)))_0x4e09c9++,_0x2b2a75[_0x77906a(0x16f)](_0x585292);else _0x585292[_0x77906a(0x19f)]('-')&&!_0x585292['startsWith']('---')&&(_0x86f9c5++,_0x2b2a75['push'](_0x585292));}}_0x11563a();const _0x41f2a5=_0x7be569[_0x77906a(0x199)]('\x0a');return _0x41f2a5['length']>0x0?_0x41f2a5:_0x77906a(0x19d);}
package/filters/go.js CHANGED
@@ -1 +1,99 @@
1
- 'use strict';const a0_0x4cd066=a0_0x15b0;(function(_0x51c2f9,_0x2e97a9){const _0x9a6284=a0_0x15b0,_0x302b4d=_0x51c2f9();while(!![]){try{const _0x28dadb=parseInt(_0x9a6284(0x6f))/0x1*(parseInt(_0x9a6284(0x75))/0x2)+-parseInt(_0x9a6284(0x89))/0x3+-parseInt(_0x9a6284(0x73))/0x4+-parseInt(_0x9a6284(0x68))/0x5*(-parseInt(_0x9a6284(0x77))/0x6)+parseInt(_0x9a6284(0x69))/0x7+parseInt(_0x9a6284(0x6c))/0x8*(parseInt(_0x9a6284(0x79))/0x9)+parseInt(_0x9a6284(0x78))/0xa*(-parseInt(_0x9a6284(0x84))/0xb);if(_0x28dadb===_0x2e97a9)break;else _0x302b4d['push'](_0x302b4d['shift']());}catch(_0xc693e7){_0x302b4d['push'](_0x302b4d['shift']());}}}(a0_0x27af,0x9e5a0));function a0_0x27af(){const _0x248305=['189680AtRIRn','\x20passed','34LDAsKz','\x20passed,\x20','6gbLntF','2119480OVgFCM','234387sYuIsY','split','startsWith','Go\x20vet:\x20','push','match','filter','min','trim','\x20failed,\x20','__esModule','121fWGrat','===\x20RUN','lines','\x20\x20\x20\x20...\x20+','PASS','1115607CjPpjv','\x0aFailures:','defineProperty','Go\x20test:\x20no\x20test\x20files','\x20\x20...\x20+','\x20skipped','filterGoTest','Go\x20test:\x20all\x20tests\x20passed','\x20more\x20issues','Go\x20test:\x20','FAIL','3092645axHbkp','7394730HxUMsU','---\x20SKIP:','length','184TzxVJr','\x20issues\x20found','slice','66201nruZgu','includes','no\x20test\x20files','join'];a0_0x27af=function(){return _0x248305;};return a0_0x27af();}Object[a0_0x4cd066(0x8b)](exports,a0_0x4cd066(0x83),{'value':!![]}),exports[a0_0x4cd066(0x8f)]=filterGoTest,exports['filterGoVet']=filterGoVet;function a0_0x15b0(_0x3b41b5,_0x3dba76){_0x3b41b5=_0x3b41b5-0x65;const _0x27afd1=a0_0x27af();let _0x15b0b1=_0x27afd1[_0x3b41b5];return _0x15b0b1;}function filterGoTest(_0x3fcd69){const _0x4f268d=a0_0x4cd066,_0x57e485=_0x3fcd69['split']('\x0a');let _0x139d52=0x0,_0x211b72=0x0,_0x276f5e=0x0;const _0x5d1f8b=[],_0x36a4fa=[];let _0x1b65c6=null;for(const _0x93e99c of _0x57e485){const _0xb466bf=_0x93e99c[_0x4f268d(0x81)](),_0x50b695=_0xb466bf[_0x4f268d(0x7e)](/^ok\s+\S+\s+[\d.]+s/);if(_0x50b695){_0x36a4fa['push'](_0xb466bf);continue;}const _0x34f2f8=_0xb466bf[_0x4f268d(0x7e)](/^FAIL\s+\S+/);if(_0x34f2f8){_0x36a4fa['push'](_0xb466bf);continue;}const _0x5c6e7a=_0xb466bf[_0x4f268d(0x7e)](/^--- PASS:/);if(_0x5c6e7a){_0x139d52++;continue;}const _0x168607=_0xb466bf[_0x4f268d(0x7e)](/^--- FAIL:\s+(\S+)/);if(_0x168607){if(_0x1b65c6)_0x5d1f8b[_0x4f268d(0x7d)](_0x1b65c6);_0x1b65c6={'name':_0x168607[0x1],'lines':[]},_0x211b72++;continue;}if(_0xb466bf[_0x4f268d(0x7b)](_0x4f268d(0x6a))){_0x276f5e++;continue;}_0x1b65c6&&_0xb466bf[_0x4f268d(0x6b)]>0x0&&!_0xb466bf['startsWith'](_0x4f268d(0x85))&&_0x1b65c6[_0x4f268d(0x86)]['push'](_0x93e99c),_0xb466bf['startsWith']('===\x20RUN')&&(_0x1b65c6&&(_0x5d1f8b[_0x4f268d(0x7d)](_0x1b65c6),_0x1b65c6=null));}if(_0x1b65c6)_0x5d1f8b[_0x4f268d(0x7d)](_0x1b65c6);if(_0x139d52===0x0&&_0x211b72===0x0&&_0x276f5e===0x0){if(_0x3fcd69[_0x4f268d(0x70)](_0x4f268d(0x88))&&!_0x3fcd69['includes'](_0x4f268d(0x67)))return _0x4f268d(0x90);if(_0x3fcd69['includes'](_0x4f268d(0x71)))return _0x4f268d(0x8c);return _0x3fcd69;}if(_0x211b72===0x0){const _0x237c7b=[_0x4f268d(0x66)+_0x139d52+_0x4f268d(0x74)];if(_0x276f5e>0x0)_0x237c7b['push'](_0x276f5e+'\x20skipped');return _0x237c7b[_0x4f268d(0x72)](',\x20');}const _0x566f41=['Go\x20test:\x20'+_0x139d52+_0x4f268d(0x76)+_0x211b72+_0x4f268d(0x82)+_0x276f5e+_0x4f268d(0x8e)];if(_0x5d1f8b[_0x4f268d(0x6b)]>0x0){_0x566f41[_0x4f268d(0x7d)](_0x4f268d(0x8a));const _0x519313=0x3;for(let _0xebfc31=0x0;_0xebfc31<Math[_0x4f268d(0x80)](_0x5d1f8b['length'],_0x519313);_0xebfc31++){const _0x53d2a0=_0x5d1f8b[_0xebfc31];_0x566f41[_0x4f268d(0x7d)]('\x20\x20'+(_0xebfc31+0x1)+'.\x20'+_0x53d2a0['name']);for(const _0x2ad512 of _0x53d2a0['lines']['slice'](0x0,0x5)){_0x566f41['push']('\x20\x20\x20\x20'+_0x2ad512[_0x4f268d(0x81)]());}_0x53d2a0[_0x4f268d(0x86)]['length']>0x5&&_0x566f41[_0x4f268d(0x7d)](_0x4f268d(0x87)+(_0x53d2a0['lines'][_0x4f268d(0x6b)]-0x5)+'\x20more\x20lines');}_0x5d1f8b[_0x4f268d(0x6b)]>_0x519313&&_0x566f41[_0x4f268d(0x7d)](_0x4f268d(0x8d)+(_0x5d1f8b[_0x4f268d(0x6b)]-_0x519313)+'\x20more\x20failures');}return _0x566f41[_0x4f268d(0x72)]('\x0a');}function filterGoVet(_0x46dc6e){const _0x2df9c1=a0_0x4cd066,_0x55025b=_0x46dc6e[_0x2df9c1(0x7a)]('\x0a')[_0x2df9c1(0x7f)](_0x363c1e=>_0x363c1e['trim']()[_0x2df9c1(0x6b)]>0x0);if(_0x55025b['length']===0x0)return'Go\x20vet:\x20no\x20issues\x20found';if(_0x55025b[_0x2df9c1(0x6b)]<=0x14)return _0x46dc6e[_0x2df9c1(0x81)]();const _0x26944a=[_0x2df9c1(0x7c)+_0x55025b['length']+_0x2df9c1(0x6d)];return _0x26944a[_0x2df9c1(0x7d)](..._0x55025b[_0x2df9c1(0x6e)](0x0,0xa)),_0x55025b[_0x2df9c1(0x6b)]>0xa&&_0x26944a[_0x2df9c1(0x7d)]('...\x20+'+(_0x55025b[_0x2df9c1(0x6b)]-0xa)+_0x2df9c1(0x65)),_0x26944a[_0x2df9c1(0x72)]('\x0a');}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.filterGoTest = filterGoTest;
4
+ exports.filterGoVet = filterGoVet;
5
+ function filterGoTest(stdout) {
6
+ const lines = stdout.split('\n');
7
+ let totalPassed = 0;
8
+ let totalFailed = 0;
9
+ let totalSkipped = 0;
10
+ const failedTests = [];
11
+ const packageResults = [];
12
+ let currentFail = null;
13
+ for (const line of lines) {
14
+ const trimmed = line.trim();
15
+ const okMatch = trimmed.match(/^ok\s+\S+\s+[\d.]+s/);
16
+ if (okMatch) {
17
+ packageResults.push(trimmed);
18
+ continue;
19
+ }
20
+ const failMatch = trimmed.match(/^FAIL\s+\S+/);
21
+ if (failMatch) {
22
+ packageResults.push(trimmed);
23
+ continue;
24
+ }
25
+ const passMatch = trimmed.match(/^--- PASS:/);
26
+ if (passMatch) {
27
+ totalPassed++;
28
+ continue;
29
+ }
30
+ const failTestMatch = trimmed.match(/^--- FAIL:\s+(\S+)/);
31
+ if (failTestMatch) {
32
+ if (currentFail)
33
+ failedTests.push(currentFail);
34
+ currentFail = { name: failTestMatch[1], lines: [] };
35
+ totalFailed++;
36
+ continue;
37
+ }
38
+ if (trimmed.startsWith('--- SKIP:')) {
39
+ totalSkipped++;
40
+ continue;
41
+ }
42
+ if (currentFail && trimmed.length > 0 && !trimmed.startsWith('=== RUN')) {
43
+ currentFail.lines.push(line);
44
+ }
45
+ if (trimmed.startsWith('=== RUN')) {
46
+ if (currentFail) {
47
+ failedTests.push(currentFail);
48
+ currentFail = null;
49
+ }
50
+ }
51
+ }
52
+ if (currentFail)
53
+ failedTests.push(currentFail);
54
+ if (totalPassed === 0 && totalFailed === 0 && totalSkipped === 0) {
55
+ if (stdout.includes('PASS') && !stdout.includes('FAIL'))
56
+ return "Go test: all tests passed";
57
+ if (stdout.includes('no test files'))
58
+ return "Go test: no test files";
59
+ return stdout;
60
+ }
61
+ if (totalFailed === 0) {
62
+ const parts = [`Go test: ${totalPassed} passed`];
63
+ if (totalSkipped > 0)
64
+ parts.push(`${totalSkipped} skipped`);
65
+ return parts.join(', ');
66
+ }
67
+ const result = [`Go test: ${totalPassed} passed, ${totalFailed} failed, ${totalSkipped} skipped`];
68
+ if (failedTests.length > 0) {
69
+ result.push("\nFailures:");
70
+ const limit = 3;
71
+ for (let i = 0; i < Math.min(failedTests.length, limit); i++) {
72
+ const ft = failedTests[i];
73
+ result.push(` ${i + 1}. ${ft.name}`);
74
+ for (const l of ft.lines.slice(0, 5)) {
75
+ result.push(` ${l.trim()}`);
76
+ }
77
+ if (ft.lines.length > 5) {
78
+ result.push(` ... +${ft.lines.length - 5} more lines`);
79
+ }
80
+ }
81
+ if (failedTests.length > limit) {
82
+ result.push(` ... +${failedTests.length - limit} more failures`);
83
+ }
84
+ }
85
+ return result.join('\n');
86
+ }
87
+ function filterGoVet(stdout) {
88
+ const lines = stdout.split('\n').filter(l => l.trim().length > 0);
89
+ if (lines.length === 0)
90
+ return "Go vet: no issues found";
91
+ if (lines.length <= 20)
92
+ return stdout.trim();
93
+ const result = [`Go vet: ${lines.length} issues found`];
94
+ result.push(...lines.slice(0, 10));
95
+ if (lines.length > 10) {
96
+ result.push(`... +${lines.length - 10} more issues`);
97
+ }
98
+ return result.join('\n');
99
+ }