trimprompt 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/hooks/claude-hook.js +1 -1
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/file-watcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0xd76980=a0_0x5027;(function(_0x51b0e3,_0x58277e){const _0x4d863f=a0_0x5027,_0x55ea26=_0x51b0e3();while(!![]){try{const _0x481784=parseInt(_0x4d863f(0x166))/0x1+parseInt(_0x4d863f(0x120))/0x2*(-parseInt(_0x4d863f(0xd7))/0x3)+parseInt(_0x4d863f(0xeb))/0x4+parseInt(_0x4d863f(0x101))/0x5*(-parseInt(_0x4d863f(0x168))/0x6)+parseInt(_0x4d863f(0x160))/0x7+-parseInt(_0x4d863f(0x15b))/0x8+-parseInt(_0x4d863f(0x165))/0x9;if(_0x481784===_0x58277e)break;else _0x55ea26['push'](_0x55ea26['shift']());}catch(_0x51384d){_0x55ea26['push'](_0x55ea26['shift']());}}}(a0_0x3808,0x92636));function a0_0x3808(){const _0x11c206=['./tracker','node_modules','media__','join','conv_','writable','compact:','.db','call','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','stringify','1545292WDiMtW','mkdirSync','build','.webp','.venv','path','name','string','Library','officialCompactSaved','.jpeg','set','.openclaw','mtimeMs','.agents','env','conversation_toggles','existsSync','Compaction\x20failed','hookSavedTokens','logExecution','history','170MnSqlm','Start\x20Menu','TrimPromptDaemon.vbs','out','activeSavedTokens','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','Startup','endsWith','cortex','trim','Application\x20Support','loadConfig','.json1','storage','.opencode','startsWith','sideCacheSaved','role','byteLength','extname','projects','.vscdb','saveConfig','.cortex','platform','darwin','none','config.json','Summary:\x20Text\x20block\x20offloaded\x20(','codex','sessions','2Dinlrb','tokens','hasOwnProperty','isArray','image_','utf8','./proxy-conv','copilot','includes','compressed_tokens','.png','.gif','length','writeFileSync','defineProperty','opencode','lineCount','workspaceStorage','type','ceil','split','readFileSync','parse','Cursor','.json','compaction\x20failed','chunk_id','AppData','antigravity','startWatcherDaemon','compactSessionCopy','fullPath','prompt_turn','installWindowsStartupService','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','isFile','Summary:\x20Tool\x20result\x20offloaded\x20(','__setModuleDefault','custom_storage_paths','isDirectory','repeat','.jpg','TrimPrompt\x20Cache\x20Engine','saveChunk','gemini','matchAll','savedTokens','.config','renameSync','saveSessionStateItem','round','context','getOwnPropertyDescriptor','processSessionFile','compactLiveSession','aider','github-copilot-cli','.claude','saved','5091584gpiREs','default','Gemini','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','.git','6103657KzYwlr','__esModule','messages','.trimprompt','modified','6100074LAjxSf','889806MtTyyp','conv:','354TseZua','Unsupported\x20extension','cache','Roaming','get','prototype','size','live-conv','Programs','raw_tokens','dirname','homedir','statSync','.wal','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','text','configurable','\x20tokens).','toLowerCase','User','win32','cwd','message','push','claude','Local','.gemini','openclaw','tracker','getLatestSessionFile','loadSessionsState','basename','__pycache__','.aider.chat.history.md','content','.lock','Codex','has','create','.jsonl','Microsoft','object','696702qsPwGe','__createBinding','./cache-manager','cursor','.shm','max','venv','autoCompactSaved','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'];a0_0x3808=function(){return _0x11c206;};return a0_0x3808();}var __createBinding=this&&this[a0_0xd76980(0xd8)]||(Object[a0_0xd76980(0xd3)]?function(_0x10c6e6,_0x3c4f79,_0x163d2f,_0x45abd4){const _0x104447=a0_0xd76980;if(_0x45abd4===undefined)_0x45abd4=_0x163d2f;var _0x82b06b=Object[_0x104447(0x154)](_0x3c4f79,_0x163d2f);(!_0x82b06b||('get'in _0x82b06b?!_0x3c4f79[_0x104447(0x161)]:_0x82b06b[_0x104447(0xe5)]||_0x82b06b[_0x104447(0x178)]))&&(_0x82b06b={'enumerable':!![],'get':function(){return _0x3c4f79[_0x163d2f];}}),Object[_0x104447(0x12e)](_0x10c6e6,_0x45abd4,_0x82b06b);}:function(_0xd48ab5,_0x4f57c6,_0x132769,_0x14b762){if(_0x14b762===undefined)_0x14b762=_0x132769;_0xd48ab5[_0x14b762]=_0x4f57c6[_0x132769];}),__setModuleDefault=this&&this[a0_0xd76980(0x145)]||(Object['create']?function(_0x397332,_0x40b78a){const _0x12ff3b=a0_0xd76980;Object['defineProperty'](_0x397332,_0x12ff3b(0x15c),{'enumerable':!![],'value':_0x40b78a});}:function(_0x5f06a1,_0x323adb){const _0x49ce23=a0_0xd76980;_0x5f06a1[_0x49ce23(0x15c)]=_0x323adb;}),__importStar=this&&this['__importStar']||(function(){var _0x32db64=function(_0xb8d966){return _0x32db64=Object['getOwnPropertyNames']||function(_0x340ad9){const _0x1800c2=a0_0x5027;var _0x5dd60f=[];for(var _0x439fe9 in _0x340ad9)if(Object[_0x1800c2(0x16d)][_0x1800c2(0x122)][_0x1800c2(0xe8)](_0x340ad9,_0x439fe9))_0x5dd60f[_0x5dd60f[_0x1800c2(0x12c)]]=_0x439fe9;return _0x5dd60f;},_0x32db64(_0xb8d966);};return function(_0x54ec50){const _0x157923=a0_0x5027;if(_0x54ec50&&_0x54ec50[_0x157923(0x161)])return _0x54ec50;var _0x28a8e5={};if(_0x54ec50!=null){for(var _0x38c636=_0x32db64(_0x54ec50),_0x1f10ad=0x0;_0x1f10ad<_0x38c636[_0x157923(0x12c)];_0x1f10ad++)if(_0x38c636[_0x1f10ad]!=='default')__createBinding(_0x28a8e5,_0x54ec50,_0x38c636[_0x1f10ad]);}return __setModuleDefault(_0x28a8e5,_0x54ec50),_0x28a8e5;};}());Object[a0_0xd76980(0x12e)](exports,a0_0xd76980(0x161),{'value':!![]}),exports[a0_0xd76980(0x10c)]=loadConfig,exports[a0_0xd76980(0x117)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0xd76980(0xca)]=getLatestSessionFile,exports[a0_0xd76980(0xcb)]=loadSessionsState,exports[a0_0xd76980(0x151)]=saveSessionStateItem,exports[a0_0xd76980(0x155)]=processSessionFile,exports[a0_0xd76980(0x13e)]=compactSessionCopy,exports[a0_0xd76980(0x156)]=compactLiveSession,exports[a0_0xd76980(0x141)]=installWindowsStartupService,exports[a0_0xd76980(0x13d)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0xd76980(0xf0))),os=__importStar(require('os')),cache_manager_1=require(a0_0xd76980(0xd9)),tracker_1=require(a0_0xd76980(0xe0)),baseDir=path[a0_0xd76980(0xe3)](os[a0_0xd76980(0x173)](),a0_0xd76980(0x163)),configPath=path[a0_0xd76980(0xe3)](baseDir,a0_0xd76980(0x11c)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x2282e7=a0_0xd76980;try{if(!fs[_0x2282e7(0xfc)](baseDir))fs[_0x2282e7(0xec)](baseDir,{'recursive':!![]});if(fs[_0x2282e7(0xfc)](configPath)){const _0x1f0641=JSON[_0x2282e7(0x136)](fs[_0x2282e7(0x135)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x1f0641,'conversation_toggles':{...DEFAULT_CONFIG[_0x2282e7(0xfb)],..._0x1f0641[_0x2282e7(0xfb)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x1f0641[_0x2282e7(0x146)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0xb2d991){const _0x32c066=a0_0xd76980,_0x2ff168=loadConfig(),_0xab1ec3={..._0x2ff168,..._0xb2d991,'conversation_toggles':{..._0x2ff168[_0x32c066(0xfb)],..._0xb2d991[_0x32c066(0xfb)]||{}},'custom_storage_paths':{..._0x2ff168['custom_storage_paths'],..._0xb2d991[_0x32c066(0x146)]||{}}};try{if(!fs[_0x32c066(0xfc)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x32c066(0x12d)](configPath,JSON[_0x32c066(0xea)](_0xab1ec3,null,0x2),'utf8');}catch{}return _0xab1ec3;}function getAgentStoragePaths(_0x38a623){const _0x512788=a0_0xd76980,_0x2d45d3=loadConfig(),_0x572128=_0x2d45d3[_0x512788(0x146)][_0x38a623];if(_0x572128&&fs['existsSync'](_0x572128))return[_0x572128];const _0xa64c50=os[_0x512788(0x173)](),_0x3d158b=process[_0x512788(0x119)]===_0x512788(0x17c),_0x1af2ae=process[_0x512788(0x119)]===_0x512788(0x11a);switch(_0x38a623){case _0x512788(0x180):return[path['join'](_0xa64c50,_0x512788(0x159),_0x512788(0x115)),path[_0x512788(0xe3)](_0xa64c50,'.claude',_0x512788(0x100))];case _0x512788(0x11e):return[path['join'](_0xa64c50,'.codex',_0x512788(0x11f)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x16b),_0x512788(0xd1))];case'gemini':case'antigravity':return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x182),_0x512788(0x13c)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x182)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x16b),_0x512788(0x15d)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x14c))];case _0x512788(0xda):if(_0x3d158b)return[path['join'](_0xa64c50,'AppData',_0x512788(0x16b),_0x512788(0x137),_0x512788(0x17b),_0x512788(0x131))];if(_0x1af2ae)return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xf3),_0x512788(0x10b),'Cursor','User','workspaceStorage')];return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x137),_0x512788(0x17b),_0x512788(0x131))];case'aider':return[process[_0x512788(0x17d)](),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xce))];case _0x512788(0x127):if(_0x3d158b)return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x181),_0x512788(0x158))];return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x158))];case _0x512788(0x183):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xf7),_0x512788(0x10e)),path[_0x512788(0xe3)](process[_0x512788(0x17d)](),'.openclaw',_0x512788(0x153))];case _0x512788(0x12f):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x10f),_0x512788(0x11f))];case _0x512788(0x109):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x118),_0x512788(0x16a))];default:return[];}}function getLatestSessionFile(_0x2417c1){const _0x5bc896=a0_0xd76980,_0x163462=getAgentStoragePaths(_0x2417c1);let _0x30fbb5=null,_0x588e9b=0x0,_0x2498e0=null,_0x21f5c3=null;for(const _0x53eac9 of _0x163462){if(fs[_0x5bc896(0xfc)](_0x53eac9)){if(!_0x21f5c3)_0x21f5c3=_0x53eac9;const _0xb7aeed=(_0x13dc28,_0x184d99=0x0)=>{const _0x5e8122=_0x5bc896;if(_0x184d99>0x6)return;try{const _0x56e674=fs['readdirSync'](_0x13dc28,{'withFileTypes':!![]});for(const _0xfe5109 of _0x56e674){const _0x420e7c=path[_0x5e8122(0xe3)](_0x13dc28,_0xfe5109['name']);if(_0xfe5109[_0x5e8122(0x147)]()){const _0x49bdb4=_0xfe5109['name'][_0x5e8122(0x17a)]();if(_0x49bdb4===_0x5e8122(0xe1)||_0x49bdb4===_0x5e8122(0x15f)||_0x49bdb4===_0x5e8122(0xef)||_0x49bdb4===_0x5e8122(0xfa)||_0x49bdb4===_0x5e8122(0xdd)||_0x49bdb4===_0x5e8122(0xcd)||_0x49bdb4==='.next'||_0x49bdb4==='dist'||_0x49bdb4===_0x5e8122(0xed)||_0x49bdb4===_0x5e8122(0x104)||_0x49bdb4===_0x5e8122(0xf9))continue;_0xb7aeed(_0x420e7c,_0x184d99+0x1);}else{if(_0xfe5109[_0x5e8122(0x143)]()&&!_0xfe5109[_0x5e8122(0xf1)][_0x5e8122(0x110)]('.')){const _0x59149c=_0xfe5109[_0x5e8122(0xf1)][_0x5e8122(0x17a)]();if(_0x59149c['includes']('.compact')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xe7))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x116))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x12a))||_0x59149c['endsWith'](_0x5e8122(0x149))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xf5))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x12b))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xee))||_0x59149c[_0x5e8122(0x108)]('.pb')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x175))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xdb))||_0x59149c[_0x5e8122(0x108)]('.tmp')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xd0))||_0x59149c[_0x5e8122(0x108)]('.dat')||_0x59149c['startsWith'](_0x5e8122(0xe2))||_0x59149c[_0x5e8122(0x110)](_0x5e8122(0x124)))continue;const _0x5ddd24=fs[_0x5e8122(0x174)](_0x420e7c);_0x5ddd24[_0x5e8122(0xf8)]>_0x588e9b&&(_0x588e9b=_0x5ddd24[_0x5e8122(0xf8)],_0x30fbb5=_0xfe5109[_0x5e8122(0xf1)],_0x2498e0=_0x420e7c,_0x21f5c3=_0x53eac9);}}}}catch{}};_0xb7aeed(_0x53eac9);}}return{'fileName':_0x30fbb5,'lastModified':_0x588e9b>0x0?new Date(_0x588e9b)['toISOString']():null,'fullPath':_0x2498e0,'dirPath':_0x21f5c3};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x1c8541,_0x3dd90d,_0x33ccf7){const _0x2d6222=a0_0xd76980;let _0x567f3b=![],_0x5e98a3=0x0;if(!_0x1c8541)return{'modified':_0x567f3b,'savedTokens':_0x5e98a3};const _0x4f28be=_0x50fb8f=>_0x50fb8f['replace'](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x1c8541[_0x2d6222(0xcf)]===_0x2d6222(0xf2)){let _0x1f3d36=_0x1c8541['content'],_0x43fa2c=_0x4f28be(_0x1f3d36);_0x43fa2c[_0x2d6222(0x12c)]<_0x1f3d36[_0x2d6222(0x12c)]&&(_0x1c8541[_0x2d6222(0xcf)]=_0x43fa2c,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x1f3d36[_0x2d6222(0x12c)]-_0x43fa2c[_0x2d6222(0x12c)])/0x4));if(_0x1c8541[_0x2d6222(0xcf)][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1c8541[_0x2d6222(0xcf)][_0x2d6222(0x128)](_0x2d6222(0x14a))){const _0x974231='Summary:\x20Content\x20offloaded\x20('+Math[_0x2d6222(0x133)](_0x1c8541['content']['length']/0x4)+_0x2d6222(0x179),_0x28bccc=(0x0,cache_manager_1['saveChunk'])(_0x3dd90d,_0x33ccf7,_0x1c8541['content'],_0x974231);_0x1c8541['content']=_0x2d6222(0x142)+_0x28bccc[_0x2d6222(0x171)]+_0x2d6222(0xe9)+_0x28bccc[_0x2d6222(0x13a)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x28bccc[_0x2d6222(0x13a)]+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math['max'](0x0,_0x28bccc['raw_tokens']-_0x28bccc[_0x2d6222(0x129)]);}}else{if(Array[_0x2d6222(0x123)](_0x1c8541[_0x2d6222(0xcf)]))for(const _0x4458d0 of _0x1c8541['content']){if(_0x4458d0&&typeof _0x4458d0===_0x2d6222(0xd6)){if(typeof _0x4458d0[_0x2d6222(0x177)]===_0x2d6222(0xf2)){let _0x11de29=_0x4458d0[_0x2d6222(0x177)],_0x38eefa=_0x4f28be(_0x11de29);_0x38eefa[_0x2d6222(0x12c)]<_0x11de29['length']&&(_0x4458d0['text']=_0x38eefa,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x11de29[_0x2d6222(0x12c)]-_0x38eefa[_0x2d6222(0x12c)])/0x4));if(_0x4458d0['text'][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4458d0[_0x2d6222(0x177)]['includes'](_0x2d6222(0x14a))){const _0x463414=_0x2d6222(0x11d)+Math[_0x2d6222(0x133)](_0x4458d0[_0x2d6222(0x177)][_0x2d6222(0x12c)]/0x4)+_0x2d6222(0x179),_0x4aa35f=(0x0,cache_manager_1[_0x2d6222(0x14b)])(_0x3dd90d,_0x33ccf7,_0x4458d0['text'],_0x463414);_0x4458d0[_0x2d6222(0x177)]=_0x2d6222(0x106)+_0x4aa35f[_0x2d6222(0x13a)]+_0x2d6222(0xdf)+_0x4aa35f['chunk_id']+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0xdc)](0x0,_0x4aa35f[_0x2d6222(0x171)]-_0x4aa35f['compressed_tokens']);}}else{if(typeof _0x4458d0[_0x2d6222(0xcf)]==='string'){let _0x3b2ecd=_0x4458d0[_0x2d6222(0xcf)],_0x3c8663=_0x4f28be(_0x3b2ecd);_0x3c8663['length']<_0x3b2ecd[_0x2d6222(0x12c)]&&(_0x4458d0[_0x2d6222(0xcf)]=_0x3c8663,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x3b2ecd[_0x2d6222(0x12c)]-_0x3c8663[_0x2d6222(0x12c)])/0x4));if(_0x4458d0[_0x2d6222(0xcf)][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4458d0['content'][_0x2d6222(0x128)]('TrimPrompt\x20Cache\x20Engine')){const _0x3ae502=_0x2d6222(0x144)+Math[_0x2d6222(0x133)](_0x4458d0[_0x2d6222(0xcf)][_0x2d6222(0x12c)]/0x4)+_0x2d6222(0x179),_0x197856=(0x0,cache_manager_1[_0x2d6222(0x14b)])(_0x3dd90d,_0x33ccf7,_0x4458d0[_0x2d6222(0xcf)],_0x3ae502);_0x4458d0[_0x2d6222(0xcf)]=_0x2d6222(0x106)+_0x197856[_0x2d6222(0x13a)]+_0x2d6222(0xdf)+_0x197856[_0x2d6222(0x13a)]+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0xdc)](0x0,_0x197856['raw_tokens']-_0x197856['compressed_tokens']);}}}}}}return{'modified':_0x567f3b,'savedTokens':_0x5e98a3};}const sessionsStatePath=path[a0_0xd76980(0xe3)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x336f0b=a0_0xd76980;try{if(fs[_0x336f0b(0xfc)](sessionsStatePath)){const _0x25f183=JSON[_0x336f0b(0x136)](fs['readFileSync'](sessionsStatePath,_0x336f0b(0x125)));if(_0x25f183&&typeof _0x25f183===_0x336f0b(0xd6))return sessionsStateMemoryCache=_0x25f183,_0x25f183;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x36c193,_0x2a5891,_0x3e1952,_0x3fc8e8=0x0,_0x274f70=0x0,_0x10dcb2=0x0){const _0x4f1c57=a0_0xd76980;try{const _0x21116e=loadSessionsState(),_0x1b1776=_0x21116e[_0x36c193]||{},_0x2c6549=_0x274f70||_0x1b1776[_0x4f1c57(0xde)]||0x0,_0x129993=_0x10dcb2||_0x1b1776[_0x4f1c57(0xfe)]||0x0,_0xf43c7=_0x3e1952!==undefined?_0x3e1952:_0x1b1776[_0x4f1c57(0xf4)]||0x0;_0x21116e[_0x36c193]={'lineCount':_0x2a5891||_0x1b1776[_0x4f1c57(0x130)]||0x1,'activeSavedTokens':_0xf43c7+_0x2c6549+_0x129993,'sideCacheSaved':_0x3fc8e8||_0x1b1776['sideCacheSaved']||0x0,'officialCompactSaved':_0xf43c7,'autoCompactSaved':_0x2c6549,'hookSavedTokens':_0x129993},sessionsStateMemoryCache=_0x21116e;if(!fs[_0x4f1c57(0xfc)](baseDir))fs[_0x4f1c57(0xec)](baseDir,{'recursive':!![]});const _0xcfaf3=sessionsStatePath+'.tmp';fs[_0x4f1c57(0x12d)](_0xcfaf3,JSON[_0x4f1c57(0xea)](_0x21116e,null,0x2),_0x4f1c57(0x125)),fs[_0x4f1c57(0x150)](_0xcfaf3,sessionsStatePath);}catch{}}function processSessionFile(_0x597e46,_0x2b1d7d){const _0x509e24=a0_0xd76980;try{if(!fs[_0x509e24(0xfc)](_0x597e46))return;const _0x18615b=fs[_0x509e24(0x174)](_0x597e46);if(_0x18615b['isDirectory']()||_0x18615b[_0x509e24(0x16e)]===0x0)return;const _0x392564=loadConfig(),_0x53696b=_0x509e24(0xe4)+_0x2b1d7d;if(_0x392564[_0x509e24(0xfb)][_0x53696b]===![])return;const _0xfa9f14=fs[_0x509e24(0x135)](_0x597e46,_0x509e24(0x125)),_0x35716a=path['extname'](_0x597e46)['toLowerCase']();let _0x478d80=0x1;if(_0x35716a==='.jsonl'||_0x35716a==='.json1')_0x478d80=_0xfa9f14[_0x509e24(0x134)]('\x0a')['filter'](Boolean)['length'];else{if(_0x35716a===_0x509e24(0x138))try{const _0x742ecf=JSON[_0x509e24(0x136)](_0xfa9f14),_0x35804d=Array[_0x509e24(0x123)](_0x742ecf[_0x509e24(0x162)])?_0x742ecf['messages']:Array[_0x509e24(0x123)](_0x742ecf)?_0x742ecf:null;if(_0x35804d)_0x478d80=_0x35804d[_0x509e24(0x12c)];}catch{}}let _0x12e5e2=0x0;if((_0x35716a===_0x509e24(0xd4)||_0x35716a==='.json1')&&_0xfa9f14[_0x509e24(0x128)](_0x509e24(0x15a))&&_0xfa9f14['includes'](_0x509e24(0x121))){const _0x458362=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x3d01c6 of _0xfa9f14['split']('\x0a')){if(!_0x3d01c6[_0x509e24(0x128)](_0x509e24(0x15a))||!_0x3d01c6['includes'](_0x509e24(0x121)))continue;try{const _0x4d756e=JSON[_0x509e24(0x136)](_0x3d01c6);if(_0x4d756e[_0x509e24(0x132)]!=='system')continue;const _0x5f3049=typeof _0x4d756e[_0x509e24(0xcf)]===_0x509e24(0xf2)?_0x4d756e[_0x509e24(0xcf)]:_0x4d756e[_0x509e24(0x17e)]&&typeof _0x4d756e[_0x509e24(0x17e)][_0x509e24(0xcf)]===_0x509e24(0xf2)?_0x4d756e[_0x509e24(0x17e)][_0x509e24(0xcf)]:'';if(!_0x5f3049)continue;for(const _0x7ab185 of _0x5f3049[_0x509e24(0x14d)](_0x458362)){let _0x4be644=parseFloat(_0x7ab185[0x1]);if(_0x7ab185[0x0]['toLowerCase']()['includes']('k'))_0x4be644=_0x4be644*0x3e8;_0x12e5e2+=Math[_0x509e24(0x152)](_0x4be644);}}catch{}}}const _0x2d2ae4=loadSessionsState(),_0x25565b=_0x2d2ae4[_0x597e46],_0x45eb89=_0x25565b?_0x25565b['lineCount']:0x0,_0x5e992f=_0x25565b?_0x25565b[_0x509e24(0x105)]||0x0:0x0;if(_0x45eb89>0x0&&_0x478d80>_0x45eb89&&_0x5e992f>0x0){const _0x3f5b1c=_0x509e24(0x167)+_0x2b1d7d;tracker_1[_0x509e24(0x184)]['logExecution'](_0x3f5b1c,'A'[_0x509e24(0x148)](_0x5e992f*0x4),'',0x0,undefined,[_0x509e24(0xe4)+_0x2b1d7d,_0x509e24(0x16f),_0x2b1d7d,_0x509e24(0x140)]);}const _0x5cd9d5=_0x25565b&&_0x25565b[_0x509e24(0xf4)]!==undefined?_0x25565b[_0x509e24(0xf4)]:0x0,_0x5cda2a=Math[_0x509e24(0xdc)](_0x5cd9d5,_0x12e5e2);saveSessionStateItem(_0x597e46,_0x478d80,_0x5cda2a,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x5d6361,_0x10b668){const _0x3efa0f=a0_0xd76980;try{if(!fs[_0x3efa0f(0xfc)](_0x5d6361))return{'ok':![],'reason':'Session\x20file\x20not\x20found'};const _0x33236d=path[_0x3efa0f(0x114)](_0x5d6361)['toLowerCase']();if(_0x33236d!==_0x3efa0f(0x138)&&_0x33236d!=='.jsonl'&&_0x33236d!==_0x3efa0f(0x10d))return{'ok':![],'reason':'Unsupported\x20format\x20\x27'+(_0x33236d||_0x3efa0f(0x11b))+'\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)'};const _0x485cba=fs[_0x3efa0f(0x135)](_0x5d6361,_0x3efa0f(0x125)),_0x290db0=Buffer[_0x3efa0f(0x113)](_0x485cba,'utf8'),_0x57cf11=path[_0x3efa0f(0xcc)](_0x5d6361,_0x33236d);let _0x5884fc=_0x485cba,_0xf5a20a=![];if(_0x33236d===_0x3efa0f(0x138)){const _0x453070=JSON[_0x3efa0f(0x136)](_0x485cba),_0x27d68a=Array[_0x3efa0f(0x123)](_0x453070[_0x3efa0f(0x162)])?_0x453070[_0x3efa0f(0x162)]:Array['isArray'](_0x453070)?_0x453070:null;if(_0x27d68a){for(const _0x28d796 of _0x27d68a){const _0x2134d5=compressMessageContent(_0x28d796,_0x57cf11,_0x10b668);if(_0x2134d5[_0x3efa0f(0x164)])_0xf5a20a=!![];}if(_0xf5a20a)_0x5884fc=JSON[_0x3efa0f(0xea)](_0x453070,null,0x2);}}else{const _0x5bd07a=_0x485cba[_0x3efa0f(0x134)]('\x0a'),_0x386563=[];for(let _0x5a8b50 of _0x5bd07a){if(!_0x5a8b50[_0x3efa0f(0x10a)]()){_0x386563[_0x3efa0f(0x17f)](_0x5a8b50);continue;}try{const _0x26caeb=JSON[_0x3efa0f(0x136)](_0x5a8b50),_0xb5f2b8=_0x26caeb[_0x3efa0f(0x17e)]||_0x26caeb;if(_0xb5f2b8){const _0x4c7c65=compressMessageContent(_0xb5f2b8,_0x57cf11,_0x10b668);_0x4c7c65[_0x3efa0f(0x164)]&&(_0xf5a20a=!![],_0x5a8b50=JSON[_0x3efa0f(0xea)](_0x26caeb));}}catch{}_0x386563[_0x3efa0f(0x17f)](_0x5a8b50);}if(_0xf5a20a)_0x5884fc=_0x386563['join']('\x0a');}const _0x1330c8=Buffer[_0x3efa0f(0x113)](_0x5884fc,_0x3efa0f(0x125)),_0x376448=path[_0x3efa0f(0xe3)](path[_0x3efa0f(0x172)](_0x5d6361),_0x57cf11+'.compact'+_0x33236d);fs['writeFileSync'](_0x376448,_0x5884fc,'utf8');const _0x27d928=Math[_0x3efa0f(0x133)](_0x290db0/0x4),_0x3a7cea=Math[_0x3efa0f(0x133)](_0x1330c8/0x4),_0x3cf2ed=Math[_0x3efa0f(0xdc)](0x0,_0x27d928-_0x3a7cea),_0x31c3f7=_0x290db0>0x0?Math['round']((0x1-_0x1330c8/_0x290db0)*0x3e8)/0xa:0x0;return _0x3cf2ed>0x0&&tracker_1['tracker']['logExecution'](_0x3efa0f(0xe6)+_0x10b668,_0x485cba,_0x5884fc,_0x3cf2ed,undefined,[_0x3efa0f(0xe4)+_0x10b668,_0x3efa0f(0x16f),_0x10b668,'compact_copy']),{'ok':!![],'compactPath':_0x376448,'rawBytes':_0x290db0,'compressedBytes':_0x1330c8,'rawTokens':_0x27d928,'compressedTokens':_0x3a7cea,'savedTokens':_0x3cf2ed,'reductionPct':_0x31c3f7};}catch(_0x56eefc){return{'ok':![],'reason':_0x56eefc?.[_0x3efa0f(0x17e)]||_0x3efa0f(0x139)};}}function compactLiveSession(_0x526b43,_0x521ae6){const _0x2674fb=a0_0xd76980;try{if(!fs[_0x2674fb(0xfc)](_0x526b43))return{'ok':![],'savedTokens':0x0,'reason':'File\x20not\x20found'};const _0x31f63b=path[_0x2674fb(0x114)](_0x526b43)[_0x2674fb(0x17a)]();if(_0x31f63b!=='.json'&&_0x31f63b!==_0x2674fb(0xd4)&&_0x31f63b!=='.json1')return{'ok':![],'savedTokens':0x0,'reason':_0x2674fb(0x169)};const _0x25e496=fs[_0x2674fb(0x135)](_0x526b43,'utf8'),_0x507ffe=Buffer[_0x2674fb(0x113)](_0x25e496,'utf8'),_0x3937da=Math['ceil'](_0x507ffe/0x4),_0x148574=path[_0x2674fb(0xcc)](_0x526b43,_0x31f63b);let _0x1ba49f=_0x25e496,_0x4fa5b6=![];if(_0x31f63b===_0x2674fb(0x138)){const _0xd569fc=JSON['parse'](_0x25e496),_0x179935=Array[_0x2674fb(0x123)](_0xd569fc['messages'])?_0xd569fc[_0x2674fb(0x162)]:Array['isArray'](_0xd569fc)?_0xd569fc:null;if(_0x179935){for(const _0x4a273c of _0x179935){const _0x415596=compressMessageContent(_0x4a273c,_0x148574,_0x521ae6);if(_0x415596[_0x2674fb(0x164)])_0x4fa5b6=!![];}const {compressConversation:_0x2047b2}=require(_0x2674fb(0x126)),_0x3f1175=_0x2047b2(_0x179935,0x9c40);_0x3f1175[_0x2674fb(0x14e)]>0x0&&(_0x4fa5b6=!![],Array[_0x2674fb(0x123)](_0xd569fc[_0x2674fb(0x162)])?_0xd569fc['messages']=_0x3f1175['messages']:_0x1ba49f=JSON[_0x2674fb(0xea)](_0x3f1175['messages'],null,0x2)),_0x4fa5b6&&!Array[_0x2674fb(0x123)](_0xd569fc)&&(_0x1ba49f=JSON['stringify'](_0xd569fc,null,0x2));}}else{const _0x28975e=_0x25e496[_0x2674fb(0x134)]('\x0a'),_0x4d0591=[],_0x2f6b2f=[];for(const _0x42fbd6 of _0x28975e){if(!_0x42fbd6[_0x2674fb(0x10a)]())continue;try{const _0x5d18e1=JSON[_0x2674fb(0x136)](_0x42fbd6);_0x4d0591[_0x2674fb(0x17f)](_0x5d18e1);const _0x51f465=_0x5d18e1[_0x2674fb(0x17e)]||_0x5d18e1;_0x51f465&&typeof _0x51f465['role']===_0x2674fb(0xf2)&&_0x2f6b2f[_0x2674fb(0x17f)](_0x51f465);}catch{}}for(const _0x5b30f8 of _0x2f6b2f){const _0x172e0e=compressMessageContent(_0x5b30f8,_0x148574,_0x521ae6);if(_0x172e0e[_0x2674fb(0x164)])_0x4fa5b6=!![];}const {compressConversation:_0xb0152e}=require(_0x2674fb(0x126)),_0x33eedf=_0xb0152e(_0x2f6b2f,0x9c40);if(_0x33eedf[_0x2674fb(0x14e)]>0x0||_0x4fa5b6){const _0x2e177f=[];for(const _0x16fa37 of _0x4d0591){const _0xf41202=_0x16fa37[_0x2674fb(0x17e)]||_0x16fa37;if(_0xf41202&&typeof _0xf41202[_0x2674fb(0x112)]===_0x2674fb(0xf2)){const _0x55f8fd=_0x33eedf[_0x2674fb(0x162)]['find'](_0x2d8797=>_0x2d8797===_0xf41202);_0x55f8fd?(_0x16fa37[_0x2674fb(0x17e)]?_0x16fa37[_0x2674fb(0x17e)]=_0x55f8fd:Object['assign'](_0x16fa37,_0x55f8fd),_0x2e177f[_0x2674fb(0x17f)](JSON['stringify'](_0x16fa37))):_0x4fa5b6=!![];}else _0x2e177f['push'](JSON['stringify'](_0x16fa37));}_0x1ba49f=_0x2e177f[_0x2674fb(0xe3)]('\x0a'),_0x4fa5b6=!![];}}if(_0x4fa5b6){const _0x433342=Buffer[_0x2674fb(0x113)](_0x1ba49f,_0x2674fb(0x125));fs[_0x2674fb(0x12d)](_0x526b43,_0x1ba49f,_0x2674fb(0x125));const _0xcc810c=Math[_0x2674fb(0x133)](_0x433342/0x4),_0x44495f=Math[_0x2674fb(0xdc)](0x0,_0x3937da-_0xcc810c);if(_0x44495f>0x0){const _0x829439=loadSessionsState(),_0x20aaa1=_0x829439[_0x526b43]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x3e1cca=_0x20aaa1['autoCompactSaved']||0x0,_0x2e0031=_0x3e1cca+_0x44495f;saveSessionStateItem(_0x526b43,_0x20aaa1[_0x2674fb(0x130)],_0x20aaa1[_0x2674fb(0xf4)]||0x0,_0x20aaa1[_0x2674fb(0x111)]||0x0,_0x2e0031,_0x20aaa1[_0x2674fb(0xfe)]||0x0),tracker_1[_0x2674fb(0x184)][_0x2674fb(0xff)](_0x2674fb(0xe6)+_0x521ae6,_0x25e496,_0x1ba49f,_0x44495f,undefined,[_0x2674fb(0xe4)+_0x521ae6,_0x2674fb(0x16f),_0x521ae6,'compact_copy']);}return{'ok':!![],'savedTokens':_0x44495f};}return{'ok':!![],'savedTokens':0x0};}catch(_0x3235a5){return{'ok':![],'savedTokens':0x0,'reason':_0x3235a5[_0x2674fb(0x17e)]||_0x2674fb(0xfd)};}}function installWindowsStartupService(){const _0xdebb21=a0_0xd76980;if(process[_0xdebb21(0x119)]!==_0xdebb21(0x17c))return;try{const _0x4573ee=path[_0xdebb21(0xe3)](os['homedir'](),_0xdebb21(0x13b),_0xdebb21(0x16b),_0xdebb21(0xd5),'Windows',_0xdebb21(0x102),_0xdebb21(0x170),_0xdebb21(0x107));if(!fs[_0xdebb21(0xfc)](_0x4573ee))fs[_0xdebb21(0xec)](_0x4573ee,{'recursive':!![]});const _0x514190=path[_0xdebb21(0xe3)](_0x4573ee,_0xdebb21(0x103)),_0xbaaed7=path['join'](__dirname,'cli.js'),_0x1effaf=_0xbaaed7['replace'](/\\/g,'\x5c\x5c'),_0xb79a5e=_0xdebb21(0x176)+_0x1effaf+_0xdebb21(0x15e);fs[_0xdebb21(0x12d)](_0x514190,_0xb79a5e,_0xdebb21(0x125));}catch{}}function a0_0x5027(_0x25892e,_0x543678){const _0x3808c5=a0_0x3808();return a0_0x5027=function(_0x502742,_0x3d2136){_0x502742=_0x502742-0xca;let _0x22c9e9=_0x3808c5[_0x502742];return _0x22c9e9;},a0_0x5027(_0x25892e,_0x543678);}function startWatcherDaemon(){const _0x3b6132=a0_0xd76980;installWindowsStartupService();try{const {installClaudeHooks:_0x5e8455}=require('./hooks/claude-hook');_0x5e8455();}catch(_0x442216){}const _0x188286=['claude',_0x3b6132(0x14c),_0x3b6132(0x11e),'cursor',_0x3b6132(0x157),_0x3b6132(0x127),_0x3b6132(0x183),_0x3b6132(0x12f),_0x3b6132(0x109)];for(const _0x47d63f of _0x188286){const _0x4c41ec=getAgentStoragePaths(_0x47d63f);for(const _0x179ef2 of _0x4c41ec){if(fs[_0x3b6132(0xfc)](_0x179ef2))try{fs['watch'](_0x179ef2,{'recursive':!![]},(_0xe5049d,_0x2ee9e7)=>{const _0x546533=_0x3b6132;if(!_0x2ee9e7)return;const _0x38c459=path[_0x546533(0xe3)](_0x179ef2,_0x2ee9e7);if(debounceTimers[_0x546533(0xd2)](_0x38c459))clearTimeout(debounceTimers[_0x546533(0x16c)](_0x38c459));const _0x4c0de5=setTimeout(()=>processSessionFile(_0x38c459,_0x47d63f),0x1f4);debounceTimers[_0x546533(0xf6)](_0x38c459,_0x4c0de5);});}catch{}}}setInterval(()=>{const _0x4fbd09=_0x3b6132;for(const _0x919db1 of _0x188286){try{const _0x2b1d00=getLatestSessionFile(_0x919db1);_0x2b1d00&&_0x2b1d00['fullPath']&&processSessionFile(_0x2b1d00[_0x4fbd09(0x13f)],_0x919db1);}catch{}}},0xbb8);const _0x2e4753=()=>{for(const _0x2f2597 of _0x188286){try{const _0x893f7d=getLatestSessionFile(_0x2f2597);_0x893f7d&&_0x893f7d['fullPath']&&compactLiveSession(_0x893f7d['fullPath'],_0x2f2597);}catch{}}};setTimeout(_0x2e4753,0x7d0),setInterval(_0x2e4753,0x2bf20);}
|
|
1
|
+
'use strict';function a0_0x9cf7(_0x3e89d2,_0x186e7e){const _0x45d0ab=a0_0x45d0();return a0_0x9cf7=function(_0x9cf76d,_0x1206ec){_0x9cf76d=_0x9cf76d-0xa2;let _0x52001e=_0x45d0ab[_0x9cf76d];return _0x52001e;},a0_0x9cf7(_0x3e89d2,_0x186e7e);}const a0_0x2308b9=a0_0x9cf7;(function(_0x1da694,_0x15dac7){const _0x43ce9d=a0_0x9cf7,_0x5c7986=_0x1da694();while(!![]){try{const _0x2408d1=-parseInt(_0x43ce9d(0xff))/0x1*(parseInt(_0x43ce9d(0x111))/0x2)+-parseInt(_0x43ce9d(0x144))/0x3+parseInt(_0x43ce9d(0xdf))/0x4*(-parseInt(_0x43ce9d(0xb3))/0x5)+parseInt(_0x43ce9d(0x154))/0x6+-parseInt(_0x43ce9d(0x133))/0x7+-parseInt(_0x43ce9d(0x12e))/0x8*(parseInt(_0x43ce9d(0xd9))/0x9)+parseInt(_0x43ce9d(0xa5))/0xa;if(_0x2408d1===_0x15dac7)break;else _0x5c7986['push'](_0x5c7986['shift']());}catch(_0x44c266){_0x5c7986['push'](_0x5c7986['shift']());}}}(a0_0x45d0,0x587da));var __createBinding=this&&this['__createBinding']||(Object[a0_0x2308b9(0xc3)]?function(_0x52320c,_0x1ee573,_0x325a1f,_0x2f78b0){const _0x12ed2a=a0_0x2308b9;if(_0x2f78b0===undefined)_0x2f78b0=_0x325a1f;var _0x40f310=Object[_0x12ed2a(0xcc)](_0x1ee573,_0x325a1f);(!_0x40f310||('get'in _0x40f310?!_0x1ee573['__esModule']:_0x40f310['writable']||_0x40f310[_0x12ed2a(0xfe)]))&&(_0x40f310={'enumerable':!![],'get':function(){return _0x1ee573[_0x325a1f];}}),Object[_0x12ed2a(0xd7)](_0x52320c,_0x2f78b0,_0x40f310);}:function(_0x37beaf,_0x57cc73,_0x26d3f8,_0x2a3929){if(_0x2a3929===undefined)_0x2a3929=_0x26d3f8;_0x37beaf[_0x2a3929]=_0x57cc73[_0x26d3f8];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x2308b9(0xc3)]?function(_0x54f5ea,_0x2e5479){const _0x3a4e7b=a0_0x2308b9;Object['defineProperty'](_0x54f5ea,_0x3a4e7b(0x126),{'enumerable':!![],'value':_0x2e5479});}:function(_0x356663,_0x23cc98){_0x356663['default']=_0x23cc98;}),__importStar=this&&this['__importStar']||(function(){var _0x488a9d=function(_0x1cfc31){return _0x488a9d=Object['getOwnPropertyNames']||function(_0x540662){const _0x4f3494=a0_0x9cf7;var _0xcbd586=[];for(var _0x4ef673 in _0x540662)if(Object[_0x4f3494(0xa3)][_0x4f3494(0xf4)][_0x4f3494(0x156)](_0x540662,_0x4ef673))_0xcbd586[_0xcbd586[_0x4f3494(0x12b)]]=_0x4ef673;return _0xcbd586;},_0x488a9d(_0x1cfc31);};return function(_0x30b5d3){const _0x3bdfc0=a0_0x9cf7;if(_0x30b5d3&&_0x30b5d3[_0x3bdfc0(0xf7)])return _0x30b5d3;var _0x439518={};if(_0x30b5d3!=null){for(var _0x2eec2f=_0x488a9d(_0x30b5d3),_0x8deed0=0x0;_0x8deed0<_0x2eec2f[_0x3bdfc0(0x12b)];_0x8deed0++)if(_0x2eec2f[_0x8deed0]!=='default')__createBinding(_0x439518,_0x30b5d3,_0x2eec2f[_0x8deed0]);}return __setModuleDefault(_0x439518,_0x30b5d3),_0x439518;};}());Object[a0_0x2308b9(0xd7)](exports,a0_0x2308b9(0xf7),{'value':!![]}),exports[a0_0x2308b9(0xdb)]=loadConfig,exports[a0_0x2308b9(0xfa)]=saveConfig,exports[a0_0x2308b9(0xb8)]=getAgentStoragePaths,exports[a0_0x2308b9(0x11e)]=getLatestSessionFile,exports[a0_0x2308b9(0x13d)]=loadSessionsState,exports[a0_0x2308b9(0x135)]=saveSessionStateItem,exports[a0_0x2308b9(0xf6)]=processSessionFile,exports['compactSessionCopy']=compactSessionCopy,exports[a0_0x2308b9(0xe6)]=compactLiveSession,exports[a0_0x2308b9(0x13a)]=installWindowsStartupService,exports[a0_0x2308b9(0xa2)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),cache_manager_1=require(a0_0x2308b9(0xc8)),tracker_1=require(a0_0x2308b9(0x14a)),baseDir=path[a0_0x2308b9(0x146)](os[a0_0x2308b9(0xbb)](),a0_0x2308b9(0xb4)),configPath=path['join'](baseDir,'config.json'),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x2e7958=a0_0x2308b9;try{if(!fs[_0x2e7958(0x14e)](baseDir))fs[_0x2e7958(0xb5)](baseDir,{'recursive':!![]});if(fs[_0x2e7958(0x14e)](configPath)){const _0x14df02=JSON['parse'](fs['readFileSync'](configPath,_0x2e7958(0x11b)));return{...DEFAULT_CONFIG,..._0x14df02,'conversation_toggles':{...DEFAULT_CONFIG[_0x2e7958(0xae)],..._0x14df02[_0x2e7958(0xae)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x2e7958(0xcf)],..._0x14df02[_0x2e7958(0xcf)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0xa79187){const _0x312ec6=a0_0x2308b9,_0x413362=loadConfig(),_0xff65ed={..._0x413362,..._0xa79187,'conversation_toggles':{..._0x413362[_0x312ec6(0xae)],..._0xa79187[_0x312ec6(0xae)]||{}},'custom_storage_paths':{..._0x413362[_0x312ec6(0xcf)],..._0xa79187[_0x312ec6(0xcf)]||{}}};try{if(!fs['existsSync'](baseDir))fs[_0x312ec6(0xb5)](baseDir,{'recursive':!![]});fs[_0x312ec6(0xd8)](configPath,JSON['stringify'](_0xff65ed,null,0x2),_0x312ec6(0x11b));}catch{}return _0xff65ed;}function getAgentStoragePaths(_0x47bb21){const _0x2fca2b=a0_0x2308b9,_0x39f9ca=loadConfig(),_0x6ceab9=_0x39f9ca['custom_storage_paths'][_0x47bb21];if(_0x6ceab9&&fs[_0x2fca2b(0x14e)](_0x6ceab9))return[_0x6ceab9];const _0x260540=os[_0x2fca2b(0xbb)](),_0x3c82e0=process[_0x2fca2b(0x117)]===_0x2fca2b(0xea),_0x4fed27=process[_0x2fca2b(0x117)]===_0x2fca2b(0x122);switch(_0x47bb21){case'claude':return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xa7),_0x2fca2b(0x147)),path['join'](_0x260540,'.claude',_0x2fca2b(0x158))];case'codex':return[path['join'](_0x260540,_0x2fca2b(0xba),_0x2fca2b(0xf2)),path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x13c),'Roaming',_0x2fca2b(0xce))];case _0x2fca2b(0xf1):case'antigravity':return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xfc),'antigravity'),path[_0x2fca2b(0x146)](_0x260540,'.gemini'),path['join'](_0x260540,'AppData',_0x2fca2b(0xbd),_0x2fca2b(0x113)),path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xbc),'gemini')];case _0x2fca2b(0x115):if(_0x3c82e0)return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x13c),_0x2fca2b(0xbd),_0x2fca2b(0x125),_0x2fca2b(0xc6),_0x2fca2b(0x128))];if(_0x4fed27)return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xb1),_0x2fca2b(0xfd),_0x2fca2b(0x125),_0x2fca2b(0xc6),'workspaceStorage')];return[path['join'](_0x260540,_0x2fca2b(0xbc),_0x2fca2b(0x125),'User',_0x2fca2b(0x128))];case _0x2fca2b(0x116):return[process[_0x2fca2b(0x120)](),path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xe9))];case'copilot':if(_0x3c82e0)return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x13c),_0x2fca2b(0xec),_0x2fca2b(0xd0))];return[path[_0x2fca2b(0x146)](_0x260540,'.config',_0x2fca2b(0xd0))];case _0x2fca2b(0x102):return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0x145),'storage'),path['join'](process[_0x2fca2b(0x120)](),_0x2fca2b(0x145),'context')];case _0x2fca2b(0x143):return[path[_0x2fca2b(0x146)](_0x260540,_0x2fca2b(0xaa),_0x2fca2b(0xf2))];case _0x2fca2b(0xc4):return[path['join'](_0x260540,_0x2fca2b(0x10a),_0x2fca2b(0x123))];default:return[];}}function getLatestSessionFile(_0x3400ca){const _0x16ddb0=a0_0x2308b9,_0x2b1ca3=getAgentStoragePaths(_0x3400ca);let _0x4e15a3=null,_0x31586d=0x0,_0xd47150=null,_0x4573bf=null;for(const _0x474cdc of _0x2b1ca3){if(fs[_0x16ddb0(0x14e)](_0x474cdc)){if(!_0x4573bf)_0x4573bf=_0x474cdc;const _0x4452b1=(_0x3b6ed9,_0x326fde=0x0)=>{const _0x50ec82=_0x16ddb0;if(_0x326fde>0x6)return;try{const _0x37d9a0=fs[_0x50ec82(0x15c)](_0x3b6ed9,{'withFileTypes':!![]});for(const _0x203876 of _0x37d9a0){const _0x53d092=path[_0x50ec82(0x146)](_0x3b6ed9,_0x203876[_0x50ec82(0x10b)]);if(_0x203876[_0x50ec82(0x153)]()){const _0x435316=_0x203876[_0x50ec82(0x10b)][_0x50ec82(0x11f)]();if(_0x435316===_0x50ec82(0xc7)||_0x435316===_0x50ec82(0xda)||_0x435316===_0x50ec82(0x159)||_0x435316===_0x50ec82(0x119)||_0x435316===_0x50ec82(0xac)||_0x435316===_0x50ec82(0x13b)||_0x435316==='.next'||_0x435316===_0x50ec82(0xde)||_0x435316==='build'||_0x435316===_0x50ec82(0x10c)||_0x435316===_0x50ec82(0xb6))continue;_0x4452b1(_0x53d092,_0x326fde+0x1);}else{if(_0x203876[_0x50ec82(0x13e)]()&&!_0x203876[_0x50ec82(0x10b)][_0x50ec82(0xed)]('.')){const _0x3b594a=_0x203876[_0x50ec82(0x10b)][_0x50ec82(0x11f)]();if(_0x3b594a[_0x50ec82(0xa9)](_0x50ec82(0xe7))||_0x3b594a['endsWith']('.db')||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0xe1))||_0x3b594a['endsWith']('.png')||_0x3b594a['endsWith'](_0x50ec82(0xc1))||_0x3b594a['endsWith'](_0x50ec82(0x152))||_0x3b594a['endsWith'](_0x50ec82(0xdd))||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0x138))||_0x3b594a[_0x50ec82(0xc5)]('.pb')||_0x3b594a['endsWith'](_0x50ec82(0xe4))||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0x108))||_0x3b594a['endsWith'](_0x50ec82(0xb0))||_0x3b594a[_0x50ec82(0xc5)](_0x50ec82(0x101))||_0x3b594a[_0x50ec82(0xc5)]('.dat')||_0x3b594a[_0x50ec82(0xed)]('media__')||_0x3b594a[_0x50ec82(0xed)](_0x50ec82(0x14c)))continue;const _0x2acd1e=fs[_0x50ec82(0x141)](_0x53d092);_0x2acd1e['mtimeMs']>_0x31586d&&(_0x31586d=_0x2acd1e[_0x50ec82(0xee)],_0x4e15a3=_0x203876['name'],_0xd47150=_0x53d092,_0x4573bf=_0x474cdc);}}}}catch{}};_0x4452b1(_0x474cdc);}}return{'fileName':_0x4e15a3,'lastModified':_0x31586d>0x0?new Date(_0x31586d)[_0x16ddb0(0x14b)]():null,'fullPath':_0xd47150,'dirPath':_0x4573bf};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0xa55f4b,_0x4a73da,_0x3d0a85){const _0x425e94=a0_0x2308b9;let _0x15bda4=![],_0x4361f4=0x0;if(!_0xa55f4b)return{'modified':_0x15bda4,'savedTokens':_0x4361f4};const _0x47fa40=_0x15e527=>_0x15e527['replace'](/\r\n/g,'\x0a')[_0x425e94(0x15a)](/\n{3,}/g,'\x0a\x0a');if(typeof _0xa55f4b['content']==='string'){let _0x38c622=_0xa55f4b[_0x425e94(0x11d)],_0x173560=_0x47fa40(_0x38c622);_0x173560[_0x425e94(0x12b)]<_0x38c622['length']&&(_0xa55f4b[_0x425e94(0x11d)]=_0x173560,_0x15bda4=!![],_0x4361f4+=Math['ceil']((_0x38c622['length']-_0x173560[_0x425e94(0x12b)])/0x4));if(_0xa55f4b['content']['length']>OFFLOAD_THRESHOLD_CHARS&&!_0xa55f4b[_0x425e94(0x11d)][_0x425e94(0xa9)](_0x425e94(0x13f))){const _0x349777=_0x425e94(0xb7)+Math[_0x425e94(0xbf)](_0xa55f4b[_0x425e94(0x11d)][_0x425e94(0x12b)]/0x4)+_0x425e94(0x10d),_0x555c10=(0x0,cache_manager_1[_0x425e94(0x114)])(_0x4a73da,_0x3d0a85,_0xa55f4b[_0x425e94(0x11d)],_0x349777);_0xa55f4b['content']=_0x425e94(0x142)+_0x555c10[_0x425e94(0x148)]+'\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x555c10[_0x425e94(0xe8)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x555c10['chunk_id']+'`\x0a',_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xe2)](0x0,_0x555c10[_0x425e94(0x148)]-_0x555c10[_0x425e94(0x107)]);}}else{if(Array[_0x425e94(0x10e)](_0xa55f4b[_0x425e94(0x11d)]))for(const _0x280ff2 of _0xa55f4b[_0x425e94(0x11d)]){if(_0x280ff2&&typeof _0x280ff2===_0x425e94(0x109)){if(typeof _0x280ff2[_0x425e94(0x15b)]===_0x425e94(0xf0)){let _0x38c16f=_0x280ff2[_0x425e94(0x15b)],_0x4af2c6=_0x47fa40(_0x38c16f);_0x4af2c6[_0x425e94(0x12b)]<_0x38c16f[_0x425e94(0x12b)]&&(_0x280ff2[_0x425e94(0x15b)]=_0x4af2c6,_0x15bda4=!![],_0x4361f4+=Math['ceil']((_0x38c16f[_0x425e94(0x12b)]-_0x4af2c6[_0x425e94(0x12b)])/0x4));if(_0x280ff2[_0x425e94(0x15b)][_0x425e94(0x12b)]>OFFLOAD_THRESHOLD_CHARS&&!_0x280ff2[_0x425e94(0x15b)][_0x425e94(0xa9)]('TrimPrompt\x20Cache\x20Engine')){const _0x222042=_0x425e94(0x131)+Math[_0x425e94(0xbf)](_0x280ff2[_0x425e94(0x15b)][_0x425e94(0x12b)]/0x4)+_0x425e94(0x10d),_0x206936=(0x0,cache_manager_1[_0x425e94(0x114)])(_0x4a73da,_0x3d0a85,_0x280ff2['text'],_0x222042);_0x280ff2[_0x425e94(0x15b)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x206936[_0x425e94(0xe8)]+_0x425e94(0x15f)+_0x206936[_0x425e94(0xe8)]+'`\x0a',_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xe2)](0x0,_0x206936[_0x425e94(0x148)]-_0x206936['compressed_tokens']);}}else{if(typeof _0x280ff2[_0x425e94(0x11d)]===_0x425e94(0xf0)){let _0x1b2c90=_0x280ff2[_0x425e94(0x11d)],_0x137106=_0x47fa40(_0x1b2c90);_0x137106['length']<_0x1b2c90[_0x425e94(0x12b)]&&(_0x280ff2['content']=_0x137106,_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xbf)]((_0x1b2c90[_0x425e94(0x12b)]-_0x137106[_0x425e94(0x12b)])/0x4));if(_0x280ff2[_0x425e94(0x11d)][_0x425e94(0x12b)]>OFFLOAD_THRESHOLD_CHARS&&!_0x280ff2[_0x425e94(0x11d)][_0x425e94(0xa9)]('TrimPrompt\x20Cache\x20Engine')){const _0x3a392b=_0x425e94(0xe3)+Math[_0x425e94(0xbf)](_0x280ff2[_0x425e94(0x11d)][_0x425e94(0x12b)]/0x4)+_0x425e94(0x10d),_0x5b82d1=(0x0,cache_manager_1[_0x425e94(0x114)])(_0x4a73da,_0x3d0a85,_0x280ff2[_0x425e94(0x11d)],_0x3a392b);_0x280ff2[_0x425e94(0x11d)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x5b82d1[_0x425e94(0xe8)]+_0x425e94(0x15f)+_0x5b82d1['chunk_id']+'`\x0a',_0x15bda4=!![],_0x4361f4+=Math[_0x425e94(0xe2)](0x0,_0x5b82d1[_0x425e94(0x148)]-_0x5b82d1[_0x425e94(0x107)]);}}}}}}return{'modified':_0x15bda4,'savedTokens':_0x4361f4};}const sessionsStatePath=path['join'](baseDir,a0_0x2308b9(0xb9));let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x53ccec=a0_0x2308b9;try{if(fs[_0x53ccec(0x14e)](sessionsStatePath)){const _0x5f3e9a=JSON[_0x53ccec(0xc9)](fs['readFileSync'](sessionsStatePath,'utf8'));if(_0x5f3e9a&&typeof _0x5f3e9a==='object')return sessionsStateMemoryCache=_0x5f3e9a,_0x5f3e9a;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x457a4f,_0x509d10,_0x21a1b6,_0x1da7ff=0x0,_0x3827b0=0x0,_0x446618=0x0){const _0x2d024=a0_0x2308b9;try{const _0x1464d8=loadSessionsState(),_0x9af73d=_0x1464d8[_0x457a4f]||{},_0x4cd8c3=_0x3827b0||_0x9af73d[_0x2d024(0x124)]||0x0,_0x4ae1df=_0x446618||_0x9af73d[_0x2d024(0xd5)]||0x0,_0x39de04=_0x21a1b6!==undefined?_0x21a1b6:_0x9af73d[_0x2d024(0x140)]||0x0;_0x1464d8[_0x457a4f]={'lineCount':_0x509d10||_0x9af73d['lineCount']||0x1,'activeSavedTokens':_0x39de04+_0x4cd8c3+_0x4ae1df,'sideCacheSaved':_0x1da7ff||_0x9af73d[_0x2d024(0xcb)]||0x0,'officialCompactSaved':_0x39de04,'autoCompactSaved':_0x4cd8c3,'hookSavedTokens':_0x4ae1df},sessionsStateMemoryCache=_0x1464d8;if(!fs[_0x2d024(0x14e)](baseDir))fs[_0x2d024(0xb5)](baseDir,{'recursive':!![]});const _0x5efeb5=sessionsStatePath+_0x2d024(0xb0);fs['writeFileSync'](_0x5efeb5,JSON[_0x2d024(0xc2)](_0x1464d8,null,0x2),'utf8'),fs[_0x2d024(0x155)](_0x5efeb5,sessionsStatePath);}catch{}}function a0_0x45d0(){const _0x2d1ba3=['.compact','chunk_id','.aider.chat.history.md','win32','extname','Local','startsWith','mtimeMs','savedTokens','string','gemini','sessions','byteLength','hasOwnProperty','none','processSessionFile','__esModule','Compaction\x20failed','Startup','saveConfig','matchAll','.gemini','Application\x20Support','configurable','2057MBrrDE','TrimPromptDaemon.vbs','.lock','openclaw','saved','readFileSync','claude','./hooks/claude-hook','compressed_tokens','.shm','object','.cortex','name','out','\x20tokens).','isArray','push','./proxy-conv','134mopFWX','.jsonl','Gemini','saveChunk','cursor','aider','platform','prompt_turn','env','role','utf8','lineCount','content','getLatestSessionFile','toLowerCase','cwd','trim','darwin','cache','autoCompactSaved','Cursor','default','get','workspaceStorage','set','logExecution','length','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','compaction\x20failed','328608cxSXvW','find','modified','Summary:\x20Text\x20block\x20offloaded\x20(','dirname','3315914JwzIlJ','.json1','saveSessionStateItem','Session\x20file\x20not\x20found','Start\x20Menu','.webp','Windows','installWindowsStartupService','__pycache__','AppData','loadSessionsState','isFile','TrimPrompt\x20Cache\x20Engine','officialCompactSaved','statSync','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','opencode','132831ONsqkS','.openclaw','join','projects','raw_tokens','assign','./tracker','toISOString','image_','messages','existsSync','tracker','round','File\x20not\x20found','.jpeg','isDirectory','4150614gCBBTg','renameSync','call','Programs','history','.venv','replace','text','readdirSync','Unsupported\x20extension','split','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','startWatcherDaemon','prototype','system','14731470eGsnjV','watch','.claude','conv_','includes','.opencode','cli.js','venv','live-conv','conversation_toggles','.json','.tmp','Library','Unsupported\x20format\x20\x27','1223610SyCrKz','.trimprompt','mkdirSync','.agents','Summary:\x20Content\x20offloaded\x20(','getAgentStoragePaths','sessions_state.json','.codex','homedir','.config','Roaming','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','ceil','message','.jpg','stringify','create','cortex','endsWith','User','node_modules','./cache-manager','parse','Microsoft','sideCacheSaved','getOwnPropertyDescriptor','fullPath','Codex','custom_storage_paths','github-copilot-cli','repeat','compact:','size','compact_copy','hookSavedTokens','filter','defineProperty','writeFileSync','144MnVLFG','.git','loadConfig','tokens','.gif','dist','8KdBQHM','conv:','.vscdb','max','Summary:\x20Tool\x20result\x20offloaded\x20(','.wal','codex','compactLiveSession'];a0_0x45d0=function(){return _0x2d1ba3;};return a0_0x45d0();}function processSessionFile(_0x5e87d8,_0x3a3e59){const _0x4ec1b9=a0_0x2308b9;try{if(!fs[_0x4ec1b9(0x14e)](_0x5e87d8))return;const _0x39e158=fs[_0x4ec1b9(0x141)](_0x5e87d8);if(_0x39e158[_0x4ec1b9(0x153)]()||_0x39e158[_0x4ec1b9(0xd3)]===0x0)return;const _0x3c34c2=loadConfig(),_0x18534d=_0x4ec1b9(0xa8)+_0x3a3e59;if(_0x3c34c2[_0x4ec1b9(0xae)][_0x18534d]===![])return;const _0x561494=fs[_0x4ec1b9(0x104)](_0x5e87d8,_0x4ec1b9(0x11b)),_0x1a6788=path[_0x4ec1b9(0xeb)](_0x5e87d8)[_0x4ec1b9(0x11f)]();let _0x323a01=0x1;if(_0x1a6788==='.jsonl'||_0x1a6788===_0x4ec1b9(0x134))_0x323a01=_0x561494['split']('\x0a')[_0x4ec1b9(0xd6)](Boolean)[_0x4ec1b9(0x12b)];else{if(_0x1a6788==='.json')try{const _0x3f6ff7=JSON[_0x4ec1b9(0xc9)](_0x561494),_0x1d3f0d=Array[_0x4ec1b9(0x10e)](_0x3f6ff7[_0x4ec1b9(0x14d)])?_0x3f6ff7[_0x4ec1b9(0x14d)]:Array[_0x4ec1b9(0x10e)](_0x3f6ff7)?_0x3f6ff7:null;if(_0x1d3f0d)_0x323a01=_0x1d3f0d[_0x4ec1b9(0x12b)];}catch{}}let _0x47d6d8=0x0;if((_0x1a6788===_0x4ec1b9(0x112)||_0x1a6788===_0x4ec1b9(0x134))&&_0x561494['includes'](_0x4ec1b9(0x103))&&_0x561494['includes'](_0x4ec1b9(0xdc))){const _0x1eb09a=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x116146 of _0x561494[_0x4ec1b9(0x15e)]('\x0a')){if(!_0x116146[_0x4ec1b9(0xa9)](_0x4ec1b9(0x103))||!_0x116146['includes']('tokens'))continue;try{const _0x20d771=JSON['parse'](_0x116146);if(_0x20d771['type']!==_0x4ec1b9(0xa4))continue;const _0x16207e=typeof _0x20d771[_0x4ec1b9(0x11d)]===_0x4ec1b9(0xf0)?_0x20d771[_0x4ec1b9(0x11d)]:_0x20d771['message']&&typeof _0x20d771['message'][_0x4ec1b9(0x11d)]===_0x4ec1b9(0xf0)?_0x20d771['message'][_0x4ec1b9(0x11d)]:'';if(!_0x16207e)continue;for(const _0x2031d8 of _0x16207e[_0x4ec1b9(0xfb)](_0x1eb09a)){let _0x2ac8bb=parseFloat(_0x2031d8[0x1]);if(_0x2031d8[0x0]['toLowerCase']()['includes']('k'))_0x2ac8bb=_0x2ac8bb*0x3e8;_0x47d6d8+=Math[_0x4ec1b9(0x150)](_0x2ac8bb);}}catch{}}}const _0x10566b=loadSessionsState(),_0x32e176=_0x10566b[_0x5e87d8],_0x25ff04=_0x32e176?_0x32e176[_0x4ec1b9(0x11c)]:0x0,_0x35d726=_0x32e176?_0x32e176['activeSavedTokens']||0x0:0x0;if(_0x25ff04>0x0&&_0x323a01>_0x25ff04&&_0x35d726>0x0){const _0x40693c=_0x4ec1b9(0xe0)+_0x3a3e59;tracker_1[_0x4ec1b9(0x14f)][_0x4ec1b9(0x12a)](_0x40693c,'A'[_0x4ec1b9(0xd1)](_0x35d726*0x4),'',0x0,undefined,[_0x4ec1b9(0xa8)+_0x3a3e59,'live-conv',_0x3a3e59,_0x4ec1b9(0x118)]);}const _0x3f7f6e=_0x32e176&&_0x32e176['officialCompactSaved']!==undefined?_0x32e176['officialCompactSaved']:0x0,_0x7cb805=Math[_0x4ec1b9(0xe2)](_0x3f7f6e,_0x47d6d8);saveSessionStateItem(_0x5e87d8,_0x323a01,_0x7cb805,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x357a84,_0x338b3e){const _0x2a4b48=a0_0x2308b9;try{if(!fs[_0x2a4b48(0x14e)](_0x357a84))return{'ok':![],'reason':_0x2a4b48(0x136)};const _0x2f841f=path['extname'](_0x357a84)['toLowerCase']();if(_0x2f841f!==_0x2a4b48(0xaf)&&_0x2f841f!==_0x2a4b48(0x112)&&_0x2f841f!=='.json1')return{'ok':![],'reason':_0x2a4b48(0xb2)+(_0x2f841f||_0x2a4b48(0xf5))+'\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)'};const _0x2be92a=fs[_0x2a4b48(0x104)](_0x357a84,'utf8'),_0x4964e9=Buffer[_0x2a4b48(0xf3)](_0x2be92a,_0x2a4b48(0x11b)),_0x155552=path['basename'](_0x357a84,_0x2f841f);let _0x44229a=_0x2be92a,_0x3a3dca=![];if(_0x2f841f===_0x2a4b48(0xaf)){const _0x2f6f67=JSON['parse'](_0x2be92a),_0x49279a=Array[_0x2a4b48(0x10e)](_0x2f6f67['messages'])?_0x2f6f67[_0x2a4b48(0x14d)]:Array[_0x2a4b48(0x10e)](_0x2f6f67)?_0x2f6f67:null;if(_0x49279a){for(const _0x1edb2a of _0x49279a){const _0x539c90=compressMessageContent(_0x1edb2a,_0x155552,_0x338b3e);if(_0x539c90[_0x2a4b48(0x130)])_0x3a3dca=!![];}if(_0x3a3dca)_0x44229a=JSON[_0x2a4b48(0xc2)](_0x2f6f67,null,0x2);}}else{const _0x3dfddf=_0x2be92a[_0x2a4b48(0x15e)]('\x0a'),_0x4f22fe=[];for(let _0x5565d5 of _0x3dfddf){if(!_0x5565d5[_0x2a4b48(0x121)]()){_0x4f22fe['push'](_0x5565d5);continue;}try{const _0x3358b8=JSON[_0x2a4b48(0xc9)](_0x5565d5),_0x4bc7e6=_0x3358b8[_0x2a4b48(0xc0)]||_0x3358b8;if(_0x4bc7e6){const _0x5833f7=compressMessageContent(_0x4bc7e6,_0x155552,_0x338b3e);_0x5833f7[_0x2a4b48(0x130)]&&(_0x3a3dca=!![],_0x5565d5=JSON['stringify'](_0x3358b8));}}catch{}_0x4f22fe['push'](_0x5565d5);}if(_0x3a3dca)_0x44229a=_0x4f22fe[_0x2a4b48(0x146)]('\x0a');}const _0x436a68=Buffer[_0x2a4b48(0xf3)](_0x44229a,'utf8'),_0xe49768=path[_0x2a4b48(0x146)](path[_0x2a4b48(0x132)](_0x357a84),_0x155552+_0x2a4b48(0xe7)+_0x2f841f);fs[_0x2a4b48(0xd8)](_0xe49768,_0x44229a,_0x2a4b48(0x11b));const _0x242ac3=Math['ceil'](_0x4964e9/0x4),_0x3e1f6d=Math[_0x2a4b48(0xbf)](_0x436a68/0x4),_0x3a4a80=Math[_0x2a4b48(0xe2)](0x0,_0x242ac3-_0x3e1f6d),_0x5b6ae8=_0x4964e9>0x0?Math[_0x2a4b48(0x150)]((0x1-_0x436a68/_0x4964e9)*0x3e8)/0xa:0x0;return _0x3a4a80>0x0&&tracker_1[_0x2a4b48(0x14f)]['logExecution'](_0x2a4b48(0xd2)+_0x338b3e,_0x2be92a,_0x44229a,_0x3a4a80,undefined,[_0x2a4b48(0xa8)+_0x338b3e,_0x2a4b48(0xad),_0x338b3e,'compact_copy']),{'ok':!![],'compactPath':_0xe49768,'rawBytes':_0x4964e9,'compressedBytes':_0x436a68,'rawTokens':_0x242ac3,'compressedTokens':_0x3e1f6d,'savedTokens':_0x3a4a80,'reductionPct':_0x5b6ae8};}catch(_0x482218){return{'ok':![],'reason':_0x482218?.[_0x2a4b48(0xc0)]||_0x2a4b48(0x12d)};}}function compactLiveSession(_0x4beeba,_0x2f1166){const _0xceefe=a0_0x2308b9;try{if(!fs[_0xceefe(0x14e)](_0x4beeba))return{'ok':![],'savedTokens':0x0,'reason':_0xceefe(0x151)};const _0x395de7=path[_0xceefe(0xeb)](_0x4beeba)['toLowerCase']();if(_0x395de7!=='.json'&&_0x395de7!==_0xceefe(0x112)&&_0x395de7!=='.json1')return{'ok':![],'savedTokens':0x0,'reason':_0xceefe(0x15d)};const _0x1e917b=fs['readFileSync'](_0x4beeba,'utf8'),_0x5e874a=Buffer[_0xceefe(0xf3)](_0x1e917b,_0xceefe(0x11b)),_0x9cae24=Math[_0xceefe(0xbf)](_0x5e874a/0x4),_0x38dadc=path['basename'](_0x4beeba,_0x395de7);let _0x2cf702=_0x1e917b,_0x2ea3a8=![];if(_0x395de7===_0xceefe(0xaf)){const _0x2e1c76=JSON['parse'](_0x1e917b),_0x54d56f=Array['isArray'](_0x2e1c76[_0xceefe(0x14d)])?_0x2e1c76[_0xceefe(0x14d)]:Array[_0xceefe(0x10e)](_0x2e1c76)?_0x2e1c76:null;if(_0x54d56f){for(const _0x243ef6 of _0x54d56f){const _0x217da1=compressMessageContent(_0x243ef6,_0x38dadc,_0x2f1166);if(_0x217da1['modified'])_0x2ea3a8=!![];}const {compressConversation:_0x523b7b}=require(_0xceefe(0x110)),_0x5a90b3=_0x523b7b(_0x54d56f,0x9c40);_0x5a90b3['savedTokens']>0x0&&(_0x2ea3a8=!![],Array[_0xceefe(0x10e)](_0x2e1c76[_0xceefe(0x14d)])?_0x2e1c76[_0xceefe(0x14d)]=_0x5a90b3[_0xceefe(0x14d)]:_0x2cf702=JSON['stringify'](_0x5a90b3[_0xceefe(0x14d)],null,0x2)),_0x2ea3a8&&!Array[_0xceefe(0x10e)](_0x2e1c76)&&(_0x2cf702=JSON[_0xceefe(0xc2)](_0x2e1c76,null,0x2));}}else{const _0x45bf17=_0x1e917b[_0xceefe(0x15e)]('\x0a'),_0x84cc8=[],_0x23e75c=[];for(const _0x4f8fc0 of _0x45bf17){if(!_0x4f8fc0[_0xceefe(0x121)]())continue;try{const _0xb85ebe=JSON['parse'](_0x4f8fc0);_0x84cc8['push'](_0xb85ebe);const _0x4805b2=_0xb85ebe[_0xceefe(0xc0)]||_0xb85ebe;_0x4805b2&&typeof _0x4805b2[_0xceefe(0x11a)]==='string'&&_0x23e75c[_0xceefe(0x10f)](_0x4805b2);}catch{}}for(const _0x2157e9 of _0x23e75c){const _0x352289=compressMessageContent(_0x2157e9,_0x38dadc,_0x2f1166);if(_0x352289['modified'])_0x2ea3a8=!![];}const {compressConversation:_0x50a4a8}=require(_0xceefe(0x110)),_0x43f9d5=_0x50a4a8(_0x23e75c,0x9c40);if(_0x43f9d5[_0xceefe(0xef)]>0x0||_0x2ea3a8){const _0x4a20ea=[];for(const _0x9dc4e4 of _0x84cc8){const _0x13154b=_0x9dc4e4[_0xceefe(0xc0)]||_0x9dc4e4;if(_0x13154b&&typeof _0x13154b[_0xceefe(0x11a)]===_0xceefe(0xf0)){const _0x5b330b=_0x43f9d5['messages'][_0xceefe(0x12f)](_0x12c2ee=>_0x12c2ee===_0x13154b);_0x5b330b?(_0x9dc4e4[_0xceefe(0xc0)]?_0x9dc4e4[_0xceefe(0xc0)]=_0x5b330b:Object[_0xceefe(0x149)](_0x9dc4e4,_0x5b330b),_0x4a20ea[_0xceefe(0x10f)](JSON[_0xceefe(0xc2)](_0x9dc4e4))):_0x2ea3a8=!![];}else _0x4a20ea[_0xceefe(0x10f)](JSON[_0xceefe(0xc2)](_0x9dc4e4));}_0x2cf702=_0x4a20ea[_0xceefe(0x146)]('\x0a'),_0x2ea3a8=!![];}}if(_0x2ea3a8){const _0x5d5328=Buffer[_0xceefe(0xf3)](_0x2cf702,_0xceefe(0x11b));fs[_0xceefe(0xd8)](_0x4beeba,_0x2cf702,_0xceefe(0x11b));const _0x4cb5fe=Math['ceil'](_0x5d5328/0x4),_0x118288=Math[_0xceefe(0xe2)](0x0,_0x9cae24-_0x4cb5fe);if(_0x118288>0x0){const _0xb74f9c=loadSessionsState(),_0x472dab=_0xb74f9c[_0x4beeba]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x380d60=_0x472dab['autoCompactSaved']||0x0,_0x12f154=_0x380d60+_0x118288;saveSessionStateItem(_0x4beeba,_0x472dab['lineCount'],_0x472dab[_0xceefe(0x140)]||0x0,_0x472dab[_0xceefe(0xcb)]||0x0,_0x12f154,_0x472dab['hookSavedTokens']||0x0),tracker_1[_0xceefe(0x14f)]['logExecution'](_0xceefe(0xd2)+_0x2f1166,_0x1e917b,_0x2cf702,_0x118288,undefined,[_0xceefe(0xa8)+_0x2f1166,_0xceefe(0xad),_0x2f1166,_0xceefe(0xd4)]);}return{'ok':!![],'savedTokens':_0x118288};}return{'ok':!![],'savedTokens':0x0};}catch(_0x122508){return{'ok':![],'savedTokens':0x0,'reason':_0x122508[_0xceefe(0xc0)]||_0xceefe(0xf8)};}}function installWindowsStartupService(){const _0x17a637=a0_0x2308b9;if(process[_0x17a637(0x117)]!==_0x17a637(0xea))return;try{const _0x5396f1=path[_0x17a637(0x146)](os[_0x17a637(0xbb)](),_0x17a637(0x13c),_0x17a637(0xbd),_0x17a637(0xca),_0x17a637(0x139),_0x17a637(0x137),_0x17a637(0x157),_0x17a637(0xf9));if(!fs[_0x17a637(0x14e)](_0x5396f1))fs[_0x17a637(0xb5)](_0x5396f1,{'recursive':!![]});const _0x4f9237=path[_0x17a637(0x146)](_0x5396f1,_0x17a637(0x100)),_0x46b27e=path[_0x17a637(0x146)](__dirname,_0x17a637(0xab)),_0x4dbfdb=_0x46b27e['replace'](/\\/g,'\x5c\x5c'),_0x333d62=_0x17a637(0x12c)+_0x4dbfdb+_0x17a637(0xbe);fs[_0x17a637(0xd8)](_0x4f9237,_0x333d62,_0x17a637(0x11b));}catch{}}function startWatcherDaemon(){const _0x38b593=a0_0x2308b9;installWindowsStartupService();try{const {installClaudeHooks:_0x17e598}=require(_0x38b593(0x106));_0x17e598();}catch(_0x9404d){}const _0x1745b2=[_0x38b593(0x105),_0x38b593(0xf1),_0x38b593(0xe5),_0x38b593(0x115),_0x38b593(0x116),'copilot',_0x38b593(0x102),_0x38b593(0x143),_0x38b593(0xc4)];for(const _0x4c7040 of _0x1745b2){const _0x45ee9e=getAgentStoragePaths(_0x4c7040);for(const _0x386baf of _0x45ee9e){if(fs[_0x38b593(0x14e)](_0x386baf))try{fs[_0x38b593(0xa6)](_0x386baf,{'recursive':!![]},(_0x39852b,_0xeac995)=>{const _0x25c191=_0x38b593;if(!_0xeac995)return;const _0x3c244b=path[_0x25c191(0x146)](_0x386baf,_0xeac995);if(debounceTimers['has'](_0x3c244b))clearTimeout(debounceTimers[_0x25c191(0x127)](_0x3c244b));const _0xc74f27=setTimeout(()=>processSessionFile(_0x3c244b,_0x4c7040),0x1f4);debounceTimers[_0x25c191(0x129)](_0x3c244b,_0xc74f27);});}catch{}}}setInterval(()=>{const _0x426690=_0x38b593;for(const _0x2e69bc of _0x1745b2){try{const _0x1321f6=getLatestSessionFile(_0x2e69bc);_0x1321f6&&_0x1321f6['fullPath']&&processSessionFile(_0x1321f6[_0x426690(0xcd)],_0x2e69bc);}catch{}}},0xbb8);const _0x36d4ed=()=>{const _0x2ba99b=_0x38b593;for(const _0x19e9c1 of _0x1745b2){try{const _0x4fc0d0=getLatestSessionFile(_0x19e9c1);_0x4fc0d0&&_0x4fc0d0[_0x2ba99b(0xcd)]&&compactLiveSession(_0x4fc0d0[_0x2ba99b(0xcd)],_0x19e9c1);}catch{}}};setTimeout(_0x36d4ed,0x7d0),setInterval(_0x36d4ed,0x2bf20);}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1cba76=a0_0x36f3;(function(_0x284ee4,_0xa3f2eb){const _0x5137f2=a0_0x36f3,_0x40dd3d=_0x284ee4();while(!![]){try{const _0x3e4b34=parseInt(_0x5137f2(0x10c))/0x1*(-parseInt(_0x5137f2(0xf2))/0x2)+parseInt(_0x5137f2(0xf9))/0x3*(-parseInt(_0x5137f2(0xf6))/0x4)+-parseInt(_0x5137f2(0xfa))/0x5+parseInt(_0x5137f2(0xff))/0x6*(-parseInt(_0x5137f2(0xfd))/0x7)+parseInt(_0x5137f2(0xe9))/0x8+parseInt(_0x5137f2(0xe4))/0x9*(parseInt(_0x5137f2(0x101))/0xa)+parseInt(_0x5137f2(0xe7))/0xb;if(_0x3e4b34===_0xa3f2eb)break;else _0x40dd3d['push'](_0x40dd3d['shift']());}catch(_0x15373a){_0x40dd3d['push'](_0x40dd3d['shift']());}}}(a0_0x52e9,0x22da6));Object['defineProperty'](exports,a0_0x1cba76(0x109),{'value':!![]}),exports[a0_0x1cba76(0x100)]=filterDockerPs,exports[a0_0x1cba76(0xf5)]=filterDockerImages,exports[a0_0x1cba76(0xf8)]=filterDockerLogs,exports[a0_0x1cba76(0xea)]=filterKubectl,exports[a0_0x1cba76(0xfe)]=filterRuff;function filterDockerPs(_0x4306c4){const _0x249a31=a0_0x1cba76,_0x46b03e=_0x4306c4[_0x249a31(0x107)]('\x0a')[_0x249a31(0xf1)](_0x14c467=>_0x14c467[_0x249a31(0x10f)]()[_0x249a31(0xeb)]>0x0);if(_0x46b03e[_0x249a31(0xeb)]===0x0)return _0x249a31(0xf4);if(_0x46b03e['length']<=0xa)return _0x4306c4['trim']();const _0x39ed8a=_0x46b03e[0x0],_0x1f86e7=_0x46b03e[_0x249a31(0x106)](0x1),_0x294fea=[];_0x294fea['push']('Containers:\x20'+_0x1f86e7['length']+_0x249a31(0xee)),_0x294fea['push']('');for(const _0x285de6 of _0x1f86e7){const _0x4cbf30=_0x285de6['split'](/\s{2,}/);if(_0x4cbf30[_0x249a31(0xeb)]>=0x5){const _0x3b80c7=_0x4cbf30[0x0]['substring'](0x0,0xc),_0x7c14cc=_0x4cbf30[0x1],_0x334287=_0x4cbf30[_0x4cbf30[_0x249a31(0xeb)]-0x2]||'',_0x49ca88=_0x4cbf30[_0x4cbf30['length']-0x1]||'';_0x294fea[_0x249a31(0xe6)]('\x20\x20'+_0x3b80c7+'\x20\x20'+_0x7c14cc+'\x20\x20'+_0x334287+'\x20\x20'+_0x49ca88);}else _0x294fea['push']('\x20\x20'+_0x285de6[_0x249a31(0x10f)]());}return _0x294fea[_0x249a31(0xf0)]('\x0a');}function a0_0x36f3(_0x46840b,_0x7bd95e){const _0x52e9b0=a0_0x52e9();return a0_0x36f3=function(_0x36f32f,_0x936878){_0x36f32f=_0x36f32f-0xe3;let _0x102d09=_0x52e9b0[_0x36f32f];return _0x102d09;},a0_0x36f3(_0x46840b,_0x7bd95e);}function filterDockerImages(_0x213a25){const _0x2a461e=a0_0x1cba76,_0x2beefe=_0x213a25[_0x2a461e(0x107)]('\x0a')[_0x2a461e(0xf1)](_0x369f80=>_0x369f80['trim']()[_0x2a461e(0xeb)]>0x0);if(_0x2beefe[_0x2a461e(0xeb)]<=0x1)return'No\x20images\x20found';if(_0x2beefe[_0x2a461e(0xeb)]<=0xf)return _0x213a25[_0x2a461e(0x10f)]();const _0x2b3821=_0x2beefe['slice'](0x1),_0x5a011d=[_0x2a461e(0xf7)+_0x2b3821['length']+_0x2a461e(0xee)];_0x5a011d[_0x2a461e(0xe6)]('');const _0x27858c=_0x2b3821[_0x2a461e(0x106)](0x0,0x14);for(const _0x5ec54a of _0x27858c){const _0x155f5f=_0x5ec54a[_0x2a461e(0x107)](/\s{2,}/);if(_0x155f5f[_0x2a461e(0xeb)]>=0x3){const _0x5ae76b=_0x155f5f[0x0],_0x28ebd7=_0x155f5f[0x1],_0x21034b=_0x155f5f[_0x155f5f[_0x2a461e(0xeb)]-0x1]||'';_0x5a011d['push']('\x20\x20'+_0x5ae76b+':'+_0x28ebd7+'\x20\x20'+_0x21034b);}else _0x5a011d[_0x2a461e(0xe6)]('\x20\x20'+_0x5ec54a[_0x2a461e(0x10f)]());}return _0x2b3821['length']>0x14&&_0x5a011d[_0x2a461e(0xe6)]('\x20\x20...\x20+'+(_0x2b3821['length']-0x14)+'\x20more\x20images'),_0x5a011d[_0x2a461e(0xf0)]('\x0a');}function a0_0x52e9(){const _0x1b7c0a=['3100RwBgLT','Docker\x20images:\x20','filterDockerLogs','345wGonDw','1086005WkufNX','Ruff:\x20','includes','315427Vvnkzm','filterRuff','24hCFrcf','filterDockerPs','20pKULCJ','\x20\x20...\x20+','match','keys','describe','slice','split','\x20resources\x20found','__esModule','Ruff:\x20no\x20issues\x20found','\x20more\x20files','244195fAGoFW','logs','No\x20resources\x20found','trim','Found\x200\x20error','\x20more\x20events','\x20\x20...\x20(','575478UDTdJu','All\x20checks\x20passed','push','6104142jajiOB','Events:','1525736VsKbnw','filterKubectl','length','\x20log\x20lines\x20total)','\x20files','\x20total','\x20issues\x20in\x20','join','filter','2iJjLgm','\x20lines\x20truncated]\x20...\x0a','No\x20containers\x20running','filterDockerImages'];a0_0x52e9=function(){return _0x1b7c0a;};return a0_0x52e9();}function filterDockerLogs(_0x4ce0fa){const _0x50f15f=a0_0x1cba76,_0x170d63=_0x4ce0fa[_0x50f15f(0x107)]('\x0a');if(_0x170d63[_0x50f15f(0xeb)]<=0x32)return _0x4ce0fa;const _0x46050b=[];return _0x46050b[_0x50f15f(0xe6)](..._0x170d63[_0x50f15f(0x106)](0x0,0x14)),_0x46050b[_0x50f15f(0xe6)]('\x0a...\x20['+(_0x170d63[_0x50f15f(0xeb)]-0x28)+_0x50f15f(0xf3)),_0x46050b[_0x50f15f(0xe6)](..._0x170d63[_0x50f15f(0x106)](-0x14)),_0x46050b['push']('\x0a('+_0x170d63['length']+_0x50f15f(0xec)),_0x46050b[_0x50f15f(0xf0)]('\x0a');}function filterKubectl(_0x63ed62,_0x1c27e5){const _0x120636=a0_0x1cba76,_0x3f3990=_0x63ed62[_0x120636(0x107)]('\x0a')[_0x120636(0xf1)](_0x398932=>_0x398932[_0x120636(0x10f)]()[_0x120636(0xeb)]>0x0);if(_0x3f3990[_0x120636(0xeb)]===0x0)return _0x120636(0x10e);if(_0x3f3990[_0x120636(0xeb)]<=0x14)return _0x63ed62[_0x120636(0x10f)]();if(_0x1c27e5==='get'){const _0x233ea1=_0x3f3990[0x0],_0x53060a=_0x3f3990['slice'](0x1),_0x95525a=[_0x53060a[_0x120636(0xeb)]+_0x120636(0x108),'',_0x233ea1];return _0x53060a['length']<=0x1e?_0x95525a[_0x120636(0xe6)](..._0x53060a):(_0x95525a[_0x120636(0xe6)](..._0x53060a['slice'](0x0,0x19)),_0x95525a['push']('...\x20+'+(_0x53060a[_0x120636(0xeb)]-0x19)+'\x20more\x20resources')),_0x95525a['join']('\x0a');}if(_0x1c27e5===_0x120636(0x105)){const _0x5e8179=[];let _0x246570=![],_0x58245f=0x0;for(const _0x148fe3 of _0x3f3990){if(_0x148fe3['startsWith'](_0x120636(0xe8))){_0x246570=!![],_0x5e8179[_0x120636(0xe6)](_0x148fe3);continue;}if(_0x246570){_0x58245f++;if(_0x58245f<=0x5)_0x5e8179[_0x120636(0xe6)](_0x148fe3);}else _0x5e8179[_0x120636(0xe6)](_0x148fe3);}return _0x58245f>0x5&&_0x5e8179[_0x120636(0xe6)](_0x120636(0x102)+(_0x58245f-0x5)+_0x120636(0x111)),_0x5e8179[_0x120636(0xf0)]('\x0a');}if(_0x1c27e5===_0x120636(0x10d))return filterDockerLogs(_0x63ed62);const _0xbf9049=_0x3f3990[_0x120636(0x106)](0x0,0x1e);return _0x3f3990[_0x120636(0xeb)]>0x1e&&_0xbf9049[_0x120636(0xe6)]('...\x20+'+(_0x3f3990['length']-0x1e)+'\x20more\x20lines'),_0xbf9049[_0x120636(0xf0)]('\x0a');}function filterRuff(_0x413a6d){const _0x1da689=a0_0x1cba76,_0x536a46=_0x413a6d[_0x1da689(0x107)]('\x0a')['filter'](_0x32a4be=>_0x32a4be[_0x1da689(0x10f)]()[_0x1da689(0xeb)]>0x0);if(_0x536a46[_0x1da689(0xeb)]===0x0)return _0x1da689(0x10a);if(_0x413a6d[_0x1da689(0xfc)](_0x1da689(0xe5))||_0x413a6d[_0x1da689(0xfc)](_0x1da689(0x110)))return'Ruff:\x20all\x20checks\x20passed';const _0x4563de=_0x413a6d[_0x1da689(0x103)](/Found (\d+) error/),_0x215d5f=_0x4563de?parseInt(_0x4563de[0x1]):_0x536a46[_0x1da689(0xeb)],_0x16ddf6={},_0x1fa6b9=[];for(const _0x3900c4 of _0x536a46){const _0x42706f=_0x3900c4[_0x1da689(0x103)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x42706f){const _0x5cc16d=_0x42706f[0x1],_0x589c10=_0x5cc16d[_0x1da689(0x107)](':')[0x0];if(!_0x16ddf6[_0x589c10])_0x16ddf6[_0x589c10]=[];_0x16ddf6[_0x589c10]['push'](_0x3900c4);}else _0x1fa6b9[_0x1da689(0xe6)](_0x3900c4);}const _0x428391=Object[_0x1da689(0x104)](_0x16ddf6);if(_0x428391[_0x1da689(0xeb)]===0x0){if(_0x536a46['length']<=0x14)return _0x413a6d[_0x1da689(0x10f)]();return _0x536a46['slice'](0x0,0xf)['join']('\x0a')+('\x0a...\x20+'+(_0x536a46[_0x1da689(0xeb)]-0xf)+'\x20more');}const _0x35ad2d=[_0x1da689(0xfb)+_0x215d5f+'\x20issues\x20in\x20'+_0x428391[_0x1da689(0xeb)]+_0x1da689(0xed)];_0x35ad2d[_0x1da689(0xe6)]('');const _0x512c44=0xa;for(const _0x346286 of _0x428391[_0x1da689(0x106)](0x0,_0x512c44)){const _0x537929=_0x16ddf6[_0x346286];if(_0x537929['length']<=0x3){for(const _0x25948e of _0x537929)_0x35ad2d[_0x1da689(0xe6)]('\x20\x20'+_0x25948e);}else _0x35ad2d[_0x1da689(0xe6)]('\x20\x20'+_0x537929[0x0]),_0x35ad2d[_0x1da689(0xe6)](_0x1da689(0xe3)+_0x537929[_0x1da689(0xeb)]+_0x1da689(0xef)+_0x346286+')');}return _0x428391[_0x1da689(0xeb)]>_0x512c44&&_0x35ad2d[_0x1da689(0xe6)](_0x1da689(0x102)+(_0x428391[_0x1da689(0xeb)]-_0x512c44)+_0x1da689(0x10b)),_0x35ad2d['join']('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x7e859c=a0_0x20e9;(function(_0x19d93a,_0x4a17b7){const _0x25162e=a0_0x20e9,_0xa081b3=_0x19d93a();while(!![]){try{const _0xdb432=-parseInt(_0x25162e(0x10e))/0x1+-parseInt(_0x25162e(0xf9))/0x2*(-parseInt(_0x25162e(0xef))/0x3)+-parseInt(_0x25162e(0x11a))/0x4+parseInt(_0x25162e(0xff))/0x5+parseInt(_0x25162e(0xf5))/0x6*(-parseInt(_0x25162e(0x10d))/0x7)+-parseInt(_0x25162e(0xf8))/0x8*(-parseInt(_0x25162e(0xeb))/0x9)+-parseInt(_0x25162e(0x101))/0xa;if(_0xdb432===_0x4a17b7)break;else _0xa081b3['push'](_0xa081b3['shift']());}catch(_0x42c9e8){_0xa081b3['push'](_0xa081b3['shift']());}}}(a0_0x31d3,0x1cbcd));function a0_0x20e9(_0xd2a218,_0x38b35d){const _0x31d38a=a0_0x31d3();return a0_0x20e9=function(_0x20e968,_0x3c67c1){_0x20e968=_0x20e968-0xe9;let _0x5e2b51=_0x31d38a[_0x20e968];return _0x5e2b51;},a0_0x20e9(_0xd2a218,_0x38b35d);}Object[a0_0x7e859c(0x106)](exports,a0_0x7e859c(0x102),{'value':!![]}),exports[a0_0x7e859c(0x107)]=stripAnsi,exports[a0_0x7e859c(0x103)]=collapseDuplicates,exports[a0_0x7e859c(0x100)]=collapseWhitespace,exports[a0_0x7e859c(0x11c)]=stripComments,exports['smartCrushJson']=smartCrushJson,exports[a0_0x7e859c(0xf0)]=softTruncate;function stripAnsi(_0x74f429){const _0x3474d4=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x74f429['replace'](_0x3474d4,'');}function collapseDuplicates(_0x83dc50){const _0x5c36a4=a0_0x7e859c,_0x168c1a=_0x83dc50['split']('\x0a');if(_0x168c1a[_0x5c36a4(0xe9)]<=0x1)return _0x83dc50;const _0x10a53a=[];let _0x12badf=_0x168c1a[0x0],_0x161332=0x1;for(let _0x2602a7=0x1;_0x2602a7<_0x168c1a[_0x5c36a4(0xe9)];_0x2602a7++){const _0x2e02d3=_0x168c1a[_0x2602a7];_0x2e02d3===_0x12badf&&_0x2e02d3['trim']()[_0x5c36a4(0xe9)]>0x0?_0x161332++:(_0x161332>0x1?_0x10a53a[_0x5c36a4(0x116)](_0x12badf+_0x5c36a4(0x109)+_0x161332+']'):_0x10a53a[_0x5c36a4(0x116)](_0x12badf),_0x12badf=_0x2e02d3,_0x161332=0x1);}return _0x161332>0x1?_0x10a53a[_0x5c36a4(0x116)](_0x12badf+_0x5c36a4(0x109)+_0x161332+']'):_0x10a53a[_0x5c36a4(0x116)](_0x12badf),_0x10a53a[_0x5c36a4(0x10b)]('\x0a');}function a0_0x31d3(){const _0x149f4b=['\x20[x','\x20key\x20fields)','join','bugs','22463RzhfCo','102921tFAPXT','keys','replace','signature','engines','stringify','object','resolved','push','split','dev','checksum','910244IOKejz','substring','stripComments','length','integrity','9dMQEwD','\x20items,\x20','\x0a...\x20[TrimPrompt:\x20Truncated\x20','parse','3TUCxPW','softTruncate','toLowerCase','map','isArray','slice','102GSABuh','hash','filter','1881944qqybpr','235016XOhxhI','trim','funding','...\x20+','includes','repository','969720QRTnPi','collapseWhitespace','439510Mmghwd','__esModule','collapseDuplicates','\x20characters\x20of\x20output]\x20...\x0a','sha','defineProperty','stripAnsi','\x0a\x0a\x0a'];a0_0x31d3=function(){return _0x149f4b;};return a0_0x31d3();}function collapseWhitespace(_0x274113){const _0x1d89c7=a0_0x7e859c;let _0x2e31f8=_0x274113['replace'](/[ \t]+$/gm,'');return _0x2e31f8=_0x2e31f8[_0x1d89c7(0x110)](/\n{4,}/g,_0x1d89c7(0x108)),_0x2e31f8;}function stripComments(_0x5b9bf7,_0xfc9317){const _0x58a35c=a0_0x7e859c;if(!_0xfc9317)return _0x5b9bf7;const _0x28cdcb=_0x5b9bf7[_0x58a35c(0x117)]('\x0a');if(_0x28cdcb['length']<=0x96)return _0x5b9bf7;const _0x243661={'.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*#(?!!)/},_0x23a03b=_0x243661[_0xfc9317[_0x58a35c(0xf1)]()];if(!_0x23a03b)return _0x5b9bf7;const _0xffbd91=_0x28cdcb[_0x58a35c(0xf7)](_0x442af2=>!_0x23a03b['test'](_0x442af2));return _0xffbd91[_0x58a35c(0x10b)]('\x0a');}function smartCrushJson(_0x14cebd){const _0x3155ce=a0_0x7e859c;try{const _0x321b37=_0x14cebd[_0x3155ce(0xfa)]();if(!_0x321b37['startsWith']('['))return null;const _0x2aad44=JSON[_0x3155ce(0xee)](_0x321b37);if(!Array[_0x3155ce(0xf3)](_0x2aad44)||_0x2aad44[_0x3155ce(0xe9)]<0x3)return null;if(typeof _0x2aad44[0x0]!==_0x3155ce(0x114)||_0x2aad44[0x0]===null)return null;const _0x1e4271=Object[_0x3155ce(0x10f)](_0x2aad44[0x0]);if(_0x1e4271['length']===0x0)return null;const _0x1a1156=_0x1e4271[_0x3155ce(0xf7)](_0x968666=>{const _0x1ddf18=_0x3155ce,_0xa4b61c=_0x968666[_0x1ddf18(0xf1)]();return!_0xa4b61c[_0x1ddf18(0xfd)](_0x1ddf18(0x115))&&!_0xa4b61c[_0x1ddf18(0xfd)](_0x1ddf18(0xea))&&!_0xa4b61c['includes'](_0x1ddf18(0x105))&&!_0xa4b61c['includes'](_0x1ddf18(0xf6))&&!_0xa4b61c[_0x1ddf18(0xfd)](_0x1ddf18(0x119))&&!_0xa4b61c[_0x1ddf18(0xfd)](_0x1ddf18(0x111))&&!_0xa4b61c['includes'](_0x1ddf18(0x118))&&_0xa4b61c!==_0x1ddf18(0xfb)&&_0xa4b61c!==_0x1ddf18(0x112)&&_0xa4b61c!==_0x1ddf18(0x10c)&&_0xa4b61c!==_0x1ddf18(0xfe);})[_0x3155ce(0xf4)](0x0,0x6);if(_0x1a1156[_0x3155ce(0xe9)]===0x0)return null;const _0x5b59f1=[];_0x5b59f1[_0x3155ce(0x116)](_0x1a1156[_0x3155ce(0x10b)]('|'));const _0x4aae98=0x1e;for(let _0x3ebebc=0x0;_0x3ebebc<Math['min'](_0x2aad44[_0x3155ce(0xe9)],_0x4aae98);_0x3ebebc++){const _0x37bc0b=_0x1a1156[_0x3155ce(0xf2)](_0xd77e26=>{const _0x2b4203=_0x3155ce,_0x1ebee7=_0x2aad44[_0x3ebebc][_0xd77e26];if(_0x1ebee7===null||_0x1ebee7===undefined)return'';if(typeof _0x1ebee7==='object')return JSON[_0x2b4203(0x113)](_0x1ebee7)[_0x2b4203(0x11b)](0x0,0x28);return String(_0x1ebee7)['substring'](0x0,0x3c);});_0x5b59f1[_0x3155ce(0x116)](_0x37bc0b[_0x3155ce(0x10b)]('|'));}_0x2aad44[_0x3155ce(0xe9)]>_0x4aae98&&_0x5b59f1[_0x3155ce(0x116)](_0x3155ce(0xfc)+(_0x2aad44[_0x3155ce(0xe9)]-_0x4aae98)+'\x20more\x20rows');_0x5b59f1[_0x3155ce(0x116)]('\x0a('+_0x2aad44['length']+_0x3155ce(0xec)+_0x1e4271['length']+'\x20fields,\x20showing\x20'+_0x1a1156['length']+_0x3155ce(0x10a));const _0x59cab2=_0x5b59f1[_0x3155ce(0x10b)]('\x0a');if(_0x59cab2[_0x3155ce(0xe9)]<_0x321b37[_0x3155ce(0xe9)])return _0x59cab2;return null;}catch{return null;}}function softTruncate(_0x348d96,_0x3531ee=0x4e20){const _0x59c860=a0_0x7e859c;if(_0x348d96[_0x59c860(0xe9)]<=_0x3531ee)return _0x348d96;const _0x1bb581=_0x348d96[_0x59c860(0x117)]('\x0a');if(_0x1bb581['length']<=0xc8)return _0x348d96;const _0x2714a9=0x32,_0x344ed0=0x96,_0x520e2f=_0x1bb581[_0x59c860(0xf4)](0x0,_0x2714a9),_0x64e85a=_0x1bb581['slice'](_0x1bb581[_0x59c860(0xe9)]-_0x344ed0),_0x3c4172=_0x348d96[_0x59c860(0xe9)]-(_0x520e2f[_0x59c860(0x10b)]('\x0a')[_0x59c860(0xe9)]+_0x64e85a[_0x59c860(0x10b)]('\x0a')[_0x59c860(0xe9)]);return[..._0x520e2f,_0x59c860(0xed)+_0x3c4172+_0x59c860(0x104),..._0x64e85a][_0x59c860(0x10b)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x2daa(_0xcc4eb5,_0x124ac3){const _0x4618c6=a0_0x4618();return a0_0x2daa=function(_0x2daae2,_0x39555a){_0x2daae2=_0x2daae2-0xd6;let _0x391a60=_0x4618c6[_0x2daae2];return _0x391a60;},a0_0x2daa(_0xcc4eb5,_0x124ac3);}const a0_0x248295=a0_0x2daa;(function(_0x10b366,_0x3990b8){const _0x2b584a=a0_0x2daa,_0x4f49b5=_0x10b366();while(!![]){try{const _0x19b4e4=parseInt(_0x2b584a(0xeb))/0x1+parseInt(_0x2b584a(0xdd))/0x2+parseInt(_0x2b584a(0xd7))/0x3+-parseInt(_0x2b584a(0xe8))/0x4+parseInt(_0x2b584a(0xe2))/0x5+-parseInt(_0x2b584a(0xf7))/0x6*(parseInt(_0x2b584a(0xf4))/0x7)+-parseInt(_0x2b584a(0xf5))/0x8;if(_0x19b4e4===_0x3990b8)break;else _0x4f49b5['push'](_0x4f49b5['shift']());}catch(_0x2a8547){_0x4f49b5['push'](_0x4f49b5['shift']());}}}(a0_0x4618,0x1be16));var __createBinding=this&&this[a0_0x248295(0xfc)]||(Object['create']?function(_0x4b8e52,_0x3e7888,_0xf2c2c4,_0x47348d){const _0x37eb06=a0_0x248295;if(_0x47348d===undefined)_0x47348d=_0xf2c2c4;var _0x5c3385=Object['getOwnPropertyDescriptor'](_0x3e7888,_0xf2c2c4);(!_0x5c3385||('get'in _0x5c3385?!_0x3e7888[_0x37eb06(0xe6)]:_0x5c3385['writable']||_0x5c3385[_0x37eb06(0xdb)]))&&(_0x5c3385={'enumerable':!![],'get':function(){return _0x3e7888[_0xf2c2c4];}}),Object[_0x37eb06(0xe3)](_0x4b8e52,_0x47348d,_0x5c3385);}:function(_0x4a9847,_0x4985f3,_0x2c2b5c,_0x592311){if(_0x592311===undefined)_0x592311=_0x2c2b5c;_0x4a9847[_0x592311]=_0x4985f3[_0x2c2b5c];}),__setModuleDefault=this&&this[a0_0x248295(0xf0)]||(Object['create']?function(_0x3d1556,_0x581ede){const _0x27e5cf=a0_0x248295;Object[_0x27e5cf(0xe3)](_0x3d1556,'default',{'enumerable':!![],'value':_0x581ede});}:function(_0x26bc6c,_0x45b863){const _0x49b400=a0_0x248295;_0x26bc6c[_0x49b400(0xea)]=_0x45b863;}),__importStar=this&&this[a0_0x248295(0xf6)]||(function(){var _0x127abe=function(_0x109be4){return _0x127abe=Object['getOwnPropertyNames']||function(_0x493f9d){const _0x4650c4=a0_0x2daa;var _0x36d1a7=[];for(var _0x291118 in _0x493f9d)if(Object['prototype'][_0x4650c4(0xef)]['call'](_0x493f9d,_0x291118))_0x36d1a7[_0x36d1a7[_0x4650c4(0xfa)]]=_0x291118;return _0x36d1a7;},_0x127abe(_0x109be4);};return function(_0x21dccd){if(_0x21dccd&&_0x21dccd['__esModule'])return _0x21dccd;var _0x3d640b={};if(_0x21dccd!=null){for(var _0x29d097=_0x127abe(_0x21dccd),_0x43e71d=0x0;_0x43e71d<_0x29d097['length'];_0x43e71d++)if(_0x29d097[_0x43e71d]!=='default')__createBinding(_0x3d640b,_0x21dccd,_0x29d097[_0x43e71d]);}return __setModuleDefault(_0x3d640b,_0x21dccd),_0x3d640b;};}());Object['defineProperty'](exports,a0_0x248295(0xe6),{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x248295(0xe1)]=filterGitLog,exports[a0_0x248295(0xf9)]=filterGitDiff;const path=__importStar(require(a0_0x248295(0xf1)));function filterGitStatus(_0x1a9c71){const _0x3942a2=a0_0x248295,_0x47f07b=_0x1a9c71['split']('\x0a')[_0x3942a2(0xd6)](_0x1735ef=>_0x1735ef['trim']())[_0x3942a2(0xd8)](_0x27609c=>_0x27609c[_0x3942a2(0xfa)]>0x0);if(_0x47f07b[_0x3942a2(0xfa)]===0x0)return'Clean\x20working\x20tree';const _0x15cb2c=[],_0x17870b=[],_0x144b8b=[];for(const _0xd4c36b of _0x47f07b){if(_0xd4c36b[_0x3942a2(0xdf)]('##')){const _0x22bcec=_0xd4c36b[_0x3942a2(0xfb)](/^##\s*/,'');_0x15cb2c[_0x3942a2(0xe5)](_0x3942a2(0xd9)+_0x22bcec);}else _0xd4c36b[_0x3942a2(0xdf)]('??')?_0x17870b[_0x3942a2(0xe5)](_0xd4c36b[_0x3942a2(0xf2)](0x3)['trim']()):_0x144b8b['push'](_0xd4c36b);}_0x144b8b[_0x3942a2(0xfa)]>0x0&&(_0x15cb2c[_0x3942a2(0xe5)](_0x3942a2(0xe7)),_0x15cb2c[_0x3942a2(0xe5)](..._0x144b8b[_0x3942a2(0xd6)](_0x444dcc=>'\x20\x20'+_0x444dcc)));if(_0x17870b[_0x3942a2(0xfa)]>0x0){_0x15cb2c[_0x3942a2(0xe5)](_0x3942a2(0xe0));const _0x52793e={},_0xc748b4=[];for(const _0x4b94ca of _0x17870b){const _0x31ba7e=path['dirname'](_0x4b94ca);_0x31ba7e==='.'||_0x31ba7e===''?_0xc748b4[_0x3942a2(0xe5)](_0x4b94ca):(!_0x52793e[_0x31ba7e]&&(_0x52793e[_0x31ba7e]=[]),_0x52793e[_0x31ba7e]['push'](path['basename'](_0x4b94ca)));}for(const [_0x5615b5,_0x421259]of Object['entries'](_0x52793e)){if(_0x421259[_0x3942a2(0xfa)]>0x5)_0x15cb2c['push']('\x20\x20??\x20'+_0x5615b5+_0x3942a2(0xfd)+_0x421259[_0x3942a2(0xfa)]+_0x3942a2(0xfe));else for(const _0x4d4521 of _0x421259){_0x15cb2c[_0x3942a2(0xe5)](_0x3942a2(0xff)+path[_0x3942a2(0xec)](_0x5615b5,_0x4d4521));}}for(const _0x4f391c of _0xc748b4){_0x15cb2c['push']('\x20\x20??\x20'+_0x4f391c);}}return _0x15cb2c[_0x3942a2(0xec)]('\x0a');}function filterGitLog(_0x1ee88f){const _0x1b5fc0=a0_0x248295,_0x63327c=_0x1ee88f[_0x1b5fc0(0xe9)](_0x1b5fc0(0xe4))[_0x1b5fc0(0xd6)](_0x48edbd=>_0x48edbd[_0x1b5fc0(0x100)]())[_0x1b5fc0(0xd8)](_0x25b84b=>_0x25b84b[_0x1b5fc0(0xfa)]>0x0);if(_0x63327c[_0x1b5fc0(0xfa)]===0x0)return _0x1ee88f;const _0x4951c0=[];for(const _0x499814 of _0x63327c){const _0xac2f11=_0x499814[_0x1b5fc0(0xe9)]('\x0a'),_0x2b506a=_0xac2f11[0x0]||'',_0x157e9a=_0xac2f11[_0x1b5fc0(0xda)](0x1)['map'](_0x149799=>_0x149799[_0x1b5fc0(0x100)]())[_0x1b5fc0(0xd8)](_0x4490ce=>_0x4490ce[_0x1b5fc0(0xfa)]>0x0);_0x4951c0['push']('-\x20'+_0x2b506a),_0x157e9a['length']>0x0&&(_0x4951c0[_0x1b5fc0(0xe5)]('\x20\x20'+_0x157e9a[0x0]),_0x157e9a[_0x1b5fc0(0xfa)]>0x1&&_0x4951c0[_0x1b5fc0(0xe5)](_0x1b5fc0(0xf8)+(_0x157e9a[_0x1b5fc0(0xfa)]-0x1)+_0x1b5fc0(0xde)));}return _0x4951c0[_0x1b5fc0(0xec)]('\x0a');}function a0_0x4618(){const _0x1b5f4e=['substring','---','35994KdIvVg','666720wSCaNa','__importStar','174GSyymt','\x20\x20...\x20(+','filterGitDiff','length','replace','__createBinding','/\x20(','\x20untracked\x20files)','\x20\x20??\x20','trim','\x20more\x20modifications','map','391062fqgTpb','filter','*\x20Branch:\x20','slice','configurable','+++','67430DqSfvq','\x20lines\x20of\x20description)','startsWith','\x0aUntracked\x20files:','filterGitLog','1009625VbNOEd','defineProperty','---END---','push','__esModule','\x0aChanges:','903308Tdxkag','split','default','206489FBlSYX','join','\x20(+','\x20\x20...\x20+','hasOwnProperty','__setModuleDefault','path'];a0_0x4618=function(){return _0x1b5f4e;};return a0_0x4618();}function filterGitDiff(_0x3db1f8){const _0x1b29ce=a0_0x248295,_0x718229=_0x3db1f8[_0x1b29ce(0xe9)]('\x0a'),_0x4ffcd8=[];let _0xfc349a='',_0x1c3235=0x0,_0x4131db=0x0,_0x1fcc91=[];const _0x2e3ee6=()=>{const _0x3b07f3=_0x1b29ce;if(_0xfc349a&&(_0x1c3235>0x0||_0x4131db>0x0)){_0x4ffcd8[_0x3b07f3(0xe5)]('[file]\x20'+_0xfc349a+_0x3b07f3(0xed)+_0x1c3235+'\x20-'+_0x4131db+')');const _0x133c62=0xa,_0x4c374d=_0x1fcc91[_0x3b07f3(0xda)](0x0,_0x133c62);for(const _0x50e0f9 of _0x4c374d){_0x4ffcd8['push']('\x20\x20'+_0x50e0f9);}const _0x343e6e=_0x1c3235+_0x4131db-_0x133c62;_0x343e6e>0x0&&_0x4ffcd8[_0x3b07f3(0xe5)](_0x3b07f3(0xee)+_0x343e6e+_0x3b07f3(0x101));}_0x1c3235=0x0,_0x4131db=0x0,_0x1fcc91=[];};for(const _0x283e95 of _0x718229){if(_0x283e95[_0x1b29ce(0xdf)]('diff\x20--git')){_0x2e3ee6();const _0x54ebac=_0x283e95['match'](/\sb\/(.+)$/);_0xfc349a=_0x54ebac?_0x54ebac[0x1]:'unknown_file';}else{if(_0x283e95[_0x1b29ce(0xdf)]('+')&&!_0x283e95['startsWith'](_0x1b29ce(0xdc)))_0x1c3235++,_0x1fcc91['push'](_0x283e95);else _0x283e95['startsWith']('-')&&!_0x283e95[_0x1b29ce(0xdf)](_0x1b29ce(0xf3))&&(_0x4131db++,_0x1fcc91[_0x1b29ce(0xe5)](_0x283e95));}}_0x2e3ee6();const _0x21847c=_0x4ffcd8['join']('\x0a');return _0x21847c[_0x1b29ce(0xfa)]>0x0?_0x21847c:'No\x20modifications';}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0x1e5e(_0x13a6bd,_0x2f0d5a){const _0x1824a5=a0_0x1824();return a0_0x1e5e=function(_0x1e5ec1,_0xa0f518){_0x1e5ec1=_0x1e5ec1-0xd7;let _0x46e726=_0x1824a5[_0x1e5ec1];return _0x46e726;},a0_0x1e5e(_0x13a6bd,_0x2f0d5a);}const a0_0x3380fd=a0_0x1e5e;(function(_0x49eb95,_0x2e4d71){const _0x25a532=a0_0x1e5e,_0x1dcdc5=_0x49eb95();while(!![]){try{const _0x3a76aa=parseInt(_0x25a532(0xe0))/0x1+parseInt(_0x25a532(0xdb))/0x2+parseInt(_0x25a532(0xde))/0x3*(parseInt(_0x25a532(0xed))/0x4)+-parseInt(_0x25a532(0xda))/0x5*(parseInt(_0x25a532(0xe1))/0x6)+parseInt(_0x25a532(0xe5))/0x7*(-parseInt(_0x25a532(0xd8))/0x8)+parseInt(_0x25a532(0xd7))/0x9+-parseInt(_0x25a532(0xff))/0xa*(parseInt(_0x25a532(0xf9))/0xb);if(_0x3a76aa===_0x2e4d71)break;else _0x1dcdc5['push'](_0x1dcdc5['shift']());}catch(_0xf7a803){_0x1dcdc5['push'](_0x1dcdc5['shift']());}}}(a0_0x1824,0xa0875));function a0_0x1824(){const _0x3cb1d0=['PASS','startsWith','filter','===\x20RUN','push','1198510OgQhtG','match','4943214nYvzvy','24wPySkp','Go\x20vet:\x20no\x20issues\x20found','4595QZQLam','291556guvvvU','no\x20test\x20files','\x20more\x20failures','129HUPROi','lines','975686jWmKgD','4554ABdrhl','\x20\x20\x20\x20...\x20+','\x20more\x20lines','split','2329348QpLTdZ','slice','\x20passed,\x20','filterGoTest','includes','Go\x20test:\x20no\x20test\x20files','FAIL','\x20issues\x20found','108096JnZiiO','...\x20+','length','Go\x20test:\x20all\x20tests\x20passed','trim','join','\x20\x20...\x20+','\x20more\x20issues','name','\x20skipped','filterGoVet','Go\x20test:\x20','44MqimCc'];a0_0x1824=function(){return _0x3cb1d0;};return a0_0x1824();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x3380fd(0xe8)]=filterGoTest,exports[a0_0x3380fd(0xf7)]=filterGoVet;function filterGoTest(_0xa143dc){const _0x572dad=a0_0x3380fd,_0x30afda=_0xa143dc[_0x572dad(0xe4)]('\x0a');let _0x4b6db4=0x0,_0x22cecd=0x0,_0x57d1e4=0x0;const _0x2bf414=[],_0xfc44a4=[];let _0x30cbae=null;for(const _0x3fa0c0 of _0x30afda){const _0x35cd00=_0x3fa0c0[_0x572dad(0xf1)](),_0x447664=_0x35cd00[_0x572dad(0x100)](/^ok\s+\S+\s+[\d.]+s/);if(_0x447664){_0xfc44a4[_0x572dad(0xfe)](_0x35cd00);continue;}const _0x4ab77c=_0x35cd00[_0x572dad(0x100)](/^FAIL\s+\S+/);if(_0x4ab77c){_0xfc44a4[_0x572dad(0xfe)](_0x35cd00);continue;}const _0x36c869=_0x35cd00[_0x572dad(0x100)](/^--- PASS:/);if(_0x36c869){_0x4b6db4++;continue;}const _0x1f0240=_0x35cd00[_0x572dad(0x100)](/^--- FAIL:\s+(\S+)/);if(_0x1f0240){if(_0x30cbae)_0x2bf414[_0x572dad(0xfe)](_0x30cbae);_0x30cbae={'name':_0x1f0240[0x1],'lines':[]},_0x22cecd++;continue;}if(_0x35cd00[_0x572dad(0xfb)]('---\x20SKIP:')){_0x57d1e4++;continue;}_0x30cbae&&_0x35cd00[_0x572dad(0xef)]>0x0&&!_0x35cd00[_0x572dad(0xfb)](_0x572dad(0xfd))&&_0x30cbae[_0x572dad(0xdf)][_0x572dad(0xfe)](_0x3fa0c0),_0x35cd00[_0x572dad(0xfb)](_0x572dad(0xfd))&&(_0x30cbae&&(_0x2bf414[_0x572dad(0xfe)](_0x30cbae),_0x30cbae=null));}if(_0x30cbae)_0x2bf414[_0x572dad(0xfe)](_0x30cbae);if(_0x4b6db4===0x0&&_0x22cecd===0x0&&_0x57d1e4===0x0){if(_0xa143dc['includes'](_0x572dad(0xfa))&&!_0xa143dc['includes'](_0x572dad(0xeb)))return _0x572dad(0xf0);if(_0xa143dc[_0x572dad(0xe9)](_0x572dad(0xdc)))return _0x572dad(0xea);return _0xa143dc;}if(_0x22cecd===0x0){const _0x205214=[_0x572dad(0xf8)+_0x4b6db4+'\x20passed'];if(_0x57d1e4>0x0)_0x205214[_0x572dad(0xfe)](_0x57d1e4+_0x572dad(0xf6));return _0x205214[_0x572dad(0xf2)](',\x20');}const _0x30e619=[_0x572dad(0xf8)+_0x4b6db4+_0x572dad(0xe7)+_0x22cecd+'\x20failed,\x20'+_0x57d1e4+_0x572dad(0xf6)];if(_0x2bf414['length']>0x0){_0x30e619[_0x572dad(0xfe)]('\x0aFailures:');const _0x355e6d=0x3;for(let _0x4baabc=0x0;_0x4baabc<Math['min'](_0x2bf414['length'],_0x355e6d);_0x4baabc++){const _0x4fc34e=_0x2bf414[_0x4baabc];_0x30e619['push']('\x20\x20'+(_0x4baabc+0x1)+'.\x20'+_0x4fc34e[_0x572dad(0xf5)]);for(const _0x6d6869 of _0x4fc34e['lines'][_0x572dad(0xe6)](0x0,0x5)){_0x30e619['push']('\x20\x20\x20\x20'+_0x6d6869[_0x572dad(0xf1)]());}_0x4fc34e['lines']['length']>0x5&&_0x30e619[_0x572dad(0xfe)](_0x572dad(0xe2)+(_0x4fc34e[_0x572dad(0xdf)]['length']-0x5)+_0x572dad(0xe3));}_0x2bf414[_0x572dad(0xef)]>_0x355e6d&&_0x30e619[_0x572dad(0xfe)](_0x572dad(0xf3)+(_0x2bf414[_0x572dad(0xef)]-_0x355e6d)+_0x572dad(0xdd));}return _0x30e619[_0x572dad(0xf2)]('\x0a');}function filterGoVet(_0x41a37d){const _0xf4c830=a0_0x3380fd,_0xd60349=_0x41a37d[_0xf4c830(0xe4)]('\x0a')[_0xf4c830(0xfc)](_0x76873c=>_0x76873c[_0xf4c830(0xf1)]()[_0xf4c830(0xef)]>0x0);if(_0xd60349[_0xf4c830(0xef)]===0x0)return _0xf4c830(0xd9);if(_0xd60349[_0xf4c830(0xef)]<=0x14)return _0x41a37d['trim']();const _0x2c29d9=['Go\x20vet:\x20'+_0xd60349[_0xf4c830(0xef)]+_0xf4c830(0xec)];return _0x2c29d9[_0xf4c830(0xfe)](..._0xd60349['slice'](0x0,0xa)),_0xd60349[_0xf4c830(0xef)]>0xa&&_0x2c29d9[_0xf4c830(0xfe)](_0xf4c830(0xee)+(_0xd60349['length']-0xa)+_0xf4c830(0xf4)),_0x2c29d9[_0xf4c830(0xf2)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x35a65e=a0_0x433f;function a0_0x17a0(){const _0x2e0c42=['lastFeatures','filterJestVitest','\x20tree','trim\x20npx','filterDockerPs','[minified\x20file]','toLowerCase','[lock\x20file]','[binary','trim\x20ruff','match','pnpm\x20install','git\x20diff','18070XqzeRu','includes','filterRuff','npm\x20install','features_enabled','cargo\x20build','../tracker','filter','filterCargoBuild','trim\x20pytest','yadm\x20log','---','vitest','yarn\x20install','pytest','./python','cargo\x20check','defineProperty','filterGoTest','collapseDuplicates','pip\x20install','trim\x20gh','cargo\x20clippy','filterNpmInstall','endsWith','1112688GtqIwL','102151gymkiQ','redactWithAudit','lock','kubectl','filterDockerLogs','filterKubectl','npm\x20i','trim\x20read','filterCargoTest','filterCat','compressOutput','70746jLbSgJ','pattern','length','filterTree','ansi_strip','npm\x20i\x20','trim\x20tree','trim\x20npm','rewriteCommand','1ikZHjl','lastRedactAudit','npm\x20run\x20test','getConfig','trim\x20find','filterGitDiff','get','secretsFound','trim\x20pnpm','filterGrep','trim\x20grep','filterFind','24YzokUk','16DXoHId','./rust','yarn\x20test','trim','./go','387DNyFwJ','redactor','\x20ls','git\x20show','whitespace','secretTypes','go\x20vet','binary','trim\x20cargo','stripAnsi','yadm\x20status','trim\x20','1847197RgAvsL','go\x20test','redact','308548ndTRCt','text','test','softTruncate','./js','trim\x20glab','startsWith','ruff\x20check','tracker','cargo\x20test','pip3\x20install','yadm\x20diff','collapseWhitespace','trim\x20go','trim\x20kubectl','lines\x20truncated','push','../redactor','5VbMzLc','3186648YIKZpV','filterGitStatus','trim\x20pip','[code\x20skeleton]','filterPipInstall','./shell','trim\x20git','git\x20status','filterDockerImages','\x20tree\x20','npm\x20test','./git'];a0_0x17a0=function(){return _0x2e0c42;};return a0_0x17a0();}(function(_0x1c4c43,_0x3066ae){const _0x222ca7=a0_0x433f,_0x1719ad=_0x1c4c43();while(!![]){try{const _0x130c3a=parseInt(_0x222ca7(0x15f))/0x1*(-parseInt(_0x222ca7(0x156))/0x2)+-parseInt(_0x222ca7(0x14a))/0x3+parseInt(_0x222ca7(0x180))/0x4*(-parseInt(_0x222ca7(0x192))/0x5)+parseInt(_0x222ca7(0x193))/0x6+parseInt(_0x222ca7(0x14b))/0x7*(-parseInt(_0x222ca7(0x16c))/0x8)+-parseInt(_0x222ca7(0x171))/0x9*(parseInt(_0x222ca7(0x131))/0xa)+-parseInt(_0x222ca7(0x17d))/0xb*(-parseInt(_0x222ca7(0x16b))/0xc);if(_0x130c3a===_0x3066ae)break;else _0x1719ad['push'](_0x1719ad['shift']());}catch(_0x19ce99){_0x1719ad['push'](_0x1719ad['shift']());}}}(a0_0x17a0,0x438bd));Object[a0_0x35a65e(0x142)](exports,'__esModule',{'value':!![]}),exports[a0_0x35a65e(0x19f)]=exports[a0_0x35a65e(0x160)]=void 0x0,exports[a0_0x35a65e(0x155)]=compressOutput,exports[a0_0x35a65e(0x15e)]=rewriteCommand;const generic_1=require('./generic'),git_1=require(a0_0x35a65e(0x19e)),python_1=require(a0_0x35a65e(0x140)),js_1=require(a0_0x35a65e(0x184)),shell_1=require(a0_0x35a65e(0x198)),rust_1=require(a0_0x35a65e(0x16d)),go_1=require(a0_0x35a65e(0x170)),devops_1=require('./devops'),redactor_1=require(a0_0x35a65e(0x191)),tracker_1=require(a0_0x35a65e(0x137));exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x35a65e(0x19f)]=[];function isFeatureEnabled(_0x14aa75){const _0x330b1d=a0_0x35a65e;try{const _0x5ef6d6=tracker_1[_0x330b1d(0x188)][_0x330b1d(0x162)](),_0x29ddb9=_0x5ef6d6[_0x330b1d(0x135)];if(!_0x29ddb9||_0x29ddb9[_0x14aa75]===undefined)return!![];return _0x29ddb9[_0x14aa75]!==![];}catch{return!![];}}function compressOutput(_0x3465a3,_0x2a297e,_0x60532c,_0x3ed1be=!![]){const _0x3476fa=a0_0x35a65e,_0x54769d=_0x3465a3['trim']();let _0x3157d8=_0x2a297e;_0x60532c[_0x3476fa(0x16f)]()[_0x3476fa(0x158)]>0x0&&(_0x3157d8=_0x2a297e+'\x0a'+_0x60532c);let _0x86af51=isFeatureEnabled(_0x3476fa(0x15a))?(0x0,generic_1[_0x3476fa(0x17a)])(_0x3157d8):_0x3157d8;const _0x5d1ae9=[];if(_0x86af51[_0x3476fa(0x158)]<_0x3157d8[_0x3476fa(0x158)])_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x15a));const _0x55fcbe=(_0x50435e,_0x15318c)=>{const _0xe487bf=_0x3476fa;return _0x5d1ae9['push'](_0x50435e),exports[_0xe487bf(0x19f)]=_0x5d1ae9,_0x15318c;};if(_0x3ed1be&&isFeatureEnabled('redact')){const _0x22911a=redactor_1[_0x3476fa(0x172)][_0x3476fa(0x14c)](_0x86af51);_0x86af51=_0x22911a[_0x3476fa(0x181)],exports[_0x3476fa(0x160)]={'secretsFound':_0x22911a[_0x3476fa(0x166)],'secretTypes':_0x22911a[_0x3476fa(0x176)]};if(_0x22911a[_0x3476fa(0x166)]>0x0)_0x5d1ae9['push'](_0x3476fa(0x17f));}else exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};const _0x40dd85=_0x54769d[_0x3476fa(0x1a5)](),_0x5606a8=isFeatureEnabled(_0x3476fa(0x138));try{if(_0x5606a8){if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19a))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x17b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1[_0x3476fa(0x194)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)]('git\x20log')||_0x40dd85['includes'](_0x3476fa(0x13b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1['filterGitLog'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x130))||_0x40dd85['includes'](_0x3476fa(0x174))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x18b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1[_0x3476fa(0x164)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x13f))||_0x40dd85[_0x3476fa(0x1a9)](/python3?\s+-m\s+pytest/))return _0x55fcbe('filter',(0x0,python_1['filterPytest'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x145))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x18a)))return _0x55fcbe('filter',(0x0,python_1[_0x3476fa(0x197)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x187))||_0x40dd85[_0x3476fa(0x132)]('ruff\x20'))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x133)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x134))||_0x40dd85['includes'](_0x3476fa(0x15b))||_0x40dd85[_0x3476fa(0x149)](_0x3476fa(0x151))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x1aa))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x13e)))return _0x55fcbe(_0x3476fa(0x138),(0x0,js_1[_0x3476fa(0x148)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)]('jest')||_0x40dd85['includes'](_0x3476fa(0x13d)))return _0x55fcbe(_0x3476fa(0x138),(0x0,js_1[_0x3476fa(0x1a0)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19d))||_0x40dd85[_0x3476fa(0x132)]('pnpm\x20test')||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x16e))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x161)))return _0x55fcbe('filter',(0x0,js_1[_0x3476fa(0x1a0)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x189)))return _0x55fcbe(_0x3476fa(0x138),(0x0,rust_1[_0x3476fa(0x153)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x136))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x141))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x147)))return _0x55fcbe(_0x3476fa(0x138),(0x0,rust_1[_0x3476fa(0x139)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x17e)))return _0x55fcbe(_0x3476fa(0x138),(0x0,go_1[_0x3476fa(0x143)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x177)))return _0x55fcbe(_0x3476fa(0x138),(0x0,go_1['filterGoVet'])(_0x86af51));if(_0x40dd85['match'](/docker\s+ps/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x1a3)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/docker\s+images/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x19b)])(_0x86af51));if(_0x40dd85['match'](/docker\s+logs/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x14f)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x14e))){const _0x5b01d=_0x40dd85[_0x3476fa(0x1a9)](/kubectl\s+(get|logs|describe|apply)/),_0x20c95f=_0x5b01d?_0x5b01d[0x1]:_0x3476fa(0x165);return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x150)])(_0x86af51,_0x20c95f));}if(_0x40dd85[_0x3476fa(0x1a9)](/^(ls|dir)(\s|$)/)||_0x40dd85[_0x3476fa(0x132)]('\x20ls\x20')||_0x40dd85[_0x3476fa(0x149)](_0x3476fa(0x173)))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1['filterLs'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/^tree(\s|$)/)||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19c))||_0x40dd85['endsWith'](_0x3476fa(0x1a1)))return _0x55fcbe('filter',(0x0,shell_1[_0x3476fa(0x159)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x120f04=(0x0,shell_1[_0x3476fa(0x154)])(_0x86af51,_0x54769d);if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a6)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x14d));else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a7))||_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a4)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x178));else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x196)))_0x5d1ae9[_0x3476fa(0x190)]('skeleton');else{if(_0x120f04['includes']('|\x20')&&_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x13c))&&_0x120f04[_0x3476fa(0x158)]<_0x86af51[_0x3476fa(0x158)]*0.5)_0x5d1ae9[_0x3476fa(0x190)]('json_crusher');else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x18f)))_0x5d1ae9['push']('filter');}}}}if(_0x120f04[_0x3476fa(0x158)]<_0x86af51[_0x3476fa(0x158)]&&!_0x5d1ae9['some'](_0x3a176c=>_0x3a176c!==_0x3476fa(0x15a)&&_0x3a176c!==_0x3476fa(0x17f)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x138));return exports[_0x3476fa(0x19f)]=_0x5d1ae9,_0x120f04;}if(_0x40dd85[_0x3476fa(0x1a9)](/^find(\s|$)/))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1[_0x3476fa(0x16a)])(_0x86af51));if(_0x40dd85['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1[_0x3476fa(0x168)])(_0x86af51));}}catch(_0x3d4a7d){}return isFeatureEnabled(_0x3476fa(0x175))&&(_0x86af51=(0x0,generic_1[_0x3476fa(0x18c)])(_0x86af51),_0x5d1ae9[_0x3476fa(0x190)]('whitespace')),_0x86af51=(0x0,generic_1[_0x3476fa(0x144)])(_0x86af51),_0x86af51=(0x0,generic_1[_0x3476fa(0x183)])(_0x86af51,0x4e20),exports[_0x3476fa(0x19f)]=_0x5d1ae9,_0x86af51;}function a0_0x433f(_0x251644,_0xd0bf91){const _0x17a066=a0_0x17a0();return a0_0x433f=function(_0x433fe2,_0x5caf00){_0x433fe2=_0x433fe2-0x130;let _0x37cd99=_0x17a066[_0x433fe2];return _0x37cd99;},a0_0x433f(_0x251644,_0xd0bf91);}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x35a65e(0x199)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x35a65e(0x146)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x35a65e(0x185)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x35a65e(0x179)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x35a65e(0x167)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x35a65e(0x15d)},{'pattern':/^npx\s+/,'prefix':a0_0x35a65e(0x1a2)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x35a65e(0x152)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x35a65e(0x169)},{'pattern':/^ls(\s|$)/,'prefix':'trim\x20ls'},{'pattern':/^tree(\s|$)/,'prefix':a0_0x35a65e(0x15c)},{'pattern':/^find\s+/,'prefix':a0_0x35a65e(0x163)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x35a65e(0x18e)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x35a65e(0x13a)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x35a65e(0x1a8)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x35a65e(0x195)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x35a65e(0x18d)}];function rewriteCommand(_0x4aeee8){const _0x1b4eb1=a0_0x35a65e,_0x521519=_0x4aeee8[_0x1b4eb1(0x16f)]();if(_0x521519[_0x1b4eb1(0x186)](_0x1b4eb1(0x17c)))return _0x521519;for(const _0x594581 of REWRITE_RULES){if(_0x594581[_0x1b4eb1(0x157)][_0x1b4eb1(0x182)](_0x521519))return'trim\x20'+_0x521519;}return _0x521519;}
|
|
1
|
+
'use strict';const a0_0x13e196=a0_0xbc7d;function a0_0x36b3(){const _0x39a8eb=['pip\x20install','trim\x20go','816lEDqHU','cargo\x20build','softTruncate','cargo\x20test','../tracker','some','getConfig','trim\x20gh','filterPytest','32351fMWiPZ','[minified\x20file]','collapseDuplicates','163452KgCGRf','pnpm\x20test','vitest','npm\x20run\x20test','npm\x20i','cargo\x20clippy','324126JmdQIP','trim','secretsFound','30nikaLC','./go','pnpm\x20install','redactor','filterGoTest','filterNpmInstall','trim\x20pip','2yybIMh','stripAnsi','\x20ls','./shell','filterKubectl','513334RisOuM','filterGitDiff','length','./devops','trim\x20','defineProperty','7VWbrLO','npm\x20test','../redactor','features_enabled','499265goGAFR','trim\x20pnpm','filterDockerPs','push','lastRedactAudit','trim\x20docker','filterTree','text','2729016LxbSPu','includes','filterGitLog','ansi_strip','trim\x20glab','redact','[binary','trim\x20git','compressOutput','./git','filterDockerLogs','filterGoVet','binary','__esModule','pytest','---','match','filterGrep','filterGitStatus','2207742ZczBRx','\x20tree\x20','yadm\x20status','filterCargoTest','filterCat','yarn\x20install','trim\x20npx','trim\x20read','jest','24HAUkkp','git\x20diff','trim\x20grep','filterCargoBuild','startsWith','trim\x20ls','skeleton','go\x20vet','trim\x20kubectl','trim\x20cargo','yadm\x20log','./python','get','git\x20status','git\x20log','lastFeatures','cargo\x20check','pattern','npm\x20install','endsWith','kubectl','yarn\x20test','filter','toLowerCase','\x20ls\x20','trim\x20ruff','trim\x20tree'];a0_0x36b3=function(){return _0x39a8eb;};return a0_0x36b3();}(function(_0x5f3e5e,_0x333c7c){const _0x382113=a0_0xbc7d,_0x1f9349=_0x5f3e5e();while(!![]){try{const _0x106753=parseInt(_0x382113(0xc4))/0x1*(-parseInt(_0x382113(0xbf))/0x2)+parseInt(_0x382113(0xf2))/0x3*(parseInt(_0x382113(0x11b))/0x4)+-parseInt(_0x382113(0xce))/0x5+parseInt(_0x382113(0xe9))/0x6*(parseInt(_0x382113(0xca))/0x7)+parseInt(_0x382113(0xd6))/0x8+-parseInt(_0x382113(0xb5))/0x9*(parseInt(_0x382113(0xb8))/0xa)+-parseInt(_0x382113(0x118))/0xb*(-parseInt(_0x382113(0x10f))/0xc);if(_0x106753===_0x333c7c)break;else _0x1f9349['push'](_0x1f9349['shift']());}catch(_0x543039){_0x1f9349['push'](_0x1f9349['shift']());}}}(a0_0x36b3,0x7dabb));Object[a0_0x13e196(0xc9)](exports,a0_0x13e196(0xe3),{'value':!![]}),exports[a0_0x13e196(0x101)]=exports[a0_0x13e196(0xd2)]=void 0x0,exports[a0_0x13e196(0xde)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require('./generic'),git_1=require(a0_0x13e196(0xdf)),python_1=require(a0_0x13e196(0xfd)),js_1=require('./js'),shell_1=require(a0_0x13e196(0xc2)),rust_1=require('./rust'),go_1=require(a0_0x13e196(0xb9)),devops_1=require(a0_0x13e196(0xc7)),redactor_1=require(a0_0x13e196(0xcc)),tracker_1=require(a0_0x13e196(0x113));exports[a0_0x13e196(0xd2)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x13e196(0x101)]=[];function a0_0xbc7d(_0x4b3612,_0x5b2429){const _0x36b368=a0_0x36b3();return a0_0xbc7d=function(_0xbc7d52,_0x5b9983){_0xbc7d52=_0xbc7d52-0xb4;let _0x1a07ab=_0x36b368[_0xbc7d52];return _0x1a07ab;},a0_0xbc7d(_0x4b3612,_0x5b2429);}function isFeatureEnabled(_0x425a83){const _0x5d393b=a0_0x13e196;try{const _0x415826=tracker_1['tracker'][_0x5d393b(0x115)](),_0x2ac1cd=_0x415826[_0x5d393b(0xcd)];if(!_0x2ac1cd||_0x2ac1cd[_0x425a83]===undefined)return!![];return _0x2ac1cd[_0x425a83]!==![];}catch{return!![];}}function compressOutput(_0x17a6b9,_0x49e5cc,_0x4956ab,_0x39082=!![]){const _0x56deda=a0_0x13e196,_0x55f38e=_0x17a6b9[_0x56deda(0xb6)]();let _0x2d75cb=_0x49e5cc;_0x4956ab[_0x56deda(0xb6)]()[_0x56deda(0xc6)]>0x0&&(_0x2d75cb=_0x49e5cc+'\x0a'+_0x4956ab);let _0x4796d9=isFeatureEnabled(_0x56deda(0xd9))?(0x0,generic_1[_0x56deda(0xc0)])(_0x2d75cb):_0x2d75cb;const _0x1c3f8b=[];if(_0x4796d9[_0x56deda(0xc6)]<_0x2d75cb[_0x56deda(0xc6)])_0x1c3f8b['push'](_0x56deda(0xd9));const _0x596d36=(_0x11b129,_0x3a15d2)=>{const _0x4d4286=_0x56deda;return _0x1c3f8b[_0x4d4286(0xd1)](_0x11b129),exports[_0x4d4286(0x101)]=_0x1c3f8b,_0x3a15d2;};if(_0x39082&&isFeatureEnabled(_0x56deda(0xdb))){const _0x32d6c8=redactor_1[_0x56deda(0xbb)]['redactWithAudit'](_0x4796d9);_0x4796d9=_0x32d6c8[_0x56deda(0xd5)],exports['lastRedactAudit']={'secretsFound':_0x32d6c8[_0x56deda(0xb7)],'secretTypes':_0x32d6c8['secretTypes']};if(_0x32d6c8[_0x56deda(0xb7)]>0x0)_0x1c3f8b[_0x56deda(0xd1)](_0x56deda(0xdb));}else exports[_0x56deda(0xd2)]={'secretsFound':0x0,'secretTypes':[]};const _0x1cfaf0=_0x55f38e[_0x56deda(0x109)](),_0x568033=isFeatureEnabled('filter');try{if(_0x568033){if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xff))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xeb)))return _0x596d36(_0x56deda(0x108),(0x0,git_1[_0x56deda(0xe8)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x100))||_0x1cfaf0['includes'](_0x56deda(0xfc)))return _0x596d36('filter',(0x0,git_1[_0x56deda(0xd8)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xf3))||_0x1cfaf0[_0x56deda(0xd7)]('git\x20show')||_0x1cfaf0[_0x56deda(0xd7)]('yadm\x20diff'))return _0x596d36('filter',(0x0,git_1[_0x56deda(0xc5)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xe4))||_0x1cfaf0['match'](/python3?\s+-m\s+pytest/))return _0x596d36(_0x56deda(0x108),(0x0,python_1[_0x56deda(0x117)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x10d))||_0x1cfaf0[_0x56deda(0xd7)]('pip3\x20install'))return _0x596d36('filter',(0x0,python_1['filterPipInstall'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)]('ruff\x20check')||_0x1cfaf0[_0x56deda(0xd7)]('ruff\x20'))return _0x596d36('filter',(0x0,devops_1['filterRuff'])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0x104))||_0x1cfaf0[_0x56deda(0xd7)]('npm\x20i\x20')||_0x1cfaf0['endsWith'](_0x56deda(0x11f))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xba))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xee)))return _0x596d36('filter',(0x0,js_1[_0x56deda(0xbd)])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0xf1))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x11d)))return _0x596d36(_0x56deda(0x108),(0x0,js_1['filterJestVitest'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xcb))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x11c))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x107))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x11e)))return _0x596d36(_0x56deda(0x108),(0x0,js_1['filterJestVitest'])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0x112)))return _0x596d36(_0x56deda(0x108),(0x0,rust_1[_0x56deda(0xec)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x110))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x102))||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xb4)))return _0x596d36(_0x56deda(0x108),(0x0,rust_1[_0x56deda(0xf5)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)]('go\x20test'))return _0x596d36('filter',(0x0,go_1[_0x56deda(0xbc)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xf9)))return _0x596d36('filter',(0x0,go_1[_0x56deda(0xe1)])(_0x4796d9));if(_0x1cfaf0['match'](/docker\s+ps/))return _0x596d36(_0x56deda(0x108),(0x0,devops_1[_0x56deda(0xd0)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/docker\s+images/))return _0x596d36(_0x56deda(0x108),(0x0,devops_1['filterDockerImages'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/docker\s+logs/))return _0x596d36(_0x56deda(0x108),(0x0,devops_1[_0x56deda(0xe0)])(_0x4796d9));if(_0x1cfaf0['includes'](_0x56deda(0x106))){const _0x5257b7=_0x1cfaf0['match'](/kubectl\s+(get|logs|describe|apply)/),_0x5e18a7=_0x5257b7?_0x5257b7[0x1]:_0x56deda(0xfe);return _0x596d36(_0x56deda(0x108),(0x0,devops_1[_0x56deda(0xc3)])(_0x4796d9,_0x5e18a7));}if(_0x1cfaf0[_0x56deda(0xe6)](/^(ls|dir)(\s|$)/)||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0x10a))||_0x1cfaf0[_0x56deda(0x105)](_0x56deda(0xc1)))return _0x596d36(_0x56deda(0x108),(0x0,shell_1['filterLs'])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/^tree(\s|$)/)||_0x1cfaf0[_0x56deda(0xd7)](_0x56deda(0xea))||_0x1cfaf0[_0x56deda(0x105)]('\x20tree'))return _0x596d36(_0x56deda(0x108),(0x0,shell_1[_0x56deda(0xd4)])(_0x4796d9));if(_0x1cfaf0[_0x56deda(0xe6)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x5046fd=(0x0,shell_1[_0x56deda(0xed)])(_0x4796d9,_0x55f38e);if(_0x5046fd[_0x56deda(0xd7)]('[lock\x20file]'))_0x1c3f8b['push']('lock');else{if(_0x5046fd['includes'](_0x56deda(0xdc))||_0x5046fd[_0x56deda(0xd7)](_0x56deda(0x119)))_0x1c3f8b[_0x56deda(0xd1)](_0x56deda(0xe2));else{if(_0x5046fd[_0x56deda(0xd7)]('[code\x20skeleton]'))_0x1c3f8b['push'](_0x56deda(0xf8));else{if(_0x5046fd[_0x56deda(0xd7)]('|\x20')&&_0x5046fd[_0x56deda(0xd7)](_0x56deda(0xe5))&&_0x5046fd[_0x56deda(0xc6)]<_0x4796d9[_0x56deda(0xc6)]*0.5)_0x1c3f8b[_0x56deda(0xd1)]('json_crusher');else{if(_0x5046fd['includes']('lines\x20truncated'))_0x1c3f8b[_0x56deda(0xd1)]('filter');}}}}if(_0x5046fd[_0x56deda(0xc6)]<_0x4796d9[_0x56deda(0xc6)]&&!_0x1c3f8b[_0x56deda(0x114)](_0x3f1f34=>_0x3f1f34!=='ansi_strip'&&_0x3f1f34!==_0x56deda(0xdb)))_0x1c3f8b[_0x56deda(0xd1)](_0x56deda(0x108));return exports[_0x56deda(0x101)]=_0x1c3f8b,_0x5046fd;}if(_0x1cfaf0[_0x56deda(0xe6)](/^find(\s|$)/))return _0x596d36(_0x56deda(0x108),(0x0,shell_1['filterFind'])(_0x4796d9));if(_0x1cfaf0['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x596d36(_0x56deda(0x108),(0x0,shell_1[_0x56deda(0xe7)])(_0x4796d9));}}catch(_0x3c44c0){}return isFeatureEnabled('whitespace')&&(_0x4796d9=(0x0,generic_1['collapseWhitespace'])(_0x4796d9),_0x1c3f8b[_0x56deda(0xd1)]('whitespace')),_0x4796d9=(0x0,generic_1[_0x56deda(0x11a)])(_0x4796d9),_0x4796d9=(0x0,generic_1[_0x56deda(0x111)])(_0x4796d9,0x4e20),exports[_0x56deda(0x101)]=_0x1c3f8b,_0x4796d9;}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x13e196(0xdd)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x13e196(0x116)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x13e196(0xda)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x13e196(0xfb)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x13e196(0xcf)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':a0_0x13e196(0xef)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x13e196(0xf0)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x13e196(0xf4)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x13e196(0xf7)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x13e196(0x10c)},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x13e196(0xd3)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x13e196(0xfa)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':'trim\x20pytest'},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x13e196(0x10b)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x13e196(0xbe)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x13e196(0x10e)}];function rewriteCommand(_0x4e2f3b){const _0x31ef2c=a0_0x13e196,_0x326e98=_0x4e2f3b[_0x31ef2c(0xb6)]();if(_0x326e98[_0x31ef2c(0xf6)](_0x31ef2c(0xc8)))return _0x326e98;for(const _0xf16fa of REWRITE_RULES){if(_0xf16fa[_0x31ef2c(0x103)]['test'](_0x326e98))return _0x31ef2c(0xc8)+_0x326e98;}return _0x326e98;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x226caa=a0_0x3bde;(function(_0x2d6047,_0x30a3bb){const _0x2d59cf=a0_0x3bde,_0x531c1a=_0x2d6047();while(!![]){try{const _0x543c11=parseInt(_0x2d59cf(0x1d6))/0x1*(-parseInt(_0x2d59cf(0x1e2))/0x2)+parseInt(_0x2d59cf(0x1e5))/0x3+parseInt(_0x2d59cf(0x1e7))/0x4*(-parseInt(_0x2d59cf(0x1e6))/0x5)+-parseInt(_0x2d59cf(0x1d8))/0x6*(-parseInt(_0x2d59cf(0x1ed))/0x7)+parseInt(_0x2d59cf(0x1de))/0x8+-parseInt(_0x2d59cf(0x1e4))/0x9*(parseInt(_0x2d59cf(0x1d5))/0xa)+parseInt(_0x2d59cf(0x1ea))/0xb*(parseInt(_0x2d59cf(0x1cb))/0xc);if(_0x543c11===_0x30a3bb)break;else _0x531c1a['push'](_0x531c1a['shift']());}catch(_0x2ce68b){_0x531c1a['push'](_0x531c1a['shift']());}}}(a0_0x50b6,0x7102f));function a0_0x3bde(_0x17b14e,_0x41438d){const _0x50b65f=a0_0x50b6();return a0_0x3bde=function(_0x3bdeec,_0x219e14){_0x3bdeec=_0x3bdeec-0x1c8;let _0x222c01=_0x50b65f[_0x3bdeec];return _0x222c01;},a0_0x3bde(_0x17b14e,_0x41438d);}Object['defineProperty'](exports,a0_0x226caa(0x1e3),{'value':!![]}),exports['filterNpmInstall']=filterNpmInstall,exports[a0_0x226caa(0x1d1)]=filterJestVitest;function filterNpmInstall(_0x42f724){const _0x5e7ba4=a0_0x226caa,_0x2789a9=_0x42f724[_0x5e7ba4(0x1e9)](/\r/g,'\x0a'),_0x4416f5=_0x2789a9[_0x5e7ba4(0x1da)]('\x0a'),_0x3754ea=[];for(const _0x1a4bc7 of _0x4416f5){const _0x54c48b=_0x1a4bc7[_0x5e7ba4(0x1d0)]();(_0x54c48b[_0x5e7ba4(0x1c8)](_0x5e7ba4(0x1c9))||_0x54c48b['includes'](_0x5e7ba4(0x1db))||_0x54c48b[_0x5e7ba4(0x1c8)](_0x5e7ba4(0x1e8))||_0x54c48b['includes'](_0x5e7ba4(0x1ec))||_0x54c48b[_0x5e7ba4(0x1c8)](_0x5e7ba4(0x1dd)))&&(!_0x54c48b['includes']('%')&&!_0x54c48b[_0x5e7ba4(0x1ca)]('⠋')&&!_0x54c48b[_0x5e7ba4(0x1ca)]('⠙')&&_0x3754ea['push'](_0x54c48b));}const _0x5c3575=_0x3754ea[_0x5e7ba4(0x1d7)]('\x0a')[_0x5e7ba4(0x1d0)]();return _0x5c3575[_0x5e7ba4(0x1d9)]>0x0?_0x5c3575:_0x5e7ba4(0x1cd);}function a0_0x50b6(){const _0x2dfe1e=['1702KWEBNa','__esModule','27hrLgcP','2352972vowoQl','30AsLzQj','525484PsEGJO','audited\x20','replace','5617139vQpXlc','\x20total)','up\x20to\x20date','122066zQEoZg','includes','added\x20','startsWith','12fUcBQO','\x20passed','NPM:\x20Packages\x20verified/installed\x20successfully','all','\x20\x20...\x20(','trim','filterJestVitest','Test\x20Runner:\x20','match','push','1287570OmMxlI','647yczbbt','join','192ekKPle','length','split','removed\x20','Tests:','found\x20','2680000lnNHUu','FAIL','\x20passed,\x20','slice'];a0_0x50b6=function(){return _0x2dfe1e;};return a0_0x50b6();}function filterJestVitest(_0x44447e){const _0x2f610f=a0_0x226caa,_0x31d87e=_0x44447e[_0x2f610f(0x1da)]('\x0a');let _0x138596=0x0,_0x100aab=0x0,_0x46ced3=0x0;const _0x2dc6ec=[];let _0x79ec27=![];for(const _0x5c9656 of _0x31d87e){const _0x570ff0=_0x5c9656[_0x2f610f(0x1d0)]();if(_0x570ff0[_0x2f610f(0x1ca)](_0x2f610f(0x1dc))||_0x570ff0[_0x2f610f(0x1c8)]('Test\x20Files:')){const _0x52924e=_0x570ff0['match'](/(\d+)\s+passed/),_0x4cf17e=_0x570ff0[_0x2f610f(0x1d3)](/(\d+)\s+failed/),_0x1d2950=_0x570ff0['match'](/(\d+)\s+total/);if(_0x52924e)_0x138596=parseInt(_0x52924e[0x1]);if(_0x4cf17e)_0x100aab=parseInt(_0x4cf17e[0x1]);if(_0x1d2950)_0x46ced3=parseInt(_0x1d2950[0x1]);continue;}(_0x570ff0[_0x2f610f(0x1ca)]('❯')||_0x570ff0['startsWith']('●')||_0x570ff0['startsWith']('FAIL\x20\x20'))&&(_0x79ec27=!![]),_0x79ec27&&(_0x570ff0[_0x2f610f(0x1d9)]>0x0&&!_0x570ff0[_0x2f610f(0x1ca)]('Test\x20Suites:')&&!_0x570ff0[_0x2f610f(0x1ca)](_0x2f610f(0x1dc))&&_0x2dc6ec['push'](_0x5c9656));}if(_0x46ced3===0x0&&_0x138596===0x0&&_0x100aab===0x0){if(_0x44447e['includes']('PASS')&&!_0x44447e[_0x2f610f(0x1c8)](_0x2f610f(0x1df))){const _0xb9096b=_0x44447e['match'](/(\d+)\s+passed/),_0x37c1f5=_0xb9096b?_0xb9096b[0x1]:_0x2f610f(0x1ce);return _0x2f610f(0x1d2)+_0x37c1f5+_0x2f610f(0x1cc);}return _0x44447e;}if(_0x100aab===0x0&&_0x138596>0x0)return _0x2f610f(0x1d2)+_0x138596+_0x2f610f(0x1cc);const _0xc9490b=[_0x2f610f(0x1d2)+_0x138596+_0x2f610f(0x1e0)+_0x100aab+'\x20failed\x20('+_0x46ced3+_0x2f610f(0x1eb)];if(_0x2dc6ec[_0x2f610f(0x1d9)]>0x0){_0xc9490b['push']('\x0aFailures:');const _0x26d2fc=0x19,_0x31d814=_0x2dc6ec[_0x2f610f(0x1e1)](0x0,_0x26d2fc);for(const _0x5e263d of _0x31d814){_0xc9490b[_0x2f610f(0x1d4)]('\x20\x20'+_0x5e263d);}_0x2dc6ec['length']>_0x26d2fc&&_0xc9490b[_0x2f610f(0x1d4)](_0x2f610f(0x1cf)+(_0x2dc6ec[_0x2f610f(0x1d9)]-_0x26d2fc)+'\x20lines\x20of\x20trace\x20details\x20truncated)');}return _0xc9490b[_0x2f610f(0x1d7)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3c517f=a0_0x1107;(function(_0x42ba2b,_0x12f102){const _0x4a95e8=a0_0x1107,_0x21032a=_0x42ba2b();while(!![]){try{const _0x4b42e8=parseInt(_0x4a95e8(0xbd))/0x1*(parseInt(_0x4a95e8(0xae))/0x2)+parseInt(_0x4a95e8(0xd7))/0x3+-parseInt(_0x4a95e8(0xcf))/0x4*(parseInt(_0x4a95e8(0xcb))/0x5)+parseInt(_0x4a95e8(0xd4))/0x6*(-parseInt(_0x4a95e8(0xaf))/0x7)+-parseInt(_0x4a95e8(0xb9))/0x8+-parseInt(_0x4a95e8(0xc7))/0x9*(-parseInt(_0x4a95e8(0xb2))/0xa)+parseInt(_0x4a95e8(0xd6))/0xb;if(_0x4b42e8===_0x12f102)break;else _0x21032a['push'](_0x21032a['shift']());}catch(_0x592744){_0x21032a['push'](_0x21032a['shift']());}}}(a0_0xb297,0xeb310));function a0_0x1107(_0x597f45,_0x471398){const _0xb297d3=a0_0xb297();return a0_0x1107=function(_0x110768,_0x48997b){_0x110768=_0x110768-0xa7;let _0x1c458b=_0xb297d3[_0x110768];return _0x1c458b;},a0_0x1107(_0x597f45,_0x471398);}function a0_0xb297(){const _0x33ae19=['20660bbUXfC','Successfully\x20installed','Requirement\x20already\x20satisfied','\x20lines\x20of\x20stacktrace\x20truncated)','1032TniJQx','\x20passed','\x20failed','Pytest:\x20All\x20tests\x20passed','startsWith','4294284YPJzEj','filterPipInstall','20256005xwJlfG','4870395aBlXKK','length','===\x20FAILURES\x20===','join','Pytest:\x20','includes','===\x20short\x20test\x20summary\x20info\x20===','\x20in\x20','46HwGLIs','7JQrEkV','===','___','2050rcoZks','AssertionError:','filter','slice','split','\x20xfailed','push','9078808kkTaIq','match','Collecting','\x20more\x20failures\x20truncated','11735bFxfqu','replace','trim','\x20\x20\x20\x20...\x20(','passed','===\x20ERRORS\x20===','defineProperty','Downloading','\x20\x20\x20\x20','.py:','6372DBazlV','\x0aFailures:','\x20xpassed\x20(warning!)','filterPytest'];a0_0xb297=function(){return _0x33ae19;};return a0_0xb297();}Object[a0_0x3c517f(0xc3)](exports,'__esModule',{'value':!![]}),exports[a0_0x3c517f(0xca)]=filterPytest,exports[a0_0x3c517f(0xd5)]=filterPipInstall;function filterPytest(_0x408903){const _0x15e0b4=a0_0x3c517f,_0x4d316e=_0x408903['split']('\x0a');let _0x1bd81c=0x0,_0x1df204=0x0,_0x332ad7=0x0,_0x161792=0x0,_0x2f72a8=0x0;const _0x4462ac=[];let _0x5b83c1=[],_0x549e5a=![];for(const _0x13625a of _0x4d316e){const _0x271703=_0x13625a[_0x15e0b4(0xbf)]();if(_0x271703[_0x15e0b4(0xd3)](_0x15e0b4(0xa8))||_0x271703['startsWith'](_0x15e0b4(0xc2))){_0x549e5a=!![];continue;}else(_0x271703['startsWith'](_0x15e0b4(0xac))||_0x271703['startsWith'](_0x15e0b4(0xb0))&&_0x271703[_0x15e0b4(0xab)](_0x15e0b4(0xc1)))&&(_0x549e5a=![],_0x5b83c1['length']>0x0&&(_0x4462ac['push'](_0x5b83c1),_0x5b83c1=[]));if(_0x549e5a){if(_0x271703[_0x15e0b4(0xd3)](_0x15e0b4(0xb1)))_0x5b83c1[_0x15e0b4(0xa7)]>0x0&&(_0x4462ac[_0x15e0b4(0xb8)](_0x5b83c1),_0x5b83c1=[]),_0x5b83c1[_0x15e0b4(0xb8)](_0x271703);else _0x271703[_0x15e0b4(0xa7)]>0x0&&_0x5b83c1[_0x15e0b4(0xb8)](_0x13625a);continue;}if(_0x271703[_0x15e0b4(0xd3)](_0x15e0b4(0xb0))&&_0x271703[_0x15e0b4(0xab)](_0x15e0b4(0xad))){const _0x43c567=_0x271703[_0x15e0b4(0xba)](/(\d+)\s+passed/),_0x4a0616=_0x271703[_0x15e0b4(0xba)](/(\d+)\s+failed/),_0xdfae57=_0x271703[_0x15e0b4(0xba)](/(\d+)\s+skipped/),_0x198830=_0x271703[_0x15e0b4(0xba)](/(\d+)\s+xfailed/),_0x37c880=_0x271703[_0x15e0b4(0xba)](/(\d+)\s+xpassed/);if(_0x43c567)_0x1bd81c=parseInt(_0x43c567[0x1]);if(_0x4a0616)_0x1df204=parseInt(_0x4a0616[0x1]);if(_0xdfae57)_0x332ad7=parseInt(_0xdfae57[0x1]);if(_0x198830)_0x161792=parseInt(_0x198830[0x1]);if(_0x37c880)_0x2f72a8=parseInt(_0x37c880[0x1]);}}_0x5b83c1['length']>0x0&&_0x4462ac['push'](_0x5b83c1);if(_0x1bd81c===0x0&&_0x1df204===0x0&&_0x332ad7===0x0&&_0x161792===0x0&&_0x2f72a8===0x0){if(_0x408903[_0x15e0b4(0xab)](_0x15e0b4(0xc1))&&!_0x408903[_0x15e0b4(0xab)]('failed'))return _0x15e0b4(0xd2);return _0x408903;}if(_0x1df204===0x0&&_0x1bd81c>0x0&&_0x332ad7===0x0&&_0x161792===0x0&&_0x2f72a8===0x0)return'Pytest:\x20'+_0x1bd81c+_0x15e0b4(0xd0);const _0x2874cf=[];_0x2874cf[_0x15e0b4(0xb8)](_0x15e0b4(0xaa)+_0x1bd81c+_0x15e0b4(0xd0));if(_0x1df204>0x0)_0x2874cf['push'](_0x1df204+_0x15e0b4(0xd1));if(_0x332ad7>0x0)_0x2874cf[_0x15e0b4(0xb8)](_0x332ad7+'\x20skipped');if(_0x161792>0x0)_0x2874cf['push'](_0x161792+_0x15e0b4(0xb7));if(_0x2f72a8>0x0)_0x2874cf[_0x15e0b4(0xb8)](_0x2f72a8+_0x15e0b4(0xc9));const _0x21ca02=[_0x2874cf['join'](',\x20')];if(_0x4462ac[_0x15e0b4(0xa7)]>0x0){_0x21ca02[_0x15e0b4(0xb8)](_0x15e0b4(0xc8));const _0x284e31=0x3,_0xd7413f=_0x4462ac[_0x15e0b4(0xb5)](0x0,_0x284e31);for(let _0x5b3603=0x0;_0x5b3603<_0xd7413f['length'];_0x5b3603++){const _0x5c4a2f=_0xd7413f[_0x5b3603],_0x3e5e3e=_0x5c4a2f[0x0][_0x15e0b4(0xbe)](/_/g,'')[_0x15e0b4(0xbf)]();_0x21ca02['push']('\x20\x20'+(_0x5b3603+0x1)+'.\x20[FAIL]\x20'+_0x3e5e3e);const _0x196346=_0x5c4a2f['slice'](0x1),_0x4396bd=_0x196346[_0x15e0b4(0xb4)](_0x13f162=>{const _0x57440e=_0x15e0b4,_0x4d19cd=_0x13f162[_0x57440e(0xbf)]();return _0x4d19cd[_0x57440e(0xd3)]('>')||_0x4d19cd['startsWith']('E\x20\x20\x20')||_0x4d19cd[_0x57440e(0xab)](_0x57440e(0xc6))||_0x4d19cd['includes'](_0x57440e(0xb3));});for(const _0x742745 of _0x4396bd[_0x15e0b4(0xb5)](0x0,0x8)){_0x21ca02[_0x15e0b4(0xb8)](_0x15e0b4(0xc5)+_0x742745);}_0x4396bd['length']>0x8&&_0x21ca02[_0x15e0b4(0xb8)](_0x15e0b4(0xc0)+(_0x4396bd[_0x15e0b4(0xa7)]-0x8)+_0x15e0b4(0xce));}_0x4462ac[_0x15e0b4(0xa7)]>_0x284e31&&_0x21ca02[_0x15e0b4(0xb8)]('\x20\x20...\x20+'+(_0x4462ac[_0x15e0b4(0xa7)]-_0x284e31)+_0x15e0b4(0xbc));}return _0x21ca02[_0x15e0b4(0xa9)]('\x0a');}function filterPipInstall(_0x3cebd6){const _0x2de8b4=a0_0x3c517f,_0x514f59=_0x3cebd6[_0x2de8b4(0xb6)]('\x0a'),_0xce4b41=[];for(const _0x246048 of _0x514f59){const _0x52a645=_0x246048[_0x2de8b4(0xbf)]();_0x52a645['startsWith'](_0x2de8b4(0xcc))&&_0xce4b41['push'](_0x52a645);}if(_0xce4b41[_0x2de8b4(0xa7)]>0x0)return _0xce4b41[_0x2de8b4(0xa9)]('\x0a');return _0x514f59['filter'](_0x3233ce=>{const _0x136811=_0x2de8b4,_0x2bfb78=_0x3233ce['trim']();return!_0x2bfb78[_0x136811(0xd3)](_0x136811(0xbb))&&!_0x2bfb78[_0x136811(0xd3)](_0x136811(0xc4))&&!_0x2bfb78[_0x136811(0xab)]('Using\x20cached')&&!_0x2bfb78[_0x136811(0xd3)](_0x136811(0xcd));})[_0x2de8b4(0xa9)]('\x0a')[_0x2de8b4(0xbf)]();}
|