@ranger-testing/ranger-cli 2.1.4 → 2.1.5
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/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/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/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/verifyInBrowser.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x593bbe,_0x295cf3){const _0x5a9757=_0x419c,_0x84bad8=_0x593bbe();while(!![]){try{const _0x4cabfe=parseInt(_0x5a9757(0x9f))/0x1*(-parseInt(_0x5a9757(0x94))/0x2)+-parseInt(_0x5a9757(0xa7))/0x3*(-parseInt(_0x5a9757(0x91))/0x4)+parseInt(_0x5a9757(0x98))/0x5*(-parseInt(_0x5a9757(0x81))/0x6)+-parseInt(_0x5a9757(0x84))/0x7+parseInt(_0x5a9757(0xa5))/0x8+parseInt(_0x5a9757(0x80))/0x9+parseInt(_0x5a9757(0x7e))/0xa;if(_0x4cabfe===_0x295cf3)break;else _0x84bad8['push'](_0x84bad8['shift']());}catch(_0x1bcc96){_0x84bad8['push'](_0x84bad8['shift']());}}}(_0x1ad1,0xb19d9));function _0x1ad1(){const _0x45f0d5=['catch','OVdQX','5YvfdLp','settings.json','close','trackPhaseStart','FznJp','cBvhQ','7336072BZwbQV','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','2687730qoCzPa','gvtwr','QWMFU','pBuxH','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','log','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','isTTY','baseUrl','JYPXk','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\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','stdout','6291990MvhKmd','zfHMU','5236488jGZBGU','12qnBChe','✓\x20Auth\x20state\x20saved\x20to:\x20','✓\x20Updated\x20config:\x20','94605drJLGL','iAbeR','trackPhaseEnd','Gwfsl','sybSy','BRgUV','newPage','Profile\x20\x22','yzKzb','Config\x20not\x20found\x20at\x20','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','storageState','\x0a✅\x20Profile\x20\x22','4hXXrAi','browser','Osptq','460124pERxHF','stringify','string','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','2831530joLIWT','browser_auth','OzCVX','utf-8','\x22\x20authentication\x20updated'];_0x1ad1=function(){return _0x45f0d5;};return _0x1ad1();}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{getEnvDir,isEnvCi}from'./utils/settings.js';function _0x419c(_0x545b53,_0x93597c){_0x545b53=_0x545b53-0x78;const _0x1ad1b1=_0x1ad1();let _0x419cef=_0x1ad1b1[_0x545b53];return _0x419cef;}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x112307,_0x321e2d){const _0x135acd=_0x419c,_0x5cae73={'wAezJ':_0x135acd(0xa1),'OVdQX':function(_0x1b215b,_0x601007){return _0x1b215b(_0x601007);},'iAbeR':function(_0x2f1be8,_0x3b5fe0,_0x1a9a87){return _0x2f1be8(_0x3b5fe0,_0x1a9a87);},'zfHMU':'auth.json','BRgUV':_0x135acd(0x96),'OzCVX':function(_0x1c8910,_0x8d324d){return _0x1c8910(_0x8d324d);},'sybSy':_0x135acd(0xad),'pNuLv':_0x135acd(0xab),'QWMFU':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','yzKzb':function(_0xfc6632,_0x4d12cc){return _0xfc6632||_0x4d12cc;},'FznJp':'about:blank','cBvhQ':_0x135acd(0x9b),'yCoQy':function(_0x45c23a,_0x509838,_0x1f5546){return _0x45c23a(_0x509838,_0x1f5546);},'JYPXk':function(_0x2e0c3f,_0x2b4b9a){return _0x2e0c3f(_0x2b4b9a);},'Gwfsl':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','pBuxH':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'},_0xe010dd=_0x5cae73[_0x135acd(0x9e)](getEnvDir,_0x112307),_0x3d7ffd=_0x5cae73['iAbeR'](join,_0xe010dd,_0x135acd(0xa0)),_0xe820d5=_0x5cae73[_0x135acd(0x85)](join,_0xe010dd,_0x5cae73[_0x135acd(0x7f)]),_0x3f5e50=_0xe820d5+'.enc',_0x1b2e4f=process['stdin']['isTTY']&&process[_0x135acd(0x7d)][_0x135acd(0x78)];if(!_0x1b2e4f)throw new Error(_0x135acd(0x7b));if(!_0x5cae73['OVdQX'](existsSync,_0xe010dd))throw new Error(_0x135acd(0x8b)+_0x112307+_0x135acd(0xa6)+_0x112307);if(!_0x5cae73[_0x135acd(0x9e)](existsSync,_0x3d7ffd))throw new Error(_0x135acd(0x8d)+_0x3d7ffd+_0x135acd(0x8e)+_0x112307);const _0x26fbe1=await _0x5cae73[_0x135acd(0x85)](readFile,_0x3d7ffd,'utf-8'),_0x17d820=JSON['parse'](_0x26fbe1),_0x1a2b14=typeof _0x17d820['baseUrl']===_0x5cae73[_0x135acd(0x89)]?_0x17d820[_0x135acd(0x79)]:undefined,_0x502745=existsSync(_0xe820d5),_0x453391=_0x5cae73[_0x135acd(0x9a)](isEnvCi,_0x112307);_0x321e2d?.[_0x135acd(0xa2)](_0x135acd(0x99)),console['log']('\x0a📋\x20Authentication\x20Update'),console['log'](_0x5cae73[_0x135acd(0x88)]),console[_0x135acd(0xac)](_0x5cae73['pNuLv']),console['log'](_0x5cae73[_0x135acd(0xa9)]);const _0x1d976c=await chromium['launch']({'headless':![]}),_0xe525a6=_0x502745?{'storageState':_0xe820d5}:{};let _0x54203a=null;try{_0x54203a=await _0x1d976c['newContext'](_0xe525a6),await _0x5cae73[_0x135acd(0x9e)](addProfileSetupBanner,_0x54203a);const _0x20f003=await _0x54203a[_0x135acd(0x8a)]();await _0x20f003['goto'](_0x5cae73[_0x135acd(0x8c)](_0x1a2b14,_0x5cae73[_0x135acd(0xa3)])),await new Promise(_0x3ad0ef=>{const _0x314539={'Osptq':'Saving\x20authentication\x20state...','gvtwr':function(_0x289ee6){return _0x289ee6();}};_0x20f003['on'](_0x5cae73['wAezJ'],async()=>{const _0x579f4e=_0x419c;try{console['log'](_0x314539[_0x579f4e(0x93)]),await _0x54203a?.[_0x579f4e(0x8f)]({'path':_0xe820d5}),_0x3ad0ef();}catch{_0x314539[_0x579f4e(0xa8)](_0x3ad0ef);}});});}finally{_0x54203a&&await _0x54203a[_0x135acd(0xa1)]()[_0x135acd(0x9d)](()=>{}),await _0x1d976c['close']()['catch'](()=>{});}if(_0x453391){const _0x5c3bf6=await readFile(_0xe820d5,_0x5cae73[_0x135acd(0xa4)]),_0x4c3706=await getToken();if(!_0x4c3706)console['error'](_0x135acd(0x7c)),console[_0x135acd(0xac)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0xe820d5);else{const _0x1dc696=_0x5cae73['yCoQy'](encrypt,_0x5c3bf6,_0x4c3706);await writeFile(_0x3f5e50,_0x1dc696),await _0x5cae73[_0x135acd(0x7a)](unlink,_0xe820d5),console['log'](_0x135acd(0x97)+_0x3f5e50),console['log'](_0x5cae73[_0x135acd(0x87)]),console[_0x135acd(0xac)](_0x5cae73[_0x135acd(0xaa)]);}}else console[_0x135acd(0xac)](_0x135acd(0x82)+_0xe820d5);_0x321e2d?.['trackPhaseEnd'](_0x135acd(0x99)),_0x321e2d?.['trackPhaseStart']('config_write'),_0x17d820['browser']=_0x17d820[_0x135acd(0x92)]||{},_0x17d820[_0x135acd(0x92)]['contextOptions']=_0x17d820[_0x135acd(0x92)]['contextOptions']||{},_0x17d820['browser']['contextOptions'][_0x135acd(0x8f)]=_0xe820d5,await _0x5cae73[_0x135acd(0x85)](writeFile,_0x3d7ffd,JSON[_0x135acd(0x95)](_0x17d820,null,0x2)),console[_0x135acd(0xac)](_0x135acd(0x83)+_0x3d7ffd),_0x321e2d?.[_0x135acd(0x86)]('config_write'),console['log'](_0x135acd(0x90)+_0x112307+_0x135acd(0x9c));}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x31a1(_0x340d97,_0x5b688d){_0x340d97=_0x340d97-0x1be;const _0x3e4b7c=_0x3e4b();let _0x31a1d5=_0x3e4b7c[_0x340d97];return _0x31a1d5;}(function(_0x1e58aa,_0x2becb9){const _0x242e1c=_0x31a1,_0x3a968b=_0x1e58aa();while(!![]){try{const _0x18d150=-parseInt(_0x242e1c(0x1be))/0x1*(parseInt(_0x242e1c(0x1c6))/0x2)+parseInt(_0x242e1c(0x1c7))/0x3+-parseInt(_0x242e1c(0x1c3))/0x4*(-parseInt(_0x242e1c(0x1c2))/0x5)+-parseInt(_0x242e1c(0x1bf))/0x6+-parseInt(_0x242e1c(0x1c0))/0x7+parseInt(_0x242e1c(0x1c8))/0x8*(-parseInt(_0x242e1c(0x1c9))/0x9)+parseInt(_0x242e1c(0x1c5))/0xa;if(_0x18d150===_0x2becb9)break;else _0x3a968b['push'](_0x3a968b['shift']());}catch(_0x4bdee8){_0x3a968b['push'](_0x3a968b['shift']());}}}(_0x3e4b,0x93bc9));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0x3e4b(){const _0x3b3ea3=['settings.json','1537mODSiZ','5003664IwraNH','3905300IRpyji','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','5fylFxe','2091108xLTIyR','ChsAR','21790470jayOIx','76EIYkra','465822RCHDlD','6413752RHowpA','9wCqAYB'];_0x3e4b=function(){return _0x3b3ea3;};return _0x3e4b();}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x2c2085){const _0x5c2d13=_0x31a1,_0x530acb={'zhzCk':function(_0x4d37f2,_0x3eb70f,_0x3feb58){return _0x4d37f2(_0x3eb70f,_0x3feb58);},'HDyKp':_0x5c2d13(0x1ca),'fgyYj':function(_0x5e1a05,_0x132bfa){return _0x5e1a05(_0x132bfa);},'ChsAR':function(_0x3ca8e2,_0x39865e){return _0x3ca8e2(_0x39865e);}},_0x25affe=getEnvDir(_0x2c2085),_0x6fc07e=_0x530acb['zhzCk'](join,_0x25affe,_0x530acb['HDyKp']);if(!_0x530acb['fgyYj'](existsSync,_0x25affe))throw new Error('Profile\x20\x22'+_0x2c2085+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2c2085);if(!_0x530acb[_0x5c2d13(0x1c4)](existsSync,_0x6fc07e))throw new Error('Config\x20not\x20found\x20at\x20'+_0x6fc07e+_0x5c2d13(0x1c1)+_0x2c2085);await writeActiveProfileName(_0x2c2085),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2c2085+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x7b20df=_0x1bab;(function(_0x26b74f,_0x2b758d){const _0x2cdcb5=_0x1bab,_0x5072d9=_0x26b74f();while(!![]){try{const _0x8c1fb4=parseInt(_0x2cdcb5(0xbe))/0x1+-parseInt(_0x2cdcb5(0xac))/0x2*(parseInt(_0x2cdcb5(0xba))/0x3)+parseInt(_0x2cdcb5(0xae))/0x4*(parseInt(_0x2cdcb5(0xb8))/0x5)+parseInt(_0x2cdcb5(0xbb))/0x6*(parseInt(_0x2cdcb5(0xad))/0x7)+-parseInt(_0x2cdcb5(0xab))/0x8+parseInt(_0x2cdcb5(0xb4))/0x9+-parseInt(_0x2cdcb5(0xbd))/0xa*(-parseInt(_0x2cdcb5(0xb6))/0xb);if(_0x8c1fb4===_0x2b758d)break;else _0x5072d9['push'](_0x5072d9['shift']());}catch(_0x1a8436){_0x5072d9['push'](_0x5072d9['shift']());}}}(_0x3896,0xf3379));import{existsSync}from'fs';function _0x3896(){const _0x1076a7=['DNPBz','11EPfyZZ','vgQGH','185OlThFg','SydnG','2084463xPQPCg','6228SSiINH','active-profile.txt','2840590qDwrNF','933114qJEOqM','trim','Ibwfr','15557992oUQiEW','4XmpCSL','7028XKZTah','16444hUfGkJ','utf-8','ljIap','DhKcI','WLNIS','faeBX','17272584gWNFJO'];_0x3896=function(){return _0x1076a7;};return _0x3896();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x1bab(_0xce809c,_0x57be00){_0xce809c=_0xce809c-0xaa;const _0x3896fe=_0x3896();let _0x1bab5e=_0x3896fe[_0xce809c];return _0x1bab5e;}import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x7b20df(0xbc),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x2479e2=_0x7b20df,_0x3f43d5={'WLNIS':function(_0x234b84,_0x2e3d6b,_0x562927){return _0x234b84(_0x2e3d6b,_0x562927);}};return _0x3f43d5[_0x2479e2(0xb2)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0xb9099=_0x7b20df,_0x4ce2d1={'ljIap':function(_0x70d531,_0x516c5d,_0x813132){return _0x70d531(_0x516c5d,_0x813132);},'HZBLB':function(_0x5f1a04){return _0x5f1a04();}};return _0x4ce2d1[_0xb9099(0xb0)](join,_0x4ce2d1['HZBLB'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x3ef962=_0x7b20df,_0x1343aa={'aYxVp':'utf-8','faeBX':function(_0x6516d8){return _0x6516d8();},'DhKcI':function(_0x39293c,_0x45b401,_0x1f6d89){return _0x39293c(_0x45b401,_0x1f6d89);}},_0x9f5579=getLegacyActiveEnvPath();if(!existsSync(_0x9f5579))return null;let _0x16b642=null;try{_0x16b642=(await readFile(_0x9f5579,_0x1343aa['aYxVp']))[_0x3ef962(0xbf)]()||null;}catch{_0x16b642=null;}if(!_0x16b642)return null;const _0x5ee4e2=_0x1343aa[_0x3ef962(0xb3)](getActiveProfilePath);try{await rename(_0x9f5579,_0x5ee4e2);}catch{try{const _0x38198b=getRangerDir();await _0x1343aa[_0x3ef962(0xb1)](mkdir,_0x38198b,{'recursive':!![]}),await writeFile(_0x5ee4e2,_0x16b642,_0x1343aa['aYxVp']),await unlink(_0x9f5579);}catch{}}return _0x16b642;}export async function readActiveProfileName(){const _0x323734=_0x7b20df,_0x35628c={'bOIuy':function(_0x533274){return _0x533274();},'tKtEN':function(_0x33cb3c,_0xa42ab7,_0x1c5a8e){return _0x33cb3c(_0xa42ab7,_0x1c5a8e);}},_0xfdacc0=_0x35628c['bOIuy'](getActiveProfilePath);if(existsSync(_0xfdacc0))try{return(await _0x35628c['tKtEN'](readFile,_0xfdacc0,_0x323734(0xaf)))['trim']()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x357d1a){const _0x3e4952=_0x7b20df,_0x49bee3={'vgQGH':function(_0x159c47){return _0x159c47();},'Ibwfr':function(_0x1d074c,_0x19c8e9,_0x2f58af){return _0x1d074c(_0x19c8e9,_0x2f58af);},'SydnG':function(_0x543d2c,_0x1a49cd,_0x409145,_0x55a1fb){return _0x543d2c(_0x1a49cd,_0x409145,_0x55a1fb);},'DNPBz':function(_0x142b27,_0x185bf5){return _0x142b27(_0x185bf5);}},_0x33769d=_0x49bee3[_0x3e4952(0xb7)](getRangerDir);await _0x49bee3[_0x3e4952(0xaa)](mkdir,_0x33769d,{'recursive':!![]});const _0x3a3c33=_0x49bee3[_0x3e4952(0xb7)](getActiveProfilePath);await _0x49bee3[_0x3e4952(0xb9)](writeFile,_0x3a3c33,_0x357d1a,'utf-8');const _0x46dda6=getLegacyActiveEnvPath();if(_0x49bee3[_0x3e4952(0xb5)](existsSync,_0x46dda6))try{await unlink(_0x46dda6);}catch{}}export async function migrateActiveProfileFile(){const _0x1d4947={'fyJIg':function(_0x4e8e27){return _0x4e8e27();}},_0x22244b=await _0x1d4947['fyJIg'](migrateLegacyActiveEnv);return _0x22244b!==null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xe09270,_0x267107){const _0x7363e8=_0x5bc8,_0xbd9183=_0xe09270();while(!![]){try{const _0x20d288=parseInt(_0x7363e8(0x1c9))/0x1*(-parseInt(_0x7363e8(0x1b0))/0x2)+parseInt(_0x7363e8(0x19e))/0x3+parseInt(_0x7363e8(0x1ad))/0x4+-parseInt(_0x7363e8(0x1de))/0x5+parseInt(_0x7363e8(0x19c))/0x6+parseInt(_0x7363e8(0x1ef))/0x7*(parseInt(_0x7363e8(0x1fb))/0x8)+-parseInt(_0x7363e8(0x203))/0x9*(parseInt(_0x7363e8(0x1d2))/0xa);if(_0x20d288===_0x267107)break;else _0xbd9183['push'](_0xbd9183['shift']());}catch(_0x4d686d){_0xbd9183['push'](_0xbd9183['shift']());}}}(_0x16b6,0x262ea));const _0x5a3068=(function(){let _0x2a24d5=!![];return function(_0x9f5088,_0x2e48cb){const _0x205469=_0x2a24d5?function(){const _0x16ba87=_0x5bc8;if(_0x2e48cb){const _0x23b2ff=_0x2e48cb[_0x16ba87(0x1d5)](_0x9f5088,arguments);return _0x2e48cb=null,_0x23b2ff;}}:function(){};return _0x2a24d5=![],_0x205469;};}()),_0x5bd3db=_0x5a3068(this,function(){const _0x154ebf=_0x5bc8,_0x1d44ee={'MhoVP':_0x154ebf(0x1f7)};return _0x5bd3db[_0x154ebf(0x1e1)]()[_0x154ebf(0x1ac)](_0x154ebf(0x1f7))[_0x154ebf(0x1e1)]()[_0x154ebf(0x1a3)](_0x5bd3db)[_0x154ebf(0x1ac)](_0x1d44ee[_0x154ebf(0x191)]);});_0x5bd3db();function _0x5bc8(_0x4e8c3a,_0x536f98){_0x4e8c3a=_0x4e8c3a-0x191;const _0x2e19bf=_0x16b6();let _0x5bd3db=_0x2e19bf[_0x4e8c3a];if(_0x5bc8['ApautN']===undefined){var _0x5a3068=function(_0x478f61){const _0x2405c1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49f900='',_0x171225='',_0x1d8b67=_0x49f900+_0x5a3068;for(let _0x19f4f1=0x0,_0x62d197,_0x21c861,_0x10f6e3=0x0;_0x21c861=_0x478f61['charAt'](_0x10f6e3++);~_0x21c861&&(_0x62d197=_0x19f4f1%0x4?_0x62d197*0x40+_0x21c861:_0x21c861,_0x19f4f1++%0x4)?_0x49f900+=_0x1d8b67['charCodeAt'](_0x10f6e3+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x62d197>>(-0x2*_0x19f4f1&0x6)):_0x19f4f1:0x0){_0x21c861=_0x2405c1['indexOf'](_0x21c861);}for(let _0x234a1f=0x0,_0x380e4e=_0x49f900['length'];_0x234a1f<_0x380e4e;_0x234a1f++){_0x171225+='%'+('00'+_0x49f900['charCodeAt'](_0x234a1f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x171225);};_0x5bc8['rGLxLR']=_0x5a3068,_0x5bc8['gwvVRx']={},_0x5bc8['ApautN']=!![];}const _0x16b617=_0x2e19bf[0x0],_0x5bc8f7=_0x4e8c3a+_0x16b617,_0x33adbb=_0x5bc8['gwvVRx'][_0x5bc8f7];if(!_0x33adbb){const _0x14e069=function(_0x437c4e){this['svdLdq']=_0x437c4e,this['YLwXcP']=[0x1,0x0,0x0],this['LMjTWr']=function(){return'newState';},this['caVQni']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['caZSPy']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x14e069['prototype']['dCVytA']=function(){const _0x115522=new RegExp(this['caVQni']+this['caZSPy']),_0x20367d=_0x115522['test'](this['LMjTWr']['toString']())?--this['YLwXcP'][0x1]:--this['YLwXcP'][0x0];return this['KATQED'](_0x20367d);},_0x14e069['prototype']['KATQED']=function(_0x7c5268){if(!Boolean(~_0x7c5268))return _0x7c5268;return this['NLFqPF'](this['svdLdq']);},_0x14e069['prototype']['NLFqPF']=function(_0x29032f){for(let _0x2b49c9=0x0,_0x94c755=this['YLwXcP']['length'];_0x2b49c9<_0x94c755;_0x2b49c9++){this['YLwXcP']['push'](Math['round'](Math['random']())),_0x94c755=this['YLwXcP']['length'];}return _0x29032f(this['YLwXcP'][0x0]);},new _0x14e069(_0x5bc8)['dCVytA'](),_0x5bd3db=_0x5bc8['rGLxLR'](_0x5bd3db),_0x5bc8['gwvVRx'][_0x5bc8f7]=_0x5bd3db;}else _0x5bd3db=_0x33adbb;return _0x5bd3db;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x344d30){const _0x87ab92=_0x5bc8,_0x49173c={'JCThX':_0x87ab92(0x1a1),'olPvJ':function(_0x4a4d93,_0x37c799){return _0x4a4d93===_0x37c799;},'SzNQy':'FNDYf','CXyDl':function(_0x1c3dad){return _0x1c3dad();},'UZisS':function(_0x2fc3d3,_0x4a5bb5,_0x3259e9){return _0x2fc3d3(_0x4a5bb5,_0x3259e9);},'vOLtj':_0x87ab92(0x195),'nxvvV':_0x87ab92(0x1c3),'wJpcP':function(_0x1d158c,_0x58e5e3){return _0x1d158c!==_0x58e5e3;},'BmGCI':_0x87ab92(0x1cb)},_0x535e0b=await getToken();if(!_0x535e0b){if(_0x49173c[_0x87ab92(0x1fd)](_0x49173c[_0x87ab92(0x197)],_0x87ab92(0x1ee)))throw new _0x35ee7b(_0x49173c[_0x87ab92(0x1b6)]);else throw new Error(_0x87ab92(0x1a1));}const _0x189843=_0x49173c['CXyDl'](getApiBaseUrl),_0x160202=await _0x49173c['UZisS'](fetch,_0x189843+_0x87ab92(0x1ca),{'method':_0x49173c['vOLtj'],'headers':{'Authorization':_0x87ab92(0x204)+_0x535e0b,'Content-Type':_0x49173c[_0x87ab92(0x1fe)]},'body':JSON['stringify']({'environmentName':_0x344d30?.[_0x87ab92(0x1b4)],'settings':_0x344d30?.['settings'],'task':_0x344d30?.['task'],'url':_0x344d30?.[_0x87ab92(0x1b7)],'featureId':_0x344d30?.[_0x87ab92(0x1cf)],'checklistItemId':_0x344d30?.[_0x87ab92(0x202)]})});if(!_0x160202['ok']){if(_0x49173c[_0x87ab92(0x1df)](_0x49173c['BmGCI'],'QtEMx'))throw new _0x5d4b39(_0x87ab92(0x1a1));else{const _0x36034a=await _0x160202[_0x87ab92(0x1f0)]();throw new Error(_0x87ab92(0x1cc)+_0x36034a);}}return _0x160202[_0x87ab92(0x1ed)]();}export async function updateBrowserSession(_0x3dda1b,_0x1c73e0){const _0x3197e4=_0x5bc8,_0x51d9d3={'FzrkX':function(_0x33a2ca,_0x1f8758,_0x235de4,_0x306700){return _0x33a2ca(_0x1f8758,_0x235de4,_0x306700);},'vfWIp':function(_0x76178c,_0xb88be8,_0x12c9a1,_0x41817e){return _0x76178c(_0xb88be8,_0x12c9a1,_0x41817e);},'XjLho':_0x3197e4(0x1d0),'JlKVV':function(_0x41203b,_0xe34529){return _0x41203b===_0xe34529;},'KeopA':_0x3197e4(0x19b),'ABYhi':function(_0x221b4c){return _0x221b4c();},'Ieott':function(_0x5abb53,_0x42b986,_0x1df732){return _0x5abb53(_0x42b986,_0x1df732);},'tGZVS':_0x3197e4(0x1d7),'wnfnQ':'application/json','zvOGC':function(_0x3401ef,_0xf4f15){return _0x3401ef!==_0xf4f15;},'BXyTB':_0x3197e4(0x1fc),'rVvJh':_0x3197e4(0x1f5),'OoBah':function(_0x1a933f,_0x5252e5,_0x2bc0a8){return _0x1a933f(_0x5252e5,_0x2bc0a8);},'ofiAN':'updateBrowserSession'};return _0x51d9d3[_0x3197e4(0x1d6)](withRetry,async()=>{const _0x14f043=_0x3197e4,_0x42674e={'FSFUX':function(_0x461535,_0x152918,_0x19eeb3,_0x1ecbcc){const _0x37512b=_0x5bc8;return _0x51d9d3[_0x37512b(0x1f2)](_0x461535,_0x152918,_0x19eeb3,_0x1ecbcc);},'XxLyD':function(_0xe36224,_0xc79ff,_0x21ebbb,_0x1ebacd){const _0x3789e8=_0x5bc8;return _0x51d9d3[_0x3789e8(0x1f4)](_0xe36224,_0xc79ff,_0x21ebbb,_0x1ebacd);},'pWKlQ':_0x51d9d3[_0x14f043(0x1dd)]};if(_0x51d9d3[_0x14f043(0x1c4)](_0x51d9d3[_0x14f043(0x1d3)],_0x51d9d3[_0x14f043(0x1d3)])){const _0x3fa01f=await _0x51d9d3[_0x14f043(0x1d8)](getToken);if(!_0x3fa01f)throw new Error(_0x14f043(0x1a1));const _0x32d06d=_0x51d9d3['ABYhi'](getApiBaseUrl),_0x5c5b97=await _0x51d9d3[_0x14f043(0x1c2)](fetch,_0x32d06d+_0x14f043(0x1bd)+_0x3dda1b,{'method':_0x51d9d3['tGZVS'],'headers':{'Authorization':_0x14f043(0x204)+_0x3fa01f,'Content-Type':_0x51d9d3['wnfnQ']},'body':JSON[_0x14f043(0x1b8)](_0x1c73e0)});if(!_0x5c5b97['ok']){if(_0x51d9d3[_0x14f043(0x1ce)](_0x51d9d3[_0x14f043(0x192)],_0x51d9d3[_0x14f043(0x1ff)])){const _0x463664=await _0x5c5b97[_0x14f043(0x1f0)]();throw new Error(_0x14f043(0x1a7)+_0x463664);}else return _0x42674e['FSFUX'](_0xc17028,_0x2f2b7e,_0x26f4fa,_0x14f043(0x1c5));}return _0x5c5b97[_0x14f043(0x1ed)]();}else return _0x42674e[_0x14f043(0x1dc)](_0x1dd55f,_0x2e9b18,_0x2fa9f2,_0x42674e[_0x14f043(0x1e6)]);},{'label':_0x51d9d3[_0x3197e4(0x1d4)]});}export async function getBrowserSession(_0x4db1da){const _0x401a4d=_0x5bc8,_0x5a7007={'BaLJe':function(_0x50f340,_0x35ae60){return _0x50f340(_0x35ae60);},'bVymg':_0x401a4d(0x1b3),'OzXEa':'base64','kqGqD':function(_0x33ed1a,_0x272b39){return _0x33ed1a===_0x272b39;},'OzWCL':'jdXzY','eVbPu':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','WSyQw':function(_0x21242c){return _0x21242c();},'fEoMg':function(_0x5cf24f,_0x18e218,_0x3bc7ba){return _0x5cf24f(_0x18e218,_0x3bc7ba);},'LkFwL':function(_0x5acfee,_0x46260f){return _0x5acfee!==_0x46260f;},'zdhww':'kCljO'},_0x43f9fa=await getToken();if(!_0x43f9fa){if(_0x5a7007[_0x401a4d(0x1db)](_0x401a4d(0x1eb),_0x5a7007['OzWCL']))return _0x5a7007[_0x401a4d(0x1e4)](_0x26db6c,_0x5a7007[_0x401a4d(0x1aa)])[_0x401a4d(0x200)](_0x145caf)[_0x401a4d(0x1e8)](_0x5a7007[_0x401a4d(0x1b9)]);else throw new Error(_0x5a7007[_0x401a4d(0x1c8)]);}const _0x4d46b9=_0x5a7007[_0x401a4d(0x1ab)](getApiBaseUrl),_0x19f852=await _0x5a7007[_0x401a4d(0x199)](fetch,_0x4d46b9+'/api/v1/mcp/browser-sessions/'+_0x4db1da,{'method':_0x401a4d(0x1a9),'headers':{'Authorization':_0x401a4d(0x204)+_0x43f9fa}});if(!_0x19f852['ok']){if(_0x5a7007['LkFwL'](_0x5a7007['zdhww'],'tpaea')){const _0x3b63d8=await _0x19f852[_0x401a4d(0x1f0)]();throw new Error(_0x401a4d(0x198)+_0x3b63d8);}else throw new _0x19943d(_0x401a4d(0x1a1));}return _0x19f852[_0x401a4d(0x1ed)]();}export async function getUploadUrls(_0x3f4be8,_0x4d7277,_0x455750,_0x5c0de5){const _0x3f58f6=_0x5bc8,_0x4bb125={'wiatF':function(_0x52ef58,_0x5c7202,_0x30a016,_0x523343){return _0x52ef58(_0x5c7202,_0x30a016,_0x523343);},'gXBPo':_0x3f58f6(0x1c0),'dbpnN':function(_0x4a0926){return _0x4a0926();},'ERjNQ':function(_0x414280,_0x92545a){return _0x414280!==_0x92545a;},'eyqxq':'xXZcJ','eqWRo':'uHBaJ','HTEEt':_0x3f58f6(0x1a1),'IGPSk':function(_0x43ecd5){return _0x43ecd5();},'guKFR':function(_0x1324e4,_0x14008d,_0x19f04d){return _0x1324e4(_0x14008d,_0x19f04d);},'AmbpM':'POST','hLCWx':function(_0x5e92ae,_0x25d6f6){return _0x5e92ae!==_0x25d6f6;}},_0x431eff=await _0x4bb125[_0x3f58f6(0x1b5)](getToken);if(!_0x431eff){if(_0x4bb125[_0x3f58f6(0x1e3)](_0x4bb125[_0x3f58f6(0x1c7)],_0x4bb125['eqWRo']))throw new Error(_0x4bb125['HTEEt']);else return _0x4bb125['wiatF'](_0x3c0381,_0x10e734,_0x3f0588,_0x4bb125['gXBPo']);}const _0xfb38b=_0x4bb125[_0x3f58f6(0x1a4)](getApiBaseUrl),_0x15ad54=await _0x4bb125[_0x3f58f6(0x1ea)](fetch,_0xfb38b+_0x3f58f6(0x1bd)+_0x3f4be8+_0x3f58f6(0x1a0),{'method':_0x4bb125[_0x3f58f6(0x1e0)],'headers':{'Authorization':'Bearer\x20'+_0x431eff,'Content-Type':_0x3f58f6(0x1c3)},'body':JSON['stringify']({'filename':_0x4d7277,'filetype':_0x455750,..._0x4bb125['hLCWx'](_0x5c0de5?.['size'],undefined)&&{'size':_0x5c0de5[_0x3f58f6(0x1a6)]},..._0x4bb125[_0x3f58f6(0x1e3)](_0x5c0de5?.['checksum'],undefined)&&{'checksum':_0x5c0de5[_0x3f58f6(0x196)]},..._0x5c0de5?.[_0x3f58f6(0x1f6)]!==undefined&&{'metadata':_0x5c0de5[_0x3f58f6(0x1f6)]}})});if(!_0x15ad54['ok']){const _0x4d34c2=await _0x15ad54[_0x3f58f6(0x1f0)]();throw new Error(_0x3f58f6(0x1f8)+_0x4d34c2);}return _0x15ad54['json']();}export async function uploadFile(_0x4e80bf,_0x8d12ef,_0x74af87){const _0x57d72a=_0x5bc8,_0x178cfb={'pEXjo':'PUT'},_0x5e1360=await fetch(_0x4e80bf,{'method':_0x178cfb[_0x57d72a(0x205)],'headers':{'Content-Type':_0x74af87,'Content-Length':_0x8d12ef[_0x57d72a(0x1b1)][_0x57d72a(0x1e1)]()},'body':_0x8d12ef});if(!_0x5e1360['ok']){const _0x1584db=await _0x5e1360[_0x57d72a(0x1f0)]();throw new Error(_0x57d72a(0x1ba)+_0x1584db);}}export async function uploadTrace(_0x4c7a52,_0x5e0c68){const _0x5498bf=_0x5bc8,_0x290598={'tmOvG':function(_0x2fade8,_0x18ea31,_0x24427c,_0x17a455){return _0x2fade8(_0x18ea31,_0x24427c,_0x17a455);},'tfAWi':_0x5498bf(0x1d0)};return _0x290598['tmOvG'](uploadFile,_0x4c7a52,_0x5e0c68,_0x290598[_0x5498bf(0x1bf)]);}export async function uploadConversation(_0x2a6ac4,_0x684ea){const _0x26ced6=_0x5bc8,_0x3dab67={'qiphg':function(_0x5f4d7d,_0x5e2efa,_0x2211fa,_0x40f1f3){return _0x5f4d7d(_0x5e2efa,_0x2211fa,_0x40f1f3);},'VuYzK':_0x26ced6(0x201)};return _0x3dab67[_0x26ced6(0x1b2)](uploadFile,_0x2a6ac4,_0x684ea,_0x3dab67[_0x26ced6(0x19d)]);}export async function uploadScreenshot(_0x2a1f47,_0x1fc45f){const _0x394c0d=_0x5bc8,_0x2165bd={'guyxE':_0x394c0d(0x1c0)};return uploadFile(_0x2a1f47,_0x1fc45f,_0x2165bd[_0x394c0d(0x1bc)]);}export async function uploadVideo(_0x2a6253,_0x4559a0){const _0xe6e701=_0x5bc8,_0x35f3ec={'LNqYH':function(_0x267d54,_0x54d731,_0x54b991,_0x1fb77c){return _0x267d54(_0x54d731,_0x54b991,_0x1fb77c);},'kxrGG':_0xe6e701(0x1c5)};return _0x35f3ec['LNqYH'](uploadFile,_0x2a6253,_0x4559a0,_0x35f3ec['kxrGG']);}export function buildTraceViewerUrl(_0x2f616f){const _0x4ccc75=_0x5bc8,_0xcdb0a6={'VOUem':function(_0x250450,_0x304e33){return _0x250450(_0x304e33);}},_0xab7e13=_0xcdb0a6['VOUem'](encodeURIComponent,_0x2f616f);return _0x4ccc75(0x1da)+_0xab7e13;}export async function getProxySessionToken(){const _0x2141c5=_0x5bc8,_0x1e364f={'LJSSc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','mujft':function(_0x189ec7,_0x139ae7){return _0x189ec7===_0x139ae7;},'WXuvM':_0x2141c5(0x1d1),'aMzgH':function(_0x33ce87){return _0x33ce87();},'gFKUk':function(_0x1def9f,_0xcbe74a,_0x5dc2e4){return _0x1def9f(_0xcbe74a,_0x5dc2e4);}},_0x39fd58=await getToken();if(!_0x39fd58){if(_0x1e364f[_0x2141c5(0x1e7)](_0x1e364f[_0x2141c5(0x1f1)],_0x1e364f[_0x2141c5(0x1f1)]))throw new Error(_0x1e364f[_0x2141c5(0x1a5)]);else throw new _0xbdff8(_0x1e364f[_0x2141c5(0x1a5)]);}const _0x4526ee=_0x1e364f[_0x2141c5(0x1c1)](getApiBaseUrl),_0x2d0f20=await _0x1e364f[_0x2141c5(0x1cd)](fetch,_0x4526ee+_0x2141c5(0x1e5),{'method':_0x2141c5(0x195),'headers':{'Authorization':_0x2141c5(0x204)+_0x39fd58}});if(!_0x2d0f20['ok']){const _0x24bfa5=await _0x2d0f20[_0x2141c5(0x1f0)]();throw new Error(_0x2141c5(0x194)+_0x24bfa5);}const _0x42db3e=await _0x2d0f20[_0x2141c5(0x1ed)]();return _0x42db3e[_0x2141c5(0x193)];}function _0x16b6(){const _0x253693=['y2HLy2TSAxn0sxrLBuLK','nde0Bez1v2DI','qMvHCMvYia','CevyAM8','twHVvLa','qLH5vei','C2vZC2LVBLrVA2vU','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','ue9tva','y2HLy2TZDw0','u3PouxK','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','zKvVtwC','yMfZzty0','uuXNywq','mte4ote3mfr2C0vJuG','vNvzEKS','nZyYodKXCe1tDwfP','whrrvvK','l3vWBg9Hzc11CMXZ','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','y29UC3rYDwn0B3i','suDqu2S','tePtu2m','C2L6zq','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','wKTPv3C','r0vu','yLz5BwC','v1n5uxC','C2vHCMnO','mte4nte0ohLby0zlEG','EfrfDhG','shrJsuC','mLPLs2rTAq','BgvUz3rO','CwLWAgC','Bwq1','zw52AxjVBM1LBNroyw1L','zgjWBK4','sKnuAfG','DxjS','C3rYAw5NAwz5','t3Pyrwe','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','qMzjExC','z3v5Eeu','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','sfHVB1K','Dgzbv2K','Aw1Hz2uVCg5N','yu16z0G','swvVDhq','yxbWBgLJyxrPB24VANnVBG','sMXlvLy','DMLKzw8VD2vIBq','D3vqDhu','zxLXEhe','zvzIuhu','nta5nJD4tLbYDhi','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','uxrftxG','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','z0zlvwS','ENzpr0m','zMvHDhvYzuLK','yxbWBgLJyxrPB24VEMLW','yuTYyxK','mtiXodKWrNHKEfzO','s2vVCee','B2zPqu4','yxbWBhK','t29cywG','uefuq0G','qujzAgK','ruPfqum','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','A3fhCuq','whHmEuq','wgPmAg8','nZu0mdv6wxrnqxq','D0PWy1a','qw1ICe0','Dg9tDhjPBMC','CMHqz1m','rvjQtLe','qMfmsMu','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','CfDlBfe','BxvQzNq','zgLNzxn0','rgX5wLi','z3vlrLi','DgDRsgS','B3jAB2y','ANnVBG','EMTYAha','nteXn294DwLZwG','Dgv4Da','v1H1DK0','rNPYA1G','thb1CuO','DMzxsxa','ENnUuwO','Bwv0ywrHDge','kcGOlISPkYKRksSK','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','EKfJzha','l3n0zxbZ','mZC2B2vHDLHJ','s25SyMe','B2XqDKO','BNH2DLy','CLz2sMG','DxbKyxrL','yxbWBgLJyxrPB24VANnVBMW'];_0x16b6=function(){return _0x253693;};return _0x16b6();}export function computeChecksum(_0x2eb373){const _0x4c8902=_0x5bc8,_0x31398a={'tCHUH':_0x4c8902(0x1b3),'wuPtu':_0x4c8902(0x19a)};return createHash(_0x31398a['tCHUH'])['update'](_0x2eb373)[_0x4c8902(0x1e8)](_0x31398a[_0x4c8902(0x1c6)]);}export async function createVerificationStep(_0x54a879,_0x3d2494){const _0x3ea300=_0x5bc8,_0x2bdd37={'HXooY':_0x3ea300(0x1a1),'orZof':function(_0x25fe0b){return _0x25fe0b();},'MFDFV':'POST','CiLXA':_0x3ea300(0x1c3),'FDiQe':_0x3ea300(0x1e9)},_0x2b4382=await getToken();if(!_0x2b4382)throw new Error(_0x2bdd37[_0x3ea300(0x1be)]);const _0x30ecad=_0x2bdd37[_0x3ea300(0x1ec)](getApiBaseUrl),_0x48319d=await fetch(_0x30ecad+_0x3ea300(0x1bd)+_0x54a879+_0x3ea300(0x1fa),{'method':_0x2bdd37['MFDFV'],'headers':{'Authorization':_0x3ea300(0x204)+_0x2b4382,'Content-Type':_0x2bdd37['CiLXA']},'body':JSON[_0x3ea300(0x1b8)](_0x3d2494)});if(!_0x48319d['ok']){if(_0x3ea300(0x1e9)===_0x2bdd37['FDiQe']){const _0x9f02ea=await _0x48319d['text']();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x9f02ea);}else{const _0x10ee6a=_0x14e069?function(){if(_0x2b49c9){const _0x12da8f=_0x9c564b['apply'](_0x550b80,arguments);return _0x12d0c1=null,_0x12da8f;}}:function(){};return _0x29032f=![],_0x10ee6a;}}return _0x48319d[_0x3ea300(0x1ed)]();}export async function createStepAsset(_0x1c36e8,_0x2dd1b5,_0x38ef1a){const _0x15272a=_0x5bc8,_0x84d981={'XtQUY':_0x15272a(0x1a1),'BfIyw':function(_0x34d66a,_0x1c43b3,_0x186eb9){return _0x34d66a(_0x1c43b3,_0x186eb9);},'HIRsz':'POST','YEZlx':_0x15272a(0x1c3)},_0x524d63=await getToken();if(!_0x524d63)throw new Error(_0x84d981[_0x15272a(0x19f)]);const _0x3158b3=getApiBaseUrl(),_0x4d813e=await _0x84d981[_0x15272a(0x1bb)](fetch,_0x3158b3+_0x15272a(0x1bd)+_0x1c36e8+'/steps/'+_0x2dd1b5+'/assets',{'method':_0x84d981['HIRsz'],'headers':{'Authorization':_0x15272a(0x204)+_0x524d63,'Content-Type':_0x84d981['YEZlx']},'body':JSON['stringify'](_0x38ef1a)});if(!_0x4d813e['ok']){const _0x2960fa=await _0x4d813e[_0x15272a(0x1f0)]();throw new Error(_0x15272a(0x1a2)+_0x2960fa);}return _0x4d813e[_0x15272a(0x1ed)]();}export async function updateVerificationStep(_0x14c00d,_0x2d458f,_0x29093b){const _0xf3a3c9=_0x5bc8,_0x479e30={'ZKiWw':function(_0xf8a1f5){return _0xf8a1f5();},'zAcdp':_0xf3a3c9(0x1a1),'FDQEv':function(_0xb5d826,_0x279097,_0xf6f5dc){return _0xb5d826(_0x279097,_0xf6f5dc);},'LpuqJ':_0xf3a3c9(0x1d7),'HtcIG':_0xf3a3c9(0x1c3),'xTEtx':function(_0x2b06b4,_0x188192){return _0x2b06b4!==_0x188192;},'rhPgS':'orxVb','qWaNu':_0xf3a3c9(0x1d9)},_0xea0155=await _0x479e30['ZKiWw'](getToken);if(!_0xea0155)throw new Error(_0x479e30[_0xf3a3c9(0x1f9)]);const _0x3bf56f=_0x479e30[_0xf3a3c9(0x1a8)](getApiBaseUrl),_0x49340c=await _0x479e30['FDQEv'](fetch,_0x3bf56f+'/api/v1/mcp/browser-sessions/'+_0x14c00d+'/steps/'+_0x2d458f,{'method':_0x479e30[_0xf3a3c9(0x1f3)],'headers':{'Authorization':_0xf3a3c9(0x204)+_0xea0155,'Content-Type':_0x479e30[_0xf3a3c9(0x1af)]},'body':JSON['stringify'](_0x29093b)});if(!_0x49340c['ok']){if(_0x479e30[_0xf3a3c9(0x1ae)](_0x479e30[_0xf3a3c9(0x1e2)],_0x479e30['qWaNu'])){const _0x5e6ba0=await _0x49340c[_0xf3a3c9(0x1f0)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x5e6ba0);}else{if(_0x4744e6){const _0x4ca392=_0x69d7db[_0xf3a3c9(0x1d5)](_0x2ee716,arguments);return _0x109bf4=null,_0x4ca392;}}}}
|
|
1
|
+
(function(_0x299fa4,_0x236651){const _0x1e984c=_0x455b,_0x46d021=_0x299fa4();while(!![]){try{const _0x360d38=parseInt(_0x1e984c(0x12f))/0x1+-parseInt(_0x1e984c(0x12e))/0x2+parseInt(_0x1e984c(0x109))/0x3+-parseInt(_0x1e984c(0xd2))/0x4*(parseInt(_0x1e984c(0xfd))/0x5)+parseInt(_0x1e984c(0x116))/0x6+parseInt(_0x1e984c(0x114))/0x7*(-parseInt(_0x1e984c(0x139))/0x8)+parseInt(_0x1e984c(0x105))/0x9;if(_0x360d38===_0x236651)break;else _0x46d021['push'](_0x46d021['shift']());}catch(_0x3358e8){_0x46d021['push'](_0x46d021['shift']());}}}(_0x3c17,0xcf4d9));const _0xd8841c=(function(){const _0x5e6633=_0x455b,_0x533123={'HLRUb':function(_0x4be49a,_0x238044){return _0x4be49a!==_0x238044;},'QpvbB':_0x5e6633(0xdb),'EdPdB':_0x5e6633(0xeb)};let _0x25155b=!![];return function(_0x4dc452,_0x5a591b){const _0x30bf0e=_0x5e6633,_0x15badd={'NAXXs':function(_0x63e4fc,_0x3e09da){const _0x1be0a8=_0x455b;return _0x533123[_0x1be0a8(0x107)](_0x63e4fc,_0x3e09da);},'PDoVW':_0x533123[_0x30bf0e(0x113)],'ErBdN':_0x533123['EdPdB']},_0x311c6b=_0x25155b?function(){const _0x3c7b3e=_0x30bf0e;if(_0x5a591b){if(_0x15badd['NAXXs'](_0x15badd[_0x3c7b3e(0xe2)],_0x15badd[_0x3c7b3e(0x11a)])){const _0x219ac0=_0x5a591b[_0x3c7b3e(0x127)](_0x4dc452,arguments);return _0x5a591b=null,_0x219ac0;}else{const _0x41f6b4=_0x28404c[_0x3c7b3e(0x127)](_0x3340ed,arguments);return _0x54d172=null,_0x41f6b4;}}}:function(){};return _0x25155b=![],_0x311c6b;};}()),_0x376775=_0xd8841c(this,function(){const _0x2a69e6=_0x455b,_0x488892={'GCNVC':'(((.+)+)+)+$'};return _0x376775[_0x2a69e6(0xce)]()[_0x2a69e6(0xd6)](_0x488892[_0x2a69e6(0x136)])[_0x2a69e6(0xce)]()[_0x2a69e6(0xf8)](_0x376775)[_0x2a69e6(0xd6)](_0x488892['GCNVC']);});_0x376775();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x3c17(){const _0x495e23=['s21VA0q','ruHWwge','mtCYtgDeAvHO','C2vZC2LVBLrVA2vU','Dgv4Da','zgLNzxn0','C2vHCMnO','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','tuTMvLK','yxbWBgLJyxrPB24VANnVBMW','y2HLy2TZDw0','BMvgyu8','C3rYAw5NAwz5','DuDLCMu','ChrqteO','ALrVt3K','yMfZzty0','DKLbwK0','uerVvLC','vujkvMm','C2L6zq','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','r0vu','C01Iv2W','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','ALPZvg8','CfbRzKS','wvvjuui','sxvKt2e','vuftzLm','DwjXreu','tg9XuwS','DgfZAW','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','CM1gr08','teHvEui','uMnfzxO','Dhblrhm','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','DxbKyxrL','y29UC3rYDwn0B3i','v0vftMW','AMjvz0m','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','AeHxq2W','ntCXnZvVAxboBuK','DxbKyxrLqNjVD3nLCLnLC3nPB24','A0Turwu','AK5yvgK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','vKvVz2m','AgDhr2e','z09xrhu','nZaYmJiWnxferw5XBq','rwnhrK4','seXsvwi','q0zVuNy','mJq3nJeWngLxAgPLAG','q09mtgG','DgHWEhy','l2fZC2v0CW','DK5XCxq','yxbWBgLJyxrPB24VEMLW','BwTiwNu','BKrMB3y','tMTrvKS','CK1AAvC','uxb2yKi','ntK5mZa1B1rXzeDI','ANnVBG','mZu4mZqXmgPlsu1jAa','kcGOlISPkYKRksSK','Cvrqu1m','EKnxB2S','rxjcze4','svj2zvG','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','Eu1fyu0','v1PYqKi','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','ufjRsw0','yxbWBgLJyxrPB24VANnVBG','zw52AxjVBM1LBNroyw1L','Cvftv3q','qLvruw0','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','shfxu1y','yxbWBhK','ufvu','se9fzey','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','qwv5zeW','EK9fBhe','l3vWBg9Hzc11CMXZ','mZm0nZGZogPnzfzPAq','mta2odCZneH0Dg9Kva','qMvHCMvYia','BgPAB1a','tLPvqNG','thzyvw4','twf1shO','l3n0zxbZlW','r0novKm','t1HJEhi','Cwvdzwu','mJrYwwLJsNe','y2HLy2TSAxn0sxrLBuLK','Bwv0ywrHDge','ue9tva','quTjBey','Aw1Hz2uVCg5N','vwrfyLe','l3n0zxbZ','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','AeHWre8','r1riCxO','ANH3rwq','vfnXq2y','DfLnDKi','DfbVA24','ANHutfG','EhDpDuS','zMvHDhvYzuLK','Bwq1','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','BgvUz3rO','q3zPy0y','vKnWywu','ALjlrxK','rMX2wxm','Dg9tDhjPBMC','v1bSAxm'];_0x3c17=function(){return _0x495e23;};return _0x3c17();}import{createHash}from'crypto';import{withRetry}from'./retry.js';function _0x455b(_0x4a1b95,_0x132bfc){_0x4a1b95=_0x4a1b95-0xc9;const _0x22ee0f=_0x3c17();let _0x376775=_0x22ee0f[_0x4a1b95];if(_0x455b['uCNmVR']===undefined){var _0xd8841c=function(_0x1d9609){const _0x4e7d05='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ae61e='',_0xc8ac3f='',_0x15609e=_0x2ae61e+_0xd8841c;for(let _0x39794a=0x0,_0x476d9a,_0x12ad33,_0x327681=0x0;_0x12ad33=_0x1d9609['charAt'](_0x327681++);~_0x12ad33&&(_0x476d9a=_0x39794a%0x4?_0x476d9a*0x40+_0x12ad33:_0x12ad33,_0x39794a++%0x4)?_0x2ae61e+=_0x15609e['charCodeAt'](_0x327681+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x476d9a>>(-0x2*_0x39794a&0x6)):_0x39794a:0x0){_0x12ad33=_0x4e7d05['indexOf'](_0x12ad33);}for(let _0x538a13=0x0,_0x2bebfb=_0x2ae61e['length'];_0x538a13<_0x2bebfb;_0x538a13++){_0xc8ac3f+='%'+('00'+_0x2ae61e['charCodeAt'](_0x538a13)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc8ac3f);};_0x455b['OeaonW']=_0xd8841c,_0x455b['bcARUO']={},_0x455b['uCNmVR']=!![];}const _0x3c17f2=_0x22ee0f[0x0],_0x455b60=_0x4a1b95+_0x3c17f2,_0x41c758=_0x455b['bcARUO'][_0x455b60];if(!_0x41c758){const _0x6f6d8=function(_0xec7c8f){this['tsMoPY']=_0xec7c8f,this['YDflMT']=[0x1,0x0,0x0],this['xdYmGS']=function(){return'newState';},this['meIGKU']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['rVKuHG']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x6f6d8['prototype']['IhUWtL']=function(){const _0x4266c9=new RegExp(this['meIGKU']+this['rVKuHG']),_0xb73aab=_0x4266c9['test'](this['xdYmGS']['toString']())?--this['YDflMT'][0x1]:--this['YDflMT'][0x0];return this['sLzjoF'](_0xb73aab);},_0x6f6d8['prototype']['sLzjoF']=function(_0xc6e14d){if(!Boolean(~_0xc6e14d))return _0xc6e14d;return this['stTUvC'](this['tsMoPY']);},_0x6f6d8['prototype']['stTUvC']=function(_0x1cc7ae){for(let _0x3f442e=0x0,_0x586517=this['YDflMT']['length'];_0x3f442e<_0x586517;_0x3f442e++){this['YDflMT']['push'](Math['round'](Math['random']())),_0x586517=this['YDflMT']['length'];}return _0x1cc7ae(this['YDflMT'][0x0]);},new _0x6f6d8(_0x455b)['IhUWtL'](),_0x376775=_0x455b['OeaonW'](_0x376775),_0x455b['bcARUO'][_0x455b60]=_0x376775;}else _0x376775=_0x41c758;return _0x376775;}export async function createBrowserSession(_0x2eff06){const _0x3d9cb7=_0x455b,_0x38a105={'hHWCl':_0x3d9cb7(0x11f),'sMbWl':function(_0x25ed70,_0xc5afe2,_0x920404){return _0x25ed70(_0xc5afe2,_0x920404);},'vIAZM':'POST','IRveX':function(_0x456d5c,_0x3d33fd){return _0x456d5c===_0x3d33fd;},'kKTEe':_0x3d9cb7(0x111)},_0x29bace=await getToken();if(!_0x29bace)throw new Error(_0x3d9cb7(0x11f));const _0xba2a07=getApiBaseUrl(),_0x20082f=await _0x38a105[_0x3d9cb7(0xe7)](fetch,_0xba2a07+_0x3d9cb7(0x101),{'method':_0x38a105[_0x3d9cb7(0xe1)],'headers':{'Authorization':_0x3d9cb7(0x130)+_0x29bace,'Content-Type':_0x3d9cb7(0x121)},'body':JSON['stringify']({'environmentName':_0x2eff06?.[_0x3d9cb7(0x122)],'settings':_0x2eff06?.['settings'],'task':_0x2eff06?.[_0x3d9cb7(0xf0)],'url':_0x2eff06?.['url'],'featureId':_0x2eff06?.[_0x3d9cb7(0x14a)],'checklistItemId':_0x2eff06?.[_0x3d9cb7(0x13a)]})});if(!_0x20082f['ok']){if(_0x38a105[_0x3d9cb7(0x11b)](_0x38a105[_0x3d9cb7(0xff)],_0x38a105[_0x3d9cb7(0xff)])){const _0x551224=await _0x20082f['text']();throw new Error(_0x3d9cb7(0x12a)+_0x551224);}else throw new _0x20ce8c(_0x38a105[_0x3d9cb7(0xfc)]);}return _0x20082f['json']();}export async function updateBrowserSession(_0x32c235,_0x2bb57f){const _0x58e002=_0x455b,_0x4a9cc0={'WPlis':_0x58e002(0x11f),'zCWok':'md5','TSqCf':function(_0x15566b,_0x2f9524){return _0x15566b!==_0x2f9524;},'MmTDf':_0x58e002(0xea),'qeCee':function(_0x13c28d){return _0x13c28d();},'OcCyH':'LHUyB','GTHqz':function(_0x3471e7,_0x107c07,_0x184a66){return _0x3471e7(_0x107c07,_0x184a66);},'yMEaM':'application/json','CHqDR':_0x58e002(0xe9),'sznvR':_0x58e002(0x129),'tpKDs':_0x58e002(0xfe)};return withRetry(async()=>{const _0x128275=_0x58e002,_0x424bad={'uGere':_0x4a9cc0['WPlis']};if(_0x4a9cc0['TSqCf'](_0x4a9cc0['MmTDf'],'pPkfK'))throw new _0x17a2b2(_0x424bad[_0x128275(0xdd)]);else{const _0x4ef681=await _0x4a9cc0['qeCee'](getToken);if(!_0x4ef681){if(_0x4a9cc0[_0x128275(0x145)](_0x128275(0xf3),_0x4a9cc0['OcCyH']))throw new _0xa66f1f(_0x4a9cc0[_0x128275(0xcf)]);else throw new Error(_0x4a9cc0[_0x128275(0xcf)]);}const _0x5e8901=_0x4a9cc0[_0x128275(0x138)](getApiBaseUrl),_0x4152f0=await _0x4a9cc0[_0x128275(0x143)](fetch,_0x5e8901+_0x128275(0xe8)+_0x32c235,{'method':'PATCH','headers':{'Authorization':'Bearer\x20'+_0x4ef681,'Content-Type':_0x4a9cc0[_0x128275(0x11d)]},'body':JSON[_0x128275(0xdc)](_0x2bb57f)});if(!_0x4152f0['ok']){if(_0x4a9cc0['CHqDR']!==_0x4a9cc0['sznvR']){const _0x3bf43c=await _0x4152f0['text']();throw new Error(_0x128275(0xd7)+_0x3bf43c);}else return _0x21a25a(_0x4a9cc0[_0x128275(0x119)])[_0x128275(0xf7)](_0x4ad0fe)[_0x128275(0xd5)](_0x128275(0xe0));}return _0x4152f0['json']();}},{'label':_0x4a9cc0[_0x58e002(0xf5)]});}export async function getBrowserSession(_0x734f28){const _0x7fb115=_0x455b,_0x5d5a16={'Pvjhe':function(_0x84e505,_0x39711,_0x39d0e5,_0x288235){return _0x84e505(_0x39711,_0x39d0e5,_0x288235);},'KVsnT':_0x7fb115(0x13e),'NZUBx':function(_0xcb6032){return _0xcb6032();},'KmokD':_0x7fb115(0x11f),'jbUgC':function(_0x160366,_0x20301b,_0x10d3f3){return _0x160366(_0x20301b,_0x10d3f3);},'rmFGO':_0x7fb115(0xe6),'rMZiW':function(_0x1b016c,_0x4a3ab2){return _0x1b016c===_0x4a3ab2;},'nDfov':'yqhHE','AKIlF':_0x7fb115(0xcb)},_0x46c299=await _0x5d5a16[_0x7fb115(0x132)](getToken);if(!_0x46c299)throw new Error(_0x5d5a16[_0x7fb115(0xd0)]);const _0x437584=getApiBaseUrl(),_0x107923=await _0x5d5a16[_0x7fb115(0xfa)](fetch,_0x437584+_0x7fb115(0xe8)+_0x734f28,{'method':_0x5d5a16[_0x7fb115(0xf2)],'headers':{'Authorization':_0x7fb115(0x130)+_0x46c299}});if(!_0x107923['ok']){if(_0x5d5a16[_0x7fb115(0x112)](_0x5d5a16[_0x7fb115(0x110)],_0x5d5a16[_0x7fb115(0x13d)]))return _0x5d5a16['Pvjhe'](_0x129985,_0x30efa5,_0x18e27d,_0x5d5a16['KVsnT']);else{const _0x23523e=await _0x107923[_0x7fb115(0xd4)]();throw new Error(_0x7fb115(0xe5)+_0x23523e);}}return _0x107923[_0x7fb115(0x115)]();}export async function getUploadUrls(_0x544686,_0x1190a3,_0xa15df0,_0x504ddf){const _0x2b88f5=_0x455b,_0xa3f663={'jRKEy':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','qTPSS':function(_0x248169){return _0x248169();},'thpxv':function(_0xffc4c3,_0x491cd9,_0x398ebb){return _0xffc4c3(_0x491cd9,_0x398ebb);},'gOWDu':_0x2b88f5(0x13c),'OXcxr':_0x2b88f5(0x121),'WEENl':function(_0xe1e775,_0x2bd267){return _0xe1e775!==_0x2bd267;},'LvXUn':_0x2b88f5(0x100),'qQSWt':_0x2b88f5(0x146)},_0x5d4ff0=await _0xa3f663[_0x2b88f5(0x118)](getToken);if(!_0x5d4ff0)throw new Error(_0xa3f663[_0x2b88f5(0xcc)]);const _0x782ef8=_0xa3f663[_0x2b88f5(0x118)](getApiBaseUrl),_0x56a0bb=await _0xa3f663[_0x2b88f5(0x10b)](fetch,_0x782ef8+_0x2b88f5(0xe8)+_0x544686+_0x2b88f5(0x12d),{'method':_0xa3f663[_0x2b88f5(0x104)],'headers':{'Authorization':'Bearer\x20'+_0x5d4ff0,'Content-Type':_0xa3f663[_0x2b88f5(0x137)]},'body':JSON['stringify']({'filename':_0x1190a3,'filetype':_0xa15df0,..._0xa3f663['WEENl'](_0x504ddf?.[_0x2b88f5(0xe4)],undefined)&&{'size':_0x504ddf[_0x2b88f5(0xe4)]},..._0xa3f663[_0x2b88f5(0xf9)](_0x504ddf?.[_0x2b88f5(0xda)],undefined)&&{'checksum':_0x504ddf[_0x2b88f5(0xda)]},..._0xa3f663['WEENl'](_0x504ddf?.[_0x2b88f5(0x13b)],undefined)&&{'metadata':_0x504ddf[_0x2b88f5(0x13b)]}})});if(!_0x56a0bb['ok']){if(_0xa3f663[_0x2b88f5(0x133)]===_0xa3f663[_0x2b88f5(0x123)])throw new _0x4d2306(_0xa3f663[_0x2b88f5(0xcc)]);else{const _0x365a5c=await _0x56a0bb[_0x2b88f5(0xd4)]();throw new Error(_0x2b88f5(0x11c)+_0x365a5c);}}return _0x56a0bb[_0x2b88f5(0x115)]();}export async function uploadFile(_0x119d78,_0x1502e3,_0x3c5e44){const _0x484b2b=_0x455b,_0x44b6b8={'hgGGa':'(((.+)+)+)+$','LoqQk':function(_0x50d8b0,_0x362d7f,_0x52d240){return _0x50d8b0(_0x362d7f,_0x52d240);},'NMUOm':_0x484b2b(0x128),'CvicF':function(_0x22d80a,_0x2df234){return _0x22d80a!==_0x2df234;},'UBJVc':_0x484b2b(0xde)},_0x2790d1=await _0x44b6b8[_0x484b2b(0xef)](fetch,_0x119d78,{'method':_0x44b6b8['NMUOm'],'headers':{'Content-Type':_0x3c5e44,'Content-Length':_0x1502e3[_0x484b2b(0xc9)][_0x484b2b(0xce)]()},'body':_0x1502e3});if(!_0x2790d1['ok']){if(_0x44b6b8[_0x484b2b(0xca)](_0x44b6b8[_0x484b2b(0xe3)],_0x44b6b8['UBJVc']))return _0x23dc45[_0x484b2b(0xce)]()[_0x484b2b(0xd6)](_0x484b2b(0x117))['toString']()[_0x484b2b(0xf8)](_0x138106)[_0x484b2b(0xd6)](ZTEyDp[_0x484b2b(0x103)]);else{const _0x5a7e06=await _0x2790d1[_0x484b2b(0xd4)]();throw new Error(_0x484b2b(0x14c)+_0x5a7e06);}}}export async function uploadTrace(_0x470a24,_0x4ad034){const _0x155c57=_0x455b,_0x3f474e={'BUQQm':_0x155c57(0x10e)};return uploadFile(_0x470a24,_0x4ad034,_0x3f474e[_0x155c57(0x124)]);}export async function uploadConversation(_0x52a453,_0x43f9f0){const _0x5998f7=_0x455b,_0x5f03c9={'ljZoP':function(_0x17e10d,_0xdeebdc,_0x1a456e,_0x16e3db){return _0x17e10d(_0xdeebdc,_0x1a456e,_0x16e3db);}};return _0x5f03c9[_0x5998f7(0x131)](uploadFile,_0x52a453,_0x43f9f0,_0x5998f7(0xd9));}export async function uploadScreenshot(_0x5b1be4,_0x3d7551){return uploadFile(_0x5b1be4,_0x3d7551,'image/png');}export async function uploadVideo(_0x353fcb,_0x378683){const _0x13c23b=_0x455b,_0x2065b5={'vNqqt':function(_0x2e09a5,_0x58df51,_0x5dcdb0,_0x5503fd){return _0x2e09a5(_0x58df51,_0x5dcdb0,_0x5503fd);}};return _0x2065b5[_0x13c23b(0x10d)](uploadFile,_0x353fcb,_0x378683,'video/webm');}export function buildTraceViewerUrl(_0x366eca){const _0x3d3494=_0x455b,_0x4bd842={'QvNVW':function(_0x5aee75,_0x49f214){return _0x5aee75(_0x49f214);}},_0x4e6e3b=_0x4bd842['QvNVW'](encodeURIComponent,_0x366eca);return _0x3d3494(0xfb)+_0x4e6e3b;}export async function getProxySessionToken(){const _0x51d9b1=_0x455b,_0x3ff3b3={'COLLh':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','jxwEd':function(_0x442ed9,_0x2e47d8,_0x262c71){return _0x442ed9(_0x2e47d8,_0x262c71);},'EHpXa':_0x51d9b1(0x13c),'UdEbQ':function(_0x3be344,_0x5ce0e1){return _0x3be344===_0x5ce0e1;},'EcGFN':'xrFYl','hqtOj':_0x51d9b1(0x108)},_0x5dd24a=await getToken();if(!_0x5dd24a)throw new Error(_0x3ff3b3[_0x51d9b1(0x10a)]);const _0x2481d7=getApiBaseUrl(),_0x3ab42e=await _0x3ff3b3[_0x51d9b1(0x144)](fetch,_0x2481d7+_0x51d9b1(0xf1),{'method':_0x3ff3b3[_0x51d9b1(0xd1)],'headers':{'Authorization':_0x51d9b1(0x130)+_0x5dd24a}});if(!_0x3ab42e['ok']){if(_0x3ff3b3[_0x51d9b1(0x13f)](_0x3ff3b3[_0x51d9b1(0x106)],_0x3ff3b3['hqtOj'])){if(_0x587a77){const _0x20845d=_0x449d43[_0x51d9b1(0x127)](_0x1f2ad8,arguments);return _0x3e2f41=null,_0x20845d;}}else{const _0x523a95=await _0x3ab42e[_0x51d9b1(0xd4)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x523a95);}}const _0x48d9e6=await _0x3ab42e[_0x51d9b1(0x115)]();return _0x48d9e6[_0x51d9b1(0xd3)];}export function computeChecksum(_0x1e263d){const _0x3d157e=_0x455b,_0x3166be={'MauHz':_0x3d157e(0x14b),'xwOuK':_0x3d157e(0xe0)};return createHash(_0x3166be[_0x3d157e(0x134)])[_0x3d157e(0xf7)](_0x1e263d)[_0x3d157e(0xd5)](_0x3166be[_0x3d157e(0x149)]);}export async function createVerificationStep(_0x8ea068,_0xa39946){const _0xda4d7d=_0x455b,_0x2a7089={'VEogc':function(_0x28a69f,_0x302e9e,_0x3424b9,_0x5810f2){return _0x28a69f(_0x302e9e,_0x3424b9,_0x5810f2);},'WZrBB':_0xda4d7d(0xd9),'AeydL':function(_0x36b4b4){return _0x36b4b4();},'tPokn':_0xda4d7d(0x10f),'HqWSV':_0xda4d7d(0x11f),'jzJbw':function(_0x5d0502){return _0x5d0502();},'MKfVY':function(_0x244436,_0x4a7c60,_0x108ca7){return _0x244436(_0x4a7c60,_0x108ca7);},'jxTLX':_0xda4d7d(0x13c),'UASfS':'application/json','PRkIm':function(_0x281d27,_0x265c3d){return _0x281d27===_0x265c3d;},'cIxKp':_0xda4d7d(0xdf)},_0x250d0d=await _0x2a7089[_0xda4d7d(0x12b)](getToken);if(!_0x250d0d){if('mbGqy'===_0x2a7089[_0xda4d7d(0x147)]){const _0x413dc8=_0x6f6d8?function(){const _0x390178=_0xda4d7d;if(_0x3f442e){const _0x5d2658=_0x499b43[_0x390178(0x127)](_0x58dbb6,arguments);return _0xf99afe=null,_0x5d2658;}}:function(){};return _0x1cc7ae=![],_0x413dc8;}else throw new Error(_0x2a7089[_0xda4d7d(0x126)]);}const _0x33b25a=_0x2a7089['jzJbw'](getApiBaseUrl),_0x3132e6=await _0x2a7089[_0xda4d7d(0xd8)](fetch,_0x33b25a+'/api/v1/mcp/browser-sessions/'+_0x8ea068+_0xda4d7d(0x140),{'method':_0x2a7089[_0xda4d7d(0x148)],'headers':{'Authorization':_0xda4d7d(0x130)+_0x250d0d,'Content-Type':_0x2a7089[_0xda4d7d(0xed)]},'body':JSON[_0xda4d7d(0xdc)](_0xa39946)});if(!_0x3132e6['ok']){if(_0x2a7089[_0xda4d7d(0x120)](_0x2a7089['cIxKp'],_0x2a7089['cIxKp'])){const _0x359714=await _0x3132e6[_0xda4d7d(0xd4)]();throw new Error(_0xda4d7d(0xf6)+_0x359714);}else return _0x2a7089[_0xda4d7d(0x102)](_0x24dc86,_0x3c3296,_0x30d3b9,_0x2a7089[_0xda4d7d(0x11e)]);}return _0x3132e6['json']();}export async function createStepAsset(_0x5e118c,_0x1ca110,_0x144392){const _0x30b9ed=_0x455b,_0x1b466b={'FlvYs':function(_0x252666){return _0x252666();},'UiIGu':_0x30b9ed(0x11f),'QNFMi':function(_0x210919,_0x48f9c3,_0xe8eb95){return _0x210919(_0x48f9c3,_0xe8eb95);},'Tmbrh':_0x30b9ed(0x13c),'ubqDE':_0x30b9ed(0x121)},_0x3be17d=await _0x1b466b[_0x30b9ed(0xcd)](getToken);if(!_0x3be17d)throw new Error(_0x1b466b['UiIGu']);const _0x1f348d=_0x1b466b[_0x30b9ed(0xcd)](getApiBaseUrl),_0x586250=await _0x1b466b['QNFMi'](fetch,_0x1f348d+'/api/v1/mcp/browser-sessions/'+_0x5e118c+_0x30b9ed(0x135)+_0x1ca110+_0x30b9ed(0x10c),{'method':_0x1b466b['Tmbrh'],'headers':{'Authorization':'Bearer\x20'+_0x3be17d,'Content-Type':_0x1b466b[_0x30b9ed(0xee)]},'body':JSON[_0x30b9ed(0xdc)](_0x144392)});if(!_0x586250['ok']){const _0x32d0ae=await _0x586250['text']();throw new Error(_0x30b9ed(0x125)+_0x32d0ae);}return _0x586250[_0x30b9ed(0x115)]();}export async function updateVerificationStep(_0x1fb6d8,_0x3539db,_0x5d17c0){const _0x3e6276=_0x455b,_0x4feeb5={'IudOa':_0x3e6276(0x11f),'hHpDO':function(_0x44c010){return _0x44c010();},'RcEez':'mxTVJ','zOElq':function(_0x16e03e,_0x1b073d,_0x547518){return _0x16e03e(_0x1b073d,_0x547518);}},_0x14c4bd=await _0x4feeb5[_0x3e6276(0x142)](getToken);if(!_0x14c4bd){if(_0x4feeb5[_0x3e6276(0xf4)]===_0x4feeb5['RcEez'])throw new Error(_0x3e6276(0x11f));else throw new _0x3d6aa5(_0x4feeb5[_0x3e6276(0xec)]);}const _0x536bbf=_0x4feeb5['hHpDO'](getApiBaseUrl),_0x32432c=await _0x4feeb5[_0x3e6276(0x12c)](fetch,_0x536bbf+'/api/v1/mcp/browser-sessions/'+_0x1fb6d8+_0x3e6276(0x135)+_0x3539db,{'method':'PATCH','headers':{'Authorization':'Bearer\x20'+_0x14c4bd,'Content-Type':'application/json'},'body':JSON['stringify'](_0x5d17c0)});if(!_0x32432c['ok']){const _0xdf343b=await _0x32432c[_0x3e6276(0xd4)]();throw new Error(_0x3e6276(0x141)+_0xdf343b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x506457,_0x4f405d){const _0x2cb587=_0x39c6,_0x44ddb8=_0x506457();while(!![]){try{const _0x354166=parseInt(_0x2cb587(0x1b2))/0x1+parseInt(_0x2cb587(0x1ad))/0x2+parseInt(_0x2cb587(0x1a8))/0x3+parseInt(_0x2cb587(0x1c1))/0x4*(-parseInt(_0x2cb587(0x1bd))/0x5)+-parseInt(_0x2cb587(0x1bf))/0x6+parseInt(_0x2cb587(0x1b8))/0x7+-parseInt(_0x2cb587(0x1b9))/0x8*(parseInt(_0x2cb587(0x1bc))/0x9);if(_0x354166===_0x4f405d)break;else _0x44ddb8['push'](_0x44ddb8['shift']());}catch(_0x4878bd){_0x44ddb8['push'](_0x44ddb8['shift']());}}}(_0x3cdc,0xa429d));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0xe559d5=_0x39c6,_0x13c512={'cDZGw':function(_0x58c5fa){return _0x58c5fa();},'ytQSj':'.claude'};return process['env'][_0xe559d5(0x1b4)]||join(_0x13c512['cDZGw'](homedir),_0x13c512[_0xe559d5(0x1b0)]);}export function getUserSkillsDir(){return join(getClaudeConfigDir(),'skills');}export function getProjectRoot(){const _0x4eb3ac=_0x39c6,_0x2a71ad={'QiYfN':function(_0x364114,_0x2d05d5){return _0x364114(_0x2d05d5);},'kYmvY':function(_0x254d21,_0x4c6dcb,_0x58acb3){return _0x254d21(_0x4c6dcb,_0x58acb3);},'BvxtP':_0x4eb3ac(0x1af)};let _0x1ad0fd=process[_0x4eb3ac(0x1ba)]();const _0x10b896=_0x2a71ad[_0x4eb3ac(0x1a9)](parse,_0x1ad0fd)['root'];while(_0x1ad0fd!==_0x10b896){if(existsSync(_0x2a71ad['kYmvY'](join,_0x1ad0fd,'.claude')))return _0x1ad0fd;if(_0x2a71ad['QiYfN'](existsSync,join(_0x1ad0fd,_0x2a71ad[_0x4eb3ac(0x1b1)])))return _0x1ad0fd;_0x1ad0fd=dirname(_0x1ad0fd);}return process['cwd']();}export function getProjectSkillsDir(){const _0x3f517e=_0x39c6,_0x315b0b={'KfzdH':function(_0x451501){return _0x451501();},'uOcqV':'skills'};return join(_0x315b0b[_0x3f517e(0x1be)](getProjectRoot),'.claude',_0x315b0b['uOcqV']);}export function getSkillsDir(_0x3633a2){return _0x3633a2==='user'?getUserSkillsDir():getProjectSkillsDir();}export function getSettingsPath(){const _0x538490=_0x39c6,_0x186c62={'qjbHz':function(_0x320e95){return _0x320e95();},'GbbNi':'settings.json'};return join(_0x186c62[_0x538490(0x1b6)](getClaudeConfigDir),_0x186c62['GbbNi']);}export async function loadClaudeSettings(){const _0x288d9a=_0x39c6,_0x48fd76=getSettingsPath();if(!existsSync(_0x48fd76))return{};try{const _0x5c5d7f=await readFile(_0x48fd76,_0x288d9a(0x1c0));return JSON['parse'](_0x5c5d7f);}catch{return{};}}export async function saveClaudeSettings(_0x341513){const _0x23aaa3=_0x39c6,_0x29d03f={'XqASK':function(_0x20a445,_0x669d5a){return _0x20a445(_0x669d5a);},'diZli':function(_0x527019,_0x49ab2a,_0x378fbb){return _0x527019(_0x49ab2a,_0x378fbb);},'vEAKP':function(_0x1d7aca,_0x1ff098){return _0x1d7aca+_0x1ff098;}},_0x45d1a9=getSettingsPath(),_0x1d404c=getClaudeConfigDir();!_0x29d03f[_0x23aaa3(0x1ac)](existsSync,_0x1d404c)&&await _0x29d03f[_0x23aaa3(0x1b3)](mkdir,_0x1d404c,{'recursive':!![]}),await writeFile(_0x45d1a9,_0x29d03f['vEAKP'](JSON[_0x23aaa3(0x1ae)](_0x341513,null,0x2),'\x0a'),_0x23aaa3(0x1c0));}function _0x39c6(_0x2d2b04,_0x2d6cec){_0x2d2b04=_0x2d2b04-0x1a8;const _0x3cdc88=_0x3cdc();let _0x39c60a=_0x3cdc88[_0x2d2b04];return _0x39c60a;}export function hasRangerServerInSettings(_0x564f60){const _0x21cd60=_0x39c6,_0xe05baa={'KQpZM':function(_0x56a1c1,_0x2cf056){return _0x56a1c1!==_0x2cf056;},'HItdo':_0x21cd60(0x1aa)};return _0xe05baa[_0x21cd60(0x1b5)](_0x564f60[_0x21cd60(0x1ab)]?.[_0xe05baa[_0x21cd60(0x1b7)]],undefined);}function _0x3cdc(){const _0x1d8888=['885332efPgOT','40nXjedR','cwd','data-mcp-server','18891yLvfyn','641735ZSXjYo','KfzdH','4398948TABqkY','utf-8','28GSHNfs','2736828hSwPSX','QiYfN','ranger','mcpServers','XqASK','472466kUtBOM','stringify','.git','ytQSj','BvxtP','1039510viKKDh','diZli','CLAUDE_CONFIG_DIR','KQpZM','qjbHz','HItdo'];_0x3cdc=function(){return _0x1d8888;};return _0x3cdc();}export function setRangerServerInSettings(_0x30cc5a){const _0x1a373c=_0x39c6,_0x3ce3a8={'QKjXh':_0x1a373c(0x1bb)};!_0x30cc5a['mcpServers']&&(_0x30cc5a[_0x1a373c(0x1ab)]={}),_0x30cc5a['mcpServers'][_0x1a373c(0x1aa)]={'command':'npx','args':['@ranger-testing/ranger-cli',_0x3ce3a8['QKjXh']]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1747(){const _0xa8f9f=['output','inherit','enabled','2674410HLEaiW','7568oEMAWD','data','pipe','2147888FVgFcL','2204613svPPHe','close','JFZfG','toLowerCase','match','UwnwC','nlXJJ','SOJXM','4728234bPzccG','mkkJn','plugin','includes','20szvKeB','1KGloam','claude','success','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','1344634AVwciA','captureOutput','JCGyE','2539821mbllDz','version','3157MNASMD','wNPxV','message','list','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','stdout'];_0x1747=function(){return _0xa8f9f;};return _0x1747();}(function(_0x8c2c2a,_0x3ae998){const _0x27dee5=_0xcb25,_0x5d488f=_0x8c2c2a();while(!![]){try{const _0x2fa2db=-parseInt(_0x27dee5(0x1cb))/0x1*(-parseInt(_0x27dee5(0x1cf))/0x2)+parseInt(_0x27dee5(0x1d2))/0x3+-parseInt(_0x27dee5(0x1bd))/0x4+-parseInt(_0x27dee5(0x1b9))/0x5+-parseInt(_0x27dee5(0x1c6))/0x6+-parseInt(_0x27dee5(0x1b0))/0x7*(-parseInt(_0x27dee5(0x1ba))/0x8)+-parseInt(_0x27dee5(0x1be))/0x9*(-parseInt(_0x27dee5(0x1ca))/0xa);if(_0x2fa2db===_0x3ae998)break;else _0x5d488f['push'](_0x5d488f['shift']());}catch(_0x30e9e1){_0x5d488f['push'](_0x5d488f['shift']());}}}(_0x1747,0x8c867));import{spawn}from'child_process';export function runClaudeCommand(_0x3d6abb,_0x15daa9){const _0x11924a=_0xcb25,_0x3f3453={'vzUyI':function(_0x3f36f7,_0x2b4857){return _0x3f36f7(_0x2b4857);},'YOqYz':_0x11924a(0x1b7),'mkkJn':function(_0x172d48,_0x1e3bfb,_0x3d7251,_0x3b6256){return _0x172d48(_0x1e3bfb,_0x3d7251,_0x3b6256);},'JCGyE':_0x11924a(0x1cc),'blkiD':_0x11924a(0x1bb),'wNPxV':'error'};return new Promise(_0x1a7b5e=>{const _0x45b4ba=_0x11924a,_0x14739d={'IzHcz':function(_0x49aae3,_0x4f07d3){return _0x49aae3(_0x4f07d3);},'JFZfG':function(_0x228be4,_0x45f6d2){return _0x3f3453['vzUyI'](_0x228be4,_0x45f6d2);}},_0x374650=_0x15daa9?.[_0x45b4ba(0x1d0)]?_0x45b4ba(0x1bc):_0x3f3453['YOqYz'],_0x533e54=_0x3f3453[_0x45b4ba(0x1c7)](spawn,_0x3f3453[_0x45b4ba(0x1d1)],_0x3d6abb,{'stdio':_0x374650});let _0x6f5197='';_0x15daa9?.['captureOutput']&&_0x533e54[_0x45b4ba(0x1b5)]&&_0x533e54['stdout']['on']('data',_0x26ab76=>{_0x6f5197+=_0x26ab76['toString']();}),_0x15daa9?.[_0x45b4ba(0x1d0)]&&_0x533e54['stderr']&&_0x533e54['stderr']['on'](_0x3f3453['blkiD'],_0x3e447d=>{_0x6f5197+=_0x3e447d['toString']();}),_0x533e54['on'](_0x45b4ba(0x1bf),_0x30d599=>{const _0x27e796=_0x45b4ba;_0x30d599===0x0?_0x14739d['IzHcz'](_0x1a7b5e,{'success':!![],'output':_0x6f5197}):_0x14739d[_0x27e796(0x1c0)](_0x1a7b5e,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x30d599,'output':_0x6f5197});}),_0x533e54['on'](_0x3f3453[_0x45b4ba(0x1b1)],_0x227dc8=>{const _0x1818e9=_0x45b4ba;_0x1a7b5e({'success':![],'error':_0x227dc8[_0x1818e9(0x1b2)]});});});}export async function isMarketplaceAdded(_0x415044){const _0x393469=_0xcb25,_0x582ca2={'nlXJJ':'plugin'},_0x42b2ef=await runClaudeCommand([_0x582ca2[_0x393469(0x1c4)],'marketplace','list'],{'captureOutput':!![]});if(!_0x42b2ef['success']||!_0x42b2ef[_0x393469(0x1b6)])return![];return _0x42b2ef['output'][_0x393469(0x1c9)](_0x415044);}function _0xcb25(_0x4a424b,_0xe2a68){_0x4a424b=_0x4a424b-0x1b0;const _0x174798=_0x1747();let _0xcb25fa=_0x174798[_0x4a424b];return _0xcb25fa;}export async function isPluginInstalled(_0xbf6731){const _0x33fd49=_0xcb25,_0x56f8c9={'XhPQX':_0x33fd49(0x1c8)},_0x5ccdef=await runClaudeCommand([_0x56f8c9['XhPQX'],'list'],{'captureOutput':!![]});if(!_0x5ccdef['success']||!_0x5ccdef[_0x33fd49(0x1b6)])return![];return _0x5ccdef['output']['includes'](_0xbf6731);}export async function getPluginInfo(_0x28cdea){const _0x42a01f=_0xcb25,_0x1f4e90={'hhubG':function(_0x549d95,_0x2fc0d7,_0x58c80d){return _0x549d95(_0x2fc0d7,_0x58c80d);},'unVrA':'plugin','SOJXM':_0x42a01f(0x1b3),'UwnwC':function(_0x14de59,_0x788f8d){return _0x14de59===_0x788f8d;},'bnLRl':'enabled'},_0x13838e=await _0x1f4e90['hhubG'](runClaudeCommand,[_0x1f4e90['unVrA'],_0x1f4e90[_0x42a01f(0x1c5)]],{'captureOutput':!![]});if(!_0x13838e[_0x42a01f(0x1cd)]||!_0x13838e[_0x42a01f(0x1b6)])return null;if(!_0x13838e['output'][_0x42a01f(0x1c9)](_0x28cdea))return null;const _0x297978={'name':_0x28cdea},_0x36bbf8=_0x13838e['output'][_0x42a01f(0x1c2)](new RegExp(_0x28cdea+_0x42a01f(0x1b4),'i'));_0x36bbf8&&(_0x297978['scope']=_0x36bbf8[0x1][_0x42a01f(0x1c1)]());const _0x32d0c2=_0x13838e['output'][_0x42a01f(0x1c2)](new RegExp(_0x28cdea+_0x42a01f(0x1ce),'i'));_0x32d0c2&&(_0x297978[_0x42a01f(0x1d3)]=_0x32d0c2[0x1]);const _0xc0f827=_0x13838e['output'][_0x42a01f(0x1c2)](new RegExp(_0x28cdea+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0xc0f827&&(_0x297978[_0x42a01f(0x1b8)]=_0x1f4e90[_0x42a01f(0x1c3)](_0xc0f827[0x1]['toLowerCase'](),_0x1f4e90['bnLRl'])),_0x297978;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1cb927=_0xe897;function _0xc335(){const _0x347d72=['subarray','16DnVCuB','2743713mxWARA','256fUqVgW','12mwpwCL','44978gpQKGJ','aes-256-gcm','18348902RBEkSq','7dmsXiB','utf8','7687370mRKFYs','42lcvJvx','getAuthTag','MyObq','553056nSPrrC','final','concat','bBAWC','update','520062qJsrJc','37195njQGsd'];_0xc335=function(){return _0x347d72;};return _0xc335();}function _0xe897(_0x432a34,_0x4d5cea){_0x432a34=_0x432a34-0xa3;const _0xc3352a=_0xc335();let _0xe897f4=_0xc3352a[_0x432a34];return _0xe897f4;}(function(_0x3be5d9,_0x5ccde1){const _0x387695=_0xe897,_0x1e9564=_0x3be5d9();while(!![]){try{const _0x2c625a=-parseInt(_0x387695(0xb7))/0x1+-parseInt(_0x387695(0xae))/0x2*(parseInt(_0x387695(0xb4))/0x3)+parseInt(_0x387695(0xac))/0x4*(-parseInt(_0x387695(0xa8))/0x5)+-parseInt(_0x387695(0xa7))/0x6*(-parseInt(_0x387695(0xb1))/0x7)+-parseInt(_0x387695(0xaa))/0x8*(parseInt(_0x387695(0xab))/0x9)+parseInt(_0x387695(0xb3))/0xa+parseInt(_0x387695(0xb0))/0xb*(parseInt(_0x387695(0xad))/0xc);if(_0x2c625a===_0x5ccde1)break;else _0x1e9564['push'](_0x1e9564['shift']());}catch(_0x5b42d6){_0x1e9564['push'](_0x1e9564['shift']());}}}(_0xc335,0x8b1b8));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x1cb927(0xaf),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x2328e8){const _0x822111={'fzobJ':function(_0x1b41b9,_0x1e92cd,_0x2c0748,_0x478b0a,_0x386a26,_0x128fcb){return _0x1b41b9(_0x1e92cd,_0x2c0748,_0x478b0a,_0x386a26,_0x128fcb);},'pMoeF':'sha256'};return _0x822111['fzobJ'](pbkdf2Sync,_0x2328e8,SALT,0x186a0,KEY_LENGTH,_0x822111['pMoeF']);}export function encrypt(_0x516fe6,_0x4895ba){const _0x28966d=_0x1cb927,_0x37b49f={'QUtap':function(_0x47aa09,_0x26a102){return _0x47aa09(_0x26a102);},'MyObq':function(_0x42b480,_0x292841,_0x435c64,_0x2946f5){return _0x42b480(_0x292841,_0x435c64,_0x2946f5);}},_0x896e9f=_0x37b49f['QUtap'](deriveKey,_0x4895ba),_0x5cc567=randomBytes(IV_LENGTH),_0x308cc7=_0x37b49f[_0x28966d(0xb6)](createCipheriv,ALGORITHM,_0x896e9f,_0x5cc567),_0x2304fa=Buffer['concat']([_0x308cc7[_0x28966d(0xa6)](_0x516fe6,'utf8'),_0x308cc7['final']()]),_0x2321c8=_0x308cc7[_0x28966d(0xb5)]();return Buffer[_0x28966d(0xa4)]([_0x5cc567,_0x2321c8,_0x2304fa]);}export function decrypt(_0x3760c2,_0x121e06){const _0x4e02d0=_0x1cb927,_0x1169c7={'eIVPH':function(_0x395029,_0x3ca777){return _0x395029(_0x3ca777);},'bBAWC':function(_0x578018,_0x134775){return _0x578018+_0x134775;}},_0x3b712c=_0x1169c7['eIVPH'](deriveKey,_0x121e06),_0x3c23ea=_0x3760c2['subarray'](0x0,IV_LENGTH),_0x12ee2c=_0x3760c2[_0x4e02d0(0xa9)](IV_LENGTH,_0x1169c7[_0x4e02d0(0xa5)](IV_LENGTH,TAG_LENGTH)),_0x519952=_0x3760c2[_0x4e02d0(0xa9)](IV_LENGTH+TAG_LENGTH),_0x2acc5d=createDecipheriv(ALGORITHM,_0x3b712c,_0x3c23ea);return _0x2acc5d['setAuthTag'](_0x12ee2c),_0x2acc5d['update'](_0x519952)+_0x2acc5d[_0x4e02d0(0xa3)](_0x4e02d0(0xb2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x56de17=_0x5c43;(function(_0x1d63de,_0x3978d5){const _0x1f00f1=_0x5c43,_0x2d82f1=_0x1d63de();while(!![]){try{const _0x13098a=-parseInt(_0x1f00f1(0x17e))/0x1*(-parseInt(_0x1f00f1(0x186))/0x2)+parseInt(_0x1f00f1(0x1b0))/0x3*(-parseInt(_0x1f00f1(0x1ac))/0x4)+parseInt(_0x1f00f1(0x1a3))/0x5+parseInt(_0x1f00f1(0x17f))/0x6*(-parseInt(_0x1f00f1(0x182))/0x7)+-parseInt(_0x1f00f1(0x181))/0x8*(-parseInt(_0x1f00f1(0x1a5))/0x9)+parseInt(_0x1f00f1(0x19c))/0xa+parseInt(_0x1f00f1(0x185))/0xb*(-parseInt(_0x1f00f1(0x1a8))/0xc);if(_0x13098a===_0x3978d5)break;else _0x2d82f1['push'](_0x2d82f1['shift']());}catch(_0x2f06d5){_0x2d82f1['push'](_0x2d82f1['shift']());}}}(_0x19a8,0xb2b41));import{getToken}from'./keychain.js';function _0x5c43(_0x320484,_0x4245f3){_0x320484=_0x320484-0x17b;const _0x19a8e9=_0x19a8();let _0x5c4312=_0x19a8e9[_0x320484];return _0x5c4312;}import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0x56de17(0x18d),'--apikey',_0x56de17(0x19e),'--password','--pass',_0x56de17(0x1a9),_0x56de17(0x1a0),'--header','--cookie',_0x56de17(0x1b1)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x1bd845){const _0x28a5f8=_0x56de17;return TOKEN_PATTERNS['some'](_0x4f9c51=>_0x4f9c51[_0x28a5f8(0x1a4)](_0x1bd845));}export function sanitizeArgs(_0x7ccd97){const _0x15ee8f=_0x56de17,_0x570a3d=[];let _0x28a5a7=![];for(let _0x9b6ca9=0x0;_0x9b6ca9<_0x7ccd97[_0x15ee8f(0x19d)];_0x9b6ca9++){const _0x2e7eff=_0x7ccd97[_0x9b6ca9];if(_0x28a5a7){_0x570a3d['push']('[REDACTED]'),_0x28a5a7=![];continue;}if(_0x2e7eff['startsWith']('--')||_0x2e7eff['startsWith']('-')){const _0x3a2a57=_0x2e7eff['indexOf']('=');if(_0x3a2a57!==-0x1){const _0x51ca9d=_0x2e7eff[_0x15ee8f(0x189)](0x0,_0x3a2a57)[_0x15ee8f(0x18a)]();if(SENSITIVE_FLAGS['has'](_0x51ca9d)){_0x570a3d[_0x15ee8f(0x19a)](_0x2e7eff[_0x15ee8f(0x189)](0x0,_0x3a2a57)+'=[REDACTED]');continue;}}else{const _0x2b4fd8=_0x2e7eff['toLowerCase']();SENSITIVE_FLAGS[_0x15ee8f(0x1ab)](_0x2b4fd8)&&(_0x28a5a7=!![]);}_0x570a3d['push'](_0x2e7eff);}else looksLikeToken(_0x2e7eff)?_0x570a3d['push']('[REDACTED]'):_0x570a3d[_0x15ee8f(0x19a)](_0x2e7eff);}return _0x570a3d[_0x15ee8f(0x184)]('\x20');}export async function logDesirePath(_0x5e8044){const _0x35a611=_0x56de17,_0x3b664c={'DWEnx':function(_0x46c3b8){return _0x46c3b8();},'vSBmg':'has_token','SMAtZ':_0x35a611(0x191),'dPMih':_0x35a611(0x198),'eZPVP':function(_0x3c951a,_0x56aa1c,_0x40f461){return _0x3c951a(_0x56aa1c,_0x40f461);},'SJXmS':_0x35a611(0x1aa)};try{const _0x3edc16=await _0x3b664c[_0x35a611(0x1ae)](getToken)[_0x35a611(0x1af)](()=>null),_0x510bdc=getApiBaseUrl(),_0x21d0ad=getCurrentVersion(),_0x143086=_0x3edc16?_0x3b664c['vSBmg']:_0x3b664c[_0x35a611(0x190)],_0x1a732c={..._0x5e8044[_0x35a611(0x1a1)],'authStatus':_0x143086,'isTty':process['stdout']['isTTY']??![]},_0x5780dd={'Content-Type':_0x3b664c[_0x35a611(0x18c)]};_0x3edc16&&(_0x5780dd['Authorization']='Bearer\x20'+_0x3edc16);const _0x29c5ee={'rawCommand':_0x5e8044[_0x35a611(0x187)],'errorMessage':_0x5e8044['errorMessage'],'errorType':_0x5e8044['errorType'],'featureId':_0x5e8044['featureId'],'sessionId':_0x5e8044['sessionId'],'metadata':_0x1a732c,'cliVersion':_0x21d0ad};process['env'][_0x35a611(0x194)]&&(console[_0x35a611(0x17d)]('[desire-path]\x20Sending\x20log\x20to\x20'+_0x510bdc+'/api/v1/mcp/desire-path-logs'),console[_0x35a611(0x17d)](_0x35a611(0x18f)+JSON[_0x35a611(0x1a2)](_0x29c5ee,null,0x2))),await _0x3b664c[_0x35a611(0x180)](fetch,_0x510bdc+'/api/v1/mcp/desire-path-logs',{'method':_0x3b664c['SJXmS'],'headers':_0x5780dd,'body':JSON['stringify'](_0x29c5ee)});}catch(_0x546ecc){process['env'][_0x35a611(0x194)]&&console[_0x35a611(0x17d)](_0x35a611(0x188)+_0x546ecc);}}export function getErrorType(_0x19a83e,_0x287977){const _0x318546=_0x56de17,_0x2ed6bf={'BHCDd':_0x318546(0x1a6),'UfTiF':_0x318546(0x196),'qbhRS':'unknown_command','AszwJ':'Unknown\x20argument','XBfWf':_0x318546(0x1ad),'IymLL':_0x318546(0x1a7),'hHzkp':_0x318546(0x19b),'lmmrL':'syntax_error'};if(_0x287977)return'runtime_error';if(!_0x19a83e)return _0x2ed6bf['BHCDd'];if(_0x19a83e['includes'](_0x2ed6bf[_0x318546(0x192)]))return _0x2ed6bf[_0x318546(0x197)];if(_0x19a83e[_0x318546(0x19f)](_0x2ed6bf[_0x318546(0x17b)]))return _0x2ed6bf[_0x318546(0x193)];if(_0x19a83e[_0x318546(0x19f)](_0x2ed6bf[_0x318546(0x195)]))return _0x2ed6bf[_0x318546(0x17c)];if(_0x19a83e['includes'](_0x318546(0x18b)))return'invalid_option_value';if(_0x19a83e[_0x318546(0x19f)](_0x318546(0x199)))return _0x318546(0x18e);return _0x2ed6bf[_0x318546(0x183)];}function _0x19a8(){const _0x402841=['includes','--authorization','metadata','stringify','2548360MzpksJ','test','21213ZTnuQt','unknown','Not\x20enough\x20non-option\x20arguments','4776gGVclr','--auth','POST','has','110312mNJQFG','unknown_argument','DWEnx','catch','42eJmTSq','--credentials','AszwJ','hHzkp','error','1440809dsxWTn','30WageUo','eZPVP','4448gfsFgu','194642IVZLhs','lmmrL','join','91366iedCGa','2jnVsqh','rawCommand','[desire-path]\x20Failed\x20to\x20send:\x20','slice','toLowerCase','Invalid\x20values','dPMih','--api-key','missing_option','[desire-path]\x20Payload:\x20','SMAtZ','no_token','UfTiF','XBfWf','DEBUG','IymLL','Unknown\x20command','qbhRS','application/json','Missing\x20required\x20argument','push','missing_required_argument','13019060Qirglh','length','--key'];_0x19a8=function(){return _0x402841;};return _0x19a8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x20de01=_0x431a;(function(_0x3398c4,_0x2050a3){const _0xfc5f28=_0x431a,_0x4b69a4=_0x3398c4();while(!![]){try{const _0x3f6bd4=-parseInt(_0xfc5f28(0xc2))/0x1+parseInt(_0xfc5f28(0xd2))/0x2+parseInt(_0xfc5f28(0x103))/0x3+parseInt(_0xfc5f28(0xcb))/0x4+-parseInt(_0xfc5f28(0xbe))/0x5*(parseInt(_0xfc5f28(0xfc))/0x6)+-parseInt(_0xfc5f28(0x104))/0x7+parseInt(_0xfc5f28(0xd4))/0x8*(parseInt(_0xfc5f28(0xe7))/0x9);if(_0x3f6bd4===_0x2050a3)break;else _0x4b69a4['push'](_0x4b69a4['shift']());}catch(_0x3a81e3){_0x4b69a4['push'](_0x4b69a4['shift']());}}}(_0x5b7b,0xad401));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x20de01(0xc3),WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';export async function requestDeviceCode(_0x24298a){const _0x2c60da=_0x20de01,_0x226d02=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x2c60da(0xf4),'headers':{'Content-Type':_0x2c60da(0xe3)},'body':new URLSearchParams({'client_id':_0x24298a})});if(!_0x226d02['ok']){const _0x30ffef=await _0x226d02['text']();throw new Error(_0x2c60da(0x108)+_0x226d02[_0x2c60da(0xc7)]+'\x20'+_0x30ffef);}return _0x226d02['json']();}export async function pollForTokens(_0x42dc00,_0x46d55e,_0x139218,_0x397322){const _0x10e10e=_0x20de01,_0x46dd5d={'aoUtJ':function(_0x316f36,_0x1a3882){return _0x316f36+_0x1a3882;},'RINBA':function(_0x130838,_0x12320a){return _0x130838*_0x12320a;},'OOTrb':function(_0x295c7a,_0x37fb58){return _0x295c7a(_0x37fb58);},'ioHWQ':function(_0x5e1c52,_0x47c3e5,_0xbfb9a){return _0x5e1c52(_0x47c3e5,_0xbfb9a);},'oEFKs':_0x10e10e(0xf4),'ayiAc':_0x10e10e(0xe3),'vzeJZ':_0x10e10e(0xfe),'WiIyA':function(_0x5abdb2,_0x2f002b){return _0x5abdb2===_0x2f002b;},'MxOxx':'slow_down','XsceR':_0x10e10e(0xf8),'TxWKJ':_0x10e10e(0xe0)},_0x7e2437=_0x46dd5d[_0x10e10e(0xe6)](Date[_0x10e10e(0xe1)](),_0x397322*0x3e8);let _0x835419=_0x46dd5d[_0x10e10e(0xec)](_0x139218,0x3e8);while(Date['now']()<_0x7e2437){await _0x46dd5d[_0x10e10e(0xc5)](sleep,_0x835419);const _0x377a6e=await _0x46dd5d['ioHWQ'](fetch,WORKOS_TOKEN_URL,{'method':_0x46dd5d[_0x10e10e(0x105)],'headers':{'Content-Type':_0x46dd5d[_0x10e10e(0xc0)]},'body':new URLSearchParams({'client_id':_0x42dc00,'device_code':_0x46d55e,'grant_type':_0x46dd5d[_0x10e10e(0xd6)]})});if(_0x377a6e['ok'])return _0x377a6e['json']();const _0x383839=await _0x377a6e[_0x10e10e(0xda)]();if(_0x383839[_0x10e10e(0xd9)]==='authorization_pending')continue;if(_0x46dd5d[_0x10e10e(0x102)](_0x383839['error'],_0x46dd5d['MxOxx'])){_0x835419+=0x3e8;continue;}throw new Error(_0x383839['error_description']||_0x383839['error']||_0x46dd5d['XsceR']);}throw new Error(_0x46dd5d[_0x10e10e(0xdb)]);}async function fetchUserProfile(_0x3dc63d){const _0x5627a0={'BIFJJ':function(_0x56d298){return _0x56d298();},'jfbDQ':function(_0x51d1dc,_0x257323,_0x5e6ec2){return _0x51d1dc(_0x257323,_0x5e6ec2);}},_0x6962d4=_0x5627a0['BIFJJ'](getApiBaseUrl);try{const _0x5ac650=await _0x5627a0['jfbDQ'](fetch,_0x6962d4+'/organization/me',{'method':'GET','headers':{'workos-token':_0x3dc63d}});if(_0x5ac650['ok'])return _0x5ac650['json']();}catch{}return null;}function buildKeyName(_0x1e3a1f,_0x105a6d){const _0x59d463=_0x20de01,_0xb5cf83={'jIseg':function(_0x3b9f4c,_0x3e1e00){return _0x3b9f4c===_0x3e1e00;},'pJigm':function(_0x295ec5,_0x1688fe){return _0x295ec5+_0x1688fe;}},_0x40c730=_0x105a6d[_0x59d463(0xcf)](_0x2c12fe=>_0x2c12fe['name']===_0x1e3a1f||_0x2c12fe[_0x59d463(0xe8)][_0x59d463(0xf6)](_0x1e3a1f+'\x20('));if(_0xb5cf83[_0x59d463(0xdf)](_0x40c730[_0x59d463(0xce)],0x0))return _0x1e3a1f;return _0x1e3a1f+'\x20('+_0xb5cf83['pJigm'](_0x40c730['length'],0x1)+')';}export async function provisionApiKey(_0x46a654){const _0x13b4f5=_0x20de01,_0x533b89={'WeWAk':function(_0x27ef79){return _0x27ef79();},'rGUqw':_0x13b4f5(0xd3),'rCpBQ':function(_0x3b16e2,_0x564186){return _0x3b16e2(_0x564186);},'zkxDx':function(_0x10cbbd,_0x546764,_0x5c4aee){return _0x10cbbd(_0x546764,_0x5c4aee);},'mVmKZ':_0x13b4f5(0xed),'xwXXQ':function(_0x4dc64e,_0x4d43c0,_0x4265fc){return _0x4dc64e(_0x4d43c0,_0x4265fc);},'tSQBT':function(_0x9fd3af,_0x2e3fa7,_0x44309b){return _0x9fd3af(_0x2e3fa7,_0x44309b);},'HBobn':_0x13b4f5(0xca)},_0x2be100=_0x533b89[_0x13b4f5(0xe5)](getApiBaseUrl),_0x2a4a96={'Content-Type':_0x533b89[_0x13b4f5(0xdc)],'workos-token':_0x46a654},_0x5cc356=await _0x533b89[_0x13b4f5(0x106)](fetchUserProfile,_0x46a654),_0x291329=_0x5cc356?.[_0x13b4f5(0xfb)]||_0x5cc356?.[_0x13b4f5(0xf7)]?.['split']('@')[0x0],_0x3d82f8=_0x291329?_0x291329+_0x13b4f5(0xcd):_0x13b4f5(0x100);let _0x25be45=[];try{const _0x5873b0=await _0x533b89['zkxDx'](fetch,_0x2be100+'/api-keys',{'method':_0x533b89[_0x13b4f5(0xd7)],'headers':_0x2a4a96});if(_0x5873b0['ok']){const _0x50f8f1=await _0x5873b0[_0x13b4f5(0xda)]();_0x25be45=_0x50f8f1['apiKeys'];}}catch{}const _0x24e539=_0x533b89[_0x13b4f5(0xc8)](buildKeyName,_0x3d82f8,_0x25be45),_0x2033fc=await _0x533b89['tSQBT'](fetch,_0x2be100+'/api-keys',{'method':_0x13b4f5(0xf4),'headers':_0x2a4a96,'body':JSON['stringify']({'name':_0x24e539,'scope':_0x533b89['HBobn']})});if(!_0x2033fc['ok']){const _0x191398=await _0x2033fc['text']();throw new Error(_0x13b4f5(0xfd)+_0x2033fc[_0x13b4f5(0xc7)]+'\x20'+_0x191398);}const _0x59fe11=await _0x2033fc['json']();return _0x59fe11[_0x13b4f5(0xf5)][_0x13b4f5(0xf2)];}function _0x431a(_0x115af4,_0x268479){_0x115af4=_0x115af4-0xbe;const _0x5b7b93=_0x5b7b();let _0x431a55=_0x5b7b93[_0x115af4];return _0x431a55;}export function openBrowser(_0x5dc104){const _0xbf163d=_0x20de01,_0x832f28={'dQrtl':'darwin','GXEpU':'win32','wffqN':'start','beliD':'xdg-open','oGAyx':function(_0x44aa37,_0x227de9){return _0x44aa37(_0x227de9);}},_0x310ba3=process['platform'],_0x591e3c=_0x310ba3===_0x832f28['dQrtl']?_0xbf163d(0xff):_0x310ba3===_0x832f28['GXEpU']?_0x832f28['wffqN']:_0x832f28['beliD'];_0x832f28[_0xbf163d(0xfa)](exec,_0x591e3c+'\x20'+JSON[_0xbf163d(0xd5)](_0x5dc104));}function decodeJwtPayload(_0x4a2612){const _0x20b5fe=_0x20de01,_0x28b60e=_0x4a2612['split']('.');if(_0x28b60e[_0x20b5fe(0xce)]!==0x3)throw new Error('Invalid\x20JWT\x20format');const _0x35855c=Buffer[_0x20b5fe(0xf3)](_0x28b60e[0x1],_0x20b5fe(0xe2))[_0x20b5fe(0xf0)]('utf-8');return JSON[_0x20b5fe(0x107)](_0x35855c);}function _0x5b7b(){const _0x58c77f=['Failed\x20to\x20provision\x20API\x20key:\x20','urn:ietf:params:oauth:grant-type:device_code','open','CLI\x20Key','Provisioning\x20API\x20key...','WiIyA','2129223sUQhPs','5172790jVKyKQ','oEFKs','rCpBQ','parse','Failed\x20to\x20request\x20device\x20code:\x20','5ebJwlB','hfhpJ','ayiAc','stdout','329355VsYGFZ','https://api.workos.com/user_management/authorize/device','user_code','OOTrb','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','status','xwXXQ','verification_uri_complete','mcp:write','3776368OpeJnb','write','\x27s\x20CLI\x20Key','length','filter','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','NMnuP','674936MobSyS','application/json','13896HqENIx','stringify','vzeJZ','mVmKZ','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','error','json','TxWKJ','rGUqw','pUGtZ','slmvj','jIseg','Device\x20authorization\x20timed\x20out','now','base64url','application/x-www-form-urlencoded','device_code','WeWAk','aoUtJ','207kjVJxu','name','refresh_token','log','access_token','RINBA','GET','workosClientId','/organization/self-serve-signup','toString','syBEC','token','from','POST','apiKey','startsWith','email','Authentication\x20failed','Failed\x20to\x20create\x20organization:\x20','oGAyx','firstName','1519764scMAul'];_0x5b7b=function(){return _0x58c77f;};return _0x5b7b();}async function selfServeSignup(_0x559de2){const _0x180421=_0x20de01,_0x492c48={'VtYDo':'application/json'},_0x556a5e=getApiBaseUrl(),_0x25980b=await fetch(_0x556a5e+_0x180421(0xef),{'method':_0x180421(0xf4),'headers':{'Content-Type':_0x492c48['VtYDo'],'workos-token':_0x559de2}});if(!_0x25980b['ok']){const _0x1b2e82=await _0x25980b['text']();throw new Error(_0x180421(0xf9)+_0x25980b['status']+'\x20'+_0x1b2e82);}return _0x25980b[_0x180421(0xda)]();}async function refreshTokenWithOrg(_0x4850d2,_0x3140b6,_0x58c20b){const _0x1946af=_0x20de01,_0x4b7233={'YgkId':'POST','hfhpJ':'application/x-www-form-urlencoded','pUGtZ':'refresh_token'},_0x28fe67=await fetch(WORKOS_TOKEN_URL,{'method':_0x4b7233['YgkId'],'headers':{'Content-Type':_0x4b7233[_0x1946af(0xbf)]},'body':new URLSearchParams({'client_id':_0x4850d2,'grant_type':_0x4b7233[_0x1946af(0xdd)],'refresh_token':_0x3140b6,'organization_id':_0x58c20b})});if(!_0x28fe67['ok']){const _0x33ca17=await _0x28fe67['text']();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x28fe67['status']+'\x20'+_0x33ca17);}return _0x28fe67[_0x1946af(0xda)]();}export async function runDeviceAuthFlow(){const _0x2b422c=_0x20de01,_0x157e46={'syBEC':_0x2b422c(0xd8),'Tgidj':_0x2b422c(0xd0),'slmvj':function(_0x54f1ee,_0xe6b6c2,_0x313a4d,_0x1a1d6b,_0x51a7c0){return _0x54f1ee(_0xe6b6c2,_0x313a4d,_0x1a1d6b,_0x51a7c0);},'HvShU':function(_0x341419,_0x438309){return _0x341419(_0x438309);},'NMnuP':_0x2b422c(0x101),'HwfIg':function(_0xb7cdf8,_0x2d538e){return _0xb7cdf8(_0x2d538e);}},_0x22fa29=getCurrentEnvironment(),_0x138cae=ENVIRONMENT_CONFIGS[_0x22fa29][_0x2b422c(0xee)],_0x4e706c=await requestDeviceCode(_0x138cae);console['log'](_0x157e46[_0x2b422c(0xf1)]),console[_0x2b422c(0xea)](_0x157e46['Tgidj']),openBrowser(_0x4e706c['verification_uri_complete']),console['log'](_0x2b422c(0xc6)+_0x4e706c[_0x2b422c(0xc9)]),console[_0x2b422c(0xea)]('Code:\x20'+_0x4e706c[_0x2b422c(0xc4)]+'\x0a'),process[_0x2b422c(0xc1)]['write']('Waiting\x20for\x20authentication...');let _0x521c2d=await _0x157e46[_0x2b422c(0xde)](pollForTokens,_0x138cae,_0x4e706c[_0x2b422c(0xe4)],_0x4e706c['interval'],_0x4e706c['expires_in']);console['log']('\x20✓');const _0x475379=_0x157e46['HvShU'](decodeJwtPayload,_0x521c2d[_0x2b422c(0xeb)]);if(!_0x475379['org_id']){process['stdout'][_0x2b422c(0xcc)]('Setting\x20up\x20your\x20organization...');const {organizationId:_0x3f9791}=await selfServeSignup(_0x521c2d['access_token']);_0x521c2d=await refreshTokenWithOrg(_0x138cae,_0x521c2d[_0x2b422c(0xe9)],_0x3f9791),console['log']('\x20✓');}process[_0x2b422c(0xc1)][_0x2b422c(0xcc)](_0x157e46[_0x2b422c(0xd1)]);const _0x1f1dc6=await provisionApiKey(_0x521c2d['access_token']);return console['log']('\x20✓'),await storeToken(_0x1f1dc6),_0x521c2d['refresh_token']&&await _0x157e46['HwfIg'](storeRefreshToken,_0x521c2d[_0x2b422c(0xe9)]),_0x1f1dc6;}function sleep(_0x5951b6){return new Promise(_0x24443d=>setTimeout(_0x24443d,_0x5951b6));}
|
|
1
|
+
const _0x1ed1c5=_0x521f;(function(_0x1fe0ba,_0x3a39cd){const _0x11348d=_0x521f,_0x5e03a2=_0x1fe0ba();while(!![]){try{const _0x31783b=-parseInt(_0x11348d(0x21e))/0x1*(-parseInt(_0x11348d(0x210))/0x2)+parseInt(_0x11348d(0x1ec))/0x3+parseInt(_0x11348d(0x224))/0x4*(parseInt(_0x11348d(0x1fc))/0x5)+parseInt(_0x11348d(0x217))/0x6*(parseInt(_0x11348d(0x206))/0x7)+parseInt(_0x11348d(0x1e5))/0x8*(parseInt(_0x11348d(0x204))/0x9)+parseInt(_0x11348d(0x1ff))/0xa*(-parseInt(_0x11348d(0x1e7))/0xb)+-parseInt(_0x11348d(0x1f2))/0xc;if(_0x31783b===_0x3a39cd)break;else _0x5e03a2['push'](_0x5e03a2['shift']());}catch(_0x256aac){_0x5e03a2['push'](_0x5e03a2['shift']());}}}(_0x6918,0x5019a));import{exec}from'child_process';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';function _0x6918(){const _0x2ce2df=['mcp:write','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','WOhnt','write','CLI\x20Key','apiKeys','365082JUXGGq','https://api.workos.com/user_management/authenticate','oTaOP','expires_in','length','application/json','status','3dyUlSV','POST','from','stringify','REqJQ','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','3872ScMIeK','LKRxT','Failed\x20to\x20provision\x20API\x20key:\x20','start','Failed\x20to\x20create\x20organization:\x20','org_id','workosClientId','authorization_pending','verification_uri_complete','log','8ETKkkN','stdout','22bXoJFs','/organization/self-serve-signup','LtOGh','nccrr','GET','1259361hdeYVS','json','CVgCr','Code:\x20','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','hcbkz','15299748keUZLR','GOrUG','apiKey','application/x-www-form-urlencoded','Provisioning\x20API\x20key...','device_code','text','parse','https://api.workos.com/user_management/authorize/device','toString','3130fJIsVX','Device\x20authorization\x20timed\x20out','access_token','590830EfOCtI','interval','HEcpD','Waiting\x20for\x20authentication...','refresh_token','217269SCkjdF','split','14gInmEB','xdg-open','KFxQL','startsWith','iyIvy','pivGi','now','/api-keys','token','open','366430PByYRH'];_0x6918=function(){return _0x2ce2df;};return _0x6918();}const WORKOS_DEVICE_AUTH_URL=_0x1ed1c5(0x1fa),WORKOS_TOKEN_URL=_0x1ed1c5(0x218);export async function requestDeviceCode(_0x181c65){const _0x1d9d3c=_0x1ed1c5,_0x3f2ed5={'rCFBg':'application/x-www-form-urlencoded'},_0xa4cf9d=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x1d9d3c(0x21f),'headers':{'Content-Type':_0x3f2ed5['rCFBg']},'body':new URLSearchParams({'client_id':_0x181c65})});if(!_0xa4cf9d['ok']){const _0x3d7996=await _0xa4cf9d[_0x1d9d3c(0x1f8)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0xa4cf9d['status']+'\x20'+_0x3d7996);}return _0xa4cf9d[_0x1d9d3c(0x1ed)]();}export async function pollForTokens(_0x4f4966,_0x3c8a9f,_0x27ef0c,_0x3d271a){const _0x24b519=_0x1ed1c5,_0x383ba6={'mMtCZ':function(_0x197602,_0x4901c2){return _0x197602+_0x4901c2;},'oTaOP':function(_0x37bad8,_0x555d11){return _0x37bad8*_0x555d11;},'cbiTm':function(_0x54927a,_0xe47000){return _0x54927a(_0xe47000);},'pivGi':'urn:ietf:params:oauth:grant-type:device_code'},_0x48c94b=_0x383ba6['mMtCZ'](Date[_0x24b519(0x20c)](),_0x383ba6[_0x24b519(0x219)](_0x3d271a,0x3e8));let _0x3db02f=_0x383ba6[_0x24b519(0x219)](_0x27ef0c,0x3e8);while(Date[_0x24b519(0x20c)]()<_0x48c94b){await _0x383ba6['cbiTm'](sleep,_0x3db02f);const _0xa4386a=await fetch(WORKOS_TOKEN_URL,{'method':_0x24b519(0x21f),'headers':{'Content-Type':_0x24b519(0x1f5)},'body':new URLSearchParams({'client_id':_0x4f4966,'device_code':_0x3c8a9f,'grant_type':_0x383ba6[_0x24b519(0x20b)]})});if(_0xa4386a['ok'])return _0xa4386a['json']();const _0x494043=await _0xa4386a[_0x24b519(0x1ed)]();if(_0x494043['error']===_0x24b519(0x1e2))continue;if(_0x494043['error']==='slow_down'){_0x3db02f+=0x3e8;continue;}throw new Error(_0x494043['error_description']||_0x494043['error']||'Authentication\x20failed');}throw new Error(_0x24b519(0x1fd));}async function fetchUserProfile(_0x6b58d3){const _0x2834b1=_0x1ed1c5,_0x2f14bd={'hcbkz':function(_0x31b811,_0x440143,_0x14bddf){return _0x31b811(_0x440143,_0x14bddf);},'wOhZr':_0x2834b1(0x1eb)},_0x6f4483=getApiBaseUrl();try{const _0x1c6363=await _0x2f14bd[_0x2834b1(0x1f1)](fetch,_0x6f4483+'/organization/me',{'method':_0x2f14bd['wOhZr'],'headers':{'workos-token':_0x6b58d3}});if(_0x1c6363['ok'])return _0x1c6363['json']();}catch{}return null;}function buildKeyName(_0x28575c,_0x5d8e8a){const _0x5430fb=_0x1ed1c5,_0xeb9f9={'KFxQL':function(_0xc1f2bd,_0x249cb5){return _0xc1f2bd+_0x249cb5;}},_0x494dd9=_0x5d8e8a['filter'](_0x210c3d=>_0x210c3d['name']===_0x28575c||_0x210c3d['name'][_0x5430fb(0x209)](_0x28575c+'\x20('));if(_0x494dd9[_0x5430fb(0x21b)]===0x0)return _0x28575c;return _0x28575c+'\x20('+_0xeb9f9[_0x5430fb(0x208)](_0x494dd9['length'],0x1)+')';}export async function provisionApiKey(_0x4d33b9){const _0x12da92=_0x1ed1c5,_0x375fb3={'LKRxT':function(_0x4e04be){return _0x4e04be();},'AzAfi':_0x12da92(0x215),'WOhnt':function(_0x57968c,_0x223a5f,_0x5c8760){return _0x57968c(_0x223a5f,_0x5c8760);}},_0x5d7855=_0x375fb3[_0x12da92(0x225)](getApiBaseUrl),_0x4b2c28={'Content-Type':_0x12da92(0x21c),'workos-token':_0x4d33b9},_0x1fd335=await fetchUserProfile(_0x4d33b9),_0x3f35d1=_0x1fd335?.['firstName']||_0x1fd335?.['email']?.[_0x12da92(0x205)]('@')[0x0],_0x2eac8c=_0x3f35d1?_0x3f35d1+'\x27s\x20CLI\x20Key':_0x375fb3['AzAfi'];let _0x1cffad=[];try{const _0x208006=await fetch(_0x5d7855+_0x12da92(0x20d),{'method':_0x12da92(0x1eb),'headers':_0x4b2c28});if(_0x208006['ok']){const _0x35e8c5=await _0x208006[_0x12da92(0x1ed)]();_0x1cffad=_0x35e8c5[_0x12da92(0x216)];}}catch{}const _0x222cb0=buildKeyName(_0x2eac8c,_0x1cffad),_0x549cc7=await _0x375fb3[_0x12da92(0x213)](fetch,_0x5d7855+'/api-keys',{'method':'POST','headers':_0x4b2c28,'body':JSON[_0x12da92(0x221)]({'name':_0x222cb0,'scope':_0x12da92(0x211)})});if(!_0x549cc7['ok']){const _0x25fe0f=await _0x549cc7['text']();throw new Error(_0x12da92(0x1dd)+_0x549cc7['status']+'\x20'+_0x25fe0f);}const _0x1cb7fd=await _0x549cc7[_0x12da92(0x1ed)]();return _0x1cb7fd[_0x12da92(0x1f4)][_0x12da92(0x20e)];}function _0x521f(_0x5ebc63,_0x4d5f34){_0x5ebc63=_0x5ebc63-0x1dd;const _0x691825=_0x6918();let _0x521f9e=_0x691825[_0x5ebc63];return _0x521f9e;}export function openBrowser(_0x1728c9){const _0xa91322=_0x1ed1c5,_0x1dc046={'nccrr':function(_0x127684,_0x3db4e5){return _0x127684===_0x3db4e5;},'GOrUG':_0xa91322(0x20f),'fDVnP':function(_0x24ed3c,_0x3a8ef0){return _0x24ed3c(_0x3a8ef0);}},_0x3f088b=process['platform'],_0x26babe=_0x1dc046['nccrr'](_0x3f088b,'darwin')?_0x1dc046[_0xa91322(0x1f3)]:_0x1dc046[_0xa91322(0x1ea)](_0x3f088b,'win32')?_0xa91322(0x1de):_0xa91322(0x207);_0x1dc046['fDVnP'](exec,_0x26babe+'\x20'+JSON[_0xa91322(0x221)](_0x1728c9));}function decodeJwtPayload(_0x382b33){const _0x7bd4a4=_0x1ed1c5,_0x85df50={'REqJQ':function(_0x23e294,_0xf69e86){return _0x23e294!==_0xf69e86;},'iVnMV':'base64url','VaqxS':'utf-8'},_0x14d64b=_0x382b33[_0x7bd4a4(0x205)]('.');if(_0x85df50[_0x7bd4a4(0x222)](_0x14d64b[_0x7bd4a4(0x21b)],0x3))throw new Error('Invalid\x20JWT\x20format');const _0x1545f9=Buffer[_0x7bd4a4(0x220)](_0x14d64b[0x1],_0x85df50['iVnMV'])[_0x7bd4a4(0x1fb)](_0x85df50['VaqxS']);return JSON[_0x7bd4a4(0x1f9)](_0x1545f9);}async function selfServeSignup(_0x384907){const _0x3dff41=_0x1ed1c5,_0x53b720={'LtOGh':function(_0x1bb99b){return _0x1bb99b();}},_0x5e970b=_0x53b720[_0x3dff41(0x1e9)](getApiBaseUrl),_0x1c82a2=await fetch(_0x5e970b+_0x3dff41(0x1e8),{'method':'POST','headers':{'Content-Type':'application/json','workos-token':_0x384907}});if(!_0x1c82a2['ok']){const _0x446eb8=await _0x1c82a2['text']();throw new Error(_0x3dff41(0x1df)+_0x1c82a2[_0x3dff41(0x21d)]+'\x20'+_0x446eb8);}return _0x1c82a2[_0x3dff41(0x1ed)]();}async function refreshTokenWithOrg(_0x4d2a17,_0x2c4771,_0x33712f){const _0x54368e=_0x1ed1c5,_0x11071b={'EyWkW':_0x54368e(0x21f),'HEcpD':_0x54368e(0x1f5),'iyIvy':'refresh_token'},_0x2f5602=await fetch(WORKOS_TOKEN_URL,{'method':_0x11071b['EyWkW'],'headers':{'Content-Type':_0x11071b[_0x54368e(0x201)]},'body':new URLSearchParams({'client_id':_0x4d2a17,'grant_type':_0x11071b[_0x54368e(0x20a)],'refresh_token':_0x2c4771,'organization_id':_0x33712f})});if(!_0x2f5602['ok']){const _0x31df66=await _0x2f5602[_0x54368e(0x1f8)]();throw new Error(_0x54368e(0x1f0)+_0x2f5602['status']+'\x20'+_0x31df66);}return _0x2f5602['json']();}export async function runDeviceAuthFlow(){const _0x404fbb=_0x1ed1c5,_0x4b3f71={'CVgCr':function(_0x3e3e72){return _0x3e3e72();},'kJFZx':function(_0x313459,_0x55576c,_0x17195e,_0x240b78){return _0x313459(_0x55576c,_0x17195e,_0x240b78);}},_0x5b2c3c=_0x4b3f71[_0x404fbb(0x1ee)](getCurrentEnvironment),_0x104e39=ENVIRONMENT_CONFIGS[_0x5b2c3c][_0x404fbb(0x1e1)],_0x2cff25=await requestDeviceCode(_0x104e39);console['log'](_0x404fbb(0x212)),console[_0x404fbb(0x1e4)](_0x404fbb(0x223)),openBrowser(_0x2cff25[_0x404fbb(0x1e3)]),console[_0x404fbb(0x1e4)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x2cff25[_0x404fbb(0x1e3)]),console[_0x404fbb(0x1e4)](_0x404fbb(0x1ef)+_0x2cff25['user_code']+'\x0a'),process[_0x404fbb(0x1e6)][_0x404fbb(0x214)](_0x404fbb(0x202));let _0x49bc10=await pollForTokens(_0x104e39,_0x2cff25[_0x404fbb(0x1f7)],_0x2cff25[_0x404fbb(0x200)],_0x2cff25[_0x404fbb(0x21a)]);console[_0x404fbb(0x1e4)]('\x20✓');const _0x138aee=decodeJwtPayload(_0x49bc10[_0x404fbb(0x1fe)]);if(!_0x138aee[_0x404fbb(0x1e0)]){process[_0x404fbb(0x1e6)][_0x404fbb(0x214)]('Setting\x20up\x20your\x20organization...');const {organizationId:_0xa31bea}=await selfServeSignup(_0x49bc10['access_token']);_0x49bc10=await _0x4b3f71['kJFZx'](refreshTokenWithOrg,_0x104e39,_0x49bc10[_0x404fbb(0x203)],_0xa31bea),console['log']('\x20✓');}process[_0x404fbb(0x1e6)][_0x404fbb(0x214)](_0x404fbb(0x1f6));const _0x3dfa18=await provisionApiKey(_0x49bc10[_0x404fbb(0x1fe)]);return console[_0x404fbb(0x1e4)]('\x20✓'),await storeToken(_0x3dfa18),_0x49bc10[_0x404fbb(0x203)]&&await storeRefreshToken(_0x49bc10['refresh_token']),_0x3dfa18;}function sleep(_0x4641bc){return new Promise(_0x10c8a9=>setTimeout(_0x10c8a9,_0x4641bc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1b5bfd=_0x3018;(function(_0x26caf5,_0x42cf14){const _0x3ae3c4=_0x3018,_0x558fb2=_0x26caf5();while(!![]){try{const _0xe8e5bb=parseInt(_0x3ae3c4(0x194))/0x1+-parseInt(_0x3ae3c4(0x18b))/0x2+-parseInt(_0x3ae3c4(0x195))/0x3+-parseInt(_0x3ae3c4(0x189))/0x4*(-parseInt(_0x3ae3c4(0x187))/0x5)+parseInt(_0x3ae3c4(0x19c))/0x6+-parseInt(_0x3ae3c4(0x198))/0x7+parseInt(_0x3ae3c4(0x197))/0x8;if(_0xe8e5bb===_0x42cf14)break;else _0x558fb2['push'](_0x558fb2['shift']());}catch(_0x1122ee){_0x558fb2['push'](_0x558fb2['shift']());}}}(_0x4cc7,0x37609));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x1b5bfd(0x191),'workosClientId':_0x1b5bfd(0x19b),'aiProxyUrl':_0x1b5bfd(0x190)},'staging':{'apiBaseUrl':_0x1b5bfd(0x192),'workosClientId':_0x1b5bfd(0x188),'aiProxyUrl':_0x1b5bfd(0x18c)},'local':{'apiBaseUrl':_0x1b5bfd(0x18d),'workosClientId':_0x1b5bfd(0x188),'aiProxyUrl':_0x1b5bfd(0x196)}};export const DEFAULT_ENVIRONMENT=_0x1b5bfd(0x18e);export function isValidEnvironment(_0x50b3cf){const _0x3a16fe=_0x1b5bfd,_0x541a1e={'VvqRJ':function(_0x4fb170,_0x5c9c56){return _0x4fb170===_0x5c9c56;},'HfANV':function(_0x429523,_0x4f152e){return _0x429523===_0x4f152e;},'twjcF':_0x3a16fe(0x193)};return _0x541a1e['VvqRJ'](_0x50b3cf,_0x3a16fe(0x18e))||_0x541a1e[_0x3a16fe(0x18f)](_0x50b3cf,_0x541a1e[_0x3a16fe(0x18a)])||_0x50b3cf===_0x3a16fe(0x19a);}function _0x3018(_0x21ee83,_0x462566){_0x21ee83=_0x21ee83-0x187;const _0x4cc7a=_0x4cc7();let _0x3018b1=_0x4cc7a[_0x21ee83];return _0x3018b1;}export function getCurrentEnvironment(){const _0x1f6c4e=process['env']['RANGER_CLI_ENV'];if(_0x1f6c4e&&isValidEnvironment(_0x1f6c4e))return _0x1f6c4e;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x39f4da={'SbMnn':function(_0x48fba1){return _0x48fba1();}};return ENVIRONMENT_CONFIGS[_0x39f4da['SbMnn'](getCurrentEnvironment)]['apiBaseUrl'];}function _0x4cc7(){const _0x12d037=['client_01J9CBYM2DKWV9HM17D95Z540K','4wxPNCG','twjcF','611914JpmVRa','https://ai-proxy-301751771437.us-central1.run.app','http://localhost:8080','prod','HfANV','https://ai-proxy-716115358910.us-central1.run.app','https://api.ranger.net','https://api.staging.ranger.net','staging','369914orHsxd','267252CqBJaM','http://localhost:8090','1636104nTXMVH','1225784qEERcB','aiProxyUrl','local','client_01J9CBYM7M5ZETCF7G6614DXR2','1134708sNPxiH','167165cZYsuc'];_0x4cc7=function(){return _0x12d037;};return _0x4cc7();}export function getAiProxyUrl(){const _0x5b12f9=_0x1b5bfd,_0x3d8ec8={'elXKD':function(_0x18d17a){return _0x18d17a();}};return ENVIRONMENT_CONFIGS[_0x3d8ec8['elXKD'](getCurrentEnvironment)][_0x5b12f9(0x199)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xcf4fc9,_0xe41f8){const _0x1508cc=_0x2895,_0x401260=_0xcf4fc9();while(!![]){try{const _0x3429d9=parseInt(_0x1508cc(0x1fc))/0x1+parseInt(_0x1508cc(0x1ee))/0x2*(parseInt(_0x1508cc(0x1e0))/0x3)+-parseInt(_0x1508cc(0x20e))/0x4+parseInt(_0x1508cc(0x214))/0x5*(parseInt(_0x1508cc(0x1fe))/0x6)+parseInt(_0x1508cc(0x1e1))/0x7*(parseInt(_0x1508cc(0x1ff))/0x8)+-parseInt(_0x1508cc(0x21e))/0x9*(parseInt(_0x1508cc(0x208))/0xa)+-parseInt(_0x1508cc(0x20f))/0xb;if(_0x3429d9===_0xe41f8)break;else _0x401260['push'](_0x401260['shift']());}catch(_0x58c6df){_0x401260['push'](_0x401260['shift']());}}}(_0x2a3c,0x68a3b));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x4591a6){const _0x14961c=_0x2895,_0x3ffe0a={'GrMhb':function(_0x5ccfb0){return _0x5ccfb0();},'WRUGp':_0x14961c(0x1ef),'BQJYG':_0x14961c(0x1f3)},_0x204614=await _0x3ffe0a['GrMhb'](getToken);if(!_0x204614)throw new Error(_0x3ffe0a['WRUGp']);const _0x56c20b=_0x3ffe0a[_0x14961c(0x209)](getApiBaseUrl),_0x2cc166=await fetch(_0x56c20b+_0x14961c(0x21a),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x204614,'Content-Type':_0x3ffe0a[_0x14961c(0x200)]},'body':JSON[_0x14961c(0x219)](_0x4591a6)});if(!_0x2cc166['ok']){const _0x1f7569=await _0x2cc166[_0x14961c(0x1fa)]();throw new Error(_0x14961c(0x1e8)+_0x1f7569);}return _0x2cc166['json']();}export async function listFeatures(_0x1fe28b){const _0x34c82b=_0x2895,_0x2300c3={'ibbmI':function(_0x50a767){return _0x50a767();},'SQRKn':'gitRepoUrl','tvCYo':'gitBranch','BPyQg':'limit','TpAzY':'offset','MeiPJ':'true'},_0x5a3198=await getToken();if(!_0x5a3198)throw new Error(_0x34c82b(0x1ef));const _0x22d379=_0x2300c3['ibbmI'](getApiBaseUrl),_0x1374e0=new URLSearchParams();if(_0x1fe28b?.[_0x34c82b(0x21f)])_0x1374e0['set'](_0x2300c3['SQRKn'],_0x1fe28b[_0x34c82b(0x21f)]);if(_0x1fe28b?.[_0x34c82b(0x221)])_0x1374e0['set'](_0x2300c3[_0x34c82b(0x1e6)],_0x1fe28b[_0x34c82b(0x221)]);if(_0x1fe28b?.['limit'])_0x1374e0[_0x34c82b(0x206)](_0x2300c3['BPyQg'],_0x1fe28b['limit'][_0x34c82b(0x216)]());if(_0x1fe28b?.['offset'])_0x1374e0[_0x34c82b(0x206)](_0x2300c3[_0x34c82b(0x1df)],_0x1fe28b[_0x34c82b(0x218)][_0x34c82b(0x216)]());if(_0x1fe28b?.[_0x34c82b(0x1fb)])_0x1374e0['set'](_0x34c82b(0x1fb),_0x2300c3['MeiPJ']);const _0x2df2d3=_0x22d379+_0x34c82b(0x21a)+(_0x1374e0['toString']()?'?'+_0x1374e0[_0x34c82b(0x216)]():''),_0x3975bf=await fetch(_0x2df2d3,{'method':_0x34c82b(0x1e7),'headers':{'Authorization':'Bearer\x20'+_0x5a3198}});if(!_0x3975bf['ok']){const _0x1db441=await _0x3975bf['text']();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x1db441);}return _0x3975bf[_0x34c82b(0x223)]();}export async function getFeature(_0x2dc781){const _0x223e8b=_0x2895,_0x598153={'qauno':function(_0x2cc9b5){return _0x2cc9b5();}},_0xf8aeba=await _0x598153[_0x223e8b(0x1f5)](getToken);if(!_0xf8aeba)throw new Error(_0x223e8b(0x1ef));const _0x21299d=_0x598153['qauno'](getApiBaseUrl),_0x3ef685=await fetch(_0x21299d+_0x223e8b(0x1f2)+_0x2dc781,{'method':_0x223e8b(0x1e7),'headers':{'Authorization':_0x223e8b(0x1f1)+_0xf8aeba}});if(!_0x3ef685['ok']){const _0x326663=await _0x3ef685['text']();throw new Error(_0x223e8b(0x1f4)+_0x326663);}return _0x3ef685[_0x223e8b(0x223)]();}function _0x2a3c(){const _0x20afff=['uFkkl','TpAzY','45ifkskA','35cWwMww','vcsof','Failed\x20to\x20get\x20item\x20feedback:\x20','Failed\x20to\x20conclude\x20session:\x20','tbgRY','tvCYo','GET','Failed\x20to\x20create\x20feature\x20review:\x20','/action-items','AXEiB','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','itemIds','/sessions/','38726nvTdVa','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','AMFCE','Bearer\x20','/api/v1/mcp/features/','application/json','Failed\x20to\x20get\x20feature\x20review:\x20','qauno','/checklist/','aXGdV','vtXuf','vcuKt','text','includeDeleted','585208PnfEJy','SYZDp','68658qBSFWH','1223656IPDJJN','BQJYG','ZdDVa','sessionId','Failed\x20to\x20get\x20feature\x20review\x20report:\x20','ZTBRQ','BZlrj','set','TTqQe','352270QumQrZ','GrMhb','Failed\x20to\x20start\x20session:\x20','/feedback','/checklist','WjTGJ','489484VXYpLL','13852443jJWICL','style','aOKfg','/checklist-items/','/sessions','105dTCjix','/start','toString','POST','offset','stringify','/api/v1/mcp/features','UTOOE','PATCH','NODUZ','18VNupqi','gitRepoUrl','Failed\x20to\x20create\x20scenario:\x20','gitBranch','/report','json','eegkC','HZXNE','join'];_0x2a3c=function(){return _0x20afff;};return _0x2a3c();}export async function updateFeature(_0x1ed5b6,_0x5a319a){const _0x32b78b=_0x2895,_0x4be10a={'hoqzG':function(_0x2107d8){return _0x2107d8();},'AXEiB':'PATCH','uFkkl':_0x32b78b(0x1f3)},_0x46ed3d=await _0x4be10a['hoqzG'](getToken);if(!_0x46ed3d)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x4e2892=_0x4be10a['hoqzG'](getApiBaseUrl),_0x3be5da=await fetch(_0x4e2892+_0x32b78b(0x1f2)+_0x1ed5b6,{'method':_0x4be10a[_0x32b78b(0x1ea)],'headers':{'Authorization':'Bearer\x20'+_0x46ed3d,'Content-Type':_0x4be10a[_0x32b78b(0x1de)]},'body':JSON[_0x32b78b(0x219)](_0x5a319a)});if(!_0x3be5da['ok']){const _0x1003d1=await _0x3be5da[_0x32b78b(0x1fa)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x1003d1);}return _0x3be5da['json']();}export async function createChecklistItem(_0x374c44,_0x35ad24,_0xb44964){const _0x177c91=_0x2895,_0x3e34a5={'lejRS':function(_0x11e052){return _0x11e052();},'qeTZu':_0x177c91(0x217),'WjTGJ':_0x177c91(0x1f3)},_0x340a3f=await getToken();if(!_0x340a3f)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2d81c6=_0x3e34a5['lejRS'](getApiBaseUrl),_0x4d6240=await fetch(_0x2d81c6+'/api/v1/mcp/features/'+_0x374c44+_0x177c91(0x20c),{'method':_0x3e34a5['qeTZu'],'headers':{'Authorization':'Bearer\x20'+_0x340a3f,'Content-Type':_0x3e34a5[_0x177c91(0x20d)]},'body':JSON['stringify']({'description':_0x35ad24,'position':_0xb44964})});if(!_0x4d6240['ok']){const _0x45d389=await _0x4d6240['text']();throw new Error(_0x177c91(0x220)+_0x45d389);}return _0x4d6240['json']();}export async function updateChecklistItem(_0x1fbf53,_0x198f9e,_0x10c22e){const _0x52b912=_0x2895,_0x4ef78c={'mIQhG':function(_0x414fd4){return _0x414fd4();},'enSxJ':_0x52b912(0x1ef),'PindD':'updateChecklistItem'};return withRetry(async()=>{const _0x22bcfb=_0x52b912,_0x2c2b72=await _0x4ef78c['mIQhG'](getToken);if(!_0x2c2b72)throw new Error(_0x4ef78c['enSxJ']);const _0x27d017=getApiBaseUrl(),_0x2a7b65=await fetch(_0x27d017+'/api/v1/mcp/features/'+_0x1fbf53+_0x22bcfb(0x1f6)+_0x198f9e,{'method':_0x22bcfb(0x21c),'headers':{'Authorization':_0x22bcfb(0x1f1)+_0x2c2b72,'Content-Type':'application/json'},'body':JSON[_0x22bcfb(0x219)](_0x10c22e)});if(!_0x2a7b65['ok']){const _0x44f513=await _0x2a7b65['text']();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x44f513);}return _0x2a7b65[_0x22bcfb(0x223)]();},{'label':_0x4ef78c['PindD']});}export async function getFeatureReport(_0x14f378){const _0x28b417=_0x2895,_0x1aa2d2=await getToken();if(!_0x1aa2d2)throw new Error(_0x28b417(0x1ef));const _0x238880=getApiBaseUrl(),_0x9d4461=await fetch(_0x238880+_0x28b417(0x1f2)+_0x14f378+_0x28b417(0x222),{'method':'GET','headers':{'Authorization':_0x28b417(0x1f1)+_0x1aa2d2}});if(!_0x9d4461['ok']){const _0x4690ac=await _0x9d4461['text']();throw new Error(_0x28b417(0x203)+_0x4690ac);}return _0x9d4461['json']();}export async function getFeatureReportMarkdown(_0x5e3d84,_0x5f1855){const _0x28b39f=_0x2895,_0x86ef42={'XXZUB':_0x28b39f(0x1ef),'Aenwo':'sessionId','IWESc':function(_0x35e27e,_0x519b02){return _0x35e27e&&_0x519b02;},'dBHoG':'style','SYZDp':function(_0x47a9ac,_0x267ff6,_0x4d598d){return _0x47a9ac(_0x267ff6,_0x4d598d);},'vtXuf':'GET'},_0x117f22=await getToken();if(!_0x117f22)throw new Error(_0x86ef42['XXZUB']);const _0x16d7b4=getApiBaseUrl(),_0x4ec7c3=new URLSearchParams(),_0x363eb=(_0x5f1855?.[_0x28b39f(0x1ec)]?.['length']??0x0)>0x0,_0x5694bd=Boolean(_0x5f1855?.['sessionId']);_0x363eb&&_0x5f1855?.[_0x28b39f(0x1ec)]&&_0x4ec7c3['set'](_0x28b39f(0x1ec),_0x5f1855['itemIds'][_0x28b39f(0x1dd)](','));_0x5694bd&&_0x5f1855?.['sessionId']&&_0x4ec7c3[_0x28b39f(0x206)](_0x86ef42['Aenwo'],_0x5f1855[_0x28b39f(0x202)]);_0x86ef42['IWESc'](!_0x363eb,!_0x5694bd)&&_0x5f1855?.[_0x28b39f(0x210)]&&_0x4ec7c3[_0x28b39f(0x206)](_0x86ef42['dBHoG'],_0x5f1855['style']);const _0x5e8efd=_0x16d7b4+_0x28b39f(0x1f2)+_0x5e3d84+'/report/markdown',_0x59d332=''+_0x5e8efd+(_0x4ec7c3[_0x28b39f(0x216)]()?'?'+_0x4ec7c3['toString']():''),_0xad6a72=await _0x86ef42[_0x28b39f(0x1fd)](fetch,_0x59d332,{'method':_0x86ef42[_0x28b39f(0x1f8)],'headers':{'Authorization':'Bearer\x20'+_0x117f22}});if(!_0xad6a72['ok']){const _0x27edaa=await _0xad6a72['text']();throw new Error(_0x28b39f(0x1eb)+_0x27edaa);}return _0xad6a72[_0x28b39f(0x1fa)]();}export async function listFeatureSessions(_0x40b5b1){const _0x4b39d6=_0x2895,_0x158ac2={'NODUZ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','AMFCE':function(_0x1e08ed){return _0x1e08ed();},'UUNqX':function(_0x138ff3,_0x594e57,_0x49b11c){return _0x138ff3(_0x594e57,_0x49b11c);},'RiWEW':_0x4b39d6(0x1e7)},_0x3d494e=await getToken();if(!_0x3d494e)throw new Error(_0x158ac2[_0x4b39d6(0x21d)]);const _0x2ab596=_0x158ac2[_0x4b39d6(0x1f0)](getApiBaseUrl),_0x5490ad=await _0x158ac2['UUNqX'](fetch,_0x2ab596+'/api/v1/mcp/features/'+_0x40b5b1+_0x4b39d6(0x213),{'method':_0x158ac2['RiWEW'],'headers':{'Authorization':_0x4b39d6(0x1f1)+_0x3d494e}});if(!_0x5490ad['ok']){const _0x43e5d1=await _0x5490ad[_0x4b39d6(0x1fa)]();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x43e5d1);}return _0x5490ad[_0x4b39d6(0x223)]();}function _0x2895(_0x1b9ba3,_0x32420a){_0x1b9ba3=_0x1b9ba3-0x1dd;const _0x2a3c7c=_0x2a3c();let _0x289520=_0x2a3c7c[_0x1b9ba3];return _0x289520;}export async function startSession(_0xde29c5,_0x2e47fa){const _0x64ef71=_0x2895,_0x101573={'aXGdV':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','UTOOE':function(_0x3961b9){return _0x3961b9();},'eegkC':function(_0x51c12a,_0x533fa9,_0x255fbf){return _0x51c12a(_0x533fa9,_0x255fbf);},'tbgRY':_0x64ef71(0x217)},_0x1ff784=await getToken();if(!_0x1ff784)throw new Error(_0x101573[_0x64ef71(0x1f7)]);const _0x1af1b4=_0x101573[_0x64ef71(0x21b)](getApiBaseUrl),_0x4d147e=await _0x101573[_0x64ef71(0x224)](fetch,_0x1af1b4+_0x64ef71(0x1f2)+_0xde29c5+'/sessions/'+_0x2e47fa+_0x64ef71(0x215),{'method':_0x101573[_0x64ef71(0x1e5)],'headers':{'Authorization':'Bearer\x20'+_0x1ff784}});if(!_0x4d147e['ok']){const _0x2c848c=await _0x4d147e[_0x64ef71(0x1fa)]();throw new Error(_0x64ef71(0x20a)+_0x2c848c);}return _0x4d147e[_0x64ef71(0x223)]();}export async function concludeSession(_0x1a2237,_0x555b3a){const _0x52288a=_0x2895,_0x20ebd1={'gNgXb':function(_0x5d5fe7){return _0x5d5fe7();},'vcsof':function(_0x3bb70e){return _0x3bb70e();},'kunsv':function(_0x470abd,_0xd6f0f3,_0x2d3edd){return _0x470abd(_0xd6f0f3,_0x2d3edd);}},_0x4fbc97=await _0x20ebd1['gNgXb'](getToken);if(!_0x4fbc97)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x54febf=_0x20ebd1[_0x52288a(0x1e2)](getApiBaseUrl),_0x8a89ba=await _0x20ebd1['kunsv'](fetch,_0x54febf+'/api/v1/mcp/features/'+_0x1a2237+_0x52288a(0x1ed)+_0x555b3a+'/conclude',{'method':_0x52288a(0x217),'headers':{'Authorization':'Bearer\x20'+_0x4fbc97}});if(!_0x8a89ba['ok']){const _0x2137f7=await _0x8a89ba['text']();throw new Error(_0x52288a(0x1e4)+_0x2137f7);}return _0x8a89ba[_0x52288a(0x223)]();}export async function getActionItems(_0x247200){const _0x250cab=_0x2895,_0x30bf09={'HZXNE':function(_0x47e4a5){return _0x47e4a5();},'vcuKt':function(_0x670b8b){return _0x670b8b();},'aUVEu':_0x250cab(0x1e7)},_0xd98a15=await _0x30bf09[_0x250cab(0x225)](getToken);if(!_0xd98a15)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3bde47=_0x30bf09[_0x250cab(0x1f9)](getApiBaseUrl),_0x2a7710=await fetch(_0x3bde47+'/api/v1/mcp/features/'+_0x247200+_0x250cab(0x1e9),{'method':_0x30bf09['aUVEu'],'headers':{'Authorization':_0x250cab(0x1f1)+_0xd98a15}});if(!_0x2a7710['ok']){const _0xb633c3=await _0x2a7710['text']();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0xb633c3);}return _0x2a7710['json']();}export async function getItemFeedback(_0x3020fb,_0x4e1df7){const _0x224432=_0x2895,_0x52db1d={'TTqQe':_0x224432(0x1ef)},_0x7dc54d=await getToken();if(!_0x7dc54d)throw new Error(_0x52db1d[_0x224432(0x207)]);const _0x5e4f74=getApiBaseUrl(),_0x148daa=await fetch(_0x5e4f74+_0x224432(0x1f2)+_0x3020fb+_0x224432(0x212)+_0x4e1df7+_0x224432(0x20b),{'method':_0x224432(0x1e7),'headers':{'Authorization':_0x224432(0x1f1)+_0x7dc54d}});if(!_0x148daa['ok']){const _0x134bba=await _0x148daa[_0x224432(0x1fa)]();throw new Error(_0x224432(0x1e3)+_0x134bba);}return _0x148daa['json']();}export async function markCommentsAddressed(_0x14a484,_0x350738,_0x31864b){const _0x37e2e4=_0x2895,_0x3c039a={'dAKDz':function(_0xef1b0c){return _0xef1b0c();},'aOKfg':function(_0x239f42,_0x427c64,_0x1dd31c){return _0x239f42(_0x427c64,_0x1dd31c);},'BZlrj':'POST'},_0x221fb7=await getToken();if(!_0x221fb7)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3a35e6=_0x3c039a['dAKDz'](getApiBaseUrl),_0x3c52b6=await _0x3c039a[_0x37e2e4(0x211)](fetch,_0x3a35e6+'/api/v1/mcp/features/'+_0x14a484+'/comments/address',{'method':_0x3c039a[_0x37e2e4(0x205)],'headers':{'Authorization':'Bearer\x20'+_0x221fb7,'Content-Type':_0x37e2e4(0x1f3)},'body':JSON[_0x37e2e4(0x219)]({'checklistItemId':_0x350738,'commentIds':_0x31864b})});if(!_0x3c52b6['ok']){const _0x4af97c=await _0x3c52b6['text']();throw new Error('Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20'+_0x4af97c);}}export async function softDeleteFeature(_0x30069e){const _0x2f3122=_0x2895,_0x485c65={'ADTcd':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ZdDVa':function(_0x3fa406){return _0x3fa406();},'DkItA':function(_0x2958dd,_0x551e80,_0x21ee2c){return _0x2958dd(_0x551e80,_0x21ee2c);},'heAXL':'DELETE'},_0x4b7cf6=await getToken();if(!_0x4b7cf6)throw new Error(_0x485c65['ADTcd']);const _0x1fdecd=_0x485c65[_0x2f3122(0x201)](getApiBaseUrl),_0x438093=await _0x485c65['DkItA'](fetch,_0x1fdecd+_0x2f3122(0x1f2)+_0x30069e,{'method':_0x485c65['heAXL'],'headers':{'Authorization':'Bearer\x20'+_0x4b7cf6}});if(!_0x438093['ok']){const _0x16fa34=await _0x438093['text']();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x16fa34);}}export async function restoreFeature(_0x1478c4){const _0x2cb038=_0x2895,_0x1e115f={'RJvMc':function(_0x31f72e){return _0x31f72e();},'ZTBRQ':_0x2cb038(0x217)},_0x134306=await _0x1e115f['RJvMc'](getToken);if(!_0x134306)throw new Error(_0x2cb038(0x1ef));const _0x51399f=_0x1e115f['RJvMc'](getApiBaseUrl),_0xbe83c1=await fetch(_0x51399f+'/api/v1/mcp/features/'+_0x1478c4+'/restore',{'method':_0x1e115f[_0x2cb038(0x204)],'headers':{'Authorization':'Bearer\x20'+_0x134306}});if(!_0xbe83c1['ok']){const _0x38cb6a=await _0xbe83c1['text']();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x38cb6a);}}
|
|
1
|
+
(function(_0x4eae11,_0x205ee3){const _0x232670=_0x15c0,_0x224635=_0x4eae11();while(!![]){try{const _0x212500=parseInt(_0x232670(0x11d))/0x1*(-parseInt(_0x232670(0x11c))/0x2)+parseInt(_0x232670(0x10b))/0x3+parseInt(_0x232670(0x129))/0x4*(parseInt(_0x232670(0x13a))/0x5)+-parseInt(_0x232670(0x10f))/0x6+-parseInt(_0x232670(0x14a))/0x7*(parseInt(_0x232670(0x112))/0x8)+-parseInt(_0x232670(0x119))/0x9+parseInt(_0x232670(0x102))/0xa;if(_0x212500===_0x205ee3)break;else _0x224635['push'](_0x224635['shift']());}catch(_0x4282ef){_0x224635['push'](_0x224635['shift']());}}}(_0x1707,0x69832));function _0x1707(){const _0x3a365a=['Djyvq','70vqXiDV','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','eVUBS','Failed\x20to\x20restore\x20feature\x20review:\x20','OejfF','dgJtk','13221800UIlocd','Failed\x20to\x20conclude\x20session:\x20','vfQDk','Failed\x20to\x20delete\x20feature\x20review:\x20','style','NjZil','ZVUUW','/report','rbYcu','2575230nOfOKZ','PATCH','Failed\x20to\x20list\x20feature\x20reviews:\x20','Bearer\x20','2170566QYQDTx','json','gitRepoUrl','670040qzeLRr','/api/v1/mcp/features/','offset','set','fGFWX','Pztdw','stringify','3396933HwiTDV','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','text','2cWhmEe','846577tBJGur','cHTGc','length','fgMgp','toString','AfAfv','POST','/api/v1/mcp/features','limit','sessionId','oxija','CZMJe','1468WdNlNt','/report/markdown','zXvQu','RlMOL','Failed\x20to\x20get\x20item\x20feedback:\x20','TFWmF','zTpQP','GET','gitBranch','/feedback','itemIds','qAzqX','BUDXY','hCIGf','/restore','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','join','9195pZjRMJ','/comments/address','IdYrF','SHALB','ZSmWv','hUFXy','/checklist','rdRTb','application/json','updateChecklistItem','ygKod','UyYru','Failed\x20to\x20get\x20action\x20items:\x20','Failed\x20to\x20update\x20scenario:\x20','Failed\x20to\x20get\x20feature\x20review\x20report:\x20'];_0x1707=function(){return _0x3a365a;};return _0x1707();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x127ee0){const _0x35e5be=_0x15c0,_0x3fe4d9={'ujTdl':function(_0x5ec286){return _0x5ec286();},'qAzqX':function(_0x32d73d,_0x39c2dd,_0x3e7b9b){return _0x32d73d(_0x39c2dd,_0x3e7b9b);},'pGBJc':_0x35e5be(0x142)},_0x5ce5cd=await _0x3fe4d9['ujTdl'](getToken);if(!_0x5ce5cd)throw new Error(_0x35e5be(0x14b));const _0x4ec96d=getApiBaseUrl(),_0x17ee98=await _0x3fe4d9[_0x35e5be(0x134)](fetch,_0x4ec96d+_0x35e5be(0x124),{'method':_0x35e5be(0x123),'headers':{'Authorization':_0x35e5be(0x10e)+_0x5ce5cd,'Content-Type':_0x3fe4d9['pGBJc']},'body':JSON[_0x35e5be(0x118)](_0x127ee0)});if(!_0x17ee98['ok']){const _0x52ff66=await _0x17ee98[_0x35e5be(0x11b)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x52ff66);}return _0x17ee98[_0x35e5be(0x110)]();}export async function listFeatures(_0x2295ea){const _0x376c6c=_0x15c0,_0xb3938={'TFWmF':function(_0xec6358){return _0xec6358();},'UyYru':_0x376c6c(0x14b),'yalUl':'gitRepoUrl','dgJtk':_0x376c6c(0x125),'OejfF':_0x376c6c(0x114),'HLGyI':'includeDeleted','VmYJE':'true','BUDXY':function(_0x1f4ff6,_0x240d2d,_0x1b0bd1){return _0x1f4ff6(_0x240d2d,_0x1b0bd1);}},_0x436108=await _0xb3938[_0x376c6c(0x12e)](getToken);if(!_0x436108)throw new Error(_0xb3938[_0x376c6c(0x145)]);const _0x373f9f=getApiBaseUrl(),_0x53a94a=new URLSearchParams();if(_0x2295ea?.[_0x376c6c(0x111)])_0x53a94a['set'](_0xb3938['yalUl'],_0x2295ea['gitRepoUrl']);if(_0x2295ea?.['gitBranch'])_0x53a94a['set'](_0x376c6c(0x131),_0x2295ea['gitBranch']);if(_0x2295ea?.[_0x376c6c(0x125)])_0x53a94a['set'](_0xb3938[_0x376c6c(0x101)],_0x2295ea['limit'][_0x376c6c(0x121)]());if(_0x2295ea?.[_0x376c6c(0x114)])_0x53a94a['set'](_0xb3938[_0x376c6c(0x100)],_0x2295ea['offset']['toString']());if(_0x2295ea?.['includeDeleted'])_0x53a94a[_0x376c6c(0x115)](_0xb3938['HLGyI'],_0xb3938['VmYJE']);const _0x4a7244=_0x373f9f+_0x376c6c(0x124)+(_0x53a94a[_0x376c6c(0x121)]()?'?'+_0x53a94a['toString']():''),_0x2148ba=await _0xb3938[_0x376c6c(0x135)](fetch,_0x4a7244,{'method':_0x376c6c(0x130),'headers':{'Authorization':'Bearer\x20'+_0x436108}});if(!_0x2148ba['ok']){const _0x29a8ab=await _0x2148ba[_0x376c6c(0x11b)]();throw new Error(_0x376c6c(0x10d)+_0x29a8ab);}return _0x2148ba['json']();}export async function getFeature(_0xb7d489){const _0x25267e=_0x15c0,_0x5b36ed={'oxija':_0x25267e(0x14b),'fgMgp':function(_0x3beb05){return _0x3beb05();},'fGFWX':function(_0x5e02d6,_0x512f03,_0x3dece1){return _0x5e02d6(_0x512f03,_0x3dece1);},'GinkP':'GET'},_0x13dfe0=await getToken();if(!_0x13dfe0)throw new Error(_0x5b36ed[_0x25267e(0x127)]);const _0x471d0c=_0x5b36ed[_0x25267e(0x120)](getApiBaseUrl),_0x1d19ca=await _0x5b36ed[_0x25267e(0x116)](fetch,_0x471d0c+_0x25267e(0x113)+_0xb7d489,{'method':_0x5b36ed['GinkP'],'headers':{'Authorization':'Bearer\x20'+_0x13dfe0}});if(!_0x1d19ca['ok']){const _0x2e4e47=await _0x1d19ca[_0x25267e(0x11b)]();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x2e4e47);}return _0x1d19ca['json']();}export async function updateFeature(_0x2f1b10,_0x750445){const _0x5aebd7=_0x15c0,_0x3581ce={'vtQRb':function(_0x1550db){return _0x1550db();}},_0xc38090=await _0x3581ce['vtQRb'](getToken);if(!_0xc38090)throw new Error(_0x5aebd7(0x14b));const _0x2edf37=getApiBaseUrl(),_0x531aa2=await fetch(_0x2edf37+'/api/v1/mcp/features/'+_0x2f1b10,{'method':_0x5aebd7(0x10c),'headers':{'Authorization':_0x5aebd7(0x10e)+_0xc38090,'Content-Type':'application/json'},'body':JSON['stringify'](_0x750445)});if(!_0x531aa2['ok']){const _0x266f1b=await _0x531aa2[_0x5aebd7(0x11b)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x266f1b);}return _0x531aa2['json']();}export async function createChecklistItem(_0x5cd086,_0x298226,_0xc0801f){const _0x2dd564=_0x15c0,_0x5c3af9={'ZVUUW':function(_0x716644){return _0x716644();},'NjZil':function(_0x192d3f){return _0x192d3f();},'stedJ':function(_0x30ad9d,_0x215002,_0x3138c7){return _0x30ad9d(_0x215002,_0x3138c7);},'NZkyZ':_0x2dd564(0x142)},_0x4363a6=await _0x5c3af9[_0x2dd564(0x108)](getToken);if(!_0x4363a6)throw new Error(_0x2dd564(0x14b));const _0x569493=_0x5c3af9[_0x2dd564(0x107)](getApiBaseUrl),_0x41d056=await _0x5c3af9['stedJ'](fetch,_0x569493+'/api/v1/mcp/features/'+_0x5cd086+_0x2dd564(0x140),{'method':_0x2dd564(0x123),'headers':{'Authorization':'Bearer\x20'+_0x4363a6,'Content-Type':_0x5c3af9['NZkyZ']},'body':JSON[_0x2dd564(0x118)]({'description':_0x298226,'position':_0xc0801f})});if(!_0x41d056['ok']){const _0x31d535=await _0x41d056[_0x2dd564(0x11b)]();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x31d535);}return _0x41d056['json']();}export async function updateChecklistItem(_0x6f98a7,_0x89366a,_0x20a502){const _0x598e0b=_0x15c0,_0x3292e8={'AfAfv':function(_0x522c3c,_0x5839f8,_0x261ac7){return _0x522c3c(_0x5839f8,_0x261ac7);},'oXBAT':'application/json','ExLwm':_0x598e0b(0x143)};return withRetry(async()=>{const _0x5188a0=_0x598e0b,_0x5f54d3=await getToken();if(!_0x5f54d3)throw new Error(_0x5188a0(0x14b));const _0x15eab8=getApiBaseUrl(),_0x463358=await _0x3292e8[_0x5188a0(0x122)](fetch,_0x15eab8+'/api/v1/mcp/features/'+_0x6f98a7+'/checklist/'+_0x89366a,{'method':_0x5188a0(0x10c),'headers':{'Authorization':_0x5188a0(0x10e)+_0x5f54d3,'Content-Type':_0x3292e8['oXBAT']},'body':JSON['stringify'](_0x20a502)});if(!_0x463358['ok']){const _0x1fd1c7=await _0x463358['text']();throw new Error(_0x5188a0(0x147)+_0x1fd1c7);}return _0x463358[_0x5188a0(0x110)]();},{'label':_0x3292e8['ExLwm']});}export async function getFeatureReport(_0x132dce){const _0x1c3160=_0x15c0,_0x1800ac={'hUFXy':function(_0x19372c){return _0x19372c();},'rbYcu':_0x1c3160(0x14b)},_0x146c51=await _0x1800ac['hUFXy'](getToken);if(!_0x146c51)throw new Error(_0x1800ac[_0x1c3160(0x10a)]);const _0x5f4205=_0x1800ac[_0x1c3160(0x13f)](getApiBaseUrl),_0x9c0c97=await fetch(_0x5f4205+'/api/v1/mcp/features/'+_0x132dce+_0x1c3160(0x109),{'method':'GET','headers':{'Authorization':_0x1c3160(0x10e)+_0x146c51}});if(!_0x9c0c97['ok']){const _0x1f3e8c=await _0x9c0c97['text']();throw new Error(_0x1c3160(0x148)+_0x1f3e8c);}return _0x9c0c97['json']();}export async function getFeatureReportMarkdown(_0x456898,_0x2bce28){const _0x17fb7b=_0x15c0,_0x49d185={'bIees':function(_0x14e1c8,_0x64071c){return _0x14e1c8>_0x64071c;},'zXvQu':_0x17fb7b(0x133),'CZMJe':_0x17fb7b(0x106),'RlMOL':_0x17fb7b(0x130)},_0x3a9f39=await getToken();if(!_0x3a9f39)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0xdc0155=getApiBaseUrl(),_0x2873a3=new URLSearchParams(),_0x1eb1fc=_0x49d185['bIees'](_0x2bce28?.[_0x17fb7b(0x133)]?.[_0x17fb7b(0x11f)]??0x0,0x0),_0x2f0eb1=Boolean(_0x2bce28?.['sessionId']);_0x1eb1fc&&_0x2bce28?.[_0x17fb7b(0x133)]&&_0x2873a3['set'](_0x49d185[_0x17fb7b(0x12b)],_0x2bce28['itemIds'][_0x17fb7b(0x139)](','));_0x2f0eb1&&_0x2bce28?.[_0x17fb7b(0x126)]&&_0x2873a3[_0x17fb7b(0x115)]('sessionId',_0x2bce28[_0x17fb7b(0x126)]);!_0x1eb1fc&&!_0x2f0eb1&&_0x2bce28?.[_0x17fb7b(0x106)]&&_0x2873a3['set'](_0x49d185[_0x17fb7b(0x128)],_0x2bce28[_0x17fb7b(0x106)]);const _0x24e64e=_0xdc0155+_0x17fb7b(0x113)+_0x456898+_0x17fb7b(0x12a),_0x4e1474=''+_0x24e64e+(_0x2873a3['toString']()?'?'+_0x2873a3['toString']():''),_0x226a3b=await fetch(_0x4e1474,{'method':_0x49d185[_0x17fb7b(0x12c)],'headers':{'Authorization':_0x17fb7b(0x10e)+_0x3a9f39}});if(!_0x226a3b['ok']){const _0x205adf=await _0x226a3b['text']();throw new Error(_0x17fb7b(0x138)+_0x205adf);}return _0x226a3b[_0x17fb7b(0x11b)]();}export async function listFeatureSessions(_0x3a9e16){const _0x3808eb=_0x15c0,_0x204675={'RlWcP':function(_0x432866){return _0x432866();},'eVUBS':'GET'},_0x3516d4=await getToken();if(!_0x3516d4)throw new Error(_0x3808eb(0x14b));const _0xaaaff8=_0x204675['RlWcP'](getApiBaseUrl),_0x29cd3b=await fetch(_0xaaaff8+'/api/v1/mcp/features/'+_0x3a9e16+'/sessions',{'method':_0x204675[_0x3808eb(0x14c)],'headers':{'Authorization':_0x3808eb(0x10e)+_0x3516d4}});if(!_0x29cd3b['ok']){const _0x8a6989=await _0x29cd3b['text']();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x8a6989);}return _0x29cd3b[_0x3808eb(0x110)]();}export async function startSession(_0xe6c5ae,_0xda47f6){const _0x17e7d1=_0x15c0,_0x3f59bd={'gaOLA':function(_0x3d4c5e,_0x11dc1c,_0x3c0182){return _0x3d4c5e(_0x11dc1c,_0x3c0182);},'vfQDk':'POST'},_0x146684=await getToken();if(!_0x146684)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5389a8=getApiBaseUrl(),_0x1bac16=await _0x3f59bd['gaOLA'](fetch,_0x5389a8+_0x17e7d1(0x113)+_0xe6c5ae+'/sessions/'+_0xda47f6+'/start',{'method':_0x3f59bd[_0x17e7d1(0x104)],'headers':{'Authorization':'Bearer\x20'+_0x146684}});if(!_0x1bac16['ok']){const _0x80b298=await _0x1bac16[_0x17e7d1(0x11b)]();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x80b298);}return _0x1bac16[_0x17e7d1(0x110)]();}export async function concludeSession(_0xc6b464,_0x51637b){const _0x45ea76=_0x15c0,_0x3cd5e9={'SHALB':_0x45ea76(0x123)},_0x27f9ab=await getToken();if(!_0x27f9ab)throw new Error(_0x45ea76(0x14b));const _0x47e105=getApiBaseUrl(),_0x145ebb=await fetch(_0x47e105+'/api/v1/mcp/features/'+_0xc6b464+'/sessions/'+_0x51637b+'/conclude',{'method':_0x3cd5e9[_0x45ea76(0x13d)],'headers':{'Authorization':'Bearer\x20'+_0x27f9ab}});if(!_0x145ebb['ok']){const _0x550b85=await _0x145ebb['text']();throw new Error(_0x45ea76(0x103)+_0x550b85);}return _0x145ebb[_0x45ea76(0x110)]();}export async function getActionItems(_0x29b625){const _0x53afe6=_0x15c0,_0x4cd0c5={'rdRTb':function(_0x2f451e){return _0x2f451e();},'hCIGf':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','MYkZS':'GET'},_0x721bed=await _0x4cd0c5[_0x53afe6(0x141)](getToken);if(!_0x721bed)throw new Error(_0x4cd0c5[_0x53afe6(0x136)]);const _0x1633e4=getApiBaseUrl(),_0xf77b78=await fetch(_0x1633e4+_0x53afe6(0x113)+_0x29b625+'/action-items',{'method':_0x4cd0c5['MYkZS'],'headers':{'Authorization':'Bearer\x20'+_0x721bed}});if(!_0xf77b78['ok']){const _0x1b2cd9=await _0xf77b78['text']();throw new Error(_0x53afe6(0x146)+_0x1b2cd9);}return _0xf77b78['json']();}export async function getItemFeedback(_0x432560,_0x253970){const _0x21999a=_0x15c0,_0x461ea2={'zTpQP':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','cHTGc':function(_0x5cc81d,_0x2a3bdd,_0x5c9b32){return _0x5cc81d(_0x2a3bdd,_0x5c9b32);},'WIidn':_0x21999a(0x130)},_0x30cbfe=await getToken();if(!_0x30cbfe)throw new Error(_0x461ea2[_0x21999a(0x12f)]);const _0x4e7893=getApiBaseUrl(),_0x2baf4b=await _0x461ea2[_0x21999a(0x11e)](fetch,_0x4e7893+_0x21999a(0x113)+_0x432560+'/checklist-items/'+_0x253970+_0x21999a(0x132),{'method':_0x461ea2['WIidn'],'headers':{'Authorization':_0x21999a(0x10e)+_0x30cbfe}});if(!_0x2baf4b['ok']){const _0x5bb840=await _0x2baf4b['text']();throw new Error(_0x21999a(0x12d)+_0x5bb840);}return _0x2baf4b[_0x21999a(0x110)]();}export async function markCommentsAddressed(_0x1346a6,_0x1c3d11,_0x2d746c){const _0x372abe=_0x15c0,_0x55fa00={'ygKod':function(_0x36322f){return _0x36322f();},'MLcQO':function(_0x21b5ed,_0x138937,_0x3f93ef){return _0x21b5ed(_0x138937,_0x3f93ef);},'IdYrF':'POST'},_0x2d1adf=await _0x55fa00[_0x372abe(0x144)](getToken);if(!_0x2d1adf)throw new Error(_0x372abe(0x14b));const _0x41e97f=getApiBaseUrl(),_0x1870c7=await _0x55fa00['MLcQO'](fetch,_0x41e97f+'/api/v1/mcp/features/'+_0x1346a6+_0x372abe(0x13b),{'method':_0x55fa00[_0x372abe(0x13c)],'headers':{'Authorization':_0x372abe(0x10e)+_0x2d1adf,'Content-Type':_0x372abe(0x142)},'body':JSON[_0x372abe(0x118)]({'checklistItemId':_0x1c3d11,'commentIds':_0x2d746c})});if(!_0x1870c7['ok']){const _0x46af51=await _0x1870c7['text']();throw new Error(_0x372abe(0x11a)+_0x46af51);}}function _0x15c0(_0x19cdcd,_0x28a905){_0x19cdcd=_0x19cdcd-0xff;const _0x1707ae=_0x1707();let _0x15c0b8=_0x1707ae[_0x19cdcd];return _0x15c0b8;}export async function softDeleteFeature(_0x274330){const _0x31fd80=_0x15c0,_0x470996={'fnoCk':_0x31fd80(0x14b),'Djyvq':function(_0xb8dfc6){return _0xb8dfc6();},'Pztdw':'DELETE'},_0x1ca2b8=await getToken();if(!_0x1ca2b8)throw new Error(_0x470996['fnoCk']);const _0x27bb31=_0x470996[_0x31fd80(0x149)](getApiBaseUrl),_0x13254a=await fetch(_0x27bb31+'/api/v1/mcp/features/'+_0x274330,{'method':_0x470996[_0x31fd80(0x117)],'headers':{'Authorization':_0x31fd80(0x10e)+_0x1ca2b8}});if(!_0x13254a['ok']){const _0x2c7b74=await _0x13254a[_0x31fd80(0x11b)]();throw new Error(_0x31fd80(0x105)+_0x2c7b74);}}export async function restoreFeature(_0x19e24b){const _0xdf9871=_0x15c0,_0xc391ea={'LeeOX':function(_0x4daeb1){return _0x4daeb1();},'ZSmWv':_0xdf9871(0x123)},_0x450119=await getToken();if(!_0x450119)throw new Error(_0xdf9871(0x14b));const _0x236f71=_0xc391ea['LeeOX'](getApiBaseUrl),_0x32ecac=await fetch(_0x236f71+'/api/v1/mcp/features/'+_0x19e24b+_0xdf9871(0x137),{'method':_0xc391ea[_0xdf9871(0x13e)],'headers':{'Authorization':'Bearer\x20'+_0x450119}});if(!_0x32ecac['ok']){const _0x58fe92=await _0x32ecac['text']();throw new Error(_0xdf9871(0xff)+_0x58fe92);}}
|