trimprompt 1.0.5 → 1.0.7

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/tracker.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x1e4798=a0_0x23bf;(function(_0x475226,_0x5dd993){const _0x1f2dce=a0_0x23bf,_0x3d3856=_0x475226();while(!![]){try{const _0xe8753a=-parseInt(_0x1f2dce(0x1f4))/0x1*(parseInt(_0x1f2dce(0x222))/0x2)+parseInt(_0x1f2dce(0x1fb))/0x3*(parseInt(_0x1f2dce(0x244))/0x4)+parseInt(_0x1f2dce(0x206))/0x5+parseInt(_0x1f2dce(0x249))/0x6*(parseInt(_0x1f2dce(0x22c))/0x7)+parseInt(_0x1f2dce(0x227))/0x8*(parseInt(_0x1f2dce(0x201))/0x9)+parseInt(_0x1f2dce(0x22a))/0xa*(parseInt(_0x1f2dce(0x238))/0xb)+-parseInt(_0x1f2dce(0x1ec))/0xc;if(_0xe8753a===_0x5dd993)break;else _0x3d3856['push'](_0x3d3856['shift']());}catch(_0x2494c3){_0x3d3856['push'](_0x3d3856['shift']());}}}(a0_0x578a,0x9b24a));function a0_0x578a(){const _0x3c7615=['3aHllQt','logs','OpenAI\x20o3-mini','Claude\x20Haiku\x203.5','OpenAI\x20o1-mini','logExecution','261yIuzZZ','length','Gemini\x203.1\x20Flash-Lite','GPT-5.5','trim','5283630FISUSW','parse','.comp.txt','child_process','getStatsSummary','default','Claude\x20Opus\x204.5','Gemini\x203.5\x20Live\x20Translate','TRIMPROMPT_MODEL','hasOwnProperty','Claude\x20Fable\x205','unknown','getConfig','Claude\x20Haiku\x204.5','logsDir','Cursor\x20Small','execPath','claude-opus-4-8','get','__esModule','env','PRICING','call','TRIMPROMPT_TELEMETRY_URL','toISOString','writable','name','gemini-3-1-pro','2fcMMpH','init','model_used','GPT-4o\x20Mini','Claude\x20Opus\x204.1\x20(deprecated)','108784uvzDRY','baseDir','unref','1190XzGYqx','writeFileSync','7HCNagd','saveConfig','prototype','config','mkdirSync','1.0','configurable','claude-3-5-sonnet','statsPath','tracker','spawn','.raw.txt','52162jRumeB','saveLogs','Claude\x20Mythos\x205','ceil','GPT-4.1\x20Mini','OpenAI\x20o1','getLogs','GPT-4o','readFileSync','GPT-5.4\x20Mini','ANTIGRAVITY_AGENT','GPT-5.4\x20Nano','3139208QfrAMO','.trimprompt','toFixed','getOwnPropertyNames','estimated_compressed_tokens','5019570JWlfSP','__createBinding','stringify','path','configPath','ignore','__setModuleDefault','Claude\x20Sonnet\x204.5','CLAUDECODE','GPT-5.4','create','auto','toString','Tracker','27623748FRIkEO','homedir','max','utf8','stats.json','CURSOR_VERSION','tokens_saved','join','699318EScufj','Claude\x203.5\x20Sonnet','telemetry_url','existsSync','Claude\x20Opus\x204.8','defineProperty','triggerBackgroundSync'];a0_0x578a=function(){return _0x3c7615;};return a0_0x578a();}var __createBinding=this&&this[a0_0x1e4798(0x24a)]||(Object['create']?function(_0x33a5a9,_0xf82c0f,_0x397592,_0x2fd0da){const _0x3c1808=a0_0x1e4798;if(_0x2fd0da===undefined)_0x2fd0da=_0x397592;var _0x37dc73=Object['getOwnPropertyDescriptor'](_0xf82c0f,_0x397592);(!_0x37dc73||(_0x3c1808(0x218)in _0x37dc73?!_0xf82c0f[_0x3c1808(0x219)]:_0x37dc73[_0x3c1808(0x21f)]||_0x37dc73[_0x3c1808(0x232)]))&&(_0x37dc73={'enumerable':!![],'get':function(){return _0xf82c0f[_0x397592];}}),Object[_0x3c1808(0x1f9)](_0x33a5a9,_0x2fd0da,_0x37dc73);}:function(_0x160538,_0x5a193a,_0x35cc0b,_0x409592){if(_0x409592===undefined)_0x409592=_0x35cc0b;_0x160538[_0x409592]=_0x5a193a[_0x35cc0b];}),__setModuleDefault=this&&this[a0_0x1e4798(0x1e4)]||(Object[a0_0x1e4798(0x1e8)]?function(_0x37a250,_0x3939f3){const _0x3b3a5b=a0_0x1e4798;Object[_0x3b3a5b(0x1f9)](_0x37a250,_0x3b3a5b(0x20b),{'enumerable':!![],'value':_0x3939f3});}:function(_0x3037c4,_0x1976ef){const _0x2db0ba=a0_0x1e4798;_0x3037c4[_0x2db0ba(0x20b)]=_0x1976ef;}),__importStar=this&&this['__importStar']||(function(){var _0x7a80b9=function(_0x41d5d8){const _0x594250=a0_0x23bf;return _0x7a80b9=Object[_0x594250(0x247)]||function(_0x491542){const _0x2031a0=_0x594250;var _0x25a3ae=[];for(var _0xec4bfe in _0x491542)if(Object[_0x2031a0(0x22e)][_0x2031a0(0x20f)][_0x2031a0(0x21c)](_0x491542,_0xec4bfe))_0x25a3ae[_0x25a3ae[_0x2031a0(0x202)]]=_0xec4bfe;return _0x25a3ae;},_0x7a80b9(_0x41d5d8);};return function(_0x4a35f9){const _0x1d855d=a0_0x23bf;if(_0x4a35f9&&_0x4a35f9[_0x1d855d(0x219)])return _0x4a35f9;var _0x4136e1={};if(_0x4a35f9!=null){for(var _0x355c8d=_0x7a80b9(_0x4a35f9),_0x3d773c=0x0;_0x3d773c<_0x355c8d['length'];_0x3d773c++)if(_0x355c8d[_0x3d773c]!==_0x1d855d(0x20b))__createBinding(_0x4136e1,_0x4a35f9,_0x355c8d[_0x3d773c]);}return __setModuleDefault(_0x4136e1,_0x4a35f9),_0x4136e1;};}());Object['defineProperty'](exports,a0_0x1e4798(0x219),{'value':!![]}),exports[a0_0x1e4798(0x235)]=exports[a0_0x1e4798(0x1eb)]=exports[a0_0x1e4798(0x21b)]=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1e4798(0x1e1))),os=__importStar(require('os')),child_process_1=require(a0_0x1e4798(0x209));exports['PRICING']={'claude-fable-5':{'name':a0_0x1e4798(0x210),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x1e4798(0x23a),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x1e4798(0x1f8),'input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x1e4798(0x20c),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x1e4798(0x226),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x1e4798(0x1e5),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x1e4798(0x1f5),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x1e4798(0x213),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x1e4798(0x1fe),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x1e4798(0x204),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x1e4798(0x1e7),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x1e4798(0x23f),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x1e4798(0x241),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x1e4798(0x243),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x1e4798(0x23c),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x1e4798(0x225),'input_price_1m':0.15},'o1':{'name':a0_0x1e4798(0x23d),'input_price_1m':0xf},'o1-mini':{'name':a0_0x1e4798(0x1ff),'input_price_1m':0x3},'o3-mini':{'name':a0_0x1e4798(0x1fd),'input_price_1m':1.1},'cursor-small':{'name':a0_0x1e4798(0x215),'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_0x1e4798(0x203),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x1e4798(0x20d),'input_price_1m':3.5}};function a0_0x23bf(_0x1a806c,_0x493a15){const _0x578af2=a0_0x578a();return a0_0x23bf=function(_0x23bf6e,_0x5d903b){_0x23bf6e=_0x23bf6e-0x1e1;let _0x1620ed=_0x578af2[_0x23bf6e];return _0x1620ed;},a0_0x23bf(_0x1a806c,_0x493a15);}class Tracker{[a0_0x1e4798(0x228)];[a0_0x1e4798(0x1e2)];['statsPath'];[a0_0x1e4798(0x214)];['config'];constructor(){const _0x4ebf60=a0_0x1e4798;this['baseDir']=path['join'](os[_0x4ebf60(0x1ed)](),_0x4ebf60(0x245)),this[_0x4ebf60(0x1e2)]=path['join'](this[_0x4ebf60(0x228)],'config.json'),this[_0x4ebf60(0x234)]=path[_0x4ebf60(0x1f3)](this['baseDir'],_0x4ebf60(0x1f0)),this['logsDir']=path[_0x4ebf60(0x1f3)](this[_0x4ebf60(0x228)],_0x4ebf60(0x1fc)),this[_0x4ebf60(0x223)]();}['init'](){const _0x346539=a0_0x1e4798;!fs['existsSync'](this[_0x346539(0x228)])&&fs[_0x346539(0x230)](this['baseDir'],{'recursive':!![]});!fs[_0x346539(0x1f7)](this[_0x346539(0x214)])&&fs[_0x346539(0x230)](this[_0x346539(0x214)],{'recursive':!![]});const _0x499513={'version':_0x346539(0x231),'telemetry_url':process[_0x346539(0x21a)]['TRIMPROMPT_TELEMETRY_URL']||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x346539(0x217)};if(fs[_0x346539(0x1f7)](this['configPath']))try{const _0x1c769d=fs[_0x346539(0x240)](this[_0x346539(0x1e2)],_0x346539(0x1ef));this[_0x346539(0x22f)]={..._0x499513,...JSON[_0x346539(0x207)](_0x1c769d)};}catch(_0x355bda){this[_0x346539(0x22f)]=_0x499513;}else this[_0x346539(0x22f)]=_0x499513,this['saveConfig']();!fs[_0x346539(0x1f7)](this[_0x346539(0x234)])&&fs[_0x346539(0x22b)](this[_0x346539(0x234)],JSON[_0x346539(0x24b)]([]),'utf8');}[a0_0x1e4798(0x212)](){const _0x5eb975=a0_0x1e4798;return process[_0x5eb975(0x21a)][_0x5eb975(0x21d)]&&(this[_0x5eb975(0x22f)][_0x5eb975(0x1f6)]=process['env']['TRIMPROMPT_TELEMETRY_URL']),this[_0x5eb975(0x22f)];}['setConfig'](_0x1b20f1,_0x2852d9){const _0x57ebde=a0_0x1e4798;this[_0x57ebde(0x22f)][_0x1b20f1]=_0x2852d9,this[_0x57ebde(0x22d)]();}[a0_0x1e4798(0x22d)](){const _0x576803=a0_0x1e4798;fs[_0x576803(0x22b)](this[_0x576803(0x1e2)],JSON['stringify'](this[_0x576803(0x22f)],null,0x2),_0x576803(0x1ef));}[a0_0x1e4798(0x23e)](){const _0x350a4b=a0_0x1e4798;try{if(!fs['existsSync'](this['statsPath']))return[];const _0x506756=fs[_0x350a4b(0x240)](this[_0x350a4b(0x234)],'utf8');return JSON[_0x350a4b(0x207)](_0x506756);}catch{return[];}}[a0_0x1e4798(0x239)](_0x127f6b){const _0x5991c8=a0_0x1e4798;fs['writeFileSync'](this[_0x5991c8(0x234)],JSON[_0x5991c8(0x24b)](_0x127f6b,null,0x2),_0x5991c8(0x1ef));}[a0_0x1e4798(0x200)](_0x347ede,_0x5c19e6,_0x24baa5,_0x3f7102){const _0x1fc594=a0_0x1e4798,_0x11f2b4=this[_0x1fc594(0x23e)](),_0x59f6f2=_0x5c19e6[_0x1fc594(0x202)],_0x2427a7=_0x24baa5[_0x1fc594(0x202)],_0x1b9975=Math[_0x1fc594(0x23b)](_0x59f6f2/0x4),_0x57dac1=Math[_0x1fc594(0x23b)](_0x2427a7/0x4),_0x4a7bcb=Math[_0x1fc594(0x1ee)](0x0,_0x1b9975-_0x57dac1);let _0x13923b=_0x1fc594(0x233);if(process['env'][_0x1fc594(0x20e)]&&exports[_0x1fc594(0x21b)][process[_0x1fc594(0x21a)][_0x1fc594(0x20e)]])_0x13923b=process[_0x1fc594(0x21a)][_0x1fc594(0x20e)];else{if(process[_0x1fc594(0x21a)][_0x1fc594(0x1e6)]==='1'||process[_0x1fc594(0x21a)]['CLAUDE_CODE']==='1')_0x13923b=_0x1fc594(0x233);else{if(process[_0x1fc594(0x21a)][_0x1fc594(0x1f1)])_0x13923b='claude-3-5-sonnet';else{if(process[_0x1fc594(0x21a)][_0x1fc594(0x242)]==='1')_0x13923b=_0x1fc594(0x221);else{const _0xa8e29f=this[_0x1fc594(0x212)]()['default_model'];_0xa8e29f&&exports[_0x1fc594(0x21b)][_0xa8e29f]&&(_0x13923b=_0xa8e29f);}}}}const _0x47d001=Math['random']()[_0x1fc594(0x1ea)](0x24)['substring'](0x2,0xb);try{fs[_0x1fc594(0x22b)](path[_0x1fc594(0x1f3)](this[_0x1fc594(0x214)],_0x47d001+_0x1fc594(0x237)),_0x5c19e6,_0x1fc594(0x1ef)),fs[_0x1fc594(0x22b)](path[_0x1fc594(0x1f3)](this[_0x1fc594(0x214)],_0x47d001+_0x1fc594(0x208)),_0x24baa5,_0x1fc594(0x1ef));}catch{}const _0x5f3477={'id':_0x47d001,'timestamp':new Date()[_0x1fc594(0x21e)](),'command':_0x347ede['split']('\x20')[0x0]||_0x1fc594(0x211),'raw_chars':_0x59f6f2,'compressed_chars':_0x2427a7,'estimated_raw_tokens':_0x1b9975,'estimated_compressed_tokens':_0x57dac1,'tokens_saved':_0x4a7bcb,'model_used':_0x13923b,'exit_code':_0x3f7102,'synced':![]};_0x11f2b4['push'](_0x5f3477),this['saveLogs'](_0x11f2b4);const _0x1dc2d4=this['getConfig']()[_0x1fc594(0x1f6)];return _0x1dc2d4&&_0x1dc2d4[_0x1fc594(0x205)]()[_0x1fc594(0x202)]>0x0&&this[_0x1fc594(0x1fa)](),_0x5f3477;}[a0_0x1e4798(0x1fa)](){const _0x21fc50=a0_0x1e4798;try{const _0x3db342=path[_0x21fc50(0x1f3)](__dirname,'sync.js');if(fs[_0x21fc50(0x1f7)](_0x3db342)){const _0x4c8e71=(0x0,child_process_1[_0x21fc50(0x236)])(process[_0x21fc50(0x216)],[_0x3db342],{'detached':!![],'stdio':_0x21fc50(0x1e3)});_0x4c8e71[_0x21fc50(0x229)]();}}catch{}}[a0_0x1e4798(0x20a)](_0x49bd34=a0_0x1e4798(0x1e9)){const _0x4526c6=a0_0x1e4798,_0xa0d9cd=this[_0x4526c6(0x23e)]();let _0x5bb05a=0x0,_0x4c7ecd=0x0,_0x4c8ff6=0x0;for(const _0x326b37 of _0xa0d9cd){_0x5bb05a+=_0x326b37['estimated_raw_tokens'],_0x4c7ecd+=_0x326b37[_0x4526c6(0x248)],_0x4c8ff6+=_0x326b37[_0x4526c6(0x1f2)];}let _0x4bfcbd=_0x49bd34;(!_0x4bfcbd||_0x4bfcbd===_0x4526c6(0x1e9)||!exports['PRICING'][_0x4bfcbd])&&(_0xa0d9cd[_0x4526c6(0x202)]>0x0&&_0xa0d9cd[_0xa0d9cd[_0x4526c6(0x202)]-0x1][_0x4526c6(0x224)]?_0x4bfcbd=_0xa0d9cd[_0xa0d9cd[_0x4526c6(0x202)]-0x1][_0x4526c6(0x224)]:_0x4bfcbd=this[_0x4526c6(0x212)]()['default_model']||_0x4526c6(0x233));const _0x45baf0=exports['PRICING'][_0x4bfcbd]||exports[_0x4526c6(0x21b)][_0x4526c6(0x233)],_0xc22dba=_0x4c8ff6*_0x45baf0['input_price_1m']/0xf4240,_0xd2affd=_0x5bb05a*_0x45baf0['input_price_1m']/0xf4240,_0x3ea78e=_0x4c7ecd*_0x45baf0['input_price_1m']/0xf4240,_0x2dcc80=_0x5bb05a>0x0?_0x4c8ff6/_0x5bb05a*0x64:0x0;return{'total_raw_tokens':_0x5bb05a,'total_compressed_tokens':_0x4c7ecd,'total_tokens_saved':_0x4c8ff6,'savings_percentage':parseFloat(_0x2dcc80['toFixed'](0x1)),'money_saved_usd':parseFloat(_0xc22dba[_0x4526c6(0x246)](0x4)),'raw_cost_usd':parseFloat(_0xd2affd[_0x4526c6(0x246)](0x4)),'compressed_cost_usd':parseFloat(_0x3ea78e[_0x4526c6(0x246)](0x4)),'model_name':_0x45baf0[_0x4526c6(0x220)],'model_key':_0x4bfcbd};}}exports[a0_0x1e4798(0x1eb)]=Tracker,exports[a0_0x1e4798(0x235)]=new Tracker();
1
+ 'use strict';const a0_0x5978fd=a0_0x4522;(function(_0x520e3a,_0x4d3a58){const _0x546a96=a0_0x4522,_0x1d4155=_0x520e3a();while(!![]){try{const _0x4e22fd=-parseInt(_0x546a96(0x16f))/0x1+-parseInt(_0x546a96(0x11b))/0x2+parseInt(_0x546a96(0x16b))/0x3+-parseInt(_0x546a96(0x14d))/0x4+parseInt(_0x546a96(0x12b))/0x5*(parseInt(_0x546a96(0x146))/0x6)+parseInt(_0x546a96(0x187))/0x7*(-parseInt(_0x546a96(0x194))/0x8)+parseInt(_0x546a96(0x13c))/0x9;if(_0x4e22fd===_0x4d3a58)break;else _0x1d4155['push'](_0x1d4155['shift']());}catch(_0x206a6a){_0x1d4155['push'](_0x1d4155['shift']());}}}(a0_0x1548,0xd2b2b));var __createBinding=this&&this[a0_0x5978fd(0x159)]||(Object[a0_0x5978fd(0x196)]?function(_0xebda80,_0x4a8639,_0x1b853f,_0x47a5b7){const _0x2f4aaa=a0_0x5978fd;if(_0x47a5b7===undefined)_0x47a5b7=_0x1b853f;var _0x4d10cd=Object[_0x2f4aaa(0x19f)](_0x4a8639,_0x1b853f);(!_0x4d10cd||('get'in _0x4d10cd?!_0x4a8639[_0x2f4aaa(0x156)]:_0x4d10cd['writable']||_0x4d10cd[_0x2f4aaa(0x16e)]))&&(_0x4d10cd={'enumerable':!![],'get':function(){return _0x4a8639[_0x1b853f];}}),Object[_0x2f4aaa(0x1a4)](_0xebda80,_0x47a5b7,_0x4d10cd);}:function(_0x5c7470,_0x1b2dbb,_0x342035,_0x55f9cb){if(_0x55f9cb===undefined)_0x55f9cb=_0x342035;_0x5c7470[_0x55f9cb]=_0x1b2dbb[_0x342035];}),__setModuleDefault=this&&this[a0_0x5978fd(0x174)]||(Object[a0_0x5978fd(0x196)]?function(_0x251386,_0x357f20){const _0x4498a7=a0_0x5978fd;Object[_0x4498a7(0x1a4)](_0x251386,'default',{'enumerable':!![],'value':_0x357f20});}:function(_0x232c87,_0xc805a4){_0x232c87['default']=_0xc805a4;}),__importStar=this&&this['__importStar']||(function(){var _0xc7a6c3=function(_0x49212e){return _0xc7a6c3=Object['getOwnPropertyNames']||function(_0x3ac671){const _0x10e692=a0_0x4522;var _0x52989d=[];for(var _0x2fb8f6 in _0x3ac671)if(Object['prototype']['hasOwnProperty'][_0x10e692(0x19d)](_0x3ac671,_0x2fb8f6))_0x52989d[_0x52989d[_0x10e692(0x120)]]=_0x2fb8f6;return _0x52989d;},_0xc7a6c3(_0x49212e);};return function(_0x51e3a3){const _0x2aa4df=a0_0x4522;if(_0x51e3a3&&_0x51e3a3[_0x2aa4df(0x156)])return _0x51e3a3;var _0x3fa9cb={};if(_0x51e3a3!=null){for(var _0x4bc153=_0xc7a6c3(_0x51e3a3),_0xbb012a=0x0;_0xbb012a<_0x4bc153['length'];_0xbb012a++)if(_0x4bc153[_0xbb012a]!==_0x2aa4df(0x164))__createBinding(_0x3fa9cb,_0x51e3a3,_0x4bc153[_0xbb012a]);}return __setModuleDefault(_0x3fa9cb,_0x51e3a3),_0x3fa9cb;};}());Object['defineProperty'](exports,a0_0x5978fd(0x156),{'value':!![]}),exports[a0_0x5978fd(0x152)]=exports[a0_0x5978fd(0x18e)]=exports[a0_0x5978fd(0x12c)]=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5978fd(0x11f))),os=__importStar(require('os')),child_process_1=require(a0_0x5978fd(0x15b));exports[a0_0x5978fd(0x12c)]={'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':'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':a0_0x5978fd(0x161),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x5978fd(0x13e),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x5978fd(0x19e),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x5978fd(0x175),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x5978fd(0x157),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x5978fd(0x18d),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x5978fd(0x141),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x5978fd(0x168),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x5978fd(0x19b),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x5978fd(0x17c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x5978fd(0x195),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x5978fd(0x15f),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0x5978fd(0x140),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x5978fd(0x179),'input_price_1m':1.1},'cursor-small':{'name':a0_0x5978fd(0x1a2),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x5978fd(0x16c),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x5978fd(0x18b),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x5978fd(0x183),'input_price_1m':3.5}};function detectSessionTool(){const _0x451a4f=a0_0x5978fd,_0x255f8c=process[_0x451a4f(0x177)],_0x44738d={'tool':'','model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c[_0x451a4f(0x15a)]&&exports[_0x451a4f(0x12c)][_0x255f8c[_0x451a4f(0x15a)]])return{'tool':'','model':_0x255f8c[_0x451a4f(0x15a)],'modelShort':''};const _0xb98aa8=(_0x255f8c[_0x451a4f(0x138)]||'')['toLowerCase']();if(_0xb98aa8){if(_0xb98aa8['includes'](_0x451a4f(0x184))||_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x186))){const _0x5d95db=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?_0x451a4f(0x17d):_0x451a4f(0x123),_0x2c489b=_0x255f8c[_0x451a4f(0x160)]==='high'?_0x451a4f(0x158):_0x451a4f(0x18c);return{'tool':_0x451a4f(0x15c),'model':_0x2c489b,'modelShort':_0x5d95db};}if(_0xb98aa8['includes'](_0x451a4f(0x188)))return{'tool':_0x451a4f(0x188),'model':_0x451a4f(0x18c),'modelShort':'sonnet'};if(_0xb98aa8['includes'](_0x451a4f(0x176))||_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x17e))){const _0x4a9a88=_0x255f8c[_0x451a4f(0x189)]||'';if(_0x4a9a88&&exports[_0x451a4f(0x12c)][_0x4a9a88])return{'tool':_0x451a4f(0x17e),'model':_0x4a9a88,'modelShort':_0x4a9a88['split']('-')['pop']()||''};return{'tool':_0x451a4f(0x17e),'model':_0x451a4f(0x191),'modelShort':_0x451a4f(0x123)};}if(_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x172)))return{'tool':_0x451a4f(0x172),'model':'gemini-3-5-flash','modelShort':_0x451a4f(0x18f)};if(_0xb98aa8[_0x451a4f(0x155)]('codex'))return{'tool':_0x451a4f(0x134),'model':_0x451a4f(0x180),'modelShort':_0x451a4f(0x17a)};if(_0xb98aa8[_0x451a4f(0x155)]('devin'))return{'tool':'devin','model':'claude-sonnet-4-6','modelShort':''};if(_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x121)))return{'tool':'antigravity','model':_0x451a4f(0x14a),'modelShort':_0x451a4f(0x172)};if(_0xb98aa8[_0x451a4f(0x155)]('replit')||_0x255f8c['REPL_ID'])return{'tool':'replit','model':_0x451a4f(0x18c),'modelShort':''};return{'tool':_0xb98aa8['split']('_')[0x0][_0x451a4f(0x16d)]('-')[0x0],'model':_0x451a4f(0x18c),'modelShort':''};}if(_0x255f8c[_0x451a4f(0x11c)]==='1'||_0x255f8c[_0x451a4f(0x12e)]==='1'){const _0x12cad8=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?_0x451a4f(0x17d):'sonnet',_0x52667d=_0x255f8c['CLAUDE_EFFORT']===_0x451a4f(0x167)?'claude-opus-4-8':_0x451a4f(0x18c);return{'tool':_0x451a4f(0x15c),'model':_0x52667d,'modelShort':_0x12cad8};}if(_0x255f8c[_0x451a4f(0x125)]==='1')return{'tool':_0x451a4f(0x188),'model':_0x451a4f(0x18c),'modelShort':_0x451a4f(0x123)};if(_0x255f8c['GEMINI_CLI']==='1')return{'tool':_0x451a4f(0x172),'model':_0x451a4f(0x170),'modelShort':_0x451a4f(0x18f)};if(_0x255f8c[_0x451a4f(0x189)]||_0x255f8c[_0x451a4f(0x126)]){const _0xe0e77c=_0x255f8c[_0x451a4f(0x189)]||'';if(_0xe0e77c&&exports['PRICING'][_0xe0e77c])return{'tool':_0x451a4f(0x17e),'model':_0xe0e77c,'modelShort':_0xe0e77c[_0x451a4f(0x16d)]('-')[_0x451a4f(0x1a1)]()||''};return{'tool':_0x451a4f(0x17e),'model':'claude-sonnet-4-5','modelShort':_0x451a4f(0x123)};}if(_0x255f8c['REPL_ID']||_0x255f8c['REPLIT_ENVIRONMENT'])return{'tool':_0x451a4f(0x144),'model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c['CLINE_DATA_DIR'])return{'tool':'cline','model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c[_0x451a4f(0x169)])return{'tool':_0x451a4f(0x13a),'model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c[_0x451a4f(0x13b)]==='1')return{'tool':_0x451a4f(0x121),'model':_0x451a4f(0x14a),'modelShort':'gemini'};if(_0x255f8c[_0x451a4f(0x160)]){const _0x26023a=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?_0x451a4f(0x17d):_0x451a4f(0x123),_0x2af1bd=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?'claude-opus-4-8':_0x451a4f(0x18c);return{'tool':'','model':_0x2af1bd,'modelShort':''};}if(_0x255f8c['AIDER_MODEL']&&exports['PRICING'][_0x255f8c[_0x451a4f(0x13d)]])return{'tool':_0x451a4f(0x1a3),'model':_0x255f8c[_0x451a4f(0x13d)],'modelShort':''};if(_0x255f8c[_0x451a4f(0x132)]){const _0x3adc44=(_0x255f8c['PATH']||'')[_0x451a4f(0x185)]();if(_0x3adc44[_0x451a4f(0x155)](_0x451a4f(0x188)))return{'tool':_0x451a4f(0x188),'model':_0x451a4f(0x18c),'modelShort':'sonnet'};if(_0x3adc44['includes']('windsurf'))return{'tool':_0x451a4f(0x15e),'model':_0x451a4f(0x18c),'modelShort':'sonnet'};}const _0x25b189=process[_0x451a4f(0x177)][_0x451a4f(0x15a)]||'';if(_0x25b189&&exports[_0x451a4f(0x12c)][_0x25b189])return{'tool':'','model':_0x25b189,'modelShort':''};return _0x44738d;}function a0_0x1548(){const _0x2f2071=['Claude\x20Opus\x204.1\x20(deprecated)','logExecution','OpenAI\x20o1','GPT-5.4','name','default_model','replit','sync.js','9508782UKJnwu','logs','statsPath','TRIMPROMPT_TELEMETRY_URL','gemini-3-1-pro','stringify','model_used','938604TvFiAf','claude-3-5-sonnet','.trimprompt','join','saveConfig','tracker','saveLogs','estimated_compressed_tokens','includes','__esModule','Claude\x20Haiku\x204.5','claude-opus-4-8','__createBinding','TRIMPROMPT_MODEL','child_process','claude','mkdirSync','windsurf','GPT-4.1\x20Nano','CLAUDE_EFFORT','Claude\x20Opus\x204.5','configPath','triggerBackgroundSync','default','input_price_1m','ignore','high','GPT-4o','CONTINUE_GLOBAL_DIR','toString','5022423PvOVXI','Gemini\x203.5\x20Flash','split','configurable','1499252pSnSMI','gemini-3-5-flash','existsSync','gemini','estimated_raw_tokens','__setModuleDefault','Claude\x203.5\x20Sonnet','github-copilot','env','model','OpenAI\x20o3-mini','o3mini','homedir','GPT-5.4\x20Nano','opus','copilot','getStatsSummary','o3-mini','unref','auto','Gemini\x203.5\x20Live\x20Translate','claude-code','toLowerCase','claude_code','476ZWXjad','cursor','COPILOT_MODEL','telemetry_url','Gemini\x203.1\x20Flash-Lite','claude-sonnet-4-6','Claude\x20Haiku\x203.5','Tracker','flash','max','claude-sonnet-4-5','push','spawn','177488XHPDsy','GPT-4.1\x20Mini','create','trim','ceil','execPath','config','GPT-5.4\x20Mini','.raw.txt','call','Claude\x20Sonnet\x204.5','getOwnPropertyDescriptor','writeFileSync','pop','Cursor\x20Small','aider','defineProperty','readFileSync','tokens_saved','956242uXcaQb','CLAUDECODE','substring','tool','path','length','antigravity','getConfig','sonnet','utf8','CURSOR_AGENT','COPILOT_GITHUB_TOKEN','setConfig','modelShort','stats.json','config.json','5BqSGqZ','PRICING','random','CLAUDE_CODE','.comp.txt','toFixed','getLogs','VSCODE_PID','baseDir','codex','logsDir','parse','1.0','AI_AGENT','init','continue','ANTIGRAVITY_AGENT','11922777ZaKhSo','AIDER_MODEL'];a0_0x1548=function(){return _0x2f2071;};return a0_0x1548();}function a0_0x4522(_0x420b7e,_0x1b726d){const _0x154850=a0_0x1548();return a0_0x4522=function(_0x452285,_0x47a467){_0x452285=_0x452285-0x119;let _0x2ad8ba=_0x154850[_0x452285];return _0x2ad8ba;},a0_0x4522(_0x420b7e,_0x1b726d);}class Tracker{[a0_0x5978fd(0x133)];[a0_0x5978fd(0x162)];[a0_0x5978fd(0x148)];[a0_0x5978fd(0x135)];['config'];constructor(){const _0x1ca56d=a0_0x5978fd;this[_0x1ca56d(0x133)]=path[_0x1ca56d(0x150)](os[_0x1ca56d(0x17b)](),_0x1ca56d(0x14f)),this[_0x1ca56d(0x162)]=path[_0x1ca56d(0x150)](this[_0x1ca56d(0x133)],_0x1ca56d(0x12a)),this[_0x1ca56d(0x148)]=path['join'](this[_0x1ca56d(0x133)],_0x1ca56d(0x129)),this[_0x1ca56d(0x135)]=path[_0x1ca56d(0x150)](this[_0x1ca56d(0x133)],_0x1ca56d(0x147)),this[_0x1ca56d(0x139)]();}[a0_0x5978fd(0x139)](){const _0x4272c9=a0_0x5978fd;!fs[_0x4272c9(0x171)](this[_0x4272c9(0x133)])&&fs['mkdirSync'](this[_0x4272c9(0x133)],{'recursive':!![]});!fs[_0x4272c9(0x171)](this[_0x4272c9(0x135)])&&fs[_0x4272c9(0x15d)](this[_0x4272c9(0x135)],{'recursive':!![]});const _0x4695ff={'version':_0x4272c9(0x137),'telemetry_url':process[_0x4272c9(0x177)][_0x4272c9(0x149)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs['existsSync'](this[_0x4272c9(0x162)]))try{const _0x33d0b1=fs[_0x4272c9(0x119)](this['configPath'],_0x4272c9(0x124));this[_0x4272c9(0x19a)]={..._0x4695ff,...JSON['parse'](_0x33d0b1)};}catch(_0xa27890){this[_0x4272c9(0x19a)]=_0x4695ff;}else this['config']=_0x4695ff,this['saveConfig']();!fs[_0x4272c9(0x171)](this['statsPath'])&&fs[_0x4272c9(0x1a0)](this[_0x4272c9(0x148)],JSON[_0x4272c9(0x14b)]([]),_0x4272c9(0x124));}[a0_0x5978fd(0x122)](){const _0x1225f7=a0_0x5978fd;return process['env']['TRIMPROMPT_TELEMETRY_URL']&&(this[_0x1225f7(0x19a)]['telemetry_url']=process[_0x1225f7(0x177)]['TRIMPROMPT_TELEMETRY_URL']),this[_0x1225f7(0x19a)];}[a0_0x5978fd(0x127)](_0x5e035c,_0x5dc5dd){const _0x415142=a0_0x5978fd;this[_0x415142(0x19a)][_0x5e035c]=_0x5dc5dd,this[_0x415142(0x151)]();}[a0_0x5978fd(0x151)](){const _0x3f967c=a0_0x5978fd;fs[_0x3f967c(0x1a0)](this[_0x3f967c(0x162)],JSON[_0x3f967c(0x14b)](this[_0x3f967c(0x19a)],null,0x2),_0x3f967c(0x124));}[a0_0x5978fd(0x131)](){const _0x237802=a0_0x5978fd;try{if(!fs[_0x237802(0x171)](this[_0x237802(0x148)]))return[];const _0x368c4d=fs[_0x237802(0x119)](this[_0x237802(0x148)],_0x237802(0x124));return JSON[_0x237802(0x136)](_0x368c4d);}catch{return[];}}[a0_0x5978fd(0x153)](_0x5d8f4f){const _0x425154=a0_0x5978fd;fs[_0x425154(0x1a0)](this['statsPath'],JSON['stringify'](_0x5d8f4f,null,0x2),_0x425154(0x124));}[a0_0x5978fd(0x13f)](_0x30d9e1,_0x45710c,_0x2f8108,_0x28813c){const _0x5d134f=a0_0x5978fd,_0x501a5a=this[_0x5d134f(0x131)](),_0x1316e4=_0x45710c['length'],_0x5cf8cb=_0x2f8108[_0x5d134f(0x120)],_0x410407=Math[_0x5d134f(0x198)](_0x1316e4/0x4),_0x5e155f=Math[_0x5d134f(0x198)](_0x5cf8cb/0x4),_0x24bc9a=Math[_0x5d134f(0x190)](0x0,_0x410407-_0x5e155f),_0x1b77f4=detectSessionTool(),_0x46f0a9=_0x1b77f4[_0x5d134f(0x178)],_0x121093=Math[_0x5d134f(0x12d)]()[_0x5d134f(0x16a)](0x24)[_0x5d134f(0x11d)](0x2,0xb);try{fs[_0x5d134f(0x1a0)](path[_0x5d134f(0x150)](this[_0x5d134f(0x135)],_0x121093+_0x5d134f(0x19c)),_0x45710c,'utf8'),fs[_0x5d134f(0x1a0)](path[_0x5d134f(0x150)](this[_0x5d134f(0x135)],_0x121093+_0x5d134f(0x12f)),_0x2f8108,_0x5d134f(0x124));}catch{}const _0x5cc2fe=_0x30d9e1[_0x5d134f(0x16d)]('\x20')[0x0]||'unknown',_0x3c66d5=_0x1b77f4[_0x5d134f(0x11e)]?_0x1b77f4[_0x5d134f(0x128)]?_0x1b77f4[_0x5d134f(0x11e)]+'-'+_0x1b77f4[_0x5d134f(0x128)]+'-'+_0x5cc2fe:_0x1b77f4[_0x5d134f(0x11e)]+'-'+_0x5cc2fe:_0x5cc2fe,_0x602ef2={'id':_0x121093,'timestamp':new Date()['toISOString'](),'command':_0x3c66d5,'raw_chars':_0x1316e4,'compressed_chars':_0x5cf8cb,'estimated_raw_tokens':_0x410407,'estimated_compressed_tokens':_0x5e155f,'tokens_saved':_0x24bc9a,'model_used':_0x46f0a9,'exit_code':_0x28813c,'synced':![]};_0x501a5a[_0x5d134f(0x192)](_0x602ef2),this[_0x5d134f(0x153)](_0x501a5a);const _0x27f765=this[_0x5d134f(0x122)]()[_0x5d134f(0x18a)];return _0x27f765&&_0x27f765[_0x5d134f(0x197)]()[_0x5d134f(0x120)]>0x0&&this[_0x5d134f(0x163)](),_0x602ef2;}[a0_0x5978fd(0x163)](){const _0x3e211a=a0_0x5978fd;try{const _0x3c2a01=path[_0x3e211a(0x150)](__dirname,_0x3e211a(0x145));if(fs[_0x3e211a(0x171)](_0x3c2a01)){const _0x4daf15=(0x0,child_process_1[_0x3e211a(0x193)])(process[_0x3e211a(0x199)],[_0x3c2a01],{'detached':!![],'stdio':_0x3e211a(0x166)});_0x4daf15[_0x3e211a(0x181)]();}}catch{}}[a0_0x5978fd(0x17f)](_0x573af5='auto'){const _0x36a67c=a0_0x5978fd,_0x18d00f=this[_0x36a67c(0x131)]();let _0x2984df=0x0,_0x400424=0x0,_0x207dad=0x0;for(const _0x38c0cb of _0x18d00f){_0x2984df+=_0x38c0cb[_0x36a67c(0x173)],_0x400424+=_0x38c0cb[_0x36a67c(0x154)],_0x207dad+=_0x38c0cb[_0x36a67c(0x11a)];}let _0x20675f=_0x573af5;(!_0x20675f||_0x20675f===_0x36a67c(0x182)||!exports[_0x36a67c(0x12c)][_0x20675f])&&(_0x18d00f[_0x36a67c(0x120)]>0x0&&_0x18d00f[_0x18d00f[_0x36a67c(0x120)]-0x1][_0x36a67c(0x14c)]?_0x20675f=_0x18d00f[_0x18d00f['length']-0x1][_0x36a67c(0x14c)]:_0x20675f=this['getConfig']()[_0x36a67c(0x143)]||_0x36a67c(0x14e));const _0x47adc3=exports[_0x36a67c(0x12c)][_0x20675f]||exports['PRICING']['claude-3-5-sonnet'],_0x22af71=_0x207dad*_0x47adc3[_0x36a67c(0x165)]/0xf4240,_0x1620cf=_0x2984df*_0x47adc3[_0x36a67c(0x165)]/0xf4240,_0x38c999=_0x400424*_0x47adc3[_0x36a67c(0x165)]/0xf4240,_0x591488=_0x2984df>0x0?_0x207dad/_0x2984df*0x64:0x0;return{'total_raw_tokens':_0x2984df,'total_compressed_tokens':_0x400424,'total_tokens_saved':_0x207dad,'savings_percentage':parseFloat(_0x591488[_0x36a67c(0x130)](0x1)),'money_saved_usd':parseFloat(_0x22af71[_0x36a67c(0x130)](0x4)),'raw_cost_usd':parseFloat(_0x1620cf[_0x36a67c(0x130)](0x4)),'compressed_cost_usd':parseFloat(_0x38c999[_0x36a67c(0x130)](0x4)),'model_name':_0x47adc3[_0x36a67c(0x142)],'model_key':_0x20675f};}}exports[a0_0x5978fd(0x18e)]=Tracker,exports[a0_0x5978fd(0x152)]=new Tracker();