@ranger-testing/ranger-cli 3.0.1-alpha.bb18058-34 → 3.0.1-alpha.c0b290b-36
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 -0
- 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 +3 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x42d75c=_0x3354;(function(_0x5dec07,_0x336af6){const _0xd248d2=_0x3354,_0xd52a89=_0x5dec07();while(!![]){try{const _0x264d24=parseInt(_0xd248d2(0xdb))/0x1*(parseInt(_0xd248d2(0xd6))/0x2)+-parseInt(_0xd248d2(0xba))/0x3*(-parseInt(_0xd248d2(0xda))/0x4)+-parseInt(_0xd248d2(0x101))/0x5+-parseInt(_0xd248d2(0x112))/0x6*(parseInt(_0xd248d2(0xee))/0x7)+-parseInt(_0xd248d2(0x110))/0x8*(parseInt(_0xd248d2(0xc8))/0x9)+-parseInt(_0xd248d2(0x100))/0xa+parseInt(_0xd248d2(0xf1))/0xb;if(_0x264d24===_0x336af6)break;else _0xd52a89['push'](_0xd52a89['shift']());}catch(_0x1659d4){_0xd52a89['push'](_0xd52a89['shift']());}}}(_0x4c74,0x61b55));import{spawn}from'child_process';import{existsSync}from'fs';function _0x4c74(){const _0x3d1710=['ybMXY','npm','QCPYE','UdAOF','--scope','6bjFwVl',').\x20Staying\x20on\x20','scope','.0.0','GDoES','sMmew','\x0aCould\x20not\x20check\x20latest\x20version:\x20','\x20\x20Failed\x20to\x20reinstall\x20','isFinite','unref','warn','Update\x20failed\x20for\x20@','djEru','SjdMv','45hABYTX','beta','PSYvj','some',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','close','eEixi','latest','hLBwI','utf-8','ycWnO','endsWith','MZBFN','plugin','18HYCfxh','\x20channel.','\x0aInstalling\x20','user','142572IIpJmJ','85497YbxYfC','GwVNe','length','\x20—\x20reinstalling\x20@','local','error','push','Could\x20not\x20determine\x20the\x20current\x20major\x20version\x20from\x20\x22','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','Checking\x20for\x20updates...','ranger@trailhead','Prerelease\x20channel\x20detected\x20(@','MUQqV','hDtYV','cwd','opencode','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','BoqSn','1316840gvWQDY','DPXSy','inherit','6491419VxCGgy','cTIyz','Update\x20failed:\x20','claude','lfxKK','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','qFaOk','qCjfJ','AYDND','.gitignore','wEYfX','platform','marketplace','version','\x0a✅\x20Update\x20complete!','1430310aqSyGB','1993845jYMRSP','project','UtNvm','\x0aSuccessfully\x20updated\x20to\x20version\x20','test','stdio','@latest','IZoaD','log','XsGcn','\x22.\x20','TBKKz','QWLEa','trailhead','Latest\x20version:\x20\x20','180216IuEvBx','timeoutMs','12OuZIAI','Update\x20failed.','\x0aCurrent\x20version:\x20','jArvA','\x0aSuccessfully\x20installed\x20latest\x20version.'];_0x4c74=function(){return _0x3d1710;};return _0x4c74();}import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0x3354(_0x1e617b,_0x11c24f){_0x1e617b=_0x1e617b-0xb7;const _0x4c740f=_0x4c74();let _0x3354c1=_0x4c740f[_0x1e617b];return _0x3354c1;}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(_0x4138f2,_0x98aa8d,_0x3b75b8){const _0x1da6e0=_0x3354,_0x1c943b={'sMmew':function(_0x223f7e,_0x478a06){return _0x223f7e(_0x478a06);},'FFlOm':function(_0x7ae453,_0x29d579){return _0x7ae453===_0x29d579;},'itYBf':function(_0x18e91d,_0x4733bb,_0x2ac468,_0x2c7b1a){return _0x18e91d(_0x4733bb,_0x2ac468,_0x2c7b1a);},'aIfUj':_0x1da6e0(0xf0),'Mespu':'close','QWLEa':_0x1da6e0(0xe0)};return new Promise(_0x270925=>{const _0x547de5=_0x1da6e0,_0x13a6b2={'UdAOF':function(_0x6b7bf0,_0x6813ab){return _0x1c943b['FFlOm'](_0x6b7bf0,_0x6813ab);}};let _0x51fc76=![],_0x3064a0;const _0x3350ce=_0x13d75d=>{const _0x13f6df=_0x3354;if(_0x51fc76)return;_0x51fc76=!![],_0x3064a0&&_0x1c943b[_0x13f6df(0xbf)](clearTimeout,_0x3064a0),_0x270925(_0x13d75d);},_0x5138d3=_0x1c943b['itYBf'](spawn,_0x4138f2,_0x98aa8d,{'stdio':['ignore',_0x3b75b8?.[_0x547de5(0x106)]??'inherit',_0x3b75b8?.[_0x547de5(0x106)]??_0x1c943b['aIfUj']],'cwd':_0x3b75b8?.[_0x547de5(0xe9)],'shell':process[_0x547de5(0xfc)]==='win32'});_0x3064a0=_0x3b75b8?.[_0x547de5(0x111)]?setTimeout(()=>{const _0x314284=_0x547de5;_0x5138d3['kill'](),_0x5138d3[_0x314284(0xc3)](),_0x3350ce(![]);},_0x3b75b8[_0x547de5(0x111)]):undefined,_0x5138d3['on'](_0x1c943b['Mespu'],_0x506c00=>{const _0x362978=_0x547de5;_0x3350ce(_0x13a6b2[_0x362978(0xb8)](_0x506c00,0x0));}),_0x5138d3['on'](_0x1c943b[_0x547de5(0x10d)],()=>{const _0x56f341=_0x547de5;_0x1c943b[_0x56f341(0xbf)](_0x3350ce,![]);});});}export function resolveDistTag(_0x1a1f0f){const _0x246d95=_0x3354,_0x5c0ca3={'iogGe':'alpha','LSdeQ':_0x246d95(0xcf)};if(/-alpha\./i[_0x246d95(0x105)](_0x1a1f0f))return _0x5c0ca3['iogGe'];if(/-beta\./i['test'](_0x1a1f0f))return _0x246d95(0xc9);if(/-rc\./i[_0x246d95(0x105)](_0x1a1f0f))return'rc';return _0x5c0ca3['LSdeQ'];}export function resolveInstallTarget(_0x531333){const _0x1c6c85=_0x3354,_0x46a6d1={'SjdMv':function(_0x40e636,_0x2f0bc1,_0x3cb5a6){return _0x40e636(_0x2f0bc1,_0x3cb5a6);}},_0xafbfa2=resolveDistTag(_0x531333);if(_0xafbfa2!=='latest')return _0xafbfa2;const _0x58ccd7=_0x531333['split']('.')[0x0],_0x38bbe6=_0x46a6d1[_0x1c6c85(0xc7)](parseInt,_0x58ccd7,0xa);if(!Number[_0x1c6c85(0xc2)](_0x38bbe6))return _0x1c6c85(0xcf);return'^'+_0x38bbe6+_0x1c6c85(0xbd);}async function runInstall(_0x5275f7){const _0x53ba93=_0x3354,_0x2991cf={'GwVNe':_0x53ba93(0xf0),'vvIZv':'win32','ybMXY':_0x53ba93(0xcd),'ijqtd':_0x53ba93(0xe0),'qFaOk':function(_0x42d1d4,_0x3bdd4a){return _0x42d1d4(_0x3bdd4a);}},_0x48d34f=_0x2991cf[_0x53ba93(0xf7)](resolveInstallTarget,_0x5275f7);return new Promise(_0x7eece1=>{const _0x98d852=_0x53ba93;console[_0x98d852(0x109)](_0x98d852(0xd8)+PACKAGE_NAME+'@'+_0x48d34f+'...\x0a');const _0x3d19ff=spawn(_0x98d852(0x118),['install','-g',PACKAGE_NAME+'@'+_0x48d34f],{'stdio':['ignore',_0x2991cf[_0x98d852(0xdc)],_0x2991cf[_0x98d852(0xdc)]],'shell':process[_0x98d852(0xfc)]===_0x2991cf['vvIZv']});_0x3d19ff['on'](_0x2991cf[_0x98d852(0x117)],_0x583b22=>{_0x7eece1(_0x583b22===0x0);}),_0x3d19ff['on'](_0x2991cf['ijqtd'],()=>{_0x7eece1(![]);});});}async function updateClaudeMarketplace(){const _0x5443e5=_0x3354,_0x2e92d7={'FATxX':function(_0x46d744,_0x3cd84f,_0x2de81e,_0x4982e9){return _0x46d744(_0x3cd84f,_0x2de81e,_0x4982e9);},'NPstY':_0x5443e5(0xf4),'MrkFE':_0x5443e5(0xd5),'tlGKy':_0x5443e5(0xfd),'ycWnO':'update'},_0x347bc7=await _0x2e92d7['FATxX'](runCommand,_0x2e92d7['NPstY'],[_0x2e92d7['MrkFE'],_0x2e92d7['tlGKy'],_0x2e92d7[_0x5443e5(0xd2)],_0x5443e5(0x10e)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x347bc7)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x558069=_0x42d75c(0xd9)){const _0x56b745=_0x42d75c,_0x4fac86={'VHXBG':'plugin','pEpHS':function(_0xda7e7b,_0x24dcf5){return _0xda7e7b!==_0x24dcf5;},'GVfnt':function(_0x5116e5,_0x5144f8,_0xed361a,_0x29f376){return _0x5116e5(_0x5144f8,_0xed361a,_0x29f376);},'PLTVj':_0x56b745(0xf4),'DPXSy':'project','cTIyz':function(_0x529bf3){return _0x529bf3();}},_0x467e98=[_0x4fac86['VHXBG'],'update','ranger@trailhead'];_0x4fac86['pEpHS'](_0x558069,'user')&&_0x467e98[_0x56b745(0xe1)](_0x56b745(0xb9),_0x558069);const _0x144420=await _0x4fac86['GVfnt'](runCommand,_0x4fac86['PLTVj'],_0x467e98,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x558069===_0x4fac86[_0x56b745(0xef)]||_0x558069==='local'?_0x4fac86[_0x56b745(0xf2)](getProjectRoot):undefined});if(!_0x144420)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x558069+_0x56b745(0xe3));}function isSkillInstalled(_0x2700a7,_0x2282eb,_0x106fd6){const _0x2d6d75=_0x42d75c,_0x55da96={'ZesnC':function(_0x3acebf,_0x13173e){return _0x3acebf===_0x13173e;},'MZBFN':function(_0x3c9e86,_0x5f5341){return _0x3c9e86(_0x5f5341);},'AYDND':function(_0x3b33c0,_0x53a632,_0x3b3a21){return _0x3b33c0(_0x53a632,_0x3b3a21);}},_0x103efb=_0x55da96['ZesnC'](_0x106fd6,_0x2d6d75(0xea))?_0x55da96[_0x2d6d75(0xd4)](getOpencodeSkillsDir,_0x2282eb):getSkillsDir(_0x2282eb),_0x1df4ea=_0x55da96[_0x2d6d75(0xf9)](join,_0x103efb,_0x2700a7);return existsSync(_0x1df4ea);}async function reinstallSkills(_0x26201b){const _0x3f0f1e=_0x42d75c,_0x168488={'ihcjw':_0x3f0f1e(0x102),'GDoES':'user','jRAqN':'claude','BoqSn':_0x3f0f1e(0xea),'TBKKz':function(_0x31450c,_0x5d5f40,_0x6b7f4d){return _0x31450c(_0x5d5f40,_0x6b7f4d);},'XhLim':function(_0x44f89e,_0x2a00b9){return _0x44f89e===_0x2a00b9;},'qhaJv':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x18a23f=[_0x168488['ihcjw'],_0x168488[_0x3f0f1e(0xbe)]],_0xe01d26=[];for(const _0x3a5f73 of _0x18a23f){for(const _0x53f89a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x53f89a,_0x3a5f73,_0x168488['jRAqN'])&&_0xe01d26['push']({'skillName':_0x53f89a,'level':_0x3a5f73,'platform':'claude'}),isSkillInstalled(_0x53f89a,_0x3a5f73,_0x168488[_0x3f0f1e(0xed)])&&_0xe01d26[_0x3f0f1e(0xe1)]({'skillName':_0x53f89a,'level':_0x3a5f73,'platform':_0x168488['BoqSn']});}}for(const _0x2c3c56 of _0x18a23f){for(const _0x1bb2f9 of DEPRECATED_SKILLS){await _0x168488[_0x3f0f1e(0x10c)](removeSkill,_0x1bb2f9,_0x2c3c56);}}if(_0x168488['XhLim'](_0xe01d26[_0x3f0f1e(0xdd)],0x0)){console['log'](_0x168488['qhaJv']);return;}console[_0x3f0f1e(0x109)]('\x0aReinstalling\x20'+_0xe01d26[_0x3f0f1e(0xdd)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x21e2a1,level:_0xc8748f,platform:_0x4d4263}of _0xe01d26){try{await installSkill(_0x21e2a1,{'level':_0xc8748f,'cliVersion':_0x26201b,'platform':_0x4d4263});}catch(_0x1c14a1){console[_0x3f0f1e(0xc4)](_0x3f0f1e(0xc1)+_0x4d4263+'\x20'+_0xc8748f+'\x20skill\x20'+_0x21e2a1+':',_0x1c14a1);}}}async function ensureActiveProfileGitignored(){const _0x52ca55=_0x42d75c,_0x4498d1={'amCCb':function(_0x34e892,_0x27c2e6,_0x3df2c7){return _0x34e892(_0x27c2e6,_0x3df2c7);},'jArvA':function(_0x549b0c){return _0x549b0c();},'AjrUz':_0x52ca55(0xfa)},_0x30412a=_0x4498d1['amCCb'](join,_0x4498d1[_0x52ca55(0x115)](getRangerDir),_0x4498d1['AjrUz']);if(!existsSync(_0x30412a))return![];let _0x51d0af='';try{_0x51d0af=await _0x4498d1['amCCb'](readFile,_0x30412a,'utf-8');}catch{return![];}const _0x563b0b=_0x51d0af['split'](/\r?\n/);if(_0x563b0b[_0x52ca55(0xcb)](_0x1f7ab6=>_0x1f7ab6['trim']()==='active-profile.txt'))return![];let _0xd51755=_0x563b0b['findIndex'](_0x1a61e3=>_0x1a61e3['trim']()==='active-feature.txt');_0xd51755===-0x1&&(_0xd51755=_0x563b0b['length']);_0x563b0b['splice'](_0xd51755,0x0,'active-profile.txt');let _0x12921c=_0x563b0b['join']('\x0a');!_0x12921c[_0x52ca55(0xd3)]('\x0a')&&(_0x12921c+='\x0a');try{await writeFile(_0x30412a,_0x12921c,_0x52ca55(0xd1));}catch{return![];}return!![];}export async function update(){const _0x2e80d6=_0x42d75c,_0x1a00d0={'xSYdb':'latest','DcEUP':function(_0x2aa4d3){return _0x2aa4d3();},'dBQzj':function(_0x42dc2a,_0x1ddb7b){return _0x42dc2a(_0x1ddb7b);},'IZoaD':_0x2e80d6(0xff),'MUQqV':function(_0x2e10a3,_0x34aa44,_0x5d6df0){return _0x2e10a3(_0x34aa44,_0x5d6df0);},'eEixi':function(_0x1367bf,_0x3b7e6e){return _0x1367bf+_0x3b7e6e;},'PSYvj':'Attempting\x20install\x20anyway...','QCPYE':function(_0x2b65cd,_0x480149){return _0x2b65cd(_0x480149);},'hDtYV':_0x2e80d6(0x116),'hLBwI':function(_0x3ce90c){return _0x3ce90c();},'lfxKK':function(_0x7f30ce,_0x4cec81){return _0x7f30ce===_0x4cec81;},'UtNvm':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','qCjfJ':_0x2e80d6(0x113),'djEru':function(_0x3897ff,_0x4c8322){return _0x3897ff(_0x4c8322);},'mcXIF':_0x2e80d6(0xe5),'wEYfX':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','OZtWe':_0x2e80d6(0xd9),'XsGcn':function(_0x26bc18,_0x4fd4a9){return _0x26bc18===_0x4fd4a9;},'azIoG':_0x2e80d6(0xec),'vHusC':_0x2e80d6(0xf6)},_0x1518a3=getCurrentVersion();console[_0x2e80d6(0x109)](_0x2e80d6(0x114)+_0x1518a3);const _0x43a370=resolveDistTag(_0x1518a3);if(_0x43a370!==_0x1a00d0['xSYdb']){console['log'](_0x2e80d6(0xe6)+_0x43a370+_0x2e80d6(0xbb)+_0x43a370+_0x2e80d6(0xde)+_0x43a370+'...');const _0x32b8d1=await runInstall(_0x1518a3);if(!_0x32b8d1)throw new Error(_0x2e80d6(0xc5)+_0x43a370+_0x2e80d6(0xd7));const _0x1cc744=_0x1a00d0['DcEUP'](getCurrentVersion);console[_0x2e80d6(0x109)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x43a370+'.'),await _0x1a00d0['dBQzj'](reinstallSkills,_0x1cc744),await ensureActiveProfileGitignored(),console[_0x2e80d6(0x109)](_0x1a00d0['IZoaD']);return;}console[_0x2e80d6(0x109)](_0x2e80d6(0xe4));const _0x541c21=_0x1a00d0[_0x2e80d6(0xe7)](parseInt,_0x1518a3['split']('.')[0x0],0xa);if(!Number[_0x2e80d6(0xc2)](_0x541c21))throw new Error(_0x1a00d0['eEixi'](_0x1a00d0[_0x2e80d6(0xce)](_0x2e80d6(0xe2)+_0x1518a3+_0x2e80d6(0x10b),'Aborting\x20to\x20avoid\x20a\x20cross-major\x20upgrade.\x20Reinstall\x20explicitly\x20with:\x20'),'npm\x20i\x20-g\x20'+PACKAGE_NAME+_0x2e80d6(0x107)));const _0x384155=getLatestVersion(_0x541c21);let _0x4c1c0a=_0x1518a3;if(!_0x384155[_0x2e80d6(0xfe)]){console[_0x2e80d6(0xc4)](_0x2e80d6(0xc0)+_0x384155['error']),console['log'](_0x1a00d0[_0x2e80d6(0xca)]);const _0x53cf01=await _0x1a00d0[_0x2e80d6(0xb7)](runInstall,_0x1518a3);if(_0x53cf01)console['log'](_0x1a00d0[_0x2e80d6(0xe8)]),_0x4c1c0a=_0x1a00d0['hLBwI'](getCurrentVersion);else throw new Error(_0x2e80d6(0xf3)+_0x384155[_0x2e80d6(0xe0)]);}else{const _0x49d5e8=_0x384155[_0x2e80d6(0xfe)];console['log'](_0x2e80d6(0x10f)+_0x49d5e8);const _0x191dac=compareVersions(_0x1518a3,_0x49d5e8);if(_0x1a00d0[_0x2e80d6(0xf5)](_0x191dac,0x0))console[_0x2e80d6(0x109)](_0x1a00d0[_0x2e80d6(0x103)]);else{if(_0x191dac<0x0)console['log']('\x0aYour\x20version\x20('+_0x1518a3+_0x2e80d6(0xcc)+_0x49d5e8+').');else{const _0x1ad584=await runInstall(_0x1518a3);if(_0x1ad584)console[_0x2e80d6(0x109)](_0x2e80d6(0x104)+_0x49d5e8),_0x4c1c0a=_0x49d5e8;else throw new Error(_0x1a00d0[_0x2e80d6(0xf8)]);}}}await reinstallSkills(_0x4c1c0a);const _0x3c0fff=await isMarketplaceAdded('trailhead'),_0x63fb92=await _0x1a00d0[_0x2e80d6(0xc6)](isPluginInstalled,_0x1a00d0['mcXIF']);_0x3c0fff&&(await _0x1a00d0['hLBwI'](updateClaudeMarketplace),console[_0x2e80d6(0x109)](_0x1a00d0[_0x2e80d6(0xfb)]));if(_0x63fb92){const _0x149e79=await getPluginInfo(_0x1a00d0['mcXIF']),_0x46a568=_0x149e79?.[_0x2e80d6(0xbc)]??_0x1a00d0['OZtWe'];await updateClaudePlugin(_0x46a568);if(_0x1a00d0['XsGcn'](_0x46a568,_0x2e80d6(0x102)))console[_0x2e80d6(0x109)](_0x2e80d6(0xeb));else _0x1a00d0[_0x2e80d6(0x10a)](_0x46a568,_0x2e80d6(0xdf))?console['log'](_0x1a00d0['azIoG']):console['log'](_0x1a00d0['vHusC']);}const _0x190938=await _0x1a00d0[_0x2e80d6(0xd0)](ensureActiveProfileGitignored);console[_0x2e80d6(0x109)](_0x1a00d0[_0x2e80d6(0x108)]);}
|
|
1
|
+
const _0x39625f=_0x3183;(function(_0x42c83f,_0x54dedb){const _0x2d3940=_0x3183,_0x450ef6=_0x42c83f();while(!![]){try{const _0x3a305d=parseInt(_0x2d3940(0x15d))/0x1+parseInt(_0x2d3940(0x16e))/0x2+-parseInt(_0x2d3940(0x17c))/0x3*(parseInt(_0x2d3940(0x179))/0x4)+parseInt(_0x2d3940(0x1aa))/0x5+parseInt(_0x2d3940(0x160))/0x6+-parseInt(_0x2d3940(0x177))/0x7*(-parseInt(_0x2d3940(0x178))/0x8)+-parseInt(_0x2d3940(0x175))/0x9;if(_0x3a305d===_0x54dedb)break;else _0x450ef6['push'](_0x450ef6['shift']());}catch(_0x206581){_0x450ef6['push'](_0x450ef6['shift']());}}}(_0x4729,0x7acfd));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';function _0x3183(_0x82dc72,_0x4365b2){_0x82dc72=_0x82dc72-0x151;const _0x4729d2=_0x4729();let _0x318387=_0x4729d2[_0x82dc72];return _0x318387;}import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';function _0x4729(){const _0x2f6fd7=['active-profile.txt','\x20skill\x20','ZUKoh','\x0aReinstalling\x20','\x0aYour\x20version\x20(','NzFJQ','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','ignore','alpha','666928KzKVDl','@latest','amUWa','1168548jlZleO','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','...\x0a','VDxMo','\x0aInstalling\x20','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','user','\x20ranger-managed\x20skill(s)...','AQvQL','EsoSQ','\x0aSuccessfully\x20installed\x20latest\x20version.','update','OFWyW','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','1335762EgiRDE','local','\x20\x20Failed\x20to\x20reinstall\x20','close','BPYES','splice','GQTij','13138650jjgGhB','CRhDq','77welKSh','308848onyxPm','788fXEutd','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','JyasQ','471pCcQGo','OssTP','log','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','YGJDG','ranger@trailhead','IKFBp','push','Attempting\x20install\x20anyway...','zpHVa','Update\x20failed.','Could\x20not\x20determine\x20the\x20current\x20major\x20version\x20from\x20\x22','test','active-feature.txt','fuEYD','fQeXq','GMSKf','timeoutMs','join',').\x20Staying\x20on\x20','kwZnC','claude','length','HsZpi','version','npm','split','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','latest','Prerelease\x20channel\x20detected\x20(@','JiTbm','--scope','inherit','utf-8','gceLS','opencode','error','Ejicz','cnfTt','YABus','plugin','eYgGE','cTZho','stdio','install','mGMJC','197915eoOHIj','project','platform','Update\x20failed:\x20','bPGvr','jnaty'];_0x4729=function(){return _0x2f6fd7;};return _0x4729();}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(_0x37d113,_0x11d698,_0x5d42e1){const _0xf66cce={'bPGvr':function(_0x477a9e,_0x179d6b,_0x23dc8e,_0x2506df){return _0x477a9e(_0x179d6b,_0x23dc8e,_0x2506df);},'GgtJq':'ignore','thBHF':'inherit','dOkYH':function(_0x249700,_0x544d23){return _0x249700===_0x544d23;},'HsZpi':'win32','XnCeg':function(_0x5aa31f,_0x4ffc7e,_0x3c9cd4){return _0x5aa31f(_0x4ffc7e,_0x3c9cd4);}};return new Promise(_0x1671e2=>{const _0x1105a7=_0x3183,_0x257de2={'GMSKf':function(_0x35b5ec,_0x5da7a1){return _0x35b5ec(_0x5da7a1);},'SgzIG':function(_0x349470,_0x42736c){return _0x349470===_0x42736c;}};let _0x2ba25f=![],_0x548bfb;const _0x120269=_0x3789d2=>{if(_0x2ba25f)return;_0x2ba25f=!![],_0x548bfb&&clearTimeout(_0x548bfb),_0x1671e2(_0x3789d2);},_0x3fa899=_0xf66cce[_0x1105a7(0x152)](spawn,_0x37d113,_0x11d698,{'stdio':[_0xf66cce['GgtJq'],_0x5d42e1?.[_0x1105a7(0x1a7)]??_0x1105a7(0x19c),_0x5d42e1?.['stdio']??_0xf66cce['thBHF']],'cwd':_0x5d42e1?.['cwd'],'shell':_0xf66cce['dOkYH'](process[_0x1105a7(0x1ac)],_0xf66cce[_0x1105a7(0x193)])});_0x548bfb=_0x5d42e1?.[_0x1105a7(0x18d)]?_0xf66cce['XnCeg'](setTimeout,()=>{_0x3fa899['kill'](),_0x3fa899['unref'](),_0x120269(![]);},_0x5d42e1['timeoutMs']):undefined,_0x3fa899['on']('close',_0x4bbb2a=>{const _0x164d3a=_0x1105a7;_0x257de2[_0x164d3a(0x18c)](_0x120269,_0x257de2['SgzIG'](_0x4bbb2a,0x0));}),_0x3fa899['on'](_0x1105a7(0x1a0),()=>{_0x120269(![]);});});}export function resolveDistTag(_0x42f252){const _0x3a6a68=_0x3183,_0x5e98f3={'mxNze':_0x3a6a68(0x15c),'zpHVa':'beta'};if(/-alpha\./i[_0x3a6a68(0x188)](_0x42f252))return _0x5e98f3['mxNze'];if(/-beta\./i['test'](_0x42f252))return _0x5e98f3[_0x3a6a68(0x185)];if(/-rc\./i['test'](_0x42f252))return'rc';return _0x3a6a68(0x198);}export function resolveInstallTarget(_0x1752a4){const _0x46ee75=_0x3183,_0x3ac110={'YGJDG':function(_0x312e3a,_0xf578eb){return _0x312e3a!==_0xf578eb;},'hllUW':function(_0x4aaaac,_0x26d93e,_0x290d9f){return _0x4aaaac(_0x26d93e,_0x290d9f);},'hKFiJ':'latest'},_0x1e2119=resolveDistTag(_0x1752a4);if(_0x3ac110[_0x46ee75(0x180)](_0x1e2119,'latest'))return _0x1e2119;const _0x56c179=_0x1752a4[_0x46ee75(0x196)]('.')[0x0],_0x3432cf=_0x3ac110['hllUW'](parseInt,_0x56c179,0xa);if(!Number['isFinite'](_0x3432cf))return _0x3ac110['hKFiJ'];return'^'+_0x3432cf+'.0.0';}async function runInstall(_0x3220cc){const _0x254638=_0x3183,_0x1fac56={'Ejicz':function(_0x301045,_0x585a70){return _0x301045(_0x585a70);},'VDxMo':_0x254638(0x195),'jnzBh':'inherit','KPnOF':function(_0x212378,_0x3a6867){return _0x212378===_0x3a6867;},'mGMJC':'win32','munot':_0x254638(0x171),'cTZho':'error'},_0x24b80c=_0x1fac56[_0x254638(0x1a1)](resolveInstallTarget,_0x3220cc);return new Promise(_0x294f0e=>{const _0x35f9cf=_0x254638,_0x9bcb8c={'BPYES':function(_0x219516,_0x35e36b){return _0x1fac56['Ejicz'](_0x219516,_0x35e36b);},'osgzK':function(_0x4c86f9,_0x31ba56){return _0x4c86f9===_0x31ba56;}};console['log'](_0x35f9cf(0x164)+PACKAGE_NAME+'@'+_0x24b80c+_0x35f9cf(0x162));const _0x26fd08=spawn(_0x1fac56[_0x35f9cf(0x163)],[_0x35f9cf(0x1a8),'-g',PACKAGE_NAME+'@'+_0x24b80c],{'stdio':[_0x35f9cf(0x15b),_0x1fac56['jnzBh'],_0x1fac56['jnzBh']],'shell':_0x1fac56['KPnOF'](process[_0x35f9cf(0x1ac)],_0x1fac56[_0x35f9cf(0x1a9)])});_0x26fd08['on'](_0x1fac56['munot'],_0x5400a9=>{const _0x48e7d8=_0x35f9cf;_0x9bcb8c[_0x48e7d8(0x172)](_0x294f0e,_0x9bcb8c['osgzK'](_0x5400a9,0x0));}),_0x26fd08['on'](_0x1fac56[_0x35f9cf(0x1a6)],()=>{_0x294f0e(![]);});});}async function updateClaudeMarketplace(){const _0x1ab95b=_0x3183,_0x51b2bf={'eYgGE':function(_0x1c4d34,_0x1eb370,_0x1b0b56,_0x2795c5){return _0x1c4d34(_0x1eb370,_0x1b0b56,_0x2795c5);},'JyasQ':_0x1ab95b(0x16b),'JiTbm':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x28c0da=await _0x51b2bf[_0x1ab95b(0x1a5)](runCommand,'claude',['plugin','marketplace',_0x51b2bf[_0x1ab95b(0x17b)],'trailhead'],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x28c0da)throw new Error(_0x51b2bf[_0x1ab95b(0x19a)]);}async function updateClaudePlugin(_0x1e4db6=_0x39625f(0x166)){const _0x23137d=_0x39625f,_0x367c88={'EsoSQ':_0x23137d(0x1a4),'XARUF':_0x23137d(0x181),'Otmsf':_0x23137d(0x166),'CRhDq':_0x23137d(0x191),'kwZnC':'local'},_0x5ec300=[_0x367c88[_0x23137d(0x169)],_0x23137d(0x16b),_0x367c88['XARUF']];_0x1e4db6!==_0x367c88['Otmsf']&&_0x5ec300[_0x23137d(0x183)](_0x23137d(0x19b),_0x1e4db6);const _0x3f292c=await runCommand(_0x367c88[_0x23137d(0x176)],_0x5ec300,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x1e4db6===_0x23137d(0x1ab)||_0x1e4db6===_0x367c88[_0x23137d(0x190)]?getProjectRoot():undefined});if(!_0x3f292c)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1e4db6+_0x23137d(0x17a));}function isSkillInstalled(_0xf2d1ed,_0x27d390,_0x566c92){const _0x4b811e=_0x39625f,_0x4f2663={'AnUtU':function(_0x467554,_0x1c6cac){return _0x467554===_0x1c6cac;},'IKFBp':_0x4b811e(0x19f),'gceLS':function(_0x4c9aed,_0x8a29ca){return _0x4c9aed(_0x8a29ca);},'OFWyW':function(_0xd22e12,_0x3a0e44){return _0xd22e12(_0x3a0e44);}},_0xb105a=_0x4f2663['AnUtU'](_0x566c92,_0x4f2663[_0x4b811e(0x182)])?_0x4f2663[_0x4b811e(0x19e)](getOpencodeSkillsDir,_0x27d390):_0x4f2663['gceLS'](getSkillsDir,_0x27d390),_0xb01e24=join(_0xb105a,_0xf2d1ed);return _0x4f2663[_0x4b811e(0x16c)](existsSync,_0xb01e24);}async function reinstallSkills(_0x5bfe66){const _0x3324ac=_0x39625f,_0x3e159b={'ERoTn':_0x3324ac(0x1ab),'NiIYp':_0x3324ac(0x166),'rQmSN':_0x3324ac(0x191),'AQvQL':'opencode','fQeXq':function(_0xe2549b,_0x47c60c,_0x2b5732){return _0xe2549b(_0x47c60c,_0x2b5732);},'hCRfG':_0x3324ac(0x197)},_0x315a1a=[_0x3e159b['ERoTn'],_0x3e159b['NiIYp']],_0x426608=[];for(const _0xab321a of _0x315a1a){for(const _0x53ff9f of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x53ff9f,_0xab321a,_0x3e159b['rQmSN'])&&_0x426608[_0x3324ac(0x183)]({'skillName':_0x53ff9f,'level':_0xab321a,'platform':_0x3324ac(0x191)}),isSkillInstalled(_0x53ff9f,_0xab321a,'opencode')&&_0x426608['push']({'skillName':_0x53ff9f,'level':_0xab321a,'platform':_0x3e159b[_0x3324ac(0x168)]});}}for(const _0x37d740 of _0x315a1a){for(const _0x3d5d4c of DEPRECATED_SKILLS){await _0x3e159b[_0x3324ac(0x18b)](removeSkill,_0x3d5d4c,_0x37d740);}}if(_0x426608['length']===0x0){console[_0x3324ac(0x17e)](_0x3e159b['hCRfG']);return;}console['log'](_0x3324ac(0x157)+_0x426608['length']+_0x3324ac(0x167));for(const {skillName:_0x2e3320,level:_0xd714c6,platform:_0x26f8a2}of _0x426608){try{await installSkill(_0x2e3320,{'level':_0xd714c6,'cliVersion':_0x5bfe66,'platform':_0x26f8a2});}catch(_0x29d814){console['warn'](_0x3324ac(0x170)+_0x26f8a2+'\x20'+_0xd714c6+_0x3324ac(0x155)+_0x2e3320+':',_0x29d814);}}}async function ensureActiveProfileGitignored(){const _0xb75354=_0x39625f,_0x25ae80={'AFSCs':function(_0x6103f8,_0x561eb6,_0x41876a){return _0x6103f8(_0x561eb6,_0x41876a);},'zjkmx':function(_0x9ea0fb,_0x175340){return _0x9ea0fb(_0x175340);},'YABus':function(_0x46107d,_0x40e45f,_0x48e2e3){return _0x46107d(_0x40e45f,_0x48e2e3);},'jnaty':function(_0x32bee9,_0x18b651){return _0x32bee9===_0x18b651;},'CwRvt':function(_0x3e41b8,_0x3a9602,_0x3c7c6f,_0x164251){return _0x3e41b8(_0x3a9602,_0x3c7c6f,_0x164251);},'VATqw':_0xb75354(0x19d)},_0x5841cf=_0x25ae80['AFSCs'](join,getRangerDir(),'.gitignore');if(!_0x25ae80['zjkmx'](existsSync,_0x5841cf))return![];let _0x3ad8f2='';try{_0x3ad8f2=await _0x25ae80[_0xb75354(0x1a3)](readFile,_0x5841cf,_0xb75354(0x19d));}catch{return![];}const _0x133dbb=_0x3ad8f2['split'](/\r?\n/);if(_0x133dbb['some'](_0xce7f5f=>_0xce7f5f['trim']()===_0xb75354(0x154)))return![];let _0x5dd47c=_0x133dbb['findIndex'](_0x2bfee5=>_0x2bfee5['trim']()===_0xb75354(0x189));_0x25ae80[_0xb75354(0x153)](_0x5dd47c,-0x1)&&(_0x5dd47c=_0x133dbb[_0xb75354(0x192)]);_0x133dbb[_0xb75354(0x173)](_0x5dd47c,0x0,'active-profile.txt');let _0x7e1145=_0x133dbb[_0xb75354(0x18e)]('\x0a');!_0x7e1145['endsWith']('\x0a')&&(_0x7e1145+='\x0a');try{await _0x25ae80['CwRvt'](writeFile,_0x5841cf,_0x7e1145,_0x25ae80['VATqw']);}catch{return![];}return!![];}export async function update(){const _0x1ba71d=_0x39625f,_0x4796e3={'NzFJQ':function(_0x36a66c){return _0x36a66c();},'GQTij':function(_0x677a1,_0x109e2c){return _0x677a1(_0x109e2c);},'amUWa':function(_0x5cad0e,_0x3ef2b5){return _0x5cad0e!==_0x3ef2b5;},'ZnfGh':function(_0x4ea4c0){return _0x4ea4c0();},'bnKgI':function(_0x100c4a,_0x364b33){return _0x100c4a(_0x364b33);},'OssTP':'\x0a✅\x20Update\x20complete!','bdYGr':'Checking\x20for\x20updates...','qqUuO':_0x1ba71d(0x16a),'cnfTt':function(_0x380bb0){return _0x380bb0();},'RlXEY':_0x1ba71d(0x186),'fuEYD':'trailhead','kECOC':function(_0x17f0ca){return _0x17f0ca();},'FfCNj':_0x1ba71d(0x15a),'ZUKoh':'ranger@trailhead','kCwMu':_0x1ba71d(0x17f)},_0x4ac402=_0x4796e3[_0x1ba71d(0x159)](getCurrentVersion);console[_0x1ba71d(0x17e)]('\x0aCurrent\x20version:\x20'+_0x4ac402);const _0x4205d3=_0x4796e3[_0x1ba71d(0x174)](resolveDistTag,_0x4ac402);if(_0x4796e3[_0x1ba71d(0x15f)](_0x4205d3,'latest')){console[_0x1ba71d(0x17e)](_0x1ba71d(0x199)+_0x4205d3+_0x1ba71d(0x18f)+_0x4205d3+'\x20—\x20reinstalling\x20@'+_0x4205d3+'...');const _0x4b9b85=await runInstall(_0x4ac402);if(!_0x4b9b85)throw new Error('Update\x20failed\x20for\x20@'+_0x4205d3+'\x20channel.');const _0x1b9ecf=_0x4796e3['ZnfGh'](getCurrentVersion);console[_0x1ba71d(0x17e)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x4205d3+'.'),await _0x4796e3['bnKgI'](reinstallSkills,_0x1b9ecf),await _0x4796e3['ZnfGh'](ensureActiveProfileGitignored),console['log'](_0x4796e3['OssTP']);return;}console[_0x1ba71d(0x17e)](_0x4796e3['bdYGr']);const _0x12eaf8=parseInt(_0x4ac402['split']('.')[0x0],0xa);if(!Number['isFinite'](_0x12eaf8))throw new Error(_0x1ba71d(0x187)+_0x4ac402+'\x22.\x20'+'Aborting\x20to\x20avoid\x20a\x20cross-major\x20upgrade.\x20Reinstall\x20explicitly\x20with:\x20'+('npm\x20i\x20-g\x20'+PACKAGE_NAME+_0x1ba71d(0x15e)));const _0x208d6e=getLatestVersion(_0x12eaf8);let _0x8ab5ea=_0x4ac402;if(!_0x208d6e[_0x1ba71d(0x194)]){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x208d6e[_0x1ba71d(0x1a0)]),console[_0x1ba71d(0x17e)](_0x1ba71d(0x184));const _0x4c05c3=await runInstall(_0x4ac402);if(_0x4c05c3)console[_0x1ba71d(0x17e)](_0x4796e3['qqUuO']),_0x8ab5ea=_0x4796e3[_0x1ba71d(0x1a2)](getCurrentVersion);else throw new Error(_0x1ba71d(0x151)+_0x208d6e['error']);}else{const _0x49addd=_0x208d6e['version'];console['log']('Latest\x20version:\x20\x20'+_0x49addd);const _0x2723db=compareVersions(_0x4ac402,_0x49addd);if(_0x2723db===0x0)console[_0x1ba71d(0x17e)](_0x1ba71d(0x161));else{if(_0x2723db<0x0)console['log'](_0x1ba71d(0x158)+_0x4ac402+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x49addd+').');else{const _0x5a3909=await runInstall(_0x4ac402);if(_0x5a3909)console[_0x1ba71d(0x17e)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x49addd),_0x8ab5ea=_0x49addd;else throw new Error(_0x4796e3['RlXEY']);}}}await _0x4796e3['GQTij'](reinstallSkills,_0x8ab5ea);const _0x2935ec=await isMarketplaceAdded(_0x4796e3[_0x1ba71d(0x18a)]),_0x4a0287=await isPluginInstalled(_0x1ba71d(0x181));_0x2935ec&&(await _0x4796e3['kECOC'](updateClaudeMarketplace),console['log'](_0x4796e3['FfCNj']));if(_0x4a0287){const _0x2e8210=await getPluginInfo(_0x4796e3[_0x1ba71d(0x156)]),_0x50f85e=_0x2e8210?.['scope']??'user';await updateClaudePlugin(_0x50f85e);if(_0x50f85e==='project')console['log'](_0x1ba71d(0x165));else _0x50f85e===_0x1ba71d(0x16f)?console['log'](_0x4796e3['kCwMu']):console['log'](_0x1ba71d(0x16d));}const _0x4a30db=await ensureActiveProfileGitignored();console[_0x1ba71d(0x17e)](_0x4796e3[_0x1ba71d(0x17d)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48ec3f,_0x4e81a4){const _0xb7fc48=_0x1198,_0x50ed8e=_0x48ec3f();while(!![]){try{const _0x41eec0=-parseInt(_0xb7fc48(0xaf))/0x1+-parseInt(_0xb7fc48(0xaa))/0x2+parseInt(_0xb7fc48(0xcd))/0x3+-parseInt(_0xb7fc48(0xb8))/0x4+parseInt(_0xb7fc48(0xb0))/0x5*(-parseInt(_0xb7fc48(0xb3))/0x6)+-parseInt(_0xb7fc48(0xc5))/0x7+-parseInt(_0xb7fc48(0xc0))/0x8*(-parseInt(_0xb7fc48(0xb9))/0x9);if(_0x41eec0===_0x4e81a4)break;else _0x50ed8e['push'](_0x50ed8e['shift']());}catch(_0x461518){_0x50ed8e['push'](_0x50ed8e['shift']());}}}(_0x31da,0xb2e73));function _0x31da(){const _0x111cd3=['domains','cwd','dGifv','xQNko','1220282aQkgHV','manual','settings','\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','\x22\x20via\x20headed\x20browser...','log','Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','Can\x27t\x20refresh\x20\x22','4267842ryCZKB','TxanX','xjify','NascA','1787686hBJcOo','exit','\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','Capturing\x20a\x20fresh\x20session\x20for\x20\x22','✓\x20Session\x20refreshed\x20for\x20\x22','1074492TpACCy','5RYoEdd','Refreshing\x20session\x20for\x20\x22','status','5649018ArmgrR','\x22\x20via\x20server-side\x20login...','vCrGD','\x20\x20ranger\x20profile\x20add\x20','\x22\x20found.\x0a','3316876HDShMr','252BbbRWP','environmentKey','sDXAr','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','local','catch','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','921016mFpvkN'];_0x31da=function(){return _0x111cd3;};return _0x31da();}import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';function _0x1198(_0x55740a,_0x1b21a8){_0x55740a=_0x55740a-0xa8;const _0x31daa4=_0x31da();let _0x11988a=_0x31daa4[_0x55740a];return _0x11988a;}import{mergeCloudProfileSettings,readProfileOverrides}from'./utils/projectsConfig.js';import{getEnvNames}from'./env.js';export async function updateEnv(_0x4fd4d1,_0x22f08c,_0x191c99){const _0x325f07=_0x1198,_0x5a8db9={'xQNko':function(_0x32e696,_0x5dd53d){return _0x32e696(_0x5dd53d);},'dGifv':function(_0x545b3a,_0x1b1fd4){return _0x545b3a===_0x1b1fd4;},'vCrGD':function(_0x291a12,_0x3bb8f2){return _0x291a12+_0x3bb8f2;},'NascA':function(_0x5a3022){return _0x5a3022();},'TxanX':function(_0x2bcbc9,_0x5464d2,_0x2434fb){return _0x2bcbc9(_0x5464d2,_0x2434fb);},'ccspw':'not_configured','sDXAr':_0x325f07(0xc8),'TuWEw':_0x325f07(0xac),'WLUJk':_0x325f07(0xbc),'RAiNb':function(_0x532e91,_0x10b6a4,_0x1c91e5){return _0x532e91(_0x10b6a4,_0x1c91e5);},'xjify':function(_0x4bbda4,_0x506b5b){return _0x4bbda4??_0x506b5b;},'wDFXy':function(_0x270efd,_0x28a998){return _0x270efd+_0x28a998;}},_0x43795a=await _0x5a8db9[_0x325f07(0xc4)](fetchCloudProfile,_0x4fd4d1);if(!_0x43795a){const {envTypes:_0x17642d}=await getEnvNames(),_0x2ad5a3=_0x17642d[_0x4fd4d1];(_0x2ad5a3==='legacy'||_0x5a8db9[_0x325f07(0xc3)](_0x2ad5a3,_0x325f07(0xbd))||_0x2ad5a3==='ci')&&(console['error'](_0x5a8db9['vCrGD']('Profile\x20\x22'+_0x4fd4d1+_0x325f07(0xbf)+_0x325f07(0xcb),'\x0a')+(_0x325f07(0xb6)+_0x4fd4d1+'\x0a')),process[_0x325f07(0xab)](0x1));}!_0x43795a&&(console['error'](_0x5a8db9[_0x325f07(0xb5)]('No\x20profile\x20named\x20\x22'+_0x4fd4d1+_0x325f07(0xb7),'Create\x20it\x20with:\x0a')+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x4fd4d1+'\x0a')),process[_0x325f07(0xab)](0x1));const _0x4269ee=await _0x5a8db9[_0x325f07(0xa9)](fetchAuthConfig)[_0x325f07(0xbe)](()=>null),_0xb1ba41=_0x43795a['environmentKey']&&_0x4269ee?_0x5a8db9[_0x325f07(0xce)](resolveAuthEnvironmentLocally,_0x4269ee,_0x43795a[_0x325f07(0xba)]):null;if(_0x43795a[_0x325f07(0xba)]&&_0xb1ba41&&!_0x191c99?.[_0x325f07(0xc6)]){console['log'](_0x325f07(0xb1)+_0x4fd4d1+_0x325f07(0xb4));try{const _0xb16a09=await serverSideLogin(_0x4fd4d1,{'force':!![]});if(_0xb16a09['status']==='success'){console['log'](_0x325f07(0xae)+_0x4fd4d1+'\x22.');return;}_0xb16a09[_0x325f07(0xb2)]===_0x5a8db9['ccspw']?console['log'](_0x5a8db9[_0x325f07(0xbb)]):(_0xb16a09['test_output']&&(console[_0x325f07(0xca)](_0x5a8db9['TuWEw']),console[_0x325f07(0xca)](_0xb16a09['test_output'])),console['log']('\x20\x20Falling\x20back\x20to\x20headed\x20browser...'));}catch(_0x234772){console[_0x325f07(0xca)]('\x20\x20Server-side\x20login\x20error:\x20'+(_0x234772 instanceof Error?_0x234772['message']:String(_0x234772))),console[_0x325f07(0xca)](_0x5a8db9['WLUJk']);}}const _0x462bd0=readProfileOverrides(process[_0x325f07(0xc2)](),_0x4fd4d1),_0xc3783e=_0x5a8db9['RAiNb'](mergeCloudProfileSettings,_0x43795a[_0x325f07(0xc7)]??{},_0x5a8db9[_0x325f07(0xa8)](_0x462bd0,undefined)),_0x302420=_0xc3783e['setupHeaders'],_0x62437b=_0xc3783e['baseUrl'],_0xfe8a8=_0xb1ba41?{..._0xb1ba41,'domains':_0x62437b?[_0x62437b,..._0xb1ba41[_0x325f07(0xc1)]]:_0xb1ba41[_0x325f07(0xc1)],'setupHeaders':_0x302420??_0xb1ba41['setupHeaders']}:_0x62437b?{'key':_0x43795a['environmentKey']??'','domains':[_0x62437b],'setupHeaders':_0x302420}:null;!_0xfe8a8&&(console['error'](_0x5a8db9['wDFXy']('Profile\x20\x22'+_0x4fd4d1+'\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a'+'Re-create\x20it\x20with:\x0a'+'\x0a',_0x325f07(0xb6)+_0x4fd4d1+'\x20--url\x20<your-app-url>\x0a')),process[_0x325f07(0xab)](0x1)),!isInteractive()&&(console['error'](_0x325f07(0xcc)+_0x4fd4d1+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a'+('Run\x20`ranger\x20profile\x20update\x20'+_0x4fd4d1+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process[_0x325f07(0xab)](0x1)),console['log'](_0x325f07(0xad)+_0x4fd4d1+_0x325f07(0xc9)),await _0x5a8db9['TxanX'](manualBrowserLogin,_0x43795a,_0xfe8a8),console[_0x325f07(0xca)]('✓\x20Session\x20refreshed\x20for\x20\x22'+_0x4fd4d1+'\x22.');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4622da,_0x5e2ace){const _0x196ccd=_0x36f2,_0x3bac06=_0x4622da();while(!![]){try{const _0x5d4508=parseInt(_0x196ccd(0xdd))/0x1+parseInt(_0x196ccd(0xd9))/0x2*(-parseInt(_0x196ccd(0xea))/0x3)+-parseInt(_0x196ccd(0xdc))/0x4*(-parseInt(_0x196ccd(0xdb))/0x5)+-parseInt(_0x196ccd(0xd7))/0x6*(-parseInt(_0x196ccd(0xdf))/0x7)+parseInt(_0x196ccd(0xe1))/0x8*(parseInt(_0x196ccd(0xe5))/0x9)+parseInt(_0x196ccd(0xe8))/0xa+parseInt(_0x196ccd(0xde))/0xb*(-parseInt(_0x196ccd(0xe7))/0xc);if(_0x5d4508===_0x5e2ace)break;else _0x3bac06['push'](_0x3bac06['shift']());}catch(_0x466887){_0x3bac06['push'](_0x3bac06['shift']());}}}(_0x5b57,0x79356));import{join}from'path';import{existsSync}from'fs';function _0x36f2(_0x118197,_0x16fe25){_0x118197=_0x118197-0xd7;const _0x5b5765=_0x5b57();let _0x36f2f1=_0x5b5765[_0x118197];return _0x36f2f1;}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x5b57(){const _0x1c2077=['2532PUMnil','5062810TOGfFT','RIImU','3Dngbqe','138QQPDLL','`\x20to\x20create\x20one.','422904RJrldT','status','212315zrKfSy','12CgPeiE','138412UCAlQv','97977hRfFYd','275261uNowXT','log','48zcTXVH','glEVs','`ranger\x20profile\x20add\x20','settings.json','1366182HsgjIZ','\x0a✓\x20Now\x20using\x20profile\x20\x22'];_0x5b57=function(){return _0x1c2077;};return _0x5b57();}import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x325c30){const _0x58a3db=_0x36f2,_0x423157={'RIImU':function(_0x4436a0,_0xe26fe){return _0x4436a0(_0xe26fe);},'LtfYk':function(_0x3d6f25,_0x38d6ad,_0xf8a7e){return _0x3d6f25(_0x38d6ad,_0xf8a7e);},'PLKcr':_0x58a3db(0xe4),'glEVs':function(_0x4a2f35,_0x47c3a2){return _0x4a2f35 instanceof _0x47c3a2;}},_0x165735=_0x423157['RIImU'](getEnvDir,_0x325c30),_0x473bfa=_0x423157['LtfYk'](join,_0x165735,_0x423157['PLKcr']),_0x5eda27=existsSync(_0x165735)&&existsSync(_0x473bfa);if(_0x5eda27){await _0x423157[_0x58a3db(0xe9)](writeActiveProfileName,_0x325c30),console[_0x58a3db(0xe0)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x325c30+'\x22');return;}let _0x54c1f1=null,_0x3dcbc8=![];try{_0x54c1f1=await fetchCloudProfile(_0x325c30);if(!_0x54c1f1)_0x3dcbc8=!![];}catch(_0x27e08e){_0x423157[_0x58a3db(0xe2)](_0x27e08e,ApiError)&&_0x27e08e[_0x58a3db(0xda)]===0x194&&(_0x3dcbc8=!![]);}if(_0x3dcbc8)throw new Error('Profile\x20\x22'+_0x325c30+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20'+'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+(_0x58a3db(0xe3)+_0x325c30+_0x58a3db(0xd8)));await _0x423157['RIImU'](writeActiveProfileName,_0x325c30),console[_0x58a3db(0xe0)](_0x58a3db(0xe6)+_0x325c30+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x3067(){const _0x468e72=['10xFqbsl','1028KgsSbo','uylUw','221874ORczBM','1900890kFAGBm','10356uvQWdo','JbtVz','545593ipwsRM','active-env.txt','125zFKcgl','trim','124312zQwIxT','406UBqtxP','cwd','1253601yKuqHG','24910699WeZLLL'];_0x3067=function(){return _0x468e72;};return _0x3067();}function _0x2910(_0x8d00de,_0x4f196b){_0x8d00de=_0x8d00de-0xa5;const _0x306754=_0x3067();let _0x291095=_0x306754[_0x8d00de];return _0x291095;}const _0xea3615=_0x2910;(function(_0x1f31c8,_0x2c3222){const _0x2c6f66=_0x2910,_0x56d496=_0x1f31c8();while(!![]){try{const _0x4c91ff=-parseInt(_0x2c6f66(0xa7))/0x1+parseInt(_0x2c6f66(0xb4))/0x2+-parseInt(_0x2c6f66(0xa5))/0x3*(-parseInt(_0x2c6f66(0xb1))/0x4)+parseInt(_0x2c6f66(0xa9))/0x5*(parseInt(_0x2c6f66(0xb3))/0x6)+-parseInt(_0x2c6f66(0xac))/0x7*(-parseInt(_0x2c6f66(0xab))/0x8)+parseInt(_0x2c6f66(0xae))/0x9*(-parseInt(_0x2c6f66(0xb0))/0xa)+-parseInt(_0x2c6f66(0xaf))/0xb;if(_0x4c91ff===_0x2c3222)break;else _0x56d496['push'](_0x56d496['shift']());}catch(_0x41ae59){_0x56d496['push'](_0x56d496['shift']());}}}(_0x3067,0xae47f));import{existsSync}from'fs';import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0xea3615(0xa8);function readLegacyActiveProfileFile(){const _0x4fbc19=_0xea3615,_0x35750c={'JbtVz':function(_0x11f0ff,_0x20da4d,_0x4f01c4){return _0x11f0ff(_0x20da4d,_0x4f01c4);},'uylUw':function(_0x92a0c1){return _0x92a0c1();},'PZmkF':function(_0x1021b3,_0x293475){return _0x1021b3(_0x293475);}},_0xeb0eb=[_0x35750c[_0x4fbc19(0xa6)](join,_0x35750c['uylUw'](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),_0x35750c[_0x4fbc19(0xa6)](join,getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(_0x35750c['uylUw'](getRangerDir),LEGACY_ACTIVE_ENV_FILE),join(_0x35750c[_0x4fbc19(0xb2)](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x2e8f08 of _0xeb0eb){if(_0x35750c['PZmkF'](existsSync,_0x2e8f08))return _0x2e8f08;}return null;}export async function readActiveProfileName(){const _0x17ed20=_0xea3615,_0x21aa2e=readLastProfile(process[_0x17ed20(0xad)]());if(_0x21aa2e)return _0x21aa2e;const _0x3ebf3f=readLegacyActiveProfileFile();if(!_0x3ebf3f)return null;try{return(await readFile(_0x3ebf3f,'utf-8'))[_0x17ed20(0xaa)]()||null;}catch{return null;}}export async function writeActiveProfileName(_0x27c7f8){const _0x74b170=_0xea3615;writeLastProfile(process[_0x74b170(0xad)](),_0x27c7f8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x95b5cc=_0x11cf;(function(_0x1bf1b8,_0x2ca87e){const _0x490fd3=_0x11cf,_0x2676dd=_0x1bf1b8();while(!![]){try{const _0x1a53f0=-parseInt(_0x490fd3(0xf1))/0x1*(parseInt(_0x490fd3(0xfd))/0x2)+parseInt(_0x490fd3(0x123))/0x3+parseInt(_0x490fd3(0x118))/0x4*(parseInt(_0x490fd3(0x112))/0x5)+-parseInt(_0x490fd3(0x10c))/0x6+parseInt(_0x490fd3(0x10e))/0x7+-parseInt(_0x490fd3(0x100))/0x8*(parseInt(_0x490fd3(0xf4))/0x9)+parseInt(_0x490fd3(0x117))/0xa*(parseInt(_0x490fd3(0x109))/0xb);if(_0x1a53f0===_0x2ca87e)break;else _0x2676dd['push'](_0x2676dd['shift']());}catch(_0x15b461){_0x2676dd['push'](_0x2676dd['shift']());}}}(_0x46da,0xe2a62));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=_0x95b5cc(0xf6),AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME',_0x95b5cc(0xef),_0x95b5cc(0xf5),'TEMP',_0x95b5cc(0x108),_0x95b5cc(0xf9),'LOCALAPPDATA','XDG_CACHE_HOME',_0x95b5cc(0x10f),_0x95b5cc(0x11f),_0x95b5cc(0x106),'CHROME_BIN','CHROMIUM_BIN','npm_config_cache','NPM_CONFIG_CACHE','npm_config_userconfig',_0x95b5cc(0x11a),'npm_config_prefix','NPM_CONFIG_PREFIX',_0x95b5cc(0xff),'NPM_CONFIG_REGISTRY',_0x95b5cc(0x10a),_0x95b5cc(0x11d),_0x95b5cc(0x103),'RANGER_TRANSPORT','RANGERWRIGHT_DAEMON_START_TIMEOUT_MS',_0x95b5cc(0x121),'RANGERWRIGHT_FORCE_CLICK_TIMEOUT_MS','NOVA_ACT_API_KEY',_0x95b5cc(0x120),'AWS_REGION',_0x95b5cc(0xfb),_0x95b5cc(0x105),'AWS_SHARED_CREDENTIALS_FILE','AWS_ACCESS_KEY_ID',_0x95b5cc(0x101),_0x95b5cc(0xf2),'AWS_SDK_LOAD_CONFIG',_0x95b5cc(0xee),'AWS_ROLE_ARN','AWS_ROLE_SESSION_NAME',AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}',_0x95b5cc(0xfa),'%PATH%'];function parseCustomHeaders(_0x250e83){const _0x4f2f0e=_0x95b5cc,_0x4d7035={'kkGht':function(_0x20f57b,_0x2e1bdb){return _0x20f57b===_0x2e1bdb;},'AicxY':function(_0x15fffe,_0x5a5bfe){return _0x15fffe+_0x5a5bfe;}};if(!_0x250e83)return[];return _0x250e83['split'](/\r?\n/)[_0x4f2f0e(0x11c)](_0x4751f3=>_0x4751f3['trim']())[_0x4f2f0e(0x10b)](Boolean)[_0x4f2f0e(0x11c)](_0x44a2c2=>{const _0xc9b021=_0x4f2f0e,_0x52b646=_0x44a2c2['indexOf'](':');if(_0x4d7035['kkGht'](_0x52b646,-0x1))return null;const _0x484b5b=_0x44a2c2['slice'](0x0,_0x52b646)['trim'](),_0x451e28=_0x44a2c2[_0xc9b021(0xf7)](_0x4d7035['AicxY'](_0x52b646,0x1))['trim']();if(!_0x484b5b)return null;return[_0x484b5b,_0x451e28];})['filter'](_0x4a8ec4=>_0x4a8ec4!==null);}export function getAgentPathHealthWarning(_0xa59039,_0x43ac3a=process[_0x95b5cc(0xf0)]){const _0x5458ba=_0x95b5cc,_0x400151={'dTSch':function(_0xf32248,_0x300279){return _0xf32248===_0x300279;},'HDccz':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','QdlJX':_0x5458ba(0x111),'oiAQj':_0x5458ba(0x119)},_0x2f0be6=[],_0x34f88c=(_0xa59039||'')['split'](delimiter)['filter'](Boolean);_0x400151['dTSch'](_0x34f88c['length'],0x0)&&_0x2f0be6[_0x5458ba(0xec)](_0x400151[_0x5458ba(0xfe)]);UNEXPANDED_PATH_TOKEN_PATTERNS[_0x5458ba(0x107)](_0x12fdf9=>(_0xa59039||'')['includes'](_0x12fdf9))&&_0x2f0be6[_0x5458ba(0xec)](_0x400151['QdlJX']);if(_0x43ac3a!=='win32'){const _0x55f704=_0x34f88c[_0x5458ba(0x114)]('/usr/bin'),_0x42e7bf=_0x34f88c['includes'](_0x400151['oiAQj']);!_0x55f704&&!_0x42e7bf&&_0x2f0be6['push']('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x2f0be6['length']===0x0)return null;return{'summary':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','issues':_0x2f0be6};}export function buildAgentEnv(_0x21a874){const _0x2fc313=_0x95b5cc,_0x212ab5={'YfjqI':'TEMP','GbfJN':function(_0x2aacc0){return _0x2aacc0();},'ObXMg':function(_0xabf0c4,_0x32fe59,_0x3359bd){return _0xabf0c4(_0x32fe59,_0x3359bd);},'UTwtH':'TMP','YykiD':function(_0x26bdb2,_0x4e710d){return _0x26bdb2==_0x4e710d;},'Wjnhi':function(_0x3abebf,_0x5c6c75){return _0x3abebf===_0x5c6c75;}};if(_0x21a874['byokEnabled'])return Object['fromEntries'](Object['entries'](process['env'])[_0x2fc313(0x10b)](_0x5ef8b7=>typeof _0x5ef8b7[0x1]===_0x2fc313(0x10d)));if(!_0x21a874[_0x2fc313(0xfc)])throw new Error(_0x2fc313(0x122));const _0x424e77={'ANTHROPIC_API_KEY':_0x21a874['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':'true'};for(const _0x5e8c54 of AGENT_ENV_PASSTHROUGH_KEYS){const _0xd1fac0=process[_0x2fc313(0xf3)][_0x5e8c54];_0xd1fac0&&!['TMPDIR',_0x2fc313(0xf5),_0x212ab5[_0x2fc313(0x11e)]][_0x2fc313(0x114)](_0x5e8c54)&&(_0x424e77[_0x5e8c54]=_0xd1fac0);}const _0x2cf3eb=join(_0x212ab5[_0x2fc313(0x110)](tmpdir),'ranger-claude-tmp');try{_0x212ab5['ObXMg'](mkdirSync,_0x2cf3eb,{'recursive':!![]});}catch{}_0x424e77[_0x2fc313(0xef)]=_0x2cf3eb,_0x424e77[_0x212ab5[_0x2fc313(0x102)]]=_0x2cf3eb,_0x424e77[_0x2fc313(0x113)]=_0x2cf3eb;const _0x5c90ea=parseCustomHeaders(process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x505801=new Map(_0x5c90ea),_0x184d79=new Set(_0x5c90ea[_0x2fc313(0x11c)](([_0x4be5df])=>_0x4be5df['toLowerCase']()));if(_0x21a874[_0x2fc313(0x115)])for(const [_0x40ce1b,_0x2c7eba]of Object['entries'](_0x21a874[_0x2fc313(0x115)])){if(_0x212ab5['YykiD'](_0x2c7eba,null)||_0x212ab5['Wjnhi'](_0x2c7eba,''))continue;const _0x215dc1='x-ranger-'+_0x40ce1b;!_0x184d79[_0x2fc313(0xf8)](_0x215dc1['toLowerCase']())&&(_0x505801[_0x2fc313(0x104)](_0x215dc1,_0x2c7eba),_0x184d79['add'](_0x215dc1[_0x2fc313(0xed)]()));}const _0x108551=Array[_0x2fc313(0x11b)](_0x505801[_0x2fc313(0x116)]())['map'](([_0x2fbb02,_0x1defb6])=>_0x2fbb02+':\x20'+_0x1defb6)['join']('\x0a');return _0x108551&&(_0x424e77[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x108551),_0x424e77;}function _0x11cf(_0x5214a7,_0x4d6d84){_0x5214a7=_0x5214a7-0xec;const _0x46da70=_0x46da();let _0x11cfc6=_0x46da70[_0x5214a7];return _0x11cfc6;}function _0x46da(){const _0x198f95=['APPDATA','$PATH','AWS_DEFAULT_REGION','sessionToken','19622vwTqmy','HDccz','npm_config_registry','14752896gTIIhf','AWS_SECRET_ACCESS_KEY','UTwtH','RANGER_TEST_SKIP_BROWSER_WAIT','set','AWS_CONFIG_FILE','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','some','USERPROFILE','5587241RbuaOH','DEBUG','filter','3026490gmeZAW','string','11970588VomIxB','XDG_CONFIG_HOME','GbfJN','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','27535KfUpZV','TEMP','includes','metadata','entries','10jLmDKg','684cGnABK','/bin','NPM_CONFIG_USERCONFIG','from','map','NODE_ENV','YfjqI','PLAYWRIGHT_BROWSERS_PATH','AWS_PROFILE','RANGERWRIGHT_CLICK_TIMEOUT_MS','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','1028466BXPJyR','push','toLowerCase','AWS_WEB_IDENTITY_TOKEN_FILE','TMPDIR','platform','23TPFMzX','AWS_SESSION_TOKEN','env','9QsHJZQ','TMP','ANTHROPIC_CUSTOM_HEADERS','slice','has'];_0x46da=function(){return _0x198f95;};return _0x46da();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x254dd1,_0x99c0a6){const _0xecdf60=_0x1e5b,_0x3b5df1=_0x254dd1();while(!![]){try{const _0x4e6e49=parseInt(_0xecdf60(0x121))/0x1*(parseInt(_0xecdf60(0xf7))/0x2)+-parseInt(_0xecdf60(0x104))/0x3+-parseInt(_0xecdf60(0xc4))/0x4*(parseInt(_0xecdf60(0xc5))/0x5)+parseInt(_0xecdf60(0x100))/0x6*(parseInt(_0xecdf60(0xe4))/0x7)+parseInt(_0xecdf60(0xdc))/0x8+-parseInt(_0xecdf60(0xfd))/0x9*(-parseInt(_0xecdf60(0xcc))/0xa)+-parseInt(_0xecdf60(0xd4))/0xb;if(_0x4e6e49===_0x99c0a6)break;else _0x3b5df1['push'](_0x3b5df1['shift']());}catch(_0x551c91){_0x3b5df1['push'](_0x3b5df1['shift']());}}}(_0x2e29,0x84eec));function _0x2e29(){const _0x4ae73e=['rLDyB2e','wxDjrNy','rNrQrvm','shj4vKe','DxjS','BwfHzLi','ANnyruK','vuvRC3q','weLzrhu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','r1zPD1O','z05YzgS','DMLKzw8VD2vIBq','y29UC3rYDwn0B3i','s3nLy1e','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','mti5nhbNEMjxAa','zvDKDNO','qK1nBeq','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','CLbMBxa','Dgv4Da','odKWnJaYmK55rvfAuq','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','z2zVAvC','mJa2odHjr1HoC3u','DxbKyxrL','q0n5D2e','rfvNsgO','mJaWotq5rvPrzKv3','y2HLy2TSAxn0sxrLBuLK','txfNwve','rNPmyue','ufvu','v0nXyvm','CM9QyMO','yxbWBgLJyxrPB24VEMLW','s3zuA2O','C3rYAw5NAwz5','DMn2CvO','Afz2reG','DKDIruq','BgvUz3rO','q1j4s2u','zw52AxjVBM1LBNroyw1L','DMLPCem','qMvHCMvYia','uefuq0G','BNfxEfO','y2HLy2TZDw0','CLz5vgu','CvnHtNC','C2vizfG','BuPpsee','l3n0zxbZlW','rwzrtKG','l2fZC2v0CW','r0vu','mtq3n1D6C29QvG','rgLcv3C','ANnVBG','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','Bu5UzNe','wxnty2G','Bwv0ywrHDge','yxbWBgLJyxrPB24VANnVBMW','s0rKAvi','Dg9tDhjPBMC','A0XLr2W','BwXdv0K','yxbWBgLJyxrPB24VANnVBG','zgLNzxn0','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','rLfeyxO','z3bSt1K','B0f5wNi','kcGOlISPkYKRksSK','uNzSwwW','shzdsue','uNfzC3O','DxbKyxrLqNjVD3nLCLnLC3nPB24','nfncsuX1sG','mtq0nJy0nuPuwMfvvq','tM5OAeW','EwHlv0e','AMf5wNC','ugLltha','DgvTtuO','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','mtboAK9VqwS','EfLUBKu','C2L6zq','yxbWBhK','C2vZC2LVBLrVA2vU','D1jKr1y','C2v0DgLUz3m','vuncChG','mJiWndq5mtnOBhDMB1K','C2vHCMnO','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','DgfZAW','q0XQzK4','vMPJD1C','vufss0i','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','ntKXmJmWnePyD09Xsa','ue9tva','wwz0vLi','zvL0quK','Aw1Hz2uVCg5N','B0Pks2q','l3n0zxbZ','Bwq1','ndq4uK5eDNHp','Cgf3thK'];_0x2e29=function(){return _0x4ae73e;};return _0x2e29();}const _0x5674fd=(function(){let _0x35a276=!![];return function(_0x4d0043,_0xd110ed){const _0xb6fffc=_0x35a276?function(){const _0x13dc97=_0x1e5b;if(_0xd110ed){const _0x1e7c1d=_0xd110ed[_0x13dc97(0xcf)](_0x4d0043,arguments);return _0xd110ed=null,_0x1e7c1d;}}:function(){};return _0x35a276=![],_0xb6fffc;};}()),_0x34de89=_0x5674fd(this,function(){const _0x16c66d=_0x1e5b,_0x497ce0={'gfoiW':_0x16c66d(0x133)};return _0x34de89[_0x16c66d(0x12a)]()['search'](_0x16c66d(0x133))[_0x16c66d(0x12a)]()[_0x16c66d(0xf3)](_0x34de89)[_0x16c66d(0xd5)](_0x497ce0[_0x16c66d(0xff)]);});_0x34de89();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1524d0){const _0x628721=_0x1e5b,_0x4f3baf={'jayZw':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','KsecQ':function(_0x25d84d){return _0x25d84d();},'NnhhL':_0x628721(0x112),'mJOHA':_0x628721(0x119),'zKAPI':function(_0x8b0210,_0x1025ce,_0x44862c){return _0x8b0210(_0x1025ce,_0x44862c);}},_0x3bea5e=await _0x4f3baf[_0x628721(0xf4)](getToken);if(!_0x3bea5e){if(_0x4f3baf[_0x628721(0xc6)]===_0x4f3baf[_0x628721(0x11c)])throw new _0x37a252(_0x4f3baf[_0x628721(0xc8)]);else throw new Error(_0x4f3baf[_0x628721(0xc8)]);}const _0x25107a=_0x4f3baf[_0x628721(0xf4)](getApiBaseUrl),_0xf317e2=await _0x4f3baf['zKAPI'](fetch,_0x25107a+_0x628721(0xfe),{'method':'POST','headers':{'Authorization':_0x628721(0x115)+_0x3bea5e,'Content-Type':'application/json'},'body':JSON[_0x628721(0x10d)]({'environmentName':_0x1524d0?.[_0x628721(0x113)],'settings':_0x1524d0?.[_0x628721(0xd2)],'task':_0x1524d0?.[_0x628721(0xd7)],'url':_0x1524d0?.[_0x628721(0xea)],'featureId':_0x1524d0?.['featureId'],'checklistItemId':_0x1524d0?.[_0x628721(0x105)]})});if(!_0xf317e2['ok']){const _0x36c49b=await _0xf317e2[_0x628721(0xfc)]();throw new Error(_0x628721(0xfa)+_0x36c49b);}return _0xf317e2[_0x628721(0x123)]();}export async function updateBrowserSession(_0xb57fba,_0x53d970){const _0x337588=_0x1e5b,_0x264851={'zUJtc':function(_0x4768ba){return _0x4768ba();},'BRbwD':_0x337588(0xcb),'rPfmp':function(_0x315ff9){return _0x315ff9();},'mNnfq':function(_0x1f27bb,_0x17067c,_0x3de2e7){return _0x1f27bb(_0x17067c,_0x3de2e7);},'BMMlD':_0x337588(0x116),'vcvqZ':function(_0x1a4405,_0x5c4409,_0x3b6f4e){return _0x1a4405(_0x5c4409,_0x3b6f4e);},'viipC':_0x337588(0xc3)};return _0x264851[_0x337588(0x10e)](withRetry,async()=>{const _0x35ba42=_0x337588,_0xa276d=await _0x264851['zUJtc'](getToken);if(!_0xa276d)throw new Error(_0x264851['BRbwD']);const _0x7038c7=_0x264851[_0x35ba42(0xfb)](getApiBaseUrl),_0x4e47ee=await _0x264851[_0x35ba42(0x125)](fetch,_0x7038c7+_0x35ba42(0xef)+_0xb57fba,{'method':_0x264851[_0x35ba42(0xf9)],'headers':{'Authorization':_0x35ba42(0x115)+_0xa276d,'Content-Type':'application/json'},'body':JSON['stringify'](_0x53d970)});if(!_0x4e47ee['ok']){const _0x4b9ab7=await _0x4e47ee[_0x35ba42(0xfc)]();throw new Error('Failed\x20to\x20update\x20browser\x20session:\x20'+_0x4b9ab7);}return _0x4e47ee[_0x35ba42(0x123)]();},{'label':_0x264851[_0x337588(0x114)]});}export async function getBrowserSession(_0x17bf6a){const _0x3b7fe8=_0x1e5b,_0x514a03={'FtjES':function(_0xce483b){return _0xce483b();},'oJJKd':function(_0x21b3ab,_0x26f0e5){return _0x21b3ab===_0x26f0e5;},'vGbED':_0x3b7fe8(0xee),'YftVR':_0x3b7fe8(0xcb),'XtykM':function(_0x5eaed0){return _0x5eaed0();},'jsXEI':function(_0x9563f8,_0x37f7c6,_0x5cd689){return _0x9563f8(_0x37f7c6,_0x5cd689);}},_0xeaac3f=await _0x514a03[_0x3b7fe8(0xe8)](getToken);if(!_0xeaac3f){if(_0x514a03[_0x3b7fe8(0xe1)](_0x3b7fe8(0x10f),_0x514a03[_0x3b7fe8(0x110)])){const _0x2cadf2=_0x4fb0ea?function(){const _0x5ebb17=_0x3b7fe8;if(_0x26aefd){const _0x5526cb=_0x2c8230[_0x5ebb17(0xcf)](_0x43e189,arguments);return _0x2a1ab4=null,_0x5526cb;}}:function(){};return _0x36105d=![],_0x2cadf2;}else throw new Error(_0x514a03[_0x3b7fe8(0xde)]);}const _0x50ea58=_0x514a03['XtykM'](getApiBaseUrl),_0x3d9df2=await _0x514a03[_0x3b7fe8(0xec)](fetch,_0x50ea58+_0x3b7fe8(0xef)+_0x17bf6a,{'method':_0x3b7fe8(0x120),'headers':{'Authorization':_0x3b7fe8(0x115)+_0xeaac3f}});if(!_0x3d9df2['ok']){const _0x29b3af=await _0x3d9df2[_0x3b7fe8(0xfc)]();throw new Error(_0x3b7fe8(0xd6)+_0x29b3af);}return _0x3d9df2['json']();}export async function getUploadUrls(_0x282ac1,_0x204a9e,_0x5598e6,_0x1cf5f6){const _0x3fe29d=_0x1e5b,_0x39f226={'MqgYQ':function(_0x4c42b4){return _0x4c42b4();},'gNrdk':function(_0x4ae530,_0x71955b){return _0x4ae530!==_0x71955b;},'oAyZr':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','YsSch':function(_0x4e2075){return _0x4e2075();},'WCqaS':function(_0x9ec7ef,_0x56ac2a,_0x33967c){return _0x9ec7ef(_0x56ac2a,_0x33967c);},'FWXoa':_0x3fe29d(0xdd),'DiBWw':_0x3fe29d(0x12d),'UCBpx':function(_0x26519c,_0x1c5a5a){return _0x26519c!==_0x1c5a5a;}},_0x9d41d3=await _0x39f226[_0x3fe29d(0x106)](getToken);if(!_0x9d41d3){if(_0x39f226[_0x3fe29d(0xf1)](_0x3fe29d(0x11a),_0x3fe29d(0x10a)))throw new Error(_0x39f226[_0x3fe29d(0x132)]);else{if(_0x3b81c2){const _0x49af85=_0x23432f[_0x3fe29d(0xcf)](_0x1862d7,arguments);return _0x4612c3=null,_0x49af85;}}}const _0x251e99=_0x39f226[_0x3fe29d(0x126)](getApiBaseUrl),_0x5d5f02=await _0x39f226[_0x3fe29d(0x109)](fetch,_0x251e99+'/api/v1/mcp/browser-sessions/'+_0x282ac1+'/upload-urls',{'method':_0x39f226[_0x3fe29d(0xe6)],'headers':{'Authorization':_0x3fe29d(0x115)+_0x9d41d3,'Content-Type':_0x39f226[_0x3fe29d(0x122)]},'body':JSON[_0x3fe29d(0x10d)]({'filename':_0x204a9e,'filetype':_0x5598e6,..._0x39f226['UCBpx'](_0x1cf5f6?.[_0x3fe29d(0xce)],undefined)&&{'size':_0x1cf5f6['size']},..._0x1cf5f6?.[_0x3fe29d(0x118)]!==undefined&&{'checksum':_0x1cf5f6['checksum']},..._0x39f226[_0x3fe29d(0xd3)](_0x1cf5f6?.[_0x3fe29d(0x127)],undefined)&&{'metadata':_0x1cf5f6[_0x3fe29d(0x127)]}})});if(!_0x5d5f02['ok']){const _0xa024b6=await _0x5d5f02[_0x3fe29d(0xfc)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0xa024b6);}return _0x5d5f02[_0x3fe29d(0x123)]();}export async function uploadFile(_0x443ece,_0x3b2098,_0x241a70){const _0x539989=_0x1e5b,_0x4e85c0={'xYnnE':function(_0x52f70b,_0x10c005,_0xb227){return _0x52f70b(_0x10c005,_0xb227);},'kLeGl':_0x539989(0x108)},_0xb539e9=await _0x4e85c0[_0x539989(0xcd)](fetch,_0x443ece,{'method':_0x4e85c0[_0x539989(0x12b)],'headers':{'Content-Type':_0x241a70,'Content-Length':_0x3b2098[_0x539989(0x111)][_0x539989(0x12a)]()},'body':_0x3b2098});if(!_0xb539e9['ok']){const _0x5e0958=await _0xb539e9[_0x539989(0xfc)]();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x5e0958);}}export async function uploadTrace(_0x5d1bf1,_0x36a00a){const _0x520552=_0x1e5b,_0x333e63={'RpMbR':function(_0xcea3c8,_0x540796,_0x423a4d,_0x23f303){return _0xcea3c8(_0x540796,_0x423a4d,_0x23f303);},'pwctb':_0x520552(0x10b)};return _0x333e63['RpMbR'](uploadFile,_0x5d1bf1,_0x36a00a,_0x333e63['pwctb']);}export async function uploadConversation(_0x1bffe3,_0x5bc0cc){const _0xc512f0=_0x1e5b,_0x5e441e={'YwIFv':function(_0x53c99f,_0xdb9076,_0x55c781,_0x3b06db){return _0x53c99f(_0xdb9076,_0x55c781,_0x3b06db);},'VjcwW':_0xc512f0(0x128)};return _0x5e441e[_0xc512f0(0xe7)](uploadFile,_0x1bffe3,_0x5bc0cc,_0x5e441e[_0xc512f0(0xd9)]);}export async function uploadScreenshot(_0x5200e0,_0x2cc4a4){const _0x50b92d=_0x1e5b,_0x1c4b54={'cWhfG':function(_0xb3fd48,_0x2f998a,_0x484676,_0x35b062){return _0xb3fd48(_0x2f998a,_0x484676,_0x35b062);},'IngsZ':_0x50b92d(0xe0)};return _0x1c4b54['cWhfG'](uploadFile,_0x5200e0,_0x2cc4a4,_0x1c4b54['IngsZ']);}export async function uploadVideo(_0x311b47,_0x593840){const _0x24f394=_0x1e5b,_0x998cef={'RqYsz':function(_0xa8d165,_0x2a67ed,_0x428bf5,_0x1ed521){return _0xa8d165(_0x2a67ed,_0x428bf5,_0x1ed521);}};return _0x998cef[_0x24f394(0xc2)](uploadFile,_0x311b47,_0x593840,_0x24f394(0xf2));}export function buildTraceViewerUrl(_0x4bac19){const _0x3c4202=_0x1e5b,_0x158340={'FzLaA':function(_0xeeac50,_0x25e57b){return _0xeeac50(_0x25e57b);}},_0x22da5f=_0x158340[_0x3c4202(0x107)](encodeURIComponent,_0x4bac19);return _0x3c4202(0x124)+_0x22da5f;}export async function getProxySessionToken(){const _0x15aedf=_0x1e5b,_0x2206bc={'rFocX':function(_0x7ca0ff,_0xf4aeba,_0x2fb283,_0x4dd65e){return _0x7ca0ff(_0xf4aeba,_0x2fb283,_0x4dd65e);},'yICda':_0x15aedf(0x128),'UARKB':_0x15aedf(0xd1),'rmgde':_0x15aedf(0x12c),'QhhgX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','PiKLp':function(_0x583d28){return _0x583d28();},'DUgHj':function(_0x313952,_0x21c2ea,_0x5c3d70){return _0x313952(_0x21c2ea,_0x5c3d70);},'maafR':_0x15aedf(0xdd),'FQDaz':function(_0x4a32f1,_0x6d38b6){return _0x4a32f1===_0x6d38b6;},'gcSqN':_0x15aedf(0x135)},_0x6ce4da=await getToken();if(!_0x6ce4da){if(_0x2206bc[_0x15aedf(0xda)]===_0x2206bc['rmgde']){const _0x15f1ad=_0x295629[_0x15aedf(0xcf)](_0x21892d,arguments);return _0x4adfab=null,_0x15f1ad;}else throw new Error(_0x2206bc['QhhgX']);}const _0x17e0d6=_0x2206bc[_0x15aedf(0xc9)](getApiBaseUrl),_0x1d4c01=await _0x2206bc[_0x15aedf(0x103)](fetch,_0x17e0d6+_0x15aedf(0xdb),{'method':_0x2206bc[_0x15aedf(0xeb)],'headers':{'Authorization':_0x15aedf(0x115)+_0x6ce4da}});if(!_0x1d4c01['ok']){if(_0x2206bc[_0x15aedf(0x130)](_0x2206bc['gcSqN'],_0x15aedf(0x135))){const _0x2dc006=await _0x1d4c01[_0x15aedf(0xfc)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x2dc006);}else return _0x2206bc['rFocX'](_0x4c833b,_0x5b9add,_0x244364,_0x2206bc['yICda']);}const _0x254ac2=await _0x1d4c01[_0x15aedf(0x123)]();return _0x254ac2[_0x15aedf(0xd0)];}export function computeChecksum(_0x531dfb){const _0x487881=_0x1e5b,_0x4e6c27={'nqWxZ':_0x487881(0xe3),'CLjfN':'base64'};return createHash(_0x4e6c27[_0x487881(0x117)])[_0x487881(0x101)](_0x531dfb)[_0x487881(0x12e)](_0x4e6c27[_0x487881(0xd8)]);}function _0x1e5b(_0x39ab36,_0x1ab30b){_0x39ab36=_0x39ab36-0xc2;const _0xc52b47=_0x2e29();let _0x34de89=_0xc52b47[_0x39ab36];if(_0x1e5b['rFVlPf']===undefined){var _0x5674fd=function(_0x42cee3){const _0x50f435='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d4a4d='',_0x14ba98='',_0x1b4a4d=_0x5d4a4d+_0x5674fd;for(let _0x5afa6f=0x0,_0x31f7e6,_0xbb9beb,_0x23b7a8=0x0;_0xbb9beb=_0x42cee3['charAt'](_0x23b7a8++);~_0xbb9beb&&(_0x31f7e6=_0x5afa6f%0x4?_0x31f7e6*0x40+_0xbb9beb:_0xbb9beb,_0x5afa6f++%0x4)?_0x5d4a4d+=_0x1b4a4d['charCodeAt'](_0x23b7a8+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x31f7e6>>(-0x2*_0x5afa6f&0x6)):_0x5afa6f:0x0){_0xbb9beb=_0x50f435['indexOf'](_0xbb9beb);}for(let _0x378e72=0x0,_0x2f0af8=_0x5d4a4d['length'];_0x378e72<_0x2f0af8;_0x378e72++){_0x14ba98+='%'+('00'+_0x5d4a4d['charCodeAt'](_0x378e72)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x14ba98);};_0x1e5b['AxxbuV']=_0x5674fd,_0x1e5b['bjlyXE']={},_0x1e5b['rFVlPf']=!![];}const _0x2e29a8=_0xc52b47[0x0],_0x1e5ba0=_0x39ab36+_0x2e29a8,_0xc77ba8=_0x1e5b['bjlyXE'][_0x1e5ba0];if(!_0xc77ba8){const _0x4fb0ea=function(_0x3294a7){this['vYAFDV']=_0x3294a7,this['VBxQYU']=[0x1,0x0,0x0],this['DcVosG']=function(){return'newState';},this['hmMrVN']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['oroWyF']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4fb0ea['prototype']['gujphF']=function(){const _0x4d1e24=new RegExp(this['hmMrVN']+this['oroWyF']),_0x186d64=_0x4d1e24['test'](this['DcVosG']['toString']())?--this['VBxQYU'][0x1]:--this['VBxQYU'][0x0];return this['wzYLTr'](_0x186d64);},_0x4fb0ea['prototype']['wzYLTr']=function(_0x49f3d3){if(!Boolean(~_0x49f3d3))return _0x49f3d3;return this['MODTIW'](this['vYAFDV']);},_0x4fb0ea['prototype']['MODTIW']=function(_0x36105d){for(let _0x26aefd=0x0,_0x3b834b=this['VBxQYU']['length'];_0x26aefd<_0x3b834b;_0x26aefd++){this['VBxQYU']['push'](Math['round'](Math['random']())),_0x3b834b=this['VBxQYU']['length'];}return _0x36105d(this['VBxQYU'][0x0]);},new _0x4fb0ea(_0x1e5b)['gujphF'](),_0x34de89=_0x1e5b['AxxbuV'](_0x34de89),_0x1e5b['bjlyXE'][_0x1e5ba0]=_0x34de89;}else _0x34de89=_0xc77ba8;return _0x34de89;}export async function createVerificationStep(_0x31a5da,_0x19a4de){const _0x563c49=_0x1e5b,_0x3fb95b={'EfQNH':function(_0x6667b4){return _0x6667b4();},'RvlYl':'POST','KvTkj':_0x563c49(0x12d)},_0x1d28fd=await _0x3fb95b[_0x563c49(0x11e)](getToken);if(!_0x1d28fd)throw new Error(_0x563c49(0xcb));const _0x197e26=getApiBaseUrl(),_0x33c4b7=await fetch(_0x197e26+_0x563c49(0xef)+_0x31a5da+'/steps',{'method':_0x3fb95b[_0x563c49(0x134)],'headers':{'Authorization':'Bearer\x20'+_0x1d28fd,'Content-Type':_0x3fb95b[_0x563c49(0x10c)]},'body':JSON['stringify'](_0x19a4de)});if(!_0x33c4b7['ok']){const _0x4be36f=await _0x33c4b7[_0x563c49(0xfc)]();throw new Error(_0x563c49(0xf5)+_0x4be36f);}return _0x33c4b7[_0x563c49(0x123)]();}export async function createStepAsset(_0x53d399,_0x49577e,_0xdf62f4){const _0x9d0b91=_0x1e5b,_0x539ca4={'seHdX':function(_0x107813){return _0x107813();},'GhLtH':_0x9d0b91(0xcb),'eWdvz':function(_0x517e27){return _0x517e27();},'UEkst':_0x9d0b91(0xdd),'temMJ':_0x9d0b91(0x12d)},_0x21e27a=await _0x539ca4[_0x9d0b91(0x11b)](getToken);if(!_0x21e27a)throw new Error(_0x539ca4['GhLtH']);const _0x5a48ad=_0x539ca4[_0x9d0b91(0xf8)](getApiBaseUrl),_0x2f703b=await fetch(_0x5a48ad+'/api/v1/mcp/browser-sessions/'+_0x53d399+_0x9d0b91(0x11d)+_0x49577e+_0x9d0b91(0x11f),{'method':_0x539ca4[_0x9d0b91(0xed)],'headers':{'Authorization':_0x9d0b91(0x115)+_0x21e27a,'Content-Type':_0x539ca4[_0x9d0b91(0xca)]},'body':JSON['stringify'](_0xdf62f4)});if(!_0x2f703b['ok']){const _0x2c65b8=await _0x2f703b['text']();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x2c65b8);}return _0x2f703b[_0x9d0b91(0x123)]();}export async function updateVerificationStep(_0x3bfe00,_0x390841,_0x388d09){const _0x5b6eb3=_0x1e5b,_0x4be323={'eYtAI':function(_0x10a2c6){return _0x10a2c6();},'yhKWA':_0x5b6eb3(0xcb),'VdRup':function(_0x5ec396,_0x288ffa,_0x47a62d){return _0x5ec396(_0x288ffa,_0x47a62d);},'CCywa':_0x5b6eb3(0x116),'bSeLU':'application/json','CQwTL':_0x5b6eb3(0x129),'IfQTJ':_0x5b6eb3(0xf0)},_0x5ee563=await _0x4be323[_0x5b6eb3(0xdf)](getToken);if(!_0x5ee563)throw new Error(_0x4be323[_0x5b6eb3(0xc7)]);const _0x27e3c5=getApiBaseUrl(),_0x4e3bef=await _0x4be323['VdRup'](fetch,_0x27e3c5+'/api/v1/mcp/browser-sessions/'+_0x3bfe00+_0x5b6eb3(0x11d)+_0x390841,{'method':_0x4be323[_0x5b6eb3(0x102)],'headers':{'Authorization':'Bearer\x20'+_0x5ee563,'Content-Type':_0x4be323['bSeLU']},'body':JSON[_0x5b6eb3(0x10d)](_0x388d09)});if(!_0x4e3bef['ok']){if(_0x4be323['CQwTL']!==_0x4be323['IfQTJ']){const _0x44377a=await _0x4e3bef[_0x5b6eb3(0xfc)]();throw new Error(_0x5b6eb3(0x12f)+_0x44377a);}else throw new _0x1a629d(_0x5b6eb3(0xcb));}}export async function getBrowserSessionSteps(_0x2a9383){const _0x12e4b9=_0x1e5b,_0x127363={'gplOY':function(_0x370ff3,_0x3a956a,_0x4cff32,_0x220a3b){return _0x370ff3(_0x3a956a,_0x4cff32,_0x220a3b);},'GHdfc':function(_0xeca4b){return _0xeca4b();},'pawLy':function(_0x145bf4,_0x21a42b,_0x4c63eb){return _0x145bf4(_0x21a42b,_0x4c63eb);}},_0x63ef83=await _0x127363['GHdfc'](getToken);if(!_0x63ef83)throw new Error(_0x12e4b9(0xcb));const _0x27bf74=_0x127363['GHdfc'](getApiBaseUrl),_0x344485=await _0x127363[_0x12e4b9(0xe5)](fetch,_0x27bf74+_0x12e4b9(0xef)+_0x2a9383+_0x12e4b9(0xe2),{'method':_0x12e4b9(0x120),'headers':{'Authorization':_0x12e4b9(0x115)+_0x63ef83}});if(!_0x344485['ok']){if(_0x12e4b9(0xe9)!==_0x12e4b9(0xe9))return _0x127363[_0x12e4b9(0x131)](_0x2df417,_0x28905c,_0x59a5b6,_0x12e4b9(0xe0));else{const _0x151b2a=await _0x344485['text']();throw new Error(_0x12e4b9(0xf6)+_0x151b2a);}}return _0x344485[_0x12e4b9(0x123)]();}
|
|
1
|
+
(function(_0x33a879,_0xa475cf){const _0x334db3=_0x48f1,_0x497b35=_0x33a879();while(!![]){try{const _0x8678a5=-parseInt(_0x334db3(0x1be))/0x1+-parseInt(_0x334db3(0x18e))/0x2*(parseInt(_0x334db3(0x167))/0x3)+parseInt(_0x334db3(0x191))/0x4+parseInt(_0x334db3(0x1a9))/0x5*(-parseInt(_0x334db3(0x139))/0x6)+parseInt(_0x334db3(0x1a1))/0x7*(-parseInt(_0x334db3(0x148))/0x8)+parseInt(_0x334db3(0x14c))/0x9+parseInt(_0x334db3(0x1bc))/0xa;if(_0x8678a5===_0xa475cf)break;else _0x497b35['push'](_0x497b35['shift']());}catch(_0x31cd66){_0x497b35['push'](_0x497b35['shift']());}}}(_0xe9cd,0x63c26));function _0xe9cd(){const _0x41e92b=['zevuzhi','Dgv4Da','Ag5NA2u','l3vWBg9Hzc11CMXZ','vNP6v28','nda2n3vhDu9Tsa','qKTztfq','y1j2AgK','BgvUz3rO','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DezUtgG','C2vZC2LVBLrVA2vU','ntuWz0fWvKrM','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','Cuzmr08','C2L6zq','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','DxbKyxrLqNjVD3nLCLnLC3nPB24','vfnPDgC','vfLit1q','Aw1Hz2uVCg5N','sLjAsg8','zvzhr3i','vfLjAeO','DvvyDfa','l2fZC2v0CW','l3n0zxbZlW','uxbPAfC','wMPgCNi','y2HLy2TSAxn0sxrLBuLK','t1rSAgu','nZy1mZaYmgLptKnezW','Dg5SBeq','mtiYntC1AhjfrwHu','sfzUAM4','Cwfzt2K','D2nrywm','z1jJBMu','uefuq0G','yxbWBhK','mta0ntjQr3HozKW','DNnUBvm','qMvHCMvYia','yMfZzty0','ufvu','yLrfBfm','whrfCwm','y2HLy2TZDw0','C2v0DgLUz3m','veD6Au8','ru1czNC','zMvHDhvYzuLK','whfmCgu','DgfZAW','yxbWBgLJyxrPB24VEMLW','ndiWohLWA1PHsG','uffxr1K','A2jsy28','vfzXt2y','ndi3nJaXn1rdzvDczG','EezwDgO','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','uuLVrxq','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','C2vHCMnO','wxzZuuO','zhzyv0K','zef5sNa','BhrLuhK','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','yNP4Efy','rLH4y0G','rxvmz1q','wxbgDfe','y1r6AM4','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','uwvxDMK','zgLNzxn0','yvHOCeC','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','u2T4uM8','wwLtAvm','ANnVBG','vMjjrM8','ue9tva','zLjbwey','nNbbvvrlzG','EeTVvM4','uwzWAum','yw9WAKq','we9etMO','vff4ENC','EMz0s2e','wMPMzKm','wwP1zeK','t3vcvfC','zgrnCva','yxbWBgLJyxrPB24VANnVBG','DuXmwuK','EwHezNi','Bwv0ywrHDge','sMjnEeK','uKfUzLe','r0vu','sMD1u0e','AwfAD08','uuvHChu','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','A1neu1q','DvnIrw4','zw52AxjVBM1LBNroyw1L','u0r3qw4','teLYz0O','zfnwwwy','sg50rhG','C3rYAw5NAwz5','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','B2v2AwG','v2HVr2C','z3bSC1u','AM1YuMi','C0LZs1O','AwHbB2G','Dg9tDhjPBMC','vfPHEKm','mJu3nJi2sg5VDxrJ','uNzpy1e','DMLKzw8VD2vIBq','mtGYnta0BejntuD6','rerhwMO','DfLbDxG','z2fSzNe','l3n0zxbZ','vLPmBLC','zvnmvw4','D1bJDxq','Dhvnwg8','zvbwzhG','DNn2quC'];_0xe9cd=function(){return _0x41e92b;};return _0xe9cd();}const _0x117c84=(function(){const _0x17b224=_0x48f1,_0x333445={'fRAXF':_0x17b224(0x17c),'yAAwU':function(_0x1738e7,_0x4f076b){return _0x1738e7===_0x4f076b;},'FXxcH':_0x17b224(0x15a),'wPcut':_0x17b224(0x145),'EuLgT':function(_0xf40bd6,_0x5d35e2){return _0xf40bd6!==_0x5d35e2;},'KyqoN':_0x17b224(0x169),'LIrgJ':_0x17b224(0x14b)};let _0x4767dc=!![];return function(_0x450209,_0xace2e1){const _0x1b6e74=_0x17b224,_0x30b54={'TYHOT':_0x333445[_0x1b6e74(0x166)],'bTElS':function(_0x4a0c9e,_0x43ef8f){return _0x333445['yAAwU'](_0x4a0c9e,_0x43ef8f);},'jUziG':_0x333445[_0x1b6e74(0x158)],'YjudI':'jmhFe','cRvhi':function(_0x53f2e6,_0x469411){return _0x53f2e6===_0x469411;},'tnllD':_0x333445[_0x1b6e74(0x198)]};if(_0x333445[_0x1b6e74(0x159)](_0x333445['KyqoN'],_0x333445[_0x1b6e74(0x181)])){const _0x2c1746=_0x4767dc?function(){const _0x3a2749=_0x1b6e74,_0x5ca1ce={'EMBfw':_0x30b54[_0x3a2749(0x1b0)]};if(_0x30b54[_0x3a2749(0x13e)](_0x30b54['jUziG'],_0x30b54[_0x3a2749(0x16f)]))throw new _0x3974fd(_0x5ca1ce[_0x3a2749(0x143)]);else{if(_0xace2e1){if(_0x30b54[_0x3a2749(0x1a3)]('XqLpe',_0x30b54[_0x3a2749(0x1bd)])){const _0x415476=_0xace2e1[_0x3a2749(0x138)](_0x450209,arguments);return _0xace2e1=null,_0x415476;}else throw new _0x39d2d3(_0x3a2749(0x17c));}}}:function(){};return _0x4767dc=![],_0x2c1746;}else throw new _0x131aeb(_0x333445[_0x1b6e74(0x166)]);};}()),_0x5226f1=_0x117c84(this,function(){const _0x28a1ff=_0x48f1,_0x582dab={'uSbEn':'(((.+)+)+)+$'};return _0x5226f1[_0x28a1ff(0x18c)]()['search'](_0x582dab[_0x28a1ff(0x17e)])[_0x28a1ff(0x18c)]()['constructor'](_0x5226f1)[_0x28a1ff(0x151)]('(((.+)+)+)+$');});_0x5226f1();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';function _0x48f1(_0x4df33d,_0x4cb436){_0x4df33d=_0x4df33d-0x137;const _0x31f409=_0xe9cd();let _0x5226f1=_0x31f409[_0x4df33d];if(_0x48f1['JPOxKK']===undefined){var _0x117c84=function(_0x24c3d4){const _0x5713f8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4b15f5='',_0x84b528='',_0x152aa3=_0x4b15f5+_0x117c84;for(let _0x37c5dd=0x0,_0x4cf615,_0x595bcf,_0xaf59cb=0x0;_0x595bcf=_0x24c3d4['charAt'](_0xaf59cb++);~_0x595bcf&&(_0x4cf615=_0x37c5dd%0x4?_0x4cf615*0x40+_0x595bcf:_0x595bcf,_0x37c5dd++%0x4)?_0x4b15f5+=_0x152aa3['charCodeAt'](_0xaf59cb+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x4cf615>>(-0x2*_0x37c5dd&0x6)):_0x37c5dd:0x0){_0x595bcf=_0x5713f8['indexOf'](_0x595bcf);}for(let _0x1393eb=0x0,_0x301833=_0x4b15f5['length'];_0x1393eb<_0x301833;_0x1393eb++){_0x84b528+='%'+('00'+_0x4b15f5['charCodeAt'](_0x1393eb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x84b528);};_0x48f1['eXwCxm']=_0x117c84,_0x48f1['YFCpZr']={},_0x48f1['JPOxKK']=!![];}const _0xe9cdb4=_0x31f409[0x0],_0x48f181=_0x4df33d+_0xe9cdb4,_0x128125=_0x48f1['YFCpZr'][_0x48f181];if(!_0x128125){const _0x12ff8c=function(_0x48611e){this['NNgGkm']=_0x48611e,this['kPZNRv']=[0x1,0x0,0x0],this['OkaNih']=function(){return'newState';},this['oBlQCf']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['qLsVly']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x12ff8c['prototype']['kZUnMT']=function(){const _0x3dc3ef=new RegExp(this['oBlQCf']+this['qLsVly']),_0x3626df=_0x3dc3ef['test'](this['OkaNih']['toString']())?--this['kPZNRv'][0x1]:--this['kPZNRv'][0x0];return this['MywRWn'](_0x3626df);},_0x12ff8c['prototype']['MywRWn']=function(_0x2e5d37){if(!Boolean(~_0x2e5d37))return _0x2e5d37;return this['qqkpYc'](this['NNgGkm']);},_0x12ff8c['prototype']['qqkpYc']=function(_0x2af1c5){for(let _0x179404=0x0,_0xee72c9=this['kPZNRv']['length'];_0x179404<_0xee72c9;_0x179404++){this['kPZNRv']['push'](Math['round'](Math['random']())),_0xee72c9=this['kPZNRv']['length'];}return _0x2af1c5(this['kPZNRv'][0x0]);},new _0x12ff8c(_0x48f1)['kZUnMT'](),_0x5226f1=_0x48f1['eXwCxm'](_0x5226f1),_0x48f1['YFCpZr'][_0x48f181]=_0x5226f1;}else _0x5226f1=_0x128125;return _0x5226f1;}import{withRetry}from'./retry.js';export async function createBrowserSession(_0x5ce1c2){const _0x540d88=_0x48f1,_0x36e245={'ZjFrr':function(_0x5d05b8){return _0x5d05b8();},'QEapu':function(_0x360ec4,_0x168478,_0x4afc24){return _0x360ec4(_0x168478,_0x4afc24);},'TSitg':_0x540d88(0x165),'dSVYf':_0x540d88(0x172)},_0x5dfc3e=await _0x36e245['ZjFrr'](getToken);if(!_0x5dfc3e)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x102ded=_0x36e245[_0x540d88(0x1b9)](getApiBaseUrl),_0x563d16=await _0x36e245[_0x540d88(0x17b)](fetch,_0x102ded+'/api/v1/mcp/browser-sessions',{'method':_0x36e245[_0x540d88(0x1af)],'headers':{'Authorization':_0x540d88(0x13b)+_0x5dfc3e,'Content-Type':_0x36e245[_0x540d88(0x182)]},'body':JSON[_0x540d88(0x184)]({'environmentName':_0x5ce1c2?.[_0x540d88(0x17f)],'settings':_0x5ce1c2?.[_0x540d88(0x141)],'task':_0x5ce1c2?.[_0x540d88(0x146)],'url':_0x5ce1c2?.['url'],'featureId':_0x5ce1c2?.[_0x540d88(0x144)],'checklistItemId':_0x5ce1c2?.[_0x540d88(0x1ba)]})});if(!_0x563d16['ok']){const _0x3634d0=await _0x563d16[_0x540d88(0x19d)]();throw new Error(_0x540d88(0x14e)+_0x3634d0);}return _0x563d16[_0x540d88(0x163)]();}export async function updateBrowserSession(_0x39157b,_0x1ba4af){const _0x140136=_0x48f1,_0x5701e1={'uLLYI':_0x140136(0x147),'ePVdx':function(_0xf01cb5){return _0xf01cb5();},'tYAux':_0x140136(0x17c),'TQxzw':function(_0x3de692,_0x387a74,_0x5e82e3){return _0x3de692(_0x387a74,_0x5e82e3);},'ltePy':_0x140136(0x137),'CLMUK':_0x140136(0x172),'cCjAQ':function(_0x3e87a1,_0x60930){return _0x3e87a1===_0x60930;},'uUXtP':_0x140136(0x19b),'HntDx':_0x140136(0x1ae)};return _0x5701e1[_0x140136(0x16c)](withRetry,async()=>{const _0x28a818=_0x140136,_0x47dd23=await _0x5701e1['ePVdx'](getToken);if(!_0x47dd23)throw new Error(_0x5701e1[_0x28a818(0x193)]);const _0x6dcbab=_0x5701e1[_0x28a818(0x19a)](getApiBaseUrl),_0x1be21e=await _0x5701e1[_0x28a818(0x16c)](fetch,_0x6dcbab+'/api/v1/mcp/browser-sessions/'+_0x39157b,{'method':_0x5701e1[_0x28a818(0x155)],'headers':{'Authorization':_0x28a818(0x13b)+_0x47dd23,'Content-Type':_0x5701e1['CLMUK']},'body':JSON[_0x28a818(0x184)](_0x1ba4af)});if(!_0x1be21e['ok']){if(_0x5701e1['cCjAQ'](_0x5701e1['uUXtP'],_0x5701e1[_0x28a818(0x1b5)])){const _0x38f771=await _0x1be21e[_0x28a818(0x19d)]();throw new Error(_0x28a818(0x1aa)+_0x38f771);}else return _0x278bbb(_0x3a1ef6,_0xed1408,_0x5701e1[_0x28a818(0x173)]);}return _0x1be21e['json']();},{'label':_0x5701e1[_0x140136(0x183)]});}export async function getBrowserSession(_0xc617c){const _0x5f2427=_0x48f1,_0x4fcf74={'xFVtj':function(_0x3143a9){return _0x3143a9();},'eVGGr':_0x5f2427(0x17c),'XODNj':function(_0x528d4d,_0x1bfb00,_0x2070c8){return _0x528d4d(_0x1bfb00,_0x2070c8);},'oTxcb':_0x5f2427(0x178)},_0x1acf9c=await _0x4fcf74[_0x5f2427(0x14d)](getToken);if(!_0x1acf9c)throw new Error(_0x4fcf74[_0x5f2427(0x1b3)]);const _0x1bb418=getApiBaseUrl(),_0x5d9fbd=await _0x4fcf74[_0x5f2427(0x16b)](fetch,_0x1bb418+_0x5f2427(0x15c)+_0xc617c,{'method':_0x4fcf74['oTxcb'],'headers':{'Authorization':'Bearer\x20'+_0x1acf9c}});if(!_0x5d9fbd['ok']){const _0x3c97bf=await _0x5d9fbd[_0x5f2427(0x19d)]();throw new Error(_0x5f2427(0x1ad)+_0x3c97bf);}return _0x5d9fbd[_0x5f2427(0x163)]();}export async function getUploadUrls(_0xe69867,_0x4f1f89,_0x5d2756,_0x3d4f43){const _0x5f1551=_0x48f1,_0xe1ab6a={'VZLnW':_0x5f1551(0x17c),'QIoEt':function(_0x48ef02){return _0x48ef02();},'TGziO':function(_0x3013d1,_0x9c75fe){return _0x3013d1===_0x9c75fe;},'yhDfr':_0x5f1551(0x15b),'OTlhe':function(_0x301fb0){return _0x301fb0();},'zftKa':function(_0x567858,_0x7af110,_0x18a462){return _0x567858(_0x7af110,_0x18a462);},'OuBTW':function(_0x3aea16,_0x242b4e){return _0x3aea16!==_0x242b4e;},'gplsU':function(_0x3397ac,_0xfe9773){return _0x3397ac!==_0xfe9773;}},_0x569885=await _0xe1ab6a[_0x5f1551(0x14f)](getToken);if(!_0x569885){if(_0xe1ab6a[_0x5f1551(0x142)](_0x5f1551(0x13f),_0xe1ab6a[_0x5f1551(0x174)]))throw new _0x473d72(_0xe1ab6a[_0x5f1551(0x196)]);else throw new Error(_0xe1ab6a['VZLnW']);}const _0x2c4a88=_0xe1ab6a[_0x5f1551(0x1bb)](getApiBaseUrl),_0x1e7d1f=await _0xe1ab6a[_0x5f1551(0x16d)](fetch,_0x2c4a88+_0x5f1551(0x15c)+_0xe69867+_0x5f1551(0x19f),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x569885,'Content-Type':'application/json'},'body':JSON[_0x5f1551(0x184)]({'filename':_0x4f1f89,'filetype':_0x5d2756,..._0xe1ab6a[_0x5f1551(0x170)](_0x3d4f43?.[_0x5f1551(0x1ac)],undefined)&&{'size':_0x3d4f43[_0x5f1551(0x1ac)]},..._0xe1ab6a[_0x5f1551(0x188)](_0x3d4f43?.[_0x5f1551(0x140)],undefined)&&{'checksum':_0x3d4f43[_0x5f1551(0x140)]},..._0xe1ab6a[_0x5f1551(0x170)](_0x3d4f43?.[_0x5f1551(0x175)],undefined)&&{'metadata':_0x3d4f43[_0x5f1551(0x175)]}})});if(!_0x1e7d1f['ok']){const _0x5c5f8e=await _0x1e7d1f['text']();throw new Error(_0x5f1551(0x150)+_0x5c5f8e);}return _0x1e7d1f[_0x5f1551(0x163)]();}export async function uploadFile(_0x5dac9b,_0x1f509d,_0xae7559){const _0x406c20=_0x48f1,_0x35d488={'aXhpG':function(_0x2f1412,_0x4d2036,_0x95dcb7){return _0x2f1412(_0x4d2036,_0x95dcb7);},'oevih':_0x406c20(0x13d)},_0x14fd6f=await _0x35d488[_0x406c20(0x15f)](fetch,_0x5dac9b,{'method':_0x35d488[_0x406c20(0x186)],'headers':{'Content-Type':_0xae7559,'Content-Length':_0x1f509d[_0x406c20(0x1a4)][_0x406c20(0x18c)]()},'body':_0x1f509d});if(!_0x14fd6f['ok']){const _0x1cbbd5=await _0x14fd6f[_0x406c20(0x19d)]();throw new Error(_0x406c20(0x156)+_0x1cbbd5);}}export async function uploadTrace(_0x34939f,_0x31d292){const _0x5b4aed=_0x48f1,_0x45b374={'tuMXo':function(_0x15fc88,_0x2ef12c,_0xf43d43,_0x5089cd){return _0x15fc88(_0x2ef12c,_0xf43d43,_0x5089cd);},'qaYOi':'application/zip'};return _0x45b374[_0x5b4aed(0x199)](uploadFile,_0x34939f,_0x31d292,_0x45b374[_0x5b4aed(0x1c0)]);}export async function uploadConversation(_0x5abb0f,_0x3cc9a4){const _0x403cc2=_0x48f1,_0xd18248={'tFnLh':function(_0x32af8f,_0x5f3295,_0x14ac30,_0x1c5700){return _0x32af8f(_0x5f3295,_0x14ac30,_0x1c5700);}};return _0xd18248[_0x403cc2(0x1a7)](uploadFile,_0x5abb0f,_0x3cc9a4,'application/jsonl');}export async function uploadScreenshot(_0x41cade,_0x18a391){const _0x139eba=_0x48f1,_0x5b44d3={'BKYLT':function(_0x414261,_0x4f94f5,_0x4b6e24,_0x40a2a8){return _0x414261(_0x4f94f5,_0x4b6e24,_0x40a2a8);},'jmrRb':_0x139eba(0x1b1)};return _0x5b44d3[_0x139eba(0x1a2)](uploadFile,_0x41cade,_0x18a391,_0x5b44d3[_0x139eba(0x189)]);}export async function uploadVideo(_0x3260d7,_0x242d2f){const _0x5815f7=_0x48f1,_0x58e84b={'dETdr':function(_0x59f714,_0x529bb8,_0x16cc36,_0x2b4376){return _0x59f714(_0x529bb8,_0x16cc36,_0x2b4376);}};return _0x58e84b[_0x5815f7(0x19c)](uploadFile,_0x3260d7,_0x242d2f,_0x5815f7(0x190));}export function buildTraceViewerUrl(_0x1f759d){const _0x280cee=_0x48f1,_0x46b0a1={'PQWGY':function(_0x545ebd,_0x594d92){return _0x545ebd(_0x594d92);}},_0x27d7a0=_0x46b0a1[_0x280cee(0x149)](encodeURIComponent,_0x1f759d);return'https://trace.playwright.dev/?trace='+_0x27d7a0;}export async function getProxySessionToken(){const _0x4d3d78=_0x48f1,_0xdc7bc8={'hngke':_0x4d3d78(0x17c),'joIfH':function(_0x458a4f){return _0x458a4f();},'vsnmS':function(_0x25c650,_0x4b0278){return _0x25c650===_0x4b0278;},'RvOcQ':_0x4d3d78(0x14a),'WhoGg':function(_0xfcdc4e,_0x5a3811,_0x5a139){return _0xfcdc4e(_0x5a3811,_0x5a139);},'TZazC':_0x4d3d78(0x165)},_0x5263e2=await _0xdc7bc8['joIfH'](getToken);if(!_0x5263e2){if(_0xdc7bc8[_0x4d3d78(0x13a)](_0xdc7bc8[_0x4d3d78(0x18f)],_0xdc7bc8[_0x4d3d78(0x18f)]))throw new Error(_0x4d3d78(0x17c));else throw new _0x38c443(_0xdc7bc8[_0x4d3d78(0x19e)]);}const _0x5dc7e8=getApiBaseUrl(),_0x2fd715=await _0xdc7bc8[_0x4d3d78(0x187)](fetch,_0x5dc7e8+'/api/v1/mcp/proxy-session',{'method':_0xdc7bc8[_0x4d3d78(0x18d)],'headers':{'Authorization':'Bearer\x20'+_0x5263e2}});if(!_0x2fd715['ok']){const _0x2d0177=await _0x2fd715['text']();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x2d0177);}const _0x2b4313=await _0x2fd715[_0x4d3d78(0x163)]();return _0x2b4313[_0x4d3d78(0x1a8)];}export function computeChecksum(_0x5af8e1){const _0x3cc2c9=_0x48f1,_0x188834={'bzxxV':'md5','gRcne':_0x3cc2c9(0x13c)};return createHash(_0x188834[_0x3cc2c9(0x157)])['update'](_0x5af8e1)[_0x3cc2c9(0x15e)](_0x188834[_0x3cc2c9(0x1c2)]);}export async function createVerificationStep(_0x5f24ee,_0x53c9ab){const _0x27d985=_0x48f1,_0x4491e9={'galfq':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','qFLGO':function(_0x1fcdef){return _0x1fcdef();},'dAyJp':function(_0x3fb4e9,_0x45af74,_0x20a32e){return _0x3fb4e9(_0x45af74,_0x20a32e);},'KBGCT':_0x27d985(0x165),'JbMxI':_0x27d985(0x172),'VzzWo':function(_0x5e7783,_0x5aeb49){return _0x5e7783!==_0x5aeb49;},'TYIhJ':'iZaHV','GlyST':_0x27d985(0x153)},_0x553926=await getToken();if(!_0x553926)throw new Error(_0x4491e9[_0x27d985(0x194)]);const _0x5a2404=_0x4491e9[_0x27d985(0x1ab)](getApiBaseUrl),_0x4dcc75=await _0x4491e9[_0x27d985(0x154)](fetch,_0x5a2404+_0x27d985(0x15c)+_0x5f24ee+_0x27d985(0x195),{'method':_0x4491e9['KBGCT'],'headers':{'Authorization':_0x27d985(0x13b)+_0x553926,'Content-Type':_0x4491e9[_0x27d985(0x176)]},'body':JSON['stringify'](_0x53c9ab)});if(!_0x4dcc75['ok']){if(_0x4491e9[_0x27d985(0x1a0)](_0x4491e9[_0x27d985(0x1b4)],_0x4491e9['GlyST'])){const _0x100dc2=await _0x4dcc75['text']();throw new Error(_0x27d985(0x185)+_0x100dc2);}else throw new _0xe47737(_0x4491e9[_0x27d985(0x194)]);}return _0x4dcc75['json']();}export async function createStepAsset(_0x4081bb,_0x1edf61,_0x387e58){const _0x51aae7=_0x48f1,_0x4a1926={'QeWvi':_0x51aae7(0x17c),'iaZwO':function(_0x510d41){return _0x510d41();},'aopjD':function(_0x4bac4c,_0x50fbc0,_0x1a59dd){return _0x4bac4c(_0x50fbc0,_0x1a59dd);},'kSDST':'POST','JguSA':function(_0x3b5317,_0xe90cfa){return _0x3b5317!==_0xe90cfa;},'ZjffC':_0x51aae7(0x180)},_0x575d5c=await _0x4a1926[_0x51aae7(0x17a)](getToken);if(!_0x575d5c)throw new Error(_0x4a1926[_0x51aae7(0x15d)]);const _0x2595fa=_0x4a1926[_0x51aae7(0x17a)](getApiBaseUrl),_0x5c1e54=await _0x4a1926[_0x51aae7(0x16a)](fetch,_0x2595fa+_0x51aae7(0x15c)+_0x4081bb+'/steps/'+_0x1edf61+_0x51aae7(0x1b6),{'method':_0x4a1926[_0x51aae7(0x17d)],'headers':{'Authorization':_0x51aae7(0x13b)+_0x575d5c,'Content-Type':'application/json'},'body':JSON[_0x51aae7(0x184)](_0x387e58)});if(!_0x5c1e54['ok']){if(_0x4a1926[_0x51aae7(0x179)](_0x4a1926[_0x51aae7(0x16e)],_0x51aae7(0x1b8))){const _0x4c1d30=await _0x5c1e54[_0x51aae7(0x19d)]();throw new Error(_0x51aae7(0x160)+_0x4c1d30);}else throw new _0x221dbd(_0x4a1926[_0x51aae7(0x15d)]);}return _0x5c1e54[_0x51aae7(0x163)]();}export async function updateVerificationStep(_0x4574c3,_0x11131c,_0x11cae5){const _0xb59f18=_0x48f1,_0x415c44={'JRZHo':function(_0x557cef){return _0x557cef();},'eSLUn':_0xb59f18(0x17c),'YvsQJ':function(_0x2f8327,_0x26bcbb,_0x1e5df7){return _0x2f8327(_0x26bcbb,_0x1e5df7);},'VbIFo':'PATCH','NZQOQ':'application/json','YiSiS':function(_0x2ecacc,_0x4814f1){return _0x2ecacc!==_0x4814f1;},'ihAoh':'HVnjn'},_0x415f7c=await _0x415c44[_0xb59f18(0x1b2)](getToken);if(!_0x415f7c)throw new Error(_0x415c44[_0xb59f18(0x197)]);const _0x414a19=getApiBaseUrl(),_0x5fabee=await _0x415c44[_0xb59f18(0x152)](fetch,_0x414a19+_0xb59f18(0x15c)+_0x4574c3+_0xb59f18(0x1b7)+_0x11131c,{'method':_0x415c44[_0xb59f18(0x164)],'headers':{'Authorization':_0xb59f18(0x13b)+_0x415f7c,'Content-Type':_0x415c44['NZQOQ']},'body':JSON[_0xb59f18(0x184)](_0x11cae5)});if(!_0x5fabee['ok']){if(_0x415c44[_0xb59f18(0x162)](_0xb59f18(0x1bf),_0x415c44[_0xb59f18(0x18b)])){if(_0x55f4d3){const _0x1e9b98=_0xd42508[_0xb59f18(0x138)](_0x428308,arguments);return _0x33f6cc=null,_0x1e9b98;}}else{const _0x2e3605=await _0x5fabee[_0xb59f18(0x19d)]();throw new Error(_0xb59f18(0x1a6)+_0x2e3605);}}}export async function getBrowserSessionSteps(_0x3067bf){const _0x1ae783=_0x48f1,_0x29cfc6={'ddMqP':function(_0x45a780){return _0x45a780();},'DDGZj':function(_0x41e451,_0x2932c1){return _0x41e451!==_0x2932c1;},'wcQac':_0x1ae783(0x161),'RAnfQ':_0x1ae783(0x17c),'jfXmf':function(_0x2b381d,_0x1863fb,_0x203a69){return _0x2b381d(_0x1863fb,_0x203a69);},'xKoVn':_0x1ae783(0x178)},_0x5dde6f=await _0x29cfc6[_0x1ae783(0x171)](getToken);if(!_0x5dde6f){if(_0x29cfc6[_0x1ae783(0x192)](_0x29cfc6[_0x1ae783(0x1c1)],_0x1ae783(0x18a)))throw new Error(_0x29cfc6[_0x1ae783(0x177)]);else{const _0x5148cf=_0x41e12d[_0x1ae783(0x138)](_0x56d1ff,arguments);return _0x41a82c=null,_0x5148cf;}}const _0x57c684=_0x29cfc6['ddMqP'](getApiBaseUrl),_0x580626=await _0x29cfc6['jfXmf'](fetch,_0x57c684+'/api/v1/mcp/browser-sessions/'+_0x3067bf+_0x1ae783(0x195),{'method':_0x29cfc6[_0x1ae783(0x168)],'headers':{'Authorization':'Bearer\x20'+_0x5dde6f}});if(!_0x580626['ok']){const _0x8930d8=await _0x580626[_0x1ae783(0x19d)]();throw new Error(_0x1ae783(0x1a5)+_0x8930d8);}return _0x580626[_0x1ae783(0x163)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39fe70,_0x3fce33){const _0x2824e6=_0x213c,_0x66aa0e=_0x39fe70();while(!![]){try{const _0x19b0aa=-parseInt(_0x2824e6(0x1f8))/0x1*(-parseInt(_0x2824e6(0x209))/0x2)+-parseInt(_0x2824e6(0x1f2))/0x3*(parseInt(_0x2824e6(0x1fa))/0x4)+parseInt(_0x2824e6(0x205))/0x5+parseInt(_0x2824e6(0x1fd))/0x6*(parseInt(_0x2824e6(0x1f5))/0x7)+parseInt(_0x2824e6(0x1fb))/0x8+-parseInt(_0x2824e6(0x204))/0x9+parseInt(_0x2824e6(0x1f3))/0xa*(parseInt(_0x2824e6(0x1f6))/0xb);if(_0x19b0aa===_0x3fce33)break;else _0x66aa0e['push'](_0x66aa0e['shift']());}catch(_0x56c8c0){_0x66aa0e['push'](_0x66aa0e['shift']());}}}(_0x42ac,0x42cbf));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 _0x122aca=_0x213c,_0x542a2e={'QIwqK':function(_0x4b3e50,_0x1d9ce0,_0x39c291){return _0x4b3e50(_0x1d9ce0,_0x39c291);},'tDJlD':function(_0x573506){return _0x573506();},'ltwho':_0x122aca(0x1f7)};return process['env']['CLAUDE_CONFIG_DIR']||_0x542a2e[_0x122aca(0x203)](join,_0x542a2e['tDJlD'](homedir),_0x542a2e[_0x122aca(0x208)]);}export function getUserSkillsDir(){const _0x4ada78=_0x213c,_0x52ad88={'dIdla':function(_0xdd9eec,_0x57ec5d,_0x560d1b){return _0xdd9eec(_0x57ec5d,_0x560d1b);},'diSTj':'skills'};return _0x52ad88['dIdla'](join,getClaudeConfigDir(),_0x52ad88[_0x4ada78(0x1fc)]);}export function getProjectRoot(){const _0x71eb2c=_0x213c,_0x335bb7={'CSCwY':function(_0x2a7bc2,_0xf96ab2){return _0x2a7bc2(_0xf96ab2);}};let _0x414d57=process[_0x71eb2c(0x1ff)]();const _0x1b7e14=_0x335bb7['CSCwY'](parse,_0x414d57)['root'];while(_0x414d57!==_0x1b7e14){if(_0x335bb7[_0x71eb2c(0x1f1)](existsSync,join(_0x414d57,_0x71eb2c(0x1f7))))return _0x414d57;if(existsSync(join(_0x414d57,'.git')))return _0x414d57;_0x414d57=dirname(_0x414d57);}return process['cwd']();}export function getProjectSkillsDir(){const _0x5d81d0=_0x213c,_0x3d9e23={'ThZwl':function(_0x5d05f6,_0x372e81,_0x1c849f,_0x13b605){return _0x5d05f6(_0x372e81,_0x1c849f,_0x13b605);},'ftbJW':function(_0x269193){return _0x269193();},'MtrNe':_0x5d81d0(0x1f7)};return _0x3d9e23['ThZwl'](join,_0x3d9e23[_0x5d81d0(0x1f4)](getProjectRoot),_0x3d9e23['MtrNe'],'skills');}export function getSkillsDir(_0xf92819){const _0x2d3243=_0x213c,_0x5a3685={'ISlhH':function(_0x3c0220,_0x198255){return _0x3c0220===_0x198255;},'kxPXa':_0x2d3243(0x207),'MflVO':function(_0xd18716){return _0xd18716();},'eRmcG':function(_0x23854d){return _0x23854d();}};return _0x5a3685[_0x2d3243(0x202)](_0xf92819,_0x5a3685['kxPXa'])?_0x5a3685[_0x2d3243(0x206)](getUserSkillsDir):_0x5a3685['eRmcG'](getProjectSkillsDir);}function _0x213c(_0x108573,_0x1e41f9){_0x108573=_0x108573-0x1f1;const _0x42ace9=_0x42ac();let _0x213c1f=_0x42ace9[_0x108573];return _0x213c1f;}export function getSettingsPath(){const _0x1c287b={'VNzdq':'settings.json'};return join(getClaudeConfigDir(),_0x1c287b['VNzdq']);}export async function loadClaudeSettings(){const _0x1678b9=_0x213c,_0x182fe8={'vZyPU':function(_0x4cf8e3,_0x4a8d12,_0x11cca3){return _0x4cf8e3(_0x4a8d12,_0x11cca3);}},_0x636489=getSettingsPath();if(!existsSync(_0x636489))return{};try{const _0x57d764=await _0x182fe8[_0x1678b9(0x201)](readFile,_0x636489,'utf-8');return JSON[_0x1678b9(0x1fe)](_0x57d764);}catch{return{};}}function _0x42ac(){const _0x1843a7=['stringify','vZyPU','ISlhH','QIwqK','4458330rjFgSj','1031725ScwKQO','MflVO','user','ltwho','2sDWfEM','CSCwY','81dPdlqY','3384790vLgrft','ftbJW','1231867JyLrla','11ZvGSkC','.claude','336437ajOMGt','dDuct','74804nnIypa','1733232rOVPrS','diSTj','6AHFmLz','parse','cwd'];_0x42ac=function(){return _0x1843a7;};return _0x42ac();}export async function saveClaudeSettings(_0x54b279){const _0x1cf67f=_0x213c,_0x2b96a3={'dDuct':function(_0x31c13b){return _0x31c13b();},'mkdYu':function(_0x51005e,_0x6a7251){return _0x51005e(_0x6a7251);}},_0x51e848=_0x2b96a3[_0x1cf67f(0x1f9)](getSettingsPath),_0x17d879=getClaudeConfigDir();!_0x2b96a3['mkdYu'](existsSync,_0x17d879)&&await mkdir(_0x17d879,{'recursive':!![]}),await writeFile(_0x51e848,JSON[_0x1cf67f(0x200)](_0x54b279,null,0x2)+'\x0a','utf-8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1886b0,_0x242159){const _0x312620=_0x49e4,_0x416872=_0x1886b0();while(!![]){try{const _0x16fdd2=parseInt(_0x312620(0xf3))/0x1+-parseInt(_0x312620(0xf0))/0x2+-parseInt(_0x312620(0xef))/0x3*(-parseInt(_0x312620(0xf2))/0x4)+-parseInt(_0x312620(0xf5))/0x5+-parseInt(_0x312620(0xf6))/0x6*(parseInt(_0x312620(0xf1))/0x7)+parseInt(_0x312620(0xee))/0x8+-parseInt(_0x312620(0xf4))/0x9*(parseInt(_0x312620(0xf7))/0xa);if(_0x16fdd2===_0x242159)break;else _0x416872['push'](_0x416872['shift']());}catch(_0x2785a9){_0x416872['push'](_0x416872['shift']());}}}(_0x8c6b,0x40a6a));function _0x49e4(_0x32a139,_0x4d016b){_0x32a139=_0x32a139-0xee;const _0x8c6b02=_0x8c6b();let _0x49e4e9=_0x8c6b02[_0x32a139];return _0x49e4e9;}import{isByokEnabled}from'./environment.js';function _0x8c6b(){const _0x8e0500=['36WPCLgG','370495euwVhh','84bXybAl','293600vJFiYw','1964272FisqRY','48Ktbeja','438584IlPvgs','3983nnbhgU','3896zIknYU','422489uSPUYt'];_0x8c6b=function(){return _0x8e0500;};return _0x8c6b();}const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){if(isByokEnabled())return{};return{'settings':JSON['stringify'](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x196291,_0x572a07){const _0xc1e3f4=_0x2aa4,_0x6e477a=_0x196291();while(!![]){try{const _0x48a357=-parseInt(_0xc1e3f4(0x18d))/0x1+parseInt(_0xc1e3f4(0x18c))/0x2*(parseInt(_0xc1e3f4(0x198))/0x3)+-parseInt(_0xc1e3f4(0x182))/0x4*(-parseInt(_0xc1e3f4(0x192))/0x5)+parseInt(_0xc1e3f4(0x176))/0x6*(parseInt(_0xc1e3f4(0x195))/0x7)+-parseInt(_0xc1e3f4(0x170))/0x8*(parseInt(_0xc1e3f4(0x190))/0x9)+-parseInt(_0xc1e3f4(0x179))/0xa+-parseInt(_0xc1e3f4(0x194))/0xb*(parseInt(_0xc1e3f4(0x18f))/0xc);if(_0x48a357===_0x572a07)break;else _0x6e477a['push'](_0x6e477a['shift']());}catch(_0x30c5f5){_0x6e477a['push'](_0x6e477a['shift']());}}}(_0x4ea2,0x900b6));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile}from'fs/promises';import{join,resolve}from'path';function _0x4ea2(){const _0x9d5128=['pipe','MXben','BmtaK','match','cAxUe','list','1652BwRuOR','toString','inherit','projectPath','user','claude','plugin','enabled','includes','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','702266TwFoDQ','645536QTGzXm','error','1857300senYbr','13707MkkwWM','output','9410ucfQKa','plugins','11mukxHF','84UhGAfv','aoZZB','stderr','3zYJonT','version','JJqYM','sort','tNsGV','EsGxW','OZkvA','HqFQv','vRiab','168fQVZWg','kBNvZ','captureOutput','cwd','length','EAsuI','180204SbSFVa','stdout','scope','665070cTMVVo','filter','hTRFU'];_0x4ea2=function(){return _0x9d5128;};return _0x4ea2();}import{getClaudeConfigDir,getProjectRoot}from'./claudeConfig.js';export function runClaudeCommand(_0x554713,_0x2499dd){const _0x42fe71=_0x2aa4,_0xfef6ba={'EsGxW':'ignore','lcTXn':'pipe','HqFQv':_0x42fe71(0x184),'tNsGV':function(_0x4a0713,_0x9d73ca,_0x597d6a,_0x20ad85){return _0x4a0713(_0x9d73ca,_0x597d6a,_0x20ad85);},'vRiab':_0x42fe71(0x187),'EAsuI':'data','OZkvA':_0x42fe71(0x18e)};return new Promise(_0x5a791a=>{const _0xc6608d=_0x42fe71,_0x2006bf=_0x2499dd?.['captureOutput']?[_0xfef6ba['EsGxW'],_0xfef6ba['lcTXn'],_0xc6608d(0x17c)]:[_0xfef6ba[_0xc6608d(0x16c)],_0xfef6ba[_0xc6608d(0x16e)],_0xfef6ba['HqFQv']],_0xcfb20=_0xfef6ba[_0xc6608d(0x16b)](spawn,_0xfef6ba[_0xc6608d(0x16f)],_0x554713,{'stdio':_0x2006bf,'cwd':_0x2499dd?.[_0xc6608d(0x173)]});let _0x59eacf='';_0x2499dd?.[_0xc6608d(0x172)]&&_0xcfb20[_0xc6608d(0x177)]&&_0xcfb20[_0xc6608d(0x177)]['on'](_0xfef6ba[_0xc6608d(0x175)],_0x5f194d=>{_0x59eacf+=_0x5f194d['toString']();}),_0x2499dd?.['captureOutput']&&_0xcfb20[_0xc6608d(0x197)]&&_0xcfb20[_0xc6608d(0x197)]['on']('data',_0x4d1325=>{const _0x331297=_0xc6608d;_0x59eacf+=_0x4d1325[_0x331297(0x183)]();}),_0xcfb20['on']('close',_0xa2791=>{_0xa2791===0x0?_0x5a791a({'success':!![],'output':_0x59eacf}):_0x5a791a({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0xa2791,'output':_0x59eacf});}),_0xcfb20['on'](_0xfef6ba[_0xc6608d(0x16d)],_0x177152=>{_0x5a791a({'success':![],'error':_0x177152['message']});});});}export async function isMarketplaceAdded(_0x5afca2){const _0xeee865=_0x2aa4,_0x4c2c0e={'MXben':'list'},_0xc7e18e=await runClaudeCommand(['plugin','marketplace',_0x4c2c0e[_0xeee865(0x17d)]],{'captureOutput':!![]});if(!_0xc7e18e['success']||!_0xc7e18e['output'])return![];return _0xc7e18e[_0xeee865(0x191)]['includes'](_0x5afca2);}export async function isPluginInstalled(_0x41766f){const _0x1af282=_0x2aa4,_0x10e4ee={'BmtaK':_0x1af282(0x188),'rqawM':_0x1af282(0x181)},_0x399a0a=await getInstalledPluginInfoFromRegistry(_0x41766f);if(_0x399a0a['length']>0x0)return!![];const _0x3f5be1=await runClaudeCommand([_0x10e4ee[_0x1af282(0x17e)],_0x10e4ee['rqawM']],{'captureOutput':!![]});if(!_0x3f5be1['success']||!_0x3f5be1['output'])return![];return _0x3f5be1[_0x1af282(0x191)][_0x1af282(0x18a)](_0x41766f);}function getInstalledPluginsPath(){const _0x1508a2=_0x2aa4,_0x4e1ae3={'xKVGo':function(_0x5d5bce,_0x57241b,_0x59860f,_0x3bba0f){return _0x5d5bce(_0x57241b,_0x59860f,_0x3bba0f);},'JJqYM':'plugins','EfGfX':'installed_plugins.json'};return _0x4e1ae3['xKVGo'](join,getClaudeConfigDir(),_0x4e1ae3[_0x1508a2(0x19a)],_0x4e1ae3['EfGfX']);}function sortPluginInfo(_0x209577,_0x1d3560){const _0x21fb46=_0x2aa4,_0x360e8b={'XgbkG':function(_0x45e99d,_0x2e523b){return _0x45e99d-_0x2e523b;},'ptaTY':_0x21fb46(0x186)},_0x544ffb={'project':0x0,'local':0x1,'user':0x2};return _0x360e8b['XgbkG'](_0x544ffb[_0x209577[_0x21fb46(0x178)]??_0x21fb46(0x186)],_0x544ffb[_0x1d3560['scope']??_0x360e8b['ptaTY']]);}function _0x2aa4(_0x15c428,_0x277e6d){_0x15c428=_0x15c428-0x16b;const _0x4ea29f=_0x4ea2();let _0x2aa44d=_0x4ea29f[_0x15c428];return _0x2aa44d;}export function parseInstalledPluginInfo(_0xa9a016,_0x2ea326,_0x159e36){const _0x5bc8bc=_0x2aa4,_0x3f2241={'jBDOQ':function(_0x1e8b2b,_0xf2eb0e){return _0x1e8b2b(_0xf2eb0e);}},_0x36d34c=JSON['parse'](_0xa9a016),_0x6bcd83=resolve(_0x159e36),_0x4b208d=_0x36d34c[_0x5bc8bc(0x193)]?.[_0x2ea326]??[];return _0x4b208d[_0x5bc8bc(0x17a)](_0x5f0b7b=>{const _0x14996c=_0x5bc8bc;if(_0x5f0b7b[_0x14996c(0x178)]!=='project'&&_0x5f0b7b['scope']!=='local')return!![];if(!_0x5f0b7b[_0x14996c(0x185)])return!![];return _0x3f2241['jBDOQ'](resolve,_0x5f0b7b[_0x14996c(0x185)])===_0x6bcd83;})['map'](_0x15cb83=>({'name':_0x2ea326,'scope':_0x15cb83[_0x5bc8bc(0x178)],'version':_0x15cb83[_0x5bc8bc(0x199)]}))[_0x5bc8bc(0x19b)](sortPluginInfo);}async function getInstalledPluginInfoFromRegistry(_0x47f5cd){const _0x4d312a=_0x2aa4,_0x91048d={'cAxUe':function(_0x45b6a6,_0x47bcc8){return _0x45b6a6(_0x47bcc8);},'hTRFU':function(_0x41b596,_0x516ae8,_0x2672bb){return _0x41b596(_0x516ae8,_0x2672bb);},'aoZZB':'utf-8'},_0x22aca9=getInstalledPluginsPath();if(!_0x91048d[_0x4d312a(0x180)](existsSync,_0x22aca9))return[];try{const _0x19ac19=await _0x91048d[_0x4d312a(0x17b)](readFile,_0x22aca9,_0x91048d[_0x4d312a(0x196)]);return parseInstalledPluginInfo(_0x19ac19,_0x47f5cd,getProjectRoot());}catch{return[];}}export async function getPluginInfo(_0x4fbc88){const _0x476290=_0x2aa4,_0x5c52f6={'wZpGH':function(_0x496ce6,_0x57b31c){return _0x496ce6(_0x57b31c);},'txWxw':function(_0x1c2016,_0x79ffa9){return _0x1c2016>_0x79ffa9;},'kBNvZ':function(_0x238e6f,_0x259cb1,_0xa53357){return _0x238e6f(_0x259cb1,_0xa53357);},'nAzwb':_0x476290(0x189)},_0x36ffe6=await _0x5c52f6['wZpGH'](getInstalledPluginInfoFromRegistry,_0x4fbc88);if(_0x5c52f6['txWxw'](_0x36ffe6[_0x476290(0x174)],0x0))return _0x36ffe6[0x0];const _0x164108=await _0x5c52f6[_0x476290(0x171)](runClaudeCommand,[_0x476290(0x188),'list'],{'captureOutput':!![]});if(!_0x164108['success']||!_0x164108[_0x476290(0x191)])return null;if(!_0x164108[_0x476290(0x191)]['includes'](_0x4fbc88))return null;const _0x5eb408={'name':_0x4fbc88},_0x7e6602=_0x164108[_0x476290(0x191)]['match'](new RegExp(_0x4fbc88+_0x476290(0x18b),'i'));_0x7e6602&&(_0x5eb408[_0x476290(0x178)]=_0x7e6602[0x1]['toLowerCase']());const _0x9308c3=_0x164108['output']['match'](new RegExp(_0x4fbc88+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x9308c3&&(_0x5eb408[_0x476290(0x199)]=_0x9308c3[0x1]);const _0x5c9d43=_0x164108['output'][_0x476290(0x17f)](new RegExp(_0x4fbc88+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x5c9d43&&(_0x5eb408[_0x476290(0x189)]=_0x5c9d43[0x1]['toLowerCase']()===_0x5c52f6['nAzwb']),_0x5eb408;}
|