trimprompt 1.0.16 → 1.0.17

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_0x5b9e9f=a0_0x5147;(function(_0x23347d,_0xe4066d){const _0x1b82d3=a0_0x5147,_0x5cf972=_0x23347d();while(!![]){try{const _0x30b508=-parseInt(_0x1b82d3(0x1dd))/0x1*(-parseInt(_0x1b82d3(0x204))/0x2)+parseInt(_0x1b82d3(0x1e8))/0x3*(-parseInt(_0x1b82d3(0x1fe))/0x4)+parseInt(_0x1b82d3(0x21b))/0x5*(parseInt(_0x1b82d3(0x20c))/0x6)+parseInt(_0x1b82d3(0x1e1))/0x7+parseInt(_0x1b82d3(0x1d1))/0x8+-parseInt(_0x1b82d3(0x20f))/0x9+parseInt(_0x1b82d3(0x222))/0xa;if(_0x30b508===_0xe4066d)break;else _0x5cf972['push'](_0x5cf972['shift']());}catch(_0x46bbe2){_0x5cf972['push'](_0x5cf972['shift']());}}}(a0_0x3817,0xee773));var __createBinding=this&&this[a0_0x5b9e9f(0x1c6)]||(Object[a0_0x5b9e9f(0x1c8)]?function(_0x29f68c,_0x4bd94d,_0x523626,_0x9cf5f7){const _0x4da360=a0_0x5b9e9f;if(_0x9cf5f7===undefined)_0x9cf5f7=_0x523626;var _0x525cdf=Object['getOwnPropertyDescriptor'](_0x4bd94d,_0x523626);(!_0x525cdf||(_0x4da360(0x1fa)in _0x525cdf?!_0x4bd94d[_0x4da360(0x209)]:_0x525cdf[_0x4da360(0x1f9)]||_0x525cdf[_0x4da360(0x1d9)]))&&(_0x525cdf={'enumerable':!![],'get':function(){return _0x4bd94d[_0x523626];}}),Object['defineProperty'](_0x29f68c,_0x9cf5f7,_0x525cdf);}:function(_0x5b4701,_0x3de255,_0x17730a,_0x5ece1b){if(_0x5ece1b===undefined)_0x5ece1b=_0x17730a;_0x5b4701[_0x5ece1b]=_0x3de255[_0x17730a];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x5b9e9f(0x1c8)]?function(_0x3e158a,_0x29b69a){const _0x3a9bb0=a0_0x5b9e9f;Object[_0x3a9bb0(0x1c7)](_0x3e158a,'default',{'enumerable':!![],'value':_0x29b69a});}:function(_0x4cba96,_0x12527c){_0x4cba96['default']=_0x12527c;}),__importStar=this&&this['__importStar']||(function(){var _0x1aac4c=function(_0x32f6be){return _0x1aac4c=Object['getOwnPropertyNames']||function(_0x5c77ab){const _0x68520=a0_0x5147;var _0x11e12b=[];for(var _0x1efea8 in _0x5c77ab)if(Object[_0x68520(0x1f6)][_0x68520(0x1c9)][_0x68520(0x1de)](_0x5c77ab,_0x1efea8))_0x11e12b[_0x11e12b[_0x68520(0x1fc)]]=_0x1efea8;return _0x11e12b;},_0x1aac4c(_0x32f6be);};return function(_0x4b17fe){const _0x20c9f1=a0_0x5147;if(_0x4b17fe&&_0x4b17fe['__esModule'])return _0x4b17fe;var _0x471512={};if(_0x4b17fe!=null){for(var _0x2a7033=_0x1aac4c(_0x4b17fe),_0x3397a4=0x0;_0x3397a4<_0x2a7033[_0x20c9f1(0x1fc)];_0x3397a4++)if(_0x2a7033[_0x3397a4]!==_0x20c9f1(0x221))__createBinding(_0x471512,_0x4b17fe,_0x2a7033[_0x3397a4]);}return __setModuleDefault(_0x471512,_0x4b17fe),_0x471512;};}());Object[a0_0x5b9e9f(0x1c7)](exports,a0_0x5b9e9f(0x209),{'value':!![]});function a0_0x3817(){const _0x1fe03a=['executions','160kgebSf','destroy','platform','count','filter','map','default','11529390CsMuSr','command','/api/telemetry','daily_sync.json','existsSync','toISOString','__createBinding','defineProperty','create','hasOwnProperty','application/json','env','trim','.raw.txt','_PS_EP','claude-3-5-sonnet','toString','7915512RQDlrm','timeout','join','catch','timestamp','synced','ai_detected','sort','configurable','https','logs','URL','1395485YqyYOw','call','request','child_process','6048427PBrzdT','username','parse','.trimprompt','utf8','http','telemetry_url','61845McNMYj','split','statusCode','ignore','Gemini\x201.5\x20Flash','.comp.txt','includes','write','tokens_saved','from','estimated_compressed_tokens','model_used','readFileSync','GPT-4o','prototype','writeFileSync','add','writable','get','url','length','round','292FGgEZB','toFixed','port','raw','.up.railway.app','slice','2qcHDju','stringify','search','unlinkSync','https://','__esModule','Claude\x203.5\x20Sonnet','hostname','4902kUWJEI','userInfo','TRIMPROMPT_USER_EMAIL','17517762CsvqPN','protocol','estimated_raw_tokens','config.json','stats.json','Gemini\x201.5\x20Pro','path','entries','byteLength','Claude\x203\x20Opus','comp'];a0_0x3817=function(){return _0x1fe03a;};return a0_0x3817();}function a0_0x5147(_0x405d60,_0x277cb3){const _0x38176b=a0_0x3817();return a0_0x5147=function(_0x514753,_0x13d5cd){_0x514753=_0x514753-0x1c3;let _0x4782e1=_0x38176b[_0x514753];return _0x4782e1;},a0_0x5147(_0x405d60,_0x277cb3);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5b9e9f(0x215))),os=__importStar(require('os')),http=__importStar(require(a0_0x5b9e9f(0x1e6))),https=__importStar(require(a0_0x5b9e9f(0x1da))),url_1=require(a0_0x5b9e9f(0x1fb)),_cfg=[a0_0x5b9e9f(0x208),'trimp-production',a0_0x5b9e9f(0x202),a0_0x5b9e9f(0x224)][a0_0x5b9e9f(0x1d3)](''),_ep=process[a0_0x5b9e9f(0x1cb)][a0_0x5b9e9f(0x1ce)]||_cfg,PRICING={'claude-3-5-sonnet':{'name':a0_0x5b9e9f(0x20a),'input_price_1m':0x3},'claude-3-opus':{'name':a0_0x5b9e9f(0x218),'input_price_1m':0xf},'gpt-4o':{'name':a0_0x5b9e9f(0x1f5),'input_price_1m':0x5},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x5b9e9f(0x214),'input_price_1m':1.25},'gemini-1-5-flash':{'name':a0_0x5b9e9f(0x1ec),'input_price_1m':0.075}},baseDir=path[a0_0x5b9e9f(0x1d3)](os['homedir'](),a0_0x5b9e9f(0x1e4)),configPath=path['join'](baseDir,a0_0x5b9e9f(0x212)),statsPath=path[a0_0x5b9e9f(0x1d3)](baseDir,a0_0x5b9e9f(0x213)),dailySyncPath=path[a0_0x5b9e9f(0x1d3)](baseDir,a0_0x5b9e9f(0x1c3));function getTodayDate(){const _0x3f37ff=a0_0x5b9e9f;return new Date()[_0x3f37ff(0x1c5)]()[_0x3f37ff(0x1e9)]('T')[0x0];}function getDeveloperIdentity(){const _0x31df6e=a0_0x5b9e9f;if(process[_0x31df6e(0x1cb)]['TRIMPROMPT_USER_EMAIL'])return process[_0x31df6e(0x1cb)][_0x31df6e(0x20e)];try{const {execSync:_0x215252}=require(_0x31df6e(0x1e0)),_0x4d2ba3=_0x215252('git\x20config\x20user.email',{'stdio':['ignore','pipe',_0x31df6e(0x1eb)]})[_0x31df6e(0x1d0)]()[_0x31df6e(0x1cc)]();if(_0x4d2ba3&&_0x4d2ba3[_0x31df6e(0x1ee)]('@'))return _0x4d2ba3;}catch{}try{const _0x1a052a=os[_0x31df6e(0x20d)]()[_0x31df6e(0x1e2)];if(_0x1a052a)return _0x1a052a;}catch{}return'anonymous';}function hasAlreadySyncedToday(){const _0x1fc805=a0_0x5b9e9f;try{if(!fs[_0x1fc805(0x1c4)](dailySyncPath))return![];const _0x2f9b66=JSON[_0x1fc805(0x1e3)](fs['readFileSync'](dailySyncPath,_0x1fc805(0x1e5)));return _0x2f9b66['last_sync_date']===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x1dd9c5=a0_0x5b9e9f;try{const _0x49fb0f={'last_sync_date':getTodayDate()};fs[_0x1dd9c5(0x1f7)](dailySyncPath,JSON[_0x1dd9c5(0x205)](_0x49fb0f,null,0x2),_0x1dd9c5(0x1e5));}catch{}}function postTelemetry(_0x36f930,_0x2135c1){return new Promise(_0x502288=>{const _0x2c624e=a0_0x5147;try{const _0x41881d=new url_1[(_0x2c624e(0x1dc))](_0x36f930),_0x224f19=JSON['stringify'](_0x2135c1),_0x250346={'hostname':_0x41881d[_0x2c624e(0x20b)],'port':_0x41881d[_0x2c624e(0x200)]||(_0x41881d[_0x2c624e(0x210)]==='https:'?0x1bb:0x50),'path':_0x41881d['pathname']+_0x41881d[_0x2c624e(0x206)],'method':'POST','headers':{'Content-Type':_0x2c624e(0x1ca),'Content-Length':Buffer[_0x2c624e(0x217)](_0x224f19)},'timeout':0x1f40},_0x28f1c1=_0x41881d['protocol']==='https:'?https:http,_0x5cd909=_0x28f1c1[_0x2c624e(0x1df)](_0x250346,_0x5c6b83=>{const _0x64f630=_0x2c624e;_0x502288(!!(_0x5c6b83['statusCode']&&_0x5c6b83['statusCode']>=0xc8&&_0x5c6b83[_0x64f630(0x1ea)]<0x12c));});_0x5cd909['on']('error',()=>_0x502288(![])),_0x5cd909['on'](_0x2c624e(0x1d2),()=>{const _0x31aa92=_0x2c624e;_0x5cd909[_0x31aa92(0x21c)](),_0x502288(![]);}),_0x5cd909[_0x2c624e(0x1ef)](_0x224f19),_0x5cd909['end']();}catch{_0x502288(![]);}});}function buildDailyPayload(_0x236698){const _0x17dbf5=a0_0x5b9e9f,_0x482c15=getTodayDate(),_0x3eb3b5=_0x236698[_0x17dbf5(0x21f)](_0x1afb6c=>_0x1afb6c[_0x17dbf5(0x1d5)]['startsWith'](_0x482c15)),_0x2aef68=_0x3eb3b5['length']>0x0?_0x3eb3b5:_0x236698,_0x5995aa=_0x2aef68['filter'](_0x4d3a74=>_0x4d3a74[_0x17dbf5(0x1d7)]!==![]);let _0x1d3d27=0x0,_0x41081f=0x0,_0x5b7e83=0x0,_0x22081a=0x0;const _0x1c5353=new Set(),_0x57d5fd={};for(const _0x5a0c2d of _0x5995aa){_0x1d3d27+=_0x5a0c2d[_0x17dbf5(0x211)],_0x41081f+=_0x5a0c2d[_0x17dbf5(0x1f2)],_0x5b7e83+=_0x5a0c2d[_0x17dbf5(0x1f0)],_0x1c5353[_0x17dbf5(0x1f8)](_0x5a0c2d[_0x17dbf5(0x1f3)]);const _0x355cd1=PRICING[_0x5a0c2d[_0x17dbf5(0x1f3)]]||PRICING[_0x17dbf5(0x1cf)];_0x22081a+=_0x5a0c2d[_0x17dbf5(0x1f0)]*_0x355cd1['input_price_1m']/0xf4240;const _0x3bf551=_0x5a0c2d[_0x17dbf5(0x223)]||'unknown';if(!_0x57d5fd[_0x3bf551])_0x57d5fd[_0x3bf551]={'raw':0x0,'comp':0x0,'count':0x0};_0x57d5fd[_0x3bf551][_0x17dbf5(0x201)]+=_0x5a0c2d[_0x17dbf5(0x211)],_0x57d5fd[_0x3bf551][_0x17dbf5(0x219)]+=_0x5a0c2d[_0x17dbf5(0x1f2)],_0x57d5fd[_0x3bf551][_0x17dbf5(0x21e)]+=0x1;}const _0x29d0e0=Object[_0x17dbf5(0x216)](_0x57d5fd)[_0x17dbf5(0x220)](([_0x28ee56,_0xd2c81c])=>({'command':_0x28ee56,'percentage':_0xd2c81c[_0x17dbf5(0x201)]>0x0?Math[_0x17dbf5(0x1fd)]((_0xd2c81c[_0x17dbf5(0x201)]-_0xd2c81c[_0x17dbf5(0x219)])/_0xd2c81c[_0x17dbf5(0x201)]*0x64):0x0,'executions':_0xd2c81c[_0x17dbf5(0x21e)]}))[_0x17dbf5(0x1d8)]((_0x2fe37a,_0x456c3e)=>_0x456c3e[_0x17dbf5(0x21a)]-_0x2fe37a[_0x17dbf5(0x21a)])[_0x17dbf5(0x203)](0x0,0xa),_0xf396d3=_0x5995aa[_0x5995aa[_0x17dbf5(0x1fc)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x17dbf5(0x21d)](),'date':_0x482c15,'executions_count':_0x5995aa[_0x17dbf5(0x1fc)],'total_raw_tokens':_0x1d3d27,'total_compressed_tokens':_0x41081f,'total_tokens_saved':_0x5b7e83,'total_money_saved_usd':parseFloat(_0x22081a[_0x17dbf5(0x1ff)](0x6)),'models_used':Array[_0x17dbf5(0x1f1)](_0x1c5353),'hotspots':_0x29d0e0,'last_seen':_0xf396d3?_0xf396d3[_0x17dbf5(0x1d5)]:new Date()[_0x17dbf5(0x1c5)]()};}async function runSync(){const _0x1438d0=a0_0x5b9e9f;if(!fs[_0x1438d0(0x1c4)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x2e0da2;try{_0x2e0da2=JSON[_0x1438d0(0x1e3)](fs[_0x1438d0(0x1f4)](statsPath,'utf8'));}catch{return;}const _0x5eafcb=_0x2e0da2[_0x1438d0(0x21f)](_0x1f7d3e=>!_0x1f7d3e['synced']);if(_0x5eafcb['length']===0x0)return;const _0x2d53ea=buildDailyPayload(_0x2e0da2);await postTelemetry(_ep,_0x2d53ea);let _0x23919f=process['env']['TRIMPROMPT_TELEMETRY_URL']||'';if(!_0x23919f&&fs[_0x1438d0(0x1c4)](configPath))try{const _0x64c7c1=JSON[_0x1438d0(0x1e3)](fs['readFileSync'](configPath,_0x1438d0(0x1e5)));_0x23919f=_0x64c7c1[_0x1438d0(0x1e7)]||'';}catch{}_0x23919f[_0x1438d0(0x1cc)]()[_0x1438d0(0x1fc)]>0x0&&await postTelemetry(_0x23919f,_0x2d53ea);for(const _0x55c49c of _0x2e0da2){if(!_0x55c49c[_0x1438d0(0x1d6)])_0x55c49c[_0x1438d0(0x1d6)]=!![];}try{fs[_0x1438d0(0x1f7)](statsPath,JSON['stringify'](_0x2e0da2,null,0x2),_0x1438d0(0x1e5));}catch{}markSyncedToday(),pruneOldLogs(_0x2e0da2);}function pruneOldLogs(_0x3f5947){const _0x1e5108=a0_0x5b9e9f;try{const _0x57de54=new Date(),_0x578de6=new Date(_0x57de54['getTime']()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x5a7c7b=[],_0x4bccdf=[];for(const _0x23488e of _0x3f5947){const _0x5ef411=new Date(_0x23488e[_0x1e5108(0x1d5)]);_0x5ef411>=_0x578de6?_0x5a7c7b['push'](_0x23488e):_0x4bccdf['push'](_0x23488e);}if(_0x4bccdf[_0x1e5108(0x1fc)]>0x0){const _0x158df8=path[_0x1e5108(0x1d3)](baseDir,_0x1e5108(0x1db));for(const _0x14333c of _0x4bccdf){const _0x5322b5=path['join'](_0x158df8,_0x14333c['id']+_0x1e5108(0x1cd)),_0x4882b6=path[_0x1e5108(0x1d3)](_0x158df8,_0x14333c['id']+_0x1e5108(0x1ed));try{if(fs['existsSync'](_0x5322b5))fs[_0x1e5108(0x207)](_0x5322b5);if(fs[_0x1e5108(0x1c4)](_0x4882b6))fs['unlinkSync'](_0x4882b6);}catch{}}fs['writeFileSync'](statsPath,JSON[_0x1e5108(0x205)](_0x5a7c7b,null,0x2),'utf8');}}catch{}}runSync()[a0_0x5b9e9f(0x1d4)](()=>{});
1
+ 'use strict';const a0_0x517075=a0_0x5a05;(function(_0x42fa6b,_0x40b75f){const _0x1eea5c=a0_0x5a05,_0x4600e9=_0x42fa6b();while(!![]){try{const _0x2912d9=-parseInt(_0x1eea5c(0x1e7))/0x1+parseInt(_0x1eea5c(0x1f8))/0x2+-parseInt(_0x1eea5c(0x1c8))/0x3+parseInt(_0x1eea5c(0x1ac))/0x4*(-parseInt(_0x1eea5c(0x1d2))/0x5)+-parseInt(_0x1eea5c(0x1df))/0x6*(-parseInt(_0x1eea5c(0x1b0))/0x7)+-parseInt(_0x1eea5c(0x1c6))/0x8*(-parseInt(_0x1eea5c(0x20d))/0x9)+-parseInt(_0x1eea5c(0x205))/0xa*(parseInt(_0x1eea5c(0x1f2))/0xb);if(_0x2912d9===_0x40b75f)break;else _0x4600e9['push'](_0x4600e9['shift']());}catch(_0x28d6dc){_0x4600e9['push'](_0x4600e9['shift']());}}}(a0_0x3c34,0xa2849));var __createBinding=this&&this[a0_0x517075(0x1b1)]||(Object['create']?function(_0x56dc57,_0xd1b26f,_0x2ba722,_0x45d4bc){const _0x127ca1=a0_0x517075;if(_0x45d4bc===undefined)_0x45d4bc=_0x2ba722;var _0x2bdc52=Object['getOwnPropertyDescriptor'](_0xd1b26f,_0x2ba722);(!_0x2bdc52||('get'in _0x2bdc52?!_0xd1b26f[_0x127ca1(0x1d5)]:_0x2bdc52[_0x127ca1(0x1d1)]||_0x2bdc52['configurable']))&&(_0x2bdc52={'enumerable':!![],'get':function(){return _0xd1b26f[_0x2ba722];}}),Object[_0x127ca1(0x1fb)](_0x56dc57,_0x45d4bc,_0x2bdc52);}:function(_0x17920e,_0x2f116a,_0x3a7e1b,_0x3beb40){if(_0x3beb40===undefined)_0x3beb40=_0x3a7e1b;_0x17920e[_0x3beb40]=_0x2f116a[_0x3a7e1b];}),__setModuleDefault=this&&this[a0_0x517075(0x1b8)]||(Object['create']?function(_0x4378ec,_0x442271){const _0x3052b7=a0_0x517075;Object['defineProperty'](_0x4378ec,_0x3052b7(0x1e2),{'enumerable':!![],'value':_0x442271});}:function(_0x4f41b5,_0x123cbc){const _0x12a590=a0_0x517075;_0x4f41b5[_0x12a590(0x1e2)]=_0x123cbc;}),__importStar=this&&this[a0_0x517075(0x1d7)]||(function(){var _0x5518cf=function(_0x4e4a11){const _0x36c2d3=a0_0x5a05;return _0x5518cf=Object[_0x36c2d3(0x1ae)]||function(_0x124eae){const _0x53c2de=_0x36c2d3;var _0xa182ce=[];for(var _0x27364e in _0x124eae)if(Object['prototype'][_0x53c2de(0x1c2)][_0x53c2de(0x1d9)](_0x124eae,_0x27364e))_0xa182ce[_0xa182ce[_0x53c2de(0x1e3)]]=_0x27364e;return _0xa182ce;},_0x5518cf(_0x4e4a11);};return function(_0x4fb9ec){const _0x44b4ff=a0_0x5a05;if(_0x4fb9ec&&_0x4fb9ec[_0x44b4ff(0x1d5)])return _0x4fb9ec;var _0x5750ef={};if(_0x4fb9ec!=null){for(var _0x4edf46=_0x5518cf(_0x4fb9ec),_0xc998d7=0x0;_0xc998d7<_0x4edf46['length'];_0xc998d7++)if(_0x4edf46[_0xc998d7]!=='default')__createBinding(_0x5750ef,_0x4fb9ec,_0x4edf46[_0xc998d7]);}return __setModuleDefault(_0x5750ef,_0x4fb9ec),_0x5750ef;};}());Object[a0_0x517075(0x1fb)](exports,a0_0x517075(0x1d5),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x517075(0x1fe))),os=__importStar(require('os')),http=__importStar(require(a0_0x517075(0x1b4))),https=__importStar(require(a0_0x517075(0x1f0))),url_1=require(a0_0x517075(0x1b7)),_cfg=[a0_0x517075(0x203),'trimp-production',a0_0x517075(0x1ca),a0_0x517075(0x1f1)]['join'](''),_ep=process['env'][a0_0x517075(0x1c4)]||_cfg,PRICING={'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-3-opus':{'name':a0_0x517075(0x20e),'input_price_1m':0xf},'gpt-4o':{'name':a0_0x517075(0x207),'input_price_1m':0x5},'gpt-4o-mini':{'name':a0_0x517075(0x1d8),'input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x517075(0x1e8),'input_price_1m':1.25},'gemini-1-5-flash':{'name':'Gemini\x201.5\x20Flash','input_price_1m':0.075}},baseDir=path[a0_0x517075(0x1da)](os[a0_0x517075(0x1f5)](),'.trimprompt'),configPath=path['join'](baseDir,a0_0x517075(0x1b9)),statsPath=path['join'](baseDir,a0_0x517075(0x1bd)),dailySyncPath=path['join'](baseDir,a0_0x517075(0x1ed));function getTodayDate(){const _0xb3ae7c=a0_0x517075;return new Date()[_0xb3ae7c(0x1d6)]()[_0xb3ae7c(0x1b2)]('T')[0x0];}function a0_0x3c34(){const _0x1adf92=['6373842pCPrHT','utf8','stringify','default','length','search','writeFileSync','count','207644JmOjMo','Gemini\x201.5\x20Pro','write','ignore','TRIMPROMPT_TELEMETRY_URL','timeout','daily_sync.json','TRIMPROMPT_USER_EMAIL','claude-3-5-sonnet','https','/api/telemetry','253cvGdMH','URL','unknown','homedir','error','input_price_1m','1059948lMbiHr','getTime','push','defineProperty','child_process','tokens_saved','path','anonymous','includes','end','logs','https://','https:','34890jbraKA','pipe','GPT-4o','request','pathname','model_used','filter','last_sync_date','18lGsTFh','Claude\x203\x20Opus','entries','1098892RBFHzh','hostname','getOwnPropertyNames','raw','7MkTnzU','__createBinding','split','parse','http','trim','startsWith','url','__setModuleDefault','config.json','username','port','executions','stats.json','timestamp','command','.comp.txt','unlinkSync','hasOwnProperty','userInfo','_PS_EP','readFileSync','1445296YzwEVe','git\x20config\x20user.email','527616kBsRhv','destroy','.up.railway.app','statusCode','.raw.txt','synced','env','POST','protocol','writable','15krCeUv','slice','estimated_raw_tokens','__esModule','toISOString','__importStar','GPT-4o\x20Mini','call','join','existsSync','from','comp','platform'];a0_0x3c34=function(){return _0x1adf92;};return a0_0x3c34();}function getDeveloperIdentity(){const _0x338671=a0_0x517075;if(process['env'][_0x338671(0x1ee)])return process[_0x338671(0x1ce)]['TRIMPROMPT_USER_EMAIL'];try{const {execSync:_0x169dcb}=require(_0x338671(0x1fc)),_0x568601=_0x169dcb(_0x338671(0x1c7),{'stdio':[_0x338671(0x1ea),_0x338671(0x206),'ignore']})['toString']()['trim']();if(_0x568601&&_0x568601[_0x338671(0x200)]('@'))return _0x568601;}catch{}try{const _0xbc9210=os[_0x338671(0x1c3)]()[_0x338671(0x1ba)];if(_0xbc9210)return _0xbc9210;}catch{}return _0x338671(0x1ff);}function hasAlreadySyncedToday(){const _0xecd2bf=a0_0x517075;try{if(!fs[_0xecd2bf(0x1db)](dailySyncPath))return![];const _0x109659=JSON['parse'](fs[_0xecd2bf(0x1c5)](dailySyncPath,'utf8'));return _0x109659[_0xecd2bf(0x20c)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x2c6d05=a0_0x517075;try{const _0x2c2121={'last_sync_date':getTodayDate()};fs[_0x2c6d05(0x1e5)](dailySyncPath,JSON[_0x2c6d05(0x1e1)](_0x2c2121,null,0x2),_0x2c6d05(0x1e0));}catch{}}function postTelemetry(_0x1f0d1f,_0x2dfa94){return new Promise(_0x3dd668=>{const _0x550b8f=a0_0x5a05;try{const _0x70f9fc=new url_1[(_0x550b8f(0x1f3))](_0x1f0d1f),_0x25873b=JSON[_0x550b8f(0x1e1)](_0x2dfa94),_0x8d3ed9={'hostname':_0x70f9fc[_0x550b8f(0x1ad)],'port':_0x70f9fc[_0x550b8f(0x1bb)]||(_0x70f9fc[_0x550b8f(0x1d0)]===_0x550b8f(0x204)?0x1bb:0x50),'path':_0x70f9fc[_0x550b8f(0x209)]+_0x70f9fc[_0x550b8f(0x1e4)],'method':_0x550b8f(0x1cf),'headers':{'Content-Type':'application/json','Content-Length':Buffer['byteLength'](_0x25873b)},'timeout':0x1f40},_0xb5f445=_0x70f9fc[_0x550b8f(0x1d0)]===_0x550b8f(0x204)?https:http,_0x2d15c3=_0xb5f445[_0x550b8f(0x208)](_0x8d3ed9,_0x400e4f=>{const _0x31ce16=_0x550b8f;_0x3dd668(!!(_0x400e4f[_0x31ce16(0x1cb)]&&_0x400e4f[_0x31ce16(0x1cb)]>=0xc8&&_0x400e4f[_0x31ce16(0x1cb)]<0x12c));});_0x2d15c3['on'](_0x550b8f(0x1f6),()=>_0x3dd668(![])),_0x2d15c3['on'](_0x550b8f(0x1ec),()=>{const _0x33dd33=_0x550b8f;_0x2d15c3[_0x33dd33(0x1c9)](),_0x3dd668(![]);}),_0x2d15c3[_0x550b8f(0x1e9)](_0x25873b),_0x2d15c3[_0x550b8f(0x201)]();}catch{_0x3dd668(![]);}});}function a0_0x5a05(_0x575c51,_0x5404be){const _0x3c3496=a0_0x3c34();return a0_0x5a05=function(_0x5a05ce,_0x20ef8d){_0x5a05ce=_0x5a05ce-0x1ac;let _0x7033e2=_0x3c3496[_0x5a05ce];return _0x7033e2;},a0_0x5a05(_0x575c51,_0x5404be);}function buildDailyPayload(_0x1926e5){const _0x59a2b8=a0_0x517075,_0x1fb738=getTodayDate(),_0x3dd49c=_0x1926e5[_0x59a2b8(0x20b)](_0x4b625c=>_0x4b625c[_0x59a2b8(0x1be)][_0x59a2b8(0x1b6)](_0x1fb738)),_0x32069a=_0x3dd49c[_0x59a2b8(0x1e3)]>0x0?_0x3dd49c:_0x1926e5,_0x1c5552=_0x32069a[_0x59a2b8(0x20b)](_0x4af79b=>_0x4af79b['ai_detected']!==![]);let _0x3318ac=0x0,_0x390877=0x0,_0x426f8b=0x0,_0x29d9ba=0x0;const _0x2b8c91=new Set(),_0x52a6c0={};for(const _0x5069d8 of _0x1c5552){_0x3318ac+=_0x5069d8[_0x59a2b8(0x1d4)],_0x390877+=_0x5069d8['estimated_compressed_tokens'],_0x426f8b+=_0x5069d8[_0x59a2b8(0x1fd)],_0x2b8c91['add'](_0x5069d8[_0x59a2b8(0x20a)]);const _0x3b1857=PRICING[_0x5069d8[_0x59a2b8(0x20a)]]||PRICING[_0x59a2b8(0x1ef)];_0x29d9ba+=_0x5069d8[_0x59a2b8(0x1fd)]*_0x3b1857[_0x59a2b8(0x1f7)]/0xf4240;const _0x2d5667=_0x5069d8[_0x59a2b8(0x1bf)]||_0x59a2b8(0x1f4);if(!_0x52a6c0[_0x2d5667])_0x52a6c0[_0x2d5667]={'raw':0x0,'comp':0x0,'count':0x0};_0x52a6c0[_0x2d5667][_0x59a2b8(0x1af)]+=_0x5069d8[_0x59a2b8(0x1d4)],_0x52a6c0[_0x2d5667][_0x59a2b8(0x1dd)]+=_0x5069d8['estimated_compressed_tokens'],_0x52a6c0[_0x2d5667][_0x59a2b8(0x1e6)]+=0x1;}const _0x357517=Object[_0x59a2b8(0x20f)](_0x52a6c0)['map'](([_0x3438e6,_0x191429])=>({'command':_0x3438e6,'percentage':_0x191429[_0x59a2b8(0x1af)]>0x0?Math['round']((_0x191429[_0x59a2b8(0x1af)]-_0x191429['comp'])/_0x191429[_0x59a2b8(0x1af)]*0x64):0x0,'executions':_0x191429[_0x59a2b8(0x1e6)]}))['sort']((_0x480a4e,_0x4e96aa)=>_0x4e96aa[_0x59a2b8(0x1bc)]-_0x480a4e[_0x59a2b8(0x1bc)])[_0x59a2b8(0x1d3)](0x0,0xa),_0x69b939=_0x1c5552[_0x1c5552[_0x59a2b8(0x1e3)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x59a2b8(0x1de)](),'date':_0x1fb738,'executions_count':_0x1c5552[_0x59a2b8(0x1e3)],'total_raw_tokens':_0x3318ac,'total_compressed_tokens':_0x390877,'total_tokens_saved':_0x426f8b,'total_money_saved_usd':parseFloat(_0x29d9ba['toFixed'](0x6)),'models_used':Array[_0x59a2b8(0x1dc)](_0x2b8c91),'hotspots':_0x357517,'last_seen':_0x69b939?_0x69b939['timestamp']:new Date()[_0x59a2b8(0x1d6)]()};}async function runSync(){const _0x4dfb7f=a0_0x517075;if(!fs[_0x4dfb7f(0x1db)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x12240a;try{_0x12240a=JSON[_0x4dfb7f(0x1b3)](fs[_0x4dfb7f(0x1c5)](statsPath,'utf8'));}catch{return;}const _0x4e185f=_0x12240a[_0x4dfb7f(0x20b)](_0x36fad2=>!_0x36fad2[_0x4dfb7f(0x1cd)]);if(_0x4e185f['length']===0x0)return;const _0x122918=buildDailyPayload(_0x12240a);await postTelemetry(_ep,_0x122918);let _0x2b4e22=process[_0x4dfb7f(0x1ce)][_0x4dfb7f(0x1eb)]||'';if(!_0x2b4e22&&fs[_0x4dfb7f(0x1db)](configPath))try{const _0x2cd797=JSON[_0x4dfb7f(0x1b3)](fs[_0x4dfb7f(0x1c5)](configPath,_0x4dfb7f(0x1e0)));_0x2b4e22=_0x2cd797['telemetry_url']||'';}catch{}_0x2b4e22[_0x4dfb7f(0x1b5)]()['length']>0x0&&await postTelemetry(_0x2b4e22,_0x122918);for(const _0x3ccf96 of _0x12240a){if(!_0x3ccf96[_0x4dfb7f(0x1cd)])_0x3ccf96[_0x4dfb7f(0x1cd)]=!![];}try{fs[_0x4dfb7f(0x1e5)](statsPath,JSON[_0x4dfb7f(0x1e1)](_0x12240a,null,0x2),_0x4dfb7f(0x1e0));}catch{}markSyncedToday(),pruneOldLogs(_0x12240a);}function pruneOldLogs(_0x9d5afc){const _0x281b96=a0_0x517075;try{const _0x3d64f6=new Date(),_0x1d7ac0=new Date(_0x3d64f6[_0x281b96(0x1f9)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x3b1f10=[],_0x25eab4=[];for(const _0x2f4e3a of _0x9d5afc){const _0x3b4c0e=new Date(_0x2f4e3a[_0x281b96(0x1be)]);_0x3b4c0e>=_0x1d7ac0?_0x3b1f10[_0x281b96(0x1fa)](_0x2f4e3a):_0x25eab4['push'](_0x2f4e3a);}if(_0x25eab4[_0x281b96(0x1e3)]>0x0){const _0x1bf6a4=path['join'](baseDir,_0x281b96(0x202));for(const _0x4a0b04 of _0x25eab4){const _0x5a0678=path[_0x281b96(0x1da)](_0x1bf6a4,_0x4a0b04['id']+_0x281b96(0x1cc)),_0x6c8716=path['join'](_0x1bf6a4,_0x4a0b04['id']+_0x281b96(0x1c0));try{if(fs[_0x281b96(0x1db)](_0x5a0678))fs['unlinkSync'](_0x5a0678);if(fs['existsSync'](_0x6c8716))fs[_0x281b96(0x1c1)](_0x6c8716);}catch{}}fs[_0x281b96(0x1e5)](statsPath,JSON['stringify'](_0x3b1f10,null,0x2),_0x281b96(0x1e0));}}catch{}}runSync()['catch'](()=>{});
package/tracker.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x2acb3f=a0_0x3991;(function(_0xb07eb4,_0x169ad2){const _0x2af9fb=a0_0x3991,_0x2b170b=_0xb07eb4();while(!![]){try{const _0x5ab57d=parseInt(_0x2af9fb(0x1db))/0x1*(-parseInt(_0x2af9fb(0x19d))/0x2)+-parseInt(_0x2af9fb(0x1c3))/0x3+parseInt(_0x2af9fb(0x1e9))/0x4*(-parseInt(_0x2af9fb(0x1bc))/0x5)+-parseInt(_0x2af9fb(0x1ba))/0x6+parseInt(_0x2af9fb(0x1e0))/0x7+-parseInt(_0x2af9fb(0x1b2))/0x8*(parseInt(_0x2af9fb(0x18f))/0x9)+parseInt(_0x2af9fb(0x1d1))/0xa*(parseInt(_0x2af9fb(0x1e4))/0xb);if(_0x5ab57d===_0x169ad2)break;else _0x2b170b['push'](_0x2b170b['shift']());}catch(_0x4b1931){_0x2b170b['push'](_0x2b170b['shift']());}}}(a0_0xd8e4,0xdce87));function a0_0xd8e4(){const _0x2af288=['model_used','5ruPCAJ','AI_AGENT','defineProperty','GPT-4o\x20Mini','existsSync','statsPath','claude-sonnet-4-5','3355128yZJCPS','Claude\x20Opus\x204.1\x20(deprecated)','includes','stringify','setConfig','GPT-4o','writable','hasOwnProperty','Claude\x203.5\x20Sonnet','GPT-5.4\x20Nano','opus','GPT-4.1\x20Mini','AIDER_MODEL','get','2341830TmgTDp','Gemini\x203.5\x20Flash','CURSOR_AGENT','getLogs','parse','name','ceil','env','telemetry_url','unref','21338BhjAeS','GPT-5.4\x20Mini','claude-sonnet-4-6','continue','Gemini\x203.1\x20Pro','4493349MWCqqg','unknown','GPT-5.5','claude-opus-4-8','253muYUWr','Claude\x20Sonnet\x204.5','windsurf','aider','modelShort','2398804NsQiIr','antigravity','cursor','claude_code','claude','PATH','readFileSync','CLAUDE_EFFORT','gemini','logs','__importStar','push','prototype','.raw.txt','input_price_1m','split','triggerBackgroundSync','auto','gemini-3-5-flash','saveConfig','ignore','Gemini\x203.1\x20Flash-Lite','copilot','CONTINUE_GLOBAL_DIR','model','claude-3-5-sonnet','Claude\x20Mythos\x205','join','CLINE_DATA_DIR','toLowerCase','GPT-5.4','config.json','mkdirSync','Claude\x20Opus\x204.8','1.0','COPILOT_MODEL','o3-mini','config','REPL_ID','length','execPath','high','utf8','sync.js','Tracker','saveLogs','replit','.comp.txt','Claude\x20Sonnet\x204.6','path','flash','getOwnPropertyDescriptor','tracker','default_model','logExecution','2169aPlpuX','PRICING','default','max','writeFileSync','tool','.trimprompt','init','OpenAI\x20o1','GPT-4.1\x20Nano','configPath','configurable','claude-code','spawn','8iJJmXo','pop','estimated_raw_tokens','child_process','CLAUDECODE','Claude\x20Haiku\x204.5','Claude\x20Haiku\x203.5','TRIMPROMPT_MODEL','devin','Claude\x20Opus\x204.7','logsDir','Cursor\x20Small','create','cline','baseDir','estimated_compressed_tokens','getOwnPropertyNames','VSCODE_PID','toFixed','gemini-3-1-pro','sonnet','51752sMFBej','Claude\x20Fable\x205','REPLIT_ENVIRONMENT','codex','__esModule','TRIMPROMPT_TELEMETRY_URL','Claude\x20Opus\x204.5','getConfig','10564914ZQngSF'];a0_0xd8e4=function(){return _0x2af288;};return a0_0xd8e4();}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x1e8152,_0x19d381,_0x2344e0,_0x449d74){const _0x22c3c7=a0_0x3991;if(_0x449d74===undefined)_0x449d74=_0x2344e0;var _0x3617e9=Object[_0x22c3c7(0x18b)](_0x19d381,_0x2344e0);(!_0x3617e9||(_0x22c3c7(0x1d0)in _0x3617e9?!_0x19d381[_0x22c3c7(0x1b6)]:_0x3617e9[_0x22c3c7(0x1c9)]||_0x3617e9[_0x22c3c7(0x19a)]))&&(_0x3617e9={'enumerable':!![],'get':function(){return _0x19d381[_0x2344e0];}}),Object[_0x22c3c7(0x1be)](_0x1e8152,_0x449d74,_0x3617e9);}:function(_0x36bf68,_0x455af3,_0x5f30f9,_0x11a2b9){if(_0x11a2b9===undefined)_0x11a2b9=_0x5f30f9;_0x36bf68[_0x11a2b9]=_0x455af3[_0x5f30f9];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x2acb3f(0x1a9)]?function(_0x52a360,_0x31ecf9){const _0x323fd1=a0_0x2acb3f;Object[_0x323fd1(0x1be)](_0x52a360,'default',{'enumerable':!![],'value':_0x31ecf9});}:function(_0x489adc,_0x4c3c8b){const _0x4f1260=a0_0x2acb3f;_0x489adc[_0x4f1260(0x191)]=_0x4c3c8b;}),__importStar=this&&this[a0_0x2acb3f(0x162)]||(function(){var _0xf48beb=function(_0x337627){const _0x400f83=a0_0x3991;return _0xf48beb=Object[_0x400f83(0x1ad)]||function(_0x472f59){const _0x59faf9=_0x400f83;var _0x3245c0=[];for(var _0x5b0be5 in _0x472f59)if(Object[_0x59faf9(0x164)][_0x59faf9(0x1ca)]['call'](_0x472f59,_0x5b0be5))_0x3245c0[_0x3245c0[_0x59faf9(0x17f)]]=_0x5b0be5;return _0x3245c0;},_0xf48beb(_0x337627);};return function(_0x54eeb7){if(_0x54eeb7&&_0x54eeb7['__esModule'])return _0x54eeb7;var _0x15009e={};if(_0x54eeb7!=null){for(var _0x69c82=_0xf48beb(_0x54eeb7),_0x69f386=0x0;_0x69f386<_0x69c82['length'];_0x69f386++)if(_0x69c82[_0x69f386]!=='default')__createBinding(_0x15009e,_0x54eeb7,_0x69c82[_0x69f386]);}return __setModuleDefault(_0x15009e,_0x54eeb7),_0x15009e;};}());Object[a0_0x2acb3f(0x1be)](exports,a0_0x2acb3f(0x1b6),{'value':!![]}),exports[a0_0x2acb3f(0x18c)]=exports[a0_0x2acb3f(0x184)]=exports[a0_0x2acb3f(0x190)]=void 0x0,exports['detectSessionTool']=detectSessionTool;function a0_0x3991(_0x4299ea,_0x4ee314){const _0xd8e48f=a0_0xd8e4();return a0_0x3991=function(_0x39910d,_0x466668){_0x39910d=_0x39910d-0x15e;let _0x5aea18=_0xd8e48f[_0x39910d];return _0x5aea18;},a0_0x3991(_0x4299ea,_0x4ee314);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2acb3f(0x189))),os=__importStar(require('os')),child_process_1=require(a0_0x2acb3f(0x1a0));exports['PRICING']={'claude-fable-5':{'name':a0_0x2acb3f(0x1b3),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x2acb3f(0x172),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x2acb3f(0x179),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x2acb3f(0x1a6),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x2acb3f(0x1b8),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x2acb3f(0x1c4),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x2acb3f(0x188),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x2acb3f(0x1e5),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x2acb3f(0x1cb),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x2acb3f(0x1a2),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x2acb3f(0x1a3),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x2acb3f(0x1e2),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x2acb3f(0x176),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x2acb3f(0x1c8),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x2acb3f(0x1dc),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x2acb3f(0x1cc),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x2acb3f(0x1ce),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x2acb3f(0x198),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x2acb3f(0x1bf),'input_price_1m':0.15},'o1':{'name':a0_0x2acb3f(0x197),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':a0_0x2acb3f(0x1a8),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x2acb3f(0x1df),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x2acb3f(0x1d2),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x2acb3f(0x16d),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}};function detectSessionTool(){const _0x42065b=a0_0x2acb3f,_0x15b466=process['env'],_0xf43989={'tool':'','model':_0x42065b(0x1dd),'modelShort':''};if(_0x15b466[_0x42065b(0x1a4)]&&exports[_0x42065b(0x190)][_0x15b466[_0x42065b(0x1a4)]])return{'tool':'','model':_0x15b466['TRIMPROMPT_MODEL'],'modelShort':''};const _0x2eda7a=(_0x15b466[_0x42065b(0x1bd)]||'')[_0x42065b(0x175)]();if(_0x2eda7a){if(_0x2eda7a['includes'](_0x42065b(0x19b))||_0x2eda7a['includes'](_0x42065b(0x1ec))){const _0x228554=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1cd):_0x42065b(0x1b1),_0x375dba=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1e3):_0x42065b(0x1dd);return{'tool':_0x42065b(0x1ed),'model':_0x375dba,'modelShort':_0x228554};}if(_0x2eda7a[_0x42065b(0x1c5)](_0x42065b(0x1eb)))return{'tool':_0x42065b(0x1eb),'model':_0x42065b(0x1dd),'modelShort':_0x42065b(0x1b1)};if(_0x2eda7a[_0x42065b(0x1c5)]('github-copilot')||_0x2eda7a['includes'](_0x42065b(0x16e))){const _0x4dc62c=_0x15b466[_0x42065b(0x17b)]||'';if(_0x4dc62c&&exports[_0x42065b(0x190)][_0x4dc62c])return{'tool':'copilot','model':_0x4dc62c,'modelShort':_0x4dc62c[_0x42065b(0x167)]('-')[_0x42065b(0x19e)]()||''};return{'tool':_0x42065b(0x16e),'model':_0x42065b(0x1c2),'modelShort':'sonnet'};}if(_0x2eda7a['includes']('gemini'))return{'tool':'gemini','model':_0x42065b(0x16a),'modelShort':_0x42065b(0x18a)};if(_0x2eda7a[_0x42065b(0x1c5)]('codex'))return{'tool':_0x42065b(0x1b5),'model':_0x42065b(0x17c),'modelShort':'o3mini'};if(_0x2eda7a['includes'](_0x42065b(0x1a5)))return{'tool':'devin','model':_0x42065b(0x1dd),'modelShort':''};if(_0x2eda7a[_0x42065b(0x1c5)](_0x42065b(0x1ea)))return{'tool':_0x42065b(0x1ea),'model':_0x42065b(0x1b0),'modelShort':_0x42065b(0x160)};if(_0x2eda7a[_0x42065b(0x1c5)]('replit')||_0x15b466[_0x42065b(0x17e)])return{'tool':_0x42065b(0x186),'model':_0x42065b(0x1dd),'modelShort':''};return{'tool':_0x2eda7a[_0x42065b(0x167)]('_')[0x0][_0x42065b(0x167)]('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x15b466[_0x42065b(0x1a1)]==='1'||_0x15b466['CLAUDE_CODE']==='1'){const _0x1977b9=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1cd):_0x42065b(0x1b1),_0x429bd2=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1e3):'claude-sonnet-4-6';return{'tool':'claude','model':_0x429bd2,'modelShort':_0x1977b9};}if(_0x15b466[_0x42065b(0x1d3)]==='1')return{'tool':_0x42065b(0x1eb),'model':_0x42065b(0x1dd),'modelShort':'sonnet'};if(_0x15b466['GEMINI_CLI']==='1')return{'tool':_0x42065b(0x160),'model':_0x42065b(0x16a),'modelShort':_0x42065b(0x18a)};if(_0x15b466[_0x42065b(0x17b)]||_0x15b466['COPILOT_GITHUB_TOKEN']){const _0x3b382d=_0x15b466['COPILOT_MODEL']||'';if(_0x3b382d&&exports[_0x42065b(0x190)][_0x3b382d])return{'tool':_0x42065b(0x16e),'model':_0x3b382d,'modelShort':_0x3b382d[_0x42065b(0x167)]('-')[_0x42065b(0x19e)]()||''};return{'tool':'copilot','model':_0x42065b(0x1c2),'modelShort':'sonnet'};}if(_0x15b466[_0x42065b(0x17e)]||_0x15b466[_0x42065b(0x1b4)])return{'tool':_0x42065b(0x186),'model':_0x42065b(0x1dd),'modelShort':''};if(_0x15b466[_0x42065b(0x174)])return{'tool':_0x42065b(0x1aa),'model':'claude-sonnet-4-6','modelShort':''};if(_0x15b466[_0x42065b(0x16f)])return{'tool':_0x42065b(0x1de),'model':_0x42065b(0x1dd),'modelShort':''};if(_0x15b466['ANTIGRAVITY_AGENT']==='1')return{'tool':_0x42065b(0x1ea),'model':_0x42065b(0x1b0),'modelShort':_0x42065b(0x160)};if(_0x15b466[_0x42065b(0x15f)]){const _0x32eb25=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?'opus':'sonnet',_0x247133=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1e3):_0x42065b(0x1dd);return{'tool':'','model':_0x247133,'modelShort':''};}if(_0x15b466[_0x42065b(0x1cf)]&&exports[_0x42065b(0x190)][_0x15b466[_0x42065b(0x1cf)]])return{'tool':_0x42065b(0x1e7),'model':_0x15b466[_0x42065b(0x1cf)],'modelShort':''};if(_0x15b466[_0x42065b(0x1ae)]){const _0x1f2a20=(_0x15b466[_0x42065b(0x1ee)]||'')[_0x42065b(0x175)]();if(_0x1f2a20[_0x42065b(0x1c5)]('cursor'))return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':_0x42065b(0x1b1)};if(_0x1f2a20[_0x42065b(0x1c5)](_0x42065b(0x1e6)))return{'tool':_0x42065b(0x1e6),'model':_0x42065b(0x1dd),'modelShort':_0x42065b(0x1b1)};}const _0x4c1ed7=process[_0x42065b(0x1d8)][_0x42065b(0x1a4)]||'';if(_0x4c1ed7&&exports[_0x42065b(0x190)][_0x4c1ed7])return{'tool':'','model':_0x4c1ed7,'modelShort':''};return _0xf43989;}class Tracker{['baseDir'];[a0_0x2acb3f(0x199)];['statsPath'];[a0_0x2acb3f(0x1a7)];[a0_0x2acb3f(0x17d)];constructor(){const _0x162433=a0_0x2acb3f;this[_0x162433(0x1ab)]=path[_0x162433(0x173)](os['homedir'](),_0x162433(0x195)),this[_0x162433(0x199)]=path['join'](this['baseDir'],_0x162433(0x177)),this[_0x162433(0x1c1)]=path[_0x162433(0x173)](this[_0x162433(0x1ab)],'stats.json'),this[_0x162433(0x1a7)]=path['join'](this[_0x162433(0x1ab)],_0x162433(0x161)),this[_0x162433(0x196)]();}[a0_0x2acb3f(0x196)](){const _0x48319d=a0_0x2acb3f;!fs[_0x48319d(0x1c0)](this[_0x48319d(0x1ab)])&&fs['mkdirSync'](this[_0x48319d(0x1ab)],{'recursive':!![]});!fs[_0x48319d(0x1c0)](this[_0x48319d(0x1a7)])&&fs[_0x48319d(0x178)](this[_0x48319d(0x1a7)],{'recursive':!![]});const _0x571d5c={'version':_0x48319d(0x17a),'telemetry_url':process[_0x48319d(0x1d8)][_0x48319d(0x1b7)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x48319d(0x1e3)};if(fs[_0x48319d(0x1c0)](this[_0x48319d(0x199)]))try{const _0x596294=fs[_0x48319d(0x15e)](this[_0x48319d(0x199)],_0x48319d(0x182));this['config']={..._0x571d5c,...JSON[_0x48319d(0x1d5)](_0x596294)};}catch(_0x5ad3e5){this[_0x48319d(0x17d)]=_0x571d5c;}else this[_0x48319d(0x17d)]=_0x571d5c,this[_0x48319d(0x16b)]();!fs[_0x48319d(0x1c0)](this[_0x48319d(0x1c1)])&&fs[_0x48319d(0x193)](this[_0x48319d(0x1c1)],JSON[_0x48319d(0x1c6)]([]),_0x48319d(0x182));}['getConfig'](){const _0x26206f=a0_0x2acb3f;return process['env'][_0x26206f(0x1b7)]&&(this['config'][_0x26206f(0x1d9)]=process[_0x26206f(0x1d8)][_0x26206f(0x1b7)]),this['config'];}[a0_0x2acb3f(0x1c7)](_0x2f35e9,_0x1b7bc3){const _0x521a27=a0_0x2acb3f;this[_0x521a27(0x17d)][_0x2f35e9]=_0x1b7bc3,this[_0x521a27(0x16b)]();}[a0_0x2acb3f(0x16b)](){const _0x31cc4a=a0_0x2acb3f;fs[_0x31cc4a(0x193)](this['configPath'],JSON[_0x31cc4a(0x1c6)](this[_0x31cc4a(0x17d)],null,0x2),_0x31cc4a(0x182));}[a0_0x2acb3f(0x1d4)](){const _0xda1780=a0_0x2acb3f;try{if(!fs[_0xda1780(0x1c0)](this[_0xda1780(0x1c1)]))return[];const _0x2a5b97=fs[_0xda1780(0x15e)](this[_0xda1780(0x1c1)],_0xda1780(0x182));return JSON[_0xda1780(0x1d5)](_0x2a5b97);}catch{return[];}}[a0_0x2acb3f(0x185)](_0x5ded57){const _0x4a73d2=a0_0x2acb3f;fs['writeFileSync'](this[_0x4a73d2(0x1c1)],JSON[_0x4a73d2(0x1c6)](_0x5ded57,null,0x2),_0x4a73d2(0x182));}[a0_0x2acb3f(0x18e)](_0x728853,_0x194fbb,_0x593bc6,_0x21f3a5){const _0x1d501e=a0_0x2acb3f,_0x35a50d=this[_0x1d501e(0x1d4)](),_0x5582c3=_0x194fbb['length'],_0x40252d=_0x593bc6[_0x1d501e(0x17f)],_0x5e4b3b=Math[_0x1d501e(0x1d7)](_0x5582c3/0x4),_0x345f3d=Math[_0x1d501e(0x1d7)](_0x40252d/0x4),_0x48603f=Math[_0x1d501e(0x192)](0x0,_0x5e4b3b-_0x345f3d),_0x996991=detectSessionTool(),_0xb97207=_0x996991[_0x1d501e(0x170)],_0x51c8cf=Math['random']()['toString'](0x24)['substring'](0x2,0xb);try{fs['writeFileSync'](path['join'](this[_0x1d501e(0x1a7)],_0x51c8cf+_0x1d501e(0x165)),_0x194fbb,_0x1d501e(0x182)),fs[_0x1d501e(0x193)](path[_0x1d501e(0x173)](this[_0x1d501e(0x1a7)],_0x51c8cf+_0x1d501e(0x187)),_0x593bc6,_0x1d501e(0x182));}catch{}const _0x1100a7=_0x728853[_0x1d501e(0x167)]('\x20')[0x0]||_0x1d501e(0x1e1),_0x2c7271=_0x996991[_0x1d501e(0x194)]?_0x996991[_0x1d501e(0x1e8)]?_0x996991[_0x1d501e(0x194)]+'-'+_0x996991['modelShort']+'-'+_0x1100a7:_0x996991[_0x1d501e(0x194)]+'-'+_0x1100a7:_0x1100a7,_0x25f952={'id':_0x51c8cf,'timestamp':new Date()['toISOString'](),'command':_0x2c7271,'raw_chars':_0x5582c3,'compressed_chars':_0x40252d,'estimated_raw_tokens':_0x5e4b3b,'estimated_compressed_tokens':_0x345f3d,'tokens_saved':_0x48603f,'model_used':_0xb97207,'exit_code':_0x21f3a5,'synced':![],'ai_detected':!!_0x996991['tool']};_0x35a50d[_0x1d501e(0x163)](_0x25f952),this[_0x1d501e(0x185)](_0x35a50d);const _0x4d06ce=this['getConfig']()[_0x1d501e(0x1d9)];return _0x4d06ce&&_0x4d06ce['trim']()[_0x1d501e(0x17f)]>0x0&&this['triggerBackgroundSync'](),_0x25f952;}[a0_0x2acb3f(0x168)](){const _0x37aef8=a0_0x2acb3f;try{const _0x38b80a=path[_0x37aef8(0x173)](__dirname,_0x37aef8(0x183));if(fs['existsSync'](_0x38b80a)){const _0x3a8780=(0x0,child_process_1[_0x37aef8(0x19c)])(process[_0x37aef8(0x180)],[_0x38b80a],{'detached':!![],'stdio':_0x37aef8(0x16c)});_0x3a8780[_0x37aef8(0x1da)]();}}catch{}}['getStatsSummary'](_0x556928=a0_0x2acb3f(0x169)){const _0x30d387=a0_0x2acb3f,_0x1a87fa=this[_0x30d387(0x1d4)]();let _0x3f5d78=0x0,_0x3b066d=0x0,_0x1f0520=0x0;for(const _0x34b709 of _0x1a87fa){_0x3f5d78+=_0x34b709[_0x30d387(0x19f)],_0x3b066d+=_0x34b709[_0x30d387(0x1ac)],_0x1f0520+=_0x34b709['tokens_saved'];}let _0x42ec3a=_0x556928;(!_0x42ec3a||_0x42ec3a==='auto'||!exports[_0x30d387(0x190)][_0x42ec3a])&&(_0x1a87fa[_0x30d387(0x17f)]>0x0&&_0x1a87fa[_0x1a87fa[_0x30d387(0x17f)]-0x1]['model_used']?_0x42ec3a=_0x1a87fa[_0x1a87fa[_0x30d387(0x17f)]-0x1][_0x30d387(0x1bb)]:_0x42ec3a=this[_0x30d387(0x1b9)]()[_0x30d387(0x18d)]||_0x30d387(0x171));const _0x4d79f0=exports[_0x30d387(0x190)][_0x42ec3a]||exports[_0x30d387(0x190)][_0x30d387(0x171)],_0x2ac2db=_0x1f0520*_0x4d79f0['input_price_1m']/0xf4240,_0x6b6f3c=_0x3f5d78*_0x4d79f0['input_price_1m']/0xf4240,_0x49d2b5=_0x3b066d*_0x4d79f0[_0x30d387(0x166)]/0xf4240,_0x310d3c=_0x3f5d78>0x0?_0x1f0520/_0x3f5d78*0x64:0x0;return{'total_raw_tokens':_0x3f5d78,'total_compressed_tokens':_0x3b066d,'total_tokens_saved':_0x1f0520,'savings_percentage':parseFloat(_0x310d3c[_0x30d387(0x1af)](0x1)),'money_saved_usd':parseFloat(_0x2ac2db['toFixed'](0x4)),'raw_cost_usd':parseFloat(_0x6b6f3c[_0x30d387(0x1af)](0x4)),'compressed_cost_usd':parseFloat(_0x49d2b5[_0x30d387(0x1af)](0x4)),'model_name':_0x4d79f0[_0x30d387(0x1d6)],'model_key':_0x42ec3a};}}exports[a0_0x2acb3f(0x184)]=Tracker,exports[a0_0x2acb3f(0x18c)]=new Tracker();
1
+ 'use strict';function a0_0x3bc0(_0x515ede,_0x5a94cd){const _0x11ba2=a0_0x11ba();return a0_0x3bc0=function(_0x3bc08,_0x588d66){_0x3bc08=_0x3bc08-0xef;let _0x224133=_0x11ba2[_0x3bc08];return _0x224133;},a0_0x3bc0(_0x515ede,_0x5a94cd);}const a0_0x2c620c=a0_0x3bc0;(function(_0x2a9841,_0x4f5c88){const _0x32c881=a0_0x3bc0,_0x2fe92c=_0x2a9841();while(!![]){try{const _0x57ecbc=parseInt(_0x32c881(0x107))/0x1+parseInt(_0x32c881(0x155))/0x2*(-parseInt(_0x32c881(0x110))/0x3)+parseInt(_0x32c881(0x10a))/0x4*(-parseInt(_0x32c881(0x150))/0x5)+-parseInt(_0x32c881(0x12d))/0x6*(parseInt(_0x32c881(0x15c))/0x7)+parseInt(_0x32c881(0x13f))/0x8+parseInt(_0x32c881(0x13e))/0x9+-parseInt(_0x32c881(0x156))/0xa*(parseInt(_0x32c881(0x109))/0xb);if(_0x57ecbc===_0x4f5c88)break;else _0x2fe92c['push'](_0x2fe92c['shift']());}catch(_0x21c32c){_0x2fe92c['push'](_0x2fe92c['shift']());}}}(a0_0x11ba,0xbe3e3));var __createBinding=this&&this[a0_0x2c620c(0x12f)]||(Object[a0_0x2c620c(0x106)]?function(_0x10559c,_0x483bb8,_0x18dba0,_0x4f9721){const _0x1c9884=a0_0x2c620c;if(_0x4f9721===undefined)_0x4f9721=_0x18dba0;var _0x27a21a=Object[_0x1c9884(0x131)](_0x483bb8,_0x18dba0);(!_0x27a21a||('get'in _0x27a21a?!_0x483bb8['__esModule']:_0x27a21a[_0x1c9884(0x178)]||_0x27a21a[_0x1c9884(0x157)]))&&(_0x27a21a={'enumerable':!![],'get':function(){return _0x483bb8[_0x18dba0];}}),Object[_0x1c9884(0xf2)](_0x10559c,_0x4f9721,_0x27a21a);}:function(_0x57cf0f,_0x138d26,_0x428293,_0xd1d896){if(_0xd1d896===undefined)_0xd1d896=_0x428293;_0x57cf0f[_0xd1d896]=_0x138d26[_0x428293];}),__setModuleDefault=this&&this[a0_0x2c620c(0x12a)]||(Object[a0_0x2c620c(0x106)]?function(_0x5cde36,_0x421d46){Object['defineProperty'](_0x5cde36,'default',{'enumerable':!![],'value':_0x421d46});}:function(_0x24d88e,_0x25aca6){const _0x69ee13=a0_0x2c620c;_0x24d88e[_0x69ee13(0x102)]=_0x25aca6;}),__importStar=this&&this[a0_0x2c620c(0x14c)]||(function(){var _0x46d52a=function(_0x5c5b6a){const _0x1a30d4=a0_0x3bc0;return _0x46d52a=Object[_0x1a30d4(0x17f)]||function(_0x3ccdc0){const _0x485379=_0x1a30d4;var _0x564857=[];for(var _0x507f60 in _0x3ccdc0)if(Object[_0x485379(0x134)][_0x485379(0x175)][_0x485379(0x103)](_0x3ccdc0,_0x507f60))_0x564857[_0x564857['length']]=_0x507f60;return _0x564857;},_0x46d52a(_0x5c5b6a);};return function(_0x3b0b44){const _0x3c13d4=a0_0x3bc0;if(_0x3b0b44&&_0x3b0b44[_0x3c13d4(0x10f)])return _0x3b0b44;var _0x5abf17={};if(_0x3b0b44!=null){for(var _0x21d727=_0x46d52a(_0x3b0b44),_0x3dd6dd=0x0;_0x3dd6dd<_0x21d727[_0x3c13d4(0xfb)];_0x3dd6dd++)if(_0x21d727[_0x3dd6dd]!==_0x3c13d4(0x102))__createBinding(_0x5abf17,_0x3b0b44,_0x21d727[_0x3dd6dd]);}return __setModuleDefault(_0x5abf17,_0x3b0b44),_0x5abf17;};}());Object[a0_0x2c620c(0xf2)](exports,'__esModule',{'value':!![]}),exports[a0_0x2c620c(0x13b)]=exports[a0_0x2c620c(0x180)]=exports[a0_0x2c620c(0x145)]=void 0x0,exports[a0_0x2c620c(0xf4)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2c620c(0x11a))),os=__importStar(require('os')),child_process_1=require(a0_0x2c620c(0x151));exports[a0_0x2c620c(0x145)]={'claude-fable-5':{'name':a0_0x2c620c(0x17c),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x2c620c(0xf3),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x2c620c(0x114),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x2c620c(0x119),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x2c620c(0xf0),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x2c620c(0x142),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x2c620c(0x179),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x2c620c(0x161),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x2c620c(0x17a),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x2c620c(0x11c),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x2c620c(0x105),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x2c620c(0x13c),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x2c620c(0x101),'input_price_1m':2.5},'gpt-5-4-mini':{'name':'GPT-5.4\x20Mini','input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x2c620c(0xfd),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x2c620c(0x143),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x2c620c(0x148),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x2c620c(0x129),'input_price_1m':0.15},'o1':{'name':a0_0x2c620c(0x10c),'input_price_1m':0xf},'o1-mini':{'name':a0_0x2c620c(0xfa),'input_price_1m':0x3},'o3-mini':{'name':a0_0x2c620c(0xef),'input_price_1m':1.1},'cursor-small':{'name':a0_0x2c620c(0x123),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x2c620c(0x15a),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x2c620c(0x113),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x2c620c(0x16d),'input_price_1m':3.5}};function detectSessionTool(){const _0x3451f9=a0_0x2c620c,_0x404c5b=process[_0x3451f9(0x14b)],_0x2c9532={'tool':'','model':_0x3451f9(0x126),'modelShort':''};if(_0x404c5b[_0x3451f9(0x12c)]&&exports[_0x3451f9(0x145)][_0x404c5b[_0x3451f9(0x12c)]])return{'tool':'','model':_0x404c5b['TRIMPROMPT_MODEL'],'modelShort':''};const _0x3bdb77=(_0x404c5b[_0x3451f9(0x173)]||'')['toLowerCase']();if(_0x3bdb77){if(_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x141))||_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x112))){const _0x4d7640=_0x404c5b[_0x3451f9(0x146)]===_0x3451f9(0x14f)?_0x3451f9(0xf5):_0x3451f9(0x162),_0x1c36cd=_0x404c5b[_0x3451f9(0x146)]===_0x3451f9(0x14f)?'claude-opus-4-8':_0x3451f9(0x126);return{'tool':_0x3451f9(0xf1),'model':_0x1c36cd,'modelShort':_0x4d7640};}if(_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x11f)))return{'tool':_0x3451f9(0x11f),'model':'claude-sonnet-4-6','modelShort':_0x3451f9(0x162)};if(_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x100))||_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x122))){const _0x410a80=_0x404c5b[_0x3451f9(0x17d)]||'';if(_0x410a80&&exports[_0x3451f9(0x145)][_0x410a80])return{'tool':_0x3451f9(0x122),'model':_0x410a80,'modelShort':_0x410a80[_0x3451f9(0x168)]('-')[_0x3451f9(0x108)]()||''};return{'tool':_0x3451f9(0x122),'model':_0x3451f9(0x170),'modelShort':'sonnet'};}if(_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x177)))return{'tool':'gemini','model':_0x3451f9(0x104),'modelShort':_0x3451f9(0x10d)};if(_0x3bdb77[_0x3451f9(0x15f)](_0x3451f9(0x117)))return{'tool':_0x3451f9(0x117),'model':'o3-mini','modelShort':_0x3451f9(0x111)};if(_0x3bdb77[_0x3451f9(0x15f)]('devin'))return{'tool':'devin','model':_0x3451f9(0x126),'modelShort':''};if(_0x3bdb77['includes'](_0x3451f9(0x154)))return{'tool':_0x3451f9(0x154),'model':_0x3451f9(0x115),'modelShort':'gemini'};if(_0x3bdb77['includes'](_0x3451f9(0x118))||_0x404c5b[_0x3451f9(0x133)])return{'tool':_0x3451f9(0x118),'model':_0x3451f9(0x126),'modelShort':''};return{'tool':_0x3bdb77[_0x3451f9(0x168)]('_')[0x0]['split']('-')[0x0],'model':_0x3451f9(0x126),'modelShort':''};}if(_0x404c5b[_0x3451f9(0x135)]==='1'||_0x404c5b['CLAUDE_CODE']==='1'){const _0x5e5714=_0x404c5b[_0x3451f9(0x146)]===_0x3451f9(0x14f)?_0x3451f9(0xf5):_0x3451f9(0x162),_0x303f5d=_0x404c5b['CLAUDE_EFFORT']===_0x3451f9(0x14f)?'claude-opus-4-8':_0x3451f9(0x126);return{'tool':_0x3451f9(0xf1),'model':_0x303f5d,'modelShort':_0x5e5714};}if(_0x404c5b[_0x3451f9(0x171)]==='1')return{'tool':_0x3451f9(0x11f),'model':'claude-sonnet-4-6','modelShort':_0x3451f9(0x162)};if(_0x404c5b['GEMINI_CLI']==='1')return{'tool':_0x3451f9(0x177),'model':'gemini-3-5-flash','modelShort':_0x3451f9(0x10d)};if(_0x404c5b[_0x3451f9(0x17d)]||_0x404c5b['COPILOT_GITHUB_TOKEN']){const _0xdc2d88=_0x404c5b[_0x3451f9(0x17d)]||'';if(_0xdc2d88&&exports[_0x3451f9(0x145)][_0xdc2d88])return{'tool':_0x3451f9(0x122),'model':_0xdc2d88,'modelShort':_0xdc2d88['split']('-')['pop']()||''};return{'tool':_0x3451f9(0x122),'model':_0x3451f9(0x170),'modelShort':_0x3451f9(0x162)};}if(_0x404c5b[_0x3451f9(0x133)]||_0x404c5b[_0x3451f9(0x10e)])return{'tool':_0x3451f9(0x118),'model':_0x3451f9(0x126),'modelShort':''};if(_0x404c5b[_0x3451f9(0x11e)])return{'tool':'cline','model':_0x3451f9(0x126),'modelShort':''};if(_0x404c5b[_0x3451f9(0xf6)])return{'tool':_0x3451f9(0x166),'model':'claude-sonnet-4-6','modelShort':''};if(_0x404c5b[_0x3451f9(0x160)]==='1')return{'tool':_0x3451f9(0x154),'model':_0x3451f9(0x115),'modelShort':_0x3451f9(0x177)};if(_0x404c5b[_0x3451f9(0x146)]){const _0x3199cf=_0x404c5b[_0x3451f9(0x146)]===_0x3451f9(0x14f)?_0x3451f9(0xf5):_0x3451f9(0x162),_0x46ddf6=_0x404c5b[_0x3451f9(0x146)]===_0x3451f9(0x14f)?_0x3451f9(0x147):_0x3451f9(0x126);return{'tool':'','model':_0x46ddf6,'modelShort':''};}if(_0x404c5b[_0x3451f9(0x144)]&&exports[_0x3451f9(0x145)][_0x404c5b[_0x3451f9(0x144)]])return{'tool':_0x3451f9(0x125),'model':_0x404c5b['AIDER_MODEL'],'modelShort':''};if(_0x404c5b[_0x3451f9(0x172)]){const _0x4252b6=(_0x404c5b[_0x3451f9(0x17e)]||'')['toLowerCase']();if(_0x4252b6[_0x3451f9(0x15f)](_0x3451f9(0x11f)))return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':_0x3451f9(0x162)};if(_0x4252b6[_0x3451f9(0x15f)](_0x3451f9(0x14e)))return{'tool':_0x3451f9(0x14e),'model':_0x3451f9(0x126),'modelShort':_0x3451f9(0x162)};}const _0x29f8ee=process[_0x3451f9(0x14b)]['TRIMPROMPT_MODEL']||'';if(_0x29f8ee&&exports['PRICING'][_0x29f8ee])return{'tool':'','model':_0x29f8ee,'modelShort':''};return _0x2c9532;}function a0_0x11ba(){const _0x269ffa=['baseDir','parse','includes','ANTIGRAVITY_AGENT','Claude\x203.5\x20Sonnet','sonnet','estimated_raw_tokens','existsSync','toString','continue','spawn','split','1.0','tool','auto','stats.json','Gemini\x203.5\x20Live\x20Translate','config.json','logsDir','claude-sonnet-4-5','CURSOR_AGENT','VSCODE_PID','AI_AGENT','utf8','hasOwnProperty','init','gemini','writable','Claude\x20Sonnet\x204.5','Claude\x20Haiku\x204.5','stringify','Claude\x20Fable\x205','COPILOT_MODEL','PATH','getOwnPropertyNames','Tracker','OpenAI\x20o3-mini','Claude\x20Opus\x204.5','claude','defineProperty','Claude\x20Mythos\x205','detectSessionTool','opus','CONTINUE_GLOBAL_DIR','substring','saveLogs','.comp.txt','OpenAI\x20o1-mini','length','ceil','GPT-5.4\x20Nano','join','saveConfig','github-copilot','GPT-4o','default','call','gemini-3-5-flash','GPT-5.5','create','112947WjffmW','pop','31757lujEhQ','320hdhWyK','tokens_saved','OpenAI\x20o1','flash','REPLIT_ENVIRONMENT','__esModule','6OAdyxd','o3mini','claude_code','Gemini\x203.1\x20Flash-Lite','Claude\x20Opus\x204.8','gemini-3-1-pro','homedir','codex','replit','Claude\x20Opus\x204.7','path','writeFileSync','Claude\x20Haiku\x203.5','getConfig','CLINE_DATA_DIR','cursor','model_used','readFileSync','copilot','Cursor\x20Small','TRIMPROMPT_TELEMETRY_URL','aider','claude-sonnet-4-6','telemetry_url','random','GPT-4o\x20Mini','__setModuleDefault','configPath','TRIMPROMPT_MODEL','12vZqGqi','modelShort','__createBinding','.raw.txt','getOwnPropertyDescriptor','statsPath','REPL_ID','prototype','CLAUDECODE','getLogs','logExecution','input_price_1m','setConfig','ignore','tracker','GPT-5.4','max','13942494itQGAL','6005672nXVjPi','push','claude-code','Claude\x20Opus\x204.1\x20(deprecated)','GPT-4.1\x20Mini','AIDER_MODEL','PRICING','CLAUDE_EFFORT','claude-opus-4-8','GPT-4.1\x20Nano','toFixed','name','env','__importStar','config','windsurf','high','3140NTmToR','child_process','claude-3-5-sonnet','toISOString','antigravity','153376LjoIFa','1290CSosRi','configurable','mkdirSync','estimated_compressed_tokens','Gemini\x203.5\x20Flash','getStatsSummary','3701418JbZVxH'];a0_0x11ba=function(){return _0x269ffa;};return a0_0x11ba();}class Tracker{[a0_0x2c620c(0x15d)];[a0_0x2c620c(0x12b)];['statsPath'];['logsDir'];[a0_0x2c620c(0x14d)];constructor(){const _0x2c7c6a=a0_0x2c620c;this[_0x2c7c6a(0x15d)]=path[_0x2c7c6a(0xfe)](os[_0x2c7c6a(0x116)](),'.trimprompt'),this[_0x2c7c6a(0x12b)]=path[_0x2c7c6a(0xfe)](this[_0x2c7c6a(0x15d)],_0x2c7c6a(0x16e)),this[_0x2c7c6a(0x132)]=path[_0x2c7c6a(0xfe)](this[_0x2c7c6a(0x15d)],_0x2c7c6a(0x16c)),this[_0x2c7c6a(0x16f)]=path[_0x2c7c6a(0xfe)](this[_0x2c7c6a(0x15d)],'logs'),this[_0x2c7c6a(0x176)]();}[a0_0x2c620c(0x176)](){const _0x5f3b42=a0_0x2c620c;!fs[_0x5f3b42(0x164)](this[_0x5f3b42(0x15d)])&&fs[_0x5f3b42(0x158)](this[_0x5f3b42(0x15d)],{'recursive':!![]});!fs[_0x5f3b42(0x164)](this[_0x5f3b42(0x16f)])&&fs[_0x5f3b42(0x158)](this[_0x5f3b42(0x16f)],{'recursive':!![]});const _0x444203={'version':_0x5f3b42(0x169),'telemetry_url':process[_0x5f3b42(0x14b)][_0x5f3b42(0x124)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x5f3b42(0x147)};if(fs['existsSync'](this['configPath']))try{const _0x516041=fs[_0x5f3b42(0x121)](this[_0x5f3b42(0x12b)],'utf8');this[_0x5f3b42(0x14d)]={..._0x444203,...JSON[_0x5f3b42(0x15e)](_0x516041)};}catch(_0x398391){this[_0x5f3b42(0x14d)]=_0x444203;}else this[_0x5f3b42(0x14d)]=_0x444203,this[_0x5f3b42(0xff)]();!fs['existsSync'](this[_0x5f3b42(0x132)])&&fs[_0x5f3b42(0x11b)](this[_0x5f3b42(0x132)],JSON[_0x5f3b42(0x17b)]([]),'utf8');}['getConfig'](){const _0x2846db=a0_0x2c620c;return process[_0x2846db(0x14b)][_0x2846db(0x124)]&&(this[_0x2846db(0x14d)][_0x2846db(0x127)]=process[_0x2846db(0x14b)][_0x2846db(0x124)]),this[_0x2846db(0x14d)];}[a0_0x2c620c(0x139)](_0x399de7,_0x3c4edf){const _0x1de1f1=a0_0x2c620c;this[_0x1de1f1(0x14d)][_0x399de7]=_0x3c4edf,this[_0x1de1f1(0xff)]();}['saveConfig'](){const _0x5ad833=a0_0x2c620c;fs[_0x5ad833(0x11b)](this['configPath'],JSON['stringify'](this[_0x5ad833(0x14d)],null,0x2),_0x5ad833(0x174));}[a0_0x2c620c(0x136)](){const _0x1fcf56=a0_0x2c620c;try{if(!fs[_0x1fcf56(0x164)](this[_0x1fcf56(0x132)]))return[];const _0x446997=fs[_0x1fcf56(0x121)](this[_0x1fcf56(0x132)],_0x1fcf56(0x174));return JSON[_0x1fcf56(0x15e)](_0x446997);}catch{return[];}}['saveLogs'](_0xc742c9){const _0xd91120=a0_0x2c620c;fs[_0xd91120(0x11b)](this[_0xd91120(0x132)],JSON[_0xd91120(0x17b)](_0xc742c9,null,0x2),_0xd91120(0x174));}[a0_0x2c620c(0x137)](_0x5aff3b,_0x172b3c,_0xf16725,_0x6d0d8a){const _0x3c192e=a0_0x2c620c,_0xdfbe4d=this['getLogs'](),_0x21946e=_0x172b3c[_0x3c192e(0xfb)],_0x1d4365=_0xf16725[_0x3c192e(0xfb)],_0x132237=Math['ceil'](_0x21946e/0x4),_0x4014be=Math[_0x3c192e(0xfc)](_0x1d4365/0x4),_0xebb52a=Math[_0x3c192e(0x13d)](0x0,_0x132237-_0x4014be),_0x5199cb=detectSessionTool(),_0x252b9c=_0x5199cb['model'],_0xa6457a=Math[_0x3c192e(0x128)]()[_0x3c192e(0x165)](0x24)[_0x3c192e(0xf7)](0x2,0xb);try{fs['writeFileSync'](path['join'](this[_0x3c192e(0x16f)],_0xa6457a+_0x3c192e(0x130)),_0x172b3c,_0x3c192e(0x174)),fs['writeFileSync'](path[_0x3c192e(0xfe)](this[_0x3c192e(0x16f)],_0xa6457a+_0x3c192e(0xf9)),_0xf16725,'utf8');}catch{}const _0xde1b7a=_0x5aff3b['split']('\x20')[0x0]||'unknown',_0x2fbdfd=_0x5199cb[_0x3c192e(0x16a)]?_0x5199cb['modelShort']?_0x5199cb['tool']+'-'+_0x5199cb[_0x3c192e(0x12e)]+'-'+_0xde1b7a:_0x5199cb[_0x3c192e(0x16a)]+'-'+_0xde1b7a:_0xde1b7a,_0x16eee1={'id':_0xa6457a,'timestamp':new Date()[_0x3c192e(0x153)](),'command':_0x2fbdfd,'raw_chars':_0x21946e,'compressed_chars':_0x1d4365,'estimated_raw_tokens':_0x132237,'estimated_compressed_tokens':_0x4014be,'tokens_saved':_0xebb52a,'model_used':_0x252b9c,'exit_code':_0x6d0d8a,'synced':![],'ai_detected':!!_0x5199cb['tool']};_0xdfbe4d[_0x3c192e(0x140)](_0x16eee1),this[_0x3c192e(0xf8)](_0xdfbe4d);const _0x3e9e3c=this[_0x3c192e(0x11d)]()['telemetry_url'];return _0x3e9e3c&&_0x3e9e3c['trim']()[_0x3c192e(0xfb)]>0x0&&this['triggerBackgroundSync'](),_0x16eee1;}['triggerBackgroundSync'](){const _0x3913e8=a0_0x2c620c;try{const _0x32846d=path[_0x3913e8(0xfe)](__dirname,'sync.js');if(fs[_0x3913e8(0x164)](_0x32846d)){const _0x4c38a5=(0x0,child_process_1[_0x3913e8(0x167)])(process['execPath'],[_0x32846d],{'detached':!![],'stdio':_0x3913e8(0x13a)});_0x4c38a5['unref']();}}catch{}}[a0_0x2c620c(0x15b)](_0x247bb7='auto'){const _0x5b0f98=a0_0x2c620c,_0x2f0ed6=this['getLogs']();let _0x55743d=0x0,_0x52e4a8=0x0,_0x39fb2c=0x0;for(const _0x38ced4 of _0x2f0ed6){_0x55743d+=_0x38ced4[_0x5b0f98(0x163)],_0x52e4a8+=_0x38ced4[_0x5b0f98(0x159)],_0x39fb2c+=_0x38ced4[_0x5b0f98(0x10b)];}let _0x1e7f1c=_0x247bb7;(!_0x1e7f1c||_0x1e7f1c===_0x5b0f98(0x16b)||!exports[_0x5b0f98(0x145)][_0x1e7f1c])&&(_0x2f0ed6[_0x5b0f98(0xfb)]>0x0&&_0x2f0ed6[_0x2f0ed6[_0x5b0f98(0xfb)]-0x1][_0x5b0f98(0x120)]?_0x1e7f1c=_0x2f0ed6[_0x2f0ed6['length']-0x1][_0x5b0f98(0x120)]:_0x1e7f1c=this[_0x5b0f98(0x11d)]()['default_model']||_0x5b0f98(0x152));const _0x3daf22=exports[_0x5b0f98(0x145)][_0x1e7f1c]||exports[_0x5b0f98(0x145)][_0x5b0f98(0x152)],_0x36211f=_0x39fb2c*_0x3daf22[_0x5b0f98(0x138)]/0xf4240,_0x456518=_0x55743d*_0x3daf22[_0x5b0f98(0x138)]/0xf4240,_0x5edede=_0x52e4a8*_0x3daf22[_0x5b0f98(0x138)]/0xf4240,_0x5b4995=_0x55743d>0x0?_0x39fb2c/_0x55743d*0x64:0x0;return{'total_raw_tokens':_0x55743d,'total_compressed_tokens':_0x52e4a8,'total_tokens_saved':_0x39fb2c,'savings_percentage':parseFloat(_0x5b4995[_0x5b0f98(0x149)](0x1)),'money_saved_usd':parseFloat(_0x36211f[_0x5b0f98(0x149)](0x4)),'raw_cost_usd':parseFloat(_0x456518['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x5edede['toFixed'](0x4)),'model_name':_0x3daf22[_0x5b0f98(0x14a)],'model_key':_0x1e7f1c};}}exports[a0_0x2c620c(0x180)]=Tracker,exports[a0_0x2c620c(0x13b)]=new Tracker();