trimprompt 1.0.41 → 1.0.43

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_0xbf0b41=a0_0x62f7;(function(_0x569471,_0x419379){const _0x1ecf62=a0_0x62f7,_0x125f55=_0x569471();while(!![]){try{const _0x357aa5=parseInt(_0x1ecf62(0x17d))/0x1+-parseInt(_0x1ecf62(0x13c))/0x2+parseInt(_0x1ecf62(0x16e))/0x3*(parseInt(_0x1ecf62(0x105))/0x4)+parseInt(_0x1ecf62(0x124))/0x5+-parseInt(_0x1ecf62(0x134))/0x6*(-parseInt(_0x1ecf62(0x165))/0x7)+parseInt(_0x1ecf62(0x195))/0x8+-parseInt(_0x1ecf62(0x185))/0x9;if(_0x357aa5===_0x419379)break;else _0x125f55['push'](_0x125f55['shift']());}catch(_0x47c9d4){_0x125f55['push'](_0x125f55['shift']());}}}(a0_0x3f36,0xa3529));var __createBinding=this&&this['__createBinding']||(Object[a0_0xbf0b41(0x183)]?function(_0x273e79,_0x381ce1,_0x45729b,_0x497715){const _0x25a07e=a0_0xbf0b41;if(_0x497715===undefined)_0x497715=_0x45729b;var _0x58400c=Object['getOwnPropertyDescriptor'](_0x381ce1,_0x45729b);(!_0x58400c||(_0x25a07e(0x129)in _0x58400c?!_0x381ce1[_0x25a07e(0x115)]:_0x58400c[_0x25a07e(0xf7)]||_0x58400c[_0x25a07e(0x120)]))&&(_0x58400c={'enumerable':!![],'get':function(){return _0x381ce1[_0x45729b];}}),Object[_0x25a07e(0x11b)](_0x273e79,_0x497715,_0x58400c);}:function(_0x269642,_0x1a8107,_0x476c25,_0x38c0fc){if(_0x38c0fc===undefined)_0x38c0fc=_0x476c25;_0x269642[_0x38c0fc]=_0x1a8107[_0x476c25];}),__setModuleDefault=this&&this[a0_0xbf0b41(0x182)]||(Object['create']?function(_0x4c2a92,_0x24d826){const _0x4853c7=a0_0xbf0b41;Object[_0x4853c7(0x11b)](_0x4c2a92,_0x4853c7(0x116),{'enumerable':!![],'value':_0x24d826});}:function(_0x823631,_0x12fb2b){_0x823631['default']=_0x12fb2b;}),__importStar=this&&this['__importStar']||(function(){var _0x3cf644=function(_0x3d1cde){const _0x1a6984=a0_0x62f7;return _0x3cf644=Object[_0x1a6984(0x11e)]||function(_0x5b832f){const _0x2e7ac9=_0x1a6984;var _0x162ef1=[];for(var _0x5b73a5 in _0x5b832f)if(Object[_0x2e7ac9(0x17f)][_0x2e7ac9(0x111)][_0x2e7ac9(0xfd)](_0x5b832f,_0x5b73a5))_0x162ef1[_0x162ef1[_0x2e7ac9(0xf4)]]=_0x5b73a5;return _0x162ef1;},_0x3cf644(_0x3d1cde);};return function(_0x522785){const _0x39303e=a0_0x62f7;if(_0x522785&&_0x522785[_0x39303e(0x115)])return _0x522785;var _0x22b160={};if(_0x522785!=null){for(var _0x328120=_0x3cf644(_0x522785),_0x369d9e=0x0;_0x369d9e<_0x328120[_0x39303e(0xf4)];_0x369d9e++)if(_0x328120[_0x369d9e]!==_0x39303e(0x116))__createBinding(_0x22b160,_0x522785,_0x328120[_0x369d9e]);}return __setModuleDefault(_0x22b160,_0x522785),_0x22b160;};}());Object['defineProperty'](exports,a0_0xbf0b41(0x115),{'value':!![]}),exports[a0_0xbf0b41(0x18b)]=exports[a0_0xbf0b41(0x158)]=exports[a0_0xbf0b41(0x11f)]=void 0x0,exports[a0_0xbf0b41(0x149)]=detectSessionTool;function a0_0x62f7(_0x43b656,_0x362984){_0x43b656=_0x43b656-0xea;const _0x3f3638=a0_0x3f36();let _0x62f78e=_0x3f3638[_0x43b656];return _0x62f78e;}const fs=__importStar(require('fs')),path=__importStar(require(a0_0xbf0b41(0x123))),os=__importStar(require('os')),child_process_1=require(a0_0xbf0b41(0x169));exports[a0_0xbf0b41(0x11f)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0xbf0b41(0x145),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0xbf0b41(0x10d),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0xbf0b41(0x130),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0xbf0b41(0xf2),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0xbf0b41(0x164),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0xbf0b41(0x17b),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0xbf0b41(0x192),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0xbf0b41(0x14c),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0xbf0b41(0x102),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0xbf0b41(0x18e),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0xbf0b41(0x141),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0xbf0b41(0x175),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0xbf0b41(0x131),'input_price_1m':0xf},'o1-mini':{'name':a0_0xbf0b41(0x12d),'input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0xbf0b41(0x160),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0xbf0b41(0x144),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0xbf0b41(0x15a),'input_price_1m':3.5}};function detectSessionTool(){const _0x45e3f4=a0_0xbf0b41,_0x5605c1=process.env,_0x43f394={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x5605c1[_0x45e3f4(0x161)]&&exports['PRICING'][_0x5605c1['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x5605c1[_0x45e3f4(0x161)],'modelShort':''};const _0x3994c2=(_0x5605c1[_0x45e3f4(0x15d)]||'')[_0x45e3f4(0x11c)]();if(_0x3994c2){if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x128))||_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x15b))){const _0x44bad6=_0x5605c1[_0x45e3f4(0xf9)]==='high'?'opus':_0x45e3f4(0x101),_0x2c6aba=_0x5605c1['CLAUDE_EFFORT']===_0x45e3f4(0x125)?'claude-opus-4-8':_0x45e3f4(0x152);return{'tool':_0x45e3f4(0x194),'model':_0x2c6aba,'modelShort':_0x44bad6};}if(_0x3994c2['includes']('cursor'))return{'tool':_0x45e3f4(0x157),'model':_0x45e3f4(0x152),'modelShort':_0x45e3f4(0x101)};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0xed))||_0x3994c2[_0x45e3f4(0x170)]('copilot')){const _0x482201=_0x5605c1[_0x45e3f4(0x19d)]||'';if(_0x482201&&exports['PRICING'][_0x482201])return{'tool':_0x45e3f4(0x18a),'model':_0x482201,'modelShort':_0x482201[_0x45e3f4(0x13a)]('-')['pop']()||''};return{'tool':_0x45e3f4(0x18a),'model':_0x45e3f4(0x148),'modelShort':_0x45e3f4(0x101)};}if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x191)))return{'tool':'gemini','model':_0x45e3f4(0x147),'modelShort':'flash'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x132)))return{'tool':'codex','model':_0x45e3f4(0x12a),'modelShort':'o3mini'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x16c)))return{'tool':_0x45e3f4(0x16c),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x3994c2['includes'](_0x45e3f4(0x19c)))return{'tool':_0x45e3f4(0x19c),'model':_0x45e3f4(0x108),'modelShort':'gemini'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x19b))||_0x5605c1[_0x45e3f4(0x119)])return{'tool':_0x45e3f4(0x19b),'model':_0x45e3f4(0x152),'modelShort':''};return{'tool':_0x3994c2['split']('_')[0x0]['split']('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x5605c1[_0x45e3f4(0x155)]==='1'||_0x5605c1[_0x45e3f4(0xfa)]==='1'){const _0x7108d=_0x5605c1[_0x45e3f4(0xf9)]===_0x45e3f4(0x125)?_0x45e3f4(0x189):_0x45e3f4(0x101),_0x43b488=_0x5605c1['CLAUDE_EFFORT']==='high'?_0x45e3f4(0xff):_0x45e3f4(0x152);return{'tool':_0x45e3f4(0x194),'model':_0x43b488,'modelShort':_0x7108d};}if(_0x5605c1[_0x45e3f4(0x127)]==='1')return{'tool':_0x45e3f4(0x157),'model':'claude-sonnet-4-6','modelShort':_0x45e3f4(0x101)};if(_0x5605c1[_0x45e3f4(0x143)]==='1')return{'tool':_0x45e3f4(0x191),'model':_0x45e3f4(0x147),'modelShort':_0x45e3f4(0x136)};if(_0x5605c1['COPILOT_MODEL']||_0x5605c1[_0x45e3f4(0x10b)]){const _0x43b82d=_0x5605c1[_0x45e3f4(0x19d)]||'';if(_0x43b82d&&exports[_0x45e3f4(0x11f)][_0x43b82d])return{'tool':_0x45e3f4(0x18a),'model':_0x43b82d,'modelShort':_0x43b82d[_0x45e3f4(0x13a)]('-')[_0x45e3f4(0x178)]()||''};return{'tool':'copilot','model':_0x45e3f4(0x148),'modelShort':'sonnet'};}if(_0x5605c1[_0x45e3f4(0x119)]||_0x5605c1['REPLIT_ENVIRONMENT'])return{'tool':_0x45e3f4(0x19b),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1['CLINE_DATA_DIR'])return{'tool':_0x45e3f4(0x174),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1[_0x45e3f4(0x12f)])return{'tool':_0x45e3f4(0x133),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1[_0x45e3f4(0xf1)]==='1')return{'tool':'antigravity','model':_0x45e3f4(0x108),'modelShort':_0x45e3f4(0x191)};if(_0x5605c1[_0x45e3f4(0xf9)]){const _0xe25dca=_0x5605c1[_0x45e3f4(0xf9)]==='high'?_0x45e3f4(0x189):'sonnet',_0x15c98f=_0x5605c1[_0x45e3f4(0xf9)]==='high'?_0x45e3f4(0xff):_0x45e3f4(0x152);return{'tool':'','model':_0x15c98f,'modelShort':''};}if(_0x5605c1[_0x45e3f4(0x177)]&&exports['PRICING'][_0x5605c1[_0x45e3f4(0x177)]])return{'tool':_0x45e3f4(0x198),'model':_0x5605c1[_0x45e3f4(0x177)],'modelShort':''};if(_0x5605c1['VSCODE_PID']){const _0x339a7f=(_0x5605c1['PATH']||'')[_0x45e3f4(0x11c)]();if(_0x339a7f[_0x45e3f4(0x170)](_0x45e3f4(0x157)))return{'tool':_0x45e3f4(0x157),'model':_0x45e3f4(0x152),'modelShort':_0x45e3f4(0x101)};if(_0x339a7f[_0x45e3f4(0x170)](_0x45e3f4(0x19a)))return{'tool':_0x45e3f4(0x19a),'model':'claude-sonnet-4-6','modelShort':_0x45e3f4(0x101)};}const _0xb65c29=process.env.TRIMPROMPT_MODEL||'';if(_0xb65c29&&exports[_0x45e3f4(0x11f)][_0xb65c29])return{'tool':'','model':_0xb65c29,'modelShort':''};return _0x43f394;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0xbf0b41(0x13f)];[a0_0xbf0b41(0x12b)];[a0_0xbf0b41(0x121)];[a0_0xbf0b41(0x142)];['config'];constructor(){const _0x33ff5c=a0_0xbf0b41;this['baseDir']=path[_0x33ff5c(0xea)](os[_0x33ff5c(0xfc)](),_0x33ff5c(0x159)),this['configPath']=path[_0x33ff5c(0xea)](this['baseDir'],_0x33ff5c(0x18d)),this[_0x33ff5c(0x121)]=path[_0x33ff5c(0xea)](this[_0x33ff5c(0x13f)],'stats.json'),this[_0x33ff5c(0x142)]=path[_0x33ff5c(0xea)](this['baseDir'],_0x33ff5c(0x109)),this[_0x33ff5c(0x187)]();}[a0_0xbf0b41(0x187)](){const _0xfed4c1=a0_0xbf0b41;!fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x13f)])&&fs[_0xfed4c1(0x10a)](this[_0xfed4c1(0x13f)],{'recursive':!![]});!fs['existsSync'](this[_0xfed4c1(0x142)])&&fs[_0xfed4c1(0x10a)](this[_0xfed4c1(0x142)],{'recursive':!![]});const _0xdb248b={'version':_0xfed4c1(0x137),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x12b)]))try{const _0x16c9b4=fs['readFileSync'](this[_0xfed4c1(0x12b)],_0xfed4c1(0x140));this[_0xfed4c1(0x146)]={..._0xdb248b,...JSON[_0xfed4c1(0x13d)](_0x16c9b4)};}catch(_0x1fc19c){this[_0xfed4c1(0x146)]=_0xdb248b;}else this[_0xfed4c1(0x146)]=_0xdb248b,this[_0xfed4c1(0x173)]();!fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x121)])&&fs[_0xfed4c1(0x199)](this['statsPath'],JSON[_0xfed4c1(0x100)]([]),'utf8');}[a0_0xbf0b41(0x154)](){const _0x6625e7=a0_0xbf0b41;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this['config']['telemetry_url']=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x6625e7(0x146)];}[a0_0xbf0b41(0x14e)](_0x115316,_0x3cbf86){const _0x48cc45=a0_0xbf0b41;this[_0x48cc45(0x146)][_0x115316]=_0x3cbf86,this['saveConfig']();}[a0_0xbf0b41(0x173)](){const _0x19be5b=a0_0xbf0b41;fs['writeFileSync'](this[_0x19be5b(0x12b)],JSON[_0x19be5b(0x100)](this[_0x19be5b(0x146)],null,0x2),_0x19be5b(0x140));}[a0_0xbf0b41(0x171)](){const _0xc16355=a0_0xbf0b41;try{if(!fs[_0xc16355(0x150)](this[_0xc16355(0x121)]))return globalLogsMemoryCache;const _0x48d972=fs[_0xc16355(0x135)](this[_0xc16355(0x121)])['mtimeMs'];if(_0x48d972===globalLogsCacheMtime&&globalLogsMemoryCache[_0xc16355(0xf4)]>0x0)return globalLogsMemoryCache;const _0x4c5d2e=fs[_0xc16355(0x193)](this['statsPath'],'utf8'),_0x16ac44=JSON[_0xc16355(0x13d)](_0x4c5d2e);if(Array[_0xc16355(0x122)](_0x16ac44))return globalLogsMemoryCache=_0x16ac44,globalLogsCacheMtime=_0x48d972,_0x16ac44;}catch{}return globalLogsMemoryCache;}[a0_0xbf0b41(0x126)](_0x57dd69){const _0x24cab0=a0_0xbf0b41;globalLogsMemoryCache=_0x57dd69;const _0x480c03=this[_0x24cab0(0x121)]+_0x24cab0(0x19e);try{fs[_0x24cab0(0x199)](_0x480c03,JSON[_0x24cab0(0x100)](_0x57dd69,null,0x2),_0x24cab0(0x140)),fs[_0x24cab0(0x176)](_0x480c03,this[_0x24cab0(0x121)]);}catch{try{fs[_0x24cab0(0x199)](this['statsPath'],JSON[_0x24cab0(0x100)](_0x57dd69,null,0x2),_0x24cab0(0x140));}catch{}}}[a0_0xbf0b41(0x139)](_0x13a806){const _0xa1e183=a0_0xbf0b41,_0x19e9be=new Map();for(const _0x833425 of _0x13a806){const _0x3986e4=_0x833425[_0xa1e183(0x153)]&&_0x833425[_0xa1e183(0x153)][_0xa1e183(0x106)]()||_0x833425[_0xa1e183(0x110)]||_0xa1e183(0x11d);let _0x571adc=_0x19e9be[_0xa1e183(0x129)](_0x3986e4);!_0x571adc&&(_0x571adc=[],_0x19e9be['set'](_0x3986e4,_0x571adc)),_0x571adc[_0xa1e183(0x13e)](_0x833425);}const _0x4418ec=new Set();for(const _0x416421 of _0x19e9be['values']()){const _0x5f5be0=_0x416421[_0xa1e183(0xf4)]-MAX_LOGS_PER_TOOL;for(let _0xdcb5c3=0x0;_0xdcb5c3<_0x5f5be0;_0xdcb5c3++)_0x4418ec[_0xa1e183(0x179)](_0x416421[_0xdcb5c3]['id']);}if(_0x4418ec[_0xa1e183(0xee)]===0x0)return _0x13a806;let _0xaa909={};try{_0xaa909=JSON[_0xa1e183(0x13d)](fs[_0xa1e183(0x193)](this[_0xa1e183(0x12b)],_0xa1e183(0x140)))||{};}catch{}const _0x231da1=_0xaa909[_0xa1e183(0x113)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x4c0ce8 of _0x13a806){if(!_0x4418ec['has'](_0x4c0ce8['id']))continue;_0x231da1[_0xa1e183(0x16d)]+=_0x4c0ce8[_0xa1e183(0x184)]||0x0,_0x231da1[_0xa1e183(0xec)]+=_0x4c0ce8[_0xa1e183(0x168)]||0x0,_0x231da1[_0xa1e183(0x12c)]+=_0x4c0ce8[_0xa1e183(0x12c)]||0x0;}_0xaa909[_0xa1e183(0x113)]=_0x231da1,this[_0xa1e183(0x146)]={...this['config'],..._0xaa909};try{this[_0xa1e183(0x173)]();}catch{}for(const _0x1b66fe of _0x4418ec){try{fs[_0xa1e183(0xfe)](path['join'](this[_0xa1e183(0x142)],_0x1b66fe+_0xa1e183(0xf0)));}catch{}try{fs[_0xa1e183(0xfe)](path['join'](this[_0xa1e183(0x142)],_0x1b66fe+_0xa1e183(0x188)));}catch{}}return _0x13a806[_0xa1e183(0x163)](_0x33b83d=>!_0x4418ec[_0xa1e183(0x186)](_0x33b83d['id']));}['logExecution'](_0x60930f,_0x3e460a,_0xb73f7b,_0x264172,_0x35aa10,_0x52512c){const _0x5f47f8=a0_0xbf0b41,_0x249073=this[_0x5f47f8(0x171)](),_0x3ce439=_0x3e460a['length'],_0x72e42f=_0xb73f7b[_0x5f47f8(0xf4)],_0xf24552=detectSessionTool(),_0x4503c7=_0xf24552[_0x5f47f8(0x13b)],_0x34fa90=_0xf24552['tool']==='antigravity'?_0x5f47f8(0x191):_0xf24552[_0x5f47f8(0x153)];let _0x138999=0x0;if(_0x34fa90&&!_0x60930f[_0x5f47f8(0x12e)]('compact:'))try{const {getLatestSessionFile:_0x640390,loadSessionsState:_0x515943}=require(_0x5f47f8(0x18c)),_0x6e906f=_0x640390(_0x34fa90);if(_0x6e906f&&_0x6e906f[_0x5f47f8(0xef)]){const _0x8a51c3=_0x515943();_0x8a51c3[_0x6e906f['fullPath']]&&(_0x138999=_0x8a51c3[_0x6e906f['fullPath']][_0x5f47f8(0x17a)]||0x0);}}catch{}const _0x142247=Math[_0x5f47f8(0x14b)](_0x3ce439/0x4)+_0x138999,_0x44052e=Math['ceil'](_0x72e42f/0x4),_0x54e104=Math[_0x5f47f8(0x138)](0x0,_0x142247-_0x44052e),_0x3860e7=Math[_0x5f47f8(0x15c)]()[_0x5f47f8(0x10e)](0x24)[_0x5f47f8(0xf3)](0x2,0xb);try{const {redactor:_0x652992}=require(_0x5f47f8(0x14d)),_0x3727c5=_0x652992?_0x652992[_0x5f47f8(0x172)](_0x3e460a):_0x3e460a;fs['writeFileSync'](path[_0x5f47f8(0xea)](this[_0x5f47f8(0x142)],_0x3860e7+_0x5f47f8(0xf0)),_0x3727c5,_0x5f47f8(0x140)),fs[_0x5f47f8(0x199)](path[_0x5f47f8(0xea)](this[_0x5f47f8(0x142)],_0x3860e7+_0x5f47f8(0x188)),_0xb73f7b,'utf8');}catch{}let _0x58015e=_0x60930f;if(_0x60930f['startsWith']('compact:')){const _0x22711c=_0x60930f['split'](':')[0x1]||_0x5f47f8(0x194),_0x21d461=_0x22711c[_0x5f47f8(0xf6)](0x0)[_0x5f47f8(0x167)]()+_0x22711c[_0x5f47f8(0x151)](0x1);_0x58015e=_0x21d461+_0x5f47f8(0x162);}else{if(_0x60930f[_0x5f47f8(0x12e)](_0x5f47f8(0x16b))){const _0x5a8c1d=_0x60930f[_0x5f47f8(0x13a)]('\x20'),_0x1487e2=_0x5a8c1d[0x0][_0x5f47f8(0x13a)](':')[0x1]||'claude',_0x4a291a=_0x1487e2['charAt'](0x0)[_0x5f47f8(0x167)]()+_0x1487e2[_0x5f47f8(0x151)](0x1),_0x51abf0=_0x5a8c1d[_0x5f47f8(0x151)](0x1)[_0x5f47f8(0xea)]('\x20');_0x58015e=_0x4a291a+_0x5f47f8(0x14a)+_0x51abf0;}else{const _0x25c29f=_0x60930f[_0x5f47f8(0x13a)]('\x20')[0x0]||'unknown';_0x58015e=_0xf24552[_0x5f47f8(0x153)]?_0xf24552['modelShort']?_0xf24552[_0x5f47f8(0x153)]+'-'+_0xf24552[_0x5f47f8(0xf8)]+'-'+_0x25c29f:_0xf24552['tool']+'-'+_0x25c29f:_0x25c29f;}}const _0x31d6af={'id':_0x3860e7,'timestamp':new Date()['toISOString'](),'command':_0x58015e,'raw_chars':_0x3ce439,'compressed_chars':_0x72e42f,'estimated_raw_tokens':_0x142247,'estimated_compressed_tokens':_0x44052e,'tokens_saved':_0x54e104,'model_used':_0x4503c7,'tool':_0x34fa90||_0xf24552['tool']||'','exit_code':_0x264172,'synced':![],'ai_detected':!!_0xf24552['tool'],'secrets_found':_0x35aa10?.[_0x5f47f8(0x15f)]||0x0,'secret_types':_0x35aa10?.[_0x5f47f8(0x17e)]||[],'features':_0x52512c||[]};_0x249073[_0x5f47f8(0x13e)](_0x31d6af),this['saveLogs'](this['pruneLogsPerTool'](_0x249073));const _0x913449=this[_0x5f47f8(0x154)]()['telemetry_url'];return _0x913449&&_0x913449['trim']()[_0x5f47f8(0xf4)]>0x0&&this[_0x5f47f8(0x114)](),_0x35aa10&&_0x35aa10['secretsFound']>0x0&&this[_0x5f47f8(0x10f)](_0x31d6af,_0x35aa10),_0x31d6af;}['cachedDevId']=null;[a0_0xbf0b41(0x16f)](){const _0x11ea29=a0_0xbf0b41;if(this['cachedDevId'])return this[_0x11ea29(0x16a)];try{const _0x2331ab=require('child_process')[_0x11ea29(0x14f)](_0x11ea29(0x180),{'stdio':[_0x11ea29(0x18f),_0x11ea29(0x17c),'ignore'],'windowsHide':!![]})[_0x11ea29(0x10e)]()[_0x11ea29(0x106)]();if(_0x2331ab&&_0x2331ab[_0x11ea29(0x170)]('@'))return this[_0x11ea29(0x16a)]=_0x2331ab,_0x2331ab;}catch{}try{const _0x54b324=require('os')[_0x11ea29(0x156)]()[_0x11ea29(0x112)];return this[_0x11ea29(0x16a)]=_0x54b324,_0x54b324;}catch{}return this[_0x11ea29(0x16a)]='unknown','unknown';}[a0_0xbf0b41(0x10f)](_0x292c41,_0x47a68b){const _0xb6349d=a0_0xbf0b41;try{let _0x22f3b7=this['getConfig']()[_0xb6349d(0xf5)]||'';if(!_0x22f3b7)return;_0x22f3b7=_0x22f3b7[_0xb6349d(0x104)](/\/api\/telemetry\/?$/,_0xb6349d(0xfb));if(!_0x22f3b7[_0xb6349d(0x170)](_0xb6349d(0xfb)))_0x22f3b7+=_0xb6349d(0xfb);const _0x317ef5=this[_0xb6349d(0x16f)](),_0x36a2a1=JSON[_0xb6349d(0x100)]({'developer_id':_0x317ef5,'timestamp':_0x292c41[_0xb6349d(0x190)],'command':_0x292c41[_0xb6349d(0x10c)],'secrets_found':_0x47a68b[_0xb6349d(0x15f)],'secret_types':_0x47a68b[_0xb6349d(0x17e)],'os':require('os')['platform']()}),_0x4bd35c=_0xb6349d(0x196)+JSON[_0xb6349d(0x100)](_0x22f3b7)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON['stringify'](_0x22f3b7)+_0xb6349d(0x103)+JSON[_0xb6349d(0x100)](_0x36a2a1)+')',_0x7c4767=(0x0,child_process_1[_0xb6349d(0xeb)])(process['execPath'],['-e',_0x4bd35c],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x7c4767[_0xb6349d(0x197)]();}catch{}}['triggerBackgroundSync'](){const _0x2124d7=a0_0xbf0b41;try{const _0x4032be=path[_0x2124d7(0xea)](__dirname,_0x2124d7(0x11a));if(fs['existsSync'](_0x4032be)){const _0x3b6f20=(0x0,child_process_1[_0x2124d7(0xeb)])(process['execPath'],[_0x4032be],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x3b6f20['unref']();}}catch{}}['getStatsSummary'](_0x1c09ee=a0_0xbf0b41(0x107)){const _0x31cb6a=a0_0xbf0b41,_0x54cef1=this[_0x31cb6a(0x171)]();let _0x34bbd2=0x0,_0x1a4aef=0x0,_0x3e40dd=0x0;for(const _0x41af8f of _0x54cef1){_0x34bbd2+=_0x41af8f[_0x31cb6a(0x184)],_0x1a4aef+=_0x41af8f[_0x31cb6a(0x168)],_0x3e40dd+=_0x41af8f['tokens_saved'];}const _0x6e19cc=this[_0x31cb6a(0x154)]()[_0x31cb6a(0x113)];_0x6e19cc&&(_0x34bbd2+=_0x6e19cc[_0x31cb6a(0x16d)]||0x0,_0x1a4aef+=_0x6e19cc[_0x31cb6a(0xec)]||0x0,_0x3e40dd+=_0x6e19cc[_0x31cb6a(0x12c)]||0x0);let _0x311d74=_0x1c09ee;(!_0x311d74||_0x311d74===_0x31cb6a(0x107)||!exports['PRICING'][_0x311d74])&&(_0x54cef1[_0x31cb6a(0xf4)]>0x0&&_0x54cef1[_0x54cef1[_0x31cb6a(0xf4)]-0x1][_0x31cb6a(0x110)]?_0x311d74=_0x54cef1[_0x54cef1['length']-0x1][_0x31cb6a(0x110)]:_0x311d74=this[_0x31cb6a(0x154)]()[_0x31cb6a(0x181)]||'claude-3-5-sonnet');const _0x14290f=exports[_0x31cb6a(0x11f)][_0x311d74]||exports[_0x31cb6a(0x11f)][_0x31cb6a(0x117)],_0x174623=_0x3e40dd*_0x14290f['input_price_1m']/0xf4240,_0x16b589=_0x34bbd2*_0x14290f[_0x31cb6a(0x15e)]/0xf4240,_0x289f19=_0x1a4aef*_0x14290f[_0x31cb6a(0x15e)]/0xf4240,_0x402d3c=_0x34bbd2>0x0?_0x3e40dd/_0x34bbd2*0x64:0x0;return{'total_raw_tokens':_0x34bbd2,'total_compressed_tokens':_0x1a4aef,'total_tokens_saved':_0x3e40dd,'savings_percentage':parseFloat(_0x402d3c[_0x31cb6a(0x118)](0x1)),'money_saved_usd':parseFloat(_0x174623[_0x31cb6a(0x118)](0x4)),'raw_cost_usd':parseFloat(_0x16b589[_0x31cb6a(0x118)](0x4)),'compressed_cost_usd':parseFloat(_0x289f19['toFixed'](0x4)),'model_name':_0x14290f[_0x31cb6a(0x166)],'model_key':_0x311d74};}}exports[a0_0xbf0b41(0x158)]=Tracker,exports['tracker']=new Tracker();function a0_0x3f36(){const _0x289b33=['parse','push','baseDir','utf8','GPT-5.4\x20Nano','logsDir','GEMINI_CLI','Gemini\x203.5\x20Flash','Claude\x20Mythos\x205','config','gemini-3-5-flash','claude-sonnet-4-5','detectSessionTool','\x20Chat\x20','ceil','GPT-5.5','./redactor','setConfig','execSync','existsSync','slice','claude-sonnet-4-6','tool','getConfig','CLAUDECODE','userInfo','cursor','Tracker','.trimprompt','Gemini\x203.5\x20Live\x20Translate','claude_code','random','AI_AGENT','input_price_1m','secretsFound','Gemini\x203.1\x20Pro','TRIMPROMPT_MODEL','\x20Compaction','filter','Claude\x20Sonnet\x204.5','7XGzmFJ','name','toUpperCase','estimated_compressed_tokens','child_process','cachedDevId','conv:','devin','raw_tokens','87ODVYTd','getDevIdentity','includes','getLogs','redact','saveConfig','cline','GPT-4.1\x20Mini','renameSync','AIDER_MODEL','pop','add','activeSavedTokens','Claude\x203.5\x20Sonnet','pipe','346439yTGtLx','secretTypes','prototype','git\x20config\x20user.email','default_model','__setModuleDefault','create','estimated_raw_tokens','11892636xYyVvx','has','init','.comp.txt','opus','copilot','tracker','./file-watcher','config.json','GPT-5.4\x20Mini','ignore','timestamp','gemini','Claude\x20Haiku\x203.5','readFileSync','claude','6853344PqNEAb','const\x20h=require(require(\x27url\x27).parse(','unref','aider','writeFileSync','windsurf','replit','antigravity','COPILOT_MODEL','.tmp','join','spawn','compressed_tokens','github-copilot','size','fullPath','.raw.txt','ANTIGRAVITY_AGENT','Claude\x20Opus\x204.5','substring','length','telemetry_url','charAt','writable','modelShort','CLAUDE_EFFORT','CLAUDE_CODE','/api/security/alert','homedir','call','unlinkSync','claude-opus-4-8','stringify','sonnet','GPT-4o',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','replace','1352gyIUNJ','trim','auto','gemini-3-1-pro','logs','mkdirSync','COPILOT_GITHUB_TOKEN','command','Claude\x20Opus\x204.8','toString','sendSecurityAlert','model_used','hasOwnProperty','username','lifetime_savings','triggerBackgroundSync','__esModule','default','claude-3-5-sonnet','toFixed','REPL_ID','sync.js','defineProperty','toLowerCase','other','getOwnPropertyNames','PRICING','configurable','statsPath','isArray','path','4114710OQTVOt','high','saveLogs','CURSOR_AGENT','claude-code','get','o3-mini','configPath','tokens_saved','OpenAI\x20o1-mini','startsWith','CONTINUE_GLOBAL_DIR','Claude\x20Opus\x204.7','OpenAI\x20o1','codex','continue','3564786UTwreZ','statSync','flash','1.0','max','pruneLogsPerTool','split','model','1279218jpSGdw'];a0_0x3f36=function(){return _0x289b33;};return a0_0x3f36();}
1
+ 'use strict';const a0_0x394319=a0_0x2c8d;(function(_0x29cfb0,_0x3f9a75){const _0x2a752e=a0_0x2c8d,_0x433550=_0x29cfb0();while(!![]){try{const _0x3e3bca=parseInt(_0x2a752e(0x1fb))/0x1+parseInt(_0x2a752e(0x1cf))/0x2+parseInt(_0x2a752e(0x193))/0x3+parseInt(_0x2a752e(0x172))/0x4*(parseInt(_0x2a752e(0x1f4))/0x5)+-parseInt(_0x2a752e(0x161))/0x6*(-parseInt(_0x2a752e(0x179))/0x7)+-parseInt(_0x2a752e(0x163))/0x8*(-parseInt(_0x2a752e(0x1db))/0x9)+-parseInt(_0x2a752e(0x192))/0xa;if(_0x3e3bca===_0x3f9a75)break;else _0x433550['push'](_0x433550['shift']());}catch(_0x1e11f1){_0x433550['push'](_0x433550['shift']());}}}(a0_0x2411,0x306aa));var __createBinding=this&&this[a0_0x394319(0x1a5)]||(Object[a0_0x394319(0x1e5)]?function(_0x59078d,_0x24e744,_0x45d8e3,_0x411f00){const _0x15b777=a0_0x394319;if(_0x411f00===undefined)_0x411f00=_0x45d8e3;var _0x566261=Object['getOwnPropertyDescriptor'](_0x24e744,_0x45d8e3);(!_0x566261||(_0x15b777(0x183)in _0x566261?!_0x24e744[_0x15b777(0x14b)]:_0x566261[_0x15b777(0x1d2)]||_0x566261[_0x15b777(0x152)]))&&(_0x566261={'enumerable':!![],'get':function(){return _0x24e744[_0x45d8e3];}}),Object[_0x15b777(0x158)](_0x59078d,_0x411f00,_0x566261);}:function(_0x55f554,_0x6d4191,_0x13a377,_0xe5331a){if(_0xe5331a===undefined)_0xe5331a=_0x13a377;_0x55f554[_0xe5331a]=_0x6d4191[_0x13a377];}),__setModuleDefault=this&&this[a0_0x394319(0x1aa)]||(Object[a0_0x394319(0x1e5)]?function(_0x3a4011,_0xda3110){const _0x4f14fd=a0_0x394319;Object[_0x4f14fd(0x158)](_0x3a4011,_0x4f14fd(0x194),{'enumerable':!![],'value':_0xda3110});}:function(_0x2b959f,_0x549365){const _0x44fd07=a0_0x394319;_0x2b959f[_0x44fd07(0x194)]=_0x549365;}),__importStar=this&&this[a0_0x394319(0x1bd)]||(function(){var _0x2b37cc=function(_0x403752){const _0x297272=a0_0x2c8d;return _0x2b37cc=Object[_0x297272(0x1ae)]||function(_0x5f3750){const _0x3ee66d=_0x297272;var _0xeb9a40=[];for(var _0x818968 in _0x5f3750)if(Object[_0x3ee66d(0x1fc)][_0x3ee66d(0x162)]['call'](_0x5f3750,_0x818968))_0xeb9a40[_0xeb9a40[_0x3ee66d(0x19a)]]=_0x818968;return _0xeb9a40;},_0x2b37cc(_0x403752);};return function(_0xef2e4c){const _0x48db48=a0_0x2c8d;if(_0xef2e4c&&_0xef2e4c[_0x48db48(0x14b)])return _0xef2e4c;var _0x32e439={};if(_0xef2e4c!=null){for(var _0x5c7b26=_0x2b37cc(_0xef2e4c),_0x2d5a71=0x0;_0x2d5a71<_0x5c7b26[_0x48db48(0x19a)];_0x2d5a71++)if(_0x5c7b26[_0x2d5a71]!=='default')__createBinding(_0x32e439,_0xef2e4c,_0x5c7b26[_0x2d5a71]);}return __setModuleDefault(_0x32e439,_0xef2e4c),_0x32e439;};}());Object[a0_0x394319(0x158)](exports,a0_0x394319(0x14b),{'value':!![]}),exports[a0_0x394319(0x151)]=exports['Tracker']=exports[a0_0x394319(0x1d6)]=void 0x0,exports[a0_0x394319(0x15b)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x394319(0x14f))),os=__importStar(require('os')),child_process_1=require(a0_0x394319(0x14e));function a0_0x2c8d(_0xd1de82,_0x5a6b09){_0xd1de82=_0xd1de82-0x144;const _0x2411c4=a0_0x2411();let _0x2c8dba=_0x2411c4[_0xd1de82];return _0x2c8dba;}exports[a0_0x394319(0x1d6)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x394319(0x1c0),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x394319(0x16a),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x394319(0x168),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x394319(0x1b6),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x394319(0x18b),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x394319(0x1f6),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x394319(0x1e7),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x394319(0x171),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x394319(0x1df),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x394319(0x17d),'input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x394319(0x1d9),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x394319(0x1c3),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x394319(0x173),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x394319(0x1b1),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x394319(0x1cd),'input_price_1m':0.15},'o1':{'name':a0_0x394319(0x1c2),'input_price_1m':0xf},'o1-mini':{'name':a0_0x394319(0x175),'input_price_1m':0x3},'o3-mini':{'name':a0_0x394319(0x1d1),'input_price_1m':1.1},'cursor-small':{'name':a0_0x394319(0x1ca),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x394319(0x15e),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x394319(0x19d),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x394319(0x153),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}};function detectSessionTool(){const _0x474d=a0_0x394319,_0x104d86=process.env,_0x2a03c1={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x104d86['TRIMPROMPT_MODEL']&&exports[_0x474d(0x1d6)][_0x104d86['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x104d86[_0x474d(0x14c)],'modelShort':''};const _0x4a474b=(_0x104d86['AI_AGENT']||'')[_0x474d(0x1e3)]();if(_0x4a474b){if(_0x4a474b[_0x474d(0x16f)](_0x474d(0x190))||_0x4a474b[_0x474d(0x16f)](_0x474d(0x198))){const _0x344b54=_0x104d86[_0x474d(0x1de)]===_0x474d(0x1a1)?_0x474d(0x1e9):'sonnet',_0x4b0add=_0x104d86['CLAUDE_EFFORT']===_0x474d(0x1a1)?_0x474d(0x191):_0x474d(0x1f1);return{'tool':_0x474d(0x1b9),'model':_0x4b0add,'modelShort':_0x344b54};}if(_0x4a474b['includes'](_0x474d(0x187)))return{'tool':_0x474d(0x187),'model':_0x474d(0x1f1),'modelShort':_0x474d(0x1c7)};if(_0x4a474b[_0x474d(0x16f)](_0x474d(0x1b0))||_0x4a474b[_0x474d(0x16f)](_0x474d(0x1fe))){const _0x5b8ba9=_0x104d86[_0x474d(0x1c4)]||'';if(_0x5b8ba9&&exports[_0x474d(0x1d6)][_0x5b8ba9])return{'tool':'copilot','model':_0x5b8ba9,'modelShort':_0x5b8ba9[_0x474d(0x1cb)]('-')[_0x474d(0x1fd)]()||''};return{'tool':_0x474d(0x1fe),'model':'claude-sonnet-4-5','modelShort':_0x474d(0x1c7)};}if(_0x4a474b['includes'](_0x474d(0x18c)))return{'tool':_0x474d(0x18c),'model':_0x474d(0x197),'modelShort':_0x474d(0x19c)};if(_0x4a474b['includes'](_0x474d(0x149)))return{'tool':_0x474d(0x149),'model':_0x474d(0x185),'modelShort':'o3mini'};if(_0x4a474b[_0x474d(0x16f)](_0x474d(0x1f2)))return{'tool':_0x474d(0x1f2),'model':_0x474d(0x1f1),'modelShort':''};if(_0x4a474b[_0x474d(0x16f)](_0x474d(0x182)))return{'tool':_0x474d(0x182),'model':_0x474d(0x1af),'modelShort':'gemini'};if(_0x4a474b[_0x474d(0x16f)](_0x474d(0x1da))||_0x104d86['REPL_ID'])return{'tool':'replit','model':_0x474d(0x1f1),'modelShort':''};return{'tool':_0x4a474b[_0x474d(0x1cb)]('_')[0x0][_0x474d(0x1cb)]('-')[0x0],'model':_0x474d(0x1f1),'modelShort':''};}if(_0x104d86[_0x474d(0x16b)]==='1'||_0x104d86[_0x474d(0x146)]==='1'){const _0x6d8258=_0x104d86[_0x474d(0x1de)]===_0x474d(0x1a1)?_0x474d(0x1e9):_0x474d(0x1c7),_0x383ef0=_0x104d86[_0x474d(0x1de)]===_0x474d(0x1a1)?'claude-opus-4-8':_0x474d(0x1f1);return{'tool':'claude','model':_0x383ef0,'modelShort':_0x6d8258};}if(_0x104d86[_0x474d(0x1c8)]==='1')return{'tool':_0x474d(0x187),'model':_0x474d(0x1f1),'modelShort':'sonnet'};if(_0x104d86[_0x474d(0x157)]==='1')return{'tool':_0x474d(0x18c),'model':_0x474d(0x197),'modelShort':_0x474d(0x19c)};if(_0x104d86['COPILOT_MODEL']||_0x104d86[_0x474d(0x17b)]){const _0x393073=_0x104d86[_0x474d(0x1c4)]||'';if(_0x393073&&exports['PRICING'][_0x393073])return{'tool':_0x474d(0x1fe),'model':_0x393073,'modelShort':_0x393073[_0x474d(0x1cb)]('-')[_0x474d(0x1fd)]()||''};return{'tool':_0x474d(0x1fe),'model':_0x474d(0x1b2),'modelShort':_0x474d(0x1c7)};}if(_0x104d86[_0x474d(0x1d7)]||_0x104d86['REPLIT_ENVIRONMENT'])return{'tool':'replit','model':_0x474d(0x1f1),'modelShort':''};if(_0x104d86['CLINE_DATA_DIR'])return{'tool':'cline','model':_0x474d(0x1f1),'modelShort':''};if(_0x104d86[_0x474d(0x189)])return{'tool':_0x474d(0x156),'model':_0x474d(0x1f1),'modelShort':''};if(_0x104d86[_0x474d(0x15a)]==='1')return{'tool':_0x474d(0x182),'model':_0x474d(0x1af),'modelShort':_0x474d(0x18c)};if(_0x104d86[_0x474d(0x1de)]){const _0x24a956=_0x104d86[_0x474d(0x1de)]===_0x474d(0x1a1)?_0x474d(0x1e9):_0x474d(0x1c7),_0x34146c=_0x104d86['CLAUDE_EFFORT']==='high'?'claude-opus-4-8':_0x474d(0x1f1);return{'tool':'','model':_0x34146c,'modelShort':''};}if(_0x104d86['AIDER_MODEL']&&exports['PRICING'][_0x104d86[_0x474d(0x1ab)]])return{'tool':_0x474d(0x178),'model':_0x104d86[_0x474d(0x1ab)],'modelShort':''};if(_0x104d86[_0x474d(0x1e1)]){const _0x41dc1f=(_0x104d86['PATH']||'')[_0x474d(0x1e3)]();if(_0x41dc1f[_0x474d(0x16f)](_0x474d(0x187)))return{'tool':_0x474d(0x187),'model':_0x474d(0x1f1),'modelShort':_0x474d(0x1c7)};if(_0x41dc1f['includes'](_0x474d(0x1b8)))return{'tool':'windsurf','model':_0x474d(0x1f1),'modelShort':_0x474d(0x1c7)};}const _0x306dbf=process.env.TRIMPROMPT_MODEL||'';if(_0x306dbf&&exports['PRICING'][_0x306dbf])return{'tool':'','model':_0x306dbf,'modelShort':''};return _0x2a03c1;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0x394319(0x177)];[a0_0x394319(0x1d3)];[a0_0x394319(0x1a6)];['logsDir'];[a0_0x394319(0x1b7)];constructor(){const _0xb3d454=a0_0x394319;this[_0xb3d454(0x177)]=path[_0xb3d454(0x1ba)](os['homedir'](),_0xb3d454(0x16d)),this[_0xb3d454(0x1d3)]=path[_0xb3d454(0x1ba)](this[_0xb3d454(0x177)],_0xb3d454(0x17a)),this[_0xb3d454(0x1a6)]=path[_0xb3d454(0x1ba)](this[_0xb3d454(0x177)],'stats.json'),this[_0xb3d454(0x147)]=path['join'](this['baseDir'],'logs'),this[_0xb3d454(0x14a)]();}[a0_0x394319(0x14a)](){const _0x518a9c=a0_0x394319;!fs[_0x518a9c(0x1ce)](this[_0x518a9c(0x177)])&&fs[_0x518a9c(0x1e2)](this['baseDir'],{'recursive':!![]});!fs[_0x518a9c(0x1ce)](this['logsDir'])&&fs[_0x518a9c(0x1e2)](this[_0x518a9c(0x147)],{'recursive':!![]});const _0x1da1b9={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x518a9c(0x191)};if(fs[_0x518a9c(0x1ce)](this[_0x518a9c(0x1d3)]))try{const _0x23dc71=fs['readFileSync'](this[_0x518a9c(0x1d3)],'utf8');this[_0x518a9c(0x1b7)]={..._0x1da1b9,...JSON[_0x518a9c(0x17c)](_0x23dc71)};}catch(_0x2a21c8){this[_0x518a9c(0x1b7)]=_0x1da1b9;}else this[_0x518a9c(0x1b7)]=_0x1da1b9,this[_0x518a9c(0x166)]();!fs['existsSync'](this[_0x518a9c(0x1a6)])&&fs[_0x518a9c(0x1d8)](this['statsPath'],JSON[_0x518a9c(0x169)]([]),_0x518a9c(0x18a));}['getConfig'](){const _0x4ca39b=a0_0x394319;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this['config'][_0x4ca39b(0x199)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x4ca39b(0x1b7)];}[a0_0x394319(0x1ea)](_0x5d538c,_0x3806b3){const _0xffd997=a0_0x394319;this[_0xffd997(0x1b7)][_0x5d538c]=_0x3806b3,this[_0xffd997(0x166)]();}[a0_0x394319(0x166)](){const _0x4aaac3=a0_0x394319;fs['writeFileSync'](this[_0x4aaac3(0x1d3)],JSON['stringify'](this[_0x4aaac3(0x1b7)],null,0x2),_0x4aaac3(0x18a));}[a0_0x394319(0x1a0)](){const _0xf86931=a0_0x394319;try{if(!fs[_0xf86931(0x1ce)](this['statsPath']))return globalLogsMemoryCache;const _0x4f2a0b=fs[_0xf86931(0x188)](this['statsPath'])[_0xf86931(0x1dd)];if(_0x4f2a0b===globalLogsCacheMtime&&globalLogsMemoryCache[_0xf86931(0x19a)]>0x0)return globalLogsMemoryCache;const _0x2a6d9d=fs[_0xf86931(0x1ee)](this[_0xf86931(0x1a6)],_0xf86931(0x18a)),_0xbf85bb=JSON[_0xf86931(0x17c)](_0x2a6d9d);if(Array[_0xf86931(0x1b4)](_0xbf85bb))return globalLogsMemoryCache=_0xbf85bb,globalLogsCacheMtime=_0x4f2a0b,_0xbf85bb;}catch{}return globalLogsMemoryCache;}[a0_0x394319(0x180)](_0xb6879b){const _0x220741=a0_0x394319;globalLogsMemoryCache=_0xb6879b;const _0x30aa8d=this['statsPath']+_0x220741(0x155);try{fs[_0x220741(0x1d8)](_0x30aa8d,JSON['stringify'](_0xb6879b,null,0x2),_0x220741(0x18a)),fs[_0x220741(0x145)](_0x30aa8d,this[_0x220741(0x1a6)]);}catch{try{fs['writeFileSync'](this[_0x220741(0x1a6)],JSON[_0x220741(0x169)](_0xb6879b,null,0x2),_0x220741(0x18a));}catch{}}}['pruneLogsPerTool'](_0x16cbcf){const _0x570069=a0_0x394319,_0x1c5ed9=new Map();for(const _0x2a3d30 of _0x16cbcf){const _0x399198=_0x2a3d30['tool']&&_0x2a3d30[_0x570069(0x1be)][_0x570069(0x1bb)]()||_0x2a3d30[_0x570069(0x1f5)]||_0x570069(0x1b3);let _0x4202c3=_0x1c5ed9[_0x570069(0x183)](_0x399198);!_0x4202c3&&(_0x4202c3=[],_0x1c5ed9[_0x570069(0x1a3)](_0x399198,_0x4202c3)),_0x4202c3[_0x570069(0x159)](_0x2a3d30);}const _0x44facd=new Set();for(const _0x2b2b14 of _0x1c5ed9[_0x570069(0x1dc)]()){const _0x26779b=_0x2b2b14[_0x570069(0x19a)]-MAX_LOGS_PER_TOOL;for(let _0x578b34=0x0;_0x578b34<_0x26779b;_0x578b34++)_0x44facd[_0x570069(0x1c5)](_0x2b2b14[_0x578b34]['id']);}if(_0x44facd[_0x570069(0x1cc)]===0x0)return _0x16cbcf;let _0x10530a={};try{_0x10530a=JSON[_0x570069(0x17c)](fs['readFileSync'](this[_0x570069(0x1d3)],_0x570069(0x18a)))||{};}catch{}const _0x90a7d6=_0x10530a['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x18e245 of _0x16cbcf){if(!_0x44facd[_0x570069(0x18e)](_0x18e245['id']))continue;_0x90a7d6[_0x570069(0x144)]+=_0x18e245[_0x570069(0x174)]||0x0,_0x90a7d6[_0x570069(0x170)]+=_0x18e245[_0x570069(0x165)]||0x0,_0x90a7d6[_0x570069(0x17f)]+=_0x18e245[_0x570069(0x17f)]||0x0;}_0x10530a['lifetime_savings']=_0x90a7d6,this['config']={...this[_0x570069(0x1b7)],..._0x10530a};try{this['saveConfig']();}catch{}for(const _0x580e21 of _0x44facd){try{fs['unlinkSync'](path[_0x570069(0x1ba)](this['logsDir'],_0x580e21+'.raw.txt'));}catch{}try{fs['unlinkSync'](path['join'](this[_0x570069(0x147)],_0x580e21+'.comp.txt'));}catch{}}return _0x16cbcf[_0x570069(0x181)](_0x5e0c48=>!_0x44facd[_0x570069(0x18e)](_0x5e0c48['id']));}[a0_0x394319(0x195)](_0x4f6ee9,_0x482104,_0x5dcf3d,_0x3c8e18,_0x3600c7,_0xf1b9f){const _0x878444=a0_0x394319,_0x255b95=this[_0x878444(0x1a0)](),_0x2a003b=_0x482104[_0x878444(0x19a)],_0x3888d8=_0x5dcf3d[_0x878444(0x19a)],_0xb3d39a=detectSessionTool(),_0x3632e7=_0xb3d39a[_0x878444(0x1ec)],_0x43655e=_0xb3d39a[_0x878444(0x1be)]===_0x878444(0x182)?_0x878444(0x18c):_0xb3d39a['tool'];let _0x2e2c7e=0x0;if(_0x43655e&&!_0x4f6ee9[_0x878444(0x19f)](_0x878444(0x164)))try{const {getLatestSessionFile:_0x22acc8,loadSessionsState:_0x25379f}=require(_0x878444(0x176)),_0x52a42a=_0x22acc8(_0x43655e);if(_0x52a42a&&_0x52a42a[_0x878444(0x1c6)]){const _0x3315ab=_0x25379f();_0x3315ab[_0x52a42a[_0x878444(0x1c6)]]&&(_0x2e2c7e=_0x3315ab[_0x52a42a['fullPath']][_0x878444(0x15c)]||0x0);}}catch{}const _0x50e41d=Math[_0x878444(0x1ef)](_0x2a003b/0x4)+_0x2e2c7e,_0x46ed86=Math[_0x878444(0x1ef)](_0x3888d8/0x4),_0x1480ca=Math[_0x878444(0x154)](0x0,_0x50e41d-_0x46ed86),_0x5345f3=Math[_0x878444(0x1d4)]()[_0x878444(0x1b5)](0x24)[_0x878444(0x1f0)](0x2,0xb);try{const {redactor:_0x43f5cc}=require('./redactor'),_0x1d4405=_0x43f5cc?_0x43f5cc[_0x878444(0x1bc)](_0x482104):_0x482104;fs[_0x878444(0x1d8)](path['join'](this[_0x878444(0x147)],_0x5345f3+_0x878444(0x1e6)),_0x1d4405,_0x878444(0x18a)),fs[_0x878444(0x1d8)](path[_0x878444(0x1ba)](this['logsDir'],_0x5345f3+_0x878444(0x150)),_0x5dcf3d,_0x878444(0x18a));}catch{}let _0x38343c=_0x4f6ee9;if(_0x4f6ee9[_0x878444(0x19f)](_0x878444(0x164))){const _0x2ffbea=_0x4f6ee9[_0x878444(0x1cb)](':')[0x1]||_0x878444(0x1b9),_0x41852b=_0x2ffbea[_0x878444(0x1f9)](0x0)[_0x878444(0x1f3)]()+_0x2ffbea[_0x878444(0x1a2)](0x1);_0x38343c=_0x41852b+'\x20Compaction';}else{if(_0x4f6ee9[_0x878444(0x19f)](_0x878444(0x16c))){const _0x44e5cd=_0x4f6ee9[_0x878444(0x1cb)]('\x20'),_0x658e2e=_0x44e5cd[0x0][_0x878444(0x1cb)](':')[0x1]||'claude',_0x453ad3=_0x658e2e[_0x878444(0x1f9)](0x0)[_0x878444(0x1f3)]()+_0x658e2e['slice'](0x1),_0x4d9565=_0x44e5cd[_0x878444(0x1a2)](0x1)['join']('\x20');_0x38343c=_0x453ad3+_0x878444(0x196)+_0x4d9565;}else{const _0x21fbab=_0x4f6ee9[_0x878444(0x1cb)]('\x20')[0x0]||'unknown';_0x38343c=_0xb3d39a[_0x878444(0x1be)]?_0xb3d39a[_0x878444(0x1eb)]?_0xb3d39a[_0x878444(0x1be)]+'-'+_0xb3d39a['modelShort']+'-'+_0x21fbab:_0xb3d39a[_0x878444(0x1be)]+'-'+_0x21fbab:_0x21fbab;}}const _0x41c7c6={'id':_0x5345f3,'timestamp':new Date()[_0x878444(0x148)](),'command':_0x38343c,'raw_chars':_0x2a003b,'compressed_chars':_0x3888d8,'estimated_raw_tokens':_0x50e41d,'estimated_compressed_tokens':_0x46ed86,'tokens_saved':_0x1480ca,'model_used':_0x3632e7,'tool':_0x43655e||_0xb3d39a[_0x878444(0x1be)]||'','exit_code':_0x3c8e18,'synced':![],'ai_detected':!!_0xb3d39a[_0x878444(0x1be)],'secrets_found':_0x3600c7?.[_0x878444(0x18f)]||0x0,'secret_types':_0x3600c7?.[_0x878444(0x1d0)]||[],'features':_0xf1b9f||[]};_0x255b95[_0x878444(0x159)](_0x41c7c6),this[_0x878444(0x180)](this[_0x878444(0x1ad)](_0x255b95));const _0x3af9c8=this['getConfig']()[_0x878444(0x199)];return _0x3af9c8&&_0x3af9c8['trim']()[_0x878444(0x19a)]>0x0&&this['triggerBackgroundSync'](),_0x3600c7&&_0x3600c7[_0x878444(0x18f)]>0x0&&this[_0x878444(0x1f8)](_0x41c7c6,_0x3600c7),_0x41c7c6;}[a0_0x394319(0x1ed)]=null;[a0_0x394319(0x1f7)](){const _0x29ded1=a0_0x394319;if(this[_0x29ded1(0x1ed)])return this['cachedDevId'];try{const _0x5dcc81=require(_0x29ded1(0x14e))['execSync'](_0x29ded1(0x184),{'stdio':[_0x29ded1(0x14d),_0x29ded1(0x1d5),_0x29ded1(0x14d)],'windowsHide':!![]})[_0x29ded1(0x1b5)]()[_0x29ded1(0x1bb)]();if(_0x5dcc81&&_0x5dcc81[_0x29ded1(0x16f)]('@'))return this[_0x29ded1(0x1ed)]=_0x5dcc81,_0x5dcc81;}catch{}try{const _0x3421b7=require('os')['userInfo']()[_0x29ded1(0x17e)];return this['cachedDevId']=_0x3421b7,_0x3421b7;}catch{}return this[_0x29ded1(0x1ed)]='unknown',_0x29ded1(0x1c9);}[a0_0x394319(0x1f8)](_0x354c50,_0x3345f2){const _0x1317c2=a0_0x394319;try{let _0x90e9c5=this[_0x1317c2(0x16e)]()[_0x1317c2(0x199)]||'';if(!_0x90e9c5)return;_0x90e9c5=_0x90e9c5[_0x1317c2(0x1e4)](/\/api\/telemetry\/?$/,_0x1317c2(0x1ac));if(!_0x90e9c5[_0x1317c2(0x16f)](_0x1317c2(0x1ac)))_0x90e9c5+=_0x1317c2(0x1ac);const _0x1b90d2=this['getDevIdentity'](),_0x5a30dc=JSON[_0x1317c2(0x169)]({'developer_id':_0x1b90d2,'timestamp':_0x354c50[_0x1317c2(0x18d)],'command':_0x354c50[_0x1317c2(0x15f)],'secrets_found':_0x3345f2[_0x1317c2(0x18f)],'secret_types':_0x3345f2[_0x1317c2(0x1d0)],'os':require('os')[_0x1317c2(0x19b)]()}),_0x3125ae=_0x1317c2(0x167)+JSON[_0x1317c2(0x169)](_0x90e9c5)+_0x1317c2(0x1a7)+JSON['stringify'](_0x90e9c5)+',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end('+JSON['stringify'](_0x5a30dc)+')',_0x3fc8ab=(0x0,child_process_1[_0x1317c2(0x1a4)])(process[_0x1317c2(0x15d)],['-e',_0x3125ae],{'detached':!![],'stdio':_0x1317c2(0x14d),'windowsHide':!![]});_0x3fc8ab[_0x1317c2(0x1e8)]();}catch{}}[a0_0x394319(0x1c1)](){const _0x5bb9d9=a0_0x394319;try{const _0x56227b=path[_0x5bb9d9(0x1ba)](__dirname,'sync.js');if(fs[_0x5bb9d9(0x1ce)](_0x56227b)){const _0x212ec6=(0x0,child_process_1['spawn'])(process[_0x5bb9d9(0x15d)],[_0x56227b],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x212ec6[_0x5bb9d9(0x1e8)]();}}catch{}}[a0_0x394319(0x1e0)](_0x5b2ffe='auto'){const _0x4d5553=a0_0x394319,_0x3d5b84=this[_0x4d5553(0x1a0)]();let _0xffcf5d=0x0,_0x22e525=0x0,_0x2bac4e=0x0;for(const _0x3bf41c of _0x3d5b84){_0xffcf5d+=_0x3bf41c['estimated_raw_tokens'],_0x22e525+=_0x3bf41c[_0x4d5553(0x165)],_0x2bac4e+=_0x3bf41c[_0x4d5553(0x17f)];}const _0xf68798=this[_0x4d5553(0x16e)]()[_0x4d5553(0x19e)];_0xf68798&&(_0xffcf5d+=_0xf68798[_0x4d5553(0x144)]||0x0,_0x22e525+=_0xf68798[_0x4d5553(0x170)]||0x0,_0x2bac4e+=_0xf68798[_0x4d5553(0x17f)]||0x0);let _0x216e9c=_0x5b2ffe;(!_0x216e9c||_0x216e9c===_0x4d5553(0x1fa)||!exports[_0x4d5553(0x1d6)][_0x216e9c])&&(_0x3d5b84['length']>0x0&&_0x3d5b84[_0x3d5b84['length']-0x1][_0x4d5553(0x1f5)]?_0x216e9c=_0x3d5b84[_0x3d5b84[_0x4d5553(0x19a)]-0x1]['model_used']:_0x216e9c=this[_0x4d5553(0x16e)]()[_0x4d5553(0x1a9)]||_0x4d5553(0x186));const _0x461182=exports[_0x4d5553(0x1d6)][_0x216e9c]||exports[_0x4d5553(0x1d6)][_0x4d5553(0x186)],_0x5614f5=_0x2bac4e*_0x461182[_0x4d5553(0x1bf)]/0xf4240,_0x268e84=_0xffcf5d*_0x461182['input_price_1m']/0xf4240,_0x5f220d=_0x22e525*_0x461182[_0x4d5553(0x1bf)]/0xf4240,_0x291eb1=_0xffcf5d>0x0?_0x2bac4e/_0xffcf5d*0x64:0x0;return{'total_raw_tokens':_0xffcf5d,'total_compressed_tokens':_0x22e525,'total_tokens_saved':_0x2bac4e,'savings_percentage':parseFloat(_0x291eb1['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x5614f5[_0x4d5553(0x1a8)](0x4)),'raw_cost_usd':parseFloat(_0x268e84[_0x4d5553(0x1a8)](0x4)),'compressed_cost_usd':parseFloat(_0x5f220d[_0x4d5553(0x1a8)](0x4)),'model_name':_0x461182[_0x4d5553(0x160)],'model_key':_0x216e9c};}}function a0_0x2411(){const _0x39a714=['ignore','child_process','path','.comp.txt','tracker','configurable','Gemini\x203.1\x20Flash-Lite','max','.tmp','continue','GEMINI_CLI','defineProperty','push','ANTIGRAVITY_AGENT','detectSessionTool','activeSavedTokens','execPath','Gemini\x203.1\x20Pro','command','name','1143582XlwBvU','hasOwnProperty','4208tZstUX','compact:','estimated_compressed_tokens','saveConfig','const\x20h=require(require(\x27url\x27).parse(','Claude\x20Opus\x204.7','stringify','Claude\x20Opus\x204.8','CLAUDECODE','conv:','.trimprompt','getConfig','includes','compressed_tokens','Claude\x20Haiku\x204.5','2636MzDBhY','GPT-4.1\x20Mini','estimated_raw_tokens','OpenAI\x20o1-mini','./file-watcher','baseDir','aider','14glvYwZ','config.json','COPILOT_GITHUB_TOKEN','parse','GPT-5.4','username','tokens_saved','saveLogs','filter','antigravity','get','git\x20config\x20user.email','o3-mini','claude-3-5-sonnet','cursor','statSync','CONTINUE_GLOBAL_DIR','utf8','Claude\x20Sonnet\x204.6','gemini','timestamp','has','secretsFound','claude-code','claude-opus-4-8','9799760efaOAX','599877CBSBVI','default','logExecution','\x20Chat\x20','gemini-3-5-flash','claude_code','telemetry_url','length','platform','flash','Gemini\x203.5\x20Flash','lifetime_savings','startsWith','getLogs','high','slice','set','spawn','__createBinding','statsPath',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','toFixed','default_model','__setModuleDefault','AIDER_MODEL','/api/security/alert','pruneLogsPerTool','getOwnPropertyNames','gemini-3-1-pro','github-copilot','GPT-4.1\x20Nano','claude-sonnet-4-5','other','isArray','toString','Claude\x20Opus\x204.5','config','windsurf','claude','join','trim','redact','__importStar','tool','input_price_1m','Claude\x20Mythos\x205','triggerBackgroundSync','OpenAI\x20o1','GPT-5.4\x20Nano','COPILOT_MODEL','add','fullPath','sonnet','CURSOR_AGENT','unknown','Cursor\x20Small','split','size','GPT-4o\x20Mini','existsSync','516424xlALnD','secretTypes','OpenAI\x20o3-mini','writable','configPath','random','pipe','PRICING','REPL_ID','writeFileSync','GPT-5.4\x20Mini','replit','1773pzFuzp','values','mtimeMs','CLAUDE_EFFORT','Claude\x20Haiku\x203.5','getStatsSummary','VSCODE_PID','mkdirSync','toLowerCase','replace','create','.raw.txt','Claude\x203.5\x20Sonnet','unref','opus','setConfig','modelShort','model','cachedDevId','readFileSync','ceil','substring','claude-sonnet-4-6','devin','toUpperCase','1615DpqKND','model_used','Claude\x20Sonnet\x204.5','getDevIdentity','sendSecurityAlert','charAt','auto','22446EBwHBc','prototype','pop','copilot','raw_tokens','renameSync','CLAUDE_CODE','logsDir','toISOString','codex','init','__esModule','TRIMPROMPT_MODEL'];a0_0x2411=function(){return _0x39a714;};return a0_0x2411();}exports['Tracker']=Tracker,exports[a0_0x394319(0x151)]=new Tracker();