trimprompt 1.0.33 → 1.0.35
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 +1 -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/index.html +93 -26
- package/mcp.js +1 -1
- package/package.json +1 -1
- 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 +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4b2bc7=a0_0x372a;function a0_0x31da(){const _0x4333b0=['1621541FFovgC','pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','homedir','6969263ERieaa','npm\x20run\x20lint:\x20✖\x202\x20warnings','comp','redis-master-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','44qjnOqY','gpt-4o-mini','Collecting\x20tensorflow\x0a\x20\x20Downloading\x20tensorflow-2.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\x20(475.2\x20MB)\x0a','random','1550512bamKTz','2300515khjleV','\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','log','NAME\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20READY\x20\x20\x20STATUS\x20\x20\x20\x20RESTARTS\x20\x20\x20AGE\x0a','path','toISOString','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','writeFileSync','\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a','git\x20diff\x20main','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','cargo\x20test','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','join','commit\x20f6e5d4c3b2a1\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2013:30:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20fix:\x20adjust\x20margins\x20on\x20visual\x20graph','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','cargo\x20test:\x2045\x20passed,\x200\x20failed.','gemini-1-5-flash','6xpFxXl','Completed\x203\x20of\x203\x20assets\x20successfully.','length','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x0aindex\x201234..5678\x20100644\x0a---\x20a/src/cli.ts\x0a+++\x20b/src/cli.ts\x0a@@\x20-10,6\x20+10,12\x20@@\x0a+\x20//\x20Added\x20new\x20telemetry\x20features\x0a+\x20console.log(\x22Initializing\x20sync\x20daemon...\x22);\x0a+\x20startSync();\x0a','postgres-db-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','found\x200\x20vulnerabilities\x0a','✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','./tracker','defineProperty','src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a','cmd','62AfbbXx','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','pip\x20install\x20tensorflow\x20pandas\x20numpy','now','upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a','npm\x20install\x20lodash\x20express\x20uuid\x20react','trimprompt-api-567fdb7d6-x8w9q\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a','8RubjIW','logExecution','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a','gemini-1-5-pro','.trimprompt','git\x20log\x20-n\x205','upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a','aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','12448953rpyxDm','raw','tracker','utf8','claude-3-opus','workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.','commit\x20a1b2c3d4e5f6\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2014:00:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20feat:\x20add\x20dynamic\x20token\x20costs\x0a\x0a','5842510uDuimK','gpt-4o','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','stats.json','trimprompt-sync-324db87d1-p8q2e\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a','getLogs','git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','repeat','29379HClpdJ'];a0_0x31da=function(){return _0x4333b0;};return a0_0x31da();}(function(_0x2ab90e,_0x4cb74c){const _0xc2b903=a0_0x372a,_0x241433=_0x2ab90e();while(!![]){try{const _0x29628d=parseInt(_0xc2b903(0x15c))/0x1+-parseInt(_0xc2b903(0x13d))/0x2*(-parseInt(_0xc2b903(0x15b))/0x3)+parseInt(_0xc2b903(0x11f))/0x4+parseInt(_0xc2b903(0x120))/0x5+parseInt(_0xc2b903(0x132))/0x6*(-parseInt(_0xc2b903(0x15f))/0x7)+-parseInt(_0xc2b903(0x144))/0x8*(-parseInt(_0xc2b903(0x14c))/0x9)+parseInt(_0xc2b903(0x153))/0xa*(-parseInt(_0xc2b903(0x163))/0xb);if(_0x29628d===_0x4cb74c)break;else _0x241433['push'](_0x241433['shift']());}catch(_0x340816){_0x241433['push'](_0x241433['shift']());}}}(a0_0x31da,0xc90a3));Object[a0_0x4b2bc7(0x13a)](exports,'__esModule',{'value':!![]});function a0_0x372a(_0x53b4cd,_0x2eaaf7){_0x53b4cd=_0x53b4cd-0x11c;const _0x31dac1=a0_0x31da();let _0x372ab7=_0x31dac1[_0x53b4cd];return _0x372ab7;}const tracker_1=require(a0_0x4b2bc7(0x139));console[a0_0x4b2bc7(0x122)]('Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...');const models=['claude-3-5-sonnet',a0_0x4b2bc7(0x154),a0_0x4b2bc7(0x11c),a0_0x4b2bc7(0x147),a0_0x4b2bc7(0x131),a0_0x4b2bc7(0x150)],commands=[{'cmd':a0_0x4b2bc7(0x129),'raw':a0_0x4b2bc7(0x135)[a0_0x4b2bc7(0x15a)](0x32),'comp':a0_0x4b2bc7(0x126),'exitCode':0x0},{'cmd':a0_0x4b2bc7(0x12b),'raw':a0_0x4b2bc7(0x146)+'test\x20tests::test_case_'[a0_0x4b2bc7(0x15a)](0x28)+a0_0x4b2bc7(0x121),'comp':a0_0x4b2bc7(0x130),'exitCode':0x0},{'cmd':a0_0x4b2bc7(0x142),'raw':'npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a'+a0_0x4b2bc7(0x155)+a0_0x4b2bc7(0x137),'comp':a0_0x4b2bc7(0x12f),'exitCode':0x0},{'cmd':a0_0x4b2bc7(0x14b),'raw':a0_0x4b2bc7(0x141)+a0_0x4b2bc7(0x14a)+'upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a'+a0_0x4b2bc7(0x133),'comp':a0_0x4b2bc7(0x12c),'exitCode':0x0},{'cmd':'kubectl\x20get\x20pods\x20-n\x20production','raw':a0_0x4b2bc7(0x123)+a0_0x4b2bc7(0x143)+a0_0x4b2bc7(0x157)+a0_0x4b2bc7(0x162)+a0_0x4b2bc7(0x136),'comp':a0_0x4b2bc7(0x12a),'exitCode':0x0},{'cmd':a0_0x4b2bc7(0x13f),'raw':a0_0x4b2bc7(0x11d)+a0_0x4b2bc7(0x128)+a0_0x4b2bc7(0x13e),'comp':a0_0x4b2bc7(0x15d),'exitCode':0x0},{'cmd':a0_0x4b2bc7(0x149),'raw':a0_0x4b2bc7(0x152)+a0_0x4b2bc7(0x12e),'comp':a0_0x4b2bc7(0x159),'exitCode':0x0},{'cmd':'npm\x20run\x20lint','raw':'src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a'+a0_0x4b2bc7(0x13b)+a0_0x4b2bc7(0x138),'comp':a0_0x4b2bc7(0x160),'exitCode':0x0}],startTime=Date[a0_0x4b2bc7(0x140)]()-0x36ee80;for(let i=0x0;i<0xc;i++){const model=models[i%models['length']],commandItem=commands[Math['floor'](Math[a0_0x4b2bc7(0x11e)]()*commands['length'])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)[a0_0x4b2bc7(0x125)](),log=tracker_1[a0_0x4b2bc7(0x14e)][a0_0x4b2bc7(0x145)](commandItem[a0_0x4b2bc7(0x13c)],commandItem[a0_0x4b2bc7(0x14d)],commandItem[a0_0x4b2bc7(0x161)],commandItem['exitCode']),logs=tracker_1['tracker'][a0_0x4b2bc7(0x158)]();logs[a0_0x4b2bc7(0x134)]>0x0&&(logs[logs['length']-0x1]['timestamp']=timestamp,require('fs')[a0_0x4b2bc7(0x127)](require(a0_0x4b2bc7(0x124))[a0_0x4b2bc7(0x12d)](require('os')[a0_0x4b2bc7(0x15e)](),a0_0x4b2bc7(0x148),a0_0x4b2bc7(0x156)),JSON['stringify'](logs,null,0x2),a0_0x4b2bc7(0x14f)));}console[a0_0x4b2bc7(0x122)](a0_0x4b2bc7(0x151));
|
package/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x282dab=a0_0x1bbd;(function(_0x48217b,_0x1bb86a){const _0x5022af=a0_0x1bbd,_0x19cf83=_0x48217b();while(!![]){try{const _0x1f939a=-parseInt(_0x5022af(0x18a))/0x1+-parseInt(_0x5022af(0x18b))/0x2*(-parseInt(_0x5022af(0x1a8))/0x3)+parseInt(_0x5022af(0x1b4))/0x4*(-parseInt(_0x5022af(0x1da))/0x5)+parseInt(_0x5022af(0x1c4))/0x6*(parseInt(_0x5022af(0x1c2))/0x7)+parseInt(_0x5022af(0x1a9))/0x8*(-parseInt(_0x5022af(0x189))/0x9)+-parseInt(_0x5022af(0x1ba))/0xa*(-parseInt(_0x5022af(0x1a7))/0xb)+parseInt(_0x5022af(0x1be))/0xc;if(_0x1f939a===_0x1bb86a)break;else _0x19cf83['push'](_0x19cf83['shift']());}catch(_0x89cca4){_0x19cf83['push'](_0x19cf83['shift']());}}}(a0_0x5f4c,0xadc52));var __createBinding=this&&this[a0_0x282dab(0x1cf)]||(Object['create']?function(_0x464ca7,_0x255b14,_0x5125f7,_0x1a3d59){const _0x103c5f=a0_0x282dab;if(_0x1a3d59===undefined)_0x1a3d59=_0x5125f7;var _0x10d6d0=Object[_0x103c5f(0x1db)](_0x255b14,_0x5125f7);(!_0x10d6d0||(_0x103c5f(0x1c3)in _0x10d6d0?!_0x255b14[_0x103c5f(0x1d8)]:_0x10d6d0[_0x103c5f(0x1d9)]||_0x10d6d0[_0x103c5f(0x1b1)]))&&(_0x10d6d0={'enumerable':!![],'get':function(){return _0x255b14[_0x5125f7];}}),Object['defineProperty'](_0x464ca7,_0x1a3d59,_0x10d6d0);}:function(_0x4b76c7,_0x44aa77,_0x9ce9c8,_0x50a406){if(_0x50a406===undefined)_0x50a406=_0x9ce9c8;_0x4b76c7[_0x50a406]=_0x44aa77[_0x9ce9c8];}),__setModuleDefault=this&&this[a0_0x282dab(0x183)]||(Object['create']?function(_0x4bd380,_0x11959c){const _0x558925=a0_0x282dab;Object[_0x558925(0x1c7)](_0x4bd380,_0x558925(0x18c),{'enumerable':!![],'value':_0x11959c});}:function(_0x80cab,_0x3b89f7){_0x80cab['default']=_0x3b89f7;}),__importStar=this&&this['__importStar']||(function(){var _0x1053ae=function(_0x223d75){const _0x36f405=a0_0x1bbd;return _0x1053ae=Object[_0x36f405(0x17d)]||function(_0x28ece8){const _0x284d46=_0x36f405;var _0x41cf7f=[];for(var _0xff36a4 in _0x28ece8)if(Object['prototype'][_0x284d46(0x176)][_0x284d46(0x192)](_0x28ece8,_0xff36a4))_0x41cf7f[_0x41cf7f[_0x284d46(0x1a5)]]=_0xff36a4;return _0x41cf7f;},_0x1053ae(_0x223d75);};return function(_0x4b778a){const _0x30aab9=a0_0x1bbd;if(_0x4b778a&&_0x4b778a[_0x30aab9(0x1d8)])return _0x4b778a;var _0x482452={};if(_0x4b778a!=null){for(var _0x31984b=_0x1053ae(_0x4b778a),_0xa10e3=0x0;_0xa10e3<_0x31984b[_0x30aab9(0x1a5)];_0xa10e3++)if(_0x31984b[_0xa10e3]!=='default')__createBinding(_0x482452,_0x4b778a,_0x31984b[_0xa10e3]);}return __setModuleDefault(_0x482452,_0x4b778a),_0x482452;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x282dab(0x19a))),os=__importStar(require('os')),http=__importStar(require('http')),https=__importStar(require(a0_0x282dab(0x1d7))),url_1=require('url'),_cfg=[a0_0x282dab(0x1d5),'trimp-production','.up.railway.app',a0_0x282dab(0x1bf)]['join'](''),_ep=process[a0_0x282dab(0x186)][a0_0x282dab(0x1c9)]||_cfg;function hasSyncedRecently(){const _0x5b10c2=a0_0x282dab;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x4e428e=JSON[_0x5b10c2(0x17e)](fs[_0x5b10c2(0x1d6)](dailySyncPath,_0x5b10c2(0x179)));if(!_0x4e428e['last_sync_time'])return![];return Date[_0x5b10c2(0x185)]()-_0x4e428e[_0x5b10c2(0x1bc)]<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x438890=a0_0x282dab;try{const _0x2d2d3b={'last_sync_date':getTodayDate(),'last_sync_time':Date['now']()};fs[_0x438890(0x18e)](dailySyncPath,JSON[_0x438890(0x1d3)](_0x2d2d3b,null,0x2),_0x438890(0x179));}catch{}}const PRICING={'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_0x282dab(0x1c0),'input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x282dab(0x1cc),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x282dab(0x195),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x282dab(0x18f),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x282dab(0x17a),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x282dab(0x19c),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x282dab(0x1c6),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x282dab(0x1ac),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x282dab(0x1dc),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x282dab(0x17f),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x282dab(0x178),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x282dab(0x196),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x282dab(0x1ad),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x282dab(0x1c1),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x282dab(0x1a4),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x282dab(0x184),'input_price_1m':0x3},'o3-mini':{'name':a0_0x282dab(0x180),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x282dab(0x18d),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x282dab(0x1b5),'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_0x282dab(0x1b8),'input_price_1m':3.5}},baseDir=path[a0_0x282dab(0x182)](os[a0_0x282dab(0x187)](),a0_0x282dab(0x1cb)),configPath=path[a0_0x282dab(0x182)](baseDir,a0_0x282dab(0x1b7)),statsPath=path['join'](baseDir,'stats.json'),dailySyncPath=path[a0_0x282dab(0x182)](baseDir,a0_0x282dab(0x188));function getTodayDate(){const _0x57e931=a0_0x282dab;return new Date()[_0x57e931(0x1a0)]()['split']('T')[0x0];}function a0_0x5f4c(){const _0x4d8b8d=['application/json','https://','readFileSync','https','__esModule','writable','5XFsTQe','getOwnPropertyDescriptor','GPT-5.5','./tracker','from','pathname','hasOwnProperty','end','GPT-4o','utf8','Claude\x20Sonnet\x204.5','synced','total_raw_tokens','getOwnPropertyNames','parse','GPT-5.4','OpenAI\x20o3-mini','protocol','join','__setModuleDefault','OpenAI\x20o1-mini','now','env','homedir','daily_sync.json','983943bCWmxw','1234873RLKMeu','10prSNUo','default','Gemini\x203.1\x20Pro','writeFileSync','Claude\x20Sonnet\x204.6','getTime','error','call','getStatsSummary','statusCode','Claude\x20Opus\x204.1\x20(deprecated)','GPT-5.4\x20Mini','username','auto','https:','path','git\x20config\x20user.email','Claude\x203.5\x20Sonnet','request','existsSync','last_sync_date','toISOString','includes','destroy','total_tokens_saved','GPT-4o\x20Mini','length','model_used','55NJhDHh','839589Quyjjf','40OmKEqw','byteLength','timeout','Claude\x20Haiku\x203.5','GPT-5.4\x20Nano','filter','trim','ignore','configurable','platform','push','2729564fGbkHr','Gemini\x203.5\x20Flash','POST','config.json','Gemini\x203.5\x20Live\x20Translate','toString','1046030OFHxbJ','total_compressed_tokens','last_sync_time','.raw.txt','13492176WIdptr','/api/telemetry','Claude\x20Opus\x204.8','GPT-4.1\x20Mini','902881ICloAO','get','6GJaUhT','logs','Claude\x20Haiku\x204.5','defineProperty','claude-opus-4-8','_PS_EP','unlinkSync','.trimprompt','Claude\x20Opus\x204.5','catch','timestamp','__createBinding','search','.comp.txt','money_saved_usd','stringify'];a0_0x5f4c=function(){return _0x4d8b8d;};return a0_0x5f4c();}function getDeveloperIdentity(){const _0x5a447d=a0_0x282dab;if(process[_0x5a447d(0x186)]['TRIMPROMPT_USER_EMAIL'])return process[_0x5a447d(0x186)]['TRIMPROMPT_USER_EMAIL'];try{const {execSync:_0x36f22a}=require('child_process'),_0xf8e56a=_0x36f22a(_0x5a447d(0x19b),{'stdio':[_0x5a447d(0x1b0),'pipe',_0x5a447d(0x1b0)],'windowsHide':!![]})[_0x5a447d(0x1b9)]()[_0x5a447d(0x1af)]();if(_0xf8e56a&&_0xf8e56a[_0x5a447d(0x1a1)]('@'))return _0xf8e56a;}catch{}try{const _0x8cac1b=os['userInfo']()[_0x5a447d(0x197)];if(_0x8cac1b)return _0x8cac1b;}catch{}return'anonymous';}function hasAlreadySyncedToday(){const _0x29f873=a0_0x282dab;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x3c1070=JSON['parse'](fs[_0x29f873(0x1d6)](dailySyncPath,_0x29f873(0x179)));return _0x3c1070[_0x29f873(0x19f)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x1c3e0e=a0_0x282dab;try{const _0x529a49={'last_sync_date':getTodayDate()};fs[_0x1c3e0e(0x18e)](dailySyncPath,JSON['stringify'](_0x529a49,null,0x2),_0x1c3e0e(0x179));}catch{}}function a0_0x1bbd(_0x29dbab,_0x24a5ca){const _0x5f4cff=a0_0x5f4c();return a0_0x1bbd=function(_0x1bbd42,_0x493152){_0x1bbd42=_0x1bbd42-0x174;let _0x16fcd6=_0x5f4cff[_0x1bbd42];return _0x16fcd6;},a0_0x1bbd(_0x29dbab,_0x24a5ca);}function postTelemetry(_0x1bb4c1,_0x5cde02){return new Promise(_0x341dfd=>{const _0x23c2d5=a0_0x1bbd;try{const _0x1c72b5=new url_1['URL'](_0x1bb4c1),_0x597c54=JSON[_0x23c2d5(0x1d3)](_0x5cde02),_0x238017={'hostname':_0x1c72b5['hostname'],'port':_0x1c72b5['port']||(_0x1c72b5[_0x23c2d5(0x181)]===_0x23c2d5(0x199)?0x1bb:0x50),'path':_0x1c72b5[_0x23c2d5(0x175)]+_0x1c72b5[_0x23c2d5(0x1d0)],'method':_0x23c2d5(0x1b6),'headers':{'Content-Type':_0x23c2d5(0x1d4),'Content-Length':Buffer[_0x23c2d5(0x1aa)](_0x597c54)},'timeout':0x1f40},_0x48a8fc=_0x1c72b5[_0x23c2d5(0x181)]==='https:'?https:http,_0x5bc64c=_0x48a8fc[_0x23c2d5(0x19d)](_0x238017,_0x2e3942=>{const _0x11ab36=_0x23c2d5;_0x341dfd(!!(_0x2e3942['statusCode']&&_0x2e3942[_0x11ab36(0x194)]>=0xc8&&_0x2e3942[_0x11ab36(0x194)]<0x12c));});_0x5bc64c['on'](_0x23c2d5(0x191),()=>_0x341dfd(![])),_0x5bc64c['on'](_0x23c2d5(0x1ab),()=>{const _0x23b3f=_0x23c2d5;_0x5bc64c[_0x23b3f(0x1a2)](),_0x341dfd(![]);}),_0x5bc64c['write'](_0x597c54),_0x5bc64c[_0x23c2d5(0x177)]();}catch{_0x341dfd(![]);}});}function buildDailyPayload(_0x35915b){const _0x3841d4=a0_0x282dab,_0x23e77a=getTodayDate(),{tracker:_0x3d66f4}=require(_0x3841d4(0x1dd)),_0x28f6fe=_0x3d66f4?_0x3d66f4[_0x3841d4(0x193)](_0x3841d4(0x198)):null,_0x24f755=new Set();for(const _0x513941 of _0x35915b){if(_0x513941[_0x3841d4(0x1a6)])_0x24f755['add'](_0x513941[_0x3841d4(0x1a6)]);}if(_0x24f755['size']===0x0)_0x24f755['add'](_0x3841d4(0x1c8));const _0x37c294=_0x35915b[_0x35915b[_0x3841d4(0x1a5)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x3841d4(0x1b2)](),'date':_0x23e77a,'executions_count':_0x35915b[_0x3841d4(0x1a5)],'total_raw_tokens':_0x28f6fe?_0x28f6fe[_0x3841d4(0x17c)]:0x0,'total_compressed_tokens':_0x28f6fe?_0x28f6fe[_0x3841d4(0x1bb)]:0x0,'total_tokens_saved':_0x28f6fe?_0x28f6fe[_0x3841d4(0x1a3)]:0x0,'total_money_saved_usd':_0x28f6fe?_0x28f6fe[_0x3841d4(0x1d2)]:0x0,'models_used':Array[_0x3841d4(0x174)](_0x24f755),'hotspots':[],'last_seen':_0x37c294?_0x37c294[_0x3841d4(0x1ce)]:new Date()[_0x3841d4(0x1a0)]()};}async function runSync(){const _0x27f4c9=a0_0x282dab;if(!fs[_0x27f4c9(0x19e)](statsPath))return;let _0x470088;try{_0x470088=JSON[_0x27f4c9(0x17e)](fs[_0x27f4c9(0x1d6)](statsPath,_0x27f4c9(0x179)));}catch{return;}const _0x3fe227=_0x470088[_0x27f4c9(0x1ae)](_0x227972=>!_0x227972[_0x27f4c9(0x17b)]);if(_0x3fe227[_0x27f4c9(0x1a5)]===0x0&&hasSyncedRecently())return;const _0x4140dd=buildDailyPayload(_0x470088);await postTelemetry(_ep,_0x4140dd);let _0x488982=process[_0x27f4c9(0x186)]['TRIMPROMPT_TELEMETRY_URL']||'';if(!_0x488982&&fs[_0x27f4c9(0x19e)](configPath))try{const _0x23dab5=JSON[_0x27f4c9(0x17e)](fs[_0x27f4c9(0x1d6)](configPath,'utf8'));_0x488982=_0x23dab5['telemetry_url']||'';}catch{}_0x488982['trim']()[_0x27f4c9(0x1a5)]>0x0&&await postTelemetry(_0x488982,_0x4140dd);for(const _0xe58666 of _0x470088){if(!_0xe58666[_0x27f4c9(0x17b)])_0xe58666['synced']=!![];}try{fs[_0x27f4c9(0x18e)](statsPath,JSON['stringify'](_0x470088,null,0x2),'utf8');}catch{}markSyncedNow();}function pruneOldLogs(_0x2f2064){const _0x5d481c=a0_0x282dab;try{const _0x3ebfaa=new Date(),_0x38e6b3=new Date(_0x3ebfaa[_0x5d481c(0x190)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x83f3ab=[],_0x4b4f9e=[];for(const _0x80d4bc of _0x2f2064){const _0x280a99=new Date(_0x80d4bc[_0x5d481c(0x1ce)]);_0x280a99>=_0x38e6b3?_0x83f3ab['push'](_0x80d4bc):_0x4b4f9e[_0x5d481c(0x1b3)](_0x80d4bc);}if(_0x4b4f9e['length']>0x0){const _0xc214c5=path[_0x5d481c(0x182)](baseDir,_0x5d481c(0x1c5));for(const _0xcf159 of _0x4b4f9e){const _0x1d69b0=path['join'](_0xc214c5,_0xcf159['id']+_0x5d481c(0x1bd)),_0x283e60=path['join'](_0xc214c5,_0xcf159['id']+_0x5d481c(0x1d1));try{if(fs[_0x5d481c(0x19e)](_0x1d69b0))fs[_0x5d481c(0x1ca)](_0x1d69b0);if(fs[_0x5d481c(0x19e)](_0x283e60))fs[_0x5d481c(0x1ca)](_0x283e60);}catch{}}fs[_0x5d481c(0x18e)](statsPath,JSON[_0x5d481c(0x1d3)](_0x83f3ab,null,0x2),_0x5d481c(0x179));}}catch{}}runSync()[a0_0x282dab(0x1cd)](()=>{});
|
|
1
|
+
'use strict';function a0_0x1b5c(_0x177a46,_0x56023b){_0x177a46=_0x177a46-0xc0;const _0x30bf06=a0_0x30bf();let _0x1b5c2d=_0x30bf06[_0x177a46];return _0x1b5c2d;}const a0_0x3fe1da=a0_0x1b5c;(function(_0x427854,_0x5264f4){const _0x37f2b6=a0_0x1b5c,_0x382d19=_0x427854();while(!![]){try{const _0x378159=-parseInt(_0x37f2b6(0x126))/0x1+parseInt(_0x37f2b6(0xc7))/0x2+-parseInt(_0x37f2b6(0x11d))/0x3+parseInt(_0x37f2b6(0xee))/0x4+parseInt(_0x37f2b6(0xe3))/0x5*(-parseInt(_0x37f2b6(0x11a))/0x6)+parseInt(_0x37f2b6(0xfb))/0x7+-parseInt(_0x37f2b6(0xd0))/0x8*(parseInt(_0x37f2b6(0x125))/0x9);if(_0x378159===_0x5264f4)break;else _0x382d19['push'](_0x382d19['shift']());}catch(_0x5e3ada){_0x382d19['push'](_0x382d19['shift']());}}}(a0_0x30bf,0x8404f));var __createBinding=this&&this[a0_0x3fe1da(0xf4)]||(Object[a0_0x3fe1da(0xf5)]?function(_0xb9b235,_0x51a837,_0x21d411,_0x1093e0){const _0x17d502=a0_0x3fe1da;if(_0x1093e0===undefined)_0x1093e0=_0x21d411;var _0x1d486e=Object['getOwnPropertyDescriptor'](_0x51a837,_0x21d411);(!_0x1d486e||(_0x17d502(0x10f)in _0x1d486e?!_0x51a837[_0x17d502(0x107)]:_0x1d486e[_0x17d502(0xd8)]||_0x1d486e[_0x17d502(0x115)]))&&(_0x1d486e={'enumerable':!![],'get':function(){return _0x51a837[_0x21d411];}}),Object[_0x17d502(0x116)](_0xb9b235,_0x1093e0,_0x1d486e);}:function(_0x140082,_0x1097e9,_0x3f1786,_0x5635a8){if(_0x5635a8===undefined)_0x5635a8=_0x3f1786;_0x140082[_0x5635a8]=_0x1097e9[_0x3f1786];}),__setModuleDefault=this&&this[a0_0x3fe1da(0x110)]||(Object[a0_0x3fe1da(0xf5)]?function(_0x5e6d59,_0x5ac000){const _0x46064e=a0_0x3fe1da;Object[_0x46064e(0x116)](_0x5e6d59,'default',{'enumerable':!![],'value':_0x5ac000});}:function(_0x122b22,_0x50825b){const _0x86190f=a0_0x3fe1da;_0x122b22[_0x86190f(0xc9)]=_0x50825b;}),__importStar=this&&this[a0_0x3fe1da(0x11e)]||(function(){var _0x2586b2=function(_0x48eec4){const _0x515f99=a0_0x1b5c;return _0x2586b2=Object[_0x515f99(0xec)]||function(_0x223f59){const _0x175db3=_0x515f99;var _0x1e42b4=[];for(var _0x5e59c2 in _0x223f59)if(Object[_0x175db3(0x10c)]['hasOwnProperty'][_0x175db3(0x11f)](_0x223f59,_0x5e59c2))_0x1e42b4[_0x1e42b4[_0x175db3(0xdd)]]=_0x5e59c2;return _0x1e42b4;},_0x2586b2(_0x48eec4);};return function(_0x296ccd){const _0x46cd18=a0_0x1b5c;if(_0x296ccd&&_0x296ccd[_0x46cd18(0x107)])return _0x296ccd;var _0x56a7d7={};if(_0x296ccd!=null){for(var _0x3fb0b1=_0x2586b2(_0x296ccd),_0x317625=0x0;_0x317625<_0x3fb0b1[_0x46cd18(0xdd)];_0x317625++)if(_0x3fb0b1[_0x317625]!==_0x46cd18(0xc9))__createBinding(_0x56a7d7,_0x296ccd,_0x3fb0b1[_0x317625]);}return __setModuleDefault(_0x56a7d7,_0x296ccd),_0x56a7d7;};}());Object[a0_0x3fe1da(0x116)](exports,'__esModule',{'value':!![]});function a0_0x30bf(){const _0x55590a=['pipe','getTime','error','Gemini\x203.1\x20Pro','length','GPT-4.1\x20Mini','GPT-4.1\x20Nano','telemetry_url','timeout','OpenAI\x20o1','1655skrddv','URL','OpenAI\x20o3-mini','end','Claude\x20Sonnet\x204.6','Claude\x20Opus\x204.8','add','/api/telemetry','GPT-5.4\x20Nano','getOwnPropertyNames','Claude\x20Haiku\x204.5','2348180ebQJIH','.comp.txt','username','.trimprompt','auto','push','__createBinding','create','write','claude-opus-4-8','trim','https:','now','6152993oHAjtJ','protocol','child_process','join','Claude\x20Mythos\x205','https','Claude\x20Sonnet\x204.5','POST','parse','destroy','last_sync_time','ignore','__esModule','hostname','Claude\x20Haiku\x203.5','trimp-production','GPT-5.4','prototype','config.json','includes','get','__setModuleDefault','./tracker','timestamp','statusCode','byteLength','configurable','defineProperty','pathname','readFileSync','url','354TevNVx','toString','homedir','929436uZOWpu','__importStar','call','stringify','synced','Claude\x203.5\x20Sonnet','Gemini\x203.1\x20Flash-Lite','stats.json','25587juSzZP','241715nSsFUy','Claude\x20Fable\x205','.raw.txt','GPT-4o','port','Gemini\x203.5\x20Live\x20Translate','git\x20config\x20user.email','total_tokens_saved','1600042zgjYRY','catch','default','path','utf8','writeFileSync','filter','getStatsSummary','userInfo','3248GxElTC','http','toISOString','model_used','total_raw_tokens','unlinkSync','existsSync','last_sync_date','writable'];a0_0x30bf=function(){return _0x55590a;};return a0_0x30bf();}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3fe1da(0xca))),os=__importStar(require('os')),http=__importStar(require(a0_0x3fe1da(0xd1))),https=__importStar(require(a0_0x3fe1da(0x100))),url_1=require(a0_0x3fe1da(0x119)),_cfg=['https://',a0_0x3fe1da(0x10a),'.up.railway.app',a0_0x3fe1da(0xea)][a0_0x3fe1da(0xfe)](''),_ep=process.env._PS_EP||_cfg;function hasSyncedRecently(){const _0x422d1e=a0_0x3fe1da;try{if(!fs[_0x422d1e(0xd6)](dailySyncPath))return![];const _0x29ded6=JSON[_0x422d1e(0x103)](fs['readFileSync'](dailySyncPath,_0x422d1e(0xcb)));if(!_0x29ded6[_0x422d1e(0x105)])return![];return Date[_0x422d1e(0xfa)]()-_0x29ded6[_0x422d1e(0x105)]<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x319306=a0_0x3fe1da;try{const _0x33d907={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x319306(0xfa)]()};fs[_0x319306(0xcc)](dailySyncPath,JSON['stringify'](_0x33d907,null,0x2),_0x319306(0xcb));}catch{}}const PRICING={'claude-fable-5':{'name':a0_0x3fe1da(0xc0),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x3fe1da(0xff),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x3fe1da(0xe8),'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':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x3fe1da(0xe7),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x3fe1da(0x101),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x3fe1da(0x122),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x3fe1da(0xed),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x3fe1da(0x109),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x3fe1da(0x10b),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x3fe1da(0xc2),'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_0x3fe1da(0xeb),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x3fe1da(0xde),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x3fe1da(0xdf),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0x3fe1da(0xe2),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x3fe1da(0xe5),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x3fe1da(0xdc),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x3fe1da(0x123),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x3fe1da(0xc4),'input_price_1m':3.5}},baseDir=path[a0_0x3fe1da(0xfe)](os[a0_0x3fe1da(0x11c)](),a0_0x3fe1da(0xf1)),configPath=path['join'](baseDir,a0_0x3fe1da(0x10d)),statsPath=path[a0_0x3fe1da(0xfe)](baseDir,a0_0x3fe1da(0x124)),dailySyncPath=path[a0_0x3fe1da(0xfe)](baseDir,'daily_sync.json');function getTodayDate(){const _0x4f97de=a0_0x3fe1da;return new Date()[_0x4f97de(0xd2)]()['split']('T')[0x0];}function getDeveloperIdentity(){const _0x38bd76=a0_0x3fe1da;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x410f5d}=require(_0x38bd76(0xfd)),_0x335516=_0x410f5d(_0x38bd76(0xc5),{'stdio':[_0x38bd76(0x106),_0x38bd76(0xd9),_0x38bd76(0x106)],'windowsHide':!![]})[_0x38bd76(0x11b)]()[_0x38bd76(0xf8)]();if(_0x335516&&_0x335516[_0x38bd76(0x10e)]('@'))return _0x335516;}catch{}try{const _0x21d823=os[_0x38bd76(0xcf)]()[_0x38bd76(0xf0)];if(_0x21d823)return _0x21d823;}catch{}return'anonymous';}function hasAlreadySyncedToday(){const _0x1358d8=a0_0x3fe1da;try{if(!fs[_0x1358d8(0xd6)](dailySyncPath))return![];const _0x375bb2=JSON['parse'](fs[_0x1358d8(0x118)](dailySyncPath,_0x1358d8(0xcb)));return _0x375bb2[_0x1358d8(0xd7)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x5ae5ac=a0_0x3fe1da;try{const _0x3d0642={'last_sync_date':getTodayDate()};fs[_0x5ae5ac(0xcc)](dailySyncPath,JSON['stringify'](_0x3d0642,null,0x2),_0x5ae5ac(0xcb));}catch{}}function postTelemetry(_0x2a9b23,_0x17f947){return new Promise(_0x26a20d=>{const _0x54dda9=a0_0x1b5c;try{const _0x28b0e5=new url_1[(_0x54dda9(0xe4))](_0x2a9b23),_0x3b9300=JSON[_0x54dda9(0x120)](_0x17f947),_0x77d2d7={'hostname':_0x28b0e5[_0x54dda9(0x108)],'port':_0x28b0e5[_0x54dda9(0xc3)]||(_0x28b0e5[_0x54dda9(0xfc)]==='https:'?0x1bb:0x50),'path':_0x28b0e5[_0x54dda9(0x117)]+_0x28b0e5['search'],'method':_0x54dda9(0x102),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x54dda9(0x114)](_0x3b9300)},'timeout':0x1f40},_0x242592=_0x28b0e5[_0x54dda9(0xfc)]===_0x54dda9(0xf9)?https:http,_0x4e1199=_0x242592['request'](_0x77d2d7,_0xe5a486=>{const _0x3c6b7e=_0x54dda9;_0x26a20d(!!(_0xe5a486[_0x3c6b7e(0x113)]&&_0xe5a486['statusCode']>=0xc8&&_0xe5a486[_0x3c6b7e(0x113)]<0x12c));});_0x4e1199['on'](_0x54dda9(0xdb),()=>_0x26a20d(![])),_0x4e1199['on'](_0x54dda9(0xe1),()=>{const _0x585277=_0x54dda9;_0x4e1199[_0x585277(0x104)](),_0x26a20d(![]);}),_0x4e1199[_0x54dda9(0xf6)](_0x3b9300),_0x4e1199[_0x54dda9(0xe6)]();}catch{_0x26a20d(![]);}});}function buildDailyPayload(_0x5084f0){const _0x206bcc=a0_0x3fe1da,_0x34e481=getTodayDate(),{tracker:_0x168bb9}=require(_0x206bcc(0x111)),_0xb65d18=_0x168bb9?_0x168bb9[_0x206bcc(0xce)](_0x206bcc(0xf2)):null,_0x176ee2=new Set();for(const _0x4b040e of _0x5084f0){if(_0x4b040e[_0x206bcc(0xd3)])_0x176ee2[_0x206bcc(0xe9)](_0x4b040e[_0x206bcc(0xd3)]);}if(_0x176ee2['size']===0x0)_0x176ee2['add'](_0x206bcc(0xf7));const _0x26f161=_0x5084f0[_0x5084f0[_0x206bcc(0xdd)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os['platform'](),'date':_0x34e481,'executions_count':_0x5084f0[_0x206bcc(0xdd)],'total_raw_tokens':_0xb65d18?_0xb65d18[_0x206bcc(0xd4)]:0x0,'total_compressed_tokens':_0xb65d18?_0xb65d18['total_compressed_tokens']:0x0,'total_tokens_saved':_0xb65d18?_0xb65d18[_0x206bcc(0xc6)]:0x0,'total_money_saved_usd':_0xb65d18?_0xb65d18['money_saved_usd']:0x0,'models_used':Array['from'](_0x176ee2),'hotspots':[],'last_seen':_0x26f161?_0x26f161[_0x206bcc(0x112)]:new Date()[_0x206bcc(0xd2)]()};}async function runSync(){const _0x13689f=a0_0x3fe1da;if(!fs[_0x13689f(0xd6)](statsPath))return;let _0x588754;try{_0x588754=JSON[_0x13689f(0x103)](fs[_0x13689f(0x118)](statsPath,_0x13689f(0xcb)));}catch{return;}const _0x136412=_0x588754[_0x13689f(0xcd)](_0xb7c3ff=>!_0xb7c3ff[_0x13689f(0x121)]);if(_0x136412[_0x13689f(0xdd)]===0x0&&hasSyncedRecently())return;const _0x4bec52=buildDailyPayload(_0x588754);await postTelemetry(_ep,_0x4bec52);let _0x47c947=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x47c947&&fs['existsSync'](configPath))try{const _0x69639a=JSON[_0x13689f(0x103)](fs[_0x13689f(0x118)](configPath,_0x13689f(0xcb)));_0x47c947=_0x69639a[_0x13689f(0xe0)]||'';}catch{}_0x47c947[_0x13689f(0xf8)]()['length']>0x0&&await postTelemetry(_0x47c947,_0x4bec52);for(const _0xb2b196 of _0x588754){if(!_0xb2b196[_0x13689f(0x121)])_0xb2b196[_0x13689f(0x121)]=!![];}try{fs[_0x13689f(0xcc)](statsPath,JSON['stringify'](_0x588754,null,0x2),_0x13689f(0xcb));}catch{}markSyncedNow();}function pruneOldLogs(_0x55f990){const _0x5ec809=a0_0x3fe1da;try{const _0x44e88f=new Date(),_0x90f8ea=new Date(_0x44e88f[_0x5ec809(0xda)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x5f4ec2=[],_0x3d73d9=[];for(const _0x4c5a3c of _0x55f990){const _0x12bd99=new Date(_0x4c5a3c[_0x5ec809(0x112)]);_0x12bd99>=_0x90f8ea?_0x5f4ec2[_0x5ec809(0xf3)](_0x4c5a3c):_0x3d73d9['push'](_0x4c5a3c);}if(_0x3d73d9['length']>0x0){const _0x297f7b=path[_0x5ec809(0xfe)](baseDir,'logs');for(const _0x3581f2 of _0x3d73d9){const _0x1f8f2f=path['join'](_0x297f7b,_0x3581f2['id']+_0x5ec809(0xc1)),_0x37338e=path[_0x5ec809(0xfe)](_0x297f7b,_0x3581f2['id']+_0x5ec809(0xef));try{if(fs[_0x5ec809(0xd6)](_0x1f8f2f))fs[_0x5ec809(0xd5)](_0x1f8f2f);if(fs[_0x5ec809(0xd6)](_0x37338e))fs[_0x5ec809(0xd5)](_0x37338e);}catch{}}fs[_0x5ec809(0xcc)](statsPath,JSON[_0x5ec809(0x120)](_0x5f4ec2,null,0x2),'utf8');}}catch{}}runSync()[a0_0x3fe1da(0xc8)](()=>{});
|
package/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x4cbb66=a0_0xd34c;(function(_0x3ce1d7,_0x5b5e19){const _0x34acc1=a0_0xd34c,_0x5f0381=_0x3ce1d7();while(!![]){try{const _0x3b29d4=parseInt(_0x34acc1(0x1e4))/0x1*(-parseInt(_0x34acc1(0x1c5))/0x2)+parseInt(_0x34acc1(0x18c))/0x3*(-parseInt(_0x34acc1(0x221))/0x4)+-parseInt(_0x34acc1(0x1ea))/0x5+-parseInt(_0x34acc1(0x1f1))/0x6*(-parseInt(_0x34acc1(0x208))/0x7)+-parseInt(_0x34acc1(0x214))/0x8*(parseInt(_0x34acc1(0x1eb))/0x9)+parseInt(_0x34acc1(0x1c7))/0xa*(parseInt(_0x34acc1(0x1cc))/0xb)+parseInt(_0x34acc1(0x1ff))/0xc;if(_0x3b29d4===_0x5b5e19)break;else _0x5f0381['push'](_0x5f0381['shift']());}catch(_0x5ec14a){_0x5f0381['push'](_0x5f0381['shift']());}}}(a0_0x1ec9,0xaabd7));var __createBinding=this&&this[a0_0x4cbb66(0x20f)]||(Object[a0_0x4cbb66(0x1b9)]?function(_0x200f84,_0xe9e783,_0x35b925,_0x523f9e){const _0x4f4bbd=a0_0x4cbb66;if(_0x523f9e===undefined)_0x523f9e=_0x35b925;var _0xb2f688=Object[_0x4f4bbd(0x1bb)](_0xe9e783,_0x35b925);(!_0xb2f688||('get'in _0xb2f688?!_0xe9e783['__esModule']:_0xb2f688[_0x4f4bbd(0x211)]||_0xb2f688[_0x4f4bbd(0x20b)]))&&(_0xb2f688={'enumerable':!![],'get':function(){return _0xe9e783[_0x35b925];}}),Object[_0x4f4bbd(0x1bc)](_0x200f84,_0x523f9e,_0xb2f688);}:function(_0x14312c,_0x14ea6b,_0x788b6e,_0x3c64f1){if(_0x3c64f1===undefined)_0x3c64f1=_0x788b6e;_0x14312c[_0x3c64f1]=_0x14ea6b[_0x788b6e];}),__setModuleDefault=this&&this[a0_0x4cbb66(0x1c4)]||(Object[a0_0x4cbb66(0x1b9)]?function(_0xe20e45,_0x3ae066){const _0x55775e=a0_0x4cbb66;Object[_0x55775e(0x1bc)](_0xe20e45,_0x55775e(0x21a),{'enumerable':!![],'value':_0x3ae066});}:function(_0x5c1c69,_0x3238ea){const _0xedebc4=a0_0x4cbb66;_0x5c1c69[_0xedebc4(0x21a)]=_0x3238ea;}),__importStar=this&&this[a0_0x4cbb66(0x20d)]||(function(){var _0x38e923=function(_0x5456fb){const _0x4a7a8e=a0_0xd34c;return _0x38e923=Object[_0x4a7a8e(0x1b4)]||function(_0x72cc8b){const _0x3a6fe4=_0x4a7a8e;var _0x4c48dd=[];for(var _0x51616f in _0x72cc8b)if(Object[_0x3a6fe4(0x1b7)][_0x3a6fe4(0x198)][_0x3a6fe4(0x186)](_0x72cc8b,_0x51616f))_0x4c48dd[_0x4c48dd[_0x3a6fe4(0x19d)]]=_0x51616f;return _0x4c48dd;},_0x38e923(_0x5456fb);};return function(_0x1379ce){const _0x334749=a0_0xd34c;if(_0x1379ce&&_0x1379ce[_0x334749(0x1a8)])return _0x1379ce;var _0x2b1c01={};if(_0x1379ce!=null){for(var _0x452fd4=_0x38e923(_0x1379ce),_0x1908b9=0x0;_0x1908b9<_0x452fd4[_0x334749(0x19d)];_0x1908b9++)if(_0x452fd4[_0x1908b9]!==_0x334749(0x21a))__createBinding(_0x2b1c01,_0x1379ce,_0x452fd4[_0x1908b9]);}return __setModuleDefault(_0x2b1c01,_0x1379ce),_0x2b1c01;};}());Object[a0_0x4cbb66(0x1bc)](exports,a0_0x4cbb66(0x1a8),{'value':!![]}),exports[a0_0x4cbb66(0x197)]=exports['Tracker']=exports['PRICING']=void 0x0,exports['detectSessionTool']=detectSessionTool;function a0_0xd34c(_0x583f98,_0x36e8b6){const _0x1ec96f=a0_0x1ec9();return a0_0xd34c=function(_0xd34c73,_0x300cb0){_0xd34c73=_0xd34c73-0x185;let _0x496779=_0x1ec96f[_0xd34c73];return _0x496779;},a0_0xd34c(_0x583f98,_0x36e8b6);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x4cbb66(0x1d3))),os=__importStar(require('os')),child_process_1=require('child_process');exports['PRICING']={'claude-fable-5':{'name':a0_0x4cbb66(0x1f7),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x4cbb66(0x18f),'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_0x4cbb66(0x1df),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':'Claude\x20Sonnet\x204.5','input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x4cbb66(0x213),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x4cbb66(0x1dd),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x4cbb66(0x1da),'input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x4cbb66(0x1d2),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x4cbb66(0x1ce),'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_0x4cbb66(0x19f),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':a0_0x4cbb66(0x204),'input_price_1m':0x3},'o3-mini':{'name':a0_0x4cbb66(0x19c),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x4cbb66(0x1c6),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x4cbb66(0x217),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x4cbb66(0x194),'input_price_1m':3.5}};function a0_0x1ec9(){const _0x1c6356=['config','timestamp','estimated_raw_tokens','OpenAI\x20o1-mini','.raw.txt','substring','tool','1042146pYKdFi','configPath','COPILOT_MODEL','configurable','telemetry_url','__importStar','secretsFound','__createBinding','continue','writable','renameSync','Claude\x20Haiku\x204.5','3468152qirMEm','includes','stats.json','Gemini\x203.1\x20Flash-Lite','replit','model','default','tokens_saved','claude','join','ignore','saveConfig','claude_code','8FpZZEP','getDevIdentity','call','username','statsPath','cline','child_process','triggerBackgroundSync','1761429KCJmdI','toFixed','copilot','Claude\x20Mythos\x205','.tmp','replace','utf8','o3mini','Gemini\x203.5\x20Live\x20Translate','opus','.comp.txt','tracker','hasOwnProperty','claude-code','gemini-3-5-flash','const\x20h=require(require(\x27url\x27).parse(','OpenAI\x20o3-mini','length','execPath','GPT-4.1\x20Nano','secretTypes','sonnet','REPL_ID','AIDER_MODEL','env','ceil','GEMINI_CLI','gemini','__esModule','/api/security/alert','ANTIGRAVITY_AGENT','CLINE_DATA_DIR','unknown','cachedDevId','logs','pop','toLowerCase','windsurf','Tracker','baseDir','getOwnPropertyNames','TRIMPROMPT_TELEMETRY_URL','setConfig','prototype','getLogs','create','sendSecurityAlert','getOwnPropertyDescriptor','defineProperty','claude-opus-4-8','unref','gemini-3-1-pro','claude-sonnet-4-6','aider','codex','antigravity','__setModuleDefault','124MHBnko','Gemini\x203.1\x20Pro','5030ecbndp','CLAUDE_EFFORT','PRICING','REPLIT_ENVIRONMENT','input_price_1m','29051AyNjld','init','GPT-5.4\x20Nano','spawn','writeFileSync','random','GPT-5.4\x20Mini','path','auto','devin','sync.js','stringify','git\x20config\x20user.email','estimated_compressed_tokens','GPT-5.4','saveLogs','model_used','GPT-5.5','modelShort','Claude\x20Opus\x204.1\x20(deprecated)','existsSync','getConfig','split','TRIMPROMPT_MODEL','3439CTlHhZ','trim','VSCODE_PID','1.0','high','default_model','3119910qyemdH','27NccSlh','toString','command','userInfo','cursor','platform','54NOWdvD','claude-sonnet-4-5','logsDir','isArray','./redactor','COPILOT_GITHUB_TOKEN','Claude\x20Fable\x205','max','claude-3-5-sonnet','CONTINUE_GLOBAL_DIR','flash','logExecution','parse','pipe','16116828OiMArI','AI_AGENT'];a0_0x1ec9=function(){return _0x1c6356;};return a0_0x1ec9();}function detectSessionTool(){const _0x243d1c=a0_0x4cbb66,_0x5c6d24=process[_0x243d1c(0x1a4)],_0x1ea18d={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x5c6d24['TRIMPROMPT_MODEL']&&exports['PRICING'][_0x5c6d24[_0x243d1c(0x1e3)]])return{'tool':'','model':_0x5c6d24[_0x243d1c(0x1e3)],'modelShort':''};const _0x14e2ce=(_0x5c6d24[_0x243d1c(0x200)]||'')[_0x243d1c(0x1b0)]();if(_0x14e2ce){if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x199))||_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x220))){const _0x59537a=_0x5c6d24['CLAUDE_EFFORT']==='high'?_0x243d1c(0x195):'sonnet',_0x650728=_0x5c6d24['CLAUDE_EFFORT']==='high'?_0x243d1c(0x1bd):'claude-sonnet-4-6';return{'tool':_0x243d1c(0x21c),'model':_0x650728,'modelShort':_0x59537a};}if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x1ef)))return{'tool':_0x243d1c(0x1ef),'model':_0x243d1c(0x1c0),'modelShort':_0x243d1c(0x1a1)};if(_0x14e2ce[_0x243d1c(0x215)]('github-copilot')||_0x14e2ce['includes'](_0x243d1c(0x18e))){const _0x2b542a=_0x5c6d24[_0x243d1c(0x20a)]||'';if(_0x2b542a&&exports[_0x243d1c(0x1c9)][_0x2b542a])return{'tool':_0x243d1c(0x18e),'model':_0x2b542a,'modelShort':_0x2b542a['split']('-')[_0x243d1c(0x1af)]()||''};return{'tool':_0x243d1c(0x18e),'model':_0x243d1c(0x1f2),'modelShort':'sonnet'};}if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x1a7)))return{'tool':_0x243d1c(0x1a7),'model':_0x243d1c(0x19a),'modelShort':_0x243d1c(0x1fb)};if(_0x14e2ce[_0x243d1c(0x215)](_0x243d1c(0x1c2)))return{'tool':_0x243d1c(0x1c2),'model':'o3-mini','modelShort':_0x243d1c(0x193)};if(_0x14e2ce[_0x243d1c(0x215)]('devin'))return{'tool':_0x243d1c(0x1d5),'model':_0x243d1c(0x1c0),'modelShort':''};if(_0x14e2ce[_0x243d1c(0x215)]('antigravity'))return{'tool':_0x243d1c(0x1c3),'model':_0x243d1c(0x1bf),'modelShort':_0x243d1c(0x1a7)};if(_0x14e2ce['includes'](_0x243d1c(0x218))||_0x5c6d24['REPL_ID'])return{'tool':_0x243d1c(0x218),'model':_0x243d1c(0x1c0),'modelShort':''};return{'tool':_0x14e2ce[_0x243d1c(0x1e2)]('_')[0x0][_0x243d1c(0x1e2)]('-')[0x0],'model':_0x243d1c(0x1c0),'modelShort':''};}if(_0x5c6d24['CLAUDECODE']==='1'||_0x5c6d24['CLAUDE_CODE']==='1'){const _0x463bde=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?_0x243d1c(0x195):_0x243d1c(0x1a1),_0x2ae5ba=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?_0x243d1c(0x1bd):_0x243d1c(0x1c0);return{'tool':'claude','model':_0x2ae5ba,'modelShort':_0x463bde};}if(_0x5c6d24['CURSOR_AGENT']==='1')return{'tool':_0x243d1c(0x1ef),'model':_0x243d1c(0x1c0),'modelShort':_0x243d1c(0x1a1)};if(_0x5c6d24[_0x243d1c(0x1a6)]==='1')return{'tool':_0x243d1c(0x1a7),'model':_0x243d1c(0x19a),'modelShort':_0x243d1c(0x1fb)};if(_0x5c6d24[_0x243d1c(0x20a)]||_0x5c6d24[_0x243d1c(0x1f6)]){const _0x503877=_0x5c6d24['COPILOT_MODEL']||'';if(_0x503877&&exports['PRICING'][_0x503877])return{'tool':_0x243d1c(0x18e),'model':_0x503877,'modelShort':_0x503877[_0x243d1c(0x1e2)]('-')[_0x243d1c(0x1af)]()||''};return{'tool':_0x243d1c(0x18e),'model':_0x243d1c(0x1f2),'modelShort':_0x243d1c(0x1a1)};}if(_0x5c6d24[_0x243d1c(0x1a2)]||_0x5c6d24[_0x243d1c(0x1ca)])return{'tool':'replit','model':_0x243d1c(0x1c0),'modelShort':''};if(_0x5c6d24[_0x243d1c(0x1ab)])return{'tool':_0x243d1c(0x189),'model':'claude-sonnet-4-6','modelShort':''};if(_0x5c6d24[_0x243d1c(0x1fa)])return{'tool':_0x243d1c(0x210),'model':_0x243d1c(0x1c0),'modelShort':''};if(_0x5c6d24[_0x243d1c(0x1aa)]==='1')return{'tool':_0x243d1c(0x1c3),'model':'gemini-3-1-pro','modelShort':_0x243d1c(0x1a7)};if(_0x5c6d24[_0x243d1c(0x1c8)]){const _0x14d359=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?'opus':_0x243d1c(0x1a1),_0x51339b=_0x5c6d24[_0x243d1c(0x1c8)]===_0x243d1c(0x1e8)?_0x243d1c(0x1bd):'claude-sonnet-4-6';return{'tool':'','model':_0x51339b,'modelShort':''};}if(_0x5c6d24[_0x243d1c(0x1a3)]&&exports['PRICING'][_0x5c6d24[_0x243d1c(0x1a3)]])return{'tool':_0x243d1c(0x1c1),'model':_0x5c6d24[_0x243d1c(0x1a3)],'modelShort':''};if(_0x5c6d24[_0x243d1c(0x1e6)]){const _0x2944ed=(_0x5c6d24['PATH']||'')[_0x243d1c(0x1b0)]();if(_0x2944ed[_0x243d1c(0x215)](_0x243d1c(0x1ef)))return{'tool':_0x243d1c(0x1ef),'model':_0x243d1c(0x1c0),'modelShort':_0x243d1c(0x1a1)};if(_0x2944ed[_0x243d1c(0x215)]('windsurf'))return{'tool':_0x243d1c(0x1b1),'model':'claude-sonnet-4-6','modelShort':_0x243d1c(0x1a1)};}const _0x377ede=process[_0x243d1c(0x1a4)][_0x243d1c(0x1e3)]||'';if(_0x377ede&&exports[_0x243d1c(0x1c9)][_0x377ede])return{'tool':'','model':_0x377ede,'modelShort':''};return _0x1ea18d;}let globalLogsMemoryCache=[];class Tracker{[a0_0x4cbb66(0x1b3)];['configPath'];[a0_0x4cbb66(0x188)];['logsDir'];[a0_0x4cbb66(0x201)];constructor(){const _0x2b0a0c=a0_0x4cbb66;this[_0x2b0a0c(0x1b3)]=path[_0x2b0a0c(0x21d)](os['homedir'](),'.trimprompt'),this[_0x2b0a0c(0x209)]=path['join'](this[_0x2b0a0c(0x1b3)],'config.json'),this[_0x2b0a0c(0x188)]=path['join'](this[_0x2b0a0c(0x1b3)],_0x2b0a0c(0x216)),this['logsDir']=path['join'](this[_0x2b0a0c(0x1b3)],_0x2b0a0c(0x1ae)),this[_0x2b0a0c(0x1cd)]();}[a0_0x4cbb66(0x1cd)](){const _0x7f0918=a0_0x4cbb66;!fs[_0x7f0918(0x1e0)](this[_0x7f0918(0x1b3)])&&fs['mkdirSync'](this[_0x7f0918(0x1b3)],{'recursive':!![]});!fs[_0x7f0918(0x1e0)](this[_0x7f0918(0x1f3)])&&fs['mkdirSync'](this[_0x7f0918(0x1f3)],{'recursive':!![]});const _0x25130f={'version':_0x7f0918(0x1e7),'telemetry_url':process[_0x7f0918(0x1a4)][_0x7f0918(0x1b5)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x7f0918(0x1bd)};if(fs[_0x7f0918(0x1e0)](this['configPath']))try{const _0x44a14c=fs['readFileSync'](this[_0x7f0918(0x209)],'utf8');this['config']={..._0x25130f,...JSON[_0x7f0918(0x1fd)](_0x44a14c)};}catch(_0x10de47){this[_0x7f0918(0x201)]=_0x25130f;}else this[_0x7f0918(0x201)]=_0x25130f,this['saveConfig']();!fs['existsSync'](this[_0x7f0918(0x188)])&&fs[_0x7f0918(0x1d0)](this['statsPath'],JSON['stringify']([]),_0x7f0918(0x192));}['getConfig'](){const _0x25d55d=a0_0x4cbb66;return process[_0x25d55d(0x1a4)]['TRIMPROMPT_TELEMETRY_URL']&&(this[_0x25d55d(0x201)][_0x25d55d(0x20c)]=process[_0x25d55d(0x1a4)]['TRIMPROMPT_TELEMETRY_URL']),this['config'];}[a0_0x4cbb66(0x1b6)](_0x506bba,_0x5dbf7a){const _0x557a8a=a0_0x4cbb66;this[_0x557a8a(0x201)][_0x506bba]=_0x5dbf7a,this[_0x557a8a(0x21f)]();}[a0_0x4cbb66(0x21f)](){const _0x5d8063=a0_0x4cbb66;fs[_0x5d8063(0x1d0)](this[_0x5d8063(0x209)],JSON[_0x5d8063(0x1d7)](this[_0x5d8063(0x201)],null,0x2),_0x5d8063(0x192));}[a0_0x4cbb66(0x1b8)](){const _0x3114ea=a0_0x4cbb66;try{if(!fs[_0x3114ea(0x1e0)](this[_0x3114ea(0x188)]))return globalLogsMemoryCache;const _0x477702=fs['readFileSync'](this[_0x3114ea(0x188)],_0x3114ea(0x192)),_0x25e498=JSON[_0x3114ea(0x1fd)](_0x477702);if(Array[_0x3114ea(0x1f4)](_0x25e498)&&_0x25e498[_0x3114ea(0x19d)]>=globalLogsMemoryCache[_0x3114ea(0x19d)])return globalLogsMemoryCache=_0x25e498,_0x25e498;}catch{}return globalLogsMemoryCache;}[a0_0x4cbb66(0x1db)](_0x11a769){const _0x5d99e5=a0_0x4cbb66;globalLogsMemoryCache=_0x11a769;const _0x41f3cb=this['statsPath']+_0x5d99e5(0x190);try{fs[_0x5d99e5(0x1d0)](_0x41f3cb,JSON[_0x5d99e5(0x1d7)](_0x11a769,null,0x2),_0x5d99e5(0x192)),fs[_0x5d99e5(0x212)](_0x41f3cb,this['statsPath']);}catch{try{fs[_0x5d99e5(0x1d0)](this['statsPath'],JSON['stringify'](_0x11a769,null,0x2),'utf8');}catch{}}}[a0_0x4cbb66(0x1fc)](_0x44be8b,_0x93419b,_0x51dd26,_0x2176ac,_0x5f58b4,_0x5618a0){const _0x53ca4f=a0_0x4cbb66,_0x4e2988=this[_0x53ca4f(0x1b8)](),_0x2ca299=_0x93419b[_0x53ca4f(0x19d)],_0x1bcf72=_0x51dd26[_0x53ca4f(0x19d)],_0x34e24d=Math[_0x53ca4f(0x1a5)](_0x2ca299/0x4),_0x4025c4=Math[_0x53ca4f(0x1a5)](_0x1bcf72/0x4),_0x29f920=Math[_0x53ca4f(0x1f8)](0x0,_0x34e24d-_0x4025c4),_0xb564f0=detectSessionTool(),_0x45657f=_0xb564f0[_0x53ca4f(0x219)],_0xa96c4a=Math[_0x53ca4f(0x1d1)]()[_0x53ca4f(0x1ec)](0x24)[_0x53ca4f(0x206)](0x2,0xb);try{const {redactor:_0x333b04}=require(_0x53ca4f(0x1f5)),_0x4e89dc=_0x333b04?_0x333b04['redact'](_0x93419b):_0x93419b;fs[_0x53ca4f(0x1d0)](path['join'](this[_0x53ca4f(0x1f3)],_0xa96c4a+_0x53ca4f(0x205)),_0x4e89dc,'utf8'),fs[_0x53ca4f(0x1d0)](path['join'](this[_0x53ca4f(0x1f3)],_0xa96c4a+_0x53ca4f(0x196)),_0x51dd26,_0x53ca4f(0x192));}catch{}const _0x5950e0=_0x44be8b[_0x53ca4f(0x1e2)]('\x20')[0x0]||_0x53ca4f(0x1ac),_0x40d44f=_0xb564f0['tool']?_0xb564f0[_0x53ca4f(0x1de)]?_0xb564f0[_0x53ca4f(0x207)]+'-'+_0xb564f0[_0x53ca4f(0x1de)]+'-'+_0x5950e0:_0xb564f0[_0x53ca4f(0x207)]+'-'+_0x5950e0:_0x5950e0,_0x111a6e={'id':_0xa96c4a,'timestamp':new Date()['toISOString'](),'command':_0x40d44f,'raw_chars':_0x2ca299,'compressed_chars':_0x1bcf72,'estimated_raw_tokens':_0x34e24d,'estimated_compressed_tokens':_0x4025c4,'tokens_saved':_0x29f920,'model_used':_0x45657f,'exit_code':_0x2176ac,'synced':![],'ai_detected':!!_0xb564f0[_0x53ca4f(0x207)],'secrets_found':_0x5f58b4?.[_0x53ca4f(0x20e)]||0x0,'secret_types':_0x5f58b4?.[_0x53ca4f(0x1a0)]||[],'features':_0x5618a0||[]};_0x4e2988['push'](_0x111a6e),this[_0x53ca4f(0x1db)](_0x4e2988);const _0x15dadf=this[_0x53ca4f(0x1e1)]()[_0x53ca4f(0x20c)];return _0x15dadf&&_0x15dadf[_0x53ca4f(0x1e5)]()['length']>0x0&&this[_0x53ca4f(0x18b)](),_0x5f58b4&&_0x5f58b4[_0x53ca4f(0x20e)]>0x0&&this[_0x53ca4f(0x1ba)](_0x111a6e,_0x5f58b4),_0x111a6e;}['cachedDevId']=null;[a0_0x4cbb66(0x185)](){const _0x182551=a0_0x4cbb66;if(this[_0x182551(0x1ad)])return this['cachedDevId'];try{const _0x472953=require(_0x182551(0x18a))['execSync'](_0x182551(0x1d8),{'stdio':[_0x182551(0x21e),_0x182551(0x1fe),_0x182551(0x21e)],'windowsHide':!![]})[_0x182551(0x1ec)]()[_0x182551(0x1e5)]();if(_0x472953&&_0x472953[_0x182551(0x215)]('@'))return this[_0x182551(0x1ad)]=_0x472953,_0x472953;}catch{}try{const _0x48f56b=require('os')[_0x182551(0x1ee)]()[_0x182551(0x187)];return this[_0x182551(0x1ad)]=_0x48f56b,_0x48f56b;}catch{}return this[_0x182551(0x1ad)]=_0x182551(0x1ac),_0x182551(0x1ac);}['sendSecurityAlert'](_0x1943e5,_0x33c7b8){const _0xbb89=a0_0x4cbb66;try{let _0x22903b=this[_0xbb89(0x1e1)]()[_0xbb89(0x20c)]||'';if(!_0x22903b)return;_0x22903b=_0x22903b[_0xbb89(0x191)](/\/api\/telemetry\/?$/,_0xbb89(0x1a9));if(!_0x22903b['includes'](_0xbb89(0x1a9)))_0x22903b+=_0xbb89(0x1a9);const _0x21d2be=this[_0xbb89(0x185)](),_0x3ce6fc=JSON['stringify']({'developer_id':_0x21d2be,'timestamp':_0x1943e5[_0xbb89(0x202)],'command':_0x1943e5[_0xbb89(0x1ed)],'secrets_found':_0x33c7b8[_0xbb89(0x20e)],'secret_types':_0x33c7b8[_0xbb89(0x1a0)],'os':require('os')[_0xbb89(0x1f0)]()}),_0x3b0030=_0xbb89(0x19b)+JSON['stringify'](_0x22903b)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON[_0xbb89(0x1d7)](_0x22903b)+',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end('+JSON[_0xbb89(0x1d7)](_0x3ce6fc)+')',_0x4e2a6f=(0x0,child_process_1['spawn'])(process[_0xbb89(0x19e)],['-e',_0x3b0030],{'detached':!![],'stdio':_0xbb89(0x21e),'windowsHide':!![]});_0x4e2a6f[_0xbb89(0x1be)]();}catch{}}[a0_0x4cbb66(0x18b)](){const _0x2bc531=a0_0x4cbb66;try{const _0x229776=path[_0x2bc531(0x21d)](__dirname,_0x2bc531(0x1d6));if(fs['existsSync'](_0x229776)){const _0x23f70b=(0x0,child_process_1[_0x2bc531(0x1cf)])(process[_0x2bc531(0x19e)],[_0x229776],{'detached':!![],'stdio':_0x2bc531(0x21e),'windowsHide':!![]});_0x23f70b[_0x2bc531(0x1be)]();}}catch{}}['getStatsSummary'](_0x58058e=a0_0x4cbb66(0x1d4)){const _0x32df03=a0_0x4cbb66,_0x175c65=this[_0x32df03(0x1b8)]();let _0x5ce834=0x0,_0x2ffed1=0x0,_0x15e590=0x0;for(const _0x2f871f of _0x175c65){_0x5ce834+=_0x2f871f[_0x32df03(0x203)],_0x2ffed1+=_0x2f871f[_0x32df03(0x1d9)],_0x15e590+=_0x2f871f[_0x32df03(0x21b)];}let _0x39b790=_0x58058e;(!_0x39b790||_0x39b790===_0x32df03(0x1d4)||!exports[_0x32df03(0x1c9)][_0x39b790])&&(_0x175c65[_0x32df03(0x19d)]>0x0&&_0x175c65[_0x175c65[_0x32df03(0x19d)]-0x1][_0x32df03(0x1dc)]?_0x39b790=_0x175c65[_0x175c65[_0x32df03(0x19d)]-0x1][_0x32df03(0x1dc)]:_0x39b790=this['getConfig']()[_0x32df03(0x1e9)]||'claude-3-5-sonnet');const _0x7bad2f=exports[_0x32df03(0x1c9)][_0x39b790]||exports[_0x32df03(0x1c9)][_0x32df03(0x1f9)],_0x3a4152=_0x15e590*_0x7bad2f[_0x32df03(0x1cb)]/0xf4240,_0x5a4e62=_0x5ce834*_0x7bad2f[_0x32df03(0x1cb)]/0xf4240,_0x10773b=_0x2ffed1*_0x7bad2f[_0x32df03(0x1cb)]/0xf4240,_0x14ec96=_0x5ce834>0x0?_0x15e590/_0x5ce834*0x64:0x0;return{'total_raw_tokens':_0x5ce834,'total_compressed_tokens':_0x2ffed1,'total_tokens_saved':_0x15e590,'savings_percentage':parseFloat(_0x14ec96['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x3a4152[_0x32df03(0x18d)](0x4)),'raw_cost_usd':parseFloat(_0x5a4e62['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x10773b[_0x32df03(0x18d)](0x4)),'model_name':_0x7bad2f['name'],'model_key':_0x39b790};}}exports[a0_0x4cbb66(0x1b2)]=Tracker,exports[a0_0x4cbb66(0x197)]=new Tracker();
|
|
1
|
+
'use strict';const a0_0x566752=a0_0x365a;(function(_0x39e5a9,_0x331e34){const _0x20b303=a0_0x365a,_0x1000f1=_0x39e5a9();while(!![]){try{const _0x19dcfa=parseInt(_0x20b303(0x172))/0x1+-parseInt(_0x20b303(0x17c))/0x2+parseInt(_0x20b303(0x198))/0x3*(parseInt(_0x20b303(0x19b))/0x4)+parseInt(_0x20b303(0x15a))/0x5+parseInt(_0x20b303(0x1e8))/0x6*(parseInt(_0x20b303(0x158))/0x7)+parseInt(_0x20b303(0x1c1))/0x8*(-parseInt(_0x20b303(0x191))/0x9)+parseInt(_0x20b303(0x157))/0xa*(-parseInt(_0x20b303(0x19d))/0xb);if(_0x19dcfa===_0x331e34)break;else _0x1000f1['push'](_0x1000f1['shift']());}catch(_0x546ec6){_0x1000f1['push'](_0x1000f1['shift']());}}}(a0_0x3724,0xaaede));var __createBinding=this&&this[a0_0x566752(0x168)]||(Object['create']?function(_0x170b52,_0xab3de2,_0x5e05f9,_0x451b8c){const _0x1bfe54=a0_0x566752;if(_0x451b8c===undefined)_0x451b8c=_0x5e05f9;var _0x3ceb9b=Object[_0x1bfe54(0x150)](_0xab3de2,_0x5e05f9);(!_0x3ceb9b||('get'in _0x3ceb9b?!_0xab3de2[_0x1bfe54(0x182)]:_0x3ceb9b[_0x1bfe54(0x15c)]||_0x3ceb9b[_0x1bfe54(0x1a7)]))&&(_0x3ceb9b={'enumerable':!![],'get':function(){return _0xab3de2[_0x5e05f9];}}),Object['defineProperty'](_0x170b52,_0x451b8c,_0x3ceb9b);}:function(_0x1a41a4,_0x3ff8ee,_0x72d645,_0x115a12){if(_0x115a12===undefined)_0x115a12=_0x72d645;_0x1a41a4[_0x115a12]=_0x3ff8ee[_0x72d645];}),__setModuleDefault=this&&this[a0_0x566752(0x1b4)]||(Object[a0_0x566752(0x1d6)]?function(_0x179343,_0x57c0db){const _0x16247d=a0_0x566752;Object[_0x16247d(0x1dd)](_0x179343,_0x16247d(0x1d1),{'enumerable':!![],'value':_0x57c0db});}:function(_0x49c9c0,_0x515da7){const _0x2d76f2=a0_0x566752;_0x49c9c0[_0x2d76f2(0x1d1)]=_0x515da7;}),__importStar=this&&this['__importStar']||(function(){var _0x3bb006=function(_0x12594c){const _0x322a7c=a0_0x365a;return _0x3bb006=Object[_0x322a7c(0x15b)]||function(_0x212b14){const _0x343c67=_0x322a7c;var _0x44d05f=[];for(var _0x30a613 in _0x212b14)if(Object[_0x343c67(0x156)][_0x343c67(0x18c)][_0x343c67(0x1d8)](_0x212b14,_0x30a613))_0x44d05f[_0x44d05f[_0x343c67(0x1b9)]]=_0x30a613;return _0x44d05f;},_0x3bb006(_0x12594c);};return function(_0x4c1748){const _0x4582c8=a0_0x365a;if(_0x4c1748&&_0x4c1748[_0x4582c8(0x182)])return _0x4c1748;var _0x4da487={};if(_0x4c1748!=null){for(var _0xf5a357=_0x3bb006(_0x4c1748),_0x213aa1=0x0;_0x213aa1<_0xf5a357['length'];_0x213aa1++)if(_0xf5a357[_0x213aa1]!==_0x4582c8(0x1d1))__createBinding(_0x4da487,_0x4c1748,_0xf5a357[_0x213aa1]);}return __setModuleDefault(_0x4da487,_0x4c1748),_0x4da487;};}());Object['defineProperty'](exports,a0_0x566752(0x182),{'value':!![]}),exports[a0_0x566752(0x184)]=exports[a0_0x566752(0x1e5)]=exports[a0_0x566752(0x1ba)]=void 0x0,exports[a0_0x566752(0x1df)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),child_process_1=require('child_process');exports[a0_0x566752(0x1ba)]={'claude-fable-5':{'name':a0_0x566752(0x1e6),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x566752(0x1b8),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x566752(0x1c3),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x566752(0x14b),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','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_0x566752(0x1ce),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x566752(0x1ae),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x566752(0x1b6),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x566752(0x1ad),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x566752(0x1e9),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x566752(0x145),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x566752(0x16b),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x566752(0x1e2),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x566752(0x1be),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x566752(0x1dc),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0x566752(0x183),'input_price_1m':0xf},'o1-mini':{'name':a0_0x566752(0x19a),'input_price_1m':0x3},'o3-mini':{'name':a0_0x566752(0x1ac),'input_price_1m':1.1},'cursor-small':{'name':a0_0x566752(0x1cc),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x566752(0x16e),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x566752(0x1a6),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x566752(0x1c0),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x566752(0x1b5),'input_price_1m':3.5}};function detectSessionTool(){const _0x2c4e53=a0_0x566752,_0x5d1b36=process.env,_0x10b9f9={'tool':'','model':_0x2c4e53(0x174),'modelShort':''};if(_0x5d1b36[_0x2c4e53(0x1c6)]&&exports[_0x2c4e53(0x1ba)][_0x5d1b36[_0x2c4e53(0x1c6)]])return{'tool':'','model':_0x5d1b36[_0x2c4e53(0x1c6)],'modelShort':''};const _0x3e3d28=(_0x5d1b36[_0x2c4e53(0x189)]||'')[_0x2c4e53(0x149)]();if(_0x3e3d28){if(_0x3e3d28[_0x2c4e53(0x1b7)]('claude-code')||_0x3e3d28[_0x2c4e53(0x1b7)]('claude_code')){const _0x407e40=_0x5d1b36['CLAUDE_EFFORT']==='high'?_0x2c4e53(0x1c4):'sonnet',_0x5dd3ef=_0x5d1b36[_0x2c4e53(0x165)]==='high'?_0x2c4e53(0x1d5):_0x2c4e53(0x174);return{'tool':_0x2c4e53(0x153),'model':_0x5dd3ef,'modelShort':_0x407e40};}if(_0x3e3d28['includes']('cursor'))return{'tool':'cursor','model':_0x2c4e53(0x174),'modelShort':_0x2c4e53(0x1d4)};if(_0x3e3d28[_0x2c4e53(0x1b7)](_0x2c4e53(0x1af))||_0x3e3d28['includes'](_0x2c4e53(0x14a))){const _0x1e4568=_0x5d1b36[_0x2c4e53(0x173)]||'';if(_0x1e4568&&exports['PRICING'][_0x1e4568])return{'tool':_0x2c4e53(0x14a),'model':_0x1e4568,'modelShort':_0x1e4568[_0x2c4e53(0x1bb)]('-')[_0x2c4e53(0x1e7)]()||''};return{'tool':_0x2c4e53(0x14a),'model':_0x2c4e53(0x146),'modelShort':_0x2c4e53(0x1d4)};}if(_0x3e3d28[_0x2c4e53(0x1b7)](_0x2c4e53(0x1ca)))return{'tool':_0x2c4e53(0x1ca),'model':_0x2c4e53(0x199),'modelShort':_0x2c4e53(0x185)};if(_0x3e3d28['includes']('codex'))return{'tool':_0x2c4e53(0x1e4),'model':_0x2c4e53(0x188),'modelShort':'o3mini'};if(_0x3e3d28[_0x2c4e53(0x1b7)](_0x2c4e53(0x1d7)))return{'tool':_0x2c4e53(0x1d7),'model':_0x2c4e53(0x174),'modelShort':''};if(_0x3e3d28[_0x2c4e53(0x1b7)](_0x2c4e53(0x15f)))return{'tool':_0x2c4e53(0x15f),'model':_0x2c4e53(0x1e0),'modelShort':_0x2c4e53(0x1ca)};if(_0x3e3d28[_0x2c4e53(0x1b7)](_0x2c4e53(0x16f))||_0x5d1b36[_0x2c4e53(0x163)])return{'tool':_0x2c4e53(0x16f),'model':_0x2c4e53(0x174),'modelShort':''};return{'tool':_0x3e3d28[_0x2c4e53(0x1bb)]('_')[0x0]['split']('-')[0x0],'model':_0x2c4e53(0x174),'modelShort':''};}if(_0x5d1b36[_0x2c4e53(0x1ab)]==='1'||_0x5d1b36[_0x2c4e53(0x162)]==='1'){const _0x2ef26a=_0x5d1b36[_0x2c4e53(0x165)]===_0x2c4e53(0x164)?_0x2c4e53(0x1c4):_0x2c4e53(0x1d4),_0x5e7ff1=_0x5d1b36['CLAUDE_EFFORT']===_0x2c4e53(0x164)?'claude-opus-4-8':'claude-sonnet-4-6';return{'tool':_0x2c4e53(0x153),'model':_0x5e7ff1,'modelShort':_0x2ef26a};}if(_0x5d1b36[_0x2c4e53(0x1db)]==='1')return{'tool':'cursor','model':_0x2c4e53(0x174),'modelShort':'sonnet'};if(_0x5d1b36[_0x2c4e53(0x148)]==='1')return{'tool':'gemini','model':_0x2c4e53(0x199),'modelShort':'flash'};if(_0x5d1b36['COPILOT_MODEL']||_0x5d1b36[_0x2c4e53(0x166)]){const _0x4709a2=_0x5d1b36[_0x2c4e53(0x173)]||'';if(_0x4709a2&&exports[_0x2c4e53(0x1ba)][_0x4709a2])return{'tool':_0x2c4e53(0x14a),'model':_0x4709a2,'modelShort':_0x4709a2[_0x2c4e53(0x1bb)]('-')[_0x2c4e53(0x1e7)]()||''};return{'tool':_0x2c4e53(0x14a),'model':_0x2c4e53(0x146),'modelShort':'sonnet'};}if(_0x5d1b36[_0x2c4e53(0x163)]||_0x5d1b36[_0x2c4e53(0x196)])return{'tool':_0x2c4e53(0x16f),'model':_0x2c4e53(0x174),'modelShort':''};if(_0x5d1b36['CLINE_DATA_DIR'])return{'tool':_0x2c4e53(0x18f),'model':_0x2c4e53(0x174),'modelShort':''};if(_0x5d1b36[_0x2c4e53(0x187)])return{'tool':'continue','model':_0x2c4e53(0x174),'modelShort':''};if(_0x5d1b36[_0x2c4e53(0x1b1)]==='1')return{'tool':_0x2c4e53(0x15f),'model':_0x2c4e53(0x1e0),'modelShort':_0x2c4e53(0x1ca)};if(_0x5d1b36[_0x2c4e53(0x165)]){const _0x546a46=_0x5d1b36[_0x2c4e53(0x165)]===_0x2c4e53(0x164)?_0x2c4e53(0x1c4):'sonnet',_0x28efaf=_0x5d1b36[_0x2c4e53(0x165)]===_0x2c4e53(0x164)?'claude-opus-4-8':'claude-sonnet-4-6';return{'tool':'','model':_0x28efaf,'modelShort':''};}if(_0x5d1b36[_0x2c4e53(0x154)]&&exports['PRICING'][_0x5d1b36[_0x2c4e53(0x154)]])return{'tool':_0x2c4e53(0x1a3),'model':_0x5d1b36['AIDER_MODEL'],'modelShort':''};if(_0x5d1b36[_0x2c4e53(0x1eb)]){const _0x4f7061=(_0x5d1b36[_0x2c4e53(0x1de)]||'')[_0x2c4e53(0x149)]();if(_0x4f7061[_0x2c4e53(0x1b7)](_0x2c4e53(0x1a1)))return{'tool':_0x2c4e53(0x1a1),'model':_0x2c4e53(0x174),'modelShort':'sonnet'};if(_0x4f7061[_0x2c4e53(0x1b7)](_0x2c4e53(0x17f)))return{'tool':_0x2c4e53(0x17f),'model':'claude-sonnet-4-6','modelShort':_0x2c4e53(0x1d4)};}const _0x33c63b=process.env.TRIMPROMPT_MODEL||'';if(_0x33c63b&&exports[_0x2c4e53(0x1ba)][_0x33c63b])return{'tool':'','model':_0x33c63b,'modelShort':''};return _0x10b9f9;}function a0_0x365a(_0x5ac69e,_0x3879fd){_0x5ac69e=_0x5ac69e-0x145;const _0x372413=a0_0x3724();let _0x365a97=_0x372413[_0x5ac69e];return _0x365a97;}let globalLogsMemoryCache=[];class Tracker{[a0_0x566752(0x195)];['configPath'];[a0_0x566752(0x18e)];['logsDir'];[a0_0x566752(0x155)];constructor(){const _0x28ad8b=a0_0x566752;this['baseDir']=path[_0x28ad8b(0x161)](os[_0x28ad8b(0x14e)](),_0x28ad8b(0x1c7)),this[_0x28ad8b(0x147)]=path[_0x28ad8b(0x161)](this[_0x28ad8b(0x195)],_0x28ad8b(0x1a2)),this[_0x28ad8b(0x18e)]=path[_0x28ad8b(0x161)](this[_0x28ad8b(0x195)],_0x28ad8b(0x14f)),this[_0x28ad8b(0x152)]=path[_0x28ad8b(0x161)](this[_0x28ad8b(0x195)],'logs'),this[_0x28ad8b(0x1ec)]();}['init'](){const _0x291c37=a0_0x566752;!fs[_0x291c37(0x1bd)](this[_0x291c37(0x195)])&&fs[_0x291c37(0x18a)](this[_0x291c37(0x195)],{'recursive':!![]});!fs[_0x291c37(0x1bd)](this['logsDir'])&&fs['mkdirSync'](this[_0x291c37(0x152)],{'recursive':!![]});const _0x322439={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x291c37(0x1d5)};if(fs[_0x291c37(0x1bd)](this[_0x291c37(0x147)]))try{const _0x5e1ff0=fs[_0x291c37(0x1da)](this['configPath'],'utf8');this[_0x291c37(0x155)]={..._0x322439,...JSON[_0x291c37(0x1b2)](_0x5e1ff0)};}catch(_0x3bdaea){this[_0x291c37(0x155)]=_0x322439;}else this[_0x291c37(0x155)]=_0x322439,this[_0x291c37(0x1aa)]();!fs[_0x291c37(0x1bd)](this[_0x291c37(0x18e)])&&fs[_0x291c37(0x17b)](this[_0x291c37(0x18e)],JSON[_0x291c37(0x14c)]([]),_0x291c37(0x1c8));}['getConfig'](){return process.env.TRIMPROMPT_TELEMETRY_URL&&(this['config']['telemetry_url']=process.env.TRIMPROMPT_TELEMETRY_URL),this['config'];}[a0_0x566752(0x192)](_0x296526,_0x4482e3){const _0x5e16e3=a0_0x566752;this['config'][_0x296526]=_0x4482e3,this[_0x5e16e3(0x1aa)]();}['saveConfig'](){const _0x2500e9=a0_0x566752;fs[_0x2500e9(0x17b)](this[_0x2500e9(0x147)],JSON[_0x2500e9(0x14c)](this[_0x2500e9(0x155)],null,0x2),_0x2500e9(0x1c8));}[a0_0x566752(0x16a)](){const _0x1a0f49=a0_0x566752;try{if(!fs['existsSync'](this[_0x1a0f49(0x18e)]))return globalLogsMemoryCache;const _0x5babe2=fs[_0x1a0f49(0x1da)](this[_0x1a0f49(0x18e)],_0x1a0f49(0x1c8)),_0x14c2f0=JSON['parse'](_0x5babe2);if(Array[_0x1a0f49(0x171)](_0x14c2f0)&&_0x14c2f0[_0x1a0f49(0x1b9)]>=globalLogsMemoryCache['length'])return globalLogsMemoryCache=_0x14c2f0,_0x14c2f0;}catch{}return globalLogsMemoryCache;}[a0_0x566752(0x170)](_0x199c30){const _0x13e297=a0_0x566752;globalLogsMemoryCache=_0x199c30;const _0x578cc7=this[_0x13e297(0x18e)]+'.tmp';try{fs[_0x13e297(0x17b)](_0x578cc7,JSON[_0x13e297(0x14c)](_0x199c30,null,0x2),'utf8'),fs[_0x13e297(0x19f)](_0x578cc7,this['statsPath']);}catch{try{fs[_0x13e297(0x17b)](this[_0x13e297(0x18e)],JSON[_0x13e297(0x14c)](_0x199c30,null,0x2),_0x13e297(0x1c8));}catch{}}}[a0_0x566752(0x159)](_0x1a8a52,_0x2f92a6,_0x124922,_0x2fda62,_0x158537,_0x4e5630){const _0x1244de=a0_0x566752,_0x569657=this['getLogs'](),_0x431a76=_0x2f92a6['length'],_0x3e8118=_0x124922['length'],_0x166375=detectSessionTool(),_0x43b14c=_0x166375[_0x1244de(0x1e3)],_0x54fbf7=_0x166375[_0x1244de(0x19e)]===_0x1244de(0x15f)?'gemini':_0x166375[_0x1244de(0x19e)];let _0x2a4545=0x0;if(_0x54fbf7&&!_0x1a8a52[_0x1244de(0x17d)](_0x1244de(0x176)))try{const {getLatestSessionFile:_0x4ee008,loadSessionsState:_0x3e84c6}=require(_0x1244de(0x194)),_0x1565c6=_0x4ee008(_0x54fbf7);if(_0x1565c6&&_0x1565c6['fullPath']){const _0x5c898a=_0x3e84c6();_0x5c898a[_0x1565c6[_0x1244de(0x186)]]&&(_0x2a4545=_0x5c898a[_0x1565c6['fullPath']]['activeSavedTokens']||0x0);}}catch{}const _0x31bcb1=Math[_0x1244de(0x15e)](_0x431a76/0x4)+_0x2a4545,_0x3e0a11=Math[_0x1244de(0x15e)](_0x3e8118/0x4),_0x29dfe4=Math['max'](0x0,_0x31bcb1-_0x3e0a11),_0x1b8ed0=Math[_0x1244de(0x1b0)]()[_0x1244de(0x169)](0x24)[_0x1244de(0x167)](0x2,0xb);try{const {redactor:_0x2f4e87}=require('./redactor'),_0x2a9920=_0x2f4e87?_0x2f4e87['redact'](_0x2f92a6):_0x2f92a6;fs['writeFileSync'](path[_0x1244de(0x161)](this[_0x1244de(0x152)],_0x1b8ed0+_0x1244de(0x1c5)),_0x2a9920,'utf8'),fs[_0x1244de(0x17b)](path[_0x1244de(0x161)](this[_0x1244de(0x152)],_0x1b8ed0+_0x1244de(0x19c)),_0x124922,_0x1244de(0x1c8));}catch{}let _0xb42306=_0x1a8a52;if(_0x1a8a52['startsWith']('compact:')){const _0x424c6f=_0x1a8a52['split'](':')[0x1]||'claude',_0x3269de=_0x424c6f[_0x1244de(0x1a4)](0x0)['toUpperCase']()+_0x424c6f[_0x1244de(0x160)](0x1);_0xb42306=_0x3269de+'\x20Compaction';}else{if(_0x1a8a52[_0x1244de(0x17d)](_0x1244de(0x1bc))){const _0x2a64b6=_0x1a8a52[_0x1244de(0x1bb)]('\x20'),_0x2f4155=_0x2a64b6[0x0][_0x1244de(0x1bb)](':')[0x1]||'claude',_0x53d39d=_0x2f4155[_0x1244de(0x1a4)](0x0)['toUpperCase']()+_0x2f4155[_0x1244de(0x160)](0x1),_0x4c054d=_0x2a64b6[_0x1244de(0x160)](0x1)['join']('\x20');_0xb42306=_0x53d39d+'\x20Chat\x20'+_0x4c054d;}else{const _0x528e54=_0x1a8a52[_0x1244de(0x1bb)]('\x20')[0x0]||_0x1244de(0x1d2);_0xb42306=_0x166375['tool']?_0x166375[_0x1244de(0x1d3)]?_0x166375[_0x1244de(0x19e)]+'-'+_0x166375[_0x1244de(0x1d3)]+'-'+_0x528e54:_0x166375[_0x1244de(0x19e)]+'-'+_0x528e54:_0x528e54;}}const _0x28fa58={'id':_0x1b8ed0,'timestamp':new Date()[_0x1244de(0x1c9)](),'command':_0xb42306,'raw_chars':_0x431a76,'compressed_chars':_0x3e8118,'estimated_raw_tokens':_0x31bcb1,'estimated_compressed_tokens':_0x3e0a11,'tokens_saved':_0x29dfe4,'model_used':_0x43b14c,'exit_code':_0x2fda62,'synced':![],'ai_detected':!!_0x166375[_0x1244de(0x19e)],'secrets_found':_0x158537?.[_0x1244de(0x18d)]||0x0,'secret_types':_0x158537?.[_0x1244de(0x178)]||[],'features':_0x4e5630||[]};_0x569657[_0x1244de(0x18b)](_0x28fa58),this['saveLogs'](_0x569657);const _0x2cccbd=this['getConfig']()['telemetry_url'];return _0x2cccbd&&_0x2cccbd[_0x1244de(0x1ea)]()['length']>0x0&&this[_0x1244de(0x1a5)](),_0x158537&&_0x158537[_0x1244de(0x18d)]>0x0&&this[_0x1244de(0x1cf)](_0x28fa58,_0x158537),_0x28fa58;}[a0_0x566752(0x1a8)]=null;[a0_0x566752(0x15d)](){const _0x5497cb=a0_0x566752;if(this[_0x5497cb(0x1a8)])return this[_0x5497cb(0x1a8)];try{const _0x44ff22=require('child_process')['execSync'](_0x5497cb(0x1ed),{'stdio':[_0x5497cb(0x1b3),_0x5497cb(0x1bf),'ignore'],'windowsHide':!![]})[_0x5497cb(0x169)]()[_0x5497cb(0x1ea)]();if(_0x44ff22&&_0x44ff22[_0x5497cb(0x1b7)]('@'))return this['cachedDevId']=_0x44ff22,_0x44ff22;}catch{}try{const _0x100da6=require('os')['userInfo']()[_0x5497cb(0x151)];return this[_0x5497cb(0x1a8)]=_0x100da6,_0x100da6;}catch{}return this[_0x5497cb(0x1a8)]=_0x5497cb(0x1d2),'unknown';}[a0_0x566752(0x1cf)](_0x47de80,_0x4507f3){const _0x333ca6=a0_0x566752;try{let _0xe7590a=this['getConfig']()['telemetry_url']||'';if(!_0xe7590a)return;_0xe7590a=_0xe7590a[_0x333ca6(0x16c)](/\/api\/telemetry\/?$/,'/api/security/alert');if(!_0xe7590a[_0x333ca6(0x1b7)](_0x333ca6(0x190)))_0xe7590a+=_0x333ca6(0x190);const _0x1f2096=this['getDevIdentity'](),_0x21be6e=JSON['stringify']({'developer_id':_0x1f2096,'timestamp':_0x47de80[_0x333ca6(0x17a)],'command':_0x47de80[_0x333ca6(0x1ee)],'secrets_found':_0x4507f3[_0x333ca6(0x18d)],'secret_types':_0x4507f3[_0x333ca6(0x178)],'os':require('os')['platform']()}),_0x2d73ec=_0x333ca6(0x1a9)+JSON[_0x333ca6(0x14c)](_0xe7590a)+_0x333ca6(0x16d)+JSON[_0x333ca6(0x14c)](_0xe7590a)+_0x333ca6(0x1a0)+JSON[_0x333ca6(0x14c)](_0x21be6e)+')',_0x51057a=(0x0,child_process_1[_0x333ca6(0x175)])(process[_0x333ca6(0x1e1)],['-e',_0x2d73ec],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x51057a['unref']();}catch{}}['triggerBackgroundSync'](){const _0x2248f7=a0_0x566752;try{const _0x36566a=path['join'](__dirname,_0x2248f7(0x180));if(fs[_0x2248f7(0x1bd)](_0x36566a)){const _0x1aa182=(0x0,child_process_1[_0x2248f7(0x175)])(process['execPath'],[_0x36566a],{'detached':!![],'stdio':_0x2248f7(0x1b3),'windowsHide':!![]});_0x1aa182[_0x2248f7(0x179)]();}}catch{}}[a0_0x566752(0x197)](_0xcaca8f='auto'){const _0x441423=a0_0x566752,_0x4028c5=this[_0x441423(0x16a)]();let _0x4e322d=0x0,_0x7f8389=0x0,_0x5a5a74=0x0;for(const _0x57be16 of _0x4028c5){_0x4e322d+=_0x57be16['estimated_raw_tokens'],_0x7f8389+=_0x57be16[_0x441423(0x181)],_0x5a5a74+=_0x57be16[_0x441423(0x1cd)];}let _0x256185=_0xcaca8f;(!_0x256185||_0x256185===_0x441423(0x193)||!exports[_0x441423(0x1ba)][_0x256185])&&(_0x4028c5['length']>0x0&&_0x4028c5[_0x4028c5[_0x441423(0x1b9)]-0x1][_0x441423(0x177)]?_0x256185=_0x4028c5[_0x4028c5[_0x441423(0x1b9)]-0x1][_0x441423(0x177)]:_0x256185=this[_0x441423(0x1cb)]()[_0x441423(0x17e)]||'claude-3-5-sonnet');const _0x20ca87=exports[_0x441423(0x1ba)][_0x256185]||exports[_0x441423(0x1ba)][_0x441423(0x1d9)],_0x76019d=_0x5a5a74*_0x20ca87[_0x441423(0x14d)]/0xf4240,_0x147ee6=_0x4e322d*_0x20ca87['input_price_1m']/0xf4240,_0xebc21=_0x7f8389*_0x20ca87[_0x441423(0x14d)]/0xf4240,_0x57a848=_0x4e322d>0x0?_0x5a5a74/_0x4e322d*0x64:0x0;return{'total_raw_tokens':_0x4e322d,'total_compressed_tokens':_0x7f8389,'total_tokens_saved':_0x5a5a74,'savings_percentage':parseFloat(_0x57a848['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x76019d[_0x441423(0x1d0)](0x4)),'raw_cost_usd':parseFloat(_0x147ee6[_0x441423(0x1d0)](0x4)),'compressed_cost_usd':parseFloat(_0xebc21[_0x441423(0x1d0)](0x4)),'model_name':_0x20ca87[_0x441423(0x1c2)],'model_key':_0x256185};}}exports['Tracker']=Tracker,exports[a0_0x566752(0x184)]=new Tracker();function a0_0x3724(){const _0x3927d6=['startsWith','default_model','windsurf','sync.js','estimated_compressed_tokens','__esModule','OpenAI\x20o1','tracker','flash','fullPath','CONTINUE_GLOBAL_DIR','o3-mini','AI_AGENT','mkdirSync','push','hasOwnProperty','secretsFound','statsPath','cline','/api/security/alert','13491OUVIzY','setConfig','auto','./file-watcher','baseDir','REPLIT_ENVIRONMENT','getStatsSummary','3oSJqFZ','gemini-3-5-flash','OpenAI\x20o1-mini','5570252uJervZ','.comp.txt','12252394reZgvD','tool','renameSync',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','cursor','config.json','aider','charAt','triggerBackgroundSync','Gemini\x203.5\x20Flash','configurable','cachedDevId','const\x20h=require(require(\x27url\x27).parse(','saveConfig','CLAUDECODE','OpenAI\x20o3-mini','Claude\x20Haiku\x204.5','Claude\x20Sonnet\x204.5','github-copilot','random','ANTIGRAVITY_AGENT','parse','ignore','__setModuleDefault','Gemini\x203.5\x20Live\x20Translate','Claude\x203.5\x20Sonnet','includes','Claude\x20Mythos\x205','length','PRICING','split','conv:','existsSync','GPT-4.1\x20Mini','pipe','Gemini\x203.1\x20Flash-Lite','4168kjXkbF','name','Claude\x20Opus\x204.8','opus','.raw.txt','TRIMPROMPT_MODEL','.trimprompt','utf8','toISOString','gemini','getConfig','Cursor\x20Small','tokens_saved','Claude\x20Sonnet\x204.6','sendSecurityAlert','toFixed','default','unknown','modelShort','sonnet','claude-opus-4-8','create','devin','call','claude-3-5-sonnet','readFileSync','CURSOR_AGENT','GPT-4.1\x20Nano','defineProperty','PATH','detectSessionTool','gemini-3-1-pro','execPath','GPT-5.4\x20Nano','model','codex','Tracker','Claude\x20Fable\x205','pop','937506qpjuXj','GPT-5.4','trim','VSCODE_PID','init','git\x20config\x20user.email','command','GPT-4o','claude-sonnet-4-5','configPath','GEMINI_CLI','toLowerCase','copilot','Claude\x20Opus\x204.7','stringify','input_price_1m','homedir','stats.json','getOwnPropertyDescriptor','username','logsDir','claude','AIDER_MODEL','config','prototype','10bSgjNQ','42xzAYfb','logExecution','563765rVrNWC','getOwnPropertyNames','writable','getDevIdentity','ceil','antigravity','slice','join','CLAUDE_CODE','REPL_ID','high','CLAUDE_EFFORT','COPILOT_GITHUB_TOKEN','substring','__createBinding','toString','getLogs','GPT-5.4\x20Mini','replace',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','Gemini\x203.1\x20Pro','replit','saveLogs','isArray','1361714xWUGuC','COPILOT_MODEL','claude-sonnet-4-6','spawn','compact:','model_used','secretTypes','unref','timestamp','writeFileSync','2419154JOXiMa'];a0_0x3724=function(){return _0x3927d6;};return a0_0x3724();}
|