trimprompt 1.0.44 → 1.0.46

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';const a0_0x39998b=a0_0x47b4;(function(_0x5bc407,_0x4f89ba){const _0x1e8005=a0_0x47b4,_0x37c3ab=_0x5bc407();while(!![]){try{const _0x12829e=-parseInt(_0x1e8005(0x130))/0x1*(parseInt(_0x1e8005(0x193))/0x2)+-parseInt(_0x1e8005(0x135))/0x3+parseInt(_0x1e8005(0x145))/0x4+-parseInt(_0x1e8005(0x19e))/0x5+parseInt(_0x1e8005(0x177))/0x6+parseInt(_0x1e8005(0x1a7))/0x7*(-parseInt(_0x1e8005(0x1a6))/0x8)+-parseInt(_0x1e8005(0x1c7))/0x9*(-parseInt(_0x1e8005(0x1e7))/0xa);if(_0x12829e===_0x4f89ba)break;else _0x37c3ab['push'](_0x37c3ab['shift']());}catch(_0x18f141){_0x37c3ab['push'](_0x37c3ab['shift']());}}}(a0_0x2049,0x9debf));var __createBinding=this&&this[a0_0x39998b(0x158)]||(Object['create']?function(_0x5e99aa,_0x3d25cb,_0x255a54,_0x5d6027){const _0x5dfa3e=a0_0x39998b;if(_0x5d6027===undefined)_0x5d6027=_0x255a54;var _0x14a0d1=Object[_0x5dfa3e(0x170)](_0x3d25cb,_0x255a54);(!_0x14a0d1||(_0x5dfa3e(0x1c5)in _0x14a0d1?!_0x3d25cb[_0x5dfa3e(0x184)]:_0x14a0d1['writable']||_0x14a0d1[_0x5dfa3e(0x1c4)]))&&(_0x14a0d1={'enumerable':!![],'get':function(){return _0x3d25cb[_0x255a54];}}),Object['defineProperty'](_0x5e99aa,_0x5d6027,_0x14a0d1);}:function(_0x4bc579,_0x290d37,_0x1e4f62,_0x4c8042){if(_0x4c8042===undefined)_0x4c8042=_0x1e4f62;_0x4bc579[_0x4c8042]=_0x290d37[_0x1e4f62];}),__setModuleDefault=this&&this[a0_0x39998b(0x175)]||(Object[a0_0x39998b(0x14d)]?function(_0x538199,_0x1ee977){const _0x173b7c=a0_0x39998b;Object[_0x173b7c(0x1b4)](_0x538199,'default',{'enumerable':!![],'value':_0x1ee977});}:function(_0x1fa62e,_0x495c42){const _0x1522dc=a0_0x39998b;_0x1fa62e[_0x1522dc(0x1df)]=_0x495c42;}),__importStar=this&&this[a0_0x39998b(0x1db)]||(function(){var _0x5674aa=function(_0x37fefa){const _0x211b74=a0_0x47b4;return _0x5674aa=Object[_0x211b74(0x15d)]||function(_0x472bd8){const _0x30db10=_0x211b74;var _0x49bc0c=[];for(var _0x41e16d in _0x472bd8)if(Object[_0x30db10(0x1b6)][_0x30db10(0x154)][_0x30db10(0x13c)](_0x472bd8,_0x41e16d))_0x49bc0c[_0x49bc0c[_0x30db10(0x186)]]=_0x41e16d;return _0x49bc0c;},_0x5674aa(_0x37fefa);};return function(_0x360387){const _0x2c8aa7=a0_0x47b4;if(_0x360387&&_0x360387[_0x2c8aa7(0x184)])return _0x360387;var _0x2673de={};if(_0x360387!=null){for(var _0x40cb32=_0x5674aa(_0x360387),_0x1a204f=0x0;_0x1a204f<_0x40cb32[_0x2c8aa7(0x186)];_0x1a204f++)if(_0x40cb32[_0x1a204f]!==_0x2c8aa7(0x1df))__createBinding(_0x2673de,_0x360387,_0x40cb32[_0x1a204f]);}return __setModuleDefault(_0x2673de,_0x360387),_0x2673de;};}());Object[a0_0x39998b(0x1b4)](exports,a0_0x39998b(0x184),{'value':!![]}),exports[a0_0x39998b(0x1bc)]=exports['Tracker']=exports['PRICING']=void 0x0,exports[a0_0x39998b(0x17a)]=detectSessionTool;function a0_0x47b4(_0x489f4d,_0x30534b){_0x489f4d=_0x489f4d-0x130;const _0x20497f=a0_0x2049();let _0x47b433=_0x20497f[_0x489f4d];return _0x47b433;}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x39998b(0x1c2))),os=__importStar(require('os')),child_process_1=require(a0_0x39998b(0x1b2));exports['PRICING']={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x39998b(0x1a0),'input_price_1m':0xa},'claude-opus-4-8':{'name':'Claude\x20Opus\x204.8','input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x39998b(0x171),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x39998b(0x1b5),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x39998b(0x16d),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x39998b(0x199),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x39998b(0x18f),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x39998b(0x13f),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x39998b(0x1b1),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x39998b(0x1ca),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x39998b(0x1e1),'input_price_1m':0.2},'gpt-4-1-mini':{'name':'GPT-4.1\x20Mini','input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x39998b(0x1ec),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x39998b(0x195),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x39998b(0x198),'input_price_1m':0x3},'o3-mini':{'name':a0_0x39998b(0x15c),'input_price_1m':1.1},'cursor-small':{'name':a0_0x39998b(0x1d8),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x39998b(0x1b7),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x39998b(0x1da),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x39998b(0x187),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x39998b(0x164),'input_price_1m':3.5}};function detectSessionTool(){const _0x246894=a0_0x39998b,_0x12097c=process.env,_0x2974df={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x12097c[_0x246894(0x1dd)]&&exports[_0x246894(0x14b)][_0x12097c[_0x246894(0x1dd)]])return{'tool':'','model':_0x12097c[_0x246894(0x1dd)],'modelShort':''};const _0x1422f0=(_0x12097c['AI_AGENT']||'')[_0x246894(0x192)]();if(_0x1422f0){if(_0x1422f0['includes'](_0x246894(0x1aa))||_0x1422f0[_0x246894(0x1d3)](_0x246894(0x168))){const _0xf4401b=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?_0x246894(0x1a4):_0x246894(0x13b),_0x42cc6a=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?_0x246894(0x1cc):_0x246894(0x1e2);return{'tool':'claude','model':_0x42cc6a,'modelShort':_0xf4401b};}if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x183)))return{'tool':_0x246894(0x183),'model':_0x246894(0x1e2),'modelShort':_0x246894(0x13b)};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x1c8))||_0x1422f0[_0x246894(0x1d3)](_0x246894(0x17c))){const _0x338a1d=_0x12097c[_0x246894(0x140)]||'';if(_0x338a1d&&exports[_0x246894(0x14b)][_0x338a1d])return{'tool':_0x246894(0x17c),'model':_0x338a1d,'modelShort':_0x338a1d[_0x246894(0x19a)]('-')[_0x246894(0x159)]()||''};return{'tool':'copilot','model':_0x246894(0x197),'modelShort':_0x246894(0x13b)};}if(_0x1422f0['includes'](_0x246894(0x190)))return{'tool':_0x246894(0x190),'model':_0x246894(0x15b),'modelShort':_0x246894(0x18e)};if(_0x1422f0[_0x246894(0x1d3)]('codex'))return{'tool':_0x246894(0x1ce),'model':_0x246894(0x169),'modelShort':_0x246894(0x1a9)};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x153)))return{'tool':_0x246894(0x153),'model':'claude-sonnet-4-6','modelShort':''};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x137)))return{'tool':_0x246894(0x137),'model':_0x246894(0x1d6),'modelShort':_0x246894(0x190)};if(_0x1422f0[_0x246894(0x1d3)](_0x246894(0x1ab))||_0x12097c[_0x246894(0x172)])return{'tool':_0x246894(0x1ab),'model':'claude-sonnet-4-6','modelShort':''};return{'tool':_0x1422f0['split']('_')[0x0][_0x246894(0x19a)]('-')[0x0],'model':_0x246894(0x1e2),'modelShort':''};}if(_0x12097c['CLAUDECODE']==='1'||_0x12097c[_0x246894(0x1c0)]==='1'){const _0x4eee69=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?'opus':_0x246894(0x13b),_0x358d9f=_0x12097c[_0x246894(0x1e4)]==='high'?_0x246894(0x1cc):'claude-sonnet-4-6';return{'tool':_0x246894(0x165),'model':_0x358d9f,'modelShort':_0x4eee69};}if(_0x12097c[_0x246894(0x1a5)]==='1')return{'tool':_0x246894(0x183),'model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x12097c[_0x246894(0x1d1)]==='1')return{'tool':_0x246894(0x190),'model':_0x246894(0x15b),'modelShort':_0x246894(0x18e)};if(_0x12097c['COPILOT_MODEL']||_0x12097c[_0x246894(0x15f)]){const _0x4daaf8=_0x12097c[_0x246894(0x140)]||'';if(_0x4daaf8&&exports[_0x246894(0x14b)][_0x4daaf8])return{'tool':'copilot','model':_0x4daaf8,'modelShort':_0x4daaf8['split']('-')[_0x246894(0x159)]()||''};return{'tool':'copilot','model':_0x246894(0x197),'modelShort':_0x246894(0x13b)};}if(_0x12097c[_0x246894(0x172)]||_0x12097c[_0x246894(0x146)])return{'tool':'replit','model':_0x246894(0x1e2),'modelShort':''};if(_0x12097c[_0x246894(0x155)])return{'tool':_0x246894(0x1d4),'model':'claude-sonnet-4-6','modelShort':''};if(_0x12097c['CONTINUE_GLOBAL_DIR'])return{'tool':'continue','model':_0x246894(0x1e2),'modelShort':''};if(_0x12097c[_0x246894(0x1d7)]==='1')return{'tool':_0x246894(0x137),'model':_0x246894(0x1d6),'modelShort':'gemini'};if(_0x12097c[_0x246894(0x1e4)]){const _0x4298a7=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?'opus':'sonnet',_0x2b2752=_0x12097c[_0x246894(0x1e4)]===_0x246894(0x15e)?_0x246894(0x1cc):_0x246894(0x1e2);return{'tool':'','model':_0x2b2752,'modelShort':''};}if(_0x12097c[_0x246894(0x16b)]&&exports[_0x246894(0x14b)][_0x12097c[_0x246894(0x16b)]])return{'tool':_0x246894(0x1a3),'model':_0x12097c[_0x246894(0x16b)],'modelShort':''};if(_0x12097c[_0x246894(0x196)]){const _0x24d217=(_0x12097c[_0x246894(0x17b)]||'')[_0x246894(0x192)]();if(_0x24d217[_0x246894(0x1d3)](_0x246894(0x183)))return{'tool':_0x246894(0x183),'model':'claude-sonnet-4-6','modelShort':_0x246894(0x13b)};if(_0x24d217[_0x246894(0x1d3)](_0x246894(0x174)))return{'tool':_0x246894(0x174),'model':_0x246894(0x1e2),'modelShort':_0x246894(0x13b)};}const _0x341416=process.env.TRIMPROMPT_MODEL||'';if(_0x341416&&exports[_0x246894(0x14b)][_0x341416])return{'tool':'','model':_0x341416,'modelShort':''};return _0x2974df;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{['baseDir'];[a0_0x39998b(0x1c3)];['statsPath'];[a0_0x39998b(0x1e5)];[a0_0x39998b(0x180)];constructor(){const _0x36a34c=a0_0x39998b;this[_0x36a34c(0x1e9)]=path['join'](os[_0x36a34c(0x16a)](),_0x36a34c(0x134)),this[_0x36a34c(0x1c3)]=path[_0x36a34c(0x1be)](this['baseDir'],_0x36a34c(0x19d)),this['statsPath']=path[_0x36a34c(0x1be)](this[_0x36a34c(0x1e9)],_0x36a34c(0x181)),this[_0x36a34c(0x1e5)]=path[_0x36a34c(0x1be)](this[_0x36a34c(0x1e9)],_0x36a34c(0x1bf)),this['init']();}[a0_0x39998b(0x161)](){const _0x86f13d=a0_0x39998b;!fs['existsSync'](this[_0x86f13d(0x1e9)])&&fs[_0x86f13d(0x13a)](this['baseDir'],{'recursive':!![]});!fs[_0x86f13d(0x189)](this[_0x86f13d(0x1e5)])&&fs[_0x86f13d(0x13a)](this[_0x86f13d(0x1e5)],{'recursive':!![]});const _0x40f10c={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x86f13d(0x1cc)};if(fs['existsSync'](this[_0x86f13d(0x1c3)]))try{const _0x3e19d8=fs[_0x86f13d(0x14f)](this['configPath'],_0x86f13d(0x139));this[_0x86f13d(0x180)]={..._0x40f10c,...JSON['parse'](_0x3e19d8)};}catch(_0x7656c8){this['config']=_0x40f10c;}else this['config']=_0x40f10c,this[_0x86f13d(0x1ed)]();!fs[_0x86f13d(0x189)](this[_0x86f13d(0x152)])&&fs['writeFileSync'](this['statsPath'],JSON[_0x86f13d(0x1e8)]([]),_0x86f13d(0x139));}[a0_0x39998b(0x1eb)](){const _0xabe8cf=a0_0x39998b;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0xabe8cf(0x180)][_0xabe8cf(0x136)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0xabe8cf(0x180)];}[a0_0x39998b(0x15a)](_0x5a1e55,_0x1552c2){const _0x38cd11=a0_0x39998b;this[_0x38cd11(0x180)][_0x5a1e55]=_0x1552c2,this[_0x38cd11(0x1ed)]();}[a0_0x39998b(0x1ed)](){const _0x2d7a9e=a0_0x39998b;fs[_0x2d7a9e(0x163)](this[_0x2d7a9e(0x1c3)],JSON[_0x2d7a9e(0x1e8)](this[_0x2d7a9e(0x180)],null,0x2),'utf8');}['getLogs'](){const _0x4d7153=a0_0x39998b;try{if(!fs[_0x4d7153(0x189)](this[_0x4d7153(0x152)]))return globalLogsMemoryCache;const _0x5b59b5=fs[_0x4d7153(0x147)](this['statsPath'])[_0x4d7153(0x19f)];if(_0x5b59b5===globalLogsCacheMtime&&globalLogsMemoryCache['length']>0x0)return globalLogsMemoryCache;const _0x3b6a8c=fs[_0x4d7153(0x14f)](this[_0x4d7153(0x152)],_0x4d7153(0x139)),_0xa7df97=JSON[_0x4d7153(0x1cd)](_0x3b6a8c);if(Array[_0x4d7153(0x18b)](_0xa7df97))return globalLogsMemoryCache=_0xa7df97,globalLogsCacheMtime=_0x5b59b5,_0xa7df97;}catch{}return globalLogsMemoryCache;}[a0_0x39998b(0x149)](_0x321e2d){const _0x43641e=a0_0x39998b;globalLogsMemoryCache=_0x321e2d;const _0x122535=this['statsPath']+_0x43641e(0x1e3);try{fs[_0x43641e(0x163)](_0x122535,JSON[_0x43641e(0x1e8)](_0x321e2d,null,0x2),'utf8'),fs['renameSync'](_0x122535,this[_0x43641e(0x152)]);}catch{try{fs[_0x43641e(0x163)](this[_0x43641e(0x152)],JSON[_0x43641e(0x1e8)](_0x321e2d,null,0x2),_0x43641e(0x139));}catch{}}}['pruneLogsPerTool'](_0x5857fe){const _0x2d0e40=a0_0x39998b,_0x430405=new Map();for(const _0x268127 of _0x5857fe){const _0x556a69=_0x268127[_0x2d0e40(0x17e)]&&_0x268127[_0x2d0e40(0x17e)][_0x2d0e40(0x1de)]()||_0x268127[_0x2d0e40(0x157)]||_0x2d0e40(0x173);let _0x5bb2e2=_0x430405['get'](_0x556a69);!_0x5bb2e2&&(_0x5bb2e2=[],_0x430405[_0x2d0e40(0x1cf)](_0x556a69,_0x5bb2e2)),_0x5bb2e2[_0x2d0e40(0x138)](_0x268127);}const _0x6ed7a6=new Set();for(const _0x56fded of _0x430405[_0x2d0e40(0x17d)]()){const _0x38d489=_0x56fded[_0x2d0e40(0x186)]-MAX_LOGS_PER_TOOL;for(let _0x553571=0x0;_0x553571<_0x38d489;_0x553571++)_0x6ed7a6[_0x2d0e40(0x14a)](_0x56fded[_0x553571]['id']);}if(_0x6ed7a6[_0x2d0e40(0x16c)]===0x0)return _0x5857fe;let _0x4c32d1={};try{_0x4c32d1=JSON['parse'](fs[_0x2d0e40(0x14f)](this['configPath'],_0x2d0e40(0x139)))||{};}catch{}const _0x2cdc67=_0x4c32d1['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x1191ad of _0x5857fe){if(!_0x6ed7a6[_0x2d0e40(0x178)](_0x1191ad['id']))continue;_0x2cdc67[_0x2d0e40(0x185)]+=_0x1191ad[_0x2d0e40(0x1c1)]||0x0,_0x2cdc67['compressed_tokens']+=_0x1191ad[_0x2d0e40(0x1ea)]||0x0,_0x2cdc67['tokens_saved']+=_0x1191ad[_0x2d0e40(0x156)]||0x0;}_0x4c32d1[_0x2d0e40(0x16e)]=_0x2cdc67,this[_0x2d0e40(0x180)]={...this[_0x2d0e40(0x180)],..._0x4c32d1};try{this[_0x2d0e40(0x1ed)]();}catch{}for(const _0x5eb273 of _0x6ed7a6){try{fs[_0x2d0e40(0x142)](path['join'](this[_0x2d0e40(0x1e5)],_0x5eb273+_0x2d0e40(0x1cb)));}catch{}try{fs['unlinkSync'](path[_0x2d0e40(0x1be)](this[_0x2d0e40(0x1e5)],_0x5eb273+_0x2d0e40(0x13d)));}catch{}}return _0x5857fe[_0x2d0e40(0x1dc)](_0x25f048=>!_0x6ed7a6[_0x2d0e40(0x178)](_0x25f048['id']));}[a0_0x39998b(0x166)](_0x4cdd79,_0x101e37,_0x4432b9,_0x283548,_0x531255,_0x5d1443){const _0x356e24=a0_0x39998b,_0x3fb370=this[_0x356e24(0x1bb)](),_0x439c42=_0x101e37[_0x356e24(0x186)],_0xec185=_0x4432b9['length'],_0x3e1f1b=detectSessionTool(),_0x5b1b13=_0x3e1f1b['model'],_0xb6822=_0x3e1f1b[_0x356e24(0x17e)]===_0x356e24(0x137)?_0x356e24(0x190):_0x3e1f1b[_0x356e24(0x17e)];let _0x3809e2=0x0;if(_0xb6822&&!_0x4cdd79[_0x356e24(0x179)](_0x356e24(0x1d0)))try{const {getLatestSessionFile:_0x192111,loadSessionsState:_0x94cd63}=require(_0x356e24(0x13e)),_0x5dfa3c=_0x192111(_0xb6822);if(_0x5dfa3c&&_0x5dfa3c['fullPath']){const _0x53cbb1=_0x94cd63();_0x53cbb1[_0x5dfa3c[_0x356e24(0x19c)]]&&(_0x3809e2=_0x53cbb1[_0x5dfa3c['fullPath']][_0x356e24(0x18c)]||0x0);}}catch{}const _0x267b7b=Math[_0x356e24(0x1ad)](_0x439c42/0x4)+_0x3809e2,_0x6d4ca8=Math[_0x356e24(0x1ad)](_0xec185/0x4),_0x32de3f=Math[_0x356e24(0x14c)](0x0,_0x267b7b-_0x6d4ca8),_0x2e2041=Math[_0x356e24(0x18d)]()[_0x356e24(0x1c6)](0x24)[_0x356e24(0x1e6)](0x2,0xb);try{const {redactor:_0x46e7a2}=require(_0x356e24(0x191)),_0x306317=_0x46e7a2?_0x46e7a2[_0x356e24(0x1e0)](_0x101e37):_0x101e37;fs[_0x356e24(0x163)](path['join'](this[_0x356e24(0x1e5)],_0x2e2041+'.raw.txt'),_0x306317,'utf8'),fs[_0x356e24(0x163)](path['join'](this[_0x356e24(0x1e5)],_0x2e2041+_0x356e24(0x13d)),_0x4432b9,_0x356e24(0x139));}catch{}let _0x1fd50e=_0x4cdd79;if(_0x4cdd79[_0x356e24(0x179)](_0x356e24(0x1d0))){const _0x3faeee=_0x4cdd79[_0x356e24(0x19a)](':')[0x1]||_0x356e24(0x165),_0x2df455=_0x3faeee[_0x356e24(0x14e)](0x0)[_0x356e24(0x131)]()+_0x3faeee['slice'](0x1);_0x1fd50e=_0x2df455+_0x356e24(0x16f);}else{if(_0x4cdd79[_0x356e24(0x179)](_0x356e24(0x17f))){const _0x4d2c78=_0x4cdd79[_0x356e24(0x19a)]('\x20'),_0x55ddd7=_0x4d2c78[0x0][_0x356e24(0x19a)](':')[0x1]||_0x356e24(0x165),_0x14a712=_0x55ddd7['charAt'](0x0)[_0x356e24(0x131)]()+_0x55ddd7[_0x356e24(0x1af)](0x1),_0x10e60a=_0x4d2c78['slice'](0x1)[_0x356e24(0x1be)]('\x20');_0x1fd50e=_0x14a712+_0x356e24(0x188)+_0x10e60a;}else{const _0x4113b2=_0x4cdd79[_0x356e24(0x19a)]('\x20')[0x0]||_0x356e24(0x176);_0x1fd50e=_0x3e1f1b[_0x356e24(0x17e)]?_0x3e1f1b['modelShort']?_0x3e1f1b[_0x356e24(0x17e)]+'-'+_0x3e1f1b[_0x356e24(0x1b8)]+'-'+_0x4113b2:_0x3e1f1b[_0x356e24(0x17e)]+'-'+_0x4113b2:_0x4113b2;}}const _0x46e839={'id':_0x2e2041,'timestamp':new Date()[_0x356e24(0x1b3)](),'command':_0x1fd50e,'raw_chars':_0x439c42,'compressed_chars':_0xec185,'estimated_raw_tokens':_0x267b7b,'estimated_compressed_tokens':_0x6d4ca8,'tokens_saved':_0x32de3f,'model_used':_0x5b1b13,'tool':_0xb6822||_0x3e1f1b[_0x356e24(0x17e)]||'','exit_code':_0x283548,'synced':![],'ai_detected':!!_0x3e1f1b['tool'],'secrets_found':_0x531255?.['secretsFound']||0x0,'secret_types':_0x531255?.[_0x356e24(0x1a2)]||[],'features':_0x5d1443||[]};_0x3fb370[_0x356e24(0x138)](_0x46e839),this[_0x356e24(0x149)](this[_0x356e24(0x1ba)](_0x3fb370));const _0x11d30a=this[_0x356e24(0x1eb)]()['telemetry_url'];return _0x11d30a&&_0x11d30a[_0x356e24(0x1de)]()[_0x356e24(0x186)]>0x0&&this[_0x356e24(0x133)](),_0x531255&&_0x531255[_0x356e24(0x162)]>0x0&&this['sendSecurityAlert'](_0x46e839,_0x531255),_0x46e839;}[a0_0x39998b(0x141)]=null;['getDevIdentity'](){const _0x49898e=a0_0x39998b;if(this[_0x49898e(0x141)])return this[_0x49898e(0x141)];try{const _0x4949e7=require('child_process')['execSync'](_0x49898e(0x1a1),{'stdio':['ignore',_0x49898e(0x151),'ignore'],'windowsHide':!![]})[_0x49898e(0x1c6)]()[_0x49898e(0x1de)]();if(_0x4949e7&&_0x4949e7['includes']('@'))return this[_0x49898e(0x141)]=_0x4949e7,_0x4949e7;}catch{}try{const _0x285908=require('os')[_0x49898e(0x132)]()[_0x49898e(0x1c9)];return this['cachedDevId']=_0x285908,_0x285908;}catch{}return this[_0x49898e(0x141)]=_0x49898e(0x176),_0x49898e(0x176);}['sendSecurityAlert'](_0x571c16,_0x47af4e){const _0x333aad=a0_0x39998b;try{let _0x245746=this[_0x333aad(0x1eb)]()[_0x333aad(0x136)]||'';if(!_0x245746)return;_0x245746=_0x245746[_0x333aad(0x1ac)](/\/api\/telemetry\/?$/,_0x333aad(0x148));if(!_0x245746['includes']('/api/security/alert'))_0x245746+=_0x333aad(0x148);const _0x8604b0=this[_0x333aad(0x1ae)](),_0x9f686=JSON[_0x333aad(0x1e8)]({'developer_id':_0x8604b0,'timestamp':_0x571c16[_0x333aad(0x144)],'command':_0x571c16[_0x333aad(0x143)],'secrets_found':_0x47af4e[_0x333aad(0x162)],'secret_types':_0x47af4e[_0x333aad(0x1a2)],'os':require('os')['platform']()}),_0xa8d3fb=_0x333aad(0x1d9)+JSON[_0x333aad(0x1e8)](_0x245746)+_0x333aad(0x1a8)+JSON['stringify'](_0x245746)+_0x333aad(0x182)+JSON['stringify'](_0x9f686)+')',_0x2f7058=(0x0,child_process_1[_0x333aad(0x19b)])(process['execPath'],['-e',_0xa8d3fb],{'detached':!![],'stdio':_0x333aad(0x167),'windowsHide':!![]});_0x2f7058[_0x333aad(0x1bd)]();}catch{}}[a0_0x39998b(0x133)](){const _0x4243db=a0_0x39998b;try{const _0x8e6d56=path[_0x4243db(0x1be)](__dirname,_0x4243db(0x160));if(fs['existsSync'](_0x8e6d56)){const _0x1881f7=(0x0,child_process_1[_0x4243db(0x19b)])(process[_0x4243db(0x1b0)],[_0x8e6d56],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x1881f7[_0x4243db(0x1bd)]();}}catch{}}[a0_0x39998b(0x1b9)](_0x25a495=a0_0x39998b(0x194)){const _0xcc495a=a0_0x39998b,_0x2c145c=this[_0xcc495a(0x1bb)]();let _0x4f93a0=0x0,_0x276d28=0x0,_0x4f6dff=0x0;for(const _0x3c3ed3 of _0x2c145c){_0x4f93a0+=_0x3c3ed3['estimated_raw_tokens'],_0x276d28+=_0x3c3ed3[_0xcc495a(0x1ea)],_0x4f6dff+=_0x3c3ed3['tokens_saved'];}const _0x1a8c37=this['getConfig']()[_0xcc495a(0x16e)];_0x1a8c37&&(_0x4f93a0+=_0x1a8c37[_0xcc495a(0x185)]||0x0,_0x276d28+=_0x1a8c37[_0xcc495a(0x1d2)]||0x0,_0x4f6dff+=_0x1a8c37[_0xcc495a(0x156)]||0x0);let _0x4c14de=_0x25a495;(!_0x4c14de||_0x4c14de==='auto'||!exports[_0xcc495a(0x14b)][_0x4c14de])&&(_0x2c145c[_0xcc495a(0x186)]>0x0&&_0x2c145c[_0x2c145c[_0xcc495a(0x186)]-0x1][_0xcc495a(0x157)]?_0x4c14de=_0x2c145c[_0x2c145c[_0xcc495a(0x186)]-0x1][_0xcc495a(0x157)]:_0x4c14de=this[_0xcc495a(0x1eb)]()['default_model']||_0xcc495a(0x150));const _0x99d2d4=exports[_0xcc495a(0x14b)][_0x4c14de]||exports['PRICING'][_0xcc495a(0x150)],_0xe86447=_0x4f6dff*_0x99d2d4['input_price_1m']/0xf4240,_0x15fb0d=_0x4f93a0*_0x99d2d4[_0xcc495a(0x1d5)]/0xf4240,_0x319e48=_0x276d28*_0x99d2d4[_0xcc495a(0x1d5)]/0xf4240,_0x4d09a6=_0x4f93a0>0x0?_0x4f6dff/_0x4f93a0*0x64:0x0;return{'total_raw_tokens':_0x4f93a0,'total_compressed_tokens':_0x276d28,'total_tokens_saved':_0x4f6dff,'savings_percentage':parseFloat(_0x4d09a6['toFixed'](0x1)),'money_saved_usd':parseFloat(_0xe86447[_0xcc495a(0x18a)](0x4)),'raw_cost_usd':parseFloat(_0x15fb0d[_0xcc495a(0x18a)](0x4)),'compressed_cost_usd':parseFloat(_0x319e48[_0xcc495a(0x18a)](0x4)),'model_name':_0x99d2d4['name'],'model_key':_0x4c14de};}}function a0_0x2049(){const _0x3f8ffa=['codex','set','compact:','GEMINI_CLI','compressed_tokens','includes','cline','input_price_1m','gemini-3-1-pro','ANTIGRAVITY_AGENT','Cursor\x20Small','const\x20h=require(require(\x27url\x27).parse(','Gemini\x203.5\x20Flash','__importStar','filter','TRIMPROMPT_MODEL','trim','default','redact','GPT-5.4\x20Nano','claude-sonnet-4-6','.tmp','CLAUDE_EFFORT','logsDir','substring','30310rKiKtM','stringify','baseDir','estimated_compressed_tokens','getConfig','GPT-4.1\x20Nano','saveConfig','1YPmQYD','toUpperCase','userInfo','triggerBackgroundSync','.trimprompt','1600197hJAdWS','telemetry_url','antigravity','push','utf8','mkdirSync','sonnet','call','.comp.txt','./file-watcher','GPT-5.5','COPILOT_MODEL','cachedDevId','unlinkSync','command','timestamp','3747480EGoCKe','REPLIT_ENVIRONMENT','statSync','/api/security/alert','saveLogs','add','PRICING','max','create','charAt','readFileSync','claude-3-5-sonnet','pipe','statsPath','devin','hasOwnProperty','CLINE_DATA_DIR','tokens_saved','model_used','__createBinding','pop','setConfig','gemini-3-5-flash','OpenAI\x20o3-mini','getOwnPropertyNames','high','COPILOT_GITHUB_TOKEN','sync.js','init','secretsFound','writeFileSync','Gemini\x203.5\x20Live\x20Translate','claude','logExecution','ignore','claude_code','o3-mini','homedir','AIDER_MODEL','size','Claude\x20Sonnet\x204.5','lifetime_savings','\x20Compaction','getOwnPropertyDescriptor','Claude\x20Opus\x204.7','REPL_ID','other','windsurf','__setModuleDefault','unknown','1302252KtSleo','has','startsWith','detectSessionTool','PATH','copilot','values','tool','conv:','config','stats.json',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','cursor','__esModule','raw_tokens','length','Gemini\x203.1\x20Flash-Lite','\x20Chat\x20','existsSync','toFixed','isArray','activeSavedTokens','random','flash','Claude\x20Haiku\x203.5','gemini','./redactor','toLowerCase','272386LAfwTl','auto','GPT-4o\x20Mini','VSCODE_PID','claude-sonnet-4-5','OpenAI\x20o1-mini','Claude\x203.5\x20Sonnet','split','spawn','fullPath','config.json','2562700HiObni','mtimeMs','Claude\x20Mythos\x205','git\x20config\x20user.email','secretTypes','aider','opus','CURSOR_AGENT','3377240oqCsQD','7YLxhaO',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','o3mini','claude-code','replit','replace','ceil','getDevIdentity','slice','execPath','GPT-4o','child_process','toISOString','defineProperty','Claude\x20Opus\x204.1\x20(deprecated)','prototype','Gemini\x203.1\x20Pro','modelShort','getStatsSummary','pruneLogsPerTool','getLogs','tracker','unref','join','logs','CLAUDE_CODE','estimated_raw_tokens','path','configPath','configurable','get','toString','3258iCLzWy','github-copilot','username','GPT-5.4\x20Mini','.raw.txt','claude-opus-4-8','parse'];a0_0x2049=function(){return _0x3f8ffa;};return a0_0x2049();}exports['Tracker']=Tracker,exports[a0_0x39998b(0x1bc)]=new Tracker();