trimprompt 1.0.41 → 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/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +493 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.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/hooks/claude-hook.js +1 -1
- package/mcp.js +1 -1
- package/package.json +2 -2
- package/postinstall.js +21 -0
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +387 -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_0xbf0b41=a0_0x62f7;(function(_0x569471,_0x419379){const _0x1ecf62=a0_0x62f7,_0x125f55=_0x569471();while(!![]){try{const _0x357aa5=parseInt(_0x1ecf62(0x17d))/0x1+-parseInt(_0x1ecf62(0x13c))/0x2+parseInt(_0x1ecf62(0x16e))/0x3*(parseInt(_0x1ecf62(0x105))/0x4)+parseInt(_0x1ecf62(0x124))/0x5+-parseInt(_0x1ecf62(0x134))/0x6*(-parseInt(_0x1ecf62(0x165))/0x7)+parseInt(_0x1ecf62(0x195))/0x8+-parseInt(_0x1ecf62(0x185))/0x9;if(_0x357aa5===_0x419379)break;else _0x125f55['push'](_0x125f55['shift']());}catch(_0x47c9d4){_0x125f55['push'](_0x125f55['shift']());}}}(a0_0x3f36,0xa3529));var __createBinding=this&&this['__createBinding']||(Object[a0_0xbf0b41(0x183)]?function(_0x273e79,_0x381ce1,_0x45729b,_0x497715){const _0x25a07e=a0_0xbf0b41;if(_0x497715===undefined)_0x497715=_0x45729b;var _0x58400c=Object['getOwnPropertyDescriptor'](_0x381ce1,_0x45729b);(!_0x58400c||(_0x25a07e(0x129)in _0x58400c?!_0x381ce1[_0x25a07e(0x115)]:_0x58400c[_0x25a07e(0xf7)]||_0x58400c[_0x25a07e(0x120)]))&&(_0x58400c={'enumerable':!![],'get':function(){return _0x381ce1[_0x45729b];}}),Object[_0x25a07e(0x11b)](_0x273e79,_0x497715,_0x58400c);}:function(_0x269642,_0x1a8107,_0x476c25,_0x38c0fc){if(_0x38c0fc===undefined)_0x38c0fc=_0x476c25;_0x269642[_0x38c0fc]=_0x1a8107[_0x476c25];}),__setModuleDefault=this&&this[a0_0xbf0b41(0x182)]||(Object['create']?function(_0x4c2a92,_0x24d826){const _0x4853c7=a0_0xbf0b41;Object[_0x4853c7(0x11b)](_0x4c2a92,_0x4853c7(0x116),{'enumerable':!![],'value':_0x24d826});}:function(_0x823631,_0x12fb2b){_0x823631['default']=_0x12fb2b;}),__importStar=this&&this['__importStar']||(function(){var _0x3cf644=function(_0x3d1cde){const _0x1a6984=a0_0x62f7;return _0x3cf644=Object[_0x1a6984(0x11e)]||function(_0x5b832f){const _0x2e7ac9=_0x1a6984;var _0x162ef1=[];for(var _0x5b73a5 in _0x5b832f)if(Object[_0x2e7ac9(0x17f)][_0x2e7ac9(0x111)][_0x2e7ac9(0xfd)](_0x5b832f,_0x5b73a5))_0x162ef1[_0x162ef1[_0x2e7ac9(0xf4)]]=_0x5b73a5;return _0x162ef1;},_0x3cf644(_0x3d1cde);};return function(_0x522785){const _0x39303e=a0_0x62f7;if(_0x522785&&_0x522785[_0x39303e(0x115)])return _0x522785;var _0x22b160={};if(_0x522785!=null){for(var _0x328120=_0x3cf644(_0x522785),_0x369d9e=0x0;_0x369d9e<_0x328120[_0x39303e(0xf4)];_0x369d9e++)if(_0x328120[_0x369d9e]!==_0x39303e(0x116))__createBinding(_0x22b160,_0x522785,_0x328120[_0x369d9e]);}return __setModuleDefault(_0x22b160,_0x522785),_0x22b160;};}());Object['defineProperty'](exports,a0_0xbf0b41(0x115),{'value':!![]}),exports[a0_0xbf0b41(0x18b)]=exports[a0_0xbf0b41(0x158)]=exports[a0_0xbf0b41(0x11f)]=void 0x0,exports[a0_0xbf0b41(0x149)]=detectSessionTool;function a0_0x62f7(_0x43b656,_0x362984){_0x43b656=_0x43b656-0xea;const _0x3f3638=a0_0x3f36();let _0x62f78e=_0x3f3638[_0x43b656];return _0x62f78e;}const fs=__importStar(require('fs')),path=__importStar(require(a0_0xbf0b41(0x123))),os=__importStar(require('os')),child_process_1=require(a0_0xbf0b41(0x169));exports[a0_0xbf0b41(0x11f)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0xbf0b41(0x145),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0xbf0b41(0x10d),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0xbf0b41(0x130),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0xbf0b41(0xf2),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0xbf0b41(0x164),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0xbf0b41(0x17b),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0xbf0b41(0x192),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0xbf0b41(0x14c),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0xbf0b41(0x102),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0xbf0b41(0x18e),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0xbf0b41(0x141),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0xbf0b41(0x175),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0xbf0b41(0x131),'input_price_1m':0xf},'o1-mini':{'name':a0_0xbf0b41(0x12d),'input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0xbf0b41(0x160),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0xbf0b41(0x144),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0xbf0b41(0x15a),'input_price_1m':3.5}};function detectSessionTool(){const _0x45e3f4=a0_0xbf0b41,_0x5605c1=process.env,_0x43f394={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x5605c1[_0x45e3f4(0x161)]&&exports['PRICING'][_0x5605c1['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x5605c1[_0x45e3f4(0x161)],'modelShort':''};const _0x3994c2=(_0x5605c1[_0x45e3f4(0x15d)]||'')[_0x45e3f4(0x11c)]();if(_0x3994c2){if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x128))||_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x15b))){const _0x44bad6=_0x5605c1[_0x45e3f4(0xf9)]==='high'?'opus':_0x45e3f4(0x101),_0x2c6aba=_0x5605c1['CLAUDE_EFFORT']===_0x45e3f4(0x125)?'claude-opus-4-8':_0x45e3f4(0x152);return{'tool':_0x45e3f4(0x194),'model':_0x2c6aba,'modelShort':_0x44bad6};}if(_0x3994c2['includes']('cursor'))return{'tool':_0x45e3f4(0x157),'model':_0x45e3f4(0x152),'modelShort':_0x45e3f4(0x101)};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0xed))||_0x3994c2[_0x45e3f4(0x170)]('copilot')){const _0x482201=_0x5605c1[_0x45e3f4(0x19d)]||'';if(_0x482201&&exports['PRICING'][_0x482201])return{'tool':_0x45e3f4(0x18a),'model':_0x482201,'modelShort':_0x482201[_0x45e3f4(0x13a)]('-')['pop']()||''};return{'tool':_0x45e3f4(0x18a),'model':_0x45e3f4(0x148),'modelShort':_0x45e3f4(0x101)};}if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x191)))return{'tool':'gemini','model':_0x45e3f4(0x147),'modelShort':'flash'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x132)))return{'tool':'codex','model':_0x45e3f4(0x12a),'modelShort':'o3mini'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x16c)))return{'tool':_0x45e3f4(0x16c),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x3994c2['includes'](_0x45e3f4(0x19c)))return{'tool':_0x45e3f4(0x19c),'model':_0x45e3f4(0x108),'modelShort':'gemini'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x19b))||_0x5605c1[_0x45e3f4(0x119)])return{'tool':_0x45e3f4(0x19b),'model':_0x45e3f4(0x152),'modelShort':''};return{'tool':_0x3994c2['split']('_')[0x0]['split']('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x5605c1[_0x45e3f4(0x155)]==='1'||_0x5605c1[_0x45e3f4(0xfa)]==='1'){const _0x7108d=_0x5605c1[_0x45e3f4(0xf9)]===_0x45e3f4(0x125)?_0x45e3f4(0x189):_0x45e3f4(0x101),_0x43b488=_0x5605c1['CLAUDE_EFFORT']==='high'?_0x45e3f4(0xff):_0x45e3f4(0x152);return{'tool':_0x45e3f4(0x194),'model':_0x43b488,'modelShort':_0x7108d};}if(_0x5605c1[_0x45e3f4(0x127)]==='1')return{'tool':_0x45e3f4(0x157),'model':'claude-sonnet-4-6','modelShort':_0x45e3f4(0x101)};if(_0x5605c1[_0x45e3f4(0x143)]==='1')return{'tool':_0x45e3f4(0x191),'model':_0x45e3f4(0x147),'modelShort':_0x45e3f4(0x136)};if(_0x5605c1['COPILOT_MODEL']||_0x5605c1[_0x45e3f4(0x10b)]){const _0x43b82d=_0x5605c1[_0x45e3f4(0x19d)]||'';if(_0x43b82d&&exports[_0x45e3f4(0x11f)][_0x43b82d])return{'tool':_0x45e3f4(0x18a),'model':_0x43b82d,'modelShort':_0x43b82d[_0x45e3f4(0x13a)]('-')[_0x45e3f4(0x178)]()||''};return{'tool':'copilot','model':_0x45e3f4(0x148),'modelShort':'sonnet'};}if(_0x5605c1[_0x45e3f4(0x119)]||_0x5605c1['REPLIT_ENVIRONMENT'])return{'tool':_0x45e3f4(0x19b),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1['CLINE_DATA_DIR'])return{'tool':_0x45e3f4(0x174),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1[_0x45e3f4(0x12f)])return{'tool':_0x45e3f4(0x133),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1[_0x45e3f4(0xf1)]==='1')return{'tool':'antigravity','model':_0x45e3f4(0x108),'modelShort':_0x45e3f4(0x191)};if(_0x5605c1[_0x45e3f4(0xf9)]){const _0xe25dca=_0x5605c1[_0x45e3f4(0xf9)]==='high'?_0x45e3f4(0x189):'sonnet',_0x15c98f=_0x5605c1[_0x45e3f4(0xf9)]==='high'?_0x45e3f4(0xff):_0x45e3f4(0x152);return{'tool':'','model':_0x15c98f,'modelShort':''};}if(_0x5605c1[_0x45e3f4(0x177)]&&exports['PRICING'][_0x5605c1[_0x45e3f4(0x177)]])return{'tool':_0x45e3f4(0x198),'model':_0x5605c1[_0x45e3f4(0x177)],'modelShort':''};if(_0x5605c1['VSCODE_PID']){const _0x339a7f=(_0x5605c1['PATH']||'')[_0x45e3f4(0x11c)]();if(_0x339a7f[_0x45e3f4(0x170)](_0x45e3f4(0x157)))return{'tool':_0x45e3f4(0x157),'model':_0x45e3f4(0x152),'modelShort':_0x45e3f4(0x101)};if(_0x339a7f[_0x45e3f4(0x170)](_0x45e3f4(0x19a)))return{'tool':_0x45e3f4(0x19a),'model':'claude-sonnet-4-6','modelShort':_0x45e3f4(0x101)};}const _0xb65c29=process.env.TRIMPROMPT_MODEL||'';if(_0xb65c29&&exports[_0x45e3f4(0x11f)][_0xb65c29])return{'tool':'','model':_0xb65c29,'modelShort':''};return _0x43f394;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0xbf0b41(0x13f)];[a0_0xbf0b41(0x12b)];[a0_0xbf0b41(0x121)];[a0_0xbf0b41(0x142)];['config'];constructor(){const _0x33ff5c=a0_0xbf0b41;this['baseDir']=path[_0x33ff5c(0xea)](os[_0x33ff5c(0xfc)](),_0x33ff5c(0x159)),this['configPath']=path[_0x33ff5c(0xea)](this['baseDir'],_0x33ff5c(0x18d)),this[_0x33ff5c(0x121)]=path[_0x33ff5c(0xea)](this[_0x33ff5c(0x13f)],'stats.json'),this[_0x33ff5c(0x142)]=path[_0x33ff5c(0xea)](this['baseDir'],_0x33ff5c(0x109)),this[_0x33ff5c(0x187)]();}[a0_0xbf0b41(0x187)](){const _0xfed4c1=a0_0xbf0b41;!fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x13f)])&&fs[_0xfed4c1(0x10a)](this[_0xfed4c1(0x13f)],{'recursive':!![]});!fs['existsSync'](this[_0xfed4c1(0x142)])&&fs[_0xfed4c1(0x10a)](this[_0xfed4c1(0x142)],{'recursive':!![]});const _0xdb248b={'version':_0xfed4c1(0x137),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x12b)]))try{const _0x16c9b4=fs['readFileSync'](this[_0xfed4c1(0x12b)],_0xfed4c1(0x140));this[_0xfed4c1(0x146)]={..._0xdb248b,...JSON[_0xfed4c1(0x13d)](_0x16c9b4)};}catch(_0x1fc19c){this[_0xfed4c1(0x146)]=_0xdb248b;}else this[_0xfed4c1(0x146)]=_0xdb248b,this[_0xfed4c1(0x173)]();!fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x121)])&&fs[_0xfed4c1(0x199)](this['statsPath'],JSON[_0xfed4c1(0x100)]([]),'utf8');}[a0_0xbf0b41(0x154)](){const _0x6625e7=a0_0xbf0b41;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this['config']['telemetry_url']=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x6625e7(0x146)];}[a0_0xbf0b41(0x14e)](_0x115316,_0x3cbf86){const _0x48cc45=a0_0xbf0b41;this[_0x48cc45(0x146)][_0x115316]=_0x3cbf86,this['saveConfig']();}[a0_0xbf0b41(0x173)](){const _0x19be5b=a0_0xbf0b41;fs['writeFileSync'](this[_0x19be5b(0x12b)],JSON[_0x19be5b(0x100)](this[_0x19be5b(0x146)],null,0x2),_0x19be5b(0x140));}[a0_0xbf0b41(0x171)](){const _0xc16355=a0_0xbf0b41;try{if(!fs[_0xc16355(0x150)](this[_0xc16355(0x121)]))return globalLogsMemoryCache;const _0x48d972=fs[_0xc16355(0x135)](this[_0xc16355(0x121)])['mtimeMs'];if(_0x48d972===globalLogsCacheMtime&&globalLogsMemoryCache[_0xc16355(0xf4)]>0x0)return globalLogsMemoryCache;const _0x4c5d2e=fs[_0xc16355(0x193)](this['statsPath'],'utf8'),_0x16ac44=JSON[_0xc16355(0x13d)](_0x4c5d2e);if(Array[_0xc16355(0x122)](_0x16ac44))return globalLogsMemoryCache=_0x16ac44,globalLogsCacheMtime=_0x48d972,_0x16ac44;}catch{}return globalLogsMemoryCache;}[a0_0xbf0b41(0x126)](_0x57dd69){const _0x24cab0=a0_0xbf0b41;globalLogsMemoryCache=_0x57dd69;const _0x480c03=this[_0x24cab0(0x121)]+_0x24cab0(0x19e);try{fs[_0x24cab0(0x199)](_0x480c03,JSON[_0x24cab0(0x100)](_0x57dd69,null,0x2),_0x24cab0(0x140)),fs[_0x24cab0(0x176)](_0x480c03,this[_0x24cab0(0x121)]);}catch{try{fs[_0x24cab0(0x199)](this['statsPath'],JSON[_0x24cab0(0x100)](_0x57dd69,null,0x2),_0x24cab0(0x140));}catch{}}}[a0_0xbf0b41(0x139)](_0x13a806){const _0xa1e183=a0_0xbf0b41,_0x19e9be=new Map();for(const _0x833425 of _0x13a806){const _0x3986e4=_0x833425[_0xa1e183(0x153)]&&_0x833425[_0xa1e183(0x153)][_0xa1e183(0x106)]()||_0x833425[_0xa1e183(0x110)]||_0xa1e183(0x11d);let _0x571adc=_0x19e9be[_0xa1e183(0x129)](_0x3986e4);!_0x571adc&&(_0x571adc=[],_0x19e9be['set'](_0x3986e4,_0x571adc)),_0x571adc[_0xa1e183(0x13e)](_0x833425);}const _0x4418ec=new Set();for(const _0x416421 of _0x19e9be['values']()){const _0x5f5be0=_0x416421[_0xa1e183(0xf4)]-MAX_LOGS_PER_TOOL;for(let _0xdcb5c3=0x0;_0xdcb5c3<_0x5f5be0;_0xdcb5c3++)_0x4418ec[_0xa1e183(0x179)](_0x416421[_0xdcb5c3]['id']);}if(_0x4418ec[_0xa1e183(0xee)]===0x0)return _0x13a806;let _0xaa909={};try{_0xaa909=JSON[_0xa1e183(0x13d)](fs[_0xa1e183(0x193)](this[_0xa1e183(0x12b)],_0xa1e183(0x140)))||{};}catch{}const _0x231da1=_0xaa909[_0xa1e183(0x113)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x4c0ce8 of _0x13a806){if(!_0x4418ec['has'](_0x4c0ce8['id']))continue;_0x231da1[_0xa1e183(0x16d)]+=_0x4c0ce8[_0xa1e183(0x184)]||0x0,_0x231da1[_0xa1e183(0xec)]+=_0x4c0ce8[_0xa1e183(0x168)]||0x0,_0x231da1[_0xa1e183(0x12c)]+=_0x4c0ce8[_0xa1e183(0x12c)]||0x0;}_0xaa909[_0xa1e183(0x113)]=_0x231da1,this[_0xa1e183(0x146)]={...this['config'],..._0xaa909};try{this[_0xa1e183(0x173)]();}catch{}for(const _0x1b66fe of _0x4418ec){try{fs[_0xa1e183(0xfe)](path['join'](this[_0xa1e183(0x142)],_0x1b66fe+_0xa1e183(0xf0)));}catch{}try{fs[_0xa1e183(0xfe)](path['join'](this[_0xa1e183(0x142)],_0x1b66fe+_0xa1e183(0x188)));}catch{}}return _0x13a806[_0xa1e183(0x163)](_0x33b83d=>!_0x4418ec[_0xa1e183(0x186)](_0x33b83d['id']));}['logExecution'](_0x60930f,_0x3e460a,_0xb73f7b,_0x264172,_0x35aa10,_0x52512c){const _0x5f47f8=a0_0xbf0b41,_0x249073=this[_0x5f47f8(0x171)](),_0x3ce439=_0x3e460a['length'],_0x72e42f=_0xb73f7b[_0x5f47f8(0xf4)],_0xf24552=detectSessionTool(),_0x4503c7=_0xf24552[_0x5f47f8(0x13b)],_0x34fa90=_0xf24552['tool']==='antigravity'?_0x5f47f8(0x191):_0xf24552[_0x5f47f8(0x153)];let _0x138999=0x0;if(_0x34fa90&&!_0x60930f[_0x5f47f8(0x12e)]('compact:'))try{const {getLatestSessionFile:_0x640390,loadSessionsState:_0x515943}=require(_0x5f47f8(0x18c)),_0x6e906f=_0x640390(_0x34fa90);if(_0x6e906f&&_0x6e906f[_0x5f47f8(0xef)]){const _0x8a51c3=_0x515943();_0x8a51c3[_0x6e906f['fullPath']]&&(_0x138999=_0x8a51c3[_0x6e906f['fullPath']][_0x5f47f8(0x17a)]||0x0);}}catch{}const _0x142247=Math[_0x5f47f8(0x14b)](_0x3ce439/0x4)+_0x138999,_0x44052e=Math['ceil'](_0x72e42f/0x4),_0x54e104=Math[_0x5f47f8(0x138)](0x0,_0x142247-_0x44052e),_0x3860e7=Math[_0x5f47f8(0x15c)]()[_0x5f47f8(0x10e)](0x24)[_0x5f47f8(0xf3)](0x2,0xb);try{const {redactor:_0x652992}=require(_0x5f47f8(0x14d)),_0x3727c5=_0x652992?_0x652992[_0x5f47f8(0x172)](_0x3e460a):_0x3e460a;fs['writeFileSync'](path[_0x5f47f8(0xea)](this[_0x5f47f8(0x142)],_0x3860e7+_0x5f47f8(0xf0)),_0x3727c5,_0x5f47f8(0x140)),fs[_0x5f47f8(0x199)](path[_0x5f47f8(0xea)](this[_0x5f47f8(0x142)],_0x3860e7+_0x5f47f8(0x188)),_0xb73f7b,'utf8');}catch{}let _0x58015e=_0x60930f;if(_0x60930f['startsWith']('compact:')){const _0x22711c=_0x60930f['split'](':')[0x1]||_0x5f47f8(0x194),_0x21d461=_0x22711c[_0x5f47f8(0xf6)](0x0)[_0x5f47f8(0x167)]()+_0x22711c[_0x5f47f8(0x151)](0x1);_0x58015e=_0x21d461+_0x5f47f8(0x162);}else{if(_0x60930f[_0x5f47f8(0x12e)](_0x5f47f8(0x16b))){const _0x5a8c1d=_0x60930f[_0x5f47f8(0x13a)]('\x20'),_0x1487e2=_0x5a8c1d[0x0][_0x5f47f8(0x13a)](':')[0x1]||'claude',_0x4a291a=_0x1487e2['charAt'](0x0)[_0x5f47f8(0x167)]()+_0x1487e2[_0x5f47f8(0x151)](0x1),_0x51abf0=_0x5a8c1d[_0x5f47f8(0x151)](0x1)[_0x5f47f8(0xea)]('\x20');_0x58015e=_0x4a291a+_0x5f47f8(0x14a)+_0x51abf0;}else{const _0x25c29f=_0x60930f[_0x5f47f8(0x13a)]('\x20')[0x0]||'unknown';_0x58015e=_0xf24552[_0x5f47f8(0x153)]?_0xf24552['modelShort']?_0xf24552[_0x5f47f8(0x153)]+'-'+_0xf24552[_0x5f47f8(0xf8)]+'-'+_0x25c29f:_0xf24552['tool']+'-'+_0x25c29f:_0x25c29f;}}const _0x31d6af={'id':_0x3860e7,'timestamp':new Date()['toISOString'](),'command':_0x58015e,'raw_chars':_0x3ce439,'compressed_chars':_0x72e42f,'estimated_raw_tokens':_0x142247,'estimated_compressed_tokens':_0x44052e,'tokens_saved':_0x54e104,'model_used':_0x4503c7,'tool':_0x34fa90||_0xf24552['tool']||'','exit_code':_0x264172,'synced':![],'ai_detected':!!_0xf24552['tool'],'secrets_found':_0x35aa10?.[_0x5f47f8(0x15f)]||0x0,'secret_types':_0x35aa10?.[_0x5f47f8(0x17e)]||[],'features':_0x52512c||[]};_0x249073[_0x5f47f8(0x13e)](_0x31d6af),this['saveLogs'](this['pruneLogsPerTool'](_0x249073));const _0x913449=this[_0x5f47f8(0x154)]()['telemetry_url'];return _0x913449&&_0x913449['trim']()[_0x5f47f8(0xf4)]>0x0&&this[_0x5f47f8(0x114)](),_0x35aa10&&_0x35aa10['secretsFound']>0x0&&this[_0x5f47f8(0x10f)](_0x31d6af,_0x35aa10),_0x31d6af;}['cachedDevId']=null;[a0_0xbf0b41(0x16f)](){const _0x11ea29=a0_0xbf0b41;if(this['cachedDevId'])return this[_0x11ea29(0x16a)];try{const _0x2331ab=require('child_process')[_0x11ea29(0x14f)](_0x11ea29(0x180),{'stdio':[_0x11ea29(0x18f),_0x11ea29(0x17c),'ignore'],'windowsHide':!![]})[_0x11ea29(0x10e)]()[_0x11ea29(0x106)]();if(_0x2331ab&&_0x2331ab[_0x11ea29(0x170)]('@'))return this[_0x11ea29(0x16a)]=_0x2331ab,_0x2331ab;}catch{}try{const _0x54b324=require('os')[_0x11ea29(0x156)]()[_0x11ea29(0x112)];return this[_0x11ea29(0x16a)]=_0x54b324,_0x54b324;}catch{}return this[_0x11ea29(0x16a)]='unknown','unknown';}[a0_0xbf0b41(0x10f)](_0x292c41,_0x47a68b){const _0xb6349d=a0_0xbf0b41;try{let _0x22f3b7=this['getConfig']()[_0xb6349d(0xf5)]||'';if(!_0x22f3b7)return;_0x22f3b7=_0x22f3b7[_0xb6349d(0x104)](/\/api\/telemetry\/?$/,_0xb6349d(0xfb));if(!_0x22f3b7[_0xb6349d(0x170)](_0xb6349d(0xfb)))_0x22f3b7+=_0xb6349d(0xfb);const _0x317ef5=this[_0xb6349d(0x16f)](),_0x36a2a1=JSON[_0xb6349d(0x100)]({'developer_id':_0x317ef5,'timestamp':_0x292c41[_0xb6349d(0x190)],'command':_0x292c41[_0xb6349d(0x10c)],'secrets_found':_0x47a68b[_0xb6349d(0x15f)],'secret_types':_0x47a68b[_0xb6349d(0x17e)],'os':require('os')['platform']()}),_0x4bd35c=_0xb6349d(0x196)+JSON[_0xb6349d(0x100)](_0x22f3b7)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON['stringify'](_0x22f3b7)+_0xb6349d(0x103)+JSON[_0xb6349d(0x100)](_0x36a2a1)+')',_0x7c4767=(0x0,child_process_1[_0xb6349d(0xeb)])(process['execPath'],['-e',_0x4bd35c],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x7c4767[_0xb6349d(0x197)]();}catch{}}['triggerBackgroundSync'](){const _0x2124d7=a0_0xbf0b41;try{const _0x4032be=path[_0x2124d7(0xea)](__dirname,_0x2124d7(0x11a));if(fs['existsSync'](_0x4032be)){const _0x3b6f20=(0x0,child_process_1[_0x2124d7(0xeb)])(process['execPath'],[_0x4032be],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x3b6f20['unref']();}}catch{}}['getStatsSummary'](_0x1c09ee=a0_0xbf0b41(0x107)){const _0x31cb6a=a0_0xbf0b41,_0x54cef1=this[_0x31cb6a(0x171)]();let _0x34bbd2=0x0,_0x1a4aef=0x0,_0x3e40dd=0x0;for(const _0x41af8f of _0x54cef1){_0x34bbd2+=_0x41af8f[_0x31cb6a(0x184)],_0x1a4aef+=_0x41af8f[_0x31cb6a(0x168)],_0x3e40dd+=_0x41af8f['tokens_saved'];}const _0x6e19cc=this[_0x31cb6a(0x154)]()[_0x31cb6a(0x113)];_0x6e19cc&&(_0x34bbd2+=_0x6e19cc[_0x31cb6a(0x16d)]||0x0,_0x1a4aef+=_0x6e19cc[_0x31cb6a(0xec)]||0x0,_0x3e40dd+=_0x6e19cc[_0x31cb6a(0x12c)]||0x0);let _0x311d74=_0x1c09ee;(!_0x311d74||_0x311d74===_0x31cb6a(0x107)||!exports['PRICING'][_0x311d74])&&(_0x54cef1[_0x31cb6a(0xf4)]>0x0&&_0x54cef1[_0x54cef1[_0x31cb6a(0xf4)]-0x1][_0x31cb6a(0x110)]?_0x311d74=_0x54cef1[_0x54cef1['length']-0x1][_0x31cb6a(0x110)]:_0x311d74=this[_0x31cb6a(0x154)]()[_0x31cb6a(0x181)]||'claude-3-5-sonnet');const _0x14290f=exports[_0x31cb6a(0x11f)][_0x311d74]||exports[_0x31cb6a(0x11f)][_0x31cb6a(0x117)],_0x174623=_0x3e40dd*_0x14290f['input_price_1m']/0xf4240,_0x16b589=_0x34bbd2*_0x14290f[_0x31cb6a(0x15e)]/0xf4240,_0x289f19=_0x1a4aef*_0x14290f[_0x31cb6a(0x15e)]/0xf4240,_0x402d3c=_0x34bbd2>0x0?_0x3e40dd/_0x34bbd2*0x64:0x0;return{'total_raw_tokens':_0x34bbd2,'total_compressed_tokens':_0x1a4aef,'total_tokens_saved':_0x3e40dd,'savings_percentage':parseFloat(_0x402d3c[_0x31cb6a(0x118)](0x1)),'money_saved_usd':parseFloat(_0x174623[_0x31cb6a(0x118)](0x4)),'raw_cost_usd':parseFloat(_0x16b589[_0x31cb6a(0x118)](0x4)),'compressed_cost_usd':parseFloat(_0x289f19['toFixed'](0x4)),'model_name':_0x14290f[_0x31cb6a(0x166)],'model_key':_0x311d74};}}exports[a0_0xbf0b41(0x158)]=Tracker,exports['tracker']=new Tracker();function a0_0x3f36(){const _0x289b33=['parse','push','baseDir','utf8','GPT-5.4\x20Nano','logsDir','GEMINI_CLI','Gemini\x203.5\x20Flash','Claude\x20Mythos\x205','config','gemini-3-5-flash','claude-sonnet-4-5','detectSessionTool','\x20Chat\x20','ceil','GPT-5.5','./redactor','setConfig','execSync','existsSync','slice','claude-sonnet-4-6','tool','getConfig','CLAUDECODE','userInfo','cursor','Tracker','.trimprompt','Gemini\x203.5\x20Live\x20Translate','claude_code','random','AI_AGENT','input_price_1m','secretsFound','Gemini\x203.1\x20Pro','TRIMPROMPT_MODEL','\x20Compaction','filter','Claude\x20Sonnet\x204.5','7XGzmFJ','name','toUpperCase','estimated_compressed_tokens','child_process','cachedDevId','conv:','devin','raw_tokens','87ODVYTd','getDevIdentity','includes','getLogs','redact','saveConfig','cline','GPT-4.1\x20Mini','renameSync','AIDER_MODEL','pop','add','activeSavedTokens','Claude\x203.5\x20Sonnet','pipe','346439yTGtLx','secretTypes','prototype','git\x20config\x20user.email','default_model','__setModuleDefault','create','estimated_raw_tokens','11892636xYyVvx','has','init','.comp.txt','opus','copilot','tracker','./file-watcher','config.json','GPT-5.4\x20Mini','ignore','timestamp','gemini','Claude\x20Haiku\x203.5','readFileSync','claude','6853344PqNEAb','const\x20h=require(require(\x27url\x27).parse(','unref','aider','writeFileSync','windsurf','replit','antigravity','COPILOT_MODEL','.tmp','join','spawn','compressed_tokens','github-copilot','size','fullPath','.raw.txt','ANTIGRAVITY_AGENT','Claude\x20Opus\x204.5','substring','length','telemetry_url','charAt','writable','modelShort','CLAUDE_EFFORT','CLAUDE_CODE','/api/security/alert','homedir','call','unlinkSync','claude-opus-4-8','stringify','sonnet','GPT-4o',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','replace','1352gyIUNJ','trim','auto','gemini-3-1-pro','logs','mkdirSync','COPILOT_GITHUB_TOKEN','command','Claude\x20Opus\x204.8','toString','sendSecurityAlert','model_used','hasOwnProperty','username','lifetime_savings','triggerBackgroundSync','__esModule','default','claude-3-5-sonnet','toFixed','REPL_ID','sync.js','defineProperty','toLowerCase','other','getOwnPropertyNames','PRICING','configurable','statsPath','isArray','path','4114710OQTVOt','high','saveLogs','CURSOR_AGENT','claude-code','get','o3-mini','configPath','tokens_saved','OpenAI\x20o1-mini','startsWith','CONTINUE_GLOBAL_DIR','Claude\x20Opus\x204.7','OpenAI\x20o1','codex','continue','3564786UTwreZ','statSync','flash','1.0','max','pruneLogsPerTool','split','model','1279218jpSGdw'];a0_0x3f36=function(){return _0x289b33;};return a0_0x3f36();}
|
|
1
|
+
'use strict';const a0_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();
|