trimprompt 1.0.16 → 1.0.18
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 +10 -0
- package/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.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/index.html +153 -7
- package/mcp.js +1 -1
- package/package.json +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/README.md
CHANGED
|
@@ -8,6 +8,16 @@ It intercepts common shell tool executions, strips ANSI coloring, removes redund
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
## The CSA Engine: How TrimPrompt Works
|
|
12
|
+
|
|
13
|
+
TrimPrompt coined and invented the **CSA (Compression, Security, Audit) Framework** to establish the standard architectural pattern for secure, cost-effective LLM prompt and context optimization:
|
|
14
|
+
|
|
15
|
+
* **C - Compression (Token Optimization):** Intelligent context compression that slashes LLM API token consumption by **60% to 90%** in real-time, preserving full reasoning quality.
|
|
16
|
+
* **S - Security (On-Premise Shielding):** Automated local redaction layer that secures sensitive corporate data, blocking credentials and proprietary keys from leaking to third-party model providers.
|
|
17
|
+
* **A - Audit (Telemetry & ROI Tracking):** Enterprise-grade visibility into developer adoption, cost savings, and compliance metrics from a unified, private dashboard.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
11
21
|
## Features
|
|
12
22
|
* **Zero-Config Interception:** Automatically injects custom PATH shims during installation so that all agent-triggered tools run through the optimizer transparently.
|
|
13
23
|
* **Real-time MCP Proxy:** Intercepts Model Context Protocol (MCP) tool response JSON-RPC streams on the fly to compress large tool outputs.
|
package/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x945da4=a0_0xbf89;(function(_0x5e9608,_0x2b810c){const _0x53dda1=a0_0xbf89,_0x1d6ec9=_0x5e9608();while(!![]){try{const _0x14ca5a=-parseInt(_0x53dda1(0x105))/0x1*(parseInt(_0x53dda1(0xdd))/0x2)+parseInt(_0x53dda1(0xe7))/0x3*(parseInt(_0x53dda1(0xcb))/0x4)+-parseInt(_0x53dda1(0xf1))/0x5*(-parseInt(_0x53dda1(0xc7))/0x6)+-parseInt(_0x53dda1(0xbe))/0x7+parseInt(_0x53dda1(0xe5))/0x8+parseInt(_0x53dda1(0xd0))/0x9*(-parseInt(_0x53dda1(0xd3))/0xa)+-parseInt(_0x53dda1(0xca))/0xb*(parseInt(_0x53dda1(0xfc))/0xc);if(_0x14ca5a===_0x2b810c)break;else _0x1d6ec9['push'](_0x1d6ec9['shift']());}catch(_0x6732fe){_0x1d6ec9['push'](_0x1d6ec9['shift']());}}}(a0_0x4ec9,0x1b9c6));var __createBinding=this&&this[a0_0x945da4(0xc2)]||(Object[a0_0x945da4(0xd6)]?function(_0x1aa0d1,_0x242a27,_0x5023a4,_0x43f92a){const _0x58c3bf=a0_0x945da4;if(_0x43f92a===undefined)_0x43f92a=_0x5023a4;var _0x5c06d2=Object[_0x58c3bf(0x106)](_0x242a27,_0x5023a4);(!_0x5c06d2||(_0x58c3bf(0xe2)in _0x5c06d2?!_0x242a27[_0x58c3bf(0xd5)]:_0x5c06d2[_0x58c3bf(0xd1)]||_0x5c06d2[_0x58c3bf(0xec)]))&&(_0x5c06d2={'enumerable':!![],'get':function(){return _0x242a27[_0x5023a4];}}),Object[_0x58c3bf(0xd8)](_0x1aa0d1,_0x43f92a,_0x5c06d2);}:function(_0x47d88f,_0x5b75ad,_0x3bae05,_0x31678a){if(_0x31678a===undefined)_0x31678a=_0x3bae05;_0x47d88f[_0x31678a]=_0x5b75ad[_0x3bae05];}),__setModuleDefault=this&&this[a0_0x945da4(0xf8)]||(Object['create']?function(_0x24d2d3,_0x2ed65d){const _0x3bfd22=a0_0x945da4;Object[_0x3bfd22(0xd8)](_0x24d2d3,_0x3bfd22(0xf3),{'enumerable':!![],'value':_0x2ed65d});}:function(_0x56598a,_0x18bbdd){const _0x37f015=a0_0x945da4;_0x56598a[_0x37f015(0xf3)]=_0x18bbdd;}),__importStar=this&&this['__importStar']||(function(){var _0x4f52fe=function(_0x206314){const _0x3c8947=a0_0xbf89;return _0x4f52fe=Object[_0x3c8947(0xe3)]||function(_0x3da1c1){const _0x3d31ab=_0x3c8947;var _0x1c4d2a=[];for(var _0x33a243 in _0x3da1c1)if(Object[_0x3d31ab(0xe1)]['hasOwnProperty']['call'](_0x3da1c1,_0x33a243))_0x1c4d2a[_0x1c4d2a[_0x3d31ab(0xd2)]]=_0x33a243;return _0x1c4d2a;},_0x4f52fe(_0x206314);};return function(_0x1428f4){const _0x9b1970=a0_0xbf89;if(_0x1428f4&&_0x1428f4[_0x9b1970(0xd5)])return _0x1428f4;var _0x16a3d3={};if(_0x1428f4!=null){for(var _0x29f0a0=_0x4f52fe(_0x1428f4),_0x2b707b=0x0;_0x2b707b<_0x29f0a0[_0x9b1970(0xd2)];_0x2b707b++)if(_0x29f0a0[_0x2b707b]!=='default')__createBinding(_0x16a3d3,_0x1428f4,_0x29f0a0[_0x2b707b]);}return __setModuleDefault(_0x16a3d3,_0x1428f4),_0x16a3d3;};}());function a0_0x4ec9(){const _0x329f43=['homedir','973294UzyHOc','yadm\x20show','toLowerCase','createHash','__createBinding','kubectl\x20describe','kubectl\x20get','readFileSync','kubectl','635016MvaEDK','ruff\x20','docker-ps','1088472OKePkp','2140YKNevI','includes','endsWith','\x20tree','\x20tree\x20','938259IEgYFa','writable','length','10bjLPgg','writeFileSync','__esModule','create','md5','defineProperty','git-status','parse','ruff','go-vet','71744SYECdi','\x20lines','tree','match','prototype','get','getOwnPropertyNames','round','1674880gjfScs','\x20entries','987YQJHhb','stringify','digest','git\x20status','file','configurable','path','\x20chars','[cached\x20—\x20unchanged\x20since\x20','git-show','5iYIqKd','.trimprompt','default','\x20lines,\x20','cwd','join','mkdirSync','__setModuleDefault','crypto','trim','git-log','12IfMALm','git\x20log','slice','startsWith','existsSync','dedup','timestamp','utf8','hash','1IYmRpw','getOwnPropertyDescriptor','update'];a0_0x4ec9=function(){return _0x329f43;};return a0_0x4ec9();}function a0_0xbf89(_0x4f299a,_0x2b94ed){_0x4f299a=_0x4f299a-0xbe;const _0x4ec9c4=a0_0x4ec9();let _0xbf89bf=_0x4ec9c4[_0x4f299a];return _0xbf89bf;}Object[a0_0x945da4(0xd8)](exports,a0_0x945da4(0xd5),{'value':!![]}),exports[a0_0x945da4(0x101)]=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x945da4(0xed))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x945da4(0xf9))),CACHE_DIR=path['join'](os[a0_0x945da4(0x108)](),a0_0x945da4(0xf2)),CACHE_FILE=path[a0_0x945da4(0xf6)](CACHE_DIR,'cache.json'),MAX_ENTRIES=0x12c,TTL_SECONDS={'file':0x78,'git-status':0x1e,'git-log':0x3c,'git-show':0xe10,'ls':0x3c,'tree':0x3c,'docker-ps':0x1e,'docker-images':0x3c,'kubectl':0x1e,'ruff':0x3c,'go-vet':0x3c};function classifyCommand(_0x283b92){const _0x372e31=a0_0x945da4,_0x2c2229=_0x283b92[_0x372e31(0xfa)]()[_0x372e31(0xc0)]();if(_0x2c2229[_0x372e31(0xe0)](/^(cat|head|tail|read|bat)\s/))return _0x372e31(0xeb);if(_0x2c2229[_0x372e31(0xcc)](_0x372e31(0xea))||_0x2c2229['includes']('yadm\x20status'))return _0x372e31(0xd9);if(_0x2c2229[_0x372e31(0xcc)](_0x372e31(0xfd))||_0x2c2229[_0x372e31(0xcc)]('yadm\x20log'))return'git-log';if(_0x2c2229[_0x372e31(0xcc)]('git\x20show')||_0x2c2229['includes'](_0x372e31(0xbf)))return _0x372e31(0xf0);if(_0x2c2229[_0x372e31(0xe0)](/^(ls|dir)(\s|$)/)||_0x2c2229[_0x372e31(0xcc)]('\x20ls\x20')||_0x2c2229[_0x372e31(0xcd)]('\x20ls'))return'ls';if(_0x2c2229[_0x372e31(0xe0)](/^tree(\s|$)/)||_0x2c2229[_0x372e31(0xcc)](_0x372e31(0xcf))||_0x2c2229[_0x372e31(0xcd)](_0x372e31(0xce)))return _0x372e31(0xdf);if(_0x2c2229[_0x372e31(0xe0)](/docker\s+ps/))return _0x372e31(0xc9);if(_0x2c2229[_0x372e31(0xe0)](/docker\s+images/))return'docker-images';if(_0x2c2229[_0x372e31(0xcc)](_0x372e31(0xc4))||_0x2c2229['includes'](_0x372e31(0xc3)))return _0x372e31(0xc6);if(_0x2c2229[_0x372e31(0xcc)]('ruff\x20check')||_0x2c2229[_0x372e31(0xcc)](_0x372e31(0xc8)))return _0x372e31(0xdb);if(_0x2c2229[_0x372e31(0xcc)]('go\x20vet'))return _0x372e31(0xdc);return'';}function md5(_0x4380ac){const _0xc472c=a0_0x945da4;return crypto[_0xc472c(0xc1)](_0xc472c(0xd7))[_0xc472c(0x107)](_0x4380ac)[_0xc472c(0xe9)]('hex');}function loadStore(){const _0x18393c=a0_0x945da4;try{if(fs[_0x18393c(0x100)](CACHE_FILE))return JSON[_0x18393c(0xda)](fs[_0x18393c(0xc5)](CACHE_FILE,_0x18393c(0x103)));}catch{}return{};}function saveStore(_0x443534){const _0x146b88=a0_0x945da4;try{if(!fs[_0x146b88(0x100)](CACHE_DIR))fs[_0x146b88(0xf7)](CACHE_DIR,{'recursive':!![]});const _0x5770e5=Object['keys'](_0x443534);if(_0x5770e5['length']>MAX_ENTRIES){const _0x39f49a=_0x5770e5['sort']((_0x221eeb,_0x1bf5ca)=>_0x443534[_0x221eeb][_0x146b88(0x102)]-_0x443534[_0x1bf5ca]['timestamp']);for(const _0x4940be of _0x39f49a[_0x146b88(0xfe)](0x0,_0x5770e5[_0x146b88(0xd2)]-MAX_ENTRIES)){delete _0x443534[_0x4940be];}}fs[_0x146b88(0xd4)](CACHE_FILE,JSON[_0x146b88(0xe8)](_0x443534),'utf8');}catch{}}function buildSummary(_0x48b860,_0x2d9e7f){const _0x87ebae=a0_0x945da4,_0xc1e347=_0x48b860['split']('\x0a')[_0x87ebae(0xd2)],_0x575849=_0x48b860[_0x87ebae(0xd2)];if(_0x2d9e7f==='file')return _0xc1e347+_0x87ebae(0xf4)+_0x575849+_0x87ebae(0xee);if(_0x2d9e7f===_0x87ebae(0xd9))return _0xc1e347+_0x87ebae(0xde);if(_0x2d9e7f===_0x87ebae(0xfb))return _0xc1e347+_0x87ebae(0xe6);if(_0x2d9e7f[_0x87ebae(0xff)]('docker'))return _0xc1e347+_0x87ebae(0xde);return _0xc1e347+_0x87ebae(0xf4)+_0x575849+_0x87ebae(0xee);}function dedup(_0x4da1ca,_0x77ac49){const _0x102861=a0_0x945da4;try{const _0xfb70f9=classifyCommand(_0x4da1ca);if(!_0xfb70f9)return null;const _0x332d09=TTL_SECONDS[_0xfb70f9];if(!_0x332d09)return null;const _0x55615c=process[_0x102861(0xf5)](),_0x87c747=md5(_0x55615c+'::'+_0x4da1ca[_0x102861(0xfa)]()),_0x5a8a54=md5(_0x77ac49),_0x3e2b0a=Date['now'](),_0x29ef39=loadStore(),_0x2b987e=_0x29ef39[_0x87c747];if(_0x2b987e&&_0x2b987e[_0x102861(0x104)]===_0x5a8a54&&_0x3e2b0a-_0x2b987e[_0x102861(0x102)]<_0x332d09*0x3e8){const _0xbc3ba9=Math[_0x102861(0xe4)]((_0x3e2b0a-_0x2b987e[_0x102861(0x102)])/0x3e8);return _0x102861(0xef)+_0xbc3ba9+'s\x20ago,\x20'+_0x2b987e['summary']+']';}_0x29ef39[_0x87c747]={'hash':_0x5a8a54,'summary':buildSummary(_0x77ac49,_0xfb70f9),'timestamp':_0x3e2b0a,'chars':_0x77ac49[_0x102861(0xd2)]},saveStore(_0x29ef39);}catch{}return null;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0x35b5c8=a0_0x1ba3;(function(_0x36e628,_0x570033){const _0x4dfafc=a0_0x1ba3,_0x2ce646=_0x36e628();while(!![]){try{const _0x4a54cd=parseInt(_0x4dfafc(0x149))/0x1+parseInt(_0x4dfafc(0x179))/0x2*(parseInt(_0x4dfafc(0xff))/0x3)+-parseInt(_0x4dfafc(0x11e))/0x4*(parseInt(_0x4dfafc(0x103))/0x5)+-parseInt(_0x4dfafc(0xfc))/0x6+-parseInt(_0x4dfafc(0x169))/0x7+-parseInt(_0x4dfafc(0x12f))/0x8+parseInt(_0x4dfafc(0xf1))/0x9;if(_0x4a54cd===_0x570033)break;else _0x2ce646['push'](_0x2ce646['shift']());}catch(_0x45060d){_0x2ce646['push'](_0x2ce646['shift']());}}}(a0_0x506a,0x5563f));function a0_0x506a(){const _0x428ac1=['platform','=============================================','npx','error','install\x20or\x20uninstall','set','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','env','toLowerCase','modelcontextprotocol','<server-command>','argument','some','hasOwnProperty','config','yarn','argv','--pretty','Reduction\x20Rate:\x20\x20\x20\x20','--merges','claude-3-5-sonnet','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','exitCode','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','4359698KEitQa','help','alias','exit','status','redaction_enabled','savings_percentage','Install\x20or\x20uninstall\x20system\x20command\x20shims','mcp-proxy','rewrite','__importStar','action','-10','description','stdout','__createBinding','2imCStQ','mcp','git','bun','installShims','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','Command\x20line\x20to\x20evaluate','raw_cost_usd','slice','node','log','Start\x20the\x20local\x20developer\x20dashboard','--no-merges','-p,\x20--port\x20<number>','---------------------------------------------','__setModuleDefault','Port\x20to\x20run\x20the\x20dashboard\x20on','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','--oneline','Model\x20Context:\x20\x20\x20\x20\x20','default','write','13733226wRryAR','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','shims','executeCommand','--branch','-m,\x20--model\x20<string>','Error:\x20Value\x20required\x20for\x20set\x20action','message','pnpm','<commandLine>','total_compressed_tokens','1817274HyBNSf','configurable','resolve','1829661UqGYrk','mcp-server','defineProperty','model','125CmLPPW','Config\x20set\x20','true','length','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','uninstallShims','tracker','option','catch','\x20=\x20','then','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','cmd','--help','1.0.0','./tracker','--max-count','test','version','logExecution','yadm','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','dedup','join','@modelcontextprotocol/','-50','88156NhxkWj','getConfig','command','getStatsSummary','-sb','proxy','Command','Manage\x20local\x20configuration\x20parameters','__esModule','Show\x20token\x20and\x20cost\x20savings\x20summary','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','--min-parents','model_name','toLocaleString','./shims','push','3262280hLOUFs','\x20(after\x20Trim)','every','--version','Arguments\x20for\x20the\x20target\x20MCP\x20server','trim','name','args','dashboard','stderr','port','-bs','stats','=============================================\x0a','\x20(before\x20Trim)','toFixed','npm','./filters','call','[server-args...]','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','Estimated\x20Cost:\x20\x20\x20\x20$','\x0a=============================================','parse','./dashboard','<action>','98411oaGRgP','rewriteCommand','uninstall','get\x20or\x20set','server-mcp','startsWith','includes'];a0_0x506a=function(){return _0x428ac1;};return a0_0x506a();}var __createBinding=this&&this[a0_0x35b5c8(0x178)]||(Object['create']?function(_0x520610,_0x319a12,_0x7876e,_0x1b4642){const _0xca7e71=a0_0x35b5c8;if(_0x1b4642===undefined)_0x1b4642=_0x7876e;var _0xbf6706=Object['getOwnPropertyDescriptor'](_0x319a12,_0x7876e);(!_0xbf6706||('get'in _0xbf6706?!_0x319a12[_0xca7e71(0x126)]:_0xbf6706['writable']||_0xbf6706[_0xca7e71(0xfd)]))&&(_0xbf6706={'enumerable':!![],'get':function(){return _0x319a12[_0x7876e];}}),Object['defineProperty'](_0x520610,_0x1b4642,_0xbf6706);}:function(_0x14d40f,_0x2d10ec,_0x41e2a6,_0x3e5389){if(_0x3e5389===undefined)_0x3e5389=_0x41e2a6;_0x14d40f[_0x3e5389]=_0x2d10ec[_0x41e2a6];}),__setModuleDefault=this&&this[a0_0x35b5c8(0xea)]||(Object['create']?function(_0x1d465f,_0x4b3f15){const _0x77b7c8=a0_0x35b5c8;Object[_0x77b7c8(0x101)](_0x1d465f,_0x77b7c8(0xef),{'enumerable':!![],'value':_0x4b3f15});}:function(_0x5964fe,_0x178022){_0x5964fe['default']=_0x178022;}),__importStar=this&&this[a0_0x35b5c8(0x173)]||(function(){var _0x40a87b=function(_0x50b4a5){return _0x40a87b=Object['getOwnPropertyNames']||function(_0x1c4ea8){const _0x3c450f=a0_0x1ba3;var _0x333039=[];for(var _0x42b56c in _0x1c4ea8)if(Object['prototype'][_0x3c450f(0x15d)][_0x3c450f(0x141)](_0x1c4ea8,_0x42b56c))_0x333039[_0x333039[_0x3c450f(0x106)]]=_0x42b56c;return _0x333039;},_0x40a87b(_0x50b4a5);};return function(_0x46bb30){const _0x2d7bbf=a0_0x1ba3;if(_0x46bb30&&_0x46bb30['__esModule'])return _0x46bb30;var _0x408b9b={};if(_0x46bb30!=null){for(var _0x38578b=_0x40a87b(_0x46bb30),_0x3c59bf=0x0;_0x3c59bf<_0x38578b[_0x2d7bbf(0x106)];_0x3c59bf++)if(_0x38578b[_0x3c59bf]!==_0x2d7bbf(0xef))__createBinding(_0x408b9b,_0x46bb30,_0x38578b[_0x3c59bf]);}return __setModuleDefault(_0x408b9b,_0x46bb30),_0x408b9b;};}());Object[a0_0x35b5c8(0x101)](exports,'__esModule',{'value':!![]});const commander_1=require('commander'),executor_1=require('./executor'),filters_1=require(a0_0x35b5c8(0x140)),tracker_1=require(a0_0x35b5c8(0x113)),cache_1=require('./cache'),shims_1=require(a0_0x35b5c8(0x12d)),dashboard_1=require(a0_0x35b5c8(0x147)),program=new commander_1[(a0_0x35b5c8(0x124))]();function isDisabled(){const _0x5ac4ed=a0_0x35b5c8;return process[_0x5ac4ed(0x157)]['TRIMPROMPT_DISABLED']==='1';}function adjustCommandArgs(_0x276edd,_0x272512){const _0x5474fc=a0_0x35b5c8,_0x448ec8=_0x276edd[_0x5474fc(0x158)]();if(_0x448ec8===_0x5474fc(0xdd)||_0x448ec8===_0x5474fc(0x118)){const _0x515eca=_0x272512[0x0];if(_0x515eca===_0x5474fc(0x16d)){const _0x27c15f=_0x272512['slice'](0x1),_0x3e7bb2=_0x27c15f['length']===0x0||_0x27c15f[_0x5474fc(0x131)](_0x23f41f=>{const _0x486119=_0x5474fc;return _0x23f41f==='-b'||_0x23f41f===_0x486119(0xf5)||_0x23f41f===_0x486119(0x122)||_0x23f41f===_0x486119(0x13a)||_0x23f41f==='-s'||_0x23f41f==='--short';});if(_0x3e7bb2)return{'cmd':_0x276edd,'args':['status','--porcelain','-b']};}else{if(_0x515eca==='log'){const _0x3197e8=_0x272512[_0x5474fc(0xe3)](0x1),_0x1f065e=_0x3197e8[_0x5474fc(0x15c)](_0x4377bd=>_0x4377bd[_0x5474fc(0x14e)](_0x5474fc(0xed))||_0x4377bd[_0x5474fc(0x14e)](_0x5474fc(0x161))||_0x4377bd['startsWith']('--format')),_0x566007=_0x3197e8[_0x5474fc(0x15c)](_0x2aa0fe=>_0x2aa0fe[_0x5474fc(0x14e)]('-')&&/^\d+$/[_0x5474fc(0x115)](_0x2aa0fe[_0x5474fc(0xe3)](0x1))||_0x2aa0fe==='-n'||_0x2aa0fe['startsWith'](_0x5474fc(0x114))),_0x2eef64=[..._0x272512];if(!_0x1f065e){const _0x1c283a=_0x5474fc(0xec);_0x2eef64[_0x5474fc(0x12e)](process[_0x5474fc(0x150)]==='win32'?'\x22'+_0x1c283a+'\x22':_0x1c283a);}!_0x566007&&(_0x1f065e?_0x2eef64[_0x5474fc(0x12e)](_0x5474fc(0x11d)):_0x2eef64['push'](_0x5474fc(0x175)));const _0x4e675d=_0x3197e8[_0x5474fc(0x15c)](_0x5d0e7e=>_0x5d0e7e===_0x5474fc(0x163)||_0x5d0e7e===_0x5474fc(0xe7)||_0x5d0e7e[_0x5474fc(0x14e)](_0x5474fc(0x12a)));return!_0x4e675d&&!_0x566007&&_0x2eef64[_0x5474fc(0x12e)](_0x5474fc(0xe7)),{'cmd':_0x276edd,'args':_0x2eef64};}}}return{'cmd':_0x276edd,'args':_0x272512};}function isMcpServerExecution(_0x74be96,_0x21af53){const _0x455c72=a0_0x35b5c8,_0x1a3b43=_0x74be96[_0x455c72(0x158)](),_0x48305c=_0x21af53[_0x455c72(0x11b)]('\x20')['toLowerCase']();if(_0x1a3b43[_0x455c72(0x14f)]('mcp')&&(_0x1a3b43[_0x455c72(0x14f)]('server')||_0x1a3b43['includes'](_0x455c72(0x123))))return!![];if(_0x1a3b43===_0x455c72(0x152)||_0x1a3b43===_0x455c72(0xe4)||_0x1a3b43===_0x455c72(0xde)||_0x1a3b43===_0x455c72(0x13f)||_0x1a3b43===_0x455c72(0xf9)||_0x1a3b43===_0x455c72(0x15f)){if(_0x48305c[_0x455c72(0x14f)](_0x455c72(0x11c))||_0x48305c[_0x455c72(0x14f)](_0x455c72(0x159))||_0x48305c[_0x455c72(0x14f)](_0x455c72(0x100))||_0x48305c[_0x455c72(0x14f)](_0x455c72(0x14d)))return!![];}if(_0x21af53[_0x455c72(0x15c)](_0x2c6bba=>{const _0x10c789=_0x455c72,_0xf2bc25=_0x2c6bba[_0x10c789(0x158)]();return _0xf2bc25[_0x10c789(0x14f)](_0x10c789(0x100))||_0xf2bc25[_0x10c789(0x14f)](_0x10c789(0x14d))||_0xf2bc25[_0x10c789(0x14f)]('@modelcontextprotocol/')||_0xf2bc25==='mcp-proxy'||_0xf2bc25===_0x10c789(0x17a);}))return!![];return![];}function a0_0x1ba3(_0x14a5da,_0x1b693a){const _0x506a81=a0_0x506a();return a0_0x1ba3=function(_0x1ba338,_0x1a987d){_0x1ba338=_0x1ba338-0xdd;let _0x18be66=_0x506a81[_0x1ba338];return _0x18be66;},a0_0x1ba3(_0x14a5da,_0x1b693a);}async function runProxy(_0x26f195){const _0x134996=a0_0x35b5c8;if(_0x26f195[_0x134996(0x106)]===0x0){program[_0x134996(0x16a)]();return;}const _0x521632=_0x26f195[0x0],_0x412159=_0x26f195[_0x134996(0xe3)](0x1),_0x2689b3=_0x26f195['join']('\x20');if(isDisabled()){const _0x30cea9=await(0x0,executor_1[_0x134996(0xf4)])(_0x521632,_0x412159);process['stdout'][_0x134996(0xf0)](_0x30cea9[_0x134996(0x177)]),process[_0x134996(0x138)][_0x134996(0xf0)](_0x30cea9[_0x134996(0x138)]),process[_0x134996(0x16c)](_0x30cea9[_0x134996(0x166)]);}if(isMcpServerExecution(_0x521632,_0x412159)){console['error'](_0x134996(0x119));const {runMcpProxy:_0x45fa0a}=await Promise[_0x134996(0xfe)]()[_0x134996(0x10e)](()=>__importStar(require('./mcp')));_0x45fa0a(_0x521632,_0x412159);return;}const _0x37387a=adjustCommandArgs(_0x521632,_0x412159),_0x3fd4d4=await(0x0,executor_1[_0x134996(0xf4)])(_0x37387a[_0x134996(0x110)],_0x37387a[_0x134996(0x136)]),_0x1d68b9=(0x0,filters_1['compressOutput'])(_0x2689b3,_0x3fd4d4[_0x134996(0x177)],_0x3fd4d4[_0x134996(0x138)],tracker_1['tracker'][_0x134996(0x11f)]()[_0x134996(0x16e)]),_0x5c4878=_0x3fd4d4[_0x134996(0x177)]+(_0x3fd4d4[_0x134996(0x138)][_0x134996(0x134)]()[_0x134996(0x106)]>0x0?'\x0a'+_0x3fd4d4[_0x134996(0x138)]:''),_0x187406=_0x1d68b9['length']<_0x5c4878[_0x134996(0x106)]?_0x1d68b9:_0x5c4878,_0x3e9629=_0x3fd4d4[_0x134996(0x166)]===0x0?(0x0,cache_1[_0x134996(0x11a)])(_0x2689b3,_0x187406):null;tracker_1[_0x134996(0x10a)][_0x134996(0x117)](_0x2689b3,_0x5c4878,_0x3e9629||_0x187406,_0x3fd4d4[_0x134996(0x166)]),_0x3fd4d4[_0x134996(0x166)]===0x0?process[_0x134996(0x177)][_0x134996(0xf0)](_0x187406+'\x0a'):(process[_0x134996(0x177)][_0x134996(0xf0)](_0x1d68b9+'\x0a'),_0x3fd4d4[_0x134996(0x138)][_0x134996(0x134)]()[_0x134996(0x106)]>0x0&&!_0x1d68b9[_0x134996(0x14f)](_0x3fd4d4[_0x134996(0x138)][_0x134996(0x134)]())&&process[_0x134996(0x138)][_0x134996(0xf0)](_0x3fd4d4[_0x134996(0x138)]+'\x0a')),process[_0x134996(0x16c)](_0x3fd4d4[_0x134996(0x166)]);}program[a0_0x35b5c8(0x135)]('trim')[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x107))[a0_0x35b5c8(0x116)](a0_0x35b5c8(0x112)),program[a0_0x35b5c8(0x120)]('ui')[a0_0x35b5c8(0x16b)](a0_0x35b5c8(0x137))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0xe6))[a0_0x35b5c8(0x10b)](a0_0x35b5c8(0xe8),a0_0x35b5c8(0xeb),'4000')['action'](_0x3305dd=>{const _0x1be2e6=a0_0x35b5c8,_0x2b681f=parseInt(_0x3305dd[_0x1be2e6(0x139)],0xa);(0x0,dashboard_1['startDashboard'])(_0x2b681f);}),program[a0_0x35b5c8(0x120)](a0_0x35b5c8(0x13b))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x127))[a0_0x35b5c8(0x10b)](a0_0x35b5c8(0xf6),a0_0x35b5c8(0xe0),a0_0x35b5c8(0x164))['action'](_0x493c02=>{const _0xe00eed=a0_0x35b5c8,_0x5a9e80=tracker_1[_0xe00eed(0x10a)][_0xe00eed(0x121)](_0x493c02[_0xe00eed(0x102)]);console[_0xe00eed(0xe5)](_0xe00eed(0x145)),console['log']('\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20'),console[_0xe00eed(0xe5)](_0xe00eed(0x151)),console['log'](_0xe00eed(0xee)+_0x5a9e80[_0xe00eed(0x12b)]),console[_0xe00eed(0xe5)](_0xe00eed(0x143)+_0x5a9e80['total_raw_tokens'][_0xe00eed(0x12c)]()),console[_0xe00eed(0xe5)](_0xe00eed(0x129)+_0x5a9e80[_0xe00eed(0xfb)][_0xe00eed(0x12c)]()),console[_0xe00eed(0xe5)]('Tokens\x20Saved:\x20\x20\x20\x20\x20\x20'+_0x5a9e80['total_tokens_saved'][_0xe00eed(0x12c)]()),console['log'](_0xe00eed(0x162)+_0x5a9e80[_0xe00eed(0x16f)]+'%'),console[_0xe00eed(0xe5)](_0xe00eed(0x144)+_0x5a9e80[_0xe00eed(0xe2)][_0xe00eed(0x13e)](0x4)+_0xe00eed(0x13d)),console[_0xe00eed(0xe5)](_0xe00eed(0x167)+_0x5a9e80['compressed_cost_usd'][_0xe00eed(0x13e)](0x4)+_0xe00eed(0x130)),console[_0xe00eed(0xe5)](_0xe00eed(0xe9)),console['log'](_0xe00eed(0x10f)+_0x5a9e80['money_saved_usd'][_0xe00eed(0x13e)](0x4)+'\x20USD'),console[_0xe00eed(0xe5)](_0xe00eed(0x13c));}),program['command'](a0_0x35b5c8(0x15e))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x125))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x148),a0_0x35b5c8(0x14c))[a0_0x35b5c8(0x15b)]('<key>','config\x20parameter\x20name')['argument']('[value]','value\x20to\x20set')['action']((_0x2dd95b,_0x318466,_0xb7d782)=>{const _0xeb4bd=a0_0x35b5c8;if(_0x2dd95b==='get'){const _0x56e30e=tracker_1['tracker']['getConfig']();console[_0xeb4bd(0xe5)](_0x318466+':\x20'+_0x56e30e[_0x318466]);}else{if(_0x2dd95b===_0xeb4bd(0x155)){_0xb7d782===undefined&&(console['error'](_0xeb4bd(0xf7)),process[_0xeb4bd(0x16c)](0x1));let _0x375924=_0xb7d782;if(_0xb7d782===_0xeb4bd(0x105))_0x375924=!![];if(_0xb7d782==='false')_0x375924=![];if(/^\d+$/[_0xeb4bd(0x115)](_0xb7d782))_0x375924=parseInt(_0xb7d782,0xa);tracker_1['tracker']['setConfig'](_0x318466,_0x375924),console['log'](_0xeb4bd(0x104)+_0x318466+_0xeb4bd(0x10d)+_0xb7d782);}else console[_0xeb4bd(0x153)](_0xeb4bd(0x168)),process[_0xeb4bd(0x16c)](0x1);}}),program['command'](a0_0x35b5c8(0xf3))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x170))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x148),a0_0x35b5c8(0x154))[a0_0x35b5c8(0x174)](_0x4b5f2f=>{const _0x46916d=a0_0x35b5c8;if(_0x4b5f2f==='install'){const _0x5ca9b9=(0x0,shims_1[_0x46916d(0xdf)])();console[_0x46916d(0xe5)](_0x5ca9b9[_0x46916d(0xf8)]);}else{if(_0x4b5f2f===_0x46916d(0x14b)){const _0x441c99=(0x0,shims_1[_0x46916d(0x109)])();console[_0x46916d(0xe5)](_0x441c99[_0x46916d(0xf8)]);}else console[_0x46916d(0x153)](_0x46916d(0x165)),process[_0x46916d(0x16c)](0x1);}}),program[a0_0x35b5c8(0x120)](a0_0x35b5c8(0x172))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0xf2))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0xfa),a0_0x35b5c8(0xe1))[a0_0x35b5c8(0x174)](_0x17aec0=>{const _0x1993b0=a0_0x35b5c8;if(isDisabled()){console[_0x1993b0(0xe5)](_0x17aec0);return;}const _0x4ed2ff=(0x0,filters_1[_0x1993b0(0x14a)])(_0x17aec0);console[_0x1993b0(0xe5)](_0x4ed2ff);}),program[a0_0x35b5c8(0x120)]('mcp-proxy')['alias'](a0_0x35b5c8(0x17a))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x156))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x15a),a0_0x35b5c8(0x128))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x142),a0_0x35b5c8(0x133))[a0_0x35b5c8(0x174)](async(_0x1f40bf,_0x25e397)=>{const {runMcpProxy:_0x2eb8a9}=await Promise['resolve']()['then'](()=>__importStar(require('./mcp')));_0x2eb8a9(_0x1f40bf,_0x25e397);});const args=process[a0_0x35b5c8(0x160)][a0_0x35b5c8(0xe3)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x35b5c8(0x137),a0_0x35b5c8(0x13b),'config',a0_0x35b5c8(0xf3),a0_0x35b5c8(0x172),a0_0x35b5c8(0x171),a0_0x35b5c8(0x17a),a0_0x35b5c8(0x16a),a0_0x35b5c8(0x111),'-h',a0_0x35b5c8(0x116),a0_0x35b5c8(0x132),'-v'];firstArg&&!subcommands[a0_0x35b5c8(0x14f)](firstArg)?runProxy(args)[a0_0x35b5c8(0x10c)](_0x434848=>{const _0x516c7f=a0_0x35b5c8;console[_0x516c7f(0x153)](_0x516c7f(0x108)+_0x434848[_0x516c7f(0xf8)]),process[_0x516c7f(0x16c)](0x1);}):program[a0_0x35b5c8(0x146)](process[a0_0x35b5c8(0x160)]);
|
|
2
|
+
'use strict';const a0_0x1f2954=a0_0x42c1;function a0_0x42c1(_0x20a747,_0x592a88){_0x20a747=_0x20a747-0x1d2;const _0x155387=a0_0x1553();let _0x42c11f=_0x155387[_0x20a747];return _0x42c11f;}(function(_0x547299,_0x2c58dc){const _0x4e3619=a0_0x42c1,_0x222caa=_0x547299();while(!![]){try{const _0x20cac8=parseInt(_0x4e3619(0x231))/0x1+parseInt(_0x4e3619(0x21a))/0x2+-parseInt(_0x4e3619(0x1fb))/0x3+-parseInt(_0x4e3619(0x240))/0x4*(-parseInt(_0x4e3619(0x22d))/0x5)+-parseInt(_0x4e3619(0x1df))/0x6*(-parseInt(_0x4e3619(0x252))/0x7)+parseInt(_0x4e3619(0x24c))/0x8+-parseInt(_0x4e3619(0x1e2))/0x9*(parseInt(_0x4e3619(0x251))/0xa);if(_0x20cac8===_0x2c58dc)break;else _0x222caa['push'](_0x222caa['shift']());}catch(_0x52de9f){_0x222caa['push'](_0x222caa['shift']());}}}(a0_0x1553,0x37946));var __createBinding=this&&this[a0_0x1f2954(0x237)]||(Object[a0_0x1f2954(0x1f5)]?function(_0x3912d7,_0x466d03,_0x34fd35,_0x3bd0e0){const _0x1a3496=a0_0x1f2954;if(_0x3bd0e0===undefined)_0x3bd0e0=_0x34fd35;var _0x109bfe=Object[_0x1a3496(0x1e4)](_0x466d03,_0x34fd35);(!_0x109bfe||('get'in _0x109bfe?!_0x466d03['__esModule']:_0x109bfe['writable']||_0x109bfe['configurable']))&&(_0x109bfe={'enumerable':!![],'get':function(){return _0x466d03[_0x34fd35];}}),Object['defineProperty'](_0x3912d7,_0x3bd0e0,_0x109bfe);}:function(_0x3406f4,_0x3c6492,_0x4f01ba,_0x4ac608){if(_0x4ac608===undefined)_0x4ac608=_0x4f01ba;_0x3406f4[_0x4ac608]=_0x3c6492[_0x4f01ba];}),__setModuleDefault=this&&this[a0_0x1f2954(0x232)]||(Object['create']?function(_0x5639e6,_0x41192e){const _0x172547=a0_0x1f2954;Object[_0x172547(0x1ec)](_0x5639e6,_0x172547(0x218),{'enumerable':!![],'value':_0x41192e});}:function(_0xf6357a,_0x17b26f){_0xf6357a['default']=_0x17b26f;}),__importStar=this&&this[a0_0x1f2954(0x264)]||(function(){var _0x59b0e1=function(_0x5d0fb4){const _0x351966=a0_0x42c1;return _0x59b0e1=Object[_0x351966(0x1e3)]||function(_0x5baf17){const _0x55317f=_0x351966;var _0x13a299=[];for(var _0x3190d0 in _0x5baf17)if(Object[_0x55317f(0x212)][_0x55317f(0x1e9)]['call'](_0x5baf17,_0x3190d0))_0x13a299[_0x13a299['length']]=_0x3190d0;return _0x13a299;},_0x59b0e1(_0x5d0fb4);};return function(_0x5a3ca1){const _0x47f161=a0_0x42c1;if(_0x5a3ca1&&_0x5a3ca1[_0x47f161(0x1fe)])return _0x5a3ca1;var _0x1892d1={};if(_0x5a3ca1!=null){for(var _0x569081=_0x59b0e1(_0x5a3ca1),_0x4234a1=0x0;_0x4234a1<_0x569081[_0x47f161(0x20c)];_0x4234a1++)if(_0x569081[_0x4234a1]!==_0x47f161(0x218))__createBinding(_0x1892d1,_0x5a3ca1,_0x569081[_0x4234a1]);}return __setModuleDefault(_0x1892d1,_0x5a3ca1),_0x1892d1;};}());function a0_0x1553(){const _0x2684a4=['-p,\x20--port\x20<number>','\x20USD','--branch','slice','compressOutput','exitCode','git','toLowerCase','--version','@modelcontextprotocol/','money_saved_usd','6fLEKJZ','stdout','every','414054EFHsSl','getOwnPropertyNames','getOwnPropertyDescriptor','version','--merges','4000','help','hasOwnProperty','logExecution','argument','defineProperty','proxy','false','test','option','Arguments\x20for\x20the\x20target\x20MCP\x20server','./mcp','stats','Command\x20line\x20to\x20evaluate','create','some','args','resolve','-50','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','985455eXghqU','Port\x20to\x20run\x20the\x20dashboard\x20on','write','__esModule','shims','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','total_compressed_tokens','executeCommand','Estimated\x20Cost:\x20\x20\x20\x20$','dedup','\x20(before\x20Trim)','./dashboard','compressed_cost_usd','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','uninstallShims','getStatsSummary','true','length','Reduction\x20Rate:\x20\x20\x20\x20','server-mcp','startsWith','Install\x20or\x20uninstall\x20system\x20command\x20shims','catch','prototype','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','---------------------------------------------','npm','setConfig','model_name','default','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','303770gPVvJY','commander','alias','[value]','Error:\x20Value\x20required\x20for\x20set\x20action','<key>','savings_percentage','tracker','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','trim','get','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','--min-parents','action','mcp','\x20(after\x20Trim)','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','./executor','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','5mQqDvZ','yadm','model','join','433998QliEiy','__setModuleDefault','pnpm','rewrite','\x20=\x20','includes','__createBinding','mcp-server','config\x20parameter\x20name','config','./tracker','-10','push','npx','redaction_enabled','911172nkHAPV','log','command','Manage\x20local\x20configuration\x20parameters','rewriteCommand','-m,\x20--model\x20<string>','-bs','toFixed','install\x20or\x20uninstall','argv','then','bun','3274264mxkquf','status','total_tokens_saved','stderr','<server-command>','170kGJApe','806974lbXqXZ','./shims','port','1.0.0','value\x20to\x20set','--no-merges','getConfig','win32','yarn','message','<commandLine>','set','=============================================\x0a','--help','toLocaleString','platform','./cache','node','__importStar','Command','error','Show\x20token\x20and\x20cost\x20savings\x20summary','exit','--oneline','=============================================','--pretty','--format','mcp-proxy','description','total_raw_tokens','name','Config\x20set\x20','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','dashboard'];a0_0x1553=function(){return _0x2684a4;};return a0_0x1553();}Object['defineProperty'](exports,a0_0x1f2954(0x1fe),{'value':!![]});const commander_1=require(a0_0x1f2954(0x21b)),executor_1=require(a0_0x1f2954(0x22b)),filters_1=require('./filters'),tracker_1=require(a0_0x1f2954(0x23b)),cache_1=require(a0_0x1f2954(0x262)),shims_1=require(a0_0x1f2954(0x253)),dashboard_1=require(a0_0x1f2954(0x206)),program=new commander_1[(a0_0x1f2954(0x265))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x239f53,_0x553cc1){const _0x49c8db=a0_0x1f2954,_0x566598=_0x239f53[_0x49c8db(0x1db)]();if(_0x566598===_0x49c8db(0x1da)||_0x566598===_0x49c8db(0x22e)){const _0x11b902=_0x553cc1[0x0];if(_0x11b902===_0x49c8db(0x24d)){const _0x1093dd=_0x553cc1['slice'](0x1),_0x38eaf8=_0x1093dd[_0x49c8db(0x20c)]===0x0||_0x1093dd[_0x49c8db(0x1e1)](_0x1df84a=>{const _0x2e8d8d=_0x49c8db;return _0x1df84a==='-b'||_0x1df84a===_0x2e8d8d(0x1d6)||_0x1df84a==='-sb'||_0x1df84a===_0x2e8d8d(0x246)||_0x1df84a==='-s'||_0x1df84a==='--short';});if(_0x38eaf8)return{'cmd':_0x239f53,'args':[_0x49c8db(0x24d),'--porcelain','-b']};}else{if(_0x11b902===_0x49c8db(0x241)){const _0x34db73=_0x553cc1[_0x49c8db(0x1d7)](0x1),_0xd22ad4=_0x34db73[_0x49c8db(0x1f6)](_0x4513e0=>_0x4513e0[_0x49c8db(0x20f)](_0x49c8db(0x269))||_0x4513e0[_0x49c8db(0x20f)](_0x49c8db(0x26b))||_0x4513e0['startsWith'](_0x49c8db(0x26c))),_0x296d94=_0x34db73[_0x49c8db(0x1f6)](_0x5e2c3f=>_0x5e2c3f['startsWith']('-')&&/^\d+$/[_0x49c8db(0x1ef)](_0x5e2c3f[_0x49c8db(0x1d7)](0x1))||_0x5e2c3f==='-n'||_0x5e2c3f[_0x49c8db(0x20f)]('--max-count')),_0x2ecced=[..._0x553cc1];if(!_0xd22ad4){const _0x4a0325=_0x49c8db(0x213);_0x2ecced[_0x49c8db(0x23d)](process[_0x49c8db(0x261)]===_0x49c8db(0x259)?'\x22'+_0x4a0325+'\x22':_0x4a0325);}!_0x296d94&&(_0xd22ad4?_0x2ecced[_0x49c8db(0x23d)](_0x49c8db(0x1f9)):_0x2ecced[_0x49c8db(0x23d)](_0x49c8db(0x23c)));const _0x28c694=_0x34db73[_0x49c8db(0x1f6)](_0x1f3f28=>_0x1f3f28===_0x49c8db(0x1e6)||_0x1f3f28===_0x49c8db(0x257)||_0x1f3f28[_0x49c8db(0x20f)](_0x49c8db(0x226)));return!_0x28c694&&!_0x296d94&&_0x2ecced['push'](_0x49c8db(0x257)),{'cmd':_0x239f53,'args':_0x2ecced};}}}return{'cmd':_0x239f53,'args':_0x553cc1};}function isMcpServerExecution(_0x124e2f,_0x412a47){const _0x57553f=a0_0x1f2954,_0x292624=_0x124e2f[_0x57553f(0x1db)](),_0x49230a=_0x412a47[_0x57553f(0x230)]('\x20')[_0x57553f(0x1db)]();if(_0x292624[_0x57553f(0x236)](_0x57553f(0x228))&&(_0x292624[_0x57553f(0x236)]('server')||_0x292624[_0x57553f(0x236)](_0x57553f(0x1ed))))return!![];if(_0x292624===_0x57553f(0x23e)||_0x292624===_0x57553f(0x263)||_0x292624===_0x57553f(0x24b)||_0x292624===_0x57553f(0x215)||_0x292624===_0x57553f(0x233)||_0x292624===_0x57553f(0x25a)){if(_0x49230a[_0x57553f(0x236)]('@modelcontextprotocol/')||_0x49230a['includes']('modelcontextprotocol')||_0x49230a['includes'](_0x57553f(0x238))||_0x49230a[_0x57553f(0x236)](_0x57553f(0x20e)))return!![];}if(_0x412a47[_0x57553f(0x1f6)](_0x2fb0ae=>{const _0x468632=_0x57553f,_0x2302ed=_0x2fb0ae[_0x468632(0x1db)]();return _0x2302ed[_0x468632(0x236)](_0x468632(0x238))||_0x2302ed[_0x468632(0x236)]('server-mcp')||_0x2302ed[_0x468632(0x236)](_0x468632(0x1dd))||_0x2302ed===_0x468632(0x26d)||_0x2302ed===_0x468632(0x228);}))return!![];return![];}async function runProxy(_0x421aa9){const _0x1f404a=a0_0x1f2954;if(_0x421aa9['length']===0x0){program[_0x1f404a(0x1e8)]();return;}const _0x463232=_0x421aa9[0x0],_0x5f9d9c=_0x421aa9['slice'](0x1),_0x1a4814=_0x421aa9[_0x1f404a(0x230)]('\x20');if(isDisabled()){const _0x130d09=await(0x0,executor_1[_0x1f404a(0x202)])(_0x463232,_0x5f9d9c);process[_0x1f404a(0x1e0)][_0x1f404a(0x1fd)](_0x130d09[_0x1f404a(0x1e0)]),process[_0x1f404a(0x24f)]['write'](_0x130d09[_0x1f404a(0x24f)]),process[_0x1f404a(0x268)](_0x130d09[_0x1f404a(0x1d9)]);}if(isMcpServerExecution(_0x463232,_0x5f9d9c)){console[_0x1f404a(0x266)]('[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...');const {runMcpProxy:_0x2c7c16}=await Promise[_0x1f404a(0x1f8)]()[_0x1f404a(0x24a)](()=>__importStar(require(_0x1f404a(0x1f2))));_0x2c7c16(_0x463232,_0x5f9d9c);return;}const _0x52ff19=adjustCommandArgs(_0x463232,_0x5f9d9c),_0x477345=await(0x0,executor_1[_0x1f404a(0x202)])(_0x52ff19['cmd'],_0x52ff19[_0x1f404a(0x1f7)]),_0x3a49c9=(0x0,filters_1[_0x1f404a(0x1d8)])(_0x1a4814,_0x477345[_0x1f404a(0x1e0)],_0x477345[_0x1f404a(0x24f)],tracker_1['tracker'][_0x1f404a(0x258)]()[_0x1f404a(0x23f)]),_0x2bc99c={...filters_1['lastRedactAudit']},_0x2a2ba5=_0x477345['stdout']+(_0x477345[_0x1f404a(0x24f)][_0x1f404a(0x223)]()[_0x1f404a(0x20c)]>0x0?'\x0a'+_0x477345[_0x1f404a(0x24f)]:''),_0x48625a=_0x3a49c9[_0x1f404a(0x20c)]<_0x2a2ba5['length']?_0x3a49c9:_0x2a2ba5,_0x8c8b5c=_0x477345['exitCode']===0x0?(0x0,cache_1[_0x1f404a(0x204)])(_0x1a4814,_0x48625a):null;tracker_1[_0x1f404a(0x221)][_0x1f404a(0x1ea)](_0x1a4814,_0x48625a,_0x8c8b5c||_0x48625a,_0x477345[_0x1f404a(0x1d9)],_0x2bc99c),_0x477345[_0x1f404a(0x1d9)]===0x0?process[_0x1f404a(0x1e0)][_0x1f404a(0x1fd)](_0x48625a+'\x0a'):(process[_0x1f404a(0x1e0)][_0x1f404a(0x1fd)](_0x3a49c9+'\x0a'),_0x477345[_0x1f404a(0x24f)][_0x1f404a(0x223)]()[_0x1f404a(0x20c)]>0x0&&!_0x3a49c9[_0x1f404a(0x236)](_0x477345['stderr'][_0x1f404a(0x223)]())&&process[_0x1f404a(0x24f)][_0x1f404a(0x1fd)](_0x477345[_0x1f404a(0x24f)]+'\x0a')),process['exit'](_0x477345[_0x1f404a(0x1d9)]);}program[a0_0x1f2954(0x270)](a0_0x1f2954(0x223))[a0_0x1f2954(0x26e)](a0_0x1f2954(0x200))[a0_0x1f2954(0x1e5)](a0_0x1f2954(0x255)),program[a0_0x1f2954(0x242)]('ui')[a0_0x1f2954(0x21c)](a0_0x1f2954(0x1d3))[a0_0x1f2954(0x26e)]('Start\x20the\x20local\x20developer\x20dashboard')[a0_0x1f2954(0x1f0)](a0_0x1f2954(0x1d4),a0_0x1f2954(0x1fc),a0_0x1f2954(0x1e7))[a0_0x1f2954(0x227)](_0x1a4656=>{const _0x186440=a0_0x1f2954,_0x5cfcdd=parseInt(_0x1a4656[_0x186440(0x254)],0xa);(0x0,dashboard_1['startDashboard'])(_0x5cfcdd);}),program[a0_0x1f2954(0x242)](a0_0x1f2954(0x1f3))['description'](a0_0x1f2954(0x267))[a0_0x1f2954(0x1f0)](a0_0x1f2954(0x245),'Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','claude-3-5-sonnet')['action'](_0x1db202=>{const _0x3dfcd9=a0_0x1f2954,_0x2dd0b0=tracker_1[_0x3dfcd9(0x221)][_0x3dfcd9(0x20a)](_0x1db202[_0x3dfcd9(0x22f)]);console[_0x3dfcd9(0x241)]('\x0a============================================='),console['log'](_0x3dfcd9(0x1d2)),console[_0x3dfcd9(0x241)](_0x3dfcd9(0x26a)),console[_0x3dfcd9(0x241)]('Model\x20Context:\x20\x20\x20\x20\x20'+_0x2dd0b0[_0x3dfcd9(0x217)]),console[_0x3dfcd9(0x241)](_0x3dfcd9(0x225)+_0x2dd0b0[_0x3dfcd9(0x26f)][_0x3dfcd9(0x260)]()),console['log'](_0x3dfcd9(0x1fa)+_0x2dd0b0[_0x3dfcd9(0x201)]['toLocaleString']()),console[_0x3dfcd9(0x241)]('Tokens\x20Saved:\x20\x20\x20\x20\x20\x20'+_0x2dd0b0[_0x3dfcd9(0x24e)][_0x3dfcd9(0x260)]()),console[_0x3dfcd9(0x241)](_0x3dfcd9(0x20d)+_0x2dd0b0[_0x3dfcd9(0x220)]+'%'),console[_0x3dfcd9(0x241)](_0x3dfcd9(0x203)+_0x2dd0b0['raw_cost_usd']['toFixed'](0x4)+_0x3dfcd9(0x205)),console[_0x3dfcd9(0x241)]('Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$'+_0x2dd0b0[_0x3dfcd9(0x207)][_0x3dfcd9(0x247)](0x4)+_0x3dfcd9(0x229)),console[_0x3dfcd9(0x241)](_0x3dfcd9(0x214)),console[_0x3dfcd9(0x241)]('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x2dd0b0[_0x3dfcd9(0x1de)][_0x3dfcd9(0x247)](0x4)+_0x3dfcd9(0x1d5)),console[_0x3dfcd9(0x241)](_0x3dfcd9(0x25e));}),program[a0_0x1f2954(0x242)](a0_0x1f2954(0x23a))[a0_0x1f2954(0x26e)](a0_0x1f2954(0x243))[a0_0x1f2954(0x1eb)]('<action>','get\x20or\x20set')[a0_0x1f2954(0x1eb)](a0_0x1f2954(0x21f),a0_0x1f2954(0x239))[a0_0x1f2954(0x1eb)](a0_0x1f2954(0x21d),a0_0x1f2954(0x256))[a0_0x1f2954(0x227)]((_0x5286ff,_0x778abe,_0x3a72ad)=>{const _0x3ebd4d=a0_0x1f2954;if(_0x5286ff===_0x3ebd4d(0x224)){const _0x42f0a2=tracker_1[_0x3ebd4d(0x221)][_0x3ebd4d(0x258)]();console[_0x3ebd4d(0x241)](_0x778abe+':\x20'+_0x42f0a2[_0x778abe]);}else{if(_0x5286ff===_0x3ebd4d(0x25d)){_0x3a72ad===undefined&&(console[_0x3ebd4d(0x266)](_0x3ebd4d(0x21e)),process[_0x3ebd4d(0x268)](0x1));let _0x263a59=_0x3a72ad;if(_0x3a72ad===_0x3ebd4d(0x20b))_0x263a59=!![];if(_0x3a72ad===_0x3ebd4d(0x1ee))_0x263a59=![];if(/^\d+$/[_0x3ebd4d(0x1ef)](_0x3a72ad))_0x263a59=parseInt(_0x3a72ad,0xa);tracker_1[_0x3ebd4d(0x221)][_0x3ebd4d(0x216)](_0x778abe,_0x263a59),console[_0x3ebd4d(0x241)](_0x3ebd4d(0x271)+_0x778abe+_0x3ebd4d(0x235)+_0x3a72ad);}else console[_0x3ebd4d(0x266)](_0x3ebd4d(0x22a)),process[_0x3ebd4d(0x268)](0x1);}}),program[a0_0x1f2954(0x242)](a0_0x1f2954(0x1ff))[a0_0x1f2954(0x26e)](a0_0x1f2954(0x210))[a0_0x1f2954(0x1eb)]('<action>',a0_0x1f2954(0x248))[a0_0x1f2954(0x227)](_0x4b0bc8=>{const _0xd08673=a0_0x1f2954;if(_0x4b0bc8==='install'){const _0x25bde8=(0x0,shims_1['installShims'])();console[_0xd08673(0x241)](_0x25bde8[_0xd08673(0x25b)]);}else{if(_0x4b0bc8==='uninstall'){const _0x331d96=(0x0,shims_1[_0xd08673(0x209)])();console[_0xd08673(0x241)](_0x331d96['message']);}else console[_0xd08673(0x266)]('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process[_0xd08673(0x268)](0x1);}}),program['command'](a0_0x1f2954(0x234))[a0_0x1f2954(0x26e)](a0_0x1f2954(0x219))['argument'](a0_0x1f2954(0x25c),a0_0x1f2954(0x1f4))[a0_0x1f2954(0x227)](_0x216080=>{const _0x26e074=a0_0x1f2954;if(isDisabled()){console[_0x26e074(0x241)](_0x216080);return;}const _0x1efe5f=(0x0,filters_1[_0x26e074(0x244)])(_0x216080);console[_0x26e074(0x241)](_0x1efe5f);}),program[a0_0x1f2954(0x242)]('mcp-proxy')[a0_0x1f2954(0x21c)]('mcp')[a0_0x1f2954(0x26e)](a0_0x1f2954(0x22c))[a0_0x1f2954(0x1eb)](a0_0x1f2954(0x250),a0_0x1f2954(0x208))['argument']('[server-args...]',a0_0x1f2954(0x1f1))[a0_0x1f2954(0x227)](async(_0x4eb474,_0x2d3e34)=>{const _0x30f803=a0_0x1f2954,{runMcpProxy:_0x413d7c}=await Promise['resolve']()[_0x30f803(0x24a)](()=>__importStar(require(_0x30f803(0x1f2))));_0x413d7c(_0x4eb474,_0x2d3e34);});const args=process['argv']['slice'](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x1f2954(0x1d3),a0_0x1f2954(0x1f3),'config',a0_0x1f2954(0x1ff),a0_0x1f2954(0x234),'mcp-proxy',a0_0x1f2954(0x228),a0_0x1f2954(0x1e8),a0_0x1f2954(0x25f),'-h',a0_0x1f2954(0x1e5),a0_0x1f2954(0x1dc),'-v'];firstArg&&!subcommands[a0_0x1f2954(0x236)](firstArg)?runProxy(args)[a0_0x1f2954(0x211)](_0xb2bb93=>{const _0x40054e=a0_0x1f2954;console[_0x40054e(0x266)](_0x40054e(0x222)+_0xb2bb93[_0x40054e(0x25b)]),process[_0x40054e(0x268)](0x1);}):program['parse'](process[a0_0x1f2954(0x249)]);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4c2fde=a0_0x1774;(function(_0x4f43c8,_0x1d2754){const _0x41205f=a0_0x1774,_0x338509=_0x4f43c8();while(!![]){try{const _0x1fed5f=-parseInt(_0x41205f(0x199))/0x1*(parseInt(_0x41205f(0x1b9))/0x2)+-parseInt(_0x41205f(0x1ba))/0x3+-parseInt(_0x41205f(0x1b3))/0x4+-parseInt(_0x41205f(0x196))/0x5+-parseInt(_0x41205f(0x190))/0x6+parseInt(_0x41205f(0x1a8))/0x7*(parseInt(_0x41205f(0x1ac))/0x8)+parseInt(_0x41205f(0x1bf))/0x9;if(_0x1fed5f===_0x1d2754)break;else _0x338509['push'](_0x338509['shift']());}catch(_0x3fd619){_0x338509['push'](_0x338509['shift']());}}}(a0_0x1c43,0x755dc));var __createBinding=this&&this[a0_0x4c2fde(0x18c)]||(Object[a0_0x4c2fde(0x18a)]?function(_0x55ae3c,_0x22c657,_0x25df92,_0x3b4c87){const _0x3ee71a=a0_0x4c2fde;if(_0x3b4c87===undefined)_0x3b4c87=_0x25df92;var _0x5a865d=Object[_0x3ee71a(0x1b1)](_0x22c657,_0x25df92);(!_0x5a865d||(_0x3ee71a(0x18e)in _0x5a865d?!_0x22c657[_0x3ee71a(0x197)]:_0x5a865d[_0x3ee71a(0x1a4)]||_0x5a865d[_0x3ee71a(0x1ab)]))&&(_0x5a865d={'enumerable':!![],'get':function(){return _0x22c657[_0x25df92];}}),Object[_0x3ee71a(0x1aa)](_0x55ae3c,_0x3b4c87,_0x5a865d);}:function(_0xaa2204,_0x54412b,_0x16643e,_0x46b772){if(_0x46b772===undefined)_0x46b772=_0x16643e;_0xaa2204[_0x46b772]=_0x54412b[_0x16643e];}),__setModuleDefault=this&&this[a0_0x4c2fde(0x1b0)]||(Object[a0_0x4c2fde(0x18a)]?function(_0x1bd973,_0x1cbf28){const _0x4b0347=a0_0x4c2fde;Object[_0x4b0347(0x1aa)](_0x1bd973,_0x4b0347(0x1ad),{'enumerable':!![],'value':_0x1cbf28});}:function(_0x7a2816,_0x5747be){const _0xa6d506=a0_0x4c2fde;_0x7a2816[_0xa6d506(0x1ad)]=_0x5747be;}),__importStar=this&&this[a0_0x4c2fde(0x188)]||(function(){var _0xff91b6=function(_0x3d7df4){const _0x2c5b68=a0_0x1774;return _0xff91b6=Object[_0x2c5b68(0x191)]||function(_0x4b8e88){const _0x24939c=_0x2c5b68;var _0x56f665=[];for(var _0x3764f1 in _0x4b8e88)if(Object[_0x24939c(0x1b2)][_0x24939c(0x1b8)]['call'](_0x4b8e88,_0x3764f1))_0x56f665[_0x56f665[_0x24939c(0x19f)]]=_0x3764f1;return _0x56f665;},_0xff91b6(_0x3d7df4);};return function(_0x956400){const _0x1ae82d=a0_0x1774;if(_0x956400&&_0x956400['__esModule'])return _0x956400;var _0xfa90c7={};if(_0x956400!=null){for(var _0x4056f2=_0xff91b6(_0x956400),_0x1f4bbd=0x0;_0x1f4bbd<_0x4056f2[_0x1ae82d(0x19f)];_0x1f4bbd++)if(_0x4056f2[_0x1f4bbd]!==_0x1ae82d(0x1ad))__createBinding(_0xfa90c7,_0x956400,_0x4056f2[_0x1f4bbd]);}return __setModuleDefault(_0xfa90c7,_0x956400),_0xfa90c7;};}()),__importDefault=this&&this[a0_0x4c2fde(0x19b)]||function(_0x23990b){return _0x23990b&&_0x23990b['__esModule']?_0x23990b:{'default':_0x23990b};};Object[a0_0x4c2fde(0x1aa)](exports,a0_0x4c2fde(0x197),{'value':!![]}),exports[a0_0x4c2fde(0x195)]=startDashboard;const express_1=__importDefault(require(a0_0x4c2fde(0x1a6))),path=__importStar(require(a0_0x4c2fde(0x19d))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x4c2fde(0x1bb))),tracker_1=require('./tracker'),app=(0x0,express_1['default'])(),baseDir=path[a0_0x4c2fde(0x189)](os['homedir'](),a0_0x4c2fde(0x1be)),logsDir=path[a0_0x4c2fde(0x189)](baseDir,a0_0x4c2fde(0x1a9));function a0_0x1c43(){const _0x4dbc57=['log','5337437jwAjEI','logs','defineProperty','configurable','8tjJWYB','default','message','favicon.png','__setModuleDefault','getOwnPropertyDescriptor','prototype','1927452DbInTF','utf8','/api/stats/history','catch','tracker','hasOwnProperty','2HYVXAZ','956778weyriL','open','../src/favicon.png','sendFile','.trimprompt','18315234xHiiHM','getStatsSummary','__importStar','join','create','auto','__createBinding','error','get','readFileSync','1898298eWnPJd','getOwnPropertyNames','Raw\x20output\x20log\x20file\x20not\x20found.','index.html','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','startDashboard','3115255wqpMTO','__esModule','http://localhost:','576562Qxqjgq','[TrimPrompt]\x20Dashboard\x20error:\x20','__importDefault','model','path','/favicon.png','length','existsSync','/api/stats/summary','json','listen','writable','.comp.txt','express'];a0_0x1c43=function(){return _0x4dbc57;};return a0_0x1c43();}app['get']('/',(_0x3e6535,_0x3f63f1)=>{const _0x3cef22=a0_0x4c2fde,_0x41c186=path[_0x3cef22(0x189)](__dirname,_0x3cef22(0x193));fs[_0x3cef22(0x1a0)](_0x41c186)?_0x3f63f1[_0x3cef22(0x1bd)](_0x41c186):_0x3f63f1[_0x3cef22(0x1bd)](path[_0x3cef22(0x189)](__dirname,'../src/index.html'));}),app[a0_0x4c2fde(0x18e)](a0_0x4c2fde(0x19e),(_0x3e8811,_0x31992c)=>{const _0x407565=a0_0x4c2fde,_0x302447=path[_0x407565(0x189)](__dirname,_0x407565(0x1af));fs[_0x407565(0x1a0)](_0x302447)?_0x31992c[_0x407565(0x1bd)](_0x302447):_0x31992c[_0x407565(0x1bd)](path['join'](__dirname,_0x407565(0x1bc)));}),app[a0_0x4c2fde(0x18e)](a0_0x4c2fde(0x1a1),(_0x1b767c,_0x5b2687)=>{const _0x3aa377=a0_0x4c2fde,_0x372f2e=_0x1b767c['query'][_0x3aa377(0x19c)]||_0x3aa377(0x18b),_0xc11cfa=tracker_1[_0x3aa377(0x1b7)][_0x3aa377(0x1c0)](_0x372f2e);_0x5b2687[_0x3aa377(0x1a2)](_0xc11cfa);}),app[a0_0x4c2fde(0x18e)](a0_0x4c2fde(0x1b5),(_0x49bb59,_0x1c6efb)=>{const _0x3f27e5=a0_0x4c2fde,_0x4ac554=tracker_1[_0x3f27e5(0x1b7)]['getLogs']();_0x1c6efb[_0x3f27e5(0x1a2)](_0x4ac554);}),app[a0_0x4c2fde(0x18e)]('/api/stats/inspect/:id',(_0x2cb757,_0xc3d014)=>{const _0x56c144=a0_0x4c2fde,_0x41362f=_0x2cb757['params']['id'],_0x579efe=path[_0x56c144(0x189)](logsDir,_0x41362f+'.raw.txt'),_0x1ed483=path[_0x56c144(0x189)](logsDir,_0x41362f+_0x56c144(0x1a5));let _0x5ab07a=_0x56c144(0x192),_0x486bd3='Compressed\x20output\x20log\x20file\x20not\x20found.';try{fs['existsSync'](_0x579efe)&&(_0x5ab07a=fs['readFileSync'](_0x579efe,_0x56c144(0x1b4))),fs[_0x56c144(0x1a0)](_0x1ed483)&&(_0x486bd3=fs[_0x56c144(0x18f)](_0x1ed483,_0x56c144(0x1b4)));}catch(_0x295fe5){}_0xc3d014[_0x56c144(0x1a2)]({'id':_0x41362f,'raw':_0x5ab07a,'compressed':_0x486bd3});});function a0_0x1774(_0x3b7da8,_0x591235){_0x3b7da8=_0x3b7da8-0x188;const _0x1c4315=a0_0x1c43();let _0x17749f=_0x1c4315[_0x3b7da8];return _0x17749f;}function startDashboard(_0x2e5172=0xfa0){const _0x49e96b=a0_0x4c2fde;let _0x2f1f2e=_0x2e5172;const _0x4e9b3f=app[_0x49e96b(0x1a3)](_0x2f1f2e,()=>{const _0x13d21d=_0x49e96b,_0x5cc4df=_0x13d21d(0x198)+_0x2f1f2e;console[_0x13d21d(0x1a7)]('\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20'+_0x5cc4df),console[_0x13d21d(0x1a7)](_0x13d21d(0x194)),process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1[_0x13d21d(0x1ad)])(_0x5cc4df)[_0x13d21d(0x1b6)](()=>{});});_0x4e9b3f['on'](_0x49e96b(0x18d),_0x15c6fa=>{const _0x33c94a=_0x49e96b;_0x15c6fa['code']==='EADDRINUSE'?startDashboard(_0x2f1f2e+0x1):console[_0x33c94a(0x18d)](_0x33c94a(0x19a)+_0x15c6fa[_0x33c94a(0x1ae)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x355e29=a0_0xe86c;(function(_0x9a4c67,_0x43592f){var _0x176b11=a0_0xe86c,_0x55348a=_0x9a4c67();while(!![]){try{var _0x5a8f3e=parseInt(_0x176b11(0xb7))/0x1*(parseInt(_0x176b11(0xa6))/0x2)+-parseInt(_0x176b11(0xaa))/0x3+-parseInt(_0x176b11(0xb9))/0x4+-parseInt(_0x176b11(0x9a))/0x5*(-parseInt(_0x176b11(0x9c))/0x6)+parseInt(_0x176b11(0xac))/0x7*(parseInt(_0x176b11(0xab))/0x8)+parseInt(_0x176b11(0xc1))/0x9+-parseInt(_0x176b11(0xae))/0xa;if(_0x5a8f3e===_0x43592f)break;else _0x55348a['push'](_0x55348a['shift']());}catch(_0x1df4da){_0x55348a['push'](_0x55348a['shift']());}}}(a0_0x4e19,0xb85e3));function a0_0xe86c(_0x5ec93a,_0x328e12){_0x5ec93a=_0x5ec93a-0x94;var _0x4e1992=a0_0x4e19();var _0xe86ceb=_0x4e1992[_0x5ec93a];return _0xe86ceb;}var __createBinding=this&&this[a0_0x355e29(0xa9)]||(Object['create']?function(_0x31b103,_0x6aefaf,_0x1d0c45,_0x7a4ac5){var _0x5ad223=a0_0x355e29;if(_0x7a4ac5===undefined)_0x7a4ac5=_0x1d0c45;var _0x3b0e62=Object['getOwnPropertyDescriptor'](_0x6aefaf,_0x1d0c45);(!_0x3b0e62||(_0x5ad223(0xaf)in _0x3b0e62?!_0x6aefaf[_0x5ad223(0xb0)]:_0x3b0e62['writable']||_0x3b0e62[_0x5ad223(0xb1)]))&&(_0x3b0e62={'enumerable':!![],'get':function(){return _0x6aefaf[_0x1d0c45];}}),Object[_0x5ad223(0xbf)](_0x31b103,_0x7a4ac5,_0x3b0e62);}:function(_0x252cd0,_0x2c7faa,_0x1447c4,_0x5b3cd4){if(_0x5b3cd4===undefined)_0x5b3cd4=_0x1447c4;_0x252cd0[_0x5b3cd4]=_0x2c7faa[_0x1447c4];}),__setModuleDefault=this&&this[a0_0x355e29(0xb5)]||(Object[a0_0x355e29(0xa5)]?function(_0x54b1d2,_0x1933a9){var _0x3fbb7a=a0_0x355e29;Object[_0x3fbb7a(0xbf)](_0x54b1d2,_0x3fbb7a(0xa2),{'enumerable':!![],'value':_0x1933a9});}:function(_0x3556df,_0x5924b3){var _0x3d6951=a0_0x355e29;_0x3556df[_0x3d6951(0xa2)]=_0x5924b3;}),__importStar=this&&this['__importStar']||(function(){var _0x346529=function(_0x5557a1){var _0x22e4d8=a0_0xe86c;return _0x346529=Object[_0x22e4d8(0xb2)]||function(_0x592e32){var _0x1cf55c=_0x22e4d8,_0x2be7d5=[];for(var _0xd31fb9 in _0x592e32)if(Object[_0x1cf55c(0xa4)][_0x1cf55c(0xc0)][_0x1cf55c(0xa7)](_0x592e32,_0xd31fb9))_0x2be7d5[_0x2be7d5[_0x1cf55c(0xb8)]]=_0xd31fb9;return _0x2be7d5;},_0x346529(_0x5557a1);};return function(_0x3266c8){var _0x6743a5=a0_0xe86c;if(_0x3266c8&&_0x3266c8[_0x6743a5(0xb0)])return _0x3266c8;var _0x540898={};if(_0x3266c8!=null){for(var _0x422021=_0x346529(_0x3266c8),_0xfdbc42=0x0;_0xfdbc42<_0x422021[_0x6743a5(0xb8)];_0xfdbc42++)if(_0x422021[_0xfdbc42]!=='default')__createBinding(_0x540898,_0x3266c8,_0x422021[_0xfdbc42]);}return __setModuleDefault(_0x540898,_0x3266c8),_0x540898;};}());Object[a0_0x355e29(0xbf)](exports,a0_0x355e29(0xb0),{'value':!![]}),exports[a0_0x355e29(0xc2)]=executeCommand;function a0_0x4e19(){var _0x5431ef=['shims','.trimprompt','4197400uiIoaG','inherit','6uuOakk','trim','startsWith','\x22:\x20','message','filter','default','join','prototype','create','1051058PHhiER','call','child_process','__createBinding','3114036tIchjU','8PFkoUK','2378075YtBMko','platform','6951760omUVBU','get','__esModule','configurable','getOwnPropertyNames','stderr','map','__setModuleDefault','Failed\x20to\x20spawn\x20command\x20\x22','1WQANnt','length','1851436DpXeFd','includes','data','path','toLowerCase','split','defineProperty','hasOwnProperty','11218356foMCCc','executeCommand','homedir','delimiter','toString','win32'];a0_0x4e19=function(){return _0x5431ef;};return a0_0x4e19();}const child_process_1=require(a0_0x355e29(0xa8)),path=__importStar(require(a0_0x355e29(0xbc))),os=__importStar(require('os'));function executeCommand(_0x33a005,_0x4e7ecd){return new Promise(_0x149412=>{var _0x217837=a0_0xe86c;const _0x1346b0=path[_0x217837(0xa3)](os[_0x217837(0x94)](),_0x217837(0x99),_0x217837(0x98)),_0x594284=(process.env.PATH||'')[_0x217837(0xbe)](path['delimiter'])[_0x217837(0xa1)](_0x4ab749=>_0x4ab749[_0x217837(0x9d)]()['toLowerCase']()!==_0x1346b0[_0x217837(0xbd)]())[_0x217837(0xa3)](path[_0x217837(0x95)]),_0x566a1e={...process.env,'PATH':_0x594284,'TRIMPROMPT_DISABLED':'1'},_0x53dae2=process[_0x217837(0xad)]===_0x217837(0x97)?_0x4e7ecd[_0x217837(0xb4)](_0x1898e4=>_0x1898e4[_0x217837(0xba)]('\x20')&&!_0x1898e4[_0x217837(0x9e)]('\x22')?'\x22'+_0x1898e4+'\x22':_0x1898e4):_0x4e7ecd,_0x2cd8fe=(0x0,child_process_1['spawn'])(_0x33a005,_0x53dae2,{'stdio':[_0x217837(0x9b),'pipe','pipe'],'shell':!![],'env':_0x566a1e});let _0x1e4758='',_0x584108='';_0x2cd8fe['stdout']?.['on'](_0x217837(0xbb),_0x235b8b=>{_0x1e4758+=_0x235b8b['toString']();}),_0x2cd8fe[_0x217837(0xb3)]?.['on'](_0x217837(0xbb),_0x12fe06=>{var _0x4d06e2=_0x217837;_0x584108+=_0x12fe06[_0x4d06e2(0x96)]();}),_0x2cd8fe['on']('error',_0x1d6f61=>{var _0x1ae873=_0x217837;_0x149412({'exitCode':0x1,'stdout':'','stderr':_0x1ae873(0xb6)+_0x33a005+_0x1ae873(0x9f)+_0x1d6f61[_0x1ae873(0xa0)]});}),_0x2cd8fe['on']('close',_0x53fca8=>{_0x149412({'exitCode':_0x53fca8??0x0,'stdout':_0x1e4758,'stderr':_0x584108});});});}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2a9a45=a0_0x4346;(function(_0x36d8e0,_0x47036e){const _0xfc1a6b=a0_0x4346,_0xdf6f0c=_0x36d8e0();while(!![]){try{const _0x181585=parseInt(_0xfc1a6b(0x210))/0x1+parseInt(_0xfc1a6b(0x1f8))/0x2*(parseInt(_0xfc1a6b(0x21a))/0x3)+-parseInt(_0xfc1a6b(0x1ef))/0x4+parseInt(_0xfc1a6b(0x1f7))/0x5+-parseInt(_0xfc1a6b(0x217))/0x6*(parseInt(_0xfc1a6b(0x1f0))/0x7)+parseInt(_0xfc1a6b(0x204))/0x8+parseInt(_0xfc1a6b(0x1f4))/0x9*(-parseInt(_0xfc1a6b(0x207))/0xa);if(_0x181585===_0x47036e)break;else _0xdf6f0c['push'](_0xdf6f0c['shift']());}catch(_0x8613a5){_0xdf6f0c['push'](_0xdf6f0c['shift']());}}}(a0_0x4dc8,0xec6d3));Object[a0_0x2a9a45(0x21f)](exports,a0_0x2a9a45(0x202),{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports[a0_0x2a9a45(0x219)]=filterDockerImages,exports['filterDockerLogs']=filterDockerLogs,exports[a0_0x2a9a45(0x20b)]=filterKubectl,exports[a0_0x2a9a45(0x1ec)]=filterRuff;function filterDockerPs(_0x3c241a){const _0xc490f1=a0_0x2a9a45,_0x1434b4=_0x3c241a['split']('\x0a')[_0xc490f1(0x21e)](_0x9e45ba=>_0x9e45ba[_0xc490f1(0x20f)]()[_0xc490f1(0x1ee)]>0x0);if(_0x1434b4[_0xc490f1(0x1ee)]===0x0)return _0xc490f1(0x20e);if(_0x1434b4['length']<=0xa)return _0x3c241a['trim']();const _0x5f0e9a=_0x1434b4[0x0],_0x2c8a57=_0x1434b4[_0xc490f1(0x205)](0x1),_0x4b02c0=[];_0x4b02c0['push'](_0xc490f1(0x20a)+_0x2c8a57[_0xc490f1(0x1ee)]+_0xc490f1(0x1eb)),_0x4b02c0[_0xc490f1(0x1f3)]('');for(const _0x4af472 of _0x2c8a57){const _0x108db9=_0x4af472[_0xc490f1(0x1f9)](/\s{2,}/);if(_0x108db9['length']>=0x5){const _0x9f49aa=_0x108db9[0x0][_0xc490f1(0x1ea)](0x0,0xc),_0x18577d=_0x108db9[0x1],_0x35366b=_0x108db9[_0x108db9[_0xc490f1(0x1ee)]-0x2]||'',_0x44ec39=_0x108db9[_0x108db9[_0xc490f1(0x1ee)]-0x1]||'';_0x4b02c0['push']('\x20\x20'+_0x9f49aa+'\x20\x20'+_0x18577d+'\x20\x20'+_0x35366b+'\x20\x20'+_0x44ec39);}else _0x4b02c0[_0xc490f1(0x1f3)]('\x20\x20'+_0x4af472[_0xc490f1(0x20f)]());}return _0x4b02c0[_0xc490f1(0x214)]('\x0a');}function filterDockerImages(_0x337a07){const _0x3a17da=a0_0x2a9a45,_0x3926b8=_0x337a07[_0x3a17da(0x1f9)]('\x0a')[_0x3a17da(0x21e)](_0x4b33d0=>_0x4b33d0[_0x3a17da(0x20f)]()[_0x3a17da(0x1ee)]>0x0);if(_0x3926b8[_0x3a17da(0x1ee)]<=0x1)return _0x3a17da(0x1fb);if(_0x3926b8[_0x3a17da(0x1ee)]<=0xf)return _0x337a07[_0x3a17da(0x20f)]();const _0x2182f0=_0x3926b8[_0x3a17da(0x205)](0x1),_0x116257=[_0x3a17da(0x20c)+_0x2182f0[_0x3a17da(0x1ee)]+_0x3a17da(0x1eb)];_0x116257[_0x3a17da(0x1f3)]('');const _0x1b305a=_0x2182f0['slice'](0x0,0x14);for(const _0x121438 of _0x1b305a){const _0x1155ac=_0x121438[_0x3a17da(0x1f9)](/\s{2,}/);if(_0x1155ac[_0x3a17da(0x1ee)]>=0x3){const _0x24556b=_0x1155ac[0x0],_0x402f5f=_0x1155ac[0x1],_0x53dafc=_0x1155ac[_0x1155ac['length']-0x1]||'';_0x116257['push']('\x20\x20'+_0x24556b+':'+_0x402f5f+'\x20\x20'+_0x53dafc);}else _0x116257[_0x3a17da(0x1f3)]('\x20\x20'+_0x121438[_0x3a17da(0x20f)]());}return _0x2182f0[_0x3a17da(0x1ee)]>0x14&&_0x116257[_0x3a17da(0x1f3)](_0x3a17da(0x208)+(_0x2182f0[_0x3a17da(0x1ee)]-0x14)+_0x3a17da(0x200)),_0x116257[_0x3a17da(0x214)]('\x0a');}function filterDockerLogs(_0x18aa87){const _0x5cd4ba=a0_0x2a9a45,_0x5c1c2e=_0x18aa87['split']('\x0a');if(_0x5c1c2e[_0x5cd4ba(0x1ee)]<=0x32)return _0x18aa87;const _0x509854=[];return _0x509854[_0x5cd4ba(0x1f3)](..._0x5c1c2e[_0x5cd4ba(0x205)](0x0,0x14)),_0x509854[_0x5cd4ba(0x1f3)](_0x5cd4ba(0x1ed)+(_0x5c1c2e[_0x5cd4ba(0x1ee)]-0x28)+_0x5cd4ba(0x209)),_0x509854[_0x5cd4ba(0x1f3)](..._0x5c1c2e['slice'](-0x14)),_0x509854[_0x5cd4ba(0x1f3)]('\x0a('+_0x5c1c2e['length']+_0x5cd4ba(0x1f1)),_0x509854['join']('\x0a');}function a0_0x4346(_0x258446,_0x296bd2){_0x258446=_0x258446-0x1e9;const _0x4dc849=a0_0x4dc8();let _0x434668=_0x4dc849[_0x258446];return _0x434668;}function filterKubectl(_0xbaeb58,_0x32c705){const _0x52c363=a0_0x2a9a45,_0x304527=_0xbaeb58[_0x52c363(0x1f9)]('\x0a')[_0x52c363(0x21e)](_0xa4c686=>_0xa4c686[_0x52c363(0x20f)]()[_0x52c363(0x1ee)]>0x0);if(_0x304527[_0x52c363(0x1ee)]===0x0)return _0x52c363(0x1f5);if(_0x304527['length']<=0x14)return _0xbaeb58['trim']();if(_0x32c705===_0x52c363(0x213)){const _0x3ff5f1=_0x304527[0x0],_0x21bae0=_0x304527['slice'](0x1),_0x385ac0=[_0x21bae0[_0x52c363(0x1ee)]+_0x52c363(0x218),'',_0x3ff5f1];return _0x21bae0[_0x52c363(0x1ee)]<=0x1e?_0x385ac0[_0x52c363(0x1f3)](..._0x21bae0):(_0x385ac0['push'](..._0x21bae0[_0x52c363(0x205)](0x0,0x19)),_0x385ac0['push'](_0x52c363(0x212)+(_0x21bae0[_0x52c363(0x1ee)]-0x19)+_0x52c363(0x1f6))),_0x385ac0['join']('\x0a');}if(_0x32c705===_0x52c363(0x21b)){const _0x1a1cc4=[];let _0x1f084a=![],_0x305ee2=0x0;for(const _0x2275d3 of _0x304527){if(_0x2275d3[_0x52c363(0x211)]('Events:')){_0x1f084a=!![],_0x1a1cc4[_0x52c363(0x1f3)](_0x2275d3);continue;}if(_0x1f084a){_0x305ee2++;if(_0x305ee2<=0x5)_0x1a1cc4['push'](_0x2275d3);}else _0x1a1cc4[_0x52c363(0x1f3)](_0x2275d3);}return _0x305ee2>0x5&&_0x1a1cc4[_0x52c363(0x1f3)](_0x52c363(0x208)+(_0x305ee2-0x5)+_0x52c363(0x20d)),_0x1a1cc4[_0x52c363(0x214)]('\x0a');}if(_0x32c705===_0x52c363(0x201))return filterDockerLogs(_0xbaeb58);const _0x4a0150=_0x304527[_0x52c363(0x205)](0x0,0x1e);return _0x304527[_0x52c363(0x1ee)]>0x1e&&_0x4a0150['push'](_0x52c363(0x212)+(_0x304527['length']-0x1e)+'\x20more\x20lines'),_0x4a0150[_0x52c363(0x214)]('\x0a');}function filterRuff(_0x24179c){const _0x37b860=a0_0x2a9a45,_0x183776=_0x24179c[_0x37b860(0x1f9)]('\x0a')[_0x37b860(0x21e)](_0x442892=>_0x442892[_0x37b860(0x20f)]()['length']>0x0);if(_0x183776['length']===0x0)return _0x37b860(0x1e9);if(_0x24179c[_0x37b860(0x1f2)](_0x37b860(0x21c))||_0x24179c[_0x37b860(0x1f2)](_0x37b860(0x215)))return _0x37b860(0x216);const _0x2a7c2c=_0x24179c[_0x37b860(0x21d)](/Found (\d+) error/),_0x5be802=_0x2a7c2c?parseInt(_0x2a7c2c[0x1]):_0x183776['length'],_0x337935={},_0x2b2590=[];for(const _0x3e66ef of _0x183776){const _0x5d8a9c=_0x3e66ef['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x5d8a9c){const _0x4fd33b=_0x5d8a9c[0x1],_0x4dbacd=_0x4fd33b['split'](':')[0x0];if(!_0x337935[_0x4dbacd])_0x337935[_0x4dbacd]=[];_0x337935[_0x4dbacd]['push'](_0x3e66ef);}else _0x2b2590['push'](_0x3e66ef);}const _0x336402=Object['keys'](_0x337935);if(_0x336402[_0x37b860(0x1ee)]===0x0){if(_0x183776[_0x37b860(0x1ee)]<=0x14)return _0x24179c[_0x37b860(0x20f)]();return _0x183776[_0x37b860(0x205)](0x0,0xf)['join']('\x0a')+(_0x37b860(0x1fe)+(_0x183776['length']-0xf)+_0x37b860(0x1fd));}const _0x41d718=[_0x37b860(0x1fc)+_0x5be802+'\x20issues\x20in\x20'+_0x336402[_0x37b860(0x1ee)]+_0x37b860(0x203)];_0x41d718[_0x37b860(0x1f3)]('');const _0x52943=0xa;for(const _0x533fa1 of _0x336402['slice'](0x0,_0x52943)){const _0x7e671e=_0x337935[_0x533fa1];if(_0x7e671e[_0x37b860(0x1ee)]<=0x3){for(const _0x53c677 of _0x7e671e)_0x41d718['push']('\x20\x20'+_0x53c677);}else _0x41d718[_0x37b860(0x1f3)]('\x20\x20'+_0x7e671e[0x0]),_0x41d718[_0x37b860(0x1f3)](_0x37b860(0x1fa)+_0x7e671e['length']+_0x37b860(0x1ff)+_0x533fa1+')');}return _0x336402[_0x37b860(0x1ee)]>_0x52943&&_0x41d718['push'](_0x37b860(0x208)+(_0x336402[_0x37b860(0x1ee)]-_0x52943)+_0x37b860(0x206)),_0x41d718[_0x37b860(0x214)]('\x0a');}function a0_0x4dc8(){const _0x2a4cdd=['Containers:\x20','filterKubectl','Docker\x20images:\x20','\x20more\x20events','No\x20containers\x20running','trim','1377011dexIza','startsWith','...\x20+','get','join','Found\x200\x20error','Ruff:\x20all\x20checks\x20passed','453576swkTOE','\x20resources\x20found','filterDockerImages','591348ijzAqb','describe','All\x20checks\x20passed','match','filter','defineProperty','Ruff:\x20no\x20issues\x20found','substring','\x20total','filterRuff','\x0a...\x20[','length','113172PfUuJa','91ebqGQN','\x20log\x20lines\x20total)','includes','push','9EyuoFi','No\x20resources\x20found','\x20more\x20resources','7037715klblZM','16nXodzh','split','\x20\x20...\x20(','No\x20images\x20found','Ruff:\x20','\x20more','\x0a...\x20+','\x20issues\x20in\x20','\x20more\x20images','logs','__esModule','\x20files','13868752BTvvDX','slice','\x20more\x20files','41156320hHQmbM','\x20\x20...\x20+','\x20lines\x20truncated]\x20...\x0a'];a0_0x4dc8=function(){return _0x2a4cdd;};return a0_0x4dc8();}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x344568=a0_0x2e26;(function(_0x3b82d4,_0x199ba9){const _0x392ed3=a0_0x2e26,_0x4b564c=_0x3b82d4();while(!![]){try{const _0x1e1a92=-parseInt(_0x392ed3(0x1d9))/0x1*(parseInt(_0x392ed3(0x1e1))/0x2)+-parseInt(_0x392ed3(0x1dc))/0x3+parseInt(_0x392ed3(0x1de))/0x4*(-parseInt(_0x392ed3(0x1d3))/0x5)+-parseInt(_0x392ed3(0x1e2))/0x6+parseInt(_0x392ed3(0x1cc))/0x7*(parseInt(_0x392ed3(0x1dd))/0x8)+-parseInt(_0x392ed3(0x1ce))/0x9+parseInt(_0x392ed3(0x1df))/0xa*(parseInt(_0x392ed3(0x1d0))/0xb);if(_0x1e1a92===_0x199ba9)break;else _0x4b564c['push'](_0x4b564c['shift']());}catch(_0x89a773){_0x4b564c['push'](_0x4b564c['shift']());}}}(a0_0x3df3,0xf3c6f));Object[a0_0x344568(0x1cf)](exports,'__esModule',{'value':!![]}),exports[a0_0x344568(0x1d1)]=stripAnsi,exports[a0_0x344568(0x1d4)]=collapseDuplicates,exports[a0_0x344568(0x1d7)]=softTruncate;function a0_0x2e26(_0x5179de,_0x3f68ed){_0x5179de=_0x5179de-0x1cb;const _0x3df39f=a0_0x3df3();let _0x2e267a=_0x3df39f[_0x5179de];return _0x2e267a;}function stripAnsi(_0x12b346){const _0x119530=a0_0x344568,_0x430f63=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x12b346[_0x119530(0x1e0)](_0x430f63,'');}function a0_0x3df3(){const _0x28ef77=['82ENaaAX','split','\x20characters\x20of\x20output]\x20...\x0a','2988393bDekit','8ZAKxHZ','4TkEhyt','550EqfFPT','replace','34198lZYgjQ','3511674Wbpmxz','\x20[x','11682223GbiRag','join','8864847kltFYg','defineProperty','884279WxTBma','stripAnsi','trim','5616310ZGzieW','collapseDuplicates','push','slice','softTruncate','length'];a0_0x3df3=function(){return _0x28ef77;};return a0_0x3df3();}function collapseDuplicates(_0x1bc68a){const _0x55b7e8=a0_0x344568,_0x261be1=_0x1bc68a['split']('\x0a');if(_0x261be1[_0x55b7e8(0x1d8)]<=0x1)return _0x1bc68a;const _0x4df995=[];let _0x1dee72=_0x261be1[0x0],_0x1257f3=0x1;for(let _0xcde125=0x1;_0xcde125<_0x261be1[_0x55b7e8(0x1d8)];_0xcde125++){const _0x38e30d=_0x261be1[_0xcde125];_0x38e30d===_0x1dee72&&_0x38e30d[_0x55b7e8(0x1d2)]()['length']>0x0?_0x1257f3++:(_0x1257f3>0x1?_0x4df995[_0x55b7e8(0x1d5)](_0x1dee72+_0x55b7e8(0x1cb)+_0x1257f3+']'):_0x4df995[_0x55b7e8(0x1d5)](_0x1dee72),_0x1dee72=_0x38e30d,_0x1257f3=0x1);}return _0x1257f3>0x1?_0x4df995['push'](_0x1dee72+'\x20[x'+_0x1257f3+']'):_0x4df995[_0x55b7e8(0x1d5)](_0x1dee72),_0x4df995[_0x55b7e8(0x1cd)]('\x0a');}function softTruncate(_0xf6b804,_0xbe2f14=0x4e20){const _0x190b22=a0_0x344568;if(_0xf6b804[_0x190b22(0x1d8)]<=_0xbe2f14)return _0xf6b804;const _0x4fb5b2=_0xf6b804[_0x190b22(0x1da)]('\x0a');if(_0x4fb5b2[_0x190b22(0x1d8)]<=0xc8)return _0xf6b804;const _0x4dea9b=0x32,_0x4b8886=0x96,_0x48592a=_0x4fb5b2[_0x190b22(0x1d6)](0x0,_0x4dea9b),_0x3ff34f=_0x4fb5b2[_0x190b22(0x1d6)](_0x4fb5b2['length']-_0x4b8886),_0x243f73=_0xf6b804[_0x190b22(0x1d8)]-(_0x48592a[_0x190b22(0x1cd)]('\x0a')['length']+_0x3ff34f[_0x190b22(0x1cd)]('\x0a')[_0x190b22(0x1d8)]);return[..._0x48592a,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0x243f73+_0x190b22(0x1db),..._0x3ff34f][_0x190b22(0x1cd)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0x4433(){const _0x15d5d1=['default','\x20(+','filterGitLog','8200052wfxgkc','match','substring','__createBinding','\x0aUntracked\x20files:','__importStar','startsWith','create','__setModuleDefault','\x0aChanges:','\x20untracked\x20files)','map','\x20more\x20modifications','296hYtyhB','get','*\x20Branch:\x20','length','basename','No\x20modifications','getOwnPropertyNames','slice','/\x20(','path','trim','1720377TSeHpP','configurable','__esModule','\x20\x20??\x20','split','getOwnPropertyDescriptor','78565EBvePR','626692UoLgdV','push','1601490VqCxjN','call','650133rXEuFw','defineProperty','prototype','\x20\x20...\x20(+','filter','hasOwnProperty','19795584fYIxiY','replace','entries','\x20lines\x20of\x20description)','join','---','\x20\x20...\x20+','+++'];a0_0x4433=function(){return _0x15d5d1;};return a0_0x4433();}const a0_0x32b4d6=a0_0x1a92;(function(_0x345063,_0x4c5cb8){const _0xf21015=a0_0x1a92,_0x3428f4=_0x345063();while(!![]){try{const _0x5b5f8e=-parseInt(_0xf21015(0xfb))/0x1+parseInt(_0xf21015(0xf7))/0x2+parseInt(_0xf21015(0xf0))/0x3+parseInt(_0xf21015(0xe5))/0x4*(-parseInt(_0xf21015(0xf6))/0x5)+parseInt(_0xf21015(0xf9))/0x6+-parseInt(_0xf21015(0x10c))/0x7+parseInt(_0xf21015(0x101))/0x8;if(_0x5b5f8e===_0x4c5cb8)break;else _0x3428f4['push'](_0x3428f4['shift']());}catch(_0x2ee881){_0x3428f4['push'](_0x3428f4['shift']());}}}(a0_0x4433,0x9d2fd));function a0_0x1a92(_0x2047f0,_0x4a9542){_0x2047f0=_0x2047f0-0xe5;const _0x443320=a0_0x4433();let _0x1a9256=_0x443320[_0x2047f0];return _0x1a9256;}var __createBinding=this&&this[a0_0x32b4d6(0x10f)]||(Object[a0_0x32b4d6(0x113)]?function(_0x3deed1,_0x398a12,_0xf05e10,_0x1abd59){const _0x22ebdb=a0_0x32b4d6;if(_0x1abd59===undefined)_0x1abd59=_0xf05e10;var _0x4e52bd=Object[_0x22ebdb(0xf5)](_0x398a12,_0xf05e10);(!_0x4e52bd||(_0x22ebdb(0xe6)in _0x4e52bd?!_0x398a12[_0x22ebdb(0xf2)]:_0x4e52bd['writable']||_0x4e52bd[_0x22ebdb(0xf1)]))&&(_0x4e52bd={'enumerable':!![],'get':function(){return _0x398a12[_0xf05e10];}}),Object['defineProperty'](_0x3deed1,_0x1abd59,_0x4e52bd);}:function(_0xc4d8f2,_0x213868,_0x37e800,_0x384679){if(_0x384679===undefined)_0x384679=_0x37e800;_0xc4d8f2[_0x384679]=_0x213868[_0x37e800];}),__setModuleDefault=this&&this[a0_0x32b4d6(0x114)]||(Object[a0_0x32b4d6(0x113)]?function(_0x524490,_0x585b7f){const _0xdeca2b=a0_0x32b4d6;Object[_0xdeca2b(0xfc)](_0x524490,'default',{'enumerable':!![],'value':_0x585b7f});}:function(_0x358f04,_0x5c53d2){const _0x3e6f25=a0_0x32b4d6;_0x358f04[_0x3e6f25(0x109)]=_0x5c53d2;}),__importStar=this&&this[a0_0x32b4d6(0x111)]||(function(){var _0x48b935=function(_0x5be3dd){const _0x57e948=a0_0x1a92;return _0x48b935=Object[_0x57e948(0xeb)]||function(_0x227f32){const _0x1c29fe=_0x57e948;var _0x2f6c67=[];for(var _0x5dc296 in _0x227f32)if(Object[_0x1c29fe(0xfd)][_0x1c29fe(0x100)][_0x1c29fe(0xfa)](_0x227f32,_0x5dc296))_0x2f6c67[_0x2f6c67[_0x1c29fe(0xe8)]]=_0x5dc296;return _0x2f6c67;},_0x48b935(_0x5be3dd);};return function(_0x2f5616){const _0x376993=a0_0x1a92;if(_0x2f5616&&_0x2f5616['__esModule'])return _0x2f5616;var _0x1b4e06={};if(_0x2f5616!=null){for(var _0x141d3c=_0x48b935(_0x2f5616),_0x1ff1a2=0x0;_0x1ff1a2<_0x141d3c['length'];_0x1ff1a2++)if(_0x141d3c[_0x1ff1a2]!==_0x376993(0x109))__createBinding(_0x1b4e06,_0x2f5616,_0x141d3c[_0x1ff1a2]);}return __setModuleDefault(_0x1b4e06,_0x2f5616),_0x1b4e06;};}());Object[a0_0x32b4d6(0xfc)](exports,a0_0x32b4d6(0xf2),{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x32b4d6(0x10b)]=filterGitLog,exports['filterGitDiff']=filterGitDiff;const path=__importStar(require(a0_0x32b4d6(0xee)));function filterGitStatus(_0x2ca2ac){const _0x3f6410=a0_0x32b4d6,_0x3ff0af=_0x2ca2ac[_0x3f6410(0xf4)]('\x0a')[_0x3f6410(0x117)](_0x4af545=>_0x4af545['trim']())[_0x3f6410(0xff)](_0x1d7c07=>_0x1d7c07[_0x3f6410(0xe8)]>0x0);if(_0x3ff0af[_0x3f6410(0xe8)]===0x0)return'Clean\x20working\x20tree';const _0x3b62dc=[],_0x1a4463=[],_0x6a6c77=[];for(const _0x208625 of _0x3ff0af){if(_0x208625[_0x3f6410(0x112)]('##')){const _0x55bd26=_0x208625[_0x3f6410(0x102)](/^##\s*/,'');_0x3b62dc[_0x3f6410(0xf8)](_0x3f6410(0xe7)+_0x55bd26);}else _0x208625[_0x3f6410(0x112)]('??')?_0x1a4463[_0x3f6410(0xf8)](_0x208625[_0x3f6410(0x10e)](0x3)['trim']()):_0x6a6c77[_0x3f6410(0xf8)](_0x208625);}_0x6a6c77['length']>0x0&&(_0x3b62dc[_0x3f6410(0xf8)](_0x3f6410(0x115)),_0x3b62dc['push'](..._0x6a6c77[_0x3f6410(0x117)](_0x2762dc=>'\x20\x20'+_0x2762dc)));if(_0x1a4463[_0x3f6410(0xe8)]>0x0){_0x3b62dc[_0x3f6410(0xf8)](_0x3f6410(0x110));const _0x435165={},_0x4e0e4f=[];for(const _0x55a4fd of _0x1a4463){const _0x11f90f=path['dirname'](_0x55a4fd);_0x11f90f==='.'||_0x11f90f===''?_0x4e0e4f[_0x3f6410(0xf8)](_0x55a4fd):(!_0x435165[_0x11f90f]&&(_0x435165[_0x11f90f]=[]),_0x435165[_0x11f90f]['push'](path[_0x3f6410(0xe9)](_0x55a4fd)));}for(const [_0x2ebb59,_0x4cddf8]of Object[_0x3f6410(0x103)](_0x435165)){if(_0x4cddf8[_0x3f6410(0xe8)]>0x5)_0x3b62dc[_0x3f6410(0xf8)](_0x3f6410(0xf3)+_0x2ebb59+_0x3f6410(0xed)+_0x4cddf8['length']+_0x3f6410(0x116));else for(const _0xcbc377 of _0x4cddf8){_0x3b62dc[_0x3f6410(0xf8)](_0x3f6410(0xf3)+path['join'](_0x2ebb59,_0xcbc377));}}for(const _0xc6d386 of _0x4e0e4f){_0x3b62dc[_0x3f6410(0xf8)]('\x20\x20??\x20'+_0xc6d386);}}return _0x3b62dc['join']('\x0a');}function filterGitLog(_0x3aa970){const _0x381def=a0_0x32b4d6,_0x297737=_0x3aa970['split']('---END---')[_0x381def(0x117)](_0x5677da=>_0x5677da[_0x381def(0xef)]())[_0x381def(0xff)](_0x523cf2=>_0x523cf2['length']>0x0);if(_0x297737[_0x381def(0xe8)]===0x0)return _0x3aa970;const _0x2180dc=[];for(const _0x5e0e72 of _0x297737){const _0x3eec81=_0x5e0e72[_0x381def(0xf4)]('\x0a'),_0x495fbd=_0x3eec81[0x0]||'',_0x31a8ea=_0x3eec81[_0x381def(0xec)](0x1)['map'](_0x5ae5ee=>_0x5ae5ee[_0x381def(0xef)]())['filter'](_0x30a2f1=>_0x30a2f1[_0x381def(0xe8)]>0x0);_0x2180dc[_0x381def(0xf8)]('-\x20'+_0x495fbd),_0x31a8ea['length']>0x0&&(_0x2180dc[_0x381def(0xf8)]('\x20\x20'+_0x31a8ea[0x0]),_0x31a8ea[_0x381def(0xe8)]>0x1&&_0x2180dc[_0x381def(0xf8)](_0x381def(0xfe)+(_0x31a8ea[_0x381def(0xe8)]-0x1)+_0x381def(0x104)));}return _0x2180dc[_0x381def(0x105)]('\x0a');}function filterGitDiff(_0x2b54b3){const _0x542f05=a0_0x32b4d6,_0x376748=_0x2b54b3[_0x542f05(0xf4)]('\x0a'),_0x25f165=[];let _0x1713ce='',_0x3e5095=0x0,_0x491b17=0x0,_0x10089e=[];const _0x5c06ea=()=>{const _0x2d7d67=_0x542f05;if(_0x1713ce&&(_0x3e5095>0x0||_0x491b17>0x0)){_0x25f165[_0x2d7d67(0xf8)]('[file]\x20'+_0x1713ce+_0x2d7d67(0x10a)+_0x3e5095+'\x20-'+_0x491b17+')');const _0x5d1910=0xa,_0x3e608e=_0x10089e[_0x2d7d67(0xec)](0x0,_0x5d1910);for(const _0x47e690 of _0x3e608e){_0x25f165[_0x2d7d67(0xf8)]('\x20\x20'+_0x47e690);}const _0xda3c5f=_0x3e5095+_0x491b17-_0x5d1910;_0xda3c5f>0x0&&_0x25f165[_0x2d7d67(0xf8)](_0x2d7d67(0x107)+_0xda3c5f+_0x2d7d67(0x118));}_0x3e5095=0x0,_0x491b17=0x0,_0x10089e=[];};for(const _0x2e1c8c of _0x376748){if(_0x2e1c8c['startsWith']('diff\x20--git')){_0x5c06ea();const _0x271a15=_0x2e1c8c[_0x542f05(0x10d)](/\sb\/(.+)$/);_0x1713ce=_0x271a15?_0x271a15[0x1]:'unknown_file';}else{if(_0x2e1c8c[_0x542f05(0x112)]('+')&&!_0x2e1c8c[_0x542f05(0x112)](_0x542f05(0x108)))_0x3e5095++,_0x10089e[_0x542f05(0xf8)](_0x2e1c8c);else _0x2e1c8c['startsWith']('-')&&!_0x2e1c8c[_0x542f05(0x112)](_0x542f05(0x106))&&(_0x491b17++,_0x10089e[_0x542f05(0xf8)](_0x2e1c8c));}}_0x5c06ea();const _0x4e3cac=_0x25f165[_0x542f05(0x105)]('\x0a');return _0x4e3cac[_0x542f05(0xe8)]>0x0?_0x4e3cac:_0x542f05(0xea);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2cde90=a0_0x567b;(function(_0x223f17,_0x2e289d){const _0x20519d=a0_0x567b,_0x5d4db7=_0x223f17();while(!![]){try{const _0x579562=-parseInt(_0x20519d(0xff))/0x1+parseInt(_0x20519d(0xf6))/0x2*(-parseInt(_0x20519d(0xe8))/0x3)+-parseInt(_0x20519d(0x100))/0x4*(parseInt(_0x20519d(0xf4))/0x5)+-parseInt(_0x20519d(0xee))/0x6*(-parseInt(_0x20519d(0xf3))/0x7)+parseInt(_0x20519d(0xe3))/0x8+parseInt(_0x20519d(0xf0))/0x9+parseInt(_0x20519d(0xfb))/0xa;if(_0x579562===_0x2e289d)break;else _0x5d4db7['push'](_0x5d4db7['shift']());}catch(_0x5574ee){_0x5d4db7['push'](_0x5d4db7['shift']());}}}(a0_0x56cb,0xdf730));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x2cde90(0x101)]=filterGoTest,exports[a0_0x2cde90(0x10b)]=filterGoVet;function filterGoTest(_0x4857ee){const _0x233591=a0_0x2cde90,_0x517c78=_0x4857ee[_0x233591(0x106)]('\x0a');let _0x55046f=0x0,_0x5b36f6=0x0,_0x2806b2=0x0;const _0x21d8b9=[],_0x2bf282=[];let _0x2a025a=null;for(const _0x1b0cc0 of _0x517c78){const _0x4efa16=_0x1b0cc0[_0x233591(0xf2)](),_0xcaa05b=_0x4efa16[_0x233591(0xfe)](/^ok\s+\S+\s+[\d.]+s/);if(_0xcaa05b){_0x2bf282[_0x233591(0xec)](_0x4efa16);continue;}const _0x13b097=_0x4efa16[_0x233591(0xfe)](/^FAIL\s+\S+/);if(_0x13b097){_0x2bf282[_0x233591(0xec)](_0x4efa16);continue;}const _0x2a2269=_0x4efa16['match'](/^--- PASS:/);if(_0x2a2269){_0x55046f++;continue;}const _0x42e0a0=_0x4efa16['match'](/^--- FAIL:\s+(\S+)/);if(_0x42e0a0){if(_0x2a025a)_0x21d8b9[_0x233591(0xec)](_0x2a025a);_0x2a025a={'name':_0x42e0a0[0x1],'lines':[]},_0x5b36f6++;continue;}if(_0x4efa16['startsWith']('---\x20SKIP:')){_0x2806b2++;continue;}_0x2a025a&&_0x4efa16[_0x233591(0xe4)]>0x0&&!_0x4efa16[_0x233591(0xf9)](_0x233591(0xf7))&&_0x2a025a[_0x233591(0x10a)]['push'](_0x1b0cc0),_0x4efa16[_0x233591(0xf9)]('===\x20RUN')&&(_0x2a025a&&(_0x21d8b9[_0x233591(0xec)](_0x2a025a),_0x2a025a=null));}if(_0x2a025a)_0x21d8b9['push'](_0x2a025a);if(_0x55046f===0x0&&_0x5b36f6===0x0&&_0x2806b2===0x0){if(_0x4857ee[_0x233591(0xf8)](_0x233591(0x107))&&!_0x4857ee[_0x233591(0xf8)](_0x233591(0xef)))return'Go\x20test:\x20all\x20tests\x20passed';if(_0x4857ee[_0x233591(0xf8)]('no\x20test\x20files'))return _0x233591(0xfa);return _0x4857ee;}if(_0x5b36f6===0x0){const _0x212874=[_0x233591(0xfc)+_0x55046f+_0x233591(0xf5)];if(_0x2806b2>0x0)_0x212874[_0x233591(0xec)](_0x2806b2+'\x20skipped');return _0x212874[_0x233591(0x108)](',\x20');}const _0x2cdf70=[_0x233591(0xfc)+_0x55046f+_0x233591(0x103)+_0x5b36f6+_0x233591(0xfd)+_0x2806b2+_0x233591(0x105)];if(_0x21d8b9[_0x233591(0xe4)]>0x0){_0x2cdf70[_0x233591(0xec)](_0x233591(0x102));const _0xf307d0=0x3;for(let _0x39bf2=0x0;_0x39bf2<Math[_0x233591(0xe2)](_0x21d8b9[_0x233591(0xe4)],_0xf307d0);_0x39bf2++){const _0x4209a9=_0x21d8b9[_0x39bf2];_0x2cdf70[_0x233591(0xec)]('\x20\x20'+(_0x39bf2+0x1)+'.\x20'+_0x4209a9[_0x233591(0x109)]);for(const _0x277b65 of _0x4209a9[_0x233591(0x10a)][_0x233591(0xf1)](0x0,0x5)){_0x2cdf70[_0x233591(0xec)](_0x233591(0xe9)+_0x277b65[_0x233591(0xf2)]());}_0x4209a9['lines'][_0x233591(0xe4)]>0x5&&_0x2cdf70[_0x233591(0xec)](_0x233591(0xe6)+(_0x4209a9[_0x233591(0x10a)]['length']-0x5)+_0x233591(0x104));}_0x21d8b9['length']>_0xf307d0&&_0x2cdf70[_0x233591(0xec)]('\x20\x20...\x20+'+(_0x21d8b9[_0x233591(0xe4)]-_0xf307d0)+_0x233591(0xe7));}return _0x2cdf70[_0x233591(0x108)]('\x0a');}function a0_0x56cb(){const _0x3b33af=['...\x20+','push','\x20issues\x20found','44862jWhScn','FAIL','11362599qiYMFR','slice','trim','959aqBXQc','635AeQOef','\x20passed','1046ioqrij','===\x20RUN','includes','startsWith','Go\x20test:\x20no\x20test\x20files','13286410nHfaBf','Go\x20test:\x20','\x20failed,\x20','match','97900YwkDTh','53024NPTkTj','filterGoTest','\x0aFailures:','\x20passed,\x20','\x20more\x20lines','\x20skipped','split','PASS','join','name','lines','filterGoVet','Go\x20vet:\x20','min','4318448WXIhwH','length','filter','\x20\x20\x20\x20...\x20+','\x20more\x20failures','8367iVkHrv','\x20\x20\x20\x20','\x20more\x20issues'];a0_0x56cb=function(){return _0x3b33af;};return a0_0x56cb();}function a0_0x567b(_0x5aef19,_0x3d6d49){_0x5aef19=_0x5aef19-0xe2;const _0x56cbf6=a0_0x56cb();let _0x567b27=_0x56cbf6[_0x5aef19];return _0x567b27;}function filterGoVet(_0x31d5fd){const _0x4fb7d9=a0_0x2cde90,_0x249be0=_0x31d5fd[_0x4fb7d9(0x106)]('\x0a')[_0x4fb7d9(0xe5)](_0x406cf8=>_0x406cf8['trim']()[_0x4fb7d9(0xe4)]>0x0);if(_0x249be0[_0x4fb7d9(0xe4)]===0x0)return'Go\x20vet:\x20no\x20issues\x20found';if(_0x249be0[_0x4fb7d9(0xe4)]<=0x14)return _0x31d5fd['trim']();const _0x45409d=[_0x4fb7d9(0x10c)+_0x249be0[_0x4fb7d9(0xe4)]+_0x4fb7d9(0xed)];return _0x45409d[_0x4fb7d9(0xec)](..._0x249be0[_0x4fb7d9(0xf1)](0x0,0xa)),_0x249be0['length']>0xa&&_0x45409d[_0x4fb7d9(0xec)](_0x4fb7d9(0xeb)+(_0x249be0[_0x4fb7d9(0xe4)]-0xa)+_0x4fb7d9(0xea)),_0x45409d['join']('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x5ebac1=a0_0x1e55;(function(_0x2c1a2a,_0x517981){const _0x30d888=a0_0x1e55,_0x36ef68=_0x2c1a2a();while(!![]){try{const _0x3c4ccd=-parseInt(_0x30d888(0x15c))/0x1+-parseInt(_0x30d888(0x151))/0x2+parseInt(_0x30d888(0x150))/0x3*(parseInt(_0x30d888(0x131))/0x4)+parseInt(_0x30d888(0x158))/0x5*(-parseInt(_0x30d888(0x121))/0x6)+-parseInt(_0x30d888(0x105))/0x7*(parseInt(_0x30d888(0x129))/0x8)+-parseInt(_0x30d888(0x106))/0x9+parseInt(_0x30d888(0x13c))/0xa*(parseInt(_0x30d888(0x15e))/0xb);if(_0x3c4ccd===_0x517981)break;else _0x36ef68['push'](_0x36ef68['shift']());}catch(_0x43cdec){_0x36ef68['push'](_0x36ef68['shift']());}}}(a0_0x290b,0x2f624));Object[a0_0x5ebac1(0x10a)](exports,a0_0x5ebac1(0x13b),{'value':!![]}),exports[a0_0x5ebac1(0x11b)]=void 0x0,exports[a0_0x5ebac1(0x12a)]=compressOutput,exports[a0_0x5ebac1(0x15b)]=rewriteCommand;const generic_1=require(a0_0x5ebac1(0x10e)),git_1=require('./git'),python_1=require(a0_0x5ebac1(0x13a)),js_1=require(a0_0x5ebac1(0x109)),shell_1=require(a0_0x5ebac1(0x147)),rust_1=require('./rust'),go_1=require(a0_0x5ebac1(0x11e)),devops_1=require('./devops'),redactor_1=require(a0_0x5ebac1(0x156));function a0_0x290b(){const _0x733b2=['trim\x20glab','git\x20diff','stripAnsi','filterJestVitest','filterDockerImages','git\x20show','endsWith','cargo\x20clippy','./python','__esModule','50WMaSoz','filterCat','yadm\x20log','filterLs','jest','npm\x20i','pytest','length','match','secretsFound','trim\x20docker','./shell','\x20ls','npm\x20test','cargo\x20check','trim\x20ls','toLowerCase','cargo\x20build','redactWithAudit','filterCargoBuild','3VtmDNY','499056YhfwsC','kubectl','filterFind','ruff\x20','filterDockerLogs','../redactor','softTruncate','15985SAXcSg','test','filterGitDiff','rewriteCommand','179285GKrVlT','cargo\x20test','2740837lSRRHW','\x20tree','trim\x20tree','pattern','includes','14hittML','2459448RanWMf','yarn\x20test','trim\x20ruff','./js','defineProperty','filterKubectl','trim','filterPipInstall','./generic','filterGoTest','pip\x20install','filterPytest','filterNpmInstall','trim\x20pnpm','trim\x20','npm\x20install','trim\x20cargo','git\x20status','filterGitStatus','filterGrep','trim\x20git','lastRedactAudit','text','yadm\x20diff','./go','trim\x20find','filterGitLog','666lhkIKr','filterGoVet','trim\x20npx','vitest','trim\x20gh','ruff\x20check','npm\x20run\x20test','trim\x20grep','1131552SFcWPW','compressOutput','yadm\x20status','pnpm\x20install','filterRuff','trim\x20pytest','go\x20test','filterCargoTest','1152356rfgsDP'];a0_0x290b=function(){return _0x733b2;};return a0_0x290b();}exports[a0_0x5ebac1(0x11b)]={'secretsFound':0x0,'secretTypes':[]};function a0_0x1e55(_0x16ab36,_0x3ba9f5){_0x16ab36=_0x16ab36-0x101;const _0x290b33=a0_0x290b();let _0x1e5517=_0x290b33[_0x16ab36];return _0x1e5517;}function compressOutput(_0x533eff,_0x4cc267,_0x5f127e,_0x906d6c=!![]){const _0x52fe90=a0_0x5ebac1,_0x2f4a27=_0x533eff[_0x52fe90(0x10c)]();let _0x6f7a5d=_0x4cc267;_0x5f127e['trim']()[_0x52fe90(0x143)]>0x0&&(_0x6f7a5d=_0x4cc267+'\x0a'+_0x5f127e);let _0x276197=(0x0,generic_1[_0x52fe90(0x134)])(_0x6f7a5d);if(_0x906d6c){const _0x3a229a=redactor_1['redactor'][_0x52fe90(0x14e)](_0x276197);_0x276197=_0x3a229a[_0x52fe90(0x11c)],exports['lastRedactAudit']={'secretsFound':_0x3a229a[_0x52fe90(0x145)],'secretTypes':_0x3a229a['secretTypes']};}else exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};const _0x26b520=_0x2f4a27[_0x52fe90(0x14c)]();try{if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x117))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x12b)))return(0x0,git_1[_0x52fe90(0x118)])(_0x276197);if(_0x26b520['includes']('git\x20log')||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x13e)))return(0x0,git_1[_0x52fe90(0x120)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x133))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x137))||_0x26b520['includes'](_0x52fe90(0x11d)))return(0x0,git_1[_0x52fe90(0x15a)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x142))||_0x26b520[_0x52fe90(0x144)](/python3?\s+-m\s+pytest/))return(0x0,python_1[_0x52fe90(0x111)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x110))||_0x26b520[_0x52fe90(0x104)]('pip3\x20install'))return(0x0,python_1[_0x52fe90(0x10d)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x126))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x154)))return(0x0,devops_1[_0x52fe90(0x12d)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x115))||_0x26b520[_0x52fe90(0x104)]('npm\x20i\x20')||_0x26b520[_0x52fe90(0x138)](_0x52fe90(0x141))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x12c))||_0x26b520[_0x52fe90(0x104)]('yarn\x20install'))return(0x0,js_1[_0x52fe90(0x112)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x140))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x124)))return(0x0,js_1[_0x52fe90(0x135)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x149))||_0x26b520[_0x52fe90(0x104)]('pnpm\x20test')||_0x26b520['includes'](_0x52fe90(0x107))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x127)))return(0x0,js_1[_0x52fe90(0x135)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x15d)))return(0x0,rust_1[_0x52fe90(0x130)])(_0x276197);if(_0x26b520['includes'](_0x52fe90(0x14d))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x14a))||_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x139)))return(0x0,rust_1[_0x52fe90(0x14f)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x12f)))return(0x0,go_1[_0x52fe90(0x10f)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)]('go\x20vet'))return(0x0,go_1[_0x52fe90(0x122)])(_0x276197);if(_0x26b520[_0x52fe90(0x144)](/docker\s+ps/))return(0x0,devops_1['filterDockerPs'])(_0x276197);if(_0x26b520[_0x52fe90(0x144)](/docker\s+images/))return(0x0,devops_1[_0x52fe90(0x136)])(_0x276197);if(_0x26b520[_0x52fe90(0x144)](/docker\s+logs/))return(0x0,devops_1[_0x52fe90(0x155)])(_0x276197);if(_0x26b520[_0x52fe90(0x104)](_0x52fe90(0x152))){const _0x1af2b1=_0x26b520[_0x52fe90(0x144)](/kubectl\s+(get|logs|describe|apply)/),_0x33b94b=_0x1af2b1?_0x1af2b1[0x1]:'get';return(0x0,devops_1[_0x52fe90(0x10b)])(_0x276197,_0x33b94b);}if(_0x26b520[_0x52fe90(0x144)](/^(ls|dir)(\s|$)/)||_0x26b520['includes']('\x20ls\x20')||_0x26b520[_0x52fe90(0x138)](_0x52fe90(0x148)))return(0x0,shell_1[_0x52fe90(0x13f)])(_0x276197);if(_0x26b520[_0x52fe90(0x144)](/^tree(\s|$)/)||_0x26b520[_0x52fe90(0x104)]('\x20tree\x20')||_0x26b520[_0x52fe90(0x138)](_0x52fe90(0x101)))return(0x0,shell_1['filterTree'])(_0x276197);if(_0x26b520['match'](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1[_0x52fe90(0x13d)])(_0x276197,_0x2f4a27);if(_0x26b520[_0x52fe90(0x144)](/^find(\s|$)/))return(0x0,shell_1[_0x52fe90(0x153)])(_0x276197);if(_0x26b520[_0x52fe90(0x144)](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1[_0x52fe90(0x119)])(_0x276197);}catch(_0x27aeb4){}return _0x276197=(0x0,generic_1['collapseDuplicates'])(_0x276197),_0x276197=(0x0,generic_1[_0x52fe90(0x157)])(_0x276197,0x4e20),_0x276197;}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_0x5ebac1(0x11a)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x5ebac1(0x125)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x5ebac1(0x132)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x5ebac1(0x116)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x5ebac1(0x113)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':a0_0x5ebac1(0x123)},{'pattern':/^(cat|head|tail)\s+/,'prefix':'trim\x20read'},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x5ebac1(0x128)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x5ebac1(0x14b)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x5ebac1(0x102)},{'pattern':/^find\s+/,'prefix':a0_0x5ebac1(0x11f)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x5ebac1(0x146)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':'trim\x20kubectl'},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x5ebac1(0x12e)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x5ebac1(0x108)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':'trim\x20pip'},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x41a707){const _0xca0a06=a0_0x5ebac1,_0x42bdfd=_0x41a707[_0xca0a06(0x10c)]();if(_0x42bdfd['startsWith']('trim\x20'))return _0x42bdfd;for(const _0x29006c of REWRITE_RULES){if(_0x29006c[_0xca0a06(0x103)][_0xca0a06(0x159)](_0x42bdfd))return _0xca0a06(0x114)+_0x42bdfd;}return _0x42bdfd;}
|