trimprompt 1.0.28 → 1.0.30

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/mcp.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x30a8(){const _0xb5e878=['end','defineProperty','340JIjEvA','redaction_enabled','resp_optimize','exit','isArray','line','features_enabled','message','pipe','length','complexity','compressOutput','2457730hByJwM','max_tokens','trimmedCount','compressConversation','432MVHwBh','proxy:resp-optimize','getOwnPropertyDescriptor','string','\x20trimmed,\x20~','prototype','getConfig','write','error','params','logExecution','stdout','parse','1WniODX','374eRwXxS','result','close','inherit','runMcpProxy','stdin','readline','8454530SSHNLy','spawn','34296QLowki','configurable','hasOwnProperty','create','292326iCNHPw','160227NkRfbD','conv_compress','savedTokens','\x20tokens\x20saved)','createInterface','max_tokens:\x20','2.0','messages','__setModuleDefault','getOwnPropertyNames','content','child_process','text','tracker','mcp\x20tool\x20(id:\x20','__esModule','jsonrpc','./tracker','proxy:conv-compress','default','type','\x20messages\x20(','6858498JxtEWZ','./filters','__importStar','630200JFEHDC','stringify','\x20messages'];a0_0x30a8=function(){return _0xb5e878;};return a0_0x30a8();}const a0_0x4f0680=a0_0x2299;(function(_0x262b03,_0x560e33){const _0x37dd16=a0_0x2299,_0x2c53ae=_0x262b03();while(!![]){try{const _0x3a47cb=-parseInt(_0x37dd16(0x1ee))/0x1*(parseInt(_0x37dd16(0x1fc))/0x2)+parseInt(_0x37dd16(0x1f8))/0x3*(-parseInt(_0x37dd16(0x1d1))/0x4)+parseInt(_0x37dd16(0x1dd))/0x5+-parseInt(_0x37dd16(0x213))/0x6+parseInt(_0x37dd16(0x1f6))/0x7+-parseInt(_0x37dd16(0x1e1))/0x8*(parseInt(_0x37dd16(0x1fd))/0x9)+parseInt(_0x37dd16(0x216))/0xa*(parseInt(_0x37dd16(0x1ef))/0xb);if(_0x3a47cb===_0x560e33)break;else _0x2c53ae['push'](_0x2c53ae['shift']());}catch(_0x2ae35d){_0x2c53ae['push'](_0x2c53ae['shift']());}}}(a0_0x30a8,0x974a8));var __createBinding=this&&this['__createBinding']||(Object[a0_0x4f0680(0x1fb)]?function(_0x544190,_0x377f45,_0xdbe6c4,_0x1c75bb){const _0x2f2c10=a0_0x4f0680;if(_0x1c75bb===undefined)_0x1c75bb=_0xdbe6c4;var _0x20003a=Object[_0x2f2c10(0x1e3)](_0x377f45,_0xdbe6c4);(!_0x20003a||('get'in _0x20003a?!_0x377f45['__esModule']:_0x20003a['writable']||_0x20003a[_0x2f2c10(0x1f9)]))&&(_0x20003a={'enumerable':!![],'get':function(){return _0x377f45[_0xdbe6c4];}}),Object[_0x2f2c10(0x1d0)](_0x544190,_0x1c75bb,_0x20003a);}:function(_0x3089c3,_0x165f67,_0x4d64c6,_0x512bff){if(_0x512bff===undefined)_0x512bff=_0x4d64c6;_0x3089c3[_0x512bff]=_0x165f67[_0x4d64c6];}),__setModuleDefault=this&&this[a0_0x4f0680(0x205)]||(Object['create']?function(_0x522b0a,_0x3354cd){const _0x56e0e2=a0_0x4f0680;Object[_0x56e0e2(0x1d0)](_0x522b0a,_0x56e0e2(0x210),{'enumerable':!![],'value':_0x3354cd});}:function(_0x4cfd5f,_0x4f8a97){const _0x5a7107=a0_0x4f0680;_0x4cfd5f[_0x5a7107(0x210)]=_0x4f8a97;}),__importStar=this&&this[a0_0x4f0680(0x215)]||(function(){var _0x5f3e36=function(_0x1e954b){const _0x858176=a0_0x2299;return _0x5f3e36=Object[_0x858176(0x206)]||function(_0x3b50d8){const _0x2bfed8=_0x858176;var _0x1e8040=[];for(var _0xb2831e in _0x3b50d8)if(Object[_0x2bfed8(0x1e6)][_0x2bfed8(0x1fa)]['call'](_0x3b50d8,_0xb2831e))_0x1e8040[_0x1e8040[_0x2bfed8(0x1da)]]=_0xb2831e;return _0x1e8040;},_0x5f3e36(_0x1e954b);};return function(_0x1814b6){const _0x3b0861=a0_0x2299;if(_0x1814b6&&_0x1814b6[_0x3b0861(0x20c)])return _0x1814b6;var _0x4b8f0e={};if(_0x1814b6!=null){for(var _0x125d1c=_0x5f3e36(_0x1814b6),_0x10eda9=0x0;_0x10eda9<_0x125d1c[_0x3b0861(0x1da)];_0x10eda9++)if(_0x125d1c[_0x10eda9]!==_0x3b0861(0x210))__createBinding(_0x4b8f0e,_0x1814b6,_0x125d1c[_0x10eda9]);}return __setModuleDefault(_0x4b8f0e,_0x1814b6),_0x4b8f0e;};}());function a0_0x2299(_0x44fcfe,_0x578deb){_0x44fcfe=_0x44fcfe-0x1cf;const _0x30a86d=a0_0x30a8();let _0x2299a4=_0x30a86d[_0x44fcfe];return _0x2299a4;}Object[a0_0x4f0680(0x1d0)](exports,a0_0x4f0680(0x20c),{'value':!![]}),exports[a0_0x4f0680(0x1f3)]=runMcpProxy;const child_process_1=require(a0_0x4f0680(0x208)),readline=__importStar(require(a0_0x4f0680(0x1f5))),filters_1=require(a0_0x4f0680(0x214)),tracker_1=require(a0_0x4f0680(0x20e)),proxy_conv_1=require('./proxy-conv'),proxy_resp_1=require('./proxy-resp');function runMcpProxy(_0x57350f,_0x217b15){const _0x1e0b3e=a0_0x4f0680,_0x53d625=(0x0,child_process_1[_0x1e0b3e(0x1f7)])(_0x57350f,_0x217b15,{'stdio':[_0x1e0b3e(0x1d9),'pipe',_0x1e0b3e(0x1f2)]}),_0x40f766=tracker_1[_0x1e0b3e(0x20a)][_0x1e0b3e(0x1e7)](),_0x38dc9c=_0x40f766[_0x1e0b3e(0x1d7)]||{},_0x456493=_0x38dc9c[_0x1e0b3e(0x1fe)]!==![],_0x431585=_0x38dc9c[_0x1e0b3e(0x1d3)]!==![],_0x16090e=readline[_0x1e0b3e(0x201)]({'input':process['stdin'],'terminal':![]});_0x16090e['on'](_0x1e0b3e(0x1d6),_0x4caa93=>{const _0x348fb0=_0x1e0b3e;try{const _0xe2dd40=JSON[_0x348fb0(0x1ed)](_0x4caa93);if(_0xe2dd40&&_0xe2dd40[_0x348fb0(0x20d)]===_0x348fb0(0x203)&&_0xe2dd40['method']&&_0xe2dd40[_0x348fb0(0x1ea)]){const _0x2e64e7=_0xe2dd40[_0x348fb0(0x1ea)];if(Array[_0x348fb0(0x1d5)](_0x2e64e7[_0x348fb0(0x204)])&&_0x2e64e7[_0x348fb0(0x204)][_0x348fb0(0x1da)]>0x0){if(_0x456493){const _0x1458a9=(0x0,proxy_conv_1[_0x348fb0(0x1e0)])(_0x2e64e7['messages']);(_0x1458a9['trimmedCount']>0x0||_0x1458a9['savedTokens']>0x0)&&(_0x2e64e7['messages']=_0x1458a9['messages'],tracker_1[_0x348fb0(0x20a)][_0x348fb0(0x1eb)](_0x348fb0(0x20f),_0x1458a9['trimmedCount']+_0x1458a9[_0x348fb0(0x204)][_0x348fb0(0x1da)]+_0x348fb0(0x218),_0x1458a9['messages']['length']+_0x348fb0(0x212)+_0x1458a9[_0x348fb0(0x1df)]+_0x348fb0(0x1e5)+_0x1458a9[_0x348fb0(0x1ff)]+_0x348fb0(0x200),0x0,undefined,[_0x348fb0(0x1fe)]));}if(_0x431585){const _0x178f9e=(0x0,proxy_resp_1['optimizeMaxTokens'])(_0x2e64e7[_0x348fb0(0x204)],_0x2e64e7[_0x348fb0(0x1de)]);if(_0x178f9e){const _0x49a621=_0x2e64e7['max_tokens']||_0x348fb0(0x210);_0x2e64e7[_0x348fb0(0x1de)]=_0x178f9e[_0x348fb0(0x1de)],tracker_1[_0x348fb0(0x20a)][_0x348fb0(0x1eb)](_0x348fb0(0x1e2),_0x348fb0(0x202)+_0x49a621,_0x348fb0(0x202)+_0x178f9e['max_tokens']+'\x20('+_0x178f9e[_0x348fb0(0x1db)]+')',0x0,undefined,[_0x348fb0(0x1d3)]);}}}_0x53d625['stdin'][_0x348fb0(0x1e8)](JSON[_0x348fb0(0x217)](_0xe2dd40)+'\x0a');}else _0x53d625[_0x348fb0(0x1f4)]['write'](_0x4caa93+'\x0a');}catch{_0x53d625[_0x348fb0(0x1f4)][_0x348fb0(0x1e8)](_0x4caa93+'\x0a');}}),_0x16090e['on'](_0x1e0b3e(0x1f1),()=>{const _0x26e1b9=_0x1e0b3e;try{_0x53d625['stdin'][_0x26e1b9(0x1cf)]();}catch{}});const _0x5ee505=readline[_0x1e0b3e(0x201)]({'input':_0x53d625['stdout'],'terminal':![]});_0x5ee505['on']('line',_0x143e6e=>{const _0x48c5f3=_0x1e0b3e;try{const _0x2f15a2=JSON[_0x48c5f3(0x1ed)](_0x143e6e);if(_0x2f15a2&&_0x2f15a2['jsonrpc']===_0x48c5f3(0x203)&&_0x2f15a2['id']!==undefined&&_0x2f15a2[_0x48c5f3(0x1f0)]&&Array[_0x48c5f3(0x1d5)](_0x2f15a2[_0x48c5f3(0x1f0)][_0x48c5f3(0x207)])){let _0x2fc2f6=![];for(const _0x5f4514 of _0x2f15a2[_0x48c5f3(0x1f0)]['content']){if(_0x5f4514[_0x48c5f3(0x211)]===_0x48c5f3(0x209)&&typeof _0x5f4514[_0x48c5f3(0x209)]===_0x48c5f3(0x1e4)&&_0x5f4514[_0x48c5f3(0x209)]['trim']()[_0x48c5f3(0x1da)]>0x0){const _0x2ae734=_0x5f4514[_0x48c5f3(0x209)],_0x298c50=(0x0,filters_1[_0x48c5f3(0x1dc)])('mcp-tool-call',_0x2ae734,'',tracker_1[_0x48c5f3(0x20a)]['getConfig']()[_0x48c5f3(0x1d2)]);tracker_1[_0x48c5f3(0x20a)][_0x48c5f3(0x1eb)](_0x48c5f3(0x20b)+_0x2f15a2['id']+')',_0x2ae734,_0x298c50,0x0),_0x5f4514['text']=_0x298c50,_0x2fc2f6=!![];}}_0x2fc2f6?process[_0x48c5f3(0x1ec)][_0x48c5f3(0x1e8)](JSON[_0x48c5f3(0x217)](_0x2f15a2)+'\x0a'):process[_0x48c5f3(0x1ec)]['write'](_0x143e6e+'\x0a');}else process[_0x48c5f3(0x1ec)]['write'](_0x143e6e+'\x0a');}catch{process[_0x48c5f3(0x1ec)][_0x48c5f3(0x1e8)](_0x143e6e+'\x0a');}}),_0x53d625['on']('close',_0x922be9=>{const _0xdb033a=_0x1e0b3e;process[_0xdb033a(0x1d4)](_0x922be9||0x0);}),_0x53d625['on'](_0x1e0b3e(0x1e9),_0x384593=>{const _0x4d3355=_0x1e0b3e;console[_0x4d3355(0x1e9)]('[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20'+_0x384593[_0x4d3355(0x1d8)]),process[_0x4d3355(0x1d4)](0x1);});}
1
+ 'use strict';const a0_0x39f816=a0_0x1e90;(function(_0x325918,_0x4f3c0f){const _0x4beab2=a0_0x1e90,_0x1339da=_0x325918();while(!![]){try{const _0x47ac28=parseInt(_0x4beab2(0x1e8))/0x1*(-parseInt(_0x4beab2(0x21c))/0x2)+parseInt(_0x4beab2(0x20c))/0x3+-parseInt(_0x4beab2(0x203))/0x4*(parseInt(_0x4beab2(0x214))/0x5)+parseInt(_0x4beab2(0x227))/0x6*(parseInt(_0x4beab2(0x21b))/0x7)+-parseInt(_0x4beab2(0x1ee))/0x8+parseInt(_0x4beab2(0x1ed))/0x9*(-parseInt(_0x4beab2(0x1f1))/0xa)+parseInt(_0x4beab2(0x1f2))/0xb*(-parseInt(_0x4beab2(0x1ec))/0xc);if(_0x47ac28===_0x4f3c0f)break;else _0x1339da['push'](_0x1339da['shift']());}catch(_0x67d1bf){_0x1339da['push'](_0x1339da['shift']());}}}(a0_0x1aaa,0x8863d));var __createBinding=this&&this[a0_0x39f816(0x1ea)]||(Object[a0_0x39f816(0x221)]?function(_0x43d500,_0x124459,_0xc24552,_0x26f9d6){const _0x20fd68=a0_0x39f816;if(_0x26f9d6===undefined)_0x26f9d6=_0xc24552;var _0x3bba64=Object[_0x20fd68(0x20e)](_0x124459,_0xc24552);(!_0x3bba64||(_0x20fd68(0x225)in _0x3bba64?!_0x124459[_0x20fd68(0x20f)]:_0x3bba64[_0x20fd68(0x1e3)]||_0x3bba64[_0x20fd68(0x202)]))&&(_0x3bba64={'enumerable':!![],'get':function(){return _0x124459[_0xc24552];}}),Object[_0x20fd68(0x20b)](_0x43d500,_0x26f9d6,_0x3bba64);}:function(_0x1b5491,_0x465222,_0x4d49e3,_0x3c6592){if(_0x3c6592===undefined)_0x3c6592=_0x4d49e3;_0x1b5491[_0x3c6592]=_0x465222[_0x4d49e3];}),__setModuleDefault=this&&this[a0_0x39f816(0x211)]||(Object[a0_0x39f816(0x221)]?function(_0x2c703e,_0x44abba){const _0xc11ce9=a0_0x39f816;Object[_0xc11ce9(0x20b)](_0x2c703e,_0xc11ce9(0x213),{'enumerable':!![],'value':_0x44abba});}:function(_0x298f66,_0x5ea884){const _0x2c42d5=a0_0x39f816;_0x298f66[_0x2c42d5(0x213)]=_0x5ea884;}),__importStar=this&&this[a0_0x39f816(0x1e6)]||(function(){var _0x32330c=function(_0x5af01a){return _0x32330c=Object['getOwnPropertyNames']||function(_0x2c542d){const _0x4aab8f=a0_0x1e90;var _0x5a4d79=[];for(var _0x265f67 in _0x2c542d)if(Object[_0x4aab8f(0x1e7)][_0x4aab8f(0x1fd)][_0x4aab8f(0x218)](_0x2c542d,_0x265f67))_0x5a4d79[_0x5a4d79['length']]=_0x265f67;return _0x5a4d79;},_0x32330c(_0x5af01a);};return function(_0x161a03){const _0x135f70=a0_0x1e90;if(_0x161a03&&_0x161a03['__esModule'])return _0x161a03;var _0x47cd18={};if(_0x161a03!=null){for(var _0x104405=_0x32330c(_0x161a03),_0x42e25e=0x0;_0x42e25e<_0x104405['length'];_0x42e25e++)if(_0x104405[_0x42e25e]!==_0x135f70(0x213))__createBinding(_0x47cd18,_0x161a03,_0x104405[_0x42e25e]);}return __setModuleDefault(_0x47cd18,_0x161a03),_0x47cd18;};}());Object[a0_0x39f816(0x20b)](exports,a0_0x39f816(0x20f),{'value':!![]}),exports[a0_0x39f816(0x1f9)]=runMcpProxy;function a0_0x1e90(_0x270b79,_0x18a4b0){_0x270b79=_0x270b79-0x1e3;const _0x1aaa7c=a0_0x1aaa();let _0x1e9063=_0x1aaa7c[_0x270b79];return _0x1e9063;}const child_process_1=require(a0_0x39f816(0x1f0)),readline=__importStar(require('readline')),filters_1=require('./filters'),tracker_1=require('./tracker'),proxy_conv_1=require(a0_0x39f816(0x20d)),proxy_resp_1=require(a0_0x39f816(0x1f5));function a0_0x1aaa(){const _0x345081=['messages','logExecution','savedTokens','max_tokens','stdout','defineProperty','1262292WIqdaR','./proxy-conv','getOwnPropertyDescriptor','__esModule','inherit','__setModuleDefault','result','default','263700PncXhm','mcp-tool-call','isArray','features_enabled','call','trim','stringify','4193CIPmxU','166aTQNen','trimmedCount','stdin','compressConversation','complexity','create','2.0','exit','content','get','length','10074LtYXVa','writable','resp_optimize','params','__importStar','prototype','1619ORIMzb','line','__createBinding','jsonrpc','162156eFRjxH','32949lvjQfq','589200jmqBDV','mcp\x20tool\x20(id:\x20','child_process','820sMViOo','121oUpJGF','createInterface','proxy:conv-compress','./proxy-resp','text','spawn','method','runMcpProxy','optimizeMaxTokens','redaction_enabled','error','hasOwnProperty','tracker','\x20messages\x20(','close','type','configurable','16EBhXPm','write','getConfig'];a0_0x1aaa=function(){return _0x345081;};return a0_0x1aaa();}function runMcpProxy(_0x676797,_0x723cdd){const _0x20057d=a0_0x39f816,_0x42bc01=(0x0,child_process_1[_0x20057d(0x1f7)])(_0x676797,_0x723cdd,{'stdio':['pipe','pipe',_0x20057d(0x210)]}),_0x327a82=tracker_1['tracker'][_0x20057d(0x205)](),_0x56625b=_0x327a82[_0x20057d(0x217)]||{},_0x3c9f8c=_0x56625b['conv_compress']!==![],_0x3744c4=_0x56625b[_0x20057d(0x1e4)]!==![],_0x42ca0c=readline[_0x20057d(0x1f3)]({'input':process[_0x20057d(0x21e)],'terminal':![]});_0x42ca0c['on'](_0x20057d(0x1e9),_0x2bb7c4=>{const _0x51d234=_0x20057d;try{const _0x2a9e9d=JSON['parse'](_0x2bb7c4);if(_0x2a9e9d&&_0x2a9e9d[_0x51d234(0x1eb)]===_0x51d234(0x222)&&_0x2a9e9d[_0x51d234(0x1f8)]&&_0x2a9e9d[_0x51d234(0x1e5)]){const _0xeac1b8=_0x2a9e9d['params'];if(Array['isArray'](_0xeac1b8[_0x51d234(0x206)])&&_0xeac1b8[_0x51d234(0x206)][_0x51d234(0x226)]>0x0){if(_0x3c9f8c){const _0x12ace0=(0x0,proxy_conv_1[_0x51d234(0x21f)])(_0xeac1b8[_0x51d234(0x206)]);(_0x12ace0[_0x51d234(0x21d)]>0x0||_0x12ace0[_0x51d234(0x208)]>0x0)&&(_0xeac1b8[_0x51d234(0x206)]=_0x12ace0[_0x51d234(0x206)],tracker_1[_0x51d234(0x1fe)]['logExecution'](_0x51d234(0x1f4),_0x12ace0[_0x51d234(0x21d)]+_0x12ace0[_0x51d234(0x206)][_0x51d234(0x226)]+'\x20messages',_0x12ace0[_0x51d234(0x206)][_0x51d234(0x226)]+_0x51d234(0x1ff)+_0x12ace0[_0x51d234(0x21d)]+'\x20trimmed,\x20~'+_0x12ace0['savedTokens']+'\x20tokens\x20saved)',0x0,undefined,['conv_compress']));}if(_0x3744c4){const _0x512955=(0x0,proxy_resp_1[_0x51d234(0x1fa)])(_0xeac1b8['messages'],_0xeac1b8[_0x51d234(0x209)]);if(_0x512955){const _0x154385=_0xeac1b8[_0x51d234(0x209)]||_0x51d234(0x213);_0xeac1b8[_0x51d234(0x209)]=_0x512955[_0x51d234(0x209)],tracker_1[_0x51d234(0x1fe)][_0x51d234(0x207)]('proxy:resp-optimize','max_tokens:\x20'+_0x154385,'max_tokens:\x20'+_0x512955['max_tokens']+'\x20('+_0x512955[_0x51d234(0x220)]+')',0x0,undefined,[_0x51d234(0x1e4)]);}}}_0x42bc01[_0x51d234(0x21e)][_0x51d234(0x204)](JSON[_0x51d234(0x21a)](_0x2a9e9d)+'\x0a');}else _0x42bc01[_0x51d234(0x21e)][_0x51d234(0x204)](_0x2bb7c4+'\x0a');}catch{_0x42bc01[_0x51d234(0x21e)][_0x51d234(0x204)](_0x2bb7c4+'\x0a');}}),_0x42ca0c['on'](_0x20057d(0x200),()=>{try{_0x42bc01['stdin']['end']();}catch{}});const _0x12e818=readline[_0x20057d(0x1f3)]({'input':_0x42bc01['stdout'],'terminal':![]});_0x12e818['on']('line',_0x335672=>{const _0x37e2b5=_0x20057d;try{const _0x46f819=JSON['parse'](_0x335672);if(_0x46f819&&_0x46f819[_0x37e2b5(0x1eb)]===_0x37e2b5(0x222)&&_0x46f819['id']!==undefined&&_0x46f819[_0x37e2b5(0x212)]&&Array[_0x37e2b5(0x216)](_0x46f819[_0x37e2b5(0x212)][_0x37e2b5(0x224)])){let _0x3030ed=![];for(const _0x509a12 of _0x46f819[_0x37e2b5(0x212)][_0x37e2b5(0x224)]){if(_0x509a12[_0x37e2b5(0x201)]===_0x37e2b5(0x1f6)&&typeof _0x509a12[_0x37e2b5(0x1f6)]==='string'&&_0x509a12['text'][_0x37e2b5(0x219)]()[_0x37e2b5(0x226)]>0x0){const _0x302b6e=_0x509a12[_0x37e2b5(0x1f6)],_0x58d6d3=(0x0,filters_1['compressOutput'])(_0x37e2b5(0x215),_0x302b6e,'',tracker_1[_0x37e2b5(0x1fe)][_0x37e2b5(0x205)]()[_0x37e2b5(0x1fb)]);tracker_1[_0x37e2b5(0x1fe)][_0x37e2b5(0x207)](_0x37e2b5(0x1ef)+_0x46f819['id']+')',_0x302b6e,_0x58d6d3,0x0),_0x509a12[_0x37e2b5(0x1f6)]=_0x58d6d3,_0x3030ed=!![];}}_0x3030ed?process[_0x37e2b5(0x20a)][_0x37e2b5(0x204)](JSON[_0x37e2b5(0x21a)](_0x46f819)+'\x0a'):process[_0x37e2b5(0x20a)][_0x37e2b5(0x204)](_0x335672+'\x0a');}else process[_0x37e2b5(0x20a)][_0x37e2b5(0x204)](_0x335672+'\x0a');}catch{process[_0x37e2b5(0x20a)][_0x37e2b5(0x204)](_0x335672+'\x0a');}}),_0x42bc01['on'](_0x20057d(0x200),_0xba9385=>{const _0x531b39=_0x20057d;process[_0x531b39(0x223)](_0xba9385||0x0);}),_0x42bc01['on']('error',_0x145388=>{const _0x17dc2d=_0x20057d;console[_0x17dc2d(0x1fc)]('[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20'+_0x145388['message']),process[_0x17dc2d(0x223)](0x1);});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trimprompt",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "TrimPrompt — Save 80% on LLM tokens. Zero-config CLI proxy for AI coding agents",
5
5
  "keywords": [
6
6
  "llm",
package/proxy-conv.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x30a306=a0_0x4093;(function(_0x4b43d6,_0x1dfdd1){const _0x4339f5=a0_0x4093,_0x4ebc47=_0x4b43d6();while(!![]){try{const _0x39c738=-parseInt(_0x4339f5(0x7e))/0x1+parseInt(_0x4339f5(0x7b))/0x2+parseInt(_0x4339f5(0x7a))/0x3+-parseInt(_0x4339f5(0x7c))/0x4+parseInt(_0x4339f5(0x75))/0x5*(parseInt(_0x4339f5(0x83))/0x6)+-parseInt(_0x4339f5(0x78))/0x7+parseInt(_0x4339f5(0x84))/0x8*(parseInt(_0x4339f5(0x82))/0x9);if(_0x39c738===_0x1dfdd1)break;else _0x4ebc47['push'](_0x4ebc47['shift']());}catch(_0x499024){_0x4ebc47['push'](_0x4ebc47['shift']());}}}(a0_0x5ae2,0x9d8c0));Object[a0_0x30a306(0x95)](exports,a0_0x30a306(0x91),{'value':!![]}),exports[a0_0x30a306(0x77)]=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function estimateTokens(_0x15a3d2){const _0x393d57=a0_0x30a306;return Math['ceil'](_0x15a3d2[_0x393d57(0x90)]/0x4);}function blockText(_0x3aa2b8){const _0x4182c=a0_0x30a306;if(!_0x3aa2b8||typeof _0x3aa2b8!==_0x4182c(0x8b))return'';if(_0x3aa2b8[_0x4182c(0x8f)]==='text'&&typeof _0x3aa2b8['text']===_0x4182c(0x8d))return _0x3aa2b8['text'];if(_0x3aa2b8[_0x4182c(0x8f)]==='tool_result'){if(typeof _0x3aa2b8[_0x4182c(0x9a)]===_0x4182c(0x8d))return _0x3aa2b8['content'];if(Array[_0x4182c(0x81)](_0x3aa2b8[_0x4182c(0x9a)]))return _0x3aa2b8[_0x4182c(0x9a)][_0x4182c(0x87)](blockText)[_0x4182c(0x94)](Boolean)['join']('\x0a');}return'';}function messageText(_0x56e72a){const _0x302697=a0_0x30a306;if(typeof _0x56e72a['content']==='string')return _0x56e72a[_0x302697(0x9a)];if(Array[_0x302697(0x81)](_0x56e72a[_0x302697(0x9a)]))return _0x56e72a['content'][_0x302697(0x87)](blockText)[_0x302697(0x94)](Boolean)[_0x302697(0x99)]('\x0a');return'';}function a0_0x4093(_0x3c0fb4,_0x9bfc6e){_0x3c0fb4=_0x3c0fb4-0x74;const _0x5ae270=a0_0x5ae2();let _0x4093e8=_0x5ae270[_0x3c0fb4];return _0x4093e8;}function summarizeText(_0x52675b){const _0x4e1463=a0_0x30a306,_0xfbae33=estimateTokens(_0x52675b),_0x23300f=_0x52675b[_0x4e1463(0x8e)]('\x0a');if(_0xfbae33>0x7d0){if(_0x23300f[_0x4e1463(0x90)]>0xa){const _0x21f847=_0x23300f[_0x4e1463(0x85)](0x0,0x5)['join']('\x0a'),_0x8f6275=_0x23300f[_0x4e1463(0x85)](-0x5)[_0x4e1463(0x99)]('\x0a');return _0x21f847+'\x0a[...\x20'+(_0x23300f[_0x4e1463(0x90)]-0xa)+_0x4e1463(0x9b)+_0x8f6275;}return _0x52675b[_0x4e1463(0x85)](0x0,0x7d0)+(_0x4e1463(0x98)+(_0x52675b[_0x4e1463(0x90)]-0x7d0)+_0x4e1463(0x7f));}if(_0xfbae33>0x1f4){if(_0x23300f[_0x4e1463(0x90)]>0xa)return _0x23300f['slice'](0x0,0xa)[_0x4e1463(0x99)]('\x0a')+('\x0a[...\x20'+(_0x23300f['length']-0xa)+'\x20lines\x20trimmed\x20...]');return _0x52675b[_0x4e1463(0x85)](0x0,0x320)+('\x0a[...\x20'+(_0x52675b[_0x4e1463(0x90)]-0x320)+_0x4e1463(0x8a));}return _0x52675b;}function summarizeBlock(_0x2ded32){const _0x3a0260=a0_0x30a306;if(!_0x2ded32||typeof _0x2ded32!==_0x3a0260(0x8b))return _0x2ded32;if(_0x2ded32[_0x3a0260(0x8f)]===_0x3a0260(0x97)&&typeof _0x2ded32[_0x3a0260(0x97)]===_0x3a0260(0x8d))return{..._0x2ded32,'text':summarizeText(_0x2ded32['text'])};if(_0x2ded32[_0x3a0260(0x8f)]===_0x3a0260(0x74)){if(typeof _0x2ded32['content']===_0x3a0260(0x8d))return{..._0x2ded32,'content':summarizeText(_0x2ded32['content'])};if(Array[_0x3a0260(0x81)](_0x2ded32[_0x3a0260(0x9a)])){const _0x232bfa=largestBlockIndex(_0x2ded32['content']);if(_0x232bfa>=0x0){const _0xef3c3a=_0x2ded32[_0x3a0260(0x9a)][_0x3a0260(0x87)]((_0x30b026,_0x4ec19d)=>_0x4ec19d===_0x232bfa?summarizeBlock(_0x30b026):_0x30b026);return{..._0x2ded32,'content':_0xef3c3a};}}}return _0x2ded32;}function largestBlockIndex(_0x4de5e0){const _0x2749da=a0_0x30a306;let _0x3715a6=-0x1,_0x304975=-0x1;return _0x4de5e0[_0x2749da(0x92)]((_0x3f24e0,_0x5dbf4b)=>{const _0x461ce6=_0x2749da,_0x459e89=blockText(_0x3f24e0)[_0x461ce6(0x90)];_0x459e89>_0x304975&&(_0x304975=_0x459e89,_0x3715a6=_0x5dbf4b);}),_0x304975>0x0?_0x3715a6:-0x1;}function a0_0x5ae2(){const _0x2568cc=['\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','tool_result','35kuqJie','originalIndex','compressConversation','8829870ZwPYze','role','783198UziNIg','1464002chTpbH','5061912VkDyLF','score','430061XKOukJ','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','indexOf','isArray','2924109LqTVfw','287046wknagk','56TyRvtm','slice','tokens','map','system','msg','\x20chars\x20trimmed\x20...]','object','push','string','split','type','length','__esModule','forEach','sort','filter','defineProperty','reduce','text','\x0a[...\x20','join','content'];a0_0x5ae2=function(){return _0x2568cc;};return a0_0x5ae2();}function scoreMessage(_0x4cca1b,_0x541f83,_0x696922){const _0x5b49bf=a0_0x30a306,_0x3d2072=ROLE_WEIGHT[_0x4cca1b[_0x5b49bf(0x79)]]||0.4,_0xf6fbcc=(_0x541f83+0x1)/_0x696922,_0x4ee547=messageText(_0x4cca1b),_0xff0d29=estimateTokens(_0x4ee547),_0x2b1a22=_0xff0d29>0x7d0?0.6:_0xff0d29>0x1f4?0.8:0x1;return _0x3d2072*(0.3+0.7*_0xf6fbcc)*_0x2b1a22;}function summarizeMessage(_0x1f8546){const _0x3468a3=a0_0x30a306,_0x448a6d=estimateTokens(messageText(_0x1f8546));if(_0x448a6d<=0x1f4)return _0x1f8546;if(typeof _0x1f8546['content']===_0x3468a3(0x8d))return{..._0x1f8546,'content':summarizeText(_0x1f8546[_0x3468a3(0x9a)])};if(Array[_0x3468a3(0x81)](_0x1f8546[_0x3468a3(0x9a)])){const _0x1cc8fa=largestBlockIndex(_0x1f8546[_0x3468a3(0x9a)]);if(_0x1cc8fa>=0x0){const _0x3ef269=_0x1f8546[_0x3468a3(0x9a)]['map']((_0x578d1c,_0x1fb8f2)=>_0x1fb8f2===_0x1cc8fa?summarizeBlock(_0x578d1c):_0x578d1c);return{..._0x1f8546,'content':_0x3ef269};}}return _0x1f8546;}function compressConversation(_0x483dae,_0x1d0b1d){const _0x215763=a0_0x30a306,_0x41e5f2={'messages':_0x483dae,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x483dae||!Array[_0x215763(0x81)](_0x483dae)||_0x483dae[_0x215763(0x90)]<=0x6)return _0x41e5f2;try{return _compressConversation(_0x483dae,_0x1d0b1d);}catch{return _0x41e5f2;}}function _compressConversation(_0xc1c473,_0x7724f6){const _0xa65af5=a0_0x30a306,_0x38f519=_0x7724f6||0x13880,_0x3c2514=0x4,_0x83ec25=_0xc1c473['filter'](_0x1a95bd=>_0x1a95bd['role']==='system'),_0x267a19=_0xc1c473['filter'](_0x162e09=>_0x162e09['role']!==_0xa65af5(0x88)),_0xf79a7b=_0x267a19[_0xa65af5(0x85)](-_0x3c2514),_0x334333=_0x267a19[_0xa65af5(0x85)](0x0,-_0x3c2514),_0x28ed62=_0x334333['map']((_0x1a953c,_0x419fe0)=>({'msg':_0x1a953c,'score':scoreMessage(_0x1a953c,_0x419fe0,_0x334333['length']),'tokens':estimateTokens(messageText(_0x1a953c))})),_0x3d8859=_0x28ed62[_0xa65af5(0x96)]((_0x5210e5,_0x533a3f)=>_0x5210e5+_0x533a3f[_0xa65af5(0x86)],0x0),_0x2394c5=_0xf79a7b[_0xa65af5(0x96)]((_0x130b60,_0x409162)=>_0x130b60+estimateTokens(messageText(_0x409162)),0x0),_0xb3b485=_0x83ec25[_0xa65af5(0x96)]((_0x499cf3,_0x252046)=>_0x499cf3+estimateTokens(messageText(_0x252046)),0x0),_0x4167be=_0x38f519-_0x2394c5-_0xb3b485;if(_0x3d8859<=_0x4167be){let _0x1ee596=0x0;const _0x3f85e2=_0x28ed62[_0xa65af5(0x87)](_0x2c78d2=>{const _0x2210b5=_0xa65af5;if(_0x2c78d2[_0x2210b5(0x86)]>0x1f4){const _0x1867b0=summarizeMessage(_0x2c78d2[_0x2210b5(0x89)]),_0x31df81=estimateTokens(messageText(_0x1867b0));if(_0x31df81<_0x2c78d2[_0x2210b5(0x86)])return _0x1ee596+=_0x2c78d2['tokens']-_0x31df81,_0x1867b0;}return _0x2c78d2[_0x2210b5(0x89)];});return{'messages':[..._0x83ec25,..._0x3f85e2,..._0xf79a7b],'trimmedCount':0x0,'savedTokens':_0x1ee596};}_0x28ed62['sort']((_0x553133,_0x1da6b3)=>_0x1da6b3[_0xa65af5(0x7d)]-_0x553133[_0xa65af5(0x7d)]);let _0x36df55=0x0,_0x23942d=0x0,_0x532989=0x0;const _0x1898ed=[];for(const _0x4d000e of _0x28ed62){if(_0x36df55+_0x4d000e[_0xa65af5(0x86)]<=_0x4167be){if(_0x4d000e[_0xa65af5(0x86)]>0x3e8){const _0x309af1=summarizeMessage(_0x4d000e[_0xa65af5(0x89)]),_0x288592=estimateTokens(messageText(_0x309af1));_0x532989+=_0x4d000e[_0xa65af5(0x86)]-_0x288592,_0x36df55+=_0x288592,_0x1898ed[_0xa65af5(0x8c)]({'msg':_0x309af1,'originalIndex':_0x334333[_0xa65af5(0x80)](_0x4d000e[_0xa65af5(0x89)])});}else _0x36df55+=_0x4d000e[_0xa65af5(0x86)],_0x1898ed['push']({'msg':_0x4d000e[_0xa65af5(0x89)],'originalIndex':_0x334333[_0xa65af5(0x80)](_0x4d000e[_0xa65af5(0x89)])});}else _0x23942d++,_0x532989+=_0x4d000e[_0xa65af5(0x86)];}_0x1898ed[_0xa65af5(0x93)]((_0x515fcc,_0x214069)=>_0x515fcc['originalIndex']-_0x214069[_0xa65af5(0x76)]);const _0x55ed43=[..._0x83ec25,..._0x1898ed[_0xa65af5(0x87)](_0x138a94=>_0x138a94[_0xa65af5(0x89)]),..._0xf79a7b];return{'messages':_0x55ed43,'trimmedCount':_0x23942d,'savedTokens':_0x532989};}
1
+ 'use strict';function a0_0x5e51(_0x3355e4,_0x1b2e5e){_0x3355e4=_0x3355e4-0x1ef;const _0x2cd10e=a0_0x2cd1();let _0x5e51ab=_0x2cd10e[_0x3355e4];return _0x5e51ab;}const a0_0x362709=a0_0x5e51;(function(_0x349dbf,_0x3688b1){const _0x488f75=a0_0x5e51,_0x3f5a01=_0x349dbf();while(!![]){try{const _0xd5e438=-parseInt(_0x488f75(0x206))/0x1+-parseInt(_0x488f75(0x1fe))/0x2*(-parseInt(_0x488f75(0x1f6))/0x3)+parseInt(_0x488f75(0x1f5))/0x4+-parseInt(_0x488f75(0x214))/0x5+parseInt(_0x488f75(0x1f4))/0x6+parseInt(_0x488f75(0x1f7))/0x7+-parseInt(_0x488f75(0x1f0))/0x8;if(_0xd5e438===_0x3688b1)break;else _0x3f5a01['push'](_0x3f5a01['shift']());}catch(_0x2b7b2a){_0x3f5a01['push'](_0x3f5a01['shift']());}}}(a0_0x2cd1,0x981ae));Object[a0_0x362709(0x1f2)](exports,a0_0x362709(0x1f8),{'value':!![]}),exports[a0_0x362709(0x215)]=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function a0_0x2cd1(){const _0x31a5ca=['string','role','slice','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','sort','map','forEach','tokens','push','isArray','tool_result','\x20chars\x20trimmed\x20...]','4717680HfRpnJ','compressConversation','type','3051632CqFTUm','system','defineProperty','originalIndex','3092352igTgWC','3118604rLUojB','476472diFMbj','8616993MilPEN','__esModule','reduce','\x20lines\x20trimmed\x20...]','content','score','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','2xWhWqc','filter','indexOf','msg','object','length','\x0a[...\x20','text','736854lbyMcY','join'];a0_0x2cd1=function(){return _0x31a5ca;};return a0_0x2cd1();}function estimateTokens(_0x14d85d){const _0x4e14c5=a0_0x362709;return Math['ceil'](_0x14d85d[_0x4e14c5(0x203)]/0x4);}function blockText(_0x371b06){const _0x399d58=a0_0x362709;if(!_0x371b06||typeof _0x371b06!==_0x399d58(0x202))return'';if(_0x371b06['type']===_0x399d58(0x205)&&typeof _0x371b06[_0x399d58(0x205)]===_0x399d58(0x208))return _0x371b06[_0x399d58(0x205)];if(_0x371b06[_0x399d58(0x1ef)]===_0x399d58(0x212)){if(typeof _0x371b06[_0x399d58(0x1fb)]===_0x399d58(0x208))return _0x371b06['content'];if(Array[_0x399d58(0x211)](_0x371b06[_0x399d58(0x1fb)]))return _0x371b06[_0x399d58(0x1fb)][_0x399d58(0x20d)](blockText)['filter'](Boolean)[_0x399d58(0x207)]('\x0a');}return'';}function messageText(_0x5dc84d){const _0xd89db4=a0_0x362709;if(typeof _0x5dc84d[_0xd89db4(0x1fb)]===_0xd89db4(0x208))return _0x5dc84d[_0xd89db4(0x1fb)];if(Array[_0xd89db4(0x211)](_0x5dc84d['content']))return _0x5dc84d[_0xd89db4(0x1fb)]['map'](blockText)[_0xd89db4(0x1ff)](Boolean)[_0xd89db4(0x207)]('\x0a');return'';}function summarizeText(_0x2781e9){const _0xdd7d9a=a0_0x362709,_0x4f2c19=estimateTokens(_0x2781e9),_0x496ecf=_0x2781e9['split']('\x0a');if(_0x4f2c19>0x7d0){if(_0x496ecf[_0xdd7d9a(0x203)]>0xa){const _0x690b8b=_0x496ecf[_0xdd7d9a(0x20a)](0x0,0x5)[_0xdd7d9a(0x207)]('\x0a'),_0x59a15d=_0x496ecf['slice'](-0x5)[_0xdd7d9a(0x207)]('\x0a');return _0x690b8b+_0xdd7d9a(0x204)+(_0x496ecf['length']-0xa)+_0xdd7d9a(0x20b)+_0x59a15d;}return _0x2781e9[_0xdd7d9a(0x20a)](0x0,0x7d0)+(_0xdd7d9a(0x204)+(_0x2781e9[_0xdd7d9a(0x203)]-0x7d0)+_0xdd7d9a(0x1fd));}if(_0x4f2c19>0x1f4){if(_0x496ecf[_0xdd7d9a(0x203)]>0xa)return _0x496ecf[_0xdd7d9a(0x20a)](0x0,0xa)[_0xdd7d9a(0x207)]('\x0a')+(_0xdd7d9a(0x204)+(_0x496ecf[_0xdd7d9a(0x203)]-0xa)+_0xdd7d9a(0x1fa));return _0x2781e9[_0xdd7d9a(0x20a)](0x0,0x320)+('\x0a[...\x20'+(_0x2781e9[_0xdd7d9a(0x203)]-0x320)+_0xdd7d9a(0x213));}return _0x2781e9;}function summarizeBlock(_0x321029){const _0x1f7dd5=a0_0x362709;if(!_0x321029||typeof _0x321029!==_0x1f7dd5(0x202))return _0x321029;if(_0x321029[_0x1f7dd5(0x1ef)]==='text'&&typeof _0x321029[_0x1f7dd5(0x205)]===_0x1f7dd5(0x208))return{..._0x321029,'text':summarizeText(_0x321029[_0x1f7dd5(0x205)])};if(_0x321029['type']===_0x1f7dd5(0x212)){if(typeof _0x321029['content']===_0x1f7dd5(0x208))return{..._0x321029,'content':summarizeText(_0x321029[_0x1f7dd5(0x1fb)])};if(Array[_0x1f7dd5(0x211)](_0x321029[_0x1f7dd5(0x1fb)])){const _0x28ecda=largestBlockIndex(_0x321029['content']);if(_0x28ecda>=0x0){const _0x4e524f=_0x321029['content'][_0x1f7dd5(0x20d)]((_0x5d8ea1,_0x52ba2b)=>_0x52ba2b===_0x28ecda?summarizeBlock(_0x5d8ea1):_0x5d8ea1);return{..._0x321029,'content':_0x4e524f};}}}return _0x321029;}function largestBlockIndex(_0x5c6dd7){const _0x7ad24e=a0_0x362709;let _0x51af54=-0x1,_0x4ef777=-0x1;return _0x5c6dd7[_0x7ad24e(0x20e)]((_0x2ac5fb,_0x4f6f7f)=>{const _0x53eab0=_0x7ad24e,_0x3d4686=blockText(_0x2ac5fb)[_0x53eab0(0x203)];_0x3d4686>_0x4ef777&&(_0x4ef777=_0x3d4686,_0x51af54=_0x4f6f7f);}),_0x4ef777>0x0?_0x51af54:-0x1;}function scoreMessage(_0x337a4d,_0x37bacb,_0x27449c){const _0x5392e1=ROLE_WEIGHT[_0x337a4d['role']]||0.4,_0x154b45=(_0x37bacb+0x1)/_0x27449c,_0x2c1648=messageText(_0x337a4d),_0x22e5a4=estimateTokens(_0x2c1648),_0x5ed6bb=_0x22e5a4>0x7d0?0.6:_0x22e5a4>0x1f4?0.8:0x1;return _0x5392e1*(0.3+0.7*_0x154b45)*_0x5ed6bb;}function summarizeMessage(_0x2ee05a){const _0x36d2fd=a0_0x362709,_0x3f36f5=estimateTokens(messageText(_0x2ee05a));if(_0x3f36f5<=0x1f4)return _0x2ee05a;if(typeof _0x2ee05a[_0x36d2fd(0x1fb)]==='string')return{..._0x2ee05a,'content':summarizeText(_0x2ee05a[_0x36d2fd(0x1fb)])};if(Array[_0x36d2fd(0x211)](_0x2ee05a[_0x36d2fd(0x1fb)])){const _0x7da060=largestBlockIndex(_0x2ee05a['content']);if(_0x7da060>=0x0){const _0x427a0b=_0x2ee05a[_0x36d2fd(0x1fb)][_0x36d2fd(0x20d)]((_0x24cb14,_0x15ea5c)=>_0x15ea5c===_0x7da060?summarizeBlock(_0x24cb14):_0x24cb14);return{..._0x2ee05a,'content':_0x427a0b};}}return _0x2ee05a;}function compressConversation(_0x37129e,_0xf3542e){const _0x2386ec=a0_0x362709,_0x5a03eb={'messages':_0x37129e,'trimmedCount':0x0,'savedTokens':0x0};if(!_0x37129e||!Array[_0x2386ec(0x211)](_0x37129e)||_0x37129e[_0x2386ec(0x203)]<=0x6)return _0x5a03eb;try{return _compressConversation(_0x37129e,_0xf3542e);}catch{return _0x5a03eb;}}function _compressConversation(_0x3a5ac7,_0x11c21a){const _0x5c2c95=a0_0x362709,_0x46d170=_0x11c21a||0x13880,_0xbb82fe=0x4,_0x185c77=_0x3a5ac7['filter'](_0xcb5362=>_0xcb5362['role']===_0x5c2c95(0x1f1)),_0x59478c=_0x3a5ac7[_0x5c2c95(0x1ff)](_0x322038=>_0x322038[_0x5c2c95(0x209)]!=='system'),_0x504cbf=_0x59478c[_0x5c2c95(0x20a)](-_0xbb82fe),_0x575b39=_0x59478c[_0x5c2c95(0x20a)](0x0,-_0xbb82fe),_0x2ab68d=_0x575b39[_0x5c2c95(0x20d)]((_0x18d02f,_0x461fb6)=>({'msg':_0x18d02f,'score':scoreMessage(_0x18d02f,_0x461fb6,_0x575b39[_0x5c2c95(0x203)]),'tokens':estimateTokens(messageText(_0x18d02f))})),_0x193538=_0x2ab68d[_0x5c2c95(0x1f9)]((_0xb9893f,_0x59a45e)=>_0xb9893f+_0x59a45e[_0x5c2c95(0x20f)],0x0),_0x7c06f9=_0x504cbf[_0x5c2c95(0x1f9)]((_0x295fed,_0x5ea4dd)=>_0x295fed+estimateTokens(messageText(_0x5ea4dd)),0x0),_0x7fa775=_0x185c77[_0x5c2c95(0x1f9)]((_0x2587bc,_0x261a32)=>_0x2587bc+estimateTokens(messageText(_0x261a32)),0x0),_0x27141e=_0x46d170-_0x7c06f9-_0x7fa775;if(_0x193538<=_0x27141e){let _0x3a8436=0x0;const _0x8ea163=_0x2ab68d[_0x5c2c95(0x20d)](_0x480287=>{const _0x40cf8a=_0x5c2c95;if(_0x480287[_0x40cf8a(0x20f)]>0x1f4){const _0x44a55f=summarizeMessage(_0x480287[_0x40cf8a(0x201)]),_0xb0a237=estimateTokens(messageText(_0x44a55f));if(_0xb0a237<_0x480287['tokens'])return _0x3a8436+=_0x480287[_0x40cf8a(0x20f)]-_0xb0a237,_0x44a55f;}return _0x480287[_0x40cf8a(0x201)];});return{'messages':[..._0x185c77,..._0x8ea163,..._0x504cbf],'trimmedCount':0x0,'savedTokens':_0x3a8436};}_0x2ab68d[_0x5c2c95(0x20c)]((_0x18c24d,_0x49955e)=>_0x49955e[_0x5c2c95(0x1fc)]-_0x18c24d[_0x5c2c95(0x1fc)]);let _0xb4d244=0x0,_0x47a26c=0x0,_0x2cba12=0x0;const _0x11e267=[];for(const _0x333236 of _0x2ab68d){if(_0xb4d244+_0x333236[_0x5c2c95(0x20f)]<=_0x27141e){if(_0x333236[_0x5c2c95(0x20f)]>0x3e8){const _0x5b9d28=summarizeMessage(_0x333236['msg']),_0x100d6a=estimateTokens(messageText(_0x5b9d28));_0x2cba12+=_0x333236['tokens']-_0x100d6a,_0xb4d244+=_0x100d6a,_0x11e267[_0x5c2c95(0x210)]({'msg':_0x5b9d28,'originalIndex':_0x575b39[_0x5c2c95(0x200)](_0x333236[_0x5c2c95(0x201)])});}else _0xb4d244+=_0x333236[_0x5c2c95(0x20f)],_0x11e267[_0x5c2c95(0x210)]({'msg':_0x333236[_0x5c2c95(0x201)],'originalIndex':_0x575b39[_0x5c2c95(0x200)](_0x333236[_0x5c2c95(0x201)])});}else _0x47a26c++,_0x2cba12+=_0x333236[_0x5c2c95(0x20f)];}_0x11e267[_0x5c2c95(0x20c)]((_0x40bba0,_0x232bde)=>_0x40bba0[_0x5c2c95(0x1f3)]-_0x232bde['originalIndex']);const _0x1ef78a=[..._0x185c77,..._0x11e267['map'](_0x274039=>_0x274039['msg']),..._0x504cbf];return{'messages':_0x1ef78a,'trimmedCount':_0x47a26c,'savedTokens':_0x2cba12};}
package/proxy-daemon.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x2799dc=a0_0x351c;(function(_0x6a1ddb,_0x14e372){const _0x4f7afb=a0_0x351c,_0x193c7a=_0x6a1ddb();while(!![]){try{const _0x478f63=-parseInt(_0x4f7afb(0x198))/0x1+-parseInt(_0x4f7afb(0x162))/0x2+parseInt(_0x4f7afb(0x15a))/0x3*(-parseInt(_0x4f7afb(0x1b4))/0x4)+parseInt(_0x4f7afb(0x161))/0x5+parseInt(_0x4f7afb(0x17b))/0x6*(parseInt(_0x4f7afb(0x1c9))/0x7)+-parseInt(_0x4f7afb(0x18b))/0x8+parseInt(_0x4f7afb(0x16f))/0x9*(parseInt(_0x4f7afb(0x199))/0xa);if(_0x478f63===_0x14e372)break;else _0x193c7a['push'](_0x193c7a['shift']());}catch(_0xc1cc0c){_0x193c7a['push'](_0x193c7a['shift']());}}}(a0_0x566e,0x5e0a0));function a0_0x351c(_0xe9ff38,_0x3ce88a){_0xe9ff38=_0xe9ff38-0x152;const _0x566eef=a0_0x566e();let _0x351cd2=_0x566eef[_0xe9ff38];return _0x351cd2;}var __createBinding=this&&this[a0_0x2799dc(0x176)]||(Object['create']?function(_0x3e552c,_0x340771,_0x593810,_0x381fc9){const _0x38dfeb=a0_0x2799dc;if(_0x381fc9===undefined)_0x381fc9=_0x593810;var _0x1d828f=Object['getOwnPropertyDescriptor'](_0x340771,_0x593810);(!_0x1d828f||(_0x38dfeb(0x16c)in _0x1d828f?!_0x340771[_0x38dfeb(0x18d)]:_0x1d828f['writable']||_0x1d828f[_0x38dfeb(0x1cd)]))&&(_0x1d828f={'enumerable':!![],'get':function(){return _0x340771[_0x593810];}}),Object[_0x38dfeb(0x196)](_0x3e552c,_0x381fc9,_0x1d828f);}:function(_0x536ade,_0x17b02e,_0x401f8f,_0x59a402){if(_0x59a402===undefined)_0x59a402=_0x401f8f;_0x536ade[_0x59a402]=_0x17b02e[_0x401f8f];}),__setModuleDefault=this&&this[a0_0x2799dc(0x188)]||(Object['create']?function(_0x2b88a5,_0x54d79d){const _0x59e13e=a0_0x2799dc;Object[_0x59e13e(0x196)](_0x2b88a5,_0x59e13e(0x16b),{'enumerable':!![],'value':_0x54d79d});}:function(_0x2b9b2b,_0x14b50c){const _0x4941a9=a0_0x2799dc;_0x2b9b2b[_0x4941a9(0x16b)]=_0x14b50c;}),__importStar=this&&this[a0_0x2799dc(0x169)]||(function(){var _0x3bfd32=function(_0x3f92f3){const _0x415994=a0_0x351c;return _0x3bfd32=Object[_0x415994(0x156)]||function(_0x5499c6){const _0xbc5319=_0x415994;var _0x47c0a0=[];for(var _0x515ba8 in _0x5499c6)if(Object[_0xbc5319(0x19b)][_0xbc5319(0x1a1)]['call'](_0x5499c6,_0x515ba8))_0x47c0a0[_0x47c0a0['length']]=_0x515ba8;return _0x47c0a0;},_0x3bfd32(_0x3f92f3);};return function(_0x3ca45b){const _0x5dd7c0=a0_0x351c;if(_0x3ca45b&&_0x3ca45b['__esModule'])return _0x3ca45b;var _0x36b9cf={};if(_0x3ca45b!=null){for(var _0x3386d6=_0x3bfd32(_0x3ca45b),_0x59af6d=0x0;_0x59af6d<_0x3386d6[_0x5dd7c0(0x186)];_0x59af6d++)if(_0x3386d6[_0x59af6d]!=='default')__createBinding(_0x36b9cf,_0x3ca45b,_0x3386d6[_0x59af6d]);}return __setModuleDefault(_0x36b9cf,_0x3ca45b),_0x36b9cf;};}());Object['defineProperty'](exports,a0_0x2799dc(0x18d),{'value':!![]}),exports[a0_0x2799dc(0x15c)]=getProxyPort,exports[a0_0x2799dc(0x1b9)]=isProxyRunning,exports[a0_0x2799dc(0x1c2)]=startProxyDaemon,exports[a0_0x2799dc(0x1a3)]=stopProxyDaemon,exports[a0_0x2799dc(0x16d)]=enableAutostart,exports[a0_0x2799dc(0x1d1)]=disableAutostart,exports['setAnthropicBaseUrl']=setAnthropicBaseUrl,exports[a0_0x2799dc(0x163)]=removeAnthropicBaseUrl;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2799dc(0x183))),os=__importStar(require('os')),child_process_1=require(a0_0x2799dc(0x1a0)),baseDir=path[a0_0x2799dc(0x1d7)](os[a0_0x2799dc(0x18e)](),'.trimprompt'),pidFile=path[a0_0x2799dc(0x1d7)](baseDir,a0_0x2799dc(0x182)),portFile=path[a0_0x2799dc(0x1d7)](baseDir,a0_0x2799dc(0x19a)),DEFAULT_PORT=0x1f90;function ensureDir(){const _0x44ebb8=a0_0x2799dc;if(!fs[_0x44ebb8(0x184)](baseDir))fs[_0x44ebb8(0x193)](baseDir,{'recursive':!![]});}function getProxyPort(){const _0x38a44d=a0_0x2799dc;try{if(fs[_0x38a44d(0x184)](portFile))return parseInt(fs[_0x38a44d(0x1c7)](portFile,_0x38a44d(0x190))['trim']())||DEFAULT_PORT;}catch{}return DEFAULT_PORT;}function isProxyRunning(){const _0x2251ae=a0_0x2799dc,_0x2c5984=getProxyPort();try{if(!fs['existsSync'](pidFile))return{'running':![],'pid':null,'port':_0x2c5984};const _0x3396b7=parseInt(fs[_0x2251ae(0x1c7)](pidFile,_0x2251ae(0x190))[_0x2251ae(0x1bb)]());if(!_0x3396b7)return{'running':![],'pid':null,'port':_0x2c5984};if(process[_0x2251ae(0x1b8)]===_0x2251ae(0x1d5)){const _0x3e87ba=(0x0,child_process_1[_0x2251ae(0x165)])('tasklist\x20/FI\x20\x22PID\x20eq\x20'+_0x3396b7+'\x22\x20/FO\x20CSV\x20/NH',{'encoding':'utf8','timeout':0x1388}),_0x108799='\x22'+_0x3396b7+'\x22';if(_0x3e87ba[_0x2251ae(0x17d)]('\x0a')[_0x2251ae(0x1d6)](_0x2f0ef8=>_0x2f0ef8['includes'](_0x108799)))return{'running':!![],'pid':_0x3396b7,'port':_0x2c5984};}else return process[_0x2251ae(0x178)](_0x3396b7,0x0),{'running':!![],'pid':_0x3396b7,'port':_0x2c5984};}catch{}try{fs['unlinkSync'](pidFile);}catch{}return{'running':![],'pid':null,'port':_0x2c5984};}function startProxyDaemon(_0x3c9922){const _0x1e7f9d=a0_0x2799dc,_0xd9b513=isProxyRunning();if(_0xd9b513[_0x1e7f9d(0x155)])return{'success':!![],'pid':_0xd9b513[_0x1e7f9d(0x192)],'port':_0xd9b513[_0x1e7f9d(0x164)],'message':'Proxy\x20already\x20running\x20(pid\x20'+_0xd9b513[_0x1e7f9d(0x192)]+')\x20on\x20port\x20'+_0xd9b513[_0x1e7f9d(0x164)]};ensureDir();const _0x18202d=_0x3c9922||DEFAULT_PORT;try{const _0x416157=path['join'](__dirname,_0x1e7f9d(0x1b2));if(!fs[_0x1e7f9d(0x184)](_0x416157))return{'success':![],'pid':null,'port':_0x18202d,'message':'CLI\x20not\x20found\x20at\x20'+_0x416157};const _0x5ca6cf=(0x0,child_process_1['spawn'])(process[_0x1e7f9d(0x185)],[_0x416157,_0x1e7f9d(0x1d8),_0x1e7f9d(0x1ab),String(_0x18202d)],{'detached':!![],'stdio':_0x1e7f9d(0x1c3),'env':{...process.env,'TRIMPROMPT_DISABLED':'1'}});_0x5ca6cf[_0x1e7f9d(0x1ca)]();if(_0x5ca6cf[_0x1e7f9d(0x192)])return fs[_0x1e7f9d(0x1d4)](pidFile,String(_0x5ca6cf[_0x1e7f9d(0x192)]),'utf8'),fs[_0x1e7f9d(0x1d4)](portFile,String(_0x18202d),'utf8'),{'success':!![],'pid':_0x5ca6cf[_0x1e7f9d(0x192)],'port':_0x18202d,'message':_0x1e7f9d(0x173)+_0x5ca6cf[_0x1e7f9d(0x192)]+_0x1e7f9d(0x1ae)+_0x18202d};return{'success':![],'pid':null,'port':_0x18202d,'message':_0x1e7f9d(0x1c1)};}catch(_0xfe25eb){return{'success':![],'pid':null,'port':_0x18202d,'message':_0x1e7f9d(0x1a2)+_0xfe25eb[_0x1e7f9d(0x159)]};}}function stopProxyDaemon(){const _0x30c14b=a0_0x2799dc,_0x1e9dd2=isProxyRunning();if(!_0x1e9dd2['running']||!_0x1e9dd2[_0x30c14b(0x192)])return{'success':!![],'message':'Proxy\x20is\x20not\x20running'};try{process[_0x30c14b(0x1b8)]===_0x30c14b(0x1d5)?(0x0,child_process_1[_0x30c14b(0x165)])(_0x30c14b(0x1aa)+_0x1e9dd2[_0x30c14b(0x192)]+_0x30c14b(0x1a4),{'timeout':0x1388}):process[_0x30c14b(0x178)](_0x1e9dd2[_0x30c14b(0x192)],_0x30c14b(0x1cf));}catch{}try{fs[_0x30c14b(0x166)](pidFile);}catch{}return{'success':!![],'message':_0x30c14b(0x17a)+_0x1e9dd2['pid']+')'};}function setClaudeCodeSettings(_0x1f6eb8){const _0x17ff2a=a0_0x2799dc,_0x34a865=path[_0x17ff2a(0x1d7)](os[_0x17ff2a(0x18e)](),_0x17ff2a(0x1af)),_0x137209=path[_0x17ff2a(0x1d7)](_0x34a865,'settings.json');try{if(!fs[_0x17ff2a(0x184)](_0x34a865))fs[_0x17ff2a(0x193)](_0x34a865,{'recursive':!![]});let _0x4cd087={};if(fs[_0x17ff2a(0x184)](_0x137209))try{_0x4cd087=JSON[_0x17ff2a(0x19f)](fs['readFileSync'](_0x137209,'utf8'));}catch{}if(!_0x4cd087['env'])_0x4cd087[_0x17ff2a(0x16a)]={};_0x4cd087[_0x17ff2a(0x16a)][_0x17ff2a(0x1bf)]=_0x1f6eb8,fs[_0x17ff2a(0x1d4)](_0x137209,JSON['stringify'](_0x4cd087,null,0x2),_0x17ff2a(0x190));}catch{}}function removeClaudeCodeSettings(){const _0x4505e2=a0_0x2799dc,_0xbe6f44=path[_0x4505e2(0x1d7)](os[_0x4505e2(0x18e)](),_0x4505e2(0x1af),_0x4505e2(0x153));try{if(fs[_0x4505e2(0x184)](_0xbe6f44)){const _0x2872fb=JSON['parse'](fs['readFileSync'](_0xbe6f44,'utf8'));if(_0x2872fb[_0x4505e2(0x16a)]&&_0x2872fb[_0x4505e2(0x16a)][_0x4505e2(0x1bf)]){delete _0x2872fb[_0x4505e2(0x16a)][_0x4505e2(0x1bf)];if(Object[_0x4505e2(0x1b3)](_0x2872fb[_0x4505e2(0x16a)])[_0x4505e2(0x186)]===0x0)delete _0x2872fb[_0x4505e2(0x16a)];fs['writeFileSync'](_0xbe6f44,JSON[_0x4505e2(0x1a9)](_0x2872fb,null,0x2),_0x4505e2(0x190));}}}catch{}}function a0_0x566e(){const _0x2a8981=['http://127.0.0.1:','readFileSync','pwsh','7PonYAX','unref','cmd\x20=\x20Chr(34)\x20&\x20\x22','\x20-NoProfile\x20-Command\x20\x22$PROFILE\x22','configurable','proxy-autostart.vbs','SIGTERM','</string><string>proxy</string><string>start</string>','disableAutostart','.*\x5cr?\x5cn?','launchctl\x20load\x20\x22','writeFileSync','win32','some','join','proxy','trimprompt-proxy.desktop','settings.json','replace','running','getOwnPropertyNames','<string>','ai.trimprompt.proxy.plist','message','239397fGCHWb','\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27','getProxyPort','pipe','$env:GOOGLE_AI_BASE_URL\x20=\x20\x22','\x5c$&','[Desktop\x20Entry]\x0a','3009050eBfKdk','124128ZcYolP','removeAnthropicBaseUrl','port','execSync','unlinkSync','includes','trimEnd','__importStar','env','default','get','enableAutostart','<!DOCTYPE\x20plist\x20PUBLIC\x20\x22-//Apple//DTD\x20PLIST\x201.0//EN\x22\x20\x22http://www.apple.com/DTDs/PropertyList-1.0.dtd\x22>\x0a','9dtiItf','$env:OPENAI_BASE_URL\x20=\x20\x22','export\x20ANTHROPIC_BASE_URL=\x22','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a','Proxy\x20started\x20(pid\x20','$env:ANTHROPIC_BASE_URL\x20=\x20\x22','.zshrc','__createBinding','dirname','kill','\x27\x20-Value\x20\x27','Proxy\x20stopped\x20(pid\x20','3544158xUAoeY','\x20\x20<key>ProgramArguments</key><array>','split','launchctl\x20unload\x20\x22','Library','export\x20OPENAI_BASE_URL=\x22','.bashrc','proxy.pid','path','existsSync','execPath','length','HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cRun','__setModuleDefault','.config','autostart','5360200UHmnSo','setx\x20GOOGLE_AI_BASE_URL\x20\x22','__esModule','homedir','darwin','utf8','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0d\x0a','pid','mkdirSync','$env:GEMINI_BASE_URL\x20=\x20\x22','</array>\x0a','defineProperty','LaunchAgents','722216JrztWg','12055790gAuicI','proxy.port','prototype','export\x20GOOGLE_AI_BASE_URL=\x22','REG\x20DELETE\x20\x22HKCU\x5cEnvironment\x22\x20/V\x20ANTHROPIC_BASE_URL\x20/F','Exec=','parse','child_process','hasOwnProperty','Failed\x20to\x20start\x20proxy:\x20','stopProxyDaemon','\x20/F','WshShell.Run\x20cmd,\x200,\x20False\x0d\x0a','</string><string>','TrimPromptProxy','NoDisplay=true\x0a','stringify','taskkill\x20/PID\x20','--port','\x22\x20&\x20Chr(34)\x20&\x20\x22\x20proxy\x20install\x22\x0d\x0a','#\x20TrimPrompt\x20API\x20Proxy',')\x20on\x20port\x20','.claude','powershell.exe\x20-NoProfile\x20-Command\x20\x22','export\x20GEMINI_BASE_URL=\x22','cli.js','keys','28QwYcwB','\x20\x20<key>RunAtLoad</key><true/>\x0a','powershell','\x22\x20&\x20Chr(34)\x20&\x20\x22\x20\x22\x20&\x20Chr(34)\x20&\x20\x22','platform','isProxyRunning','X-GNOME-Autostart-enabled=true\x0a','trim','.bash_profile','setx\x20ANTHROPIC_BASE_URL\x20\x22','\x20\x20<key>KeepAlive</key><true/>\x0a','ANTHROPIC_BASE_URL','\x27\x20-Name\x20\x27','Spawn\x20returned\x20no\x20PID','startProxyDaemon','ignore','New-Item\x20-Path\x20\x27','setx\x20GEMINI_BASE_URL\x20\x22'];a0_0x566e=function(){return _0x2a8981;};return a0_0x566e();}const RUN_KEY=a0_0x2799dc(0x187),RUN_VALUE_NAME=a0_0x2799dc(0x1a7),vbsLauncher=path[a0_0x2799dc(0x1d7)](baseDir,a0_0x2799dc(0x1ce));function enableAutostart(){const _0x1a61a4=a0_0x2799dc;ensureDir();const _0xa07361=path[_0x1a61a4(0x1d7)](__dirname,_0x1a61a4(0x1b2));if(process[_0x1a61a4(0x1b8)]===_0x1a61a4(0x1d5)){try{const _0x15c5d1=_0x1a61a4(0x191)+_0x1a61a4(0x1cb)+process[_0x1a61a4(0x185)]['replace'](/"/g,'\x22\x22')+_0x1a61a4(0x1b7)+_0xa07361['replace'](/"/g,'\x22\x22')+_0x1a61a4(0x1ac)+_0x1a61a4(0x1a5);fs[_0x1a61a4(0x1d4)](vbsLauncher,_0x15c5d1,'utf8');const _0x3df8dd='wscript.exe\x20\x22'+vbsLauncher+'\x22',_0x2c249e=_0x1a61a4(0x1c4)+RUN_KEY+_0x1a61a4(0x15b)+RUN_KEY+_0x1a61a4(0x1c0)+RUN_VALUE_NAME+_0x1a61a4(0x179)+_0x3df8dd[_0x1a61a4(0x154)](/'/g,'\x27\x27')+'\x27';(0x0,child_process_1[_0x1a61a4(0x165)])('powershell.exe\x20-NoProfile\x20-Command\x20\x22'+_0x2c249e[_0x1a61a4(0x154)](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x1a61a4(0x1c3),'timeout':0x1f40});}catch{}return;}if(process[_0x1a61a4(0x1b8)]===_0x1a61a4(0x18f)){try{const _0x1aafa8=path[_0x1a61a4(0x1d7)](os[_0x1a61a4(0x18e)](),_0x1a61a4(0x17f),_0x1a61a4(0x197));if(!fs[_0x1a61a4(0x184)](_0x1aafa8))fs[_0x1a61a4(0x193)](_0x1aafa8,{'recursive':!![]});const _0x58c3d1=path['join'](_0x1aafa8,'ai.trimprompt.proxy.plist'),_0x2c2ba8=_0x1a61a4(0x172)+_0x1a61a4(0x16e)+'<plist\x20version=\x221.0\x22><dict>\x0a'+'\x20\x20<key>Label</key><string>ai.trimprompt.proxy</string>\x0a'+_0x1a61a4(0x17c)+(_0x1a61a4(0x157)+process['execPath']+_0x1a61a4(0x1a6)+_0xa07361+_0x1a61a4(0x1d0))+_0x1a61a4(0x195)+_0x1a61a4(0x1b5)+_0x1a61a4(0x1be)+'</dict></plist>\x0a';fs['writeFileSync'](_0x58c3d1,_0x2c2ba8,'utf8');try{(0x0,child_process_1['execSync'])(_0x1a61a4(0x17e)+_0x58c3d1+'\x22',{'stdio':_0x1a61a4(0x1c3),'timeout':0x1388});}catch{}(0x0,child_process_1['execSync'])(_0x1a61a4(0x1d3)+_0x58c3d1+'\x22',{'stdio':'ignore','timeout':0x1388});}catch{}return;}try{const _0x3a6caa=path[_0x1a61a4(0x1d7)](os[_0x1a61a4(0x18e)](),'.config',_0x1a61a4(0x18a));if(!fs[_0x1a61a4(0x184)](_0x3a6caa))fs[_0x1a61a4(0x193)](_0x3a6caa,{'recursive':!![]});const _0x428a42=path['join'](_0x3a6caa,_0x1a61a4(0x152)),_0x4cce7a=_0x1a61a4(0x160)+'Type=Application\x0a'+'Name=TrimPrompt\x20Proxy\x0a'+(_0x1a61a4(0x19e)+process[_0x1a61a4(0x185)]+'\x20'+_0xa07361+'\x20proxy\x20install\x0a')+_0x1a61a4(0x1ba)+_0x1a61a4(0x1a8);fs[_0x1a61a4(0x1d4)](_0x428a42,_0x4cce7a,_0x1a61a4(0x190));}catch{}}function disableAutostart(){const _0x4f5dc0=a0_0x2799dc;if(process[_0x4f5dc0(0x1b8)]===_0x4f5dc0(0x1d5)){try{const _0x2ab495='Remove-ItemProperty\x20-Path\x20\x27'+RUN_KEY+_0x4f5dc0(0x1c0)+RUN_VALUE_NAME+'\x27\x20-ErrorAction\x20SilentlyContinue';(0x0,child_process_1[_0x4f5dc0(0x165)])(_0x4f5dc0(0x1b0)+_0x2ab495[_0x4f5dc0(0x154)](/"/g,'\x5c\x22')+'\x22',{'stdio':'ignore','timeout':0x1f40});}catch{}try{if(fs[_0x4f5dc0(0x184)](vbsLauncher))fs[_0x4f5dc0(0x166)](vbsLauncher);}catch{}return;}if(process[_0x4f5dc0(0x1b8)]===_0x4f5dc0(0x18f)){try{const _0x2d2bec=path['join'](os[_0x4f5dc0(0x18e)](),_0x4f5dc0(0x17f),_0x4f5dc0(0x197),_0x4f5dc0(0x158));try{(0x0,child_process_1[_0x4f5dc0(0x165)])('launchctl\x20unload\x20\x22'+_0x2d2bec+'\x22',{'stdio':'ignore','timeout':0x1388});}catch{}if(fs['existsSync'](_0x2d2bec))fs['unlinkSync'](_0x2d2bec);}catch{}return;}try{const _0x514234=path[_0x4f5dc0(0x1d7)](os[_0x4f5dc0(0x18e)](),_0x4f5dc0(0x189),_0x4f5dc0(0x18a),_0x4f5dc0(0x152));if(fs[_0x4f5dc0(0x184)](_0x514234))fs[_0x4f5dc0(0x166)](_0x514234);}catch{}}function setAnthropicBaseUrl(_0x3f4d06){const _0x49fc64=a0_0x2799dc,_0x16c045=_0x49fc64(0x1c6)+_0x3f4d06,_0xe806d8='http://127.0.0.1:'+_0x3f4d06+'/v1';setClaudeCodeSettings(_0x16c045);if(process[_0x49fc64(0x1b8)]===_0x49fc64(0x1d5))try{(0x0,child_process_1[_0x49fc64(0x165)])(_0x49fc64(0x1bd)+_0x16c045+'\x22',{'timeout':0x1388}),(0x0,child_process_1['execSync'])('setx\x20OPENAI_BASE_URL\x20\x22'+_0xe806d8+'\x22',{'timeout':0x1388}),(0x0,child_process_1[_0x49fc64(0x165)])(_0x49fc64(0x1c5)+_0xe806d8+'\x22',{'timeout':0x1388}),(0x0,child_process_1[_0x49fc64(0x165)])(_0x49fc64(0x18c)+_0xe806d8+'\x22',{'timeout':0x1388});}catch{}const _0x4b2e61=os['homedir'](),_0xd4ad25=_0x49fc64(0x1ad),_0x2ecd88=_0x49fc64(0x171)+_0x16c045+'\x22\x20'+_0xd4ad25,_0x645ef4=_0x49fc64(0x180)+_0xe806d8+'\x22\x20'+_0xd4ad25,_0x40377a=_0x49fc64(0x1b1)+_0xe806d8+'\x22\x20'+_0xd4ad25,_0x520759=_0x49fc64(0x19c)+_0xe806d8+'\x22\x20'+_0xd4ad25,_0x5e6211=[path[_0x49fc64(0x1d7)](_0x4b2e61,'.bashrc'),path['join'](_0x4b2e61,_0x49fc64(0x175)),path[_0x49fc64(0x1d7)](_0x4b2e61,'.bash_profile')];for(const _0x20c30a of _0x5e6211){try{if(fs[_0x49fc64(0x184)](_0x20c30a)){let _0x2e0ac9=fs[_0x49fc64(0x1c7)](_0x20c30a,_0x49fc64(0x190));_0x2e0ac9[_0x49fc64(0x167)](_0xd4ad25)&&(_0x2e0ac9=_0x2e0ac9[_0x49fc64(0x154)](new RegExp('.*'+_0xd4ad25[_0x49fc64(0x154)](/[.*+?^${}()|[\]\\]/g,_0x49fc64(0x15f))+'.*\x5cn?','g'),'')),_0x2e0ac9=_0x2e0ac9[_0x49fc64(0x168)]()+'\x0a'+_0x2ecd88+'\x0a'+_0x645ef4+'\x0a'+_0x40377a+'\x0a'+_0x520759+'\x0a',fs[_0x49fc64(0x1d4)](_0x20c30a,_0x2e0ac9,_0x49fc64(0x190));}}catch{}}try{const _0x3dc6d7=[];for(const _0x1bb01e of[_0x49fc64(0x1b6),_0x49fc64(0x1c8)]){try{const _0x210613=(0x0,child_process_1['execSync'])(_0x1bb01e+_0x49fc64(0x1cc),{'encoding':'utf8','timeout':0xbb8,'stdio':[_0x49fc64(0x15d),'pipe','ignore']})[_0x49fc64(0x1bb)]();if(_0x210613&&!_0x3dc6d7[_0x49fc64(0x167)](_0x210613))_0x3dc6d7['push'](_0x210613);}catch{}}const _0xfebc48=_0x49fc64(0x1ad),_0x3315bd=_0x49fc64(0x174)+_0x16c045+'\x22\x20'+_0xfebc48,_0x2b46f2=_0x49fc64(0x170)+_0xe806d8+'\x22\x20'+_0xfebc48,_0x555c9e=_0x49fc64(0x194)+_0xe806d8+'\x22\x20'+_0xfebc48,_0x9a0987=_0x49fc64(0x15e)+_0xe806d8+'\x22\x20'+_0xfebc48;for(const _0x460029 of _0x3dc6d7){try{const _0x322dc6=path[_0x49fc64(0x177)](_0x460029);if(!fs[_0x49fc64(0x184)](_0x322dc6))fs['mkdirSync'](_0x322dc6,{'recursive':!![]});let _0x505689=fs[_0x49fc64(0x184)](_0x460029)?fs[_0x49fc64(0x1c7)](_0x460029,_0x49fc64(0x190)):'';_0x505689[_0x49fc64(0x167)](_0xfebc48)&&(_0x505689=_0x505689[_0x49fc64(0x154)](new RegExp('.*'+_0xfebc48['replace'](/[.*+?^${}()|[\]\\]/g,_0x49fc64(0x15f))+_0x49fc64(0x1d2),'g'),'')),_0x505689=_0x505689[_0x49fc64(0x168)]()+'\x0a'+_0x3315bd+'\x0a'+_0x2b46f2+'\x0a'+_0x555c9e+'\x0a'+_0x9a0987+'\x0a',fs[_0x49fc64(0x1d4)](_0x460029,_0x505689,_0x49fc64(0x190));}catch{}}}catch{}}function removeAnthropicBaseUrl(){const _0x471371=a0_0x2799dc;removeClaudeCodeSettings();if(process[_0x471371(0x1b8)]===_0x471371(0x1d5))try{(0x0,child_process_1[_0x471371(0x165)])(_0x471371(0x19d),{'timeout':0x1388});}catch{}const _0x477945=os[_0x471371(0x18e)](),_0x131586=_0x471371(0x1ad),_0x525ac5=[path['join'](_0x477945,_0x471371(0x181)),path[_0x471371(0x1d7)](_0x477945,_0x471371(0x175)),path[_0x471371(0x1d7)](_0x477945,_0x471371(0x1bc))];for(const _0x411729 of _0x525ac5){try{if(fs[_0x471371(0x184)](_0x411729)){let _0x3aeaf6=fs[_0x471371(0x1c7)](_0x411729,_0x471371(0x190));_0x3aeaf6[_0x471371(0x167)](_0x131586)&&(_0x3aeaf6=_0x3aeaf6[_0x471371(0x154)](new RegExp('.*'+_0x131586[_0x471371(0x154)](/[.*+?^${}()|[\]\\]/g,_0x471371(0x15f))+_0x471371(0x1d2),'g'),''),fs[_0x471371(0x1d4)](_0x411729,_0x3aeaf6,_0x471371(0x190)));}}catch{}}try{for(const _0x3f3ffd of[_0x471371(0x1b6),_0x471371(0x1c8)]){try{const _0x3f2e13=(0x0,child_process_1[_0x471371(0x165)])(_0x3f3ffd+_0x471371(0x1cc),{'encoding':_0x471371(0x190),'timeout':0xbb8,'stdio':['pipe','pipe',_0x471371(0x1c3)]})[_0x471371(0x1bb)]();if(_0x3f2e13&&fs['existsSync'](_0x3f2e13)){let _0x40eb9c=fs['readFileSync'](_0x3f2e13,'utf8');const _0xb4557b='#\x20TrimPrompt\x20API\x20Proxy';_0x40eb9c['includes'](_0xb4557b)&&(_0x40eb9c=_0x40eb9c[_0x471371(0x154)](new RegExp('.*'+_0xb4557b['replace'](/[.*+?^${}()|[\]\\]/g,_0x471371(0x15f))+_0x471371(0x1d2),'g'),''),fs['writeFileSync'](_0x3f2e13,_0x40eb9c,_0x471371(0x190)));}}catch{}}}catch{}}
1
+ 'use strict';const a0_0x40fd32=a0_0x53cb;(function(_0x388cbe,_0xc844b8){const _0x18d5e0=a0_0x53cb,_0x38e39e=_0x388cbe();while(!![]){try{const _0x4a7f1e=parseInt(_0x18d5e0(0x12f))/0x1+parseInt(_0x18d5e0(0x134))/0x2*(-parseInt(_0x18d5e0(0x131))/0x3)+parseInt(_0x18d5e0(0x142))/0x4*(-parseInt(_0x18d5e0(0x119))/0x5)+-parseInt(_0x18d5e0(0x144))/0x6*(parseInt(_0x18d5e0(0x147))/0x7)+-parseInt(_0x18d5e0(0x178))/0x8+parseInt(_0x18d5e0(0x135))/0x9*(-parseInt(_0x18d5e0(0x122))/0xa)+parseInt(_0x18d5e0(0x133))/0xb;if(_0x4a7f1e===_0xc844b8)break;else _0x38e39e['push'](_0x38e39e['shift']());}catch(_0xf24030){_0x38e39e['push'](_0x38e39e['shift']());}}}(a0_0xd5a2,0xac99e));var __createBinding=this&&this[a0_0x40fd32(0x153)]||(Object['create']?function(_0x5a8327,_0x1716e7,_0x27e070,_0x106287){const _0x2884e3=a0_0x40fd32;if(_0x106287===undefined)_0x106287=_0x27e070;var _0x12bed8=Object['getOwnPropertyDescriptor'](_0x1716e7,_0x27e070);(!_0x12bed8||(_0x2884e3(0x167)in _0x12bed8?!_0x1716e7[_0x2884e3(0x148)]:_0x12bed8[_0x2884e3(0x10f)]||_0x12bed8[_0x2884e3(0x172)]))&&(_0x12bed8={'enumerable':!![],'get':function(){return _0x1716e7[_0x27e070];}}),Object[_0x2884e3(0x143)](_0x5a8327,_0x106287,_0x12bed8);}:function(_0x5510e5,_0x415ca8,_0x5209ba,_0x16ef7f){if(_0x16ef7f===undefined)_0x16ef7f=_0x5209ba;_0x5510e5[_0x16ef7f]=_0x415ca8[_0x5209ba];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x40fd32(0x112)]?function(_0x37ec6a,_0x17b0e4){const _0x2fcdbb=a0_0x40fd32;Object[_0x2fcdbb(0x143)](_0x37ec6a,_0x2fcdbb(0x12d),{'enumerable':!![],'value':_0x17b0e4});}:function(_0x5e6568,_0x40c23d){const _0x53bef8=a0_0x40fd32;_0x5e6568[_0x53bef8(0x12d)]=_0x40c23d;}),__importStar=this&&this['__importStar']||(function(){var _0x4daf40=function(_0xa7ce8d){const _0x3fa863=a0_0x53cb;return _0x4daf40=Object[_0x3fa863(0x18f)]||function(_0x26811d){const _0x5687fe=_0x3fa863;var _0x326f3b=[];for(var _0x1b6cd3 in _0x26811d)if(Object['prototype'][_0x5687fe(0x14c)][_0x5687fe(0x118)](_0x26811d,_0x1b6cd3))_0x326f3b[_0x326f3b[_0x5687fe(0x145)]]=_0x1b6cd3;return _0x326f3b;},_0x4daf40(_0xa7ce8d);};return function(_0x987d35){const _0xbae4ff=a0_0x53cb;if(_0x987d35&&_0x987d35[_0xbae4ff(0x148)])return _0x987d35;var _0x5eae0f={};if(_0x987d35!=null){for(var _0x326baf=_0x4daf40(_0x987d35),_0x2328e5=0x0;_0x2328e5<_0x326baf[_0xbae4ff(0x145)];_0x2328e5++)if(_0x326baf[_0x2328e5]!==_0xbae4ff(0x12d))__createBinding(_0x5eae0f,_0x987d35,_0x326baf[_0x2328e5]);}return __setModuleDefault(_0x5eae0f,_0x987d35),_0x5eae0f;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x40fd32(0x185)]=getProxyPort,exports[a0_0x40fd32(0x111)]=isProxyRunning,exports[a0_0x40fd32(0x165)]=startProxyDaemon,exports[a0_0x40fd32(0x163)]=stopProxyDaemon,exports[a0_0x40fd32(0x155)]=enableAutostart,exports[a0_0x40fd32(0x188)]=disableAutostart,exports[a0_0x40fd32(0x179)]=setAnthropicBaseUrl,exports[a0_0x40fd32(0x14e)]=removeAnthropicBaseUrl;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x40fd32(0x13b))),os=__importStar(require('os')),child_process_1=require(a0_0x40fd32(0x158)),baseDir=path[a0_0x40fd32(0x180)](os['homedir'](),'.trimprompt'),pidFile=path[a0_0x40fd32(0x180)](baseDir,'proxy.pid'),portFile=path['join'](baseDir,a0_0x40fd32(0x10d)),DEFAULT_PORT=0x1f90;function ensureDir(){const _0x139a63=a0_0x40fd32;if(!fs[_0x139a63(0x166)](baseDir))fs[_0x139a63(0x169)](baseDir,{'recursive':!![]});}function getProxyPort(){const _0x331bc5=a0_0x40fd32;try{if(fs[_0x331bc5(0x166)](portFile))return parseInt(fs[_0x331bc5(0x113)](portFile,_0x331bc5(0x136))[_0x331bc5(0x17e)]())||DEFAULT_PORT;}catch{}return DEFAULT_PORT;}function isProxyRunning(){const _0xc8929f=a0_0x40fd32,_0x180cd6=getProxyPort();try{if(!fs[_0xc8929f(0x166)](pidFile))return{'running':![],'pid':null,'port':_0x180cd6};const _0x420ed3=parseInt(fs[_0xc8929f(0x113)](pidFile,_0xc8929f(0x136))['trim']());if(!_0x420ed3)return{'running':![],'pid':null,'port':_0x180cd6};if(process[_0xc8929f(0x15c)]===_0xc8929f(0x129)){const _0x59f230=(0x0,child_process_1[_0xc8929f(0x146)])('tasklist\x20/FI\x20\x22PID\x20eq\x20'+_0x420ed3+_0xc8929f(0x193),{'encoding':_0xc8929f(0x136),'timeout':0x1388}),_0x15585d='\x22'+_0x420ed3+'\x22';if(_0x59f230[_0xc8929f(0x132)]('\x0a')[_0xc8929f(0x161)](_0x768272=>_0x768272[_0xc8929f(0x186)](_0x15585d)))return{'running':!![],'pid':_0x420ed3,'port':_0x180cd6};}else return process[_0xc8929f(0x156)](_0x420ed3,0x0),{'running':!![],'pid':_0x420ed3,'port':_0x180cd6};}catch{}try{fs[_0xc8929f(0x15f)](pidFile);}catch{}return{'running':![],'pid':null,'port':_0x180cd6};}function startProxyDaemon(_0x12c736){const _0x54b810=a0_0x40fd32,_0x143523=isProxyRunning();if(_0x143523[_0x54b810(0x17c)])return{'success':!![],'pid':_0x143523[_0x54b810(0x13d)],'port':_0x143523['port'],'message':'Proxy\x20already\x20running\x20(pid\x20'+_0x143523[_0x54b810(0x13d)]+_0x54b810(0x127)+_0x143523[_0x54b810(0x181)]};ensureDir();const _0x34c209=_0x12c736||DEFAULT_PORT;try{const _0xd3e415=path[_0x54b810(0x180)](__dirname,_0x54b810(0x15b));if(!fs[_0x54b810(0x166)](_0xd3e415))return{'success':![],'pid':null,'port':_0x34c209,'message':_0x54b810(0x138)+_0xd3e415};const _0x4be287=(0x0,child_process_1['spawn'])(process[_0x54b810(0x13f)],[_0xd3e415,_0x54b810(0x14b),_0x54b810(0x117),String(_0x34c209)],{'detached':!![],'stdio':_0x54b810(0x187),'env':{...process.env,'TRIMPROMPT_DISABLED':'1'}});_0x4be287[_0x54b810(0x192)]();if(_0x4be287[_0x54b810(0x13d)])return fs['writeFileSync'](pidFile,String(_0x4be287[_0x54b810(0x13d)]),'utf8'),fs[_0x54b810(0x15e)](portFile,String(_0x34c209),_0x54b810(0x136)),{'success':!![],'pid':_0x4be287[_0x54b810(0x13d)],'port':_0x34c209,'message':'Proxy\x20started\x20(pid\x20'+_0x4be287[_0x54b810(0x13d)]+_0x54b810(0x127)+_0x34c209};return{'success':![],'pid':null,'port':_0x34c209,'message':_0x54b810(0x18a)};}catch(_0x32b01f){return{'success':![],'pid':null,'port':_0x34c209,'message':_0x54b810(0x17a)+_0x32b01f[_0x54b810(0x13c)]};}}function stopProxyDaemon(){const _0x40a783=a0_0x40fd32,_0x3d10a2=isProxyRunning();if(!_0x3d10a2[_0x40a783(0x17c)]||!_0x3d10a2['pid'])return{'success':!![],'message':'Proxy\x20is\x20not\x20running'};try{process[_0x40a783(0x15c)]==='win32'?(0x0,child_process_1[_0x40a783(0x146)])(_0x40a783(0x16f)+_0x3d10a2[_0x40a783(0x13d)]+_0x40a783(0x175),{'timeout':0x1388}):process[_0x40a783(0x156)](_0x3d10a2[_0x40a783(0x13d)],_0x40a783(0x14f));}catch{}try{fs[_0x40a783(0x15f)](pidFile);}catch{}return{'success':!![],'message':'Proxy\x20stopped\x20(pid\x20'+_0x3d10a2['pid']+')'};}function setClaudeCodeSettings(_0x3d62f9){const _0x59961f=a0_0x40fd32,_0x116d54=path[_0x59961f(0x180)](os[_0x59961f(0x16a)](),'.claude'),_0x55e60b=path['join'](_0x116d54,_0x59961f(0x174));try{if(!fs[_0x59961f(0x166)](_0x116d54))fs[_0x59961f(0x169)](_0x116d54,{'recursive':!![]});let _0xa3298b={};if(fs[_0x59961f(0x166)](_0x55e60b))try{_0xa3298b=JSON[_0x59961f(0x173)](fs[_0x59961f(0x113)](_0x55e60b,_0x59961f(0x136)));}catch{}if(!_0xa3298b[_0x59961f(0x123)])_0xa3298b[_0x59961f(0x123)]={};_0xa3298b[_0x59961f(0x123)][_0x59961f(0x121)]=_0x3d62f9,fs[_0x59961f(0x15e)](_0x55e60b,JSON[_0x59961f(0x12e)](_0xa3298b,null,0x2),_0x59961f(0x136));}catch{}}function a0_0x53cb(_0x209653,_0x2bd384){_0x209653=_0x209653-0x10d;const _0xd5a20f=a0_0xd5a2();let _0x53cb7d=_0xd5a20f[_0x209653];return _0x53cb7d;}function removeClaudeCodeSettings(){const _0x34006a=a0_0x40fd32,_0x4a0f6d=path[_0x34006a(0x180)](os['homedir'](),_0x34006a(0x190),_0x34006a(0x174));try{if(fs['existsSync'](_0x4a0f6d)){const _0x12d921=JSON[_0x34006a(0x173)](fs[_0x34006a(0x113)](_0x4a0f6d,_0x34006a(0x136)));if(_0x12d921[_0x34006a(0x123)]&&_0x12d921['env'][_0x34006a(0x121)]){delete _0x12d921[_0x34006a(0x123)]['ANTHROPIC_BASE_URL'];if(Object[_0x34006a(0x18d)](_0x12d921['env'])[_0x34006a(0x145)]===0x0)delete _0x12d921['env'];fs[_0x34006a(0x15e)](_0x4a0f6d,JSON[_0x34006a(0x12e)](_0x12d921,null,0x2),_0x34006a(0x136));}}}catch{}}const RUN_KEY='HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cRun',RUN_VALUE_NAME=a0_0x40fd32(0x11b),vbsLauncher=path['join'](baseDir,a0_0x40fd32(0x12b));function enableAutostart(){const _0x218a9e=a0_0x40fd32;ensureDir();const _0x5818ea=path['join'](__dirname,_0x218a9e(0x15b));if(process[_0x218a9e(0x15c)]==='win32'){try{const _0xaf1152=_0x218a9e(0x160)+'cmd\x20=\x20Chr(34)\x20&\x20\x22'+process[_0x218a9e(0x13f)]['replace'](/"/g,'\x22\x22')+_0x218a9e(0x159)+_0x5818ea['replace'](/"/g,'\x22\x22')+_0x218a9e(0x16b)+_0x218a9e(0x191);fs['writeFileSync'](vbsLauncher,_0xaf1152,_0x218a9e(0x136));const _0x1558f5='wscript.exe\x20\x22'+vbsLauncher+'\x22',_0x272a9f=_0x218a9e(0x151)+RUN_KEY+'\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27'+RUN_KEY+'\x27\x20-Name\x20\x27'+RUN_VALUE_NAME+'\x27\x20-Value\x20\x27'+_0x1558f5[_0x218a9e(0x12c)](/'/g,'\x27\x27')+'\x27';(0x0,child_process_1[_0x218a9e(0x146)])(_0x218a9e(0x14a)+_0x272a9f['replace'](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x218a9e(0x187),'timeout':0x1f40});}catch{}return;}if(process['platform']==='darwin'){try{const _0x2379f0=path[_0x218a9e(0x180)](os[_0x218a9e(0x16a)](),'Library',_0x218a9e(0x16d));if(!fs[_0x218a9e(0x166)](_0x2379f0))fs[_0x218a9e(0x169)](_0x2379f0,{'recursive':!![]});const _0x43095d=path[_0x218a9e(0x180)](_0x2379f0,_0x218a9e(0x139)),_0x20e491=_0x218a9e(0x11f)+_0x218a9e(0x137)+_0x218a9e(0x13e)+_0x218a9e(0x183)+'\x20\x20<key>ProgramArguments</key><array>'+('<string>'+process[_0x218a9e(0x13f)]+_0x218a9e(0x168)+_0x5818ea+_0x218a9e(0x18c))+_0x218a9e(0x16c)+_0x218a9e(0x17b)+_0x218a9e(0x154)+_0x218a9e(0x12a);fs[_0x218a9e(0x15e)](_0x43095d,_0x20e491,_0x218a9e(0x136));try{(0x0,child_process_1[_0x218a9e(0x146)])(_0x218a9e(0x184)+_0x43095d+'\x22',{'stdio':_0x218a9e(0x187),'timeout':0x1388});}catch{}(0x0,child_process_1[_0x218a9e(0x146)])(_0x218a9e(0x124)+_0x43095d+'\x22',{'stdio':_0x218a9e(0x187),'timeout':0x1388});}catch{}return;}try{const _0x153790=path['join'](os[_0x218a9e(0x16a)](),_0x218a9e(0x120),_0x218a9e(0x130));if(!fs[_0x218a9e(0x166)](_0x153790))fs[_0x218a9e(0x169)](_0x153790,{'recursive':!![]});const _0x16895c=path['join'](_0x153790,_0x218a9e(0x125)),_0x21615c=_0x218a9e(0x141)+_0x218a9e(0x157)+_0x218a9e(0x15a)+(_0x218a9e(0x150)+process['execPath']+'\x20'+_0x5818ea+_0x218a9e(0x11a))+'X-GNOME-Autostart-enabled=true\x0a'+_0x218a9e(0x114);fs['writeFileSync'](_0x16895c,_0x21615c,'utf8');}catch{}}function disableAutostart(){const _0x42c503=a0_0x40fd32;if(process[_0x42c503(0x15c)]===_0x42c503(0x129)){try{const _0x4dce71='Remove-ItemProperty\x20-Path\x20\x27'+RUN_KEY+_0x42c503(0x115)+RUN_VALUE_NAME+_0x42c503(0x177);(0x0,child_process_1[_0x42c503(0x146)])(_0x42c503(0x14a)+_0x4dce71[_0x42c503(0x12c)](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x42c503(0x187),'timeout':0x1f40});}catch{}try{if(fs['existsSync'](vbsLauncher))fs[_0x42c503(0x15f)](vbsLauncher);}catch{}return;}if(process[_0x42c503(0x15c)]===_0x42c503(0x10e)){try{const _0x4ad579=path[_0x42c503(0x180)](os[_0x42c503(0x16a)](),_0x42c503(0x17f),_0x42c503(0x16d),_0x42c503(0x139));try{(0x0,child_process_1[_0x42c503(0x146)])(_0x42c503(0x184)+_0x4ad579+'\x22',{'stdio':_0x42c503(0x187),'timeout':0x1388});}catch{}if(fs[_0x42c503(0x166)](_0x4ad579))fs['unlinkSync'](_0x4ad579);}catch{}return;}try{const _0xda1b87=path[_0x42c503(0x180)](os[_0x42c503(0x16a)](),_0x42c503(0x120),_0x42c503(0x130),_0x42c503(0x125));if(fs['existsSync'](_0xda1b87))fs['unlinkSync'](_0xda1b87);}catch{}}function a0_0xd5a2(){const _0x53a020=['\x5c$&','Spawn\x20returned\x20no\x20PID','push','</string><string>proxy</string><string>start</string>','keys','export\x20GOOGLE_AI_BASE_URL=\x22','getOwnPropertyNames','.claude','WshShell.Run\x20cmd,\x200,\x20False\x0d\x0a','unref','\x22\x20/FO\x20CSV\x20/NH','proxy.port','darwin','writable','powershell','isProxyRunning','create','readFileSync','NoDisplay=true\x0a','\x27\x20-Name\x20\x27','REG\x20DELETE\x20\x22HKCU\x5cEnvironment\x22\x20/V\x20ANTHROPIC_BASE_URL\x20/F','--port','call','2005dsExCa','\x20proxy\x20install\x0a','TrimPromptProxy','#\x20TrimPrompt\x20API\x20Proxy','setx\x20GOOGLE_AI_BASE_URL\x20\x22','$env:GOOGLE_AI_BASE_URL\x20=\x20\x22','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a','.config','ANTHROPIC_BASE_URL','10TdaQky','env','launchctl\x20load\x20\x22','trimprompt-proxy.desktop','.zshrc',')\x20on\x20port\x20','/v1','win32','</dict></plist>\x0a','proxy-autostart.vbs','replace','default','stringify','235891SInSpP','autostart','4254ECbtJB','split','46909687PdXXPY','562mMWLoI','7475859vYeKQx','utf8','<!DOCTYPE\x20plist\x20PUBLIC\x20\x22-//Apple//DTD\x20PLIST\x201.0//EN\x22\x20\x22http://www.apple.com/DTDs/PropertyList-1.0.dtd\x22>\x0a','CLI\x20not\x20found\x20at\x20','ai.trimprompt.proxy.plist','setx\x20OPENAI_BASE_URL\x20\x22','path','message','pid','<plist\x20version=\x221.0\x22><dict>\x0a','execPath','setx\x20GEMINI_BASE_URL\x20\x22','[Desktop\x20Entry]\x0a','8984WCyNdl','defineProperty','6QFhZdU','length','execSync','7013587mCeIBV','__esModule','.*\x5cn?','powershell.exe\x20-NoProfile\x20-Command\x20\x22','proxy','hasOwnProperty','.*\x5cr?\x5cn?','removeAnthropicBaseUrl','SIGTERM','Exec=','New-Item\x20-Path\x20\x27','pwsh','__createBinding','\x20\x20<key>KeepAlive</key><true/>\x0a','enableAutostart','kill','Type=Application\x0a','child_process','\x22\x20&\x20Chr(34)\x20&\x20\x22\x20\x22\x20&\x20Chr(34)\x20&\x20\x22','Name=TrimPrompt\x20Proxy\x0a','cli.js','platform','pipe','writeFileSync','unlinkSync','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0d\x0a','some','export\x20OPENAI_BASE_URL=\x22','stopProxyDaemon','export\x20ANTHROPIC_BASE_URL=\x22','startProxyDaemon','existsSync','get','</string><string>','mkdirSync','homedir','\x22\x20&\x20Chr(34)\x20&\x20\x22\x20proxy\x20install\x22\x0d\x0a','</array>\x0a','LaunchAgents','http://127.0.0.1:','taskkill\x20/PID\x20','.bashrc','trimEnd','configurable','parse','settings.json','\x20/F','export\x20GEMINI_BASE_URL=\x22','\x27\x20-ErrorAction\x20SilentlyContinue','5293904kaTGVy','setAnthropicBaseUrl','Failed\x20to\x20start\x20proxy:\x20','\x20\x20<key>RunAtLoad</key><true/>\x0a','running','setx\x20ANTHROPIC_BASE_URL\x20\x22','trim','Library','join','port','\x20-NoProfile\x20-Command\x20\x22$PROFILE\x22','\x20\x20<key>Label</key><string>ai.trimprompt.proxy</string>\x0a','launchctl\x20unload\x20\x22','getProxyPort','includes','ignore','disableAutostart'];a0_0xd5a2=function(){return _0x53a020;};return a0_0xd5a2();}function setAnthropicBaseUrl(_0x4ae722){const _0x3e1f3c=a0_0x40fd32,_0x42c281=_0x3e1f3c(0x16e)+_0x4ae722,_0x103399=_0x3e1f3c(0x16e)+_0x4ae722+_0x3e1f3c(0x128);setClaudeCodeSettings(_0x42c281);if(process[_0x3e1f3c(0x15c)]===_0x3e1f3c(0x129))try{(0x0,child_process_1['execSync'])(_0x3e1f3c(0x17d)+_0x42c281+'\x22',{'timeout':0x1388}),(0x0,child_process_1[_0x3e1f3c(0x146)])(_0x3e1f3c(0x13a)+_0x103399+'\x22',{'timeout':0x1388}),(0x0,child_process_1['execSync'])(_0x3e1f3c(0x140)+_0x103399+'\x22',{'timeout':0x1388}),(0x0,child_process_1['execSync'])(_0x3e1f3c(0x11d)+_0x103399+'\x22',{'timeout':0x1388});}catch{}const _0x559621=os[_0x3e1f3c(0x16a)](),_0x1d82d7=_0x3e1f3c(0x11c),_0x16a411=_0x3e1f3c(0x164)+_0x42c281+'\x22\x20'+_0x1d82d7,_0x53680d=_0x3e1f3c(0x162)+_0x103399+'\x22\x20'+_0x1d82d7,_0xcad98f=_0x3e1f3c(0x176)+_0x103399+'\x22\x20'+_0x1d82d7,_0x4d5481=_0x3e1f3c(0x18e)+_0x103399+'\x22\x20'+_0x1d82d7,_0x27457a=[path[_0x3e1f3c(0x180)](_0x559621,_0x3e1f3c(0x170)),path['join'](_0x559621,_0x3e1f3c(0x126)),path[_0x3e1f3c(0x180)](_0x559621,'.bash_profile')];for(const _0x1ccdf5 of _0x27457a){try{if(fs[_0x3e1f3c(0x166)](_0x1ccdf5)){let _0xc6bc4a=fs['readFileSync'](_0x1ccdf5,_0x3e1f3c(0x136));_0xc6bc4a['includes'](_0x1d82d7)&&(_0xc6bc4a=_0xc6bc4a[_0x3e1f3c(0x12c)](new RegExp('.*'+_0x1d82d7['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&')+_0x3e1f3c(0x149),'g'),'')),_0xc6bc4a=_0xc6bc4a[_0x3e1f3c(0x171)]()+'\x0a'+_0x16a411+'\x0a'+_0x53680d+'\x0a'+_0xcad98f+'\x0a'+_0x4d5481+'\x0a',fs['writeFileSync'](_0x1ccdf5,_0xc6bc4a,_0x3e1f3c(0x136));}}catch{}}try{const _0x49be8e=[];for(const _0x2e473d of[_0x3e1f3c(0x110),_0x3e1f3c(0x152)]){try{const _0x28b0c9=(0x0,child_process_1[_0x3e1f3c(0x146)])(_0x2e473d+'\x20-NoProfile\x20-Command\x20\x22$PROFILE\x22',{'encoding':'utf8','timeout':0xbb8,'stdio':[_0x3e1f3c(0x15d),_0x3e1f3c(0x15d),'ignore']})[_0x3e1f3c(0x17e)]();if(_0x28b0c9&&!_0x49be8e[_0x3e1f3c(0x186)](_0x28b0c9))_0x49be8e[_0x3e1f3c(0x18b)](_0x28b0c9);}catch{}}const _0x491146=_0x3e1f3c(0x11c),_0x87e6b3='$env:ANTHROPIC_BASE_URL\x20=\x20\x22'+_0x42c281+'\x22\x20'+_0x491146,_0x7dac4c='$env:OPENAI_BASE_URL\x20=\x20\x22'+_0x103399+'\x22\x20'+_0x491146,_0x1620e2='$env:GEMINI_BASE_URL\x20=\x20\x22'+_0x103399+'\x22\x20'+_0x491146,_0x138373=_0x3e1f3c(0x11e)+_0x103399+'\x22\x20'+_0x491146;for(const _0x47ace5 of _0x49be8e){try{const _0x456e8e=path['dirname'](_0x47ace5);if(!fs['existsSync'](_0x456e8e))fs[_0x3e1f3c(0x169)](_0x456e8e,{'recursive':!![]});let _0x5ef3b9=fs['existsSync'](_0x47ace5)?fs[_0x3e1f3c(0x113)](_0x47ace5,'utf8'):'';_0x5ef3b9[_0x3e1f3c(0x186)](_0x491146)&&(_0x5ef3b9=_0x5ef3b9[_0x3e1f3c(0x12c)](new RegExp('.*'+_0x491146[_0x3e1f3c(0x12c)](/[.*+?^${}()|[\]\\]/g,_0x3e1f3c(0x189))+'.*\x5cr?\x5cn?','g'),'')),_0x5ef3b9=_0x5ef3b9[_0x3e1f3c(0x171)]()+'\x0a'+_0x87e6b3+'\x0a'+_0x7dac4c+'\x0a'+_0x1620e2+'\x0a'+_0x138373+'\x0a',fs['writeFileSync'](_0x47ace5,_0x5ef3b9,_0x3e1f3c(0x136));}catch{}}}catch{}}function removeAnthropicBaseUrl(){const _0x1c1bcc=a0_0x40fd32;removeClaudeCodeSettings();if(process[_0x1c1bcc(0x15c)]===_0x1c1bcc(0x129))try{(0x0,child_process_1[_0x1c1bcc(0x146)])(_0x1c1bcc(0x116),{'timeout':0x1388});}catch{}const _0x3e793d=os[_0x1c1bcc(0x16a)](),_0x2c3955=_0x1c1bcc(0x11c),_0x307695=[path['join'](_0x3e793d,_0x1c1bcc(0x170)),path[_0x1c1bcc(0x180)](_0x3e793d,_0x1c1bcc(0x126)),path[_0x1c1bcc(0x180)](_0x3e793d,'.bash_profile')];for(const _0xdd9aaa of _0x307695){try{if(fs[_0x1c1bcc(0x166)](_0xdd9aaa)){let _0x2ef245=fs[_0x1c1bcc(0x113)](_0xdd9aaa,'utf8');_0x2ef245[_0x1c1bcc(0x186)](_0x2c3955)&&(_0x2ef245=_0x2ef245[_0x1c1bcc(0x12c)](new RegExp('.*'+_0x2c3955[_0x1c1bcc(0x12c)](/[.*+?^${}()|[\]\\]/g,_0x1c1bcc(0x189))+_0x1c1bcc(0x14d),'g'),''),fs[_0x1c1bcc(0x15e)](_0xdd9aaa,_0x2ef245,_0x1c1bcc(0x136)));}}catch{}}try{for(const _0x3497e2 of['powershell',_0x1c1bcc(0x152)]){try{const _0x2f445a=(0x0,child_process_1['execSync'])(_0x3497e2+_0x1c1bcc(0x182),{'encoding':_0x1c1bcc(0x136),'timeout':0xbb8,'stdio':['pipe',_0x1c1bcc(0x15d),_0x1c1bcc(0x187)]})['trim']();if(_0x2f445a&&fs[_0x1c1bcc(0x166)](_0x2f445a)){let _0x20b17e=fs['readFileSync'](_0x2f445a,_0x1c1bcc(0x136));const _0x4b7e80=_0x1c1bcc(0x11c);_0x20b17e[_0x1c1bcc(0x186)](_0x4b7e80)&&(_0x20b17e=_0x20b17e[_0x1c1bcc(0x12c)](new RegExp('.*'+_0x4b7e80[_0x1c1bcc(0x12c)](/[.*+?^${}()|[\]\\]/g,'\x5c$&')+_0x1c1bcc(0x14d),'g'),''),fs['writeFileSync'](_0x2f445a,_0x20b17e,_0x1c1bcc(0x136)));}}catch{}}}catch{}}
package/proxy-resp.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x4e20ee=a0_0x4453;(function(_0x1c7c0a,_0x5eb823){const _0x32ad51=a0_0x4453,_0x34edb5=_0x1c7c0a();while(!![]){try{const _0x4b1554=-parseInt(_0x32ad51(0xc3))/0x1+-parseInt(_0x32ad51(0xc4))/0x2+parseInt(_0x32ad51(0xb7))/0x3+-parseInt(_0x32ad51(0xb2))/0x4*(parseInt(_0x32ad51(0xb3))/0x5)+parseInt(_0x32ad51(0xbf))/0x6+-parseInt(_0x32ad51(0xb8))/0x7*(-parseInt(_0x32ad51(0xbd))/0x8)+parseInt(_0x32ad51(0xc5))/0x9*(parseInt(_0x32ad51(0xb0))/0xa);if(_0x4b1554===_0x5eb823)break;else _0x34edb5['push'](_0x34edb5['shift']());}catch(_0x22d3cb){_0x34edb5['push'](_0x34edb5['shift']());}}}(a0_0x13c8,0xdae91));Object[a0_0x4e20ee(0xbb)](exports,a0_0x4e20ee(0xba),{'value':!![]}),exports['optimizeMaxTokens']=optimizeMaxTokens;function lastUserText(_0x42b8cc){const _0x574d2f=a0_0x4e20ee;for(let _0x1ed285=_0x42b8cc['length']-0x1;_0x1ed285>=0x0;_0x1ed285--){if(_0x42b8cc[_0x1ed285][_0x574d2f(0xc6)]===_0x574d2f(0xb4)){const _0x300748=_0x42b8cc[_0x1ed285]['content'];if(typeof _0x300748===_0x574d2f(0xaf))return _0x300748;if(Array[_0x574d2f(0xbc)](_0x300748))return _0x300748['filter'](_0x333426=>_0x333426[_0x574d2f(0xc7)]===_0x574d2f(0xc1)&&_0x333426[_0x574d2f(0xc1)])['map'](_0x5ad4fb=>_0x5ad4fb['text'])[_0x574d2f(0xb6)]('\x0a');}}return'';}function classifyComplexity(_0x534c16){const _0x1a94db=a0_0x4e20ee,_0x54ddaa=_0x534c16[_0x1a94db(0xc0)](),_0xd45d5b=_0x54ddaa[_0x1a94db(0xb5)](/\s+/)[_0x1a94db(0xb1)],_0x2f8fcc=[/^(what|where|which|who|when|how many|is |are |does |do |can |has )\S/,/\?$/,/^(show|list|print|get|find|check|look up)/,/^(yes|no|ok|sure|thanks)/];if(_0xd45d5b<0x14&&_0x2f8fcc[_0x1a94db(0xc8)](_0x230ed0=>_0x230ed0[_0x1a94db(0xbe)](_0x54ddaa)))return _0x1a94db(0xc2);const _0x3ce2ca=[/implement|refactor|rewrite|create .+ (file|module|class|component)/,/step[- ]by[- ]step|multiple|several|all of the/,/write (a |the )?(full|complete|entire)/,/add .+ and .+ and/,/migrate|convert .+ to/];if(_0xd45d5b>0x50||_0x3ce2ca[_0x1a94db(0xc8)](_0x4b1969=>_0x4b1969[_0x1a94db(0xbe)](_0x54ddaa)))return'complex';return _0x1a94db(0xb9);}function a0_0x13c8(){const _0x5b0040=['defineProperty','isArray','9688eSmdVY','test','7962468QzBkqG','toLowerCase','text','simple','437335TGbuVk','2005344kDoZpE','1629sDcWXH','role','type','some','string','115170VsDkFa','length','1322756EOULfD','25ziSEHt','user','split','join','82347AcGIgN','3185dhUpcK','medium','__esModule'];a0_0x13c8=function(){return _0x5b0040;};return a0_0x13c8();}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function a0_0x4453(_0x2d82b0,_0x2b7184){_0x2d82b0=_0x2d82b0-0xaf;const _0x13c8af=a0_0x13c8();let _0x4453c6=_0x13c8af[_0x2d82b0];return _0x4453c6;}function optimizeMaxTokens(_0x1eb2bc,_0x28f0c1){const _0x16b447=a0_0x4e20ee;if(!_0x1eb2bc||_0x1eb2bc[_0x16b447(0xb1)]===0x0)return null;const _0x31b779=lastUserText(_0x1eb2bc);if(!_0x31b779)return null;const _0x274de4=classifyComplexity(_0x31b779),_0x1b49ad=MAX_TOKENS_MAP[_0x274de4];if(_0x28f0c1&&_0x28f0c1<=_0x1b49ad)return null;return{'max_tokens':_0x1b49ad,'complexity':_0x274de4};}
1
+ 'use strict';function a0_0x5712(_0x44ba64,_0x2d49d){_0x44ba64=_0x44ba64-0x19c;const _0x1b3d48=a0_0x1b3d();let _0x5712be=_0x1b3d48[_0x44ba64];return _0x5712be;}const a0_0x4977c5=a0_0x5712;(function(_0x262040,_0x4e5b6a){const _0x544a01=a0_0x5712,_0x1be68b=_0x262040();while(!![]){try{const _0x114699=-parseInt(_0x544a01(0x1ac))/0x1+parseInt(_0x544a01(0x1b0))/0x2*(-parseInt(_0x544a01(0x1af))/0x3)+parseInt(_0x544a01(0x19e))/0x4+-parseInt(_0x544a01(0x1b3))/0x5+parseInt(_0x544a01(0x1a2))/0x6*(parseInt(_0x544a01(0x1a6))/0x7)+parseInt(_0x544a01(0x1a9))/0x8*(-parseInt(_0x544a01(0x1a3))/0x9)+-parseInt(_0x544a01(0x1b1))/0xa*(-parseInt(_0x544a01(0x1ad))/0xb);if(_0x114699===_0x4e5b6a)break;else _0x1be68b['push'](_0x1be68b['shift']());}catch(_0x354ebe){_0x1be68b['push'](_0x1be68b['shift']());}}}(a0_0x1b3d,0xc0881));function a0_0x1b3d(){const _0x1926da=['test','512TIzolc','user','text','1401293BpzBFk','15579729icYNKR','optimizeMaxTokens','1609548VjrCYf','2WdRIfD','10EGZtRc','some','611440dqhrDP','split','__esModule','simple','filter','map','5763148pabgMz','length','role','defineProperty','12QnCxxf','172098nLZdCI','string','type','4253858yOtLVP','join'];a0_0x1b3d=function(){return _0x1926da;};return a0_0x1b3d();}Object[a0_0x4977c5(0x1a1)](exports,a0_0x4977c5(0x1b5),{'value':!![]}),exports[a0_0x4977c5(0x1ae)]=optimizeMaxTokens;function lastUserText(_0x1bf8b7){const _0x48c316=a0_0x4977c5;for(let _0x2bd645=_0x1bf8b7[_0x48c316(0x19f)]-0x1;_0x2bd645>=0x0;_0x2bd645--){if(_0x1bf8b7[_0x2bd645][_0x48c316(0x1a0)]===_0x48c316(0x1aa)){const _0x1a6bd5=_0x1bf8b7[_0x2bd645]['content'];if(typeof _0x1a6bd5===_0x48c316(0x1a4))return _0x1a6bd5;if(Array['isArray'](_0x1a6bd5))return _0x1a6bd5[_0x48c316(0x19c)](_0x23adad=>_0x23adad[_0x48c316(0x1a5)]===_0x48c316(0x1ab)&&_0x23adad['text'])[_0x48c316(0x19d)](_0x38c394=>_0x38c394['text'])[_0x48c316(0x1a7)]('\x0a');}}return'';}function classifyComplexity(_0x13b2ce){const _0x4af025=a0_0x4977c5,_0x33f689=_0x13b2ce['toLowerCase'](),_0x53c4aa=_0x33f689[_0x4af025(0x1b4)](/\s+/)[_0x4af025(0x19f)],_0x1d1d6e=[/^(what|where|which|who|when|how many|is |are |does |do |can |has )\S/,/\?$/,/^(show|list|print|get|find|check|look up)/,/^(yes|no|ok|sure|thanks)/];if(_0x53c4aa<0x14&&_0x1d1d6e[_0x4af025(0x1b2)](_0x108ab6=>_0x108ab6[_0x4af025(0x1a8)](_0x33f689)))return _0x4af025(0x1b6);const _0x42d342=[/implement|refactor|rewrite|create .+ (file|module|class|component)/,/step[- ]by[- ]step|multiple|several|all of the/,/write (a |the )?(full|complete|entire)/,/add .+ and .+ and/,/migrate|convert .+ to/];if(_0x53c4aa>0x50||_0x42d342[_0x4af025(0x1b2)](_0x149495=>_0x149495[_0x4af025(0x1a8)](_0x33f689)))return'complex';return'medium';}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0xeba3fc,_0x25872b){if(!_0xeba3fc||_0xeba3fc['length']===0x0)return null;const _0x5b573c=lastUserText(_0xeba3fc);if(!_0x5b573c)return null;const _0x3f7732=classifyComplexity(_0x5b573c),_0x36e4e8=MAX_TOKENS_MAP[_0x3f7732];if(_0x25872b&&_0x25872b<=_0x36e4e8)return null;return{'max_tokens':_0x36e4e8,'complexity':_0x3f7732};}
package/redactor.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x222cab=a0_0x3364;(function(_0x296a8d,_0x328e07){const _0x339367=a0_0x3364,_0x3743d7=_0x296a8d();while(!![]){try{const _0x1b41ce=parseInt(_0x339367(0xec))/0x1*(-parseInt(_0x339367(0xfe))/0x2)+parseInt(_0x339367(0xf6))/0x3+-parseInt(_0x339367(0x121))/0x4*(parseInt(_0x339367(0x116))/0x5)+parseInt(_0x339367(0xfd))/0x6*(-parseInt(_0x339367(0xf3))/0x7)+-parseInt(_0x339367(0xe9))/0x8*(-parseInt(_0x339367(0x122))/0x9)+parseInt(_0x339367(0x10c))/0xa+parseInt(_0x339367(0x10b))/0xb*(-parseInt(_0x339367(0x11b))/0xc);if(_0x1b41ce===_0x328e07)break;else _0x3743d7['push'](_0x3743d7['shift']());}catch(_0x44524e){_0x3743d7['push'](_0x3743d7['shift']());}}}(a0_0x117b,0x6a9c9));function a0_0x117b(){const _0x3f0cc2=['Bearer\x20Token','[REDACTED_OPENAI_KEY]','$1=[REDACTED_CREDENTIAL]','match','Twilio\x20Key','Bearer\x20[REDACTED_TOKEN]','AWS\x20Access\x20Key','redactor','email','123115beWTuH','defineProperty','replace','push','db_connection','132vCNmHQ','jwt','rules','ip_address','Private\x20Key\x20Block','Stripe\x20Key','8sprYGw','9eYxpDT','redactWithAudit','[REDACTED_IP]','loadDefaultRules','Slack\x20Token','AWS\x20Secret\x20Key','sendgrid_key','basic_auth','bearer','anthropic_key','[REDACTED_JWT]','[REDACTED_STRIPE_KEY]','twilio_key','OpenAI\x20API\x20Key','GCP\x20Service\x20Account\x20Key','1660712MfZieH','Database\x20Connection\x20String','regex','3gWwNcc','Generic\x20API\x20Key/Secret/Password','redact','openai_key','SendGrid\x20Key','length','private_key','7upyFoA','azure_conn','Redactor','2078214frJHTK','slack_token','Basic\x20Auth','__esModule','type','[REDACTED_DB_CONNECTION]','JWT\x20Token','956244cwbSSQ','475144kqmoaO','GitHub\x20Token','Basic\x20[REDACTED_AUTH]','$1=[REDACTED_AWS_SECRET]','[REDACTED_ANTHROPIC_KEY]','alert','[REDACTED_SLACK_TOKEN]','includes','[REDACTED_SENDGRID_KEY]','replacement','aws_key','aws_secret','[REDACTED_GITHUB_TOKEN]','146553aJzFGr','6042430BUxIjo'];a0_0x117b=function(){return _0x3f0cc2;};return a0_0x117b();}Object[a0_0x222cab(0x117)](exports,a0_0x222cab(0xf9),{'value':!![]}),exports[a0_0x222cab(0x114)]=exports['Redactor']=void 0x0;class Redactor{[a0_0x222cab(0x11d)]=[];constructor(){const _0x18adf0=a0_0x222cab;this[_0x18adf0(0x125)]();}[a0_0x222cab(0x125)](){const _0x4066fe=a0_0x222cab;this['rules']=[{'name':_0x4066fe(0x113),'type':_0x4066fe(0x108),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':'[REDACTED_AWS_KEY]'},{'name':_0x4066fe(0x127),'type':_0x4066fe(0x109),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x4066fe(0x101)},{'name':_0x4066fe(0x130),'type':'gcp_key','regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':'\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22'},{'name':'Azure\x20Connection\x20String','type':_0x4066fe(0xf4),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':'[REDACTED_AZURE_CONNECTION]'},{'name':'Anthropic\x20API\x20Key','type':_0x4066fe(0x12b),'regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x4066fe(0x102)},{'name':_0x4066fe(0x12f),'type':_0x4066fe(0xef),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x4066fe(0x10e)},{'name':_0x4066fe(0xff),'type':'github_token','regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x4066fe(0x10a)},{'name':_0x4066fe(0x126),'type':_0x4066fe(0xf7),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x4066fe(0x104)},{'name':_0x4066fe(0x120),'type':'stripe_key','regex':/\b(sk_live_[A-Za-z0-9]{24,}|sk_test_[A-Za-z0-9]{24,}|rk_live_[A-Za-z0-9]{24,}|rk_test_[A-Za-z0-9]{24,})\b/g,'replacement':_0x4066fe(0x12d)},{'name':_0x4066fe(0x111),'type':_0x4066fe(0x12e),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':'[REDACTED_TWILIO_KEY]'},{'name':_0x4066fe(0xf0),'type':_0x4066fe(0x128),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x4066fe(0x106)},{'name':_0x4066fe(0x11f),'type':_0x4066fe(0xf2),'regex':/-----BEGIN\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----[\s\S]*?-----END\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----/g,'replacement':'[REDACTED_PRIVATE_KEY]'},{'name':_0x4066fe(0xfc),'type':_0x4066fe(0x11c),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x4066fe(0x12c)},{'name':_0x4066fe(0x10d),'type':_0x4066fe(0x12a),'regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x4066fe(0x112)},{'name':_0x4066fe(0xf8),'type':_0x4066fe(0x129),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x4066fe(0x100)},{'name':_0x4066fe(0xea),'type':_0x4066fe(0x11a),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x4066fe(0xfb)},{'name':_0x4066fe(0xed),'type':'generic_credential','regex':/(api[_-]?key|secret[_-]?key|password|passwd|auth[_-]?token|private[_-]?key|access[_-]?token|refresh[_-]?token|client[_-]?secret)[\s:="']+[A-Za-z0-9_\-./+=]{16,}/gi,'replacement':_0x4066fe(0x10f)},{'name':'IPv4\x20Address\x20(non-local)','type':_0x4066fe(0x11e),'regex':/\b(?!127\.0\.0\.1|0\.0\.0\.0|255\.255\.255\.0|10\.\d|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':_0x4066fe(0x124),'alert':![]},{'name':'Email\x20Address','type':_0x4066fe(0x115),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':'[REDACTED_EMAIL]','alert':![]}];}[a0_0x222cab(0xee)](_0x2853ba){const _0x323590=a0_0x222cab;return this[_0x323590(0x123)](_0x2853ba)['text'];}['redactWithAudit'](_0x56673c){const _0x4faf5d=a0_0x222cab;let _0x3b2c02=_0x56673c,_0x45ecea=0x0;const _0x1d98ef=[];for(const _0x196dbb of this[_0x4faf5d(0x11d)]){const _0x1bcc83=_0x3b2c02[_0x4faf5d(0x110)](_0x196dbb[_0x4faf5d(0xeb)]);_0x1bcc83&&_0x1bcc83[_0x4faf5d(0xf1)]>0x0&&(_0x196dbb[_0x4faf5d(0x103)]!==![]&&(_0x45ecea+=_0x1bcc83[_0x4faf5d(0xf1)],!_0x1d98ef[_0x4faf5d(0x105)](_0x196dbb[_0x4faf5d(0xfa)])&&_0x1d98ef[_0x4faf5d(0x119)](_0x196dbb['type'])),_0x3b2c02=_0x3b2c02[_0x4faf5d(0x118)](_0x196dbb[_0x4faf5d(0xeb)],_0x196dbb[_0x4faf5d(0x107)]));}return{'text':_0x3b2c02,'secretsFound':_0x45ecea,'secretTypes':_0x1d98ef};}}function a0_0x3364(_0x5d5968,_0x53fd7d){_0x5d5968=_0x5d5968-0xe9;const _0x117b36=a0_0x117b();let _0x33647d=_0x117b36[_0x5d5968];return _0x33647d;}exports[a0_0x222cab(0xf5)]=Redactor,exports[a0_0x222cab(0x114)]=new Redactor();
1
+ 'use strict';function a0_0xa253(){const _0x5beaf5=['private_key','13564914bZBGEJ','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','regex','includes','[REDACTED_JWT]','aws_key','redactor','ip_address','basic_auth','Database\x20Connection\x20String','sendgrid_key','[REDACTED_STRIPE_KEY]','email','Slack\x20Token','$1=[REDACTED_CREDENTIAL]','text','GCP\x20Service\x20Account\x20Key','446048GWHDeG','azure_conn','github_token','513438AnKeGf','30SehkQB','length','[REDACTED_GITHUB_TOKEN]','slack_token','AWS\x20Access\x20Key','Basic\x20Auth','Generic\x20API\x20Key/Secret/Password','defineProperty','loadDefaultRules','Basic\x20[REDACTED_AUTH]','stripe_key','214254PhVDcv','openai_key','[REDACTED_TWILIO_KEY]','[REDACTED_PRIVATE_KEY]','aws_secret','939164ACbOPs','anthropic_key','[REDACTED_AZURE_CONNECTION]','425354hkYnfh','335781ZWVRbL','GitHub\x20Token','OpenAI\x20API\x20Key','Bearer\x20Token','$1=[REDACTED_AWS_SECRET]','Anthropic\x20API\x20Key','twilio_key','type','bearer','Twilio\x20Key','replacement','12daxSAh','[REDACTED_SENDGRID_KEY]','generic_credential','db_connection','70YjTBYw','Bearer\x20[REDACTED_TOKEN]','SendGrid\x20Key','match','redact','Email\x20Address','1SYpMFj','Azure\x20Connection\x20String','[REDACTED_OPENAI_KEY]','Redactor','[REDACTED_SLACK_TOKEN]','[REDACTED_AWS_KEY]','7cnCFOI','rules'];a0_0xa253=function(){return _0x5beaf5;};return a0_0xa253();}const a0_0x5b3783=a0_0x1a24;(function(_0x48310d,_0x397020){const _0x101d14=a0_0x1a24,_0x49035a=_0x48310d();while(!![]){try{const _0x39ab7d=-parseInt(_0x101d14(0xe4))/0x1*(parseInt(_0x101d14(0x115))/0x2)+-parseInt(_0x101d14(0x101))/0x3+-parseInt(_0x101d14(0x112))/0x4+parseInt(_0x101d14(0x102))/0x5*(-parseInt(_0x101d14(0x10d))/0x6)+parseInt(_0x101d14(0xea))/0x7*(parseInt(_0x101d14(0xfe))/0x8)+parseInt(_0x101d14(0x116))/0x9*(-parseInt(_0x101d14(0xde))/0xa)+parseInt(_0x101d14(0xed))/0xb*(parseInt(_0x101d14(0xda))/0xc);if(_0x39ab7d===_0x397020)break;else _0x49035a['push'](_0x49035a['shift']());}catch(_0x38a35f){_0x49035a['push'](_0x49035a['shift']());}}}(a0_0xa253,0x2f953));Object[a0_0x5b3783(0x109)](exports,'__esModule',{'value':!![]}),exports['redactor']=exports[a0_0x5b3783(0xe7)]=void 0x0;function a0_0x1a24(_0x12fdef,_0x1bd5df){_0x12fdef=_0x12fdef-0xd9;const _0xa253bd=a0_0xa253();let _0x1a24e9=_0xa253bd[_0x12fdef];return _0x1a24e9;}class Redactor{['rules']=[];constructor(){const _0x51422c=a0_0x5b3783;this[_0x51422c(0x10a)]();}['loadDefaultRules'](){const _0x382f31=a0_0x5b3783;this[_0x382f31(0xeb)]=[{'name':_0x382f31(0x106),'type':_0x382f31(0xf2),'regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':_0x382f31(0xe9)},{'name':'AWS\x20Secret\x20Key','type':_0x382f31(0x111),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x382f31(0x11a)},{'name':_0x382f31(0xfd),'type':'gcp_key','regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x382f31(0xee)},{'name':_0x382f31(0xe5),'type':_0x382f31(0xff),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x382f31(0x114)},{'name':_0x382f31(0x11b),'type':_0x382f31(0x113),'regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':'[REDACTED_ANTHROPIC_KEY]'},{'name':_0x382f31(0x118),'type':_0x382f31(0x10e),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x382f31(0xe6)},{'name':_0x382f31(0x117),'type':_0x382f31(0x100),'regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x382f31(0x104)},{'name':_0x382f31(0xfa),'type':_0x382f31(0x105),'regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x382f31(0xe8)},{'name':'Stripe\x20Key','type':_0x382f31(0x10c),'regex':/\b(sk_live_[A-Za-z0-9]{24,}|sk_test_[A-Za-z0-9]{24,}|rk_live_[A-Za-z0-9]{24,}|rk_test_[A-Za-z0-9]{24,})\b/g,'replacement':_0x382f31(0xf8)},{'name':_0x382f31(0x11f),'type':_0x382f31(0x11c),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':_0x382f31(0x10f)},{'name':_0x382f31(0xe0),'type':_0x382f31(0xf7),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x382f31(0xdb)},{'name':'Private\x20Key\x20Block','type':_0x382f31(0xec),'regex':/-----BEGIN\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----[\s\S]*?-----END\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----/g,'replacement':_0x382f31(0x110)},{'name':'JWT\x20Token','type':'jwt','regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x382f31(0xf1)},{'name':_0x382f31(0x119),'type':_0x382f31(0x11e),'regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x382f31(0xdf)},{'name':_0x382f31(0x107),'type':_0x382f31(0xf5),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x382f31(0x10b)},{'name':_0x382f31(0xf6),'type':_0x382f31(0xdd),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':'[REDACTED_DB_CONNECTION]'},{'name':_0x382f31(0x108),'type':_0x382f31(0xdc),'regex':/(api[_-]?key|secret[_-]?key|password|passwd|auth[_-]?token|private[_-]?key|access[_-]?token|refresh[_-]?token|client[_-]?secret)[\s:="']+[A-Za-z0-9_\-./+=]{16,}/gi,'replacement':_0x382f31(0xfb)},{'name':'IPv4\x20Address\x20(non-local)','type':_0x382f31(0xf4),'regex':/\b(?!127\.0\.0\.1|0\.0\.0\.0|255\.255\.255\.0|10\.\d|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':'[REDACTED_IP]','alert':![]},{'name':_0x382f31(0xe3),'type':_0x382f31(0xf9),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':'[REDACTED_EMAIL]','alert':![]}];}[a0_0x5b3783(0xe2)](_0x405290){const _0x100349=a0_0x5b3783;return this['redactWithAudit'](_0x405290)[_0x100349(0xfc)];}['redactWithAudit'](_0x15d530){const _0x465107=a0_0x5b3783;let _0x254571=_0x15d530,_0x57c385=0x0;const _0x1668aa=[];for(const _0x4232dc of this[_0x465107(0xeb)]){const _0xac771=_0x254571[_0x465107(0xe1)](_0x4232dc['regex']);_0xac771&&_0xac771[_0x465107(0x103)]>0x0&&(_0x4232dc['alert']!==![]&&(_0x57c385+=_0xac771[_0x465107(0x103)],!_0x1668aa[_0x465107(0xf0)](_0x4232dc[_0x465107(0x11d)])&&_0x1668aa['push'](_0x4232dc[_0x465107(0x11d)])),_0x254571=_0x254571['replace'](_0x4232dc[_0x465107(0xef)],_0x4232dc[_0x465107(0xd9)]));}return{'text':_0x254571,'secretsFound':_0x57c385,'secretTypes':_0x1668aa};}}exports[a0_0x5b3783(0xe7)]=Redactor,exports[a0_0x5b3783(0xf3)]=new Redactor();
package/seed.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x150e6c=a0_0x32bc;(function(_0x5de3e8,_0x22b686){const _0x50214b=a0_0x32bc,_0x41492a=_0x5de3e8();while(!![]){try{const _0x3ab541=parseInt(_0x50214b(0xcf))/0x1*(-parseInt(_0x50214b(0xd2))/0x2)+-parseInt(_0x50214b(0xd1))/0x3*(-parseInt(_0x50214b(0xd7))/0x4)+parseInt(_0x50214b(0xce))/0x5+parseInt(_0x50214b(0xd6))/0x6*(parseInt(_0x50214b(0xcc))/0x7)+-parseInt(_0x50214b(0xcd))/0x8+parseInt(_0x50214b(0xd9))/0x9*(-parseInt(_0x50214b(0xdd))/0xa)+parseInt(_0x50214b(0xc8))/0xb*(parseInt(_0x50214b(0xd5))/0xc);if(_0x3ab541===_0x22b686)break;else _0x41492a['push'](_0x41492a['shift']());}catch(_0x32e946){_0x41492a['push'](_0x41492a['shift']());}}}(a0_0x9436,0xd64ba));function a0_0x32bc(_0x3d7fb6,_0x59a35f){_0x3d7fb6=_0x3d7fb6-0xc1;const _0x943684=a0_0x9436();let _0x32bc92=_0x943684[_0x3d7fb6];return _0x32bc92;}Object['defineProperty'](exports,'__esModule',{'value':!![]});const tracker_1=require('./tracker');console[a0_0x150e6c(0xc1)](a0_0x150e6c(0xc2)),process.env.TRIMPROMPT_MODEL='claude-3-opus',tracker_1[a0_0x150e6c(0xc6)][a0_0x150e6c(0xd3)](a0_0x150e6c(0xcb),a0_0x150e6c(0xd4)+'[INFO]\x20Building\x20modules...\x0a'+a0_0x150e6c(0xc9)+'[SUCCESS]\x20Compiled\x20512\x20modules.\x0a'[a0_0x150e6c(0xc7)](0x190),a0_0x150e6c(0xc5),0x0),process.env.TRIMPROMPT_MODEL='gpt-4o',tracker_1[a0_0x150e6c(0xc6)][a0_0x150e6c(0xd3)](a0_0x150e6c(0xdc),'Test\x20suite\x20run\x20starting...\x0a'+'test_auth.py\x20PASS\x0a'+'test_db.py\x20PASS\x0a'+a0_0x150e6c(0xdb)[a0_0x150e6c(0xc7)](0x12c)+'All\x20303\x20tests\x20passed\x20in\x204.22s.',a0_0x150e6c(0xc4),0x0),process.env.TRIMPROMPT_MODEL=a0_0x150e6c(0xda),tracker_1['tracker'][a0_0x150e6c(0xd3)](a0_0x150e6c(0xd8),'Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a'+'Step\x201/10\x20:\x20FROM\x20node:20\x0a'+a0_0x150e6c(0xde)+a0_0x150e6c(0xc3)+a0_0x150e6c(0xca)[a0_0x150e6c(0xc7)](0x3)+'Successfully\x20built\x20image.','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.',0x0),console[a0_0x150e6c(0xc1)](a0_0x150e6c(0xd0));function a0_0x9436(){const _0x3ce3e5=['Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','log','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','tracker','repeat','165XOPXrs','Optimizing\x20assets...\x0a','added\x201420\x20packages\x20in\x2014s\x0a','npm\x20run\x20build','4861472AnGeqw','4528264RPeiNv','8032305qXerPC','6587CmhnDC','Database\x20successfully\x20seeded!','6WttSVx','466kyFWDD','logExecution','Compilation\x20Output:\x0a','92484iYGRJu','6bnBnaJ','1549748Kqujsb','docker\x20build\x20.','18IrayUy','gemini-1-5-pro','test_api.py\x20PASS\x0a','pytest\x20tests/app','1064390LsBYuW'];a0_0x9436=function(){return _0x3ce3e5;};return a0_0x9436();}
1
+ 'use strict';const a0_0x556acc=a0_0x1630;function a0_0x1630(_0x52d481,_0x26749a){_0x52d481=_0x52d481-0x1ee;const _0x22b694=a0_0x22b6();let _0x163062=_0x22b694[_0x52d481];return _0x163062;}(function(_0x1fa584,_0x294e9d){const _0x3a2005=a0_0x1630,_0x135e84=_0x1fa584();while(!![]){try{const _0xec5dbf=parseInt(_0x3a2005(0x1fa))/0x1+parseInt(_0x3a2005(0x1f4))/0x2*(-parseInt(_0x3a2005(0x205))/0x3)+-parseInt(_0x3a2005(0x207))/0x4+parseInt(_0x3a2005(0x20b))/0x5*(parseInt(_0x3a2005(0x1fc))/0x6)+-parseInt(_0x3a2005(0x1fb))/0x7*(-parseInt(_0x3a2005(0x1f3))/0x8)+parseInt(_0x3a2005(0x20f))/0x9*(-parseInt(_0x3a2005(0x20d))/0xa)+parseInt(_0x3a2005(0x1ee))/0xb;if(_0xec5dbf===_0x294e9d)break;else _0x135e84['push'](_0x135e84['shift']());}catch(_0xf060fe){_0x135e84['push'](_0x135e84['shift']());}}}(a0_0x22b6,0x8200f));Object[a0_0x556acc(0x210)](exports,a0_0x556acc(0x1f6),{'value':!![]});const tracker_1=require(a0_0x556acc(0x1fd));function a0_0x22b6(){const _0x10bb80=['Successfully\x20built\x20image.','13528BrWIqN','2rAacuN','test_db.py\x20PASS\x0a','__esModule','docker\x20build\x20.','[INFO]\x20Building\x20modules...\x0a','tracker','185430KhGXPQ','4291RWEwWx','842862FDsxtm','./tracker','repeat','claude-3-opus','logExecution','added\x201420\x20packages\x20in\x2014s\x0a','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','test_auth.py\x20PASS\x0a','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','897459jHXMnu','Test\x20suite\x20run\x20starting...\x0a','2611992nXKFKn','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','All\x20303\x20tests\x20passed\x20in\x204.22s.','pytest\x20tests/app','30plTIpN','gpt-4o','20VmchyJ','Database\x20successfully\x20seeded!','3972762WYDWyy','defineProperty','3328677rjKQOQ','Optimizing\x20assets...\x0a','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a'];a0_0x22b6=function(){return _0x10bb80;};return a0_0x22b6();}console['log'](a0_0x556acc(0x202)),process.env.TRIMPROMPT_MODEL=a0_0x556acc(0x1ff),tracker_1[a0_0x556acc(0x1f9)]['logExecution']('npm\x20run\x20build','Compilation\x20Output:\x0a'+a0_0x556acc(0x1f8)+a0_0x556acc(0x1ef)+a0_0x556acc(0x204)['repeat'](0x190),a0_0x556acc(0x1f0),0x0),process.env.TRIMPROMPT_MODEL=a0_0x556acc(0x20c),tracker_1[a0_0x556acc(0x1f9)]['logExecution'](a0_0x556acc(0x20a),a0_0x556acc(0x206)+a0_0x556acc(0x203)+a0_0x556acc(0x1f5)+'test_api.py\x20PASS\x0a'['repeat'](0x12c)+a0_0x556acc(0x209),'pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.',0x0),process.env.TRIMPROMPT_MODEL='gemini-1-5-pro',tracker_1[a0_0x556acc(0x1f9)][a0_0x556acc(0x200)](a0_0x556acc(0x1f7),a0_0x556acc(0x208)+'Step\x201/10\x20:\x20FROM\x20node:20\x0a'+a0_0x556acc(0x1f1)+'Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a'+a0_0x556acc(0x201)[a0_0x556acc(0x1fe)](0x3)+a0_0x556acc(0x1f2),'docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.',0x0),console['log'](a0_0x556acc(0x20e));
package/shims.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x370933=a0_0x2bbe;function a0_0x2bbe(_0xe8281f,_0x183f9c){_0xe8281f=_0xe8281f-0x1d0;const _0x16c0f7=a0_0x16c0();let _0x2bbe65=_0x16c0f7[_0xe8281f];return _0x2bbe65;}(function(_0x3d243b,_0x5e2602){const _0x150e7e=a0_0x2bbe,_0x19a3e5=_0x3d243b();while(!![]){try{const _0x415ceb=-parseInt(_0x150e7e(0x214))/0x1*(-parseInt(_0x150e7e(0x22c))/0x2)+-parseInt(_0x150e7e(0x213))/0x3+parseInt(_0x150e7e(0x22f))/0x4+-parseInt(_0x150e7e(0x222))/0x5+-parseInt(_0x150e7e(0x1d5))/0x6+parseInt(_0x150e7e(0x1e6))/0x7*(parseInt(_0x150e7e(0x1e5))/0x8)+-parseInt(_0x150e7e(0x20a))/0x9;if(_0x415ceb===_0x5e2602)break;else _0x19a3e5['push'](_0x19a3e5['shift']());}catch(_0x360b70){_0x19a3e5['push'](_0x19a3e5['shift']());}}}(a0_0x16c0,0xd8cb1));var __createBinding=this&&this['__createBinding']||(Object[a0_0x370933(0x209)]?function(_0x315833,_0x2d93a6,_0x38cbad,_0x50edfc){const _0x5605bf=a0_0x370933;if(_0x50edfc===undefined)_0x50edfc=_0x38cbad;var _0x1cc8ca=Object[_0x5605bf(0x1e1)](_0x2d93a6,_0x38cbad);(!_0x1cc8ca||(_0x5605bf(0x1f6)in _0x1cc8ca?!_0x2d93a6[_0x5605bf(0x239)]:_0x1cc8ca[_0x5605bf(0x1e8)]||_0x1cc8ca[_0x5605bf(0x1fb)]))&&(_0x1cc8ca={'enumerable':!![],'get':function(){return _0x2d93a6[_0x38cbad];}}),Object[_0x5605bf(0x201)](_0x315833,_0x50edfc,_0x1cc8ca);}:function(_0x1b451f,_0x8c4ff1,_0x14de81,_0x47d518){if(_0x47d518===undefined)_0x47d518=_0x14de81;_0x1b451f[_0x47d518]=_0x8c4ff1[_0x14de81];}),__setModuleDefault=this&&this[a0_0x370933(0x1e2)]||(Object[a0_0x370933(0x209)]?function(_0x1f3e0c,_0x10b847){const _0xbe99ae=a0_0x370933;Object[_0xbe99ae(0x201)](_0x1f3e0c,_0xbe99ae(0x232),{'enumerable':!![],'value':_0x10b847});}:function(_0x20645b,_0x13167c){const _0xbfd2=a0_0x370933;_0x20645b[_0xbfd2(0x232)]=_0x13167c;}),__importStar=this&&this[a0_0x370933(0x21a)]||(function(){var _0x538c50=function(_0x3ee9f9){const _0x1ed54b=a0_0x2bbe;return _0x538c50=Object[_0x1ed54b(0x1e7)]||function(_0xd6bbc4){const _0xf3673f=_0x1ed54b;var _0x25b610=[];for(var _0x266c14 in _0xd6bbc4)if(Object['prototype'][_0xf3673f(0x1e9)][_0xf3673f(0x231)](_0xd6bbc4,_0x266c14))_0x25b610[_0x25b610[_0xf3673f(0x1d8)]]=_0x266c14;return _0x25b610;},_0x538c50(_0x3ee9f9);};return function(_0x17c12e){const _0x424cd1=a0_0x2bbe;if(_0x17c12e&&_0x17c12e[_0x424cd1(0x239)])return _0x17c12e;var _0x4206b5={};if(_0x17c12e!=null){for(var _0x40c9ed=_0x538c50(_0x17c12e),_0x5b894d=0x0;_0x5b894d<_0x40c9ed['length'];_0x5b894d++)if(_0x40c9ed[_0x5b894d]!=='default')__createBinding(_0x4206b5,_0x17c12e,_0x40c9ed[_0x5b894d]);}return __setModuleDefault(_0x4206b5,_0x17c12e),_0x4206b5;};}());Object[a0_0x370933(0x201)](exports,a0_0x370933(0x239),{'value':!![]}),exports['installShims']=installShims,exports[a0_0x370933(0x233)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls','tree','cat','read','grep','rg',a0_0x370933(0x21d),'git','gh',a0_0x370933(0x1d3),'cargo','npm','pnpm',a0_0x370933(0x20b),a0_0x370933(0x223),a0_0x370933(0x234),a0_0x370933(0x22a),a0_0x370933(0x23b),a0_0x370933(0x21c),'pip3','go',a0_0x370933(0x23f)],PROFILE_MARKER=a0_0x370933(0x1f1);function getExecSync(){const _0x5063fc=a0_0x370933;return require(_0x5063fc(0x1ea))[_0x5063fc(0x225)];}function getExecFileSync(){const _0x4a38c1=a0_0x370933;return require(_0x4a38c1(0x1ea))[_0x4a38c1(0x23e)];}function ensureProfileContains(_0x5ec15f,_0x442eff,_0x27659d){const _0x23dd69=a0_0x370933;try{const _0x3e85e2=path[_0x23dd69(0x1d1)](_0x5ec15f);!fs[_0x23dd69(0x208)](_0x3e85e2)&&fs[_0x23dd69(0x1fc)](_0x3e85e2,{'recursive':!![]});if(fs[_0x23dd69(0x208)](_0x5ec15f)){const _0x5630fd=fs[_0x23dd69(0x218)](_0x5ec15f,_0x23dd69(0x246));if(_0x5630fd[_0x23dd69(0x230)](_0x442eff))return;fs[_0x23dd69(0x206)](_0x5ec15f,_0x27659d,'utf8');}else fs[_0x23dd69(0x212)](_0x5ec15f,_0x27659d,_0x23dd69(0x246));}catch{}}function removeProfileBlock(_0x3f9a69,_0x1e9350){const _0x55cc40=a0_0x370933;try{if(!fs[_0x55cc40(0x208)](_0x3f9a69))return;const _0x4841fe=fs[_0x55cc40(0x218)](_0x3f9a69,_0x55cc40(0x246));if(!_0x4841fe[_0x55cc40(0x230)](_0x1e9350))return;const _0x2c5eb6=_0x4841fe[_0x55cc40(0x235)]('\x0a'),_0x178f09=[];let _0x7ce14b=![];for(let _0x39dbb2=0x0;_0x39dbb2<_0x2c5eb6[_0x55cc40(0x1d8)];_0x39dbb2++){if(_0x2c5eb6[_0x39dbb2][_0x55cc40(0x230)](_0x1e9350)){_0x7ce14b=!![];continue;}if(_0x7ce14b){_0x7ce14b=![];continue;}_0x178f09[_0x55cc40(0x1eb)](_0x2c5eb6[_0x39dbb2]);}const _0x20330c=_0x178f09['join']('\x0a')[_0x55cc40(0x1f2)](/\n{3,}/g,'\x0a\x0a');fs[_0x55cc40(0x212)](_0x3f9a69,_0x20330c,_0x55cc40(0x246));}catch{}}function collectPowerShellProfiles(){const _0x49432b=a0_0x370933,_0x3b670a=getExecSync(),_0x11f788=[],_0x23eecc=[['powershell',_0x49432b(0x22d)],[_0x49432b(0x1d9),'$PROFILE.CurrentUserAllHosts']];try{_0x3b670a(_0x49432b(0x20c),{'stdio':_0x49432b(0x1d6)}),_0x23eecc['push'](['pwsh',_0x49432b(0x21f)]);}catch{}for(const [_0x10f21e,_0x114051]of _0x23eecc){try{const _0x397ba5=_0x3b670a(_0x10f21e+_0x49432b(0x1fa)+_0x114051+'\x22',{'encoding':_0x49432b(0x246)})[_0x49432b(0x236)]();_0x397ba5&&!_0x11f788['some'](_0x550724=>_0x550724['toLowerCase']()===_0x397ba5['toLowerCase']())&&_0x11f788['push'](_0x397ba5);}catch{}}return _0x11f788;}function getBashProfilesWindows(){const _0x6ab56e=a0_0x370933,_0x5e0cbc=os[_0x6ab56e(0x1db)]();return['.bashrc',_0x6ab56e(0x1fe)][_0x6ab56e(0x1e0)](_0x206b25=>path[_0x6ab56e(0x1de)](_0x5e0cbc,_0x206b25));}function a0_0x16c0(){const _0x2ca328=['================================================================================','Failed\x20to\x20uninstall\x20shims:\x20',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','755','docker','Remove-ItemProperty\x20-Path\x20\x27','14962MEnfwf','$PROFILE.CurrentUserCurrentHost','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','2641212DDrINO','includes','call','default','uninstallShims','kubectl','split','trim','\x0a#\x20','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','__esModule','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','pytest','New-Item\x20-Path\x20\x27','powershell\x20-NoProfile\x20-Command\x20\x22','execFileSync','find','\x20@args\x20}\x0a',')\x20else\x20(','\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27','win32','trim.cmd','.bashrc','utf8','readdirSync','dirname','unlinkSync','glab','.trimprompt','1208514CLDNaE','ignore','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','length','powershell','if\x20(Get-Command\x20trim\x20-ErrorAction\x20SilentlyContinue)\x20{\x20&\x20trim\x20','homedir','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','\x27,\x20\x27User\x27)','join','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','map','getOwnPropertyDescriptor','__setModuleDefault','\x20&\x20','shims','1589288dWZtOU','56hqQcjW','getOwnPropertyNames','writable','hasOwnProperty','child_process','push','pipe','\x20\x22$@\x22;\x20fi\x0a','message',';%PATH%\x22','-NoProfile','TrimPrompt\x20Shims\x20PATH','replace','toLowerCase','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','filter','get','\x20%*','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor',';=%\x22','\x20-NoProfile\x20-Command\x20\x22','configurable','mkdirSync','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','.bash_profile','chmodSync',':$PATH\x22\x0a','defineProperty','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','platform','TrimPrompt\x20successfully\x20installed\x20for\x20','\x0a$env:PATH\x20=\x20\x22','appendFileSync','powershell.exe','existsSync','create','9717984ZOStgg','npx','pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22','\x0aexport\x20PATH=\x22','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)','Failed\x20to\x20install\x20shims:\x20','writeFileSync','862302ANBszq','57UPtvEQ','Set-ItemProperty\x20-Path\x20\x27','.cmd',';\x22\x20+\x20$env:PATH\x0a','readFileSync','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','__importStar','-Command','pip','ruff','.zshrc','$PROFILE.CurrentUserAllHosts','\x22\x20set\x20\x22PATH=','.profile','1096970kruJoh','yarn','\x20@args\x20}\x20else\x20{\x20&\x20','execSync'];a0_0x16c0=function(){return _0x2ca328;};return a0_0x16c0();}function getBroadcastCommand(){return'$sig\x20=\x20\x27[DllImport(\x5c\x22user32.dll\x5c\x22,\x20SetLastError\x20=\x20true,\x20CharSet\x20=\x20CharSet.Auto)]\x20public\x20static\x20extern\x20IntPtr\x20SendMessageTimeout(IntPtr\x20hWnd,\x20uint\x20Msg,\x20IntPtr\x20wParam,\x20string\x20lParam,\x20uint\x20fuFlags,\x20uint\x20uTimeout,\x20out\x20IntPtr\x20lpdwResult);\x27;\x20Add-Type\x20-MemberDefinition\x20$sig\x20-Name\x20\x5c\x22Win32\x5c\x22\x20-Namespace\x20\x5c\x22Win32\x5c\x22\x20-PassThru\x20>\x20$null;\x20[IntPtr]$res\x20=\x200;\x20[void][Win32.Win32]::SendMessageTimeout([IntPtr]0xffff,\x200x001A,\x20[IntPtr]::Zero,\x20\x5c\x22Environment\x5c\x22,\x202,\x201000,\x20[ref]$res);';}function installShims(){const _0x2b7428=a0_0x370933,_0x416c00=path['join'](os[_0x2b7428(0x1db)](),_0x2b7428(0x1d4),_0x2b7428(0x1e4));try{!fs[_0x2b7428(0x208)](_0x416c00)&&fs[_0x2b7428(0x1fc)](_0x416c00,{'recursive':!![]});const _0x41cec1=os[_0x2b7428(0x203)]()===_0x2b7428(0x243);for(const _0x22be5d of SHIMMED_COMMANDS){if(_0x41cec1){const _0x4c6892=path[_0x2b7428(0x1de)](_0x416c00,_0x22be5d+_0x2b7428(0x216)),_0x50aa6b=process.env.APPDATA?path[_0x2b7428(0x1de)](process.env.APPDATA,'npm'):'',_0x3f336c=_0x50aa6b?'if\x20exist\x20\x22'+path['join'](_0x50aa6b,_0x2b7428(0x244))+'\x22':'if\x20exist\x20\x22%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd\x22',_0x55587f=['@echo\x20off',_0x3f336c+'\x20(','\x20\x20trim\x20'+_0x22be5d+_0x2b7428(0x1f7),_0x2b7428(0x241),'\x20\x20set\x20\x22PATH=%PATH:'+_0x416c00+_0x2b7428(0x1f9),'\x20\x20'+_0x22be5d+_0x2b7428(0x1f7),')'][_0x2b7428(0x1de)]('\x0d\x0a')+'\x0d\x0a';fs[_0x2b7428(0x212)](_0x4c6892,_0x55587f,_0x2b7428(0x246));const _0x5d73db=path[_0x2b7428(0x1de)](_0x416c00,_0x22be5d+'.ps1'),_0x5d0c93=_0x2b7428(0x1da)+_0x22be5d+_0x2b7428(0x224)+_0x22be5d+_0x2b7428(0x240);fs[_0x2b7428(0x212)](_0x5d73db,_0x5d0c93,_0x2b7428(0x246));const _0x5d1de9=path[_0x2b7428(0x1de)](_0x416c00,_0x22be5d),_0x30004b=_0x416c00[_0x2b7428(0x1f2)](/\\/g,'/')[_0x2b7428(0x1f2)](/^([A-Za-z]):/,(_0x6537c4,_0x43ebd0)=>'/'+_0x43ebd0[_0x2b7428(0x1f3)]()),_0x468f5f=_0x2b7428(0x1d7)+_0x22be5d+_0x2b7428(0x23a)+_0x30004b+_0x2b7428(0x228)+_0x22be5d+_0x2b7428(0x1ed);fs[_0x2b7428(0x212)](_0x5d1de9,_0x468f5f,_0x2b7428(0x246));}else{const _0x11206b=path[_0x2b7428(0x1de)](_0x416c00,_0x22be5d),_0x32653c=_0x2b7428(0x1d7)+_0x22be5d+'\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x27s|[^:]*\x5c.trimprompt/shims:||g\x27);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20'+_0x22be5d+_0x2b7428(0x1ed);fs[_0x2b7428(0x212)](_0x11206b,_0x32653c,_0x2b7428(0x246)),fs[_0x2b7428(0x1ff)](_0x11206b,_0x2b7428(0x229));}}let _0x78fdab=![],_0x272775='';if(_0x41cec1)try{const _0x3a30ed=getExecSync(),_0x2377da=_0x2b7428(0x237)+PROFILE_MARKER+_0x2b7428(0x205)+_0x416c00+_0x2b7428(0x217),_0x2b788e=collectPowerShellProfiles();for(const _0x526f00 of _0x2b788e){ensureProfileContains(_0x526f00,_0x416c00,_0x2377da);}try{const _0xc3db45=getExecFileSync(),_0x29c9f5='if\x20exist\x20\x22'+_0x416c00+_0x2b7428(0x220)+_0x416c00+_0x2b7428(0x1ef),_0x42a85c=_0x2b7428(0x1f8);let _0x50d361='';try{const _0x1ed723='try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27'+_0x42a85c+_0x2b7428(0x1fd);_0x50d361=_0xc3db45(_0x2b7428(0x207),[_0x2b7428(0x1f0),_0x2b7428(0x21b),_0x1ed723],{'encoding':_0x2b7428(0x246),'stdio':[_0x2b7428(0x1ec),_0x2b7428(0x1ec),_0x2b7428(0x1d6)]})[_0x2b7428(0x236)]();}catch{}if(!_0x50d361[_0x2b7428(0x230)](_0x416c00)){const _0xd8fe5d=_0x50d361?_0x50d361+'\x20&\x20'+_0x29c9f5:_0x29c9f5,_0x4727c1=_0x2b7428(0x23c)+_0x42a85c+_0x2b7428(0x242)+_0x42a85c+_0x2b7428(0x219)+_0xd8fe5d+'\x27';_0xc3db45(_0x2b7428(0x207),[_0x2b7428(0x1f0),_0x2b7428(0x21b),_0x4727c1],{'stdio':_0x2b7428(0x1d6)});}}catch{}try{const _0x5a8b59=_0x416c00[_0x2b7428(0x1f2)](/\\/g,'/')[_0x2b7428(0x1f2)](/^([A-Za-z]):/,(_0x368a2e,_0x58e3a5)=>'/'+_0x58e3a5[_0x2b7428(0x1f3)]()),_0x35db4a=_0x2b7428(0x237)+PROFILE_MARKER+_0x2b7428(0x20d)+_0x5a8b59+_0x2b7428(0x200),_0x5333ae=getBashProfilesWindows();let _0xccf339=![];for(const _0x5134d1 of _0x5333ae){fs['existsSync'](_0x5134d1)&&(ensureProfileContains(_0x5134d1,_0x5a8b59,_0x35db4a),_0xccf339=!![]);}!_0xccf339&&ensureProfileContains(_0x5333ae[0x0],_0x5a8b59,_0x35db4a);}catch{}const _0x3f5636=_0x2b7428(0x20f),_0x1cfbe6=_0x3a30ed(_0x2b7428(0x23d)+_0x3f5636+'\x22',{'encoding':_0x2b7428(0x246),'stdio':[_0x2b7428(0x1ec),_0x2b7428(0x1ec),_0x2b7428(0x1d6)]})[_0x2b7428(0x236)]();if(!_0x1cfbe6[_0x2b7428(0x230)](_0x416c00)){const _0x43e6c4=_0x416c00+';'+_0x1cfbe6,_0x529bae=_0x43e6c4['replace'](/'/g,'\x27\x27'),_0x360dea='[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27'+_0x529bae+'\x27,\x20\x27User\x27)';_0x3a30ed(_0x2b7428(0x23d)+_0x360dea+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x2b7428(0x1d6)});}const _0x155807=path[_0x2b7428(0x1de)](process.env.APPDATA||'','npm','trim.ps1');if(fs[_0x2b7428(0x208)](_0x155807))try{fs['unlinkSync'](_0x155807);}catch{}_0x78fdab=!![];}catch(_0x572615){_0x272775='Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20'+_0x416c00;}else try{const _0x43fd93='export\x20PATH=\x22'+_0x416c00+_0x2b7428(0x200),_0x4461b9=os['homedir'](),_0x29f8b5=[_0x2b7428(0x245),_0x2b7428(0x21e),_0x2b7428(0x1fe),_0x2b7428(0x221)];let _0x235951=![];for(const _0x2a96a6 of _0x29f8b5){const _0x8a1eaf=path['join'](_0x4461b9,_0x2a96a6);fs[_0x2b7428(0x208)](_0x8a1eaf)&&(ensureProfileContains(_0x8a1eaf,_0x416c00,_0x2b7428(0x237)+PROFILE_MARKER+'\x0a'+_0x43fd93),_0x235951=!![]);}if(!_0x235951){const _0xe210c=path[_0x2b7428(0x1de)](_0x4461b9,_0x2b7428(0x245));ensureProfileContains(_0xe210c,_0x416c00,_0x2b7428(0x237)+PROFILE_MARKER+'\x0a'+_0x43fd93);}_0x78fdab=!![];}catch(_0xae0337){_0x272775=_0x2b7428(0x1dc)+_0x416c00+':$PATH\x22';}const _0x3ac55b=[_0x2b7428(0x226),_0x2b7428(0x1df),'================================================================================',_0x2b7428(0x210),_0x2b7428(0x202),_0x2b7428(0x226)]['join']('\x0a'),_0x82a00c=_0x78fdab?_0x3ac55b:_0x2b7428(0x204)+SHIMMED_COMMANDS['length']+_0x2b7428(0x238)+_0x272775;return{'success':!![],'pathDir':_0x416c00,'message':_0x82a00c};}catch(_0x3c9849){return{'success':![],'pathDir':_0x416c00,'message':_0x2b7428(0x211)+_0x3c9849[_0x2b7428(0x1ee)]};}}function uninstallShims(){const _0x2b6642=a0_0x370933,_0x1f0172=path[_0x2b6642(0x1de)](os[_0x2b6642(0x1db)](),_0x2b6642(0x1d4),_0x2b6642(0x1e4)),_0x42fbc1=os['platform']()==='win32';try{if(_0x42fbc1){const _0x3c3042=getExecSync();try{const _0x291ad7=getExecFileSync(),_0x3fd439='HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor',_0xf51245='try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27'+_0x3fd439+'\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}',_0x782446=_0x291ad7(_0x2b6642(0x207),[_0x2b6642(0x1f0),_0x2b6642(0x21b),_0xf51245],{'encoding':_0x2b6642(0x246),'stdio':[_0x2b6642(0x1ec),_0x2b6642(0x1ec),_0x2b6642(0x1d6)]})['trim']();if(_0x782446['includes'](_0x1f0172)){const _0x423ec=_0x782446[_0x2b6642(0x235)]('\x20&\x20')['filter'](_0xdacdd2=>!_0xdacdd2['includes'](_0x1f0172));if(_0x423ec[_0x2b6642(0x1d8)]===0x0){const _0x53604c=_0x2b6642(0x22b)+_0x3fd439+_0x2b6642(0x22e);_0x291ad7('powershell.exe',[_0x2b6642(0x1f0),_0x2b6642(0x21b),_0x53604c],{'stdio':'ignore'});}else{const _0x4546c6=_0x423ec['join'](_0x2b6642(0x1e3)),_0x5d2365=_0x2b6642(0x215)+_0x3fd439+_0x2b6642(0x219)+_0x4546c6+'\x27';_0x291ad7(_0x2b6642(0x207),['-NoProfile',_0x2b6642(0x21b),_0x5d2365],{'stdio':'ignore'});}}}catch{}try{const _0x58ebe7=collectPowerShellProfiles();for(const _0x374b9f of _0x58ebe7){removeProfileBlock(_0x374b9f,PROFILE_MARKER);}}catch{}try{for(const _0x118795 of getBashProfilesWindows()){removeProfileBlock(_0x118795,PROFILE_MARKER);}}catch{}try{const _0x444256=_0x2b6642(0x20f),_0x4aab49=_0x3c3042(_0x2b6642(0x23d)+_0x444256+'\x22',{'encoding':_0x2b6642(0x246),'stdio':[_0x2b6642(0x1ec),_0x2b6642(0x1ec),_0x2b6642(0x1d6)]})['trim']();if(_0x4aab49['includes'](_0x1f0172)){const _0x5d0c39=_0x4aab49[_0x2b6642(0x235)](';')[_0x2b6642(0x1f5)](_0x8b5d81=>_0x8b5d81[_0x2b6642(0x236)]()[_0x2b6642(0x1f3)]()!==_0x1f0172[_0x2b6642(0x1f3)]())['join'](';'),_0x5a87f0=_0x5d0c39[_0x2b6642(0x1f2)](/'/g,'\x27\x27'),_0x7b4ff8=_0x2b6642(0x1f4)+_0x5a87f0+_0x2b6642(0x1dd);_0x3c3042(_0x2b6642(0x23d)+_0x7b4ff8+';\x20'+getBroadcastCommand()+'\x22',{'stdio':'ignore'});}}catch{}}else{const _0x2f7cf9=os[_0x2b6642(0x1db)](),_0x1cc797=[_0x2b6642(0x245),'.zshrc',_0x2b6642(0x1fe),_0x2b6642(0x221)];for(const _0x15cd0f of _0x1cc797){removeProfileBlock(path[_0x2b6642(0x1de)](_0x2f7cf9,_0x15cd0f),PROFILE_MARKER);}}if(fs['existsSync'](_0x1f0172)){const _0x24844b=fs[_0x2b6642(0x1d0)](_0x1f0172);for(const _0x4f19cf of _0x24844b){fs[_0x2b6642(0x1d2)](path[_0x2b6642(0x1de)](_0x1f0172,_0x4f19cf));}fs['rmdirSync'](_0x1f0172);}return{'success':!![],'message':_0x2b6642(0x20e)};}catch(_0x1fd272){return{'success':![],'message':_0x2b6642(0x227)+_0x1fd272[_0x2b6642(0x1ee)]};}}
1
+ 'use strict';const a0_0x3c886e=a0_0x33d6;(function(_0x585440,_0x2619e0){const _0x5772bc=a0_0x33d6,_0x4b06ec=_0x585440();while(!![]){try{const _0x2b514e=parseInt(_0x5772bc(0x7b))/0x1*(-parseInt(_0x5772bc(0xde))/0x2)+-parseInt(_0x5772bc(0xb2))/0x3+-parseInt(_0x5772bc(0xa0))/0x4+-parseInt(_0x5772bc(0x90))/0x5*(-parseInt(_0x5772bc(0x6f))/0x6)+-parseInt(_0x5772bc(0xa4))/0x7+-parseInt(_0x5772bc(0xe2))/0x8*(parseInt(_0x5772bc(0xeb))/0x9)+parseInt(_0x5772bc(0xaf))/0xa;if(_0x2b514e===_0x2619e0)break;else _0x4b06ec['push'](_0x4b06ec['shift']());}catch(_0x232fa1){_0x4b06ec['push'](_0x4b06ec['shift']());}}}(a0_0x2e01,0xe213b));var __createBinding=this&&this[a0_0x3c886e(0xe1)]||(Object[a0_0x3c886e(0x9b)]?function(_0x27a04b,_0x3ce690,_0x4b2c93,_0xead2cf){const _0x4ce157=a0_0x3c886e;if(_0xead2cf===undefined)_0xead2cf=_0x4b2c93;var _0x30ef03=Object[_0x4ce157(0xbd)](_0x3ce690,_0x4b2c93);(!_0x30ef03||('get'in _0x30ef03?!_0x3ce690['__esModule']:_0x30ef03[_0x4ce157(0x9d)]||_0x30ef03['configurable']))&&(_0x30ef03={'enumerable':!![],'get':function(){return _0x3ce690[_0x4b2c93];}}),Object['defineProperty'](_0x27a04b,_0xead2cf,_0x30ef03);}:function(_0x337f9f,_0x3b43d5,_0x3c848c,_0x34b6b6){if(_0x34b6b6===undefined)_0x34b6b6=_0x3c848c;_0x337f9f[_0x34b6b6]=_0x3b43d5[_0x3c848c];}),__setModuleDefault=this&&this[a0_0x3c886e(0x86)]||(Object[a0_0x3c886e(0x9b)]?function(_0x2696aa,_0x5b4a34){const _0x1fa77d=a0_0x3c886e;Object[_0x1fa77d(0xd5)](_0x2696aa,'default',{'enumerable':!![],'value':_0x5b4a34});}:function(_0x1996ec,_0x1416c4){const _0x2b13eb=a0_0x3c886e;_0x1996ec[_0x2b13eb(0x7e)]=_0x1416c4;}),__importStar=this&&this[a0_0x3c886e(0xc2)]||(function(){var _0x12988c=function(_0x316682){const _0x3e419c=a0_0x33d6;return _0x12988c=Object[_0x3e419c(0xdf)]||function(_0x3c2418){const _0x4f78ff=_0x3e419c;var _0x3b1728=[];for(var _0x436157 in _0x3c2418)if(Object[_0x4f78ff(0xea)][_0x4f78ff(0x79)][_0x4f78ff(0x8b)](_0x3c2418,_0x436157))_0x3b1728[_0x3b1728[_0x4f78ff(0x94)]]=_0x436157;return _0x3b1728;},_0x12988c(_0x316682);};return function(_0x3bc3f6){const _0x5979fd=a0_0x33d6;if(_0x3bc3f6&&_0x3bc3f6[_0x5979fd(0xdd)])return _0x3bc3f6;var _0x13831f={};if(_0x3bc3f6!=null){for(var _0x22480b=_0x12988c(_0x3bc3f6),_0x2d0b73=0x0;_0x2d0b73<_0x22480b[_0x5979fd(0x94)];_0x2d0b73++)if(_0x22480b[_0x2d0b73]!==_0x5979fd(0x7e))__createBinding(_0x13831f,_0x3bc3f6,_0x22480b[_0x2d0b73]);}return __setModuleDefault(_0x13831f,_0x3bc3f6),_0x13831f;};}());Object[a0_0x3c886e(0xd5)](exports,a0_0x3c886e(0xdd),{'value':!![]}),exports[a0_0x3c886e(0x71)]=installShims,exports[a0_0x3c886e(0x7a)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3c886e(0xcc))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls','tree',a0_0x3c886e(0x70),a0_0x3c886e(0xe9),a0_0x3c886e(0xa8),'rg','ruff','git','gh',a0_0x3c886e(0xe7),a0_0x3c886e(0xa1),a0_0x3c886e(0xb0),'pnpm',a0_0x3c886e(0xc1),'yarn','kubectl',a0_0x3c886e(0x99),a0_0x3c886e(0x92),a0_0x3c886e(0xe8),a0_0x3c886e(0xad),'go',a0_0x3c886e(0xdb)],PROFILE_MARKER='TrimPrompt\x20Shims\x20PATH';function getExecSync(){const _0x385145=a0_0x3c886e;return require('child_process')[_0x385145(0xd6)];}function getExecFileSync(){const _0x10181f=a0_0x3c886e;return require(_0x10181f(0x9e))[_0x10181f(0xe3)];}function ensureProfileContains(_0x3094ea,_0x883947,_0x18880e){const _0x338e09=a0_0x3c886e;try{const _0x478213=path[_0x338e09(0xa2)](_0x3094ea);!fs[_0x338e09(0xcd)](_0x478213)&&fs[_0x338e09(0xa6)](_0x478213,{'recursive':!![]});if(fs['existsSync'](_0x3094ea)){const _0x40fb55=fs[_0x338e09(0xab)](_0x3094ea,_0x338e09(0x77));if(_0x40fb55[_0x338e09(0xc6)](_0x883947))return;fs[_0x338e09(0xc8)](_0x3094ea,_0x18880e,_0x338e09(0x77));}else fs[_0x338e09(0x84)](_0x3094ea,_0x18880e,_0x338e09(0x77));}catch{}}function removeProfileBlock(_0x130307,_0x16c88c){const _0x5976d6=a0_0x3c886e;try{if(!fs[_0x5976d6(0xcd)](_0x130307))return;const _0x9c0a07=fs[_0x5976d6(0xab)](_0x130307,'utf8');if(!_0x9c0a07[_0x5976d6(0xc6)](_0x16c88c))return;const _0x1a6f8c=_0x9c0a07[_0x5976d6(0x8c)]('\x0a'),_0x6fc57a=[];let _0x3a0f04=![];for(let _0x39a4c8=0x0;_0x39a4c8<_0x1a6f8c[_0x5976d6(0x94)];_0x39a4c8++){if(_0x1a6f8c[_0x39a4c8][_0x5976d6(0xc6)](_0x16c88c)){_0x3a0f04=!![];continue;}if(_0x3a0f04){_0x3a0f04=![];continue;}_0x6fc57a[_0x5976d6(0xd0)](_0x1a6f8c[_0x39a4c8]);}const _0x21b166=_0x6fc57a[_0x5976d6(0xb1)]('\x0a')[_0x5976d6(0xcb)](/\n{3,}/g,'\x0a\x0a');fs[_0x5976d6(0x84)](_0x130307,_0x21b166,_0x5976d6(0x77));}catch{}}function a0_0x33d6(_0x35d5c1,_0x105eb9){_0x35d5c1=_0x35d5c1-0x6d;const _0x2e01f1=a0_0x2e01();let _0x33d63a=_0x2e01f1[_0x35d5c1];return _0x33d63a;}function a0_0x2e01(){const _0x58da6a=['__setModuleDefault','filter','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','.trimprompt','message','call','split','-NoProfile','readdirSync','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','1476725QBSPMO','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','pytest','Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20','length','\x0aexport\x20PATH=\x22',')\x20else\x20(','\x20\x20set\x20\x22PATH=%PATH:','\x22\x20set\x20\x22PATH=','docker','toLowerCase','create','homedir','writable','child_process','win32','4638944NfDKDS','cargo','dirname',':$PATH\x22','12380655qxhkUX','trim.cmd','mkdirSync','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','grep','\x20-NoProfile\x20-Command\x20\x22','-Command','readFileSync','powershell','pip3','$PROFILE.CurrentUserAllHosts','57713150gmErME','npm','join','1140708AynxvN','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','\x20@args\x20}\x20else\x20{\x20&\x20','\x0a#\x20','pipe','shims','rmdirSync','platform','.cmd','chmodSync','.bashrc','getOwnPropertyDescriptor','$PROFILE.CurrentUserCurrentHost','powershell.exe','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','npx','__importStar','$sig\x20=\x20\x27[DllImport(\x5c\x22user32.dll\x5c\x22,\x20SetLastError\x20=\x20true,\x20CharSet\x20=\x20CharSet.Auto)]\x20public\x20static\x20extern\x20IntPtr\x20SendMessageTimeout(IntPtr\x20hWnd,\x20uint\x20Msg,\x20IntPtr\x20wParam,\x20string\x20lParam,\x20uint\x20fuFlags,\x20uint\x20uTimeout,\x20out\x20IntPtr\x20lpdwResult);\x27;\x20Add-Type\x20-MemberDefinition\x20$sig\x20-Name\x20\x5c\x22Win32\x5c\x22\x20-Namespace\x20\x5c\x22Win32\x5c\x22\x20-PassThru\x20>\x20$null;\x20[IntPtr]$res\x20=\x200;\x20[void][Win32.Win32]::SendMessageTimeout([IntPtr]0xffff,\x200x001A,\x20[IntPtr]::Zero,\x20\x5c\x22Environment\x5c\x22,\x202,\x201000,\x20[ref]$res);','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','includes','trim','appendFileSync','unlinkSync','TrimPrompt\x20successfully\x20installed\x20for\x20','replace','path','existsSync','755','\x20@args\x20}\x0a','push','export\x20PATH=\x22','Remove-ItemProperty\x20-Path\x20\x27','.ps1','New-Item\x20-Path\x20\x27','defineProperty','execSync','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','powershell\x20-NoProfile\x20-Command\x20\x22','\x20\x22$@\x22;\x20fi\x0a','find','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','__esModule','2721146XGKLGB','getOwnPropertyNames','map','__createBinding','8jMGYbe','execFileSync','ignore','if\x20exist\x20\x22%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd\x22','\x20&\x20','glab','pip','read','prototype','4242951hlCRfq','Failed\x20to\x20install\x20shims:\x20','Failed\x20to\x20uninstall\x20shims:\x20',';%PATH%\x22','6FXjriN','cat','installShims','Set-ItemProperty\x20-Path\x20\x27','\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27','.zshrc',':$PATH\x22\x0a',';=%\x22','utf8','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','hasOwnProperty','uninstallShims','1deNElr','\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)','\x27,\x20\x27User\x27)','default','.profile','some','@echo\x20off','================================================================================','.bash_profile','writeFileSync','\x20%*'];a0_0x2e01=function(){return _0x58da6a;};return a0_0x2e01();}function collectPowerShellProfiles(){const _0x51cf52=a0_0x3c886e,_0xc437f2=getExecSync(),_0x4608e7=[],_0x35cb0b=[[_0x51cf52(0xac),_0x51cf52(0xbe)],[_0x51cf52(0xac),_0x51cf52(0xae)]];try{_0xc437f2('pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22',{'stdio':_0x51cf52(0xe4)}),_0x35cb0b[_0x51cf52(0xd0)](['pwsh',_0x51cf52(0xae)]);}catch{}for(const [_0x58d9b4,_0x3958d6]of _0x35cb0b){try{const _0x182a23=_0xc437f2(_0x58d9b4+_0x51cf52(0xa9)+_0x3958d6+'\x22',{'encoding':'utf8'})[_0x51cf52(0xc7)]();_0x182a23&&!_0x4608e7[_0x51cf52(0x80)](_0xcdff02=>_0xcdff02['toLowerCase']()===_0x182a23[_0x51cf52(0x9a)]())&&_0x4608e7[_0x51cf52(0xd0)](_0x182a23);}catch{}}return _0x4608e7;}function getBashProfilesWindows(){const _0x4cac8b=a0_0x3c886e,_0xfe75c0=os[_0x4cac8b(0x9c)]();return[_0x4cac8b(0xbc),'.bash_profile'][_0x4cac8b(0xe0)](_0x725e8a=>path[_0x4cac8b(0xb1)](_0xfe75c0,_0x725e8a));}function getBroadcastCommand(){const _0x4f002c=a0_0x3c886e;return _0x4f002c(0xc3);}function installShims(){const _0x38ebe2=a0_0x3c886e,_0x414a59=path[_0x38ebe2(0xb1)](os[_0x38ebe2(0x9c)](),_0x38ebe2(0x89),'shims');try{!fs[_0x38ebe2(0xcd)](_0x414a59)&&fs['mkdirSync'](_0x414a59,{'recursive':!![]});const _0x3719e6=os['platform']()===_0x38ebe2(0x9f);for(const _0x4283f1 of SHIMMED_COMMANDS){if(_0x3719e6){const _0x4658e6=path['join'](_0x414a59,_0x4283f1+_0x38ebe2(0xba)),_0x4ee3f8=process.env.APPDATA?path[_0x38ebe2(0xb1)](process.env.APPDATA,_0x38ebe2(0xb0)):'',_0x4be3b2=_0x4ee3f8?'if\x20exist\x20\x22'+path['join'](_0x4ee3f8,_0x38ebe2(0xa5))+'\x22':_0x38ebe2(0xe5),_0x30f26c=[_0x38ebe2(0x81),_0x4be3b2+'\x20(','\x20\x20trim\x20'+_0x4283f1+_0x38ebe2(0x85),_0x38ebe2(0x96),_0x38ebe2(0x97)+_0x414a59+_0x38ebe2(0x76),'\x20\x20'+_0x4283f1+_0x38ebe2(0x85),')'][_0x38ebe2(0xb1)]('\x0d\x0a')+'\x0d\x0a';fs[_0x38ebe2(0x84)](_0x4658e6,_0x30f26c,_0x38ebe2(0x77));const _0x3a9b05=path[_0x38ebe2(0xb1)](_0x414a59,_0x4283f1+_0x38ebe2(0xd3)),_0x4a3df4='if\x20(Get-Command\x20trim\x20-ErrorAction\x20SilentlyContinue)\x20{\x20&\x20trim\x20'+_0x4283f1+_0x38ebe2(0xb4)+_0x4283f1+_0x38ebe2(0xcf);fs[_0x38ebe2(0x84)](_0x3a9b05,_0x4a3df4,'utf8');const _0x2db220=path['join'](_0x414a59,_0x4283f1),_0x4aac16=_0x414a59['replace'](/\\/g,'/')[_0x38ebe2(0xcb)](/^([A-Za-z]):/,(_0x4e68fb,_0x114068)=>'/'+_0x114068['toLowerCase']()),_0x4027c6=_0x38ebe2(0xc4)+_0x4283f1+'\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|'+_0x4aac16+_0x38ebe2(0xc5)+_0x4283f1+_0x38ebe2(0xda);fs[_0x38ebe2(0x84)](_0x2db220,_0x4027c6,_0x38ebe2(0x77));}else{const _0x3e7291=path[_0x38ebe2(0xb1)](_0x414a59,_0x4283f1),_0x4cee62=_0x38ebe2(0xc4)+_0x4283f1+'\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x27s|[^:]*\x5c.trimprompt/shims:||g\x27);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20'+_0x4283f1+_0x38ebe2(0xda);fs[_0x38ebe2(0x84)](_0x3e7291,_0x4cee62,'utf8'),fs[_0x38ebe2(0xbb)](_0x3e7291,_0x38ebe2(0xce));}}let _0x40607b=![],_0x21a446='';if(_0x3719e6)try{const _0x1a09a7=getExecSync(),_0x19b50d=_0x38ebe2(0xb5)+PROFILE_MARKER+'\x0a$env:PATH\x20=\x20\x22'+_0x414a59+';\x22\x20+\x20$env:PATH\x0a',_0x581991=collectPowerShellProfiles();for(const _0x4f6eba of _0x581991){ensureProfileContains(_0x4f6eba,_0x414a59,_0x19b50d);}try{const _0x50f476=getExecFileSync(),_0x1d8649='if\x20exist\x20\x22'+_0x414a59+_0x38ebe2(0x98)+_0x414a59+_0x38ebe2(0x6e),_0x17895a=_0x38ebe2(0xb3);let _0x1e36d0='';try{const _0x535d72='try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27'+_0x17895a+'\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}';_0x1e36d0=_0x50f476(_0x38ebe2(0xbf),[_0x38ebe2(0x8d),_0x38ebe2(0xaa),_0x535d72],{'encoding':_0x38ebe2(0x77),'stdio':[_0x38ebe2(0xb6),_0x38ebe2(0xb6),_0x38ebe2(0xe4)]})['trim']();}catch{}if(!_0x1e36d0[_0x38ebe2(0xc6)](_0x414a59)){const _0x4acc7f=_0x1e36d0?_0x1e36d0+_0x38ebe2(0xe6)+_0x1d8649:_0x1d8649,_0x957481=_0x38ebe2(0xd4)+_0x17895a+_0x38ebe2(0x73)+_0x17895a+_0x38ebe2(0xdc)+_0x4acc7f+'\x27';_0x50f476('powershell.exe',[_0x38ebe2(0x8d),_0x38ebe2(0xaa),_0x957481],{'stdio':_0x38ebe2(0xe4)});}}catch{}try{const _0x191e73=_0x414a59['replace'](/\\/g,'/')[_0x38ebe2(0xcb)](/^([A-Za-z]):/,(_0x32fc73,_0x363e65)=>'/'+_0x363e65[_0x38ebe2(0x9a)]()),_0x36d0a8=_0x38ebe2(0xb5)+PROFILE_MARKER+_0x38ebe2(0x95)+_0x191e73+_0x38ebe2(0x75),_0x149f23=getBashProfilesWindows();let _0x33db3d=![];for(const _0x2b69f9 of _0x149f23){fs[_0x38ebe2(0xcd)](_0x2b69f9)&&(ensureProfileContains(_0x2b69f9,_0x191e73,_0x36d0a8),_0x33db3d=!![]);}!_0x33db3d&&ensureProfileContains(_0x149f23[0x0],_0x191e73,_0x36d0a8);}catch{}const _0x41a532=_0x38ebe2(0x91),_0x141905=_0x1a09a7(_0x38ebe2(0xd9)+_0x41a532+'\x22',{'encoding':'utf8','stdio':['pipe',_0x38ebe2(0xb6),_0x38ebe2(0xe4)]})[_0x38ebe2(0xc7)]();if(!_0x141905[_0x38ebe2(0xc6)](_0x414a59)){const _0x49f3d2=_0x414a59+';'+_0x141905,_0x1e278a=_0x49f3d2['replace'](/'/g,'\x27\x27'),_0x1fa333='[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27'+_0x1e278a+_0x38ebe2(0x7d);_0x1a09a7(_0x38ebe2(0xd9)+_0x1fa333+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x38ebe2(0xe4)});}const _0x1bdd05=path[_0x38ebe2(0xb1)](process.env.APPDATA||'',_0x38ebe2(0xb0),'trim.ps1');if(fs[_0x38ebe2(0xcd)](_0x1bdd05))try{fs[_0x38ebe2(0xc9)](_0x1bdd05);}catch{}_0x40607b=!![];}catch(_0x10d375){_0x21a446=_0x38ebe2(0x93)+_0x414a59;}else try{const _0x341dda=_0x38ebe2(0xd1)+_0x414a59+_0x38ebe2(0x75),_0x170492=os['homedir'](),_0x5ff585=[_0x38ebe2(0xbc),_0x38ebe2(0x74),_0x38ebe2(0x83),_0x38ebe2(0x7f)];let _0x423da0=![];for(const _0x196e58 of _0x5ff585){const _0x5168c1=path[_0x38ebe2(0xb1)](_0x170492,_0x196e58);fs[_0x38ebe2(0xcd)](_0x5168c1)&&(ensureProfileContains(_0x5168c1,_0x414a59,_0x38ebe2(0xb5)+PROFILE_MARKER+'\x0a'+_0x341dda),_0x423da0=!![]);}if(!_0x423da0){const _0x4f7021=path[_0x38ebe2(0xb1)](_0x170492,_0x38ebe2(0xbc));ensureProfileContains(_0x4f7021,_0x414a59,_0x38ebe2(0xb5)+PROFILE_MARKER+'\x0a'+_0x341dda);}_0x40607b=!![];}catch(_0x35823c){_0x21a446=_0x38ebe2(0xc0)+_0x414a59+_0x38ebe2(0xa3);}const _0x518fa9=[_0x38ebe2(0x82),_0x38ebe2(0xa7),_0x38ebe2(0x82),_0x38ebe2(0x7c),_0x38ebe2(0x88),_0x38ebe2(0x82)][_0x38ebe2(0xb1)]('\x0a'),_0x452bf6=_0x40607b?_0x518fa9:_0x38ebe2(0xca)+SHIMMED_COMMANDS[_0x38ebe2(0x94)]+_0x38ebe2(0xd7)+_0x21a446;return{'success':!![],'pathDir':_0x414a59,'message':_0x452bf6};}catch(_0x2b0806){return{'success':![],'pathDir':_0x414a59,'message':_0x38ebe2(0xec)+_0x2b0806[_0x38ebe2(0x8a)]};}}function uninstallShims(){const _0x59e709=a0_0x3c886e,_0x3590c4=path['join'](os[_0x59e709(0x9c)](),_0x59e709(0x89),_0x59e709(0xb7)),_0x55fe1d=os[_0x59e709(0xb9)]()===_0x59e709(0x9f);try{if(_0x55fe1d){const _0x5e20de=getExecSync();try{const _0x2862e4=getExecFileSync(),_0x4df328=_0x59e709(0xb3),_0x5af4f7=_0x59e709(0x8f)+_0x4df328+'\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}',_0x391587=_0x2862e4(_0x59e709(0xbf),[_0x59e709(0x8d),_0x59e709(0xaa),_0x5af4f7],{'encoding':_0x59e709(0x77),'stdio':['pipe',_0x59e709(0xb6),'ignore']})[_0x59e709(0xc7)]();if(_0x391587[_0x59e709(0xc6)](_0x3590c4)){const _0x2446d1=_0x391587[_0x59e709(0x8c)](_0x59e709(0xe6))['filter'](_0x3c7b96=>!_0x3c7b96[_0x59e709(0xc6)](_0x3590c4));if(_0x2446d1[_0x59e709(0x94)]===0x0){const _0x3570a9=_0x59e709(0xd2)+_0x4df328+_0x59e709(0xd8);_0x2862e4(_0x59e709(0xbf),[_0x59e709(0x8d),_0x59e709(0xaa),_0x3570a9],{'stdio':_0x59e709(0xe4)});}else{const _0x552c6f=_0x2446d1[_0x59e709(0xb1)]('\x20&\x20'),_0x546675=_0x59e709(0x72)+_0x4df328+_0x59e709(0xdc)+_0x552c6f+'\x27';_0x2862e4(_0x59e709(0xbf),[_0x59e709(0x8d),_0x59e709(0xaa),_0x546675],{'stdio':_0x59e709(0xe4)});}}}catch{}try{const _0x136aac=collectPowerShellProfiles();for(const _0x56e06a of _0x136aac){removeProfileBlock(_0x56e06a,PROFILE_MARKER);}}catch{}try{for(const _0x287a21 of getBashProfilesWindows()){removeProfileBlock(_0x287a21,PROFILE_MARKER);}}catch{}try{const _0x27d539=_0x59e709(0x91),_0x5b2fce=_0x5e20de(_0x59e709(0xd9)+_0x27d539+'\x22',{'encoding':'utf8','stdio':[_0x59e709(0xb6),_0x59e709(0xb6),_0x59e709(0xe4)]})[_0x59e709(0xc7)]();if(_0x5b2fce[_0x59e709(0xc6)](_0x3590c4)){const _0x5ead1a=_0x5b2fce['split'](';')[_0x59e709(0x87)](_0x4772b4=>_0x4772b4['trim']()[_0x59e709(0x9a)]()!==_0x3590c4['toLowerCase']())['join'](';'),_0xa4794e=_0x5ead1a['replace'](/'/g,'\x27\x27'),_0x5e9c5c='[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27'+_0xa4794e+'\x27,\x20\x27User\x27)';_0x5e20de('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x5e9c5c+';\x20'+getBroadcastCommand()+'\x22',{'stdio':'ignore'});}}catch{}}else{const _0xac3f28=os[_0x59e709(0x9c)](),_0x28f466=[_0x59e709(0xbc),_0x59e709(0x74),'.bash_profile',_0x59e709(0x7f)];for(const _0x1f1f50 of _0x28f466){removeProfileBlock(path[_0x59e709(0xb1)](_0xac3f28,_0x1f1f50),PROFILE_MARKER);}}if(fs[_0x59e709(0xcd)](_0x3590c4)){const _0x54fceb=fs[_0x59e709(0x8e)](_0x3590c4);for(const _0x35b2c7 of _0x54fceb){fs[_0x59e709(0xc9)](path['join'](_0x3590c4,_0x35b2c7));}fs[_0x59e709(0xb8)](_0x3590c4);}return{'success':!![],'message':_0x59e709(0x78)};}catch(_0x37a68c){return{'success':![],'message':_0x59e709(0x6d)+_0x37a68c[_0x59e709(0x8a)]};}}
package/simulate.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x21a0(_0x171edc,_0x52f0de){_0x171edc=_0x171edc-0xaa;const _0x1f4a1f=a0_0x1f4a();let _0x21a077=_0x1f4a1f[_0x171edc];return _0x21a077;}const a0_0x419e71=a0_0x21a0;(function(_0x55c03b,_0x4e47a1){const _0x3d7403=a0_0x21a0,_0x283788=_0x55c03b();while(!![]){try{const _0x3a6a53=parseInt(_0x3d7403(0xef))/0x1+-parseInt(_0x3d7403(0xdc))/0x2*(parseInt(_0x3d7403(0xea))/0x3)+-parseInt(_0x3d7403(0xd7))/0x4+-parseInt(_0x3d7403(0xcd))/0x5*(-parseInt(_0x3d7403(0xda))/0x6)+-parseInt(_0x3d7403(0xce))/0x7+parseInt(_0x3d7403(0xd3))/0x8*(parseInt(_0x3d7403(0xcb))/0x9)+-parseInt(_0x3d7403(0xe3))/0xa*(-parseInt(_0x3d7403(0xeb))/0xb);if(_0x3a6a53===_0x4e47a1)break;else _0x283788['push'](_0x283788['shift']());}catch(_0x1cfdac){_0x283788['push'](_0x283788['shift']());}}}(a0_0x1f4a,0x8dfba));Object[a0_0x419e71(0xe7)](exports,a0_0x419e71(0xb0),{'value':!![]});const tracker_1=require(a0_0x419e71(0xd9));function a0_0x1f4a(){const _0x4b1a69=['repeat','Completed\x203\x20of\x203\x20assets\x20successfully.','git\x20diff\x20main','comp','npm\x20run\x20lint:\x20✖\x202\x20warnings','__esModule','found\x200\x20vulnerabilities\x0a','NAME\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20READY\x20\x20\x20STATUS\x20\x20\x20\x20RESTARTS\x20\x20\x20AGE\x0a','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','gemini-1-5-pro','npm\x20install\x20lodash\x20express\x20uuid\x20react','timestamp','homedir','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x0aindex\x201234..5678\x20100644\x0a---\x20a/src/cli.ts\x0a+++\x20b/src/cli.ts\x0a@@\x20-10,6\x20+10,12\x20@@\x0a+\x20//\x20Added\x20new\x20telemetry\x20features\x0a+\x20console.log(\x22Initializing\x20sync\x20daemon...\x22);\x0a+\x20startSync();\x0a','✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','postgres-db-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','cargo\x20test','exitCode','pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a','utf8','tracker','getLogs','log','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a','pip\x20install\x20tensorflow\x20pandas\x20numpy','commit\x20f6e5d4c3b2a1\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2013:30:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20fix:\x20adjust\x20margins\x20on\x20visual\x20graph','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','cargo\x20test:\x2045\x20passed,\x200\x20failed.','claude-3-opus','aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','2501973jUQZYQ','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','35170XNMvpb','2298961PdBhyr','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','logExecution','claude-3-5-sonnet','8zxiiQQ','workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.','upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a','trimprompt-api-567fdb7d6-x8w9q\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a','2145420OngrBj','commit\x20a1b2c3d4e5f6\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2014:00:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20feat:\x20add\x20dynamic\x20token\x20costs\x0a\x0a','./tracker','90spdEIg','trimprompt-sync-324db87d1-p8q2e\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a','2313350kNsBHI','cmd','raw','length','test\x20tests::test_case_','gpt-4o-mini','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','87730SkuAkp','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a','git\x20log\x20-n\x205','now','defineProperty','stringify','floor','3zpyFaz','2233qLdBJs','npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','npm\x20run\x20lint','438589pWuxQk','stats.json'];a0_0x1f4a=function(){return _0x4b1a69;};return a0_0x1f4a();}console['log'](a0_0x419e71(0xc7));const models=[a0_0x419e71(0xd2),'gpt-4o',a0_0x419e71(0xe1),a0_0x419e71(0xb4),'gemini-1-5-flash',a0_0x419e71(0xc9)],commands=[{'cmd':a0_0x419e71(0xad),'raw':a0_0x419e71(0xb8)[a0_0x419e71(0xab)](0x32),'comp':a0_0x419e71(0xcf),'exitCode':0x0},{'cmd':a0_0x419e71(0xbb),'raw':a0_0x419e71(0xe4)+a0_0x419e71(0xe0)[a0_0x419e71(0xab)](0x28)+'\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','comp':a0_0x419e71(0xc8),'exitCode':0x0},{'cmd':a0_0x419e71(0xb5),'raw':a0_0x419e71(0xec)+a0_0x419e71(0xb3)+a0_0x419e71(0xb1),'comp':a0_0x419e71(0xc3),'exitCode':0x0},{'cmd':a0_0x419e71(0xca),'raw':a0_0x419e71(0xbe)+a0_0x419e71(0xd5)+'upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a'+a0_0x419e71(0xac),'comp':a0_0x419e71(0xcc),'exitCode':0x0},{'cmd':'kubectl\x20get\x20pods\x20-n\x20production','raw':a0_0x419e71(0xb2)+a0_0x419e71(0xd6)+a0_0x419e71(0xdb)+'redis-master-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a'+a0_0x419e71(0xba),'comp':a0_0x419e71(0xe2),'exitCode':0x0},{'cmd':a0_0x419e71(0xc5),'raw':'Collecting\x20tensorflow\x0a\x20\x20Downloading\x20tensorflow-2.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\x20(475.2\x20MB)\x0a'+'\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a'+a0_0x419e71(0xed),'comp':a0_0x419e71(0xbd),'exitCode':0x0},{'cmd':a0_0x419e71(0xe5),'raw':a0_0x419e71(0xd8)+a0_0x419e71(0xc6),'comp':a0_0x419e71(0xd0),'exitCode':0x0},{'cmd':a0_0x419e71(0xee),'raw':'src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a'+a0_0x419e71(0xc4)+a0_0x419e71(0xb9),'comp':a0_0x419e71(0xaf),'exitCode':0x0}],startTime=Date[a0_0x419e71(0xe6)]()-0x36ee80;for(let i=0x0;i<0xc;i++){const model=models[i%models[a0_0x419e71(0xdf)]],commandItem=commands[Math[a0_0x419e71(0xe9)](Math['random']()*commands[a0_0x419e71(0xdf)])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)['toISOString'](),log=tracker_1[a0_0x419e71(0xc0)][a0_0x419e71(0xd1)](commandItem[a0_0x419e71(0xdd)],commandItem[a0_0x419e71(0xde)],commandItem[a0_0x419e71(0xae)],commandItem[a0_0x419e71(0xbc)]),logs=tracker_1[a0_0x419e71(0xc0)][a0_0x419e71(0xc1)]();logs['length']>0x0&&(logs[logs['length']-0x1][a0_0x419e71(0xb6)]=timestamp,require('fs')['writeFileSync'](require('path')['join'](require('os')[a0_0x419e71(0xb7)](),'.trimprompt',a0_0x419e71(0xaa)),JSON[a0_0x419e71(0xe8)](logs,null,0x2),a0_0x419e71(0xbf)));}console[a0_0x419e71(0xc2)](a0_0x419e71(0xd4));
1
+ 'use strict';const a0_0x18ea24=a0_0x36fb;(function(_0x11cdec,_0x13e65b){const _0x23e0b4=a0_0x36fb,_0xf8cfb4=_0x11cdec();while(!![]){try{const _0x54d44a=parseInt(_0x23e0b4(0xfa))/0x1*(parseInt(_0x23e0b4(0x107))/0x2)+parseInt(_0x23e0b4(0xe9))/0x3+parseInt(_0x23e0b4(0xd4))/0x4+-parseInt(_0x23e0b4(0xde))/0x5+parseInt(_0x23e0b4(0xe4))/0x6*(-parseInt(_0x23e0b4(0xf5))/0x7)+-parseInt(_0x23e0b4(0xf1))/0x8*(parseInt(_0x23e0b4(0xd5))/0x9)+parseInt(_0x23e0b4(0xf6))/0xa;if(_0x54d44a===_0x13e65b)break;else _0xf8cfb4['push'](_0xf8cfb4['shift']());}catch(_0x49d8ae){_0xf8cfb4['push'](_0xf8cfb4['shift']());}}}(a0_0x526f,0x9af06));Object[a0_0x18ea24(0xff)](exports,'__esModule',{'value':!![]});const tracker_1=require(a0_0x18ea24(0xdd));console[a0_0x18ea24(0xe6)](a0_0x18ea24(0xd3));const models=['claude-3-5-sonnet',a0_0x18ea24(0xd0),'gpt-4o-mini','gemini-1-5-pro',a0_0x18ea24(0xd6),'claude-3-opus'],commands=[{'cmd':a0_0x18ea24(0xf3),'raw':a0_0x18ea24(0xea)[a0_0x18ea24(0xe3)](0x32),'comp':a0_0x18ea24(0xf9),'exitCode':0x0},{'cmd':a0_0x18ea24(0xe2),'raw':a0_0x18ea24(0xd2)+a0_0x18ea24(0x103)['repeat'](0x28)+a0_0x18ea24(0xcb),'comp':a0_0x18ea24(0x105),'exitCode':0x0},{'cmd':a0_0x18ea24(0xf2),'raw':'npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a'+a0_0x18ea24(0xeb)+a0_0x18ea24(0xe7),'comp':a0_0x18ea24(0xef),'exitCode':0x0},{'cmd':a0_0x18ea24(0xcf),'raw':'upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a'+'upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a'+a0_0x18ea24(0xcc)+a0_0x18ea24(0xfd),'comp':a0_0x18ea24(0xee),'exitCode':0x0},{'cmd':a0_0x18ea24(0xed),'raw':'NAME\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20READY\x20\x20\x20STATUS\x20\x20\x20\x20RESTARTS\x20\x20\x20AGE\x0a'+a0_0x18ea24(0xf8)+'trimprompt-sync-324db87d1-p8q2e\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a'+a0_0x18ea24(0x101)+a0_0x18ea24(0xd8),'comp':a0_0x18ea24(0xda),'exitCode':0x0},{'cmd':a0_0x18ea24(0xe1),'raw':a0_0x18ea24(0xfb)+a0_0x18ea24(0xf0)+a0_0x18ea24(0x106),'comp':'pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','exitCode':0x0},{'cmd':'git\x20log\x20-n\x205','raw':a0_0x18ea24(0xfc)+a0_0x18ea24(0xec),'comp':'git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','exitCode':0x0},{'cmd':a0_0x18ea24(0xdb),'raw':'src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a'+a0_0x18ea24(0xf7)+a0_0x18ea24(0xcd),'comp':'npm\x20run\x20lint:\x20✖\x202\x20warnings','exitCode':0x0}],startTime=Date[a0_0x18ea24(0xe5)]()-0x36ee80;function a0_0x526f(){const _0x15a208=['length','postgres-db-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','stringify','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','npm\x20run\x20lint','toISOString','./tracker','126525oDPkfN','floor','workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.','pip\x20install\x20tensorflow\x20pandas\x20numpy','cargo\x20test','repeat','59448BlvPla','now','log','found\x200\x20vulnerabilities\x0a','utf8','1241034EMkESA','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x0aindex\x201234..5678\x20100644\x0a---\x20a/src/cli.ts\x0a+++\x20b/src/cli.ts\x0a@@\x20-10,6\x20+10,12\x20@@\x0a+\x20//\x20Added\x20new\x20telemetry\x20features\x0a+\x20console.log(\x22Initializing\x20sync\x20daemon...\x22);\x0a+\x20startSync();\x0a','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','commit\x20f6e5d4c3b2a1\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2013:30:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20fix:\x20adjust\x20margins\x20on\x20visual\x20graph','kubectl\x20get\x20pods\x20-n\x20production','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a','680KsCzEa','npm\x20install\x20lodash\x20express\x20uuid\x20react','git\x20diff\x20main','stats.json','399GlYtWv','8560190xDSGEl','src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a','trimprompt-api-567fdb7d6-x8w9q\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','970eSMBem','Collecting\x20tensorflow\x0a\x20\x20Downloading\x20tensorflow-2.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\x20(475.2\x20MB)\x0a','commit\x20a1b2c3d4e5f6\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2014:00:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20feat:\x20add\x20dynamic\x20token\x20costs\x0a\x0a','Completed\x203\x20of\x203\x20assets\x20successfully.','exitCode','defineProperty','getLogs','redis-master-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','timestamp','test\x20tests::test_case_','logExecution','cargo\x20test:\x2045\x20passed,\x200\x20failed.','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','1246sQMyRn','join','\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a','✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','writeFileSync','aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','gpt-4o','homedir','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','1506876IwKETX','108639Omnegt','gemini-1-5-flash'];a0_0x526f=function(){return _0x15a208;};return a0_0x526f();}function a0_0x36fb(_0x14e98b,_0x195b51){_0x14e98b=_0x14e98b-0xcb;const _0x526ff3=a0_0x526f();let _0x36fb63=_0x526ff3[_0x14e98b];return _0x36fb63;}for(let i=0x0;i<0xc;i++){const model=models[i%models[a0_0x18ea24(0xd7)]],commandItem=commands[Math[a0_0x18ea24(0xdf)](Math['random']()*commands[a0_0x18ea24(0xd7)])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)[a0_0x18ea24(0xdc)](),log=tracker_1['tracker'][a0_0x18ea24(0x104)](commandItem['cmd'],commandItem['raw'],commandItem['comp'],commandItem[a0_0x18ea24(0xfe)]),logs=tracker_1['tracker'][a0_0x18ea24(0x100)]();logs['length']>0x0&&(logs[logs['length']-0x1][a0_0x18ea24(0x102)]=timestamp,require('fs')[a0_0x18ea24(0xce)](require('path')[a0_0x18ea24(0x108)](require('os')[a0_0x18ea24(0xd1)](),'.trimprompt',a0_0x18ea24(0xf4)),JSON[a0_0x18ea24(0xd9)](logs,null,0x2),a0_0x18ea24(0xe8)));}console['log'](a0_0x18ea24(0xe0));