trimprompt 1.0.46 → 1.0.48

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_0x39998b=a0_0x47b4;(function(_0x5bc407,_0x4f89ba){const _0x1e8005=a0_0x47b4,_0x37c3ab=_0x5bc407();while(!![]){try{const _0x12829e=-parseInt(_0x1e8005(0x130))/0x1*(parseInt(_0x1e8005(0x193))/0x2)+-parseInt(_0x1e8005(0x135))/0x3+parseInt(_0x1e8005(0x145))/0x4+-parseInt(_0x1e8005(0x19e))/0x5+parseInt(_0x1e8005(0x177))/0x6+parseInt(_0x1e8005(0x1a7))/0x7*(-parseInt(_0x1e8005(0x1a6))/0x8)+-parseInt(_0x1e8005(0x1c7))/0x9*(-parseInt(_0x1e8005(0x1e7))/0xa);if(_0x12829e===_0x4f89ba)break;else _0x37c3ab['push'](_0x37c3ab['shift']());}catch(_0x18f141){_0x37c3ab['push'](_0x37c3ab['shift']());}}}(a0_0x2049,0x9debf));var __createBinding=this&&this[a0_0x39998b(0x158)]||(Object['create']?function(_0x5e99aa,_0x3d25cb,_0x255a54,_0x5d6027){const _0x5dfa3e=a0_0x39998b;if(_0x5d6027===undefined)_0x5d6027=_0x255a54;var _0x14a0d1=Object[_0x5dfa3e(0x170)](_0x3d25cb,_0x255a54);(!_0x14a0d1||(_0x5dfa3e(0x1c5)in _0x14a0d1?!_0x3d25cb[_0x5dfa3e(0x184)]:_0x14a0d1['writable']||_0x14a0d1[_0x5dfa3e(0x1c4)]))&&(_0x14a0d1={'enumerable':!![],'get':function(){return _0x3d25cb[_0x255a54];}}),Object['defineProperty'](_0x5e99aa,_0x5d6027,_0x14a0d1);}:function(_0x4bc579,_0x290d37,_0x1e4f62,_0x4c8042){if(_0x4c8042===undefined)_0x4c8042=_0x1e4f62;_0x4bc579[_0x4c8042]=_0x290d37[_0x1e4f62];}),__setModuleDefault=this&&this[a0_0x39998b(0x175)]||(Object[a0_0x39998b(0x14d)]?function(_0x538199,_0x1ee977){const _0x173b7c=a0_0x39998b;Object[_0x173b7c(0x1b4)](_0x538199,'default',{'enumerable':!![],'value':_0x1ee977});}:function(_0x1fa62e,_0x495c42){const _0x1522dc=a0_0x39998b;_0x1fa62e[_0x1522dc(0x1df)]=_0x495c42;}),__importStar=this&&this[a0_0x39998b(0x1db)]||(function(){var _0x5674aa=function(_0x37fefa){const _0x211b74=a0_0x47b4;return _0x5674aa=Object[_0x211b74(0x15d)]||function(_0x472bd8){const _0x30db10=_0x211b74;var _0x49bc0c=[];for(var _0x41e16d in _0x472bd8)if(Object[_0x30db10(0x1b6)][_0x30db10(0x154)][_0x30db10(0x13c)](_0x472bd8,_0x41e16d))_0x49bc0c[_0x49bc0c[_0x30db10(0x186)]]=_0x41e16d;return _0x49bc0c;},_0x5674aa(_0x37fefa);};return function(_0x360387){const _0x2c8aa7=a0_0x47b4;if(_0x360387&&_0x360387[_0x2c8aa7(0x184)])return _0x360387;var _0x2673de={};if(_0x360387!=null){for(var _0x40cb32=_0x5674aa(_0x360387),_0x1a204f=0x0;_0x1a204f<_0x40cb32[_0x2c8aa7(0x186)];_0x1a204f++)if(_0x40cb32[_0x1a204f]!==_0x2c8aa7(0x1df))__createBinding(_0x2673de,_0x360387,_0x40cb32[_0x1a204f]);}return __setModuleDefault(_0x2673de,_0x360387),_0x2673de;};}());Object[a0_0x39998b(0x1b4)](exports,a0_0x39998b(0x184),{'value':!![]}),exports[a0_0x39998b(0x1bc)]=exports['Tracker']=exports['PRICING']=void 0x0,exports[a0_0x39998b(0x17a)]=detectSessionTool;function a0_0x47b4(_0x489f4d,_0x30534b){_0x489f4d=_0x489f4d-0x130;const _0x20497f=a0_0x2049();let _0x47b433=_0x20497f[_0x489f4d];return _0x47b433;}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x39998b(0x1c2))),os=__importStar(require('os')),child_process_1=require(a0_0x39998b(0x1b2));exports['PRICING']={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x39998b(0x1a0),'input_price_1m':0xa},'claude-opus-4-8':{'name':'Claude\x20Opus\x204.8','input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x39998b(0x171),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x39998b(0x1b5),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x39998b(0x16d),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x39998b(0x199),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x39998b(0x18f),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x39998b(0x13f),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x39998b(0x1b1),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x39998b(0x1ca),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x39998b(0x1e1),'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_0x39998b(0x1ec),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x39998b(0x195),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x39998b(0x198),'input_price_1m':0x3},'o3-mini':{'name':a0_0x39998b(0x15c),'input_price_1m':1.1},'cursor-small':{'name':a0_0x39998b(0x1d8),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x39998b(0x1b7),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x39998b(0x1da),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x39998b(0x187),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x39998b(0x164),'input_price_1m':3.5}};function detectSessionTool(){const _0x246894=a0_0x39998b,_0x12097c=process.env,_0x2974df={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x12097c[_0x246894(0x1dd)]&&exports[_0x246894(0x14b)][_0x12097c[_0x246894(0x1dd)]])return{'tool':'','model':_0x12097c[_0x246894(0x1dd)],'modelShort':''};const _0x1422f0=(_0x12097c['AI_AGENT']||'')[_0x246894(0x192)]();if(_0x1422f0){if(_0x1422f0['includes'](_0x246894(0x1aa))||_0x1422f0[_0x246894(0x1d3)](_0x246894(0x168))){const _0xf4401b=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?_0x246894(0x1a4):_0x246894(0x13b),_0x42cc6a=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?_0x246894(0x1cc):_0x246894(0x1e2);return{'tool':'claude','model':_0x42cc6a,'modelShort':_0xf4401b};}if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x183)))return{'tool':_0x246894(0x183),'model':_0x246894(0x1e2),'modelShort':_0x246894(0x13b)};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x1c8))||_0x1422f0[_0x246894(0x1d3)](_0x246894(0x17c))){const _0x338a1d=_0x12097c[_0x246894(0x140)]||'';if(_0x338a1d&&exports[_0x246894(0x14b)][_0x338a1d])return{'tool':_0x246894(0x17c),'model':_0x338a1d,'modelShort':_0x338a1d[_0x246894(0x19a)]('-')[_0x246894(0x159)]()||''};return{'tool':'copilot','model':_0x246894(0x197),'modelShort':_0x246894(0x13b)};}if(_0x1422f0['includes'](_0x246894(0x190)))return{'tool':_0x246894(0x190),'model':_0x246894(0x15b),'modelShort':_0x246894(0x18e)};if(_0x1422f0[_0x246894(0x1d3)]('codex'))return{'tool':_0x246894(0x1ce),'model':_0x246894(0x169),'modelShort':_0x246894(0x1a9)};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x153)))return{'tool':_0x246894(0x153),'model':'claude-sonnet-4-6','modelShort':''};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x137)))return{'tool':_0x246894(0x137),'model':_0x246894(0x1d6),'modelShort':_0x246894(0x190)};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x1ab))||_0x12097c[_0x246894(0x172)])return{'tool':_0x246894(0x1ab),'model':'claude-sonnet-4-6','modelShort':''};return{'tool':_0x1422f0['split']('_')[0x0][_0x246894(0x19a)]('-')[0x0],'model':_0x246894(0x1e2),'modelShort':''};}if(_0x12097c['CLAUDECODE']==='1'||_0x12097c[_0x246894(0x1c0)]==='1'){const _0x4eee69=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?'opus':_0x246894(0x13b),_0x358d9f=_0x12097c[_0x246894(0x1e4)]==='high'?_0x246894(0x1cc):'claude-sonnet-4-6';return{'tool':_0x246894(0x165),'model':_0x358d9f,'modelShort':_0x4eee69};}if(_0x12097c[_0x246894(0x1a5)]==='1')return{'tool':_0x246894(0x183),'model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x12097c[_0x246894(0x1d1)]==='1')return{'tool':_0x246894(0x190),'model':_0x246894(0x15b),'modelShort':_0x246894(0x18e)};if(_0x12097c['COPILOT_MODEL']||_0x12097c[_0x246894(0x15f)]){const _0x4daaf8=_0x12097c[_0x246894(0x140)]||'';if(_0x4daaf8&&exports[_0x246894(0x14b)][_0x4daaf8])return{'tool':'copilot','model':_0x4daaf8,'modelShort':_0x4daaf8['split']('-')[_0x246894(0x159)]()||''};return{'tool':'copilot','model':_0x246894(0x197),'modelShort':_0x246894(0x13b)};}if(_0x12097c[_0x246894(0x172)]||_0x12097c[_0x246894(0x146)])return{'tool':'replit','model':_0x246894(0x1e2),'modelShort':''};if(_0x12097c[_0x246894(0x155)])return{'tool':_0x246894(0x1d4),'model':'claude-sonnet-4-6','modelShort':''};if(_0x12097c['CONTINUE_GLOBAL_DIR'])return{'tool':'continue','model':_0x246894(0x1e2),'modelShort':''};if(_0x12097c[_0x246894(0x1d7)]==='1')return{'tool':_0x246894(0x137),'model':_0x246894(0x1d6),'modelShort':'gemini'};if(_0x12097c[_0x246894(0x1e4)]){const _0x4298a7=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?'opus':'sonnet',_0x2b2752=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?_0x246894(0x1cc):_0x246894(0x1e2);return{'tool':'','model':_0x2b2752,'modelShort':''};}if(_0x12097c[_0x246894(0x16b)]&&exports[_0x246894(0x14b)][_0x12097c[_0x246894(0x16b)]])return{'tool':_0x246894(0x1a3),'model':_0x12097c[_0x246894(0x16b)],'modelShort':''};if(_0x12097c[_0x246894(0x196)]){const _0x24d217=(_0x12097c[_0x246894(0x17b)]||'')[_0x246894(0x192)]();if(_0x24d217[_0x246894(0x1d3)](_0x246894(0x183)))return{'tool':_0x246894(0x183),'model':'claude-sonnet-4-6','modelShort':_0x246894(0x13b)};if(_0x24d217[_0x246894(0x1d3)](_0x246894(0x174)))return{'tool':_0x246894(0x174),'model':_0x246894(0x1e2),'modelShort':_0x246894(0x13b)};}const _0x341416=process.env.TRIMPROMPT_MODEL||'';if(_0x341416&&exports[_0x246894(0x14b)][_0x341416])return{'tool':'','model':_0x341416,'modelShort':''};return _0x2974df;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{['baseDir'];[a0_0x39998b(0x1c3)];['statsPath'];[a0_0x39998b(0x1e5)];[a0_0x39998b(0x180)];constructor(){const _0x36a34c=a0_0x39998b;this[_0x36a34c(0x1e9)]=path['join'](os[_0x36a34c(0x16a)](),_0x36a34c(0x134)),this[_0x36a34c(0x1c3)]=path[_0x36a34c(0x1be)](this['baseDir'],_0x36a34c(0x19d)),this['statsPath']=path[_0x36a34c(0x1be)](this[_0x36a34c(0x1e9)],_0x36a34c(0x181)),this[_0x36a34c(0x1e5)]=path[_0x36a34c(0x1be)](this[_0x36a34c(0x1e9)],_0x36a34c(0x1bf)),this['init']();}[a0_0x39998b(0x161)](){const _0x86f13d=a0_0x39998b;!fs['existsSync'](this[_0x86f13d(0x1e9)])&&fs[_0x86f13d(0x13a)](this['baseDir'],{'recursive':!![]});!fs[_0x86f13d(0x189)](this[_0x86f13d(0x1e5)])&&fs[_0x86f13d(0x13a)](this[_0x86f13d(0x1e5)],{'recursive':!![]});const _0x40f10c={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x86f13d(0x1cc)};if(fs['existsSync'](this[_0x86f13d(0x1c3)]))try{const _0x3e19d8=fs[_0x86f13d(0x14f)](this['configPath'],_0x86f13d(0x139));this[_0x86f13d(0x180)]={..._0x40f10c,...JSON['parse'](_0x3e19d8)};}catch(_0x7656c8){this['config']=_0x40f10c;}else this['config']=_0x40f10c,this[_0x86f13d(0x1ed)]();!fs[_0x86f13d(0x189)](this[_0x86f13d(0x152)])&&fs['writeFileSync'](this['statsPath'],JSON[_0x86f13d(0x1e8)]([]),_0x86f13d(0x139));}[a0_0x39998b(0x1eb)](){const _0xabe8cf=a0_0x39998b;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0xabe8cf(0x180)][_0xabe8cf(0x136)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0xabe8cf(0x180)];}[a0_0x39998b(0x15a)](_0x5a1e55,_0x1552c2){const _0x38cd11=a0_0x39998b;this[_0x38cd11(0x180)][_0x5a1e55]=_0x1552c2,this[_0x38cd11(0x1ed)]();}[a0_0x39998b(0x1ed)](){const _0x2d7a9e=a0_0x39998b;fs[_0x2d7a9e(0x163)](this[_0x2d7a9e(0x1c3)],JSON[_0x2d7a9e(0x1e8)](this[_0x2d7a9e(0x180)],null,0x2),'utf8');}['getLogs'](){const _0x4d7153=a0_0x39998b;try{if(!fs[_0x4d7153(0x189)](this[_0x4d7153(0x152)]))return globalLogsMemoryCache;const _0x5b59b5=fs[_0x4d7153(0x147)](this['statsPath'])[_0x4d7153(0x19f)];if(_0x5b59b5===globalLogsCacheMtime&&globalLogsMemoryCache['length']>0x0)return globalLogsMemoryCache;const _0x3b6a8c=fs[_0x4d7153(0x14f)](this[_0x4d7153(0x152)],_0x4d7153(0x139)),_0xa7df97=JSON[_0x4d7153(0x1cd)](_0x3b6a8c);if(Array[_0x4d7153(0x18b)](_0xa7df97))return globalLogsMemoryCache=_0xa7df97,globalLogsCacheMtime=_0x5b59b5,_0xa7df97;}catch{}return globalLogsMemoryCache;}[a0_0x39998b(0x149)](_0x321e2d){const _0x43641e=a0_0x39998b;globalLogsMemoryCache=_0x321e2d;const _0x122535=this['statsPath']+_0x43641e(0x1e3);try{fs[_0x43641e(0x163)](_0x122535,JSON[_0x43641e(0x1e8)](_0x321e2d,null,0x2),'utf8'),fs['renameSync'](_0x122535,this[_0x43641e(0x152)]);}catch{try{fs[_0x43641e(0x163)](this[_0x43641e(0x152)],JSON[_0x43641e(0x1e8)](_0x321e2d,null,0x2),_0x43641e(0x139));}catch{}}}['pruneLogsPerTool'](_0x5857fe){const _0x2d0e40=a0_0x39998b,_0x430405=new Map();for(const _0x268127 of _0x5857fe){const _0x556a69=_0x268127[_0x2d0e40(0x17e)]&&_0x268127[_0x2d0e40(0x17e)][_0x2d0e40(0x1de)]()||_0x268127[_0x2d0e40(0x157)]||_0x2d0e40(0x173);let _0x5bb2e2=_0x430405['get'](_0x556a69);!_0x5bb2e2&&(_0x5bb2e2=[],_0x430405[_0x2d0e40(0x1cf)](_0x556a69,_0x5bb2e2)),_0x5bb2e2[_0x2d0e40(0x138)](_0x268127);}const _0x6ed7a6=new Set();for(const _0x56fded of _0x430405[_0x2d0e40(0x17d)]()){const _0x38d489=_0x56fded[_0x2d0e40(0x186)]-MAX_LOGS_PER_TOOL;for(let _0x553571=0x0;_0x553571<_0x38d489;_0x553571++)_0x6ed7a6[_0x2d0e40(0x14a)](_0x56fded[_0x553571]['id']);}if(_0x6ed7a6[_0x2d0e40(0x16c)]===0x0)return _0x5857fe;let _0x4c32d1={};try{_0x4c32d1=JSON['parse'](fs[_0x2d0e40(0x14f)](this['configPath'],_0x2d0e40(0x139)))||{};}catch{}const _0x2cdc67=_0x4c32d1['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x1191ad of _0x5857fe){if(!_0x6ed7a6[_0x2d0e40(0x178)](_0x1191ad['id']))continue;_0x2cdc67[_0x2d0e40(0x185)]+=_0x1191ad[_0x2d0e40(0x1c1)]||0x0,_0x2cdc67['compressed_tokens']+=_0x1191ad[_0x2d0e40(0x1ea)]||0x0,_0x2cdc67['tokens_saved']+=_0x1191ad[_0x2d0e40(0x156)]||0x0;}_0x4c32d1[_0x2d0e40(0x16e)]=_0x2cdc67,this[_0x2d0e40(0x180)]={...this[_0x2d0e40(0x180)],..._0x4c32d1};try{this[_0x2d0e40(0x1ed)]();}catch{}for(const _0x5eb273 of _0x6ed7a6){try{fs[_0x2d0e40(0x142)](path['join'](this[_0x2d0e40(0x1e5)],_0x5eb273+_0x2d0e40(0x1cb)));}catch{}try{fs['unlinkSync'](path[_0x2d0e40(0x1be)](this[_0x2d0e40(0x1e5)],_0x5eb273+_0x2d0e40(0x13d)));}catch{}}return _0x5857fe[_0x2d0e40(0x1dc)](_0x25f048=>!_0x6ed7a6[_0x2d0e40(0x178)](_0x25f048['id']));}[a0_0x39998b(0x166)](_0x4cdd79,_0x101e37,_0x4432b9,_0x283548,_0x531255,_0x5d1443){const _0x356e24=a0_0x39998b,_0x3fb370=this[_0x356e24(0x1bb)](),_0x439c42=_0x101e37[_0x356e24(0x186)],_0xec185=_0x4432b9['length'],_0x3e1f1b=detectSessionTool(),_0x5b1b13=_0x3e1f1b['model'],_0xb6822=_0x3e1f1b[_0x356e24(0x17e)]===_0x356e24(0x137)?_0x356e24(0x190):_0x3e1f1b[_0x356e24(0x17e)];let _0x3809e2=0x0;if(_0xb6822&&!_0x4cdd79[_0x356e24(0x179)](_0x356e24(0x1d0)))try{const {getLatestSessionFile:_0x192111,loadSessionsState:_0x94cd63}=require(_0x356e24(0x13e)),_0x5dfa3c=_0x192111(_0xb6822);if(_0x5dfa3c&&_0x5dfa3c['fullPath']){const _0x53cbb1=_0x94cd63();_0x53cbb1[_0x5dfa3c[_0x356e24(0x19c)]]&&(_0x3809e2=_0x53cbb1[_0x5dfa3c['fullPath']][_0x356e24(0x18c)]||0x0);}}catch{}const _0x267b7b=Math[_0x356e24(0x1ad)](_0x439c42/0x4)+_0x3809e2,_0x6d4ca8=Math[_0x356e24(0x1ad)](_0xec185/0x4),_0x32de3f=Math[_0x356e24(0x14c)](0x0,_0x267b7b-_0x6d4ca8),_0x2e2041=Math[_0x356e24(0x18d)]()[_0x356e24(0x1c6)](0x24)[_0x356e24(0x1e6)](0x2,0xb);try{const {redactor:_0x46e7a2}=require(_0x356e24(0x191)),_0x306317=_0x46e7a2?_0x46e7a2[_0x356e24(0x1e0)](_0x101e37):_0x101e37;fs[_0x356e24(0x163)](path['join'](this[_0x356e24(0x1e5)],_0x2e2041+'.raw.txt'),_0x306317,'utf8'),fs[_0x356e24(0x163)](path['join'](this[_0x356e24(0x1e5)],_0x2e2041+_0x356e24(0x13d)),_0x4432b9,_0x356e24(0x139));}catch{}let _0x1fd50e=_0x4cdd79;if(_0x4cdd79[_0x356e24(0x179)](_0x356e24(0x1d0))){const _0x3faeee=_0x4cdd79[_0x356e24(0x19a)](':')[0x1]||_0x356e24(0x165),_0x2df455=_0x3faeee[_0x356e24(0x14e)](0x0)[_0x356e24(0x131)]()+_0x3faeee['slice'](0x1);_0x1fd50e=_0x2df455+_0x356e24(0x16f);}else{if(_0x4cdd79[_0x356e24(0x179)](_0x356e24(0x17f))){const _0x4d2c78=_0x4cdd79[_0x356e24(0x19a)]('\x20'),_0x55ddd7=_0x4d2c78[0x0][_0x356e24(0x19a)](':')[0x1]||_0x356e24(0x165),_0x14a712=_0x55ddd7['charAt'](0x0)[_0x356e24(0x131)]()+_0x55ddd7[_0x356e24(0x1af)](0x1),_0x10e60a=_0x4d2c78['slice'](0x1)[_0x356e24(0x1be)]('\x20');_0x1fd50e=_0x14a712+_0x356e24(0x188)+_0x10e60a;}else{const _0x4113b2=_0x4cdd79[_0x356e24(0x19a)]('\x20')[0x0]||_0x356e24(0x176);_0x1fd50e=_0x3e1f1b[_0x356e24(0x17e)]?_0x3e1f1b['modelShort']?_0x3e1f1b[_0x356e24(0x17e)]+'-'+_0x3e1f1b[_0x356e24(0x1b8)]+'-'+_0x4113b2:_0x3e1f1b[_0x356e24(0x17e)]+'-'+_0x4113b2:_0x4113b2;}}const _0x46e839={'id':_0x2e2041,'timestamp':new Date()[_0x356e24(0x1b3)](),'command':_0x1fd50e,'raw_chars':_0x439c42,'compressed_chars':_0xec185,'estimated_raw_tokens':_0x267b7b,'estimated_compressed_tokens':_0x6d4ca8,'tokens_saved':_0x32de3f,'model_used':_0x5b1b13,'tool':_0xb6822||_0x3e1f1b[_0x356e24(0x17e)]||'','exit_code':_0x283548,'synced':![],'ai_detected':!!_0x3e1f1b['tool'],'secrets_found':_0x531255?.['secretsFound']||0x0,'secret_types':_0x531255?.[_0x356e24(0x1a2)]||[],'features':_0x5d1443||[]};_0x3fb370[_0x356e24(0x138)](_0x46e839),this[_0x356e24(0x149)](this[_0x356e24(0x1ba)](_0x3fb370));const _0x11d30a=this[_0x356e24(0x1eb)]()['telemetry_url'];return _0x11d30a&&_0x11d30a[_0x356e24(0x1de)]()[_0x356e24(0x186)]>0x0&&this[_0x356e24(0x133)](),_0x531255&&_0x531255[_0x356e24(0x162)]>0x0&&this['sendSecurityAlert'](_0x46e839,_0x531255),_0x46e839;}[a0_0x39998b(0x141)]=null;['getDevIdentity'](){const _0x49898e=a0_0x39998b;if(this[_0x49898e(0x141)])return this[_0x49898e(0x141)];try{const _0x4949e7=require('child_process')['execSync'](_0x49898e(0x1a1),{'stdio':['ignore',_0x49898e(0x151),'ignore'],'windowsHide':!![]})[_0x49898e(0x1c6)]()[_0x49898e(0x1de)]();if(_0x4949e7&&_0x4949e7['includes']('@'))return this[_0x49898e(0x141)]=_0x4949e7,_0x4949e7;}catch{}try{const _0x285908=require('os')[_0x49898e(0x132)]()[_0x49898e(0x1c9)];return this['cachedDevId']=_0x285908,_0x285908;}catch{}return this[_0x49898e(0x141)]=_0x49898e(0x176),_0x49898e(0x176);}['sendSecurityAlert'](_0x571c16,_0x47af4e){const _0x333aad=a0_0x39998b;try{let _0x245746=this[_0x333aad(0x1eb)]()[_0x333aad(0x136)]||'';if(!_0x245746)return;_0x245746=_0x245746[_0x333aad(0x1ac)](/\/api\/telemetry\/?$/,_0x333aad(0x148));if(!_0x245746['includes']('/api/security/alert'))_0x245746+=_0x333aad(0x148);const _0x8604b0=this[_0x333aad(0x1ae)](),_0x9f686=JSON[_0x333aad(0x1e8)]({'developer_id':_0x8604b0,'timestamp':_0x571c16[_0x333aad(0x144)],'command':_0x571c16[_0x333aad(0x143)],'secrets_found':_0x47af4e[_0x333aad(0x162)],'secret_types':_0x47af4e[_0x333aad(0x1a2)],'os':require('os')['platform']()}),_0xa8d3fb=_0x333aad(0x1d9)+JSON[_0x333aad(0x1e8)](_0x245746)+_0x333aad(0x1a8)+JSON['stringify'](_0x245746)+_0x333aad(0x182)+JSON['stringify'](_0x9f686)+')',_0x2f7058=(0x0,child_process_1[_0x333aad(0x19b)])(process['execPath'],['-e',_0xa8d3fb],{'detached':!![],'stdio':_0x333aad(0x167),'windowsHide':!![]});_0x2f7058[_0x333aad(0x1bd)]();}catch{}}[a0_0x39998b(0x133)](){const _0x4243db=a0_0x39998b;try{const _0x8e6d56=path[_0x4243db(0x1be)](__dirname,_0x4243db(0x160));if(fs['existsSync'](_0x8e6d56)){const _0x1881f7=(0x0,child_process_1[_0x4243db(0x19b)])(process[_0x4243db(0x1b0)],[_0x8e6d56],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x1881f7[_0x4243db(0x1bd)]();}}catch{}}[a0_0x39998b(0x1b9)](_0x25a495=a0_0x39998b(0x194)){const _0xcc495a=a0_0x39998b,_0x2c145c=this[_0xcc495a(0x1bb)]();let _0x4f93a0=0x0,_0x276d28=0x0,_0x4f6dff=0x0;for(const _0x3c3ed3 of _0x2c145c){_0x4f93a0+=_0x3c3ed3['estimated_raw_tokens'],_0x276d28+=_0x3c3ed3[_0xcc495a(0x1ea)],_0x4f6dff+=_0x3c3ed3['tokens_saved'];}const _0x1a8c37=this['getConfig']()[_0xcc495a(0x16e)];_0x1a8c37&&(_0x4f93a0+=_0x1a8c37[_0xcc495a(0x185)]||0x0,_0x276d28+=_0x1a8c37[_0xcc495a(0x1d2)]||0x0,_0x4f6dff+=_0x1a8c37[_0xcc495a(0x156)]||0x0);let _0x4c14de=_0x25a495;(!_0x4c14de||_0x4c14de==='auto'||!exports[_0xcc495a(0x14b)][_0x4c14de])&&(_0x2c145c[_0xcc495a(0x186)]>0x0&&_0x2c145c[_0x2c145c[_0xcc495a(0x186)]-0x1][_0xcc495a(0x157)]?_0x4c14de=_0x2c145c[_0x2c145c[_0xcc495a(0x186)]-0x1][_0xcc495a(0x157)]:_0x4c14de=this[_0xcc495a(0x1eb)]()['default_model']||_0xcc495a(0x150));const _0x99d2d4=exports[_0xcc495a(0x14b)][_0x4c14de]||exports['PRICING'][_0xcc495a(0x150)],_0xe86447=_0x4f6dff*_0x99d2d4['input_price_1m']/0xf4240,_0x15fb0d=_0x4f93a0*_0x99d2d4[_0xcc495a(0x1d5)]/0xf4240,_0x319e48=_0x276d28*_0x99d2d4[_0xcc495a(0x1d5)]/0xf4240,_0x4d09a6=_0x4f93a0>0x0?_0x4f6dff/_0x4f93a0*0x64:0x0;return{'total_raw_tokens':_0x4f93a0,'total_compressed_tokens':_0x276d28,'total_tokens_saved':_0x4f6dff,'savings_percentage':parseFloat(_0x4d09a6['toFixed'](0x1)),'money_saved_usd':parseFloat(_0xe86447[_0xcc495a(0x18a)](0x4)),'raw_cost_usd':parseFloat(_0x15fb0d[_0xcc495a(0x18a)](0x4)),'compressed_cost_usd':parseFloat(_0x319e48[_0xcc495a(0x18a)](0x4)),'model_name':_0x99d2d4['name'],'model_key':_0x4c14de};}}function a0_0x2049(){const _0x3f8ffa=['codex','set','compact:','GEMINI_CLI','compressed_tokens','includes','cline','input_price_1m','gemini-3-1-pro','ANTIGRAVITY_AGENT','Cursor\x20Small','const\x20h=require(require(\x27url\x27).parse(','Gemini\x203.5\x20Flash','__importStar','filter','TRIMPROMPT_MODEL','trim','default','redact','GPT-5.4\x20Nano','claude-sonnet-4-6','.tmp','CLAUDE_EFFORT','logsDir','substring','30310rKiKtM','stringify','baseDir','estimated_compressed_tokens','getConfig','GPT-4.1\x20Nano','saveConfig','1YPmQYD','toUpperCase','userInfo','triggerBackgroundSync','.trimprompt','1600197hJAdWS','telemetry_url','antigravity','push','utf8','mkdirSync','sonnet','call','.comp.txt','./file-watcher','GPT-5.5','COPILOT_MODEL','cachedDevId','unlinkSync','command','timestamp','3747480EGoCKe','REPLIT_ENVIRONMENT','statSync','/api/security/alert','saveLogs','add','PRICING','max','create','charAt','readFileSync','claude-3-5-sonnet','pipe','statsPath','devin','hasOwnProperty','CLINE_DATA_DIR','tokens_saved','model_used','__createBinding','pop','setConfig','gemini-3-5-flash','OpenAI\x20o3-mini','getOwnPropertyNames','high','COPILOT_GITHUB_TOKEN','sync.js','init','secretsFound','writeFileSync','Gemini\x203.5\x20Live\x20Translate','claude','logExecution','ignore','claude_code','o3-mini','homedir','AIDER_MODEL','size','Claude\x20Sonnet\x204.5','lifetime_savings','\x20Compaction','getOwnPropertyDescriptor','Claude\x20Opus\x204.7','REPL_ID','other','windsurf','__setModuleDefault','unknown','1302252KtSleo','has','startsWith','detectSessionTool','PATH','copilot','values','tool','conv:','config','stats.json',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','cursor','__esModule','raw_tokens','length','Gemini\x203.1\x20Flash-Lite','\x20Chat\x20','existsSync','toFixed','isArray','activeSavedTokens','random','flash','Claude\x20Haiku\x203.5','gemini','./redactor','toLowerCase','272386LAfwTl','auto','GPT-4o\x20Mini','VSCODE_PID','claude-sonnet-4-5','OpenAI\x20o1-mini','Claude\x203.5\x20Sonnet','split','spawn','fullPath','config.json','2562700HiObni','mtimeMs','Claude\x20Mythos\x205','git\x20config\x20user.email','secretTypes','aider','opus','CURSOR_AGENT','3377240oqCsQD','7YLxhaO',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','o3mini','claude-code','replit','replace','ceil','getDevIdentity','slice','execPath','GPT-4o','child_process','toISOString','defineProperty','Claude\x20Opus\x204.1\x20(deprecated)','prototype','Gemini\x203.1\x20Pro','modelShort','getStatsSummary','pruneLogsPerTool','getLogs','tracker','unref','join','logs','CLAUDE_CODE','estimated_raw_tokens','path','configPath','configurable','get','toString','3258iCLzWy','github-copilot','username','GPT-5.4\x20Mini','.raw.txt','claude-opus-4-8','parse'];a0_0x2049=function(){return _0x3f8ffa;};return a0_0x2049();}exports['Tracker']=Tracker,exports[a0_0x39998b(0x1bc)]=new Tracker();
1
+ 'use strict';const a0_0x2fc432=a0_0x858d;(function(_0x534ce2,_0x492faf){const _0x2a43c4=a0_0x858d,_0x262568=_0x534ce2();while(!![]){try{const _0x3ad4f3=-parseInt(_0x2a43c4(0x21a))/0x1*(-parseInt(_0x2a43c4(0x1ef))/0x2)+-parseInt(_0x2a43c4(0x1a1))/0x3*(-parseInt(_0x2a43c4(0x214))/0x4)+-parseInt(_0x2a43c4(0x1cc))/0x5*(parseInt(_0x2a43c4(0x1e1))/0x6)+parseInt(_0x2a43c4(0x24e))/0x7*(parseInt(_0x2a43c4(0x1c9))/0x8)+parseInt(_0x2a43c4(0x255))/0x9+parseInt(_0x2a43c4(0x1fd))/0xa+-parseInt(_0x2a43c4(0x1ac))/0xb*(parseInt(_0x2a43c4(0x1a8))/0xc);if(_0x3ad4f3===_0x492faf)break;else _0x262568['push'](_0x262568['shift']());}catch(_0x5baa07){_0x262568['push'](_0x262568['shift']());}}}(a0_0x5cb0,0xc5847));var __createBinding=this&&this[a0_0x2fc432(0x1d1)]||(Object[a0_0x2fc432(0x20b)]?function(_0x1d6bfa,_0x490fb5,_0x17b462,_0x3bb0d7){const _0x3d0ee4=a0_0x2fc432;if(_0x3bb0d7===undefined)_0x3bb0d7=_0x17b462;var _0x11ce8b=Object['getOwnPropertyDescriptor'](_0x490fb5,_0x17b462);(!_0x11ce8b||(_0x3d0ee4(0x1ad)in _0x11ce8b?!_0x490fb5[_0x3d0ee4(0x1b7)]:_0x11ce8b['writable']||_0x11ce8b['configurable']))&&(_0x11ce8b={'enumerable':!![],'get':function(){return _0x490fb5[_0x17b462];}}),Object['defineProperty'](_0x1d6bfa,_0x3bb0d7,_0x11ce8b);}:function(_0x375840,_0x27b153,_0x9cf2ee,_0x1f3113){if(_0x1f3113===undefined)_0x1f3113=_0x9cf2ee;_0x375840[_0x1f3113]=_0x27b153[_0x9cf2ee];}),__setModuleDefault=this&&this[a0_0x2fc432(0x1fe)]||(Object[a0_0x2fc432(0x20b)]?function(_0x2721ec,_0x16a1ad){const _0x4542b6=a0_0x2fc432;Object[_0x4542b6(0x22b)](_0x2721ec,_0x4542b6(0x1b4),{'enumerable':!![],'value':_0x16a1ad});}:function(_0x46e73b,_0x2fb93e){_0x46e73b['default']=_0x2fb93e;}),__importStar=this&&this[a0_0x2fc432(0x1bf)]||(function(){var _0x1f76cf=function(_0x2bd9d9){const _0x542eff=a0_0x858d;return _0x1f76cf=Object[_0x542eff(0x206)]||function(_0x24b542){const _0x58afc1=_0x542eff;var _0x4767e1=[];for(var _0x2f4bb5 in _0x24b542)if(Object[_0x58afc1(0x252)]['hasOwnProperty'][_0x58afc1(0x1bd)](_0x24b542,_0x2f4bb5))_0x4767e1[_0x4767e1[_0x58afc1(0x223)]]=_0x2f4bb5;return _0x4767e1;},_0x1f76cf(_0x2bd9d9);};return function(_0x51fe4d){const _0x5a988d=a0_0x858d;if(_0x51fe4d&&_0x51fe4d[_0x5a988d(0x1b7)])return _0x51fe4d;var _0xe3844d={};if(_0x51fe4d!=null){for(var _0x84b737=_0x1f76cf(_0x51fe4d),_0x4c103e=0x0;_0x4c103e<_0x84b737[_0x5a988d(0x223)];_0x4c103e++)if(_0x84b737[_0x4c103e]!==_0x5a988d(0x1b4))__createBinding(_0xe3844d,_0x51fe4d,_0x84b737[_0x4c103e]);}return __setModuleDefault(_0xe3844d,_0x51fe4d),_0xe3844d;};}());Object['defineProperty'](exports,a0_0x2fc432(0x1b7),{'value':!![]}),exports[a0_0x2fc432(0x22d)]=exports['Tracker']=exports[a0_0x2fc432(0x221)]=void 0x0,exports['detectSessionTool']=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2fc432(0x1cf))),os=__importStar(require('os')),child_process_1=require('child_process');exports['PRICING']={'claude-fable-5':{'name':a0_0x2fc432(0x1ab),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x2fc432(0x1f5),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x2fc432(0x245),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x2fc432(0x1c0),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x2fc432(0x24b),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x2fc432(0x1e4),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x2fc432(0x23d),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x2fc432(0x1da),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x2fc432(0x222),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x2fc432(0x1f7),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x2fc432(0x1b6),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x2fc432(0x1c7),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x2fc432(0x251),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x2fc432(0x1a6),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x2fc432(0x1b5),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x2fc432(0x1a0),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x2fc432(0x253),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x2fc432(0x23e),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x2fc432(0x1af),'input_price_1m':0.15},'o1':{'name':a0_0x2fc432(0x1d7),'input_price_1m':0xf},'o1-mini':{'name':a0_0x2fc432(0x249),'input_price_1m':0x3},'o3-mini':{'name':a0_0x2fc432(0x234),'input_price_1m':1.1},'cursor-small':{'name':a0_0x2fc432(0x1ae),'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_0x2fc432(0x1ba),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x2fc432(0x209),'input_price_1m':3.5}};function a0_0x858d(_0xf4926b,_0x1b1952){_0xf4926b=_0xf4926b-0x19f;const _0x5cb0b5=a0_0x5cb0();let _0x858d10=_0x5cb0b5[_0xf4926b];return _0x858d10;}function detectSessionTool(){const _0x4355ff=a0_0x2fc432,_0x206865=process.env,_0x13dd20={'tool':'','model':_0x4355ff(0x1ea),'modelShort':''};if(_0x206865[_0x4355ff(0x237)]&&exports[_0x4355ff(0x221)][_0x206865[_0x4355ff(0x237)]])return{'tool':'','model':_0x206865['TRIMPROMPT_MODEL'],'modelShort':''};const _0x436c2e=(_0x206865[_0x4355ff(0x200)]||'')['toLowerCase']();if(_0x436c2e){if(_0x436c2e[_0x4355ff(0x241)]('claude-code')||_0x436c2e['includes'](_0x4355ff(0x1f3))){const _0x2ad4c9=_0x206865['CLAUDE_EFFORT']===_0x4355ff(0x226)?_0x4355ff(0x20e):_0x4355ff(0x23c),_0x265eb4=_0x206865[_0x4355ff(0x1ce)]===_0x4355ff(0x226)?_0x4355ff(0x217):_0x4355ff(0x1ea);return{'tool':'claude','model':_0x265eb4,'modelShort':_0x2ad4c9};}if(_0x436c2e['includes'](_0x4355ff(0x23f)))return{'tool':_0x4355ff(0x23f),'model':'claude-sonnet-4-6','modelShort':_0x4355ff(0x23c)};if(_0x436c2e[_0x4355ff(0x241)](_0x4355ff(0x1de))||_0x436c2e[_0x4355ff(0x241)](_0x4355ff(0x1d3))){const _0x5beb89=_0x206865[_0x4355ff(0x227)]||'';if(_0x5beb89&&exports[_0x4355ff(0x221)][_0x5beb89])return{'tool':'copilot','model':_0x5beb89,'modelShort':_0x5beb89[_0x4355ff(0x1ee)]('-')[_0x4355ff(0x1a9)]()||''};return{'tool':_0x4355ff(0x1d3),'model':'claude-sonnet-4-5','modelShort':_0x4355ff(0x23c)};}if(_0x436c2e[_0x4355ff(0x241)](_0x4355ff(0x1a3)))return{'tool':_0x4355ff(0x1a3),'model':'gemini-3-5-flash','modelShort':_0x4355ff(0x1fa)};if(_0x436c2e[_0x4355ff(0x241)](_0x4355ff(0x1d5)))return{'tool':'codex','model':'o3-mini','modelShort':_0x4355ff(0x1cd)};if(_0x436c2e[_0x4355ff(0x241)](_0x4355ff(0x1fc)))return{'tool':_0x4355ff(0x1fc),'model':_0x4355ff(0x1ea),'modelShort':''};if(_0x436c2e['includes'](_0x4355ff(0x243)))return{'tool':_0x4355ff(0x243),'model':'gemini-3-1-pro','modelShort':_0x4355ff(0x1a3)};if(_0x436c2e[_0x4355ff(0x241)](_0x4355ff(0x1e5))||_0x206865[_0x4355ff(0x1e2)])return{'tool':'replit','model':_0x4355ff(0x1ea),'modelShort':''};return{'tool':_0x436c2e['split']('_')[0x0][_0x4355ff(0x1ee)]('-')[0x0],'model':_0x4355ff(0x1ea),'modelShort':''};}if(_0x206865[_0x4355ff(0x1fb)]==='1'||_0x206865['CLAUDE_CODE']==='1'){const _0x4bf330=_0x206865[_0x4355ff(0x1ce)]===_0x4355ff(0x226)?'opus':_0x4355ff(0x23c),_0x26c480=_0x206865[_0x4355ff(0x1ce)]===_0x4355ff(0x226)?_0x4355ff(0x217):'claude-sonnet-4-6';return{'tool':'claude','model':_0x26c480,'modelShort':_0x4bf330};}if(_0x206865[_0x4355ff(0x239)]==='1')return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':_0x4355ff(0x23c)};if(_0x206865[_0x4355ff(0x210)]==='1')return{'tool':_0x4355ff(0x1a3),'model':_0x4355ff(0x1a2),'modelShort':_0x4355ff(0x1fa)};if(_0x206865[_0x4355ff(0x227)]||_0x206865[_0x4355ff(0x1e9)]){const _0x392151=_0x206865[_0x4355ff(0x227)]||'';if(_0x392151&&exports[_0x4355ff(0x221)][_0x392151])return{'tool':'copilot','model':_0x392151,'modelShort':_0x392151[_0x4355ff(0x1ee)]('-')[_0x4355ff(0x1a9)]()||''};return{'tool':'copilot','model':_0x4355ff(0x233),'modelShort':_0x4355ff(0x23c)};}if(_0x206865[_0x4355ff(0x1e2)]||_0x206865['REPLIT_ENVIRONMENT'])return{'tool':_0x4355ff(0x1e5),'model':_0x4355ff(0x1ea),'modelShort':''};if(_0x206865[_0x4355ff(0x1a5)])return{'tool':_0x4355ff(0x225),'model':'claude-sonnet-4-6','modelShort':''};if(_0x206865['CONTINUE_GLOBAL_DIR'])return{'tool':_0x4355ff(0x1f2),'model':'claude-sonnet-4-6','modelShort':''};if(_0x206865[_0x4355ff(0x1ff)]==='1')return{'tool':_0x4355ff(0x243),'model':_0x4355ff(0x1c5),'modelShort':_0x4355ff(0x1a3)};if(_0x206865[_0x4355ff(0x1ce)]){const _0x111e51=_0x206865['CLAUDE_EFFORT']===_0x4355ff(0x226)?_0x4355ff(0x20e):_0x4355ff(0x23c),_0x5af05e=_0x206865[_0x4355ff(0x1ce)]===_0x4355ff(0x226)?_0x4355ff(0x217):'claude-sonnet-4-6';return{'tool':'','model':_0x5af05e,'modelShort':''};}if(_0x206865['AIDER_MODEL']&&exports[_0x4355ff(0x221)][_0x206865['AIDER_MODEL']])return{'tool':'aider','model':_0x206865[_0x4355ff(0x213)],'modelShort':''};if(_0x206865['VSCODE_PID']){const _0x5892a3=(_0x206865[_0x4355ff(0x1dc)]||'')[_0x4355ff(0x1f4)]();if(_0x5892a3[_0x4355ff(0x241)]('cursor'))return{'tool':'cursor','model':_0x4355ff(0x1ea),'modelShort':'sonnet'};if(_0x5892a3[_0x4355ff(0x241)](_0x4355ff(0x204)))return{'tool':_0x4355ff(0x204),'model':'claude-sonnet-4-6','modelShort':_0x4355ff(0x23c)};}const _0x5b4049=process.env.TRIMPROMPT_MODEL||'';if(_0x5b4049&&exports['PRICING'][_0x5b4049])return{'tool':'','model':_0x5b4049,'modelShort':''};return _0x13dd20;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0x2fc432(0x229)];[a0_0x2fc432(0x231)];[a0_0x2fc432(0x247)];[a0_0x2fc432(0x1e0)];[a0_0x2fc432(0x21d)];constructor(){const _0x1f959c=a0_0x2fc432;this['baseDir']=path[_0x1f959c(0x1be)](os['homedir'](),_0x1f959c(0x22a)),this[_0x1f959c(0x231)]=path[_0x1f959c(0x1be)](this[_0x1f959c(0x229)],_0x1f959c(0x1c4)),this[_0x1f959c(0x247)]=path[_0x1f959c(0x1be)](this[_0x1f959c(0x229)],_0x1f959c(0x21b)),this[_0x1f959c(0x1e0)]=path[_0x1f959c(0x1be)](this[_0x1f959c(0x229)],_0x1f959c(0x211)),this[_0x1f959c(0x244)]();}[a0_0x2fc432(0x244)](){const _0x472ed7=a0_0x2fc432;!fs[_0x472ed7(0x1b0)](this[_0x472ed7(0x229)])&&fs[_0x472ed7(0x24f)](this[_0x472ed7(0x229)],{'recursive':!![]});!fs[_0x472ed7(0x1b0)](this['logsDir'])&&fs[_0x472ed7(0x24f)](this[_0x472ed7(0x1e0)],{'recursive':!![]});const _0x2472c2={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x472ed7(0x217)};if(fs[_0x472ed7(0x1b0)](this[_0x472ed7(0x231)]))try{const _0x5b3e78=fs[_0x472ed7(0x232)](this[_0x472ed7(0x231)],_0x472ed7(0x248));this[_0x472ed7(0x21d)]={..._0x2472c2,...JSON[_0x472ed7(0x250)](_0x5b3e78)};}catch(_0x158a63){this[_0x472ed7(0x21d)]=_0x2472c2;}else this[_0x472ed7(0x21d)]=_0x2472c2,this[_0x472ed7(0x254)]();!fs['existsSync'](this[_0x472ed7(0x247)])&&fs[_0x472ed7(0x256)](this[_0x472ed7(0x247)],JSON['stringify']([]),'utf8');}[a0_0x2fc432(0x1d8)](){const _0x1d27b8=a0_0x2fc432;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x1d27b8(0x21d)][_0x1d27b8(0x22c)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x1d27b8(0x21d)];}[a0_0x2fc432(0x218)](_0x45ca7e,_0x4a4f8a){const _0x49a820=a0_0x2fc432;this[_0x49a820(0x21d)][_0x45ca7e]=_0x4a4f8a,this[_0x49a820(0x254)]();}[a0_0x2fc432(0x254)](){const _0x12c669=a0_0x2fc432;fs[_0x12c669(0x256)](this[_0x12c669(0x231)],JSON[_0x12c669(0x22e)](this[_0x12c669(0x21d)],null,0x2),_0x12c669(0x248));}[a0_0x2fc432(0x1bc)](){const _0x4c6b8e=a0_0x2fc432;try{if(!fs[_0x4c6b8e(0x1b0)](this[_0x4c6b8e(0x247)]))return globalLogsMemoryCache;const _0x4152c2=fs[_0x4c6b8e(0x216)](this[_0x4c6b8e(0x247)])[_0x4c6b8e(0x23b)];if(_0x4152c2===globalLogsCacheMtime&&globalLogsMemoryCache[_0x4c6b8e(0x223)]>0x0)return globalLogsMemoryCache;const _0x234806=fs[_0x4c6b8e(0x232)](this[_0x4c6b8e(0x247)],_0x4c6b8e(0x248)),_0x152ac6=JSON['parse'](_0x234806);if(Array[_0x4c6b8e(0x1e6)](_0x152ac6))return globalLogsMemoryCache=_0x152ac6,globalLogsCacheMtime=_0x4152c2,_0x152ac6;}catch{}return globalLogsMemoryCache;}[a0_0x2fc432(0x1d0)](_0x11310e){const _0x49ae34=a0_0x2fc432;globalLogsMemoryCache=_0x11310e;const _0x200a1f=this['statsPath']+_0x49ae34(0x20a);try{fs[_0x49ae34(0x256)](_0x200a1f,JSON[_0x49ae34(0x22e)](_0x11310e,null,0x2),_0x49ae34(0x248)),fs['renameSync'](_0x200a1f,this[_0x49ae34(0x247)]);}catch{try{fs[_0x49ae34(0x256)](this['statsPath'],JSON[_0x49ae34(0x22e)](_0x11310e,null,0x2),'utf8');}catch{}}}[a0_0x2fc432(0x1c1)](_0x4069ce){const _0x359e08=a0_0x2fc432,_0x4b9e16=new Map();for(const _0x5589d1 of _0x4069ce){const _0x566fd3=_0x5589d1[_0x359e08(0x203)]&&_0x5589d1[_0x359e08(0x203)]['trim']()||_0x5589d1[_0x359e08(0x1aa)]||'other';let _0xdea91c=_0x4b9e16[_0x359e08(0x1ad)](_0x566fd3);!_0xdea91c&&(_0xdea91c=[],_0x4b9e16[_0x359e08(0x21e)](_0x566fd3,_0xdea91c)),_0xdea91c[_0x359e08(0x1ca)](_0x5589d1);}const _0x440835=new Set();for(const _0x54e8c0 of _0x4b9e16['values']()){const _0x5cfd28=_0x54e8c0[_0x359e08(0x223)]-MAX_LOGS_PER_TOOL;for(let _0x55683f=0x0;_0x55683f<_0x5cfd28;_0x55683f++)_0x440835[_0x359e08(0x24d)](_0x54e8c0[_0x55683f]['id']);}if(_0x440835['size']===0x0)return _0x4069ce;let _0x13e247={};try{_0x13e247=JSON[_0x359e08(0x250)](fs[_0x359e08(0x232)](this[_0x359e08(0x231)],_0x359e08(0x248)))||{};}catch{}const _0x10a162=_0x13e247['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x57b7e2 of _0x4069ce){if(!_0x440835[_0x359e08(0x1a7)](_0x57b7e2['id']))continue;_0x10a162[_0x359e08(0x230)]+=_0x57b7e2[_0x359e08(0x212)]||0x0,_0x10a162['compressed_tokens']+=_0x57b7e2[_0x359e08(0x1eb)]||0x0,_0x10a162[_0x359e08(0x235)]+=_0x57b7e2['tokens_saved']||0x0;}_0x13e247['lifetime_savings']=_0x10a162,this[_0x359e08(0x21d)]={...this[_0x359e08(0x21d)],..._0x13e247};try{this[_0x359e08(0x254)]();}catch{}for(const _0xc698ab of _0x440835){try{fs[_0x359e08(0x242)](path[_0x359e08(0x1be)](this[_0x359e08(0x1e0)],_0xc698ab+_0x359e08(0x1a4)));}catch{}try{fs[_0x359e08(0x242)](path[_0x359e08(0x1be)](this[_0x359e08(0x1e0)],_0xc698ab+_0x359e08(0x1dd)));}catch{}}return _0x4069ce[_0x359e08(0x240)](_0x3d0623=>!_0x440835['has'](_0x3d0623['id']));}[a0_0x2fc432(0x202)](_0x4b0ed9,_0x2a803c,_0x2c3a35,_0x8f461,_0x36a74c,_0x342c9b){const _0x57ea25=a0_0x2fc432,_0x204211=this['getLogs'](),_0x5d59cd=_0x2a803c['length'],_0x164ca4=_0x2c3a35[_0x57ea25(0x223)],_0x22a9c3=detectSessionTool(),_0x20f604=_0x22a9c3[_0x57ea25(0x1f9)],_0x5476d4=_0x22a9c3[_0x57ea25(0x203)]==='antigravity'?_0x57ea25(0x1a3):_0x22a9c3[_0x57ea25(0x203)];let _0x2b6c5f=0x0;if(_0x5476d4&&!_0x4b0ed9[_0x57ea25(0x1c6)](_0x57ea25(0x201)))try{const {getLatestSessionFile:_0x2544a0,loadSessionsState:_0x112cf3}=require(_0x57ea25(0x1b2)),_0x56e5d7=_0x2544a0(_0x5476d4);if(_0x56e5d7&&_0x56e5d7['fullPath']){const _0x3ae36c=_0x112cf3();_0x3ae36c[_0x56e5d7['fullPath']]&&(_0x2b6c5f=_0x3ae36c[_0x56e5d7[_0x57ea25(0x1f0)]][_0x57ea25(0x1e3)]||0x0);}}catch{}const _0x3b7087=Math['ceil'](_0x5d59cd/0x4)+_0x2b6c5f,_0x29f382=Math['ceil'](_0x164ca4/0x4),_0x4cebe3=Math['max'](0x0,_0x3b7087-_0x29f382),_0x567b88=Math[_0x57ea25(0x1e7)]()[_0x57ea25(0x238)](0x24)[_0x57ea25(0x24c)](0x2,0xb);try{const {redactor:_0x215f68}=require('./redactor'),_0x5e69b7=_0x215f68?_0x215f68[_0x57ea25(0x246)](_0x2a803c):_0x2a803c;fs[_0x57ea25(0x256)](path['join'](this[_0x57ea25(0x1e0)],_0x567b88+_0x57ea25(0x1a4)),_0x5e69b7,'utf8'),fs[_0x57ea25(0x256)](path[_0x57ea25(0x1be)](this['logsDir'],_0x567b88+_0x57ea25(0x1dd)),_0x2c3a35,_0x57ea25(0x248));}catch{}let _0xb9f6a6=_0x4b0ed9;if(_0x4b0ed9[_0x57ea25(0x1c6)](_0x57ea25(0x201))){const _0x3f8d07=_0x4b0ed9[_0x57ea25(0x1ee)](':')[0x1]||'claude',_0x48f9fa=_0x3f8d07[_0x57ea25(0x1f1)](0x0)[_0x57ea25(0x220)]()+_0x3f8d07[_0x57ea25(0x22f)](0x1);_0xb9f6a6=_0x48f9fa+_0x57ea25(0x1d9);}else{if(_0x4b0ed9[_0x57ea25(0x1c6)](_0x57ea25(0x219))){const _0x1c4889=_0x4b0ed9[_0x57ea25(0x1ee)]('\x20'),_0x3906a4=_0x1c4889[0x0][_0x57ea25(0x1ee)](':')[0x1]||'claude',_0x36173a=_0x3906a4[_0x57ea25(0x1f1)](0x0)[_0x57ea25(0x220)]()+_0x3906a4[_0x57ea25(0x22f)](0x1),_0x1a0791=_0x1c4889[_0x57ea25(0x22f)](0x1)['join']('\x20');_0xb9f6a6=_0x36173a+'\x20Chat\x20'+_0x1a0791;}else{const _0x4d3c85=_0x4b0ed9[_0x57ea25(0x1ee)]('\x20')[0x0]||'unknown';_0xb9f6a6=_0x22a9c3['tool']?_0x22a9c3[_0x57ea25(0x1d2)]?_0x22a9c3[_0x57ea25(0x203)]+'-'+_0x22a9c3[_0x57ea25(0x1d2)]+'-'+_0x4d3c85:_0x22a9c3['tool']+'-'+_0x4d3c85:_0x4d3c85;}}const _0x299b88={'id':_0x567b88,'timestamp':new Date()['toISOString'](),'command':_0xb9f6a6,'raw_chars':_0x5d59cd,'compressed_chars':_0x164ca4,'estimated_raw_tokens':_0x3b7087,'estimated_compressed_tokens':_0x29f382,'tokens_saved':_0x4cebe3,'model_used':_0x20f604,'tool':_0x5476d4||_0x22a9c3['tool']||'','exit_code':_0x8f461,'synced':![],'ai_detected':!!_0x22a9c3[_0x57ea25(0x203)],'secrets_found':_0x36a74c?.[_0x57ea25(0x207)]||0x0,'secret_types':_0x36a74c?.['secretTypes']||[],'features':_0x342c9b||[]};_0x204211[_0x57ea25(0x1ca)](_0x299b88),this[_0x57ea25(0x1d0)](this[_0x57ea25(0x1c1)](_0x204211));const _0x21e8b9=this['getConfig']()['telemetry_url'];return _0x21e8b9&&_0x21e8b9[_0x57ea25(0x20d)]()['length']>0x0&&this[_0x57ea25(0x1ed)](),_0x36a74c&&_0x36a74c[_0x57ea25(0x207)]>0x0&&this['sendSecurityAlert'](_0x299b88,_0x36a74c),_0x299b88;}[a0_0x2fc432(0x1bb)]=null;[a0_0x2fc432(0x224)](){const _0x36433f=a0_0x2fc432;if(this['cachedDevId'])return this[_0x36433f(0x1bb)];try{const _0x5624d1=require(_0x36433f(0x1f8))[_0x36433f(0x1df)](_0x36433f(0x1c8),{'stdio':[_0x36433f(0x228),_0x36433f(0x236),_0x36433f(0x228)],'windowsHide':!![]})[_0x36433f(0x238)]()[_0x36433f(0x20d)]();if(_0x5624d1&&_0x5624d1[_0x36433f(0x241)]('@'))return this[_0x36433f(0x1bb)]=_0x5624d1,_0x5624d1;}catch{}try{const _0x36982a=require('os')['userInfo']()[_0x36433f(0x215)];return this[_0x36433f(0x1bb)]=_0x36982a,_0x36982a;}catch{}return this[_0x36433f(0x1bb)]=_0x36433f(0x1e8),_0x36433f(0x1e8);}[a0_0x2fc432(0x1f6)](_0x4794dd,_0x40b1e8){const _0x66fd4d=a0_0x2fc432;try{let _0x41ca64=this[_0x66fd4d(0x1d8)]()['telemetry_url']||'';if(!_0x41ca64)return;_0x41ca64=_0x41ca64[_0x66fd4d(0x1b8)](/\/api\/telemetry\/?$/,'/api/security/alert');if(!_0x41ca64['includes'](_0x66fd4d(0x21c)))_0x41ca64+=_0x66fd4d(0x21c);const _0x322989=this[_0x66fd4d(0x224)](),_0x28dded=JSON[_0x66fd4d(0x22e)]({'developer_id':_0x322989,'timestamp':_0x4794dd[_0x66fd4d(0x205)],'command':_0x4794dd[_0x66fd4d(0x20f)],'secrets_found':_0x40b1e8[_0x66fd4d(0x207)],'secret_types':_0x40b1e8[_0x66fd4d(0x24a)],'os':require('os')[_0x66fd4d(0x1b3)]()}),_0x53223b=_0x66fd4d(0x1b9)+JSON[_0x66fd4d(0x22e)](_0x41ca64)+_0x66fd4d(0x1c3)+JSON['stringify'](_0x41ca64)+_0x66fd4d(0x19f)+JSON['stringify'](_0x28dded)+')',_0xf551b8=(0x0,child_process_1['spawn'])(process[_0x66fd4d(0x1b1)],['-e',_0x53223b],{'detached':!![],'stdio':_0x66fd4d(0x228),'windowsHide':!![]});_0xf551b8[_0x66fd4d(0x1c2)]();}catch{}}[a0_0x2fc432(0x1ed)](){const _0x39926c=a0_0x2fc432;try{const _0x55c2ec=path[_0x39926c(0x1be)](__dirname,_0x39926c(0x1cb));if(fs[_0x39926c(0x1b0)](_0x55c2ec)){const _0x337fc7=(0x0,child_process_1[_0x39926c(0x20c)])(process[_0x39926c(0x1b1)],[_0x55c2ec],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x337fc7[_0x39926c(0x1c2)]();}}catch{}}['getStatsSummary'](_0x42034f='auto'){const _0x4f7f5e=a0_0x2fc432,_0x2b9e9f=this[_0x4f7f5e(0x1bc)]();let _0x1022c6=0x0,_0x2dd6b7=0x0,_0x3f2b97=0x0;for(const _0x29f8d0 of _0x2b9e9f){_0x1022c6+=_0x29f8d0[_0x4f7f5e(0x212)],_0x2dd6b7+=_0x29f8d0[_0x4f7f5e(0x1eb)],_0x3f2b97+=_0x29f8d0[_0x4f7f5e(0x235)];}const _0x2eb106=this[_0x4f7f5e(0x1d8)]()['lifetime_savings'];_0x2eb106&&(_0x1022c6+=_0x2eb106['raw_tokens']||0x0,_0x2dd6b7+=_0x2eb106[_0x4f7f5e(0x23a)]||0x0,_0x3f2b97+=_0x2eb106['tokens_saved']||0x0);let _0x3ce75c=_0x42034f;(!_0x3ce75c||_0x3ce75c===_0x4f7f5e(0x208)||!exports['PRICING'][_0x3ce75c])&&(_0x2b9e9f[_0x4f7f5e(0x223)]>0x0&&_0x2b9e9f[_0x2b9e9f['length']-0x1][_0x4f7f5e(0x1aa)]?_0x3ce75c=_0x2b9e9f[_0x2b9e9f[_0x4f7f5e(0x223)]-0x1][_0x4f7f5e(0x1aa)]:_0x3ce75c=this[_0x4f7f5e(0x1d8)]()[_0x4f7f5e(0x1db)]||'claude-3-5-sonnet');const _0x276873=exports['PRICING'][_0x3ce75c]||exports[_0x4f7f5e(0x221)][_0x4f7f5e(0x1d4)],_0x506737=_0x3f2b97*_0x276873[_0x4f7f5e(0x1d6)]/0xf4240,_0x1f8333=_0x1022c6*_0x276873[_0x4f7f5e(0x1d6)]/0xf4240,_0x4bc7c8=_0x2dd6b7*_0x276873[_0x4f7f5e(0x1d6)]/0xf4240,_0x2d52df=_0x1022c6>0x0?_0x3f2b97/_0x1022c6*0x64:0x0;return{'total_raw_tokens':_0x1022c6,'total_compressed_tokens':_0x2dd6b7,'total_tokens_saved':_0x3f2b97,'savings_percentage':parseFloat(_0x2d52df[_0x4f7f5e(0x21f)](0x1)),'money_saved_usd':parseFloat(_0x506737[_0x4f7f5e(0x21f)](0x4)),'raw_cost_usd':parseFloat(_0x1f8333['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x4bc7c8[_0x4f7f5e(0x21f)](0x4)),'model_name':_0x276873['name'],'model_key':_0x3ce75c};}}function a0_0x5cb0(){const _0x593850=['estimated_compressed_tokens','Tracker','triggerBackgroundSync','split','15270kjFRPT','fullPath','charAt','continue','claude_code','toLowerCase','Claude\x20Mythos\x205','sendSecurityAlert','Claude\x20Haiku\x204.5','child_process','model','flash','CLAUDECODE','devin','2464840JYxgZE','__setModuleDefault','ANTIGRAVITY_AGENT','AI_AGENT','compact:','logExecution','tool','windsurf','timestamp','getOwnPropertyNames','secretsFound','auto','Gemini\x203.5\x20Live\x20Translate','.tmp','create','spawn','trim','opus','command','GEMINI_CLI','logs','estimated_raw_tokens','AIDER_MODEL','4bKkTXh','username','statSync','claude-opus-4-8','setConfig','conv:','115etLirX','stats.json','/api/security/alert','config','set','toFixed','toUpperCase','PRICING','Claude\x203.5\x20Sonnet','length','getDevIdentity','cline','high','COPILOT_MODEL','ignore','baseDir','.trimprompt','defineProperty','telemetry_url','tracker','stringify','slice','raw_tokens','configPath','readFileSync','claude-sonnet-4-5','OpenAI\x20o3-mini','tokens_saved','pipe','TRIMPROMPT_MODEL','toString','CURSOR_AGENT','compressed_tokens','mtimeMs','sonnet','Claude\x20Sonnet\x204.6','GPT-4.1\x20Nano','cursor','filter','includes','unlinkSync','antigravity','init','Claude\x20Opus\x204.8','redact','statsPath','utf8','OpenAI\x20o1-mini','secretTypes','Claude\x20Opus\x204.5','substring','add','63266xSFUyl','mkdirSync','parse','GPT-5.4','prototype','GPT-4.1\x20Mini','saveConfig','10489932wGAYyy','writeFileSync',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','GPT-5.4\x20Nano','3927675zKtwYW','gemini-3-5-flash','gemini','.raw.txt','CLINE_DATA_DIR','GPT-4o','has','168rvCTpr','pop','model_used','Claude\x20Fable\x205','2787290kUNQHY','get','Cursor\x20Small','GPT-4o\x20Mini','existsSync','execPath','./file-watcher','platform','default','GPT-5.4\x20Mini','Claude\x20Haiku\x203.5','__esModule','replace','const\x20h=require(require(\x27url\x27).parse(','Gemini\x203.1\x20Flash-Lite','cachedDevId','getLogs','call','join','__importStar','Claude\x20Opus\x204.7','pruneLogsPerTool','unref',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','config.json','gemini-3-1-pro','startsWith','GPT-5.5','git\x20config\x20user.email','848vjxFgn','push','sync.js','2045rjHUWK','o3mini','CLAUDE_EFFORT','path','saveLogs','__createBinding','modelShort','copilot','claude-3-5-sonnet','codex','input_price_1m','OpenAI\x20o1','getConfig','\x20Compaction','Claude\x20Sonnet\x204.5','default_model','PATH','.comp.txt','github-copilot','execSync','logsDir','2946OjDYlH','REPL_ID','activeSavedTokens','Claude\x20Opus\x204.1\x20(deprecated)','replit','isArray','random','unknown','COPILOT_GITHUB_TOKEN','claude-sonnet-4-6'];a0_0x5cb0=function(){return _0x593850;};return a0_0x5cb0();}exports[a0_0x2fc432(0x1ec)]=Tracker,exports['tracker']=new Tracker();