trimprompt 1.0.13 → 1.0.14
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/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x4d290=a0_0x1377;(function(_0x41dadb,_0xf48528){const _0x14cfb9=a0_0x1377,_0x1ee41c=_0x41dadb();while(!![]){try{const _0x39672d=parseInt(_0x14cfb9(0x13d))/0x1+parseInt(_0x14cfb9(0x150))/0x2+parseInt(_0x14cfb9(0x142))/0x3+parseInt(_0x14cfb9(0x103))/0x4+parseInt(_0x14cfb9(0x117))/0x5+parseInt(_0x14cfb9(0x13a))/0x6*(-parseInt(_0x14cfb9(0x12e))/0x7)+-parseInt(_0x14cfb9(0x15e))/0x8;if(_0x39672d===_0xf48528)break;else _0x1ee41c['push'](_0x1ee41c['shift']());}catch(_0x2b6373){_0x1ee41c['push'](_0x1ee41c['shift']());}}}(a0_0xabc6,0x3f2b1));function a0_0x1377(_0x296aa5,_0x4e7b6f){_0x296aa5=_0x296aa5-0xf6;const _0xabc6ef=a0_0xabc6();let _0x137792=_0xabc6ef[_0x296aa5];return _0x137792;}function a0_0xabc6(){const _0x4d6d03=['OpenAI\x20o1','14xqbVBW','auto','Claude\x20Mythos\x205','configPath','ANTIGRAVITY_AGENT','ceil','Gemini\x203.1\x20Pro','logsDir','getStatsSummary','claude-code','.comp.txt','claude','189078ZOwsjy','Gemini\x203.1\x20Flash-Lite','__esModule','235416UAFDlv','CLAUDE_CODE','GPT-4o','cline','unref','530193BaPBCa','o3-mini','high','modelShort','toFixed','homedir','setConfig','path','Claude\x20Opus\x204.5','github-copilot','OpenAI\x20o3-mini','tracker','logs','TRIMPROMPT_MODEL','628502FgtUma','gemini','mkdirSync','statsPath','Tracker','Claude\x203.5\x20Sonnet','AIDER_MODEL','hasOwnProperty','GPT-5.4\x20Mini','config.json','getOwnPropertyNames','Claude\x20Haiku\x203.5','GPT-5.4\x20Nano','aider','7926936nEqZEe','CURSOR_AGENT','Claude\x20Haiku\x204.5','existsSync','config','__createBinding','default_model','REPL_ID','REPLIT_ENVIRONMENT','claude-opus-4-8','readFileSync','tool','codex','split','model_used','CLAUDECODE','telemetry_url','getLogs','GPT-5.5','__setModuleDefault','Claude\x20Sonnet\x204.5','CONTINUE_GLOBAL_DIR','stringify','GPT-4.1\x20Mini','Cursor\x20Small','getConfig','sync.js','triggerBackgroundSync','parse','init','VSCODE_PID','detectSessionTool','COPILOT_MODEL','gemini-3-1-pro','windsurf','default','Claude\x20Opus\x204.8','replit','spawn','claude-sonnet-4-5','push','.raw.txt','logExecution','execPath','PRICING','OpenAI\x20o1-mini','devin','utf8','2038472yPsgAT','ignore','continue','GPT-4.1\x20Nano','prototype','antigravity','cursor','random','baseDir','claude-sonnet-4-6','create','length','Gemini\x203.5\x20Live\x20Translate','get','AI_AGENT','Gemini\x203.5\x20Flash','sonnet','name','Claude\x20Sonnet\x204.6','unknown','383070mHxrME','copilot','Claude\x20Opus\x204.7','toLowerCase','writeFileSync','saveConfig','opus','claude-3-5-sonnet','estimated_raw_tokens','gemini-3-5-flash','call','includes','CLAUDE_EFFORT','trim','pop','getOwnPropertyDescriptor','o3mini','model','defineProperty','input_price_1m','join','GPT-4o\x20Mini'];a0_0xabc6=function(){return _0x4d6d03;};return a0_0xabc6();}var __createBinding=this&&this[a0_0x4d290(0x163)]||(Object[a0_0x4d290(0x10d)]?function(_0x45db60,_0x16cbdd,_0x42402f,_0x33bff2){const _0x3ec6ee=a0_0x4d290;if(_0x33bff2===undefined)_0x33bff2=_0x42402f;var _0x2c6a45=Object[_0x3ec6ee(0x126)](_0x16cbdd,_0x42402f);(!_0x2c6a45||(_0x3ec6ee(0x110)in _0x2c6a45?!_0x16cbdd[_0x3ec6ee(0x13c)]:_0x2c6a45['writable']||_0x2c6a45['configurable']))&&(_0x2c6a45={'enumerable':!![],'get':function(){return _0x16cbdd[_0x42402f];}}),Object[_0x3ec6ee(0x129)](_0x45db60,_0x33bff2,_0x2c6a45);}:function(_0x36dc78,_0x75464b,_0x4dae80,_0x1aba68){if(_0x1aba68===undefined)_0x1aba68=_0x4dae80;_0x36dc78[_0x1aba68]=_0x75464b[_0x4dae80];}),__setModuleDefault=this&&this[a0_0x4d290(0x171)]||(Object['create']?function(_0x37f0e0,_0x2a5d36){const _0x57c0db=a0_0x4d290;Object['defineProperty'](_0x37f0e0,_0x57c0db(0xf6),{'enumerable':!![],'value':_0x2a5d36});}:function(_0x3097a7,_0x3f3938){const _0x5d6bf7=a0_0x4d290;_0x3097a7[_0x5d6bf7(0xf6)]=_0x3f3938;}),__importStar=this&&this['__importStar']||(function(){var _0x688321=function(_0x5b755d){const _0x36ef7f=a0_0x1377;return _0x688321=Object[_0x36ef7f(0x15a)]||function(_0x459491){const _0x5713af=_0x36ef7f;var _0x4734e1=[];for(var _0x509c6a in _0x459491)if(Object[_0x5713af(0x107)][_0x5713af(0x157)][_0x5713af(0x121)](_0x459491,_0x509c6a))_0x4734e1[_0x4734e1[_0x5713af(0x10e)]]=_0x509c6a;return _0x4734e1;},_0x688321(_0x5b755d);};return function(_0x341198){const _0x4965e4=a0_0x1377;if(_0x341198&&_0x341198[_0x4965e4(0x13c)])return _0x341198;var _0x1ab477={};if(_0x341198!=null){for(var _0x550399=_0x688321(_0x341198),_0x541068=0x0;_0x541068<_0x550399[_0x4965e4(0x10e)];_0x541068++)if(_0x550399[_0x541068]!==_0x4965e4(0xf6))__createBinding(_0x1ab477,_0x341198,_0x550399[_0x541068]);}return __setModuleDefault(_0x1ab477,_0x341198),_0x1ab477;};}());Object[a0_0x4d290(0x129)](exports,a0_0x4d290(0x13c),{'value':!![]}),exports['tracker']=exports[a0_0x4d290(0x154)]=exports[a0_0x4d290(0xff)]=void 0x0,exports[a0_0x4d290(0x17d)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x4d290(0x149))),os=__importStar(require('os')),child_process_1=require('child_process');exports[a0_0x4d290(0xff)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x4d290(0x130),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x4d290(0xf7),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x4d290(0x119),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x4d290(0x14a),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x4d290(0x115),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x4d290(0x172),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x4d290(0x155),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x4d290(0x160),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x4d290(0x15b),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x4d290(0x170),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x4d290(0x13f),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x4d290(0x158),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x4d290(0x15c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x4d290(0x175),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x4d290(0x106),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x4d290(0x12c),'input_price_1m':0.15},'o1':{'name':a0_0x4d290(0x12d),'input_price_1m':0xf},'o1-mini':{'name':a0_0x4d290(0x100),'input_price_1m':0x3},'o3-mini':{'name':a0_0x4d290(0x14c),'input_price_1m':1.1},'cursor-small':{'name':a0_0x4d290(0x176),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x4d290(0x134),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x4d290(0x112),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x4d290(0x13b),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x4d290(0x10f),'input_price_1m':3.5}};function detectSessionTool(){const _0x4bf28f=a0_0x4d290,_0x4e8559=process.env,_0x44709d={'tool':'','model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559['TRIMPROMPT_MODEL']&&exports[_0x4bf28f(0xff)][_0x4e8559[_0x4bf28f(0x14f)]])return{'tool':'','model':_0x4e8559[_0x4bf28f(0x14f)],'modelShort':''};const _0x448313=(_0x4e8559[_0x4bf28f(0x111)]||'')['toLowerCase']();if(_0x448313){if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x137))||_0x448313[_0x4bf28f(0x122)]('claude_code')){const _0x5017bf=_0x4e8559['CLAUDE_EFFORT']===_0x4bf28f(0x144)?_0x4bf28f(0x11d):_0x4bf28f(0x113),_0x3cf47a=_0x4e8559[_0x4bf28f(0x123)]===_0x4bf28f(0x144)?_0x4bf28f(0x167):_0x4bf28f(0x10c);return{'tool':_0x4bf28f(0x139),'model':_0x3cf47a,'modelShort':_0x5017bf};}if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x109)))return{'tool':_0x4bf28f(0x109),'model':'claude-sonnet-4-6','modelShort':_0x4bf28f(0x113)};if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x14b))||_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x118))){const _0x241196=_0x4e8559[_0x4bf28f(0x17e)]||'';if(_0x241196&&exports[_0x4bf28f(0xff)][_0x241196])return{'tool':_0x4bf28f(0x118),'model':_0x241196,'modelShort':_0x241196[_0x4bf28f(0x16b)]('-')[_0x4bf28f(0x125)]()||''};return{'tool':'copilot','model':_0x4bf28f(0xfa),'modelShort':'sonnet'};}if(_0x448313['includes'](_0x4bf28f(0x151)))return{'tool':_0x4bf28f(0x151),'model':_0x4bf28f(0x120),'modelShort':'flash'};if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x16a)))return{'tool':_0x4bf28f(0x16a),'model':_0x4bf28f(0x143),'modelShort':_0x4bf28f(0x127)};if(_0x448313['includes'](_0x4bf28f(0x101)))return{'tool':_0x4bf28f(0x101),'model':'claude-sonnet-4-6','modelShort':''};if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x108)))return{'tool':'antigravity','model':'gemini-3-1-pro','modelShort':_0x4bf28f(0x151)};if(_0x448313['includes']('replit')||_0x4e8559[_0x4bf28f(0x165)])return{'tool':_0x4bf28f(0xf8),'model':_0x4bf28f(0x10c),'modelShort':''};return{'tool':_0x448313[_0x4bf28f(0x16b)]('_')[0x0][_0x4bf28f(0x16b)]('-')[0x0],'model':_0x4bf28f(0x10c),'modelShort':''};}if(_0x4e8559[_0x4bf28f(0x16d)]==='1'||_0x4e8559[_0x4bf28f(0x13e)]==='1'){const _0x2b1826=_0x4e8559[_0x4bf28f(0x123)]===_0x4bf28f(0x144)?'opus':_0x4bf28f(0x113),_0x3958e0=_0x4e8559[_0x4bf28f(0x123)]===_0x4bf28f(0x144)?_0x4bf28f(0x167):_0x4bf28f(0x10c);return{'tool':_0x4bf28f(0x139),'model':_0x3958e0,'modelShort':_0x2b1826};}if(_0x4e8559[_0x4bf28f(0x15f)]==='1')return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x4e8559['GEMINI_CLI']==='1')return{'tool':_0x4bf28f(0x151),'model':'gemini-3-5-flash','modelShort':'flash'};if(_0x4e8559[_0x4bf28f(0x17e)]||_0x4e8559['COPILOT_GITHUB_TOKEN']){const _0x3873a0=_0x4e8559[_0x4bf28f(0x17e)]||'';if(_0x3873a0&&exports[_0x4bf28f(0xff)][_0x3873a0])return{'tool':_0x4bf28f(0x118),'model':_0x3873a0,'modelShort':_0x3873a0[_0x4bf28f(0x16b)]('-')[_0x4bf28f(0x125)]()||''};return{'tool':_0x4bf28f(0x118),'model':_0x4bf28f(0xfa),'modelShort':'sonnet'};}if(_0x4e8559['REPL_ID']||_0x4e8559[_0x4bf28f(0x166)])return{'tool':'replit','model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559['CLINE_DATA_DIR'])return{'tool':_0x4bf28f(0x140),'model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559[_0x4bf28f(0x173)])return{'tool':_0x4bf28f(0x105),'model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559[_0x4bf28f(0x132)]==='1')return{'tool':_0x4bf28f(0x108),'model':_0x4bf28f(0x17f),'modelShort':'gemini'};if(_0x4e8559['CLAUDE_EFFORT']){const _0xf6d893=_0x4e8559[_0x4bf28f(0x123)]==='high'?_0x4bf28f(0x11d):_0x4bf28f(0x113),_0x294219=_0x4e8559['CLAUDE_EFFORT']===_0x4bf28f(0x144)?_0x4bf28f(0x167):'claude-sonnet-4-6';return{'tool':'','model':_0x294219,'modelShort':''};}if(_0x4e8559['AIDER_MODEL']&&exports[_0x4bf28f(0xff)][_0x4e8559['AIDER_MODEL']])return{'tool':_0x4bf28f(0x15d),'model':_0x4e8559[_0x4bf28f(0x156)],'modelShort':''};if(_0x4e8559[_0x4bf28f(0x17c)]){const _0x52639a=(_0x4e8559['PATH']||'')[_0x4bf28f(0x11a)]();if(_0x52639a[_0x4bf28f(0x122)]('cursor'))return{'tool':_0x4bf28f(0x109),'model':_0x4bf28f(0x10c),'modelShort':_0x4bf28f(0x113)};if(_0x52639a[_0x4bf28f(0x122)]('windsurf'))return{'tool':_0x4bf28f(0x180),'model':_0x4bf28f(0x10c),'modelShort':_0x4bf28f(0x113)};}const _0x50c5b0=process.env.TRIMPROMPT_MODEL||'';if(_0x50c5b0&&exports[_0x4bf28f(0xff)][_0x50c5b0])return{'tool':'','model':_0x50c5b0,'modelShort':''};return _0x44709d;}class Tracker{['baseDir'];[a0_0x4d290(0x131)];[a0_0x4d290(0x153)];[a0_0x4d290(0x135)];[a0_0x4d290(0x162)];constructor(){const _0x1a139e=a0_0x4d290;this['baseDir']=path[_0x1a139e(0x12b)](os[_0x1a139e(0x147)](),'.trimprompt'),this[_0x1a139e(0x131)]=path[_0x1a139e(0x12b)](this[_0x1a139e(0x10b)],_0x1a139e(0x159)),this[_0x1a139e(0x153)]=path['join'](this[_0x1a139e(0x10b)],'stats.json'),this[_0x1a139e(0x135)]=path[_0x1a139e(0x12b)](this['baseDir'],_0x1a139e(0x14e)),this[_0x1a139e(0x17b)]();}['init'](){const _0x5a90d7=a0_0x4d290;!fs[_0x5a90d7(0x161)](this[_0x5a90d7(0x10b)])&&fs[_0x5a90d7(0x152)](this[_0x5a90d7(0x10b)],{'recursive':!![]});!fs[_0x5a90d7(0x161)](this['logsDir'])&&fs[_0x5a90d7(0x152)](this[_0x5a90d7(0x135)],{'recursive':!![]});const _0x38b580={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs['existsSync'](this[_0x5a90d7(0x131)]))try{const _0x2f03d0=fs[_0x5a90d7(0x168)](this[_0x5a90d7(0x131)],_0x5a90d7(0x102));this[_0x5a90d7(0x162)]={..._0x38b580,...JSON[_0x5a90d7(0x17a)](_0x2f03d0)};}catch(_0x497ec1){this['config']=_0x38b580;}else this[_0x5a90d7(0x162)]=_0x38b580,this[_0x5a90d7(0x11c)]();!fs[_0x5a90d7(0x161)](this[_0x5a90d7(0x153)])&&fs['writeFileSync'](this['statsPath'],JSON[_0x5a90d7(0x174)]([]),'utf8');}[a0_0x4d290(0x177)](){const _0x5acbab=a0_0x4d290;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x5acbab(0x162)][_0x5acbab(0x16e)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x5acbab(0x162)];}[a0_0x4d290(0x148)](_0x424e5f,_0x457172){const _0x2c299f=a0_0x4d290;this[_0x2c299f(0x162)][_0x424e5f]=_0x457172,this['saveConfig']();}['saveConfig'](){const _0x1d2933=a0_0x4d290;fs['writeFileSync'](this[_0x1d2933(0x131)],JSON[_0x1d2933(0x174)](this[_0x1d2933(0x162)],null,0x2),_0x1d2933(0x102));}[a0_0x4d290(0x16f)](){const _0xae4654=a0_0x4d290;try{if(!fs['existsSync'](this['statsPath']))return[];const _0x27f684=fs[_0xae4654(0x168)](this['statsPath'],_0xae4654(0x102));return JSON[_0xae4654(0x17a)](_0x27f684);}catch{return[];}}['saveLogs'](_0x47c698){const _0x36e78c=a0_0x4d290;fs[_0x36e78c(0x11b)](this['statsPath'],JSON['stringify'](_0x47c698,null,0x2),'utf8');}[a0_0x4d290(0xfd)](_0x1aebb9,_0x265dc5,_0x177c76,_0x500c2b){const _0x1232b8=a0_0x4d290,_0x36664c=this[_0x1232b8(0x16f)](),_0x201d5b=_0x265dc5[_0x1232b8(0x10e)],_0x2c9590=_0x177c76[_0x1232b8(0x10e)],_0xdf84ed=Math['ceil'](_0x201d5b/0x4),_0x54164a=Math[_0x1232b8(0x133)](_0x2c9590/0x4),_0x31b60c=Math['max'](0x0,_0xdf84ed-_0x54164a),_0x1754ed=detectSessionTool(),_0xd94a74=_0x1754ed[_0x1232b8(0x128)],_0x44e663=Math[_0x1232b8(0x10a)]()['toString'](0x24)['substring'](0x2,0xb);try{fs[_0x1232b8(0x11b)](path[_0x1232b8(0x12b)](this[_0x1232b8(0x135)],_0x44e663+_0x1232b8(0xfc)),_0x265dc5,_0x1232b8(0x102)),fs[_0x1232b8(0x11b)](path[_0x1232b8(0x12b)](this[_0x1232b8(0x135)],_0x44e663+_0x1232b8(0x138)),_0x177c76,_0x1232b8(0x102));}catch{}const _0x2b0063=_0x1aebb9[_0x1232b8(0x16b)]('\x20')[0x0]||_0x1232b8(0x116),_0xdfc62d=_0x1754ed['tool']?_0x1754ed[_0x1232b8(0x145)]?_0x1754ed[_0x1232b8(0x169)]+'-'+_0x1754ed[_0x1232b8(0x145)]+'-'+_0x2b0063:_0x1754ed[_0x1232b8(0x169)]+'-'+_0x2b0063:_0x2b0063,_0x645cf2={'id':_0x44e663,'timestamp':new Date()['toISOString'](),'command':_0xdfc62d,'raw_chars':_0x201d5b,'compressed_chars':_0x2c9590,'estimated_raw_tokens':_0xdf84ed,'estimated_compressed_tokens':_0x54164a,'tokens_saved':_0x31b60c,'model_used':_0xd94a74,'exit_code':_0x500c2b,'synced':![],'ai_detected':!!_0x1754ed[_0x1232b8(0x169)]};_0x36664c[_0x1232b8(0xfb)](_0x645cf2),this['saveLogs'](_0x36664c);const _0x5decd8=this[_0x1232b8(0x177)]()[_0x1232b8(0x16e)];return _0x5decd8&&_0x5decd8[_0x1232b8(0x124)]()['length']>0x0&&this[_0x1232b8(0x179)](),_0x645cf2;}[a0_0x4d290(0x179)](){const _0x4bd2da=a0_0x4d290;try{const _0x1c3153=path[_0x4bd2da(0x12b)](__dirname,_0x4bd2da(0x178));if(fs[_0x4bd2da(0x161)](_0x1c3153)){const _0x519022=(0x0,child_process_1[_0x4bd2da(0xf9)])(process[_0x4bd2da(0xfe)],[_0x1c3153],{'detached':!![],'stdio':_0x4bd2da(0x104)});_0x519022[_0x4bd2da(0x141)]();}}catch{}}[a0_0x4d290(0x136)](_0x34f01d='auto'){const _0x34132d=a0_0x4d290,_0x1b703a=this[_0x34132d(0x16f)]();let _0x5dd283=0x0,_0x10bfe6=0x0,_0x3d17db=0x0;for(const _0x5647d1 of _0x1b703a){_0x5dd283+=_0x5647d1[_0x34132d(0x11f)],_0x10bfe6+=_0x5647d1['estimated_compressed_tokens'],_0x3d17db+=_0x5647d1['tokens_saved'];}let _0x513722=_0x34f01d;(!_0x513722||_0x513722===_0x34132d(0x12f)||!exports['PRICING'][_0x513722])&&(_0x1b703a[_0x34132d(0x10e)]>0x0&&_0x1b703a[_0x1b703a['length']-0x1][_0x34132d(0x16c)]?_0x513722=_0x1b703a[_0x1b703a['length']-0x1][_0x34132d(0x16c)]:_0x513722=this[_0x34132d(0x177)]()[_0x34132d(0x164)]||_0x34132d(0x11e));const _0x5476c8=exports[_0x34132d(0xff)][_0x513722]||exports[_0x34132d(0xff)]['claude-3-5-sonnet'],_0x5ec739=_0x3d17db*_0x5476c8[_0x34132d(0x12a)]/0xf4240,_0x419aa3=_0x5dd283*_0x5476c8[_0x34132d(0x12a)]/0xf4240,_0x4e9bb1=_0x10bfe6*_0x5476c8['input_price_1m']/0xf4240,_0x12e91e=_0x5dd283>0x0?_0x3d17db/_0x5dd283*0x64:0x0;return{'total_raw_tokens':_0x5dd283,'total_compressed_tokens':_0x10bfe6,'total_tokens_saved':_0x3d17db,'savings_percentage':parseFloat(_0x12e91e[_0x34132d(0x146)](0x1)),'money_saved_usd':parseFloat(_0x5ec739[_0x34132d(0x146)](0x4)),'raw_cost_usd':parseFloat(_0x419aa3['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x4e9bb1[_0x34132d(0x146)](0x4)),'model_name':_0x5476c8[_0x34132d(0x114)],'model_key':_0x513722};}}exports[a0_0x4d290(0x154)]=Tracker,exports[a0_0x4d290(0x14d)]=new Tracker();
|
|
1
|
+
'use strict';const a0_0x59b9b3=a0_0x2843;function a0_0x439a(){const _0x343f26=['Claude\x20Mythos\x205','claude-sonnet-4-6','configPath','join','config.json','logExecution','__setModuleDefault','COPILOT_MODEL','model_used','toISOString','split','high','GPT-5.4\x20Mini','logsDir','saveLogs','mkdirSync','baseDir','1201PeTVuL','length','PRICING','Gemini\x203.1\x20Pro','create','1636749pLKhjG','sonnet','claude','init','windsurf','setConfig','pop','OpenAI\x20o1','unref','prototype','claude-sonnet-4-5','ceil','homedir','claude-opus-4-8','1982cgkYDd','toLowerCase','antigravity','__createBinding','gemini-3-1-pro','config','tokens_saved','writeFileSync','o3mini','1406804IHIuIN','claude-code','REPL_ID','GPT-4o\x20Mini','tracker','getOwnPropertyDescriptor','OpenAI\x20o1-mini','Claude\x20Opus\x204.1\x20(deprecated)','GEMINI_CLI','AIDER_MODEL','child_process','devin','getConfig','123780NvjZNO','TRIMPROMPT_MODEL','auto','Gemini\x203.5\x20Flash','default_model','stringify','CLAUDECODE','writable','name','125IwOzts','CLINE_DATA_DIR','Tracker','2318533Kgufdg','getOwnPropertyNames','get','COPILOT_GITHUB_TOKEN','saveConfig','getStatsSummary','GPT-5.4\x20Nano','continue','AI_AGENT','opus','readFileSync','statsPath','configurable','call','defineProperty','ignore','Gemini\x203.1\x20Flash-Lite','includes','GPT-5.5','.comp.txt','GPT-4o','Claude\x20Haiku\x204.5','triggerBackgroundSync','__esModule','Cursor\x20Small','stats.json','random','parse','estimated_raw_tokens','getLogs','claude-3-5-sonnet','Gemini\x203.5\x20Live\x20Translate','OpenAI\x20o3-mini','1.0','cursor','ANTIGRAVITY_AGENT','CURSOR_AGENT','aider','input_price_1m','copilot','8666536HdVYSC','existsSync','gemini-3-5-flash','Claude\x20Fable\x205','detectSessionTool','Claude\x20Sonnet\x204.5','substring','flash','cline','modelShort','gemini','default','unknown','max','utf8','GPT-4.1\x20Mini','16154910pOSPBf','Claude\x20Sonnet\x204.6','.raw.txt','CLAUDE_EFFORT','tool','REPLIT_ENVIRONMENT','replit','CLAUDE_CODE','github-copilot','toFixed','telemetry_url'];a0_0x439a=function(){return _0x343f26;};return a0_0x439a();}(function(_0x4b5e55,_0x1fa6ac){const _0x2a5304=a0_0x2843,_0x1ddfd2=_0x4b5e55();while(!![]){try{const _0xdb4de5=-parseInt(_0x2a5304(0xc3))/0x1*(parseInt(_0x2a5304(0xd6))/0x2)+parseInt(_0x2a5304(0xc8))/0x3+parseInt(_0x2a5304(0xdf))/0x4+-parseInt(_0x2a5304(0x6c))/0x5*(-parseInt(_0x2a5304(0xec))/0x6)+-parseInt(_0x2a5304(0x6f))/0x7+-parseInt(_0x2a5304(0x97))/0x8+parseInt(_0x2a5304(0xa7))/0x9;if(_0xdb4de5===_0x1fa6ac)break;else _0x1ddfd2['push'](_0x1ddfd2['shift']());}catch(_0x5d7485){_0x1ddfd2['push'](_0x1ddfd2['shift']());}}}(a0_0x439a,0x934a1));var __createBinding=this&&this[a0_0x59b9b3(0xd9)]||(Object[a0_0x59b9b3(0xc7)]?function(_0x469af7,_0x4a440a,_0xeb3266,_0x5960e0){const _0xe91b62=a0_0x59b9b3;if(_0x5960e0===undefined)_0x5960e0=_0xeb3266;var _0x5a1426=Object[_0xe91b62(0xe4)](_0x4a440a,_0xeb3266);(!_0x5a1426||(_0xe91b62(0x71)in _0x5a1426?!_0x4a440a[_0xe91b62(0x86)]:_0x5a1426[_0xe91b62(0x6a)]||_0x5a1426[_0xe91b62(0x7b)]))&&(_0x5a1426={'enumerable':!![],'get':function(){return _0x4a440a[_0xeb3266];}}),Object[_0xe91b62(0x7d)](_0x469af7,_0x5960e0,_0x5a1426);}:function(_0x1e85ec,_0x27e55b,_0x4cd560,_0x34ba09){if(_0x34ba09===undefined)_0x34ba09=_0x4cd560;_0x1e85ec[_0x34ba09]=_0x27e55b[_0x4cd560];}),__setModuleDefault=this&&this[a0_0x59b9b3(0xb8)]||(Object[a0_0x59b9b3(0xc7)]?function(_0x1ff74e,_0xb4a79){const _0x275538=a0_0x59b9b3;Object[_0x275538(0x7d)](_0x1ff74e,_0x275538(0xa2),{'enumerable':!![],'value':_0xb4a79});}:function(_0x303a90,_0x51b71b){const _0x1295da=a0_0x59b9b3;_0x303a90[_0x1295da(0xa2)]=_0x51b71b;}),__importStar=this&&this['__importStar']||(function(){var _0x664b5a=function(_0x41953d){const _0x5074c3=a0_0x2843;return _0x664b5a=Object[_0x5074c3(0x70)]||function(_0x3b610c){const _0x2cdd5e=_0x5074c3;var _0x588a82=[];for(var _0x3ff54c in _0x3b610c)if(Object[_0x2cdd5e(0xd1)]['hasOwnProperty'][_0x2cdd5e(0x7c)](_0x3b610c,_0x3ff54c))_0x588a82[_0x588a82[_0x2cdd5e(0xc4)]]=_0x3ff54c;return _0x588a82;},_0x664b5a(_0x41953d);};return function(_0xa98401){const _0x46b0dc=a0_0x2843;if(_0xa98401&&_0xa98401[_0x46b0dc(0x86)])return _0xa98401;var _0x2bbe97={};if(_0xa98401!=null){for(var _0x2bebb8=_0x664b5a(_0xa98401),_0x2f0ce1=0x0;_0x2f0ce1<_0x2bebb8[_0x46b0dc(0xc4)];_0x2f0ce1++)if(_0x2bebb8[_0x2f0ce1]!==_0x46b0dc(0xa2))__createBinding(_0x2bbe97,_0xa98401,_0x2bebb8[_0x2f0ce1]);}return __setModuleDefault(_0x2bbe97,_0xa98401),_0x2bbe97;};}());Object[a0_0x59b9b3(0x7d)](exports,a0_0x59b9b3(0x86),{'value':!![]}),exports[a0_0x59b9b3(0xe3)]=exports['Tracker']=exports[a0_0x59b9b3(0xc5)]=void 0x0,exports[a0_0x59b9b3(0x9b)]=detectSessionTool;function a0_0x2843(_0x1218e1,_0x2e4e06){_0x1218e1=_0x1218e1-0x65;const _0x439a80=a0_0x439a();let _0x284310=_0x439a80[_0x1218e1];return _0x284310;}const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),child_process_1=require(a0_0x59b9b3(0xe9));exports[a0_0x59b9b3(0xc5)]={'claude-fable-5':{'name':a0_0x59b9b3(0x9a),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x59b9b3(0xb2),'input_price_1m':0xa},'claude-opus-4-8':{'name':'Claude\x20Opus\x204.8','input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x59b9b3(0xe6),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x59b9b3(0xa8),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x59b9b3(0x9c),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x59b9b3(0x84),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x59b9b3(0x81),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x59b9b3(0x83),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x59b9b3(0xbe),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x59b9b3(0x75),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x59b9b3(0xa6),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x59b9b3(0xe2),'input_price_1m':0.15},'o1':{'name':a0_0x59b9b3(0xcf),'input_price_1m':0xf},'o1-mini':{'name':a0_0x59b9b3(0xe5),'input_price_1m':0x3},'o3-mini':{'name':a0_0x59b9b3(0x8f),'input_price_1m':1.1},'cursor-small':{'name':a0_0x59b9b3(0x87),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x59b9b3(0xc6),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x59b9b3(0x66),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x59b9b3(0x7f),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x59b9b3(0x8e),'input_price_1m':3.5}};function detectSessionTool(){const _0x394341=a0_0x59b9b3,_0x39aec9=process.env,_0x532c5a={'tool':'','model':_0x394341(0xb3),'modelShort':''};if(_0x39aec9[_0x394341(0xed)]&&exports['PRICING'][_0x39aec9[_0x394341(0xed)]])return{'tool':'','model':_0x39aec9[_0x394341(0xed)],'modelShort':''};const _0x2ecdf3=(_0x39aec9[_0x394341(0x77)]||'')[_0x394341(0xd7)]();if(_0x2ecdf3){if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xe0))||_0x2ecdf3[_0x394341(0x80)]('claude_code')){const _0x166cac=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?_0x394341(0x78):'sonnet',_0x4a4c4e=_0x39aec9[_0x394341(0xaa)]==='high'?'claude-opus-4-8':_0x394341(0xb3);return{'tool':_0x394341(0xca),'model':_0x4a4c4e,'modelShort':_0x166cac};}if(_0x2ecdf3['includes']('cursor'))return{'tool':_0x394341(0x91),'model':_0x394341(0xb3),'modelShort':_0x394341(0xc9)};if(_0x2ecdf3['includes'](_0x394341(0xaf))||_0x2ecdf3[_0x394341(0x80)](_0x394341(0x96))){const _0x573c62=_0x39aec9['COPILOT_MODEL']||'';if(_0x573c62&&exports[_0x394341(0xc5)][_0x573c62])return{'tool':_0x394341(0x96),'model':_0x573c62,'modelShort':_0x573c62[_0x394341(0xbc)]('-')['pop']()||''};return{'tool':_0x394341(0x96),'model':_0x394341(0xd2),'modelShort':_0x394341(0xc9)};}if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xa1)))return{'tool':_0x394341(0xa1),'model':'gemini-3-5-flash','modelShort':_0x394341(0x9e)};if(_0x2ecdf3['includes']('codex'))return{'tool':'codex','model':'o3-mini','modelShort':_0x394341(0xde)};if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xea)))return{'tool':_0x394341(0xea),'model':_0x394341(0xb3),'modelShort':''};if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xd8)))return{'tool':_0x394341(0xd8),'model':_0x394341(0xda),'modelShort':_0x394341(0xa1)};if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xad))||_0x39aec9[_0x394341(0xe1)])return{'tool':_0x394341(0xad),'model':_0x394341(0xb3),'modelShort':''};return{'tool':_0x2ecdf3[_0x394341(0xbc)]('_')[0x0][_0x394341(0xbc)]('-')[0x0],'model':_0x394341(0xb3),'modelShort':''};}if(_0x39aec9[_0x394341(0x69)]==='1'||_0x39aec9[_0x394341(0xae)]==='1'){const _0x5f187e=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?_0x394341(0x78):_0x394341(0xc9),_0x39d4dc=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?'claude-opus-4-8':_0x394341(0xb3);return{'tool':_0x394341(0xca),'model':_0x39d4dc,'modelShort':_0x5f187e};}if(_0x39aec9[_0x394341(0x93)]==='1')return{'tool':_0x394341(0x91),'model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x39aec9[_0x394341(0xe7)]==='1')return{'tool':_0x394341(0xa1),'model':_0x394341(0x99),'modelShort':_0x394341(0x9e)};if(_0x39aec9[_0x394341(0xb9)]||_0x39aec9[_0x394341(0x72)]){const _0x4b99ef=_0x39aec9['COPILOT_MODEL']||'';if(_0x4b99ef&&exports[_0x394341(0xc5)][_0x4b99ef])return{'tool':_0x394341(0x96),'model':_0x4b99ef,'modelShort':_0x4b99ef[_0x394341(0xbc)]('-')[_0x394341(0xce)]()||''};return{'tool':_0x394341(0x96),'model':_0x394341(0xd2),'modelShort':_0x394341(0xc9)};}if(_0x39aec9[_0x394341(0xe1)]||_0x39aec9[_0x394341(0xac)])return{'tool':_0x394341(0xad),'model':'claude-sonnet-4-6','modelShort':''};if(_0x39aec9[_0x394341(0x6d)])return{'tool':_0x394341(0x9f),'model':_0x394341(0xb3),'modelShort':''};if(_0x39aec9['CONTINUE_GLOBAL_DIR'])return{'tool':_0x394341(0x76),'model':'claude-sonnet-4-6','modelShort':''};if(_0x39aec9[_0x394341(0x92)]==='1')return{'tool':_0x394341(0xd8),'model':_0x394341(0xda),'modelShort':_0x394341(0xa1)};if(_0x39aec9[_0x394341(0xaa)]){const _0x9b894a=_0x39aec9['CLAUDE_EFFORT']==='high'?_0x394341(0x78):_0x394341(0xc9),_0x2cf160=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?_0x394341(0xd5):_0x394341(0xb3);return{'tool':'','model':_0x2cf160,'modelShort':''};}if(_0x39aec9[_0x394341(0xe8)]&&exports[_0x394341(0xc5)][_0x39aec9['AIDER_MODEL']])return{'tool':_0x394341(0x94),'model':_0x39aec9[_0x394341(0xe8)],'modelShort':''};if(_0x39aec9['VSCODE_PID']){const _0x49553b=(_0x39aec9['PATH']||'')['toLowerCase']();if(_0x49553b[_0x394341(0x80)]('cursor'))return{'tool':_0x394341(0x91),'model':_0x394341(0xb3),'modelShort':_0x394341(0xc9)};if(_0x49553b[_0x394341(0x80)](_0x394341(0xcc)))return{'tool':'windsurf','model':_0x394341(0xb3),'modelShort':'sonnet'};}const _0x1a9cf4=process.env.TRIMPROMPT_MODEL||'';if(_0x1a9cf4&&exports[_0x394341(0xc5)][_0x1a9cf4])return{'tool':'','model':_0x1a9cf4,'modelShort':''};return _0x532c5a;}class Tracker{['baseDir'];['configPath'];['statsPath'];[a0_0x59b9b3(0xbf)];[a0_0x59b9b3(0xdb)];constructor(){const _0xa95d8=a0_0x59b9b3;this[_0xa95d8(0xc2)]=path['join'](os[_0xa95d8(0xd4)](),'.trimprompt'),this[_0xa95d8(0xb4)]=path[_0xa95d8(0xb5)](this[_0xa95d8(0xc2)],_0xa95d8(0xb6)),this[_0xa95d8(0x7a)]=path[_0xa95d8(0xb5)](this[_0xa95d8(0xc2)],_0xa95d8(0x88)),this[_0xa95d8(0xbf)]=path['join'](this[_0xa95d8(0xc2)],'logs'),this['init']();}[a0_0x59b9b3(0xcb)](){const _0x4755aa=a0_0x59b9b3;!fs[_0x4755aa(0x98)](this[_0x4755aa(0xc2)])&&fs[_0x4755aa(0xc1)](this[_0x4755aa(0xc2)],{'recursive':!![]});!fs['existsSync'](this[_0x4755aa(0xbf)])&&fs[_0x4755aa(0xc1)](this[_0x4755aa(0xbf)],{'recursive':!![]});const _0x2f6fbc={'version':_0x4755aa(0x90),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x4755aa(0xd5)};if(fs['existsSync'](this[_0x4755aa(0xb4)]))try{const _0x323e7a=fs[_0x4755aa(0x79)](this['configPath'],'utf8');this['config']={..._0x2f6fbc,...JSON[_0x4755aa(0x8a)](_0x323e7a)};}catch(_0x1a1c42){this[_0x4755aa(0xdb)]=_0x2f6fbc;}else this[_0x4755aa(0xdb)]=_0x2f6fbc,this[_0x4755aa(0x73)]();!fs[_0x4755aa(0x98)](this[_0x4755aa(0x7a)])&&fs[_0x4755aa(0xdd)](this['statsPath'],JSON[_0x4755aa(0x68)]([]),_0x4755aa(0xa5));}['getConfig'](){const _0x46a4e2=a0_0x59b9b3;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x46a4e2(0xdb)][_0x46a4e2(0xb1)]=process.env.TRIMPROMPT_TELEMETRY_URL),this['config'];}[a0_0x59b9b3(0xcd)](_0x4272bf,_0x20649e){const _0x127644=a0_0x59b9b3;this[_0x127644(0xdb)][_0x4272bf]=_0x20649e,this[_0x127644(0x73)]();}['saveConfig'](){const _0x38e5da=a0_0x59b9b3;fs[_0x38e5da(0xdd)](this[_0x38e5da(0xb4)],JSON[_0x38e5da(0x68)](this['config'],null,0x2),'utf8');}[a0_0x59b9b3(0x8c)](){const _0x5ade31=a0_0x59b9b3;try{if(!fs[_0x5ade31(0x98)](this[_0x5ade31(0x7a)]))return[];const _0xfa6b9=fs[_0x5ade31(0x79)](this[_0x5ade31(0x7a)],'utf8');return JSON[_0x5ade31(0x8a)](_0xfa6b9);}catch{return[];}}[a0_0x59b9b3(0xc0)](_0x2737a4){const _0x10b6fc=a0_0x59b9b3;fs['writeFileSync'](this[_0x10b6fc(0x7a)],JSON[_0x10b6fc(0x68)](_0x2737a4,null,0x2),_0x10b6fc(0xa5));}[a0_0x59b9b3(0xb7)](_0x381bca,_0x25ba46,_0x2d1d66,_0x29f057){const _0x438ed6=a0_0x59b9b3,_0x1315f2=this[_0x438ed6(0x8c)](),_0x628f08=_0x25ba46[_0x438ed6(0xc4)],_0xdbab74=_0x2d1d66[_0x438ed6(0xc4)],_0x94f584=Math[_0x438ed6(0xd3)](_0x628f08/0x4),_0x2b5df6=Math[_0x438ed6(0xd3)](_0xdbab74/0x4),_0x2f45dc=Math[_0x438ed6(0xa4)](0x0,_0x94f584-_0x2b5df6),_0x3b1bd1=detectSessionTool(),_0x2f88a0=_0x3b1bd1['model'],_0x4c46fe=Math[_0x438ed6(0x89)]()['toString'](0x24)[_0x438ed6(0x9d)](0x2,0xb);try{fs['writeFileSync'](path[_0x438ed6(0xb5)](this['logsDir'],_0x4c46fe+_0x438ed6(0xa9)),_0x25ba46,_0x438ed6(0xa5)),fs[_0x438ed6(0xdd)](path[_0x438ed6(0xb5)](this[_0x438ed6(0xbf)],_0x4c46fe+_0x438ed6(0x82)),_0x2d1d66,_0x438ed6(0xa5));}catch{}const _0x42796f=_0x381bca[_0x438ed6(0xbc)]('\x20')[0x0]||_0x438ed6(0xa3),_0x257faf=_0x3b1bd1['tool']?_0x3b1bd1[_0x438ed6(0xa0)]?_0x3b1bd1[_0x438ed6(0xab)]+'-'+_0x3b1bd1[_0x438ed6(0xa0)]+'-'+_0x42796f:_0x3b1bd1[_0x438ed6(0xab)]+'-'+_0x42796f:_0x42796f,_0x4a91d6={'id':_0x4c46fe,'timestamp':new Date()[_0x438ed6(0xbb)](),'command':_0x257faf,'raw_chars':_0x628f08,'compressed_chars':_0xdbab74,'estimated_raw_tokens':_0x94f584,'estimated_compressed_tokens':_0x2b5df6,'tokens_saved':_0x2f45dc,'model_used':_0x2f88a0,'exit_code':_0x29f057,'synced':![],'ai_detected':!!_0x3b1bd1[_0x438ed6(0xab)]};_0x1315f2['push'](_0x4a91d6),this[_0x438ed6(0xc0)](_0x1315f2);const _0x3a46c=this['getConfig']()[_0x438ed6(0xb1)];return _0x3a46c&&_0x3a46c['trim']()[_0x438ed6(0xc4)]>0x0&&this[_0x438ed6(0x85)](),_0x4a91d6;}[a0_0x59b9b3(0x85)](){const _0x9d01ee=a0_0x59b9b3;try{const _0x112ba8=path[_0x9d01ee(0xb5)](__dirname,'sync.js');if(fs[_0x9d01ee(0x98)](_0x112ba8)){const _0xb2b391=(0x0,child_process_1['spawn'])(process['execPath'],[_0x112ba8],{'detached':!![],'stdio':_0x9d01ee(0x7e)});_0xb2b391[_0x9d01ee(0xd0)]();}}catch{}}[a0_0x59b9b3(0x74)](_0x375b48=a0_0x59b9b3(0x65)){const _0x537be5=a0_0x59b9b3,_0x5e97e8=this[_0x537be5(0x8c)]();let _0x41ad74=0x0,_0x27c4f1=0x0,_0x402ddc=0x0;for(const _0x19cabd of _0x5e97e8){_0x41ad74+=_0x19cabd[_0x537be5(0x8b)],_0x27c4f1+=_0x19cabd['estimated_compressed_tokens'],_0x402ddc+=_0x19cabd[_0x537be5(0xdc)];}let _0x137c97=_0x375b48;(!_0x137c97||_0x137c97===_0x537be5(0x65)||!exports['PRICING'][_0x137c97])&&(_0x5e97e8['length']>0x0&&_0x5e97e8[_0x5e97e8[_0x537be5(0xc4)]-0x1][_0x537be5(0xba)]?_0x137c97=_0x5e97e8[_0x5e97e8[_0x537be5(0xc4)]-0x1][_0x537be5(0xba)]:_0x137c97=this[_0x537be5(0xeb)]()[_0x537be5(0x67)]||_0x537be5(0x8d));const _0x3e3d05=exports[_0x537be5(0xc5)][_0x137c97]||exports[_0x537be5(0xc5)][_0x537be5(0x8d)],_0x55d5b8=_0x402ddc*_0x3e3d05[_0x537be5(0x95)]/0xf4240,_0x192f0d=_0x41ad74*_0x3e3d05[_0x537be5(0x95)]/0xf4240,_0x48621e=_0x27c4f1*_0x3e3d05['input_price_1m']/0xf4240,_0x54f569=_0x41ad74>0x0?_0x402ddc/_0x41ad74*0x64:0x0;return{'total_raw_tokens':_0x41ad74,'total_compressed_tokens':_0x27c4f1,'total_tokens_saved':_0x402ddc,'savings_percentage':parseFloat(_0x54f569[_0x537be5(0xb0)](0x1)),'money_saved_usd':parseFloat(_0x55d5b8[_0x537be5(0xb0)](0x4)),'raw_cost_usd':parseFloat(_0x192f0d[_0x537be5(0xb0)](0x4)),'compressed_cost_usd':parseFloat(_0x48621e[_0x537be5(0xb0)](0x4)),'model_name':_0x3e3d05[_0x537be5(0x6b)],'model_key':_0x137c97};}}exports[a0_0x59b9b3(0x6e)]=Tracker,exports[a0_0x59b9b3(0xe3)]=new Tracker();
|