@ranger-testing/ranger-cli 2.5.4-alpha.0e8b82c-9 → 2.5.4-alpha.1b80607-25
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 +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -0
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -0
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -0
- package/build/skills/ranger/SKILL.md +24 -8
- package/build/skills/ranger/create.md +16 -3
- package/build/skills/ranger/verify.md +35 -10
- package/package.json +3 -2
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5038aa=_0x19c3;(function(_0x3e7c9c,_0xdd4693){const _0x395e77=_0x19c3,_0x17d5d0=_0x3e7c9c();while(!![]){try{const _0x4d90fc=parseInt(_0x395e77(0x1c5))/0x1*(-parseInt(_0x395e77(0x1d1))/0x2)+parseInt(_0x395e77(0x1af))/0x3+-parseInt(_0x395e77(0x1b0))/0x4+-parseInt(_0x395e77(0x1d0))/0x5*(parseInt(_0x395e77(0x1cd))/0x6)+-parseInt(_0x395e77(0x1a0))/0x7+parseInt(_0x395e77(0x1be))/0x8+-parseInt(_0x395e77(0x1ba))/0x9*(-parseInt(_0x395e77(0x19d))/0xa);if(_0x4d90fc===_0xdd4693)break;else _0x17d5d0['push'](_0x17d5d0['shift']());}catch(_0x1707cc){_0x17d5d0['push'](_0x17d5d0['shift']());}}}(_0x2bb2,0x7118a));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0x19c3(_0x3559b1,_0x560069){_0x3559b1=_0x3559b1-0x18c;const _0x2bb294=_0x2bb2();let _0x19c372=_0x2bb294[_0x3559b1];return _0x19c372;}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';function _0x2bb2(){const _0x23478c=['user','\x20channel.','jKEwS','\x0aSuccessfully\x20installed\x20latest\x20version.','log','heOft','findIndex','unref','\x20ranger-managed\x20skill(s)...','408920WGeWCf','version','plugin','6132098uekTVf','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','trailhead','uElIX','jIZtl','some','error','...','QOGki','install','\x0aSuccessfully\x20installed\x20','trim','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','kGPAI','scope','1589328fGRyBe','2035240lOOzUP','ClkTm','hBshs','SoyMq','Latest\x20version:\x20\x20','length','vLoxH','inherit','latest','EtcUq','261OUUGiZ','\x0aInstalling\x20','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','split','3830168yPaEyK','Update\x20failed\x20for\x20@','RInlP','\x0aCurrent\x20version:\x20','QbyZi','kpXqb','BHhOV','157152PtKmcL','utf-8','warn','✓\x20Migrated\x20active\x20profile\x20file','project','AtvbD','\x0aReinstalling\x20','\x20skill\x20','11310BsyoKu','FtfDK','mzltB','85DfQWMa','4bosmiq','fuSCi','txyyQ','jwvuK','awhGD','xtOGK','nlamg','mCDXj','fvvHe','push','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','claude','win32','feOGm','AnDOT','\x0a✅\x20Update\x20complete!','ranger@trailhead','cjMLz','SwCWy','ggkgA','Update\x20failed:\x20'];_0x2bb2=function(){return _0x23478c;};return _0x2bb2();}import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x3531dd,_0x525b05,_0x21818b){const _0x2b4213={'ClkTm':function(_0x801fda,_0x2be4ee){return _0x801fda(_0x2be4ee);},'OBWue':function(_0x1d0be9,_0x27b0e4){return _0x1d0be9===_0x27b0e4;},'nlamg':function(_0x418729,_0x25b3f2){return _0x418729(_0x25b3f2);},'zPGKz':'ignore','mzltB':function(_0x33dd84,_0x50da5e,_0x48c4cf){return _0x33dd84(_0x50da5e,_0x48c4cf);}};return new Promise(_0x932824=>{const _0x29551e=_0x19c3,_0x5a409d={'SoyMq':function(_0x537d24,_0x3ba086){const _0x30e313=_0x19c3;return _0x2b4213[_0x30e313(0x1b1)](_0x537d24,_0x3ba086);},'jIZtl':function(_0x20f3fa,_0x468412){const _0xd969b4=_0x19c3;return _0x2b4213[_0xd969b4(0x1d7)](_0x20f3fa,_0x468412);}};let _0x28684d=![],_0x347ba6;const _0x5821c2=_0x528eec=>{const _0x1899c6=_0x19c3;if(_0x28684d)return;_0x28684d=!![],_0x347ba6&&clearTimeout(_0x347ba6),_0x2b4213[_0x1899c6(0x1b1)](_0x932824,_0x528eec);},_0x579ec9=spawn(_0x3531dd,_0x525b05,{'stdio':[_0x2b4213['zPGKz'],_0x21818b?.['stdio']??'inherit',_0x21818b?.['stdio']??'inherit'],'shell':process['platform']===_0x29551e(0x1dd)});_0x347ba6=_0x21818b?.['timeoutMs']?_0x2b4213[_0x29551e(0x1cf)](setTimeout,()=>{const _0x26f929=_0x29551e;_0x579ec9['kill'](),_0x579ec9[_0x26f929(0x19b)](),_0x5a409d[_0x26f929(0x1b3)](_0x5821c2,![]);},_0x21818b['timeoutMs']):undefined,_0x579ec9['on']('close',_0x563b8a=>{_0x5821c2(_0x2b4213['OBWue'](_0x563b8a,0x0));}),_0x579ec9['on'](_0x29551e(0x1a6),()=>{const _0x357f58=_0x29551e;_0x5a409d[_0x357f58(0x1a4)](_0x5821c2,![]);});});}export function resolveDistTag(_0x5f4eb5){const _0xfc7739=_0x19c3,_0x5d97f2={'jwvuK':'alpha','ggkgA':'beta'};if(/-alpha\./i['test'](_0x5f4eb5))return _0x5d97f2[_0xfc7739(0x1d4)];if(/-beta\./i['test'](_0x5f4eb5))return _0x5d97f2[_0xfc7739(0x192)];if(/-rc\./i['test'](_0x5f4eb5))return'rc';return _0xfc7739(0x1b8);}async function runInstall(_0x352ffa=_0x5038aa(0x1b8)){const _0x4c8364=_0x5038aa,_0x2e1b9a={'EHRMB':function(_0x53143b,_0xa7d7eb){return _0x53143b(_0xa7d7eb);},'kGPAI':function(_0x59cc97,_0x2fb9a6){return _0x59cc97===_0x2fb9a6;},'xazme':function(_0x50da5d,_0x1bcc7a,_0x33378c,_0x5a6a39){return _0x50da5d(_0x1bcc7a,_0x33378c,_0x5a6a39);},'jNfby':_0x4c8364(0x1a9),'hBshs':'ignore'};return new Promise(_0x2aa82=>{const _0x4101b5=_0x4c8364,_0xde6116={'SwCWy':function(_0x50810d,_0x1eeb08){const _0x1b0392=_0x19c3;return _0x2e1b9a[_0x1b0392(0x1ad)](_0x50810d,_0x1eeb08);}};console[_0x4101b5(0x198)](_0x4101b5(0x1bb)+PACKAGE_NAME+'@'+_0x352ffa+'...\x0a');const _0x1cd5d7=_0x2e1b9a['xazme'](spawn,'npm',[_0x2e1b9a['jNfby'],'-g',PACKAGE_NAME+'@'+_0x352ffa],{'stdio':[_0x2e1b9a[_0x4101b5(0x1b2)],_0x4101b5(0x1b7),'inherit'],'shell':_0x2e1b9a[_0x4101b5(0x1ad)](process['platform'],'win32')});_0x1cd5d7['on']('close',_0x588475=>{const _0x1d32f8=_0x4101b5;_0x2aa82(_0xde6116[_0x1d32f8(0x191)](_0x588475,0x0));}),_0x1cd5d7['on'](_0x4101b5(0x1a6),()=>{_0x2e1b9a['EHRMB'](_0x2aa82,![]);});});}async function updateClaudeMarketplace(){const _0x3fe90e=_0x5038aa,_0x5a553f={'EtcUq':function(_0x2729d7,_0x9a6961,_0x526635,_0x402c45){return _0x2729d7(_0x9a6961,_0x526635,_0x402c45);},'FtfDK':'marketplace','HDBWJ':'update','fFZjV':_0x3fe90e(0x1a2)},_0x5b729e=await _0x5a553f[_0x3fe90e(0x1b9)](runCommand,'claude',[_0x3fe90e(0x19f),_0x5a553f[_0x3fe90e(0x1ce)],_0x5a553f['HDBWJ'],_0x5a553f['fFZjV']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x5b729e)throw new Error(_0x3fe90e(0x1db));}async function updateClaudePlugin(_0x3b6a68){const _0x1213f7=_0x5038aa,_0x422aa0={'fvvHe':_0x1213f7(0x19f),'IgCoE':'update','oFNtz':function(_0x154922,_0x4a94a7,_0x37f434,_0x597e07){return _0x154922(_0x4a94a7,_0x37f434,_0x597e07);},'QOGki':'claude','VXIaE':function(_0x4ab779,_0xb50ca8){return _0x4ab779??_0xb50ca8;}},_0xa43b03=[_0x422aa0[_0x1213f7(0x1d9)],_0x422aa0['IgCoE'],_0x1213f7(0x18f)];_0x3b6a68&&_0xa43b03[_0x1213f7(0x1da)]('--scope',_0x3b6a68);const _0x255782=await _0x422aa0['oFNtz'](runCommand,_0x422aa0[_0x1213f7(0x1a8)],_0xa43b03,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x255782){const _0x3e8ea3=_0x422aa0['VXIaE'](_0x3b6a68,'user');throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x3e8ea3+_0x1213f7(0x1ac));}}function isSkillInstalled(_0x56da9f,_0x14f076,_0x474577){const _0x10306c=_0x5038aa,_0x511af5={'BHhOV':function(_0x5e3a85,_0x22ae54){return _0x5e3a85===_0x22ae54;},'zkARw':function(_0xa6f3f3,_0x5f1105){return _0xa6f3f3(_0x5f1105);}},_0x203d30=_0x511af5[_0x10306c(0x1c4)](_0x474577,'opencode')?getOpencodeSkillsDir(_0x14f076):_0x511af5['zkARw'](getSkillsDir,_0x14f076),_0x4375e4=join(_0x203d30,_0x56da9f);return _0x511af5['zkARw'](existsSync,_0x4375e4);}async function reinstallSkills(_0x59ebb5){const _0x417985=_0x5038aa,_0x30b31a={'eUWCj':_0x417985(0x194),'mCDXj':'claude','awhGD':function(_0x1fd4fd,_0x2f079c,_0x3b2838,_0x154b65){return _0x1fd4fd(_0x2f079c,_0x3b2838,_0x154b65);},'AtvbD':'opencode','jKEwS':function(_0x5da7ec,_0x3523b8,_0x41d7db){return _0x5da7ec(_0x3523b8,_0x41d7db);},'vcPwf':_0x417985(0x1a1)},_0x279c43=['project',_0x30b31a['eUWCj']],_0x40d380=[];for(const _0x53c036 of _0x279c43){for(const _0x4c05d0 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x4c05d0,_0x53c036,_0x30b31a[_0x417985(0x1d8)])&&_0x40d380['push']({'skillName':_0x4c05d0,'level':_0x53c036,'platform':_0x417985(0x1dc)}),_0x30b31a[_0x417985(0x1d5)](isSkillInstalled,_0x4c05d0,_0x53c036,_0x30b31a[_0x417985(0x1ca)])&&_0x40d380[_0x417985(0x1da)]({'skillName':_0x4c05d0,'level':_0x53c036,'platform':'opencode'});}}for(const _0x1f521c of _0x279c43){for(const _0x735b8b of DEPRECATED_SKILLS){await _0x30b31a[_0x417985(0x196)](removeSkill,_0x735b8b,_0x1f521c);}}if(_0x40d380['length']===0x0){console['log'](_0x30b31a['vcPwf']);return;}console[_0x417985(0x198)](_0x417985(0x1cb)+_0x40d380[_0x417985(0x1b5)]+_0x417985(0x19c));for(const {skillName:_0xdcd131,level:_0xdc744d,platform:_0x5468bc}of _0x40d380){try{await installSkill(_0xdcd131,{'level':_0xdc744d,'cliVersion':_0x59ebb5,'platform':_0x5468bc});}catch(_0x2d822c){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5468bc+'\x20'+_0xdc744d+_0x417985(0x1cc)+_0xdcd131+':',_0x2d822c);}}}async function ensureActiveProfileGitignored(){const _0x399aec=_0x5038aa,_0x420b21={'fuSCi':function(_0x236400,_0x1e4d33,_0x93ed66){return _0x236400(_0x1e4d33,_0x93ed66);},'AnDOT':function(_0x305962,_0x20f18a,_0x5c892b){return _0x305962(_0x20f18a,_0x5c892b);},'WCVcp':'utf-8','wACnM':'active-profile.txt'},_0xddf89d=_0x420b21[_0x399aec(0x1d2)](join,getRangerDir(),'.gitignore');if(!existsSync(_0xddf89d))return![];let _0x3b891b='';try{_0x3b891b=await _0x420b21[_0x399aec(0x18d)](readFile,_0xddf89d,_0x420b21['WCVcp']);}catch{return![];}const _0x16e7f2=_0x3b891b[_0x399aec(0x1bd)](/\r?\n/);if(_0x16e7f2[_0x399aec(0x1a5)](_0x20238c=>_0x20238c['trim']()==='active-profile.txt'))return![];let _0x8e9bda=_0x16e7f2[_0x399aec(0x19a)](_0x3b5d61=>_0x3b5d61[_0x399aec(0x1ab)]()==='active-feature.txt');_0x8e9bda===-0x1&&(_0x8e9bda=_0x16e7f2[_0x399aec(0x1b5)]);_0x16e7f2['splice'](_0x8e9bda,0x0,_0x420b21['wACnM']);let _0x4ac94e=_0x16e7f2['join']('\x0a');!_0x4ac94e['endsWith']('\x0a')&&(_0x4ac94e+='\x0a');try{await writeFile(_0xddf89d,_0x4ac94e,_0x399aec(0x1c6));}catch{return![];}return!![];}export async function update(){const _0x557157=_0x5038aa,_0x5be633={'heOft':function(_0x3ba415){return _0x3ba415();},'uElIX':function(_0x3996ae,_0x361ea6){return _0x3996ae(_0x361ea6);},'QbyZi':_0x557157(0x1b8),'GiEfL':function(_0x4a5b51,_0x5e7cc5){return _0x4a5b51(_0x5e7cc5);},'EImrV':function(_0x5b0050,_0x42c88b){return _0x5b0050(_0x42c88b);},'ZEXPI':_0x557157(0x1c8),'xtOGK':'Checking\x20for\x20updates...','txyyQ':_0x557157(0x197),'RInlP':function(_0x565514,_0x3f9c46,_0x30bc30){return _0x565514(_0x3f9c46,_0x30bc30);},'vLoxH':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','gCxmI':function(_0x39bc35,_0x18d193){return _0x39bc35<_0x18d193;},'TCtIs':'ranger@trailhead','LUAUl':function(_0x18a229){return _0x18a229();},'cjMLz':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','kpXqb':function(_0x340bef,_0x21a744){return _0x340bef===_0x21a744;},'IYDqH':_0x557157(0x1c9),'feOGm':function(_0x2d8e10){return _0x2d8e10();},'TkmTa':_0x557157(0x18e)},_0x20f80c=_0x5be633['heOft'](getCurrentVersion);console[_0x557157(0x198)](_0x557157(0x1c1)+_0x20f80c);const _0x362f7b=_0x5be633[_0x557157(0x1a3)](resolveDistTag,_0x20f80c);if(_0x362f7b!==_0x5be633[_0x557157(0x1c2)]){console[_0x557157(0x198)]('Prerelease\x20channel\x20detected\x20(@'+_0x362f7b+').\x20Staying\x20on\x20'+_0x362f7b+'\x20—\x20reinstalling\x20@'+_0x362f7b+_0x557157(0x1a7));const _0x150958=await _0x5be633['GiEfL'](runInstall,_0x362f7b);if(!_0x150958)throw new Error(_0x557157(0x1bf)+_0x362f7b+_0x557157(0x195));const _0x100464=_0x5be633['heOft'](getCurrentVersion);console['log'](_0x557157(0x1aa)+PACKAGE_NAME+'@'+_0x362f7b+'.'),await _0x5be633['EImrV'](reinstallSkills,_0x100464);const _0x37732a=await migrateActiveProfileFile();_0x37732a&&console[_0x557157(0x198)](_0x5be633['ZEXPI']);await ensureActiveProfileGitignored(),console['log'](_0x557157(0x18e));return;}console[_0x557157(0x198)](_0x5be633[_0x557157(0x1d6)]);const _0x28b849=_0x5be633[_0x557157(0x199)](getLatestVersion);let _0x596b87=_0x20f80c;if(!_0x28b849[_0x557157(0x19e)]){console[_0x557157(0x1c7)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x28b849['error']),console['log']('Attempting\x20install\x20anyway...');const _0x179644=await _0x5be633[_0x557157(0x199)](runInstall);if(_0x179644)console['log'](_0x5be633[_0x557157(0x1d3)]),_0x596b87=_0x5be633[_0x557157(0x199)](getCurrentVersion);else throw new Error(_0x557157(0x193)+_0x28b849['error']);}else{const _0x468619=_0x28b849[_0x557157(0x19e)];console[_0x557157(0x198)](_0x557157(0x1b4)+_0x468619);const _0x1a3101=_0x5be633[_0x557157(0x1c0)](compareVersions,_0x20f80c,_0x468619);if(_0x1a3101===0x0)console['log'](_0x5be633[_0x557157(0x1b6)]);else{if(_0x5be633['gCxmI'](_0x1a3101,0x0))console['log']('\x0aYour\x20version\x20('+_0x20f80c+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x468619+').');else{const _0x5dba96=await runInstall();if(_0x5dba96)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x468619),_0x596b87=_0x468619;else throw new Error('Update\x20failed.');}}}await reinstallSkills(_0x596b87);const _0x413bc2=await _0x5be633['EImrV'](isMarketplaceAdded,_0x557157(0x1a2)),_0x398d31=await isPluginInstalled(_0x5be633['TCtIs']);_0x413bc2&&(await _0x5be633['LUAUl'](updateClaudeMarketplace),console['log'](_0x5be633[_0x557157(0x190)]));if(_0x398d31){const _0x2d3d03=await getPluginInfo('ranger@trailhead');_0x5be633[_0x557157(0x1c3)](_0x2d3d03?.[_0x557157(0x1ae)],_0x5be633['IYDqH'])?(await updateClaudePlugin(_0x557157(0x1c9)),console[_0x557157(0x198)]('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).')):(await _0x5be633['LUAUl'](updateClaudePlugin),console[_0x557157(0x198)](_0x557157(0x1bc)));}const _0x4f7d91=await migrateActiveProfileFile();_0x4f7d91&&console['log'](_0x5be633['ZEXPI']);const _0xd884ed=await _0x5be633[_0x557157(0x18c)](ensureActiveProfileGitignored);console['log'](_0x5be633['TkmTa']);}
|
|
1
|
+
(function(_0x4e5359,_0x54d233){const _0x26623b=_0x22d0,_0x742f57=_0x4e5359();while(!![]){try{const _0x3e2c72=-parseInt(_0x26623b(0x221))/0x1*(parseInt(_0x26623b(0x21a))/0x2)+parseInt(_0x26623b(0x20c))/0x3*(-parseInt(_0x26623b(0x1fb))/0x4)+parseInt(_0x26623b(0x212))/0x5*(-parseInt(_0x26623b(0x201))/0x6)+parseInt(_0x26623b(0x22c))/0x7+-parseInt(_0x26623b(0x1df))/0x8*(-parseInt(_0x26623b(0x202))/0x9)+-parseInt(_0x26623b(0x1ed))/0xa+parseInt(_0x26623b(0x1de))/0xb;if(_0x3e2c72===_0x54d233)break;else _0x742f57['push'](_0x742f57['shift']());}catch(_0x2f3431){_0x742f57['push'](_0x742f57['shift']());}}}(_0x2c09,0x3bdb7));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x6d721,_0x4daed4,_0x142523){const _0x4a2649=_0x22d0,_0x5ed403={'BzEKp':function(_0x531ad2,_0x5d50f2){return _0x531ad2(_0x5d50f2);},'pIbPh':function(_0x256610,_0x3bb780){return _0x256610(_0x3bb780);},'PWCRC':function(_0xb97357,_0x3c5e71){return _0xb97357(_0x3c5e71);},'iAprn':function(_0x59264c,_0x30cc05,_0x2ef0ad,_0x3a55c2){return _0x59264c(_0x30cc05,_0x2ef0ad,_0x3a55c2);},'IQrTX':'ignore','rrnVA':_0x4a2649(0x1f6)};return new Promise(_0x12f8d7=>{const _0x1ac208=_0x4a2649,_0x491299={'nHtmI':function(_0x461e9f,_0x1b3f27){return _0x461e9f(_0x1b3f27);},'uhOpJ':function(_0x137ef9,_0x11197b){return _0x5ed403['PWCRC'](_0x137ef9,_0x11197b);}};let _0x2b86b0=![],_0x26b614;const _0x54e870=_0x512760=>{if(_0x2b86b0)return;_0x2b86b0=!![],_0x26b614&&_0x491299['nHtmI'](clearTimeout,_0x26b614),_0x491299['uhOpJ'](_0x12f8d7,_0x512760);},_0x390fe0=_0x5ed403[_0x1ac208(0x213)](spawn,_0x6d721,_0x4daed4,{'stdio':[_0x5ed403['IQrTX'],_0x142523?.[_0x1ac208(0x206)]??_0x1ac208(0x1f6),_0x142523?.['stdio']??_0x5ed403['rrnVA']],'cwd':_0x142523?.['cwd'],'shell':process['platform']==='win32'});_0x26b614=_0x142523?.[_0x1ac208(0x203)]?setTimeout(()=>{const _0x4e4a61=_0x1ac208;_0x390fe0[_0x4e4a61(0x1f0)](),_0x390fe0[_0x4e4a61(0x224)](),_0x5ed403['BzEKp'](_0x54e870,![]);},_0x142523['timeoutMs']):undefined,_0x390fe0['on']('close',_0x2f6c67=>{_0x5ed403['BzEKp'](_0x54e870,_0x2f6c67===0x0);}),_0x390fe0['on']('error',()=>{_0x5ed403['pIbPh'](_0x54e870,![]);});});}export function resolveDistTag(_0x4e760a){const _0x412c56=_0x22d0,_0x177725={'YFvDT':_0x412c56(0x1e9),'eqksp':'beta'};if(/-alpha\./i['test'](_0x4e760a))return _0x177725[_0x412c56(0x1e8)];if(/-beta\./i['test'](_0x4e760a))return _0x177725['eqksp'];if(/-rc\./i['test'](_0x4e760a))return'rc';return _0x412c56(0x208);}async function runInstall(_0x57a4b0='latest'){const _0x2c4051=_0x22d0,_0xe49a22={'hjxjX':function(_0x2650bc,_0x58dfd5,_0x4ce22e,_0x2e53c5){return _0x2650bc(_0x58dfd5,_0x4ce22e,_0x2e53c5);},'FoIVG':'npm','cZChL':'ignore','xghxS':_0x2c4051(0x20a)};return new Promise(_0x49f1ca=>{const _0xab5a78=_0x2c4051,_0x3a354b={'zJszO':function(_0x3ad6ca,_0x16d99f){return _0x3ad6ca(_0x16d99f);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x57a4b0+'...\x0a');const _0x4c94cd=_0xe49a22[_0xab5a78(0x200)](spawn,_0xe49a22[_0xab5a78(0x1f8)],[_0xab5a78(0x214),'-g',PACKAGE_NAME+'@'+_0x57a4b0],{'stdio':[_0xe49a22['cZChL'],'inherit','inherit'],'shell':process['platform']===_0xab5a78(0x205)});_0x4c94cd['on']('close',_0x1a2aa0=>{_0x49f1ca(_0x1a2aa0===0x0);}),_0x4c94cd['on'](_0xe49a22[_0xab5a78(0x228)],()=>{_0x3a354b['zJszO'](_0x49f1ca,![]);});});}function _0x22d0(_0x33bcf9,_0x28076c){_0x33bcf9=_0x33bcf9-0x1de;const _0x2c0917=_0x2c09();let _0x22d00e=_0x2c0917[_0x33bcf9];return _0x22d00e;}async function updateClaudeMarketplace(){const _0x2619eb=_0x22d0,_0x195caa={'tbJYT':_0x2619eb(0x1e5),'kzfay':_0x2619eb(0x209),'YBRBs':_0x2619eb(0x211)},_0x487997=await runCommand('claude',[_0x195caa[_0x2619eb(0x21e)],_0x195caa[_0x2619eb(0x1e2)],_0x195caa['YBRBs'],_0x2619eb(0x220)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x487997)throw new Error(_0x2619eb(0x20f));}async function updateClaudePlugin(_0x1a2842='user'){const _0x209a86=_0x22d0,_0x3c2a70={'oZgJq':'plugin','HPfRd':'ranger@trailhead','DBPxC':'user','hkkab':_0x209a86(0x225),'hDcei':'project','Ecimk':function(_0x5b8b4a,_0x319e44){return _0x5b8b4a===_0x319e44;}},_0x1cce47=[_0x3c2a70[_0x209a86(0x226)],_0x209a86(0x211),_0x3c2a70['HPfRd']];_0x1a2842!==_0x3c2a70[_0x209a86(0x219)]&&_0x1cce47['push']('--scope',_0x1a2842);const _0x1786cc=await runCommand(_0x3c2a70['hkkab'],_0x1cce47,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x1a2842===_0x3c2a70['hDcei']||_0x3c2a70['Ecimk'](_0x1a2842,_0x209a86(0x1f5))?getProjectRoot():undefined});if(!_0x1786cc)throw new Error(_0x209a86(0x1e1)+_0x1a2842+_0x209a86(0x1ee));}function isSkillInstalled(_0x2dd4db,_0x493f00,_0x1e9628){const _0x394cb1=_0x22d0,_0x101af2={'QIdOu':function(_0x291204,_0x446d12){return _0x291204===_0x446d12;},'GwzOq':function(_0x4b97d8,_0x96f561){return _0x4b97d8(_0x96f561);},'DFGiC':function(_0x22ff20,_0x1342b0,_0x2b381b){return _0x22ff20(_0x1342b0,_0x2b381b);}},_0x393cb5=_0x101af2[_0x394cb1(0x1fc)](_0x1e9628,'opencode')?getOpencodeSkillsDir(_0x493f00):_0x101af2['GwzOq'](getSkillsDir,_0x493f00),_0x29560a=_0x101af2[_0x394cb1(0x207)](join,_0x393cb5,_0x2dd4db);return existsSync(_0x29560a);}async function reinstallSkills(_0x1d1526){const _0x150738=_0x22d0,_0x5a8ff7={'KrrNG':'user','IqWfw':_0x150738(0x225),'EZLqv':function(_0x29ac39,_0x323296,_0x25f749,_0x37ad09){return _0x29ac39(_0x323296,_0x25f749,_0x37ad09);},'knkqn':'opencode','YtjeQ':function(_0x26f4b7,_0x39410a,_0x166542){return _0x26f4b7(_0x39410a,_0x166542);},'YghTR':function(_0x2ccc1e,_0xfde0fc){return _0x2ccc1e===_0xfde0fc;}},_0x5f1984=['project',_0x5a8ff7['KrrNG']],_0x4c7931=[];for(const _0x4861d4 of _0x5f1984){for(const _0x19ff25 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x19ff25,_0x4861d4,_0x5a8ff7['IqWfw'])&&_0x4c7931[_0x150738(0x22e)]({'skillName':_0x19ff25,'level':_0x4861d4,'platform':_0x5a8ff7[_0x150738(0x1e3)]}),_0x5a8ff7[_0x150738(0x204)](isSkillInstalled,_0x19ff25,_0x4861d4,_0x5a8ff7[_0x150738(0x20d)])&&_0x4c7931[_0x150738(0x22e)]({'skillName':_0x19ff25,'level':_0x4861d4,'platform':'opencode'});}}for(const _0x565329 of _0x5f1984){for(const _0x3b735c of DEPRECATED_SKILLS){await _0x5a8ff7['YtjeQ'](removeSkill,_0x3b735c,_0x565329);}}if(_0x5a8ff7[_0x150738(0x216)](_0x4c7931['length'],0x0)){console['log']('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console['log']('\x0aReinstalling\x20'+_0x4c7931[_0x150738(0x21b)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1db017,level:_0x435ad6,platform:_0x41d86e}of _0x4c7931){try{await installSkill(_0x1db017,{'level':_0x435ad6,'cliVersion':_0x1d1526,'platform':_0x41d86e});}catch(_0x45008e){console['warn'](_0x150738(0x1f3)+_0x41d86e+'\x20'+_0x435ad6+'\x20skill\x20'+_0x1db017+':',_0x45008e);}}}function _0x2c09(){const _0x1f2647=['update','1260970YhUYCk','iAprn','install','VzCGO','YghTR','trim','active-profile.txt','DBPxC','2086yVxJAe','length','.gitignore','utf-8','tbJYT',').\x20Staying\x20on\x20','trailhead','178DDvXFf','ranger@trailhead','Attempting\x20install\x20anyway...','unref','claude','oZgJq','version','xghxS','JbELb','Epszi','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','639919XgSayK','Prerelease\x20channel\x20detected\x20(@','push','9352409CYuoSZ','184xWVsol','PhEOw','Claude\x20plugin\x20update\x20failed\x20for\x20','kzfay','IqWfw','warn','plugin','endsWith','findIndex','YFvDT','alpha','dEULU','ObcSz','QEckg','1022150iKOUao','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','lkZhn','kill','\x0aSuccessfully\x20installed\x20','HzCJD','\x20\x20Failed\x20to\x20reinstall\x20','user','local','inherit','log','FoIVG','\x0aCould\x20not\x20check\x20latest\x20version:\x20','active-feature.txt','965716jbrCml','QIdOu','\x0aSuccessfully\x20updated\x20to\x20version\x20','PIPrA','uxirU','hjxjX','6JAXVKN','33273ytkYsM','timeoutMs','EZLqv','win32','stdio','DFGiC','latest','marketplace','error','some','3OrCBCX','knkqn','URQwn','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','vhTGd'];_0x2c09=function(){return _0x1f2647;};return _0x2c09();}async function ensureActiveProfileGitignored(){const _0x18f065=_0x22d0,_0x449aba={'EnPEm':function(_0x160c88,_0x2ebecd,_0x2f7d79){return _0x160c88(_0x2ebecd,_0x2f7d79);},'ObcSz':_0x18f065(0x21c),'ESiwI':function(_0xd97e73,_0x36eb10){return _0xd97e73(_0x36eb10);},'lkZhn':_0x18f065(0x21d),'sKrKL':function(_0x22a518,_0x1982b7){return _0x22a518===_0x1982b7;},'PhEOw':_0x18f065(0x218),'TtxfU':function(_0x215d63,_0x1fbb27,_0x3c1fb9,_0x4e3c7e){return _0x215d63(_0x1fbb27,_0x3c1fb9,_0x4e3c7e);}},_0x58ece1=_0x449aba['EnPEm'](join,getRangerDir(),_0x449aba[_0x18f065(0x1eb)]);if(!_0x449aba['ESiwI'](existsSync,_0x58ece1))return![];let _0x32a6da='';try{_0x32a6da=await readFile(_0x58ece1,_0x449aba[_0x18f065(0x1ef)]);}catch{return![];}const _0xe8982e=_0x32a6da['split'](/\r?\n/);if(_0xe8982e[_0x18f065(0x20b)](_0x44b437=>_0x44b437[_0x18f065(0x217)]()===_0x18f065(0x218)))return![];let _0x33574c=_0xe8982e[_0x18f065(0x1e7)](_0x1e8771=>_0x1e8771[_0x18f065(0x217)]()===_0x18f065(0x1fa));_0x449aba['sKrKL'](_0x33574c,-0x1)&&(_0x33574c=_0xe8982e[_0x18f065(0x21b)]);_0xe8982e['splice'](_0x33574c,0x0,_0x449aba[_0x18f065(0x1e0)]);let _0x106f76=_0xe8982e['join']('\x0a');!_0x106f76[_0x18f065(0x1e6)]('\x0a')&&(_0x106f76+='\x0a');try{await _0x449aba['TtxfU'](writeFile,_0x58ece1,_0x106f76,_0x18f065(0x21d));}catch{return![];}return!![];}export async function update(){const _0x203204=_0x22d0,_0x3ee08e={'HzCJD':function(_0x45fa03){return _0x45fa03();},'vTuyI':function(_0x41b15a,_0x268518){return _0x41b15a!==_0x268518;},'VzCGO':function(_0x329205,_0x659b94){return _0x329205(_0x659b94);},'dEULU':function(_0x39536e,_0x50fb79){return _0x39536e(_0x50fb79);},'eJyrm':'\x0a✅\x20Update\x20complete!','URQwn':'Checking\x20for\x20updates...','vhTGd':function(_0x4e6a6d){return _0x4e6a6d();},'Epszi':_0x203204(0x223),'BWTGk':'\x0aSuccessfully\x20installed\x20latest\x20version.','QEckg':_0x203204(0x22b),'PIPrA':function(_0x359ef9){return _0x359ef9();},'ufbKn':'Update\x20failed.','uxirU':'trailhead','cXWlQ':'ranger@trailhead','JbELb':function(_0x279ad3){return _0x279ad3();},'DkzgU':function(_0xf61d3e,_0x58d5fb){return _0xf61d3e(_0x58d5fb);},'NdCio':function(_0x590bbc,_0x371887){return _0x590bbc===_0x371887;},'BYkXV':function(_0x35237c,_0x2cab1d){return _0x35237c===_0x2cab1d;}},_0xb32625=_0x3ee08e[_0x203204(0x1f2)](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0xb32625);const _0x465c55=resolveDistTag(_0xb32625);if(_0x3ee08e['vTuyI'](_0x465c55,'latest')){console['log'](_0x203204(0x22d)+_0x465c55+_0x203204(0x21f)+_0x465c55+'\x20—\x20reinstalling\x20@'+_0x465c55+'...');const _0x5e1883=await _0x3ee08e['VzCGO'](runInstall,_0x465c55);if(!_0x5e1883)throw new Error('Update\x20failed\x20for\x20@'+_0x465c55+'\x20channel.');const _0x1bbfab=getCurrentVersion();console[_0x203204(0x1f7)](_0x203204(0x1f1)+PACKAGE_NAME+'@'+_0x465c55+'.'),await _0x3ee08e[_0x203204(0x1ea)](reinstallSkills,_0x1bbfab),await ensureActiveProfileGitignored(),console[_0x203204(0x1f7)](_0x3ee08e['eJyrm']);return;}console[_0x203204(0x1f7)](_0x3ee08e[_0x203204(0x20e)]);const _0x2fd309=_0x3ee08e[_0x203204(0x210)](getLatestVersion);let _0x97e618=_0xb32625;if(!_0x2fd309['version']){console[_0x203204(0x1e4)](_0x203204(0x1f9)+_0x2fd309['error']),console[_0x203204(0x1f7)](_0x3ee08e[_0x203204(0x22a)]);const _0x3feac7=await _0x3ee08e[_0x203204(0x210)](runInstall);if(_0x3feac7)console[_0x203204(0x1f7)](_0x3ee08e['BWTGk']),_0x97e618=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x2fd309['error']);}else{const _0x93339f=_0x2fd309[_0x203204(0x227)];console[_0x203204(0x1f7)]('Latest\x20version:\x20\x20'+_0x93339f);const _0xa48e06=compareVersions(_0xb32625,_0x93339f);if(_0xa48e06===0x0)console[_0x203204(0x1f7)](_0x3ee08e[_0x203204(0x1ec)]);else{if(_0xa48e06<0x0)console['log']('\x0aYour\x20version\x20('+_0xb32625+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x93339f+').');else{const _0x446cb8=await _0x3ee08e[_0x203204(0x1fe)](runInstall);if(_0x446cb8)console['log'](_0x203204(0x1fd)+_0x93339f),_0x97e618=_0x93339f;else throw new Error(_0x3ee08e['ufbKn']);}}}await _0x3ee08e[_0x203204(0x215)](reinstallSkills,_0x97e618);const _0x15e60d=await isMarketplaceAdded(_0x3ee08e[_0x203204(0x1ff)]),_0xd04178=await _0x3ee08e[_0x203204(0x1ea)](isPluginInstalled,_0x3ee08e['cXWlQ']);_0x15e60d&&(await _0x3ee08e[_0x203204(0x229)](updateClaudeMarketplace),console[_0x203204(0x1f7)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0xd04178){const _0x4997e7=await _0x3ee08e['dEULU'](getPluginInfo,_0x203204(0x222)),_0x228fa0=_0x4997e7?.['scope']??_0x203204(0x1f4);await _0x3ee08e['DkzgU'](updateClaudePlugin,_0x228fa0);if(_0x3ee08e['NdCio'](_0x228fa0,'project'))console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x3ee08e['BYkXV'](_0x228fa0,'local')?console[_0x203204(0x1f7)]('\x0aClaude\x20plugin\x20updated\x20(local\x20scope).'):console[_0x203204(0x1f7)]('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).');}const _0x13990c=await _0x3ee08e[_0x203204(0x210)](ensureActiveProfileGitignored);console['log']('\x0a✅\x20Update\x20complete!');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a63f3,_0x2614f0){const _0x50daf1=_0x4c0f,_0x25d3a2=_0x1a63f3();while(!![]){try{const _0x30afcb=parseInt(_0x50daf1(0x1e4))/0x1+parseInt(_0x50daf1(0x1e5))/0x2+-parseInt(_0x50daf1(0x1da))/0x3*(-parseInt(_0x50daf1(0x1d5))/0x4)+-parseInt(_0x50daf1(0x1ec))/0x5*(-parseInt(_0x50daf1(0x1d0))/0x6)+-parseInt(_0x50daf1(0x1cf))/0x7*(-parseInt(_0x50daf1(0x1c5))/0x8)+-parseInt(_0x50daf1(0x1f0))/0x9+-parseInt(_0x50daf1(0x1e8))/0xa;if(_0x30afcb===_0x2614f0)break;else _0x25d3a2['push'](_0x25d3a2['shift']());}catch(_0x558a3a){_0x25d3a2['push'](_0x25d3a2['shift']());}}}(_0x1259,0xb08f8));function _0x1259(){const _0x284a87=['snQCt','\x22\x20via\x20server-side\x20login...','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','\x20\x20ranger\x20profile\x20add\x20','3AbsQgC','CJdHz','success','✓\x20Session\x20refreshed\x20for\x20\x22','\x22\x20via\x20headed\x20browser...','Capturing\x20a\x20fresh\x20session\x20for\x20\x22','\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a','hlQoZ','Can\x27t\x20refresh\x20\x22','setupHeaders','416749WISwBq','1831638SdUSYO','GLnqQ','\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','20894640wyVCXp','Refreshing\x20session\x20for\x20\x22','\x20\x20Server-side\x20login\x20error:\x20','`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).','1204295MaGack','fhhBl','exit','error','4996035TMKlVv','log','8TvhxlF','Profile\x20\x22','Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','hLSLR','\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a','test_output','status','cWUty','No\x20profile\x20named\x20\x22','environmentKey','5183871ujzSho','6xEpMGT','Create\x20it\x20with:\x0a','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','KvPvg','not_configured','4215164VYywDm'];_0x1259=function(){return _0x284a87;};return _0x1259();}import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';function _0x4c0f(_0x2f176b,_0x1e6644){_0x2f176b=_0x2f176b-0x1c5;const _0x1259e5=_0x1259();let _0x4c0fa5=_0x1259e5[_0x2f176b];return _0x4c0fa5;}import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{getEnvNames}from'./env.js';export async function updateEnv(_0x5d7f6c,_0x1b06bf,_0x4add3e){const _0x2aea61=_0x4c0f,_0x32b3e1={'tQuIQ':function(_0x2070b3,_0x58e757){return _0x2070b3(_0x58e757);},'CJdHz':function(_0x4d2ddc,_0x5c0b9d){return _0x4d2ddc===_0x5c0b9d;},'KvPvg':'local','fhhBl':function(_0x38637e,_0x4c085f){return _0x38637e+_0x4c085f;},'oBHhO':function(_0x1b3e1c,_0x55f240){return _0x1b3e1c+_0x55f240;},'sECwf':function(_0x3a3b8b,_0x105774){return _0x3a3b8b+_0x105774;},'cWUty':function(_0x55645a,_0x5cac97,_0x2f24c4){return _0x55645a(_0x5cac97,_0x2f24c4);},'snQCt':function(_0x490e9a,_0x7700f4){return _0x490e9a===_0x7700f4;},'cvpGj':_0x2aea61(0x1d4),'hLSLR':'\x20\x20Falling\x20back\x20to\x20headed\x20browser...','hlQoZ':function(_0x37922d,_0x1c1327){return _0x37922d+_0x1c1327;},'GLnqQ':function(_0x50f3cb,_0x324b25){return _0x50f3cb+_0x324b25;}},_0x5b239f=await _0x32b3e1['tQuIQ'](fetchCloudProfile,_0x5d7f6c);if(!_0x5b239f){const {envTypes:_0x37b468}=await getEnvNames(),_0x136771=_0x37b468[_0x5d7f6c];(_0x136771==='legacy'||_0x32b3e1[_0x2aea61(0x1db)](_0x136771,_0x32b3e1[_0x2aea61(0x1d3)])||_0x136771==='ci')&&(console[_0x2aea61(0x1ef)](_0x32b3e1[_0x2aea61(0x1ed)](_0x32b3e1[_0x2aea61(0x1ed)](_0x2aea61(0x1c6)+_0x5d7f6c+_0x2aea61(0x1d2)+_0x2aea61(0x1c7),'\x0a'),'\x20\x20ranger\x20profile\x20add\x20'+_0x5d7f6c+'\x0a')),process[_0x2aea61(0x1ee)](0x1));}!_0x5b239f&&(console['error'](_0x32b3e1['oBHhO'](_0x32b3e1['sECwf'](_0x2aea61(0x1cd)+_0x5d7f6c+'\x22\x20found.\x0a',_0x2aea61(0x1d1))+'\x0a','\x20\x20ranger\x20profile\x20add\x20'+_0x5d7f6c+'\x0a')),process['exit'](0x1));const _0x872b4=await fetchAuthConfig()['catch'](()=>null),_0x3619d0=_0x5b239f['environmentKey']&&_0x872b4?resolveAuthEnvironmentLocally(_0x872b4,_0x5b239f[_0x2aea61(0x1ce)]):null;if(_0x5b239f[_0x2aea61(0x1ce)]&&_0x3619d0){console[_0x2aea61(0x1f1)](_0x2aea61(0x1e9)+_0x5d7f6c+_0x2aea61(0x1d7));try{const _0x33997d=await _0x32b3e1[_0x2aea61(0x1cc)](serverSideLogin,_0x5d7f6c,{'force':!![]});if(_0x33997d['status']===_0x2aea61(0x1dc)){console['log']('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x5d7f6c+'\x22.');return;}_0x32b3e1[_0x2aea61(0x1d6)](_0x33997d[_0x2aea61(0x1cb)],_0x32b3e1['cvpGj'])?console[_0x2aea61(0x1f1)](_0x2aea61(0x1e7)):(_0x33997d[_0x2aea61(0x1ca)]&&(console[_0x2aea61(0x1f1)]('\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:'),console['log'](_0x33997d[_0x2aea61(0x1ca)])),console['log'](_0x32b3e1[_0x2aea61(0x1c8)]));}catch(_0x93a04d){console['log'](_0x2aea61(0x1ea)+(_0x93a04d instanceof Error?_0x93a04d['message']:String(_0x93a04d))),console['log'](_0x2aea61(0x1d8));}}const _0x2fe5af=_0x5b239f['settings']??{},_0x255a5e=_0x2fe5af['setupHeaders'],_0x1d7b82=_0x2fe5af['baseUrl'],_0x25c5cf=_0x3619d0?{..._0x3619d0,'setupHeaders':_0x255a5e??_0x3619d0[_0x2aea61(0x1e3)]}:_0x1d7b82?{'key':_0x5b239f[_0x2aea61(0x1ce)]??'','domains':[_0x1d7b82],'setupHeaders':_0x255a5e}:null;!_0x25c5cf&&(console['error'](_0x32b3e1[_0x2aea61(0x1e1)](_0x2aea61(0x1c6)+_0x5d7f6c+_0x2aea61(0x1c9),'Re-create\x20it\x20with:\x0a')+'\x0a'+(_0x2aea61(0x1d9)+_0x5d7f6c+'\x20--url\x20<your-app-url>\x0a')),process[_0x2aea61(0x1ee)](0x1)),!isInteractive()&&(console['error'](_0x32b3e1[_0x2aea61(0x1e6)](_0x2aea61(0x1e2)+_0x5d7f6c+_0x2aea61(0x1e0),'Run\x20`ranger\x20profile\x20update\x20'+_0x5d7f6c+_0x2aea61(0x1eb))),process['exit'](0x1)),console[_0x2aea61(0x1f1)](_0x2aea61(0x1df)+_0x5d7f6c+_0x2aea61(0x1de)),await manualBrowserLogin(_0x5b239f,_0x25c5cf),console[_0x2aea61(0x1f1)](_0x2aea61(0x1dd)+_0x5d7f6c+'\x22.');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ebf2c,_0x592df2){const _0xc53418=_0x2fb0,_0x1c7749=_0x3ebf2c();while(!![]){try{const _0x5c7301=-parseInt(_0xc53418(0xe6))/0x1+parseInt(_0xc53418(0xee))/0x2*(-parseInt(_0xc53418(0xf4))/0x3)+-parseInt(_0xc53418(0xf0))/0x4+parseInt(_0xc53418(0xe4))/0x5+-parseInt(_0xc53418(0xec))/0x6*(-parseInt(_0xc53418(0xe8))/0x7)+-parseInt(_0xc53418(0xed))/0x8*(-parseInt(_0xc53418(0xe3))/0x9)+parseInt(_0xc53418(0xea))/0xa;if(_0x5c7301===_0x592df2)break;else _0x1c7749['push'](_0x1c7749['shift']());}catch(_0x2dd9ad){_0x1c7749['push'](_0x1c7749['shift']());}}}(_0x5eb0,0xef4f6));function _0x2fb0(_0x9f7e70,_0x39a351){_0x9f7e70=_0x9f7e70-0xe2;const _0x5eb0ba=_0x5eb0();let _0x2fb0d3=_0x5eb0ba[_0x9f7e70];return _0x2fb0d3;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x5eb0(){const _0x2cebd9=['8ETRZtS','94ITsOKx','`ranger\x20profile\x20add\x20','7816504ppocAg','kaEyl','status','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','63966nHRsxI','cKOFz','8805870VqVdRK','8502915cxMqLJ','zBsSd','645769xLemid','\x0a✓\x20Now\x20using\x20profile\x20\x22','7315385qxyWIj','settings.json','8581750aVCxAE','log','6LDpmDj'];_0x5eb0=function(){return _0x2cebd9;};return _0x5eb0();}import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x5d6833){const _0x1aa16d=_0x2fb0,_0x2d8ad8={'cKOFz':_0x1aa16d(0xe9),'zBsSd':function(_0x44479a,_0x398186){return _0x44479a(_0x398186);},'sqzcq':function(_0x109f6b,_0x49f67a){return _0x109f6b instanceof _0x49f67a;},'kaEyl':function(_0x391a0d,_0x691dac){return _0x391a0d+_0x691dac;}},_0x4166ee=getEnvDir(_0x5d6833),_0x533426=join(_0x4166ee,_0x2d8ad8[_0x1aa16d(0xe2)]),_0x484c6d=_0x2d8ad8[_0x1aa16d(0xe5)](existsSync,_0x4166ee)&&_0x2d8ad8[_0x1aa16d(0xe5)](existsSync,_0x533426);if(_0x484c6d){await writeActiveProfileName(_0x5d6833),console[_0x1aa16d(0xeb)](_0x1aa16d(0xe7)+_0x5d6833+'\x22');return;}let _0x4633fe=null,_0x52370e=![];try{_0x4633fe=await fetchCloudProfile(_0x5d6833);if(!_0x4633fe)_0x52370e=!![];}catch(_0x544161){_0x2d8ad8['sqzcq'](_0x544161,ApiError)&&_0x544161[_0x1aa16d(0xf2)]===0x194&&(_0x52370e=!![]);}if(_0x52370e)throw new Error(_0x2d8ad8['kaEyl'](_0x2d8ad8[_0x1aa16d(0xf1)]('Profile\x20\x22'+_0x5d6833+_0x1aa16d(0xf3),'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),_0x1aa16d(0xef)+_0x5d6833+'`\x20to\x20create\x20one.'));await writeActiveProfileName(_0x5d6833),console[_0x1aa16d(0xeb)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x5d6833+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xcdea43=_0x185f;(function(_0x23d179,_0x58c6c8){const _0x748c24=_0x185f,_0x3b999b=_0x23d179();while(!![]){try{const _0x45a332=-parseInt(_0x748c24(0x14b))/0x1*(parseInt(_0x748c24(0x14f))/0x2)+-parseInt(_0x748c24(0x153))/0x3*(parseInt(_0x748c24(0x154))/0x4)+parseInt(_0x748c24(0x152))/0x5+parseInt(_0x748c24(0x151))/0x6*(-parseInt(_0x748c24(0x14e))/0x7)+parseInt(_0x748c24(0x155))/0x8+parseInt(_0x748c24(0x150))/0x9+parseInt(_0x748c24(0x14a))/0xa;if(_0x45a332===_0x58c6c8)break;else _0x3b999b['push'](_0x3b999b['shift']());}catch(_0x105556){_0x3b999b['push'](_0x3b999b['shift']());}}}(_0xa763,0xc30ba));function _0x185f(_0x251039,_0x1acd42){_0x251039=_0x251039-0x149;const _0xa76336=_0xa763();let _0x185f74=_0xa76336[_0x251039];return _0x185f74;}import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE=_0xcdea43(0x14d),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function readLegacyActiveProfileFile(){const _0x410654=_0xcdea43,_0x4894ab={'mSaia':function(_0x8d1fbe,_0x2a7e08,_0x2cb9c3){return _0x8d1fbe(_0x2a7e08,_0x2cb9c3);}},_0x4143be=[join(getRangerDir(),LEGACY_ACTIVE_PROFILE_FILE),_0x4894ab['mSaia'](join,getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),_0x4894ab[_0x410654(0x14c)](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE)];for(const _0x1a0c93 of _0x4143be){if(existsSync(_0x1a0c93))return _0x1a0c93;}return null;}export async function readActiveProfileName(){const _0x2afd3e={'crDPm':'utf-8'},_0x35c117=readLastProfile(process['cwd']());if(_0x35c117)return _0x35c117;const _0x1d0d40=readLegacyActiveProfileFile();if(!_0x1d0d40)return null;try{return(await readFile(_0x1d0d40,_0x2afd3e['crDPm']))['trim']()||null;}catch{return null;}}function _0xa763(){const _0x1dd1a1=['cwd','13989020jmmoch','13gCFDuS','mSaia','active-profile.txt','3766SpFMDm','61292EMNxNp','117486DOgONd','17370ZHNtWV','473550DXgALq','3iSsgEF','1284364VoudOf','12553912DNLTqz'];_0xa763=function(){return _0x1dd1a1;};return _0xa763();}export async function writeActiveProfileName(_0x100734){const _0x18399e=_0xcdea43,_0x3ee5fa={'mGdSe':function(_0x469d60,_0x16b887,_0x3f35bc){return _0x469d60(_0x16b887,_0x3f35bc);}};_0x3ee5fa['mGdSe'](writeLastProfile,process[_0x18399e(0x149)](),_0x100734);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1d25b9=_0x7770;(function(_0xec4d55,_0x5abb20){const _0x17e936=_0x7770,_0x3b650f=_0xec4d55();while(!![]){try{const _0x52257d=-parseInt(_0x17e936(0xf3))/0x1*(parseInt(_0x17e936(0x11e))/0x2)+-parseInt(_0x17e936(0x131))/0x3*(-parseInt(_0x17e936(0x11a))/0x4)+-parseInt(_0x17e936(0x127))/0x5*(parseInt(_0x17e936(0x11f))/0x6)+-parseInt(_0x17e936(0xfe))/0x7+parseInt(_0x17e936(0x11d))/0x8*(parseInt(_0x17e936(0x116))/0x9)+-parseInt(_0x17e936(0xf5))/0xa+parseInt(_0x17e936(0xff))/0xb;if(_0x52257d===_0x5abb20)break;else _0x3b650f['push'](_0x3b650f['shift']());}catch(_0x1f9199){_0x3b650f['push'](_0x3b650f['shift']());}}}(_0x4a6c,0xeaf77));function _0x4a6c(){const _0x5bee6d=['join','includes','8370621qqKIGW','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','COYcP','NPM_CONFIG_REGISTRY','356zoWMwZ','$PATH','trim','16ZBEktk','1844888BjZCEZ','66JXuGUE','XDG_CACHE_HOME','GQaVM','zRmbY','zdwmH','filter','TEMP','AWS_REGION','666095yHJtZp','XDG_CONFIG_HOME','indexOf','ranger-claude-tmp','RTuoE','npm_config_userconfig','NPM_CONFIG_PREFIX','push','AWS_SHARED_CREDENTIALS_FILE','RANGER_TEST_SKIP_BROWSER_WAIT','30546XxhsAk','DEBUG','1xHMpMx','TMP','475190lGODVz','NOVA_ACT_API_KEY','/bin','npm_config_cache','add','AWS_SECRET_ACCESS_KEY','metadata','split','${PATH}','4498144YmAEHg','14014561dbYZYO','TMPDIR','TWJbk','map','fromEntries','%PATH%','jQHmy','vVtbM','AWS_ACCESS_KEY_ID','slice','from','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','toLowerCase','ekZoF','AWS_ROLE_ARN','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','PLAYWRIGHT_BROWSERS_PATH','lOSRD','entries','win32'];_0x4a6c=function(){return _0x5bee6d;};return _0x4a6c();}import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME',_0x1d25b9(0x100),_0x1d25b9(0xf4),'TEMP','USERPROFILE','APPDATA','LOCALAPPDATA',_0x1d25b9(0x120),_0x1d25b9(0x128),_0x1d25b9(0x110),_0x1d25b9(0x10a),'CHROME_BIN','CHROMIUM_BIN',_0x1d25b9(0xf8),'NPM_CONFIG_CACHE',_0x1d25b9(0x12c),'NPM_CONFIG_USERCONFIG','npm_config_prefix',_0x1d25b9(0x12d),'npm_config_registry',_0x1d25b9(0x119),_0x1d25b9(0x132),'NODE_ENV',_0x1d25b9(0x130),'RANGER_TRANSPORT',_0x1d25b9(0xf6),'AWS_PROFILE',_0x1d25b9(0x126),'AWS_DEFAULT_REGION','AWS_CONFIG_FILE',_0x1d25b9(0x12f),_0x1d25b9(0x107),_0x1d25b9(0xfa),'AWS_SESSION_TOKEN','AWS_SDK_LOAD_CONFIG','AWS_WEB_IDENTITY_TOKEN_FILE',_0x1d25b9(0x10e),'AWS_ROLE_SESSION_NAME',AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x1d25b9(0xfd),_0x1d25b9(0x11b),_0x1d25b9(0x104)];function parseCustomHeaders(_0x1bd40a){const _0x2e8852=_0x1d25b9,_0x5862aa={'jQHmy':function(_0x5f2227,_0x267792){return _0x5f2227===_0x267792;},'ekZoF':function(_0x498c7a,_0xe1985f){return _0x498c7a+_0xe1985f;}};if(!_0x1bd40a)return[];return _0x1bd40a['split'](/\r?\n/)[_0x2e8852(0x102)](_0x355305=>_0x355305[_0x2e8852(0x11c)]())[_0x2e8852(0x124)](Boolean)['map'](_0x3dcd66=>{const _0x1df2f2=_0x2e8852,_0x220f20=_0x3dcd66[_0x1df2f2(0x129)](':');if(_0x5862aa[_0x1df2f2(0x105)](_0x220f20,-0x1))return null;const _0x1f96e4=_0x3dcd66['slice'](0x0,_0x220f20)[_0x1df2f2(0x11c)](),_0x31654c=_0x3dcd66[_0x1df2f2(0x108)](_0x5862aa[_0x1df2f2(0x10d)](_0x220f20,0x1))['trim']();if(!_0x1f96e4)return null;return[_0x1f96e4,_0x31654c];})[_0x2e8852(0x124)](_0x5f2064=>_0x5f2064!==null);}function _0x7770(_0x36f833,_0x26fbcc){_0x36f833=_0x36f833-0xf3;const _0x4a6c03=_0x4a6c();let _0x7770a4=_0x4a6c03[_0x36f833];return _0x7770a4;}export function getAgentPathHealthWarning(_0x37c15b,_0x420634=process['platform']){const _0x4f09a6=_0x1d25b9,_0x4945e4={'fEcVK':_0x4f09a6(0x10b),'PySwf':'PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','COYcP':function(_0x23b61f,_0x1e10e9){return _0x23b61f!==_0x1e10e9;},'rHZle':'/usr/bin','TWJbk':function(_0x5a4a49,_0x41fbd4){return _0x5a4a49&&_0x41fbd4;},'vVtbM':function(_0x1ef9e9,_0x1ff3f8){return _0x1ef9e9===_0x1ff3f8;}},_0x5cc8e9=[],_0x34049e=(_0x37c15b||'')[_0x4f09a6(0xfc)](delimiter)['filter'](Boolean);_0x34049e['length']===0x0&&_0x5cc8e9['push'](_0x4945e4['fEcVK']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x979321=>(_0x37c15b||'')[_0x4f09a6(0x115)](_0x979321))&&_0x5cc8e9[_0x4f09a6(0x12e)](_0x4945e4['PySwf']);if(_0x4945e4[_0x4f09a6(0x118)](_0x420634,_0x4f09a6(0x113))){const _0xb6395d=_0x34049e['includes'](_0x4945e4['rHZle']),_0x2a37ee=_0x34049e[_0x4f09a6(0x115)](_0x4f09a6(0xf7));_0x4945e4[_0x4f09a6(0x101)](!_0xb6395d,!_0x2a37ee)&&_0x5cc8e9[_0x4f09a6(0x12e)]('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x4945e4[_0x4f09a6(0x106)](_0x5cc8e9['length'],0x0))return null;return{'summary':_0x4f09a6(0x117),'issues':_0x5cc8e9};}export function buildAgentEnv(_0x5f0895){const _0x57c931=_0x1d25b9,_0x5a7e54={'lOSRD':_0x57c931(0x10f),'GQaVM':function(_0x31c364){return _0x31c364();},'zRmbY':'TMP','yZKLi':_0x57c931(0x125),'ScYdV':function(_0x2e9a4e,_0x7c271c,_0x2f3231){return _0x2e9a4e(_0x7c271c,_0x2f3231);},'zdwmH':function(_0x5ada06,_0x1a6713){return _0x5ada06(_0x1a6713);},'RTuoE':function(_0x48b92f,_0xc45bfc){return _0x48b92f===_0xc45bfc;}};if(_0x5f0895['byokEnabled'])return Object[_0x57c931(0x103)](Object['entries'](process['env'])[_0x57c931(0x124)](_0x9b7dde=>typeof _0x9b7dde[0x1]==='string'));if(!_0x5f0895['sessionToken'])throw new Error(_0x5a7e54[_0x57c931(0x111)]);const _0x5a3958={'ANTHROPIC_API_KEY':_0x5f0895['sessionToken'],'ANTHROPIC_BASE_URL':_0x5a7e54[_0x57c931(0x121)](getAiProxyUrl),'DISABLE_TELEMETRY':'true'};for(const _0x4b7981 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x1f6b8a=process['env'][_0x4b7981];_0x1f6b8a&&!['TMPDIR',_0x5a7e54[_0x57c931(0x122)],_0x5a7e54['yZKLi']][_0x57c931(0x115)](_0x4b7981)&&(_0x5a3958[_0x4b7981]=_0x1f6b8a);}const _0x2d7418=_0x5a7e54['ScYdV'](join,tmpdir(),_0x57c931(0x12a));try{mkdirSync(_0x2d7418,{'recursive':!![]});}catch{}_0x5a3958['TMPDIR']=_0x2d7418,_0x5a3958[_0x5a7e54[_0x57c931(0x122)]]=_0x2d7418,_0x5a3958['TEMP']=_0x2d7418;const _0x4c8191=_0x5a7e54[_0x57c931(0x123)](parseCustomHeaders,process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x56e566=new Map(_0x4c8191),_0x496fc7=new Set(_0x4c8191[_0x57c931(0x102)](([_0xbfd5dd])=>_0xbfd5dd[_0x57c931(0x10c)]()));if(_0x5f0895['metadata'])for(const [_0x2572b9,_0x160a88]of Object['entries'](_0x5f0895[_0x57c931(0xfb)])){if(_0x160a88==null||_0x5a7e54[_0x57c931(0x12b)](_0x160a88,''))continue;const _0xfc3f9a='x-ranger-'+_0x2572b9;!_0x496fc7['has'](_0xfc3f9a[_0x57c931(0x10c)]())&&(_0x56e566['set'](_0xfc3f9a,_0x160a88),_0x496fc7[_0x57c931(0xf9)](_0xfc3f9a[_0x57c931(0x10c)]()));}const _0xcb7c11=Array[_0x57c931(0x109)](_0x56e566[_0x57c931(0x112)]())['map'](([_0x411195,_0x303b47])=>_0x411195+':\x20'+_0x303b47)[_0x57c931(0x114)]('\x0a');return _0xcb7c11&&(_0x5a3958[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0xcb7c11),_0x5a3958;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2c15(){const _0x3fca7a=['thrus1C','C2vHCMnO','yxbWBgLJyxrPB24VEMLW','l3vWBg9Hzc11CMXZ','uhP2CMK','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','yxbWBgLJyxrPB24VANnVBG','qxD3wfu','tej5y04','DgfZAW','z0X4ALK','Awj6Ehe','tMzqD2e','C3DfB0W','ufvu','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','EhLUC3O','vgvOvM4','s1fTAMm','werSC3K','DK5oC2i','yxfltge','yxbWBhK','D3jKBgi','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','ndK3nZCWEKTvqxLg','BurYEuC','uMznB2W','qMvHCMvYia','z0DYthK','vxbqshe','yxbWBgLJyxrPB24VANnVBMW','BgvUz3rO','r3jTywq','DffivKi','Awvot08','qwrQDLu','zw52AxjVBM1LBNroyw1L','zeDqtgy','nevUrMLHsa','y29UC3rYDwn0B3i','zgD6vMW','mty0nePHD2jvuW','nda3ugnNCg5Z','EfHtB0q','vK5kyLy','l3n0zxbZ','nZC0rKPru1nl','q1vgr0m','C3rYAw5NAwz5','Dgv4Da','Bwq1','svHwvwS','mJC1mJeXmhHdBuffvG','DMLKzw8VD2vIBq','ndqWnZa3ogvUswH1zW','EwDqAvu','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','ENPjzhu','DxjS','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','nte0mtz5tw9Ur0C','r0vu','DvbtEwy','EwDNt3a','zMvHDhvYzuLK','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','vK5JqM0','ue9tva','CMr6uvK','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','tuPwDK4','u1bgEw4','Bwv0ywrHDge','C1rjD28','nteYmtu4mgLrD0TdDW','l3n0zxbZlW','kcGOlISPkYKRksSK','mJq3oteXndHuEvfdsNa','u3nlCxm','vuz3vuq','rKLcCfe','rK5PBK4','sLPzrwm','wgztwwC','Duz5swm','EKPbuwi','u3rju2K','tMDTwfi','zwfTEMe','BMPxBe4','uefuq0G','uKP1Awq','CLrABuu','wK1Pyxi','s0z1CwK','t1LoDxi','zgLNzxn0','D0n6DNy','C2v0DgLUz3m','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','DLbwBKu','y0PWq0C','Dg9tDhjPBMC','muTIAMvKra','v0Houfu','DxbKyxrLqNjVD3nLCLnLC3nPB24','yMfZzty0','vKfADKK','y2HLy2TZDw0','wKLezLm','l2fZC2v0CW','C2L6zq','vNfct1q','r3PYveO','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','EMDVvxi','Cw5LA0e','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','CKncBuK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','uxbtzgS','AM1YyLi','Bhr6z1u','DxbKyxrL','ndi4ntrmsKPQEvO','ANnVBG','y0zsrMW','CMnprK0','DMX1wM4'];_0x2c15=function(){return _0x3fca7a;};return _0x2c15();}(function(_0x357b28,_0x38715){const _0x5c3c45=_0x292e,_0x1768e5=_0x357b28();while(!![]){try{const _0x5406f6=-parseInt(_0x5c3c45(0x193))/0x1*(parseInt(_0x5c3c45(0x160))/0x2)+-parseInt(_0x5c3c45(0x162))/0x3+parseInt(_0x5c3c45(0x152))/0x4*(parseInt(_0x5c3c45(0x176))/0x5)+parseInt(_0x5c3c45(0x155))/0x6*(-parseInt(_0x5c3c45(0x126))/0x7)+-parseInt(_0x5c3c45(0x168))/0x8*(-parseInt(_0x5c3c45(0x15a))/0x9)+-parseInt(_0x5c3c45(0x144))/0xa*(-parseInt(_0x5c3c45(0x156))/0xb)+parseInt(_0x5c3c45(0x179))/0xc;if(_0x5406f6===_0x38715)break;else _0x1768e5['push'](_0x1768e5['shift']());}catch(_0x152329){_0x1768e5['push'](_0x1768e5['shift']());}}}(_0x2c15,0xeae9f));const _0x3e4caa=(function(){const _0x40d217=_0x292e,_0x3000b0={'JHDRq':function(_0xcc58f6,_0x175ea2){return _0xcc58f6===_0x175ea2;},'WHNPU':_0x40d217(0x175),'MNwow':_0x40d217(0x171),'TehVn':function(_0x2399e9,_0x1ed7c0){return _0x2399e9===_0x1ed7c0;},'dGPLf':_0x40d217(0x19d),'yggOp':_0x40d217(0x13f)};let _0x577c45=!![];return function(_0x231c7e,_0x4deaf2){const _0x36e6fd=_0x40d217,_0x5964dd={'AwwXU':_0x3000b0['MNwow']};if(_0x3000b0[_0x36e6fd(0x13c)](_0x3000b0[_0x36e6fd(0x151)],_0x3000b0[_0x36e6fd(0x16b)]))throw new _0x2d565e(_0x5964dd[_0x36e6fd(0x132)]);else{const _0x4c02f5=_0x577c45?function(){const _0x52491b=_0x36e6fd;if(_0x4deaf2){if(_0x3000b0['JHDRq'](_0x3000b0[_0x52491b(0x194)],_0x3000b0[_0x52491b(0x194)])){const _0x32b0a5=_0x4deaf2['apply'](_0x231c7e,arguments);return _0x4deaf2=null,_0x32b0a5;}else throw new _0x57d6b5(_0x5964dd[_0x52491b(0x132)]);}}:function(){};return _0x577c45=![],_0x4c02f5;}};}()),_0x58f12d=_0x3e4caa(this,function(){const _0x40b008=_0x292e,_0x369a9d={'swEoL':_0x40b008(0x178)};return _0x58f12d[_0x40b008(0x192)]()['search'](_0x369a9d[_0x40b008(0x138)])[_0x40b008(0x192)]()[_0x40b008(0x153)](_0x58f12d)[_0x40b008(0x12c)](_0x369a9d[_0x40b008(0x138)]);});_0x58f12d();function _0x292e(_0x1c55a1,_0x2d33ae){_0x1c55a1=_0x1c55a1-0x11e;const _0x4faf1a=_0x2c15();let _0x58f12d=_0x4faf1a[_0x1c55a1];if(_0x292e['opCNZM']===undefined){var _0x3e4caa=function(_0x3715e4){const _0x438155='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3bae7a='',_0x4d2cec='',_0x2dccf0=_0x3bae7a+_0x3e4caa;for(let _0xd6fd60=0x0,_0x517ccb,_0x317501,_0x932143=0x0;_0x317501=_0x3715e4['charAt'](_0x932143++);~_0x317501&&(_0x517ccb=_0xd6fd60%0x4?_0x517ccb*0x40+_0x317501:_0x317501,_0xd6fd60++%0x4)?_0x3bae7a+=_0x2dccf0['charCodeAt'](_0x932143+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x517ccb>>(-0x2*_0xd6fd60&0x6)):_0xd6fd60:0x0){_0x317501=_0x438155['indexOf'](_0x317501);}for(let _0x4f7cec=0x0,_0x59b0be=_0x3bae7a['length'];_0x4f7cec<_0x59b0be;_0x4f7cec++){_0x4d2cec+='%'+('00'+_0x3bae7a['charCodeAt'](_0x4f7cec)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d2cec);};_0x292e['QlNEQO']=_0x3e4caa,_0x292e['DXOKsv']={},_0x292e['opCNZM']=!![];}const _0x2c15e1=_0x4faf1a[0x0],_0x292e79=_0x1c55a1+_0x2c15e1,_0x35d675=_0x292e['DXOKsv'][_0x292e79];if(!_0x35d675){const _0x41325b=function(_0x13ba77){this['UVMtzi']=_0x13ba77,this['HHvAca']=[0x1,0x0,0x0],this['aJfZdX']=function(){return'newState';},this['kOcvCd']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['PYnZAI']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x41325b['prototype']['BGRGdj']=function(){const _0x46619c=new RegExp(this['kOcvCd']+this['PYnZAI']),_0x2ea225=_0x46619c['test'](this['aJfZdX']['toString']())?--this['HHvAca'][0x1]:--this['HHvAca'][0x0];return this['ZLNxyi'](_0x2ea225);},_0x41325b['prototype']['ZLNxyi']=function(_0x323c0a){if(!Boolean(~_0x323c0a))return _0x323c0a;return this['trMKjk'](this['UVMtzi']);},_0x41325b['prototype']['trMKjk']=function(_0x5af770){for(let _0x4c9788=0x0,_0x3fdc65=this['HHvAca']['length'];_0x4c9788<_0x3fdc65;_0x4c9788++){this['HHvAca']['push'](Math['round'](Math['random']())),_0x3fdc65=this['HHvAca']['length'];}return _0x5af770(this['HHvAca'][0x0]);},new _0x41325b(_0x292e)['BGRGdj'](),_0x58f12d=_0x292e['QlNEQO'](_0x58f12d),_0x292e['DXOKsv'][_0x292e79]=_0x58f12d;}else _0x58f12d=_0x35d675;return _0x58f12d;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1279e0){const _0x4646b6=_0x292e,_0xf583fb={'ZIJvf':function(_0x1f25da,_0xb04f27,_0x1ffdef,_0x1c23fd){return _0x1f25da(_0xb04f27,_0x1ffdef,_0x1c23fd);},'AGcoP':_0x4646b6(0x161),'ieNOO':function(_0x196c1d){return _0x196c1d();},'XfSYg':_0x4646b6(0x171),'ygPiU':function(_0x2f232b,_0x184b5c,_0x9fbdb3){return _0x2f232b(_0x184b5c,_0x9fbdb3);},'IhQzV':_0x4646b6(0x131),'xynsz':function(_0x448416,_0x3ee6ea){return _0x448416===_0x3ee6ea;},'ZIDfS':_0x4646b6(0x148)},_0x1d0aa4=await _0xf583fb[_0x4646b6(0x14e)](getToken);if(!_0x1d0aa4)throw new Error(_0xf583fb[_0x4646b6(0x17f)]);const _0x57e3fe=_0xf583fb['ieNOO'](getApiBaseUrl),_0x3677bb=await _0xf583fb[_0x4646b6(0x163)](fetch,_0x57e3fe+'/api/v1/mcp/browser-sessions',{'method':_0x4646b6(0x16f),'headers':{'Authorization':_0x4646b6(0x147)+_0x1d0aa4,'Content-Type':_0xf583fb['IhQzV']},'body':JSON[_0x4646b6(0x15c)]({'environmentName':_0x1279e0?.[_0x4646b6(0x150)],'settings':_0x1279e0?.[_0x4646b6(0x18e)],'task':_0x1279e0?.[_0x4646b6(0x134)],'url':_0x1279e0?.[_0x4646b6(0x166)],'featureId':_0x1279e0?.[_0x4646b6(0x16c)],'checklistItemId':_0x1279e0?.['checklistItemId']})});if(!_0x3677bb['ok']){if(_0xf583fb[_0x4646b6(0x13b)](_0xf583fb[_0x4646b6(0x199)],_0x4646b6(0x145)))return _0xf583fb['ZIJvf'](_0x19759f,_0x110e44,_0x51aa4c,_0xf583fb['AGcoP']);else{const _0x2f49e1=await _0x3677bb[_0x4646b6(0x15d)]();throw new Error(_0x4646b6(0x130)+_0x2f49e1);}}return _0x3677bb['json']();}export async function updateBrowserSession(_0x3a3a84,_0x13b267){const _0x5b6195=_0x292e,_0x3e88eb={'rTZmE':function(_0x1e765d,_0x3fcaad,_0x16ef8f,_0x18539d){return _0x1e765d(_0x3fcaad,_0x16ef8f,_0x18539d);},'njWlN':_0x5b6195(0x14a),'uFyIc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','akgoQ':function(_0x57f57c){return _0x57f57c();},'ftrha':'application/json','CUFGC':function(_0x1410a8,_0x47878c){return _0x1410a8!==_0x47878c;},'qnekA':_0x5b6195(0x19f),'RJuid':_0x5b6195(0x120),'SPFyn':_0x5b6195(0x195)};return withRetry(async()=>{const _0x3337a1=_0x5b6195,_0x1431ab=await getToken();if(!_0x1431ab)throw new Error(_0x3e88eb[_0x3337a1(0x180)]);const _0x56cc51=_0x3e88eb['akgoQ'](getApiBaseUrl),_0x337cef=await fetch(_0x56cc51+_0x3337a1(0x18f)+_0x3a3a84,{'method':_0x3337a1(0x186),'headers':{'Authorization':'Bearer\x20'+_0x1431ab,'Content-Type':_0x3e88eb['ftrha']},'body':JSON[_0x3337a1(0x15c)](_0x13b267)});if(!_0x337cef['ok']){if(_0x3e88eb[_0x3337a1(0x15b)](_0x3e88eb[_0x3337a1(0x11e)],_0x3e88eb[_0x3337a1(0x187)])){const _0x2c17ea=await _0x337cef[_0x3337a1(0x15d)]();throw new Error(_0x3337a1(0x11f)+_0x2c17ea);}else return _0x3e88eb[_0x3337a1(0x188)](_0x15d67d,_0x2d43b9,_0x323665,_0x3e88eb[_0x3337a1(0x185)]);}return _0x337cef[_0x3337a1(0x127)]();},{'label':_0x3e88eb[_0x5b6195(0x173)]});}export async function getBrowserSession(_0x231e54){const _0x2b80b7=_0x292e,_0x43ec3b={'wrdlb':_0x2b80b7(0x171),'zJAQb':function(_0x580a75){return _0x580a75();},'vluZn':function(_0x5ce240,_0x1eda9d,_0x346ec7){return _0x5ce240(_0x1eda9d,_0x346ec7);},'LtTKW':function(_0x27aa67,_0x298653){return _0x27aa67===_0x298653;},'uPSyf':_0x2b80b7(0x172),'StISi':_0x2b80b7(0x16e)},_0x1c4888=await _0x43ec3b[_0x2b80b7(0x181)](getToken);if(!_0x1c4888)throw new Error(_0x43ec3b[_0x2b80b7(0x142)]);const _0x2f935e=getApiBaseUrl(),_0x3e022d=await _0x43ec3b[_0x2b80b7(0x12a)](fetch,_0x2f935e+_0x2b80b7(0x18f)+_0x231e54,{'method':'GET','headers':{'Authorization':_0x2b80b7(0x147)+_0x1c4888}});if(!_0x3e022d['ok']){if(_0x43ec3b[_0x2b80b7(0x12b)](_0x43ec3b[_0x2b80b7(0x16a)],_0x43ec3b[_0x2b80b7(0x182)]))throw new _0x1000e0(_0x43ec3b[_0x2b80b7(0x142)]);else{const _0x2bd986=await _0x3e022d[_0x2b80b7(0x15d)]();throw new Error(_0x2b80b7(0x13a)+_0x2bd986);}}return _0x3e022d['json']();}export async function getUploadUrls(_0x1e8d9a,_0x32941a,_0x2a3921,_0x500d4f){const _0x5151d0=_0x292e,_0x4bbb5e={'Pzvri':function(_0x29e16f){return _0x29e16f();},'RfMol':_0x5151d0(0x171),'UFwUD':function(_0x4364b8,_0x1ddfb3){return _0x4364b8!==_0x1ddfb3;},'kxUoA':function(_0x1e043f,_0x172a07){return _0x1e043f===_0x172a07;},'GHUWO':_0x5151d0(0x170)},_0x342a7e=await _0x4bbb5e[_0x5151d0(0x12f)](getToken);if(!_0x342a7e)throw new Error(_0x4bbb5e[_0x5151d0(0x146)]);const _0x45915c=_0x4bbb5e[_0x5151d0(0x12f)](getApiBaseUrl),_0x277444=await fetch(_0x45915c+_0x5151d0(0x18f)+_0x1e8d9a+_0x5151d0(0x12e),{'method':_0x5151d0(0x16f),'headers':{'Authorization':_0x5151d0(0x147)+_0x342a7e,'Content-Type':_0x5151d0(0x131)},'body':JSON[_0x5151d0(0x15c)]({'filename':_0x32941a,'filetype':_0x2a3921,..._0x500d4f?.['size']!==undefined&&{'size':_0x500d4f[_0x5151d0(0x19b)]},..._0x4bbb5e[_0x5151d0(0x17b)](_0x500d4f?.[_0x5151d0(0x198)],undefined)&&{'checksum':_0x500d4f['checksum']},..._0x4bbb5e['UFwUD'](_0x500d4f?.['metadata'],undefined)&&{'metadata':_0x500d4f[_0x5151d0(0x174)]}})});if(!_0x277444['ok']){if(_0x4bbb5e['kxUoA'](_0x5151d0(0x170),_0x4bbb5e['GHUWO'])){const _0x1c082e=await _0x277444['text']();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x1c082e);}else{if(_0x4f109e){const _0x3506b0=_0x45cd0c[_0x5151d0(0x141)](_0x5738fb,arguments);return _0x7070f4=null,_0x3506b0;}}}return _0x277444[_0x5151d0(0x127)]();}export async function uploadFile(_0x2e0d2d,_0x338eb2,_0x3848ab){const _0x13aa06=_0x292e,_0x5d269d={'cFRFl':function(_0x2f7103,_0x525870,_0x38ffc1){return _0x2f7103(_0x525870,_0x38ffc1);}},_0xb24dd7=await _0x5d269d[_0x13aa06(0x128)](fetch,_0x2e0d2d,{'method':_0x13aa06(0x139),'headers':{'Content-Type':_0x3848ab,'Content-Length':_0x338eb2[_0x13aa06(0x14b)][_0x13aa06(0x192)]()},'body':_0x338eb2});if(!_0xb24dd7['ok']){const _0x513e9a=await _0xb24dd7[_0x13aa06(0x15d)]();throw new Error(_0x13aa06(0x19e)+_0x513e9a);}}export async function uploadTrace(_0x247db6,_0x180a84){const _0x50698c=_0x292e,_0x18a719={'xVFIh':function(_0x163c75,_0x36eaea,_0x4927fb,_0x26c642){return _0x163c75(_0x36eaea,_0x4927fb,_0x26c642);},'KFuqi':_0x50698c(0x12d)};return _0x18a719['xVFIh'](uploadFile,_0x247db6,_0x180a84,_0x18a719[_0x50698c(0x18a)]);}export async function uploadConversation(_0x54e3d7,_0x42e004){const _0x2d4df1=_0x292e,_0x1396ba={'XDlsy':function(_0x2ae80d,_0x11bb6d,_0x11cec4,_0x403391){return _0x2ae80d(_0x11bb6d,_0x11cec4,_0x403391);},'VNJbV':'application/jsonl'};return _0x1396ba[_0x2d4df1(0x13e)](uploadFile,_0x54e3d7,_0x42e004,_0x1396ba[_0x2d4df1(0x158)]);}export async function uploadScreenshot(_0x197e37,_0x420d7d){const _0x31a947=_0x292e,_0x3a9481={'NfPwa':function(_0xf82748,_0x442bac,_0x5e01a3,_0x2d0cec){return _0xf82748(_0x442bac,_0x5e01a3,_0x2d0cec);},'cJpCG':'image/png'};return _0x3a9481[_0x31a947(0x137)](uploadFile,_0x197e37,_0x420d7d,_0x3a9481[_0x31a947(0x191)]);}export async function uploadVideo(_0x4fd3e3,_0x1e6f33){const _0x4a7b21=_0x292e,_0x35d490={'dgzVl':function(_0x1f8cae,_0x15744f,_0x2c6c0a,_0x5d8b63){return _0x1f8cae(_0x15744f,_0x2c6c0a,_0x5d8b63);},'vPVnE':_0x4a7b21(0x161)};return _0x35d490[_0x4a7b21(0x154)](uploadFile,_0x4fd3e3,_0x1e6f33,_0x35d490[_0x4a7b21(0x190)]);}export function buildTraceViewerUrl(_0x5005be){const _0x59695c=_0x292e,_0x26d94d={'wCzvv':function(_0x102348,_0x29d266){return _0x102348(_0x29d266);}},_0x2d64c9=_0x26d94d[_0x59695c(0x18d)](encodeURIComponent,_0x5005be);return _0x59695c(0x143)+_0x2d64c9;}export async function getProxySessionToken(){const _0x2a2e8b=_0x292e,_0x36a87a={'ibzxq':_0x2a2e8b(0x171),'VqBOT':function(_0x35e1c9){return _0x35e1c9();},'eamza':function(_0x189e49,_0x3d3686,_0x2e6483){return _0x189e49(_0x3d3686,_0x2e6483);},'NVJhQ':'POST','xXSoD':_0x2a2e8b(0x123)},_0x3dd21e=await _0x36a87a[_0x2a2e8b(0x19c)](getToken);if(!_0x3dd21e)throw new Error(_0x2a2e8b(0x171));const _0x46fe48=_0x36a87a['VqBOT'](getApiBaseUrl),_0x27cf1b=await _0x36a87a[_0x2a2e8b(0x184)](fetch,_0x46fe48+_0x2a2e8b(0x167),{'method':_0x36a87a['NVJhQ'],'headers':{'Authorization':_0x2a2e8b(0x147)+_0x3dd21e}});if(!_0x27cf1b['ok']){if('owmHM'===_0x36a87a[_0x2a2e8b(0x157)])throw new _0x3ac3df(_0x36a87a[_0x2a2e8b(0x136)]);else{const _0x5367de=await _0x27cf1b[_0x2a2e8b(0x15d)]();throw new Error(_0x2a2e8b(0x121)+_0x5367de);}}const _0x82bc6b=await _0x27cf1b['json']();return _0x82bc6b['sessionToken'];}export function computeChecksum(_0x4f71e5){const _0x51490b=_0x292e,_0x2e88f0={'SsKqs':function(_0xa771fa,_0x49359b){return _0xa771fa(_0x49359b);},'vlchD':_0x51490b(0x15e)};return _0x2e88f0[_0x51490b(0x17a)](createHash,_0x2e88f0['vlchD'])[_0x51490b(0x125)](_0x4f71e5)[_0x51490b(0x18c)](_0x51490b(0x196));}export async function createVerificationStep(_0x4a2675,_0x1cd474){const _0x3de13e=_0x292e,_0x27609e={'zzIdu':_0x3de13e(0x171),'VAZvI':function(_0x5f42e2){return _0x5f42e2();},'QpSdk':_0x3de13e(0x131),'JZYEc':_0x3de13e(0x124),'Grmad':_0x3de13e(0x149)},_0x1f5091=await _0x27609e[_0x3de13e(0x197)](getToken);if(!_0x1f5091)throw new Error(_0x27609e[_0x3de13e(0x165)]);const _0x289364=_0x27609e['VAZvI'](getApiBaseUrl),_0x5ba501=await fetch(_0x289364+'/api/v1/mcp/browser-sessions/'+_0x4a2675+_0x3de13e(0x159),{'method':_0x3de13e(0x16f),'headers':{'Authorization':_0x3de13e(0x147)+_0x1f5091,'Content-Type':_0x27609e[_0x3de13e(0x122)]},'body':JSON['stringify'](_0x1cd474)});if(!_0x5ba501['ok']){if(_0x27609e[_0x3de13e(0x17e)]===_0x27609e[_0x3de13e(0x14c)])throw new _0x2b5ee7(_0x27609e[_0x3de13e(0x165)]);else{const _0x2f4495=await _0x5ba501['text']();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x2f4495);}}return _0x5ba501[_0x3de13e(0x127)]();}export async function createStepAsset(_0x14b2b9,_0x162f08,_0xf1194e){const _0x57ed7f=_0x292e,_0x7d625f={'LBycN':function(_0x4be528){return _0x4be528();},'ZMiar':function(_0x38307b,_0x374060,_0x2f6643){return _0x38307b(_0x374060,_0x2f6643);},'gLxjY':'POST','IXVUk':_0x57ed7f(0x131)},_0x37063c=await getToken();if(!_0x37063c)throw new Error(_0x57ed7f(0x171));const _0x2cff25=_0x7d625f[_0x57ed7f(0x133)](getApiBaseUrl),_0x3ab5fe=await _0x7d625f[_0x57ed7f(0x189)](fetch,_0x2cff25+_0x57ed7f(0x18f)+_0x14b2b9+'/steps/'+_0x162f08+_0x57ed7f(0x19a),{'method':_0x7d625f[_0x57ed7f(0x135)],'headers':{'Authorization':'Bearer\x20'+_0x37063c,'Content-Type':_0x7d625f[_0x57ed7f(0x15f)]},'body':JSON[_0x57ed7f(0x15c)](_0xf1194e)});if(!_0x3ab5fe['ok']){const _0x5d0092=await _0x3ab5fe[_0x57ed7f(0x15d)]();throw new Error(_0x57ed7f(0x16d)+_0x5d0092);}return _0x3ab5fe[_0x57ed7f(0x127)]();}export async function updateVerificationStep(_0xbe3c88,_0x198c10,_0x4fe8dc){const _0x442d04=_0x292e,_0x5498e6={'KQmjc':function(_0x58e151,_0x3feb62,_0x91624a,_0x3775aa){return _0x58e151(_0x3feb62,_0x91624a,_0x3775aa);},'rcOFM':function(_0x38b0d8){return _0x38b0d8();},'NgmXR':function(_0x2c3e12,_0x5c8f95,_0x13c08e){return _0x2c3e12(_0x5c8f95,_0x13c08e);},'tQHVB':_0x442d04(0x186),'AdjvU':_0x442d04(0x17d),'iRoVv':_0x442d04(0x140)},_0x165652=await _0x5498e6[_0x442d04(0x129)](getToken);if(!_0x165652)throw new Error(_0x442d04(0x171));const _0x925c5a=_0x5498e6[_0x442d04(0x129)](getApiBaseUrl),_0xb3b3c5=await _0x5498e6[_0x442d04(0x183)](fetch,_0x925c5a+_0x442d04(0x18f)+_0xbe3c88+_0x442d04(0x177)+_0x198c10,{'method':_0x5498e6[_0x442d04(0x14d)],'headers':{'Authorization':'Bearer\x20'+_0x165652,'Content-Type':'application/json'},'body':JSON[_0x442d04(0x15c)](_0x4fe8dc)});if(!_0xb3b3c5['ok']){if(_0x5498e6[_0x442d04(0x14f)]!==_0x5498e6['iRoVv']){const _0xff5e73=await _0xb3b3c5[_0x442d04(0x15d)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0xff5e73);}else return _0x5498e6[_0x442d04(0x13d)](_0x332336,_0x1c5a03,_0x33d2c6,_0x442d04(0x12d));}}export async function getBrowserSessionSteps(_0x438fb7){const _0x599173=_0x292e,_0x4c64c3={'FIBpQ':function(_0x216394){return _0x216394();},'OYNur':_0x599173(0x171),'wEAeo':function(_0x4ca4be,_0xd97f0e,_0x3eb325){return _0x4ca4be(_0xd97f0e,_0x3eb325);}},_0x3127e3=await _0x4c64c3[_0x599173(0x17c)](getToken);if(!_0x3127e3)throw new Error(_0x4c64c3[_0x599173(0x18b)]);const _0x116774=_0x4c64c3[_0x599173(0x17c)](getApiBaseUrl),_0xe871fa=await _0x4c64c3['wEAeo'](fetch,_0x116774+_0x599173(0x18f)+_0x438fb7+_0x599173(0x159),{'method':_0x599173(0x169),'headers':{'Authorization':_0x599173(0x147)+_0x3127e3}});if(!_0xe871fa['ok']){const _0x49ae93=await _0xe871fa[_0x599173(0x15d)]();throw new Error(_0x599173(0x164)+_0x49ae93);}return _0xe871fa[_0x599173(0x127)]();}
|
|
1
|
+
(function(_0x5d8f98,_0x9cc0f7){const _0x7e21eb=_0x55dd,_0x5438d3=_0x5d8f98();while(!![]){try{const _0x94f3c3=-parseInt(_0x7e21eb(0x1e5))/0x1*(-parseInt(_0x7e21eb(0x204))/0x2)+-parseInt(_0x7e21eb(0x228))/0x3+-parseInt(_0x7e21eb(0x205))/0x4*(parseInt(_0x7e21eb(0x1db))/0x5)+parseInt(_0x7e21eb(0x20b))/0x6*(-parseInt(_0x7e21eb(0x1ce))/0x7)+parseInt(_0x7e21eb(0x1d8))/0x8*(-parseInt(_0x7e21eb(0x209))/0x9)+-parseInt(_0x7e21eb(0x233))/0xa+parseInt(_0x7e21eb(0x1c9))/0xb*(parseInt(_0x7e21eb(0x20d))/0xc);if(_0x94f3c3===_0x9cc0f7)break;else _0x5438d3['push'](_0x5438d3['shift']());}catch(_0x2a3111){_0x5438d3['push'](_0x5438d3['shift']());}}}(_0x58c1,0x67ad7));const _0x3a84d4=(function(){let _0x577863=!![];return function(_0xccebc0,_0x3d936c){const _0x429012=_0x577863?function(){const _0x277f70=_0x55dd;if(_0x3d936c){const _0x37896b=_0x3d936c[_0x277f70(0x211)](_0xccebc0,arguments);return _0x3d936c=null,_0x37896b;}}:function(){};return _0x577863=![],_0x429012;};}()),_0x5d91e8=_0x3a84d4(this,function(){const _0xf13ccd=_0x55dd,_0x4ae3a4={'FXEsR':_0xf13ccd(0x1d0)};return _0x5d91e8['toString']()[_0xf13ccd(0x21c)](_0x4ae3a4[_0xf13ccd(0x22e)])['toString']()[_0xf13ccd(0x1d2)](_0x5d91e8)['search'](_0x4ae3a4[_0xf13ccd(0x22e)]);});_0x5d91e8();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x15da76){const _0x5991a2=_0x55dd,_0x62da5c={'XkXNY':function(_0x42b9b6){return _0x42b9b6();},'PAYTh':_0x5991a2(0x1f3),'oSRtQ':function(_0x1d9947,_0x3a54f1,_0x2f76fc){return _0x1d9947(_0x3a54f1,_0x2f76fc);},'FbjOG':_0x5991a2(0x1bf),'YVyYL':function(_0x6ab9ab,_0x15beed){return _0x6ab9ab===_0x15beed;},'DHQfl':_0x5991a2(0x1e4),'gJdTs':_0x5991a2(0x20e)},_0x55562e=await _0x62da5c[_0x5991a2(0x216)](getToken);if(!_0x55562e){if(_0x62da5c[_0x5991a2(0x1e8)]!=='CWGCi')return _0x214757(_0x4eb2fc,_0x392cc1,_0x5991a2(0x212));else throw new Error(_0x5991a2(0x1bd));}const _0x43d9b3=_0x62da5c[_0x5991a2(0x216)](getApiBaseUrl),_0x1da128=await _0x62da5c[_0x5991a2(0x21a)](fetch,_0x43d9b3+'/api/v1/mcp/browser-sessions',{'method':_0x62da5c[_0x5991a2(0x1f9)],'headers':{'Authorization':_0x5991a2(0x1d7)+_0x55562e,'Content-Type':_0x5991a2(0x21e)},'body':JSON[_0x5991a2(0x1e3)]({'environmentName':_0x15da76?.['environmentName'],'settings':_0x15da76?.[_0x5991a2(0x1c4)],'task':_0x15da76?.[_0x5991a2(0x1bc)],'url':_0x15da76?.[_0x5991a2(0x1ef)],'featureId':_0x15da76?.[_0x5991a2(0x1fb)],'checklistItemId':_0x15da76?.[_0x5991a2(0x1dc)]})});if(!_0x1da128['ok']){if(_0x62da5c['YVyYL'](_0x62da5c[_0x5991a2(0x1d4)],_0x62da5c[_0x5991a2(0x1f6)])){const _0xde89ce=_0x543b5d?function(){const _0x1e9905=_0x5991a2;if(_0x31ce16){const _0xe62a75=_0xc35bbb[_0x1e9905(0x211)](_0x4ec125,arguments);return _0x24f058=null,_0xe62a75;}}:function(){};return _0x30275f=![],_0xde89ce;}else{const _0x5e13dc=await _0x1da128['text']();throw new Error('Failed\x20to\x20create\x20browser\x20session:\x20'+_0x5e13dc);}}return _0x1da128[_0x5991a2(0x1e9)]();}export async function updateBrowserSession(_0x529e9c,_0x48bc90){const _0x37914f=_0x55dd,_0xf6deb3={'yteTe':function(_0x43ac05){return _0x43ac05();},'zwhGJ':function(_0x3b4675,_0x13d30a,_0x464e69){return _0x3b4675(_0x13d30a,_0x464e69);},'zoXLB':_0x37914f(0x21e),'hrihn':'updateBrowserSession'};return withRetry(async()=>{const _0x21e9ba=_0x37914f,_0x6e1b66=await getToken();if(!_0x6e1b66)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x44f695=_0xf6deb3[_0x21e9ba(0x230)](getApiBaseUrl),_0xdc6b7a=await _0xf6deb3['zwhGJ'](fetch,_0x44f695+'/api/v1/mcp/browser-sessions/'+_0x529e9c,{'method':_0x21e9ba(0x1cc),'headers':{'Authorization':_0x21e9ba(0x1d7)+_0x6e1b66,'Content-Type':_0xf6deb3[_0x21e9ba(0x1cf)]},'body':JSON[_0x21e9ba(0x1e3)](_0x48bc90)});if(!_0xdc6b7a['ok']){const _0x1c951b=await _0xdc6b7a[_0x21e9ba(0x220)]();throw new Error(_0x21e9ba(0x227)+_0x1c951b);}return _0xdc6b7a[_0x21e9ba(0x1e9)]();},{'label':_0xf6deb3['hrihn']});}export async function getBrowserSession(_0x44d0bd){const _0x16cd3c=_0x55dd,_0x359b3e={'tZHQJ':function(_0x1c672f,_0x5d1c85){return _0x1c672f(_0x5d1c85);},'FdDCv':function(_0x1a8000){return _0x1a8000();},'AEWzb':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','qhKpo':_0x16cd3c(0x1c1),'RWkfj':function(_0x3acbbd,_0x43a4a2){return _0x3acbbd!==_0x43a4a2;},'SlOyI':_0x16cd3c(0x1de)},_0x21f0d8=await _0x359b3e[_0x16cd3c(0x215)](getToken);if(!_0x21f0d8)throw new Error(_0x359b3e['AEWzb']);const _0xd047ad=_0x359b3e[_0x16cd3c(0x215)](getApiBaseUrl),_0x6c91d0=await fetch(_0xd047ad+'/api/v1/mcp/browser-sessions/'+_0x44d0bd,{'method':_0x359b3e[_0x16cd3c(0x1fe)],'headers':{'Authorization':_0x16cd3c(0x1d7)+_0x21f0d8}});if(!_0x6c91d0['ok']){if(_0x359b3e[_0x16cd3c(0x1ec)](_0x359b3e[_0x16cd3c(0x22b)],_0x359b3e[_0x16cd3c(0x22b)])){const _0x32248f=_0x359b3e['tZHQJ'](_0x563d96,_0x48f906);return _0x16cd3c(0x214)+_0x32248f;}else{const _0x342d0a=await _0x6c91d0['text']();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x342d0a);}}return _0x6c91d0['json']();}export async function getUploadUrls(_0x3cd325,_0x894ea,_0x5d86a2,_0x3c6aad){const _0x4fa5df=_0x55dd,_0x872dde={'mQBWy':function(_0x99ff3e,_0x16387d,_0x5095b8,_0x327220){return _0x99ff3e(_0x16387d,_0x5095b8,_0x327220);},'RSkWs':_0x4fa5df(0x231),'JOjDt':function(_0xe0ed9){return _0xe0ed9();},'zegNr':_0x4fa5df(0x218),'WpfiA':_0x4fa5df(0x1bf),'cYOuj':_0x4fa5df(0x21e),'uEudo':function(_0x16fed4,_0x2e8f72){return _0x16fed4!==_0x2e8f72;},'JNOGy':function(_0x13cd3f,_0x15762a){return _0x13cd3f!==_0x15762a;}},_0x59a4e7=await _0x872dde[_0x4fa5df(0x1d3)](getToken);if(!_0x59a4e7){if(_0x872dde[_0x4fa5df(0x21b)]==='Rtwen')throw new Error(_0x4fa5df(0x1bd));else return _0x872dde[_0x4fa5df(0x1eb)](_0x37e88e,_0x49c16d,_0x197d64,_0x872dde[_0x4fa5df(0x1da)]);}const _0x3e9f44=_0x872dde[_0x4fa5df(0x1d3)](getApiBaseUrl),_0x59afca=await fetch(_0x3e9f44+_0x4fa5df(0x21f)+_0x3cd325+_0x4fa5df(0x1cd),{'method':_0x872dde[_0x4fa5df(0x1c7)],'headers':{'Authorization':_0x4fa5df(0x1d7)+_0x59a4e7,'Content-Type':_0x872dde['cYOuj']},'body':JSON[_0x4fa5df(0x1e3)]({'filename':_0x894ea,'filetype':_0x5d86a2,..._0x872dde[_0x4fa5df(0x1e6)](_0x3c6aad?.[_0x4fa5df(0x232)],undefined)&&{'size':_0x3c6aad[_0x4fa5df(0x232)]},..._0x872dde[_0x4fa5df(0x222)](_0x3c6aad?.['checksum'],undefined)&&{'checksum':_0x3c6aad['checksum']},..._0x3c6aad?.[_0x4fa5df(0x1df)]!==undefined&&{'metadata':_0x3c6aad['metadata']}})});if(!_0x59afca['ok']){const _0x34bf6e=await _0x59afca[_0x4fa5df(0x220)]();throw new Error(_0x4fa5df(0x1f7)+_0x34bf6e);}return _0x59afca[_0x4fa5df(0x1e9)]();}export async function uploadFile(_0x3f68ec,_0x20529a,_0x42f47e){const _0x44e086=_0x55dd,_0x569c45={'FQBqr':_0x44e086(0x1bd),'SsztI':function(_0x528ff0,_0x389437,_0x279212){return _0x528ff0(_0x389437,_0x279212);},'fRLyW':_0x44e086(0x219),'wpbOu':'vvPKD','vWwyb':'fMSce'},_0x5195b7=await _0x569c45[_0x44e086(0x1ed)](fetch,_0x3f68ec,{'method':_0x569c45['fRLyW'],'headers':{'Content-Type':_0x42f47e,'Content-Length':_0x20529a['length'][_0x44e086(0x203)]()},'body':_0x20529a});if(!_0x5195b7['ok']){if(_0x569c45[_0x44e086(0x234)]!==_0x569c45[_0x44e086(0x224)]){const _0x2fe343=await _0x5195b7['text']();throw new Error(_0x44e086(0x221)+_0x2fe343);}else throw new _0x540f11(_0x569c45[_0x44e086(0x229)]);}}function _0x58c1(){const _0x4b8fa2=['ELjYuLK','Dhnwuhi','AunLrue','C3rYAw5NAwz5','ENv1zeu','mZyXAfHtD2Hj','Duv1zg8','DxbKyxrL','uefzvgG','ANnVBG','yLvAAgm','Bvfcv3K','uLDRzMO','u3n6DeK','tMfps1G','DxjS','l3n0zxbZlW','tfDkwKS','A1j3A3q','q1Dhq2K','D1v5vwy','ug5RBeG','z0PKvhm','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','uMftDem','rMjQt0C','t0rOC3q','zMvHDhvYzuLK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','Bwq1','CwHlCg8','y0jvC3i','qKrpEvG','vNPWAeG','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','Dg9tDhjPBMC','mZm1nNDWtxvLrW','mtzSBuzOANa','r1HctMy','Dvrlu2W','u3nZs3m','ndqXotyZuuXgD3fJ','vK95y2q','mZeYotCYmhvOqMfgra','rKLVA2G','mty4mJGWoe1WtuXyzq','svPvs0u','C2vZC2LVBLrVA2vU','ywrfAwy','yxbWBhK','yxbWBgLJyxrPB24VANnVBMW','u1LAC3K','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','rMreq3y','wgTytLK','BwXtD08','uNr3zw4','ufvu','B1nsDfe','EMvNtNi','C2vHCMnO','CMLOrKe','yxbWBgLJyxrPB24VANnVBG','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','Dgv4Da','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','sK5pr3K','DMLKzw8VD2vIBq','DLD3Ewi','l3n0zxbZ','C0TiEgS','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','mtG2nJnYuKvJuve','rLfcCxi','wKzTENq','u2XpEuK','tvbXEwy','D1PNCwS','rLHfC1i','rwj2rw0','ExrLvgu','yxbWBgLJyxrPB24VEMLW','C2L6zq','odmYnJy4mgHHsgLuBa','D3bIt3u','zMXLtMC','DgfZAW','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','ue9tva','DwfdDgq','r0vu','zurms1G','q3rlBKC','C2v0DgLUz3m','y2PzExO','t2fpC0q','v3bMAue','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','mtG3B2PwEufx','qwHqD2S','rKXwrKG','uefuq0G','l3vWBg9Hzc11CMXZ','n0fVCK9VEa','EM9ytei','kcGOlISPkYKRksSK','vvv2uxi','y29UC3rYDwn0B3i','sK9Qrhq','reHrzMW','s0H6EKm','yMfZzty0','qMvHCMvYia','nJrMufnkBg4','z1rhzgG','uLnRv3m','mtaXndyZnwDeENPfDG','y2HLy2TSAxn0sxrLBuLK','CwvVu0i','vu5cCLO','Bwv0ywrHDge'];_0x58c1=function(){return _0x4b8fa2;};return _0x58c1();}function _0x55dd(_0x174a29,_0xaca049){_0x174a29=_0x174a29-0x1bb;const _0x569837=_0x58c1();let _0x5d91e8=_0x569837[_0x174a29];if(_0x55dd['DEKUgo']===undefined){var _0x3a84d4=function(_0x5c5ada){const _0x4b7150='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1fec37='',_0x42ad02='',_0x51b68a=_0x1fec37+_0x3a84d4;for(let _0x96e587=0x0,_0x45f08d,_0x1f096b,_0x5f2bec=0x0;_0x1f096b=_0x5c5ada['charAt'](_0x5f2bec++);~_0x1f096b&&(_0x45f08d=_0x96e587%0x4?_0x45f08d*0x40+_0x1f096b:_0x1f096b,_0x96e587++%0x4)?_0x1fec37+=_0x51b68a['charCodeAt'](_0x5f2bec+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x45f08d>>(-0x2*_0x96e587&0x6)):_0x96e587:0x0){_0x1f096b=_0x4b7150['indexOf'](_0x1f096b);}for(let _0x21b52c=0x0,_0x173563=_0x1fec37['length'];_0x21b52c<_0x173563;_0x21b52c++){_0x42ad02+='%'+('00'+_0x1fec37['charCodeAt'](_0x21b52c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42ad02);};_0x55dd['HAdbxI']=_0x3a84d4,_0x55dd['WndRbf']={},_0x55dd['DEKUgo']=!![];}const _0x58c15e=_0x569837[0x0],_0x55dd5d=_0x174a29+_0x58c15e,_0x4c9d73=_0x55dd['WndRbf'][_0x55dd5d];if(!_0x4c9d73){const _0x543b5d=function(_0x203000){this['CBHhIR']=_0x203000,this['QYrOrz']=[0x1,0x0,0x0],this['gVugEJ']=function(){return'newState';},this['ZOzdyp']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['fFTxCQ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x543b5d['prototype']['uiAWNb']=function(){const _0x593987=new RegExp(this['ZOzdyp']+this['fFTxCQ']),_0xc1baf3=_0x593987['test'](this['gVugEJ']['toString']())?--this['QYrOrz'][0x1]:--this['QYrOrz'][0x0];return this['lQLJus'](_0xc1baf3);},_0x543b5d['prototype']['lQLJus']=function(_0x2a2a41){if(!Boolean(~_0x2a2a41))return _0x2a2a41;return this['OntsXj'](this['CBHhIR']);},_0x543b5d['prototype']['OntsXj']=function(_0x30275f){for(let _0x31ce16=0x0,_0x8f0b69=this['QYrOrz']['length'];_0x31ce16<_0x8f0b69;_0x31ce16++){this['QYrOrz']['push'](Math['round'](Math['random']())),_0x8f0b69=this['QYrOrz']['length'];}return _0x30275f(this['QYrOrz'][0x0]);},new _0x543b5d(_0x55dd)['uiAWNb'](),_0x5d91e8=_0x55dd['HAdbxI'](_0x5d91e8),_0x55dd['WndRbf'][_0x55dd5d]=_0x5d91e8;}else _0x5d91e8=_0x4c9d73;return _0x5d91e8;}export async function uploadTrace(_0x209208,_0x138706){const _0x63e251=_0x55dd,_0x299ed1={'AhPwk':function(_0x2105d8,_0x31c991,_0x2382a4,_0x2e1a8c){return _0x2105d8(_0x31c991,_0x2382a4,_0x2e1a8c);}};return _0x299ed1[_0x63e251(0x1ca)](uploadFile,_0x209208,_0x138706,'application/zip');}export async function uploadConversation(_0x362c81,_0x229e40){const _0x2f0b78=_0x55dd,_0x48d1b0={'AANHs':function(_0x48d0ae,_0x48eab9,_0x4fb1bd,_0x3b82ca){return _0x48d0ae(_0x48eab9,_0x4fb1bd,_0x3b82ca);},'SssKs':'application/jsonl'};return _0x48d1b0['AANHs'](uploadFile,_0x362c81,_0x229e40,_0x48d1b0[_0x2f0b78(0x208)]);}export async function uploadScreenshot(_0x2e4108,_0x170489){const _0x4b4984=_0x55dd,_0x34fde2={'kSYjI':function(_0x14c6c0,_0x51e5df,_0x2935ad,_0x2a63e4){return _0x14c6c0(_0x51e5df,_0x2935ad,_0x2a63e4);},'BDOyX':'image/png'};return _0x34fde2['kSYjI'](uploadFile,_0x2e4108,_0x170489,_0x34fde2[_0x4b4984(0x200)]);}export async function uploadVideo(_0x3ef81d,_0x5293ee){const _0x267b59=_0x55dd,_0x234823={'VzphH':function(_0x4f6ae6,_0x20e1d5,_0x3c7c81,_0x64576f){return _0x4f6ae6(_0x20e1d5,_0x3c7c81,_0x64576f);},'sKHxk':_0x267b59(0x223)};return _0x234823[_0x267b59(0x201)](uploadFile,_0x3ef81d,_0x5293ee,_0x234823[_0x267b59(0x226)]);}export function buildTraceViewerUrl(_0x3c6b34){const _0x12a398=_0x55dd,_0x27a829={'tsVPr':function(_0x1326f4,_0x4baf67){return _0x1326f4(_0x4baf67);}},_0x17e25e=_0x27a829[_0x12a398(0x1e1)](encodeURIComponent,_0x3c6b34);return _0x12a398(0x214)+_0x17e25e;}export async function getProxySessionToken(){const _0xaa596e=_0x55dd,_0x22712f={'kRwkt':function(_0x270ce7,_0xa9dfb5,_0x1d6949,_0x24bd73){return _0x270ce7(_0xa9dfb5,_0x1d6949,_0x24bd73);},'zRrRY':'image/png','OaOsD':function(_0x41305c){return _0x41305c();},'eDLKX':function(_0x248d79,_0xed1c4a,_0xc40b84){return _0x248d79(_0xed1c4a,_0xc40b84);},'bXRRg':function(_0x51e9ec,_0xd4fbb5){return _0x51e9ec!==_0xd4fbb5;},'iCeEA':_0xaa596e(0x217)},_0x177935=await _0x22712f['OaOsD'](getToken);if(!_0x177935)throw new Error(_0xaa596e(0x1bd));const _0xd8a5f8=_0x22712f[_0xaa596e(0x1c6)](getApiBaseUrl),_0x4f1635=await _0x22712f[_0xaa596e(0x1c2)](fetch,_0xd8a5f8+'/api/v1/mcp/proxy-session',{'method':_0xaa596e(0x1bf),'headers':{'Authorization':'Bearer\x20'+_0x177935}});if(!_0x4f1635['ok']){if(_0x22712f['bXRRg'](_0x22712f[_0xaa596e(0x1e2)],_0xaa596e(0x1c3))){const _0x1b8778=await _0x4f1635[_0xaa596e(0x220)]();throw new Error(_0xaa596e(0x1fc)+_0x1b8778);}else return _0x22712f[_0xaa596e(0x1f2)](_0x2a2c00,_0x1f1338,_0x34b65a,_0x22712f[_0xaa596e(0x1e0)]);}const _0x3422e4=await _0x4f1635['json']();return _0x3422e4[_0xaa596e(0x20f)];}export function computeChecksum(_0x2d8ab9){const _0x33a28d=_0x55dd,_0x17179c={'bUZhc':_0x33a28d(0x1fd)};return createHash(_0x17179c[_0x33a28d(0x1ea)])[_0x33a28d(0x1e7)](_0x2d8ab9)['digest'](_0x33a28d(0x1d6));}export async function createVerificationStep(_0x2e446d,_0x24aca6){const _0x31b1e1=_0x55dd,_0x1ca2a5={'UUvQr':_0x31b1e1(0x1bd),'uTKSl':function(_0x59a649,_0xdb0afd){return _0x59a649!==_0xdb0afd;},'EbvEm':_0x31b1e1(0x1fa),'wUyUf':_0x31b1e1(0x210),'KHzzC':function(_0x524610){return _0x524610();},'MPqyf':function(_0x3d357f,_0x116c74,_0xb718ab){return _0x3d357f(_0x116c74,_0xb718ab);},'qwDuZ':_0x31b1e1(0x1bf),'ohIWH':_0x31b1e1(0x21e)},_0x3bade3=await getToken();if(!_0x3bade3){if(_0x1ca2a5[_0x31b1e1(0x207)](_0x1ca2a5[_0x31b1e1(0x22f)],_0x1ca2a5[_0x31b1e1(0x1f4)]))throw new Error(_0x1ca2a5[_0x31b1e1(0x1d1)]);else throw new _0x2f1d62(_0x1ca2a5[_0x31b1e1(0x1d1)]);}const _0x11e7e7=_0x1ca2a5[_0x31b1e1(0x1d5)](getApiBaseUrl),_0x4c2211=await _0x1ca2a5[_0x31b1e1(0x22c)](fetch,_0x11e7e7+_0x31b1e1(0x21f)+_0x2e446d+_0x31b1e1(0x225),{'method':_0x1ca2a5['qwDuZ'],'headers':{'Authorization':'Bearer\x20'+_0x3bade3,'Content-Type':_0x1ca2a5['ohIWH']},'body':JSON[_0x31b1e1(0x1e3)](_0x24aca6)});if(!_0x4c2211['ok']){const _0x19501c=await _0x4c2211[_0x31b1e1(0x220)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x19501c);}return _0x4c2211['json']();}export async function createStepAsset(_0x5a1caa,_0xa0e341,_0x28cfbb){const _0x2792f2=_0x55dd,_0x5d33ac={'SYZsy':_0x2792f2(0x1bd),'VOycd':function(_0x4aff47){return _0x4aff47();},'FIokh':function(_0x1935d8,_0x422bb2){return _0x1935d8===_0x422bb2;},'ofvcQ':'ZFmzt','IfRDa':function(_0x510e51){return _0x510e51();},'RaStC':function(_0x35b1f9,_0x2723f6,_0x153fec){return _0x35b1f9(_0x2723f6,_0x153fec);},'awcjC':_0x2792f2(0x1bf)},_0x72e619=await _0x5d33ac[_0x2792f2(0x20a)](getToken);if(!_0x72e619){if(_0x5d33ac[_0x2792f2(0x20c)](_0x2792f2(0x22a),_0x5d33ac['ofvcQ']))throw new Error(_0x5d33ac[_0x2792f2(0x213)]);else throw new _0x4a2fca(_0x5d33ac[_0x2792f2(0x213)]);}const _0x10be91=_0x5d33ac['IfRDa'](getApiBaseUrl),_0x42190a=await _0x5d33ac[_0x2792f2(0x1f8)](fetch,_0x10be91+_0x2792f2(0x21f)+_0x5a1caa+_0x2792f2(0x1f0)+_0xa0e341+'/assets',{'method':_0x5d33ac['awcjC'],'headers':{'Authorization':_0x2792f2(0x1d7)+_0x72e619,'Content-Type':_0x2792f2(0x21e)},'body':JSON[_0x2792f2(0x1e3)](_0x28cfbb)});if(!_0x42190a['ok']){const _0x3d80f7=await _0x42190a[_0x2792f2(0x220)]();throw new Error(_0x2792f2(0x1be)+_0x3d80f7);}return _0x42190a['json']();}export async function updateVerificationStep(_0x173ce7,_0x4b8cfc,_0x727910){const _0x499fd6=_0x55dd,_0x4262ef={'cBUsr':_0x499fd6(0x1bd),'uaCtd':function(_0x10d02b){return _0x10d02b();},'FLVFH':function(_0x3410af,_0x5f5bb4){return _0x3410af===_0x5f5bb4;},'fleNg':function(_0x5f000d,_0x1eef8c,_0x50d7c3){return _0x5f000d(_0x1eef8c,_0x50d7c3);},'NaOKX':_0x499fd6(0x21e),'GXBNf':_0x499fd6(0x1c5)},_0x482ce7=await _0x4262ef[_0x499fd6(0x1c0)](getToken);if(!_0x482ce7){if(_0x4262ef[_0x499fd6(0x1cb)](_0x499fd6(0x1f5),'DuJLw'))throw new _0x152de8(_0x4262ef[_0x499fd6(0x1ff)]);else throw new Error(_0x4262ef[_0x499fd6(0x1ff)]);}const _0x29b48b=_0x4262ef[_0x499fd6(0x1c0)](getApiBaseUrl),_0x18fd2e=await _0x4262ef[_0x499fd6(0x1bb)](fetch,_0x29b48b+_0x499fd6(0x21f)+_0x173ce7+'/steps/'+_0x4b8cfc,{'method':'PATCH','headers':{'Authorization':_0x499fd6(0x1d7)+_0x482ce7,'Content-Type':_0x4262ef[_0x499fd6(0x1ee)]},'body':JSON[_0x499fd6(0x1e3)](_0x727910)});if(!_0x18fd2e['ok']){if(_0x4262ef[_0x499fd6(0x1cb)](_0x4262ef[_0x499fd6(0x206)],_0x4262ef[_0x499fd6(0x206)])){const _0x4b8c67=await _0x18fd2e['text']();throw new Error(_0x499fd6(0x1c8)+_0x4b8c67);}else throw new _0x44fce1(_0x4262ef[_0x499fd6(0x1ff)]);}}export async function getBrowserSessionSteps(_0x5f5adf){const _0x4ed75f=_0x55dd,_0x342632={'rihFA':function(_0x372644){return _0x372644();},'tVOjv':function(_0x1449cd,_0x548262){return _0x1449cd===_0x548262;},'qeoSB':_0x4ed75f(0x1f1),'wZgqk':_0x4ed75f(0x1bd),'GVHnG':function(_0x242e70){return _0x242e70();}},_0x26041e=await _0x342632[_0x4ed75f(0x21d)](getToken);if(!_0x26041e){if(_0x342632['tVOjv'](_0x4ed75f(0x1d9),_0x342632[_0x4ed75f(0x1dd)])){if(_0x4cde03){const _0xff6d74=_0x3138d1[_0x4ed75f(0x211)](_0x8ce900,arguments);return _0xa4fa9c=null,_0xff6d74;}}else throw new Error(_0x342632[_0x4ed75f(0x22d)]);}const _0x3bd99c=_0x342632['GVHnG'](getApiBaseUrl),_0xb22035=await fetch(_0x3bd99c+'/api/v1/mcp/browser-sessions/'+_0x5f5adf+'/steps',{'method':_0x4ed75f(0x1c1),'headers':{'Authorization':_0x4ed75f(0x1d7)+_0x26041e}});if(!_0xb22035['ok']){const _0x5220d5=await _0xb22035[_0x4ed75f(0x220)]();throw new Error(_0x4ed75f(0x202)+_0x5220d5);}return _0xb22035[_0x4ed75f(0x1e9)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x521707,_0x18b308){const _0x56f94c=_0x2e42,_0x5e4a6e=_0x521707();while(!![]){try{const _0x184d55=-parseInt(_0x56f94c(0x77))/0x1*(-parseInt(_0x56f94c(0x8a))/0x2)+parseInt(_0x56f94c(0x8c))/0x3+parseInt(_0x56f94c(0x87))/0x4*(parseInt(_0x56f94c(0x85))/0x5)+parseInt(_0x56f94c(0x81))/0x6*(-parseInt(_0x56f94c(0x79))/0x7)+-parseInt(_0x56f94c(0x88))/0x8+-parseInt(_0x56f94c(0x71))/0x9+parseInt(_0x56f94c(0x8b))/0xa;if(_0x184d55===_0x18b308)break;else _0x5e4a6e['push'](_0x5e4a6e['shift']());}catch(_0x2b66ce){_0x5e4a6e['push'](_0x5e4a6e['shift']());}}}(_0x8eed,0x9b6d8));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x3650a9=_0x2e42;return process[_0x3650a9(0x83)]['CLAUDE_CONFIG_DIR']||join(homedir(),'.claude');}export function getUserSkillsDir(){const _0x193015=_0x2e42,_0x924a12={'UGrpY':function(_0x2c3a68,_0x30924b,_0x35c4c3){return _0x2c3a68(_0x30924b,_0x35c4c3);},'SRpEk':function(_0x1ae25a){return _0x1ae25a();},'GkbRp':'skills'};return _0x924a12[_0x193015(0x7c)](join,_0x924a12['SRpEk'](getClaudeConfigDir),_0x924a12[_0x193015(0x7b)]);}function _0x2e42(_0x2537f4,_0x1f1da1){_0x2537f4=_0x2537f4-0x71;const _0x8eedf6=_0x8eed();let _0x2e42f5=_0x8eedf6[_0x2537f4];return _0x2e42f5;}export function getProjectRoot(){const _0x26ac93=_0x2e42,_0x32cd4f={'yXcql':function(_0x40c237,_0x161fbe){return _0x40c237(_0x161fbe);},'PZcLs':function(_0x23309e,_0x157482){return _0x23309e!==_0x157482;},'eOCcQ':function(_0x53de7c,_0x40a4a8,_0x58e496){return _0x53de7c(_0x40a4a8,_0x58e496);},'fbevs':function(_0x41915c,_0x18e9ad){return _0x41915c(_0x18e9ad);},'bqMAM':'.git'};let _0x64fbe8=process['cwd']();const _0x2fef74=_0x32cd4f[_0x26ac93(0x7d)](parse,_0x64fbe8)['root'];while(_0x32cd4f[_0x26ac93(0x7e)](_0x64fbe8,_0x2fef74)){if(existsSync(_0x32cd4f['eOCcQ'](join,_0x64fbe8,'.claude')))return _0x64fbe8;if(_0x32cd4f['fbevs'](existsSync,join(_0x64fbe8,_0x32cd4f[_0x26ac93(0x75)])))return _0x64fbe8;_0x64fbe8=dirname(_0x64fbe8);}return process['cwd']();}export function getProjectSkillsDir(){const _0xb099f0=_0x2e42,_0x57ca8c={'YDwbr':function(_0x527572,_0x1e6aaf,_0x4ee997,_0x4979e4){return _0x527572(_0x1e6aaf,_0x4ee997,_0x4979e4);},'OnLvN':_0xb099f0(0x82)};return _0x57ca8c[_0xb099f0(0x84)](join,getProjectRoot(),'.claude',_0x57ca8c[_0xb099f0(0x7a)]);}function _0x8eed(){const _0xde00e1=['skills','env','YDwbr','545TUHxRL','cjVuq','36136NrRhbX','9637288IRHohE','JeDul','12ERljAb','17998410VPyovZ','1928388yCMMNT','10635795Sisbad','utf-8','fWzjR','KTRsd','bqMAM','user','138136jZLSiA','GaJhj','9933tTXnjI','OnLvN','GkbRp','UGrpY','yXcql','PZcLs','settings.json','stringify','5214RpPVLC'];_0x8eed=function(){return _0xde00e1;};return _0x8eed();}export function getSkillsDir(_0x562f6a){const _0x42f5e0=_0x2e42,_0x5028e1={'KTRsd':_0x42f5e0(0x76),'EdVWI':function(_0x362285){return _0x362285();}};return _0x562f6a===_0x5028e1[_0x42f5e0(0x74)]?getUserSkillsDir():_0x5028e1['EdVWI'](getProjectSkillsDir);}export function getSettingsPath(){const _0x44652c=_0x2e42,_0x3c4906={'cjVuq':function(_0x2e7f4d,_0x519b76,_0x5dcbdb){return _0x2e7f4d(_0x519b76,_0x5dcbdb);},'FNPFv':function(_0x5282c1){return _0x5282c1();}};return _0x3c4906[_0x44652c(0x86)](join,_0x3c4906['FNPFv'](getClaudeConfigDir),_0x44652c(0x7f));}export async function loadClaudeSettings(){const _0x5f1939=_0x2e42,_0x11f3d9={'JeDul':function(_0xee3a97){return _0xee3a97();},'bZLel':function(_0x6be583,_0xfc52ec,_0x799a65){return _0x6be583(_0xfc52ec,_0x799a65);},'fWzjR':_0x5f1939(0x72)},_0x460589=_0x11f3d9[_0x5f1939(0x89)](getSettingsPath);if(!existsSync(_0x460589))return{};try{const _0x104ada=await _0x11f3d9['bZLel'](readFile,_0x460589,_0x11f3d9[_0x5f1939(0x73)]);return JSON['parse'](_0x104ada);}catch{return{};}}export async function saveClaudeSettings(_0x1723ea){const _0x38ca6f=_0x2e42,_0x44fc37={'etJKh':function(_0x3507bb,_0x5bf686,_0x3c8d9d){return _0x3507bb(_0x5bf686,_0x3c8d9d);},'aZBHe':function(_0xd86e99,_0x6c4adb,_0x564213,_0x4c74a7){return _0xd86e99(_0x6c4adb,_0x564213,_0x4c74a7);},'GaJhj':function(_0x4939ab,_0x2d6db5){return _0x4939ab+_0x2d6db5;},'NafOP':'utf-8'},_0x5777c7=getSettingsPath(),_0x22cef8=getClaudeConfigDir();!existsSync(_0x22cef8)&&await _0x44fc37['etJKh'](mkdir,_0x22cef8,{'recursive':!![]}),await _0x44fc37['aZBHe'](writeFile,_0x5777c7,_0x44fc37[_0x38ca6f(0x78)](JSON[_0x38ca6f(0x80)](_0x1723ea,null,0x2),'\x0a'),_0x44fc37['NafOP']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb0d05,_0x3a053d){const _0x4cd7bb=_0x2565,_0x381436=_0xb0d05();while(!![]){try{const _0x353540=-parseInt(_0x4cd7bb(0x79))/0x1*(parseInt(_0x4cd7bb(0x77))/0x2)+-parseInt(_0x4cd7bb(0x7c))/0x3+-parseInt(_0x4cd7bb(0x7b))/0x4+-parseInt(_0x4cd7bb(0x7a))/0x5+parseInt(_0x4cd7bb(0x76))/0x6+-parseInt(_0x4cd7bb(0x78))/0x7+parseInt(_0x4cd7bb(0x75))/0x8;if(_0x353540===_0x3a053d)break;else _0x381436['push'](_0x381436['shift']());}catch(_0x484ba4){_0x381436['push'](_0x381436['shift']());}}}(_0x4f9f,0x53c5b));function _0x2565(_0x3499e0,_0x12e806){_0x3499e0=_0x3499e0-0x75;const _0x4f9fe3=_0x4f9f();let _0x256528=_0x4f9fe3[_0x3499e0];return _0x256528;}import{isByokEnabled}from'./environment.js';function _0x4f9f(){const _0x111220=['3508338DMMYKt','10732iXTXLI','1603973isnyJl','13ifZJul','1623265LIrNgn','1277256hbQZmG','1802457NEoPGB','10416728ccOXHa'];_0x4f9f=function(){return _0x111220;};return _0x4f9f();}const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){if(isByokEnabled())return{};return{'settings':JSON['stringify'](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x12ba3c,_0x15ddce){const _0x25dc80=_0x28ab,_0x5984a2=_0x12ba3c();while(!![]){try{const _0x60090e=-parseInt(_0x25dc80(0x207))/0x1*(parseInt(_0x25dc80(0x213))/0x2)+-parseInt(_0x25dc80(0x20a))/0x3*(-parseInt(_0x25dc80(0x1fd))/0x4)+-parseInt(_0x25dc80(0x1f2))/0x5+parseInt(_0x25dc80(0x1f9))/0x6*(-parseInt(_0x25dc80(0x1e8))/0x7)+parseInt(_0x25dc80(0x1fa))/0x8+parseInt(_0x25dc80(0x204))/0x9*(parseInt(_0x25dc80(0x1e5))/0xa)+parseInt(_0x25dc80(0x20e))/0xb;if(_0x60090e===_0x15ddce)break;else _0x5984a2['push'](_0x5984a2['shift']());}catch(_0xacf71a){_0x5984a2['push'](_0x5984a2['shift']());}}}(_0x5257,0xb4dc7));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile}from'fs/promises';import{join,resolve}from'path';function _0x5257(){const _0x3049c5=['stdout','filter','pipe','12925440hhkvYS','scope','local','match','enabled','797938ynHjMg','cwd','captureOutput','installed_plugins.json','20hRDTQd','version','KNTzY','269353aTQLJv','user','jamHV','error','BHaVS','toLowerCase','project','output','plugins','claude','3815860sCytkp','list','vRvDa','BwpbM','inherit','toString','hedTv','108tzSiHz','4397712vmTfqB','bSMKr','length','356zdXyJH','yicbO','OBzXN','success','plugin','includes','Command\x20exited\x20with\x20code\x20','2270934EzvTTZ','projectPath','ignore','2KpqWLX','data','marketplace','25791rfxJti'];_0x5257=function(){return _0x3049c5;};return _0x5257();}import{getClaudeConfigDir,getProjectRoot}from'./claudeConfig.js';export function runClaudeCommand(_0x3dc232,_0x51ed44){const _0x197cc7=_0x28ab,_0x2f0b89={'utUlO':function(_0x6f1e1a,_0x103b1d){return _0x6f1e1a===_0x103b1d;},'hgnTT':function(_0x42d064,_0x5d30d3){return _0x42d064(_0x5d30d3);},'YjVGo':_0x197cc7(0x20d),'nhVTq':'inherit','HuqFT':function(_0x9451e1,_0x5cdd66,_0x22e2f0,_0xc5d3c0){return _0x9451e1(_0x5cdd66,_0x22e2f0,_0xc5d3c0);},'KNTzY':_0x197cc7(0x1f1),'QmXNl':'data','yicbO':'close'};return new Promise(_0x3c7e74=>{const _0x2e41df=_0x197cc7,_0x501afc=_0x51ed44?.[_0x2e41df(0x215)]?[_0x2e41df(0x206),_0x2f0b89['YjVGo'],_0x2f0b89['YjVGo']]:['ignore',_0x2f0b89['nhVTq'],_0x2e41df(0x1f6)],_0x9aebd3=_0x2f0b89['HuqFT'](spawn,_0x2f0b89[_0x2e41df(0x1e7)],_0x3dc232,{'stdio':_0x501afc,'cwd':_0x51ed44?.[_0x2e41df(0x214)]});let _0x1fa1ff='';_0x51ed44?.['captureOutput']&&_0x9aebd3[_0x2e41df(0x20b)]&&_0x9aebd3['stdout']['on'](_0x2f0b89['QmXNl'],_0x128e97=>{_0x1fa1ff+=_0x128e97['toString']();}),_0x51ed44?.[_0x2e41df(0x215)]&&_0x9aebd3['stderr']&&_0x9aebd3['stderr']['on'](_0x2e41df(0x208),_0x282fad=>{const _0x34ac35=_0x2e41df;_0x1fa1ff+=_0x282fad[_0x34ac35(0x1f7)]();}),_0x9aebd3['on'](_0x2f0b89[_0x2e41df(0x1fe)],_0x17be75=>{const _0x13455b=_0x2e41df;_0x2f0b89['utUlO'](_0x17be75,0x0)?_0x3c7e74({'success':!![],'output':_0x1fa1ff}):_0x2f0b89['hgnTT'](_0x3c7e74,{'success':![],'error':_0x13455b(0x203)+_0x17be75,'output':_0x1fa1ff});}),_0x9aebd3['on'](_0x2e41df(0x1eb),_0x3502e7=>{_0x3c7e74({'success':![],'error':_0x3502e7['message']});});});}export async function isMarketplaceAdded(_0x234dd0){const _0x4bff9e=_0x28ab,_0x31f608={'OBzXN':_0x4bff9e(0x201),'nKCih':'list'},_0x38aebb=await runClaudeCommand([_0x31f608[_0x4bff9e(0x1ff)],_0x4bff9e(0x209),_0x31f608['nKCih']],{'captureOutput':!![]});if(!_0x38aebb[_0x4bff9e(0x200)]||!_0x38aebb[_0x4bff9e(0x1ef)])return![];return _0x38aebb[_0x4bff9e(0x1ef)]['includes'](_0x234dd0);}export async function isPluginInstalled(_0xa7b3d0){const _0x5de524=_0x28ab,_0x25d002={'vRvDa':function(_0x45c9d4,_0x56d459){return _0x45c9d4>_0x56d459;},'JlVQg':'plugin'},_0x1d6ea7=await getInstalledPluginInfoFromRegistry(_0xa7b3d0);if(_0x25d002[_0x5de524(0x1f4)](_0x1d6ea7[_0x5de524(0x1fc)],0x0))return!![];const _0x33c17d=await runClaudeCommand([_0x25d002['JlVQg'],_0x5de524(0x1f3)],{'captureOutput':!![]});if(!_0x33c17d['success']||!_0x33c17d['output'])return![];return _0x33c17d['output']['includes'](_0xa7b3d0);}function getInstalledPluginsPath(){const _0x187353=_0x28ab,_0x23585a={'mCbQR':_0x187353(0x1e4)};return join(getClaudeConfigDir(),'plugins',_0x23585a['mCbQR']);}function sortPluginInfo(_0x868a7f,_0x4a252a){const _0x207b02=_0x28ab,_0x40495b={'hedTv':function(_0x10ec22,_0x5dad37){return _0x10ec22-_0x5dad37;},'sXwiu':'user'},_0xcf4fc4={'project':0x0,'local':0x1,'user':0x2};return _0x40495b[_0x207b02(0x1f8)](_0xcf4fc4[_0x868a7f['scope']??_0x40495b['sXwiu']],_0xcf4fc4[_0x4a252a['scope']??_0x207b02(0x1e9)]);}function _0x28ab(_0xc3838c,_0x364dda){_0xc3838c=_0xc3838c-0x1e4;const _0x525708=_0x5257();let _0x28abce=_0x525708[_0xc3838c];return _0x28abce;}export function parseInstalledPluginInfo(_0x56be7e,_0x3b1abe,_0x15c355){const _0x2c1f67=_0x28ab,_0x5f40bb={'BHaVS':function(_0xd721c5,_0x287e2d){return _0xd721c5!==_0x287e2d;},'LdeDB':_0x2c1f67(0x1ee),'LJVmf':function(_0x1bc181,_0xe5e5b0){return _0x1bc181!==_0xe5e5b0;},'BwpbM':function(_0x39b4ca,_0x42fbf3){return _0x39b4ca===_0x42fbf3;},'DNUat':function(_0x40346a,_0x1c73ed){return _0x40346a(_0x1c73ed);}},_0x2644d2=JSON['parse'](_0x56be7e),_0xbe3dad=resolve(_0x15c355),_0x278b80=_0x2644d2[_0x2c1f67(0x1f0)]?.[_0x3b1abe]??[];return _0x278b80[_0x2c1f67(0x20c)](_0xc507c0=>{const _0x24b7a0=_0x2c1f67;if(_0x5f40bb[_0x24b7a0(0x1ec)](_0xc507c0['scope'],_0x5f40bb['LdeDB'])&&_0x5f40bb['LJVmf'](_0xc507c0['scope'],_0x24b7a0(0x210)))return!![];if(!_0xc507c0[_0x24b7a0(0x205)])return!![];return _0x5f40bb[_0x24b7a0(0x1f5)](_0x5f40bb['DNUat'](resolve,_0xc507c0['projectPath']),_0xbe3dad);})['map'](_0x5f4415=>({'name':_0x3b1abe,'scope':_0x5f4415[_0x2c1f67(0x20f)],'version':_0x5f4415[_0x2c1f67(0x1e6)]}))['sort'](sortPluginInfo);}async function getInstalledPluginInfoFromRegistry(_0x31c9a1){const _0x8ad531={'bXplM':function(_0x1de9a3){return _0x1de9a3();}},_0x57fe84=getInstalledPluginsPath();if(!existsSync(_0x57fe84))return[];try{const _0x42e738=await readFile(_0x57fe84,'utf-8');return parseInstalledPluginInfo(_0x42e738,_0x31c9a1,_0x8ad531['bXplM'](getProjectRoot));}catch{return[];}}export async function getPluginInfo(_0x2dcb67){const _0x366ad4=_0x28ab,_0xb8c259={'bSMKr':function(_0x1e48eb,_0x494f47){return _0x1e48eb>_0x494f47;},'OGaez':function(_0x42dac8,_0x83b2b3,_0x495fe1){return _0x42dac8(_0x83b2b3,_0x495fe1);},'jamHV':'plugin','dsMaf':'list','PRvvn':function(_0xce7d6d,_0x2eedad){return _0xce7d6d===_0x2eedad;},'NKIIu':_0x366ad4(0x212)},_0x302925=await getInstalledPluginInfoFromRegistry(_0x2dcb67);if(_0xb8c259[_0x366ad4(0x1fb)](_0x302925[_0x366ad4(0x1fc)],0x0))return _0x302925[0x0];const _0x5aadff=await _0xb8c259['OGaez'](runClaudeCommand,[_0xb8c259[_0x366ad4(0x1ea)],_0xb8c259['dsMaf']],{'captureOutput':!![]});if(!_0x5aadff[_0x366ad4(0x200)]||!_0x5aadff[_0x366ad4(0x1ef)])return null;if(!_0x5aadff[_0x366ad4(0x1ef)][_0x366ad4(0x202)](_0x2dcb67))return null;const _0x223d0c={'name':_0x2dcb67},_0x4b26d9=_0x5aadff[_0x366ad4(0x1ef)][_0x366ad4(0x211)](new RegExp(_0x2dcb67+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x4b26d9&&(_0x223d0c['scope']=_0x4b26d9[0x1]['toLowerCase']());const _0x3f239b=_0x5aadff[_0x366ad4(0x1ef)]['match'](new RegExp(_0x2dcb67+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x3f239b&&(_0x223d0c[_0x366ad4(0x1e6)]=_0x3f239b[0x1]);const _0x18cf8e=_0x5aadff['output'][_0x366ad4(0x211)](new RegExp(_0x2dcb67+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x18cf8e&&(_0x223d0c[_0x366ad4(0x212)]=_0xb8c259['PRvvn'](_0x18cf8e[0x1][_0x366ad4(0x1ed)](),_0xb8c259['NKIIu'])),_0x223d0c;}
|