@ranger-testing/ranger-cli 3.1.0 → 3.1.1-alpha.08fb70e-39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -1
- 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 -1
- 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 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.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/rangerwrightCli.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/tunnelClient.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 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5ead82=_0x5bda;(function(_0x599cea,_0x670c1a){const _0x54a706=_0x5bda,_0x49ffe8=_0x599cea();while(!![]){try{const _0x5a123b=-parseInt(_0x54a706(0x1d6))/0x1+-parseInt(_0x54a706(0x188))/0x2+parseInt(_0x54a706(0x192))/0x3+parseInt(_0x54a706(0x1a8))/0x4+-parseInt(_0x54a706(0x1d7))/0x5*(-parseInt(_0x54a706(0x1b1))/0x6)+-parseInt(_0x54a706(0x1ab))/0x7*(parseInt(_0x54a706(0x1bf))/0x8)+parseInt(_0x54a706(0x1b6))/0x9;if(_0x5a123b===_0x670c1a)break;else _0x49ffe8['push'](_0x49ffe8['shift']());}catch(_0x5092e7){_0x49ffe8['push'](_0x49ffe8['shift']());}}}(_0x5ccb,0xf20c7));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';function _0x5ccb(){const _0x2f88c1=['\x0aCould\x20not\x20check\x20latest\x20version:\x20','\x0aInstalling\x20','eZcpp','VgNsR','545989ofJGmE','5ZqimIS','Latest\x20version:\x20\x20','sLMws','AMoID','ODiED','FCduB','gtzXa','vQPpi','ICiAQ','\x0aSuccessfully\x20installed\x20','\x0aCurrent\x20version:\x20','NpGgB','zqunN','paJNP','TQZvf','1288086cgIHZw','log','project','trailhead','CKdLt','oaPNL','ujDZv','claude','close','Claude\x20plugin\x20update\x20failed\x20for\x20','1272255LFuBZU','pvfcI','oVRBl','marketplace','JxIdj','.0.0','ranger@trailhead','\x20ranger-managed\x20skill(s)...','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','version','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','npm','xIlVl','Update\x20failed.','.gitignore','\x20skill\x20','inherit','latest','...\x0a','edczp','user','trim','2018488AKipek','Checking\x20for\x20updates...','isFinite','10834943KgntVa',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','platform','QPrCT','rLfyo','stdio','2997222fdbQWs','xhxCu','xxbqq','aMPTx','LWIrl','20709612MtjNqI','\x0a✅\x20Update\x20complete!','some','warn','RggKu','ACKQM','split','\x0aSuccessfully\x20installed\x20latest\x20version.','WJrRv','8QDqIWT','active-profile.txt','fcmiC','test','\x0aYour\x20version\x20(','length','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','plugin','uhgMl','\x20channel.','\x20—\x20reinstalling\x20@','Attempting\x20install\x20anyway...','gMcIB','beta','error','win32','local','active-feature.txt','update'];_0x5ccb=function(){return _0x2f88c1;};return _0x5ccb();}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(_0x53f580,_0x68954c,_0x2c2c28){const _0x2a82b7=_0x5bda,_0x2476d3={'TQZvf':function(_0x525993,_0x13d554){return _0x525993(_0x13d554);},'pvfcI':'ignore','CKdLt':_0x2a82b7(0x1a2),'xhxCu':_0x2a82b7(0x1ce),'cbyfA':function(_0x22f253,_0x12fe16,_0x34c0f6){return _0x22f253(_0x12fe16,_0x34c0f6);},'WvjmA':_0x2a82b7(0x190),'sLMws':_0x2a82b7(0x1cd)};return new Promise(_0x2f49a7=>{const _0x5694b2=_0x2a82b7,_0x28e187={'IchVM':function(_0x176b66,_0x2a11bf){return _0x176b66(_0x2a11bf);}};let _0x11cf1f=![],_0x4a0af3;const _0x2d5af0=_0x56a6f7=>{if(_0x11cf1f)return;_0x11cf1f=!![],_0x4a0af3&&_0x28e187['IchVM'](clearTimeout,_0x4a0af3),_0x2f49a7(_0x56a6f7);},_0x5d73e7=spawn(_0x53f580,_0x68954c,{'stdio':[_0x2476d3[_0x5694b2(0x193)],_0x2c2c28?.[_0x5694b2(0x1b0)]??_0x2476d3[_0x5694b2(0x18c)],_0x2c2c28?.['stdio']??_0x2476d3[_0x5694b2(0x18c)]],'cwd':_0x2c2c28?.['cwd'],'shell':process['platform']===_0x2476d3[_0x5694b2(0x1b2)]});_0x4a0af3=_0x2c2c28?.['timeoutMs']?_0x2476d3['cbyfA'](setTimeout,()=>{_0x5d73e7['kill'](),_0x5d73e7['unref'](),_0x2d5af0(![]);},_0x2c2c28['timeoutMs']):undefined,_0x5d73e7['on'](_0x2476d3['WvjmA'],_0x2d863f=>{_0x2d5af0(_0x2d863f===0x0);}),_0x5d73e7['on'](_0x2476d3[_0x5694b2(0x1d9)],()=>{const _0x1767b4=_0x5694b2;_0x2476d3[_0x1767b4(0x187)](_0x2d5af0,![]);});});}export function resolveDistTag(_0x5304aa){const _0x5e8018=_0x5bda,_0x2662e7={'AMoID':'alpha'};if(/-alpha\./i['test'](_0x5304aa))return _0x2662e7[_0x5e8018(0x1da)];if(/-beta\./i[_0x5e8018(0x1c2)](_0x5304aa))return _0x5e8018(0x1cc);if(/-rc\./i['test'](_0x5304aa))return'rc';return'latest';}export function resolveInstallTarget(_0x12fba4){const _0x2b8bec=_0x5bda,_0x86bc7c={'alMSk':function(_0x318f7c,_0x1897a4){return _0x318f7c!==_0x1897a4;},'zqunN':'latest'},_0x545d03=resolveDistTag(_0x12fba4);if(_0x86bc7c['alMSk'](_0x545d03,_0x86bc7c['zqunN']))return _0x545d03;const _0x242736=_0x12fba4['split']('.')[0x0],_0x5ed3fa=parseInt(_0x242736,0xa);if(!Number[_0x2b8bec(0x1aa)](_0x5ed3fa))return _0x86bc7c[_0x2b8bec(0x185)];return'^'+_0x5ed3fa+_0x2b8bec(0x197);}async function runInstall(_0x1c8686){const _0x8ff383=_0x5bda,_0x2414eb={'MnsKR':function(_0x1d0fb7,_0x52fff2){return _0x1d0fb7(_0x52fff2);},'LWIrl':function(_0x3452e4,_0x480085,_0x2e78f6,_0x4734d7){return _0x3452e4(_0x480085,_0x2e78f6,_0x4734d7);},'paJNP':_0x8ff383(0x19d),'gLqLI':'install','pKQai':'inherit','aNhlk':'win32','aMPTx':'close','NprDV':_0x8ff383(0x1cd)},_0x4e5c9d=resolveInstallTarget(_0x1c8686);return new Promise(_0x4ea797=>{const _0x54bf48=_0x8ff383,_0x5783a1={'WRRsC':function(_0x2b5f70,_0x12193c){return _0x2414eb['MnsKR'](_0x2b5f70,_0x12193c);},'gtzXa':function(_0xc502ea,_0x5a4c14){return _0xc502ea===_0x5a4c14;},'BNiXa':function(_0x11ade6,_0x23d953){return _0x11ade6(_0x23d953);}};console['log'](_0x54bf48(0x1d3)+PACKAGE_NAME+'@'+_0x4e5c9d+_0x54bf48(0x1a4));const _0xf015a7=_0x2414eb[_0x54bf48(0x1b5)](spawn,_0x2414eb[_0x54bf48(0x186)],[_0x2414eb['gLqLI'],'-g',PACKAGE_NAME+'@'+_0x4e5c9d],{'stdio':['ignore',_0x2414eb['pKQai'],'inherit'],'shell':process[_0x54bf48(0x1ad)]===_0x2414eb['aNhlk']});_0xf015a7['on'](_0x2414eb[_0x54bf48(0x1b4)],_0x412f4f=>{const _0x5df62d=_0x54bf48;_0x5783a1['WRRsC'](_0x4ea797,_0x5783a1[_0x5df62d(0x17f)](_0x412f4f,0x0));}),_0xf015a7['on'](_0x2414eb['NprDV'],()=>{_0x5783a1['BNiXa'](_0x4ea797,![]);});});}function _0x5bda(_0x382083,_0x52eb12){_0x382083=_0x382083-0x17d;const _0x5ccb94=_0x5ccb();let _0x5bda79=_0x5ccb94[_0x382083];return _0x5bda79;}async function updateClaudeMarketplace(){const _0x190b8c=_0x5bda,_0x5af3b7={'FCduB':_0x190b8c(0x195)},_0xdce88a=await runCommand(_0x190b8c(0x18f),['plugin',_0x5af3b7[_0x190b8c(0x17e)],_0x190b8c(0x1d1),_0x190b8c(0x18b)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0xdce88a)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x40dd78=_0x5ead82(0x1a6)){const _0x156707=_0x5ead82,_0x1f81c7={'rLfyo':_0x156707(0x1c6),'VGlUX':_0x156707(0x1d1),'fcmiC':'ranger@trailhead','WJrRv':'user','gAznN':_0x156707(0x18f),'JpfDB':function(_0x16fceb,_0x27b808){return _0x16fceb===_0x27b808;},'ACKQM':'local','RggKu':function(_0x5c99fd){return _0x5c99fd();}},_0x5edd30=[_0x1f81c7[_0x156707(0x1af)],_0x1f81c7['VGlUX'],_0x1f81c7[_0x156707(0x1c1)]];_0x40dd78!==_0x1f81c7[_0x156707(0x1be)]&&_0x5edd30['push']('--scope',_0x40dd78);const _0xf26272=await runCommand(_0x1f81c7['gAznN'],_0x5edd30,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x40dd78===_0x156707(0x18a)||_0x1f81c7['JpfDB'](_0x40dd78,_0x1f81c7[_0x156707(0x1bb)])?_0x1f81c7[_0x156707(0x1ba)](getProjectRoot):undefined});if(!_0xf26272)throw new Error(_0x156707(0x191)+_0x40dd78+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x24cb27,_0x2d9521,_0x336f51){const _0x17fe9e={'MRZfU':'opencode','Rgczw':function(_0x3f4a25,_0x33058e){return _0x3f4a25(_0x33058e);},'sGQOk':function(_0x2293fd,_0x269288){return _0x2293fd(_0x269288);}},_0x539e11=_0x336f51===_0x17fe9e['MRZfU']?_0x17fe9e['Rgczw'](getOpencodeSkillsDir,_0x2d9521):_0x17fe9e['sGQOk'](getSkillsDir,_0x2d9521),_0x2bf68b=join(_0x539e11,_0x24cb27);return existsSync(_0x2bf68b);}async function reinstallSkills(_0x42f843){const _0x2e45e1=_0x5ead82,_0x534e31={'oVRBl':function(_0x1ad6e0,_0x55d417,_0x593b72,_0x4bd8da){return _0x1ad6e0(_0x55d417,_0x593b72,_0x4bd8da);},'qrOLT':'opencode','eZcpp':function(_0xd6557f,_0x35c2fe){return _0xd6557f===_0x35c2fe;},'yryPL':function(_0x97d271,_0x3b2579,_0x1de5a1){return _0x97d271(_0x3b2579,_0x1de5a1);}},_0x5b6756=[_0x2e45e1(0x18a),_0x2e45e1(0x1a6)],_0x4cc9bb=[];for(const _0x221fb7 of _0x5b6756){for(const _0x144449 of RANGER_MANAGED_SKILLS){_0x534e31[_0x2e45e1(0x194)](isSkillInstalled,_0x144449,_0x221fb7,_0x2e45e1(0x18f))&&_0x4cc9bb['push']({'skillName':_0x144449,'level':_0x221fb7,'platform':_0x2e45e1(0x18f)}),isSkillInstalled(_0x144449,_0x221fb7,'opencode')&&_0x4cc9bb['push']({'skillName':_0x144449,'level':_0x221fb7,'platform':_0x534e31['qrOLT']});}}for(const _0x107cbe of _0x5b6756){for(const _0x2b9d4f of DEPRECATED_SKILLS){await removeSkill(_0x2b9d4f,_0x107cbe);}}if(_0x534e31[_0x2e45e1(0x1d4)](_0x4cc9bb['length'],0x0)){console['log'](_0x2e45e1(0x19a));return;}console['log']('\x0aReinstalling\x20'+_0x4cc9bb['length']+_0x2e45e1(0x199));for(const {skillName:_0x417cc2,level:_0x4def25,platform:_0x3dd7de}of _0x4cc9bb){try{await _0x534e31['yryPL'](installSkill,_0x417cc2,{'level':_0x4def25,'cliVersion':_0x42f843,'platform':_0x3dd7de});}catch(_0x4f5b1d){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x3dd7de+'\x20'+_0x4def25+_0x2e45e1(0x1a1)+_0x417cc2+':',_0x4f5b1d);}}}async function ensureActiveProfileGitignored(){const _0x588519=_0x5ead82,_0x2231d3={'ICiAQ':function(_0x56e413,_0xd9e6f0,_0x232a79){return _0x56e413(_0xd9e6f0,_0x232a79);},'zBHAN':function(_0xf6d634){return _0xf6d634();},'EtwJq':function(_0x29c260,_0x16a572){return _0x29c260(_0x16a572);},'kfKiD':function(_0xc1667f,_0x2b3a8d,_0x1e5bea){return _0xc1667f(_0x2b3a8d,_0x1e5bea);}},_0x4ab4ea=_0x2231d3[_0x588519(0x181)](join,_0x2231d3['zBHAN'](getRangerDir),_0x588519(0x1a0));if(!_0x2231d3['EtwJq'](existsSync,_0x4ab4ea))return![];let _0x4e7824='';try{_0x4e7824=await _0x2231d3['kfKiD'](readFile,_0x4ab4ea,'utf-8');}catch{return![];}const _0x58724e=_0x4e7824['split'](/\r?\n/);if(_0x58724e[_0x588519(0x1b8)](_0x431562=>_0x431562[_0x588519(0x1a7)]()==='active-profile.txt'))return![];let _0x168092=_0x58724e['findIndex'](_0x326f59=>_0x326f59[_0x588519(0x1a7)]()===_0x588519(0x1d0));_0x168092===-0x1&&(_0x168092=_0x58724e[_0x588519(0x1c4)]);_0x58724e['splice'](_0x168092,0x0,_0x588519(0x1c0));let _0x5f9245=_0x58724e['join']('\x0a');!_0x5f9245['endsWith']('\x0a')&&(_0x5f9245+='\x0a');try{await writeFile(_0x4ab4ea,_0x5f9245,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x398559=_0x5ead82,_0x87550a={'oaPNL':function(_0x4d86a8){return _0x4d86a8();},'dmejV':_0x398559(0x1a3),'uhgMl':function(_0x907129,_0xb1fc43){return _0x907129(_0xb1fc43);},'kfRxZ':function(_0x39f4d9){return _0x39f4d9();},'edczp':'\x0a✅\x20Update\x20complete!','xxbqq':function(_0x41887d,_0x3a7f04){return _0x41887d+_0x3a7f04;},'nEgko':_0x398559(0x1ca),'JxIdj':_0x398559(0x1bd),'NpGgB':function(_0x25e218){return _0x25e218();},'wFvUr':function(_0x1c984,_0x2b06eb,_0x2f4f56){return _0x1c984(_0x2b06eb,_0x2f4f56);},'UWIzZ':function(_0x2911c9,_0x430f56){return _0x2911c9===_0x430f56;},'QPrCT':_0x398559(0x1c5),'EtXHr':function(_0x3e7641,_0x3f94dd){return _0x3e7641<_0x3f94dd;},'VgNsR':function(_0x2c7d3f,_0x212c1e){return _0x2c7d3f(_0x212c1e);},'ujDZv':_0x398559(0x18b),'ODiED':_0x398559(0x198),'gMcIB':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','vQPpi':_0x398559(0x1a6),'xIlVl':function(_0x14ecaa,_0x4f14b4){return _0x14ecaa(_0x4f14b4);},'DvPih':_0x398559(0x18a),'Elneo':_0x398559(0x1cf)},_0x2a1187=_0x87550a[_0x398559(0x18d)](getCurrentVersion);console[_0x398559(0x189)](_0x398559(0x183)+_0x2a1187);const _0x18a42c=resolveDistTag(_0x2a1187);if(_0x18a42c!==_0x87550a['dmejV']){console[_0x398559(0x189)]('Prerelease\x20channel\x20detected\x20(@'+_0x18a42c+').\x20Staying\x20on\x20'+_0x18a42c+_0x398559(0x1c9)+_0x18a42c+'...');const _0x2da1bc=await _0x87550a[_0x398559(0x1c7)](runInstall,_0x2a1187);if(!_0x2da1bc)throw new Error('Update\x20failed\x20for\x20@'+_0x18a42c+_0x398559(0x1c8));const _0x131aa7=getCurrentVersion();console['log'](_0x398559(0x182)+PACKAGE_NAME+'@'+_0x18a42c+'.'),await _0x87550a['uhgMl'](reinstallSkills,_0x131aa7),await _0x87550a['kfRxZ'](ensureActiveProfileGitignored),console['log'](_0x87550a[_0x398559(0x1a5)]);return;}console['log'](_0x398559(0x1a9));const _0x5c158d=parseInt(_0x2a1187[_0x398559(0x1bc)]('.')[0x0],0xa);if(!Number['isFinite'](_0x5c158d))throw new Error(_0x87550a['xxbqq'](_0x87550a[_0x398559(0x1b3)]('Could\x20not\x20determine\x20the\x20current\x20major\x20version\x20from\x20\x22'+_0x2a1187+'\x22.\x20','Aborting\x20to\x20avoid\x20a\x20cross-major\x20upgrade.\x20Reinstall\x20explicitly\x20with:\x20'),'npm\x20i\x20-g\x20'+PACKAGE_NAME+'@latest'));const _0x49c460=getLatestVersion(_0x5c158d);let _0x447278=_0x2a1187;if(!_0x49c460['version']){console[_0x398559(0x1b9)](_0x398559(0x1d2)+_0x49c460['error']),console['log'](_0x87550a['nEgko']);const _0x5163e6=await runInstall(_0x2a1187);if(_0x5163e6)console[_0x398559(0x189)](_0x87550a[_0x398559(0x196)]),_0x447278=_0x87550a[_0x398559(0x184)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x49c460['error']);}else{const _0x4699de=_0x49c460[_0x398559(0x19b)];console['log'](_0x398559(0x1d8)+_0x4699de);const _0x5875c9=_0x87550a['wFvUr'](compareVersions,_0x2a1187,_0x4699de);if(_0x87550a['UWIzZ'](_0x5875c9,0x0))console['log'](_0x87550a[_0x398559(0x1ae)]);else{if(_0x87550a['EtXHr'](_0x5875c9,0x0))console['log'](_0x398559(0x1c3)+_0x2a1187+_0x398559(0x1ac)+_0x4699de+').');else{const _0x46fc6b=await _0x87550a[_0x398559(0x1d5)](runInstall,_0x2a1187);if(_0x46fc6b)console[_0x398559(0x189)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x4699de),_0x447278=_0x4699de;else throw new Error(_0x398559(0x19f));}}}await _0x87550a['uhgMl'](reinstallSkills,_0x447278);const _0x413e98=await isMarketplaceAdded(_0x87550a[_0x398559(0x18e)]),_0x451513=await isPluginInstalled(_0x87550a[_0x398559(0x17d)]);_0x413e98&&(await _0x87550a['NpGgB'](updateClaudeMarketplace),console['log'](_0x87550a[_0x398559(0x1cb)]));if(_0x451513){const _0x11ffad=await getPluginInfo('ranger@trailhead'),_0x24177a=_0x11ffad?.['scope']??_0x87550a[_0x398559(0x180)];await _0x87550a[_0x398559(0x19e)](updateClaudePlugin,_0x24177a);if(_0x87550a['UWIzZ'](_0x24177a,_0x87550a['DvPih']))console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x24177a===_0x87550a['Elneo']?console['log']('\x0aClaude\x20plugin\x20updated\x20(local\x20scope).'):console[_0x398559(0x189)](_0x398559(0x19c));}const _0x45e9a4=await ensureActiveProfileGitignored();console['log'](_0x398559(0x1b7));}
|
|
1
|
+
(function(_0x498166,_0x5a23fe){const _0x3c65b5=_0x4842,_0x5cbbd3=_0x498166();while(!![]){try{const _0x500f0e=-parseInt(_0x3c65b5(0x1f2))/0x1*(-parseInt(_0x3c65b5(0x1d5))/0x2)+-parseInt(_0x3c65b5(0x1bd))/0x3*(parseInt(_0x3c65b5(0x205))/0x4)+-parseInt(_0x3c65b5(0x1f9))/0x5*(parseInt(_0x3c65b5(0x1dd))/0x6)+parseInt(_0x3c65b5(0x1fd))/0x7+-parseInt(_0x3c65b5(0x207))/0x8*(parseInt(_0x3c65b5(0x1f4))/0x9)+parseInt(_0x3c65b5(0x1d6))/0xa+parseInt(_0x3c65b5(0x1c4))/0xb;if(_0x500f0e===_0x5a23fe)break;else _0x5cbbd3['push'](_0x5cbbd3['shift']());}catch(_0x360586){_0x5cbbd3['push'](_0x5cbbd3['shift']());}}}(_0x24a0,0x9947d));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x24a0(){const _0x3d42bc=['xLQeq','user','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','log','Claude\x20plugin\x20update\x20failed\x20for\x20','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','4JXHxey','4133760wCIKFO','kill','EUKZN','endsWith','wPfeO','\x0aSuccessfully\x20updated\x20to\x20version\x20','error','66Pkhixk','RECkn','TBbWd','Update\x20failed.','Checking\x20for\x20updates...','platform','EWhwz','dbrLx','UTFvJ','Wgkih','WONsg','NyiFh','latest','utf-8','length','timeoutMs','...','ignore','splice',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','isFinite','539095EKvJvC','scope','9lgoqLE','plugin','ysLhU','\x0aCurrent\x20version:\x20','cNZYN','67760AMvuAZ','gElav','Update\x20failed:\x20','\x0aSuccessfully\x20installed\x20latest\x20version.','3635457QHfvCW','unref','close','Update\x20failed\x20for\x20@','some','install','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','sxNjH','3974248rmZpws','trailhead','8064848alUAOX','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','vPrBy','pLynM','Attempting\x20install\x20anyway...','.0.0','inherit','...\x0a','join','split','UIpfl','PmTrx','win32','caDoH','WoqiN','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','oZllU','DhRHv','3ZPUGkP','project','\x0aReinstalling\x20','stdio','kBIpg','Uqcog','.gitignore','8444260wPGjRn','active-profile.txt','\x20skill\x20','RSLFy','update','Prerelease\x20channel\x20detected\x20(@','cwd','Could\x20not\x20determine\x20the\x20current\x20major\x20version\x20from\x20\x22','CcDZb','claude','VYczK'];_0x24a0=function(){return _0x3d42bc;};return _0x24a0();}import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0x4842(_0x4023c0,_0x5ead27){_0x4023c0=_0x4023c0-0x1b7;const _0x24a0ee=_0x24a0();let _0x484217=_0x24a0ee[_0x4023c0];return _0x484217;}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(_0x3b61d7,_0x531c54,_0x5cb5f6){const _0x30afc0=_0x4842,_0xc35580={'wPfeO':function(_0x1c05e4,_0x390333){return _0x1c05e4(_0x390333);},'PmTrx':function(_0x2ce9ef,_0xe98706){return _0x2ce9ef(_0xe98706);},'RSLFy':function(_0x155631,_0x400a2a){return _0x155631===_0x400a2a;},'DhRHv':_0x30afc0(0x1ee),'cRnMO':_0x30afc0(0x20d),'sDJtl':_0x30afc0(0x1b7)};return new Promise(_0x560ef7=>{const _0x25aa73=_0x30afc0;let _0x51fd55=![],_0x1989d2;const _0x25ebd1=_0xf6b7be=>{const _0x126c5f=_0x4842;if(_0x51fd55)return;_0x51fd55=!![],_0x1989d2&&clearTimeout(_0x1989d2),_0xc35580[_0x126c5f(0x1da)](_0x560ef7,_0xf6b7be);},_0x46bd7f=spawn(_0x3b61d7,_0x531c54,{'stdio':[_0xc35580[_0x25aa73(0x1bc)],_0x5cb5f6?.['stdio']??_0xc35580['cRnMO'],_0x5cb5f6?.[_0x25aa73(0x1c0)]??'inherit'],'cwd':_0x5cb5f6?.[_0x25aa73(0x1ca)],'shell':process[_0x25aa73(0x1e2)]===_0xc35580['sDJtl']});_0x1989d2=_0x5cb5f6?.[_0x25aa73(0x1ec)]?setTimeout(()=>{const _0x4efe92=_0x25aa73;_0x46bd7f[_0x4efe92(0x1d7)](),_0x46bd7f[_0x4efe92(0x1fe)](),_0x25ebd1(![]);},_0x5cb5f6[_0x25aa73(0x1ec)]):undefined,_0x46bd7f['on'](_0x25aa73(0x1ff),_0x2bff1a=>{const _0x166544=_0x25aa73;_0xc35580[_0x166544(0x212)](_0x25ebd1,_0xc35580[_0x166544(0x1c7)](_0x2bff1a,0x0));}),_0x46bd7f['on'](_0x25aa73(0x1dc),()=>{_0xc35580['PmTrx'](_0x25ebd1,![]);});});}export function resolveDistTag(_0xebe8f8){const _0x2a4ca3=_0x4842,_0x2cb3b9={'fwbGT':'beta','tZbOh':_0x2a4ca3(0x1e9)};if(/-alpha\./i['test'](_0xebe8f8))return'alpha';if(/-beta\./i['test'](_0xebe8f8))return _0x2cb3b9['fwbGT'];if(/-rc\./i['test'](_0xebe8f8))return'rc';return _0x2cb3b9['tZbOh'];}export function resolveInstallTarget(_0x3b35d9){const _0x5d69a9=_0x4842,_0x4a75cf={'nuNPS':function(_0x1f49f0,_0x1924a9){return _0x1f49f0!==_0x1924a9;},'pLynM':'latest','UIpfl':function(_0x4a0549,_0x531753,_0x3e7a55){return _0x4a0549(_0x531753,_0x3e7a55);}},_0x5bdc2e=resolveDistTag(_0x3b35d9);if(_0x4a75cf['nuNPS'](_0x5bdc2e,_0x4a75cf[_0x5d69a9(0x20a)]))return _0x5bdc2e;const _0x4bcec9=_0x3b35d9[_0x5d69a9(0x210)]('.')[0x0],_0x1e8db4=_0x4a75cf[_0x5d69a9(0x211)](parseInt,_0x4bcec9,0xa);if(!Number[_0x5d69a9(0x1f1)](_0x1e8db4))return'latest';return'^'+_0x1e8db4+_0x5d69a9(0x20c);}async function runInstall(_0xe6ebc4){const _0x1f8c7b=_0x4842,_0x51f7ad={'caDoH':function(_0x2cf7b8,_0x179754){return _0x2cf7b8(_0x179754);},'OSkdx':function(_0x4eb341,_0x1d673e,_0x544ec9,_0x2fed8a){return _0x4eb341(_0x1d673e,_0x544ec9,_0x2fed8a);},'sxNjH':'inherit','pJsBF':function(_0x11a25c,_0x442c80){return _0x11a25c===_0x442c80;},'FxwyP':_0x1f8c7b(0x1b7),'XmAme':_0x1f8c7b(0x1dc),'gQawG':function(_0x488758,_0x2397d5){return _0x488758(_0x2397d5);}},_0x2dd31e=_0x51f7ad['gQawG'](resolveInstallTarget,_0xe6ebc4);return new Promise(_0xe7924a=>{const _0x295af6=_0x1f8c7b;console[_0x295af6(0x1d2)]('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x2dd31e+_0x295af6(0x20e));const _0x20a653=_0x51f7ad['OSkdx'](spawn,'npm',[_0x295af6(0x202),'-g',PACKAGE_NAME+'@'+_0x2dd31e],{'stdio':['ignore',_0x51f7ad[_0x295af6(0x204)],'inherit'],'shell':_0x51f7ad['pJsBF'](process['platform'],_0x51f7ad['FxwyP'])});_0x20a653['on'](_0x295af6(0x1ff),_0x56a4ea=>{const _0x4d71c0=_0x295af6;_0x51f7ad[_0x4d71c0(0x1b8)](_0xe7924a,_0x56a4ea===0x0);}),_0x20a653['on'](_0x51f7ad['XmAme'],()=>{_0xe7924a(![]);});});}async function updateClaudeMarketplace(){const _0x4f32e5=_0x4842,_0x3a1c68={'UTFvJ':'claude','CVJXR':_0x4f32e5(0x206)},_0x349aa8=await runCommand(_0x3a1c68[_0x4f32e5(0x1e5)],[_0x4f32e5(0x1f5),'marketplace',_0x4f32e5(0x1c8),_0x3a1c68['CVJXR']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x349aa8)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x4ca237='user'){const _0x27da76=_0x4842,_0x19affa={'kxHco':_0x27da76(0x1c8),'oGwBt':'ranger@trailhead','gElav':_0x27da76(0x1d0),'iILkc':_0x27da76(0x1cd),'oZllU':'project','cNZYN':function(_0x364edb,_0x2bdfd7){return _0x364edb===_0x2bdfd7;},'dbrLx':function(_0x6c3fd6){return _0x6c3fd6();}},_0x5053c1=['plugin',_0x19affa['kxHco'],_0x19affa['oGwBt']];_0x4ca237!==_0x19affa[_0x27da76(0x1fa)]&&_0x5053c1['push']('--scope',_0x4ca237);const _0x18b79b=await runCommand(_0x19affa['iILkc'],_0x5053c1,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x4ca237===_0x19affa[_0x27da76(0x1bb)]||_0x19affa[_0x27da76(0x1f8)](_0x4ca237,'local')?_0x19affa[_0x27da76(0x1e4)](getProjectRoot):undefined});if(!_0x18b79b)throw new Error(_0x27da76(0x1d3)+_0x4ca237+_0x27da76(0x1d1));}function isSkillInstalled(_0x469cb1,_0x496af2,_0x3cbede){const _0x111acb=_0x4842,_0x579f25={'WGJQG':function(_0x2ba01c,_0x30b168){return _0x2ba01c===_0x30b168;},'MaYOY':'opencode','CcDZb':function(_0x223851,_0x1825ee){return _0x223851(_0x1825ee);},'kBIpg':function(_0x51b925,_0x210f5e){return _0x51b925(_0x210f5e);},'NyiFh':function(_0x1a7eb4,_0x29e412,_0x2d7e6f){return _0x1a7eb4(_0x29e412,_0x2d7e6f);}},_0x489182=_0x579f25['WGJQG'](_0x3cbede,_0x579f25['MaYOY'])?_0x579f25[_0x111acb(0x1cc)](getOpencodeSkillsDir,_0x496af2):_0x579f25[_0x111acb(0x1c1)](getSkillsDir,_0x496af2),_0x28abe5=_0x579f25[_0x111acb(0x1e8)](join,_0x489182,_0x469cb1);return existsSync(_0x28abe5);}async function reinstallSkills(_0x12616d){const _0x3c734c=_0x4842,_0x42fa9c={'Rukub':_0x3c734c(0x1be),'kAZIN':_0x3c734c(0x1cd),'lrhvj':'opencode','Uqcog':function(_0x2ebe73,_0xf55cb4){return _0x2ebe73===_0xf55cb4;},'RECkn':_0x3c734c(0x1d4)},_0x1c01e7=[_0x42fa9c['Rukub'],_0x3c734c(0x1d0)],_0x3c73f3=[];for(const _0x4a080b of _0x1c01e7){for(const _0x422b66 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x422b66,_0x4a080b,_0x42fa9c['kAZIN'])&&_0x3c73f3['push']({'skillName':_0x422b66,'level':_0x4a080b,'platform':_0x3c734c(0x1cd)}),isSkillInstalled(_0x422b66,_0x4a080b,_0x42fa9c['lrhvj'])&&_0x3c73f3['push']({'skillName':_0x422b66,'level':_0x4a080b,'platform':_0x42fa9c['lrhvj']});}}for(const _0x568abb of _0x1c01e7){for(const _0x20514b of DEPRECATED_SKILLS){await removeSkill(_0x20514b,_0x568abb);}}if(_0x42fa9c[_0x3c734c(0x1c2)](_0x3c73f3['length'],0x0)){console['log'](_0x42fa9c[_0x3c734c(0x1de)]);return;}console[_0x3c734c(0x1d2)](_0x3c734c(0x1bf)+_0x3c73f3['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x447075,level:_0x313a96,platform:_0x2f8fb9}of _0x3c73f3){try{await installSkill(_0x447075,{'level':_0x313a96,'cliVersion':_0x12616d,'platform':_0x2f8fb9});}catch(_0x2000f4){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x2f8fb9+'\x20'+_0x313a96+_0x3c734c(0x1c6)+_0x447075+':',_0x2000f4);}}}async function ensureActiveProfileGitignored(){const _0x3e6310=_0x4842,_0x594b51={'SHKzZ':function(_0x1c2def,_0x878d7a){return _0x1c2def(_0x878d7a);},'UgIUa':_0x3e6310(0x1ea),'WoqiN':_0x3e6310(0x1c5),'WONsg':function(_0x4607c4,_0x40b0de,_0x174a76,_0x15f559){return _0x4607c4(_0x40b0de,_0x174a76,_0x15f559);}},_0xad32d0=join(getRangerDir(),_0x3e6310(0x1c3));if(!_0x594b51['SHKzZ'](existsSync,_0xad32d0))return![];let _0x48c9ed='';try{_0x48c9ed=await readFile(_0xad32d0,_0x594b51['UgIUa']);}catch{return![];}const _0x27ccc3=_0x48c9ed['split'](/\r?\n/);if(_0x27ccc3[_0x3e6310(0x201)](_0x22f6e2=>_0x22f6e2['trim']()===_0x3e6310(0x1c5)))return![];let _0x47103e=_0x27ccc3['findIndex'](_0x39ed38=>_0x39ed38['trim']()==='active-feature.txt');_0x47103e===-0x1&&(_0x47103e=_0x27ccc3[_0x3e6310(0x1eb)]);_0x27ccc3[_0x3e6310(0x1ef)](_0x47103e,0x0,_0x594b51[_0x3e6310(0x1b9)]);let _0x320cb3=_0x27ccc3[_0x3e6310(0x20f)]('\x0a');!_0x320cb3[_0x3e6310(0x1d9)]('\x0a')&&(_0x320cb3+='\x0a');try{await _0x594b51[_0x3e6310(0x1e7)](writeFile,_0xad32d0,_0x320cb3,_0x594b51['UgIUa']);}catch{return![];}return!![];}export async function update(){const _0x1fa419=_0x4842,_0xdef2d1={'zSIPo':function(_0x4fae17){return _0x4fae17();},'xLQeq':function(_0x45037f,_0x586d76){return _0x45037f(_0x586d76);},'ejpVG':function(_0x36a6df,_0x5e85c8){return _0x36a6df!==_0x5e85c8;},'EWhwz':'latest','WNIvG':function(_0x1b186f){return _0x1b186f();},'EUKZN':'\x0a✅\x20Update\x20complete!','foFyJ':function(_0x58022e,_0x8f8f8a){return _0x58022e+_0x8f8f8a;},'TBbWd':function(_0x29f5e1,_0x21de63){return _0x29f5e1<_0x21de63;},'TsnRM':_0x1fa419(0x1e0),'Wgkih':_0x1fa419(0x206),'TvNCU':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','UyycZ':_0x1fa419(0x1d0),'vPrBy':function(_0x195923,_0x35aaed){return _0x195923(_0x35aaed);},'WcayP':_0x1fa419(0x203),'VYczK':function(_0x4f2a3f,_0x10ffa2){return _0x4f2a3f===_0x10ffa2;},'YjjlB':_0x1fa419(0x208),'ysLhU':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'},_0x187e7c=_0xdef2d1['zSIPo'](getCurrentVersion);console['log'](_0x1fa419(0x1f7)+_0x187e7c);const _0x48149d=_0xdef2d1[_0x1fa419(0x1cf)](resolveDistTag,_0x187e7c);if(_0xdef2d1['ejpVG'](_0x48149d,_0xdef2d1[_0x1fa419(0x1e3)])){console[_0x1fa419(0x1d2)](_0x1fa419(0x1c9)+_0x48149d+').\x20Staying\x20on\x20'+_0x48149d+'\x20—\x20reinstalling\x20@'+_0x48149d+_0x1fa419(0x1ed));const _0x3384fe=await runInstall(_0x187e7c);if(!_0x3384fe)throw new Error(_0x1fa419(0x200)+_0x48149d+'\x20channel.');const _0x2b47ba=_0xdef2d1['WNIvG'](getCurrentVersion);console[_0x1fa419(0x1d2)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x48149d+'.'),await _0xdef2d1[_0x1fa419(0x1cf)](reinstallSkills,_0x2b47ba),await ensureActiveProfileGitignored(),console[_0x1fa419(0x1d2)](_0xdef2d1[_0x1fa419(0x1d8)]);return;}console['log'](_0x1fa419(0x1e1));const _0x21e1ea=parseInt(_0x187e7c[_0x1fa419(0x210)]('.')[0x0],0xa);if(!Number[_0x1fa419(0x1f1)](_0x21e1ea))throw new Error(_0xdef2d1['foFyJ'](_0xdef2d1['foFyJ'](_0x1fa419(0x1cb)+_0x187e7c+'\x22.\x20','Aborting\x20to\x20avoid\x20a\x20cross-major\x20upgrade.\x20Reinstall\x20explicitly\x20with:\x20'),'npm\x20i\x20-g\x20'+PACKAGE_NAME+'@latest'));const _0x41b6a3=getLatestVersion(_0x21e1ea);let _0x594c79=_0x187e7c;if(!_0x41b6a3['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x41b6a3['error']),console[_0x1fa419(0x1d2)](_0x1fa419(0x20b));const _0x3522c9=await runInstall(_0x187e7c);if(_0x3522c9)console[_0x1fa419(0x1d2)](_0x1fa419(0x1fc)),_0x594c79=getCurrentVersion();else throw new Error(_0x1fa419(0x1fb)+_0x41b6a3[_0x1fa419(0x1dc)]);}else{const _0x4727c7=_0x41b6a3['version'];console[_0x1fa419(0x1d2)]('Latest\x20version:\x20\x20'+_0x4727c7);const _0x42b491=compareVersions(_0x187e7c,_0x4727c7);if(_0x42b491===0x0)console['log'](_0x1fa419(0x1ba));else{if(_0xdef2d1[_0x1fa419(0x1df)](_0x42b491,0x0))console['log']('\x0aYour\x20version\x20('+_0x187e7c+_0x1fa419(0x1f0)+_0x4727c7+').');else{const _0x57291f=await runInstall(_0x187e7c);if(_0x57291f)console[_0x1fa419(0x1d2)](_0x1fa419(0x1db)+_0x4727c7),_0x594c79=_0x4727c7;else throw new Error(_0xdef2d1['TsnRM']);}}}await reinstallSkills(_0x594c79);const _0x53c995=await isMarketplaceAdded(_0xdef2d1[_0x1fa419(0x1e6)]),_0x1baaf8=await isPluginInstalled('ranger@trailhead');_0x53c995&&(await updateClaudeMarketplace(),console['log'](_0xdef2d1['TvNCU']));if(_0x1baaf8){const _0x4389f7=await _0xdef2d1[_0x1fa419(0x1cf)](getPluginInfo,'ranger@trailhead'),_0x59be31=_0x4389f7?.[_0x1fa419(0x1f3)]??_0xdef2d1['UyycZ'];await _0xdef2d1[_0x1fa419(0x209)](updateClaudePlugin,_0x59be31);if(_0x59be31===_0x1fa419(0x1be))console['log'](_0xdef2d1['WcayP']);else _0xdef2d1[_0x1fa419(0x1ce)](_0x59be31,'local')?console['log'](_0xdef2d1['YjjlB']):console['log'](_0xdef2d1[_0x1fa419(0x1f6)]);}const _0x3a1312=await ensureActiveProfileGitignored();console['log'](_0xdef2d1['EUKZN']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34e878,_0x16cbd4){const _0x3f93e3=_0x4a23,_0x39e9c2=_0x34e878();while(!![]){try{const _0x3db277=parseInt(_0x3f93e3(0x1e1))/0x1+parseInt(_0x3f93e3(0x1fa))/0x2*(-parseInt(_0x3f93e3(0x1f0))/0x3)+-parseInt(_0x3f93e3(0x205))/0x4*(parseInt(_0x3f93e3(0x206))/0x5)+parseInt(_0x3f93e3(0x1f4))/0x6+parseInt(_0x3f93e3(0x1f7))/0x7*(-parseInt(_0x3f93e3(0x207))/0x8)+parseInt(_0x3f93e3(0x201))/0x9*(-parseInt(_0x3f93e3(0x204))/0xa)+parseInt(_0x3f93e3(0x203))/0xb;if(_0x3db277===_0x16cbd4)break;else _0x39e9c2['push'](_0x39e9c2['shift']());}catch(_0xac90a8){_0x39e9c2['push'](_0x39e9c2['shift']());}}}(_0x5102,0xe6ee8));function _0x5102(){const _0x5bc7e7=['cwd','Profile\x20\x22','Can\x27t\x20refresh\x20\x22','5473494yjOwDS','wUkyy','mcFHD','117628fsldwW','exit','OTnBB','17124CpdjJj','wnXgU','No\x20profile\x20named\x20\x22','EeTqT','\x20\x20ranger\x20profile\x20add\x20','\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a','error','2748663CemFqd','KMmMF','13460898kUDwYt','10nVdVZS','26800soGUyh','235RIasnf','392MjRDNp','Run\x20`ranger\x20profile\x20update\x20','\x20--url\x20<your-app-url>\x0a','settings','legacy','✓\x20Session\x20refreshed\x20for\x20\x22','not_configured','972840yDJenq','\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','catch','TYiWh','KPHBU','environmentKey','log','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','setupHeaders','test_output','Capturing\x20a\x20fresh\x20session\x20for\x20\x22','Re-create\x20it\x20with:\x0a','status','success','252zcaezO'];_0x5102=function(){return _0x5bc7e7;};return _0x5102();}import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./utils/projectsConfig.js';import{getEnvNames}from'./env.js';function _0x4a23(_0x1ecb3c,_0x618e82){_0x1ecb3c=_0x1ecb3c-0x1e1;const _0x510252=_0x5102();let _0x4a2331=_0x510252[_0x1ecb3c];return _0x4a2331;}export async function updateEnv(_0x3baea1,_0x51c92a,_0x29c157){const _0x4c6431=_0x4a23,_0x172f7b={'wnXgU':function(_0x10f429){return _0x10f429();},'mcFHD':_0x4c6431(0x20b),'KMmMF':function(_0x5422ae,_0x3ba43c){return _0x5422ae===_0x3ba43c;},'WmMMZ':function(_0x453ce2,_0x1d17e3){return _0x453ce2+_0x1d17e3;},'OTnBB':function(_0x41a464,_0x383a1c){return _0x41a464+_0x383a1c;},'RBwTb':function(_0x38ef3c,_0x3eff9c){return _0x38ef3c+_0x3eff9c;},'TYiWh':_0x4c6431(0x20d),'KPHBU':_0x4c6431(0x1e2),'EeTqT':_0x4c6431(0x1e8),'wUkyy':function(_0x5d25de,_0x1117d8,_0x2c5721){return _0x5d25de(_0x1117d8,_0x2c5721);},'LQUBV':function(_0x250170,_0x36ea2f){return _0x250170??_0x36ea2f;},'Urrjk':function(_0x50ba15,_0x3c7e00){return _0x50ba15+_0x3c7e00;}},_0x319fba=await fetchCloudProfile(_0x3baea1);if(!_0x319fba){const {envTypes:_0x5d4cc3}=await _0x172f7b['wnXgU'](getEnvNames),_0x27ba1c=_0x5d4cc3[_0x3baea1];(_0x27ba1c===_0x172f7b[_0x4c6431(0x1f6)]||_0x172f7b[_0x4c6431(0x202)](_0x27ba1c,'local')||_0x27ba1c==='ci')&&(console['error'](_0x172f7b['WmMMZ'](_0x172f7b[_0x4c6431(0x1f9)](_0x4c6431(0x1f2)+_0x3baea1+_0x4c6431(0x1e9),'Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a'),'\x0a')+('\x20\x20ranger\x20profile\x20add\x20'+_0x3baea1+'\x0a')),process[_0x4c6431(0x1f8)](0x1));}!_0x319fba&&(console['error'](_0x172f7b['RBwTb'](_0x4c6431(0x1fc)+_0x3baea1+'\x22\x20found.\x0a','Create\x20it\x20with:\x0a')+'\x0a'+(_0x4c6431(0x1fe)+_0x3baea1+'\x0a')),process[_0x4c6431(0x1f8)](0x1));const _0x18a9eb=await _0x172f7b['wnXgU'](fetchAuthConfig)[_0x4c6431(0x1e3)](()=>null),_0x20482f=_0x319fba['environmentKey']&&_0x18a9eb?resolveAuthEnvironmentLocally(_0x18a9eb,_0x319fba[_0x4c6431(0x1e6)]):null;if(_0x319fba[_0x4c6431(0x1e6)]&&_0x20482f&&!_0x29c157?.['manual']){console[_0x4c6431(0x1e7)]('Refreshing\x20session\x20for\x20\x22'+_0x3baea1+'\x22\x20via\x20server-side\x20login...');try{const _0x3b27cd=await serverSideLogin(_0x3baea1,{'force':!![]});if(_0x172f7b[_0x4c6431(0x202)](_0x3b27cd[_0x4c6431(0x1ee)],_0x4c6431(0x1ef))){console['log'](_0x4c6431(0x20c)+_0x3baea1+'\x22.');return;}_0x3b27cd[_0x4c6431(0x1ee)]===_0x172f7b[_0x4c6431(0x1e4)]?console[_0x4c6431(0x1e7)]('\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...'):(_0x3b27cd[_0x4c6431(0x1eb)]&&(console['log'](_0x172f7b[_0x4c6431(0x1e5)]),console[_0x4c6431(0x1e7)](_0x3b27cd[_0x4c6431(0x1eb)])),console['log'](_0x172f7b[_0x4c6431(0x1fd)]));}catch(_0x56b64b){console['log']('\x20\x20Server-side\x20login\x20error:\x20'+(_0x56b64b instanceof Error?_0x56b64b['message']:String(_0x56b64b))),console[_0x4c6431(0x1e7)]('\x20\x20Falling\x20back\x20to\x20headed\x20browser...');}}const _0x3db9d6=readProfileOverrides(process[_0x4c6431(0x1f1)](),_0x3baea1),_0x162355=_0x172f7b[_0x4c6431(0x1f5)](mergeCloudProfileSettings,_0x319fba[_0x4c6431(0x20a)]??{},_0x172f7b['LQUBV'](_0x3db9d6,undefined)),_0x424ac9=_0x162355['setupHeaders'],_0xaae181=_0x162355['baseUrl'],_0x45aba9=_0x20482f?{..._0x20482f,'domains':_0xaae181?[_0xaae181,..._0x20482f['domains']]:_0x20482f['domains'],'setupHeaders':_0x424ac9??_0x20482f[_0x4c6431(0x1ea)]}:_0xaae181?{'key':_0x319fba[_0x4c6431(0x1e6)]??'','domains':[_0xaae181],'setupHeaders':_0x424ac9}:null;!_0x45aba9&&(console['error'](_0x172f7b['Urrjk'](_0x172f7b['RBwTb'](_0x4c6431(0x1f2)+_0x3baea1+_0x4c6431(0x1ff),_0x4c6431(0x1ed))+'\x0a',_0x4c6431(0x1fe)+_0x3baea1+_0x4c6431(0x209))),process[_0x4c6431(0x1f8)](0x1)),!_0x172f7b[_0x4c6431(0x1fb)](isInteractive)&&(console[_0x4c6431(0x200)](_0x4c6431(0x1f3)+_0x3baea1+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a'+(_0x4c6431(0x208)+_0x3baea1+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process[_0x4c6431(0x1f8)](0x1)),console[_0x4c6431(0x1e7)](_0x4c6431(0x1ec)+_0x3baea1+'\x22\x20via\x20headed\x20browser...'),await manualBrowserLogin(_0x319fba,_0x45aba9),console['log'](_0x4c6431(0x20c)+_0x3baea1+'\x22.');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5a5a(){const _0x4c44b4=['aAybD','90cTRyFM','217lHYTUL','log','9078048RDVhPm','gLTOe','470536cGIQWA','Profile\x20\x22','5029015dBrDBy','Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','4PDjJOo','43265112xfVpVY','1594730tUsNpk','DQaWL','7OPcvAu','kTCnT','371808tEVqPy','158392cPOsrI'];_0x5a5a=function(){return _0x4c44b4;};return _0x5a5a();}(function(_0x64553a,_0x270f26){const _0x2f0708=_0xae0e,_0x2aaae0=_0x64553a();while(!![]){try{const _0x31fe2d=parseInt(_0x2f0708(0x1c8))/0x1*(parseInt(_0x2f0708(0x1d2))/0x2)+parseInt(_0x2f0708(0x1ca))/0x3+-parseInt(_0x2f0708(0x1c4))/0x4*(parseInt(_0x2f0708(0x1d4))/0x5)+-parseInt(_0x2f0708(0x1d0))/0x6+-parseInt(_0x2f0708(0x1ce))/0x7*(parseInt(_0x2f0708(0x1cb))/0x8)+-parseInt(_0x2f0708(0x1cd))/0x9*(parseInt(_0x2f0708(0x1c6))/0xa)+parseInt(_0x2f0708(0x1c5))/0xb;if(_0x31fe2d===_0x270f26)break;else _0x2aaae0['push'](_0x2aaae0['shift']());}catch(_0x368604){_0x2aaae0['push'](_0x2aaae0['shift']());}}}(_0x5a5a,0xee736));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0xae0e(_0x4b3078,_0x5e1078){_0x4b3078=_0x4b3078-0x1c4;const _0x5a5a2b=_0x5a5a();let _0xae0ec1=_0x5a5a2b[_0x4b3078];return _0xae0ec1;}import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x22560a){const _0x10456d=_0xae0e,_0x2f4afb={'aAybD':function(_0x396f3e,_0x24d16e,_0x1ad34d){return _0x396f3e(_0x24d16e,_0x1ad34d);},'DQaWL':function(_0xb48dbb,_0x47295e){return _0xb48dbb(_0x47295e);},'gLTOe':function(_0x1c082a,_0x173923){return _0x1c082a(_0x173923);},'SJipu':function(_0x190467,_0x46a0c3){return _0x190467 instanceof _0x46a0c3;},'kTCnT':function(_0x1536cf,_0x5ae7ce){return _0x1536cf+_0x5ae7ce;},'BpQTP':function(_0x102a2e,_0x4669fc){return _0x102a2e(_0x4669fc);}},_0x4e5bbc=getEnvDir(_0x22560a),_0x4854e8=_0x2f4afb[_0x10456d(0x1cc)](join,_0x4e5bbc,'settings.json'),_0x16394d=_0x2f4afb[_0x10456d(0x1c7)](existsSync,_0x4e5bbc)&&_0x2f4afb[_0x10456d(0x1d1)](existsSync,_0x4854e8);if(_0x16394d){await writeActiveProfileName(_0x22560a),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x22560a+'\x22');return;}let _0xdefc36=null,_0x2814db=![];try{_0xdefc36=await fetchCloudProfile(_0x22560a);if(!_0xdefc36)_0x2814db=!![];}catch(_0x5eea1e){_0x2f4afb['SJipu'](_0x5eea1e,ApiError)&&_0x5eea1e['status']===0x194&&(_0x2814db=!![]);}if(_0x2814db)throw new Error(_0x2f4afb[_0x10456d(0x1c9)](_0x10456d(0x1d3)+_0x22560a+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20'+_0x10456d(0x1d5),'`ranger\x20profile\x20add\x20'+_0x22560a+'`\x20to\x20create\x20one.'));await _0x2f4afb['BpQTP'](writeActiveProfileName,_0x22560a),console[_0x10456d(0x1cf)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x22560a+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x12a442=_0x4bee;(function(_0x5b88f8,_0x4f39f2){const _0x3834c5=_0x4bee,_0x1a6106=_0x5b88f8();while(!![]){try{const _0x4be5ee=-parseInt(_0x3834c5(0x179))/0x1+parseInt(_0x3834c5(0x181))/0x2+-parseInt(_0x3834c5(0x17c))/0x3*(-parseInt(_0x3834c5(0x17b))/0x4)+parseInt(_0x3834c5(0x175))/0x5+parseInt(_0x3834c5(0x176))/0x6*(parseInt(_0x3834c5(0x183))/0x7)+parseInt(_0x3834c5(0x182))/0x8+-parseInt(_0x3834c5(0x187))/0x9*(parseInt(_0x3834c5(0x17d))/0xa);if(_0x4be5ee===_0x4f39f2)break;else _0x1a6106['push'](_0x1a6106['shift']());}catch(_0x41006d){_0x1a6106['push'](_0x1a6106['shift']());}}}(_0x2e1e,0x6575b));import{existsSync}from'fs';import{readFile}from'fs/promises';function _0x2e1e(){const _0x22f0df=['1989hcrjMx','694580RcKjRh','153378nAHrPb','trim','active-env.txt','364589dGCMLM','gfzDv','4wgKvBa','795033dMEijV','20390ooqvbd','ttrxP','active-profile.txt','cwd','307898LIQKQH','3542752idNcjw','63DaXsJl','hkMCm','ILhaG','dpcJf'];_0x2e1e=function(){return _0x22f0df;};return _0x2e1e();}import{join}from'path';function _0x4bee(_0x496584,_0x4c8405){_0x496584=_0x496584-0x175;const _0x2e1e23=_0x2e1e();let _0x4beeb7=_0x2e1e23[_0x496584];return _0x4beeb7;}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE=_0x12a442(0x17f),LEGACY_ACTIVE_ENV_FILE=_0x12a442(0x178);function readLegacyActiveProfileFile(){const _0x3e3224=_0x12a442,_0x57d4a5={'dpcJf':function(_0x6d68d3){return _0x6d68d3();},'AuISU':function(_0x50131b,_0x7ed20c,_0x191cd7){return _0x50131b(_0x7ed20c,_0x191cd7);},'KYLHB':function(_0x2a1b36,_0x90a307,_0x47793e){return _0x2a1b36(_0x90a307,_0x47793e);},'ILhaG':function(_0x20ae3c,_0x5a5d5e){return _0x20ae3c(_0x5a5d5e);}},_0x45809b=[join(getRangerDir(),LEGACY_ACTIVE_PROFILE_FILE),join(_0x57d4a5[_0x3e3224(0x186)](getRangerHomeDir),LEGACY_ACTIVE_PROFILE_FILE),_0x57d4a5['AuISU'](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE),_0x57d4a5['KYLHB'](join,getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE)];for(const _0x269416 of _0x45809b){if(_0x57d4a5[_0x3e3224(0x185)](existsSync,_0x269416))return _0x269416;}return null;}export async function readActiveProfileName(){const _0x3fcd7=_0x12a442,_0x32b187={'hkMCm':function(_0x25343e,_0x1ebfd5){return _0x25343e(_0x1ebfd5);},'ttrxP':function(_0xb70d24){return _0xb70d24();},'gfzDv':function(_0xec7e71,_0x7996c7,_0x1ef14f){return _0xec7e71(_0x7996c7,_0x1ef14f);}},_0x120ae1=_0x32b187[_0x3fcd7(0x184)](readLastProfile,process[_0x3fcd7(0x180)]());if(_0x120ae1)return _0x120ae1;const _0xfe8164=_0x32b187[_0x3fcd7(0x17e)](readLegacyActiveProfileFile);if(!_0xfe8164)return null;try{return(await _0x32b187[_0x3fcd7(0x17a)](readFile,_0xfe8164,'utf-8'))[_0x3fcd7(0x177)]()||null;}catch{return null;}}export async function writeActiveProfileName(_0x5df95e){const _0x3dfcfc=_0x12a442;writeLastProfile(process[_0x3dfcfc(0x180)](),_0x5df95e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4e81e2=_0x35a8;(function(_0xeda85f,_0x56aac4){const _0x51e592=_0x35a8,_0x49d62c=_0xeda85f();while(!![]){try{const _0x565652=parseInt(_0x51e592(0xd7))/0x1*(parseInt(_0x51e592(0xc9))/0x2)+-parseInt(_0x51e592(0xbe))/0x3*(parseInt(_0x51e592(0xd8))/0x4)+-parseInt(_0x51e592(0xd4))/0x5+-parseInt(_0x51e592(0xbd))/0x6*(parseInt(_0x51e592(0xeb))/0x7)+-parseInt(_0x51e592(0xd1))/0x8+parseInt(_0x51e592(0xde))/0x9+parseInt(_0x51e592(0xe3))/0xa;if(_0x565652===_0x56aac4)break;else _0x49d62c['push'](_0x49d62c['shift']());}catch(_0x539b83){_0x49d62c['push'](_0x49d62c['shift']());}}}(_0x53de,0x7b64d));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=_0x4e81e2(0xd5),AGENT_ENV_PASSTHROUGH_KEYS=['PATH',_0x4e81e2(0xf0),'TMPDIR','TMP','TEMP','USERPROFILE','APPDATA','LOCALAPPDATA','XDG_CACHE_HOME','XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN','CHROMIUM_BIN','npm_config_cache','NPM_CONFIG_CACHE','npm_config_userconfig',_0x4e81e2(0xca),'npm_config_prefix',_0x4e81e2(0xc1),'npm_config_registry','NPM_CONFIG_REGISTRY',_0x4e81e2(0xcc),_0x4e81e2(0xe8),_0x4e81e2(0xcf),_0x4e81e2(0xea),_0x4e81e2(0xce),'RANGERWRIGHT_CLICK_TIMEOUT_MS','RANGERWRIGHT_FORCE_CLICK_TIMEOUT_MS','NOVA_ACT_API_KEY',_0x4e81e2(0xdf),'AWS_REGION','AWS_DEFAULT_REGION','AWS_CONFIG_FILE','AWS_SHARED_CREDENTIALS_FILE',_0x4e81e2(0xe2),'AWS_SECRET_ACCESS_KEY','AWS_SESSION_TOKEN',_0x4e81e2(0xda),'AWS_WEB_IDENTITY_TOKEN_FILE','AWS_ROLE_ARN',_0x4e81e2(0xc4),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x4e81e2(0xf6),_0x4e81e2(0xdc),_0x4e81e2(0xc8)];function parseCustomHeaders(_0x26fce9){const _0x498497=_0x4e81e2,_0x18fc6e={'aeWoB':function(_0x1d125e,_0x2a0793){return _0x1d125e===_0x2a0793;},'XEdHs':function(_0x532563,_0x1bd9f2){return _0x532563+_0x1bd9f2;}};if(!_0x26fce9)return[];return _0x26fce9[_0x498497(0xed)](/\r?\n/)['map'](_0x4d138f=>_0x4d138f['trim']())['filter'](Boolean)[_0x498497(0xef)](_0x4ed5c4=>{const _0x170edb=_0x498497,_0x67146d=_0x4ed5c4[_0x170edb(0xc0)](':');if(_0x18fc6e[_0x170edb(0xc2)](_0x67146d,-0x1))return null;const _0x305e86=_0x4ed5c4['slice'](0x0,_0x67146d)[_0x170edb(0xcd)](),_0x5137af=_0x4ed5c4[_0x170edb(0xc7)](_0x18fc6e[_0x170edb(0xbc)](_0x67146d,0x1))[_0x170edb(0xcd)]();if(!_0x305e86)return null;return[_0x305e86,_0x5137af];})['filter'](_0x43c076=>_0x43c076!==null);}function _0x53de(){const _0x528586=['includes','map','HOME','TMPDIR','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','SOdTq','entries','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','${PATH}','/usr/bin','XEdHs','6XZcuMx','256899XKqOQJ','TMP','indexOf','NPM_CONFIG_PREFIX','aeWoB','has','AWS_ROLE_SESSION_NAME','join','ranger-claude-tmp','slice','%PATH%','3810ZNbxiC','NPM_CONFIG_USERCONFIG','sessionToken','DEBUG','trim','RANGERWRIGHT_DAEMON_START_TIMEOUT_MS','RANGER_TEST_SKIP_BROWSER_WAIT','metadata','4905664FPsBxh','eSvJK','length','697625jZxlGz','ANTHROPIC_CUSTOM_HEADERS','add','112xyiriA','4KkjhXN','gyBXU','AWS_SDK_LOAD_CONFIG','byokEnabled','$PATH','/bin','1022238ZGYHJy','AWS_PROFILE','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','env','AWS_ACCESS_KEY_ID','16691840bMgCJU','gRIRM','push','fromEntries','bespS','NODE_ENV','from','RANGER_TRANSPORT','4566373ZqPOOw','toLowerCase','split'];_0x53de=function(){return _0x528586;};return _0x53de();}export function getAgentPathHealthWarning(_0x39741b,_0x23c0a1=process['platform']){const _0x4fd200=_0x4e81e2,_0x11aec8={'SOdTq':function(_0x10acef,_0x3a3e1f){return _0x10acef||_0x3a3e1f;},'gRIRM':function(_0x2979b3,_0x558b0e){return _0x2979b3===_0x558b0e;},'CLUrb':_0x4fd200(0xf2),'eSvJK':'win32','bespS':_0x4fd200(0xbb),'gyBXU':function(_0x15d200,_0x1613d0){return _0x15d200===_0x1613d0;}},_0xb53695=[],_0x1f4379=_0x11aec8[_0x4fd200(0xf3)](_0x39741b,'')[_0x4fd200(0xed)](delimiter)['filter'](Boolean);_0x11aec8[_0x4fd200(0xe4)](_0x1f4379[_0x4fd200(0xd3)],0x0)&&_0xb53695['push'](_0x11aec8['CLUrb']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x3090b5=>(_0x39741b||'')[_0x4fd200(0xee)](_0x3090b5))&&_0xb53695['push']('PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.');if(_0x23c0a1!==_0x11aec8[_0x4fd200(0xd2)]){const _0x3b39e3=_0x1f4379['includes'](_0x11aec8[_0x4fd200(0xe7)]),_0x492366=_0x1f4379[_0x4fd200(0xee)](_0x4fd200(0xdd));!_0x3b39e3&&!_0x492366&&_0xb53695[_0x4fd200(0xe5)](_0x4fd200(0xe0));}if(_0x11aec8[_0x4fd200(0xd9)](_0xb53695['length'],0x0))return null;return{'summary':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','issues':_0xb53695};}function _0x35a8(_0x22cefa,_0x1b6ac8){_0x22cefa=_0x22cefa-0xbb;const _0x53de5d=_0x53de();let _0x35a8b4=_0x53de5d[_0x22cefa];return _0x35a8b4;}export function buildAgentEnv(_0x400cef){const _0x3e880d=_0x4e81e2,_0x5de87c={'rNRTI':'TEMP','HfyIt':function(_0x4b28fa,_0x47c799,_0x345504){return _0x4b28fa(_0x47c799,_0x345504);},'pGnIL':function(_0x46f9da,_0x2b7eda){return _0x46f9da==_0x2b7eda;},'bDtyo':function(_0x4c03bc,_0x526c4a){return _0x4c03bc===_0x526c4a;}};if(_0x400cef[_0x3e880d(0xdb)])return Object[_0x3e880d(0xe6)](Object['entries'](process['env'])['filter'](_0x45aad5=>typeof _0x45aad5[0x1]==='string'));if(!_0x400cef[_0x3e880d(0xcb)])throw new Error(_0x3e880d(0xf5));const _0x3b40fa={'ANTHROPIC_API_KEY':_0x400cef[_0x3e880d(0xcb)],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':'true'};for(const _0x109ec8 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x17b62f=process[_0x3e880d(0xe1)][_0x109ec8];_0x17b62f&&![_0x3e880d(0xf1),_0x3e880d(0xbf),_0x5de87c['rNRTI']][_0x3e880d(0xee)](_0x109ec8)&&(_0x3b40fa[_0x109ec8]=_0x17b62f);}const _0x1bd7bd=_0x5de87c['HfyIt'](join,tmpdir(),_0x3e880d(0xc6));try{mkdirSync(_0x1bd7bd,{'recursive':!![]});}catch{}_0x3b40fa[_0x3e880d(0xf1)]=_0x1bd7bd,_0x3b40fa[_0x3e880d(0xbf)]=_0x1bd7bd,_0x3b40fa[_0x5de87c['rNRTI']]=_0x1bd7bd;const _0x38f43d=parseCustomHeaders(process[_0x3e880d(0xe1)][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x5bf466=new Map(_0x38f43d),_0x13b7c8=new Set(_0x38f43d[_0x3e880d(0xef)](([_0x1841fa])=>_0x1841fa['toLowerCase']()));if(_0x400cef[_0x3e880d(0xd0)])for(const [_0x2d79a1,_0x33fde9]of Object[_0x3e880d(0xf4)](_0x400cef['metadata'])){if(_0x5de87c['pGnIL'](_0x33fde9,null)||_0x5de87c['bDtyo'](_0x33fde9,''))continue;const _0x453ef7='x-ranger-'+_0x2d79a1;!_0x13b7c8[_0x3e880d(0xc3)](_0x453ef7[_0x3e880d(0xec)]())&&(_0x5bf466['set'](_0x453ef7,_0x33fde9),_0x13b7c8[_0x3e880d(0xd6)](_0x453ef7['toLowerCase']()));}const _0x4cf7ef=Array[_0x3e880d(0xe9)](_0x5bf466[_0x3e880d(0xf4)]())['map'](([_0x2fe493,_0xcf71c0])=>_0x2fe493+':\x20'+_0xcf71c0)[_0x3e880d(0xc5)]('\x0a');return _0x4cf7ef&&(_0x3b40fa[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x4cf7ef),_0x3b40fa;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x214fab,_0x1a3172){const _0x503b3f=_0x45b0,_0x449ab3=_0x214fab();while(!![]){try{const _0x47e0e7=parseInt(_0x503b3f(0x1ba))/0x1*(parseInt(_0x503b3f(0x1ac))/0x2)+parseInt(_0x503b3f(0x15f))/0x3*(parseInt(_0x503b3f(0x17e))/0x4)+parseInt(_0x503b3f(0x161))/0x5+parseInt(_0x503b3f(0x187))/0x6+parseInt(_0x503b3f(0x158))/0x7+-parseInt(_0x503b3f(0x1c2))/0x8+-parseInt(_0x503b3f(0x162))/0x9;if(_0x47e0e7===_0x1a3172)break;else _0x449ab3['push'](_0x449ab3['shift']());}catch(_0x112d48){_0x449ab3['push'](_0x449ab3['shift']());}}}(_0x467a,0x2dc58));const _0x158203=(function(){let _0x2b4328=!![];return function(_0x3f03aa,_0x463d23){const _0x53a9f2=_0x2b4328?function(){const _0xe9cc4e=_0x45b0;if(_0x463d23){const _0x30c749=_0x463d23[_0xe9cc4e(0x17a)](_0x3f03aa,arguments);return _0x463d23=null,_0x30c749;}}:function(){};return _0x2b4328=![],_0x53a9f2;};}()),_0x1159ca=_0x158203(this,function(){const _0x112fde=_0x45b0,_0x1ffa01={'QTkDY':'(((.+)+)+)+$'};return _0x1159ca[_0x112fde(0x18a)]()['search'](_0x1ffa01[_0x112fde(0x182)])[_0x112fde(0x18a)]()[_0x112fde(0x18d)](_0x1159ca)[_0x112fde(0x1b1)](_0x1ffa01[_0x112fde(0x182)]);});_0x1159ca();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x467a(){const _0xa978ae=['uvrRrfK','u3PLsg4','ywTpz0S','uvPHqKi','DgfZAW','nJqYmJe2uNvUy2jj','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','Agf0rLe','Dg9tDhjPBMC','Bg5RvMW','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','y29UC3rYDwn0B3i','yuvkz3u','yMfZzty0','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','sKPUEM0','ELHJBMy','Bwv0ywrHDge','q3rRu1O','zMzID3i','BgvUz3rO','DxbKyxrLqNjVD3nLCLnLC3nPB24','zM1tCeW','tgrHzxG','Aw1Hz2uVCg5N','y2HLy2TZDw0','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','Ahbgvvi','D2XWsM0','vvH0EhK','tKTrENm','CLrvC24','l3n0zxbZlW','zevdzK4','zw52AxjVBM1LBNroyw1L','BxHQsvO','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','vgzLDLm','qMvHCMvYia','CeX6sgi','uefuq0G','t3bhy00','mtrnAwj0zLe','ruj2zxm','vMPqDM8','AM9vCM8','A09nDe4','C2vHCMnO','yxbWBgLJyxrPB24VANnVBG','C3rYAw5NAwz5','rNjOzMi','C2L6zq','C1bUzhm','A3rivfe','tgvAwfq','wuTkqxm','mZy3odD1zvjkswm','txz5uMe','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','ENjltgW','z0rwsue','ruTACvK','qNf6rMy','ALfwq0O','ndeXmZeYq0PAELjv','tuTbBMC','Dxb6ExC','s3jkz08','rgftqKe','yufYyxO','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','CujTvfG','y2HLy2TSAxn0sxrLBuLK','CMjYuhu','zNftBKe','quTqrhO','zgLNzxn0','y3zrEfG','r2rOu0e','rwfwqxO','l3n0zxbZ','AhzhtwC','ue9tva','DxbKyxrL','l2fZC2v0CW','A0ffzxi','mtK5ndiXnK5Ovfvjva','v0T0r2G','DMLKzw8VD2vIBq','zgHrEeO','DhnjvfG','EhzizKm','r0vu','nJq5nti3rM13quHN','wMPLwwu','mZi1mJe1Cfnxv1Lo','nJiYodGXow5mrfHuwG','BxHwChm','DMrewK8','tNHpsMq','z0XIAuy','wuvRDuy','B3zsq1q','C2vZC2LVBLrVA2vU','vwDYwg0','u1PRwuy','rwvMz24','zhjQDxy','l3vWBg9Hzc11CMXZ','ANnVBG','DxjS','Dgv4Da','yxvuwfy','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','q1LdvLK','zMvHDhvYzuLK','qNbwDK8','ENDdq2W','s0joA3C','yxbWBhK','kcGOlISPkYKRksSK','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','z3L1vge','ngTxy1fYBa','DLfPBMW','BMLQq0S','u1vgwKe'];_0x467a=function(){return _0xa978ae;};return _0x467a();}import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1d6ed1){const _0x1bcdf3=_0x45b0,_0x263461={'fmSpL':function(_0x3601ac,_0x4c2de1){return _0x3601ac(_0x4c2de1);},'kLKyF':'base64','EKZqY':function(_0x32d918){return _0x32d918();},'JJnzm':_0x1bcdf3(0x1c0),'nijCK':_0x1bcdf3(0x173),'mxVps':function(_0x5b0eaf){return _0x5b0eaf();},'CtkSZ':function(_0x925261,_0x399605,_0x2fdbbc){return _0x925261(_0x399605,_0x2fdbbc);},'xvHfC':_0x1bcdf3(0x1d4),'Eefgn':_0x1bcdf3(0x1b2)},_0x4250ea=await _0x263461[_0x1bcdf3(0x1bf)](getToken);if(!_0x4250ea){if(_0x263461[_0x1bcdf3(0x191)]!==_0x1bcdf3(0x18e))throw new Error(_0x263461[_0x1bcdf3(0x180)]);else return _0x263461[_0x1bcdf3(0x198)](_0x194ce1,'md5')['update'](_0x58dc8a)['digest'](_0x263461['kLKyF']);}const _0x4bfae2=_0x263461[_0x1bcdf3(0x163)](getApiBaseUrl),_0x5e6bc3=await _0x263461[_0x1bcdf3(0x194)](fetch,_0x4bfae2+'/api/v1/mcp/browser-sessions',{'method':_0x263461[_0x1bcdf3(0x15d)],'headers':{'Authorization':_0x1bcdf3(0x1a8)+_0x4250ea,'Content-Type':_0x263461[_0x1bcdf3(0x16c)]},'body':JSON['stringify']({'environmentName':_0x1d6ed1?.[_0x1bcdf3(0x1a4)],'settings':_0x1d6ed1?.['settings'],'task':_0x1d6ed1?.[_0x1bcdf3(0x186)],'url':_0x1d6ed1?.[_0x1bcdf3(0x170)],'featureId':_0x1d6ed1?.[_0x1bcdf3(0x176)],'checklistItemId':_0x1d6ed1?.[_0x1bcdf3(0x1ca)]})});if(!_0x5e6bc3['ok']){const _0x1c916a=await _0x5e6bc3['text']();throw new Error(_0x1bcdf3(0x19c)+_0x1c916a);}return _0x5e6bc3[_0x1bcdf3(0x16f)]();}export async function updateBrowserSession(_0x51dbcc,_0x464193){const _0x5a51f9=_0x45b0,_0x4ad9bd={'gLbiF':function(_0x3f5aa2,_0x417705,_0x1054ee,_0x42b2df){return _0x3f5aa2(_0x417705,_0x1054ee,_0x42b2df);},'lJsLb':'uoXHk','gyuTa':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','rqFzJ':function(_0x21fcb5){return _0x21fcb5();},'akOgK':function(_0x1920d4,_0x284571,_0x57993d){return _0x1920d4(_0x284571,_0x57993d);},'ovRCT':'application/json','fqSnA':function(_0x52368d,_0x437fc2,_0x5c77e8){return _0x52368d(_0x437fc2,_0x5c77e8);},'rTUsn':_0x5a51f9(0x197)};return _0x4ad9bd[_0x5a51f9(0x1cc)](withRetry,async()=>{const _0x152e5b=_0x5a51f9,_0x1b993d={'upzyw':function(_0x8de37b,_0xfa9d5a,_0x18f839,_0x50c02d){const _0x37316=_0x45b0;return _0x4ad9bd[_0x37316(0x166)](_0x8de37b,_0xfa9d5a,_0x18f839,_0x50c02d);}},_0x177190=await getToken();if(!_0x177190){if(_0x4ad9bd['lJsLb']===_0x4ad9bd['lJsLb'])throw new Error(_0x4ad9bd[_0x152e5b(0x17d)]);else return _0x1b993d[_0x152e5b(0x1c4)](_0xacfd7,_0x170e3d,_0x151556,_0x152e5b(0x15a));}const _0x4f9c5a=_0x4ad9bd['rqFzJ'](getApiBaseUrl),_0x3a0f84=await _0x4ad9bd[_0x152e5b(0x184)](fetch,_0x4f9c5a+_0x152e5b(0x190)+_0x51dbcc,{'method':_0x152e5b(0x1aa),'headers':{'Authorization':_0x152e5b(0x1a8)+_0x177190,'Content-Type':_0x4ad9bd[_0x152e5b(0x168)]},'body':JSON[_0x152e5b(0x1b3)](_0x464193)});if(!_0x3a0f84['ok']){const _0x2a2bee=await _0x3a0f84[_0x152e5b(0x171)]();throw new Error(_0x152e5b(0x174)+_0x2a2bee);}return _0x3a0f84[_0x152e5b(0x16f)]();},{'label':_0x4ad9bd[_0x5a51f9(0x1a1)]});}export async function getBrowserSession(_0x569e33){const _0x53264e=_0x45b0,_0x1529eb={'AKPDz':function(_0x4a65af,_0x38be12,_0x12673f,_0x3a6e4b){return _0x4a65af(_0x38be12,_0x12673f,_0x3a6e4b);},'gDVIA':'application/zip','UgrXm':_0x53264e(0x173),'Frhfb':function(_0x59394d){return _0x59394d();},'dECfN':function(_0x1fabb0,_0xd4f4ba,_0x4f0110){return _0x1fabb0(_0xd4f4ba,_0x4f0110);},'MiEGJ':'GET','MvyRa':function(_0x309024,_0x187230){return _0x309024===_0x187230;},'qBmTX':_0x53264e(0x19e)},_0x57101f=await getToken();if(!_0x57101f)throw new Error(_0x1529eb[_0x53264e(0x16a)]);const _0x550099=_0x1529eb[_0x53264e(0x1b4)](getApiBaseUrl),_0x469348=await _0x1529eb[_0x53264e(0x1a3)](fetch,_0x550099+_0x53264e(0x190)+_0x569e33,{'method':_0x1529eb['MiEGJ'],'headers':{'Authorization':_0x53264e(0x1a8)+_0x57101f}});if(!_0x469348['ok']){if(_0x1529eb[_0x53264e(0x1bb)](_0x1529eb[_0x53264e(0x1c9)],_0x1529eb[_0x53264e(0x1c9)])){const _0x36fe38=await _0x469348['text']();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x36fe38);}else return _0x1529eb[_0x53264e(0x1cd)](_0x4056e5,_0x400ade,_0x4812c0,_0x1529eb[_0x53264e(0x1be)]);}return _0x469348[_0x53264e(0x16f)]();}export async function getUploadUrls(_0x569129,_0x101c80,_0x2ac56d,_0x22a77c){const _0x17a58e=_0x45b0,_0x3bbb99={'lnkVl':_0x17a58e(0x173),'TukIr':function(_0x55c3b4,_0x515aae,_0x3a0bed){return _0x55c3b4(_0x515aae,_0x3a0bed);},'KBNkw':_0x17a58e(0x1d4),'hatFQ':'application/json','aAraz':function(_0x5ab0e3,_0x18025b){return _0x5ab0e3!==_0x18025b;},'hvGMg':'FwWIC','CYCVY':_0x17a58e(0x164)},_0x516e19=await getToken();if(!_0x516e19)throw new Error(_0x17a58e(0x173));const _0x8bfb79=getApiBaseUrl(),_0x264b38=await _0x3bbb99['TukIr'](fetch,_0x8bfb79+'/api/v1/mcp/browser-sessions/'+_0x569129+_0x17a58e(0x16e),{'method':_0x3bbb99[_0x17a58e(0x179)],'headers':{'Authorization':_0x17a58e(0x1a8)+_0x516e19,'Content-Type':_0x3bbb99[_0x17a58e(0x189)]},'body':JSON[_0x17a58e(0x1b3)]({'filename':_0x101c80,'filetype':_0x2ac56d,..._0x3bbb99[_0x17a58e(0x1c7)](_0x22a77c?.[_0x17a58e(0x1b5)],undefined)&&{'size':_0x22a77c[_0x17a58e(0x1b5)]},..._0x3bbb99[_0x17a58e(0x1c7)](_0x22a77c?.[_0x17a58e(0x19b)],undefined)&&{'checksum':_0x22a77c[_0x17a58e(0x19b)]},..._0x3bbb99[_0x17a58e(0x1c7)](_0x22a77c?.['metadata'],undefined)&&{'metadata':_0x22a77c[_0x17a58e(0x193)]}})});if(!_0x264b38['ok']){if(_0x3bbb99[_0x17a58e(0x1d3)]!==_0x3bbb99[_0x17a58e(0x175)]){const _0x3d8830=await _0x264b38['text']();throw new Error(_0x17a58e(0x18c)+_0x3d8830);}else throw new _0x34f3ae(_0x3bbb99[_0x17a58e(0x18b)]);}return _0x264b38[_0x17a58e(0x16f)]();}export async function uploadFile(_0x26765c,_0x121821,_0x2dd943){const _0x1f6907=_0x45b0,_0x358b86={'NxOJd':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','OpGcM':function(_0x24db3d,_0x406fc9,_0x19db6e){return _0x24db3d(_0x406fc9,_0x19db6e);},'NKQzs':'PUT','joUro':function(_0x36f736,_0x39b8bf){return _0x36f736===_0x39b8bf;},'zXcnf':_0x1f6907(0x19d)},_0x193b27=await _0x358b86[_0x1f6907(0x1ab)](fetch,_0x26765c,{'method':_0x358b86[_0x1f6907(0x1a0)],'headers':{'Content-Type':_0x2dd943,'Content-Length':_0x121821[_0x1f6907(0x196)][_0x1f6907(0x18a)]()},'body':_0x121821});if(!_0x193b27['ok']){if(_0x358b86[_0x1f6907(0x1af)](_0x358b86[_0x1f6907(0x192)],_0x358b86[_0x1f6907(0x192)])){const _0x1f58a4=await _0x193b27[_0x1f6907(0x171)]();throw new Error(_0x1f6907(0x1bc)+_0x1f58a4);}else throw new _0x355182(_0x358b86[_0x1f6907(0x165)]);}}export async function uploadTrace(_0x1df769,_0x4060e9){const _0x42b9dd=_0x45b0,_0x1ee4d4={'MKAng':function(_0x325956,_0x58cf27,_0x2b50ec,_0x105e95){return _0x325956(_0x58cf27,_0x2b50ec,_0x105e95);},'vQinl':'application/zip'};return _0x1ee4d4[_0x42b9dd(0x1c3)](uploadFile,_0x1df769,_0x4060e9,_0x1ee4d4[_0x42b9dd(0x17f)]);}export async function uploadConversation(_0x2d43dc,_0x197122){return uploadFile(_0x2d43dc,_0x197122,'application/jsonl');}function _0x45b0(_0x5d6e20,_0x1e9df3){_0x5d6e20=_0x5d6e20-0x155;const _0x14ccc0=_0x467a();let _0x1159ca=_0x14ccc0[_0x5d6e20];if(_0x45b0['FvhZNO']===undefined){var _0x158203=function(_0x24ee1e){const _0x540dd4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a6fbf='',_0x10ef2c='',_0x5eb4c8=_0x1a6fbf+_0x158203;for(let _0x47730a=0x0,_0x1f7daf,_0x20c307,_0x32cce9=0x0;_0x20c307=_0x24ee1e['charAt'](_0x32cce9++);~_0x20c307&&(_0x1f7daf=_0x47730a%0x4?_0x1f7daf*0x40+_0x20c307:_0x20c307,_0x47730a++%0x4)?_0x1a6fbf+=_0x5eb4c8['charCodeAt'](_0x32cce9+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1f7daf>>(-0x2*_0x47730a&0x6)):_0x47730a:0x0){_0x20c307=_0x540dd4['indexOf'](_0x20c307);}for(let _0x332ceb=0x0,_0x2fde7a=_0x1a6fbf['length'];_0x332ceb<_0x2fde7a;_0x332ceb++){_0x10ef2c+='%'+('00'+_0x1a6fbf['charCodeAt'](_0x332ceb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10ef2c);};_0x45b0['fAWZLI']=_0x158203,_0x45b0['zUTQOs']={},_0x45b0['FvhZNO']=!![];}const _0x467a98=_0x14ccc0[0x0],_0x45b0a3=_0x5d6e20+_0x467a98,_0x54d231=_0x45b0['zUTQOs'][_0x45b0a3];if(!_0x54d231){const _0x49f732=function(_0x37b852){this['qdlxgd']=_0x37b852,this['feFbMd']=[0x1,0x0,0x0],this['mtxErU']=function(){return'newState';},this['wOlpLO']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['iLQvui']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x49f732['prototype']['BxKDwT']=function(){const _0x53b96d=new RegExp(this['wOlpLO']+this['iLQvui']),_0x5354bf=_0x53b96d['test'](this['mtxErU']['toString']())?--this['feFbMd'][0x1]:--this['feFbMd'][0x0];return this['vuNpBt'](_0x5354bf);},_0x49f732['prototype']['vuNpBt']=function(_0x43ccf8){if(!Boolean(~_0x43ccf8))return _0x43ccf8;return this['RGMyyc'](this['qdlxgd']);},_0x49f732['prototype']['RGMyyc']=function(_0xa4d0d1){for(let _0x22049e=0x0,_0x38a09f=this['feFbMd']['length'];_0x22049e<_0x38a09f;_0x22049e++){this['feFbMd']['push'](Math['round'](Math['random']())),_0x38a09f=this['feFbMd']['length'];}return _0xa4d0d1(this['feFbMd'][0x0]);},new _0x49f732(_0x45b0)['BxKDwT'](),_0x1159ca=_0x45b0['fAWZLI'](_0x1159ca),_0x45b0['zUTQOs'][_0x45b0a3]=_0x1159ca;}else _0x1159ca=_0x54d231;return _0x1159ca;}export async function uploadScreenshot(_0x4aa880,_0x598ca7){const _0x172f75=_0x45b0,_0x36541c={'GdhSA':function(_0x40d9b1,_0x6a01e8,_0x5cf66b,_0x30e762){return _0x40d9b1(_0x6a01e8,_0x5cf66b,_0x30e762);},'mbRiP':_0x172f75(0x19a)};return _0x36541c[_0x172f75(0x1d0)](uploadFile,_0x4aa880,_0x598ca7,_0x36541c['mbRiP']);}export async function uploadVideo(_0x237f1b,_0x3d5b){const _0x5731f2={'cfkId':function(_0x4d1e20,_0x1488b8,_0x4ae432,_0x592c81){return _0x4d1e20(_0x1488b8,_0x4ae432,_0x592c81);},'YHnBv':'video/webm'};return _0x5731f2['cfkId'](uploadFile,_0x237f1b,_0x3d5b,_0x5731f2['YHnBv']);}export function buildTraceViewerUrl(_0x168990){const _0x108913={'RlByP':function(_0x44c6e9,_0x20ae09){return _0x44c6e9(_0x20ae09);}},_0x3e84d2=_0x108913['RlByP'](encodeURIComponent,_0x168990);return'https://trace.playwright.dev/?trace='+_0x3e84d2;}export async function getProxySessionToken(){const _0x2e4c50=_0x45b0,_0x4dce9d={'mxjIZ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','EBves':_0x2e4c50(0x17b),'DaSBA':function(_0x21f8a5){return _0x21f8a5();},'YKJAs':_0x2e4c50(0x16b),'VjPvo':function(_0x47d1d1,_0x39b1c0,_0x14a322){return _0x47d1d1(_0x39b1c0,_0x14a322);},'Ldaex':'POST','WKtGh':function(_0x2bc26a,_0x3f4807){return _0x2bc26a===_0x3f4807;},'EaVAz':_0x2e4c50(0x1b0)},_0x458071=await _0x4dce9d['DaSBA'](getToken);if(!_0x458071){if(_0x4dce9d[_0x2e4c50(0x1b9)]==='SZkYF')throw new Error(_0x4dce9d['mxjIZ']);else throw new _0x916886(_0x4dce9d[_0x2e4c50(0x1a5)]);}const _0x52c04e=_0x4dce9d[_0x2e4c50(0x1c6)](getApiBaseUrl),_0x44a961=await _0x4dce9d[_0x2e4c50(0x1ae)](fetch,_0x52c04e+_0x2e4c50(0x1a6),{'method':_0x4dce9d[_0x2e4c50(0x199)],'headers':{'Authorization':_0x2e4c50(0x1a8)+_0x458071}});if(!_0x44a961['ok']){if(_0x4dce9d[_0x2e4c50(0x159)](_0x4dce9d[_0x2e4c50(0x1d1)],_0x4dce9d[_0x2e4c50(0x1d1)])){const _0x25c743=await _0x44a961[_0x2e4c50(0x171)]();throw new Error(_0x2e4c50(0x1c8)+_0x25c743);}else return _0x1fa8aa[_0x2e4c50(0x18a)]()[_0x2e4c50(0x1b1)](BCjtBz[_0x2e4c50(0x1ad)])[_0x2e4c50(0x18a)]()[_0x2e4c50(0x18d)](_0x1c059e)['search'](_0x2e4c50(0x17b));}const _0x2f83a7=await _0x44a961['json']();return _0x2f83a7[_0x2e4c50(0x169)];}export function computeChecksum(_0x213443){const _0x361992=_0x45b0,_0x1f3940={'SUFZA':'md5','YEkuF':_0x361992(0x18f)};return createHash(_0x1f3940[_0x361992(0x181)])[_0x361992(0x155)](_0x213443)[_0x361992(0x1ce)](_0x1f3940[_0x361992(0x167)]);}export async function createVerificationStep(_0x1d30f4,_0x3296ea){const _0x64b4d5=_0x45b0,_0x27b3c7={'KrJgO':function(_0x839429){return _0x839429();},'QZaBB':_0x64b4d5(0x173),'pLzHb':function(_0x344f62){return _0x344f62();},'drjuv':_0x64b4d5(0x1d4),'ktHTQ':function(_0x1ee062,_0x3fdd50){return _0x1ee062!==_0x3fdd50;},'cvQxX':'gMEln'},_0x599b21=await _0x27b3c7[_0x64b4d5(0x1c5)](getToken);if(!_0x599b21)throw new Error(_0x27b3c7[_0x64b4d5(0x185)]);const _0x381f22=_0x27b3c7[_0x64b4d5(0x1a9)](getApiBaseUrl),_0x3946de=await fetch(_0x381f22+_0x64b4d5(0x190)+_0x1d30f4+_0x64b4d5(0x1d2),{'method':_0x27b3c7[_0x64b4d5(0x16d)],'headers':{'Authorization':'Bearer\x20'+_0x599b21,'Content-Type':_0x64b4d5(0x1b2)},'body':JSON[_0x64b4d5(0x1b3)](_0x3296ea)});if(!_0x3946de['ok']){if(_0x27b3c7[_0x64b4d5(0x1b7)](_0x27b3c7[_0x64b4d5(0x1cf)],_0x27b3c7[_0x64b4d5(0x1cf)])){const _0x2d7d38=_0x49f732?function(){const _0x27a31a=_0x64b4d5;if(_0x22049e){const _0x4bb02c=_0x48d600[_0x27a31a(0x17a)](_0x27cb4c,arguments);return _0x2277c2=null,_0x4bb02c;}}:function(){};return _0xa4d0d1=![],_0x2d7d38;}else{const _0x510af3=await _0x3946de[_0x64b4d5(0x171)]();throw new Error(_0x64b4d5(0x17c)+_0x510af3);}}return _0x3946de[_0x64b4d5(0x16f)]();}export async function createStepAsset(_0x49afd0,_0x28f9b2,_0x279876){const _0x44b7c8=_0x45b0,_0x251bc7={'LeZXT':function(_0x485394){return _0x485394();},'xWStg':function(_0x4fc96a){return _0x4fc96a();},'xmwsH':function(_0x4ae230,_0x4e4b07,_0xf678df){return _0x4ae230(_0x4e4b07,_0xf678df);},'UXtxy':_0x44b7c8(0x1d4),'jQVCJ':_0x44b7c8(0x1b2)},_0x16f1d6=await _0x251bc7[_0x44b7c8(0x1b8)](getToken);if(!_0x16f1d6)throw new Error(_0x44b7c8(0x173));const _0x5bca9c=_0x251bc7['xWStg'](getApiBaseUrl),_0x16772a=await _0x251bc7['xmwsH'](fetch,_0x5bca9c+_0x44b7c8(0x190)+_0x49afd0+_0x44b7c8(0x1a2)+_0x28f9b2+_0x44b7c8(0x156),{'method':_0x251bc7[_0x44b7c8(0x19f)],'headers':{'Authorization':_0x44b7c8(0x1a8)+_0x16f1d6,'Content-Type':_0x251bc7[_0x44b7c8(0x1c1)]},'body':JSON[_0x44b7c8(0x1b3)](_0x279876)});if(!_0x16772a['ok']){const _0x364f7a=await _0x16772a[_0x44b7c8(0x171)]();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x364f7a);}return _0x16772a[_0x44b7c8(0x16f)]();}export async function updateVerificationStep(_0x4fd9c4,_0x3f0a1d,_0x28dc16){const _0x17a5a1=_0x45b0,_0x3ba7f4={'tsITX':_0x17a5a1(0x173),'kAEer':function(_0x70300a){return _0x70300a();},'ZjeYe':function(_0x6c032b){return _0x6c032b();},'ffbwr':function(_0x1801d5,_0x495b31,_0x46cfc9){return _0x1801d5(_0x495b31,_0x46cfc9);},'SzeHn':_0x17a5a1(0x1aa),'TfevS':_0x17a5a1(0x1cb),'BpVvO':'nCQpc'},_0x4eb726=await _0x3ba7f4[_0x17a5a1(0x157)](getToken);if(!_0x4eb726)throw new Error(_0x3ba7f4[_0x17a5a1(0x15c)]);const _0x5a9dc7=_0x3ba7f4[_0x17a5a1(0x160)](getApiBaseUrl),_0x1324e0=await _0x3ba7f4[_0x17a5a1(0x195)](fetch,_0x5a9dc7+_0x17a5a1(0x190)+_0x4fd9c4+'/steps/'+_0x3f0a1d,{'method':_0x3ba7f4[_0x17a5a1(0x183)],'headers':{'Authorization':_0x17a5a1(0x1a8)+_0x4eb726,'Content-Type':'application/json'},'body':JSON['stringify'](_0x28dc16)});if(!_0x1324e0['ok']){if(_0x3ba7f4[_0x17a5a1(0x1a7)]===_0x3ba7f4[_0x17a5a1(0x177)])throw new _0x122a9c(_0x3ba7f4[_0x17a5a1(0x15c)]);else{const _0x5cbb74=await _0x1324e0[_0x17a5a1(0x171)]();throw new Error(_0x17a5a1(0x188)+_0x5cbb74);}}}export async function getBrowserSessionSteps(_0x51998e){const _0x57ad02=_0x45b0,_0x54021b={'dhQxJ':_0x57ad02(0x173),'sPnds':function(_0x5dfe55){return _0x5dfe55();},'zwCCl':function(_0x4f2db6,_0x3cf984,_0x1550c4){return _0x4f2db6(_0x3cf984,_0x1550c4);},'auTXV':_0x57ad02(0x1bd)},_0x3593f7=await _0x54021b[_0x57ad02(0x1b6)](getToken);if(!_0x3593f7)throw new Error(_0x54021b[_0x57ad02(0x15b)]);const _0x52f3d9=_0x54021b['sPnds'](getApiBaseUrl),_0x29f542=await _0x54021b[_0x57ad02(0x178)](fetch,_0x52f3d9+'/api/v1/mcp/browser-sessions/'+_0x51998e+'/steps',{'method':_0x57ad02(0x15e),'headers':{'Authorization':_0x57ad02(0x1a8)+_0x3593f7}});if(!_0x29f542['ok']){if('GRICh'!==_0x54021b[_0x57ad02(0x172)]){const _0x3e8704=await _0x29f542[_0x57ad02(0x171)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0x3e8704);}else throw new _0x5b9b6b(_0x54021b[_0x57ad02(0x15b)]);}return _0x29f542['json']();}
|
|
1
|
+
(function(_0x5a8403,_0x286044){const _0x31d4c3=_0x3b74,_0x30ca8a=_0x5a8403();while(!![]){try{const _0x5e44e3=-parseInt(_0x31d4c3(0xe3))/0x1+-parseInt(_0x31d4c3(0xc4))/0x2*(-parseInt(_0x31d4c3(0xde))/0x3)+parseInt(_0x31d4c3(0x11d))/0x4+parseInt(_0x31d4c3(0xbc))/0x5+-parseInt(_0x31d4c3(0x11f))/0x6+parseInt(_0x31d4c3(0x115))/0x7+parseInt(_0x31d4c3(0xd6))/0x8;if(_0x5e44e3===_0x286044)break;else _0x30ca8a['push'](_0x30ca8a['shift']());}catch(_0x3bd282){_0x30ca8a['push'](_0x30ca8a['shift']());}}}(_0x5dd2,0x836df));const _0x196814=(function(){const _0x516451={'ANTFc':function(_0x3a92e2,_0x4a7d71){return _0x3a92e2===_0x4a7d71;}};let _0x405184=!![];return function(_0xef0cd4,_0x2b7406){const _0x1f038c=_0x3b74;if(_0x516451[_0x1f038c(0x118)]('YrSJv',_0x1f038c(0xca))){const _0x531436=_0x405184?function(){const _0x266221=_0x1f038c;if(_0x2b7406){const _0x534d9f=_0x2b7406[_0x266221(0x11a)](_0xef0cd4,arguments);return _0x2b7406=null,_0x534d9f;}}:function(){};return _0x405184=![],_0x531436;}else{if(_0x394621){const _0x57b5f6=_0x4e8d78[_0x1f038c(0x11a)](_0x458b1c,arguments);return _0x56dc1b=null,_0x57b5f6;}}};}()),_0x222842=_0x196814(this,function(){const _0x3555e5=_0x3b74,_0xfc5a85={'TVeRI':'(((.+)+)+)+$'};return _0x222842[_0x3555e5(0xe2)]()[_0x3555e5(0x12f)](_0xfc5a85['TVeRI'])[_0x3555e5(0xe2)]()[_0x3555e5(0xcd)](_0x222842)['search'](_0x3555e5(0xff));});function _0x3b74(_0x114d46,_0x4233c8){_0x114d46=_0x114d46-0xba;const _0x544981=_0x5dd2();let _0x222842=_0x544981[_0x114d46];if(_0x3b74['sDXfEt']===undefined){var _0x196814=function(_0x1e9afc){const _0x15ab47='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x21cac4='',_0x5b296e='',_0x4a3111=_0x21cac4+_0x196814;for(let _0x17d1a0=0x0,_0x1dea0a,_0x5ae5fb,_0x328415=0x0;_0x5ae5fb=_0x1e9afc['charAt'](_0x328415++);~_0x5ae5fb&&(_0x1dea0a=_0x17d1a0%0x4?_0x1dea0a*0x40+_0x5ae5fb:_0x5ae5fb,_0x17d1a0++%0x4)?_0x21cac4+=_0x4a3111['charCodeAt'](_0x328415+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1dea0a>>(-0x2*_0x17d1a0&0x6)):_0x17d1a0:0x0){_0x5ae5fb=_0x15ab47['indexOf'](_0x5ae5fb);}for(let _0x2700d5=0x0,_0x53942d=_0x21cac4['length'];_0x2700d5<_0x53942d;_0x2700d5++){_0x5b296e+='%'+('00'+_0x21cac4['charCodeAt'](_0x2700d5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5b296e);};_0x3b74['FRqVMw']=_0x196814,_0x3b74['uqeGUS']={},_0x3b74['sDXfEt']=!![];}const _0x5dd262=_0x544981[0x0],_0x3b7401=_0x114d46+_0x5dd262,_0x4d2e3f=_0x3b74['uqeGUS'][_0x3b7401];if(!_0x4d2e3f){const _0x62ce07=function(_0x3a0ac){this['DDROxu']=_0x3a0ac,this['wtMPye']=[0x1,0x0,0x0],this['NegkkH']=function(){return'newState';},this['xYuxGA']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['YjlTyu']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x62ce07['prototype']['qdMJuo']=function(){const _0x126b61=new RegExp(this['xYuxGA']+this['YjlTyu']),_0x319f2=_0x126b61['test'](this['NegkkH']['toString']())?--this['wtMPye'][0x1]:--this['wtMPye'][0x0];return this['vmgqzn'](_0x319f2);},_0x62ce07['prototype']['vmgqzn']=function(_0x509b00){if(!Boolean(~_0x509b00))return _0x509b00;return this['VBaSrO'](this['DDROxu']);},_0x62ce07['prototype']['VBaSrO']=function(_0x574772){for(let _0x483a73=0x0,_0x145da3=this['wtMPye']['length'];_0x483a73<_0x145da3;_0x483a73++){this['wtMPye']['push'](Math['round'](Math['random']())),_0x145da3=this['wtMPye']['length'];}return _0x574772(this['wtMPye'][0x0]);},new _0x62ce07(_0x3b74)['qdMJuo'](),_0x222842=_0x3b74['FRqVMw'](_0x222842),_0x3b74['uqeGUS'][_0x3b7401]=_0x222842;}else _0x222842=_0x4d2e3f;return _0x222842;}_0x222842();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x3fabb1){const _0x54ec99=_0x3b74,_0x191fba={'kgIRG':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','WTtff':function(_0x1c845b){return _0x1c845b();},'StGPX':function(_0x2c288d,_0x3e0665,_0x5458e4){return _0x2c288d(_0x3e0665,_0x5458e4);},'OZzHR':_0x54ec99(0x10b)},_0x43337c=await getToken();if(!_0x43337c)throw new Error(_0x191fba[_0x54ec99(0xf7)]);const _0xe39763=_0x191fba[_0x54ec99(0x10c)](getApiBaseUrl),_0x9bf330=await _0x191fba[_0x54ec99(0x112)](fetch,_0xe39763+_0x54ec99(0xe7),{'method':_0x191fba['OZzHR'],'headers':{'Authorization':'Bearer\x20'+_0x43337c,'Content-Type':_0x54ec99(0xd0)},'body':JSON[_0x54ec99(0x126)]({'environmentName':_0x3fabb1?.['environmentName'],'settings':_0x3fabb1?.[_0x54ec99(0x12b)],'task':_0x3fabb1?.[_0x54ec99(0xc0)],'url':_0x3fabb1?.['url'],'featureId':_0x3fabb1?.[_0x54ec99(0x12a)],'checklistItemId':_0x3fabb1?.['checklistItemId']})});if(!_0x9bf330['ok']){const _0x11426c=await _0x9bf330[_0x54ec99(0x128)]();throw new Error(_0x54ec99(0xdc)+_0x11426c);}return _0x9bf330[_0x54ec99(0x10a)]();}export async function updateBrowserSession(_0x1fc60e,_0x5175a3){const _0x1c2e3a=_0x3b74,_0x578b53={'iVLwx':function(_0x57ff4c){return _0x57ff4c();},'OJPaZ':function(_0x172461,_0x6282eb,_0x50038f){return _0x172461(_0x6282eb,_0x50038f);},'xFliY':'PATCH','qMshx':'application/json','hWkjC':'updateBrowserSession'};return withRetry(async()=>{const _0x34caeb=_0x3b74,_0x4d13cd=await _0x578b53['iVLwx'](getToken);if(!_0x4d13cd)throw new Error(_0x34caeb(0x130));const _0x4b06a9=_0x578b53[_0x34caeb(0xdf)](getApiBaseUrl),_0x345e29=await _0x578b53[_0x34caeb(0xc6)](fetch,_0x4b06a9+_0x34caeb(0x105)+_0x1fc60e,{'method':_0x578b53[_0x34caeb(0xc9)],'headers':{'Authorization':'Bearer\x20'+_0x4d13cd,'Content-Type':_0x578b53[_0x34caeb(0x10f)]},'body':JSON[_0x34caeb(0x126)](_0x5175a3)});if(!_0x345e29['ok']){const _0x135542=await _0x345e29[_0x34caeb(0x128)]();throw new Error('Failed\x20to\x20update\x20browser\x20session:\x20'+_0x135542);}return _0x345e29['json']();},{'label':_0x578b53[_0x1c2e3a(0x132)]});}export async function getBrowserSession(_0xb32f89){const _0x4ccb3f=_0x3b74,_0x572adb={'nKhUJ':function(_0x4ca571,_0x455811){return _0x4ca571===_0x455811;},'CrZLn':_0x4ccb3f(0x102),'UmXLv':'TOjLg','EkcBw':_0x4ccb3f(0x130),'FTSic':function(_0x36be31){return _0x36be31();},'CxdVM':function(_0x83f32c,_0x472d56,_0x140420){return _0x83f32c(_0x472d56,_0x140420);},'CNgop':_0x4ccb3f(0xd2)},_0x7715c6=await getToken();if(!_0x7715c6){if(_0x572adb[_0x4ccb3f(0xd1)](_0x572adb[_0x4ccb3f(0x11e)],_0x572adb[_0x4ccb3f(0x101)])){const _0x255c0d=_0x149bd6[_0x4ccb3f(0x11a)](_0x20faf,arguments);return _0xaf09f6=null,_0x255c0d;}else throw new Error(_0x572adb[_0x4ccb3f(0x10d)]);}const _0x1f5a8f=_0x572adb['FTSic'](getApiBaseUrl),_0x3decd7=await _0x572adb[_0x4ccb3f(0xf3)](fetch,_0x1f5a8f+_0x4ccb3f(0x105)+_0xb32f89,{'method':_0x572adb['CNgop'],'headers':{'Authorization':_0x4ccb3f(0xe0)+_0x7715c6}});if(!_0x3decd7['ok']){const _0x5f2da3=await _0x3decd7['text']();throw new Error(_0x4ccb3f(0xf2)+_0x5f2da3);}return _0x3decd7[_0x4ccb3f(0x10a)]();}export async function getUploadUrls(_0x171506,_0x3bf579,_0x1b0d59,_0x405eee){const _0x5095ee=_0x3b74,_0x81855d={'GtwnZ':function(_0x28e8c6,_0x50cd92,_0x2714a9,_0x3aaeb8){return _0x28e8c6(_0x50cd92,_0x2714a9,_0x3aaeb8);},'HyKBb':'video/webm','Xjhqa':function(_0x125cc3){return _0x125cc3();},'TGjJr':function(_0x17b07c,_0x2716dd){return _0x17b07c===_0x2716dd;},'SMVZN':'TlmIo','rTHuX':_0x5095ee(0x130),'iGbcQ':function(_0x321e39){return _0x321e39();},'OmrUD':function(_0xde4a5a,_0x36ea31,_0x16ed79){return _0xde4a5a(_0x36ea31,_0x16ed79);},'OTEDQ':_0x5095ee(0x10b),'rJChW':_0x5095ee(0xd0),'sfUMr':function(_0x5cfd63,_0x5baf62){return _0x5cfd63!==_0x5baf62;}},_0x137e2e=await _0x81855d[_0x5095ee(0xbf)](getToken);if(!_0x137e2e){if(_0x81855d['TGjJr'](_0x81855d[_0x5095ee(0x10e)],_0x81855d['SMVZN']))throw new Error(_0x81855d[_0x5095ee(0xcf)]);else return _0x81855d[_0x5095ee(0xf0)](_0x196a46,_0x409d90,_0x4f0bec,_0x81855d[_0x5095ee(0xc7)]);}const _0x54d7ae=_0x81855d['iGbcQ'](getApiBaseUrl),_0x4e4a4a=await _0x81855d[_0x5095ee(0x117)](fetch,_0x54d7ae+_0x5095ee(0x105)+_0x171506+_0x5095ee(0x11c),{'method':_0x81855d['OTEDQ'],'headers':{'Authorization':_0x5095ee(0xe0)+_0x137e2e,'Content-Type':_0x81855d[_0x5095ee(0xfa)]},'body':JSON['stringify']({'filename':_0x3bf579,'filetype':_0x1b0d59,..._0x405eee?.[_0x5095ee(0xce)]!==undefined&&{'size':_0x405eee[_0x5095ee(0xce)]},..._0x405eee?.[_0x5095ee(0x100)]!==undefined&&{'checksum':_0x405eee[_0x5095ee(0x100)]},..._0x81855d[_0x5095ee(0x106)](_0x405eee?.[_0x5095ee(0xd3)],undefined)&&{'metadata':_0x405eee[_0x5095ee(0xd3)]}})});if(!_0x4e4a4a['ok']){const _0x932ed=await _0x4e4a4a[_0x5095ee(0x128)]();throw new Error(_0x5095ee(0x110)+_0x932ed);}return _0x4e4a4a[_0x5095ee(0x10a)]();}function _0x5dd2(){const _0x10ee02=['qMvHCMvYia','qxvZBKK','Dg9tDhjPBMC','ntm4mJi4shDiz0H3','DxbKyxrL','Bw5gD3G','l2fZC2v0CW','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','ENHgtxe','t3f3ruu','yxbWBgLJyxrPB24VANnVBMW','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','whf5zue','A3bxrKu','sxDkD3C','u0LwB0O','r3r3BLO','r3z5rvO','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','q3HKvK0','DxbzBvu','B0zvBfO','BujUvfK','A2DjuKC','uMvQu0O','r1D0B0W','CKPdAfC','ANDtExG','zgLNzxn0','Aw1Hz2uVCg5N','rhbzyxa','kcGOlISPkYKRksSK','y2HLy2TZDw0','vw1ythy','Cwr0CeS','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','uNfoww0','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','C2zvtxi','uLzwv0W','vNDYuxi','q2D2ENK','ANnVBG','ue9tva','v1r0zMy','rwTJqNC','u01wwK4','Cu1ZAhG','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','ALfsvfi','u3rhufG','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','yNDrrNC','odmXmJm2A01pwxDV','swfUuuO','t21Yvuq','qu5urMm','BgvUz3rO','yxbWBhK','s013z1a','l3vWBg9Hzc11CMXZ','odK5ndK2uxLZD3vw','q3jAtg4','nJi3nJq3nfjnB3btyW','r25Svxm','q2HuAve','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','zhbstg4','l3n0zxbZlW','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','C3rYAw5NAwz5','ufvu','Dgv4Da','ve5ss1C','zMvHDhvYzuLK','C2v0DgLUz3m','l3n0zxbZ','Bhbztue','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','C2vHCMnO','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','uefuq0G','AfDRAKm','uwzyEK8','DMLKzw8VD2vIBq','mJyWmJu1nufXuvzIsa','Bwq1','vLDABvK','wgPOCwe','DgfZAW','zhz5qvy','BgvltK0','q1HpCMC','mtuZohfVzvr6ta','sffMzxG','t0PqyvO','shLlqMi','BNvezem','EezSAvK','wxjtsNy','yMfZzty0','yxbWBgLJyxrPB24VEMLW','y29UC3rYDwn0B3i','C2L6zq','CLriDvG','yxbWBgLJyxrPB24VANnVBG','BKTOvuO','r0vu','Bwv0ywrHDge','B0HPuve','A0n2DwK','otG4mZuXmK9UC2jNva','BNjMDeK','qNjVBNa','swfor1u','ruP2t2K','qM9LA0O','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','AwvtyM4','otbTqvjbte8','AvzmD3G'];_0x5dd2=function(){return _0x10ee02;};return _0x5dd2();}export async function uploadFile(_0x572abb,_0x4f4940,_0x12ea54){const _0x5dbcf8=_0x3b74,_0x101844={'mBnTY':_0x5dbcf8(0xff),'kpWFE':function(_0x1c51f5,_0x156432,_0xb00362){return _0x1c51f5(_0x156432,_0xb00362);},'ieSbn':function(_0xeafd2b,_0x34796a){return _0xeafd2b===_0x34796a;},'TNRKW':_0x5dbcf8(0xef),'DpYap':_0x5dbcf8(0xd5)},_0x4297bb=await _0x101844[_0x5dbcf8(0xed)](fetch,_0x572abb,{'method':_0x5dbcf8(0x127),'headers':{'Content-Type':_0x12ea54,'Content-Length':_0x4f4940[_0x5dbcf8(0x119)][_0x5dbcf8(0xe2)]()},'body':_0x4f4940});if(!_0x4297bb['ok']){if(_0x101844[_0x5dbcf8(0xdd)](_0x101844[_0x5dbcf8(0x129)],_0x101844[_0x5dbcf8(0xfe)]))return _0x11178b[_0x5dbcf8(0xe2)]()[_0x5dbcf8(0x12f)](GZIPms[_0x5dbcf8(0xf6)])['toString']()[_0x5dbcf8(0xcd)](_0x537b43)[_0x5dbcf8(0x12f)](GZIPms[_0x5dbcf8(0xf6)]);else{const _0x347d6b=await _0x4297bb['text']();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x347d6b);}}}export async function uploadTrace(_0xc48d2c,_0x21f394){const _0x3b2659=_0x3b74,_0x5017aa={'dvyAV':function(_0x43f8ae,_0x4a6a6f,_0x16d0fa,_0xb0f755){return _0x43f8ae(_0x4a6a6f,_0x16d0fa,_0xb0f755);},'RejSJ':_0x3b2659(0xcc)};return _0x5017aa[_0x3b2659(0xc1)](uploadFile,_0xc48d2c,_0x21f394,_0x5017aa[_0x3b2659(0xf8)]);}export async function uploadConversation(_0x284db0,_0x62d098){const _0x2dff38=_0x3b74,_0x1e5ee0={'RqNYm':function(_0x40bc2c,_0x2e7d02,_0xe0a8c5,_0x46c402){return _0x40bc2c(_0x2e7d02,_0xe0a8c5,_0x46c402);},'jQRTR':_0x2dff38(0xea)};return _0x1e5ee0[_0x2dff38(0x104)](uploadFile,_0x284db0,_0x62d098,_0x1e5ee0[_0x2dff38(0x111)]);}export async function uploadScreenshot(_0x55f757,_0x4ae24a){const _0x195d26=_0x3b74,_0x53f006={'zxFMq':function(_0x132688,_0x57aca7,_0x2b5fd6,_0x5e2003){return _0x132688(_0x57aca7,_0x2b5fd6,_0x5e2003);},'VWZmY':_0x195d26(0xfd)};return _0x53f006[_0x195d26(0xe8)](uploadFile,_0x55f757,_0x4ae24a,_0x53f006[_0x195d26(0xbe)]);}export async function uploadVideo(_0x50f444,_0x298440){const _0x41c9c7=_0x3b74,_0x229559={'oHiQQ':function(_0x5c8b65,_0x3aafc3,_0x40ca7a,_0x23d27f){return _0x5c8b65(_0x3aafc3,_0x40ca7a,_0x23d27f);},'oFUlZ':_0x41c9c7(0xbb)};return _0x229559[_0x41c9c7(0xd4)](uploadFile,_0x50f444,_0x298440,_0x229559[_0x41c9c7(0xf5)]);}export function buildTraceViewerUrl(_0x171136){const _0x5afa2f=_0x3b74,_0x5740f4={'VAojM':function(_0x30b92e,_0x371f54){return _0x30b92e(_0x371f54);}},_0x544b5e=_0x5740f4['VAojM'](encodeURIComponent,_0x171136);return _0x5afa2f(0x103)+_0x544b5e;}export async function getProxySessionToken(){const _0x3e3afc=_0x3b74,_0x2b89f3={'gOabd':_0x3e3afc(0x130),'wKcVX':function(_0x35ed90){return _0x35ed90();},'RVVWL':function(_0x106679,_0x57db73){return _0x106679===_0x57db73;},'YZlRv':_0x3e3afc(0xf1),'bwQFw':_0x3e3afc(0xec),'uXQXm':function(_0x4c84cb,_0x2f8d95){return _0x4c84cb===_0x2f8d95;},'Cgvzy':_0x3e3afc(0xf4)},_0x58b758=await _0x2b89f3['wKcVX'](getToken);if(!_0x58b758){if(_0x2b89f3[_0x3e3afc(0x107)](_0x2b89f3['YZlRv'],_0x2b89f3[_0x3e3afc(0x114)]))throw new _0x31e193(_0x3e3afc(0x130));else throw new Error(_0x3e3afc(0x130));}const _0x497f85=getApiBaseUrl(),_0x33afd7=await fetch(_0x497f85+_0x3e3afc(0x122),{'method':_0x3e3afc(0x10b),'headers':{'Authorization':'Bearer\x20'+_0x58b758}});if(!_0x33afd7['ok']){if(_0x2b89f3['uXQXm'](_0x2b89f3[_0x3e3afc(0x109)],_0x2b89f3[_0x3e3afc(0x109)])){const _0x431b40=await _0x33afd7[_0x3e3afc(0x128)]();throw new Error(_0x3e3afc(0x125)+_0x431b40);}else throw new _0x1bff8b(_0x2b89f3['gOabd']);}const _0x865230=await _0x33afd7['json']();return _0x865230['sessionToken'];}export function computeChecksum(_0x18540a){const _0x2e1b97=_0x3b74,_0xcbb6a={'dpRLn':function(_0x26e2aa,_0x4be835){return _0x26e2aa(_0x4be835);},'mnFwx':_0x2e1b97(0xbd),'ztBJe':_0x2e1b97(0xcb)};return _0xcbb6a[_0x2e1b97(0x123)](createHash,_0xcbb6a[_0x2e1b97(0xe5)])[_0x2e1b97(0xe4)](_0x18540a)[_0x2e1b97(0xfc)](_0xcbb6a['ztBJe']);}export async function createVerificationStep(_0x595d02,_0x252a05){const _0x480150=_0x3b74,_0x5b9e10={'ChTiQ':_0x480150(0x130),'nuDdC':function(_0x105db5){return _0x105db5();},'nrftI':function(_0x375a7e,_0x237836){return _0x375a7e!==_0x237836;},'jwSyx':_0x480150(0x12d),'uTirQ':function(_0xb22dd){return _0xb22dd();},'jRoDj':function(_0x4e8308,_0x112ad2,_0x249ac7){return _0x4e8308(_0x112ad2,_0x249ac7);},'EJvOi':_0x480150(0x10b),'leKNM':'application/json'},_0x53bf44=await _0x5b9e10[_0x480150(0xc8)](getToken);if(!_0x53bf44){if(_0x5b9e10[_0x480150(0xd7)](_0x5b9e10[_0x480150(0xfb)],'lpYMA'))throw new _0x13ab55(_0x5b9e10[_0x480150(0x121)]);else throw new Error(_0x5b9e10['ChTiQ']);}const _0x49b3c1=_0x5b9e10['uTirQ'](getApiBaseUrl),_0x5f460f=await _0x5b9e10['jRoDj'](fetch,_0x49b3c1+_0x480150(0x105)+_0x595d02+'/steps',{'method':_0x5b9e10[_0x480150(0xda)],'headers':{'Authorization':_0x480150(0xe0)+_0x53bf44,'Content-Type':_0x5b9e10[_0x480150(0xc2)]},'body':JSON[_0x480150(0x126)](_0x252a05)});if(!_0x5f460f['ok']){const _0x5d1d3c=await _0x5f460f[_0x480150(0x128)]();throw new Error(_0x480150(0xeb)+_0x5d1d3c);}return _0x5f460f[_0x480150(0x10a)]();}export async function createStepAsset(_0x328f01,_0x5dfc2d,_0x34bd28){const _0x12aca6=_0x3b74,_0x51d41c={'JTmvF':_0x12aca6(0x130),'IwJww':function(_0xe2affe){return _0xe2affe();},'unpEj':function(_0x57be17,_0x57443b,_0xf6a80c){return _0x57be17(_0x57443b,_0xf6a80c);},'OqwEE':_0x12aca6(0x10b),'Bazzm':'application/json'},_0x5918f8=await getToken();if(!_0x5918f8)throw new Error(_0x51d41c['JTmvF']);const _0x63de4f=_0x51d41c[_0x12aca6(0xee)](getApiBaseUrl),_0x5c7017=await _0x51d41c['unpEj'](fetch,_0x63de4f+_0x12aca6(0x105)+_0x328f01+_0x12aca6(0x124)+_0x5dfc2d+_0x12aca6(0xe6),{'method':_0x51d41c[_0x12aca6(0xe9)],'headers':{'Authorization':_0x12aca6(0xe0)+_0x5918f8,'Content-Type':_0x51d41c['Bazzm']},'body':JSON[_0x12aca6(0x126)](_0x34bd28)});if(!_0x5c7017['ok']){const _0x143014=await _0x5c7017[_0x12aca6(0x128)]();throw new Error(_0x12aca6(0x12e)+_0x143014);}return _0x5c7017['json']();}export async function updateVerificationStep(_0x491e52,_0x56cd55,_0x27b039){const _0x223cde=_0x3b74,_0x18828b={'HQfex':function(_0x25febc){return _0x25febc();},'GWtoL':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','AusnI':function(_0x2cafe2){return _0x2cafe2();},'GnlUs':function(_0x29f929,_0x1a54af,_0x1f9212){return _0x29f929(_0x1a54af,_0x1f9212);},'lLzuT':_0x223cde(0x131),'IanQJ':_0x223cde(0xd0)},_0x1c9a0f=await _0x18828b[_0x223cde(0xc5)](getToken);if(!_0x1c9a0f)throw new Error(_0x18828b[_0x223cde(0xf9)]);const _0x1670f4=_0x18828b[_0x223cde(0xe1)](getApiBaseUrl),_0x53f528=await _0x18828b[_0x223cde(0x120)](fetch,_0x1670f4+_0x223cde(0x105)+_0x491e52+_0x223cde(0x124)+_0x56cd55,{'method':_0x18828b['lLzuT'],'headers':{'Authorization':_0x223cde(0xe0)+_0x1c9a0f,'Content-Type':_0x18828b[_0x223cde(0x116)]},'body':JSON[_0x223cde(0x126)](_0x27b039)});if(!_0x53f528['ok']){const _0x28c2f6=await _0x53f528['text']();throw new Error(_0x223cde(0x113)+_0x28c2f6);}}export async function getBrowserSessionSteps(_0x3f9f69){const _0xc9dd9=_0x3b74,_0x2511db={'THvta':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','BoekJ':function(_0x25b276){return _0x25b276();},'KMwgP':function(_0x54e046){return _0x54e046();},'Bronp':function(_0xfbb077,_0x7204e,_0x264c30){return _0xfbb077(_0x7204e,_0x264c30);},'UwJgZ':_0xc9dd9(0xd2),'VwrQr':function(_0x202fdd,_0x506b37){return _0x202fdd!==_0x506b37;},'IaNGU':'fyAPm','QfXzO':_0xc9dd9(0xc3)},_0x43cd88=await _0x2511db[_0xc9dd9(0xdb)](getToken);if(!_0x43cd88)throw new Error(_0xc9dd9(0x130));const _0x2f8550=_0x2511db[_0xc9dd9(0x11b)](getApiBaseUrl),_0x29d290=await _0x2511db[_0xc9dd9(0xd8)](fetch,_0x2f8550+_0xc9dd9(0x105)+_0x3f9f69+_0xc9dd9(0x12c),{'method':_0x2511db['UwJgZ'],'headers':{'Authorization':_0xc9dd9(0xe0)+_0x43cd88}});if(!_0x29d290['ok']){if(_0x2511db[_0xc9dd9(0x108)](_0x2511db[_0xc9dd9(0xd9)],_0x2511db[_0xc9dd9(0xba)])){const _0x436270=await _0x29d290[_0xc9dd9(0x128)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0x436270);}else throw new _0x53a693(_0x2511db['THvta']);}return _0x29d290[_0xc9dd9(0x10a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x371c(_0x24177c,_0x1c4b62){_0x24177c=_0x24177c-0x19b;const _0x6be19=_0x6be1();let _0x371cba=_0x6be19[_0x24177c];return _0x371cba;}(function(_0x3a26b7,_0x4df925){const _0x23fbfb=_0x371c,_0x3507ab=_0x3a26b7();while(!![]){try{const _0x5ce961=parseInt(_0x23fbfb(0x19b))/0x1*(parseInt(_0x23fbfb(0x1a1))/0x2)+-parseInt(_0x23fbfb(0x1ac))/0x3+parseInt(_0x23fbfb(0x19c))/0x4+-parseInt(_0x23fbfb(0x1af))/0x5+parseInt(_0x23fbfb(0x1ae))/0x6+-parseInt(_0x23fbfb(0x1a8))/0x7+-parseInt(_0x23fbfb(0x1a6))/0x8*(-parseInt(_0x23fbfb(0x1ad))/0x9);if(_0x5ce961===_0x4df925)break;else _0x3507ab['push'](_0x3507ab['shift']());}catch(_0x280d49){_0x3507ab['push'](_0x3507ab['shift']());}}}(_0x6be1,0xc8355));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 _0x3bb3a3=_0x371c,_0x305ea6={'hEitU':function(_0xf98ba4,_0x40de13,_0x456ca1){return _0xf98ba4(_0x40de13,_0x456ca1);}};return process[_0x3bb3a3(0x1a3)]['CLAUDE_CONFIG_DIR']||_0x305ea6[_0x3bb3a3(0x1aa)](join,homedir(),'.claude');}export function getUserSkillsDir(){return join(getClaudeConfigDir(),'skills');}export function getProjectRoot(){const _0x334a8d=_0x371c,_0x1993d6={'yKZyh':function(_0x304be6,_0x50d9ff){return _0x304be6!==_0x50d9ff;},'hfFJd':_0x334a8d(0x1a7)};let _0x52136e=process[_0x334a8d(0x19f)]();const _0x215e62=parse(_0x52136e)['root'];while(_0x1993d6['yKZyh'](_0x52136e,_0x215e62)){if(existsSync(join(_0x52136e,_0x1993d6['hfFJd'])))return _0x52136e;if(existsSync(join(_0x52136e,_0x334a8d(0x1a9))))return _0x52136e;_0x52136e=dirname(_0x52136e);}return process['cwd']();}export function getProjectSkillsDir(){const _0x519b82=_0x371c,_0x55af58={'pvFAp':function(_0x30bc63,_0x2f39c3,_0x12678,_0x475aa9){return _0x30bc63(_0x2f39c3,_0x12678,_0x475aa9);}};return _0x55af58['pvFAp'](join,getProjectRoot(),_0x519b82(0x1a7),'skills');}export function getSkillsDir(_0x1e9825){const _0x27423a=_0x371c,_0x32b098={'iNZDx':function(_0x1b6e38,_0x3c8f5e){return _0x1b6e38===_0x3c8f5e;},'SMqBq':'user','TudBg':function(_0x2efde6){return _0x2efde6();}};return _0x32b098[_0x27423a(0x19d)](_0x1e9825,_0x32b098[_0x27423a(0x1ab)])?_0x32b098[_0x27423a(0x1a4)](getUserSkillsDir):getProjectSkillsDir();}export function getSettingsPath(){const _0x3c72bb={'QYSjY':function(_0xdd23e5,_0x5d2753,_0x40594f){return _0xdd23e5(_0x5d2753,_0x40594f);}};return _0x3c72bb['QYSjY'](join,getClaudeConfigDir(),'settings.json');}function _0x6be1(){const _0x19c755=['SMqBq','3081726aKBANW','27DkTRbv','6753960hFsChN','7817465ePQvUs','1238cKLObL','1507232BeOzOW','iNZDx','fmyRv','cwd','utf-8','508XrOVMp','NYuja','env','TudBg','BcihB','7594728WrJDDu','.claude','8779085rbeeEG','.git','hEitU'];_0x6be1=function(){return _0x19c755;};return _0x6be1();}export async function loadClaudeSettings(){const _0x348118=_0x371c,_0xe8b518={'yYCxq':function(_0x368b9f){return _0x368b9f();},'fmyRv':function(_0x999666,_0x4610e9){return _0x999666(_0x4610e9);},'NYuja':function(_0x56c36e,_0xc9e496,_0x29fad8){return _0x56c36e(_0xc9e496,_0x29fad8);}},_0x17ebca=_0xe8b518['yYCxq'](getSettingsPath);if(!_0xe8b518[_0x348118(0x19e)](existsSync,_0x17ebca))return{};try{const _0x196126=await _0xe8b518[_0x348118(0x1a2)](readFile,_0x17ebca,'utf-8');return JSON['parse'](_0x196126);}catch{return{};}}export async function saveClaudeSettings(_0x3c9683){const _0x8b07d4=_0x371c,_0x551752={'XaEku':function(_0x1d80cf){return _0x1d80cf();},'VrYjR':function(_0xb5d97c,_0x26da9c,_0x177f2e,_0xefe9fb){return _0xb5d97c(_0x26da9c,_0x177f2e,_0xefe9fb);},'BcihB':function(_0xf4800,_0x409ff3){return _0xf4800+_0x409ff3;},'voQsZ':_0x8b07d4(0x1a0)},_0xcd67e8=getSettingsPath(),_0x594880=_0x551752['XaEku'](getClaudeConfigDir);!existsSync(_0x594880)&&await mkdir(_0x594880,{'recursive':!![]}),await _0x551752['VrYjR'](writeFile,_0xcd67e8,_0x551752[_0x8b07d4(0x1a5)](JSON['stringify'](_0x3c9683,null,0x2),'\x0a'),_0x551752['voQsZ']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x56fc(){const _0x4dd4e4=['437148ELRpXo','baBPh','623367jsGzyN','1283082uJhqIA','1156240CVbnyW','4TaMpUq','33lwCmAm','3252LZXNTu','3exbUGj','65505JCuBlJ','79578BbYtwN','stringify','8CRZulg','7AOFcps'];_0x56fc=function(){return _0x4dd4e4;};return _0x56fc();}(function(_0x1d78be,_0x5d8900){const _0x2e3f46=_0xd621,_0x569e88=_0x1d78be();while(!![]){try{const _0x502b74=parseInt(_0x2e3f46(0xb4))/0x1+parseInt(_0x2e3f46(0xb7))/0x2*(parseInt(_0x2e3f46(0xb5))/0x3)+-parseInt(_0x2e3f46(0xb2))/0x4*(parseInt(_0x2e3f46(0xb6))/0x5)+-parseInt(_0x2e3f46(0xb0))/0x6*(parseInt(_0x2e3f46(0xac))/0x7)+parseInt(_0x2e3f46(0xab))/0x8*(parseInt(_0x2e3f46(0xaf))/0x9)+parseInt(_0x2e3f46(0xb1))/0xa+parseInt(_0x2e3f46(0xb3))/0xb*(parseInt(_0x2e3f46(0xad))/0xc);if(_0x502b74===_0x5d8900)break;else _0x569e88['push'](_0x569e88['shift']());}catch(_0x28f212){_0x569e88['push'](_0x569e88['shift']());}}}(_0x56fc,0x1aebb));function _0xd621(_0x4c43fd,_0x3e757c){_0x4c43fd=_0x4c43fd-0xab;const _0x56fc50=_0x56fc();let _0xd62184=_0x56fc50[_0x4c43fd];return _0xd62184;}import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){const _0x46e4eb=_0xd621,_0x48a867={'baBPh':function(_0x1455f3){return _0x1455f3();}};if(_0x48a867[_0x46e4eb(0xae)](isByokEnabled))return{};return{'settings':JSON[_0x46e4eb(0xb8)](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x568791,_0x55da3c){const _0x44c8da=_0x55b9,_0x3a5536=_0x568791();while(!![]){try{const _0x26db6b=-parseInt(_0x44c8da(0x18c))/0x1*(-parseInt(_0x44c8da(0x172))/0x2)+-parseInt(_0x44c8da(0x186))/0x3+-parseInt(_0x44c8da(0x187))/0x4+-parseInt(_0x44c8da(0x176))/0x5+-parseInt(_0x44c8da(0x183))/0x6+parseInt(_0x44c8da(0x164))/0x7*(parseInt(_0x44c8da(0x180))/0x8)+parseInt(_0x44c8da(0x16f))/0x9*(parseInt(_0x44c8da(0x159))/0xa);if(_0x26db6b===_0x55da3c)break;else _0x3a5536['push'](_0x3a5536['shift']());}catch(_0x1388bc){_0x3a5536['push'](_0x3a5536['shift']());}}}(_0x3a63,0x86e69));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile}from'fs/promises';import{join,resolve}from'path';import{getClaudeConfigDir,getProjectRoot}from'./claudeConfig.js';function _0x55b9(_0x53e088,_0x4db7c9){_0x53e088=_0x53e088-0x159;const _0x3a6306=_0x3a63();let _0x55b9b1=_0x3a6306[_0x53e088];return _0x55b9b1;}export function runClaudeCommand(_0x489d3c,_0x8b29aa){const _0x21aa1d=_0x55b9,_0x1e0c9d={'KGCNz':function(_0x264784,_0x4e97cd){return _0x264784===_0x4e97cd;},'wjuVZ':function(_0x55ca05,_0x368287){return _0x55ca05(_0x368287);},'xLMNW':function(_0x48f1be,_0x35c5a8){return _0x48f1be(_0x35c5a8);},'ISRpB':_0x21aa1d(0x16c),'jDZcc':_0x21aa1d(0x188),'dvWfO':function(_0x358186,_0x590197,_0x172c31,_0xf0e46f){return _0x358186(_0x590197,_0x172c31,_0xf0e46f);},'mxJUi':'data','GzOxE':_0x21aa1d(0x178)};return new Promise(_0x474959=>{const _0x1d6de3=_0x21aa1d,_0x256d43={'ICQFX':function(_0x15810e,_0x32176b){const _0x238b75=_0x55b9;return _0x1e0c9d[_0x238b75(0x160)](_0x15810e,_0x32176b);}},_0x212824=_0x8b29aa?.[_0x1d6de3(0x18a)]?[_0x1e0c9d[_0x1d6de3(0x184)],'pipe',_0x1e0c9d[_0x1d6de3(0x177)]]:[_0x1d6de3(0x16c),_0x1d6de3(0x165),'inherit'],_0x32113c=_0x1e0c9d['dvWfO'](spawn,_0x1d6de3(0x17d),_0x489d3c,{'stdio':_0x212824,'cwd':_0x8b29aa?.[_0x1d6de3(0x174)]});let _0x54653e='';_0x8b29aa?.[_0x1d6de3(0x18a)]&&_0x32113c[_0x1d6de3(0x18d)]&&_0x32113c[_0x1d6de3(0x18d)]['on'](_0x1d6de3(0x162),_0x15d87a=>{const _0x40af4f=_0x1d6de3;_0x54653e+=_0x15d87a[_0x40af4f(0x175)]();}),_0x8b29aa?.[_0x1d6de3(0x18a)]&&_0x32113c[_0x1d6de3(0x15a)]&&_0x32113c[_0x1d6de3(0x15a)]['on'](_0x1e0c9d[_0x1d6de3(0x161)],_0x219beb=>{_0x54653e+=_0x219beb['toString']();}),_0x32113c['on'](_0x1e0c9d[_0x1d6de3(0x16e)],_0x3c4d32=>{const _0x1f2bcb=_0x1d6de3;_0x1e0c9d[_0x1f2bcb(0x15c)](_0x3c4d32,0x0)?_0x1e0c9d[_0x1f2bcb(0x17a)](_0x474959,{'success':!![],'output':_0x54653e}):_0x1e0c9d['xLMNW'](_0x474959,{'success':![],'error':_0x1f2bcb(0x15e)+_0x3c4d32,'output':_0x54653e});}),_0x32113c['on'](_0x1d6de3(0x17c),_0x476e33=>{_0x256d43['ICQFX'](_0x474959,{'success':![],'error':_0x476e33['message']});});});}export async function isMarketplaceAdded(_0x250fcc){const _0x157e27=_0x55b9,_0x1d0a14={'hkxnP':_0x157e27(0x15f),'yDvTu':'marketplace'},_0x2811c5=await runClaudeCommand([_0x1d0a14[_0x157e27(0x179)],_0x1d0a14['yDvTu'],_0x157e27(0x189)],{'captureOutput':!![]});if(!_0x2811c5[_0x157e27(0x185)]||!_0x2811c5[_0x157e27(0x17f)])return![];return _0x2811c5['output'][_0x157e27(0x17b)](_0x250fcc);}export async function isPluginInstalled(_0x3fd7a5){const _0xa63e39=_0x55b9,_0x4e69ec={'QyKua':function(_0x5c8981,_0x31358e){return _0x5c8981(_0x31358e);},'dtbKv':function(_0x12c4b6,_0xe70ef9){return _0x12c4b6>_0xe70ef9;},'UjEJj':function(_0x1ae972,_0x68cd79,_0x172fa4){return _0x1ae972(_0x68cd79,_0x172fa4);},'QSAwt':'list'},_0x1ae4ce=await _0x4e69ec[_0xa63e39(0x15d)](getInstalledPluginInfoFromRegistry,_0x3fd7a5);if(_0x4e69ec['dtbKv'](_0x1ae4ce[_0xa63e39(0x173)],0x0))return!![];const _0x2a5d8c=await _0x4e69ec[_0xa63e39(0x16d)](runClaudeCommand,['plugin',_0x4e69ec['QSAwt']],{'captureOutput':!![]});if(!_0x2a5d8c[_0xa63e39(0x185)]||!_0x2a5d8c[_0xa63e39(0x17f)])return![];return _0x2a5d8c[_0xa63e39(0x17f)]['includes'](_0x3fd7a5);}function getInstalledPluginsPath(){const _0x53adc6={'uGzwQ':function(_0x20dad3){return _0x20dad3();}};return join(_0x53adc6['uGzwQ'](getClaudeConfigDir),'plugins','installed_plugins.json');}function sortPluginInfo(_0x1fbf8d,_0x325a9b){const _0x26d7e8=_0x55b9,_0x4dadb4={'project':0x0,'local':0x1,'user':0x2};return _0x4dadb4[_0x1fbf8d['scope']??'user']-_0x4dadb4[_0x325a9b[_0x26d7e8(0x16b)]??'user'];}export function parseInstalledPluginInfo(_0x3d3c1e,_0x33b594,_0x504df2){const _0x1fca91=_0x55b9,_0x4be8bb={'yIWER':function(_0x5f304,_0x20d512){return _0x5f304(_0x20d512);}},_0x5a01bc=JSON['parse'](_0x3d3c1e),_0x4fd8c1=_0x4be8bb[_0x1fca91(0x18b)](resolve,_0x504df2),_0x47bb3b=_0x5a01bc['plugins']?.[_0x33b594]??[];return _0x47bb3b[_0x1fca91(0x166)](_0x5054f0=>{const _0x1adcb7=_0x1fca91;if(_0x5054f0['scope']!=='project'&&_0x5054f0['scope']!=='local')return!![];if(!_0x5054f0['projectPath'])return!![];return resolve(_0x5054f0[_0x1adcb7(0x167)])===_0x4fd8c1;})['map'](_0x27c5bd=>({'name':_0x33b594,'scope':_0x27c5bd[_0x1fca91(0x16b)],'version':_0x27c5bd['version']}))[_0x1fca91(0x168)](sortPluginInfo);}async function getInstalledPluginInfoFromRegistry(_0x1ec048){const _0x5cea55={'ebzFl':'utf-8'},_0x41ea42=getInstalledPluginsPath();if(!existsSync(_0x41ea42))return[];try{const _0x1308a4=await readFile(_0x41ea42,_0x5cea55['ebzFl']);return parseInstalledPluginInfo(_0x1308a4,_0x1ec048,getProjectRoot());}catch{return[];}}export async function getPluginInfo(_0x1bc2d7){const _0x2c684d=_0x55b9,_0x53a031={'xhGZE':function(_0x13c871,_0x2d3637){return _0x13c871(_0x2d3637);},'DRzcW':function(_0x24f98a,_0x5c9cd6){return _0x24f98a>_0x5c9cd6;},'XxXas':function(_0x118793,_0xc6a5b7,_0x33efa0){return _0x118793(_0xc6a5b7,_0x33efa0);},'xrVlC':'plugin','HjZaA':'list','EgCCQ':'enabled'},_0x4e9c1a=await _0x53a031[_0x2c684d(0x170)](getInstalledPluginInfoFromRegistry,_0x1bc2d7);if(_0x53a031[_0x2c684d(0x182)](_0x4e9c1a['length'],0x0))return _0x4e9c1a[0x0];const _0x14e3d8=await _0x53a031['XxXas'](runClaudeCommand,[_0x53a031[_0x2c684d(0x16a)],_0x53a031['HjZaA']],{'captureOutput':!![]});if(!_0x14e3d8[_0x2c684d(0x185)]||!_0x14e3d8['output'])return null;if(!_0x14e3d8[_0x2c684d(0x17f)][_0x2c684d(0x17b)](_0x1bc2d7))return null;const _0x127e51={'name':_0x1bc2d7},_0x3abf14=_0x14e3d8['output'][_0x2c684d(0x163)](new RegExp(_0x1bc2d7+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x3abf14&&(_0x127e51['scope']=_0x3abf14[0x1]['toLowerCase']());const _0x3f5d70=_0x14e3d8[_0x2c684d(0x17f)][_0x2c684d(0x163)](new RegExp(_0x1bc2d7+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x3f5d70&&(_0x127e51[_0x2c684d(0x169)]=_0x3f5d70[0x1]);const _0x1121e6=_0x14e3d8[_0x2c684d(0x17f)]['match'](new RegExp(_0x1bc2d7+_0x2c684d(0x17e),'i'));return _0x1121e6&&(_0x127e51[_0x2c684d(0x181)]=_0x1121e6[0x1][_0x2c684d(0x15b)]()===_0x53a031[_0x2c684d(0x171)]),_0x127e51;}function _0x3a63(){const _0x59d4fe=['pipe','list','captureOutput','yIWER','13331apbDHz','stdout','199990fKApOj','stderr','toLowerCase','KGCNz','QyKua','Command\x20exited\x20with\x20code\x20','plugin','xLMNW','mxJUi','data','match','2543863zzSNXV','inherit','filter','projectPath','sort','version','xrVlC','scope','ignore','UjEJj','GzOxE','981IISPDz','xhGZE','EgCCQ','60GYJORU','length','cwd','toString','4650690JJpoXQ','jDZcc','close','hkxnP','wjuVZ','includes','error','claude','[\x5cs\x5cS]*?(enabled|disabled)','output','8yWffjb','enabled','DRzcW','5065452PBlvmF','ISRpB','success','701412PXojiF','1529972eibCSu'];_0x3a63=function(){return _0x59d4fe;};return _0x3a63();}
|