trimprompt 1.0.26 → 1.0.27
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/api-proxy.js +1 -0
- package/cache.js +1 -1
- package/ccr.js +1 -0
- 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 +448 -11
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/proxy-conv.js +1 -0
- package/proxy-daemon.js +1 -0
- package/proxy-resp.js +1 -0
- 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/api-proxy.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const a0_0x1af568=a0_0x49c2;(function(_0x5ce77e,_0x6778fb){const _0x1cdc9b=a0_0x49c2,_0xd28d88=_0x5ce77e();while(!![]){try{const _0x105f28=parseInt(_0x1cdc9b(0xa0))/0x1*(-parseInt(_0x1cdc9b(0x7e))/0x2)+-parseInt(_0x1cdc9b(0xdc))/0x3*(parseInt(_0x1cdc9b(0x9f))/0x4)+parseInt(_0x1cdc9b(0x7f))/0x5+-parseInt(_0x1cdc9b(0xe6))/0x6*(parseInt(_0x1cdc9b(0xd4))/0x7)+parseInt(_0x1cdc9b(0xa4))/0x8+-parseInt(_0x1cdc9b(0x7c))/0x9*(parseInt(_0x1cdc9b(0xe2))/0xa)+-parseInt(_0x1cdc9b(0xd1))/0xb*(-parseInt(_0x1cdc9b(0xe5))/0xc);if(_0x105f28===_0x6778fb)break;else _0xd28d88['push'](_0xd28d88['shift']());}catch(_0x22ab05){_0xd28d88['push'](_0xd28d88['shift']());}}}(a0_0x5c50,0xbede7));var __createBinding=this&&this[a0_0x1af568(0x91)]||(Object[a0_0x1af568(0xad)]?function(_0x2bcb9c,_0x346e95,_0x1ecafd,_0x3c6540){const _0x5a0c43=a0_0x1af568;if(_0x3c6540===undefined)_0x3c6540=_0x1ecafd;var _0x25a319=Object['getOwnPropertyDescriptor'](_0x346e95,_0x1ecafd);(!_0x25a319||(_0x5a0c43(0x99)in _0x25a319?!_0x346e95['__esModule']:_0x25a319[_0x5a0c43(0xa5)]||_0x25a319[_0x5a0c43(0x92)]))&&(_0x25a319={'enumerable':!![],'get':function(){return _0x346e95[_0x1ecafd];}}),Object['defineProperty'](_0x2bcb9c,_0x3c6540,_0x25a319);}:function(_0xff6285,_0xa19158,_0x41d785,_0x2a272f){if(_0x2a272f===undefined)_0x2a272f=_0x41d785;_0xff6285[_0x2a272f]=_0xa19158[_0x41d785];}),__setModuleDefault=this&&this[a0_0x1af568(0xd8)]||(Object['create']?function(_0x483848,_0x1c2372){const _0x12da64=a0_0x1af568;Object['defineProperty'](_0x483848,_0x12da64(0x8d),{'enumerable':!![],'value':_0x1c2372});}:function(_0x2951ff,_0x16a55d){const _0x369805=a0_0x1af568;_0x2951ff[_0x369805(0x8d)]=_0x16a55d;}),__importStar=this&&this[a0_0x1af568(0xc5)]||(function(){var _0x7cb1a2=function(_0x347321){const _0x42fb7f=a0_0x49c2;return _0x7cb1a2=Object[_0x42fb7f(0xa7)]||function(_0x252344){const _0x3f5c3c=_0x42fb7f;var _0x50b5c3=[];for(var _0x39187a in _0x252344)if(Object[_0x3f5c3c(0x84)][_0x3f5c3c(0xeb)][_0x3f5c3c(0x95)](_0x252344,_0x39187a))_0x50b5c3[_0x50b5c3[_0x3f5c3c(0xb3)]]=_0x39187a;return _0x50b5c3;},_0x7cb1a2(_0x347321);};return function(_0x503435){const _0x4293dc=a0_0x49c2;if(_0x503435&&_0x503435[_0x4293dc(0xca)])return _0x503435;var _0x5536ff={};if(_0x503435!=null){for(var _0x3ea6bb=_0x7cb1a2(_0x503435),_0x292329=0x0;_0x292329<_0x3ea6bb[_0x4293dc(0xb3)];_0x292329++)if(_0x3ea6bb[_0x292329]!=='default')__createBinding(_0x5536ff,_0x503435,_0x3ea6bb[_0x292329]);}return __setModuleDefault(_0x5536ff,_0x503435),_0x5536ff;};}());Object[a0_0x1af568(0xe8)](exports,a0_0x1af568(0xca),{'value':!![]}),exports[a0_0x1af568(0xc0)]=startApiProxy;const http=__importStar(require('http')),https=__importStar(require('https')),url_1=require(a0_0x1af568(0x9c)),proxy_conv_1=require(a0_0x1af568(0xc8)),proxy_resp_1=require(a0_0x1af568(0x9b)),tracker_1=require('./tracker'),ANTHROPIC_API=a0_0x1af568(0xc9),OPENAI_API=a0_0x1af568(0x9d),COMPRESS_MAX_BYTES=0x4*0x400*0x400,MAX_PORT_RETRIES=0x5;function detectProvider(_0x14ed36,_0x28a6ee){const _0x363f22=a0_0x1af568,_0x326970=_0x14ed36||'';if(_0x326970[_0x363f22(0xcd)](_0x363f22(0xe7)))return _0x363f22(0xec);if(_0x326970[_0x363f22(0xcd)](_0x363f22(0xe3))||_0x326970[_0x363f22(0xcd)](_0x363f22(0xdd))||_0x326970[_0x363f22(0xcd)](_0x363f22(0xac)))return _0x363f22(0x8b);if(_0x28a6ee[_0x363f22(0x80)]||_0x28a6ee['anthropic-version'])return _0x363f22(0xec);if(_0x28a6ee[_0x363f22(0xb1)])return _0x363f22(0x8b);return'anthropic';}function a0_0x5c50(){const _0x1ac0a7=['headers','base','message','__setModuleDefault','entries','role','api.anthropic.com','779658WNNEli','/responses','tracker','content-length','listening','optimizeMaxTokens','20tchPji','/chat/completions','log','436356OvQArV','582PihpeG','/messages','defineProperty','pathname','POST','hasOwnProperty','anthropic','content','5904405mIrNvj','block','2167622cqgnMK','2563290ikdqPc','x-api-key','toLowerCase','stringify','createServer','prototype','statusCode','\x0aPress\x20Ctrl+C\x20to\x20stop.\x0a','\x20\x20-\x20Response\x20optimization:\x20\x20\x20\x20','data','request_error','headersSent','openai','OFF','default','savedTokens','code','\x20\x20-\x20Conversation\x20compression:\x20','__createBinding','configurable','map','unset','call','conv_compress','string','Upstream\x20timeout','get','max_tokens','./proxy-resp','url','https://api.openai.com','EADDRINUSE','12iBPPjD','1Vvmjnh','writeHead','api.openai.com','startsWith','11385304qGihmC','writable','utf8','getOwnPropertyNames','listen','127.0.0.1','type','host','/completions','create','method','push','features_enabled','authorization','[TrimPrompt]\x20Features:','length','timeout','\x0a[TrimPrompt]\x20API\x20proxy\x20running\x20on\x20http://127.0.0.1:','application/json','[TrimPrompt]\x20Proxy\x20failed\x20to\x20start:\x20','toUpperCase','error','compressConversation','max_completion_tokens','end','[TrimPrompt]\x20Set\x20in\x20your\x20environment:\x0a','port','resp_optimize','startApiProxy','text','write','isArray','destroy','__importStar','hostname','GET','./proxy-conv','https://api.anthropic.com','__esModule','logExecution','messages','includes','proxy_error','join','concat','748AdUbdl','/v1\x0a','\x20(Anthropic\x20+\x20OpenAI)','32557GoJMkx'];a0_0x5c50=function(){return _0x1ac0a7;};return a0_0x5c50();}function upstreamFor(_0xd1ec30){const _0x398439=a0_0x1af568;return _0xd1ec30===_0x398439(0x8b)?{'base':OPENAI_API,'host':_0x398439(0xa2)}:{'base':ANTHROPIC_API,'host':_0x398439(0xdb)};}function isChatEndpoint(_0x22b1b4,_0x3d26f4){const _0x28cef9=a0_0x1af568;if(_0x22b1b4!==_0x28cef9(0xea)||!_0x3d26f4)return![];return _0x3d26f4[_0x28cef9(0xa3)]('/v1/messages')||_0x3d26f4[_0x28cef9(0xa3)]('/v1/chat/completions')||_0x3d26f4[_0x28cef9(0xa3)]('/v1/responses');}function serializeMessages(_0x18212b){const _0x181e94=a0_0x1af568;try{return _0x18212b[_0x181e94(0x93)](_0x185d8c=>{const _0x1a871f=_0x181e94,_0x8a364b=typeof _0x185d8c[_0x1a871f(0x7b)]==='string'?_0x185d8c[_0x1a871f(0x7b)]:Array[_0x1a871f(0xc3)](_0x185d8c['content'])?_0x185d8c[_0x1a871f(0x7b)][_0x1a871f(0x93)](_0x3b7a2e=>_0x3b7a2e&&_0x3b7a2e['type']==='text'?_0x3b7a2e[_0x1a871f(0xc1)]||'':'['+(_0x3b7a2e&&_0x3b7a2e[_0x1a871f(0xaa)]?_0x3b7a2e[_0x1a871f(0xaa)]:_0x1a871f(0x7d))+']')[_0x1a871f(0xcf)]('\x0a'):'';return String(_0x185d8c[_0x1a871f(0xda)]||'unknown')[_0x1a871f(0xb8)]()+':\x20'+_0x8a364b;})[_0x181e94(0xcf)]('\x0a\x0a');}catch{return'';}}function isFeatureEnabled(_0x5d4ea8){const _0x3b0db4=a0_0x1af568;try{const _0xd616ca=tracker_1[_0x3b0db4(0xde)]['getConfig'](),_0x33c8a0=_0xd616ca[_0x3b0db4(0xb0)];if(!_0x33c8a0||_0x33c8a0[_0x5d4ea8]===undefined)return!![];return _0x33c8a0[_0x5d4ea8]!==![];}catch{return!![];}}function streamForward(_0x588839,_0x1b366e,_0x269ab5,_0x5d91c5){const _0x1f98f2=a0_0x1af568;let _0x1bbe4e;try{_0x1bbe4e=new url_1['URL'](_0x1b366e);}catch{return!_0x5d91c5[_0x1f98f2(0x8a)]&&(_0x5d91c5[_0x1f98f2(0xa1)](0x190,{'Content-Type':_0x1f98f2(0xb6)}),_0x5d91c5[_0x1f98f2(0xbc)](JSON[_0x1f98f2(0x82)]({'error':{'type':'invalid_url','message':'Bad\x20target\x20URL'}}))),null;}const _0x85450f={'hostname':_0x1bbe4e[_0x1f98f2(0xc6)],'port':_0x1bbe4e[_0x1f98f2(0xbe)]||0x1bb,'path':_0x1bbe4e[_0x1f98f2(0xe9)]+_0x1bbe4e['search'],'method':_0x588839,'headers':_0x269ab5,'timeout':0x1d4c0},_0x176b7b=https['request'](_0x85450f,_0x16cdb6=>{const _0x555d28=_0x1f98f2;try{_0x5d91c5[_0x555d28(0xa1)](_0x16cdb6[_0x555d28(0x85)]||0x1f6,_0x16cdb6[_0x555d28(0xd5)]),_0x16cdb6['pipe'](_0x5d91c5);}catch{try{_0x5d91c5[_0x555d28(0xbc)]();}catch{}}});return _0x176b7b['on'](_0x1f98f2(0xb9),_0x46844c=>{const _0x507fc5=_0x1f98f2;if(!_0x5d91c5[_0x507fc5(0x8a)])_0x5d91c5[_0x507fc5(0xa1)](0x1f6,{'Content-Type':'application/json'}),_0x5d91c5[_0x507fc5(0xbc)](JSON[_0x507fc5(0x82)]({'error':{'type':_0x507fc5(0xce),'message':_0x46844c['message']}}));else try{_0x5d91c5[_0x507fc5(0xbc)]();}catch{}}),_0x176b7b['on'](_0x1f98f2(0xb4),()=>{const _0x57ae18=_0x1f98f2;_0x176b7b[_0x57ae18(0xc4)](),!_0x5d91c5[_0x57ae18(0x8a)]&&(_0x5d91c5[_0x57ae18(0xa1)](0x1f8,{'Content-Type':_0x57ae18(0xb6)}),_0x5d91c5[_0x57ae18(0xbc)](JSON[_0x57ae18(0x82)]({'error':{'type':_0x57ae18(0xb4),'message':_0x57ae18(0x98)}})));}),_0x176b7b;}function a0_0x49c2(_0x2c2d76,_0x64dfc8){_0x2c2d76=_0x2c2d76-0x7b;const _0x5c5059=a0_0x5c50();let _0x49c28d=_0x5c5059[_0x2c2d76];return _0x49c28d;}function forwardRequest(_0x5e4469,_0x242376,_0x321575,_0x4efa42,_0x34fc5e){const _0x24a196=a0_0x1af568,_0x20b9a8=streamForward(_0x5e4469,_0x242376,_0x321575,_0x34fc5e);if(!_0x20b9a8)return;_0x20b9a8[_0x24a196(0xc2)](_0x4efa42),_0x20b9a8[_0x24a196(0xbc)]();}function processChatRequest(_0x36e5c1,_0x450ef7,_0x3ffd16,_0x3e63c1,_0x51f846,_0x1c31cb){const _0x48a54f=a0_0x1af568,_0x5b9eaf=_0x51f846;try{const _0x4defc9=JSON['parse'](_0x51f846['toString'](_0x48a54f(0xa6)));if(Array['isArray'](_0x4defc9[_0x48a54f(0xcc)])&&_0x4defc9[_0x48a54f(0xcc)][_0x48a54f(0xb3)]>0x0){if(isFeatureEnabled(_0x48a54f(0x96)))try{const _0xd1aecc=serializeMessages(_0x4defc9['messages']),_0x1fa3cf=(0x0,proxy_conv_1[_0x48a54f(0xba)])(_0x4defc9['messages']);if(_0x1fa3cf[_0x48a54f(0x8e)]>0x0){const _0x567002=serializeMessages(_0x1fa3cf[_0x48a54f(0xcc)]);_0x4defc9['messages']=_0x1fa3cf[_0x48a54f(0xcc)];try{tracker_1[_0x48a54f(0xde)][_0x48a54f(0xcb)]('proxy:conv-compress',_0xd1aecc,_0x567002,0x0,undefined,[_0x48a54f(0x96),_0x36e5c1]);}catch{}}}catch{}if(isFeatureEnabled(_0x48a54f(0xbf)))try{const _0x1ce817=_0x4defc9[_0x48a54f(0xbb)]!==undefined?_0x48a54f(0xbb):'max_tokens',_0x502dab=(0x0,proxy_resp_1[_0x48a54f(0xe1)])(_0x4defc9[_0x48a54f(0xcc)],_0x4defc9[_0x1ce817]);if(_0x502dab){const _0x2a81e9=_0x4defc9[_0x1ce817];_0x4defc9[_0x1ce817]=_0x502dab[_0x48a54f(0x9a)];try{tracker_1[_0x48a54f(0xde)][_0x48a54f(0xcb)]('proxy:resp-optimize',_0x1ce817+':'+(_0x2a81e9||_0x48a54f(0x94)),_0x1ce817+':'+_0x502dab[_0x48a54f(0x9a)],0x0,undefined,[_0x48a54f(0xbf),_0x36e5c1]);}catch{}}}catch{}try{const _0x2f8ae3=Buffer['from'](JSON['stringify'](_0x4defc9),_0x48a54f(0xa6));_0x3e63c1[_0x48a54f(0xdf)]=String(_0x2f8ae3[_0x48a54f(0xb3)]),forwardRequest(_0x450ef7,_0x3ffd16,_0x3e63c1,_0x2f8ae3,_0x1c31cb);return;}catch{}}}catch{}forwardRequest(_0x450ef7,_0x3ffd16,_0x3e63c1,_0x5b9eaf,_0x1c31cb);}function startApiProxy(_0x3b3fee=0x1f90){let _0xc0f592=0x0;function _0x37d562(_0x206fad){const _0x1c4325=a0_0x49c2,_0x3e59e7=http[_0x1c4325(0x83)]((_0x4c3017,_0x56c805)=>{const _0x3f9803=_0x1c4325,_0x2c52cb=detectProvider(_0x4c3017[_0x3f9803(0x9c)]||'',_0x4c3017[_0x3f9803(0xd5)]),_0x5842a4=upstreamFor(_0x2c52cb),_0x41f33c=''+_0x5842a4[_0x3f9803(0xd6)]+_0x4c3017['url'],_0x1c64b1=()=>{const _0x530399=_0x3f9803,_0x434181={};for(const [_0x314935,_0x11f10c]of Object[_0x530399(0xd9)](_0x4c3017[_0x530399(0xd5)])){if(_0x314935[_0x530399(0x81)]()===_0x530399(0xab))_0x434181[_0x314935]=_0x5842a4[_0x530399(0xab)];else{if(typeof _0x11f10c===_0x530399(0x97))_0x434181[_0x314935]=_0x11f10c;}}return _0x434181;};let _0x523c45=0x0;const _0x26b100=[];let _0x5aeb2e=![],_0x440d64=null;_0x4c3017['on'](_0x3f9803(0x88),_0x51031d=>{const _0xa155ac=_0x3f9803;if(_0x5aeb2e){if(_0x440d64)try{_0x440d64[_0xa155ac(0xc2)](_0x51031d);}catch{}return;}_0x523c45+=_0x51031d[_0xa155ac(0xb3)],_0x26b100[_0xa155ac(0xaf)](_0x51031d);if(_0x523c45>COMPRESS_MAX_BYTES){_0x5aeb2e=!![],_0x440d64=streamForward(_0x4c3017['method']||_0xa155ac(0xea),_0x41f33c,_0x1c64b1(),_0x56c805);if(_0x440d64)for(const _0x110542 of _0x26b100){try{_0x440d64[_0xa155ac(0xc2)](_0x110542);}catch{}}_0x26b100[_0xa155ac(0xb3)]=0x0;}}),_0x4c3017['on'](_0x3f9803(0xbc),()=>{const _0x233c32=_0x3f9803;if(_0x5aeb2e){if(_0x440d64)try{_0x440d64[_0x233c32(0xbc)]();}catch{}return;}if(_0x56c805['writableEnded'])return;const _0x2f0a07=Buffer[_0x233c32(0xd0)](_0x26b100),_0x365aab=_0x1c64b1();isChatEndpoint(_0x4c3017[_0x233c32(0xae)],_0x4c3017[_0x233c32(0x9c)])?processChatRequest(_0x2c52cb,_0x4c3017[_0x233c32(0xae)],_0x41f33c,_0x365aab,_0x2f0a07,_0x56c805):forwardRequest(_0x4c3017['method']||_0x233c32(0xc7),_0x41f33c,_0x365aab,_0x2f0a07,_0x56c805);}),_0x4c3017['on']('error',()=>{const _0x40594a=_0x3f9803;!_0x56c805[_0x40594a(0x8a)]&&(_0x56c805[_0x40594a(0xa1)](0x190,{'Content-Type':_0x40594a(0xb6)}),_0x56c805[_0x40594a(0xbc)](JSON[_0x40594a(0x82)]({'error':{'type':_0x40594a(0x89),'message':'Bad\x20request'}})));});});_0x3e59e7['on'](_0x1c4325(0xe0),()=>{const _0x1a5d6a=_0x1c4325;console[_0x1a5d6a(0xe4)](_0x1a5d6a(0xb5)+_0x206fad+_0x1a5d6a(0xd3)),console[_0x1a5d6a(0xe4)](_0x1a5d6a(0xbd)),console[_0x1a5d6a(0xe4)]('\x20\x20ANTHROPIC_BASE_URL=http://127.0.0.1:'+_0x206fad),console['log']('\x20\x20OPENAI_BASE_URL=http://127.0.0.1:'+_0x206fad+_0x1a5d6a(0xd2)),console['log'](_0x1a5d6a(0xb2)),console[_0x1a5d6a(0xe4)](_0x1a5d6a(0x90)+(isFeatureEnabled('conv_compress')?'ON':_0x1a5d6a(0x8c))),console[_0x1a5d6a(0xe4)](_0x1a5d6a(0x87)+(isFeatureEnabled(_0x1a5d6a(0xbf))?'ON':'OFF')),console[_0x1a5d6a(0xe4)](_0x1a5d6a(0x86));}),_0x3e59e7['on'](_0x1c4325(0xb9),_0x2ee9c9=>{const _0x5dfb50=_0x1c4325;_0x2ee9c9[_0x5dfb50(0x8f)]===_0x5dfb50(0x9e)&&_0xc0f592<MAX_PORT_RETRIES?(_0xc0f592++,_0x37d562(_0x206fad+0x1)):(console[_0x5dfb50(0xb9)](_0x5dfb50(0xb7)+_0x2ee9c9[_0x5dfb50(0xd7)]),process['exit'](0x1));}),_0x3e59e7[_0x1c4325(0xa8)](_0x206fad,_0x1c4325(0xa9));}_0x37d562(_0x3b3fee);}
|
package/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5408ac=a0_0x2af3;(function(_0x525351,_0xaff405){const _0x3b5da4=a0_0x2af3,_0x596032=_0x525351();while(!![]){try{const _0x35d019=parseInt(_0x3b5da4(0xe7))/0x1*(-parseInt(_0x3b5da4(0xf0))/0x2)+-parseInt(_0x3b5da4(0x112))/0x3*(parseInt(_0x3b5da4(0xf4))/0x4)+-parseInt(_0x3b5da4(0xf6))/0x5*(parseInt(_0x3b5da4(0x10f))/0x6)+parseInt(_0x3b5da4(0x119))/0x7+-parseInt(_0x3b5da4(0xfe))/0x8*(parseInt(_0x3b5da4(0xe2))/0x9)+parseInt(_0x3b5da4(0x109))/0xa+parseInt(_0x3b5da4(0x10e))/0xb;if(_0x35d019===_0xaff405)break;else _0x596032['push'](_0x596032['shift']());}catch(_0x5643de){_0x596032['push'](_0x596032['shift']());}}}(a0_0x1061,0x64784));var __createBinding=this&&this[a0_0x5408ac(0xfc)]||(Object[a0_0x5408ac(0x10d)]?function(_0x4e8dc6,_0x5d781a,_0x326f48,_0x3aa630){const _0x459d5c=a0_0x5408ac;if(_0x3aa630===undefined)_0x3aa630=_0x326f48;var _0x4d6d16=Object[_0x459d5c(0xe4)](_0x5d781a,_0x326f48);(!_0x4d6d16||(_0x459d5c(0x111)in _0x4d6d16?!_0x5d781a[_0x459d5c(0xe8)]:_0x4d6d16['writable']||_0x4d6d16[_0x459d5c(0xd7)]))&&(_0x4d6d16={'enumerable':!![],'get':function(){return _0x5d781a[_0x326f48];}}),Object[_0x459d5c(0x106)](_0x4e8dc6,_0x3aa630,_0x4d6d16);}:function(_0x47150e,_0x30f33c,_0x2ebb4a,_0x14a0de){if(_0x14a0de===undefined)_0x14a0de=_0x2ebb4a;_0x47150e[_0x14a0de]=_0x30f33c[_0x2ebb4a];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x5408ac(0x10d)]?function(_0x3d869a,_0x4b37de){const _0x4ffa15=a0_0x5408ac;Object['defineProperty'](_0x3d869a,_0x4ffa15(0xd9),{'enumerable':!![],'value':_0x4b37de});}:function(_0x420161,_0x592740){const _0x4e122a=a0_0x5408ac;_0x420161[_0x4e122a(0xd9)]=_0x592740;}),__importStar=this&&this['__importStar']||(function(){var _0x2f0667=function(_0x588109){const _0x13e372=a0_0x2af3;return _0x2f0667=Object[_0x13e372(0xef)]||function(_0x5533ac){const _0x3abbb7=_0x13e372;var _0x2d7449=[];for(var _0x5018d7 in _0x5533ac)if(Object[_0x3abbb7(0x102)][_0x3abbb7(0xfa)][_0x3abbb7(0xe0)](_0x5533ac,_0x5018d7))_0x2d7449[_0x2d7449['length']]=_0x5018d7;return _0x2d7449;},_0x2f0667(_0x588109);};return function(_0x25bf54){const _0x1617bc=a0_0x2af3;if(_0x25bf54&&_0x25bf54['__esModule'])return _0x25bf54;var _0x205615={};if(_0x25bf54!=null){for(var _0x2146c7=_0x2f0667(_0x25bf54),_0x47e322=0x0;_0x47e322<_0x2146c7[_0x1617bc(0xfb)];_0x47e322++)if(_0x2146c7[_0x47e322]!==_0x1617bc(0xd9))__createBinding(_0x205615,_0x25bf54,_0x2146c7[_0x47e322]);}return __setModuleDefault(_0x205615,_0x25bf54),_0x205615;};}());Object[a0_0x5408ac(0x106)](exports,a0_0x5408ac(0xe8),{'value':!![]}),exports[a0_0x5408ac(0x113)]=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5408ac(0xda))),os=__importStar(require('os')),crypto=__importStar(require('crypto')),CACHE_DIR=path['join'](os[a0_0x5408ac(0xf3)](),a0_0x5408ac(0xd6)),CACHE_FILE=path[a0_0x5408ac(0xf8)](CACHE_DIR,a0_0x5408ac(0x100)),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 a0_0x2af3(_0x1d08e8,_0x33295b){_0x1d08e8=_0x1d08e8-0xd5;const _0x106185=a0_0x1061();let _0x2af3a7=_0x106185[_0x1d08e8];return _0x2af3a7;}function classifyCommand(_0x1abf96){const _0x396d76=a0_0x5408ac,_0x17f0e4=_0x1abf96[_0x396d76(0xea)]()[_0x396d76(0xff)]();if(_0x17f0e4[_0x396d76(0xed)](/^(cat|head|tail|read|bat)\s/))return'file';if(_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0x101))||_0x17f0e4[_0x396d76(0xd5)]('yadm\x20status'))return _0x396d76(0xf9);if(_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0x115))||_0x17f0e4['includes'](_0x396d76(0x104)))return _0x396d76(0x107);if(_0x17f0e4[_0x396d76(0xd5)]('git\x20show')||_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0xe5)))return'git-show';if(_0x17f0e4[_0x396d76(0xed)](/^(ls|dir)(\s|$)/)||_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0x103))||_0x17f0e4[_0x396d76(0xe6)](_0x396d76(0x116)))return'ls';if(_0x17f0e4[_0x396d76(0xed)](/^tree(\s|$)/)||_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0x10c))||_0x17f0e4[_0x396d76(0xe6)](_0x396d76(0x10a)))return'tree';if(_0x17f0e4[_0x396d76(0xed)](/docker\s+ps/))return'docker-ps';if(_0x17f0e4[_0x396d76(0xed)](/docker\s+images/))return _0x396d76(0x114);if(_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0xec))||_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0x105)))return'kubectl';if(_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0xeb))||_0x17f0e4[_0x396d76(0xd5)]('ruff\x20'))return'ruff';if(_0x17f0e4[_0x396d76(0xd5)](_0x396d76(0xdd)))return'go-vet';return'';}function md5(_0x4f1c95){const _0x306f67=a0_0x5408ac;return crypto[_0x306f67(0x108)](_0x306f67(0x117))['update'](_0x4f1c95)[_0x306f67(0xdc)]('hex');}function loadStore(){const _0x3c25ef=a0_0x5408ac;try{if(fs[_0x3c25ef(0xd8)](CACHE_FILE))return JSON[_0x3c25ef(0xdb)](fs['readFileSync'](CACHE_FILE,_0x3c25ef(0xf7)));}catch{}return{};}function saveStore(_0x138d55){const _0x540214=a0_0x5408ac;try{if(!fs[_0x540214(0xd8)](CACHE_DIR))fs[_0x540214(0xde)](CACHE_DIR,{'recursive':!![]});const _0x2bed06=Object['keys'](_0x138d55);if(_0x2bed06['length']>MAX_ENTRIES){const _0x38b8f4=_0x2bed06[_0x540214(0xe1)]((_0x280fa7,_0x17b538)=>_0x138d55[_0x280fa7][_0x540214(0x110)]-_0x138d55[_0x17b538][_0x540214(0x110)]);for(const _0x5cd129 of _0x38b8f4[_0x540214(0x11a)](0x0,_0x2bed06['length']-MAX_ENTRIES)){delete _0x138d55[_0x5cd129];}}fs[_0x540214(0xdf)](CACHE_FILE,JSON[_0x540214(0xf5)](_0x138d55),_0x540214(0xf7));}catch{}}function a0_0x1061(){const _0x350dd9=['kubectl\x20describe','defineProperty','git-log','createHash','2131550KkMiIs','\x20tree','docker','\x20tree\x20','create','13815175LRrtxB','39624HsuoLL','timestamp','get','237FskBhN','dedup','docker-images','git\x20log','\x20ls','md5','cwd','1779519FcNuem','slice','includes','.trimprompt','configurable','existsSync','default','path','parse','digest','go\x20vet','mkdirSync','writeFileSync','call','sort','9vbaaSv','now','getOwnPropertyDescriptor','yadm\x20show','endsWith','122431gfxhrg','__esModule','file','trim','ruff\x20check','kubectl\x20get','match','\x20lines,\x20','getOwnPropertyNames','6TsHlMo','\x20chars','split','homedir','28024XHqDeu','stringify','250HhQBHB','utf8','join','git-status','hasOwnProperty','length','__createBinding','\x20lines','486448BfinAG','toLowerCase','cache.json','git\x20status','prototype','\x20ls\x20','yadm\x20log'];a0_0x1061=function(){return _0x350dd9;};return a0_0x1061();}function buildSummary(_0x545ded,_0x10f504){const _0x157cc8=a0_0x5408ac,_0x26b16e=_0x545ded[_0x157cc8(0xf2)]('\x0a')[_0x157cc8(0xfb)],_0x109b74=_0x545ded[_0x157cc8(0xfb)];if(_0x10f504===_0x157cc8(0xe9))return _0x26b16e+_0x157cc8(0xee)+_0x109b74+'\x20chars';if(_0x10f504===_0x157cc8(0xf9))return _0x26b16e+_0x157cc8(0xfd);if(_0x10f504===_0x157cc8(0x107))return _0x26b16e+'\x20entries';if(_0x10f504['startsWith'](_0x157cc8(0x10b)))return _0x26b16e+'\x20lines';return _0x26b16e+_0x157cc8(0xee)+_0x109b74+_0x157cc8(0xf1);}function dedup(_0x11c9a3,_0x31db7e){const _0x55f6e6=a0_0x5408ac;try{const _0x25cfc5=classifyCommand(_0x11c9a3);if(!_0x25cfc5)return null;const _0x3464a5=TTL_SECONDS[_0x25cfc5];if(!_0x3464a5)return null;const _0x423349=process[_0x55f6e6(0x118)](),_0x4d9f74=md5(_0x423349+'::'+_0x11c9a3[_0x55f6e6(0xea)]()),_0x52de30=md5(_0x31db7e),_0x43d480=Date[_0x55f6e6(0xe3)](),_0x14fa06=loadStore(),_0x174983=_0x14fa06[_0x4d9f74];if(_0x174983&&_0x174983['hash']===_0x52de30&&_0x43d480-_0x174983[_0x55f6e6(0x110)]<_0x3464a5*0x3e8){const _0x34dbb5=Math['round']((_0x43d480-_0x174983['timestamp'])/0x3e8);return'[cached\x20—\x20unchanged\x20since\x20'+_0x34dbb5+'s\x20ago,\x20'+_0x174983['summary']+']';}_0x14fa06[_0x4d9f74]={'hash':_0x52de30,'summary':buildSummary(_0x31db7e,_0x25cfc5),'timestamp':_0x43d480,'chars':_0x31db7e[_0x55f6e6(0xfb)]},saveStore(_0x14fa06);}catch{}return null;}
|
package/ccr.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const a0_0x466f09=a0_0x5348;(function(_0x4a2641,_0x279e91){const _0x42eaf6=a0_0x5348,_0x26117a=_0x4a2641();while(!![]){try{const _0x60bed7=-parseInt(_0x42eaf6(0x20e))/0x1*(-parseInt(_0x42eaf6(0x1e8))/0x2)+parseInt(_0x42eaf6(0x1d3))/0x3+-parseInt(_0x42eaf6(0x1d7))/0x4+-parseInt(_0x42eaf6(0x1cc))/0x5+parseInt(_0x42eaf6(0x1ec))/0x6*(-parseInt(_0x42eaf6(0x1e3))/0x7)+parseInt(_0x42eaf6(0x20f))/0x8*(parseInt(_0x42eaf6(0x205))/0x9)+parseInt(_0x42eaf6(0x1fd))/0xa;if(_0x60bed7===_0x279e91)break;else _0x26117a['push'](_0x26117a['shift']());}catch(_0x21468f){_0x26117a['push'](_0x26117a['shift']());}}}(a0_0x1724,0x4ba5d));function a0_0x1724(){const _0x3c54e0=['.jsx','join','import','.\x20To\x20read\x20the\x20full\x20raw\x20content,\x20run\x20the\x20shell\x20command:\x20trim\x20retrieve\x20','mkdirSync','slice','2gSGOEb','16ercBIk','default','__createBinding','existsSync','def\x20','writeFileSync','.js','2585315BpyYmx','match','substring','get','homedir','prototype','trim','1105752jdBqbn','path','utf8',']\x0a\x0a','2454484iCKcwm','create','writable','#\x20...\x20[collapsed]','call','endsWith','includes','.cpp','split','__esModule','class','toLowerCase','18305wyvype','class\x20','defineProperty','__importStar','replace','66498UhAzts','.rs','interface','let','600CRLSXJ','createHash','startsWith','hex','.txt','repeat','var','getOwnPropertyNames','pop','.java','runCcr','import\x20','length','\x22\x22\x22','extname','push','pub','6883510BrWPKr','function','crypto','package','configurable','.ts','__setModuleDefault','from\x20','2603718fqIulq','//\x20...\x20[collapsed]','update'];a0_0x1724=function(){return _0x3c54e0;};return a0_0x1724();}var __createBinding=this&&this[a0_0x466f09(0x211)]||(Object['create']?function(_0x52e7f7,_0xd8540a,_0x5a780e,_0x2f94de){const _0x576e4a=a0_0x466f09;if(_0x2f94de===undefined)_0x2f94de=_0x5a780e;var _0x59ec00=Object['getOwnPropertyDescriptor'](_0xd8540a,_0x5a780e);(!_0x59ec00||(_0x576e4a(0x1cf)in _0x59ec00?!_0xd8540a[_0x576e4a(0x1e0)]:_0x59ec00[_0x576e4a(0x1d9)]||_0x59ec00[_0x576e4a(0x201)]))&&(_0x59ec00={'enumerable':!![],'get':function(){return _0xd8540a[_0x5a780e];}}),Object['defineProperty'](_0x52e7f7,_0x2f94de,_0x59ec00);}:function(_0x34fe20,_0x13873e,_0x224665,_0x51786f){if(_0x51786f===undefined)_0x51786f=_0x224665;_0x34fe20[_0x51786f]=_0x13873e[_0x224665];}),__setModuleDefault=this&&this[a0_0x466f09(0x203)]||(Object[a0_0x466f09(0x1d8)]?function(_0x1351b5,_0x478cfe){const _0x2bc186=a0_0x466f09;Object[_0x2bc186(0x1e5)](_0x1351b5,_0x2bc186(0x210),{'enumerable':!![],'value':_0x478cfe});}:function(_0x42c0c3,_0x1a75aa){const _0x3e59cc=a0_0x466f09;_0x42c0c3[_0x3e59cc(0x210)]=_0x1a75aa;}),__importStar=this&&this[a0_0x466f09(0x1e6)]||(function(){var _0x38c241=function(_0x218a15){const _0x2f46e7=a0_0x5348;return _0x38c241=Object[_0x2f46e7(0x1f3)]||function(_0x1e0122){const _0x27aa10=_0x2f46e7;var _0x54d607=[];for(var _0x521f9d in _0x1e0122)if(Object[_0x27aa10(0x1d1)]['hasOwnProperty'][_0x27aa10(0x1db)](_0x1e0122,_0x521f9d))_0x54d607[_0x54d607[_0x27aa10(0x1f8)]]=_0x521f9d;return _0x54d607;},_0x38c241(_0x218a15);};return function(_0x9df10b){const _0x4d09a7=a0_0x5348;if(_0x9df10b&&_0x9df10b[_0x4d09a7(0x1e0)])return _0x9df10b;var _0x131888={};if(_0x9df10b!=null){for(var _0x56978f=_0x38c241(_0x9df10b),_0x171c13=0x0;_0x171c13<_0x56978f[_0x4d09a7(0x1f8)];_0x171c13++)if(_0x56978f[_0x171c13]!==_0x4d09a7(0x210))__createBinding(_0x131888,_0x9df10b,_0x56978f[_0x171c13]);}return __setModuleDefault(_0x131888,_0x9df10b),_0x131888;};}());Object[a0_0x466f09(0x1e5)](exports,a0_0x466f09(0x1e0),{'value':!![]}),exports['skeletonize']=skeletonize,exports[a0_0x466f09(0x1f6)]=runCcr;function a0_0x5348(_0x3261d8,_0x4d4bc2){_0x3261d8=_0x3261d8-0x1cc;const _0x172477=a0_0x1724();let _0x53481c=_0x172477[_0x3261d8];return _0x53481c;}const crypto=__importStar(require(a0_0x466f09(0x1ff))),fs=__importStar(require('fs')),path=__importStar(require(a0_0x466f09(0x1d4))),os=__importStar(require('os'));function skeletonize(_0xb5edee,_0x399095){const _0x56691b=a0_0x466f09,_0x439633=path[_0x56691b(0x1fa)](_0x399095[_0x56691b(0x1df)]('\x20')[_0x56691b(0x1f4)]()||'')[_0x56691b(0x1e2)](),_0x5ab6a7=_0xb5edee['split']('\x0a'),_0x248b3d=[];if(_0x439633==='.py'){let _0x779f1=![],_0x417ed1='';for(let _0xdae9f4=0x0;_0xdae9f4<_0x5ab6a7[_0x56691b(0x1f8)];_0xdae9f4++){const _0x2c8323=_0x5ab6a7[_0xdae9f4],_0x4eb142=_0x2c8323[_0x56691b(0x1d2)](),_0x3a04c4=_0x2c8323['length']-_0x2c8323['trimStart']()['length'];if(!_0x779f1&&(_0x4eb142[_0x56691b(0x1ee)](_0x56691b(0x1f9))||_0x4eb142['startsWith']('\x27\x27\x27'))){_0x779f1=!![],_0x417ed1=_0x4eb142['substring'](0x0,0x3),_0x248b3d[_0x56691b(0x1fb)](_0x2c8323);_0x4eb142[_0x56691b(0x1dc)](_0x417ed1)&&_0x4eb142['length']>0x3&&(_0x779f1=![]);continue;}if(_0x779f1){_0x248b3d['push'](_0x2c8323);_0x4eb142[_0x56691b(0x1dc)](_0x417ed1)&&(_0x779f1=![]);continue;}if(_0x4eb142[_0x56691b(0x1ee)](_0x56691b(0x1f7))||_0x4eb142[_0x56691b(0x1ee)](_0x56691b(0x204))||_0x4eb142[_0x56691b(0x1ee)](_0x56691b(0x1e4))||_0x4eb142[_0x56691b(0x1ee)](_0x56691b(0x213))||_0x4eb142[_0x56691b(0x1ee)]('@')||_0x4eb142['startsWith']('#')||_0x4eb142[_0x56691b(0x1f8)]===0x0)_0x248b3d[_0x56691b(0x1fb)](_0x2c8323);else{const _0x689687=_0x248b3d[_0x248b3d[_0x56691b(0x1f8)]-0x1]||'';if(!_0x689687[_0x56691b(0x1d2)]()['endsWith']('#\x20...\x20[collapsed]')){const _0xbe21e1='\x20'[_0x56691b(0x1f1)](_0x3a04c4);_0x248b3d[_0x56691b(0x1fb)](_0xbe21e1+_0x56691b(0x1da));}}}return _0x248b3d[_0x56691b(0x209)]('\x0a');}if([_0x56691b(0x215),_0x56691b(0x202),_0x56691b(0x208),'.tsx','.go',_0x56691b(0x1e9),_0x56691b(0x1f5),'.c',_0x56691b(0x1de),'.h'][_0x56691b(0x1dd)](_0x439633)){let _0x15e049=0x0;for(let _0x55eaa5=0x0;_0x55eaa5<_0x5ab6a7[_0x56691b(0x1f8)];_0x55eaa5++){const _0x5ca8b7=_0x5ab6a7[_0x55eaa5],_0x5d5b32=_0x5ca8b7['trim'](),_0x2c9b87=(_0x5d5b32[_0x56691b(0x1cd)](/\{/g)||[])[_0x56691b(0x1f8)],_0x3ef63d=(_0x5d5b32['match'](/\}/g)||[])[_0x56691b(0x1f8)];if(_0x15e049===0x0)(_0x5d5b32['startsWith'](_0x56691b(0x20a))||_0x5d5b32[_0x56691b(0x1ee)]('export')||_0x5d5b32['startsWith']('const')||_0x5d5b32[_0x56691b(0x1ee)](_0x56691b(0x1eb))||_0x5d5b32['startsWith'](_0x56691b(0x1f2))||_0x5d5b32[_0x56691b(0x1ee)](_0x56691b(0x1e1))||_0x5d5b32[_0x56691b(0x1ee)](_0x56691b(0x1fe))||_0x5d5b32[_0x56691b(0x1ee)](_0x56691b(0x1ea))||_0x5d5b32[_0x56691b(0x1ee)]('type')||_0x5d5b32[_0x56691b(0x1ee)](_0x56691b(0x200))||_0x5d5b32[_0x56691b(0x1ee)]('fn')||_0x5d5b32[_0x56691b(0x1ee)](_0x56691b(0x1fc))||_0x5d5b32[_0x56691b(0x1f8)]===0x0||_0x5d5b32[_0x56691b(0x1ee)]('//')||_0x5d5b32[_0x56691b(0x1ee)]('/*')||_0x5d5b32['startsWith']('*'))&&_0x248b3d[_0x56691b(0x1fb)](_0x5ca8b7),_0x2c9b87>_0x3ef63d&&(_0x15e049+=_0x2c9b87-_0x3ef63d);else{const _0x20e406=_0x15e049+_0x2c9b87-_0x3ef63d;if(_0x20e406<=0x0){const _0x2ea623=_0x5ca8b7[_0x56691b(0x1cd)](/^\s*/)?.[0x0]||'';_0x248b3d['push'](_0x2ea623+_0x56691b(0x206)),_0x248b3d[_0x56691b(0x1fb)](_0x5ca8b7),_0x15e049=0x0;}else _0x15e049=_0x20e406;}}return _0x248b3d[_0x56691b(0x209)]('\x0a');}if(_0x5ab6a7[_0x56691b(0x1f8)]<=0x64)return _0xb5edee;return[..._0x5ab6a7[_0x56691b(0x20d)](0x0,0x1e),'\x0a...\x20['+(_0x5ab6a7['length']-0x32)+'\x20lines\x20collapsed\x20to\x20save\x20tokens]\x20...\x0a',..._0x5ab6a7[_0x56691b(0x20d)](-0x14)][_0x56691b(0x209)]('\x0a');}function runCcr(_0x594aca,_0x2a4160){const _0x2bd59c=a0_0x466f09,_0xf46464=_0x2a4160[_0x2bd59c(0x1e7)](/\\/g,'/'),_0x4d9c2d='tp_'+crypto[_0x2bd59c(0x1ed)]('md5')[_0x2bd59c(0x207)](_0x594aca)['digest'](_0x2bd59c(0x1ef))[_0x2bd59c(0x1ce)](0x0,0xa),_0x1c6e34=path[_0x2bd59c(0x209)](os[_0x2bd59c(0x1d0)](),'.trimprompt'),_0x4f39c1=path[_0x2bd59c(0x209)](_0x1c6e34,'ccr');!fs[_0x2bd59c(0x212)](_0x4f39c1)&&fs[_0x2bd59c(0x20c)](_0x4f39c1,{'recursive':!![]});fs[_0x2bd59c(0x214)](path[_0x2bd59c(0x209)](_0x4f39c1,_0x4d9c2d+_0x2bd59c(0x1f0)),_0x594aca,_0x2bd59c(0x1d5));const _0x37268d=skeletonize(_0x594aca,_0xf46464);return'[TrimPrompt:\x20CCR\x20Active.\x20Body\x20of\x20functions\x20collapsed\x20to\x20save\x20tokens.\x20Hash:\x20'+_0x4d9c2d+_0x2bd59c(0x20b)+_0x4d9c2d+_0x2bd59c(0x1d6)+_0x37268d;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';function a0_0x30ec(){const _0x5d27a9=['mcp-proxy','<key>','exitCode','trim','./filters','get','exit','<commandLine>','1308774JOmkkD','--min-parents','test','=============================================','create','false','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','Config\x20set\x20','dashboard','total_raw_tokens','total_compressed_tokens','compressed_cost_usd','40VGNYTo','resolve','-m,\x20--model\x20<string>','commander','[value]','./mcp','name','model','cmd','includes','npx','description','prototype','<action>','length','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','stderr','rewrite','shims','36256NmHCUa','total_tokens_saved','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','4000','args','--no-merges','write','__VERSION__','status','mcp-server','writable','config','npm','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','pnpm','tracker','model_name','port','Error:\x20Value\x20required\x20for\x20set\x20action','win32','startDashboard','slice','Command\x20line\x20to\x20evaluate','getStatsSummary','set','-10','true','Manage\x20local\x20configuration\x20parameters','message','postinstall','error','yadm','Install\x20or\x20uninstall\x20system\x20command\x20shims','version','startsWith','lastRedactAudit','defineProperty','then','<server-command>','help','proxy','default','\x5c\x5c.\x5cCON','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','savings_percentage','argument','setConfig','config\x20parameter\x20name','--pretty','hasOwnProperty','1.0.0','5RhiPUs','-p,\x20--port\x20<number>','uninstall','toFixed','get\x20or\x20set','install\x20or\x20uninstall','--format','__esModule','rewriteCommand','./cache','@modelcontextprotocol/','parse','971955csOwSS','stdout','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','uninstallShims','push','yarn','./shims','dedup','install','249tSYPfT','__setModuleDefault','git','modelcontextprotocol','/dev/tty','5125200lpgbHa','1UhEkQR','getConfig','963935AOrqLy','redaction_enabled','action','value\x20to\x20set','command','Port\x20to\x20run\x20the\x20dashboard\x20on','server-mcp','65328hakDHl','node','writeFileSync','option','Estimated\x20Cost:\x20\x20\x20\x20$','alias','compressOutput','log','argv','getOwnPropertyDescriptor','./executor','12waAdrW','\x20(before\x20Trim)','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','getOwnPropertyNames','claude-3-5-sonnet','every','8920912gCYTVI','\x20(after\x20Trim)','toLowerCase','\x0a=============================================','stats','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','\x20USD','--oneline','join','1.0.26','some','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','raw_cost_usd','mcp','Show\x20token\x20and\x20cost\x20savings\x20summary','toLocaleString','executeCommand','[server-args...]'];a0_0x30ec=function(){return _0x5d27a9;};return a0_0x30ec();}const a0_0xb16d5=a0_0x4df5;(function(_0x108660,_0x3a08a9){const _0x4afe37=a0_0x4df5,_0x4c5ece=_0x108660();while(!![]){try{const _0x1ddd1e=parseInt(_0x4afe37(0x1fa))/0x1*(parseInt(_0x4afe37(0x22e))/0x2)+parseInt(_0x4afe37(0x1f4))/0x3*(-parseInt(_0x4afe37(0x24d))/0x4)+parseInt(_0x4afe37(0x282))/0x5*(parseInt(_0x4afe37(0x203))/0x6)+parseInt(_0x4afe37(0x1fc))/0x7*(parseInt(_0x4afe37(0x23a))/0x8)+parseInt(_0x4afe37(0x1ea))/0x9+parseInt(_0x4afe37(0x1f9))/0xa+-parseInt(_0x4afe37(0x214))/0xb*(parseInt(_0x4afe37(0x20e))/0xc);if(_0x1ddd1e===_0x3a08a9)break;else _0x4c5ece['push'](_0x4c5ece['shift']());}catch(_0x2c51a9){_0x4c5ece['push'](_0x4c5ece['shift']());}}}(a0_0x30ec,0x64583));var __createBinding=this&&this['__createBinding']||(Object[a0_0xb16d5(0x232)]?function(_0x5ce481,_0x236cc2,_0xc00d9c,_0x43bf8b){const _0x35ea1f=a0_0xb16d5;if(_0x43bf8b===undefined)_0x43bf8b=_0xc00d9c;var _0x3bb562=Object[_0x35ea1f(0x20c)](_0x236cc2,_0xc00d9c);(!_0x3bb562||('get'in _0x3bb562?!_0x236cc2[_0x35ea1f(0x1e5)]:_0x3bb562[_0x35ea1f(0x259)]||_0x3bb562['configurable']))&&(_0x3bb562={'enumerable':!![],'get':function(){return _0x236cc2[_0xc00d9c];}}),Object['defineProperty'](_0x5ce481,_0x43bf8b,_0x3bb562);}:function(_0x144ab2,_0x2d6400,_0x154eb5,_0x2bce40){if(_0x2bce40===undefined)_0x2bce40=_0x154eb5;_0x144ab2[_0x2bce40]=_0x2d6400[_0x154eb5];}),__setModuleDefault=this&&this[a0_0xb16d5(0x1f5)]||(Object[a0_0xb16d5(0x232)]?function(_0x25eca7,_0x281666){const _0x4f9274=a0_0xb16d5;Object[_0x4f9274(0x273)](_0x25eca7,'default',{'enumerable':!![],'value':_0x281666});}:function(_0x2f68ac,_0x3a1b0c){const _0x5cf57f=a0_0xb16d5;_0x2f68ac[_0x5cf57f(0x278)]=_0x3a1b0c;}),__importStar=this&&this['__importStar']||(function(){var _0x1c85ab=function(_0x40e3a9){const _0x306d48=a0_0x4df5;return _0x1c85ab=Object[_0x306d48(0x211)]||function(_0x3a67c1){const _0x14617d=_0x306d48;var _0x5659d8=[];for(var _0x170d8b in _0x3a67c1)if(Object[_0x14617d(0x246)][_0x14617d(0x280)]['call'](_0x3a67c1,_0x170d8b))_0x5659d8[_0x5659d8[_0x14617d(0x248)]]=_0x170d8b;return _0x5659d8;},_0x1c85ab(_0x40e3a9);};return function(_0x1d2895){const _0x4b1cd0=a0_0x4df5;if(_0x1d2895&&_0x1d2895['__esModule'])return _0x1d2895;var _0x19905f={};if(_0x1d2895!=null){for(var _0x4b0375=_0x1c85ab(_0x1d2895),_0x4f5915=0x0;_0x4f5915<_0x4b0375[_0x4b1cd0(0x248)];_0x4f5915++)if(_0x4b0375[_0x4f5915]!==_0x4b1cd0(0x278))__createBinding(_0x19905f,_0x1d2895,_0x4b0375[_0x4f5915]);}return __setModuleDefault(_0x19905f,_0x1d2895),_0x19905f;};}());Object[a0_0xb16d5(0x273)](exports,'__esModule',{'value':!![]});const commander_1=require(a0_0xb16d5(0x23d)),executor_1=require(a0_0xb16d5(0x20d)),filters_1=require(a0_0xb16d5(0x22a)),tracker_1=require('./tracker'),cache_1=require(a0_0xb16d5(0x1e7)),shims_1=require(a0_0xb16d5(0x1f1)),dashboard_1=require('./dashboard'),program=new commander_1['Command']();function a0_0x4df5(_0x1ed7af,_0x130d25){_0x1ed7af=_0x1ed7af-0x1e3;const _0x30ecaf=a0_0x30ec();let _0x4df581=_0x30ecaf[_0x1ed7af];return _0x4df581;}function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x49f25d,_0x51e815){const _0x11260c=a0_0xb16d5,_0xc0b6df=_0x49f25d['toLowerCase']();if(_0xc0b6df===_0x11260c(0x1f6)||_0xc0b6df===_0x11260c(0x26e)){const _0x1fb861=_0x51e815[0x0];if(_0x1fb861===_0x11260c(0x257)){const _0x37b75f=_0x51e815['slice'](0x1),_0x9a9313=_0x37b75f[_0x11260c(0x248)]===0x0||_0x37b75f[_0x11260c(0x213)](_0xd6b114=>{return _0xd6b114==='-b'||_0xd6b114==='--branch'||_0xd6b114==='-sb'||_0xd6b114==='-bs'||_0xd6b114==='-s'||_0xd6b114==='--short';});if(_0x9a9313)return{'cmd':_0x49f25d,'args':[_0x11260c(0x257),'--porcelain','-b']};}else{if(_0x1fb861===_0x11260c(0x20a)){const _0x4505d1=_0x51e815[_0x11260c(0x264)](0x1),_0x4fc75e=_0x4505d1[_0x11260c(0x21e)](_0x1fb0c0=>_0x1fb0c0[_0x11260c(0x271)](_0x11260c(0x21b))||_0x1fb0c0['startsWith'](_0x11260c(0x27f))||_0x1fb0c0[_0x11260c(0x271)](_0x11260c(0x1e4))),_0x50ab1d=_0x4505d1[_0x11260c(0x21e)](_0x344495=>_0x344495[_0x11260c(0x271)]('-')&&/^\d+$/[_0x11260c(0x230)](_0x344495[_0x11260c(0x264)](0x1))||_0x344495==='-n'||_0x344495[_0x11260c(0x271)]('--max-count')),_0x2f82c5=[..._0x51e815];if(!_0x4fc75e){const _0x10a79d=_0x11260c(0x250);_0x2f82c5[_0x11260c(0x1ef)](process['platform']===_0x11260c(0x262)?'\x22'+_0x10a79d+'\x22':_0x10a79d);}!_0x50ab1d&&(_0x4fc75e?_0x2f82c5[_0x11260c(0x1ef)]('-50'):_0x2f82c5[_0x11260c(0x1ef)](_0x11260c(0x268)));const _0x10b250=_0x4505d1[_0x11260c(0x21e)](_0x139ae3=>_0x139ae3==='--merges'||_0x139ae3===_0x11260c(0x254)||_0x139ae3[_0x11260c(0x271)](_0x11260c(0x22f)));return!_0x10b250&&!_0x50ab1d&&_0x2f82c5['push'](_0x11260c(0x254)),{'cmd':_0x49f25d,'args':_0x2f82c5};}}}return{'cmd':_0x49f25d,'args':_0x51e815};}function isMcpServerExecution(_0x4fadee,_0x490818){const _0xa0db95=a0_0xb16d5,_0xb0dcd9=_0x4fadee[_0xa0db95(0x216)](),_0x3f5368=_0x490818['join']('\x20')[_0xa0db95(0x216)]();if(_0xb0dcd9[_0xa0db95(0x243)](_0xa0db95(0x221))&&(_0xb0dcd9[_0xa0db95(0x243)]('server')||_0xb0dcd9['includes'](_0xa0db95(0x277))))return!![];if(_0xb0dcd9===_0xa0db95(0x244)||_0xb0dcd9===_0xa0db95(0x204)||_0xb0dcd9==='bun'||_0xb0dcd9===_0xa0db95(0x25b)||_0xb0dcd9===_0xa0db95(0x25d)||_0xb0dcd9===_0xa0db95(0x1f0)){if(_0x3f5368[_0xa0db95(0x243)](_0xa0db95(0x1e8))||_0x3f5368[_0xa0db95(0x243)](_0xa0db95(0x1f7))||_0x3f5368['includes'](_0xa0db95(0x258))||_0x3f5368[_0xa0db95(0x243)]('server-mcp'))return!![];}if(_0x490818[_0xa0db95(0x21e)](_0x5421e9=>{const _0x260626=_0xa0db95,_0x5f17a5=_0x5421e9[_0x260626(0x216)]();return _0x5f17a5['includes'](_0x260626(0x258))||_0x5f17a5[_0x260626(0x243)](_0x260626(0x202))||_0x5f17a5['includes'](_0x260626(0x1e8))||_0x5f17a5===_0x260626(0x226)||_0x5f17a5===_0x260626(0x221);}))return!![];return![];}async function runProxy(_0x42795a){const _0x594fb8=a0_0xb16d5;if(_0x42795a[_0x594fb8(0x248)]===0x0){program['help']();return;}const _0x50c2a9=_0x42795a[0x0],_0x2c26b3=_0x42795a[_0x594fb8(0x264)](0x1),_0x112609=_0x42795a[_0x594fb8(0x21c)]('\x20');if(isDisabled()){const _0x6ca511=await(0x0,executor_1[_0x594fb8(0x224)])(_0x50c2a9,_0x2c26b3);process[_0x594fb8(0x1eb)][_0x594fb8(0x255)](_0x6ca511[_0x594fb8(0x1eb)]),process[_0x594fb8(0x24a)]['write'](_0x6ca511['stderr']),process[_0x594fb8(0x22c)](_0x6ca511[_0x594fb8(0x228)]);}if(isMcpServerExecution(_0x50c2a9,_0x2c26b3)){console[_0x594fb8(0x26d)]('[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...');const {runMcpProxy:_0x299ee7}=await Promise[_0x594fb8(0x23b)]()['then'](()=>__importStar(require('./mcp')));_0x299ee7(_0x50c2a9,_0x2c26b3);return;}const _0x334828=adjustCommandArgs(_0x50c2a9,_0x2c26b3),_0x5a2994=await(0x0,executor_1[_0x594fb8(0x224)])(_0x334828[_0x594fb8(0x242)],_0x334828[_0x594fb8(0x253)]),_0x40c294=(0x0,filters_1[_0x594fb8(0x209)])(_0x112609,_0x5a2994[_0x594fb8(0x1eb)],_0x5a2994['stderr'],tracker_1[_0x594fb8(0x25e)][_0x594fb8(0x1fb)]()[_0x594fb8(0x1fd)]),_0x10d481={...filters_1[_0x594fb8(0x272)]},_0x5238ed=_0x5a2994['stdout']+(_0x5a2994[_0x594fb8(0x24a)]['trim']()[_0x594fb8(0x248)]>0x0?'\x0a'+_0x5a2994[_0x594fb8(0x24a)]:''),_0x4203c3=_0x40c294[_0x594fb8(0x248)]<_0x5238ed['length']?_0x40c294:_0x5238ed,_0x59508b=_0x5a2994[_0x594fb8(0x228)]===0x0?(0x0,cache_1[_0x594fb8(0x1f2)])(_0x112609,_0x4203c3):null;tracker_1['tracker']['logExecution'](_0x112609,_0x5238ed,_0x59508b||_0x4203c3,_0x5a2994[_0x594fb8(0x228)],_0x10d481),_0x5a2994['exitCode']===0x0?process[_0x594fb8(0x1eb)][_0x594fb8(0x255)](_0x4203c3+'\x0a'):(process['stdout'][_0x594fb8(0x255)](_0x40c294+'\x0a'),_0x5a2994['stderr'][_0x594fb8(0x229)]()['length']>0x0&&!_0x40c294[_0x594fb8(0x243)](_0x5a2994['stderr'][_0x594fb8(0x229)]())&&process['stderr'][_0x594fb8(0x255)](_0x5a2994[_0x594fb8(0x24a)]+'\x0a')),process[_0x594fb8(0x22c)](_0x5a2994[_0x594fb8(0x228)]);}program[a0_0xb16d5(0x240)](a0_0xb16d5(0x229))[a0_0xb16d5(0x245)](a0_0xb16d5(0x25c))['version'](((()=>{const _0x32c16c=a0_0xb16d5,_0x42d1d6=_0x32c16c(0x21d);if(_0x42d1d6!==_0x32c16c(0x256))return _0x42d1d6;try{return require('../package.json')[_0x32c16c(0x270)];}catch{try{return require('./package.json')['version'];}catch{return _0x32c16c(0x281);}}})())),program[a0_0xb16d5(0x200)]('ui')[a0_0xb16d5(0x208)](a0_0xb16d5(0x236))[a0_0xb16d5(0x245)]('Start\x20the\x20local\x20developer\x20dashboard')[a0_0xb16d5(0x206)](a0_0xb16d5(0x283),a0_0xb16d5(0x201),a0_0xb16d5(0x252))[a0_0xb16d5(0x1fe)](_0x504a82=>{const _0xf35287=a0_0xb16d5,_0x5a781d=parseInt(_0x504a82[_0xf35287(0x260)],0xa);(0x0,dashboard_1[_0xf35287(0x263)])(_0x5a781d);}),program[a0_0xb16d5(0x200)](a0_0xb16d5(0x218))[a0_0xb16d5(0x245)](a0_0xb16d5(0x222))[a0_0xb16d5(0x206)](a0_0xb16d5(0x23c),a0_0xb16d5(0x234),a0_0xb16d5(0x212))[a0_0xb16d5(0x1fe)](_0x428316=>{const _0x4bd376=a0_0xb16d5,_0x5806ad=tracker_1['tracker'][_0x4bd376(0x266)](_0x428316[_0x4bd376(0x241)]);console['log'](_0x4bd376(0x217)),console[_0x4bd376(0x20a)](_0x4bd376(0x21f)),console[_0x4bd376(0x20a)](_0x4bd376(0x231)),console[_0x4bd376(0x20a)]('Model\x20Context:\x20\x20\x20\x20\x20'+_0x5806ad[_0x4bd376(0x25f)]),console[_0x4bd376(0x20a)]('Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5806ad[_0x4bd376(0x237)]['toLocaleString']()),console[_0x4bd376(0x20a)](_0x4bd376(0x219)+_0x5806ad[_0x4bd376(0x238)][_0x4bd376(0x223)]()),console['log'](_0x4bd376(0x210)+_0x5806ad[_0x4bd376(0x24e)][_0x4bd376(0x223)]()),console[_0x4bd376(0x20a)]('Reduction\x20Rate:\x20\x20\x20\x20'+_0x5806ad[_0x4bd376(0x27b)]+'%'),console[_0x4bd376(0x20a)](_0x4bd376(0x207)+_0x5806ad[_0x4bd376(0x220)][_0x4bd376(0x285)](0x4)+_0x4bd376(0x20f)),console['log'](_0x4bd376(0x27a)+_0x5806ad[_0x4bd376(0x239)][_0x4bd376(0x285)](0x4)+_0x4bd376(0x215)),console[_0x4bd376(0x20a)]('---------------------------------------------'),console[_0x4bd376(0x20a)](_0x4bd376(0x24f)+_0x5806ad['money_saved_usd']['toFixed'](0x4)+_0x4bd376(0x21a)),console[_0x4bd376(0x20a)]('=============================================\x0a');}),program[a0_0xb16d5(0x200)](a0_0xb16d5(0x25a))['description'](a0_0xb16d5(0x26a))['argument'](a0_0xb16d5(0x247),a0_0xb16d5(0x286))[a0_0xb16d5(0x27c)](a0_0xb16d5(0x227),a0_0xb16d5(0x27e))[a0_0xb16d5(0x27c)](a0_0xb16d5(0x23e),a0_0xb16d5(0x1ff))[a0_0xb16d5(0x1fe)]((_0x5614d1,_0x3e4d58,_0x4a430f)=>{const _0x492108=a0_0xb16d5;if(_0x5614d1===_0x492108(0x22b)){const _0x38e1ac=tracker_1['tracker'][_0x492108(0x1fb)]();console['log'](_0x3e4d58+':\x20'+_0x38e1ac[_0x3e4d58]);}else{if(_0x5614d1===_0x492108(0x267)){_0x4a430f===undefined&&(console['error'](_0x492108(0x261)),process[_0x492108(0x22c)](0x1));let _0x151835=_0x4a430f;if(_0x4a430f===_0x492108(0x269))_0x151835=!![];if(_0x4a430f===_0x492108(0x233))_0x151835=![];if(/^\d+$/['test'](_0x4a430f))_0x151835=parseInt(_0x4a430f,0xa);tracker_1['tracker'][_0x492108(0x27d)](_0x3e4d58,_0x151835),console[_0x492108(0x20a)](_0x492108(0x235)+_0x3e4d58+'\x20=\x20'+_0x4a430f);}else console[_0x492108(0x26d)](_0x492108(0x249)),process[_0x492108(0x22c)](0x1);}});function printMessage(_0xce0dfe){const _0x29b29d=a0_0xb16d5;if(process.env.npm_lifecycle_event===_0x29b29d(0x26c))try{const _0x24a9f9=require('fs'),_0x11796=process['platform']===_0x29b29d(0x262)?_0x29b29d(0x279):_0x29b29d(0x1f8);_0x24a9f9[_0x29b29d(0x205)](_0x11796,'\x0a'+_0xce0dfe+'\x0a');return;}catch{}console['log'](_0xce0dfe);}program[a0_0xb16d5(0x200)]('shims')[a0_0xb16d5(0x245)](a0_0xb16d5(0x26f))[a0_0xb16d5(0x27c)]('<action>',a0_0xb16d5(0x1e3))[a0_0xb16d5(0x1fe)](_0x327419=>{const _0x4bd10d=a0_0xb16d5;if(_0x327419===_0x4bd10d(0x1f3)){const _0x56da17=(0x0,shims_1['installShims'])();printMessage(_0x56da17['message']);}else{if(_0x327419===_0x4bd10d(0x284)){const _0x271b4b=(0x0,shims_1[_0x4bd10d(0x1ee)])();printMessage(_0x271b4b[_0x4bd10d(0x26b)]);}else console['error']('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process[_0x4bd10d(0x22c)](0x1);}}),program[a0_0xb16d5(0x200)]('rewrite')[a0_0xb16d5(0x245)](a0_0xb16d5(0x251))[a0_0xb16d5(0x27c)](a0_0xb16d5(0x22d),a0_0xb16d5(0x265))[a0_0xb16d5(0x1fe)](_0x579f4b=>{const _0xcc9dba=a0_0xb16d5;if(isDisabled()){console['log'](_0x579f4b);return;}const _0x343315=(0x0,filters_1[_0xcc9dba(0x1e6)])(_0x579f4b);console['log'](_0x343315);}),program[a0_0xb16d5(0x200)](a0_0xb16d5(0x226))['alias'](a0_0xb16d5(0x221))[a0_0xb16d5(0x245)](a0_0xb16d5(0x1ec))[a0_0xb16d5(0x27c)](a0_0xb16d5(0x275),a0_0xb16d5(0x1ed))[a0_0xb16d5(0x27c)](a0_0xb16d5(0x225),'Arguments\x20for\x20the\x20target\x20MCP\x20server')['action'](async(_0x1b4e5a,_0x4ed2c6)=>{const _0x161d6b=a0_0xb16d5,{runMcpProxy:_0x410f93}=await Promise[_0x161d6b(0x23b)]()[_0x161d6b(0x274)](()=>__importStar(require(_0x161d6b(0x23f))));_0x410f93(_0x1b4e5a,_0x4ed2c6);});const args=process[a0_0xb16d5(0x20b)][a0_0xb16d5(0x264)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0xb16d5(0x236),a0_0xb16d5(0x218),a0_0xb16d5(0x25a),a0_0xb16d5(0x24c),a0_0xb16d5(0x24b),'mcp-proxy',a0_0xb16d5(0x221),a0_0xb16d5(0x276),'--help','-h','version','--version','-v'];firstArg&&!subcommands[a0_0xb16d5(0x243)](firstArg)?runProxy(args)['catch'](_0x2cf8a7=>{const _0x280895=a0_0xb16d5;console[_0x280895(0x26d)]('[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20'+_0x2cf8a7[_0x280895(0x26b)]),process[_0x280895(0x22c)](0x1);}):program[a0_0xb16d5(0x1e9)](process['argv']);
|
|
2
|
+
'use strict';const a0_0x5af593=a0_0x1ef4;(function(_0x521a35,_0x2e4298){const _0x36621d=a0_0x1ef4,_0x1fc4e4=_0x521a35();while(!![]){try{const _0x567922=parseInt(_0x36621d(0x247))/0x1*(parseInt(_0x36621d(0x21c))/0x2)+-parseInt(_0x36621d(0x267))/0x3+-parseInt(_0x36621d(0x1d1))/0x4+parseInt(_0x36621d(0x1e2))/0x5+parseInt(_0x36621d(0x1e8))/0x6*(parseInt(_0x36621d(0x1e9))/0x7)+-parseInt(_0x36621d(0x1e6))/0x8+-parseInt(_0x36621d(0x262))/0x9;if(_0x567922===_0x2e4298)break;else _0x1fc4e4['push'](_0x1fc4e4['shift']());}catch(_0xeaf9d6){_0x1fc4e4['push'](_0x1fc4e4['shift']());}}}(a0_0x1cb5,0xea066));var __createBinding=this&&this[a0_0x5af593(0x1ec)]||(Object[a0_0x5af593(0x24f)]?function(_0x2cd219,_0x5bd436,_0xb3373a,_0x7ca53c){const _0x45c3c1=a0_0x5af593;if(_0x7ca53c===undefined)_0x7ca53c=_0xb3373a;var _0x317d98=Object[_0x45c3c1(0x26b)](_0x5bd436,_0xb3373a);(!_0x317d98||(_0x45c3c1(0x221)in _0x317d98?!_0x5bd436[_0x45c3c1(0x258)]:_0x317d98[_0x45c3c1(0x1f1)]||_0x317d98[_0x45c3c1(0x240)]))&&(_0x317d98={'enumerable':!![],'get':function(){return _0x5bd436[_0xb3373a];}}),Object[_0x45c3c1(0x25c)](_0x2cd219,_0x7ca53c,_0x317d98);}:function(_0x31485d,_0x3827e4,_0x44931f,_0x5c5b6e){if(_0x5c5b6e===undefined)_0x5c5b6e=_0x44931f;_0x31485d[_0x5c5b6e]=_0x3827e4[_0x44931f];}),__setModuleDefault=this&&this[a0_0x5af593(0x210)]||(Object[a0_0x5af593(0x24f)]?function(_0x128d58,_0x331a08){const _0x7f57ef=a0_0x5af593;Object['defineProperty'](_0x128d58,_0x7f57ef(0x1f9),{'enumerable':!![],'value':_0x331a08});}:function(_0x3f9587,_0x53c460){const _0x1fca66=a0_0x5af593;_0x3f9587[_0x1fca66(0x1f9)]=_0x53c460;}),__importStar=this&&this[a0_0x5af593(0x249)]||(function(){var _0x55c802=function(_0x5653f4){return _0x55c802=Object['getOwnPropertyNames']||function(_0x207bee){const _0x55c28a=a0_0x1ef4;var _0x57d62f=[];for(var _0x5cf55f in _0x207bee)if(Object['prototype'][_0x55c28a(0x24c)]['call'](_0x207bee,_0x5cf55f))_0x57d62f[_0x57d62f['length']]=_0x5cf55f;return _0x57d62f;},_0x55c802(_0x5653f4);};return function(_0x2183cb){const _0x5cabac=a0_0x1ef4;if(_0x2183cb&&_0x2183cb[_0x5cabac(0x258)])return _0x2183cb;var _0x3eb795={};if(_0x2183cb!=null){for(var _0x55afe8=_0x55c802(_0x2183cb),_0x4fc98d=0x0;_0x4fc98d<_0x55afe8[_0x5cabac(0x1e7)];_0x4fc98d++)if(_0x55afe8[_0x4fc98d]!==_0x5cabac(0x1f9))__createBinding(_0x3eb795,_0x2183cb,_0x55afe8[_0x4fc98d]);}return __setModuleDefault(_0x3eb795,_0x2183cb),_0x3eb795;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]});const commander_1=require(a0_0x5af593(0x22c)),executor_1=require('./executor'),filters_1=require(a0_0x5af593(0x273)),tracker_1=require(a0_0x5af593(0x21d)),cache_1=require(a0_0x5af593(0x275)),shims_1=require(a0_0x5af593(0x237)),dashboard_1=require('./dashboard'),program=new commander_1[(a0_0x5af593(0x1d9))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x2b811e,_0x544520){const _0x2ea944=a0_0x5af593,_0x3e8a72=_0x2b811e[_0x2ea944(0x232)]();if(_0x3e8a72===_0x2ea944(0x208)||_0x3e8a72===_0x2ea944(0x254)){const _0x8a4c76=_0x544520[0x0];if(_0x8a4c76===_0x2ea944(0x21b)){const _0x40ff09=_0x544520[_0x2ea944(0x20b)](0x1),_0x51a46e=_0x40ff09['length']===0x0||_0x40ff09[_0x2ea944(0x27c)](_0x1d842e=>{const _0x7438e2=_0x2ea944;return _0x1d842e==='-b'||_0x1d842e===_0x7438e2(0x20a)||_0x1d842e===_0x7438e2(0x24b)||_0x1d842e===_0x7438e2(0x20e)||_0x1d842e==='-s'||_0x1d842e===_0x7438e2(0x25e);});if(_0x51a46e)return{'cmd':_0x2b811e,'args':[_0x2ea944(0x21b),_0x2ea944(0x216),'-b']};}else{if(_0x8a4c76==='log'){const _0x271989=_0x544520[_0x2ea944(0x20b)](0x1),_0x29cd96=_0x271989['some'](_0x44883a=>_0x44883a[_0x2ea944(0x1f5)](_0x2ea944(0x1d8))||_0x44883a[_0x2ea944(0x1f5)](_0x2ea944(0x1da))||_0x44883a[_0x2ea944(0x1f5)](_0x2ea944(0x233))),_0x33a7b9=_0x271989['some'](_0xf72bc1=>_0xf72bc1[_0x2ea944(0x1f5)]('-')&&/^\d+$/[_0x2ea944(0x214)](_0xf72bc1[_0x2ea944(0x20b)](0x1))||_0xf72bc1==='-n'||_0xf72bc1[_0x2ea944(0x1f5)](_0x2ea944(0x209))),_0x483c93=[..._0x544520];if(!_0x29cd96){const _0x3a992b=_0x2ea944(0x227);_0x483c93['push'](process[_0x2ea944(0x25f)]==='win32'?'\x22'+_0x3a992b+'\x22':_0x3a992b);}!_0x33a7b9&&(_0x29cd96?_0x483c93['push'](_0x2ea944(0x1d5)):_0x483c93[_0x2ea944(0x26e)](_0x2ea944(0x20c)));const _0x2a0884=_0x271989['some'](_0x3eeff4=>_0x3eeff4===_0x2ea944(0x229)||_0x3eeff4===_0x2ea944(0x266)||_0x3eeff4[_0x2ea944(0x1f5)](_0x2ea944(0x1ef)));return!_0x2a0884&&!_0x33a7b9&&_0x483c93['push']('--no-merges'),{'cmd':_0x2b811e,'args':_0x483c93};}}}return{'cmd':_0x2b811e,'args':_0x544520};}function a0_0x1ef4(_0x385df8,_0x38ac56){_0x385df8=_0x385df8-0x1d1;const _0x1cb517=a0_0x1cb5();let _0x1ef40d=_0x1cb517[_0x385df8];return _0x1ef40d;}function isMcpServerExecution(_0xda7414,_0x270cb5){const _0xf5f011=a0_0x5af593,_0x15d8f2=_0xda7414[_0xf5f011(0x232)](),_0x9a6ebc=_0x270cb5[_0xf5f011(0x202)]('\x20')['toLowerCase']();if(_0x15d8f2[_0xf5f011(0x268)](_0xf5f011(0x257))&&(_0x15d8f2[_0xf5f011(0x268)](_0xf5f011(0x265))||_0x15d8f2['includes'](_0xf5f011(0x1eb))))return!![];if(_0x15d8f2===_0xf5f011(0x25d)||_0x15d8f2===_0xf5f011(0x256)||_0x15d8f2===_0xf5f011(0x215)||_0x15d8f2===_0xf5f011(0x1e3)||_0x15d8f2===_0xf5f011(0x23b)||_0x15d8f2===_0xf5f011(0x1d6)){if(_0x9a6ebc['includes'](_0xf5f011(0x1d7))||_0x9a6ebc['includes'](_0xf5f011(0x280))||_0x9a6ebc['includes'](_0xf5f011(0x207))||_0x9a6ebc['includes']('server-mcp'))return!![];}if(_0x270cb5['some'](_0x5d520b=>{const _0x1ddd7e=_0xf5f011,_0x3219fd=_0x5d520b[_0x1ddd7e(0x232)]();return _0x3219fd[_0x1ddd7e(0x268)](_0x1ddd7e(0x207))||_0x3219fd['includes'](_0x1ddd7e(0x205))||_0x3219fd[_0x1ddd7e(0x268)](_0x1ddd7e(0x1d7))||_0x3219fd===_0x1ddd7e(0x22b)||_0x3219fd===_0x1ddd7e(0x257);}))return!![];return![];}async function runProxy(_0x5d79a1){const _0x2d4447=a0_0x5af593;if(_0x5d79a1[_0x2d4447(0x1e7)]===0x0){program[_0x2d4447(0x251)]();return;}const _0xdce289=_0x5d79a1[0x0],_0x3bf3fe=_0x5d79a1['slice'](0x1),_0x580baf=_0x5d79a1[_0x2d4447(0x202)]('\x20');if(isDisabled()){const _0x1b22fa=await(0x0,executor_1['executeCommand'])(_0xdce289,_0x3bf3fe);process[_0x2d4447(0x21e)][_0x2d4447(0x225)](_0x1b22fa['stdout']),process[_0x2d4447(0x252)][_0x2d4447(0x225)](_0x1b22fa['stderr']),process[_0x2d4447(0x203)](_0x1b22fa[_0x2d4447(0x22f)]);}if(isMcpServerExecution(_0xdce289,_0x3bf3fe)){console['error'](_0x2d4447(0x224));const {runMcpProxy:_0x1268bf}=await Promise['resolve']()[_0x2d4447(0x1fa)](()=>__importStar(require(_0x2d4447(0x277))));_0x1268bf(_0xdce289,_0x3bf3fe);return;}const _0x28bbdb=adjustCommandArgs(_0xdce289,_0x3bf3fe),_0x2b08a8=await(0x0,executor_1[_0x2d4447(0x200)])(_0x28bbdb[_0x2d4447(0x234)],_0x28bbdb['args']),_0x184653=(0x0,filters_1[_0x2d4447(0x1dc)])(_0x580baf,_0x2b08a8[_0x2d4447(0x21e)],_0x2b08a8[_0x2d4447(0x252)],tracker_1[_0x2d4447(0x228)][_0x2d4447(0x253)]()[_0x2d4447(0x1fb)]),_0x232f1d={...filters_1[_0x2d4447(0x23a)]},_0x4747c8=_0x2b08a8['stdout']+(_0x2b08a8[_0x2d4447(0x252)][_0x2d4447(0x279)]()[_0x2d4447(0x1e7)]>0x0?'\x0a'+_0x2b08a8['stderr']:''),_0x220da2=_0x184653[_0x2d4447(0x1e7)]<_0x4747c8['length']?_0x184653:_0x4747c8,_0x200a76=_0x2b08a8[_0x2d4447(0x22f)]===0x0?(0x0,cache_1['dedup'])(_0x580baf,_0x220da2):null;tracker_1[_0x2d4447(0x228)][_0x2d4447(0x22d)](_0x580baf,_0x4747c8,_0x200a76||_0x220da2,_0x2b08a8[_0x2d4447(0x22f)],_0x232f1d,[...filters_1['lastFeatures']]),_0x2b08a8['exitCode']===0x0?process[_0x2d4447(0x21e)][_0x2d4447(0x225)](_0x220da2+'\x0a'):(process[_0x2d4447(0x21e)]['write'](_0x184653+'\x0a'),_0x2b08a8[_0x2d4447(0x252)][_0x2d4447(0x279)]()[_0x2d4447(0x1e7)]>0x0&&!_0x184653[_0x2d4447(0x268)](_0x2b08a8['stderr']['trim']())&&process[_0x2d4447(0x252)][_0x2d4447(0x225)](_0x2b08a8[_0x2d4447(0x252)]+'\x0a')),process[_0x2d4447(0x203)](_0x2b08a8[_0x2d4447(0x22f)]);}program[a0_0x5af593(0x231)](a0_0x5af593(0x279))['description'](a0_0x5af593(0x1f4))[a0_0x5af593(0x213)](((()=>{const _0x42440f=a0_0x5af593,_0x3bb9eb=_0x42440f(0x1f2);if(_0x3bb9eb!==_0x42440f(0x1fc))return _0x3bb9eb;try{return require(_0x42440f(0x1de))['version'];}catch{try{return require('./package.json')['version'];}catch{return _0x42440f(0x276);}}})())),program['command']('ui')[a0_0x5af593(0x22e)](a0_0x5af593(0x269))[a0_0x5af593(0x250)]('Start\x20the\x20local\x20developer\x20dashboard')[a0_0x5af593(0x1f7)](a0_0x5af593(0x1fd),a0_0x5af593(0x248),a0_0x5af593(0x284))[a0_0x5af593(0x22a)](_0x1bf23c=>{const _0x3d6888=a0_0x5af593,_0x44bfc9=parseInt(_0x1bf23c['port'],0xa);(0x0,dashboard_1[_0x3d6888(0x263)])(_0x44bfc9);}),program[a0_0x5af593(0x206)](a0_0x5af593(0x241))['description'](a0_0x5af593(0x23c))[a0_0x5af593(0x1f7)](a0_0x5af593(0x261),a0_0x5af593(0x220),a0_0x5af593(0x1e5))[a0_0x5af593(0x22a)](_0x3958fd=>{const _0x19325d=a0_0x5af593,_0x4f2244=tracker_1[_0x19325d(0x228)][_0x19325d(0x1f6)](_0x3958fd[_0x19325d(0x27e)]);console[_0x19325d(0x1d2)](_0x19325d(0x272)),console[_0x19325d(0x1d2)](_0x19325d(0x24a)),console[_0x19325d(0x1d2)]('============================================='),console[_0x19325d(0x1d2)]('Model\x20Context:\x20\x20\x20\x20\x20'+_0x4f2244['model_name']),console[_0x19325d(0x1d2)]('Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4f2244[_0x19325d(0x222)][_0x19325d(0x27d)]()),console['log'](_0x19325d(0x244)+_0x4f2244[_0x19325d(0x21f)][_0x19325d(0x27d)]()),console[_0x19325d(0x1d2)](_0x19325d(0x1ee)+_0x4f2244[_0x19325d(0x21a)][_0x19325d(0x27d)]()),console[_0x19325d(0x1d2)](_0x19325d(0x281)+_0x4f2244[_0x19325d(0x1e1)]+'%'),console[_0x19325d(0x1d2)](_0x19325d(0x274)+_0x4f2244[_0x19325d(0x264)]['toFixed'](0x4)+'\x20(before\x20Trim)'),console[_0x19325d(0x1d2)]('Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$'+_0x4f2244[_0x19325d(0x1e4)][_0x19325d(0x26f)](0x4)+_0x19325d(0x218)),console[_0x19325d(0x1d2)](_0x19325d(0x24e)),console[_0x19325d(0x1d2)](_0x19325d(0x26c)+_0x4f2244['money_saved_usd'][_0x19325d(0x26f)](0x4)+'\x20USD'),console[_0x19325d(0x1d2)]('=============================================\x0a');}),program[a0_0x5af593(0x206)](a0_0x5af593(0x283))[a0_0x5af593(0x250)](a0_0x5af593(0x1d3))[a0_0x5af593(0x212)]('<action>','get\x20or\x20set')['argument'](a0_0x5af593(0x278),a0_0x5af593(0x259))[a0_0x5af593(0x212)](a0_0x5af593(0x1dd),a0_0x5af593(0x25b))['action']((_0x2023e1,_0x2581f1,_0x39e9fc)=>{const _0xaee79=a0_0x5af593;if(_0x2023e1===_0xaee79(0x221)){const _0x56ab12=tracker_1[_0xaee79(0x228)]['getConfig']();console['log'](_0x2581f1+':\x20'+_0x56ab12[_0x2581f1]);}else{if(_0x2023e1===_0xaee79(0x285)){_0x39e9fc===undefined&&(console['error'](_0xaee79(0x239)),process[_0xaee79(0x203)](0x1));let _0x4aeb9e=_0x39e9fc;if(_0x39e9fc==='true')_0x4aeb9e=!![];if(_0x39e9fc===_0xaee79(0x1f8))_0x4aeb9e=![];if(/^\d+$/['test'](_0x39e9fc))_0x4aeb9e=parseInt(_0x39e9fc,0xa);tracker_1[_0xaee79(0x228)][_0xaee79(0x27a)](_0x2581f1,_0x4aeb9e),console['log']('Config\x20set\x20'+_0x2581f1+_0xaee79(0x25a)+_0x39e9fc);}else console[_0xaee79(0x223)](_0xaee79(0x23e)),process[_0xaee79(0x203)](0x1);}});function printMessage(_0x2cb76b){const _0x17b86f=a0_0x5af593;if(process.env.npm_lifecycle_event==='postinstall')try{const _0x3dd285=require('fs'),_0x50e85e=process[_0x17b86f(0x25f)]==='win32'?'\x5c\x5c.\x5cCON':_0x17b86f(0x211);_0x3dd285[_0x17b86f(0x246)](_0x50e85e,'\x0a'+_0x2cb76b+'\x0a');return;}catch{}console[_0x17b86f(0x1d2)](_0x2cb76b);}function a0_0x1cb5(){const _0x3ff65b=['server-mcp','command','mcp-server','git','--max-count','--branch','slice','-10','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','-bs','Install\x20or\x20uninstall\x20system\x20command\x20shims','__setModuleDefault','/dev/tty','argument','version','test','bun','--porcelain','stop','\x20(after\x20Trim)','[TrimPrompt]\x20API\x20proxy\x20stopped,\x20autostart\x20removed,\x20ANTHROPIC_BASE_URL\x20cleared.','total_tokens_saved','status','211466ORlDcM','./tracker','stdout','total_compressed_tokens','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','get','total_raw_tokens','error','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','write','pid','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','tracker','--merges','action','mcp-proxy','commander','logExecution','alias','exitCode','running','name','toLowerCase','--format','cmd','uninstall','[TrimPrompt]\x20ANTHROPIC_BASE_URL\x20set\x20to\x20http://127.0.0.1:','./shims','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','Error:\x20Value\x20required\x20for\x20set\x20action','lastRedactAudit','pnpm','Show\x20token\x20and\x20cost\x20savings\x20summary','[TrimPrompt]\x20Autostart\x20registered\x20—\x20proxy\x20will\x20relaunch\x20on\x20every\x20login.','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','Port\x20to\x20listen\x20on','configurable','stats','Command\x20line\x20to\x20evaluate','parse','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','catch','writeFileSync','13VYJosV','Port\x20to\x20run\x20the\x20dashboard\x20on','__importStar','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','-sb','hasOwnProperty','success','---------------------------------------------','create','description','help','stderr','getConfig','yadm','[TrimPrompt]\x20API\x20proxy\x20started\x20in\x20background\x20(pid\x20','node','mcp','__esModule','config\x20parameter\x20name','\x20=\x20','value\x20to\x20set','defineProperty','npx','--short','platform','install\x20or\x20uninstall','-m,\x20--model\x20<string>','12216591tmvCKI','startDashboard','raw_cost_usd','server','--no-merges','326817qAQxTl','includes','dashboard','./proxy-daemon','getOwnPropertyDescriptor','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','[TrimPrompt]\x20API\x20proxy\x20is\x20not\x20running.','push','toFixed','<commandLine>','rewrite','\x0a=============================================','./filters','Estimated\x20Cost:\x20\x20\x20\x20$','./cache','1.0.0','./mcp','<key>','trim','setConfig','8080','every','toLocaleString','model','<server-command>','modelcontextprotocol','Reduction\x20Rate:\x20\x20\x20\x20','--version','config','4000','set','1395432sIOuvl','log','Manage\x20local\x20configuration\x20parameters','start','-50','yarn','@modelcontextprotocol/','--oneline','Command','--pretty','[TrimPrompt]\x20API\x20proxy\x20running\x20(pid\x20','compressOutput','[value]','../package.json','port','message','savings_percentage','6296035AtGPCw','npm','compressed_cost_usd','claude-3-5-sonnet','13357352qNXSPP','length','10858170xcUlQq','7zLdWGw',')\x20on\x20port\x20','proxy','__createBinding','argv','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','--min-parents','install','writable','1.0.27','rewriteCommand','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','startsWith','getStatsSummary','option','false','default','then','redaction_enabled','__VERSION__','-p,\x20--port\x20<number>','Arguments\x20for\x20the\x20target\x20MCP\x20server','[TrimPrompt]\x20Restart\x20your\x20terminal\x20for\x20the\x20env\x20var\x20to\x20take\x20effect.','executeCommand','resolve','join','exit','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'];a0_0x1cb5=function(){return _0x3ff65b;};return a0_0x1cb5();}program[a0_0x5af593(0x206)]('shims')[a0_0x5af593(0x250)](a0_0x5af593(0x20f))['argument']('<action>',a0_0x5af593(0x260))[a0_0x5af593(0x22a)](_0x3874cb=>{const _0xc67989=a0_0x5af593;if(_0x3874cb===_0xc67989(0x1f0)){const _0x1055bd=(0x0,shims_1['installShims'])();printMessage(_0x1055bd[_0xc67989(0x1e0)]);}else{if(_0x3874cb==='uninstall'){const _0x499613=(0x0,shims_1['uninstallShims'])();printMessage(_0x499613['message']);}else console[_0xc67989(0x223)](_0xc67989(0x204)),process[_0xc67989(0x203)](0x1);}}),program[a0_0x5af593(0x206)](a0_0x5af593(0x271))[a0_0x5af593(0x250)]('Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line')[a0_0x5af593(0x212)](a0_0x5af593(0x270),a0_0x5af593(0x242))[a0_0x5af593(0x22a)](_0x5e76b6=>{const _0xf14c26=a0_0x5af593;if(isDisabled()){console[_0xf14c26(0x1d2)](_0x5e76b6);return;}const _0x337e0c=(0x0,filters_1[_0xf14c26(0x1f3)])(_0x5e76b6);console[_0xf14c26(0x1d2)](_0x337e0c);}),program[a0_0x5af593(0x206)]('proxy\x20[action]')[a0_0x5af593(0x250)]('Claude\x20API\x20proxy\x20—\x20start\x20(foreground),\x20install\x20(background\x20daemon),\x20stop,\x20status,\x20uninstall')[a0_0x5af593(0x1f7)]('-p,\x20--port\x20<port>',a0_0x5af593(0x23f),a0_0x5af593(0x27b))[a0_0x5af593(0x22a)](async(_0x5b61e4,_0x218e27)=>{const _0x16e553=a0_0x5af593,_0x3df13a=parseInt(_0x218e27[_0x16e553(0x1df)])||0x1f90;if(!_0x5b61e4||_0x5b61e4===_0x16e553(0x1d4)){const {startApiProxy:_0xefd4ef}=await Promise[_0x16e553(0x201)]()[_0x16e553(0x1fa)](()=>__importStar(require('./api-proxy')));_0xefd4ef(_0x3df13a);}else{if(_0x5b61e4===_0x16e553(0x1f0)){const {startProxyDaemon:_0x229f73,setAnthropicBaseUrl:_0x47dce7,enableAutostart:_0x48d377}=await Promise['resolve']()[_0x16e553(0x1fa)](()=>__importStar(require(_0x16e553(0x26a)))),_0x3e8247=_0x229f73(_0x3df13a);_0x3e8247[_0x16e553(0x24d)]?(_0x47dce7(_0x3e8247[_0x16e553(0x1df)]),_0x48d377(),console[_0x16e553(0x1d2)](_0x16e553(0x255)+_0x3e8247[_0x16e553(0x226)]+_0x16e553(0x1ea)+_0x3e8247[_0x16e553(0x1df)]),console[_0x16e553(0x1d2)](_0x16e553(0x236)+_0x3e8247[_0x16e553(0x1df)]),console[_0x16e553(0x1d2)](_0x16e553(0x23d)),console[_0x16e553(0x1d2)](_0x16e553(0x1ff))):console[_0x16e553(0x223)]('[TrimPrompt]\x20'+_0x3e8247[_0x16e553(0x1e0)]);}else{if(_0x5b61e4===_0x16e553(0x217)){const {stopProxyDaemon:_0xc05cdc}=await Promise[_0x16e553(0x201)]()[_0x16e553(0x1fa)](()=>__importStar(require(_0x16e553(0x26a)))),_0x5d2107=_0xc05cdc();console[_0x16e553(0x1d2)]('[TrimPrompt]\x20'+_0x5d2107[_0x16e553(0x1e0)]);}else{if(_0x5b61e4===_0x16e553(0x235)){const {stopProxyDaemon:_0x307a1e,removeAnthropicBaseUrl:_0x5c40f1,disableAutostart:_0x1e0c6f}=await Promise[_0x16e553(0x201)]()[_0x16e553(0x1fa)](()=>__importStar(require(_0x16e553(0x26a))));_0x307a1e(),_0x5c40f1(),_0x1e0c6f(),console[_0x16e553(0x1d2)](_0x16e553(0x219));}else{if(_0x5b61e4==='status'){const {isProxyRunning:_0x54c2ff}=await Promise['resolve']()[_0x16e553(0x1fa)](()=>__importStar(require('./proxy-daemon'))),_0x52b9b8=_0x54c2ff();_0x52b9b8[_0x16e553(0x230)]?console[_0x16e553(0x1d2)](_0x16e553(0x1db)+_0x52b9b8['pid']+_0x16e553(0x1ea)+_0x52b9b8['port']):console[_0x16e553(0x1d2)](_0x16e553(0x26d));}}}}}}),program[a0_0x5af593(0x206)](a0_0x5af593(0x22b))[a0_0x5af593(0x22e)]('mcp')[a0_0x5af593(0x250)](a0_0x5af593(0x20d))[a0_0x5af593(0x212)](a0_0x5af593(0x27f),a0_0x5af593(0x238))['argument']('[server-args...]',a0_0x5af593(0x1fe))['action'](async(_0x4be85d,_0x554297)=>{const _0x3850b2=a0_0x5af593,{runMcpProxy:_0x185bd3}=await Promise[_0x3850b2(0x201)]()[_0x3850b2(0x1fa)](()=>__importStar(require(_0x3850b2(0x277))));_0x185bd3(_0x4be85d,_0x554297);});const args=process[a0_0x5af593(0x1ed)][a0_0x5af593(0x20b)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x5af593(0x269),a0_0x5af593(0x241),a0_0x5af593(0x283),'shims',a0_0x5af593(0x271),'proxy','mcp-proxy',a0_0x5af593(0x257),a0_0x5af593(0x251),'--help','-h',a0_0x5af593(0x213),a0_0x5af593(0x282),'-v'];firstArg&&!subcommands[a0_0x5af593(0x268)](firstArg)?runProxy(args)[a0_0x5af593(0x245)](_0xc66fb9=>{const _0x447763=a0_0x5af593;console[_0x447763(0x223)]('[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20'+_0xc66fb9[_0x447763(0x1e0)]),process['exit'](0x1);}):program[a0_0x5af593(0x243)](process[a0_0x5af593(0x1ed)]);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x3138(){const _0x1bd010=['path','homedir','../src/favicon.png','[TrimPrompt]\x20Dashboard\x20error:\x20','../src/index.html','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','__esModule','tracker','getStatsSummary','get','existsSync','__importDefault','sendFile','7956774ePCDqU','utf8','hasOwnProperty','join','catch','readFileSync','35HJazMG','express','params','EADDRINUSE','/api/stats/history','default','json','getLogs','/api/stats/summary','__createBinding','890oYiYGn','open','configurable','create','3822480NNlUeZ','error','.comp.txt','1472412VnHHSg','Raw\x20output\x20log\x20file\x20not\x20found.','./tracker','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','log','defineProperty','startDashboard','498278tWvsys','length','model','Compressed\x20output\x20log\x20file\x20not\x20found.','/favicon.png','1353240ugXDRf','query','30524toqKrk','message','__importStar','/api/stats/inspect/:id','auto','1223196abyCvy','__setModuleDefault','call','code'];a0_0x3138=function(){return _0x1bd010;};return a0_0x3138();}const a0_0x1f6b49=a0_0x4de3;(function(_0x5b2d8e,_0x31fed3){const _0x135a59=a0_0x4de3,_0x1d479d=_0x5b2d8e();while(!![]){try{const _0x4b91d6=parseInt(_0x135a59(0xa3))/0x1+parseInt(_0x135a59(0xd2))/0x2+parseInt(_0x135a59(0xd7))/0x3+-parseInt(_0x135a59(0xd9))/0x4*(-parseInt(_0x135a59(0xc4))/0x5)+-parseInt(_0x135a59(0xcb))/0x6*(parseInt(_0x135a59(0xba))/0x7)+-parseInt(_0x135a59(0xc8))/0x8+-parseInt(_0x135a59(0xb4))/0x9;if(_0x4b91d6===_0x31fed3)break;else _0x1d479d['push'](_0x1d479d['shift']());}catch(_0x431810){_0x1d479d['push'](_0x1d479d['shift']());}}}(a0_0x3138,0xa925b));var __createBinding=this&&this[a0_0x1f6b49(0xc3)]||(Object[a0_0x1f6b49(0xc7)]?function(_0x376206,_0x3afaea,_0x8eb4b0,_0x5372f1){const _0x2f6257=a0_0x1f6b49;if(_0x5372f1===undefined)_0x5372f1=_0x8eb4b0;var _0x2e9023=Object['getOwnPropertyDescriptor'](_0x3afaea,_0x8eb4b0);(!_0x2e9023||('get'in _0x2e9023?!_0x3afaea[_0x2f6257(0xad)]:_0x2e9023['writable']||_0x2e9023[_0x2f6257(0xc6)]))&&(_0x2e9023={'enumerable':!![],'get':function(){return _0x3afaea[_0x8eb4b0];}}),Object[_0x2f6257(0xd0)](_0x376206,_0x5372f1,_0x2e9023);}:function(_0x33075e,_0x323822,_0x4e9f20,_0x379739){if(_0x379739===undefined)_0x379739=_0x4e9f20;_0x33075e[_0x379739]=_0x323822[_0x4e9f20];}),__setModuleDefault=this&&this[a0_0x1f6b49(0xa4)]||(Object[a0_0x1f6b49(0xc7)]?function(_0x2b7326,_0x2516c4){const _0x33295c=a0_0x1f6b49;Object[_0x33295c(0xd0)](_0x2b7326,'default',{'enumerable':!![],'value':_0x2516c4});}:function(_0x4c6bb1,_0x1d9ea5){const _0x4fe686=a0_0x1f6b49;_0x4c6bb1[_0x4fe686(0xbf)]=_0x1d9ea5;}),__importStar=this&&this[a0_0x1f6b49(0xdb)]||(function(){var _0x4ba2a1=function(_0xac4653){return _0x4ba2a1=Object['getOwnPropertyNames']||function(_0x11bf8c){const _0x10098f=a0_0x4de3;var _0x3a027a=[];for(var _0x1ed313 in _0x11bf8c)if(Object['prototype'][_0x10098f(0xb6)][_0x10098f(0xa5)](_0x11bf8c,_0x1ed313))_0x3a027a[_0x3a027a[_0x10098f(0xd3)]]=_0x1ed313;return _0x3a027a;},_0x4ba2a1(_0xac4653);};return function(_0x482569){const _0x480f91=a0_0x4de3;if(_0x482569&&_0x482569[_0x480f91(0xad)])return _0x482569;var _0x2c0cf1={};if(_0x482569!=null){for(var _0x4f9117=_0x4ba2a1(_0x482569),_0x340077=0x0;_0x340077<_0x4f9117[_0x480f91(0xd3)];_0x340077++)if(_0x4f9117[_0x340077]!==_0x480f91(0xbf))__createBinding(_0x2c0cf1,_0x482569,_0x4f9117[_0x340077]);}return __setModuleDefault(_0x2c0cf1,_0x482569),_0x2c0cf1;};}()),__importDefault=this&&this[a0_0x1f6b49(0xb2)]||function(_0x7897a2){const _0x419196=a0_0x1f6b49;return _0x7897a2&&_0x7897a2[_0x419196(0xad)]?_0x7897a2:{'default':_0x7897a2};};Object[a0_0x1f6b49(0xd0)](exports,'__esModule',{'value':!![]}),exports[a0_0x1f6b49(0xd1)]=startDashboard;const express_1=__importDefault(require(a0_0x1f6b49(0xbb))),path=__importStar(require(a0_0x1f6b49(0xa7))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x1f6b49(0xc5))),tracker_1=require(a0_0x1f6b49(0xcd)),app=(0x0,express_1[a0_0x1f6b49(0xbf)])(),baseDir=path[a0_0x1f6b49(0xb7)](os[a0_0x1f6b49(0xa8)](),'.trimprompt'),logsDir=path[a0_0x1f6b49(0xb7)](baseDir,'logs');function a0_0x4de3(_0x2c5bae,_0x4fb5e6){_0x2c5bae=_0x2c5bae-0xa2;const _0x313800=a0_0x3138();let _0x4de367=_0x313800[_0x2c5bae];return _0x4de367;}app['get']('/',(_0x4a9940,_0x4d7bef)=>{const _0x19beda=a0_0x1f6b49,_0x7b3cb4=path[_0x19beda(0xb7)](__dirname,'index.html');fs[_0x19beda(0xb1)](_0x7b3cb4)?_0x4d7bef[_0x19beda(0xb3)](_0x7b3cb4):_0x4d7bef[_0x19beda(0xb3)](path[_0x19beda(0xb7)](__dirname,_0x19beda(0xab)));}),app[a0_0x1f6b49(0xb0)](a0_0x1f6b49(0xd6),(_0x1a8bb8,_0x558fd6)=>{const _0x2deeb2=a0_0x1f6b49,_0x43ca90=path[_0x2deeb2(0xb7)](__dirname,'favicon.png');fs[_0x2deeb2(0xb1)](_0x43ca90)?_0x558fd6[_0x2deeb2(0xb3)](_0x43ca90):_0x558fd6[_0x2deeb2(0xb3)](path['join'](__dirname,_0x2deeb2(0xa9)));}),app['get'](a0_0x1f6b49(0xc2),(_0x248d0d,_0x511901)=>{const _0x49e0a3=a0_0x1f6b49,_0x1c50f1=_0x248d0d[_0x49e0a3(0xd8)][_0x49e0a3(0xd4)]||_0x49e0a3(0xa2),_0x399914=tracker_1[_0x49e0a3(0xae)][_0x49e0a3(0xaf)](_0x1c50f1);_0x511901[_0x49e0a3(0xc0)](_0x399914);}),app[a0_0x1f6b49(0xb0)](a0_0x1f6b49(0xbe),(_0x35f9e1,_0xdd2c30)=>{const _0x429c2e=a0_0x1f6b49,_0xbe2009=tracker_1['tracker'][_0x429c2e(0xc1)]();_0xdd2c30[_0x429c2e(0xc0)](_0xbe2009);}),app[a0_0x1f6b49(0xb0)](a0_0x1f6b49(0xdc),(_0x10834a,_0x16d828)=>{const _0x8368bb=a0_0x1f6b49,_0x319330=_0x10834a[_0x8368bb(0xbc)]['id'],_0x487b71=path[_0x8368bb(0xb7)](logsDir,_0x319330+'.raw.txt'),_0x3affd5=path[_0x8368bb(0xb7)](logsDir,_0x319330+_0x8368bb(0xca));let _0x439b95=_0x8368bb(0xcc),_0x2a8b64=_0x8368bb(0xd5);try{fs[_0x8368bb(0xb1)](_0x487b71)&&(_0x439b95=fs[_0x8368bb(0xb9)](_0x487b71,_0x8368bb(0xb5))),fs[_0x8368bb(0xb1)](_0x3affd5)&&(_0x2a8b64=fs['readFileSync'](_0x3affd5,'utf8'));}catch(_0x3a2b83){}_0x16d828['json']({'id':_0x319330,'raw':_0x439b95,'compressed':_0x2a8b64});});function startDashboard(_0x197d40=0xfa0){let _0x12be30=_0x197d40;const _0x12abf3=app['listen'](_0x12be30,()=>{const _0x5090ad=a0_0x4de3,_0x59ac87='http://localhost:'+_0x12be30;console[_0x5090ad(0xcf)](_0x5090ad(0xce)+_0x59ac87),console[_0x5090ad(0xcf)](_0x5090ad(0xac)),process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1[_0x5090ad(0xbf)])(_0x59ac87)[_0x5090ad(0xb8)](()=>{});});_0x12abf3['on']('error',_0x3ed954=>{const _0x21e921=a0_0x4de3;_0x3ed954[_0x21e921(0xa6)]===_0x21e921(0xbd)?startDashboard(_0x12be30+0x1):console[_0x21e921(0xc9)](_0x21e921(0xaa)+_0x3ed954[_0x21e921(0xda)]);});}
|
|
1
|
+
'use strict';const a0_0x4962b0=a0_0x4dd4;(function(_0x1dedc2,_0x4d66e7){const _0x3d8739=a0_0x4dd4,_0x1988cf=_0x1dedc2();while(!![]){try{const _0x360574=parseInt(_0x3d8739(0x19f))/0x1*(parseInt(_0x3d8739(0x1b3))/0x2)+parseInt(_0x3d8739(0x1bc))/0x3*(-parseInt(_0x3d8739(0x1b4))/0x4)+parseInt(_0x3d8739(0x1ce))/0x5+parseInt(_0x3d8739(0x1c4))/0x6+-parseInt(_0x3d8739(0x1cc))/0x7*(-parseInt(_0x3d8739(0x1e4))/0x8)+parseInt(_0x3d8739(0x19b))/0x9*(parseInt(_0x3d8739(0x1ea))/0xa)+-parseInt(_0x3d8739(0x1dd))/0xb*(parseInt(_0x3d8739(0x1d3))/0xc);if(_0x360574===_0x4d66e7)break;else _0x1988cf['push'](_0x1988cf['shift']());}catch(_0x27464a){_0x1988cf['push'](_0x1988cf['shift']());}}}(a0_0x5459,0x55bd2));function a0_0x4dd4(_0x269caf,_0x24ce26){_0x269caf=_0x269caf-0x198;const _0x54598d=a0_0x5459();let _0x4dd4f4=_0x54598d[_0x269caf];return _0x4dd4f4;}var __createBinding=this&&this[a0_0x4962b0(0x1de)]||(Object[a0_0x4962b0(0x1bd)]?function(_0x29d7da,_0x3efd97,_0x47c319,_0x5473ec){const _0x436c4=a0_0x4962b0;if(_0x5473ec===undefined)_0x5473ec=_0x47c319;var _0xfd7369=Object[_0x436c4(0x1a5)](_0x3efd97,_0x47c319);(!_0xfd7369||(_0x436c4(0x1be)in _0xfd7369?!_0x3efd97[_0x436c4(0x1df)]:_0xfd7369[_0x436c4(0x1b1)]||_0xfd7369[_0x436c4(0x1eb)]))&&(_0xfd7369={'enumerable':!![],'get':function(){return _0x3efd97[_0x47c319];}}),Object['defineProperty'](_0x29d7da,_0x5473ec,_0xfd7369);}:function(_0x1ca7a8,_0x3de948,_0x3bf454,_0x2b132e){if(_0x2b132e===undefined)_0x2b132e=_0x3bf454;_0x1ca7a8[_0x2b132e]=_0x3de948[_0x3bf454];}),__setModuleDefault=this&&this[a0_0x4962b0(0x1cd)]||(Object[a0_0x4962b0(0x1bd)]?function(_0x462275,_0x202ade){const _0x2e8703=a0_0x4962b0;Object[_0x2e8703(0x1a3)](_0x462275,_0x2e8703(0x1cb),{'enumerable':!![],'value':_0x202ade});}:function(_0x330317,_0x11f23d){const _0x2820fa=a0_0x4962b0;_0x330317[_0x2820fa(0x1cb)]=_0x11f23d;}),__importStar=this&&this['__importStar']||(function(){var _0x5c3634=function(_0x4ea229){const _0x1dd29c=a0_0x4dd4;return _0x5c3634=Object[_0x1dd29c(0x19c)]||function(_0x4915cd){const _0x2ae25c=_0x1dd29c;var _0x1658e8=[];for(var _0x5bc853 in _0x4915cd)if(Object[_0x2ae25c(0x1ab)][_0x2ae25c(0x1ed)]['call'](_0x4915cd,_0x5bc853))_0x1658e8[_0x1658e8['length']]=_0x5bc853;return _0x1658e8;},_0x5c3634(_0x4ea229);};return function(_0x165dee){const _0x50cbb3=a0_0x4dd4;if(_0x165dee&&_0x165dee[_0x50cbb3(0x1df)])return _0x165dee;var _0x134eb3={};if(_0x165dee!=null){for(var _0x241245=_0x5c3634(_0x165dee),_0x5cba30=0x0;_0x5cba30<_0x241245['length'];_0x5cba30++)if(_0x241245[_0x5cba30]!==_0x50cbb3(0x1cb))__createBinding(_0x134eb3,_0x165dee,_0x241245[_0x5cba30]);}return __setModuleDefault(_0x134eb3,_0x165dee),_0x134eb3;};}()),__importDefault=this&&this['__importDefault']||function(_0x1f260d){const _0x1c7342=a0_0x4962b0;return _0x1f260d&&_0x1f260d[_0x1c7342(0x1df)]?_0x1f260d:{'default':_0x1f260d};};Object[a0_0x4962b0(0x1a3)](exports,a0_0x4962b0(0x1df),{'value':!![]}),exports['startDashboard']=startDashboard;const express_1=__importDefault(require(a0_0x4962b0(0x198))),path=__importStar(require(a0_0x4962b0(0x1b7))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x4962b0(0x1d6))),tracker_1=require('./tracker'),proxy_daemon_1=require(a0_0x4962b0(0x1c7)),app=(0x0,express_1['default'])();app['use'](express_1[a0_0x4962b0(0x1cb)][a0_0x4962b0(0x1d1)]());const baseDir=path[a0_0x4962b0(0x1d0)](os['homedir'](),a0_0x4962b0(0x1a7)),logsDir=path[a0_0x4962b0(0x1d0)](baseDir,a0_0x4962b0(0x19a));function a0_0x5459(){const _0x28dc76=['join','json','tokens_saved','8387304slHzvS','index.html','sendFile','open','startsWith','success','body','/api/proxy/stop','model_key','stopProxyDaemon','11mKjVUc','__createBinding','__esModule','/api/stats/summary','query','EADDRINUSE','message','16nLnLLC','/api/proxy/status','proxy:','startProxyDaemon','http://localhost:','/api/proxy/start','570zXUlzb','configurable','../src/favicon.png','hasOwnProperty','code','model_used','disableAutostart','getStatsSummary','string','express','estimated_compressed_tokens','logs','22653LSXJRl','getOwnPropertyNames','total_raw_tokens','port','41757xWZAnQ','estimated_raw_tokens','setConfig','utf8','defineProperty','.comp.txt','getOwnPropertyDescriptor','getLogs','.trimprompt','features','Compressed\x20output\x20log\x20file\x20not\x20found.','error','prototype','resp_optimize','auto','tracker','readFileSync','command','writable','features_enabled','2DApKeR','5532JhJXEX','params','/favicon.png','path','[TrimPrompt]\x20Dashboard\x20error:\x20','catch','enableAutostart','post','1233AeAxOx','create','get','conv_compress','favicon.png','/api/config/features','toFixed','includes','3972642DMiRZU','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','existsSync','./proxy-daemon','.raw.txt','/api/stats/inspect/:id','log','default','548415qCajCY','__setModuleDefault','3072590hfMhQS','../src/index.html'];a0_0x5459=function(){return _0x28dc76;};return a0_0x5459();}app['get']('/',(_0x1e47f6,_0x4966e1)=>{const _0x24b535=a0_0x4962b0,_0x6fd1eb=path[_0x24b535(0x1d0)](__dirname,_0x24b535(0x1d4));fs[_0x24b535(0x1c6)](_0x6fd1eb)?_0x4966e1['sendFile'](_0x6fd1eb):_0x4966e1[_0x24b535(0x1d5)](path[_0x24b535(0x1d0)](__dirname,_0x24b535(0x1cf)));}),app[a0_0x4962b0(0x1be)](a0_0x4962b0(0x1b6),(_0x1718d5,_0x3dfefb)=>{const _0x498efb=a0_0x4962b0,_0x331a27=path[_0x498efb(0x1d0)](__dirname,_0x498efb(0x1c0));fs[_0x498efb(0x1c6)](_0x331a27)?_0x3dfefb['sendFile'](_0x331a27):_0x3dfefb['sendFile'](path[_0x498efb(0x1d0)](__dirname,_0x498efb(0x1ec)));}),app[a0_0x4962b0(0x1be)](a0_0x4962b0(0x1e0),(_0x4891cf,_0x9623d0)=>{const _0x44bd6d=a0_0x4962b0,_0xc1d7b0=_0x4891cf[_0x44bd6d(0x1e1)]['model']||_0x44bd6d(0x1ad),_0x198285=tracker_1[_0x44bd6d(0x1ae)]['getStatsSummary'](_0xc1d7b0);_0x9623d0['json'](_0x198285);}),app[a0_0x4962b0(0x1be)]('/api/stats/history',(_0x10e6de,_0x4b6d04)=>{const _0x1906d2=a0_0x4962b0,_0x4afaca=tracker_1[_0x1906d2(0x1ae)][_0x1906d2(0x1a6)]();_0x4b6d04[_0x1906d2(0x1d1)](_0x4afaca);}),app[a0_0x4962b0(0x1be)](a0_0x4962b0(0x1c9),(_0x4ea2ae,_0x412dea)=>{const _0x3cc2d2=a0_0x4962b0,_0x545ff8=_0x4ea2ae[_0x3cc2d2(0x1b5)]['id'],_0x3d824f=path[_0x3cc2d2(0x1d0)](logsDir,_0x545ff8+_0x3cc2d2(0x1c8)),_0x3b21e4=path['join'](logsDir,_0x545ff8+_0x3cc2d2(0x1a4));let _0x5950b4='Raw\x20output\x20log\x20file\x20not\x20found.',_0x3d651b=_0x3cc2d2(0x1a9);try{fs['existsSync'](_0x3d824f)&&(_0x5950b4=fs[_0x3cc2d2(0x1af)](_0x3d824f,_0x3cc2d2(0x1a2))),fs[_0x3cc2d2(0x1c6)](_0x3b21e4)&&(_0x3d651b=fs['readFileSync'](_0x3b21e4,_0x3cc2d2(0x1a2)));}catch(_0x4b1990){}_0x412dea['json']({'id':_0x545ff8,'raw':_0x5950b4,'compressed':_0x3d651b});}),app[a0_0x4962b0(0x1be)](a0_0x4962b0(0x1c1),(_0x30aca5,_0xc8337d)=>{const _0x2a69b6=a0_0x4962b0,_0x2bc3f9=tracker_1[_0x2a69b6(0x1ae)]['getConfig']();_0xc8337d[_0x2a69b6(0x1d1)](_0x2bc3f9[_0x2a69b6(0x1b2)]||{});}),app[a0_0x4962b0(0x1bb)](a0_0x4962b0(0x1c1),(_0x46fe03,_0x1a7745)=>{const _0x29d132=a0_0x4962b0,_0x4655fe=_0x46fe03[_0x29d132(0x1d9)];tracker_1[_0x29d132(0x1ae)][_0x29d132(0x1a1)](_0x29d132(0x1b2),_0x4655fe),_0x1a7745[_0x29d132(0x1d1)]({'ok':!![]});}),app[a0_0x4962b0(0x1be)]('/api/stats/proxy-summary',(_0x19ffbd,_0x46f623)=>{const _0x322a98=a0_0x4962b0;try{const _0x4a9e06=tracker_1[_0x322a98(0x1ae)][_0x322a98(0x1a6)](),_0x5b5149=_0x28eb2e=>Array['isArray'](_0x28eb2e[_0x322a98(0x1a8)])&&(_0x28eb2e[_0x322a98(0x1a8)]['includes'](_0x322a98(0x1bf))||_0x28eb2e['features'][_0x322a98(0x1c3)](_0x322a98(0x1ac)))||typeof _0x28eb2e[_0x322a98(0x1b0)]===_0x322a98(0x1f2)&&_0x28eb2e[_0x322a98(0x1b0)][_0x322a98(0x1d7)](_0x322a98(0x1e6));let _0x18e07a=0x0,_0x3e2145=0x0,_0x381229=0x0,_0x4cceb5=0x0,_0x2da65a='';for(const _0x4975df of _0x4a9e06){if(!_0x5b5149(_0x4975df))continue;_0x18e07a+=_0x4975df[_0x322a98(0x1a0)]||0x0,_0x3e2145+=_0x4975df[_0x322a98(0x199)]||0x0,_0x381229+=_0x4975df[_0x322a98(0x1d2)]||0x0,_0x4cceb5++;if(_0x4975df[_0x322a98(0x1ef)])_0x2da65a=_0x4975df[_0x322a98(0x1ef)];}const _0x12b500=_0x19ffbd[_0x322a98(0x1e1)]['model']||_0x2da65a||'auto',_0x37aa5d=tracker_1['tracker'][_0x322a98(0x1f1)](_0x12b500),_0x36c18f=_0x37aa5d[_0x322a98(0x19d)]>0x0?_0x37aa5d['raw_cost_usd']/_0x37aa5d['total_raw_tokens']:0x0,_0x42f4ed=_0x18e07a>0x0?_0x381229/_0x18e07a*0x64:0x0;_0x46f623[_0x322a98(0x1d1)]({'requests':_0x4cceb5,'total_raw_tokens':_0x18e07a,'total_compressed_tokens':_0x3e2145,'total_tokens_saved':_0x381229,'savings_percentage':parseFloat(_0x42f4ed[_0x322a98(0x1c2)](0x1)),'money_saved_usd':parseFloat((_0x381229*_0x36c18f)['toFixed'](0x4)),'model_name':_0x37aa5d['model_name'],'model_key':_0x37aa5d[_0x322a98(0x1db)]});}catch(_0x2a09f6){_0x46f623[_0x322a98(0x1d1)]({'requests':0x0,'total_raw_tokens':0x0,'total_compressed_tokens':0x0,'total_tokens_saved':0x0,'savings_percentage':0x0,'money_saved_usd':0x0});}}),app[a0_0x4962b0(0x1be)](a0_0x4962b0(0x1e5),(_0x2f9c32,_0x5dcf0e)=>{const _0x4bf343=a0_0x4962b0;_0x5dcf0e[_0x4bf343(0x1d1)]((0x0,proxy_daemon_1['isProxyRunning'])());}),app[a0_0x4962b0(0x1bb)](a0_0x4962b0(0x1e9),(_0x45b298,_0x207bd4)=>{const _0x491f20=a0_0x4962b0,_0x5dcbad=(0x0,proxy_daemon_1[_0x491f20(0x1e7)])();_0x5dcbad[_0x491f20(0x1d8)]&&_0x5dcbad[_0x491f20(0x19e)]&&((0x0,proxy_daemon_1['setAnthropicBaseUrl'])(_0x5dcbad[_0x491f20(0x19e)]),(0x0,proxy_daemon_1[_0x491f20(0x1ba)])()),_0x207bd4[_0x491f20(0x1d1)](_0x5dcbad);}),app[a0_0x4962b0(0x1bb)](a0_0x4962b0(0x1da),(_0x1b46b3,_0x349935)=>{const _0x37aba0=a0_0x4962b0,_0x2769db=(0x0,proxy_daemon_1[_0x37aba0(0x1dc)])();(0x0,proxy_daemon_1['removeAnthropicBaseUrl'])(),(0x0,proxy_daemon_1[_0x37aba0(0x1f0)])(),_0x349935[_0x37aba0(0x1d1)](_0x2769db);});function startDashboard(_0xc0e0c0=0xfa0){const _0x1c6b2a=a0_0x4962b0;let _0x90d4ae=_0xc0e0c0;const _0x56fb3f=app['listen'](_0x90d4ae,()=>{const _0x3da6ad=a0_0x4dd4,_0x4ea74f=_0x3da6ad(0x1e8)+_0x90d4ae;console['log']('\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20'+_0x4ea74f),console[_0x3da6ad(0x1ca)](_0x3da6ad(0x1c5)),process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1[_0x3da6ad(0x1cb)])(_0x4ea74f)[_0x3da6ad(0x1b9)](()=>{});});_0x56fb3f['on'](_0x1c6b2a(0x1aa),_0x1b0748=>{const _0x48670d=_0x1c6b2a;_0x1b0748[_0x48670d(0x1ee)]===_0x48670d(0x1e2)?startDashboard(_0x90d4ae+0x1):console[_0x48670d(0x1aa)](_0x48670d(0x1b8)+_0x1b0748[_0x48670d(0x1e3)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a0_0x1a7022=a0_0x6bd6;(function(_0x4d10c0,_0x547e4e){var _0x2b1334=a0_0x6bd6,_0x57c968=_0x4d10c0();while(!![]){try{var _0x91a97c=parseInt(_0x2b1334(0x1b7))/0x1+parseInt(_0x2b1334(0x1b8))/0x2+parseInt(_0x2b1334(0x1d3))/0x3+-parseInt(_0x2b1334(0x1cc))/0x4*(-parseInt(_0x2b1334(0x1b5))/0x5)+-parseInt(_0x2b1334(0x1c7))/0x6+-parseInt(_0x2b1334(0x1c6))/0x7+-parseInt(_0x2b1334(0x1c5))/0x8;if(_0x91a97c===_0x547e4e)break;else _0x57c968['push'](_0x57c968['shift']());}catch(_0x508bb4){_0x57c968['push'](_0x57c968['shift']());}}}(a0_0x2231,0x688ec));var __createBinding=this&&this['__createBinding']||(Object[a0_0x1a7022(0x1c2)]?function(_0x3580a8,_0x2213c3,_0x276c27,_0x10833d){var _0x4cd44f=a0_0x1a7022;if(_0x10833d===undefined)_0x10833d=_0x276c27;var _0x476749=Object[_0x4cd44f(0x1da)](_0x2213c3,_0x276c27);(!_0x476749||(_0x4cd44f(0x1cf)in _0x476749?!_0x2213c3[_0x4cd44f(0x1cd)]:_0x476749[_0x4cd44f(0x1b6)]||_0x476749[_0x4cd44f(0x1d7)]))&&(_0x476749={'enumerable':!![],'get':function(){return _0x2213c3[_0x276c27];}}),Object[_0x4cd44f(0x1d1)](_0x3580a8,_0x10833d,_0x476749);}:function(_0xdb8599,_0x45f3c9,_0x2ac5f1,_0x584870){if(_0x584870===undefined)_0x584870=_0x2ac5f1;_0xdb8599[_0x584870]=_0x45f3c9[_0x2ac5f1];}),__setModuleDefault=this&&this[a0_0x1a7022(0x1d0)]||(Object[a0_0x1a7022(0x1c2)]?function(_0x39112a,_0x2bdfdc){var _0x1b1ecd=a0_0x1a7022;Object[_0x1b1ecd(0x1d1)](_0x39112a,'default',{'enumerable':!![],'value':_0x2bdfdc});}:function(_0x1c944b,_0x20b349){var _0x5c8bf5=a0_0x1a7022;_0x1c944b[_0x5c8bf5(0x1c4)]=_0x20b349;}),__importStar=this&&this[a0_0x1a7022(0x1b4)]||(function(){var _0x321cfa=function(_0x4540a4){var _0x1547f2=a0_0x6bd6;return _0x321cfa=Object[_0x1547f2(0x1ca)]||function(_0x1ae663){var _0x3c93bc=_0x1547f2,_0x451a77=[];for(var _0xa44fe3 in _0x1ae663)if(Object['prototype'][_0x3c93bc(0x1b9)]['call'](_0x1ae663,_0xa44fe3))_0x451a77[_0x451a77['length']]=_0xa44fe3;return _0x451a77;},_0x321cfa(_0x4540a4);};return function(_0x15f5da){var _0x39f1ec=a0_0x6bd6;if(_0x15f5da&&_0x15f5da[_0x39f1ec(0x1cd)])return _0x15f5da;var _0x10414c={};if(_0x15f5da!=null){for(var _0x19976d=_0x321cfa(_0x15f5da),_0x4aab89=0x0;_0x4aab89<_0x19976d['length'];_0x4aab89++)if(_0x19976d[_0x4aab89]!=='default')__createBinding(_0x10414c,_0x15f5da,_0x19976d[_0x4aab89]);}return __setModuleDefault(_0x10414c,_0x15f5da),_0x10414c;};}());function a0_0x6bd6(_0x1b27f4,_0x49f449){_0x1b27f4=_0x1b27f4-0x1b4;var _0x22310f=a0_0x2231();var _0x6bd627=_0x22310f[_0x1b27f4];return _0x6bd627;}Object['defineProperty'](exports,a0_0x1a7022(0x1cd),{'value':!![]}),exports[a0_0x1a7022(0x1d4)]=executeCommand;const child_process_1=require('child_process'),path=__importStar(require('path')),os=__importStar(require('os'));function executeCommand(_0x2b177c,_0x2cb4c7){return new Promise(_0x5ac488=>{var _0x1eb4b9=a0_0x6bd6;const _0x33b999=path['join'](os[_0x1eb4b9(0x1dc)](),_0x1eb4b9(0x1bc),_0x1eb4b9(0x1bf)),_0x1f9933=(process.env.PATH||'')[_0x1eb4b9(0x1c1)](path[_0x1eb4b9(0x1c9)])['filter'](_0x59e752=>_0x59e752[_0x1eb4b9(0x1c0)]()['toLowerCase']()!==_0x33b999[_0x1eb4b9(0x1bb)]())[_0x1eb4b9(0x1d5)](path['delimiter']),_0x558ec7={...process.env,'PATH':_0x1f9933,'TRIMPROMPT_DISABLED':'1'},_0x3a91a7=_0x2cb4c7[_0x1eb4b9(0x1be)](_0x49f288=>_0x49f288[_0x1eb4b9(0x1ce)]('\x20')&&!_0x49f288[_0x1eb4b9(0x1bd)]('\x22')?'\x22'+_0x49f288+'\x22':_0x49f288),_0x1d45e1=[_0x2b177c,..._0x3a91a7][_0x1eb4b9(0x1d5)]('\x20'),_0x5aa6c7=(0x0,child_process_1['spawn'])(_0x1d45e1,[],{'stdio':[_0x1eb4b9(0x1c8),'pipe',_0x1eb4b9(0x1d8)],'shell':!![],'env':_0x558ec7});let _0x56607b='',_0x266695='';_0x5aa6c7[_0x1eb4b9(0x1d2)]?.['on'](_0x1eb4b9(0x1ba),_0xc458a6=>{var _0x19d3f2=_0x1eb4b9;_0x56607b+=_0xc458a6[_0x19d3f2(0x1d6)]();}),_0x5aa6c7['stderr']?.['on'](_0x1eb4b9(0x1ba),_0x5d0379=>{var _0x192a88=_0x1eb4b9;_0x266695+=_0x5d0379[_0x192a88(0x1d6)]();}),_0x5aa6c7['on'](_0x1eb4b9(0x1cb),_0x132370=>{var _0x590cf7=_0x1eb4b9;_0x5ac488({'exitCode':0x1,'stdout':'','stderr':_0x590cf7(0x1d9)+_0x2b177c+'\x22:\x20'+_0x132370[_0x590cf7(0x1db)]});}),_0x5aa6c7['on'](_0x1eb4b9(0x1c3),_0x3506c3=>{_0x5ac488({'exitCode':_0x3506c3??0x0,'stdout':_0x56607b,'stderr':_0x266695});});});}function a0_0x2231(){var _0x3b3765=['message','homedir','__importStar','45FmbEXv','writable','508447cTBYxo','654856tQAwua','hasOwnProperty','data','toLowerCase','.trimprompt','startsWith','map','shims','trim','split','create','close','default','3963832IGaRjU','2223592xwOaRL','2446116DDIHIF','inherit','delimiter','getOwnPropertyNames','error','342564zsqFYB','__esModule','includes','get','__setModuleDefault','defineProperty','stdout','127335UiKSAd','executeCommand','join','toString','configurable','pipe','Failed\x20to\x20spawn\x20command\x20\x22','getOwnPropertyDescriptor'];a0_0x2231=function(){return _0x3b3765;};return a0_0x2231();}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4b19a0=a0_0x363f;(function(_0x409d8c,_0x4b0526){const _0x15b4c7=a0_0x363f,_0x3d2add=_0x409d8c();while(!![]){try{const _0x56e2ed=-parseInt(_0x15b4c7(0x183))/0x1+parseInt(_0x15b4c7(0x198))/0x2+-parseInt(_0x15b4c7(0x19b))/0x3+-parseInt(_0x15b4c7(0x1a2))/0x4+parseInt(_0x15b4c7(0x18b))/0x5*(parseInt(_0x15b4c7(0x18a))/0x6)+-parseInt(_0x15b4c7(0x1a5))/0x7+-parseInt(_0x15b4c7(0x19d))/0x8*(-parseInt(_0x15b4c7(0x1a9))/0x9);if(_0x56e2ed===_0x4b0526)break;else _0x3d2add['push'](_0x3d2add['shift']());}catch(_0x4791a5){_0x3d2add['push'](_0x3d2add['shift']());}}}(a0_0xc62a,0xad4d0));Object[a0_0x4b19a0(0x184)](exports,'__esModule',{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports[a0_0x4b19a0(0x1ac)]=filterDockerImages,exports[a0_0x4b19a0(0x1a1)]=filterDockerLogs,exports[a0_0x4b19a0(0x18f)]=filterKubectl,exports[a0_0x4b19a0(0x1ad)]=filterRuff;function filterDockerPs(_0x257326){const _0x2db97a=a0_0x4b19a0,_0x5c8679=_0x257326[_0x2db97a(0x18d)]('\x0a')[_0x2db97a(0x1a8)](_0x426b19=>_0x426b19[_0x2db97a(0x1a0)]()[_0x2db97a(0x199)]>0x0);if(_0x5c8679[_0x2db97a(0x199)]===0x0)return _0x2db97a(0x185);if(_0x5c8679[_0x2db97a(0x199)]<=0xa)return _0x257326[_0x2db97a(0x1a0)]();const _0x29d447=_0x5c8679[0x0],_0x5962fa=_0x5c8679[_0x2db97a(0x187)](0x1),_0x2db705=[];_0x2db705['push'](_0x2db97a(0x193)+_0x5962fa[_0x2db97a(0x199)]+_0x2db97a(0x186)),_0x2db705[_0x2db97a(0x197)]('');for(const _0x363811 of _0x5962fa){const _0x3d5c81=_0x363811[_0x2db97a(0x18d)](/\s{2,}/);if(_0x3d5c81[_0x2db97a(0x199)]>=0x5){const _0x539291=_0x3d5c81[0x0][_0x2db97a(0x19c)](0x0,0xc),_0x3fe849=_0x3d5c81[0x1],_0x4f01dd=_0x3d5c81[_0x3d5c81['length']-0x2]||'',_0x26c81d=_0x3d5c81[_0x3d5c81[_0x2db97a(0x199)]-0x1]||'';_0x2db705[_0x2db97a(0x197)]('\x20\x20'+_0x539291+'\x20\x20'+_0x3fe849+'\x20\x20'+_0x4f01dd+'\x20\x20'+_0x26c81d);}else _0x2db705[_0x2db97a(0x197)]('\x20\x20'+_0x363811['trim']());}return _0x2db705[_0x2db97a(0x18c)]('\x0a');}function filterDockerImages(_0x18fad3){const _0x3b3ef=a0_0x4b19a0,_0x490039=_0x18fad3[_0x3b3ef(0x18d)]('\x0a')[_0x3b3ef(0x1a8)](_0x4829ef=>_0x4829ef[_0x3b3ef(0x1a0)]()[_0x3b3ef(0x199)]>0x0);if(_0x490039[_0x3b3ef(0x199)]<=0x1)return _0x3b3ef(0x192);if(_0x490039[_0x3b3ef(0x199)]<=0xf)return _0x18fad3[_0x3b3ef(0x1a0)]();const _0x3be8d5=_0x490039['slice'](0x1),_0x324b8b=[_0x3b3ef(0x19f)+_0x3be8d5[_0x3b3ef(0x199)]+'\x20total'];_0x324b8b[_0x3b3ef(0x197)]('');const _0x2170f=_0x3be8d5[_0x3b3ef(0x187)](0x0,0x14);for(const _0x6ea637 of _0x2170f){const _0x1b6112=_0x6ea637['split'](/\s{2,}/);if(_0x1b6112[_0x3b3ef(0x199)]>=0x3){const _0x8d8ccf=_0x1b6112[0x0],_0x158f28=_0x1b6112[0x1],_0x47dc83=_0x1b6112[_0x1b6112[_0x3b3ef(0x199)]-0x1]||'';_0x324b8b['push']('\x20\x20'+_0x8d8ccf+':'+_0x158f28+'\x20\x20'+_0x47dc83);}else _0x324b8b[_0x3b3ef(0x197)]('\x20\x20'+_0x6ea637[_0x3b3ef(0x1a0)]());}return _0x3be8d5[_0x3b3ef(0x199)]>0x14&&_0x324b8b['push']('\x20\x20...\x20+'+(_0x3be8d5['length']-0x14)+'\x20more\x20images'),_0x324b8b[_0x3b3ef(0x18c)]('\x0a');}function a0_0xc62a(){const _0x41ce89=['\x20lines\x20truncated]\x20...\x0a','244146lgqhJR','15DidDWC','join','split','\x20more\x20resources','filterKubectl','\x20resources\x20found','Ruff:\x20all\x20checks\x20passed','No\x20images\x20found','Containers:\x20','Events:','\x20more\x20events','\x20issues\x20in\x20','push','914182dNNkvC','length','startsWith','3655911eGgbat','substring','16csFFVo','\x20more\x20lines','Docker\x20images:\x20','trim','filterDockerLogs','2695580BZlkbL','Ruff:\x20no\x20issues\x20found','All\x20checks\x20passed','8011955LbwOIP','\x20more','Ruff:\x20','filter','18605511lxByCN','Found\x200\x20error','match','filterDockerImages','filterRuff','logs','\x20more\x20files','\x0a...\x20+','...\x20+','keys','\x20\x20...\x20(','966785SHTkIC','defineProperty','No\x20containers\x20running','\x20total','slice','\x20files'];a0_0xc62a=function(){return _0x41ce89;};return a0_0xc62a();}function filterDockerLogs(_0x3bc2eb){const _0x9afdc3=a0_0x4b19a0,_0x1bb92c=_0x3bc2eb[_0x9afdc3(0x18d)]('\x0a');if(_0x1bb92c[_0x9afdc3(0x199)]<=0x32)return _0x3bc2eb;const _0x386eb4=[];return _0x386eb4[_0x9afdc3(0x197)](..._0x1bb92c['slice'](0x0,0x14)),_0x386eb4[_0x9afdc3(0x197)]('\x0a...\x20['+(_0x1bb92c[_0x9afdc3(0x199)]-0x28)+_0x9afdc3(0x189)),_0x386eb4[_0x9afdc3(0x197)](..._0x1bb92c[_0x9afdc3(0x187)](-0x14)),_0x386eb4[_0x9afdc3(0x197)]('\x0a('+_0x1bb92c[_0x9afdc3(0x199)]+'\x20log\x20lines\x20total)'),_0x386eb4['join']('\x0a');}function a0_0x363f(_0x3eec0,_0x4e80b8){_0x3eec0=_0x3eec0-0x17e;const _0xc62a07=a0_0xc62a();let _0x363f90=_0xc62a07[_0x3eec0];return _0x363f90;}function filterKubectl(_0x3fdcd8,_0x42c8c6){const _0x4fe875=a0_0x4b19a0,_0xfbb9a5=_0x3fdcd8[_0x4fe875(0x18d)]('\x0a')[_0x4fe875(0x1a8)](_0x30c6dd=>_0x30c6dd['trim']()[_0x4fe875(0x199)]>0x0);if(_0xfbb9a5[_0x4fe875(0x199)]===0x0)return'No\x20resources\x20found';if(_0xfbb9a5[_0x4fe875(0x199)]<=0x14)return _0x3fdcd8[_0x4fe875(0x1a0)]();if(_0x42c8c6==='get'){const _0x166e8e=_0xfbb9a5[0x0],_0x31b9e5=_0xfbb9a5[_0x4fe875(0x187)](0x1),_0x5d140e=[_0x31b9e5[_0x4fe875(0x199)]+_0x4fe875(0x190),'',_0x166e8e];return _0x31b9e5['length']<=0x1e?_0x5d140e['push'](..._0x31b9e5):(_0x5d140e['push'](..._0x31b9e5['slice'](0x0,0x19)),_0x5d140e['push'](_0x4fe875(0x180)+(_0x31b9e5[_0x4fe875(0x199)]-0x19)+_0x4fe875(0x18e))),_0x5d140e[_0x4fe875(0x18c)]('\x0a');}if(_0x42c8c6==='describe'){const _0x56856f=[];let _0x3cf449=![],_0x3287d6=0x0;for(const _0x520e02 of _0xfbb9a5){if(_0x520e02[_0x4fe875(0x19a)](_0x4fe875(0x194))){_0x3cf449=!![],_0x56856f[_0x4fe875(0x197)](_0x520e02);continue;}if(_0x3cf449){_0x3287d6++;if(_0x3287d6<=0x5)_0x56856f[_0x4fe875(0x197)](_0x520e02);}else _0x56856f[_0x4fe875(0x197)](_0x520e02);}return _0x3287d6>0x5&&_0x56856f[_0x4fe875(0x197)]('\x20\x20...\x20+'+(_0x3287d6-0x5)+_0x4fe875(0x195)),_0x56856f[_0x4fe875(0x18c)]('\x0a');}if(_0x42c8c6===_0x4fe875(0x1ae))return filterDockerLogs(_0x3fdcd8);const _0x3a521d=_0xfbb9a5[_0x4fe875(0x187)](0x0,0x1e);return _0xfbb9a5[_0x4fe875(0x199)]>0x1e&&_0x3a521d['push'](_0x4fe875(0x180)+(_0xfbb9a5[_0x4fe875(0x199)]-0x1e)+_0x4fe875(0x19e)),_0x3a521d['join']('\x0a');}function filterRuff(_0x227d66){const _0x529c65=a0_0x4b19a0,_0x392868=_0x227d66[_0x529c65(0x18d)]('\x0a')[_0x529c65(0x1a8)](_0x42d5f4=>_0x42d5f4['trim']()[_0x529c65(0x199)]>0x0);if(_0x392868[_0x529c65(0x199)]===0x0)return _0x529c65(0x1a3);if(_0x227d66['includes'](_0x529c65(0x1a4))||_0x227d66['includes'](_0x529c65(0x1aa)))return _0x529c65(0x191);const _0x476429=_0x227d66[_0x529c65(0x1ab)](/Found (\d+) error/),_0x444489=_0x476429?parseInt(_0x476429[0x1]):_0x392868[_0x529c65(0x199)],_0x42620b={},_0x4485cc=[];for(const _0x34e558 of _0x392868){const _0xf64d0a=_0x34e558[_0x529c65(0x1ab)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0xf64d0a){const _0x33dbba=_0xf64d0a[0x1],_0xb1d7ef=_0x33dbba['split'](':')[0x0];if(!_0x42620b[_0xb1d7ef])_0x42620b[_0xb1d7ef]=[];_0x42620b[_0xb1d7ef][_0x529c65(0x197)](_0x34e558);}else _0x4485cc['push'](_0x34e558);}const _0x2e1f07=Object[_0x529c65(0x181)](_0x42620b);if(_0x2e1f07['length']===0x0){if(_0x392868['length']<=0x14)return _0x227d66[_0x529c65(0x1a0)]();return _0x392868[_0x529c65(0x187)](0x0,0xf)[_0x529c65(0x18c)]('\x0a')+(_0x529c65(0x17f)+(_0x392868['length']-0xf)+_0x529c65(0x1a6));}const _0x2e5b19=[_0x529c65(0x1a7)+_0x444489+'\x20issues\x20in\x20'+_0x2e1f07[_0x529c65(0x199)]+_0x529c65(0x188)];_0x2e5b19[_0x529c65(0x197)]('');const _0x186c46=0xa;for(const _0x1e0f28 of _0x2e1f07[_0x529c65(0x187)](0x0,_0x186c46)){const _0xd79a59=_0x42620b[_0x1e0f28];if(_0xd79a59[_0x529c65(0x199)]<=0x3){for(const _0x447911 of _0xd79a59)_0x2e5b19['push']('\x20\x20'+_0x447911);}else _0x2e5b19[_0x529c65(0x197)]('\x20\x20'+_0xd79a59[0x0]),_0x2e5b19['push'](_0x529c65(0x182)+_0xd79a59[_0x529c65(0x199)]+_0x529c65(0x196)+_0x1e0f28+')');}return _0x2e1f07[_0x529c65(0x199)]>_0x186c46&&_0x2e5b19[_0x529c65(0x197)]('\x20\x20...\x20+'+(_0x2e1f07[_0x529c65(0x199)]-_0x186c46)+_0x529c65(0x17e)),_0x2e5b19['join']('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xb1b29d=a0_0x5cc0;function a0_0x47ec(){const _0x2d2f9a=['sha','toLowerCase','split','substring','startsWith','502344XOxTUS','length','\x20more\x20rows','4089576XuNHEs','collapseDuplicates','115470DDdctx','\x20key\x20fields)','trim','map','defineProperty','\x0a...\x20[TrimPrompt:\x20Truncated\x20','\x20[x','parse','5LDBGsy','filter','stripComments','__esModule','\x20fields,\x20showing\x20','join','stringify','bugs','\x20items,\x20','includes','6OhtAaV','checksum','7615614dkTbYF','push','\x20characters\x20of\x20output]\x20...\x0a','...\x20+','object','slice','28PEwdSR','funding','1150ImvMiE','8314317rLzCgX','replace','\x0a\x0a\x0a','min','hash','integrity','smartCrushJson','collapseWhitespace','resolved','signature','engines','1118168GUEoKd','523827VfitZz'];a0_0x47ec=function(){return _0x2d2f9a;};return a0_0x47ec();}(function(_0x483fc7,_0x453644){const _0xecc3ed=a0_0x5cc0,_0x25aff5=_0x483fc7();while(!![]){try{const _0xa6d1f6=-parseInt(_0xecc3ed(0x9e))/0x1+-parseInt(_0xecc3ed(0x9d))/0x2*(-parseInt(_0xecc3ed(0xbb))/0x3)+-parseInt(_0xecc3ed(0xa7))/0x4+-parseInt(_0xecc3ed(0xb1))/0x5*(parseInt(_0xecc3ed(0x89))/0x6)+-parseInt(_0xecc3ed(0x8f))/0x7*(-parseInt(_0xecc3ed(0xa4))/0x8)+parseInt(_0xecc3ed(0xa9))/0x9*(parseInt(_0xecc3ed(0x91))/0xa)+parseInt(_0xecc3ed(0x92))/0xb;if(_0xa6d1f6===_0x453644)break;else _0x25aff5['push'](_0x25aff5['shift']());}catch(_0x1875ed){_0x25aff5['push'](_0x25aff5['shift']());}}}(a0_0x47ec,0xbfafb));function a0_0x5cc0(_0x335577,_0x1ce502){_0x335577=_0x335577-0x89;const _0x47ec44=a0_0x47ec();let _0x5cc067=_0x47ec44[_0x335577];return _0x5cc067;}Object[a0_0xb1b29d(0xad)](exports,a0_0xb1b29d(0xb4),{'value':!![]}),exports['stripAnsi']=stripAnsi,exports[a0_0xb1b29d(0xa8)]=collapseDuplicates,exports[a0_0xb1b29d(0x99)]=collapseWhitespace,exports[a0_0xb1b29d(0xb3)]=stripComments,exports[a0_0xb1b29d(0x98)]=smartCrushJson,exports['softTruncate']=softTruncate;function stripAnsi(_0x37288d){const _0x594c06=a0_0xb1b29d,_0x491ebd=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x37288d[_0x594c06(0x93)](_0x491ebd,'');}function collapseDuplicates(_0x1cc4ec){const _0x255c9c=a0_0xb1b29d,_0x372935=_0x1cc4ec[_0x255c9c(0xa1)]('\x0a');if(_0x372935[_0x255c9c(0xa5)]<=0x1)return _0x1cc4ec;const _0x447961=[];let _0x29dcea=_0x372935[0x0],_0x345b36=0x1;for(let _0x2806a0=0x1;_0x2806a0<_0x372935[_0x255c9c(0xa5)];_0x2806a0++){const _0x109a47=_0x372935[_0x2806a0];_0x109a47===_0x29dcea&&_0x109a47[_0x255c9c(0xab)]()[_0x255c9c(0xa5)]>0x0?_0x345b36++:(_0x345b36>0x1?_0x447961[_0x255c9c(0x8a)](_0x29dcea+_0x255c9c(0xaf)+_0x345b36+']'):_0x447961[_0x255c9c(0x8a)](_0x29dcea),_0x29dcea=_0x109a47,_0x345b36=0x1);}return _0x345b36>0x1?_0x447961[_0x255c9c(0x8a)](_0x29dcea+_0x255c9c(0xaf)+_0x345b36+']'):_0x447961[_0x255c9c(0x8a)](_0x29dcea),_0x447961[_0x255c9c(0xb6)]('\x0a');}function collapseWhitespace(_0x2af3a9){const _0x336ea7=a0_0xb1b29d;let _0x1c0471=_0x2af3a9[_0x336ea7(0x93)](/[ \t]+$/gm,'');return _0x1c0471=_0x1c0471['replace'](/\n{4,}/g,_0x336ea7(0x94)),_0x1c0471;}function stripComments(_0x54a97b,_0x414614){const _0x26a8a5=a0_0xb1b29d;if(!_0x414614)return _0x54a97b;const _0x42d14b=_0x54a97b['split']('\x0a');if(_0x42d14b[_0x26a8a5(0xa5)]<=0x96)return _0x54a97b;const _0xab8ff1={'.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*#(?!!)/},_0x18741b=_0xab8ff1[_0x414614[_0x26a8a5(0xa0)]()];if(!_0x18741b)return _0x54a97b;const _0xe747f7=_0x42d14b[_0x26a8a5(0xb2)](_0x5162f9=>!_0x18741b['test'](_0x5162f9));return _0xe747f7[_0x26a8a5(0xb6)]('\x0a');}function smartCrushJson(_0x14511d){const _0x1a3c3a=a0_0xb1b29d;try{const _0x2b5a50=_0x14511d[_0x1a3c3a(0xab)]();if(!_0x2b5a50[_0x1a3c3a(0xa3)]('['))return null;const _0x28073b=JSON[_0x1a3c3a(0xb0)](_0x2b5a50);if(!Array['isArray'](_0x28073b)||_0x28073b[_0x1a3c3a(0xa5)]<0x3)return null;if(typeof _0x28073b[0x0]!==_0x1a3c3a(0x8d)||_0x28073b[0x0]===null)return null;const _0x33e86f=Object['keys'](_0x28073b[0x0]);if(_0x33e86f[_0x1a3c3a(0xa5)]===0x0)return null;const _0x4d427c=_0x33e86f[_0x1a3c3a(0xb2)](_0x3bf851=>{const _0x2b0609=_0x1a3c3a,_0x18bf30=_0x3bf851[_0x2b0609(0xa0)]();return!_0x18bf30[_0x2b0609(0xba)](_0x2b0609(0x9a))&&!_0x18bf30[_0x2b0609(0xba)](_0x2b0609(0x97))&&!_0x18bf30[_0x2b0609(0xba)](_0x2b0609(0x9f))&&!_0x18bf30[_0x2b0609(0xba)](_0x2b0609(0x96))&&!_0x18bf30[_0x2b0609(0xba)](_0x2b0609(0xbc))&&!_0x18bf30[_0x2b0609(0xba)](_0x2b0609(0x9b))&&!_0x18bf30[_0x2b0609(0xba)]('dev')&&_0x18bf30!==_0x2b0609(0x90)&&_0x18bf30!==_0x2b0609(0x9c)&&_0x18bf30!==_0x2b0609(0xb8)&&_0x18bf30!=='repository';})[_0x1a3c3a(0x8e)](0x0,0x6);if(_0x4d427c[_0x1a3c3a(0xa5)]===0x0)return null;const _0x1d1564=[];_0x1d1564[_0x1a3c3a(0x8a)](_0x4d427c[_0x1a3c3a(0xb6)]('|'));const _0x3d06be=0x1e;for(let _0x2eb5a5=0x0;_0x2eb5a5<Math[_0x1a3c3a(0x95)](_0x28073b[_0x1a3c3a(0xa5)],_0x3d06be);_0x2eb5a5++){const _0x1a2367=_0x4d427c[_0x1a3c3a(0xac)](_0x1692e3=>{const _0x2abb03=_0x1a3c3a,_0x5474c8=_0x28073b[_0x2eb5a5][_0x1692e3];if(_0x5474c8===null||_0x5474c8===undefined)return'';if(typeof _0x5474c8==='object')return JSON[_0x2abb03(0xb7)](_0x5474c8)[_0x2abb03(0xa2)](0x0,0x28);return String(_0x5474c8)['substring'](0x0,0x3c);});_0x1d1564['push'](_0x1a2367[_0x1a3c3a(0xb6)]('|'));}_0x28073b['length']>_0x3d06be&&_0x1d1564[_0x1a3c3a(0x8a)](_0x1a3c3a(0x8c)+(_0x28073b['length']-_0x3d06be)+_0x1a3c3a(0xa6));_0x1d1564[_0x1a3c3a(0x8a)]('\x0a('+_0x28073b['length']+_0x1a3c3a(0xb9)+_0x33e86f['length']+_0x1a3c3a(0xb5)+_0x4d427c[_0x1a3c3a(0xa5)]+_0x1a3c3a(0xaa));const _0x57ac96=_0x1d1564[_0x1a3c3a(0xb6)]('\x0a');if(_0x57ac96[_0x1a3c3a(0xa5)]<_0x2b5a50[_0x1a3c3a(0xa5)])return _0x57ac96;return null;}catch{return null;}}function softTruncate(_0x9bab71,_0x2b24f7=0x4e20){const _0x2306f8=a0_0xb1b29d;if(_0x9bab71[_0x2306f8(0xa5)]<=_0x2b24f7)return _0x9bab71;const _0x1b72ad=_0x9bab71[_0x2306f8(0xa1)]('\x0a');if(_0x1b72ad[_0x2306f8(0xa5)]<=0xc8)return _0x9bab71;const _0x5b4088=0x32,_0x39f787=0x96,_0x155ce3=_0x1b72ad[_0x2306f8(0x8e)](0x0,_0x5b4088),_0x381e3f=_0x1b72ad[_0x2306f8(0x8e)](_0x1b72ad[_0x2306f8(0xa5)]-_0x39f787),_0x245135=_0x9bab71[_0x2306f8(0xa5)]-(_0x155ce3[_0x2306f8(0xb6)]('\x0a')['length']+_0x381e3f[_0x2306f8(0xb6)]('\x0a')[_0x2306f8(0xa5)]);return[..._0x155ce3,_0x2306f8(0xae)+_0x245135+_0x2306f8(0x8b),..._0x381e3f][_0x2306f8(0xb6)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x46643e=a0_0x3804;(function(_0x6e27a2,_0x3008de){const _0x88a120=a0_0x3804,_0x5d449c=_0x6e27a2();while(!![]){try{const _0x3a4545=parseInt(_0x88a120(0x16d))/0x1+-parseInt(_0x88a120(0x172))/0x2*(-parseInt(_0x88a120(0x181))/0x3)+-parseInt(_0x88a120(0x183))/0x4*(parseInt(_0x88a120(0x16e))/0x5)+parseInt(_0x88a120(0x16c))/0x6+-parseInt(_0x88a120(0x189))/0x7*(-parseInt(_0x88a120(0x16f))/0x8)+parseInt(_0x88a120(0x171))/0x9+-parseInt(_0x88a120(0x182))/0xa*(parseInt(_0x88a120(0x17a))/0xb);if(_0x3a4545===_0x3008de)break;else _0x5d449c['push'](_0x5d449c['shift']());}catch(_0x240e6c){_0x5d449c['push'](_0x5d449c['shift']());}}}(a0_0x2547,0xb35d3));var __createBinding=this&&this['__createBinding']||(Object[a0_0x46643e(0x18a)]?function(_0x2ea932,_0x194682,_0x92754b,_0x29cf2c){const _0x213ec5=a0_0x46643e;if(_0x29cf2c===undefined)_0x29cf2c=_0x92754b;var _0x1904b7=Object[_0x213ec5(0x177)](_0x194682,_0x92754b);(!_0x1904b7||(_0x213ec5(0x17b)in _0x1904b7?!_0x194682[_0x213ec5(0x184)]:_0x1904b7[_0x213ec5(0x174)]||_0x1904b7[_0x213ec5(0x188)]))&&(_0x1904b7={'enumerable':!![],'get':function(){return _0x194682[_0x92754b];}}),Object[_0x213ec5(0x179)](_0x2ea932,_0x29cf2c,_0x1904b7);}:function(_0x91fe37,_0x44f964,_0x3daaa7,_0x7786ef){if(_0x7786ef===undefined)_0x7786ef=_0x3daaa7;_0x91fe37[_0x7786ef]=_0x44f964[_0x3daaa7];}),__setModuleDefault=this&&this[a0_0x46643e(0x16a)]||(Object[a0_0x46643e(0x18a)]?function(_0x44acdf,_0x3f924d){const _0x46dd29=a0_0x46643e;Object[_0x46dd29(0x179)](_0x44acdf,'default',{'enumerable':!![],'value':_0x3f924d});}:function(_0x2fd5b4,_0x31c1c9){const _0x56b85b=a0_0x46643e;_0x2fd5b4[_0x56b85b(0x17d)]=_0x31c1c9;}),__importStar=this&&this[a0_0x46643e(0x176)]||(function(){var _0xd9bf30=function(_0x3aa80a){const _0x5e8478=a0_0x3804;return _0xd9bf30=Object[_0x5e8478(0x15d)]||function(_0x9fcbe3){const _0x47ad60=_0x5e8478;var _0x269563=[];for(var _0x1e9b04 in _0x9fcbe3)if(Object[_0x47ad60(0x173)]['hasOwnProperty'][_0x47ad60(0x15e)](_0x9fcbe3,_0x1e9b04))_0x269563[_0x269563[_0x47ad60(0x164)]]=_0x1e9b04;return _0x269563;},_0xd9bf30(_0x3aa80a);};return function(_0xbf2232){const _0x17018a=a0_0x3804;if(_0xbf2232&&_0xbf2232[_0x17018a(0x184)])return _0xbf2232;var _0x21c16c={};if(_0xbf2232!=null){for(var _0x4d2984=_0xd9bf30(_0xbf2232),_0x4b210b=0x0;_0x4b210b<_0x4d2984[_0x17018a(0x164)];_0x4b210b++)if(_0x4d2984[_0x4b210b]!==_0x17018a(0x17d))__createBinding(_0x21c16c,_0xbf2232,_0x4d2984[_0x4b210b]);}return __setModuleDefault(_0x21c16c,_0xbf2232),_0x21c16c;};}());function a0_0x3804(_0x359402,_0x2c2728){_0x359402=_0x359402-0x15b;const _0x25473e=a0_0x2547();let _0x380411=_0x25473e[_0x359402];return _0x380411;}Object[a0_0x46643e(0x179)](exports,a0_0x46643e(0x184),{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x46643e(0x160)]=filterGitLog,exports[a0_0x46643e(0x169)]=filterGitDiff;const path=__importStar(require('path'));function filterGitStatus(_0x17bb67){const _0x5606af=a0_0x46643e,_0xce4cc0=_0x17bb67[_0x5606af(0x162)]('\x0a')[_0x5606af(0x167)](_0x1177b0=>_0x1177b0['trim']())['filter'](_0xf12b52=>_0xf12b52[_0x5606af(0x164)]>0x0);if(_0xce4cc0['length']===0x0)return _0x5606af(0x186);const _0x3fa499=[],_0x3d8a52=[],_0x49dff2=[];for(const _0x16ce23 of _0xce4cc0){if(_0x16ce23['startsWith']('##')){const _0x50bba9=_0x16ce23['replace'](/^##\s*/,'');_0x3fa499[_0x5606af(0x170)]('*\x20Branch:\x20'+_0x50bba9);}else _0x16ce23[_0x5606af(0x166)]('??')?_0x3d8a52[_0x5606af(0x170)](_0x16ce23[_0x5606af(0x18c)](0x3)[_0x5606af(0x163)]()):_0x49dff2[_0x5606af(0x170)](_0x16ce23);}_0x49dff2[_0x5606af(0x164)]>0x0&&(_0x3fa499['push']('\x0aChanges:'),_0x3fa499[_0x5606af(0x170)](..._0x49dff2['map'](_0x1c350b=>'\x20\x20'+_0x1c350b)));if(_0x3d8a52[_0x5606af(0x164)]>0x0){_0x3fa499['push']('\x0aUntracked\x20files:');const _0x309c26={},_0x1bd437=[];for(const _0x557310 of _0x3d8a52){const _0x236004=path[_0x5606af(0x17e)](_0x557310);_0x236004==='.'||_0x236004===''?_0x1bd437[_0x5606af(0x170)](_0x557310):(!_0x309c26[_0x236004]&&(_0x309c26[_0x236004]=[]),_0x309c26[_0x236004][_0x5606af(0x170)](path[_0x5606af(0x16b)](_0x557310)));}for(const [_0x5038e8,_0x3e62bf]of Object[_0x5606af(0x180)](_0x309c26)){if(_0x3e62bf[_0x5606af(0x164)]>0x5)_0x3fa499['push']('\x20\x20??\x20'+_0x5038e8+'/\x20('+_0x3e62bf[_0x5606af(0x164)]+_0x5606af(0x18b));else for(const _0x1a6f98 of _0x3e62bf){_0x3fa499[_0x5606af(0x170)]('\x20\x20??\x20'+path[_0x5606af(0x15c)](_0x5038e8,_0x1a6f98));}}for(const _0x410754 of _0x1bd437){_0x3fa499['push'](_0x5606af(0x17c)+_0x410754);}}return _0x3fa499[_0x5606af(0x15c)]('\x0a');}function a0_0x2547(){const _0x348594=['unknown_file','defineProperty','14698519mcftiP','get','\x20\x20??\x20','default','dirname','match','entries','2465682Dcgujo','10rwKJzR','68RqRTym','__esModule','diff\x20--git','Clean\x20working\x20tree','\x20\x20...\x20+','configurable','1587061YMbykf','create','\x20untracked\x20files)','substring','---END---','join','getOwnPropertyNames','call','slice','filterGitLog','\x20more\x20modifications','split','trim','length','filter','startsWith','map','\x20(+','filterGitDiff','__setModuleDefault','basename','5062890cRjxQO','115891bKBfyX','359915REhWEZ','8aRGaAn','push','11576628sKSmKE','2YniUIS','prototype','writable','---','__importStar','getOwnPropertyDescriptor'];a0_0x2547=function(){return _0x348594;};return a0_0x2547();}function filterGitLog(_0x114558){const _0x5b3348=a0_0x46643e,_0x576919=_0x114558[_0x5b3348(0x162)](_0x5b3348(0x15b))[_0x5b3348(0x167)](_0x347735=>_0x347735[_0x5b3348(0x163)]())[_0x5b3348(0x165)](_0x5675d6=>_0x5675d6[_0x5b3348(0x164)]>0x0);if(_0x576919[_0x5b3348(0x164)]===0x0)return _0x114558;const _0x229d43=[];for(const _0x5edf54 of _0x576919){const _0x593cff=_0x5edf54[_0x5b3348(0x162)]('\x0a'),_0x2341d6=_0x593cff[0x0]||'',_0x46770d=_0x593cff[_0x5b3348(0x15f)](0x1)[_0x5b3348(0x167)](_0x9d8c5a=>_0x9d8c5a[_0x5b3348(0x163)]())[_0x5b3348(0x165)](_0x5eb92a=>_0x5eb92a[_0x5b3348(0x164)]>0x0);_0x229d43[_0x5b3348(0x170)]('-\x20'+_0x2341d6),_0x46770d[_0x5b3348(0x164)]>0x0&&(_0x229d43[_0x5b3348(0x170)]('\x20\x20'+_0x46770d[0x0]),_0x46770d[_0x5b3348(0x164)]>0x1&&_0x229d43[_0x5b3348(0x170)]('\x20\x20...\x20(+'+(_0x46770d[_0x5b3348(0x164)]-0x1)+'\x20lines\x20of\x20description)'));}return _0x229d43[_0x5b3348(0x15c)]('\x0a');}function filterGitDiff(_0x55f110){const _0x510ca4=a0_0x46643e,_0x4aae3a=_0x55f110[_0x510ca4(0x162)]('\x0a'),_0x273d56=[];let _0x451d28='',_0x3163b8=0x0,_0x347d55=0x0,_0x712acf=[];const _0x181cdc=()=>{const _0x197c20=_0x510ca4;if(_0x451d28&&(_0x3163b8>0x0||_0x347d55>0x0)){_0x273d56[_0x197c20(0x170)]('[file]\x20'+_0x451d28+_0x197c20(0x168)+_0x3163b8+'\x20-'+_0x347d55+')');const _0x7597d2=0xa,_0x2f3eff=_0x712acf[_0x197c20(0x15f)](0x0,_0x7597d2);for(const _0x12d87f of _0x2f3eff){_0x273d56['push']('\x20\x20'+_0x12d87f);}const _0x401487=_0x3163b8+_0x347d55-_0x7597d2;_0x401487>0x0&&_0x273d56['push'](_0x197c20(0x187)+_0x401487+_0x197c20(0x161));}_0x3163b8=0x0,_0x347d55=0x0,_0x712acf=[];};for(const _0x3bf726 of _0x4aae3a){if(_0x3bf726[_0x510ca4(0x166)](_0x510ca4(0x185))){_0x181cdc();const _0x172d3e=_0x3bf726[_0x510ca4(0x17f)](/\sb\/(.+)$/);_0x451d28=_0x172d3e?_0x172d3e[0x1]:_0x510ca4(0x178);}else{if(_0x3bf726[_0x510ca4(0x166)]('+')&&!_0x3bf726[_0x510ca4(0x166)]('+++'))_0x3163b8++,_0x712acf[_0x510ca4(0x170)](_0x3bf726);else _0x3bf726[_0x510ca4(0x166)]('-')&&!_0x3bf726[_0x510ca4(0x166)](_0x510ca4(0x175))&&(_0x347d55++,_0x712acf[_0x510ca4(0x170)](_0x3bf726));}}_0x181cdc();const _0x5c764e=_0x273d56[_0x510ca4(0x15c)]('\x0a');return _0x5c764e[_0x510ca4(0x164)]>0x0?_0x5c764e:'No\x20modifications';}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x172b78=a0_0xfd1a;(function(_0x48f95e,_0x524698){const _0x197f38=a0_0xfd1a,_0x625cb0=_0x48f95e();while(!![]){try{const _0x4c5936=-parseInt(_0x197f38(0x13e))/0x1*(parseInt(_0x197f38(0x144))/0x2)+parseInt(_0x197f38(0x147))/0x3+-parseInt(_0x197f38(0x124))/0x4+-parseInt(_0x197f38(0x14a))/0x5*(parseInt(_0x197f38(0x12e))/0x6)+parseInt(_0x197f38(0x134))/0x7*(parseInt(_0x197f38(0x135))/0x8)+-parseInt(_0x197f38(0x126))/0x9*(parseInt(_0x197f38(0x145))/0xa)+parseInt(_0x197f38(0x122))/0xb;if(_0x4c5936===_0x524698)break;else _0x625cb0['push'](_0x625cb0['shift']());}catch(_0x5c0fd9){_0x625cb0['push'](_0x625cb0['shift']());}}}(a0_0x2a3a,0x5072c));function a0_0x2a3a(){const _0x5caf5d=['length','...\x20+','5MUzSeO','filterGoVet','\x20\x20\x20\x20...\x20+','push','lines','\x20passed','\x0aFailures:','5172233RDIbew','includes','297380aShuqo','min','38817VZMyVU','filter','===\x20RUN','Go\x20test:\x20no\x20test\x20files','Go\x20test:\x20','\x20skipped','trim','\x20passed,\x20','2787234pxjkTY','split','\x20more\x20failures','name','match','\x20\x20\x20\x20','7539DCFKUz','4024ForAlK','defineProperty','\x20failed,\x20','FAIL','startsWith','slice','\x20issues\x20found','\x20\x20...\x20+','join','410449kSeeJF','PASS','\x20more\x20lines','Go\x20vet:\x20no\x20issues\x20found','Go\x20test:\x20all\x20tests\x20passed','__esModule','2PaMnUC','230QAUQpY','Go\x20vet:\x20','1098342zEIhHo'];a0_0x2a3a=function(){return _0x5caf5d;};return a0_0x2a3a();}function a0_0xfd1a(_0x24d926,_0x2c41f0){_0x24d926=_0x24d926-0x11d;const _0x2a3ac2=a0_0x2a3a();let _0xfd1aec=_0x2a3ac2[_0x24d926];return _0xfd1aec;}Object[a0_0x172b78(0x136)](exports,a0_0x172b78(0x143),{'value':!![]}),exports['filterGoTest']=filterGoTest,exports[a0_0x172b78(0x14b)]=filterGoVet;function filterGoTest(_0x5bfeae){const _0x7b124f=a0_0x172b78,_0xe1f7c5=_0x5bfeae[_0x7b124f(0x12f)]('\x0a');let _0x8ddffe=0x0,_0x3df50d=0x0,_0x27ccb3=0x0;const _0x5c2f53=[],_0x22719c=[];let _0x273a61=null;for(const _0x225f68 of _0xe1f7c5){const _0x58c631=_0x225f68['trim'](),_0x23d3ed=_0x58c631[_0x7b124f(0x132)](/^ok\s+\S+\s+[\d.]+s/);if(_0x23d3ed){_0x22719c[_0x7b124f(0x11e)](_0x58c631);continue;}const _0x15176b=_0x58c631['match'](/^FAIL\s+\S+/);if(_0x15176b){_0x22719c[_0x7b124f(0x11e)](_0x58c631);continue;}const _0x54c35e=_0x58c631['match'](/^--- PASS:/);if(_0x54c35e){_0x8ddffe++;continue;}const _0x3a6243=_0x58c631[_0x7b124f(0x132)](/^--- FAIL:\s+(\S+)/);if(_0x3a6243){if(_0x273a61)_0x5c2f53[_0x7b124f(0x11e)](_0x273a61);_0x273a61={'name':_0x3a6243[0x1],'lines':[]},_0x3df50d++;continue;}if(_0x58c631[_0x7b124f(0x139)]('---\x20SKIP:')){_0x27ccb3++;continue;}_0x273a61&&_0x58c631['length']>0x0&&!_0x58c631[_0x7b124f(0x139)](_0x7b124f(0x128))&&_0x273a61[_0x7b124f(0x11f)]['push'](_0x225f68),_0x58c631[_0x7b124f(0x139)](_0x7b124f(0x128))&&(_0x273a61&&(_0x5c2f53[_0x7b124f(0x11e)](_0x273a61),_0x273a61=null));}if(_0x273a61)_0x5c2f53[_0x7b124f(0x11e)](_0x273a61);if(_0x8ddffe===0x0&&_0x3df50d===0x0&&_0x27ccb3===0x0){if(_0x5bfeae[_0x7b124f(0x123)](_0x7b124f(0x13f))&&!_0x5bfeae[_0x7b124f(0x123)](_0x7b124f(0x138)))return _0x7b124f(0x142);if(_0x5bfeae['includes']('no\x20test\x20files'))return _0x7b124f(0x129);return _0x5bfeae;}if(_0x3df50d===0x0){const _0x47e9d2=['Go\x20test:\x20'+_0x8ddffe+_0x7b124f(0x120)];if(_0x27ccb3>0x0)_0x47e9d2['push'](_0x27ccb3+_0x7b124f(0x12b));return _0x47e9d2[_0x7b124f(0x13d)](',\x20');}const _0x1827d3=[_0x7b124f(0x12a)+_0x8ddffe+_0x7b124f(0x12d)+_0x3df50d+_0x7b124f(0x137)+_0x27ccb3+_0x7b124f(0x12b)];if(_0x5c2f53[_0x7b124f(0x148)]>0x0){_0x1827d3[_0x7b124f(0x11e)](_0x7b124f(0x121));const _0x3aab96=0x3;for(let _0x56a782=0x0;_0x56a782<Math[_0x7b124f(0x125)](_0x5c2f53[_0x7b124f(0x148)],_0x3aab96);_0x56a782++){const _0x22af6c=_0x5c2f53[_0x56a782];_0x1827d3[_0x7b124f(0x11e)]('\x20\x20'+(_0x56a782+0x1)+'.\x20'+_0x22af6c[_0x7b124f(0x131)]);for(const _0x2ec98c of _0x22af6c[_0x7b124f(0x11f)][_0x7b124f(0x13a)](0x0,0x5)){_0x1827d3[_0x7b124f(0x11e)](_0x7b124f(0x133)+_0x2ec98c[_0x7b124f(0x12c)]());}_0x22af6c[_0x7b124f(0x11f)][_0x7b124f(0x148)]>0x5&&_0x1827d3['push'](_0x7b124f(0x11d)+(_0x22af6c[_0x7b124f(0x11f)][_0x7b124f(0x148)]-0x5)+_0x7b124f(0x140));}_0x5c2f53[_0x7b124f(0x148)]>_0x3aab96&&_0x1827d3[_0x7b124f(0x11e)](_0x7b124f(0x13c)+(_0x5c2f53[_0x7b124f(0x148)]-_0x3aab96)+_0x7b124f(0x130));}return _0x1827d3[_0x7b124f(0x13d)]('\x0a');}function filterGoVet(_0x16ecd6){const _0x551c6b=a0_0x172b78,_0x2bea38=_0x16ecd6['split']('\x0a')[_0x551c6b(0x127)](_0x1a4f65=>_0x1a4f65[_0x551c6b(0x12c)]()['length']>0x0);if(_0x2bea38[_0x551c6b(0x148)]===0x0)return _0x551c6b(0x141);if(_0x2bea38['length']<=0x14)return _0x16ecd6[_0x551c6b(0x12c)]();const _0x41a4c8=[_0x551c6b(0x146)+_0x2bea38[_0x551c6b(0x148)]+_0x551c6b(0x13b)];return _0x41a4c8[_0x551c6b(0x11e)](..._0x2bea38['slice'](0x0,0xa)),_0x2bea38[_0x551c6b(0x148)]>0xa&&_0x41a4c8[_0x551c6b(0x11e)](_0x551c6b(0x149)+(_0x2bea38[_0x551c6b(0x148)]-0xa)+'\x20more\x20issues'),_0x41a4c8[_0x551c6b(0x13d)]('\x0a');}
|