trimprompt 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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 +2 -2
- 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_0x382bb0=a0_0x95d6;(function(_0x3676a0,_0xefe9ba){const _0x22e6cb=a0_0x95d6,_0x46f4a4=_0x3676a0();while(!![]){try{const _0x118455=-parseInt(_0x22e6cb(0x1f0))/0x1+-parseInt(_0x22e6cb(0x1dc))/0x2*(parseInt(_0x22e6cb(0x22a))/0x3)+parseInt(_0x22e6cb(0x178))/0x4+parseInt(_0x22e6cb(0x18d))/0x5+-parseInt(_0x22e6cb(0x180))/0x6*(-parseInt(_0x22e6cb(0x1bd))/0x7)+parseInt(_0x22e6cb(0x1a6))/0x8*(-parseInt(_0x22e6cb(0x1bb))/0x9)+parseInt(_0x22e6cb(0x216))/0xa;if(_0x118455===_0xefe9ba)break;else _0x46f4a4['push'](_0x46f4a4['shift']());}catch(_0x22d3de){_0x46f4a4['push'](_0x46f4a4['shift']());}}}(a0_0x1700,0xcde4a));var __createBinding=this&&this[a0_0x382bb0(0x18f)]||(Object['create']?function(_0xf620fe,_0x98542b,_0x388ea0,_0x17b16d){const _0x2938c8=a0_0x382bb0;if(_0x17b16d===undefined)_0x17b16d=_0x388ea0;var _0x36d1d0=Object[_0x2938c8(0x1ad)](_0x98542b,_0x388ea0);(!_0x36d1d0||('get'in _0x36d1d0?!_0x98542b[_0x2938c8(0x17f)]:_0x36d1d0[_0x2938c8(0x1bf)]||_0x36d1d0[_0x2938c8(0x188)]))&&(_0x36d1d0={'enumerable':!![],'get':function(){return _0x98542b[_0x388ea0];}}),Object[_0x2938c8(0x233)](_0xf620fe,_0x17b16d,_0x36d1d0);}:function(_0x164e56,_0x302ead,_0x143120,_0x4e4e75){if(_0x4e4e75===undefined)_0x4e4e75=_0x143120;_0x164e56[_0x4e4e75]=_0x302ead[_0x143120];}),__setModuleDefault=this&&this[a0_0x382bb0(0x1d5)]||(Object['create']?function(_0x46baba,_0x4f074a){const _0x37af76=a0_0x382bb0;Object['defineProperty'](_0x46baba,_0x37af76(0x1f3),{'enumerable':!![],'value':_0x4f074a});}:function(_0x5298fb,_0x4a3192){_0x5298fb['default']=_0x4a3192;}),__importStar=this&&this[a0_0x382bb0(0x1e2)]||(function(){var _0x1b1ff1=function(_0x13e554){const _0x21459e=a0_0x95d6;return _0x1b1ff1=Object[_0x21459e(0x191)]||function(_0x27b3ab){const _0x257a47=_0x21459e;var _0xc3f42=[];for(var _0x21a119 in _0x27b3ab)if(Object[_0x257a47(0x1c9)]['hasOwnProperty'][_0x257a47(0x1a4)](_0x27b3ab,_0x21a119))_0xc3f42[_0xc3f42['length']]=_0x21a119;return _0xc3f42;},_0x1b1ff1(_0x13e554);};return function(_0x502d43){const _0x4ea7cf=a0_0x95d6;if(_0x502d43&&_0x502d43[_0x4ea7cf(0x17f)])return _0x502d43;var _0x53d037={};if(_0x502d43!=null){for(var _0x1a6bcf=_0x1b1ff1(_0x502d43),_0x55f383=0x0;_0x55f383<_0x1a6bcf[_0x4ea7cf(0x222)];_0x55f383++)if(_0x1a6bcf[_0x55f383]!=='default')__createBinding(_0x53d037,_0x502d43,_0x1a6bcf[_0x55f383]);}return __setModuleDefault(_0x53d037,_0x502d43),_0x53d037;};}());function a0_0x1700(){const _0x412f9d=['stringify','image_','Unsupported\x20format\x20\x27','build','node_modules','1458109ntRRbr','writeFileSync','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','default','.lock','platform','renameSync','filter','compaction\x20failed','type','saveSessionStateItem','matchAll','\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)','existsSync','object','lineCount','system','venv','User','Startup','Microsoft','.openclaw','replace','watch','out','startsWith','Roaming','parse','compact:','tracker','raw_tokens','saveChunk','modified','.jpeg','gemini','trim','.venv','history','2550090IxLcVu','live-conv','processSessionFile','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','.json','ceil','saveConfig','round','.aider.chat.history.md','cursor','dirname','get','length','File\x20not\x20found','.trimprompt','sideCacheSaved','.wal','.shm','storage','endsWith','3yshsKC','compact_copy','toLowerCase','text','loadSessionsState','cli.js','find','installWindowsStartupService','utf8','defineProperty','Summary:\x20Tool\x20result\x20offloaded\x20(','autoCompactSaved','set','4695000wzHaFe','sessions','TrimPrompt\x20Cache\x20Engine','github-copilot-cli','split','Library','codex','__esModule','1985262ihfqNs','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','./hooks/claude-hook','opencode','.jsonl','size','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','Summary:\x20Text\x20block\x20offloaded\x20(','configurable','officialCompactSaved','conversation_toggles','isDirectory','push','3851640KGCbMG','compressed_tokens','__createBinding','assign','getOwnPropertyNames','hookSavedTokens','content','mtimeMs','conv:','readFileSync','.config','.json1','.next','openclaw','logExecution','cwd','dist','Cursor','config.json','.webp','.tmp','conv_','Gemini','call','Session\x20file\x20not\x20found','1788664wRHlgk','\x20tokens).','.gemini','projects','.vscdb','loadConfig','join','getOwnPropertyDescriptor','tokens','string','byteLength','.png','toISOString','homedir','saved','env','Windows','copilot','context','AppData','name','45pfIXOz','readdirSync','35LlVBVx','Application\x20Support','writable','has','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','max','Start\x20Menu','includes','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','chunk_id','win32','path','prototype','compactLiveSession','.db','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','messages','claude','workspaceStorage','antigravity','prompt_turn','role','statSync','./proxy-conv','__setModuleDefault','.jpg','message','mkdirSync','TrimPromptDaemon.vbs','./tracker','custom_storage_paths','868220HqUQCT','.compact','basename','savedTokens','Codex','.codex','__importStar','Unsupported\x20extension','Compaction\x20failed','fullPath','.agents','cortex','Local','aider','isArray'];a0_0x1700=function(){return _0x412f9d;};return a0_0x1700();}Object[a0_0x382bb0(0x233)](exports,a0_0x382bb0(0x17f),{'value':!![]}),exports[a0_0x382bb0(0x1ab)]=loadConfig,exports[a0_0x382bb0(0x21c)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports['getLatestSessionFile']=getLatestSessionFile,exports[a0_0x382bb0(0x22e)]=loadSessionsState,exports[a0_0x382bb0(0x1fa)]=saveSessionStateItem,exports[a0_0x382bb0(0x218)]=processSessionFile,exports['compactSessionCopy']=compactSessionCopy,exports[a0_0x382bb0(0x1ca)]=compactLiveSession,exports[a0_0x382bb0(0x231)]=installWindowsStartupService,exports['startWatcherDaemon']=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x382bb0(0x1c8))),os=__importStar(require('os')),cache_manager_1=require('./cache-manager'),tracker_1=require(a0_0x382bb0(0x1da)),baseDir=path[a0_0x382bb0(0x1ac)](os['homedir'](),a0_0x382bb0(0x224)),configPath=path[a0_0x382bb0(0x1ac)](baseDir,a0_0x382bb0(0x19f)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function a0_0x95d6(_0x3efb21,_0x35fba5){const _0x17000b=a0_0x1700();return a0_0x95d6=function(_0x95d6a1,_0xc0e85a){_0x95d6a1=_0x95d6a1-0x175;let _0x336d82=_0x17000b[_0x95d6a1];return _0x336d82;},a0_0x95d6(_0x3efb21,_0x35fba5);}function loadConfig(){const _0x319779=a0_0x382bb0;try{if(!fs[_0x319779(0x1fd)](baseDir))fs[_0x319779(0x1d8)](baseDir,{'recursive':!![]});if(fs[_0x319779(0x1fd)](configPath)){const _0x499bd6=JSON[_0x319779(0x20b)](fs['readFileSync'](configPath,_0x319779(0x232)));return{...DEFAULT_CONFIG,..._0x499bd6,'conversation_toggles':{...DEFAULT_CONFIG[_0x319779(0x18a)],..._0x499bd6[_0x319779(0x18a)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x499bd6[_0x319779(0x1db)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0xe7c82e){const _0x34a5f2=a0_0x382bb0,_0xb2e93c=loadConfig(),_0x4d7af4={..._0xb2e93c,..._0xe7c82e,'conversation_toggles':{..._0xb2e93c[_0x34a5f2(0x18a)],..._0xe7c82e[_0x34a5f2(0x18a)]||{}},'custom_storage_paths':{..._0xb2e93c[_0x34a5f2(0x1db)],..._0xe7c82e['custom_storage_paths']||{}}};try{if(!fs[_0x34a5f2(0x1fd)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x34a5f2(0x1f1)](configPath,JSON['stringify'](_0x4d7af4,null,0x2),_0x34a5f2(0x232));}catch{}return _0x4d7af4;}function getAgentStoragePaths(_0x528273){const _0x532681=a0_0x382bb0,_0x45ffbd=loadConfig(),_0x261dbe=_0x45ffbd[_0x532681(0x1db)][_0x528273];if(_0x261dbe&&fs[_0x532681(0x1fd)](_0x261dbe))return[_0x261dbe];const _0x280dba=os[_0x532681(0x1b3)](),_0x45c6b1=process[_0x532681(0x1f5)]===_0x532681(0x1c7),_0x15239c=process[_0x532681(0x1f5)]==='darwin';switch(_0x528273){case _0x532681(0x1ce):return[path[_0x532681(0x1ac)](_0x280dba,'.claude',_0x532681(0x1a9)),path[_0x532681(0x1ac)](_0x280dba,'.claude',_0x532681(0x215))];case _0x532681(0x17e):return[path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x1e1),_0x532681(0x179)),path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x1b9),_0x532681(0x20a),_0x532681(0x1e0))];case'gemini':case'antigravity':return[path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x1a8),_0x532681(0x1d0)),path[_0x532681(0x1ac)](_0x280dba,'.gemini'),path['join'](_0x280dba,'AppData','Roaming',_0x532681(0x1a3)),path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x197),_0x532681(0x212))];case _0x532681(0x21f):if(_0x45c6b1)return[path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x1b9),'Roaming','Cursor',_0x532681(0x202),_0x532681(0x1cf))];if(_0x15239c)return[path['join'](_0x280dba,_0x532681(0x17d),_0x532681(0x1be),_0x532681(0x19e),_0x532681(0x202),_0x532681(0x1cf))];return[path['join'](_0x280dba,_0x532681(0x197),'Cursor',_0x532681(0x202),_0x532681(0x1cf))];case _0x532681(0x1e9):return[process[_0x532681(0x19c)](),path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x21e))];case _0x532681(0x1b7):if(_0x45c6b1)return[path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x1b9),_0x532681(0x1e8),_0x532681(0x17b))];return[path[_0x532681(0x1ac)](_0x280dba,_0x532681(0x197),_0x532681(0x17b))];case _0x532681(0x19a):return[path[_0x532681(0x1ac)](_0x280dba,'.openclaw',_0x532681(0x228)),path[_0x532681(0x1ac)](process[_0x532681(0x19c)](),_0x532681(0x205),_0x532681(0x1b8))];case _0x532681(0x183):return[path[_0x532681(0x1ac)](_0x280dba,'.opencode',_0x532681(0x179))];case'cortex':return[path[_0x532681(0x1ac)](_0x280dba,'.cortex','cache')];default:return[];}}function getLatestSessionFile(_0x3f2eba){const _0x5110d2=a0_0x382bb0,_0x4d6968=getAgentStoragePaths(_0x3f2eba);let _0x5a7170=null,_0x3e526e=0x0,_0x3e45f8=null,_0x261f11=null;for(const _0x2a4052 of _0x4d6968){if(fs[_0x5110d2(0x1fd)](_0x2a4052)){if(!_0x261f11)_0x261f11=_0x2a4052;const _0x36e945=(_0x39a661,_0x41be5e=0x0)=>{const _0x197080=_0x5110d2;if(_0x41be5e>0x6)return;try{const _0x118f2d=fs[_0x197080(0x1bc)](_0x39a661,{'withFileTypes':!![]});for(const _0x257988 of _0x118f2d){const _0x4e9b53=path[_0x197080(0x1ac)](_0x39a661,_0x257988[_0x197080(0x1ba)]);if(_0x257988[_0x197080(0x18b)]()){const _0x3b4a61=_0x257988[_0x197080(0x1ba)][_0x197080(0x22c)]();if(_0x3b4a61===_0x197080(0x1ef)||_0x3b4a61==='.git'||_0x3b4a61===_0x197080(0x214)||_0x3b4a61===_0x197080(0x1b5)||_0x3b4a61===_0x197080(0x201)||_0x3b4a61==='__pycache__'||_0x3b4a61===_0x197080(0x199)||_0x3b4a61===_0x197080(0x19d)||_0x3b4a61===_0x197080(0x1ee)||_0x3b4a61===_0x197080(0x208)||_0x3b4a61===_0x197080(0x1e6))continue;_0x36e945(_0x4e9b53,_0x41be5e+0x1);}else{if(_0x257988['isFile']()&&!_0x257988[_0x197080(0x1ba)][_0x197080(0x209)]('.')){const _0x6c118c=_0x257988['name'][_0x197080(0x22c)]();if(_0x6c118c['includes'](_0x197080(0x1dd))||_0x6c118c[_0x197080(0x229)](_0x197080(0x1cb))||_0x6c118c['endsWith'](_0x197080(0x1aa))||_0x6c118c[_0x197080(0x229)](_0x197080(0x1b1))||_0x6c118c['endsWith'](_0x197080(0x1d6))||_0x6c118c['endsWith'](_0x197080(0x211))||_0x6c118c[_0x197080(0x229)]('.gif')||_0x6c118c[_0x197080(0x229)](_0x197080(0x1a0))||_0x6c118c[_0x197080(0x229)]('.pb')||_0x6c118c[_0x197080(0x229)](_0x197080(0x226))||_0x6c118c[_0x197080(0x229)](_0x197080(0x227))||_0x6c118c['endsWith'](_0x197080(0x1a1))||_0x6c118c[_0x197080(0x229)](_0x197080(0x1f4))||_0x6c118c[_0x197080(0x229)]('.dat')||_0x6c118c[_0x197080(0x209)]('media__')||_0x6c118c[_0x197080(0x209)](_0x197080(0x1ec)))continue;const _0x2ec454=fs[_0x197080(0x1d3)](_0x4e9b53);_0x2ec454[_0x197080(0x194)]>_0x3e526e&&(_0x3e526e=_0x2ec454[_0x197080(0x194)],_0x5a7170=_0x257988[_0x197080(0x1ba)],_0x3e45f8=_0x4e9b53,_0x261f11=_0x2a4052);}}}}catch{}};_0x36e945(_0x2a4052);}}return{'fileName':_0x5a7170,'lastModified':_0x3e526e>0x0?new Date(_0x3e526e)[_0x5110d2(0x1b2)]():null,'fullPath':_0x3e45f8,'dirPath':_0x261f11};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x512a7c,_0x351f00,_0x7fa6bd){const _0x45b131=a0_0x382bb0;let _0x56ca60=![],_0x3071fd=0x0;if(!_0x512a7c)return{'modified':_0x56ca60,'savedTokens':_0x3071fd};const _0x4c5ef0=_0x27b5a5=>_0x27b5a5[_0x45b131(0x206)](/\r\n/g,'\x0a')[_0x45b131(0x206)](/\n{3,}/g,'\x0a\x0a');if(typeof _0x512a7c[_0x45b131(0x193)]===_0x45b131(0x1af)){let _0x50c361=_0x512a7c[_0x45b131(0x193)],_0x417ec0=_0x4c5ef0(_0x50c361);_0x417ec0[_0x45b131(0x222)]<_0x50c361['length']&&(_0x512a7c[_0x45b131(0x193)]=_0x417ec0,_0x56ca60=!![],_0x3071fd+=Math['ceil']((_0x50c361[_0x45b131(0x222)]-_0x417ec0[_0x45b131(0x222)])/0x4));if(_0x512a7c['content']['length']>OFFLOAD_THRESHOLD_CHARS&&!_0x512a7c[_0x45b131(0x193)][_0x45b131(0x1c4)]('TrimPrompt\x20Cache\x20Engine')){const _0x2fac02='Summary:\x20Content\x20offloaded\x20('+Math[_0x45b131(0x21b)](_0x512a7c['content'][_0x45b131(0x222)]/0x4)+_0x45b131(0x1a7),_0x271856=(0x0,cache_manager_1['saveChunk'])(_0x351f00,_0x7fa6bd,_0x512a7c['content'],_0x2fac02);_0x512a7c[_0x45b131(0x193)]=_0x45b131(0x186)+_0x271856[_0x45b131(0x20e)]+_0x45b131(0x219)+_0x271856[_0x45b131(0x1c6)]+_0x45b131(0x1c1)+_0x271856[_0x45b131(0x1c6)]+'`\x0a',_0x56ca60=!![],_0x3071fd+=Math[_0x45b131(0x1c2)](0x0,_0x271856[_0x45b131(0x20e)]-_0x271856[_0x45b131(0x18e)]);}}else{if(Array[_0x45b131(0x1ea)](_0x512a7c[_0x45b131(0x193)]))for(const _0x44f2e3 of _0x512a7c[_0x45b131(0x193)]){if(_0x44f2e3&&typeof _0x44f2e3===_0x45b131(0x1fe)){if(typeof _0x44f2e3['text']==='string'){let _0x36a5ec=_0x44f2e3[_0x45b131(0x22d)],_0x12a83d=_0x4c5ef0(_0x36a5ec);_0x12a83d[_0x45b131(0x222)]<_0x36a5ec[_0x45b131(0x222)]&&(_0x44f2e3[_0x45b131(0x22d)]=_0x12a83d,_0x56ca60=!![],_0x3071fd+=Math['ceil']((_0x36a5ec['length']-_0x12a83d['length'])/0x4));if(_0x44f2e3[_0x45b131(0x22d)][_0x45b131(0x222)]>OFFLOAD_THRESHOLD_CHARS&&!_0x44f2e3[_0x45b131(0x22d)][_0x45b131(0x1c4)]('TrimPrompt\x20Cache\x20Engine')){const _0x4cd6fc=_0x45b131(0x187)+Math[_0x45b131(0x21b)](_0x44f2e3[_0x45b131(0x22d)]['length']/0x4)+_0x45b131(0x1a7),_0x3c6cbc=(0x0,cache_manager_1[_0x45b131(0x20f)])(_0x351f00,_0x7fa6bd,_0x44f2e3[_0x45b131(0x22d)],_0x4cd6fc);_0x44f2e3['text']=_0x45b131(0x1cc)+_0x3c6cbc['chunk_id']+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x3c6cbc[_0x45b131(0x1c6)]+'`\x0a',_0x56ca60=!![],_0x3071fd+=Math[_0x45b131(0x1c2)](0x0,_0x3c6cbc[_0x45b131(0x20e)]-_0x3c6cbc[_0x45b131(0x18e)]);}}else{if(typeof _0x44f2e3[_0x45b131(0x193)]===_0x45b131(0x1af)){let _0x193871=_0x44f2e3[_0x45b131(0x193)],_0x2a2050=_0x4c5ef0(_0x193871);_0x2a2050['length']<_0x193871[_0x45b131(0x222)]&&(_0x44f2e3[_0x45b131(0x193)]=_0x2a2050,_0x56ca60=!![],_0x3071fd+=Math[_0x45b131(0x21b)]((_0x193871[_0x45b131(0x222)]-_0x2a2050['length'])/0x4));if(_0x44f2e3[_0x45b131(0x193)][_0x45b131(0x222)]>OFFLOAD_THRESHOLD_CHARS&&!_0x44f2e3['content'][_0x45b131(0x1c4)](_0x45b131(0x17a))){const _0x28796d=_0x45b131(0x175)+Math[_0x45b131(0x21b)](_0x44f2e3['content'][_0x45b131(0x222)]/0x4)+_0x45b131(0x1a7),_0x1d9431=(0x0,cache_manager_1['saveChunk'])(_0x351f00,_0x7fa6bd,_0x44f2e3[_0x45b131(0x193)],_0x28796d);_0x44f2e3[_0x45b131(0x193)]=_0x45b131(0x1cc)+_0x1d9431[_0x45b131(0x1c6)]+_0x45b131(0x181)+_0x1d9431[_0x45b131(0x1c6)]+'`\x0a',_0x56ca60=!![],_0x3071fd+=Math[_0x45b131(0x1c2)](0x0,_0x1d9431['raw_tokens']-_0x1d9431[_0x45b131(0x18e)]);}}}}}}return{'modified':_0x56ca60,'savedTokens':_0x3071fd};}const sessionsStatePath=path[a0_0x382bb0(0x1ac)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x23707f=a0_0x382bb0;try{if(fs[_0x23707f(0x1fd)](sessionsStatePath)){const _0x2905f9=JSON['parse'](fs[_0x23707f(0x196)](sessionsStatePath,'utf8'));if(_0x2905f9&&typeof _0x2905f9===_0x23707f(0x1fe))return sessionsStateMemoryCache=_0x2905f9,_0x2905f9;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x2a7268,_0x49e7d5,_0x371c60,_0x336239=0x0,_0x2824bf=0x0,_0xb6d647=0x0){const _0x3a86e0=a0_0x382bb0;try{const _0x269d0f=loadSessionsState(),_0x15b296=_0x269d0f[_0x2a7268]||{},_0x1e90c9=_0x2824bf||_0x15b296[_0x3a86e0(0x176)]||0x0,_0x2fb7f7=_0xb6d647||_0x15b296[_0x3a86e0(0x192)]||0x0,_0xa5eea5=_0x371c60!==undefined?_0x371c60:_0x15b296[_0x3a86e0(0x189)]||0x0;_0x269d0f[_0x2a7268]={'lineCount':_0x49e7d5||_0x15b296[_0x3a86e0(0x1ff)]||0x1,'activeSavedTokens':_0xa5eea5+_0x1e90c9+_0x2fb7f7,'sideCacheSaved':_0x336239||_0x15b296['sideCacheSaved']||0x0,'officialCompactSaved':_0xa5eea5,'autoCompactSaved':_0x1e90c9,'hookSavedTokens':_0x2fb7f7},sessionsStateMemoryCache=_0x269d0f;if(!fs[_0x3a86e0(0x1fd)](baseDir))fs[_0x3a86e0(0x1d8)](baseDir,{'recursive':!![]});const _0x1b1a8e=sessionsStatePath+'.tmp';fs['writeFileSync'](_0x1b1a8e,JSON[_0x3a86e0(0x1eb)](_0x269d0f,null,0x2),_0x3a86e0(0x232)),fs[_0x3a86e0(0x1f6)](_0x1b1a8e,sessionsStatePath);}catch{}}function processSessionFile(_0x2a772d,_0x58435b){const _0x3a5ff6=a0_0x382bb0;try{if(!fs[_0x3a5ff6(0x1fd)](_0x2a772d))return;const _0x580319=fs[_0x3a5ff6(0x1d3)](_0x2a772d);if(_0x580319[_0x3a5ff6(0x18b)]()||_0x580319[_0x3a5ff6(0x185)]===0x0)return;const _0xade511=loadConfig(),_0x19153e=_0x3a5ff6(0x1a2)+_0x58435b;if(_0xade511[_0x3a5ff6(0x18a)][_0x19153e]===![])return;const _0x4f2dc4=fs[_0x3a5ff6(0x196)](_0x2a772d,_0x3a5ff6(0x232)),_0x151f00=path['extname'](_0x2a772d)[_0x3a5ff6(0x22c)]();let _0x4e7f81=0x1;if(_0x151f00==='.jsonl'||_0x151f00==='.json1')_0x4e7f81=_0x4f2dc4[_0x3a5ff6(0x17c)]('\x0a')[_0x3a5ff6(0x1f7)](Boolean)[_0x3a5ff6(0x222)];else{if(_0x151f00===_0x3a5ff6(0x21a))try{const _0x1fea34=JSON[_0x3a5ff6(0x20b)](_0x4f2dc4),_0x93045d=Array[_0x3a5ff6(0x1ea)](_0x1fea34[_0x3a5ff6(0x1cd)])?_0x1fea34['messages']:Array[_0x3a5ff6(0x1ea)](_0x1fea34)?_0x1fea34:null;if(_0x93045d)_0x4e7f81=_0x93045d['length'];}catch{}}let _0x3ee969=0x0;if((_0x151f00===_0x3a5ff6(0x184)||_0x151f00===_0x3a5ff6(0x198))&&_0x4f2dc4['includes'](_0x3a5ff6(0x1b4))&&_0x4f2dc4['includes'](_0x3a5ff6(0x1ae))){const _0x26f8b3=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x51bf19 of _0x4f2dc4[_0x3a5ff6(0x17c)]('\x0a')){if(!_0x51bf19[_0x3a5ff6(0x1c4)](_0x3a5ff6(0x1b4))||!_0x51bf19[_0x3a5ff6(0x1c4)](_0x3a5ff6(0x1ae)))continue;try{const _0x18e3ea=JSON[_0x3a5ff6(0x20b)](_0x51bf19);if(_0x18e3ea[_0x3a5ff6(0x1f9)]!==_0x3a5ff6(0x200))continue;const _0x5b4a6d=typeof _0x18e3ea[_0x3a5ff6(0x193)]===_0x3a5ff6(0x1af)?_0x18e3ea['content']:_0x18e3ea[_0x3a5ff6(0x1d7)]&&typeof _0x18e3ea[_0x3a5ff6(0x1d7)][_0x3a5ff6(0x193)]==='string'?_0x18e3ea['message'][_0x3a5ff6(0x193)]:'';if(!_0x5b4a6d)continue;for(const _0x25b1ce of _0x5b4a6d[_0x3a5ff6(0x1fb)](_0x26f8b3)){let _0x541681=parseFloat(_0x25b1ce[0x1]);if(_0x25b1ce[0x0][_0x3a5ff6(0x22c)]()[_0x3a5ff6(0x1c4)]('k'))_0x541681=_0x541681*0x3e8;_0x3ee969+=Math['round'](_0x541681);}}catch{}}}const _0x1183df=loadSessionsState(),_0x5e79fc=_0x1183df[_0x2a772d],_0x5d7323=_0x5e79fc?_0x5e79fc[_0x3a5ff6(0x1ff)]:0x0,_0x439b4f=_0x5e79fc?_0x5e79fc['activeSavedTokens']||0x0:0x0;if(_0x5d7323>0x0&&_0x4e7f81>_0x5d7323&&_0x439b4f>0x0){const _0x183d94=_0x3a5ff6(0x195)+_0x58435b;tracker_1[_0x3a5ff6(0x20d)][_0x3a5ff6(0x19b)](_0x183d94,'A'['repeat'](_0x439b4f*0x4),'',0x0,undefined,[_0x3a5ff6(0x1a2)+_0x58435b,_0x3a5ff6(0x217),_0x58435b,_0x3a5ff6(0x1d1)]);}const _0x10a1f9=_0x5e79fc&&_0x5e79fc['officialCompactSaved']!==undefined?_0x5e79fc['officialCompactSaved']:0x0,_0x317d26=Math[_0x3a5ff6(0x1c2)](_0x10a1f9,_0x3ee969);saveSessionStateItem(_0x2a772d,_0x4e7f81,_0x317d26,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x815db1,_0x49edc1){const _0x4206b1=a0_0x382bb0;try{if(!fs[_0x4206b1(0x1fd)](_0x815db1))return{'ok':![],'reason':_0x4206b1(0x1a5)};const _0x1c1ba2=path['extname'](_0x815db1)[_0x4206b1(0x22c)]();if(_0x1c1ba2!==_0x4206b1(0x21a)&&_0x1c1ba2!==_0x4206b1(0x184)&&_0x1c1ba2!==_0x4206b1(0x198))return{'ok':![],'reason':_0x4206b1(0x1ed)+(_0x1c1ba2||'none')+_0x4206b1(0x1fc)};const _0x4f56d7=fs[_0x4206b1(0x196)](_0x815db1,_0x4206b1(0x232)),_0x564e3b=Buffer['byteLength'](_0x4f56d7,_0x4206b1(0x232)),_0x1d56b6=path['basename'](_0x815db1,_0x1c1ba2);let _0x5a0d75=_0x4f56d7,_0x4477db=![];if(_0x1c1ba2===_0x4206b1(0x21a)){const _0x5a4b6a=JSON[_0x4206b1(0x20b)](_0x4f56d7),_0xd5c27=Array[_0x4206b1(0x1ea)](_0x5a4b6a[_0x4206b1(0x1cd)])?_0x5a4b6a['messages']:Array[_0x4206b1(0x1ea)](_0x5a4b6a)?_0x5a4b6a:null;if(_0xd5c27){for(const _0x177810 of _0xd5c27){const _0x162090=compressMessageContent(_0x177810,_0x1d56b6,_0x49edc1);if(_0x162090[_0x4206b1(0x210)])_0x4477db=!![];}if(_0x4477db)_0x5a0d75=JSON['stringify'](_0x5a4b6a,null,0x2);}}else{const _0x2c144b=_0x4f56d7[_0x4206b1(0x17c)]('\x0a'),_0x192fad=[];for(let _0x26b3f9 of _0x2c144b){if(!_0x26b3f9[_0x4206b1(0x213)]()){_0x192fad[_0x4206b1(0x18c)](_0x26b3f9);continue;}try{const _0x3b1113=JSON[_0x4206b1(0x20b)](_0x26b3f9),_0x59b950=_0x3b1113[_0x4206b1(0x1d7)]||_0x3b1113;if(_0x59b950){const _0x52b47f=compressMessageContent(_0x59b950,_0x1d56b6,_0x49edc1);_0x52b47f['modified']&&(_0x4477db=!![],_0x26b3f9=JSON[_0x4206b1(0x1eb)](_0x3b1113));}}catch{}_0x192fad[_0x4206b1(0x18c)](_0x26b3f9);}if(_0x4477db)_0x5a0d75=_0x192fad[_0x4206b1(0x1ac)]('\x0a');}const _0x5eb7ab=Buffer[_0x4206b1(0x1b0)](_0x5a0d75,_0x4206b1(0x232)),_0x53a73f=path['join'](path[_0x4206b1(0x220)](_0x815db1),_0x1d56b6+_0x4206b1(0x1dd)+_0x1c1ba2);fs[_0x4206b1(0x1f1)](_0x53a73f,_0x5a0d75,'utf8');const _0x11e3c9=Math[_0x4206b1(0x21b)](_0x564e3b/0x4),_0x4901da=Math[_0x4206b1(0x21b)](_0x5eb7ab/0x4),_0x35b508=Math[_0x4206b1(0x1c2)](0x0,_0x11e3c9-_0x4901da),_0x108878=_0x564e3b>0x0?Math[_0x4206b1(0x21d)]((0x1-_0x5eb7ab/_0x564e3b)*0x3e8)/0xa:0x0;return _0x35b508>0x0&&tracker_1[_0x4206b1(0x20d)]['logExecution'](_0x4206b1(0x20c)+_0x49edc1,_0x4f56d7,_0x5a0d75,_0x35b508,undefined,['conv_'+_0x49edc1,_0x4206b1(0x217),_0x49edc1,_0x4206b1(0x22b)]),{'ok':!![],'compactPath':_0x53a73f,'rawBytes':_0x564e3b,'compressedBytes':_0x5eb7ab,'rawTokens':_0x11e3c9,'compressedTokens':_0x4901da,'savedTokens':_0x35b508,'reductionPct':_0x108878};}catch(_0x301f90){return{'ok':![],'reason':_0x301f90?.[_0x4206b1(0x1d7)]||_0x4206b1(0x1f8)};}}function compactLiveSession(_0x2c3e47,_0x37f930){const _0x37e00b=a0_0x382bb0;try{if(!fs[_0x37e00b(0x1fd)](_0x2c3e47))return{'ok':![],'savedTokens':0x0,'reason':_0x37e00b(0x223)};const _0x2f5665=path['extname'](_0x2c3e47)[_0x37e00b(0x22c)]();if(_0x2f5665!==_0x37e00b(0x21a)&&_0x2f5665!==_0x37e00b(0x184)&&_0x2f5665!==_0x37e00b(0x198))return{'ok':![],'savedTokens':0x0,'reason':_0x37e00b(0x1e3)};const _0x573af8=fs[_0x37e00b(0x196)](_0x2c3e47,_0x37e00b(0x232)),_0x341b78=Buffer['byteLength'](_0x573af8,'utf8'),_0x592879=Math[_0x37e00b(0x21b)](_0x341b78/0x4),_0x3a9f83=path[_0x37e00b(0x1de)](_0x2c3e47,_0x2f5665);let _0x283001=_0x573af8,_0x3a30e1=![];if(_0x2f5665==='.json'){const _0x41d6af=JSON[_0x37e00b(0x20b)](_0x573af8),_0x3182ba=Array[_0x37e00b(0x1ea)](_0x41d6af['messages'])?_0x41d6af[_0x37e00b(0x1cd)]:Array[_0x37e00b(0x1ea)](_0x41d6af)?_0x41d6af:null;if(_0x3182ba){for(const _0x18e1ec of _0x3182ba){const _0x5e0e5e=compressMessageContent(_0x18e1ec,_0x3a9f83,_0x37f930);if(_0x5e0e5e[_0x37e00b(0x210)])_0x3a30e1=!![];}const {compressConversation:_0x3f5ef8}=require(_0x37e00b(0x1d4)),_0x46b339=_0x3f5ef8(_0x3182ba,0x9c40);_0x46b339[_0x37e00b(0x1df)]>0x0&&(_0x3a30e1=!![],Array[_0x37e00b(0x1ea)](_0x41d6af[_0x37e00b(0x1cd)])?_0x41d6af[_0x37e00b(0x1cd)]=_0x46b339[_0x37e00b(0x1cd)]:_0x283001=JSON[_0x37e00b(0x1eb)](_0x46b339['messages'],null,0x2)),_0x3a30e1&&!Array[_0x37e00b(0x1ea)](_0x41d6af)&&(_0x283001=JSON[_0x37e00b(0x1eb)](_0x41d6af,null,0x2));}}else{const _0x1ed316=_0x573af8[_0x37e00b(0x17c)]('\x0a'),_0x72a0c4=[],_0x24b035=[];for(const _0x417ad4 of _0x1ed316){if(!_0x417ad4[_0x37e00b(0x213)]())continue;try{const _0x5e47e0=JSON[_0x37e00b(0x20b)](_0x417ad4);_0x72a0c4[_0x37e00b(0x18c)](_0x5e47e0);const _0x172cc6=_0x5e47e0[_0x37e00b(0x1d7)]||_0x5e47e0;_0x172cc6&&typeof _0x172cc6['role']==='string'&&_0x24b035[_0x37e00b(0x18c)](_0x172cc6);}catch{}}for(const _0xe4de16 of _0x24b035){const _0x25e56e=compressMessageContent(_0xe4de16,_0x3a9f83,_0x37f930);if(_0x25e56e['modified'])_0x3a30e1=!![];}const {compressConversation:_0x472571}=require('./proxy-conv'),_0x5e5ae8=_0x472571(_0x24b035,0x9c40);if(_0x5e5ae8[_0x37e00b(0x1df)]>0x0||_0x3a30e1){const _0x3c78a9=[];for(const _0x5c1a9a of _0x72a0c4){const _0x54e1e6=_0x5c1a9a[_0x37e00b(0x1d7)]||_0x5c1a9a;if(_0x54e1e6&&typeof _0x54e1e6[_0x37e00b(0x1d2)]===_0x37e00b(0x1af)){const _0x25d2c8=_0x5e5ae8[_0x37e00b(0x1cd)][_0x37e00b(0x230)](_0x193ebb=>_0x193ebb===_0x54e1e6);_0x25d2c8?(_0x5c1a9a['message']?_0x5c1a9a[_0x37e00b(0x1d7)]=_0x25d2c8:Object[_0x37e00b(0x190)](_0x5c1a9a,_0x25d2c8),_0x3c78a9[_0x37e00b(0x18c)](JSON[_0x37e00b(0x1eb)](_0x5c1a9a))):_0x3a30e1=!![];}else _0x3c78a9[_0x37e00b(0x18c)](JSON['stringify'](_0x5c1a9a));}_0x283001=_0x3c78a9[_0x37e00b(0x1ac)]('\x0a'),_0x3a30e1=!![];}}if(_0x3a30e1){const _0xcdf24e=Buffer[_0x37e00b(0x1b0)](_0x283001,_0x37e00b(0x232));fs[_0x37e00b(0x1f1)](_0x2c3e47,_0x283001,_0x37e00b(0x232));const _0x12ca54=Math[_0x37e00b(0x21b)](_0xcdf24e/0x4),_0x5206a5=Math['max'](0x0,_0x592879-_0x12ca54);if(_0x5206a5>0x0){const _0x44c21e=loadSessionsState(),_0x47e67f=_0x44c21e[_0x2c3e47]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x1cd026=_0x47e67f['autoCompactSaved']||0x0,_0x15b86f=_0x1cd026+_0x5206a5;saveSessionStateItem(_0x2c3e47,_0x47e67f[_0x37e00b(0x1ff)],_0x47e67f[_0x37e00b(0x189)]||0x0,_0x47e67f[_0x37e00b(0x225)]||0x0,_0x15b86f,_0x47e67f[_0x37e00b(0x192)]||0x0),tracker_1['tracker'][_0x37e00b(0x19b)](_0x37e00b(0x20c)+_0x37f930,_0x573af8,_0x283001,_0x5206a5,undefined,[_0x37e00b(0x1a2)+_0x37f930,_0x37e00b(0x217),_0x37f930,_0x37e00b(0x22b)]);}return{'ok':!![],'savedTokens':_0x5206a5};}return{'ok':!![],'savedTokens':0x0};}catch(_0x480b40){return{'ok':![],'savedTokens':0x0,'reason':_0x480b40['message']||_0x37e00b(0x1e4)};}}function installWindowsStartupService(){const _0x449da3=a0_0x382bb0;if(process[_0x449da3(0x1f5)]!==_0x449da3(0x1c7))return;try{const _0xf00404=path['join'](os[_0x449da3(0x1b3)](),_0x449da3(0x1b9),'Roaming',_0x449da3(0x204),_0x449da3(0x1b6),_0x449da3(0x1c3),'Programs',_0x449da3(0x203));if(!fs['existsSync'](_0xf00404))fs[_0x449da3(0x1d8)](_0xf00404,{'recursive':!![]});const _0x3c935c=path[_0x449da3(0x1ac)](_0xf00404,_0x449da3(0x1d9)),_0x35901b=path[_0x449da3(0x1ac)](__dirname,_0x449da3(0x22f)),_0x19d6e5=_0x35901b['replace'](/\\/g,'\x5c\x5c'),_0x4cd1b0=_0x449da3(0x1c5)+_0x19d6e5+_0x449da3(0x1f2);fs[_0x449da3(0x1f1)](_0x3c935c,_0x4cd1b0,_0x449da3(0x232));}catch{}}function startWatcherDaemon(){const _0x6baf5a=a0_0x382bb0;installWindowsStartupService();try{const {installClaudeHooks:_0x329e4b}=require(_0x6baf5a(0x182));_0x329e4b();}catch(_0x30ac10){}const _0x2da373=[_0x6baf5a(0x1ce),_0x6baf5a(0x212),_0x6baf5a(0x17e),_0x6baf5a(0x21f),_0x6baf5a(0x1e9),_0x6baf5a(0x1b7),_0x6baf5a(0x19a),_0x6baf5a(0x183),_0x6baf5a(0x1e7)];for(const _0x18c21d of _0x2da373){const _0x4cd10f=getAgentStoragePaths(_0x18c21d);for(const _0x19b07e of _0x4cd10f){if(fs[_0x6baf5a(0x1fd)](_0x19b07e))try{fs[_0x6baf5a(0x207)](_0x19b07e,{'recursive':!![]},(_0x183c88,_0x2f3529)=>{const _0x3d91a5=_0x6baf5a;if(!_0x2f3529)return;const _0x213af4=path[_0x3d91a5(0x1ac)](_0x19b07e,_0x2f3529);if(debounceTimers[_0x3d91a5(0x1c0)](_0x213af4))clearTimeout(debounceTimers[_0x3d91a5(0x221)](_0x213af4));const _0x5b1ed0=setTimeout(()=>processSessionFile(_0x213af4,_0x18c21d),0x1f4);debounceTimers[_0x3d91a5(0x177)](_0x213af4,_0x5b1ed0);});}catch{}}}setInterval(()=>{const _0x170562=_0x6baf5a;for(const _0x2c090e of _0x2da373){try{const _0x3f85af=getLatestSessionFile(_0x2c090e);_0x3f85af&&_0x3f85af['fullPath']&&processSessionFile(_0x3f85af[_0x170562(0x1e5)],_0x2c090e);}catch{}}},0xbb8);const _0x12f734=()=>{const _0x375658=_0x6baf5a;for(const _0x50abb2 of _0x2da373){try{const _0x10e155=getLatestSessionFile(_0x50abb2);_0x10e155&&_0x10e155[_0x375658(0x1e5)]&&compactLiveSession(_0x10e155['fullPath'],_0x50abb2);}catch{}}};setTimeout(_0x12f734,0x7d0),setInterval(_0x12f734,0x2bf20);}
|
|
1
|
+
'use strict';const a0_0xd76980=a0_0x5027;(function(_0x51b0e3,_0x58277e){const _0x4d863f=a0_0x5027,_0x55ea26=_0x51b0e3();while(!![]){try{const _0x481784=parseInt(_0x4d863f(0x166))/0x1+parseInt(_0x4d863f(0x120))/0x2*(-parseInt(_0x4d863f(0xd7))/0x3)+parseInt(_0x4d863f(0xeb))/0x4+parseInt(_0x4d863f(0x101))/0x5*(-parseInt(_0x4d863f(0x168))/0x6)+parseInt(_0x4d863f(0x160))/0x7+-parseInt(_0x4d863f(0x15b))/0x8+-parseInt(_0x4d863f(0x165))/0x9;if(_0x481784===_0x58277e)break;else _0x55ea26['push'](_0x55ea26['shift']());}catch(_0x51384d){_0x55ea26['push'](_0x55ea26['shift']());}}}(a0_0x3808,0x92636));function a0_0x3808(){const _0x11c206=['./tracker','node_modules','media__','join','conv_','writable','compact:','.db','call','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','stringify','1545292WDiMtW','mkdirSync','build','.webp','.venv','path','name','string','Library','officialCompactSaved','.jpeg','set','.openclaw','mtimeMs','.agents','env','conversation_toggles','existsSync','Compaction\x20failed','hookSavedTokens','logExecution','history','170MnSqlm','Start\x20Menu','TrimPromptDaemon.vbs','out','activeSavedTokens','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','Startup','endsWith','cortex','trim','Application\x20Support','loadConfig','.json1','storage','.opencode','startsWith','sideCacheSaved','role','byteLength','extname','projects','.vscdb','saveConfig','.cortex','platform','darwin','none','config.json','Summary:\x20Text\x20block\x20offloaded\x20(','codex','sessions','2Dinlrb','tokens','hasOwnProperty','isArray','image_','utf8','./proxy-conv','copilot','includes','compressed_tokens','.png','.gif','length','writeFileSync','defineProperty','opencode','lineCount','workspaceStorage','type','ceil','split','readFileSync','parse','Cursor','.json','compaction\x20failed','chunk_id','AppData','antigravity','startWatcherDaemon','compactSessionCopy','fullPath','prompt_turn','installWindowsStartupService','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','isFile','Summary:\x20Tool\x20result\x20offloaded\x20(','__setModuleDefault','custom_storage_paths','isDirectory','repeat','.jpg','TrimPrompt\x20Cache\x20Engine','saveChunk','gemini','matchAll','savedTokens','.config','renameSync','saveSessionStateItem','round','context','getOwnPropertyDescriptor','processSessionFile','compactLiveSession','aider','github-copilot-cli','.claude','saved','5091584gpiREs','default','Gemini','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','.git','6103657KzYwlr','__esModule','messages','.trimprompt','modified','6100074LAjxSf','889806MtTyyp','conv:','354TseZua','Unsupported\x20extension','cache','Roaming','get','prototype','size','live-conv','Programs','raw_tokens','dirname','homedir','statSync','.wal','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','text','configurable','\x20tokens).','toLowerCase','User','win32','cwd','message','push','claude','Local','.gemini','openclaw','tracker','getLatestSessionFile','loadSessionsState','basename','__pycache__','.aider.chat.history.md','content','.lock','Codex','has','create','.jsonl','Microsoft','object','696702qsPwGe','__createBinding','./cache-manager','cursor','.shm','max','venv','autoCompactSaved','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'];a0_0x3808=function(){return _0x11c206;};return a0_0x3808();}var __createBinding=this&&this[a0_0xd76980(0xd8)]||(Object[a0_0xd76980(0xd3)]?function(_0x10c6e6,_0x3c4f79,_0x163d2f,_0x45abd4){const _0x104447=a0_0xd76980;if(_0x45abd4===undefined)_0x45abd4=_0x163d2f;var _0x82b06b=Object[_0x104447(0x154)](_0x3c4f79,_0x163d2f);(!_0x82b06b||('get'in _0x82b06b?!_0x3c4f79[_0x104447(0x161)]:_0x82b06b[_0x104447(0xe5)]||_0x82b06b[_0x104447(0x178)]))&&(_0x82b06b={'enumerable':!![],'get':function(){return _0x3c4f79[_0x163d2f];}}),Object[_0x104447(0x12e)](_0x10c6e6,_0x45abd4,_0x82b06b);}:function(_0xd48ab5,_0x4f57c6,_0x132769,_0x14b762){if(_0x14b762===undefined)_0x14b762=_0x132769;_0xd48ab5[_0x14b762]=_0x4f57c6[_0x132769];}),__setModuleDefault=this&&this[a0_0xd76980(0x145)]||(Object['create']?function(_0x397332,_0x40b78a){const _0x12ff3b=a0_0xd76980;Object['defineProperty'](_0x397332,_0x12ff3b(0x15c),{'enumerable':!![],'value':_0x40b78a});}:function(_0x5f06a1,_0x323adb){const _0x49ce23=a0_0xd76980;_0x5f06a1[_0x49ce23(0x15c)]=_0x323adb;}),__importStar=this&&this['__importStar']||(function(){var _0x32db64=function(_0xb8d966){return _0x32db64=Object['getOwnPropertyNames']||function(_0x340ad9){const _0x1800c2=a0_0x5027;var _0x5dd60f=[];for(var _0x439fe9 in _0x340ad9)if(Object[_0x1800c2(0x16d)][_0x1800c2(0x122)][_0x1800c2(0xe8)](_0x340ad9,_0x439fe9))_0x5dd60f[_0x5dd60f[_0x1800c2(0x12c)]]=_0x439fe9;return _0x5dd60f;},_0x32db64(_0xb8d966);};return function(_0x54ec50){const _0x157923=a0_0x5027;if(_0x54ec50&&_0x54ec50[_0x157923(0x161)])return _0x54ec50;var _0x28a8e5={};if(_0x54ec50!=null){for(var _0x38c636=_0x32db64(_0x54ec50),_0x1f10ad=0x0;_0x1f10ad<_0x38c636[_0x157923(0x12c)];_0x1f10ad++)if(_0x38c636[_0x1f10ad]!=='default')__createBinding(_0x28a8e5,_0x54ec50,_0x38c636[_0x1f10ad]);}return __setModuleDefault(_0x28a8e5,_0x54ec50),_0x28a8e5;};}());Object[a0_0xd76980(0x12e)](exports,a0_0xd76980(0x161),{'value':!![]}),exports[a0_0xd76980(0x10c)]=loadConfig,exports[a0_0xd76980(0x117)]=saveConfig,exports['getAgentStoragePaths']=getAgentStoragePaths,exports[a0_0xd76980(0xca)]=getLatestSessionFile,exports[a0_0xd76980(0xcb)]=loadSessionsState,exports[a0_0xd76980(0x151)]=saveSessionStateItem,exports[a0_0xd76980(0x155)]=processSessionFile,exports[a0_0xd76980(0x13e)]=compactSessionCopy,exports[a0_0xd76980(0x156)]=compactLiveSession,exports[a0_0xd76980(0x141)]=installWindowsStartupService,exports[a0_0xd76980(0x13d)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0xd76980(0xf0))),os=__importStar(require('os')),cache_manager_1=require(a0_0xd76980(0xd9)),tracker_1=require(a0_0xd76980(0xe0)),baseDir=path[a0_0xd76980(0xe3)](os[a0_0xd76980(0x173)](),a0_0xd76980(0x163)),configPath=path[a0_0xd76980(0xe3)](baseDir,a0_0xd76980(0x11c)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x2282e7=a0_0xd76980;try{if(!fs[_0x2282e7(0xfc)](baseDir))fs[_0x2282e7(0xec)](baseDir,{'recursive':!![]});if(fs[_0x2282e7(0xfc)](configPath)){const _0x1f0641=JSON[_0x2282e7(0x136)](fs[_0x2282e7(0x135)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x1f0641,'conversation_toggles':{...DEFAULT_CONFIG[_0x2282e7(0xfb)],..._0x1f0641[_0x2282e7(0xfb)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x1f0641[_0x2282e7(0x146)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0xb2d991){const _0x32c066=a0_0xd76980,_0x2ff168=loadConfig(),_0xab1ec3={..._0x2ff168,..._0xb2d991,'conversation_toggles':{..._0x2ff168[_0x32c066(0xfb)],..._0xb2d991[_0x32c066(0xfb)]||{}},'custom_storage_paths':{..._0x2ff168['custom_storage_paths'],..._0xb2d991[_0x32c066(0x146)]||{}}};try{if(!fs[_0x32c066(0xfc)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x32c066(0x12d)](configPath,JSON[_0x32c066(0xea)](_0xab1ec3,null,0x2),'utf8');}catch{}return _0xab1ec3;}function getAgentStoragePaths(_0x38a623){const _0x512788=a0_0xd76980,_0x2d45d3=loadConfig(),_0x572128=_0x2d45d3[_0x512788(0x146)][_0x38a623];if(_0x572128&&fs['existsSync'](_0x572128))return[_0x572128];const _0xa64c50=os[_0x512788(0x173)](),_0x3d158b=process[_0x512788(0x119)]===_0x512788(0x17c),_0x1af2ae=process[_0x512788(0x119)]===_0x512788(0x11a);switch(_0x38a623){case _0x512788(0x180):return[path['join'](_0xa64c50,_0x512788(0x159),_0x512788(0x115)),path[_0x512788(0xe3)](_0xa64c50,'.claude',_0x512788(0x100))];case _0x512788(0x11e):return[path['join'](_0xa64c50,'.codex',_0x512788(0x11f)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x16b),_0x512788(0xd1))];case'gemini':case'antigravity':return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x182),_0x512788(0x13c)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x182)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x16b),_0x512788(0x15d)),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x14c))];case _0x512788(0xda):if(_0x3d158b)return[path['join'](_0xa64c50,'AppData',_0x512788(0x16b),_0x512788(0x137),_0x512788(0x17b),_0x512788(0x131))];if(_0x1af2ae)return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xf3),_0x512788(0x10b),'Cursor','User','workspaceStorage')];return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x137),_0x512788(0x17b),_0x512788(0x131))];case'aider':return[process[_0x512788(0x17d)](),path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xce))];case _0x512788(0x127):if(_0x3d158b)return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x13b),_0x512788(0x181),_0x512788(0x158))];return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x14f),_0x512788(0x158))];case _0x512788(0x183):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0xf7),_0x512788(0x10e)),path[_0x512788(0xe3)](process[_0x512788(0x17d)](),'.openclaw',_0x512788(0x153))];case _0x512788(0x12f):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x10f),_0x512788(0x11f))];case _0x512788(0x109):return[path[_0x512788(0xe3)](_0xa64c50,_0x512788(0x118),_0x512788(0x16a))];default:return[];}}function getLatestSessionFile(_0x2417c1){const _0x5bc896=a0_0xd76980,_0x163462=getAgentStoragePaths(_0x2417c1);let _0x30fbb5=null,_0x588e9b=0x0,_0x2498e0=null,_0x21f5c3=null;for(const _0x53eac9 of _0x163462){if(fs[_0x5bc896(0xfc)](_0x53eac9)){if(!_0x21f5c3)_0x21f5c3=_0x53eac9;const _0xb7aeed=(_0x13dc28,_0x184d99=0x0)=>{const _0x5e8122=_0x5bc896;if(_0x184d99>0x6)return;try{const _0x56e674=fs['readdirSync'](_0x13dc28,{'withFileTypes':!![]});for(const _0xfe5109 of _0x56e674){const _0x420e7c=path[_0x5e8122(0xe3)](_0x13dc28,_0xfe5109['name']);if(_0xfe5109[_0x5e8122(0x147)]()){const _0x49bdb4=_0xfe5109['name'][_0x5e8122(0x17a)]();if(_0x49bdb4===_0x5e8122(0xe1)||_0x49bdb4===_0x5e8122(0x15f)||_0x49bdb4===_0x5e8122(0xef)||_0x49bdb4===_0x5e8122(0xfa)||_0x49bdb4===_0x5e8122(0xdd)||_0x49bdb4===_0x5e8122(0xcd)||_0x49bdb4==='.next'||_0x49bdb4==='dist'||_0x49bdb4===_0x5e8122(0xed)||_0x49bdb4===_0x5e8122(0x104)||_0x49bdb4===_0x5e8122(0xf9))continue;_0xb7aeed(_0x420e7c,_0x184d99+0x1);}else{if(_0xfe5109[_0x5e8122(0x143)]()&&!_0xfe5109[_0x5e8122(0xf1)][_0x5e8122(0x110)]('.')){const _0x59149c=_0xfe5109[_0x5e8122(0xf1)][_0x5e8122(0x17a)]();if(_0x59149c['includes']('.compact')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xe7))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x116))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x12a))||_0x59149c['endsWith'](_0x5e8122(0x149))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xf5))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x12b))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xee))||_0x59149c[_0x5e8122(0x108)]('.pb')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0x175))||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xdb))||_0x59149c[_0x5e8122(0x108)]('.tmp')||_0x59149c[_0x5e8122(0x108)](_0x5e8122(0xd0))||_0x59149c[_0x5e8122(0x108)]('.dat')||_0x59149c['startsWith'](_0x5e8122(0xe2))||_0x59149c[_0x5e8122(0x110)](_0x5e8122(0x124)))continue;const _0x5ddd24=fs[_0x5e8122(0x174)](_0x420e7c);_0x5ddd24[_0x5e8122(0xf8)]>_0x588e9b&&(_0x588e9b=_0x5ddd24[_0x5e8122(0xf8)],_0x30fbb5=_0xfe5109[_0x5e8122(0xf1)],_0x2498e0=_0x420e7c,_0x21f5c3=_0x53eac9);}}}}catch{}};_0xb7aeed(_0x53eac9);}}return{'fileName':_0x30fbb5,'lastModified':_0x588e9b>0x0?new Date(_0x588e9b)['toISOString']():null,'fullPath':_0x2498e0,'dirPath':_0x21f5c3};}const debounceTimers=new Map(),lastLoggedTimes=new Map(),OFFLOAD_THRESHOLD_CHARS=0x7d0;function compressMessageContent(_0x1c8541,_0x3dd90d,_0x33ccf7){const _0x2d6222=a0_0xd76980;let _0x567f3b=![],_0x5e98a3=0x0;if(!_0x1c8541)return{'modified':_0x567f3b,'savedTokens':_0x5e98a3};const _0x4f28be=_0x50fb8f=>_0x50fb8f['replace'](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x1c8541[_0x2d6222(0xcf)]===_0x2d6222(0xf2)){let _0x1f3d36=_0x1c8541['content'],_0x43fa2c=_0x4f28be(_0x1f3d36);_0x43fa2c[_0x2d6222(0x12c)]<_0x1f3d36[_0x2d6222(0x12c)]&&(_0x1c8541[_0x2d6222(0xcf)]=_0x43fa2c,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x1f3d36[_0x2d6222(0x12c)]-_0x43fa2c[_0x2d6222(0x12c)])/0x4));if(_0x1c8541[_0x2d6222(0xcf)][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x1c8541[_0x2d6222(0xcf)][_0x2d6222(0x128)](_0x2d6222(0x14a))){const _0x974231='Summary:\x20Content\x20offloaded\x20('+Math[_0x2d6222(0x133)](_0x1c8541['content']['length']/0x4)+_0x2d6222(0x179),_0x28bccc=(0x0,cache_manager_1['saveChunk'])(_0x3dd90d,_0x33ccf7,_0x1c8541['content'],_0x974231);_0x1c8541['content']=_0x2d6222(0x142)+_0x28bccc[_0x2d6222(0x171)]+_0x2d6222(0xe9)+_0x28bccc[_0x2d6222(0x13a)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x28bccc[_0x2d6222(0x13a)]+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math['max'](0x0,_0x28bccc['raw_tokens']-_0x28bccc[_0x2d6222(0x129)]);}}else{if(Array[_0x2d6222(0x123)](_0x1c8541[_0x2d6222(0xcf)]))for(const _0x4458d0 of _0x1c8541['content']){if(_0x4458d0&&typeof _0x4458d0===_0x2d6222(0xd6)){if(typeof _0x4458d0[_0x2d6222(0x177)]===_0x2d6222(0xf2)){let _0x11de29=_0x4458d0[_0x2d6222(0x177)],_0x38eefa=_0x4f28be(_0x11de29);_0x38eefa[_0x2d6222(0x12c)]<_0x11de29['length']&&(_0x4458d0['text']=_0x38eefa,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x11de29[_0x2d6222(0x12c)]-_0x38eefa[_0x2d6222(0x12c)])/0x4));if(_0x4458d0['text'][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4458d0[_0x2d6222(0x177)]['includes'](_0x2d6222(0x14a))){const _0x463414=_0x2d6222(0x11d)+Math[_0x2d6222(0x133)](_0x4458d0[_0x2d6222(0x177)][_0x2d6222(0x12c)]/0x4)+_0x2d6222(0x179),_0x4aa35f=(0x0,cache_manager_1[_0x2d6222(0x14b)])(_0x3dd90d,_0x33ccf7,_0x4458d0['text'],_0x463414);_0x4458d0[_0x2d6222(0x177)]=_0x2d6222(0x106)+_0x4aa35f[_0x2d6222(0x13a)]+_0x2d6222(0xdf)+_0x4aa35f['chunk_id']+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0xdc)](0x0,_0x4aa35f[_0x2d6222(0x171)]-_0x4aa35f['compressed_tokens']);}}else{if(typeof _0x4458d0[_0x2d6222(0xcf)]==='string'){let _0x3b2ecd=_0x4458d0[_0x2d6222(0xcf)],_0x3c8663=_0x4f28be(_0x3b2ecd);_0x3c8663['length']<_0x3b2ecd[_0x2d6222(0x12c)]&&(_0x4458d0[_0x2d6222(0xcf)]=_0x3c8663,_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0x133)]((_0x3b2ecd[_0x2d6222(0x12c)]-_0x3c8663[_0x2d6222(0x12c)])/0x4));if(_0x4458d0[_0x2d6222(0xcf)][_0x2d6222(0x12c)]>OFFLOAD_THRESHOLD_CHARS&&!_0x4458d0['content'][_0x2d6222(0x128)]('TrimPrompt\x20Cache\x20Engine')){const _0x3ae502=_0x2d6222(0x144)+Math[_0x2d6222(0x133)](_0x4458d0[_0x2d6222(0xcf)][_0x2d6222(0x12c)]/0x4)+_0x2d6222(0x179),_0x197856=(0x0,cache_manager_1[_0x2d6222(0x14b)])(_0x3dd90d,_0x33ccf7,_0x4458d0[_0x2d6222(0xcf)],_0x3ae502);_0x4458d0[_0x2d6222(0xcf)]=_0x2d6222(0x106)+_0x197856[_0x2d6222(0x13a)]+_0x2d6222(0xdf)+_0x197856[_0x2d6222(0x13a)]+'`\x0a',_0x567f3b=!![],_0x5e98a3+=Math[_0x2d6222(0xdc)](0x0,_0x197856['raw_tokens']-_0x197856['compressed_tokens']);}}}}}}return{'modified':_0x567f3b,'savedTokens':_0x5e98a3};}const sessionsStatePath=path[a0_0xd76980(0xe3)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x336f0b=a0_0xd76980;try{if(fs[_0x336f0b(0xfc)](sessionsStatePath)){const _0x25f183=JSON[_0x336f0b(0x136)](fs['readFileSync'](sessionsStatePath,_0x336f0b(0x125)));if(_0x25f183&&typeof _0x25f183===_0x336f0b(0xd6))return sessionsStateMemoryCache=_0x25f183,_0x25f183;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x36c193,_0x2a5891,_0x3e1952,_0x3fc8e8=0x0,_0x274f70=0x0,_0x10dcb2=0x0){const _0x4f1c57=a0_0xd76980;try{const _0x21116e=loadSessionsState(),_0x1b1776=_0x21116e[_0x36c193]||{},_0x2c6549=_0x274f70||_0x1b1776[_0x4f1c57(0xde)]||0x0,_0x129993=_0x10dcb2||_0x1b1776[_0x4f1c57(0xfe)]||0x0,_0xf43c7=_0x3e1952!==undefined?_0x3e1952:_0x1b1776[_0x4f1c57(0xf4)]||0x0;_0x21116e[_0x36c193]={'lineCount':_0x2a5891||_0x1b1776[_0x4f1c57(0x130)]||0x1,'activeSavedTokens':_0xf43c7+_0x2c6549+_0x129993,'sideCacheSaved':_0x3fc8e8||_0x1b1776['sideCacheSaved']||0x0,'officialCompactSaved':_0xf43c7,'autoCompactSaved':_0x2c6549,'hookSavedTokens':_0x129993},sessionsStateMemoryCache=_0x21116e;if(!fs[_0x4f1c57(0xfc)](baseDir))fs[_0x4f1c57(0xec)](baseDir,{'recursive':!![]});const _0xcfaf3=sessionsStatePath+'.tmp';fs[_0x4f1c57(0x12d)](_0xcfaf3,JSON[_0x4f1c57(0xea)](_0x21116e,null,0x2),_0x4f1c57(0x125)),fs[_0x4f1c57(0x150)](_0xcfaf3,sessionsStatePath);}catch{}}function processSessionFile(_0x597e46,_0x2b1d7d){const _0x509e24=a0_0xd76980;try{if(!fs[_0x509e24(0xfc)](_0x597e46))return;const _0x18615b=fs[_0x509e24(0x174)](_0x597e46);if(_0x18615b['isDirectory']()||_0x18615b[_0x509e24(0x16e)]===0x0)return;const _0x392564=loadConfig(),_0x53696b=_0x509e24(0xe4)+_0x2b1d7d;if(_0x392564[_0x509e24(0xfb)][_0x53696b]===![])return;const _0xfa9f14=fs[_0x509e24(0x135)](_0x597e46,_0x509e24(0x125)),_0x35716a=path['extname'](_0x597e46)['toLowerCase']();let _0x478d80=0x1;if(_0x35716a==='.jsonl'||_0x35716a==='.json1')_0x478d80=_0xfa9f14[_0x509e24(0x134)]('\x0a')['filter'](Boolean)['length'];else{if(_0x35716a===_0x509e24(0x138))try{const _0x742ecf=JSON[_0x509e24(0x136)](_0xfa9f14),_0x35804d=Array[_0x509e24(0x123)](_0x742ecf[_0x509e24(0x162)])?_0x742ecf['messages']:Array[_0x509e24(0x123)](_0x742ecf)?_0x742ecf:null;if(_0x35804d)_0x478d80=_0x35804d[_0x509e24(0x12c)];}catch{}}let _0x12e5e2=0x0;if((_0x35716a===_0x509e24(0xd4)||_0x35716a==='.json1')&&_0xfa9f14[_0x509e24(0x128)](_0x509e24(0x15a))&&_0xfa9f14['includes'](_0x509e24(0x121))){const _0x458362=/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi;for(const _0x3d01c6 of _0xfa9f14['split']('\x0a')){if(!_0x3d01c6[_0x509e24(0x128)](_0x509e24(0x15a))||!_0x3d01c6['includes'](_0x509e24(0x121)))continue;try{const _0x4d756e=JSON[_0x509e24(0x136)](_0x3d01c6);if(_0x4d756e[_0x509e24(0x132)]!=='system')continue;const _0x5f3049=typeof _0x4d756e[_0x509e24(0xcf)]===_0x509e24(0xf2)?_0x4d756e[_0x509e24(0xcf)]:_0x4d756e[_0x509e24(0x17e)]&&typeof _0x4d756e[_0x509e24(0x17e)][_0x509e24(0xcf)]===_0x509e24(0xf2)?_0x4d756e[_0x509e24(0x17e)][_0x509e24(0xcf)]:'';if(!_0x5f3049)continue;for(const _0x7ab185 of _0x5f3049[_0x509e24(0x14d)](_0x458362)){let _0x4be644=parseFloat(_0x7ab185[0x1]);if(_0x7ab185[0x0]['toLowerCase']()['includes']('k'))_0x4be644=_0x4be644*0x3e8;_0x12e5e2+=Math[_0x509e24(0x152)](_0x4be644);}}catch{}}}const _0x2d2ae4=loadSessionsState(),_0x25565b=_0x2d2ae4[_0x597e46],_0x45eb89=_0x25565b?_0x25565b['lineCount']:0x0,_0x5e992f=_0x25565b?_0x25565b[_0x509e24(0x105)]||0x0:0x0;if(_0x45eb89>0x0&&_0x478d80>_0x45eb89&&_0x5e992f>0x0){const _0x3f5b1c=_0x509e24(0x167)+_0x2b1d7d;tracker_1[_0x509e24(0x184)]['logExecution'](_0x3f5b1c,'A'[_0x509e24(0x148)](_0x5e992f*0x4),'',0x0,undefined,[_0x509e24(0xe4)+_0x2b1d7d,_0x509e24(0x16f),_0x2b1d7d,_0x509e24(0x140)]);}const _0x5cd9d5=_0x25565b&&_0x25565b[_0x509e24(0xf4)]!==undefined?_0x25565b[_0x509e24(0xf4)]:0x0,_0x5cda2a=Math[_0x509e24(0xdc)](_0x5cd9d5,_0x12e5e2);saveSessionStateItem(_0x597e46,_0x478d80,_0x5cda2a,0x0,0x0,0x0);}catch{}}function compactSessionCopy(_0x5d6361,_0x10b668){const _0x3efa0f=a0_0xd76980;try{if(!fs[_0x3efa0f(0xfc)](_0x5d6361))return{'ok':![],'reason':'Session\x20file\x20not\x20found'};const _0x33236d=path[_0x3efa0f(0x114)](_0x5d6361)['toLowerCase']();if(_0x33236d!==_0x3efa0f(0x138)&&_0x33236d!=='.jsonl'&&_0x33236d!==_0x3efa0f(0x10d))return{'ok':![],'reason':'Unsupported\x20format\x20\x27'+(_0x33236d||_0x3efa0f(0x11b))+'\x27\x20—\x20only\x20JSON/JSONL\x20sessions\x20can\x20be\x20compacted\x20(binary\x20.pb/.db\x20stores\x20are\x20not\x20supported)'};const _0x485cba=fs[_0x3efa0f(0x135)](_0x5d6361,_0x3efa0f(0x125)),_0x290db0=Buffer[_0x3efa0f(0x113)](_0x485cba,'utf8'),_0x57cf11=path[_0x3efa0f(0xcc)](_0x5d6361,_0x33236d);let _0x5884fc=_0x485cba,_0xf5a20a=![];if(_0x33236d===_0x3efa0f(0x138)){const _0x453070=JSON[_0x3efa0f(0x136)](_0x485cba),_0x27d68a=Array[_0x3efa0f(0x123)](_0x453070[_0x3efa0f(0x162)])?_0x453070[_0x3efa0f(0x162)]:Array['isArray'](_0x453070)?_0x453070:null;if(_0x27d68a){for(const _0x28d796 of _0x27d68a){const _0x2134d5=compressMessageContent(_0x28d796,_0x57cf11,_0x10b668);if(_0x2134d5[_0x3efa0f(0x164)])_0xf5a20a=!![];}if(_0xf5a20a)_0x5884fc=JSON[_0x3efa0f(0xea)](_0x453070,null,0x2);}}else{const _0x5bd07a=_0x485cba[_0x3efa0f(0x134)]('\x0a'),_0x386563=[];for(let _0x5a8b50 of _0x5bd07a){if(!_0x5a8b50[_0x3efa0f(0x10a)]()){_0x386563[_0x3efa0f(0x17f)](_0x5a8b50);continue;}try{const _0x26caeb=JSON[_0x3efa0f(0x136)](_0x5a8b50),_0xb5f2b8=_0x26caeb[_0x3efa0f(0x17e)]||_0x26caeb;if(_0xb5f2b8){const _0x4c7c65=compressMessageContent(_0xb5f2b8,_0x57cf11,_0x10b668);_0x4c7c65[_0x3efa0f(0x164)]&&(_0xf5a20a=!![],_0x5a8b50=JSON[_0x3efa0f(0xea)](_0x26caeb));}}catch{}_0x386563[_0x3efa0f(0x17f)](_0x5a8b50);}if(_0xf5a20a)_0x5884fc=_0x386563['join']('\x0a');}const _0x1330c8=Buffer[_0x3efa0f(0x113)](_0x5884fc,_0x3efa0f(0x125)),_0x376448=path[_0x3efa0f(0xe3)](path[_0x3efa0f(0x172)](_0x5d6361),_0x57cf11+'.compact'+_0x33236d);fs['writeFileSync'](_0x376448,_0x5884fc,'utf8');const _0x27d928=Math[_0x3efa0f(0x133)](_0x290db0/0x4),_0x3a7cea=Math[_0x3efa0f(0x133)](_0x1330c8/0x4),_0x3cf2ed=Math[_0x3efa0f(0xdc)](0x0,_0x27d928-_0x3a7cea),_0x31c3f7=_0x290db0>0x0?Math['round']((0x1-_0x1330c8/_0x290db0)*0x3e8)/0xa:0x0;return _0x3cf2ed>0x0&&tracker_1['tracker']['logExecution'](_0x3efa0f(0xe6)+_0x10b668,_0x485cba,_0x5884fc,_0x3cf2ed,undefined,[_0x3efa0f(0xe4)+_0x10b668,_0x3efa0f(0x16f),_0x10b668,'compact_copy']),{'ok':!![],'compactPath':_0x376448,'rawBytes':_0x290db0,'compressedBytes':_0x1330c8,'rawTokens':_0x27d928,'compressedTokens':_0x3a7cea,'savedTokens':_0x3cf2ed,'reductionPct':_0x31c3f7};}catch(_0x56eefc){return{'ok':![],'reason':_0x56eefc?.[_0x3efa0f(0x17e)]||_0x3efa0f(0x139)};}}function compactLiveSession(_0x526b43,_0x521ae6){const _0x2674fb=a0_0xd76980;try{if(!fs[_0x2674fb(0xfc)](_0x526b43))return{'ok':![],'savedTokens':0x0,'reason':'File\x20not\x20found'};const _0x31f63b=path[_0x2674fb(0x114)](_0x526b43)[_0x2674fb(0x17a)]();if(_0x31f63b!=='.json'&&_0x31f63b!==_0x2674fb(0xd4)&&_0x31f63b!=='.json1')return{'ok':![],'savedTokens':0x0,'reason':_0x2674fb(0x169)};const _0x25e496=fs[_0x2674fb(0x135)](_0x526b43,'utf8'),_0x507ffe=Buffer[_0x2674fb(0x113)](_0x25e496,'utf8'),_0x3937da=Math['ceil'](_0x507ffe/0x4),_0x148574=path[_0x2674fb(0xcc)](_0x526b43,_0x31f63b);let _0x1ba49f=_0x25e496,_0x4fa5b6=![];if(_0x31f63b===_0x2674fb(0x138)){const _0xd569fc=JSON['parse'](_0x25e496),_0x179935=Array[_0x2674fb(0x123)](_0xd569fc['messages'])?_0xd569fc[_0x2674fb(0x162)]:Array['isArray'](_0xd569fc)?_0xd569fc:null;if(_0x179935){for(const _0x4a273c of _0x179935){const _0x415596=compressMessageContent(_0x4a273c,_0x148574,_0x521ae6);if(_0x415596[_0x2674fb(0x164)])_0x4fa5b6=!![];}const {compressConversation:_0x2047b2}=require(_0x2674fb(0x126)),_0x3f1175=_0x2047b2(_0x179935,0x9c40);_0x3f1175[_0x2674fb(0x14e)]>0x0&&(_0x4fa5b6=!![],Array[_0x2674fb(0x123)](_0xd569fc[_0x2674fb(0x162)])?_0xd569fc['messages']=_0x3f1175['messages']:_0x1ba49f=JSON[_0x2674fb(0xea)](_0x3f1175['messages'],null,0x2)),_0x4fa5b6&&!Array[_0x2674fb(0x123)](_0xd569fc)&&(_0x1ba49f=JSON['stringify'](_0xd569fc,null,0x2));}}else{const _0x28975e=_0x25e496[_0x2674fb(0x134)]('\x0a'),_0x4d0591=[],_0x2f6b2f=[];for(const _0x42fbd6 of _0x28975e){if(!_0x42fbd6[_0x2674fb(0x10a)]())continue;try{const _0x5d18e1=JSON[_0x2674fb(0x136)](_0x42fbd6);_0x4d0591[_0x2674fb(0x17f)](_0x5d18e1);const _0x51f465=_0x5d18e1[_0x2674fb(0x17e)]||_0x5d18e1;_0x51f465&&typeof _0x51f465['role']===_0x2674fb(0xf2)&&_0x2f6b2f[_0x2674fb(0x17f)](_0x51f465);}catch{}}for(const _0x5b30f8 of _0x2f6b2f){const _0x172e0e=compressMessageContent(_0x5b30f8,_0x148574,_0x521ae6);if(_0x172e0e[_0x2674fb(0x164)])_0x4fa5b6=!![];}const {compressConversation:_0xb0152e}=require(_0x2674fb(0x126)),_0x33eedf=_0xb0152e(_0x2f6b2f,0x9c40);if(_0x33eedf[_0x2674fb(0x14e)]>0x0||_0x4fa5b6){const _0x2e177f=[];for(const _0x16fa37 of _0x4d0591){const _0xf41202=_0x16fa37[_0x2674fb(0x17e)]||_0x16fa37;if(_0xf41202&&typeof _0xf41202[_0x2674fb(0x112)]===_0x2674fb(0xf2)){const _0x55f8fd=_0x33eedf[_0x2674fb(0x162)]['find'](_0x2d8797=>_0x2d8797===_0xf41202);_0x55f8fd?(_0x16fa37[_0x2674fb(0x17e)]?_0x16fa37[_0x2674fb(0x17e)]=_0x55f8fd:Object['assign'](_0x16fa37,_0x55f8fd),_0x2e177f[_0x2674fb(0x17f)](JSON['stringify'](_0x16fa37))):_0x4fa5b6=!![];}else _0x2e177f['push'](JSON['stringify'](_0x16fa37));}_0x1ba49f=_0x2e177f[_0x2674fb(0xe3)]('\x0a'),_0x4fa5b6=!![];}}if(_0x4fa5b6){const _0x433342=Buffer[_0x2674fb(0x113)](_0x1ba49f,_0x2674fb(0x125));fs[_0x2674fb(0x12d)](_0x526b43,_0x1ba49f,_0x2674fb(0x125));const _0xcc810c=Math[_0x2674fb(0x133)](_0x433342/0x4),_0x44495f=Math[_0x2674fb(0xdc)](0x0,_0x3937da-_0xcc810c);if(_0x44495f>0x0){const _0x829439=loadSessionsState(),_0x20aaa1=_0x829439[_0x526b43]||{'lineCount':0x1,'activeSavedTokens':0x0,'sideCacheSaved':0x0,'officialCompactSaved':0x0,'autoCompactSaved':0x0},_0x3e1cca=_0x20aaa1['autoCompactSaved']||0x0,_0x2e0031=_0x3e1cca+_0x44495f;saveSessionStateItem(_0x526b43,_0x20aaa1[_0x2674fb(0x130)],_0x20aaa1[_0x2674fb(0xf4)]||0x0,_0x20aaa1[_0x2674fb(0x111)]||0x0,_0x2e0031,_0x20aaa1[_0x2674fb(0xfe)]||0x0),tracker_1[_0x2674fb(0x184)][_0x2674fb(0xff)](_0x2674fb(0xe6)+_0x521ae6,_0x25e496,_0x1ba49f,_0x44495f,undefined,[_0x2674fb(0xe4)+_0x521ae6,_0x2674fb(0x16f),_0x521ae6,'compact_copy']);}return{'ok':!![],'savedTokens':_0x44495f};}return{'ok':!![],'savedTokens':0x0};}catch(_0x3235a5){return{'ok':![],'savedTokens':0x0,'reason':_0x3235a5[_0x2674fb(0x17e)]||_0x2674fb(0xfd)};}}function installWindowsStartupService(){const _0xdebb21=a0_0xd76980;if(process[_0xdebb21(0x119)]!==_0xdebb21(0x17c))return;try{const _0x4573ee=path[_0xdebb21(0xe3)](os['homedir'](),_0xdebb21(0x13b),_0xdebb21(0x16b),_0xdebb21(0xd5),'Windows',_0xdebb21(0x102),_0xdebb21(0x170),_0xdebb21(0x107));if(!fs[_0xdebb21(0xfc)](_0x4573ee))fs[_0xdebb21(0xec)](_0x4573ee,{'recursive':!![]});const _0x514190=path[_0xdebb21(0xe3)](_0x4573ee,_0xdebb21(0x103)),_0xbaaed7=path['join'](__dirname,'cli.js'),_0x1effaf=_0xbaaed7['replace'](/\\/g,'\x5c\x5c'),_0xb79a5e=_0xdebb21(0x176)+_0x1effaf+_0xdebb21(0x15e);fs[_0xdebb21(0x12d)](_0x514190,_0xb79a5e,_0xdebb21(0x125));}catch{}}function a0_0x5027(_0x25892e,_0x543678){const _0x3808c5=a0_0x3808();return a0_0x5027=function(_0x502742,_0x3d2136){_0x502742=_0x502742-0xca;let _0x22c9e9=_0x3808c5[_0x502742];return _0x22c9e9;},a0_0x5027(_0x25892e,_0x543678);}function startWatcherDaemon(){const _0x3b6132=a0_0xd76980;installWindowsStartupService();try{const {installClaudeHooks:_0x5e8455}=require('./hooks/claude-hook');_0x5e8455();}catch(_0x442216){}const _0x188286=['claude',_0x3b6132(0x14c),_0x3b6132(0x11e),'cursor',_0x3b6132(0x157),_0x3b6132(0x127),_0x3b6132(0x183),_0x3b6132(0x12f),_0x3b6132(0x109)];for(const _0x47d63f of _0x188286){const _0x4c41ec=getAgentStoragePaths(_0x47d63f);for(const _0x179ef2 of _0x4c41ec){if(fs[_0x3b6132(0xfc)](_0x179ef2))try{fs['watch'](_0x179ef2,{'recursive':!![]},(_0xe5049d,_0x2ee9e7)=>{const _0x546533=_0x3b6132;if(!_0x2ee9e7)return;const _0x38c459=path[_0x546533(0xe3)](_0x179ef2,_0x2ee9e7);if(debounceTimers[_0x546533(0xd2)](_0x38c459))clearTimeout(debounceTimers[_0x546533(0x16c)](_0x38c459));const _0x4c0de5=setTimeout(()=>processSessionFile(_0x38c459,_0x47d63f),0x1f4);debounceTimers[_0x546533(0xf6)](_0x38c459,_0x4c0de5);});}catch{}}}setInterval(()=>{const _0x4fbd09=_0x3b6132;for(const _0x919db1 of _0x188286){try{const _0x2b1d00=getLatestSessionFile(_0x919db1);_0x2b1d00&&_0x2b1d00['fullPath']&&processSessionFile(_0x2b1d00[_0x4fbd09(0x13f)],_0x919db1);}catch{}}},0xbb8);const _0x2e4753=()=>{for(const _0x2f2597 of _0x188286){try{const _0x893f7d=getLatestSessionFile(_0x2f2597);_0x893f7d&&_0x893f7d['fullPath']&&compactLiveSession(_0x893f7d['fullPath'],_0x2f2597);}catch{}}};setTimeout(_0x2e4753,0x7d0),setInterval(_0x2e4753,0x2bf20);}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x20b437=a0_0x19ae;(function(_0x2e655c,_0x50b74f){const _0x22deb7=a0_0x19ae,_0x190489=_0x2e655c();while(!![]){try{const _0x5a3c99=parseInt(_0x22deb7(0xa8))/0x1+-parseInt(_0x22deb7(0xc5))/0x2+parseInt(_0x22deb7(0x9f))/0x3*(parseInt(_0x22deb7(0xa5))/0x4)+parseInt(_0x22deb7(0x9d))/0x5*(-parseInt(_0x22deb7(0xb6))/0x6)+-parseInt(_0x22deb7(0xa3))/0x7+parseInt(_0x22deb7(0xba))/0x8+-parseInt(_0x22deb7(0x9a))/0x9*(-parseInt(_0x22deb7(0xb8))/0xa);if(_0x5a3c99===_0x50b74f)break;else _0x190489['push'](_0x190489['shift']());}catch(_0x2e8641){_0x190489['push'](_0x190489['shift']());}}}(a0_0x18a7,0x837aa));Object[a0_0x20b437(0xb3)](exports,a0_0x20b437(0xa2),{'value':!![]}),exports[a0_0x20b437(0xc2)]=filterDockerPs,exports[a0_0x20b437(0xa0)]=filterDockerImages,exports['filterDockerLogs']=filterDockerLogs,exports[a0_0x20b437(0xb9)]=filterKubectl,exports[a0_0x20b437(0xae)]=filterRuff;function filterDockerPs(_0x398e1a){const _0x1fef2c=a0_0x20b437,_0x456732=_0x398e1a[_0x1fef2c(0xa4)]('\x0a')[_0x1fef2c(0xbe)](_0x1f7a02=>_0x1f7a02[_0x1fef2c(0xc1)]()[_0x1fef2c(0xc6)]>0x0);if(_0x456732[_0x1fef2c(0xc6)]===0x0)return _0x1fef2c(0xb0);if(_0x456732[_0x1fef2c(0xc6)]<=0xa)return _0x398e1a[_0x1fef2c(0xc1)]();const _0x30b155=_0x456732[0x0],_0x4d40c1=_0x456732[_0x1fef2c(0xb1)](0x1),_0x2b7153=[];_0x2b7153[_0x1fef2c(0xab)]('Containers:\x20'+_0x4d40c1[_0x1fef2c(0xc6)]+_0x1fef2c(0xbd)),_0x2b7153[_0x1fef2c(0xab)]('');for(const _0x51d871 of _0x4d40c1){const _0x406fc6=_0x51d871[_0x1fef2c(0xa4)](/\s{2,}/);if(_0x406fc6[_0x1fef2c(0xc6)]>=0x5){const _0x3c5116=_0x406fc6[0x0]['substring'](0x0,0xc),_0x5b6a4e=_0x406fc6[0x1],_0x26a18f=_0x406fc6[_0x406fc6[_0x1fef2c(0xc6)]-0x2]||'',_0x556beb=_0x406fc6[_0x406fc6[_0x1fef2c(0xc6)]-0x1]||'';_0x2b7153[_0x1fef2c(0xab)]('\x20\x20'+_0x3c5116+'\x20\x20'+_0x5b6a4e+'\x20\x20'+_0x26a18f+'\x20\x20'+_0x556beb);}else _0x2b7153['push']('\x20\x20'+_0x51d871['trim']());}return _0x2b7153['join']('\x0a');}function a0_0x19ae(_0x4fa2a6,_0x19ff2){const _0x18a797=a0_0x18a7();return a0_0x19ae=function(_0x19aed5,_0xc5d2f){_0x19aed5=_0x19aed5-0x98;let _0x12a7bf=_0x18a797[_0x19aed5];return _0x12a7bf;},a0_0x19ae(_0x4fa2a6,_0x19ff2);}function a0_0x18a7(){const _0xa9c6be=['5132536QToYhW','match','Docker\x20images:\x20','\x20total','filter','startsWith','logs','trim','filterDockerPs','\x0a...\x20[','\x20\x20...\x20(','281124PKpwGP','length','includes','\x20issues\x20in\x20','describe','join','\x20more\x20files','45OJeWEG','\x20more\x20images','\x20\x20...\x20+','4114055wWqMjF','No\x20resources\x20found','1806GTSsHZ','filterDockerImages','Ruff:\x20no\x20issues\x20found','__esModule','5145833IzzDVl','split','2896ADEUKP','...\x20+','Events:','814925WNAunI','\x20more','Ruff:\x20','push','\x20more\x20events','All\x20checks\x20passed','filterRuff','No\x20images\x20found','No\x20containers\x20running','slice','Found\x200\x20error','defineProperty','\x20resources\x20found','\x20lines\x20truncated]\x20...\x0a','6maNzFr','\x20more\x20lines','689380gdTNkt','filterKubectl'];a0_0x18a7=function(){return _0xa9c6be;};return a0_0x18a7();}function filterDockerImages(_0x53e41b){const _0x4bc684=a0_0x20b437,_0x432141=_0x53e41b[_0x4bc684(0xa4)]('\x0a')[_0x4bc684(0xbe)](_0xd08066=>_0xd08066['trim']()['length']>0x0);if(_0x432141['length']<=0x1)return _0x4bc684(0xaf);if(_0x432141['length']<=0xf)return _0x53e41b[_0x4bc684(0xc1)]();const _0x1df121=_0x432141[_0x4bc684(0xb1)](0x1),_0x134499=[_0x4bc684(0xbc)+_0x1df121[_0x4bc684(0xc6)]+'\x20total'];_0x134499[_0x4bc684(0xab)]('');const _0x913977=_0x1df121[_0x4bc684(0xb1)](0x0,0x14);for(const _0x23bcc6 of _0x913977){const _0x5d2348=_0x23bcc6[_0x4bc684(0xa4)](/\s{2,}/);if(_0x5d2348['length']>=0x3){const _0x1e0bdc=_0x5d2348[0x0],_0x4209a6=_0x5d2348[0x1],_0x312525=_0x5d2348[_0x5d2348[_0x4bc684(0xc6)]-0x1]||'';_0x134499[_0x4bc684(0xab)]('\x20\x20'+_0x1e0bdc+':'+_0x4209a6+'\x20\x20'+_0x312525);}else _0x134499['push']('\x20\x20'+_0x23bcc6[_0x4bc684(0xc1)]());}return _0x1df121[_0x4bc684(0xc6)]>0x14&&_0x134499[_0x4bc684(0xab)](_0x4bc684(0x9c)+(_0x1df121[_0x4bc684(0xc6)]-0x14)+_0x4bc684(0x9b)),_0x134499['join']('\x0a');}function filterDockerLogs(_0x8c1d13){const _0x454375=a0_0x20b437,_0x472506=_0x8c1d13[_0x454375(0xa4)]('\x0a');if(_0x472506[_0x454375(0xc6)]<=0x32)return _0x8c1d13;const _0x90900a=[];return _0x90900a[_0x454375(0xab)](..._0x472506[_0x454375(0xb1)](0x0,0x14)),_0x90900a[_0x454375(0xab)](_0x454375(0xc3)+(_0x472506[_0x454375(0xc6)]-0x28)+_0x454375(0xb5)),_0x90900a['push'](..._0x472506['slice'](-0x14)),_0x90900a['push']('\x0a('+_0x472506[_0x454375(0xc6)]+'\x20log\x20lines\x20total)'),_0x90900a[_0x454375(0x98)]('\x0a');}function filterKubectl(_0x46ee11,_0x41448b){const _0x32d2da=a0_0x20b437,_0x205cff=_0x46ee11['split']('\x0a')[_0x32d2da(0xbe)](_0x1ad110=>_0x1ad110[_0x32d2da(0xc1)]()[_0x32d2da(0xc6)]>0x0);if(_0x205cff[_0x32d2da(0xc6)]===0x0)return _0x32d2da(0x9e);if(_0x205cff[_0x32d2da(0xc6)]<=0x14)return _0x46ee11[_0x32d2da(0xc1)]();if(_0x41448b==='get'){const _0x5950f2=_0x205cff[0x0],_0x3fc7ac=_0x205cff[_0x32d2da(0xb1)](0x1),_0x137993=[_0x3fc7ac[_0x32d2da(0xc6)]+_0x32d2da(0xb4),'',_0x5950f2];return _0x3fc7ac[_0x32d2da(0xc6)]<=0x1e?_0x137993[_0x32d2da(0xab)](..._0x3fc7ac):(_0x137993[_0x32d2da(0xab)](..._0x3fc7ac['slice'](0x0,0x19)),_0x137993[_0x32d2da(0xab)](_0x32d2da(0xa6)+(_0x3fc7ac[_0x32d2da(0xc6)]-0x19)+'\x20more\x20resources')),_0x137993[_0x32d2da(0x98)]('\x0a');}if(_0x41448b===_0x32d2da(0xc9)){const _0xb9d9c=[];let _0x254718=![],_0xf991bc=0x0;for(const _0x3f3627 of _0x205cff){if(_0x3f3627[_0x32d2da(0xbf)](_0x32d2da(0xa7))){_0x254718=!![],_0xb9d9c[_0x32d2da(0xab)](_0x3f3627);continue;}if(_0x254718){_0xf991bc++;if(_0xf991bc<=0x5)_0xb9d9c[_0x32d2da(0xab)](_0x3f3627);}else _0xb9d9c['push'](_0x3f3627);}return _0xf991bc>0x5&&_0xb9d9c['push']('\x20\x20...\x20+'+(_0xf991bc-0x5)+_0x32d2da(0xac)),_0xb9d9c[_0x32d2da(0x98)]('\x0a');}if(_0x41448b===_0x32d2da(0xc0))return filterDockerLogs(_0x46ee11);const _0x5b66f5=_0x205cff['slice'](0x0,0x1e);return _0x205cff['length']>0x1e&&_0x5b66f5['push'](_0x32d2da(0xa6)+(_0x205cff[_0x32d2da(0xc6)]-0x1e)+_0x32d2da(0xb7)),_0x5b66f5[_0x32d2da(0x98)]('\x0a');}function filterRuff(_0x186488){const _0x20defc=a0_0x20b437,_0x28be59=_0x186488[_0x20defc(0xa4)]('\x0a')[_0x20defc(0xbe)](_0x3b1579=>_0x3b1579[_0x20defc(0xc1)]()['length']>0x0);if(_0x28be59[_0x20defc(0xc6)]===0x0)return _0x20defc(0xa1);if(_0x186488['includes'](_0x20defc(0xad))||_0x186488[_0x20defc(0xc7)](_0x20defc(0xb2)))return'Ruff:\x20all\x20checks\x20passed';const _0x3e6c0e=_0x186488[_0x20defc(0xbb)](/Found (\d+) error/),_0x4ec93d=_0x3e6c0e?parseInt(_0x3e6c0e[0x1]):_0x28be59[_0x20defc(0xc6)],_0x39ce67={},_0x3c551d=[];for(const _0x33e45f of _0x28be59){const _0x26545b=_0x33e45f['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x26545b){const _0x668f8e=_0x26545b[0x1],_0x4d9f0e=_0x668f8e[_0x20defc(0xa4)](':')[0x0];if(!_0x39ce67[_0x4d9f0e])_0x39ce67[_0x4d9f0e]=[];_0x39ce67[_0x4d9f0e][_0x20defc(0xab)](_0x33e45f);}else _0x3c551d[_0x20defc(0xab)](_0x33e45f);}const _0xc23a5c=Object['keys'](_0x39ce67);if(_0xc23a5c['length']===0x0){if(_0x28be59[_0x20defc(0xc6)]<=0x14)return _0x186488[_0x20defc(0xc1)]();return _0x28be59[_0x20defc(0xb1)](0x0,0xf)[_0x20defc(0x98)]('\x0a')+('\x0a...\x20+'+(_0x28be59[_0x20defc(0xc6)]-0xf)+_0x20defc(0xa9));}const _0x1b379d=[_0x20defc(0xaa)+_0x4ec93d+'\x20issues\x20in\x20'+_0xc23a5c[_0x20defc(0xc6)]+'\x20files'];_0x1b379d[_0x20defc(0xab)]('');const _0xdba2fd=0xa;for(const _0x2df59d of _0xc23a5c['slice'](0x0,_0xdba2fd)){const _0x21488b=_0x39ce67[_0x2df59d];if(_0x21488b[_0x20defc(0xc6)]<=0x3){for(const _0x1ee59e of _0x21488b)_0x1b379d[_0x20defc(0xab)]('\x20\x20'+_0x1ee59e);}else _0x1b379d[_0x20defc(0xab)]('\x20\x20'+_0x21488b[0x0]),_0x1b379d[_0x20defc(0xab)](_0x20defc(0xc4)+_0x21488b[_0x20defc(0xc6)]+_0x20defc(0xc8)+_0x2df59d+')');}return _0xc23a5c['length']>_0xdba2fd&&_0x1b379d[_0x20defc(0xab)](_0x20defc(0x9c)+(_0xc23a5c[_0x20defc(0xc6)]-_0xdba2fd)+_0x20defc(0x99)),_0x1b379d[_0x20defc(0x98)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3a631b=a0_0x32b9;(function(_0x50b6db,_0x1003db){const _0x125144=a0_0x32b9,_0x2a32fa=_0x50b6db();while(!![]){try{const _0x46dd3c=parseInt(_0x125144(0x98))/0x1+-parseInt(_0x125144(0x84))/0x2+parseInt(_0x125144(0xa2))/0x3*(parseInt(_0x125144(0xa4))/0x4)+parseInt(_0x125144(0x9a))/0x5+-parseInt(_0x125144(0x7c))/0x6*(parseInt(_0x125144(0x7f))/0x7)+-parseInt(_0x125144(0x8f))/0x8+parseInt(_0x125144(0x7b))/0x9;if(_0x46dd3c===_0x1003db)break;else _0x2a32fa['push'](_0x2a32fa['shift']());}catch(_0x224db9){_0x2a32fa['push'](_0x2a32fa['shift']());}}}(a0_0x4750,0xf1922));Object[a0_0x3a631b(0x97)](exports,a0_0x3a631b(0xa9),{'value':!![]}),exports[a0_0x3a631b(0x8c)]=stripAnsi,exports[a0_0x3a631b(0x80)]=collapseDuplicates,exports[a0_0x3a631b(0x8a)]=collapseWhitespace,exports[a0_0x3a631b(0x9b)]=stripComments,exports[a0_0x3a631b(0x7e)]=smartCrushJson,exports[a0_0x3a631b(0x8d)]=softTruncate;function a0_0x32b9(_0x472f8f,_0xc2c6e9){const _0x475023=a0_0x4750();return a0_0x32b9=function(_0x32b9db,_0x173cac){_0x32b9db=_0x32b9db-0x79;let _0x3665fa=_0x475023[_0x32b9db];return _0x3665fa;},a0_0x32b9(_0x472f8f,_0xc2c6e9);}function stripAnsi(_0x54f112){const _0x3804d6=a0_0x3a631b,_0x58d5f2=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x54f112[_0x3804d6(0x81)](_0x58d5f2,'');}function collapseDuplicates(_0x53eb78){const _0xce350b=a0_0x3a631b,_0x393d5f=_0x53eb78['split']('\x0a');if(_0x393d5f[_0xce350b(0x9f)]<=0x1)return _0x53eb78;const _0xa9735c=[];let _0x334cb6=_0x393d5f[0x0],_0x3f516e=0x1;for(let _0x267573=0x1;_0x267573<_0x393d5f[_0xce350b(0x9f)];_0x267573++){const _0x294776=_0x393d5f[_0x267573];_0x294776===_0x334cb6&&_0x294776[_0xce350b(0xa7)]()[_0xce350b(0x9f)]>0x0?_0x3f516e++:(_0x3f516e>0x1?_0xa9735c[_0xce350b(0x95)](_0x334cb6+_0xce350b(0x79)+_0x3f516e+']'):_0xa9735c[_0xce350b(0x95)](_0x334cb6),_0x334cb6=_0x294776,_0x3f516e=0x1);}return _0x3f516e>0x1?_0xa9735c[_0xce350b(0x95)](_0x334cb6+_0xce350b(0x79)+_0x3f516e+']'):_0xa9735c['push'](_0x334cb6),_0xa9735c[_0xce350b(0x85)]('\x0a');}function collapseWhitespace(_0x38e42a){const _0x20837f=a0_0x3a631b;let _0x9465fc=_0x38e42a[_0x20837f(0x81)](/[ \t]+$/gm,'');return _0x9465fc=_0x9465fc[_0x20837f(0x81)](/\n{4,}/g,_0x20837f(0x87)),_0x9465fc;}function stripComments(_0x227166,_0x44b035){const _0x31ca98=a0_0x3a631b;if(!_0x44b035)return _0x227166;const _0x271a58=_0x227166[_0x31ca98(0x94)]('\x0a');if(_0x271a58[_0x31ca98(0x9f)]<=0x96)return _0x227166;const _0x177a66={'.ts':/^\s*\/\//,'.js':/^\s*\/\//,'.tsx':/^\s*\/\//,'.jsx':/^\s*\/\//,'.py':/^\s*#(?!!)/,'.rb':/^\s*#(?!!)/,'.sh':/^\s*#(?!!)/,'.go':/^\s*\/\//,'.rs':/^\s*\/\//,'.java':/^\s*\/\//,'.c':/^\s*\/\//,'.cpp':/^\s*\/\//,'.cs':/^\s*\/\//,'.swift':/^\s*\/\//,'.kt':/^\s*\/\//,'.yaml':/^\s*#(?!!)/,'.yml':/^\s*#(?!!)/},_0x804a29=_0x177a66[_0x44b035[_0x31ca98(0x8e)]()];if(!_0x804a29)return _0x227166;const _0x199490=_0x271a58[_0x31ca98(0x89)](_0x50742f=>!_0x804a29[_0x31ca98(0x9e)](_0x50742f));return _0x199490['join']('\x0a');}function a0_0x4750(){const _0x34a3e3=['collapseDuplicates','replace','sha','\x20fields,\x20showing\x20','3454552fNQhGm','join','\x20items,\x20','\x0a\x0a\x0a','resolved','filter','collapseWhitespace','parse','stripAnsi','softTruncate','toLowerCase','4024200cltulJ','min','dev','slice','includes','split','push','\x0a...\x20[TrimPrompt:\x20Truncated\x20','defineProperty','1663123VqkPtp','\x20characters\x20of\x20output]\x20...\x0a','269890FtAdsc','stripComments','signature','map','test','length','stringify','isArray','681MDORMa','hash','25492NdRlAw','startsWith','object','trim','funding','__esModule','\x20[x','...\x20+','4847274ziYCpn','6SgIJwQ','integrity','smartCrushJson','3378081MYwmSF'];a0_0x4750=function(){return _0x34a3e3;};return a0_0x4750();}function smartCrushJson(_0x22bcad){const _0x11b2a0=a0_0x3a631b;try{const _0x46ef3d=_0x22bcad['trim']();if(!_0x46ef3d[_0x11b2a0(0xa5)]('['))return null;const _0x437fe1=JSON[_0x11b2a0(0x8b)](_0x46ef3d);if(!Array[_0x11b2a0(0xa1)](_0x437fe1)||_0x437fe1[_0x11b2a0(0x9f)]<0x3)return null;if(typeof _0x437fe1[0x0]!==_0x11b2a0(0xa6)||_0x437fe1[0x0]===null)return null;const _0x39ab53=Object['keys'](_0x437fe1[0x0]);if(_0x39ab53[_0x11b2a0(0x9f)]===0x0)return null;const _0x3274fc=_0x39ab53[_0x11b2a0(0x89)](_0x168445=>{const _0x9c482d=_0x11b2a0,_0x5f3d5f=_0x168445[_0x9c482d(0x8e)]();return!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x88))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x7d))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x82))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0xa3))&&!_0x5f3d5f['includes']('checksum')&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x9c))&&!_0x5f3d5f[_0x9c482d(0x93)](_0x9c482d(0x91))&&_0x5f3d5f!==_0x9c482d(0xa8)&&_0x5f3d5f!=='engines'&&_0x5f3d5f!=='bugs'&&_0x5f3d5f!=='repository';})['slice'](0x0,0x6);if(_0x3274fc[_0x11b2a0(0x9f)]===0x0)return null;const _0x59c87c=[];_0x59c87c['push'](_0x3274fc['join']('|'));const _0x40dca2=0x1e;for(let _0x2bf041=0x0;_0x2bf041<Math[_0x11b2a0(0x90)](_0x437fe1[_0x11b2a0(0x9f)],_0x40dca2);_0x2bf041++){const _0x518b18=_0x3274fc[_0x11b2a0(0x9d)](_0x43335c=>{const _0x2d27ce=_0x11b2a0,_0x5bc273=_0x437fe1[_0x2bf041][_0x43335c];if(_0x5bc273===null||_0x5bc273===undefined)return'';if(typeof _0x5bc273===_0x2d27ce(0xa6))return JSON[_0x2d27ce(0xa0)](_0x5bc273)['substring'](0x0,0x28);return String(_0x5bc273)['substring'](0x0,0x3c);});_0x59c87c[_0x11b2a0(0x95)](_0x518b18[_0x11b2a0(0x85)]('|'));}_0x437fe1[_0x11b2a0(0x9f)]>_0x40dca2&&_0x59c87c[_0x11b2a0(0x95)](_0x11b2a0(0x7a)+(_0x437fe1[_0x11b2a0(0x9f)]-_0x40dca2)+'\x20more\x20rows');_0x59c87c[_0x11b2a0(0x95)]('\x0a('+_0x437fe1[_0x11b2a0(0x9f)]+_0x11b2a0(0x86)+_0x39ab53['length']+_0x11b2a0(0x83)+_0x3274fc[_0x11b2a0(0x9f)]+'\x20key\x20fields)');const _0x26b462=_0x59c87c[_0x11b2a0(0x85)]('\x0a');if(_0x26b462['length']<_0x46ef3d[_0x11b2a0(0x9f)])return _0x26b462;return null;}catch{return null;}}function softTruncate(_0x469bc9,_0x1e1107=0x4e20){const _0x10083f=a0_0x3a631b;if(_0x469bc9[_0x10083f(0x9f)]<=_0x1e1107)return _0x469bc9;const _0x358552=_0x469bc9[_0x10083f(0x94)]('\x0a');if(_0x358552[_0x10083f(0x9f)]<=0xc8)return _0x469bc9;const _0x1a8a86=0x32,_0x13e8f6=0x96,_0x2dd10d=_0x358552[_0x10083f(0x92)](0x0,_0x1a8a86),_0x22e249=_0x358552[_0x10083f(0x92)](_0x358552[_0x10083f(0x9f)]-_0x13e8f6),_0x2c7bee=_0x469bc9[_0x10083f(0x9f)]-(_0x2dd10d[_0x10083f(0x85)]('\x0a')['length']+_0x22e249[_0x10083f(0x85)]('\x0a')[_0x10083f(0x9f)]);return[..._0x2dd10d,_0x10083f(0x96)+_0x2c7bee+_0x10083f(0x99),..._0x22e249][_0x10083f(0x85)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x394644=a0_0x11cf;(function(_0x80570d,_0x9613a4){const _0x4eecb5=a0_0x11cf,_0x58e2ba=_0x80570d();while(!![]){try{const _0x1651cb=parseInt(_0x4eecb5(0xbf))/0x1+parseInt(_0x4eecb5(0xdc))/0x2*(parseInt(_0x4eecb5(0xc5))/0x3)+parseInt(_0x4eecb5(0xcd))/0x4*(parseInt(_0x4eecb5(0xb1))/0x5)+-parseInt(_0x4eecb5(0xc0))/0x6*(parseInt(_0x4eecb5(0xbd))/0x7)+-parseInt(_0x4eecb5(0xcb))/0x8*(-parseInt(_0x4eecb5(0xd2))/0x9)+parseInt(_0x4eecb5(0xc8))/0xa+parseInt(_0x4eecb5(0xbb))/0xb*(-parseInt(_0x4eecb5(0xae))/0xc);if(_0x1651cb===_0x9613a4)break;else _0x58e2ba['push'](_0x58e2ba['shift']());}catch(_0x2176e7){_0x58e2ba['push'](_0x58e2ba['shift']());}}}(a0_0x57aa,0x6197a));var __createBinding=this&&this[a0_0x394644(0xb8)]||(Object[a0_0x394644(0xde)]?function(_0x22d98a,_0x1da065,_0x29c1d1,_0x498da6){const _0x169ed1=a0_0x394644;if(_0x498da6===undefined)_0x498da6=_0x29c1d1;var _0x468b15=Object[_0x169ed1(0xdb)](_0x1da065,_0x29c1d1);(!_0x468b15||(_0x169ed1(0xbe)in _0x468b15?!_0x1da065[_0x169ed1(0xb3)]:_0x468b15['writable']||_0x468b15['configurable']))&&(_0x468b15={'enumerable':!![],'get':function(){return _0x1da065[_0x29c1d1];}}),Object['defineProperty'](_0x22d98a,_0x498da6,_0x468b15);}:function(_0x1eb799,_0x2479cf,_0x5239e2,_0x19fcf8){if(_0x19fcf8===undefined)_0x19fcf8=_0x5239e2;_0x1eb799[_0x19fcf8]=_0x2479cf[_0x5239e2];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x394644(0xde)]?function(_0x55bb19,_0xa91af){const _0x54725e=a0_0x394644;Object[_0x54725e(0xd1)](_0x55bb19,_0x54725e(0xbc),{'enumerable':!![],'value':_0xa91af});}:function(_0x4cd0ce,_0xefc551){const _0x14e2f8=a0_0x394644;_0x4cd0ce[_0x14e2f8(0xbc)]=_0xefc551;}),__importStar=this&&this[a0_0x394644(0xb5)]||(function(){var _0x3d42ba=function(_0x22579e){const _0x19b207=a0_0x11cf;return _0x3d42ba=Object[_0x19b207(0xc3)]||function(_0x4e39db){const _0x3e6563=_0x19b207;var _0x49da0e=[];for(var _0x36c7b5 in _0x4e39db)if(Object[_0x3e6563(0xd9)][_0x3e6563(0xce)][_0x3e6563(0xd6)](_0x4e39db,_0x36c7b5))_0x49da0e[_0x49da0e[_0x3e6563(0xe0)]]=_0x36c7b5;return _0x49da0e;},_0x3d42ba(_0x22579e);};return function(_0x1a4c9d){const _0xe1dd0c=a0_0x11cf;if(_0x1a4c9d&&_0x1a4c9d[_0xe1dd0c(0xb3)])return _0x1a4c9d;var _0x9d4469={};if(_0x1a4c9d!=null){for(var _0x2d94b4=_0x3d42ba(_0x1a4c9d),_0x264b58=0x0;_0x264b58<_0x2d94b4['length'];_0x264b58++)if(_0x2d94b4[_0x264b58]!==_0xe1dd0c(0xbc))__createBinding(_0x9d4469,_0x1a4c9d,_0x2d94b4[_0x264b58]);}return __setModuleDefault(_0x9d4469,_0x1a4c9d),_0x9d4469;};}());function a0_0x57aa(){const _0x120d2d=['No\x20modifications','getOwnPropertyNames','filterGitDiff','6QLGmGm','slice','+++','7388350zCahau','filterGitStatus','\x20lines\x20of\x20description)','111200pnArpC','join','84HxROAN','hasOwnProperty','push','basename','defineProperty','9NtxKlf','substring','map','\x20\x20...\x20+','call','Clean\x20working\x20tree','\x20\x20...\x20(+','prototype','*\x20Branch:\x20','getOwnPropertyDescriptor','250474uNrBVc','\x20\x20??\x20','create','\x20untracked\x20files)','length','split','4513140qnsNsX','entries','startsWith','31945TtsDQD','match','__esModule','filter','__importStar','/\x20(','---END---','__createBinding','trim','filterGitLog','11YISLLQ','default','3959179EEAnqB','get','204052WzJoNj','6jyEssj','\x20(+'];a0_0x57aa=function(){return _0x120d2d;};return a0_0x57aa();}Object[a0_0x394644(0xd1)](exports,a0_0x394644(0xb3),{'value':!![]}),exports[a0_0x394644(0xc9)]=filterGitStatus,exports[a0_0x394644(0xba)]=filterGitLog,exports[a0_0x394644(0xc4)]=filterGitDiff;const path=__importStar(require('path'));function filterGitStatus(_0x511eae){const _0x4741c=a0_0x394644,_0x86a15f=_0x511eae['split']('\x0a')[_0x4741c(0xd4)](_0x550f34=>_0x550f34[_0x4741c(0xb9)]())['filter'](_0x283639=>_0x283639[_0x4741c(0xe0)]>0x0);if(_0x86a15f[_0x4741c(0xe0)]===0x0)return _0x4741c(0xd7);const _0x451501=[],_0x1c0c25=[],_0xf48e59=[];for(const _0xb307f6 of _0x86a15f){if(_0xb307f6[_0x4741c(0xb0)]('##')){const _0x38cc6d=_0xb307f6['replace'](/^##\s*/,'');_0x451501['push'](_0x4741c(0xda)+_0x38cc6d);}else _0xb307f6[_0x4741c(0xb0)]('??')?_0x1c0c25[_0x4741c(0xcf)](_0xb307f6[_0x4741c(0xd3)](0x3)['trim']()):_0xf48e59[_0x4741c(0xcf)](_0xb307f6);}_0xf48e59[_0x4741c(0xe0)]>0x0&&(_0x451501['push']('\x0aChanges:'),_0x451501[_0x4741c(0xcf)](..._0xf48e59['map'](_0x39c701=>'\x20\x20'+_0x39c701)));if(_0x1c0c25['length']>0x0){_0x451501['push']('\x0aUntracked\x20files:');const _0x101287={},_0x495320=[];for(const _0x43a715 of _0x1c0c25){const _0x39a8bb=path['dirname'](_0x43a715);_0x39a8bb==='.'||_0x39a8bb===''?_0x495320[_0x4741c(0xcf)](_0x43a715):(!_0x101287[_0x39a8bb]&&(_0x101287[_0x39a8bb]=[]),_0x101287[_0x39a8bb][_0x4741c(0xcf)](path[_0x4741c(0xd0)](_0x43a715)));}for(const [_0x55ad42,_0x1a7ca7]of Object[_0x4741c(0xaf)](_0x101287)){if(_0x1a7ca7[_0x4741c(0xe0)]>0x5)_0x451501['push'](_0x4741c(0xdd)+_0x55ad42+_0x4741c(0xb6)+_0x1a7ca7[_0x4741c(0xe0)]+_0x4741c(0xdf));else for(const _0x52d8af of _0x1a7ca7){_0x451501['push']('\x20\x20??\x20'+path['join'](_0x55ad42,_0x52d8af));}}for(const _0x4b0dc5 of _0x495320){_0x451501[_0x4741c(0xcf)](_0x4741c(0xdd)+_0x4b0dc5);}}return _0x451501['join']('\x0a');}function a0_0x11cf(_0x5d8b2f,_0x1c3a82){const _0x57aa19=a0_0x57aa();return a0_0x11cf=function(_0x11cf0e,_0x4b1bc7){_0x11cf0e=_0x11cf0e-0xae;let _0x3859e5=_0x57aa19[_0x11cf0e];return _0x3859e5;},a0_0x11cf(_0x5d8b2f,_0x1c3a82);}function filterGitLog(_0x172310){const _0x409bfc=a0_0x394644,_0xc3732b=_0x172310['split'](_0x409bfc(0xb7))[_0x409bfc(0xd4)](_0x230fbb=>_0x230fbb[_0x409bfc(0xb9)]())[_0x409bfc(0xb4)](_0x2d58ed=>_0x2d58ed[_0x409bfc(0xe0)]>0x0);if(_0xc3732b[_0x409bfc(0xe0)]===0x0)return _0x172310;const _0xcb9691=[];for(const _0x1babc8 of _0xc3732b){const _0x5d1c45=_0x1babc8[_0x409bfc(0xe1)]('\x0a'),_0x3b7d53=_0x5d1c45[0x0]||'',_0x52d5ea=_0x5d1c45[_0x409bfc(0xc6)](0x1)['map'](_0x2b4158=>_0x2b4158[_0x409bfc(0xb9)]())[_0x409bfc(0xb4)](_0x54661d=>_0x54661d[_0x409bfc(0xe0)]>0x0);_0xcb9691[_0x409bfc(0xcf)]('-\x20'+_0x3b7d53),_0x52d5ea[_0x409bfc(0xe0)]>0x0&&(_0xcb9691[_0x409bfc(0xcf)]('\x20\x20'+_0x52d5ea[0x0]),_0x52d5ea[_0x409bfc(0xe0)]>0x1&&_0xcb9691[_0x409bfc(0xcf)](_0x409bfc(0xd8)+(_0x52d5ea['length']-0x1)+_0x409bfc(0xca)));}return _0xcb9691[_0x409bfc(0xcc)]('\x0a');}function filterGitDiff(_0x4e28a1){const _0x4b66eb=a0_0x394644,_0x3bc5c0=_0x4e28a1[_0x4b66eb(0xe1)]('\x0a'),_0x44c698=[];let _0x3e64ec='',_0xcd10ac=0x0,_0x4ac582=0x0,_0x24c484=[];const _0x2e48dc=()=>{const _0x237101=_0x4b66eb;if(_0x3e64ec&&(_0xcd10ac>0x0||_0x4ac582>0x0)){_0x44c698[_0x237101(0xcf)]('[file]\x20'+_0x3e64ec+_0x237101(0xc1)+_0xcd10ac+'\x20-'+_0x4ac582+')');const _0x1b5829=0xa,_0x72b435=_0x24c484[_0x237101(0xc6)](0x0,_0x1b5829);for(const _0x3f9e09 of _0x72b435){_0x44c698[_0x237101(0xcf)]('\x20\x20'+_0x3f9e09);}const _0x1f574b=_0xcd10ac+_0x4ac582-_0x1b5829;_0x1f574b>0x0&&_0x44c698[_0x237101(0xcf)](_0x237101(0xd5)+_0x1f574b+'\x20more\x20modifications');}_0xcd10ac=0x0,_0x4ac582=0x0,_0x24c484=[];};for(const _0x260e9e of _0x3bc5c0){if(_0x260e9e['startsWith']('diff\x20--git')){_0x2e48dc();const _0xb79a9d=_0x260e9e[_0x4b66eb(0xb2)](/\sb\/(.+)$/);_0x3e64ec=_0xb79a9d?_0xb79a9d[0x1]:'unknown_file';}else{if(_0x260e9e[_0x4b66eb(0xb0)]('+')&&!_0x260e9e[_0x4b66eb(0xb0)](_0x4b66eb(0xc7)))_0xcd10ac++,_0x24c484[_0x4b66eb(0xcf)](_0x260e9e);else _0x260e9e[_0x4b66eb(0xb0)]('-')&&!_0x260e9e[_0x4b66eb(0xb0)]('---')&&(_0x4ac582++,_0x24c484['push'](_0x260e9e));}}_0x2e48dc();const _0x4d34ea=_0x44c698[_0x4b66eb(0xcc)]('\x0a');return _0x4d34ea[_0x4b66eb(0xe0)]>0x0?_0x4d34ea:_0x4b66eb(0xc2);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x317af4=a0_0x3900;function a0_0x2f3a(){const _0x4a61ab=['\x20more\x20issues','\x20skipped','\x0aFailures:','5837685HVPtDx','Go\x20test:\x20no\x20test\x20files','startsWith','1645405UEoFTL','Go\x20vet:\x20no\x20issues\x20found','\x20failed,\x20','695970osMiTI','name','match','Go\x20test:\x20all\x20tests\x20passed','===\x20RUN','6OaBMUE','27080jDlmHY','filterGoVet','\x20more\x20failures','min','FAIL','push','1800190yePRqI','join','__esModule','Go\x20test:\x20','12BSjQoX','---\x20SKIP:','649816ylVlIz','\x20issues\x20found','2AQSRzF','no\x20test\x20files','trim','6878664zPDWVm','length','\x20passed,\x20','split','includes','lines','PASS','\x20\x20\x20\x20','Go\x20vet:\x20','...\x20+','9FwkYuD'];a0_0x2f3a=function(){return _0x4a61ab;};return a0_0x2f3a();}(function(_0x55bfa7,_0x6cd532){const _0x2d426c=a0_0x3900,_0x412f0=_0x55bfa7();while(!![]){try{const _0xcda887=-parseInt(_0x2d426c(0x1bf))/0x1*(-parseInt(_0x2d426c(0x1c1))/0x2)+-parseInt(_0x2d426c(0x1bd))/0x3*(parseInt(_0x2d426c(0x1b3))/0x4)+parseInt(_0x2d426c(0x1aa))/0x5*(-parseInt(_0x2d426c(0x1b2))/0x6)+-parseInt(_0x2d426c(0x1a7))/0x7+-parseInt(_0x2d426c(0x1c4))/0x8*(-parseInt(_0x2d426c(0x1a3))/0x9)+parseInt(_0x2d426c(0x1b9))/0xa+-parseInt(_0x2d426c(0x1ad))/0xb;if(_0xcda887===_0x6cd532)break;else _0x412f0['push'](_0x412f0['shift']());}catch(_0x3f3cdb){_0x412f0['push'](_0x412f0['shift']());}}}(a0_0x2f3a,0x6a83a));Object['defineProperty'](exports,a0_0x317af4(0x1bb),{'value':!![]}),exports['filterGoTest']=filterGoTest,exports[a0_0x317af4(0x1b4)]=filterGoVet;function filterGoTest(_0x5ca680){const _0x4f46c5=a0_0x317af4,_0x3fb2cb=_0x5ca680[_0x4f46c5(0x19c)]('\x0a');let _0x28f0fd=0x0,_0x2d834c=0x0,_0x677e1=0x0;const _0x426a1e=[],_0x55396e=[];let _0x536239=null;for(const _0x4325ec of _0x3fb2cb){const _0x1f6cfb=_0x4325ec[_0x4f46c5(0x1c3)](),_0x359cd5=_0x1f6cfb[_0x4f46c5(0x1af)](/^ok\s+\S+\s+[\d.]+s/);if(_0x359cd5){_0x55396e[_0x4f46c5(0x1b8)](_0x1f6cfb);continue;}const _0x372056=_0x1f6cfb['match'](/^FAIL\s+\S+/);if(_0x372056){_0x55396e[_0x4f46c5(0x1b8)](_0x1f6cfb);continue;}const _0x448651=_0x1f6cfb[_0x4f46c5(0x1af)](/^--- PASS:/);if(_0x448651){_0x28f0fd++;continue;}const _0x15d263=_0x1f6cfb['match'](/^--- FAIL:\s+(\S+)/);if(_0x15d263){if(_0x536239)_0x426a1e[_0x4f46c5(0x1b8)](_0x536239);_0x536239={'name':_0x15d263[0x1],'lines':[]},_0x2d834c++;continue;}if(_0x1f6cfb[_0x4f46c5(0x1a9)](_0x4f46c5(0x1be))){_0x677e1++;continue;}_0x536239&&_0x1f6cfb['length']>0x0&&!_0x1f6cfb[_0x4f46c5(0x1a9)]('===\x20RUN')&&_0x536239[_0x4f46c5(0x19e)][_0x4f46c5(0x1b8)](_0x4325ec),_0x1f6cfb[_0x4f46c5(0x1a9)](_0x4f46c5(0x1b1))&&(_0x536239&&(_0x426a1e[_0x4f46c5(0x1b8)](_0x536239),_0x536239=null));}if(_0x536239)_0x426a1e[_0x4f46c5(0x1b8)](_0x536239);if(_0x28f0fd===0x0&&_0x2d834c===0x0&&_0x677e1===0x0){if(_0x5ca680[_0x4f46c5(0x19d)](_0x4f46c5(0x19f))&&!_0x5ca680[_0x4f46c5(0x19d)](_0x4f46c5(0x1b7)))return _0x4f46c5(0x1b0);if(_0x5ca680[_0x4f46c5(0x19d)](_0x4f46c5(0x1c2)))return _0x4f46c5(0x1a8);return _0x5ca680;}if(_0x2d834c===0x0){const _0x1f693f=['Go\x20test:\x20'+_0x28f0fd+'\x20passed'];if(_0x677e1>0x0)_0x1f693f[_0x4f46c5(0x1b8)](_0x677e1+_0x4f46c5(0x1a5));return _0x1f693f[_0x4f46c5(0x1ba)](',\x20');}const _0x3e5a3a=[_0x4f46c5(0x1bc)+_0x28f0fd+_0x4f46c5(0x1c6)+_0x2d834c+_0x4f46c5(0x1ac)+_0x677e1+_0x4f46c5(0x1a5)];if(_0x426a1e[_0x4f46c5(0x1c5)]>0x0){_0x3e5a3a[_0x4f46c5(0x1b8)](_0x4f46c5(0x1a6));const _0x34dfe1=0x3;for(let _0x531a12=0x0;_0x531a12<Math[_0x4f46c5(0x1b6)](_0x426a1e[_0x4f46c5(0x1c5)],_0x34dfe1);_0x531a12++){const _0x3ebd15=_0x426a1e[_0x531a12];_0x3e5a3a[_0x4f46c5(0x1b8)]('\x20\x20'+(_0x531a12+0x1)+'.\x20'+_0x3ebd15[_0x4f46c5(0x1ae)]);for(const _0xfc8a83 of _0x3ebd15['lines']['slice'](0x0,0x5)){_0x3e5a3a[_0x4f46c5(0x1b8)](_0x4f46c5(0x1a0)+_0xfc8a83[_0x4f46c5(0x1c3)]());}_0x3ebd15[_0x4f46c5(0x19e)][_0x4f46c5(0x1c5)]>0x5&&_0x3e5a3a[_0x4f46c5(0x1b8)]('\x20\x20\x20\x20...\x20+'+(_0x3ebd15[_0x4f46c5(0x19e)][_0x4f46c5(0x1c5)]-0x5)+'\x20more\x20lines');}_0x426a1e[_0x4f46c5(0x1c5)]>_0x34dfe1&&_0x3e5a3a[_0x4f46c5(0x1b8)]('\x20\x20...\x20+'+(_0x426a1e[_0x4f46c5(0x1c5)]-_0x34dfe1)+_0x4f46c5(0x1b5));}return _0x3e5a3a[_0x4f46c5(0x1ba)]('\x0a');}function a0_0x3900(_0x13bbba,_0x11e1d4){const _0x2f3a2e=a0_0x2f3a();return a0_0x3900=function(_0x390053,_0x5b07d7){_0x390053=_0x390053-0x19c;let _0x361b6d=_0x2f3a2e[_0x390053];return _0x361b6d;},a0_0x3900(_0x13bbba,_0x11e1d4);}function filterGoVet(_0x5d703a){const _0x1167e9=a0_0x317af4,_0x188cc4=_0x5d703a[_0x1167e9(0x19c)]('\x0a')['filter'](_0x1c47dd=>_0x1c47dd[_0x1167e9(0x1c3)]()['length']>0x0);if(_0x188cc4['length']===0x0)return _0x1167e9(0x1ab);if(_0x188cc4['length']<=0x14)return _0x5d703a[_0x1167e9(0x1c3)]();const _0x4bfc11=[_0x1167e9(0x1a1)+_0x188cc4['length']+_0x1167e9(0x1c0)];return _0x4bfc11[_0x1167e9(0x1b8)](..._0x188cc4['slice'](0x0,0xa)),_0x188cc4[_0x1167e9(0x1c5)]>0xa&&_0x4bfc11[_0x1167e9(0x1b8)](_0x1167e9(0x1a2)+(_0x188cc4[_0x1167e9(0x1c5)]-0xa)+_0x1167e9(0x1a4)),_0x4bfc11[_0x1167e9(0x1ba)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x2030d6=a0_0xf9f4;(function(_0x2e1826,_0x5898d6){const _0x4e331b=a0_0xf9f4,_0x4f2912=_0x2e1826();while(!![]){try{const _0x306c30=parseInt(_0x4e331b(0x1db))/0x1*(parseInt(_0x4e331b(0x1bf))/0x2)+parseInt(_0x4e331b(0x1cf))/0x3+parseInt(_0x4e331b(0x1a3))/0x4+parseInt(_0x4e331b(0x1d9))/0x5+parseInt(_0x4e331b(0x17c))/0x6+-parseInt(_0x4e331b(0x1a6))/0x7+parseInt(_0x4e331b(0x1ba))/0x8*(-parseInt(_0x4e331b(0x19e))/0x9);if(_0x306c30===_0x5898d6)break;else _0x4f2912['push'](_0x4f2912['shift']());}catch(_0x2c14b5){_0x4f2912['push'](_0x4f2912['shift']());}}}(a0_0x309d,0xce0cf));function a0_0x309d(){const _0x503982=['features_enabled','cargo\x20check','pip\x20install','endsWith','lines\x20truncated','1784220kXVfWp','filterCargoTest','1RSmugw','lastRedactAudit','trim\x20read','go\x20vet','[lock\x20file]','\x20ls\x20','filterDockerPs','trim\x20npm','includes','binary','npm\x20run\x20test','trim\x20npx','filterGitStatus','./git','9956016Snkebn','filter','toLowerCase','yarn\x20install','\x20ls','pip3\x20install','stripAnsi','skeleton','go\x20test','filterNpmInstall','cargo\x20test','test','pytest','text','compressOutput','filterKubectl','filterTree','filterLs','trim\x20tree','match','filterJestVitest','[code\x20skeleton]','json_crusher','trim\x20pnpm','npm\x20test','length','ansi_strip','secretsFound','pnpm\x20install','redact','collapseDuplicates','\x20tree\x20','lastFeatures','---','252tyVgpU','trim\x20ruff','trim\x20cargo','secretTypes','__esModule','1814384roSfnW','ruff\x20check','some','325934VpAUJb','yadm\x20status','whitespace','getConfig','./generic','startsWith','rewriteCommand','npm\x20install','trim\x20','git\x20diff','../tracker','push','defineProperty','git\x20log','trim\x20pip','trim','pattern','filterDockerLogs','trim\x20git','[binary','1247144uWJufo','pnpm\x20test','git\x20status','filterCat','trim\x20ls','2232924McXYpr','./shell','filterPipInstall','filterPytest','npm\x20i\x20','./devops','../redactor','trim\x20glab','vitest','yadm\x20log','filterRuff','cargo\x20build','yarn\x20test','filterGoVet','trim\x20go','filterGoTest','5007933NwvnWU','filterGrep','cargo\x20clippy','git\x20show','softTruncate'];a0_0x309d=function(){return _0x503982;};return a0_0x309d();}Object[a0_0x2030d6(0x1b2)](exports,a0_0x2030d6(0x1a2),{'value':!![]}),exports[a0_0x2030d6(0x19c)]=exports[a0_0x2030d6(0x1dc)]=void 0x0,exports[a0_0x2030d6(0x18a)]=compressOutput,exports[a0_0x2030d6(0x1ac)]=rewriteCommand;const generic_1=require(a0_0x2030d6(0x1aa)),git_1=require(a0_0x2030d6(0x17b)),python_1=require('./python'),js_1=require('./js'),shell_1=require(a0_0x2030d6(0x1c0)),rust_1=require('./rust'),go_1=require('./go'),devops_1=require(a0_0x2030d6(0x1c4)),redactor_1=require(a0_0x2030d6(0x1c5)),tracker_1=require(a0_0x2030d6(0x1b0));exports[a0_0x2030d6(0x1dc)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x2030d6(0x19c)]=[];function isFeatureEnabled(_0x50cd1f){const _0x33dc54=a0_0x2030d6;try{const _0x552965=tracker_1['tracker'][_0x33dc54(0x1a9)](),_0x6c07f1=_0x552965[_0x33dc54(0x1d4)];if(!_0x6c07f1||_0x6c07f1[_0x50cd1f]===undefined)return!![];return _0x6c07f1[_0x50cd1f]!==![];}catch{return!![];}}function compressOutput(_0x5e529a,_0x41a2ce,_0x200d75,_0xe6dd44=!![]){const _0x507eb1=a0_0x2030d6,_0x553f59=_0x5e529a[_0x507eb1(0x1b5)]();let _0x35df27=_0x41a2ce;_0x200d75['trim']()[_0x507eb1(0x195)]>0x0&&(_0x35df27=_0x41a2ce+'\x0a'+_0x200d75);let _0x2205ea=isFeatureEnabled(_0x507eb1(0x196))?(0x0,generic_1[_0x507eb1(0x182)])(_0x35df27):_0x35df27;const _0x15fea9=[];if(_0x2205ea[_0x507eb1(0x195)]<_0x35df27[_0x507eb1(0x195)])_0x15fea9[_0x507eb1(0x1b1)]('ansi_strip');const _0x31e64a=(_0x70fb51,_0xa13015)=>{const _0x1249b9=_0x507eb1;return _0x15fea9[_0x1249b9(0x1b1)](_0x70fb51),exports[_0x1249b9(0x19c)]=_0x15fea9,_0xa13015;};if(_0xe6dd44&&isFeatureEnabled(_0x507eb1(0x199))){const _0x5727c9=redactor_1['redactor']['redactWithAudit'](_0x2205ea);_0x2205ea=_0x5727c9[_0x507eb1(0x189)],exports['lastRedactAudit']={'secretsFound':_0x5727c9['secretsFound'],'secretTypes':_0x5727c9[_0x507eb1(0x1a1)]};if(_0x5727c9[_0x507eb1(0x197)]>0x0)_0x15fea9[_0x507eb1(0x1b1)](_0x507eb1(0x199));}else exports[_0x507eb1(0x1dc)]={'secretsFound':0x0,'secretTypes':[]};const _0x4d251d=_0x553f59[_0x507eb1(0x17e)](),_0x1e5d03=isFeatureEnabled(_0x507eb1(0x17d));try{if(_0x1e5d03){if(_0x4d251d['includes'](_0x507eb1(0x1bc))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1a7)))return _0x31e64a(_0x507eb1(0x17d),(0x0,git_1[_0x507eb1(0x17a)])(_0x2205ea));if(_0x4d251d['includes'](_0x507eb1(0x1b3))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1c8)))return _0x31e64a(_0x507eb1(0x17d),(0x0,git_1['filterGitLog'])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1af))||_0x4d251d['includes'](_0x507eb1(0x1d2))||_0x4d251d[_0x507eb1(0x176)]('yadm\x20diff'))return _0x31e64a(_0x507eb1(0x17d),(0x0,git_1['filterGitDiff'])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x188))||_0x4d251d['match'](/python3?\s+-m\s+pytest/))return _0x31e64a(_0x507eb1(0x17d),(0x0,python_1[_0x507eb1(0x1c2)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1d6))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x181)))return _0x31e64a('filter',(0x0,python_1[_0x507eb1(0x1c1)])(_0x2205ea));if(_0x4d251d['includes'](_0x507eb1(0x1a4))||_0x4d251d[_0x507eb1(0x176)]('ruff\x20'))return _0x31e64a('filter',(0x0,devops_1[_0x507eb1(0x1c9)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1ad))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1c3))||_0x4d251d[_0x507eb1(0x1d7)]('npm\x20i')||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x198))||_0x4d251d['includes'](_0x507eb1(0x17f)))return _0x31e64a('filter',(0x0,js_1[_0x507eb1(0x185)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)]('jest')||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1c7)))return _0x31e64a(_0x507eb1(0x17d),(0x0,js_1['filterJestVitest'])(_0x2205ea));if(_0x4d251d['includes'](_0x507eb1(0x194))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1bb))||_0x4d251d['includes'](_0x507eb1(0x1cb))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x178)))return _0x31e64a('filter',(0x0,js_1[_0x507eb1(0x190)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x186)))return _0x31e64a(_0x507eb1(0x17d),(0x0,rust_1[_0x507eb1(0x1da)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1ca))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1d5))||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1d1)))return _0x31e64a(_0x507eb1(0x17d),(0x0,rust_1['filterCargoBuild'])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x184)))return _0x31e64a('filter',(0x0,go_1[_0x507eb1(0x1ce)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1de)))return _0x31e64a('filter',(0x0,go_1[_0x507eb1(0x1cc)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x18f)](/docker\s+ps/))return _0x31e64a(_0x507eb1(0x17d),(0x0,devops_1[_0x507eb1(0x1e1)])(_0x2205ea));if(_0x4d251d['match'](/docker\s+images/))return _0x31e64a(_0x507eb1(0x17d),(0x0,devops_1['filterDockerImages'])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x18f)](/docker\s+logs/))return _0x31e64a('filter',(0x0,devops_1[_0x507eb1(0x1b7)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x176)]('kubectl')){const _0x5676bf=_0x4d251d[_0x507eb1(0x18f)](/kubectl\s+(get|logs|describe|apply)/),_0x5eadf6=_0x5676bf?_0x5676bf[0x1]:'get';return _0x31e64a(_0x507eb1(0x17d),(0x0,devops_1[_0x507eb1(0x18b)])(_0x2205ea,_0x5eadf6));}if(_0x4d251d[_0x507eb1(0x18f)](/^(ls|dir)(\s|$)/)||_0x4d251d[_0x507eb1(0x176)](_0x507eb1(0x1e0))||_0x4d251d[_0x507eb1(0x1d7)](_0x507eb1(0x180)))return _0x31e64a(_0x507eb1(0x17d),(0x0,shell_1[_0x507eb1(0x18d)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x18f)](/^tree(\s|$)/)||_0x4d251d['includes'](_0x507eb1(0x19b))||_0x4d251d[_0x507eb1(0x1d7)]('\x20tree'))return _0x31e64a('filter',(0x0,shell_1[_0x507eb1(0x18c)])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x18f)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x325c92=(0x0,shell_1[_0x507eb1(0x1bd)])(_0x2205ea,_0x553f59);if(_0x325c92[_0x507eb1(0x176)](_0x507eb1(0x1df)))_0x15fea9[_0x507eb1(0x1b1)]('lock');else{if(_0x325c92['includes'](_0x507eb1(0x1b9))||_0x325c92[_0x507eb1(0x176)]('[minified\x20file]'))_0x15fea9['push'](_0x507eb1(0x177));else{if(_0x325c92['includes'](_0x507eb1(0x191)))_0x15fea9['push'](_0x507eb1(0x183));else{if(_0x325c92[_0x507eb1(0x176)]('|\x20')&&_0x325c92[_0x507eb1(0x176)](_0x507eb1(0x19d))&&_0x325c92[_0x507eb1(0x195)]<_0x2205ea[_0x507eb1(0x195)]*0.5)_0x15fea9[_0x507eb1(0x1b1)](_0x507eb1(0x192));else{if(_0x325c92[_0x507eb1(0x176)](_0x507eb1(0x1d8)))_0x15fea9['push'](_0x507eb1(0x17d));}}}}if(_0x325c92[_0x507eb1(0x195)]<_0x2205ea[_0x507eb1(0x195)]&&!_0x15fea9[_0x507eb1(0x1a5)](_0x8a5bab=>_0x8a5bab!==_0x507eb1(0x196)&&_0x8a5bab!==_0x507eb1(0x199)))_0x15fea9['push'](_0x507eb1(0x17d));return exports[_0x507eb1(0x19c)]=_0x15fea9,_0x325c92;}if(_0x4d251d['match'](/^find(\s|$)/))return _0x31e64a(_0x507eb1(0x17d),(0x0,shell_1['filterFind'])(_0x2205ea));if(_0x4d251d[_0x507eb1(0x18f)](/^(grep|rg|ripgrep)(\s|$)/))return _0x31e64a(_0x507eb1(0x17d),(0x0,shell_1[_0x507eb1(0x1d0)])(_0x2205ea));}}catch(_0x50a09b){}return isFeatureEnabled(_0x507eb1(0x1a8))&&(_0x2205ea=(0x0,generic_1['collapseWhitespace'])(_0x2205ea),_0x15fea9[_0x507eb1(0x1b1)](_0x507eb1(0x1a8))),_0x2205ea=(0x0,generic_1[_0x507eb1(0x19a)])(_0x2205ea),_0x2205ea=(0x0,generic_1[_0x507eb1(0x1d3)])(_0x2205ea,0x4e20),exports[_0x507eb1(0x19c)]=_0x15fea9,_0x2205ea;}function a0_0xf9f4(_0x35bfb8,_0x500d32){const _0x309dd7=a0_0x309d();return a0_0xf9f4=function(_0xf9f4ed,_0x499993){_0xf9f4ed=_0xf9f4ed-0x176;let _0x1b9c58=_0x309dd7[_0xf9f4ed];return _0x1b9c58;},a0_0xf9f4(_0x35bfb8,_0x500d32);}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_0x2030d6(0x1b8)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':'trim\x20gh'},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x2030d6(0x1c6)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x2030d6(0x1a0)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x2030d6(0x193)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x2030d6(0x1e2)},{'pattern':/^npx\s+/,'prefix':a0_0x2030d6(0x179)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x2030d6(0x1dd)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':a0_0x2030d6(0x1be)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x2030d6(0x18e)},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':'trim\x20kubectl'},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':'trim\x20pytest'},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x2030d6(0x19f)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x2030d6(0x1b4)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x2030d6(0x1cd)}];function rewriteCommand(_0x267352){const _0x222127=a0_0x2030d6,_0x11300a=_0x267352[_0x222127(0x1b5)]();if(_0x11300a[_0x222127(0x1ab)](_0x222127(0x1ae)))return _0x11300a;for(const _0xcb3c77 of REWRITE_RULES){if(_0xcb3c77[_0x222127(0x1b6)][_0x222127(0x187)](_0x11300a))return _0x222127(0x1ae)+_0x11300a;}return _0x11300a;}
|
|
1
|
+
'use strict';const a0_0x35a65e=a0_0x433f;function a0_0x17a0(){const _0x2e0c42=['lastFeatures','filterJestVitest','\x20tree','trim\x20npx','filterDockerPs','[minified\x20file]','toLowerCase','[lock\x20file]','[binary','trim\x20ruff','match','pnpm\x20install','git\x20diff','18070XqzeRu','includes','filterRuff','npm\x20install','features_enabled','cargo\x20build','../tracker','filter','filterCargoBuild','trim\x20pytest','yadm\x20log','---','vitest','yarn\x20install','pytest','./python','cargo\x20check','defineProperty','filterGoTest','collapseDuplicates','pip\x20install','trim\x20gh','cargo\x20clippy','filterNpmInstall','endsWith','1112688GtqIwL','102151gymkiQ','redactWithAudit','lock','kubectl','filterDockerLogs','filterKubectl','npm\x20i','trim\x20read','filterCargoTest','filterCat','compressOutput','70746jLbSgJ','pattern','length','filterTree','ansi_strip','npm\x20i\x20','trim\x20tree','trim\x20npm','rewriteCommand','1ikZHjl','lastRedactAudit','npm\x20run\x20test','getConfig','trim\x20find','filterGitDiff','get','secretsFound','trim\x20pnpm','filterGrep','trim\x20grep','filterFind','24YzokUk','16DXoHId','./rust','yarn\x20test','trim','./go','387DNyFwJ','redactor','\x20ls','git\x20show','whitespace','secretTypes','go\x20vet','binary','trim\x20cargo','stripAnsi','yadm\x20status','trim\x20','1847197RgAvsL','go\x20test','redact','308548ndTRCt','text','test','softTruncate','./js','trim\x20glab','startsWith','ruff\x20check','tracker','cargo\x20test','pip3\x20install','yadm\x20diff','collapseWhitespace','trim\x20go','trim\x20kubectl','lines\x20truncated','push','../redactor','5VbMzLc','3186648YIKZpV','filterGitStatus','trim\x20pip','[code\x20skeleton]','filterPipInstall','./shell','trim\x20git','git\x20status','filterDockerImages','\x20tree\x20','npm\x20test','./git'];a0_0x17a0=function(){return _0x2e0c42;};return a0_0x17a0();}(function(_0x1c4c43,_0x3066ae){const _0x222ca7=a0_0x433f,_0x1719ad=_0x1c4c43();while(!![]){try{const _0x130c3a=parseInt(_0x222ca7(0x15f))/0x1*(-parseInt(_0x222ca7(0x156))/0x2)+-parseInt(_0x222ca7(0x14a))/0x3+parseInt(_0x222ca7(0x180))/0x4*(-parseInt(_0x222ca7(0x192))/0x5)+parseInt(_0x222ca7(0x193))/0x6+parseInt(_0x222ca7(0x14b))/0x7*(-parseInt(_0x222ca7(0x16c))/0x8)+-parseInt(_0x222ca7(0x171))/0x9*(parseInt(_0x222ca7(0x131))/0xa)+-parseInt(_0x222ca7(0x17d))/0xb*(-parseInt(_0x222ca7(0x16b))/0xc);if(_0x130c3a===_0x3066ae)break;else _0x1719ad['push'](_0x1719ad['shift']());}catch(_0x19ce99){_0x1719ad['push'](_0x1719ad['shift']());}}}(a0_0x17a0,0x438bd));Object[a0_0x35a65e(0x142)](exports,'__esModule',{'value':!![]}),exports[a0_0x35a65e(0x19f)]=exports[a0_0x35a65e(0x160)]=void 0x0,exports[a0_0x35a65e(0x155)]=compressOutput,exports[a0_0x35a65e(0x15e)]=rewriteCommand;const generic_1=require('./generic'),git_1=require(a0_0x35a65e(0x19e)),python_1=require(a0_0x35a65e(0x140)),js_1=require(a0_0x35a65e(0x184)),shell_1=require(a0_0x35a65e(0x198)),rust_1=require(a0_0x35a65e(0x16d)),go_1=require(a0_0x35a65e(0x170)),devops_1=require('./devops'),redactor_1=require(a0_0x35a65e(0x191)),tracker_1=require(a0_0x35a65e(0x137));exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x35a65e(0x19f)]=[];function isFeatureEnabled(_0x14aa75){const _0x330b1d=a0_0x35a65e;try{const _0x5ef6d6=tracker_1[_0x330b1d(0x188)][_0x330b1d(0x162)](),_0x29ddb9=_0x5ef6d6[_0x330b1d(0x135)];if(!_0x29ddb9||_0x29ddb9[_0x14aa75]===undefined)return!![];return _0x29ddb9[_0x14aa75]!==![];}catch{return!![];}}function compressOutput(_0x3465a3,_0x2a297e,_0x60532c,_0x3ed1be=!![]){const _0x3476fa=a0_0x35a65e,_0x54769d=_0x3465a3['trim']();let _0x3157d8=_0x2a297e;_0x60532c[_0x3476fa(0x16f)]()[_0x3476fa(0x158)]>0x0&&(_0x3157d8=_0x2a297e+'\x0a'+_0x60532c);let _0x86af51=isFeatureEnabled(_0x3476fa(0x15a))?(0x0,generic_1[_0x3476fa(0x17a)])(_0x3157d8):_0x3157d8;const _0x5d1ae9=[];if(_0x86af51[_0x3476fa(0x158)]<_0x3157d8[_0x3476fa(0x158)])_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x15a));const _0x55fcbe=(_0x50435e,_0x15318c)=>{const _0xe487bf=_0x3476fa;return _0x5d1ae9['push'](_0x50435e),exports[_0xe487bf(0x19f)]=_0x5d1ae9,_0x15318c;};if(_0x3ed1be&&isFeatureEnabled('redact')){const _0x22911a=redactor_1[_0x3476fa(0x172)][_0x3476fa(0x14c)](_0x86af51);_0x86af51=_0x22911a[_0x3476fa(0x181)],exports[_0x3476fa(0x160)]={'secretsFound':_0x22911a[_0x3476fa(0x166)],'secretTypes':_0x22911a[_0x3476fa(0x176)]};if(_0x22911a[_0x3476fa(0x166)]>0x0)_0x5d1ae9['push'](_0x3476fa(0x17f));}else exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};const _0x40dd85=_0x54769d[_0x3476fa(0x1a5)](),_0x5606a8=isFeatureEnabled(_0x3476fa(0x138));try{if(_0x5606a8){if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19a))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x17b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1[_0x3476fa(0x194)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)]('git\x20log')||_0x40dd85['includes'](_0x3476fa(0x13b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1['filterGitLog'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x130))||_0x40dd85['includes'](_0x3476fa(0x174))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x18b)))return _0x55fcbe(_0x3476fa(0x138),(0x0,git_1[_0x3476fa(0x164)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x13f))||_0x40dd85[_0x3476fa(0x1a9)](/python3?\s+-m\s+pytest/))return _0x55fcbe('filter',(0x0,python_1['filterPytest'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x145))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x18a)))return _0x55fcbe('filter',(0x0,python_1[_0x3476fa(0x197)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x187))||_0x40dd85[_0x3476fa(0x132)]('ruff\x20'))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x133)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x134))||_0x40dd85['includes'](_0x3476fa(0x15b))||_0x40dd85[_0x3476fa(0x149)](_0x3476fa(0x151))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x1aa))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x13e)))return _0x55fcbe(_0x3476fa(0x138),(0x0,js_1[_0x3476fa(0x148)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)]('jest')||_0x40dd85['includes'](_0x3476fa(0x13d)))return _0x55fcbe(_0x3476fa(0x138),(0x0,js_1[_0x3476fa(0x1a0)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19d))||_0x40dd85[_0x3476fa(0x132)]('pnpm\x20test')||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x16e))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x161)))return _0x55fcbe('filter',(0x0,js_1[_0x3476fa(0x1a0)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x189)))return _0x55fcbe(_0x3476fa(0x138),(0x0,rust_1[_0x3476fa(0x153)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x136))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x141))||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x147)))return _0x55fcbe(_0x3476fa(0x138),(0x0,rust_1[_0x3476fa(0x139)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x17e)))return _0x55fcbe(_0x3476fa(0x138),(0x0,go_1[_0x3476fa(0x143)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x177)))return _0x55fcbe(_0x3476fa(0x138),(0x0,go_1['filterGoVet'])(_0x86af51));if(_0x40dd85['match'](/docker\s+ps/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x1a3)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/docker\s+images/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x19b)])(_0x86af51));if(_0x40dd85['match'](/docker\s+logs/))return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x14f)])(_0x86af51));if(_0x40dd85['includes'](_0x3476fa(0x14e))){const _0x5b01d=_0x40dd85[_0x3476fa(0x1a9)](/kubectl\s+(get|logs|describe|apply)/),_0x20c95f=_0x5b01d?_0x5b01d[0x1]:_0x3476fa(0x165);return _0x55fcbe(_0x3476fa(0x138),(0x0,devops_1[_0x3476fa(0x150)])(_0x86af51,_0x20c95f));}if(_0x40dd85[_0x3476fa(0x1a9)](/^(ls|dir)(\s|$)/)||_0x40dd85[_0x3476fa(0x132)]('\x20ls\x20')||_0x40dd85[_0x3476fa(0x149)](_0x3476fa(0x173)))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1['filterLs'])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/^tree(\s|$)/)||_0x40dd85[_0x3476fa(0x132)](_0x3476fa(0x19c))||_0x40dd85['endsWith'](_0x3476fa(0x1a1)))return _0x55fcbe('filter',(0x0,shell_1[_0x3476fa(0x159)])(_0x86af51));if(_0x40dd85[_0x3476fa(0x1a9)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x120f04=(0x0,shell_1[_0x3476fa(0x154)])(_0x86af51,_0x54769d);if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a6)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x14d));else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a7))||_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x1a4)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x178));else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x196)))_0x5d1ae9[_0x3476fa(0x190)]('skeleton');else{if(_0x120f04['includes']('|\x20')&&_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x13c))&&_0x120f04[_0x3476fa(0x158)]<_0x86af51[_0x3476fa(0x158)]*0.5)_0x5d1ae9[_0x3476fa(0x190)]('json_crusher');else{if(_0x120f04[_0x3476fa(0x132)](_0x3476fa(0x18f)))_0x5d1ae9['push']('filter');}}}}if(_0x120f04[_0x3476fa(0x158)]<_0x86af51[_0x3476fa(0x158)]&&!_0x5d1ae9['some'](_0x3a176c=>_0x3a176c!==_0x3476fa(0x15a)&&_0x3a176c!==_0x3476fa(0x17f)))_0x5d1ae9[_0x3476fa(0x190)](_0x3476fa(0x138));return exports[_0x3476fa(0x19f)]=_0x5d1ae9,_0x120f04;}if(_0x40dd85[_0x3476fa(0x1a9)](/^find(\s|$)/))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1[_0x3476fa(0x16a)])(_0x86af51));if(_0x40dd85['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x55fcbe(_0x3476fa(0x138),(0x0,shell_1[_0x3476fa(0x168)])(_0x86af51));}}catch(_0x3d4a7d){}return isFeatureEnabled(_0x3476fa(0x175))&&(_0x86af51=(0x0,generic_1[_0x3476fa(0x18c)])(_0x86af51),_0x5d1ae9[_0x3476fa(0x190)]('whitespace')),_0x86af51=(0x0,generic_1[_0x3476fa(0x144)])(_0x86af51),_0x86af51=(0x0,generic_1[_0x3476fa(0x183)])(_0x86af51,0x4e20),exports[_0x3476fa(0x19f)]=_0x5d1ae9,_0x86af51;}function a0_0x433f(_0x251644,_0xd0bf91){const _0x17a066=a0_0x17a0();return a0_0x433f=function(_0x433fe2,_0x5caf00){_0x433fe2=_0x433fe2-0x130;let _0x37cd99=_0x17a066[_0x433fe2];return _0x37cd99;},a0_0x433f(_0x251644,_0xd0bf91);}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x35a65e(0x199)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x35a65e(0x146)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x35a65e(0x185)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x35a65e(0x179)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x35a65e(0x167)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x35a65e(0x15d)},{'pattern':/^npx\s+/,'prefix':a0_0x35a65e(0x1a2)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x35a65e(0x152)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x35a65e(0x169)},{'pattern':/^ls(\s|$)/,'prefix':'trim\x20ls'},{'pattern':/^tree(\s|$)/,'prefix':a0_0x35a65e(0x15c)},{'pattern':/^find\s+/,'prefix':a0_0x35a65e(0x163)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x35a65e(0x18e)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x35a65e(0x13a)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x35a65e(0x1a8)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x35a65e(0x195)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x35a65e(0x18d)}];function rewriteCommand(_0x4aeee8){const _0x1b4eb1=a0_0x35a65e,_0x521519=_0x4aeee8[_0x1b4eb1(0x16f)]();if(_0x521519[_0x1b4eb1(0x186)](_0x1b4eb1(0x17c)))return _0x521519;for(const _0x594581 of REWRITE_RULES){if(_0x594581[_0x1b4eb1(0x157)][_0x1b4eb1(0x182)](_0x521519))return'trim\x20'+_0x521519;}return _0x521519;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x466483=a0_0x3dd5;function a0_0x3dd5(_0x5e3b6a,_0x36b860){const _0x1712db=a0_0x1712();return a0_0x3dd5=function(_0x3dd5f6,_0x2c10e0){_0x3dd5f6=_0x3dd5f6-0x171;let _0x5bc9b7=_0x1712db[_0x3dd5f6];return _0x5bc9b7;},a0_0x3dd5(_0x5e3b6a,_0x36b860);}(function(_0x3086a7,_0x548804){const _0x4a2577=a0_0x3dd5,_0x5a5155=_0x3086a7();while(!![]){try{const _0x24fc51=-parseInt(_0x4a2577(0x193))/0x1+parseInt(_0x4a2577(0x171))/0x2*(parseInt(_0x4a2577(0x172))/0x3)+parseInt(_0x4a2577(0x180))/0x4+parseInt(_0x4a2577(0x188))/0x5*(parseInt(_0x4a2577(0x17c))/0x6)+parseInt(_0x4a2577(0x182))/0x7*(-parseInt(_0x4a2577(0x191))/0x8)+parseInt(_0x4a2577(0x18b))/0x9+-parseInt(_0x4a2577(0x197))/0xa*(parseInt(_0x4a2577(0x17e))/0xb);if(_0x24fc51===_0x548804)break;else _0x5a5155['push'](_0x5a5155['shift']());}catch(_0xd1f715){_0x5a5155['push'](_0x5a5155['shift']());}}}(a0_0x1712,0x663f5));Object[a0_0x466483(0x192)](exports,a0_0x466483(0x178),{'value':!![]}),exports[a0_0x466483(0x17a)]=filterNpmInstall,exports[a0_0x466483(0x195)]=filterJestVitest;function a0_0x1712(){const _0x15bc6a=['9110OFoOFY','Test\x20Runner:\x20','12nntDoO','50352XPoWZr','PASS','\x0aFailures:','\x20passed','\x20lines\x20of\x20trace\x20details\x20truncated)','\x20total)','__esModule','Test\x20Suites:','filterNpmInstall','\x20\x20...\x20(','4490634HLnsFy','join','4411qedLyS','length','426420ZBEVHk','FAIL\x20\x20','371eGzmwn','match','push','\x20passed,\x20','startsWith','added\x20','5hXzkzp','up\x20to\x20date','removed\x20','5887368vnwboY','all','includes','FAIL','trim','NPM:\x20Packages\x20verified/installed\x20successfully','94376xiAsWZ','defineProperty','200543ZDGQWj','Tests:','filterJestVitest','replace'];a0_0x1712=function(){return _0x15bc6a;};return a0_0x1712();}function filterNpmInstall(_0x5aa3ce){const _0x4dd490=a0_0x466483,_0x1a5d79=_0x5aa3ce[_0x4dd490(0x196)](/\r/g,'\x0a'),_0x42b231=_0x1a5d79['split']('\x0a'),_0x539dab=[];for(const _0x3b2c04 of _0x42b231){const _0x49165b=_0x3b2c04['trim']();(_0x49165b[_0x4dd490(0x18d)](_0x4dd490(0x187))||_0x49165b[_0x4dd490(0x18d)](_0x4dd490(0x18a))||_0x49165b['includes']('audited\x20')||_0x49165b[_0x4dd490(0x18d)](_0x4dd490(0x189))||_0x49165b[_0x4dd490(0x18d)]('found\x20'))&&(!_0x49165b[_0x4dd490(0x18d)]('%')&&!_0x49165b[_0x4dd490(0x186)]('⠋')&&!_0x49165b[_0x4dd490(0x186)]('⠙')&&_0x539dab[_0x4dd490(0x184)](_0x49165b));}const _0x1fcc2c=_0x539dab[_0x4dd490(0x17d)]('\x0a')['trim']();return _0x1fcc2c['length']>0x0?_0x1fcc2c:_0x4dd490(0x190);}function filterJestVitest(_0x17ebc4){const _0x3e834a=a0_0x466483,_0x3edc84=_0x17ebc4['split']('\x0a');let _0x192dd1=0x0,_0x1e290e=0x0,_0x2ba3a6=0x0;const _0x6483da=[];let _0x6e62b4=![];for(const _0x3569a5 of _0x3edc84){const _0x2371c9=_0x3569a5[_0x3e834a(0x18f)]();if(_0x2371c9[_0x3e834a(0x186)](_0x3e834a(0x194))||_0x2371c9[_0x3e834a(0x18d)]('Test\x20Files:')){const _0x34a6c6=_0x2371c9[_0x3e834a(0x183)](/(\d+)\s+passed/),_0x261a29=_0x2371c9[_0x3e834a(0x183)](/(\d+)\s+failed/),_0x43d08c=_0x2371c9[_0x3e834a(0x183)](/(\d+)\s+total/);if(_0x34a6c6)_0x192dd1=parseInt(_0x34a6c6[0x1]);if(_0x261a29)_0x1e290e=parseInt(_0x261a29[0x1]);if(_0x43d08c)_0x2ba3a6=parseInt(_0x43d08c[0x1]);continue;}(_0x2371c9[_0x3e834a(0x186)]('❯')||_0x2371c9[_0x3e834a(0x186)]('●')||_0x2371c9[_0x3e834a(0x186)](_0x3e834a(0x181)))&&(_0x6e62b4=!![]),_0x6e62b4&&(_0x2371c9[_0x3e834a(0x17f)]>0x0&&!_0x2371c9[_0x3e834a(0x186)](_0x3e834a(0x179))&&!_0x2371c9[_0x3e834a(0x186)]('Tests:')&&_0x6483da[_0x3e834a(0x184)](_0x3569a5));}if(_0x2ba3a6===0x0&&_0x192dd1===0x0&&_0x1e290e===0x0){if(_0x17ebc4[_0x3e834a(0x18d)](_0x3e834a(0x173))&&!_0x17ebc4[_0x3e834a(0x18d)](_0x3e834a(0x18e))){const _0xde710c=_0x17ebc4[_0x3e834a(0x183)](/(\d+)\s+passed/),_0x2696c4=_0xde710c?_0xde710c[0x1]:_0x3e834a(0x18c);return _0x3e834a(0x198)+_0x2696c4+_0x3e834a(0x175);}return _0x17ebc4;}if(_0x1e290e===0x0&&_0x192dd1>0x0)return _0x3e834a(0x198)+_0x192dd1+_0x3e834a(0x175);const _0x8fbca2=[_0x3e834a(0x198)+_0x192dd1+_0x3e834a(0x185)+_0x1e290e+'\x20failed\x20('+_0x2ba3a6+_0x3e834a(0x177)];if(_0x6483da[_0x3e834a(0x17f)]>0x0){_0x8fbca2['push'](_0x3e834a(0x174));const _0x3146a3=0x19,_0x407c82=_0x6483da['slice'](0x0,_0x3146a3);for(const _0x34498e of _0x407c82){_0x8fbca2[_0x3e834a(0x184)]('\x20\x20'+_0x34498e);}_0x6483da[_0x3e834a(0x17f)]>_0x3146a3&&_0x8fbca2['push'](_0x3e834a(0x17b)+(_0x6483da['length']-_0x3146a3)+_0x3e834a(0x176));}return _0x8fbca2['join']('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2617c4=a0_0x2669;(function(_0x359b46,_0x36222d){const _0x5098a8=a0_0x2669,_0x22a66=_0x359b46();while(!![]){try{const _0x499fb0=-parseInt(_0x5098a8(0xbf))/0x1+-parseInt(_0x5098a8(0xa0))/0x2+-parseInt(_0x5098a8(0xb1))/0x3+parseInt(_0x5098a8(0x9c))/0x4+-parseInt(_0x5098a8(0xa2))/0x5+-parseInt(_0x5098a8(0xb5))/0x6+parseInt(_0x5098a8(0xad))/0x7;if(_0x499fb0===_0x36222d)break;else _0x22a66['push'](_0x22a66['shift']());}catch(_0x2dd7fc){_0x22a66['push'](_0x22a66['shift']());}}}(a0_0x1d42,0x3e269));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x2617c4(0xb6)]=filterPytest,exports[a0_0x2617c4(0x9f)]=filterPipInstall;function filterPytest(_0x25893c){const _0x4bff6c=a0_0x2617c4,_0x2fe08c=_0x25893c[_0x4bff6c(0xa7)]('\x0a');let _0x53dcf1=0x0,_0xb94c57=0x0,_0x1b8717=0x0,_0x1457aa=0x0,_0x168ee1=0x0;const _0x2e0081=[];let _0x75b561=[],_0x3a420c=![];for(const _0x100f98 of _0x2fe08c){const _0x5c819a=_0x100f98['trim']();if(_0x5c819a[_0x4bff6c(0xb9)](_0x4bff6c(0xbe))||_0x5c819a[_0x4bff6c(0xb9)](_0x4bff6c(0xa8))){_0x3a420c=!![];continue;}else(_0x5c819a[_0x4bff6c(0xb9)](_0x4bff6c(0xbb))||_0x5c819a[_0x4bff6c(0xb9)]('===')&&_0x5c819a[_0x4bff6c(0xab)](_0x4bff6c(0xc1)))&&(_0x3a420c=![],_0x75b561[_0x4bff6c(0xa3)]>0x0&&(_0x2e0081[_0x4bff6c(0xc4)](_0x75b561),_0x75b561=[]));if(_0x3a420c){if(_0x5c819a[_0x4bff6c(0xb9)]('___'))_0x75b561[_0x4bff6c(0xa3)]>0x0&&(_0x2e0081['push'](_0x75b561),_0x75b561=[]),_0x75b561[_0x4bff6c(0xc4)](_0x5c819a);else _0x5c819a[_0x4bff6c(0xa3)]>0x0&&_0x75b561[_0x4bff6c(0xc4)](_0x100f98);continue;}if(_0x5c819a[_0x4bff6c(0xb9)]('===')&&_0x5c819a['includes']('\x20in\x20')){const _0x529915=_0x5c819a[_0x4bff6c(0xb2)](/(\d+)\s+passed/),_0x405133=_0x5c819a['match'](/(\d+)\s+failed/),_0xcec90a=_0x5c819a['match'](/(\d+)\s+skipped/),_0x4f4d90=_0x5c819a[_0x4bff6c(0xb2)](/(\d+)\s+xfailed/),_0x3a9a6b=_0x5c819a[_0x4bff6c(0xb2)](/(\d+)\s+xpassed/);if(_0x529915)_0x53dcf1=parseInt(_0x529915[0x1]);if(_0x405133)_0xb94c57=parseInt(_0x405133[0x1]);if(_0xcec90a)_0x1b8717=parseInt(_0xcec90a[0x1]);if(_0x4f4d90)_0x1457aa=parseInt(_0x4f4d90[0x1]);if(_0x3a9a6b)_0x168ee1=parseInt(_0x3a9a6b[0x1]);}}_0x75b561[_0x4bff6c(0xa3)]>0x0&&_0x2e0081[_0x4bff6c(0xc4)](_0x75b561);if(_0x53dcf1===0x0&&_0xb94c57===0x0&&_0x1b8717===0x0&&_0x1457aa===0x0&&_0x168ee1===0x0){if(_0x25893c['includes'](_0x4bff6c(0xc1))&&!_0x25893c[_0x4bff6c(0xab)](_0x4bff6c(0xba)))return _0x4bff6c(0xa5);return _0x25893c;}if(_0xb94c57===0x0&&_0x53dcf1>0x0&&_0x1b8717===0x0&&_0x1457aa===0x0&&_0x168ee1===0x0)return'Pytest:\x20'+_0x53dcf1+'\x20passed';const _0x1c7044=[];_0x1c7044[_0x4bff6c(0xc4)](_0x4bff6c(0xaa)+_0x53dcf1+_0x4bff6c(0xa6));if(_0xb94c57>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0xb94c57+_0x4bff6c(0xbc));if(_0x1b8717>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0x1b8717+_0x4bff6c(0xb0));if(_0x1457aa>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0x1457aa+_0x4bff6c(0xa4));if(_0x168ee1>0x0)_0x1c7044[_0x4bff6c(0xc4)](_0x168ee1+_0x4bff6c(0xa9));const _0x38c087=[_0x1c7044['join'](',\x20')];if(_0x2e0081['length']>0x0){_0x38c087[_0x4bff6c(0xc4)](_0x4bff6c(0x9b));const _0x2d7c9e=0x3,_0x3d6cab=_0x2e0081[_0x4bff6c(0xc7)](0x0,_0x2d7c9e);for(let _0x54e8e6=0x0;_0x54e8e6<_0x3d6cab[_0x4bff6c(0xa3)];_0x54e8e6++){const _0x58f105=_0x3d6cab[_0x54e8e6],_0x246a9a=_0x58f105[0x0]['replace'](/_/g,'')[_0x4bff6c(0x9e)]();_0x38c087[_0x4bff6c(0xc4)]('\x20\x20'+(_0x54e8e6+0x1)+_0x4bff6c(0xb7)+_0x246a9a);const _0x294f24=_0x58f105[_0x4bff6c(0xc7)](0x1),_0x9334b5=_0x294f24['filter'](_0x606be0=>{const _0xf8dcc5=_0x4bff6c,_0x21aa70=_0x606be0[_0xf8dcc5(0x9e)]();return _0x21aa70[_0xf8dcc5(0xb9)]('>')||_0x21aa70[_0xf8dcc5(0xb9)](_0xf8dcc5(0xb8))||_0x21aa70[_0xf8dcc5(0xab)](_0xf8dcc5(0xc5))||_0x21aa70[_0xf8dcc5(0xab)](_0xf8dcc5(0xaf));});for(const _0x467291 of _0x9334b5[_0x4bff6c(0xc7)](0x0,0x8)){_0x38c087[_0x4bff6c(0xc4)](_0x4bff6c(0xbd)+_0x467291);}_0x9334b5[_0x4bff6c(0xa3)]>0x8&&_0x38c087['push'](_0x4bff6c(0xac)+(_0x9334b5[_0x4bff6c(0xa3)]-0x8)+_0x4bff6c(0xa1));}_0x2e0081['length']>_0x2d7c9e&&_0x38c087[_0x4bff6c(0xc4)](_0x4bff6c(0xb3)+(_0x2e0081[_0x4bff6c(0xa3)]-_0x2d7c9e)+_0x4bff6c(0xc2));}return _0x38c087[_0x4bff6c(0x9d)]('\x0a');}function a0_0x2669(_0x1c7d01,_0x484f9b){const _0x1d42b2=a0_0x1d42();return a0_0x2669=function(_0x2669d5,_0x407682){_0x2669d5=_0x2669d5-0x9b;let _0x179714=_0x1d42b2[_0x2669d5];return _0x179714;},a0_0x2669(_0x1c7d01,_0x484f9b);}function a0_0x1d42(){const _0x504ddf=['startsWith','failed','===\x20short\x20test\x20summary\x20info\x20===','\x20failed','\x20\x20\x20\x20','===\x20FAILURES\x20===','487102EHUWWq','filter','passed','\x20more\x20failures\x20truncated','Requirement\x20already\x20satisfied','push','.py:','Collecting','slice','\x0aFailures:','77204zSltAC','join','trim','filterPipInstall','679692pbLXVf','\x20lines\x20of\x20stacktrace\x20truncated)','1249325opbaDA','length','\x20xfailed','Pytest:\x20All\x20tests\x20passed','\x20passed','split','===\x20ERRORS\x20===','\x20xpassed\x20(warning!)','Pytest:\x20','includes','\x20\x20\x20\x20...\x20(','10368302sZgWhd','Downloading','AssertionError:','\x20skipped','119919PsMBwN','match','\x20\x20...\x20+','Successfully\x20installed','774792oKtbHH','filterPytest','.\x20[FAIL]\x20','E\x20\x20\x20'];a0_0x1d42=function(){return _0x504ddf;};return a0_0x1d42();}function filterPipInstall(_0x1451bd){const _0x19aa23=a0_0x2617c4,_0x27f317=_0x1451bd[_0x19aa23(0xa7)]('\x0a'),_0x54717e=[];for(const _0x591181 of _0x27f317){const _0xf2e4b9=_0x591181[_0x19aa23(0x9e)]();_0xf2e4b9['startsWith'](_0x19aa23(0xb4))&&_0x54717e[_0x19aa23(0xc4)](_0xf2e4b9);}if(_0x54717e[_0x19aa23(0xa3)]>0x0)return _0x54717e[_0x19aa23(0x9d)]('\x0a');return _0x27f317[_0x19aa23(0xc0)](_0x21aa6c=>{const _0x5dd1b0=_0x19aa23,_0x17e95a=_0x21aa6c[_0x5dd1b0(0x9e)]();return!_0x17e95a[_0x5dd1b0(0xb9)](_0x5dd1b0(0xc6))&&!_0x17e95a[_0x5dd1b0(0xb9)](_0x5dd1b0(0xae))&&!_0x17e95a[_0x5dd1b0(0xab)]('Using\x20cached')&&!_0x17e95a[_0x5dd1b0(0xb9)](_0x5dd1b0(0xc3));})[_0x19aa23(0x9d)]('\x0a')[_0x19aa23(0x9e)]();}
|