trimprompt 1.0.44 → 1.0.45

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_0x1ef589=a0_0x5e34;(function(_0x3c951d,_0x45d4af){const _0x411585=a0_0x5e34,_0x5722b1=_0x3c951d();while(!![]){try{const _0x1e1211=parseInt(_0x411585(0xd5))/0x1+-parseInt(_0x411585(0x110))/0x2+-parseInt(_0x411585(0xed))/0x3*(-parseInt(_0x411585(0x12d))/0x4)+-parseInt(_0x411585(0x156))/0x5*(parseInt(_0x411585(0x102))/0x6)+parseInt(_0x411585(0x163))/0x7+-parseInt(_0x411585(0xe7))/0x8+parseInt(_0x411585(0x120))/0x9;if(_0x1e1211===_0x45d4af)break;else _0x5722b1['push'](_0x5722b1['shift']());}catch(_0x1afd7d){_0x5722b1['push'](_0x5722b1['shift']());}}}(a0_0x3a3d,0x6ba22));var __createBinding=this&&this[a0_0x1ef589(0x166)]||(Object[a0_0x1ef589(0x11c)]?function(_0x4fae88,_0x49da5b,_0x3ef936,_0x247707){const _0x132967=a0_0x1ef589;if(_0x247707===undefined)_0x247707=_0x3ef936;var _0x1316fc=Object[_0x132967(0xdb)](_0x49da5b,_0x3ef936);(!_0x1316fc||(_0x132967(0x108)in _0x1316fc?!_0x49da5b[_0x132967(0xfb)]:_0x1316fc[_0x132967(0xb4)]||_0x1316fc[_0x132967(0x103)]))&&(_0x1316fc={'enumerable':!![],'get':function(){return _0x49da5b[_0x3ef936];}}),Object[_0x132967(0x14e)](_0x4fae88,_0x247707,_0x1316fc);}:function(_0x29f5d2,_0x3cb940,_0x2517fe,_0x9a0bd7){if(_0x9a0bd7===undefined)_0x9a0bd7=_0x2517fe;_0x29f5d2[_0x9a0bd7]=_0x3cb940[_0x2517fe];}),__setModuleDefault=this&&this[a0_0x1ef589(0x124)]||(Object[a0_0x1ef589(0x11c)]?function(_0x347d00,_0x4d1eba){const _0x54581d=a0_0x1ef589;Object[_0x54581d(0x14e)](_0x347d00,_0x54581d(0x109),{'enumerable':!![],'value':_0x4d1eba});}:function(_0x56e12c,_0x43d395){const _0x595418=a0_0x1ef589;_0x56e12c[_0x595418(0x109)]=_0x43d395;}),__importStar=this&&this[a0_0x1ef589(0x13d)]||(function(){var _0x5046c7=function(_0x26c30d){return _0x5046c7=Object['getOwnPropertyNames']||function(_0x172b25){const _0x427b61=a0_0x5e34;var _0x525b25=[];for(var _0xfbf1a in _0x172b25)if(Object[_0x427b61(0xe6)][_0x427b61(0x11f)][_0x427b61(0x139)](_0x172b25,_0xfbf1a))_0x525b25[_0x525b25[_0x427b61(0x125)]]=_0xfbf1a;return _0x525b25;},_0x5046c7(_0x26c30d);};return function(_0x727a7b){const _0x136964=a0_0x5e34;if(_0x727a7b&&_0x727a7b['__esModule'])return _0x727a7b;var _0x440d09={};if(_0x727a7b!=null){for(var _0x2d8c3e=_0x5046c7(_0x727a7b),_0x5b167e=0x0;_0x5b167e<_0x2d8c3e['length'];_0x5b167e++)if(_0x2d8c3e[_0x5b167e]!==_0x136964(0x109))__createBinding(_0x440d09,_0x727a7b,_0x2d8c3e[_0x5b167e]);}return __setModuleDefault(_0x440d09,_0x727a7b),_0x440d09;};}());Object[a0_0x1ef589(0x14e)](exports,a0_0x1ef589(0xfb),{'value':!![]}),exports[a0_0x1ef589(0x15a)]=exports[a0_0x1ef589(0x15c)]=exports[a0_0x1ef589(0xfe)]=void 0x0,exports[a0_0x1ef589(0xb6)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1ef589(0x12f))),os=__importStar(require('os')),child_process_1=require('child_process');exports[a0_0x1ef589(0xfe)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':'Claude\x20Mythos\x205','input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x1ef589(0xd9),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x1ef589(0xbf),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x1ef589(0xd4),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x1ef589(0xe2),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x1ef589(0x144),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x1ef589(0xe3),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x1ef589(0x160),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x1ef589(0xc0),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x1ef589(0x14b),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x1ef589(0x159),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x1ef589(0x157),'input_price_1m':0.75},'gpt-5-4-nano':{'name':'GPT-5.4\x20Nano','input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x1ef589(0xf1),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x1ef589(0x114),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x1ef589(0x13c),'input_price_1m':0x3},'o3-mini':{'name':a0_0x1ef589(0xb2),'input_price_1m':1.1},'cursor-small':{'name':a0_0x1ef589(0xdf),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x1ef589(0xef),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x1ef589(0xf8),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x1ef589(0xc6),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x1ef589(0x16c),'input_price_1m':3.5}};function detectSessionTool(){const _0x1a8200=a0_0x1ef589,_0x49b82a=process.env,_0x483c4e={'tool':'','model':_0x1a8200(0x10e),'modelShort':''};if(_0x49b82a[_0x1a8200(0xf7)]&&exports['PRICING'][_0x49b82a[_0x1a8200(0xf7)]])return{'tool':'','model':_0x49b82a[_0x1a8200(0xf7)],'modelShort':''};const _0xa6358d=(_0x49b82a[_0x1a8200(0x123)]||'')['toLowerCase']();if(_0xa6358d){if(_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0x131))||_0xa6358d['includes'](_0x1a8200(0xd1))){const _0x3fa2b3=_0x49b82a[_0x1a8200(0x15f)]===_0x1a8200(0xbc)?_0x1a8200(0x11b):_0x1a8200(0x15b),_0x20c59c=_0x49b82a[_0x1a8200(0x15f)]==='high'?_0x1a8200(0x158):_0x1a8200(0x10e);return{'tool':_0x1a8200(0x14f),'model':_0x20c59c,'modelShort':_0x3fa2b3};}if(_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0x141)))return{'tool':_0x1a8200(0x141),'model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0xa6358d[_0x1a8200(0x10b)]('github-copilot')||_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0xb7))){const _0x24b42c=_0x49b82a[_0x1a8200(0x134)]||'';if(_0x24b42c&&exports[_0x1a8200(0xfe)][_0x24b42c])return{'tool':'copilot','model':_0x24b42c,'modelShort':_0x24b42c[_0x1a8200(0xb0)]('-')[_0x1a8200(0xcf)]()||''};return{'tool':_0x1a8200(0xb7),'model':_0x1a8200(0xdc),'modelShort':_0x1a8200(0x15b)};}if(_0xa6358d[_0x1a8200(0x10b)]('gemini'))return{'tool':_0x1a8200(0xd6),'model':'gemini-3-5-flash','modelShort':_0x1a8200(0xb3)};if(_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0xc1)))return{'tool':_0x1a8200(0xc1),'model':_0x1a8200(0x13e),'modelShort':_0x1a8200(0xd0)};if(_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0xcd)))return{'tool':_0x1a8200(0xcd),'model':_0x1a8200(0x10e),'modelShort':''};if(_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0x16b)))return{'tool':_0x1a8200(0x16b),'model':_0x1a8200(0xf5),'modelShort':_0x1a8200(0xd6)};if(_0xa6358d[_0x1a8200(0x10b)](_0x1a8200(0x10f))||_0x49b82a[_0x1a8200(0x16a)])return{'tool':_0x1a8200(0x10f),'model':'claude-sonnet-4-6','modelShort':''};return{'tool':_0xa6358d[_0x1a8200(0xb0)]('_')[0x0][_0x1a8200(0xb0)]('-')[0x0],'model':_0x1a8200(0x10e),'modelShort':''};}if(_0x49b82a[_0x1a8200(0xb5)]==='1'||_0x49b82a[_0x1a8200(0xf9)]==='1'){const _0x5aeece=_0x49b82a[_0x1a8200(0x15f)]===_0x1a8200(0xbc)?_0x1a8200(0x11b):'sonnet',_0x2af172=_0x49b82a[_0x1a8200(0x15f)]===_0x1a8200(0xbc)?'claude-opus-4-8':_0x1a8200(0x10e);return{'tool':_0x1a8200(0x14f),'model':_0x2af172,'modelShort':_0x5aeece};}if(_0x49b82a[_0x1a8200(0x115)]==='1')return{'tool':_0x1a8200(0x141),'model':'claude-sonnet-4-6','modelShort':_0x1a8200(0x15b)};if(_0x49b82a[_0x1a8200(0x116)]==='1')return{'tool':'gemini','model':_0x1a8200(0x147),'modelShort':_0x1a8200(0xb3)};if(_0x49b82a[_0x1a8200(0x134)]||_0x49b82a[_0x1a8200(0x121)]){const _0xc1c4ab=_0x49b82a[_0x1a8200(0x134)]||'';if(_0xc1c4ab&&exports[_0x1a8200(0xfe)][_0xc1c4ab])return{'tool':_0x1a8200(0xb7),'model':_0xc1c4ab,'modelShort':_0xc1c4ab['split']('-')[_0x1a8200(0xcf)]()||''};return{'tool':_0x1a8200(0xb7),'model':'claude-sonnet-4-5','modelShort':_0x1a8200(0x15b)};}if(_0x49b82a[_0x1a8200(0x16a)]||_0x49b82a[_0x1a8200(0x153)])return{'tool':_0x1a8200(0x10f),'model':_0x1a8200(0x10e),'modelShort':''};if(_0x49b82a[_0x1a8200(0x14c)])return{'tool':_0x1a8200(0x143),'model':_0x1a8200(0x10e),'modelShort':''};if(_0x49b82a[_0x1a8200(0xe8)])return{'tool':_0x1a8200(0x12b),'model':_0x1a8200(0x10e),'modelShort':''};if(_0x49b82a['ANTIGRAVITY_AGENT']==='1')return{'tool':_0x1a8200(0x16b),'model':_0x1a8200(0xf5),'modelShort':'gemini'};if(_0x49b82a[_0x1a8200(0x15f)]){const _0x55e04d=_0x49b82a[_0x1a8200(0x15f)]===_0x1a8200(0xbc)?_0x1a8200(0x11b):_0x1a8200(0x15b),_0x7cdcb5=_0x49b82a[_0x1a8200(0x15f)]===_0x1a8200(0xbc)?'claude-opus-4-8':_0x1a8200(0x10e);return{'tool':'','model':_0x7cdcb5,'modelShort':''};}if(_0x49b82a['AIDER_MODEL']&&exports[_0x1a8200(0xfe)][_0x49b82a[_0x1a8200(0xc3)]])return{'tool':_0x1a8200(0x10d),'model':_0x49b82a['AIDER_MODEL'],'modelShort':''};if(_0x49b82a[_0x1a8200(0xee)]){const _0xa97304=(_0x49b82a[_0x1a8200(0xc8)]||'')[_0x1a8200(0xf6)]();if(_0xa97304[_0x1a8200(0x10b)](_0x1a8200(0x141)))return{'tool':_0x1a8200(0x141),'model':_0x1a8200(0x10e),'modelShort':_0x1a8200(0x15b)};if(_0xa97304['includes'](_0x1a8200(0xd7)))return{'tool':_0x1a8200(0xd7),'model':'claude-sonnet-4-6','modelShort':_0x1a8200(0x15b)};}const _0x3fd780=process.env.TRIMPROMPT_MODEL||'';if(_0x3fd780&&exports[_0x1a8200(0xfe)][_0x3fd780])return{'tool':'','model':_0x3fd780,'modelShort':''};return _0x483c4e;}const MAX_LOGS_PER_TOOL=0x32;function a0_0x3a3d(){const _0x1f052e=['985998OHauVN','VSCODE_PID','Gemini\x203.1\x20Pro','isArray','GPT-4.1\x20Mini','name','.raw.txt','config','gemini-3-1-pro','toLowerCase','TRIMPROMPT_MODEL','Gemini\x203.5\x20Flash','CLAUDE_CODE','command','__esModule','spawn','setConfig','PRICING','compressed_tokens','fullPath','estimated_compressed_tokens','6AOpHwB','configurable','triggerBackgroundSync','model','parse','stats.json','get','default','values','includes','substring','aider','claude-sonnet-4-6','replit','492196xCDqXf','toString','baseDir','estimated_raw_tokens','GPT-4o\x20Mini','CURSOR_AGENT','GEMINI_CLI','mkdirSync','startsWith','pruneLogsPerTool','compact:','opus','create','logExecution','toFixed','hasOwnProperty','4760775GgkVPy','COPILOT_GITHUB_TOKEN','writeFileSync','AI_AGENT','__setModuleDefault','length','activeSavedTokens','getLogs','\x20Chat\x20',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','init','continue','stringify','4RAWIdB','trim','path','redact','claude-code','telemetry_url','.comp.txt','COPILOT_MODEL','unlinkSync','tokens_saved',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','input_price_1m','call','.trimprompt','set','OpenAI\x20o1-mini','__importStar','o3-mini','cachedDevId','unref','cursor','secretTypes','cline','Claude\x20Sonnet\x204.6','other','auto','gemini-3-5-flash','conv:','const\x20h=require(require(\x27url\x27).parse(','.tmp','GPT-5.5','CLINE_DATA_DIR','unknown','defineProperty','claude','add','model_used','child_process','REPLIT_ENVIRONMENT','raw_tokens','/api/security/alert','3590165ZKNagu','GPT-5.4\x20Mini','claude-opus-4-8','GPT-4o','tracker','sonnet','Tracker','join','lifetime_savings','CLAUDE_EFFORT','Claude\x203.5\x20Sonnet','logsDir','secretsFound','4199279KqyVQd','existsSync','saveLogs','__createBinding','platform','random','userInfo','REPL_ID','antigravity','Gemini\x203.5\x20Live\x20Translate','split','mtimeMs','OpenAI\x20o3-mini','flash','writable','CLAUDECODE','detectSessionTool','copilot','configPath','timestamp','\x20Compaction','./file-watcher','high','getConfig','toISOString','Claude\x20Opus\x204.7','Claude\x20Haiku\x204.5','codex','git\x20config\x20user.email','AIDER_MODEL','tool','execSync','Gemini\x203.1\x20Flash-Lite','saveConfig','PATH','utf8','logs','execPath','statSync','devin','ignore','pop','o3mini','claude_code','statsPath','has','Claude\x20Opus\x204.5','444113vheGLw','gemini','windsurf','getDevIdentity','Claude\x20Opus\x204.8','ceil','getOwnPropertyDescriptor','claude-sonnet-4-5','push','readFileSync','Cursor\x20Small','claude-3-5-sonnet','charAt','Claude\x20Opus\x204.1\x20(deprecated)','Claude\x20Sonnet\x204.5','sendSecurityAlert','toUpperCase','prototype','3973232OxpjXp','CONTINUE_GLOBAL_DIR','getStatsSummary','slice','replace','./redactor'];a0_0x3a3d=function(){return _0x1f052e;};return a0_0x3a3d();}let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0x1ef589(0x112)];[a0_0x1ef589(0xb8)];[a0_0x1ef589(0xd2)];[a0_0x1ef589(0x161)];['config'];constructor(){const _0x169267=a0_0x1ef589;this['baseDir']=path[_0x169267(0x15d)](os['homedir'](),_0x169267(0x13a)),this[_0x169267(0xb8)]=path[_0x169267(0x15d)](this['baseDir'],'config.json'),this[_0x169267(0xd2)]=path[_0x169267(0x15d)](this[_0x169267(0x112)],_0x169267(0x107)),this[_0x169267(0x161)]=path[_0x169267(0x15d)](this[_0x169267(0x112)],_0x169267(0xca)),this['init']();}[a0_0x1ef589(0x12a)](){const _0x2cc65e=a0_0x1ef589;!fs[_0x2cc65e(0x164)](this[_0x2cc65e(0x112)])&&fs[_0x2cc65e(0x117)](this[_0x2cc65e(0x112)],{'recursive':!![]});!fs['existsSync'](this['logsDir'])&&fs[_0x2cc65e(0x117)](this['logsDir'],{'recursive':!![]});const _0x18f006={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x2cc65e(0x158)};if(fs['existsSync'](this[_0x2cc65e(0xb8)]))try{const _0x148355=fs[_0x2cc65e(0xde)](this[_0x2cc65e(0xb8)],_0x2cc65e(0xc9));this['config']={..._0x18f006,...JSON[_0x2cc65e(0x106)](_0x148355)};}catch(_0x388d22){this[_0x2cc65e(0xf4)]=_0x18f006;}else this[_0x2cc65e(0xf4)]=_0x18f006,this[_0x2cc65e(0xc7)]();!fs[_0x2cc65e(0x164)](this[_0x2cc65e(0xd2)])&&fs[_0x2cc65e(0x122)](this[_0x2cc65e(0xd2)],JSON[_0x2cc65e(0x12c)]([]),_0x2cc65e(0xc9));}[a0_0x1ef589(0xbd)](){const _0x4c7061=a0_0x1ef589;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x4c7061(0xf4)][_0x4c7061(0x132)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x4c7061(0xf4)];}[a0_0x1ef589(0xfd)](_0x1c8951,_0x40c170){const _0x3c3be4=a0_0x1ef589;this[_0x3c3be4(0xf4)][_0x1c8951]=_0x40c170,this[_0x3c3be4(0xc7)]();}[a0_0x1ef589(0xc7)](){const _0x15c864=a0_0x1ef589;fs[_0x15c864(0x122)](this['configPath'],JSON[_0x15c864(0x12c)](this[_0x15c864(0xf4)],null,0x2),'utf8');}['getLogs'](){const _0x25b5d8=a0_0x1ef589;try{if(!fs['existsSync'](this[_0x25b5d8(0xd2)]))return globalLogsMemoryCache;const _0x28ae59=fs[_0x25b5d8(0xcc)](this[_0x25b5d8(0xd2)])[_0x25b5d8(0xb1)];if(_0x28ae59===globalLogsCacheMtime&&globalLogsMemoryCache['length']>0x0)return globalLogsMemoryCache;const _0x126b67=fs[_0x25b5d8(0xde)](this[_0x25b5d8(0xd2)],'utf8'),_0x199bdf=JSON['parse'](_0x126b67);if(Array[_0x25b5d8(0xf0)](_0x199bdf))return globalLogsMemoryCache=_0x199bdf,globalLogsCacheMtime=_0x28ae59,_0x199bdf;}catch{}return globalLogsMemoryCache;}[a0_0x1ef589(0x165)](_0x2687ce){const _0x491838=a0_0x1ef589;globalLogsMemoryCache=_0x2687ce;const _0x2849fe=this[_0x491838(0xd2)]+_0x491838(0x14a);try{fs[_0x491838(0x122)](_0x2849fe,JSON['stringify'](_0x2687ce,null,0x2),_0x491838(0xc9)),fs['renameSync'](_0x2849fe,this[_0x491838(0xd2)]);}catch{try{fs[_0x491838(0x122)](this[_0x491838(0xd2)],JSON[_0x491838(0x12c)](_0x2687ce,null,0x2),_0x491838(0xc9));}catch{}}}[a0_0x1ef589(0x119)](_0x330663){const _0x1d146f=a0_0x1ef589,_0xd27dbe=new Map();for(const _0x305bad of _0x330663){const _0x2a1a7b=_0x305bad[_0x1d146f(0xc4)]&&_0x305bad[_0x1d146f(0xc4)][_0x1d146f(0x12e)]()||_0x305bad[_0x1d146f(0x151)]||_0x1d146f(0x145);let _0x2f7bae=_0xd27dbe['get'](_0x2a1a7b);!_0x2f7bae&&(_0x2f7bae=[],_0xd27dbe[_0x1d146f(0x13b)](_0x2a1a7b,_0x2f7bae)),_0x2f7bae[_0x1d146f(0xdd)](_0x305bad);}const _0x2bdf33=new Set();for(const _0xd7ffde of _0xd27dbe[_0x1d146f(0x10a)]()){const _0x4b8eac=_0xd7ffde[_0x1d146f(0x125)]-MAX_LOGS_PER_TOOL;for(let _0x14d17d=0x0;_0x14d17d<_0x4b8eac;_0x14d17d++)_0x2bdf33[_0x1d146f(0x150)](_0xd7ffde[_0x14d17d]['id']);}if(_0x2bdf33['size']===0x0)return _0x330663;let _0x543cc0={};try{_0x543cc0=JSON[_0x1d146f(0x106)](fs[_0x1d146f(0xde)](this[_0x1d146f(0xb8)],'utf8'))||{};}catch{}const _0x1ffb98=_0x543cc0[_0x1d146f(0x15e)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x43fe7b of _0x330663){if(!_0x2bdf33[_0x1d146f(0xd3)](_0x43fe7b['id']))continue;_0x1ffb98[_0x1d146f(0x154)]+=_0x43fe7b[_0x1d146f(0x113)]||0x0,_0x1ffb98[_0x1d146f(0xff)]+=_0x43fe7b[_0x1d146f(0x101)]||0x0,_0x1ffb98['tokens_saved']+=_0x43fe7b[_0x1d146f(0x136)]||0x0;}_0x543cc0[_0x1d146f(0x15e)]=_0x1ffb98,this[_0x1d146f(0xf4)]={...this[_0x1d146f(0xf4)],..._0x543cc0};try{this[_0x1d146f(0xc7)]();}catch{}for(const _0x2307e5 of _0x2bdf33){try{fs['unlinkSync'](path[_0x1d146f(0x15d)](this['logsDir'],_0x2307e5+_0x1d146f(0xf3)));}catch{}try{fs[_0x1d146f(0x135)](path[_0x1d146f(0x15d)](this[_0x1d146f(0x161)],_0x2307e5+'.comp.txt'));}catch{}}return _0x330663['filter'](_0x34062=>!_0x2bdf33[_0x1d146f(0xd3)](_0x34062['id']));}[a0_0x1ef589(0x11d)](_0x243e9c,_0x23f8e1,_0x447d45,_0x1e77e4,_0x57fd73,_0xd8da){const _0x45859e=a0_0x1ef589,_0x4a4d41=this[_0x45859e(0x127)](),_0x2ee5ff=_0x23f8e1[_0x45859e(0x125)],_0x4cf928=_0x447d45[_0x45859e(0x125)],_0x1d82cb=detectSessionTool(),_0x53bfbc=_0x1d82cb[_0x45859e(0x105)],_0x4aef99=_0x1d82cb[_0x45859e(0xc4)]==='antigravity'?_0x45859e(0xd6):_0x1d82cb[_0x45859e(0xc4)];let _0x379554=0x0;if(_0x4aef99&&!_0x243e9c[_0x45859e(0x118)](_0x45859e(0x11a)))try{const {getLatestSessionFile:_0x5adc05,loadSessionsState:_0x2c78ad}=require(_0x45859e(0xbb)),_0x373980=_0x5adc05(_0x4aef99);if(_0x373980&&_0x373980[_0x45859e(0x100)]){const _0x1a87ed=_0x2c78ad();_0x1a87ed[_0x373980[_0x45859e(0x100)]]&&(_0x379554=_0x1a87ed[_0x373980[_0x45859e(0x100)]][_0x45859e(0x126)]||0x0);}}catch{}const _0x11730f=Math[_0x45859e(0xda)](_0x2ee5ff/0x4)+_0x379554,_0x551de9=Math[_0x45859e(0xda)](_0x4cf928/0x4),_0x3e1595=Math['max'](0x0,_0x11730f-_0x551de9),_0x4439de=Math[_0x45859e(0x168)]()[_0x45859e(0x111)](0x24)[_0x45859e(0x10c)](0x2,0xb);try{const {redactor:_0x364f66}=require(_0x45859e(0xec)),_0x17f252=_0x364f66?_0x364f66[_0x45859e(0x130)](_0x23f8e1):_0x23f8e1;fs[_0x45859e(0x122)](path['join'](this[_0x45859e(0x161)],_0x4439de+_0x45859e(0xf3)),_0x17f252,_0x45859e(0xc9)),fs[_0x45859e(0x122)](path[_0x45859e(0x15d)](this[_0x45859e(0x161)],_0x4439de+_0x45859e(0x133)),_0x447d45,_0x45859e(0xc9));}catch{}let _0xee53f5=_0x243e9c;if(_0x243e9c['startsWith'](_0x45859e(0x11a))){const _0x4281e2=_0x243e9c[_0x45859e(0xb0)](':')[0x1]||_0x45859e(0x14f),_0xc61b2f=_0x4281e2[_0x45859e(0xe1)](0x0)['toUpperCase']()+_0x4281e2[_0x45859e(0xea)](0x1);_0xee53f5=_0xc61b2f+_0x45859e(0xba);}else{if(_0x243e9c[_0x45859e(0x118)](_0x45859e(0x148))){const _0x5e60f2=_0x243e9c['split']('\x20'),_0x314a49=_0x5e60f2[0x0]['split'](':')[0x1]||_0x45859e(0x14f),_0x1ddeaa=_0x314a49[_0x45859e(0xe1)](0x0)[_0x45859e(0xe5)]()+_0x314a49[_0x45859e(0xea)](0x1),_0x5851e6=_0x5e60f2[_0x45859e(0xea)](0x1)['join']('\x20');_0xee53f5=_0x1ddeaa+_0x45859e(0x128)+_0x5851e6;}else{const _0x30931b=_0x243e9c[_0x45859e(0xb0)]('\x20')[0x0]||'unknown';_0xee53f5=_0x1d82cb[_0x45859e(0xc4)]?_0x1d82cb['modelShort']?_0x1d82cb[_0x45859e(0xc4)]+'-'+_0x1d82cb['modelShort']+'-'+_0x30931b:_0x1d82cb[_0x45859e(0xc4)]+'-'+_0x30931b:_0x30931b;}}const _0xb5ba77={'id':_0x4439de,'timestamp':new Date()[_0x45859e(0xbe)](),'command':_0xee53f5,'raw_chars':_0x2ee5ff,'compressed_chars':_0x4cf928,'estimated_raw_tokens':_0x11730f,'estimated_compressed_tokens':_0x551de9,'tokens_saved':_0x3e1595,'model_used':_0x53bfbc,'tool':_0x4aef99||_0x1d82cb['tool']||'','exit_code':_0x1e77e4,'synced':![],'ai_detected':!!_0x1d82cb['tool'],'secrets_found':_0x57fd73?.['secretsFound']||0x0,'secret_types':_0x57fd73?.[_0x45859e(0x142)]||[],'features':_0xd8da||[]};_0x4a4d41[_0x45859e(0xdd)](_0xb5ba77),this[_0x45859e(0x165)](this[_0x45859e(0x119)](_0x4a4d41));const _0x2ae4a3=this[_0x45859e(0xbd)]()[_0x45859e(0x132)];return _0x2ae4a3&&_0x2ae4a3[_0x45859e(0x12e)]()[_0x45859e(0x125)]>0x0&&this['triggerBackgroundSync'](),_0x57fd73&&_0x57fd73[_0x45859e(0x162)]>0x0&&this[_0x45859e(0xe4)](_0xb5ba77,_0x57fd73),_0xb5ba77;}['cachedDevId']=null;[a0_0x1ef589(0xd8)](){const _0x161255=a0_0x1ef589;if(this['cachedDevId'])return this[_0x161255(0x13f)];try{const _0x40c2b1=require(_0x161255(0x152))[_0x161255(0xc5)](_0x161255(0xc2),{'stdio':[_0x161255(0xce),'pipe',_0x161255(0xce)],'windowsHide':!![]})['toString']()['trim']();if(_0x40c2b1&&_0x40c2b1['includes']('@'))return this[_0x161255(0x13f)]=_0x40c2b1,_0x40c2b1;}catch{}try{const _0x388f3c=require('os')[_0x161255(0x169)]()['username'];return this[_0x161255(0x13f)]=_0x388f3c,_0x388f3c;}catch{}return this[_0x161255(0x13f)]=_0x161255(0x14d),_0x161255(0x14d);}[a0_0x1ef589(0xe4)](_0x3aa8b0,_0x4a9e38){const _0x58bfbd=a0_0x1ef589;try{let _0x476038=this[_0x58bfbd(0xbd)]()[_0x58bfbd(0x132)]||'';if(!_0x476038)return;_0x476038=_0x476038[_0x58bfbd(0xeb)](/\/api\/telemetry\/?$/,_0x58bfbd(0x155));if(!_0x476038[_0x58bfbd(0x10b)](_0x58bfbd(0x155)))_0x476038+='/api/security/alert';const _0x1124aa=this[_0x58bfbd(0xd8)](),_0x4a17ec=JSON[_0x58bfbd(0x12c)]({'developer_id':_0x1124aa,'timestamp':_0x3aa8b0[_0x58bfbd(0xb9)],'command':_0x3aa8b0[_0x58bfbd(0xfa)],'secrets_found':_0x4a9e38['secretsFound'],'secret_types':_0x4a9e38[_0x58bfbd(0x142)],'os':require('os')[_0x58bfbd(0x167)]()}),_0x3d740a=_0x58bfbd(0x149)+JSON[_0x58bfbd(0x12c)](_0x476038)+_0x58bfbd(0x137)+JSON[_0x58bfbd(0x12c)](_0x476038)+_0x58bfbd(0x129)+JSON['stringify'](_0x4a17ec)+')',_0x550405=(0x0,child_process_1[_0x58bfbd(0xfc)])(process['execPath'],['-e',_0x3d740a],{'detached':!![],'stdio':_0x58bfbd(0xce),'windowsHide':!![]});_0x550405[_0x58bfbd(0x140)]();}catch{}}[a0_0x1ef589(0x104)](){const _0x5946f8=a0_0x1ef589;try{const _0x5de595=path[_0x5946f8(0x15d)](__dirname,'sync.js');if(fs[_0x5946f8(0x164)](_0x5de595)){const _0x3a4460=(0x0,child_process_1[_0x5946f8(0xfc)])(process[_0x5946f8(0xcb)],[_0x5de595],{'detached':!![],'stdio':_0x5946f8(0xce),'windowsHide':!![]});_0x3a4460['unref']();}}catch{}}[a0_0x1ef589(0xe9)](_0x249a4e=a0_0x1ef589(0x146)){const _0x251af1=a0_0x1ef589,_0x354d6b=this[_0x251af1(0x127)]();let _0x44f386=0x0,_0x3cb9c6=0x0,_0x3a64d3=0x0;for(const _0x36611b of _0x354d6b){_0x44f386+=_0x36611b[_0x251af1(0x113)],_0x3cb9c6+=_0x36611b['estimated_compressed_tokens'],_0x3a64d3+=_0x36611b['tokens_saved'];}const _0x47bff7=this[_0x251af1(0xbd)]()['lifetime_savings'];_0x47bff7&&(_0x44f386+=_0x47bff7[_0x251af1(0x154)]||0x0,_0x3cb9c6+=_0x47bff7[_0x251af1(0xff)]||0x0,_0x3a64d3+=_0x47bff7[_0x251af1(0x136)]||0x0);let _0x28e0f0=_0x249a4e;(!_0x28e0f0||_0x28e0f0===_0x251af1(0x146)||!exports[_0x251af1(0xfe)][_0x28e0f0])&&(_0x354d6b[_0x251af1(0x125)]>0x0&&_0x354d6b[_0x354d6b[_0x251af1(0x125)]-0x1]['model_used']?_0x28e0f0=_0x354d6b[_0x354d6b[_0x251af1(0x125)]-0x1][_0x251af1(0x151)]:_0x28e0f0=this['getConfig']()['default_model']||_0x251af1(0xe0));const _0x5013ac=exports['PRICING'][_0x28e0f0]||exports['PRICING'][_0x251af1(0xe0)],_0x2e019e=_0x3a64d3*_0x5013ac[_0x251af1(0x138)]/0xf4240,_0x43a4ee=_0x44f386*_0x5013ac['input_price_1m']/0xf4240,_0x24a903=_0x3cb9c6*_0x5013ac[_0x251af1(0x138)]/0xf4240,_0x4b8a8f=_0x44f386>0x0?_0x3a64d3/_0x44f386*0x64:0x0;return{'total_raw_tokens':_0x44f386,'total_compressed_tokens':_0x3cb9c6,'total_tokens_saved':_0x3a64d3,'savings_percentage':parseFloat(_0x4b8a8f['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x2e019e[_0x251af1(0x11e)](0x4)),'raw_cost_usd':parseFloat(_0x43a4ee['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x24a903[_0x251af1(0x11e)](0x4)),'model_name':_0x5013ac[_0x251af1(0xf2)],'model_key':_0x28e0f0};}}function a0_0x5e34(_0x530a29,_0x432bde){_0x530a29=_0x530a29-0xb0;const _0x3a3de3=a0_0x3a3d();let _0x5e3435=_0x3a3de3[_0x530a29];return _0x5e3435;}exports['Tracker']=Tracker,exports['tracker']=new Tracker();
1
+ 'use strict';function a0_0x77f0(_0x4ba041,_0x2318d4){_0x4ba041=_0x4ba041-0x150;const _0x34afc7=a0_0x34af();let _0x77f0b2=_0x34afc7[_0x4ba041];return _0x77f0b2;}const a0_0xafd27=a0_0x77f0;(function(_0x4758b9,_0x1a60be){const _0x52ce5e=a0_0x77f0,_0x2bc843=_0x4758b9();while(!![]){try{const _0x11f2d4=parseInt(_0x52ce5e(0x152))/0x1*(parseInt(_0x52ce5e(0x1ad))/0x2)+-parseInt(_0x52ce5e(0x1c8))/0x3*(parseInt(_0x52ce5e(0x1dd))/0x4)+parseInt(_0x52ce5e(0x1f3))/0x5+-parseInt(_0x52ce5e(0x1a1))/0x6+parseInt(_0x52ce5e(0x18b))/0x7+parseInt(_0x52ce5e(0x1fd))/0x8*(-parseInt(_0x52ce5e(0x1e6))/0x9)+parseInt(_0x52ce5e(0x160))/0xa*(-parseInt(_0x52ce5e(0x170))/0xb);if(_0x11f2d4===_0x1a60be)break;else _0x2bc843['push'](_0x2bc843['shift']());}catch(_0x11ba70){_0x2bc843['push'](_0x2bc843['shift']());}}}(a0_0x34af,0xc1925));var __createBinding=this&&this['__createBinding']||(Object[a0_0xafd27(0x186)]?function(_0x42e20e,_0x450196,_0x198bb5,_0x4608db){const _0xd689b3=a0_0xafd27;if(_0x4608db===undefined)_0x4608db=_0x198bb5;var _0x13b016=Object[_0xd689b3(0x1bf)](_0x450196,_0x198bb5);(!_0x13b016||(_0xd689b3(0x16e)in _0x13b016?!_0x450196['__esModule']:_0x13b016['writable']||_0x13b016['configurable']))&&(_0x13b016={'enumerable':!![],'get':function(){return _0x450196[_0x198bb5];}}),Object['defineProperty'](_0x42e20e,_0x4608db,_0x13b016);}:function(_0x1f72eb,_0x34487b,_0x3598ca,_0x49b88c){if(_0x49b88c===undefined)_0x49b88c=_0x3598ca;_0x1f72eb[_0x49b88c]=_0x34487b[_0x3598ca];}),__setModuleDefault=this&&this[a0_0xafd27(0x1e8)]||(Object['create']?function(_0x57c4f6,_0x432484){const _0x233254=a0_0xafd27;Object[_0x233254(0x1a0)](_0x57c4f6,_0x233254(0x18f),{'enumerable':!![],'value':_0x432484});}:function(_0x4e8fd8,_0x18e7c1){_0x4e8fd8['default']=_0x18e7c1;}),__importStar=this&&this[a0_0xafd27(0x150)]||(function(){var _0x44cf50=function(_0x86ddc0){const _0x4f1311=a0_0x77f0;return _0x44cf50=Object[_0x4f1311(0x1b0)]||function(_0x106a78){const _0x514697=_0x4f1311;var _0x212841=[];for(var _0x3411e8 in _0x106a78)if(Object[_0x514697(0x1f1)][_0x514697(0x1c0)][_0x514697(0x197)](_0x106a78,_0x3411e8))_0x212841[_0x212841[_0x514697(0x177)]]=_0x3411e8;return _0x212841;},_0x44cf50(_0x86ddc0);};return function(_0x2232dd){const _0xd1c118=a0_0x77f0;if(_0x2232dd&&_0x2232dd[_0xd1c118(0x1b2)])return _0x2232dd;var _0x2ce3ae={};if(_0x2232dd!=null){for(var _0xd7131b=_0x44cf50(_0x2232dd),_0x111673=0x0;_0x111673<_0xd7131b[_0xd1c118(0x177)];_0x111673++)if(_0xd7131b[_0x111673]!=='default')__createBinding(_0x2ce3ae,_0x2232dd,_0xd7131b[_0x111673]);}return __setModuleDefault(_0x2ce3ae,_0x2232dd),_0x2ce3ae;};}());Object[a0_0xafd27(0x1a0)](exports,a0_0xafd27(0x1b2),{'value':!![]}),exports[a0_0xafd27(0x17b)]=exports['Tracker']=exports[a0_0xafd27(0x1f5)]=void 0x0,exports[a0_0xafd27(0x182)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0xafd27(0x176))),os=__importStar(require('os')),child_process_1=require(a0_0xafd27(0x1e2));exports[a0_0xafd27(0x1f5)]={'claude-fable-5':{'name':a0_0xafd27(0x15e),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0xafd27(0x1e4),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0xafd27(0x1a2),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0xafd27(0x1db),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0xafd27(0x1fc),'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_0xafd27(0x193),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0xafd27(0x1eb),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0xafd27(0x1b4),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0xafd27(0x1fe),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0xafd27(0x181),'input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0xafd27(0x18e),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0xafd27(0x15c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0xafd27(0x19c),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0xafd27(0x165),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0xafd27(0x151),'input_price_1m':0.15},'o1':{'name':a0_0xafd27(0x188),'input_price_1m':0xf},'o1-mini':{'name':a0_0xafd27(0x1d0),'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_0xafd27(0x1e1),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0xafd27(0x1ae),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0xafd27(0x183),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}};function detectSessionTool(){const _0x3ef19c=a0_0xafd27,_0x188f40=process.env,_0x4693ea={'tool':'','model':_0x3ef19c(0x1c2),'modelShort':''};if(_0x188f40[_0x3ef19c(0x171)]&&exports[_0x3ef19c(0x1f5)][_0x188f40[_0x3ef19c(0x171)]])return{'tool':'','model':_0x188f40[_0x3ef19c(0x171)],'modelShort':''};const _0x4bec25=(_0x188f40[_0x3ef19c(0x161)]||'')[_0x3ef19c(0x16b)]();if(_0x4bec25){if(_0x4bec25['includes']('claude-code')||_0x4bec25['includes']('claude_code')){const _0x2dd89e=_0x188f40[_0x3ef19c(0x1c9)]==='high'?'opus':_0x3ef19c(0x16a),_0xf6e4ba=_0x188f40[_0x3ef19c(0x1c9)]===_0x3ef19c(0x1bb)?_0x3ef19c(0x174):_0x3ef19c(0x1c2);return{'tool':_0x3ef19c(0x167),'model':_0xf6e4ba,'modelShort':_0x2dd89e};}if(_0x4bec25[_0x3ef19c(0x1cf)]('cursor'))return{'tool':'cursor','model':_0x3ef19c(0x1c2),'modelShort':_0x3ef19c(0x16a)};if(_0x4bec25[_0x3ef19c(0x1cf)]('github-copilot')||_0x4bec25[_0x3ef19c(0x1cf)]('copilot')){const _0x9e2b97=_0x188f40[_0x3ef19c(0x1df)]||'';if(_0x9e2b97&&exports[_0x3ef19c(0x1f5)][_0x9e2b97])return{'tool':_0x3ef19c(0x1a5),'model':_0x9e2b97,'modelShort':_0x9e2b97[_0x3ef19c(0x1e3)]('-')['pop']()||''};return{'tool':_0x3ef19c(0x1a5),'model':_0x3ef19c(0x1f7),'modelShort':_0x3ef19c(0x16a)};}if(_0x4bec25[_0x3ef19c(0x1cf)](_0x3ef19c(0x1cb)))return{'tool':_0x3ef19c(0x1cb),'model':_0x3ef19c(0x1d8),'modelShort':_0x3ef19c(0x1ac)};if(_0x4bec25[_0x3ef19c(0x1cf)](_0x3ef19c(0x1a6)))return{'tool':_0x3ef19c(0x1a6),'model':_0x3ef19c(0x194),'modelShort':_0x3ef19c(0x1c7)};if(_0x4bec25[_0x3ef19c(0x1cf)](_0x3ef19c(0x1f9)))return{'tool':_0x3ef19c(0x1f9),'model':_0x3ef19c(0x1c2),'modelShort':''};if(_0x4bec25['includes']('antigravity'))return{'tool':_0x3ef19c(0x164),'model':_0x3ef19c(0x1b6),'modelShort':_0x3ef19c(0x1cb)};if(_0x4bec25[_0x3ef19c(0x1cf)](_0x3ef19c(0x1da))||_0x188f40[_0x3ef19c(0x179)])return{'tool':'replit','model':'claude-sonnet-4-6','modelShort':''};return{'tool':_0x4bec25[_0x3ef19c(0x1e3)]('_')[0x0]['split']('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x188f40[_0x3ef19c(0x185)]==='1'||_0x188f40['CLAUDE_CODE']==='1'){const _0x5bab02=_0x188f40[_0x3ef19c(0x1c9)]===_0x3ef19c(0x1bb)?_0x3ef19c(0x19b):_0x3ef19c(0x16a),_0x2961cc=_0x188f40['CLAUDE_EFFORT']===_0x3ef19c(0x1bb)?_0x3ef19c(0x174):_0x3ef19c(0x1c2);return{'tool':_0x3ef19c(0x167),'model':_0x2961cc,'modelShort':_0x5bab02};}if(_0x188f40['CURSOR_AGENT']==='1')return{'tool':_0x3ef19c(0x1be),'model':_0x3ef19c(0x1c2),'modelShort':_0x3ef19c(0x16a)};if(_0x188f40[_0x3ef19c(0x1ca)]==='1')return{'tool':_0x3ef19c(0x1cb),'model':_0x3ef19c(0x1d8),'modelShort':'flash'};if(_0x188f40[_0x3ef19c(0x1df)]||_0x188f40[_0x3ef19c(0x19f)]){const _0x49aaf9=_0x188f40[_0x3ef19c(0x1df)]||'';if(_0x49aaf9&&exports[_0x3ef19c(0x1f5)][_0x49aaf9])return{'tool':_0x3ef19c(0x1a5),'model':_0x49aaf9,'modelShort':_0x49aaf9[_0x3ef19c(0x1e3)]('-')[_0x3ef19c(0x1fb)]()||''};return{'tool':_0x3ef19c(0x1a5),'model':'claude-sonnet-4-5','modelShort':_0x3ef19c(0x16a)};}if(_0x188f40[_0x3ef19c(0x179)]||_0x188f40[_0x3ef19c(0x1c6)])return{'tool':_0x3ef19c(0x1da),'model':_0x3ef19c(0x1c2),'modelShort':''};if(_0x188f40[_0x3ef19c(0x1ef)])return{'tool':_0x3ef19c(0x1ee),'model':_0x3ef19c(0x1c2),'modelShort':''};if(_0x188f40[_0x3ef19c(0x1d7)])return{'tool':'continue','model':_0x3ef19c(0x1c2),'modelShort':''};if(_0x188f40[_0x3ef19c(0x172)]==='1')return{'tool':_0x3ef19c(0x164),'model':_0x3ef19c(0x1b6),'modelShort':_0x3ef19c(0x1cb)};if(_0x188f40['CLAUDE_EFFORT']){const _0x449a74=_0x188f40['CLAUDE_EFFORT']===_0x3ef19c(0x1bb)?_0x3ef19c(0x19b):'sonnet',_0x32515b=_0x188f40[_0x3ef19c(0x1c9)]===_0x3ef19c(0x1bb)?_0x3ef19c(0x174):_0x3ef19c(0x1c2);return{'tool':'','model':_0x32515b,'modelShort':''};}if(_0x188f40[_0x3ef19c(0x159)]&&exports[_0x3ef19c(0x1f5)][_0x188f40['AIDER_MODEL']])return{'tool':'aider','model':_0x188f40[_0x3ef19c(0x159)],'modelShort':''};if(_0x188f40[_0x3ef19c(0x1ba)]){const _0x41afce=(_0x188f40['PATH']||'')[_0x3ef19c(0x16b)]();if(_0x41afce[_0x3ef19c(0x1cf)]('cursor'))return{'tool':_0x3ef19c(0x1be),'model':'claude-sonnet-4-6','modelShort':_0x3ef19c(0x16a)};if(_0x41afce[_0x3ef19c(0x1cf)]('windsurf'))return{'tool':'windsurf','model':_0x3ef19c(0x1c2),'modelShort':_0x3ef19c(0x16a)};}const _0x398eff=process.env.TRIMPROMPT_MODEL||'';if(_0x398eff&&exports[_0x3ef19c(0x1f5)][_0x398eff])return{'tool':'','model':_0x398eff,'modelShort':''};return _0x4693ea;}const MAX_LOGS_PER_TOOL=0x32;function a0_0x34af(){const _0x18d5a4=['o3mini','340734MkauBr','CLAUDE_EFFORT','GEMINI_CLI','gemini','mkdirSync','spawn','claude-3-5-sonnet','includes','OpenAI\x20o1-mini','other','redact','stats.json','homedir','join','parse','CONTINUE_GLOBAL_DIR','gemini-3-5-flash','saveConfig','replit','Claude\x20Opus\x204.7','default_model','12Ehoqxk','./file-watcher','COPILOT_MODEL','.trimprompt','Gemini\x203.1\x20Pro','child_process','split','Claude\x20Mythos\x205','random','41841mfGXOO','git\x20config\x20user.email','__setModuleDefault','.tmp','\x20Compaction','Claude\x203.5\x20Sonnet','username','userInfo','cline','CLINE_DATA_DIR','cachedDevId','prototype','setConfig','2505555xHbhEY','input_price_1m','PRICING','triggerBackgroundSync','claude-sonnet-4-5','sendSecurityAlert','devin','statSync','pop','Claude\x20Opus\x204.5','16cJkzka','GPT-5.5','auto','__importStar','GPT-4o\x20Mini','252737GAMEFX','.comp.txt','estimated_compressed_tokens','secretTypes','utf8','unref','max','AIDER_MODEL','unknown','size','GPT-5.4\x20Nano','tool','Claude\x20Fable\x205','existsSync','1438260iyQdSe','AI_AGENT','set','compact:','antigravity','GPT-4.1\x20Nano','writeFileSync','claude','modelShort','sync.js','sonnet','toLowerCase','mtimeMs','fullPath','get','init','132VWJdBi','TRIMPROMPT_MODEL','ANTIGRAVITY_AGENT','.raw.txt','claude-opus-4-8','slice','path','length','model_used','REPL_ID',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','tracker','execPath','push','trim','secretsFound','startsWith','GPT-5.4','detectSessionTool','Gemini\x203.1\x20Flash-Lite','values','CLAUDECODE','create','ceil','OpenAI\x20o1','estimated_raw_tokens','toISOString','7857094mgfWwS','name','lifetime_savings','GPT-5.4\x20Mini','default','toUpperCase','pruneLogsPerTool','stringify','Claude\x20Sonnet\x204.5','o3-mini','readFileSync','command','call','ignore','statsPath','toString','opus','GPT-4.1\x20Mini','telemetry_url','config','COPILOT_GITHUB_TOKEN','defineProperty','110550bAxeEU','Claude\x20Opus\x204.8','getStatsSummary','saveLogs','copilot','codex','/api/security/alert','substring','tokens_saved','Tracker','unlinkSync','flash','10mNnkxx','Gemini\x203.5\x20Flash','toFixed','getOwnPropertyNames','raw_tokens','__esModule','conv:','Claude\x20Haiku\x204.5','baseDir','gemini-3-1-pro','getConfig','compressed_tokens','pipe','VSCODE_PID','high','getLogs','logsDir','cursor','getOwnPropertyDescriptor','hasOwnProperty','const\x20h=require(require(\x27url\x27).parse(','claude-sonnet-4-6','getDevIdentity','configPath','model','REPLIT_ENVIRONMENT'];a0_0x34af=function(){return _0x18d5a4;};return a0_0x34af();}let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0xafd27(0x1b5)];[a0_0xafd27(0x1c4)];['statsPath'];[a0_0xafd27(0x1bd)];[a0_0xafd27(0x19e)];constructor(){const _0x4da799=a0_0xafd27;this[_0x4da799(0x1b5)]=path[_0x4da799(0x1d5)](os[_0x4da799(0x1d4)](),_0x4da799(0x1e0)),this['configPath']=path['join'](this[_0x4da799(0x1b5)],'config.json'),this[_0x4da799(0x199)]=path[_0x4da799(0x1d5)](this[_0x4da799(0x1b5)],_0x4da799(0x1d3)),this['logsDir']=path[_0x4da799(0x1d5)](this[_0x4da799(0x1b5)],'logs'),this['init']();}[a0_0xafd27(0x16f)](){const _0x34fdf6=a0_0xafd27;!fs[_0x34fdf6(0x15f)](this[_0x34fdf6(0x1b5)])&&fs[_0x34fdf6(0x1cc)](this['baseDir'],{'recursive':!![]});!fs[_0x34fdf6(0x15f)](this['logsDir'])&&fs[_0x34fdf6(0x1cc)](this[_0x34fdf6(0x1bd)],{'recursive':!![]});const _0x3198b3={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x34fdf6(0x174)};if(fs['existsSync'](this[_0x34fdf6(0x1c4)]))try{const _0x10f63c=fs[_0x34fdf6(0x195)](this['configPath'],_0x34fdf6(0x156));this[_0x34fdf6(0x19e)]={..._0x3198b3,...JSON['parse'](_0x10f63c)};}catch(_0x2799e8){this[_0x34fdf6(0x19e)]=_0x3198b3;}else this['config']=_0x3198b3,this[_0x34fdf6(0x1d9)]();!fs[_0x34fdf6(0x15f)](this['statsPath'])&&fs[_0x34fdf6(0x166)](this[_0x34fdf6(0x199)],JSON[_0x34fdf6(0x192)]([]),_0x34fdf6(0x156));}['getConfig'](){const _0x17de1f=a0_0xafd27;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this['config'][_0x17de1f(0x19d)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x17de1f(0x19e)];}[a0_0xafd27(0x1f2)](_0x207476,_0x261c50){const _0x2d318c=a0_0xafd27;this['config'][_0x207476]=_0x261c50,this[_0x2d318c(0x1d9)]();}[a0_0xafd27(0x1d9)](){const _0x5b76f7=a0_0xafd27;fs['writeFileSync'](this['configPath'],JSON[_0x5b76f7(0x192)](this['config'],null,0x2),'utf8');}[a0_0xafd27(0x1bc)](){const _0x3cafc5=a0_0xafd27;try{if(!fs[_0x3cafc5(0x15f)](this['statsPath']))return globalLogsMemoryCache;const _0x5cbb6f=fs[_0x3cafc5(0x1fa)](this[_0x3cafc5(0x199)])[_0x3cafc5(0x16c)];if(_0x5cbb6f===globalLogsCacheMtime&&globalLogsMemoryCache[_0x3cafc5(0x177)]>0x0)return globalLogsMemoryCache;const _0x4f03df=fs[_0x3cafc5(0x195)](this['statsPath'],_0x3cafc5(0x156)),_0x4ebc4a=JSON[_0x3cafc5(0x1d6)](_0x4f03df);if(Array['isArray'](_0x4ebc4a))return globalLogsMemoryCache=_0x4ebc4a,globalLogsCacheMtime=_0x5cbb6f,_0x4ebc4a;}catch{}return globalLogsMemoryCache;}[a0_0xafd27(0x1a4)](_0x56c03f){const _0x584f5c=a0_0xafd27;globalLogsMemoryCache=_0x56c03f;const _0x28de31=this[_0x584f5c(0x199)]+_0x584f5c(0x1e9);try{fs['writeFileSync'](_0x28de31,JSON['stringify'](_0x56c03f,null,0x2),_0x584f5c(0x156)),fs['renameSync'](_0x28de31,this[_0x584f5c(0x199)]);}catch{try{fs[_0x584f5c(0x166)](this['statsPath'],JSON[_0x584f5c(0x192)](_0x56c03f,null,0x2),_0x584f5c(0x156));}catch{}}}['pruneLogsPerTool'](_0x4e6c2c){const _0x2f79d1=a0_0xafd27,_0x1bf9fb=new Map();for(const _0x10b854 of _0x4e6c2c){const _0x2dbdca=_0x10b854['tool']&&_0x10b854[_0x2f79d1(0x15d)]['trim']()||_0x10b854[_0x2f79d1(0x178)]||_0x2f79d1(0x1d1);let _0x34b4a4=_0x1bf9fb[_0x2f79d1(0x16e)](_0x2dbdca);!_0x34b4a4&&(_0x34b4a4=[],_0x1bf9fb[_0x2f79d1(0x162)](_0x2dbdca,_0x34b4a4)),_0x34b4a4[_0x2f79d1(0x17d)](_0x10b854);}const _0x527a7e=new Set();for(const _0x1734f8 of _0x1bf9fb[_0x2f79d1(0x184)]()){const _0x21a6b7=_0x1734f8[_0x2f79d1(0x177)]-MAX_LOGS_PER_TOOL;for(let _0x863063=0x0;_0x863063<_0x21a6b7;_0x863063++)_0x527a7e['add'](_0x1734f8[_0x863063]['id']);}if(_0x527a7e[_0x2f79d1(0x15b)]===0x0)return _0x4e6c2c;let _0x3fe5a1={};try{_0x3fe5a1=JSON[_0x2f79d1(0x1d6)](fs[_0x2f79d1(0x195)](this[_0x2f79d1(0x1c4)],_0x2f79d1(0x156)))||{};}catch{}const _0x5f59f7=_0x3fe5a1['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0xb3e8e1 of _0x4e6c2c){if(!_0x527a7e['has'](_0xb3e8e1['id']))continue;_0x5f59f7[_0x2f79d1(0x1b1)]+=_0xb3e8e1[_0x2f79d1(0x189)]||0x0,_0x5f59f7[_0x2f79d1(0x1b8)]+=_0xb3e8e1[_0x2f79d1(0x154)]||0x0,_0x5f59f7[_0x2f79d1(0x1a9)]+=_0xb3e8e1[_0x2f79d1(0x1a9)]||0x0;}_0x3fe5a1[_0x2f79d1(0x18d)]=_0x5f59f7,this[_0x2f79d1(0x19e)]={...this[_0x2f79d1(0x19e)],..._0x3fe5a1};try{this[_0x2f79d1(0x1d9)]();}catch{}for(const _0x7d4bcb of _0x527a7e){try{fs['unlinkSync'](path[_0x2f79d1(0x1d5)](this['logsDir'],_0x7d4bcb+_0x2f79d1(0x173)));}catch{}try{fs[_0x2f79d1(0x1ab)](path[_0x2f79d1(0x1d5)](this[_0x2f79d1(0x1bd)],_0x7d4bcb+'.comp.txt'));}catch{}}return _0x4e6c2c['filter'](_0x57874f=>!_0x527a7e['has'](_0x57874f['id']));}['logExecution'](_0x5262e6,_0x4a6ec2,_0x5ad1b6,_0x4bbfe0,_0x2e2b81,_0x5e426f){const _0x289f27=a0_0xafd27,_0x2c78e6=this[_0x289f27(0x1bc)](),_0x58f909=_0x4a6ec2[_0x289f27(0x177)],_0x618acf=_0x5ad1b6['length'],_0x567f4f=detectSessionTool(),_0x547bc4=_0x567f4f[_0x289f27(0x1c5)],_0x3e02f9=_0x567f4f[_0x289f27(0x15d)]===_0x289f27(0x164)?_0x289f27(0x1cb):_0x567f4f[_0x289f27(0x15d)];let _0x5afcbb=0x0;if(_0x3e02f9&&!_0x5262e6[_0x289f27(0x180)](_0x289f27(0x163)))try{const {getLatestSessionFile:_0x4093df,loadSessionsState:_0x5e82de}=require(_0x289f27(0x1de)),_0x3eaae6=_0x4093df(_0x3e02f9);if(_0x3eaae6&&_0x3eaae6['fullPath']){const _0x5f51ec=_0x5e82de();_0x5f51ec[_0x3eaae6[_0x289f27(0x16d)]]&&(_0x5afcbb=_0x5f51ec[_0x3eaae6['fullPath']]['activeSavedTokens']||0x0);}}catch{}const _0xae2cb6=Math[_0x289f27(0x187)](_0x58f909/0x4)+_0x5afcbb,_0x4fda5e=Math[_0x289f27(0x187)](_0x618acf/0x4),_0x2d44d0=Math[_0x289f27(0x158)](0x0,_0xae2cb6-_0x4fda5e),_0x2a9421=Math[_0x289f27(0x1e5)]()['toString'](0x24)[_0x289f27(0x1a8)](0x2,0xb);try{const {redactor:_0x3f31d2}=require('./redactor'),_0x14ea8e=_0x3f31d2?_0x3f31d2[_0x289f27(0x1d2)](_0x4a6ec2):_0x4a6ec2;fs[_0x289f27(0x166)](path[_0x289f27(0x1d5)](this[_0x289f27(0x1bd)],_0x2a9421+'.raw.txt'),_0x14ea8e,_0x289f27(0x156)),fs[_0x289f27(0x166)](path[_0x289f27(0x1d5)](this[_0x289f27(0x1bd)],_0x2a9421+_0x289f27(0x153)),_0x5ad1b6,_0x289f27(0x156));}catch{}let _0x56888a=_0x5262e6;if(_0x5262e6['startsWith']('compact:')){const _0x40d9f9=_0x5262e6[_0x289f27(0x1e3)](':')[0x1]||_0x289f27(0x167),_0x3ac3ad=_0x40d9f9['charAt'](0x0)[_0x289f27(0x190)]()+_0x40d9f9[_0x289f27(0x175)](0x1);_0x56888a=_0x3ac3ad+_0x289f27(0x1ea);}else{if(_0x5262e6['startsWith'](_0x289f27(0x1b3))){const _0xfd3a1a=_0x5262e6[_0x289f27(0x1e3)]('\x20'),_0x17aa76=_0xfd3a1a[0x0][_0x289f27(0x1e3)](':')[0x1]||_0x289f27(0x167),_0x25670a=_0x17aa76['charAt'](0x0)[_0x289f27(0x190)]()+_0x17aa76[_0x289f27(0x175)](0x1),_0x246257=_0xfd3a1a[_0x289f27(0x175)](0x1)[_0x289f27(0x1d5)]('\x20');_0x56888a=_0x25670a+'\x20Chat\x20'+_0x246257;}else{const _0x384ffb=_0x5262e6[_0x289f27(0x1e3)]('\x20')[0x0]||_0x289f27(0x15a);_0x56888a=_0x567f4f[_0x289f27(0x15d)]?_0x567f4f[_0x289f27(0x168)]?_0x567f4f[_0x289f27(0x15d)]+'-'+_0x567f4f[_0x289f27(0x168)]+'-'+_0x384ffb:_0x567f4f[_0x289f27(0x15d)]+'-'+_0x384ffb:_0x384ffb;}}const _0x1fe47e={'id':_0x2a9421,'timestamp':new Date()[_0x289f27(0x18a)](),'command':_0x56888a,'raw_chars':_0x58f909,'compressed_chars':_0x618acf,'estimated_raw_tokens':_0xae2cb6,'estimated_compressed_tokens':_0x4fda5e,'tokens_saved':_0x2d44d0,'model_used':_0x547bc4,'tool':_0x3e02f9||_0x567f4f[_0x289f27(0x15d)]||'','exit_code':_0x4bbfe0,'synced':![],'ai_detected':!!_0x567f4f[_0x289f27(0x15d)],'secrets_found':_0x2e2b81?.[_0x289f27(0x17f)]||0x0,'secret_types':_0x2e2b81?.['secretTypes']||[],'features':_0x5e426f||[]};_0x2c78e6[_0x289f27(0x17d)](_0x1fe47e),this[_0x289f27(0x1a4)](this[_0x289f27(0x191)](_0x2c78e6));const _0x57af71=this['getConfig']()[_0x289f27(0x19d)];return _0x57af71&&_0x57af71[_0x289f27(0x17e)]()['length']>0x0&&this[_0x289f27(0x1f6)](),_0x2e2b81&&_0x2e2b81['secretsFound']>0x0&&this[_0x289f27(0x1f8)](_0x1fe47e,_0x2e2b81),_0x1fe47e;}[a0_0xafd27(0x1f0)]=null;[a0_0xafd27(0x1c3)](){const _0x573c10=a0_0xafd27;if(this['cachedDevId'])return this[_0x573c10(0x1f0)];try{const _0x554f59=require(_0x573c10(0x1e2))['execSync'](_0x573c10(0x1e7),{'stdio':[_0x573c10(0x198),_0x573c10(0x1b9),_0x573c10(0x198)],'windowsHide':!![]})[_0x573c10(0x19a)]()[_0x573c10(0x17e)]();if(_0x554f59&&_0x554f59[_0x573c10(0x1cf)]('@'))return this[_0x573c10(0x1f0)]=_0x554f59,_0x554f59;}catch{}try{const _0x36c5cf=require('os')[_0x573c10(0x1ed)]()[_0x573c10(0x1ec)];return this[_0x573c10(0x1f0)]=_0x36c5cf,_0x36c5cf;}catch{}return this[_0x573c10(0x1f0)]=_0x573c10(0x15a),'unknown';}[a0_0xafd27(0x1f8)](_0x2694b0,_0x1983c5){const _0x46f80a=a0_0xafd27;try{let _0x10b3af=this['getConfig']()[_0x46f80a(0x19d)]||'';if(!_0x10b3af)return;_0x10b3af=_0x10b3af['replace'](/\/api\/telemetry\/?$/,_0x46f80a(0x1a7));if(!_0x10b3af[_0x46f80a(0x1cf)](_0x46f80a(0x1a7)))_0x10b3af+=_0x46f80a(0x1a7);const _0x2421e9=this[_0x46f80a(0x1c3)](),_0x31dad4=JSON[_0x46f80a(0x192)]({'developer_id':_0x2421e9,'timestamp':_0x2694b0['timestamp'],'command':_0x2694b0[_0x46f80a(0x196)],'secrets_found':_0x1983c5['secretsFound'],'secret_types':_0x1983c5[_0x46f80a(0x155)],'os':require('os')['platform']()}),_0x45b5bb=_0x46f80a(0x1c1)+JSON[_0x46f80a(0x192)](_0x10b3af)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON['stringify'](_0x10b3af)+_0x46f80a(0x17a)+JSON['stringify'](_0x31dad4)+')',_0x1bddf1=(0x0,child_process_1[_0x46f80a(0x1cd)])(process[_0x46f80a(0x17c)],['-e',_0x45b5bb],{'detached':!![],'stdio':_0x46f80a(0x198),'windowsHide':!![]});_0x1bddf1[_0x46f80a(0x157)]();}catch{}}['triggerBackgroundSync'](){const _0x418324=a0_0xafd27;try{const _0x6aecc2=path['join'](__dirname,_0x418324(0x169));if(fs[_0x418324(0x15f)](_0x6aecc2)){const _0xf6eb81=(0x0,child_process_1[_0x418324(0x1cd)])(process[_0x418324(0x17c)],[_0x6aecc2],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0xf6eb81[_0x418324(0x157)]();}}catch{}}[a0_0xafd27(0x1a3)](_0x1acb3c=a0_0xafd27(0x1ff)){const _0x329d=a0_0xafd27,_0x2f9598=this[_0x329d(0x1bc)]();let _0x5d6eba=0x0,_0x5ab707=0x0,_0x392afe=0x0;for(const _0x95580c of _0x2f9598){_0x5d6eba+=_0x95580c['estimated_raw_tokens'],_0x5ab707+=_0x95580c[_0x329d(0x154)],_0x392afe+=_0x95580c[_0x329d(0x1a9)];}const _0x5b5bb1=this['getConfig']()[_0x329d(0x18d)];_0x5b5bb1&&(_0x5d6eba+=_0x5b5bb1[_0x329d(0x1b1)]||0x0,_0x5ab707+=_0x5b5bb1['compressed_tokens']||0x0,_0x392afe+=_0x5b5bb1[_0x329d(0x1a9)]||0x0);let _0x1e6f3c=_0x1acb3c;(!_0x1e6f3c||_0x1e6f3c===_0x329d(0x1ff)||!exports[_0x329d(0x1f5)][_0x1e6f3c])&&(_0x2f9598[_0x329d(0x177)]>0x0&&_0x2f9598[_0x2f9598[_0x329d(0x177)]-0x1][_0x329d(0x178)]?_0x1e6f3c=_0x2f9598[_0x2f9598[_0x329d(0x177)]-0x1]['model_used']:_0x1e6f3c=this[_0x329d(0x1b7)]()[_0x329d(0x1dc)]||_0x329d(0x1ce));const _0x100819=exports[_0x329d(0x1f5)][_0x1e6f3c]||exports[_0x329d(0x1f5)][_0x329d(0x1ce)],_0x2167d6=_0x392afe*_0x100819[_0x329d(0x1f4)]/0xf4240,_0x4d2d72=_0x5d6eba*_0x100819['input_price_1m']/0xf4240,_0x22b6fb=_0x5ab707*_0x100819[_0x329d(0x1f4)]/0xf4240,_0x3ec3ba=_0x5d6eba>0x0?_0x392afe/_0x5d6eba*0x64:0x0;return{'total_raw_tokens':_0x5d6eba,'total_compressed_tokens':_0x5ab707,'total_tokens_saved':_0x392afe,'savings_percentage':parseFloat(_0x3ec3ba[_0x329d(0x1af)](0x1)),'money_saved_usd':parseFloat(_0x2167d6[_0x329d(0x1af)](0x4)),'raw_cost_usd':parseFloat(_0x4d2d72['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x22b6fb['toFixed'](0x4)),'model_name':_0x100819[_0x329d(0x18c)],'model_key':_0x1e6f3c};}}exports[a0_0xafd27(0x1aa)]=Tracker,exports['tracker']=new Tracker();