@ranger-testing/ranger-cli 2.4.1 → 2.4.2
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/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/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/claudePlugin.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/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2ba9e2,_0x51f195){const _0x10c2af=_0x1894,_0x5dc7e1=_0x2ba9e2();while(!![]){try{const _0x44e2b4=-parseInt(_0x10c2af(0x93))/0x1+-parseInt(_0x10c2af(0xbb))/0x2*(-parseInt(_0x10c2af(0x8f))/0x3)+-parseInt(_0x10c2af(0x9d))/0x4*(parseInt(_0x10c2af(0xa1))/0x5)+parseInt(_0x10c2af(0xb9))/0x6*(-parseInt(_0x10c2af(0xa8))/0x7)+-parseInt(_0x10c2af(0x99))/0x8*(-parseInt(_0x10c2af(0x8c))/0x9)+-parseInt(_0x10c2af(0xa6))/0xa+-parseInt(_0x10c2af(0xb7))/0xb*(-parseInt(_0x10c2af(0x9f))/0xc);if(_0x44e2b4===_0x51f195)break;else _0x5dc7e1['push'](_0x5dc7e1['shift']());}catch(_0x38b46d){_0x5dc7e1['push'](_0x5dc7e1['shift']());}}}(_0x3898,0x3c32c));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{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x1894(_0x5acfc4,_0x27ea8d){_0x5acfc4=_0x5acfc4-0x8a;const _0x38988f=_0x3898();let _0x189430=_0x38988f[_0x5acfc4];return _0x189430;}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x562ed3=_0x1894,_0x2d65ca={'yuHHM':function(_0xef605f,_0x50c5c8){return _0xef605f(_0x50c5c8);},'Xdsyj':'npm','wsZnL':_0x562ed3(0x96),'PATGQ':'inherit','ijFvw':function(_0x5129e2,_0x14537f){return _0x5129e2===_0x14537f;},'IeLBt':'close'};return new Promise(_0x115984=>{const _0x642119=_0x562ed3,_0x178a08={'NIFZW':function(_0x29d0ed,_0x96dd4c){return _0x29d0ed(_0x96dd4c);}};console[_0x642119(0xae)](_0x642119(0xc6)+PACKAGE_NAME+_0x642119(0x9e));const _0x58e24f=spawn(_0x2d65ca[_0x642119(0xa0)],[_0x2d65ca['wsZnL'],'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x2d65ca['PATGQ'],'shell':_0x2d65ca[_0x642119(0xaf)](process['platform'],'win32')});_0x58e24f['on'](_0x2d65ca[_0x642119(0x90)],_0x1ecd34=>{_0x2d65ca['yuHHM'](_0x115984,_0x1ecd34===0x0);}),_0x58e24f['on']('error',()=>{const _0x589be8=_0x642119;_0x178a08[_0x589be8(0x95)](_0x115984,![]);});});}async function updateClaudeMarketplace(){const _0xbc0065=_0x1894,_0x4bc317={'yEtvM':function(_0x1d2dd7,_0x456454){return _0x1d2dd7(_0x456454);},'eJdKp':function(_0x447182,_0x157d06,_0x2fec8e,_0x5cb156){return _0x447182(_0x157d06,_0x2fec8e,_0x5cb156);},'TjuHg':'claude','bGvwy':'marketplace','lAklP':'update','XrJnc':_0xbc0065(0xce),'FPxOE':'win32'};return new Promise(_0x3c97fe=>{const _0x429580=_0xbc0065,_0x4274f5=_0x4bc317[_0x429580(0x91)](spawn,_0x4bc317[_0x429580(0xc0)],['plugin',_0x4bc317[_0x429580(0x98)],_0x4bc317['lAklP'],_0x4bc317[_0x429580(0xb6)]],{'stdio':_0x429580(0xc2),'shell':process[_0x429580(0xad)]===_0x4bc317[_0x429580(0xcc)]});_0x4274f5['on']('close',_0x28019d=>{_0x4bc317['yEtvM'](_0x3c97fe,_0x28019d===0x0);}),_0x4274f5['on'](_0x429580(0x92),()=>{_0x3c97fe(![]);});});}async function updateClaudePlugin(_0x498baf){const _0x293b77=_0x1894,_0x29aef1={'Oxaty':function(_0x32ed18,_0x10c732){return _0x32ed18(_0x10c732);},'ctgWa':_0x293b77(0xab),'FgnKH':'update','aTQlt':_0x293b77(0xa7),'uJXcY':'--scope','suBfA':'pipe','JHWuS':function(_0x147d2c,_0x42f537){return _0x147d2c===_0x42f537;},'rnBSl':_0x293b77(0xcd),'qWuxd':_0x293b77(0x92)};return new Promise(_0x3d19c4=>{const _0x5427f4=_0x293b77,_0x2f7d4f=[_0x29aef1['ctgWa'],_0x29aef1[_0x5427f4(0xc1)],_0x29aef1[_0x5427f4(0xbe)]];_0x498baf&&_0x2f7d4f['push'](_0x29aef1['uJXcY'],_0x498baf);const _0x103b01=spawn(_0x5427f4(0xbf),_0x2f7d4f,{'stdio':_0x29aef1['suBfA'],'shell':_0x29aef1['JHWuS'](process[_0x5427f4(0xad)],_0x29aef1[_0x5427f4(0xaa)])});_0x103b01['on']('close',_0x2782a4=>{const _0x57a983=_0x5427f4;_0x29aef1[_0x57a983(0xca)](_0x3d19c4,_0x2782a4===0x0);}),_0x103b01['on'](_0x29aef1['qWuxd'],()=>{_0x29aef1['Oxaty'](_0x3d19c4,![]);});});}function _0x3898(){const _0x3508dd=['SrmwX','bGvwy','33752ENwIEt','project','\x0aReinstalling\x20','utf-8','51028ApTKgP','@latest...\x0a','535764KIqHxE','Xdsyj','85nRBooz','join','trim','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','EvMZx','464380lEsurd','ranger@trailhead','27601qXDahM','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','rnBSl','plugin','.gitignore','platform','log','ijFvw',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','version','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','\x0aCould\x20not\x20check\x20latest\x20version:\x20','IUEPZ','fExTC','XrJnc','99OrNEvq','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','738qUwySG','opencode','20zBWznL','IdhTm','\x0a✅\x20Update\x20complete!','aTQlt','claude','TjuHg','FgnKH','pipe','Attempting\x20install\x20anyway...','\x0aCurrent\x20version:\x20','\x20skill\x20','\x0aInstalling\x20','\x20ranger-managed\x20skill(s)...','ojCNG','tImGT','Oxaty','wqFSE','FPxOE','win32','trailhead','findIndex','HYyPM','length','738nSDPMA','ahaAh','endsWith','100140NPzFFt','IeLBt','eJdKp','error','86713JCFqMY','Update\x20failed:\x20','NIFZW','install'];_0x3898=function(){return _0x3508dd;};return _0x3898();}function isSkillInstalled(_0x1ccecf,_0x2f875e,_0x5db455){const _0x11448a=_0x1894,_0x584c05={'fExTC':function(_0x50fe01,_0x11c927,_0x444bcc){return _0x50fe01(_0x11c927,_0x444bcc);}},_0x28284d=_0x5db455==='opencode'?getOpencodeSkillsDir(_0x2f875e):getSkillsDir(_0x2f875e),_0x5ded94=_0x584c05[_0x11448a(0xb5)](join,_0x28284d,_0x1ccecf);return existsSync(_0x5ded94);}async function reinstallSkills(_0x2e2961){const _0xbde658=_0x1894,_0x43ec91={'adQdM':'claude','ojCNG':function(_0x3aad01,_0x1edad1,_0x33b305,_0xc50c38){return _0x3aad01(_0x1edad1,_0x33b305,_0xc50c38);},'tImGT':_0xbde658(0xba),'vbcoJ':function(_0x366286,_0x30b429,_0x30640f){return _0x366286(_0x30b429,_0x30640f);},'ahaAh':_0xbde658(0xa9)},_0x1d5fcb=['project','user'],_0x5721bf=[];for(const _0x2a6903 of _0x1d5fcb){for(const _0x51140a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x51140a,_0x2a6903,_0x43ec91['adQdM'])&&_0x5721bf['push']({'skillName':_0x51140a,'level':_0x2a6903,'platform':_0xbde658(0xbf)}),_0x43ec91[_0xbde658(0xc8)](isSkillInstalled,_0x51140a,_0x2a6903,_0xbde658(0xba))&&_0x5721bf['push']({'skillName':_0x51140a,'level':_0x2a6903,'platform':_0x43ec91[_0xbde658(0xc9)]});}}for(const _0x223515 of _0x1d5fcb){for(const _0xb77445 of DEPRECATED_SKILLS){await _0x43ec91['vbcoJ'](removeSkill,_0xb77445,_0x223515);}}if(_0x5721bf['length']===0x0){console['log'](_0x43ec91[_0xbde658(0x8d)]);return;}console['log'](_0xbde658(0x9b)+_0x5721bf[_0xbde658(0x8b)]+_0xbde658(0xc7));for(const {skillName:_0x41fa54,level:_0x452c7c,platform:_0x7dede8}of _0x5721bf){try{await _0x43ec91['vbcoJ'](installSkill,_0x41fa54,{'level':_0x452c7c,'cliVersion':_0x2e2961,'platform':_0x7dede8});}catch(_0x5e65d9){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x7dede8+'\x20'+_0x452c7c+_0xbde658(0xc5)+_0x41fa54+':',_0x5e65d9);}}}async function ensureActiveProfileGitignored(){const _0x57d4f4=_0x1894,_0x3ecc4a={'IUEPZ':function(_0x2fb330,_0x3cf8cb,_0x372dbf){return _0x2fb330(_0x3cf8cb,_0x372dbf);},'EvMZx':function(_0x401d00){return _0x401d00();},'ZHWgB':_0x57d4f4(0xac),'GnaJL':function(_0x4ce48c,_0x8a41aa){return _0x4ce48c(_0x8a41aa);},'wqFSE':_0x57d4f4(0x9c)},_0xfa3e5=_0x3ecc4a[_0x57d4f4(0xb4)](join,_0x3ecc4a[_0x57d4f4(0xa5)](getRangerDir),_0x3ecc4a['ZHWgB']);if(!_0x3ecc4a['GnaJL'](existsSync,_0xfa3e5))return![];let _0x52c552='';try{_0x52c552=await readFile(_0xfa3e5,_0x57d4f4(0x9c));}catch{return![];}const _0x3c3605=_0x52c552['split'](/\r?\n/);if(_0x3c3605['some'](_0x4bdd1f=>_0x4bdd1f['trim']()==='active-profile.txt'))return![];let _0x324f91=_0x3c3605[_0x57d4f4(0xcf)](_0x6cd7e9=>_0x6cd7e9[_0x57d4f4(0xa3)]()==='active-feature.txt');_0x324f91===-0x1&&(_0x324f91=_0x3c3605['length']);_0x3c3605['splice'](_0x324f91,0x0,'active-profile.txt');let _0x5dead8=_0x3c3605[_0x57d4f4(0xa2)]('\x0a');!_0x5dead8[_0x57d4f4(0x8e)]('\x0a')&&(_0x5dead8+='\x0a');try{await writeFile(_0xfa3e5,_0x5dead8,_0x3ecc4a[_0x57d4f4(0xcb)]);}catch{return![];}return!![];}export async function update(){const _0x4642c2=_0x1894,_0x1693ed={'SrmwX':function(_0x3c86c6){return _0x3c86c6();},'cCjGK':'\x0aSuccessfully\x20installed\x20latest\x20version.','HYyPM':function(_0x4f4c6b,_0x4982e0){return _0x4f4c6b(_0x4982e0);},'UiYRm':function(_0x598c6a,_0x4f8941){return _0x598c6a(_0x4f8941);},'CeItz':_0x4642c2(0xb2),'KbMYZ':_0x4642c2(0xa4),'IdhTm':_0x4642c2(0xbd)},_0x50cdc5=_0x1693ed[_0x4642c2(0x97)](getCurrentVersion);console[_0x4642c2(0xae)](_0x4642c2(0xc4)+_0x50cdc5),console['log']('Checking\x20for\x20updates...');const _0x25e99f=getLatestVersion();let _0x30beca=_0x50cdc5;if(!_0x25e99f[_0x4642c2(0xb1)]){console['warn'](_0x4642c2(0xb3)+_0x25e99f['error']),console[_0x4642c2(0xae)](_0x4642c2(0xc3));const _0x45fffe=await runInstall();if(_0x45fffe)console[_0x4642c2(0xae)](_0x1693ed['cCjGK']),_0x30beca=_0x1693ed[_0x4642c2(0x97)](getCurrentVersion);else throw new Error(_0x4642c2(0x94)+_0x25e99f['error']);}else{const _0x4ba3fa=_0x25e99f[_0x4642c2(0xb1)];console[_0x4642c2(0xae)]('Latest\x20version:\x20\x20'+_0x4ba3fa);const _0x5282d0=compareVersions(_0x50cdc5,_0x4ba3fa);if(_0x5282d0===0x0)console[_0x4642c2(0xae)](_0x4642c2(0xb8));else{if(_0x5282d0<0x0)console[_0x4642c2(0xae)]('\x0aYour\x20version\x20('+_0x50cdc5+_0x4642c2(0xb0)+_0x4ba3fa+').');else{const _0x33ebee=await _0x1693ed[_0x4642c2(0x97)](runInstall);if(_0x33ebee)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x4ba3fa),_0x30beca=_0x4ba3fa;else throw new Error('Update\x20failed.');}}}await _0x1693ed[_0x4642c2(0x8a)](reinstallSkills,_0x30beca);const _0x15327b=await _0x1693ed[_0x4642c2(0x8a)](isMarketplaceAdded,_0x4642c2(0xce)),_0x245c09=await _0x1693ed['UiYRm'](isPluginInstalled,'ranger@trailhead');if(_0x15327b){const _0x49bbda=await updateClaudeMarketplace();_0x49bbda&&console['log'](_0x1693ed['CeItz']);}if(_0x245c09){const _0x3f3f08=await _0x1693ed[_0x4642c2(0x97)](updateClaudePlugin);_0x3f3f08&&console[_0x4642c2(0xae)](_0x1693ed['KbMYZ']);const _0x4ab628=await updateClaudePlugin(_0x4642c2(0x9a));_0x4ab628&&console['log']((_0x3f3f08?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x1eacac=await _0x1693ed[_0x4642c2(0x97)](migrateActiveProfileFile);_0x1eacac&&console[_0x4642c2(0xae)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x4e6270=await _0x1693ed['SrmwX'](ensureActiveProfileGitignored);console[_0x4642c2(0xae)](_0x1693ed[_0x4642c2(0xbc)]);}
|
|
1
|
+
(function(_0x1b2bec,_0x3a1f30){const _0x1b5f9c=_0x31fa,_0x4d084d=_0x1b2bec();while(!![]){try{const _0x55261a=parseInt(_0x1b5f9c(0x230))/0x1+-parseInt(_0x1b5f9c(0x205))/0x2+-parseInt(_0x1b5f9c(0x227))/0x3+parseInt(_0x1b5f9c(0x229))/0x4*(parseInt(_0x1b5f9c(0x22f))/0x5)+parseInt(_0x1b5f9c(0x220))/0x6+-parseInt(_0x1b5f9c(0x225))/0x7*(parseInt(_0x1b5f9c(0x212))/0x8)+parseInt(_0x1b5f9c(0x204))/0x9;if(_0x55261a===_0x3a1f30)break;else _0x4d084d['push'](_0x4d084d['shift']());}catch(_0x3adabd){_0x4d084d['push'](_0x4d084d['shift']());}}}(_0x2cea,0xccd1d));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{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';function _0x31fa(_0x2b34e8,_0x218a4f){_0x2b34e8=_0x2b34e8-0x1e9;const _0x2cea22=_0x2cea();let _0x31fa8d=_0x2cea22[_0x2b34e8];return _0x31fa8d;}import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';function _0x2cea(){const _0x37a004=['emBLL','sscCM','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','claude','findIndex','push','jyOIk','ranger@trailhead','jRKfZ','6427840xwbkZN','\x0aCould\x20not\x20check\x20latest\x20version:\x20','plugin','version','split','utf-8','splice','\x0aYour\x20version\x20(','wYJZN','nORwR','lITnP','SiRWi','npm','GOvPa','8737290ZdWQYX','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','trim','length','7TlYYPk','Attempting\x20install\x20anyway...','1480707KoQGWw','\x0aReinstalling\x20','3768pmCTqW','platform','wAnYe','error','kGtpX','\x0a✅\x20Update\x20complete!','1805EBnDkB','1104798dRdbzq','gcfps','close','opencode','active-feature.txt','rXhYB','sNCJB','pipe','log','Latest\x20version:\x20\x20','\x0aInstalling\x20','UuVFm','\x20ranger-managed\x20skill(s)...','MfptZ','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','Update\x20failed:\x20','sdHzD','project','UpCJz','gKFmI','--scope','trailhead','active-profile.txt','Claude\x20plugin\x20updated\x20(project\x20scope).','sfgXP','win32','IuNPl','\x20skill\x20','Checking\x20for\x20updates...','4571127szcplp','2545976GNCIdQ','fJjUQ','update','jHNmr'];_0x2cea=function(){return _0x37a004;};return _0x2cea();}import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x32e83c=_0x31fa,_0x2caa2d={'sdHzD':function(_0x4e1fbd,_0x16ffa4,_0x4e4bd9,_0xb79bdb){return _0x4e1fbd(_0x16ffa4,_0x4e4bd9,_0xb79bdb);},'wRJzx':_0x32e83c(0x21e),'lITnP':'install','wcqjK':'inherit','emBLL':_0x32e83c(0x1e9)};return new Promise(_0x5d7b2d=>{const _0x2ab963=_0x32e83c,_0x2500f8={'eMdyb':function(_0x42d28f,_0x15f330){return _0x42d28f(_0x15f330);}};console[_0x2ab963(0x1ef)](_0x2ab963(0x1f1)+PACKAGE_NAME+'@latest...\x0a');const _0x490496=_0x2caa2d[_0x2ab963(0x1f7)](spawn,_0x2caa2d['wRJzx'],[_0x2caa2d[_0x2ab963(0x21c)],'-g',PACKAGE_NAME+'@latest'],{'stdio':_0x2caa2d['wcqjK'],'shell':process[_0x2ab963(0x22a)]===_0x2ab963(0x200)});_0x490496['on'](_0x2caa2d[_0x2ab963(0x209)],_0x2daf31=>{_0x2500f8['eMdyb'](_0x5d7b2d,_0x2daf31===0x0);}),_0x490496['on'](_0x2ab963(0x22c),()=>{_0x5d7b2d(![]);});});}async function updateClaudeMarketplace(){const _0x88a605=_0x31fa,_0x4bcbd2={'kGtpX':function(_0x1024a0,_0x222c42){return _0x1024a0(_0x222c42);},'sBglX':_0x88a605(0x214),'tZweb':'marketplace','nORwR':_0x88a605(0x207),'gKFmI':'trailhead','IuNPl':'pipe','wPGHw':function(_0x5b9789,_0x358f00){return _0x5b9789===_0x358f00;},'EZtGl':'error'};return new Promise(_0x12e4a0=>{const _0x5c303e=_0x88a605,_0x41df20=spawn(_0x5c303e(0x20c),[_0x4bcbd2['sBglX'],_0x4bcbd2['tZweb'],_0x4bcbd2[_0x5c303e(0x21b)],_0x4bcbd2[_0x5c303e(0x1fa)]],{'stdio':_0x4bcbd2[_0x5c303e(0x201)],'shell':_0x4bcbd2['wPGHw'](process[_0x5c303e(0x22a)],'win32')});_0x41df20['on'](_0x5c303e(0x1e9),_0x1e42b4=>{const _0x474691=_0x5c303e;_0x4bcbd2[_0x474691(0x22d)](_0x12e4a0,_0x1e42b4===0x0);}),_0x41df20['on'](_0x4bcbd2['EZtGl'],()=>{_0x12e4a0(![]);});});}async function updateClaudePlugin(_0x2a0094){const _0x4e121b=_0x31fa,_0x34cb3e={'lfStP':'plugin','eynsO':'update','UuVFm':'ranger@trailhead','yjIxI':_0x4e121b(0x1fb),'gcfps':function(_0x1b725b,_0x298403,_0x56b164,_0x3678c1){return _0x1b725b(_0x298403,_0x56b164,_0x3678c1);},'sfgXP':_0x4e121b(0x1ee),'jHNmr':'win32'};return new Promise(_0x1ce34a=>{const _0x207ba3=_0x4e121b,_0x18cea8=[_0x34cb3e['lfStP'],_0x34cb3e['eynsO'],_0x34cb3e[_0x207ba3(0x1f2)]];_0x2a0094&&_0x18cea8['push'](_0x34cb3e['yjIxI'],_0x2a0094);const _0x19dfa9=_0x34cb3e[_0x207ba3(0x231)](spawn,_0x207ba3(0x20c),_0x18cea8,{'stdio':_0x34cb3e[_0x207ba3(0x1ff)],'shell':process[_0x207ba3(0x22a)]===_0x34cb3e[_0x207ba3(0x208)]});_0x19dfa9['on'](_0x207ba3(0x1e9),_0x36eb56=>{_0x1ce34a(_0x36eb56===0x0);}),_0x19dfa9['on'](_0x207ba3(0x22c),()=>{_0x1ce34a(![]);});});}function isSkillInstalled(_0x103d8d,_0x3585dc,_0x520bdb){const _0x45f313=_0x31fa,_0x5e9df1={'GOvPa':function(_0x41acc4,_0x25a710){return _0x41acc4(_0x25a710);},'rXhYB':function(_0x19f84f,_0x1d39ee,_0x530a48){return _0x19f84f(_0x1d39ee,_0x530a48);}},_0x3a72f3=_0x520bdb===_0x45f313(0x1ea)?getOpencodeSkillsDir(_0x3585dc):_0x5e9df1[_0x45f313(0x21f)](getSkillsDir,_0x3585dc),_0x31073b=_0x5e9df1[_0x45f313(0x1ec)](join,_0x3a72f3,_0x103d8d);return _0x5e9df1['GOvPa'](existsSync,_0x31073b);}async function reinstallSkills(_0x484376){const _0x8f4ea=_0x31fa,_0x4372b6={'jRKfZ':_0x8f4ea(0x1f8),'SiRWi':'claude','CtiAj':_0x8f4ea(0x1ea),'sNCJB':function(_0xb8f881,_0x243ca2,_0x3f1ec5){return _0xb8f881(_0x243ca2,_0x3f1ec5);},'xLHpl':_0x8f4ea(0x222)},_0x25525d=[_0x4372b6[_0x8f4ea(0x211)],'user'],_0x36b5cd=[];for(const _0x3175a9 of _0x25525d){for(const _0x264013 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x264013,_0x3175a9,_0x4372b6[_0x8f4ea(0x21d)])&&_0x36b5cd[_0x8f4ea(0x20e)]({'skillName':_0x264013,'level':_0x3175a9,'platform':'claude'}),isSkillInstalled(_0x264013,_0x3175a9,_0x4372b6['CtiAj'])&&_0x36b5cd[_0x8f4ea(0x20e)]({'skillName':_0x264013,'level':_0x3175a9,'platform':'opencode'});}}for(const _0x3b12f3 of _0x25525d){for(const _0x115a92 of DEPRECATED_SKILLS){await _0x4372b6[_0x8f4ea(0x1ed)](removeSkill,_0x115a92,_0x3b12f3);}}if(_0x36b5cd[_0x8f4ea(0x224)]===0x0){console[_0x8f4ea(0x1ef)](_0x4372b6['xLHpl']);return;}console[_0x8f4ea(0x1ef)](_0x8f4ea(0x228)+_0x36b5cd['length']+_0x8f4ea(0x1f3));for(const {skillName:_0x36af10,level:_0x135afa,platform:_0xff5c31}of _0x36b5cd){try{await installSkill(_0x36af10,{'level':_0x135afa,'cliVersion':_0x484376,'platform':_0xff5c31});}catch(_0x4bcb71){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0xff5c31+'\x20'+_0x135afa+_0x8f4ea(0x202)+_0x36af10+':',_0x4bcb71);}}}async function ensureActiveProfileGitignored(){const _0x3001da=_0x31fa,_0x35a1bf={'wAnYe':function(_0x3da2ed,_0x56defd,_0x5a791e){return _0x3da2ed(_0x56defd,_0x5a791e);},'mYlAA':function(_0x14a7e1,_0x2a3c6c){return _0x14a7e1(_0x2a3c6c);},'wYJZN':_0x3001da(0x217)},_0x3dce1c=_0x35a1bf[_0x3001da(0x22b)](join,getRangerDir(),'.gitignore');if(!_0x35a1bf['mYlAA'](existsSync,_0x3dce1c))return![];let _0xebde7b='';try{_0xebde7b=await readFile(_0x3dce1c,_0x35a1bf[_0x3001da(0x21a)]);}catch{return![];}const _0x3dd2a7=_0xebde7b[_0x3001da(0x216)](/\r?\n/);if(_0x3dd2a7['some'](_0x4978cf=>_0x4978cf['trim']()===_0x3001da(0x1fd)))return![];let _0x4be6d6=_0x3dd2a7[_0x3001da(0x20d)](_0x10ad84=>_0x10ad84[_0x3001da(0x223)]()===_0x3001da(0x1eb));_0x4be6d6===-0x1&&(_0x4be6d6=_0x3dd2a7[_0x3001da(0x224)]);_0x3dd2a7[_0x3001da(0x218)](_0x4be6d6,0x0,'active-profile.txt');let _0xa070fa=_0x3dd2a7['join']('\x0a');!_0xa070fa['endsWith']('\x0a')&&(_0xa070fa+='\x0a');try{await writeFile(_0x3dce1c,_0xa070fa,_0x3001da(0x217));}catch{return![];}return!![];}export async function update(){const _0x2eba0a=_0x31fa,_0x12588f={'NxdQj':_0x2eba0a(0x203),'IRmVc':function(_0x1d612a){return _0x1d612a();},'fJjUQ':_0x2eba0a(0x226),'jyOIk':function(_0x2931af,_0x39b8c2){return _0x2931af<_0x39b8c2;},'sscCM':function(_0x521b35,_0x5cf4c2){return _0x521b35(_0x5cf4c2);},'wmTmF':_0x2eba0a(0x1fc),'MfptZ':function(_0x411775){return _0x411775();},'wFZVN':function(_0x328396,_0x404962){return _0x328396(_0x404962);},'UpCJz':'✓\x20Migrated\x20active\x20profile\x20file'},_0x5644fa=getCurrentVersion();console[_0x2eba0a(0x1ef)]('\x0aCurrent\x20version:\x20'+_0x5644fa),console[_0x2eba0a(0x1ef)](_0x12588f['NxdQj']);const _0x60d929=_0x12588f['IRmVc'](getLatestVersion);let _0x46057b=_0x5644fa;if(!_0x60d929[_0x2eba0a(0x215)]){console['warn'](_0x2eba0a(0x213)+_0x60d929[_0x2eba0a(0x22c)]),console['log'](_0x12588f[_0x2eba0a(0x206)]);const _0x223b40=await _0x12588f['IRmVc'](runInstall);if(_0x223b40)console[_0x2eba0a(0x1ef)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x46057b=_0x12588f['IRmVc'](getCurrentVersion);else throw new Error(_0x2eba0a(0x1f6)+_0x60d929[_0x2eba0a(0x22c)]);}else{const _0x1fe6ce=_0x60d929['version'];console['log'](_0x2eba0a(0x1f0)+_0x1fe6ce);const _0x37cec2=compareVersions(_0x5644fa,_0x1fe6ce);if(_0x37cec2===0x0)console[_0x2eba0a(0x1ef)](_0x2eba0a(0x221));else{if(_0x12588f[_0x2eba0a(0x20f)](_0x37cec2,0x0))console[_0x2eba0a(0x1ef)](_0x2eba0a(0x219)+_0x5644fa+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1fe6ce+').');else{const _0x1b9f29=await runInstall();if(_0x1b9f29)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1fe6ce),_0x46057b=_0x1fe6ce;else throw new Error('Update\x20failed.');}}}await _0x12588f[_0x2eba0a(0x20a)](reinstallSkills,_0x46057b);const _0x3a9339=await _0x12588f['sscCM'](isMarketplaceAdded,_0x12588f['wmTmF']),_0x2d11fb=await isPluginInstalled(_0x2eba0a(0x210));if(_0x3a9339){const _0x1271e7=await updateClaudeMarketplace();_0x1271e7&&console[_0x2eba0a(0x1ef)](_0x2eba0a(0x20b));}if(_0x2d11fb){const _0x463dca=await _0x12588f[_0x2eba0a(0x1f4)](updateClaudePlugin);_0x463dca&&console['log'](_0x2eba0a(0x1f5));const _0x3688f5=await _0x12588f['wFZVN'](updateClaudePlugin,'project');_0x3688f5&&console[_0x2eba0a(0x1ef)]((_0x463dca?'':'\x0a')+_0x2eba0a(0x1fe));}const _0x19a0e2=await migrateActiveProfileFile();_0x19a0e2&&console['log'](_0x12588f[_0x2eba0a(0x1f9)]);const _0x220138=await ensureActiveProfileGitignored();console['log'](_0x2eba0a(0x22e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33d67f,_0x3f53be){const _0x43d3f0=_0x8908,_0x13fc44=_0x33d67f();while(!![]){try{const _0xb4d88d=-parseInt(_0x43d3f0(0xe8))/0x1*(-parseInt(_0x43d3f0(0xcc))/0x2)+parseInt(_0x43d3f0(0xd3))/0x3+parseInt(_0x43d3f0(0xfc))/0x4*(parseInt(_0x43d3f0(0xfe))/0x5)+parseInt(_0x43d3f0(0xea))/0x6*(-parseInt(_0x43d3f0(0xeb))/0x7)+parseInt(_0x43d3f0(0xe3))/0x8*(-parseInt(_0x43d3f0(0xd9))/0x9)+-parseInt(_0x43d3f0(0xed))/0xa+-parseInt(_0x43d3f0(0xe7))/0xb*(-parseInt(_0x43d3f0(0xf9))/0xc);if(_0xb4d88d===_0x3f53be)break;else _0x13fc44['push'](_0x13fc44['shift']());}catch(_0x5297d2){_0x13fc44['push'](_0x13fc44['shift']());}}}(_0xcc7c,0xbedd0));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3ccaa0,_0x399d6d,_0x211ba8){const _0x3fb35e=_0x8908,_0x54f7cb={'VfHdC':'Saving\x20authentication\x20state...','GWpPp':function(_0x5c24da){return _0x5c24da();},'RrHdY':_0x3fb35e(0xca),'Vphmb':'settings.json','VYcrt':function(_0x48e35e,_0x5970c7,_0xfb68cf){return _0x48e35e(_0x5970c7,_0xfb68cf);},'dAGcP':'auth.json','IwbJx':function(_0x2979de,_0x1d3035){return _0x2979de(_0x1d3035);},'NnQng':function(_0xba8ec0,_0x150a7b,_0x1b3e50){return _0xba8ec0(_0x150a7b,_0x1b3e50);},'KbzEi':'utf-8','brmpj':function(_0x75852,_0x15d1f8){return _0x75852(_0x15d1f8);},'kABni':function(_0x20622c,_0x321c4f){return _0x20622c===_0x321c4f;},'vQqth':'string','rGxqP':function(_0x3ebe6b,_0x55af6b){return _0x3ebe6b(_0x55af6b);},'bDVvA':_0x3fb35e(0xe5),'PmqDf':function(_0x16fb4a,_0x5d15a5){return _0x16fb4a||_0x5d15a5;},'ukpJI':_0x3fb35e(0xe0),'TjqEc':_0x3fb35e(0xe1),'XeGlq':function(_0x393ee9,_0x8e290b,_0x1a22fe){return _0x393ee9(_0x8e290b,_0x1a22fe);},'gsZfs':function(_0x40bfa2,_0x3dae1e){return _0x40bfa2(_0x3dae1e);},'TcEwz':'browser_auth','RylTE':function(_0x31ec2b,_0x50d4f7,_0x27beba){return _0x31ec2b(_0x50d4f7,_0x27beba);},'AKxTh':'config_write'},_0x27adc0=getEnvDir(_0x3ccaa0),_0x901dd4=join(_0x27adc0,_0x54f7cb['Vphmb']),_0x1f7265=_0x54f7cb[_0x3fb35e(0xdd)](join,_0x27adc0,_0x54f7cb[_0x3fb35e(0xf0)]),_0x456cac=_0x1f7265+_0x3fb35e(0xd7),_0x75c89b=process['stdin']['isTTY']&&process[_0x3fb35e(0xfa)][_0x3fb35e(0xdb)];if(!_0x75c89b)throw new Error(_0x3fb35e(0xff));if(!_0x54f7cb['IwbJx'](existsSync,_0x27adc0))throw new Error(_0x3fb35e(0xd1)+_0x3ccaa0+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3ccaa0);if(!existsSync(_0x901dd4))throw new Error('Config\x20not\x20found\x20at\x20'+_0x901dd4+_0x3fb35e(0xf6)+_0x3ccaa0);const _0x14f33b=await _0x54f7cb[_0x3fb35e(0xe9)](readFile,_0x901dd4,_0x54f7cb['KbzEi']),_0x1f5a72=JSON[_0x3fb35e(0xcf)](_0x14f33b),_0x28dbb1=_0x54f7cb['brmpj'](resolveEnvVars,_0x1f5a72),_0x5d4656=_0x54f7cb['kABni'](typeof _0x28dbb1['baseUrl'],_0x54f7cb['vQqth'])?_0x28dbb1[_0x3fb35e(0xe2)]:undefined,_0x499de8=_0x54f7cb[_0x3fb35e(0xf1)](existsSync,_0x1f7265),_0x2e3374=isEnvCi(_0x3ccaa0);_0x399d6d?.['trackPhaseStart']('browser_auth'),console['log']('\x0a📋\x20Authentication\x20Update'),console[_0x3fb35e(0xd0)](_0x54f7cb['bDVvA']),console[_0x3fb35e(0xd0)]('\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.'),console[_0x3fb35e(0xd0)](_0x3fb35e(0xcb));const {launchOptions:_0x181ef8,contextOptions:_0x4434da}=buildBrowserOptionsFromSettings(_0x28dbb1,{'headless':![],'storageStatePath':_0x499de8?_0x1f7265:undefined}),_0x1871e8=await chromium[_0x3fb35e(0xc9)](_0x181ef8);let _0x4693f0=null;try{_0x4693f0=await _0x1871e8[_0x3fb35e(0xf5)](_0x4434da),await _0x54f7cb[_0x3fb35e(0xf1)](addProfileSetupBanner,_0x4693f0);const _0x31b28d=await _0x4693f0[_0x3fb35e(0xcd)]();await _0x31b28d['goto'](_0x54f7cb[_0x3fb35e(0xf4)](_0x5d4656,_0x3fb35e(0xf2)));let _0x4611d1=![];await new Promise(_0x568741=>{const _0xba69c0=_0x3fb35e;_0x31b28d['on'](_0x54f7cb[_0xba69c0(0xda)],async()=>{const _0x31efe1=_0xba69c0;try{console['log'](_0x54f7cb[_0x31efe1(0xd6)]),await _0x4693f0?.['storageState']({'path':_0x1f7265}),_0x4611d1=!![];}catch{}_0x54f7cb['GWpPp'](_0x568741);});});if(!_0x4611d1){console['log'](_0x54f7cb['ukpJI']);!_0x28dbb1['safeMode']&&(console['log'](_0x54f7cb[_0x3fb35e(0xd5)]),console[_0x3fb35e(0xd0)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3ccaa0+_0x3fb35e(0xf3)));throw new Error('Browser\x20closed\x20before\x20authentication\x20was\x20saved.');}}finally{_0x4693f0&&await _0x4693f0[_0x3fb35e(0xca)]()['catch'](()=>{}),await _0x1871e8[_0x3fb35e(0xca)]()[_0x3fb35e(0xd2)](()=>{});}if(_0x2e3374){const _0x3982d7=await _0x54f7cb[_0x3fb35e(0xe9)](readFile,_0x1f7265,'utf-8'),_0x24b4e3=await getToken();if(!_0x24b4e3)console['error'](_0x3fb35e(0xf7)),console['log'](_0x3fb35e(0xdc)+_0x1f7265);else{const _0x4fc0c2=_0x54f7cb[_0x3fb35e(0xd4)](encrypt,_0x3982d7,_0x24b4e3);await writeFile(_0x456cac,_0x4fc0c2),await _0x54f7cb[_0x3fb35e(0xe6)](unlink,_0x1f7265),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x456cac),console[_0x3fb35e(0xd0)](_0x3fb35e(0xc8)),console[_0x3fb35e(0xd0)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console['log'](_0x3fb35e(0xdc)+_0x1f7265);_0x399d6d?.[_0x3fb35e(0xdf)](_0x54f7cb[_0x3fb35e(0xee)]),_0x399d6d?.[_0x3fb35e(0xef)]('config_write'),_0x1f5a72['browser']=_0x1f5a72['browser']||{},_0x1f5a72['browser']['contextOptions']=_0x1f5a72[_0x3fb35e(0xd8)][_0x3fb35e(0xec)]||{},_0x1f5a72[_0x3fb35e(0xd8)][_0x3fb35e(0xec)]['storageState']=_0x1f7265,_0x54f7cb[_0x3fb35e(0xfb)](_0x211ba8?.['allowInsecureLocalhost'],!![])&&(_0x1f5a72[_0x3fb35e(0xe4)]=!![]),await _0x54f7cb[_0x3fb35e(0xfd)](writeFile,_0x901dd4,JSON[_0x3fb35e(0xde)](_0x1f5a72,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x901dd4),_0x399d6d?.['trackPhaseEnd'](_0x54f7cb[_0x3fb35e(0xce)]),console['log']('\x0a✅\x20Profile\x20\x22'+_0x3ccaa0+_0x3fb35e(0xf8));}function _0x8908(_0x5e56c9,_0x512cda){_0x5e56c9=_0x5e56c9-0xc8;const _0xcc7ccd=_0xcc7c();let _0x890888=_0xcc7ccd[_0x5e56c9];return _0x890888;}function _0xcc7c(){const _0xccbed4=['browser','54oDJZJw','RrHdY','isTTY','✓\x20Auth\x20state\x20saved\x20to:\x20','VYcrt','stringify','trackPhaseEnd','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','baseUrl','507912dMdKmx','allowInsecureLocalhost','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','gsZfs','11bfvaTb','48241MFmfOJ','NnQng','7865034VEWZWL','7GEjKbx','contextOptions','10065360SfVPiX','TcEwz','trackPhaseStart','dAGcP','rGxqP','about:blank','\x20safeMode\x20true\x0a','PmqDf','newContext','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','\x22\x20authentication\x20updated','1554972gwjWsb','stdout','kABni','12SdCVLL','RylTE','1702650gHFYvu','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','launch','close','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','32NDVXJQ','newPage','AKxTh','parse','log','Profile\x20\x22','catch','4671174ImeUbs','XeGlq','TjqEc','VfHdC','.enc'];_0xcc7c=function(){return _0xccbed4;};return _0xcc7c();}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4feef4,_0x19e7df){const _0x5d48ce=_0x2c0d,_0x1defd5=_0x4feef4();while(!![]){try{const _0x14a76f=-parseInt(_0x5d48ce(0x197))/0x1+parseInt(_0x5d48ce(0x196))/0x2+-parseInt(_0x5d48ce(0x194))/0x3*(-parseInt(_0x5d48ce(0x199))/0x4)+parseInt(_0x5d48ce(0x18f))/0x5+-parseInt(_0x5d48ce(0x195))/0x6+-parseInt(_0x5d48ce(0x192))/0x7*(parseInt(_0x5d48ce(0x198))/0x8)+parseInt(_0x5d48ce(0x19c))/0x9;if(_0x14a76f===_0x19e7df)break;else _0x1defd5['push'](_0x1defd5['shift']());}catch(_0x283c10){_0x1defd5['push'](_0x1defd5['shift']());}}}(_0x292b,0xb4d39));import{join}from'path';import{existsSync}from'fs';function _0x2c0d(_0x3c8215,_0x362202){_0x3c8215=_0x3c8215-0x18f;const _0x292b42=_0x292b();let _0x2c0d0d=_0x292b42[_0x3c8215];return _0x2c0d0d;}function _0x292b(){const _0x30992f=['1688045PytyFR','settings.json','Config\x20not\x20found\x20at\x20','735518LKqbZy','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','2101173juEfek','4266564Sggtiq','1030762vvdVmZ','213498uohICD','88CbsxqB','4zrhNVl','Profile\x20\x22','\x0a✓\x20Now\x20using\x20profile\x20\x22','11409210kKCVXy'];_0x292b=function(){return _0x30992f;};return _0x292b();}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x1035c5){const _0x3b4e05=_0x2c0d,_0x586416={'dpVcu':function(_0x1a046f,_0x15a634){return _0x1a046f(_0x15a634);}},_0x4aac7d=getEnvDir(_0x1035c5),_0x21a6e9=join(_0x4aac7d,_0x3b4e05(0x190));if(!existsSync(_0x4aac7d))throw new Error(_0x3b4e05(0x19a)+_0x1035c5+_0x3b4e05(0x193)+_0x1035c5);if(!existsSync(_0x21a6e9))throw new Error(_0x3b4e05(0x191)+_0x21a6e9+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x1035c5);await _0x586416['dpVcu'](writeActiveProfileName,_0x1035c5),console['log'](_0x3b4e05(0x19b)+_0x1035c5+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x418184=_0x1c7a;(function(_0x375bf0,_0x377732){const _0x5aa8a4=_0x1c7a,_0x34c177=_0x375bf0();while(!![]){try{const _0x5625d1=-parseInt(_0x5aa8a4(0x9f))/0x1+parseInt(_0x5aa8a4(0x93))/0x2+-parseInt(_0x5aa8a4(0x97))/0x3*(-parseInt(_0x5aa8a4(0xa0))/0x4)+-parseInt(_0x5aa8a4(0x9e))/0x5+-parseInt(_0x5aa8a4(0x9b))/0x6*(-parseInt(_0x5aa8a4(0x95))/0x7)+parseInt(_0x5aa8a4(0x9c))/0x8*(parseInt(_0x5aa8a4(0xa3))/0x9)+-parseInt(_0x5aa8a4(0xa6))/0xa;if(_0x5625d1===_0x377732)break;else _0x34c177['push'](_0x34c177['shift']());}catch(_0x3df167){_0x34c177['push'](_0x34c177['shift']());}}}(_0x4613,0xaa087));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x418184(0xa7);function _0x1c7a(_0x1d6700,_0x5569fc){_0x1d6700=_0x1d6700-0x93;const _0x461318=_0x4613();let _0x1c7a3b=_0x461318[_0x1d6700];return _0x1c7a3b;}function getActiveProfilePath(){const _0x13c4e9={'cJiSX':function(_0x311427,_0x123bc8,_0x3f865a){return _0x311427(_0x123bc8,_0x3f865a);}};return _0x13c4e9['cJiSX'](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){return join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}function _0x4613(){const _0x2fb367=['FbYwo','3981SmtigL','UUbAe','iiDCS','JLHjI','468258XnDEdX','2038280iojvfy','utf-8','1161565IzHPNN','743880pYUKqA','4044GvkHqJ','OomVD','Pbsbe','18DoYQPm','trim','XDhYJ','11435750VGfSZm','active-env.txt','1461854QXhFsp','RRWrX','21uEphIV'];_0x4613=function(){return _0x2fb367;};return _0x4613();}async function migrateLegacyActiveEnv(){const _0x30b4ba=_0x418184,_0x45f703={'OomVD':function(_0x51571e,_0x286395){return _0x51571e(_0x286395);},'Pbsbe':'utf-8','LqBJx':function(_0x42672f,_0x2b1580,_0x355a4b){return _0x42672f(_0x2b1580,_0x355a4b);},'RRWrX':function(_0x24563c,_0xe8c19c,_0x1baec2,_0x4999b7){return _0x24563c(_0xe8c19c,_0x1baec2,_0x4999b7);}},_0x198f96=getLegacyActiveEnvPath();if(!_0x45f703[_0x30b4ba(0xa1)](existsSync,_0x198f96))return null;let _0x109897=null;try{_0x109897=(await readFile(_0x198f96,_0x45f703[_0x30b4ba(0xa2)]))['trim']()||null;}catch{_0x109897=null;}if(!_0x109897)return null;const _0x50c002=getActiveProfilePath();try{await _0x45f703['LqBJx'](rename,_0x198f96,_0x50c002);}catch{try{const _0x277705=getRangerDir();await _0x45f703['LqBJx'](mkdir,_0x277705,{'recursive':!![]}),await _0x45f703[_0x30b4ba(0x94)](writeFile,_0x50c002,_0x109897,_0x45f703[_0x30b4ba(0xa2)]),await unlink(_0x198f96);}catch{}}return _0x109897;}export async function readActiveProfileName(){const _0x13767f=_0x418184,_0x4fd0e0={'UUbAe':function(_0x340412){return _0x340412();},'FbYwo':function(_0x464fdc,_0x2a7b13){return _0x464fdc(_0x2a7b13);},'jRZKa':function(_0x1b2d24,_0x1449af,_0x1f2373){return _0x1b2d24(_0x1449af,_0x1f2373);},'sUrSO':_0x13767f(0x9d),'WbGFa':function(_0x386f95){return _0x386f95();}},_0x4acea0=_0x4fd0e0[_0x13767f(0x98)](getActiveProfilePath);if(_0x4fd0e0[_0x13767f(0x96)](existsSync,_0x4acea0))try{return(await _0x4fd0e0['jRZKa'](readFile,_0x4acea0,_0x4fd0e0['sUrSO']))[_0x13767f(0xa4)]()||null;}catch{return null;}return await _0x4fd0e0['WbGFa'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x12f4b4){const _0x9e097e=_0x418184,_0xe53482={'JLHjI':function(_0x3c550e,_0x56c957,_0x971333,_0x80330f){return _0x3c550e(_0x56c957,_0x971333,_0x80330f);},'XDhYJ':function(_0x2a8838,_0x3ecfbf){return _0x2a8838(_0x3ecfbf);}},_0x1e2697=getRangerDir();await mkdir(_0x1e2697,{'recursive':!![]});const _0x107250=getActiveProfilePath();await _0xe53482[_0x9e097e(0x9a)](writeFile,_0x107250,_0x12f4b4,_0x9e097e(0x9d));const _0x403961=getLegacyActiveEnvPath();if(existsSync(_0x403961))try{await _0xe53482[_0x9e097e(0xa5)](unlink,_0x403961);}catch{}}export async function migrateActiveProfileFile(){const _0x2af25b=_0x418184,_0x593487={'iiDCS':function(_0x384a76){return _0x384a76();}},_0x3bb5fa=await _0x593487[_0x2af25b(0x99)](migrateLegacyActiveEnv);return _0x3bb5fa!==null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1bf04b=_0x3504;(function(_0x2780d6,_0xec02ce){const _0x16697f=_0x3504,_0xf0680c=_0x2780d6();while(!![]){try{const _0x51d7cf=parseInt(_0x16697f(0x98))/0x1+-parseInt(_0x16697f(0x97))/0x2+parseInt(_0x16697f(0x9d))/0x3+-parseInt(_0x16697f(0x82))/0x4*(parseInt(_0x16697f(0x8a))/0x5)+-parseInt(_0x16697f(0x95))/0x6*(-parseInt(_0x16697f(0x80))/0x7)+parseInt(_0x16697f(0x87))/0x8*(parseInt(_0x16697f(0x88))/0x9)+-parseInt(_0x16697f(0x94))/0xa*(parseInt(_0x16697f(0x83))/0xb);if(_0x51d7cf===_0xec02ce)break;else _0xf0680c['push'](_0xf0680c['shift']());}catch(_0x3b81f2){_0xf0680c['push'](_0xf0680c['shift']());}}}(_0x2127,0xab6a6));import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=[_0x1bf04b(0x9a),_0x1bf04b(0x9f),_0x1bf04b(0x86),_0x1bf04b(0xa0),'TEMP',_0x1bf04b(0x8f),_0x1bf04b(0xa1),_0x1bf04b(0x7e),'XDG_CACHE_HOME',_0x1bf04b(0x7f),_0x1bf04b(0x99),_0x1bf04b(0x81),'CHROME_BIN','CHROMIUM_BIN',_0x1bf04b(0x89),'NPM_CONFIG_CACHE',_0x1bf04b(0x9c),'NPM_CONFIG_USERCONFIG',_0x1bf04b(0x8e),'NPM_CONFIG_PREFIX',_0x1bf04b(0x96),'NPM_CONFIG_REGISTRY'],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x1bf04b(0x8d),'$PATH',_0x1bf04b(0x92)];function _0x2127(){const _0xa8bfc1=['TMP','APPDATA','LOCALAPPDATA','XDG_CONFIG_HOME','65128Fygxnw','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','14052IYxZst','6549147hZMaol','abZGV','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','TMPDIR','1784XzaWXj','51939zHHePw','npm_config_cache','270ntInpo','/bin','length','${PATH}','npm_config_prefix','USERPROFILE','RCBLN','split','%PATH%','push','20Rhbkfq','366thiSYe','npm_config_registry','365006WlCCjr','391268PGkgfO','PLAYWRIGHT_BROWSERS_PATH','PATH','includes','npm_config_userconfig','57996eKsSJU','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','HOME'];_0x2127=function(){return _0xa8bfc1;};return _0x2127();}export function getAgentPathHealthWarning(_0x3408d8,_0x3bc96d=process['platform']){const _0x2b2847=_0x1bf04b,_0x1501df={'juuWo':function(_0x308a3e,_0xee4179){return _0x308a3e||_0xee4179;},'abZGV':function(_0x97bfe5,_0x2b31fd){return _0x97bfe5===_0x2b31fd;},'oEaug':_0x2b2847(0x9e),'QkgfP':'/usr/bin','hhKud':function(_0x502ee8,_0x31363e){return _0x502ee8&&_0x31363e;},'RCBLN':function(_0x3238f5,_0xa642f8){return _0x3238f5===_0xa642f8;}},_0x30bcf5=[],_0xe87716=_0x1501df['juuWo'](_0x3408d8,'')[_0x2b2847(0x91)](delimiter)['filter'](Boolean);_0x1501df[_0x2b2847(0x84)](_0xe87716[_0x2b2847(0x8c)],0x0)&&_0x30bcf5['push']('PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.');UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x2c551d=>(_0x3408d8||'')['includes'](_0x2c551d))&&_0x30bcf5[_0x2b2847(0x93)](_0x1501df['oEaug']);if(_0x3bc96d!=='win32'){const _0x2546c0=_0xe87716[_0x2b2847(0x9b)](_0x1501df['QkgfP']),_0x47b530=_0xe87716['includes'](_0x2b2847(0x8b));_0x1501df['hhKud'](!_0x2546c0,!_0x47b530)&&_0x30bcf5['push']('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x1501df[_0x2b2847(0x90)](_0x30bcf5['length'],0x0))return null;return{'summary':_0x2b2847(0x85),'issues':_0x30bcf5};}function _0x3504(_0x26704b,_0x1759b7){_0x26704b=_0x26704b-0x7e;const _0x212789=_0x2127();let _0x35046a=_0x212789[_0x26704b];return _0x35046a;}export function buildAgentEnv(_0x12ccff){const _0x48c796={'ANTHROPIC_API_KEY':_0x12ccff,'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x1f4de9 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x4b9c8c=process['env'][_0x1f4de9];_0x4b9c8c&&(_0x48c796[_0x1f4de9]=_0x4b9c8c);}return _0x48c796;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x8b87(_0x150192,_0x3a5be3){_0x150192=_0x150192-0xe7;const _0x2be65d=_0x1378();let _0xc2e795=_0x2be65d[_0x150192];if(_0x8b87['GMiSss']===undefined){var _0x4139f6=function(_0x31e7ad){const _0x45352b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x340722='',_0x596031='',_0x18c2e8=_0x340722+_0x4139f6;for(let _0x42f3a3=0x0,_0x3df115,_0x59710d,_0x398716=0x0;_0x59710d=_0x31e7ad['charAt'](_0x398716++);~_0x59710d&&(_0x3df115=_0x42f3a3%0x4?_0x3df115*0x40+_0x59710d:_0x59710d,_0x42f3a3++%0x4)?_0x340722+=_0x18c2e8['charCodeAt'](_0x398716+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x3df115>>(-0x2*_0x42f3a3&0x6)):_0x42f3a3:0x0){_0x59710d=_0x45352b['indexOf'](_0x59710d);}for(let _0x248105=0x0,_0x1fa35b=_0x340722['length'];_0x248105<_0x1fa35b;_0x248105++){_0x596031+='%'+('00'+_0x340722['charCodeAt'](_0x248105)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x596031);};_0x8b87['wjIKKV']=_0x4139f6,_0x8b87['QqeKHk']={},_0x8b87['GMiSss']=!![];}const _0x137881=_0x2be65d[0x0],_0x8b87db=_0x150192+_0x137881,_0x4810bb=_0x8b87['QqeKHk'][_0x8b87db];if(!_0x4810bb){const _0x228dea=function(_0x70f284){this['WMwgtu']=_0x70f284,this['yzFBoS']=[0x1,0x0,0x0],this['ELUEKI']=function(){return'newState';},this['QPCesx']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['zXRnoi']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x228dea['prototype']['WhhkvA']=function(){const _0x5a1361=new RegExp(this['QPCesx']+this['zXRnoi']),_0x4a59e4=_0x5a1361['test'](this['ELUEKI']['toString']())?--this['yzFBoS'][0x1]:--this['yzFBoS'][0x0];return this['yatMxJ'](_0x4a59e4);},_0x228dea['prototype']['yatMxJ']=function(_0x34257e){if(!Boolean(~_0x34257e))return _0x34257e;return this['lHnlTD'](this['WMwgtu']);},_0x228dea['prototype']['lHnlTD']=function(_0x22e544){for(let _0x414009=0x0,_0xb17a92=this['yzFBoS']['length'];_0x414009<_0xb17a92;_0x414009++){this['yzFBoS']['push'](Math['round'](Math['random']())),_0xb17a92=this['yzFBoS']['length'];}return _0x22e544(this['yzFBoS'][0x0]);},new _0x228dea(_0x8b87)['WhhkvA'](),_0xc2e795=_0x8b87['wjIKKV'](_0xc2e795),_0x8b87['QqeKHk'][_0x8b87db]=_0xc2e795;}else _0xc2e795=_0x4810bb;return _0xc2e795;}(function(_0x34ccb1,_0x32a7ed){const _0x24c421=_0x8b87,_0x131b42=_0x34ccb1();while(!![]){try{const _0xccae72=-parseInt(_0x24c421(0x139))/0x1*(-parseInt(_0x24c421(0xfc))/0x2)+parseInt(_0x24c421(0x13e))/0x3*(parseInt(_0x24c421(0x15d))/0x4)+-parseInt(_0x24c421(0x14f))/0x5*(-parseInt(_0x24c421(0x166))/0x6)+parseInt(_0x24c421(0x169))/0x7+parseInt(_0x24c421(0x11b))/0x8*(parseInt(_0x24c421(0x106))/0x9)+parseInt(_0x24c421(0xf1))/0xa*(-parseInt(_0x24c421(0x101))/0xb)+parseInt(_0x24c421(0x15e))/0xc*(-parseInt(_0x24c421(0x13b))/0xd);if(_0xccae72===_0x32a7ed)break;else _0x131b42['push'](_0x131b42['shift']());}catch(_0x127ee0){_0x131b42['push'](_0x131b42['shift']());}}}(_0x1378,0x3d459));const _0x4139f6=(function(){const _0x4ffd7c=_0x8b87,_0x3e27b1={'mEGAJ':function(_0x121e5b,_0xc30c7){return _0x121e5b!==_0xc30c7;},'uiVMq':_0x4ffd7c(0x14a)};let _0xb9810d=!![];return function(_0x4baa72,_0x4a49cc){const _0x2baf1b=_0x4ffd7c;if(_0x3e27b1[_0x2baf1b(0xee)](_0x3e27b1[_0x2baf1b(0x118)],_0x2baf1b(0x122))){const _0x2d4f4e=_0xb9810d?function(){const _0x5daa1f=_0x2baf1b;if(_0x4a49cc){const _0x24cdf6=_0x4a49cc[_0x5daa1f(0x10d)](_0x4baa72,arguments);return _0x4a49cc=null,_0x24cdf6;}}:function(){};return _0xb9810d=![],_0x2d4f4e;}else{const _0x49b3b2=_0x228dea?function(){const _0x51c0ed=_0x2baf1b;if(_0x414009){const _0x333ec7=_0x1bdfe1[_0x51c0ed(0x10d)](_0x3809a0,arguments);return _0x1e5769=null,_0x333ec7;}}:function(){};return _0x22e544=![],_0x49b3b2;}};}()),_0xc2e795=_0x4139f6(this,function(){const _0x470968=_0x8b87,_0x2cdf82={'UrlZs':_0x470968(0x16d)};return _0xc2e795[_0x470968(0x159)]()['search'](_0x2cdf82[_0x470968(0x153)])[_0x470968(0x159)]()[_0x470968(0x165)](_0xc2e795)[_0x470968(0x162)](_0x2cdf82['UrlZs']);});_0xc2e795();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1108f7){const _0x14a4a3=_0x8b87,_0x1fb69c={'RKyTs':_0x14a4a3(0x13c),'fsTAr':function(_0x4e9617){return _0x4e9617();},'tLViz':_0x14a4a3(0xe7),'XNIGA':'application/json'},_0x150fc6=await getToken();if(!_0x150fc6)throw new Error(_0x1fb69c['RKyTs']);const _0x2e87d1=_0x1fb69c[_0x14a4a3(0x145)](getApiBaseUrl),_0x329853=await fetch(_0x2e87d1+'/api/v1/mcp/browser-sessions',{'method':_0x1fb69c['tLViz'],'headers':{'Authorization':_0x14a4a3(0x168)+_0x150fc6,'Content-Type':_0x1fb69c['XNIGA']},'body':JSON[_0x14a4a3(0x15a)]({'environmentName':_0x1108f7?.[_0x14a4a3(0x15f)],'settings':_0x1108f7?.[_0x14a4a3(0xf0)],'task':_0x1108f7?.[_0x14a4a3(0x105)],'url':_0x1108f7?.[_0x14a4a3(0x110)],'featureId':_0x1108f7?.[_0x14a4a3(0x155)],'checklistItemId':_0x1108f7?.[_0x14a4a3(0x11c)]})});if(!_0x329853['ok']){const _0x5c4923=await _0x329853['text']();throw new Error(_0x14a4a3(0x102)+_0x5c4923);}return _0x329853[_0x14a4a3(0x112)]();}export async function updateBrowserSession(_0x561028,_0x5bea8c){const _0x459b9b=_0x8b87,_0x2e849f={'lGYrw':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','GRYmh':function(_0x4c0ac6,_0x352379){return _0x4c0ac6!==_0x352379;},'WDqLm':'iSAvb','BYISJ':function(_0x4191ab){return _0x4191ab();},'vCZoX':'PATCH','OPWzj':_0x459b9b(0xeb),'yfapt':'updateBrowserSession'};return withRetry(async()=>{const _0x5d13c7=_0x459b9b,_0x2fe660={'uBcud':_0x2e849f[_0x5d13c7(0x12c)]};if(_0x2e849f[_0x5d13c7(0x141)](_0x2e849f[_0x5d13c7(0x115)],_0x5d13c7(0x15b))){const _0x907ffc=await _0x2e849f[_0x5d13c7(0x137)](getToken);if(!_0x907ffc)throw new Error(_0x2e849f[_0x5d13c7(0x12c)]);const _0x4272db=_0x2e849f['BYISJ'](getApiBaseUrl),_0x50e721=await fetch(_0x4272db+_0x5d13c7(0x130)+_0x561028,{'method':_0x2e849f['vCZoX'],'headers':{'Authorization':_0x5d13c7(0x168)+_0x907ffc,'Content-Type':_0x2e849f['OPWzj']},'body':JSON['stringify'](_0x5bea8c)});if(!_0x50e721['ok']){const _0x15f341=await _0x50e721['text']();throw new Error(_0x5d13c7(0x16b)+_0x15f341);}return _0x50e721[_0x5d13c7(0x112)]();}else throw new _0x7797d0(_0x2fe660[_0x5d13c7(0x142)]);},{'label':_0x2e849f[_0x459b9b(0x10c)]});}export async function getBrowserSession(_0x2a98fa){const _0x455a89=_0x8b87,_0x30c90c={'GQSbs':function(_0x5baa3b,_0x1318fe,_0x2db049,_0x16d9d6){return _0x5baa3b(_0x1318fe,_0x2db049,_0x16d9d6);},'CVupx':_0x455a89(0xe9),'QKLyp':function(_0x54666e){return _0x54666e();},'kraHe':function(_0x15666e,_0x61fc93){return _0x15666e===_0x61fc93;},'MQKZC':_0x455a89(0x131),'pELkr':_0x455a89(0x13c),'zNaYW':function(_0x62a40a){return _0x62a40a();},'gAnhx':_0x455a89(0x104)},_0x24d015=await _0x30c90c[_0x455a89(0xf3)](getToken);if(!_0x24d015){if(_0x30c90c[_0x455a89(0x12f)](_0x30c90c[_0x455a89(0x150)],_0x30c90c[_0x455a89(0x150)]))throw new Error(_0x30c90c['pELkr']);else return _0x30c90c[_0x455a89(0xea)](_0x796eb3,_0x4b36ce,_0x5c278d,_0x30c90c['CVupx']);}const _0x49db89=_0x30c90c[_0x455a89(0x117)](getApiBaseUrl),_0x138eb0=await fetch(_0x49db89+_0x455a89(0x130)+_0x2a98fa,{'method':_0x30c90c[_0x455a89(0xed)],'headers':{'Authorization':_0x455a89(0x168)+_0x24d015}});if(!_0x138eb0['ok']){const _0x1fb3f2=await _0x138eb0['text']();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x1fb3f2);}return _0x138eb0[_0x455a89(0x112)]();}export async function getUploadUrls(_0x109078,_0xbd8aca,_0x194ea7,_0x44341f){const _0x4a0398=_0x8b87,_0x3d2630={'VAkIt':_0x4a0398(0x13c),'bnBOZ':function(_0x45be9b){return _0x45be9b();},'wHWHW':function(_0x127f86,_0x57b042){return _0x127f86!==_0x57b042;},'Mmtjh':_0x4a0398(0x16e),'QZKey':function(_0x111888,_0x5772d4,_0x89a84f){return _0x111888(_0x5772d4,_0x89a84f);},'tyBDd':_0x4a0398(0xe7),'LgarJ':function(_0x3b1ca3,_0x153183){return _0x3b1ca3!==_0x153183;}},_0xf9424a=await _0x3d2630[_0x4a0398(0x154)](getToken);if(!_0xf9424a){if(_0x3d2630[_0x4a0398(0x138)](_0x3d2630[_0x4a0398(0x11d)],_0x3d2630[_0x4a0398(0x11d)]))throw new _0x7403f7(_0x3d2630[_0x4a0398(0x140)]);else throw new Error(_0x3d2630[_0x4a0398(0x140)]);}const _0x25b49d=getApiBaseUrl(),_0x1db0df=await _0x3d2630[_0x4a0398(0x12a)](fetch,_0x25b49d+_0x4a0398(0x130)+_0x109078+_0x4a0398(0xff),{'method':_0x3d2630['tyBDd'],'headers':{'Authorization':_0x4a0398(0x168)+_0xf9424a,'Content-Type':_0x4a0398(0xeb)},'body':JSON['stringify']({'filename':_0xbd8aca,'filetype':_0x194ea7,..._0x3d2630['wHWHW'](_0x44341f?.['size'],undefined)&&{'size':_0x44341f['size']},..._0x3d2630[_0x4a0398(0x138)](_0x44341f?.[_0x4a0398(0x111)],undefined)&&{'checksum':_0x44341f['checksum']},..._0x3d2630[_0x4a0398(0x100)](_0x44341f?.[_0x4a0398(0x160)],undefined)&&{'metadata':_0x44341f[_0x4a0398(0x160)]}})});if(!_0x1db0df['ok']){const _0x3d3d7c=await _0x1db0df[_0x4a0398(0x149)]();throw new Error(_0x4a0398(0xe8)+_0x3d3d7c);}return _0x1db0df[_0x4a0398(0x112)]();}export async function uploadFile(_0x251e75,_0x486935,_0x541363){const _0x2213a8=_0x8b87,_0x14f147={'GMUTJ':function(_0x16e3e2,_0x85c493,_0x4fc0aa,_0x8767b3){return _0x16e3e2(_0x85c493,_0x4fc0aa,_0x8767b3);},'ykgjz':_0x2213a8(0x14e),'JeHeW':function(_0x26a303,_0x5df59a,_0xe8a37d){return _0x26a303(_0x5df59a,_0xe8a37d);},'kQNkD':_0x2213a8(0x116),'vcKKf':function(_0x1cee1e,_0x1631de){return _0x1cee1e===_0x1631de;},'yLENU':_0x2213a8(0x163),'EnWrS':_0x2213a8(0x123)},_0x1a0b77=await _0x14f147[_0x2213a8(0xfe)](fetch,_0x251e75,{'method':_0x14f147[_0x2213a8(0x127)],'headers':{'Content-Type':_0x541363,'Content-Length':_0x486935[_0x2213a8(0x12b)]['toString']()},'body':_0x486935});if(!_0x1a0b77['ok']){if(_0x14f147[_0x2213a8(0x13a)](_0x14f147[_0x2213a8(0xfb)],_0x14f147[_0x2213a8(0xf8)]))return _0x14f147['GMUTJ'](_0x1a9e69,_0x51bcde,_0x1a46ec,_0x14f147[_0x2213a8(0x158)]);else{const _0x955054=await _0x1a0b77['text']();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x955054);}}}export async function uploadTrace(_0x2df921,_0x1878c5){const _0x26820b=_0x8b87,_0x122040={'dsIzo':function(_0x463b19,_0x48cadf,_0x36ec44,_0x537d65){return _0x463b19(_0x48cadf,_0x36ec44,_0x537d65);},'aHdba':_0x26820b(0x136)};return _0x122040[_0x26820b(0xf5)](uploadFile,_0x2df921,_0x1878c5,_0x122040[_0x26820b(0x124)]);}export async function uploadConversation(_0x239d4c,_0x1f114d){const _0x5cec9c=_0x8b87,_0x557bd7={'iEwxq':function(_0x26c4fe,_0x2744ff,_0x15d326,_0x36288b){return _0x26c4fe(_0x2744ff,_0x15d326,_0x36288b);}};return _0x557bd7['iEwxq'](uploadFile,_0x239d4c,_0x1f114d,_0x5cec9c(0xe9));}export async function uploadScreenshot(_0x229fae,_0x40c2fa){const _0x4ee9a4=_0x8b87;return uploadFile(_0x229fae,_0x40c2fa,_0x4ee9a4(0x108));}export async function uploadVideo(_0x409865,_0x533d0a){const _0x22982a=_0x8b87,_0x11afc7={'deRcp':_0x22982a(0x14e)};return uploadFile(_0x409865,_0x533d0a,_0x11afc7[_0x22982a(0xef)]);}export function buildTraceViewerUrl(_0x4594e8){const _0x46d694=_0x8b87,_0x282214=encodeURIComponent(_0x4594e8);return _0x46d694(0x11e)+_0x282214;}export async function getProxySessionToken(){const _0x1bf99a=_0x8b87,_0x44fb4a={'naRNJ':_0x1bf99a(0x16d),'doqWj':function(_0x397aef){return _0x397aef();},'vOxRu':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','pspNf':function(_0x59f870){return _0x59f870();},'cpGuB':function(_0x291ef4,_0x1d8fbe,_0x228140){return _0x291ef4(_0x1d8fbe,_0x228140);},'pAOYL':_0x1bf99a(0xe7),'ApxFW':function(_0x93baf6,_0x379049){return _0x93baf6!==_0x379049;},'TsGnS':_0x1bf99a(0x164)},_0x55100b=await _0x44fb4a[_0x1bf99a(0x16c)](getToken);if(!_0x55100b)throw new Error(_0x44fb4a[_0x1bf99a(0x148)]);const _0x524869=_0x44fb4a['pspNf'](getApiBaseUrl),_0x39c49e=await _0x44fb4a[_0x1bf99a(0x135)](fetch,_0x524869+_0x1bf99a(0x146),{'method':_0x44fb4a[_0x1bf99a(0x16f)],'headers':{'Authorization':_0x1bf99a(0x168)+_0x55100b}});if(!_0x39c49e['ok']){if(_0x44fb4a[_0x1bf99a(0x10a)](_0x44fb4a[_0x1bf99a(0x129)],_0x44fb4a[_0x1bf99a(0x129)]))return _0x3c652f['toString']()['search']('(((.+)+)+)+$')[_0x1bf99a(0x159)]()[_0x1bf99a(0x165)](_0x23e3f8)[_0x1bf99a(0x162)](rGUyCn[_0x1bf99a(0x109)]);else{const _0x4569bf=await _0x39c49e[_0x1bf99a(0x149)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x4569bf);}}const _0x45cda4=await _0x39c49e[_0x1bf99a(0x112)]();return _0x45cda4[_0x1bf99a(0x11f)];}function _0x1378(){const _0x3a69b5=['yM5ct1O','zMvHDhvYzuLK','zwvYAeC','BMnzCge','EwTNANO','Dg9tDhjPBMC','C3rYAw5NAwz5','y3LcAu8','zgLNzxn0','nhvbB3v6Aq','nJm5odrlvvLnEee','zw52AxjVBM1LBNroyw1L','Bwv0ywrHDge','ENLbsLa','C2vHCMnO','rxvpCu8','vKrpDxK','y29UC3rYDwn0B3i','mtjwCuHAv3O','BxPqzuu','qMvHCMvYia','mJeXnZuWAuvkq0Po','ywvUrLi','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','zg9Xv2O','kcGOlISPkYKRksSK','AKPmv3G','CefpwuW','ue9tva','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','yxbWBgLJyxrPB24VANnVBMW','r1ftyNm','yxbWBgLJyxrPB24VANnVBG','BNzVrKi','z0fUAhG','BuvhquO','zgvsy3a','C2v0DgLUz3m','mtCXmJKWwKvptNb5','v2z4r0u','uuTmExa','z2PMAw8','zhnjEM8','whLqu3m','wKTpEw0','rw5xCLm','DxbKyxrL','DKjWzee','EuXftLu','nJqZnJuYBgjiELD5','ugHpBe0','sMvizvC','l3vWBg9Hzc11CMXZ','tgDHCKO','mJjfDMn4ELq','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','D0TItfm','r0vu','DgfZAW','mZy5odfWtgX4vum','qxHlq0y','Aw1Hz2uVCg5N','BMfstKO','qxb4rLC','Bwq1','EwzHChq','yxbWBhK','ugDgBfO','EMjmBuu','DxjS','y2HLy2TZDw0','ANnVBG','l3n0zxbZ','refsDKq','v0rXtg0','ufvu','EK5HwvC','DwLwtxe','vfbyCNq','AMfJyue','nZa0A2Hdt3Pg','y2HLy2TSAxn0sxrLBuLK','tw10AMG','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','C2vZC2LVBLrVA2vU','zw1pswW','l2fZC2v0CW','Dfz1zuy','tvPYv1m','yuHKyMe','wM16Axi','l3n0zxbZlW','A1foA0q','yKrqv2y','vhnhBLm','uvPlzxK','BgvUz3rO','BeDzCNC','yLvVwuK','EvPdBge','A3jHsgu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','DNLZqxq','DNf5quS','vgDkCLO','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','y3bhDui','yxbWBgLJyxrPB24VEMLW','qLLju0O','D0HxsfC','mu5KDg1sCW','DMnls2y','mtK3nKHhrKjIAq','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','uefuq0G','mZu0mtvSruroufm','zKX6q0C','vKfRsxq','r1jzBwG','DujJDwq','zKr2Exy','wuf6tNC','zNnuqxi','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','refjshO','DK94uNu','Dgv4Da','BNPLu2K','rwfruxy','BgTgt2e','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DMLKzw8VD2vIBq','oti1ntq1we15BgvV','tvflwKm','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','yMfZzty0','vxjSwNm'];_0x1378=function(){return _0x3a69b5;};return _0x1378();}export function computeChecksum(_0x13fd5e){const _0x42f54f=_0x8b87,_0x3256b1={'RJDja':function(_0x5b8a1a,_0x5ee2d8){return _0x5b8a1a(_0x5ee2d8);},'nvoFB':_0x42f54f(0x152)};return _0x3256b1['RJDja'](createHash,_0x42f54f(0x10b))[_0x42f54f(0xf9)](_0x13fd5e)[_0x42f54f(0x15c)](_0x3256b1[_0x42f54f(0xec)]);}export async function createVerificationStep(_0x31bb1a,_0x4e9f17){const _0x21c8a1=_0x8b87,_0x3b9d9c={'fDvyv':_0x21c8a1(0x13c),'aenFR':function(_0x2feb09){return _0x2feb09();},'mzPeE':function(_0x4b0609,_0x5c9c47){return _0x4b0609!==_0x5c9c47;},'XyPSs':'BWpBQ','YAzNw':function(_0x498538){return _0x498538();},'Zmzir':_0x21c8a1(0xe7),'vBpdA':_0x21c8a1(0xeb),'wKbLS':function(_0x1bdefd,_0x5401d3){return _0x1bdefd===_0x5401d3;},'PhOlM':'scccg'},_0x1c6634=await _0x3b9d9c[_0x21c8a1(0x16a)](getToken);if(!_0x1c6634){if(_0x3b9d9c[_0x21c8a1(0x167)](_0x3b9d9c[_0x21c8a1(0xf6)],'Vlfud'))throw new Error(_0x3b9d9c['fDvyv']);else throw new _0x445e0c(_0x3b9d9c[_0x21c8a1(0x143)]);}const _0x123752=_0x3b9d9c[_0x21c8a1(0x144)](getApiBaseUrl),_0x526ff2=await fetch(_0x123752+_0x21c8a1(0x130)+_0x31bb1a+_0x21c8a1(0x113),{'method':_0x3b9d9c[_0x21c8a1(0x125)],'headers':{'Authorization':_0x21c8a1(0x168)+_0x1c6634,'Content-Type':_0x3b9d9c[_0x21c8a1(0xfa)]},'body':JSON[_0x21c8a1(0x15a)](_0x4e9f17)});if(!_0x526ff2['ok']){if(_0x3b9d9c[_0x21c8a1(0x103)](_0x3b9d9c[_0x21c8a1(0xfd)],_0x3b9d9c[_0x21c8a1(0xfd)])){const _0x188877=await _0x526ff2['text']();throw new Error(_0x21c8a1(0x14d)+_0x188877);}else throw new _0x53200b(_0x21c8a1(0x13c));}return _0x526ff2[_0x21c8a1(0x112)]();}export async function createStepAsset(_0x30eb9d,_0x5a052f,_0x3127c8){const _0xe51e95=_0x8b87,_0x1fcbc7={'zbLmE':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','TPXrt':function(_0x4fc1f7){return _0x4fc1f7();},'DARvD':function(_0xf97f08){return _0xf97f08();},'gjfio':_0xe51e95(0xe7),'eerhG':_0xe51e95(0xeb),'vykWJ':_0xe51e95(0xf7)},_0x6f9e02=await _0x1fcbc7[_0xe51e95(0x119)](getToken);if(!_0x6f9e02)throw new Error(_0x1fcbc7['zbLmE']);const _0x5b9230=_0x1fcbc7[_0xe51e95(0x114)](getApiBaseUrl),_0x4eb9b1=await fetch(_0x5b9230+'/api/v1/mcp/browser-sessions/'+_0x30eb9d+_0xe51e95(0x126)+_0x5a052f+_0xe51e95(0x121),{'method':_0x1fcbc7[_0xe51e95(0xf4)],'headers':{'Authorization':'Bearer\x20'+_0x6f9e02,'Content-Type':_0x1fcbc7[_0xe51e95(0x156)]},'body':JSON[_0xe51e95(0x15a)](_0x3127c8)});if(!_0x4eb9b1['ok']){if(_0xe51e95(0x12e)!==_0x1fcbc7['vykWJ']){const _0x3ed9a6=await _0x4eb9b1[_0xe51e95(0x149)]();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x3ed9a6);}else throw new _0x5e104a(_0x1fcbc7[_0xe51e95(0x10f)]);}return _0x4eb9b1[_0xe51e95(0x112)]();}export async function updateVerificationStep(_0x4b814b,_0x5e839d,_0x45a5ec){const _0x12e8a0=_0x8b87,_0x218ea6={'ncYpa':function(_0xcc6189){return _0xcc6189();},'IPtvh':_0x12e8a0(0x147),'zyAJP':_0x12e8a0(0x133),'bDPWf':_0x12e8a0(0x13c),'vqyAK':function(_0x228914,_0x29dbe3,_0x57b7ca){return _0x228914(_0x29dbe3,_0x57b7ca);},'AxKCF':_0x12e8a0(0x13d),'bUoYI':_0x12e8a0(0xeb),'nRzTH':_0x12e8a0(0x13f),'EaQQv':_0x12e8a0(0x11a)},_0x33436e=await _0x218ea6[_0x12e8a0(0x157)](getToken);if(!_0x33436e){if(_0x218ea6['IPtvh']===_0x218ea6[_0x12e8a0(0x161)]){const _0x408e43=_0x6c6d67[_0x12e8a0(0x10d)](_0x25c739,arguments);return _0x4ef4d6=null,_0x408e43;}else throw new Error(_0x218ea6[_0x12e8a0(0x128)]);}const _0xd976d9=getApiBaseUrl(),_0x1540a3=await _0x218ea6[_0x12e8a0(0x132)](fetch,_0xd976d9+_0x12e8a0(0x130)+_0x4b814b+_0x12e8a0(0x126)+_0x5e839d,{'method':_0x218ea6[_0x12e8a0(0x107)],'headers':{'Authorization':_0x12e8a0(0x168)+_0x33436e,'Content-Type':_0x218ea6[_0x12e8a0(0x12d)]},'body':JSON[_0x12e8a0(0x15a)](_0x45a5ec)});if(!_0x1540a3['ok']){if(_0x218ea6['nRzTH']!==_0x218ea6[_0x12e8a0(0x14b)]){const _0x5a2091=await _0x1540a3[_0x12e8a0(0x149)]();throw new Error(_0x12e8a0(0x134)+_0x5a2091);}else{if(_0x2c9bea){const _0x2aed5f=_0x3193fd[_0x12e8a0(0x10d)](_0x17f9eb,arguments);return _0x42603b=null,_0x2aed5f;}}}}export async function getBrowserSessionSteps(_0x338339){const _0x165fe6=_0x8b87,_0x2efbf8={'lkFOa':_0x165fe6(0x13c),'WfxGE':_0x165fe6(0x10e),'emOIl':function(_0x4b5bdc,_0x3328d6,_0x3df8ab){return _0x4b5bdc(_0x3328d6,_0x3df8ab);},'eLFTh':_0x165fe6(0x104)},_0x5ddffa=await getToken();if(!_0x5ddffa){if(_0x2efbf8[_0x165fe6(0xf2)]!==_0x2efbf8['WfxGE'])throw new _0x1e7dd7(_0x2efbf8[_0x165fe6(0x14c)]);else throw new Error(_0x2efbf8[_0x165fe6(0x14c)]);}const _0x4454df=getApiBaseUrl(),_0x4f8ef1=await _0x2efbf8[_0x165fe6(0x120)](fetch,_0x4454df+_0x165fe6(0x130)+_0x338339+_0x165fe6(0x113),{'method':_0x2efbf8['eLFTh'],'headers':{'Authorization':_0x165fe6(0x168)+_0x5ddffa}});if(!_0x4f8ef1['ok']){const _0x5903b5=await _0x4f8ef1['text']();throw new Error(_0x165fe6(0x151)+_0x5903b5);}return _0x4f8ef1[_0x165fe6(0x112)]();}
|
|
1
|
+
(function(_0x599db6,_0x10b115){const _0x2ca1ef=_0x3493,_0x176183=_0x599db6();while(!![]){try{const _0xc1ba6e=-parseInt(_0x2ca1ef(0x1d7))/0x1+parseInt(_0x2ca1ef(0x1de))/0x2+parseInt(_0x2ca1ef(0x1ef))/0x3*(parseInt(_0x2ca1ef(0x1c1))/0x4)+parseInt(_0x2ca1ef(0x19a))/0x5+-parseInt(_0x2ca1ef(0x181))/0x6+parseInt(_0x2ca1ef(0x1a7))/0x7+-parseInt(_0x2ca1ef(0x197))/0x8;if(_0xc1ba6e===_0x10b115)break;else _0x176183['push'](_0x176183['shift']());}catch(_0x13740d){_0x176183['push'](_0x176183['shift']());}}}(_0x4e1f,0xa4dc6));const _0x324e49=(function(){const _0x328ea2={'GOHCL':function(_0x428b96,_0x532991,_0x257e24,_0x258562){return _0x428b96(_0x532991,_0x257e24,_0x258562);},'fPEtO':function(_0x46a5c7,_0x36e9b8){return _0x46a5c7!==_0x36e9b8;}};let _0x4f80dc=!![];return function(_0x369672,_0xce0f8c){const _0x4bb85b=_0x3493,_0x1c1a2f={'HpDnr':function(_0x2a5829,_0x5db2a1,_0x50cb51,_0x140d16){const _0xf6e846=_0x3493;return _0x328ea2[_0xf6e846(0x1da)](_0x2a5829,_0x5db2a1,_0x50cb51,_0x140d16);},'HLbbI':function(_0x238582,_0x309a70){const _0x1bee28=_0x3493;return _0x328ea2[_0x1bee28(0x17f)](_0x238582,_0x309a70);},'bYYPP':_0x4bb85b(0x1c4)},_0x4b48ee=_0x4f80dc?function(){const _0x50c5e4=_0x4bb85b,_0x1f3ce2={'jzpkn':function(_0x2eb3c6,_0x377cc8,_0x2385d4,_0xbeeb44){const _0x405686=_0x3493;return _0x1c1a2f[_0x405686(0x198)](_0x2eb3c6,_0x377cc8,_0x2385d4,_0xbeeb44);}};if(_0xce0f8c){if(_0x1c1a2f[_0x50c5e4(0x1a6)](_0x50c5e4(0x1c4),_0x1c1a2f[_0x50c5e4(0x189)]))return _0x1f3ce2[_0x50c5e4(0x1a2)](_0x599374,_0x8dc381,_0x3cc621,'video/webm');else{const _0xd596bb=_0xce0f8c[_0x50c5e4(0x196)](_0x369672,arguments);return _0xce0f8c=null,_0xd596bb;}}}:function(){};return _0x4f80dc=![],_0x4b48ee;};}()),_0x565415=_0x324e49(this,function(){const _0x51cc7a=_0x3493,_0x315dcb={'UXNvZ':_0x51cc7a(0x1cc)};return _0x565415[_0x51cc7a(0x184)]()[_0x51cc7a(0x1e9)](_0x51cc7a(0x1cc))[_0x51cc7a(0x184)]()['constructor'](_0x565415)['search'](_0x315dcb[_0x51cc7a(0x1cf)]);});_0x565415();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x3c9065){const _0x171bb1=_0x3493,_0x484582={'IitTX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','BCSPw':function(_0xc36ce8){return _0xc36ce8();},'HItHb':function(_0x4db466,_0x1f7689,_0x5891e4){return _0x4db466(_0x1f7689,_0x5891e4);},'ENzJz':_0x171bb1(0x1ae),'wciPl':_0x171bb1(0x19c),'wWQOx':function(_0x1cb9bd,_0x343d65){return _0x1cb9bd!==_0x343d65;},'vHCXS':_0x171bb1(0x1d2)},_0x1d980c=await getToken();if(!_0x1d980c)throw new Error(_0x171bb1(0x1c0));const _0xe10ac3=_0x484582[_0x171bb1(0x1ce)](getApiBaseUrl),_0x4d046d=await _0x484582[_0x171bb1(0x1ed)](fetch,_0xe10ac3+'/api/v1/mcp/browser-sessions',{'method':_0x484582[_0x171bb1(0x18f)],'headers':{'Authorization':_0x171bb1(0x1d8)+_0x1d980c,'Content-Type':_0x484582[_0x171bb1(0x1be)]},'body':JSON[_0x171bb1(0x1a5)]({'environmentName':_0x3c9065?.[_0x171bb1(0x1bc)],'settings':_0x3c9065?.[_0x171bb1(0x1ba)],'task':_0x3c9065?.[_0x171bb1(0x192)],'url':_0x3c9065?.[_0x171bb1(0x183)],'featureId':_0x3c9065?.[_0x171bb1(0x1d1)],'checklistItemId':_0x3c9065?.['checklistItemId']})});if(!_0x4d046d['ok']){if(_0x484582[_0x171bb1(0x1b6)](_0x484582['vHCXS'],_0x484582[_0x171bb1(0x1d4)]))throw new _0x4ace76(_0x484582[_0x171bb1(0x18e)]);else{const _0x2d6743=await _0x4d046d[_0x171bb1(0x1ac)]();throw new Error(_0x171bb1(0x1c3)+_0x2d6743);}}return _0x4d046d[_0x171bb1(0x18a)]();}function _0x3493(_0x157c5d,_0x5725a5){_0x157c5d=_0x157c5d-0x178;const _0x2d3182=_0x4e1f();let _0x565415=_0x2d3182[_0x157c5d];if(_0x3493['nZHsnM']===undefined){var _0x324e49=function(_0x488afc){const _0x32f44d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57720a='',_0x213f9b='',_0x3816ff=_0x57720a+_0x324e49;for(let _0x3fc34d=0x0,_0xf9c585,_0x49ca0f,_0x263245=0x0;_0x49ca0f=_0x488afc['charAt'](_0x263245++);~_0x49ca0f&&(_0xf9c585=_0x3fc34d%0x4?_0xf9c585*0x40+_0x49ca0f:_0x49ca0f,_0x3fc34d++%0x4)?_0x57720a+=_0x3816ff['charCodeAt'](_0x263245+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xf9c585>>(-0x2*_0x3fc34d&0x6)):_0x3fc34d:0x0){_0x49ca0f=_0x32f44d['indexOf'](_0x49ca0f);}for(let _0x45205d=0x0,_0x203aba=_0x57720a['length'];_0x45205d<_0x203aba;_0x45205d++){_0x213f9b+='%'+('00'+_0x57720a['charCodeAt'](_0x45205d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x213f9b);};_0x3493['JFQtJe']=_0x324e49,_0x3493['jSqYAf']={},_0x3493['nZHsnM']=!![];}const _0x4e1fbc=_0x2d3182[0x0],_0x349386=_0x157c5d+_0x4e1fbc,_0x2607f6=_0x3493['jSqYAf'][_0x349386];if(!_0x2607f6){const _0x4cde4b=function(_0x3db043){this['TLMQRf']=_0x3db043,this['PtDLnN']=[0x1,0x0,0x0],this['KMTiJR']=function(){return'newState';},this['BudbVe']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['CtvlGz']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4cde4b['prototype']['brdgzz']=function(){const _0x585c92=new RegExp(this['BudbVe']+this['CtvlGz']),_0x54d73c=_0x585c92['test'](this['KMTiJR']['toString']())?--this['PtDLnN'][0x1]:--this['PtDLnN'][0x0];return this['dedOyA'](_0x54d73c);},_0x4cde4b['prototype']['dedOyA']=function(_0x2da5dc){if(!Boolean(~_0x2da5dc))return _0x2da5dc;return this['ERzJqk'](this['TLMQRf']);},_0x4cde4b['prototype']['ERzJqk']=function(_0x4f4ed4){for(let _0x2b1a0f=0x0,_0x216c55=this['PtDLnN']['length'];_0x2b1a0f<_0x216c55;_0x2b1a0f++){this['PtDLnN']['push'](Math['round'](Math['random']())),_0x216c55=this['PtDLnN']['length'];}return _0x4f4ed4(this['PtDLnN'][0x0]);},new _0x4cde4b(_0x3493)['brdgzz'](),_0x565415=_0x3493['JFQtJe'](_0x565415),_0x3493['jSqYAf'][_0x349386]=_0x565415;}else _0x565415=_0x2607f6;return _0x565415;}export async function updateBrowserSession(_0x30e496,_0x12deab){const _0xe3fd52=_0x3493,_0x38c32b={'gxuXa':_0xe3fd52(0x1c0),'KSvVf':function(_0x4a2ce2,_0x226316){return _0x4a2ce2===_0x226316;},'eZbsp':_0xe3fd52(0x1c9),'NmEBX':function(_0x1e3d36){return _0x1e3d36();},'ZiSqR':'LTVSa','rrgWO':function(_0x418ef4){return _0x418ef4();},'dwwjg':function(_0x5c526e,_0x3c5508,_0x379381){return _0x5c526e(_0x3c5508,_0x379381);},'uXpVQ':'application/json','Qjrgx':_0xe3fd52(0x187)};return withRetry(async()=>{const _0x1881ce=_0xe3fd52,_0x1fb054={'pWjzH':_0x38c32b['gxuXa']};if(_0x38c32b[_0x1881ce(0x1a0)](_0x1881ce(0x1c9),_0x38c32b['eZbsp'])){const _0x38e1d7=await _0x38c32b['NmEBX'](getToken);if(!_0x38e1d7){if(_0x38c32b['ZiSqR']===_0x1881ce(0x1e6))throw new Error(_0x38c32b[_0x1881ce(0x188)]);else throw new _0x3257d6(_0x1fb054[_0x1881ce(0x1d3)]);}const _0x279666=_0x38c32b[_0x1881ce(0x1b9)](getApiBaseUrl),_0x3f2d33=await _0x38c32b[_0x1881ce(0x1bf)](fetch,_0x279666+'/api/v1/mcp/browser-sessions/'+_0x30e496,{'method':_0x1881ce(0x19d),'headers':{'Authorization':_0x1881ce(0x1d8)+_0x38e1d7,'Content-Type':_0x38c32b['uXpVQ']},'body':JSON[_0x1881ce(0x1a5)](_0x12deab)});if(!_0x3f2d33['ok']){const _0x1c4b62=await _0x3f2d33[_0x1881ce(0x1ac)]();throw new Error(_0x1881ce(0x1b1)+_0x1c4b62);}return _0x3f2d33[_0x1881ce(0x18a)]();}else throw new _0x148b90(_0x1fb054['pWjzH']);},{'label':_0x38c32b[_0xe3fd52(0x1e1)]});}export async function getBrowserSession(_0x162c8d){const _0x1e2dd7=_0x3493,_0x3f0583={'VBgVO':function(_0x1eef72){return _0x1eef72();},'pSSYQ':function(_0xe01d2f,_0x3775b9,_0x34f436){return _0xe01d2f(_0x3775b9,_0x34f436);},'aywEl':'GET'},_0x555af2=await _0x3f0583[_0x1e2dd7(0x1b2)](getToken);if(!_0x555af2)throw new Error(_0x1e2dd7(0x1c0));const _0xb1b94=_0x3f0583[_0x1e2dd7(0x1b2)](getApiBaseUrl),_0x14f54c=await _0x3f0583[_0x1e2dd7(0x199)](fetch,_0xb1b94+_0x1e2dd7(0x1ee)+_0x162c8d,{'method':_0x3f0583['aywEl'],'headers':{'Authorization':_0x1e2dd7(0x1d8)+_0x555af2}});if(!_0x14f54c['ok']){const _0x28884b=await _0x14f54c['text']();throw new Error('Failed\x20to\x20get\x20browser\x20session:\x20'+_0x28884b);}return _0x14f54c[_0x1e2dd7(0x18a)]();}export async function getUploadUrls(_0x37b0f6,_0x3c4bf2,_0x1f37df,_0x346153){const _0x3bb16d=_0x3493,_0x48fe1a={'lyQYm':_0x3bb16d(0x1c0),'vCCld':function(_0x4d54d4){return _0x4d54d4();},'XBOkh':function(_0x3ee8ea,_0x399c87,_0xfbe373){return _0x3ee8ea(_0x399c87,_0xfbe373);},'USkzf':_0x3bb16d(0x1ae),'XsHUZ':_0x3bb16d(0x19c),'SVHQo':function(_0x2f95c2,_0x417a46){return _0x2f95c2!==_0x417a46;},'iqGsg':function(_0x65d9f6,_0x1ecb4d){return _0x65d9f6!==_0x1ecb4d;}},_0x9009e3=await getToken();if(!_0x9009e3)throw new Error(_0x48fe1a[_0x3bb16d(0x1e8)]);const _0x450329=_0x48fe1a[_0x3bb16d(0x1ea)](getApiBaseUrl),_0x5bfdd5=await _0x48fe1a[_0x3bb16d(0x1d9)](fetch,_0x450329+_0x3bb16d(0x1ee)+_0x37b0f6+_0x3bb16d(0x178),{'method':_0x48fe1a[_0x3bb16d(0x180)],'headers':{'Authorization':_0x3bb16d(0x1d8)+_0x9009e3,'Content-Type':_0x48fe1a[_0x3bb16d(0x19f)]},'body':JSON['stringify']({'filename':_0x3c4bf2,'filetype':_0x1f37df,..._0x48fe1a[_0x3bb16d(0x1e3)](_0x346153?.[_0x3bb16d(0x1a1)],undefined)&&{'size':_0x346153[_0x3bb16d(0x1a1)]},..._0x48fe1a[_0x3bb16d(0x1e5)](_0x346153?.['checksum'],undefined)&&{'checksum':_0x346153['checksum']},..._0x346153?.['metadata']!==undefined&&{'metadata':_0x346153['metadata']}})});if(!_0x5bfdd5['ok']){const _0x5a3f91=await _0x5bfdd5[_0x3bb16d(0x1ac)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x5a3f91);}return _0x5bfdd5[_0x3bb16d(0x18a)]();}export async function uploadFile(_0x30a1cd,_0x1fead3,_0x11ad92){const _0x38f476=_0x3493,_0xf2d6b2={'woIkD':function(_0x2caf9d,_0x5ed260,_0xb113cd){return _0x2caf9d(_0x5ed260,_0xb113cd);},'YbDIV':_0x38f476(0x1a3)},_0x2fce18=await _0xf2d6b2[_0x38f476(0x1e0)](fetch,_0x30a1cd,{'method':_0xf2d6b2['YbDIV'],'headers':{'Content-Type':_0x11ad92,'Content-Length':_0x1fead3[_0x38f476(0x1ec)]['toString']()},'body':_0x1fead3});if(!_0x2fce18['ok']){const _0x56b3d6=await _0x2fce18[_0x38f476(0x1ac)]();throw new Error(_0x38f476(0x1af)+_0x56b3d6);}}export async function uploadTrace(_0x1515cb,_0x4ac4c8){const _0x20fddd=_0x3493,_0x57dcfe={'XUeIg':function(_0x531bcb,_0x82614d,_0x4fbcb1,_0x5b90af){return _0x531bcb(_0x82614d,_0x4fbcb1,_0x5b90af);},'lTRCF':_0x20fddd(0x1ca)};return _0x57dcfe['XUeIg'](uploadFile,_0x1515cb,_0x4ac4c8,_0x57dcfe[_0x20fddd(0x1b8)]);}export async function uploadConversation(_0x23e472,_0x43c1ee){const _0x44db1d=_0x3493,_0xc5b6cf={'UgksN':function(_0x1dfffc,_0x4bae0f,_0x377341,_0x1f61f8){return _0x1dfffc(_0x4bae0f,_0x377341,_0x1f61f8);}};return _0xc5b6cf[_0x44db1d(0x1b0)](uploadFile,_0x23e472,_0x43c1ee,_0x44db1d(0x186));}export async function uploadScreenshot(_0x27734f,_0x41e450){const _0x5ed302=_0x3493,_0x3e8494={'qPyWs':function(_0x57669d,_0x8a917f,_0x10681c,_0x35eaf8){return _0x57669d(_0x8a917f,_0x10681c,_0x35eaf8);}};return _0x3e8494[_0x5ed302(0x1b4)](uploadFile,_0x27734f,_0x41e450,_0x5ed302(0x1d0));}export async function uploadVideo(_0x5a3cae,_0x4e6194){const _0x22c049=_0x3493,_0x233288={'fBqJd':function(_0x1b0939,_0x3dc10d,_0x35aeeb,_0x12545a){return _0x1b0939(_0x3dc10d,_0x35aeeb,_0x12545a);},'uvcGK':_0x22c049(0x17b)};return _0x233288[_0x22c049(0x1e7)](uploadFile,_0x5a3cae,_0x4e6194,_0x233288[_0x22c049(0x1dd)]);}export function buildTraceViewerUrl(_0x50b6c5){const _0x468d29=_0x3493,_0x556743={'UkYsi':function(_0xad23c0,_0x268856){return _0xad23c0(_0x268856);}},_0x2e3654=_0x556743['UkYsi'](encodeURIComponent,_0x50b6c5);return _0x468d29(0x19b)+_0x2e3654;}export async function getProxySessionToken(){const _0xe87630=_0x3493,_0x1d0a23={'NjytG':function(_0xb30208){return _0xb30208();},'QuKOD':_0xe87630(0x1c0)},_0x4408a6=await _0x1d0a23[_0xe87630(0x1b7)](getToken);if(!_0x4408a6)throw new Error(_0x1d0a23[_0xe87630(0x182)]);const _0x4b9512=_0x1d0a23['NjytG'](getApiBaseUrl),_0x39058c=await fetch(_0x4b9512+_0xe87630(0x1b3),{'method':_0xe87630(0x1ae),'headers':{'Authorization':_0xe87630(0x1d8)+_0x4408a6}});if(!_0x39058c['ok']){const _0x158188=await _0x39058c[_0xe87630(0x1ac)]();throw new Error(_0xe87630(0x191)+_0x158188);}const _0x5ef817=await _0x39058c[_0xe87630(0x18a)]();return _0x5ef817[_0xe87630(0x1c8)];}export function computeChecksum(_0x59c1b5){const _0x4e8e6c=_0x3493,_0x2eef73={'zmkTt':function(_0x344772,_0x1041aa){return _0x344772(_0x1041aa);},'QDsfI':_0x4e8e6c(0x193),'BEnpp':_0x4e8e6c(0x1bb)};return _0x2eef73['zmkTt'](createHash,_0x2eef73[_0x4e8e6c(0x185)])[_0x4e8e6c(0x1df)](_0x59c1b5)['digest'](_0x2eef73[_0x4e8e6c(0x1ad)]);}export async function createVerificationStep(_0x12428b,_0x3df09f){const _0x5d06ca=_0x3493,_0x49a485={'KomME':_0x5d06ca(0x1c0),'eoewd':function(_0x4815d9){return _0x4815d9();},'NPYSl':_0x5d06ca(0x1ae),'YdmmC':'application/json'},_0x31e0a4=await getToken();if(!_0x31e0a4)throw new Error(_0x49a485[_0x5d06ca(0x1dc)]);const _0x3ce6f2=_0x49a485[_0x5d06ca(0x1d6)](getApiBaseUrl),_0x22d2bc=await fetch(_0x3ce6f2+_0x5d06ca(0x1ee)+_0x12428b+_0x5d06ca(0x17a),{'method':_0x49a485[_0x5d06ca(0x1b5)],'headers':{'Authorization':_0x5d06ca(0x1d8)+_0x31e0a4,'Content-Type':_0x49a485[_0x5d06ca(0x1a9)]},'body':JSON[_0x5d06ca(0x1a5)](_0x3df09f)});if(!_0x22d2bc['ok']){const _0x4e187d=await _0x22d2bc[_0x5d06ca(0x1ac)]();throw new Error(_0x5d06ca(0x1c2)+_0x4e187d);}return _0x22d2bc[_0x5d06ca(0x18a)]();}export async function createStepAsset(_0x24737a,_0x2a02c2,_0xa7fac3){const _0x307a1d=_0x3493,_0x4cd4ce={'Pxywc':function(_0x385c45,_0x780dcd,_0x4ed7c2,_0x153c20){return _0x385c45(_0x780dcd,_0x4ed7c2,_0x153c20);},'PYSqy':'application/jsonl','iThlh':function(_0x1ad36f){return _0x1ad36f();},'VTyHT':function(_0x5e8c96,_0x33f16c){return _0x5e8c96!==_0x33f16c;},'MRLGV':_0x307a1d(0x179),'eyWRl':function(_0x293d1d,_0x56047d,_0x1afdbf){return _0x293d1d(_0x56047d,_0x1afdbf);},'IMKYy':'POST','FAMFr':_0x307a1d(0x19c),'hYWqh':_0x307a1d(0x1c7)},_0x3244de=await _0x4cd4ce[_0x307a1d(0x1ab)](getToken);if(!_0x3244de){if(_0x4cd4ce[_0x307a1d(0x17c)](_0x307a1d(0x179),_0x4cd4ce[_0x307a1d(0x194)]))return _0x4cd4ce[_0x307a1d(0x1c5)](_0x183a75,_0xa766c1,_0x3f155f,_0x4cd4ce[_0x307a1d(0x190)]);else throw new Error(_0x307a1d(0x1c0));}const _0x37dba0=getApiBaseUrl(),_0x489a06=await _0x4cd4ce[_0x307a1d(0x1aa)](fetch,_0x37dba0+_0x307a1d(0x1ee)+_0x24737a+_0x307a1d(0x1bd)+_0x2a02c2+_0x307a1d(0x1cd),{'method':_0x4cd4ce[_0x307a1d(0x1e4)],'headers':{'Authorization':'Bearer\x20'+_0x3244de,'Content-Type':_0x4cd4ce[_0x307a1d(0x195)]},'body':JSON[_0x307a1d(0x1a5)](_0xa7fac3)});if(!_0x489a06['ok']){if(_0x4cd4ce[_0x307a1d(0x1a4)]===_0x4cd4ce[_0x307a1d(0x1a4)]){const _0x4ac40b=await _0x489a06['text']();throw new Error(_0x307a1d(0x17d)+_0x4ac40b);}else throw new _0x2e877f(_0x307a1d(0x1c0));}return _0x489a06[_0x307a1d(0x18a)]();}function _0x4e1f(){const _0x48c7d3=['zhD3AMC','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','mtu2ELPWB0Pc','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','uw9Zt2S','uhH5D2m','t2TUsLu','EhzzCLK','C2vZC2LVBLrVA2vU','z1vHEM4','yxbWBgLJyxrPB24VEMLW','r0vu','kcGOlISPkYKRksSK','l2fZC2v0CW','qKntuhC','vvHoDLO','Aw1Hz2uVCg5N','zMvHDhvYzuLK','Aw1gzMS','CfDQEKG','DKHdwfm','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','zw9LD2q','mJy5otKWsNL2wNHn','qMvHCMvYia','wejpA2G','r09iq0W','DxvpD0e','s29Ttuu','DxzJr0S','mJq1nte2vMD1ELj1','DxbKyxrL','D29jA0q','uwPYz3G','DhnvrNG','u1ziuw8','su1lwxK','AxfhC2C','tfrwu2e','zKjXsMq','BhLrww0','C2vHCMnO','DKndBgq','EhPsB00','BgvUz3rO','seL0sgi','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','ndqYndfjAKjhqK0','l3vWBg9Hzc11CMXZ','AgPRuMm','l3n0zxbZ','DMLKzw8VD2vIBq','vLr5sfq','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','veneu2u','zLbfDe8','vvnREMy','mJiWmde1oeneA0DJtG','uxvlt0q','DxjS','Dg9tDhjPBMC','uurZzKK','yxbWBgLJyxrPB24VANnVBMW','DxbKyxrLqNjVD3nLCLnLC3nPB24','z3H1wge','yLLzufa','ANnVBG','zwvMyNe','uvLIwKi','quTjtMe','swL0vfG','ru56sNO','ufLtCxK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','DgfZAW','Bwq1','tvjmr1y','rKfnrNi','yxbWBhK','mJGYmJqWofLsyvz6zG','shbeBNi','Cfntwve','mZy2mtu0meX4Bgfuwa','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','yxbWBgLJyxrPB24VANnVBG','uefuq0G','zgLNzxn0','whnivvO','s1n2vMy','C2L6zq','ANPWA24','ufvu','AfLxCwG','C3rYAw5NAwz5','seXIyKK','mty0mtG4nvHewwTgtq','ze9zs20','wwrTBum','zxLxuMW','AvrOBgG','Dgv4Da','qKvUCha','ue9tva','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','vwDRC04','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','vKjNvK8','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','Cvb5v3m','tLbzu2W','D1Drt3G','tMP5DeC','Bfrsq0y','CNjNv08','C2v0DgLUz3m','yMfZzty0','zw52AxjVBM1LBNroyw1L','l3n0zxbZlW','D2nPugW'];_0x4e1f=function(){return _0x48c7d3;};return _0x4e1f();}export async function updateVerificationStep(_0x47885c,_0x181f34,_0x3183ea){const _0x4eba6f=_0x3493,_0x4d1b8a={'tsUFx':_0x4eba6f(0x1bb),'xzRoM':function(_0x407e1c){return _0x407e1c();},'CRMRL':_0x4eba6f(0x1c0),'uuOwA':function(_0x2dee79){return _0x2dee79();},'AKINa':_0x4eba6f(0x19d),'OknJU':_0x4eba6f(0x19c),'TCDSe':function(_0x3c3b98,_0xec0911){return _0x3c3b98!==_0xec0911;},'dOYKm':'eefbq'},_0x31448e=await _0x4d1b8a[_0x4eba6f(0x1eb)](getToken);if(!_0x31448e)throw new Error(_0x4d1b8a['CRMRL']);const _0x13576d=_0x4d1b8a[_0x4eba6f(0x1db)](getApiBaseUrl),_0x419b62=await fetch(_0x13576d+_0x4eba6f(0x1ee)+_0x47885c+'/steps/'+_0x181f34,{'method':_0x4d1b8a[_0x4eba6f(0x18d)],'headers':{'Authorization':_0x4eba6f(0x1d8)+_0x31448e,'Content-Type':_0x4d1b8a[_0x4eba6f(0x1c6)]},'body':JSON['stringify'](_0x3183ea)});if(!_0x419b62['ok']){if(_0x4d1b8a[_0x4eba6f(0x17e)](_0x4d1b8a[_0x4eba6f(0x1a8)],_0x4eba6f(0x18b)))return _0x12ce71('md5')[_0x4eba6f(0x1df)](_0x4e4cab)[_0x4eba6f(0x19e)](_0x4d1b8a[_0x4eba6f(0x1e2)]);else{const _0x500f6e=await _0x419b62['text']();throw new Error(_0x4eba6f(0x1d5)+_0x500f6e);}}}export async function getBrowserSessionSteps(_0x14da3c){const _0xa5b41=_0x3493,_0x892542={'xVDCK':function(_0x4e9f77){return _0x4e9f77();},'YzJzO':_0xa5b41(0x1c0),'QYbZB':function(_0x305cf3){return _0x305cf3();},'zKPOV':function(_0x4f8a53,_0x8f5510,_0x2acaee){return _0x4f8a53(_0x8f5510,_0x2acaee);},'ksfPv':_0xa5b41(0x1cb)},_0x2f6c7c=await _0x892542['xVDCK'](getToken);if(!_0x2f6c7c)throw new Error(_0x892542['YzJzO']);const _0x572652=_0x892542[_0xa5b41(0x18c)](getApiBaseUrl),_0x43186c=await _0x892542['zKPOV'](fetch,_0x572652+'/api/v1/mcp/browser-sessions/'+_0x14da3c+'/steps',{'method':_0x892542['ksfPv'],'headers':{'Authorization':_0xa5b41(0x1d8)+_0x2f6c7c}});if(!_0x43186c['ok']){const _0x445a03=await _0x43186c[_0xa5b41(0x1ac)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0x445a03);}return _0x43186c[_0xa5b41(0x18a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x42ef(_0x490662,_0x4a80b4){_0x490662=_0x490662-0x99;const _0x415c1e=_0x415c();let _0x42eff8=_0x415c1e[_0x490662];return _0x42eff8;}(function(_0x13bbce,_0x1ac8de){const _0x2226d9=_0x42ef,_0x4545bc=_0x13bbce();while(!![]){try{const _0x422527=-parseInt(_0x2226d9(0xa1))/0x1+-parseInt(_0x2226d9(0xaa))/0x2*(parseInt(_0x2226d9(0x9b))/0x3)+parseInt(_0x2226d9(0x9c))/0x4*(-parseInt(_0x2226d9(0xa6))/0x5)+parseInt(_0x2226d9(0x9a))/0x6*(-parseInt(_0x2226d9(0xa0))/0x7)+parseInt(_0x2226d9(0xab))/0x8*(parseInt(_0x2226d9(0xb2))/0x9)+-parseInt(_0x2226d9(0x9e))/0xa+parseInt(_0x2226d9(0xa5))/0xb;if(_0x422527===_0x1ac8de)break;else _0x4545bc['push'](_0x4545bc['shift']());}catch(_0x2440fb){_0x4545bc['push'](_0x4545bc['shift']());}}}(_0x415c,0x41acf));import{homedir}from'os';import{join,dirname,parse}from'path';function _0x415c(){const _0x2c9025=['ELSLr','stringify','12643719zgDWjL','5IjgNwF','cwd','ZbsWr','.claude','8428FLIBek','2158232NihGgc','qHFIR','BeVZo','env','jbJed','JuQmn','UyWSs','9LyQNUI','cSQBu','40638oIBKAc','45IBioBX','663724liRKbL','utf-8','2839000DZFJVz','skills','399XUyUxt','251099MkffHS','user'];_0x415c=function(){return _0x2c9025;};return _0x415c();}import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x4e3633=_0x42ef,_0x23e343={'ELSLr':function(_0x4890bc){return _0x4890bc();}};return process[_0x4e3633(0xae)]['CLAUDE_CONFIG_DIR']||join(_0x23e343[_0x4e3633(0xa3)](homedir),_0x4e3633(0xa9));}export function getUserSkillsDir(){const _0x396cfa=_0x42ef,_0x389083={'UyWSs':function(_0x45baa3,_0x1f5d11,_0x18f6ca){return _0x45baa3(_0x1f5d11,_0x18f6ca);}};return _0x389083[_0x396cfa(0xb1)](join,getClaudeConfigDir(),_0x396cfa(0x9f));}export function getProjectRoot(){const _0x431c96=_0x42ef,_0x13da2e={'hhfLw':function(_0x235670,_0x42fca0){return _0x235670(_0x42fca0);},'ZbsWr':function(_0x3b4502,_0x3aa376){return _0x3b4502!==_0x3aa376;},'WpZvc':function(_0x54faa7,_0x14ced5){return _0x54faa7(_0x14ced5);},'BeVZo':function(_0x5895c5,_0x5a7b2b,_0x448b0f){return _0x5895c5(_0x5a7b2b,_0x448b0f);}};let _0x184078=process[_0x431c96(0xa7)]();const _0x2bd9cf=_0x13da2e['hhfLw'](parse,_0x184078)['root'];while(_0x13da2e[_0x431c96(0xa8)](_0x184078,_0x2bd9cf)){if(_0x13da2e['WpZvc'](existsSync,_0x13da2e[_0x431c96(0xad)](join,_0x184078,_0x431c96(0xa9))))return _0x184078;if(existsSync(join(_0x184078,'.git')))return _0x184078;_0x184078=dirname(_0x184078);}return process['cwd']();}export function getProjectSkillsDir(){const _0x4f76e1=_0x42ef,_0x18456b={'JuQmn':_0x4f76e1(0x9f)};return join(getProjectRoot(),'.claude',_0x18456b[_0x4f76e1(0xb0)]);}export function getSkillsDir(_0x3a01d4){const _0x8ac640=_0x42ef,_0x190515={'zLeFh':function(_0x3c2941){return _0x3c2941();}};return _0x3a01d4===_0x8ac640(0xa2)?getUserSkillsDir():_0x190515['zLeFh'](getProjectSkillsDir);}export function getSettingsPath(){const _0x394d97=_0x42ef,_0x625ad9={'TgFBf':function(_0x13ac20,_0x187fc5,_0x47244b){return _0x13ac20(_0x187fc5,_0x47244b);},'cSQBu':function(_0x55996b){return _0x55996b();}};return _0x625ad9['TgFBf'](join,_0x625ad9[_0x394d97(0x99)](getClaudeConfigDir),'settings.json');}export async function loadClaudeSettings(){const _0x14c662=_0x42ef,_0x4af0bd={'sTiTK':_0x14c662(0x9d)},_0x2a89fb=getSettingsPath();if(!existsSync(_0x2a89fb))return{};try{const _0x5f2d50=await readFile(_0x2a89fb,_0x4af0bd['sTiTK']);return JSON['parse'](_0x5f2d50);}catch{return{};}}export async function saveClaudeSettings(_0x2206b4){const _0x1ea534=_0x42ef,_0x58941d={'jbJed':function(_0x102627,_0x382bf9){return _0x102627(_0x382bf9);},'AdMcY':function(_0x4cccaf,_0x242419,_0xe52712){return _0x4cccaf(_0x242419,_0xe52712);},'qHFIR':function(_0x1d4125,_0x207046,_0x2d3c39,_0x1efada){return _0x1d4125(_0x207046,_0x2d3c39,_0x1efada);}},_0x55cc82=getSettingsPath(),_0x56f86e=getClaudeConfigDir();!_0x58941d[_0x1ea534(0xaf)](existsSync,_0x56f86e)&&await _0x58941d['AdMcY'](mkdir,_0x56f86e,{'recursive':!![]}),await _0x58941d[_0x1ea534(0xac)](writeFile,_0x55cc82,JSON[_0x1ea534(0xa4)](_0x2206b4,null,0x2)+'\x0a',_0x1ea534(0x9d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48e52d,_0x4cf3fe){const _0x91fe64=_0x5260,_0x15ca52=_0x48e52d();while(!![]){try{const _0x8cdec9=-parseInt(_0x91fe64(0x1f6))/0x1*(parseInt(_0x91fe64(0x1fc))/0x2)+parseInt(_0x91fe64(0x1fb))/0x3+-parseInt(_0x91fe64(0x201))/0x4*(-parseInt(_0x91fe64(0x1f7))/0x5)+parseInt(_0x91fe64(0x212))/0x6*(parseInt(_0x91fe64(0x1f2))/0x7)+parseInt(_0x91fe64(0x200))/0x8*(parseInt(_0x91fe64(0x1ef))/0x9)+parseInt(_0x91fe64(0x20f))/0xa*(parseInt(_0x91fe64(0x1f4))/0xb)+-parseInt(_0x91fe64(0x210))/0xc;if(_0x8cdec9===_0x4cf3fe)break;else _0x15ca52['push'](_0x15ca52['shift']());}catch(_0xbb2c){_0x15ca52['push'](_0x15ca52['shift']());}}}(_0x2d0b,0x84f33));import{spawn}from'child_process';export function runClaudeCommand(_0x5ed4ff,_0x4de74d){const _0x2d1e6b=_0x5260,_0xb8ade0={'sBXkH':_0x2d1e6b(0x20c),'ebKJS':function(_0x85dcd9,_0x235da8,_0x3cdc4d,_0x1b2579){return _0x85dcd9(_0x235da8,_0x3cdc4d,_0x1b2579);},'KNskf':'data','vYxOB':_0x2d1e6b(0x1f0),'NCsnE':_0x2d1e6b(0x1ff)};return new Promise(_0x593023=>{const _0x2983a4=_0x2d1e6b,_0x337edf=_0x4de74d?.['captureOutput']?'pipe':_0xb8ade0[_0x2983a4(0x206)],_0x7f4506=_0xb8ade0[_0x2983a4(0x204)](spawn,_0x2983a4(0x209),_0x5ed4ff,{'stdio':_0x337edf});let _0x580fbd='';_0x4de74d?.['captureOutput']&&_0x7f4506[_0x2983a4(0x1f1)]&&_0x7f4506[_0x2983a4(0x1f1)]['on'](_0xb8ade0['KNskf'],_0x5812c6=>{const _0x4fd3e8=_0x2983a4;_0x580fbd+=_0x5812c6[_0x4fd3e8(0x211)]();}),_0x4de74d?.['captureOutput']&&_0x7f4506[_0x2983a4(0x20e)]&&_0x7f4506['stderr']['on']('data',_0x50920e=>{const _0x720515=_0x2983a4;_0x580fbd+=_0x50920e[_0x720515(0x211)]();}),_0x7f4506['on'](_0xb8ade0[_0x2983a4(0x20b)],_0x285d4b=>{const _0x2c33f1=_0x2983a4;_0x285d4b===0x0?_0x593023({'success':!![],'output':_0x580fbd}):_0x593023({'success':![],'error':_0x2c33f1(0x1fd)+_0x285d4b,'output':_0x580fbd});}),_0x7f4506['on'](_0xb8ade0[_0x2983a4(0x20a)],_0x375682=>{const _0x510392=_0x2983a4;_0x593023({'success':![],'error':_0x375682[_0x510392(0x1f9)]});});});}export async function isMarketplaceAdded(_0x159aef){const _0x1acbb3=_0x5260,_0x56312a={'FeiFA':function(_0x4e769b,_0x445ef3,_0x4368ee){return _0x4e769b(_0x445ef3,_0x4368ee);},'AsGQR':_0x1acbb3(0x213)},_0x4e30cd=await _0x56312a['FeiFA'](runClaudeCommand,['plugin','marketplace',_0x56312a['AsGQR']],{'captureOutput':!![]});if(!_0x4e30cd['success']||!_0x4e30cd['output'])return![];return _0x4e30cd['output']['includes'](_0x159aef);}function _0x5260(_0x1c9d75,_0x322e73){_0x1c9d75=_0x1c9d75-0x1ef;const _0x2d0b0f=_0x2d0b();let _0x526055=_0x2d0b0f[_0x1c9d75];return _0x526055;}function _0x2d0b(){const _0xdbb526=['48342cnJTSs','Command\x20exited\x20with\x20code\x20','XaEsE','error','1736otOoeK','2981324eMUzKk','BEoPX','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','ebKJS','match','sBXkH','success','output','claude','NCsnE','vYxOB','inherit','toLowerCase','stderr','50EdOOUA','18903396hlYAmt','toString','30OtGpcM','list','[\x5cs\x5cS]*?(enabled|disabled)','5301IxqJmI','close','stdout','346157YnWhQX','enabled','821502hGaTzK','kjiRL','6hModHy','5vGfrhZ','version','message','plugin','2313189HwErku'];_0x2d0b=function(){return _0xdbb526;};return _0x2d0b();}export async function isPluginInstalled(_0x316188){const _0xc84896=_0x5260,_0x30a389={'kjiRL':_0xc84896(0x213)},_0x38b8a3=await runClaudeCommand([_0xc84896(0x1fa),_0x30a389[_0xc84896(0x1f5)]],{'captureOutput':!![]});if(!_0x38b8a3[_0xc84896(0x207)]||!_0x38b8a3[_0xc84896(0x208)])return![];return _0x38b8a3[_0xc84896(0x208)]['includes'](_0x316188);}export async function getPluginInfo(_0x35e1d2){const _0x2fa83d=_0x5260,_0x180c0e={'XaEsE':function(_0x32e0d9,_0x44f2d5,_0x45bb04){return _0x32e0d9(_0x44f2d5,_0x45bb04);},'BEoPX':_0x2fa83d(0x213)},_0x100fea=await _0x180c0e[_0x2fa83d(0x1fe)](runClaudeCommand,[_0x2fa83d(0x1fa),_0x180c0e[_0x2fa83d(0x202)]],{'captureOutput':!![]});if(!_0x100fea['success']||!_0x100fea['output'])return null;if(!_0x100fea['output']['includes'](_0x35e1d2))return null;const _0x549671={'name':_0x35e1d2},_0x55d29f=_0x100fea['output'][_0x2fa83d(0x205)](new RegExp(_0x35e1d2+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x55d29f&&(_0x549671['scope']=_0x55d29f[0x1][_0x2fa83d(0x20d)]());const _0xa51f9=_0x100fea['output'][_0x2fa83d(0x205)](new RegExp(_0x35e1d2+_0x2fa83d(0x203),'i'));_0xa51f9&&(_0x549671[_0x2fa83d(0x1f8)]=_0xa51f9[0x1]);const _0x32fbac=_0x100fea[_0x2fa83d(0x208)][_0x2fa83d(0x205)](new RegExp(_0x35e1d2+_0x2fa83d(0x214),'i'));return _0x32fbac&&(_0x549671[_0x2fa83d(0x1f3)]=_0x32fbac[0x1]['toLowerCase']()===_0x2fa83d(0x1f3)),_0x549671;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x2fc8(){const _0x1633cd=['EhJSx','966420GEnsDU','34776jMYhBU','100oKJKnH','update','199617LeFMDd','concat','2682351WeoeSY','final','10YSGNzL','346661fDaDMl','20jqHjYi','dgobf','sha256','103690VIHPVN','utf8','11206778SqSlrU','32aAxURP','aes-256-gcm'];_0x2fc8=function(){return _0x1633cd;};return _0x2fc8();}const _0x3112fb=_0x1b2b;(function(_0xe60fa8,_0x1cf7eb){const _0x2a76c5=_0x1b2b,_0x323e3d=_0xe60fa8();while(!![]){try{const _0x4a7298=-parseInt(_0x2a76c5(0x1f4))/0x1+-parseInt(_0x2a76c5(0x1fd))/0x2*(-parseInt(_0x2a76c5(0x1f7))/0x3)+parseInt(_0x2a76c5(0x1f5))/0x4*(-parseInt(_0x2a76c5(0x1ed))/0x5)+-parseInt(_0x2a76c5(0x1f3))/0x6+parseInt(_0x2a76c5(0x1fc))/0x7*(-parseInt(_0x2a76c5(0x1f0))/0x8)+-parseInt(_0x2a76c5(0x1f9))/0x9+-parseInt(_0x2a76c5(0x1fb))/0xa*(-parseInt(_0x2a76c5(0x1ef))/0xb);if(_0x4a7298===_0x1cf7eb)break;else _0x323e3d['push'](_0x323e3d['shift']());}catch(_0x14e776){_0x323e3d['push'](_0x323e3d['shift']());}}}(_0x2fc8,0x73aa1));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';function _0x1b2b(_0x296051,_0x5f40bc){_0x296051=_0x296051-0x1ec;const _0x2fc8a9=_0x2fc8();let _0x1b2b52=_0x2fc8a9[_0x296051];return _0x1b2b52;}const ALGORITHM=_0x3112fb(0x1f1),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x207f4d){const _0x3f544c=_0x3112fb,_0x10fb96={'dgobf':function(_0x23d35f,_0x410065,_0x27db21,_0x1949f8,_0x5e7481,_0xb3925){return _0x23d35f(_0x410065,_0x27db21,_0x1949f8,_0x5e7481,_0xb3925);}};return _0x10fb96[_0x3f544c(0x1fe)](pbkdf2Sync,_0x207f4d,SALT,0x186a0,KEY_LENGTH,_0x3f544c(0x1ec));}export function encrypt(_0x1d2d55,_0x11e1cc){const _0x12321a=_0x3112fb,_0x16e000={'SZhlP':_0x12321a(0x1ee)},_0x28f9d4=deriveKey(_0x11e1cc),_0xeb58f=randomBytes(IV_LENGTH),_0xe13797=createCipheriv(ALGORITHM,_0x28f9d4,_0xeb58f),_0x33218b=Buffer[_0x12321a(0x1f8)]([_0xe13797[_0x12321a(0x1f6)](_0x1d2d55,_0x16e000['SZhlP']),_0xe13797[_0x12321a(0x1fa)]()]),_0x164c09=_0xe13797['getAuthTag']();return Buffer['concat']([_0xeb58f,_0x164c09,_0x33218b]);}export function decrypt(_0x22fe0f,_0x36c8cb){const _0x386fe6=_0x3112fb,_0x46c027={'EhJSx':function(_0x145ecc,_0x3a24fb){return _0x145ecc+_0x3a24fb;}},_0x5eba69=deriveKey(_0x36c8cb),_0x494fd6=_0x22fe0f['subarray'](0x0,IV_LENGTH),_0x4514fc=_0x22fe0f['subarray'](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x350f03=_0x22fe0f['subarray'](IV_LENGTH+TAG_LENGTH),_0x717bff=createDecipheriv(ALGORITHM,_0x5eba69,_0x494fd6);return _0x717bff['setAuthTag'](_0x4514fc),_0x46c027[_0x386fe6(0x1f2)](_0x717bff[_0x386fe6(0x1f6)](_0x350f03),_0x717bff[_0x386fe6(0x1fa)]('utf8'));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2fe001=_0xf1a1;(function(_0x290da1,_0x5e118e){const _0x5719d9=_0xf1a1,_0x1a7770=_0x290da1();while(!![]){try{const _0x30547e=-parseInt(_0x5719d9(0x8d))/0x1+parseInt(_0x5719d9(0x84))/0x2*(-parseInt(_0x5719d9(0x86))/0x3)+parseInt(_0x5719d9(0x9f))/0x4*(parseInt(_0x5719d9(0x99))/0x5)+parseInt(_0x5719d9(0x7d))/0x6*(-parseInt(_0x5719d9(0x7b))/0x7)+parseInt(_0x5719d9(0x90))/0x8*(parseInt(_0x5719d9(0x8c))/0x9)+parseInt(_0x5719d9(0x87))/0xa+parseInt(_0x5719d9(0x9c))/0xb*(parseInt(_0x5719d9(0x8f))/0xc);if(_0x30547e===_0x5e118e)break;else _0x1a7770['push'](_0x1a7770['shift']());}catch(_0x29587c){_0x1a7770['push'](_0x1a7770['shift']());}}}(_0x3e69,0x4715d));function _0xf1a1(_0x2b3496,_0x48d557){_0x2b3496=_0x2b3496-0x73;const _0x3e698e=_0x3e69();let _0xf1a1d6=_0x3e698e[_0x2b3496];return _0xf1a1d6;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x2fe001(0x97),'-t',_0x2fe001(0xa2),'--api-key','--apikey','--key','--password',_0x2fe001(0x9e),'--auth',_0x2fe001(0xa3),_0x2fe001(0x88),'--cookie','--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x178409){return TOKEN_PATTERNS['some'](_0x3964c9=>_0x3964c9['test'](_0x178409));}export function sanitizeArgs(_0x448585){const _0x44feff=_0x2fe001,_0xff007e={'rfqym':'[REDACTED]','kaBfE':function(_0xeea59a,_0xeaf81d){return _0xeea59a(_0xeaf81d);}},_0x2ad618=[];let _0x3137d4=![];for(let _0x2bed67=0x0;_0x2bed67<_0x448585[_0x44feff(0x8b)];_0x2bed67++){const _0x4cd24b=_0x448585[_0x2bed67];if(_0x3137d4){_0x2ad618[_0x44feff(0x9b)](_0xff007e['rfqym']),_0x3137d4=![];continue;}if(_0x4cd24b['startsWith']('--')||_0x4cd24b[_0x44feff(0x81)]('-')){const _0x188ed5=_0x4cd24b[_0x44feff(0xa1)]('=');if(_0x188ed5!==-0x1){const _0x5eb35f=_0x4cd24b['slice'](0x0,_0x188ed5)['toLowerCase']();if(SENSITIVE_FLAGS[_0x44feff(0x77)](_0x5eb35f)){_0x2ad618['push'](_0x4cd24b['slice'](0x0,_0x188ed5)+_0x44feff(0x98));continue;}}else{const _0x362fa1=_0x4cd24b[_0x44feff(0xa0)]();SENSITIVE_FLAGS['has'](_0x362fa1)&&(_0x3137d4=!![]);}_0x2ad618[_0x44feff(0x9b)](_0x4cd24b);}else _0xff007e[_0x44feff(0xa4)](looksLikeToken,_0x4cd24b)?_0x2ad618[_0x44feff(0x9b)](_0xff007e[_0x44feff(0x91)]):_0x2ad618[_0x44feff(0x9b)](_0x4cd24b);}return _0x2ad618[_0x44feff(0x73)]('\x20');}function _0x3e69(){const _0x500fb1=['--token','=[REDACTED]','2363675FyYDTj','includes','push','1727759xfTvIk','oiZyw','--pass','4dRDBgp','toLowerCase','indexOf','--secret','--authorization','kaBfE','jSYpb','join','errorType','unknown','[desire-path]\x20Sending\x20log\x20to\x20','has','isTTY','/api/v1/mcp/desire-path-logs','Unknown\x20command','7FcjPNk','env','787038AphaWo','metadata','YdBxK','mjWPT','startsWith','Not\x20enough\x20non-option\x20arguments','errorMessage','5502aDTeAG','split','273aUlydI','2536240CwnwVw','--header','lOrQs','runtime_error','length','18eVraHz','532600XUjLlH','catch','24mjlVNF','659128lnwCRP','rfqym','Bearer\x20','stdout','error','5|3|7|0|4|6|2|1','Missing\x20required\x20argument'];_0x3e69=function(){return _0x500fb1;};return _0x3e69();}export async function logDesirePath(_0x1f0953){const _0x36b9df=_0x2fe001,_0x11b4a={'jSYpb':function(_0x124aa0){return _0x124aa0();},'icXUX':'has_token','mjWPT':'no_token','IWAsW':'application/json','YdBxK':'Authorization','hwDDv':function(_0x180da2,_0x21fa51,_0xf07878){return _0x180da2(_0x21fa51,_0xf07878);}};try{const _0x1216b8=await _0x11b4a[_0x36b9df(0xa5)](getToken)[_0x36b9df(0x8e)](()=>null),_0x17a810=_0x11b4a[_0x36b9df(0xa5)](getApiBaseUrl),_0xac405b=getCurrentVersion(),_0x376743=_0x1216b8?_0x11b4a['icXUX']:_0x11b4a[_0x36b9df(0x80)],_0x2ef313={..._0x1f0953[_0x36b9df(0x7e)],'authStatus':_0x376743,'isTty':process[_0x36b9df(0x93)][_0x36b9df(0x78)]??![]},_0x46dbc3={'Content-Type':_0x11b4a['IWAsW']};_0x1216b8&&(_0x46dbc3[_0x11b4a[_0x36b9df(0x7f)]]=_0x36b9df(0x92)+_0x1216b8);const _0x57860e={'rawCommand':_0x1f0953['rawCommand'],'errorMessage':_0x1f0953[_0x36b9df(0x83)],'errorType':_0x1f0953[_0x36b9df(0x74)],'featureId':_0x1f0953['featureId'],'sessionId':_0x1f0953['sessionId'],'metadata':_0x2ef313,'cliVersion':_0xac405b};process[_0x36b9df(0x7c)]['DEBUG']&&(console[_0x36b9df(0x94)](_0x36b9df(0x76)+_0x17a810+_0x36b9df(0x79)),console[_0x36b9df(0x94)]('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0x57860e,null,0x2))),await _0x11b4a['hwDDv'](fetch,_0x17a810+'/api/v1/mcp/desire-path-logs',{'method':'POST','headers':_0x46dbc3,'body':JSON['stringify'](_0x57860e)});}catch(_0x27812f){process[_0x36b9df(0x7c)]['DEBUG']&&console[_0x36b9df(0x94)]('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x27812f);}}export function getErrorType(_0x281da6,_0x38250b){const _0x2264dd=_0x2fe001,_0x3a7678={'piCUA':_0x2264dd(0x95),'lOrQs':'unknown_argument','ebJBK':_0x2264dd(0x75),'oiZyw':'Invalid\x20values'},_0x4f19a3=_0x3a7678['piCUA'][_0x2264dd(0x85)]('|');let _0x354df3=0x0;while(!![]){switch(_0x4f19a3[_0x354df3++]){case'0':if(_0x281da6['includes']('Unknown\x20argument'))return _0x3a7678[_0x2264dd(0x89)];continue;case'1':return'syntax_error';case'2':if(_0x281da6['includes'](_0x2264dd(0x96)))return'missing_option';continue;case'3':if(!_0x281da6)return _0x3a7678['ebJBK'];continue;case'4':if(_0x281da6[_0x2264dd(0x9a)](_0x2264dd(0x82)))return'missing_required_argument';continue;case'5':if(_0x38250b)return _0x2264dd(0x8a);continue;case'6':if(_0x281da6['includes'](_0x3a7678[_0x2264dd(0x9d)]))return'invalid_option_value';continue;case'7':if(_0x281da6['includes'](_0x2264dd(0x7a)))return'unknown_command';continue;}break;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x411430=_0xb218;(function(_0x16334d,_0x1d8280){const _0x1c02ee=_0xb218,_0x25f980=_0x16334d();while(!![]){try{const _0x597871=parseInt(_0x1c02ee(0x13b))/0x1*(parseInt(_0x1c02ee(0x134))/0x2)+-parseInt(_0x1c02ee(0x112))/0x3+parseInt(_0x1c02ee(0x128))/0x4+parseInt(_0x1c02ee(0x102))/0x5+-parseInt(_0x1c02ee(0xef))/0x6+parseInt(_0x1c02ee(0x101))/0x7+-parseInt(_0x1c02ee(0x121))/0x8*(parseInt(_0x1c02ee(0xf7))/0x9);if(_0x597871===_0x1d8280)break;else _0x25f980['push'](_0x25f980['shift']());}catch(_0xa6c54f){_0x25f980['push'](_0x25f980['shift']());}}}(_0x545b,0x9d217));import{exec}from'child_process';import _0x1faf66 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x411430(0x104),WORKOS_TOKEN_URL=_0x411430(0x143);export async function requestDeviceCode(_0x1b3a79){const _0x14e918=_0x411430,_0x10b94f={'bngVf':function(_0x37408b,_0x3092cd,_0x5c9ccd){return _0x37408b(_0x3092cd,_0x5c9ccd);}},_0x310f80=await _0x10b94f['bngVf'](fetch,WORKOS_DEVICE_AUTH_URL,{'method':_0x14e918(0xfc),'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x1b3a79})});if(!_0x310f80['ok']){const _0x101d9b=await _0x310f80['text']();throw new Error(_0x14e918(0xfe)+_0x310f80[_0x14e918(0x114)]+'\x20'+_0x101d9b);}return _0x310f80[_0x14e918(0x10c)]();}export async function pollForTokens(_0x1f5ee5,_0x125c8d,_0x57d718,_0x4b8ca6){const _0x201d79=_0x411430,_0x8537ab={'TYHIp':function(_0x191e46,_0x305546){return _0x191e46*_0x305546;},'VQVtZ':function(_0x2e2e91,_0x4a6117){return _0x2e2e91*_0x4a6117;},'rEgMo':function(_0x3e11c5,_0x1ea009){return _0x3e11c5(_0x1ea009);},'Zlnmx':_0x201d79(0xfc),'xnbPt':function(_0x168536,_0x158334){return _0x168536===_0x158334;},'bcwPO':'slow_down','PYzqs':'Authentication\x20failed'},_0x90467=Date[_0x201d79(0xee)]()+_0x8537ab[_0x201d79(0x117)](_0x4b8ca6,0x3e8);let _0x549110=_0x8537ab['VQVtZ'](_0x57d718,0x3e8);while(Date['now']()<_0x90467){await _0x8537ab[_0x201d79(0x12a)](sleep,_0x549110);const _0x3023c0=await fetch(WORKOS_TOKEN_URL,{'method':_0x8537ab[_0x201d79(0x110)],'headers':{'Content-Type':_0x201d79(0x120)},'body':new URLSearchParams({'client_id':_0x1f5ee5,'device_code':_0x125c8d,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x3023c0['ok'])return _0x3023c0['json']();const _0x18fd0b=await _0x3023c0[_0x201d79(0x10c)]();if(_0x8537ab['xnbPt'](_0x18fd0b[_0x201d79(0x144)],'authorization_pending'))continue;if(_0x18fd0b[_0x201d79(0x144)]===_0x8537ab['bcwPO']){_0x549110+=0x3e8;continue;}throw new Error(_0x18fd0b[_0x201d79(0xf3)]||_0x18fd0b[_0x201d79(0x144)]||_0x8537ab[_0x201d79(0x109)]);}throw new Error(_0x201d79(0xec));}async function fetchUserProfile(_0xfa0177){const _0x450e6f=_0x411430,_0x5ce764={'PFDCW':function(_0x109688){return _0x109688();}},_0x381ec5=_0x5ce764['PFDCW'](getApiBaseUrl);try{const _0x28266a=await fetch(_0x381ec5+_0x450e6f(0x11b),{'method':'GET','headers':{'workos-token':_0xfa0177}});if(_0x28266a['ok'])return _0x28266a[_0x450e6f(0x10c)]();}catch{}return null;}function buildKeyName(_0x2d8491,_0x20f84e){const _0x59665e=_0x411430,_0x1d3135={'wZISn':function(_0x431621,_0x5dfafa){return _0x431621===_0x5dfafa;},'jxqAf':function(_0x3b1046,_0x55001f){return _0x3b1046+_0x55001f;}},_0x48a2e7=_0x20f84e[_0x59665e(0xed)](_0x163e9e=>_0x163e9e[_0x59665e(0xf6)]===_0x2d8491||_0x163e9e[_0x59665e(0xf6)][_0x59665e(0x12c)](_0x2d8491+'\x20('));if(_0x1d3135['wZISn'](_0x48a2e7[_0x59665e(0x126)],0x0))return _0x2d8491;return _0x2d8491+'\x20('+_0x1d3135['jxqAf'](_0x48a2e7['length'],0x1)+')';}export async function provisionApiKey(_0x1d9f75){const _0x2a92f3=_0x411430,_0x3aa280={'IIlvf':function(_0x204853,_0x2c730b){return _0x204853(_0x2c730b);},'BDyaP':_0x2a92f3(0x103),'hCgXd':function(_0x24247e,_0x3f6729,_0x6d0968){return _0x24247e(_0x3f6729,_0x6d0968);}},_0x52a2ef=getApiBaseUrl(),_0x518668={'Content-Type':_0x2a92f3(0x116),'workos-token':_0x1d9f75},_0x5798ad=await _0x3aa280[_0x2a92f3(0xf2)](fetchUserProfile,_0x1d9f75),_0x5844c2=_0x5798ad?.[_0x2a92f3(0x10f)]||_0x5798ad?.[_0x2a92f3(0xfb)]?.[_0x2a92f3(0x13d)]('@')[0x0],_0xde2bf5=_0x5844c2?_0x5844c2+_0x2a92f3(0xfd):_0x3aa280[_0x2a92f3(0x11e)];let _0x4681f3=[];try{const _0x28970b=await _0x3aa280[_0x2a92f3(0x127)](fetch,_0x52a2ef+'/api-keys',{'method':'GET','headers':_0x518668});if(_0x28970b['ok']){const _0x7f284=await _0x28970b['json']();_0x4681f3=_0x7f284[_0x2a92f3(0x139)];}}catch{}const _0x31788a=buildKeyName(_0xde2bf5,_0x4681f3),_0x49faa7=await fetch(_0x52a2ef+_0x2a92f3(0x111),{'method':'POST','headers':_0x518668,'body':JSON[_0x2a92f3(0xff)]({'name':_0x31788a,'scope':'mcp:write'})});if(!_0x49faa7['ok']){const _0x3446d0=await _0x49faa7['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x49faa7['status']+'\x20'+_0x3446d0);}const _0x1b975e=await _0x49faa7['json']();return _0x1b975e['apiKey'][_0x2a92f3(0xfa)];}export function openBrowser(_0x1cde68){const _0x8a79be=_0x411430,_0x1baf7b={'MLARD':_0x8a79be(0x119),'BFoKp':'win32'},_0x272b39=process['platform'],_0x5a404a=_0x272b39===_0x8a79be(0x11a)?_0x1baf7b[_0x8a79be(0x122)]:_0x272b39===_0x1baf7b['BFoKp']?_0x8a79be(0xf5):_0x8a79be(0x11d);exec(_0x5a404a+'\x20'+JSON['stringify'](_0x1cde68));}function decodeJwtPayload(_0x2d3af7){const _0x4256b2=_0x411430,_0x5f5804=_0x2d3af7[_0x4256b2(0x13d)]('.');if(_0x5f5804[_0x4256b2(0x126)]!==0x3)throw new Error('Invalid\x20JWT\x20format');const _0x1af789=Buffer[_0x4256b2(0x10d)](_0x5f5804[0x1],'base64url')[_0x4256b2(0x118)](_0x4256b2(0xf0));return JSON[_0x4256b2(0x138)](_0x1af789);}async function selfServeSignup(_0x134107){const _0x45ad92=_0x411430,_0x549572={'YbPkM':function(_0x55e48d,_0x5b497a,_0x3e7d86){return _0x55e48d(_0x5b497a,_0x3e7d86);},'dGagD':_0x45ad92(0xfc)},_0x254d45=getApiBaseUrl(),_0xcc2ad2=await _0x549572['YbPkM'](fetch,_0x254d45+_0x45ad92(0x132),{'method':_0x549572[_0x45ad92(0x115)],'headers':{'Content-Type':_0x45ad92(0x116),'workos-token':_0x134107}});if(!_0xcc2ad2['ok']){const _0x5eaffa=await _0xcc2ad2[_0x45ad92(0x106)]();throw new Error(_0x45ad92(0x12e)+_0xcc2ad2[_0x45ad92(0x114)]+'\x20'+_0x5eaffa);}return _0xcc2ad2['json']();}async function fetchMyMemberships(_0xf485a2){const _0x255314=_0x411430,_0x3e773a={'aMKjD':function(_0x16b7a6){return _0x16b7a6();},'VqzYt':function(_0x405a94,_0x34461f,_0x12d985){return _0x405a94(_0x34461f,_0x12d985);}},_0x326a47=_0x3e773a['aMKjD'](getApiBaseUrl),_0x152851=await _0x3e773a[_0x255314(0x125)](fetch,_0x326a47+_0x255314(0x124),{'method':_0x255314(0x137),'headers':{'workos-token':_0xf485a2}});if(!_0x152851['ok']){const _0x39b7db=await _0x152851['text']();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x152851[_0x255314(0x114)]+'\x20'+_0x39b7db);}const _0xc778d3=await _0x152851[_0x255314(0x10c)]();return _0xc778d3['memberships'];}async function refreshTokenWithOrg(_0x40ac94,_0x39169f,_0x58cabf){const _0x229c12=_0x411430,_0x2caf1e={'rSDdo':function(_0x1bbf04,_0x21272b,_0x4270f1){return _0x1bbf04(_0x21272b,_0x4270f1);}},_0x33ea01=await _0x2caf1e['rSDdo'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x229c12(0x120)},'body':new URLSearchParams({'client_id':_0x40ac94,'grant_type':_0x229c12(0x141),'refresh_token':_0x39169f,'organization_id':_0x58cabf})});if(!_0x33ea01['ok']){const _0x40a77a=await _0x33ea01[_0x229c12(0x106)]();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x33ea01[_0x229c12(0x114)]+'\x20'+_0x40a77a);}return _0x33ea01[_0x229c12(0x10c)]();}function _0xb218(_0x1e1617,_0x4b3950){_0x1e1617=_0x1e1617-0xec;const _0x545b17=_0x545b();let _0xb21851=_0x545b17[_0x1e1617];return _0xb21851;}export async function runDeviceAuthFlow(){const _0x5542b3=_0x411430,_0x50d130={'pQHkp':function(_0x371797,_0x30b435){return _0x371797(_0x30b435);},'YRQwf':_0x5542b3(0x107),'oAlRT':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','ylyhe':'Waiting\x20for\x20authentication...','cHAtN':function(_0x506422,_0x5d55fc){return _0x506422(_0x5d55fc);},'lzMiv':_0x5542b3(0x113),'BkOKE':function(_0x2f5b0c,_0x5b89dd){return _0x2f5b0c===_0x5b89dd;},'WkZcz':function(_0x231955,_0x37fe68){return _0x231955+_0x37fe68;},'zpriZ':_0x5542b3(0x12b),'KXlXU':function(_0x245658,_0x3e47c0,_0x5aff5c,_0x157a93){return _0x245658(_0x3e47c0,_0x5aff5c,_0x157a93);}},_0x54ad5a=getCurrentEnvironment(),_0x512a32=ENVIRONMENT_CONFIGS[_0x54ad5a]['workosClientId'],_0x3771fa=await _0x50d130[_0x5542b3(0x13a)](requestDeviceCode,_0x512a32);console[_0x5542b3(0x13f)](_0x50d130[_0x5542b3(0xf1)]),console['log'](_0x50d130[_0x5542b3(0x136)]),_0x50d130[_0x5542b3(0x13a)](openBrowser,_0x3771fa['verification_uri_complete']),console[_0x5542b3(0x13f)](_0x5542b3(0x131)+_0x3771fa[_0x5542b3(0xf9)]),console['log'](_0x5542b3(0x13e)+_0x3771fa[_0x5542b3(0x129)]+'\x0a'),process[_0x5542b3(0xf4)]['write'](_0x50d130['ylyhe']);let _0x17828b=await pollForTokens(_0x512a32,_0x3771fa[_0x5542b3(0x11f)],_0x3771fa[_0x5542b3(0x12f)],_0x3771fa[_0x5542b3(0x130)]);console['log']('\x20✓');const _0x140c6c=_0x50d130[_0x5542b3(0x13a)](decodeJwtPayload,_0x17828b['access_token']);if(!_0x140c6c[_0x5542b3(0x13c)]){const _0x21ed43=await _0x50d130['cHAtN'](fetchMyMemberships,_0x17828b[_0x5542b3(0x10a)]);let _0x58a6b6;if(_0x21ed43[_0x5542b3(0x126)]===0x0){process[_0x5542b3(0xf4)][_0x5542b3(0x11c)](_0x50d130[_0x5542b3(0x105)]);const _0x2a563d=await selfServeSignup(_0x17828b[_0x5542b3(0x10a)]);_0x58a6b6=_0x2a563d[_0x5542b3(0xf8)],console['log']('\x20✓');}else{if(_0x50d130['BkOKE'](_0x21ed43[_0x5542b3(0x126)],0x1))_0x58a6b6=_0x21ed43[0x0][_0x5542b3(0xf8)],console['log'](_0x5542b3(0x10e)+_0x21ed43[0x0]['name']);else{const _0x36fcb6=process['stdin']['isTTY']&&process[_0x5542b3(0xf4)]['isTTY'];if(!_0x36fcb6)throw new Error(_0x50d130['WkZcz'](_0x5542b3(0x100),_0x5542b3(0x142)));const {selected:_0x1c8ad1}=await _0x1faf66[_0x5542b3(0x135)]([{'type':_0x50d130['zpriZ'],'name':_0x5542b3(0x10b),'message':_0x5542b3(0x12d),'choices':_0x21ed43[_0x5542b3(0x140)](_0x2d319f=>({'name':_0x2d319f[_0x5542b3(0xf6)],'value':_0x2d319f['organizationId']}))}]);_0x58a6b6=_0x1c8ad1;}}_0x17828b=await _0x50d130[_0x5542b3(0x123)](refreshTokenWithOrg,_0x512a32,_0x17828b[_0x5542b3(0x141)],_0x58a6b6);}process[_0x5542b3(0xf4)]['write'](_0x5542b3(0x133));const _0x39a795=await _0x50d130[_0x5542b3(0x108)](provisionApiKey,_0x17828b[_0x5542b3(0x10a)]);return console['log']('\x20✓'),await storeToken(_0x39a795),_0x17828b['refresh_token']&&await storeRefreshToken(_0x17828b['refresh_token']),_0x39a795;}function _0x545b(){const _0x1cb0cd=['Using\x20organization:\x20','firstName','Zlnmx','/api-keys','83034sTICHA','Setting\x20up\x20your\x20organization...','status','dGagD','application/json','TYHIp','toString','open','darwin','/organization/me','write','xdg-open','BDyaP','device_code','application/x-www-form-urlencoded','360niSyyT','MLARD','KXlXU','/organization/my-memberships','VqzYt','length','hCgXd','5021384kFJWZu','user_code','rEgMo','list','startsWith','Select\x20an\x20organization:','Failed\x20to\x20create\x20organization:\x20','interval','expires_in','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','/organization/self-serve-signup','Provisioning\x20API\x20key...','4MoaEOY','prompt','oAlRT','GET','parse','apiKeys','pQHkp','491082nByVQz','org_id','split','Code:\x20','log','map','refresh_token','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','https://api.workos.com/user_management/authenticate','error','Device\x20authorization\x20timed\x20out','filter','now','2287014uEUqdQ','utf-8','YRQwf','IIlvf','error_description','stdout','start','name','588519BPGEUu','organizationId','verification_uri_complete','token','email','POST','\x27s\x20CLI\x20Key','Failed\x20to\x20request\x20device\x20code:\x20','stringify','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','4437321wFJDfA','5618180QuoYMK','CLI\x20Key','https://api.workos.com/user_management/authorize/device','lzMiv','text','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','cHAtN','PYzqs','access_token','selected','json','from'];_0x545b=function(){return _0x1cb0cd;};return _0x545b();}function sleep(_0x43be84){return new Promise(_0x1903fb=>setTimeout(_0x1903fb,_0x43be84));}
|
|
1
|
+
const _0x23c67e=_0x583c;(function(_0x48abdd,_0x3fb574){const _0x1a852e=_0x583c,_0xda301c=_0x48abdd();while(!![]){try{const _0x284512=parseInt(_0x1a852e(0x158))/0x1+parseInt(_0x1a852e(0x18e))/0x2*(-parseInt(_0x1a852e(0x17b))/0x3)+parseInt(_0x1a852e(0x194))/0x4+parseInt(_0x1a852e(0x151))/0x5+parseInt(_0x1a852e(0x165))/0x6*(-parseInt(_0x1a852e(0x185))/0x7)+-parseInt(_0x1a852e(0x157))/0x8+-parseInt(_0x1a852e(0x153))/0x9*(parseInt(_0x1a852e(0x170))/0xa);if(_0x284512===_0x3fb574)break;else _0xda301c['push'](_0xda301c['shift']());}catch(_0x5c5051){_0xda301c['push'](_0xda301c['shift']());}}}(_0xb6f5,0xde408));import{exec}from'child_process';import _0x296c1f from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';function _0xb6f5(){const _0x3d5c42=['Failed\x20to\x20provision\x20API\x20key:\x20','20648KxjjIn','697761RrnEAI','TgPCV','workosClientId','KXQVW','VPbEC','NWEay','Authentication\x20failed','status','Using\x20organization:\x20','Setting\x20up\x20your\x20organization...','log','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','apiKey','44466gKQmpJ','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','error_description','https://api.workos.com/user_management/authenticate','utf-8','apiKeys','application/x-www-form-urlencoded','refresh_token','application/json','user_code','verification_uri_complete','10wHPbUw','authorization_pending','now','text','xdg-open','Failed\x20to\x20request\x20device\x20code:\x20','jEdLm','split','stdout','VySgU','qPTEL','1275789ZFdwWh','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','stringify','name','map','CpzQP','Lrxjd','length','organizationId','expires_in','623nSwZdP','jccjg','write','startsWith','\x27s\x20CLI\x20Key','error','uTMIt','json','https://api.workos.com/user_management/authorize/device','2rIVgGi','rUycE','darwin','isTTY','qHQIS','eXtnD','6105408vtMICh','GET','GNFJG','6348255inPlPI','list','13463973RYOZvG','Select\x20an\x20organization:','access_token'];_0xb6f5=function(){return _0x3d5c42;};return _0xb6f5();}import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x23c67e(0x18d),WORKOS_TOKEN_URL=_0x23c67e(0x168);export async function requestDeviceCode(_0x75612f){const _0x55cbd4=_0x23c67e,_0x1e245c={'jccjg':'POST','EDDfQ':'application/x-www-form-urlencoded'},_0x25ee02=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x1e245c[_0x55cbd4(0x186)],'headers':{'Content-Type':_0x1e245c['EDDfQ']},'body':new URLSearchParams({'client_id':_0x75612f})});if(!_0x25ee02['ok']){const _0xeeca9c=await _0x25ee02[_0x55cbd4(0x173)]();throw new Error(_0x55cbd4(0x175)+_0x25ee02['status']+'\x20'+_0xeeca9c);}return _0x25ee02['json']();}export async function pollForTokens(_0x518ae6,_0xe12e11,_0x2882ce,_0x299929){const _0x204ffa=_0x23c67e,_0x52b49b={'rUycE':function(_0xe95ab4,_0x35ce93){return _0xe95ab4+_0x35ce93;},'NeSgu':function(_0x286f8f,_0x3cbc66){return _0x286f8f*_0x3cbc66;},'VySgU':function(_0x498703,_0x450d30){return _0x498703<_0x450d30;},'eELwV':function(_0x1a8406,_0x56dace){return _0x1a8406(_0x56dace);},'NGBFq':function(_0xcb333,_0x33402f,_0x1a390d){return _0xcb333(_0x33402f,_0x1a390d);},'qStOM':_0x204ffa(0x16b),'CpzQP':function(_0x138e89,_0x402116){return _0x138e89===_0x402116;},'Lrxjd':_0x204ffa(0x171),'PRiNy':function(_0x28467e,_0x320a2b){return _0x28467e===_0x320a2b;}},_0x416e58=_0x52b49b[_0x204ffa(0x18f)](Date['now'](),_0x52b49b['NeSgu'](_0x299929,0x3e8));let _0x24b3e7=_0x2882ce*0x3e8;while(_0x52b49b[_0x204ffa(0x179)](Date[_0x204ffa(0x172)](),_0x416e58)){await _0x52b49b['eELwV'](sleep,_0x24b3e7);const _0x30ce3b=await _0x52b49b['NGBFq'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x52b49b['qStOM']},'body':new URLSearchParams({'client_id':_0x518ae6,'device_code':_0xe12e11,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0x30ce3b['ok'])return _0x30ce3b['json']();const _0x4fe024=await _0x30ce3b[_0x204ffa(0x18c)]();if(_0x52b49b[_0x204ffa(0x180)](_0x4fe024['error'],_0x52b49b[_0x204ffa(0x181)]))continue;if(_0x52b49b['PRiNy'](_0x4fe024['error'],'slow_down')){_0x24b3e7+=0x3e8;continue;}throw new Error(_0x4fe024[_0x204ffa(0x167)]||_0x4fe024[_0x204ffa(0x18a)]||_0x204ffa(0x15e));}throw new Error('Device\x20authorization\x20timed\x20out');}async function fetchUserProfile(_0x5396f9){const _0x36f1e2=_0x23c67e,_0x46a4e3={'mpQel':_0x36f1e2(0x195)},_0xf1844c=getApiBaseUrl();try{const _0x3b9878=await fetch(_0xf1844c+'/organization/me',{'method':_0x46a4e3['mpQel'],'headers':{'workos-token':_0x5396f9}});if(_0x3b9878['ok'])return _0x3b9878[_0x36f1e2(0x18c)]();}catch{}return null;}function buildKeyName(_0x36cd69,_0x93237c){const _0x45d4a0=_0x23c67e,_0x31d030=_0x93237c['filter'](_0x23a35f=>_0x23a35f['name']===_0x36cd69||_0x23a35f[_0x45d4a0(0x17e)][_0x45d4a0(0x188)](_0x36cd69+'\x20('));if(_0x31d030['length']===0x0)return _0x36cd69;return _0x36cd69+'\x20('+(_0x31d030['length']+0x1)+')';}function _0x583c(_0x57f0f1,_0x65151f){_0x57f0f1=_0x57f0f1-0x150;const _0xb6f505=_0xb6f5();let _0x583c06=_0xb6f505[_0x57f0f1];return _0x583c06;}export async function provisionApiKey(_0x175d7b){const _0x2afbca=_0x23c67e,_0x4dbf79={'NWEay':function(_0xd795b0){return _0xd795b0();},'jhCDi':'CLI\x20Key','TgPCV':function(_0x1e05e1,_0x433617,_0x15066a){return _0x1e05e1(_0x433617,_0x15066a);}},_0x43e1ee=_0x4dbf79[_0x2afbca(0x15d)](getApiBaseUrl),_0x59f732={'Content-Type':'application/json','workos-token':_0x175d7b},_0x478465=await fetchUserProfile(_0x175d7b),_0x4e8979=_0x478465?.['firstName']||_0x478465?.['email']?.[_0x2afbca(0x177)]('@')[0x0],_0x17867e=_0x4e8979?_0x4e8979+_0x2afbca(0x189):_0x4dbf79['jhCDi'];let _0x357b5d=[];try{const _0xf1f13d=await fetch(_0x43e1ee+'/api-keys',{'method':_0x2afbca(0x195),'headers':_0x59f732});if(_0xf1f13d['ok']){const _0x3ac9d0=await _0xf1f13d[_0x2afbca(0x18c)]();_0x357b5d=_0x3ac9d0[_0x2afbca(0x16a)];}}catch{}const _0x3b0846=_0x4dbf79[_0x2afbca(0x159)](buildKeyName,_0x17867e,_0x357b5d),_0x5c4ae3=await _0x4dbf79[_0x2afbca(0x159)](fetch,_0x43e1ee+'/api-keys',{'method':'POST','headers':_0x59f732,'body':JSON[_0x2afbca(0x17d)]({'name':_0x3b0846,'scope':'mcp:write'})});if(!_0x5c4ae3['ok']){const _0x5ef1c1=await _0x5c4ae3['text']();throw new Error(_0x2afbca(0x156)+_0x5c4ae3[_0x2afbca(0x15f)]+'\x20'+_0x5ef1c1);}const _0x22aa97=await _0x5c4ae3['json']();return _0x22aa97[_0x2afbca(0x164)]['token'];}export function openBrowser(_0x16101d){const _0x46caa1=_0x23c67e,_0x4086f7={'MNibE':function(_0x431030,_0x1f5d61){return _0x431030===_0x1f5d61;},'LSHtE':function(_0x3080ba,_0x5e3bfd){return _0x3080ba===_0x5e3bfd;},'gSkTG':'win32','pXsLN':function(_0x3e8370,_0x5ec3e8){return _0x3e8370(_0x5ec3e8);}},_0xc0a6b6=process['platform'],_0x1a8687=_0x4086f7['MNibE'](_0xc0a6b6,_0x46caa1(0x190))?'open':_0x4086f7['LSHtE'](_0xc0a6b6,_0x4086f7['gSkTG'])?'start':_0x46caa1(0x174);_0x4086f7['pXsLN'](exec,_0x1a8687+'\x20'+JSON['stringify'](_0x16101d));}function decodeJwtPayload(_0x19bc31){const _0x350827=_0x23c67e,_0x48c006={'iFjCc':function(_0x5e7a8e,_0x42a467){return _0x5e7a8e!==_0x42a467;},'uTMIt':'Invalid\x20JWT\x20format','eXtnD':_0x350827(0x169)},_0x21c63b=_0x19bc31[_0x350827(0x177)]('.');if(_0x48c006['iFjCc'](_0x21c63b['length'],0x3))throw new Error(_0x48c006[_0x350827(0x18b)]);const _0xd52c30=Buffer['from'](_0x21c63b[0x1],'base64url')['toString'](_0x48c006[_0x350827(0x193)]);return JSON['parse'](_0xd52c30);}async function selfServeSignup(_0x6ab139){const _0x1cd009=_0x23c67e,_0x47e085={'GNFJG':_0x1cd009(0x16d)},_0x3a6f77=getApiBaseUrl(),_0x2bba20=await fetch(_0x3a6f77+'/organization/self-serve-signup',{'method':'POST','headers':{'Content-Type':_0x47e085[_0x1cd009(0x150)],'workos-token':_0x6ab139}});if(!_0x2bba20['ok']){const _0x2965f7=await _0x2bba20['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x2bba20['status']+'\x20'+_0x2965f7);}return _0x2bba20[_0x1cd009(0x18c)]();}async function fetchMyMemberships(_0x2e1963){const _0x5ad636=_0x23c67e,_0x5c3267={'qPTEL':'GET'},_0x508cb9=getApiBaseUrl(),_0x205b1a=await fetch(_0x508cb9+'/organization/my-memberships',{'method':_0x5c3267[_0x5ad636(0x17a)],'headers':{'workos-token':_0x2e1963}});if(!_0x205b1a['ok']){const _0x5deb51=await _0x205b1a[_0x5ad636(0x173)]();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x205b1a[_0x5ad636(0x15f)]+'\x20'+_0x5deb51);}const _0x183a86=await _0x205b1a['json']();return _0x183a86['memberships'];}async function refreshTokenWithOrg(_0x4caea8,_0x4f057b,_0x138e63){const _0x3f2693=_0x23c67e,_0x34d54b=await fetch(WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x4caea8,'grant_type':'refresh_token','refresh_token':_0x4f057b,'organization_id':_0x138e63})});if(!_0x34d54b['ok']){const _0x112bdc=await _0x34d54b['text']();throw new Error(_0x3f2693(0x163)+_0x34d54b[_0x3f2693(0x15f)]+'\x20'+_0x112bdc);}return _0x34d54b['json']();}export async function runDeviceAuthFlow(){const _0x1508c6=_0x23c67e,_0x43e609={'WIMZY':_0x1508c6(0x166),'oCgML':function(_0x18a74e,_0x3a0d16,_0xaefa1a,_0x15d147,_0x480149){return _0x18a74e(_0x3a0d16,_0xaefa1a,_0x15d147,_0x480149);},'qHQIS':function(_0x4c4980,_0x10de56){return _0x4c4980===_0x10de56;},'jEdLm':function(_0x252706,_0x4ff4df){return _0x252706+_0x4ff4df;},'VPbEC':_0x1508c6(0x17c),'cJeFO':_0x1508c6(0x154),'KXQVW':function(_0x520f98,_0x1d2308,_0x302808,_0x5952e6){return _0x520f98(_0x1d2308,_0x302808,_0x5952e6);},'FrppF':function(_0x18b521,_0xed2f14){return _0x18b521(_0xed2f14);}},_0x2f0773=getCurrentEnvironment(),_0x481b3d=ENVIRONMENT_CONFIGS[_0x2f0773][_0x1508c6(0x15a)],_0x452066=await requestDeviceCode(_0x481b3d);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console[_0x1508c6(0x162)](_0x43e609['WIMZY']),openBrowser(_0x452066[_0x1508c6(0x16f)]),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x452066['verification_uri_complete']),console[_0x1508c6(0x162)]('Code:\x20'+_0x452066[_0x1508c6(0x16e)]+'\x0a'),process[_0x1508c6(0x178)][_0x1508c6(0x187)]('Waiting\x20for\x20authentication...');let _0x5cfd7b=await _0x43e609['oCgML'](pollForTokens,_0x481b3d,_0x452066['device_code'],_0x452066['interval'],_0x452066[_0x1508c6(0x184)]);console['log']('\x20✓');const _0x5aafa7=decodeJwtPayload(_0x5cfd7b['access_token']);if(!_0x5aafa7['org_id']){const _0x1ba5b2=await fetchMyMemberships(_0x5cfd7b[_0x1508c6(0x155)]);let _0x234f27;if(_0x43e609[_0x1508c6(0x192)](_0x1ba5b2['length'],0x0)){process[_0x1508c6(0x178)][_0x1508c6(0x187)](_0x1508c6(0x161));const _0xdc3d7=await selfServeSignup(_0x5cfd7b['access_token']);_0x234f27=_0xdc3d7[_0x1508c6(0x183)],console['log']('\x20✓');}else{if(_0x1ba5b2[_0x1508c6(0x182)]===0x1)_0x234f27=_0x1ba5b2[0x0]['organizationId'],console[_0x1508c6(0x162)](_0x1508c6(0x160)+_0x1ba5b2[0x0][_0x1508c6(0x17e)]);else{const _0x18dde2=process['stdin']['isTTY']&&process[_0x1508c6(0x178)][_0x1508c6(0x191)];if(!_0x18dde2)throw new Error(_0x43e609[_0x1508c6(0x176)](_0x43e609[_0x1508c6(0x15c)],'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'));const {selected:_0x29b8ba}=await _0x296c1f['prompt']([{'type':_0x1508c6(0x152),'name':'selected','message':_0x43e609['cJeFO'],'choices':_0x1ba5b2[_0x1508c6(0x17f)](_0x4c93b1=>({'name':_0x4c93b1[_0x1508c6(0x17e)],'value':_0x4c93b1[_0x1508c6(0x183)]}))}]);_0x234f27=_0x29b8ba;}}_0x5cfd7b=await _0x43e609[_0x1508c6(0x15b)](refreshTokenWithOrg,_0x481b3d,_0x5cfd7b[_0x1508c6(0x16c)],_0x234f27);}process['stdout'][_0x1508c6(0x187)]('Provisioning\x20API\x20key...');const _0x49e7ca=await provisionApiKey(_0x5cfd7b[_0x1508c6(0x155)]);return console['log']('\x20✓'),await storeToken(_0x49e7ca),_0x5cfd7b[_0x1508c6(0x16c)]&&await _0x43e609['FrppF'](storeRefreshToken,_0x5cfd7b['refresh_token']),_0x49e7ca;}function sleep(_0x167d97){return new Promise(_0x49c714=>setTimeout(_0x49c714,_0x167d97));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xd015d=_0x26af;(function(_0x53072c,_0x4a5aff){const _0xd9a222=_0x26af,_0x2e5e7c=_0x53072c();while(!![]){try{const _0x12f714=parseInt(_0xd9a222(0x151))/0x1+-parseInt(_0xd9a222(0x146))/0x2+parseInt(_0xd9a222(0x154))/0x3+-parseInt(_0xd9a222(0x156))/0x4+-parseInt(_0xd9a222(0x14f))/0x5+parseInt(_0xd9a222(0x158))/0x6+parseInt(_0xd9a222(0x159))/0x7;if(_0x12f714===_0x4a5aff)break;else _0x2e5e7c['push'](_0x2e5e7c['shift']());}catch(_0x4f2bd3){_0x2e5e7c['push'](_0x2e5e7c['shift']());}}}(_0x3098,0x908fa));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0xd015d(0x148),'workosClientId':_0xd015d(0x15a),'aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app'},'staging':{'apiBaseUrl':_0xd015d(0x14b),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0xd015d(0x150)},'local':{'apiBaseUrl':_0xd015d(0x152),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0xd015d(0x15b)}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x3130fc){const _0x3f3241=_0xd015d,_0x273275={'jsNWn':'prod','qaZce':function(_0x5ea4f0,_0x2789ac){return _0x5ea4f0===_0x2789ac;}};return _0x3130fc===_0x273275['jsNWn']||_0x3130fc==='staging'||_0x273275[_0x3f3241(0x155)](_0x3130fc,_0x3f3241(0x14c));}export function getCurrentEnvironment(){const _0x3fdd10=_0xd015d,_0x47926c={'oybGH':function(_0x1d005d,_0x34e9dc){return _0x1d005d(_0x34e9dc);}},_0x4ad845=process[_0x3fdd10(0x14d)][_0x3fdd10(0x145)];if(_0x4ad845&&_0x47926c['oybGH'](isValidEnvironment,_0x4ad845))return _0x4ad845;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x56219c={'gsYwt':function(_0x32e4a9){return _0x32e4a9();}};return ENVIRONMENT_CONFIGS[_0x56219c['gsYwt'](getCurrentEnvironment)]['apiBaseUrl'];}export function getAiProxyUrl(){const _0x359494=_0xd015d,_0x2e9d2d={'tWPOk':function(_0x3336f1){return _0x3336f1();}};return ENVIRONMENT_CONFIGS[_0x2e9d2d['tWPOk'](getCurrentEnvironment)][_0x359494(0x153)];}function _0x3098(){const _0x4a0ad0=['http://localhost:8090','RANGER_CLI_ENV','1085944dhKRtL','qQlAQ','https://api.ranger.net','playwright-cli','true','https://api.staging.ranger.net','local','env','RANGER_DISABLE_MCP','3063000sjgBzb','https://ai-proxy-301751771437.us-central1.run.app','522469MwPZtA','http://localhost:8080','aiProxyUrl','1906656sfVRCB','qaZce','3638484PPSbOm','mcp','3277728HpYbFB','6671042NoEHPY','client_01J9CBYM7M5ZETCF7G6614DXR2'];_0x3098=function(){return _0x4a0ad0;};return _0x3098();}export function isMcpDisabled(){const _0x1a0fe5=_0xd015d;return process[_0x1a0fe5(0x14d)][_0x1a0fe5(0x14e)]===_0x1a0fe5(0x14a);}function _0x26af(_0x51a301,_0x849382){_0x51a301=_0x51a301-0x145;const _0x309881=_0x3098();let _0x26af8e=_0x309881[_0x51a301];return _0x26af8e;}export function getVerificationTransport(){const _0x59ff9f=_0xd015d,_0xfb959a={'qQlAQ':function(_0x3d3a7f){return _0x3d3a7f();}};return _0xfb959a[_0x59ff9f(0x147)](isMcpDisabled)?_0x59ff9f(0x149):_0x59ff9f(0x157);}
|