@ranger-testing/ranger-cli 3.1.5 → 3.1.6-alpha.4de822b-51
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/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x363c4f=_0x4c6f;(function(_0x3483fd,_0x24c90c){const _0x4ad6ef=_0x4c6f,_0x3eead3=_0x3483fd();while(!![]){try{const _0x402556=parseInt(_0x4ad6ef(0x1c7))/0x1*(parseInt(_0x4ad6ef(0x1ba))/0x2)+-parseInt(_0x4ad6ef(0x1d9))/0x3*(-parseInt(_0x4ad6ef(0x1ea))/0x4)+parseInt(_0x4ad6ef(0x20e))/0x5+-parseInt(_0x4ad6ef(0x1df))/0x6+-parseInt(_0x4ad6ef(0x1d1))/0x7+parseInt(_0x4ad6ef(0x1d8))/0x8*(-parseInt(_0x4ad6ef(0x1d3))/0x9)+parseInt(_0x4ad6ef(0x1ff))/0xa;if(_0x402556===_0x24c90c)break;else _0x3eead3['push'](_0x3eead3['shift']());}catch(_0x33de49){_0x3eead3['push'](_0x3eead3['shift']());}}}(_0x4086,0x53b4a));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;function _0x4086(){const _0x37a443=['GiejT','ZDyIh','sSZpX','ranger@trailhead','982464TxEREH',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','2529vWSdwC','unref','trailhead','\x20channel.','FwDSe','9304mHmDOH','4965kdybht','stdio','close','plugin','version','LGVed','1721868ouguUq','test','inherit','OpqAh','WOYFa','uxoUe','Could\x20not\x20determine\x20the\x20current\x20major\x20version\x20from\x20\x22','log','OPUDk','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','scope','556etmEnB','join','\x0aCould\x20not\x20check\x20latest\x20version:\x20','cwd','ignore','HAtLA','\x0aSuccessfully\x20installed\x20','install','Attempting\x20install\x20anyway...','push','marketplace','endsWith','length','platform','bsVAf','\x0aSuccessfully\x20updated\x20to\x20version\x20','xFIEx','update','LsAGC','weoBe','SfxYo','841140dAMRHk','DORVW','aZokJ',').\x20Staying\x20on\x20','beta','Update\x20failed:\x20','TOLQV','active-profile.txt','\x0aReinstalling\x20','IESGe','error','QCgLq','\x0aInstalling\x20','@latest','RNISv','2757690yIHWkR','pRvwn','VPRBD','kRKwJ','QGGBA','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','user','462588ZHHkMK','findIndex','claude','DvJbP','Aborting\x20to\x20avoid\x20a\x20cross-major\x20upgrade.\x20Reinstall\x20explicitly\x20with:\x20','latest','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','\x0a✅\x20Update\x20complete!','JqsBl','GPbrR','win32','project','some','1xzfosx','active-feature.txt','npm','trim','isFinite','local'];_0x4086=function(){return _0x37a443;};return _0x4086();}function _0x4c6f(_0x5c6ff2,_0x394487){_0x5c6ff2=_0x5c6ff2-0x1b6;const _0x408696=_0x4086();let _0x4c6f50=_0x408696[_0x5c6ff2];return _0x4c6f50;}async function runCommand(_0x4959eb,_0x358301,_0x5ccf47){const _0x41a53e=_0x4c6f,_0x4c946c={'ZDyIh':function(_0x27c476,_0x239be1){return _0x27c476(_0x239be1);},'aZokJ':function(_0x58497e,_0xf49d22,_0x44542e,_0x3b17eb){return _0x58497e(_0xf49d22,_0x44542e,_0x3b17eb);},'LGVed':_0x41a53e(0x1ee),'pRvwn':_0x41a53e(0x1e1),'cFvLU':function(_0x1b843c,_0x104a28){return _0x1b843c===_0x104a28;},'jHIYb':'win32','LsAGC':function(_0x507d3c,_0x4febc8,_0x31b723){return _0x507d3c(_0x4febc8,_0x31b723);}};return new Promise(_0x3523ff=>{const _0x88f16f=_0x41a53e,_0x1ee63b={'uyZIh':function(_0x9f7eaf,_0x4027cd){return _0x9f7eaf(_0x4027cd);},'kRKwJ':function(_0x425be8,_0x313abc){return _0x425be8(_0x313abc);}};let _0x5ab280=![],_0x4ae497;const _0x1284ff=_0x4bc9f8=>{const _0x42ce13=_0x4c6f;if(_0x5ab280)return;_0x5ab280=!![],_0x4ae497&&clearTimeout(_0x4ae497),_0x4c946c[_0x42ce13(0x1ce)](_0x3523ff,_0x4bc9f8);},_0x39dccd=_0x4c946c[_0x88f16f(0x201)](spawn,_0x4959eb,_0x358301,{'stdio':[_0x4c946c[_0x88f16f(0x1de)],_0x5ccf47?.[_0x88f16f(0x1da)]??_0x4c946c[_0x88f16f(0x20f)],_0x5ccf47?.[_0x88f16f(0x1da)]??_0x88f16f(0x1e1)],'cwd':_0x5ccf47?.[_0x88f16f(0x1ed)],'shell':_0x4c946c['cFvLU'](process[_0x88f16f(0x1f7)],_0x4c946c['jHIYb'])});_0x4ae497=_0x5ccf47?.['timeoutMs']?_0x4c946c[_0x88f16f(0x1fc)](setTimeout,()=>{const _0x41df85=_0x88f16f;_0x39dccd['kill'](),_0x39dccd[_0x41df85(0x1d4)](),_0x1ee63b['uyZIh'](_0x1284ff,![]);},_0x5ccf47['timeoutMs']):undefined,_0x39dccd['on']('close',_0x224365=>{const _0x479ea0=_0x88f16f;_0x1ee63b[_0x479ea0(0x1b6)](_0x1284ff,_0x224365===0x0);}),_0x39dccd['on'](_0x88f16f(0x209),()=>{_0x1284ff(![]);});});}export function resolveDistTag(_0x17fb4){const _0x4a6e40=_0x4c6f,_0x15756f={'QCgLq':_0x4a6e40(0x1bf)};if(/-alpha\./i[_0x4a6e40(0x1e0)](_0x17fb4))return'alpha';if(/-beta\./i[_0x4a6e40(0x1e0)](_0x17fb4))return _0x4a6e40(0x203);if(/-rc\./i['test'](_0x17fb4))return'rc';return _0x15756f[_0x4a6e40(0x20a)];}export function resolveInstallTarget(_0x4b52be){const _0xa20c8f=_0x4c6f,_0x3e97fd={'spTVB':function(_0x1d8c05,_0x55dff6){return _0x1d8c05(_0x55dff6);}},_0x5874d5=_0x3e97fd['spTVB'](resolveDistTag,_0x4b52be);if(_0x5874d5!=='latest')return _0x5874d5;const _0x3a0999=_0x4b52be['split']('.')[0x0],_0x15b515=parseInt(_0x3a0999,0xa);if(!Number['isFinite'](_0x15b515))return _0xa20c8f(0x1bf);return'^'+_0x15b515+'.0.0';}async function runInstall(_0x1cd154){const _0x298b9d=_0x4c6f,_0x1b0e4b={'xFIEx':function(_0x3f773e,_0x427a73,_0x4d890d,_0x52dc60){return _0x3f773e(_0x427a73,_0x4d890d,_0x52dc60);},'SfxYo':_0x298b9d(0x1f1),'DKroP':_0x298b9d(0x1ee),'UmoRk':_0x298b9d(0x1e1),'OpqAh':_0x298b9d(0x209)},_0x477238=resolveInstallTarget(_0x1cd154);return new Promise(_0x3b27ad=>{const _0x4f881e=_0x298b9d;console[_0x4f881e(0x1e6)](_0x4f881e(0x20b)+PACKAGE_NAME+'@'+_0x477238+'...\x0a');const _0x2fc37c=_0x1b0e4b[_0x4f881e(0x1fa)](spawn,_0x4f881e(0x1c9),[_0x1b0e4b[_0x4f881e(0x1fe)],'-g',PACKAGE_NAME+'@'+_0x477238],{'stdio':[_0x1b0e4b['DKroP'],'inherit',_0x1b0e4b['UmoRk']],'shell':process[_0x4f881e(0x1f7)]===_0x4f881e(0x1c4)});_0x2fc37c['on'](_0x4f881e(0x1db),_0x255e11=>{_0x3b27ad(_0x255e11===0x0);}),_0x2fc37c['on'](_0x1b0e4b[_0x4f881e(0x1e2)],()=>{_0x3b27ad(![]);});});}async function updateClaudeMarketplace(){const _0xd82509=_0x4c6f,_0x2bce59={'bsVAf':'claude','mBuKr':'plugin','QBXLq':_0xd82509(0x1f4),'QGGBA':'update','JqsBl':'trailhead'},_0x5798b7=await runCommand(_0x2bce59[_0xd82509(0x1f8)],[_0x2bce59['mBuKr'],_0x2bce59['QBXLq'],_0x2bce59[_0xd82509(0x1b7)],_0x2bce59[_0xd82509(0x1c2)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x5798b7)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x1e6daa=_0x363c4f(0x1b9)){const _0x203220=_0x363c4f,_0x1564c3={'GiejT':_0x203220(0x1dc),'xTuwf':_0x203220(0x1fb),'WOYFa':'ranger@trailhead','WOfXF':function(_0x380b71,_0x1ba7db){return _0x380b71!==_0x1ba7db;},'uxoUe':function(_0x162ba7,_0x409c4f,_0x1863b0,_0x4e5dc3){return _0x162ba7(_0x409c4f,_0x1863b0,_0x4e5dc3);},'DORVW':'claude','sSZpX':function(_0x284f05,_0x8c1732){return _0x284f05===_0x8c1732;}},_0x31d412=[_0x1564c3[_0x203220(0x1cd)],_0x1564c3['xTuwf'],_0x1564c3[_0x203220(0x1e3)]];_0x1564c3['WOfXF'](_0x1e6daa,_0x203220(0x1b9))&&_0x31d412['push']('--scope',_0x1e6daa);const _0x1c4f86=await _0x1564c3[_0x203220(0x1e4)](runCommand,_0x1564c3[_0x203220(0x200)],_0x31d412,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x1564c3['sSZpX'](_0x1e6daa,'project')||_0x1564c3[_0x203220(0x1cf)](_0x1e6daa,_0x203220(0x1cc))?getProjectRoot():undefined});if(!_0x1c4f86)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1e6daa+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x115748,_0x5dd593,_0x3333d9){const _0x30cad2=_0x363c4f,_0x2c3636={'zGqXh':function(_0x115630,_0x3e70c1){return _0x115630===_0x3e70c1;},'DvJbP':function(_0x5e43ae,_0xa60032){return _0x5e43ae(_0xa60032);}},_0xa13fcd=_0x2c3636['zGqXh'](_0x3333d9,'opencode')?_0x2c3636[_0x30cad2(0x1bd)](getOpencodeSkillsDir,_0x5dd593):getSkillsDir(_0x5dd593),_0x382f90=join(_0xa13fcd,_0x115748);return existsSync(_0x382f90);}async function reinstallSkills(_0x47f29d){const _0x20c1ac=_0x363c4f,_0xae3941={'PIolW':function(_0x5e2c07,_0x474a16,_0x4fc800,_0x537dfd){return _0x5e2c07(_0x474a16,_0x4fc800,_0x537dfd);},'TOLQV':'opencode','jGUPp':function(_0x2d742d,_0x1dad5b,_0x25c549){return _0x2d742d(_0x1dad5b,_0x25c549);},'xOMqg':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x1ac589=[_0x20c1ac(0x1c5),'user'],_0x1c5153=[];for(const _0x2c4870 of _0x1ac589){for(const _0x49b92f of RANGER_MANAGED_SKILLS){_0xae3941['PIolW'](isSkillInstalled,_0x49b92f,_0x2c4870,_0x20c1ac(0x1bc))&&_0x1c5153[_0x20c1ac(0x1f3)]({'skillName':_0x49b92f,'level':_0x2c4870,'platform':'claude'}),isSkillInstalled(_0x49b92f,_0x2c4870,_0xae3941['TOLQV'])&&_0x1c5153['push']({'skillName':_0x49b92f,'level':_0x2c4870,'platform':_0xae3941[_0x20c1ac(0x205)]});}}for(const _0x531b2a of _0x1ac589){for(const _0x29eed2 of DEPRECATED_SKILLS){await _0xae3941['jGUPp'](removeSkill,_0x29eed2,_0x531b2a);}}if(_0x1c5153['length']===0x0){console['log'](_0xae3941['xOMqg']);return;}console['log'](_0x20c1ac(0x207)+_0x1c5153[_0x20c1ac(0x1f6)]+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1fa617,level:_0x52fdaf,platform:_0x3920da}of _0x1c5153){try{await installSkill(_0x1fa617,{'level':_0x52fdaf,'cliVersion':_0x47f29d,'platform':_0x3920da});}catch(_0x123a23){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x3920da+'\x20'+_0x52fdaf+'\x20skill\x20'+_0x1fa617+':',_0x123a23);}}}async function ensureActiveProfileGitignored(){const _0x28f9f0=_0x363c4f,_0x49c221={'GPbrR':function(_0x377e90){return _0x377e90();},'FeCuN':'.gitignore','RNISv':function(_0x115d4b,_0x3ac117){return _0x115d4b(_0x3ac117);},'tXupJ':function(_0x46e9f7,_0x51abdf,_0xf144dd,_0x140501){return _0x46e9f7(_0x51abdf,_0xf144dd,_0x140501);},'OPUDk':'utf-8'},_0x1c5a1c=join(_0x49c221[_0x28f9f0(0x1c3)](getRangerDir),_0x49c221['FeCuN']);if(!_0x49c221[_0x28f9f0(0x20d)](existsSync,_0x1c5a1c))return![];let _0x42d993='';try{_0x42d993=await readFile(_0x1c5a1c,'utf-8');}catch{return![];}const _0x36541e=_0x42d993['split'](/\r?\n/);if(_0x36541e[_0x28f9f0(0x1c6)](_0x5295f1=>_0x5295f1[_0x28f9f0(0x1ca)]()===_0x28f9f0(0x206)))return![];let _0x901e68=_0x36541e[_0x28f9f0(0x1bb)](_0x4aa67e=>_0x4aa67e[_0x28f9f0(0x1ca)]()===_0x28f9f0(0x1c8));_0x901e68===-0x1&&(_0x901e68=_0x36541e['length']);_0x36541e['splice'](_0x901e68,0x0,_0x28f9f0(0x206));let _0x2384ab=_0x36541e[_0x28f9f0(0x1eb)]('\x0a');!_0x2384ab[_0x28f9f0(0x1f5)]('\x0a')&&(_0x2384ab+='\x0a');try{await _0x49c221['tXupJ'](writeFile,_0x1c5a1c,_0x2384ab,_0x49c221[_0x28f9f0(0x1e7)]);}catch{return![];}return!![];}export async function update(){const _0x5994a4=_0x363c4f,_0x249bd7={'TrTLj':function(_0x26a6bb){return _0x26a6bb();},'VPRBD':function(_0x171dc1,_0x26ce33){return _0x171dc1(_0x26ce33);},'HAtLA':function(_0x4d0222,_0x3efa41){return _0x4d0222(_0x3efa41);},'QZalj':_0x5994a4(0x1c1),'hxlfy':function(_0x261f80,_0x21b268){return _0x261f80+_0x21b268;},'IESGe':'\x0aSuccessfully\x20installed\x20latest\x20version.','tkMJP':_0x5994a4(0x1e8),'zkHry':function(_0x41f848,_0x221a36){return _0x41f848<_0x221a36;},'FwDSe':_0x5994a4(0x1d0),'AwpQm':_0x5994a4(0x1b8),'YVenZ':_0x5994a4(0x1c5),'weoBe':function(_0x1f0ec8,_0x52cb9c){return _0x1f0ec8===_0x52cb9c;}},_0x29b4ef=_0x249bd7['TrTLj'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x29b4ef);const _0x2949da=_0x249bd7['VPRBD'](resolveDistTag,_0x29b4ef);if(_0x2949da!==_0x5994a4(0x1bf)){console[_0x5994a4(0x1e6)]('Prerelease\x20channel\x20detected\x20(@'+_0x2949da+_0x5994a4(0x202)+_0x2949da+'\x20—\x20reinstalling\x20@'+_0x2949da+'...');const _0x10ff75=await runInstall(_0x29b4ef);if(!_0x10ff75)throw new Error('Update\x20failed\x20for\x20@'+_0x2949da+_0x5994a4(0x1d6));const _0x171a25=_0x249bd7['TrTLj'](getCurrentVersion);console[_0x5994a4(0x1e6)](_0x5994a4(0x1f0)+PACKAGE_NAME+'@'+_0x2949da+'.'),await _0x249bd7[_0x5994a4(0x1ef)](reinstallSkills,_0x171a25),await ensureActiveProfileGitignored(),console['log'](_0x249bd7['QZalj']);return;}console['log']('Checking\x20for\x20updates...');const _0x81759a=parseInt(_0x29b4ef['split']('.')[0x0],0xa);if(!Number[_0x5994a4(0x1cb)](_0x81759a))throw new Error(_0x249bd7['hxlfy'](_0x5994a4(0x1e5)+_0x29b4ef+'\x22.\x20'+_0x5994a4(0x1be),'npm\x20i\x20-g\x20'+PACKAGE_NAME+_0x5994a4(0x20c)));const _0xa98a4b=getLatestVersion(_0x81759a);let _0x21c585=_0x29b4ef;if(!_0xa98a4b[_0x5994a4(0x1dd)]){console['warn'](_0x5994a4(0x1ec)+_0xa98a4b[_0x5994a4(0x209)]),console[_0x5994a4(0x1e6)](_0x5994a4(0x1f2));const _0x3c2c80=await _0x249bd7['HAtLA'](runInstall,_0x29b4ef);if(_0x3c2c80)console['log'](_0x249bd7[_0x5994a4(0x208)]),_0x21c585=getCurrentVersion();else throw new Error(_0x5994a4(0x204)+_0xa98a4b['error']);}else{const _0x27b415=_0xa98a4b['version'];console['log']('Latest\x20version:\x20\x20'+_0x27b415);const _0x496ed6=compareVersions(_0x29b4ef,_0x27b415);if(_0x496ed6===0x0)console['log'](_0x249bd7['tkMJP']);else{if(_0x249bd7['zkHry'](_0x496ed6,0x0))console[_0x5994a4(0x1e6)]('\x0aYour\x20version\x20('+_0x29b4ef+_0x5994a4(0x1d2)+_0x27b415+').');else{const _0x43e8c6=await _0x249bd7['HAtLA'](runInstall,_0x29b4ef);if(_0x43e8c6)console[_0x5994a4(0x1e6)](_0x5994a4(0x1f9)+_0x27b415),_0x21c585=_0x27b415;else throw new Error('Update\x20failed.');}}}await reinstallSkills(_0x21c585);const _0x5dcace=await _0x249bd7[_0x5994a4(0x210)](isMarketplaceAdded,_0x5994a4(0x1d5)),_0x56d875=await isPluginInstalled(_0x249bd7['FwDSe']);_0x5dcace&&(await updateClaudeMarketplace(),console['log'](_0x249bd7['AwpQm']));if(_0x56d875){const _0x301891=await _0x249bd7[_0x5994a4(0x1ef)](getPluginInfo,_0x249bd7[_0x5994a4(0x1d7)]),_0x5b878a=_0x301891?.[_0x5994a4(0x1e9)]??'user';await updateClaudePlugin(_0x5b878a);if(_0x5b878a===_0x249bd7['YVenZ'])console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x249bd7[_0x5994a4(0x1fd)](_0x5b878a,'local')?console[_0x5994a4(0x1e6)](_0x5994a4(0x1c0)):console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).');}const _0x4875d3=await _0x249bd7['TrTLj'](ensureActiveProfileGitignored);console['log']('\x0a✅\x20Update\x20complete!');}
|
|
1
|
+
const _0x2a5a56=_0x3618;(function(_0x537bed,_0x3566db){const _0x3a2cb9=_0x3618,_0x1f066e=_0x537bed();while(!![]){try{const _0x28fe7b=-parseInt(_0x3a2cb9(0xba))/0x1+parseInt(_0x3a2cb9(0xd4))/0x2*(-parseInt(_0x3a2cb9(0x9e))/0x3)+-parseInt(_0x3a2cb9(0xa7))/0x4+-parseInt(_0x3a2cb9(0xc5))/0x5+-parseInt(_0x3a2cb9(0xde))/0x6+-parseInt(_0x3a2cb9(0xd1))/0x7+parseInt(_0x3a2cb9(0x9a))/0x8*(parseInt(_0x3a2cb9(0xb5))/0x9);if(_0x28fe7b===_0x3566db)break;else _0x1f066e['push'](_0x1f066e['shift']());}catch(_0x1bd8de){_0x1f066e['push'](_0x1f066e['shift']());}}}(_0x3d1b,0x7a1be));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 _0x3d1b(){const _0x32e615=['claude','findIndex','uPnpe',').\x20Staying\x20on\x20','.gitignore','7399062MCXUeg','stdio','GPGCf','project','install','22208sJNPNG','OUiNH','amIuz','MdYtT','log','LJIuX','plugin','test','QTADe','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','length','4029435zbbjwO',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','update','Update\x20failed\x20for\x20@','MuCZD','enTkS','inherit','Prerelease\x20channel\x20detected\x20(@','active-profile.txt','Update\x20failed:\x20','active-feature.txt','CGJzB','5019525mAQfIl','ZsnZw','utf-8','2BvisyM','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','beta','\x0aCurrent\x20version:\x20','latest','\x0aSuccessfully\x20installed\x20','user','close','\x0aInstalling\x20','ktwNH','2029866qxyvdc','bqNSF','POcBh','split','OXajq','win32','Claude\x20plugin\x20update\x20failed\x20for\x20','\x0a✅\x20Update\x20complete!','\x20—\x20reinstalling\x20@','isFinite','cxJtS','mJoPL','\x0aReinstalling\x20','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','xxFYp','trim','ajIIm','ranger@trailhead','npm\x20i\x20-g\x20','fAHwn','error','\x0aSuccessfully\x20installed\x20latest\x20version.','ISdqg','40qLdStM','KDLmI','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','...\x0a','2903643FvKzAY','endsWith','cwd','Update\x20failed.','warn','dGNOJ','SeYTh','\x0aCould\x20not\x20check\x20latest\x20version:\x20','wEtYh','3036280TKxhCC','...','push','UIdDG','.0.0','tkjNS','JdbTT','HDzFT','rxKVm'];_0x3d1b=function(){return _0x32e615;};return _0x3d1b();}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(_0x4c7239,_0x4fd0a5,_0x163b45){const _0x307d1a=_0x3618,_0x34a2c7={'OUiNH':function(_0x3b7bbf,_0x16b198){return _0x3b7bbf(_0x16b198);},'rWaQD':function(_0x422939,_0x527903,_0x4fcfe9,_0xd5e942){return _0x422939(_0x527903,_0x4fcfe9,_0xd5e942);},'mJoPL':'ignore','zbqFF':'inherit','cCTBJ':_0x307d1a(0xe3)};return new Promise(_0x193278=>{const _0x25b453=_0x307d1a,_0x426207={'OXajq':function(_0xd98720,_0x2d23c4){const _0x4345cc=_0x3618;return _0x34a2c7[_0x4345cc(0xbb)](_0xd98720,_0x2d23c4);}};let _0x42d7d2=![],_0x379d42;const _0x46b921=_0x560d21=>{const _0xedde65=_0x3618;if(_0x42d7d2)return;_0x42d7d2=!![],_0x379d42&&_0x426207[_0xedde65(0xe2)](clearTimeout,_0x379d42),_0x193278(_0x560d21);},_0x37f8b2=_0x34a2c7['rWaQD'](spawn,_0x4c7239,_0x4fd0a5,{'stdio':[_0x34a2c7[_0x25b453(0xe9)],_0x163b45?.['stdio']??'inherit',_0x163b45?.[_0x25b453(0xb6)]??_0x34a2c7['zbqFF']],'cwd':_0x163b45?.[_0x25b453(0xa0)],'shell':process['platform']===_0x34a2c7['cCTBJ']});_0x379d42=_0x163b45?.['timeoutMs']?setTimeout(()=>{_0x37f8b2['kill'](),_0x37f8b2['unref'](),_0x426207['OXajq'](_0x46b921,![]);},_0x163b45['timeoutMs']):undefined,_0x37f8b2['on']('close',_0x11ebd0=>{_0x46b921(_0x11ebd0===0x0);}),_0x37f8b2['on']('error',()=>{_0x46b921(![]);});});}export function resolveDistTag(_0xee3f56){const _0x589e5f=_0x3618,_0x3d55f1={'dGNOJ':'alpha','GPGCf':_0x589e5f(0xd8)};if(/-alpha\./i['test'](_0xee3f56))return _0x3d55f1[_0x589e5f(0xa3)];if(/-beta\./i[_0x589e5f(0xc1)](_0xee3f56))return _0x589e5f(0xd6);if(/-rc\./i['test'](_0xee3f56))return'rc';return _0x3d55f1[_0x589e5f(0xb7)];}export function resolveInstallTarget(_0x2134a0){const _0x13ef04=_0x3618,_0x386dde={'UxJMw':function(_0x3c965d,_0x5d243b){return _0x3c965d!==_0x5d243b;},'enTkS':'latest','mOdUG':function(_0x19cdfc,_0x178957,_0x5d0b17){return _0x19cdfc(_0x178957,_0x5d0b17);}},_0x33ada6=resolveDistTag(_0x2134a0);if(_0x386dde['UxJMw'](_0x33ada6,_0x386dde[_0x13ef04(0xca)]))return _0x33ada6;const _0x50c1a1=_0x2134a0['split']('.')[0x0],_0x43802c=_0x386dde['mOdUG'](parseInt,_0x50c1a1,0xa);if(!Number['isFinite'](_0x43802c))return _0x386dde[_0x13ef04(0xca)];return'^'+_0x43802c+_0x13ef04(0xab);}function _0x3618(_0x19daff,_0x162045){_0x19daff=_0x19daff-0x95;const _0x3d1ba8=_0x3d1b();let _0x36183b=_0x3d1ba8[_0x19daff];return _0x36183b;}async function runInstall(_0xcd4ac){const _0x2ef7a5=_0x3618,_0x58c35d={'myrSV':'ignore','POcBh':'inherit','xxFYp':function(_0x2600ac,_0x1616ec){return _0x2600ac===_0x1616ec;},'JdbTT':_0x2ef7a5(0xdb),'QTADe':_0x2ef7a5(0x97),'amIuz':function(_0x54f0c6,_0x3a0511){return _0x54f0c6(_0x3a0511);}},_0x45c11f=_0x58c35d[_0x2ef7a5(0xbc)](resolveInstallTarget,_0xcd4ac);return new Promise(_0x166415=>{const _0x2abfac=_0x2ef7a5,_0x1b1cb3={'CUFPL':function(_0x170482,_0x355f02){return _0x170482===_0x355f02;}};console['log'](_0x2abfac(0xdc)+PACKAGE_NAME+'@'+_0x45c11f+_0x2abfac(0x9d));const _0x1cbc2d=spawn('npm',[_0x2abfac(0xb9),'-g',PACKAGE_NAME+'@'+_0x45c11f],{'stdio':[_0x58c35d['myrSV'],_0x58c35d[_0x2abfac(0xe0)],_0x2abfac(0xcb)],'shell':_0x58c35d[_0x2abfac(0xec)](process['platform'],_0x2abfac(0xe3))});_0x1cbc2d['on'](_0x58c35d[_0x2abfac(0xad)],_0x5b0c30=>{_0x166415(_0x1b1cb3['CUFPL'](_0x5b0c30,0x0));}),_0x1cbc2d['on'](_0x58c35d[_0x2abfac(0xc2)],()=>{_0x166415(![]);});});}async function updateClaudeMarketplace(){const _0x41e41e=_0x3618,_0x10ea20={'qLbcj':function(_0x534b91,_0x5e75e3,_0xc57984,_0x2ccfad){return _0x534b91(_0x5e75e3,_0xc57984,_0x2ccfad);},'wEtYh':_0x41e41e(0xb0),'YxeJp':_0x41e41e(0xc0),'zaJJH':'marketplace','xkdbj':_0x41e41e(0xc7),'UIdDG':_0x41e41e(0x9c)},_0x1208f9=await _0x10ea20['qLbcj'](runCommand,_0x10ea20[_0x41e41e(0xa6)],[_0x10ea20['YxeJp'],_0x10ea20['zaJJH'],_0x10ea20['xkdbj'],'trailhead'],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x1208f9)throw new Error(_0x10ea20[_0x41e41e(0xaa)]);}async function updateClaudePlugin(_0x4a0cde=_0x2a5a56(0xda)){const _0x2ff07d=_0x2a5a56,_0x4f1de9={'LJIuX':_0x2ff07d(0xc7),'CGJzB':_0x2ff07d(0xda),'bYTaZ':'--scope','uAXFb':_0x2ff07d(0xb8),'ZsnZw':function(_0x5820bc,_0x442cff){return _0x5820bc===_0x442cff;}},_0x4b3543=[_0x2ff07d(0xc0),_0x4f1de9[_0x2ff07d(0xbf)],'ranger@trailhead'];_0x4a0cde!==_0x4f1de9[_0x2ff07d(0xd0)]&&_0x4b3543[_0x2ff07d(0xa9)](_0x4f1de9['bYTaZ'],_0x4a0cde);const _0x3b3845=await runCommand(_0x2ff07d(0xb0),_0x4b3543,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x4a0cde===_0x4f1de9['uAXFb']||_0x4f1de9[_0x2ff07d(0xd2)](_0x4a0cde,'local')?getProjectRoot():undefined});if(!_0x3b3845)throw new Error(_0x2ff07d(0xe4)+_0x4a0cde+_0x2ff07d(0xd5));}function isSkillInstalled(_0x3b4c97,_0x208a7e,_0x3b4aee){const _0x1aecfe=_0x2a5a56,_0x32ea0d={'gFJdj':function(_0x31eda6,_0x11088c){return _0x31eda6===_0x11088c;},'HDzFT':function(_0x5be929,_0x3c6bb4){return _0x5be929(_0x3c6bb4);},'MdYtT':function(_0xa955f0,_0x549ab0){return _0xa955f0(_0x549ab0);}},_0x3f9b53=_0x32ea0d['gFJdj'](_0x3b4aee,'opencode')?_0x32ea0d[_0x1aecfe(0xae)](getOpencodeSkillsDir,_0x208a7e):_0x32ea0d[_0x1aecfe(0xbd)](getSkillsDir,_0x208a7e),_0x27e093=join(_0x3f9b53,_0x3b4c97);return existsSync(_0x27e093);}async function reinstallSkills(_0x50fff1){const _0x1c4229=_0x2a5a56,_0x3ed56c={'ABRIC':'project','JEonn':function(_0x527cef,_0xb72fa8,_0x1f521d,_0x1593a9){return _0x527cef(_0xb72fa8,_0x1f521d,_0x1593a9);},'MuCZD':'claude','KnsKg':function(_0x3b929a,_0x1aa5e4,_0x3fb621){return _0x3b929a(_0x1aa5e4,_0x3fb621);},'Ujwod':function(_0x5c49b9,_0x73a52c){return _0x5c49b9===_0x73a52c;},'DaPyh':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x150369=[_0x3ed56c['ABRIC'],_0x1c4229(0xda)],_0x409d37=[];for(const _0xe8b50d of _0x150369){for(const _0x4ff0c1 of RANGER_MANAGED_SKILLS){_0x3ed56c['JEonn'](isSkillInstalled,_0x4ff0c1,_0xe8b50d,_0x3ed56c['MuCZD'])&&_0x409d37['push']({'skillName':_0x4ff0c1,'level':_0xe8b50d,'platform':_0x3ed56c[_0x1c4229(0xc9)]}),_0x3ed56c['JEonn'](isSkillInstalled,_0x4ff0c1,_0xe8b50d,'opencode')&&_0x409d37['push']({'skillName':_0x4ff0c1,'level':_0xe8b50d,'platform':'opencode'});}}for(const _0x16387c of _0x150369){for(const _0x1f710d of DEPRECATED_SKILLS){await _0x3ed56c['KnsKg'](removeSkill,_0x1f710d,_0x16387c);}}if(_0x3ed56c['Ujwod'](_0x409d37['length'],0x0)){console['log'](_0x3ed56c['DaPyh']);return;}console[_0x1c4229(0xbe)](_0x1c4229(0xea)+_0x409d37['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x25d432,level:_0x505eaf,platform:_0x16f923}of _0x409d37){try{await installSkill(_0x25d432,{'level':_0x505eaf,'cliVersion':_0x50fff1,'platform':_0x16f923});}catch(_0xa73be7){console[_0x1c4229(0xa2)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x16f923+'\x20'+_0x505eaf+'\x20skill\x20'+_0x25d432+':',_0xa73be7);}}}async function ensureActiveProfileGitignored(){const _0x3609c7=_0x2a5a56,_0x2afec7={'raLsn':function(_0x3cb0c0,_0x49ba51,_0x1f36a1){return _0x3cb0c0(_0x49ba51,_0x1f36a1);}},_0x23f1ae=join(getRangerDir(),_0x3609c7(0xb4));if(!existsSync(_0x23f1ae))return![];let _0x125543='';try{_0x125543=await _0x2afec7['raLsn'](readFile,_0x23f1ae,_0x3609c7(0xd3));}catch{return![];}const _0x16f50c=_0x125543['split'](/\r?\n/);if(_0x16f50c['some'](_0x5610cd=>_0x5610cd[_0x3609c7(0xed)]()===_0x3609c7(0xcd)))return![];let _0x161d6d=_0x16f50c[_0x3609c7(0xb1)](_0x54d268=>_0x54d268['trim']()===_0x3609c7(0xcf));_0x161d6d===-0x1&&(_0x161d6d=_0x16f50c[_0x3609c7(0xc4)]);_0x16f50c['splice'](_0x161d6d,0x0,'active-profile.txt');let _0x4f2cad=_0x16f50c['join']('\x0a');!_0x4f2cad[_0x3609c7(0x9f)]('\x0a')&&(_0x4f2cad+='\x0a');try{await writeFile(_0x23f1ae,_0x4f2cad,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x145252=_0x2a5a56,_0x3cdd6f={'tkjNS':function(_0x5e5830){return _0x5e5830();},'rxKVm':function(_0x1d0a94,_0x5e5d6d){return _0x1d0a94(_0x5e5d6d);},'Qicpi':function(_0x2dee24,_0x24bd4c){return _0x2dee24!==_0x24bd4c;},'VFHGn':'latest','NkTis':function(_0x4e9631,_0xb37a47,_0x1912bc){return _0x4e9631(_0xb37a47,_0x1912bc);},'ZDAfC':function(_0x423b39,_0x318d80){return _0x423b39+_0x318d80;},'ISdqg':function(_0x58b489,_0x1091a8){return _0x58b489+_0x1091a8;},'Iwjbs':'Attempting\x20install\x20anyway...','bqNSF':function(_0x2a007d,_0x6c3d81){return _0x2a007d(_0x6c3d81);},'uPnpe':function(_0x43bce3){return _0x43bce3();},'SeYTh':_0x145252(0xeb),'jtPal':_0x145252(0xa1),'cqHZG':'trailhead','KDLmI':function(_0x14b854,_0x5514ac){return _0x14b854(_0x5514ac);},'LQTms':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','ktwNH':'user','fAHwn':'project','cxJtS':function(_0x352801,_0x3e7e77){return _0x352801===_0x3e7e77;},'ajIIm':'local','QUrAT':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'},_0x378a41=_0x3cdd6f[_0x145252(0xac)](getCurrentVersion);console[_0x145252(0xbe)](_0x145252(0xd7)+_0x378a41);const _0x25bd3b=_0x3cdd6f[_0x145252(0xaf)](resolveDistTag,_0x378a41);if(_0x3cdd6f['Qicpi'](_0x25bd3b,_0x3cdd6f['VFHGn'])){console[_0x145252(0xbe)](_0x145252(0xcc)+_0x25bd3b+_0x145252(0xb3)+_0x25bd3b+_0x145252(0xe6)+_0x25bd3b+_0x145252(0xa8));const _0x16de17=await _0x3cdd6f[_0x145252(0xaf)](runInstall,_0x378a41);if(!_0x16de17)throw new Error(_0x145252(0xc8)+_0x25bd3b+'\x20channel.');const _0x2f0639=_0x3cdd6f[_0x145252(0xac)](getCurrentVersion);console[_0x145252(0xbe)](_0x145252(0xd9)+PACKAGE_NAME+'@'+_0x25bd3b+'.'),await reinstallSkills(_0x2f0639),await ensureActiveProfileGitignored(),console['log']('\x0a✅\x20Update\x20complete!');return;}console['log']('Checking\x20for\x20updates...');const _0x297971=_0x3cdd6f['NkTis'](parseInt,_0x378a41[_0x145252(0xe1)]('.')[0x0],0xa);if(!Number[_0x145252(0xe7)](_0x297971))throw new Error(_0x3cdd6f['ZDAfC'](_0x3cdd6f[_0x145252(0x99)]('Could\x20not\x20determine\x20the\x20current\x20major\x20version\x20from\x20\x22'+_0x378a41+'\x22.\x20','Aborting\x20to\x20avoid\x20a\x20cross-major\x20upgrade.\x20Reinstall\x20explicitly\x20with:\x20'),_0x145252(0x95)+PACKAGE_NAME+'@latest'));const _0x2788c4=getLatestVersion(_0x297971);let _0x3ff12f=_0x378a41;if(!_0x2788c4['version']){console[_0x145252(0xa2)](_0x145252(0xa5)+_0x2788c4['error']),console[_0x145252(0xbe)](_0x3cdd6f['Iwjbs']);const _0x1cb632=await _0x3cdd6f[_0x145252(0xdf)](runInstall,_0x378a41);if(_0x1cb632)console[_0x145252(0xbe)](_0x145252(0x98)),_0x3ff12f=_0x3cdd6f[_0x145252(0xb2)](getCurrentVersion);else throw new Error(_0x145252(0xce)+_0x2788c4['error']);}else{const _0x2fc489=_0x2788c4['version'];console[_0x145252(0xbe)]('Latest\x20version:\x20\x20'+_0x2fc489);const _0x2f482c=_0x3cdd6f['NkTis'](compareVersions,_0x378a41,_0x2fc489);if(_0x2f482c===0x0)console[_0x145252(0xbe)](_0x3cdd6f[_0x145252(0xa4)]);else{if(_0x2f482c<0x0)console['log']('\x0aYour\x20version\x20('+_0x378a41+_0x145252(0xc6)+_0x2fc489+').');else{const _0x55af2=await runInstall(_0x378a41);if(_0x55af2)console[_0x145252(0xbe)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2fc489),_0x3ff12f=_0x2fc489;else throw new Error(_0x3cdd6f['jtPal']);}}}await reinstallSkills(_0x3ff12f);const _0x2dac94=await _0x3cdd6f[_0x145252(0xdf)](isMarketplaceAdded,_0x3cdd6f['cqHZG']),_0x1c5f8d=await _0x3cdd6f[_0x145252(0x9b)](isPluginInstalled,'ranger@trailhead');_0x2dac94&&(await updateClaudeMarketplace(),console[_0x145252(0xbe)](_0x3cdd6f['LQTms']));if(_0x1c5f8d){const _0x3a33a8=await getPluginInfo(_0x145252(0xef)),_0x4d9890=_0x3a33a8?.['scope']??_0x3cdd6f[_0x145252(0xdd)];await updateClaudePlugin(_0x4d9890);if(_0x4d9890===_0x3cdd6f[_0x145252(0x96)])console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x3cdd6f[_0x145252(0xe8)](_0x4d9890,_0x3cdd6f[_0x145252(0xee)])?console['log'](_0x145252(0xc3)):console[_0x145252(0xbe)](_0x3cdd6f['QUrAT']);}const _0x5c540b=await _0x3cdd6f['tkjNS'](ensureActiveProfileGitignored);console[_0x145252(0xbe)](_0x145252(0xe5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4aa019,_0x56e2db){const _0x339872=_0x23bb,_0x45c4e2=_0x4aa019();while(!![]){try{const _0x4c9479=-parseInt(_0x339872(0x134))/0x1*(parseInt(_0x339872(0x126))/0x2)+-parseInt(_0x339872(0x127))/0x3+parseInt(_0x339872(0x13b))/0x4*(parseInt(_0x339872(0x132))/0x5)+parseInt(_0x339872(0x119))/0x6*(-parseInt(_0x339872(0x121))/0x7)+parseInt(_0x339872(0x12c))/0x8+parseInt(_0x339872(0x111))/0x9+-parseInt(_0x339872(0x117))/0xa*(-parseInt(_0x339872(0x11d))/0xb);if(_0x4c9479===_0x56e2db)break;else _0x45c4e2['push'](_0x45c4e2['shift']());}catch(_0x56c321){_0x45c4e2['push'](_0x45c4e2['shift']());}}}(_0xab0f,0x91598));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';function _0x23bb(_0x55d1f8,_0x5d2ef2){_0x55d1f8=_0x55d1f8-0x110;const _0xab0f9d=_0xab0f();let _0x23bbdf=_0xab0f9d[_0x55d1f8];return _0x23bbdf;}import{isInteractive,resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';function _0xab0f(){const _0x49181a=['\x20--url\x20<your-app-url>\x0a','1783024GErDQy','VCKcH','error','hsWde','OiWdL','legacy','65skluLh','not_configured','5yMcVSJ','\x20\x20ranger\x20profile\x20add\x20','TswHJ','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','Re-create\x20it\x20with:\x0a','Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).','79288rfpguZ','TZNfI','4840128fPEeKT','FNgFH','\x20\x20Server-side\x20login\x20error:\x20','domains','\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...','\x22\x20via\x20server-side\x20login...','70brMWdq','\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a','5064VbDtdx','exit','\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','QtAqZ','2415457xvFBzB','log','environmentKey','✓\x20Session\x20refreshed\x20for\x20\x22','1057YDGXmq','Run\x20`ranger\x20profile\x20update\x20','NPWRs','Profile\x20\x22','Capturing\x20a\x20fresh\x20session\x20for\x20\x22','357432ShrGtd','2817267UBMrIO','No\x20profile\x20named\x20\x22','MJtXO','GSZHp'];_0xab0f=function(){return _0x49181a;};return _0xab0f();}import{mergeCloudProfileSettings,readProfileOverrides}from'./utils/projectsConfig.js';import{getEnvNames}from'./env.js';export async function updateEnv(_0x76502f,_0x2074f3,_0x330024){const _0x37ab05=_0x23bb,_0x104123={'IXqrH':_0x37ab05(0x131),'GSZHp':function(_0x5ca159,_0x24bcfb){return _0x5ca159===_0x24bcfb;},'PYzbZ':'local','rgmyD':function(_0x161744,_0x46a006){return _0x161744===_0x46a006;},'NPWRs':function(_0x26e43b,_0x490e61){return _0x26e43b+_0x490e61;},'TswHJ':function(_0x323b23,_0x81e90b){return _0x323b23+_0x81e90b;},'AOmlM':function(_0x31164c,_0x1aa6cf,_0x4ce908){return _0x31164c(_0x1aa6cf,_0x4ce908);},'MJtXO':'success','FNgFH':function(_0x28632b,_0x4c271f){return _0x28632b===_0x4c271f;},'VCKcH':function(_0x5deda2,_0x43faea){return _0x5deda2 instanceof _0x43faea;},'VpzKI':function(_0x4d78eb,_0x4f8fa8){return _0x4d78eb(_0x4f8fa8);},'xTKVE':_0x37ab05(0x137),'QtAqZ':function(_0x36d4d3,_0x51b666,_0x568ddf){return _0x36d4d3(_0x51b666,_0x568ddf);},'OiWdL':function(_0x1c4c65,_0x4e85cb,_0x378879){return _0x1c4c65(_0x4e85cb,_0x378879);},'hsWde':function(_0x437606,_0x333147){return _0x437606+_0x333147;},'FROZa':function(_0x8a6549,_0x466a90){return _0x8a6549+_0x466a90;},'jgYXj':function(_0x304ef3){return _0x304ef3();},'TZNfI':function(_0x5b9adc,_0x20a9b7,_0x313834){return _0x5b9adc(_0x20a9b7,_0x313834);}},_0x4aa34c=await fetchCloudProfile(_0x76502f);if(!_0x4aa34c){const {envTypes:_0x3a2e7e}=await getEnvNames(),_0x2904d7=_0x3a2e7e[_0x76502f];(_0x2904d7===_0x104123['IXqrH']||_0x104123[_0x37ab05(0x12a)](_0x2904d7,_0x104123['PYzbZ'])||_0x104123['rgmyD'](_0x2904d7,'ci'))&&(console[_0x37ab05(0x12e)](_0x104123[_0x37ab05(0x123)](_0x104123[_0x37ab05(0x123)](_0x104123[_0x37ab05(0x136)](_0x37ab05(0x124)+_0x76502f+_0x37ab05(0x118),_0x37ab05(0x139)),'\x0a'),'\x20\x20ranger\x20profile\x20add\x20'+_0x76502f+'\x0a')),process['exit'](0x1));}!_0x4aa34c&&(console['error'](_0x37ab05(0x128)+_0x76502f+'\x22\x20found.\x0a'+'Create\x20it\x20with:\x0a'+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x76502f+'\x0a')),process['exit'](0x1));const _0x20ab74=await fetchAuthConfig()['catch'](()=>null),_0x7f4291=_0x4aa34c['environmentKey']&&_0x20ab74?_0x104123['AOmlM'](resolveAuthEnvironmentLocally,_0x20ab74,_0x4aa34c['environmentKey']):null;if(_0x4aa34c[_0x37ab05(0x11f)]&&_0x7f4291&&!_0x330024?.['manual']){console['log']('Refreshing\x20session\x20for\x20\x22'+_0x76502f+_0x37ab05(0x116));try{const _0x63aeea=await serverSideLogin(_0x76502f,{'force':!![]});if(_0x63aeea['status']===_0x104123[_0x37ab05(0x129)]){console['log'](_0x37ab05(0x120)+_0x76502f+'\x22.');return;}_0x104123[_0x37ab05(0x112)](_0x63aeea['status'],_0x37ab05(0x133))?console[_0x37ab05(0x11e)](_0x37ab05(0x115)):(_0x63aeea['test_output']&&(console[_0x37ab05(0x11e)](_0x37ab05(0x11b)),console[_0x37ab05(0x11e)](_0x63aeea['test_output'])),console['log']('\x20\x20Falling\x20back\x20to\x20headed\x20browser...'));}catch(_0x492bc6){console['log'](_0x37ab05(0x113)+(_0x104123[_0x37ab05(0x12d)](_0x492bc6,Error)?_0x492bc6['message']:_0x104123['VpzKI'](String,_0x492bc6))),console[_0x37ab05(0x11e)](_0x104123['xTKVE']);}}const _0x2e4da0=_0x104123[_0x37ab05(0x11c)](readProfileOverrides,process['cwd'](),_0x76502f),_0x2495de=_0x104123[_0x37ab05(0x130)](mergeCloudProfileSettings,_0x4aa34c['settings']??{},_0x2e4da0??undefined),_0x5b45a6=_0x2495de['setupHeaders'],_0x64b010=_0x2495de['baseUrl'],_0xdfa6f2=_0x7f4291?{..._0x7f4291,'domains':_0x64b010?[_0x64b010,..._0x7f4291[_0x37ab05(0x114)]]:_0x7f4291[_0x37ab05(0x114)],'setupHeaders':_0x5b45a6??_0x7f4291['setupHeaders']}:_0x64b010?{'key':_0x4aa34c['environmentKey']??'','domains':[_0x64b010],'setupHeaders':_0x5b45a6}:null;!_0xdfa6f2&&(console['error'](_0x104123[_0x37ab05(0x12f)](_0x104123['FROZa'](_0x104123['hsWde'](_0x37ab05(0x124)+_0x76502f+'\x22\x20has\x20no\x20URL\x20on\x20file\x20to\x20refresh\x20against.\x0a',_0x37ab05(0x138)),'\x0a'),_0x37ab05(0x135)+_0x76502f+_0x37ab05(0x12b))),process['exit'](0x1)),!_0x104123['jgYXj'](isInteractive)&&(console['error']('Can\x27t\x20refresh\x20\x22'+_0x76502f+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a'+(_0x37ab05(0x122)+_0x76502f+_0x37ab05(0x13a))),process[_0x37ab05(0x11a)](0x1)),console['log'](_0x37ab05(0x125)+_0x76502f+'\x22\x20via\x20headed\x20browser...'),await _0x104123[_0x37ab05(0x110)](manualBrowserLogin,_0x4aa34c,_0xdfa6f2),console['log'](_0x37ab05(0x120)+_0x76502f+'\x22.');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe1e06f,_0x3a8129){const _0x33389b=_0x2171,_0x50e235=_0xe1e06f();while(!![]){try{const _0x1f87cc=-parseInt(_0x33389b(0xa8))/0x1*(parseInt(_0x33389b(0xb3))/0x2)+-parseInt(_0x33389b(0xb2))/0x3+-parseInt(_0x33389b(0xab))/0x4*(parseInt(_0x33389b(0xa6))/0x5)+-parseInt(_0x33389b(0xaa))/0x6*(-parseInt(_0x33389b(0xa5))/0x7)+parseInt(_0x33389b(0xaf))/0x8*(parseInt(_0x33389b(0xb1))/0x9)+parseInt(_0x33389b(0xae))/0xa+-parseInt(_0x33389b(0xb5))/0xb*(parseInt(_0x33389b(0xa7))/0xc);if(_0x1f87cc===_0x3a8129)break;else _0x50e235['push'](_0x50e235['shift']());}catch(_0x2b6778){_0x50e235['push'](_0x50e235['shift']());}}}(_0x7eaa,0xebded));import{join}from'path';function _0x2171(_0x43fa36,_0x14f523){_0x43fa36=_0x43fa36-0xa5;const _0x7eaa83=_0x7eaa();let _0x2171d0=_0x7eaa83[_0x43fa36];return _0x2171d0;}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x7eaa(){const _0x1e643f=['17868uOXqFT','293WbpgXU','oLJkS','6ZxFCAw','20xXYEKp','`\x20to\x20create\x20one.','usBmJ','7035170xdxYLc','32XTXLqR','status','3692457dwNrgz','51285ACzGZe','1336dqRddE','log','6941oBWQwm','8154503PFwxap','1391035FisPnb'];_0x7eaa=function(){return _0x1e643f;};return _0x7eaa();}export async function useEnv(_0x591b2a){const _0x19fa45=_0x2171,_0x481512={'oLJkS':function(_0x1eeefc,_0x96469f){return _0x1eeefc instanceof _0x96469f;},'usBmJ':function(_0x57052d,_0x33193c){return _0x57052d===_0x33193c;}},_0x5ca441=getEnvDir(_0x591b2a),_0x52559b=join(_0x5ca441,'settings.json'),_0x2e2a95=existsSync(_0x5ca441)&&existsSync(_0x52559b);if(_0x2e2a95){await writeActiveProfileName(_0x591b2a),console[_0x19fa45(0xb4)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x591b2a+'\x22');return;}let _0x410d1f=null,_0x52db2d=![];try{_0x410d1f=await fetchCloudProfile(_0x591b2a);if(!_0x410d1f)_0x52db2d=!![];}catch(_0x943bdb){_0x481512[_0x19fa45(0xa9)](_0x943bdb,ApiError)&&_0x481512[_0x19fa45(0xad)](_0x943bdb[_0x19fa45(0xb0)],0x194)&&(_0x52db2d=!![]);}if(_0x52db2d)throw new Error('Profile\x20\x22'+_0x591b2a+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20'+'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+('`ranger\x20profile\x20add\x20'+_0x591b2a+_0x19fa45(0xac)));await writeActiveProfileName(_0x591b2a),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x591b2a+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2eda4b,_0x3db184){const _0x7dd96d=_0x1a6f,_0x105497=_0x2eda4b();while(!![]){try{const _0x16de31=-parseInt(_0x7dd96d(0xb3))/0x1*(-parseInt(_0x7dd96d(0xae))/0x2)+parseInt(_0x7dd96d(0xaa))/0x3+parseInt(_0x7dd96d(0xa8))/0x4*(-parseInt(_0x7dd96d(0xb2))/0x5)+parseInt(_0x7dd96d(0xa6))/0x6+parseInt(_0x7dd96d(0xb4))/0x7*(parseInt(_0x7dd96d(0xa5))/0x8)+parseInt(_0x7dd96d(0xaf))/0x9*(parseInt(_0x7dd96d(0xac))/0xa)+parseInt(_0x7dd96d(0xb1))/0xb*(-parseInt(_0x7dd96d(0xad))/0xc);if(_0x16de31===_0x3db184)break;else _0x105497['push'](_0x105497['shift']());}catch(_0x1f70f5){_0x105497['push'](_0x105497['shift']());}}}(_0x2fd6,0x2aef9));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';function _0x1a6f(_0x554caf,_0x3a4d7d){_0x554caf=_0x554caf-0xa5;const _0x2fd6cd=_0x2fd6();let _0x1a6f67=_0x2fd6cd[_0x554caf];return _0x1a6f67;}const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function _0x2fd6(){const _0x5bbc04=['935979FSdzfR','5Bspyve','20750XhlTPG','245skGOrY','15816Duewmq','1850868TWEXqY','PWPDw','1314804LztFby','JhuPv','836646TrHgZV','cwd','3170450mteCJl','72EGyyiO','4BIfbtq','9ajhzjX','RsviV'];_0x2fd6=function(){return _0x5bbc04;};return _0x2fd6();}function readLegacyActiveProfileFile(){const _0x2e99f6=_0x1a6f,_0xff94fc={'Zfuhu':function(_0x10a4d3,_0x34a0d0,_0x58e86f){return _0x10a4d3(_0x34a0d0,_0x58e86f);},'PWPDw':function(_0x5807a5){return _0x5807a5();},'IErfh':function(_0x4d660b,_0x30c474,_0x6bdd47){return _0x4d660b(_0x30c474,_0x6bdd47);},'RsviV':function(_0x62a230,_0xbcabf1){return _0x62a230(_0xbcabf1);}},_0x451380=[_0xff94fc['Zfuhu'](join,_0xff94fc[_0x2e99f6(0xa7)](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0xff94fc[_0x2e99f6(0xa7)](getRangerHomeDir),LEGACY_ACTIVE_PROFILE_FILE),join(_0xff94fc['PWPDw'](getRangerDir),LEGACY_ACTIVE_ENV_FILE),_0xff94fc['IErfh'](join,_0xff94fc[_0x2e99f6(0xa7)](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x123893 of _0x451380){if(_0xff94fc[_0x2e99f6(0xb0)](existsSync,_0x123893))return _0x123893;}return null;}export async function readActiveProfileName(){const _0x25c005=_0x1a6f,_0x3fb636={'JhuPv':function(_0x5a75e3){return _0x5a75e3();},'UWzGV':function(_0xf87f8f,_0x43146b,_0x223205){return _0xf87f8f(_0x43146b,_0x223205);}},_0x1df06e=readLastProfile(process[_0x25c005(0xab)]());if(_0x1df06e)return _0x1df06e;const _0x29a33f=_0x3fb636[_0x25c005(0xa9)](readLegacyActiveProfileFile);if(!_0x29a33f)return null;try{return(await _0x3fb636['UWzGV'](readFile,_0x29a33f,'utf-8'))['trim']()||null;}catch{return null;}}export async function writeActiveProfileName(_0x319a93){const _0x34665f={'YTkco':function(_0xbe7f73,_0x1e0799,_0x151a73){return _0xbe7f73(_0x1e0799,_0x151a73);}};_0x34665f['YTkco'](writeLastProfile,process['cwd'](),_0x319a93);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3a555b=_0x2747;(function(_0x4ecd4d,_0x5adc89){const _0x1cee6c=_0x2747,_0x44361a=_0x4ecd4d();while(!![]){try{const _0x3b6f74=parseInt(_0x1cee6c(0x1a1))/0x1*(-parseInt(_0x1cee6c(0x1b1))/0x2)+parseInt(_0x1cee6c(0x18f))/0x3+-parseInt(_0x1cee6c(0x1bd))/0x4*(-parseInt(_0x1cee6c(0x18d))/0x5)+-parseInt(_0x1cee6c(0x18b))/0x6+parseInt(_0x1cee6c(0x1ad))/0x7*(parseInt(_0x1cee6c(0x1aa))/0x8)+-parseInt(_0x1cee6c(0x1b2))/0x9+parseInt(_0x1cee6c(0x1b6))/0xa;if(_0x3b6f74===_0x5adc89)break;else _0x44361a['push'](_0x44361a['shift']());}catch(_0x28ccc4){_0x44361a['push'](_0x44361a['shift']());}}}(_0xa958,0xc399d));import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME',_0x3a555b(0x1a9),_0x3a555b(0x1af),_0x3a555b(0x1b5),_0x3a555b(0x19e),_0x3a555b(0x1be),'LOCALAPPDATA',_0x3a555b(0x197),_0x3a555b(0x1ab),'PLAYWRIGHT_BROWSERS_PATH',_0x3a555b(0x191),_0x3a555b(0x1b9),'CHROMIUM_BIN',_0x3a555b(0x196),'NPM_CONFIG_CACHE','npm_config_userconfig','NPM_CONFIG_USERCONFIG',_0x3a555b(0x199),'NPM_CONFIG_PREFIX','npm_config_registry','NPM_CONFIG_REGISTRY','DEBUG',_0x3a555b(0x1bc),'RANGER_TEST_SKIP_BROWSER_WAIT',_0x3a555b(0x194),_0x3a555b(0x193),_0x3a555b(0x1ba),'RANGERWRIGHT_FORCE_CLICK_TIMEOUT_MS',_0x3a555b(0x189),'AWS_PROFILE','AWS_REGION',_0x3a555b(0x19f),_0x3a555b(0x1b7),'AWS_SHARED_CREDENTIALS_FILE',_0x3a555b(0x19c),'AWS_SECRET_ACCESS_KEY','AWS_SESSION_TOKEN','AWS_SDK_LOAD_CONFIG','AWS_WEB_IDENTITY_TOKEN_FILE','AWS_ROLE_ARN','AWS_ROLE_SESSION_NAME',AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x3a555b(0x1ae),_0x3a555b(0x1ac),_0x3a555b(0x1b0)];function parseCustomHeaders(_0x2ae4c8){const _0x1a7dc7=_0x3a555b,_0x4c17e4={'boXLR':function(_0x2199b0,_0x201890){return _0x2199b0===_0x201890;},'nqTiO':function(_0x197083,_0x4c7346){return _0x197083+_0x4c7346;}};if(!_0x2ae4c8)return[];return _0x2ae4c8['split'](/\r?\n/)['map'](_0x5d7aee=>_0x5d7aee[_0x1a7dc7(0x192)]())[_0x1a7dc7(0x1a7)](Boolean)['map'](_0x57e7f1=>{const _0x41d740=_0x1a7dc7,_0x29a2fe=_0x57e7f1['indexOf'](':');if(_0x4c17e4['boXLR'](_0x29a2fe,-0x1))return null;const _0x59c30f=_0x57e7f1[_0x41d740(0x1b4)](0x0,_0x29a2fe)['trim'](),_0x4223b9=_0x57e7f1['slice'](_0x4c17e4['nqTiO'](_0x29a2fe,0x1))['trim']();if(!_0x59c30f)return null;return[_0x59c30f,_0x4223b9];})['filter'](_0x105ded=>_0x105ded!==null);}function _0x2747(_0x2d4998,_0x5674ee){_0x2d4998=_0x2d4998-0x188;const _0xa9586=_0xa958();let _0x274799=_0xa9586[_0x2d4998];return _0x274799;}export function getAgentPathHealthWarning(_0x2a21cf,_0x10e888=process['platform']){const _0x2ef94a=_0x3a555b,_0xa50bdc={'wCFkc':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.'},_0x503f59=[],_0x110d6b=(_0x2a21cf||'')[_0x2ef94a(0x1a6)](delimiter)[_0x2ef94a(0x1a7)](Boolean);_0x110d6b[_0x2ef94a(0x1bb)]===0x0&&_0x503f59['push'](_0x2ef94a(0x198));UNEXPANDED_PATH_TOKEN_PATTERNS[_0x2ef94a(0x18c)](_0x21cdf2=>(_0x2a21cf||'')['includes'](_0x21cdf2))&&_0x503f59[_0x2ef94a(0x19d)]('PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.');if(_0x10e888!==_0x2ef94a(0x1a5)){const _0x20e62f=_0x110d6b[_0x2ef94a(0x188)]('/usr/bin'),_0x244b07=_0x110d6b['includes']('/bin');!_0x20e62f&&!_0x244b07&&_0x503f59[_0x2ef94a(0x19d)](_0xa50bdc[_0x2ef94a(0x1a3)]);}if(_0x503f59['length']===0x0)return null;return{'summary':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','issues':_0x503f59};}export function buildAgentEnv(_0xbfdb0){const _0x420f6e=_0x3a555b,_0x50afcf={'xdAoE':'true','fTble':_0x420f6e(0x1a9),'aRguh':'TMP','TelFG':'TEMP','BlcnW':function(_0x210c8f,_0x8990a8){return _0x210c8f(_0x8990a8);},'unTfy':function(_0x3165bc,_0x2cbfb8){return _0x3165bc==_0x2cbfb8;},'cmhsN':function(_0x5dbca3,_0xf3ac43){return _0x5dbca3===_0xf3ac43;}};if(_0xbfdb0[_0x420f6e(0x1b3)])return Object[_0x420f6e(0x1a8)](Object['entries'](process[_0x420f6e(0x18e)])[_0x420f6e(0x1a7)](_0x46d9b1=>typeof _0x46d9b1[0x1]==='string'));if(!_0xbfdb0[_0x420f6e(0x1a2)])throw new Error('Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false');const _0x3a48e9={'ANTHROPIC_API_KEY':_0xbfdb0[_0x420f6e(0x1a2)],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0x50afcf['xdAoE']};for(const _0x166386 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x2b047d=process['env'][_0x166386];_0x2b047d&&![_0x50afcf[_0x420f6e(0x190)],'TMP',_0x420f6e(0x1b5)][_0x420f6e(0x188)](_0x166386)&&(_0x3a48e9[_0x166386]=_0x2b047d);}const _0x4423fc=join(tmpdir(),_0x420f6e(0x1a4));try{mkdirSync(_0x4423fc,{'recursive':!![]});}catch{}_0x3a48e9[_0x420f6e(0x1a9)]=_0x4423fc,_0x3a48e9[_0x50afcf[_0x420f6e(0x1a0)]]=_0x4423fc,_0x3a48e9[_0x50afcf['TelFG']]=_0x4423fc;const _0x265aaa=_0x50afcf['BlcnW'](parseCustomHeaders,process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x554558=new Map(_0x265aaa),_0x439e12=new Set(_0x265aaa[_0x420f6e(0x19b)](([_0x10fa29])=>_0x10fa29['toLowerCase']()));if(_0xbfdb0['metadata'])for(const [_0x4bde88,_0x37396e]of Object[_0x420f6e(0x195)](_0xbfdb0['metadata'])){if(_0x50afcf['unTfy'](_0x37396e,null)||_0x50afcf['cmhsN'](_0x37396e,''))continue;const _0x5a7fb8='x-ranger-'+_0x4bde88;!_0x439e12['has'](_0x5a7fb8['toLowerCase']())&&(_0x554558['set'](_0x5a7fb8,_0x37396e),_0x439e12['add'](_0x5a7fb8[_0x420f6e(0x19a)]()));}const _0xcb392f=Array[_0x420f6e(0x1b8)](_0x554558[_0x420f6e(0x195)]())['map'](([_0x411c3c,_0x39f5b8])=>_0x411c3c+':\x20'+_0x39f5b8)[_0x420f6e(0x18a)]('\x0a');return _0xcb392f&&(_0x3a48e9[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0xcb392f),_0x3a48e9;}function _0xa958(){const _0x2a1d21=['fromEntries','TMPDIR','6736888gJxLzn','XDG_CONFIG_HOME','$PATH','7iiLYfs','${PATH}','TMP','%PATH%','4ireEvI','3267045pTeTMr','byokEnabled','slice','TEMP','7799820vtHMzU','AWS_CONFIG_FILE','from','CHROME_BIN','RANGERWRIGHT_CLICK_TIMEOUT_MS','length','NODE_ENV','372aFeWHf','APPDATA','includes','NOVA_ACT_API_KEY','join','8762418UBuzvc','some','7445hQMJOw','env','4618143ZgOTzE','fTble','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','trim','RANGERWRIGHT_DAEMON_START_TIMEOUT_MS','RANGER_TRANSPORT','entries','npm_config_cache','XDG_CACHE_HOME','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','npm_config_prefix','toLowerCase','map','AWS_ACCESS_KEY_ID','push','USERPROFILE','AWS_DEFAULT_REGION','aRguh','337681JwLPyQ','sessionToken','wCFkc','ranger-claude-tmp','win32','split','filter'];_0xa958=function(){return _0x2a1d21;};return _0xa958();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3884aa,_0x396122){const _0x477b38=_0x5a99,_0x2acf3d=_0x3884aa();while(!![]){try{const _0x5e6dac=parseInt(_0x477b38(0x13d))/0x1*(parseInt(_0x477b38(0x11b))/0x2)+-parseInt(_0x477b38(0x130))/0x3*(-parseInt(_0x477b38(0xea))/0x4)+-parseInt(_0x477b38(0x140))/0x5*(-parseInt(_0x477b38(0xfb))/0x6)+-parseInt(_0x477b38(0x109))/0x7+-parseInt(_0x477b38(0x128))/0x8+parseInt(_0x477b38(0xfc))/0x9+parseInt(_0x477b38(0x122))/0xa*(-parseInt(_0x477b38(0x138))/0xb);if(_0x5e6dac===_0x396122)break;else _0x2acf3d['push'](_0x2acf3d['shift']());}catch(_0x36e221){_0x2acf3d['push'](_0x2acf3d['shift']());}}}(_0x1be5,0xa8585));const _0x148e09=(function(){const _0x22557e=_0x5a99,_0x10eca2={'PZeGJ':function(_0x39b308,_0x3a1a53){return _0x39b308(_0x3a1a53);},'BZPnS':function(_0x389e13,_0x506c2b){return _0x389e13===_0x506c2b;},'SzFCV':_0x22557e(0xd1)};let _0x1a5013=!![];return function(_0x32607b,_0x3cc49a){const _0x3dd968=_0x1a5013?function(){const _0x55fd99=_0x5a99,_0x47bcfa={'zQQjI':function(_0x19c966,_0x42972a){const _0x5db95e=_0x5a99;return _0x10eca2[_0x5db95e(0x116)](_0x19c966,_0x42972a);}};if(_0x3cc49a){if(_0x10eca2[_0x55fd99(0x101)](_0x10eca2[_0x55fd99(0x12f)],_0x55fd99(0xd1))){const _0x406bd2=_0x3cc49a[_0x55fd99(0x11a)](_0x32607b,arguments);return _0x3cc49a=null,_0x406bd2;}else{const _0x221948=_0x47bcfa[_0x55fd99(0xf0)](_0x21c719,_0x4fd5d3);return'https://trace.playwright.dev/?trace='+_0x221948;}}}:function(){};return _0x1a5013=![],_0x3dd968;};}()),_0x1ec6a6=_0x148e09(this,function(){const _0x1c9ad1=_0x5a99,_0x11bc26={'EIVTb':'(((.+)+)+)+$'};return _0x1ec6a6[_0x1c9ad1(0x121)]()['search'](_0x11bc26[_0x1c9ad1(0xe5)])[_0x1c9ad1(0x121)]()[_0x1c9ad1(0x136)](_0x1ec6a6)[_0x1c9ad1(0x147)](_0x11bc26[_0x1c9ad1(0xe5)]);});_0x1ec6a6();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1509c4){const _0xf85613=_0x5a99,_0xdfc5c0={'lrhkG':_0xf85613(0x141),'zKBBf':function(_0x432374){return _0x432374();},'YuKjD':function(_0x2cbf43,_0x5b7452){return _0x2cbf43===_0x5b7452;},'aQIYV':_0xf85613(0xf4),'ioJwg':_0xf85613(0x139),'GjGNS':function(_0x3db5df,_0x5e7dfb){return _0x3db5df===_0x5e7dfb;},'zuLvU':_0xf85613(0x119),'pgbph':_0xf85613(0xd7)},_0x5d9df8=await _0xdfc5c0[_0xf85613(0x112)](getToken);if(!_0x5d9df8){if(_0xdfc5c0[_0xf85613(0xfd)](_0xdfc5c0[_0xf85613(0x10c)],_0xdfc5c0['aQIYV']))throw new Error(_0xdfc5c0[_0xf85613(0x127)]);else{const _0x22ebfd=_0xd9a51[_0xf85613(0x11a)](_0xef2d5a,arguments);return _0x166c89=null,_0x22ebfd;}}const _0x4d6d51=_0xdfc5c0['zKBBf'](getApiBaseUrl),_0x5b9b01=await fetch(_0x4d6d51+_0xf85613(0x133),{'method':_0xf85613(0xd4),'headers':{'Authorization':_0xf85613(0xf2)+_0x5d9df8,'Content-Type':_0xdfc5c0['ioJwg']},'body':JSON[_0xf85613(0x126)]({'environmentName':_0x1509c4?.['environmentName'],'settings':_0x1509c4?.['settings'],'task':_0x1509c4?.[_0xf85613(0x131)],'url':_0x1509c4?.[_0xf85613(0x111)],'featureId':_0x1509c4?.[_0xf85613(0xef)],'checklistItemId':_0x1509c4?.[_0xf85613(0xdc)]})});if(!_0x5b9b01['ok']){if(_0xdfc5c0[_0xf85613(0xd9)](_0xdfc5c0[_0xf85613(0x129)],_0xdfc5c0[_0xf85613(0xec)]))throw new _0x25fee7(_0xdfc5c0[_0xf85613(0x127)]);else{const _0xaef88f=await _0x5b9b01[_0xf85613(0x120)]();throw new Error('Failed\x20to\x20create\x20browser\x20session:\x20'+_0xaef88f);}}return _0x5b9b01[_0xf85613(0xd2)]();}export async function updateBrowserSession(_0x4ec5fa,_0x414fe9){const _0x24b9db=_0x5a99,_0xaf2479={'NsWvl':function(_0x25cf36){return _0x25cf36();},'zqJpV':function(_0x39c0ec){return _0x39c0ec();},'EhtVN':function(_0x2b1479,_0x402850,_0x6f8e2e){return _0x2b1479(_0x402850,_0x6f8e2e);},'uYBJA':_0x24b9db(0xed),'Allau':function(_0x3ea0f2,_0x5049bd){return _0x3ea0f2===_0x5049bd;},'lcreR':_0x24b9db(0x100),'rugWd':_0x24b9db(0x117)};return _0xaf2479[_0x24b9db(0xe6)](withRetry,async()=>{const _0xede508=_0x24b9db,_0x1fc860=await _0xaf2479[_0xede508(0x137)](getToken);if(!_0x1fc860)throw new Error(_0xede508(0x141));const _0x400eca=_0xaf2479[_0xede508(0x11d)](getApiBaseUrl),_0x280f30=await _0xaf2479['EhtVN'](fetch,_0x400eca+_0xede508(0x13b)+_0x4ec5fa,{'method':_0xaf2479[_0xede508(0x10a)],'headers':{'Authorization':'Bearer\x20'+_0x1fc860,'Content-Type':'application/json'},'body':JSON['stringify'](_0x414fe9)});if(!_0x280f30['ok']){if(_0xaf2479[_0xede508(0xf7)](_0xaf2479[_0xede508(0x10e)],_0xede508(0x12b))){const _0x24f4a9=_0x481852?function(){const _0x572b8f=_0xede508;if(_0x37dba0){const _0x25fa1c=_0x20c385[_0x572b8f(0x11a)](_0xe94146,arguments);return _0x5c863d=null,_0x25fa1c;}}:function(){};return _0x50807b=![],_0x24f4a9;}else{const _0x39e4c7=await _0x280f30[_0xede508(0x120)]();throw new Error('Failed\x20to\x20update\x20browser\x20session:\x20'+_0x39e4c7);}}return _0x280f30[_0xede508(0xd2)]();},{'label':_0xaf2479[_0x24b9db(0x11e)]});}export async function getBrowserSession(_0x445197){const _0x56f6a5=_0x5a99,_0x56833d={'CwfjP':function(_0x24f519){return _0x24f519();},'EgOUs':_0x56f6a5(0x141)},_0x223705=await _0x56833d[_0x56f6a5(0xd5)](getToken);if(!_0x223705)throw new Error(_0x56833d[_0x56f6a5(0x11f)]);const _0x7186e8=_0x56833d['CwfjP'](getApiBaseUrl),_0x3e2b23=await fetch(_0x7186e8+_0x56f6a5(0x13b)+_0x445197,{'method':_0x56f6a5(0xd3),'headers':{'Authorization':_0x56f6a5(0xf2)+_0x223705}});if(!_0x3e2b23['ok']){const _0x46890f=await _0x3e2b23[_0x56f6a5(0x120)]();throw new Error(_0x56f6a5(0x146)+_0x46890f);}return _0x3e2b23[_0x56f6a5(0xd2)]();}export async function getUploadUrls(_0x46d66c,_0x38b751,_0x3b9111,_0x12a50d){const _0x27e233=_0x5a99,_0x5dd4ec={'QbosP':_0x27e233(0x141),'zNpjf':function(_0x54712d){return _0x54712d();},'VxduD':_0x27e233(0xd4),'opPfH':_0x27e233(0x139),'MCtRJ':function(_0x244500,_0x30c3a1){return _0x244500!==_0x30c3a1;},'YglVj':'sAkXl'},_0x369b13=await _0x5dd4ec[_0x27e233(0x132)](getToken);if(!_0x369b13)throw new Error(_0x5dd4ec[_0x27e233(0xfe)]);const _0x4dc7da=_0x5dd4ec[_0x27e233(0x132)](getApiBaseUrl),_0x3ca14b=await fetch(_0x4dc7da+_0x27e233(0x13b)+_0x46d66c+_0x27e233(0x104),{'method':_0x5dd4ec[_0x27e233(0xcf)],'headers':{'Authorization':_0x27e233(0xf2)+_0x369b13,'Content-Type':_0x5dd4ec[_0x27e233(0x10f)]},'body':JSON['stringify']({'filename':_0x38b751,'filetype':_0x3b9111,..._0x12a50d?.[_0x27e233(0x107)]!==undefined&&{'size':_0x12a50d[_0x27e233(0x107)]},..._0x5dd4ec[_0x27e233(0xdd)](_0x12a50d?.[_0x27e233(0xf6)],undefined)&&{'checksum':_0x12a50d[_0x27e233(0xf6)]},..._0x5dd4ec[_0x27e233(0xdd)](_0x12a50d?.[_0x27e233(0xdb)],undefined)&&{'metadata':_0x12a50d[_0x27e233(0xdb)]}})});if(!_0x3ca14b['ok']){if(_0x5dd4ec[_0x27e233(0xdd)](_0x5dd4ec[_0x27e233(0x123)],_0x5dd4ec[_0x27e233(0x123)]))throw new _0x46f296(_0x5dd4ec['QbosP']);else{const _0x994a38=await _0x3ca14b['text']();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x994a38);}}return _0x3ca14b[_0x27e233(0xd2)]();}export async function uploadFile(_0x12a653,_0x15d6e1,_0x32a3aa){const _0x255ff0=_0x5a99,_0x5208f9=await fetch(_0x12a653,{'method':'PUT','headers':{'Content-Type':_0x32a3aa,'Content-Length':_0x15d6e1['length']['toString']()},'body':_0x15d6e1});if(!_0x5208f9['ok']){const _0x40da64=await _0x5208f9[_0x255ff0(0x120)]();throw new Error(_0x255ff0(0x12e)+_0x40da64);}}export async function uploadTrace(_0x4365d2,_0x5d94d7){const _0x3ddcfd=_0x5a99,_0x41ef44={'Lhgtf':function(_0x5c6271,_0x419c34,_0x297cb2,_0x4e3123){return _0x5c6271(_0x419c34,_0x297cb2,_0x4e3123);}};return _0x41ef44[_0x3ddcfd(0xf9)](uploadFile,_0x4365d2,_0x5d94d7,_0x3ddcfd(0xe8));}function _0x5a99(_0x15fe83,_0x3e6177){_0x15fe83=_0x15fe83-0xcd;const _0x1abe78=_0x1be5();let _0x1ec6a6=_0x1abe78[_0x15fe83];if(_0x5a99['YWxFJX']===undefined){var _0x148e09=function(_0x390de8){const _0x2f716c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x201f5e='',_0x34aef0='',_0x293f3c=_0x201f5e+_0x148e09;for(let _0xe8bcbb=0x0,_0x12a98a,_0x1d68b2,_0x2653b0=0x0;_0x1d68b2=_0x390de8['charAt'](_0x2653b0++);~_0x1d68b2&&(_0x12a98a=_0xe8bcbb%0x4?_0x12a98a*0x40+_0x1d68b2:_0x1d68b2,_0xe8bcbb++%0x4)?_0x201f5e+=_0x293f3c['charCodeAt'](_0x2653b0+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x12a98a>>(-0x2*_0xe8bcbb&0x6)):_0xe8bcbb:0x0){_0x1d68b2=_0x2f716c['indexOf'](_0x1d68b2);}for(let _0x36cc7e=0x0,_0x483e4a=_0x201f5e['length'];_0x36cc7e<_0x483e4a;_0x36cc7e++){_0x34aef0+='%'+('00'+_0x201f5e['charCodeAt'](_0x36cc7e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x34aef0);};_0x5a99['hJlbZh']=_0x148e09,_0x5a99['pUifkx']={},_0x5a99['YWxFJX']=!![];}const _0x1be5a1=_0x1abe78[0x0],_0x5a998f=_0x15fe83+_0x1be5a1,_0x30c56d=_0x5a99['pUifkx'][_0x5a998f];if(!_0x30c56d){const _0x481852=function(_0x4c8d73){this['NtHSde']=_0x4c8d73,this['GmtKPT']=[0x1,0x0,0x0],this['HBUxPE']=function(){return'newState';},this['OwpAPd']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['WIFMPR']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x481852['prototype']['yRNREi']=function(){const _0x5b5656=new RegExp(this['OwpAPd']+this['WIFMPR']),_0x1caf40=_0x5b5656['test'](this['HBUxPE']['toString']())?--this['GmtKPT'][0x1]:--this['GmtKPT'][0x0];return this['mhwWvT'](_0x1caf40);},_0x481852['prototype']['mhwWvT']=function(_0x199602){if(!Boolean(~_0x199602))return _0x199602;return this['YVYsUj'](this['NtHSde']);},_0x481852['prototype']['YVYsUj']=function(_0x50807b){for(let _0x37dba0=0x0,_0x4bc9bd=this['GmtKPT']['length'];_0x37dba0<_0x4bc9bd;_0x37dba0++){this['GmtKPT']['push'](Math['round'](Math['random']())),_0x4bc9bd=this['GmtKPT']['length'];}return _0x50807b(this['GmtKPT'][0x0]);},new _0x481852(_0x5a99)['yRNREi'](),_0x1ec6a6=_0x5a99['hJlbZh'](_0x1ec6a6),_0x5a99['pUifkx'][_0x5a998f]=_0x1ec6a6;}else _0x1ec6a6=_0x30c56d;return _0x1ec6a6;}export async function uploadConversation(_0x14b0ff,_0x46aa8c){const _0x5d063e=_0x5a99,_0x810b31={'FGMHM':function(_0x10a0f7,_0x2ce3e8,_0x12f9c1,_0x55c164){return _0x10a0f7(_0x2ce3e8,_0x12f9c1,_0x55c164);},'sTdAK':_0x5d063e(0xd6)};return _0x810b31[_0x5d063e(0xf8)](uploadFile,_0x14b0ff,_0x46aa8c,_0x810b31[_0x5d063e(0xe7)]);}export async function uploadScreenshot(_0x4fa149,_0x10d79d){const _0x5eefbf=_0x5a99,_0x431f04={'fWhOB':_0x5eefbf(0x103)};return uploadFile(_0x4fa149,_0x10d79d,_0x431f04[_0x5eefbf(0x115)]);}export async function uploadVideo(_0x5d30b1,_0x56efbc){const _0xd3de3a=_0x5a99,_0x141e4a={'KtIDA':function(_0x3cee62,_0x107157,_0x3adda1,_0x11f1a7){return _0x3cee62(_0x107157,_0x3adda1,_0x11f1a7);}};return _0x141e4a[_0xd3de3a(0x125)](uploadFile,_0x5d30b1,_0x56efbc,'video/webm');}export function buildTraceViewerUrl(_0x5f044b){const _0x2be0c6=_0x5a99,_0xba94ad={'tmOiS':function(_0x28018b,_0xb61807){return _0x28018b(_0xb61807);}},_0x429e55=_0xba94ad['tmOiS'](encodeURIComponent,_0x5f044b);return _0x2be0c6(0x142)+_0x429e55;}export async function getProxySessionToken(){const _0x5ec637=_0x5a99,_0x22f5a8={'Qlkiy':_0x5ec637(0x141),'oLkOU':function(_0x51d506){return _0x51d506();},'VNatJ':function(_0x141439,_0x5185e2,_0x302ee1){return _0x141439(_0x5185e2,_0x302ee1);},'nSkKK':'POST'},_0x5dc2fb=await getToken();if(!_0x5dc2fb)throw new Error(_0x22f5a8[_0x5ec637(0xe4)]);const _0xa8d252=_0x22f5a8[_0x5ec637(0xe3)](getApiBaseUrl),_0x573674=await _0x22f5a8[_0x5ec637(0xe9)](fetch,_0xa8d252+'/api/v1/mcp/proxy-session',{'method':_0x22f5a8['nSkKK'],'headers':{'Authorization':_0x5ec637(0xf2)+_0x5dc2fb}});if(!_0x573674['ok']){const _0x563464=await _0x573674[_0x5ec637(0x120)]();throw new Error(_0x5ec637(0x135)+_0x563464);}const _0x4eaaaa=await _0x573674[_0x5ec637(0xd2)]();return _0x4eaaaa['sessionToken'];}function _0x1be5(){const _0x12dc13=['DxbKyxrLqNjVD3nLCLnLC3nPB24','sKvmrxy','uhzbtey','yxbWBhK','mtG2mdzLqxDdrNC','D0Xwu1G','ENfkCfy','CNvNv2q','rwDpvxm','Dgv4Da','Dg9tDhjPBMC','mtaYmZG5otbLt1nWzwe','wwDSvMO','yMfZzty0','s3rjree','C3rYAw5NAwz5','BhjOA0C','mZC5ndm5mLzVA2XWuq','ENvmDLu','zgLNzxn0','C2HXweO','ENr1DM0','EMfUAfu','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','u3Pgq1y','mJK0nda1t0vgrNv6','DgfZAW','EK5WAMy','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','C21duLy','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','y29UC3rYDwn0B3i','tNnxDMW','mtf1BxnVy2y','yxbWBgLJyxrPB24VANnVBG','Bwq1','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','vMP5EM4','ndrgBKfiCw8','BwDOzw4','sKH6wMe','mtGXodvQyvHWy1m','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','rxL0y0G','vwzqsgW','DMDYrge','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','C2vHCMnO','CunQzvm','qK9ACva','vNHKDuq','yMPLA2G','A1PzD2m','ANnVBG','r0vu','ue9tva','q3DMALa','yxbWBgLJyxrPB24VANnVBMW','s0LRCM0','q3HxAhu','r2PhtLm','qxH3uNC','Bwv0ywrHDge','y2HLy2TSAxn0sxrLBuLK','tun0uKO','sxv3Cu0','CLLNv2u','BeLbCMK','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DxbKyxrL','B0XRt1u','uwXRAxK','ruLwvgi','rwH0vK4','C1rKquS','yxbWBgLJyxrPB24VEMLW','vK5HDeO','mJHZB29VEMi','l3n0zxbZ','CgDICgG','uefuq0G','DuTKvuW','zMvHDhvYzuLK','ELfrAKK','kcGOlISPkYKRksSK','qMvHCMvYia','EM9rsKC','EuLXwfe','tu1xtNK','y2HLy2TZDw0','qwXSyxu','rKDnse0','tgHNDgy','B05Xtu8','mtiWmhLVr2PWyG','mta5ntG3nJbiwMzVAe4','wxvlAKq','uwjVC1a','l2fZC2v0CW','yKT0zuq','qLPqBLm','l3n0zxbZlW','Aw1Hz2uVCg5N','l3vWBg9Hzc11CMXZ','wLnVue8','wNjtsgm','C2L6zq','y0nhrKy','ntK3nta0nNrvy0jfzq','DvLcsKe','Bhrcz0q','yvfjwvy','BwL3zLC','BgnYzvi','B3bqzKG','rvDsEu4','DxjS','EKTcqMy','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','rMvJt0i','zLDOt0i','ufPLr0O'];_0x1be5=function(){return _0x12dc13;};return _0x1be5();}export function computeChecksum(_0x1b4be7){const _0x283861=_0x5a99,_0x185fd9={'ztuvm':_0x283861(0x13a)};return createHash(_0x185fd9[_0x283861(0x12c)])[_0x283861(0xe2)](_0x1b4be7)[_0x283861(0x12a)](_0x283861(0x124));}export async function createVerificationStep(_0x2343d4,_0x547f68){const _0x435914=_0x5a99,_0x443496={'smCRV':function(_0x3a1f61){return _0x3a1f61();},'BOZqP':_0x435914(0x141),'miwfW':function(_0x2b1c8c,_0x40abb0,_0x56ab7e){return _0x2b1c8c(_0x40abb0,_0x56ab7e);},'CxWhu':_0x435914(0xd4),'EWRyN':_0x435914(0x139)},_0x63520c=await _0x443496[_0x435914(0x134)](getToken);if(!_0x63520c)throw new Error(_0x443496[_0x435914(0xce)]);const _0x35bb5d=getApiBaseUrl(),_0x3ffb1e=await _0x443496[_0x435914(0x10d)](fetch,_0x35bb5d+_0x435914(0x13b)+_0x2343d4+_0x435914(0xeb),{'method':_0x443496[_0x435914(0xd8)],'headers':{'Authorization':_0x435914(0xf2)+_0x63520c,'Content-Type':_0x443496[_0x435914(0x110)]},'body':JSON[_0x435914(0x126)](_0x547f68)});if(!_0x3ffb1e['ok']){const _0x4451c9=await _0x3ffb1e[_0x435914(0x120)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x4451c9);}return _0x3ffb1e[_0x435914(0xd2)]();}export async function createStepAsset(_0x1914ec,_0x2f40b4,_0x435909){const _0x4fc679=_0x5a99,_0x1f6d9f={'uKdUL':_0x4fc679(0x141),'BsYWv':function(_0xa33942){return _0xa33942();},'tPHuP':function(_0x55a982,_0x4d9475){return _0x55a982===_0x4d9475;},'ltBgD':_0x4fc679(0x118),'UfPHl':function(_0x8468cf,_0x4af6d2,_0x3436c0){return _0x8468cf(_0x4af6d2,_0x3436c0);},'IuwqM':_0x4fc679(0x139)},_0x43fd25=await _0x1f6d9f['BsYWv'](getToken);if(!_0x43fd25){if(_0x1f6d9f['tPHuP'](_0x1f6d9f[_0x4fc679(0x10b)],_0x4fc679(0xda)))throw new _0x18197d(_0x1f6d9f[_0x4fc679(0xee)]);else throw new Error(_0x1f6d9f['uKdUL']);}const _0xe19c7e=getApiBaseUrl(),_0x22b264=await _0x1f6d9f[_0x4fc679(0x144)](fetch,_0xe19c7e+_0x4fc679(0x13b)+_0x1914ec+_0x4fc679(0x102)+_0x2f40b4+_0x4fc679(0xff),{'method':'POST','headers':{'Authorization':_0x4fc679(0xf2)+_0x43fd25,'Content-Type':_0x1f6d9f[_0x4fc679(0xde)]},'body':JSON[_0x4fc679(0x126)](_0x435909)});if(!_0x22b264['ok']){const _0x5366c4=await _0x22b264['text']();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x5366c4);}return _0x22b264[_0x4fc679(0xd2)]();}export async function updateVerificationStep(_0x193fed,_0x3e073c,_0x2d7cf8){const _0x5800fa=_0x5a99,_0x3d9945={'rYgWe':_0x5800fa(0xf1),'EytcH':function(_0x4d050f){return _0x4d050f();},'oNqMO':function(_0x33227c,_0x30d5d5){return _0x33227c!==_0x30d5d5;},'Vjyzn':_0x5800fa(0x12d),'ZrSHc':_0x5800fa(0xf5),'mghen':function(_0x5bcb56,_0x35d5a8,_0x58fc2b){return _0x5bcb56(_0x35d5a8,_0x58fc2b);},'lIAri':'PATCH','RFnoC':_0x5800fa(0x139),'zoQJG':_0x5800fa(0x108)},_0x509bbf=await _0x3d9945[_0x5800fa(0x143)](getToken);if(!_0x509bbf){if(_0x3d9945[_0x5800fa(0xfa)](_0x3d9945[_0x5800fa(0x13c)],_0x3d9945[_0x5800fa(0x106)]))throw new Error(_0x5800fa(0x141));else throw new _0x5c51c5('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');}const _0xb7f38e=getApiBaseUrl(),_0x3a15b9=await _0x3d9945[_0x5800fa(0x13e)](fetch,_0xb7f38e+'/api/v1/mcp/browser-sessions/'+_0x193fed+_0x5800fa(0x102)+_0x3e073c,{'method':_0x3d9945[_0x5800fa(0xe0)],'headers':{'Authorization':_0x5800fa(0xf2)+_0x509bbf,'Content-Type':_0x3d9945['RFnoC']},'body':JSON['stringify'](_0x2d7cf8)});if(!_0x3a15b9['ok']){if(_0x5800fa(0x108)!==_0x3d9945[_0x5800fa(0xf3)])return _0x500fcc[_0x5800fa(0x121)]()[_0x5800fa(0x147)](ZjFGgG['rYgWe'])['toString']()[_0x5800fa(0x136)](_0x320abe)[_0x5800fa(0x147)](ZjFGgG[_0x5800fa(0xdf)]);else{const _0x557f50=await _0x3a15b9[_0x5800fa(0x120)]();throw new Error(_0x5800fa(0xe1)+_0x557f50);}}}export async function getBrowserSessionSteps(_0x31a99e){const _0x27d87d=_0x5a99,_0x42707b={'JHzZa':_0x27d87d(0xd6),'bjekh':function(_0x5c7e49){return _0x5c7e49();},'qCjeS':function(_0x138c6a,_0x631405){return _0x138c6a!==_0x631405;},'FecOB':'wLVSX','vgrDa':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','STYMa':function(_0x11b031,_0x1faa57,_0x3bdbc4){return _0x11b031(_0x1faa57,_0x3bdbc4);},'ZSoPO':_0x27d87d(0xd3)},_0x2c5ff2=await _0x42707b[_0x27d87d(0xd0)](getToken);if(!_0x2c5ff2){if(_0x42707b[_0x27d87d(0xcd)](_0x42707b[_0x27d87d(0x114)],_0x27d87d(0x11c)))return _0x46d95a(_0x2c3d2d,_0x382697,_0x42707b[_0x27d87d(0x13f)]);else throw new Error(_0x42707b[_0x27d87d(0x145)]);}const _0x374fdc=_0x42707b[_0x27d87d(0xd0)](getApiBaseUrl),_0x193fc2=await _0x42707b['STYMa'](fetch,_0x374fdc+_0x27d87d(0x13b)+_0x31a99e+'/steps',{'method':_0x42707b[_0x27d87d(0x105)],'headers':{'Authorization':_0x27d87d(0xf2)+_0x2c5ff2}});if(!_0x193fc2['ok']){const _0x3d8520=await _0x193fc2[_0x27d87d(0x120)]();throw new Error(_0x27d87d(0x113)+_0x3d8520);}return _0x193fc2['json']();}
|
|
1
|
+
(function(_0x58e11f,_0x19af9a){const _0xbdc82f=_0x2c53,_0x4c8102=_0x58e11f();while(!![]){try{const _0x45d712=-parseInt(_0xbdc82f(0x143))/0x1+parseInt(_0xbdc82f(0x13c))/0x2*(parseInt(_0xbdc82f(0x1a0))/0x3)+-parseInt(_0xbdc82f(0x162))/0x4+parseInt(_0xbdc82f(0x182))/0x5+-parseInt(_0xbdc82f(0x147))/0x6*(parseInt(_0xbdc82f(0x18a))/0x7)+parseInt(_0xbdc82f(0x19c))/0x8*(-parseInt(_0xbdc82f(0x149))/0x9)+parseInt(_0xbdc82f(0x188))/0xa*(parseInt(_0xbdc82f(0x144))/0xb);if(_0x45d712===_0x19af9a)break;else _0x4c8102['push'](_0x4c8102['shift']());}catch(_0x4adaea){_0x4c8102['push'](_0x4c8102['shift']());}}}(_0x549d,0xa02fa));const _0x455b31=(function(){const _0x420782=_0x2c53,_0x171111={'fKLms':_0x420782(0x1a5),'zgjXl':_0x420782(0x156),'gdcPe':_0x420782(0x19f)};let _0x1b5f87=!![];return function(_0x507e22,_0x54f9eb){const _0x5b41f1=_0x420782,_0x5a2c6e={'USpUo':_0x5b41f1(0x16f),'utEWF':function(_0x36f464,_0x5520f7){return _0x36f464!==_0x5520f7;},'hgazw':_0x171111[_0x5b41f1(0x131)],'yJveX':_0x171111[_0x5b41f1(0x16b)],'ayBco':_0x171111[_0x5b41f1(0x193)]},_0x261c0a=_0x1b5f87?function(){const _0x444658=_0x5b41f1;if(_0x5a2c6e[_0x444658(0x157)](_0x5a2c6e['hgazw'],_0x5a2c6e[_0x444658(0x17a)]))throw new _0x48903f(_0x5a2c6e[_0x444658(0x19e)]);else{if(_0x54f9eb){if(_0x5a2c6e[_0x444658(0x137)]!==_0x5a2c6e[_0x444658(0x16e)]){const _0x43a2c3=_0x54f9eb[_0x444658(0x179)](_0x507e22,arguments);return _0x54f9eb=null,_0x43a2c3;}else{if(_0x2437f0){const _0x18d98c=_0x58ba92[_0x444658(0x179)](_0x5c3f50,arguments);return _0xb2a2d4=null,_0x18d98c;}}}}}:function(){};return _0x1b5f87=![],_0x261c0a;};}()),_0xf57fb2=_0x455b31(this,function(){const _0x109e8b=_0x2c53,_0x31857b={'AwxvV':_0x109e8b(0x172)};return _0xf57fb2[_0x109e8b(0x134)]()[_0x109e8b(0x19a)](_0x31857b[_0x109e8b(0x14d)])[_0x109e8b(0x134)]()[_0x109e8b(0x14a)](_0xf57fb2)[_0x109e8b(0x19a)](_0x31857b[_0x109e8b(0x14d)]);});function _0x2c53(_0x10e15d,_0x3b00ce){_0x10e15d=_0x10e15d-0x12f;const _0x16da6d=_0x549d();let _0xf57fb2=_0x16da6d[_0x10e15d];if(_0x2c53['DdndmW']===undefined){var _0x455b31=function(_0x2d3b1e){const _0x4cfdc9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x55fa19='',_0x52f80a='',_0x1f65ca=_0x55fa19+_0x455b31;for(let _0x1b454c=0x0,_0x41f1fb,_0x353ca1,_0x379f69=0x0;_0x353ca1=_0x2d3b1e['charAt'](_0x379f69++);~_0x353ca1&&(_0x41f1fb=_0x1b454c%0x4?_0x41f1fb*0x40+_0x353ca1:_0x353ca1,_0x1b454c++%0x4)?_0x55fa19+=_0x1f65ca['charCodeAt'](_0x379f69+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x41f1fb>>(-0x2*_0x1b454c&0x6)):_0x1b454c:0x0){_0x353ca1=_0x4cfdc9['indexOf'](_0x353ca1);}for(let _0x5a91ae=0x0,_0x2d4847=_0x55fa19['length'];_0x5a91ae<_0x2d4847;_0x5a91ae++){_0x52f80a+='%'+('00'+_0x55fa19['charCodeAt'](_0x5a91ae)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x52f80a);};_0x2c53['iHpieW']=_0x455b31,_0x2c53['IFcAAV']={},_0x2c53['DdndmW']=!![];}const _0x549d8f=_0x16da6d[0x0],_0x2c5327=_0x10e15d+_0x549d8f,_0x3ab2b3=_0x2c53['IFcAAV'][_0x2c5327];if(!_0x3ab2b3){const _0x515f0e=function(_0x54da8d){this['rlsDpH']=_0x54da8d,this['RnAESa']=[0x1,0x0,0x0],this['EcXkSs']=function(){return'newState';},this['djLEMr']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['fDVrLi']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x515f0e['prototype']['NYxRyV']=function(){const _0x4ca683=new RegExp(this['djLEMr']+this['fDVrLi']),_0x9b21f1=_0x4ca683['test'](this['EcXkSs']['toString']())?--this['RnAESa'][0x1]:--this['RnAESa'][0x0];return this['gOjGRZ'](_0x9b21f1);},_0x515f0e['prototype']['gOjGRZ']=function(_0x38fca6){if(!Boolean(~_0x38fca6))return _0x38fca6;return this['vgIkIo'](this['rlsDpH']);},_0x515f0e['prototype']['vgIkIo']=function(_0x333e8b){for(let _0x3d0a20=0x0,_0x1c3dcf=this['RnAESa']['length'];_0x3d0a20<_0x1c3dcf;_0x3d0a20++){this['RnAESa']['push'](Math['round'](Math['random']())),_0x1c3dcf=this['RnAESa']['length'];}return _0x333e8b(this['RnAESa'][0x0]);},new _0x515f0e(_0x2c53)['NYxRyV'](),_0xf57fb2=_0x2c53['iHpieW'](_0xf57fb2),_0x2c53['IFcAAV'][_0x2c5327]=_0xf57fb2;}else _0xf57fb2=_0x3ab2b3;return _0xf57fb2;}_0xf57fb2();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x4db4d9){const _0x192af2=_0x2c53,_0x3c5b35={'uxgPa':function(_0x1dca09,_0xa3af02,_0x1bc3eb,_0xd79acd){return _0x1dca09(_0xa3af02,_0x1bc3eb,_0xd79acd);},'ugPxO':_0x192af2(0x17d),'puNCl':function(_0x33b102){return _0x33b102();},'uIgeV':function(_0x3a9a85,_0x51ada3){return _0x3a9a85===_0x51ada3;},'rSMGH':_0x192af2(0x194),'GDWNp':'HvasH','NuGdX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','jDxuf':function(_0x36267e,_0x396ab5,_0x2bfeb2){return _0x36267e(_0x396ab5,_0x2bfeb2);},'Mmgio':_0x192af2(0x15d),'mrTKP':_0x192af2(0x135)},_0x1c8760=await _0x3c5b35[_0x192af2(0x167)](getToken);if(!_0x1c8760){if(_0x3c5b35[_0x192af2(0x152)](_0x3c5b35[_0x192af2(0x169)],_0x3c5b35[_0x192af2(0x130)]))return _0x3c5b35[_0x192af2(0x171)](_0x1b6fbc,_0x3e8c5f,_0x559fb7,_0x3c5b35[_0x192af2(0x189)]);else throw new Error(_0x3c5b35[_0x192af2(0x185)]);}const _0x223603=getApiBaseUrl(),_0x3a5cc5=await _0x3c5b35[_0x192af2(0x13d)](fetch,_0x223603+_0x192af2(0x176),{'method':_0x3c5b35[_0x192af2(0x136)],'headers':{'Authorization':_0x192af2(0x15a)+_0x1c8760,'Content-Type':_0x3c5b35['mrTKP']},'body':JSON['stringify']({'environmentName':_0x4db4d9?.[_0x192af2(0x199)],'settings':_0x4db4d9?.[_0x192af2(0x164)],'task':_0x4db4d9?.['task'],'url':_0x4db4d9?.[_0x192af2(0x173)],'featureId':_0x4db4d9?.['featureId'],'checklistItemId':_0x4db4d9?.[_0x192af2(0x1a2)]})});if(!_0x3a5cc5['ok']){const _0x50cb38=await _0x3a5cc5[_0x192af2(0x18c)]();throw new Error(_0x192af2(0x177)+_0x50cb38);}return _0x3a5cc5[_0x192af2(0x15f)]();}function _0x549d(){const _0x24b0af=['BxjkAxq','mtK1nZa4nZbhtuzKvNK','DwDqEe8','n09Xu3nlwG','BLrKr3q','Dgv4Da','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','BxfcA0S','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','yK9eDuK','veXgrw8','z2rJugu','DvPUEKi','wKL5vvy','yuTvDfy','AwDou3a','z2vftKK','zw52AxjVBM1LBNroyw1L','C2vHCMnO','EMPZtLO','mteYmdG0mfL3AgT5CW','yMfZzty0','vvnWvw8','BwHhCMS','odrgshzAD1O','Bwq1','y2HLy2TSAxn0sxrLBuLK','qwT1uve','C2L6zq','wujcuLO','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','yxbWBgLJyxrPB24VEMLW','B0jbBNC','r0rxtNa','zKTmBxm','l3n0zxbZ','C2vZC2LVBLrVA2vU','Dg9tDhjPBMC','yxbWBgLJyxrPB24VANnVBG','tw1NAw8','EuP2zvG','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','C3rYAw5NAwz5','rhrxEuO','l2fZC2v0CW','mZCZnZHyteDzCLC','AKr4Dwy','tefZuvy','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','zKzIqxG','DM9MCMC','v2vLBui','nte2mdqWvK9uBxHi','mtfkz3zOBee','ufvu','u1jjDLq','nteYmti5ngzIwKT6zW','s3Lrvg4','nJncr0LLvvC','y29UC3rYDwn0B3i','CMnTCLy','l3vWBg9Hzc11CMXZ','qxD4DLy','uKPdrMC','rKr5sMy','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DxbKyxrLqNjVD3nLCLnLC3nPB24','DuLNzvy','zvDlvMW','BgvUz3rO','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','Aw1Nz1e','Dxrfv0y','CvPsvhi','t2LtueS','qMvHCMvYia','uefuq0G','AgncBw4','ue9tva','y2HLy2TZDw0','ANnVBG','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','Bwv0ywrHDge','ntmZodG4BhHqqvb6','r1nOtuq','C2v0DgLUz3m','r2DTAeu','vM9gvfy','Chvoq2W','DvbAvfe','CLnnr0G','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','EMDQwgW','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','l3n0zxbZlW','yxLcy28','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','DMLKzw8VD2vIBq','DxHNuge','kcGOlISPkYKRksSK','DxjS','tujTv0W','zKr0B0K','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','A1r6quS','yxbWBhK','AgDHENC','BuLvy3K','ENPLwxC','yxbWBgLJyxrPB24VANnVBMW','AhnZD1u','wezdBhy','y09yAfq','sNvfB08','mZi5nZy5nvnrEgXKtG','DxbKyxrL','z3nAC0O','tNvhzfG','qMDXuNC'];_0x549d=function(){return _0x24b0af;};return _0x549d();}export async function updateBrowserSession(_0x3e17ba,_0x187bec){const _0x313752=_0x2c53,_0x5a3cfc={'wvjFs':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','tjICG':function(_0x46cc61){return _0x46cc61();},'pufJz':function(_0xcc82c4,_0x221706,_0x571a90){return _0xcc82c4(_0x221706,_0x571a90);},'vHTgl':'application/json','WeemB':_0x313752(0x151)};return _0x5a3cfc['pufJz'](withRetry,async()=>{const _0x3e26a3=_0x313752,_0x4900fa=await getToken();if(!_0x4900fa)throw new Error(_0x5a3cfc['wvjFs']);const _0x3156b2=_0x5a3cfc['tjICG'](getApiBaseUrl),_0x1fe1a7=await _0x5a3cfc['pufJz'](fetch,_0x3156b2+_0x3e26a3(0x190)+_0x3e17ba,{'method':_0x3e26a3(0x15b),'headers':{'Authorization':_0x3e26a3(0x15a)+_0x4900fa,'Content-Type':_0x5a3cfc['vHTgl']},'body':JSON['stringify'](_0x187bec)});if(!_0x1fe1a7['ok']){const _0x2c01d1=await _0x1fe1a7['text']();throw new Error(_0x3e26a3(0x16a)+_0x2c01d1);}return _0x1fe1a7[_0x3e26a3(0x15f)]();},{'label':_0x5a3cfc[_0x313752(0x142)]});}export async function getBrowserSession(_0x54fe89){const _0x4415e3=_0x2c53,_0x3eb6a9={'jhTMC':function(_0x4bda2d){return _0x4bda2d();},'cWKCx':function(_0x58268c,_0x1caa54,_0x32c3eb){return _0x58268c(_0x1caa54,_0x32c3eb);},'EHXgR':'GET'},_0x5c4762=await getToken();if(!_0x5c4762)throw new Error(_0x4415e3(0x16f));const _0x33a32d=_0x3eb6a9['jhTMC'](getApiBaseUrl),_0x4bef04=await _0x3eb6a9['cWKCx'](fetch,_0x33a32d+_0x4415e3(0x190)+_0x54fe89,{'method':_0x3eb6a9['EHXgR'],'headers':{'Authorization':_0x4415e3(0x15a)+_0x5c4762}});if(!_0x4bef04['ok']){const _0x30698b=await _0x4bef04[_0x4415e3(0x18c)]();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x30698b);}return _0x4bef04['json']();}export async function getUploadUrls(_0xb0051c,_0x45bcad,_0x3ce2b3,_0x9cafd4){const _0x355650=_0x2c53,_0x50eca3={'OiSPK':function(_0x39fa94){return _0x39fa94();},'mMDqm':_0x355650(0x16f),'nTdGt':function(_0x2e53d4){return _0x2e53d4();},'ViPLy':function(_0x5e1dca,_0x211b79,_0xf9f73){return _0x5e1dca(_0x211b79,_0xf9f73);},'RKbdB':_0x355650(0x15d),'geENI':_0x355650(0x135),'RJCFg':function(_0x46f8fb,_0x1ca4b3){return _0x46f8fb!==_0x1ca4b3;},'fFbAx':function(_0x368cb4,_0x4bf223){return _0x368cb4!==_0x4bf223;}},_0x518a51=await _0x50eca3[_0x355650(0x159)](getToken);if(!_0x518a51)throw new Error(_0x50eca3['mMDqm']);const _0x3f3d64=_0x50eca3[_0x355650(0x18b)](getApiBaseUrl),_0x35c0a8=await _0x50eca3['ViPLy'](fetch,_0x3f3d64+'/api/v1/mcp/browser-sessions/'+_0xb0051c+_0x355650(0x14c),{'method':_0x50eca3['RKbdB'],'headers':{'Authorization':'Bearer\x20'+_0x518a51,'Content-Type':_0x50eca3[_0x355650(0x198)]},'body':JSON[_0x355650(0x139)]({'filename':_0x45bcad,'filetype':_0x3ce2b3,..._0x50eca3[_0x355650(0x14e)](_0x9cafd4?.['size'],undefined)&&{'size':_0x9cafd4[_0x355650(0x1a4)]},..._0x50eca3[_0x355650(0x14e)](_0x9cafd4?.[_0x355650(0x15e)],undefined)&&{'checksum':_0x9cafd4[_0x355650(0x15e)]},..._0x50eca3[_0x355650(0x140)](_0x9cafd4?.['metadata'],undefined)&&{'metadata':_0x9cafd4[_0x355650(0x161)]}})});if(!_0x35c0a8['ok']){const _0x3956dc=await _0x35c0a8['text']();throw new Error(_0x355650(0x18d)+_0x3956dc);}return _0x35c0a8[_0x355650(0x15f)]();}export async function uploadFile(_0x58494b,_0xfb78c3,_0x45f3f5){const _0x3de3a9=_0x2c53,_0x2c3549={'mlqjL':_0x3de3a9(0x145),'KyQTn':function(_0x342acc,_0x49f694){return _0x342acc===_0x49f694;},'IccEZ':_0x3de3a9(0x1a3),'ZIyUV':'CThIw'},_0x1fc3bc=await fetch(_0x58494b,{'method':_0x2c3549['mlqjL'],'headers':{'Content-Type':_0x45f3f5,'Content-Length':_0xfb78c3[_0x3de3a9(0x154)][_0x3de3a9(0x134)]()},'body':_0xfb78c3});if(!_0x1fc3bc['ok']){if(_0x2c3549[_0x3de3a9(0x148)](_0x2c3549['IccEZ'],_0x2c3549[_0x3de3a9(0x195)]))throw new _0x46fbdf(_0x3de3a9(0x16f));else{const _0x2d1b05=await _0x1fc3bc['text']();throw new Error(_0x3de3a9(0x18e)+_0x2d1b05);}}}export async function uploadTrace(_0x35a8f9,_0x236213){const _0x2b9b59=_0x2c53,_0x43bc5e={'SRIvT':function(_0x34d988,_0x526ae2,_0x5220d7,_0x1af787){return _0x34d988(_0x526ae2,_0x5220d7,_0x1af787);},'kPOAJ':_0x2b9b59(0x1a7)};return _0x43bc5e[_0x2b9b59(0x146)](uploadFile,_0x35a8f9,_0x236213,_0x43bc5e['kPOAJ']);}export async function uploadConversation(_0x578db2,_0x28fffe){const _0xc8a459=_0x2c53,_0x67fb7e={'mIUcy':'application/jsonl'};return uploadFile(_0x578db2,_0x28fffe,_0x67fb7e[_0xc8a459(0x17b)]);}export async function uploadScreenshot(_0x2173d4,_0x3d0b69){const _0xb42ba3=_0x2c53,_0xaaac00={'JuEoO':function(_0x32becf,_0x19926b,_0x28866,_0x324409){return _0x32becf(_0x19926b,_0x28866,_0x324409);},'gsZsJ':'image/png'};return _0xaaac00[_0xb42ba3(0x181)](uploadFile,_0x2173d4,_0x3d0b69,_0xaaac00[_0xb42ba3(0x184)]);}export async function uploadVideo(_0x535489,_0x304a94){const _0x49d830=_0x2c53,_0x55decf={'VoFTV':function(_0x1cada1,_0xefc781,_0x4cfc0a,_0x4f4aa8){return _0x1cada1(_0xefc781,_0x4cfc0a,_0x4f4aa8);},'zoUUg':_0x49d830(0x170)};return _0x55decf[_0x49d830(0x166)](uploadFile,_0x535489,_0x304a94,_0x55decf['zoUUg']);}export function buildTraceViewerUrl(_0x285b21){const _0x1a15ea=_0x2c53,_0x2713a1={'FDyJf':function(_0xf99814,_0x2cf8f2){return _0xf99814(_0x2cf8f2);}},_0x293f95=_0x2713a1[_0x1a15ea(0x14f)](encodeURIComponent,_0x285b21);return _0x1a15ea(0x1a6)+_0x293f95;}export async function getProxySessionToken(){const _0x2d57f0=_0x2c53,_0x195d38={'eWKVl':_0x2d57f0(0x16f),'mrJit':function(_0x354722){return _0x354722();},'zzeYw':function(_0x5c08c5,_0x2a174c){return _0x5c08c5===_0x2a174c;},'TLFEo':_0x2d57f0(0x196),'fDtoI':_0x2d57f0(0x165),'LAsQV':function(_0x50a60a,_0x2a5f17,_0x59182e){return _0x50a60a(_0x2a5f17,_0x59182e);},'WjCEF':'POST','mqBkK':function(_0x16a514,_0x18d3b3){return _0x16a514!==_0x18d3b3;},'hsswU':_0x2d57f0(0x191),'sjcWB':_0x2d57f0(0x197)},_0x55ad88=await _0x195d38[_0x2d57f0(0x187)](getToken);if(!_0x55ad88){if(_0x195d38[_0x2d57f0(0x17c)](_0x195d38[_0x2d57f0(0x192)],_0x195d38[_0x2d57f0(0x175)]))throw new _0x1a00d2(_0x195d38[_0x2d57f0(0x153)]);else throw new Error(_0x195d38['eWKVl']);}const _0x39a1be=_0x195d38[_0x2d57f0(0x187)](getApiBaseUrl),_0x3b4fa2=await _0x195d38[_0x2d57f0(0x13e)](fetch,_0x39a1be+_0x2d57f0(0x138),{'method':_0x195d38['WjCEF'],'headers':{'Authorization':_0x2d57f0(0x15a)+_0x55ad88}});if(!_0x3b4fa2['ok']){if(_0x195d38[_0x2d57f0(0x18f)](_0x195d38[_0x2d57f0(0x17e)],_0x195d38['sjcWB'])){const _0x135abe=await _0x3b4fa2['text']();throw new Error(_0x2d57f0(0x13f)+_0x135abe);}else throw new _0x36e9d6(_0x195d38[_0x2d57f0(0x153)]);}const _0x3d5290=await _0x3b4fa2[_0x2d57f0(0x15f)]();return _0x3d5290[_0x2d57f0(0x133)];}export function computeChecksum(_0x51ce1a){const _0x2cab09=_0x2c53,_0x36a222={'uPZTQ':_0x2cab09(0x1a1),'hcBmn':_0x2cab09(0x19d)};return createHash(_0x36a222[_0x2cab09(0x168)])[_0x2cab09(0x183)](_0x51ce1a)['digest'](_0x36a222[_0x2cab09(0x15c)]);}export async function createVerificationStep(_0x532dc2,_0x32eb11){const _0x23bdb0=_0x2c53,_0x2e6f39={'DtWyJ':_0x23bdb0(0x16f),'cOXhT':function(_0x326516){return _0x326516();},'BgqRw':function(_0x405078,_0x4ae0b2,_0x449ddb){return _0x405078(_0x4ae0b2,_0x449ddb);},'qZRTr':'POST','kTzAK':_0x23bdb0(0x135)},_0x465bbc=await getToken();if(!_0x465bbc)throw new Error(_0x2e6f39[_0x23bdb0(0x13a)]);const _0x40de93=_0x2e6f39[_0x23bdb0(0x180)](getApiBaseUrl),_0x36cf9b=await _0x2e6f39[_0x23bdb0(0x186)](fetch,_0x40de93+_0x23bdb0(0x190)+_0x532dc2+_0x23bdb0(0x132),{'method':_0x2e6f39[_0x23bdb0(0x158)],'headers':{'Authorization':_0x23bdb0(0x15a)+_0x465bbc,'Content-Type':_0x2e6f39[_0x23bdb0(0x178)]},'body':JSON[_0x23bdb0(0x139)](_0x32eb11)});if(!_0x36cf9b['ok']){const _0x475107=await _0x36cf9b[_0x23bdb0(0x18c)]();throw new Error(_0x23bdb0(0x160)+_0x475107);}return _0x36cf9b[_0x23bdb0(0x15f)]();}export async function createStepAsset(_0x30bd45,_0x4f8c9a,_0x326534){const _0x505f5b=_0x2c53,_0x2fc6dd={'zjsNZ':_0x505f5b(0x16f),'rcmrV':function(_0x524fa9){return _0x524fa9();},'kMeSC':function(_0x19f104,_0x37eae5,_0x4af703){return _0x19f104(_0x37eae5,_0x4af703);},'SLAwU':'POST','vofrg':_0x505f5b(0x135)},_0x47ca12=await getToken();if(!_0x47ca12)throw new Error(_0x2fc6dd[_0x505f5b(0x19b)]);const _0x10f2d2=_0x2fc6dd[_0x505f5b(0x14b)](getApiBaseUrl),_0x19a725=await _0x2fc6dd['kMeSC'](fetch,_0x10f2d2+_0x505f5b(0x190)+_0x30bd45+_0x505f5b(0x16d)+_0x4f8c9a+_0x505f5b(0x13b),{'method':_0x2fc6dd['SLAwU'],'headers':{'Authorization':_0x505f5b(0x15a)+_0x47ca12,'Content-Type':_0x2fc6dd[_0x505f5b(0x141)]},'body':JSON[_0x505f5b(0x139)](_0x326534)});if(!_0x19a725['ok']){const _0x426142=await _0x19a725[_0x505f5b(0x18c)]();throw new Error(_0x505f5b(0x155)+_0x426142);}return _0x19a725[_0x505f5b(0x15f)]();}export async function updateVerificationStep(_0x436fe0,_0x2eb123,_0x16fb3b){const _0x4d8a55=_0x2c53,_0x50831e={'bpetE':function(_0x2f2edb){return _0x2f2edb();},'sknmw':_0x4d8a55(0x16f),'CFxPH':function(_0xe3f648){return _0xe3f648();},'GShMD':function(_0x4791ed,_0x54739b,_0x405375){return _0x4791ed(_0x54739b,_0x405375);},'XFClv':_0x4d8a55(0x135)},_0x581bed=await _0x50831e['bpetE'](getToken);if(!_0x581bed)throw new Error(_0x50831e['sknmw']);const _0x180a84=_0x50831e['CFxPH'](getApiBaseUrl),_0x5c5e39=await _0x50831e[_0x4d8a55(0x163)](fetch,_0x180a84+_0x4d8a55(0x190)+_0x436fe0+_0x4d8a55(0x16d)+_0x2eb123,{'method':_0x4d8a55(0x15b),'headers':{'Authorization':'Bearer\x20'+_0x581bed,'Content-Type':_0x50831e[_0x4d8a55(0x17f)]},'body':JSON['stringify'](_0x16fb3b)});if(!_0x5c5e39['ok']){const _0x4c2df0=await _0x5c5e39['text']();throw new Error(_0x4d8a55(0x150)+_0x4c2df0);}}export async function getBrowserSessionSteps(_0x1b71f7){const _0xac1bd0=_0x2c53,_0x47285b={'oBAnw':function(_0x2fa9e1){return _0x2fa9e1();},'MBmWL':'GET'},_0x2377f8=await _0x47285b[_0xac1bd0(0x12f)](getToken);if(!_0x2377f8)throw new Error(_0xac1bd0(0x16f));const _0x116944=_0x47285b[_0xac1bd0(0x12f)](getApiBaseUrl),_0x58bfbe=await fetch(_0x116944+_0xac1bd0(0x190)+_0x1b71f7+_0xac1bd0(0x132),{'method':_0x47285b[_0xac1bd0(0x174)],'headers':{'Authorization':'Bearer\x20'+_0x2377f8}});if(!_0x58bfbe['ok']){const _0x417cf2=await _0x58bfbe[_0xac1bd0(0x18c)]();throw new Error(_0xac1bd0(0x16c)+_0x417cf2);}return _0x58bfbe['json']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22e8ac,_0x53ca9d){const _0x48bffd=_0x34de,_0x1e57f0=_0x22e8ac();while(!![]){try{const _0x26ef1c=-parseInt(_0x48bffd(0x168))/0x1+parseInt(_0x48bffd(0x17c))/0x2*(-parseInt(_0x48bffd(0x17d))/0x3)+parseInt(_0x48bffd(0x16b))/0x4*(parseInt(_0x48bffd(0x169))/0x5)+parseInt(_0x48bffd(0x176))/0x6+parseInt(_0x48bffd(0x173))/0x7*(parseInt(_0x48bffd(0x16e))/0x8)+parseInt(_0x48bffd(0x16a))/0x9+parseInt(_0x48bffd(0x16c))/0xa*(-parseInt(_0x48bffd(0x177))/0xb);if(_0x26ef1c===_0x53ca9d)break;else _0x1e57f0['push'](_0x1e57f0['shift']());}catch(_0x116c1a){_0x1e57f0['push'](_0x1e57f0['shift']());}}}(_0x47cd,0x42956));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 _0x186b01=_0x34de,_0x490563={'XzZze':function(_0x116be9){return _0x116be9();}};return process[_0x186b01(0x17a)][_0x186b01(0x16f)]||join(_0x490563[_0x186b01(0x174)](homedir),'.claude');}function _0x34de(_0x2eab94,_0x42c2ff){_0x2eab94=_0x2eab94-0x168;const _0x47cded=_0x47cd();let _0x34deed=_0x47cded[_0x2eab94];return _0x34deed;}export function getUserSkillsDir(){const _0x162ca3=_0x34de,_0x4f0dbf={'EEgRX':function(_0x5490c6){return _0x5490c6();},'uBGrQ':_0x162ca3(0x178)};return join(_0x4f0dbf[_0x162ca3(0x175)](getClaudeConfigDir),_0x4f0dbf['uBGrQ']);}export function getProjectRoot(){const _0x374aae=_0x34de,_0x1f90d7={'BNVus':function(_0x49c38a,_0x563502){return _0x49c38a(_0x563502);},'rKxhR':function(_0x26c8c4,_0x5c0ee5){return _0x26c8c4(_0x5c0ee5);},'GMBSo':function(_0x1a457b,_0x20e034,_0xc90b68){return _0x1a457b(_0x20e034,_0xc90b68);}};let _0x49c02f=process[_0x374aae(0x170)]();const _0x22b044=_0x1f90d7[_0x374aae(0x16d)](parse,_0x49c02f)[_0x374aae(0x171)];while(_0x49c02f!==_0x22b044){if(_0x1f90d7['rKxhR'](existsSync,join(_0x49c02f,'.claude')))return _0x49c02f;if(_0x1f90d7['rKxhR'](existsSync,_0x1f90d7['GMBSo'](join,_0x49c02f,'.git')))return _0x49c02f;_0x49c02f=_0x1f90d7[_0x374aae(0x16d)](dirname,_0x49c02f);}return process['cwd']();}export function getProjectSkillsDir(){const _0x3c58c4=_0x34de,_0x5ada75={'ABzqD':'skills'};return join(getProjectRoot(),'.claude',_0x5ada75[_0x3c58c4(0x17b)]);}export function getSkillsDir(_0x173bab){return _0x173bab==='user'?getUserSkillsDir():getProjectSkillsDir();}function _0x47cd(){const _0x5eb9d4=['UtfJD','env','ABzqD','594336AkCnZZ','3OtIrVC','433605OaOQVj','200455OtlmVv','3537576hDLMtj','8XIUUzN','1752380uMQIrd','BNVus','2360TMxPbQ','CLAUDE_CONFIG_DIR','cwd','root','bYmuE','11424gaTmwo','XzZze','EEgRX','2395734HYteXK','22ocpYTo','skills'];_0x47cd=function(){return _0x5eb9d4;};return _0x47cd();}export function getSettingsPath(){const _0x3e7df3=_0x34de,_0x287072={'UtfJD':'settings.json'};return join(getClaudeConfigDir(),_0x287072[_0x3e7df3(0x179)]);}export async function loadClaudeSettings(){const _0x2dbb29={'kNJpf':function(_0xf781c7,_0x2bc903,_0x2a6061){return _0xf781c7(_0x2bc903,_0x2a6061);},'qlgoS':'utf-8'},_0x4cce66=getSettingsPath();if(!existsSync(_0x4cce66))return{};try{const _0x5c5cf=await _0x2dbb29['kNJpf'](readFile,_0x4cce66,_0x2dbb29['qlgoS']);return JSON['parse'](_0x5c5cf);}catch{return{};}}export async function saveClaudeSettings(_0x2a21c8){const _0x4a6f79=_0x34de,_0x5e93ba={'uvioQ':function(_0x539480){return _0x539480();},'bYmuE':function(_0x2f2513,_0x1ddfc3){return _0x2f2513(_0x1ddfc3);},'ZHguJ':function(_0x3187bc,_0x29c537){return _0x3187bc+_0x29c537;}},_0x390893=getSettingsPath(),_0xe1af46=_0x5e93ba['uvioQ'](getClaudeConfigDir);!_0x5e93ba[_0x4a6f79(0x172)](existsSync,_0xe1af46)&&await mkdir(_0xe1af46,{'recursive':!![]}),await writeFile(_0x390893,_0x5e93ba['ZHguJ'](JSON['stringify'](_0x2a21c8,null,0x2),'\x0a'),'utf-8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3683(_0x5359ff,_0x2b987e){_0x5359ff=_0x5359ff-0xdb;const _0x2ae1d8=_0x2ae1();let _0x3683a0=_0x2ae1d8[_0x5359ff];return _0x3683a0;}(function(_0x187bbc,_0x2b9574){const _0x1b9c50=_0x3683,_0x4f73db=_0x187bbc();while(!![]){try{const _0x2f2788=-parseInt(_0x1b9c50(0xe0))/0x1+-parseInt(_0x1b9c50(0xe4))/0x2+-parseInt(_0x1b9c50(0xdc))/0x3+parseInt(_0x1b9c50(0xdf))/0x4+parseInt(_0x1b9c50(0xe1))/0x5*(parseInt(_0x1b9c50(0xe3))/0x6)+parseInt(_0x1b9c50(0xde))/0x7+-parseInt(_0x1b9c50(0xdd))/0x8*(-parseInt(_0x1b9c50(0xe2))/0x9);if(_0x2f2788===_0x2b9574)break;else _0x4f73db['push'](_0x4f73db['shift']());}catch(_0xf800bd){_0x4f73db['push'](_0x4f73db['shift']());}}}(_0x2ae1,0x613c7));import{isByokEnabled}from'./environment.js';function _0x2ae1(){const _0x5ef9dc=['3032JVfrsJ','2157225lHqQcw','2522204sXoqbD','637129vFSIbK','1465ElwgSi','18801nAViiR','1074mBTYrZ','99690XTXpxG','sDpQO','2092953zEiZct'];_0x2ae1=function(){return _0x5ef9dc;};return _0x2ae1();}const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){const _0x32079d=_0x3683,_0x58292c={'sDpQO':function(_0x54d19a){return _0x54d19a();}};if(_0x58292c[_0x32079d(0xdb)](isByokEnabled))return{};return{'settings':JSON['stringify'](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ec08b,_0x4d52c8){const _0x2ba048=_0x4e88,_0x32e37d=_0x2ec08b();while(!![]){try{const _0x4daa9a=parseInt(_0x2ba048(0x151))/0x1+parseInt(_0x2ba048(0x164))/0x2*(-parseInt(_0x2ba048(0x150))/0x3)+-parseInt(_0x2ba048(0x155))/0x4+parseInt(_0x2ba048(0x14a))/0x5*(-parseInt(_0x2ba048(0x13c))/0x6)+parseInt(_0x2ba048(0x156))/0x7*(-parseInt(_0x2ba048(0x13d))/0x8)+-parseInt(_0x2ba048(0x166))/0x9+parseInt(_0x2ba048(0x14e))/0xa;if(_0x4daa9a===_0x4d52c8)break;else _0x32e37d['push'](_0x32e37d['shift']());}catch(_0xce96ae){_0x32e37d['push'](_0x32e37d['shift']());}}}(_0x2709,0xa70ca));function _0x4e88(_0x3d51fd,_0x21a795){_0x3d51fd=_0x3d51fd-0x13a;const _0x270959=_0x2709();let _0x4e88da=_0x270959[_0x3d51fd];return _0x4e88da;}import{spawn}from'child_process';import{existsSync}from'fs';import{readFile}from'fs/promises';import{join,resolve}from'path';import{getClaudeConfigDir,getProjectRoot}from'./claudeConfig.js';export function runClaudeCommand(_0x178a17,_0x150a98){const _0x55f0c5=_0x4e88,_0x5c49df={'TZBBU':function(_0x388a37,_0x4296f6){return _0x388a37(_0x4296f6);},'KPyuy':'pipe','rDKGV':_0x55f0c5(0x13b),'JZIZq':'data','usTOC':'close','rNzBF':'error'};return new Promise(_0x2699b9=>{const _0x2d4b18=_0x55f0c5,_0x83b344={'JfKlS':function(_0x35f327,_0x19cde0){return _0x5c49df['TZBBU'](_0x35f327,_0x19cde0);}},_0x3dc50f=_0x150a98?.['captureOutput']?['ignore',_0x5c49df[_0x2d4b18(0x162)],_0x5c49df['KPyuy']]:[_0x2d4b18(0x152),_0x5c49df['rDKGV'],_0x2d4b18(0x13b)],_0x48d659=spawn(_0x2d4b18(0x14f),_0x178a17,{'stdio':_0x3dc50f,'cwd':_0x150a98?.['cwd']});let _0x37912d='';_0x150a98?.[_0x2d4b18(0x14c)]&&_0x48d659[_0x2d4b18(0x145)]&&_0x48d659['stdout']['on'](_0x5c49df['JZIZq'],_0x3b14cc=>{const _0x4b1313=_0x2d4b18;_0x37912d+=_0x3b14cc[_0x4b1313(0x15f)]();}),_0x150a98?.['captureOutput']&&_0x48d659['stderr']&&_0x48d659['stderr']['on'](_0x5c49df[_0x2d4b18(0x13f)],_0x929a21=>{const _0x326373=_0x2d4b18;_0x37912d+=_0x929a21[_0x326373(0x15f)]();}),_0x48d659['on'](_0x5c49df[_0x2d4b18(0x14d)],_0x30afc7=>{const _0x128f4b=_0x2d4b18;_0x30afc7===0x0?_0x83b344[_0x128f4b(0x15e)](_0x2699b9,{'success':!![],'output':_0x37912d}):_0x2699b9({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x30afc7,'output':_0x37912d});}),_0x48d659['on'](_0x5c49df['rNzBF'],_0x31312e=>{_0x2699b9({'success':![],'error':_0x31312e['message']});});});}export async function isMarketplaceAdded(_0x4d156d){const _0x38a5ec=_0x4e88,_0x29132f={'QhNDZ':_0x38a5ec(0x13e)},_0x3f382c=await runClaudeCommand([_0x38a5ec(0x143),_0x29132f['QhNDZ'],'list'],{'captureOutput':!![]});if(!_0x3f382c[_0x38a5ec(0x149)]||!_0x3f382c['output'])return![];return _0x3f382c[_0x38a5ec(0x15a)]['includes'](_0x4d156d);}function _0x2709(){const _0x2290c4=['length','output','lTPFa','version','projectPath','JfKlS','toString','SDOcZ','local','KPyuy','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','2soDkyA','map','2606022Mdymqv','[\x5cs\x5cS]*?(enabled|disabled)','scope','inherit','1178286vEWCtw','8WfjUtR','marketplace','JZIZq','IjOcT','includes','VycdC','plugin','project','stdout','list','gpMqL','nbaQu','success','25rjNVLH','FDssv','captureOutput','usTOC','42317820tBgSpM','claude','1908933iucNLI','387148KbRYMm','ignore','fYQli','match','4108480lZShyd','6998614QKMGEM','toLowerCase','pPLwg'];_0x2709=function(){return _0x2290c4;};return _0x2709();}export async function isPluginInstalled(_0x4708dd){const _0x32229f=_0x4e88,_0x2ef854={'dYYBd':function(_0x593c3f,_0x2450dd,_0x5ded3b){return _0x593c3f(_0x2450dd,_0x5ded3b);},'pPLwg':_0x32229f(0x143),'gpMqL':_0x32229f(0x146)},_0x3b5d2a=await getInstalledPluginInfoFromRegistry(_0x4708dd);if(_0x3b5d2a[_0x32229f(0x159)]>0x0)return!![];const _0x2ec48b=await _0x2ef854['dYYBd'](runClaudeCommand,[_0x2ef854[_0x32229f(0x158)],_0x2ef854[_0x32229f(0x147)]],{'captureOutput':!![]});if(!_0x2ec48b['success']||!_0x2ec48b['output'])return![];return _0x2ec48b['output']['includes'](_0x4708dd);}function getInstalledPluginsPath(){const _0x17b403=_0x4e88,_0x5b2775={'FDssv':function(_0x81c2a5,_0x305e47,_0x18064e,_0xe79bed){return _0x81c2a5(_0x305e47,_0x18064e,_0xe79bed);},'Baioy':function(_0x5164eb){return _0x5164eb();},'lTPFa':'plugins','fYQli':'installed_plugins.json'};return _0x5b2775[_0x17b403(0x14b)](join,_0x5b2775['Baioy'](getClaudeConfigDir),_0x5b2775[_0x17b403(0x15b)],_0x5b2775[_0x17b403(0x153)]);}function sortPluginInfo(_0x1cd105,_0x571b67){const _0x2b190c=_0x4e88,_0x22f14f={'atPzx':'user'},_0x468ad4={'project':0x0,'local':0x1,'user':0x2};return _0x468ad4[_0x1cd105[_0x2b190c(0x13a)]??_0x22f14f['atPzx']]-_0x468ad4[_0x571b67[_0x2b190c(0x13a)]??'user'];}export function parseInstalledPluginInfo(_0x18e83e,_0x4a2ab1,_0x4938b2){const _0x7480d6=_0x4e88,_0x53673c={'WTjmC':function(_0x5b8974,_0x32f888){return _0x5b8974(_0x32f888);}},_0x29a360=JSON['parse'](_0x18e83e),_0x4ac201=_0x53673c['WTjmC'](resolve,_0x4938b2),_0x58fced=_0x29a360['plugins']?.[_0x4a2ab1]??[];return _0x58fced['filter'](_0x532bda=>{const _0x3b447f=_0x4e88;if(_0x532bda[_0x3b447f(0x13a)]!==_0x3b447f(0x144)&&_0x532bda['scope']!==_0x3b447f(0x161))return!![];if(!_0x532bda[_0x3b447f(0x15d)])return!![];return resolve(_0x532bda['projectPath'])===_0x4ac201;})[_0x7480d6(0x165)](_0x3cd94a=>({'name':_0x4a2ab1,'scope':_0x3cd94a['scope'],'version':_0x3cd94a[_0x7480d6(0x15c)]}))['sort'](sortPluginInfo);}async function getInstalledPluginInfoFromRegistry(_0x17bade){const _0x900569=_0x4e88,_0x13ca50={'IOHdm':function(_0x2cc3f1,_0x45d86c){return _0x2cc3f1(_0x45d86c);},'nbaQu':'utf-8','ATfxo':function(_0x2b11c7,_0x3d4d2a,_0x5d7049,_0x1594b6){return _0x2b11c7(_0x3d4d2a,_0x5d7049,_0x1594b6);}},_0x28c339=getInstalledPluginsPath();if(!_0x13ca50['IOHdm'](existsSync,_0x28c339))return[];try{const _0x4e1483=await readFile(_0x28c339,_0x13ca50[_0x900569(0x148)]);return _0x13ca50['ATfxo'](parseInstalledPluginInfo,_0x4e1483,_0x17bade,getProjectRoot());}catch{return[];}}export async function getPluginInfo(_0x2e37d8){const _0x443c28=_0x4e88,_0x157ffa={'HXRxW':function(_0x33c266,_0x568536){return _0x33c266(_0x568536);},'SDOcZ':function(_0x50ab0e,_0x522dff){return _0x50ab0e>_0x522dff;},'ajeZl':function(_0x776d6a,_0x2e5834,_0x24f5e2){return _0x776d6a(_0x2e5834,_0x24f5e2);},'IjOcT':'list','UuONR':function(_0x5f0772,_0x43bc71){return _0x5f0772===_0x43bc71;},'VycdC':'enabled'},_0x34422c=await _0x157ffa['HXRxW'](getInstalledPluginInfoFromRegistry,_0x2e37d8);if(_0x157ffa[_0x443c28(0x160)](_0x34422c[_0x443c28(0x159)],0x0))return _0x34422c[0x0];const _0x3e9997=await _0x157ffa['ajeZl'](runClaudeCommand,[_0x443c28(0x143),_0x157ffa[_0x443c28(0x140)]],{'captureOutput':!![]});if(!_0x3e9997['success']||!_0x3e9997[_0x443c28(0x15a)])return null;if(!_0x3e9997[_0x443c28(0x15a)][_0x443c28(0x141)](_0x2e37d8))return null;const _0x2528e2={'name':_0x2e37d8},_0x21361d=_0x3e9997[_0x443c28(0x15a)][_0x443c28(0x154)](new RegExp(_0x2e37d8+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x21361d&&(_0x2528e2[_0x443c28(0x13a)]=_0x21361d[0x1][_0x443c28(0x157)]());const _0x33d743=_0x3e9997['output'][_0x443c28(0x154)](new RegExp(_0x2e37d8+_0x443c28(0x163),'i'));_0x33d743&&(_0x2528e2['version']=_0x33d743[0x1]);const _0x210de0=_0x3e9997[_0x443c28(0x15a)][_0x443c28(0x154)](new RegExp(_0x2e37d8+_0x443c28(0x167),'i'));return _0x210de0&&(_0x2528e2['enabled']=_0x157ffa['UuONR'](_0x210de0[0x1][_0x443c28(0x157)](),_0x157ffa[_0x443c28(0x142)])),_0x2528e2;}
|