trimprompt 1.0.40 → 1.0.42

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_0x573426=a0_0x5ecc;(function(_0x591b53,_0x49708a){const _0x2b3034=a0_0x5ecc,_0x9a0448=_0x591b53();while(!![]){try{const _0x1f169a=-parseInt(_0x2b3034(0xec))/0x1*(parseInt(_0x2b3034(0x159))/0x2)+parseInt(_0x2b3034(0x12d))/0x3*(parseInt(_0x2b3034(0x137))/0x4)+-parseInt(_0x2b3034(0x11d))/0x5+-parseInt(_0x2b3034(0x14b))/0x6*(-parseInt(_0x2b3034(0xbf))/0x7)+-parseInt(_0x2b3034(0xdb))/0x8*(parseInt(_0x2b3034(0x11b))/0x9)+-parseInt(_0x2b3034(0xf2))/0xa+parseInt(_0x2b3034(0xed))/0xb;if(_0x1f169a===_0x49708a)break;else _0x9a0448['push'](_0x9a0448['shift']());}catch(_0x38d542){_0x9a0448['push'](_0x9a0448['shift']());}}}(a0_0x2473,0xb7418));var __createBinding=this&&this[a0_0x573426(0x124)]||(Object[a0_0x573426(0xc5)]?function(_0xe80db2,_0x1c14c1,_0x43e9f2,_0x45db3d){const _0x460e2e=a0_0x573426;if(_0x45db3d===undefined)_0x45db3d=_0x43e9f2;var _0x3fbc7c=Object[_0x460e2e(0xce)](_0x1c14c1,_0x43e9f2);(!_0x3fbc7c||(_0x460e2e(0x11c)in _0x3fbc7c?!_0x1c14c1[_0x460e2e(0x143)]:_0x3fbc7c[_0x460e2e(0x15f)]||_0x3fbc7c[_0x460e2e(0x17a)]))&&(_0x3fbc7c={'enumerable':!![],'get':function(){return _0x1c14c1[_0x43e9f2];}}),Object[_0x460e2e(0x171)](_0xe80db2,_0x45db3d,_0x3fbc7c);}:function(_0x40f0a9,_0x41659b,_0x352052,_0x3d36db){if(_0x3d36db===undefined)_0x3d36db=_0x352052;_0x40f0a9[_0x3d36db]=_0x41659b[_0x352052];}),__setModuleDefault=this&&this[a0_0x573426(0x179)]||(Object[a0_0x573426(0xc5)]?function(_0x1ad9b3,_0x4c3bc3){const _0x235813=a0_0x573426;Object[_0x235813(0x171)](_0x1ad9b3,_0x235813(0x160),{'enumerable':!![],'value':_0x4c3bc3});}:function(_0x3cdad2,_0x2c244f){_0x3cdad2['default']=_0x2c244f;}),__importStar=this&&this[a0_0x573426(0xf8)]||(function(){var _0x28e68c=function(_0x34ed02){return _0x28e68c=Object['getOwnPropertyNames']||function(_0x1cb160){const _0x512c75=a0_0x5ecc;var _0x298758=[];for(var _0x4a2045 in _0x1cb160)if(Object[_0x512c75(0xf3)][_0x512c75(0x13b)][_0x512c75(0xde)](_0x1cb160,_0x4a2045))_0x298758[_0x298758[_0x512c75(0x16d)]]=_0x4a2045;return _0x298758;},_0x28e68c(_0x34ed02);};return function(_0x236646){const _0x3decd3=a0_0x5ecc;if(_0x236646&&_0x236646[_0x3decd3(0x143)])return _0x236646;var _0x299308={};if(_0x236646!=null){for(var _0x35240f=_0x28e68c(_0x236646),_0x30cd55=0x0;_0x30cd55<_0x35240f[_0x3decd3(0x16d)];_0x30cd55++)if(_0x35240f[_0x30cd55]!==_0x3decd3(0x160))__createBinding(_0x299308,_0x236646,_0x35240f[_0x30cd55]);}return __setModuleDefault(_0x299308,_0x236646),_0x299308;};}());function a0_0x5ecc(_0x3cd578,_0x28b660){const _0x2473be=a0_0x2473();return a0_0x5ecc=function(_0x5ecc69,_0x3ecaa6){_0x5ecc69=_0x5ecc69-0xbf;let _0x5a94c2=_0x2473be[_0x5ecc69];return _0x5a94c2;},a0_0x5ecc(_0x3cd578,_0x28b660);}function a0_0x2473(){const _0x36f2d3=['renameSync','ignore','auto','__esModule','replace','setConfig','baseDir','OpenAI\x20o3-mini','Claude\x20Opus\x204.7','ANTIGRAVITY_AGENT','slice','2120208dfMvUu','aider','CLAUDE_EFFORT','claude-sonnet-4-5','has','sync.js','toFixed','o3-mini','unknown','pruneLogsPerTool','antigravity','stringify','parse','saveLogs','2962hrOcLX','max','Cursor\x20Small','toISOString','raw_tokens','substring','writable','default','devin','redact','1.0','pipe','readFileSync','toLowerCase','high','REPL_ID','command','cachedDevId','startsWith','GPT-5.4\x20Nano','length','OpenAI\x20o1-mini','split','spawn','defineProperty','GPT-4o\x20Mini','o3mini','toUpperCase','unref','saveConfig','tracker','configPath','__setModuleDefault','configurable','21XOmYYu','COPILOT_GITHUB_TOKEN','homedir','name','opus','.raw.txt','create','gemini','logsDir','values','./redactor','continue','claude-3-5-sonnet','statSync','claude-opus-4-8','getOwnPropertyDescriptor','GPT-4.1\x20Mini','getStatsSummary','trim','GEMINI_CLI','set','platform','statsPath','git\x20config\x20user.email','codex','model','add','const\x20h=require(require(\x27url\x27).parse(','29864lYbzBO','path','CLAUDE_CODE','call','utf8','getConfig','writeFileSync','compressed_tokens','model_used','GPT-4o','input_price_1m','Claude\x20Opus\x204.1\x20(deprecated)','Tracker','tool','init','CLAUDECODE','Claude\x203.5\x20Sonnet','323kkWjgv','12529649rFNPGd','Gemini\x203.1\x20Flash-Lite','gemini-3-5-flash','join','claude_code','3211860JpgQkJ','prototype','logs','child_process','cursor','getLogs','__importStar','tokens_saved','secretsFound','triggerBackgroundSync','CURSOR_AGENT','VSCODE_PID','charAt','claude','push','activeSavedTokens','AI_AGENT','ceil','Claude\x20Opus\x204.5',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','Claude\x20Fable\x205','Gemini\x203.5\x20Flash','includes','config','/api/security/alert','claude-sonnet-4-6','mkdirSync','COPILOT_MODEL',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','execSync','./file-watcher','unlinkSync','toString','fullPath','lifetime_savings','env','copilot','GPT-5.5','Claude\x20Sonnet\x204.6','\x20Compaction','AIDER_MODEL','2412TweBoL','get','4055395CTtxXV','config.json','detectSessionTool','execPath','compact:','GPT-4.1\x20Nano','getDevIdentity','__createBinding','TRIMPROMPT_MODEL','telemetry_url','Claude\x20Mythos\x205','gemini-3-1-pro','filter','.tmp','random','TRIMPROMPT_TELEMETRY_URL','19929YDUpmw','OpenAI\x20o1','PATH','GPT-5.4\x20Mini','secretTypes','modelShort','Claude\x20Opus\x204.8','GPT-5.4','pop','sonnet','700CyuVpE','Claude\x20Sonnet\x204.5','estimated_compressed_tokens','sendSecurityAlert','hasOwnProperty','.comp.txt','existsSync','replit','PRICING'];a0_0x2473=function(){return _0x36f2d3;};return a0_0x2473();}Object[a0_0x573426(0x171)](exports,'__esModule',{'value':!![]}),exports[a0_0x573426(0x177)]=exports[a0_0x573426(0xe7)]=exports[a0_0x573426(0x13f)]=void 0x0,exports[a0_0x573426(0x11f)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x573426(0xdc))),os=__importStar(require('os')),child_process_1=require(a0_0x573426(0xf5));exports['PRICING']={'claude-fable-5':{'name':a0_0x573426(0x106),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x573426(0x127),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x573426(0x133),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x573426(0x148),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x573426(0x104),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x573426(0xe6),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x573426(0x118),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x573426(0x138),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x573426(0xeb),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x573426(0x117),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x573426(0x134),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x573426(0xe4),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x573426(0x130),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x573426(0x16c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x573426(0xcf),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x573426(0x122),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x573426(0x172),'input_price_1m':0.15},'o1':{'name':a0_0x573426(0x12e),'input_price_1m':0xf},'o1-mini':{'name':a0_0x573426(0x16e),'input_price_1m':0x3},'o3-mini':{'name':a0_0x573426(0x147),'input_price_1m':1.1},'cursor-small':{'name':a0_0x573426(0x15b),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x573426(0x107),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x573426(0xee),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}};function detectSessionTool(){const _0xb74f77=a0_0x573426,_0xfdcbbc=process[_0xb74f77(0x115)],_0x327400={'tool':'','model':_0xb74f77(0x10b),'modelShort':''};if(_0xfdcbbc['TRIMPROMPT_MODEL']&&exports['PRICING'][_0xfdcbbc['TRIMPROMPT_MODEL']])return{'tool':'','model':_0xfdcbbc[_0xb74f77(0x125)],'modelShort':''};const _0x13645b=(_0xfdcbbc[_0xb74f77(0x102)]||'')[_0xb74f77(0x166)]();if(_0x13645b){if(_0x13645b['includes']('claude-code')||_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xf1))){const _0x39e016=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xc3):_0xb74f77(0x136),_0x200f0f=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xcd):_0xb74f77(0x10b);return{'tool':'claude','model':_0x200f0f,'modelShort':_0x39e016};}if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xf6)))return{'tool':_0xb74f77(0xf6),'model':_0xb74f77(0x10b),'modelShort':'sonnet'};if(_0x13645b[_0xb74f77(0x108)]('github-copilot')||_0x13645b[_0xb74f77(0x108)](_0xb74f77(0x116))){const _0x26ebc4=_0xfdcbbc['COPILOT_MODEL']||'';if(_0x26ebc4&&exports[_0xb74f77(0x13f)][_0x26ebc4])return{'tool':'copilot','model':_0x26ebc4,'modelShort':_0x26ebc4[_0xb74f77(0x16f)]('-')[_0xb74f77(0x135)]()||''};return{'tool':_0xb74f77(0x116),'model':_0xb74f77(0x14e),'modelShort':'sonnet'};}if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xc6)))return{'tool':_0xb74f77(0xc6),'model':_0xb74f77(0xef),'modelShort':'flash'};if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xd7)))return{'tool':_0xb74f77(0xd7),'model':_0xb74f77(0x152),'modelShort':_0xb74f77(0x173)};if(_0x13645b[_0xb74f77(0x108)]('devin'))return{'tool':_0xb74f77(0x161),'model':_0xb74f77(0x10b),'modelShort':''};if(_0x13645b[_0xb74f77(0x108)]('antigravity'))return{'tool':_0xb74f77(0x155),'model':_0xb74f77(0x128),'modelShort':_0xb74f77(0xc6)};if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0x13e))||_0xfdcbbc[_0xb74f77(0x168)])return{'tool':'replit','model':_0xb74f77(0x10b),'modelShort':''};return{'tool':_0x13645b[_0xb74f77(0x16f)]('_')[0x0][_0xb74f77(0x16f)]('-')[0x0],'model':_0xb74f77(0x10b),'modelShort':''};}if(_0xfdcbbc[_0xb74f77(0xea)]==='1'||_0xfdcbbc[_0xb74f77(0xdd)]==='1'){const _0x17f64d=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xc3):_0xb74f77(0x136),_0x4a4e9b=_0xfdcbbc[_0xb74f77(0x14d)]==='high'?'claude-opus-4-8':_0xb74f77(0x10b);return{'tool':'claude','model':_0x4a4e9b,'modelShort':_0x17f64d};}if(_0xfdcbbc[_0xb74f77(0xfc)]==='1')return{'tool':_0xb74f77(0xf6),'model':_0xb74f77(0x10b),'modelShort':'sonnet'};if(_0xfdcbbc[_0xb74f77(0xd2)]==='1')return{'tool':_0xb74f77(0xc6),'model':_0xb74f77(0xef),'modelShort':'flash'};if(_0xfdcbbc[_0xb74f77(0x10d)]||_0xfdcbbc[_0xb74f77(0xc0)]){const _0x2a88f2=_0xfdcbbc['COPILOT_MODEL']||'';if(_0x2a88f2&&exports[_0xb74f77(0x13f)][_0x2a88f2])return{'tool':_0xb74f77(0x116),'model':_0x2a88f2,'modelShort':_0x2a88f2[_0xb74f77(0x16f)]('-')[_0xb74f77(0x135)]()||''};return{'tool':_0xb74f77(0x116),'model':_0xb74f77(0x14e),'modelShort':_0xb74f77(0x136)};}if(_0xfdcbbc[_0xb74f77(0x168)]||_0xfdcbbc['REPLIT_ENVIRONMENT'])return{'tool':_0xb74f77(0x13e),'model':'claude-sonnet-4-6','modelShort':''};if(_0xfdcbbc['CLINE_DATA_DIR'])return{'tool':'cline','model':_0xb74f77(0x10b),'modelShort':''};if(_0xfdcbbc['CONTINUE_GLOBAL_DIR'])return{'tool':_0xb74f77(0xca),'model':_0xb74f77(0x10b),'modelShort':''};if(_0xfdcbbc[_0xb74f77(0x149)]==='1')return{'tool':_0xb74f77(0x155),'model':_0xb74f77(0x128),'modelShort':_0xb74f77(0xc6)};if(_0xfdcbbc[_0xb74f77(0x14d)]){const _0x4b1bd9=_0xfdcbbc[_0xb74f77(0x14d)]==='high'?_0xb74f77(0xc3):'sonnet',_0x36f7f4=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xcd):_0xb74f77(0x10b);return{'tool':'','model':_0x36f7f4,'modelShort':''};}if(_0xfdcbbc[_0xb74f77(0x11a)]&&exports['PRICING'][_0xfdcbbc['AIDER_MODEL']])return{'tool':_0xb74f77(0x14c),'model':_0xfdcbbc[_0xb74f77(0x11a)],'modelShort':''};if(_0xfdcbbc[_0xb74f77(0xfd)]){const _0x14201a=(_0xfdcbbc[_0xb74f77(0x12f)]||'')[_0xb74f77(0x166)]();if(_0x14201a['includes']('cursor'))return{'tool':'cursor','model':_0xb74f77(0x10b),'modelShort':_0xb74f77(0x136)};if(_0x14201a[_0xb74f77(0x108)]('windsurf'))return{'tool':'windsurf','model':_0xb74f77(0x10b),'modelShort':_0xb74f77(0x136)};}const _0x137652=process[_0xb74f77(0x115)][_0xb74f77(0x125)]||'';if(_0x137652&&exports['PRICING'][_0x137652])return{'tool':'','model':_0x137652,'modelShort':''};return _0x327400;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{['baseDir'];[a0_0x573426(0x178)];[a0_0x573426(0xd5)];[a0_0x573426(0xc7)];['config'];constructor(){const _0x36b5b3=a0_0x573426;this[_0x36b5b3(0x146)]=path[_0x36b5b3(0xf0)](os[_0x36b5b3(0xc1)](),'.trimprompt'),this[_0x36b5b3(0x178)]=path[_0x36b5b3(0xf0)](this['baseDir'],_0x36b5b3(0x11e)),this['statsPath']=path[_0x36b5b3(0xf0)](this['baseDir'],'stats.json'),this[_0x36b5b3(0xc7)]=path[_0x36b5b3(0xf0)](this[_0x36b5b3(0x146)],_0x36b5b3(0xf4)),this[_0x36b5b3(0xe9)]();}['init'](){const _0x51364f=a0_0x573426;!fs[_0x51364f(0x13d)](this[_0x51364f(0x146)])&&fs[_0x51364f(0x10c)](this[_0x51364f(0x146)],{'recursive':!![]});!fs[_0x51364f(0x13d)](this[_0x51364f(0xc7)])&&fs['mkdirSync'](this[_0x51364f(0xc7)],{'recursive':!![]});const _0x520b1b={'version':_0x51364f(0x163),'telemetry_url':process[_0x51364f(0x115)][_0x51364f(0x12c)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x51364f(0xcd)};if(fs[_0x51364f(0x13d)](this['configPath']))try{const _0x164524=fs[_0x51364f(0x165)](this['configPath'],_0x51364f(0xdf));this[_0x51364f(0x109)]={..._0x520b1b,...JSON[_0x51364f(0x157)](_0x164524)};}catch(_0x3abc0b){this['config']=_0x520b1b;}else this['config']=_0x520b1b,this[_0x51364f(0x176)]();!fs[_0x51364f(0x13d)](this[_0x51364f(0xd5)])&&fs[_0x51364f(0xe1)](this[_0x51364f(0xd5)],JSON[_0x51364f(0x156)]([]),_0x51364f(0xdf));}[a0_0x573426(0xe0)](){const _0xec8821=a0_0x573426;return process[_0xec8821(0x115)][_0xec8821(0x12c)]&&(this[_0xec8821(0x109)][_0xec8821(0x126)]=process[_0xec8821(0x115)][_0xec8821(0x12c)]),this[_0xec8821(0x109)];}[a0_0x573426(0x145)](_0x55e4a5,_0x4c5df6){const _0x51c447=a0_0x573426;this['config'][_0x55e4a5]=_0x4c5df6,this[_0x51c447(0x176)]();}['saveConfig'](){const _0x50b053=a0_0x573426;fs[_0x50b053(0xe1)](this[_0x50b053(0x178)],JSON[_0x50b053(0x156)](this[_0x50b053(0x109)],null,0x2),_0x50b053(0xdf));}[a0_0x573426(0xf7)](){const _0x5751ae=a0_0x573426;try{if(!fs[_0x5751ae(0x13d)](this[_0x5751ae(0xd5)]))return globalLogsMemoryCache;const _0x334d2f=fs[_0x5751ae(0xcc)](this[_0x5751ae(0xd5)])['mtimeMs'];if(_0x334d2f===globalLogsCacheMtime&&globalLogsMemoryCache['length']>0x0)return globalLogsMemoryCache;const _0x2e9690=fs['readFileSync'](this['statsPath'],'utf8'),_0x16882c=JSON[_0x5751ae(0x157)](_0x2e9690);if(Array['isArray'](_0x16882c))return globalLogsMemoryCache=_0x16882c,globalLogsCacheMtime=_0x334d2f,_0x16882c;}catch{}return globalLogsMemoryCache;}[a0_0x573426(0x158)](_0x368d0a){const _0x19320c=a0_0x573426;globalLogsMemoryCache=_0x368d0a;const _0x15f87e=this[_0x19320c(0xd5)]+_0x19320c(0x12a);try{fs[_0x19320c(0xe1)](_0x15f87e,JSON[_0x19320c(0x156)](_0x368d0a,null,0x2),'utf8'),fs[_0x19320c(0x140)](_0x15f87e,this[_0x19320c(0xd5)]);}catch{try{fs['writeFileSync'](this[_0x19320c(0xd5)],JSON[_0x19320c(0x156)](_0x368d0a,null,0x2),_0x19320c(0xdf));}catch{}}}[a0_0x573426(0x154)](_0x5e7648){const _0x2026dc=a0_0x573426,_0x52d843=new Map();for(const _0xa367a1 of _0x5e7648){const _0x3fb5d0=_0xa367a1[_0x2026dc(0xe8)]&&_0xa367a1[_0x2026dc(0xe8)][_0x2026dc(0xd1)]()||_0xa367a1[_0x2026dc(0xe3)]||'other';let _0x2520e1=_0x52d843['get'](_0x3fb5d0);!_0x2520e1&&(_0x2520e1=[],_0x52d843[_0x2026dc(0xd3)](_0x3fb5d0,_0x2520e1)),_0x2520e1[_0x2026dc(0x100)](_0xa367a1);}const _0x501ad6=new Set();for(const _0x4fd6c5 of _0x52d843[_0x2026dc(0xc8)]()){const _0x23d5ab=_0x4fd6c5[_0x2026dc(0x16d)]-MAX_LOGS_PER_TOOL;for(let _0x30f470=0x0;_0x30f470<_0x23d5ab;_0x30f470++)_0x501ad6[_0x2026dc(0xd9)](_0x4fd6c5[_0x30f470]['id']);}if(_0x501ad6['size']===0x0)return _0x5e7648;let _0x21bcd5={};try{_0x21bcd5=JSON[_0x2026dc(0x157)](fs[_0x2026dc(0x165)](this[_0x2026dc(0x178)],'utf8'))||{};}catch{}const _0x44e5b5=_0x21bcd5[_0x2026dc(0x114)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x1171a3 of _0x5e7648){if(!_0x501ad6[_0x2026dc(0x14f)](_0x1171a3['id']))continue;_0x44e5b5['raw_tokens']+=_0x1171a3['estimated_raw_tokens']||0x0,_0x44e5b5['compressed_tokens']+=_0x1171a3[_0x2026dc(0x139)]||0x0,_0x44e5b5['tokens_saved']+=_0x1171a3[_0x2026dc(0xf9)]||0x0;}_0x21bcd5[_0x2026dc(0x114)]=_0x44e5b5,this[_0x2026dc(0x109)]={...this[_0x2026dc(0x109)],..._0x21bcd5};try{this[_0x2026dc(0x176)]();}catch{}for(const _0x48a0b4 of _0x501ad6){try{fs[_0x2026dc(0x111)](path[_0x2026dc(0xf0)](this[_0x2026dc(0xc7)],_0x48a0b4+_0x2026dc(0xc4)));}catch{}try{fs[_0x2026dc(0x111)](path['join'](this[_0x2026dc(0xc7)],_0x48a0b4+_0x2026dc(0x13c)));}catch{}}return _0x5e7648[_0x2026dc(0x129)](_0x4e81bb=>!_0x501ad6[_0x2026dc(0x14f)](_0x4e81bb['id']));}['logExecution'](_0x4e0311,_0x4c0018,_0x35739a,_0xdc0a0f,_0x48a83b,_0x1ba9fb){const _0x70eff7=a0_0x573426,_0x3fcd40=this[_0x70eff7(0xf7)](),_0x5ab0bf=_0x4c0018[_0x70eff7(0x16d)],_0x472982=_0x35739a[_0x70eff7(0x16d)],_0x306a59=detectSessionTool(),_0x327454=_0x306a59[_0x70eff7(0xd8)],_0x50248f=_0x306a59[_0x70eff7(0xe8)]===_0x70eff7(0x155)?_0x70eff7(0xc6):_0x306a59[_0x70eff7(0xe8)];let _0xb4a56e=0x0;if(_0x50248f&&!_0x4e0311['startsWith'](_0x70eff7(0x121)))try{const {getLatestSessionFile:_0xab1c9f,loadSessionsState:_0x2ebfb5}=require(_0x70eff7(0x110)),_0x2de64f=_0xab1c9f(_0x50248f);if(_0x2de64f&&_0x2de64f['fullPath']){const _0x4ef7fb=_0x2ebfb5();_0x4ef7fb[_0x2de64f[_0x70eff7(0x113)]]&&(_0xb4a56e=_0x4ef7fb[_0x2de64f['fullPath']][_0x70eff7(0x101)]||0x0);}}catch{}const _0x5ba54f=Math[_0x70eff7(0x103)](_0x5ab0bf/0x4)+_0xb4a56e,_0x2464a5=Math[_0x70eff7(0x103)](_0x472982/0x4),_0x34ab13=Math[_0x70eff7(0x15a)](0x0,_0x5ba54f-_0x2464a5),_0x5791a4=Math[_0x70eff7(0x12b)]()[_0x70eff7(0x112)](0x24)[_0x70eff7(0x15e)](0x2,0xb);try{const {redactor:_0x51cdf2}=require(_0x70eff7(0xc9)),_0x5a5669=_0x51cdf2?_0x51cdf2[_0x70eff7(0x162)](_0x4c0018):_0x4c0018;fs[_0x70eff7(0xe1)](path[_0x70eff7(0xf0)](this[_0x70eff7(0xc7)],_0x5791a4+'.raw.txt'),_0x5a5669,'utf8'),fs[_0x70eff7(0xe1)](path[_0x70eff7(0xf0)](this[_0x70eff7(0xc7)],_0x5791a4+_0x70eff7(0x13c)),_0x35739a,'utf8');}catch{}let _0x4f616a=_0x4e0311;if(_0x4e0311[_0x70eff7(0x16b)](_0x70eff7(0x121))){const _0x19fee9=_0x4e0311[_0x70eff7(0x16f)](':')[0x1]||_0x70eff7(0xff),_0x5c985b=_0x19fee9[_0x70eff7(0xfe)](0x0)['toUpperCase']()+_0x19fee9[_0x70eff7(0x14a)](0x1);_0x4f616a=_0x5c985b+_0x70eff7(0x119);}else{if(_0x4e0311[_0x70eff7(0x16b)]('conv:')){const _0x557538=_0x4e0311[_0x70eff7(0x16f)]('\x20'),_0x522599=_0x557538[0x0][_0x70eff7(0x16f)](':')[0x1]||_0x70eff7(0xff),_0x219914=_0x522599[_0x70eff7(0xfe)](0x0)[_0x70eff7(0x174)]()+_0x522599[_0x70eff7(0x14a)](0x1),_0x45a6d2=_0x557538[_0x70eff7(0x14a)](0x1)['join']('\x20');_0x4f616a=_0x219914+'\x20Chat\x20'+_0x45a6d2;}else{const _0x507f7a=_0x4e0311[_0x70eff7(0x16f)]('\x20')[0x0]||_0x70eff7(0x153);_0x4f616a=_0x306a59[_0x70eff7(0xe8)]?_0x306a59['modelShort']?_0x306a59[_0x70eff7(0xe8)]+'-'+_0x306a59[_0x70eff7(0x132)]+'-'+_0x507f7a:_0x306a59[_0x70eff7(0xe8)]+'-'+_0x507f7a:_0x507f7a;}}const _0x6ed717={'id':_0x5791a4,'timestamp':new Date()[_0x70eff7(0x15c)](),'command':_0x4f616a,'raw_chars':_0x5ab0bf,'compressed_chars':_0x472982,'estimated_raw_tokens':_0x5ba54f,'estimated_compressed_tokens':_0x2464a5,'tokens_saved':_0x34ab13,'model_used':_0x327454,'tool':_0x50248f||_0x306a59['tool']||'','exit_code':_0xdc0a0f,'synced':![],'ai_detected':!!_0x306a59[_0x70eff7(0xe8)],'secrets_found':_0x48a83b?.[_0x70eff7(0xfa)]||0x0,'secret_types':_0x48a83b?.['secretTypes']||[],'features':_0x1ba9fb||[]};_0x3fcd40[_0x70eff7(0x100)](_0x6ed717),this[_0x70eff7(0x158)](this[_0x70eff7(0x154)](_0x3fcd40));const _0x244f68=this[_0x70eff7(0xe0)]()[_0x70eff7(0x126)];return _0x244f68&&_0x244f68[_0x70eff7(0xd1)]()[_0x70eff7(0x16d)]>0x0&&this['triggerBackgroundSync'](),_0x48a83b&&_0x48a83b[_0x70eff7(0xfa)]>0x0&&this['sendSecurityAlert'](_0x6ed717,_0x48a83b),_0x6ed717;}[a0_0x573426(0x16a)]=null;[a0_0x573426(0x123)](){const _0x20252d=a0_0x573426;if(this[_0x20252d(0x16a)])return this['cachedDevId'];try{const _0x5d3aab=require(_0x20252d(0xf5))[_0x20252d(0x10f)](_0x20252d(0xd6),{'stdio':[_0x20252d(0x141),_0x20252d(0x164),_0x20252d(0x141)],'windowsHide':!![]})[_0x20252d(0x112)]()['trim']();if(_0x5d3aab&&_0x5d3aab[_0x20252d(0x108)]('@'))return this[_0x20252d(0x16a)]=_0x5d3aab,_0x5d3aab;}catch{}try{const _0x554ae4=require('os')['userInfo']()['username'];return this[_0x20252d(0x16a)]=_0x554ae4,_0x554ae4;}catch{}return this[_0x20252d(0x16a)]=_0x20252d(0x153),'unknown';}[a0_0x573426(0x13a)](_0x50391,_0x333aac){const _0x3570cd=a0_0x573426;try{let _0x509ccc=this[_0x3570cd(0xe0)]()[_0x3570cd(0x126)]||'';if(!_0x509ccc)return;_0x509ccc=_0x509ccc[_0x3570cd(0x144)](/\/api\/telemetry\/?$/,_0x3570cd(0x10a));if(!_0x509ccc[_0x3570cd(0x108)](_0x3570cd(0x10a)))_0x509ccc+=_0x3570cd(0x10a);const _0x464ec9=this[_0x3570cd(0x123)](),_0x138091=JSON[_0x3570cd(0x156)]({'developer_id':_0x464ec9,'timestamp':_0x50391['timestamp'],'command':_0x50391[_0x3570cd(0x169)],'secrets_found':_0x333aac[_0x3570cd(0xfa)],'secret_types':_0x333aac[_0x3570cd(0x131)],'os':require('os')[_0x3570cd(0xd4)]()}),_0xb22f84=_0x3570cd(0xda)+JSON[_0x3570cd(0x156)](_0x509ccc)+_0x3570cd(0x105)+JSON['stringify'](_0x509ccc)+_0x3570cd(0x10e)+JSON[_0x3570cd(0x156)](_0x138091)+')',_0x41685f=(0x0,child_process_1[_0x3570cd(0x170)])(process[_0x3570cd(0x120)],['-e',_0xb22f84],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x41685f[_0x3570cd(0x175)]();}catch{}}[a0_0x573426(0xfb)](){const _0x1fb2dc=a0_0x573426;try{const _0x365a4d=path[_0x1fb2dc(0xf0)](__dirname,_0x1fb2dc(0x150));if(fs[_0x1fb2dc(0x13d)](_0x365a4d)){const _0x58ac68=(0x0,child_process_1['spawn'])(process[_0x1fb2dc(0x120)],[_0x365a4d],{'detached':!![],'stdio':_0x1fb2dc(0x141),'windowsHide':!![]});_0x58ac68[_0x1fb2dc(0x175)]();}}catch{}}[a0_0x573426(0xd0)](_0x289b36='auto'){const _0x2ee246=a0_0x573426,_0x11fdee=this['getLogs']();let _0x3fc514=0x0,_0x645616=0x0,_0x3c8de2=0x0;for(const _0xbfa897 of _0x11fdee){_0x3fc514+=_0xbfa897['estimated_raw_tokens'],_0x645616+=_0xbfa897[_0x2ee246(0x139)],_0x3c8de2+=_0xbfa897['tokens_saved'];}const _0x366579=this[_0x2ee246(0xe0)]()[_0x2ee246(0x114)];_0x366579&&(_0x3fc514+=_0x366579[_0x2ee246(0x15d)]||0x0,_0x645616+=_0x366579[_0x2ee246(0xe2)]||0x0,_0x3c8de2+=_0x366579[_0x2ee246(0xf9)]||0x0);let _0x2e348a=_0x289b36;(!_0x2e348a||_0x2e348a===_0x2ee246(0x142)||!exports[_0x2ee246(0x13f)][_0x2e348a])&&(_0x11fdee['length']>0x0&&_0x11fdee[_0x11fdee['length']-0x1][_0x2ee246(0xe3)]?_0x2e348a=_0x11fdee[_0x11fdee[_0x2ee246(0x16d)]-0x1][_0x2ee246(0xe3)]:_0x2e348a=this[_0x2ee246(0xe0)]()['default_model']||'claude-3-5-sonnet');const _0x6e12=exports[_0x2ee246(0x13f)][_0x2e348a]||exports['PRICING'][_0x2ee246(0xcb)],_0x1afad0=_0x3c8de2*_0x6e12[_0x2ee246(0xe5)]/0xf4240,_0x223c50=_0x3fc514*_0x6e12[_0x2ee246(0xe5)]/0xf4240,_0x15718f=_0x645616*_0x6e12[_0x2ee246(0xe5)]/0xf4240,_0x468553=_0x3fc514>0x0?_0x3c8de2/_0x3fc514*0x64:0x0;return{'total_raw_tokens':_0x3fc514,'total_compressed_tokens':_0x645616,'total_tokens_saved':_0x3c8de2,'savings_percentage':parseFloat(_0x468553[_0x2ee246(0x151)](0x1)),'money_saved_usd':parseFloat(_0x1afad0[_0x2ee246(0x151)](0x4)),'raw_cost_usd':parseFloat(_0x223c50['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x15718f[_0x2ee246(0x151)](0x4)),'model_name':_0x6e12[_0x2ee246(0xc2)],'model_key':_0x2e348a};}}exports[a0_0x573426(0xe7)]=Tracker,exports['tracker']=new Tracker();
1
+ 'use strict';const a0_0x3c2753=a0_0x3053;(function(_0x528eea,_0xf05e4c){const _0x9bb51c=a0_0x3053,_0x242969=_0x528eea();while(!![]){try{const _0x324fb5=-parseInt(_0x9bb51c(0x161))/0x1+parseInt(_0x9bb51c(0x191))/0x2*(-parseInt(_0x9bb51c(0x140))/0x3)+-parseInt(_0x9bb51c(0x1a1))/0x4+parseInt(_0x9bb51c(0x14b))/0x5*(-parseInt(_0x9bb51c(0x114))/0x6)+-parseInt(_0x9bb51c(0x1a3))/0x7*(parseInt(_0x9bb51c(0x133))/0x8)+parseInt(_0x9bb51c(0x14d))/0x9*(parseInt(_0x9bb51c(0x190))/0xa)+-parseInt(_0x9bb51c(0x1b6))/0xb*(-parseInt(_0x9bb51c(0x15c))/0xc);if(_0x324fb5===_0xf05e4c)break;else _0x242969['push'](_0x242969['shift']());}catch(_0x1cf74b){_0x242969['push'](_0x242969['shift']());}}}(a0_0x119f,0xe621e));var __createBinding=this&&this['__createBinding']||(Object[a0_0x3c2753(0x171)]?function(_0x1871ac,_0x54d6ca,_0x2320ec,_0x55f660){const _0x350778=a0_0x3c2753;if(_0x55f660===undefined)_0x55f660=_0x2320ec;var _0x591847=Object['getOwnPropertyDescriptor'](_0x54d6ca,_0x2320ec);(!_0x591847||(_0x350778(0x14a)in _0x591847?!_0x54d6ca[_0x350778(0x179)]:_0x591847[_0x350778(0x11e)]||_0x591847[_0x350778(0x19c)]))&&(_0x591847={'enumerable':!![],'get':function(){return _0x54d6ca[_0x2320ec];}}),Object[_0x350778(0x15a)](_0x1871ac,_0x55f660,_0x591847);}:function(_0x25c07c,_0x33dbff,_0x8bb3f2,_0x5cd8e8){if(_0x5cd8e8===undefined)_0x5cd8e8=_0x8bb3f2;_0x25c07c[_0x5cd8e8]=_0x33dbff[_0x8bb3f2];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x3c2753(0x171)]?function(_0xabccd9,_0x94ce19){const _0x4c8a6b=a0_0x3c2753;Object['defineProperty'](_0xabccd9,_0x4c8a6b(0x166),{'enumerable':!![],'value':_0x94ce19});}:function(_0x305fc6,_0x218b51){const _0x111473=a0_0x3c2753;_0x305fc6[_0x111473(0x166)]=_0x218b51;}),__importStar=this&&this[a0_0x3c2753(0x130)]||(function(){var _0x3fee3f=function(_0x375f39){return _0x3fee3f=Object['getOwnPropertyNames']||function(_0x2b9125){const _0x750999=a0_0x3053;var _0x45bcac=[];for(var _0x52adeb in _0x2b9125)if(Object[_0x750999(0x170)][_0x750999(0x147)][_0x750999(0x177)](_0x2b9125,_0x52adeb))_0x45bcac[_0x45bcac[_0x750999(0x13a)]]=_0x52adeb;return _0x45bcac;},_0x3fee3f(_0x375f39);};return function(_0x350c69){const _0x3b7bff=a0_0x3053;if(_0x350c69&&_0x350c69[_0x3b7bff(0x179)])return _0x350c69;var _0x8eeed2={};if(_0x350c69!=null){for(var _0xff31b=_0x3fee3f(_0x350c69),_0x4ad37e=0x0;_0x4ad37e<_0xff31b[_0x3b7bff(0x13a)];_0x4ad37e++)if(_0xff31b[_0x4ad37e]!==_0x3b7bff(0x166))__createBinding(_0x8eeed2,_0x350c69,_0xff31b[_0x4ad37e]);}return __setModuleDefault(_0x8eeed2,_0x350c69),_0x8eeed2;};}());Object[a0_0x3c2753(0x15a)](exports,a0_0x3c2753(0x179),{'value':!![]}),exports[a0_0x3c2753(0x1c1)]=exports['Tracker']=exports['PRICING']=void 0x0,exports[a0_0x3c2753(0x13c)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3c2753(0x18c))),os=__importStar(require('os')),child_process_1=require(a0_0x3c2753(0x149));function a0_0x3053(_0x5af1cc,_0x336f50){_0x5af1cc=_0x5af1cc-0x111;const _0x119fc4=a0_0x119f();let _0x30537c=_0x119fc4[_0x5af1cc];return _0x30537c;}exports[a0_0x3c2753(0x163)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x3c2753(0x131),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x3c2753(0x1b2),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x3c2753(0x115),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x3c2753(0x112),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x3c2753(0x12c),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x3c2753(0x199),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x3c2753(0x16b),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x3c2753(0x18b),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x3c2753(0x1ad),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x3c2753(0x1b7),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x3c2753(0x19e),'input_price_1m':2.5},'gpt-5-4-mini':{'name':'GPT-5.4\x20Mini','input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x3c2753(0x120),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x3c2753(0x12a),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x3c2753(0x13f),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x3c2753(0x17e),'input_price_1m':0.15},'o1':{'name':a0_0x3c2753(0x145),'input_price_1m':0xf},'o1-mini':{'name':a0_0x3c2753(0x1c5),'input_price_1m':0x3},'o3-mini':{'name':a0_0x3c2753(0x129),'input_price_1m':1.1},'cursor-small':{'name':a0_0x3c2753(0x175),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x3c2753(0x1aa),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x3c2753(0x11c),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x3c2753(0x176),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x3c2753(0x121),'input_price_1m':3.5}};function detectSessionTool(){const _0x3596c4=a0_0x3c2753,_0x42cd5b=process.env,_0x5de934={'tool':'','model':_0x3596c4(0x193),'modelShort':''};if(_0x42cd5b[_0x3596c4(0x1bf)]&&exports[_0x3596c4(0x163)][_0x42cd5b['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x42cd5b[_0x3596c4(0x1bf)],'modelShort':''};const _0x45c1f8=(_0x42cd5b['AI_AGENT']||'')[_0x3596c4(0x178)]();if(_0x45c1f8){if(_0x45c1f8[_0x3596c4(0x14c)](_0x3596c4(0x188))||_0x45c1f8[_0x3596c4(0x14c)]('claude_code')){const _0x2d79b3=_0x42cd5b[_0x3596c4(0x124)]==='high'?_0x3596c4(0x185):_0x3596c4(0x154),_0x2caf6a=_0x42cd5b[_0x3596c4(0x124)]===_0x3596c4(0x119)?_0x3596c4(0x17d):_0x3596c4(0x193);return{'tool':_0x3596c4(0x118),'model':_0x2caf6a,'modelShort':_0x2d79b3};}if(_0x45c1f8['includes'](_0x3596c4(0x11a)))return{'tool':_0x3596c4(0x11a),'model':_0x3596c4(0x193),'modelShort':_0x3596c4(0x154)};if(_0x45c1f8[_0x3596c4(0x14c)](_0x3596c4(0x117))||_0x45c1f8[_0x3596c4(0x14c)](_0x3596c4(0x13b))){const _0x3f1814=_0x42cd5b[_0x3596c4(0x1a6)]||'';if(_0x3f1814&&exports['PRICING'][_0x3f1814])return{'tool':_0x3596c4(0x13b),'model':_0x3f1814,'modelShort':_0x3f1814[_0x3596c4(0x15d)]('-')[_0x3596c4(0x122)]()||''};return{'tool':'copilot','model':_0x3596c4(0x12e),'modelShort':_0x3596c4(0x154)};}if(_0x45c1f8[_0x3596c4(0x14c)](_0x3596c4(0x138)))return{'tool':'gemini','model':_0x3596c4(0x142),'modelShort':'flash'};if(_0x45c1f8[_0x3596c4(0x14c)](_0x3596c4(0x1af)))return{'tool':_0x3596c4(0x1af),'model':_0x3596c4(0x196),'modelShort':_0x3596c4(0x17b)};if(_0x45c1f8[_0x3596c4(0x14c)]('devin'))return{'tool':'devin','model':'claude-sonnet-4-6','modelShort':''};if(_0x45c1f8[_0x3596c4(0x14c)]('antigravity'))return{'tool':_0x3596c4(0x168),'model':_0x3596c4(0x1a2),'modelShort':'gemini'};if(_0x45c1f8['includes']('replit')||_0x42cd5b[_0x3596c4(0x198)])return{'tool':_0x3596c4(0x15e),'model':_0x3596c4(0x193),'modelShort':''};return{'tool':_0x45c1f8['split']('_')[0x0][_0x3596c4(0x15d)]('-')[0x0],'model':_0x3596c4(0x193),'modelShort':''};}if(_0x42cd5b[_0x3596c4(0x127)]==='1'||_0x42cd5b[_0x3596c4(0x16c)]==='1'){const _0xde5aef=_0x42cd5b[_0x3596c4(0x124)]==='high'?_0x3596c4(0x185):_0x3596c4(0x154),_0xe66e46=_0x42cd5b[_0x3596c4(0x124)]===_0x3596c4(0x119)?_0x3596c4(0x17d):'claude-sonnet-4-6';return{'tool':'claude','model':_0xe66e46,'modelShort':_0xde5aef};}if(_0x42cd5b['CURSOR_AGENT']==='1')return{'tool':_0x3596c4(0x11a),'model':_0x3596c4(0x193),'modelShort':_0x3596c4(0x154)};if(_0x42cd5b[_0x3596c4(0x141)]==='1')return{'tool':_0x3596c4(0x138),'model':'gemini-3-5-flash','modelShort':_0x3596c4(0x1ac)};if(_0x42cd5b[_0x3596c4(0x1a6)]||_0x42cd5b[_0x3596c4(0x1b0)]){const _0x267594=_0x42cd5b[_0x3596c4(0x1a6)]||'';if(_0x267594&&exports[_0x3596c4(0x163)][_0x267594])return{'tool':_0x3596c4(0x13b),'model':_0x267594,'modelShort':_0x267594['split']('-')[_0x3596c4(0x122)]()||''};return{'tool':_0x3596c4(0x13b),'model':'claude-sonnet-4-5','modelShort':'sonnet'};}if(_0x42cd5b[_0x3596c4(0x198)]||_0x42cd5b[_0x3596c4(0x181)])return{'tool':_0x3596c4(0x15e),'model':_0x3596c4(0x193),'modelShort':''};if(_0x42cd5b[_0x3596c4(0x132)])return{'tool':_0x3596c4(0x183),'model':_0x3596c4(0x193),'modelShort':''};if(_0x42cd5b[_0x3596c4(0x1a0)])return{'tool':_0x3596c4(0x1b9),'model':'claude-sonnet-4-6','modelShort':''};if(_0x42cd5b['ANTIGRAVITY_AGENT']==='1')return{'tool':_0x3596c4(0x168),'model':_0x3596c4(0x1a2),'modelShort':'gemini'};if(_0x42cd5b[_0x3596c4(0x124)]){const _0x3035ff=_0x42cd5b[_0x3596c4(0x124)]===_0x3596c4(0x119)?_0x3596c4(0x185):_0x3596c4(0x154),_0x380751=_0x42cd5b[_0x3596c4(0x124)]===_0x3596c4(0x119)?'claude-opus-4-8':_0x3596c4(0x193);return{'tool':'','model':_0x380751,'modelShort':''};}if(_0x42cd5b[_0x3596c4(0x1b3)]&&exports['PRICING'][_0x42cd5b[_0x3596c4(0x1b3)]])return{'tool':_0x3596c4(0x143),'model':_0x42cd5b[_0x3596c4(0x1b3)],'modelShort':''};if(_0x42cd5b[_0x3596c4(0x1b1)]){const _0x10b071=(_0x42cd5b[_0x3596c4(0x1a7)]||'')[_0x3596c4(0x178)]();if(_0x10b071[_0x3596c4(0x14c)]('cursor'))return{'tool':_0x3596c4(0x11a),'model':_0x3596c4(0x193),'modelShort':_0x3596c4(0x154)};if(_0x10b071[_0x3596c4(0x14c)](_0x3596c4(0x151)))return{'tool':_0x3596c4(0x151),'model':'claude-sonnet-4-6','modelShort':'sonnet'};}const _0x392894=process.env.TRIMPROMPT_MODEL||'';if(_0x392894&&exports[_0x3596c4(0x163)][_0x392894])return{'tool':'','model':_0x392894,'modelShort':''};return _0x5de934;}const MAX_LOGS_PER_TOOL=0x32;function a0_0x119f(){const _0x2de337=['REPL_ID','Claude\x20Sonnet\x204.5','tool','execSync','configurable','activeSavedTokens','GPT-4o','claude-3-5-sonnet','CONTINUE_GLOBAL_DIR','1773488PKUcvD','gemini-3-1-pro','14ipmsEJ','replace','init','COPILOT_MODEL','PATH','trim','getDevIdentity','Gemini\x203.1\x20Pro','parse','flash','GPT-5.5','stringify','codex','COPILOT_GITHUB_TOKEN','VSCODE_PID','Claude\x20Opus\x204.8','AIDER_MODEL','/api/security/alert','command','20298377SvYUHW','GPT-5.4','secretTypes','continue','toFixed','max','saveLogs','conv:','values','TRIMPROMPT_MODEL','execPath','tracker','baseDir','push','homedir','OpenAI\x20o1-mini','existsSync','.raw.txt','charAt','Claude\x20Opus\x204.1\x20(deprecated)','tokens_saved','3342VxHywJ','Claude\x20Opus\x204.7','toISOString','github-copilot','claude','high','cursor','username','Gemini\x203.5\x20Flash','\x20Chat\x20','writable','getLogs','GPT-5.4\x20Nano','Gemini\x203.5\x20Live\x20Translate','pop','redact','CLAUDE_EFFORT','ceil','Tracker','CLAUDECODE','configPath','OpenAI\x20o3-mini','GPT-4.1\x20Mini','.trimprompt','Claude\x20Sonnet\x204.6','name','claude-sonnet-4-5','writeFileSync','__importStar','Claude\x20Mythos\x205','CLINE_DATA_DIR','6067752uezDeQ','logExecution','spawn','getConfig','pipe','gemini','random','length','copilot','detectSessionTool','.tmp','saveConfig','GPT-4.1\x20Nano','621783nSKTxe','GEMINI_CLI','gemini-3-5-flash','aider','secretsFound','OpenAI\x20o1','modelShort','hasOwnProperty','\x20Compaction','child_process','get','3945LBuiEZ','includes','1865475CtRBrX','toUpperCase','cachedDevId','substring','windsurf','platform','has','sonnet','config','default_model','getStatsSummary','unlinkSync','sendSecurityAlert','defineProperty','logs','36MEJsxE','split','replit','fullPath','./redactor','949992argMGo','model_used','PRICING','raw_tokens','telemetry_url','default','auto','antigravity','join','mkdirSync','Claude\x203.5\x20Sonnet','CLAUDE_CODE','pruneLogsPerTool','lifetime_savings','renameSync','prototype','create','timestamp','utf8','triggerBackgroundSync','Cursor\x20Small','Gemini\x203.1\x20Flash-Lite','call','toLowerCase','__esModule','estimated_compressed_tokens','o3mini','toString','claude-opus-4-8','GPT-4o\x20Mini','statSync','startsWith','REPLIT_ENVIRONMENT','slice','cline','readFileSync','opus','size','unref','claude-code','logsDir','statsPath','Claude\x20Haiku\x203.5','path','model','input_price_1m','unknown','30PVdixa','18pOOqYc','./file-watcher','claude-sonnet-4-6','compact:','ignore','o3-mini','userInfo'];a0_0x119f=function(){return _0x2de337;};return a0_0x119f();}let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{['baseDir'];['configPath'];[a0_0x3c2753(0x18a)];[a0_0x3c2753(0x189)];[a0_0x3c2753(0x155)];constructor(){const _0x5c2c15=a0_0x3c2753;this[_0x5c2c15(0x1c2)]=path['join'](os[_0x5c2c15(0x1c4)](),_0x5c2c15(0x12b)),this[_0x5c2c15(0x128)]=path[_0x5c2c15(0x169)](this[_0x5c2c15(0x1c2)],'config.json'),this['statsPath']=path[_0x5c2c15(0x169)](this[_0x5c2c15(0x1c2)],'stats.json'),this[_0x5c2c15(0x189)]=path[_0x5c2c15(0x169)](this[_0x5c2c15(0x1c2)],_0x5c2c15(0x15b)),this[_0x5c2c15(0x1a5)]();}[a0_0x3c2753(0x1a5)](){const _0x5391b6=a0_0x3c2753;!fs[_0x5391b6(0x1c6)](this[_0x5391b6(0x1c2)])&&fs[_0x5391b6(0x16a)](this[_0x5391b6(0x1c2)],{'recursive':!![]});!fs['existsSync'](this['logsDir'])&&fs[_0x5391b6(0x16a)](this[_0x5391b6(0x189)],{'recursive':!![]});const _0x49f42e={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x5391b6(0x17d)};if(fs['existsSync'](this[_0x5391b6(0x128)]))try{const _0xfde580=fs[_0x5391b6(0x184)](this[_0x5391b6(0x128)],_0x5391b6(0x173));this['config']={..._0x49f42e,...JSON[_0x5391b6(0x1ab)](_0xfde580)};}catch(_0x2e5202){this[_0x5391b6(0x155)]=_0x49f42e;}else this[_0x5391b6(0x155)]=_0x49f42e,this[_0x5391b6(0x13e)]();!fs[_0x5391b6(0x1c6)](this[_0x5391b6(0x18a)])&&fs[_0x5391b6(0x12f)](this[_0x5391b6(0x18a)],JSON[_0x5391b6(0x1ae)]([]),_0x5391b6(0x173));}[a0_0x3c2753(0x136)](){const _0x32f782=a0_0x3c2753;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x32f782(0x155)][_0x32f782(0x165)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x32f782(0x155)];}['setConfig'](_0x56c4fb,_0x330b38){const _0xe883a6=a0_0x3c2753;this[_0xe883a6(0x155)][_0x56c4fb]=_0x330b38,this[_0xe883a6(0x13e)]();}[a0_0x3c2753(0x13e)](){const _0x5b5364=a0_0x3c2753;fs[_0x5b5364(0x12f)](this[_0x5b5364(0x128)],JSON[_0x5b5364(0x1ae)](this[_0x5b5364(0x155)],null,0x2),_0x5b5364(0x173));}[a0_0x3c2753(0x11f)](){const _0x37a387=a0_0x3c2753;try{if(!fs['existsSync'](this['statsPath']))return globalLogsMemoryCache;const _0x23125d=fs[_0x37a387(0x17f)](this['statsPath'])['mtimeMs'];if(_0x23125d===globalLogsCacheMtime&&globalLogsMemoryCache[_0x37a387(0x13a)]>0x0)return globalLogsMemoryCache;const _0x536c13=fs[_0x37a387(0x184)](this[_0x37a387(0x18a)],_0x37a387(0x173)),_0x54f86e=JSON[_0x37a387(0x1ab)](_0x536c13);if(Array['isArray'](_0x54f86e))return globalLogsMemoryCache=_0x54f86e,globalLogsCacheMtime=_0x23125d,_0x54f86e;}catch{}return globalLogsMemoryCache;}[a0_0x3c2753(0x1bc)](_0x7f6436){const _0x1672b6=a0_0x3c2753;globalLogsMemoryCache=_0x7f6436;const _0x4ee010=this['statsPath']+_0x1672b6(0x13d);try{fs['writeFileSync'](_0x4ee010,JSON[_0x1672b6(0x1ae)](_0x7f6436,null,0x2),_0x1672b6(0x173)),fs[_0x1672b6(0x16f)](_0x4ee010,this[_0x1672b6(0x18a)]);}catch{try{fs[_0x1672b6(0x12f)](this[_0x1672b6(0x18a)],JSON[_0x1672b6(0x1ae)](_0x7f6436,null,0x2),_0x1672b6(0x173));}catch{}}}[a0_0x3c2753(0x16d)](_0x3e88af){const _0x294c7e=a0_0x3c2753,_0x2d52c7=new Map();for(const _0x2052f1 of _0x3e88af){const _0x34cd07=_0x2052f1[_0x294c7e(0x19a)]&&_0x2052f1[_0x294c7e(0x19a)]['trim']()||_0x2052f1['model_used']||'other';let _0x318927=_0x2d52c7[_0x294c7e(0x14a)](_0x34cd07);!_0x318927&&(_0x318927=[],_0x2d52c7['set'](_0x34cd07,_0x318927)),_0x318927[_0x294c7e(0x1c3)](_0x2052f1);}const _0xf23ae2=new Set();for(const _0xc95e75 of _0x2d52c7[_0x294c7e(0x1be)]()){const _0x35fe25=_0xc95e75[_0x294c7e(0x13a)]-MAX_LOGS_PER_TOOL;for(let _0x3dbb41=0x0;_0x3dbb41<_0x35fe25;_0x3dbb41++)_0xf23ae2['add'](_0xc95e75[_0x3dbb41]['id']);}if(_0xf23ae2[_0x294c7e(0x186)]===0x0)return _0x3e88af;let _0x356f15={};try{_0x356f15=JSON[_0x294c7e(0x1ab)](fs[_0x294c7e(0x184)](this['configPath'],'utf8'))||{};}catch{}const _0x5d9f9e=_0x356f15['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x351b93 of _0x3e88af){if(!_0xf23ae2[_0x294c7e(0x153)](_0x351b93['id']))continue;_0x5d9f9e[_0x294c7e(0x164)]+=_0x351b93['estimated_raw_tokens']||0x0,_0x5d9f9e['compressed_tokens']+=_0x351b93[_0x294c7e(0x17a)]||0x0,_0x5d9f9e[_0x294c7e(0x113)]+=_0x351b93[_0x294c7e(0x113)]||0x0;}_0x356f15[_0x294c7e(0x16e)]=_0x5d9f9e,this[_0x294c7e(0x155)]={...this[_0x294c7e(0x155)],..._0x356f15};try{this[_0x294c7e(0x13e)]();}catch{}for(const _0x280771 of _0xf23ae2){try{fs[_0x294c7e(0x158)](path['join'](this[_0x294c7e(0x189)],_0x280771+'.raw.txt'));}catch{}try{fs[_0x294c7e(0x158)](path[_0x294c7e(0x169)](this['logsDir'],_0x280771+'.comp.txt'));}catch{}}return _0x3e88af['filter'](_0x1da10b=>!_0xf23ae2[_0x294c7e(0x153)](_0x1da10b['id']));}[a0_0x3c2753(0x134)](_0x4beba9,_0x759380,_0x4c49f7,_0xbee6c8,_0x37b3b4,_0x35ff1c){const _0x21d579=a0_0x3c2753,_0x37278d=this[_0x21d579(0x11f)](),_0x3dec8c=_0x759380[_0x21d579(0x13a)],_0x255f0a=_0x4c49f7['length'],_0x16b213=detectSessionTool(),_0x2f0a77=_0x16b213[_0x21d579(0x18d)],_0x85df74=_0x16b213[_0x21d579(0x19a)]===_0x21d579(0x168)?'gemini':_0x16b213[_0x21d579(0x19a)];let _0x282d03=0x0;if(_0x85df74&&!_0x4beba9['startsWith'](_0x21d579(0x194)))try{const {getLatestSessionFile:_0x5289d9,loadSessionsState:_0x55d321}=require(_0x21d579(0x192)),_0x31021c=_0x5289d9(_0x85df74);if(_0x31021c&&_0x31021c[_0x21d579(0x15f)]){const _0x3eb000=_0x55d321();_0x3eb000[_0x31021c[_0x21d579(0x15f)]]&&(_0x282d03=_0x3eb000[_0x31021c[_0x21d579(0x15f)]][_0x21d579(0x19d)]||0x0);}}catch{}const _0x44e84a=Math[_0x21d579(0x125)](_0x3dec8c/0x4)+_0x282d03,_0x20d394=Math[_0x21d579(0x125)](_0x255f0a/0x4),_0x2bbf61=Math[_0x21d579(0x1bb)](0x0,_0x44e84a-_0x20d394),_0x4ce998=Math[_0x21d579(0x139)]()[_0x21d579(0x17c)](0x24)[_0x21d579(0x150)](0x2,0xb);try{const {redactor:_0xf0cac6}=require(_0x21d579(0x160)),_0x4c2763=_0xf0cac6?_0xf0cac6[_0x21d579(0x123)](_0x759380):_0x759380;fs[_0x21d579(0x12f)](path['join'](this['logsDir'],_0x4ce998+_0x21d579(0x1c7)),_0x4c2763,_0x21d579(0x173)),fs[_0x21d579(0x12f)](path['join'](this[_0x21d579(0x189)],_0x4ce998+'.comp.txt'),_0x4c49f7,_0x21d579(0x173));}catch{}let _0xd6ad9e=_0x4beba9;if(_0x4beba9[_0x21d579(0x180)](_0x21d579(0x194))){const _0x4cc100=_0x4beba9[_0x21d579(0x15d)](':')[0x1]||_0x21d579(0x118),_0x14e6b8=_0x4cc100[_0x21d579(0x111)](0x0)[_0x21d579(0x14e)]()+_0x4cc100[_0x21d579(0x182)](0x1);_0xd6ad9e=_0x14e6b8+_0x21d579(0x148);}else{if(_0x4beba9[_0x21d579(0x180)](_0x21d579(0x1bd))){const _0x1de557=_0x4beba9['split']('\x20'),_0x31cd0f=_0x1de557[0x0][_0x21d579(0x15d)](':')[0x1]||_0x21d579(0x118),_0x1b541b=_0x31cd0f[_0x21d579(0x111)](0x0)[_0x21d579(0x14e)]()+_0x31cd0f['slice'](0x1),_0x237e01=_0x1de557['slice'](0x1)[_0x21d579(0x169)]('\x20');_0xd6ad9e=_0x1b541b+_0x21d579(0x11d)+_0x237e01;}else{const _0x2dd5a9=_0x4beba9[_0x21d579(0x15d)]('\x20')[0x0]||_0x21d579(0x18f);_0xd6ad9e=_0x16b213[_0x21d579(0x19a)]?_0x16b213[_0x21d579(0x146)]?_0x16b213[_0x21d579(0x19a)]+'-'+_0x16b213[_0x21d579(0x146)]+'-'+_0x2dd5a9:_0x16b213[_0x21d579(0x19a)]+'-'+_0x2dd5a9:_0x2dd5a9;}}const _0x2c9cce={'id':_0x4ce998,'timestamp':new Date()[_0x21d579(0x116)](),'command':_0xd6ad9e,'raw_chars':_0x3dec8c,'compressed_chars':_0x255f0a,'estimated_raw_tokens':_0x44e84a,'estimated_compressed_tokens':_0x20d394,'tokens_saved':_0x2bbf61,'model_used':_0x2f0a77,'tool':_0x85df74||_0x16b213[_0x21d579(0x19a)]||'','exit_code':_0xbee6c8,'synced':![],'ai_detected':!!_0x16b213['tool'],'secrets_found':_0x37b3b4?.[_0x21d579(0x144)]||0x0,'secret_types':_0x37b3b4?.[_0x21d579(0x1b8)]||[],'features':_0x35ff1c||[]};_0x37278d[_0x21d579(0x1c3)](_0x2c9cce),this[_0x21d579(0x1bc)](this[_0x21d579(0x16d)](_0x37278d));const _0x111a1f=this[_0x21d579(0x136)]()['telemetry_url'];return _0x111a1f&&_0x111a1f[_0x21d579(0x1a8)]()[_0x21d579(0x13a)]>0x0&&this['triggerBackgroundSync'](),_0x37b3b4&&_0x37b3b4[_0x21d579(0x144)]>0x0&&this['sendSecurityAlert'](_0x2c9cce,_0x37b3b4),_0x2c9cce;}[a0_0x3c2753(0x14f)]=null;[a0_0x3c2753(0x1a9)](){const _0x1070cd=a0_0x3c2753;if(this[_0x1070cd(0x14f)])return this[_0x1070cd(0x14f)];try{const _0x2f3182=require(_0x1070cd(0x149))[_0x1070cd(0x19b)]('git\x20config\x20user.email',{'stdio':[_0x1070cd(0x195),_0x1070cd(0x137),_0x1070cd(0x195)],'windowsHide':!![]})[_0x1070cd(0x17c)]()['trim']();if(_0x2f3182&&_0x2f3182[_0x1070cd(0x14c)]('@'))return this['cachedDevId']=_0x2f3182,_0x2f3182;}catch{}try{const _0x17c5da=require('os')[_0x1070cd(0x197)]()[_0x1070cd(0x11b)];return this['cachedDevId']=_0x17c5da,_0x17c5da;}catch{}return this[_0x1070cd(0x14f)]='unknown',_0x1070cd(0x18f);}[a0_0x3c2753(0x159)](_0x66bdf5,_0xe49c39){const _0x5992af=a0_0x3c2753;try{let _0x559c71=this[_0x5992af(0x136)]()[_0x5992af(0x165)]||'';if(!_0x559c71)return;_0x559c71=_0x559c71[_0x5992af(0x1a4)](/\/api\/telemetry\/?$/,_0x5992af(0x1b4));if(!_0x559c71['includes'](_0x5992af(0x1b4)))_0x559c71+='/api/security/alert';const _0x1d9e18=this[_0x5992af(0x1a9)](),_0x290377=JSON[_0x5992af(0x1ae)]({'developer_id':_0x1d9e18,'timestamp':_0x66bdf5[_0x5992af(0x172)],'command':_0x66bdf5[_0x5992af(0x1b5)],'secrets_found':_0xe49c39[_0x5992af(0x144)],'secret_types':_0xe49c39[_0x5992af(0x1b8)],'os':require('os')[_0x5992af(0x152)]()}),_0x108792='const\x20h=require(require(\x27url\x27).parse('+JSON[_0x5992af(0x1ae)](_0x559c71)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON[_0x5992af(0x1ae)](_0x559c71)+',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end('+JSON[_0x5992af(0x1ae)](_0x290377)+')',_0x2c4960=(0x0,child_process_1[_0x5992af(0x135)])(process['execPath'],['-e',_0x108792],{'detached':!![],'stdio':_0x5992af(0x195),'windowsHide':!![]});_0x2c4960[_0x5992af(0x187)]();}catch{}}[a0_0x3c2753(0x174)](){const _0x51bf0d=a0_0x3c2753;try{const _0x340057=path['join'](__dirname,'sync.js');if(fs[_0x51bf0d(0x1c6)](_0x340057)){const _0x5c15d4=(0x0,child_process_1['spawn'])(process[_0x51bf0d(0x1c0)],[_0x340057],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x5c15d4[_0x51bf0d(0x187)]();}}catch{}}[a0_0x3c2753(0x157)](_0x4f8554=a0_0x3c2753(0x167)){const _0x1209f4=a0_0x3c2753,_0x32dd8b=this[_0x1209f4(0x11f)]();let _0x2f4c94=0x0,_0x4095db=0x0,_0x3d3690=0x0;for(const _0x493585 of _0x32dd8b){_0x2f4c94+=_0x493585['estimated_raw_tokens'],_0x4095db+=_0x493585['estimated_compressed_tokens'],_0x3d3690+=_0x493585[_0x1209f4(0x113)];}const _0xed3b90=this[_0x1209f4(0x136)]()[_0x1209f4(0x16e)];_0xed3b90&&(_0x2f4c94+=_0xed3b90[_0x1209f4(0x164)]||0x0,_0x4095db+=_0xed3b90['compressed_tokens']||0x0,_0x3d3690+=_0xed3b90[_0x1209f4(0x113)]||0x0);let _0x3e5f11=_0x4f8554;(!_0x3e5f11||_0x3e5f11===_0x1209f4(0x167)||!exports[_0x1209f4(0x163)][_0x3e5f11])&&(_0x32dd8b[_0x1209f4(0x13a)]>0x0&&_0x32dd8b[_0x32dd8b[_0x1209f4(0x13a)]-0x1][_0x1209f4(0x162)]?_0x3e5f11=_0x32dd8b[_0x32dd8b['length']-0x1]['model_used']:_0x3e5f11=this[_0x1209f4(0x136)]()[_0x1209f4(0x156)]||_0x1209f4(0x19f));const _0x1fefa0=exports[_0x1209f4(0x163)][_0x3e5f11]||exports['PRICING'][_0x1209f4(0x19f)],_0x2bfef9=_0x3d3690*_0x1fefa0['input_price_1m']/0xf4240,_0x52681b=_0x2f4c94*_0x1fefa0[_0x1209f4(0x18e)]/0xf4240,_0x18282c=_0x4095db*_0x1fefa0[_0x1209f4(0x18e)]/0xf4240,_0x584f4a=_0x2f4c94>0x0?_0x3d3690/_0x2f4c94*0x64:0x0;return{'total_raw_tokens':_0x2f4c94,'total_compressed_tokens':_0x4095db,'total_tokens_saved':_0x3d3690,'savings_percentage':parseFloat(_0x584f4a[_0x1209f4(0x1ba)](0x1)),'money_saved_usd':parseFloat(_0x2bfef9['toFixed'](0x4)),'raw_cost_usd':parseFloat(_0x52681b[_0x1209f4(0x1ba)](0x4)),'compressed_cost_usd':parseFloat(_0x18282c['toFixed'](0x4)),'model_name':_0x1fefa0[_0x1209f4(0x12d)],'model_key':_0x3e5f11};}}exports[a0_0x3c2753(0x126)]=Tracker,exports[a0_0x3c2753(0x1c1)]=new Tracker();